@harbour-enterprises/superdoc 0.10.29 → 0.10.30
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/{super-editor.es-C2A7zD_-.cjs → super-editor.es-CM6Py0Mv.cjs} +55 -55
- package/dist/chunks/{super-editor.es-Bzv4-GUs.es.js → super-editor.es-DSi_T7G2.es.js} +4659 -4448
- package/dist/style.css +1 -1
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{converter-whoXGxkK.js → converter-DbUWfZSD.js} +1981 -1856
- package/dist/super-editor/chunks/{docx-zipper-B4Z-z2aZ.js → docx-zipper-BXFMXPwp.js} +1 -1
- package/dist/super-editor/chunks/{editor-BMBkIcLg.js → editor-BQAF4YZB.js} +783 -695
- package/dist/super-editor/chunks/{toolbar-DCR_ZjQ7.js → toolbar-C1iClOX_.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/pictNodeImporter.d.ts +45 -0
- package/dist/super-editor/core/super-converter/v2/importer/pictNodeImporter.d.ts.map +1 -0
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/image/image.d.ts.map +1 -1
- package/dist/super-editor/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/extensions/shape-container/index.d.ts +2 -0
- package/dist/super-editor/extensions/shape-container/index.d.ts.map +1 -0
- package/dist/super-editor/extensions/shape-container/shape-container.d.ts +2 -0
- package/dist/super-editor/extensions/shape-container/shape-container.d.ts.map +1 -0
- package/dist/super-editor/extensions/shape-textbox/index.d.ts +2 -0
- package/dist/super-editor/extensions/shape-textbox/index.d.ts.map +1 -0
- package/dist/super-editor/extensions/shape-textbox/shape-textbox.d.ts +2 -0
- package/dist/super-editor/extensions/shape-textbox/shape-textbox.d.ts.map +1 -0
- 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 +4 -4
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +3308 -3095
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ var ta = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var wf = (t, e, n) => e in t ? bf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
6
|
var I = (t, e, n) => wf(t, typeof e != "symbol" ? e + "" : e, n), Uo = (t, e, n) => e.has(t) || ta("Cannot " + n);
|
|
7
|
-
var Ge = (t, e, n) => (Uo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? ta("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), qo = (t, e, n, r) => (Uo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n),
|
|
7
|
+
var Ge = (t, e, n) => (Uo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? ta("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), qo = (t, e, n, r) => (Uo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Uo(t, e, "access private method"), n);
|
|
8
8
|
import * as T from "yjs";
|
|
9
|
-
import { UndoManager as vf, Item as kf, ContentType as Cf, Text as Mf, XmlElement as
|
|
10
|
-
import { P as
|
|
9
|
+
import { UndoManager as vf, Item as kf, ContentType as Cf, Text as Mf, XmlElement as Sf } from "yjs";
|
|
10
|
+
import { P as Y, a as G, M as dr, c as K, N as B, S as Z, T as j, b as W, D as Vn, F as P, d as tn, e as xf, f as tc, A as Or, p as ie, B as Af, i as Of, g as nc, h as Tf, j as wt, l as Tr, k as Ht, m as rc, r as oc, R as an, o as ur, n as na, q as $t, s as ki, t as ic, u as Df, v as Nf, w as ue, x as $e, y as Eo, z as Cn, C as ho, E as Ef, G as Me, H as ro, I as sc, J as Mn, K as Ko, L as Xo, O as Jo, Q as oo, U as Rt, V as Po, W as Pf, X as ra, Y as oa, Z as If, _ as Rf, $ as Lf } from "./converter-DbUWfZSD.js";
|
|
11
11
|
import { ref as ia, computed as Ff, createElementBlock as Kt, openBlock as Xt, withModifiers as Yo, Fragment as Bf, renderList as zf, normalizeClass as _f, createCommentVNode as sa, toDisplayString as Go, createElementVNode as $f, createApp as Vf } from "vue";
|
|
12
|
-
import { D as aa } from "./docx-zipper-
|
|
12
|
+
import { D as aa } from "./docx-zipper-BXFMXPwp.js";
|
|
13
13
|
function Io(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) => {
|
|
@@ -368,12 +368,12 @@ function io(t) {
|
|
|
368
368
|
}
|
|
369
369
|
return Qo;
|
|
370
370
|
}
|
|
371
|
-
const vt = new
|
|
371
|
+
const vt = new Y("history"), Gf = new Y("closeHistory");
|
|
372
372
|
function Zf(t = {}) {
|
|
373
373
|
return t = {
|
|
374
374
|
depth: t.depth || 100,
|
|
375
375
|
newGroupDelay: t.newGroupDelay || 500
|
|
376
|
-
}, new
|
|
376
|
+
}, new G({
|
|
377
377
|
key: vt,
|
|
378
378
|
state: {
|
|
379
379
|
init() {
|
|
@@ -407,11 +407,11 @@ function lc(t, e) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
const cc = lc(!1, !0), dc = lc(!0, !0);
|
|
410
|
-
function
|
|
410
|
+
function tC(t) {
|
|
411
411
|
let e = vt.getState(t);
|
|
412
412
|
return e ? e.done.eventCount : 0;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function nC(t) {
|
|
415
415
|
let e = vt.getState(t);
|
|
416
416
|
return e ? e.undone.eventCount : 0;
|
|
417
417
|
}
|
|
@@ -582,9 +582,9 @@ function sp(t, e, n) {
|
|
|
582
582
|
return { node: r.startContainer, offset: Math.min(_e(r.startContainer), r.startOffset) };
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
const ot = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", Mi = /Edge\/(\d+)/.exec(jt), uc = /MSIE \d/.exec(jt),
|
|
585
|
+
const ot = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", Mi = /Edge\/(\d+)/.exec(jt), uc = /MSIE \d/.exec(jt), Si = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Te = !!(uc || Si || Mi), Lt = uc ? document.documentMode : Si ? +Si[1] : Mi ? +Mi[1] : 0, Je = !Te && /gecko\/(\d+)/i.test(jt);
|
|
586
586
|
Je && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
|
|
587
|
-
const
|
|
587
|
+
const xi = !Te && /Chrome\/(\d+)/.exec(jt), be = !!xi, fc = xi ? +xi[1] : 0, Se = !Te && !!ot && /Apple Computer/.test(ot.vendor), Nn = Se && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Nn || (ot ? /Mac/.test(ot.platform) : !1), ap = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Nr = !!fa && "webkitFontSmoothing" in fa.documentElement.style, lp = Nr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
588
588
|
function cp(t) {
|
|
589
589
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
590
590
|
return e ? {
|
|
@@ -770,7 +770,7 @@ function bp(t, e) {
|
|
|
770
770
|
if (!vs(e, c) || (s = gc(t.dom, e, c), !s))
|
|
771
771
|
return null;
|
|
772
772
|
}
|
|
773
|
-
if (
|
|
773
|
+
if (Se)
|
|
774
774
|
for (let c = s; r && c; c = Dn(c))
|
|
775
775
|
c.draggable && (r = void 0);
|
|
776
776
|
if (s = mp(s, e), r) {
|
|
@@ -1178,7 +1178,7 @@ class Er {
|
|
|
1178
1178
|
h = g;
|
|
1179
1179
|
}
|
|
1180
1180
|
let a = this.domFromPos(e, e ? -1 : 1), l = n == e ? a : this.domFromPos(n, n ? -1 : 1), c = r.root.getSelection(), d = r.domSelectionRange(), u = !1;
|
|
1181
|
-
if ((Je ||
|
|
1181
|
+
if ((Je || Se) && e == n) {
|
|
1182
1182
|
let { node: p, offset: h } = a;
|
|
1183
1183
|
if (p.nodeType == 3) {
|
|
1184
1184
|
if (u = !!(h && p.nodeValue[h - 1] == `
|
|
@@ -1201,7 +1201,7 @@ class Er {
|
|
|
1201
1201
|
let p = d.focusNode.childNodes[d.focusOffset];
|
|
1202
1202
|
p && p.contentEditable == "false" && (o = !0);
|
|
1203
1203
|
}
|
|
1204
|
-
if (!(o || u &&
|
|
1204
|
+
if (!(o || u && Se) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
|
|
1205
1205
|
return;
|
|
1206
1206
|
let f = !1;
|
|
1207
1207
|
if ((c.extend || e == n) && !u) {
|
|
@@ -1300,7 +1300,7 @@ class wc extends Er {
|
|
|
1300
1300
|
return this.widget.type.side;
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
class
|
|
1303
|
+
class Sp extends Er {
|
|
1304
1304
|
constructor(e, n, r, o) {
|
|
1305
1305
|
super(e, [], n, null), this.textDOM = r, this.text = o;
|
|
1306
1306
|
}
|
|
@@ -1381,7 +1381,7 @@ class Ft extends Er {
|
|
|
1381
1381
|
} else d || ({ dom: d, contentDOM: u } = Vn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
1382
1382
|
!u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
|
|
1383
1383
|
let f = d;
|
|
1384
|
-
return d = Mc(d, r, n), c ? l = new
|
|
1384
|
+
return d = Mc(d, r, n), c ? l = new xp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Fo(e, n, r, o, d, f, i) : new Ft(e, n, r, o, d, u || null, f, i, s + 1);
|
|
1385
1385
|
}
|
|
1386
1386
|
parseRule() {
|
|
1387
1387
|
if (this.node.type.spec.reparseInView)
|
|
@@ -1419,7 +1419,7 @@ class Ft extends Er {
|
|
|
1419
1419
|
updateChildren(e, n) {
|
|
1420
1420
|
let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new Op(this, s && s.node, e);
|
|
1421
1421
|
Np(this.node, this.innerDeco, (c, d, u) => {
|
|
1422
|
-
c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ?
|
|
1422
|
+
c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? xf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
|
|
1423
1423
|
}, (c, d, u, f) => {
|
|
1424
1424
|
l.syncToMarks(c.marks, r, e);
|
|
1425
1425
|
let p;
|
|
@@ -1428,7 +1428,7 @@ class Ft extends Er {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
localCompositionInfo(e, n) {
|
|
1430
1430
|
let { from: r, to: o } = e.state.selection;
|
|
1431
|
-
if (!(e.state.selection instanceof
|
|
1431
|
+
if (!(e.state.selection instanceof j) || r < n || o > n + this.node.content.size)
|
|
1432
1432
|
return null;
|
|
1433
1433
|
let i = e.input.compositionNode;
|
|
1434
1434
|
if (!i || !this.dom.contains(i.parentNode))
|
|
@@ -1450,7 +1450,7 @@ class Ft extends Er {
|
|
|
1450
1450
|
i.parentNode.removeChild(i.nextSibling);
|
|
1451
1451
|
i.pmViewDesc && (i.pmViewDesc = void 0);
|
|
1452
1452
|
}
|
|
1453
|
-
let s = new
|
|
1453
|
+
let s = new Sp(this, i, n, o);
|
|
1454
1454
|
e.input.compositionNodes.push(s), this.children = Oi(this.children, r, r + o.length, e, s);
|
|
1455
1455
|
}
|
|
1456
1456
|
// If this desc must be updated to match the given node decoration,
|
|
@@ -1541,7 +1541,7 @@ class vc extends Er {
|
|
|
1541
1541
|
return this.dom.nodeName == "IMG";
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
|
-
class
|
|
1544
|
+
class xp extends Ft {
|
|
1545
1545
|
constructor(e, n, r, o, i, s, a, l, c, d) {
|
|
1546
1546
|
super(e, n, r, o, i, s, a, c, d), this.spec = l;
|
|
1547
1547
|
}
|
|
@@ -1800,7 +1800,7 @@ class Op {
|
|
|
1800
1800
|
for (; e instanceof cn; )
|
|
1801
1801
|
n = e, e = n.children[n.children.length - 1];
|
|
1802
1802
|
(!e || // Empty textblock
|
|
1803
|
-
!(e instanceof Fo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((
|
|
1803
|
+
!(e instanceof Fo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Se || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
|
|
1804
1804
|
}
|
|
1805
1805
|
addHackNode(e, n) {
|
|
1806
1806
|
if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(e))
|
|
@@ -1970,12 +1970,12 @@ function ks(t, e = null) {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
return c;
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1973
|
+
function Sc(t) {
|
|
1974
1974
|
return t.editable ? t.hasFocus() : Ac(t) && document.activeElement && document.activeElement.contains(t.dom);
|
|
1975
1975
|
}
|
|
1976
1976
|
function kt(t, e = !1) {
|
|
1977
1977
|
let n = t.state.selection;
|
|
1978
|
-
if (
|
|
1978
|
+
if (xc(t, n), !!Sc(t)) {
|
|
1979
1979
|
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && be) {
|
|
1980
1980
|
let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
|
|
1981
1981
|
if (r.anchorNode && o.anchorNode && ln(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
|
|
@@ -1987,15 +1987,15 @@ function kt(t, e = !1) {
|
|
|
1987
1987
|
Rp(t);
|
|
1988
1988
|
else {
|
|
1989
1989
|
let { anchor: r, head: o } = n, i, s;
|
|
1990
|
-
ka && !(n instanceof
|
|
1990
|
+
ka && !(n instanceof j) && (n.$from.parent.inlineContent || (i = Ca(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = Ca(t, n.to))), t.docView.setSelection(r, o, t, e), ka && (i && Ma(i), s && Ma(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Ip(t));
|
|
1991
1991
|
}
|
|
1992
1992
|
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
|
-
const ka =
|
|
1995
|
+
const ka = Se || be && fc < 63;
|
|
1996
1996
|
function Ca(t, e) {
|
|
1997
1997
|
let { node: n, offset: r } = t.docView.domFromPos(e, 0), o = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
|
|
1998
|
-
if (
|
|
1998
|
+
if (Se && o && o.contentEditable == "false")
|
|
1999
1999
|
return ni(o);
|
|
2000
2000
|
if ((!o || o.contentEditable == "false") && (!i || i.contentEditable == "false")) {
|
|
2001
2001
|
if (o)
|
|
@@ -2005,7 +2005,7 @@ function Ca(t, e) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
2007
|
function ni(t) {
|
|
2008
|
-
return t.contentEditable = "true",
|
|
2008
|
+
return t.contentEditable = "true", Se && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
|
|
2009
2009
|
}
|
|
2010
2010
|
function Ma(t) {
|
|
2011
2011
|
t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
|
|
@@ -2016,7 +2016,7 @@ function Ip(t) {
|
|
|
2016
2016
|
let n = t.domSelectionRange(), r = n.anchorNode, o = n.anchorOffset;
|
|
2017
2017
|
e.addEventListener("selectionchange", t.input.hideSelectionGuard = () => {
|
|
2018
2018
|
(n.anchorNode != r || n.anchorOffset != o) && (e.removeEventListener("selectionchange", t.input.hideSelectionGuard), setTimeout(() => {
|
|
2019
|
-
(!
|
|
2019
|
+
(!Sc(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
|
|
2020
2020
|
}, 20));
|
|
2021
2021
|
});
|
|
2022
2022
|
}
|
|
@@ -2027,20 +2027,20 @@ function Rp(t) {
|
|
|
2027
2027
|
let r = t.cursorWrapper.dom, o = r.nodeName == "IMG";
|
|
2028
2028
|
o ? n.setStart(r.parentNode, me(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te && Lt <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function xc(t, e) {
|
|
2031
2031
|
if (e instanceof B) {
|
|
2032
2032
|
let n = t.docView.descAt(e.from);
|
|
2033
|
-
n != t.lastSelectedViewDesc && (
|
|
2033
|
+
n != t.lastSelectedViewDesc && (Sa(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
|
|
2034
2034
|
} else
|
|
2035
|
-
|
|
2035
|
+
Sa(t);
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function Sa(t) {
|
|
2038
2038
|
t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
|
|
2039
2039
|
}
|
|
2040
2040
|
function Cs(t, e, n, r) {
|
|
2041
|
-
return t.someProp("createSelectionBetween", (o) => o(t, e, n)) ||
|
|
2041
|
+
return t.someProp("createSelectionBetween", (o) => o(t, e, n)) || j.between(e, n, r);
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function xa(t) {
|
|
2044
2044
|
return t.editable && !t.hasFocus() ? !1 : Ac(t);
|
|
2045
2045
|
}
|
|
2046
2046
|
function Ac(t) {
|
|
@@ -2066,13 +2066,13 @@ function Dt(t, e) {
|
|
|
2066
2066
|
}
|
|
2067
2067
|
function Aa(t, e, n) {
|
|
2068
2068
|
let r = t.state.selection;
|
|
2069
|
-
if (r instanceof
|
|
2069
|
+
if (r instanceof j)
|
|
2070
2070
|
if (n.indexOf("s") > -1) {
|
|
2071
2071
|
let { $head: o } = r, i = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter;
|
|
2072
2072
|
if (!i || i.isText || !i.isLeaf)
|
|
2073
2073
|
return !1;
|
|
2074
2074
|
let s = t.state.doc.resolve(o.pos + i.nodeSize * (e < 0 ? -1 : 1));
|
|
2075
|
-
return Dt(t, new
|
|
2075
|
+
return Dt(t, new j(r.$anchor, s));
|
|
2076
2076
|
} else if (r.empty) {
|
|
2077
2077
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
2078
2078
|
let o = Ti(t.state, e);
|
|
@@ -2082,12 +2082,12 @@ function Aa(t, e, n) {
|
|
|
2082
2082
|
if (!i || i.isText)
|
|
2083
2083
|
return !1;
|
|
2084
2084
|
let a = e < 0 ? o.pos - i.nodeSize : o.pos;
|
|
2085
|
-
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Dt(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Nr ? Dt(t, new
|
|
2085
|
+
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Dt(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Nr ? Dt(t, new j(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
|
|
2086
2086
|
}
|
|
2087
2087
|
} else return !1;
|
|
2088
2088
|
else {
|
|
2089
2089
|
if (r instanceof B && r.node.isInline)
|
|
2090
|
-
return Dt(t, new
|
|
2090
|
+
return Dt(t, new j(e > 0 ? r.$to : r.$from));
|
|
2091
2091
|
{
|
|
2092
2092
|
let o = Ti(t.state, e);
|
|
2093
2093
|
return o ? Dt(t, o) : !1;
|
|
@@ -2237,7 +2237,7 @@ function Oa(t, e) {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
function Ta(t, e, n) {
|
|
2239
2239
|
let r = t.state.selection;
|
|
2240
|
-
if (r instanceof
|
|
2240
|
+
if (r instanceof j && !r.empty || n.indexOf("s") > -1 || ze && n.indexOf("m") > -1)
|
|
2241
2241
|
return !1;
|
|
2242
2242
|
let { $from: o, $to: i } = r;
|
|
2243
2243
|
if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -2252,7 +2252,7 @@ function Ta(t, e, n) {
|
|
|
2252
2252
|
return !1;
|
|
2253
2253
|
}
|
|
2254
2254
|
function Da(t, e) {
|
|
2255
|
-
if (!(t.state.selection instanceof
|
|
2255
|
+
if (!(t.state.selection instanceof j))
|
|
2256
2256
|
return !0;
|
|
2257
2257
|
let { $head: n, $anchor: r, empty: o } = t.state.selection;
|
|
2258
2258
|
if (!n.sameParent(r))
|
|
@@ -2272,7 +2272,7 @@ function Na(t, e, n) {
|
|
|
2272
2272
|
t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
|
|
2273
2273
|
}
|
|
2274
2274
|
function $p(t) {
|
|
2275
|
-
if (!
|
|
2275
|
+
if (!Se || t.state.selection.$head.parentOffset > 0)
|
|
2276
2276
|
return !1;
|
|
2277
2277
|
let { focusNode: e, focusOffset: n } = t.domSelectionRange();
|
|
2278
2278
|
if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
|
|
@@ -2497,20 +2497,20 @@ function Xp(t, e) {
|
|
|
2497
2497
|
}
|
|
2498
2498
|
return new W(o, i, s);
|
|
2499
2499
|
}
|
|
2500
|
-
const
|
|
2500
|
+
const xe = {}, Ae = {}, Jp = { touchstart: !0, touchmove: !0 };
|
|
2501
2501
|
class Yp {
|
|
2502
2502
|
constructor() {
|
|
2503
2503
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
2506
2506
|
function Gp(t) {
|
|
2507
|
-
for (let e in
|
|
2508
|
-
let n =
|
|
2507
|
+
for (let e in xe) {
|
|
2508
|
+
let n = xe[e];
|
|
2509
2509
|
t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
|
|
2510
|
-
Qp(t, r) && !
|
|
2510
|
+
Qp(t, r) && !Ss(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
|
|
2511
2511
|
}, Jp[e] ? { passive: !0 } : void 0);
|
|
2512
2512
|
}
|
|
2513
|
-
|
|
2513
|
+
Se && t.dom.addEventListener("input", () => null), Ei(t);
|
|
2514
2514
|
}
|
|
2515
2515
|
function Pt(t, e) {
|
|
2516
2516
|
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
@@ -2524,10 +2524,10 @@ function Zp(t) {
|
|
|
2524
2524
|
function Ei(t) {
|
|
2525
2525
|
t.someProp("handleDOMEvents", (e) => {
|
|
2526
2526
|
for (let n in e)
|
|
2527
|
-
t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) =>
|
|
2527
|
+
t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => Ss(t, r));
|
|
2528
2528
|
});
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2530
|
+
function Ss(t, e) {
|
|
2531
2531
|
return t.someProp("handleDOMEvents", (n) => {
|
|
2532
2532
|
let r = n[e.type];
|
|
2533
2533
|
return r ? r(t, e) || e.defaultPrevented : !1;
|
|
@@ -2544,7 +2544,7 @@ function Qp(t, e) {
|
|
|
2544
2544
|
return !0;
|
|
2545
2545
|
}
|
|
2546
2546
|
function eh(t, e) {
|
|
2547
|
-
!
|
|
2547
|
+
!Ss(t, e) && xe[e.type] && (t.editable || !(e.type in Ae)) && xe[e.type](t, e);
|
|
2548
2548
|
}
|
|
2549
2549
|
Ae.keydown = (t, e) => {
|
|
2550
2550
|
let n = e;
|
|
@@ -2568,7 +2568,7 @@ Ae.keypress = (t, e) => {
|
|
|
2568
2568
|
return;
|
|
2569
2569
|
}
|
|
2570
2570
|
let r = t.state.selection;
|
|
2571
|
-
if (!(r instanceof
|
|
2571
|
+
if (!(r instanceof j) || !r.$from.sameParent(r.$to)) {
|
|
2572
2572
|
let o = String.fromCharCode(n.charCode);
|
|
2573
2573
|
!/[\r\n]/.test(o) && !t.someProp("handleTextInput", (i) => i(t, r.$from.pos, r.$to.pos, o)) && t.dispatch(t.state.tr.insertText(o).scrollIntoView()), n.preventDefault();
|
|
2574
2574
|
}
|
|
@@ -2580,7 +2580,7 @@ function th(t, e) {
|
|
|
2580
2580
|
let n = e.x - t.clientX, r = e.y - t.clientY;
|
|
2581
2581
|
return n * n + r * r < 100;
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function xs(t, e, n, r, o) {
|
|
2584
2584
|
if (r == -1)
|
|
2585
2585
|
return !1;
|
|
2586
2586
|
let i = t.state.doc.resolve(r);
|
|
@@ -2617,25 +2617,25 @@ function rh(t, e) {
|
|
|
2617
2617
|
return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
|
|
2618
2618
|
}
|
|
2619
2619
|
function oh(t, e, n, r, o) {
|
|
2620
|
-
return
|
|
2620
|
+
return xs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? rh(t, n) : nh(t, n));
|
|
2621
2621
|
}
|
|
2622
2622
|
function ih(t, e, n, r) {
|
|
2623
|
-
return
|
|
2623
|
+
return xs(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
|
|
2624
2624
|
}
|
|
2625
2625
|
function sh(t, e, n, r) {
|
|
2626
|
-
return
|
|
2626
|
+
return xs(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || ah(t, n, r);
|
|
2627
2627
|
}
|
|
2628
2628
|
function ah(t, e, n) {
|
|
2629
2629
|
if (n.button != 0)
|
|
2630
2630
|
return !1;
|
|
2631
2631
|
let r = t.state.doc;
|
|
2632
2632
|
if (e == -1)
|
|
2633
|
-
return r.inlineContent ? (On(t,
|
|
2633
|
+
return r.inlineContent ? (On(t, j.create(r, 0, r.content.size)), !0) : !1;
|
|
2634
2634
|
let o = r.resolve(e);
|
|
2635
2635
|
for (let i = o.depth + 1; i > 0; i--) {
|
|
2636
2636
|
let s = i > o.depth ? o.nodeAfter : o.node(i), a = o.before(i);
|
|
2637
2637
|
if (s.inlineContent)
|
|
2638
|
-
On(t,
|
|
2638
|
+
On(t, j.create(r, a + 1, a + 1 + s.content.size));
|
|
2639
2639
|
else if (B.isSelectable(s))
|
|
2640
2640
|
On(t, B.create(r, a));
|
|
2641
2641
|
else
|
|
@@ -2647,7 +2647,7 @@ function As(t) {
|
|
|
2647
2647
|
return bo(t);
|
|
2648
2648
|
}
|
|
2649
2649
|
const Rc = ze ? "metaKey" : "ctrlKey";
|
|
2650
|
-
|
|
2650
|
+
xe.mousedown = (t, e) => {
|
|
2651
2651
|
let n = e;
|
|
2652
2652
|
t.input.shiftKey = n.shiftKey;
|
|
2653
2653
|
let r = As(t), o = Date.now(), i = "singleClick";
|
|
@@ -2685,7 +2685,7 @@ class lh {
|
|
|
2685
2685
|
return;
|
|
2686
2686
|
let n = this.pos;
|
|
2687
2687
|
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Bo(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Pt(this.view, "pointer") : oh(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
2688
|
-
|
|
2688
|
+
Se && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
2689
2689
|
// cursor, but still report that the node is selected
|
|
2690
2690
|
// when asked through getSelection. You'll then get a
|
|
2691
2691
|
// situation where clicking at the point where that
|
|
@@ -2701,22 +2701,22 @@ class lh {
|
|
|
2701
2701
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
|
-
|
|
2704
|
+
xe.touchstart = (t) => {
|
|
2705
2705
|
t.input.lastTouch = Date.now(), As(t), Pt(t, "pointer");
|
|
2706
2706
|
};
|
|
2707
|
-
|
|
2707
|
+
xe.touchmove = (t) => {
|
|
2708
2708
|
t.input.lastTouch = Date.now(), Pt(t, "pointer");
|
|
2709
2709
|
};
|
|
2710
|
-
|
|
2710
|
+
xe.contextmenu = (t) => As(t);
|
|
2711
2711
|
function Lc(t, e) {
|
|
2712
|
-
return t.composing ? !0 :
|
|
2712
|
+
return t.composing ? !0 : Se && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
2713
2713
|
}
|
|
2714
2714
|
const ch = bt ? 5e3 : -1;
|
|
2715
2715
|
Ae.compositionstart = Ae.compositionupdate = (t) => {
|
|
2716
2716
|
if (!t.composing) {
|
|
2717
2717
|
t.domObserver.flush();
|
|
2718
2718
|
let { state: e } = t, n = e.selection.$to;
|
|
2719
|
-
if (e.selection instanceof
|
|
2719
|
+
if (e.selection instanceof j && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
2720
2720
|
t.markCursor = t.state.storedMarks || n.marks(), bo(t, !0), t.markCursor = null;
|
|
2721
2721
|
else if (bo(t, !e.selection.empty), Je && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
2722
2722
|
let r = t.domSelectionRange();
|
|
@@ -2789,7 +2789,7 @@ function fh(t, e) {
|
|
|
2789
2789
|
}, 50);
|
|
2790
2790
|
}
|
|
2791
2791
|
const fr = Te && Lt < 15 || Nn && lp < 604;
|
|
2792
|
-
|
|
2792
|
+
xe.copy = Ae.cut = (t, e) => {
|
|
2793
2793
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
2794
2794
|
if (r.empty)
|
|
2795
2795
|
return;
|
|
@@ -2842,7 +2842,7 @@ function $c(t, e) {
|
|
|
2842
2842
|
let n = t.someProp("dragCopies", (r) => !r(e));
|
|
2843
2843
|
return n ?? !e[mh];
|
|
2844
2844
|
}
|
|
2845
|
-
|
|
2845
|
+
xe.dragstart = (t, e) => {
|
|
2846
2846
|
let n = e, r = t.input.mouseDown;
|
|
2847
2847
|
if (r && r.done(), !n.dataTransfer)
|
|
2848
2848
|
return;
|
|
@@ -2858,7 +2858,7 @@ Se.dragstart = (t, e) => {
|
|
|
2858
2858
|
let a = (s || t.state.selection).content(), { dom: l, text: c, slice: d } = Ms(t, a);
|
|
2859
2859
|
(!n.dataTransfer.files.length || !be || fc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(fr ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", fr || n.dataTransfer.setData("text/plain", c), t.dragging = new _c(d, $c(t, n), s);
|
|
2860
2860
|
};
|
|
2861
|
-
|
|
2861
|
+
xe.dragend = (t) => {
|
|
2862
2862
|
let e = t.dragging;
|
|
2863
2863
|
window.setTimeout(() => {
|
|
2864
2864
|
t.dragging == e && (t.dragging = null);
|
|
@@ -2903,16 +2903,16 @@ Ae.drop = (t, e) => {
|
|
|
2903
2903
|
}
|
|
2904
2904
|
t.focus(), t.dispatch(c.setMeta("uiEvent", "drop"));
|
|
2905
2905
|
};
|
|
2906
|
-
|
|
2906
|
+
xe.focus = (t) => {
|
|
2907
2907
|
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
2908
2908
|
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && kt(t);
|
|
2909
2909
|
}, 20));
|
|
2910
2910
|
};
|
|
2911
|
-
|
|
2911
|
+
xe.blur = (t, e) => {
|
|
2912
2912
|
let n = e;
|
|
2913
2913
|
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
2914
2914
|
};
|
|
2915
|
-
|
|
2915
|
+
xe.beforeinput = (t, e) => {
|
|
2916
2916
|
if (be && bt && e.inputType == "deleteContentBackward") {
|
|
2917
2917
|
t.domObserver.flushSoon();
|
|
2918
2918
|
let { domChangeCount: r } = t.input;
|
|
@@ -2925,7 +2925,7 @@ Se.beforeinput = (t, e) => {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
};
|
|
2927
2927
|
for (let t in Ae)
|
|
2928
|
-
|
|
2928
|
+
xe[t] = Ae[t];
|
|
2929
2929
|
function hr(t, e) {
|
|
2930
2930
|
if (t == e)
|
|
2931
2931
|
return !0;
|
|
@@ -2943,7 +2943,7 @@ class wo {
|
|
|
2943
2943
|
}
|
|
2944
2944
|
map(e, n, r, o) {
|
|
2945
2945
|
let { pos: i, deleted: s } = e.mapResult(n.from + o, this.side < 0 ? -1 : 1);
|
|
2946
|
-
return s ? null : new
|
|
2946
|
+
return s ? null : new $(i - r, i - r, this);
|
|
2947
2947
|
}
|
|
2948
2948
|
valid() {
|
|
2949
2949
|
return !0;
|
|
@@ -2961,7 +2961,7 @@ class Bt {
|
|
|
2961
2961
|
}
|
|
2962
2962
|
map(e, n, r, o) {
|
|
2963
2963
|
let i = e.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
2964
|
-
return i >= s ? null : new
|
|
2964
|
+
return i >= s ? null : new $(i, s, this);
|
|
2965
2965
|
}
|
|
2966
2966
|
valid(e, n) {
|
|
2967
2967
|
return n.from < n.to;
|
|
@@ -2984,7 +2984,7 @@ class Os {
|
|
|
2984
2984
|
if (i.deleted)
|
|
2985
2985
|
return null;
|
|
2986
2986
|
let s = e.mapResult(n.to + o, -1);
|
|
2987
|
-
return s.deleted || s.pos <= i.pos ? null : new
|
|
2987
|
+
return s.deleted || s.pos <= i.pos ? null : new $(i.pos - r, s.pos - r, this);
|
|
2988
2988
|
}
|
|
2989
2989
|
valid(e, n) {
|
|
2990
2990
|
let { index: r, offset: o } = e.content.findIndex(n.from), i;
|
|
@@ -2996,7 +2996,7 @@ class Os {
|
|
|
2996
2996
|
destroy() {
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
|
-
class
|
|
2999
|
+
class $ {
|
|
3000
3000
|
/**
|
|
3001
3001
|
@internal
|
|
3002
3002
|
*/
|
|
@@ -3007,7 +3007,7 @@ class _ {
|
|
|
3007
3007
|
@internal
|
|
3008
3008
|
*/
|
|
3009
3009
|
copy(e, n) {
|
|
3010
|
-
return new
|
|
3010
|
+
return new $(e, n, this.type);
|
|
3011
3011
|
}
|
|
3012
3012
|
/**
|
|
3013
3013
|
@internal
|
|
@@ -3030,14 +3030,14 @@ class _ {
|
|
|
3030
3030
|
widget's current document position.
|
|
3031
3031
|
*/
|
|
3032
3032
|
static widget(e, n, r) {
|
|
3033
|
-
return new
|
|
3033
|
+
return new $(e, e, new wo(n, r));
|
|
3034
3034
|
}
|
|
3035
3035
|
/**
|
|
3036
3036
|
Creates an inline decoration, which adds the given attributes to
|
|
3037
3037
|
each inline node between `from` and `to`.
|
|
3038
3038
|
*/
|
|
3039
3039
|
static inline(e, n, r, o) {
|
|
3040
|
-
return new
|
|
3040
|
+
return new $(e, n, new Bt(r, o));
|
|
3041
3041
|
}
|
|
3042
3042
|
/**
|
|
3043
3043
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -3045,7 +3045,7 @@ class _ {
|
|
|
3045
3045
|
node, will receive the given attributes.
|
|
3046
3046
|
*/
|
|
3047
3047
|
static node(e, n, r, o) {
|
|
3048
|
-
return new
|
|
3048
|
+
return new $(e, n, new Os(r, o));
|
|
3049
3049
|
}
|
|
3050
3050
|
/**
|
|
3051
3051
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -3067,13 +3067,13 @@ class _ {
|
|
|
3067
3067
|
return this.type instanceof wo;
|
|
3068
3068
|
}
|
|
3069
3069
|
}
|
|
3070
|
-
const
|
|
3070
|
+
const Sn = [], nn = {};
|
|
3071
3071
|
class L {
|
|
3072
3072
|
/**
|
|
3073
3073
|
@internal
|
|
3074
3074
|
*/
|
|
3075
3075
|
constructor(e, n) {
|
|
3076
|
-
this.local = e.length ? e :
|
|
3076
|
+
this.local = e.length ? e : Sn, this.children = n.length ? n : Sn;
|
|
3077
3077
|
}
|
|
3078
3078
|
/**
|
|
3079
3079
|
Create a set of decorations, using the structure of the given
|
|
@@ -3122,7 +3122,7 @@ class L {
|
|
|
3122
3122
|
let l = this.local[a].map(e, r, o);
|
|
3123
3123
|
l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
|
|
3124
3124
|
}
|
|
3125
|
-
return this.children.length ? gh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn),
|
|
3125
|
+
return this.children.length ? gh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn), Sn) : ye;
|
|
3126
3126
|
}
|
|
3127
3127
|
/**
|
|
3128
3128
|
Add the given array of decorations to the ones in the set,
|
|
@@ -3195,7 +3195,7 @@ class L {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
3197
|
if (o) {
|
|
3198
|
-
let a = new L(o.sort(rn),
|
|
3198
|
+
let a = new L(o.sort(rn), Sn);
|
|
3199
3199
|
return r ? new Nt([a, r]) : a;
|
|
3200
3200
|
}
|
|
3201
3201
|
return r || ye;
|
|
@@ -3227,7 +3227,7 @@ class L {
|
|
|
3227
3227
|
*/
|
|
3228
3228
|
localsInner(e) {
|
|
3229
3229
|
if (this == ye)
|
|
3230
|
-
return
|
|
3230
|
+
return Sn;
|
|
3231
3231
|
if (e.inlineContent || !this.local.some(Bt.is))
|
|
3232
3232
|
return this.local;
|
|
3233
3233
|
let n = [];
|
|
@@ -3281,7 +3281,7 @@ class Nt {
|
|
|
3281
3281
|
n.push(i[s]);
|
|
3282
3282
|
}
|
|
3283
3283
|
}
|
|
3284
|
-
return n ? Ts(r ? n : n.sort(rn)) :
|
|
3284
|
+
return n ? Ts(r ? n : n.sort(rn)) : Sn;
|
|
3285
3285
|
}
|
|
3286
3286
|
// Create a group for the given array of decoration sets, or return
|
|
3287
3287
|
// a single set when possible.
|
|
@@ -3355,7 +3355,7 @@ function Vc(t, e) {
|
|
|
3355
3355
|
let n = [];
|
|
3356
3356
|
for (let r = 0; r < t.length; r++) {
|
|
3357
3357
|
let o = t[r];
|
|
3358
|
-
n.push(new
|
|
3358
|
+
n.push(new $(o.from + e, o.to + e, o.type));
|
|
3359
3359
|
}
|
|
3360
3360
|
return n;
|
|
3361
3361
|
}
|
|
@@ -3499,7 +3499,7 @@ class kh {
|
|
|
3499
3499
|
this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
|
|
3500
3500
|
}
|
|
3501
3501
|
onSelectionChange() {
|
|
3502
|
-
if (
|
|
3502
|
+
if (xa(this.view)) {
|
|
3503
3503
|
if (this.suppressingSelectionUpdates)
|
|
3504
3504
|
return kt(this.view);
|
|
3505
3505
|
if (Te && Lt <= 11 && !this.view.state.selection.empty) {
|
|
@@ -3543,7 +3543,7 @@ class kh {
|
|
|
3543
3543
|
return;
|
|
3544
3544
|
let n = this.pendingRecords();
|
|
3545
3545
|
n.length && (this.queue = []);
|
|
3546
|
-
let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) &&
|
|
3546
|
+
let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && xa(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, a = !1, l = [];
|
|
3547
3547
|
if (e.editable)
|
|
3548
3548
|
for (let d = 0; d < n.length; d++) {
|
|
3549
3549
|
let u = this.registerMutation(n[d], l);
|
|
@@ -3558,7 +3558,7 @@ class kh {
|
|
|
3558
3558
|
let { focusNode: u } = this.currentSelection;
|
|
3559
3559
|
for (let f of d) {
|
|
3560
3560
|
let p = f.parentNode;
|
|
3561
|
-
p && p.nodeName == "LI" && (!u ||
|
|
3561
|
+
p && p.nodeName == "LI" && (!u || Sh(e, u) != p) && f.remove();
|
|
3562
3562
|
}
|
|
3563
3563
|
}
|
|
3564
3564
|
}
|
|
@@ -3622,7 +3622,7 @@ function Mh(t, e) {
|
|
|
3622
3622
|
}
|
|
3623
3623
|
return t.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", r, !0), n ? Fa(t, n) : null;
|
|
3624
3624
|
}
|
|
3625
|
-
function
|
|
3625
|
+
function Sh(t, e) {
|
|
3626
3626
|
for (let n = e.parentNode; n && n != t.dom; n = n.parentNode) {
|
|
3627
3627
|
let r = t.docView.nearestDesc(n, !0);
|
|
3628
3628
|
if (r && r.node.isBlock)
|
|
@@ -3630,7 +3630,7 @@ function xh(t, e) {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
return null;
|
|
3632
3632
|
}
|
|
3633
|
-
function
|
|
3633
|
+
function xh(t, e, n) {
|
|
3634
3634
|
let { node: r, fromOffset: o, toOffset: i, from: s, to: a } = t.docView.parseRange(e, n), l = t.domSelectionRange(), c, d = l.anchorNode;
|
|
3635
3635
|
if (d && t.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: l.anchorOffset }], Lo(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), be && t.input.lastKeyCode === 8)
|
|
3636
3636
|
for (let g = i; g > o; g--) {
|
|
@@ -3664,10 +3664,10 @@ function Ah(t) {
|
|
|
3664
3664
|
if (e)
|
|
3665
3665
|
return e.parseRule();
|
|
3666
3666
|
if (t.nodeName == "BR" && t.parentNode) {
|
|
3667
|
-
if (
|
|
3667
|
+
if (Se && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
|
|
3668
3668
|
let n = document.createElement("div");
|
|
3669
3669
|
return n.appendChild(document.createElement("li")), { skip: n };
|
|
3670
|
-
} else if (t.parentNode.lastChild == t ||
|
|
3670
|
+
} else if (t.parentNode.lastChild == t || Se && /^(tr|table)$/i.test(t.parentNode.nodeName))
|
|
3671
3671
|
return { ignore: !0 };
|
|
3672
3672
|
} else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
|
|
3673
3673
|
return { ignore: !0 };
|
|
@@ -3677,50 +3677,50 @@ const Oh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
3677
3677
|
function Th(t, e, n, r, o) {
|
|
3678
3678
|
let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
|
|
3679
3679
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
3680
|
-
let
|
|
3681
|
-
if (
|
|
3682
|
-
if (be && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (
|
|
3680
|
+
let S = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, V = ks(t, S);
|
|
3681
|
+
if (V && !t.state.selection.eq(V)) {
|
|
3682
|
+
if (be && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (_) => _(t, Gt(13, "Enter"))))
|
|
3683
3683
|
return;
|
|
3684
|
-
let z = t.state.tr.setSelection(
|
|
3685
|
-
|
|
3684
|
+
let z = t.state.tr.setSelection(V);
|
|
3685
|
+
S == "pointer" ? z.setMeta("pointer", !0) : S == "key" && z.scrollIntoView(), i && z.setMeta("composition", i), t.dispatch(z);
|
|
3686
3686
|
}
|
|
3687
3687
|
return;
|
|
3688
3688
|
}
|
|
3689
3689
|
let s = t.state.doc.resolve(e), a = s.sharedDepth(n);
|
|
3690
3690
|
e = s.before(a + 1), n = t.state.doc.resolve(n).after(a + 1);
|
|
3691
|
-
let l = t.state.selection, c =
|
|
3691
|
+
let l = t.state.selection, c = xh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
|
|
3692
3692
|
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;
|
|
3693
3693
|
let h = Eh(u.content, c.doc.content, c.from, f, p);
|
|
3694
|
-
if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((
|
|
3694
|
+
if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((S) => S.nodeType == 1 && !Oh.test(S.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
|
|
3695
3695
|
t.input.lastIOSEnter = 0;
|
|
3696
3696
|
return;
|
|
3697
3697
|
}
|
|
3698
3698
|
if (!h)
|
|
3699
|
-
if (r && l instanceof
|
|
3699
|
+
if (r && l instanceof j && !l.empty && l.$head.sameParent(l.$anchor) && !t.composing && !(c.sel && c.sel.anchor != c.sel.head))
|
|
3700
3700
|
h = { start: l.from, endA: l.to, endB: l.to };
|
|
3701
3701
|
else {
|
|
3702
3702
|
if (c.sel) {
|
|
3703
|
-
let
|
|
3704
|
-
if (
|
|
3705
|
-
let
|
|
3706
|
-
i &&
|
|
3703
|
+
let S = Ba(t, t.state.doc, c.sel);
|
|
3704
|
+
if (S && !S.eq(t.state.selection)) {
|
|
3705
|
+
let V = t.state.tr.setSelection(S);
|
|
3706
|
+
i && V.setMeta("composition", i), t.dispatch(V);
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
3709
3709
|
return;
|
|
3710
3710
|
}
|
|
3711
|
-
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof
|
|
3711
|
+
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof j && (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 && Lt <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == " " && (h.start--, h.endA--, h.endB--);
|
|
3712
3712
|
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;
|
|
3713
|
-
if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((
|
|
3713
|
+
if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Z.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
|
|
3714
3714
|
t.input.lastIOSEnter = 0;
|
|
3715
3715
|
return;
|
|
3716
3716
|
}
|
|
3717
|
-
if (t.state.selection.anchor > h.start && Nh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (
|
|
3717
|
+
if (t.state.selection.anchor > h.start && Nh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (S) => S(t, Gt(8, "Backspace")))) {
|
|
3718
3718
|
bt && be && t.domObserver.suppressSelectionUpdates();
|
|
3719
3719
|
return;
|
|
3720
3720
|
}
|
|
3721
3721
|
be && h.endB == h.start && (t.input.lastChromeDelete = Date.now()), bt && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, g = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
|
|
3722
|
-
t.someProp("handleKeyDown", function(
|
|
3723
|
-
return
|
|
3722
|
+
t.someProp("handleKeyDown", function(S) {
|
|
3723
|
+
return S(t, Gt(13, "Enter"));
|
|
3724
3724
|
});
|
|
3725
3725
|
}, 20));
|
|
3726
3726
|
let y = h.start, M = h.endA, k, A, F;
|
|
@@ -3733,15 +3733,15 @@ function Th(t, e, n, r, o) {
|
|
|
3733
3733
|
)
|
|
3734
3734
|
k = t.state.tr, F.type == "add" ? k.addMark(y, M, F.mark) : k.removeMark(y, M, F.mark);
|
|
3735
3735
|
else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
3736
|
-
let
|
|
3737
|
-
if (t.someProp("handleTextInput", (
|
|
3736
|
+
let S = m.parent.textBetween(m.parentOffset, g.parentOffset);
|
|
3737
|
+
if (t.someProp("handleTextInput", (V) => V(t, y, M, S)))
|
|
3738
3738
|
return;
|
|
3739
|
-
k = t.state.tr.insertText(
|
|
3739
|
+
k = t.state.tr.insertText(S, y, M);
|
|
3740
3740
|
}
|
|
3741
3741
|
}
|
|
3742
3742
|
if (k || (k = t.state.tr.replace(y, M, c.doc.slice(h.start - c.from, h.endB - c.from))), c.sel) {
|
|
3743
|
-
let
|
|
3744
|
-
|
|
3743
|
+
let S = Ba(t, k.doc, c.sel);
|
|
3744
|
+
S && !(be && t.composing && S.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (S.head == y || S.head == k.mapping.map(M) - 1) || Te && S.empty && S.head == y) && k.setSelection(S);
|
|
3745
3745
|
}
|
|
3746
3746
|
A && k.ensureMarks(A), i && k.setMeta("composition", i), t.dispatch(k.scrollIntoView());
|
|
3747
3747
|
}
|
|
@@ -3900,7 +3900,7 @@ class Wc {
|
|
|
3900
3900
|
let h = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
3901
3901
|
this.composing && (this.input.compositionNode = dh(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = wa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
|
|
3902
3902
|
}
|
|
3903
|
-
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Lp(this)) ? kt(this, p) : (
|
|
3903
|
+
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Lp(this)) ? kt(this, p) : (xc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
3904
3904
|
}
|
|
3905
3905
|
this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && fp(f);
|
|
3906
3906
|
}
|
|
@@ -4154,7 +4154,7 @@ class Wc {
|
|
|
4154
4154
|
*/
|
|
4155
4155
|
domSelectionRange() {
|
|
4156
4156
|
let e = this.domSelection();
|
|
4157
|
-
return e ?
|
|
4157
|
+
return e ? Se && this.root.nodeType === 11 && ip(this.dom.ownerDocument) == this.dom && Mh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
4158
4158
|
}
|
|
4159
4159
|
/**
|
|
4160
4160
|
@internal
|
|
@@ -4169,12 +4169,12 @@ function _a(t) {
|
|
|
4169
4169
|
if (typeof n == "function" && (n = n(t.state)), n)
|
|
4170
4170
|
for (let r in n)
|
|
4171
4171
|
r == "class" ? e.class += " " + n[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + n[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(n[r]));
|
|
4172
|
-
}), e.translate || (e.translate = "no"), [
|
|
4172
|
+
}), e.translate || (e.translate = "no"), [$.node(0, t.state.doc.content.size, e)];
|
|
4173
4173
|
}
|
|
4174
4174
|
function $a(t) {
|
|
4175
4175
|
if (t.markCursor) {
|
|
4176
4176
|
let e = document.createElement("img");
|
|
4177
|
-
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco:
|
|
4177
|
+
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: $.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
|
|
4178
4178
|
} else
|
|
4179
4179
|
t.cursorWrapper = null;
|
|
4180
4180
|
}
|
|
@@ -4356,7 +4356,7 @@ yr.encodeInto ? om : im, sm = (t, e) => {
|
|
|
4356
4356
|
remove: t.length - n - r,
|
|
4357
4357
|
insert: e.slice(n, e.length - r)
|
|
4358
4358
|
};
|
|
4359
|
-
}, wm = bm, te = new
|
|
4359
|
+
}, wm = bm, te = new Y("y-sync"), _t = new Y("y-undo"), Kr = new Y("yjs-cursor"), vm = Math.random, km = (t) => t[mr(vm() * t.length)], Xa = (t) => t === void 0 ? null : t;
|
|
4360
4360
|
class Cm {
|
|
4361
4361
|
constructor() {
|
|
4362
4362
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -4380,9 +4380,9 @@ try {
|
|
|
4380
4380
|
typeof localStorage < "u" && localStorage && (Jc = localStorage, Mm = !1);
|
|
4381
4381
|
} catch {
|
|
4382
4382
|
}
|
|
4383
|
-
const
|
|
4383
|
+
const Sm = Jc, Pn = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Yc = typeof window < "u" && typeof document < "u" && !Pn;
|
|
4384
4384
|
let Ze;
|
|
4385
|
-
const
|
|
4385
|
+
const xm = () => {
|
|
4386
4386
|
if (Ze === void 0)
|
|
4387
4387
|
if (Pn) {
|
|
4388
4388
|
Ze = so();
|
|
@@ -4400,7 +4400,7 @@ const Sm = () => {
|
|
|
4400
4400
|
}
|
|
4401
4401
|
})) : Ze = so();
|
|
4402
4402
|
return Ze;
|
|
4403
|
-
}, Ri = (t) =>
|
|
4403
|
+
}, Ri = (t) => xm().has(t), Li = (t) => Xa(Pn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : Sm.getItem(t)), Gc = (t) => Ri("--" + t) || Li(t) !== null;
|
|
4404
4404
|
Gc("production");
|
|
4405
4405
|
const Am = Pn && hm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
4406
4406
|
Am || !Ri("--no-colors") && // @todo deprecate --no-colors
|
|
@@ -4575,7 +4575,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Um = [{ light: "
|
|
|
4575
4575
|
mapping: i
|
|
4576
4576
|
} = {}) => {
|
|
4577
4577
|
let s = !1;
|
|
4578
|
-
const a = new Jm(t, i), l = new
|
|
4578
|
+
const a = new Jm(t, i), l = new G({
|
|
4579
4579
|
props: {
|
|
4580
4580
|
editable: (c) => {
|
|
4581
4581
|
const d = te.getState(c);
|
|
@@ -4666,7 +4666,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Um = [{ light: "
|
|
|
4666
4666
|
e.head,
|
|
4667
4667
|
n.mapping
|
|
4668
4668
|
);
|
|
4669
|
-
r !== null && o !== null && (t = t.setSelection(
|
|
4669
|
+
r !== null && o !== null && (t = t.setSelection(j.create(t.doc, r, o)));
|
|
4670
4670
|
}
|
|
4671
4671
|
}, Fi = (t, e) => ({
|
|
4672
4672
|
type: (
|
|
@@ -4762,7 +4762,7 @@ class Jm {
|
|
|
4762
4762
|
);
|
|
4763
4763
|
if (e) {
|
|
4764
4764
|
const o = zt(En(e.anchor, 0), r.doc.content.size), i = zt(En(e.head, 0), r.doc.content.size);
|
|
4765
|
-
r.setSelection(
|
|
4765
|
+
r.setSelection(j.create(r.doc, o, i));
|
|
4766
4766
|
}
|
|
4767
4767
|
this.prosemirrorView.dispatch(
|
|
4768
4768
|
r.setMeta(te, { isChangeOrigin: !0, binding: this })
|
|
@@ -5352,14 +5352,14 @@ const rg = () => {
|
|
|
5352
5352
|
if (u !== null && f !== null) {
|
|
5353
5353
|
const p = En(t.doc.content.size - 1, 0);
|
|
5354
5354
|
u = zt(u, p), f = zt(f, p), a.push(
|
|
5355
|
-
|
|
5355
|
+
$.widget(f, () => r(d, c), {
|
|
5356
5356
|
key: c + "",
|
|
5357
5357
|
side: 10
|
|
5358
5358
|
})
|
|
5359
5359
|
);
|
|
5360
5360
|
const h = zt(u, f), m = En(u, f);
|
|
5361
5361
|
a.push(
|
|
5362
|
-
|
|
5362
|
+
$.inline(h, m, o(d, c), {
|
|
5363
5363
|
inclusiveEnd: !0,
|
|
5364
5364
|
inclusiveStart: !1
|
|
5365
5365
|
})
|
|
@@ -5372,7 +5372,7 @@ const rg = () => {
|
|
|
5372
5372
|
cursorBuilder: n = cg,
|
|
5373
5373
|
selectionBuilder: r = dg,
|
|
5374
5374
|
getSelection: o = (s) => s.selection
|
|
5375
|
-
} = {}, i = "cursor") => new
|
|
5375
|
+
} = {}, i = "cursor") => new G({
|
|
5376
5376
|
key: Kr,
|
|
5377
5377
|
state: {
|
|
5378
5378
|
init(s, a) {
|
|
@@ -5445,7 +5445,7 @@ const rg = () => {
|
|
|
5445
5445
|
const e = _t.getState(t).undoManager;
|
|
5446
5446
|
if (e != null)
|
|
5447
5447
|
return e.redo(), !0;
|
|
5448
|
-
}, mg = /* @__PURE__ */ new Set(["paragraph"]), gg = (t, e) => !(t instanceof kf) || !(t.content instanceof Cf) || !(t.content.type instanceof Mf || t.content.type instanceof
|
|
5448
|
+
}, mg = /* @__PURE__ */ new Set(["paragraph"]), gg = (t, e) => !(t instanceof kf) || !(t.content instanceof Cf) || !(t.content.type instanceof Mf || t.content.type instanceof Sf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, yg = ({ protectedNodes: t = mg, trackedOrigins: e = [], undoManager: n = null } = {}) => new G({
|
|
5449
5449
|
key: _t,
|
|
5450
5450
|
state: {
|
|
5451
5451
|
init: (r, o) => {
|
|
@@ -5591,7 +5591,7 @@ var Vt = {
|
|
|
5591
5591
|
220: "\\",
|
|
5592
5592
|
221: "]",
|
|
5593
5593
|
222: "'"
|
|
5594
|
-
},
|
|
5594
|
+
}, So = {
|
|
5595
5595
|
48: ")",
|
|
5596
5596
|
49: "!",
|
|
5597
5597
|
50: "@",
|
|
@@ -5620,10 +5620,10 @@ var Vt = {
|
|
|
5620
5620
|
for (var ge = 0; ge < 10; ge++) Vt[48 + ge] = Vt[96 + ge] = String(ge);
|
|
5621
5621
|
for (var ge = 1; ge <= 24; ge++) Vt[ge + 111] = "F" + ge;
|
|
5622
5622
|
for (var ge = 65; ge <= 90; ge++)
|
|
5623
|
-
Vt[ge] = String.fromCharCode(ge + 32),
|
|
5624
|
-
for (var ai in Vt)
|
|
5623
|
+
Vt[ge] = String.fromCharCode(ge + 32), So[ge] = String.fromCharCode(ge);
|
|
5624
|
+
for (var ai in Vt) So.hasOwnProperty(ai) || (So[ai] = Vt[ai]);
|
|
5625
5625
|
function kg(t) {
|
|
5626
|
-
var e = wg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || vg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ?
|
|
5626
|
+
var e = wg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || vg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? So : Vt)[t.keyCode] || t.key || "Unidentified";
|
|
5627
5627
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
5628
5628
|
}
|
|
5629
5629
|
const Cg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
@@ -5648,7 +5648,7 @@ function Mg(t) {
|
|
|
5648
5648
|
}
|
|
5649
5649
|
return r && (n = "Alt-" + n), o && (n = "Ctrl-" + n), s && (n = "Meta-" + n), i && (n = "Shift-" + n), n;
|
|
5650
5650
|
}
|
|
5651
|
-
function
|
|
5651
|
+
function Sg(t) {
|
|
5652
5652
|
let e = /* @__PURE__ */ Object.create(null);
|
|
5653
5653
|
for (let n in t)
|
|
5654
5654
|
e[Mg(n)] = t[n];
|
|
@@ -5657,11 +5657,11 @@ function xg(t) {
|
|
|
5657
5657
|
function li(t, e, n = !0) {
|
|
5658
5658
|
return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
|
|
5659
5659
|
}
|
|
5660
|
-
function
|
|
5661
|
-
return new
|
|
5660
|
+
function xg(t) {
|
|
5661
|
+
return new G({ props: { handleKeyDown: Ps(t) } });
|
|
5662
5662
|
}
|
|
5663
5663
|
function Ps(t) {
|
|
5664
|
-
let e =
|
|
5664
|
+
let e = Sg(t);
|
|
5665
5665
|
return function(n, r) {
|
|
5666
5666
|
let o = kg(r), i, s = e[li(o, r)];
|
|
5667
5667
|
if (s && s(n.state, n.dispatch, n))
|
|
@@ -5701,7 +5701,7 @@ function Pr(t, e) {
|
|
|
5701
5701
|
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
5702
5702
|
}
|
|
5703
5703
|
var zn, nd, rd;
|
|
5704
|
-
class
|
|
5704
|
+
class D {
|
|
5705
5705
|
/**
|
|
5706
5706
|
* Get a list of all attributes defined in the extensions.
|
|
5707
5707
|
* @param extensions List of all extensions.
|
|
@@ -5714,7 +5714,7 @@ class N {
|
|
|
5714
5714
|
renderDOM: null,
|
|
5715
5715
|
parseDOM: null,
|
|
5716
5716
|
keepOnSplit: !0
|
|
5717
|
-
}, o =
|
|
5717
|
+
}, o = N(this, zn, nd).call(this, e, r), i = N(this, zn, rd).call(this, e, r);
|
|
5718
5718
|
return n.push(...o, ...i), n;
|
|
5719
5719
|
}
|
|
5720
5720
|
/**
|
|
@@ -5879,7 +5879,7 @@ zn = new WeakSet(), nd = function(e, n) {
|
|
|
5879
5879
|
}
|
|
5880
5880
|
}
|
|
5881
5881
|
return r;
|
|
5882
|
-
}, ft(
|
|
5882
|
+
}, ft(D, zn);
|
|
5883
5883
|
function $i(t) {
|
|
5884
5884
|
const e = Object.entries(t).filter(([n, r]) => n === "attrs" && Of(r) ? !1 : r != null);
|
|
5885
5885
|
return Object.fromEntries(e);
|
|
@@ -5894,7 +5894,7 @@ const cr = class cr {
|
|
|
5894
5894
|
*/
|
|
5895
5895
|
static createSchemaByExtensions(e, n) {
|
|
5896
5896
|
var c, d;
|
|
5897
|
-
const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => E(u, "topNode"))?.name, s =
|
|
5897
|
+
const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => E(u, "topNode"))?.name, s = D.getAttributesFromExtensions(e), a = N(c = cr, _n, od).call(c, r, s, n), l = N(d = cr, _n, id).call(d, o, s, n);
|
|
5898
5898
|
return new nc({ topNode: i, nodes: a, marks: l });
|
|
5899
5899
|
}
|
|
5900
5900
|
};
|
|
@@ -5927,11 +5927,11 @@ _n = new WeakSet(), od = function(e, n, r) {
|
|
|
5927
5927
|
attrs: l,
|
|
5928
5928
|
...c
|
|
5929
5929
|
}), u = K(E(i, "parseDOM", a));
|
|
5930
|
-
u && (d.parseDOM = u.map((h) =>
|
|
5930
|
+
u && (d.parseDOM = u.map((h) => D.insertExtensionAttrsToParseRule(h, s)));
|
|
5931
5931
|
const f = E(i, "renderDOM", a);
|
|
5932
5932
|
f && (d.toDOM = (h) => f({
|
|
5933
5933
|
node: h,
|
|
5934
|
-
htmlAttributes:
|
|
5934
|
+
htmlAttributes: D.getAttributesToRender(h, s)
|
|
5935
5935
|
}));
|
|
5936
5936
|
const p = E(i, "renderText", a);
|
|
5937
5937
|
return p && (d.toText = p), [i.name, d];
|
|
@@ -5954,11 +5954,11 @@ _n = new WeakSet(), od = function(e, n, r) {
|
|
|
5954
5954
|
code: K(E(i, "code", a)),
|
|
5955
5955
|
attrs: l
|
|
5956
5956
|
}), d = K(E(i, "parseDOM", a));
|
|
5957
|
-
d && (c.parseDOM = d.map((f) =>
|
|
5957
|
+
d && (c.parseDOM = d.map((f) => D.insertExtensionAttrsToParseRule(f, s)));
|
|
5958
5958
|
const u = E(i, "renderDOM", a);
|
|
5959
5959
|
return u && (c.toDOM = (f) => u({
|
|
5960
5960
|
mark: f,
|
|
5961
|
-
htmlAttributes:
|
|
5961
|
+
htmlAttributes: D.getAttributesToRender(f, s)
|
|
5962
5962
|
})), [i.name, c];
|
|
5963
5963
|
});
|
|
5964
5964
|
return Object.fromEntries(o);
|
|
@@ -6170,8 +6170,8 @@ const Ng = (t, e) => {
|
|
|
6170
6170
|
}), a.dispatch(p), c = !0);
|
|
6171
6171
|
}), c;
|
|
6172
6172
|
}, Eg = ({ editor: t, rules: e }) => {
|
|
6173
|
-
const n = new
|
|
6174
|
-
key: new
|
|
6173
|
+
const n = new G({
|
|
6174
|
+
key: new Y("inputRulesPlugin"),
|
|
6175
6175
|
state: {
|
|
6176
6176
|
init() {
|
|
6177
6177
|
return null;
|
|
@@ -6270,7 +6270,7 @@ const An = class An {
|
|
|
6270
6270
|
this.editor = r, this.externalExtensions = n || [], this.externalExtensions = this.externalExtensions.map((o) => ({
|
|
6271
6271
|
...o,
|
|
6272
6272
|
isExternal: !0
|
|
6273
|
-
})), this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = Vi.createSchemaByExtensions(this.extensions, r),
|
|
6273
|
+
})), this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = Vi.createSchemaByExtensions(this.extensions, r), N(this, $n, sd).call(this);
|
|
6274
6274
|
}
|
|
6275
6275
|
/**
|
|
6276
6276
|
* Static method for creating ExtensionService.
|
|
@@ -6303,7 +6303,7 @@ const An = class An {
|
|
|
6303
6303
|
* @returns Array of attributes.
|
|
6304
6304
|
*/
|
|
6305
6305
|
get attributes() {
|
|
6306
|
-
return
|
|
6306
|
+
return D.getAttributesFromExtensions(this.extensions);
|
|
6307
6307
|
}
|
|
6308
6308
|
/**
|
|
6309
6309
|
* Get all commands defined in the extensions.
|
|
@@ -6345,7 +6345,7 @@ const An = class An {
|
|
|
6345
6345
|
const f = Object.entries(l()).map(([p, h]) => [p, (...m) => h({ editor: e, keymapArgs: m })]);
|
|
6346
6346
|
c = { ...Object.fromEntries(f) };
|
|
6347
6347
|
}
|
|
6348
|
-
a.push(
|
|
6348
|
+
a.push(xg(c));
|
|
6349
6349
|
const d = E(i, "addInputRules", s);
|
|
6350
6350
|
Ag(i, e.options.enableInputRules) && d && r.push(...d());
|
|
6351
6351
|
const u = E(i, "addPmPlugins", s);
|
|
@@ -6378,7 +6378,7 @@ const An = class An {
|
|
|
6378
6378
|
}, a = E(o, "addNodeView", s);
|
|
6379
6379
|
if (!a) return [];
|
|
6380
6380
|
const l = (c, d, u, f) => {
|
|
6381
|
-
const p =
|
|
6381
|
+
const p = D.getAttributesToRender(c, i);
|
|
6382
6382
|
return a()({
|
|
6383
6383
|
editor: e,
|
|
6384
6384
|
node: c,
|
|
@@ -6407,7 +6407,7 @@ sd = function() {
|
|
|
6407
6407
|
editor: this.editor,
|
|
6408
6408
|
type: Gn(e.name, this.schema)
|
|
6409
6409
|
};
|
|
6410
|
-
e.type === "mark" && (K(E(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name),
|
|
6410
|
+
e.type === "mark" && (K(E(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), N(this, $n, ad).call(this, e);
|
|
6411
6411
|
}
|
|
6412
6412
|
}, /**
|
|
6413
6413
|
* Attach editor events to extension
|
|
@@ -6601,7 +6601,7 @@ const jg = (t, e) => {
|
|
|
6601
6601
|
return !1;
|
|
6602
6602
|
if (e) {
|
|
6603
6603
|
let s = (!r.parentOffset && o.index() < o.parent.childCount ? r : o).pos, a = t.tr.insert(s, i.createAndFill());
|
|
6604
|
-
a.setSelection(
|
|
6604
|
+
a.setSelection(j.create(a.doc, s + 1)), e(a.scrollIntoView());
|
|
6605
6605
|
}
|
|
6606
6606
|
return !0;
|
|
6607
6607
|
}, gd = (t, e) => {
|
|
@@ -6634,7 +6634,7 @@ function Wg(t) {
|
|
|
6634
6634
|
i.unshift(null);
|
|
6635
6635
|
}
|
|
6636
6636
|
let d = e.tr;
|
|
6637
|
-
(e.selection instanceof
|
|
6637
|
+
(e.selection instanceof j || e.selection instanceof Or) && d.deleteSelection();
|
|
6638
6638
|
let u = d.mapping.map(r.pos), f = wt(d.doc, u, i.length, i);
|
|
6639
6639
|
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) {
|
|
6640
6640
|
let p = d.mapping.map(r.before(s)), h = d.doc.resolve(p);
|
|
@@ -6695,7 +6695,7 @@ function bd(t) {
|
|
|
6695
6695
|
return !1;
|
|
6696
6696
|
i--;
|
|
6697
6697
|
}
|
|
6698
|
-
return o.node(i).isTextblock ? (n && n(e.tr.setSelection(
|
|
6698
|
+
return o.node(i).isTextblock ? (n && n(e.tr.setSelection(j.create(e.doc, t < 0 ? o.start(i) : o.end(i)))), !0) : !1;
|
|
6699
6699
|
};
|
|
6700
6700
|
}
|
|
6701
6701
|
const Xg = bd(-1), Jg = bd(1);
|
|
@@ -6755,13 +6755,13 @@ const Qa = (t, e) => {
|
|
|
6755
6755
|
t.tr.ensureMarks(r);
|
|
6756
6756
|
}
|
|
6757
6757
|
}, Yg = ({ keepMarks: t = !0 } = {}) => (e) => {
|
|
6758
|
-
const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u =
|
|
6758
|
+
const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u = D.getSplittedAttributes(d, l.node().type.name, l.node().attrs);
|
|
6759
6759
|
if (s instanceof B && s.node.isBlock)
|
|
6760
6760
|
return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Qa(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
|
|
6761
6761
|
if (!l.parent.isBlock) return !1;
|
|
6762
6762
|
if (o) {
|
|
6763
6763
|
const f = c.parentOffset === c.parent.content.size;
|
|
6764
|
-
s instanceof
|
|
6764
|
+
s instanceof j && n.deleteSelection();
|
|
6765
6765
|
const p = l.depth === 0 ? null : wd(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
6766
6766
|
let h = f && p ? [{ type: p, attrs: u }] : void 0, m = wt(n.doc, n.mapping.map(l.pos), 1, h);
|
|
6767
6767
|
if (!h && !m && wt(n.doc, n.mapping.map(l.pos), 1, p ? [{ type: p }] : void 0) && (m = !0, h = p ? [{ type: p, attrs: u }] : void 0), m && (n.split(n.mapping.map(l.pos), 1, h), p && !f && !l.parentOffset && l.parent.type !== p)) {
|
|
@@ -6796,7 +6796,7 @@ const ny = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6796
6796
|
const { selection: i } = n, { empty: s, ranges: a } = i, l = Mt(t, r.schema);
|
|
6797
6797
|
if (o)
|
|
6798
6798
|
if (s) {
|
|
6799
|
-
const c =
|
|
6799
|
+
const c = D.getMarkAttributes(r, l);
|
|
6800
6800
|
n.addStoredMark(
|
|
6801
6801
|
l.create({
|
|
6802
6802
|
...c,
|
|
@@ -6859,7 +6859,7 @@ const oy = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6859
6859
|
t.removeMark(i.$from.pos, i.$to.pos);
|
|
6860
6860
|
}), !0;
|
|
6861
6861
|
};
|
|
6862
|
-
function
|
|
6862
|
+
function xo(t, e, n = {}) {
|
|
6863
6863
|
const { empty: r, ranges: o } = t.selection, i = e ? Mt(e, t.schema) : null;
|
|
6864
6864
|
if (r)
|
|
6865
6865
|
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => ur(u.attrs, n, { strict: !1 }));
|
|
@@ -6884,7 +6884,7 @@ function So(t, e, n = {}) {
|
|
|
6884
6884
|
}
|
|
6885
6885
|
const sy = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
6886
6886
|
const { extendEmptyMarkRange: i = !1 } = n, s = Mt(t, r.schema);
|
|
6887
|
-
return
|
|
6887
|
+
return xo(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
6888
6888
|
}, ay = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
6889
6889
|
const { selection: r } = e, { ranges: o } = r;
|
|
6890
6890
|
return n && o.forEach(({ $from: i, $to: s }) => {
|
|
@@ -7025,7 +7025,7 @@ function My(t, e, n) {
|
|
|
7025
7025
|
s === 0 && (s = d);
|
|
7026
7026
|
}), t.setSelection(Z.near(t.doc.resolve(s), n));
|
|
7027
7027
|
}
|
|
7028
|
-
const
|
|
7028
|
+
const Sy = (t) => !("type" in t), xy = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
|
|
7029
7029
|
if (o) {
|
|
7030
7030
|
n = {
|
|
7031
7031
|
parseOptions: {},
|
|
@@ -7053,7 +7053,7 @@ const xy = (t) => !("type" in t), Sy = (t, e, n) => ({ tr: r, dispatch: o, edito
|
|
|
7053
7053
|
}), !1;
|
|
7054
7054
|
}
|
|
7055
7055
|
let { from: a, to: l } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
|
|
7056
|
-
if ((
|
|
7056
|
+
if ((Sy(s) ? s : [s]).forEach((p) => {
|
|
7057
7057
|
p.check(), c = c ? p.isText && p.marks.length === 0 : !1, d = d ? p.isBlock : !1;
|
|
7058
7058
|
}), a === l && d) {
|
|
7059
7059
|
const { parent: p } = r.doc.resolve(a);
|
|
@@ -8357,14 +8357,14 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8357
8357
|
return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => di(s, h)).command(() => ui(s, h)).run();
|
|
8358
8358
|
}
|
|
8359
8359
|
const F = ({ ensureMarks: z = !1 }) => () => {
|
|
8360
|
-
const
|
|
8360
|
+
const _ = d().wrapInList(h, r);
|
|
8361
8361
|
if (z) {
|
|
8362
|
-
const
|
|
8363
|
-
s.ensureMarks(
|
|
8362
|
+
const H = M.filter((se) => p.includes(se.type.name));
|
|
8363
|
+
s.ensureMarks(H);
|
|
8364
8364
|
}
|
|
8365
|
-
return
|
|
8366
|
-
},
|
|
8367
|
-
return i.converter.numbering = zy(
|
|
8365
|
+
return _ ? !0 : u.clearNodes();
|
|
8366
|
+
}, S = Cd(A.definitions);
|
|
8367
|
+
return i.converter.numbering = zy(S, A, h), r.listId = S, !n || !M || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => di(s, h)).command(() => ui(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => di(s, h)).command(() => ui(s, h)).run();
|
|
8368
8368
|
}, Cd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, zy = (t, e, n) => {
|
|
8369
8369
|
const r = n.name === "orderedList" ? Ly : Fy, o = { ...e }, i = Cd(o.abstracts), s = {
|
|
8370
8370
|
...r,
|
|
@@ -8406,7 +8406,7 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8406
8406
|
const b = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
|
|
8407
8407
|
for (let A = a.depth - b; A >= a.depth - 3; A--)
|
|
8408
8408
|
g = P.from(a.node(A).copy(g));
|
|
8409
|
-
const w = a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3, C =
|
|
8409
|
+
const w = a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3, C = D.getSplittedAttributes(
|
|
8410
8410
|
u,
|
|
8411
8411
|
a.node().type.name,
|
|
8412
8412
|
a.node().attrs
|
|
@@ -8418,11 +8418,11 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8418
8418
|
n.doc.nodesBetween(M, n.doc.content.size, (A, F) => {
|
|
8419
8419
|
if (k > -1) return !1;
|
|
8420
8420
|
A.isTextblock && A.content.size === 0 && (k = F + 1);
|
|
8421
|
-
}), k > -1 && n.setSelection(
|
|
8421
|
+
}), k > -1 && n.setSelection(j.near(n.doc.resolve(k))), n.scrollIntoView();
|
|
8422
8422
|
}
|
|
8423
8423
|
return !0;
|
|
8424
8424
|
}
|
|
8425
|
-
const f = l.pos === a.end() ? d.contentMatchAt(0).defaultType : null, p =
|
|
8425
|
+
const f = l.pos === a.end() ? d.contentMatchAt(0).defaultType : null, p = D.getSplittedAttributes(u, d.type.name, d.attrs), h = D.getSplittedAttributes(
|
|
8426
8426
|
u,
|
|
8427
8427
|
a.node().type.name,
|
|
8428
8428
|
a.node().attrs
|
|
@@ -8456,7 +8456,7 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8456
8456
|
exitCode: ey,
|
|
8457
8457
|
first: Rg,
|
|
8458
8458
|
insertContent: Cy,
|
|
8459
|
-
insertContentAt:
|
|
8459
|
+
insertContentAt: xy,
|
|
8460
8460
|
insertTabChar: Fg,
|
|
8461
8461
|
insertTabNode: Bg,
|
|
8462
8462
|
joinBackward: gy,
|
|
@@ -8544,8 +8544,8 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8544
8544
|
}), Ky = Q.create({
|
|
8545
8545
|
name: "editable",
|
|
8546
8546
|
addPmPlugins() {
|
|
8547
|
-
return [new
|
|
8548
|
-
key: new
|
|
8547
|
+
return [new G({
|
|
8548
|
+
key: new Y("editable"),
|
|
8549
8549
|
props: {
|
|
8550
8550
|
editable: () => this.editor.options.editable
|
|
8551
8551
|
}
|
|
@@ -8555,8 +8555,8 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8555
8555
|
name: "editorFocus",
|
|
8556
8556
|
addPmPlugins() {
|
|
8557
8557
|
const t = this.editor;
|
|
8558
|
-
return [new
|
|
8559
|
-
key: new
|
|
8558
|
+
return [new G({
|
|
8559
|
+
key: new Y("editorFocus"),
|
|
8560
8560
|
props: {
|
|
8561
8561
|
handleDOMEvents: {
|
|
8562
8562
|
focus: (n, r) => {
|
|
@@ -8582,11 +8582,11 @@ function Md(t, e, n, { check: r = !1 } = {}) {
|
|
|
8582
8582
|
}
|
|
8583
8583
|
return e.topNodeType.createAndFill();
|
|
8584
8584
|
}
|
|
8585
|
-
function
|
|
8585
|
+
function Sd(t, e, n = {}) {
|
|
8586
8586
|
if (!e)
|
|
8587
|
-
return Ao(t, null, n) ||
|
|
8587
|
+
return Ao(t, null, n) || xo(t, null, n);
|
|
8588
8588
|
const r = Pr(e, t.schema);
|
|
8589
|
-
return r === "node" ? Ao(t, e, n) : r === "mark" ?
|
|
8589
|
+
return r === "node" ? Ao(t, e, n) : r === "mark" ? xo(t, e, n) : !1;
|
|
8590
8590
|
}
|
|
8591
8591
|
const zs = ({
|
|
8592
8592
|
tr: t,
|
|
@@ -8611,7 +8611,7 @@ const zs = ({
|
|
|
8611
8611
|
mark: f
|
|
8612
8612
|
});
|
|
8613
8613
|
}), c;
|
|
8614
|
-
},
|
|
8614
|
+
}, xd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
|
|
8615
8615
|
t.removeMark(e, n, t.doc.type.schema.marks[ue]), t.removeMark(e, n, t.doc.type.schema.marks[$e]);
|
|
8616
8616
|
let i = zs({
|
|
8617
8617
|
tr: t,
|
|
@@ -8786,10 +8786,10 @@ const Td = (t) => {
|
|
|
8786
8786
|
getNodeType: le,
|
|
8787
8787
|
getSchemaTypeByName: Gn,
|
|
8788
8788
|
getSchemaTypeNameByName: Pr,
|
|
8789
|
-
isActive:
|
|
8789
|
+
isActive: Sd,
|
|
8790
8790
|
isInTable: Td,
|
|
8791
8791
|
isList: Ui,
|
|
8792
|
-
isMarkActive:
|
|
8792
|
+
isMarkActive: xo,
|
|
8793
8793
|
isNodeActive: Ao,
|
|
8794
8794
|
isTextSelection: vd,
|
|
8795
8795
|
posToDOMRect: Od
|
|
@@ -8841,7 +8841,7 @@ const Td = (t) => {
|
|
|
8841
8841
|
});
|
|
8842
8842
|
});
|
|
8843
8843
|
}), e ? n.filter(({ mark: o }) => o.attrs.id === e) : n) : n;
|
|
8844
|
-
}, de = new
|
|
8844
|
+
}, de = new Y("TrackChangesBase"), Qy = (t = {}) => new G({
|
|
8845
8845
|
key: de,
|
|
8846
8846
|
state: {
|
|
8847
8847
|
init(e, n) {
|
|
@@ -8901,39 +8901,39 @@ const Td = (t) => {
|
|
|
8901
8901
|
return o.length ? (o.forEach(({ mark: i, from: s, to: a }) => {
|
|
8902
8902
|
if (i.type.name === $e)
|
|
8903
8903
|
if (e) {
|
|
8904
|
-
const l =
|
|
8904
|
+
const l = $.inline(s, a, {
|
|
8905
8905
|
class: "track-insert-dec hidden"
|
|
8906
8906
|
});
|
|
8907
8907
|
r.push(l);
|
|
8908
8908
|
} else if (n) {
|
|
8909
|
-
const l =
|
|
8909
|
+
const l = $.inline(s, a, {
|
|
8910
8910
|
class: "track-insert-dec normal"
|
|
8911
8911
|
});
|
|
8912
8912
|
r.push(l);
|
|
8913
8913
|
} else {
|
|
8914
|
-
const l =
|
|
8914
|
+
const l = $.inline(s, a, {
|
|
8915
8915
|
class: "track-insert-dec highlighted"
|
|
8916
8916
|
});
|
|
8917
8917
|
r.push(l);
|
|
8918
8918
|
}
|
|
8919
8919
|
if (i.type.name === ue)
|
|
8920
8920
|
if (e) {
|
|
8921
|
-
const l =
|
|
8921
|
+
const l = $.inline(s, a, {
|
|
8922
8922
|
class: "track-delete-dec normal"
|
|
8923
8923
|
});
|
|
8924
8924
|
r.push(l);
|
|
8925
8925
|
} else if (n) {
|
|
8926
|
-
const l =
|
|
8926
|
+
const l = $.inline(s, a, {
|
|
8927
8927
|
class: "track-delete-dec hidden"
|
|
8928
8928
|
});
|
|
8929
8929
|
r.push(l);
|
|
8930
8930
|
} else {
|
|
8931
|
-
const l =
|
|
8931
|
+
const l = $.inline(s, a, {
|
|
8932
8932
|
class: "track-delete-dec highlighted"
|
|
8933
8933
|
// 'hidden'
|
|
8934
8934
|
});
|
|
8935
8935
|
r.push(l);
|
|
8936
|
-
const c =
|
|
8936
|
+
const c = $.widget(
|
|
8937
8937
|
s,
|
|
8938
8938
|
() => {
|
|
8939
8939
|
const d = document.createElement("span");
|
|
@@ -8945,17 +8945,17 @@ const Td = (t) => {
|
|
|
8945
8945
|
}
|
|
8946
8946
|
if (i.type.name === Me)
|
|
8947
8947
|
if (e) {
|
|
8948
|
-
const l =
|
|
8948
|
+
const l = $.inline(s, a, {
|
|
8949
8949
|
class: "track-format-dec before"
|
|
8950
8950
|
});
|
|
8951
8951
|
r.push(l);
|
|
8952
8952
|
} else if (n) {
|
|
8953
|
-
const l =
|
|
8953
|
+
const l = $.inline(s, a, {
|
|
8954
8954
|
class: "track-format-dec normal"
|
|
8955
8955
|
});
|
|
8956
8956
|
r.push(l);
|
|
8957
8957
|
} else {
|
|
8958
|
-
const l =
|
|
8958
|
+
const l = $.inline(s, a, {
|
|
8959
8959
|
class: "track-format-dec highlighted"
|
|
8960
8960
|
});
|
|
8961
8961
|
r.push(l);
|
|
@@ -9070,7 +9070,7 @@ const Td = (t) => {
|
|
|
9070
9070
|
if (!r.options.isInternal && n) return "transparent";
|
|
9071
9071
|
const o = he.getState(r.state), i = n ? o.internalColor : o.externalColor, s = t == e ? "44" : "22";
|
|
9072
9072
|
return `${i}${s}`;
|
|
9073
|
-
}, on = new
|
|
9073
|
+
}, on = new Y("paginationPlugin"), ib = async (t) => {
|
|
9074
9074
|
if (!t.converter) return;
|
|
9075
9075
|
const e = { headers: {}, footers: {} }, n = t.converter.headerIds, r = t.converter.footerIds;
|
|
9076
9076
|
for (let o in n) {
|
|
@@ -9114,7 +9114,7 @@ const Td = (t) => {
|
|
|
9114
9114
|
editable: !1,
|
|
9115
9115
|
element: r,
|
|
9116
9116
|
content: e,
|
|
9117
|
-
extensions:
|
|
9117
|
+
extensions: Jk(),
|
|
9118
9118
|
documentId: "sectionId"
|
|
9119
9119
|
});
|
|
9120
9120
|
c.on("create", () => {
|
|
@@ -9136,7 +9136,7 @@ const Td = (t) => {
|
|
|
9136
9136
|
}), n({ height: d, sectionEditor: c, sectionContainer: r });
|
|
9137
9137
|
});
|
|
9138
9138
|
});
|
|
9139
|
-
}) : {}, Vs = [$e, ue, Me], he = new
|
|
9139
|
+
}) : {}, Vs = [$e, ue, Me], he = new Y("comments"), sb = Q.create({
|
|
9140
9140
|
name: "comments",
|
|
9141
9141
|
addCommands() {
|
|
9142
9142
|
return {
|
|
@@ -9185,7 +9185,7 @@ const Td = (t) => {
|
|
|
9185
9185
|
addPmPlugins() {
|
|
9186
9186
|
const t = this.editor;
|
|
9187
9187
|
let e, n;
|
|
9188
|
-
return t.options.isHeadless ? [] : [new
|
|
9188
|
+
return t.options.isHeadless ? [] : [new G({
|
|
9189
9189
|
key: he,
|
|
9190
9190
|
state: {
|
|
9191
9191
|
init() {
|
|
@@ -9254,23 +9254,23 @@ const Td = (t) => {
|
|
|
9254
9254
|
);
|
|
9255
9255
|
let M = !1;
|
|
9256
9256
|
y.forEach((A) => {
|
|
9257
|
-
const { attrs: F } = A,
|
|
9257
|
+
const { attrs: F } = A, S = F.commentId || F.importedId, V = s.coordsAtPos(w);
|
|
9258
9258
|
rl({
|
|
9259
9259
|
allCommentPositions: f,
|
|
9260
|
-
threadId:
|
|
9260
|
+
threadId: S,
|
|
9261
9261
|
pos: w,
|
|
9262
|
-
currentBounds:
|
|
9262
|
+
currentBounds: V,
|
|
9263
9263
|
node: b
|
|
9264
9264
|
});
|
|
9265
9265
|
const z = F.internal;
|
|
9266
|
-
M || (M = n ===
|
|
9267
|
-
let
|
|
9268
|
-
const
|
|
9269
|
-
style: `background-color: ${
|
|
9270
|
-
"data-thread-id":
|
|
9266
|
+
M || (M = n === S);
|
|
9267
|
+
let _ = ob({ activeThreadId: n, threadId: S, isInternal: z, editor: t });
|
|
9268
|
+
const H = $.inline(w, w + b.nodeSize, {
|
|
9269
|
+
style: `background-color: ${_};`,
|
|
9270
|
+
"data-thread-id": S,
|
|
9271
9271
|
class: "comment-highlight"
|
|
9272
9272
|
});
|
|
9273
|
-
M && n !==
|
|
9273
|
+
M && n !== S || u.push(H);
|
|
9274
9274
|
});
|
|
9275
9275
|
const k = Id({
|
|
9276
9276
|
doc: c,
|
|
@@ -9438,9 +9438,9 @@ const Td = (t) => {
|
|
|
9438
9438
|
const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
|
|
9439
9439
|
let g;
|
|
9440
9440
|
o.doc.descendants((y, M) => {
|
|
9441
|
-
const { marks: k = [] } = y, A = k.filter((
|
|
9441
|
+
const { marks: k = [] } = y, A = k.filter((S) => Vs.includes(S.type.name));
|
|
9442
9442
|
if (!A.length) return;
|
|
9443
|
-
if (A.find((
|
|
9443
|
+
if (A.find((S) => S.attrs.id === p) && (g = y), g) return !1;
|
|
9444
9444
|
});
|
|
9445
9445
|
const { deletionText: b, trackedChangeText: w } = cb({
|
|
9446
9446
|
state: o,
|
|
@@ -9487,7 +9487,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9487
9487
|
const g = t.apply(r).tr;
|
|
9488
9488
|
if (g.maybeStep(p).failed)
|
|
9489
9489
|
return;
|
|
9490
|
-
const b = p.getMap().map(p.to), w =
|
|
9490
|
+
const b = p.getMap().map(p.to), w = xd({
|
|
9491
9491
|
tr: g,
|
|
9492
9492
|
from: p.from,
|
|
9493
9493
|
to: b,
|
|
@@ -9632,17 +9632,17 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9632
9632
|
}), console.debug("[track-changes]: removeMarkStep")) : (i.step(u), console.log("[track-changes]: otherStep")));
|
|
9633
9633
|
}), t.getMeta("inputType") && i.setMeta(t.getMeta("inputType")), t.getMeta("uiEvent") && i.setMeta(t.getMeta("uiEvent")), t.selectionSet) {
|
|
9634
9634
|
const c = e.schema.marks[ue], d = Ro(e, c, !1);
|
|
9635
|
-
if (t.selection instanceof
|
|
9635
|
+
if (t.selection instanceof j && (t.selection.from < e.selection.from || t.getMeta("inputType") === "deleteContentBackward")) {
|
|
9636
9636
|
const u = s.map(t.selection.from, -1);
|
|
9637
|
-
i.setSelection(new
|
|
9637
|
+
i.setSelection(new j(i.doc.resolve(u)));
|
|
9638
9638
|
} else if (t.selection.from > e.selection.from && d) {
|
|
9639
9639
|
const u = s.map(d.to + 1, 1);
|
|
9640
|
-
i.setSelection(new
|
|
9640
|
+
i.setSelection(new j(i.doc.resolve(u)));
|
|
9641
9641
|
} else
|
|
9642
9642
|
i.setSelection(t.selection.map(i.doc, s));
|
|
9643
9643
|
} else if (e.selection.from - t.selection.from > 1 && t.selection.$head.depth > 1) {
|
|
9644
9644
|
const c = s.map(t.selection.from - 2, -1);
|
|
9645
|
-
i.setSelection(new
|
|
9645
|
+
i.setSelection(new j(i.doc.resolve(c)));
|
|
9646
9646
|
}
|
|
9647
9647
|
return t.storedMarksSet && i.setStoredMarks(t.storedMarks), t.scrolledIntoView && i.scrollIntoView(), i;
|
|
9648
9648
|
}, hb = (t) => {
|
|
@@ -9671,11 +9671,11 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9671
9671
|
}, ol = (t) => {
|
|
9672
9672
|
if (t === "initial" || t === "0.4.14") return Object.values(mb);
|
|
9673
9673
|
};
|
|
9674
|
-
var en, ws,
|
|
9674
|
+
var en, ws, x, zd, _d, Ki, Xi, $d, Ji, Yi, Gi, Zi, Qi, es, Vd, ts, ns, rs, is, Hd, Zn, Qn, jd, Wd, Ud, qd;
|
|
9675
9675
|
const Qs = class Qs extends bg {
|
|
9676
9676
|
constructor(n) {
|
|
9677
9677
|
super();
|
|
9678
|
-
ft(this,
|
|
9678
|
+
ft(this, x);
|
|
9679
9679
|
ft(this, en);
|
|
9680
9680
|
I(this, "extensionService");
|
|
9681
9681
|
I(this, "extensionStorage", {});
|
|
@@ -9743,11 +9743,11 @@ const Qs = class Qs extends bg {
|
|
|
9743
9743
|
// telemetry
|
|
9744
9744
|
telemetry: null
|
|
9745
9745
|
});
|
|
9746
|
-
|
|
9746
|
+
N(this, x, zd).call(this, n), N(this, x, $d).call(this, n), this.setOptions(n);
|
|
9747
9747
|
let r = {
|
|
9748
|
-
docx: () =>
|
|
9749
|
-
text: () =>
|
|
9750
|
-
html: () =>
|
|
9748
|
+
docx: () => N(this, x, _d).call(this, this.options),
|
|
9749
|
+
text: () => N(this, x, Ki).call(this, this.options),
|
|
9750
|
+
html: () => N(this, x, Ki).call(this, this.options),
|
|
9751
9751
|
default: () => {
|
|
9752
9752
|
console.log("Not implemented.");
|
|
9753
9753
|
}
|
|
@@ -9813,7 +9813,7 @@ const Qs = class Qs extends bg {
|
|
|
9813
9813
|
}
|
|
9814
9814
|
setDocumentMode(n) {
|
|
9815
9815
|
let r = n?.toLowerCase() || "editing";
|
|
9816
|
-
this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (
|
|
9816
|
+
this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this, x, Yi).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.enableTrackChanges(), this.setEditable(!0, !1)) : r === "editing" && (N(this, x, Yi).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.disableTrackChanges(), this.setEditable(!0, !1)));
|
|
9817
9817
|
}
|
|
9818
9818
|
/**
|
|
9819
9819
|
* If we are replacing data and have a valid provider, listen for synced event
|
|
@@ -9822,9 +9822,9 @@ const Qs = class Qs extends bg {
|
|
|
9822
9822
|
initializeCollaborationData() {
|
|
9823
9823
|
if (!this.options.isNewFile || !this.options.collaborationProvider) return;
|
|
9824
9824
|
const { collaborationProvider: n } = this.options, r = () => {
|
|
9825
|
-
n.off("synced", r),
|
|
9825
|
+
n.off("synced", r), N(this, x, Ji).call(this);
|
|
9826
9826
|
};
|
|
9827
|
-
n.synced ?
|
|
9827
|
+
n.synced ? N(this, x, Ji).call(this) : n.on("synced", r);
|
|
9828
9828
|
}
|
|
9829
9829
|
/**
|
|
9830
9830
|
* Set editor options and update state.
|
|
@@ -9936,7 +9936,7 @@ const Qs = class Qs extends bg {
|
|
|
9936
9936
|
* editor.getAttributes('textStyle').color
|
|
9937
9937
|
*/
|
|
9938
9938
|
getAttributes(n) {
|
|
9939
|
-
return
|
|
9939
|
+
return D.getAttributes(this.state, n);
|
|
9940
9940
|
}
|
|
9941
9941
|
/**
|
|
9942
9942
|
* Returns if the currently selected node or mark is active.
|
|
@@ -9947,7 +9947,7 @@ const Qs = class Qs extends bg {
|
|
|
9947
9947
|
*/
|
|
9948
9948
|
isActive(n, r) {
|
|
9949
9949
|
const o = typeof n == "string" ? n : null, i = typeof n == "string" ? r : n;
|
|
9950
|
-
return
|
|
9950
|
+
return Sd(this.state, o, i);
|
|
9951
9951
|
}
|
|
9952
9952
|
/**
|
|
9953
9953
|
* Get the document as JSON.
|
|
@@ -9987,7 +9987,7 @@ const Qs = class Qs extends bg {
|
|
|
9987
9987
|
* Export the editor document to DOCX.
|
|
9988
9988
|
*/
|
|
9989
9989
|
async exportDocx({ isFinalDoc: n = !1, commentsType: r, comments: o = [] } = {}) {
|
|
9990
|
-
const i =
|
|
9990
|
+
const i = N(this, x, Ud).call(this, o), s = await this.converter.exportToDocx(
|
|
9991
9991
|
i,
|
|
9992
9992
|
this.schema,
|
|
9993
9993
|
this.storage.image.media,
|
|
@@ -10025,7 +10025,7 @@ const Qs = class Qs extends bg {
|
|
|
10025
10025
|
* Destroy the editor.
|
|
10026
10026
|
*/
|
|
10027
10027
|
destroy() {
|
|
10028
|
-
this.emit("destroy"), this.view && this.view.destroy(),
|
|
10028
|
+
this.emit("destroy"), this.view && this.view.destroy(), N(this, x, qd).call(this), this.removeAllListeners();
|
|
10029
10029
|
}
|
|
10030
10030
|
static checkIfMigrationsNeeded(n) {
|
|
10031
10031
|
n || (n = "initial");
|
|
@@ -10038,7 +10038,7 @@ const Qs = class Qs extends bg {
|
|
|
10038
10038
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10039
10039
|
*/
|
|
10040
10040
|
processCollaborationMigrations() {
|
|
10041
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.
|
|
10041
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.30"), !this.options.ydoc) return;
|
|
10042
10042
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10043
10043
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10044
10044
|
const o = ol(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10060,21 +10060,21 @@ const Qs = class Qs extends bg {
|
|
|
10060
10060
|
isNewFile: !0,
|
|
10061
10061
|
shouldLoadComments: !0,
|
|
10062
10062
|
replacedFile: !0
|
|
10063
|
-
}),
|
|
10063
|
+
}), N(this, x, Qi).call(this), N(this, x, es).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this));
|
|
10064
10064
|
}
|
|
10065
10065
|
};
|
|
10066
|
-
en = new WeakMap(), ws = new WeakMap(),
|
|
10066
|
+
en = new WeakMap(), ws = new WeakMap(), x = new WeakSet(), zd = function(n) {
|
|
10067
10067
|
if (!n.element && n.selector) {
|
|
10068
10068
|
const { selector: r } = n;
|
|
10069
10069
|
r.startsWith("#") || r.startsWith(".") ? n.element = document.querySelector(r) : n.element = document.getElementById(r), ["text", "html"].includes(n.mode) && n.element && n.element.classList.add("sd-super-editor-html");
|
|
10070
10070
|
}
|
|
10071
10071
|
n.element = n.isHeadless ? null : n.element || document.createElement("div");
|
|
10072
10072
|
}, _d = function(n) {
|
|
10073
|
-
|
|
10073
|
+
N(this, x, Gi).call(this), N(this, x, Zi).call(this), N(this, x, ts).call(this), N(this, x, Qi).call(this), N(this, x, es).call(this), N(this, x, Vd).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), N(this, x, is).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", N(this, x, Xi)), 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", N(this, x, Hd)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)), window.setTimeout(() => {
|
|
10074
10074
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10075
10075
|
}, 0));
|
|
10076
10076
|
}, Ki = function(n) {
|
|
10077
|
-
(!n.extensions || !n.extensions.length) && (this.options.extensions =
|
|
10077
|
+
(!n.extensions || !n.extensions.length) && (this.options.extensions = Xk()), N(this, x, Gi).call(this), N(this, x, Zi).call(this), N(this, x, ts).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, x, is).call(this), 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", N(this, x, Xi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
|
|
10078
10078
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10079
10079
|
}, 0);
|
|
10080
10080
|
}, Xi = function({ editor: n, event: r }) {
|
|
@@ -10088,9 +10088,9 @@ en = new WeakMap(), ws = new WeakMap(), S = new WeakSet(), zd = function(n) {
|
|
|
10088
10088
|
Ji = function() {
|
|
10089
10089
|
if (!this.options.isNewFile) return;
|
|
10090
10090
|
this.options.isNewFile = !1;
|
|
10091
|
-
const n =
|
|
10091
|
+
const n = N(this, x, ns).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
|
|
10092
10092
|
this.view.dispatch(r), setTimeout(() => {
|
|
10093
|
-
|
|
10093
|
+
N(this, x, Qn).call(this), N(this, x, Zn).call(this);
|
|
10094
10094
|
}, 50);
|
|
10095
10095
|
}, Yi = function(n) {
|
|
10096
10096
|
const r = this.extensionService?.plugins.find((i) => i.key.startsWith(n)), o = this.state.plugins.find((i) => i.key.startsWith(n));
|
|
@@ -10150,7 +10150,7 @@ ns = function() {
|
|
|
10150
10150
|
let n;
|
|
10151
10151
|
try {
|
|
10152
10152
|
const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
|
|
10153
|
-
r === "docx" ? (n = Md(this.converter, this.schema, this), n =
|
|
10153
|
+
r === "docx" ? (n = Md(this.converter, this.schema, this), n = N(this, x, Wd).call(this, n), this.options.html && (n = N(this, x, rs).call(this, this.options.html)), o && i && (n = ag(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, x, rs).call(this, s) : n = this.schema.topNodeType.createAndFill());
|
|
10154
10154
|
} catch (r) {
|
|
10155
10155
|
console.error(r), this.emit("contentError", { editor: this, error: r });
|
|
10156
10156
|
}
|
|
@@ -10171,11 +10171,11 @@ rs = function(n) {
|
|
|
10171
10171
|
* Creates PM View.
|
|
10172
10172
|
*/
|
|
10173
10173
|
is = function() {
|
|
10174
|
-
let n =
|
|
10174
|
+
let n = N(this, x, ns).call(this);
|
|
10175
10175
|
const r = { schema: this.schema };
|
|
10176
10176
|
this.options.ydoc || (r.doc = n), this.view = new Wc(this.options.element, {
|
|
10177
10177
|
...this.options.editorProps,
|
|
10178
|
-
dispatchTransaction:
|
|
10178
|
+
dispatchTransaction: N(this, x, jd).bind(this),
|
|
10179
10179
|
state: oo.create(r)
|
|
10180
10180
|
});
|
|
10181
10181
|
const o = this.state.reconfigure({
|
|
@@ -10185,7 +10185,7 @@ is = function() {
|
|
|
10185
10185
|
const i = this.view.dom;
|
|
10186
10186
|
i.editor = this, this.options.telemetry?.sendReport();
|
|
10187
10187
|
}, Hd = function({ editor: n, ydoc: r }) {
|
|
10188
|
-
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (
|
|
10188
|
+
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)));
|
|
10189
10189
|
}, /**
|
|
10190
10190
|
* Initialize comments plugin
|
|
10191
10191
|
*/
|
|
@@ -10283,7 +10283,7 @@ qd = function() {
|
|
|
10283
10283
|
}
|
|
10284
10284
|
};
|
|
10285
10285
|
let qi = Qs;
|
|
10286
|
-
class
|
|
10286
|
+
class X {
|
|
10287
10287
|
constructor(e) {
|
|
10288
10288
|
I(this, "type", "node");
|
|
10289
10289
|
I(this, "name", "node");
|
|
@@ -10311,7 +10311,7 @@ class G {
|
|
|
10311
10311
|
* @param args Arguments for the constructor.
|
|
10312
10312
|
*/
|
|
10313
10313
|
static create(...e) {
|
|
10314
|
-
return new
|
|
10314
|
+
return new X(...e);
|
|
10315
10315
|
}
|
|
10316
10316
|
}
|
|
10317
10317
|
class Oe {
|
|
@@ -10627,7 +10627,7 @@ const Kd = Q.create({
|
|
|
10627
10627
|
}
|
|
10628
10628
|
});
|
|
10629
10629
|
function gb(t = {}) {
|
|
10630
|
-
return new
|
|
10630
|
+
return new G({
|
|
10631
10631
|
view(e) {
|
|
10632
10632
|
return new yb(e, t);
|
|
10633
10633
|
}
|
|
@@ -10853,9 +10853,9 @@ function wb(t) {
|
|
|
10853
10853
|
return !0;
|
|
10854
10854
|
}
|
|
10855
10855
|
function vb() {
|
|
10856
|
-
return new
|
|
10856
|
+
return new G({
|
|
10857
10857
|
props: {
|
|
10858
|
-
decorations:
|
|
10858
|
+
decorations: Sb,
|
|
10859
10859
|
createSelectionBetween(t, e, n) {
|
|
10860
10860
|
return e.pos == n.pos && re.valid(n) ? new re(n) : null;
|
|
10861
10861
|
},
|
|
@@ -10875,7 +10875,7 @@ function Jr(t, e) {
|
|
|
10875
10875
|
const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
10876
10876
|
return function(r, o, i) {
|
|
10877
10877
|
let s = r.selection, a = e > 0 ? s.$to : s.$from, l = s.empty;
|
|
10878
|
-
if (s instanceof
|
|
10878
|
+
if (s instanceof j) {
|
|
10879
10879
|
if (!i.endOfTextblock(n) || a.depth == 0)
|
|
10880
10880
|
return !1;
|
|
10881
10881
|
l = !1, a = r.doc.resolve(e > 0 ? a.after() : a.before());
|
|
@@ -10903,15 +10903,15 @@ function Mb(t, e) {
|
|
|
10903
10903
|
for (let s = r.length - 1; s >= 0; s--)
|
|
10904
10904
|
o = P.from(r[s].createAndFill(null, o));
|
|
10905
10905
|
let i = t.state.tr.replace(n.pos, n.pos, new W(o, 0, 0));
|
|
10906
|
-
return i.setSelection(
|
|
10906
|
+
return i.setSelection(j.near(i.doc.resolve(n.pos + 1))), t.dispatch(i), !1;
|
|
10907
10907
|
}
|
|
10908
|
-
function
|
|
10908
|
+
function Sb(t) {
|
|
10909
10909
|
if (!(t.selection instanceof re))
|
|
10910
10910
|
return null;
|
|
10911
10911
|
let e = document.createElement("div");
|
|
10912
|
-
return e.className = "ProseMirror-gapcursor", L.create(t.doc, [
|
|
10912
|
+
return e.className = "ProseMirror-gapcursor", L.create(t.doc, [$.widget(t.selection.head, e, { key: "gapcursor" })]);
|
|
10913
10913
|
}
|
|
10914
|
-
const
|
|
10914
|
+
const xb = Q.create({
|
|
10915
10915
|
name: "gapCursor",
|
|
10916
10916
|
addPmPlugins() {
|
|
10917
10917
|
return [
|
|
@@ -10927,7 +10927,7 @@ const Sb = Q.create({
|
|
|
10927
10927
|
})) ?? null
|
|
10928
10928
|
};
|
|
10929
10929
|
}
|
|
10930
|
-
}), Ab = new
|
|
10930
|
+
}), Ab = new Y("collaboration"), Ob = Q.create({
|
|
10931
10931
|
name: "collaboration",
|
|
10932
10932
|
priority: 1e3,
|
|
10933
10933
|
addOptions() {
|
|
@@ -11047,7 +11047,7 @@ const Sb = Q.create({
|
|
|
11047
11047
|
return [{ tag: Tn }];
|
|
11048
11048
|
},
|
|
11049
11049
|
renderDOM({ htmlAttributes: t }) {
|
|
11050
|
-
return [Tn,
|
|
11050
|
+
return [Tn, D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
11051
11051
|
}
|
|
11052
11052
|
}), Lb = Oe.create({
|
|
11053
11053
|
name: Yr,
|
|
@@ -11080,9 +11080,9 @@ const Sb = Q.create({
|
|
|
11080
11080
|
return [{ tag: Yr }];
|
|
11081
11081
|
},
|
|
11082
11082
|
renderDOM({ htmlAttributes: t }) {
|
|
11083
|
-
return [Yr,
|
|
11083
|
+
return [Yr, D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
11084
11084
|
}
|
|
11085
|
-
}), Fb = new
|
|
11085
|
+
}), Fb = new Y("ai"), tu = Q.create({
|
|
11086
11086
|
name: "ai",
|
|
11087
11087
|
addCommands() {
|
|
11088
11088
|
return {
|
|
@@ -11114,7 +11114,7 @@ const Sb = Q.create({
|
|
|
11114
11114
|
},
|
|
11115
11115
|
addPmPlugins() {
|
|
11116
11116
|
const t = this.editor;
|
|
11117
|
-
return [new
|
|
11117
|
+
return [new G({
|
|
11118
11118
|
key: Fb,
|
|
11119
11119
|
state: {
|
|
11120
11120
|
init() {
|
|
@@ -11145,7 +11145,7 @@ const Sb = Q.create({
|
|
|
11145
11145
|
return e.descendants((o, i) => {
|
|
11146
11146
|
const { marks: s = [] } = o;
|
|
11147
11147
|
if (s.find((l) => l.type.name === Tn)) {
|
|
11148
|
-
const l =
|
|
11148
|
+
const l = $.inline(
|
|
11149
11149
|
i,
|
|
11150
11150
|
i + o.nodeSize,
|
|
11151
11151
|
{
|
|
@@ -11156,7 +11156,7 @@ const Sb = Q.create({
|
|
|
11156
11156
|
r.push(l);
|
|
11157
11157
|
}
|
|
11158
11158
|
}), { decorations: r };
|
|
11159
|
-
}, nu =
|
|
11159
|
+
}, nu = X.create({
|
|
11160
11160
|
name: "doc",
|
|
11161
11161
|
topNode: !0,
|
|
11162
11162
|
content: "block+",
|
|
@@ -11173,11 +11173,11 @@ const Sb = Q.create({
|
|
|
11173
11173
|
}
|
|
11174
11174
|
};
|
|
11175
11175
|
}
|
|
11176
|
-
}), ru =
|
|
11176
|
+
}), ru = X.create({
|
|
11177
11177
|
name: "text",
|
|
11178
11178
|
group: "inline",
|
|
11179
11179
|
inline: !0
|
|
11180
|
-
}), zb =
|
|
11180
|
+
}), zb = X.create({
|
|
11181
11181
|
name: "run",
|
|
11182
11182
|
group: "inline",
|
|
11183
11183
|
content: "text*",
|
|
@@ -11224,7 +11224,7 @@ function Oo(t) {
|
|
|
11224
11224
|
}
|
|
11225
11225
|
});
|
|
11226
11226
|
}
|
|
11227
|
-
const il = /^\s*([-+*])\s$/, ou =
|
|
11227
|
+
const il = /^\s*([-+*])\s$/, ou = X.create({
|
|
11228
11228
|
name: "bulletList",
|
|
11229
11229
|
group: "block list",
|
|
11230
11230
|
content() {
|
|
@@ -11242,7 +11242,7 @@ const il = /^\s*([-+*])\s$/, ou = G.create({
|
|
|
11242
11242
|
return [{ tag: "ul" }];
|
|
11243
11243
|
},
|
|
11244
11244
|
renderDOM({ htmlAttributes: t }) {
|
|
11245
|
-
return ["ul",
|
|
11245
|
+
return ["ul", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
11246
11246
|
},
|
|
11247
11247
|
addAttributes() {
|
|
11248
11248
|
return {
|
|
@@ -11291,8 +11291,8 @@ const il = /^\s*([-+*])\s$/, ou = G.create({
|
|
|
11291
11291
|
}
|
|
11292
11292
|
});
|
|
11293
11293
|
function _b(t = {}) {
|
|
11294
|
-
return new
|
|
11295
|
-
key: new
|
|
11294
|
+
return new G({
|
|
11295
|
+
key: new Y("orderedListSync"),
|
|
11296
11296
|
appendTransaction: (e, n, r) => {
|
|
11297
11297
|
if (!(e.some((d) => d.docChanged) && !n.doc.eq(r.doc)))
|
|
11298
11298
|
return;
|
|
@@ -11331,8 +11331,8 @@ function $b() {
|
|
|
11331
11331
|
return Math.floor(Math.random() * 4294967295).toString();
|
|
11332
11332
|
}
|
|
11333
11333
|
function Vb(t) {
|
|
11334
|
-
return new
|
|
11335
|
-
key: new
|
|
11334
|
+
return new G({
|
|
11335
|
+
key: new Y("orderedListMarker"),
|
|
11336
11336
|
appendTransaction: (e, n, r) => {
|
|
11337
11337
|
if (!(e.some((c) => c.docChanged) && !n.doc.eq(r.doc)))
|
|
11338
11338
|
return;
|
|
@@ -11364,11 +11364,11 @@ function Vb(t) {
|
|
|
11364
11364
|
}), l = !0, w = g), f.forEach((y, M) => {
|
|
11365
11365
|
if (M === 0)
|
|
11366
11366
|
return;
|
|
11367
|
-
let { node: k, pos: A } = y, { lvlText: F, listLevel:
|
|
11367
|
+
let { node: k, pos: A } = y, { lvlText: F, listLevel: S, listNumberingType: V } = k.attrs;
|
|
11368
11368
|
Array.isArray(w.listLevel) || (w.listLevel = JSON.parse(w.listLevel));
|
|
11369
11369
|
let z = [...w.listLevel.slice(0, -1), w.listLevel.at(-1) + 1];
|
|
11370
|
-
if (!(F === w.lvlText &&
|
|
11371
|
-
let { selection:
|
|
11370
|
+
if (!(F === w.lvlText && V === w.listNumberingType && sl(S, z))) {
|
|
11371
|
+
let { selection: H, storedMarks: se } = r, ce = se || H.$to.parentOffset && H.$from.marks();
|
|
11372
11372
|
s.setNodeMarkup(A, void 0, {
|
|
11373
11373
|
...k.attrs,
|
|
11374
11374
|
listLevel: z,
|
|
@@ -11439,7 +11439,7 @@ function Ub({ state: t, listItems: e }) {
|
|
|
11439
11439
|
listNumberingType: s
|
|
11440
11440
|
};
|
|
11441
11441
|
}
|
|
11442
|
-
const al = /^(\d+)\.\s$/, su =
|
|
11442
|
+
const al = /^(\d+)\.\s$/, su = X.create({
|
|
11443
11443
|
name: "orderedList",
|
|
11444
11444
|
group: "block list",
|
|
11445
11445
|
content() {
|
|
@@ -11495,7 +11495,7 @@ const al = /^(\d+)\.\s$/, su = G.create({
|
|
|
11495
11495
|
},
|
|
11496
11496
|
renderDOM({ htmlAttributes: t }) {
|
|
11497
11497
|
const { start: e, ...n } = t;
|
|
11498
|
-
return e === 1 ? ["ol",
|
|
11498
|
+
return e === 1 ? ["ol", D.mergeAttributes(this.options.htmlAttributes, n), 0] : ["ol", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
11499
11499
|
},
|
|
11500
11500
|
addCommands() {
|
|
11501
11501
|
return {
|
|
@@ -11642,8 +11642,8 @@ const al = /^(\d+)\.\s$/, su = G.create({
|
|
|
11642
11642
|
return e;
|
|
11643
11643
|
};
|
|
11644
11644
|
function e0(t = {}) {
|
|
11645
|
-
return new
|
|
11646
|
-
key: new
|
|
11645
|
+
return new G({
|
|
11646
|
+
key: new Y("styledListMarker"),
|
|
11647
11647
|
state: {
|
|
11648
11648
|
init(e, n) {
|
|
11649
11649
|
const r = [
|
|
@@ -11694,7 +11694,7 @@ function ll(t, e = []) {
|
|
|
11694
11694
|
style: `--marker-font-size: ${u ?? "initial"}`
|
|
11695
11695
|
}, h = {
|
|
11696
11696
|
style: `--marker-font-family: ${f ?? "initial"}`
|
|
11697
|
-
}, m =
|
|
11697
|
+
}, m = D.mergeAttributes(p, h), g = $.node(a, a + s.nodeSize, m);
|
|
11698
11698
|
o.push(g);
|
|
11699
11699
|
}), o;
|
|
11700
11700
|
}
|
|
@@ -11712,7 +11712,7 @@ function cl(t) {
|
|
|
11712
11712
|
`.trim()
|
|
11713
11713
|
};
|
|
11714
11714
|
}
|
|
11715
|
-
let a =
|
|
11715
|
+
let a = $.node(i, i + o.nodeSize, s);
|
|
11716
11716
|
n.push(a);
|
|
11717
11717
|
}), n;
|
|
11718
11718
|
}
|
|
@@ -11731,7 +11731,7 @@ function t0(t, e, n) {
|
|
|
11731
11731
|
function n0(t) {
|
|
11732
11732
|
return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
|
|
11733
11733
|
}
|
|
11734
|
-
const cu =
|
|
11734
|
+
const cu = X.create({
|
|
11735
11735
|
name: "listItem",
|
|
11736
11736
|
content: "paragraph* block*",
|
|
11737
11737
|
defining: !0,
|
|
@@ -11748,7 +11748,7 @@ const cu = G.create({
|
|
|
11748
11748
|
return [{ tag: "li" }];
|
|
11749
11749
|
},
|
|
11750
11750
|
renderDOM({ htmlAttributes: t }) {
|
|
11751
|
-
return ["li",
|
|
11751
|
+
return ["li", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
11752
11752
|
},
|
|
11753
11753
|
addAttributes() {
|
|
11754
11754
|
return {
|
|
@@ -11853,7 +11853,7 @@ const cu = G.create({
|
|
|
11853
11853
|
addPmPlugins() {
|
|
11854
11854
|
return [e0()];
|
|
11855
11855
|
}
|
|
11856
|
-
}), ao = new
|
|
11856
|
+
}), ao = new Y("linkedStyles"), r0 = Q.create({
|
|
11857
11857
|
name: "linkedStyles",
|
|
11858
11858
|
addPmPlugins() {
|
|
11859
11859
|
return [o0(this.editor)];
|
|
@@ -11876,7 +11876,7 @@ const cu = G.create({
|
|
|
11876
11876
|
}
|
|
11877
11877
|
};
|
|
11878
11878
|
}
|
|
11879
|
-
}), o0 = (t) => new
|
|
11879
|
+
}), o0 = (t) => new G({
|
|
11880
11880
|
key: ao,
|
|
11881
11881
|
state: {
|
|
11882
11882
|
init(e, { doc: n, selection: r }) {
|
|
@@ -11912,7 +11912,7 @@ const cu = G.create({
|
|
|
11912
11912
|
if (!a) return;
|
|
11913
11913
|
const l = i0(a, o);
|
|
11914
11914
|
if (!l) return;
|
|
11915
|
-
const c =
|
|
11915
|
+
const c = $.inline(i, i + o.nodeSize, { style: l });
|
|
11916
11916
|
n.push(c);
|
|
11917
11917
|
}), L.create(t, n);
|
|
11918
11918
|
}, i0 = (t, e, n = !0) => {
|
|
@@ -11975,7 +11975,7 @@ const cu = G.create({
|
|
|
11975
11975
|
e += `${r ? `font-family: ${r};` : ""} ${o ? `font-size: ${o};` : ""}`;
|
|
11976
11976
|
}
|
|
11977
11977
|
return e.trim();
|
|
11978
|
-
},
|
|
11978
|
+
}, oC = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], du = X.create({
|
|
11979
11979
|
name: "paragraph",
|
|
11980
11980
|
priority: 1e3,
|
|
11981
11981
|
group: "block",
|
|
@@ -11998,7 +11998,7 @@ const cu = G.create({
|
|
|
11998
11998
|
},
|
|
11999
11999
|
extraAttrs: {
|
|
12000
12000
|
default: {},
|
|
12001
|
-
|
|
12001
|
+
parseDOM: (t) => {
|
|
12002
12002
|
const e = {};
|
|
12003
12003
|
return Array.from(t.attributes).forEach((n) => {
|
|
12004
12004
|
e[n.name] = n.value;
|
|
@@ -12049,13 +12049,13 @@ const cu = G.create({
|
|
|
12049
12049
|
}];
|
|
12050
12050
|
},
|
|
12051
12051
|
renderDOM({ htmlAttributes: t }) {
|
|
12052
|
-
return ["p",
|
|
12052
|
+
return ["p", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
12053
12053
|
},
|
|
12054
12054
|
addPmPlugins() {
|
|
12055
12055
|
const { view: t } = this.editor;
|
|
12056
|
-
return [new
|
|
12056
|
+
return [new G({
|
|
12057
12057
|
name: "dropcapPlugin",
|
|
12058
|
-
key: new
|
|
12058
|
+
key: new Y("dropcapPlugin"),
|
|
12059
12059
|
state: {
|
|
12060
12060
|
init(n, r) {
|
|
12061
12061
|
let o = ul(r, t);
|
|
@@ -12079,7 +12079,7 @@ const cu = G.create({
|
|
|
12079
12079
|
if (r.attrs.dropcap?.type === "margin") {
|
|
12080
12080
|
const i = d0(e, o);
|
|
12081
12081
|
n.push(
|
|
12082
|
-
|
|
12082
|
+
$.node(o, o + r.nodeSize, { style: `margin-left: -${i}px;` })
|
|
12083
12083
|
);
|
|
12084
12084
|
}
|
|
12085
12085
|
}), n;
|
|
@@ -12092,7 +12092,7 @@ function d0(t, e) {
|
|
|
12092
12092
|
}
|
|
12093
12093
|
return 0;
|
|
12094
12094
|
}
|
|
12095
|
-
const uu =
|
|
12095
|
+
const uu = X.create({
|
|
12096
12096
|
name: "heading",
|
|
12097
12097
|
group: "block",
|
|
12098
12098
|
content: "inline*",
|
|
@@ -12118,7 +12118,7 @@ const uu = G.create({
|
|
|
12118
12118
|
}));
|
|
12119
12119
|
},
|
|
12120
12120
|
renderDOM({ node: t, htmlAttributes: e }) {
|
|
12121
|
-
return [`h${this.options.levels.includes(t.attrs.level) ? t.attrs.level : this.options.levels[0]}`,
|
|
12121
|
+
return [`h${this.options.levels.includes(t.attrs.level) ? t.attrs.level : this.options.levels[0]}`, D.mergeAttributes(this.options.htmlAttributes, e), 0];
|
|
12122
12122
|
},
|
|
12123
12123
|
addCommands() {
|
|
12124
12124
|
return {
|
|
@@ -12135,7 +12135,7 @@ const uu = G.create({
|
|
|
12135
12135
|
{}
|
|
12136
12136
|
);
|
|
12137
12137
|
}
|
|
12138
|
-
}), u0 =
|
|
12138
|
+
}), u0 = X.create({
|
|
12139
12139
|
name: "commentRangeStart",
|
|
12140
12140
|
group: "inline",
|
|
12141
12141
|
inline: !0,
|
|
@@ -12153,7 +12153,7 @@ const uu = G.create({
|
|
|
12153
12153
|
};
|
|
12154
12154
|
},
|
|
12155
12155
|
renderDOM({ htmlAttributes: t }) {
|
|
12156
|
-
return ["commentRangeStart",
|
|
12156
|
+
return ["commentRangeStart", D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12157
12157
|
},
|
|
12158
12158
|
addAttributes() {
|
|
12159
12159
|
return {
|
|
@@ -12166,7 +12166,7 @@ const uu = G.create({
|
|
|
12166
12166
|
}
|
|
12167
12167
|
};
|
|
12168
12168
|
}
|
|
12169
|
-
}), f0 =
|
|
12169
|
+
}), f0 = X.create({
|
|
12170
12170
|
name: "commentRangeEnd",
|
|
12171
12171
|
group: "inline",
|
|
12172
12172
|
inline: !0,
|
|
@@ -12184,7 +12184,7 @@ const uu = G.create({
|
|
|
12184
12184
|
return [{ tag: "commentRangeEnd" }];
|
|
12185
12185
|
},
|
|
12186
12186
|
renderDOM({ htmlAttributes: t }) {
|
|
12187
|
-
return ["commentRangeEnd",
|
|
12187
|
+
return ["commentRangeEnd", D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12188
12188
|
},
|
|
12189
12189
|
addAttributes() {
|
|
12190
12190
|
return {
|
|
@@ -12193,7 +12193,7 @@ const uu = G.create({
|
|
|
12193
12193
|
}
|
|
12194
12194
|
};
|
|
12195
12195
|
}
|
|
12196
|
-
}), p0 =
|
|
12196
|
+
}), p0 = X.create({
|
|
12197
12197
|
name: "commentReference",
|
|
12198
12198
|
group: "inline",
|
|
12199
12199
|
inline: !0,
|
|
@@ -12211,7 +12211,7 @@ const uu = G.create({
|
|
|
12211
12211
|
return [{ tag: "commentReference" }];
|
|
12212
12212
|
},
|
|
12213
12213
|
renderDOM({ htmlAttributes: t }) {
|
|
12214
|
-
return ["commentReference",
|
|
12214
|
+
return ["commentReference", D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12215
12215
|
},
|
|
12216
12216
|
addAttributes() {
|
|
12217
12217
|
return {
|
|
@@ -12243,9 +12243,9 @@ const uu = G.create({
|
|
|
12243
12243
|
return [{ tag: Re }];
|
|
12244
12244
|
},
|
|
12245
12245
|
renderDOM({ htmlAttributes: t }) {
|
|
12246
|
-
return [Re,
|
|
12246
|
+
return [Re, D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12247
12247
|
}
|
|
12248
|
-
}), m0 =
|
|
12248
|
+
}), m0 = X.create({
|
|
12249
12249
|
name: "tab",
|
|
12250
12250
|
group: "inline",
|
|
12251
12251
|
inline: !0,
|
|
@@ -12268,7 +12268,7 @@ const uu = G.create({
|
|
|
12268
12268
|
return [{ tag: "span.super-doc-tab" }];
|
|
12269
12269
|
},
|
|
12270
12270
|
renderDOM({ htmlAttributes: t }) {
|
|
12271
|
-
return ["span",
|
|
12271
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
12272
12272
|
},
|
|
12273
12273
|
addAttributes() {
|
|
12274
12274
|
return {
|
|
@@ -12279,9 +12279,9 @@ const uu = G.create({
|
|
|
12279
12279
|
},
|
|
12280
12280
|
addPmPlugins() {
|
|
12281
12281
|
const { view: t } = this.editor;
|
|
12282
|
-
return [new
|
|
12282
|
+
return [new G({
|
|
12283
12283
|
name: "tabPlugin",
|
|
12284
|
-
key: new
|
|
12284
|
+
key: new Y("tabPlugin"),
|
|
12285
12285
|
state: {
|
|
12286
12286
|
init(n, r) {
|
|
12287
12287
|
let o = fl(r, t);
|
|
@@ -12318,7 +12318,7 @@ const uu = G.create({
|
|
|
12318
12318
|
}
|
|
12319
12319
|
const l = i.nodeBefore?.type.name === "tab" ? fi : fi - a % fi, c = y0(i);
|
|
12320
12320
|
n.push(
|
|
12321
|
-
|
|
12321
|
+
$.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
|
|
12322
12322
|
);
|
|
12323
12323
|
}
|
|
12324
12324
|
}), n;
|
|
@@ -12335,7 +12335,7 @@ function y0(t) {
|
|
|
12335
12335
|
const i = t.node(1).firstChild.marks.find((a) => a.type.name === "textStyle");
|
|
12336
12336
|
return `${(parseInt(i?.attrs.fontSize) * 1.333 || 16) * 1.1}px`;
|
|
12337
12337
|
}
|
|
12338
|
-
const b0 =
|
|
12338
|
+
const b0 = X.create({
|
|
12339
12339
|
name: "lineBreak",
|
|
12340
12340
|
group: "inline",
|
|
12341
12341
|
inline: !0,
|
|
@@ -12345,7 +12345,7 @@ const b0 = G.create({
|
|
|
12345
12345
|
renderDOM() {
|
|
12346
12346
|
return ["br", {}, 0];
|
|
12347
12347
|
}
|
|
12348
|
-
}), fu =
|
|
12348
|
+
}), fu = X.create({
|
|
12349
12349
|
name: "hardBreak",
|
|
12350
12350
|
group: "inline",
|
|
12351
12351
|
inline: !0,
|
|
@@ -12363,7 +12363,7 @@ const b0 = G.create({
|
|
|
12363
12363
|
return [{ tag: "span" }];
|
|
12364
12364
|
},
|
|
12365
12365
|
renderDOM({ htmlAttributes: t }) {
|
|
12366
|
-
return ["span",
|
|
12366
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12367
12367
|
}
|
|
12368
12368
|
}), w0 = ({ editor: t }) => class {
|
|
12369
12369
|
constructor(n, r) {
|
|
@@ -12413,7 +12413,7 @@ function pl(t, e, n, r, o, i) {
|
|
|
12413
12413
|
a ? (n.style.width = `${s}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${s}px`);
|
|
12414
12414
|
}
|
|
12415
12415
|
function hl(t, e, n) {
|
|
12416
|
-
const o = t.extensionService.attributes.filter((s) => s.type === "table"), i =
|
|
12416
|
+
const o = t.extensionService.attributes.filter((s) => s.type === "table"), i = D.getAttributesToRender(e, o);
|
|
12417
12417
|
Object.entries(i).forEach(([s, a]) => {
|
|
12418
12418
|
n.setAttribute(s, a);
|
|
12419
12419
|
});
|
|
@@ -12646,7 +12646,7 @@ function M0(t, e, n) {
|
|
|
12646
12646
|
const l = s.attrs;
|
|
12647
12647
|
for (let c = 0; c < l.colspan; c++) {
|
|
12648
12648
|
const d = (o + c) % t.width, u = e[d * 2];
|
|
12649
|
-
u != null && (!l.colwidth || l.colwidth[c] != u) && ((a || (a =
|
|
12649
|
+
u != null && (!l.colwidth || l.colwidth[c] != u) && ((a || (a = S0(l)))[c] = u);
|
|
12650
12650
|
}
|
|
12651
12651
|
a && t.problems.unshift({
|
|
12652
12652
|
type: "colwidth mismatch",
|
|
@@ -12655,7 +12655,7 @@ function M0(t, e, n) {
|
|
|
12655
12655
|
});
|
|
12656
12656
|
}
|
|
12657
12657
|
}
|
|
12658
|
-
function
|
|
12658
|
+
function S0(t) {
|
|
12659
12659
|
if (t.colwidth) return t.colwidth.slice();
|
|
12660
12660
|
const e = [];
|
|
12661
12661
|
for (let n = 0; n < t.colspan; n++) e.push(0);
|
|
@@ -12672,14 +12672,14 @@ function we(t) {
|
|
|
12672
12672
|
}
|
|
12673
12673
|
return e;
|
|
12674
12674
|
}
|
|
12675
|
-
var Et = new
|
|
12675
|
+
var Et = new Y("selectingCells");
|
|
12676
12676
|
function Hn(t) {
|
|
12677
12677
|
for (let e = t.depth - 1; e > 0; e--)
|
|
12678
12678
|
if (t.node(e).type.spec.tableRole == "row")
|
|
12679
12679
|
return t.node(0).resolve(t.before(e + 1));
|
|
12680
12680
|
return null;
|
|
12681
12681
|
}
|
|
12682
|
-
function
|
|
12682
|
+
function x0(t) {
|
|
12683
12683
|
for (let e = t.depth; e > 0; e--) {
|
|
12684
12684
|
const n = t.node(e).type.spec.tableRole;
|
|
12685
12685
|
if (n === "cell" || n === "header_cell") return t.node(e);
|
|
@@ -12746,7 +12746,7 @@ function T0(t, e, n) {
|
|
|
12746
12746
|
return !1;
|
|
12747
12747
|
return !0;
|
|
12748
12748
|
}
|
|
12749
|
-
var
|
|
12749
|
+
var J = class ht extends Z {
|
|
12750
12750
|
// A table selection is identified by its anchor and head cells. The
|
|
12751
12751
|
// positions given to this constructor should point _before_ two
|
|
12752
12752
|
// cells in the same table. They may be the same, to select a single
|
|
@@ -12775,7 +12775,7 @@ var X = class ht extends Z {
|
|
|
12775
12775
|
const i = this.$anchorCell.node(-1) != r.node(-1);
|
|
12776
12776
|
return i && this.isRowSelection() ? ht.rowSelection(r, o) : i && this.isColSelection() ? ht.colSelection(r, o) : new ht(r, o);
|
|
12777
12777
|
}
|
|
12778
|
-
return
|
|
12778
|
+
return j.between(r, o);
|
|
12779
12779
|
}
|
|
12780
12780
|
// Returns a rectangular slice of table rows containing the selected
|
|
12781
12781
|
// cells.
|
|
@@ -12910,8 +12910,8 @@ var X = class ht extends Z {
|
|
|
12910
12910
|
return new D0(this.$anchorCell.pos, this.$headCell.pos);
|
|
12911
12911
|
}
|
|
12912
12912
|
};
|
|
12913
|
-
|
|
12914
|
-
Z.jsonID("cell",
|
|
12913
|
+
J.prototype.visible = !1;
|
|
12914
|
+
Z.jsonID("cell", J);
|
|
12915
12915
|
var D0 = class gu {
|
|
12916
12916
|
constructor(e, n) {
|
|
12917
12917
|
this.anchor = e, this.head = n;
|
|
@@ -12921,15 +12921,15 @@ var D0 = class gu {
|
|
|
12921
12921
|
}
|
|
12922
12922
|
resolve(e) {
|
|
12923
12923
|
const n = e.resolve(this.anchor), r = e.resolve(this.head);
|
|
12924
|
-
return n.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && n.index() < n.parent.childCount && r.index() < r.parent.childCount && Ws(n, r) ? new
|
|
12924
|
+
return n.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && n.index() < n.parent.childCount && r.index() < r.parent.childCount && Ws(n, r) ? new J(n, r) : Z.near(r, 1);
|
|
12925
12925
|
}
|
|
12926
12926
|
};
|
|
12927
12927
|
function N0(t) {
|
|
12928
|
-
if (!(t.selection instanceof
|
|
12928
|
+
if (!(t.selection instanceof J)) return null;
|
|
12929
12929
|
const e = [];
|
|
12930
12930
|
return t.selection.forEachCell((n, r) => {
|
|
12931
12931
|
e.push(
|
|
12932
|
-
|
|
12932
|
+
$.node(r, r + n.nodeSize, { class: "selectedCell" })
|
|
12933
12933
|
);
|
|
12934
12934
|
}), L.create(t.doc, e);
|
|
12935
12935
|
}
|
|
@@ -12965,18 +12965,18 @@ function I0(t, e, n) {
|
|
|
12965
12965
|
let i, s;
|
|
12966
12966
|
if (r instanceof B && (s = r.node.type.spec.tableRole)) {
|
|
12967
12967
|
if (s == "cell" || s == "header_cell")
|
|
12968
|
-
i =
|
|
12968
|
+
i = J.create(o, r.from);
|
|
12969
12969
|
else if (s == "row") {
|
|
12970
12970
|
const a = o.resolve(r.from + 1);
|
|
12971
|
-
i =
|
|
12971
|
+
i = J.rowSelection(a, a);
|
|
12972
12972
|
} else if (!n) {
|
|
12973
12973
|
const a = oe.get(r.node), l = r.from + 1, c = l + a.map[a.width * a.height - 1];
|
|
12974
|
-
i =
|
|
12974
|
+
i = J.create(o, l + 1, c);
|
|
12975
12975
|
}
|
|
12976
|
-
} else r instanceof
|
|
12976
|
+
} else r instanceof j && E0(r) ? i = j.create(o, r.from) : r instanceof j && P0(r) && (i = j.create(o, r.$from.start(), r.$from.end()));
|
|
12977
12977
|
return i && (e || (e = t.tr)).setSelection(i), e;
|
|
12978
12978
|
}
|
|
12979
|
-
var R0 = new
|
|
12979
|
+
var R0 = new Y("fix-tables");
|
|
12980
12980
|
function yu(t, e, n, r) {
|
|
12981
12981
|
const o = t.childCount, i = e.childCount;
|
|
12982
12982
|
e: for (let s = 0, a = 0; s < i; s++) {
|
|
@@ -13057,7 +13057,7 @@ function L0(t, e, n, r) {
|
|
|
13057
13057
|
}
|
|
13058
13058
|
function at(t) {
|
|
13059
13059
|
const e = t.selection, n = Vo(t), r = n.node(-1), o = n.start(-1), i = oe.get(r);
|
|
13060
|
-
return { ...e instanceof
|
|
13060
|
+
return { ...e instanceof J ? i.rectBetween(
|
|
13061
13061
|
e.$anchorCell.pos - o,
|
|
13062
13062
|
e.$headCell.pos - o
|
|
13063
13063
|
) : i.findCell(n.pos - o), tableStart: o, map: i, table: r };
|
|
@@ -13233,7 +13233,7 @@ function U0({ width: t, height: e, map: n }, r) {
|
|
|
13233
13233
|
}
|
|
13234
13234
|
function bl(t, e) {
|
|
13235
13235
|
const n = t.selection;
|
|
13236
|
-
if (!(n instanceof
|
|
13236
|
+
if (!(n instanceof J) || n.$anchorCell.pos == n.$headCell.pos)
|
|
13237
13237
|
return !1;
|
|
13238
13238
|
const r = at(t), { map: o } = r;
|
|
13239
13239
|
if (U0(o, r)) return !1;
|
|
@@ -13266,7 +13266,7 @@ function bl(t, e) {
|
|
|
13266
13266
|
i.replaceWith(u + r.tableStart, d + r.tableStart, a);
|
|
13267
13267
|
}
|
|
13268
13268
|
i.setSelection(
|
|
13269
|
-
new
|
|
13269
|
+
new J(i.doc.resolve(l + r.tableStart))
|
|
13270
13270
|
), e(i);
|
|
13271
13271
|
}
|
|
13272
13272
|
return !0;
|
|
@@ -13280,11 +13280,11 @@ function q0(t) {
|
|
|
13280
13280
|
var r;
|
|
13281
13281
|
const o = e.selection;
|
|
13282
13282
|
let i, s;
|
|
13283
|
-
if (o instanceof
|
|
13283
|
+
if (o instanceof J) {
|
|
13284
13284
|
if (o.$anchorCell.pos != o.$headCell.pos) return !1;
|
|
13285
13285
|
i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
|
|
13286
13286
|
} else {
|
|
13287
|
-
if (i =
|
|
13287
|
+
if (i = x0(o.$from), !i) return !1;
|
|
13288
13288
|
s = (r = Hn(o.$from)) == null ? void 0 : r.pos;
|
|
13289
13289
|
}
|
|
13290
13290
|
if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
|
|
@@ -13315,8 +13315,8 @@ function q0(t) {
|
|
|
13315
13315
|
s,
|
|
13316
13316
|
t({ node: i, row: d.top, col: d.left }),
|
|
13317
13317
|
l[0]
|
|
13318
|
-
), o instanceof
|
|
13319
|
-
new
|
|
13318
|
+
), o instanceof J && u.setSelection(
|
|
13319
|
+
new J(
|
|
13320
13320
|
u.doc.resolve(o.$anchorCell.pos),
|
|
13321
13321
|
f ? u.doc.resolve(f) : void 0
|
|
13322
13322
|
)
|
|
@@ -13332,7 +13332,7 @@ function K0(t, e) {
|
|
|
13332
13332
|
if (o.nodeAfter.attrs[t] === e) return !1;
|
|
13333
13333
|
if (r) {
|
|
13334
13334
|
const i = n.tr;
|
|
13335
|
-
n.selection instanceof
|
|
13335
|
+
n.selection instanceof J ? n.selection.forEachCell((s, a) => {
|
|
13336
13336
|
s.attrs[t] !== e && i.setNodeMarkup(a, null, {
|
|
13337
13337
|
...s.attrs,
|
|
13338
13338
|
[t]: e
|
|
@@ -13460,7 +13460,7 @@ function kl(t) {
|
|
|
13460
13460
|
if (n) {
|
|
13461
13461
|
const o = e.doc.resolve(r);
|
|
13462
13462
|
n(
|
|
13463
|
-
e.tr.setSelection(
|
|
13463
|
+
e.tr.setSelection(j.between(o, O0(o))).scrollIntoView()
|
|
13464
13464
|
);
|
|
13465
13465
|
}
|
|
13466
13466
|
return !0;
|
|
@@ -13477,7 +13477,7 @@ function G0(t, e) {
|
|
|
13477
13477
|
}
|
|
13478
13478
|
function Gr(t, e) {
|
|
13479
13479
|
const n = t.selection;
|
|
13480
|
-
if (!(n instanceof
|
|
13480
|
+
if (!(n instanceof J)) return !1;
|
|
13481
13481
|
if (e) {
|
|
13482
13482
|
const r = t.tr, o = we(t.schema).cell.createAndFill().content;
|
|
13483
13483
|
n.forEachCell((i, s) => {
|
|
@@ -13658,7 +13658,7 @@ function Ml(t, e, n, r, o, i, s, a) {
|
|
|
13658
13658
|
}
|
|
13659
13659
|
return l;
|
|
13660
13660
|
}
|
|
13661
|
-
function
|
|
13661
|
+
function Sl(t, e, n, r, o) {
|
|
13662
13662
|
let i = n ? t.doc.nodeAt(n - 1) : t.doc;
|
|
13663
13663
|
if (!i)
|
|
13664
13664
|
throw new Error("No table found");
|
|
@@ -13680,7 +13680,7 @@ function xl(t, e, n, r, o) {
|
|
|
13680
13680
|
);
|
|
13681
13681
|
}
|
|
13682
13682
|
p(), u.setSelection(
|
|
13683
|
-
new
|
|
13683
|
+
new J(
|
|
13684
13684
|
u.doc.resolve(n + s.positionAt(a, l, i)),
|
|
13685
13685
|
u.doc.resolve(n + s.positionAt(d - 1, c - 1, i))
|
|
13686
13686
|
)
|
|
@@ -13707,7 +13707,7 @@ function Zr(t, e) {
|
|
|
13707
13707
|
return (n, r, o) => {
|
|
13708
13708
|
if (!o) return !1;
|
|
13709
13709
|
const i = n.selection;
|
|
13710
|
-
if (i instanceof
|
|
13710
|
+
if (i instanceof J)
|
|
13711
13711
|
return lo(
|
|
13712
13712
|
n,
|
|
13713
13713
|
r,
|
|
@@ -13734,30 +13734,30 @@ function Qr(t, e) {
|
|
|
13734
13734
|
if (!o) return !1;
|
|
13735
13735
|
const i = n.selection;
|
|
13736
13736
|
let s;
|
|
13737
|
-
if (i instanceof
|
|
13737
|
+
if (i instanceof J)
|
|
13738
13738
|
s = i;
|
|
13739
13739
|
else {
|
|
13740
13740
|
const l = ku(o, t, e);
|
|
13741
13741
|
if (l == null) return !1;
|
|
13742
|
-
s = new
|
|
13742
|
+
s = new J(n.doc.resolve(l));
|
|
13743
13743
|
}
|
|
13744
13744
|
const a = hu(s.$headCell, t, e);
|
|
13745
13745
|
return a ? lo(
|
|
13746
13746
|
n,
|
|
13747
13747
|
r,
|
|
13748
|
-
new
|
|
13748
|
+
new J(s.$anchorCell, a)
|
|
13749
13749
|
) : !1;
|
|
13750
13750
|
};
|
|
13751
13751
|
}
|
|
13752
13752
|
function rw(t, e) {
|
|
13753
13753
|
const n = t.state.doc, r = Hn(n.resolve(e));
|
|
13754
|
-
return r ? (t.dispatch(t.state.tr.setSelection(new
|
|
13754
|
+
return r ? (t.dispatch(t.state.tr.setSelection(new J(r))), !0) : !1;
|
|
13755
13755
|
}
|
|
13756
13756
|
function ow(t, e, n) {
|
|
13757
13757
|
if (!Ye(t.state)) return !1;
|
|
13758
13758
|
let r = Z0(n);
|
|
13759
13759
|
const o = t.state.selection;
|
|
13760
|
-
if (o instanceof
|
|
13760
|
+
if (o instanceof J) {
|
|
13761
13761
|
r || (r = {
|
|
13762
13762
|
width: 1,
|
|
13763
13763
|
height: 1,
|
|
@@ -13771,10 +13771,10 @@ function ow(t, e, n) {
|
|
|
13771
13771
|
o.$anchorCell.pos - s,
|
|
13772
13772
|
o.$headCell.pos - s
|
|
13773
13773
|
);
|
|
13774
|
-
return r = ew(r, a.right - a.left, a.bottom - a.top),
|
|
13774
|
+
return r = ew(r, a.right - a.left, a.bottom - a.top), Sl(t.state, t.dispatch, s, a, r), !0;
|
|
13775
13775
|
} else if (r) {
|
|
13776
13776
|
const i = Vo(t.state), s = i.start(-1);
|
|
13777
|
-
return
|
|
13777
|
+
return Sl(
|
|
13778
13778
|
t.state,
|
|
13779
13779
|
t.dispatch,
|
|
13780
13780
|
s,
|
|
@@ -13787,9 +13787,9 @@ function ow(t, e, n) {
|
|
|
13787
13787
|
function iw(t, e) {
|
|
13788
13788
|
var n;
|
|
13789
13789
|
if (e.ctrlKey || e.metaKey) return;
|
|
13790
|
-
const r =
|
|
13790
|
+
const r = xl(t, e.target);
|
|
13791
13791
|
let o;
|
|
13792
|
-
if (e.shiftKey && t.state.selection instanceof
|
|
13792
|
+
if (e.shiftKey && t.state.selection instanceof J)
|
|
13793
13793
|
i(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
13794
13794
|
else if (e.shiftKey && r && (o = Hn(t.state.selection.$anchor)) != null && ((n = pi(t, e)) == null ? void 0 : n.pos) != o.pos)
|
|
13795
13795
|
i(o, e), e.preventDefault();
|
|
@@ -13801,7 +13801,7 @@ function iw(t, e) {
|
|
|
13801
13801
|
if (!d || !Ws(l, d))
|
|
13802
13802
|
if (u) d = l;
|
|
13803
13803
|
else return;
|
|
13804
|
-
const f = new
|
|
13804
|
+
const f = new J(l, d);
|
|
13805
13805
|
if (u || !t.state.selection.eq(f)) {
|
|
13806
13806
|
const p = t.state.tr.setSelection(f);
|
|
13807
13807
|
u && p.setMeta(Et, l.pos), t.dispatch(p);
|
|
@@ -13815,14 +13815,14 @@ function iw(t, e) {
|
|
|
13815
13815
|
let u;
|
|
13816
13816
|
if (d != null)
|
|
13817
13817
|
u = t.state.doc.resolve(d);
|
|
13818
|
-
else if (
|
|
13818
|
+
else if (xl(t, c.target) != r && (u = pi(t, e), !u))
|
|
13819
13819
|
return s();
|
|
13820
13820
|
u && i(u, c);
|
|
13821
13821
|
}
|
|
13822
13822
|
t.root.addEventListener("mouseup", s), t.root.addEventListener("dragstart", s), t.root.addEventListener("mousemove", a);
|
|
13823
13823
|
}
|
|
13824
13824
|
function ku(t, e, n) {
|
|
13825
|
-
if (!(t.state.selection instanceof
|
|
13825
|
+
if (!(t.state.selection instanceof j)) return null;
|
|
13826
13826
|
const { $head: r } = t.state.selection;
|
|
13827
13827
|
for (let o = r.depth - 1; o >= 0; o--) {
|
|
13828
13828
|
const i = r.node(o);
|
|
@@ -13834,7 +13834,7 @@ function ku(t, e, n) {
|
|
|
13834
13834
|
}
|
|
13835
13835
|
return null;
|
|
13836
13836
|
}
|
|
13837
|
-
function
|
|
13837
|
+
function xl(t, e) {
|
|
13838
13838
|
for (; e && e != t.dom; e = e.parentNode)
|
|
13839
13839
|
if (e.nodeName == "TD" || e.nodeName == "TH")
|
|
13840
13840
|
return e;
|
|
@@ -13890,7 +13890,7 @@ function ds(t, e, n, r, o, i) {
|
|
|
13890
13890
|
l ? (n.style.width = a + "px", n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = a + "px");
|
|
13891
13891
|
}
|
|
13892
13892
|
}
|
|
13893
|
-
var Pe = new
|
|
13893
|
+
var Pe = new Y(
|
|
13894
13894
|
"tableColumnResizing"
|
|
13895
13895
|
);
|
|
13896
13896
|
function aw({
|
|
@@ -13900,7 +13900,7 @@ function aw({
|
|
|
13900
13900
|
View: r = sw,
|
|
13901
13901
|
lastColumnResizable: o = !0
|
|
13902
13902
|
} = {}) {
|
|
13903
|
-
const i = new
|
|
13903
|
+
const i = new G({
|
|
13904
13904
|
key: Pe,
|
|
13905
13905
|
state: {
|
|
13906
13906
|
init(s, a) {
|
|
@@ -14099,14 +14099,14 @@ function gw(t, e) {
|
|
|
14099
14099
|
if ((l == s.width - 1 || s.map[d] != s.map[d + 1]) && (c == 0 || s.map[d] != s.map[d - s.width])) {
|
|
14100
14100
|
const u = s.map[d], f = a + u + i.nodeAt(u).nodeSize - 1, p = document.createElement("div");
|
|
14101
14101
|
p.className = "column-resize-handle", (n = Pe.getState(t)) != null && n.dragging && r.push(
|
|
14102
|
-
|
|
14102
|
+
$.node(
|
|
14103
14103
|
a + u,
|
|
14104
14104
|
a + u + i.nodeAt(u).nodeSize,
|
|
14105
14105
|
{
|
|
14106
14106
|
class: "column-resize-dragging"
|
|
14107
14107
|
}
|
|
14108
14108
|
)
|
|
14109
|
-
), r.push(
|
|
14109
|
+
), r.push($.widget(f, p));
|
|
14110
14110
|
}
|
|
14111
14111
|
}
|
|
14112
14112
|
return L.create(t.doc, r);
|
|
@@ -14114,7 +14114,7 @@ function gw(t, e) {
|
|
|
14114
14114
|
function yw({
|
|
14115
14115
|
allowTableNodeSelection: t = !1
|
|
14116
14116
|
} = {}) {
|
|
14117
|
-
return new
|
|
14117
|
+
return new G({
|
|
14118
14118
|
key: Et,
|
|
14119
14119
|
// This piece of state is used to remember when a mouse-drag
|
|
14120
14120
|
// cell-selection is happening, so that it can continue even as
|
|
@@ -14152,7 +14152,7 @@ function yw({
|
|
|
14152
14152
|
}
|
|
14153
14153
|
});
|
|
14154
14154
|
}
|
|
14155
|
-
const bw = (t) => t instanceof
|
|
14155
|
+
const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
|
|
14156
14156
|
const { selection: e } = t.state;
|
|
14157
14157
|
if (!bw(e)) return !1;
|
|
14158
14158
|
let n = 0;
|
|
@@ -14168,7 +14168,7 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14168
14168
|
left: { size: t, color: e },
|
|
14169
14169
|
bottom: { size: t, color: e },
|
|
14170
14170
|
right: { size: t, color: e }
|
|
14171
|
-
}),
|
|
14171
|
+
}), Su = X.create({
|
|
14172
14172
|
name: "table",
|
|
14173
14173
|
content: "tableRow+",
|
|
14174
14174
|
group: "block",
|
|
@@ -14246,7 +14246,7 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14246
14246
|
);
|
|
14247
14247
|
return [
|
|
14248
14248
|
"table",
|
|
14249
|
-
|
|
14249
|
+
D.mergeAttributes(this.options.htmlAttributes, e, {
|
|
14250
14250
|
style: r ? `width: ${r}` : `min-width: ${o}`
|
|
14251
14251
|
}),
|
|
14252
14252
|
n,
|
|
@@ -14259,7 +14259,7 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14259
14259
|
const s = v0(i.schema, t, e, n);
|
|
14260
14260
|
if (o) {
|
|
14261
14261
|
const a = r.selection.from + 1;
|
|
14262
|
-
r.replaceSelectionWith(s).scrollIntoView().setSelection(
|
|
14262
|
+
r.replaceSelectionWith(s).scrollIntoView().setSelection(j.near(r.doc.resolve(a)));
|
|
14263
14263
|
}
|
|
14264
14264
|
return !0;
|
|
14265
14265
|
},
|
|
@@ -14280,7 +14280,7 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14280
14280
|
goToNextCell: () => ({ state: t, dispatch: e }) => kl(1)(t, e),
|
|
14281
14281
|
goToPreviousCell: () => ({ state: t, dispatch: e }) => kl(-1)(t, e),
|
|
14282
14282
|
fixTables: () => ({ state: t, dispatch: e }) => (e && bu(t), !0),
|
|
14283
|
-
setCellSelection: (t) => ({ tr: e, dispatch: n }) => (n && e.setSelection(
|
|
14283
|
+
setCellSelection: (t) => ({ tr: e, dispatch: n }) => (n && e.setSelection(J.create(e.doc, t.anchorCell, t.headCell)), !0),
|
|
14284
14284
|
deleteCellAndTableBorders: () => ({ chain: t, state: e, tr: n }) => {
|
|
14285
14285
|
if (!Td(e))
|
|
14286
14286
|
return !1;
|
|
@@ -14337,7 +14337,7 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14337
14337
|
}))
|
|
14338
14338
|
};
|
|
14339
14339
|
}
|
|
14340
|
-
}),
|
|
14340
|
+
}), xu = X.create({
|
|
14341
14341
|
name: "tableHeader",
|
|
14342
14342
|
content: "block+",
|
|
14343
14343
|
tableRole: "header_cell",
|
|
@@ -14371,9 +14371,9 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14371
14371
|
return [{ tag: "th" }];
|
|
14372
14372
|
},
|
|
14373
14373
|
renderDOM({ htmlAttributes: t }) {
|
|
14374
|
-
return ["th",
|
|
14374
|
+
return ["th", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14375
14375
|
}
|
|
14376
|
-
}), Au =
|
|
14376
|
+
}), Au = X.create({
|
|
14377
14377
|
name: "tableRow",
|
|
14378
14378
|
content: "(tableCell | tableHeader)*",
|
|
14379
14379
|
tableRole: "row",
|
|
@@ -14395,9 +14395,9 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14395
14395
|
return [{ tag: "tr" }];
|
|
14396
14396
|
},
|
|
14397
14397
|
renderDOM({ htmlAttributes: t }) {
|
|
14398
|
-
return ["tr",
|
|
14398
|
+
return ["tr", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14399
14399
|
}
|
|
14400
|
-
}), Ou =
|
|
14400
|
+
}), Ou = X.create({
|
|
14401
14401
|
name: "tableCell",
|
|
14402
14402
|
content: "block+",
|
|
14403
14403
|
tableRole: "cell",
|
|
@@ -14477,7 +14477,7 @@ const bw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14477
14477
|
return [{ tag: "td" }];
|
|
14478
14478
|
},
|
|
14479
14479
|
renderDOM({ htmlAttributes: t }) {
|
|
14480
|
-
return ["td",
|
|
14480
|
+
return ["td", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14481
14481
|
}
|
|
14482
14482
|
});
|
|
14483
14483
|
var yt, Jt;
|
|
@@ -14508,13 +14508,13 @@ class ww {
|
|
|
14508
14508
|
(n[e] ?? n.default)();
|
|
14509
14509
|
}
|
|
14510
14510
|
buildTextView() {
|
|
14511
|
-
let { displayLabel: e } = this.node.attrs, { annotation: n } =
|
|
14511
|
+
let { displayLabel: e } = this.node.attrs, { annotation: n } = N(this, yt, Jt).call(this, {
|
|
14512
14512
|
displayLabel: e
|
|
14513
14513
|
});
|
|
14514
14514
|
this.dom = n;
|
|
14515
14515
|
}
|
|
14516
14516
|
buildImageView() {
|
|
14517
|
-
let { displayLabel: e, imageSrc: n } = this.node.attrs, { annotation: r, content: o } =
|
|
14517
|
+
let { displayLabel: e, imageSrc: n } = this.node.attrs, { annotation: r, content: o } = N(this, yt, Jt).call(this);
|
|
14518
14518
|
if (n) {
|
|
14519
14519
|
let i = document.createElement("img");
|
|
14520
14520
|
i.src = n, i.alt = e, i.style.height = "auto", i.style.maxWidth = "100%", i.style.pointerEvents = "none", i.style.verticalAlign = "middle", o.append(i), r.style.display = "inline-block", o.style.display = "inline-block";
|
|
@@ -14525,7 +14525,7 @@ class ww {
|
|
|
14525
14525
|
buildSignatureView() {
|
|
14526
14526
|
let { displayLabel: e, imageSrc: n } = this.node.attrs;
|
|
14527
14527
|
e = e || "Signature";
|
|
14528
|
-
let { annotation: r, content: o } =
|
|
14528
|
+
let { annotation: r, content: o } = N(this, yt, Jt).call(this);
|
|
14529
14529
|
if (n) {
|
|
14530
14530
|
let i = document.createElement("img");
|
|
14531
14531
|
i.src = n, i.alt = e, i.style.height = "auto", i.style.maxWidth = "100%", i.style.maxHeight = "28px", i.style.pointerEvents = "none", i.style.verticalAlign = "middle", o.append(i), r.style.display = "inline-block", o.style.display = "inline-block";
|
|
@@ -14534,17 +14534,17 @@ class ww {
|
|
|
14534
14534
|
this.dom = r;
|
|
14535
14535
|
}
|
|
14536
14536
|
buildCheckboxView() {
|
|
14537
|
-
let { displayLabel: e } = this.node.attrs, { annotation: n } =
|
|
14537
|
+
let { displayLabel: e } = this.node.attrs, { annotation: n } = N(this, yt, Jt).call(this, {
|
|
14538
14538
|
displayLabel: e
|
|
14539
14539
|
});
|
|
14540
14540
|
this.dom = n;
|
|
14541
14541
|
}
|
|
14542
14542
|
buildHTMLView() {
|
|
14543
|
-
let { displayLabel: e, rawHtml: n } = this.node.attrs, { annotation: r, content: o } =
|
|
14543
|
+
let { displayLabel: e, rawHtml: n } = this.node.attrs, { annotation: r, content: o } = N(this, yt, Jt).call(this);
|
|
14544
14544
|
n ? (o.innerHTML = n.trim(), r.style.display = "inline-block", o.style.display = "inline-block") : o.textContent = e, this.dom = r;
|
|
14545
14545
|
}
|
|
14546
14546
|
buildLinkView() {
|
|
14547
|
-
let { displayLabel: e, linkUrl: n } = this.node.attrs, { annotation: r, content: o } =
|
|
14547
|
+
let { displayLabel: e, linkUrl: n } = this.node.attrs, { annotation: r, content: o } = N(this, yt, Jt).call(this);
|
|
14548
14548
|
if (n) {
|
|
14549
14549
|
let i = document.createElement("a");
|
|
14550
14550
|
i.href = n, i.target = "_blank", i.textContent = n, i.style.textDecoration = "none", o.append(i), o.style.pointerEvents = "all";
|
|
@@ -14618,7 +14618,7 @@ yt = new WeakSet(), Jt = function({ displayLabel: e } = {}) {
|
|
|
14618
14618
|
o.classList.add(this.annotationContentClass), o.style.pointerEvents = "none", o.contentEditable = "false", e && (o.textContent = e), r.append(o);
|
|
14619
14619
|
let i = n === !1, s = [`border: 2px solid ${this.borderColor}`, "border-radius: 2px", "padding: 1px 2px", "box-sizing: border-box"].join(
|
|
14620
14620
|
"; "
|
|
14621
|
-
), a =
|
|
14621
|
+
), a = D.mergeAttributes(this.htmlAttributes, {
|
|
14622
14622
|
style: i ? "" : s
|
|
14623
14623
|
});
|
|
14624
14624
|
for (let [l, c] of Object.entries(a))
|
|
@@ -14654,8 +14654,8 @@ function It(t) {
|
|
|
14654
14654
|
}
|
|
14655
14655
|
const kw = (t = {}) => {
|
|
14656
14656
|
let { editor: e, annotationClass: n } = t;
|
|
14657
|
-
return new
|
|
14658
|
-
key: new
|
|
14657
|
+
return new G({
|
|
14658
|
+
key: new Y("fieldAnnotation"),
|
|
14659
14659
|
state: {
|
|
14660
14660
|
init() {
|
|
14661
14661
|
return null;
|
|
@@ -14755,15 +14755,15 @@ function Mw(t, e) {
|
|
|
14755
14755
|
};
|
|
14756
14756
|
});
|
|
14757
14757
|
}
|
|
14758
|
-
function
|
|
14758
|
+
function Sw(t, e) {
|
|
14759
14759
|
let n = It(e), r = [];
|
|
14760
14760
|
return n.forEach((o) => {
|
|
14761
14761
|
t(o.node) && r.push(o);
|
|
14762
14762
|
}), r;
|
|
14763
14763
|
}
|
|
14764
|
-
const { findChildren:
|
|
14764
|
+
const { findChildren: xw } = Dd;
|
|
14765
14765
|
function uo(t, e) {
|
|
14766
|
-
return
|
|
14766
|
+
return xw(e.doc, (r) => {
|
|
14767
14767
|
let o = r.type.name === "fieldAnnotation";
|
|
14768
14768
|
return Array.isArray(t) ? o && t.includes(r.attrs.fieldId) : o && r.attrs.fieldId === t;
|
|
14769
14769
|
});
|
|
@@ -14786,9 +14786,9 @@ function fo(t, e, n) {
|
|
|
14786
14786
|
});
|
|
14787
14787
|
}), r;
|
|
14788
14788
|
}
|
|
14789
|
-
const
|
|
14789
|
+
const sC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14790
14790
|
__proto__: null,
|
|
14791
|
-
findFieldAnnotations:
|
|
14791
|
+
findFieldAnnotations: Sw,
|
|
14792
14792
|
findFieldAnnotationsBetween: fo,
|
|
14793
14793
|
findFieldAnnotationsByFieldId: uo,
|
|
14794
14794
|
findFirstFieldAnnotationByFieldId: Aw,
|
|
@@ -14871,7 +14871,7 @@ function _w(t) {
|
|
|
14871
14871
|
};
|
|
14872
14872
|
return `#${i(e)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
|
|
14873
14873
|
}
|
|
14874
|
-
const fs = "annotation", Nu = "annotation-content", Eu =
|
|
14874
|
+
const fs = "annotation", Nu = "annotation-content", Eu = X.create({
|
|
14875
14875
|
name: "fieldAnnotation",
|
|
14876
14876
|
group: "inline",
|
|
14877
14877
|
inline: !0,
|
|
@@ -15062,7 +15062,7 @@ const fs = "annotation", Nu = "annotation-content", Eu = G.create({
|
|
|
15062
15062
|
renderDOM({ node: t, htmlAttributes: e }) {
|
|
15063
15063
|
let { type: n, displayLabel: r, imageSrc: o, rawHtml: i, linkUrl: s } = t.attrs, a = () => [
|
|
15064
15064
|
"span",
|
|
15065
|
-
|
|
15065
|
+
D.mergeAttributes(this.options.htmlAttributes, e),
|
|
15066
15066
|
[
|
|
15067
15067
|
"span",
|
|
15068
15068
|
{
|
|
@@ -15080,7 +15080,7 @@ const fs = "annotation", Nu = "annotation-content", Eu = G.create({
|
|
|
15080
15080
|
] : r;
|
|
15081
15081
|
return [
|
|
15082
15082
|
"span",
|
|
15083
|
-
|
|
15083
|
+
D.mergeAttributes(this.options.htmlAttributes, e),
|
|
15084
15084
|
[
|
|
15085
15085
|
"span",
|
|
15086
15086
|
{
|
|
@@ -15100,7 +15100,7 @@ const fs = "annotation", Nu = "annotation-content", Eu = G.create({
|
|
|
15100
15100
|
] : r;
|
|
15101
15101
|
return [
|
|
15102
15102
|
"span",
|
|
15103
|
-
|
|
15103
|
+
D.mergeAttributes(this.options.htmlAttributes, e),
|
|
15104
15104
|
[
|
|
15105
15105
|
"span",
|
|
15106
15106
|
{
|
|
@@ -15371,7 +15371,7 @@ function $w(t) {
|
|
|
15371
15371
|
}
|
|
15372
15372
|
return e;
|
|
15373
15373
|
}
|
|
15374
|
-
const To = new
|
|
15374
|
+
const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
|
|
15375
15375
|
key: To,
|
|
15376
15376
|
state: {
|
|
15377
15377
|
init() {
|
|
@@ -15381,7 +15381,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15381
15381
|
n = n.map(e.mapping, e.doc);
|
|
15382
15382
|
let i = e.getMeta(To);
|
|
15383
15383
|
if (i?.type === "add") {
|
|
15384
|
-
let s = document.createElement("placeholder"), a =
|
|
15384
|
+
let s = document.createElement("placeholder"), a = $.widget(i.pos, s, {
|
|
15385
15385
|
id: i.id
|
|
15386
15386
|
});
|
|
15387
15387
|
n = n.add(e.doc, [a]);
|
|
@@ -15394,10 +15394,10 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15394
15394
|
return this.getState(e);
|
|
15395
15395
|
}
|
|
15396
15396
|
}
|
|
15397
|
-
}),
|
|
15397
|
+
}), aC = (t, e) => {
|
|
15398
15398
|
let r = To.getState(t)?.find(null, null, (o) => o.id === e);
|
|
15399
15399
|
return r?.length ? r[0].from : null;
|
|
15400
|
-
}, Pu =
|
|
15400
|
+
}, Pu = X.create({
|
|
15401
15401
|
name: "image",
|
|
15402
15402
|
group: "inline",
|
|
15403
15403
|
inline: !0,
|
|
@@ -15452,9 +15452,9 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15452
15452
|
}
|
|
15453
15453
|
},
|
|
15454
15454
|
style: {
|
|
15455
|
-
default:
|
|
15455
|
+
default: null,
|
|
15456
15456
|
rendered: !0,
|
|
15457
|
-
renderDOM: ({ style: t }) =>
|
|
15457
|
+
renderDOM: ({ style: t }) => t ? { style: t } : {}
|
|
15458
15458
|
}
|
|
15459
15459
|
};
|
|
15460
15460
|
},
|
|
@@ -15466,7 +15466,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15466
15466
|
];
|
|
15467
15467
|
},
|
|
15468
15468
|
renderDOM({ htmlAttributes: t }) {
|
|
15469
|
-
return ["img",
|
|
15469
|
+
return ["img", D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
15470
15470
|
},
|
|
15471
15471
|
addCommands() {
|
|
15472
15472
|
return {
|
|
@@ -15479,7 +15479,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15479
15479
|
addPmPlugins() {
|
|
15480
15480
|
return [Vw()];
|
|
15481
15481
|
}
|
|
15482
|
-
}), Hw =
|
|
15482
|
+
}), Hw = X.create({
|
|
15483
15483
|
name: "bookmarkStart",
|
|
15484
15484
|
group: "inline",
|
|
15485
15485
|
content: "inline*",
|
|
@@ -15502,9 +15502,9 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15502
15502
|
};
|
|
15503
15503
|
},
|
|
15504
15504
|
renderDOM({ htmlAttributes: t }) {
|
|
15505
|
-
return ["a",
|
|
15505
|
+
return ["a", D.mergeAttributes(this.options.htmlAttributes, t)];
|
|
15506
15506
|
}
|
|
15507
|
-
}), Iu =
|
|
15507
|
+
}), Iu = X.create({
|
|
15508
15508
|
name: "mention",
|
|
15509
15509
|
group: "inline",
|
|
15510
15510
|
inline: !0,
|
|
@@ -15532,7 +15532,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15532
15532
|
const { name: n, email: r } = t.attrs;
|
|
15533
15533
|
return [
|
|
15534
15534
|
"span",
|
|
15535
|
-
|
|
15535
|
+
D.mergeAttributes({ "data-type": this.name || this.email }, this.options.htmlAttributes, e),
|
|
15536
15536
|
`@${n || r}`
|
|
15537
15537
|
];
|
|
15538
15538
|
},
|
|
@@ -15542,7 +15542,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15542
15542
|
email: { default: null }
|
|
15543
15543
|
};
|
|
15544
15544
|
}
|
|
15545
|
-
}), jw =
|
|
15545
|
+
}), jw = X.create({
|
|
15546
15546
|
name: "page-number",
|
|
15547
15547
|
group: "inline",
|
|
15548
15548
|
inline: !0,
|
|
@@ -15558,9 +15558,9 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15558
15558
|
return [{ tag: 'span[data-id="auto-page-number"' }];
|
|
15559
15559
|
},
|
|
15560
15560
|
renderDOM({ htmlAttributes: t }) {
|
|
15561
|
-
return ["span",
|
|
15561
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15562
15562
|
}
|
|
15563
|
-
}), Ww =
|
|
15563
|
+
}), Ww = X.create({
|
|
15564
15564
|
name: "total-page-number",
|
|
15565
15565
|
group: "inline",
|
|
15566
15566
|
inline: !0,
|
|
@@ -15576,7 +15576,86 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15576
15576
|
return [{ tag: 'span[data-id="auto-total-pages"' }];
|
|
15577
15577
|
},
|
|
15578
15578
|
renderDOM({ htmlAttributes: t }) {
|
|
15579
|
-
return ["span",
|
|
15579
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15580
|
+
}
|
|
15581
|
+
}), Uw = X.create({
|
|
15582
|
+
name: "shapeContainer",
|
|
15583
|
+
group: "block",
|
|
15584
|
+
content: "block+",
|
|
15585
|
+
isolating: !0,
|
|
15586
|
+
addOptions() {
|
|
15587
|
+
return {
|
|
15588
|
+
htmlAttributes: {
|
|
15589
|
+
class: "pm-shape-container"
|
|
15590
|
+
}
|
|
15591
|
+
};
|
|
15592
|
+
},
|
|
15593
|
+
addAttributes() {
|
|
15594
|
+
return {
|
|
15595
|
+
fillcolor: {
|
|
15596
|
+
renderDOM: (t) => t.fillcolor ? {
|
|
15597
|
+
style: `background-color: ${t.fillcolor}`
|
|
15598
|
+
} : {}
|
|
15599
|
+
},
|
|
15600
|
+
style: {
|
|
15601
|
+
renderDOM: (t) => t.style ? {
|
|
15602
|
+
style: t.style
|
|
15603
|
+
} : {}
|
|
15604
|
+
},
|
|
15605
|
+
wrapAttributes: {
|
|
15606
|
+
rendered: !1
|
|
15607
|
+
},
|
|
15608
|
+
attributes: {
|
|
15609
|
+
rendered: !1
|
|
15610
|
+
}
|
|
15611
|
+
};
|
|
15612
|
+
},
|
|
15613
|
+
parseDOM() {
|
|
15614
|
+
return [
|
|
15615
|
+
{
|
|
15616
|
+
tag: `div[data-type="${this.name}"]`
|
|
15617
|
+
}
|
|
15618
|
+
];
|
|
15619
|
+
},
|
|
15620
|
+
renderDOM({ htmlAttributes: t }) {
|
|
15621
|
+
return [
|
|
15622
|
+
"div",
|
|
15623
|
+
D.mergeAttributes(this.options.htmlAttributes, t, { "data-type": this.name }),
|
|
15624
|
+
0
|
|
15625
|
+
];
|
|
15626
|
+
}
|
|
15627
|
+
}), qw = X.create({
|
|
15628
|
+
name: "shapeTextbox",
|
|
15629
|
+
group: "block",
|
|
15630
|
+
content: "paragraph* block*",
|
|
15631
|
+
isolating: !0,
|
|
15632
|
+
addOptions() {
|
|
15633
|
+
return {
|
|
15634
|
+
htmlAttributes: {
|
|
15635
|
+
class: "pm-shape-textbox"
|
|
15636
|
+
}
|
|
15637
|
+
};
|
|
15638
|
+
},
|
|
15639
|
+
addAttributes() {
|
|
15640
|
+
return {
|
|
15641
|
+
attributes: {
|
|
15642
|
+
rendered: !1
|
|
15643
|
+
}
|
|
15644
|
+
};
|
|
15645
|
+
},
|
|
15646
|
+
parseDOM() {
|
|
15647
|
+
return [
|
|
15648
|
+
{
|
|
15649
|
+
tag: `div[data-type="${this.name}"]`
|
|
15650
|
+
}
|
|
15651
|
+
];
|
|
15652
|
+
},
|
|
15653
|
+
renderDOM({ htmlAttributes: t }) {
|
|
15654
|
+
return [
|
|
15655
|
+
"div",
|
|
15656
|
+
D.mergeAttributes(this.options.htmlAttributes, t, { "data-type": this.name }),
|
|
15657
|
+
0
|
|
15658
|
+
];
|
|
15580
15659
|
}
|
|
15581
15660
|
}), Ru = Oe.create({
|
|
15582
15661
|
name: "textStyle",
|
|
@@ -15597,12 +15676,12 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15597
15676
|
];
|
|
15598
15677
|
},
|
|
15599
15678
|
renderDOM({ htmlAttributes: t }) {
|
|
15600
|
-
return ["span",
|
|
15679
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15601
15680
|
},
|
|
15602
15681
|
addCommands() {
|
|
15603
15682
|
return {
|
|
15604
15683
|
removeEmptyTextStyle: () => ({ state: t, commands: e }) => {
|
|
15605
|
-
const n =
|
|
15684
|
+
const n = D.getMarkAttributes(t, this.type);
|
|
15606
15685
|
return Object.entries(n).some(([, o]) => !!o) ? !0 : e.unsetMark(this.name);
|
|
15607
15686
|
}
|
|
15608
15687
|
};
|
|
@@ -15623,7 +15702,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15623
15702
|
];
|
|
15624
15703
|
},
|
|
15625
15704
|
renderDOM({ htmlAttributes: t }) {
|
|
15626
|
-
return ["strong",
|
|
15705
|
+
return ["strong", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15627
15706
|
},
|
|
15628
15707
|
//prettier-ignore
|
|
15629
15708
|
addCommands() {
|
|
@@ -15655,7 +15734,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15655
15734
|
];
|
|
15656
15735
|
},
|
|
15657
15736
|
renderDOM({ htmlAttributes: t }) {
|
|
15658
|
-
return ["em",
|
|
15737
|
+
return ["em", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15659
15738
|
},
|
|
15660
15739
|
//prettier-ignore
|
|
15661
15740
|
addCommands() {
|
|
@@ -15686,7 +15765,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15686
15765
|
];
|
|
15687
15766
|
},
|
|
15688
15767
|
renderDOM({ htmlAttributes: t }) {
|
|
15689
|
-
return ["u",
|
|
15768
|
+
return ["u", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15690
15769
|
},
|
|
15691
15770
|
addAttributes() {
|
|
15692
15771
|
return {
|
|
@@ -15732,7 +15811,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15732
15811
|
return [{ tag: "mark" }];
|
|
15733
15812
|
},
|
|
15734
15813
|
renderDOM({ htmlAttributes: t }) {
|
|
15735
|
-
return ["mark",
|
|
15814
|
+
return ["mark", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15736
15815
|
},
|
|
15737
15816
|
//prettier-ignore
|
|
15738
15817
|
addCommands() {
|
|
@@ -15762,7 +15841,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15762
15841
|
];
|
|
15763
15842
|
},
|
|
15764
15843
|
renderDOM({ htmlAttributes: t }) {
|
|
15765
|
-
return ["s",
|
|
15844
|
+
return ["s", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15766
15845
|
},
|
|
15767
15846
|
addCommands() {
|
|
15768
15847
|
return {
|
|
@@ -15795,7 +15874,7 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15795
15874
|
return [{ tag: "a" }];
|
|
15796
15875
|
},
|
|
15797
15876
|
renderDOM({ htmlAttributes: t }) {
|
|
15798
|
-
return El(t.href, this.options.protocols) ? ["a",
|
|
15877
|
+
return El(t.href, this.options.protocols) ? ["a", D.mergeAttributes(this.options.htmlAttributes, t), 0] : ["a", mergeAttributes(this.options.htmlAttributes, { ...t, href: "" }), 0];
|
|
15799
15878
|
},
|
|
15800
15879
|
addAttributes() {
|
|
15801
15880
|
return {
|
|
@@ -15827,22 +15906,22 @@ const To = new J("ImagePlaceholder"), Vw = (t = {}) => new Y({
|
|
|
15827
15906
|
toggleLink: ({ href: t }) => ({ commands: e }) => t ? e.setLink({ href: t }) : e.unsetLink()
|
|
15828
15907
|
};
|
|
15829
15908
|
}
|
|
15830
|
-
}),
|
|
15909
|
+
}), Kw = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
|
|
15831
15910
|
function El(t, e) {
|
|
15832
15911
|
const n = ["http", "https", "mailto"];
|
|
15833
15912
|
return e && e.forEach((r) => {
|
|
15834
15913
|
const o = typeof r == "string" ? r : r.scheme;
|
|
15835
15914
|
o && n.push(o);
|
|
15836
|
-
}), !t || t.replace(
|
|
15915
|
+
}), !t || t.replace(Kw, "").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`, "i"));
|
|
15837
15916
|
}
|
|
15838
|
-
const
|
|
15917
|
+
const Xw = "track-insert", Vu = Oe.create({
|
|
15839
15918
|
name: $e,
|
|
15840
15919
|
group: "track",
|
|
15841
15920
|
inclusive: !1,
|
|
15842
15921
|
addOptions() {
|
|
15843
15922
|
return {
|
|
15844
15923
|
htmlAttributes: {
|
|
15845
|
-
class:
|
|
15924
|
+
class: Xw
|
|
15846
15925
|
}
|
|
15847
15926
|
};
|
|
15848
15927
|
},
|
|
@@ -15882,16 +15961,16 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
15882
15961
|
return !1;
|
|
15883
15962
|
},
|
|
15884
15963
|
renderDOM({ htmlAttributes: t }) {
|
|
15885
|
-
return ["span",
|
|
15964
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15886
15965
|
}
|
|
15887
|
-
}),
|
|
15966
|
+
}), Jw = "track-delete", Hu = Oe.create({
|
|
15888
15967
|
name: ue,
|
|
15889
15968
|
group: "track",
|
|
15890
15969
|
inclusive: !1,
|
|
15891
15970
|
addOptions() {
|
|
15892
15971
|
return {
|
|
15893
15972
|
htmlAttributes: {
|
|
15894
|
-
class:
|
|
15973
|
+
class: Jw
|
|
15895
15974
|
}
|
|
15896
15975
|
};
|
|
15897
15976
|
},
|
|
@@ -15931,7 +16010,7 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
15931
16010
|
return !1;
|
|
15932
16011
|
},
|
|
15933
16012
|
renderDOM({ htmlAttributes: t }) {
|
|
15934
|
-
return ["span",
|
|
16013
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15935
16014
|
}
|
|
15936
16015
|
}), ps = (t) => {
|
|
15937
16016
|
if (!t) return [];
|
|
@@ -15942,28 +16021,28 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
15942
16021
|
return [];
|
|
15943
16022
|
}
|
|
15944
16023
|
return Array.isArray(e) ? e.filter((n) => Object.hasOwn(n, "type") && Object.hasOwn(n, "attrs")) : [];
|
|
15945
|
-
},
|
|
16024
|
+
}, lC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15946
16025
|
__proto__: null,
|
|
15947
16026
|
addMarkStep: Ld,
|
|
15948
16027
|
documentHelpers: Zy,
|
|
15949
16028
|
findTrackedMarkBetween: zs,
|
|
15950
16029
|
getTrackChanges: $s,
|
|
15951
16030
|
markDeletion: Ad,
|
|
15952
|
-
markInsertion:
|
|
16031
|
+
markInsertion: xd,
|
|
15953
16032
|
markWrapping: fb,
|
|
15954
16033
|
parseFormatList: ps,
|
|
15955
16034
|
removeMarkStep: Fd,
|
|
15956
16035
|
replaceAroundStep: pb,
|
|
15957
16036
|
replaceStep: Rd,
|
|
15958
16037
|
trackedTransaction: Bd
|
|
15959
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
16038
|
+
}, Symbol.toStringTag, { value: "Module" })), Yw = "track-format", ju = Oe.create({
|
|
15960
16039
|
name: Me,
|
|
15961
16040
|
group: "track",
|
|
15962
16041
|
inclusive: !1,
|
|
15963
16042
|
addOptions() {
|
|
15964
16043
|
return {
|
|
15965
16044
|
htmlAttributes: {
|
|
15966
|
-
class:
|
|
16045
|
+
class: Yw
|
|
15967
16046
|
}
|
|
15968
16047
|
};
|
|
15969
16048
|
},
|
|
@@ -16025,9 +16104,9 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
16025
16104
|
return !1;
|
|
16026
16105
|
},
|
|
16027
16106
|
renderDOM({ htmlAttributes: t }) {
|
|
16028
|
-
return ["span",
|
|
16107
|
+
return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
16029
16108
|
}
|
|
16030
|
-
}),
|
|
16109
|
+
}), Gw = Q.create({
|
|
16031
16110
|
name: "trackChanges",
|
|
16032
16111
|
addCommands() {
|
|
16033
16112
|
return {
|
|
@@ -16197,7 +16276,7 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
16197
16276
|
const o = n[r], i = n[r - 1], s = n[r + 1];
|
|
16198
16277
|
let a;
|
|
16199
16278
|
return i && o.start === i.end ? a = i : s && o.end === s.start && (a = s), [o, a].filter(Boolean);
|
|
16200
|
-
},
|
|
16279
|
+
}, Zw = Q.create({
|
|
16201
16280
|
name: "placeholder",
|
|
16202
16281
|
addOptions() {
|
|
16203
16282
|
return {
|
|
@@ -16207,14 +16286,14 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
16207
16286
|
addPmPlugins() {
|
|
16208
16287
|
const t = (n) => {
|
|
16209
16288
|
if (n.doc.textBetween(0, n.doc.content.size, " ", " ") !== "") return L.empty;
|
|
16210
|
-
const { $from: o } = n.selection, i =
|
|
16289
|
+
const { $from: o } = n.selection, i = $.node(o.before(), o.after(), {
|
|
16211
16290
|
"data-placeholder": this.options.placeholder,
|
|
16212
16291
|
class: "super-editor-placeholder"
|
|
16213
16292
|
});
|
|
16214
16293
|
return L.create(n.doc, [i]);
|
|
16215
16294
|
};
|
|
16216
|
-
return [new
|
|
16217
|
-
key: new
|
|
16295
|
+
return [new G({
|
|
16296
|
+
key: new Y("placeholder"),
|
|
16218
16297
|
state: {
|
|
16219
16298
|
init: (n, r) => t(r),
|
|
16220
16299
|
apply: (n, r, o, i) => t(i)
|
|
@@ -16227,11 +16306,11 @@ const qw = "track-insert", Vu = Oe.create({
|
|
|
16227
16306
|
})];
|
|
16228
16307
|
}
|
|
16229
16308
|
});
|
|
16230
|
-
var De = "top", We = "bottom", Ue = "right", Ne = "left", Us = "auto", Ir = [De, We, Ue, Ne], Rn = "start", Mr = "end",
|
|
16309
|
+
var De = "top", We = "bottom", Ue = "right", Ne = "left", Us = "auto", Ir = [De, We, Ue, Ne], Rn = "start", Mr = "end", Qw = "clippingParents", Wu = "viewport", Yn = "popper", ev = "reference", Il = /* @__PURE__ */ Ir.reduce(function(t, e) {
|
|
16231
16310
|
return t.concat([e + "-" + Rn, e + "-" + Mr]);
|
|
16232
16311
|
}, []), Uu = /* @__PURE__ */ [].concat(Ir, [Us]).reduce(function(t, e) {
|
|
16233
16312
|
return t.concat([e, e + "-" + Rn, e + "-" + Mr]);
|
|
16234
|
-
}, []),
|
|
16313
|
+
}, []), tv = "beforeRead", nv = "read", rv = "afterRead", ov = "beforeMain", iv = "main", sv = "afterMain", av = "beforeWrite", lv = "write", cv = "afterWrite", dv = [tv, nv, rv, ov, iv, sv, av, lv, cv];
|
|
16235
16314
|
function st(t) {
|
|
16236
16315
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
16237
16316
|
}
|
|
@@ -16258,7 +16337,7 @@ function qs(t) {
|
|
|
16258
16337
|
var e = Le(t).ShadowRoot;
|
|
16259
16338
|
return t instanceof e || t instanceof ShadowRoot;
|
|
16260
16339
|
}
|
|
16261
|
-
function
|
|
16340
|
+
function uv(t) {
|
|
16262
16341
|
var e = t.state;
|
|
16263
16342
|
Object.keys(e.elements).forEach(function(n) {
|
|
16264
16343
|
var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
|
|
@@ -16268,7 +16347,7 @@ function cv(t) {
|
|
|
16268
16347
|
}));
|
|
16269
16348
|
});
|
|
16270
16349
|
}
|
|
16271
|
-
function
|
|
16350
|
+
function fv(t) {
|
|
16272
16351
|
var e = t.state, n = {
|
|
16273
16352
|
popper: {
|
|
16274
16353
|
position: e.options.strategy,
|
|
@@ -16296,8 +16375,8 @@ const qu = {
|
|
|
16296
16375
|
name: "applyStyles",
|
|
16297
16376
|
enabled: !0,
|
|
16298
16377
|
phase: "write",
|
|
16299
|
-
fn:
|
|
16300
|
-
effect:
|
|
16378
|
+
fn: uv,
|
|
16379
|
+
effect: fv,
|
|
16301
16380
|
requires: ["computeStyles"]
|
|
16302
16381
|
};
|
|
16303
16382
|
function rt(t) {
|
|
@@ -16355,7 +16434,7 @@ function Xu(t, e) {
|
|
|
16355
16434
|
function Ct(t) {
|
|
16356
16435
|
return Le(t).getComputedStyle(t);
|
|
16357
16436
|
}
|
|
16358
|
-
function
|
|
16437
|
+
function pv(t) {
|
|
16359
16438
|
return ["table", "td", "th"].indexOf(st(t)) >= 0;
|
|
16360
16439
|
}
|
|
16361
16440
|
function Wt(t) {
|
|
@@ -16380,7 +16459,7 @@ function Rl(t) {
|
|
|
16380
16459
|
return !je(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
16381
16460
|
Ct(t).position === "fixed" ? null : t.offsetParent;
|
|
16382
16461
|
}
|
|
16383
|
-
function
|
|
16462
|
+
function hv(t) {
|
|
16384
16463
|
var e = /firefox/i.test(hs()), n = /Trident/i.test(hs());
|
|
16385
16464
|
if (n && je(t)) {
|
|
16386
16465
|
var r = Ct(t);
|
|
@@ -16397,9 +16476,9 @@ function fv(t) {
|
|
|
16397
16476
|
return null;
|
|
16398
16477
|
}
|
|
16399
16478
|
function Rr(t) {
|
|
16400
|
-
for (var e = Le(t), n = Rl(t); n &&
|
|
16479
|
+
for (var e = Le(t), n = Rl(t); n && pv(n) && Ct(n).position === "static"; )
|
|
16401
16480
|
n = Rl(n);
|
|
16402
|
-
return n && (st(n) === "html" || st(n) === "body" && Ct(n).position === "static") ? e : n ||
|
|
16481
|
+
return n && (st(n) === "html" || st(n) === "body" && Ct(n).position === "static") ? e : n || hv(t) || e;
|
|
16403
16482
|
}
|
|
16404
16483
|
function Xs(t) {
|
|
16405
16484
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
@@ -16407,7 +16486,7 @@ function Xs(t) {
|
|
|
16407
16486
|
function sr(t, e, n) {
|
|
16408
16487
|
return sn(t, Do(e, n));
|
|
16409
16488
|
}
|
|
16410
|
-
function
|
|
16489
|
+
function mv(t, e, n) {
|
|
16411
16490
|
var r = sr(t, e, n);
|
|
16412
16491
|
return r > n ? n : r;
|
|
16413
16492
|
}
|
|
@@ -16427,41 +16506,41 @@ function Gu(t, e) {
|
|
|
16427
16506
|
return n[r] = t, n;
|
|
16428
16507
|
}, {});
|
|
16429
16508
|
}
|
|
16430
|
-
var
|
|
16509
|
+
var gv = function(e, n) {
|
|
16431
16510
|
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
16432
16511
|
placement: n.placement
|
|
16433
16512
|
})) : e, Yu(typeof e != "number" ? e : Gu(e, Ir));
|
|
16434
16513
|
};
|
|
16435
|
-
function
|
|
16514
|
+
function yv(t) {
|
|
16436
16515
|
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = rt(n.placement), l = Xs(a), c = [Ne, Ue].indexOf(a) >= 0, d = c ? "height" : "width";
|
|
16437
16516
|
if (!(!i || !s)) {
|
|
16438
|
-
var u =
|
|
16517
|
+
var u = gv(o.padding, n), f = Ks(i), p = l === "y" ? De : Ne, h = l === "y" ? We : Ue, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Rr(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], M = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, A = sr(y, k, M), F = l;
|
|
16439
16518
|
n.modifiersData[r] = (e = {}, e[F] = A, e.centerOffset = A - k, e);
|
|
16440
16519
|
}
|
|
16441
16520
|
}
|
|
16442
|
-
function
|
|
16521
|
+
function bv(t) {
|
|
16443
16522
|
var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
|
|
16444
16523
|
o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || Xu(e.elements.popper, o) && (e.elements.arrow = o));
|
|
16445
16524
|
}
|
|
16446
|
-
const
|
|
16525
|
+
const wv = {
|
|
16447
16526
|
name: "arrow",
|
|
16448
16527
|
enabled: !0,
|
|
16449
16528
|
phase: "main",
|
|
16450
|
-
fn:
|
|
16451
|
-
effect:
|
|
16529
|
+
fn: yv,
|
|
16530
|
+
effect: bv,
|
|
16452
16531
|
requires: ["popperOffsets"],
|
|
16453
16532
|
requiresIfExists: ["preventOverflow"]
|
|
16454
16533
|
};
|
|
16455
16534
|
function Bn(t) {
|
|
16456
16535
|
return t.split("-")[1];
|
|
16457
16536
|
}
|
|
16458
|
-
var
|
|
16537
|
+
var vv = {
|
|
16459
16538
|
top: "auto",
|
|
16460
16539
|
right: "auto",
|
|
16461
16540
|
bottom: "auto",
|
|
16462
16541
|
left: "auto"
|
|
16463
16542
|
};
|
|
16464
|
-
function
|
|
16543
|
+
function kv(t, e) {
|
|
16465
16544
|
var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
|
|
16466
16545
|
return {
|
|
16467
16546
|
x: Ln(n * o) / o || 0,
|
|
@@ -16482,37 +16561,37 @@ function Ll(t) {
|
|
|
16482
16561
|
var k = Rr(n), A = "clientHeight", F = "clientWidth";
|
|
16483
16562
|
if (k === Le(n) && (k = Wt(n), Ct(k).position !== "static" && a === "absolute" && (A = "scrollHeight", F = "scrollWidth")), k = k, o === De || (o === Ne || o === Ue) && i === Mr) {
|
|
16484
16563
|
y = We;
|
|
16485
|
-
var
|
|
16564
|
+
var S = u && k === M && M.visualViewport ? M.visualViewport.height : (
|
|
16486
16565
|
// $FlowFixMe[prop-missing]
|
|
16487
16566
|
k[A]
|
|
16488
16567
|
);
|
|
16489
|
-
m -=
|
|
16568
|
+
m -= S - r.height, m *= l ? 1 : -1;
|
|
16490
16569
|
}
|
|
16491
16570
|
if (o === Ne || (o === De || o === We) && i === Mr) {
|
|
16492
16571
|
C = Ue;
|
|
16493
|
-
var
|
|
16572
|
+
var V = u && k === M && M.visualViewport ? M.visualViewport.width : (
|
|
16494
16573
|
// $FlowFixMe[prop-missing]
|
|
16495
16574
|
k[F]
|
|
16496
16575
|
);
|
|
16497
|
-
p -=
|
|
16576
|
+
p -= V - r.width, p *= l ? 1 : -1;
|
|
16498
16577
|
}
|
|
16499
16578
|
}
|
|
16500
16579
|
var z = Object.assign({
|
|
16501
16580
|
position: a
|
|
16502
|
-
}, c &&
|
|
16581
|
+
}, c && vv), _ = d === !0 ? kv({
|
|
16503
16582
|
x: p,
|
|
16504
16583
|
y: m
|
|
16505
16584
|
}, Le(n)) : {
|
|
16506
16585
|
x: p,
|
|
16507
16586
|
y: m
|
|
16508
16587
|
};
|
|
16509
|
-
if (p =
|
|
16510
|
-
var
|
|
16511
|
-
return Object.assign({}, z, (
|
|
16588
|
+
if (p = _.x, m = _.y, l) {
|
|
16589
|
+
var H;
|
|
16590
|
+
return Object.assign({}, z, (H = {}, H[y] = w ? "0" : "", H[C] = b ? "0" : "", H.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + m + "px)" : "translate3d(" + p + "px, " + m + "px, 0)", H));
|
|
16512
16591
|
}
|
|
16513
16592
|
return Object.assign({}, z, (e = {}, e[y] = w ? m + "px" : "", e[C] = b ? p + "px" : "", e.transform = "", e));
|
|
16514
16593
|
}
|
|
16515
|
-
function
|
|
16594
|
+
function Cv(t) {
|
|
16516
16595
|
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 = {
|
|
16517
16596
|
placement: rt(e.placement),
|
|
16518
16597
|
variation: Bn(e.placement),
|
|
@@ -16535,17 +16614,17 @@ function vv(t) {
|
|
|
16535
16614
|
"data-popper-placement": e.placement
|
|
16536
16615
|
});
|
|
16537
16616
|
}
|
|
16538
|
-
const
|
|
16617
|
+
const Mv = {
|
|
16539
16618
|
name: "computeStyles",
|
|
16540
16619
|
enabled: !0,
|
|
16541
16620
|
phase: "beforeWrite",
|
|
16542
|
-
fn:
|
|
16621
|
+
fn: Cv,
|
|
16543
16622
|
data: {}
|
|
16544
16623
|
};
|
|
16545
16624
|
var to = {
|
|
16546
16625
|
passive: !0
|
|
16547
16626
|
};
|
|
16548
|
-
function
|
|
16627
|
+
function Sv(t) {
|
|
16549
16628
|
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);
|
|
16550
16629
|
return i && c.forEach(function(d) {
|
|
16551
16630
|
d.addEventListener("scroll", n.update, to);
|
|
@@ -16555,16 +16634,16 @@ function Cv(t) {
|
|
|
16555
16634
|
}), a && l.removeEventListener("resize", n.update, to);
|
|
16556
16635
|
};
|
|
16557
16636
|
}
|
|
16558
|
-
const
|
|
16637
|
+
const xv = {
|
|
16559
16638
|
name: "eventListeners",
|
|
16560
16639
|
enabled: !0,
|
|
16561
16640
|
phase: "write",
|
|
16562
16641
|
fn: function() {
|
|
16563
16642
|
},
|
|
16564
|
-
effect:
|
|
16643
|
+
effect: Sv,
|
|
16565
16644
|
data: {}
|
|
16566
16645
|
};
|
|
16567
|
-
var
|
|
16646
|
+
var Av = {
|
|
16568
16647
|
left: "right",
|
|
16569
16648
|
right: "left",
|
|
16570
16649
|
bottom: "top",
|
|
@@ -16572,16 +16651,16 @@ var xv = {
|
|
|
16572
16651
|
};
|
|
16573
16652
|
function po(t) {
|
|
16574
16653
|
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
16575
|
-
return
|
|
16654
|
+
return Av[e];
|
|
16576
16655
|
});
|
|
16577
16656
|
}
|
|
16578
|
-
var
|
|
16657
|
+
var Ov = {
|
|
16579
16658
|
start: "end",
|
|
16580
16659
|
end: "start"
|
|
16581
16660
|
};
|
|
16582
16661
|
function Fl(t) {
|
|
16583
16662
|
return t.replace(/start|end/g, function(e) {
|
|
16584
|
-
return
|
|
16663
|
+
return Ov[e];
|
|
16585
16664
|
});
|
|
16586
16665
|
}
|
|
16587
16666
|
function Js(t) {
|
|
@@ -16594,7 +16673,7 @@ function Js(t) {
|
|
|
16594
16673
|
function Ys(t) {
|
|
16595
16674
|
return Fn(Wt(t)).left + Js(t).scrollLeft;
|
|
16596
16675
|
}
|
|
16597
|
-
function
|
|
16676
|
+
function Tv(t, e) {
|
|
16598
16677
|
var n = Le(t), r = Wt(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
|
|
16599
16678
|
if (o) {
|
|
16600
16679
|
i = o.width, s = o.height;
|
|
@@ -16608,7 +16687,7 @@ function Av(t, e) {
|
|
|
16608
16687
|
y: l
|
|
16609
16688
|
};
|
|
16610
16689
|
}
|
|
16611
|
-
function
|
|
16690
|
+
function Dv(t) {
|
|
16612
16691
|
var e, n = Wt(t), r = Js(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = sn(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = sn(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -r.scrollLeft + Ys(t), l = -r.scrollTop;
|
|
16613
16692
|
return Ct(o || n).direction === "rtl" && (a += sn(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
16614
16693
|
width: i,
|
|
@@ -16641,21 +16720,21 @@ function ms(t) {
|
|
|
16641
16720
|
bottom: t.y + t.height
|
|
16642
16721
|
});
|
|
16643
16722
|
}
|
|
16644
|
-
function
|
|
16723
|
+
function Nv(t, e) {
|
|
16645
16724
|
var n = Fn(t, !1, e === "fixed");
|
|
16646
16725
|
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;
|
|
16647
16726
|
}
|
|
16648
16727
|
function Bl(t, e, n) {
|
|
16649
|
-
return e === Wu ? ms(
|
|
16728
|
+
return e === Wu ? ms(Tv(t, n)) : un(e) ? Nv(e, n) : ms(Dv(Wt(t)));
|
|
16650
16729
|
}
|
|
16651
|
-
function
|
|
16730
|
+
function Ev(t) {
|
|
16652
16731
|
var e = ar(Ho(t)), n = ["absolute", "fixed"].indexOf(Ct(t).position) >= 0, r = n && je(t) ? Rr(t) : t;
|
|
16653
16732
|
return un(r) ? e.filter(function(o) {
|
|
16654
16733
|
return un(o) && Xu(o, r) && st(o) !== "body";
|
|
16655
16734
|
}) : [];
|
|
16656
16735
|
}
|
|
16657
|
-
function
|
|
16658
|
-
var o = e === "clippingParents" ?
|
|
16736
|
+
function Pv(t, e, n, r) {
|
|
16737
|
+
var o = e === "clippingParents" ? Ev(t) : [].concat(e), i = [].concat(o, [n]), s = i[0], a = i.reduce(function(l, c) {
|
|
16659
16738
|
var d = Bl(t, c, r);
|
|
16660
16739
|
return l.top = sn(d.top, l.top), l.right = Do(d.right, l.right), l.bottom = Do(d.bottom, l.bottom), l.left = sn(d.left, l.left), l;
|
|
16661
16740
|
}, Bl(t, s, r));
|
|
@@ -16708,28 +16787,28 @@ function Qu(t) {
|
|
|
16708
16787
|
}
|
|
16709
16788
|
return l;
|
|
16710
16789
|
}
|
|
16711
|
-
function
|
|
16790
|
+
function Sr(t, e) {
|
|
16712
16791
|
e === void 0 && (e = {});
|
|
16713
|
-
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 ?
|
|
16792
|
+
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 ? Qw : a, c = n.rootBoundary, d = c === void 0 ? Wu : c, u = n.elementContext, f = u === void 0 ? Yn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = Yu(typeof g != "number" ? g : Gu(g, Ir)), w = f === Yn ? ev : Yn, C = t.rects.popper, y = t.elements[h ? w : f], M = Pv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Fn(t.elements.reference), A = Qu({
|
|
16714
16793
|
reference: k,
|
|
16715
16794
|
element: C,
|
|
16716
16795
|
placement: o
|
|
16717
|
-
}), F = ms(Object.assign({}, C, A)),
|
|
16718
|
-
top: M.top -
|
|
16719
|
-
bottom:
|
|
16720
|
-
left: M.left -
|
|
16721
|
-
right:
|
|
16796
|
+
}), F = ms(Object.assign({}, C, A)), S = f === Yn ? F : k, V = {
|
|
16797
|
+
top: M.top - S.top + b.top,
|
|
16798
|
+
bottom: S.bottom - M.bottom + b.bottom,
|
|
16799
|
+
left: M.left - S.left + b.left,
|
|
16800
|
+
right: S.right - M.right + b.right
|
|
16722
16801
|
}, z = t.modifiersData.offset;
|
|
16723
16802
|
if (f === Yn && z) {
|
|
16724
|
-
var
|
|
16725
|
-
Object.keys(
|
|
16726
|
-
var se = [Ue, We].indexOf(
|
|
16727
|
-
|
|
16803
|
+
var _ = z[o];
|
|
16804
|
+
Object.keys(V).forEach(function(H) {
|
|
16805
|
+
var se = [Ue, We].indexOf(H) >= 0 ? 1 : -1, ce = [De, We].indexOf(H) >= 0 ? "y" : "x";
|
|
16806
|
+
V[H] += _[ce] * se;
|
|
16728
16807
|
});
|
|
16729
16808
|
}
|
|
16730
|
-
return
|
|
16809
|
+
return V;
|
|
16731
16810
|
}
|
|
16732
|
-
function
|
|
16811
|
+
function Iv(t, e) {
|
|
16733
16812
|
e === void 0 && (e = {});
|
|
16734
16813
|
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 ? Uu : l, d = Bn(r), u = d ? a ? Il : Il.filter(function(h) {
|
|
16735
16814
|
return Bn(h) === d;
|
|
@@ -16738,7 +16817,7 @@ function Ev(t, e) {
|
|
|
16738
16817
|
});
|
|
16739
16818
|
f.length === 0 && (f = u);
|
|
16740
16819
|
var p = f.reduce(function(h, m) {
|
|
16741
|
-
return h[m] =
|
|
16820
|
+
return h[m] = Sr(t, {
|
|
16742
16821
|
placement: m,
|
|
16743
16822
|
boundary: o,
|
|
16744
16823
|
rootBoundary: i,
|
|
@@ -16749,17 +16828,17 @@ function Ev(t, e) {
|
|
|
16749
16828
|
return p[h] - p[m];
|
|
16750
16829
|
});
|
|
16751
16830
|
}
|
|
16752
|
-
function
|
|
16831
|
+
function Rv(t) {
|
|
16753
16832
|
if (rt(t) === Us)
|
|
16754
16833
|
return [];
|
|
16755
16834
|
var e = po(t);
|
|
16756
16835
|
return [Fl(t), e, Fl(e)];
|
|
16757
16836
|
}
|
|
16758
|
-
function
|
|
16837
|
+
function Lv(t) {
|
|
16759
16838
|
var e = t.state, n = t.options, r = t.name;
|
|
16760
16839
|
if (!e.modifiersData[r]._skip) {
|
|
16761
|
-
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = rt(g), w = b === g, C = l || (w || !h ? [po(g)] :
|
|
16762
|
-
return qe.concat(rt(Ee) === Us ?
|
|
16840
|
+
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = rt(g), w = b === g, C = l || (w || !h ? [po(g)] : Rv(g)), y = [g].concat(C).reduce(function(qe, Ee) {
|
|
16841
|
+
return qe.concat(rt(Ee) === Us ? Iv(e, {
|
|
16763
16842
|
placement: Ee,
|
|
16764
16843
|
boundary: d,
|
|
16765
16844
|
rootBoundary: u,
|
|
@@ -16767,47 +16846,47 @@ function Iv(t) {
|
|
|
16767
16846
|
flipVariations: h,
|
|
16768
16847
|
allowedAutoPlacements: m
|
|
16769
16848
|
}) : Ee);
|
|
16770
|
-
}, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0,
|
|
16771
|
-
var z = y[
|
|
16849
|
+
}, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0, S = y[0], V = 0; V < y.length; V++) {
|
|
16850
|
+
var z = y[V], _ = rt(z), H = Bn(z) === Rn, se = [De, We].indexOf(_) >= 0, ce = se ? "width" : "height", ae = Sr(e, {
|
|
16772
16851
|
placement: z,
|
|
16773
16852
|
boundary: d,
|
|
16774
16853
|
rootBoundary: u,
|
|
16775
16854
|
altBoundary: f,
|
|
16776
16855
|
padding: c
|
|
16777
|
-
}), ee = se ?
|
|
16856
|
+
}), ee = se ? H ? Ue : Ne : H ? We : De;
|
|
16778
16857
|
M[ce] > k[ce] && (ee = po(ee));
|
|
16779
16858
|
var ne = po(ee), ve = [];
|
|
16780
|
-
if (i && ve.push(ae[
|
|
16859
|
+
if (i && ve.push(ae[_] <= 0), a && ve.push(ae[ee] <= 0, ae[ne] <= 0), ve.every(function(qe) {
|
|
16781
16860
|
return qe;
|
|
16782
16861
|
})) {
|
|
16783
|
-
|
|
16862
|
+
S = z, F = !1;
|
|
16784
16863
|
break;
|
|
16785
16864
|
}
|
|
16786
16865
|
A.set(z, ve);
|
|
16787
16866
|
}
|
|
16788
16867
|
if (F)
|
|
16789
16868
|
for (var ke = h ? 3 : 1, lt = function(Ee) {
|
|
16790
|
-
var Ke = y.find(function(
|
|
16791
|
-
var dt = A.get(
|
|
16869
|
+
var Ke = y.find(function(St) {
|
|
16870
|
+
var dt = A.get(St);
|
|
16792
16871
|
if (dt)
|
|
16793
16872
|
return dt.slice(0, Ee).every(function(fn) {
|
|
16794
16873
|
return fn;
|
|
16795
16874
|
});
|
|
16796
16875
|
});
|
|
16797
16876
|
if (Ke)
|
|
16798
|
-
return
|
|
16877
|
+
return S = Ke, "break";
|
|
16799
16878
|
}, Fe = ke; Fe > 0; Fe--) {
|
|
16800
16879
|
var ct = lt(Fe);
|
|
16801
16880
|
if (ct === "break") break;
|
|
16802
16881
|
}
|
|
16803
|
-
e.placement !==
|
|
16882
|
+
e.placement !== S && (e.modifiersData[r]._skip = !0, e.placement = S, e.reset = !0);
|
|
16804
16883
|
}
|
|
16805
16884
|
}
|
|
16806
|
-
const
|
|
16885
|
+
const Fv = {
|
|
16807
16886
|
name: "flip",
|
|
16808
16887
|
enabled: !0,
|
|
16809
16888
|
phase: "main",
|
|
16810
|
-
fn:
|
|
16889
|
+
fn: Lv,
|
|
16811
16890
|
requiresIfExists: ["offset"],
|
|
16812
16891
|
data: {
|
|
16813
16892
|
_skip: !1
|
|
@@ -16829,10 +16908,10 @@ function _l(t) {
|
|
|
16829
16908
|
return t[e] >= 0;
|
|
16830
16909
|
});
|
|
16831
16910
|
}
|
|
16832
|
-
function
|
|
16833
|
-
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s =
|
|
16911
|
+
function Bv(t) {
|
|
16912
|
+
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = Sr(e, {
|
|
16834
16913
|
elementContext: "reference"
|
|
16835
|
-
}), a =
|
|
16914
|
+
}), a = Sr(e, {
|
|
16836
16915
|
altBoundary: !0
|
|
16837
16916
|
}), l = zl(s, r), c = zl(a, o, i), d = _l(l), u = _l(c);
|
|
16838
16917
|
e.modifiersData[n] = {
|
|
@@ -16845,14 +16924,14 @@ function Lv(t) {
|
|
|
16845
16924
|
"data-popper-escaped": u
|
|
16846
16925
|
});
|
|
16847
16926
|
}
|
|
16848
|
-
const
|
|
16927
|
+
const zv = {
|
|
16849
16928
|
name: "hide",
|
|
16850
16929
|
enabled: !0,
|
|
16851
16930
|
phase: "main",
|
|
16852
16931
|
requiresIfExists: ["preventOverflow"],
|
|
16853
|
-
fn:
|
|
16932
|
+
fn: Bv
|
|
16854
16933
|
};
|
|
16855
|
-
function
|
|
16934
|
+
function _v(t, e, n) {
|
|
16856
16935
|
var r = rt(t), o = [Ne, De].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, {
|
|
16857
16936
|
placement: t
|
|
16858
16937
|
})) : n, s = i[0], a = i[1];
|
|
@@ -16864,20 +16943,20 @@ function Bv(t, e, n) {
|
|
|
16864
16943
|
y: a
|
|
16865
16944
|
};
|
|
16866
16945
|
}
|
|
16867
|
-
function
|
|
16946
|
+
function $v(t) {
|
|
16868
16947
|
var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = Uu.reduce(function(d, u) {
|
|
16869
|
-
return d[u] =
|
|
16948
|
+
return d[u] = _v(u, e.rects, i), d;
|
|
16870
16949
|
}, {}), a = s[e.placement], l = a.x, c = a.y;
|
|
16871
16950
|
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
|
|
16872
16951
|
}
|
|
16873
|
-
const
|
|
16952
|
+
const Vv = {
|
|
16874
16953
|
name: "offset",
|
|
16875
16954
|
enabled: !0,
|
|
16876
16955
|
phase: "main",
|
|
16877
16956
|
requires: ["popperOffsets"],
|
|
16878
|
-
fn:
|
|
16957
|
+
fn: $v
|
|
16879
16958
|
};
|
|
16880
|
-
function
|
|
16959
|
+
function Hv(t) {
|
|
16881
16960
|
var e = t.state, n = t.name;
|
|
16882
16961
|
e.modifiersData[n] = Qu({
|
|
16883
16962
|
reference: e.rects.reference,
|
|
@@ -16885,72 +16964,72 @@ function $v(t) {
|
|
|
16885
16964
|
placement: e.placement
|
|
16886
16965
|
});
|
|
16887
16966
|
}
|
|
16888
|
-
const
|
|
16967
|
+
const jv = {
|
|
16889
16968
|
name: "popperOffsets",
|
|
16890
16969
|
enabled: !0,
|
|
16891
16970
|
phase: "read",
|
|
16892
|
-
fn:
|
|
16971
|
+
fn: Hv,
|
|
16893
16972
|
data: {}
|
|
16894
16973
|
};
|
|
16895
|
-
function
|
|
16974
|
+
function Wv(t) {
|
|
16896
16975
|
return t === "x" ? "y" : "x";
|
|
16897
16976
|
}
|
|
16898
|
-
function
|
|
16899
|
-
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 =
|
|
16977
|
+
function Uv(t) {
|
|
16978
|
+
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, {
|
|
16900
16979
|
boundary: l,
|
|
16901
16980
|
rootBoundary: c,
|
|
16902
16981
|
padding: u,
|
|
16903
16982
|
altBoundary: d
|
|
16904
|
-
}), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M =
|
|
16983
|
+
}), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = Wv(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper, S = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
16905
16984
|
placement: e.placement
|
|
16906
|
-
})) : m,
|
|
16907
|
-
mainAxis:
|
|
16908
|
-
altAxis:
|
|
16985
|
+
})) : m, V = typeof S == "number" ? {
|
|
16986
|
+
mainAxis: S,
|
|
16987
|
+
altAxis: S
|
|
16909
16988
|
} : Object.assign({
|
|
16910
16989
|
mainAxis: 0,
|
|
16911
16990
|
altAxis: 0
|
|
16912
|
-
},
|
|
16991
|
+
}, S), z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, _ = {
|
|
16913
16992
|
x: 0,
|
|
16914
16993
|
y: 0
|
|
16915
16994
|
};
|
|
16916
16995
|
if (k) {
|
|
16917
16996
|
if (i) {
|
|
16918
|
-
var
|
|
16997
|
+
var H, se = y === "y" ? De : Ne, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -F[ae] / 2 : 0, lt = w === Rn ? A[ae] : F[ae], Fe = w === Rn ? -F[ae] : -A[ae], ct = e.elements.arrow, qe = p && ct ? Ks(ct) : {
|
|
16919
16998
|
width: 0,
|
|
16920
16999
|
height: 0
|
|
16921
|
-
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ju(), Ke = Ee[se],
|
|
16922
|
-
k[y] = Wn,
|
|
17000
|
+
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ju(), Ke = Ee[se], St = Ee[ce], dt = sr(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - V.mainAxis : lt - dt - Ke - V.mainAxis, xt = C ? -A[ae] / 2 + ke + dt + St + V.mainAxis : Fe + dt + St + V.mainAxis, pn = e.elements.arrow && Rr(e.elements.arrow), Fr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, jn = (H = z?.[y]) != null ? H : 0, Br = ee + fn - jn - Fr, zr = ee + xt - jn, Wn = sr(p ? Do(ne, Br) : ne, ee, p ? sn(ve, zr) : ve);
|
|
17001
|
+
k[y] = Wn, _[y] = Wn - ee;
|
|
16923
17002
|
}
|
|
16924
17003
|
if (a) {
|
|
16925
|
-
var Un, _r = y === "x" ? De : Ne, $r = y === "x" ? We : Ue, ut = k[M], At = M === "y" ? "height" : "width", qn = ut + g[_r], Ut = ut - g[$r], Kn = [De, Ne].indexOf(b) !== -1, Vr = (Un = z?.[M]) != null ? Un : 0, Hr = Kn ? qn : ut - A[At] - F[At] - Vr +
|
|
16926
|
-
k[M] = Wr,
|
|
17004
|
+
var Un, _r = y === "x" ? De : Ne, $r = y === "x" ? We : Ue, ut = k[M], At = M === "y" ? "height" : "width", qn = ut + g[_r], Ut = ut - g[$r], Kn = [De, Ne].indexOf(b) !== -1, Vr = (Un = z?.[M]) != null ? Un : 0, Hr = Kn ? qn : ut - A[At] - F[At] - Vr + V.altAxis, jr = Kn ? ut + A[At] + F[At] - Vr - V.altAxis : Ut, Wr = p && Kn ? mv(Hr, ut, jr) : sr(p ? Hr : qn, ut, p ? jr : Ut);
|
|
17005
|
+
k[M] = Wr, _[M] = Wr - ut;
|
|
16927
17006
|
}
|
|
16928
|
-
e.modifiersData[r] =
|
|
17007
|
+
e.modifiersData[r] = _;
|
|
16929
17008
|
}
|
|
16930
17009
|
}
|
|
16931
|
-
const
|
|
17010
|
+
const qv = {
|
|
16932
17011
|
name: "preventOverflow",
|
|
16933
17012
|
enabled: !0,
|
|
16934
17013
|
phase: "main",
|
|
16935
|
-
fn:
|
|
17014
|
+
fn: Uv,
|
|
16936
17015
|
requiresIfExists: ["offset"]
|
|
16937
17016
|
};
|
|
16938
|
-
function
|
|
17017
|
+
function Kv(t) {
|
|
16939
17018
|
return {
|
|
16940
17019
|
scrollLeft: t.scrollLeft,
|
|
16941
17020
|
scrollTop: t.scrollTop
|
|
16942
17021
|
};
|
|
16943
17022
|
}
|
|
16944
|
-
function
|
|
16945
|
-
return t === Le(t) || !je(t) ? Js(t) :
|
|
17023
|
+
function Xv(t) {
|
|
17024
|
+
return t === Le(t) || !je(t) ? Js(t) : Kv(t);
|
|
16946
17025
|
}
|
|
16947
|
-
function
|
|
17026
|
+
function Jv(t) {
|
|
16948
17027
|
var e = t.getBoundingClientRect(), n = Ln(e.width) / t.offsetWidth || 1, r = Ln(e.height) / t.offsetHeight || 1;
|
|
16949
17028
|
return n !== 1 || r !== 1;
|
|
16950
17029
|
}
|
|
16951
|
-
function
|
|
17030
|
+
function Yv(t, e, n) {
|
|
16952
17031
|
n === void 0 && (n = !1);
|
|
16953
|
-
var r = je(e), o = je(e) &&
|
|
17032
|
+
var r = je(e), o = je(e) && Jv(e), i = Wt(e), s = Fn(t, o, n), a = {
|
|
16954
17033
|
scrollLeft: 0,
|
|
16955
17034
|
scrollTop: 0
|
|
16956
17035
|
}, l = {
|
|
@@ -16958,14 +17037,14 @@ function Xv(t, e, n) {
|
|
|
16958
17037
|
y: 0
|
|
16959
17038
|
};
|
|
16960
17039
|
return (r || !r && !n) && ((st(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
16961
|
-
Gs(i)) && (a =
|
|
17040
|
+
Gs(i)) && (a = Xv(e)), je(e) ? (l = Fn(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = Ys(i))), {
|
|
16962
17041
|
x: s.left + a.scrollLeft - l.x,
|
|
16963
17042
|
y: s.top + a.scrollTop - l.y,
|
|
16964
17043
|
width: s.width,
|
|
16965
17044
|
height: s.height
|
|
16966
17045
|
};
|
|
16967
17046
|
}
|
|
16968
|
-
function
|
|
17047
|
+
function Gv(t) {
|
|
16969
17048
|
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
16970
17049
|
t.forEach(function(i) {
|
|
16971
17050
|
e.set(i.name, i);
|
|
@@ -16984,15 +17063,15 @@ function Jv(t) {
|
|
|
16984
17063
|
n.has(i.name) || o(i);
|
|
16985
17064
|
}), r;
|
|
16986
17065
|
}
|
|
16987
|
-
function
|
|
16988
|
-
var e =
|
|
16989
|
-
return
|
|
17066
|
+
function Zv(t) {
|
|
17067
|
+
var e = Gv(t);
|
|
17068
|
+
return dv.reduce(function(n, r) {
|
|
16990
17069
|
return n.concat(e.filter(function(o) {
|
|
16991
17070
|
return o.phase === r;
|
|
16992
17071
|
}));
|
|
16993
17072
|
}, []);
|
|
16994
17073
|
}
|
|
16995
|
-
function
|
|
17074
|
+
function Qv(t) {
|
|
16996
17075
|
var e;
|
|
16997
17076
|
return function() {
|
|
16998
17077
|
return e || (e = new Promise(function(n) {
|
|
@@ -17002,7 +17081,7 @@ function Gv(t) {
|
|
|
17002
17081
|
})), e;
|
|
17003
17082
|
};
|
|
17004
17083
|
}
|
|
17005
|
-
function
|
|
17084
|
+
function ek(t) {
|
|
17006
17085
|
var e = t.reduce(function(n, r) {
|
|
17007
17086
|
var o = n[r.name];
|
|
17008
17087
|
return n[r.name] = o ? Object.assign({}, o, r, {
|
|
@@ -17026,7 +17105,7 @@ function Vl() {
|
|
|
17026
17105
|
return !(r && typeof r.getBoundingClientRect == "function");
|
|
17027
17106
|
});
|
|
17028
17107
|
}
|
|
17029
|
-
function
|
|
17108
|
+
function tk(t) {
|
|
17030
17109
|
t === void 0 && (t = {});
|
|
17031
17110
|
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o = e.defaultOptions, i = o === void 0 ? $l : o;
|
|
17032
17111
|
return function(a, l, c) {
|
|
@@ -17050,7 +17129,7 @@ function Qv(t) {
|
|
|
17050
17129
|
reference: un(a) ? ar(a) : a.contextElement ? ar(a.contextElement) : [],
|
|
17051
17130
|
popper: ar(l)
|
|
17052
17131
|
};
|
|
17053
|
-
var C =
|
|
17132
|
+
var C = Zv(ek([].concat(r, d.options.modifiers)));
|
|
17054
17133
|
return d.orderedModifiers = C.filter(function(y) {
|
|
17055
17134
|
return y.enabled;
|
|
17056
17135
|
}), h(), p.update();
|
|
@@ -17065,21 +17144,21 @@ function Qv(t) {
|
|
|
17065
17144
|
var b = d.elements, w = b.reference, C = b.popper;
|
|
17066
17145
|
if (Vl(w, C)) {
|
|
17067
17146
|
d.rects = {
|
|
17068
|
-
reference:
|
|
17147
|
+
reference: Yv(w, Rr(C), d.options.strategy === "fixed"),
|
|
17069
17148
|
popper: Ks(C)
|
|
17070
|
-
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(
|
|
17071
|
-
return d.modifiersData[
|
|
17149
|
+
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(V) {
|
|
17150
|
+
return d.modifiersData[V.name] = Object.assign({}, V.data);
|
|
17072
17151
|
});
|
|
17073
17152
|
for (var y = 0; y < d.orderedModifiers.length; y++) {
|
|
17074
17153
|
if (d.reset === !0) {
|
|
17075
17154
|
d.reset = !1, y = -1;
|
|
17076
17155
|
continue;
|
|
17077
17156
|
}
|
|
17078
|
-
var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A,
|
|
17157
|
+
var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A, S = M.name;
|
|
17079
17158
|
typeof k == "function" && (d = k({
|
|
17080
17159
|
state: d,
|
|
17081
17160
|
options: F,
|
|
17082
|
-
name:
|
|
17161
|
+
name: S,
|
|
17083
17162
|
instance: p
|
|
17084
17163
|
}) || d);
|
|
17085
17164
|
}
|
|
@@ -17088,7 +17167,7 @@ function Qv(t) {
|
|
|
17088
17167
|
},
|
|
17089
17168
|
// Async and optimistically optimized update – it will not be executed if
|
|
17090
17169
|
// not necessary (debounced to run at most once-per-tick)
|
|
17091
|
-
update:
|
|
17170
|
+
update: Qv(function() {
|
|
17092
17171
|
return new Promise(function(g) {
|
|
17093
17172
|
p.forceUpdate(), g(d);
|
|
17094
17173
|
});
|
|
@@ -17125,15 +17204,15 @@ function Qv(t) {
|
|
|
17125
17204
|
return p;
|
|
17126
17205
|
};
|
|
17127
17206
|
}
|
|
17128
|
-
var
|
|
17129
|
-
defaultModifiers:
|
|
17130
|
-
}),
|
|
17207
|
+
var nk = [xv, jv, Mv, qu, Vv, Fv, qv, wv, zv], rk = /* @__PURE__ */ tk({
|
|
17208
|
+
defaultModifiers: nk
|
|
17209
|
+
}), ok = "tippy-box", ef = "tippy-content", ik = "tippy-backdrop", tf = "tippy-arrow", nf = "tippy-svg-arrow", Yt = {
|
|
17131
17210
|
passive: !0,
|
|
17132
17211
|
capture: !0
|
|
17133
17212
|
}, rf = function() {
|
|
17134
17213
|
return document.body;
|
|
17135
17214
|
};
|
|
17136
|
-
function
|
|
17215
|
+
function sk(t, e) {
|
|
17137
17216
|
return {}.hasOwnProperty.call(t, e);
|
|
17138
17217
|
}
|
|
17139
17218
|
function hi(t, e, n) {
|
|
@@ -17160,27 +17239,27 @@ function Hl(t, e) {
|
|
|
17160
17239
|
}, e);
|
|
17161
17240
|
};
|
|
17162
17241
|
}
|
|
17163
|
-
function
|
|
17242
|
+
function ak(t, e) {
|
|
17164
17243
|
var n = Object.assign({}, t);
|
|
17165
17244
|
return e.forEach(function(r) {
|
|
17166
17245
|
delete n[r];
|
|
17167
17246
|
}), n;
|
|
17168
17247
|
}
|
|
17169
|
-
function
|
|
17248
|
+
function lk(t) {
|
|
17170
17249
|
return t.split(/\s+/).filter(Boolean);
|
|
17171
17250
|
}
|
|
17172
|
-
function
|
|
17251
|
+
function xn(t) {
|
|
17173
17252
|
return [].concat(t);
|
|
17174
17253
|
}
|
|
17175
17254
|
function jl(t, e) {
|
|
17176
17255
|
t.indexOf(e) === -1 && t.push(e);
|
|
17177
17256
|
}
|
|
17178
|
-
function
|
|
17257
|
+
function ck(t) {
|
|
17179
17258
|
return t.filter(function(e, n) {
|
|
17180
17259
|
return t.indexOf(e) === n;
|
|
17181
17260
|
});
|
|
17182
17261
|
}
|
|
17183
|
-
function
|
|
17262
|
+
function dk(t) {
|
|
17184
17263
|
return t.split("-")[0];
|
|
17185
17264
|
}
|
|
17186
17265
|
function No(t) {
|
|
@@ -17194,22 +17273,22 @@ function Wl(t) {
|
|
|
17194
17273
|
function lr() {
|
|
17195
17274
|
return document.createElement("div");
|
|
17196
17275
|
}
|
|
17197
|
-
function
|
|
17276
|
+
function xr(t) {
|
|
17198
17277
|
return ["Element", "Fragment"].some(function(e) {
|
|
17199
17278
|
return Zs(t, e);
|
|
17200
17279
|
});
|
|
17201
17280
|
}
|
|
17202
|
-
function
|
|
17281
|
+
function uk(t) {
|
|
17203
17282
|
return Zs(t, "NodeList");
|
|
17204
17283
|
}
|
|
17205
|
-
function
|
|
17284
|
+
function fk(t) {
|
|
17206
17285
|
return Zs(t, "MouseEvent");
|
|
17207
17286
|
}
|
|
17208
|
-
function
|
|
17287
|
+
function pk(t) {
|
|
17209
17288
|
return !!(t && t._tippy && t._tippy.reference === t);
|
|
17210
17289
|
}
|
|
17211
|
-
function
|
|
17212
|
-
return
|
|
17290
|
+
function hk(t) {
|
|
17291
|
+
return xr(t) ? [t] : uk(t) ? No(t) : Array.isArray(t) ? t : No(document.querySelectorAll(t));
|
|
17213
17292
|
}
|
|
17214
17293
|
function mi(t, e) {
|
|
17215
17294
|
t.forEach(function(n) {
|
|
@@ -17221,14 +17300,14 @@ function Ul(t, e) {
|
|
|
17221
17300
|
n && n.setAttribute("data-state", e);
|
|
17222
17301
|
});
|
|
17223
17302
|
}
|
|
17224
|
-
function
|
|
17225
|
-
var e, n =
|
|
17303
|
+
function mk(t) {
|
|
17304
|
+
var e, n = xn(t), r = n[0];
|
|
17226
17305
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
17227
17306
|
}
|
|
17228
|
-
function
|
|
17307
|
+
function gk(t, e) {
|
|
17229
17308
|
var n = e.clientX, r = e.clientY;
|
|
17230
17309
|
return t.every(function(o) {
|
|
17231
|
-
var i = o.popperRect, s = o.popperState, a = o.props, l = a.interactiveBorder, c =
|
|
17310
|
+
var i = o.popperRect, s = o.popperState, a = o.props, l = a.interactiveBorder, c = dk(s.placement), d = s.modifiersData.offset;
|
|
17232
17311
|
if (!d)
|
|
17233
17312
|
return !0;
|
|
17234
17313
|
var u = c === "bottom" ? d.top.y : 0, f = c === "top" ? d.bottom.y : 0, p = c === "right" ? d.left.x : 0, h = c === "left" ? d.right.x : 0, m = i.top - r + u > l, g = r - i.bottom - f > l, b = i.left - n + p > l, w = n - i.right - h > l;
|
|
@@ -17253,24 +17332,24 @@ function ql(t, e) {
|
|
|
17253
17332
|
var tt = {
|
|
17254
17333
|
isTouch: !1
|
|
17255
17334
|
}, Kl = 0;
|
|
17256
|
-
function
|
|
17335
|
+
function yk() {
|
|
17257
17336
|
tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", sf));
|
|
17258
17337
|
}
|
|
17259
17338
|
function sf() {
|
|
17260
17339
|
var t = performance.now();
|
|
17261
17340
|
t - Kl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", sf)), Kl = t;
|
|
17262
17341
|
}
|
|
17263
|
-
function
|
|
17342
|
+
function bk() {
|
|
17264
17343
|
var t = document.activeElement;
|
|
17265
|
-
if (
|
|
17344
|
+
if (pk(t)) {
|
|
17266
17345
|
var e = t._tippy;
|
|
17267
17346
|
t.blur && !e.state.isVisible && t.blur();
|
|
17268
17347
|
}
|
|
17269
17348
|
}
|
|
17270
|
-
function
|
|
17271
|
-
document.addEventListener("touchstart",
|
|
17349
|
+
function wk() {
|
|
17350
|
+
document.addEventListener("touchstart", yk, Yt), window.addEventListener("blur", bk);
|
|
17272
17351
|
}
|
|
17273
|
-
var
|
|
17352
|
+
var vk = typeof window < "u" && typeof document < "u", kk = vk ? (
|
|
17274
17353
|
// @ts-ignore
|
|
17275
17354
|
!!window.msCrypto
|
|
17276
17355
|
) : !1;
|
|
@@ -17282,7 +17361,7 @@ function Xl(t) {
|
|
|
17282
17361
|
var e = /[ \t]{2,}/g, n = /^[ \t]*/gm;
|
|
17283
17362
|
return t.replace(e, " ").replace(n, "").trim();
|
|
17284
17363
|
}
|
|
17285
|
-
function
|
|
17364
|
+
function Ck(t) {
|
|
17286
17365
|
return Xl(`
|
|
17287
17366
|
%ctippy.js
|
|
17288
17367
|
|
|
@@ -17293,7 +17372,7 @@ function vk(t) {
|
|
|
17293
17372
|
}
|
|
17294
17373
|
function af(t) {
|
|
17295
17374
|
return [
|
|
17296
|
-
|
|
17375
|
+
Ck(t),
|
|
17297
17376
|
// title
|
|
17298
17377
|
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
17299
17378
|
// message
|
|
@@ -17303,8 +17382,8 @@ function af(t) {
|
|
|
17303
17382
|
];
|
|
17304
17383
|
}
|
|
17305
17384
|
var Ar;
|
|
17306
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17307
|
-
function
|
|
17385
|
+
ie.env.NODE_ENV !== "production" && Mk();
|
|
17386
|
+
function Mk() {
|
|
17308
17387
|
Ar = /* @__PURE__ */ new Set();
|
|
17309
17388
|
}
|
|
17310
17389
|
function gt(t, e) {
|
|
@@ -17319,7 +17398,7 @@ function gs(t, e) {
|
|
|
17319
17398
|
Ar.add(e), (n = console).error.apply(n, af(e));
|
|
17320
17399
|
}
|
|
17321
17400
|
}
|
|
17322
|
-
function
|
|
17401
|
+
function Sk(t) {
|
|
17323
17402
|
var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
|
|
17324
17403
|
gs(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), gs(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
17325
17404
|
}
|
|
@@ -17328,7 +17407,7 @@ var lf = {
|
|
|
17328
17407
|
followCursor: !1,
|
|
17329
17408
|
inlinePositioning: !1,
|
|
17330
17409
|
sticky: !1
|
|
17331
|
-
},
|
|
17410
|
+
}, xk = {
|
|
17332
17411
|
allowHTML: !1,
|
|
17333
17412
|
animation: "fade",
|
|
17334
17413
|
arrow: !0,
|
|
@@ -17386,7 +17465,7 @@ var lf = {
|
|
|
17386
17465
|
touch: !0,
|
|
17387
17466
|
trigger: "mouseenter focus",
|
|
17388
17467
|
triggerTarget: null
|
|
17389
|
-
}, lf,
|
|
17468
|
+
}, lf, xk), Ak = Object.keys(Ie), Ok = function(e) {
|
|
17390
17469
|
ie.env.NODE_ENV !== "production" && df(e, []);
|
|
17391
17470
|
var n = Object.keys(e);
|
|
17392
17471
|
n.forEach(function(r) {
|
|
@@ -17404,10 +17483,10 @@ function cf(t) {
|
|
|
17404
17483
|
}, {});
|
|
17405
17484
|
return Object.assign({}, t, n);
|
|
17406
17485
|
}
|
|
17407
|
-
function
|
|
17486
|
+
function Tk(t, e) {
|
|
17408
17487
|
var n = e ? Object.keys(cf(Object.assign({}, Ie, {
|
|
17409
17488
|
plugins: e
|
|
17410
|
-
}))) :
|
|
17489
|
+
}))) : Ak, r = n.reduce(function(o, i) {
|
|
17411
17490
|
var s = (t.getAttribute("data-tippy-" + i) || "").trim();
|
|
17412
17491
|
if (!s)
|
|
17413
17492
|
return o;
|
|
@@ -17426,7 +17505,7 @@ function Ak(t, e) {
|
|
|
17426
17505
|
function Jl(t, e) {
|
|
17427
17506
|
var n = Object.assign({}, e, {
|
|
17428
17507
|
content: of(e.content, [t])
|
|
17429
|
-
}, e.ignoreAttributes ? {} :
|
|
17508
|
+
}, e.ignoreAttributes ? {} : Tk(t, e.plugins));
|
|
17430
17509
|
return n.aria = Object.assign({}, Ie.aria, n.aria), n.aria = {
|
|
17431
17510
|
expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
|
|
17432
17511
|
content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
|
|
@@ -17436,7 +17515,7 @@ function df(t, e) {
|
|
|
17436
17515
|
t === void 0 && (t = {}), e === void 0 && (e = []);
|
|
17437
17516
|
var n = Object.keys(t);
|
|
17438
17517
|
n.forEach(function(r) {
|
|
17439
|
-
var o =
|
|
17518
|
+
var o = ak(Ie, Object.keys(lf)), i = !sk(o, r);
|
|
17440
17519
|
i && (i = e.filter(function(s) {
|
|
17441
17520
|
return s.name === r;
|
|
17442
17521
|
}).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
@@ -17445,18 +17524,18 @@ function df(t, e) {
|
|
|
17445
17524
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
17446
17525
|
});
|
|
17447
17526
|
}
|
|
17448
|
-
var
|
|
17527
|
+
var Dk = function() {
|
|
17449
17528
|
return "innerHTML";
|
|
17450
17529
|
};
|
|
17451
17530
|
function ys(t, e) {
|
|
17452
|
-
t[
|
|
17531
|
+
t[Dk()] = e;
|
|
17453
17532
|
}
|
|
17454
17533
|
function Yl(t) {
|
|
17455
17534
|
var e = lr();
|
|
17456
|
-
return t === !0 ? e.className = tf : (e.className = nf,
|
|
17535
|
+
return t === !0 ? e.className = tf : (e.className = nf, xr(t) ? e.appendChild(t) : ys(e, t)), e;
|
|
17457
17536
|
}
|
|
17458
17537
|
function Gl(t, e) {
|
|
17459
|
-
|
|
17538
|
+
xr(e.content) ? (ys(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? ys(t, e.content) : t.textContent = e.content);
|
|
17460
17539
|
}
|
|
17461
17540
|
function bs(t) {
|
|
17462
17541
|
var e = t.firstElementChild, n = No(e.children);
|
|
@@ -17469,13 +17548,13 @@ function bs(t) {
|
|
|
17469
17548
|
return r.classList.contains(tf) || r.classList.contains(nf);
|
|
17470
17549
|
}),
|
|
17471
17550
|
backdrop: n.find(function(r) {
|
|
17472
|
-
return r.classList.contains(
|
|
17551
|
+
return r.classList.contains(ik);
|
|
17473
17552
|
})
|
|
17474
17553
|
};
|
|
17475
17554
|
}
|
|
17476
17555
|
function uf(t) {
|
|
17477
17556
|
var e = lr(), n = lr();
|
|
17478
|
-
n.className =
|
|
17557
|
+
n.className = ok, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
17479
17558
|
var r = lr();
|
|
17480
17559
|
r.className = ef, r.setAttribute("data-state", "hidden"), Gl(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
|
|
17481
17560
|
function o(i, s) {
|
|
@@ -17488,9 +17567,9 @@ function uf(t) {
|
|
|
17488
17567
|
};
|
|
17489
17568
|
}
|
|
17490
17569
|
uf.$$tippy = !0;
|
|
17491
|
-
var
|
|
17492
|
-
function
|
|
17493
|
-
var n = Jl(t, Object.assign({}, Ie, cf(Wl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Hl(Br, n.interactiveDebounce), m, g =
|
|
17570
|
+
var Nk = 1, no = [], yi = [];
|
|
17571
|
+
function Ek(t, e) {
|
|
17572
|
+
var n = Jl(t, Object.assign({}, Ie, cf(Wl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Hl(Br, n.interactiveDebounce), m, g = Nk++, b = null, w = ck(n.plugins), C = {
|
|
17494
17573
|
// Is the instance currently enabled?
|
|
17495
17574
|
isEnabled: !0,
|
|
17496
17575
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -17528,29 +17607,29 @@ function Dk(t, e) {
|
|
|
17528
17607
|
k.setAttribute("data-tippy-root", ""), k.id = "tippy-" + y.id, y.popper = k, t._tippy = y, k._tippy = y;
|
|
17529
17608
|
var F = w.map(function(v) {
|
|
17530
17609
|
return v.fn(y);
|
|
17531
|
-
}),
|
|
17610
|
+
}), S = t.hasAttribute("aria-expanded");
|
|
17532
17611
|
return pn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && qn(), k.addEventListener("mouseenter", function() {
|
|
17533
17612
|
y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
|
|
17534
17613
|
}), k.addEventListener("mouseleave", function() {
|
|
17535
17614
|
y.props.interactive && y.props.trigger.indexOf("mouseenter") >= 0 && se().addEventListener("mousemove", h);
|
|
17536
17615
|
}), y;
|
|
17537
|
-
function
|
|
17616
|
+
function V() {
|
|
17538
17617
|
var v = y.props.touch;
|
|
17539
17618
|
return Array.isArray(v) ? v : [v, 0];
|
|
17540
17619
|
}
|
|
17541
17620
|
function z() {
|
|
17542
|
-
return
|
|
17621
|
+
return V()[0] === "hold";
|
|
17543
17622
|
}
|
|
17544
|
-
function
|
|
17623
|
+
function _() {
|
|
17545
17624
|
var v;
|
|
17546
17625
|
return !!((v = y.props.render) != null && v.$$tippy);
|
|
17547
17626
|
}
|
|
17548
|
-
function
|
|
17627
|
+
function H() {
|
|
17549
17628
|
return m || t;
|
|
17550
17629
|
}
|
|
17551
17630
|
function se() {
|
|
17552
|
-
var v =
|
|
17553
|
-
return v ?
|
|
17631
|
+
var v = H().parentNode;
|
|
17632
|
+
return v ? mk(v) : document;
|
|
17554
17633
|
}
|
|
17555
17634
|
function ce() {
|
|
17556
17635
|
return bs(k);
|
|
@@ -17572,7 +17651,7 @@ function Dk(t, e) {
|
|
|
17572
17651
|
function ve() {
|
|
17573
17652
|
var v = y.props.aria;
|
|
17574
17653
|
if (v.content) {
|
|
17575
|
-
var O = "aria-" + v.content, R = k.id, q =
|
|
17654
|
+
var O = "aria-" + v.content, R = k.id, q = xn(y.props.triggerTarget || t);
|
|
17576
17655
|
q.forEach(function(U) {
|
|
17577
17656
|
var Ce = U.getAttribute(O);
|
|
17578
17657
|
if (y.state.isVisible)
|
|
@@ -17585,10 +17664,10 @@ function Dk(t, e) {
|
|
|
17585
17664
|
}
|
|
17586
17665
|
}
|
|
17587
17666
|
function ke() {
|
|
17588
|
-
if (!(
|
|
17589
|
-
var v =
|
|
17667
|
+
if (!(S || !y.props.aria.expanded)) {
|
|
17668
|
+
var v = xn(y.props.triggerTarget || t);
|
|
17590
17669
|
v.forEach(function(O) {
|
|
17591
|
-
y.props.interactive ? O.setAttribute("aria-expanded", y.state.isVisible && O ===
|
|
17670
|
+
y.props.interactive ? O.setAttribute("aria-expanded", y.state.isVisible && O === H() ? "true" : "false") : O.removeAttribute("aria-expanded");
|
|
17592
17671
|
});
|
|
17593
17672
|
}
|
|
17594
17673
|
}
|
|
@@ -17601,7 +17680,7 @@ function Dk(t, e) {
|
|
|
17601
17680
|
if (!(tt.isTouch && (l || v.type === "mousedown"))) {
|
|
17602
17681
|
var O = v.composedPath && v.composedPath()[0] || v.target;
|
|
17603
17682
|
if (!(y.props.interactive && ql(k, O))) {
|
|
17604
|
-
if (
|
|
17683
|
+
if (xn(y.props.triggerTarget || t).some(function(R) {
|
|
17605
17684
|
return ql(R, O);
|
|
17606
17685
|
})) {
|
|
17607
17686
|
if (tt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
@@ -17628,7 +17707,7 @@ function Dk(t, e) {
|
|
|
17628
17707
|
var v = se();
|
|
17629
17708
|
v.removeEventListener("mousedown", Fe, !0), v.removeEventListener("touchend", Fe, Yt), v.removeEventListener("touchstart", qe, Yt), v.removeEventListener("touchmove", ct, Yt);
|
|
17630
17709
|
}
|
|
17631
|
-
function
|
|
17710
|
+
function St(v, O) {
|
|
17632
17711
|
fn(v, function() {
|
|
17633
17712
|
!y.state.isVisible && k.parentNode && k.parentNode.contains(k) && O();
|
|
17634
17713
|
});
|
|
@@ -17645,9 +17724,9 @@ function Dk(t, e) {
|
|
|
17645
17724
|
return O();
|
|
17646
17725
|
gi(R, "remove", u), gi(R, "add", q), u = q;
|
|
17647
17726
|
}
|
|
17648
|
-
function
|
|
17727
|
+
function xt(v, O, R) {
|
|
17649
17728
|
R === void 0 && (R = !1);
|
|
17650
|
-
var q =
|
|
17729
|
+
var q = xn(y.props.triggerTarget || t);
|
|
17651
17730
|
q.forEach(function(U) {
|
|
17652
17731
|
U.addEventListener(v, O, R), p.push({
|
|
17653
17732
|
node: U,
|
|
@@ -17658,21 +17737,21 @@ function Dk(t, e) {
|
|
|
17658
17737
|
});
|
|
17659
17738
|
}
|
|
17660
17739
|
function pn() {
|
|
17661
|
-
z() && (
|
|
17740
|
+
z() && (xt("touchstart", jn, {
|
|
17662
17741
|
passive: !0
|
|
17663
|
-
}),
|
|
17742
|
+
}), xt("touchend", zr, {
|
|
17664
17743
|
passive: !0
|
|
17665
|
-
})),
|
|
17744
|
+
})), lk(y.props.trigger).forEach(function(v) {
|
|
17666
17745
|
if (v !== "manual")
|
|
17667
|
-
switch (
|
|
17746
|
+
switch (xt(v, jn), v) {
|
|
17668
17747
|
case "mouseenter":
|
|
17669
|
-
|
|
17748
|
+
xt("mouseleave", zr);
|
|
17670
17749
|
break;
|
|
17671
17750
|
case "focus":
|
|
17672
|
-
|
|
17751
|
+
xt(kk ? "focusout" : "blur", Wn);
|
|
17673
17752
|
break;
|
|
17674
17753
|
case "focusin":
|
|
17675
|
-
|
|
17754
|
+
xt("focusout", Wn);
|
|
17676
17755
|
break;
|
|
17677
17756
|
}
|
|
17678
17757
|
});
|
|
@@ -17687,13 +17766,13 @@ function Dk(t, e) {
|
|
|
17687
17766
|
var O, R = !1;
|
|
17688
17767
|
if (!(!y.state.isEnabled || Un(v) || a)) {
|
|
17689
17768
|
var q = ((O = d) == null ? void 0 : O.type) === "focus";
|
|
17690
|
-
d = v, m = v.currentTarget, ke(), !y.state.isVisible &&
|
|
17769
|
+
d = v, m = v.currentTarget, ke(), !y.state.isVisible && fk(v) && no.forEach(function(U) {
|
|
17691
17770
|
return U(v);
|
|
17692
17771
|
}), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? R = !0 : qn(v), v.type === "click" && (s = !R), R && !q && Ut(v);
|
|
17693
17772
|
}
|
|
17694
17773
|
}
|
|
17695
17774
|
function Br(v) {
|
|
17696
|
-
var O = v.target, R =
|
|
17775
|
+
var O = v.target, R = H().contains(O) || k.contains(O);
|
|
17697
17776
|
if (!(v.type === "mousemove" && R)) {
|
|
17698
17777
|
var q = At().concat(k).map(function(U) {
|
|
17699
17778
|
var Ce, Be = U._tippy, hn = (Ce = Be.popperInstance) == null ? void 0 : Ce.state;
|
|
@@ -17703,7 +17782,7 @@ function Dk(t, e) {
|
|
|
17703
17782
|
props: n
|
|
17704
17783
|
} : null;
|
|
17705
17784
|
}).filter(Boolean);
|
|
17706
|
-
|
|
17785
|
+
gk(q, v) && (lt(), Ut(v));
|
|
17707
17786
|
}
|
|
17708
17787
|
}
|
|
17709
17788
|
function zr(v) {
|
|
@@ -17717,16 +17796,16 @@ function Dk(t, e) {
|
|
|
17717
17796
|
}
|
|
17718
17797
|
}
|
|
17719
17798
|
function Wn(v) {
|
|
17720
|
-
y.props.trigger.indexOf("focusin") < 0 && v.target !==
|
|
17799
|
+
y.props.trigger.indexOf("focusin") < 0 && v.target !== H() || y.props.interactive && v.relatedTarget && k.contains(v.relatedTarget) || Ut(v);
|
|
17721
17800
|
}
|
|
17722
17801
|
function Un(v) {
|
|
17723
17802
|
return tt.isTouch ? z() !== v.type.indexOf("touch") >= 0 : !1;
|
|
17724
17803
|
}
|
|
17725
17804
|
function _r() {
|
|
17726
17805
|
$r();
|
|
17727
|
-
var v = y.props, O = v.popperOptions, R = v.placement, q = v.offset, U = v.getReferenceClientRect, Ce = v.moveTransition, Be =
|
|
17806
|
+
var v = y.props, O = v.popperOptions, R = v.placement, q = v.offset, U = v.getReferenceClientRect, Ce = v.moveTransition, Be = _() ? bs(k).arrow : null, hn = U ? {
|
|
17728
17807
|
getBoundingClientRect: U,
|
|
17729
|
-
contextElement: U.contextElement ||
|
|
17808
|
+
contextElement: U.contextElement || H()
|
|
17730
17809
|
} : t, ea = {
|
|
17731
17810
|
name: "$$tippy",
|
|
17732
17811
|
enabled: !0,
|
|
@@ -17734,7 +17813,7 @@ function Dk(t, e) {
|
|
|
17734
17813
|
requires: ["computeStyles"],
|
|
17735
17814
|
fn: function(Ur) {
|
|
17736
17815
|
var mn = Ur.state;
|
|
17737
|
-
if (
|
|
17816
|
+
if (_()) {
|
|
17738
17817
|
var yf = ce(), Wo = yf.box;
|
|
17739
17818
|
["placement", "reference-hidden", "escaped"].forEach(function(qr) {
|
|
17740
17819
|
qr === "placement" ? Wo.setAttribute("data-placement", mn.placement) : mn.attributes.popper["data-popper-" + qr] ? Wo.setAttribute("data-" + qr, "") : Wo.removeAttribute("data-" + qr);
|
|
@@ -17767,13 +17846,13 @@ function Dk(t, e) {
|
|
|
17767
17846
|
adaptive: !Ce
|
|
17768
17847
|
}
|
|
17769
17848
|
}, ea];
|
|
17770
|
-
|
|
17849
|
+
_() && Be && qt.push({
|
|
17771
17850
|
name: "arrow",
|
|
17772
17851
|
options: {
|
|
17773
17852
|
element: Be,
|
|
17774
17853
|
padding: 3
|
|
17775
17854
|
}
|
|
17776
|
-
}), qt.push.apply(qt, O?.modifiers || []), y.popperInstance =
|
|
17855
|
+
}), qt.push.apply(qt, O?.modifiers || []), y.popperInstance = rk(hn, k, Object.assign({}, O, {
|
|
17777
17856
|
placement: R,
|
|
17778
17857
|
onFirstUpdate: f,
|
|
17779
17858
|
modifiers: qt
|
|
@@ -17783,7 +17862,7 @@ function Dk(t, e) {
|
|
|
17783
17862
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
17784
17863
|
}
|
|
17785
17864
|
function ut() {
|
|
17786
|
-
var v = y.props.appendTo, O, R =
|
|
17865
|
+
var v = y.props.appendTo, O, R = H();
|
|
17787
17866
|
y.props.interactive && v === rf || v === "parent" ? O = R.parentNode : O = of(v, [R]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, _r(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
17788
17867
|
|
|
17789
17868
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
@@ -17797,7 +17876,7 @@ function Dk(t, e) {
|
|
|
17797
17876
|
}
|
|
17798
17877
|
function qn(v) {
|
|
17799
17878
|
y.clearDelayTimeouts(), v && ne("onTrigger", [y, v]), Ee();
|
|
17800
|
-
var O = ae(!0), R =
|
|
17879
|
+
var O = ae(!0), R = V(), q = R[0], U = R[1];
|
|
17801
17880
|
tt.isTouch && q === "hold" && U && (O = U), O ? r = setTimeout(function() {
|
|
17802
17881
|
y.show();
|
|
17803
17882
|
}, O) : y.show();
|
|
@@ -17831,7 +17910,7 @@ function Dk(t, e) {
|
|
|
17831
17910
|
var O = y.props, R = Jl(t, Object.assign({}, O, Wl(v), {
|
|
17832
17911
|
ignoreAttributes: !0
|
|
17833
17912
|
}));
|
|
17834
|
-
y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Hl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ?
|
|
17913
|
+
y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Hl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? xn(O.triggerTarget).forEach(function(q) {
|
|
17835
17914
|
q.removeAttribute("aria-expanded");
|
|
17836
17915
|
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ee(), A && A(O, R), y.popperInstance && (_r(), At().forEach(function(q) {
|
|
17837
17916
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
@@ -17846,19 +17925,19 @@ function Dk(t, e) {
|
|
|
17846
17925
|
function ff() {
|
|
17847
17926
|
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("show"));
|
|
17848
17927
|
var v = y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = tt.isTouch && !y.props.touch, U = hi(y.props.duration, 0, Ie.duration);
|
|
17849
|
-
if (!(v || O || R || q) && !
|
|
17850
|
-
if (y.state.isVisible = !0,
|
|
17928
|
+
if (!(v || O || R || q) && !H().hasAttribute("disabled") && (ne("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
17929
|
+
if (y.state.isVisible = !0, _() && (k.style.visibility = "visible"), ee(), Ee(), y.state.isMounted || (k.style.transition = "none"), _()) {
|
|
17851
17930
|
var Ce = ce(), Be = Ce.box, hn = Ce.content;
|
|
17852
17931
|
mi([Be, hn], 0);
|
|
17853
17932
|
}
|
|
17854
17933
|
f = function() {
|
|
17855
17934
|
var qt;
|
|
17856
17935
|
if (!(!y.state.isVisible || c)) {
|
|
17857
|
-
if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition,
|
|
17936
|
+
if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, _() && y.props.animation) {
|
|
17858
17937
|
var jo = ce(), Ur = jo.box, mn = jo.content;
|
|
17859
17938
|
mi([Ur, mn], U), Ul([Ur, mn], "visible");
|
|
17860
17939
|
}
|
|
17861
|
-
ve(), ke(), jl(yi, y), (qt = y.popperInstance) == null || qt.forceUpdate(), ne("onMount", [y]), y.props.animation &&
|
|
17940
|
+
ve(), ke(), jl(yi, y), (qt = y.popperInstance) == null || qt.forceUpdate(), ne("onMount", [y]), y.props.animation && _() && dt(U, function() {
|
|
17862
17941
|
y.state.isShown = !0, ne("onShown", [y]);
|
|
17863
17942
|
});
|
|
17864
17943
|
}
|
|
@@ -17869,11 +17948,11 @@ function Dk(t, e) {
|
|
|
17869
17948
|
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hide"));
|
|
17870
17949
|
var v = !y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = hi(y.props.duration, 1, Ie.duration);
|
|
17871
17950
|
if (!(v || O || R) && (ne("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
17872
|
-
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1,
|
|
17951
|
+
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, _() && (k.style.visibility = "hidden"), lt(), Ke(), ee(!0), _()) {
|
|
17873
17952
|
var U = ce(), Ce = U.box, Be = U.content;
|
|
17874
17953
|
y.props.animation && (mi([Ce, Be], q), Ul([Ce, Be], "hidden"));
|
|
17875
17954
|
}
|
|
17876
|
-
ve(), ke(), y.props.animation ?
|
|
17955
|
+
ve(), ke(), y.props.animation ? _() && St(q, y.unmount) : y.unmount();
|
|
17877
17956
|
}
|
|
17878
17957
|
}
|
|
17879
17958
|
function hf(v) {
|
|
@@ -17893,12 +17972,12 @@ function Dk(t, e) {
|
|
|
17893
17972
|
function Lr(t, e) {
|
|
17894
17973
|
e === void 0 && (e = {});
|
|
17895
17974
|
var n = Ie.plugins.concat(e.plugins || []);
|
|
17896
|
-
ie.env.NODE_ENV !== "production" && (
|
|
17975
|
+
ie.env.NODE_ENV !== "production" && (Sk(t), df(e, n)), wk();
|
|
17897
17976
|
var r = Object.assign({}, e, {
|
|
17898
17977
|
plugins: n
|
|
17899
|
-
}), o =
|
|
17978
|
+
}), o = hk(t);
|
|
17900
17979
|
if (ie.env.NODE_ENV !== "production") {
|
|
17901
|
-
var i =
|
|
17980
|
+
var i = xr(r.content), s = o.length > 1;
|
|
17902
17981
|
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.", `
|
|
17903
17982
|
|
|
17904
17983
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
@@ -17907,13 +17986,13 @@ function Lr(t, e) {
|
|
|
17907
17986
|
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
17908
17987
|
}
|
|
17909
17988
|
var a = o.reduce(function(l, c) {
|
|
17910
|
-
var d = c &&
|
|
17989
|
+
var d = c && Ek(c, r);
|
|
17911
17990
|
return d && l.push(d), l;
|
|
17912
17991
|
}, []);
|
|
17913
|
-
return
|
|
17992
|
+
return xr(t) ? a[0] : a;
|
|
17914
17993
|
}
|
|
17915
17994
|
Lr.defaultProps = Ie;
|
|
17916
|
-
Lr.setDefaultProps =
|
|
17995
|
+
Lr.setDefaultProps = Ok;
|
|
17917
17996
|
Lr.currentInput = tt;
|
|
17918
17997
|
Object.assign({}, qu, {
|
|
17919
17998
|
effect: function(e) {
|
|
@@ -17935,12 +18014,12 @@ Object.assign({}, qu, {
|
|
|
17935
18014
|
Lr.setDefaultProps({
|
|
17936
18015
|
render: uf
|
|
17937
18016
|
});
|
|
17938
|
-
const
|
|
18017
|
+
const Pk = (t, e) => {
|
|
17939
18018
|
const n = t.__vccOpts || t;
|
|
17940
18019
|
for (const [r, o] of e)
|
|
17941
18020
|
n[r] = o;
|
|
17942
18021
|
return n;
|
|
17943
|
-
},
|
|
18022
|
+
}, Ik = ["onClick", "onMouseenter"], Rk = { key: 0 }, Lk = { key: 0 }, Fk = { key: 1 }, Bk = { key: 1 }, zk = {
|
|
17944
18023
|
__name: "Mentions",
|
|
17945
18024
|
props: {
|
|
17946
18025
|
users: {
|
|
@@ -17992,19 +18071,19 @@ const Nk = (t, e) => {
|
|
|
17992
18071
|
key: d.email,
|
|
17993
18072
|
class: _f(["user-row", { selected: r.value === u }])
|
|
17994
18073
|
}, [
|
|
17995
|
-
d.name ? (Xt(), Kt("div",
|
|
17996
|
-
d.name ? (Xt(), Kt("span",
|
|
17997
|
-
d.name && d.email ? (Xt(), Kt("span",
|
|
17998
|
-
])) : (Xt(), Kt("div",
|
|
18074
|
+
d.name ? (Xt(), Kt("div", Rk, [
|
|
18075
|
+
d.name ? (Xt(), Kt("span", Lk, Go(d.name), 1)) : sa("", !0),
|
|
18076
|
+
d.name && d.email ? (Xt(), Kt("span", Fk, " (" + Go(d.email) + ")", 1)) : sa("", !0)
|
|
18077
|
+
])) : (Xt(), Kt("div", Bk, [
|
|
17999
18078
|
$f("span", null, Go(d.email), 1)
|
|
18000
18079
|
]))
|
|
18001
|
-
], 42,
|
|
18080
|
+
], 42, Ik))), 128))
|
|
18002
18081
|
], 544));
|
|
18003
18082
|
}
|
|
18004
|
-
},
|
|
18083
|
+
}, _k = /* @__PURE__ */ Pk(zk, [["__scopeId", "data-v-0a2a8b4e"]]), Zl = new Y("popoverPlugin"), $k = Q.create({
|
|
18005
18084
|
name: "popoverPlugin",
|
|
18006
18085
|
addPmPlugins() {
|
|
18007
|
-
return [new
|
|
18086
|
+
return [new G({
|
|
18008
18087
|
key: Zl,
|
|
18009
18088
|
state: {
|
|
18010
18089
|
init: () => ({}),
|
|
@@ -18014,7 +18093,7 @@ const Nk = (t, e) => {
|
|
|
18014
18093
|
}
|
|
18015
18094
|
},
|
|
18016
18095
|
view: (e) => {
|
|
18017
|
-
const n = new
|
|
18096
|
+
const n = new Vk(e, this.editor);
|
|
18018
18097
|
return {
|
|
18019
18098
|
update: (r, o) => {
|
|
18020
18099
|
Zl.getState(r.state).shouldUpdate && n.update(r, o);
|
|
@@ -18027,7 +18106,7 @@ const Nk = (t, e) => {
|
|
|
18027
18106
|
})];
|
|
18028
18107
|
}
|
|
18029
18108
|
});
|
|
18030
|
-
class
|
|
18109
|
+
class Vk {
|
|
18031
18110
|
constructor(e, n) {
|
|
18032
18111
|
I(this, "handleKeyDown", (e) => {
|
|
18033
18112
|
const n = e.key === "ArrowDown" || e.key === "ArrowUp";
|
|
@@ -18064,7 +18143,7 @@ class _k {
|
|
|
18064
18143
|
if (this.isShowMentions) {
|
|
18065
18144
|
const { from: i } = this.state.selection, s = this.getMentionText(i);
|
|
18066
18145
|
o = {
|
|
18067
|
-
component:
|
|
18146
|
+
component: _k,
|
|
18068
18147
|
props: {
|
|
18069
18148
|
users: this.editor.users,
|
|
18070
18149
|
mention: s,
|
|
@@ -18106,7 +18185,7 @@ class _k {
|
|
|
18106
18185
|
this.tippyInstance.destroy(), this.popover.remove();
|
|
18107
18186
|
}
|
|
18108
18187
|
}
|
|
18109
|
-
const
|
|
18188
|
+
const Hk = !1, jk = Q.create({
|
|
18110
18189
|
name: "pagination",
|
|
18111
18190
|
addStorage() {
|
|
18112
18191
|
return {
|
|
@@ -18132,7 +18211,7 @@ const $k = !1, Vk = Q.create({
|
|
|
18132
18211
|
addPmPlugins() {
|
|
18133
18212
|
const t = this.editor;
|
|
18134
18213
|
let e = !1, n = !1, r = !1, o = !1;
|
|
18135
|
-
return [new
|
|
18214
|
+
return [new G({
|
|
18136
18215
|
key: on,
|
|
18137
18216
|
state: {
|
|
18138
18217
|
isReadyToInit: !1,
|
|
@@ -18140,7 +18219,7 @@ const $k = !1, Vk = Q.create({
|
|
|
18140
18219
|
return {
|
|
18141
18220
|
isReadyToInit: !1,
|
|
18142
18221
|
decorations: L.empty,
|
|
18143
|
-
isDebugging:
|
|
18222
|
+
isDebugging: Hk
|
|
18144
18223
|
};
|
|
18145
18224
|
},
|
|
18146
18225
|
apply(s, a, l, c) {
|
|
@@ -18175,7 +18254,7 @@ const $k = !1, Vk = Q.create({
|
|
|
18175
18254
|
let a = L.empty;
|
|
18176
18255
|
return {
|
|
18177
18256
|
update: (l) => {
|
|
18178
|
-
!n || e || (e = !0, r = !0,
|
|
18257
|
+
!n || e || (e = !0, r = !0, Wk(t, l, a), e = !1, n = !1);
|
|
18179
18258
|
}
|
|
18180
18259
|
};
|
|
18181
18260
|
},
|
|
@@ -18193,8 +18272,8 @@ const $k = !1, Vk = Q.create({
|
|
|
18193
18272
|
if (o?.titlePg && a && t === 1) return a;
|
|
18194
18273
|
let c = o.default;
|
|
18195
18274
|
return r && (t === 1 ? c = a : t % 2 === 0 ? c = i || l : c = s || l), c;
|
|
18196
|
-
},
|
|
18197
|
-
const r = t.storage.pagination.sectionData, o =
|
|
18275
|
+
}, Wk = (t, e, n) => {
|
|
18276
|
+
const r = t.storage.pagination.sectionData, o = Uk(e, t, r);
|
|
18198
18277
|
if (!n.eq(o)) {
|
|
18199
18278
|
const i = e.state.tr.setMeta(
|
|
18200
18279
|
on,
|
|
@@ -18203,7 +18282,7 @@ const $k = !1, Vk = Q.create({
|
|
|
18203
18282
|
e.dispatch(i);
|
|
18204
18283
|
}
|
|
18205
18284
|
t.emit("paginationUpdate");
|
|
18206
|
-
},
|
|
18285
|
+
}, Uk = (t, e, n) => {
|
|
18207
18286
|
if (!e.converter) return L.empty;
|
|
18208
18287
|
const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
|
|
18209
18288
|
if (!o || !i) return L.empty;
|
|
@@ -18222,57 +18301,60 @@ const $k = !1, Vk = Q.create({
|
|
|
18222
18301
|
}
|
|
18223
18302
|
});
|
|
18224
18303
|
e.initDefaultStyles(c);
|
|
18225
|
-
const p =
|
|
18304
|
+
const p = qk(l.doc, f, e, n);
|
|
18226
18305
|
return f.destroy(), document.body.removeChild(c), L.create(t.state.doc, p);
|
|
18227
18306
|
};
|
|
18228
|
-
function
|
|
18307
|
+
function qk(t, e, n, r) {
|
|
18229
18308
|
const o = [], { pageSize: i, pageMargins: s } = n.converter.pageStyles, a = i.height * 96;
|
|
18230
18309
|
n.options.scale;
|
|
18231
18310
|
let l = 1, c = a, d = null, u = null;
|
|
18232
18311
|
const f = kn(l, "headerIds", n), p = bi(s, i, r, f), h = vi({ editor: n, header: p, isFirstHeader: !0 });
|
|
18233
|
-
o.push(
|
|
18312
|
+
o.push($.widget(0, h, { key: "stable-key" }));
|
|
18234
18313
|
const m = kn(l, "footerIds", n), g = wi(s, i, r, m);
|
|
18235
18314
|
c -= p.headerHeight + g.footerHeight;
|
|
18236
18315
|
let b = e?.coordsAtPos(t.content.size);
|
|
18237
18316
|
if (!b) return [];
|
|
18238
|
-
t.descendants((
|
|
18239
|
-
let
|
|
18240
|
-
if (b = e?.coordsAtPos(
|
|
18317
|
+
t.descendants((V, z) => {
|
|
18318
|
+
let _ = V, H = z;
|
|
18319
|
+
if (b = e?.coordsAtPos(H), !b) return;
|
|
18241
18320
|
let se = b.bottom > c;
|
|
18242
|
-
const ce =
|
|
18243
|
-
if (
|
|
18244
|
-
const ee = ao.getState(n.state)?.styles?.find((ne) => ne.id ===
|
|
18321
|
+
const ce = _.type.name === "hardBreak";
|
|
18322
|
+
if (_.type.name === "paragraph" && _.attrs.styleId) {
|
|
18323
|
+
const ee = ao.getState(n.state)?.styles?.find((ne) => ne.id === _.attrs.styleId);
|
|
18245
18324
|
if (ee) {
|
|
18246
18325
|
const { definition: ne = {} } = ee, { pageBreakBefore: ve, pageBreakAfter: ke } = ne.attrs || {};
|
|
18247
18326
|
(ve || ke) && (se = !0);
|
|
18248
18327
|
}
|
|
18249
18328
|
}
|
|
18250
18329
|
if (ce || se) {
|
|
18251
|
-
const ae = e.state.doc.resolve(
|
|
18252
|
-
ee && (
|
|
18330
|
+
const ae = e.state.doc.resolve(H), ee = $o(ae, (St) => St.type.name === "tableRow");
|
|
18331
|
+
ee && (_ = ee.node, H = ee.pos);
|
|
18253
18332
|
const {
|
|
18254
18333
|
top: ne,
|
|
18255
18334
|
bottom: ve,
|
|
18256
18335
|
pos: ke
|
|
18257
|
-
} =
|
|
18336
|
+
} = Kk(e, H, c);
|
|
18258
18337
|
l++;
|
|
18259
18338
|
const lt = kn(l, "headerIds", n), Fe = kn(l, "footerIds", n);
|
|
18260
18339
|
u = bi(s, i, r, lt), d = wi(s, i, r, Fe, l - 1);
|
|
18261
|
-
const ct = c - ve, { node: qe } = Ql(ct), Ee =
|
|
18340
|
+
const ct = c - ve, { node: qe } = Ql(ct), Ee = $.widget(ke, qe, { key: "stable-key" });
|
|
18262
18341
|
o.push(Ee);
|
|
18263
18342
|
const Ke = vi({ editor: n, header: u, footer: d });
|
|
18264
|
-
o.push(
|
|
18343
|
+
o.push($.widget(ke, Ke, { key: "stable-key" })), c = ve + (a - u.headerHeight - d.footerHeight);
|
|
18265
18344
|
}
|
|
18266
18345
|
});
|
|
18267
18346
|
let w = t.content.size;
|
|
18268
18347
|
const C = e.coordsAtPos(w), y = kn(l, "headerIds", n), M = kn(l, "footerIds", n);
|
|
18269
18348
|
u = bi(s, i, r, y), d = wi(s, i, r, M, l);
|
|
18270
|
-
const k = c - C.bottom, { node: A } = Ql(k), F =
|
|
18349
|
+
const k = c - C.bottom, { node: A } = Ql(k), F = $.widget(t.content.size, A, { key: "stable-key" });
|
|
18271
18350
|
o.push(F);
|
|
18272
|
-
const
|
|
18273
|
-
return o.push(
|
|
18274
|
-
const
|
|
18275
|
-
|
|
18351
|
+
const S = vi({ editor: n, footer: d, isLastFooter: !0 });
|
|
18352
|
+
return o.push($.widget(t.content.size, S, { key: "stable-key" })), o.forEach((V) => {
|
|
18353
|
+
const _ = V.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
|
|
18354
|
+
if (_) {
|
|
18355
|
+
const H = _.previousElementSibling?.style?.fontSize || _.nextElementSibling?.style?.fontSize;
|
|
18356
|
+
H && (_.style.fontSize = H), _.innerText = l;
|
|
18357
|
+
}
|
|
18276
18358
|
}), o;
|
|
18277
18359
|
}
|
|
18278
18360
|
function Ql(t) {
|
|
@@ -18292,7 +18374,11 @@ function wi(t, e, n, r, o) {
|
|
|
18292
18374
|
let c = i?.sectionContainer?.cloneNode(!0);
|
|
18293
18375
|
c || (c = document.createElement("div"));
|
|
18294
18376
|
const d = c?.querySelector('span[data-id="auto-page-number"]');
|
|
18295
|
-
|
|
18377
|
+
if (d) {
|
|
18378
|
+
const u = d.previousElementSibling?.style?.fontSize || d.nextElementSibling?.style?.fontSize;
|
|
18379
|
+
u && (d.style.fontSize = u), d.innerText = o;
|
|
18380
|
+
}
|
|
18381
|
+
return c.className = "pagination-section-footer", c.style.height = l + "px", c.style.marginBottom = a + "px", c.style.paddingLeft = t.left * 96 + "px", c.style.paddingRight = t.right * 96 + "px", c.style.width = e.width * 96 + "px", {
|
|
18296
18382
|
section: c,
|
|
18297
18383
|
footerHeight: l + a
|
|
18298
18384
|
};
|
|
@@ -18310,7 +18396,7 @@ function vi({ editor: t, header: e, footer: n, footerBottom: r = null, isFirstHe
|
|
|
18310
18396
|
}
|
|
18311
18397
|
return e && (d.appendChild(e.section), l += e.headerHeight), c.style.height = l + "px", c.style.minHeight = l + "px", c.style.maxHeight = l + "px", d.style.height = l + "px", c.style.width = "100px", c.style.marginLeft = a.left * -96 + "px", r !== null && (c.style.position = "absolute", c.style.bottom = r + "px"), c;
|
|
18312
18398
|
}
|
|
18313
|
-
function
|
|
18399
|
+
function Kk(t, e, n) {
|
|
18314
18400
|
let r = e - 1;
|
|
18315
18401
|
const o = { top: 0, bottom: 0, pos: 0 };
|
|
18316
18402
|
for (; r > 0; ) {
|
|
@@ -18328,7 +18414,7 @@ const ec = (t) => {
|
|
|
18328
18414
|
const e = t.view.state.tr;
|
|
18329
18415
|
e.setMeta("forceUpdatePagination", !0), t.view.dispatch(e);
|
|
18330
18416
|
});
|
|
18331
|
-
},
|
|
18417
|
+
}, Xk = () => [
|
|
18332
18418
|
Lu,
|
|
18333
18419
|
ou,
|
|
18334
18420
|
Kd,
|
|
@@ -18350,15 +18436,15 @@ const ec = (t) => {
|
|
|
18350
18436
|
Gd,
|
|
18351
18437
|
Ru,
|
|
18352
18438
|
Bu,
|
|
18353
|
-
|
|
18354
|
-
|
|
18439
|
+
Zw,
|
|
18440
|
+
$k,
|
|
18355
18441
|
Iu,
|
|
18356
18442
|
zu,
|
|
18357
18443
|
Qd,
|
|
18358
|
-
|
|
18444
|
+
Su,
|
|
18359
18445
|
Au,
|
|
18360
18446
|
Ou,
|
|
18361
|
-
|
|
18447
|
+
xu,
|
|
18362
18448
|
Eu,
|
|
18363
18449
|
eu,
|
|
18364
18450
|
Vu,
|
|
@@ -18366,7 +18452,7 @@ const ec = (t) => {
|
|
|
18366
18452
|
ju,
|
|
18367
18453
|
tu,
|
|
18368
18454
|
Pu
|
|
18369
|
-
],
|
|
18455
|
+
], Jk = () => [
|
|
18370
18456
|
Lu,
|
|
18371
18457
|
ou,
|
|
18372
18458
|
Kd,
|
|
@@ -18396,11 +18482,11 @@ const ec = (t) => {
|
|
|
18396
18482
|
Bu,
|
|
18397
18483
|
Qd,
|
|
18398
18484
|
sb,
|
|
18399
|
-
|
|
18400
|
-
|
|
18485
|
+
xb,
|
|
18486
|
+
Su,
|
|
18401
18487
|
Au,
|
|
18402
18488
|
Ou,
|
|
18403
|
-
|
|
18489
|
+
xu,
|
|
18404
18490
|
Eu,
|
|
18405
18491
|
eu,
|
|
18406
18492
|
Pu,
|
|
@@ -18408,44 +18494,46 @@ const ec = (t) => {
|
|
|
18408
18494
|
Iu,
|
|
18409
18495
|
Ob,
|
|
18410
18496
|
Pb,
|
|
18411
|
-
|
|
18497
|
+
Gw,
|
|
18412
18498
|
Vu,
|
|
18413
18499
|
Hu,
|
|
18414
18500
|
ju,
|
|
18415
18501
|
h0,
|
|
18416
|
-
|
|
18502
|
+
jk,
|
|
18417
18503
|
zu,
|
|
18418
18504
|
r0,
|
|
18419
18505
|
tu,
|
|
18420
18506
|
Rb,
|
|
18421
18507
|
Lb,
|
|
18422
18508
|
jw,
|
|
18423
|
-
Ww
|
|
18509
|
+
Ww,
|
|
18510
|
+
Uw,
|
|
18511
|
+
qw
|
|
18424
18512
|
];
|
|
18425
18513
|
export {
|
|
18426
|
-
|
|
18514
|
+
D as A,
|
|
18427
18515
|
he as C,
|
|
18428
18516
|
qi as E,
|
|
18429
18517
|
To as I,
|
|
18430
18518
|
Oe as M,
|
|
18431
|
-
|
|
18432
|
-
|
|
18519
|
+
X as N,
|
|
18520
|
+
Zw as P,
|
|
18433
18521
|
de as T,
|
|
18434
|
-
|
|
18435
|
-
|
|
18522
|
+
Pk as _,
|
|
18523
|
+
oC as a,
|
|
18436
18524
|
i0 as b,
|
|
18437
18525
|
He as c,
|
|
18438
18526
|
Hf as d,
|
|
18439
|
-
|
|
18440
|
-
|
|
18527
|
+
Jk as e,
|
|
18528
|
+
aC as f,
|
|
18441
18529
|
ei as g,
|
|
18442
|
-
|
|
18530
|
+
Xk as h,
|
|
18443
18531
|
Td as i,
|
|
18444
18532
|
Q as j,
|
|
18445
18533
|
Dd as k,
|
|
18446
|
-
|
|
18447
|
-
|
|
18534
|
+
sC as l,
|
|
18535
|
+
lC as m,
|
|
18448
18536
|
Io as n,
|
|
18449
|
-
|
|
18450
|
-
|
|
18537
|
+
nC as r,
|
|
18538
|
+
tC as u
|
|
18451
18539
|
};
|