mhz-ui 1.3.19 → 1.3.21
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/UiEditor/UiEditor.js +524 -499
- package/dist/UiInput/UiInput.js +49 -49
- package/dist/UiModal/UiModal.js +29 -29
- package/package.json +18 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiEditor.css";
|
|
2
|
-
import { defineComponent as hn, shallowRef as Lc, onMounted as Bc, onBeforeUnmount as
|
|
2
|
+
import { defineComponent as hn, shallowRef as Lc, onMounted as Bc, onBeforeUnmount as Ws, h as Tr, ref as zc, getCurrentInstance as $c, watchEffect as Fc, nextTick as Vc, unref as ps, markRaw as Hc, customRef as _c, computed as jc, watch as Wc, createElementBlock as Ii, openBlock as Di, normalizeClass as kn, createElementVNode as Ri, createVNode as Kc, Fragment as Uc, renderList as qc, toDisplayString as Jc } from "vue";
|
|
3
3
|
import { _ as Gc } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
function Y(n) {
|
|
5
5
|
this.content = n;
|
|
@@ -403,11 +403,11 @@ class k {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
k.empty = new k([], 0);
|
|
406
|
-
const
|
|
406
|
+
const Hr = { index: 0, offset: 0 };
|
|
407
407
|
function bn(n, e) {
|
|
408
|
-
return
|
|
408
|
+
return Hr.index = n, Hr.offset = e, Hr;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Bn(n, e) {
|
|
411
411
|
if (n === e)
|
|
412
412
|
return !0;
|
|
413
413
|
if (!(n && typeof n == "object") || !(e && typeof e == "object"))
|
|
@@ -419,11 +419,11 @@ function Ln(n, e) {
|
|
|
419
419
|
if (n.length != e.length)
|
|
420
420
|
return !1;
|
|
421
421
|
for (let r = 0; r < n.length; r++)
|
|
422
|
-
if (!
|
|
422
|
+
if (!Bn(n[r], e[r]))
|
|
423
423
|
return !1;
|
|
424
424
|
} else {
|
|
425
425
|
for (let r in n)
|
|
426
|
-
if (!(r in e) || !
|
|
426
|
+
if (!(r in e) || !Bn(n[r], e[r]))
|
|
427
427
|
return !1;
|
|
428
428
|
for (let r in e)
|
|
429
429
|
if (!(r in n))
|
|
@@ -431,7 +431,7 @@ function Ln(n, e) {
|
|
|
431
431
|
}
|
|
432
432
|
return !0;
|
|
433
433
|
}
|
|
434
|
-
let L = class
|
|
434
|
+
let L = class ms {
|
|
435
435
|
/**
|
|
436
436
|
@internal
|
|
437
437
|
*/
|
|
@@ -485,7 +485,7 @@ let L = class ps {
|
|
|
485
485
|
another mark.
|
|
486
486
|
*/
|
|
487
487
|
eq(e) {
|
|
488
|
-
return this == e || this.type == e.type &&
|
|
488
|
+
return this == e || this.type == e.type && Bn(this.attrs, e.attrs);
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
491
491
|
Convert this mark to a JSON-serializeable representation.
|
|
@@ -529,15 +529,15 @@ let L = class ps {
|
|
|
529
529
|
*/
|
|
530
530
|
static setFrom(e) {
|
|
531
531
|
if (!e || Array.isArray(e) && e.length == 0)
|
|
532
|
-
return
|
|
533
|
-
if (e instanceof
|
|
532
|
+
return ms.none;
|
|
533
|
+
if (e instanceof ms)
|
|
534
534
|
return [e];
|
|
535
535
|
let t = e.slice();
|
|
536
536
|
return t.sort((r, s) => r.type.rank - s.type.rank), t;
|
|
537
537
|
}
|
|
538
538
|
};
|
|
539
539
|
L.none = [];
|
|
540
|
-
class
|
|
540
|
+
class zn extends Error {
|
|
541
541
|
}
|
|
542
542
|
class S {
|
|
543
543
|
/**
|
|
@@ -640,9 +640,9 @@ function ll(n, e, t, r) {
|
|
|
640
640
|
}
|
|
641
641
|
function Yc(n, e, t) {
|
|
642
642
|
if (t.openStart > n.depth)
|
|
643
|
-
throw new
|
|
643
|
+
throw new zn("Inserted content deeper than insertion position");
|
|
644
644
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
645
|
-
throw new
|
|
645
|
+
throw new zn("Inconsistent open depths");
|
|
646
646
|
return al(n, e, t, 0);
|
|
647
647
|
}
|
|
648
648
|
function al(n, e, t, r) {
|
|
@@ -658,13 +658,13 @@ function al(n, e, t, r) {
|
|
|
658
658
|
let { start: o, end: l } = Xc(t, n);
|
|
659
659
|
return at(i, ul(n, o, l, e, r));
|
|
660
660
|
}
|
|
661
|
-
else return at(i,
|
|
661
|
+
else return at(i, $n(n, e, r));
|
|
662
662
|
}
|
|
663
663
|
function cl(n, e) {
|
|
664
664
|
if (!e.type.compatibleContent(n.type))
|
|
665
|
-
throw new
|
|
665
|
+
throw new zn("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function gs(n, e, t) {
|
|
668
668
|
let r = n.node(t);
|
|
669
669
|
return cl(r, e.node(t)), r;
|
|
670
670
|
}
|
|
@@ -683,14 +683,14 @@ function at(n, e) {
|
|
|
683
683
|
return n.type.checkContent(e), n.copy(e);
|
|
684
684
|
}
|
|
685
685
|
function ul(n, e, t, r, s) {
|
|
686
|
-
let i = n.depth > s &&
|
|
687
|
-
return Ut(null, n, s, l), i && o && e.index(s) == t.index(s) ? (cl(i, o), lt(at(i, ul(n, e, t, r, s + 1)), l)) : (i && lt(at(i,
|
|
686
|
+
let i = n.depth > s && gs(n, e, s + 1), o = r.depth > s && gs(t, r, s + 1), l = [];
|
|
687
|
+
return Ut(null, n, s, l), i && o && e.index(s) == t.index(s) ? (cl(i, o), lt(at(i, ul(n, e, t, r, s + 1)), l)) : (i && lt(at(i, $n(n, e, s + 1)), l), Ut(e, t, s, l), o && lt(at(o, $n(t, r, s + 1)), l)), Ut(r, null, s, l), new k(l);
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function $n(n, e, t) {
|
|
690
690
|
let r = [];
|
|
691
691
|
if (Ut(null, n, t, r), n.depth > t) {
|
|
692
|
-
let s =
|
|
693
|
-
lt(at(s,
|
|
692
|
+
let s = gs(n, e, t + 1);
|
|
693
|
+
lt(at(s, $n(n, e, t + 1)), r);
|
|
694
694
|
}
|
|
695
695
|
return Ut(e, null, t, r), new k(r);
|
|
696
696
|
}
|
|
@@ -888,7 +888,7 @@ class nn {
|
|
|
888
888
|
return e.blockRange(this);
|
|
889
889
|
for (let r = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); r >= 0; r--)
|
|
890
890
|
if (e.pos <= this.end(r) && (!t || t(this.node(r))))
|
|
891
|
-
return new
|
|
891
|
+
return new Fn(this, e, r);
|
|
892
892
|
return null;
|
|
893
893
|
}
|
|
894
894
|
/**
|
|
@@ -956,7 +956,7 @@ class Qc {
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
const Zc = 12, Pi = /* @__PURE__ */ new WeakMap();
|
|
959
|
-
class
|
|
959
|
+
class Fn {
|
|
960
960
|
/**
|
|
961
961
|
Construct a node range. `$from` and `$to` should point into the
|
|
962
962
|
same node until at least the given `depth`, since a node range
|
|
@@ -1115,7 +1115,7 @@ class Se {
|
|
|
1115
1115
|
attributes, and marks.
|
|
1116
1116
|
*/
|
|
1117
1117
|
hasMarkup(e, t, r) {
|
|
1118
|
-
return this.type == e &&
|
|
1118
|
+
return this.type == e && Bn(this.attrs, t || e.defaultAttrs || eu) && L.sameSet(this.marks, r || L.none);
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
1121
|
Create a new node with the same markup as this node, containing
|
|
@@ -1367,7 +1367,7 @@ class Se {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
Se.prototype.text = void 0;
|
|
1370
|
-
class
|
|
1370
|
+
class Vn extends Se {
|
|
1371
1371
|
/**
|
|
1372
1372
|
@internal
|
|
1373
1373
|
*/
|
|
@@ -1389,10 +1389,10 @@ class Fn extends Se {
|
|
|
1389
1389
|
return this.text.length;
|
|
1390
1390
|
}
|
|
1391
1391
|
mark(e) {
|
|
1392
|
-
return e == this.marks ? this : new
|
|
1392
|
+
return e == this.marks ? this : new Vn(this.type, this.attrs, this.text, e);
|
|
1393
1393
|
}
|
|
1394
1394
|
withText(e) {
|
|
1395
|
-
return e == this.text ? this : new
|
|
1395
|
+
return e == this.text ? this : new Vn(this.type, this.attrs, e, this.marks);
|
|
1396
1396
|
}
|
|
1397
1397
|
cut(e = 0, t = this.text.length) {
|
|
1398
1398
|
return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
|
|
@@ -1989,7 +1989,7 @@ class du {
|
|
|
1989
1989
|
return !this.hasDefault;
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
class
|
|
1992
|
+
class vr {
|
|
1993
1993
|
/**
|
|
1994
1994
|
@internal
|
|
1995
1995
|
*/
|
|
@@ -2011,7 +2011,7 @@ class Mr {
|
|
|
2011
2011
|
*/
|
|
2012
2012
|
static compile(e, t) {
|
|
2013
2013
|
let r = /* @__PURE__ */ Object.create(null), s = 0;
|
|
2014
|
-
return e.forEach((i, o) => r[i] = new
|
|
2014
|
+
return e.forEach((i, o) => r[i] = new vr(i, s++, t, o)), r;
|
|
2015
2015
|
}
|
|
2016
2016
|
/**
|
|
2017
2017
|
When there is a mark of this type in the given set, a new set
|
|
@@ -2053,7 +2053,7 @@ class bl {
|
|
|
2053
2053
|
let t = this.spec = {};
|
|
2054
2054
|
for (let s in e)
|
|
2055
2055
|
t[s] = e[s];
|
|
2056
|
-
t.nodes = Y.from(e.nodes), t.marks = Y.from(e.marks || {}), this.nodes = zi.compile(this.spec.nodes, this), this.marks =
|
|
2056
|
+
t.nodes = Y.from(e.nodes), t.marks = Y.from(e.marks || {}), this.nodes = zi.compile(this.spec.nodes, this), this.marks = vr.compile(this.spec.marks, this);
|
|
2057
2057
|
let r = /* @__PURE__ */ Object.create(null);
|
|
2058
2058
|
for (let s in this.nodes) {
|
|
2059
2059
|
if (s in this.marks)
|
|
@@ -2095,7 +2095,7 @@ class bl {
|
|
|
2095
2095
|
*/
|
|
2096
2096
|
text(e, t) {
|
|
2097
2097
|
let r = this.nodes.text;
|
|
2098
|
-
return new
|
|
2098
|
+
return new Vn(r, r.defaultAttrs, e, L.setFrom(t));
|
|
2099
2099
|
}
|
|
2100
2100
|
/**
|
|
2101
2101
|
Create a mark with the given type and attributes.
|
|
@@ -2290,9 +2290,9 @@ const xl = {
|
|
|
2290
2290
|
script: !0,
|
|
2291
2291
|
style: !0,
|
|
2292
2292
|
title: !0
|
|
2293
|
-
}, Sl = { ol: !0, ul: !0 }, rn = 1,
|
|
2293
|
+
}, Sl = { ol: !0, ul: !0 }, rn = 1, ys = 2, qt = 4;
|
|
2294
2294
|
function Fi(n, e, t) {
|
|
2295
|
-
return e != null ? (e ? rn : 0) | (e === "full" ?
|
|
2295
|
+
return e != null ? (e ? rn : 0) | (e === "full" ? ys : 0) : n && n.whitespace == "pre" ? rn | ys : t & ~qt;
|
|
2296
2296
|
}
|
|
2297
2297
|
class xn {
|
|
2298
2298
|
constructor(e, t, r, s, i, o) {
|
|
@@ -2343,7 +2343,7 @@ class Vi {
|
|
|
2343
2343
|
e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
|
|
2344
2344
|
}
|
|
2345
2345
|
addTextNode(e, t) {
|
|
2346
|
-
let r = e.nodeValue, s = this.top, i = s.options &
|
|
2346
|
+
let r = e.nodeValue, s = this.top, i = s.options & ys ? "full" : this.localPreserveWS || (s.options & rn) > 0, { schema: o } = this.parser;
|
|
2347
2347
|
if (i === "full" || s.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
|
|
2348
2348
|
if (i)
|
|
2349
2349
|
if (i === "full")
|
|
@@ -2662,7 +2662,7 @@ class yt {
|
|
|
2662
2662
|
nodes.
|
|
2663
2663
|
*/
|
|
2664
2664
|
serializeFragment(e, t = {}, r) {
|
|
2665
|
-
r || (r =
|
|
2665
|
+
r || (r = _r(t).createDocumentFragment());
|
|
2666
2666
|
let s = r, i = [];
|
|
2667
2667
|
return e.forEach((o) => {
|
|
2668
2668
|
if (i.length || o.marks.length) {
|
|
@@ -2691,7 +2691,7 @@ class yt {
|
|
|
2691
2691
|
@internal
|
|
2692
2692
|
*/
|
|
2693
2693
|
serializeNodeInner(e, t) {
|
|
2694
|
-
let { dom: r, contentDOM: s } =
|
|
2694
|
+
let { dom: r, contentDOM: s } = In(_r(t), this.nodes[e.type.name](e), null, e.attrs);
|
|
2695
2695
|
if (s) {
|
|
2696
2696
|
if (e.isLeaf)
|
|
2697
2697
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -2719,10 +2719,10 @@ class yt {
|
|
|
2719
2719
|
*/
|
|
2720
2720
|
serializeMark(e, t, r = {}) {
|
|
2721
2721
|
let s = this.marks[e.type.name];
|
|
2722
|
-
return s &&
|
|
2722
|
+
return s && In(_r(r), s(e, t), null, e.attrs);
|
|
2723
2723
|
}
|
|
2724
2724
|
static renderSpec(e, t, r = null, s) {
|
|
2725
|
-
return
|
|
2725
|
+
return In(e, t, r, s);
|
|
2726
2726
|
}
|
|
2727
2727
|
/**
|
|
2728
2728
|
Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
|
|
@@ -2754,7 +2754,7 @@ function ji(n) {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
return e;
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function _r(n) {
|
|
2758
2758
|
return n.document || window.document;
|
|
2759
2759
|
}
|
|
2760
2760
|
const Wi = /* @__PURE__ */ new WeakMap();
|
|
@@ -2778,7 +2778,7 @@ function ku(n) {
|
|
|
2778
2778
|
}
|
|
2779
2779
|
return t(n), e;
|
|
2780
2780
|
}
|
|
2781
|
-
function
|
|
2781
|
+
function In(n, e, t, r) {
|
|
2782
2782
|
if (typeof e == "string")
|
|
2783
2783
|
return { dom: n.createTextNode(e) };
|
|
2784
2784
|
if (e.nodeType != null)
|
|
@@ -2808,7 +2808,7 @@ function On(n, e, t, r) {
|
|
|
2808
2808
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
2809
2809
|
return { dom: a, contentDOM: a };
|
|
2810
2810
|
} else {
|
|
2811
|
-
let { dom: h, contentDOM: p } =
|
|
2811
|
+
let { dom: h, contentDOM: p } = In(n, f, t, r);
|
|
2812
2812
|
if (a.appendChild(h), p) {
|
|
2813
2813
|
if (l)
|
|
2814
2814
|
throw new RangeError("Multiple content holes");
|
|
@@ -2828,8 +2828,8 @@ function Ki(n) {
|
|
|
2828
2828
|
function xu(n) {
|
|
2829
2829
|
return (n - (n & wl)) / Cl;
|
|
2830
2830
|
}
|
|
2831
|
-
const Ml = 1, Tl = 2,
|
|
2832
|
-
class
|
|
2831
|
+
const Ml = 1, Tl = 2, Dn = 4, vl = 8;
|
|
2832
|
+
class ks {
|
|
2833
2833
|
/**
|
|
2834
2834
|
@internal
|
|
2835
2835
|
*/
|
|
@@ -2848,13 +2848,13 @@ class ys {
|
|
|
2848
2848
|
Tells you whether the token before the mapped position was deleted.
|
|
2849
2849
|
*/
|
|
2850
2850
|
get deletedBefore() {
|
|
2851
|
-
return (this.delInfo & (Ml |
|
|
2851
|
+
return (this.delInfo & (Ml | Dn)) > 0;
|
|
2852
2852
|
}
|
|
2853
2853
|
/**
|
|
2854
2854
|
True when the token after the mapped position was deleted.
|
|
2855
2855
|
*/
|
|
2856
2856
|
get deletedAfter() {
|
|
2857
|
-
return (this.delInfo & (Tl |
|
|
2857
|
+
return (this.delInfo & (Tl | Dn)) > 0;
|
|
2858
2858
|
}
|
|
2859
2859
|
/**
|
|
2860
2860
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -2862,7 +2862,7 @@ class ys {
|
|
|
2862
2862
|
position).
|
|
2863
2863
|
*/
|
|
2864
2864
|
get deletedAcross() {
|
|
2865
|
-
return (this.delInfo &
|
|
2865
|
+
return (this.delInfo & Dn) > 0;
|
|
2866
2866
|
}
|
|
2867
2867
|
}
|
|
2868
2868
|
class ce {
|
|
@@ -2905,12 +2905,12 @@ class ce {
|
|
|
2905
2905
|
let f = c ? e == a ? -1 : e == d ? 1 : t : t, h = a + s + (f < 0 ? 0 : u);
|
|
2906
2906
|
if (r)
|
|
2907
2907
|
return h;
|
|
2908
|
-
let p = e == (t < 0 ? a : d) ? null : bu(l / 3, e - a), m = e == a ? Tl : e == d ? Ml :
|
|
2909
|
-
return (t < 0 ? e != a : e != d) && (m |= vl), new
|
|
2908
|
+
let p = e == (t < 0 ? a : d) ? null : bu(l / 3, e - a), m = e == a ? Tl : e == d ? Ml : Dn;
|
|
2909
|
+
return (t < 0 ? e != a : e != d) && (m |= vl), new ks(h, m, p);
|
|
2910
2910
|
}
|
|
2911
2911
|
s += u - c;
|
|
2912
2912
|
}
|
|
2913
|
-
return r ? e + s : new
|
|
2913
|
+
return r ? e + s : new ks(e + s, 0, null);
|
|
2914
2914
|
}
|
|
2915
2915
|
/**
|
|
2916
2916
|
@internal
|
|
@@ -3066,10 +3066,10 @@ class sn {
|
|
|
3066
3066
|
}
|
|
3067
3067
|
s |= l.delInfo, e = l.pos;
|
|
3068
3068
|
}
|
|
3069
|
-
return r ? e : new
|
|
3069
|
+
return r ? e : new ks(e, s, null);
|
|
3070
3070
|
}
|
|
3071
3071
|
}
|
|
3072
|
-
const
|
|
3072
|
+
const jr = /* @__PURE__ */ Object.create(null);
|
|
3073
3073
|
class te {
|
|
3074
3074
|
/**
|
|
3075
3075
|
Get the step map that represents the changes made by this step,
|
|
@@ -3094,7 +3094,7 @@ class te {
|
|
|
3094
3094
|
static fromJSON(e, t) {
|
|
3095
3095
|
if (!t || !t.stepType)
|
|
3096
3096
|
throw new RangeError("Invalid input for Step.fromJSON");
|
|
3097
|
-
let r =
|
|
3097
|
+
let r = jr[t.stepType];
|
|
3098
3098
|
if (!r)
|
|
3099
3099
|
throw new RangeError(`No step type ${t.stepType} defined`);
|
|
3100
3100
|
return r.fromJSON(e, t);
|
|
@@ -3106,9 +3106,9 @@ class te {
|
|
|
3106
3106
|
that's unlikely to clash with steps from other modules.
|
|
3107
3107
|
*/
|
|
3108
3108
|
static jsonID(e, t) {
|
|
3109
|
-
if (e in
|
|
3109
|
+
if (e in jr)
|
|
3110
3110
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
3111
|
-
return
|
|
3111
|
+
return jr[e] = t, t.prototype.jsonID = e, t;
|
|
3112
3112
|
}
|
|
3113
3113
|
}
|
|
3114
3114
|
class _ {
|
|
@@ -3139,17 +3139,17 @@ class _ {
|
|
|
3139
3139
|
try {
|
|
3140
3140
|
return _.ok(e.replace(t, r, s));
|
|
3141
3141
|
} catch (i) {
|
|
3142
|
-
if (i instanceof
|
|
3142
|
+
if (i instanceof zn)
|
|
3143
3143
|
return _.fail(i.message);
|
|
3144
3144
|
throw i;
|
|
3145
3145
|
}
|
|
3146
3146
|
}
|
|
3147
3147
|
}
|
|
3148
|
-
function
|
|
3148
|
+
function Ks(n, e, t) {
|
|
3149
3149
|
let r = [];
|
|
3150
3150
|
for (let s = 0; s < n.childCount; s++) {
|
|
3151
3151
|
let i = n.child(s);
|
|
3152
|
-
i.content.size && (i = i.copy(
|
|
3152
|
+
i.content.size && (i = i.copy(Ks(i.content, e, i))), i.isInline && (i = e(i, t, s)), r.push(i);
|
|
3153
3153
|
}
|
|
3154
3154
|
return k.fromArray(r);
|
|
3155
3155
|
}
|
|
@@ -3161,7 +3161,7 @@ class We extends te {
|
|
|
3161
3161
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
3162
3162
|
}
|
|
3163
3163
|
apply(e) {
|
|
3164
|
-
let t = e.slice(this.from, this.to), r = e.resolve(this.from), s = r.node(r.sharedDepth(this.to)), i = new S(
|
|
3164
|
+
let t = e.slice(this.from, this.to), r = e.resolve(this.from), s = r.node(r.sharedDepth(this.to)), i = new S(Ks(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), s), t.openStart, t.openEnd);
|
|
3165
3165
|
return _.fromReplace(e, this.from, this.to, i);
|
|
3166
3166
|
}
|
|
3167
3167
|
invert() {
|
|
@@ -3200,7 +3200,7 @@ class xe extends te {
|
|
|
3200
3200
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
3201
3201
|
}
|
|
3202
3202
|
apply(e) {
|
|
3203
|
-
let t = e.slice(this.from, this.to), r = new S(
|
|
3203
|
+
let t = e.slice(this.from, this.to), r = new S(Ks(t.content, (s) => s.mark(this.mark.removeFromSet(s.marks)), e), t.openStart, t.openEnd);
|
|
3204
3204
|
return _.fromReplace(e, this.from, this.to, r);
|
|
3205
3205
|
}
|
|
3206
3206
|
invert() {
|
|
@@ -3324,7 +3324,7 @@ class U extends te {
|
|
|
3324
3324
|
super(), this.from = e, this.to = t, this.slice = r, this.structure = s;
|
|
3325
3325
|
}
|
|
3326
3326
|
apply(e) {
|
|
3327
|
-
return this.structure &&
|
|
3327
|
+
return this.structure && bs(e, this.from, this.to) ? _.fail("Structure replace would overwrite content") : _.fromReplace(e, this.from, this.to, this.slice);
|
|
3328
3328
|
}
|
|
3329
3329
|
getMap() {
|
|
3330
3330
|
return new ce([this.from, this.to - this.from, this.slice.size]);
|
|
@@ -3373,7 +3373,7 @@ class J extends te {
|
|
|
3373
3373
|
super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = s, this.slice = i, this.insert = o, this.structure = l;
|
|
3374
3374
|
}
|
|
3375
3375
|
apply(e) {
|
|
3376
|
-
if (this.structure && (
|
|
3376
|
+
if (this.structure && (bs(e, this.from, this.gapFrom) || bs(e, this.gapTo, this.to)))
|
|
3377
3377
|
return _.fail("Structure gap-replace would overwrite content");
|
|
3378
3378
|
let t = e.slice(this.gapFrom, this.gapTo);
|
|
3379
3379
|
if (t.openStart || t.openEnd)
|
|
@@ -3420,7 +3420,7 @@ class J extends te {
|
|
|
3420
3420
|
}
|
|
3421
3421
|
}
|
|
3422
3422
|
te.jsonID("replaceAround", J);
|
|
3423
|
-
function
|
|
3423
|
+
function bs(n, e, t) {
|
|
3424
3424
|
let r = n.resolve(e), s = t - e, i = r.depth;
|
|
3425
3425
|
for (; s > 0 && i > 0 && r.indexAfter(i) == r.node(i).childCount; )
|
|
3426
3426
|
i--, s--;
|
|
@@ -3455,7 +3455,7 @@ function wu(n, e, t, r) {
|
|
|
3455
3455
|
return;
|
|
3456
3456
|
i++;
|
|
3457
3457
|
let a = null;
|
|
3458
|
-
if (r instanceof
|
|
3458
|
+
if (r instanceof vr) {
|
|
3459
3459
|
let c = o.marks, u;
|
|
3460
3460
|
for (; u = r.isInSet(c); )
|
|
3461
3461
|
(a || (a = [])).push(u), c = u.removeFromSet(c);
|
|
@@ -3473,7 +3473,7 @@ function wu(n, e, t, r) {
|
|
|
3473
3473
|
}
|
|
3474
3474
|
}), s.forEach((o) => n.step(new xe(o.from, o.to, o.style)));
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3476
|
+
function Us(n, e, t, r = t.contentMatch, s = !0) {
|
|
3477
3477
|
let i = n.doc.nodeAt(e), o = [], l = e + 1;
|
|
3478
3478
|
for (let a = 0; a < i.childCount; a++) {
|
|
3479
3479
|
let c = i.child(a), u = l + c.nodeSize, d = r.matchType(c.type);
|
|
@@ -3522,7 +3522,7 @@ function Mu(n, e, t) {
|
|
|
3522
3522
|
m || s.after(p + 1) < s.end(p) ? (m = !0, f = k.from(s.node(p).copy(f)), h++) : c++;
|
|
3523
3523
|
n.step(new J(a, c, o, l, new S(u.append(f), d, h), u.size - d, !0));
|
|
3524
3524
|
}
|
|
3525
|
-
function
|
|
3525
|
+
function qs(n, e, t = null, r = n) {
|
|
3526
3526
|
let s = Tu(n, e), i = s && vu(r, e);
|
|
3527
3527
|
return i ? s.map(Ui).concat({ type: e, attrs: t }).concat(i.map(Ui)) : null;
|
|
3528
3528
|
}
|
|
@@ -3570,7 +3570,7 @@ function Au(n, e, t, r, s) {
|
|
|
3570
3570
|
let h = r.whitespace == "pre", p = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
|
|
3571
3571
|
h && !p ? c = !1 : !h && p && (c = !0);
|
|
3572
3572
|
}
|
|
3573
|
-
c === !1 && Al(n, o, l, i),
|
|
3573
|
+
c === !1 && Al(n, o, l, i), Us(n, n.mapping.slice(i).map(l, 1), r, void 0, c === null);
|
|
3574
3574
|
let u = n.mapping.slice(i), d = u.map(l, 1), f = u.map(l + o.nodeSize, 1);
|
|
3575
3575
|
return n.step(new J(d, f, d + 1, f - 1, new S(k.from(r.create(a, null, o.marks)), 0, 0), 1, !0)), c === !0 && El(n, o, l, i), !1;
|
|
3576
3576
|
}
|
|
@@ -3655,7 +3655,7 @@ function Du(n, e) {
|
|
|
3655
3655
|
function Nl(n, e) {
|
|
3656
3656
|
return !!(n && e && !n.isLeaf && Du(n, e));
|
|
3657
3657
|
}
|
|
3658
|
-
function
|
|
3658
|
+
function Er(n, e, t = -1) {
|
|
3659
3659
|
let r = n.resolve(e);
|
|
3660
3660
|
for (let s = r.depth; ; s--) {
|
|
3661
3661
|
let i, o, l = r.index(s);
|
|
@@ -3677,7 +3677,7 @@ function Ru(n, e, t) {
|
|
|
3677
3677
|
let u = n.doc.resolve(e + t);
|
|
3678
3678
|
Al(n, u.node(), u.before(), l);
|
|
3679
3679
|
}
|
|
3680
|
-
o.inlineContent &&
|
|
3680
|
+
o.inlineContent && Us(n, e + t - 1, o, i.node().contentMatchAt(i.index()), r == null);
|
|
3681
3681
|
let a = n.mapping.slice(l), c = a.map(e - t);
|
|
3682
3682
|
if (n.step(new U(c, a.map(e + t, -1), S.empty, !0)), r === !0) {
|
|
3683
3683
|
let u = n.doc.resolve(c);
|
|
@@ -3728,7 +3728,7 @@ function Ol(n, e, t) {
|
|
|
3728
3728
|
}
|
|
3729
3729
|
return null;
|
|
3730
3730
|
}
|
|
3731
|
-
function
|
|
3731
|
+
function Ar(n, e, t = e, r = S.empty) {
|
|
3732
3732
|
if (e == t && !r.size)
|
|
3733
3733
|
return null;
|
|
3734
3734
|
let s = n.resolve(e), i = n.resolve(t);
|
|
@@ -3783,7 +3783,7 @@ class Lu {
|
|
|
3783
3783
|
for (let t = 1; t <= 2; t++)
|
|
3784
3784
|
for (let r = t == 1 ? e : this.unplaced.openStart; r >= 0; r--) {
|
|
3785
3785
|
let s, i = null;
|
|
3786
|
-
r ? (i =
|
|
3786
|
+
r ? (i = Wr(this.unplaced.content, r - 1).firstChild, s = i.content) : s = this.unplaced.content;
|
|
3787
3787
|
let o = s.firstChild;
|
|
3788
3788
|
for (let l = this.depth; l >= 0; l--) {
|
|
3789
3789
|
let { type: a, match: c } = this.frontier[l], u, d = null;
|
|
@@ -3797,11 +3797,11 @@ class Lu {
|
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
3799
|
openMore() {
|
|
3800
|
-
let { content: e, openStart: t, openEnd: r } = this.unplaced, s =
|
|
3800
|
+
let { content: e, openStart: t, openEnd: r } = this.unplaced, s = Wr(e, t);
|
|
3801
3801
|
return !s.childCount || s.firstChild.isLeaf ? !1 : (this.unplaced = new S(e, t + 1, Math.max(r, s.size + t >= e.size - r ? t + 1 : 0)), !0);
|
|
3802
3802
|
}
|
|
3803
3803
|
dropNode() {
|
|
3804
|
-
let { content: e, openStart: t, openEnd: r } = this.unplaced, s =
|
|
3804
|
+
let { content: e, openStart: t, openEnd: r } = this.unplaced, s = Wr(e, t);
|
|
3805
3805
|
if (s.childCount <= 1 && t > 0) {
|
|
3806
3806
|
let i = e.size - t <= t + s.size;
|
|
3807
3807
|
this.unplaced = new S(_t(e, t - 1, 1), t - 1, i ? t - 1 : r);
|
|
@@ -3842,7 +3842,7 @@ class Lu {
|
|
|
3842
3842
|
if (!this.$to.parent.isTextblock)
|
|
3843
3843
|
return -1;
|
|
3844
3844
|
let e = this.frontier[this.depth], t;
|
|
3845
|
-
if (!e.type.isTextblock || !
|
|
3845
|
+
if (!e.type.isTextblock || !Kr(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
|
|
3846
3846
|
return -1;
|
|
3847
3847
|
let { depth: r } = this.$to, s = this.$to.after(r);
|
|
3848
3848
|
for (; r > 1 && s == this.$to.end(--r); )
|
|
@@ -3851,10 +3851,10 @@ class Lu {
|
|
|
3851
3851
|
}
|
|
3852
3852
|
findCloseLevel(e) {
|
|
3853
3853
|
e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
|
|
3854
|
-
let { match: r, type: s } = this.frontier[t], i = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o =
|
|
3854
|
+
let { match: r, type: s } = this.frontier[t], i = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Kr(e, t, s, r, i);
|
|
3855
3855
|
if (o) {
|
|
3856
3856
|
for (let l = t - 1; l >= 0; l--) {
|
|
3857
|
-
let { match: a, type: c } = this.frontier[l], u =
|
|
3857
|
+
let { match: a, type: c } = this.frontier[l], u = Kr(e, l, c, a, !0);
|
|
3858
3858
|
if (!u || u.childCount)
|
|
3859
3859
|
continue e;
|
|
3860
3860
|
}
|
|
@@ -3890,7 +3890,7 @@ function _t(n, e, t) {
|
|
|
3890
3890
|
function jt(n, e, t) {
|
|
3891
3891
|
return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(jt(n.lastChild.content, e - 1, t)));
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3893
|
+
function Wr(n, e) {
|
|
3894
3894
|
for (let t = 0; t < e; t++)
|
|
3895
3895
|
n = n.firstChild.content;
|
|
3896
3896
|
return n;
|
|
@@ -3901,7 +3901,7 @@ function Dl(n, e, t) {
|
|
|
3901
3901
|
let r = n.content;
|
|
3902
3902
|
return e > 1 && (r = r.replaceChild(0, Dl(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(k.empty, !0)))), n.copy(r);
|
|
3903
3903
|
}
|
|
3904
|
-
function
|
|
3904
|
+
function Kr(n, e, t, r, s) {
|
|
3905
3905
|
let i = n.node(e), o = s ? n.indexAfter(e) : n.index(e);
|
|
3906
3906
|
if (o == i.childCount && !t.compatibleContent(i.type))
|
|
3907
3907
|
return null;
|
|
@@ -4136,7 +4136,7 @@ class Ll {
|
|
|
4136
4136
|
given `slice`.
|
|
4137
4137
|
*/
|
|
4138
4138
|
replace(e, t = e, r = S.empty) {
|
|
4139
|
-
let s =
|
|
4139
|
+
let s = Ar(this.doc, e, t, r);
|
|
4140
4140
|
return s && this.step(s), this;
|
|
4141
4141
|
}
|
|
4142
4142
|
/**
|
|
@@ -4309,10 +4309,10 @@ class Ll {
|
|
|
4309
4309
|
third argument.
|
|
4310
4310
|
*/
|
|
4311
4311
|
clearIncompatible(e, t, r) {
|
|
4312
|
-
return
|
|
4312
|
+
return Us(this, e, t, r), this;
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
|
-
const
|
|
4315
|
+
const Ur = /* @__PURE__ */ Object.create(null);
|
|
4316
4316
|
class I {
|
|
4317
4317
|
/**
|
|
4318
4318
|
Initialize a selection with the head and anchor and ranges. If no
|
|
@@ -4448,7 +4448,7 @@ class I {
|
|
|
4448
4448
|
static fromJSON(e, t) {
|
|
4449
4449
|
if (!t || !t.type)
|
|
4450
4450
|
throw new RangeError("Invalid input for Selection.fromJSON");
|
|
4451
|
-
let r =
|
|
4451
|
+
let r = Ur[t.type];
|
|
4452
4452
|
if (!r)
|
|
4453
4453
|
throw new RangeError(`No selection type ${t.type} defined`);
|
|
4454
4454
|
return r.fromJSON(e, t);
|
|
@@ -4460,9 +4460,9 @@ class I {
|
|
|
4460
4460
|
clash with classes from other modules.
|
|
4461
4461
|
*/
|
|
4462
4462
|
static jsonID(e, t) {
|
|
4463
|
-
if (e in
|
|
4463
|
+
if (e in Ur)
|
|
4464
4464
|
throw new RangeError("Duplicate use of selection JSON ID " + e);
|
|
4465
|
-
return
|
|
4465
|
+
return Ur[e] = t, t.prototype.jsonID = e, t;
|
|
4466
4466
|
}
|
|
4467
4467
|
/**
|
|
4468
4468
|
Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
|
|
@@ -4521,7 +4521,7 @@ class N extends I {
|
|
|
4521
4521
|
return e instanceof N && e.anchor == this.anchor && e.head == this.head;
|
|
4522
4522
|
}
|
|
4523
4523
|
getBookmark() {
|
|
4524
|
-
return new
|
|
4524
|
+
return new Nr(this.anchor, this.head);
|
|
4525
4525
|
}
|
|
4526
4526
|
toJSON() {
|
|
4527
4527
|
return { type: "text", anchor: this.anchor, head: this.head };
|
|
@@ -4562,12 +4562,12 @@ class N extends I {
|
|
|
4562
4562
|
}
|
|
4563
4563
|
}
|
|
4564
4564
|
I.jsonID("text", N);
|
|
4565
|
-
class
|
|
4565
|
+
class Nr {
|
|
4566
4566
|
constructor(e, t) {
|
|
4567
4567
|
this.anchor = e, this.head = t;
|
|
4568
4568
|
}
|
|
4569
4569
|
map(e) {
|
|
4570
|
-
return new
|
|
4570
|
+
return new Nr(e.map(this.anchor), e.map(this.head));
|
|
4571
4571
|
}
|
|
4572
4572
|
resolve(e) {
|
|
4573
4573
|
return N.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
@@ -4596,7 +4596,7 @@ class v extends I {
|
|
|
4596
4596
|
return { type: "node", anchor: this.anchor };
|
|
4597
4597
|
}
|
|
4598
4598
|
getBookmark() {
|
|
4599
|
-
return new
|
|
4599
|
+
return new Js(this.anchor);
|
|
4600
4600
|
}
|
|
4601
4601
|
/**
|
|
4602
4602
|
@internal
|
|
@@ -4622,13 +4622,13 @@ class v extends I {
|
|
|
4622
4622
|
}
|
|
4623
4623
|
v.prototype.visible = !1;
|
|
4624
4624
|
I.jsonID("node", v);
|
|
4625
|
-
class
|
|
4625
|
+
class Js {
|
|
4626
4626
|
constructor(e) {
|
|
4627
4627
|
this.anchor = e;
|
|
4628
4628
|
}
|
|
4629
4629
|
map(e) {
|
|
4630
4630
|
let { deleted: t, pos: r } = e.mapResult(this.anchor);
|
|
4631
|
-
return t ? new
|
|
4631
|
+
return t ? new Nr(r, r) : new Js(r);
|
|
4632
4632
|
}
|
|
4633
4633
|
resolve(e) {
|
|
4634
4634
|
let t = e.resolve(this.anchor), r = t.nodeAfter;
|
|
@@ -4901,7 +4901,7 @@ const Wu = [
|
|
|
4901
4901
|
}
|
|
4902
4902
|
})
|
|
4903
4903
|
];
|
|
4904
|
-
class
|
|
4904
|
+
class qr {
|
|
4905
4905
|
constructor(e, t) {
|
|
4906
4906
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Wu.slice(), t && t.forEach((r) => {
|
|
4907
4907
|
if (this.pluginsByKey[r.key])
|
|
@@ -5002,7 +5002,7 @@ class At {
|
|
|
5002
5002
|
Create a new state.
|
|
5003
5003
|
*/
|
|
5004
5004
|
static create(e) {
|
|
5005
|
-
let t = new
|
|
5005
|
+
let t = new qr(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new At(t);
|
|
5006
5006
|
for (let s = 0; s < t.fields.length; s++)
|
|
5007
5007
|
r[t.fields[s].name] = t.fields[s].init(e, r);
|
|
5008
5008
|
return r;
|
|
@@ -5016,7 +5016,7 @@ class At {
|
|
|
5016
5016
|
configuration object..
|
|
5017
5017
|
*/
|
|
5018
5018
|
reconfigure(e) {
|
|
5019
|
-
let t = new
|
|
5019
|
+
let t = new qr(this.schema, e.plugins), r = t.fields, s = new At(t);
|
|
5020
5020
|
for (let i = 0; i < r.length; i++) {
|
|
5021
5021
|
let o = r[i].name;
|
|
5022
5022
|
s[o] = this.hasOwnProperty(o) ? this[o] : r[i].init(e, s);
|
|
@@ -5053,7 +5053,7 @@ class At {
|
|
|
5053
5053
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
5054
5054
|
if (!e.schema)
|
|
5055
5055
|
throw new RangeError("Required config field 'schema' missing");
|
|
5056
|
-
let s = new
|
|
5056
|
+
let s = new qr(e.schema, e.plugins), i = new At(s);
|
|
5057
5057
|
return s.fields.forEach((o) => {
|
|
5058
5058
|
if (o.name == "doc")
|
|
5059
5059
|
i.doc = Se.fromJSON(e.schema, t.doc);
|
|
@@ -5096,9 +5096,9 @@ class $ {
|
|
|
5096
5096
|
return e[this.key];
|
|
5097
5097
|
}
|
|
5098
5098
|
}
|
|
5099
|
-
const
|
|
5099
|
+
const Jr = /* @__PURE__ */ Object.create(null);
|
|
5100
5100
|
function zl(n) {
|
|
5101
|
-
return n in
|
|
5101
|
+
return n in Jr ? n + "$" + ++Jr[n] : (Jr[n] = 0, n + "$");
|
|
5102
5102
|
}
|
|
5103
5103
|
class K {
|
|
5104
5104
|
/**
|
|
@@ -5121,7 +5121,7 @@ class K {
|
|
|
5121
5121
|
return e[this.key];
|
|
5122
5122
|
}
|
|
5123
5123
|
}
|
|
5124
|
-
const
|
|
5124
|
+
const Gs = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
|
|
5125
5125
|
function $l(n, e) {
|
|
5126
5126
|
let { $cursor: t } = n.selection;
|
|
5127
5127
|
return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
|
|
@@ -5130,7 +5130,7 @@ const Fl = (n, e, t) => {
|
|
|
5130
5130
|
let r = $l(n, t);
|
|
5131
5131
|
if (!r)
|
|
5132
5132
|
return !1;
|
|
5133
|
-
let s =
|
|
5133
|
+
let s = Ys(r);
|
|
5134
5134
|
if (!s) {
|
|
5135
5135
|
let o = r.blockRange(), l = o && $t(o);
|
|
5136
5136
|
return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
|
|
@@ -5140,7 +5140,7 @@ const Fl = (n, e, t) => {
|
|
|
5140
5140
|
return !0;
|
|
5141
5141
|
if (r.parent.content.size == 0 && (Dt(i, "end") || v.isSelectable(i)))
|
|
5142
5142
|
for (let o = r.depth; ; o--) {
|
|
5143
|
-
let l =
|
|
5143
|
+
let l = Ar(n.doc, r.before(o), r.after(o), S.empty);
|
|
5144
5144
|
if (l && l.slice.size < l.to - l.from) {
|
|
5145
5145
|
if (e) {
|
|
5146
5146
|
let a = n.tr.step(l);
|
|
@@ -5156,13 +5156,13 @@ const Fl = (n, e, t) => {
|
|
|
5156
5156
|
let r = $l(n, t);
|
|
5157
5157
|
if (!r)
|
|
5158
5158
|
return !1;
|
|
5159
|
-
let s =
|
|
5159
|
+
let s = Ys(r);
|
|
5160
5160
|
return s ? Vl(n, s, e) : !1;
|
|
5161
5161
|
}, Uu = (n, e, t) => {
|
|
5162
5162
|
let r = _l(n, t);
|
|
5163
5163
|
if (!r)
|
|
5164
5164
|
return !1;
|
|
5165
|
-
let s =
|
|
5165
|
+
let s = Xs(r);
|
|
5166
5166
|
return s ? Vl(n, s, e) : !1;
|
|
5167
5167
|
};
|
|
5168
5168
|
function Vl(n, e, t) {
|
|
@@ -5184,7 +5184,7 @@ function Vl(n, e, t) {
|
|
|
5184
5184
|
return !1;
|
|
5185
5185
|
l = u;
|
|
5186
5186
|
}
|
|
5187
|
-
let c =
|
|
5187
|
+
let c = Ar(n.doc, i, a, S.empty);
|
|
5188
5188
|
if (!c || c.from != i || c instanceof U && c.slice.size >= a - i)
|
|
5189
5189
|
return !1;
|
|
5190
5190
|
if (t) {
|
|
@@ -5209,12 +5209,12 @@ const Hl = (n, e, t) => {
|
|
|
5209
5209
|
if (r.parent.isTextblock) {
|
|
5210
5210
|
if (t ? !t.endOfTextblock("backward", n) : r.parentOffset > 0)
|
|
5211
5211
|
return !1;
|
|
5212
|
-
i =
|
|
5212
|
+
i = Ys(r);
|
|
5213
5213
|
}
|
|
5214
5214
|
let o = i && i.nodeBefore;
|
|
5215
5215
|
return !o || !v.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(v.create(n.doc, i.pos - o.nodeSize)).scrollIntoView()), !0);
|
|
5216
5216
|
};
|
|
5217
|
-
function
|
|
5217
|
+
function Ys(n) {
|
|
5218
5218
|
if (!n.parent.type.spec.isolating)
|
|
5219
5219
|
for (let e = n.depth - 1; e >= 0; e--) {
|
|
5220
5220
|
if (n.index(e) > 0)
|
|
@@ -5232,14 +5232,14 @@ const jl = (n, e, t) => {
|
|
|
5232
5232
|
let r = _l(n, t);
|
|
5233
5233
|
if (!r)
|
|
5234
5234
|
return !1;
|
|
5235
|
-
let s =
|
|
5235
|
+
let s = Xs(r);
|
|
5236
5236
|
if (!s)
|
|
5237
5237
|
return !1;
|
|
5238
5238
|
let i = s.nodeAfter;
|
|
5239
5239
|
if (Jl(n, s, e, 1))
|
|
5240
5240
|
return !0;
|
|
5241
5241
|
if (r.parent.content.size == 0 && (Dt(i, "start") || v.isSelectable(i))) {
|
|
5242
|
-
let o =
|
|
5242
|
+
let o = Ar(n.doc, r.before(), r.after(), S.empty);
|
|
5243
5243
|
if (o && o.slice.size < o.to - o.from) {
|
|
5244
5244
|
if (e) {
|
|
5245
5245
|
let l = n.tr.step(o);
|
|
@@ -5256,12 +5256,12 @@ const jl = (n, e, t) => {
|
|
|
5256
5256
|
if (r.parent.isTextblock) {
|
|
5257
5257
|
if (t ? !t.endOfTextblock("forward", n) : r.parentOffset < r.parent.content.size)
|
|
5258
5258
|
return !1;
|
|
5259
|
-
i =
|
|
5259
|
+
i = Xs(r);
|
|
5260
5260
|
}
|
|
5261
5261
|
let o = i && i.nodeAfter;
|
|
5262
5262
|
return !o || !v.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(v.create(n.doc, i.pos)).scrollIntoView()), !0);
|
|
5263
5263
|
};
|
|
5264
|
-
function
|
|
5264
|
+
function Xs(n) {
|
|
5265
5265
|
if (!n.parent.type.spec.isolating)
|
|
5266
5266
|
for (let e = n.depth - 1; e >= 0; e--) {
|
|
5267
5267
|
let t = n.node(e);
|
|
@@ -5278,7 +5278,7 @@ const qu = (n, e) => {
|
|
|
5278
5278
|
if (t.node.isTextblock || !Ze(n.doc, t.from))
|
|
5279
5279
|
return !1;
|
|
5280
5280
|
s = t.from;
|
|
5281
|
-
} else if (s =
|
|
5281
|
+
} else if (s = Er(n.doc, t.from, -1), s == null)
|
|
5282
5282
|
return !1;
|
|
5283
5283
|
if (e) {
|
|
5284
5284
|
let i = n.tr.join(s);
|
|
@@ -5291,7 +5291,7 @@ const qu = (n, e) => {
|
|
|
5291
5291
|
if (t.node.isTextblock || !Ze(n.doc, t.to))
|
|
5292
5292
|
return !1;
|
|
5293
5293
|
r = t.to;
|
|
5294
|
-
} else if (r =
|
|
5294
|
+
} else if (r = Er(n.doc, t.to, 1), r == null)
|
|
5295
5295
|
return !1;
|
|
5296
5296
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
5297
5297
|
}, Gu = (n, e) => {
|
|
@@ -5302,7 +5302,7 @@ const qu = (n, e) => {
|
|
|
5302
5302
|
return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
|
|
5303
5303
|
`).scrollIntoView()), !0);
|
|
5304
5304
|
};
|
|
5305
|
-
function
|
|
5305
|
+
function Qs(n) {
|
|
5306
5306
|
for (let e = 0; e < n.edgeCount; e++) {
|
|
5307
5307
|
let { type: t } = n.edge(e);
|
|
5308
5308
|
if (t.isTextblock && !t.hasRequiredAttrs())
|
|
@@ -5314,7 +5314,7 @@ const Yu = (n, e) => {
|
|
|
5314
5314
|
let { $head: t, $anchor: r } = n.selection;
|
|
5315
5315
|
if (!t.parent.type.spec.code || !t.sameParent(r))
|
|
5316
5316
|
return !1;
|
|
5317
|
-
let s = t.node(-1), i = t.indexAfter(-1), o =
|
|
5317
|
+
let s = t.node(-1), i = t.indexAfter(-1), o = Qs(s.contentMatchAt(i));
|
|
5318
5318
|
if (!o || !s.canReplaceWith(i, i, o))
|
|
5319
5319
|
return !1;
|
|
5320
5320
|
if (e) {
|
|
@@ -5326,7 +5326,7 @@ const Yu = (n, e) => {
|
|
|
5326
5326
|
let t = n.selection, { $from: r, $to: s } = t;
|
|
5327
5327
|
if (t instanceof ue || r.parent.inlineContent || s.parent.inlineContent)
|
|
5328
5328
|
return !1;
|
|
5329
|
-
let i =
|
|
5329
|
+
let i = Qs(s.parent.contentMatchAt(s.indexAfter()));
|
|
5330
5330
|
if (!i || !i.isTextblock)
|
|
5331
5331
|
return !1;
|
|
5332
5332
|
if (e) {
|
|
@@ -5356,7 +5356,7 @@ function Xu(n) {
|
|
|
5356
5356
|
let i = [], o, l, a = !1, c = !1;
|
|
5357
5357
|
for (let h = r.depth; ; h--)
|
|
5358
5358
|
if (r.node(h).isBlock) {
|
|
5359
|
-
a = r.end(h) == r.pos + (r.depth - h), c = r.start(h) == r.pos - (r.depth - h), l =
|
|
5359
|
+
a = r.end(h) == r.pos + (r.depth - h), c = r.start(h) == r.pos - (r.depth - h), l = Qs(r.node(h - 1).contentMatchAt(r.indexAfter(h - 1))), i.unshift(a && l ? { type: l } : null), o = h;
|
|
5360
5360
|
break;
|
|
5361
5361
|
} else {
|
|
5362
5362
|
if (h == 1)
|
|
@@ -5436,7 +5436,7 @@ function Gl(n) {
|
|
|
5436
5436
|
const td = Gl(-1), nd = Gl(1);
|
|
5437
5437
|
function rd(n, e = null) {
|
|
5438
5438
|
return function(t, r) {
|
|
5439
|
-
let { $from: s, $to: i } = t.selection, o = s.blockRange(i), l = o &&
|
|
5439
|
+
let { $from: s, $to: i } = t.selection, o = s.blockRange(i), l = o && qs(o, n, e);
|
|
5440
5440
|
return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
5441
5441
|
};
|
|
5442
5442
|
}
|
|
@@ -5470,7 +5470,7 @@ function Zi(n, e = null) {
|
|
|
5470
5470
|
return !0;
|
|
5471
5471
|
};
|
|
5472
5472
|
}
|
|
5473
|
-
function
|
|
5473
|
+
function Zs(...n) {
|
|
5474
5474
|
return function(e, t, r) {
|
|
5475
5475
|
for (let s = 0; s < n.length; s++)
|
|
5476
5476
|
if (n[s](e, t, r))
|
|
@@ -5478,9 +5478,9 @@ function Qs(...n) {
|
|
|
5478
5478
|
return !1;
|
|
5479
5479
|
};
|
|
5480
5480
|
}
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5481
|
+
Zs(Gs, Fl, Hl);
|
|
5482
|
+
Zs(Gs, jl, Wl);
|
|
5483
|
+
Zs(Kl, Ul, ql, Qu);
|
|
5484
5484
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
5485
5485
|
function sd(n, e = null) {
|
|
5486
5486
|
return function(t, r) {
|
|
@@ -5497,9 +5497,9 @@ function id(n, e, t, r = null) {
|
|
|
5497
5497
|
if (e.$from.index(e.depth - 1) == 0)
|
|
5498
5498
|
return !1;
|
|
5499
5499
|
let a = o.resolve(e.start - 2);
|
|
5500
|
-
i = new
|
|
5500
|
+
i = new Fn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new Fn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), s = !0;
|
|
5501
5501
|
}
|
|
5502
|
-
let l =
|
|
5502
|
+
let l = qs(i, t, r, e);
|
|
5503
5503
|
return l ? (n && od(n, e, l, s, t), !0) : !1;
|
|
5504
5504
|
}
|
|
5505
5505
|
function od(n, e, t, r, s) {
|
|
@@ -5523,7 +5523,7 @@ function ld(n) {
|
|
|
5523
5523
|
}
|
|
5524
5524
|
function ad(n, e, t, r) {
|
|
5525
5525
|
let s = n.tr, i = r.end, o = r.$to.end(r.depth);
|
|
5526
|
-
i < o && (s.step(new J(i - 1, o, i, o, new S(k.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new
|
|
5526
|
+
i < o && (s.step(new J(i - 1, o, i, o, new S(k.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Fn(s.doc.resolve(r.$from.pos), s.doc.resolve(o), r.depth));
|
|
5527
5527
|
const l = $t(r);
|
|
5528
5528
|
if (l == null)
|
|
5529
5529
|
return !1;
|
|
@@ -5570,12 +5570,12 @@ const X = function(n) {
|
|
|
5570
5570
|
let e = n.assignedSlot || n.parentNode;
|
|
5571
5571
|
return e && e.nodeType == 11 ? e.host : e;
|
|
5572
5572
|
};
|
|
5573
|
-
let
|
|
5573
|
+
let xs = null;
|
|
5574
5574
|
const Ie = function(n, e, t) {
|
|
5575
|
-
let r =
|
|
5575
|
+
let r = xs || (xs = document.createRange());
|
|
5576
5576
|
return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
|
|
5577
5577
|
}, dd = function() {
|
|
5578
|
-
|
|
5578
|
+
xs = null;
|
|
5579
5579
|
}, pt = function(n, e, t, r) {
|
|
5580
5580
|
return t && (eo(n, e, t, r, -1) || eo(n, e, t, r, 1));
|
|
5581
5581
|
}, fd = /^(img|br|input|textarea|hr)$/i;
|
|
@@ -5648,7 +5648,7 @@ function pn(n) {
|
|
|
5648
5648
|
;
|
|
5649
5649
|
return e && e.node && e.node.isBlock && (e.dom == n || e.contentDOM == n);
|
|
5650
5650
|
}
|
|
5651
|
-
const
|
|
5651
|
+
const Or = function(n) {
|
|
5652
5652
|
return n.focusNode && pt(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
|
|
5653
5653
|
};
|
|
5654
5654
|
function nt(n, e) {
|
|
@@ -5675,9 +5675,9 @@ function yd(n, e, t) {
|
|
|
5675
5675
|
return { node: r.startContainer, offset: Math.min(ge(r.startContainer), r.startOffset) };
|
|
5676
5676
|
}
|
|
5677
5677
|
}
|
|
5678
|
-
const Te = typeof navigator < "u" ? navigator : null, to = typeof document < "u" ? document : null, et = Te && Te.userAgent || "",
|
|
5678
|
+
const Te = typeof navigator < "u" ? navigator : null, to = typeof document < "u" ? document : null, et = Te && Te.userAgent || "", Ss = /Edge\/(\d+)/.exec(et), Yl = /MSIE \d/.exec(et), ws = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(et), le = !!(Yl || ws || Ss), Je = Yl ? document.documentMode : ws ? +ws[1] : Ss ? +Ss[1] : 0, ye = !le && /gecko\/(\d+)/i.test(et);
|
|
5679
5679
|
ye && +(/Firefox\/(\d+)/.exec(et) || [0, 0])[1];
|
|
5680
|
-
const
|
|
5680
|
+
const Cs = !le && /Chrome\/(\d+)/.exec(et), q = !!Cs, Xl = Cs ? +Cs[1] : 0, ee = !le && !!Te && /Apple Computer/.test(Te.vendor), Pt = ee && (/Mobile\/\w+/.test(et) || !!Te && Te.maxTouchPoints > 2), me = Pt || (Te ? /Mac/.test(Te.platform) : !1), Ql = Te ? /Win/.test(Te.platform) : !1, De = /Android \d/.test(et), mn = !!to && "webkitFontSmoothing" in to.documentElement.style, kd = mn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5681
5681
|
function bd(n) {
|
|
5682
5682
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
5683
5683
|
return e ? {
|
|
@@ -5803,14 +5803,14 @@ function Md(n, e) {
|
|
|
5803
5803
|
for (let i = 0; i < t; i++) {
|
|
5804
5804
|
r.setEnd(n, i + 1), r.setStart(n, i);
|
|
5805
5805
|
let o = $e(r, 1);
|
|
5806
|
-
if (o.top != o.bottom &&
|
|
5806
|
+
if (o.top != o.bottom && ei(e, o)) {
|
|
5807
5807
|
s = { node: n, offset: i + (e.left >= (o.left + o.right) / 2 ? 1 : 0) };
|
|
5808
5808
|
break;
|
|
5809
5809
|
}
|
|
5810
5810
|
}
|
|
5811
5811
|
return r.detach(), s || { node: n, offset: 0 };
|
|
5812
5812
|
}
|
|
5813
|
-
function
|
|
5813
|
+
function ei(n, e) {
|
|
5814
5814
|
return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
|
|
5815
5815
|
}
|
|
5816
5816
|
function Td(n, e) {
|
|
@@ -5847,7 +5847,7 @@ function na(n, e, t) {
|
|
|
5847
5847
|
let l = o.getClientRects();
|
|
5848
5848
|
for (let a = 0; a < l.length; a++) {
|
|
5849
5849
|
let c = l[a];
|
|
5850
|
-
if (
|
|
5850
|
+
if (ei(e, c))
|
|
5851
5851
|
return na(o, e, c);
|
|
5852
5852
|
}
|
|
5853
5853
|
}
|
|
@@ -5862,7 +5862,7 @@ function Ad(n, e) {
|
|
|
5862
5862
|
let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
|
|
5863
5863
|
if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
|
|
5864
5864
|
let c = n.dom.getBoundingClientRect();
|
|
5865
|
-
if (!
|
|
5865
|
+
if (!ei(e, c) || (o = na(n.dom, e, c), !o))
|
|
5866
5866
|
return null;
|
|
5867
5867
|
}
|
|
5868
5868
|
if (ee)
|
|
@@ -5915,14 +5915,14 @@ function ra(n, e, t) {
|
|
|
5915
5915
|
if (i == null && s && (t < 0 || s == ge(r))) {
|
|
5916
5916
|
let a = r.childNodes[s - 1];
|
|
5917
5917
|
if (a.nodeType == 1)
|
|
5918
|
-
return
|
|
5918
|
+
return Gr(a.getBoundingClientRect(), !1);
|
|
5919
5919
|
}
|
|
5920
5920
|
if (i == null && s < ge(r)) {
|
|
5921
5921
|
let a = r.childNodes[s];
|
|
5922
5922
|
if (a.nodeType == 1)
|
|
5923
|
-
return
|
|
5923
|
+
return Gr(a.getBoundingClientRect(), !0);
|
|
5924
5924
|
}
|
|
5925
|
-
return
|
|
5925
|
+
return Gr(r.getBoundingClientRect(), t >= 0);
|
|
5926
5926
|
}
|
|
5927
5927
|
if (i == null && s && (t < 0 || s == ge(r))) {
|
|
5928
5928
|
let a = r.childNodes[s - 1], c = a.nodeType == 3 ? Ie(a, ge(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
@@ -5945,7 +5945,7 @@ function Vt(n, e) {
|
|
|
5945
5945
|
let t = e ? n.left : n.right;
|
|
5946
5946
|
return { top: n.top, bottom: n.bottom, left: t, right: t };
|
|
5947
5947
|
}
|
|
5948
|
-
function
|
|
5948
|
+
function Gr(n, e) {
|
|
5949
5949
|
if (n.height == 0)
|
|
5950
5950
|
return n;
|
|
5951
5951
|
let t = e ? n.top : n.bottom;
|
|
@@ -6442,7 +6442,7 @@ class mt extends gn {
|
|
|
6442
6442
|
}
|
|
6443
6443
|
slice(e, t, r) {
|
|
6444
6444
|
let s = mt.create(this.parent, this.mark, !0, r), i = this.children, o = this.size;
|
|
6445
|
-
t < o && (i =
|
|
6445
|
+
t < o && (i = Ts(i, t, o, r)), e > 0 && (i = Ts(i, 0, e, r));
|
|
6446
6446
|
for (let l = 0; l < i.length; l++)
|
|
6447
6447
|
i[l].parent = s;
|
|
6448
6448
|
return s.children = i, s;
|
|
@@ -6482,7 +6482,7 @@ class Ge extends gn {
|
|
|
6482
6482
|
} else u || ({ dom: u, contentDOM: d } = yt.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
6483
6483
|
!d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
|
|
6484
6484
|
let f = u;
|
|
6485
|
-
return u = ca(u, r, t), c ? a = new Ld(e, t, r, s, u, d || null, f, c, i, o + 1) : t.isText ? new
|
|
6485
|
+
return u = ca(u, r, t), c ? a = new Ld(e, t, r, s, u, d || null, f, c, i, o + 1) : t.isText ? new Ir(e, t, r, s, u, f, i) : new Ge(e, t, r, s, u, d || null, f, i, o + 1);
|
|
6486
6486
|
}
|
|
6487
6487
|
parseRule() {
|
|
6488
6488
|
if (this.node.type.spec.reparseInView)
|
|
@@ -6505,7 +6505,7 @@ class Ge extends gn {
|
|
|
6505
6505
|
return e;
|
|
6506
6506
|
}
|
|
6507
6507
|
matchesNode(e, t, r) {
|
|
6508
|
-
return this.dirty == ke && e.eq(this.node) &&
|
|
6508
|
+
return this.dirty == ke && e.eq(this.node) && Hn(t, this.outerDeco) && r.eq(this.innerDeco);
|
|
6509
6509
|
}
|
|
6510
6510
|
get size() {
|
|
6511
6511
|
return this.node.nodeSize;
|
|
@@ -6552,7 +6552,7 @@ class Ge extends gn {
|
|
|
6552
6552
|
i.pmViewDesc && (i.pmViewDesc = void 0);
|
|
6553
6553
|
}
|
|
6554
6554
|
let o = new Pd(this, i, t, s);
|
|
6555
|
-
e.input.compositionNodes.push(o), this.children =
|
|
6555
|
+
e.input.compositionNodes.push(o), this.children = Ts(this.children, r, r + s.length, e, o);
|
|
6556
6556
|
}
|
|
6557
6557
|
// If this desc must be updated to match the given node decoration,
|
|
6558
6558
|
// do so and return true.
|
|
@@ -6563,10 +6563,10 @@ class Ge extends gn {
|
|
|
6563
6563
|
this.updateOuterDeco(t), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(s, this.posAtStart), this.dirty = ke;
|
|
6564
6564
|
}
|
|
6565
6565
|
updateOuterDeco(e) {
|
|
6566
|
-
if (
|
|
6566
|
+
if (Hn(e, this.outerDeco))
|
|
6567
6567
|
return;
|
|
6568
6568
|
let t = this.nodeDOM.nodeType != 1, r = this.dom;
|
|
6569
|
-
this.dom = aa(this.dom, this.nodeDOM,
|
|
6569
|
+
this.dom = aa(this.dom, this.nodeDOM, Ms(this.outerDeco, this.node, t), Ms(e, this.node, t)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
6570
6570
|
}
|
|
6571
6571
|
// Mark this node as being the selected node.
|
|
6572
6572
|
selectNode() {
|
|
@@ -6585,7 +6585,7 @@ function ao(n, e, t, r, s) {
|
|
|
6585
6585
|
let i = new Ge(void 0, n, e, t, r, r, r, s, 0);
|
|
6586
6586
|
return i.contentDOM && i.updateChildren(s, 0), i;
|
|
6587
6587
|
}
|
|
6588
|
-
class
|
|
6588
|
+
class Ir extends Ge {
|
|
6589
6589
|
constructor(e, t, r, s, i, o, l) {
|
|
6590
6590
|
super(e, t, r, s, i, null, o, l, 0);
|
|
6591
6591
|
}
|
|
@@ -6616,7 +6616,7 @@ class Nr extends Ge {
|
|
|
6616
6616
|
}
|
|
6617
6617
|
slice(e, t, r) {
|
|
6618
6618
|
let s = this.node.cut(e, t), i = document.createTextNode(s.text);
|
|
6619
|
-
return new
|
|
6619
|
+
return new Ir(this.parent, s, this.outerDeco, this.innerDeco, i, i, r);
|
|
6620
6620
|
}
|
|
6621
6621
|
markDirty(e, t) {
|
|
6622
6622
|
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = ve);
|
|
@@ -6700,7 +6700,7 @@ const Jt = function(n) {
|
|
|
6700
6700
|
};
|
|
6701
6701
|
Jt.prototype = /* @__PURE__ */ Object.create(null);
|
|
6702
6702
|
const st = [new Jt()];
|
|
6703
|
-
function
|
|
6703
|
+
function Ms(n, e, t) {
|
|
6704
6704
|
if (n.length == 0)
|
|
6705
6705
|
return st;
|
|
6706
6706
|
let r = t ? st[0] : new Jt(), s = [r];
|
|
@@ -6753,9 +6753,9 @@ function Bd(n, e, t) {
|
|
|
6753
6753
|
}
|
|
6754
6754
|
}
|
|
6755
6755
|
function ca(n, e, t) {
|
|
6756
|
-
return aa(n, n, st,
|
|
6756
|
+
return aa(n, n, st, Ms(e, t, n.nodeType != 1));
|
|
6757
6757
|
}
|
|
6758
|
-
function
|
|
6758
|
+
function Hn(n, e) {
|
|
6759
6759
|
if (n.length != e.length)
|
|
6760
6760
|
return !1;
|
|
6761
6761
|
for (let t = 0; t < n.length; t++)
|
|
@@ -6857,7 +6857,7 @@ class zd {
|
|
|
6857
6857
|
let c = this.preMatch.matched.get(a);
|
|
6858
6858
|
if (c != null && c != i)
|
|
6859
6859
|
return !1;
|
|
6860
|
-
let u = a.dom, d, f = this.isLocked(u) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != ve &&
|
|
6860
|
+
let u = a.dom, d, f = this.isLocked(u) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != ve && Hn(t, a.outerDeco));
|
|
6861
6861
|
if (!f && a.update(e, t, r, s))
|
|
6862
6862
|
return this.destroyBetween(this.index, l), a.dom != u && (this.changed = !0), this.index++, !0;
|
|
6863
6863
|
if (!f && (d = this.recreateWrapper(a, e, t, r, s, o)))
|
|
@@ -6870,7 +6870,7 @@ class zd {
|
|
|
6870
6870
|
// When a node with content is replaced by a different node with
|
|
6871
6871
|
// identical content, move over its children.
|
|
6872
6872
|
recreateWrapper(e, t, r, s, i, o) {
|
|
6873
|
-
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !
|
|
6873
|
+
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Hn(r, e.outerDeco) || !s.eq(e.innerDeco))
|
|
6874
6874
|
return null;
|
|
6875
6875
|
let l = Ge.create(this.top, t, r, s, i, o);
|
|
6876
6876
|
if (l.contentDOM) {
|
|
@@ -6901,7 +6901,7 @@ class zd {
|
|
|
6901
6901
|
for (; e instanceof mt; )
|
|
6902
6902
|
t = e, e = t.children[t.children.length - 1];
|
|
6903
6903
|
(!e || // Empty textblock
|
|
6904
|
-
!(e instanceof
|
|
6904
|
+
!(e instanceof Ir) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((ee || q) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
|
|
6905
6905
|
}
|
|
6906
6906
|
addHackNode(e, t) {
|
|
6907
6907
|
if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
|
|
@@ -7025,7 +7025,7 @@ function _d(n, e, t, r) {
|
|
|
7025
7025
|
}
|
|
7026
7026
|
return -1;
|
|
7027
7027
|
}
|
|
7028
|
-
function
|
|
7028
|
+
function Ts(n, e, t, r, s) {
|
|
7029
7029
|
let i = [];
|
|
7030
7030
|
for (let o = 0, l = 0; o < n.length; o++) {
|
|
7031
7031
|
let a = n[o], c = l, u = l += a.size;
|
|
@@ -7033,7 +7033,7 @@ function Ms(n, e, t, r, s) {
|
|
|
7033
7033
|
}
|
|
7034
7034
|
return i;
|
|
7035
7035
|
}
|
|
7036
|
-
function
|
|
7036
|
+
function ti(n, e = null) {
|
|
7037
7037
|
let t = n.domSelectionRange(), r = n.state.doc;
|
|
7038
7038
|
if (!t.focusNode)
|
|
7039
7039
|
return null;
|
|
@@ -7041,7 +7041,7 @@ function ei(n, e = null) {
|
|
|
7041
7041
|
if (o < 0)
|
|
7042
7042
|
return null;
|
|
7043
7043
|
let l = r.resolve(o), a, c;
|
|
7044
|
-
if (
|
|
7044
|
+
if (Or(t)) {
|
|
7045
7045
|
for (a = o; s && !s.node; )
|
|
7046
7046
|
s = s.parent;
|
|
7047
7047
|
let d = s.node;
|
|
@@ -7067,7 +7067,7 @@ function ei(n, e = null) {
|
|
|
7067
7067
|
let u = r.resolve(a);
|
|
7068
7068
|
if (!c) {
|
|
7069
7069
|
let d = e == "pointer" || n.state.selection.head < l.pos && !i ? 1 : -1;
|
|
7070
|
-
c =
|
|
7070
|
+
c = ni(n, u, l, d);
|
|
7071
7071
|
}
|
|
7072
7072
|
return c;
|
|
7073
7073
|
}
|
|
@@ -7097,15 +7097,15 @@ const uo = ee || q && Xl < 63;
|
|
|
7097
7097
|
function fo(n, e) {
|
|
7098
7098
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), s = r < t.childNodes.length ? t.childNodes[r] : null, i = r ? t.childNodes[r - 1] : null;
|
|
7099
7099
|
if (ee && s && s.contentEditable == "false")
|
|
7100
|
-
return
|
|
7100
|
+
return Yr(s);
|
|
7101
7101
|
if ((!s || s.contentEditable == "false") && (!i || i.contentEditable == "false")) {
|
|
7102
7102
|
if (s)
|
|
7103
|
-
return
|
|
7103
|
+
return Yr(s);
|
|
7104
7104
|
if (i)
|
|
7105
|
-
return
|
|
7105
|
+
return Yr(i);
|
|
7106
7106
|
}
|
|
7107
7107
|
}
|
|
7108
|
-
function
|
|
7108
|
+
function Yr(n) {
|
|
7109
7109
|
return n.contentEditable = "true", ee && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
7110
7110
|
}
|
|
7111
7111
|
function ho(n) {
|
|
@@ -7138,7 +7138,7 @@ function da(n, e) {
|
|
|
7138
7138
|
function po(n) {
|
|
7139
7139
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
7140
7140
|
}
|
|
7141
|
-
function
|
|
7141
|
+
function ni(n, e, t, r) {
|
|
7142
7142
|
return n.someProp("createSelectionBetween", (s) => s(n, e, t)) || N.between(e, t, r);
|
|
7143
7143
|
}
|
|
7144
7144
|
function mo(n) {
|
|
@@ -7158,7 +7158,7 @@ function Kd(n) {
|
|
|
7158
7158
|
let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
|
|
7159
7159
|
return pt(e.node, e.offset, t.anchorNode, t.anchorOffset);
|
|
7160
7160
|
}
|
|
7161
|
-
function
|
|
7161
|
+
function vs(n, e) {
|
|
7162
7162
|
let { $anchor: t, $head: r } = n.selection, s = e > 0 ? t.max(r) : t.min(r), i = s.parent.inlineContent ? s.depth ? n.doc.resolve(e > 0 ? s.after() : s.before()) : null : s;
|
|
7163
7163
|
return i && I.findFrom(i, e);
|
|
7164
7164
|
}
|
|
@@ -7176,7 +7176,7 @@ function go(n, e, t) {
|
|
|
7176
7176
|
return Fe(n, new N(r.$anchor, o));
|
|
7177
7177
|
} else if (r.empty) {
|
|
7178
7178
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
7179
|
-
let s =
|
|
7179
|
+
let s = vs(n.state, e);
|
|
7180
7180
|
return s && s instanceof v ? Fe(n, s) : !1;
|
|
7181
7181
|
} else if (!(me && t.indexOf("m") > -1)) {
|
|
7182
7182
|
let s = r.$head, i = s.textOffset ? null : e < 0 ? s.nodeBefore : s.nodeAfter, o;
|
|
@@ -7190,12 +7190,12 @@ function go(n, e, t) {
|
|
|
7190
7190
|
if (r instanceof v && r.node.isInline)
|
|
7191
7191
|
return Fe(n, new N(e > 0 ? r.$to : r.$from));
|
|
7192
7192
|
{
|
|
7193
|
-
let s =
|
|
7193
|
+
let s = vs(n.state, e);
|
|
7194
7194
|
return s ? Fe(n, s) : !1;
|
|
7195
7195
|
}
|
|
7196
7196
|
}
|
|
7197
7197
|
}
|
|
7198
|
-
function
|
|
7198
|
+
function _n(n) {
|
|
7199
7199
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
7200
7200
|
}
|
|
7201
7201
|
function Gt(n, e) {
|
|
@@ -7210,7 +7210,7 @@ function Ud(n) {
|
|
|
7210
7210
|
if (!t)
|
|
7211
7211
|
return;
|
|
7212
7212
|
let s, i, o = !1;
|
|
7213
|
-
for (ye && t.nodeType == 1 && r <
|
|
7213
|
+
for (ye && t.nodeType == 1 && r < _n(t) && Gt(t.childNodes[r], -1) && (o = !0); ; )
|
|
7214
7214
|
if (r > 0) {
|
|
7215
7215
|
if (t.nodeType != 1)
|
|
7216
7216
|
break;
|
|
@@ -7231,7 +7231,7 @@ function Ud(n) {
|
|
|
7231
7231
|
for (; l && Gt(l, -1); )
|
|
7232
7232
|
s = t.parentNode, i = X(l), l = l.previousSibling;
|
|
7233
7233
|
if (l)
|
|
7234
|
-
t = l, r =
|
|
7234
|
+
t = l, r = _n(t);
|
|
7235
7235
|
else {
|
|
7236
7236
|
if (t = t.parentNode, t == n.dom)
|
|
7237
7237
|
break;
|
|
@@ -7239,13 +7239,13 @@ function Ud(n) {
|
|
|
7239
7239
|
}
|
|
7240
7240
|
}
|
|
7241
7241
|
}
|
|
7242
|
-
o ?
|
|
7242
|
+
o ? Es(n, t, r) : s && Es(n, s, i);
|
|
7243
7243
|
}
|
|
7244
7244
|
function qd(n) {
|
|
7245
7245
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
7246
7246
|
if (!t)
|
|
7247
7247
|
return;
|
|
7248
|
-
let s =
|
|
7248
|
+
let s = _n(t), i, o;
|
|
7249
7249
|
for (; ; )
|
|
7250
7250
|
if (r < s) {
|
|
7251
7251
|
if (t.nodeType != 1)
|
|
@@ -7263,7 +7263,7 @@ function qd(n) {
|
|
|
7263
7263
|
for (; l && Gt(l, 1); )
|
|
7264
7264
|
i = l.parentNode, o = X(l) + 1, l = l.nextSibling;
|
|
7265
7265
|
if (l)
|
|
7266
|
-
t = l, r = 0, s =
|
|
7266
|
+
t = l, r = 0, s = _n(t);
|
|
7267
7267
|
else {
|
|
7268
7268
|
if (t = t.parentNode, t == n.dom)
|
|
7269
7269
|
break;
|
|
@@ -7271,7 +7271,7 @@ function qd(n) {
|
|
|
7271
7271
|
}
|
|
7272
7272
|
}
|
|
7273
7273
|
}
|
|
7274
|
-
i &&
|
|
7274
|
+
i && Es(n, i, o);
|
|
7275
7275
|
}
|
|
7276
7276
|
function ha(n) {
|
|
7277
7277
|
let e = n.pmViewDesc;
|
|
@@ -7301,7 +7301,7 @@ function Gd(n, e) {
|
|
|
7301
7301
|
n = t, e = n.childNodes.length;
|
|
7302
7302
|
}
|
|
7303
7303
|
}
|
|
7304
|
-
function
|
|
7304
|
+
function Es(n, e, t) {
|
|
7305
7305
|
if (e.nodeType != 3) {
|
|
7306
7306
|
let i, o;
|
|
7307
7307
|
(o = Jd(e, t)) ? (e = o, t = 0) : (i = Gd(e, t)) && (e = i, t = i.nodeValue.length);
|
|
@@ -7309,7 +7309,7 @@ function vs(n, e, t) {
|
|
|
7309
7309
|
let r = n.domSelection();
|
|
7310
7310
|
if (!r)
|
|
7311
7311
|
return;
|
|
7312
|
-
if (
|
|
7312
|
+
if (Or(r)) {
|
|
7313
7313
|
let i = document.createRange();
|
|
7314
7314
|
i.setEnd(e, t), i.setStart(e, t), r.removeAllRanges(), r.addRange(i);
|
|
7315
7315
|
} else r.extend && r.extend(e, t);
|
|
@@ -7342,7 +7342,7 @@ function ko(n, e, t) {
|
|
|
7342
7342
|
return !1;
|
|
7343
7343
|
let { $from: s, $to: i } = r;
|
|
7344
7344
|
if (!s.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
7345
|
-
let o =
|
|
7345
|
+
let o = vs(n.state, e);
|
|
7346
7346
|
if (o && o instanceof v)
|
|
7347
7347
|
return Fe(n, o);
|
|
7348
7348
|
}
|
|
@@ -7410,7 +7410,7 @@ function Qd(n, e) {
|
|
|
7410
7410
|
}
|
|
7411
7411
|
return !1;
|
|
7412
7412
|
}
|
|
7413
|
-
function
|
|
7413
|
+
function ri(n, e) {
|
|
7414
7414
|
n.someProp("transformCopied", (h) => {
|
|
7415
7415
|
e = h(e, n);
|
|
7416
7416
|
});
|
|
@@ -7539,12 +7539,12 @@ function ya(n, e) {
|
|
|
7539
7539
|
let t = n.content.replaceChild(n.childCount - 1, ya(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(k.empty, !0);
|
|
7540
7540
|
return n.copy(t.append(r));
|
|
7541
7541
|
}
|
|
7542
|
-
function
|
|
7542
|
+
function As(n, e, t, r, s, i) {
|
|
7543
7543
|
let o = e < 0 ? n.firstChild : n.lastChild, l = o.content;
|
|
7544
|
-
return n.childCount > 1 && (i = 0), s < r - 1 && (l =
|
|
7544
|
+
return n.childCount > 1 && (i = 0), s < r - 1 && (l = As(l, e, t, r, s + 1, i)), s >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, i <= s).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(k.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
|
|
7545
7545
|
}
|
|
7546
7546
|
function So(n, e, t) {
|
|
7547
|
-
return e < n.openStart && (n = new S(
|
|
7547
|
+
return e < n.openStart && (n = new S(As(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new S(As(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
7548
7548
|
}
|
|
7549
7549
|
const ka = {
|
|
7550
7550
|
thead: ["table"],
|
|
@@ -7561,10 +7561,10 @@ let wo = null;
|
|
|
7561
7561
|
function ba() {
|
|
7562
7562
|
return wo || (wo = document.implementation.createHTMLDocument("title"));
|
|
7563
7563
|
}
|
|
7564
|
-
let
|
|
7564
|
+
let Xr = null;
|
|
7565
7565
|
function tf(n) {
|
|
7566
7566
|
let e = window.trustedTypes;
|
|
7567
|
-
return e ? (
|
|
7567
|
+
return e ? (Xr || (Xr = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), Xr.createHTML(n)) : n;
|
|
7568
7568
|
}
|
|
7569
7569
|
function nf(n) {
|
|
7570
7570
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
@@ -7610,10 +7610,10 @@ function af(n) {
|
|
|
7610
7610
|
for (let e in re) {
|
|
7611
7611
|
let t = re[e];
|
|
7612
7612
|
n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
|
|
7613
|
-
uf(n, r) && !
|
|
7613
|
+
uf(n, r) && !si(n, r) && (n.editable || !(r.type in se)) && t(n, r);
|
|
7614
7614
|
}, of[e] ? { passive: !0 } : void 0);
|
|
7615
7615
|
}
|
|
7616
|
-
ee && n.dom.addEventListener("input", () => null),
|
|
7616
|
+
ee && n.dom.addEventListener("input", () => null), Ns(n);
|
|
7617
7617
|
}
|
|
7618
7618
|
function Ue(n, e) {
|
|
7619
7619
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
@@ -7624,13 +7624,13 @@ function cf(n) {
|
|
|
7624
7624
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
7625
7625
|
clearTimeout(n.input.composingTimeout), clearTimeout(n.input.lastIOSEnterFallbackTimeout);
|
|
7626
7626
|
}
|
|
7627
|
-
function
|
|
7627
|
+
function Ns(n) {
|
|
7628
7628
|
n.someProp("handleDOMEvents", (e) => {
|
|
7629
7629
|
for (let t in e)
|
|
7630
|
-
n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) =>
|
|
7630
|
+
n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => si(n, r));
|
|
7631
7631
|
});
|
|
7632
7632
|
}
|
|
7633
|
-
function
|
|
7633
|
+
function si(n, e) {
|
|
7634
7634
|
return n.someProp("handleDOMEvents", (t) => {
|
|
7635
7635
|
let r = t[e.type];
|
|
7636
7636
|
return r ? r(n, e) || e.defaultPrevented : !1;
|
|
@@ -7647,7 +7647,7 @@ function uf(n, e) {
|
|
|
7647
7647
|
return !0;
|
|
7648
7648
|
}
|
|
7649
7649
|
function df(n, e) {
|
|
7650
|
-
!
|
|
7650
|
+
!si(n, e) && re[e.type] && (n.editable || !(e.type in se)) && re[e.type](n, e);
|
|
7651
7651
|
}
|
|
7652
7652
|
se.keydown = (n, e) => {
|
|
7653
7653
|
let t = e;
|
|
@@ -7676,14 +7676,14 @@ se.keypress = (n, e) => {
|
|
|
7676
7676
|
!/[\r\n]/.test(s) && !n.someProp("handleTextInput", (o) => o(n, r.$from.pos, r.$to.pos, s, i)) && n.dispatch(i()), t.preventDefault();
|
|
7677
7677
|
}
|
|
7678
7678
|
};
|
|
7679
|
-
function
|
|
7679
|
+
function Dr(n) {
|
|
7680
7680
|
return { left: n.clientX, top: n.clientY };
|
|
7681
7681
|
}
|
|
7682
7682
|
function ff(n, e) {
|
|
7683
7683
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
7684
7684
|
return t * t + r * r < 100;
|
|
7685
7685
|
}
|
|
7686
|
-
function
|
|
7686
|
+
function ii(n, e, t, r, s) {
|
|
7687
7687
|
if (r == -1)
|
|
7688
7688
|
return !1;
|
|
7689
7689
|
let i = n.state.doc.resolve(r);
|
|
@@ -7720,13 +7720,13 @@ function pf(n, e) {
|
|
|
7720
7720
|
return s != null ? (Ot(n, v.create(n.state.doc, s)), !0) : !1;
|
|
7721
7721
|
}
|
|
7722
7722
|
function mf(n, e, t, r, s) {
|
|
7723
|
-
return
|
|
7723
|
+
return ii(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (i) => i(n, e, r)) || (s ? pf(n, t) : hf(n, t));
|
|
7724
7724
|
}
|
|
7725
7725
|
function gf(n, e, t, r) {
|
|
7726
|
-
return
|
|
7726
|
+
return ii(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (s) => s(n, e, r));
|
|
7727
7727
|
}
|
|
7728
7728
|
function yf(n, e, t, r) {
|
|
7729
|
-
return
|
|
7729
|
+
return ii(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (s) => s(n, e, r)) || kf(n, t, r);
|
|
7730
7730
|
}
|
|
7731
7731
|
function kf(n, e, t) {
|
|
7732
7732
|
if (t.button != 0)
|
|
@@ -7746,16 +7746,16 @@ function kf(n, e, t) {
|
|
|
7746
7746
|
return !0;
|
|
7747
7747
|
}
|
|
7748
7748
|
}
|
|
7749
|
-
function
|
|
7750
|
-
return
|
|
7749
|
+
function oi(n) {
|
|
7750
|
+
return jn(n);
|
|
7751
7751
|
}
|
|
7752
7752
|
const xa = me ? "metaKey" : "ctrlKey";
|
|
7753
7753
|
re.mousedown = (n, e) => {
|
|
7754
7754
|
let t = e;
|
|
7755
7755
|
n.input.shiftKey = t.shiftKey;
|
|
7756
|
-
let r =
|
|
7756
|
+
let r = oi(n), s = Date.now(), i = "singleClick";
|
|
7757
7757
|
s - n.input.lastClick.time < 500 && ff(t, n.input.lastClick) && !t[xa] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? i = "doubleClick" : n.input.lastClick.type == "doubleClick" && (i = "tripleClick")), n.input.lastClick = { time: s, x: t.clientX, y: t.clientY, type: i, button: t.button };
|
|
7758
|
-
let o = n.posAtCoords(
|
|
7758
|
+
let o = n.posAtCoords(Dr(t));
|
|
7759
7759
|
o && (i == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new bf(n, o, t, !!r)) : (i == "doubleClick" ? gf : yf)(n, o.pos, o.inside, t) ? t.preventDefault() : Ue(n, "pointer"));
|
|
7760
7760
|
};
|
|
7761
7761
|
class bf {
|
|
@@ -7787,7 +7787,7 @@ class bf {
|
|
|
7787
7787
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
7788
7788
|
return;
|
|
7789
7789
|
let t = this.pos;
|
|
7790
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(
|
|
7790
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Dr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Ue(this.view, "pointer") : mf(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
7791
7791
|
ee && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
7792
7792
|
// cursor, but still report that the node is selected
|
|
7793
7793
|
// when asked through getSelection. You'll then get a
|
|
@@ -7805,12 +7805,12 @@ class bf {
|
|
|
7805
7805
|
}
|
|
7806
7806
|
}
|
|
7807
7807
|
re.touchstart = (n) => {
|
|
7808
|
-
n.input.lastTouch = Date.now(),
|
|
7808
|
+
n.input.lastTouch = Date.now(), oi(n), Ue(n, "pointer");
|
|
7809
7809
|
};
|
|
7810
7810
|
re.touchmove = (n) => {
|
|
7811
7811
|
n.input.lastTouch = Date.now(), Ue(n, "pointer");
|
|
7812
7812
|
};
|
|
7813
|
-
re.contextmenu = (n) =>
|
|
7813
|
+
re.contextmenu = (n) => oi(n);
|
|
7814
7814
|
function Sa(n, e) {
|
|
7815
7815
|
return n.composing ? !0 : ee && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
7816
7816
|
}
|
|
@@ -7820,8 +7820,8 @@ se.compositionstart = se.compositionupdate = (n) => {
|
|
|
7820
7820
|
n.domObserver.flush();
|
|
7821
7821
|
let { state: e } = n, t = e.selection.$to;
|
|
7822
7822
|
if (e.selection instanceof N && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || q && Ql && Sf(n)))
|
|
7823
|
-
n.markCursor = n.state.storedMarks || t.marks(),
|
|
7824
|
-
else if (
|
|
7823
|
+
n.markCursor = n.state.storedMarks || t.marks(), jn(n, !0), n.markCursor = null;
|
|
7824
|
+
else if (jn(n, !e.selection.empty), ye && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
7825
7825
|
let r = n.domSelectionRange();
|
|
7826
7826
|
for (let s = r.focusNode, i = r.focusOffset; s && s.nodeType == 1 && i != 0; ) {
|
|
7827
7827
|
let o = i < 0 ? s.lastChild : s.childNodes[i - 1];
|
|
@@ -7850,7 +7850,7 @@ se.compositionend = (n, e) => {
|
|
|
7850
7850
|
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, wa(n, 20));
|
|
7851
7851
|
};
|
|
7852
7852
|
function wa(n, e) {
|
|
7853
|
-
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() =>
|
|
7853
|
+
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => jn(n), e));
|
|
7854
7854
|
}
|
|
7855
7855
|
function Ca(n) {
|
|
7856
7856
|
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Cf()); n.input.compositionNodes.length > 0; )
|
|
@@ -7879,10 +7879,10 @@ function Cf() {
|
|
|
7879
7879
|
let n = document.createEvent("Event");
|
|
7880
7880
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
7881
7881
|
}
|
|
7882
|
-
function
|
|
7882
|
+
function jn(n, e = !1) {
|
|
7883
7883
|
if (!(De && n.domObserver.flushingSoon >= 0)) {
|
|
7884
7884
|
if (n.domObserver.forceFlush(), Ca(n), e || n.docView && n.docView.dirty) {
|
|
7885
|
-
let t =
|
|
7885
|
+
let t = ti(n), r = n.state.selection;
|
|
7886
7886
|
return t && !t.eq(r) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
|
|
7887
7887
|
}
|
|
7888
7888
|
return !1;
|
|
@@ -7903,7 +7903,7 @@ re.copy = se.cut = (n, e) => {
|
|
|
7903
7903
|
let t = e, r = n.state.selection, s = t.type == "cut";
|
|
7904
7904
|
if (r.empty)
|
|
7905
7905
|
return;
|
|
7906
|
-
let i = ln ? null : t.clipboardData, o = r.content(), { dom: l, text: a } =
|
|
7906
|
+
let i = ln ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = ri(n, o);
|
|
7907
7907
|
i ? (t.preventDefault(), i.clearData(), i.setData("text/html", l.innerHTML), i.setData("text/plain", a)) : Mf(n, l), s && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
7908
7908
|
};
|
|
7909
7909
|
function Tf(n) {
|
|
@@ -7956,7 +7956,7 @@ re.dragstart = (n, e) => {
|
|
|
7956
7956
|
let t = e, r = n.input.mouseDown;
|
|
7957
7957
|
if (r && r.done(), !t.dataTransfer)
|
|
7958
7958
|
return;
|
|
7959
|
-
let s = n.state.selection, i = s.empty ? null : n.posAtCoords(
|
|
7959
|
+
let s = n.state.selection, i = s.empty ? null : n.posAtCoords(Dr(t)), o;
|
|
7960
7960
|
if (!(i && i.pos >= s.from && i.pos <= (s instanceof v ? s.to - 1 : s.to))) {
|
|
7961
7961
|
if (r && r.mightDrag)
|
|
7962
7962
|
o = v.create(n.state.doc, r.mightDrag.pos);
|
|
@@ -7965,7 +7965,7 @@ re.dragstart = (n, e) => {
|
|
|
7965
7965
|
d && d.node.type.spec.draggable && d != n.docView && (o = v.create(n.state.doc, d.posBefore));
|
|
7966
7966
|
}
|
|
7967
7967
|
}
|
|
7968
|
-
let l = (o || n.state.selection).content(), { dom: a, text: c, slice: u } =
|
|
7968
|
+
let l = (o || n.state.selection).content(), { dom: a, text: c, slice: u } = ri(n, l);
|
|
7969
7969
|
(!t.dataTransfer.files.length || !q || Xl > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(ln ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", ln || t.dataTransfer.setData("text/plain", c), n.dragging = new Ta(u, va(n, t), o);
|
|
7970
7970
|
};
|
|
7971
7971
|
re.dragend = (n) => {
|
|
@@ -7985,7 +7985,7 @@ se.drop = (n, e) => {
|
|
|
7985
7985
|
function Af(n, e, t) {
|
|
7986
7986
|
if (!e.dataTransfer)
|
|
7987
7987
|
return;
|
|
7988
|
-
let r = n.posAtCoords(
|
|
7988
|
+
let r = n.posAtCoords(Dr(e));
|
|
7989
7989
|
if (!r)
|
|
7990
7990
|
return;
|
|
7991
7991
|
let s = n.state.doc.resolve(r.pos), i = t && t.slice;
|
|
@@ -8015,7 +8015,7 @@ function Af(n, e, t) {
|
|
|
8015
8015
|
a.setSelection(new v(f));
|
|
8016
8016
|
else {
|
|
8017
8017
|
let h = a.mapping.map(l);
|
|
8018
|
-
a.mapping.maps[a.mapping.maps.length - 1].forEach((p, m, g, y) => h = y), a.setSelection(
|
|
8018
|
+
a.mapping.maps[a.mapping.maps.length - 1].forEach((p, m, g, y) => h = y), a.setSelection(ni(n, f, a.doc.resolve(h)));
|
|
8019
8019
|
}
|
|
8020
8020
|
n.focus(), n.dispatch(a.setMeta("uiEvent", "drop"));
|
|
8021
8021
|
}
|
|
@@ -8053,7 +8053,7 @@ function cn(n, e) {
|
|
|
8053
8053
|
return !1;
|
|
8054
8054
|
return !0;
|
|
8055
8055
|
}
|
|
8056
|
-
class
|
|
8056
|
+
class Wn {
|
|
8057
8057
|
constructor(e, t) {
|
|
8058
8058
|
this.toDOM = e, this.spec = t || ct, this.side = this.spec.side || 0;
|
|
8059
8059
|
}
|
|
@@ -8065,7 +8065,7 @@ class jn {
|
|
|
8065
8065
|
return !0;
|
|
8066
8066
|
}
|
|
8067
8067
|
eq(e) {
|
|
8068
|
-
return this == e || e instanceof
|
|
8068
|
+
return this == e || e instanceof Wn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && cn(this.spec, e.spec));
|
|
8069
8069
|
}
|
|
8070
8070
|
destroy(e) {
|
|
8071
8071
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -8091,7 +8091,7 @@ class Ye {
|
|
|
8091
8091
|
destroy() {
|
|
8092
8092
|
}
|
|
8093
8093
|
}
|
|
8094
|
-
class
|
|
8094
|
+
class li {
|
|
8095
8095
|
constructor(e, t) {
|
|
8096
8096
|
this.attrs = e, this.spec = t || ct;
|
|
8097
8097
|
}
|
|
@@ -8107,7 +8107,7 @@ class oi {
|
|
|
8107
8107
|
return s == t.from && !(i = e.child(r)).isText && s + i.nodeSize == t.to;
|
|
8108
8108
|
}
|
|
8109
8109
|
eq(e) {
|
|
8110
|
-
return this == e || e instanceof
|
|
8110
|
+
return this == e || e instanceof li && cn(this.attrs, e.attrs) && cn(this.spec, e.spec);
|
|
8111
8111
|
}
|
|
8112
8112
|
destroy() {
|
|
8113
8113
|
}
|
|
@@ -8146,7 +8146,7 @@ class ne {
|
|
|
8146
8146
|
widget's current document position.
|
|
8147
8147
|
*/
|
|
8148
8148
|
static widget(e, t, r) {
|
|
8149
|
-
return new ne(e, e, new
|
|
8149
|
+
return new ne(e, e, new Wn(t, r));
|
|
8150
8150
|
}
|
|
8151
8151
|
/**
|
|
8152
8152
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -8161,7 +8161,7 @@ class ne {
|
|
|
8161
8161
|
node, will receive the given attributes.
|
|
8162
8162
|
*/
|
|
8163
8163
|
static node(e, t, r, s) {
|
|
8164
|
-
return new ne(e, t, new
|
|
8164
|
+
return new ne(e, t, new li(r, s));
|
|
8165
8165
|
}
|
|
8166
8166
|
/**
|
|
8167
8167
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -8180,7 +8180,7 @@ class ne {
|
|
|
8180
8180
|
@internal
|
|
8181
8181
|
*/
|
|
8182
8182
|
get widget() {
|
|
8183
|
-
return this.type instanceof
|
|
8183
|
+
return this.type instanceof Wn;
|
|
8184
8184
|
}
|
|
8185
8185
|
}
|
|
8186
8186
|
const Tt = [], ct = {};
|
|
@@ -8197,7 +8197,7 @@ class z {
|
|
|
8197
8197
|
you must make a copy if you want need to preserve that.
|
|
8198
8198
|
*/
|
|
8199
8199
|
static create(e, t) {
|
|
8200
|
-
return t.length ?
|
|
8200
|
+
return t.length ? Kn(t, e, 0, ct) : Z;
|
|
8201
8201
|
}
|
|
8202
8202
|
/**
|
|
8203
8203
|
Find all decorations in this set which touch the given range
|
|
@@ -8256,7 +8256,7 @@ class z {
|
|
|
8256
8256
|
if (u = Aa(t, l, c)) {
|
|
8257
8257
|
for (s || (s = this.children.slice()); i < s.length && s[i] < a; )
|
|
8258
8258
|
i += 3;
|
|
8259
|
-
s[i] == a ? s[i + 2] = s[i + 2].addInner(l, u, c + 1) : s.splice(i, 0, a, a + l.nodeSize,
|
|
8259
|
+
s[i] == a ? s[i + 2] = s[i + 2].addInner(l, u, c + 1) : s.splice(i, 0, a, a + l.nodeSize, Kn(u, l, c + 1, ct)), i += 3;
|
|
8260
8260
|
}
|
|
8261
8261
|
});
|
|
8262
8262
|
let o = Ea(i ? Na(t) : t, -r);
|
|
@@ -8336,7 +8336,7 @@ class z {
|
|
|
8336
8336
|
@internal
|
|
8337
8337
|
*/
|
|
8338
8338
|
locals(e) {
|
|
8339
|
-
return
|
|
8339
|
+
return ai(this.localsInner(e));
|
|
8340
8340
|
}
|
|
8341
8341
|
/**
|
|
8342
8342
|
@internal
|
|
@@ -8356,7 +8356,7 @@ class z {
|
|
|
8356
8356
|
}
|
|
8357
8357
|
}
|
|
8358
8358
|
z.empty = new z([], []);
|
|
8359
|
-
z.removeOverlap =
|
|
8359
|
+
z.removeOverlap = ai;
|
|
8360
8360
|
const Z = z.empty;
|
|
8361
8361
|
class _e {
|
|
8362
8362
|
constructor(e) {
|
|
@@ -8397,7 +8397,7 @@ class _e {
|
|
|
8397
8397
|
t.push(i[o]);
|
|
8398
8398
|
}
|
|
8399
8399
|
}
|
|
8400
|
-
return t ?
|
|
8400
|
+
return t ? ai(r ? t : t.sort(ut)) : Tt;
|
|
8401
8401
|
}
|
|
8402
8402
|
// Create a group for the given array of decoration sets, or return
|
|
8403
8403
|
// a single set when possible.
|
|
@@ -8452,7 +8452,7 @@ function Nf(n, e, t, r, s, i, o) {
|
|
|
8452
8452
|
a = !0;
|
|
8453
8453
|
}
|
|
8454
8454
|
if (a) {
|
|
8455
|
-
let c = Of(l, n, e, t, s, i, o), u =
|
|
8455
|
+
let c = Of(l, n, e, t, s, i, o), u = Kn(c, r, 0, o);
|
|
8456
8456
|
e = u.local;
|
|
8457
8457
|
for (let d = 0; d < l.length; d += 3)
|
|
8458
8458
|
l[d + 1] < 0 && (l.splice(d, 3), d -= 3);
|
|
@@ -8502,13 +8502,13 @@ function Na(n) {
|
|
|
8502
8502
|
n[t] != null && e.push(n[t]);
|
|
8503
8503
|
return e;
|
|
8504
8504
|
}
|
|
8505
|
-
function
|
|
8505
|
+
function Kn(n, e, t, r) {
|
|
8506
8506
|
let s = [], i = !1;
|
|
8507
8507
|
e.forEach((l, a) => {
|
|
8508
8508
|
let c = Aa(n, l, a + t);
|
|
8509
8509
|
if (c) {
|
|
8510
8510
|
i = !0;
|
|
8511
|
-
let u =
|
|
8511
|
+
let u = Kn(c, l, t + a + 1, r);
|
|
8512
8512
|
u != Z && s.push(a, a + l.nodeSize, u);
|
|
8513
8513
|
}
|
|
8514
8514
|
});
|
|
@@ -8520,7 +8520,7 @@ function Wn(n, e, t, r) {
|
|
|
8520
8520
|
function ut(n, e) {
|
|
8521
8521
|
return n.from - e.from || n.to - e.to;
|
|
8522
8522
|
}
|
|
8523
|
-
function
|
|
8523
|
+
function ai(n) {
|
|
8524
8524
|
let e = n;
|
|
8525
8525
|
for (let t = 0; t < e.length - 1; t++) {
|
|
8526
8526
|
let r = e[t];
|
|
@@ -8543,7 +8543,7 @@ function Co(n, e, t) {
|
|
|
8543
8543
|
e++;
|
|
8544
8544
|
n.splice(e, 0, t);
|
|
8545
8545
|
}
|
|
8546
|
-
function
|
|
8546
|
+
function Qr(n) {
|
|
8547
8547
|
let e = [];
|
|
8548
8548
|
return n.someProp("decorations", (t) => {
|
|
8549
8549
|
let r = t(n.state);
|
|
@@ -8685,7 +8685,7 @@ class Pf {
|
|
|
8685
8685
|
}
|
|
8686
8686
|
}
|
|
8687
8687
|
let c = null;
|
|
8688
|
-
i < 0 && s && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 &&
|
|
8688
|
+
i < 0 && s && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Or(r) && (c = ti(e)) && c.eq(I.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Pe(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || s) && (i > -1 && (e.docView.markDirty(i, o), Lf(e)), this.handleDOMChange(i, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Pe(e), this.currentSelection.set(r));
|
|
8689
8689
|
}
|
|
8690
8690
|
registerMutation(e, t) {
|
|
8691
8691
|
if (t.indexOf(e.target) > -1)
|
|
@@ -8754,7 +8754,7 @@ function zf(n, e) {
|
|
|
8754
8754
|
}
|
|
8755
8755
|
function $f(n, e, t) {
|
|
8756
8756
|
let { node: r, fromOffset: s, toOffset: i, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
|
|
8757
|
-
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }],
|
|
8757
|
+
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], Or(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), q && n.input.lastKeyCode === 8)
|
|
8758
8758
|
for (let g = i; g > s; g--) {
|
|
8759
8759
|
let y = r.childNodes[g - 1], x = y.pmViewDesc;
|
|
8760
8760
|
if (y.nodeName == "BR" && !x) {
|
|
@@ -8799,7 +8799,7 @@ const Vf = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
8799
8799
|
function Hf(n, e, t, r, s) {
|
|
8800
8800
|
let i = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
8801
8801
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
8802
|
-
let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, D =
|
|
8802
|
+
let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, D = ti(n, M);
|
|
8803
8803
|
if (D && !n.state.selection.eq(D)) {
|
|
8804
8804
|
if (q && De && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (ae) => ae(n, nt(13, "Enter"))))
|
|
8805
8805
|
return;
|
|
@@ -8873,7 +8873,7 @@ function Hf(n, e, t, r, s) {
|
|
|
8873
8873
|
n.dispatch(w());
|
|
8874
8874
|
}
|
|
8875
8875
|
function Eo(n, e, t) {
|
|
8876
|
-
return Math.max(t.anchor, t.head) > e.content.size ? null :
|
|
8876
|
+
return Math.max(t.anchor, t.head) > e.content.size ? null : ni(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
8877
8877
|
}
|
|
8878
8878
|
function _f(n, e) {
|
|
8879
8879
|
let t = n.firstChild.marks, r = e.firstChild.marks, s = t, i = r, o, l, a;
|
|
@@ -8897,7 +8897,7 @@ function jf(n, e, t, r, s) {
|
|
|
8897
8897
|
if (
|
|
8898
8898
|
// The content must have shrunk
|
|
8899
8899
|
t - e <= s.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
8900
|
-
|
|
8900
|
+
Zr(r, !0, !1) < s.pos
|
|
8901
8901
|
)
|
|
8902
8902
|
return !1;
|
|
8903
8903
|
let i = n.resolve(e);
|
|
@@ -8907,10 +8907,10 @@ function jf(n, e, t, r, s) {
|
|
|
8907
8907
|
}
|
|
8908
8908
|
if (i.parentOffset < i.parent.content.size || !i.parent.isTextblock)
|
|
8909
8909
|
return !1;
|
|
8910
|
-
let o = n.resolve(
|
|
8911
|
-
return !o.parent.isTextblock || o.pos > t ||
|
|
8910
|
+
let o = n.resolve(Zr(i, !0, !0));
|
|
8911
|
+
return !o.parent.isTextblock || o.pos > t || Zr(o, !0, !1) < t ? !1 : r.parent.content.cut(r.parentOffset).eq(o.parent.content);
|
|
8912
8912
|
}
|
|
8913
|
-
function
|
|
8913
|
+
function Zr(n, e, t) {
|
|
8914
8914
|
let r = n.depth, s = e ? n.end() : n.pos;
|
|
8915
8915
|
for (; r > 0 && (e || n.indexAfter(r) == n.node(r).childCount); )
|
|
8916
8916
|
r--, s++, e = !1;
|
|
@@ -8954,7 +8954,7 @@ class Oa {
|
|
|
8954
8954
|
added to the document.
|
|
8955
8955
|
*/
|
|
8956
8956
|
constructor(e, t) {
|
|
8957
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new lf(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Ro), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Io(this), Oo(this), this.nodeViews = Do(this), this.docView = ao(this.state.doc, No(this),
|
|
8957
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new lf(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Ro), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Io(this), Oo(this), this.nodeViews = Do(this), this.docView = ao(this.state.doc, No(this), Qr(this), this.dom, this), this.domObserver = new Pf(this, (r, s, i, o) => Hf(this, r, s, i, o)), this.domObserver.start(), af(this), this.updatePluginViews();
|
|
8958
8958
|
}
|
|
8959
8959
|
/**
|
|
8960
8960
|
Holds `true` when a
|
|
@@ -8982,7 +8982,7 @@ class Oa {
|
|
|
8982
8982
|
the DOM.
|
|
8983
8983
|
*/
|
|
8984
8984
|
update(e) {
|
|
8985
|
-
e.handleDOMEvents != this._props.handleDOMEvents &&
|
|
8985
|
+
e.handleDOMEvents != this._props.handleDOMEvents && Ns(this);
|
|
8986
8986
|
let t = this._props;
|
|
8987
8987
|
this._props = e, e.plugins && (e.plugins.forEach(Ro), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
|
|
8988
8988
|
}
|
|
@@ -9016,8 +9016,8 @@ class Oa {
|
|
|
9016
9016
|
let h = Do(this);
|
|
9017
9017
|
Uf(h, this.nodeViews) && (this.nodeViews = h, i = !0);
|
|
9018
9018
|
}
|
|
9019
|
-
(l || t.handleDOMEvents != this._props.handleDOMEvents) &&
|
|
9020
|
-
let a =
|
|
9019
|
+
(l || t.handleDOMEvents != this._props.handleDOMEvents) && Ns(this), this.editable = Io(this), Oo(this);
|
|
9020
|
+
let a = Qr(this), c = No(this), u = s.plugins != e.plugins && !s.doc.eq(e.doc) ? "reset" : e.scrollToSelection > s.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, c, a);
|
|
9021
9021
|
(d || !e.selection.eq(s.selection)) && (o = !0);
|
|
9022
9022
|
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null && Sd(this);
|
|
9023
9023
|
if (o) {
|
|
@@ -9240,14 +9240,14 @@ class Oa {
|
|
|
9240
9240
|
[`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).
|
|
9241
9241
|
*/
|
|
9242
9242
|
serializeForClipboard(e) {
|
|
9243
|
-
return
|
|
9243
|
+
return ri(this, e);
|
|
9244
9244
|
}
|
|
9245
9245
|
/**
|
|
9246
9246
|
Removes the editor from the DOM and destroys all [node
|
|
9247
9247
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
9248
9248
|
*/
|
|
9249
9249
|
destroy() {
|
|
9250
|
-
this.docView && (cf(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [],
|
|
9250
|
+
this.docView && (cf(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Qr(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, dd());
|
|
9251
9251
|
}
|
|
9252
9252
|
/**
|
|
9253
9253
|
This is true when the view has been
|
|
@@ -9379,7 +9379,7 @@ var Xe = {
|
|
|
9379
9379
|
220: "\\",
|
|
9380
9380
|
221: "]",
|
|
9381
9381
|
222: "'"
|
|
9382
|
-
},
|
|
9382
|
+
}, Un = {
|
|
9383
9383
|
48: ")",
|
|
9384
9384
|
49: "!",
|
|
9385
9385
|
50: "@",
|
|
@@ -9408,10 +9408,10 @@ var Xe = {
|
|
|
9408
9408
|
for (var Q = 0; Q < 10; Q++) Xe[48 + Q] = Xe[96 + Q] = String(Q);
|
|
9409
9409
|
for (var Q = 1; Q <= 24; Q++) Xe[Q + 111] = "F" + Q;
|
|
9410
9410
|
for (var Q = 65; Q <= 90; Q++)
|
|
9411
|
-
Xe[Q] = String.fromCharCode(Q + 32),
|
|
9412
|
-
for (var
|
|
9411
|
+
Xe[Q] = String.fromCharCode(Q + 32), Un[Q] = String.fromCharCode(Q);
|
|
9412
|
+
for (var es in Xe) Un.hasOwnProperty(es) || (Un[es] = Xe[es]);
|
|
9413
9413
|
function Gf(n) {
|
|
9414
|
-
var e = qf && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Jf && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ?
|
|
9414
|
+
var e = qf && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Jf && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Un : Xe)[n.keyCode] || n.key || "Unidentified";
|
|
9415
9415
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
9416
9416
|
}
|
|
9417
9417
|
const Yf = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Xf = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
@@ -9442,7 +9442,7 @@ function Zf(n) {
|
|
|
9442
9442
|
e[Qf(t)] = n[t];
|
|
9443
9443
|
return e;
|
|
9444
9444
|
}
|
|
9445
|
-
function
|
|
9445
|
+
function ts(n, e, t = !0) {
|
|
9446
9446
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
|
|
9447
9447
|
}
|
|
9448
9448
|
function eh(n) {
|
|
@@ -9451,18 +9451,18 @@ function eh(n) {
|
|
|
9451
9451
|
function Ia(n) {
|
|
9452
9452
|
let e = Zf(n);
|
|
9453
9453
|
return function(t, r) {
|
|
9454
|
-
let s = Gf(r), i, o = e[
|
|
9454
|
+
let s = Gf(r), i, o = e[ts(s, r)];
|
|
9455
9455
|
if (o && o(t.state, t.dispatch, t))
|
|
9456
9456
|
return !0;
|
|
9457
9457
|
if (s.length == 1 && s != " ") {
|
|
9458
9458
|
if (r.shiftKey) {
|
|
9459
|
-
let l = e[
|
|
9459
|
+
let l = e[ts(s, r, !1)];
|
|
9460
9460
|
if (l && l(t.state, t.dispatch, t))
|
|
9461
9461
|
return !0;
|
|
9462
9462
|
}
|
|
9463
9463
|
if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
9464
9464
|
!(Xf && r.ctrlKey && r.altKey) && (i = Xe[r.keyCode]) && i != s) {
|
|
9465
|
-
let l = e[
|
|
9465
|
+
let l = e[ts(i, r)];
|
|
9466
9466
|
if (l && l(t.state, t.dispatch, t))
|
|
9467
9467
|
return !0;
|
|
9468
9468
|
}
|
|
@@ -9470,11 +9470,11 @@ function Ia(n) {
|
|
|
9470
9470
|
return !1;
|
|
9471
9471
|
};
|
|
9472
9472
|
}
|
|
9473
|
-
var th = Object.defineProperty,
|
|
9473
|
+
var th = Object.defineProperty, ci = (n, e) => {
|
|
9474
9474
|
for (var t in e)
|
|
9475
9475
|
th(n, t, { get: e[t], enumerable: !0 });
|
|
9476
9476
|
};
|
|
9477
|
-
function
|
|
9477
|
+
function Rr(n) {
|
|
9478
9478
|
const { state: e, transaction: t } = n;
|
|
9479
9479
|
let { selection: r } = t, { doc: s } = t, { storedMarks: i } = t;
|
|
9480
9480
|
return {
|
|
@@ -9499,7 +9499,7 @@ function Ir(n) {
|
|
|
9499
9499
|
}
|
|
9500
9500
|
};
|
|
9501
9501
|
}
|
|
9502
|
-
var
|
|
9502
|
+
var Pr = class {
|
|
9503
9503
|
constructor(n) {
|
|
9504
9504
|
this.editor = n.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = n.state;
|
|
9505
9505
|
}
|
|
@@ -9550,7 +9550,7 @@ var Dr = class {
|
|
|
9550
9550
|
tr: n,
|
|
9551
9551
|
editor: r,
|
|
9552
9552
|
view: i,
|
|
9553
|
-
state:
|
|
9553
|
+
state: Rr({
|
|
9554
9554
|
state: s,
|
|
9555
9555
|
transaction: n
|
|
9556
9556
|
}),
|
|
@@ -9567,7 +9567,7 @@ var Dr = class {
|
|
|
9567
9567
|
return o;
|
|
9568
9568
|
}
|
|
9569
9569
|
}, Da = {};
|
|
9570
|
-
|
|
9570
|
+
ci(Da, {
|
|
9571
9571
|
blur: () => nh,
|
|
9572
9572
|
clearContent: () => rh,
|
|
9573
9573
|
clearNodes: () => sh,
|
|
@@ -9691,16 +9691,16 @@ var ch = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
|
9691
9691
|
}, uh = (n) => ({ tr: e, dispatch: t }) => {
|
|
9692
9692
|
const { from: r, to: s } = n;
|
|
9693
9693
|
return t && e.delete(r, s), !0;
|
|
9694
|
-
}, dh = () => ({ state: n, dispatch: e }) =>
|
|
9695
|
-
function
|
|
9694
|
+
}, dh = () => ({ state: n, dispatch: e }) => Gs(n, e), fh = () => ({ commands: n }) => n.keyboardShortcut("Enter"), hh = () => ({ state: n, dispatch: e }) => Yu(n, e);
|
|
9695
|
+
function ui(n) {
|
|
9696
9696
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
9697
9697
|
}
|
|
9698
|
-
function
|
|
9698
|
+
function qn(n, e, t = { strict: !0 }) {
|
|
9699
9699
|
const r = Object.keys(e);
|
|
9700
|
-
return r.length ? r.every((s) => t.strict ? e[s] === n[s] :
|
|
9700
|
+
return r.length ? r.every((s) => t.strict ? e[s] === n[s] : ui(e[s]) ? e[s].test(n[s]) : e[s] === n[s]) : !0;
|
|
9701
9701
|
}
|
|
9702
9702
|
function Ra(n, e, t = {}) {
|
|
9703
|
-
return n.find((r) => r.type === e &&
|
|
9703
|
+
return n.find((r) => r.type === e && qn(
|
|
9704
9704
|
// Only check equality for the attributes that are provided
|
|
9705
9705
|
Object.fromEntries(Object.keys(t).map((s) => [s, r.attrs[s]])),
|
|
9706
9706
|
t
|
|
@@ -9709,7 +9709,7 @@ function Ra(n, e, t = {}) {
|
|
|
9709
9709
|
function Po(n, e, t = {}) {
|
|
9710
9710
|
return !!Ra(n, e, t);
|
|
9711
9711
|
}
|
|
9712
|
-
function
|
|
9712
|
+
function di(n, e, t) {
|
|
9713
9713
|
var r;
|
|
9714
9714
|
if (!n || !e)
|
|
9715
9715
|
return;
|
|
@@ -9737,7 +9737,7 @@ function Le(n, e) {
|
|
|
9737
9737
|
var ph = (n, e = {}) => ({ tr: t, state: r, dispatch: s }) => {
|
|
9738
9738
|
const i = Le(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: u } = l;
|
|
9739
9739
|
if (s) {
|
|
9740
|
-
const d =
|
|
9740
|
+
const d = di(a, i, e);
|
|
9741
9741
|
if (d && d.from <= c && d.to >= u) {
|
|
9742
9742
|
const f = N.create(o, d.from, d.to);
|
|
9743
9743
|
t.setSelection(f);
|
|
@@ -9771,7 +9771,7 @@ function La(n, e = null) {
|
|
|
9771
9771
|
function gh() {
|
|
9772
9772
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
9773
9773
|
}
|
|
9774
|
-
function
|
|
9774
|
+
function fi() {
|
|
9775
9775
|
return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
|
|
9776
9776
|
navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
9777
9777
|
}
|
|
@@ -9781,7 +9781,7 @@ var yh = (n = null, e = {}) => ({ editor: t, view: r, tr: s, dispatch: i }) => {
|
|
|
9781
9781
|
...e
|
|
9782
9782
|
};
|
|
9783
9783
|
const o = () => {
|
|
9784
|
-
(
|
|
9784
|
+
(fi() || gh()) && r.dom.focus(), requestAnimationFrame(() => {
|
|
9785
9785
|
t.isDestroyed || (r.focus(), e?.scrollIntoView && t.commands.scrollIntoView());
|
|
9786
9786
|
});
|
|
9787
9787
|
};
|
|
@@ -9937,14 +9937,14 @@ var Sh = (n) => !("type" in n), wh = (n, e, t) => ({ tr: r, dispatch: s, editor:
|
|
|
9937
9937
|
return !0;
|
|
9938
9938
|
}, Ch = () => ({ state: n, dispatch: e }) => qu(n, e), Mh = () => ({ state: n, dispatch: e }) => Ju(n, e), Th = () => ({ state: n, dispatch: e }) => Fl(n, e), vh = () => ({ state: n, dispatch: e }) => jl(n, e), Eh = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
9939
9939
|
try {
|
|
9940
|
-
const r =
|
|
9940
|
+
const r = Er(n.doc, n.selection.$from.pos, -1);
|
|
9941
9941
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
9942
9942
|
} catch {
|
|
9943
9943
|
return !1;
|
|
9944
9944
|
}
|
|
9945
9945
|
}, Ah = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
9946
9946
|
try {
|
|
9947
|
-
const r =
|
|
9947
|
+
const r = Er(n.doc, n.selection.$from.pos, 1);
|
|
9948
9948
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
9949
9949
|
} catch {
|
|
9950
9950
|
return !1;
|
|
@@ -9969,7 +9969,7 @@ function Ih(n) {
|
|
|
9969
9969
|
else if (/^s(hift)?$/i.test(a))
|
|
9970
9970
|
i = !0;
|
|
9971
9971
|
else if (/^mod$/i.test(a))
|
|
9972
|
-
|
|
9972
|
+
fi() || za() ? o = !0 : s = !0;
|
|
9973
9973
|
else
|
|
9974
9974
|
throw new Error(`Unrecognized modifier name: ${a}`);
|
|
9975
9975
|
}
|
|
@@ -10004,7 +10004,7 @@ function Qe(n, e, t = {}) {
|
|
|
10004
10004
|
to: p
|
|
10005
10005
|
});
|
|
10006
10006
|
});
|
|
10007
|
-
const a = s - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) =>
|
|
10007
|
+
const a = s - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => qn(d.node.attrs, t, { strict: !1 }));
|
|
10008
10008
|
return i ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= a;
|
|
10009
10009
|
}
|
|
10010
10010
|
var Rh = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
@@ -10014,7 +10014,7 @@ var Rh = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
|
10014
10014
|
const r = j(n, e.schema);
|
|
10015
10015
|
return ld(r)(e, t);
|
|
10016
10016
|
}, Bh = () => ({ state: n, dispatch: e }) => Kl(n, e);
|
|
10017
|
-
function
|
|
10017
|
+
function Lr(n, e) {
|
|
10018
10018
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
10019
10019
|
}
|
|
10020
10020
|
function Lo(n, e) {
|
|
@@ -10023,7 +10023,7 @@ function Lo(n, e) {
|
|
|
10023
10023
|
}
|
|
10024
10024
|
var zh = (n, e) => ({ tr: t, state: r, dispatch: s }) => {
|
|
10025
10025
|
let i = null, o = null;
|
|
10026
|
-
const l =
|
|
10026
|
+
const l = Lr(
|
|
10027
10027
|
typeof n == "string" ? n : n.name,
|
|
10028
10028
|
r.schema
|
|
10029
10029
|
);
|
|
@@ -10045,7 +10045,7 @@ var zh = (n, e) => ({ tr: t, state: r, dispatch: s }) => {
|
|
|
10045
10045
|
}
|
|
10046
10046
|
return !0;
|
|
10047
10047
|
}, Vh = () => ({ state: n, dispatch: e }) => Hl(n, e), Hh = () => ({ state: n, dispatch: e }) => Wl(n, e), _h = () => ({ state: n, dispatch: e }) => Zu(n, e), jh = () => ({ state: n, dispatch: e }) => nd(n, e), Wh = () => ({ state: n, dispatch: e }) => td(n, e);
|
|
10048
|
-
function
|
|
10048
|
+
function Os(n, e, t = {}, r = {}) {
|
|
10049
10049
|
return un(n, e, {
|
|
10050
10050
|
slice: !1,
|
|
10051
10051
|
parseOptions: t,
|
|
@@ -10055,7 +10055,7 @@ function Ns(n, e, t = {}, r = {}) {
|
|
|
10055
10055
|
var Kh = (n, { errorOnInvalidContent: e, emitUpdate: t = !0, parseOptions: r = {} } = {}) => ({ editor: s, tr: i, dispatch: o, commands: l }) => {
|
|
10056
10056
|
const { doc: a } = i;
|
|
10057
10057
|
if (r.preserveWhitespace !== "full") {
|
|
10058
|
-
const c =
|
|
10058
|
+
const c = Os(n, s.schema, r, {
|
|
10059
10059
|
errorOnInvalidContent: e ?? s.options.enableContentCheck
|
|
10060
10060
|
});
|
|
10061
10061
|
return o && i.replaceWith(0, a.content.size, c).setMeta("preventUpdate", !t), !0;
|
|
@@ -10110,7 +10110,7 @@ function Jh(n, e) {
|
|
|
10110
10110
|
};
|
|
10111
10111
|
}
|
|
10112
10112
|
}
|
|
10113
|
-
function
|
|
10113
|
+
function Br(n) {
|
|
10114
10114
|
return (e) => Jh(e.$from, n);
|
|
10115
10115
|
}
|
|
10116
10116
|
function T(n, e, t) {
|
|
@@ -10119,17 +10119,17 @@ function T(n, e, t) {
|
|
|
10119
10119
|
parent: n.parent ? T(n.parent, e, t) : null
|
|
10120
10120
|
}) : n.config[e];
|
|
10121
10121
|
}
|
|
10122
|
-
function
|
|
10122
|
+
function hi(n) {
|
|
10123
10123
|
return n.map((e) => {
|
|
10124
10124
|
const t = {
|
|
10125
10125
|
name: e.name,
|
|
10126
10126
|
options: e.options,
|
|
10127
10127
|
storage: e.storage
|
|
10128
10128
|
}, r = T(e, "addExtensions", t);
|
|
10129
|
-
return r ? [e, ...
|
|
10129
|
+
return r ? [e, ...hi(r())] : e;
|
|
10130
10130
|
}).flat(10);
|
|
10131
10131
|
}
|
|
10132
|
-
function
|
|
10132
|
+
function pi(n, e) {
|
|
10133
10133
|
const t = yt.fromSchema(e).serializeFragment(n), s = document.implementation.createHTMLDocument().createElement("div");
|
|
10134
10134
|
return s.appendChild(t), s.innerHTML;
|
|
10135
10135
|
}
|
|
@@ -10238,7 +10238,7 @@ function W(...n) {
|
|
|
10238
10238
|
}), r;
|
|
10239
10239
|
}, {});
|
|
10240
10240
|
}
|
|
10241
|
-
function
|
|
10241
|
+
function Jn(n, e) {
|
|
10242
10242
|
return e.filter((t) => t.type === n.type.name).filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(n.attrs) || {} : {
|
|
10243
10243
|
[t.name]: n.attrs[t.name]
|
|
10244
10244
|
}).reduce((t, r) => W(t, r), {});
|
|
@@ -10314,7 +10314,7 @@ function Xh(n, e) {
|
|
|
10314
10314
|
const m = T(c, "renderHTML", d);
|
|
10315
10315
|
m && (h.toDOM = (y) => m({
|
|
10316
10316
|
node: y,
|
|
10317
|
-
HTMLAttributes:
|
|
10317
|
+
HTMLAttributes: Jn(y, u)
|
|
10318
10318
|
}));
|
|
10319
10319
|
const g = T(c, "renderText", d);
|
|
10320
10320
|
return g && (h.toText = g), [c.name, h];
|
|
@@ -10347,7 +10347,7 @@ function Xh(n, e) {
|
|
|
10347
10347
|
const m = T(c, "renderHTML", d);
|
|
10348
10348
|
return m && (h.toDOM = (g) => m({
|
|
10349
10349
|
mark: g,
|
|
10350
|
-
HTMLAttributes:
|
|
10350
|
+
HTMLAttributes: Jn(g, u)
|
|
10351
10351
|
})), [c.name, h];
|
|
10352
10352
|
})
|
|
10353
10353
|
);
|
|
@@ -10361,14 +10361,14 @@ function Qh(n) {
|
|
|
10361
10361
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
10362
10362
|
return Array.from(new Set(e));
|
|
10363
10363
|
}
|
|
10364
|
-
function
|
|
10364
|
+
function Gn(n) {
|
|
10365
10365
|
return n.sort((t, r) => {
|
|
10366
10366
|
const s = T(t, "priority") || 100, i = T(r, "priority") || 100;
|
|
10367
10367
|
return s > i ? -1 : s < i ? 1 : 0;
|
|
10368
10368
|
});
|
|
10369
10369
|
}
|
|
10370
10370
|
function _a(n) {
|
|
10371
|
-
const e =
|
|
10371
|
+
const e = Gn(hi(n)), t = Qh(e.map((r) => r.name));
|
|
10372
10372
|
return t.length && console.warn(
|
|
10373
10373
|
`[tiptap warn]: Duplicate extension names found: [${t.map((r) => `'${r}'`).join(", ")}]. This can lead to issues.`
|
|
10374
10374
|
), e;
|
|
@@ -10414,7 +10414,7 @@ function ep(n, e) {
|
|
|
10414
10414
|
return o ? { ...o.attrs } : {};
|
|
10415
10415
|
}
|
|
10416
10416
|
function Ka(n, e) {
|
|
10417
|
-
const t =
|
|
10417
|
+
const t = Lr(
|
|
10418
10418
|
typeof e == "string" ? e : e.name,
|
|
10419
10419
|
n.schema
|
|
10420
10420
|
);
|
|
@@ -10463,7 +10463,7 @@ function Ua(n) {
|
|
|
10463
10463
|
function mi(n, e, t) {
|
|
10464
10464
|
const r = [];
|
|
10465
10465
|
return n === e ? t.resolve(n).marks().forEach((s) => {
|
|
10466
|
-
const i = t.resolve(n), o =
|
|
10466
|
+
const i = t.resolve(n), o = di(i, s.type);
|
|
10467
10467
|
o && r.push({
|
|
10468
10468
|
mark: s,
|
|
10469
10469
|
...o
|
|
@@ -10487,10 +10487,10 @@ var rp = (n, e, t, r = 20) => {
|
|
|
10487
10487
|
}
|
|
10488
10488
|
return [o, i];
|
|
10489
10489
|
};
|
|
10490
|
-
function
|
|
10490
|
+
function Cn(n, e) {
|
|
10491
10491
|
return e.nodes[n] || e.marks[n] || null;
|
|
10492
10492
|
}
|
|
10493
|
-
function
|
|
10493
|
+
function Rn(n, e, t) {
|
|
10494
10494
|
return Object.fromEntries(
|
|
10495
10495
|
Object.entries(t).filter(([r]) => {
|
|
10496
10496
|
const s = n.find((i) => i.type === e && i.name === r);
|
|
@@ -10512,10 +10512,10 @@ var sp = (n, e = 500) => {
|
|
|
10512
10512
|
t += s.isAtom && !s.isText ? u : u.slice(0, Math.max(0, r - i));
|
|
10513
10513
|
}), t;
|
|
10514
10514
|
};
|
|
10515
|
-
function
|
|
10515
|
+
function Is(n, e, t = {}) {
|
|
10516
10516
|
const { empty: r, ranges: s } = n.selection, i = e ? Le(e, n.schema) : null;
|
|
10517
10517
|
if (r)
|
|
10518
|
-
return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => i ? i.name === d.type.name : !0).find((d) =>
|
|
10518
|
+
return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => i ? i.name === d.type.name : !0).find((d) => qn(d.attrs, t, { strict: !1 }));
|
|
10519
10519
|
let o = 0;
|
|
10520
10520
|
const l = [];
|
|
10521
10521
|
if (s.forEach(({ $from: d, $to: f }) => {
|
|
@@ -10534,19 +10534,19 @@ function Os(n, e, t = {}) {
|
|
|
10534
10534
|
});
|
|
10535
10535
|
}), o === 0)
|
|
10536
10536
|
return !1;
|
|
10537
|
-
const a = l.filter((d) => i ? i.name === d.mark.type.name : !0).filter((d) =>
|
|
10537
|
+
const a = l.filter((d) => i ? i.name === d.mark.type.name : !0).filter((d) => qn(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = l.filter((d) => i ? d.mark.type !== i && d.mark.type.excludes(i) : !0).reduce((d, f) => d + f.to - f.from, 0);
|
|
10538
10538
|
return (a > 0 ? a + c : a) >= o;
|
|
10539
10539
|
}
|
|
10540
10540
|
function ip(n, e, t = {}) {
|
|
10541
10541
|
if (!e)
|
|
10542
|
-
return Qe(n, null, t) ||
|
|
10543
|
-
const r =
|
|
10544
|
-
return r === "node" ? Qe(n, e, t) : r === "mark" ?
|
|
10542
|
+
return Qe(n, null, t) || Is(n, null, t);
|
|
10543
|
+
const r = Lr(e, n.schema);
|
|
10544
|
+
return r === "node" ? Qe(n, e, t) : r === "mark" ? Is(n, e, t) : !1;
|
|
10545
10545
|
}
|
|
10546
10546
|
var op = (n, e) => {
|
|
10547
10547
|
const { $from: t, $to: r, $anchor: s } = n.selection;
|
|
10548
10548
|
if (e) {
|
|
10549
|
-
const i =
|
|
10549
|
+
const i = Br((l) => l.type.name === e)(n.selection);
|
|
10550
10550
|
if (!i)
|
|
10551
10551
|
return !1;
|
|
10552
10552
|
const o = n.doc.resolve(i.pos + 1);
|
|
@@ -10571,7 +10571,7 @@ function Vo(n, e) {
|
|
|
10571
10571
|
}, i = P(T(r, "group", s));
|
|
10572
10572
|
return typeof i != "string" ? !1 : i.split(" ").includes("list");
|
|
10573
10573
|
}
|
|
10574
|
-
function
|
|
10574
|
+
function zr(n, {
|
|
10575
10575
|
checkChildren: e = !0,
|
|
10576
10576
|
ignoreWhitespace: t = !1
|
|
10577
10577
|
} = {}) {
|
|
@@ -10591,7 +10591,7 @@ function Lr(n, {
|
|
|
10591
10591
|
if (e) {
|
|
10592
10592
|
let s = !0;
|
|
10593
10593
|
return n.content.forEach((i) => {
|
|
10594
|
-
s !== !1 && (
|
|
10594
|
+
s !== !1 && (zr(i, { ignoreWhitespace: t, checkChildren: e }) || (s = !1));
|
|
10595
10595
|
}), s;
|
|
10596
10596
|
}
|
|
10597
10597
|
return !1;
|
|
@@ -10716,7 +10716,7 @@ function Ho(n, e) {
|
|
|
10716
10716
|
}
|
|
10717
10717
|
}
|
|
10718
10718
|
var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: s }) => {
|
|
10719
|
-
const { selection: i, doc: o } = e, { $from: l, $to: a } = i, c = s.extensionManager.attributes, u =
|
|
10719
|
+
const { selection: i, doc: o } = e, { $from: l, $to: a } = i, c = s.extensionManager.attributes, u = Rn(c, l.node().type.name, l.node().attrs);
|
|
10720
10720
|
if (i instanceof v && i.node.isBlock)
|
|
10721
10721
|
return !l.parentOffset || !Re(o, l.pos) ? !1 : (r && (n && Ho(t, s.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
10722
10722
|
if (!l.parent.isBlock)
|
|
@@ -10762,7 +10762,7 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10762
10762
|
// eslint-disable-next-line no-nested-ternary
|
|
10763
10763
|
a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
|
|
10764
10764
|
), E = {
|
|
10765
|
-
...
|
|
10765
|
+
...Rn(f, a.node().type.name, a.node().attrs),
|
|
10766
10766
|
...e
|
|
10767
10767
|
}, w = ((o = l.contentMatch.defaultType) == null ? void 0 : o.createAndFill(E)) || void 0;
|
|
10768
10768
|
y = y.append(k.from(l.createAndFill(null, w) || void 0));
|
|
@@ -10778,10 +10778,10 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10778
10778
|
return !0;
|
|
10779
10779
|
}
|
|
10780
10780
|
const h = c.pos === a.end() ? d.contentMatchAt(0).defaultType : null, p = {
|
|
10781
|
-
...
|
|
10781
|
+
...Rn(f, d.type.name, d.attrs),
|
|
10782
10782
|
...e
|
|
10783
10783
|
}, m = {
|
|
10784
|
-
...
|
|
10784
|
+
...Rn(f, a.node().type.name, a.node().attrs),
|
|
10785
10785
|
...e
|
|
10786
10786
|
};
|
|
10787
10787
|
t.delete(a.pos, c.pos);
|
|
@@ -10799,8 +10799,8 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10799
10799
|
t.ensureMarks(w);
|
|
10800
10800
|
}
|
|
10801
10801
|
return !0;
|
|
10802
|
-
},
|
|
10803
|
-
const t =
|
|
10802
|
+
}, ns = (n, e) => {
|
|
10803
|
+
const t = Br((o) => o.type === e)(n.selection);
|
|
10804
10804
|
if (!t)
|
|
10805
10805
|
return !0;
|
|
10806
10806
|
const r = n.doc.resolve(Math.max(0, t.pos - 1)).before(t.depth);
|
|
@@ -10808,8 +10808,8 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10808
10808
|
return !0;
|
|
10809
10809
|
const s = n.doc.nodeAt(r);
|
|
10810
10810
|
return t.node.type === s?.type && Ze(n.doc, t.pos) && n.join(t.pos), !0;
|
|
10811
|
-
},
|
|
10812
|
-
const t =
|
|
10811
|
+
}, rs = (n, e) => {
|
|
10812
|
+
const t = Br((o) => o.type === e)(n.selection);
|
|
10813
10813
|
if (!t)
|
|
10814
10814
|
return !0;
|
|
10815
10815
|
const r = n.doc.resolve(t.start).after(t.depth);
|
|
@@ -10821,20 +10821,20 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10821
10821
|
const { extensions: d, splittableMarks: f } = s.extensionManager, h = j(n, o.schema), p = j(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, C = y.blockRange(x), E = g || m.$to.parentOffset && m.$from.marks();
|
|
10822
10822
|
if (!C)
|
|
10823
10823
|
return !1;
|
|
10824
|
-
const w =
|
|
10824
|
+
const w = Br((A) => Vo(A.type.name, d))(m);
|
|
10825
10825
|
if (C.depth >= 1 && w && C.depth - w.depth <= 1) {
|
|
10826
10826
|
if (w.node.type === h)
|
|
10827
10827
|
return c.liftListItem(p);
|
|
10828
10828
|
if (Vo(w.node.type.name, d) && h.validContent(w.node.content) && l)
|
|
10829
|
-
return a().command(() => (i.setNodeMarkup(w.pos, h), !0)).command(() =>
|
|
10829
|
+
return a().command(() => (i.setNodeMarkup(w.pos, h), !0)).command(() => ns(i, h)).command(() => rs(i, h)).run();
|
|
10830
10830
|
}
|
|
10831
|
-
return !t || !E || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() =>
|
|
10831
|
+
return !t || !E || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ns(i, h)).command(() => rs(i, h)).run() : a().command(() => {
|
|
10832
10832
|
const A = u().wrapInList(h, r), M = E.filter((D) => f.includes(D.type.name));
|
|
10833
10833
|
return i.ensureMarks(M), A ? !0 : c.clearNodes();
|
|
10834
|
-
}).wrapInList(h, r).command(() =>
|
|
10834
|
+
}).wrapInList(h, r).command(() => ns(i, h)).command(() => rs(i, h)).run();
|
|
10835
10835
|
}, Sp = (n, e = {}, t = {}) => ({ state: r, commands: s }) => {
|
|
10836
10836
|
const { extendEmptyMarkRange: i = !1 } = t, o = Le(n, r.schema);
|
|
10837
|
-
return
|
|
10837
|
+
return Is(r, o, e) ? s.unsetMark(o, { extendEmptyMarkRange: i }) : s.setMark(o, e);
|
|
10838
10838
|
}, wp = (n, e, t = {}) => ({ state: r, commands: s }) => {
|
|
10839
10839
|
const i = j(n, r.schema), o = j(e, r.schema), l = Qe(r, i, t);
|
|
10840
10840
|
let a;
|
|
@@ -10874,7 +10874,7 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10874
10874
|
return !0;
|
|
10875
10875
|
if (u && o) {
|
|
10876
10876
|
let { from: f, to: h } = l;
|
|
10877
|
-
const p = (i = c.marks().find((g) => g.type === a)) == null ? void 0 : i.attrs, m =
|
|
10877
|
+
const p = (i = c.marks().find((g) => g.type === a)) == null ? void 0 : i.attrs, m = di(c, a, p);
|
|
10878
10878
|
m && (f = m.from, h = m.to), t.removeMark(f, h, a);
|
|
10879
10879
|
} else
|
|
10880
10880
|
d.forEach((f) => {
|
|
@@ -10892,7 +10892,7 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10892
10892
|
}), !0;
|
|
10893
10893
|
}, Ap = (n, e = {}) => ({ tr: t, state: r, dispatch: s }) => {
|
|
10894
10894
|
let i = null, o = null;
|
|
10895
|
-
const l =
|
|
10895
|
+
const l = Lr(
|
|
10896
10896
|
typeof n == "string" ? n : n.name,
|
|
10897
10897
|
r.schema
|
|
10898
10898
|
);
|
|
@@ -10966,13 +10966,13 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10966
10966
|
removeAllListeners() {
|
|
10967
10967
|
this.callbacks = {};
|
|
10968
10968
|
}
|
|
10969
|
-
},
|
|
10969
|
+
}, $r = class {
|
|
10970
10970
|
constructor(n) {
|
|
10971
10971
|
var e;
|
|
10972
10972
|
this.find = n.find, this.handler = n.handler, this.undoable = (e = n.undoable) != null ? e : !0;
|
|
10973
10973
|
}
|
|
10974
10974
|
}, Dp = (n, e) => {
|
|
10975
|
-
if (
|
|
10975
|
+
if (ui(e))
|
|
10976
10976
|
return e.exec(n);
|
|
10977
10977
|
const t = e(n);
|
|
10978
10978
|
if (!t)
|
|
@@ -10980,7 +10980,7 @@ var kp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
10980
10980
|
const r = [t.text];
|
|
10981
10981
|
return r.index = t.index, r.input = n, r.data = t.data, t.replaceWith && (t.text.includes(t.replaceWith) || console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'), r.push(t.replaceWith)), r;
|
|
10982
10982
|
};
|
|
10983
|
-
function
|
|
10983
|
+
function Mn(n) {
|
|
10984
10984
|
var e;
|
|
10985
10985
|
const { editor: t, from: r, to: s, text: i, rules: o, plugin: l } = n, { view: a } = t;
|
|
10986
10986
|
if (a.composing)
|
|
@@ -10999,13 +10999,13 @@ function Cn(n) {
|
|
|
10999
10999
|
const h = Dp(d, f.find);
|
|
11000
11000
|
if (!h)
|
|
11001
11001
|
return;
|
|
11002
|
-
const p = a.state.tr, m =
|
|
11002
|
+
const p = a.state.tr, m = Rr({
|
|
11003
11003
|
state: a.state,
|
|
11004
11004
|
transaction: p
|
|
11005
11005
|
}), g = {
|
|
11006
11006
|
from: r - (h[0].length - i.length),
|
|
11007
11007
|
to: s
|
|
11008
|
-
}, { commands: y, chain: x, can: C } = new
|
|
11008
|
+
}, { commands: y, chain: x, can: C } = new Pr({
|
|
11009
11009
|
editor: t,
|
|
11010
11010
|
state: m
|
|
11011
11011
|
});
|
|
@@ -11037,9 +11037,9 @@ function Rp(n) {
|
|
|
11037
11037
|
const a = s.getMeta("applyInputRules");
|
|
11038
11038
|
return a && setTimeout(() => {
|
|
11039
11039
|
let { text: u } = a;
|
|
11040
|
-
typeof u == "string" ? u = u : u =
|
|
11040
|
+
typeof u == "string" ? u = u : u = pi(k.from(u), o.schema);
|
|
11041
11041
|
const { from: d } = a, f = d + u.length;
|
|
11042
|
-
|
|
11042
|
+
Mn({
|
|
11043
11043
|
editor: e,
|
|
11044
11044
|
from: d,
|
|
11045
11045
|
to: f,
|
|
@@ -11052,7 +11052,7 @@ function Rp(n) {
|
|
|
11052
11052
|
},
|
|
11053
11053
|
props: {
|
|
11054
11054
|
handleTextInput(s, i, o, l) {
|
|
11055
|
-
return
|
|
11055
|
+
return Mn({
|
|
11056
11056
|
editor: e,
|
|
11057
11057
|
from: i,
|
|
11058
11058
|
to: o,
|
|
@@ -11064,7 +11064,7 @@ function Rp(n) {
|
|
|
11064
11064
|
handleDOMEvents: {
|
|
11065
11065
|
compositionend: (s) => (setTimeout(() => {
|
|
11066
11066
|
const { $cursor: i } = s.state.selection;
|
|
11067
|
-
i &&
|
|
11067
|
+
i && Mn({
|
|
11068
11068
|
editor: e,
|
|
11069
11069
|
from: i.pos,
|
|
11070
11070
|
to: i.pos,
|
|
@@ -11080,7 +11080,7 @@ function Rp(n) {
|
|
|
11080
11080
|
if (i.key !== "Enter")
|
|
11081
11081
|
return !1;
|
|
11082
11082
|
const { $cursor: o } = s.state.selection;
|
|
11083
|
-
return o ?
|
|
11083
|
+
return o ? Mn({
|
|
11084
11084
|
editor: e,
|
|
11085
11085
|
from: o.pos,
|
|
11086
11086
|
to: o.pos,
|
|
@@ -11099,13 +11099,13 @@ function Rp(n) {
|
|
|
11099
11099
|
function Pp(n) {
|
|
11100
11100
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
11101
11101
|
}
|
|
11102
|
-
function
|
|
11102
|
+
function Tn(n) {
|
|
11103
11103
|
return Pp(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
11104
11104
|
}
|
|
11105
11105
|
function Ya(n, e) {
|
|
11106
11106
|
const t = { ...n };
|
|
11107
|
-
return
|
|
11108
|
-
|
|
11107
|
+
return Tn(n) && Tn(e) && Object.keys(e).forEach((r) => {
|
|
11108
|
+
Tn(e[r]) && Tn(n[r]) ? t[r] = Ya(n[r], e[r]) : t[r] = e[r];
|
|
11109
11109
|
}), t;
|
|
11110
11110
|
}
|
|
11111
11111
|
var gi = class {
|
|
@@ -11186,7 +11186,7 @@ var Bp = class {
|
|
|
11186
11186
|
this.find = n.find, this.handler = n.handler;
|
|
11187
11187
|
}
|
|
11188
11188
|
}, zp = (n, e, t) => {
|
|
11189
|
-
if (
|
|
11189
|
+
if (ui(e))
|
|
11190
11190
|
return [...n.matchAll(e)];
|
|
11191
11191
|
const r = e(n, t);
|
|
11192
11192
|
return r ? r.map((s) => {
|
|
@@ -11195,7 +11195,7 @@ var Bp = class {
|
|
|
11195
11195
|
}) : [];
|
|
11196
11196
|
};
|
|
11197
11197
|
function $p(n) {
|
|
11198
|
-
const { editor: e, state: t, from: r, to: s, rule: i, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new
|
|
11198
|
+
const { editor: e, state: t, from: r, to: s, rule: i, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new Pr({
|
|
11199
11199
|
editor: e,
|
|
11200
11200
|
state: t
|
|
11201
11201
|
}), d = [];
|
|
@@ -11227,7 +11227,7 @@ function $p(n) {
|
|
|
11227
11227
|
});
|
|
11228
11228
|
}), d.every((h) => h !== null);
|
|
11229
11229
|
}
|
|
11230
|
-
var
|
|
11230
|
+
var vn = null, Fp = (n) => {
|
|
11231
11231
|
var e;
|
|
11232
11232
|
const t = new ClipboardEvent("paste", {
|
|
11233
11233
|
clipboardData: new DataTransfer()
|
|
@@ -11249,7 +11249,7 @@ function Vp(n) {
|
|
|
11249
11249
|
rule: h,
|
|
11250
11250
|
pasteEvt: p
|
|
11251
11251
|
}) => {
|
|
11252
|
-
const m = u.tr, g =
|
|
11252
|
+
const m = u.tr, g = Rr({
|
|
11253
11253
|
state: u,
|
|
11254
11254
|
transaction: m
|
|
11255
11255
|
});
|
|
@@ -11275,9 +11275,9 @@ function Vp(n) {
|
|
|
11275
11275
|
view(d) {
|
|
11276
11276
|
const f = (p) => {
|
|
11277
11277
|
var m;
|
|
11278
|
-
r = (m = d.dom.parentElement) != null && m.contains(p.target) ? d.dom.parentElement : null, r && (
|
|
11278
|
+
r = (m = d.dom.parentElement) != null && m.contains(p.target) ? d.dom.parentElement : null, r && (vn = e);
|
|
11279
11279
|
}, h = () => {
|
|
11280
|
-
|
|
11280
|
+
vn && (vn = null);
|
|
11281
11281
|
};
|
|
11282
11282
|
return window.addEventListener("dragstart", f), window.addEventListener("dragend", h), {
|
|
11283
11283
|
destroy() {
|
|
@@ -11289,7 +11289,7 @@ function Vp(n) {
|
|
|
11289
11289
|
handleDOMEvents: {
|
|
11290
11290
|
drop: (d, f) => {
|
|
11291
11291
|
if (i = r === d.dom.parentElement, l = f, !i) {
|
|
11292
|
-
const h =
|
|
11292
|
+
const h = vn;
|
|
11293
11293
|
h?.isEditable && setTimeout(() => {
|
|
11294
11294
|
const p = h.state.selection;
|
|
11295
11295
|
p && h.commands.deleteRange({ from: p.from, to: p.to });
|
|
@@ -11310,7 +11310,7 @@ function Vp(n) {
|
|
|
11310
11310
|
return;
|
|
11311
11311
|
if (x) {
|
|
11312
11312
|
let { text: w } = y;
|
|
11313
|
-
typeof w == "string" ? w = w : w =
|
|
11313
|
+
typeof w == "string" ? w = w : w = pi(k.from(w), h.schema);
|
|
11314
11314
|
const { from: A } = y, M = A + w.length, D = Fp(w);
|
|
11315
11315
|
return a({
|
|
11316
11316
|
rule: u,
|
|
@@ -11332,7 +11332,7 @@ function Vp(n) {
|
|
|
11332
11332
|
}
|
|
11333
11333
|
}));
|
|
11334
11334
|
}
|
|
11335
|
-
var
|
|
11335
|
+
var Fr = class {
|
|
11336
11336
|
constructor(n, e) {
|
|
11337
11337
|
this.splittableMarks = [], this.editor = e, this.baseExtensions = n, this.extensions = _a(n), this.schema = Xh(this.extensions, e), this.setupExtensions();
|
|
11338
11338
|
}
|
|
@@ -11347,7 +11347,7 @@ var zr = class {
|
|
|
11347
11347
|
options: e.options,
|
|
11348
11348
|
storage: this.editor.extensionStorage[e.name],
|
|
11349
11349
|
editor: this.editor,
|
|
11350
|
-
type:
|
|
11350
|
+
type: Cn(e.name, this.schema)
|
|
11351
11351
|
}, r = T(e, "addCommands", t);
|
|
11352
11352
|
return r ? {
|
|
11353
11353
|
...n,
|
|
@@ -11361,13 +11361,13 @@ var zr = class {
|
|
|
11361
11361
|
*/
|
|
11362
11362
|
get plugins() {
|
|
11363
11363
|
const { editor: n } = this;
|
|
11364
|
-
return
|
|
11364
|
+
return Gn([...this.extensions].reverse()).flatMap((r) => {
|
|
11365
11365
|
const s = {
|
|
11366
11366
|
name: r.name,
|
|
11367
11367
|
options: r.options,
|
|
11368
11368
|
storage: this.editor.extensionStorage[r.name],
|
|
11369
11369
|
editor: n,
|
|
11370
|
-
type:
|
|
11370
|
+
type: Cn(r.name, this.schema)
|
|
11371
11371
|
}, i = [], o = T(
|
|
11372
11372
|
r,
|
|
11373
11373
|
"addKeyboardShortcuts",
|
|
@@ -11441,7 +11441,7 @@ var zr = class {
|
|
|
11441
11441
|
if (!o)
|
|
11442
11442
|
return [];
|
|
11443
11443
|
const l = (a, c, u, d, f) => {
|
|
11444
|
-
const h =
|
|
11444
|
+
const h = Jn(a, r);
|
|
11445
11445
|
return o({
|
|
11446
11446
|
// pass-through
|
|
11447
11447
|
node: a,
|
|
@@ -11459,6 +11459,30 @@ var zr = class {
|
|
|
11459
11459
|
})
|
|
11460
11460
|
);
|
|
11461
11461
|
}
|
|
11462
|
+
/**
|
|
11463
|
+
* Get the composed dispatchTransaction function from all extensions.
|
|
11464
|
+
* @param baseDispatch The base dispatch function (e.g. from the editor or user props)
|
|
11465
|
+
* @returns A composed dispatch function
|
|
11466
|
+
*/
|
|
11467
|
+
dispatchTransaction(n) {
|
|
11468
|
+
const { editor: e } = this;
|
|
11469
|
+
return Gn([...this.extensions].reverse()).reduceRight((r, s) => {
|
|
11470
|
+
const i = {
|
|
11471
|
+
name: s.name,
|
|
11472
|
+
options: s.options,
|
|
11473
|
+
storage: this.editor.extensionStorage[s.name],
|
|
11474
|
+
editor: e,
|
|
11475
|
+
type: Cn(s.name, this.schema)
|
|
11476
|
+
}, o = T(
|
|
11477
|
+
s,
|
|
11478
|
+
"dispatchTransaction",
|
|
11479
|
+
i
|
|
11480
|
+
);
|
|
11481
|
+
return o ? (l) => {
|
|
11482
|
+
o.call(i, { transaction: l, next: r });
|
|
11483
|
+
} : r;
|
|
11484
|
+
}, n);
|
|
11485
|
+
}
|
|
11462
11486
|
get markViews() {
|
|
11463
11487
|
const { editor: n } = this, { markExtensions: e } = Lt(this.extensions);
|
|
11464
11488
|
return Object.fromEntries(
|
|
@@ -11473,7 +11497,7 @@ var zr = class {
|
|
|
11473
11497
|
if (!i)
|
|
11474
11498
|
return [];
|
|
11475
11499
|
const o = (l, a, c) => {
|
|
11476
|
-
const u =
|
|
11500
|
+
const u = Jn(l, r);
|
|
11477
11501
|
return i()({
|
|
11478
11502
|
// pass-through
|
|
11479
11503
|
mark: l,
|
|
@@ -11507,7 +11531,7 @@ var zr = class {
|
|
|
11507
11531
|
options: e.options,
|
|
11508
11532
|
storage: this.editor.extensionStorage[e.name],
|
|
11509
11533
|
editor: this.editor,
|
|
11510
|
-
type:
|
|
11534
|
+
type: Cn(e.name, this.schema)
|
|
11511
11535
|
};
|
|
11512
11536
|
e.type === "mark" && ((t = P(T(e, "keepOnSplit", r))) == null || t) && this.splittableMarks.push(e.name);
|
|
11513
11537
|
const s = T(e, "onBeforeCreate", r), i = T(e, "onCreate", r), o = T(e, "onUpdate", r), l = T(
|
|
@@ -11519,11 +11543,11 @@ var zr = class {
|
|
|
11519
11543
|
});
|
|
11520
11544
|
}
|
|
11521
11545
|
};
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11546
|
+
Fr.resolve = _a;
|
|
11547
|
+
Fr.sort = Gn;
|
|
11548
|
+
Fr.flatten = hi;
|
|
11525
11549
|
var Hp = {};
|
|
11526
|
-
|
|
11550
|
+
ci(Hp, {
|
|
11527
11551
|
ClipboardTextSerializer: () => Za,
|
|
11528
11552
|
Commands: () => ec,
|
|
11529
11553
|
Delete: () => tc,
|
|
@@ -11741,7 +11765,7 @@ var H = class Qa extends gi {
|
|
|
11741
11765
|
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
11742
11766
|
"Ctrl-e": () => this.editor.commands.selectTextblockEnd()
|
|
11743
11767
|
};
|
|
11744
|
-
return
|
|
11768
|
+
return fi() || za() ? i : s;
|
|
11745
11769
|
},
|
|
11746
11770
|
addProseMirrorPlugins() {
|
|
11747
11771
|
return [
|
|
@@ -11759,12 +11783,12 @@ var H = class Qa extends gi {
|
|
|
11759
11783
|
if (!r || s)
|
|
11760
11784
|
return;
|
|
11761
11785
|
const { empty: i, from: o, to: l } = e.selection, a = I.atStart(e.doc).from, c = I.atEnd(e.doc).to;
|
|
11762
|
-
if (i || !(o === a && l === c) || !
|
|
11786
|
+
if (i || !(o === a && l === c) || !zr(t.doc))
|
|
11763
11787
|
return;
|
|
11764
|
-
const f = t.tr, h =
|
|
11788
|
+
const f = t.tr, h = Rr({
|
|
11765
11789
|
state: t,
|
|
11766
11790
|
transaction: f
|
|
11767
|
-
}), { commands: p } = new
|
|
11791
|
+
}), { commands: p } = new Pr({
|
|
11768
11792
|
editor: this.editor,
|
|
11769
11793
|
state: h
|
|
11770
11794
|
});
|
|
@@ -12085,7 +12109,8 @@ var Kp = class extends Ip {
|
|
|
12085
12109
|
},
|
|
12086
12110
|
onPaste: () => null,
|
|
12087
12111
|
onDrop: () => null,
|
|
12088
|
-
onDelete: () => null
|
|
12112
|
+
onDelete: () => null,
|
|
12113
|
+
enableExtensionDispatchTransaction: !0
|
|
12089
12114
|
}, this.isCapturingTransaction = !1, this.capturedTransaction = null, this.utils = {
|
|
12090
12115
|
getUpdatedPosition: ap,
|
|
12091
12116
|
createMappablePosition: cp
|
|
@@ -12271,13 +12296,13 @@ var Kp = class extends Ip {
|
|
|
12271
12296
|
direction: this.options.textDirection
|
|
12272
12297
|
})
|
|
12273
12298
|
].filter((i) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[i.name] !== !1 : !0) : [], ...this.options.extensions].filter((i) => ["extension", "node", "mark"].includes(i?.type));
|
|
12274
|
-
this.extensionManager = new
|
|
12299
|
+
this.extensionManager = new Fr(s, this);
|
|
12275
12300
|
}
|
|
12276
12301
|
/**
|
|
12277
12302
|
* Creates an command manager.
|
|
12278
12303
|
*/
|
|
12279
12304
|
createCommandManager() {
|
|
12280
|
-
this.commandManager = new
|
|
12305
|
+
this.commandManager = new Pr({
|
|
12281
12306
|
editor: this
|
|
12282
12307
|
});
|
|
12283
12308
|
}
|
|
@@ -12293,7 +12318,7 @@ var Kp = class extends Ip {
|
|
|
12293
12318
|
createDoc() {
|
|
12294
12319
|
let e;
|
|
12295
12320
|
try {
|
|
12296
|
-
e =
|
|
12321
|
+
e = Os(this.options.content, this.schema, this.options.parseOptions, {
|
|
12297
12322
|
errorOnInvalidContent: this.options.enableContentCheck
|
|
12298
12323
|
});
|
|
12299
12324
|
} catch (t) {
|
|
@@ -12305,7 +12330,7 @@ var Kp = class extends Ip {
|
|
|
12305
12330
|
disableCollaboration: () => {
|
|
12306
12331
|
"collaboration" in this.storage && typeof this.storage.collaboration == "object" && this.storage.collaboration && (this.storage.collaboration.isDisabled = !0), this.options.extensions = this.options.extensions.filter((r) => r.name !== "collaboration"), this.createExtensionManager();
|
|
12307
12332
|
}
|
|
12308
|
-
}), e =
|
|
12333
|
+
}), e = Os(this.options.content, this.schema, this.options.parseOptions, {
|
|
12309
12334
|
errorOnInvalidContent: !1
|
|
12310
12335
|
});
|
|
12311
12336
|
}
|
|
@@ -12315,25 +12340,25 @@ var Kp = class extends Ip {
|
|
|
12315
12340
|
* Creates a ProseMirror view.
|
|
12316
12341
|
*/
|
|
12317
12342
|
createView(e) {
|
|
12318
|
-
|
|
12343
|
+
const { editorProps: t, enableExtensionDispatchTransaction: r } = this.options, s = t.dispatchTransaction || this.dispatchTransaction.bind(this), i = r ? this.extensionManager.dispatchTransaction(s) : s;
|
|
12319
12344
|
this.editorView = new Oa(e, {
|
|
12320
|
-
...
|
|
12345
|
+
...t,
|
|
12321
12346
|
attributes: {
|
|
12322
12347
|
// add `role="textbox"` to the editor element
|
|
12323
12348
|
role: "textbox",
|
|
12324
|
-
...
|
|
12349
|
+
...t?.attributes
|
|
12325
12350
|
},
|
|
12326
|
-
dispatchTransaction:
|
|
12351
|
+
dispatchTransaction: i,
|
|
12327
12352
|
state: this.editorState,
|
|
12328
12353
|
markViews: this.extensionManager.markViews,
|
|
12329
12354
|
nodeViews: this.extensionManager.nodeViews
|
|
12330
12355
|
});
|
|
12331
|
-
const
|
|
12356
|
+
const o = this.state.reconfigure({
|
|
12332
12357
|
plugins: this.extensionManager.plugins
|
|
12333
12358
|
});
|
|
12334
|
-
this.view.updateState(
|
|
12335
|
-
const
|
|
12336
|
-
|
|
12359
|
+
this.view.updateState(o), this.prependClass(), this.injectCSS();
|
|
12360
|
+
const l = this.view.dom;
|
|
12361
|
+
l.editor = this;
|
|
12337
12362
|
}
|
|
12338
12363
|
/**
|
|
12339
12364
|
* Creates all node and mark views.
|
|
@@ -12426,7 +12451,7 @@ var Kp = class extends Ip {
|
|
|
12426
12451
|
* Get the document as HTML.
|
|
12427
12452
|
*/
|
|
12428
12453
|
getHTML() {
|
|
12429
|
-
return
|
|
12454
|
+
return pi(this.state.doc.content, this.schema);
|
|
12430
12455
|
}
|
|
12431
12456
|
/**
|
|
12432
12457
|
* Get the document as text.
|
|
@@ -12447,7 +12472,7 @@ var Kp = class extends Ip {
|
|
|
12447
12472
|
* Check if there is no content.
|
|
12448
12473
|
*/
|
|
12449
12474
|
get isEmpty() {
|
|
12450
|
-
return
|
|
12475
|
+
return zr(this.state.doc);
|
|
12451
12476
|
}
|
|
12452
12477
|
/**
|
|
12453
12478
|
* Destroy the editor.
|
|
@@ -12479,7 +12504,7 @@ var Kp = class extends Ip {
|
|
|
12479
12504
|
}
|
|
12480
12505
|
};
|
|
12481
12506
|
function Bt(n) {
|
|
12482
|
-
return new
|
|
12507
|
+
return new $r({
|
|
12483
12508
|
find: n.find,
|
|
12484
12509
|
handler: ({ state: e, range: t, match: r }) => {
|
|
12485
12510
|
const s = P(n.getAttributes, void 0, r);
|
|
@@ -12499,7 +12524,7 @@ function Bt(n) {
|
|
|
12499
12524
|
});
|
|
12500
12525
|
}
|
|
12501
12526
|
function Up(n) {
|
|
12502
|
-
return new
|
|
12527
|
+
return new $r({
|
|
12503
12528
|
find: n.find,
|
|
12504
12529
|
handler: ({ state: e, range: t, match: r }) => {
|
|
12505
12530
|
const s = P(n.getAttributes, void 0, r) || {}, { tr: i } = e, o = t.from;
|
|
@@ -12520,8 +12545,8 @@ function Up(n) {
|
|
|
12520
12545
|
undoable: n.undoable
|
|
12521
12546
|
});
|
|
12522
12547
|
}
|
|
12523
|
-
function
|
|
12524
|
-
return new
|
|
12548
|
+
function Ds(n) {
|
|
12549
|
+
return new $r({
|
|
12525
12550
|
find: n.find,
|
|
12526
12551
|
handler: ({ state: e, range: t, match: r }) => {
|
|
12527
12552
|
const s = e.doc.resolve(t.from), i = P(n.getAttributes, void 0, r) || {};
|
|
@@ -12533,10 +12558,10 @@ function Is(n) {
|
|
|
12533
12558
|
});
|
|
12534
12559
|
}
|
|
12535
12560
|
function zt(n) {
|
|
12536
|
-
return new
|
|
12561
|
+
return new $r({
|
|
12537
12562
|
find: n.find,
|
|
12538
12563
|
handler: ({ state: e, range: t, match: r, chain: s }) => {
|
|
12539
|
-
const i = P(n.getAttributes, void 0, r) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a &&
|
|
12564
|
+
const i = P(n.getAttributes, void 0, r) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && qs(a, n.type, i);
|
|
12540
12565
|
if (!c)
|
|
12541
12566
|
return null;
|
|
12542
12567
|
if (o.wrap(a, c), n.keepMarks && n.editor) {
|
|
@@ -12572,12 +12597,12 @@ function qp(n, e) {
|
|
|
12572
12597
|
return !1;
|
|
12573
12598
|
}
|
|
12574
12599
|
var Jp = {};
|
|
12575
|
-
|
|
12600
|
+
ci(Jp, {
|
|
12576
12601
|
createAtomBlockMarkdownSpec: () => Gp,
|
|
12577
12602
|
createBlockMarkdownSpec: () => Yp,
|
|
12578
12603
|
createInlineMarkdownSpec: () => Zp,
|
|
12579
12604
|
parseAttributes: () => yi,
|
|
12580
|
-
parseIndentedBlocks: () =>
|
|
12605
|
+
parseIndentedBlocks: () => Rs,
|
|
12581
12606
|
renderNestedMarkdownContent: () => bi,
|
|
12582
12607
|
serializeAttributes: () => ki
|
|
12583
12608
|
});
|
|
@@ -12837,7 +12862,7 @@ function Zp(n) {
|
|
|
12837
12862
|
}
|
|
12838
12863
|
};
|
|
12839
12864
|
}
|
|
12840
|
-
function
|
|
12865
|
+
function Rs(n, e, t) {
|
|
12841
12866
|
var r, s, i, o;
|
|
12842
12867
|
const l = n.split(`
|
|
12843
12868
|
`), a = [];
|
|
@@ -13024,10 +13049,10 @@ var tm = class extends Kp {
|
|
|
13024
13049
|
const r = n.editor;
|
|
13025
13050
|
r && r.options.element && e.value && Vc(() => {
|
|
13026
13051
|
var s;
|
|
13027
|
-
if (!e.value || !((s = r.view.dom) != null && s.
|
|
13052
|
+
if (!e.value || !((s = r.view.dom) != null && s.parentNode))
|
|
13028
13053
|
return;
|
|
13029
|
-
const i =
|
|
13030
|
-
e.value.append(r.view.dom), r.contentComponent = t.ctx._, t && (r.appContext = {
|
|
13054
|
+
const i = ps(e.value);
|
|
13055
|
+
e.value.append(...r.view.dom.parentNode.childNodes), r.contentComponent = t.ctx._, t && (r.appContext = {
|
|
13031
13056
|
...t.appContext,
|
|
13032
13057
|
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
13033
13058
|
// so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
|
|
@@ -13037,13 +13062,13 @@ var tm = class extends Kp {
|
|
|
13037
13062
|
element: i
|
|
13038
13063
|
}), r.createNodeViews();
|
|
13039
13064
|
});
|
|
13040
|
-
}),
|
|
13065
|
+
}), Ws(() => {
|
|
13041
13066
|
const r = n.editor;
|
|
13042
13067
|
r && (r.contentComponent = null, r.appContext = null);
|
|
13043
13068
|
}), { rootEl: e };
|
|
13044
13069
|
},
|
|
13045
13070
|
render() {
|
|
13046
|
-
return
|
|
13071
|
+
return Tr("div", {
|
|
13047
13072
|
ref: (n) => {
|
|
13048
13073
|
this.rootEl = n;
|
|
13049
13074
|
}
|
|
@@ -13059,7 +13084,7 @@ hn({
|
|
|
13059
13084
|
}
|
|
13060
13085
|
},
|
|
13061
13086
|
render() {
|
|
13062
|
-
return
|
|
13087
|
+
return Tr(this.as, {
|
|
13063
13088
|
style: {
|
|
13064
13089
|
whiteSpace: "pre-wrap"
|
|
13065
13090
|
},
|
|
@@ -13078,7 +13103,7 @@ hn({
|
|
|
13078
13103
|
inject: ["onDragStart", "decorationClasses"],
|
|
13079
13104
|
render() {
|
|
13080
13105
|
var n, e;
|
|
13081
|
-
return
|
|
13106
|
+
return Tr(
|
|
13082
13107
|
this.as,
|
|
13083
13108
|
{
|
|
13084
13109
|
// @ts-ignore
|
|
@@ -13098,10 +13123,10 @@ var rm = (n = {}) => {
|
|
|
13098
13123
|
const e = Lc();
|
|
13099
13124
|
return Bc(() => {
|
|
13100
13125
|
e.value = new tm(n);
|
|
13101
|
-
}),
|
|
13102
|
-
var t, r, s;
|
|
13103
|
-
const
|
|
13104
|
-
(
|
|
13126
|
+
}), Ws(() => {
|
|
13127
|
+
var t, r, s, i;
|
|
13128
|
+
const o = (r = (t = e.value) == null ? void 0 : t.view.dom) == null ? void 0 : r.parentNode, l = o?.cloneNode(!0);
|
|
13129
|
+
(s = o?.parentNode) == null || s.replaceChild(l, o), (i = e.value) == null || i.destroy();
|
|
13105
13130
|
}), e;
|
|
13106
13131
|
};
|
|
13107
13132
|
hn({
|
|
@@ -13113,7 +13138,7 @@ hn({
|
|
|
13113
13138
|
}
|
|
13114
13139
|
},
|
|
13115
13140
|
render() {
|
|
13116
|
-
return
|
|
13141
|
+
return Tr(this.as, {
|
|
13117
13142
|
style: {
|
|
13118
13143
|
whiteSpace: "inherit"
|
|
13119
13144
|
},
|
|
@@ -13121,7 +13146,7 @@ hn({
|
|
|
13121
13146
|
});
|
|
13122
13147
|
}
|
|
13123
13148
|
});
|
|
13124
|
-
var
|
|
13149
|
+
var Yn = (n, e) => {
|
|
13125
13150
|
if (n === "slot")
|
|
13126
13151
|
return 0;
|
|
13127
13152
|
if (n instanceof Function)
|
|
@@ -13144,7 +13169,7 @@ var Jn = (n, e) => {
|
|
|
13144
13169
|
return [{ tag: "blockquote" }];
|
|
13145
13170
|
},
|
|
13146
13171
|
renderHTML({ HTMLAttributes: n }) {
|
|
13147
|
-
return /* @__PURE__ */
|
|
13172
|
+
return /* @__PURE__ */ Yn("blockquote", { ...W(this.options.HTMLAttributes, n), children: /* @__PURE__ */ Yn("slot", {}) });
|
|
13148
13173
|
},
|
|
13149
13174
|
parseMarkdown: (n, e) => e.createNode("blockquote", void 0, e.parseChildren(n.tokens || [])),
|
|
13150
13175
|
renderMarkdown: (n, e) => {
|
|
@@ -13207,7 +13232,7 @@ ${t}
|
|
|
13207
13232
|
];
|
|
13208
13233
|
},
|
|
13209
13234
|
renderHTML({ HTMLAttributes: n }) {
|
|
13210
|
-
return /* @__PURE__ */
|
|
13235
|
+
return /* @__PURE__ */ Yn("strong", { ...W(this.options.HTMLAttributes, n), children: /* @__PURE__ */ Yn("slot", {}) });
|
|
13211
13236
|
},
|
|
13212
13237
|
markdownTokenName: "strong",
|
|
13213
13238
|
parseMarkdown: (n, e) => e.applyMark("bold", e.parseInline(n.tokens || [])),
|
|
@@ -13296,7 +13321,7 @@ ${t}
|
|
|
13296
13321
|
})
|
|
13297
13322
|
];
|
|
13298
13323
|
}
|
|
13299
|
-
}),
|
|
13324
|
+
}), ss = 4, pm = /^```([a-z]+)?[\s\n]$/, mm = /^~~~([a-z]+)?[\s\n]$/, gm = de.create({
|
|
13300
13325
|
name: "codeBlock",
|
|
13301
13326
|
addOptions() {
|
|
13302
13327
|
return {
|
|
@@ -13305,7 +13330,7 @@ ${t}
|
|
|
13305
13330
|
exitOnArrowDown: !0,
|
|
13306
13331
|
defaultLanguage: null,
|
|
13307
13332
|
enableTabIndentation: !1,
|
|
13308
|
-
tabSize:
|
|
13333
|
+
tabSize: ss,
|
|
13309
13334
|
HTMLAttributes: {}
|
|
13310
13335
|
};
|
|
13311
13336
|
},
|
|
@@ -13388,7 +13413,7 @@ ${t}
|
|
|
13388
13413
|
var e;
|
|
13389
13414
|
if (!this.options.enableTabIndentation)
|
|
13390
13415
|
return !1;
|
|
13391
|
-
const t = (e = this.options.tabSize) != null ? e :
|
|
13416
|
+
const t = (e = this.options.tabSize) != null ? e : ss, { state: r } = n, { selection: s } = r, { $from: i, empty: o } = s;
|
|
13392
13417
|
if (i.parent.type !== this.type)
|
|
13393
13418
|
return !1;
|
|
13394
13419
|
const l = " ".repeat(t);
|
|
@@ -13406,7 +13431,7 @@ ${t}
|
|
|
13406
13431
|
var e;
|
|
13407
13432
|
if (!this.options.enableTabIndentation)
|
|
13408
13433
|
return !1;
|
|
13409
|
-
const t = (e = this.options.tabSize) != null ? e :
|
|
13434
|
+
const t = (e = this.options.tabSize) != null ? e : ss, { state: r } = n, { selection: s } = r, { $from: i, empty: o } = s;
|
|
13410
13435
|
return i.parent.type !== this.type ? !1 : o ? n.commands.command(({ tr: l }) => {
|
|
13411
13436
|
var a;
|
|
13412
13437
|
const { pos: c } = i, u = i.start(), d = i.end(), h = r.doc.textBetween(u, d, `
|
|
@@ -13468,14 +13493,14 @@ ${t}
|
|
|
13468
13493
|
},
|
|
13469
13494
|
addInputRules() {
|
|
13470
13495
|
return [
|
|
13471
|
-
|
|
13496
|
+
Ds({
|
|
13472
13497
|
find: pm,
|
|
13473
13498
|
type: this.type,
|
|
13474
13499
|
getAttributes: (n) => ({
|
|
13475
13500
|
language: n[1]
|
|
13476
13501
|
})
|
|
13477
13502
|
}),
|
|
13478
|
-
|
|
13503
|
+
Ds({
|
|
13479
13504
|
find: mm,
|
|
13480
13505
|
type: this.type,
|
|
13481
13506
|
getAttributes: (n) => ({
|
|
@@ -13616,7 +13641,7 @@ ${t}
|
|
|
13616
13641
|
);
|
|
13617
13642
|
},
|
|
13618
13643
|
addInputRules() {
|
|
13619
|
-
return this.options.levels.map((n) =>
|
|
13644
|
+
return this.options.levels.map((n) => Ds({
|
|
13620
13645
|
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),
|
|
13621
13646
|
type: this.type,
|
|
13622
13647
|
getAttributes: {
|
|
@@ -13743,12 +13768,12 @@ ${t}
|
|
|
13743
13768
|
];
|
|
13744
13769
|
}
|
|
13745
13770
|
});
|
|
13746
|
-
const vm = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Em = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",
|
|
13771
|
+
const vm = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Em = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Ps = "numeric", Ls = "ascii", Bs = "alpha", Yt = "asciinumeric", Kt = "alphanumeric", zs = "domain", dc = "emoji", Am = "scheme", Nm = "slashscheme", is = "whitespace";
|
|
13747
13772
|
function Om(n, e) {
|
|
13748
13773
|
return n in e || (e[n] = []), e[n];
|
|
13749
13774
|
}
|
|
13750
13775
|
function ot(n, e, t) {
|
|
13751
|
-
e[
|
|
13776
|
+
e[Ps] && (e[Yt] = !0, e[Kt] = !0), e[Ls] && (e[Yt] = !0, e[Bs] = !0), e[Yt] && (e[Kt] = !0), e[Bs] && (e[Kt] = !0), e[Kt] && (e[zs] = !0), e[dc] && (e[zs] = !0);
|
|
13752
13777
|
for (const r in e) {
|
|
13753
13778
|
const s = Om(r, t);
|
|
13754
13779
|
s.indexOf(n) < 0 && s.push(n);
|
|
@@ -13884,75 +13909,75 @@ oe.prototype = {
|
|
|
13884
13909
|
return s.j[n] = o, o;
|
|
13885
13910
|
}
|
|
13886
13911
|
};
|
|
13887
|
-
const O = (n, e, t, r, s) => n.ta(e, t, r, s), F = (n, e, t, r, s) => n.tr(e, t, r, s), jo = (n, e, t, r, s) => n.ts(e, t, r, s), b = (n, e, t, r, s) => n.tt(e, t, r, s), Oe = "WORD",
|
|
13912
|
+
const O = (n, e, t, r, s) => n.ta(e, t, r, s), F = (n, e, t, r, s) => n.tr(e, t, r, s), jo = (n, e, t, r, s) => n.ts(e, t, r, s), b = (n, e, t, r, s) => n.tt(e, t, r, s), Oe = "WORD", $s = "UWORD", fc = "ASCIINUMERICAL", hc = "ALPHANUMERICAL", dn = "LOCALHOST", Fs = "TLD", Vs = "UTLD", Pn = "SCHEME", Et = "SLASH_SCHEME", xi = "NUM", Hs = "WS", Si = "NL", Xt = "OPENBRACE", Qt = "CLOSEBRACE", Xn = "OPENBRACKET", Qn = "CLOSEBRACKET", Zn = "OPENPAREN", er = "CLOSEPAREN", tr = "OPENANGLEBRACKET", nr = "CLOSEANGLEBRACKET", rr = "FULLWIDTHLEFTPAREN", sr = "FULLWIDTHRIGHTPAREN", ir = "LEFTCORNERBRACKET", or = "RIGHTCORNERBRACKET", lr = "LEFTWHITECORNERBRACKET", ar = "RIGHTWHITECORNERBRACKET", cr = "FULLWIDTHLESSTHAN", ur = "FULLWIDTHGREATERTHAN", dr = "AMPERSAND", fr = "APOSTROPHE", hr = "ASTERISK", Ve = "AT", pr = "BACKSLASH", mr = "BACKTICK", gr = "CARET", je = "COLON", wi = "COMMA", yr = "DOLLAR", we = "DOT", kr = "EQUALS", Ci = "EXCLAMATION", pe = "HYPHEN", Zt = "PERCENT", br = "PIPE", xr = "PLUS", Sr = "POUND", en = "QUERY", Mi = "QUOTE", pc = "FULLWIDTHMIDDLEDOT", Ti = "SEMI", Ce = "SLASH", tn = "TILDE", wr = "UNDERSCORE", mc = "EMOJI", Cr = "SYM";
|
|
13888
13913
|
var gc = /* @__PURE__ */ Object.freeze({
|
|
13889
13914
|
__proto__: null,
|
|
13890
13915
|
ALPHANUMERICAL: hc,
|
|
13891
|
-
AMPERSAND:
|
|
13892
|
-
APOSTROPHE:
|
|
13916
|
+
AMPERSAND: dr,
|
|
13917
|
+
APOSTROPHE: fr,
|
|
13893
13918
|
ASCIINUMERICAL: fc,
|
|
13894
|
-
ASTERISK:
|
|
13919
|
+
ASTERISK: hr,
|
|
13895
13920
|
AT: Ve,
|
|
13896
|
-
BACKSLASH:
|
|
13897
|
-
BACKTICK:
|
|
13898
|
-
CARET:
|
|
13899
|
-
CLOSEANGLEBRACKET:
|
|
13921
|
+
BACKSLASH: pr,
|
|
13922
|
+
BACKTICK: mr,
|
|
13923
|
+
CARET: gr,
|
|
13924
|
+
CLOSEANGLEBRACKET: nr,
|
|
13900
13925
|
CLOSEBRACE: Qt,
|
|
13901
|
-
CLOSEBRACKET:
|
|
13902
|
-
CLOSEPAREN:
|
|
13926
|
+
CLOSEBRACKET: Qn,
|
|
13927
|
+
CLOSEPAREN: er,
|
|
13903
13928
|
COLON: je,
|
|
13904
13929
|
COMMA: wi,
|
|
13905
|
-
DOLLAR:
|
|
13930
|
+
DOLLAR: yr,
|
|
13906
13931
|
DOT: we,
|
|
13907
13932
|
EMOJI: mc,
|
|
13908
|
-
EQUALS:
|
|
13933
|
+
EQUALS: kr,
|
|
13909
13934
|
EXCLAMATION: Ci,
|
|
13910
|
-
FULLWIDTHGREATERTHAN:
|
|
13911
|
-
FULLWIDTHLEFTPAREN:
|
|
13912
|
-
FULLWIDTHLESSTHAN:
|
|
13935
|
+
FULLWIDTHGREATERTHAN: ur,
|
|
13936
|
+
FULLWIDTHLEFTPAREN: rr,
|
|
13937
|
+
FULLWIDTHLESSTHAN: cr,
|
|
13913
13938
|
FULLWIDTHMIDDLEDOT: pc,
|
|
13914
|
-
FULLWIDTHRIGHTPAREN:
|
|
13939
|
+
FULLWIDTHRIGHTPAREN: sr,
|
|
13915
13940
|
HYPHEN: pe,
|
|
13916
|
-
LEFTCORNERBRACKET:
|
|
13917
|
-
LEFTWHITECORNERBRACKET:
|
|
13941
|
+
LEFTCORNERBRACKET: ir,
|
|
13942
|
+
LEFTWHITECORNERBRACKET: lr,
|
|
13918
13943
|
LOCALHOST: dn,
|
|
13919
13944
|
NL: Si,
|
|
13920
13945
|
NUM: xi,
|
|
13921
|
-
OPENANGLEBRACKET:
|
|
13946
|
+
OPENANGLEBRACKET: tr,
|
|
13922
13947
|
OPENBRACE: Xt,
|
|
13923
|
-
OPENBRACKET:
|
|
13924
|
-
OPENPAREN:
|
|
13948
|
+
OPENBRACKET: Xn,
|
|
13949
|
+
OPENPAREN: Zn,
|
|
13925
13950
|
PERCENT: Zt,
|
|
13926
|
-
PIPE:
|
|
13927
|
-
PLUS:
|
|
13928
|
-
POUND:
|
|
13951
|
+
PIPE: br,
|
|
13952
|
+
PLUS: xr,
|
|
13953
|
+
POUND: Sr,
|
|
13929
13954
|
QUERY: en,
|
|
13930
13955
|
QUOTE: Mi,
|
|
13931
|
-
RIGHTCORNERBRACKET:
|
|
13932
|
-
RIGHTWHITECORNERBRACKET:
|
|
13933
|
-
SCHEME:
|
|
13956
|
+
RIGHTCORNERBRACKET: or,
|
|
13957
|
+
RIGHTWHITECORNERBRACKET: ar,
|
|
13958
|
+
SCHEME: Pn,
|
|
13934
13959
|
SEMI: Ti,
|
|
13935
13960
|
SLASH: Ce,
|
|
13936
13961
|
SLASH_SCHEME: Et,
|
|
13937
|
-
SYM:
|
|
13962
|
+
SYM: Cr,
|
|
13938
13963
|
TILDE: tn,
|
|
13939
|
-
TLD:
|
|
13940
|
-
UNDERSCORE:
|
|
13941
|
-
UTLD:
|
|
13942
|
-
UWORD:
|
|
13964
|
+
TLD: Fs,
|
|
13965
|
+
UNDERSCORE: wr,
|
|
13966
|
+
UTLD: Vs,
|
|
13967
|
+
UWORD: $s,
|
|
13943
13968
|
WORD: Oe,
|
|
13944
|
-
WS:
|
|
13969
|
+
WS: Hs
|
|
13945
13970
|
});
|
|
13946
|
-
const Ae = /[a-z]/, Ht = /\p{L}/u,
|
|
13947
|
-
`, Dm = "️", Rm = "",
|
|
13948
|
-
let
|
|
13971
|
+
const Ae = /[a-z]/, Ht = /\p{L}/u, ls = /\p{Emoji}/u, Ne = /\d/, as = /\s/, Wo = "\r", cs = `
|
|
13972
|
+
`, Dm = "️", Rm = "", us = "";
|
|
13973
|
+
let En = null, An = null;
|
|
13949
13974
|
function Pm(n = []) {
|
|
13950
13975
|
const e = {};
|
|
13951
13976
|
oe.groups = e;
|
|
13952
13977
|
const t = new oe();
|
|
13953
|
-
|
|
13978
|
+
En == null && (En = Ko(vm)), An == null && (An = Ko(Em)), b(t, "'", fr), b(t, "{", Xt), b(t, "}", Qt), b(t, "[", Xn), b(t, "]", Qn), b(t, "(", Zn), b(t, ")", er), b(t, "<", tr), b(t, ">", nr), b(t, "(", rr), b(t, ")", sr), b(t, "「", ir), b(t, "」", or), b(t, "『", lr), b(t, "』", ar), b(t, "<", cr), b(t, ">", ur), b(t, "&", dr), b(t, "*", hr), b(t, "@", Ve), b(t, "`", mr), b(t, "^", gr), b(t, ":", je), b(t, ",", wi), b(t, "$", yr), b(t, ".", we), b(t, "=", kr), b(t, "!", Ci), b(t, "-", pe), b(t, "%", Zt), b(t, "|", br), b(t, "+", xr), b(t, "#", Sr), b(t, "?", en), b(t, '"', Mi), b(t, "/", Ce), b(t, ";", Ti), b(t, "~", tn), b(t, "_", wr), b(t, "\\", pr), b(t, "・", pc);
|
|
13954
13979
|
const r = F(t, Ne, xi, {
|
|
13955
|
-
[
|
|
13980
|
+
[Ps]: !0
|
|
13956
13981
|
});
|
|
13957
13982
|
F(r, Ne, r);
|
|
13958
13983
|
const s = F(r, Ae, fc, {
|
|
@@ -13960,39 +13985,39 @@ function Pm(n = []) {
|
|
|
13960
13985
|
}), i = F(r, Ht, hc, {
|
|
13961
13986
|
[Kt]: !0
|
|
13962
13987
|
}), o = F(t, Ae, Oe, {
|
|
13963
|
-
[
|
|
13988
|
+
[Ls]: !0
|
|
13964
13989
|
});
|
|
13965
13990
|
F(o, Ne, s), F(o, Ae, o), F(s, Ne, s), F(s, Ae, s);
|
|
13966
|
-
const l = F(t, Ht,
|
|
13967
|
-
[
|
|
13991
|
+
const l = F(t, Ht, $s, {
|
|
13992
|
+
[Bs]: !0
|
|
13968
13993
|
});
|
|
13969
13994
|
F(l, Ae), F(l, Ne, i), F(l, Ht, l), F(i, Ne, i), F(i, Ae), F(i, Ht, i);
|
|
13970
|
-
const a = b(t,
|
|
13971
|
-
[
|
|
13972
|
-
}), c = b(t, Wo,
|
|
13973
|
-
[
|
|
13974
|
-
}), u = F(t,
|
|
13975
|
-
[
|
|
13995
|
+
const a = b(t, cs, Si, {
|
|
13996
|
+
[is]: !0
|
|
13997
|
+
}), c = b(t, Wo, Hs, {
|
|
13998
|
+
[is]: !0
|
|
13999
|
+
}), u = F(t, as, Hs, {
|
|
14000
|
+
[is]: !0
|
|
13976
14001
|
});
|
|
13977
|
-
b(t,
|
|
13978
|
-
const d = F(t,
|
|
14002
|
+
b(t, us, u), b(c, cs, a), b(c, us, u), F(c, as, u), b(u, Wo), b(u, cs), F(u, as, u), b(u, us, u);
|
|
14003
|
+
const d = F(t, ls, mc, {
|
|
13979
14004
|
[dc]: !0
|
|
13980
14005
|
});
|
|
13981
|
-
b(d, "#"), F(d,
|
|
14006
|
+
b(d, "#"), F(d, ls, d), b(d, Dm, d);
|
|
13982
14007
|
const f = b(d, Rm);
|
|
13983
|
-
b(f, "#"), F(f,
|
|
14008
|
+
b(f, "#"), F(f, ls, d);
|
|
13984
14009
|
const h = [[Ae, o], [Ne, s]], p = [[Ae, null], [Ht, l], [Ne, i]];
|
|
13985
|
-
for (let m = 0; m < vn.length; m++)
|
|
13986
|
-
ze(t, vn[m], $s, Oe, h);
|
|
13987
14010
|
for (let m = 0; m < En.length; m++)
|
|
13988
|
-
ze(t, En[m], Fs,
|
|
13989
|
-
|
|
14011
|
+
ze(t, En[m], Fs, Oe, h);
|
|
14012
|
+
for (let m = 0; m < An.length; m++)
|
|
14013
|
+
ze(t, An[m], Vs, $s, p);
|
|
14014
|
+
ot(Fs, {
|
|
13990
14015
|
tld: !0,
|
|
13991
14016
|
ascii: !0
|
|
13992
|
-
}, e), ot(
|
|
14017
|
+
}, e), ot(Vs, {
|
|
13993
14018
|
utld: !0,
|
|
13994
14019
|
alpha: !0
|
|
13995
|
-
}, e), ze(t, "file",
|
|
14020
|
+
}, e), ze(t, "file", Pn, Oe, h), ze(t, "mailto", Pn, Oe, h), ze(t, "http", Et, Oe, h), ze(t, "https", Et, Oe, h), ze(t, "ftp", Et, Oe, h), ze(t, "ftps", Et, Oe, h), ot(Pn, {
|
|
13996
14021
|
scheme: !0,
|
|
13997
14022
|
ascii: !0
|
|
13998
14023
|
}, e), ot(Et, {
|
|
@@ -14005,11 +14030,11 @@ function Pm(n = []) {
|
|
|
14005
14030
|
} : {
|
|
14006
14031
|
[Nm]: !0
|
|
14007
14032
|
};
|
|
14008
|
-
g.indexOf("-") >= 0 ? x[
|
|
14033
|
+
g.indexOf("-") >= 0 ? x[zs] = !0 : Ae.test(g) ? Ne.test(g) ? x[Yt] = !0 : x[Ls] = !0 : x[Ps] = !0, jo(t, g, g, x);
|
|
14009
14034
|
}
|
|
14010
14035
|
return jo(t, "localhost", dn, {
|
|
14011
14036
|
ascii: !0
|
|
14012
|
-
}), t.jd = new oe(
|
|
14037
|
+
}), t.jd = new oe(Cr), {
|
|
14013
14038
|
start: t,
|
|
14014
14039
|
tokens: Object.assign({
|
|
14015
14040
|
groups: e
|
|
@@ -14267,7 +14292,7 @@ kc.prototype = {
|
|
|
14267
14292
|
};
|
|
14268
14293
|
}
|
|
14269
14294
|
};
|
|
14270
|
-
function
|
|
14295
|
+
function Vr(n, e) {
|
|
14271
14296
|
class t extends kc {
|
|
14272
14297
|
constructor(s, i) {
|
|
14273
14298
|
super(s, i), this.t = n;
|
|
@@ -14277,12 +14302,12 @@ function $r(n, e) {
|
|
|
14277
14302
|
t.prototype[r] = e[r];
|
|
14278
14303
|
return t.t = n, t;
|
|
14279
14304
|
}
|
|
14280
|
-
const qo =
|
|
14305
|
+
const qo = Vr("email", {
|
|
14281
14306
|
isLink: !0,
|
|
14282
14307
|
toHref() {
|
|
14283
14308
|
return "mailto:" + this.toString();
|
|
14284
14309
|
}
|
|
14285
|
-
}), Jo =
|
|
14310
|
+
}), Jo = Vr("text"), Bm = Vr("nl"), Nn = Vr("url", {
|
|
14286
14311
|
isLink: !0,
|
|
14287
14312
|
/**
|
|
14288
14313
|
Lowercases relevant parts of the domain and adds the protocol if
|
|
@@ -14306,7 +14331,7 @@ const qo = $r("email", {
|
|
|
14306
14331
|
function zm({
|
|
14307
14332
|
groups: n
|
|
14308
14333
|
}) {
|
|
14309
|
-
const e = n.domain.concat([
|
|
14334
|
+
const e = n.domain.concat([dr, hr, Ve, pr, mr, gr, yr, kr, pe, xi, Zt, br, xr, Sr, Ce, Cr, tn, wr]), t = [fr, je, wi, we, Ci, Zt, en, Mi, Ti, tr, nr, Xt, Qt, Qn, Xn, Zn, er, rr, sr, ir, or, lr, ar, cr, ur], r = [dr, fr, hr, pr, mr, gr, yr, kr, pe, Xt, Qt, Zt, br, xr, Sr, en, Ce, Cr, tn, wr], s = he(), i = b(s, tn);
|
|
14310
14335
|
O(i, r, i), O(i, n.domain, i);
|
|
14311
14336
|
const o = he(), l = he(), a = he();
|
|
14312
14337
|
O(s, n.domain, o), O(s, n.scheme, l), O(s, n.slashscheme, a), O(o, r, i), O(o, n.domain, o);
|
|
@@ -14326,36 +14351,36 @@ function zm({
|
|
|
14326
14351
|
O(m, n.numeric, qo);
|
|
14327
14352
|
const g = b(o, pe), y = b(o, we);
|
|
14328
14353
|
b(g, pe, g), O(g, n.domain, o), O(y, r, i), O(y, n.domain, o);
|
|
14329
|
-
const x = he(
|
|
14354
|
+
const x = he(Nn);
|
|
14330
14355
|
O(y, n.tld, x), O(y, n.utld, x), O(x, n.domain, o), O(x, r, i), b(x, we, y), b(x, pe, g), b(x, Ve, c);
|
|
14331
|
-
const C = b(x, je), E = he(
|
|
14356
|
+
const C = b(x, je), E = he(Nn);
|
|
14332
14357
|
O(C, n.numeric, E);
|
|
14333
|
-
const w = he(
|
|
14358
|
+
const w = he(Nn), A = he();
|
|
14334
14359
|
O(w, e, w), O(w, t, A), O(A, e, w), O(A, t, A), b(x, Ce, w), b(E, Ce, w);
|
|
14335
14360
|
const M = b(l, je), D = b(a, je), R = b(D, Ce), ae = b(R, Ce);
|
|
14336
14361
|
O(l, n.domain, o), b(l, we, y), b(l, pe, g), O(a, n.domain, o), b(a, we, y), b(a, pe, g), O(M, n.domain, w), b(M, Ce, w), b(M, en, w), O(ae, n.domain, w), O(ae, e, w), b(ae, Ce, w);
|
|
14337
14362
|
const bt = [
|
|
14338
14363
|
[Xt, Qt],
|
|
14339
14364
|
// {}
|
|
14340
|
-
[Gn, Yn],
|
|
14341
|
-
// []
|
|
14342
14365
|
[Xn, Qn],
|
|
14343
|
-
//
|
|
14366
|
+
// []
|
|
14344
14367
|
[Zn, er],
|
|
14345
|
-
//
|
|
14368
|
+
// ()
|
|
14346
14369
|
[tr, nr],
|
|
14347
|
-
//
|
|
14370
|
+
// <>
|
|
14348
14371
|
[rr, sr],
|
|
14349
|
-
//
|
|
14372
|
+
// ()
|
|
14350
14373
|
[ir, or],
|
|
14374
|
+
// 「」
|
|
14375
|
+
[lr, ar],
|
|
14351
14376
|
// 『』
|
|
14352
|
-
[
|
|
14377
|
+
[cr, ur]
|
|
14353
14378
|
// <>
|
|
14354
14379
|
];
|
|
14355
14380
|
for (let Be = 0; Be < bt.length; Be++) {
|
|
14356
14381
|
const [xt, fe] = bt[Be], ie = b(w, xt);
|
|
14357
14382
|
b(A, xt, ie), b(ie, fe, w);
|
|
14358
|
-
const St = he(
|
|
14383
|
+
const St = he(Nn);
|
|
14359
14384
|
O(ie, e, St);
|
|
14360
14385
|
const Ft = he();
|
|
14361
14386
|
O(ie, t), O(St, e, St), O(St, t, Ft), O(Ft, e, St), O(Ft, t, Ft), b(St, fe, w), b(Ft, fe, w);
|
|
@@ -14376,14 +14401,14 @@ function $m(n, e, t) {
|
|
|
14376
14401
|
if (f < 0)
|
|
14377
14402
|
s -= u, s < r && (o.push(t[s]), s++);
|
|
14378
14403
|
else {
|
|
14379
|
-
o.length > 0 && (i.push(
|
|
14404
|
+
o.length > 0 && (i.push(ds(Jo, e, o)), o = []), s -= f, u -= f;
|
|
14380
14405
|
const h = d.t, p = t.slice(s - u, s);
|
|
14381
|
-
i.push(
|
|
14406
|
+
i.push(ds(h, e, p));
|
|
14382
14407
|
}
|
|
14383
14408
|
}
|
|
14384
|
-
return o.length > 0 && i.push(
|
|
14409
|
+
return o.length > 0 && i.push(ds(Jo, e, o)), i;
|
|
14385
14410
|
}
|
|
14386
|
-
function
|
|
14411
|
+
function ds(n, e, t) {
|
|
14387
14412
|
const r = t[0].s, s = t[t.length - 1].e, i = e.slice(r, s);
|
|
14388
14413
|
return new n(i, t);
|
|
14389
14414
|
}
|
|
@@ -14862,8 +14887,8 @@ var Ym = kt.create({
|
|
|
14862
14887
|
Qm(eg, {
|
|
14863
14888
|
findListItemPos: () => yn,
|
|
14864
14889
|
getNextListDepth: () => Ni,
|
|
14865
|
-
handleBackspace: () =>
|
|
14866
|
-
handleDelete: () =>
|
|
14890
|
+
handleBackspace: () => _s,
|
|
14891
|
+
handleDelete: () => js,
|
|
14867
14892
|
hasListBefore: () => wc,
|
|
14868
14893
|
hasListItemAfter: () => tg,
|
|
14869
14894
|
hasListItemBefore: () => Cc,
|
|
@@ -14898,7 +14923,7 @@ var yn = (n, e) => {
|
|
|
14898
14923
|
return t.descendants((i) => {
|
|
14899
14924
|
i.type === r && (s = !0);
|
|
14900
14925
|
}), s;
|
|
14901
|
-
},
|
|
14926
|
+
}, _s = (n, e, t) => {
|
|
14902
14927
|
if (n.commands.undoInputRule())
|
|
14903
14928
|
return !0;
|
|
14904
14929
|
if (n.state.selection.from !== n.state.selection.to)
|
|
@@ -14927,7 +14952,7 @@ var yn = (n, e) => {
|
|
|
14927
14952
|
}, vc = (n, e) => {
|
|
14928
14953
|
const t = Ni(n, e), r = yn(n, e);
|
|
14929
14954
|
return !r || !t ? !1 : t < r.depth;
|
|
14930
|
-
},
|
|
14955
|
+
}, js = (n, e) => {
|
|
14931
14956
|
if (!Qe(n.state, e) || !op(n.state, e))
|
|
14932
14957
|
return !1;
|
|
14933
14958
|
const { selection: t } = n.state, { $from: r, $to: s } = t;
|
|
@@ -14957,25 +14982,25 @@ var yn = (n, e) => {
|
|
|
14957
14982
|
Delete: ({ editor: n }) => {
|
|
14958
14983
|
let e = !1;
|
|
14959
14984
|
return this.options.listTypes.forEach(({ itemName: t }) => {
|
|
14960
|
-
n.state.schema.nodes[t] !== void 0 &&
|
|
14985
|
+
n.state.schema.nodes[t] !== void 0 && js(n, t) && (e = !0);
|
|
14961
14986
|
}), e;
|
|
14962
14987
|
},
|
|
14963
14988
|
"Mod-Delete": ({ editor: n }) => {
|
|
14964
14989
|
let e = !1;
|
|
14965
14990
|
return this.options.listTypes.forEach(({ itemName: t }) => {
|
|
14966
|
-
n.state.schema.nodes[t] !== void 0 &&
|
|
14991
|
+
n.state.schema.nodes[t] !== void 0 && js(n, t) && (e = !0);
|
|
14967
14992
|
}), e;
|
|
14968
14993
|
},
|
|
14969
14994
|
Backspace: ({ editor: n }) => {
|
|
14970
14995
|
let e = !1;
|
|
14971
14996
|
return this.options.listTypes.forEach(({ itemName: t, wrapperNames: r }) => {
|
|
14972
|
-
n.state.schema.nodes[t] !== void 0 &&
|
|
14997
|
+
n.state.schema.nodes[t] !== void 0 && _s(n, t, r) && (e = !0);
|
|
14973
14998
|
}), e;
|
|
14974
14999
|
},
|
|
14975
15000
|
"Mod-Backspace": ({ editor: n }) => {
|
|
14976
15001
|
let e = !1;
|
|
14977
15002
|
return this.options.listTypes.forEach(({ itemName: t, wrapperNames: r }) => {
|
|
14978
|
-
n.state.schema.nodes[t] !== void 0 &&
|
|
15003
|
+
n.state.schema.nodes[t] !== void 0 && _s(n, t, r) && (e = !0);
|
|
14979
15004
|
}), e;
|
|
14980
15005
|
}
|
|
14981
15006
|
};
|
|
@@ -15350,7 +15375,7 @@ var ig = "listItem", Zo = "textStyle", el = /^(\d+)\.\s$/, Nc = de.create({
|
|
|
15350
15375
|
},
|
|
15351
15376
|
tokenize(n, e, t) {
|
|
15352
15377
|
const r = (i) => {
|
|
15353
|
-
const o =
|
|
15378
|
+
const o = Rs(
|
|
15354
15379
|
i,
|
|
15355
15380
|
{
|
|
15356
15381
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
@@ -15381,7 +15406,7 @@ var ig = "listItem", Zo = "textStyle", el = /^(\d+)\.\s$/, Nc = de.create({
|
|
|
15381
15406
|
items: o.items
|
|
15382
15407
|
}
|
|
15383
15408
|
] : t.blockTokens(i);
|
|
15384
|
-
}, s =
|
|
15409
|
+
}, s = Rs(
|
|
15385
15410
|
n,
|
|
15386
15411
|
{
|
|
15387
15412
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
@@ -15830,12 +15855,12 @@ function bg() {
|
|
|
15830
15855
|
});
|
|
15831
15856
|
}
|
|
15832
15857
|
const xg = Ia({
|
|
15833
|
-
ArrowLeft:
|
|
15834
|
-
ArrowRight:
|
|
15835
|
-
ArrowUp:
|
|
15836
|
-
ArrowDown:
|
|
15858
|
+
ArrowLeft: On("horiz", -1),
|
|
15859
|
+
ArrowRight: On("horiz", 1),
|
|
15860
|
+
ArrowUp: On("vert", -1),
|
|
15861
|
+
ArrowDown: On("vert", 1)
|
|
15837
15862
|
});
|
|
15838
|
-
function
|
|
15863
|
+
function On(n, e) {
|
|
15839
15864
|
const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
15840
15865
|
return function(r, s, i) {
|
|
15841
15866
|
let o = r.selection, l = e > 0 ? o.$to : o.$from, a = o.empty;
|
|
@@ -15875,10 +15900,10 @@ function Cg(n) {
|
|
|
15875
15900
|
let e = document.createElement("div");
|
|
15876
15901
|
return e.className = "ProseMirror-gapcursor", z.create(n.doc, [ne.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
15877
15902
|
}
|
|
15878
|
-
var
|
|
15903
|
+
var Mr = 200, G = function() {
|
|
15879
15904
|
};
|
|
15880
15905
|
G.prototype.append = function(e) {
|
|
15881
|
-
return e.length ? (e = G.from(e), !this.length && e || e.length <
|
|
15906
|
+
return e.length ? (e = G.from(e), !this.length && e || e.length < Mr && this.leafAppend(e) || this.length < Mr && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
15882
15907
|
};
|
|
15883
15908
|
G.prototype.prepend = function(e) {
|
|
15884
15909
|
return e.length ? G.from(e).append(this) : this;
|
|
@@ -15927,10 +15952,10 @@ var Ic = /* @__PURE__ */ (function(n) {
|
|
|
15927
15952
|
if (s(this.values[a], l + a) === !1)
|
|
15928
15953
|
return !1;
|
|
15929
15954
|
}, e.prototype.leafAppend = function(s) {
|
|
15930
|
-
if (this.length + s.length <=
|
|
15955
|
+
if (this.length + s.length <= Mr)
|
|
15931
15956
|
return new e(this.values.concat(s.flatten()));
|
|
15932
15957
|
}, e.prototype.leafPrepend = function(s) {
|
|
15933
|
-
if (this.length + s.length <=
|
|
15958
|
+
if (this.length + s.length <= Mr)
|
|
15934
15959
|
return new e(s.flatten().concat(this.values));
|
|
15935
15960
|
}, t.length.get = function() {
|
|
15936
15961
|
return this.values.length;
|
|
@@ -16120,11 +16145,11 @@ function Ag(n, e, t, r) {
|
|
|
16120
16145
|
if (t.steps.length == 0)
|
|
16121
16146
|
return n;
|
|
16122
16147
|
if (o && o.getMeta(dt))
|
|
16123
|
-
return o.getMeta(dt).redo ? new He(n.done.addTransform(t, void 0, r,
|
|
16148
|
+
return o.getMeta(dt).redo ? new He(n.done.addTransform(t, void 0, r, Ln(e)), n.undone, tl(t.mapping.maps), n.prevTime, n.prevComposition) : new He(n.done, n.undone.addTransform(t, void 0, r, Ln(e)), null, n.prevTime, n.prevComposition);
|
|
16124
16149
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
16125
|
-
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !Ng(t, n.prevRanges)), c = o ?
|
|
16126
|
-
return new He(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r,
|
|
16127
|
-
} else return (i = t.getMeta("rebased")) ? new He(n.done.rebased(t, i), n.undone.rebased(t, i),
|
|
16150
|
+
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !Ng(t, n.prevRanges)), c = o ? fs(n.prevRanges, t.mapping) : tl(t.mapping.maps);
|
|
16151
|
+
return new He(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, Ln(e)), be.empty, c, t.time, l ?? n.prevComposition);
|
|
16152
|
+
} else return (i = t.getMeta("rebased")) ? new He(n.done.rebased(t, i), n.undone.rebased(t, i), fs(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new He(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), fs(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
16128
16153
|
}
|
|
16129
16154
|
function Ng(n, e) {
|
|
16130
16155
|
if (!e)
|
|
@@ -16143,7 +16168,7 @@ function tl(n) {
|
|
|
16143
16168
|
n[t].forEach((r, s, i, o) => e.push(i, o));
|
|
16144
16169
|
return e;
|
|
16145
16170
|
}
|
|
16146
|
-
function
|
|
16171
|
+
function fs(n, e) {
|
|
16147
16172
|
if (!n)
|
|
16148
16173
|
return null;
|
|
16149
16174
|
let t = [];
|
|
@@ -16154,24 +16179,24 @@ function ds(n, e) {
|
|
|
16154
16179
|
return t;
|
|
16155
16180
|
}
|
|
16156
16181
|
function Og(n, e, t) {
|
|
16157
|
-
let r =
|
|
16182
|
+
let r = Ln(e), s = dt.get(e).spec.config, i = (t ? n.undone : n.done).popEvent(e, r);
|
|
16158
16183
|
if (!i)
|
|
16159
16184
|
return null;
|
|
16160
16185
|
let o = i.selection.resolve(i.transform.doc), l = (t ? n.done : n.undone).addTransform(i.transform, e.selection.getBookmark(), s, r), a = new He(t ? l : i.remaining, t ? i.remaining : l, null, 0, -1);
|
|
16161
16186
|
return i.transform.setSelection(o).setMeta(dt, { redo: t, historyState: a });
|
|
16162
16187
|
}
|
|
16163
|
-
let
|
|
16164
|
-
function
|
|
16188
|
+
let hs = !1, nl = null;
|
|
16189
|
+
function Ln(n) {
|
|
16165
16190
|
let e = n.plugins;
|
|
16166
16191
|
if (nl != e) {
|
|
16167
|
-
|
|
16192
|
+
hs = !1, nl = e;
|
|
16168
16193
|
for (let t = 0; t < e.length; t++)
|
|
16169
16194
|
if (e[t].spec.historyPreserveItems) {
|
|
16170
|
-
|
|
16195
|
+
hs = !0;
|
|
16171
16196
|
break;
|
|
16172
16197
|
}
|
|
16173
16198
|
}
|
|
16174
|
-
return
|
|
16199
|
+
return hs;
|
|
16175
16200
|
}
|
|
16176
16201
|
const dt = new K("history"), Ig = new K("closeHistory");
|
|
16177
16202
|
function Dg(n = {}) {
|
|
@@ -16377,7 +16402,7 @@ H.create({
|
|
|
16377
16402
|
return null;
|
|
16378
16403
|
const i = this.editor.isEmpty;
|
|
16379
16404
|
return n.descendants((o, l) => {
|
|
16380
|
-
const a = r >= l && r <= l + o.nodeSize, c = !o.isLeaf &&
|
|
16405
|
+
const a = r >= l && r <= l + o.nodeSize, c = !o.isLeaf && zr(o);
|
|
16381
16406
|
if ((a || !this.options.showOnlyCurrent) && c) {
|
|
16382
16407
|
const u = [this.options.emptyNodeClass];
|
|
16383
16408
|
i && u.push(this.options.emptyEditorClass);
|
|
@@ -16521,7 +16546,7 @@ const Fg = ["onClick"], Vg = /* @__PURE__ */ hn({
|
|
|
16521
16546
|
(l) => {
|
|
16522
16547
|
i.value?.getHTML() !== l && i.value?.commands.setContent(l || "");
|
|
16523
16548
|
}
|
|
16524
|
-
),
|
|
16549
|
+
), Ws(() => {
|
|
16525
16550
|
i.value?.destroy();
|
|
16526
16551
|
}), (l, a) => (Di(), Ii("div", {
|
|
16527
16552
|
class: kn(l.$style.container)
|
|
@@ -16536,8 +16561,8 @@ const Fg = ["onClick"], Vg = /* @__PURE__ */ hn({
|
|
|
16536
16561
|
type: "button"
|
|
16537
16562
|
}, Jc(c.name), 11, Fg)), 64))
|
|
16538
16563
|
], 2),
|
|
16539
|
-
Kc(
|
|
16540
|
-
editor:
|
|
16564
|
+
Kc(ps(nm), {
|
|
16565
|
+
editor: ps(i),
|
|
16541
16566
|
class: kn(l.$style.editor)
|
|
16542
16567
|
}, null, 8, ["editor", "class"])
|
|
16543
16568
|
], 2));
|