@harbour-enterprises/superdoc 0.9.36 → 0.9.38

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 (29) hide show
  1. package/dist/chunks/{index-YqE5-6V1.cjs → index-BXKGjuVW.cjs} +1 -1
  2. package/dist/chunks/{index-DHS2ANjv.cjs → index-CqRwYOdx.cjs} +1 -1
  3. package/dist/chunks/{index-XHRxRUhd.es.js → index-DjLrg1eZ.es.js} +2 -2
  4. package/dist/chunks/{index-Dd_ce0Er.es.js → index-dZKHAFXF.es.js} +1 -1
  5. package/dist/chunks/{super-editor.es-BQzGWM7r.es.js → super-editor.es-D9KdyC6R.es.js} +1470 -1471
  6. package/dist/chunks/{super-editor.es-DCZYO2jR.cjs → super-editor.es-RXOxr2bj.cjs} +35 -35
  7. package/dist/chunks/{url-Cqg7fbSS.cjs → url-6Xu7gR4T.cjs} +1 -1
  8. package/dist/chunks/{url-BWFemt_V.es.js → url-BxDGAI6E.es.js} +1 -1
  9. package/dist/chunks/{xml-js-Bzw8Bo_u.es.js → xml-js-BAML2_fM.es.js} +762 -744
  10. package/dist/chunks/xml-js-zhwNEV5e.cjs +10 -0
  11. package/dist/super-editor/chunks/{converter-CvrIEC6C.js → converter-D5xwMp-8.js} +3 -3
  12. package/dist/super-editor/chunks/{docx-zipper-DDWFjub_.js → docx-zipper-Ynx2OU2U.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-CGbgtgZf.js → editor-CXjTIDHJ.js} +739 -740
  14. package/dist/super-editor/chunks/{toolbar-CNAEBxeU.js → toolbar-CHBiYZnV.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/extensions/index.d.ts.map +1 -1
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/super-editor.es.js +6 -6
  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 +3 -3
  24. package/dist/superdoc.cjs +3 -3
  25. package/dist/superdoc.es.js +6 -6
  26. package/dist/superdoc.umd.js +741 -742
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunks/xml-js-Zwb1wsIy.cjs +0 -10
@@ -1,15 +1,15 @@
1
- var uf = Object.defineProperty;
1
+ var df = Object.defineProperty;
2
2
  var Ys = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var ff = (t, e, n) => e in t ? uf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var P = (t, e, n) => ff(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n) => e.has(t) || Ys("Cannot " + n);
5
+ var uf = (t, e, n) => e in t ? df(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var P = (t, e, n) => uf(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n) => e.has(t) || Ys("Cannot " + 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
- 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 cr, N as B, S as Y, T as H, b as W, D as $n, F as E, c as tn, 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 an, o as dr, k as $t, m as bi, n as Ql, q as ue, s as $e, v as Do, t as Cn, u as kf, w as Se, x as to, y as ec, z as Sn, 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 xf, Q as Mf } from "./converter-CvrIEC6C.js";
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-DDWFjub_.js";
9
+ import { UndoManager as ff, Item as pf, ContentType as hf, Text as mf, XmlElement as gf } from "yjs";
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 tn, d as yf, e as Jl, A as Ar, p as ie, B as bf, f as Yl, i as wf, g as wt, l as Or, h as Ht, j as Gl, r as Zl, R as an, o as dr, k as $t, m as bi, n as Ql, q as ue, s as $e, v as Do, t as Cn, u as vf, w as Se, x as to, y as ec, z as Sn, C as Wo, E as Uo, G as qo, H as no, I as kf, J as Gs, K as Zs, L as Cf, O as Sf, Q as xf } from "./converter-D5xwMp-8.js";
11
+ import { ref as Qs, computed as Mf, createElementBlock as Kt, openBlock as Xt, withModifiers as Ko, Fragment as Af, renderList as Of, normalizeClass as Tf, createCommentVNode as ea, toDisplayString as Xo, createElementVNode as Df, createApp as Nf } from "vue";
12
+ import { D as ta } from "./docx-zipper-Ynx2OU2U.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) => {
@@ -32,7 +32,7 @@ const Eo = (t, e, n = !1) => {
32
32
  }
33
33
  }), n ? d : c;
34
34
  };
35
- function If(t) {
35
+ function Ef(t) {
36
36
  const { state: e } = t, { selection: n } = e, r = No(e), o = n.$head.parent.attrs.marksAttrs, i = r.filter((f) => !["textStyle", "link"].includes(f.type.name)).map((f) => ({ name: f.type.name, attrs: f.attrs })), s = r.filter((f) => f.type.name === "textStyle");
37
37
  if (i.push(...s.flatMap(na)), o) {
38
38
  const f = o.filter((h) => !["textStyle", "link"].includes(h.type)).map((h) => ({ name: h.type, attrs: h.attrs || {} })), p = o.filter((h) => h.type === "textStyle");
@@ -43,7 +43,7 @@ function If(t) {
43
43
  let { from: f, to: p, attrs: h } = l;
44
44
  n.from >= f && n.to <= p && i.push({ name: "link", attrs: h });
45
45
  }
46
- const c = ["paragraphSpacing"], d = Pf(e);
46
+ const c = ["paragraphSpacing"], d = If(e);
47
47
  return Object.keys(d).forEach((f) => {
48
48
  if (c.includes(f)) return;
49
49
  const p = {};
@@ -56,7 +56,7 @@ function na(t) {
56
56
  n[r] && e.push({ name: r, attrs: { [r]: n[r] } });
57
57
  }), e;
58
58
  }
59
- function Pf(t) {
59
+ function If(t) {
60
60
  try {
61
61
  const { from: e, to: n, empty: r } = t.selection, o = {}, i = (l) => {
62
62
  Object.keys(l.attrs).forEach((c) => {
@@ -79,7 +79,7 @@ fe.prototype.prepend = function(e) {
79
79
  return e.length ? fe.from(e).append(this) : this;
80
80
  };
81
81
  fe.prototype.appendInner = function(e) {
82
- return new Rf(this, e);
82
+ return new Pf(this, e);
83
83
  };
84
84
  fe.prototype.slice = function(e, n) {
85
85
  return e === void 0 && (e = 0), n === void 0 && (n = this.length), e >= n ? fe.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, n));
@@ -134,7 +134,7 @@ var tc = /* @__PURE__ */ function(t) {
134
134
  }, Object.defineProperties(e.prototype, n), e;
135
135
  }(fe);
136
136
  fe.empty = new tc([]);
137
- var Rf = /* @__PURE__ */ function(t) {
137
+ var Pf = /* @__PURE__ */ function(t) {
138
138
  function e(n, r) {
139
139
  t.call(this), this.left = n, this.right = r, this.length = n.length + r.length, this.depth = Math.max(n.depth, r.depth) + 1;
140
140
  }
@@ -167,7 +167,7 @@ var Rf = /* @__PURE__ */ function(t) {
167
167
  return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
168
168
  }, e;
169
169
  }(fe);
170
- const Lf = 500;
170
+ const Rf = 500;
171
171
  class Xe {
172
172
  constructor(e, n) {
173
173
  this.items = e, this.eventCount = n;
@@ -209,7 +209,7 @@ class Xe {
209
209
  (p = l && l.merge(f)) && (f = p, d ? i.pop() : a = a.slice(0, a.length - 1)), i.push(f), n && (s++, n = void 0), o || (l = f);
210
210
  }
211
211
  let c = s - r.depth;
212
- return c > Bf && (a = Ff(a, c), s -= c), new Xe(a.append(i), s);
212
+ return c > Ff && (a = Lf(a, c), s -= c), new Xe(a.append(i), s);
213
213
  }
214
214
  remapping(e, n) {
215
215
  let r = new cr();
@@ -249,7 +249,7 @@ class Xe {
249
249
  for (let f = n; f < s; f++)
250
250
  c.push(new Qe(i.maps[f]));
251
251
  let d = this.items.slice(0, o).append(c).append(r), u = new Xe(d, a);
252
- return u.emptyItemCount() > Lf && (u = u.compress(this.items.length - r.length)), u;
252
+ return u.emptyItemCount() > Rf && (u = u.compress(this.items.length - r.length)), u;
253
253
  }
254
254
  emptyItemCount() {
255
255
  let e = 0;
@@ -281,7 +281,7 @@ class Xe {
281
281
  }
282
282
  }
283
283
  Xe.empty = new Xe(fe.empty, 0);
284
- function Ff(t, e) {
284
+ function Lf(t, e) {
285
285
  let n;
286
286
  return t.forEach((r, o) => {
287
287
  if (r.selection && e-- == 0)
@@ -305,23 +305,23 @@ class Dt {
305
305
  this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
306
306
  }
307
307
  }
308
- const Bf = 20;
309
- function _f(t, e, n, r) {
308
+ const Ff = 20;
309
+ function Bf(t, e, n, r) {
310
310
  let o = n.getMeta(vt), i;
311
311
  if (o)
312
312
  return o.historyState;
313
- n.getMeta(Vf) && (t = new Dt(t.done, t.undone, null, 0, -1));
313
+ n.getMeta($f) && (t = new Dt(t.done, t.undone, null, 0, -1));
314
314
  let s = n.getMeta("appendedTransaction");
315
315
  if (n.steps.length == 0)
316
316
  return t;
317
317
  if (s && s.getMeta(vt))
318
318
  return s.getMeta(vt).redo ? new Dt(t.done.addTransform(n, void 0, r, ro(e)), t.undone, ra(n.mapping.maps), t.prevTime, t.prevComposition) : new Dt(t.done, t.undone.addTransform(n, void 0, r, ro(e)), null, t.prevTime, t.prevComposition);
319
319
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
320
- let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !zf(n, t.prevRanges)), c = s ? Jo(t.prevRanges, n.mapping) : ra(n.mapping.maps);
320
+ let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !_f(n, t.prevRanges)), c = s ? Jo(t.prevRanges, n.mapping) : ra(n.mapping.maps);
321
321
  return new Dt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, ro(e)), Xe.empty, c, n.time, a ?? t.prevComposition);
322
322
  } else return (i = n.getMeta("rebased")) ? new Dt(t.done.rebased(n, i), t.undone.rebased(n, i), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Dt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
323
323
  }
324
- function zf(t, e) {
324
+ function _f(t, e) {
325
325
  if (!e)
326
326
  return !1;
327
327
  if (!t.docChanged)
@@ -348,7 +348,7 @@ function Jo(t, e) {
348
348
  }
349
349
  return n;
350
350
  }
351
- function $f(t, e, n) {
351
+ function zf(t, e, n) {
352
352
  let r = ro(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
353
353
  if (!i)
354
354
  return null;
@@ -368,8 +368,8 @@ function ro(t) {
368
368
  }
369
369
  return Yo;
370
370
  }
371
- const vt = new G("history"), Vf = new G("closeHistory");
372
- function Hf(t = {}) {
371
+ const vt = new G("history"), $f = new G("closeHistory");
372
+ function Vf(t = {}) {
373
373
  return t = {
374
374
  depth: t.depth || 100,
375
375
  newGroupDelay: t.newGroupDelay || 500
@@ -380,7 +380,7 @@ function Hf(t = {}) {
380
380
  return new Dt(Xe.empty, Xe.empty, null, 0, -1);
381
381
  },
382
382
  apply(e, n, r) {
383
- return _f(n, r, e, t);
383
+ return Bf(n, r, e, t);
384
384
  }
385
385
  },
386
386
  config: t,
@@ -400,7 +400,7 @@ function nc(t, e) {
400
400
  if (!o || (t ? o.undone : o.done).eventCount == 0)
401
401
  return !1;
402
402
  if (r) {
403
- let i = $f(o, n, t);
403
+ let i = zf(o, n, t);
404
404
  i && r(e ? i.scrollIntoView() : i);
405
405
  }
406
406
  return !0;
@@ -452,7 +452,7 @@ class Q {
452
452
  return new Q(...e);
453
453
  }
454
454
  }
455
- const jf = Q.create({
455
+ const Hf = Q.create({
456
456
  name: "history",
457
457
  addOptions() {
458
458
  return {
@@ -461,7 +461,7 @@ const jf = Q.create({
461
461
  };
462
462
  },
463
463
  addPmPlugins() {
464
- return [Hf(this.options)];
464
+ return [Vf(this.options)];
465
465
  },
466
466
  //prettier-ignore
467
467
  addCommands() {
@@ -489,18 +489,18 @@ let wi = null;
489
489
  const mt = function(t, e, n) {
490
490
  let r = wi || (wi = document.createRange());
491
491
  return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
492
- }, Wf = function() {
492
+ }, jf = function() {
493
493
  wi = null;
494
494
  }, ln = function(t, e, n, r) {
495
495
  return n && (ia(t, e, n, r, -1) || ia(t, e, n, r, 1));
496
- }, Uf = /^(img|br|input|textarea|hr)$/i;
496
+ }, Wf = /^(img|br|input|textarea|hr)$/i;
497
497
  function ia(t, e, n, r, o) {
498
498
  for (; ; ) {
499
499
  if (t == n && e == r)
500
500
  return !0;
501
501
  if (e == (o < 0 ? 0 : ze(t))) {
502
502
  let i = t.parentNode;
503
- if (!i || i.nodeType != 1 || Tr(t) || Uf.test(t.nodeName) || t.contentEditable == "false")
503
+ if (!i || i.nodeType != 1 || Tr(t) || Wf.test(t.nodeName) || t.contentEditable == "false")
504
504
  return !1;
505
505
  e = me(t) + (o < 0 ? 0 : 1), t = i;
506
506
  } else if (t.nodeType == 1) {
@@ -514,7 +514,7 @@ function ia(t, e, n, r, o) {
514
514
  function ze(t) {
515
515
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
516
516
  }
517
- function qf(t, e) {
517
+ function Uf(t, e) {
518
518
  for (; ; ) {
519
519
  if (t.nodeType == 3 && e)
520
520
  return t;
@@ -528,7 +528,7 @@ function qf(t, e) {
528
528
  return null;
529
529
  }
530
530
  }
531
- function Kf(t, e) {
531
+ function qf(t, e) {
532
532
  for (; ; ) {
533
533
  if (t.nodeType == 3 && e < t.nodeValue.length)
534
534
  return t;
@@ -542,7 +542,7 @@ function Kf(t, e) {
542
542
  return null;
543
543
  }
544
544
  }
545
- function Xf(t, e, n) {
545
+ function Kf(t, e, n) {
546
546
  for (let r = e == 0, o = e == ze(t); r || o; ) {
547
547
  if (t == n)
548
548
  return !0;
@@ -565,13 +565,13 @@ function Gt(t, e) {
565
565
  let n = document.createEvent("Event");
566
566
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
567
567
  }
568
- function Jf(t) {
568
+ function Xf(t) {
569
569
  let e = t.activeElement;
570
570
  for (; e && e.shadowRoot; )
571
571
  e = e.shadowRoot.activeElement;
572
572
  return e;
573
573
  }
574
- function Yf(t, e, n) {
574
+ function Jf(t, e, n) {
575
575
  if (t.caretPositionFromPoint)
576
576
  try {
577
577
  let r = t.caretPositionFromPoint(e, n);
@@ -587,8 +587,8 @@ 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, xe = !Oe && !!ot && /Apple Computer/.test(ot.vendor), Dn = xe && (/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
- function Qf(t) {
590
+ const Ci = !Oe && /Chrome\/(\d+)/.exec(jt), be = !!Ci, sc = Ci ? +Ci[1] : 0, xe = !Oe && !!ot && /Apple Computer/.test(ot.vendor), Dn = xe && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), _e = Dn || (ot ? /Mac/.test(ot.platform) : !1), Yf = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Dr = !!sa && "webkitFontSmoothing" in sa.documentElement.style, Gf = Dr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
591
+ function Zf(t) {
592
592
  let e = t.defaultView && t.defaultView.visualViewport;
593
593
  return e ? {
594
594
  left: 0,
@@ -605,7 +605,7 @@ function Qf(t) {
605
605
  function pt(t, e) {
606
606
  return typeof t == "number" ? t : t[e];
607
607
  }
608
- function ep(t) {
608
+ function Qf(t) {
609
609
  let e = t.getBoundingClientRect(), n = e.width / t.offsetWidth || 1, r = e.height / t.offsetHeight || 1;
610
610
  return {
611
611
  left: e.left,
@@ -621,7 +621,7 @@ function aa(t, e, n) {
621
621
  s = Tn(s);
622
622
  continue;
623
623
  }
624
- let a = s, l = a == i.body, c = l ? Qf(i) : ep(a), d = 0, u = 0;
624
+ let a = s, l = a == i.body, c = l ? Zf(i) : Qf(a), d = 0, u = 0;
625
625
  if (e.top < c.top + pt(r, "top") ? u = -(c.top - e.top + pt(o, "top")) : e.bottom > c.bottom - pt(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + pt(o, "top") - c.top : e.bottom - c.bottom + pt(o, "bottom")), e.left < c.left + pt(r, "left") ? d = -(c.left - e.left + pt(o, "left")) : e.right > c.right - pt(r, "right") && (d = e.right - c.right + pt(o, "right")), d || u)
626
626
  if (l)
627
627
  i.defaultView.scrollBy(d, u);
@@ -637,7 +637,7 @@ function aa(t, e, n) {
637
637
  s = f == "absolute" ? s.offsetParent : Tn(s);
638
638
  }
639
639
  }
640
- function tp(t) {
640
+ function ep(t) {
641
641
  let e = t.dom.getBoundingClientRect(), n = Math.max(0, e.top), r, o;
642
642
  for (let i = (e.left + e.right) / 2, s = n + 1; s < Math.min(innerHeight, e.bottom); s += 5) {
643
643
  let a = t.root.elementFromPoint(i, s);
@@ -657,7 +657,7 @@ function ac(t) {
657
657
  ;
658
658
  return e;
659
659
  }
660
- function np({ refDOM: t, refTop: e, stack: n }) {
660
+ function tp({ refDOM: t, refTop: e, stack: n }) {
661
661
  let r = t ? t.getBoundingClientRect().top : 0;
662
662
  lc(n, r == 0 ? 0 : r - e);
663
663
  }
@@ -668,7 +668,7 @@ function lc(t, e) {
668
668
  }
669
669
  }
670
670
  let gn = null;
671
- function rp(t) {
671
+ function np(t) {
672
672
  if (t.setActive)
673
673
  return t.setActive();
674
674
  if (gn)
@@ -706,9 +706,9 @@ function cc(t, e) {
706
706
  !n && (e.left >= h.right && e.top >= h.top || e.left >= h.left && e.top >= h.bottom) && (i = u + 1);
707
707
  }
708
708
  }
709
- return !n && l && (n = l, o = c, r = 0), n && n.nodeType == 3 ? op(n, o) : !n || r && n.nodeType == 1 ? { node: t, offset: i } : cc(n, o);
709
+ return !n && l && (n = l, o = c, r = 0), n && n.nodeType == 3 ? rp(n, o) : !n || r && n.nodeType == 1 ? { node: t, offset: i } : cc(n, o);
710
710
  }
711
- function op(t, e) {
711
+ function rp(t, e) {
712
712
  let n = t.nodeValue.length, r = document.createRange();
713
713
  for (let o = 0; o < n; o++) {
714
714
  r.setEnd(t, o + 1), r.setStart(t, o);
@@ -721,11 +721,11 @@ function op(t, e) {
721
721
  function ms(t, e) {
722
722
  return t.left >= e.left - 1 && t.left <= e.right + 1 && t.top >= e.top - 1 && t.top <= e.bottom + 1;
723
723
  }
724
- function ip(t, e) {
724
+ function op(t, e) {
725
725
  let n = t.parentNode;
726
726
  return n && /^li$/i.test(n.nodeName) && e.left < t.getBoundingClientRect().left ? n : t;
727
727
  }
728
- function sp(t, e, n) {
728
+ function ip(t, e, n) {
729
729
  let { node: r, offset: o } = cc(e, n), i = -1;
730
730
  if (r.nodeType == 1 && !r.firstChild) {
731
731
  let s = r.getBoundingClientRect();
@@ -733,7 +733,7 @@ function sp(t, e, n) {
733
733
  }
734
734
  return t.docView.posFromDOM(r, o, i);
735
735
  }
736
- function ap(t, e, n, r) {
736
+ function sp(t, e, n, r) {
737
737
  let o = -1;
738
738
  for (let i = e, s = !1; i != t.dom; ) {
739
739
  let a = t.docView.nearestDesc(i, !0), l;
@@ -764,8 +764,8 @@ function dc(t, e, n) {
764
764
  }
765
765
  return t;
766
766
  }
767
- function lp(t, e) {
768
- let n = t.dom.ownerDocument, r, o = 0, i = Yf(n, e.left, e.top);
767
+ function ap(t, e) {
768
+ let n = t.dom.ownerDocument, r, o = 0, i = Jf(n, e.left, e.top);
769
769
  i && ({ node: r, offset: o } = i);
770
770
  let s = (t.root.elementFromPoint ? t.root : n).elementFromPoint(e.left, e.top), a;
771
771
  if (!s || !t.dom.contains(s.nodeType != 1 ? s.parentNode : s)) {
@@ -776,15 +776,15 @@ function lp(t, e) {
776
776
  if (xe)
777
777
  for (let c = s; r && c; c = Tn(c))
778
778
  c.draggable && (r = void 0);
779
- if (s = ip(s, e), r) {
779
+ if (s = op(s, e), r) {
780
780
  if (Je && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
781
781
  let d = r.childNodes[o], u;
782
782
  d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
783
783
  }
784
784
  let c;
785
- Dr && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = ap(t, r, o, e));
785
+ Dr && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = sp(t, r, o, e));
786
786
  }
787
- a == null && (a = sp(t, s, e));
787
+ a == null && (a = ip(t, s, e));
788
788
  let l = t.docView.nearestDesc(s, !0);
789
789
  return { pos: a, inside: l ? l.posAtStart - l.border : -1 };
790
790
  }
@@ -800,11 +800,11 @@ function Tt(t, e) {
800
800
  }
801
801
  return Array.prototype.find.call(n, la) || t.getBoundingClientRect();
802
802
  }
803
- const cp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
803
+ const lp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
804
804
  function uc(t, e, n) {
805
805
  let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Dr || Je;
806
806
  if (r.nodeType == 3)
807
- if (s && (cp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
807
+ if (s && (lp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
808
808
  let l = Tt(mt(r, o, o), n);
809
809
  if (Je && o && /\s/.test(r.nodeValue[o - 1]) && o < r.nodeValue.length) {
810
810
  let c = Tt(mt(r, o - 1, o - 1), -1);
@@ -868,7 +868,7 @@ function fc(t, e, n) {
868
868
  r != e && t.updateState(r), o != t.dom && o && o.focus();
869
869
  }
870
870
  }
871
- function dp(t, e, n) {
871
+ function cp(t, e, n) {
872
872
  let r = e.selection, o = n == "up" ? r.$from : r.$to;
873
873
  return fc(t, e, () => {
874
874
  let { node: i } = t.docView.domFromPos(o.pos, n == "up" ? -1 : 1);
@@ -900,13 +900,13 @@ function dp(t, e, n) {
900
900
  return !0;
901
901
  });
902
902
  }
903
- const up = /[\u0590-\u08ac]/;
904
- function fp(t, e, n) {
903
+ const dp = /[\u0590-\u08ac]/;
904
+ function up(t, e, n) {
905
905
  let { $head: r } = e.selection;
906
906
  if (!r.parent.isTextblock)
907
907
  return !1;
908
908
  let o = r.parentOffset, i = !o, s = o == r.parent.content.size, a = t.domSelection();
909
- return a ? !up.test(r.parent.textContent) || !a.modify ? n == "left" || n == "backward" ? i : s : fc(t, e, () => {
909
+ return a ? !dp.test(r.parent.textContent) || !a.modify ? n == "left" || n == "backward" ? i : s : fc(t, e, () => {
910
910
  let { focusNode: l, focusOffset: c, anchorNode: d, anchorOffset: u } = t.domSelectionRange(), f = a.caretBidiLevel;
911
911
  a.modify("move", n, "character");
912
912
  let p = r.depth ? t.docView.domAfterPos(r.before()) : t.dom, { focusNode: h, focusOffset: m } = t.domSelectionRange(), g = h && !p.contains(h.nodeType == 1 ? h : h.parentNode) || l == h && c == m;
@@ -918,8 +918,8 @@ function fp(t, e, n) {
918
918
  }) : r.pos == r.start() || r.pos == r.end();
919
919
  }
920
920
  let ca = null, da = null, ua = !1;
921
- function pp(t, e, n) {
922
- return ca == e && da == n ? ua : (ca = e, da = n, ua = n == "up" || n == "down" ? dp(t, e, n) : fp(t, e, n));
921
+ function fp(t, e, n) {
922
+ return ca == e && da == n ? ua : (ca = e, da = n, ua = n == "up" || n == "down" ? cp(t, e, n) : up(t, e, n));
923
923
  }
924
924
  const Ve = 0, fa = 1, Zt = 2, it = 3;
925
925
  class Nr {
@@ -1303,7 +1303,7 @@ class pc extends Nr {
1303
1303
  return this.widget.type.side;
1304
1304
  }
1305
1305
  }
1306
- class hp extends Nr {
1306
+ class pp extends Nr {
1307
1307
  constructor(e, n, r, o) {
1308
1308
  super(e, [], n, null), this.textDOM = r, this.text = o;
1309
1309
  }
@@ -1384,7 +1384,7 @@ class Ft extends Nr {
1384
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
- 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);
1387
+ return d = yc(d, r, n), c ? l = new hp(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);
1388
1388
  }
1389
1389
  parseRule() {
1390
1390
  if (this.node.type.spec.reparseInView)
@@ -1420,14 +1420,14 @@ class Ft extends Nr {
1420
1420
  // separate step, syncs the DOM inside `this.contentDOM` to
1421
1421
  // `this.children`.
1422
1422
  updateChildren(e, n) {
1423
- let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new yp(this, s && s.node, e);
1424
- vp(this.node, this.innerDeco, (c, d, u) => {
1425
- c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? bf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1423
+ let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new gp(this, s && s.node, e);
1424
+ wp(this.node, this.innerDeco, (c, d, u) => {
1425
+ c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? yf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1426
1426
  }, (c, d, u, f) => {
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), Dn && 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 && vp(this.dom));
1431
1431
  }
1432
1432
  localCompositionInfo(e, n) {
1433
1433
  let { from: r, to: o } = e.state.selection;
@@ -1437,7 +1437,7 @@ class Ft extends Nr {
1437
1437
  if (!i || !this.dom.contains(i.parentNode))
1438
1438
  return null;
1439
1439
  if (this.node.inlineContent) {
1440
- let s = i.nodeValue, a = Cp(this.node.content, s, r - n, o - n);
1440
+ let s = i.nodeValue, a = kp(this.node.content, s, r - n, o - n);
1441
1441
  return a < 0 ? null : { node: i, pos: a, text: s };
1442
1442
  } else
1443
1443
  return { node: i, pos: -1, text: "" };
@@ -1453,7 +1453,7 @@ class Ft extends Nr {
1453
1453
  i.parentNode.removeChild(i.nextSibling);
1454
1454
  i.pmViewDesc && (i.pmViewDesc = void 0);
1455
1455
  }
1456
- let s = new hp(this, i, n, o);
1456
+ let s = new pp(this, i, n, o);
1457
1457
  e.input.compositionNodes.push(s), this.children = xi(this.children, r, r + o.length, e, s);
1458
1458
  }
1459
1459
  // If this desc must be updated to match the given node decoration,
@@ -1544,7 +1544,7 @@ class hc extends Nr {
1544
1544
  return this.dom.nodeName == "IMG";
1545
1545
  }
1546
1546
  }
1547
- class mp extends Ft {
1547
+ class hp extends Ft {
1548
1548
  constructor(e, n, r, o, i, s, a, l, c, d) {
1549
1549
  super(e, n, r, o, i, s, a, c, d), this.spec = l;
1550
1550
  }
@@ -1628,11 +1628,11 @@ function gc(t, e, n, r) {
1628
1628
  let l;
1629
1629
  a && a.nodeName == s.nodeName && o != t && (l = o.parentNode) && l.nodeName.toLowerCase() == s.nodeName || (l = document.createElement(s.nodeName), l.pmIsDeco = !0, l.appendChild(o), a = Qt[0]), o = l;
1630
1630
  }
1631
- gp(o, a || Qt[0], s);
1631
+ mp(o, a || Qt[0], s);
1632
1632
  }
1633
1633
  return o;
1634
1634
  }
1635
- function gp(t, e, n) {
1635
+ function mp(t, e, n) {
1636
1636
  for (let r in e)
1637
1637
  r != "class" && r != "style" && r != "nodeName" && !(r in n) && t.removeAttribute(r);
1638
1638
  for (let r in n)
@@ -1669,9 +1669,9 @@ function ha(t) {
1669
1669
  let e = t.nextSibling;
1670
1670
  return t.parentNode.removeChild(t), e;
1671
1671
  }
1672
- class yp {
1672
+ class gp {
1673
1673
  constructor(e, n, r) {
1674
- this.lock = n, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = bp(e.node.content, e);
1674
+ this.lock = n, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = yp(e.node.content, e);
1675
1675
  }
1676
1676
  // Destroy and remove the children between the given indices in
1677
1677
  // `this.top`.
@@ -1819,7 +1819,7 @@ class yp {
1819
1819
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
1820
1820
  }
1821
1821
  }
1822
- function bp(t, e) {
1822
+ function yp(t, e) {
1823
1823
  let n = e, r = n.children.length, o = t.childCount, i = /* @__PURE__ */ new Map(), s = [];
1824
1824
  e: for (; o > 0; ) {
1825
1825
  let a;
@@ -1846,10 +1846,10 @@ function bp(t, e) {
1846
1846
  }
1847
1847
  return { index: o, matched: i, matches: s.reverse() };
1848
1848
  }
1849
- function wp(t, e) {
1849
+ function bp(t, e) {
1850
1850
  return t.type.side - e.type.side;
1851
1851
  }
1852
- function vp(t, e, n, r) {
1852
+ function wp(t, e, n, r) {
1853
1853
  let o = e.locals(t), i = 0;
1854
1854
  if (o.length == 0) {
1855
1855
  for (let c = 0; c < t.childCount; c++) {
@@ -1867,7 +1867,7 @@ function vp(t, e, n, r) {
1867
1867
  }
1868
1868
  if (d)
1869
1869
  if (u) {
1870
- u.sort(wp);
1870
+ u.sort(bp);
1871
1871
  for (let g = 0; g < u.length; g++)
1872
1872
  n(u[g], c, !!l);
1873
1873
  } else
@@ -1897,13 +1897,13 @@ function vp(t, e, n, r) {
1897
1897
  r(f, m, e.forChild(i, f), p), i = h;
1898
1898
  }
1899
1899
  }
1900
- function kp(t) {
1900
+ function vp(t) {
1901
1901
  if (t.nodeName == "UL" || t.nodeName == "OL") {
1902
1902
  let e = t.style.cssText;
1903
1903
  t.style.cssText = e + "; list-style: square !important", window.getComputedStyle(t).listStyle, t.style.cssText = e;
1904
1904
  }
1905
1905
  }
1906
- function Cp(t, e, n, r) {
1906
+ function kp(t, e, n, r) {
1907
1907
  for (let o = 0, i = 0; o < t.childCount && i <= r; ) {
1908
1908
  let s = t.child(o++), a = i;
1909
1909
  if (i += s.nodeSize, !s.isText)
@@ -1947,7 +1947,7 @@ 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 && B.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 && Kf(n.focusNode, n.focusOffset, o.dom))) {
1951
1951
  let f = o.posBefore;
1952
1952
  c = new B(s == f ? a : r.resolve(f));
1953
1953
  }
@@ -1987,10 +1987,10 @@ function kt(t, e = !1) {
1987
1987
  }
1988
1988
  }
1989
1989
  if (t.domObserver.disconnectSelection(), t.cursorWrapper)
1990
- xp(t);
1990
+ Sp(t);
1991
1991
  else {
1992
1992
  let { anchor: r, head: o } = n, i, s;
1993
- ma && !(n instanceof H) && (n.$from.parent.inlineContent || (i = ga(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = ga(t, n.to))), t.docView.setSelection(r, o, t, e), ma && (i && ya(i), s && ya(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Sp(t));
1993
+ ma && !(n instanceof H) && (n.$from.parent.inlineContent || (i = ga(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = ga(t, n.to))), t.docView.setSelection(r, o, t, e), ma && (i && ya(i), s && ya(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Cp(t));
1994
1994
  }
1995
1995
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
1996
1996
  }
@@ -2013,7 +2013,7 @@ function Qo(t) {
2013
2013
  function ya(t) {
2014
2014
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
2015
2015
  }
2016
- function Sp(t) {
2016
+ function Cp(t) {
2017
2017
  let e = t.dom.ownerDocument;
2018
2018
  e.removeEventListener("selectionchange", t.input.hideSelectionGuard);
2019
2019
  let n = t.domSelectionRange(), r = n.anchorNode, o = n.anchorOffset;
@@ -2023,7 +2023,7 @@ function Sp(t) {
2023
2023
  }, 20));
2024
2024
  });
2025
2025
  }
2026
- function xp(t) {
2026
+ function Sp(t) {
2027
2027
  let e = t.domSelection(), n = document.createRange();
2028
2028
  if (!e)
2029
2029
  return;
@@ -2056,7 +2056,7 @@ function vc(t) {
2056
2056
  return !1;
2057
2057
  }
2058
2058
  }
2059
- function Mp(t) {
2059
+ function xp(t) {
2060
2060
  let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
2061
2061
  return ln(e.node, e.offset, n.anchorNode, n.anchorOffset);
2062
2062
  }
@@ -2105,9 +2105,9 @@ function tr(t, e) {
2105
2105
  return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
2106
2106
  }
2107
2107
  function yn(t, e) {
2108
- return e < 0 ? Ap(t) : Op(t);
2108
+ return e < 0 ? Mp(t) : Ap(t);
2109
2109
  }
2110
- function Ap(t) {
2110
+ function Mp(t) {
2111
2111
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
2112
2112
  if (!n)
2113
2113
  return;
@@ -2143,7 +2143,7 @@ function Ap(t) {
2143
2143
  }
2144
2144
  s ? Ai(t, n, r) : o && Ai(t, o, i);
2145
2145
  }
2146
- function Op(t) {
2146
+ function Ap(t) {
2147
2147
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
2148
2148
  if (!n)
2149
2149
  return;
@@ -2179,7 +2179,7 @@ function kc(t) {
2179
2179
  let e = t.pmViewDesc;
2180
2180
  return e && e.node && e.node.isBlock;
2181
2181
  }
2182
- function Tp(t, e) {
2182
+ function Op(t, e) {
2183
2183
  for (; t && e == t.childNodes.length && !Tr(t); )
2184
2184
  e = me(t) + 1, t = t.parentNode;
2185
2185
  for (; t && e < t.childNodes.length; ) {
@@ -2191,7 +2191,7 @@ function Tp(t, e) {
2191
2191
  t = n, e = 0;
2192
2192
  }
2193
2193
  }
2194
- function Dp(t, e) {
2194
+ function Tp(t, e) {
2195
2195
  for (; t && !e && !Tr(t); )
2196
2196
  e = me(t), t = t.parentNode;
2197
2197
  for (; t && e; ) {
@@ -2206,7 +2206,7 @@ function Dp(t, e) {
2206
2206
  function Ai(t, e, n) {
2207
2207
  if (e.nodeType != 3) {
2208
2208
  let i, s;
2209
- (s = Tp(e, n)) ? (e = s, n = 0) : (i = Dp(e, n)) && (e = i, n = i.nodeValue.length);
2209
+ (s = Op(e, n)) ? (e = s, n = 0) : (i = Tp(e, n)) && (e = i, n = i.nodeValue.length);
2210
2210
  }
2211
2211
  let r = t.domSelection();
2212
2212
  if (!r)
@@ -2223,7 +2223,7 @@ function Ai(t, e, n) {
2223
2223
  }
2224
2224
  function ka(t, e) {
2225
2225
  let n = t.state.doc.resolve(e);
2226
- if (!(be || Gf) && n.parent.inlineContent) {
2226
+ if (!(be || Yf) && n.parent.inlineContent) {
2227
2227
  let o = t.coordsAtPos(e);
2228
2228
  if (e > n.start()) {
2229
2229
  let i = t.coordsAtPos(e - 1), s = (i.top + i.bottom) / 2;
@@ -2274,7 +2274,7 @@ function Sa(t, e) {
2274
2274
  function xa(t, e, n) {
2275
2275
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
2276
2276
  }
2277
- function Np(t) {
2277
+ function Dp(t) {
2278
2278
  if (!xe || t.state.selection.$head.parentOffset > 0)
2279
2279
  return !1;
2280
2280
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
@@ -2284,12 +2284,12 @@ function Np(t) {
2284
2284
  }
2285
2285
  return !1;
2286
2286
  }
2287
- function Ep(t) {
2287
+ function Np(t) {
2288
2288
  let e = "";
2289
2289
  return t.ctrlKey && (e += "c"), t.metaKey && (e += "m"), t.altKey && (e += "a"), t.shiftKey && (e += "s"), e;
2290
2290
  }
2291
- function Ip(t, e) {
2292
- let n = e.keyCode, r = Ep(e);
2291
+ function Ep(t, e) {
2292
+ let n = e.keyCode, r = Np(e);
2293
2293
  if (n == 8 || _e && n == 72 && r == "c")
2294
2294
  return Sa(t, -1) || yn(t, -1);
2295
2295
  if (n == 46 && !e.shiftKey || _e && n == 68 && r == "c")
@@ -2306,7 +2306,7 @@ function Ip(t, e) {
2306
2306
  if (n == 38 || _e && n == 80 && r == "c")
2307
2307
  return Ca(t, -1, r) || yn(t, -1);
2308
2308
  if (n == 40 || _e && n == 78 && r == "c")
2309
- return Np(t) || Ca(t, 1, r) || yn(t, 1);
2309
+ return Dp(t) || Ca(t, 1, r) || yn(t, 1);
2310
2310
  if (r == (_e ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
2311
2311
  return !0;
2312
2312
  }
@@ -2364,7 +2364,7 @@ function Cc(t, e, n, r, o) {
2364
2364
  } else
2365
2365
  t.someProp("transformPastedHTML", (u) => {
2366
2366
  n = u(n, t);
2367
- }), s = Fp(n), Dr && Bp(s);
2367
+ }), s = Lp(n), Dr && Fp(s);
2368
2368
  let c = s && s.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
2369
2369
  if (d && d[3])
2370
2370
  for (let u = +d[3]; u > 0; u--) {
@@ -2379,11 +2379,11 @@ function Cc(t, e, n, r, o) {
2379
2379
  preserveWhitespace: !!(l || d),
2380
2380
  context: o,
2381
2381
  ruleFromNode(f) {
2382
- return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !Pp.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
2382
+ return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !Ip.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
2383
2383
  }
2384
2384
  })), d)
2385
- a = _p(Ma(a, +d[1], +d[2]), d[4]);
2386
- else if (a = W.maxOpen(Rp(a.content, o), !0), a.openStart || a.openEnd) {
2385
+ a = Bp(Ma(a, +d[1], +d[2]), d[4]);
2386
+ else if (a = W.maxOpen(Pp(a.content, o), !0), a.openStart || a.openEnd) {
2387
2387
  let u = 0, f = 0;
2388
2388
  for (let p = a.content.firstChild; u < a.openStart && !p.type.spec.isolating; u++, p = p.firstChild)
2389
2389
  ;
@@ -2395,8 +2395,8 @@ function Cc(t, e, n, r, o) {
2395
2395
  a = u(a, t);
2396
2396
  }), a;
2397
2397
  }
2398
- const Pp = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
2399
- function Rp(t, e) {
2398
+ const Ip = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
2399
+ function Pp(t, e) {
2400
2400
  if (t.childCount < 2)
2401
2401
  return t;
2402
2402
  for (let n = e.depth; n >= 0; n--) {
@@ -2462,27 +2462,27 @@ function Oc() {
2462
2462
  return Aa || (Aa = document.implementation.createHTMLDocument("title"));
2463
2463
  }
2464
2464
  let ei = null;
2465
- function Lp(t) {
2465
+ function Rp(t) {
2466
2466
  let e = window.trustedTypes;
2467
2467
  return e ? (ei || (ei = e.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), ei.createHTML(t)) : t;
2468
2468
  }
2469
- function Fp(t) {
2469
+ function Lp(t) {
2470
2470
  let e = /^(\s*<meta [^>]*>)*/.exec(t);
2471
2471
  e && (t = t.slice(e[0].length));
2472
2472
  let n = Oc().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), o;
2473
- if ((o = r && Ac[r[1].toLowerCase()]) && (t = o.map((i) => "<" + i + ">").join("") + t + o.map((i) => "</" + i + ">").reverse().join("")), n.innerHTML = Lp(t), o)
2473
+ if ((o = r && Ac[r[1].toLowerCase()]) && (t = o.map((i) => "<" + i + ">").join("") + t + o.map((i) => "</" + i + ">").reverse().join("")), n.innerHTML = Rp(t), o)
2474
2474
  for (let i = 0; i < o.length; i++)
2475
2475
  n = n.querySelector(o[i]) || n;
2476
2476
  return n;
2477
2477
  }
2478
- function Bp(t) {
2478
+ function Fp(t) {
2479
2479
  let e = t.querySelectorAll(be ? "span:not([class]):not([style])" : "span.Apple-converted-space");
2480
2480
  for (let n = 0; n < e.length; n++) {
2481
2481
  let r = e[n];
2482
2482
  r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "), r);
2483
2483
  }
2484
2484
  }
2485
- function _p(t, e) {
2485
+ function Bp(t, e) {
2486
2486
  if (!t.size)
2487
2487
  return t;
2488
2488
  let n = t.content.firstChild.type.schema, r;
@@ -2500,25 +2500,25 @@ function _p(t, e) {
2500
2500
  }
2501
2501
  return new W(o, i, s);
2502
2502
  }
2503
- const Me = {}, Ae = {}, zp = { touchstart: !0, touchmove: !0 };
2504
- class $p {
2503
+ const Me = {}, Ae = {}, _p = { touchstart: !0, touchmove: !0 };
2504
+ class zp {
2505
2505
  constructor() {
2506
2506
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
2507
2507
  }
2508
2508
  }
2509
- function Vp(t) {
2509
+ function $p(t) {
2510
2510
  for (let e in Me) {
2511
2511
  let n = Me[e];
2512
2512
  t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
2513
- jp(t, r) && !ws(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2514
- }, zp[e] ? { passive: !0 } : void 0);
2513
+ Hp(t, r) && !ws(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2514
+ }, _p[e] ? { passive: !0 } : void 0);
2515
2515
  }
2516
2516
  xe && t.dom.addEventListener("input", () => null), Ti(t);
2517
2517
  }
2518
2518
  function Pt(t, e) {
2519
2519
  t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
2520
2520
  }
2521
- function Hp(t) {
2521
+ function Vp(t) {
2522
2522
  t.domObserver.stop();
2523
2523
  for (let e in t.input.eventHandlers)
2524
2524
  t.dom.removeEventListener(e, t.input.eventHandlers[e]);
@@ -2536,7 +2536,7 @@ function ws(t, e) {
2536
2536
  return r ? r(t, e) || e.defaultPrevented : !1;
2537
2537
  });
2538
2538
  }
2539
- function jp(t, e) {
2539
+ function Hp(t, e) {
2540
2540
  if (!e.bubbles)
2541
2541
  return !0;
2542
2542
  if (e.defaultPrevented)
@@ -2546,7 +2546,7 @@ function jp(t, e) {
2546
2546
  return !1;
2547
2547
  return !0;
2548
2548
  }
2549
- function Wp(t, e) {
2549
+ function jp(t, e) {
2550
2550
  !ws(t, e) && Me[e.type] && (t.editable || !(e.type in Ae)) && Me[e.type](t, e);
2551
2551
  }
2552
2552
  Ae.keydown = (t, e) => {
@@ -2557,7 +2557,7 @@ Ae.keydown = (t, e) => {
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);
2559
2559
  }, 200);
2560
- } else t.someProp("handleKeyDown", (r) => r(t, n)) || Ip(t, n) ? n.preventDefault() : Pt(t, "key");
2560
+ } else t.someProp("handleKeyDown", (r) => r(t, n)) || Ep(t, n) ? n.preventDefault() : Pt(t, "key");
2561
2561
  };
2562
2562
  Ae.keyup = (t, e) => {
2563
2563
  e.keyCode == 16 && (t.input.shiftKey = !1);
@@ -2579,7 +2579,7 @@ Ae.keypress = (t, e) => {
2579
2579
  function Ro(t) {
2580
2580
  return { left: t.clientX, top: t.clientY };
2581
2581
  }
2582
- function Up(t, e) {
2582
+ function Wp(t, e) {
2583
2583
  let n = e.x - t.clientX, r = e.y - t.clientY;
2584
2584
  return n * n + r * r < 100;
2585
2585
  }
@@ -2598,13 +2598,13 @@ function On(t, e, n) {
2598
2598
  let r = t.state.tr.setSelection(e);
2599
2599
  r.setMeta("pointer", !0), t.dispatch(r);
2600
2600
  }
2601
- function qp(t, e) {
2601
+ function Up(t, e) {
2602
2602
  if (e == -1)
2603
2603
  return !1;
2604
2604
  let n = t.state.doc.resolve(e), r = n.nodeAfter;
2605
2605
  return r && r.isAtom && B.isSelectable(r) ? (On(t, new B(n)), !0) : !1;
2606
2606
  }
2607
- function Kp(t, e) {
2607
+ function qp(t, e) {
2608
2608
  if (e == -1)
2609
2609
  return !1;
2610
2610
  let n = t.state.selection, r, o;
@@ -2619,16 +2619,16 @@ function Kp(t, e) {
2619
2619
  }
2620
2620
  return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
2621
2621
  }
2622
- function Xp(t, e, n, r, o) {
2623
- return vs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? Kp(t, n) : qp(t, n));
2622
+ function Kp(t, e, n, r, o) {
2623
+ return vs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? qp(t, n) : Up(t, n));
2624
2624
  }
2625
- function Jp(t, e, n, r) {
2625
+ function Xp(t, e, n, r) {
2626
2626
  return vs(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
2627
2627
  }
2628
- function Yp(t, e, n, r) {
2629
- return vs(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || Gp(t, n, r);
2628
+ function Jp(t, e, n, r) {
2629
+ return vs(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || Yp(t, n, r);
2630
2630
  }
2631
- function Gp(t, e, n) {
2631
+ function Yp(t, e, n) {
2632
2632
  if (n.button != 0)
2633
2633
  return !1;
2634
2634
  let r = t.state.doc;
@@ -2654,11 +2654,11 @@ Me.mousedown = (t, e) => {
2654
2654
  let n = e;
2655
2655
  t.input.shiftKey = n.shiftKey;
2656
2656
  let r = ks(t), o = Date.now(), i = "singleClick";
2657
- o - t.input.lastClick.time < 500 && Up(n, t.input.lastClick) && !n[Tc] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2657
+ o - t.input.lastClick.time < 500 && Wp(n, t.input.lastClick) && !n[Tc] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2658
2658
  let s = t.posAtCoords(Ro(n));
2659
- s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Zp(t, s, n, !!r)) : (i == "doubleClick" ? Jp : Yp)(t, s.pos, s.inside, n) ? n.preventDefault() : Pt(t, "pointer"));
2659
+ s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Gp(t, s, n, !!r)) : (i == "doubleClick" ? Xp : Jp)(t, s.pos, s.inside, n) ? n.preventDefault() : Pt(t, "pointer"));
2660
2660
  };
2661
- class Zp {
2661
+ class Gp {
2662
2662
  constructor(e, n, r, o) {
2663
2663
  this.view = e, this.pos = n, this.event = r, this.flushed = o, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Tc], this.allowDefault = r.shiftKey;
2664
2664
  let i, s;
@@ -2687,7 +2687,7 @@ class Zp {
2687
2687
  if (this.done(), !this.view.dom.contains(e.target))
2688
2688
  return;
2689
2689
  let n = this.pos;
2690
- this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Pt(this.view, "pointer") : Xp(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2690
+ this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Pt(this.view, "pointer") : Kp(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2691
2691
  xe && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2692
2692
  // cursor, but still report that the node is selected
2693
2693
  // when asked through getSelection. You'll then get a
@@ -2714,7 +2714,7 @@ Me.contextmenu = (t) => ks(t);
2714
2714
  function Dc(t, e) {
2715
2715
  return t.composing ? !0 : xe && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2716
2716
  }
2717
- const Qp = bt ? 5e3 : -1;
2717
+ const Zp = bt ? 5e3 : -1;
2718
2718
  Ae.compositionstart = Ae.compositionupdate = (t) => {
2719
2719
  if (!t.composing) {
2720
2720
  t.domObserver.flush();
@@ -2737,7 +2737,7 @@ Ae.compositionstart = Ae.compositionupdate = (t) => {
2737
2737
  }
2738
2738
  t.input.composing = !0;
2739
2739
  }
2740
- Nc(t, Qp);
2740
+ Nc(t, Zp);
2741
2741
  };
2742
2742
  Ae.compositionend = (t, e) => {
2743
2743
  t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Nc(t, 20));
@@ -2746,14 +2746,14 @@ function Nc(t, e) {
2746
2746
  clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => mo(t), e));
2747
2747
  }
2748
2748
  function Ec(t) {
2749
- for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = th()); t.input.compositionNodes.length > 0; )
2749
+ for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = eh()); t.input.compositionNodes.length > 0; )
2750
2750
  t.input.compositionNodes.pop().markParentsDirty();
2751
2751
  }
2752
- function eh(t) {
2752
+ function Qp(t) {
2753
2753
  let e = t.domSelectionRange();
2754
2754
  if (!e.focusNode)
2755
2755
  return null;
2756
- let n = qf(e.focusNode, e.focusOffset), r = Kf(e.focusNode, e.focusOffset);
2756
+ let n = Uf(e.focusNode, e.focusOffset), r = qf(e.focusNode, e.focusOffset);
2757
2757
  if (n && r && n != r) {
2758
2758
  let o = r.pmViewDesc, i = t.domObserver.lastChangedTextNode;
2759
2759
  if (n == i || r == i)
@@ -2768,7 +2768,7 @@ function eh(t) {
2768
2768
  }
2769
2769
  return n || r;
2770
2770
  }
2771
- function th() {
2771
+ function eh() {
2772
2772
  let t = document.createEvent("Event");
2773
2773
  return t.initEvent("event", !0, !0), t.timeStamp;
2774
2774
  }
@@ -2781,7 +2781,7 @@ function mo(t, e = !1) {
2781
2781
  return !1;
2782
2782
  }
2783
2783
  }
2784
- function nh(t, e) {
2784
+ function th(t, e) {
2785
2785
  if (!t.dom.parentNode)
2786
2786
  return;
2787
2787
  let n = t.dom.parentNode.appendChild(document.createElement("div"));
@@ -2791,18 +2791,18 @@ function nh(t, e) {
2791
2791
  n.parentNode && n.parentNode.removeChild(n), t.focus();
2792
2792
  }, 50);
2793
2793
  }
2794
- const ur = Oe && Lt < 15 || Dn && Zf < 604;
2794
+ const ur = Oe && Lt < 15 || Dn && Gf < 604;
2795
2795
  Me.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
2799
  let i = ur ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = bs(t, s);
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"));
2800
+ i ? (n.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : th(t, a), o && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
2801
2801
  };
2802
- function rh(t) {
2802
+ function nh(t) {
2803
2803
  return t.openStart == 0 && t.openEnd == 0 && t.content.childCount == 1 ? t.content.firstChild : null;
2804
2804
  }
2805
- function oh(t, e) {
2805
+ function rh(t, e) {
2806
2806
  if (!t.dom.parentNode)
2807
2807
  return;
2808
2808
  let n = t.input.shiftKey || t.state.selection.$from.parent.type.spec.code, r = t.dom.parentNode.appendChild(document.createElement(n ? "textarea" : "div"));
@@ -2818,7 +2818,7 @@ function fr(t, e, n, r, o) {
2818
2818
  return !0;
2819
2819
  if (!i)
2820
2820
  return !1;
2821
- let s = rh(i), a = s ? t.state.tr.replaceSelectionWith(s, r) : t.state.tr.replaceSelection(i);
2821
+ let s = nh(i), a = s ? t.state.tr.replaceSelectionWith(s, r) : t.state.tr.replaceSelection(i);
2822
2822
  return t.dispatch(a.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
2823
2823
  }
2824
2824
  function Ic(t) {
@@ -2833,17 +2833,17 @@ Ae.paste = (t, e) => {
2833
2833
  if (t.composing && !bt)
2834
2834
  return;
2835
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);
2836
+ r && fr(t, Ic(r), r.getData("text/html"), o, n) ? n.preventDefault() : rh(t, n);
2837
2837
  };
2838
2838
  class Pc {
2839
2839
  constructor(e, n, r) {
2840
2840
  this.slice = e, this.move = n, this.node = r;
2841
2841
  }
2842
2842
  }
2843
- const ih = _e ? "altKey" : "ctrlKey";
2843
+ const oh = _e ? "altKey" : "ctrlKey";
2844
2844
  function Rc(t, e) {
2845
2845
  let n = t.someProp("dragCopies", (r) => !r(e));
2846
- return n ?? !e[ih];
2846
+ return n ?? !e[oh];
2847
2847
  }
2848
2848
  Me.dragstart = (t, e) => {
2849
2849
  let n = e, r = t.input.mouseDown;
@@ -3125,7 +3125,7 @@ class F {
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 F(s.sort(rn), xn) : ye;
3128
+ return this.children.length ? ih(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(rn), xn) : ye;
3129
3129
  }
3130
3130
  /**
3131
3131
  Add the given array of decorations to the ones in the set,
@@ -3303,7 +3303,7 @@ class Et {
3303
3303
  this.members[n].forEachSet(e);
3304
3304
  }
3305
3305
  }
3306
- function sh(t, e, n, r, o, i, s) {
3306
+ function ih(t, e, n, r, o, i, s) {
3307
3307
  let a = t.slice();
3308
3308
  for (let c = 0, d = i; c < n.maps.length; c++) {
3309
3309
  let u = 0;
@@ -3339,7 +3339,7 @@ function sh(t, e, n, r, o, i, s) {
3339
3339
  l = !0;
3340
3340
  }
3341
3341
  if (l) {
3342
- let c = ah(a, t, e, n, o, i, s), d = yo(c, r, 0, s);
3342
+ let c = sh(a, t, e, n, o, i, s), d = yo(c, r, 0, s);
3343
3343
  e = d.local;
3344
3344
  for (let u = 0; u < a.length; u += 3)
3345
3345
  a[u + 1] < 0 && (a.splice(u, 3), u -= 3);
@@ -3362,7 +3362,7 @@ function Lc(t, e) {
3362
3362
  }
3363
3363
  return n;
3364
3364
  }
3365
- function ah(t, e, n, r, o, i, s) {
3365
+ function sh(t, e, n, r, o, i, s) {
3366
3366
  function a(l, c) {
3367
3367
  for (let d = 0; d < l.local.length; d++) {
3368
3368
  let u = l.local[d].map(r, o, c);
@@ -3437,15 +3437,15 @@ function ti(t) {
3437
3437
  r && r != ye && e.push(r);
3438
3438
  }), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])), Et.from(e);
3439
3439
  }
3440
- const lh = {
3440
+ const ah = {
3441
3441
  childList: !0,
3442
3442
  characterData: !0,
3443
3443
  characterDataOldValue: !0,
3444
3444
  attributes: !0,
3445
3445
  attributeOldValue: !0,
3446
3446
  subtree: !0
3447
- }, ch = Oe && Lt <= 11;
3448
- class dh {
3447
+ }, lh = Oe && Lt <= 11;
3448
+ class ch {
3449
3449
  constructor() {
3450
3450
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
3451
3451
  }
@@ -3459,13 +3459,13 @@ class dh {
3459
3459
  return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
3460
3460
  }
3461
3461
  }
3462
- class uh {
3462
+ class dh {
3463
3463
  constructor(e, n) {
3464
- this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new dh(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
3464
+ this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new ch(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
3465
3465
  for (let o = 0; o < r.length; o++)
3466
3466
  this.queue.push(r[o]);
3467
3467
  Oe && Lt <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
3468
- }), ch && (this.onCharData = (r) => {
3468
+ }), lh && (this.onCharData = (r) => {
3469
3469
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
3470
3470
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
3471
3471
  }
@@ -3478,7 +3478,7 @@ class uh {
3478
3478
  this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
3479
3479
  }
3480
3480
  start() {
3481
- this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, lh)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
3481
+ this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, ah)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
3482
3482
  }
3483
3483
  stop() {
3484
3484
  if (this.observer) {
@@ -3561,12 +3561,12 @@ class uh {
3561
3561
  let { focusNode: u } = this.currentSelection;
3562
3562
  for (let f of d) {
3563
3563
  let p = f.parentNode;
3564
- p && p.nodeName == "LI" && (!u || hh(e, u) != p) && f.remove();
3564
+ p && p.nodeName == "LI" && (!u || ph(e, u) != p) && f.remove();
3565
3565
  }
3566
3566
  }
3567
3567
  }
3568
3568
  let c = null;
3569
- i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = gs(e)) && c.eq(Y.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, kt(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || o) && (i > -1 && (e.docView.markDirty(i, s), fh(e)), this.handleDOMChange(i, s, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || kt(e), this.currentSelection.set(r));
3569
+ i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = gs(e)) && c.eq(Y.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, kt(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || o) && (i > -1 && (e.docView.markDirty(i, s), uh(e)), this.handleDOMChange(i, s, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || kt(e), this.currentSelection.set(r));
3570
3570
  }
3571
3571
  registerMutation(e, n) {
3572
3572
  if (n.indexOf(e.target) > -1)
@@ -3602,7 +3602,7 @@ class uh {
3602
3602
  }
3603
3603
  }
3604
3604
  let Ta = /* @__PURE__ */ new WeakMap(), Da = !1;
3605
- function fh(t) {
3605
+ function uh(t) {
3606
3606
  if (!Ta.has(t) && (Ta.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
3607
3607
  if (t.requiresGeckoHackNode = Je, Da)
3608
3608
  return;
@@ -3613,7 +3613,7 @@ function Na(t, e) {
3613
3613
  let n = e.startContainer, r = e.startOffset, o = e.endContainer, i = e.endOffset, s = t.domAtPos(t.state.selection.anchor);
3614
3614
  return ln(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
3615
3615
  }
3616
- function ph(t, e) {
3616
+ function fh(t, e) {
3617
3617
  if (e.getComposedRanges) {
3618
3618
  let o = e.getComposedRanges(t.root)[0];
3619
3619
  if (o)
@@ -3625,7 +3625,7 @@ function ph(t, e) {
3625
3625
  }
3626
3626
  return t.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", r, !0), n ? Na(t, n) : null;
3627
3627
  }
3628
- function hh(t, e) {
3628
+ function ph(t, e) {
3629
3629
  for (let n = e.parentNode; n && n != t.dom; n = n.parentNode) {
3630
3630
  let r = t.docView.nearestDesc(n, !0);
3631
3631
  if (r && r.node.isBlock)
@@ -3633,7 +3633,7 @@ function hh(t, e) {
3633
3633
  }
3634
3634
  return null;
3635
3635
  }
3636
- function mh(t, e, n) {
3636
+ function hh(t, e, n) {
3637
3637
  let { node: r, fromOffset: o, toOffset: i, from: s, to: a } = t.docView.parseRange(e, n), l = t.domSelectionRange(), c, d = l.anchorNode;
3638
3638
  if (d && t.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: l.anchorOffset }], Io(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), be && t.input.lastKeyCode === 8)
3639
3639
  for (let g = i; g > o; g--) {
@@ -3653,7 +3653,7 @@ function mh(t, e, n) {
3653
3653
  to: i,
3654
3654
  preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
3655
3655
  findPositions: c,
3656
- ruleFromNode: gh,
3656
+ ruleFromNode: mh,
3657
3657
  context: p
3658
3658
  });
3659
3659
  if (c && c[0].pos != null) {
@@ -3662,7 +3662,7 @@ function mh(t, e, n) {
3662
3662
  }
3663
3663
  return { doc: m, sel: h, from: s, to: a };
3664
3664
  }
3665
- function gh(t) {
3665
+ function mh(t) {
3666
3666
  let e = t.pmViewDesc;
3667
3667
  if (e)
3668
3668
  return e.parseRule();
@@ -3676,8 +3676,8 @@ function gh(t) {
3676
3676
  return { ignore: !0 };
3677
3677
  return null;
3678
3678
  }
3679
- const yh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3680
- function bh(t, e, n, r, o) {
3679
+ const gh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3680
+ function yh(t, e, n, r, o) {
3681
3681
  let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
3682
3682
  if (t.input.compositionPendingChanges = 0, e < 0) {
3683
3683
  let x = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, z = gs(t, x);
@@ -3691,10 +3691,10 @@ function bh(t, e, n, r, o) {
3691
3691
  }
3692
3692
  let s = t.state.doc.resolve(e), a = s.sharedDepth(n);
3693
3693
  e = s.before(a + 1), n = t.state.doc.resolve(n).after(a + 1);
3694
- let l = t.state.selection, c = mh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3694
+ let l = t.state.selection, c = hh(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
- let h = kh(u.content, c.doc.content, c.from, f, p);
3697
- if (h && t.input.domChangeCount++, (Dn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !yh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3696
+ let h = vh(u.content, c.doc.content, c.from, f, p);
3697
+ if (h && t.input.domChangeCount++, (Dn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !gh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3698
3698
  t.input.lastIOSEnter = 0;
3699
3699
  return;
3700
3700
  }
@@ -3717,7 +3717,7 @@ function bh(t, e, n, r, o) {
3717
3717
  t.input.lastIOSEnter = 0;
3718
3718
  return;
3719
3719
  }
3720
- if (t.state.selection.anchor > h.start && vh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Gt(8, "Backspace")))) {
3720
+ if (t.state.selection.anchor > h.start && wh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Gt(8, "Backspace")))) {
3721
3721
  bt && be && t.domObserver.suppressSelectionUpdates();
3722
3722
  return;
3723
3723
  }
@@ -3732,7 +3732,7 @@ function bh(t, e, n, r, o) {
3732
3732
  Oe && Lt <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => kt(t), 20)), k = t.state.tr.delete(y, S), M = d.resolve(h.start).marksAcross(d.resolve(h.endA));
3733
3733
  else if (
3734
3734
  // Adding or removing a mark
3735
- h.endA == h.endB && (L = wh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
3735
+ h.endA == h.endB && (L = bh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
3736
3736
  )
3737
3737
  k = t.state.tr, L.type == "add" ? k.addMark(y, S, L.mark) : k.removeMark(y, S, L.mark);
3738
3738
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
@@ -3751,7 +3751,7 @@ function bh(t, e, n, r, o) {
3751
3751
  function Ea(t, e, n) {
3752
3752
  return Math.max(n.anchor, n.head) > e.content.size ? null : ys(t, e.resolve(n.anchor), e.resolve(n.head));
3753
3753
  }
3754
- function wh(t, e) {
3754
+ function bh(t, e) {
3755
3755
  let n = t.firstChild.marks, r = e.firstChild.marks, o = n, i = r, s, a, l;
3756
3756
  for (let d = 0; d < r.length; d++)
3757
3757
  o = r[d].removeFromSet(o);
@@ -3769,7 +3769,7 @@ function wh(t, e) {
3769
3769
  if (E.from(c).eq(t))
3770
3770
  return { mark: a, type: s };
3771
3771
  }
3772
- function vh(t, e, n, r, o) {
3772
+ function wh(t, e, n, r, o) {
3773
3773
  if (
3774
3774
  // The content must have shrunk
3775
3775
  n - e <= o.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
@@ -3797,7 +3797,7 @@ function ni(t, e, n) {
3797
3797
  }
3798
3798
  return o;
3799
3799
  }
3800
- function kh(t, e, n, r, o) {
3800
+ function vh(t, e, n, r, o) {
3801
3801
  let i = t.findDiffStart(e, n);
3802
3802
  if (i == null)
3803
3803
  return null;
@@ -3830,7 +3830,7 @@ class _c {
3830
3830
  added to the document.
3831
3831
  */
3832
3832
  constructor(e, n) {
3833
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new $p(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(Ba), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = La(this), Ra(this), this.nodeViews = Fa(this), this.docView = pa(this.state.doc, Pa(this), ti(this), this.dom, this), this.domObserver = new uh(this, (r, o, i, s) => bh(this, r, o, i, s)), this.domObserver.start(), Vp(this), this.updatePluginViews();
3833
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new zp(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(Ba), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = La(this), Ra(this), this.nodeViews = Fa(this), this.docView = pa(this.state.doc, Pa(this), ti(this), this.dom, this), this.domObserver = new dh(this, (r, o, i, s) => yh(this, r, o, i, s)), this.domObserver.start(), $p(this), this.updatePluginViews();
3834
3834
  }
3835
3835
  /**
3836
3836
  Holds `true` when a
@@ -3890,22 +3890,22 @@ class _c {
3890
3890
  let a = o.plugins != e.plugins || this._props.plugins != n.plugins;
3891
3891
  if (a || this._props.plugins != n.plugins || this._props.nodeViews != n.nodeViews) {
3892
3892
  let p = Fa(this);
3893
- Sh(p, this.nodeViews) && (this.nodeViews = p, i = !0);
3893
+ Ch(p, this.nodeViews) && (this.nodeViews = p, i = !0);
3894
3894
  }
3895
3895
  (a || n.handleDOMEvents != this._props.handleDOMEvents) && Ti(this), this.editable = La(this), Ra(this);
3896
3896
  let l = ti(this), c = Pa(this), d = o.plugins != e.plugins && !o.doc.eq(e.doc) ? "reset" : e.scrollToSelection > o.scrollToSelection ? "to selection" : "preserve", u = i || !this.docView.matchesNode(e.doc, c, l);
3897
3897
  (u || !e.selection.eq(o.selection)) && (s = !0);
3898
- let f = d == "preserve" && s && this.dom.style.overflowAnchor == null && tp(this);
3898
+ let f = d == "preserve" && s && this.dom.style.overflowAnchor == null && ep(this);
3899
3899
  if (s) {
3900
3900
  this.domObserver.stop();
3901
- let p = u && (Oe || be) && !this.composing && !o.selection.empty && !e.selection.empty && Ch(o.selection, e.selection);
3901
+ let p = u && (Oe || be) && !this.composing && !o.selection.empty && !e.selection.empty && kh(o.selection, e.selection);
3902
3902
  if (u) {
3903
3903
  let h = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
3904
- this.composing && (this.input.compositionNode = eh(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = pa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
3904
+ this.composing && (this.input.compositionNode = Qp(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = pa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
3905
3905
  }
3906
- p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Mp(this)) ? kt(this, p) : (wc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3906
+ p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xp(this)) ? kt(this, p) : (wc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3907
3907
  }
3908
- this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && np(f);
3908
+ this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && tp(f);
3909
3909
  }
3910
3910
  /**
3911
3911
  @internal
@@ -3992,7 +3992,7 @@ class _c {
3992
3992
  Focus the editor.
3993
3993
  */
3994
3994
  focus() {
3995
- this.domObserver.stop(), this.editable && rp(this.dom), kt(this), this.domObserver.start();
3995
+ this.domObserver.stop(), this.editable && np(this.dom), kt(this), this.domObserver.start();
3996
3996
  }
3997
3997
  /**
3998
3998
  Get the document root in which the editor exists. This will
@@ -4026,7 +4026,7 @@ class _c {
4026
4026
  the top level, not in any node.
4027
4027
  */
4028
4028
  posAtCoords(e) {
4029
- return lp(this, e);
4029
+ return ap(this, e);
4030
4030
  }
4031
4031
  /**
4032
4032
  Returns the viewport rectangle at a given document position.
@@ -4091,7 +4091,7 @@ class _c {
4091
4091
  pass a different state.
4092
4092
  */
4093
4093
  endOfTextblock(e, n) {
4094
- return pp(this, n || this.state, e);
4094
+ return fp(this, n || this.state, e);
4095
4095
  }
4096
4096
  /**
4097
4097
  Run the editor's paste logic with the given HTML string. The
@@ -4123,7 +4123,7 @@ class _c {
4123
4123
  views](https://prosemirror.net/docs/ref/#view.NodeView).
4124
4124
  */
4125
4125
  destroy() {
4126
- this.docView && (Hp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ti(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Wf());
4126
+ this.docView && (Vp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ti(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, jf());
4127
4127
  }
4128
4128
  /**
4129
4129
  This is true when the view has been
@@ -4137,7 +4137,7 @@ class _c {
4137
4137
  Used for testing.
4138
4138
  */
4139
4139
  dispatchEvent(e) {
4140
- return Wp(this, e);
4140
+ return jp(this, e);
4141
4141
  }
4142
4142
  /**
4143
4143
  Dispatch a transaction. Will call
@@ -4157,7 +4157,7 @@ class _c {
4157
4157
  */
4158
4158
  domSelectionRange() {
4159
4159
  let e = this.domSelection();
4160
- return e ? xe && this.root.nodeType === 11 && Jf(this.dom.ownerDocument) == this.dom && ph(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4160
+ return e ? xe && this.root.nodeType === 11 && Xf(this.dom.ownerDocument) == this.dom && fh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4161
4161
  }
4162
4162
  /**
4163
4163
  @internal
@@ -4184,7 +4184,7 @@ function Ra(t) {
4184
4184
  function La(t) {
4185
4185
  return !t.someProp("editable", (e) => e(t.state) === !1);
4186
4186
  }
4187
- function Ch(t, e) {
4187
+ function kh(t, e) {
4188
4188
  let n = Math.min(t.$anchor.sharedDepth(t.head), e.$anchor.sharedDepth(e.head));
4189
4189
  return t.$anchor.start(n) != e.$anchor.start(n);
4190
4190
  }
@@ -4196,7 +4196,7 @@ function Fa(t) {
4196
4196
  }
4197
4197
  return t.someProp("nodeViews", n), t.someProp("markViews", n), e;
4198
4198
  }
4199
- function Sh(t, e) {
4199
+ function Ch(t, e) {
4200
4200
  let n = 0, r = 0;
4201
4201
  for (let o in t) {
4202
4202
  if (t[o] != e[o])
@@ -4211,7 +4211,7 @@ 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 hr = Math.floor, xh = Math.abs, _t = (t, e) => t < e ? t : e, Nn = (t, e) => t > e ? t : e, Mh = (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) => {
4214
+ const hr = Math.floor, Sh = 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, Mh = 64, mr = 128, Ah = 1 << 29, _a = 63, nr = 127, Oh = 2147483647, Th = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && hr(t) === t), Dh = () => /* @__PURE__ */ new Set(), Nh = Array.isArray, Eh = String.fromCharCode, Ih = (t) => t.toLowerCase(), Ph = /^\s*/g, Rh = (t) => t.replace(Ph, ""), Lh = /([A-Z])/g, za = (t, e) => Rh(t.replace(Lh, (n) => `${e}${Ih(n)}`)), Fh = (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} */
@@ -4220,31 +4220,31 @@ const hr = Math.floor, xh = Math.abs, _t = (t, e) => t < e ? t : e, Nn = (t, e)
4220
4220
  }, gr = (
4221
4221
  /** @type {TextEncoder} */
4222
4222
  typeof TextEncoder < "u" ? new TextEncoder() : null
4223
- ), _h = (t) => gr.encode(t), zh = gr ? _h : Bh;
4223
+ ), Bh = (t) => gr.encode(t), _h = gr ? Bh : Fh;
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
- class $h {
4226
+ class zh {
4227
4227
  constructor() {
4228
4228
  this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = [];
4229
4229
  }
4230
4230
  }
4231
- const Vh = () => new $h(), Hh = (t) => {
4232
- const e = Vh();
4233
- return t(e), Wh(e);
4234
- }, jh = (t) => {
4231
+ const $h = () => new zh(), Vh = (t) => {
4232
+ const e = $h();
4233
+ return t(e), jh(e);
4234
+ }, Hh = (t) => {
4235
4235
  let e = t.cpos;
4236
4236
  for (let n = 0; n < t.bufs.length; n++)
4237
4237
  e += t.bufs[n].length;
4238
4238
  return e;
4239
- }, Wh = (t) => {
4240
- const e = new Uint8Array(jh(t));
4239
+ }, jh = (t) => {
4240
+ const e = new Uint8Array(Hh(t));
4241
4241
  let n = 0;
4242
4242
  for (let r = 0; r < t.bufs.length; r++) {
4243
4243
  const o = t.bufs[r];
4244
4244
  e.set(o, n), n += o.length;
4245
4245
  }
4246
4246
  return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
4247
- }, Uh = (t, e) => {
4247
+ }, Wh = (t, e) => {
4248
4248
  const n = t.cbuf.length;
4249
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) => {
@@ -4254,19 +4254,19 @@ const Vh = () => new $h(), Hh = (t) => {
4254
4254
  for (; e > nr; )
4255
4255
  pe(t, mr | nr & e), e = hr(e / 128);
4256
4256
  pe(t, nr & e);
4257
- }, qh = (t, e) => {
4258
- const n = Mh(e);
4259
- for (n && (e = -e), pe(t, (e > _a ? mr : 0) | (n ? Ah : 0) | _a & e), e = hr(e / 64); e > 0; )
4257
+ }, Uh = (t, e) => {
4258
+ const n = xh(e);
4259
+ for (n && (e = -e), pe(t, (e > _a ? mr : 0) | (n ? Mh : 0) | _a & e), e = hr(e / 64); e > 0; )
4260
4260
  pe(t, (e > nr ? mr : 0) | nr & e), e = hr(e / 128);
4261
- }, Di = new Uint8Array(3e4), Kh = Di.length / 3, Xh = (t, e) => {
4262
- if (e.length < Kh) {
4261
+ }, Di = new Uint8Array(3e4), qh = Di.length / 3, Kh = (t, e) => {
4262
+ if (e.length < qh) {
4263
4263
  const n = gr.encodeInto(e, Di).written || 0;
4264
4264
  yr(t, n);
4265
4265
  for (let r = 0; r < n; r++)
4266
4266
  pe(t, Di[r]);
4267
4267
  } else
4268
- zc(t, zh(e));
4269
- }, Jh = (t, e) => {
4268
+ zc(t, _h(e));
4269
+ }, Xh = (t, e) => {
4270
4270
  const n = unescape(encodeURIComponent(e)), r = n.length;
4271
4271
  yr(t, r);
4272
4272
  for (let o = 0; o < r; o++)
@@ -4276,33 +4276,33 @@ const Vh = () => new $h(), Hh = (t) => {
4276
4276
  n.codePointAt(o)
4277
4277
  );
4278
4278
  }, $a = gr && /** @type {any} */
4279
- gr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4279
+ gr.encodeInto ? Kh : Xh, Jh = (t, e) => {
4280
4280
  const n = t.cbuf.length, r = t.cpos, o = _t(n - r, e.length), i = e.length - o;
4281
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
- yr(t, e.byteLength), Yh(t, e);
4283
+ yr(t, e.byteLength), Jh(t, e);
4284
4284
  }, xs = (t, e) => {
4285
- Uh(t, e);
4285
+ Wh(t, e);
4286
4286
  const n = new DataView(t.cbuf.buffer, t.cpos, e);
4287
4287
  return t.cpos += e, n;
4288
- }, Gh = (t, e) => xs(t, 4).setFloat32(0, e, !1), Zh = (t, e) => xs(t, 8).setFloat64(0, e, !1), Qh = (t, e) => (
4288
+ }, Yh = (t, e) => xs(t, 4).setFloat32(0, e, !1), Gh = (t, e) => xs(t, 8).setFloat64(0, e, !1), Zh = (t, e) => (
4289
4289
  /** @type {any} */
4290
4290
  xs(t, 8).setBigInt64(0, e, !1)
4291
- ), Va = new DataView(new ArrayBuffer(4)), em = (t) => (Va.setFloat32(0, t), Va.getFloat32(0) === t), Ni = (t, e) => {
4291
+ ), Va = new DataView(new ArrayBuffer(4)), Qh = (t) => (Va.setFloat32(0, t), Va.getFloat32(0) === t), Ni = (t, e) => {
4292
4292
  switch (typeof e) {
4293
4293
  case "string":
4294
4294
  pe(t, 119), $a(t, e);
4295
4295
  break;
4296
4296
  case "number":
4297
- Dh(e) && xh(e) <= Th ? (pe(t, 125), qh(t, e)) : em(e) ? (pe(t, 124), Gh(t, e)) : (pe(t, 123), Zh(t, e));
4297
+ Th(e) && Sh(e) <= Oh ? (pe(t, 125), Uh(t, e)) : Qh(e) ? (pe(t, 124), Yh(t, e)) : (pe(t, 123), Gh(t, e));
4298
4298
  break;
4299
4299
  case "bigint":
4300
- pe(t, 122), Qh(t, e);
4300
+ pe(t, 122), Zh(t, e);
4301
4301
  break;
4302
4302
  case "object":
4303
4303
  if (e === null)
4304
4304
  pe(t, 126);
4305
- else if (Eh(e)) {
4305
+ else if (Nh(e)) {
4306
4306
  pe(t, 117), yr(t, e.length);
4307
4307
  for (let n = 0; n < e.length; n++)
4308
4308
  Ni(t, e[n]);
@@ -4324,19 +4324,19 @@ gr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4324
4324
  default:
4325
4325
  pe(t, 127);
4326
4326
  }
4327
- }, $c = (t) => new Error(t), tm = () => {
4327
+ }, $c = (t) => new Error(t), em = () => {
4328
4328
  throw $c("Method unimplemented");
4329
4329
  }, Vc = () => {
4330
4330
  throw $c("Unexpected case");
4331
4331
  }, oo = () => /* @__PURE__ */ new Map(), Hc = (t, e, n) => {
4332
4332
  let r = t.get(e);
4333
4333
  return r === void 0 && t.set(e, r = n()), r;
4334
- }, nm = Object.keys, rm = (t, e) => {
4334
+ }, tm = Object.keys, nm = (t, e) => {
4335
4335
  for (const n in t)
4336
4336
  if (!e(t[n], n))
4337
4337
  return !1;
4338
4338
  return !0;
4339
- }, om = (t, e) => e.includes(t), im = () => {
4339
+ }, rm = (t, e) => e.includes(t), om = () => {
4340
4340
  let t = !0;
4341
4341
  return (e, n) => {
4342
4342
  if (t) {
@@ -4348,19 +4348,19 @@ gr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4348
4348
  }
4349
4349
  } else n !== void 0 && n();
4350
4350
  };
4351
- }, sm = /[\uD800-\uDBFF]/, am = /[\uDC00-\uDFFF]/, lm = (t, e) => {
4351
+ }, im = /[\uD800-\uDBFF]/, sm = /[\uDC00-\uDFFF]/, am = (t, e) => {
4352
4352
  let n = 0, r = 0;
4353
4353
  for (; n < t.length && n < e.length && t[n] === e[n]; )
4354
4354
  n++;
4355
- for (n > 0 && sm.test(t[n - 1]) && n--; r + n < t.length && r + n < e.length && t[t.length - r - 1] === e[e.length - r - 1]; )
4355
+ for (n > 0 && im.test(t[n - 1]) && n--; r + n < t.length && r + n < e.length && t[t.length - r - 1] === e[e.length - r - 1]; )
4356
4356
  r++;
4357
- return r > 0 && am.test(t[t.length - r]) && r--, {
4357
+ return r > 0 && sm.test(t[t.length - r]) && r--, {
4358
4358
  index: n,
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[hr(dm() * t.length)], Ha = (t) => t === void 0 ? null : t;
4363
- class fm {
4362
+ }, lm = am, te = new G("y-sync"), zt = new G("y-undo"), qr = new G("yjs-cursor"), cm = Math.random, dm = (t) => t[hr(cm() * t.length)], Ha = (t) => t === void 0 ? null : t;
4363
+ class um {
4364
4364
  constructor() {
4365
4365
  this.map = /* @__PURE__ */ new Map();
4366
4366
  }
@@ -4378,14 +4378,14 @@ class fm {
4378
4378
  return this.map.get(e);
4379
4379
  }
4380
4380
  }
4381
- let jc = new fm(), pm = !0;
4381
+ let jc = new um(), fm = !0;
4382
4382
  try {
4383
- typeof localStorage < "u" && localStorage && (jc = localStorage, pm = !1);
4383
+ typeof localStorage < "u" && localStorage && (jc = localStorage, fm = !1);
4384
4384
  } catch {
4385
4385
  }
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;
4386
+ const pm = 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
- const mm = () => {
4388
+ const hm = () => {
4389
4389
  if (Ze === void 0)
4390
4390
  if (En) {
4391
4391
  Ze = oo();
@@ -4403,17 +4403,17 @@ const mm = () => {
4403
4403
  }
4404
4404
  })) : Ze = oo();
4405
4405
  return Ze;
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;
4406
+ }, Ei = (t) => hm().has(t), Ii = (t) => Ha(En ? ie.env[t.toUpperCase().replaceAll("-", "_")] : pm.getItem(t)), Uc = (t) => Ei("--" + t) || Ii(t) !== null;
4407
4407
  Uc("production");
4408
- const gm = En && om(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4409
- gm || !Ei("--no-colors") && // @todo deprecate --no-colors
4408
+ const mm = En && rm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4409
+ mm || !Ei("--no-colors") && // @todo deprecate --no-colors
4410
4410
  !Uc("no-color") && (!En || ie.stdout.isTTY) && (!En || Ei("--color") || Ii("COLORTERM") !== null || (Ii("TERM") || "").includes("color"));
4411
- const ym = (
4411
+ const gm = (
4412
4412
  /** @type {Document} */
4413
4413
  typeof document < "u" ? document : {}
4414
4414
  );
4415
4415
  typeof DOMParser < "u" && new DOMParser();
4416
- const bm = (t) => class {
4416
+ const ym = (t) => class {
4417
4417
  /**
4418
4418
  * @param {number} timeoutId
4419
4419
  */
@@ -4423,7 +4423,7 @@ const bm = (t) => class {
4423
4423
  destroy() {
4424
4424
  t(this._);
4425
4425
  }
4426
- }, wm = bm(clearTimeout), Ms = (t, e) => new wm(setTimeout(e, t)), nt = (t, e) => t >>> e | t << 32 - e, vm = (t) => nt(t, 2) ^ nt(t, 13) ^ nt(t, 22), km = (t) => nt(t, 6) ^ nt(t, 11) ^ nt(t, 25), Cm = (t) => nt(t, 7) ^ nt(t, 18) ^ t >>> 3, Sm = (t) => nt(t, 17) ^ nt(t, 19) ^ t >>> 10, xm = new Uint32Array([
4426
+ }, bm = ym(clearTimeout), Ms = (t, e) => new bm(setTimeout(e, t)), nt = (t, e) => t >>> e | t << 32 - e, wm = (t) => nt(t, 2) ^ nt(t, 13) ^ nt(t, 22), vm = (t) => nt(t, 6) ^ nt(t, 11) ^ nt(t, 25), km = (t) => nt(t, 7) ^ nt(t, 18) ^ t >>> 3, Cm = (t) => nt(t, 17) ^ nt(t, 19) ^ t >>> 10, Sm = new Uint32Array([
4427
4427
  1116352408,
4428
4428
  1899447441,
4429
4429
  3049323471,
@@ -4488,7 +4488,7 @@ const bm = (t) => class {
4488
4488
  2756734187,
4489
4489
  3204031479,
4490
4490
  3329325298
4491
- ]), Mm = new Uint32Array([
4491
+ ]), xm = new Uint32Array([
4492
4492
  1779033703,
4493
4493
  3144134277,
4494
4494
  1013904242,
@@ -4498,18 +4498,18 @@ const bm = (t) => class {
4498
4498
  528734635,
4499
4499
  1541459225
4500
4500
  ]);
4501
- class Am {
4501
+ class Mm {
4502
4502
  constructor() {
4503
4503
  const e = new ArrayBuffer(320);
4504
- this._H = new Uint32Array(e, 0, 8), this._H.set(Mm), this._W = new Uint32Array(e, 64, 64);
4504
+ this._H = new Uint32Array(e, 0, 8), this._H.set(xm), this._W = new Uint32Array(e, 64, 64);
4505
4505
  }
4506
4506
  _updateHash() {
4507
4507
  const e = this._H, n = this._W;
4508
4508
  for (let u = 16; u < 64; u++)
4509
- n[u] = Sm(n[u - 2]) + n[u - 7] + Cm(n[u - 15]) + n[u - 16];
4509
+ n[u] = Cm(n[u - 2]) + n[u - 7] + km(n[u - 15]) + n[u - 16];
4510
4510
  let r = e[0], o = e[1], i = e[2], s = e[3], a = e[4], l = e[5], c = e[6], d = e[7];
4511
4511
  for (let u = 0, f, p; u < 64; u++)
4512
- f = d + km(a) + (a & l ^ ~a & c) + xm[u] + n[u] >>> 0, p = vm(r) + (r & o ^ r & i ^ o & i) >>> 0, d = c, c = l, l = a, a = s + f >>> 0, s = i, i = o, o = r, r = f + p >>> 0;
4512
+ f = d + vm(a) + (a & l ^ ~a & c) + Sm[u] + n[u] >>> 0, p = wm(r) + (r & o ^ r & i ^ o & i) >>> 0, d = c, c = l, l = a, a = s + f >>> 0, s = i, i = o, o = r, r = f + p >>> 0;
4513
4513
  e[0] += r, e[1] += o, e[2] += i, e[3] += s, e[4] += a, e[5] += l, e[6] += c, e[7] += d;
4514
4514
  }
4515
4515
  /**
@@ -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)] |= mr << (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 / Ah, 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++)
@@ -4544,33 +4544,33 @@ class Am {
4544
4544
  return i;
4545
4545
  }
4546
4546
  }
4547
- const Om = (t) => new Am().digest(t), Tm = (t) => {
4547
+ const Am = (t) => new Mm().digest(t), Om = (t) => {
4548
4548
  let e = "";
4549
4549
  for (let n = 0; n < t.byteLength; n++)
4550
- e += Ih(t[n]);
4550
+ e += Eh(t[n]);
4551
4551
  return btoa(e);
4552
- }, Dm = (t) => wf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), Nm = Wc ? Tm : Dm, Em = (t) => Hh((e) => Ni(e, t)), Im = (t) => {
4552
+ }, Tm = (t) => bf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), Dm = Wc ? Om : Tm, Nm = (t) => Vh((e) => Ni(e, t)), Em = (t) => {
4553
4553
  for (let n = 6; n < t.length; n++)
4554
4554
  t[n % 6] = t[n % 6] ^ t[n];
4555
4555
  return t.slice(0, 6);
4556
- }, Pm = (t) => Nm(Im(Om(Em(t)))), Rm = () => ({
4556
+ }, Im = (t) => Dm(Em(Am(Nm(t)))), Pm = () => ({
4557
4557
  mapping: /* @__PURE__ */ new Map(),
4558
4558
  isOMark: /* @__PURE__ */ new Map()
4559
4559
  }), bo = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && /** @type {number} */
4560
- e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Lm = [{ light: "#ecd44433", dark: "#ecd444" }], Fm = (t, e, n) => {
4560
+ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Rm = [{ light: "#ecd44433", dark: "#ecd444" }], Lm = (t, e, n) => {
4561
4561
  if (!t.has(n)) {
4562
4562
  if (t.size < e.length) {
4563
- const r = Nh();
4563
+ const r = Dh();
4564
4564
  t.forEach((o) => r.add(o)), e = e.filter((o) => !r.has(o));
4565
4565
  }
4566
- t.set(n, um(e));
4566
+ t.set(n, dm(e));
4567
4567
  }
4568
4568
  return (
4569
4569
  /** @type {ColorDef} */
4570
4570
  t.get(n)
4571
4571
  );
4572
- }, Bm = (t, {
4573
- colors: e = Lm,
4572
+ }, Fm = (t, {
4573
+ colors: e = Rm,
4574
4574
  colorMapping: n = /* @__PURE__ */ new Map(),
4575
4575
  permanentUserData: r = null,
4576
4576
  onFirstRender: o = () => {
@@ -4578,7 +4578,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Lm = [{ light: "
4578
4578
  mapping: i
4579
4579
  } = {}) => {
4580
4580
  let s = !1;
4581
- const a = new zm(t, i), l = new Z({
4581
+ const a = new _m(t, i), l = new Z({
4582
4582
  props: {
4583
4583
  editable: (c) => {
4584
4584
  const d = te.getState(c);
@@ -4653,7 +4653,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Lm = [{ light: "
4653
4653
  })
4654
4654
  });
4655
4655
  return l;
4656
- }, _m = (t, e, n) => {
4656
+ }, Bm = (t, e, n) => {
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));
@@ -4687,13 +4687,13 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Lm = [{ light: "
4687
4687
  t.mapping
4688
4688
  )
4689
4689
  });
4690
- class zm {
4690
+ class _m {
4691
4691
  /**
4692
4692
  * @param {Y.XmlFragment} yXmlFragment The bind source
4693
4693
  * @param {ProsemirrorMapping} mapping
4694
4694
  */
4695
4695
  constructor(e, n = /* @__PURE__ */ new Map()) {
4696
- this.type = e, this.prosemirrorView = null, this.mux = im(), this.mapping = n, this.isOMark = /* @__PURE__ */ new Map(), this._observeFunction = this._typeChanged.bind(this), this.doc = e.doc, this.beforeTransactionSelection = null, this.beforeAllTransactions = () => {
4696
+ this.type = e, this.prosemirrorView = null, this.mux = om(), this.mapping = n, this.isOMark = /* @__PURE__ */ new Map(), this._observeFunction = this._typeChanged.bind(this), this.doc = e.doc, this.beforeTransactionSelection = null, this.beforeAllTransactions = () => {
4697
4697
  this.beforeTransactionSelection === null && this.prosemirrorView != null && (this.beforeTransactionSelection = Pi(
4698
4698
  this,
4699
4699
  this.prosemirrorView.state
@@ -4720,7 +4720,7 @@ class zm {
4720
4720
  if (e == null || e.anchorNode == null) return !1;
4721
4721
  const n = this.prosemirrorView._root.createRange();
4722
4722
  n.setStart(e.anchorNode, e.anchorOffset), n.setEnd(e.focusNode, e.focusOffset), n.getClientRects().length === 0 && n.startContainer && n.collapsed && n.selectNodeContents(n.startContainer);
4723
- const o = n.getBoundingClientRect(), i = ym.documentElement;
4723
+ const o = n.getBoundingClientRect(), i = gm.documentElement;
4724
4724
  return o.bottom >= 0 && o.right >= 0 && o.left <= (window.innerWidth || i.clientWidth || 0) && o.top <= (window.innerHeight || i.clientHeight || 0);
4725
4725
  }
4726
4726
  /**
@@ -4807,7 +4807,7 @@ class zm {
4807
4807
  return {
4808
4808
  user: p,
4809
4809
  type: u,
4810
- color: Fm(
4810
+ color: Lm(
4811
4811
  r.colorMapping,
4812
4812
  r.colors,
4813
4813
  p
@@ -4874,7 +4874,7 @@ class zm {
4874
4874
  this.prosemirrorView.state.doc.content.size,
4875
4875
  new W(E.from(i), 0, 0)
4876
4876
  );
4877
- _m(s, this.beforeTransactionSelection, this), s = s.setMeta(te, { isChangeOrigin: !0, isUndoRedoOperation: n.origin instanceof T.UndoManager }), this.beforeTransactionSelection !== null && this._isLocalCursorInView() && s.scrollIntoView(), this.prosemirrorView.dispatch(s);
4877
+ Bm(s, this.beforeTransactionSelection, this), s = s.setMeta(te, { isChangeOrigin: !0, isUndoRedoOperation: n.origin instanceof T.UndoManager }), this.beforeTransactionSelection !== null && this._isLocalCursorInView() && s.scrollIntoView(), this.prosemirrorView.dispatch(s);
4878
4878
  });
4879
4879
  }
4880
4880
  /**
@@ -4914,7 +4914,7 @@ const qc = (t, e, n, r, o, i) => {
4914
4914
  o,
4915
4915
  i
4916
4916
  );
4917
- throw tm();
4917
+ throw em();
4918
4918
  }
4919
4919
  return s;
4920
4920
  }, rr = (t, e, n, r, o, i) => {
@@ -4940,7 +4940,7 @@ const qc = (t, e, n, r, o, i) => {
4940
4940
  ]), c.doc.transact((u) => {
4941
4941
  c._item.delete(u);
4942
4942
  }));
4943
- const d = $m(
4943
+ const d = zm(
4944
4944
  l,
4945
4945
  e,
4946
4946
  n,
@@ -4980,12 +4980,12 @@ const qc = (t, e, n, r, o, i) => {
4980
4980
  t._item.delete(c);
4981
4981
  }, te), n.mapping.delete(t), null;
4982
4982
  }
4983
- }, $m = (t, e, n, r, o, i) => {
4983
+ }, zm = (t, e, n, r, o, i) => {
4984
4984
  const s = [], a = t.toDelta(r, o, i);
4985
4985
  try {
4986
4986
  for (let l = 0; l < a.length; l++) {
4987
4987
  const c = a[l];
4988
- s.push(e.text(c.insert, qm(c.attributes, e)));
4988
+ s.push(e.text(c.insert, Um(c.attributes, e)));
4989
4989
  }
4990
4990
  } catch {
4991
4991
  return t.doc.transact((c) => {
@@ -4993,14 +4993,14 @@ const qc = (t, e, n, r, o, i) => {
4993
4993
  }, te), null;
4994
4994
  }
4995
4995
  return s;
4996
- }, Vm = (t, e) => {
4996
+ }, $m = (t, e) => {
4997
4997
  const n = new T.XmlText(), r = t.map((o) => ({
4998
4998
  // @ts-ignore
4999
4999
  insert: o.text,
5000
5000
  attributes: Jc(o.marks, e)
5001
5001
  }));
5002
5002
  return n.applyDelta(r), e.mapping.set(n, t), n;
5003
- }, Hm = (t, e) => {
5003
+ }, Vm = (t, e) => {
5004
5004
  const n = new T.XmlElement(t.type.name);
5005
5005
  for (const r in t.attrs) {
5006
5006
  const o = t.attrs[r];
@@ -5012,7 +5012,7 @@ const qc = (t, e, n, r, o, i) => {
5012
5012
  (r) => Ri(r, e)
5013
5013
  )
5014
5014
  ), e.mapping.set(n, t), n;
5015
- }, Ri = (t, e) => t instanceof Array ? Vm(t, e) : Hm(t, e), ja = (t) => typeof t == "object" && t !== null, As = (t, e) => {
5015
+ }, Ri = (t, e) => t instanceof Array ? $m(t, e) : Vm(t, e), ja = (t) => typeof t == "object" && t !== null, As = (t, e) => {
5016
5016
  const n = Object.keys(t).filter((o) => t[o] !== null);
5017
5017
  let r = n.length === Object.keys(e).filter((o) => e[o] !== null).length;
5018
5018
  for (let o = 0; o < n.length && r; o++) {
@@ -5038,7 +5038,7 @@ const qc = (t, e, n, r, o, i) => {
5038
5038
  return n.length === e.length && n.every(
5039
5039
  /** @type {(d:any,i:number) => boolean} */
5040
5040
  (r, o) => r.insert === /** @type {any} */
5041
- e[o].text && nm(r.attributes || {}).length === e[o].marks.length && rm(r.attributes, (i, s) => {
5041
+ e[o].text && tm(r.attributes || {}).length === e[o].marks.length && nm(r.attributes, (i, s) => {
5042
5042
  const a = Xc(s), l = e[o].marks;
5043
5043
  return As(i, l.find(
5044
5044
  /** @param {any} mark */
@@ -5077,7 +5077,7 @@ const qc = (t, e, n, r, o, i) => {
5077
5077
  equalityFactor: l + c,
5078
5078
  foundMappedChild: d
5079
5079
  };
5080
- }, jm = (t) => {
5080
+ }, Hm = (t) => {
5081
5081
  let e = "", n = t._start;
5082
5082
  const r = {};
5083
5083
  for (; n !== null; )
@@ -5086,22 +5086,22 @@ const qc = (t, e, n, r, o, i) => {
5086
5086
  str: e,
5087
5087
  nAttrs: r
5088
5088
  };
5089
- }, Wm = (t, e, n) => {
5089
+ }, jm = (t, e, n) => {
5090
5090
  n.mapping.set(t, e);
5091
- const { nAttrs: r, str: o } = jm(t), i = e.map((c) => ({
5091
+ const { nAttrs: r, str: o } = Hm(t), i = e.map((c) => ({
5092
5092
  insert: (
5093
5093
  /** @type {any} */
5094
5094
  c.text
5095
5095
  ),
5096
5096
  attributes: Object.assign({}, r, Jc(c.marks, n))
5097
- })), { insert: s, remove: a, index: l } = cm(
5097
+ })), { insert: s, remove: a, index: l } = lm(
5098
5098
  o,
5099
5099
  i.map((c) => c.insert).join("")
5100
5100
  );
5101
5101
  t.delete(l, a), t.insert(l, s), t.applyDelta(
5102
5102
  i.map((c) => ({ retain: c.insert.length, attributes: c.attributes }))
5103
5103
  );
5104
- }, Um = /(.*)(--[a-zA-Z0-9+/=]{8})$/, Xc = (t) => Um.exec(t)?.[1] ?? t, qm = (t, e) => {
5104
+ }, Wm = /(.*)(--[a-zA-Z0-9+/=]{8})$/, Xc = (t) => Wm.exec(t)?.[1] ?? t, Um = (t, e) => {
5105
5105
  const n = [];
5106
5106
  for (const r in t)
5107
5107
  n.push(e.mark(Xc(r), t[r]));
@@ -5111,7 +5111,7 @@ const qc = (t, e, n, r, o, i) => {
5111
5111
  return t.forEach((r) => {
5112
5112
  if (r.type.name !== "ychange") {
5113
5113
  const o = Hc(e.isOMark, r.type, () => !r.type.excludes(r.type));
5114
- n[o ? `${r.type.name}--${Pm(r.toJSON())}` : r.type.name] = r.attrs;
5114
+ n[o ? `${r.type.name}--${Im(r.toJSON())}` : r.type.name] = r.attrs;
5115
5115
  }
5116
5116
  }), n;
5117
5117
  }, Li = (t, e, n, r) => {
@@ -5146,7 +5146,7 @@ const qc = (t, e, n, r, o, i) => {
5146
5146
  for (; a - c - d > 0 && i - c - d > 0; ) {
5147
5147
  const f = s[c], p = o[c], h = s[a - d - 1], m = o[i - d - 1];
5148
5148
  if (f instanceof T.XmlText && p instanceof Array)
5149
- Kc(f, p) || Wm(f, p, r), c += 1;
5149
+ Kc(f, p) || jm(f, p, r), c += 1;
5150
5150
  else {
5151
5151
  let g = f instanceof T.XmlElement && Fi(f, p), b = h instanceof T.XmlElement && Fi(h, m);
5152
5152
  if (g && b) {
@@ -5194,7 +5194,7 @@ const qc = (t, e, n, r, o, i) => {
5194
5194
  }, te);
5195
5195
  }, Fi = (t, e) => !(e instanceof Array) && t.nodeName === e.type.name;
5196
5196
  let or = null;
5197
- const Km = () => {
5197
+ const qm = () => {
5198
5198
  const t = (
5199
5199
  /** @type {Map<EditorView, Map<any, any>>} */
5200
5200
  or
@@ -5205,8 +5205,8 @@ const Km = () => {
5205
5205
  r.setMeta(s, i);
5206
5206
  }), n.dispatch(r));
5207
5207
  });
5208
- }, Xm = (t, e, n) => {
5209
- or || (or = /* @__PURE__ */ new Map(), Ms(0, Km)), Hc(or, t, oo).set(e, n);
5208
+ }, Km = (t, e, n) => {
5209
+ or || (or = /* @__PURE__ */ new Map(), Ms(0, qm)), Hc(or, t, oo).set(e, n);
5210
5210
  }, vo = (t, e, n) => {
5211
5211
  if (t === 0)
5212
5212
  return T.createRelativePositionFromTypeIndex(e, 0, -1);
@@ -5263,10 +5263,10 @@ const Km = () => {
5263
5263
  if (r === null)
5264
5264
  throw Vc();
5265
5265
  if (t === 0 && r.constructor !== T.XmlText && r !== e)
5266
- return Jm(r._item.parent, r._item);
5266
+ return Xm(r._item.parent, r._item);
5267
5267
  }
5268
5268
  return T.createRelativePositionFromTypeIndex(e, e._length, -1);
5269
- }, Jm = (t, e) => {
5269
+ }, Xm = (t, e) => {
5270
5270
  let n = null, r = null;
5271
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);
5272
5272
  }, wr = (t, e, n, r) => {
@@ -5315,32 +5315,32 @@ const Km = () => {
5315
5315
  a;
5316
5316
  }
5317
5317
  return s - 1;
5318
- }, Ym = (t, e) => {
5318
+ }, Jm = (t, e) => {
5319
5319
  const n = t.toArray().map(
5320
5320
  (r) => rr(
5321
5321
  /** @type {Y.XmlElement} */
5322
5322
  r,
5323
5323
  e,
5324
- Rm()
5324
+ Pm()
5325
5325
  )
5326
5326
  ).filter((r) => r !== null);
5327
5327
  return E.fromArray(n);
5328
- }, Gm = (t, e) => e.topNodeType.create(null, Ym(t, e)), Zm = (t, e, n) => t !== e, Qm = (t) => {
5328
+ }, Ym = (t, e) => e.topNodeType.create(null, Jm(t, e)), Gm = (t, e, n) => t !== e, Zm = (t) => {
5329
5329
  const e = document.createElement("span");
5330
5330
  e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
5331
5331
  const n = document.createElement("div");
5332
5332
  n.setAttribute("style", `background-color: ${t.color}`), n.insertBefore(document.createTextNode(t.name), null);
5333
5333
  const r = document.createTextNode("⁠"), o = document.createTextNode("⁠");
5334
5334
  return e.insertBefore(r, null), e.insertBefore(n, null), e.insertBefore(o, null), e;
5335
- }, eg = (t) => ({
5335
+ }, Qm = (t) => ({
5336
5336
  style: `background-color: ${t.color}70`,
5337
5337
  class: "ProseMirror-yjs-selection"
5338
- }), tg = /^#[0-9a-fA-F]{6}$/, Ua = (t, e, n, r, o) => {
5338
+ }), eg = /^#[0-9a-fA-F]{6}$/, Ua = (t, e, n, r, o) => {
5339
5339
  const i = te.getState(t), s = i.doc, a = [];
5340
5340
  return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ? F.create(t.doc, []) : (e.getStates().forEach((l, c) => {
5341
5341
  if (n(s.clientID, c, l) && l.cursor != null) {
5342
5342
  const d = l.user || {};
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}`);
5343
+ d.color == null ? d.color = "#ffa500" : eg.test(d.color) || console.warn("A user uses an unsupported color format", d), d.name == null && (d.name = `User: ${c}`);
5344
5344
  let u = wr(
5345
5345
  s,
5346
5346
  i.type,
@@ -5370,10 +5370,10 @@ const Km = () => {
5370
5370
  }
5371
5371
  }
5372
5372
  }), F.create(t.doc, a));
5373
- }, ng = (t, {
5374
- awarenessStateFilter: e = Zm,
5375
- cursorBuilder: n = Qm,
5376
- selectionBuilder: r = eg,
5373
+ }, tg = (t, {
5374
+ awarenessStateFilter: e = Gm,
5375
+ cursorBuilder: n = Zm,
5376
+ selectionBuilder: r = Qm,
5377
5377
  getSelection: o = (s) => s.selection
5378
5378
  } = {}, i = "cursor") => new Z({
5379
5379
  key: qr,
@@ -5403,7 +5403,7 @@ const Km = () => {
5403
5403
  },
5404
5404
  view: (s) => {
5405
5405
  const a = () => {
5406
- s.docView && Xm(s, qr, { awarenessUpdated: !0 });
5406
+ s.docView && Km(s, qr, { awarenessUpdated: !0 });
5407
5407
  }, l = () => {
5408
5408
  const c = te.getState(s.state), d = t.getLocalState() || {};
5409
5409
  if (s.hasFocus()) {
@@ -5440,21 +5440,21 @@ const Km = () => {
5440
5440
  }
5441
5441
  };
5442
5442
  }
5443
- }), rg = (t) => {
5443
+ }), ng = (t) => {
5444
5444
  const e = zt.getState(t).undoManager;
5445
5445
  if (e != null)
5446
5446
  return e.undo(), !0;
5447
- }, og = (t) => {
5447
+ }, rg = (t) => {
5448
5448
  const e = zt.getState(t).undoManager;
5449
5449
  if (e != null)
5450
5450
  return e.redo(), !0;
5451
- }, ig = /* @__PURE__ */ new Set(["paragraph"]), sg = (t, e) => !(t instanceof hf) || !(t.content instanceof mf) || !(t.content.type instanceof gf || t.content.type instanceof yf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, ag = ({ protectedNodes: t = ig, trackedOrigins: e = [], undoManager: n = null } = {}) => new Z({
5451
+ }, og = /* @__PURE__ */ new Set(["paragraph"]), ig = (t, e) => !(t instanceof pf) || !(t.content instanceof hf) || !(t.content.type instanceof mf || t.content.type instanceof gf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, sg = ({ protectedNodes: t = og, trackedOrigins: e = [], undoManager: n = null } = {}) => new Z({
5452
5452
  key: zt,
5453
5453
  state: {
5454
5454
  init: (r, o) => {
5455
- const i = te.getState(o), s = n || new pf(i.type, {
5455
+ const i = te.getState(o), s = n || new ff(i.type, {
5456
5456
  trackedOrigins: new Set([te].concat(e)),
5457
- deleteFilter: (a) => sg(a, t),
5457
+ deleteFilter: (a) => ig(a, t),
5458
5458
  captureTransaction: (a) => a.meta.get("addToHistory") !== !1
5459
5459
  });
5460
5460
  return {
@@ -5496,7 +5496,7 @@ const Km = () => {
5496
5496
  }
5497
5497
  });
5498
5498
  var et;
5499
- class lg {
5499
+ class ag {
5500
5500
  constructor() {
5501
5501
  ft(this, et, /* @__PURE__ */ new Map());
5502
5502
  }
@@ -5619,18 +5619,18 @@ var Vt = {
5619
5619
  220: "|",
5620
5620
  221: "}",
5621
5621
  222: '"'
5622
- }, cg = typeof navigator < "u" && /Mac/.test(navigator.platform), dg = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
5622
+ }, lg = typeof navigator < "u" && /Mac/.test(navigator.platform), cg = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
5623
5623
  for (var ge = 0; ge < 10; ge++) Vt[48 + ge] = Vt[96 + ge] = String(ge);
5624
5624
  for (var ge = 1; ge <= 24; ge++) Vt[ge + 111] = "F" + ge;
5625
5625
  for (var ge = 65; ge <= 90; ge++)
5626
5626
  Vt[ge] = String.fromCharCode(ge + 32), ko[ge] = String.fromCharCode(ge);
5627
5627
  for (var oi in Vt) ko.hasOwnProperty(oi) || (ko[oi] = Vt[oi]);
5628
- function ug(t) {
5629
- var e = cg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || dg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ko : Vt)[t.keyCode] || t.key || "Unidentified";
5628
+ function dg(t) {
5629
+ var e = lg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || cg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ko : Vt)[t.keyCode] || t.key || "Unidentified";
5630
5630
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
5631
5631
  }
5632
- const fg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
5633
- function pg(t) {
5632
+ const ug = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
5633
+ function fg(t) {
5634
5634
  let e = t.split(/-(?!$)/), n = e[e.length - 1];
5635
5635
  n == "Space" && (n = " ");
5636
5636
  let r, o, i, s;
@@ -5645,28 +5645,28 @@ function pg(t) {
5645
5645
  else if (/^s(hift)?$/i.test(l))
5646
5646
  i = !0;
5647
5647
  else if (/^mod$/i.test(l))
5648
- fg ? s = !0 : o = !0;
5648
+ ug ? s = !0 : o = !0;
5649
5649
  else
5650
5650
  throw new Error("Unrecognized modifier name: " + l);
5651
5651
  }
5652
5652
  return r && (n = "Alt-" + n), o && (n = "Ctrl-" + n), s && (n = "Meta-" + n), i && (n = "Shift-" + n), n;
5653
5653
  }
5654
- function hg(t) {
5654
+ function pg(t) {
5655
5655
  let e = /* @__PURE__ */ Object.create(null);
5656
5656
  for (let n in t)
5657
- e[pg(n)] = t[n];
5657
+ e[fg(n)] = t[n];
5658
5658
  return e;
5659
5659
  }
5660
5660
  function ii(t, e, n = !0) {
5661
5661
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
5662
5662
  }
5663
- function mg(t) {
5663
+ function hg(t) {
5664
5664
  return new Z({ props: { handleKeyDown: Os(t) } });
5665
5665
  }
5666
5666
  function Os(t) {
5667
- let e = hg(t);
5667
+ let e = pg(t);
5668
5668
  return function(n, r) {
5669
- let o = ug(r), i, s = e[ii(o, r)];
5669
+ let o = dg(r), i, s = e[ii(o, r)];
5670
5670
  if (s && s(n.state, n.dispatch, n))
5671
5671
  return !0;
5672
5672
  if (o.length == 1 && o != " ") {
@@ -5883,11 +5883,11 @@ Bn = new WeakSet(), Yc = function(e, n) {
5883
5883
  }
5884
5884
  return r;
5885
5885
  }, ft(D, Bn);
5886
- function gg(t = {}) {
5886
+ function mg(t = {}) {
5887
5887
  return Object.keys(t).length === 0 && t.constructor === Object;
5888
5888
  }
5889
5889
  function Bi(t) {
5890
- const e = Object.entries(t).filter(([n, r]) => n === "attrs" && gg(r) ? !1 : r != null);
5890
+ const e = Object.entries(t).filter(([n, r]) => n === "attrs" && mg(r) ? !1 : r != null);
5891
5891
  return Object.fromEntries(e);
5892
5892
  }
5893
5893
  var _n, Zc, Qc;
@@ -5973,7 +5973,7 @@ let _i = lr;
5973
5973
  function Yn(t, e) {
5974
5974
  return e.nodes[t] || e.marks[t] || null;
5975
5975
  }
5976
- function yg(t, e) {
5976
+ function gg(t, e) {
5977
5977
  return Array.isArray(e) ? e.some((n) => (typeof n == "string" ? n : n.name) === t.name) : e;
5978
5978
  }
5979
5979
  function Ts(t, e) {
@@ -6094,11 +6094,11 @@ class Fo {
6094
6094
  return a;
6095
6095
  }
6096
6096
  }
6097
- function bg(t, e) {
6097
+ function yg(t, e) {
6098
6098
  const n = $n.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
6099
6099
  return o.appendChild(n), o.innerHTML;
6100
6100
  }
6101
- const wg = (t, e = 500) => {
6101
+ const bg = (t, e = 500) => {
6102
6102
  let n = "";
6103
6103
  const r = t.parentOffset;
6104
6104
  return t.parent.nodesBetween(
@@ -6115,15 +6115,15 @@ const wg = (t, e = 500) => {
6115
6115
  }
6116
6116
  ), n;
6117
6117
  };
6118
- class vg {
6118
+ class wg {
6119
6119
  constructor(e) {
6120
6120
  P(this, "match");
6121
6121
  P(this, "handler");
6122
6122
  this.match = e.match, this.handler = e.handler;
6123
6123
  }
6124
6124
  }
6125
- const kg = (t, e) => {
6126
- if (vf(e))
6125
+ const vg = (t, e) => {
6126
+ if (wf(e))
6127
6127
  return e.exec(t);
6128
6128
  const n = e(t);
6129
6129
  if (!n)
@@ -6147,11 +6147,11 @@ const kg = (t, e) => {
6147
6147
  if (l.parent.type.spec.code || (l.nodeBefore || l.nodeAfter)?.marks.find((u) => u.type.spec.code))
6148
6148
  return !1;
6149
6149
  let c = !1;
6150
- const d = wg(l) + o;
6150
+ const d = bg(l) + o;
6151
6151
  return i.forEach((u) => {
6152
6152
  if (c)
6153
6153
  return;
6154
- const f = kg(d, u.match);
6154
+ const f = vg(d, u.match);
6155
6155
  if (!f)
6156
6156
  return;
6157
6157
  const p = a.state.tr, h = Ts(p, a.state), m = {
@@ -6175,7 +6175,7 @@ const kg = (t, e) => {
6175
6175
  text: o
6176
6176
  }), a.dispatch(p), c = !0);
6177
6177
  }), c;
6178
- }, Cg = ({ editor: t, rules: e }) => {
6178
+ }, kg = ({ editor: t, rules: e }) => {
6179
6179
  const n = new Z({
6180
6180
  key: new G("inputRulesPlugin"),
6181
6181
  state: {
@@ -6189,7 +6189,7 @@ const kg = (t, e) => {
6189
6189
  const a = r.getMeta("applyInputRules");
6190
6190
  return !!a && setTimeout(() => {
6191
6191
  let { text: c } = a;
6192
- typeof c != "string" && (c = bg(E.from(c), i.schema));
6192
+ typeof c != "string" && (c = yg(E.from(c), i.schema));
6193
6193
  const { from: d } = a, u = d + c.length;
6194
6194
  si({
6195
6195
  editor: t,
@@ -6242,7 +6242,7 @@ const kg = (t, e) => {
6242
6242
  case "word-html":
6243
6243
  break;
6244
6244
  case "browser-html":
6245
- return Sg(a, t);
6245
+ return Cg(a, t);
6246
6246
  }
6247
6247
  return !1;
6248
6248
  }
@@ -6250,14 +6250,14 @@ const kg = (t, e) => {
6250
6250
  isInputRules: !0
6251
6251
  });
6252
6252
  return n;
6253
- }, Sg = (t, e, n) => {
6254
- const r = xg(t), o = document.createElement("div");
6253
+ }, Cg = (t, e, n) => {
6254
+ const r = Sg(t), o = document.createElement("div");
6255
6255
  o.innerHTML = r;
6256
6256
  const i = tn.fromSchema(e.schema).parse(o);
6257
6257
  o.remove();
6258
6258
  const { dispatch: s } = e.view;
6259
6259
  return s ? (s(e.view.state.tr.replaceSelectionWith(i, !0)), !0) : !1;
6260
- }, xg = (t) => t.replace(
6260
+ }, Sg = (t) => t.replace(
6261
6261
  /font-size\s*:\s*([\d.]+)em/gi,
6262
6262
  (e, n) => {
6263
6263
  const r = parseFloat(n);
@@ -6348,9 +6348,9 @@ const An = class An {
6348
6348
  const f = Object.entries(l()).map(([p, h]) => [p, (...m) => h({ editor: e, keymapArgs: m })]);
6349
6349
  c = { ...Object.fromEntries(f) };
6350
6350
  }
6351
- a.push(mg(c));
6351
+ a.push(hg(c));
6352
6352
  const d = N(i, "addInputRules", s);
6353
- yg(i, e.options.enableInputRules) && d && r.push(...d());
6353
+ gg(i, e.options.enableInputRules) && d && r.push(...d());
6354
6354
  const u = N(i, "addPmPlugins", s);
6355
6355
  if (u) {
6356
6356
  const f = u();
@@ -6359,7 +6359,7 @@ const An = class An {
6359
6359
  return a;
6360
6360
  }).flat();
6361
6361
  return [
6362
- Cg({
6362
+ kg({
6363
6363
  editor: e,
6364
6364
  rules: r
6365
6365
  }),
@@ -6428,22 +6428,22 @@ td = function(e) {
6428
6428
  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);
6429
6429
  };
6430
6430
  let zi = An;
6431
- const Mg = (t) => (e) => {
6431
+ const xg = (t) => (e) => {
6432
6432
  const n = typeof t == "function" ? t(e) : t;
6433
6433
  for (let r = 0; r < n.length; r += 1)
6434
6434
  if (n[r](e)) return !0;
6435
6435
  return !1;
6436
- }, Ag = (t) => (e) => t(e), Og = () => ({ tr: t }) => (t.insertText(" ", t.selection.from, t.selection.to), !0), Tg = () => ({ tr: t, state: e }) => {
6436
+ }, Mg = (t) => (e) => t(e), Ag = () => ({ tr: t }) => (t.insertText(" ", t.selection.from, t.selection.to), !0), Og = () => ({ tr: t, state: e }) => {
6437
6437
  let n = t.selection.from;
6438
6438
  const r = e.schema.nodes.tab.create();
6439
6439
  return t.insert(n, r), !0;
6440
- }, Dg = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), Ds = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
6441
- function Ng(t, e) {
6440
+ }, Tg = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), Ds = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
6441
+ function Dg(t, e) {
6442
6442
  let { $cursor: n } = t.selection;
6443
6443
  return !n || (e ? !e.endOfTextblock("backward", t) : n.parentOffset > 0) ? null : n;
6444
6444
  }
6445
6445
  const nd = (t, e, n) => {
6446
- let r = Ng(t, n);
6446
+ let r = Dg(t, n);
6447
6447
  if (!r)
6448
6448
  return !1;
6449
6449
  let o = od(r);
@@ -6500,12 +6500,12 @@ function od(t) {
6500
6500
  }
6501
6501
  return null;
6502
6502
  }
6503
- function Eg(t, e) {
6503
+ function Ng(t, e) {
6504
6504
  let { $cursor: n } = t.selection;
6505
6505
  return !n || (e ? !e.endOfTextblock("forward", t) : n.parentOffset < n.parent.content.size) ? null : n;
6506
6506
  }
6507
6507
  const id = (t, e, n) => {
6508
- let r = Eg(t, n);
6508
+ let r = Ng(t, n);
6509
6509
  if (!r)
6510
6510
  return !1;
6511
6511
  let o = ad(r);
@@ -6548,7 +6548,7 @@ function ad(t) {
6548
6548
  }
6549
6549
  return null;
6550
6550
  }
6551
- const Ig = (t, e) => {
6551
+ const Eg = (t, e) => {
6552
6552
  let n = t.selection, r = n instanceof B, o;
6553
6553
  if (r) {
6554
6554
  if (n.node.isTextblock || !Ht(t.doc, n.from))
@@ -6561,7 +6561,7 @@ const Ig = (t, e) => {
6561
6561
  r && i.setSelection(B.create(i.doc, o - t.doc.resolve(o).nodeBefore.nodeSize)), e(i.scrollIntoView());
6562
6562
  }
6563
6563
  return !0;
6564
- }, Pg = (t, e) => {
6564
+ }, Ig = (t, e) => {
6565
6565
  let n = t.selection, r;
6566
6566
  if (n instanceof B) {
6567
6567
  if (n.node.isTextblock || !Ht(t.doc, n.to))
@@ -6583,7 +6583,7 @@ function Ns(t) {
6583
6583
  }
6584
6584
  return null;
6585
6585
  }
6586
- const Rg = (t, e) => {
6586
+ const Pg = (t, e) => {
6587
6587
  let { $head: n, $anchor: r } = t.selection;
6588
6588
  if (!n.parent.type.spec.code || !n.sameParent(r))
6589
6589
  return !1;
@@ -6619,7 +6619,7 @@ const Rg = (t, e) => {
6619
6619
  let r = n.blockRange(), o = r && Or(r);
6620
6620
  return o == null ? !1 : (e && e(t.tr.lift(r, o).scrollIntoView()), !0);
6621
6621
  };
6622
- function Lg(t) {
6622
+ function Rg(t) {
6623
6623
  return (e, n) => {
6624
6624
  let { $from: r, $to: o } = e.selection;
6625
6625
  if (e.selection instanceof B && e.selection.node.isBlock)
@@ -6646,14 +6646,14 @@ function Lg(t) {
6646
6646
  return n && n(d.scrollIntoView()), !0;
6647
6647
  };
6648
6648
  }
6649
- const Fg = Lg(), Bg = (t, e) => (e && e(t.tr.setSelection(new Ar(t.doc))), !0);
6650
- function _g(t, e, n) {
6649
+ const Lg = Rg(), Fg = (t, e) => (e && e(t.tr.setSelection(new Ar(t.doc))), !0);
6650
+ function Bg(t, e, n) {
6651
6651
  let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
6652
6652
  return !r || !o || !r.type.compatibleContent(o.type) ? !1 : !r.content.size && e.parent.canReplace(i - 1, i) ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock || Ht(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
6653
6653
  }
6654
6654
  function ud(t, e, n, r) {
6655
6655
  let o = e.nodeBefore, i = e.nodeAfter, s, a, l = o.type.spec.isolating || i.type.spec.isolating;
6656
- if (!l && _g(t, e, n))
6656
+ if (!l && Bg(t, e, n))
6657
6657
  return !0;
6658
6658
  let c = !l && e.parent.canReplace(e.index(), e.index() + 1);
6659
6659
  if (c && (s = (a = o.contentMatchAt(o.childCount)).findWrapping(i.type)) && a.matchType(s[0] || i.type).validEnd) {
@@ -6701,7 +6701,7 @@ function fd(t) {
6701
6701
  return o.node(i).isTextblock ? (n && n(e.tr.setSelection(H.create(e.doc, t < 0 ? o.start(i) : o.end(i)))), !0) : !1;
6702
6702
  };
6703
6703
  }
6704
- const zg = fd(-1), $g = fd(1);
6704
+ const _g = fd(-1), zg = fd(1);
6705
6705
  function qa(t, e = null) {
6706
6706
  return function(n, r) {
6707
6707
  let o = !1;
@@ -6742,7 +6742,7 @@ function Es(...t) {
6742
6742
  }
6743
6743
  Es(Ds, nd, rd);
6744
6744
  Es(Ds, id, sd);
6745
- Es(ld, cd, dd, Fg);
6745
+ Es(ld, cd, dd, Lg);
6746
6746
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
6747
6747
  function pd(t) {
6748
6748
  for (let e = 0; e < t.edgeCount; e++) {
@@ -6757,7 +6757,7 @@ const Ka = (t, e) => {
6757
6757
  const r = n.filter((o) => e?.includes(o.type.name));
6758
6758
  t.tr.ensureMarks(r);
6759
6759
  }
6760
- }, Vg = ({ keepMarks: t = !0 } = {}) => (e) => {
6760
+ }, $g = ({ keepMarks: t = !0 } = {}) => (e) => {
6761
6761
  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);
6762
6762
  if (s instanceof B && s.node.isBlock)
6763
6763
  return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Ka(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
@@ -6774,9 +6774,9 @@ const Ka = (t, e) => {
6774
6774
  t && Ka(r, i.extensionService.splittableMarks), n.scrollIntoView();
6775
6775
  }
6776
6776
  return !0;
6777
- }, Hg = () => ({ state: t, dispatch: e }) => dd(t, e), jg = () => ({ state: t, dispatch: e }) => cd(t, e), Wg = () => ({ state: t, dispatch: e }) => ld(t, e), Ug = () => ({ state: t, dispatch: e }) => Rg(t, e), hd = (t) => {
6777
+ }, Vg = () => ({ state: t, dispatch: e }) => dd(t, e), Hg = () => ({ state: t, dispatch: e }) => cd(t, e), jg = () => ({ state: t, dispatch: e }) => ld(t, e), Wg = () => ({ state: t, dispatch: e }) => Pg(t, e), hd = (t) => {
6778
6778
  };
6779
- function qg(t, e, n) {
6779
+ function Ug(t, e, n) {
6780
6780
  const { selection: r } = e;
6781
6781
  let o = null;
6782
6782
  if (hd() && (o = r.$cursor), o) {
@@ -6795,7 +6795,7 @@ function qg(t, e, n) {
6795
6795
  }), a;
6796
6796
  });
6797
6797
  }
6798
- const Kg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6798
+ const qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6799
6799
  const { selection: i } = n, { empty: s, ranges: a } = i, l = xt(t, r.schema);
6800
6800
  if (o)
6801
6801
  if (s) {
@@ -6823,12 +6823,12 @@ const Kg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6823
6823
  }) : n.addMark(h, m, l.create(e));
6824
6824
  });
6825
6825
  });
6826
- return qg(r, n, l);
6826
+ return Ug(r, n, l);
6827
6827
  };
6828
6828
  function $i(t, e, n = {}) {
6829
6829
  return t.find((r) => r.type === e && dr(r.attrs, n));
6830
6830
  }
6831
- function Xg(t, e, n = {}) {
6831
+ function Kg(t, e, n = {}) {
6832
6832
  return !!$i(t, e, n);
6833
6833
  }
6834
6834
  function Is(t, e, n = {}) {
@@ -6840,11 +6840,11 @@ function Is(t, e, n = {}) {
6840
6840
  let i = r.index, s = t.start() + r.offset, a = i + 1, l = s + r.node.nodeSize;
6841
6841
  for ($i([...r.node.marks], e, n); i > 0 && o.isInSet(t.parent.child(i - 1).marks); )
6842
6842
  i -= 1, s -= t.parent.child(i).nodeSize;
6843
- for (; a < t.parent.childCount && Xg([...t.parent.child(a).marks], e, n); )
6843
+ for (; a < t.parent.childCount && Kg([...t.parent.child(a).marks], e, n); )
6844
6844
  l += t.parent.child(a).nodeSize, a += 1;
6845
6845
  return { from: s, to: l };
6846
6846
  }
6847
- const Jg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6847
+ const Xg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6848
6848
  const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a = xt(t, r.schema), { $from: l, empty: c, ranges: d } = s;
6849
6849
  if (!o) return !0;
6850
6850
  if (c && i) {
@@ -6856,7 +6856,7 @@ const Jg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6856
6856
  n.removeMark(u.$from.pos, u.$to.pos, a);
6857
6857
  });
6858
6858
  return n.removeStoredMark(a), !0;
6859
- }, Yg = () => ({ tr: t, dispatch: e }) => {
6859
+ }, Jg = () => ({ tr: t, dispatch: e }) => {
6860
6860
  const { selection: n } = t, { empty: r, ranges: o } = n;
6861
6861
  return r || e && o.forEach((i) => {
6862
6862
  t.removeMark(i.$from.pos, i.$to.pos);
@@ -6885,10 +6885,10 @@ function Co(t, e, n = {}) {
6885
6885
  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);
6886
6886
  return (l > 0 ? l + c : l) >= s;
6887
6887
  }
6888
- const Gg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6888
+ const Yg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6889
6889
  const { extendEmptyMarkRange: i = !1 } = n, s = xt(t, r.schema);
6890
6890
  return Co(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6891
- }, Zg = () => ({ state: t, tr: e, dispatch: n }) => {
6891
+ }, Gg = () => ({ state: t, tr: e, dispatch: n }) => {
6892
6892
  const { selection: r } = e, { ranges: o } = r;
6893
6893
  return n && o.forEach(({ $from: i, $to: s }) => {
6894
6894
  t.doc.nodesBetween(i.pos, s.pos, (a, l) => {
@@ -6903,7 +6903,7 @@ const Gg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6903
6903
  (h || h === 0) && e.lift(p, h);
6904
6904
  });
6905
6905
  }), !0;
6906
- }, Qg = (t, e = {}) => ({ state: n, dispatch: r, chain: o }) => {
6906
+ }, Zg = (t, e = {}) => ({ state: n, dispatch: r, chain: o }) => {
6907
6907
  const i = le(t, n.schema);
6908
6908
  return i.isTextblock ? o().command(({ commands: s }) => qa(i, e)(n) ? !0 : s.clearNodes()).command(({ state: s }) => qa(i, e)(s, r)).run() : !1;
6909
6909
  };
@@ -6921,10 +6921,10 @@ function So(t, e, n = {}) {
6921
6921
  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 }));
6922
6922
  return i ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= l;
6923
6923
  }
6924
- const ey = (t, e, n = {}) => ({ state: r, commands: o }) => {
6924
+ const Qg = (t, e, n = {}) => ({ state: r, commands: o }) => {
6925
6925
  const i = le(t, r.schema), s = le(e, r.schema);
6926
6926
  return So(r, i, n) ? o.setNode(s) : o.setNode(i, n);
6927
- }, ty = () => ({ state: t, dispatch: e }) => Bg(t, e), ny = () => ({ state: t, dispatch: e }) => Ds(t, e), ry = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6927
+ }, ey = () => ({ state: t, dispatch: e }) => Fg(t, e), ty = () => ({ state: t, dispatch: e }) => Ds(t, e), ny = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6928
6928
  let i = null, s = null;
6929
6929
  const a = Er(
6930
6930
  typeof t == "string" ? t : t.name,
@@ -6946,7 +6946,7 @@ function Xa(t, e) {
6946
6946
  const r = typeof e == "string" ? [e] : e;
6947
6947
  return Object.keys(t).reduce((o, i) => (r.includes(i) || (o[i] = t[i]), o), {});
6948
6948
  }
6949
- const oy = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
6949
+ const ry = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
6950
6950
  let i = null, s = null;
6951
6951
  const a = Er(
6952
6952
  typeof t == "string" ? t : t.name,
@@ -6959,7 +6959,7 @@ const oy = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
6959
6959
  });
6960
6960
  });
6961
6961
  }), !0) : !1;
6962
- }, iy = () => ({ state: t, dispatch: e }) => Ig(t, e), sy = () => ({ state: t, dispatch: e }) => Pg(t, e), ay = () => ({ state: t, dispatch: e }) => nd(t, e), ly = () => ({ state: t, dispatch: e }) => id(t, e), cy = () => ({ state: t, dispatch: e }) => rd(t, e), dy = () => ({ state: t, dispatch: e }) => sd(t, e), uy = () => ({ state: t, dispatch: e }) => zg(t, e), fy = () => ({ state: t, dispatch: e }) => $g(t, e), py = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), md = (t) => {
6962
+ }, oy = () => ({ state: t, dispatch: e }) => Eg(t, e), iy = () => ({ state: t, dispatch: e }) => Ig(t, e), sy = () => ({ state: t, dispatch: e }) => nd(t, e), ay = () => ({ state: t, dispatch: e }) => id(t, e), ly = () => ({ state: t, dispatch: e }) => rd(t, e), cy = () => ({ state: t, dispatch: e }) => sd(t, e), dy = () => ({ state: t, dispatch: e }) => _g(t, e), uy = () => ({ state: t, dispatch: e }) => zg(t, e), fy = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), md = (t) => {
6963
6963
  const e = t.childNodes;
6964
6964
  for (let n = e.length - 1; n >= 0; n -= 1) {
6965
6965
  const r = e[n];
@@ -7020,7 +7020,7 @@ function Vi(t, e, n) {
7020
7020
  }
7021
7021
  return Vi("", e, n);
7022
7022
  }
7023
- function hy(t, e, n) {
7023
+ function py(t, e, n) {
7024
7024
  const r = t.steps.length - 1;
7025
7025
  if (r < e)
7026
7026
  return;
@@ -7033,7 +7033,7 @@ function hy(t, e, n) {
7033
7033
  s === 0 && (s = d);
7034
7034
  }), t.setSelection(Y.near(t.doc.resolve(s), n));
7035
7035
  }
7036
- const my = (t) => !("type" in t), gy = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
7036
+ const hy = (t) => !("type" in t), my = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
7037
7037
  if (o) {
7038
7038
  n = {
7039
7039
  parseOptions: {},
@@ -7061,17 +7061,17 @@ const my = (t) => !("type" in t), gy = (t, e, n) => ({ tr: r, dispatch: o, edito
7061
7061
  }), !1;
7062
7062
  }
7063
7063
  let { from: a, to: l } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
7064
- if ((my(s) ? s : [s]).forEach((p) => {
7064
+ if ((hy(s) ? s : [s]).forEach((p) => {
7065
7065
  p.check(), c = c ? p.isText && p.marks.length === 0 : !1, d = d ? p.isBlock : !1;
7066
7066
  }), a === l && d) {
7067
7067
  const { parent: p } = r.doc.resolve(a);
7068
7068
  p.isTextblock && !p.type.spec.code && !p.childCount && (a -= 1, l += 1);
7069
7069
  }
7070
7070
  let f;
7071
- c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && hy(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
7071
+ c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && py(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
7072
7072
  }
7073
7073
  return !0;
7074
- }, yy = () => ({ state: t, dispatch: e }) => {
7074
+ }, gy = () => ({ state: t, dispatch: e }) => {
7075
7075
  const n = t.plugins;
7076
7076
  for (let r = 0; r < n.length; r += 1) {
7077
7077
  const o = n[r];
@@ -7092,16 +7092,16 @@ const my = (t) => !("type" in t), gy = (t, e, n) => ({ tr: r, dispatch: o, edito
7092
7092
  }
7093
7093
  return !1;
7094
7094
  };
7095
- function by(t, e = null) {
7095
+ function yy(t, e = null) {
7096
7096
  return function(n, r) {
7097
7097
  let { $from: o, $to: i } = n.selection, s = o.blockRange(i);
7098
7098
  if (!s)
7099
7099
  return !1;
7100
7100
  let a = r ? n.tr : null;
7101
- return wy(a, s, t, e) ? (r && r(a.scrollIntoView()), !0) : !1;
7101
+ return by(a, s, t, e) ? (r && r(a.scrollIntoView()), !0) : !1;
7102
7102
  };
7103
7103
  }
7104
- function wy(t, e, n, r = null) {
7104
+ function by(t, e, n, r = null) {
7105
7105
  let o = !1, i = e, s = e.$from.doc;
7106
7106
  if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(n) && e.startIndex == 0) {
7107
7107
  if (e.$from.index(e.depth - 1) == 0)
@@ -7110,9 +7110,9 @@ function wy(t, e, n, r = null) {
7110
7110
  i = new bi(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new bi(e.$from, s.resolve(e.$to.end(e.depth)), e.depth)), o = !0;
7111
7111
  }
7112
7112
  let a = Ql(i, n, r, e);
7113
- return a ? (t && vy(t, e, a, o, n), !0) : !1;
7113
+ return a ? (t && wy(t, e, a, o, n), !0) : !1;
7114
7114
  }
7115
- function vy(t, e, n, r, o) {
7115
+ function wy(t, e, n, r, o) {
7116
7116
  let i = E.empty;
7117
7117
  for (let d = n.length - 1; d >= 0; d--)
7118
7118
  i = E.from(n[d].type.create(n[d].attrs, i));
@@ -7125,13 +7125,13 @@ function vy(t, e, n, r, o) {
7125
7125
  !f && wt(t.doc, l, a) && (t.split(l, a), l += 2 * a), l += c.child(d).nodeSize;
7126
7126
  return t;
7127
7127
  }
7128
- function ky(t) {
7128
+ function vy(t) {
7129
7129
  return function(e, n) {
7130
7130
  let { $from: r, $to: o } = e.selection, i = r.blockRange(o, (s) => s.childCount > 0 && s.firstChild.type == t);
7131
- return i ? n ? r.node(i.depth - 1).type == t ? Cy(e, n, t, i) : Sy(e, n, i) : !0 : !1;
7131
+ return i ? n ? r.node(i.depth - 1).type == t ? ky(e, n, t, i) : Cy(e, n, i) : !0 : !1;
7132
7132
  };
7133
7133
  }
7134
- function Cy(t, e, n, r) {
7134
+ function ky(t, e, n, r) {
7135
7135
  let o = t.tr, i = r.end, s = r.$to.end(r.depth);
7136
7136
  i < s && (o.step(new an(i - 1, s, i, s, new W(E.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new bi(o.doc.resolve(r.$from.pos), o.doc.resolve(s), r.depth));
7137
7137
  const a = Or(r);
@@ -7141,7 +7141,7 @@ function Cy(t, e, n, r) {
7141
7141
  let l = o.doc.resolve(o.mapping.map(i, -1) - 1);
7142
7142
  return Ht(o.doc, l.pos) && l.nodeBefore.type == l.nodeAfter.type && o.join(l.pos), e(o.scrollIntoView()), !0;
7143
7143
  }
7144
- function Sy(t, e, n) {
7144
+ function Cy(t, e, n) {
7145
7145
  let r = t.tr, o = n.parent;
7146
7146
  for (let p = n.end, h = n.endIndex - 1, m = n.startIndex; h > m; h--)
7147
7147
  p -= o.child(h).nodeSize, r.delete(p - 1, p + 1);
@@ -7154,7 +7154,7 @@ function Sy(t, e, n) {
7154
7154
  let u = i.pos, f = u + s.nodeSize;
7155
7155
  return r.step(new an(u - (a ? 1 : 0), f + (l ? 1 : 0), u + 1, f - 1, new W((a ? E.empty : E.from(o.copy(E.empty))).append(l ? E.empty : E.from(o.copy(E.empty))), a ? 0 : 1, l ? 0 : 1), a ? 0 : 1)), e(r.scrollIntoView()), !0;
7156
7156
  }
7157
- function xy(t) {
7157
+ function Sy(t) {
7158
7158
  return function(e, n) {
7159
7159
  let { $from: r, $to: o } = e.selection, i = r.blockRange(o, (c) => c.childCount > 0 && c.firstChild.type == t);
7160
7160
  if (!i)
@@ -7172,9 +7172,9 @@ function xy(t) {
7172
7172
  return !0;
7173
7173
  };
7174
7174
  }
7175
- const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
7175
+ const xy = (t, e = {}) => ({ state: n, dispatch: r }) => {
7176
7176
  const o = le(t, n.schema);
7177
- return by(o, e)(n, r);
7177
+ return yy(o, e)(n, r);
7178
7178
  }, Bo = (t, e) => {
7179
7179
  for (let n = t.depth; n > 0; n--) {
7180
7180
  const r = t.node(n);
@@ -7195,7 +7195,7 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
7195
7195
  storage: r.storage
7196
7196
  }, i = K(N(r, "group", o));
7197
7197
  return typeof i != "string" ? !1 : i.split(" ").includes("list");
7198
- }, Ay = {
7198
+ }, My = {
7199
7199
  type: "element",
7200
7200
  name: "w:abstractNum",
7201
7201
  attributes: {
@@ -7694,7 +7694,7 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
7694
7694
  ]
7695
7695
  }
7696
7696
  ]
7697
- }, Oy = {
7697
+ }, Ay = {
7698
7698
  type: "element",
7699
7699
  name: "w:abstractNum",
7700
7700
  attributes: {
@@ -8352,14 +8352,14 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8352
8352
  if (r === void 0) return !0;
8353
8353
  const o = t.doc.nodeAt(r);
8354
8354
  return n.node.type === o?.type && Ht(t.doc, r) && t.join(r), !0;
8355
- }, Ty = (t, e, n, r = {}) => (o) => {
8355
+ }, Oy = (t, e, n, r = {}) => (o) => {
8356
8356
  const { editor: i, tr: s, state: a, dispatch: l, chain: c, can: d, commands: u } = o, { extensions: f, splittableMarks: p } = i.extensionService, h = le(t, a.schema), m = le(e, a.schema), { selection: g, storedMarks: b } = a, { $from: w, $to: C } = g, y = w.blockRange(C), S = b || g.$to.parentOffset && g.$from.marks();
8357
8357
  if (!y) return !1;
8358
8358
  const k = He((_) => Hi(_.type.name, f))(g), { numbering: M } = i.converter;
8359
8359
  if (y.depth >= 1 && k && y.depth - k.depth <= 1) {
8360
8360
  if (k.node.type === h) {
8361
8361
  const { listId: _ } = k.node.attrs;
8362
- return i.converter.numbering = Ny(_, M), u.liftListItem(m);
8362
+ return i.converter.numbering = Dy(_, M), u.liftListItem(m);
8363
8363
  }
8364
8364
  if (Hi(k.node.type.name, f) && h.validContent(k.node.content) && l)
8365
8365
  return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => ai(s, h)).command(() => li(s, h)).run();
@@ -8372,9 +8372,9 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8372
8372
  }
8373
8373
  return V ? !0 : u.clearNodes();
8374
8374
  }, x = gd(M.definitions);
8375
- return i.converter.numbering = Dy(x, M, h), r.listId = x, !n || !S || !l ? c().command(L({ ensureMarks: !1 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run() : c().command(L({ ensureMarks: !0 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run();
8376
- }, gd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Dy = (t, e, n) => {
8377
- const r = n.name === "orderedList" ? Ay : Oy, o = { ...e }, i = gd(o.abstracts), s = {
8375
+ return i.converter.numbering = Ty(x, M, h), r.listId = x, !n || !S || !l ? c().command(L({ ensureMarks: !1 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run() : c().command(L({ ensureMarks: !0 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run();
8376
+ }, gd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Ty = (t, e, n) => {
8377
+ const r = n.name === "orderedList" ? My : Ay, o = { ...e }, i = gd(o.abstracts), s = {
8378
8378
  ...r,
8379
8379
  attributes: {
8380
8380
  ...r.attributes,
@@ -8394,10 +8394,10 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8394
8394
  ]
8395
8395
  };
8396
8396
  return o.definitions[t] = a, o;
8397
- }, Ny = (t, e) => {
8397
+ }, Dy = (t, e) => {
8398
8398
  const { definitions: n, abstracts: r } = e, o = n[t].elements[0].attributes["w:val"];
8399
8399
  return delete n[t], delete r[o], e;
8400
- }, Ey = (t) => (e) => {
8400
+ }, Ny = (t) => (e) => {
8401
8401
  const { tr: n, state: r, dispatch: o, editor: i } = e, s = le(t, r.schema), { $from: a, $to: l, node: c } = r.selection;
8402
8402
  if (c && c.isBlock || a.depth < 2 || !a.sameParent(l))
8403
8403
  return !1;
@@ -8449,59 +8449,59 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8449
8449
  n.ensureMarks(y), n.setMeta("splitListItem", y);
8450
8450
  }
8451
8451
  return !0;
8452
- }, Iy = (t) => ({ state: e, dispatch: n }) => {
8452
+ }, Ey = (t) => ({ state: e, dispatch: n }) => {
8453
8453
  const r = le(t, e.schema);
8454
- return xy(r)(e, n);
8455
- }, Py = (t) => ({ state: e, dispatch: n }) => {
8454
+ return Sy(r)(e, n);
8455
+ }, Iy = (t) => ({ state: e, dispatch: n }) => {
8456
8456
  const r = le(t, e.schema);
8457
- return ky(r)(e, n);
8458
- }, Ry = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8457
+ return vy(r)(e, n);
8458
+ }, Py = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8459
8459
  __proto__: null,
8460
- clearNodes: Zg,
8461
- command: Ag,
8462
- createParagraphNear: jg,
8463
- deleteSelection: ny,
8464
- exitCode: Ug,
8465
- first: Mg,
8466
- insertContent: py,
8467
- insertContentAt: gy,
8468
- insertTabChar: Og,
8469
- insertTabNode: Tg,
8470
- joinBackward: ay,
8471
- joinDown: sy,
8472
- joinForward: ly,
8473
- joinUp: iy,
8474
- liftEmptyBlock: Hg,
8475
- liftListItem: Py,
8476
- newlineInCode: Wg,
8477
- resetAttributes: oy,
8478
- selectAll: ty,
8479
- selectNodeBackward: cy,
8480
- selectNodeForward: dy,
8481
- selectTextblockEnd: fy,
8482
- selectTextblockStart: uy,
8483
- setMark: Kg,
8484
- setMeta: Dg,
8485
- setNode: Qg,
8486
- sinkListItem: Iy,
8487
- splitBlock: Vg,
8488
- splitListItem: Ey,
8489
- toggleList: Ty,
8490
- toggleMark: Gg,
8491
- toggleNode: ey,
8492
- undoInputRule: yy,
8493
- unsetAllMarks: Yg,
8494
- unsetMark: Jg,
8495
- updateAttributes: ry,
8496
- wrapInList: My
8497
- }, Symbol.toStringTag, { value: "Module" })), Ly = Q.create({
8460
+ clearNodes: Gg,
8461
+ command: Mg,
8462
+ createParagraphNear: Hg,
8463
+ deleteSelection: ty,
8464
+ exitCode: Wg,
8465
+ first: xg,
8466
+ insertContent: fy,
8467
+ insertContentAt: my,
8468
+ insertTabChar: Ag,
8469
+ insertTabNode: Og,
8470
+ joinBackward: sy,
8471
+ joinDown: iy,
8472
+ joinForward: ay,
8473
+ joinUp: oy,
8474
+ liftEmptyBlock: Vg,
8475
+ liftListItem: Iy,
8476
+ newlineInCode: jg,
8477
+ resetAttributes: ry,
8478
+ selectAll: ey,
8479
+ selectNodeBackward: ly,
8480
+ selectNodeForward: cy,
8481
+ selectTextblockEnd: uy,
8482
+ selectTextblockStart: dy,
8483
+ setMark: qg,
8484
+ setMeta: Tg,
8485
+ setNode: Zg,
8486
+ sinkListItem: Ey,
8487
+ splitBlock: $g,
8488
+ splitListItem: Ny,
8489
+ toggleList: Oy,
8490
+ toggleMark: Yg,
8491
+ toggleNode: Qg,
8492
+ undoInputRule: gy,
8493
+ unsetAllMarks: Jg,
8494
+ unsetMark: Xg,
8495
+ updateAttributes: ny,
8496
+ wrapInList: xy
8497
+ }, Symbol.toStringTag, { value: "Module" })), Ry = Q.create({
8498
8498
  name: "commands",
8499
8499
  addCommands() {
8500
- return { ...Ry };
8500
+ return { ...Py };
8501
8501
  }
8502
- }), Fy = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
8502
+ }), Ly = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
8503
8503
  navigator.platform
8504
- ), By = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, _y = (t) => {
8504
+ ), Fy = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, By = (t) => {
8505
8505
  t.commands.first(({ commands: e }) => [
8506
8506
  () => e.newlineInCode(),
8507
8507
  () => e.createParagraphNear(),
@@ -8522,11 +8522,11 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8522
8522
  () => e.joinForward(),
8523
8523
  () => e.selectNodeForward()
8524
8524
  ]);
8525
- }, zy = Q.create({
8525
+ }, _y = Q.create({
8526
8526
  name: "keymap",
8527
8527
  addShortcuts() {
8528
8528
  const t = {
8529
- Enter: () => _y(this.editor),
8529
+ Enter: () => By(this.editor),
8530
8530
  "Mod-Enter": () => this.editor.commands.exitCode(),
8531
8531
  Backspace: () => Xn(this.editor),
8532
8532
  "Mod-Backspace": () => Xn(this.editor),
@@ -8549,9 +8549,9 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8549
8549
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd(),
8550
8550
  "Ctrl-t": () => this.editor.commands.insertTabChar()
8551
8551
  };
8552
- return By() || Fy() ? n : e;
8552
+ return Fy() || Ly() ? n : e;
8553
8553
  }
8554
- }), $y = Q.create({
8554
+ }), zy = Q.create({
8555
8555
  name: "editable",
8556
8556
  addPmPlugins() {
8557
8557
  return [new Z({
@@ -8561,7 +8561,7 @@ const My = (t, e = {}) => ({ state: n, dispatch: r }) => {
8561
8561
  }
8562
8562
  })];
8563
8563
  }
8564
- }), Vy = Q.create({
8564
+ }), $y = Q.create({
8565
8565
  name: "editorFocus",
8566
8566
  addPmPlugins() {
8567
8567
  const t = this.editor;
@@ -8675,7 +8675,7 @@ const Ps = ({
8675
8675
  )) : d.attrs.track && !d.attrs.track.find((f) => f.type === ue) && ["bulletList", "orderedList"].includes(d.type.name);
8676
8676
  }), { deletionMark: a, deletionMap: l, nodes: c };
8677
8677
  };
8678
- function Hy(t) {
8678
+ function Vy(t) {
8679
8679
  const e = {
8680
8680
  bulletList: 1,
8681
8681
  orderedList: 2
@@ -8725,7 +8725,7 @@ function Hy(t) {
8725
8725
  }
8726
8726
  };
8727
8727
  }
8728
- function jy(t, e, n) {
8728
+ function Hy(t, e, n) {
8729
8729
  const r = [];
8730
8730
  return t === e ? n.resolve(t).marks().forEach((o) => {
8731
8731
  const i = n.resolve(t - 1), s = Is(i, o.type);
@@ -8787,14 +8787,14 @@ const Cd = (t) => {
8787
8787
  findMark: Eo,
8788
8788
  findParentNode: He,
8789
8789
  findParentNodeClosestToPos: Bo,
8790
- generateDocxListAttributes: Hy,
8790
+ generateDocxListAttributes: Vy,
8791
8791
  generateDocxRandomId: Cn,
8792
- generateRandom32BitHex: kf,
8793
- getActiveFormatting: If,
8792
+ generateRandom32BitHex: vf,
8793
+ getActiveFormatting: Ef,
8794
8794
  getExtensionConfigField: N,
8795
8795
  getMarkRange: Is,
8796
8796
  getMarkType: xt,
8797
- getMarksBetween: jy,
8797
+ getMarksBetween: Hy,
8798
8798
  getMarksFromSelection: No,
8799
8799
  getNodeType: le,
8800
8800
  getSchemaTypeByName: Yn,
@@ -8806,7 +8806,7 @@ const Cd = (t) => {
8806
8806
  isNodeActive: So,
8807
8807
  isTextSelection: hd,
8808
8808
  posToDOMRect: kd
8809
- }, Symbol.toStringTag, { value: "Module" })), Wy = (t, e, n) => {
8809
+ }, Symbol.toStringTag, { value: "Module" })), jy = (t, e, n) => {
8810
8810
  const r = t.resolve(e), o = r.parent, i = o.childAfter(r.parentOffset);
8811
8811
  if (!i.node)
8812
8812
  return null;
@@ -8836,11 +8836,11 @@ const Cd = (t) => {
8836
8836
  throw new Error('Invalid "predicate" parameter');
8837
8837
  } else throw new Error('Invalid "node" parameter');
8838
8838
  return xd(t, n).filter((r) => e(r.node));
8839
- }, Ad = (t, e) => Md(t, (n) => n.isInline, e), Uy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8839
+ }, Ad = (t, e) => Md(t, (n) => n.isInline, e), Wy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8840
8840
  __proto__: null,
8841
8841
  findChildren: Md,
8842
8842
  findInlineNodes: Ad,
8843
- findMarkPosition: Wy,
8843
+ findMarkPosition: jy,
8844
8844
  flatten: xd
8845
8845
  }, Symbol.toStringTag, { value: "Module" })), Ls = (t, e = null) => {
8846
8846
  const n = [], r = Ad(t.doc);
@@ -8854,7 +8854,7 @@ const Cd = (t) => {
8854
8854
  });
8855
8855
  });
8856
8856
  }), e ? n.filter(({ mark: o }) => o.attrs.id === e) : n) : n;
8857
- }, de = new G("TrackChangesBase"), qy = (t = {}) => new Z({
8857
+ }, de = new G("TrackChangesBase"), Uy = (t = {}) => new Z({
8858
8858
  key: de,
8859
8859
  state: {
8860
8860
  init(e, n) {
@@ -8975,10 +8975,10 @@ const Cd = (t) => {
8975
8975
  }
8976
8976
  }), F.create(t.doc, r)) : F.empty;
8977
8977
  }, Pe = "commentMark", Ja = ({ commentId: t, state: e, tr: n, dispatch: r }) => {
8978
- Ky(t, e.doc).forEach(({ from: i, to: s }) => {
8978
+ qy(t, e.doc).forEach(({ from: i, to: s }) => {
8979
8979
  n.removeMark(i, s, e.schema.marks[Pe]);
8980
8980
  }), r(n);
8981
- }, Ky = (t, e) => {
8981
+ }, qy = (t, e) => {
8982
8982
  const n = [];
8983
8983
  return e.descendants((r, o) => {
8984
8984
  const { marks: i } = r, s = i.find((a) => a.type.name === Pe);
@@ -8987,7 +8987,7 @@ const Cd = (t) => {
8987
8987
  t === l && n.push({ from: o, to: o + r.nodeSize });
8988
8988
  }
8989
8989
  }), n;
8990
- }, Xy = (t, e, n, r = []) => {
8990
+ }, Ky = (t, e, n, r = []) => {
8991
8991
  const o = [], i = [], s = /* @__PURE__ */ new Set();
8992
8992
  return t.descendants((a, l) => {
8993
8993
  (a.marks?.filter((d) => d.type.name === Pe)).forEach((d) => {
@@ -9033,7 +9033,7 @@ const Cd = (t) => {
9033
9033
  "w:id": e,
9034
9034
  internal: n
9035
9035
  };
9036
- }, Jy = (t, e, n, r) => {
9036
+ }, Xy = (t, e, n, r) => {
9037
9037
  const o = [], i = [];
9038
9038
  t.descendants((s, a) => {
9039
9039
  const { type: l } = s;
@@ -9060,7 +9060,7 @@ const Cd = (t) => {
9060
9060
  }), i.sort((s, a) => a.start - s.start).forEach(({ start: s, end: a }) => {
9061
9061
  e.delete(s, a);
9062
9062
  });
9063
- }, Yy = (t = {}) => {
9063
+ }, Jy = (t = {}) => {
9064
9064
  const { before: e = [], after: n = [] } = t, r = new Set(e.map((h) => h.type)), o = new Set(n.map((h) => h.type)), i = [...o].filter((h) => !r.has(h)), s = [...r].filter((h) => !o.has(h)), a = [], l = i.filter((h) => !["textStyle", "commentMark"].includes(h));
9065
9065
  l.length && a.push(`Added formatting: ${l.join(", ")}`);
9066
9066
  const c = s.filter((h) => !["textStyle", "commentMark"].includes(h));
@@ -9079,11 +9079,11 @@ const Cd = (t) => {
9079
9079
  }
9080
9080
  }
9081
9081
  }), f.length && a.push(`Modified text style: ${f.join(", ")}`), a.length ? a.join(". ") : "No formatting changes.";
9082
- }, Gy = ({ activeThreadId: t, threadId: e, isInternal: n, editor: r }) => {
9082
+ }, Yy = ({ activeThreadId: t, threadId: e, isInternal: n, editor: r }) => {
9083
9083
  if (!r.options.isInternal && n) return "transparent";
9084
9084
  const o = he.getState(r.state), i = n ? o.internalColor : o.externalColor, s = t == e ? "44" : "22";
9085
9085
  return `${i}${s}`;
9086
- }, on = new G("paginationPlugin"), Zy = async (t) => {
9086
+ }, on = new G("paginationPlugin"), Gy = async (t) => {
9087
9087
  if (!t.converter) return;
9088
9088
  const e = { headers: {}, footers: {} }, n = t.converter.headerIds, r = t.converter.footerIds;
9089
9089
  for (let o in n) {
@@ -9149,7 +9149,7 @@ const Cd = (t) => {
9149
9149
  }), n({ height: d, sectionEditor: c, sectionContainer: r });
9150
9150
  });
9151
9151
  });
9152
- }), Fs = [$e, ue, Se], he = new G("comments"), Qy = Q.create({
9152
+ }), Fs = [$e, ue, Se], he = new G("comments"), Zy = Q.create({
9153
9153
  name: "comments",
9154
9154
  addCommands() {
9155
9155
  return {
@@ -9224,7 +9224,7 @@ const Cd = (t) => {
9224
9224
  allCommentPositions: d.allCommentPositions
9225
9225
  };
9226
9226
  const f = o.getMeta(de), p = i.trackedChanges;
9227
- f && (i.trackedChanges = tb(
9227
+ f && (i.trackedChanges = eb(
9228
9228
  f,
9229
9229
  p,
9230
9230
  a,
@@ -9233,7 +9233,7 @@ const Cd = (t) => {
9233
9233
  const h = d?.type === "setActiveComment";
9234
9234
  if (!o.docChanged && o.selectionSet || h) {
9235
9235
  const { selection: m } = o;
9236
- let g = eb(a.doc, m);
9236
+ let g = Qy(a.doc, m);
9237
9237
  if (h && (g = d.activeThreadId), n !== g) {
9238
9238
  n = g;
9239
9239
  const w = {
@@ -9277,7 +9277,7 @@ const Cd = (t) => {
9277
9277
  });
9278
9278
  const _ = L.internal;
9279
9279
  S || (S = n === x);
9280
- let V = Gy({ activeThreadId: n, threadId: x, isInternal: _, editor: t });
9280
+ let V = Yy({ activeThreadId: n, threadId: x, isInternal: _, editor: t });
9281
9281
  const j = $.inline(w, w + b.nodeSize, {
9282
9282
  style: `background-color: ${V};`,
9283
9283
  "data-thread-id": x,
@@ -9339,7 +9339,7 @@ const Cd = (t) => {
9339
9339
  const s = t[e];
9340
9340
  s.start = Math.min(s.start, n), s.end = Math.max(s.end, n + o.nodeSize), s.bounds.top = Math.min(s.bounds.top, r.top), s.bounds.bottom = Math.max(s.bounds.bottom, r.bottom);
9341
9341
  }
9342
- }, eb = (t, e) => {
9342
+ }, Qy = (t, e) => {
9343
9343
  if (!e) return;
9344
9344
  const { $from: n, $to: r } = e;
9345
9345
  if (n.pos !== r.pos || !t.nodeAt(n.pos)) return;
@@ -9391,7 +9391,7 @@ const Cd = (t) => {
9391
9391
  mark: c
9392
9392
  });
9393
9393
  }), s;
9394
- }, tb = (t, e, n, r) => {
9394
+ }, eb = (t, e, n, r) => {
9395
9395
  const {
9396
9396
  insertedMark: o,
9397
9397
  deletionMark: i,
@@ -9412,7 +9412,7 @@ const Cd = (t) => {
9412
9412
  if (h.marks.find((b) => b.type.name === Se))
9413
9413
  return f = [h], !1;
9414
9414
  });
9415
- const p = rb({
9415
+ const p = nb({
9416
9416
  documentId: r.options.documentId,
9417
9417
  event: d ? "add" : "update",
9418
9418
  marks: {
@@ -9425,7 +9425,7 @@ const Cd = (t) => {
9425
9425
  newEditorState: n
9426
9426
  });
9427
9427
  return p && r.emit("commentsUpdate", p), l;
9428
- }, nb = ({
9428
+ }, tb = ({
9429
9429
  state: t,
9430
9430
  node: e,
9431
9431
  mark: n,
@@ -9435,9 +9435,9 @@ const Cd = (t) => {
9435
9435
  deletionNodes: s = []
9436
9436
  }) => {
9437
9437
  let a = "", l = "";
9438
- if (o === $e && (a = e?.text ?? ""), o === Se && (a = Yy(n.attrs)), (o === ue || i) && (l = e?.text ?? "", i)) {
9438
+ if (o === $e && (a = e?.text ?? ""), o === Se && (a = Jy(n.attrs)), (o === ue || i) && (l = e?.text ?? "", i)) {
9439
9439
  let { id: c } = r.deletionMark.attrs;
9440
- l = ob(t.doc, (u) => {
9440
+ l = rb(t.doc, (u) => {
9441
9441
  const { marks: f = [] } = u, p = f.filter((m) => Fs.includes(m.type.name));
9442
9442
  if (!p.length) return !1;
9443
9443
  if (p.find((m) => m.attrs.id === c)) return !0;
@@ -9447,7 +9447,7 @@ const Cd = (t) => {
9447
9447
  deletionText: l,
9448
9448
  trackedChangeText: a
9449
9449
  };
9450
- }, rb = ({ event: t, marks: e, deletionNodes: n, nodes: r, newEditorState: o, documentId: i }) => {
9450
+ }, nb = ({ event: t, marks: e, deletionNodes: n, nodes: r, newEditorState: o, documentId: i }) => {
9451
9451
  const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
9452
9452
  let g;
9453
9453
  o.doc.descendants((y, S) => {
@@ -9455,7 +9455,7 @@ const Cd = (t) => {
9455
9455
  if (!M.length) return;
9456
9456
  if (M.find((x) => x.attrs.id === p) && (g = y), g) return !1;
9457
9457
  });
9458
- const { deletionText: b, trackedChangeText: w } = nb({
9458
+ const { deletionText: b, trackedChangeText: w } = tb({
9459
9459
  state: o,
9460
9460
  node: g || h,
9461
9461
  mark: s,
@@ -9480,7 +9480,7 @@ const Cd = (t) => {
9480
9480
  };
9481
9481
  return t === "add" ? C.event = to.ADD : t === "update" && (C.event = to.UPDATE), C;
9482
9482
  };
9483
- function ob(t, e) {
9483
+ function rb(t, e) {
9484
9484
  let n = null;
9485
9485
  return t.descendants((r, o) => {
9486
9486
  if (e(r) && (n = { node: r, pos: o }), n) return !1;
@@ -9522,8 +9522,8 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9522
9522
  m.deletionNodes = w, m.deletionMark = g, o.appendMapping(b);
9523
9523
  }
9524
9524
  r.setMeta(de, m), r.setMeta(he, { type: "force" });
9525
+ }, ob = () => {
9525
9526
  }, ib = () => {
9526
- }, sb = () => {
9527
9527
  }, Dd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
9528
9528
  const l = {};
9529
9529
  i.nodesBetween(n.from, n.to, (c, d) => {
@@ -9658,7 +9658,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9658
9658
  i.setSelection(new H(i.doc.resolve(c)));
9659
9659
  }
9660
9660
  return t.storedMarksSet && i.setStoredMarks(t.storedMarks), t.scrolledIntoView && i.scrollIntoView(), i;
9661
- }, ab = (t) => {
9661
+ }, sb = (t) => {
9662
9662
  const { state: e } = t, { dispatch: n } = t.view, { tr: r } = e;
9663
9663
  if (n)
9664
9664
  return e.doc.descendants((o, i) => {
@@ -9679,13 +9679,13 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9679
9679
  });
9680
9680
  }
9681
9681
  }), n(r), !0;
9682
- }, lb = {
9683
- initial: ab
9682
+ }, ab = {
9683
+ initial: sb
9684
9684
  }, Qa = (t) => {
9685
- if (t === "initial" || t === "0.4.14") return Object.values(lb);
9685
+ if (t === "initial" || t === "0.4.14") return Object.values(ab);
9686
9686
  };
9687
9687
  var en, hs, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld, Gn, Zn, Fd, Bd, _d, zd;
9688
- const Xs = class Xs extends lg {
9688
+ const Xs = class Xs extends ag {
9689
9689
  constructor(n) {
9690
9690
  super();
9691
9691
  ft(this, O);
@@ -10048,7 +10048,7 @@ const Xs = class Xs extends lg {
10048
10048
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10049
10049
  */
10050
10050
  processCollaborationMigrations() {
10051
- if (console.debug("[checkVersionMigrations] Current editor version", "0.9.36"), !this.options.ydoc) return;
10051
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.9.38"), !this.options.ydoc) return;
10052
10052
  let r = this.options.ydoc.getMap("meta").get("version");
10053
10053
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10054
10054
  const o = Qa(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10103,7 +10103,7 @@ Ui = function() {
10103
10103
  * Creates extension service.
10104
10104
  */
10105
10105
  Ki = function() {
10106
- const n = ["extension", "node", "mark"], r = [$y, Ly, Vy, zy], o = this.options.externalExtensions || [], i = [...r, ...this.options.extensions].filter(
10106
+ const n = ["extension", "node", "mark"], r = [zy, Ry, $y, _y], o = this.options.externalExtensions || [], i = [...r, ...this.options.extensions].filter(
10107
10107
  (s) => n.includes(s?.type)
10108
10108
  );
10109
10109
  this.extensionService = zi.create(i, o, this);
@@ -10148,7 +10148,7 @@ Zi = function() {
10148
10148
  try {
10149
10149
  const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
10150
10150
  if (r === "docx")
10151
- n = yd(this.converter, this.schema, this), n = I(this, O, Bd).call(this, n), o && i && (n = Gm(o, this.schema));
10151
+ n = yd(this.converter, this.schema, this), n = I(this, O, Bd).call(this, n), o && i && (n = Ym(o, this.schema));
10152
10152
  else if (r === "text")
10153
10153
  if (s) {
10154
10154
  let l = s;
@@ -10197,7 +10197,7 @@ Gn = function() {
10197
10197
  if (this.options.isHeadless || !this.extensionService) return;
10198
10198
  if (this.options.extensions.find((r) => r.name === "pagination") && this.options.pagination) {
10199
10199
  console.debug("🔗 [super-editor] Initializing pagination");
10200
- const r = await Zy(this);
10200
+ const r = await Gy(this);
10201
10201
  this.storage.pagination.sectionData = r;
10202
10202
  const { state: o, dispatch: i } = this.view, s = o.tr.setMeta(on, { isReadyToInit: !0 });
10203
10203
  i(s);
@@ -10254,7 +10254,7 @@ Bd = function(n) {
10254
10254
  schema: this.schema,
10255
10255
  doc: n
10256
10256
  }), { tr: o, doc: i } = r;
10257
- return Jy(i, o, this.schema, this.converter), r.apply(o).doc;
10257
+ return Xy(i, o, this.schema, this.converter), r.apply(o).doc;
10258
10258
  }, /**
10259
10259
  * Prepare the document for export. Any necessary pre-export processing to the state
10260
10260
  * can happen here.
@@ -10267,7 +10267,7 @@ _d = function(n = []) {
10267
10267
  doc: this.state.doc,
10268
10268
  plugins: this.state.plugins
10269
10269
  }), { tr: o, doc: i } = r;
10270
- return Xy(i, o, this.schema, n), r.apply(o).doc.toJSON();
10270
+ return Ky(i, o, this.schema, n), r.apply(o).doc.toJSON();
10271
10271
  }, /**
10272
10272
  * Destroy collaboration provider and ydoc
10273
10273
  */
@@ -10341,10 +10341,10 @@ class Le {
10341
10341
  return new Le(...e);
10342
10342
  }
10343
10343
  }
10344
- const cb = /[\d-.]+(\w+)$/, db = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
10344
+ const lb = /[\d-.]+(\w+)$/, cb = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
10345
10345
  function Ct(t = "0") {
10346
- const e = t || "0", n = Number.parseFloat(e), o = (e.match(cb)?.[1] ?? "").toLowerCase();
10347
- return [n, db.includes(o) ? o : null];
10346
+ const e = t || "0", n = Number.parseFloat(e), o = (e.match(lb)?.[1] ?? "").toLowerCase();
10347
+ return [n, cb.includes(o) ? o : null];
10348
10348
  }
10349
10349
  const $d = Q.create({
10350
10350
  name: "color",
@@ -10626,14 +10626,14 @@ const $d = Q.create({
10626
10626
  };
10627
10627
  }
10628
10628
  });
10629
- function ub(t = {}) {
10629
+ function db(t = {}) {
10630
10630
  return new Z({
10631
10631
  view(e) {
10632
- return new fb(e, t);
10632
+ return new ub(e, t);
10633
10633
  }
10634
10634
  });
10635
10635
  }
10636
- class fb {
10636
+ class ub {
10637
10637
  constructor(e, n) {
10638
10638
  var r;
10639
10639
  this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = n.width) !== null && r !== void 0 ? r : 1, this.color = n.color === !1 ? void 0 : n.color || "black", this.class = n.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((o) => {
@@ -10715,7 +10715,7 @@ const Kd = Q.create({
10715
10715
  };
10716
10716
  },
10717
10717
  addPmPlugins() {
10718
- return [ub(this.options)];
10718
+ return [db(this.options)];
10719
10719
  }
10720
10720
  });
10721
10721
  class re extends Y {
@@ -10757,7 +10757,7 @@ class re extends Y {
10757
10757
  */
10758
10758
  static valid(e) {
10759
10759
  let n = e.parent;
10760
- if (n.isTextblock || !pb(e) || !hb(e))
10760
+ if (n.isTextblock || !fb(e) || !pb(e))
10761
10761
  return !1;
10762
10762
  let r = n.type.spec.allowGapCursor;
10763
10763
  if (r != null)
@@ -10818,7 +10818,7 @@ class Bs {
10818
10818
  return re.valid(n) ? new re(n) : Y.near(n);
10819
10819
  }
10820
10820
  }
10821
- function pb(t) {
10821
+ function fb(t) {
10822
10822
  for (let e = t.depth; e >= 0; e--) {
10823
10823
  let n = t.index(e), r = t.node(e);
10824
10824
  if (n == 0) {
@@ -10835,7 +10835,7 @@ function pb(t) {
10835
10835
  }
10836
10836
  return !0;
10837
10837
  }
10838
- function hb(t) {
10838
+ function pb(t) {
10839
10839
  for (let e = t.depth; e >= 0; e--) {
10840
10840
  let n = t.indexAfter(e), r = t.node(e);
10841
10841
  if (n == r.childCount) {
@@ -10852,20 +10852,20 @@ function hb(t) {
10852
10852
  }
10853
10853
  return !0;
10854
10854
  }
10855
- function mb() {
10855
+ function hb() {
10856
10856
  return new Z({
10857
10857
  props: {
10858
- decorations: wb,
10858
+ decorations: bb,
10859
10859
  createSelectionBetween(t, e, n) {
10860
10860
  return e.pos == n.pos && re.valid(n) ? new re(n) : null;
10861
10861
  },
10862
- handleClick: yb,
10863
- handleKeyDown: gb,
10864
- handleDOMEvents: { beforeinput: bb }
10862
+ handleClick: gb,
10863
+ handleKeyDown: mb,
10864
+ handleDOMEvents: { beforeinput: yb }
10865
10865
  }
10866
10866
  });
10867
10867
  }
10868
- const gb = Os({
10868
+ const mb = Os({
10869
10869
  ArrowLeft: Xr("horiz", -1),
10870
10870
  ArrowRight: Xr("horiz", 1),
10871
10871
  ArrowUp: Xr("vert", -1),
@@ -10884,7 +10884,7 @@ function Xr(t, e) {
10884
10884
  return c ? (o && o(r.tr.setSelection(new re(c))), !0) : !1;
10885
10885
  };
10886
10886
  }
10887
- function yb(t, e, n) {
10887
+ function gb(t, e, n) {
10888
10888
  if (!t || !t.editable)
10889
10889
  return !1;
10890
10890
  let r = t.state.doc.resolve(e);
@@ -10893,7 +10893,7 @@ function yb(t, e, n) {
10893
10893
  let o = t.posAtCoords({ left: n.clientX, top: n.clientY });
10894
10894
  return o && o.inside > -1 && B.isSelectable(t.state.doc.nodeAt(o.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new re(r))), !0);
10895
10895
  }
10896
- function bb(t, e) {
10896
+ function yb(t, e) {
10897
10897
  if (e.inputType != "insertCompositionText" || !(t.state.selection instanceof re))
10898
10898
  return !1;
10899
10899
  let { $from: n } = t.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);
@@ -10905,17 +10905,17 @@ function bb(t, e) {
10905
10905
  let i = t.state.tr.replace(n.pos, n.pos, new W(o, 0, 0));
10906
10906
  return i.setSelection(H.near(i.doc.resolve(n.pos + 1))), t.dispatch(i), !1;
10907
10907
  }
10908
- function wb(t) {
10908
+ function bb(t) {
10909
10909
  if (!(t.selection instanceof re))
10910
10910
  return null;
10911
10911
  let e = document.createElement("div");
10912
10912
  return e.className = "ProseMirror-gapcursor", F.create(t.doc, [$.widget(t.selection.head, e, { key: "gapcursor" })]);
10913
10913
  }
10914
- const vb = Q.create({
10914
+ const wb = Q.create({
10915
10915
  name: "gapCursor",
10916
10916
  addPmPlugins() {
10917
10917
  return [
10918
- mb()
10918
+ hb()
10919
10919
  ];
10920
10920
  },
10921
10921
  extendNodeSchema(t) {
@@ -10927,7 +10927,7 @@ const vb = Q.create({
10927
10927
  })) ?? null
10928
10928
  };
10929
10929
  }
10930
- }), kb = new G("collaboration"), Cb = Q.create({
10930
+ }), vb = new G("collaboration"), kb = Q.create({
10931
10931
  name: "collaboration",
10932
10932
  priority: 1e3,
10933
10933
  addOptions() {
@@ -10941,9 +10941,9 @@ const vb = Q.create({
10941
10941
  addPmPlugins() {
10942
10942
  if (!this.editor.options.ydoc) return [];
10943
10943
  this.options.ydoc = this.editor.options.ydoc;
10944
- const t = xb();
10945
- Mb(this.options.ydoc, this.editor), Ab(this.options.ydoc, this.editor, this);
10946
- const [e, n] = Sb(this.options.ydoc, this.editor);
10944
+ const t = Sb();
10945
+ xb(this.options.ydoc, this.editor), Mb(this.options.ydoc, this.editor, this);
10946
+ const [e, n] = Cb(this.options.ydoc, this.editor);
10947
10947
  this.options.fragment = n;
10948
10948
  const r = this.options.ydoc.getMap("media");
10949
10949
  return r.observe((o) => {
@@ -10957,8 +10957,8 @@ const vb = Q.create({
10957
10957
  },
10958
10958
  addCommands() {
10959
10959
  return {
10960
- undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"), zt.getState(e).undoManager.undoStack.length === 0 ? !1 : n ? rg(e) : !0),
10961
- redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"), zt.getState(e).undoManager.redoStack.length === 0 ? !1 : n ? og(e) : !0),
10960
+ undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"), zt.getState(e).undoManager.undoStack.length === 0 ? !1 : n ? ng(e) : !0),
10961
+ redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"), zt.getState(e).undoManager.redoStack.length === 0 ? !1 : n ? rg(e) : !0),
10962
10962
  addImageToCollaboration: ({ mediaPath: t, fileData: e }) => () => {
10963
10963
  if (!this.options.ydoc) return;
10964
10964
  this.options.ydoc.getMap("media").set(t, e);
@@ -10972,14 +10972,14 @@ const vb = Q.create({
10972
10972
  "Mod-y": () => this.editor.commands.redo()
10973
10973
  };
10974
10974
  }
10975
- }), Sb = (t, e) => {
10975
+ }), Cb = (t, e) => {
10976
10976
  const n = t.getXmlFragment("supereditor");
10977
- return [Bm(n, { onFirstRender: () => {
10977
+ return [Fm(n, { onFirstRender: () => {
10978
10978
  if (!e.options.isNewFile) return;
10979
10979
  const o = t.getMap("meta");
10980
10980
  o.set("docx", e.options.content), o.set("fonts", e.options.fonts);
10981
10981
  } }), n];
10982
- }, xb = () => ag(), Mb = (t, e) => {
10982
+ }, Sb = () => sg(), xb = (t, e) => {
10983
10983
  const n = t.getMap("meta");
10984
10984
  n.observe((r) => {
10985
10985
  const o = n.get("lockedBy"), i = n.get("locked");
@@ -10987,7 +10987,7 @@ const vb = Q.create({
10987
10987
  const s = o?.email !== e.options.user?.email, a = e.options.editable !== !i;
10988
10988
  !s || !a || (i ? console.debug("--- Locking editor ---", o, e.options.user) : console.debug("--- Unlocking editor ---", o), e.setEditable(!i), e.emit("locked", { editor: e, isLocked: i, lockedBy: o }));
10989
10989
  });
10990
- }, Ab = (t, e, n) => {
10990
+ }, Mb = (t, e, n) => {
10991
10991
  const r = e.options.collaborationProvider;
10992
10992
  if (!r) return;
10993
10993
  const o = () => {
@@ -11000,7 +11000,7 @@ const vb = Q.create({
11000
11000
  return;
11001
11001
  }
11002
11002
  r.on("synced", o);
11003
- }, Ob = Q.create({
11003
+ }, Ab = Q.create({
11004
11004
  name: "collaborationCursor",
11005
11005
  priority: 999,
11006
11006
  addOptions() {
@@ -11019,9 +11019,9 @@ const vb = Q.create({
11019
11019
  },
11020
11020
  addPmPlugins() {
11021
11021
  const { collaborationProvider: t = null } = this.editor.options;
11022
- return t ? [ng(t.awareness, { cursorBuilder: Tb })] : [];
11022
+ return t ? [tg(t.awareness, { cursorBuilder: Ob })] : [];
11023
11023
  }
11024
- }), Tb = (t) => {
11024
+ }), Ob = (t) => {
11025
11025
  const e = document.createElement("span");
11026
11026
  e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
11027
11027
  const n = document.createElement("div");
@@ -11047,7 +11047,7 @@ const vb = Q.create({
11047
11047
  name: "text",
11048
11048
  group: "inline",
11049
11049
  inline: !0
11050
- }), Db = J.create({
11050
+ }), Tb = J.create({
11051
11051
  name: "run",
11052
11052
  group: "inline",
11053
11053
  content: "text*",
@@ -11067,7 +11067,7 @@ const vb = Q.create({
11067
11067
  }
11068
11068
  });
11069
11069
  function Mo(t) {
11070
- return new vg({
11070
+ return new wg({
11071
11071
  match: t.match,
11072
11072
  handler: ({
11073
11073
  state: e,
@@ -11160,7 +11160,7 @@ const el = /^\s*([-+*])\s$/, Yd = J.create({
11160
11160
  ];
11161
11161
  }
11162
11162
  });
11163
- function Nb(t = {}) {
11163
+ function Db(t = {}) {
11164
11164
  return new Z({
11165
11165
  key: new G("orderedListSync"),
11166
11166
  appendTransaction: (e, n, r) => {
@@ -11197,16 +11197,16 @@ function Nb(t = {}) {
11197
11197
  }
11198
11198
  });
11199
11199
  }
11200
- function Eb() {
11200
+ function Nb() {
11201
11201
  return Math.floor(Math.random() * 4294967295).toString();
11202
11202
  }
11203
- function Ib(t) {
11203
+ function Eb(t) {
11204
11204
  return new Z({
11205
11205
  key: new G("orderedListMarker"),
11206
11206
  appendTransaction: (e, n, r) => {
11207
11207
  if (!(e.some((c) => c.docChanged) && !n.doc.eq(r.doc)))
11208
11208
  return;
11209
- let { doc: i, tr: s } = r, a = Pb(r);
11209
+ let { doc: i, tr: s } = r, a = Ib(r);
11210
11210
  if (!a.size)
11211
11211
  return;
11212
11212
  let l = !1;
@@ -11216,14 +11216,14 @@ function Ib(t) {
11216
11216
  u.node.attrs.syncId;
11217
11217
  let h = u.node.childCount !== f.length;
11218
11218
  if (p) {
11219
- f.forEach((y) => Lb(s, y)), l = !0;
11219
+ f.forEach((y) => Rb(s, y)), l = !0;
11220
11220
  return;
11221
11221
  }
11222
11222
  if (h) {
11223
- let y = Rb({ state: r, list: u });
11223
+ let y = Pb({ state: r, list: u });
11224
11224
  y.length && (f = y);
11225
11225
  }
11226
- let m = f[0], g = Fb({ state: r, listItems: f }), b = Gd(), w = {
11226
+ let m = f[0], g = Lb({ state: r, listItems: f }), b = Gd(), w = {
11227
11227
  lvlText: m.node.attrs.lvlText ?? b.lvlText,
11228
11228
  listLevel: m.node.attrs.listLevel ?? b.listLevel,
11229
11229
  listNumberingType: m.node.attrs.listNumberingType ?? b.listNumberingType
@@ -11255,7 +11255,7 @@ function Ib(t) {
11255
11255
  }
11256
11256
  });
11257
11257
  }
11258
- function Pb(t) {
11258
+ function Ib(t) {
11259
11259
  let { doc: e } = t, n = /* @__PURE__ */ new Map();
11260
11260
  return e.descendants((r, o) => {
11261
11261
  let { attrs: i } = r, s = r.type.name === "listItem", a = !!i.listLevel?.length, l = !!i.lvlText, c = i.listNumberingType && i.listNumberingType !== "bullet";
@@ -11265,7 +11265,7 @@ function Pb(t) {
11265
11265
  }
11266
11266
  }), n;
11267
11267
  }
11268
- function Rb({ state: t, list: e }) {
11268
+ function Pb({ state: t, list: e }) {
11269
11269
  let { doc: n } = t, r = [];
11270
11270
  return n.descendants((o, i) => {
11271
11271
  let s = o.type.name === "listItem", a = n.resolve(i);
@@ -11279,7 +11279,7 @@ function Gd({ lvlText: t = "", listLevel: e = [], listNumberingType: n = "decima
11279
11279
  listNumberingType: n
11280
11280
  };
11281
11281
  }
11282
- function Lb(t, e) {
11282
+ function Rb(t, e) {
11283
11283
  let { pos: n, node: r } = e;
11284
11284
  t.setNodeMarkup(n, void 0, {
11285
11285
  ...r.attrs,
@@ -11291,7 +11291,7 @@ function Lb(t, e) {
11291
11291
  function tl(t, e) {
11292
11292
  return t.length === e.length && t.every((n, r) => n === e[r]);
11293
11293
  }
11294
- function Fb({ state: t, listItems: e }) {
11294
+ function Lb({ state: t, listItems: e }) {
11295
11295
  let { doc: n } = t, r = e[0], { lvlText: o, listLevel: i, listNumberingType: s } = r.node.attrs, a = Gd({
11296
11296
  lvlText: "%1.",
11297
11297
  listLevel: [1],
@@ -11350,7 +11350,7 @@ const nl = /^(\d+)\.\s$/, Zd = J.create({
11350
11350
  renderDOM: (t) => {
11351
11351
  let e = t["list-style-type"];
11352
11352
  return e ? (e === "lowerLetter" && (e = "lowerAlpha"), {
11353
- style: `list-style-type: ${Cf(e)};`
11353
+ style: `list-style-type: ${kf(e)};`
11354
11354
  }) : {};
11355
11355
  }
11356
11356
  },
@@ -11426,7 +11426,7 @@ const nl = /^(\d+)\.\s$/, Zd = J.create({
11426
11426
  return !1;
11427
11427
  let { $from: p } = r.selection, h = r.doc.nodeAt(f), m = p.after(), g = r.doc.nodeAt(m), b = h?.type.name === this.name, w = g?.type.name === this.name;
11428
11428
  if (b && w) {
11429
- let C = h.attrs.order || 1, y = h.childCount, S = h.attrs.syncId, k = y + C, M = S || Eb();
11429
+ let C = h.attrs.order || 1, y = h.childCount, S = h.attrs.syncId, k = y + C, M = S || Nb();
11430
11430
  r.setNodeMarkup(m, void 0, {
11431
11431
  ...g.attrs,
11432
11432
  order: k,
@@ -11448,7 +11448,7 @@ const nl = /^(\d+)\.\s$/, Zd = J.create({
11448
11448
  };
11449
11449
  },
11450
11450
  addPmPlugins() {
11451
- return [Ib(this.editor), Nb()];
11451
+ return [Eb(this.editor), Db()];
11452
11452
  },
11453
11453
  addInputRules() {
11454
11454
  let t = Mo({
@@ -11469,19 +11469,19 @@ const nl = /^(\d+)\.\s$/, Zd = J.create({
11469
11469
  t
11470
11470
  ];
11471
11471
  }
11472
- }), Bb = ({ listLevel: t, lvlText: e, listNumberingType: n }) => {
11473
- const r = Vb[n];
11472
+ }), Fb = ({ listLevel: t, lvlText: e, listNumberingType: n }) => {
11473
+ const r = $b[n];
11474
11474
  return r ? r(t, e) : null;
11475
- }, _b = (t, e) => _s(t, e, String), Qd = (t, e) => _s(t, e, jb), zb = (t, e) => Qd(t, e).toLowerCase(), $b = (t, e) => eu(t, e).toLowerCase(), eu = (t, e) => _s(t, e, (n) => Wb(n)), Vb = {
11476
- decimal: _b,
11477
- lowerRoman: zb,
11475
+ }, Bb = (t, e) => _s(t, e, String), Qd = (t, e) => _s(t, e, Hb), _b = (t, e) => Qd(t, e).toLowerCase(), zb = (t, e) => eu(t, e).toLowerCase(), eu = (t, e) => _s(t, e, (n) => jb(n)), $b = {
11476
+ decimal: Bb,
11477
+ lowerRoman: _b,
11478
11478
  upperRoman: Qd,
11479
- lowerLetter: $b,
11479
+ lowerLetter: zb,
11480
11480
  upperLetter: eu
11481
- }, Hb = (t, e) => t.reduce((n, r, o) => n.replace(`%${o + 1}`, r), e), _s = (t, e, n) => {
11481
+ }, Vb = (t, e) => t.reduce((n, r, o) => n.replace(`%${o + 1}`, r), e), _s = (t, e, n) => {
11482
11482
  const r = t.map(n);
11483
- return Hb(r, e);
11484
- }, jb = (t) => {
11483
+ return Vb(r, e);
11484
+ }, Hb = (t) => {
11485
11485
  const e = [
11486
11486
  { value: 1e3, numeral: "M" },
11487
11487
  { value: 900, numeral: "CM" },
@@ -11502,7 +11502,7 @@ const nl = /^(\d+)\.\s$/, Zd = J.create({
11502
11502
  for (; t >= r; )
11503
11503
  n += o, t -= r;
11504
11504
  return n;
11505
- }, Wb = (t) => {
11505
+ }, jb = (t) => {
11506
11506
  let e = "";
11507
11507
  const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
11508
11508
  for (; t > 0; ) {
@@ -11511,7 +11511,7 @@ const nl = /^(\d+)\.\s$/, Zd = J.create({
11511
11511
  }
11512
11512
  return e;
11513
11513
  };
11514
- function Ub(t = {}) {
11514
+ function Wb(t = {}) {
11515
11515
  return new Z({
11516
11516
  key: new G("styledListMarker"),
11517
11517
  state: {
@@ -11544,11 +11544,11 @@ function rl(t, e = []) {
11544
11544
  let i = Rs(n, (s) => s.type.name === "listItem");
11545
11545
  return i.length && i.forEach(({ node: s, pos: a }) => {
11546
11546
  let l = xt("textStyle", n.type.schema), c = [...e.filter((b) => b.type === l)];
11547
- if (Kb(s) && e.length) {
11547
+ if (qb(s) && e.length) {
11548
11548
  const b = e.filter((w) => w.type === l);
11549
11549
  c.push(...b);
11550
11550
  } else {
11551
- const b = qb(s, n, l);
11551
+ const b = Ub(s, n, l);
11552
11552
  c.push(...b);
11553
11553
  }
11554
11554
  let u = null, f = null;
@@ -11586,7 +11586,7 @@ function ol(t) {
11586
11586
  n.push(a);
11587
11587
  }), n;
11588
11588
  }
11589
- function qb(t, e, n) {
11589
+ function Ub(t, e, n) {
11590
11590
  let r = [];
11591
11591
  return t.forEach((o) => {
11592
11592
  o.type.name === "paragraph" && o.forEach((i) => {
@@ -11598,7 +11598,7 @@ function qb(t, e, n) {
11598
11598
  });
11599
11599
  }), r;
11600
11600
  }
11601
- function Kb(t) {
11601
+ function qb(t) {
11602
11602
  return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
11603
11603
  }
11604
11604
  const tu = J.create({
@@ -11629,7 +11629,7 @@ const tu = J.create({
11629
11629
  let { listLevel: e, listNumberingType: n, lvlText: r } = t;
11630
11630
  if (!!!e?.length || !r)
11631
11631
  return {};
11632
- let i = Bb({
11632
+ let i = Fb({
11633
11633
  listLevel: e,
11634
11634
  lvlText: r,
11635
11635
  listNumberingType: n
@@ -11721,12 +11721,12 @@ const tu = J.create({
11721
11721
  };
11722
11722
  },
11723
11723
  addPmPlugins() {
11724
- return [Ub()];
11724
+ return [Wb()];
11725
11725
  }
11726
- }), io = new G("linkedStyles"), Xb = Q.create({
11726
+ }), io = new G("linkedStyles"), Kb = Q.create({
11727
11727
  name: "linkedStyles",
11728
11728
  addPmPlugins() {
11729
- return [Jb(this.editor)];
11729
+ return [Xb(this.editor)];
11730
11730
  },
11731
11731
  addCommands() {
11732
11732
  return {
@@ -11746,7 +11746,7 @@ const tu = J.create({
11746
11746
  }
11747
11747
  };
11748
11748
  }
11749
- }), Jb = (t) => new Z({
11749
+ }), Xb = (t) => new Z({
11750
11750
  key: io,
11751
11751
  state: {
11752
11752
  init(e, { doc: n, selection: r }) {
@@ -11778,14 +11778,14 @@ const tu = J.create({
11778
11778
  return t.descendants((o, i) => {
11779
11779
  const { name: s } = o.type;
11780
11780
  if (o?.attrs?.styleId && (r = o.attrs.styleId), s === "paragraph" && !o.attrs?.styleId && (r = null), s !== "text") return;
11781
- const a = Gb(r, e);
11781
+ const a = Yb(r, e);
11782
11782
  if (!a) return;
11783
- const l = Yb(a, o);
11783
+ const l = Jb(a, o);
11784
11784
  if (!l) return;
11785
11785
  const c = $.inline(i, i + o.nodeSize, { style: l });
11786
11786
  n.push(c);
11787
11787
  }), F.create(t, n);
11788
- }, Yb = (t, e, n = !0) => {
11788
+ }, Jb = (t, e, n = !0) => {
11789
11789
  if (!t?.definition?.styles) return "";
11790
11790
  const r = {};
11791
11791
  return Object.entries(t.definition.styles).forEach(([o, i]) => {
@@ -11801,7 +11801,7 @@ const tu = J.create({
11801
11801
  a.push({ key: c.type.name, value: c.attrs[s] });
11802
11802
  }), !a.find((c) => c.key === s))
11803
11803
  if (s === "spacing" && n) {
11804
- const c = Zb(i);
11804
+ const c = Gb(i);
11805
11805
  Object.entries(c).forEach(([d, u]) => {
11806
11806
  r[d] = u;
11807
11807
  });
@@ -11810,21 +11810,21 @@ const tu = J.create({
11810
11810
  c && (r["margin-left"] = c + "px"), d && (r["margin-right"] = d + "px"), u && (r["text-indent"] = u + "px");
11811
11811
  } else s === "bold" ? r["font-weight"] = "bold" : r[s] = i;
11812
11812
  }), Object.entries(r).map(([o, i]) => `${o}: ${i}`).join(";");
11813
- }, Gb = (t, e = []) => e.find((n) => n.id === t), Zb = (t) => {
11813
+ }, Yb = (t, e = []) => e.find((n) => n.id === t), Gb = (t) => {
11814
11814
  const { lineSpaceBefore: e, lineSpaceAfter: n, line: r, lineRule: o } = t;
11815
11815
  return {
11816
11816
  "margin-top": e + "px",
11817
11817
  "margin-bottom": n + "px",
11818
11818
  "line-height": r
11819
11819
  };
11820
- }, Qb = (t) => {
11820
+ }, Zb = (t) => {
11821
11821
  const { lineSpaceBefore: e, lineSpaceAfter: n, line: r, lineRule: o } = t;
11822
11822
  return `
11823
11823
  ${e ? `margin-top: ${e}px;` : ""}
11824
11824
  ${n ? `margin-bottom: ${n}px;` : ""}
11825
11825
  ${r ? `line-height: ${r};` : ""}
11826
11826
  `.trim();
11827
- }, e0 = (t) => {
11827
+ }, Qb = (t) => {
11828
11828
  let e = "";
11829
11829
  for (const n of t)
11830
11830
  switch (n.type) {
@@ -11862,7 +11862,7 @@ const tu = J.create({
11862
11862
  renderDOM: (t) => {
11863
11863
  const { spacing: e } = t;
11864
11864
  if (!e) return {};
11865
- const n = Qb(e);
11865
+ const n = Zb(e);
11866
11866
  return n ? { style: n } : {};
11867
11867
  }
11868
11868
  },
@@ -11880,7 +11880,7 @@ const tu = J.create({
11880
11880
  renderDOM: (t) => {
11881
11881
  const { marksAttrs: e } = t;
11882
11882
  if (!e?.length) return {};
11883
- const n = e0(e);
11883
+ const n = Qb(e);
11884
11884
  return n ? { style: n } : {};
11885
11885
  }
11886
11886
  },
@@ -11959,7 +11959,7 @@ const tu = J.create({
11959
11959
  {}
11960
11960
  );
11961
11961
  }
11962
- }), t0 = J.create({
11962
+ }), e0 = J.create({
11963
11963
  name: "commentRangeStart",
11964
11964
  group: "inline",
11965
11965
  inline: !0,
@@ -11990,7 +11990,7 @@ const tu = J.create({
11990
11990
  }
11991
11991
  };
11992
11992
  }
11993
- }), n0 = J.create({
11993
+ }), t0 = J.create({
11994
11994
  name: "commentRangeEnd",
11995
11995
  group: "inline",
11996
11996
  inline: !0,
@@ -12017,7 +12017,7 @@ const tu = J.create({
12017
12017
  }
12018
12018
  };
12019
12019
  }
12020
- }), r0 = J.create({
12020
+ }), n0 = J.create({
12021
12021
  name: "commentReference",
12022
12022
  group: "inline",
12023
12023
  inline: !0,
@@ -12044,7 +12044,7 @@ const tu = J.create({
12044
12044
  }
12045
12045
  };
12046
12046
  }
12047
- }), o0 = Le.create({
12047
+ }), r0 = Le.create({
12048
12048
  name: Pe,
12049
12049
  group: "comments",
12050
12050
  excludes: "",
@@ -12069,7 +12069,7 @@ const tu = J.create({
12069
12069
  renderDOM({ htmlAttributes: t }) {
12070
12070
  return [Pe, D.mergeAttributes(this.options.htmlAttributes, t)];
12071
12071
  }
12072
- }), i0 = J.create({
12072
+ }), o0 = J.create({
12073
12073
  name: "tab",
12074
12074
  group: "inline",
12075
12075
  inline: !0,
@@ -12133,21 +12133,21 @@ const tu = J.create({
12133
12133
  try {
12134
12134
  t.doc.nodesBetween(o - s - 1, o - 1, (d, u) => {
12135
12135
  if (d.isText && d.textContent !== " ") {
12136
- const f = s0(e, u);
12136
+ const f = i0(e, u);
12137
12137
  a += f;
12138
12138
  }
12139
12139
  });
12140
12140
  } catch {
12141
12141
  return;
12142
12142
  }
12143
- const l = i.nodeBefore?.type.name === "tab" ? ci : ci - a % ci, c = a0(i);
12143
+ const l = i.nodeBefore?.type.name === "tab" ? ci : ci - a % ci, c = s0(i);
12144
12144
  n.push(
12145
12145
  $.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
12146
12146
  );
12147
12147
  }
12148
12148
  }), n;
12149
12149
  };
12150
- function s0(t, e) {
12150
+ function i0(t, e) {
12151
12151
  const n = t.nodeDOM(e);
12152
12152
  if (n) {
12153
12153
  const r = document.createRange();
@@ -12155,11 +12155,11 @@ function s0(t, e) {
12155
12155
  }
12156
12156
  return 0;
12157
12157
  }
12158
- function a0(t) {
12158
+ function s0(t) {
12159
12159
  const i = t.node(1).firstChild.marks.find((a) => a.type.name === "textStyle");
12160
12160
  return `${(parseInt(i?.attrs.fontSize) * 1.333 || 16) * 1.1}px`;
12161
12161
  }
12162
- const ou = J.create({
12162
+ const a0 = J.create({
12163
12163
  name: "lineBreak",
12164
12164
  group: "inline",
12165
12165
  inline: !0,
@@ -12169,7 +12169,7 @@ const ou = J.create({
12169
12169
  renderDOM() {
12170
12170
  return ["br", {}, 0];
12171
12171
  }
12172
- }), iu = J.create({
12172
+ }), ou = J.create({
12173
12173
  name: "hardBreak",
12174
12174
  group: "inline",
12175
12175
  inline: !0,
@@ -12257,7 +12257,7 @@ function cl(t, e) {
12257
12257
  }
12258
12258
  r = Math.ceil(Math.max(o, i)), t.style.setProperty("--table-border-width", `${r || n}px`);
12259
12259
  }
12260
- const dl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), su = ({
12260
+ const dl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), iu = ({
12261
12261
  size: t = 0.66665,
12262
12262
  color: e = "#000000"
12263
12263
  } = {}) => ({
@@ -12286,7 +12286,7 @@ const dl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), su
12286
12286
  const u = r && d === 0 ? s : a;
12287
12287
  l.push(i.tableRow.createChecked(null, u));
12288
12288
  }
12289
- const c = su();
12289
+ const c = iu();
12290
12290
  return i.table.createChecked({ borders: c }, l);
12291
12291
  };
12292
12292
  var es, ts;
@@ -12547,7 +12547,7 @@ function g0(t) {
12547
12547
  function zs(t, e) {
12548
12548
  return t.depth == e.depth && t.pos >= e.start(-1) && t.pos <= e.end(-1);
12549
12549
  }
12550
- function au(t, e, n) {
12550
+ function su(t, e, n) {
12551
12551
  const r = t.node(-1), o = oe.get(r), i = t.start(-1), s = o.nextCell(t.pos - i, e, n);
12552
12552
  return s == null ? null : t.node(0).resolve(i + s);
12553
12553
  }
@@ -12555,7 +12555,7 @@ function dn(t, e, n = 1) {
12555
12555
  const r = { ...t, colspan: t.colspan - n };
12556
12556
  return r.colwidth && (r.colwidth = r.colwidth.slice(), r.colwidth.splice(e, n), r.colwidth.some((o) => o > 0) || (r.colwidth = null)), r;
12557
12557
  }
12558
- function lu(t, e, n = 1) {
12558
+ function au(t, e, n = 1) {
12559
12559
  const r = { ...t, colspan: t.colspan + n };
12560
12560
  if (r.colwidth) {
12561
12561
  r.colwidth = r.colwidth.slice();
@@ -12586,7 +12586,7 @@ var X = class ht extends Y {
12586
12586
  if (!u)
12587
12587
  throw RangeError(`No cell with offset ${d} found`);
12588
12588
  const f = i + d + 1;
12589
- return new Sf(
12589
+ return new Cf(
12590
12590
  a.resolve(f),
12591
12591
  a.resolve(f + u.content.size)
12592
12592
  );
@@ -12736,12 +12736,12 @@ var X = class ht extends Y {
12736
12736
  };
12737
12737
  X.prototype.visible = !1;
12738
12738
  Y.jsonID("cell", X);
12739
- var b0 = class cu {
12739
+ var b0 = class lu {
12740
12740
  constructor(e, n) {
12741
12741
  this.anchor = e, this.head = n;
12742
12742
  }
12743
12743
  map(e) {
12744
- return new cu(e.map(this.anchor), e.map(this.head));
12744
+ return new lu(e.map(this.anchor), e.map(this.head));
12745
12745
  }
12746
12746
  resolve(e) {
12747
12747
  const n = e.resolve(this.anchor), r = e.resolve(this.head);
@@ -12801,7 +12801,7 @@ function C0(t, e, n) {
12801
12801
  return i && (e || (e = t.tr)).setSelection(i), e;
12802
12802
  }
12803
12803
  var S0 = new G("fix-tables");
12804
- function du(t, e, n, r) {
12804
+ function cu(t, e, n, r) {
12805
12805
  const o = t.childCount, i = e.childCount;
12806
12806
  e: for (let s = 0, a = 0; s < i; s++) {
12807
12807
  const l = e.child(s);
@@ -12810,15 +12810,15 @@ function du(t, e, n, r) {
12810
12810
  a = c + 1, n += l.nodeSize;
12811
12811
  continue e;
12812
12812
  }
12813
- r(l, n), a < o && t.child(a).sameMarkup(l) ? du(t.child(a), l, n + 1, r) : l.nodesBetween(0, l.content.size, r, n + 1), n += l.nodeSize;
12813
+ r(l, n), a < o && t.child(a).sameMarkup(l) ? cu(t.child(a), l, n + 1, r) : l.nodesBetween(0, l.content.size, r, n + 1), n += l.nodeSize;
12814
12814
  }
12815
12815
  }
12816
- function uu(t, e) {
12816
+ function du(t, e) {
12817
12817
  let n;
12818
12818
  const r = (o, i) => {
12819
12819
  o.type.spec.tableRole == "table" && (n = x0(t, o, i, n));
12820
12820
  };
12821
- return e ? e.doc != t.doc && du(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
12821
+ return e ? e.doc != t.doc && cu(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
12822
12822
  }
12823
12823
  function x0(t, e, n, r) {
12824
12824
  const o = oe.get(e);
@@ -12886,7 +12886,7 @@ function at(t) {
12886
12886
  e.$headCell.pos - o
12887
12887
  ) : i.findCell(n.pos - o), tableStart: o, map: i, table: r };
12888
12888
  }
12889
- function fu(t, { map: e, tableStart: n, table: r }, o) {
12889
+ function uu(t, { map: e, tableStart: n, table: r }, o) {
12890
12890
  let i = o > 0 ? -1 : 0;
12891
12891
  y0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
12892
12892
  for (let s = 0; s < e.height; s++) {
@@ -12896,7 +12896,7 @@ function fu(t, { map: e, tableStart: n, table: r }, o) {
12896
12896
  t.setNodeMarkup(
12897
12897
  t.mapping.map(n + l),
12898
12898
  null,
12899
- lu(c.attrs, o - e.colCount(l))
12899
+ au(c.attrs, o - e.colCount(l))
12900
12900
  ), s += c.attrs.rowspan - 1;
12901
12901
  } else {
12902
12902
  const l = i == null ? we(r.type.schema).cell : r.nodeAt(e.map[a + i]).type, c = e.positionAt(s, o, r);
@@ -12909,7 +12909,7 @@ function M0(t, e) {
12909
12909
  if (!Ye(t)) return !1;
12910
12910
  if (e) {
12911
12911
  const n = at(t);
12912
- e(fu(t.tr, n, n.left));
12912
+ e(uu(t.tr, n, n.left));
12913
12913
  }
12914
12914
  return !0;
12915
12915
  }
@@ -12917,7 +12917,7 @@ function A0(t, e) {
12917
12917
  if (!Ye(t)) return !1;
12918
12918
  if (e) {
12919
12919
  const n = at(t);
12920
- e(fu(t.tr, n, n.right));
12920
+ e(uu(t.tr, n, n.right));
12921
12921
  }
12922
12922
  return !0;
12923
12923
  }
@@ -12961,7 +12961,7 @@ function D0(t, e, n) {
12961
12961
  return !1;
12962
12962
  return !0;
12963
12963
  }
12964
- function pu(t, { map: e, tableStart: n, table: r }, o) {
12964
+ function fu(t, { map: e, tableStart: n, table: r }, o) {
12965
12965
  var i;
12966
12966
  let s = n;
12967
12967
  for (let c = 0; c < o; c++) s += r.child(c).nodeSize;
@@ -12985,7 +12985,7 @@ function N0(t, e) {
12985
12985
  if (!Ye(t)) return !1;
12986
12986
  if (e) {
12987
12987
  const n = at(t);
12988
- e(pu(t.tr, n, n.top));
12988
+ e(fu(t.tr, n, n.top));
12989
12989
  }
12990
12990
  return !0;
12991
12991
  }
@@ -12993,7 +12993,7 @@ function E0(t, e) {
12993
12993
  if (!Ye(t)) return !1;
12994
12994
  if (e) {
12995
12995
  const n = at(t);
12996
- e(pu(t.tr, n, n.bottom));
12996
+ e(fu(t.tr, n, n.bottom));
12997
12997
  }
12998
12998
  return !0;
12999
12999
  }
@@ -13079,7 +13079,7 @@ function fl(t, e) {
13079
13079
  if (l == null || c == null)
13080
13080
  return !0;
13081
13081
  if (i.setNodeMarkup(l + r.tableStart, null, {
13082
- ...lu(
13082
+ ...au(
13083
13083
  c.attrs,
13084
13084
  c.attrs.colspan,
13085
13085
  r.right - r.left - c.attrs.colspan
@@ -13363,7 +13363,7 @@ function H0(t, e) {
13363
13363
  }
13364
13364
  function rs(t, e) {
13365
13365
  const n = t.createAndFill();
13366
- return new xf(n).replace(0, n.content.size, e).doc;
13366
+ return new Sf(n).replace(0, n.content.size, e).doc;
13367
13367
  }
13368
13368
  function j0({ width: t, height: e, rows: n }, r, o) {
13369
13369
  if (t != r) {
@@ -13538,7 +13538,7 @@ function Yr(t, e) {
13538
13538
  Y.near(i.$headCell, e)
13539
13539
  );
13540
13540
  if (t != "horiz" && !i.empty) return !1;
13541
- const s = hu(o, t, e);
13541
+ const s = pu(o, t, e);
13542
13542
  if (s == null) return !1;
13543
13543
  if (t == "horiz")
13544
13544
  return so(
@@ -13547,7 +13547,7 @@ function Yr(t, e) {
13547
13547
  Y.near(n.doc.resolve(i.head + e), e)
13548
13548
  );
13549
13549
  {
13550
- const a = n.doc.resolve(s), l = au(a, t, e);
13550
+ const a = n.doc.resolve(s), l = su(a, t, e);
13551
13551
  let c;
13552
13552
  return l ? c = Y.near(l, 1) : e < 0 ? c = Y.near(n.doc.resolve(a.before(-1)), -1) : c = Y.near(n.doc.resolve(a.after(-1)), 1), so(n, r, c);
13553
13553
  }
@@ -13561,11 +13561,11 @@ function Gr(t, e) {
13561
13561
  if (i instanceof X)
13562
13562
  s = i;
13563
13563
  else {
13564
- const l = hu(o, t, e);
13564
+ const l = pu(o, t, e);
13565
13565
  if (l == null) return !1;
13566
13566
  s = new X(n.doc.resolve(l));
13567
13567
  }
13568
- const a = au(s.$headCell, t, e);
13568
+ const a = su(s.$headCell, t, e);
13569
13569
  return a ? so(
13570
13570
  n,
13571
13571
  r,
@@ -13645,7 +13645,7 @@ function X0(t, e) {
13645
13645
  }
13646
13646
  t.root.addEventListener("mouseup", s), t.root.addEventListener("dragstart", s), t.root.addEventListener("mousemove", a);
13647
13647
  }
13648
- function hu(t, e, n) {
13648
+ function pu(t, e, n) {
13649
13649
  if (!(t.state.selection instanceof H)) return null;
13650
13650
  const { $head: r } = t.state.selection;
13651
13651
  for (let o = r.depth - 1; o >= 0; o--) {
@@ -13795,14 +13795,14 @@ function Z0(t, e, n, r) {
13795
13795
  if (c.colCount(a.pos - d) + a.nodeAfter.attrs.colspan - 1 == c.width - 1)
13796
13796
  return;
13797
13797
  }
13798
- mu(t, s);
13798
+ hu(t, s);
13799
13799
  }
13800
13800
  }
13801
13801
  }
13802
13802
  function Q0(t) {
13803
13803
  if (!t.editable) return;
13804
13804
  const e = Ee.getState(t.state);
13805
- e && e.activeHandle > -1 && !e.dragging && mu(t, -1);
13805
+ e && e.activeHandle > -1 && !e.dragging && hu(t, -1);
13806
13806
  }
13807
13807
  function ew(t, e, n, r) {
13808
13808
  var o;
@@ -13878,7 +13878,7 @@ function kl(t, e, n) {
13878
13878
  const r = e.clientX - t.startX;
13879
13879
  return Math.max(n, t.startWidth + r);
13880
13880
  }
13881
- function mu(t, e) {
13881
+ function hu(t, e) {
13882
13882
  t.dispatch(
13883
13883
  t.state.tr.setMeta(Ee, { setHandle: e })
13884
13884
  );
@@ -13970,7 +13970,7 @@ function sw({
13970
13970
  appendTransaction(e, n, r) {
13971
13971
  return C0(
13972
13972
  r,
13973
- uu(r, n),
13973
+ du(r, n),
13974
13974
  t
13975
13975
  );
13976
13976
  }
@@ -13984,7 +13984,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
13984
13984
  if (i.type.name === "table") return !1;
13985
13985
  ["tableCell", "tableHeader"].includes(i.type.name) && (n += 1);
13986
13986
  }), n === e.ranges.length ? (t.commands.deleteTable(), !0) : !1;
13987
- }, gu = ({
13987
+ }, mu = ({
13988
13988
  size: t = 0.66665,
13989
13989
  color: e = "#000000"
13990
13990
  } = {}) => ({
@@ -13992,7 +13992,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
13992
13992
  left: { size: t, color: e },
13993
13993
  bottom: { size: t, color: e },
13994
13994
  right: { size: t, color: e }
13995
- }), yu = J.create({
13995
+ }), gu = J.create({
13996
13996
  name: "table",
13997
13997
  content: "tableRow+",
13998
13998
  group: "block",
@@ -14064,7 +14064,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14064
14064
  return [{ tag: "table" }];
14065
14065
  },
14066
14066
  renderDOM({ node: t, htmlAttributes: e }) {
14067
- const { colgroup: n, tableWidth: r, tableMinWidth: o } = Mf(
14067
+ const { colgroup: n, tableWidth: r, tableMinWidth: o } = xf(
14068
14068
  t,
14069
14069
  this.options.cellMinWidth
14070
14070
  );
@@ -14103,7 +14103,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14103
14103
  setCellAttr: (t, e) => ({ state: n, dispatch: r }) => F0(t, e)(n, r),
14104
14104
  goToNextCell: () => ({ state: t, dispatch: e }) => ml(1)(t, e),
14105
14105
  goToPreviousCell: () => ({ state: t, dispatch: e }) => ml(-1)(t, e),
14106
- fixTables: () => ({ state: t, dispatch: e }) => (e && uu(t), !0),
14106
+ fixTables: () => ({ state: t, dispatch: e }) => (e && du(t), !0),
14107
14107
  setCellSelection: (t) => ({ tr: e, dispatch: n }) => (n && e.setSelection(X.create(e.doc, t.anchorCell, t.headCell)), !0),
14108
14108
  deleteCellAndTableBorders: () => ({ chain: t, state: e, tr: n }) => {
14109
14109
  if (!Cd(e))
@@ -14115,11 +14115,11 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14115
14115
  return e.doc.nodesBetween(o, i, (s, a) => {
14116
14116
  ["tableCell", "tableHeader"].includes(s.type.name) && n.setNodeMarkup(a, void 0, {
14117
14117
  ...s.attrs,
14118
- borders: gu({ size: 0 })
14118
+ borders: mu({ size: 0 })
14119
14119
  });
14120
14120
  }), n.setNodeMarkup(r.pos, void 0, {
14121
14121
  ...r.node.attrs,
14122
- borders: su({ size: 0 })
14122
+ borders: iu({ size: 0 })
14123
14123
  }), !0;
14124
14124
  }
14125
14125
  };
@@ -14161,7 +14161,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14161
14161
  }))
14162
14162
  };
14163
14163
  }
14164
- }), bu = J.create({
14164
+ }), yu = J.create({
14165
14165
  name: "tableHeader",
14166
14166
  content: "block+",
14167
14167
  tableRole: "header_cell",
@@ -14197,7 +14197,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14197
14197
  renderDOM({ htmlAttributes: t }) {
14198
14198
  return ["th", D.mergeAttributes(this.options.htmlAttributes, t), 0];
14199
14199
  }
14200
- }), wu = J.create({
14200
+ }), bu = J.create({
14201
14201
  name: "tableRow",
14202
14202
  content: "(tableCell | tableHeader)*",
14203
14203
  tableRole: "row",
@@ -14221,7 +14221,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14221
14221
  renderDOM({ htmlAttributes: t }) {
14222
14222
  return ["tr", D.mergeAttributes(this.options.htmlAttributes, t), 0];
14223
14223
  }
14224
- }), vu = J.create({
14224
+ }), wu = J.create({
14225
14225
  name: "tableCell",
14226
14226
  content: "block+",
14227
14227
  tableRole: "cell",
@@ -14279,7 +14279,7 @@ const aw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14279
14279
  }
14280
14280
  },
14281
14281
  borders: {
14282
- default: () => gu(),
14282
+ default: () => mu(),
14283
14283
  renderDOM({ borders: t }) {
14284
14284
  return t ? { style: ["top", "right", "bottom", "left"].map((r) => {
14285
14285
  const o = t?.[r];
@@ -14452,7 +14452,7 @@ yt = new WeakSet(), Jt = function({ displayLabel: e } = {}) {
14452
14452
  content: o
14453
14453
  };
14454
14454
  };
14455
- function ku(t) {
14455
+ function vu(t) {
14456
14456
  let e = [];
14457
14457
  return !t.steps.length || t.meta && !Object.keys(t.meta).every((n) => ["inputType", "uiEvent", "paste"].includes(n)) || ["historyUndo", "historyRedo"].includes(t.getMeta("inputType")) || ["drop"].includes(t.getMeta("uiEvent")) || t.getMeta("fieldAnnotationUpdate") === !0 || t.steps.forEach((n, r) => {
14458
14458
  if (n instanceof $t && n.from !== n.to) {
@@ -14463,8 +14463,8 @@ function ku(t) {
14463
14463
  }
14464
14464
  }), e;
14465
14465
  }
14466
- function Cu(t, e) {
14467
- let n = ku(e);
14466
+ function ku(t, e) {
14467
+ let n = vu(e);
14468
14468
  n.length > 0 && setTimeout(() => {
14469
14469
  t.emit("fieldAnnotationDeleted", {
14470
14470
  editor: t,
@@ -14485,7 +14485,7 @@ const dw = (t = {}) => {
14485
14485
  return null;
14486
14486
  },
14487
14487
  apply(r, o) {
14488
- return Cu(e, r), o;
14488
+ return ku(e, r), o;
14489
14489
  }
14490
14490
  },
14491
14491
  props: {
@@ -14616,10 +14616,10 @@ const Kk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14616
14616
  findFieldAnnotationsBetween: co,
14617
14617
  findFieldAnnotationsByFieldId: lo,
14618
14618
  findFirstFieldAnnotationByFieldId: mw,
14619
- findRemovedFieldAnnotations: ku,
14619
+ findRemovedFieldAnnotations: vu,
14620
14620
  getAllFieldAnnotations: Rt,
14621
14621
  getAllFieldAnnotationsWithRect: fw,
14622
- trackFieldAnnotationsDeletion: Cu
14622
+ trackFieldAnnotationsDeletion: ku
14623
14623
  }, Symbol.toStringTag, { value: "Module" }));
14624
14624
  function ss(t, e, n) {
14625
14625
  return Math.min(Math.max(t, n), e);
@@ -14695,7 +14695,7 @@ function Tw(t) {
14695
14695
  };
14696
14696
  return `#${i(e)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
14697
14697
  }
14698
- const as = "annotation", Su = "annotation-content", xu = J.create({
14698
+ const as = "annotation", Cu = "annotation-content", Su = J.create({
14699
14699
  name: "fieldAnnotation",
14700
14700
  group: "inline",
14701
14701
  inline: !0,
@@ -14708,7 +14708,7 @@ const as = "annotation", Su = "annotation-content", xu = J.create({
14708
14708
  class: as
14709
14709
  },
14710
14710
  annotationClass: as,
14711
- annotationContentClass: Su,
14711
+ annotationContentClass: Cu,
14712
14712
  types: ["text", "image", "signature", "checkbox", "html", "link"],
14713
14713
  // annotation types
14714
14714
  defaultType: "text",
@@ -15221,7 +15221,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15221
15221
  }), Xk = (t, e) => {
15222
15222
  let r = Ao.getState(t)?.find(null, null, (o) => o.id === e);
15223
15223
  return r?.length ? r[0].from : null;
15224
- }, Mu = J.create({
15224
+ }, xu = J.create({
15225
15225
  name: "image",
15226
15226
  group: "inline",
15227
15227
  inline: !0,
@@ -15328,7 +15328,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15328
15328
  renderDOM({ htmlAttributes: t }) {
15329
15329
  return ["a", D.mergeAttributes(this.options.htmlAttributes, t)];
15330
15330
  }
15331
- }), Au = J.create({
15331
+ }), Mu = J.create({
15332
15332
  name: "mention",
15333
15333
  group: "inline",
15334
15334
  inline: !0,
@@ -15402,7 +15402,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15402
15402
  renderDOM({ htmlAttributes: t }) {
15403
15403
  return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
15404
15404
  }
15405
- }), Ou = Le.create({
15405
+ }), Au = Le.create({
15406
15406
  name: "textStyle",
15407
15407
  addOptions() {
15408
15408
  return {
@@ -15414,7 +15414,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15414
15414
  {
15415
15415
  tag: "span",
15416
15416
  getAttrs: (t) => {
15417
- const e = t.hasAttribute("style"), n = t.classList.contains(as) || t.classList.contains(Su);
15417
+ const e = t.hasAttribute("style"), n = t.classList.contains(as) || t.classList.contains(Cu);
15418
15418
  return !e || n ? !1 : {};
15419
15419
  }
15420
15420
  }
@@ -15431,7 +15431,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15431
15431
  }
15432
15432
  };
15433
15433
  }
15434
- }), Tu = Le.create({
15434
+ }), Ou = Le.create({
15435
15435
  name: "bold",
15436
15436
  addOptions() {
15437
15437
  return {
@@ -15463,7 +15463,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15463
15463
  "Mod-B": () => this.editor.commands.toggleBold()
15464
15464
  };
15465
15465
  }
15466
- }), Du = Le.create({
15466
+ }), Tu = Le.create({
15467
15467
  name: "italic",
15468
15468
  addOptions() {
15469
15469
  return {
@@ -15495,7 +15495,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15495
15495
  "Mod-I": () => this.editor.commands.toggleItalic()
15496
15496
  };
15497
15497
  }
15498
- }), Nu = Le.create({
15498
+ }), Du = Le.create({
15499
15499
  name: "underline",
15500
15500
  addOptions() {
15501
15501
  return {
@@ -15533,7 +15533,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15533
15533
  "Mod-U": () => this.editor.commands.toggleUnderline()
15534
15534
  };
15535
15535
  }
15536
- }), Eu = Le.create({
15536
+ }), Nu = Le.create({
15537
15537
  name: "highlight",
15538
15538
  addOptions() {
15539
15539
  return {
@@ -15571,7 +15571,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15571
15571
  "Mod-Shift-h": () => this.editor.commands.toggleHighlight()
15572
15572
  };
15573
15573
  }
15574
- }), Iu = Le.create({
15574
+ }), Eu = Le.create({
15575
15575
  name: "strike",
15576
15576
  addOptions() {
15577
15577
  return {
@@ -15600,7 +15600,7 @@ const Ao = new G("ImagePlaceholder"), Nw = (t = {}) => new Z({
15600
15600
  "Mod-Shift-s": () => this.editor.commands.toggleStrike()
15601
15601
  };
15602
15602
  }
15603
- }), Pu = Le.create({
15603
+ }), Iu = Le.create({
15604
15604
  name: "link",
15605
15605
  priority: 1e3,
15606
15606
  keepOnSplit: !1,
@@ -15659,7 +15659,7 @@ function Ml(t, e) {
15659
15659
  o && n.push(o);
15660
15660
  }), !t || t.replace(Rw, "").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`, "i"));
15661
15661
  }
15662
- const Lw = "track-insert", Ru = Le.create({
15662
+ const Lw = "track-insert", Pu = Le.create({
15663
15663
  name: $e,
15664
15664
  group: "track",
15665
15665
  inclusive: !1,
@@ -15708,7 +15708,7 @@ const Lw = "track-insert", Ru = Le.create({
15708
15708
  renderDOM({ htmlAttributes: t }) {
15709
15709
  return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
15710
15710
  }
15711
- }), Fw = "track-delete", Lu = Le.create({
15711
+ }), Fw = "track-delete", Ru = Le.create({
15712
15712
  name: ue,
15713
15713
  group: "track",
15714
15714
  inclusive: !1,
@@ -15769,18 +15769,18 @@ const Lw = "track-insert", Ru = Le.create({
15769
15769
  }, Jk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15770
15770
  __proto__: null,
15771
15771
  addMarkStep: Dd,
15772
- documentHelpers: Uy,
15772
+ documentHelpers: Wy,
15773
15773
  findTrackedMarkBetween: Ps,
15774
15774
  getTrackChanges: Ls,
15775
15775
  markDeletion: vd,
15776
15776
  markInsertion: wd,
15777
- markWrapping: ib,
15777
+ markWrapping: ob,
15778
15778
  parseFormatList: ls,
15779
15779
  removeMarkStep: Nd,
15780
- replaceAroundStep: sb,
15780
+ replaceAroundStep: ib,
15781
15781
  replaceStep: Td,
15782
15782
  trackedTransaction: Ed
15783
- }, Symbol.toStringTag, { value: "Module" })), Bw = "track-format", Fu = Le.create({
15783
+ }, Symbol.toStringTag, { value: "Module" })), Bw = "track-format", Lu = Le.create({
15784
15784
  name: Se,
15785
15785
  group: "track",
15786
15786
  inclusive: !1,
@@ -16013,7 +16013,7 @@ const Lw = "track-insert", Ru = Le.create({
16013
16013
  };
16014
16014
  },
16015
16015
  addPmPlugins() {
16016
- return [qy()];
16016
+ return [Uy()];
16017
16017
  }
16018
16018
  }), Al = (t, e) => {
16019
16019
  const n = Ls(t), r = n.findIndex(({ mark: l }) => l.attrs.id === e);
@@ -16051,9 +16051,9 @@ const Lw = "track-insert", Ru = Le.create({
16051
16051
  })];
16052
16052
  }
16053
16053
  });
16054
- 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", Vw = "reference", Ol = /* @__PURE__ */ Ir.reduce(function(t, e) {
16054
+ var Te = "top", We = "bottom", Ue = "right", De = "left", $s = "auto", Ir = [Te, We, Ue, De], Pn = "start", Cr = "end", $w = "clippingParents", Fu = "viewport", Jn = "popper", Vw = "reference", Ol = /* @__PURE__ */ Ir.reduce(function(t, e) {
16055
16055
  return t.concat([e + "-" + Pn, e + "-" + Cr]);
16056
- }, []), _u = /* @__PURE__ */ [].concat(Ir, [$s]).reduce(function(t, e) {
16056
+ }, []), Bu = /* @__PURE__ */ [].concat(Ir, [$s]).reduce(function(t, e) {
16057
16057
  return t.concat([e, e + "-" + Pn, e + "-" + Cr]);
16058
16058
  }, []), Hw = "beforeRead", jw = "read", Ww = "afterRead", Uw = "beforeMain", qw = "main", Kw = "afterMain", Xw = "beforeWrite", Jw = "write", Yw = "afterWrite", Gw = [Hw, jw, Ww, Uw, qw, Kw, Xw, Jw, Yw];
16059
16059
  function st(t) {
@@ -16116,7 +16116,7 @@ function Qw(t) {
16116
16116
  });
16117
16117
  };
16118
16118
  }
16119
- const zu = {
16119
+ const _u = {
16120
16120
  name: "applyStyles",
16121
16121
  enabled: !0,
16122
16122
  phase: "write",
@@ -16134,14 +16134,14 @@ function cs() {
16134
16134
  return e.brand + "/" + e.version;
16135
16135
  }).join(" ") : navigator.userAgent;
16136
16136
  }
16137
- function $u() {
16137
+ function zu() {
16138
16138
  return !/^((?!chrome|android).)*safari/i.test(cs());
16139
16139
  }
16140
16140
  function Ln(t, e, n) {
16141
16141
  e === void 0 && (e = !1), n === void 0 && (n = !1);
16142
16142
  var r = t.getBoundingClientRect(), o = 1, i = 1;
16143
16143
  e && je(t) && (o = t.offsetWidth > 0 && Rn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Rn(r.height) / t.offsetHeight || 1);
16144
- var s = un(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;
16144
+ var s = un(t) ? Re(t) : window, a = s.visualViewport, l = !zu() && 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;
16145
16145
  return {
16146
16146
  width: u,
16147
16147
  height: f,
@@ -16162,7 +16162,7 @@ function Hs(t) {
16162
16162
  height: r
16163
16163
  };
16164
16164
  }
16165
- function Vu(t, e) {
16165
+ function $u(t, e) {
16166
16166
  var n = e.getRootNode && e.getRootNode();
16167
16167
  if (t.contains(e))
16168
16168
  return !0;
@@ -16235,7 +16235,7 @@ function nv(t, e, n) {
16235
16235
  var r = ir(t, e, n);
16236
16236
  return r > n ? n : r;
16237
16237
  }
16238
- function Hu() {
16238
+ function Vu() {
16239
16239
  return {
16240
16240
  top: 0,
16241
16241
  right: 0,
@@ -16243,10 +16243,10 @@ function Hu() {
16243
16243
  left: 0
16244
16244
  };
16245
16245
  }
16246
- function ju(t) {
16247
- return Object.assign({}, Hu(), t);
16246
+ function Hu(t) {
16247
+ return Object.assign({}, Vu(), t);
16248
16248
  }
16249
- function Wu(t, e) {
16249
+ function ju(t, e) {
16250
16250
  return e.reduce(function(n, r) {
16251
16251
  return n[r] = t, n;
16252
16252
  }, {});
@@ -16254,7 +16254,7 @@ function Wu(t, e) {
16254
16254
  var rv = function(e, n) {
16255
16255
  return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
16256
16256
  placement: n.placement
16257
- })) : e, ju(typeof e != "number" ? e : Wu(e, Ir));
16257
+ })) : e, Hu(typeof e != "number" ? e : ju(e, Ir));
16258
16258
  };
16259
16259
  function ov(t) {
16260
16260
  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";
@@ -16265,7 +16265,7 @@ function ov(t) {
16265
16265
  }
16266
16266
  function iv(t) {
16267
16267
  var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
16268
- o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || Vu(e.elements.popper, o) && (e.elements.arrow = o));
16268
+ o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || $u(e.elements.popper, o) && (e.elements.arrow = o));
16269
16269
  }
16270
16270
  const sv = {
16271
16271
  name: "arrow",
@@ -16422,7 +16422,7 @@ function mv(t, e) {
16422
16422
  var n = Re(t), r = Wt(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
16423
16423
  if (o) {
16424
16424
  i = o.width, s = o.height;
16425
- var c = $u();
16425
+ var c = zu();
16426
16426
  (c || !c && e === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
16427
16427
  }
16428
16428
  return {
@@ -16445,13 +16445,13 @@ function qs(t) {
16445
16445
  var e = St(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
16446
16446
  return /auto|scroll|overlay|hidden/.test(n + o + r);
16447
16447
  }
16448
- function Uu(t) {
16449
- return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && qs(t) ? t : Uu(zo(t));
16448
+ function Wu(t) {
16449
+ return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && qs(t) ? t : Wu(zo(t));
16450
16450
  }
16451
16451
  function sr(t, e) {
16452
16452
  var n;
16453
16453
  e === void 0 && (e = []);
16454
- 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);
16454
+ var r = Wu(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);
16455
16455
  return o ? a : (
16456
16456
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
16457
16457
  a.concat(sr(zo(s)))
@@ -16470,12 +16470,12 @@ function yv(t, e) {
16470
16470
  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;
16471
16471
  }
16472
16472
  function El(t, e, n) {
16473
- return e === Bu ? ds(mv(t, n)) : un(e) ? yv(e, n) : ds(gv(Wt(t)));
16473
+ return e === Fu ? ds(mv(t, n)) : un(e) ? yv(e, n) : ds(gv(Wt(t)));
16474
16474
  }
16475
16475
  function bv(t) {
16476
16476
  var e = sr(zo(t)), n = ["absolute", "fixed"].indexOf(St(t).position) >= 0, r = n && je(t) ? Pr(t) : t;
16477
16477
  return un(r) ? e.filter(function(o) {
16478
- return un(o) && Vu(o, r) && st(o) !== "body";
16478
+ return un(o) && $u(o, r) && st(o) !== "body";
16479
16479
  }) : [];
16480
16480
  }
16481
16481
  function wv(t, e, n, r) {
@@ -16485,7 +16485,7 @@ function wv(t, e, n, r) {
16485
16485
  }, El(t, s, r));
16486
16486
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
16487
16487
  }
16488
- function qu(t) {
16488
+ function Uu(t) {
16489
16489
  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;
16490
16490
  switch (o) {
16491
16491
  case Te:
@@ -16534,7 +16534,7 @@ function qu(t) {
16534
16534
  }
16535
16535
  function Sr(t, e) {
16536
16536
  e === void 0 && (e = {});
16537
- 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 ? Vw : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = wv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Ln(t.elements.reference), M = qu({
16537
+ 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 ? Fu : 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 = Hu(typeof g != "number" ? g : ju(g, Ir)), w = f === Jn ? Vw : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = wv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Ln(t.elements.reference), M = Uu({
16538
16538
  reference: k,
16539
16539
  element: C,
16540
16540
  placement: o
@@ -16555,7 +16555,7 @@ function Sr(t, e) {
16555
16555
  }
16556
16556
  function vv(t, e) {
16557
16557
  e === void 0 && (e = {});
16558
- 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) {
16558
+ 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 ? Bu : l, d = Fn(r), u = d ? a ? Ol : Ol.filter(function(h) {
16559
16559
  return Fn(h) === d;
16560
16560
  }) : Ir, f = u.filter(function(h) {
16561
16561
  return c.indexOf(h) >= 0;
@@ -16689,7 +16689,7 @@ function Av(t, e, n) {
16689
16689
  };
16690
16690
  }
16691
16691
  function Ov(t) {
16692
- var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = _u.reduce(function(d, u) {
16692
+ var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = Bu.reduce(function(d, u) {
16693
16693
  return d[u] = Av(u, e.rects, i), d;
16694
16694
  }, {}), a = s[e.placement], l = a.x, c = a.y;
16695
16695
  e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
@@ -16703,7 +16703,7 @@ const Tv = {
16703
16703
  };
16704
16704
  function Dv(t) {
16705
16705
  var e = t.state, n = t.name;
16706
- e.modifiersData[n] = qu({
16706
+ e.modifiersData[n] = Uu({
16707
16707
  reference: e.rects.reference,
16708
16708
  element: e.rects.popper,
16709
16709
  placement: e.placement
@@ -16742,7 +16742,7 @@ function Iv(t) {
16742
16742
  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 ? M[ae] : L[ae], Fe = w === Pn ? -L[ae] : -M[ae], ct = e.elements.arrow, qe = p && ct ? Hs(ct) : {
16743
16743
  width: 0,
16744
16744
  height: 0
16745
- }, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Ke = Ne[se], Mt = Ne[ce], dt = ir(0, M[ae], qe[ae]), fn = C ? M[ae] / 2 - ke - dt - Ke - z.mainAxis : lt - dt - Ke - z.mainAxis, At = C ? -M[ae] / 2 + ke + dt + Mt + z.mainAxis : Fe + dt + Mt + z.mainAxis, pn = e.elements.arrow && Pr(e.elements.arrow), Lr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, Hn = (j = _?.[y]) != null ? j : 0, Fr = ee + fn - Hn - Lr, Br = ee + At - Hn, jn = ir(p ? Oo(ne, Fr) : ne, ee, p ? sn(ve, Br) : ve);
16745
+ }, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Vu(), Ke = Ne[se], Mt = Ne[ce], dt = ir(0, M[ae], qe[ae]), fn = C ? M[ae] / 2 - ke - dt - Ke - z.mainAxis : lt - dt - Ke - z.mainAxis, At = C ? -M[ae] / 2 + ke + dt + Mt + z.mainAxis : Fe + dt + Mt + z.mainAxis, pn = e.elements.arrow && Pr(e.elements.arrow), Lr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, Hn = (j = _?.[y]) != null ? j : 0, Fr = ee + fn - Hn - Lr, Br = ee + At - Hn, jn = ir(p ? Oo(ne, Fr) : ne, ee, p ? sn(ve, Br) : ve);
16746
16746
  k[y] = jn, V[y] = jn - ee;
16747
16747
  }
16748
16748
  if (a) {
@@ -16949,12 +16949,12 @@ function Hv(t) {
16949
16949
  return p;
16950
16950
  };
16951
16951
  }
16952
- var jv = [fv, Nv, dv, zu, Tv, Sv, Pv, sv, Mv], Wv = /* @__PURE__ */ Hv({
16952
+ var jv = [fv, Nv, dv, _u, Tv, Sv, Pv, sv, Mv], Wv = /* @__PURE__ */ Hv({
16953
16953
  defaultModifiers: jv
16954
- }), Uv = "tippy-box", Ku = "tippy-content", qv = "tippy-backdrop", Xu = "tippy-arrow", Ju = "tippy-svg-arrow", Yt = {
16954
+ }), Uv = "tippy-box", qu = "tippy-content", qv = "tippy-backdrop", Ku = "tippy-arrow", Xu = "tippy-svg-arrow", Yt = {
16955
16955
  passive: !0,
16956
16956
  capture: !0
16957
- }, Yu = function() {
16957
+ }, Ju = function() {
16958
16958
  return document.body;
16959
16959
  };
16960
16960
  function Kv(t, e) {
@@ -16971,7 +16971,7 @@ function Ks(t, e) {
16971
16971
  var n = {}.toString.call(t);
16972
16972
  return n.indexOf("[object") === 0 && n.indexOf(e + "]") > -1;
16973
16973
  }
16974
- function Gu(t, e) {
16974
+ function Yu(t, e) {
16975
16975
  return typeof t == "function" ? t.apply(void 0, e) : t;
16976
16976
  }
16977
16977
  function Fl(t, e) {
@@ -17078,11 +17078,11 @@ var tt = {
17078
17078
  isTouch: !1
17079
17079
  }, Vl = 0;
17080
17080
  function ok() {
17081
- tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", Zu));
17081
+ tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", Gu));
17082
17082
  }
17083
- function Zu() {
17083
+ function Gu() {
17084
17084
  var t = performance.now();
17085
- t - Vl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", Zu)), Vl = t;
17085
+ t - Vl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", Gu)), Vl = t;
17086
17086
  }
17087
17087
  function ik() {
17088
17088
  var t = document.activeElement;
@@ -17115,7 +17115,7 @@ function ck(t) {
17115
17115
  %c👷‍ This is a development-only message. It will be removed in production.
17116
17116
  `);
17117
17117
  }
17118
- function Qu(t) {
17118
+ function Zu(t) {
17119
17119
  return [
17120
17120
  ck(t),
17121
17121
  // title
@@ -17134,20 +17134,20 @@ function dk() {
17134
17134
  function gt(t, e) {
17135
17135
  if (t && !Mr.has(e)) {
17136
17136
  var n;
17137
- Mr.add(e), (n = console).warn.apply(n, Qu(e));
17137
+ Mr.add(e), (n = console).warn.apply(n, Zu(e));
17138
17138
  }
17139
17139
  }
17140
17140
  function us(t, e) {
17141
17141
  if (t && !Mr.has(e)) {
17142
17142
  var n;
17143
- Mr.add(e), (n = console).error.apply(n, Qu(e));
17143
+ Mr.add(e), (n = console).error.apply(n, Zu(e));
17144
17144
  }
17145
17145
  }
17146
17146
  function uk(t) {
17147
17147
  var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
17148
17148
  us(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), us(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
17149
17149
  }
17150
- var ef = {
17150
+ var Qu = {
17151
17151
  animateFill: !1,
17152
17152
  followCursor: !1,
17153
17153
  inlinePositioning: !1,
@@ -17163,7 +17163,7 @@ var ef = {
17163
17163
  theme: "",
17164
17164
  zIndex: 9999
17165
17165
  }, Ie = Object.assign({
17166
- appendTo: Yu,
17166
+ appendTo: Ju,
17167
17167
  aria: {
17168
17168
  content: "auto",
17169
17169
  expanded: "auto"
@@ -17210,14 +17210,14 @@ var ef = {
17210
17210
  touch: !0,
17211
17211
  trigger: "mouseenter focus",
17212
17212
  triggerTarget: null
17213
- }, ef, fk), pk = Object.keys(Ie), hk = function(e) {
17214
- ie.env.NODE_ENV !== "production" && nf(e, []);
17213
+ }, Qu, fk), pk = Object.keys(Ie), hk = function(e) {
17214
+ ie.env.NODE_ENV !== "production" && tf(e, []);
17215
17215
  var n = Object.keys(e);
17216
17216
  n.forEach(function(r) {
17217
17217
  Ie[r] = e[r];
17218
17218
  });
17219
17219
  };
17220
- function tf(t) {
17220
+ function ef(t) {
17221
17221
  var e = t.plugins || [], n = e.reduce(function(r, o) {
17222
17222
  var i = o.name, s = o.defaultValue;
17223
17223
  if (i) {
@@ -17229,7 +17229,7 @@ function tf(t) {
17229
17229
  return Object.assign({}, t, n);
17230
17230
  }
17231
17231
  function mk(t, e) {
17232
- var n = e ? Object.keys(tf(Object.assign({}, Ie, {
17232
+ var n = e ? Object.keys(ef(Object.assign({}, Ie, {
17233
17233
  plugins: e
17234
17234
  }))) : pk, r = n.reduce(function(o, i) {
17235
17235
  var s = (t.getAttribute("data-tippy-" + i) || "").trim();
@@ -17249,18 +17249,18 @@ function mk(t, e) {
17249
17249
  }
17250
17250
  function jl(t, e) {
17251
17251
  var n = Object.assign({}, e, {
17252
- content: Gu(e.content, [t])
17252
+ content: Yu(e.content, [t])
17253
17253
  }, e.ignoreAttributes ? {} : mk(t, e.plugins));
17254
17254
  return n.aria = Object.assign({}, Ie.aria, n.aria), n.aria = {
17255
17255
  expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
17256
17256
  content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
17257
17257
  }, n;
17258
17258
  }
17259
- function nf(t, e) {
17259
+ function tf(t, e) {
17260
17260
  t === void 0 && (t = {}), e === void 0 && (e = []);
17261
17261
  var n = Object.keys(t);
17262
17262
  n.forEach(function(r) {
17263
- var o = Xv(Ie, Object.keys(ef)), i = !Kv(o, r);
17263
+ var o = Xv(Ie, Object.keys(Qu)), i = !Kv(o, r);
17264
17264
  i && (i = e.filter(function(s) {
17265
17265
  return s.name === r;
17266
17266
  }).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
@@ -17277,7 +17277,7 @@ function fs(t, e) {
17277
17277
  }
17278
17278
  function Wl(t) {
17279
17279
  var e = ar();
17280
- return t === !0 ? e.className = Xu : (e.className = Ju, xr(t) ? e.appendChild(t) : fs(e, t)), e;
17280
+ return t === !0 ? e.className = Ku : (e.className = Xu, xr(t) ? e.appendChild(t) : fs(e, t)), e;
17281
17281
  }
17282
17282
  function Ul(t, e) {
17283
17283
  xr(e.content) ? (fs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? fs(t, e.content) : t.textContent = e.content);
@@ -17287,21 +17287,21 @@ function ps(t) {
17287
17287
  return {
17288
17288
  box: e,
17289
17289
  content: n.find(function(r) {
17290
- return r.classList.contains(Ku);
17290
+ return r.classList.contains(qu);
17291
17291
  }),
17292
17292
  arrow: n.find(function(r) {
17293
- return r.classList.contains(Xu) || r.classList.contains(Ju);
17293
+ return r.classList.contains(Ku) || r.classList.contains(Xu);
17294
17294
  }),
17295
17295
  backdrop: n.find(function(r) {
17296
17296
  return r.classList.contains(qv);
17297
17297
  })
17298
17298
  };
17299
17299
  }
17300
- function rf(t) {
17300
+ function nf(t) {
17301
17301
  var e = ar(), n = ar();
17302
17302
  n.className = Uv, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
17303
17303
  var r = ar();
17304
- r.className = Ku, r.setAttribute("data-state", "hidden"), Ul(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17304
+ r.className = qu, r.setAttribute("data-state", "hidden"), Ul(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17305
17305
  function o(i, s) {
17306
17306
  var a = ps(e), l = a.box, c = a.content, d = a.arrow;
17307
17307
  s.theme ? l.setAttribute("data-theme", s.theme) : l.removeAttribute("data-theme"), typeof s.animation == "string" ? l.setAttribute("data-animation", s.animation) : l.removeAttribute("data-animation"), s.inertia ? l.setAttribute("data-inertia", "") : l.removeAttribute("data-inertia"), l.style.maxWidth = typeof s.maxWidth == "number" ? s.maxWidth + "px" : s.maxWidth, s.role ? l.setAttribute("role", s.role) : l.removeAttribute("role"), (i.content !== s.content || i.allowHTML !== s.allowHTML) && Ul(c, t.props), s.arrow ? d ? i.arrow !== s.arrow && (l.removeChild(d), l.appendChild(Wl(s.arrow))) : l.appendChild(Wl(s.arrow)) : d && l.removeChild(d);
@@ -17311,10 +17311,10 @@ function rf(t) {
17311
17311
  onUpdate: o
17312
17312
  };
17313
17313
  }
17314
- rf.$$tippy = !0;
17314
+ nf.$$tippy = !0;
17315
17315
  var yk = 1, eo = [], hi = [];
17316
17316
  function bk(t, e) {
17317
- var n = jl(t, Object.assign({}, Ie, tf(_l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Fl(Fr, n.interactiveDebounce), m, g = yk++, b = null, w = Yv(n.plugins), C = {
17317
+ var n = jl(t, Object.assign({}, Ie, ef(_l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Fl(Fr, n.interactiveDebounce), m, g = yk++, b = null, w = Yv(n.plugins), C = {
17318
17318
  // Is the instance currently enabled?
17319
17319
  isEnabled: !0,
17320
17320
  // Is the tippy currently showing and not transitioning out?
@@ -17338,13 +17338,13 @@ function bk(t, e) {
17338
17338
  clearDelayTimeouts: Vr,
17339
17339
  setProps: Hr,
17340
17340
  setContent: jr,
17341
- show: of,
17342
- hide: sf,
17343
- hideWithInteractivity: af,
17341
+ show: rf,
17342
+ hide: of,
17343
+ hideWithInteractivity: sf,
17344
17344
  enable: qn,
17345
17345
  disable: $r,
17346
- unmount: lf,
17347
- destroy: cf
17346
+ unmount: af,
17347
+ destroy: lf
17348
17348
  };
17349
17349
  if (!n.render)
17350
17350
  return ie.env.NODE_ENV !== "production" && us(!0, "render() function has not been supplied."), y;
@@ -17559,7 +17559,7 @@ function bk(t, e) {
17559
17559
  fn: function(Wr) {
17560
17560
  var mn = Wr.state;
17561
17561
  if (V()) {
17562
- var df = ce(), Vo = df.box;
17562
+ var cf = ce(), Vo = cf.box;
17563
17563
  ["placement", "reference-hidden", "escaped"].forEach(function(Ur) {
17564
17564
  Ur === "placement" ? Vo.setAttribute("data-placement", mn.placement) : mn.attributes.popper["data-popper-" + Ur] ? Vo.setAttribute("data-" + Ur, "") : Vo.removeAttribute("data-" + Ur);
17565
17565
  }), mn.attributes.popper = {};
@@ -17608,7 +17608,7 @@ function bk(t, e) {
17608
17608
  }
17609
17609
  function ut() {
17610
17610
  var v = y.props.appendTo, A, R = j();
17611
- y.props.interactive && v === Yu || v === "parent" ? A = R.parentNode : A = Gu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0, _r(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
17611
+ y.props.interactive && v === Ju || v === "parent" ? A = R.parentNode : A = Yu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0, _r(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
17612
17612
 
17613
17613
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
17614
17614
 
@@ -17667,7 +17667,7 @@ function bk(t, e) {
17667
17667
  content: v
17668
17668
  });
17669
17669
  }
17670
- function of() {
17670
+ function rf() {
17671
17671
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("show"));
17672
17672
  var v = y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q = tt.isTouch && !y.props.touch, U = ui(y.props.duration, 0, Ie.duration);
17673
17673
  if (!(v || A || R || q) && !j().hasAttribute("disabled") && (ne("onShow", [y], !1), y.props.onShow(y) !== !1)) {
@@ -17689,7 +17689,7 @@ function bk(t, e) {
17689
17689
  }, ut();
17690
17690
  }
17691
17691
  }
17692
- function sf() {
17692
+ function of() {
17693
17693
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hide"));
17694
17694
  var v = !y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q = ui(y.props.duration, 1, Ie.duration);
17695
17695
  if (!(v || A || R) && (ne("onHide", [y], !1), y.props.onHide(y) !== !1)) {
@@ -17700,24 +17700,24 @@ function bk(t, e) {
17700
17700
  ve(), ke(), y.props.animation ? V() && Mt(q, y.unmount) : y.unmount();
17701
17701
  }
17702
17702
  }
17703
- function af(v) {
17703
+ function sf(v) {
17704
17704
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hideWithInteractivity")), se().addEventListener("mousemove", h), Bl(eo, h), h(v);
17705
17705
  }
17706
- function lf() {
17706
+ function af() {
17707
17707
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (zr(), Ot().forEach(function(v) {
17708
17708
  v._tippy.unmount();
17709
17709
  }), k.parentNode && k.parentNode.removeChild(k), hi = hi.filter(function(v) {
17710
17710
  return v !== y;
17711
17711
  }), y.state.isMounted = !1, ne("onHidden", [y]));
17712
17712
  }
17713
- function cf() {
17713
+ function lf() {
17714
17714
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Lr(), delete t._tippy, y.state.isDestroyed = !0, ne("onDestroy", [y]));
17715
17715
  }
17716
17716
  }
17717
17717
  function Rr(t, e) {
17718
17718
  e === void 0 && (e = {});
17719
17719
  var n = Ie.plugins.concat(e.plugins || []);
17720
- ie.env.NODE_ENV !== "production" && (uk(t), nf(e, n)), sk();
17720
+ ie.env.NODE_ENV !== "production" && (uk(t), tf(e, n)), sk();
17721
17721
  var r = Object.assign({}, e, {
17722
17722
  plugins: n
17723
17723
  }), o = tk(t);
@@ -17739,7 +17739,7 @@ function Rr(t, e) {
17739
17739
  Rr.defaultProps = Ie;
17740
17740
  Rr.setDefaultProps = hk;
17741
17741
  Rr.currentInput = tt;
17742
- Object.assign({}, zu, {
17742
+ Object.assign({}, _u, {
17743
17743
  effect: function(e) {
17744
17744
  var n = e.state, r = {
17745
17745
  popper: {
@@ -17757,7 +17757,7 @@ Object.assign({}, zu, {
17757
17757
  }
17758
17758
  });
17759
17759
  Rr.setDefaultProps({
17760
- render: rf
17760
+ render: nf
17761
17761
  });
17762
17762
  const wk = (t, e) => {
17763
17763
  const n = t.__vccOpts || t;
@@ -17781,7 +17781,7 @@ const wk = (t, e) => {
17781
17781
  }
17782
17782
  },
17783
17783
  setup(t) {
17784
- const e = t, n = Qs(null), r = Qs(null), o = Af(() => {
17784
+ const e = t, n = Qs(null), r = Qs(null), o = Mf(() => {
17785
17785
  const l = e.mention.slice(1)?.toLowerCase();
17786
17786
  return e.users.filter((d) => {
17787
17787
  const u = d.role === "viewer", f = d.name?.toLowerCase().startsWith(l), p = d.email?.toLowerCase().startsWith(l);
@@ -17809,18 +17809,18 @@ const wk = (t, e) => {
17809
17809
  onFocus: Ko(a, ["stop", "prevent"]),
17810
17810
  tabindex: "0"
17811
17811
  }, [
17812
- (Xt(!0), Kt(Of, null, Tf(o.value, (d, u) => (Xt(), Kt("div", {
17812
+ (Xt(!0), Kt(Af, null, Of(o.value, (d, u) => (Xt(), Kt("div", {
17813
17813
  onClick: Ko((f) => i(d), ["stop", "prevent"]),
17814
17814
  onMouseenter: (f) => r.value = u,
17815
17815
  onMouseleave: c[0] || (c[0] = (f) => r.value = null),
17816
17816
  key: d.email,
17817
- class: Df(["user-row", { selected: r.value === u }])
17817
+ class: Tf(["user-row", { selected: r.value === u }])
17818
17818
  }, [
17819
17819
  d.name ? (Xt(), Kt("div", kk, [
17820
17820
  d.name ? (Xt(), Kt("span", Ck, Xo(d.name), 1)) : ea("", !0),
17821
17821
  d.name && d.email ? (Xt(), Kt("span", Sk, " (" + Xo(d.email) + ")", 1)) : ea("", !0)
17822
17822
  ])) : (Xt(), Kt("div", xk, [
17823
- Nf("span", null, Xo(d.email), 1)
17823
+ Df("span", null, Xo(d.email), 1)
17824
17824
  ]))
17825
17825
  ], 42, vk))), 128))
17826
17826
  ], 544));
@@ -17879,7 +17879,7 @@ class Tk {
17879
17879
  this.view.dom.removeEventListener("keydown", this.handleKeyDown);
17880
17880
  }
17881
17881
  mountVueComponent(e, n = {}) {
17882
- this.app && this.app.unmount(), this.app = Ef(e, n), this.app.mount(this.popover), this.tippyInstance.setContent(this.popover);
17882
+ this.app && this.app.unmount(), this.app = Nf(e, n), this.app.mount(this.popover), this.tippyInstance.setContent(this.popover);
17883
17883
  }
17884
17884
  update(e, n) {
17885
17885
  this.state = e.state;
@@ -18031,7 +18031,7 @@ const Dk = !1, Nk = Q.create({
18031
18031
  if (!e.converter) return F.empty;
18032
18032
  const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
18033
18033
  if (!o || !i) return F.empty;
18034
- const s = [kb, on], { state: a } = t, l = no.create({
18034
+ const s = [vb, on], { state: a } = t, l = no.create({
18035
18035
  schema: a.schema,
18036
18036
  doc: a.doc,
18037
18037
  plugins: a.plugins.filter((h) => s.includes(h.key))
@@ -18153,93 +18153,92 @@ const Xl = (t) => {
18153
18153
  e.setMeta("forceUpdatePagination", !0), t.view.dispatch(e);
18154
18154
  });
18155
18155
  }, Lk = () => [
18156
- Tu,
18156
+ Ou,
18157
18157
  Yd,
18158
18158
  $d,
18159
18159
  Xd,
18160
18160
  Vd,
18161
18161
  Hd,
18162
- jf,
18162
+ Hf,
18163
18163
  ru,
18164
- Du,
18164
+ Tu,
18165
18165
  tu,
18166
18166
  Ud,
18167
- Pu,
18167
+ Iu,
18168
18168
  Zd,
18169
18169
  nu,
18170
18170
  ou,
18171
- iu,
18172
- Iu,
18171
+ Eu,
18173
18172
  Jd,
18174
18173
  jd,
18175
18174
  Wd,
18176
- Ou,
18177
- Nu,
18175
+ Au,
18176
+ Du,
18178
18177
  zw,
18179
18178
  Ok,
18180
- Au,
18181
- Eu,
18179
+ Mu,
18180
+ Nu,
18182
18181
  qd,
18183
- yu,
18184
- wu,
18185
- vu,
18182
+ gu,
18186
18183
  bu,
18187
- xu,
18184
+ wu,
18185
+ yu,
18186
+ Su,
18188
18187
  Kd,
18188
+ Pu,
18189
18189
  Ru,
18190
18190
  Lu,
18191
- Fu,
18192
- Mu
18191
+ xu
18193
18192
  ], Fk = () => [
18194
- Tu,
18193
+ Ou,
18195
18194
  Yd,
18196
18195
  $d,
18196
+ e0,
18197
18197
  t0,
18198
18198
  n0,
18199
- r0,
18200
18199
  Xd,
18201
18200
  Vd,
18202
18201
  Hd,
18203
18202
  // History,
18204
18203
  ru,
18205
- Du,
18204
+ Tu,
18206
18205
  tu,
18207
18206
  Ud,
18208
- Pu,
18207
+ Iu,
18209
18208
  Zd,
18210
18209
  nu,
18210
+ a0,
18211
18211
  ou,
18212
- iu,
18213
- Db,
18214
- Iu,
18215
- i0,
18212
+ Tb,
18213
+ Eu,
18214
+ o0,
18216
18215
  Jd,
18217
18216
  jd,
18218
18217
  Wd,
18219
- Ou,
18220
- Nu,
18218
+ Au,
18219
+ Du,
18221
18220
  qd,
18222
- Qy,
18223
- vb,
18224
- yu,
18225
- wu,
18226
- vu,
18221
+ Zy,
18222
+ wb,
18223
+ gu,
18227
18224
  bu,
18228
- xu,
18225
+ wu,
18226
+ yu,
18227
+ Su,
18229
18228
  Kd,
18230
- Mu,
18229
+ xu,
18231
18230
  Ew,
18232
- Au,
18233
- Cb,
18234
- Ob,
18231
+ Mu,
18232
+ kb,
18233
+ Ab,
18235
18234
  _w,
18235
+ Pu,
18236
18236
  Ru,
18237
18237
  Lu,
18238
- Fu,
18239
- o0,
18238
+ r0,
18240
18239
  Nk,
18241
- Eu,
18242
- Xb,
18240
+ Nu,
18241
+ Kb,
18243
18242
  Iw,
18244
18243
  Pw
18245
18244
  ];
@@ -18253,9 +18252,9 @@ export {
18253
18252
  de as T,
18254
18253
  wk as _,
18255
18254
  Uk as a,
18256
- Yb as b,
18255
+ Jb as b,
18257
18256
  He as c,
18258
- If as d,
18257
+ Ef as d,
18259
18258
  Fk as e,
18260
18259
  Xk as f,
18261
18260
  Go as g,