@harbour-enterprises/superdoc 0.9.24 → 0.9.26
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.
- package/dist/chunks/{index-DjLrg1eZ.es.js → index-8ZIOYegI.es.js} +2 -2
- package/dist/chunks/{index-BXKGjuVW.cjs → index-C4-w9MLl.cjs} +1 -1
- package/dist/chunks/{index-CqRwYOdx.cjs → index-ChNh-3hE.cjs} +1 -1
- package/dist/chunks/{index-dZKHAFXF.es.js → index-DlBXCtmW.es.js} +1 -1
- package/dist/chunks/{super-editor.es-dH2QglKu.cjs → super-editor.es-BmgYyGKY.cjs} +48 -48
- package/dist/chunks/{super-editor.es-C8w4J5jx.es.js → super-editor.es-Bz5G8OfN.es.js} +945 -943
- package/dist/chunks/{url-BxDGAI6E.es.js → url-B0oWkmAx.es.js} +1 -1
- package/dist/chunks/{url-6Xu7gR4T.cjs → url-CzUL97Mg.cjs} +1 -1
- package/dist/chunks/{xml-js-BAML2_fM.es.js → xml-js-DLnxZypp.es.js} +303 -296
- package/dist/chunks/xml-js-zfoNze4t.cjs +10 -0
- package/dist/style.css +1 -1
- package/dist/super-editor/chunks/{converter-Cwp-Sia4.js → converter-DEtWG6G4.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CnOgTDAX.js → docx-zipper-D9FasgZg.js} +1 -1
- package/dist/super-editor/chunks/{editor-D1IioTBl.js → editor-CahjULDe.js} +446 -444
- package/dist/super-editor/chunks/{toolbar-CTkdGAwV.js → toolbar-BVR5rTW2.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/commands/splitListItem.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/list-item/helpers/styledListMarkerPlugin.d.ts.map +1 -1
- package/dist/super-editor/extensions/ordered-list/helpers/orderedListMarkerPlugin.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +450 -448
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-zhwNEV5e.cjs +0 -10
|
@@ -7,9 +7,9 @@ var P = (t, e, n) => ff(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n)
|
|
|
7
7
|
var Qe = (t, e, n) => (Ho(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? Gs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), jo = (t, e, n, r) => (Ho(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), I = (t, e, n) => (Ho(t, e, "access private method"), n);
|
|
8
8
|
import * as T from "yjs";
|
|
9
9
|
import { UndoManager as pf, Item as hf, ContentType as mf, Text as gf, XmlElement as yf } from "yjs";
|
|
10
|
-
import { P as G, a as Z, M as
|
|
10
|
+
import { P as G, a as Z, M as cr, N as B, S as J, T as V, b as H, D as $n, F as E, c as An, d as bf, e as Jl, A as Ar, p as ie, B as wf, f as Yl, i as vf, g as wt, l as Or, h as jt, j as Gl, r as Zl, R as an, o as dr, k as Vt, m as bi, n as Ql, q as ue, s as Ve, v as Do, t as kn, u as kf, w as xe, x as to, y as ec, z as Cn, C as Wo, E as Uo, G as qo, H as no, I as Cf, J as Zs, K as Sf, L as xf } from "./converter-DEtWG6G4.js";
|
|
11
11
|
import { ref as Qs, computed as Mf, createElementBlock as Xt, openBlock as Jt, 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-
|
|
12
|
+
import { D as ta } from "./docx-zipper-D9FasgZg.js";
|
|
13
13
|
function No(t) {
|
|
14
14
|
const { from: e, to: n, empty: r } = t.selection, o = [];
|
|
15
15
|
return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
|
|
@@ -212,7 +212,7 @@ class Ye {
|
|
|
212
212
|
return c > Ff && (a = Lf(a, c), s -= c), new Ye(a.append(i), s);
|
|
213
213
|
}
|
|
214
214
|
remapping(e, n) {
|
|
215
|
-
let r = new
|
|
215
|
+
let r = new cr();
|
|
216
216
|
return this.items.forEach((o, i) => {
|
|
217
217
|
let s = o.mirrorOffset != null && i - o.mirrorOffset >= e ? r.maps.length - o.mirrorOffset : void 0;
|
|
218
218
|
r.appendMap(o.map, s);
|
|
@@ -481,7 +481,7 @@ const Hf = Q.create({
|
|
|
481
481
|
for (var e = 0; ; e++)
|
|
482
482
|
if (t = t.previousSibling, !t)
|
|
483
483
|
return e;
|
|
484
|
-
},
|
|
484
|
+
}, Tn = function(t) {
|
|
485
485
|
let e = t.assignedSlot || t.parentNode;
|
|
486
486
|
return e && e.nodeType == 11 ? e.host : e;
|
|
487
487
|
};
|
|
@@ -500,7 +500,7 @@ function ia(t, e, n, r, o) {
|
|
|
500
500
|
return !0;
|
|
501
501
|
if (e == (o < 0 ? 0 : $e(t))) {
|
|
502
502
|
let i = t.parentNode;
|
|
503
|
-
if (!i || i.nodeType != 1 ||
|
|
503
|
+
if (!i || i.nodeType != 1 || Tr(t) || Wf.test(t.nodeName) || t.contentEditable == "false")
|
|
504
504
|
return !1;
|
|
505
505
|
e = ge(t) + (o < 0 ? 0 : 1), t = i;
|
|
506
506
|
} else if (t.nodeType == 1) {
|
|
@@ -522,7 +522,7 @@ function Uf(t, e) {
|
|
|
522
522
|
if (t.contentEditable == "false")
|
|
523
523
|
return null;
|
|
524
524
|
t = t.childNodes[e - 1], e = $e(t);
|
|
525
|
-
} else if (t.parentNode && !
|
|
525
|
+
} else if (t.parentNode && !Tr(t))
|
|
526
526
|
e = ge(t), t = t.parentNode;
|
|
527
527
|
else
|
|
528
528
|
return null;
|
|
@@ -536,7 +536,7 @@ function qf(t, e) {
|
|
|
536
536
|
if (t.contentEditable == "false")
|
|
537
537
|
return null;
|
|
538
538
|
t = t.childNodes[e], e = 0;
|
|
539
|
-
} else if (t.parentNode && !
|
|
539
|
+
} else if (t.parentNode && !Tr(t))
|
|
540
540
|
e = ge(t) + 1, t = t.parentNode;
|
|
541
541
|
else
|
|
542
542
|
return null;
|
|
@@ -552,7 +552,7 @@ function Kf(t, e, n) {
|
|
|
552
552
|
r = r && i == 0, o = o && i == $e(t);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Tr(t) {
|
|
556
556
|
let e;
|
|
557
557
|
for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode)
|
|
558
558
|
;
|
|
@@ -587,7 +587,7 @@ function Jf(t, e, n) {
|
|
|
587
587
|
}
|
|
588
588
|
const st = typeof navigator < "u" ? navigator : null, sa = typeof document < "u" ? document : null, Wt = st && st.userAgent || "", vi = /Edge\/(\d+)/.exec(Wt), ic = /MSIE \d/.exec(Wt), ki = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt), Te = !!(ic || ki || vi), Ft = ic ? document.documentMode : ki ? +ki[1] : vi ? +vi[1] : 0, Ge = !Te && /gecko\/(\d+)/i.test(Wt);
|
|
589
589
|
Ge && +(/Firefox\/(\d+)/.exec(Wt) || [0, 0])[1];
|
|
590
|
-
const Ci = !Te && /Chrome\/(\d+)/.exec(Wt), we = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Te && !!st && /Apple Computer/.test(st.vendor),
|
|
590
|
+
const Ci = !Te && /Chrome\/(\d+)/.exec(Wt), we = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Te && !!st && /Apple Computer/.test(st.vendor), Dn = Me && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), ze = Dn || (st ? /Mac/.test(st.platform) : !1), Yf = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt), Dr = !!sa && "webkitFontSmoothing" in sa.documentElement.style, Gf = Dr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
591
591
|
function Zf(t) {
|
|
592
592
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
593
593
|
return e ? {
|
|
@@ -618,7 +618,7 @@ function aa(t, e, n) {
|
|
|
618
618
|
let r = t.someProp("scrollThreshold") || 0, o = t.someProp("scrollMargin") || 5, i = t.dom.ownerDocument;
|
|
619
619
|
for (let s = n || t.dom; s; ) {
|
|
620
620
|
if (s.nodeType != 1) {
|
|
621
|
-
s =
|
|
621
|
+
s = Tn(s);
|
|
622
622
|
continue;
|
|
623
623
|
}
|
|
624
624
|
let a = s, l = a == i.body, c = l ? Zf(i) : Qf(a), d = 0, u = 0;
|
|
@@ -634,7 +634,7 @@ function aa(t, e, n) {
|
|
|
634
634
|
let f = l ? "fixed" : getComputedStyle(s).position;
|
|
635
635
|
if (/^(fixed|sticky)$/.test(f))
|
|
636
636
|
break;
|
|
637
|
-
s = f == "absolute" ? s.offsetParent :
|
|
637
|
+
s = f == "absolute" ? s.offsetParent : Tn(s);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
function ep(t) {
|
|
@@ -653,7 +653,7 @@ function ep(t) {
|
|
|
653
653
|
}
|
|
654
654
|
function ac(t) {
|
|
655
655
|
let e = [], n = t.ownerDocument;
|
|
656
|
-
for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r =
|
|
656
|
+
for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r = Tn(r))
|
|
657
657
|
;
|
|
658
658
|
return e;
|
|
659
659
|
}
|
|
@@ -774,7 +774,7 @@ function ap(t, e) {
|
|
|
774
774
|
return null;
|
|
775
775
|
}
|
|
776
776
|
if (Me)
|
|
777
|
-
for (let c = s; r && c; c =
|
|
777
|
+
for (let c = s; r && c; c = Tn(c))
|
|
778
778
|
c.draggable && (r = void 0);
|
|
779
779
|
if (s = op(s, e), r) {
|
|
780
780
|
if (Ge && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
|
|
@@ -782,7 +782,7 @@ function ap(t, e) {
|
|
|
782
782
|
d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
|
|
783
783
|
}
|
|
784
784
|
let c;
|
|
785
|
-
|
|
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
787
|
a == null && (a = ip(t, s, e));
|
|
788
788
|
let l = t.docView.nearestDesc(s, !0);
|
|
@@ -802,7 +802,7 @@ function Dt(t, e) {
|
|
|
802
802
|
}
|
|
803
803
|
const lp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
804
804
|
function uc(t, e, n) {
|
|
805
|
-
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s =
|
|
805
|
+
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Dr || Ge;
|
|
806
806
|
if (r.nodeType == 3)
|
|
807
807
|
if (s && (lp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
|
|
808
808
|
let l = Dt(mt(r, o, o), n);
|
|
@@ -811,13 +811,13 @@ function uc(t, e, n) {
|
|
|
811
811
|
if (c.top == l.top) {
|
|
812
812
|
let d = Dt(mt(r, o, o + 1), -1);
|
|
813
813
|
if (d.top != l.top)
|
|
814
|
-
return
|
|
814
|
+
return Kn(d, d.left < c.left);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
return l;
|
|
818
818
|
} else {
|
|
819
819
|
let l = o, c = o, d = n < 0 ? 1 : -1;
|
|
820
|
-
return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++,
|
|
820
|
+
return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, Kn(Dt(mt(r, l, c), d), d < 0);
|
|
821
821
|
}
|
|
822
822
|
if (!t.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
|
|
823
823
|
if (i == null && o && (n < 0 || o == $e(r))) {
|
|
@@ -835,7 +835,7 @@ function uc(t, e, n) {
|
|
|
835
835
|
if (i == null && o && (n < 0 || o == $e(r))) {
|
|
836
836
|
let l = r.childNodes[o - 1], c = l.nodeType == 3 ? mt(l, $e(l) - (s ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
837
837
|
if (c)
|
|
838
|
-
return
|
|
838
|
+
return Kn(Dt(c, 1), !1);
|
|
839
839
|
}
|
|
840
840
|
if (i == null && o < $e(r)) {
|
|
841
841
|
let l = r.childNodes[o];
|
|
@@ -843,11 +843,11 @@ function uc(t, e, n) {
|
|
|
843
843
|
l = l.nextSibling;
|
|
844
844
|
let c = l ? l.nodeType == 3 ? mt(l, 0, s ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
845
845
|
if (c)
|
|
846
|
-
return
|
|
846
|
+
return Kn(Dt(c, -1), !0);
|
|
847
847
|
}
|
|
848
|
-
return
|
|
848
|
+
return Kn(Dt(r.nodeType == 3 ? mt(r) : r, -n), n >= 0);
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Kn(t, e) {
|
|
851
851
|
if (t.width == 0)
|
|
852
852
|
return t;
|
|
853
853
|
let n = e ? t.left : t.right;
|
|
@@ -922,7 +922,7 @@ function fp(t, e, n) {
|
|
|
922
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 He = 0, fa = 1, Qt = 2, at = 3;
|
|
925
|
-
class
|
|
925
|
+
class Nr {
|
|
926
926
|
constructor(e, n, r, o) {
|
|
927
927
|
this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = He, r.pmViewDesc = this;
|
|
928
928
|
}
|
|
@@ -1263,7 +1263,7 @@ class Dr {
|
|
|
1263
1263
|
return !1;
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
class pc extends
|
|
1266
|
+
class pc extends Nr {
|
|
1267
1267
|
constructor(e, n, r, o) {
|
|
1268
1268
|
let i, s = n.type.toDOM;
|
|
1269
1269
|
if (typeof s == "function" && (s = s(r, () => {
|
|
@@ -1303,7 +1303,7 @@ class pc extends Dr {
|
|
|
1303
1303
|
return this.widget.type.side;
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
|
-
class pp extends
|
|
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
|
}
|
|
@@ -1320,13 +1320,13 @@ class pp extends Dr {
|
|
|
1320
1320
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
class cn extends
|
|
1323
|
+
class cn extends Nr {
|
|
1324
1324
|
constructor(e, n, r, o, i) {
|
|
1325
1325
|
super(e, [], r, o), this.mark = n, this.spec = i;
|
|
1326
1326
|
}
|
|
1327
1327
|
static create(e, n, r, o) {
|
|
1328
1328
|
let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
|
|
1329
|
-
return (!s || !s.dom) && (s =
|
|
1329
|
+
return (!s || !s.dom) && (s = $n.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new cn(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
1330
1330
|
}
|
|
1331
1331
|
parseRule() {
|
|
1332
1332
|
return this.dirty & at || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -1356,7 +1356,7 @@ class cn extends Dr {
|
|
|
1356
1356
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
class Bt extends
|
|
1359
|
+
class Bt extends Nr {
|
|
1360
1360
|
constructor(e, n, r, o, i, s, a, l, c) {
|
|
1361
1361
|
super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = a;
|
|
1362
1362
|
}
|
|
@@ -1381,7 +1381,7 @@ class Bt extends Dr {
|
|
|
1381
1381
|
d = document.createTextNode(n.text);
|
|
1382
1382
|
else if (d.nodeType != 3)
|
|
1383
1383
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
1384
|
-
} else d || ({ dom: d, contentDOM: u } =
|
|
1384
|
+
} else d || ({ dom: d, contentDOM: u } = $n.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
1385
1385
|
!u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
|
|
1386
1386
|
let f = d;
|
|
1387
1387
|
return d = yc(d, r, n), c ? l = new 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 Bt(e, n, r, o, d, u || null, f, i, s + 1);
|
|
@@ -1427,7 +1427,7 @@ class Bt extends Dr {
|
|
|
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 == Qt) && (s && this.protectLocalComposition(e, s), mc(this.contentDOM, this.children, e),
|
|
1430
|
+
}), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Qt) && (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;
|
|
@@ -1530,7 +1530,7 @@ class Po extends Bt {
|
|
|
1530
1530
|
return this.node.text == e;
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
|
-
class hc extends
|
|
1533
|
+
class hc extends Nr {
|
|
1534
1534
|
parseRule() {
|
|
1535
1535
|
return { ignore: !0 };
|
|
1536
1536
|
}
|
|
@@ -1597,22 +1597,22 @@ function mc(t, e, n) {
|
|
|
1597
1597
|
r = ha(r), o = !0;
|
|
1598
1598
|
o && n.trackWrites == t && (n.trackWrites = null);
|
|
1599
1599
|
}
|
|
1600
|
-
const
|
|
1600
|
+
const er = function(t) {
|
|
1601
1601
|
t && (this.nodeName = t);
|
|
1602
1602
|
};
|
|
1603
|
-
|
|
1604
|
-
const en = [new
|
|
1603
|
+
er.prototype = /* @__PURE__ */ Object.create(null);
|
|
1604
|
+
const en = [new er()];
|
|
1605
1605
|
function Si(t, e, n) {
|
|
1606
1606
|
if (t.length == 0)
|
|
1607
1607
|
return en;
|
|
1608
|
-
let r = n ? en[0] : new
|
|
1608
|
+
let r = n ? en[0] : new er(), o = [r];
|
|
1609
1609
|
for (let i = 0; i < t.length; i++) {
|
|
1610
1610
|
let s = t[i].type.attrs;
|
|
1611
1611
|
if (s) {
|
|
1612
|
-
s.nodeName && o.push(r = new
|
|
1612
|
+
s.nodeName && o.push(r = new er(s.nodeName));
|
|
1613
1613
|
for (let a in s) {
|
|
1614
1614
|
let l = s[a];
|
|
1615
|
-
l != null && (n && o.length == 1 && o.push(r = new
|
|
1615
|
+
l != null && (n && o.length == 1 && o.push(r = new er(e.isInline ? "span" : "div")), a == "class" ? r.class = (r.class ? r.class + " " : "") + l : a == "style" ? r.style = (r.style ? r.style + ";" : "") + l : a != "nodeName" && (r[a] = l));
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
@@ -2085,7 +2085,7 @@ function va(t, e, n) {
|
|
|
2085
2085
|
if (!i || i.isText)
|
|
2086
2086
|
return !1;
|
|
2087
2087
|
let a = e < 0 ? o.pos - i.nodeSize : o.pos;
|
|
2088
|
-
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Et(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) :
|
|
2088
|
+
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Et(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Dr ? Et(t, new V(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
|
|
2089
2089
|
}
|
|
2090
2090
|
} else return !1;
|
|
2091
2091
|
else {
|
|
@@ -2100,7 +2100,7 @@ function va(t, e, n) {
|
|
|
2100
2100
|
function ho(t) {
|
|
2101
2101
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function tr(t, e) {
|
|
2104
2104
|
let n = t.pmViewDesc;
|
|
2105
2105
|
return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
2106
2106
|
}
|
|
@@ -2112,13 +2112,13 @@ function Mp(t) {
|
|
|
2112
2112
|
if (!n)
|
|
2113
2113
|
return;
|
|
2114
2114
|
let o, i, s = !1;
|
|
2115
|
-
for (Ge && n.nodeType == 1 && r < ho(n) &&
|
|
2115
|
+
for (Ge && n.nodeType == 1 && r < ho(n) && tr(n.childNodes[r], -1) && (s = !0); ; )
|
|
2116
2116
|
if (r > 0) {
|
|
2117
2117
|
if (n.nodeType != 1)
|
|
2118
2118
|
break;
|
|
2119
2119
|
{
|
|
2120
2120
|
let a = n.childNodes[r - 1];
|
|
2121
|
-
if (
|
|
2121
|
+
if (tr(a, -1))
|
|
2122
2122
|
o = n, i = --r;
|
|
2123
2123
|
else if (a.nodeType == 3)
|
|
2124
2124
|
n = a, r = n.nodeValue.length;
|
|
@@ -2130,7 +2130,7 @@ function Mp(t) {
|
|
|
2130
2130
|
break;
|
|
2131
2131
|
{
|
|
2132
2132
|
let a = n.previousSibling;
|
|
2133
|
-
for (; a &&
|
|
2133
|
+
for (; a && tr(a, -1); )
|
|
2134
2134
|
o = n.parentNode, i = ge(a), a = a.previousSibling;
|
|
2135
2135
|
if (a)
|
|
2136
2136
|
n = a, r = ho(n);
|
|
@@ -2153,7 +2153,7 @@ function Ap(t) {
|
|
|
2153
2153
|
if (n.nodeType != 1)
|
|
2154
2154
|
break;
|
|
2155
2155
|
let a = n.childNodes[r];
|
|
2156
|
-
if (
|
|
2156
|
+
if (tr(a, 1))
|
|
2157
2157
|
i = n, s = ++r;
|
|
2158
2158
|
else
|
|
2159
2159
|
break;
|
|
@@ -2162,7 +2162,7 @@ function Ap(t) {
|
|
|
2162
2162
|
break;
|
|
2163
2163
|
{
|
|
2164
2164
|
let a = n.nextSibling;
|
|
2165
|
-
for (; a &&
|
|
2165
|
+
for (; a && tr(a, 1); )
|
|
2166
2166
|
i = a.parentNode, s = ge(a) + 1, a = a.nextSibling;
|
|
2167
2167
|
if (a)
|
|
2168
2168
|
n = a, r = 0, o = ho(n);
|
|
@@ -2180,7 +2180,7 @@ function kc(t) {
|
|
|
2180
2180
|
return e && e.node && e.node.isBlock;
|
|
2181
2181
|
}
|
|
2182
2182
|
function Op(t, e) {
|
|
2183
|
-
for (; t && e == t.childNodes.length && !
|
|
2183
|
+
for (; t && e == t.childNodes.length && !Tr(t); )
|
|
2184
2184
|
e = ge(t) + 1, t = t.parentNode;
|
|
2185
2185
|
for (; t && e < t.childNodes.length; ) {
|
|
2186
2186
|
let n = t.childNodes[e];
|
|
@@ -2192,7 +2192,7 @@ function Op(t, e) {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
}
|
|
2194
2194
|
function Tp(t, e) {
|
|
2195
|
-
for (; t && !e && !
|
|
2195
|
+
for (; t && !e && !Tr(t); )
|
|
2196
2196
|
e = ge(t), t = t.parentNode;
|
|
2197
2197
|
for (; t && e; ) {
|
|
2198
2198
|
let n = t.childNodes[e - 1];
|
|
@@ -2249,7 +2249,7 @@ function Ca(t, e, n) {
|
|
|
2249
2249
|
return Et(t, s);
|
|
2250
2250
|
}
|
|
2251
2251
|
if (!o.parent.inlineContent) {
|
|
2252
|
-
let s = e < 0 ? o : i, a = r instanceof
|
|
2252
|
+
let s = e < 0 ? o : i, a = r instanceof Ar ? J.near(s, e) : J.findFrom(s, e);
|
|
2253
2253
|
return a ? Et(t, a) : !1;
|
|
2254
2254
|
}
|
|
2255
2255
|
return !1;
|
|
@@ -2322,7 +2322,7 @@ function ws(t, e) {
|
|
|
2322
2322
|
let p = r.firstChild;
|
|
2323
2323
|
n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), r = p.content;
|
|
2324
2324
|
}
|
|
2325
|
-
let s = t.someProp("clipboardSerializer") ||
|
|
2325
|
+
let s = t.someProp("clipboardSerializer") || $n.fromSchema(t.state.schema), a = Oc(), l = a.createElement("div");
|
|
2326
2326
|
l.appendChild(s.serializeFragment(r, { document: a }));
|
|
2327
2327
|
let c = l.firstChild, d, u = 0;
|
|
2328
2328
|
for (; c && c.nodeType == 1 && (d = Ac[c.nodeName.toLowerCase()]); ) {
|
|
@@ -2355,7 +2355,7 @@ function Cc(t, e, n, r, o) {
|
|
|
2355
2355
|
if (u)
|
|
2356
2356
|
a = u;
|
|
2357
2357
|
else {
|
|
2358
|
-
let f = o.marks(), { schema: p } = t.state, h =
|
|
2358
|
+
let f = o.marks(), { schema: p } = t.state, h = $n.fromSchema(p);
|
|
2359
2359
|
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
2360
2360
|
let g = s.appendChild(document.createElement("p"));
|
|
2361
2361
|
m && g.appendChild(h.serializeNode(p.text(m, f)));
|
|
@@ -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 = Lp(n),
|
|
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--) {
|
|
@@ -2375,7 +2375,7 @@ function Cc(t, e, n, r, o) {
|
|
|
2375
2375
|
break;
|
|
2376
2376
|
s = f;
|
|
2377
2377
|
}
|
|
2378
|
-
if (a || (a = (t.someProp("clipboardParser") || t.someProp("domParser") ||
|
|
2378
|
+
if (a || (a = (t.someProp("clipboardParser") || t.someProp("domParser") || An.fromSchema(t.state.schema)).parseSlice(s, {
|
|
2379
2379
|
preserveWhitespace: !!(l || d),
|
|
2380
2380
|
context: o,
|
|
2381
2381
|
ruleFromNode(f) {
|
|
@@ -2552,7 +2552,7 @@ function jp(t, e) {
|
|
|
2552
2552
|
Oe.keydown = (t, e) => {
|
|
2553
2553
|
let n = e;
|
|
2554
2554
|
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Dc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(bt && we && n.keyCode == 13)))
|
|
2555
|
-
if (n.keyCode != 229 && t.domObserver.forceFlush(),
|
|
2555
|
+
if (n.keyCode != 229 && t.domObserver.forceFlush(), Dn && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
2556
2556
|
let r = Date.now();
|
|
2557
2557
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
2558
2558
|
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, Zt(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
@@ -2592,7 +2592,7 @@ function ks(t, e, n, r, o) {
|
|
|
2592
2592
|
return !0;
|
|
2593
2593
|
return !1;
|
|
2594
2594
|
}
|
|
2595
|
-
function
|
|
2595
|
+
function On(t, e, n) {
|
|
2596
2596
|
if (t.focused || t.focus(), t.state.selection.eq(e))
|
|
2597
2597
|
return;
|
|
2598
2598
|
let r = t.state.tr.setSelection(e);
|
|
@@ -2602,7 +2602,7 @@ 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
|
-
return r && r.isAtom && B.isSelectable(r) ? (
|
|
2605
|
+
return r && r.isAtom && B.isSelectable(r) ? (On(t, new B(n)), !0) : !1;
|
|
2606
2606
|
}
|
|
2607
2607
|
function qp(t, e) {
|
|
2608
2608
|
if (e == -1)
|
|
@@ -2617,7 +2617,7 @@ function qp(t, e) {
|
|
|
2617
2617
|
break;
|
|
2618
2618
|
}
|
|
2619
2619
|
}
|
|
2620
|
-
return o != null ? (
|
|
2620
|
+
return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
|
|
2621
2621
|
}
|
|
2622
2622
|
function Kp(t, e, n, r, o) {
|
|
2623
2623
|
return ks(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? qp(t, n) : Up(t, n));
|
|
@@ -2633,14 +2633,14 @@ function Yp(t, e, n) {
|
|
|
2633
2633
|
return !1;
|
|
2634
2634
|
let r = t.state.doc;
|
|
2635
2635
|
if (e == -1)
|
|
2636
|
-
return r.inlineContent ? (
|
|
2636
|
+
return r.inlineContent ? (On(t, V.create(r, 0, r.content.size)), !0) : !1;
|
|
2637
2637
|
let o = r.resolve(e);
|
|
2638
2638
|
for (let i = o.depth + 1; i > 0; i--) {
|
|
2639
2639
|
let s = i > o.depth ? o.nodeAfter : o.node(i), a = o.before(i);
|
|
2640
2640
|
if (s.inlineContent)
|
|
2641
|
-
|
|
2641
|
+
On(t, V.create(r, a + 1, a + 1 + s.content.size));
|
|
2642
2642
|
else if (B.isSelectable(s))
|
|
2643
|
-
|
|
2643
|
+
On(t, B.create(r, a));
|
|
2644
2644
|
else
|
|
2645
2645
|
continue;
|
|
2646
2646
|
return !0;
|
|
@@ -2695,7 +2695,7 @@ class Gp {
|
|
|
2695
2695
|
// (hidden) cursor is doesn't change the selection, and
|
|
2696
2696
|
// thus doesn't get a reaction from ProseMirror. This
|
|
2697
2697
|
// works around that.
|
|
2698
|
-
we && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (
|
|
2698
|
+
we && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (On(this.view, J.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : Rt(this.view, "pointer");
|
|
2699
2699
|
}
|
|
2700
2700
|
move(e) {
|
|
2701
2701
|
this.updateAllowDefault(e), Rt(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -2791,12 +2791,12 @@ function th(t, e) {
|
|
|
2791
2791
|
n.parentNode && n.parentNode.removeChild(n), t.focus();
|
|
2792
2792
|
}, 50);
|
|
2793
2793
|
}
|
|
2794
|
-
const
|
|
2794
|
+
const ur = Te && Ft < 15 || Dn && Gf < 604;
|
|
2795
2795
|
Ae.copy = Oe.cut = (t, e) => {
|
|
2796
2796
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
2797
2797
|
if (r.empty)
|
|
2798
2798
|
return;
|
|
2799
|
-
let i =
|
|
2799
|
+
let i = ur ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = ws(t, s);
|
|
2800
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
2802
|
function nh(t) {
|
|
@@ -2809,10 +2809,10 @@ function rh(t, e) {
|
|
|
2809
2809
|
n || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
|
|
2810
2810
|
let o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
2811
2811
|
setTimeout(() => {
|
|
2812
|
-
t.focus(), r.parentNode && r.parentNode.removeChild(r), n ?
|
|
2812
|
+
t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? fr(t, r.value, null, o, e) : fr(t, r.textContent, r.innerHTML, o, e);
|
|
2813
2813
|
}, 50);
|
|
2814
2814
|
}
|
|
2815
|
-
function
|
|
2815
|
+
function fr(t, e, n, r, o) {
|
|
2816
2816
|
let i = Cc(t, e, n, r, t.state.selection.$from);
|
|
2817
2817
|
if (t.someProp("handlePaste", (l) => l(t, o, i || H.empty)))
|
|
2818
2818
|
return !0;
|
|
@@ -2832,8 +2832,8 @@ Oe.paste = (t, e) => {
|
|
|
2832
2832
|
let n = e;
|
|
2833
2833
|
if (t.composing && !bt)
|
|
2834
2834
|
return;
|
|
2835
|
-
let r =
|
|
2836
|
-
r &&
|
|
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() : rh(t, n);
|
|
2837
2837
|
};
|
|
2838
2838
|
class Pc {
|
|
2839
2839
|
constructor(e, n, r) {
|
|
@@ -2859,7 +2859,7 @@ Ae.dragstart = (t, e) => {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
let a = (s || t.state.selection).content(), { dom: l, text: c, slice: d } = ws(t, a);
|
|
2862
|
-
(!n.dataTransfer.files.length || !we || sc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(
|
|
2862
|
+
(!n.dataTransfer.files.length || !we || sc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(ur ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", ur || n.dataTransfer.setData("text/plain", c), t.dragging = new Pc(d, Rc(t, n), s);
|
|
2863
2863
|
};
|
|
2864
2864
|
Ae.dragend = (t) => {
|
|
2865
2865
|
let e = t.dragging;
|
|
@@ -2878,7 +2878,7 @@ Oe.drop = (t, e) => {
|
|
|
2878
2878
|
let i = t.state.doc.resolve(o.pos), s = r && r.slice;
|
|
2879
2879
|
s ? t.someProp("transformPasted", (h) => {
|
|
2880
2880
|
s = h(s, t);
|
|
2881
|
-
}) : s = Cc(t, Ic(n.dataTransfer),
|
|
2881
|
+
}) : s = Cc(t, Ic(n.dataTransfer), ur ? null : n.dataTransfer.getData("text/html"), !1, i);
|
|
2882
2882
|
let a = !!(r && Rc(t, n));
|
|
2883
2883
|
if (t.someProp("handleDrop", (h) => h(t, n, s || H.empty, a))) {
|
|
2884
2884
|
n.preventDefault();
|
|
@@ -2929,7 +2929,7 @@ Ae.beforeinput = (t, e) => {
|
|
|
2929
2929
|
};
|
|
2930
2930
|
for (let t in Oe)
|
|
2931
2931
|
Ae[t] = Oe[t];
|
|
2932
|
-
function
|
|
2932
|
+
function pr(t, e) {
|
|
2933
2933
|
if (t == e)
|
|
2934
2934
|
return !0;
|
|
2935
2935
|
for (let n in t)
|
|
@@ -2952,7 +2952,7 @@ class go {
|
|
|
2952
2952
|
return !0;
|
|
2953
2953
|
}
|
|
2954
2954
|
eq(e) {
|
|
2955
|
-
return this == e || e instanceof go && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM &&
|
|
2955
|
+
return this == e || e instanceof go && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && pr(this.spec, e.spec));
|
|
2956
2956
|
}
|
|
2957
2957
|
destroy(e) {
|
|
2958
2958
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -2970,7 +2970,7 @@ class _t {
|
|
|
2970
2970
|
return n.from < n.to;
|
|
2971
2971
|
}
|
|
2972
2972
|
eq(e) {
|
|
2973
|
-
return this == e || e instanceof _t &&
|
|
2973
|
+
return this == e || e instanceof _t && pr(this.attrs, e.attrs) && pr(this.spec, e.spec);
|
|
2974
2974
|
}
|
|
2975
2975
|
static is(e) {
|
|
2976
2976
|
return e.type instanceof _t;
|
|
@@ -2994,7 +2994,7 @@ class Ss {
|
|
|
2994
2994
|
return o == n.from && !(i = e.child(r)).isText && o + i.nodeSize == n.to;
|
|
2995
2995
|
}
|
|
2996
2996
|
eq(e) {
|
|
2997
|
-
return this == e || e instanceof Ss &&
|
|
2997
|
+
return this == e || e instanceof Ss && pr(this.attrs, e.attrs) && pr(this.spec, e.spec);
|
|
2998
2998
|
}
|
|
2999
2999
|
destroy() {
|
|
3000
3000
|
}
|
|
@@ -3070,13 +3070,13 @@ class z {
|
|
|
3070
3070
|
return this.type instanceof go;
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
|
-
const
|
|
3073
|
+
const Sn = [], nn = {};
|
|
3074
3074
|
class F {
|
|
3075
3075
|
/**
|
|
3076
3076
|
@internal
|
|
3077
3077
|
*/
|
|
3078
3078
|
constructor(e, n) {
|
|
3079
|
-
this.local = e.length ? e :
|
|
3079
|
+
this.local = e.length ? e : Sn, this.children = n.length ? n : Sn;
|
|
3080
3080
|
}
|
|
3081
3081
|
/**
|
|
3082
3082
|
Create a set of decorations, using the structure of the given
|
|
@@ -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 ? ih(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(rn),
|
|
3128
|
+
return this.children.length ? ih(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(rn), Sn) : be;
|
|
3129
3129
|
}
|
|
3130
3130
|
/**
|
|
3131
3131
|
Add the given array of decorations to the ones in the set,
|
|
@@ -3198,7 +3198,7 @@ class F {
|
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
3200
|
if (o) {
|
|
3201
|
-
let a = new F(o.sort(rn),
|
|
3201
|
+
let a = new F(o.sort(rn), Sn);
|
|
3202
3202
|
return r ? new It([a, r]) : a;
|
|
3203
3203
|
}
|
|
3204
3204
|
return r || be;
|
|
@@ -3230,7 +3230,7 @@ class F {
|
|
|
3230
3230
|
*/
|
|
3231
3231
|
localsInner(e) {
|
|
3232
3232
|
if (this == be)
|
|
3233
|
-
return
|
|
3233
|
+
return Sn;
|
|
3234
3234
|
if (e.inlineContent || !this.local.some(_t.is))
|
|
3235
3235
|
return this.local;
|
|
3236
3236
|
let n = [];
|
|
@@ -3284,7 +3284,7 @@ class It {
|
|
|
3284
3284
|
n.push(i[s]);
|
|
3285
3285
|
}
|
|
3286
3286
|
}
|
|
3287
|
-
return n ? xs(r ? n : n.sort(rn)) :
|
|
3287
|
+
return n ? xs(r ? n : n.sort(rn)) : Sn;
|
|
3288
3288
|
}
|
|
3289
3289
|
// Create a group for the given array of decoration sets, or return
|
|
3290
3290
|
// a single set when possible.
|
|
@@ -3520,9 +3520,9 @@ class dh {
|
|
|
3520
3520
|
if (!e.focusNode)
|
|
3521
3521
|
return !0;
|
|
3522
3522
|
let n = /* @__PURE__ */ new Set(), r;
|
|
3523
|
-
for (let i = e.focusNode; i; i =
|
|
3523
|
+
for (let i = e.focusNode; i; i = Tn(i))
|
|
3524
3524
|
n.add(i);
|
|
3525
|
-
for (let i = e.anchorNode; i; i =
|
|
3525
|
+
for (let i = e.anchorNode; i; i = Tn(i))
|
|
3526
3526
|
if (n.has(i)) {
|
|
3527
3527
|
r = i;
|
|
3528
3528
|
break;
|
|
@@ -3645,7 +3645,7 @@ function hh(t, e, n) {
|
|
|
3645
3645
|
if (!w || w.size)
|
|
3646
3646
|
break;
|
|
3647
3647
|
}
|
|
3648
|
-
let u = t.state.doc, f = t.someProp("domParser") ||
|
|
3648
|
+
let u = t.state.doc, f = t.someProp("domParser") || An.fromSchema(t.state.schema), p = u.resolve(s), h = null, m = f.parse(r, {
|
|
3649
3649
|
topNode: p.parent,
|
|
3650
3650
|
topMatch: p.parent.contentMatchAt(p.index()),
|
|
3651
3651
|
topOpen: !0,
|
|
@@ -3694,7 +3694,7 @@ function yh(t, e, n, r, o) {
|
|
|
3694
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
3696
|
let h = vh(u.content, c.doc.content, c.from, f, p);
|
|
3697
|
-
if (h && t.input.domChangeCount++, (
|
|
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, Zt(13, "Enter")))) {
|
|
3698
3698
|
t.input.lastIOSEnter = 0;
|
|
3699
3699
|
return;
|
|
3700
3700
|
}
|
|
@@ -3713,7 +3713,7 @@ function yh(t, e, n, r, o) {
|
|
|
3713
3713
|
}
|
|
3714
3714
|
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof V && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Te && Ft <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == " " && (h.start--, h.endA--, h.endB--);
|
|
3715
3715
|
let m = c.doc.resolveNoCache(h.start - c.from), g = c.doc.resolveNoCache(h.endB - c.from), b = d.resolve(h.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= h.endA, C;
|
|
3716
|
-
if ((
|
|
3716
|
+
if ((Dn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((x) => x.nodeName == "DIV" || x.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = J.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (x) => x(t, Zt(13, "Enter")))) {
|
|
3717
3717
|
t.input.lastIOSEnter = 0;
|
|
3718
3718
|
return;
|
|
3719
3719
|
}
|
|
@@ -4099,13 +4099,13 @@ class _c {
|
|
|
4099
4099
|
[`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
|
|
4100
4100
|
*/
|
|
4101
4101
|
pasteHTML(e, n) {
|
|
4102
|
-
return
|
|
4102
|
+
return fr(this, "", e, !1, n || new ClipboardEvent("paste"));
|
|
4103
4103
|
}
|
|
4104
4104
|
/**
|
|
4105
4105
|
Run the editor's paste logic with the given plain-text input.
|
|
4106
4106
|
*/
|
|
4107
4107
|
pasteText(e, n) {
|
|
4108
|
-
return
|
|
4108
|
+
return fr(this, e, null, !0, n || new ClipboardEvent("paste"));
|
|
4109
4109
|
}
|
|
4110
4110
|
/**
|
|
4111
4111
|
Serialize the given slice as it would be if it was copied from
|
|
@@ -4211,16 +4211,16 @@ function Ba(t) {
|
|
|
4211
4211
|
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
4212
4212
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
4213
4213
|
}
|
|
4214
|
-
const
|
|
4214
|
+
const hr = Math.floor, Sh = Math.abs, zt = (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} */
|
|
4218
4218
|
e.codePointAt(o);
|
|
4219
4219
|
return r;
|
|
4220
|
-
},
|
|
4220
|
+
}, gr = (
|
|
4221
4221
|
/** @type {TextEncoder} */
|
|
4222
4222
|
typeof TextEncoder < "u" ? new TextEncoder() : null
|
|
4223
|
-
), Bh = (t) =>
|
|
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
4226
|
class zh {
|
|
@@ -4246,41 +4246,41 @@ const $h = () => new zh(), Vh = (t) => {
|
|
|
4246
4246
|
return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
|
|
4247
4247
|
}, Wh = (t, e) => {
|
|
4248
4248
|
const n = t.cbuf.length;
|
|
4249
|
-
n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(
|
|
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
|
}, he = (t, e) => {
|
|
4251
4251
|
const n = t.cbuf.length;
|
|
4252
4252
|
t.cpos === n && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(n * 2), t.cpos = 0), t.cbuf[t.cpos++] = e;
|
|
4253
|
-
},
|
|
4254
|
-
for (; e >
|
|
4255
|
-
he(t,
|
|
4256
|
-
he(t,
|
|
4253
|
+
}, yr = (t, e) => {
|
|
4254
|
+
for (; e > nr; )
|
|
4255
|
+
he(t, mr | nr & e), e = hr(e / 128);
|
|
4256
|
+
he(t, nr & e);
|
|
4257
4257
|
}, Uh = (t, e) => {
|
|
4258
4258
|
const n = xh(e);
|
|
4259
|
-
for (n && (e = -e), he(t, (e > _a ?
|
|
4260
|
-
he(t, (e >
|
|
4259
|
+
for (n && (e = -e), he(t, (e > _a ? mr : 0) | (n ? Mh : 0) | _a & e), e = hr(e / 64); e > 0; )
|
|
4260
|
+
he(t, (e > nr ? mr : 0) | nr & e), e = hr(e / 128);
|
|
4261
4261
|
}, Di = new Uint8Array(3e4), qh = Di.length / 3, Kh = (t, e) => {
|
|
4262
4262
|
if (e.length < qh) {
|
|
4263
|
-
const n =
|
|
4264
|
-
|
|
4263
|
+
const n = gr.encodeInto(e, Di).written || 0;
|
|
4264
|
+
yr(t, n);
|
|
4265
4265
|
for (let r = 0; r < n; r++)
|
|
4266
4266
|
he(t, Di[r]);
|
|
4267
4267
|
} else
|
|
4268
4268
|
zc(t, _h(e));
|
|
4269
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++)
|
|
4273
4273
|
he(
|
|
4274
4274
|
t,
|
|
4275
4275
|
/** @type {number} */
|
|
4276
4276
|
n.codePointAt(o)
|
|
4277
4277
|
);
|
|
4278
|
-
}, $a =
|
|
4279
|
-
|
|
4278
|
+
}, $a = gr && /** @type {any} */
|
|
4279
|
+
gr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
4280
4280
|
const n = t.cbuf.length, r = t.cpos, o = zt(n - r, e.length), i = e.length - o;
|
|
4281
|
-
t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(
|
|
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
|
-
|
|
4283
|
+
yr(t, e.byteLength), Jh(t, e);
|
|
4284
4284
|
}, Ms = (t, e) => {
|
|
4285
4285
|
Wh(t, e);
|
|
4286
4286
|
const n = new DataView(t.cbuf.buffer, t.cpos, e);
|
|
@@ -4303,7 +4303,7 @@ mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
|
4303
4303
|
if (e === null)
|
|
4304
4304
|
he(t, 126);
|
|
4305
4305
|
else if (Nh(e)) {
|
|
4306
|
-
he(t, 117),
|
|
4306
|
+
he(t, 117), yr(t, e.length);
|
|
4307
4307
|
for (let n = 0; n < e.length; n++)
|
|
4308
4308
|
Ni(t, e[n]);
|
|
4309
4309
|
} else if (e instanceof Uint8Array)
|
|
@@ -4311,7 +4311,7 @@ mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
|
4311
4311
|
else {
|
|
4312
4312
|
he(t, 118);
|
|
4313
4313
|
const n = Object.keys(e);
|
|
4314
|
-
|
|
4314
|
+
yr(t, n.length);
|
|
4315
4315
|
for (let r = 0; r < n.length; r++) {
|
|
4316
4316
|
const o = n[r];
|
|
4317
4317
|
$a(t, o), Ni(t, e[o]);
|
|
@@ -4359,7 +4359,7 @@ mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
|
4359
4359
|
remove: t.length - n - r,
|
|
4360
4360
|
insert: e.slice(n, e.length - r)
|
|
4361
4361
|
};
|
|
4362
|
-
}, lm = am, te = new G("y-sync"), $t = new G("y-undo"),
|
|
4362
|
+
}, lm = am, te = new G("y-sync"), $t = 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
4363
|
class um {
|
|
4364
4364
|
constructor() {
|
|
4365
4365
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -4383,11 +4383,11 @@ try {
|
|
|
4383
4383
|
typeof localStorage < "u" && localStorage && (jc = localStorage, fm = !1);
|
|
4384
4384
|
} catch {
|
|
4385
4385
|
}
|
|
4386
|
-
const pm = jc,
|
|
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 et;
|
|
4388
4388
|
const hm = () => {
|
|
4389
4389
|
if (et === void 0)
|
|
4390
|
-
if (
|
|
4390
|
+
if (En) {
|
|
4391
4391
|
et = oo();
|
|
4392
4392
|
const t = ie.argv;
|
|
4393
4393
|
let e = null;
|
|
@@ -4403,11 +4403,11 @@ const hm = () => {
|
|
|
4403
4403
|
}
|
|
4404
4404
|
})) : et = oo();
|
|
4405
4405
|
return et;
|
|
4406
|
-
}, Ei = (t) => hm().has(t), Ii = (t) => Ha(
|
|
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 mm =
|
|
4408
|
+
const mm = En && rm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
4409
4409
|
mm || !Ei("--no-colors") && // @todo deprecate --no-colors
|
|
4410
|
-
!Uc("no-color") && (!
|
|
4410
|
+
!Uc("no-color") && (!En || ie.stdout.isTTY) && (!En || Ei("--color") || Ii("COLORTERM") !== null || (Ii("TERM") || "").includes("color"));
|
|
4411
4411
|
const gm = (
|
|
4412
4412
|
/** @type {Document} */
|
|
4413
4413
|
typeof document < "u" ? document : {}
|
|
@@ -4526,7 +4526,7 @@ class Mm {
|
|
|
4526
4526
|
if (n % 64 !== 0) {
|
|
4527
4527
|
for (this._W.fill(0, s, 16); n < e.length; )
|
|
4528
4528
|
this._W[s] |= e[n] << (3 - n % 4) * 8, n++;
|
|
4529
|
-
this._W[s] |=
|
|
4529
|
+
this._W[s] |= mr << (3 - n % 4) * 8;
|
|
4530
4530
|
}
|
|
4531
4531
|
this._updateHash();
|
|
4532
4532
|
}
|
|
@@ -4536,7 +4536,7 @@ class Mm {
|
|
|
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)] |=
|
|
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++)
|
|
@@ -4656,14 +4656,14 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Rm = [{ light: "
|
|
|
4656
4656
|
}, Bm = (t, e, n) => {
|
|
4657
4657
|
if (e !== null && e.anchor !== null && e.head !== null)
|
|
4658
4658
|
if (e.type === "all")
|
|
4659
|
-
t.setSelection(new
|
|
4659
|
+
t.setSelection(new Ar(t.doc));
|
|
4660
4660
|
else {
|
|
4661
|
-
const r =
|
|
4661
|
+
const r = wr(
|
|
4662
4662
|
n.doc,
|
|
4663
4663
|
n.type,
|
|
4664
4664
|
e.anchor,
|
|
4665
4665
|
n.mapping
|
|
4666
|
-
), o =
|
|
4666
|
+
), o = wr(
|
|
4667
4667
|
n.doc,
|
|
4668
4668
|
n.type,
|
|
4669
4669
|
e.head,
|
|
@@ -4735,7 +4735,7 @@ class _m {
|
|
|
4735
4735
|
unrenderSnapshot() {
|
|
4736
4736
|
this.mapping.clear(), this.mux(() => {
|
|
4737
4737
|
const e = this.type.toArray().map(
|
|
4738
|
-
(r) =>
|
|
4738
|
+
(r) => rr(
|
|
4739
4739
|
/** @type {Y.XmlElement} */
|
|
4740
4740
|
r,
|
|
4741
4741
|
this.prosemirrorView.state.schema,
|
|
@@ -4752,7 +4752,7 @@ class _m {
|
|
|
4752
4752
|
_forceRerender() {
|
|
4753
4753
|
this.mapping.clear(), this.mux(() => {
|
|
4754
4754
|
const e = this.beforeTransactionSelection !== null ? null : this.prosemirrorView.state.selection, n = this.type.toArray().map(
|
|
4755
|
-
(o) =>
|
|
4755
|
+
(o) => rr(
|
|
4756
4756
|
/** @type {Y.XmlElement} */
|
|
4757
4757
|
o,
|
|
4758
4758
|
this.prosemirrorView.state.schema,
|
|
@@ -4764,7 +4764,7 @@ class _m {
|
|
|
4764
4764
|
new H(E.from(n), 0, 0)
|
|
4765
4765
|
);
|
|
4766
4766
|
if (e) {
|
|
4767
|
-
const o = zt(
|
|
4767
|
+
const o = zt(Nn(e.anchor, 0), r.doc.content.size), i = zt(Nn(e.head, 0), r.doc.content.size);
|
|
4768
4768
|
r.setSelection(V.create(r.doc, o, i));
|
|
4769
4769
|
}
|
|
4770
4770
|
this.prosemirrorView.dispatch(
|
|
@@ -4816,7 +4816,7 @@ class _m {
|
|
|
4816
4816
|
}, c = T.typeListToArraySnapshot(
|
|
4817
4817
|
i,
|
|
4818
4818
|
new T.Snapshot(n.ds, e.sv)
|
|
4819
|
-
).map((u) => !u._item.deleted || bo(u._item, e) || bo(u._item, n) ?
|
|
4819
|
+
).map((u) => !u._item.deleted || bo(u._item, e) || bo(u._item, n) ? rr(
|
|
4820
4820
|
u,
|
|
4821
4821
|
this.prosemirrorView.state.schema,
|
|
4822
4822
|
{ mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
|
|
@@ -4906,7 +4906,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
4906
4906
|
);
|
|
4907
4907
|
if (s === void 0) {
|
|
4908
4908
|
if (t instanceof T.XmlElement)
|
|
4909
|
-
return
|
|
4909
|
+
return rr(
|
|
4910
4910
|
t,
|
|
4911
4911
|
e,
|
|
4912
4912
|
n,
|
|
@@ -4917,7 +4917,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
4917
4917
|
throw em();
|
|
4918
4918
|
}
|
|
4919
4919
|
return s;
|
|
4920
|
-
},
|
|
4920
|
+
}, rr = (t, e, n, r, o, i) => {
|
|
4921
4921
|
const s = [], a = (l) => {
|
|
4922
4922
|
if (l instanceof T.XmlElement) {
|
|
4923
4923
|
const c = qc(
|
|
@@ -5046,11 +5046,11 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5046
5046
|
)?.attrs);
|
|
5047
5047
|
})
|
|
5048
5048
|
);
|
|
5049
|
-
},
|
|
5049
|
+
}, br = (t, e) => {
|
|
5050
5050
|
if (t instanceof T.XmlElement && !(e instanceof Array) && Fi(t, e)) {
|
|
5051
5051
|
const n = Lo(e);
|
|
5052
5052
|
return t._length === n.length && Os(t.getAttributes(), e.attrs) && t.toArray().every(
|
|
5053
|
-
(r, o) =>
|
|
5053
|
+
(r, o) => br(r, n[o])
|
|
5054
5054
|
);
|
|
5055
5055
|
}
|
|
5056
5056
|
return t instanceof T.XmlText && e instanceof Array && Kc(t, e);
|
|
@@ -5063,14 +5063,14 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5063
5063
|
const u = r[l], f = o[l];
|
|
5064
5064
|
if (wo(n.mapping.get(u), f))
|
|
5065
5065
|
d = !0;
|
|
5066
|
-
else if (!
|
|
5066
|
+
else if (!br(u, f))
|
|
5067
5067
|
break;
|
|
5068
5068
|
}
|
|
5069
5069
|
for (; l + c < a; c++) {
|
|
5070
5070
|
const u = r[s - c - 1], f = o[i - c - 1];
|
|
5071
5071
|
if (wo(n.mapping.get(u), f))
|
|
5072
5072
|
d = !0;
|
|
5073
|
-
else if (!
|
|
5073
|
+
else if (!br(u, f))
|
|
5074
5074
|
break;
|
|
5075
5075
|
}
|
|
5076
5076
|
return {
|
|
@@ -5129,7 +5129,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5129
5129
|
for (; c < l; c++) {
|
|
5130
5130
|
const u = s[c], f = o[c];
|
|
5131
5131
|
if (!wo(r.mapping.get(u), f))
|
|
5132
|
-
if (
|
|
5132
|
+
if (br(u, f))
|
|
5133
5133
|
r.mapping.set(u, f);
|
|
5134
5134
|
else
|
|
5135
5135
|
break;
|
|
@@ -5137,7 +5137,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5137
5137
|
for (; d + c + 1 < l; d++) {
|
|
5138
5138
|
const u = s[a - d - 1], f = o[i - d - 1];
|
|
5139
5139
|
if (!wo(r.mapping.get(u), f))
|
|
5140
|
-
if (
|
|
5140
|
+
if (br(u, f))
|
|
5141
5141
|
r.mapping.set(u, f);
|
|
5142
5142
|
else
|
|
5143
5143
|
break;
|
|
@@ -5193,20 +5193,20 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5193
5193
|
}
|
|
5194
5194
|
}, te);
|
|
5195
5195
|
}, Fi = (t, e) => !(e instanceof Array) && t.nodeName === e.type.name;
|
|
5196
|
-
let
|
|
5196
|
+
let or = null;
|
|
5197
5197
|
const qm = () => {
|
|
5198
5198
|
const t = (
|
|
5199
5199
|
/** @type {Map<EditorView, Map<any, any>>} */
|
|
5200
|
-
|
|
5200
|
+
or
|
|
5201
5201
|
);
|
|
5202
|
-
|
|
5202
|
+
or = null, t.forEach((e, n) => {
|
|
5203
5203
|
const r = n.state.tr, o = te.getState(n.state);
|
|
5204
5204
|
o && o.binding && !o.binding.isDestroyed && (e.forEach((i, s) => {
|
|
5205
5205
|
r.setMeta(s, i);
|
|
5206
5206
|
}), n.dispatch(r));
|
|
5207
5207
|
});
|
|
5208
5208
|
}, Km = (t, e, n) => {
|
|
5209
|
-
|
|
5209
|
+
or || (or = /* @__PURE__ */ new Map(), As(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);
|
|
@@ -5269,7 +5269,7 @@ const qm = () => {
|
|
|
5269
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) => {
|
|
5273
5273
|
const o = T.createAbsolutePositionFromRelativePosition(n, t);
|
|
5274
5274
|
if (o === null || o.type !== e && !T.isParentOf(e, o.type._item))
|
|
5275
5275
|
return null;
|
|
@@ -5317,7 +5317,7 @@ const qm = () => {
|
|
|
5317
5317
|
return s - 1;
|
|
5318
5318
|
}, Jm = (t, e) => {
|
|
5319
5319
|
const n = t.toArray().map(
|
|
5320
|
-
(r) =>
|
|
5320
|
+
(r) => rr(
|
|
5321
5321
|
/** @type {Y.XmlElement} */
|
|
5322
5322
|
r,
|
|
5323
5323
|
e,
|
|
@@ -5341,26 +5341,26 @@ const qm = () => {
|
|
|
5341
5341
|
if (n(s.clientID, c, l) && l.cursor != null) {
|
|
5342
5342
|
const d = l.user || {};
|
|
5343
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
|
-
let u =
|
|
5344
|
+
let u = wr(
|
|
5345
5345
|
s,
|
|
5346
5346
|
i.type,
|
|
5347
5347
|
T.createRelativePositionFromJSON(l.cursor.anchor),
|
|
5348
5348
|
i.binding.mapping
|
|
5349
|
-
), f =
|
|
5349
|
+
), f = wr(
|
|
5350
5350
|
s,
|
|
5351
5351
|
i.type,
|
|
5352
5352
|
T.createRelativePositionFromJSON(l.cursor.head),
|
|
5353
5353
|
i.binding.mapping
|
|
5354
5354
|
);
|
|
5355
5355
|
if (u !== null && f !== null) {
|
|
5356
|
-
const p =
|
|
5356
|
+
const p = Nn(t.doc.content.size - 1, 0);
|
|
5357
5357
|
u = zt(u, p), f = zt(f, p), a.push(
|
|
5358
5358
|
z.widget(f, () => r(d, c), {
|
|
5359
5359
|
key: c + "",
|
|
5360
5360
|
side: 10
|
|
5361
5361
|
})
|
|
5362
5362
|
);
|
|
5363
|
-
const h = zt(u, f), m =
|
|
5363
|
+
const h = zt(u, f), m = Nn(u, f);
|
|
5364
5364
|
a.push(
|
|
5365
5365
|
z.inline(h, m, o(d, c), {
|
|
5366
5366
|
inclusiveEnd: !0,
|
|
@@ -5376,7 +5376,7 @@ const qm = () => {
|
|
|
5376
5376
|
selectionBuilder: r = Qm,
|
|
5377
5377
|
getSelection: o = (s) => s.selection
|
|
5378
5378
|
} = {}, i = "cursor") => new Z({
|
|
5379
|
-
key:
|
|
5379
|
+
key: qr,
|
|
5380
5380
|
state: {
|
|
5381
5381
|
init(s, a) {
|
|
5382
5382
|
return Ua(
|
|
@@ -5388,7 +5388,7 @@ const qm = () => {
|
|
|
5388
5388
|
);
|
|
5389
5389
|
},
|
|
5390
5390
|
apply(s, a, l, c) {
|
|
5391
|
-
const d = te.getState(c), u = s.getMeta(
|
|
5391
|
+
const d = te.getState(c), u = s.getMeta(qr);
|
|
5392
5392
|
return d && d.isChangeOrigin || u && u.awarenessUpdated ? Ua(
|
|
5393
5393
|
c,
|
|
5394
5394
|
t,
|
|
@@ -5399,11 +5399,11 @@ const qm = () => {
|
|
|
5399
5399
|
}
|
|
5400
5400
|
},
|
|
5401
5401
|
props: {
|
|
5402
|
-
decorations: (s) =>
|
|
5402
|
+
decorations: (s) => qr.getState(s)
|
|
5403
5403
|
},
|
|
5404
5404
|
view: (s) => {
|
|
5405
5405
|
const a = () => {
|
|
5406
|
-
s.docView && Km(s,
|
|
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()) {
|
|
@@ -5426,7 +5426,7 @@ const qm = () => {
|
|
|
5426
5426
|
anchor: f,
|
|
5427
5427
|
head: p
|
|
5428
5428
|
});
|
|
5429
|
-
} else d.cursor != null &&
|
|
5429
|
+
} else d.cursor != null && wr(
|
|
5430
5430
|
c.doc,
|
|
5431
5431
|
c.type,
|
|
5432
5432
|
T.createRelativePositionFromJSON(d.cursor.anchor),
|
|
@@ -5700,10 +5700,10 @@ function xt(t, e) {
|
|
|
5700
5700
|
}
|
|
5701
5701
|
return t;
|
|
5702
5702
|
}
|
|
5703
|
-
function
|
|
5703
|
+
function Er(t, e) {
|
|
5704
5704
|
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
5705
5705
|
}
|
|
5706
|
-
var
|
|
5706
|
+
var Bn, Yc, Gc;
|
|
5707
5707
|
class N {
|
|
5708
5708
|
/**
|
|
5709
5709
|
* Get a list of all attributes defined in the extensions.
|
|
@@ -5717,7 +5717,7 @@ class N {
|
|
|
5717
5717
|
renderDOM: null,
|
|
5718
5718
|
parseDOM: null,
|
|
5719
5719
|
keepOnSplit: !0
|
|
5720
|
-
}, o = I(this,
|
|
5720
|
+
}, o = I(this, Bn, Yc).call(this, e, r), i = I(this, Bn, Gc).call(this, e, r);
|
|
5721
5721
|
return n.push(...o, ...i), n;
|
|
5722
5722
|
}
|
|
5723
5723
|
/**
|
|
@@ -5825,14 +5825,14 @@ class N {
|
|
|
5825
5825
|
* @returns The attrs of the node/mark or an empty object.
|
|
5826
5826
|
*/
|
|
5827
5827
|
static getAttributes(e, n) {
|
|
5828
|
-
const r =
|
|
5828
|
+
const r = Er(
|
|
5829
5829
|
typeof n == "string" ? n : n.name,
|
|
5830
5830
|
e.schema
|
|
5831
5831
|
);
|
|
5832
5832
|
return r === "node" ? this.getNodeAttributes(e, n) : r === "mark" ? this.getMarkAttributes(e, n) : {};
|
|
5833
5833
|
}
|
|
5834
5834
|
}
|
|
5835
|
-
|
|
5835
|
+
Bn = new WeakSet(), Yc = function(e, n) {
|
|
5836
5836
|
const r = [], o = (i) => {
|
|
5837
5837
|
for (const s of i.types) {
|
|
5838
5838
|
const a = Object.entries(i.attributes);
|
|
@@ -5882,7 +5882,7 @@ Fn = new WeakSet(), Yc = function(e, n) {
|
|
|
5882
5882
|
}
|
|
5883
5883
|
}
|
|
5884
5884
|
return r;
|
|
5885
|
-
}, ft(N,
|
|
5885
|
+
}, ft(N, Bn);
|
|
5886
5886
|
function mg(t = {}) {
|
|
5887
5887
|
return Object.keys(t).length === 0 && t.constructor === Object;
|
|
5888
5888
|
}
|
|
@@ -5890,8 +5890,8 @@ function Bi(t) {
|
|
|
5890
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
|
-
var
|
|
5894
|
-
const
|
|
5893
|
+
var _n, Zc, Qc;
|
|
5894
|
+
const lr = class lr {
|
|
5895
5895
|
/**
|
|
5896
5896
|
* Creates PM schema by resolved extensions.
|
|
5897
5897
|
* @param extensions List of extensions.
|
|
@@ -5900,11 +5900,11 @@ const ar = class ar {
|
|
|
5900
5900
|
*/
|
|
5901
5901
|
static createSchemaByExtensions(e, n) {
|
|
5902
5902
|
var c, d;
|
|
5903
|
-
const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => D(u, "topNode"))?.name, s = N.getAttributesFromExtensions(e), a = I(c =
|
|
5903
|
+
const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => D(u, "topNode"))?.name, s = N.getAttributesFromExtensions(e), a = I(c = lr, _n, Zc).call(c, r, s, n), l = I(d = lr, _n, Qc).call(d, o, s, n);
|
|
5904
5904
|
return new Yl({ topNode: i, nodes: a, marks: l });
|
|
5905
5905
|
}
|
|
5906
5906
|
};
|
|
5907
|
-
|
|
5907
|
+
_n = new WeakSet(), Zc = function(e, n, r) {
|
|
5908
5908
|
const o = e.map((i) => {
|
|
5909
5909
|
const s = n.filter((h) => h.type === i.name), a = {
|
|
5910
5910
|
name: i.name,
|
|
@@ -5968,9 +5968,9 @@ Bn = new WeakSet(), Zc = function(e, n, r) {
|
|
|
5968
5968
|
})), [i.name, c];
|
|
5969
5969
|
});
|
|
5970
5970
|
return Object.fromEntries(o);
|
|
5971
|
-
}, ft(
|
|
5972
|
-
let _i =
|
|
5973
|
-
function
|
|
5971
|
+
}, ft(lr, _n);
|
|
5972
|
+
let _i = lr;
|
|
5973
|
+
function Yn(t, e) {
|
|
5974
5974
|
return e.nodes[t] || e.marks[t] || null;
|
|
5975
5975
|
}
|
|
5976
5976
|
function gg(t, e) {
|
|
@@ -6095,7 +6095,7 @@ class Fo {
|
|
|
6095
6095
|
}
|
|
6096
6096
|
}
|
|
6097
6097
|
function yg(t, e) {
|
|
6098
|
-
const n =
|
|
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
6101
|
const bg = (t, e = 500) => {
|
|
@@ -6234,23 +6234,23 @@ const vg = (t, e) => {
|
|
|
6234
6234
|
});
|
|
6235
6235
|
return n;
|
|
6236
6236
|
};
|
|
6237
|
-
var
|
|
6238
|
-
const
|
|
6237
|
+
var zn, ed, td;
|
|
6238
|
+
const Mn = class Mn {
|
|
6239
6239
|
constructor(e, n, r) {
|
|
6240
|
-
ft(this,
|
|
6240
|
+
ft(this, zn);
|
|
6241
6241
|
P(this, "editor");
|
|
6242
6242
|
P(this, "schema");
|
|
6243
6243
|
P(this, "extensions");
|
|
6244
6244
|
P(this, "externalExtensions", []);
|
|
6245
6245
|
P(this, "splittableMarks", []);
|
|
6246
|
-
this.editor = r, this.externalExtensions = n || [], this.extensions =
|
|
6246
|
+
this.editor = r, this.externalExtensions = n || [], this.extensions = Mn.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = _i.createSchemaByExtensions(this.extensions, r), I(this, zn, ed).call(this);
|
|
6247
6247
|
}
|
|
6248
6248
|
/**
|
|
6249
6249
|
* Static method for creating ExtensionService.
|
|
6250
6250
|
* @param args Arguments for the constructor.
|
|
6251
6251
|
*/
|
|
6252
6252
|
static create(...e) {
|
|
6253
|
-
return new
|
|
6253
|
+
return new Mn(...e);
|
|
6254
6254
|
}
|
|
6255
6255
|
/**
|
|
6256
6256
|
* Get an array of resolved extensions (e.g. sorted by priority).
|
|
@@ -6258,7 +6258,7 @@ const xn = class xn {
|
|
|
6258
6258
|
* @returns Array of resolved extensions.
|
|
6259
6259
|
*/
|
|
6260
6260
|
static getResolvedExtensions(e) {
|
|
6261
|
-
return
|
|
6261
|
+
return Mn.sortByPriority(e);
|
|
6262
6262
|
}
|
|
6263
6263
|
/**
|
|
6264
6264
|
* Sort extensions by priority.
|
|
@@ -6290,7 +6290,7 @@ const xn = class xn {
|
|
|
6290
6290
|
options: n.options,
|
|
6291
6291
|
storage: n.storage,
|
|
6292
6292
|
editor: this.editor,
|
|
6293
|
-
type:
|
|
6293
|
+
type: Yn(n.name, this.schema)
|
|
6294
6294
|
}, o = D(n, "addCommands", r);
|
|
6295
6295
|
o && (e = {
|
|
6296
6296
|
...e,
|
|
@@ -6305,13 +6305,13 @@ const xn = class xn {
|
|
|
6305
6305
|
* @returns Array of PM plugins.
|
|
6306
6306
|
*/
|
|
6307
6307
|
get plugins() {
|
|
6308
|
-
const e = this.editor, n =
|
|
6308
|
+
const e = this.editor, n = Mn.sortByPriority([...this.extensions].reverse()), r = [], o = n.map((i) => {
|
|
6309
6309
|
const s = {
|
|
6310
6310
|
name: i.name,
|
|
6311
6311
|
options: i.options,
|
|
6312
6312
|
storage: i.storage,
|
|
6313
6313
|
editor: e,
|
|
6314
|
-
type:
|
|
6314
|
+
type: Yn(i.name, this.schema)
|
|
6315
6315
|
}, a = [], l = D(i, "addShortcuts", s);
|
|
6316
6316
|
let c = {};
|
|
6317
6317
|
if (l) {
|
|
@@ -6366,7 +6366,7 @@ const xn = class xn {
|
|
|
6366
6366
|
return Object.fromEntries(r);
|
|
6367
6367
|
}
|
|
6368
6368
|
};
|
|
6369
|
-
|
|
6369
|
+
zn = new WeakSet(), /**
|
|
6370
6370
|
* Install all extensions.
|
|
6371
6371
|
* Create extension storage in the editor, attach editor events.
|
|
6372
6372
|
*/
|
|
@@ -6378,9 +6378,9 @@ ed = function() {
|
|
|
6378
6378
|
options: e.options,
|
|
6379
6379
|
storage: e.storage,
|
|
6380
6380
|
editor: this.editor,
|
|
6381
|
-
type:
|
|
6381
|
+
type: Yn(e.name, this.schema)
|
|
6382
6382
|
};
|
|
6383
|
-
e.type === "mark" && (K(D(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), I(this,
|
|
6383
|
+
e.type === "mark" && (K(D(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), I(this, zn, td).call(this, e);
|
|
6384
6384
|
}
|
|
6385
6385
|
}, /**
|
|
6386
6386
|
* Attach editor events to extension
|
|
@@ -6393,11 +6393,11 @@ td = function(e) {
|
|
|
6393
6393
|
options: e.options,
|
|
6394
6394
|
storage: e.storage,
|
|
6395
6395
|
editor: this.editor,
|
|
6396
|
-
type:
|
|
6396
|
+
type: Yn(e.name, this.schema)
|
|
6397
6397
|
}, r = D(e, "onBeforeCreate", n), o = D(e, "onCreate", n), i = D(e, "onUpdate", n), s = D(e, "onSelectionUpdate", n), a = D(e, "onTransaction", n), l = D(e, "onFocus", n), c = D(e, "onBlur", n), d = D(e, "onDestroy", n);
|
|
6398
6398
|
r && this.editor.on("beforeCreate", r), o && this.editor.on("create", o), i && this.editor.on("update", i), s && this.editor.on("selectionUpdate", s), a && this.editor.on("transaction", a), l && this.editor.on("focus", l), c && this.editor.on("blur", c), d && this.editor.on("destroy", d);
|
|
6399
6399
|
};
|
|
6400
|
-
let zi =
|
|
6400
|
+
let zi = Mn;
|
|
6401
6401
|
const Cg = (t) => (e) => {
|
|
6402
6402
|
const n = typeof t == "function" ? t(e) : t;
|
|
6403
6403
|
for (let r = 0; r < n.length; r += 1)
|
|
@@ -6418,19 +6418,19 @@ const nd = (t, e, n) => {
|
|
|
6418
6418
|
return !1;
|
|
6419
6419
|
let o = od(r);
|
|
6420
6420
|
if (!o) {
|
|
6421
|
-
let s = r.blockRange(), a = s &&
|
|
6421
|
+
let s = r.blockRange(), a = s && Or(s);
|
|
6422
6422
|
return a == null ? !1 : (e && e(t.tr.lift(s, a).scrollIntoView()), !0);
|
|
6423
6423
|
}
|
|
6424
6424
|
let i = o.nodeBefore;
|
|
6425
6425
|
if (ud(t, o, e, -1))
|
|
6426
6426
|
return !0;
|
|
6427
|
-
if (r.parent.content.size == 0 && (
|
|
6427
|
+
if (r.parent.content.size == 0 && (In(i, "end") || B.isSelectable(i)))
|
|
6428
6428
|
for (let s = r.depth; ; s--) {
|
|
6429
6429
|
let a = Zl(t.doc, r.before(s), r.after(s), H.empty);
|
|
6430
6430
|
if (a && a.slice.size < a.to - a.from) {
|
|
6431
6431
|
if (e) {
|
|
6432
6432
|
let l = t.tr.step(a);
|
|
6433
|
-
l.setSelection(
|
|
6433
|
+
l.setSelection(In(i, "end") ? J.findFrom(l.doc.resolve(l.mapping.map(o.pos, -1)), -1) : B.create(l.doc, o.pos - i.nodeSize)), e(l.scrollIntoView());
|
|
6434
6434
|
}
|
|
6435
6435
|
return !0;
|
|
6436
6436
|
}
|
|
@@ -6439,7 +6439,7 @@ const nd = (t, e, n) => {
|
|
|
6439
6439
|
}
|
|
6440
6440
|
return i.isAtom && o.depth == r.depth - 1 ? (e && e(t.tr.delete(o.pos - i.nodeSize, o.pos).scrollIntoView()), !0) : !1;
|
|
6441
6441
|
};
|
|
6442
|
-
function
|
|
6442
|
+
function In(t, e, n = !1) {
|
|
6443
6443
|
for (let r = t; r; r = e == "start" ? r.firstChild : r.lastChild) {
|
|
6444
6444
|
if (r.isTextblock)
|
|
6445
6445
|
return !0;
|
|
@@ -6484,12 +6484,12 @@ const id = (t, e, n) => {
|
|
|
6484
6484
|
let i = o.nodeAfter;
|
|
6485
6485
|
if (ud(t, o, e, 1))
|
|
6486
6486
|
return !0;
|
|
6487
|
-
if (r.parent.content.size == 0 && (
|
|
6487
|
+
if (r.parent.content.size == 0 && (In(i, "start") || B.isSelectable(i))) {
|
|
6488
6488
|
let s = Zl(t.doc, r.before(), r.after(), H.empty);
|
|
6489
6489
|
if (s && s.slice.size < s.to - s.from) {
|
|
6490
6490
|
if (e) {
|
|
6491
6491
|
let a = t.tr.step(s);
|
|
6492
|
-
a.setSelection(
|
|
6492
|
+
a.setSelection(In(i, "start") ? J.findFrom(a.doc.resolve(a.mapping.map(o.pos)), 1) : B.create(a.doc, a.mapping.map(o.pos))), e(a.scrollIntoView());
|
|
6493
6493
|
}
|
|
6494
6494
|
return !0;
|
|
6495
6495
|
}
|
|
@@ -6567,7 +6567,7 @@ const Eg = (t, e) => {
|
|
|
6567
6567
|
return !0;
|
|
6568
6568
|
}, cd = (t, e) => {
|
|
6569
6569
|
let n = t.selection, { $from: r, $to: o } = n;
|
|
6570
|
-
if (n instanceof
|
|
6570
|
+
if (n instanceof Ar || r.parent.inlineContent || o.parent.inlineContent)
|
|
6571
6571
|
return !1;
|
|
6572
6572
|
let i = Es(o.parent.contentMatchAt(o.indexAfter()));
|
|
6573
6573
|
if (!i || !i.isTextblock)
|
|
@@ -6586,7 +6586,7 @@ const Eg = (t, e) => {
|
|
|
6586
6586
|
if (wt(t.doc, i))
|
|
6587
6587
|
return e && e(t.tr.split(i).scrollIntoView()), !0;
|
|
6588
6588
|
}
|
|
6589
|
-
let r = n.blockRange(), o = r &&
|
|
6589
|
+
let r = n.blockRange(), o = r && Or(r);
|
|
6590
6590
|
return o == null ? !1 : (e && e(t.tr.lift(r, o).scrollIntoView()), !0);
|
|
6591
6591
|
};
|
|
6592
6592
|
function Ig(t) {
|
|
@@ -6607,7 +6607,7 @@ function Ig(t) {
|
|
|
6607
6607
|
i.unshift(null);
|
|
6608
6608
|
}
|
|
6609
6609
|
let d = e.tr;
|
|
6610
|
-
(e.selection instanceof V || e.selection instanceof
|
|
6610
|
+
(e.selection instanceof V || e.selection instanceof Ar) && d.deleteSelection();
|
|
6611
6611
|
let u = d.mapping.map(r.pos), f = wt(d.doc, u, i.length, i);
|
|
6612
6612
|
if (f || (i[0] = a ? { type: a } : null, f = wt(d.doc, u, i.length, i)), d.split(u, i.length, i), !l && c && r.node(s).type != a) {
|
|
6613
6613
|
let p = d.mapping.map(r.before(s)), h = d.doc.resolve(p);
|
|
@@ -6616,7 +6616,7 @@ function Ig(t) {
|
|
|
6616
6616
|
return n && n(d.scrollIntoView()), !0;
|
|
6617
6617
|
};
|
|
6618
6618
|
}
|
|
6619
|
-
const Pg = Ig(), Rg = (t, e) => (e && e(t.tr.setSelection(new
|
|
6619
|
+
const Pg = Ig(), Rg = (t, e) => (e && e(t.tr.setSelection(new Ar(t.doc))), !0);
|
|
6620
6620
|
function Lg(t, e, n) {
|
|
6621
6621
|
let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
|
|
6622
6622
|
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 || jt(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
|
|
@@ -6637,10 +6637,10 @@ function ud(t, e, n, r) {
|
|
|
6637
6637
|
}
|
|
6638
6638
|
return !0;
|
|
6639
6639
|
}
|
|
6640
|
-
let d = i.type.spec.isolating || r > 0 && l ? null : J.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u &&
|
|
6640
|
+
let d = i.type.spec.isolating || r > 0 && l ? null : J.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && Or(u);
|
|
6641
6641
|
if (f != null && f >= e.depth)
|
|
6642
6642
|
return n && n(t.tr.lift(u, f).scrollIntoView()), !0;
|
|
6643
|
-
if (c &&
|
|
6643
|
+
if (c && In(i, "start", !0) && In(o, "end")) {
|
|
6644
6644
|
let p = o, h = [];
|
|
6645
6645
|
for (; h.push(p), !p.isTextblock; )
|
|
6646
6646
|
p = p.lastChild;
|
|
@@ -6796,7 +6796,7 @@ const Wg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6796
6796
|
return jg(r, n, l);
|
|
6797
6797
|
};
|
|
6798
6798
|
function $i(t, e, n = {}) {
|
|
6799
|
-
return t.find((r) => r.type === e &&
|
|
6799
|
+
return t.find((r) => r.type === e && dr(r.attrs, n));
|
|
6800
6800
|
}
|
|
6801
6801
|
function Ug(t, e, n = {}) {
|
|
6802
6802
|
return !!$i(t, e, n);
|
|
@@ -6835,7 +6835,7 @@ const qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6835
6835
|
function Co(t, e, n = {}) {
|
|
6836
6836
|
const { empty: r, ranges: o } = t.selection, i = e ? xt(e, t.schema) : null;
|
|
6837
6837
|
if (r)
|
|
6838
|
-
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) =>
|
|
6838
|
+
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => dr(u.attrs, n, { strict: !1 }));
|
|
6839
6839
|
let s = 0;
|
|
6840
6840
|
const a = [];
|
|
6841
6841
|
if (o.forEach(({ $from: u, $to: f }) => {
|
|
@@ -6852,7 +6852,7 @@ function Co(t, e, n = {}) {
|
|
|
6852
6852
|
);
|
|
6853
6853
|
});
|
|
6854
6854
|
}), s === 0) return !1;
|
|
6855
|
-
const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) =>
|
|
6855
|
+
const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) => dr(u.mark.attrs, n, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = a.filter((u) => i ? u.mark.type !== i && u.mark.type.excludes(i) : !0).reduce((u, f) => u + f.to - f.from, 0);
|
|
6856
6856
|
return (l > 0 ? l + c : l) >= s;
|
|
6857
6857
|
}
|
|
6858
6858
|
const Xg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
@@ -6865,7 +6865,7 @@ const Xg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6865
6865
|
if (a.type.isText) return;
|
|
6866
6866
|
const { doc: c, mapping: d } = e, u = c.resolve(d.map(l)), f = c.resolve(d.map(l + a.nodeSize)), p = u.blockRange(f);
|
|
6867
6867
|
if (!p) return;
|
|
6868
|
-
const h =
|
|
6868
|
+
const h = Or(p);
|
|
6869
6869
|
if (a.type.isTextblock) {
|
|
6870
6870
|
const { defaultType: m } = u.parent.contentMatchAt(u.index());
|
|
6871
6871
|
e.setNodeMarkup(p.start, m);
|
|
@@ -6888,7 +6888,7 @@ function So(t, e, n = {}) {
|
|
|
6888
6888
|
to: h
|
|
6889
6889
|
});
|
|
6890
6890
|
});
|
|
6891
|
-
const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) =>
|
|
6891
|
+
const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) => dr(u.node.attrs, n, { strict: !1 }));
|
|
6892
6892
|
return i ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= l;
|
|
6893
6893
|
}
|
|
6894
6894
|
const Gg = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
@@ -6896,7 +6896,7 @@ const Gg = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6896
6896
|
return So(r, i, n) ? o.setNode(s) : o.setNode(i, n);
|
|
6897
6897
|
}, Zg = () => ({ state: t, dispatch: e }) => Rg(t, e), Qg = () => ({ state: t, dispatch: e }) => Ns(t, e), ey = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6898
6898
|
let i = null, s = null;
|
|
6899
|
-
const a =
|
|
6899
|
+
const a = Er(
|
|
6900
6900
|
typeof t == "string" ? t : t.name,
|
|
6901
6901
|
r.schema
|
|
6902
6902
|
);
|
|
@@ -6918,7 +6918,7 @@ function Xa(t, e) {
|
|
|
6918
6918
|
}
|
|
6919
6919
|
const ty = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6920
6920
|
let i = null, s = null;
|
|
6921
|
-
const a =
|
|
6921
|
+
const a = Er(
|
|
6922
6922
|
typeof t == "string" ? t : t.name,
|
|
6923
6923
|
r.schema
|
|
6924
6924
|
);
|
|
@@ -6937,7 +6937,7 @@ const ty = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6937
6937
|
}
|
|
6938
6938
|
return t;
|
|
6939
6939
|
};
|
|
6940
|
-
function
|
|
6940
|
+
function Kr(t) {
|
|
6941
6941
|
const e = `<body>${t}</body>`, n = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
6942
6942
|
return md(n);
|
|
6943
6943
|
}
|
|
@@ -6980,13 +6980,13 @@ function Vi(t, e, n) {
|
|
|
6980
6980
|
}
|
|
6981
6981
|
})
|
|
6982
6982
|
});
|
|
6983
|
-
if (n.slice ?
|
|
6983
|
+
if (n.slice ? An.fromSchema(l).parseSlice(Kr(t), n.parseOptions) : An.fromSchema(l).parse(Kr(t), n.parseOptions), n.errorOnInvalidContent && s)
|
|
6984
6984
|
throw new Error("[super-editor error]: Invalid HTML content", {
|
|
6985
6985
|
cause: new Error(`Invalid element found: ${a}`)
|
|
6986
6986
|
});
|
|
6987
6987
|
}
|
|
6988
|
-
const i =
|
|
6989
|
-
return n.slice ? i.parseSlice(
|
|
6988
|
+
const i = An.fromSchema(e);
|
|
6989
|
+
return n.slice ? i.parseSlice(Kr(t), n.parseOptions).content : i.parse(Kr(t), n.parseOptions);
|
|
6990
6990
|
}
|
|
6991
6991
|
return Vi("", e, n);
|
|
6992
6992
|
}
|
|
@@ -7104,7 +7104,7 @@ function by(t) {
|
|
|
7104
7104
|
function wy(t, e, n, r) {
|
|
7105
7105
|
let o = t.tr, i = r.end, s = r.$to.end(r.depth);
|
|
7106
7106
|
i < s && (o.step(new an(i - 1, s, i, s, new H(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));
|
|
7107
|
-
const a =
|
|
7107
|
+
const a = Or(r);
|
|
7108
7108
|
if (a == null)
|
|
7109
7109
|
return !1;
|
|
7110
7110
|
o.lift(r, a);
|
|
@@ -8416,7 +8416,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8416
8416
|
const { selection: g, storedMarks: b } = r, { splittableMarks: w } = i.extensionService, C = b || g.$to.parentOffset && g.$from.marks();
|
|
8417
8417
|
if (n.split(a.pos, 2, m).scrollIntoView(), !C || !o) return !0;
|
|
8418
8418
|
const y = C.filter((S) => w.includes(S.type.name));
|
|
8419
|
-
n.ensureMarks(y);
|
|
8419
|
+
n.ensureMarks(y), n.setMeta("splitListItem", y);
|
|
8420
8420
|
}
|
|
8421
8421
|
return !0;
|
|
8422
8422
|
}, Dy = (t) => ({ state: e, dispatch: n }) => {
|
|
@@ -8478,7 +8478,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8478
8478
|
() => e.liftEmptyBlock(),
|
|
8479
8479
|
() => e.splitBlock()
|
|
8480
8480
|
]);
|
|
8481
|
-
},
|
|
8481
|
+
}, Xn = (t) => {
|
|
8482
8482
|
t.commands.first(({ commands: e, tr: n }) => [
|
|
8483
8483
|
() => e.undoInputRule(),
|
|
8484
8484
|
() => (n.setMeta("inputType", "deleteContentBackward"), !1),
|
|
@@ -8498,9 +8498,9 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8498
8498
|
const t = {
|
|
8499
8499
|
Enter: () => Ly(this.editor),
|
|
8500
8500
|
"Mod-Enter": () => this.editor.commands.exitCode(),
|
|
8501
|
-
Backspace: () =>
|
|
8502
|
-
"Mod-Backspace": () =>
|
|
8503
|
-
"Shift-Backspace": () =>
|
|
8501
|
+
Backspace: () => Xn(this.editor),
|
|
8502
|
+
"Mod-Backspace": () => Xn(this.editor),
|
|
8503
|
+
"Shift-Backspace": () => Xn(this.editor),
|
|
8504
8504
|
Delete: () => yn(this.editor),
|
|
8505
8505
|
"Mod-Delete": () => yn(this.editor),
|
|
8506
8506
|
"Mod-a": () => this.editor.commands.selectAll(),
|
|
@@ -8509,8 +8509,8 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8509
8509
|
...t
|
|
8510
8510
|
}, n = {
|
|
8511
8511
|
...t,
|
|
8512
|
-
"Ctrl-h": () =>
|
|
8513
|
-
"Alt-Backspace": () =>
|
|
8512
|
+
"Ctrl-h": () => Xn(this.editor),
|
|
8513
|
+
"Alt-Backspace": () => Xn(this.editor),
|
|
8514
8514
|
"Ctrl-d": () => yn(this.editor),
|
|
8515
8515
|
"Ctrl-Alt-Backspace": () => yn(this.editor),
|
|
8516
8516
|
"Alt-Delete": () => yn(this.editor),
|
|
@@ -8565,7 +8565,7 @@ function yd(t, e, n, { check: r = !1 } = {}) {
|
|
|
8565
8565
|
function bd(t, e, n = {}) {
|
|
8566
8566
|
if (!e)
|
|
8567
8567
|
return So(t, null, n) || Co(t, null, n);
|
|
8568
|
-
const r =
|
|
8568
|
+
const r = Er(e, t.schema);
|
|
8569
8569
|
return r === "node" ? So(t, e, n) : r === "mark" ? Co(t, e, n) : !1;
|
|
8570
8570
|
}
|
|
8571
8571
|
const Rs = ({
|
|
@@ -8627,7 +8627,7 @@ const Rs = ({
|
|
|
8627
8627
|
author: r.name,
|
|
8628
8628
|
authorEmail: r.email,
|
|
8629
8629
|
date: o
|
|
8630
|
-
}), l = new
|
|
8630
|
+
}), l = new cr();
|
|
8631
8631
|
let c = [];
|
|
8632
8632
|
return t.doc.nodesBetween(e, n, (d, u) => {
|
|
8633
8633
|
if (!d.type.name.includes("table"))
|
|
@@ -8653,11 +8653,11 @@ function zy(t) {
|
|
|
8653
8653
|
return {
|
|
8654
8654
|
attributes: {
|
|
8655
8655
|
parentAttributes: {
|
|
8656
|
-
"w14:paraId":
|
|
8657
|
-
"w14:textId":
|
|
8658
|
-
"w:rsidR":
|
|
8659
|
-
"w:rsidRDefault":
|
|
8660
|
-
"w:rsidP":
|
|
8656
|
+
"w14:paraId": kn(),
|
|
8657
|
+
"w14:textId": kn(),
|
|
8658
|
+
"w:rsidR": kn(),
|
|
8659
|
+
"w:rsidRDefault": kn(),
|
|
8660
|
+
"w:rsidP": kn(),
|
|
8661
8661
|
paragraphProperties: {
|
|
8662
8662
|
type: "element",
|
|
8663
8663
|
name: "w:pPr",
|
|
@@ -8758,7 +8758,7 @@ const Cd = (t) => {
|
|
|
8758
8758
|
findParentNode: je,
|
|
8759
8759
|
findParentNodeClosestToPos: Bo,
|
|
8760
8760
|
generateDocxListAttributes: zy,
|
|
8761
|
-
generateDocxRandomId:
|
|
8761
|
+
generateDocxRandomId: kn,
|
|
8762
8762
|
generateRandom32BitHex: kf,
|
|
8763
8763
|
getActiveFormatting: Ef,
|
|
8764
8764
|
getExtensionConfigField: D,
|
|
@@ -8767,8 +8767,8 @@ const Cd = (t) => {
|
|
|
8767
8767
|
getMarksBetween: $y,
|
|
8768
8768
|
getMarksFromSelection: No,
|
|
8769
8769
|
getNodeType: le,
|
|
8770
|
-
getSchemaTypeByName:
|
|
8771
|
-
getSchemaTypeNameByName:
|
|
8770
|
+
getSchemaTypeByName: Yn,
|
|
8771
|
+
getSchemaTypeNameByName: Er,
|
|
8772
8772
|
isActive: bd,
|
|
8773
8773
|
isInTable: Cd,
|
|
8774
8774
|
isList: Hi,
|
|
@@ -9505,7 +9505,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9505
9505
|
if (r.addMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), n.mark), ["bold", "italic", "strike", "underline", "textStyle"].includes(n.mark.type.name) && !c.marks.find((h) => h.type === n.mark.type)) {
|
|
9506
9506
|
const h = c.marks.find((b) => b.type.name === xe);
|
|
9507
9507
|
let m = [], g = [];
|
|
9508
|
-
if (h ? h.attrs.before.find((w) => w.type === "textStyle" ? w.type === n.mark.type.name &&
|
|
9508
|
+
if (h ? h.attrs.before.find((w) => w.type === "textStyle" ? w.type === n.mark.type.name && dr(w.attrs, n.mark.attrs) : w.type === n.mark.type.name) ? (g = [...h.attrs.before.filter((w) => w.type !== n.mark.type.name)], m = [...h.attrs.after]) : (g = [...h.attrs.before], m = [
|
|
9509
9509
|
...h.attrs.after,
|
|
9510
9510
|
{
|
|
9511
9511
|
type: n.mark.type.name,
|
|
@@ -9580,7 +9580,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9580
9580
|
const r = ["inputType", "uiEvent", "paste", "pointer"], o = ["historyUndo", "historyRedo", "acceptReject"];
|
|
9581
9581
|
if (!t.steps.length || t.meta && !Object.keys(t.meta).every((c) => r.includes(c)) || o.includes(t.getMeta("inputType")) || t.getMeta(me))
|
|
9582
9582
|
return t;
|
|
9583
|
-
const i = e.tr, s = new
|
|
9583
|
+
const i = e.tr, s = new cr(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
|
|
9584
9584
|
if (t.steps.forEach((c, d) => {
|
|
9585
9585
|
const u = c.map(s), { doc: f } = i;
|
|
9586
9586
|
u && (u instanceof Vt ? (Td({
|
|
@@ -9603,7 +9603,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9603
9603
|
doc: f,
|
|
9604
9604
|
user: n,
|
|
9605
9605
|
date: l
|
|
9606
|
-
}), console.debug("[track-changes]: addMarkStep")) : u instanceof
|
|
9606
|
+
}), console.debug("[track-changes]: addMarkStep")) : u instanceof Cn ? (Nd({
|
|
9607
9607
|
state: e,
|
|
9608
9608
|
tr: t,
|
|
9609
9609
|
step: u,
|
|
@@ -9654,7 +9654,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9654
9654
|
}, Qa = (t) => {
|
|
9655
9655
|
if (t === "initial" || t === "0.4.14") return Object.values(ib);
|
|
9656
9656
|
};
|
|
9657
|
-
var tn, ms, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld,
|
|
9657
|
+
var tn, ms, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld, Gn, Zn, Fd, Bd, _d, zd;
|
|
9658
9658
|
const Js = class Js extends ag {
|
|
9659
9659
|
constructor(n) {
|
|
9660
9660
|
super();
|
|
@@ -9940,7 +9940,7 @@ const Js = class Js extends ag {
|
|
|
9940
9940
|
* Get HTML string of the document
|
|
9941
9941
|
*/
|
|
9942
9942
|
getHTML() {
|
|
9943
|
-
const n = document.createElement("div"), r =
|
|
9943
|
+
const n = document.createElement("div"), r = $n.fromSchema(this.schema).serializeFragment(this.state.doc.content);
|
|
9944
9944
|
return n.appendChild(r), n.innerHTML;
|
|
9945
9945
|
}
|
|
9946
9946
|
/**
|
|
@@ -10018,7 +10018,7 @@ const Js = class Js extends ag {
|
|
|
10018
10018
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10019
10019
|
*/
|
|
10020
10020
|
processCollaborationMigrations() {
|
|
10021
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.
|
|
10021
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.26"), !this.options.ydoc) return;
|
|
10022
10022
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10023
10023
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10024
10024
|
const o = Qa(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10040,11 +10040,11 @@ const Js = class Js extends ag {
|
|
|
10040
10040
|
isNewFile: !0,
|
|
10041
10041
|
shouldLoadComments: !0,
|
|
10042
10042
|
replacedFile: !0
|
|
10043
|
-
}), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (I(this, O,
|
|
10043
|
+
}), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (I(this, O, Zn).call(this), I(this, O, Gn).call(this));
|
|
10044
10044
|
}
|
|
10045
10045
|
};
|
|
10046
10046
|
tn = new WeakMap(), ms = new WeakMap(), O = new WeakSet(), Id = function(n) {
|
|
10047
|
-
I(this, O, Ki).call(this), I(this, O, Xi).call(this), I(this, O, Gi).call(this), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), I(this, O, Qi).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", I(this, O, Wi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", I(this, O, Ld)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (I(this, O,
|
|
10047
|
+
I(this, O, Ki).call(this), I(this, O, Xi).call(this), I(this, O, Gi).call(this), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), I(this, O, Qi).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", I(this, O, Wi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", I(this, O, Ld)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (I(this, O, Zn).call(this), I(this, O, Gn).call(this)), window.setTimeout(() => {
|
|
10048
10048
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10049
10049
|
}, 0));
|
|
10050
10050
|
}, Pd = function(n) {
|
|
@@ -10064,7 +10064,7 @@ Ui = function() {
|
|
|
10064
10064
|
this.options.isNewFile = !1;
|
|
10065
10065
|
const n = I(this, O, Zi).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
|
|
10066
10066
|
this.view.dispatch(r), setTimeout(() => {
|
|
10067
|
-
I(this, O,
|
|
10067
|
+
I(this, O, Zn).call(this), I(this, O, Gn).call(this);
|
|
10068
10068
|
}, 50);
|
|
10069
10069
|
}, qi = function(n) {
|
|
10070
10070
|
const r = this.extensionService?.plugins.find((i) => i.key.startsWith(n)), o = this.state.plugins.find((i) => i.key.startsWith(n));
|
|
@@ -10126,7 +10126,7 @@ Zi = function() {
|
|
|
10126
10126
|
const c = document.createElement("div");
|
|
10127
10127
|
c.innerHTML = s, l = c, c.remove();
|
|
10128
10128
|
}
|
|
10129
|
-
n = a ? this.schema.nodeFromJSON(l) :
|
|
10129
|
+
n = a ? this.schema.nodeFromJSON(l) : An.fromSchema(this.schema).parse(l);
|
|
10130
10130
|
} else
|
|
10131
10131
|
n = this.schema.topNodeType.createAndFill();
|
|
10132
10132
|
} catch (r) {
|
|
@@ -10151,11 +10151,11 @@ Qi = function() {
|
|
|
10151
10151
|
const i = this.view.dom;
|
|
10152
10152
|
i.editor = this, this.options.telemetry?.sendReport();
|
|
10153
10153
|
}, Ld = function({ editor: n, ydoc: r }) {
|
|
10154
|
-
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (I(this, O,
|
|
10154
|
+
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (I(this, O, Zn).call(this), I(this, O, Gn).call(this)));
|
|
10155
10155
|
}, /**
|
|
10156
10156
|
* Initialize comments plugin
|
|
10157
10157
|
*/
|
|
10158
|
-
|
|
10158
|
+
Gn = function() {
|
|
10159
10159
|
if (!this.options.isCommentsEnabled || this.options.isHeadless || !this.options.shouldLoadComments) return;
|
|
10160
10160
|
const n = this.options.replacedFile;
|
|
10161
10161
|
this.emit("commentsLoaded", { editor: this, replacedFile: n, comments: this.converter.comments || [] }), setTimeout(() => {
|
|
@@ -10163,7 +10163,7 @@ Yn = function() {
|
|
|
10163
10163
|
const { state: r, dispatch: o } = this.view, i = r.tr.setMeta(me, { type: "force" });
|
|
10164
10164
|
o(i);
|
|
10165
10165
|
}, 50);
|
|
10166
|
-
},
|
|
10166
|
+
}, Zn = async function() {
|
|
10167
10167
|
if (this.options.isHeadless || !this.extensionService) return;
|
|
10168
10168
|
if (this.options.extensions.find((r) => r.name === "pagination") && this.options.pagination) {
|
|
10169
10169
|
console.debug("🔗 [super-editor] Initializing pagination");
|
|
@@ -10836,12 +10836,12 @@ function fb() {
|
|
|
10836
10836
|
});
|
|
10837
10837
|
}
|
|
10838
10838
|
const pb = Ts({
|
|
10839
|
-
ArrowLeft:
|
|
10840
|
-
ArrowRight:
|
|
10841
|
-
ArrowUp:
|
|
10842
|
-
ArrowDown:
|
|
10839
|
+
ArrowLeft: Xr("horiz", -1),
|
|
10840
|
+
ArrowRight: Xr("horiz", 1),
|
|
10841
|
+
ArrowUp: Xr("vert", -1),
|
|
10842
|
+
ArrowDown: Xr("vert", 1)
|
|
10843
10843
|
});
|
|
10844
|
-
function
|
|
10844
|
+
function Xr(t, e) {
|
|
10845
10845
|
const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
10846
10846
|
return function(r, o, i) {
|
|
10847
10847
|
let s = r.selection, a = e > 0 ? s.$to : s.$from, l = s.empty;
|
|
@@ -11221,7 +11221,7 @@ function Db(t) {
|
|
|
11221
11221
|
listLevel: _
|
|
11222
11222
|
};
|
|
11223
11223
|
});
|
|
11224
|
-
}), l ? s : null;
|
|
11224
|
+
}), s.setMeta("orderedListMarker", !0), l ? s : null;
|
|
11225
11225
|
}
|
|
11226
11226
|
});
|
|
11227
11227
|
}
|
|
@@ -11493,12 +11493,12 @@ function Hb(t = {}) {
|
|
|
11493
11493
|
return F.create(n.doc, r);
|
|
11494
11494
|
},
|
|
11495
11495
|
apply(e, n, r, o) {
|
|
11496
|
-
if (!e.docChanged) return n;
|
|
11497
|
-
const
|
|
11498
|
-
...rl(o),
|
|
11496
|
+
if (!e.docChanged || e.getMeta("orderedListMarker")) return n;
|
|
11497
|
+
const s = e.getMeta("splitListItem"), a = [
|
|
11498
|
+
...rl(o, s),
|
|
11499
11499
|
...ol(o)
|
|
11500
11500
|
];
|
|
11501
|
-
return F.create(o.doc,
|
|
11501
|
+
return F.create(o.doc, a);
|
|
11502
11502
|
}
|
|
11503
11503
|
},
|
|
11504
11504
|
props: {
|
|
@@ -11508,33 +11508,35 @@ function Hb(t = {}) {
|
|
|
11508
11508
|
}
|
|
11509
11509
|
});
|
|
11510
11510
|
}
|
|
11511
|
-
function rl(t) {
|
|
11512
|
-
let { doc:
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11511
|
+
function rl(t, e = []) {
|
|
11512
|
+
let { doc: n, storedMarks: r } = t, o = [];
|
|
11513
|
+
Array.isArray(r) && e.push(...r);
|
|
11514
|
+
let i = Ls(n, (s) => s.type.name === "listItem");
|
|
11515
|
+
return i.length && i.forEach(({ node: s, pos: a }) => {
|
|
11516
|
+
let l = xt("textStyle", n.type.schema), c = [...e.filter((b) => b.type === l)];
|
|
11517
|
+
if (Wb(s) && e.length) {
|
|
11518
|
+
const b = e.filter((w) => w.type === l);
|
|
11519
|
+
c.push(...b);
|
|
11518
11520
|
} else {
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
}
|
|
11522
|
-
let
|
|
11523
|
-
|
|
11524
|
-
let { attrs:
|
|
11525
|
-
if (
|
|
11526
|
-
let [
|
|
11527
|
-
Number.isNaN(
|
|
11521
|
+
const b = jb(s, n, l);
|
|
11522
|
+
c.push(...b);
|
|
11523
|
+
}
|
|
11524
|
+
let u = null, f = null;
|
|
11525
|
+
c.forEach((b) => {
|
|
11526
|
+
let { attrs: w } = b;
|
|
11527
|
+
if (w.fontSize && !u) {
|
|
11528
|
+
let [C, y] = Ct(w.fontSize);
|
|
11529
|
+
Number.isNaN(C) || (y = y ?? "pt", u = `${C}${y}`);
|
|
11528
11530
|
}
|
|
11529
|
-
|
|
11531
|
+
w.fontFamily && !f && (f = w.fontFamily);
|
|
11530
11532
|
});
|
|
11531
|
-
let
|
|
11532
|
-
style: `--marker-font-size: ${
|
|
11533
|
-
},
|
|
11534
|
-
style: `--marker-font-family: ${
|
|
11535
|
-
},
|
|
11536
|
-
|
|
11537
|
-
}),
|
|
11533
|
+
let p = {
|
|
11534
|
+
style: `--marker-font-size: ${u ?? "initial"}`
|
|
11535
|
+
}, h = {
|
|
11536
|
+
style: `--marker-font-family: ${f ?? "initial"}`
|
|
11537
|
+
}, m = N.mergeAttributes(p, h), g = z.node(a, a + s.nodeSize, m);
|
|
11538
|
+
o.push(g);
|
|
11539
|
+
}), o;
|
|
11538
11540
|
}
|
|
11539
11541
|
function ol(t) {
|
|
11540
11542
|
let { doc: e } = t, n = [], r = Ls(e, (o) => o.type.name === "listItem");
|
|
@@ -12049,7 +12051,7 @@ const tu = Y.create({
|
|
|
12049
12051
|
addOptions() {
|
|
12050
12052
|
return {
|
|
12051
12053
|
htmlAttributes: {
|
|
12052
|
-
class: "tab",
|
|
12054
|
+
class: "super-doc-tab",
|
|
12053
12055
|
// this works together with content prop:
|
|
12054
12056
|
// since tab can't have content inside but content prop is defined I have to manually add attribute
|
|
12055
12057
|
contentEditable: !1
|
|
@@ -12057,7 +12059,7 @@ const tu = Y.create({
|
|
|
12057
12059
|
};
|
|
12058
12060
|
},
|
|
12059
12061
|
parseDOM() {
|
|
12060
|
-
return [{ tag: "span.tab" }];
|
|
12062
|
+
return [{ tag: "span.super-doc-tab" }];
|
|
12061
12063
|
},
|
|
12062
12064
|
renderDOM({ htmlAttributes: t }) {
|
|
12063
12065
|
return ["span", N.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
@@ -12484,7 +12486,7 @@ function ve(t) {
|
|
|
12484
12486
|
return e;
|
|
12485
12487
|
}
|
|
12486
12488
|
var Pt = new G("selectingCells");
|
|
12487
|
-
function
|
|
12489
|
+
function Vn(t) {
|
|
12488
12490
|
for (let e = t.depth - 1; e > 0; e--)
|
|
12489
12491
|
if (t.node(e).type.spec.tableRole == "row")
|
|
12490
12492
|
return t.node(0).resolve(t.before(e + 1));
|
|
@@ -12509,7 +12511,7 @@ function _o(t) {
|
|
|
12509
12511
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
12510
12512
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
12511
12513
|
return e.$anchor;
|
|
12512
|
-
const n =
|
|
12514
|
+
const n = Vn(e.$head) || p0(e.$head);
|
|
12513
12515
|
if (n)
|
|
12514
12516
|
return n;
|
|
12515
12517
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
@@ -13096,7 +13098,7 @@ function P0(t) {
|
|
|
13096
13098
|
i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
|
|
13097
13099
|
} else {
|
|
13098
13100
|
if (i = f0(o.$from), !i) return !1;
|
|
13099
|
-
s = (r =
|
|
13101
|
+
s = (r = Vn(o.$from)) == null ? void 0 : r.pos;
|
|
13100
13102
|
}
|
|
13101
13103
|
if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
|
|
13102
13104
|
return !1;
|
|
@@ -13205,7 +13207,7 @@ function hl(t, e, n) {
|
|
|
13205
13207
|
}
|
|
13206
13208
|
return !0;
|
|
13207
13209
|
}
|
|
13208
|
-
function
|
|
13210
|
+
function vr(t, e) {
|
|
13209
13211
|
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? L0(t) : function(n, r) {
|
|
13210
13212
|
if (!Ze(n)) return !1;
|
|
13211
13213
|
if (r) {
|
|
@@ -13232,13 +13234,13 @@ function wr(t, e) {
|
|
|
13232
13234
|
return !0;
|
|
13233
13235
|
};
|
|
13234
13236
|
}
|
|
13235
|
-
|
|
13237
|
+
vr("row", {
|
|
13236
13238
|
useDeprecatedLogic: !0
|
|
13237
13239
|
});
|
|
13238
|
-
|
|
13240
|
+
vr("column", {
|
|
13239
13241
|
useDeprecatedLogic: !0
|
|
13240
13242
|
});
|
|
13241
|
-
var F0 =
|
|
13243
|
+
var F0 = vr("cell", {
|
|
13242
13244
|
useDeprecatedLogic: !0
|
|
13243
13245
|
});
|
|
13244
13246
|
function B0(t, e) {
|
|
@@ -13286,7 +13288,7 @@ function _0(t, e) {
|
|
|
13286
13288
|
), !0;
|
|
13287
13289
|
return !1;
|
|
13288
13290
|
}
|
|
13289
|
-
function
|
|
13291
|
+
function Jr(t, e) {
|
|
13290
13292
|
const n = t.selection;
|
|
13291
13293
|
if (!(n instanceof X)) return !1;
|
|
13292
13294
|
if (e) {
|
|
@@ -13498,23 +13500,23 @@ function bl(t, e, n, r, o) {
|
|
|
13498
13500
|
), e(u);
|
|
13499
13501
|
}
|
|
13500
13502
|
var j0 = Ts({
|
|
13501
|
-
ArrowLeft:
|
|
13502
|
-
ArrowRight:
|
|
13503
|
-
ArrowUp:
|
|
13504
|
-
ArrowDown:
|
|
13505
|
-
"Shift-ArrowLeft":
|
|
13506
|
-
"Shift-ArrowRight":
|
|
13507
|
-
"Shift-ArrowUp":
|
|
13508
|
-
"Shift-ArrowDown":
|
|
13509
|
-
Backspace:
|
|
13510
|
-
"Mod-Backspace":
|
|
13511
|
-
Delete:
|
|
13512
|
-
"Mod-Delete":
|
|
13503
|
+
ArrowLeft: Yr("horiz", -1),
|
|
13504
|
+
ArrowRight: Yr("horiz", 1),
|
|
13505
|
+
ArrowUp: Yr("vert", -1),
|
|
13506
|
+
ArrowDown: Yr("vert", 1),
|
|
13507
|
+
"Shift-ArrowLeft": Gr("horiz", -1),
|
|
13508
|
+
"Shift-ArrowRight": Gr("horiz", 1),
|
|
13509
|
+
"Shift-ArrowUp": Gr("vert", -1),
|
|
13510
|
+
"Shift-ArrowDown": Gr("vert", 1),
|
|
13511
|
+
Backspace: Jr,
|
|
13512
|
+
"Mod-Backspace": Jr,
|
|
13513
|
+
Delete: Jr,
|
|
13514
|
+
"Mod-Delete": Jr
|
|
13513
13515
|
});
|
|
13514
13516
|
function so(t, e, n) {
|
|
13515
13517
|
return n.eq(t.selection) ? !1 : (e && e(t.tr.setSelection(n).scrollIntoView()), !0);
|
|
13516
13518
|
}
|
|
13517
|
-
function
|
|
13519
|
+
function Yr(t, e) {
|
|
13518
13520
|
return (n, r, o) => {
|
|
13519
13521
|
if (!o) return !1;
|
|
13520
13522
|
const i = n.selection;
|
|
@@ -13540,7 +13542,7 @@ function Jr(t, e) {
|
|
|
13540
13542
|
}
|
|
13541
13543
|
};
|
|
13542
13544
|
}
|
|
13543
|
-
function
|
|
13545
|
+
function Gr(t, e) {
|
|
13544
13546
|
return (n, r, o) => {
|
|
13545
13547
|
if (!o) return !1;
|
|
13546
13548
|
const i = n.selection;
|
|
@@ -13561,7 +13563,7 @@ function Yr(t, e) {
|
|
|
13561
13563
|
};
|
|
13562
13564
|
}
|
|
13563
13565
|
function W0(t, e) {
|
|
13564
|
-
const n = t.state.doc, r =
|
|
13566
|
+
const n = t.state.doc, r = Vn(n.resolve(e));
|
|
13565
13567
|
return r ? (t.dispatch(t.state.tr.setSelection(new X(r))), !0) : !1;
|
|
13566
13568
|
}
|
|
13567
13569
|
function U0(t, e, n) {
|
|
@@ -13602,7 +13604,7 @@ function q0(t, e) {
|
|
|
13602
13604
|
let o;
|
|
13603
13605
|
if (e.shiftKey && t.state.selection instanceof X)
|
|
13604
13606
|
i(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
13605
|
-
else if (e.shiftKey && r && (o =
|
|
13607
|
+
else if (e.shiftKey && r && (o = Vn(t.state.selection.$anchor)) != null && ((n = di(t, e)) == null ? void 0 : n.pos) != o.pos)
|
|
13606
13608
|
i(o, e), e.preventDefault();
|
|
13607
13609
|
else if (!r)
|
|
13608
13610
|
return;
|
|
@@ -13656,7 +13658,7 @@ function di(t, e) {
|
|
|
13656
13658
|
left: e.clientX,
|
|
13657
13659
|
top: e.clientY
|
|
13658
13660
|
});
|
|
13659
|
-
return n && n ?
|
|
13661
|
+
return n && n ? Vn(t.state.doc.resolve(n.pos)) : null;
|
|
13660
13662
|
}
|
|
13661
13663
|
var K0 = class {
|
|
13662
13664
|
constructor(t, e) {
|
|
@@ -13855,7 +13857,7 @@ function vl(t, e, n, r) {
|
|
|
13855
13857
|
top: e.clientY
|
|
13856
13858
|
});
|
|
13857
13859
|
if (!i) return -1;
|
|
13858
|
-
const { pos: s } = i, a =
|
|
13860
|
+
const { pos: s } = i, a = Vn(t.state.doc.resolve(s));
|
|
13859
13861
|
if (!a) return -1;
|
|
13860
13862
|
if (n == "right") return a.pos;
|
|
13861
13863
|
const l = re.get(a.node(-1)), c = a.start(-1), d = l.map.indexOf(a.pos - c);
|
|
@@ -13963,7 +13965,7 @@ function ow({
|
|
|
13963
13965
|
}
|
|
13964
13966
|
});
|
|
13965
13967
|
}
|
|
13966
|
-
const iw = (t) => t instanceof X,
|
|
13968
|
+
const iw = (t) => t instanceof X, Zr = ({ editor: t }) => {
|
|
13967
13969
|
const { selection: e } = t.state;
|
|
13968
13970
|
if (!iw(e)) return !1;
|
|
13969
13971
|
let n = 0;
|
|
@@ -14084,8 +14086,8 @@ const iw = (t) => t instanceof X, Gr = ({ editor: t }) => {
|
|
|
14084
14086
|
mergeCells: () => ({ state: t, dispatch: e }) => fl(t, e),
|
|
14085
14087
|
splitCell: () => ({ state: t, dispatch: e }) => pl(t, e),
|
|
14086
14088
|
mergeOrSplit: () => ({ state: t, dispatch: e }) => fl(t, e) ? !0 : pl(t, e),
|
|
14087
|
-
toggleHeaderColumn: () => ({ state: t, dispatch: e }) =>
|
|
14088
|
-
toggleHeaderRow: () => ({ state: t, dispatch: e }) =>
|
|
14089
|
+
toggleHeaderColumn: () => ({ state: t, dispatch: e }) => vr("column")(t, e),
|
|
14090
|
+
toggleHeaderRow: () => ({ state: t, dispatch: e }) => vr("row")(t, e),
|
|
14089
14091
|
toggleHeaderCell: () => ({ state: t, dispatch: e }) => F0(t, e),
|
|
14090
14092
|
setCellAttr: (t, e) => ({ state: n, dispatch: r }) => R0(t, e)(n, r),
|
|
14091
14093
|
goToNextCell: () => ({ state: t, dispatch: e }) => ml(1)(t, e),
|
|
@@ -14115,10 +14117,10 @@ const iw = (t) => t instanceof X, Gr = ({ editor: t }) => {
|
|
|
14115
14117
|
return {
|
|
14116
14118
|
Tab: () => this.editor.commands.goToNextCell() ? !0 : this.editor.can().addRowAfter() ? this.editor.chain().addRowAfter().goToNextCell().run() : !1,
|
|
14117
14119
|
"Shift-Tab": () => this.editor.commands.goToPreviousCell(),
|
|
14118
|
-
Backspace:
|
|
14119
|
-
"Mod-Backspace":
|
|
14120
|
-
Delete:
|
|
14121
|
-
"Mod-Delete":
|
|
14120
|
+
Backspace: Zr,
|
|
14121
|
+
"Mod-Backspace": Zr,
|
|
14122
|
+
Delete: Zr,
|
|
14123
|
+
"Mod-Delete": Zr
|
|
14122
14124
|
};
|
|
14123
14125
|
},
|
|
14124
14126
|
addPmPlugins() {
|
|
@@ -14616,16 +14618,16 @@ class mw extends Error {
|
|
|
14616
14618
|
super(`Failed to parse color: "${e}"`);
|
|
14617
14619
|
}
|
|
14618
14620
|
}
|
|
14619
|
-
var
|
|
14621
|
+
var Qn = mw;
|
|
14620
14622
|
function gw(t) {
|
|
14621
|
-
if (typeof t != "string") throw new
|
|
14623
|
+
if (typeof t != "string") throw new Qn(t);
|
|
14622
14624
|
if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
14623
14625
|
let e = t.trim();
|
|
14624
14626
|
e = xw.test(t) ? ww(t) : t;
|
|
14625
14627
|
const n = vw.exec(e);
|
|
14626
14628
|
if (n) {
|
|
14627
14629
|
const s = Array.from(n).slice(1);
|
|
14628
|
-
return [...s.slice(0, 3).map((a) => parseInt(
|
|
14630
|
+
return [...s.slice(0, 3).map((a) => parseInt(kr(a, 2), 16)), parseInt(kr(s[3] || "f", 2), 16) / 255];
|
|
14629
14631
|
}
|
|
14630
14632
|
const r = kw.exec(e);
|
|
14631
14633
|
if (r) {
|
|
@@ -14640,11 +14642,11 @@ function gw(t) {
|
|
|
14640
14642
|
const i = Sw.exec(e);
|
|
14641
14643
|
if (i) {
|
|
14642
14644
|
const [s, a, l, c] = Array.from(i).slice(1).map(parseFloat);
|
|
14643
|
-
if (as(0, 100, a) !== a) throw new
|
|
14644
|
-
if (as(0, 100, l) !== l) throw new
|
|
14645
|
+
if (as(0, 100, a) !== a) throw new Qn(t);
|
|
14646
|
+
if (as(0, 100, l) !== l) throw new Qn(t);
|
|
14645
14647
|
return [...Mw(s, a, l), Number.isNaN(c) ? 1 : c];
|
|
14646
14648
|
}
|
|
14647
|
-
throw new
|
|
14649
|
+
throw new Qn(t);
|
|
14648
14650
|
}
|
|
14649
14651
|
function yw(t) {
|
|
14650
14652
|
let e = 5381, n = t.length;
|
|
@@ -14661,10 +14663,10 @@ const Sl = (t) => parseInt(t.replace(/_/g, ""), 36), bw = "1q29ehhb 1n09sgk7 1kl
|
|
|
14661
14663
|
}, {});
|
|
14662
14664
|
function ww(t) {
|
|
14663
14665
|
const e = t.toLowerCase().trim(), n = bw[yw(e)];
|
|
14664
|
-
if (!n) throw new
|
|
14666
|
+
if (!n) throw new Qn(t);
|
|
14665
14667
|
return `#${n}`;
|
|
14666
14668
|
}
|
|
14667
|
-
const
|
|
14669
|
+
const kr = (t, e) => Array.from(Array(e)).map(() => t).join(""), vw = new RegExp(`^#${kr("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), kw = new RegExp(`^#${kr("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Cw = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${kr(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Sw = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, xw = /^[a-z]+$/i, xl = (t) => Math.round(t * 255), Mw = (t, e, n) => {
|
|
14668
14670
|
let r = n / 100;
|
|
14669
14671
|
if (e === 0)
|
|
14670
14672
|
return [r, r, r].map(xl);
|
|
@@ -15827,7 +15829,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15827
15829
|
acceptTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
|
|
15828
15830
|
let { tr: o, doc: i } = n;
|
|
15829
15831
|
o.setMeta("acceptReject", !0);
|
|
15830
|
-
const s = new
|
|
15832
|
+
const s = new cr();
|
|
15831
15833
|
return i.nodesBetween(t, e, (a, l) => {
|
|
15832
15834
|
if (a.marks && a.marks.find((c) => c.type.name === ue)) {
|
|
15833
15835
|
const c = new Vt(
|
|
@@ -15839,7 +15841,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15839
15841
|
} else if (a.marks && a.marks.find((c) => c.type.name === Ve)) {
|
|
15840
15842
|
const c = a.marks.find((d) => d.type.name === Ve);
|
|
15841
15843
|
o.step(
|
|
15842
|
-
new
|
|
15844
|
+
new Cn(
|
|
15843
15845
|
s.map(Math.max(l, t)),
|
|
15844
15846
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15845
15847
|
c
|
|
@@ -15848,7 +15850,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15848
15850
|
} else if (a.marks && a.marks.find((c) => c.type.name === xe)) {
|
|
15849
15851
|
const c = a.marks.find((d) => d.type.name === xe);
|
|
15850
15852
|
o.step(
|
|
15851
|
-
new
|
|
15853
|
+
new Cn(
|
|
15852
15854
|
s.map(Math.max(l, t)),
|
|
15853
15855
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15854
15856
|
c
|
|
@@ -15860,12 +15862,12 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15860
15862
|
rejectTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
|
|
15861
15863
|
const { tr: o, doc: i } = n;
|
|
15862
15864
|
o.setMeta("acceptReject", !0);
|
|
15863
|
-
const s = new
|
|
15865
|
+
const s = new cr();
|
|
15864
15866
|
return i.nodesBetween(t, e, (a, l) => {
|
|
15865
15867
|
if (a.marks && a.marks.find((c) => c.type.name === ue)) {
|
|
15866
15868
|
const c = a.marks.find((d) => d.type.name === ue);
|
|
15867
15869
|
o.step(
|
|
15868
|
-
new
|
|
15870
|
+
new Cn(
|
|
15869
15871
|
s.map(Math.max(l, t)),
|
|
15870
15872
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15871
15873
|
c
|
|
@@ -15890,14 +15892,14 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15890
15892
|
);
|
|
15891
15893
|
}), c.attrs.after.forEach((d) => {
|
|
15892
15894
|
o.step(
|
|
15893
|
-
new
|
|
15895
|
+
new Cn(
|
|
15894
15896
|
s.map(Math.max(l, t)),
|
|
15895
15897
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15896
15898
|
a.marks.find((u) => u.type.name === d.type)
|
|
15897
15899
|
)
|
|
15898
15900
|
);
|
|
15899
15901
|
}), o.step(
|
|
15900
|
-
new
|
|
15902
|
+
new Cn(
|
|
15901
15903
|
s.map(Math.max(l, t)),
|
|
15902
15904
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15903
15905
|
c
|
|
@@ -16020,10 +16022,10 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
16020
16022
|
})];
|
|
16021
16023
|
}
|
|
16022
16024
|
});
|
|
16023
|
-
var De = "top", Ue = "bottom", qe = "right", Ne = "left", Vs = "auto",
|
|
16024
|
-
return t.concat([e + "-" +
|
|
16025
|
-
}, []), _u = /* @__PURE__ */ [].concat(
|
|
16026
|
-
return t.concat([e, e + "-" +
|
|
16025
|
+
var De = "top", Ue = "bottom", qe = "right", Ne = "left", Vs = "auto", Ir = [De, Ue, qe, Ne], Pn = "start", Cr = "end", Bw = "clippingParents", Bu = "viewport", Jn = "popper", _w = "reference", Ol = /* @__PURE__ */ Ir.reduce(function(t, e) {
|
|
16026
|
+
return t.concat([e + "-" + Pn, e + "-" + Cr]);
|
|
16027
|
+
}, []), _u = /* @__PURE__ */ [].concat(Ir, [Vs]).reduce(function(t, e) {
|
|
16028
|
+
return t.concat([e, e + "-" + Pn, e + "-" + Cr]);
|
|
16027
16029
|
}, []), zw = "beforeRead", $w = "read", Vw = "afterRead", Hw = "beforeMain", jw = "main", Ww = "afterMain", Uw = "beforeWrite", qw = "write", Kw = "afterWrite", Xw = [zw, $w, Vw, Hw, jw, Ww, Uw, qw, Kw];
|
|
16028
16030
|
function lt(t) {
|
|
16029
16031
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
@@ -16096,7 +16098,7 @@ const zu = {
|
|
|
16096
16098
|
function it(t) {
|
|
16097
16099
|
return t.split("-")[0];
|
|
16098
16100
|
}
|
|
16099
|
-
var sn = Math.max, Oo = Math.min,
|
|
16101
|
+
var sn = Math.max, Oo = Math.min, Rn = Math.round;
|
|
16100
16102
|
function ds() {
|
|
16101
16103
|
var t = navigator.userAgentData;
|
|
16102
16104
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
@@ -16106,10 +16108,10 @@ function ds() {
|
|
|
16106
16108
|
function $u() {
|
|
16107
16109
|
return !/^((?!chrome|android).)*safari/i.test(ds());
|
|
16108
16110
|
}
|
|
16109
|
-
function
|
|
16111
|
+
function Ln(t, e, n) {
|
|
16110
16112
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
16111
16113
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
16112
|
-
e && We(t) && (o = t.offsetWidth > 0 &&
|
|
16114
|
+
e && We(t) && (o = t.offsetWidth > 0 && Rn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Rn(r.height) / t.offsetHeight || 1);
|
|
16113
16115
|
var s = un(t) ? Le(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;
|
|
16114
16116
|
return {
|
|
16115
16117
|
width: u,
|
|
@@ -16123,7 +16125,7 @@ function Rn(t, e, n) {
|
|
|
16123
16125
|
};
|
|
16124
16126
|
}
|
|
16125
16127
|
function js(t) {
|
|
16126
|
-
var e =
|
|
16128
|
+
var e = Ln(t), n = t.offsetWidth, r = t.offsetHeight;
|
|
16127
16129
|
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
|
|
16128
16130
|
x: t.offsetLeft,
|
|
16129
16131
|
y: t.offsetTop,
|
|
@@ -16189,7 +16191,7 @@ function Zw(t) {
|
|
|
16189
16191
|
}
|
|
16190
16192
|
return null;
|
|
16191
16193
|
}
|
|
16192
|
-
function
|
|
16194
|
+
function Pr(t) {
|
|
16193
16195
|
for (var e = Le(t), n = Tl(t); n && Gw(n) && St(n).position === "static"; )
|
|
16194
16196
|
n = Tl(n);
|
|
16195
16197
|
return n && (lt(n) === "html" || lt(n) === "body" && St(n).position === "static") ? e : n || Zw(t) || e;
|
|
@@ -16197,11 +16199,11 @@ function Ir(t) {
|
|
|
16197
16199
|
function Ws(t) {
|
|
16198
16200
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
16199
16201
|
}
|
|
16200
|
-
function
|
|
16202
|
+
function ir(t, e, n) {
|
|
16201
16203
|
return sn(t, Oo(e, n));
|
|
16202
16204
|
}
|
|
16203
16205
|
function Qw(t, e, n) {
|
|
16204
|
-
var r =
|
|
16206
|
+
var r = ir(t, e, n);
|
|
16205
16207
|
return r > n ? n : r;
|
|
16206
16208
|
}
|
|
16207
16209
|
function Hu() {
|
|
@@ -16223,12 +16225,12 @@ function Wu(t, e) {
|
|
|
16223
16225
|
var ev = function(e, n) {
|
|
16224
16226
|
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
16225
16227
|
placement: n.placement
|
|
16226
|
-
})) : e, ju(typeof e != "number" ? e : Wu(e,
|
|
16228
|
+
})) : e, ju(typeof e != "number" ? e : Wu(e, Ir));
|
|
16227
16229
|
};
|
|
16228
16230
|
function tv(t) {
|
|
16229
16231
|
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = it(n.placement), l = Ws(a), c = [Ne, qe].indexOf(a) >= 0, d = c ? "height" : "width";
|
|
16230
16232
|
if (!(!i || !s)) {
|
|
16231
|
-
var u = ev(o.padding, n), f = js(i), p = l === "y" ? De : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b =
|
|
16233
|
+
var u = ev(o.padding, n), f = js(i), p = l === "y" ? De : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Pr(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, M = ir(y, k, S), L = l;
|
|
16232
16234
|
n.modifiersData[r] = (e = {}, e[L] = M, e.centerOffset = M - k, e);
|
|
16233
16235
|
}
|
|
16234
16236
|
}
|
|
@@ -16245,7 +16247,7 @@ const rv = {
|
|
|
16245
16247
|
requires: ["popperOffsets"],
|
|
16246
16248
|
requiresIfExists: ["preventOverflow"]
|
|
16247
16249
|
};
|
|
16248
|
-
function
|
|
16250
|
+
function Fn(t) {
|
|
16249
16251
|
return t.split("-")[1];
|
|
16250
16252
|
}
|
|
16251
16253
|
var ov = {
|
|
@@ -16257,8 +16259,8 @@ var ov = {
|
|
|
16257
16259
|
function iv(t, e) {
|
|
16258
16260
|
var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
|
|
16259
16261
|
return {
|
|
16260
|
-
x:
|
|
16261
|
-
y:
|
|
16262
|
+
x: Rn(n * o) / o || 0,
|
|
16263
|
+
y: Rn(r * o) / o || 0
|
|
16262
16264
|
};
|
|
16263
16265
|
}
|
|
16264
16266
|
function Dl(t) {
|
|
@@ -16272,8 +16274,8 @@ function Dl(t) {
|
|
|
16272
16274
|
p = g.x, m = g.y;
|
|
16273
16275
|
var b = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), C = Ne, y = De, S = window;
|
|
16274
16276
|
if (c) {
|
|
16275
|
-
var k =
|
|
16276
|
-
if (k === Le(n) && (k = Ut(n), St(k).position !== "static" && a === "absolute" && (M = "scrollHeight", L = "scrollWidth")), k = k, o === De || (o === Ne || o === qe) && i ===
|
|
16277
|
+
var k = Pr(n), M = "clientHeight", L = "clientWidth";
|
|
16278
|
+
if (k === Le(n) && (k = Ut(n), St(k).position !== "static" && a === "absolute" && (M = "scrollHeight", L = "scrollWidth")), k = k, o === De || (o === Ne || o === qe) && i === Cr) {
|
|
16277
16279
|
y = Ue;
|
|
16278
16280
|
var x = u && k === S && S.visualViewport ? S.visualViewport.height : (
|
|
16279
16281
|
// $FlowFixMe[prop-missing]
|
|
@@ -16281,7 +16283,7 @@ function Dl(t) {
|
|
|
16281
16283
|
);
|
|
16282
16284
|
m -= x - r.height, m *= l ? 1 : -1;
|
|
16283
16285
|
}
|
|
16284
|
-
if (o === Ne || (o === De || o === Ue) && i ===
|
|
16286
|
+
if (o === Ne || (o === De || o === Ue) && i === Cr) {
|
|
16285
16287
|
C = qe;
|
|
16286
16288
|
var $ = u && k === S && S.visualViewport ? S.visualViewport.width : (
|
|
16287
16289
|
// $FlowFixMe[prop-missing]
|
|
@@ -16308,7 +16310,7 @@ function Dl(t) {
|
|
|
16308
16310
|
function sv(t) {
|
|
16309
16311
|
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
16310
16312
|
placement: it(e.placement),
|
|
16311
|
-
variation:
|
|
16313
|
+
variation: Fn(e.placement),
|
|
16312
16314
|
popper: e.elements.popper,
|
|
16313
16315
|
popperRect: e.rects.popper,
|
|
16314
16316
|
gpuAcceleration: o,
|
|
@@ -16335,17 +16337,17 @@ const av = {
|
|
|
16335
16337
|
fn: sv,
|
|
16336
16338
|
data: {}
|
|
16337
16339
|
};
|
|
16338
|
-
var
|
|
16340
|
+
var Qr = {
|
|
16339
16341
|
passive: !0
|
|
16340
16342
|
};
|
|
16341
16343
|
function lv(t) {
|
|
16342
16344
|
var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, s = r.resize, a = s === void 0 ? !0 : s, l = Le(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
16343
16345
|
return i && c.forEach(function(d) {
|
|
16344
|
-
d.addEventListener("scroll", n.update,
|
|
16345
|
-
}), a && l.addEventListener("resize", n.update,
|
|
16346
|
+
d.addEventListener("scroll", n.update, Qr);
|
|
16347
|
+
}), a && l.addEventListener("resize", n.update, Qr), function() {
|
|
16346
16348
|
i && c.forEach(function(d) {
|
|
16347
|
-
d.removeEventListener("scroll", n.update,
|
|
16348
|
-
}), a && l.removeEventListener("resize", n.update,
|
|
16349
|
+
d.removeEventListener("scroll", n.update, Qr);
|
|
16350
|
+
}), a && l.removeEventListener("resize", n.update, Qr);
|
|
16349
16351
|
};
|
|
16350
16352
|
}
|
|
16351
16353
|
const cv = {
|
|
@@ -16385,7 +16387,7 @@ function Us(t) {
|
|
|
16385
16387
|
};
|
|
16386
16388
|
}
|
|
16387
16389
|
function qs(t) {
|
|
16388
|
-
return
|
|
16390
|
+
return Ln(Ut(t)).left + Us(t).scrollLeft;
|
|
16389
16391
|
}
|
|
16390
16392
|
function fv(t, e) {
|
|
16391
16393
|
var n = Le(t), r = Ut(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
|
|
@@ -16417,13 +16419,13 @@ function Ks(t) {
|
|
|
16417
16419
|
function Uu(t) {
|
|
16418
16420
|
return ["html", "body", "#document"].indexOf(lt(t)) >= 0 ? t.ownerDocument.body : We(t) && Ks(t) ? t : Uu(zo(t));
|
|
16419
16421
|
}
|
|
16420
|
-
function
|
|
16422
|
+
function sr(t, e) {
|
|
16421
16423
|
var n;
|
|
16422
16424
|
e === void 0 && (e = []);
|
|
16423
16425
|
var r = Uu(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Le(r), s = o ? [i].concat(i.visualViewport || [], Ks(r) ? r : []) : r, a = e.concat(s);
|
|
16424
16426
|
return o ? a : (
|
|
16425
16427
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
16426
|
-
a.concat(
|
|
16428
|
+
a.concat(sr(zo(s)))
|
|
16427
16429
|
);
|
|
16428
16430
|
}
|
|
16429
16431
|
function us(t) {
|
|
@@ -16435,14 +16437,14 @@ function us(t) {
|
|
|
16435
16437
|
});
|
|
16436
16438
|
}
|
|
16437
16439
|
function hv(t, e) {
|
|
16438
|
-
var n =
|
|
16440
|
+
var n = Ln(t, !1, e === "fixed");
|
|
16439
16441
|
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;
|
|
16440
16442
|
}
|
|
16441
16443
|
function El(t, e, n) {
|
|
16442
16444
|
return e === Bu ? us(fv(t, n)) : un(e) ? hv(e, n) : us(pv(Ut(t)));
|
|
16443
16445
|
}
|
|
16444
16446
|
function mv(t) {
|
|
16445
|
-
var e =
|
|
16447
|
+
var e = sr(zo(t)), n = ["absolute", "fixed"].indexOf(St(t).position) >= 0, r = n && We(t) ? Pr(t) : t;
|
|
16446
16448
|
return un(r) ? e.filter(function(o) {
|
|
16447
16449
|
return un(o) && Vu(o, r) && lt(o) !== "body";
|
|
16448
16450
|
}) : [];
|
|
@@ -16455,7 +16457,7 @@ function gv(t, e, n, r) {
|
|
|
16455
16457
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
16456
16458
|
}
|
|
16457
16459
|
function qu(t) {
|
|
16458
|
-
var e = t.reference, n = t.element, r = t.placement, o = r ? it(r) : null, i = r ?
|
|
16460
|
+
var e = t.reference, n = t.element, r = t.placement, o = r ? it(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;
|
|
16459
16461
|
switch (o) {
|
|
16460
16462
|
case De:
|
|
16461
16463
|
l = {
|
|
@@ -16491,29 +16493,29 @@ function qu(t) {
|
|
|
16491
16493
|
if (c != null) {
|
|
16492
16494
|
var d = c === "y" ? "height" : "width";
|
|
16493
16495
|
switch (i) {
|
|
16494
|
-
case
|
|
16496
|
+
case Pn:
|
|
16495
16497
|
l[c] = l[c] - (e[d] / 2 - n[d] / 2);
|
|
16496
16498
|
break;
|
|
16497
|
-
case
|
|
16499
|
+
case Cr:
|
|
16498
16500
|
l[c] = l[c] + (e[d] / 2 - n[d] / 2);
|
|
16499
16501
|
break;
|
|
16500
16502
|
}
|
|
16501
16503
|
}
|
|
16502
16504
|
return l;
|
|
16503
16505
|
}
|
|
16504
|
-
function
|
|
16506
|
+
function Sr(t, e) {
|
|
16505
16507
|
e === void 0 && (e = {});
|
|
16506
|
-
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 ? Bw : a, c = n.rootBoundary, d = c === void 0 ? Bu : c, u = n.elementContext, f = u === void 0 ?
|
|
16508
|
+
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 ? Bw : 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 ? _w : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = gv(un(y) ? y : y.contextElement || Ut(t.elements.popper), l, d, s), k = Ln(t.elements.reference), M = qu({
|
|
16507
16509
|
reference: k,
|
|
16508
16510
|
element: C,
|
|
16509
16511
|
placement: o
|
|
16510
|
-
}), L = us(Object.assign({}, C, M)), x = f ===
|
|
16512
|
+
}), L = us(Object.assign({}, C, M)), x = f === Jn ? L : k, $ = {
|
|
16511
16513
|
top: S.top - x.top + b.top,
|
|
16512
16514
|
bottom: x.bottom - S.bottom + b.bottom,
|
|
16513
16515
|
left: S.left - x.left + b.left,
|
|
16514
16516
|
right: x.right - S.right + b.right
|
|
16515
16517
|
}, _ = t.modifiersData.offset;
|
|
16516
|
-
if (f ===
|
|
16518
|
+
if (f === Jn && _) {
|
|
16517
16519
|
var U = _[o];
|
|
16518
16520
|
Object.keys($).forEach(function(W) {
|
|
16519
16521
|
var ee = [qe, Ue].indexOf(W) >= 0 ? 1 : -1, oe = [De, Ue].indexOf(W) >= 0 ? "y" : "x";
|
|
@@ -16524,14 +16526,14 @@ function Cr(t, e) {
|
|
|
16524
16526
|
}
|
|
16525
16527
|
function yv(t, e) {
|
|
16526
16528
|
e === void 0 && (e = {});
|
|
16527
|
-
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 =
|
|
16528
|
-
return
|
|
16529
|
-
}) :
|
|
16529
|
+
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) {
|
|
16530
|
+
return Fn(h) === d;
|
|
16531
|
+
}) : Ir, f = u.filter(function(h) {
|
|
16530
16532
|
return c.indexOf(h) >= 0;
|
|
16531
16533
|
});
|
|
16532
16534
|
f.length === 0 && (f = u);
|
|
16533
16535
|
var p = f.reduce(function(h, m) {
|
|
16534
|
-
return h[m] =
|
|
16536
|
+
return h[m] = Sr(t, {
|
|
16535
16537
|
placement: m,
|
|
16536
16538
|
boundary: o,
|
|
16537
16539
|
rootBoundary: i,
|
|
@@ -16561,7 +16563,7 @@ function wv(t) {
|
|
|
16561
16563
|
allowedAutoPlacements: m
|
|
16562
16564
|
}) : Ee);
|
|
16563
16565
|
}, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(), L = !0, x = y[0], $ = 0; $ < y.length; $++) {
|
|
16564
|
-
var _ = y[$], U = it(_), W =
|
|
16566
|
+
var _ = y[$], U = it(_), W = Fn(_) === Pn, ee = [De, Ue].indexOf(U) >= 0, oe = ee ? "width" : "height", ae = Sr(e, {
|
|
16565
16567
|
placement: _,
|
|
16566
16568
|
boundary: d,
|
|
16567
16569
|
rootBoundary: u,
|
|
@@ -16623,9 +16625,9 @@ function Pl(t) {
|
|
|
16623
16625
|
});
|
|
16624
16626
|
}
|
|
16625
16627
|
function kv(t) {
|
|
16626
|
-
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s =
|
|
16628
|
+
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = Sr(e, {
|
|
16627
16629
|
elementContext: "reference"
|
|
16628
|
-
}), a =
|
|
16630
|
+
}), a = Sr(e, {
|
|
16629
16631
|
altBoundary: !0
|
|
16630
16632
|
}), l = Il(s, r), c = Il(a, o, i), d = Pl(l), u = Pl(c);
|
|
16631
16633
|
e.modifiersData[n] = {
|
|
@@ -16689,12 +16691,12 @@ function Tv(t) {
|
|
|
16689
16691
|
return t === "x" ? "y" : "x";
|
|
16690
16692
|
}
|
|
16691
16693
|
function Dv(t) {
|
|
16692
|
-
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g =
|
|
16694
|
+
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = Sr(e, {
|
|
16693
16695
|
boundary: l,
|
|
16694
16696
|
rootBoundary: c,
|
|
16695
16697
|
padding: u,
|
|
16696
16698
|
altBoundary: d
|
|
16697
|
-
}), b = it(e.placement), w =
|
|
16699
|
+
}), b = it(e.placement), w = Fn(e.placement), C = !w, y = Ws(b), S = Tv(y), k = e.modifiersData.popperOffsets, M = e.rects.reference, L = e.rects.popper, x = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
16698
16700
|
placement: e.placement
|
|
16699
16701
|
})) : m, $ = typeof x == "number" ? {
|
|
16700
16702
|
mainAxis: x,
|
|
@@ -16708,15 +16710,15 @@ function Dv(t) {
|
|
|
16708
16710
|
};
|
|
16709
16711
|
if (k) {
|
|
16710
16712
|
if (i) {
|
|
16711
|
-
var W, ee = y === "y" ? De : Ne, oe = y === "y" ? Ue : qe, ae = y === "y" ? "height" : "width", ce = k[y], se = ce + g[ee], pe = ce - g[oe], ke = p ? -L[ae] / 2 : 0, Be = w ===
|
|
16713
|
+
var W, ee = y === "y" ? De : Ne, oe = y === "y" ? Ue : qe, ae = y === "y" ? "height" : "width", ce = k[y], se = ce + g[ee], pe = ce - g[oe], ke = p ? -L[ae] / 2 : 0, Be = w === Pn ? M[ae] : L[ae], Ce = w === Pn ? -L[ae] : -M[ae], dt = e.elements.arrow, Ke = p && dt ? js(dt) : {
|
|
16712
16714
|
width: 0,
|
|
16713
16715
|
height: 0
|
|
16714
|
-
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Xe = Ee[ee], Mt = Ee[oe], Je =
|
|
16715
|
-
k[y] =
|
|
16716
|
+
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Xe = Ee[ee], Mt = Ee[oe], Je = ir(0, M[ae], Ke[ae]), At = C ? M[ae] / 2 - ke - Je - Xe - $.mainAxis : Be - Je - Xe - $.mainAxis, Ot = C ? -M[ae] / 2 + ke + Je + Mt + $.mainAxis : Ce + Je + Mt + $.mainAxis, fn = e.elements.arrow && Pr(e.elements.arrow), Lr = fn ? y === "y" ? fn.clientTop || 0 : fn.clientLeft || 0 : 0, Hn = (W = _?.[y]) != null ? W : 0, Fr = ce + At - Hn - Lr, Br = ce + Ot - Hn, jn = ir(p ? Oo(se, Fr) : se, ce, p ? sn(pe, Br) : pe);
|
|
16717
|
+
k[y] = jn, U[y] = jn - ce;
|
|
16716
16718
|
}
|
|
16717
16719
|
if (a) {
|
|
16718
|
-
var
|
|
16719
|
-
k[S] =
|
|
16720
|
+
var Wn, _r = y === "x" ? De : Ne, zr = y === "x" ? Ue : qe, ut = k[S], Tt = S === "y" ? "height" : "width", Un = ut + g[_r], qt = ut - g[zr], qn = [De, Ne].indexOf(b) !== -1, $r = (Wn = _?.[S]) != null ? Wn : 0, Vr = qn ? Un : ut - M[Tt] - L[Tt] - $r + $.altAxis, Hr = qn ? ut + M[Tt] + L[Tt] - $r - $.altAxis : qt, jr = p && qn ? Qw(Vr, ut, Hr) : ir(p ? Vr : Un, ut, p ? Hr : qt);
|
|
16721
|
+
k[S] = jr, U[S] = jr - ut;
|
|
16720
16722
|
}
|
|
16721
16723
|
e.modifiersData[r] = U;
|
|
16722
16724
|
}
|
|
@@ -16738,12 +16740,12 @@ function Iv(t) {
|
|
|
16738
16740
|
return t === Le(t) || !We(t) ? Us(t) : Ev(t);
|
|
16739
16741
|
}
|
|
16740
16742
|
function Pv(t) {
|
|
16741
|
-
var e = t.getBoundingClientRect(), n =
|
|
16743
|
+
var e = t.getBoundingClientRect(), n = Rn(e.width) / t.offsetWidth || 1, r = Rn(e.height) / t.offsetHeight || 1;
|
|
16742
16744
|
return n !== 1 || r !== 1;
|
|
16743
16745
|
}
|
|
16744
16746
|
function Rv(t, e, n) {
|
|
16745
16747
|
n === void 0 && (n = !1);
|
|
16746
|
-
var r = We(e), o = We(e) && Pv(e), i = Ut(e), s =
|
|
16748
|
+
var r = We(e), o = We(e) && Pv(e), i = Ut(e), s = Ln(t, o, n), a = {
|
|
16747
16749
|
scrollLeft: 0,
|
|
16748
16750
|
scrollTop: 0
|
|
16749
16751
|
}, l = {
|
|
@@ -16751,7 +16753,7 @@ function Rv(t, e, n) {
|
|
|
16751
16753
|
y: 0
|
|
16752
16754
|
};
|
|
16753
16755
|
return (r || !r && !n) && ((lt(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
16754
|
-
Ks(i)) && (a = Iv(e)), We(e) ? (l =
|
|
16756
|
+
Ks(i)) && (a = Iv(e)), We(e) ? (l = Ln(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = qs(i))), {
|
|
16755
16757
|
x: s.left + a.scrollLeft - l.x,
|
|
16756
16758
|
y: s.top + a.scrollTop - l.y,
|
|
16757
16759
|
width: s.width,
|
|
@@ -16840,8 +16842,8 @@ function zv(t) {
|
|
|
16840
16842
|
setOptions: function(b) {
|
|
16841
16843
|
var w = typeof b == "function" ? b(d.options) : b;
|
|
16842
16844
|
m(), d.options = Object.assign({}, i, d.options, w), d.scrollParents = {
|
|
16843
|
-
reference: un(a) ?
|
|
16844
|
-
popper:
|
|
16845
|
+
reference: un(a) ? sr(a) : a.contextElement ? sr(a.contextElement) : [],
|
|
16846
|
+
popper: sr(l)
|
|
16845
16847
|
};
|
|
16846
16848
|
var C = Fv(_v([].concat(r, d.options.modifiers)));
|
|
16847
16849
|
return d.orderedModifiers = C.filter(function(y) {
|
|
@@ -16858,7 +16860,7 @@ function zv(t) {
|
|
|
16858
16860
|
var b = d.elements, w = b.reference, C = b.popper;
|
|
16859
16861
|
if (Ll(w, C)) {
|
|
16860
16862
|
d.rects = {
|
|
16861
|
-
reference: Rv(w,
|
|
16863
|
+
reference: Rv(w, Pr(C), d.options.strategy === "fixed"),
|
|
16862
16864
|
popper: js(C)
|
|
16863
16865
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function($) {
|
|
16864
16866
|
return d.modifiersData[$.name] = Object.assign({}, $.data);
|
|
@@ -16962,7 +16964,7 @@ function Uv(t, e) {
|
|
|
16962
16964
|
function qv(t) {
|
|
16963
16965
|
return t.split(/\s+/).filter(Boolean);
|
|
16964
16966
|
}
|
|
16965
|
-
function
|
|
16967
|
+
function xn(t) {
|
|
16966
16968
|
return [].concat(t);
|
|
16967
16969
|
}
|
|
16968
16970
|
function Bl(t, e) {
|
|
@@ -16984,10 +16986,10 @@ function _l(t) {
|
|
|
16984
16986
|
return t[n] !== void 0 && (e[n] = t[n]), e;
|
|
16985
16987
|
}, {});
|
|
16986
16988
|
}
|
|
16987
|
-
function
|
|
16989
|
+
function ar() {
|
|
16988
16990
|
return document.createElement("div");
|
|
16989
16991
|
}
|
|
16990
|
-
function
|
|
16992
|
+
function xr(t) {
|
|
16991
16993
|
return ["Element", "Fragment"].some(function(e) {
|
|
16992
16994
|
return Xs(t, e);
|
|
16993
16995
|
});
|
|
@@ -17002,7 +17004,7 @@ function Gv(t) {
|
|
|
17002
17004
|
return !!(t && t._tippy && t._tippy.reference === t);
|
|
17003
17005
|
}
|
|
17004
17006
|
function Zv(t) {
|
|
17005
|
-
return
|
|
17007
|
+
return xr(t) ? [t] : Jv(t) ? To(t) : Array.isArray(t) ? t : To(document.querySelectorAll(t));
|
|
17006
17008
|
}
|
|
17007
17009
|
function fi(t, e) {
|
|
17008
17010
|
t.forEach(function(n) {
|
|
@@ -17015,7 +17017,7 @@ function zl(t, e) {
|
|
|
17015
17017
|
});
|
|
17016
17018
|
}
|
|
17017
17019
|
function Qv(t) {
|
|
17018
|
-
var e, n =
|
|
17020
|
+
var e, n = xn(t), r = n[0];
|
|
17019
17021
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
17020
17022
|
}
|
|
17021
17023
|
function ek(t, e) {
|
|
@@ -17095,21 +17097,21 @@ function Qu(t) {
|
|
|
17095
17097
|
"color: #a6a095;"
|
|
17096
17098
|
];
|
|
17097
17099
|
}
|
|
17098
|
-
var
|
|
17100
|
+
var Mr;
|
|
17099
17101
|
ie.env.NODE_ENV !== "production" && ak();
|
|
17100
17102
|
function ak() {
|
|
17101
|
-
|
|
17103
|
+
Mr = /* @__PURE__ */ new Set();
|
|
17102
17104
|
}
|
|
17103
17105
|
function gt(t, e) {
|
|
17104
|
-
if (t && !
|
|
17106
|
+
if (t && !Mr.has(e)) {
|
|
17105
17107
|
var n;
|
|
17106
|
-
|
|
17108
|
+
Mr.add(e), (n = console).warn.apply(n, Qu(e));
|
|
17107
17109
|
}
|
|
17108
17110
|
}
|
|
17109
17111
|
function fs(t, e) {
|
|
17110
|
-
if (t && !
|
|
17112
|
+
if (t && !Mr.has(e)) {
|
|
17111
17113
|
var n;
|
|
17112
|
-
|
|
17114
|
+
Mr.add(e), (n = console).error.apply(n, Qu(e));
|
|
17113
17115
|
}
|
|
17114
17116
|
}
|
|
17115
17117
|
function lk(t) {
|
|
@@ -17245,11 +17247,11 @@ function ps(t, e) {
|
|
|
17245
17247
|
t[pk()] = e;
|
|
17246
17248
|
}
|
|
17247
17249
|
function Wl(t) {
|
|
17248
|
-
var e =
|
|
17249
|
-
return t === !0 ? e.className = Xu : (e.className = Ju,
|
|
17250
|
+
var e = ar();
|
|
17251
|
+
return t === !0 ? e.className = Xu : (e.className = Ju, xr(t) ? e.appendChild(t) : ps(e, t)), e;
|
|
17250
17252
|
}
|
|
17251
17253
|
function Ul(t, e) {
|
|
17252
|
-
|
|
17254
|
+
xr(e.content) ? (ps(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? ps(t, e.content) : t.textContent = e.content);
|
|
17253
17255
|
}
|
|
17254
17256
|
function hs(t) {
|
|
17255
17257
|
var e = t.firstElementChild, n = To(e.children);
|
|
@@ -17267,9 +17269,9 @@ function hs(t) {
|
|
|
17267
17269
|
};
|
|
17268
17270
|
}
|
|
17269
17271
|
function rf(t) {
|
|
17270
|
-
var e =
|
|
17272
|
+
var e = ar(), n = ar();
|
|
17271
17273
|
n.className = Hv, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
17272
|
-
var r =
|
|
17274
|
+
var r = ar();
|
|
17273
17275
|
r.className = Ku, r.setAttribute("data-state", "hidden"), Ul(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
|
|
17274
17276
|
function o(i, s) {
|
|
17275
17277
|
var a = hs(e), l = a.box, c = a.content, d = a.arrow;
|
|
@@ -17281,9 +17283,9 @@ function rf(t) {
|
|
|
17281
17283
|
};
|
|
17282
17284
|
}
|
|
17283
17285
|
rf.$$tippy = !0;
|
|
17284
|
-
var hk = 1,
|
|
17286
|
+
var hk = 1, eo = [], hi = [];
|
|
17285
17287
|
function mk(t, e) {
|
|
17286
|
-
var n = jl(t, Object.assign({}, Pe, tf(_l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Fl(
|
|
17288
|
+
var n = jl(t, Object.assign({}, Pe, 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 = hk++, b = null, w = Kv(n.plugins), C = {
|
|
17287
17289
|
// Is the instance currently enabled?
|
|
17288
17290
|
isEnabled: !0,
|
|
17289
17291
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -17298,20 +17300,20 @@ function mk(t, e) {
|
|
|
17298
17300
|
// properties
|
|
17299
17301
|
id: g,
|
|
17300
17302
|
reference: t,
|
|
17301
|
-
popper:
|
|
17303
|
+
popper: ar(),
|
|
17302
17304
|
popperInstance: b,
|
|
17303
17305
|
props: n,
|
|
17304
17306
|
state: C,
|
|
17305
17307
|
plugins: w,
|
|
17306
17308
|
// methods
|
|
17307
|
-
clearDelayTimeouts:
|
|
17308
|
-
setProps:
|
|
17309
|
-
setContent:
|
|
17309
|
+
clearDelayTimeouts: Vr,
|
|
17310
|
+
setProps: Hr,
|
|
17311
|
+
setContent: jr,
|
|
17310
17312
|
show: of,
|
|
17311
17313
|
hide: sf,
|
|
17312
17314
|
hideWithInteractivity: af,
|
|
17313
|
-
enable:
|
|
17314
|
-
disable:
|
|
17315
|
+
enable: qn,
|
|
17316
|
+
disable: $r,
|
|
17315
17317
|
unmount: lf,
|
|
17316
17318
|
destroy: cf
|
|
17317
17319
|
};
|
|
@@ -17322,7 +17324,7 @@ function mk(t, e) {
|
|
|
17322
17324
|
var L = w.map(function(v) {
|
|
17323
17325
|
return v.fn(y);
|
|
17324
17326
|
}), x = t.hasAttribute("aria-expanded");
|
|
17325
|
-
return fn(), ke(), ce(), se("onCreate", [y]), n.showOnCreate &&
|
|
17327
|
+
return fn(), ke(), ce(), se("onCreate", [y]), n.showOnCreate && Un(), k.addEventListener("mouseenter", function() {
|
|
17326
17328
|
y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
|
|
17327
17329
|
}), k.addEventListener("mouseleave", function() {
|
|
17328
17330
|
y.props.interactive && y.props.trigger.indexOf("mouseenter") >= 0 && ee().addEventListener("mousemove", h);
|
|
@@ -17365,7 +17367,7 @@ function mk(t, e) {
|
|
|
17365
17367
|
function pe() {
|
|
17366
17368
|
var v = y.props.aria;
|
|
17367
17369
|
if (v.content) {
|
|
17368
|
-
var A = "aria-" + v.content, R = k.id, q =
|
|
17370
|
+
var A = "aria-" + v.content, R = k.id, q = xn(y.props.triggerTarget || t);
|
|
17369
17371
|
q.forEach(function(j) {
|
|
17370
17372
|
var Se = j.getAttribute(A);
|
|
17371
17373
|
if (y.state.isVisible)
|
|
@@ -17379,14 +17381,14 @@ function mk(t, e) {
|
|
|
17379
17381
|
}
|
|
17380
17382
|
function ke() {
|
|
17381
17383
|
if (!(x || !y.props.aria.expanded)) {
|
|
17382
|
-
var v =
|
|
17384
|
+
var v = xn(y.props.triggerTarget || t);
|
|
17383
17385
|
v.forEach(function(A) {
|
|
17384
17386
|
y.props.interactive ? A.setAttribute("aria-expanded", y.state.isVisible && A === W() ? "true" : "false") : A.removeAttribute("aria-expanded");
|
|
17385
17387
|
});
|
|
17386
17388
|
}
|
|
17387
17389
|
}
|
|
17388
17390
|
function Be() {
|
|
17389
|
-
ee().removeEventListener("mousemove", h),
|
|
17391
|
+
ee().removeEventListener("mousemove", h), eo = eo.filter(function(v) {
|
|
17390
17392
|
return v !== h;
|
|
17391
17393
|
});
|
|
17392
17394
|
}
|
|
@@ -17394,7 +17396,7 @@ function mk(t, e) {
|
|
|
17394
17396
|
if (!(rt.isTouch && (l || v.type === "mousedown"))) {
|
|
17395
17397
|
var A = v.composedPath && v.composedPath()[0] || v.target;
|
|
17396
17398
|
if (!(y.props.interactive && $l(k, A))) {
|
|
17397
|
-
if (
|
|
17399
|
+
if (xn(y.props.triggerTarget || t).some(function(R) {
|
|
17398
17400
|
return $l(R, A);
|
|
17399
17401
|
})) {
|
|
17400
17402
|
if (rt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
@@ -17440,7 +17442,7 @@ function mk(t, e) {
|
|
|
17440
17442
|
}
|
|
17441
17443
|
function Ot(v, A, R) {
|
|
17442
17444
|
R === void 0 && (R = !1);
|
|
17443
|
-
var q =
|
|
17445
|
+
var q = xn(y.props.triggerTarget || t);
|
|
17444
17446
|
q.forEach(function(j) {
|
|
17445
17447
|
j.addEventListener(v, A, R), p.push({
|
|
17446
17448
|
node: j,
|
|
@@ -17451,41 +17453,41 @@ function mk(t, e) {
|
|
|
17451
17453
|
});
|
|
17452
17454
|
}
|
|
17453
17455
|
function fn() {
|
|
17454
|
-
_() && (Ot("touchstart",
|
|
17456
|
+
_() && (Ot("touchstart", Hn, {
|
|
17455
17457
|
passive: !0
|
|
17456
|
-
}), Ot("touchend",
|
|
17458
|
+
}), Ot("touchend", Br, {
|
|
17457
17459
|
passive: !0
|
|
17458
17460
|
})), qv(y.props.trigger).forEach(function(v) {
|
|
17459
17461
|
if (v !== "manual")
|
|
17460
|
-
switch (Ot(v,
|
|
17462
|
+
switch (Ot(v, Hn), v) {
|
|
17461
17463
|
case "mouseenter":
|
|
17462
|
-
Ot("mouseleave",
|
|
17464
|
+
Ot("mouseleave", Br);
|
|
17463
17465
|
break;
|
|
17464
17466
|
case "focus":
|
|
17465
|
-
Ot(ik ? "focusout" : "blur",
|
|
17467
|
+
Ot(ik ? "focusout" : "blur", jn);
|
|
17466
17468
|
break;
|
|
17467
17469
|
case "focusin":
|
|
17468
|
-
Ot("focusout",
|
|
17470
|
+
Ot("focusout", jn);
|
|
17469
17471
|
break;
|
|
17470
17472
|
}
|
|
17471
17473
|
});
|
|
17472
17474
|
}
|
|
17473
|
-
function
|
|
17475
|
+
function Lr() {
|
|
17474
17476
|
p.forEach(function(v) {
|
|
17475
17477
|
var A = v.node, R = v.eventType, q = v.handler, j = v.options;
|
|
17476
17478
|
A.removeEventListener(R, q, j);
|
|
17477
17479
|
}), p = [];
|
|
17478
17480
|
}
|
|
17479
|
-
function
|
|
17481
|
+
function Hn(v) {
|
|
17480
17482
|
var A, R = !1;
|
|
17481
|
-
if (!(!y.state.isEnabled ||
|
|
17483
|
+
if (!(!y.state.isEnabled || Wn(v) || a)) {
|
|
17482
17484
|
var q = ((A = d) == null ? void 0 : A.type) === "focus";
|
|
17483
|
-
d = v, m = v.currentTarget, ke(), !y.state.isVisible && Yv(v) &&
|
|
17485
|
+
d = v, m = v.currentTarget, ke(), !y.state.isVisible && Yv(v) && eo.forEach(function(j) {
|
|
17484
17486
|
return j(v);
|
|
17485
|
-
}), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? R = !0 :
|
|
17487
|
+
}), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? R = !0 : Un(v), v.type === "click" && (s = !R), R && !q && qt(v);
|
|
17486
17488
|
}
|
|
17487
17489
|
}
|
|
17488
|
-
function
|
|
17490
|
+
function Fr(v) {
|
|
17489
17491
|
var A = v.target, R = W().contains(A) || k.contains(A);
|
|
17490
17492
|
if (!(v.type === "mousemove" && R)) {
|
|
17491
17493
|
var q = Tt().concat(k).map(function(j) {
|
|
@@ -17499,8 +17501,8 @@ function mk(t, e) {
|
|
|
17499
17501
|
ek(q, v) && (Be(), qt(v));
|
|
17500
17502
|
}
|
|
17501
17503
|
}
|
|
17502
|
-
function
|
|
17503
|
-
var A =
|
|
17504
|
+
function Br(v) {
|
|
17505
|
+
var A = Wn(v) || y.props.trigger.indexOf("click") >= 0 && s;
|
|
17504
17506
|
if (!A) {
|
|
17505
17507
|
if (y.props.interactive) {
|
|
17506
17508
|
y.hideWithInteractivity(v);
|
|
@@ -17509,14 +17511,14 @@ function mk(t, e) {
|
|
|
17509
17511
|
qt(v);
|
|
17510
17512
|
}
|
|
17511
17513
|
}
|
|
17512
|
-
function
|
|
17514
|
+
function jn(v) {
|
|
17513
17515
|
y.props.trigger.indexOf("focusin") < 0 && v.target !== W() || y.props.interactive && v.relatedTarget && k.contains(v.relatedTarget) || qt(v);
|
|
17514
17516
|
}
|
|
17515
|
-
function
|
|
17517
|
+
function Wn(v) {
|
|
17516
17518
|
return rt.isTouch ? _() !== v.type.indexOf("touch") >= 0 : !1;
|
|
17517
17519
|
}
|
|
17518
|
-
function
|
|
17519
|
-
|
|
17520
|
+
function _r() {
|
|
17521
|
+
zr();
|
|
17520
17522
|
var v = y.props, A = v.popperOptions, R = v.placement, q = v.offset, j = v.getReferenceClientRect, Se = v.moveTransition, _e = U() ? hs(k).arrow : null, pn = j ? {
|
|
17521
17523
|
getBoundingClientRect: j,
|
|
17522
17524
|
contextElement: j.contextElement || W()
|
|
@@ -17525,12 +17527,12 @@ function mk(t, e) {
|
|
|
17525
17527
|
enabled: !0,
|
|
17526
17528
|
phase: "beforeWrite",
|
|
17527
17529
|
requires: ["computeStyles"],
|
|
17528
|
-
fn: function(
|
|
17529
|
-
var hn =
|
|
17530
|
+
fn: function(Wr) {
|
|
17531
|
+
var hn = Wr.state;
|
|
17530
17532
|
if (U()) {
|
|
17531
17533
|
var df = oe(), Vo = df.box;
|
|
17532
|
-
["placement", "reference-hidden", "escaped"].forEach(function(
|
|
17533
|
-
|
|
17534
|
+
["placement", "reference-hidden", "escaped"].forEach(function(Ur) {
|
|
17535
|
+
Ur === "placement" ? Vo.setAttribute("data-placement", hn.placement) : hn.attributes.popper["data-popper-" + Ur] ? Vo.setAttribute("data-" + Ur, "") : Vo.removeAttribute("data-" + Ur);
|
|
17534
17536
|
}), hn.attributes.popper = {};
|
|
17535
17537
|
}
|
|
17536
17538
|
}
|
|
@@ -17572,12 +17574,12 @@ function mk(t, e) {
|
|
|
17572
17574
|
modifiers: Kt
|
|
17573
17575
|
}));
|
|
17574
17576
|
}
|
|
17575
|
-
function
|
|
17577
|
+
function zr() {
|
|
17576
17578
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
17577
17579
|
}
|
|
17578
17580
|
function ut() {
|
|
17579
17581
|
var v = y.props.appendTo, A, R = W();
|
|
17580
|
-
y.props.interactive && v === Yu || v === "parent" ? A = R.parentNode : A = Gu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0,
|
|
17582
|
+
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 === Pe.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.", `
|
|
17581
17583
|
|
|
17582
17584
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
17583
17585
|
|
|
@@ -17588,7 +17590,7 @@ function mk(t, e) {
|
|
|
17588
17590
|
function Tt() {
|
|
17589
17591
|
return To(k.querySelectorAll("[data-tippy-root]"));
|
|
17590
17592
|
}
|
|
17591
|
-
function
|
|
17593
|
+
function Un(v) {
|
|
17592
17594
|
y.clearDelayTimeouts(), v && se("onTrigger", [y, v]), Ee();
|
|
17593
17595
|
var A = ae(!0), R = $(), q = R[0], j = R[1];
|
|
17594
17596
|
rt.isTouch && q === "hold" && j && (A = j), A ? r = setTimeout(function() {
|
|
@@ -17609,29 +17611,29 @@ function mk(t, e) {
|
|
|
17609
17611
|
});
|
|
17610
17612
|
}
|
|
17611
17613
|
}
|
|
17612
|
-
function
|
|
17614
|
+
function qn() {
|
|
17613
17615
|
y.state.isEnabled = !0;
|
|
17614
17616
|
}
|
|
17615
|
-
function
|
|
17617
|
+
function $r() {
|
|
17616
17618
|
y.hide(), y.state.isEnabled = !1;
|
|
17617
17619
|
}
|
|
17618
|
-
function
|
|
17620
|
+
function Vr() {
|
|
17619
17621
|
clearTimeout(r), clearTimeout(o), cancelAnimationFrame(i);
|
|
17620
17622
|
}
|
|
17621
|
-
function
|
|
17623
|
+
function Hr(v) {
|
|
17622
17624
|
if (ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("setProps")), !y.state.isDestroyed) {
|
|
17623
|
-
se("onBeforeUpdate", [y, v]),
|
|
17625
|
+
se("onBeforeUpdate", [y, v]), Lr();
|
|
17624
17626
|
var A = y.props, R = jl(t, Object.assign({}, A, _l(v), {
|
|
17625
17627
|
ignoreAttributes: !0
|
|
17626
17628
|
}));
|
|
17627
|
-
y.props = R, fn(), A.interactiveDebounce !== R.interactiveDebounce && (Be(), h = Fl(
|
|
17629
|
+
y.props = R, fn(), A.interactiveDebounce !== R.interactiveDebounce && (Be(), h = Fl(Fr, R.interactiveDebounce)), A.triggerTarget && !R.triggerTarget ? xn(A.triggerTarget).forEach(function(q) {
|
|
17628
17630
|
q.removeAttribute("aria-expanded");
|
|
17629
|
-
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ce(), M && M(A, R), y.popperInstance && (
|
|
17631
|
+
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ce(), M && M(A, R), y.popperInstance && (_r(), Tt().forEach(function(q) {
|
|
17630
17632
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
17631
17633
|
})), se("onAfterUpdate", [y, v]);
|
|
17632
17634
|
}
|
|
17633
17635
|
}
|
|
17634
|
-
function
|
|
17636
|
+
function jr(v) {
|
|
17635
17637
|
y.setProps({
|
|
17636
17638
|
content: v
|
|
17637
17639
|
});
|
|
@@ -17648,8 +17650,8 @@ function mk(t, e) {
|
|
|
17648
17650
|
var Kt;
|
|
17649
17651
|
if (!(!y.state.isVisible || c)) {
|
|
17650
17652
|
if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, U() && y.props.animation) {
|
|
17651
|
-
var $o = oe(),
|
|
17652
|
-
fi([
|
|
17653
|
+
var $o = oe(), Wr = $o.box, hn = $o.content;
|
|
17654
|
+
fi([Wr, hn], j), zl([Wr, hn], "visible");
|
|
17653
17655
|
}
|
|
17654
17656
|
pe(), ke(), Bl(hi, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), se("onMount", [y]), y.props.animation && U() && Je(j, function() {
|
|
17655
17657
|
y.state.isShown = !0, se("onShown", [y]);
|
|
@@ -17670,20 +17672,20 @@ function mk(t, e) {
|
|
|
17670
17672
|
}
|
|
17671
17673
|
}
|
|
17672
17674
|
function af(v) {
|
|
17673
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("hideWithInteractivity")), ee().addEventListener("mousemove", h), Bl(
|
|
17675
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("hideWithInteractivity")), ee().addEventListener("mousemove", h), Bl(eo, h), h(v);
|
|
17674
17676
|
}
|
|
17675
17677
|
function lf() {
|
|
17676
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (
|
|
17678
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (zr(), Tt().forEach(function(v) {
|
|
17677
17679
|
v._tippy.unmount();
|
|
17678
17680
|
}), k.parentNode && k.parentNode.removeChild(k), hi = hi.filter(function(v) {
|
|
17679
17681
|
return v !== y;
|
|
17680
17682
|
}), y.state.isMounted = !1, se("onHidden", [y]));
|
|
17681
17683
|
}
|
|
17682
17684
|
function cf() {
|
|
17683
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(),
|
|
17685
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Lr(), delete t._tippy, y.state.isDestroyed = !0, se("onDestroy", [y]));
|
|
17684
17686
|
}
|
|
17685
17687
|
}
|
|
17686
|
-
function
|
|
17688
|
+
function Rr(t, e) {
|
|
17687
17689
|
e === void 0 && (e = {});
|
|
17688
17690
|
var n = Pe.plugins.concat(e.plugins || []);
|
|
17689
17691
|
ie.env.NODE_ENV !== "production" && (lk(t), nf(e, n)), rk();
|
|
@@ -17691,7 +17693,7 @@ function Pr(t, e) {
|
|
|
17691
17693
|
plugins: n
|
|
17692
17694
|
}), o = Zv(t);
|
|
17693
17695
|
if (ie.env.NODE_ENV !== "production") {
|
|
17694
|
-
var i =
|
|
17696
|
+
var i = xr(r.content), s = o.length > 1;
|
|
17695
17697
|
gt(i && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
17696
17698
|
|
|
17697
17699
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
@@ -17703,11 +17705,11 @@ function Pr(t, e) {
|
|
|
17703
17705
|
var d = c && mk(c, r);
|
|
17704
17706
|
return d && l.push(d), l;
|
|
17705
17707
|
}, []);
|
|
17706
|
-
return
|
|
17708
|
+
return xr(t) ? a[0] : a;
|
|
17707
17709
|
}
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17710
|
+
Rr.defaultProps = Pe;
|
|
17711
|
+
Rr.setDefaultProps = uk;
|
|
17712
|
+
Rr.currentInput = rt;
|
|
17711
17713
|
Object.assign({}, zu, {
|
|
17712
17714
|
effect: function(e) {
|
|
17713
17715
|
var n = e.state, r = {
|
|
@@ -17725,7 +17727,7 @@ Object.assign({}, zu, {
|
|
|
17725
17727
|
Object.assign(n.elements.popper.style, r.popper), n.styles = r, n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow);
|
|
17726
17728
|
}
|
|
17727
17729
|
});
|
|
17728
|
-
|
|
17730
|
+
Rr.setDefaultProps({
|
|
17729
17731
|
render: rf
|
|
17730
17732
|
});
|
|
17731
17733
|
const gk = (t, e) => {
|
|
@@ -17826,7 +17828,7 @@ class Mk {
|
|
|
17826
17828
|
const n = e.key === "ArrowDown" || e.key === "ArrowUp";
|
|
17827
17829
|
this.tippyInstance.state.isVisible && n && (e.preventDefault(), this.popover.firstChild.focus());
|
|
17828
17830
|
});
|
|
17829
|
-
this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "popover", document.body.appendChild(this.popover), this.tippyInstance =
|
|
17831
|
+
this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "popover", document.body.appendChild(this.popover), this.tippyInstance = Rr(this.popover, {
|
|
17830
17832
|
trigger: "manual",
|
|
17831
17833
|
placement: "bottom-start",
|
|
17832
17834
|
interactive: !0,
|
|
@@ -17979,7 +17981,7 @@ const Ak = !1, Ok = Q.create({
|
|
|
17979
17981
|
}
|
|
17980
17982
|
})];
|
|
17981
17983
|
}
|
|
17982
|
-
}),
|
|
17984
|
+
}), vn = (t, e, n) => {
|
|
17983
17985
|
const { alternateHeaders: r } = n.converter.pageStyles, o = n.converter[e];
|
|
17984
17986
|
if (n.headersIds?.titlePg && t === 0) return null;
|
|
17985
17987
|
const i = o.even, s = o.odd, a = o.first, l = o.default;
|
|
@@ -18021,9 +18023,9 @@ function Nk(t, e, n, r) {
|
|
|
18021
18023
|
const o = [], { pageSize: i, pageMargins: s } = n.converter.pageStyles, a = i.height * 96;
|
|
18022
18024
|
n.options.scale;
|
|
18023
18025
|
let l = 1, c = a, d = null, u = null;
|
|
18024
|
-
const { headerIds: f, footerIds: p } = n.converter, h =
|
|
18026
|
+
const { headerIds: f, footerIds: p } = n.converter, h = vn(l, "headerIds", n), m = mi(s, i, r, h), g = yi({ editor: n, header: m, isFirstHeader: !0 });
|
|
18025
18027
|
o.push(z.widget(0, g, { key: "stable-key" }));
|
|
18026
|
-
const b =
|
|
18028
|
+
const b = vn(l, "footerIds", n), w = gi(s, i, r, b);
|
|
18027
18029
|
c -= m.headerHeight + w.footerHeight;
|
|
18028
18030
|
let C = e?.coordsAtPos(t.content.size);
|
|
18029
18031
|
if (!C) return [];
|
|
@@ -18048,7 +18050,7 @@ function Nk(t, e, n, r) {
|
|
|
18048
18050
|
pos: Ce
|
|
18049
18051
|
} = Ek(e, oe, c);
|
|
18050
18052
|
l++;
|
|
18051
|
-
const dt =
|
|
18053
|
+
const dt = vn(l, "headerIds", n), Ke = vn(l, "footerIds", n);
|
|
18052
18054
|
u = mi(s, i, r, dt), d = gi(s, i, r, Ke, l - 1);
|
|
18053
18055
|
const Ee = c - Be, { node: Xe } = Kl(Ee), Mt = z.widget(Ce, Xe, { key: "stable-key" });
|
|
18054
18056
|
o.push(Mt);
|
|
@@ -18057,7 +18059,7 @@ function Nk(t, e, n, r) {
|
|
|
18057
18059
|
}
|
|
18058
18060
|
});
|
|
18059
18061
|
let y = t.content.size;
|
|
18060
|
-
const S = e.coordsAtPos(y), k = (l
|
|
18062
|
+
const S = e.coordsAtPos(y), k = vn(l, "headerIds", n), M = vn(l, "footerIds", n);
|
|
18061
18063
|
u = mi(s, i, r, k), d = gi(s, i, r, M, l);
|
|
18062
18064
|
const L = c - S.bottom, { node: x } = Kl(L), $ = z.widget(t.content.size, x, { key: "stable-key" });
|
|
18063
18065
|
o.push($);
|