@airalogy/aimd-editor 1.7.1 → 1.8.0
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/LICENSE +201 -0
- package/README.md +6 -1
- package/README.zh-CN.md +6 -1
- package/dist/{AimdEditorTopBar.vue_vue_type_script_setup_true_lang-gbfMDZSh.js → AimdEditorTopBar.vue_vue_type_script_setup_true_lang-yYY-Yq1g.js} +2 -2
- package/dist/AimdSourceEditor.vue_vue_type_script_setup_true_lang-ttzw5IdG.js +4976 -0
- package/dist/{AimdWysiwygEditor.vue_vue_type_script_setup_true_lang-B8o1VbUH.js → AimdWysiwygEditor.vue_vue_type_script_setup_true_lang-tRm4S2Nv.js} +651 -651
- package/dist/embedded.js +2 -2
- package/dist/index.js +3 -3
- package/dist/vue.js +3 -3
- package/dist/wysiwyg.js +1 -1
- package/package.json +12 -12
- package/src/vue/AimdSourceEditor.vue +39 -0
- package/src/vue/aimdDiagnostics.ts +39 -0
- package/src/vue/aimdInlineMarkdownNormalization.ts +2 -1
- package/dist/AimdSourceEditor.vue_vue_type_script_setup_true_lang-t_sUoXky.js +0 -274
|
@@ -496,7 +496,7 @@ function e1(t = hn) {
|
|
|
496
496
|
};
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function cI(t = hn, e = []) {
|
|
500
500
|
const n = [
|
|
501
501
|
{ key: "str", value: "str", ...t.varTypePresets.str },
|
|
502
502
|
{ key: "int", value: "int", ...t.varTypePresets.int },
|
|
@@ -530,7 +530,7 @@ function aI(t = hn, e = []) {
|
|
|
530
530
|
function Zc(t) {
|
|
531
531
|
return t.trim().toLowerCase().replace(/[\s_-]/g, "");
|
|
532
532
|
}
|
|
533
|
-
const
|
|
533
|
+
const uI = Qy(hn), fI = e1(hn);
|
|
534
534
|
function nn(t) {
|
|
535
535
|
const e = t.trim();
|
|
536
536
|
return e ? /[:#\[\]\{\},&*!?|><=@`]/.test(e) || /^\s|\s$/.test(t) || /["']/.test(e) ? JSON.stringify(e) : e : '""';
|
|
@@ -576,7 +576,7 @@ function i1(t) {
|
|
|
576
576
|
const n = Number(e);
|
|
577
577
|
return Number.isNaN(n) || n < 0 ? null : String(n);
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function dI(t, e) {
|
|
580
580
|
switch (t) {
|
|
581
581
|
case "var":
|
|
582
582
|
return { name: "", type: "str", default: "", title: "" };
|
|
@@ -610,7 +610,7 @@ function fI(t, e) {
|
|
|
610
610
|
return { name: "" };
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function hI(t, e, n) {
|
|
614
614
|
switch (t) {
|
|
615
615
|
case "var": {
|
|
616
616
|
let r = (e.name || "").trim() || "my_var";
|
|
@@ -676,7 +676,7 @@ function dI(t, e, n) {
|
|
|
676
676
|
return `{{${t}|${e.name || "id"}}}`;
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function pI(t, e) {
|
|
680
680
|
return {
|
|
681
681
|
var: "{{var|var_id: str}}",
|
|
682
682
|
var_table: "{{var_table|table_id, subvars=[col1, col2, col3]}}",
|
|
@@ -704,32 +704,176 @@ function hI(t, e) {
|
|
|
704
704
|
cite: "{{cite|ref1}}"
|
|
705
705
|
}[t] || `{{${t}|id}}`;
|
|
706
706
|
}
|
|
707
|
+
const cs = (
|
|
708
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
709
|
+
/**
|
|
710
|
+
* @type {(
|
|
711
|
+
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
712
|
+
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
713
|
+
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
714
|
+
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
715
|
+
* ((test?: Test) => Check)
|
|
716
|
+
* )}
|
|
717
|
+
*/
|
|
718
|
+
/**
|
|
719
|
+
* @param {Test} [test]
|
|
720
|
+
* @returns {Check}
|
|
721
|
+
*/
|
|
722
|
+
(function(t) {
|
|
723
|
+
if (t == null)
|
|
724
|
+
return a1;
|
|
725
|
+
if (typeof t == "function")
|
|
726
|
+
return us(t);
|
|
727
|
+
if (typeof t == "object")
|
|
728
|
+
return Array.isArray(t) ? o1(t) : (
|
|
729
|
+
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
730
|
+
// narrows to `Array`.
|
|
731
|
+
s1(
|
|
732
|
+
/** @type {Props} */
|
|
733
|
+
t
|
|
734
|
+
)
|
|
735
|
+
);
|
|
736
|
+
if (typeof t == "string")
|
|
737
|
+
return l1(t);
|
|
738
|
+
throw new Error("Expected function, string, or object as test");
|
|
739
|
+
})
|
|
740
|
+
);
|
|
741
|
+
function o1(t) {
|
|
742
|
+
const e = [];
|
|
743
|
+
let n = -1;
|
|
744
|
+
for (; ++n < t.length; )
|
|
745
|
+
e[n] = cs(t[n]);
|
|
746
|
+
return us(r);
|
|
747
|
+
function r(...i) {
|
|
748
|
+
let o = -1;
|
|
749
|
+
for (; ++o < e.length; )
|
|
750
|
+
if (e[o].apply(this, i)) return !0;
|
|
751
|
+
return !1;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
function s1(t) {
|
|
755
|
+
const e = (
|
|
756
|
+
/** @type {Record<string, unknown>} */
|
|
757
|
+
t
|
|
758
|
+
);
|
|
759
|
+
return us(n);
|
|
760
|
+
function n(r) {
|
|
761
|
+
const i = (
|
|
762
|
+
/** @type {Record<string, unknown>} */
|
|
763
|
+
/** @type {unknown} */
|
|
764
|
+
r
|
|
765
|
+
);
|
|
766
|
+
let o;
|
|
767
|
+
for (o in t)
|
|
768
|
+
if (i[o] !== e[o]) return !1;
|
|
769
|
+
return !0;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
function l1(t) {
|
|
773
|
+
return us(e);
|
|
774
|
+
function e(n) {
|
|
775
|
+
return n && n.type === t;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
function us(t) {
|
|
779
|
+
return e;
|
|
780
|
+
function e(n, r, i) {
|
|
781
|
+
return !!(c1(n) && t.call(
|
|
782
|
+
this,
|
|
783
|
+
n,
|
|
784
|
+
typeof r == "number" ? r : void 0,
|
|
785
|
+
i || void 0
|
|
786
|
+
));
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
function a1() {
|
|
790
|
+
return !0;
|
|
791
|
+
}
|
|
792
|
+
function c1(t) {
|
|
793
|
+
return t !== null && typeof t == "object" && "type" in t;
|
|
794
|
+
}
|
|
795
|
+
const wd = [], u1 = !0, Yl = !1, Xl = "skip";
|
|
796
|
+
function Wa(t, e, n, r) {
|
|
797
|
+
let i;
|
|
798
|
+
typeof e == "function" && typeof n != "function" ? (r = n, n = e) : i = e;
|
|
799
|
+
const o = cs(i), s = r ? -1 : 1;
|
|
800
|
+
l(t, void 0, [])();
|
|
801
|
+
function l(a, c, u) {
|
|
802
|
+
const f = (
|
|
803
|
+
/** @type {Record<string, unknown>} */
|
|
804
|
+
a && typeof a == "object" ? a : {}
|
|
805
|
+
);
|
|
806
|
+
if (typeof f.type == "string") {
|
|
807
|
+
const h = (
|
|
808
|
+
// `hast`
|
|
809
|
+
typeof f.tagName == "string" ? f.tagName : (
|
|
810
|
+
// `xast`
|
|
811
|
+
typeof f.name == "string" ? f.name : void 0
|
|
812
|
+
)
|
|
813
|
+
);
|
|
814
|
+
Object.defineProperty(d, "name", {
|
|
815
|
+
value: "node (" + (a.type + (h ? "<" + h + ">" : "")) + ")"
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
return d;
|
|
819
|
+
function d() {
|
|
820
|
+
let h = wd, p, m, g;
|
|
821
|
+
if ((!e || o(a, c, u[u.length - 1] || void 0)) && (h = f1(n(a, u)), h[0] === Yl))
|
|
822
|
+
return h;
|
|
823
|
+
if ("children" in a && a.children) {
|
|
824
|
+
const y = (
|
|
825
|
+
/** @type {UnistParent} */
|
|
826
|
+
a
|
|
827
|
+
);
|
|
828
|
+
if (y.children && h[0] !== Xl)
|
|
829
|
+
for (m = (r ? y.children.length : -1) + s, g = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
830
|
+
const A = y.children[m];
|
|
831
|
+
if (p = l(A, m, g)(), p[0] === Yl)
|
|
832
|
+
return p;
|
|
833
|
+
m = typeof p[1] == "number" ? p[1] : m + s;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
return h;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
function f1(t) {
|
|
841
|
+
return Array.isArray(t) ? t : typeof t == "number" ? [u1, t] : t == null ? wd : [t];
|
|
842
|
+
}
|
|
843
|
+
function jr(t, e, n, r) {
|
|
844
|
+
let i, o, s;
|
|
845
|
+
typeof e == "function" && typeof n != "function" ? (o = void 0, s = e, i = n) : (o = e, s = n, i = r), Wa(t, o, l, i);
|
|
846
|
+
function l(a, c) {
|
|
847
|
+
const u = c[c.length - 1], f = u ? u.children.indexOf(a) : void 0;
|
|
848
|
+
return s(a, f, u);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
707
851
|
var Mt = /* @__PURE__ */ ((t) => (t.docTypeError = "docTypeError", t.contextNotFound = "contextNotFound", t.timerNotFound = "timerNotFound", t.ctxCallOutOfScope = "ctxCallOutOfScope", t.createNodeInParserFail = "createNodeInParserFail", t.stackOverFlow = "stackOverFlow", t.parserMatchError = "parserMatchError", t.serializerMatchError = "serializerMatchError", t.getAtomFromSchemaFail = "getAtomFromSchemaFail", t.expectDomTypeError = "expectDomTypeError", t.callCommandBeforeEditorView = "callCommandBeforeEditorView", t.missingRootElement = "missingRootElement", t.missingNodeInSchema = "missingNodeInSchema", t.missingMarkInSchema = "missingMarkInSchema", t.ctxNotBind = "ctxNotBind", t.missingYjsDoc = "missingYjsDoc", t))(Mt || {});
|
|
708
852
|
class Lt extends Error {
|
|
709
853
|
constructor(e, n) {
|
|
710
854
|
super(n), this.name = "MilkdownError", this.code = e;
|
|
711
855
|
}
|
|
712
856
|
}
|
|
713
|
-
const
|
|
714
|
-
function
|
|
857
|
+
const d1 = (t, e) => typeof e == "function" ? "[Function]" : e, fs = (t) => JSON.stringify(t, d1);
|
|
858
|
+
function h1(t) {
|
|
715
859
|
return new Lt(
|
|
716
860
|
Mt.docTypeError,
|
|
717
|
-
`Doc type error, unsupported type: ${
|
|
861
|
+
`Doc type error, unsupported type: ${fs(t)}`
|
|
718
862
|
);
|
|
719
863
|
}
|
|
720
|
-
function
|
|
864
|
+
function p1(t) {
|
|
721
865
|
return new Lt(
|
|
722
866
|
Mt.contextNotFound,
|
|
723
867
|
`Context "${t}" not found, do you forget to inject it?`
|
|
724
868
|
);
|
|
725
869
|
}
|
|
726
|
-
function
|
|
870
|
+
function ds() {
|
|
727
871
|
return new Lt(
|
|
728
872
|
Mt.ctxCallOutOfScope,
|
|
729
873
|
"Should not call a context out of the plugin."
|
|
730
874
|
);
|
|
731
875
|
}
|
|
732
|
-
function
|
|
876
|
+
function m1(t, e, n) {
|
|
733
877
|
const i = `Cannot create node for ${"name" in t ? t.name : t}`, o = (u) => {
|
|
734
878
|
if (u == null) return "null";
|
|
735
879
|
if (Array.isArray(u))
|
|
@@ -761,28 +905,28 @@ function a1(t, e, n) {
|
|
|
761
905
|
`)
|
|
762
906
|
);
|
|
763
907
|
}
|
|
764
|
-
function
|
|
908
|
+
function xd() {
|
|
765
909
|
return new Lt(
|
|
766
910
|
Mt.stackOverFlow,
|
|
767
911
|
"Stack over flow, cannot pop on an empty stack."
|
|
768
912
|
);
|
|
769
913
|
}
|
|
770
|
-
function
|
|
914
|
+
function g1(t) {
|
|
771
915
|
return new Lt(
|
|
772
916
|
Mt.parserMatchError,
|
|
773
|
-
`Cannot match target parser for node: ${
|
|
917
|
+
`Cannot match target parser for node: ${fs(t)}.`
|
|
774
918
|
);
|
|
775
919
|
}
|
|
776
|
-
function
|
|
920
|
+
function y1(t) {
|
|
777
921
|
return new Lt(
|
|
778
922
|
Mt.serializerMatchError,
|
|
779
|
-
`Cannot match target serializer for node: ${
|
|
923
|
+
`Cannot match target serializer for node: ${fs(t)}.`
|
|
780
924
|
);
|
|
781
925
|
}
|
|
782
926
|
function Yt(t) {
|
|
783
927
|
return new Lt(
|
|
784
928
|
Mt.expectDomTypeError,
|
|
785
|
-
`Expect to be a dom, but get: ${
|
|
929
|
+
`Expect to be a dom, but get: ${fs(t)}.`
|
|
786
930
|
);
|
|
787
931
|
}
|
|
788
932
|
function Us() {
|
|
@@ -791,25 +935,25 @@ function Us() {
|
|
|
791
935
|
"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized"
|
|
792
936
|
);
|
|
793
937
|
}
|
|
794
|
-
function
|
|
938
|
+
function k1(t) {
|
|
795
939
|
return new Lt(
|
|
796
940
|
Mt.missingNodeInSchema,
|
|
797
941
|
`Missing node in schema, milkdown cannot find "${t}" in schema.`
|
|
798
942
|
);
|
|
799
943
|
}
|
|
800
|
-
function
|
|
944
|
+
function b1(t) {
|
|
801
945
|
return new Lt(
|
|
802
946
|
Mt.missingMarkInSchema,
|
|
803
947
|
`Missing mark in schema, milkdown cannot find "${t}" in schema.`
|
|
804
948
|
);
|
|
805
949
|
}
|
|
806
|
-
class
|
|
950
|
+
class w1 {
|
|
807
951
|
constructor() {
|
|
808
952
|
this.sliceMap = /* @__PURE__ */ new Map(), this.get = (e) => {
|
|
809
953
|
const n = typeof e == "string" ? [...this.sliceMap.values()].find((r) => r.type.name === e) : this.sliceMap.get(e.id);
|
|
810
954
|
if (!n) {
|
|
811
955
|
const r = typeof e == "string" ? e : e.name;
|
|
812
|
-
throw
|
|
956
|
+
throw p1(r);
|
|
813
957
|
}
|
|
814
958
|
return n;
|
|
815
959
|
}, this.remove = (e) => {
|
|
@@ -818,7 +962,7 @@ class h1 {
|
|
|
818
962
|
}, this.has = (e) => typeof e == "string" ? [...this.sliceMap.values()].some((n) => n.type.name === e) : this.sliceMap.has(e.id);
|
|
819
963
|
}
|
|
820
964
|
}
|
|
821
|
-
let
|
|
965
|
+
let x1 = class {
|
|
822
966
|
/// @internal
|
|
823
967
|
constructor(e, n, r) {
|
|
824
968
|
this.#t = [], this.#n = () => {
|
|
@@ -858,22 +1002,22 @@ let p1 = class {
|
|
|
858
1002
|
this.#t = [];
|
|
859
1003
|
}
|
|
860
1004
|
};
|
|
861
|
-
class
|
|
1005
|
+
class C1 {
|
|
862
1006
|
/// Create a slice type with a default value and a name.
|
|
863
1007
|
/// The name should be unique in the container.
|
|
864
1008
|
constructor(e, n) {
|
|
865
1009
|
this.id = /* @__PURE__ */ Symbol(`Context-${n}`), this.name = n, this._defaultValue = e, this._typeInfo = () => {
|
|
866
|
-
throw
|
|
1010
|
+
throw ds();
|
|
867
1011
|
};
|
|
868
1012
|
}
|
|
869
1013
|
/// Create a slice with a container.
|
|
870
1014
|
/// You can also pass a value to override the default value.
|
|
871
1015
|
create(e, n = this._defaultValue) {
|
|
872
|
-
return new
|
|
1016
|
+
return new x1(e, n, this);
|
|
873
1017
|
}
|
|
874
1018
|
}
|
|
875
|
-
const oe = (t, e) => new
|
|
876
|
-
class
|
|
1019
|
+
const oe = (t, e) => new C1(t, e);
|
|
1020
|
+
class S1 {
|
|
877
1021
|
/// @internal
|
|
878
1022
|
constructor(e, n) {
|
|
879
1023
|
this.#t = null, this.#e = null, this.#r = "pending", this.start = () => (this.#t ??= new Promise((r, i) => {
|
|
@@ -908,14 +1052,14 @@ class g1 {
|
|
|
908
1052
|
#i;
|
|
909
1053
|
#o;
|
|
910
1054
|
}
|
|
911
|
-
class
|
|
1055
|
+
class T1 {
|
|
912
1056
|
/// Create a timer type with a name and a timeout.
|
|
913
1057
|
/// The name should be unique in the clock.
|
|
914
1058
|
constructor(e, n = 3e3) {
|
|
915
|
-
this.create = (r) => new
|
|
1059
|
+
this.create = (r) => new S1(r, this), this.id = /* @__PURE__ */ Symbol(`Timer-${e}`), this.name = e, this.timeout = n;
|
|
916
1060
|
}
|
|
917
1061
|
}
|
|
918
|
-
const Xt = (t, e = 3e3) => new
|
|
1062
|
+
const Xt = (t, e = 3e3) => new T1(t, e);
|
|
919
1063
|
function Ee(t) {
|
|
920
1064
|
this.content = t;
|
|
921
1065
|
}
|
|
@@ -1016,7 +1160,7 @@ Ee.from = function(t) {
|
|
|
1016
1160
|
if (t) for (var n in t) e.push(n, t[n]);
|
|
1017
1161
|
return new Ee(e);
|
|
1018
1162
|
};
|
|
1019
|
-
function
|
|
1163
|
+
function Cd(t, e, n) {
|
|
1020
1164
|
for (let r = 0; ; r++) {
|
|
1021
1165
|
if (r == t.childCount || r == e.childCount)
|
|
1022
1166
|
return t.childCount == e.childCount ? null : n;
|
|
@@ -1033,14 +1177,14 @@ function xd(t, e, n) {
|
|
|
1033
1177
|
return n;
|
|
1034
1178
|
}
|
|
1035
1179
|
if (i.content.size || o.content.size) {
|
|
1036
|
-
let s =
|
|
1180
|
+
let s = Cd(i.content, o.content, n + 1);
|
|
1037
1181
|
if (s != null)
|
|
1038
1182
|
return s;
|
|
1039
1183
|
}
|
|
1040
1184
|
n += i.nodeSize;
|
|
1041
1185
|
}
|
|
1042
1186
|
}
|
|
1043
|
-
function
|
|
1187
|
+
function Sd(t, e, n, r) {
|
|
1044
1188
|
for (let i = t.childCount, o = e.childCount; ; ) {
|
|
1045
1189
|
if (i == 0 || o == 0)
|
|
1046
1190
|
return i == o ? null : { a: n, b: r };
|
|
@@ -1058,7 +1202,7 @@ function Cd(t, e, n, r) {
|
|
|
1058
1202
|
return { a: n, b: r };
|
|
1059
1203
|
}
|
|
1060
1204
|
if (s.content.size || l.content.size) {
|
|
1061
|
-
let c =
|
|
1205
|
+
let c = Sd(s.content, l.content, n - 1, r - 1);
|
|
1062
1206
|
if (c)
|
|
1063
1207
|
return c;
|
|
1064
1208
|
}
|
|
@@ -1227,7 +1371,7 @@ class O {
|
|
|
1227
1371
|
fragment differ, or `null` if they are the same.
|
|
1228
1372
|
*/
|
|
1229
1373
|
findDiffStart(e, n = 0) {
|
|
1230
|
-
return
|
|
1374
|
+
return Cd(this, e, n);
|
|
1231
1375
|
}
|
|
1232
1376
|
/**
|
|
1233
1377
|
Find the first position, searching from the end, at which this
|
|
@@ -1236,7 +1380,7 @@ class O {
|
|
|
1236
1380
|
nodes, an object with two separate positions is returned.
|
|
1237
1381
|
*/
|
|
1238
1382
|
findDiffEnd(e, n = this.size, r = e.size) {
|
|
1239
|
-
return
|
|
1383
|
+
return Sd(this, e, n, r);
|
|
1240
1384
|
}
|
|
1241
1385
|
/**
|
|
1242
1386
|
Find the index and inner offset corresponding to a given relative
|
|
@@ -1480,14 +1624,14 @@ class L {
|
|
|
1480
1624
|
@internal
|
|
1481
1625
|
*/
|
|
1482
1626
|
insertAt(e, n) {
|
|
1483
|
-
let r =
|
|
1627
|
+
let r = Md(this.content, e + this.openStart, n);
|
|
1484
1628
|
return r && new L(r, this.openStart, this.openEnd);
|
|
1485
1629
|
}
|
|
1486
1630
|
/**
|
|
1487
1631
|
@internal
|
|
1488
1632
|
*/
|
|
1489
1633
|
removeBetween(e, n) {
|
|
1490
|
-
return new L(
|
|
1634
|
+
return new L(Td(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
|
|
1491
1635
|
}
|
|
1492
1636
|
/**
|
|
1493
1637
|
Tests whether this slice is equal to another slice.
|
|
@@ -1535,7 +1679,7 @@ class L {
|
|
|
1535
1679
|
}
|
|
1536
1680
|
}
|
|
1537
1681
|
L.empty = new L(O.empty, 0, 0);
|
|
1538
|
-
function
|
|
1682
|
+
function Td(t, e, n) {
|
|
1539
1683
|
let { index: r, offset: i } = t.findIndex(e), o = t.maybeChild(r), { index: s, offset: l } = t.findIndex(n);
|
|
1540
1684
|
if (i == e || o.isText) {
|
|
1541
1685
|
if (l != n && !t.child(s).isText)
|
|
@@ -1544,44 +1688,44 @@ function Sd(t, e, n) {
|
|
|
1544
1688
|
}
|
|
1545
1689
|
if (r != s)
|
|
1546
1690
|
throw new RangeError("Removing non-flat range");
|
|
1547
|
-
return t.replaceChild(r, o.copy(
|
|
1691
|
+
return t.replaceChild(r, o.copy(Td(o.content, e - i - 1, n - i - 1)));
|
|
1548
1692
|
}
|
|
1549
|
-
function
|
|
1693
|
+
function Md(t, e, n, r) {
|
|
1550
1694
|
let { index: i, offset: o } = t.findIndex(e), s = t.maybeChild(i);
|
|
1551
1695
|
if (o == e || s.isText)
|
|
1552
1696
|
return r && !r.canReplace(i, i, n) ? null : t.cut(0, e).append(n).append(t.cut(e));
|
|
1553
|
-
let l =
|
|
1697
|
+
let l = Md(s.content, e - o - 1, n, s);
|
|
1554
1698
|
return l && t.replaceChild(i, s.copy(l));
|
|
1555
1699
|
}
|
|
1556
|
-
function
|
|
1700
|
+
function M1(t, e, n) {
|
|
1557
1701
|
if (n.openStart > t.depth)
|
|
1558
1702
|
throw new Vo("Inserted content deeper than insertion position");
|
|
1559
1703
|
if (t.depth - n.openStart != e.depth - n.openEnd)
|
|
1560
1704
|
throw new Vo("Inconsistent open depths");
|
|
1561
|
-
return
|
|
1705
|
+
return Ad(t, e, n, 0);
|
|
1562
1706
|
}
|
|
1563
|
-
function
|
|
1707
|
+
function Ad(t, e, n, r) {
|
|
1564
1708
|
let i = t.index(r), o = t.node(r);
|
|
1565
1709
|
if (i == e.index(r) && r < t.depth - n.openStart) {
|
|
1566
|
-
let s =
|
|
1710
|
+
let s = Ad(t, e, n, r + 1);
|
|
1567
1711
|
return o.copy(o.content.replaceChild(i, s));
|
|
1568
1712
|
} else if (n.content.size)
|
|
1569
1713
|
if (!n.openStart && !n.openEnd && t.depth == r && e.depth == r) {
|
|
1570
1714
|
let s = t.parent, l = s.content;
|
|
1571
1715
|
return rr(s, l.cut(0, t.parentOffset).append(n.content).append(l.cut(e.parentOffset)));
|
|
1572
1716
|
} else {
|
|
1573
|
-
let { start: s, end: l } =
|
|
1574
|
-
return rr(o,
|
|
1717
|
+
let { start: s, end: l } = A1(n, t);
|
|
1718
|
+
return rr(o, Ed(t, s, l, e, r));
|
|
1575
1719
|
}
|
|
1576
1720
|
else return rr(o, Wo(t, e, r));
|
|
1577
1721
|
}
|
|
1578
|
-
function
|
|
1722
|
+
function Nd(t, e) {
|
|
1579
1723
|
if (!e.type.compatibleContent(t.type))
|
|
1580
1724
|
throw new Vo("Cannot join " + e.type.name + " onto " + t.type.name);
|
|
1581
1725
|
}
|
|
1582
|
-
function
|
|
1726
|
+
function Ql(t, e, n) {
|
|
1583
1727
|
let r = t.node(n);
|
|
1584
|
-
return
|
|
1728
|
+
return Nd(r, e.node(n)), r;
|
|
1585
1729
|
}
|
|
1586
1730
|
function nr(t, e) {
|
|
1587
1731
|
let n = e.length - 1;
|
|
@@ -1597,19 +1741,19 @@ function Si(t, e, n, r) {
|
|
|
1597
1741
|
function rr(t, e) {
|
|
1598
1742
|
return t.type.checkContent(e), t.copy(e);
|
|
1599
1743
|
}
|
|
1600
|
-
function
|
|
1601
|
-
let o = t.depth > i &&
|
|
1602
|
-
return Si(null, t, i, l), o && s && e.index(i) == n.index(i) ? (
|
|
1744
|
+
function Ed(t, e, n, r, i) {
|
|
1745
|
+
let o = t.depth > i && Ql(t, e, i + 1), s = r.depth > i && Ql(n, r, i + 1), l = [];
|
|
1746
|
+
return Si(null, t, i, l), o && s && e.index(i) == n.index(i) ? (Nd(o, s), nr(rr(o, Ed(t, e, n, r, i + 1)), l)) : (o && nr(rr(o, Wo(t, e, i + 1)), l), Si(e, n, i, l), s && nr(rr(s, Wo(n, r, i + 1)), l)), Si(r, null, i, l), new O(l);
|
|
1603
1747
|
}
|
|
1604
1748
|
function Wo(t, e, n) {
|
|
1605
1749
|
let r = [];
|
|
1606
1750
|
if (Si(null, t, n, r), t.depth > n) {
|
|
1607
|
-
let i =
|
|
1751
|
+
let i = Ql(t, e, n + 1);
|
|
1608
1752
|
nr(rr(i, Wo(t, e, n + 1)), r);
|
|
1609
1753
|
}
|
|
1610
1754
|
return Si(e, null, n, r), new O(r);
|
|
1611
1755
|
}
|
|
1612
|
-
function
|
|
1756
|
+
function A1(t, e) {
|
|
1613
1757
|
let n = e.depth - t.openStart, i = e.node(n).copy(t.content);
|
|
1614
1758
|
for (let o = n - 1; o >= 0; o--)
|
|
1615
1759
|
i = e.node(o).copy(O.from(i));
|
|
@@ -1803,7 +1947,7 @@ class Li {
|
|
|
1803
1947
|
return e.blockRange(this);
|
|
1804
1948
|
for (let r = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); r >= 0; r--)
|
|
1805
1949
|
if (e.pos <= this.end(r) && (!n || n(this.node(r))))
|
|
1806
|
-
return new
|
|
1950
|
+
return new Id(this, e, r);
|
|
1807
1951
|
return null;
|
|
1808
1952
|
}
|
|
1809
1953
|
/**
|
|
@@ -1860,18 +2004,18 @@ class Li {
|
|
|
1860
2004
|
return s;
|
|
1861
2005
|
}
|
|
1862
2006
|
else
|
|
1863
|
-
eu.set(e, r = new
|
|
2007
|
+
eu.set(e, r = new N1());
|
|
1864
2008
|
let i = r.elts[r.i] = Li.resolve(e, n);
|
|
1865
|
-
return r.i = (r.i + 1) %
|
|
2009
|
+
return r.i = (r.i + 1) % E1, i;
|
|
1866
2010
|
}
|
|
1867
2011
|
}
|
|
1868
|
-
class
|
|
2012
|
+
class N1 {
|
|
1869
2013
|
constructor() {
|
|
1870
2014
|
this.elts = [], this.i = 0;
|
|
1871
2015
|
}
|
|
1872
2016
|
}
|
|
1873
|
-
const
|
|
1874
|
-
class
|
|
2017
|
+
const E1 = 12, eu = /* @__PURE__ */ new WeakMap();
|
|
2018
|
+
class Id {
|
|
1875
2019
|
/**
|
|
1876
2020
|
Construct a node range. `$from` and `$to` should point into the
|
|
1877
2021
|
same node until at least the given `depth`, since a node range
|
|
@@ -1911,8 +2055,8 @@ class Ed {
|
|
|
1911
2055
|
return this.$to.indexAfter(this.depth);
|
|
1912
2056
|
}
|
|
1913
2057
|
}
|
|
1914
|
-
const
|
|
1915
|
-
let En = class
|
|
2058
|
+
const I1 = /* @__PURE__ */ Object.create(null);
|
|
2059
|
+
let En = class Zl {
|
|
1916
2060
|
/**
|
|
1917
2061
|
@internal
|
|
1918
2062
|
*/
|
|
@@ -2030,21 +2174,21 @@ let En = class Xl {
|
|
|
2030
2174
|
attributes, and marks.
|
|
2031
2175
|
*/
|
|
2032
2176
|
hasMarkup(e, n, r) {
|
|
2033
|
-
return this.type == e && $o(this.attrs, n || e.defaultAttrs ||
|
|
2177
|
+
return this.type == e && $o(this.attrs, n || e.defaultAttrs || I1) && ne.sameSet(this.marks, r || ne.none);
|
|
2034
2178
|
}
|
|
2035
2179
|
/**
|
|
2036
2180
|
Create a new node with the same markup as this node, containing
|
|
2037
2181
|
the given content (or empty, if no content is given).
|
|
2038
2182
|
*/
|
|
2039
2183
|
copy(e = null) {
|
|
2040
|
-
return e == this.content ? this : new
|
|
2184
|
+
return e == this.content ? this : new Zl(this.type, this.attrs, e, this.marks);
|
|
2041
2185
|
}
|
|
2042
2186
|
/**
|
|
2043
2187
|
Create a copy of this node, with the given set of marks instead
|
|
2044
2188
|
of the node's own marks.
|
|
2045
2189
|
*/
|
|
2046
2190
|
mark(e) {
|
|
2047
|
-
return e == this.marks ? this : new
|
|
2191
|
+
return e == this.marks ? this : new Zl(this.type, this.attrs, this.content, e);
|
|
2048
2192
|
}
|
|
2049
2193
|
/**
|
|
2050
2194
|
Create a copy of this node with only the content between the
|
|
@@ -2073,7 +2217,7 @@ let En = class Xl {
|
|
|
2073
2217
|
[`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
|
|
2074
2218
|
*/
|
|
2075
2219
|
replace(e, n, r) {
|
|
2076
|
-
return
|
|
2220
|
+
return M1(this.resolve(e), this.resolve(n), r);
|
|
2077
2221
|
}
|
|
2078
2222
|
/**
|
|
2079
2223
|
Find the node directly after the given position.
|
|
@@ -2188,7 +2332,7 @@ let En = class Xl {
|
|
|
2188
2332
|
if (this.type.spec.toDebugString)
|
|
2189
2333
|
return this.type.spec.toDebugString(this);
|
|
2190
2334
|
let e = this.type.name;
|
|
2191
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
2335
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), vd(this.marks, e);
|
|
2192
2336
|
}
|
|
2193
2337
|
/**
|
|
2194
2338
|
Get the content match in this node at the given index.
|
|
@@ -2292,7 +2436,7 @@ class qo extends En {
|
|
|
2292
2436
|
this.text = r;
|
|
2293
2437
|
}
|
|
2294
2438
|
toString() {
|
|
2295
|
-
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) :
|
|
2439
|
+
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : vd(this.marks, JSON.stringify(this.text));
|
|
2296
2440
|
}
|
|
2297
2441
|
get textContent() {
|
|
2298
2442
|
return this.text;
|
|
@@ -2320,7 +2464,7 @@ class qo extends En {
|
|
|
2320
2464
|
return e.text = this.text, e;
|
|
2321
2465
|
}
|
|
2322
2466
|
}
|
|
2323
|
-
function
|
|
2467
|
+
function vd(t, e) {
|
|
2324
2468
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2325
2469
|
e = t[n].type.name + "(" + e + ")";
|
|
2326
2470
|
return e;
|
|
@@ -2336,13 +2480,13 @@ class sr {
|
|
|
2336
2480
|
@internal
|
|
2337
2481
|
*/
|
|
2338
2482
|
static parse(e, n) {
|
|
2339
|
-
let r = new
|
|
2483
|
+
let r = new v1(e, n);
|
|
2340
2484
|
if (r.next == null)
|
|
2341
2485
|
return sr.empty;
|
|
2342
|
-
let i =
|
|
2486
|
+
let i = Od(r);
|
|
2343
2487
|
r.next && r.err("Unexpected trailing text");
|
|
2344
|
-
let o =
|
|
2345
|
-
return
|
|
2488
|
+
let o = z1(P1(i));
|
|
2489
|
+
return B1(o, r), o;
|
|
2346
2490
|
}
|
|
2347
2491
|
/**
|
|
2348
2492
|
Match a node type, returning a match after that node if
|
|
@@ -2488,7 +2632,7 @@ class sr {
|
|
|
2488
2632
|
}
|
|
2489
2633
|
}
|
|
2490
2634
|
sr.empty = new sr(!0);
|
|
2491
|
-
class
|
|
2635
|
+
class v1 {
|
|
2492
2636
|
constructor(e, n) {
|
|
2493
2637
|
this.string = e, this.nodeTypes = n, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
2494
2638
|
}
|
|
@@ -2502,22 +2646,22 @@ class S1 {
|
|
|
2502
2646
|
throw new SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
2503
2647
|
}
|
|
2504
2648
|
}
|
|
2505
|
-
function
|
|
2649
|
+
function Od(t) {
|
|
2506
2650
|
let e = [];
|
|
2507
2651
|
do
|
|
2508
|
-
e.push(
|
|
2652
|
+
e.push(O1(t));
|
|
2509
2653
|
while (t.eat("|"));
|
|
2510
2654
|
return e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
2511
2655
|
}
|
|
2512
|
-
function
|
|
2656
|
+
function O1(t) {
|
|
2513
2657
|
let e = [];
|
|
2514
2658
|
do
|
|
2515
|
-
e.push(
|
|
2659
|
+
e.push(R1(t));
|
|
2516
2660
|
while (t.next && t.next != ")" && t.next != "|");
|
|
2517
2661
|
return e.length == 1 ? e[0] : { type: "seq", exprs: e };
|
|
2518
2662
|
}
|
|
2519
|
-
function
|
|
2520
|
-
let e =
|
|
2663
|
+
function R1(t) {
|
|
2664
|
+
let e = L1(t);
|
|
2521
2665
|
for (; ; )
|
|
2522
2666
|
if (t.eat("+"))
|
|
2523
2667
|
e = { type: "plus", expr: e };
|
|
@@ -2526,7 +2670,7 @@ function M1(t) {
|
|
|
2526
2670
|
else if (t.eat("?"))
|
|
2527
2671
|
e = { type: "opt", expr: e };
|
|
2528
2672
|
else if (t.eat("{"))
|
|
2529
|
-
e =
|
|
2673
|
+
e = D1(t, e);
|
|
2530
2674
|
else
|
|
2531
2675
|
break;
|
|
2532
2676
|
return e;
|
|
@@ -2536,11 +2680,11 @@ function tu(t) {
|
|
|
2536
2680
|
let e = Number(t.next);
|
|
2537
2681
|
return t.pos++, e;
|
|
2538
2682
|
}
|
|
2539
|
-
function
|
|
2683
|
+
function D1(t, e) {
|
|
2540
2684
|
let n = tu(t), r = n;
|
|
2541
2685
|
return t.eat(",") && (t.next != "}" ? r = tu(t) : r = -1), t.eat("}") || t.err("Unclosed braced range"), { type: "range", min: n, max: r, expr: e };
|
|
2542
2686
|
}
|
|
2543
|
-
function
|
|
2687
|
+
function _1(t, e) {
|
|
2544
2688
|
let n = t.nodeTypes, r = n[e];
|
|
2545
2689
|
if (r)
|
|
2546
2690
|
return [r];
|
|
@@ -2551,18 +2695,18 @@ function N1(t, e) {
|
|
|
2551
2695
|
}
|
|
2552
2696
|
return i.length == 0 && t.err("No node type or group '" + e + "' found"), i;
|
|
2553
2697
|
}
|
|
2554
|
-
function
|
|
2698
|
+
function L1(t) {
|
|
2555
2699
|
if (t.eat("(")) {
|
|
2556
|
-
let e =
|
|
2700
|
+
let e = Od(t);
|
|
2557
2701
|
return t.eat(")") || t.err("Missing closing paren"), e;
|
|
2558
2702
|
} else if (/\W/.test(t.next))
|
|
2559
2703
|
t.err("Unexpected token '" + t.next + "'");
|
|
2560
2704
|
else {
|
|
2561
|
-
let e =
|
|
2705
|
+
let e = _1(t, t.next).map((n) => (t.inline == null ? t.inline = n.isInline : t.inline != n.isInline && t.err("Mixing inline and block content"), { type: "name", value: n }));
|
|
2562
2706
|
return t.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
2563
2707
|
}
|
|
2564
2708
|
}
|
|
2565
|
-
function
|
|
2709
|
+
function P1(t) {
|
|
2566
2710
|
let e = [[]];
|
|
2567
2711
|
return i(o(t, 0), n()), e;
|
|
2568
2712
|
function n() {
|
|
@@ -2616,12 +2760,12 @@ function I1(t) {
|
|
|
2616
2760
|
}
|
|
2617
2761
|
}
|
|
2618
2762
|
}
|
|
2619
|
-
function
|
|
2763
|
+
function Rd(t, e) {
|
|
2620
2764
|
return e - t;
|
|
2621
2765
|
}
|
|
2622
2766
|
function nu(t, e) {
|
|
2623
2767
|
let n = [];
|
|
2624
|
-
return r(e), n.sort(
|
|
2768
|
+
return r(e), n.sort(Rd);
|
|
2625
2769
|
function r(i) {
|
|
2626
2770
|
let o = t[i];
|
|
2627
2771
|
if (o.length == 1 && !o[0].term)
|
|
@@ -2633,7 +2777,7 @@ function nu(t, e) {
|
|
|
2633
2777
|
}
|
|
2634
2778
|
}
|
|
2635
2779
|
}
|
|
2636
|
-
function
|
|
2780
|
+
function z1(t) {
|
|
2637
2781
|
let e = /* @__PURE__ */ Object.create(null);
|
|
2638
2782
|
return n(nu(t, 0));
|
|
2639
2783
|
function n(r) {
|
|
@@ -2652,13 +2796,13 @@ function v1(t) {
|
|
|
2652
2796
|
});
|
|
2653
2797
|
let o = e[r.join(",")] = new sr(r.indexOf(t.length - 1) > -1);
|
|
2654
2798
|
for (let s = 0; s < i.length; s++) {
|
|
2655
|
-
let l = i[s][1].sort(
|
|
2799
|
+
let l = i[s][1].sort(Rd);
|
|
2656
2800
|
o.next.push({ type: i[s][0], next: e[l.join(",")] || n(l) });
|
|
2657
2801
|
}
|
|
2658
2802
|
return o;
|
|
2659
2803
|
}
|
|
2660
2804
|
}
|
|
2661
|
-
function
|
|
2805
|
+
function B1(t, e) {
|
|
2662
2806
|
for (let n = 0, r = [t]; n < r.length; n++) {
|
|
2663
2807
|
let i = r[n], o = !i.validEnd, s = [];
|
|
2664
2808
|
for (let l = 0; l < i.next.length; l++) {
|
|
@@ -2668,7 +2812,7 @@ function O1(t, e) {
|
|
|
2668
2812
|
o && e.err("Only non-generatable nodes (" + s.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
|
|
2669
2813
|
}
|
|
2670
2814
|
}
|
|
2671
|
-
function
|
|
2815
|
+
function Dd(t) {
|
|
2672
2816
|
let e = /* @__PURE__ */ Object.create(null);
|
|
2673
2817
|
for (let n in t) {
|
|
2674
2818
|
let r = t[n];
|
|
@@ -2678,7 +2822,7 @@ function Rd(t) {
|
|
|
2678
2822
|
}
|
|
2679
2823
|
return e;
|
|
2680
2824
|
}
|
|
2681
|
-
function
|
|
2825
|
+
function _d(t, e) {
|
|
2682
2826
|
let n = /* @__PURE__ */ Object.create(null);
|
|
2683
2827
|
for (let r in t) {
|
|
2684
2828
|
let i = e && e[r];
|
|
@@ -2693,7 +2837,7 @@ function Dd(t, e) {
|
|
|
2693
2837
|
}
|
|
2694
2838
|
return n;
|
|
2695
2839
|
}
|
|
2696
|
-
function
|
|
2840
|
+
function Ld(t, e, n, r) {
|
|
2697
2841
|
for (let i in e)
|
|
2698
2842
|
if (!(i in t))
|
|
2699
2843
|
throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);
|
|
@@ -2702,19 +2846,19 @@ function _d(t, e, n, r) {
|
|
|
2702
2846
|
o.validate && o.validate(e[i]);
|
|
2703
2847
|
}
|
|
2704
2848
|
}
|
|
2705
|
-
function
|
|
2849
|
+
function Pd(t, e) {
|
|
2706
2850
|
let n = /* @__PURE__ */ Object.create(null);
|
|
2707
2851
|
if (e)
|
|
2708
2852
|
for (let r in e)
|
|
2709
|
-
n[r] = new
|
|
2853
|
+
n[r] = new H1(t, r, e[r]);
|
|
2710
2854
|
return n;
|
|
2711
2855
|
}
|
|
2712
|
-
let jo = class
|
|
2856
|
+
let jo = class zd {
|
|
2713
2857
|
/**
|
|
2714
2858
|
@internal
|
|
2715
2859
|
*/
|
|
2716
2860
|
constructor(e, n, r) {
|
|
2717
|
-
this.name = e, this.schema = n, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs =
|
|
2861
|
+
this.name = e, this.schema = n, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = Pd(e, r.attrs), this.defaultAttrs = Dd(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
|
|
2718
2862
|
}
|
|
2719
2863
|
/**
|
|
2720
2864
|
True if this is an inline type.
|
|
@@ -2775,7 +2919,7 @@ let jo = class Pd {
|
|
|
2775
2919
|
@internal
|
|
2776
2920
|
*/
|
|
2777
2921
|
computeAttrs(e) {
|
|
2778
|
-
return !e && this.defaultAttrs ? this.defaultAttrs :
|
|
2922
|
+
return !e && this.defaultAttrs ? this.defaultAttrs : _d(this.attrs, e);
|
|
2779
2923
|
}
|
|
2780
2924
|
/**
|
|
2781
2925
|
Create a `Node` of this type. The given attributes are
|
|
@@ -2842,7 +2986,7 @@ let jo = class Pd {
|
|
|
2842
2986
|
@internal
|
|
2843
2987
|
*/
|
|
2844
2988
|
checkAttrs(e) {
|
|
2845
|
-
|
|
2989
|
+
Ld(this.attrs, e, "node", this.name);
|
|
2846
2990
|
}
|
|
2847
2991
|
/**
|
|
2848
2992
|
Check whether the given mark type is allowed in this node.
|
|
@@ -2877,7 +3021,7 @@ let jo = class Pd {
|
|
|
2877
3021
|
*/
|
|
2878
3022
|
static compile(e, n) {
|
|
2879
3023
|
let r = /* @__PURE__ */ Object.create(null);
|
|
2880
|
-
e.forEach((o, s) => r[o] = new
|
|
3024
|
+
e.forEach((o, s) => r[o] = new zd(o, n, s));
|
|
2881
3025
|
let i = n.spec.topNode || "doc";
|
|
2882
3026
|
if (!r[i])
|
|
2883
3027
|
throw new RangeError("Schema is missing its top node type ('" + i + "')");
|
|
@@ -2888,7 +3032,7 @@ let jo = class Pd {
|
|
|
2888
3032
|
return r;
|
|
2889
3033
|
}
|
|
2890
3034
|
};
|
|
2891
|
-
function
|
|
3035
|
+
function F1(t, e, n) {
|
|
2892
3036
|
let r = n.split("|");
|
|
2893
3037
|
return (i) => {
|
|
2894
3038
|
let o = i === null ? "null" : typeof i;
|
|
@@ -2896,21 +3040,21 @@ function R1(t, e, n) {
|
|
|
2896
3040
|
throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`);
|
|
2897
3041
|
};
|
|
2898
3042
|
}
|
|
2899
|
-
class
|
|
3043
|
+
class H1 {
|
|
2900
3044
|
constructor(e, n, r) {
|
|
2901
|
-
this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ?
|
|
3045
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? F1(e, n, r.validate) : r.validate;
|
|
2902
3046
|
}
|
|
2903
3047
|
get isRequired() {
|
|
2904
3048
|
return !this.hasDefault;
|
|
2905
3049
|
}
|
|
2906
3050
|
}
|
|
2907
|
-
class
|
|
3051
|
+
class hs {
|
|
2908
3052
|
/**
|
|
2909
3053
|
@internal
|
|
2910
3054
|
*/
|
|
2911
3055
|
constructor(e, n, r, i) {
|
|
2912
|
-
this.name = e, this.rank = n, this.schema = r, this.spec = i, this.attrs =
|
|
2913
|
-
let o =
|
|
3056
|
+
this.name = e, this.rank = n, this.schema = r, this.spec = i, this.attrs = Pd(e, i.attrs), this.excluded = null;
|
|
3057
|
+
let o = Dd(this.attrs);
|
|
2914
3058
|
this.instance = o ? new ne(this, o) : null;
|
|
2915
3059
|
}
|
|
2916
3060
|
/**
|
|
@@ -2919,14 +3063,14 @@ class fs {
|
|
|
2919
3063
|
they have defaults, will be added.
|
|
2920
3064
|
*/
|
|
2921
3065
|
create(e = null) {
|
|
2922
|
-
return !e && this.instance ? this.instance : new ne(this,
|
|
3066
|
+
return !e && this.instance ? this.instance : new ne(this, _d(this.attrs, e));
|
|
2923
3067
|
}
|
|
2924
3068
|
/**
|
|
2925
3069
|
@internal
|
|
2926
3070
|
*/
|
|
2927
3071
|
static compile(e, n) {
|
|
2928
3072
|
let r = /* @__PURE__ */ Object.create(null), i = 0;
|
|
2929
|
-
return e.forEach((o, s) => r[o] = new
|
|
3073
|
+
return e.forEach((o, s) => r[o] = new hs(o, i++, n, s)), r;
|
|
2930
3074
|
}
|
|
2931
3075
|
/**
|
|
2932
3076
|
When there is a mark of this type in the given set, a new set
|
|
@@ -2949,7 +3093,7 @@ class fs {
|
|
|
2949
3093
|
@internal
|
|
2950
3094
|
*/
|
|
2951
3095
|
checkAttrs(e) {
|
|
2952
|
-
|
|
3096
|
+
Ld(this.attrs, e, "mark", this.name);
|
|
2953
3097
|
}
|
|
2954
3098
|
/**
|
|
2955
3099
|
Queries whether a given mark type is
|
|
@@ -2959,7 +3103,7 @@ class fs {
|
|
|
2959
3103
|
return this.excluded.indexOf(e) > -1;
|
|
2960
3104
|
}
|
|
2961
3105
|
}
|
|
2962
|
-
class
|
|
3106
|
+
class $1 {
|
|
2963
3107
|
/**
|
|
2964
3108
|
Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
|
|
2965
3109
|
*/
|
|
@@ -2968,7 +3112,7 @@ class _1 {
|
|
|
2968
3112
|
let n = this.spec = {};
|
|
2969
3113
|
for (let i in e)
|
|
2970
3114
|
n[i] = e[i];
|
|
2971
|
-
n.nodes = Ee.from(e.nodes), n.marks = Ee.from(e.marks || {}), this.nodes = jo.compile(this.spec.nodes, this), this.marks =
|
|
3115
|
+
n.nodes = Ee.from(e.nodes), n.marks = Ee.from(e.marks || {}), this.nodes = jo.compile(this.spec.nodes, this), this.marks = hs.compile(this.spec.marks, this);
|
|
2972
3116
|
let r = /* @__PURE__ */ Object.create(null);
|
|
2973
3117
|
for (let i in this.nodes) {
|
|
2974
3118
|
if (i in this.marks)
|
|
@@ -3044,10 +3188,10 @@ function ru(t, e) {
|
|
|
3044
3188
|
}
|
|
3045
3189
|
return n;
|
|
3046
3190
|
}
|
|
3047
|
-
function
|
|
3191
|
+
function V1(t) {
|
|
3048
3192
|
return t.tag != null;
|
|
3049
3193
|
}
|
|
3050
|
-
function
|
|
3194
|
+
function W1(t) {
|
|
3051
3195
|
return t.style != null;
|
|
3052
3196
|
}
|
|
3053
3197
|
class Pr {
|
|
@@ -3059,9 +3203,9 @@ class Pr {
|
|
|
3059
3203
|
this.schema = e, this.rules = n, this.tags = [], this.styles = [];
|
|
3060
3204
|
let r = this.matchedStyles = [];
|
|
3061
3205
|
n.forEach((i) => {
|
|
3062
|
-
if (
|
|
3206
|
+
if (V1(i))
|
|
3063
3207
|
this.tags.push(i);
|
|
3064
|
-
else if (
|
|
3208
|
+
else if (W1(i)) {
|
|
3065
3209
|
let o = /[^=]*/.exec(i.style)[0];
|
|
3066
3210
|
r.indexOf(o) < 0 && r.push(o), this.styles.push(i);
|
|
3067
3211
|
}
|
|
@@ -3097,7 +3241,7 @@ class Pr {
|
|
|
3097
3241
|
matchTag(e, n, r) {
|
|
3098
3242
|
for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
|
|
3099
3243
|
let o = this.tags[i];
|
|
3100
|
-
if (
|
|
3244
|
+
if (U1(e, o.tag) && (o.namespace === void 0 || e.namespaceURI == o.namespace) && (!o.context || n.matchesContext(o.context))) {
|
|
3101
3245
|
if (o.getAttrs) {
|
|
3102
3246
|
let s = o.getAttrs(e);
|
|
3103
3247
|
if (s === !1)
|
|
@@ -3165,7 +3309,7 @@ class Pr {
|
|
|
3165
3309
|
return e.cached.domParser || (e.cached.domParser = new Pr(e, Pr.schemaRules(e)));
|
|
3166
3310
|
}
|
|
3167
3311
|
}
|
|
3168
|
-
const
|
|
3312
|
+
const Bd = {
|
|
3169
3313
|
address: !0,
|
|
3170
3314
|
article: !0,
|
|
3171
3315
|
aside: !0,
|
|
@@ -3198,16 +3342,16 @@ const zd = {
|
|
|
3198
3342
|
table: !0,
|
|
3199
3343
|
tfoot: !0,
|
|
3200
3344
|
ul: !0
|
|
3201
|
-
},
|
|
3345
|
+
}, q1 = {
|
|
3202
3346
|
head: !0,
|
|
3203
3347
|
noscript: !0,
|
|
3204
3348
|
object: !0,
|
|
3205
3349
|
script: !0,
|
|
3206
3350
|
style: !0,
|
|
3207
3351
|
title: !0
|
|
3208
|
-
},
|
|
3352
|
+
}, Fd = { ol: !0, ul: !0 }, Pi = 1, ea = 2, Ti = 4;
|
|
3209
3353
|
function iu(t, e, n) {
|
|
3210
|
-
return e != null ? (e ? Pi : 0) | (e === "full" ?
|
|
3354
|
+
return e != null ? (e ? Pi : 0) | (e === "full" ? ea : 0) : t && t.whitespace == "pre" ? Pi | ea : n & ~Ti;
|
|
3211
3355
|
}
|
|
3212
3356
|
class fo {
|
|
3213
3357
|
constructor(e, n, r, i, o, s) {
|
|
@@ -3239,7 +3383,7 @@ class fo {
|
|
|
3239
3383
|
return !e && this.match && (n = n.append(this.match.fillBefore(O.empty, !0))), this.type ? this.type.create(this.attrs, n, this.marks) : n;
|
|
3240
3384
|
}
|
|
3241
3385
|
inlineContext(e) {
|
|
3242
|
-
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !
|
|
3386
|
+
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Bd.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
3243
3387
|
}
|
|
3244
3388
|
}
|
|
3245
3389
|
class ou {
|
|
@@ -3258,7 +3402,7 @@ class ou {
|
|
|
3258
3402
|
e.nodeType == 3 ? this.addTextNode(e, n) : e.nodeType == 1 && this.addElement(e, n);
|
|
3259
3403
|
}
|
|
3260
3404
|
addTextNode(e, n) {
|
|
3261
|
-
let r = e.nodeValue, i = this.top, o = i.options &
|
|
3405
|
+
let r = e.nodeValue, i = this.top, o = i.options & ea ? "full" : this.localPreserveWS || (i.options & Pi) > 0, { schema: s } = this.parser;
|
|
3262
3406
|
if (o === "full" || i.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
|
|
3263
3407
|
if (o)
|
|
3264
3408
|
if (o === "full")
|
|
@@ -3285,14 +3429,14 @@ class ou {
|
|
|
3285
3429
|
let i = this.localPreserveWS, o = this.top;
|
|
3286
3430
|
(e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
|
|
3287
3431
|
let s = e.nodeName.toLowerCase(), l;
|
|
3288
|
-
|
|
3432
|
+
Fd.hasOwnProperty(s) && this.parser.normalizeLists && j1(e);
|
|
3289
3433
|
let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
|
|
3290
|
-
e: if (a ? a.ignore :
|
|
3434
|
+
e: if (a ? a.ignore : q1.hasOwnProperty(s))
|
|
3291
3435
|
this.findInside(e), this.ignoreFallback(e, n);
|
|
3292
3436
|
else if (!a || a.skip || a.closeParent) {
|
|
3293
3437
|
a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
|
|
3294
3438
|
let c, u = this.needsBlock;
|
|
3295
|
-
if (
|
|
3439
|
+
if (Bd.hasOwnProperty(s))
|
|
3296
3440
|
o.content.length && o.content[0].isInline && this.open && (this.open--, o = this.top), c = !0, o.type || (this.needsBlock = !0);
|
|
3297
3441
|
else if (!e.firstChild) {
|
|
3298
3442
|
this.leafFallback(e, n);
|
|
@@ -3524,13 +3668,13 @@ class ou {
|
|
|
3524
3668
|
}
|
|
3525
3669
|
}
|
|
3526
3670
|
}
|
|
3527
|
-
function
|
|
3671
|
+
function j1(t) {
|
|
3528
3672
|
for (let e = t.firstChild, n = null; e; e = e.nextSibling) {
|
|
3529
3673
|
let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
3530
|
-
r &&
|
|
3674
|
+
r && Fd.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
|
|
3531
3675
|
}
|
|
3532
3676
|
}
|
|
3533
|
-
function
|
|
3677
|
+
function U1(t, e) {
|
|
3534
3678
|
return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
|
|
3535
3679
|
}
|
|
3536
3680
|
function su(t) {
|
|
@@ -3557,7 +3701,7 @@ function lu(t, e) {
|
|
|
3557
3701
|
return !0;
|
|
3558
3702
|
}
|
|
3559
3703
|
}
|
|
3560
|
-
class
|
|
3704
|
+
class Ur {
|
|
3561
3705
|
/**
|
|
3562
3706
|
Create a serializer. `nodes` should map node names to functions
|
|
3563
3707
|
that take a node and return a description of the corresponding
|
|
@@ -3644,7 +3788,7 @@ class jr {
|
|
|
3644
3788
|
properties in a schema's node and mark specs.
|
|
3645
3789
|
*/
|
|
3646
3790
|
static fromSchema(e) {
|
|
3647
|
-
return e.cached.domSerializer || (e.cached.domSerializer = new
|
|
3791
|
+
return e.cached.domSerializer || (e.cached.domSerializer = new Ur(this.nodesFromSchema(e), this.marksFromSchema(e)));
|
|
3648
3792
|
}
|
|
3649
3793
|
/**
|
|
3650
3794
|
Gather the serializers in a schema's node specs into an object.
|
|
@@ -3673,11 +3817,11 @@ function Js(t) {
|
|
|
3673
3817
|
return t.document || window.document;
|
|
3674
3818
|
}
|
|
3675
3819
|
const cu = /* @__PURE__ */ new WeakMap();
|
|
3676
|
-
function
|
|
3820
|
+
function K1(t) {
|
|
3677
3821
|
let e = cu.get(t);
|
|
3678
|
-
return e === void 0 && cu.set(t, e =
|
|
3822
|
+
return e === void 0 && cu.set(t, e = J1(t)), e;
|
|
3679
3823
|
}
|
|
3680
|
-
function
|
|
3824
|
+
function J1(t) {
|
|
3681
3825
|
let e = null;
|
|
3682
3826
|
function n(r) {
|
|
3683
3827
|
if (r && typeof r == "object")
|
|
@@ -3703,7 +3847,7 @@ function xo(t, e, n, r) {
|
|
|
3703
3847
|
let i = e[0], o;
|
|
3704
3848
|
if (typeof i != "string")
|
|
3705
3849
|
throw new RangeError("Invalid array passed to renderSpec");
|
|
3706
|
-
if (r && (o =
|
|
3850
|
+
if (r && (o = K1(r)) && o.indexOf(e) > -1)
|
|
3707
3851
|
throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
|
|
3708
3852
|
let s = i.indexOf(" ");
|
|
3709
3853
|
s > 0 && (n = i.slice(0, s), i = i.slice(s + 1));
|
|
@@ -3733,13 +3877,13 @@ function xo(t, e, n, r) {
|
|
|
3733
3877
|
}
|
|
3734
3878
|
return { dom: a, contentDOM: l };
|
|
3735
3879
|
}
|
|
3736
|
-
const
|
|
3737
|
-
function
|
|
3738
|
-
const n =
|
|
3739
|
-
return
|
|
3880
|
+
const G1 = {};
|
|
3881
|
+
function qa(t, e) {
|
|
3882
|
+
const n = G1, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
|
|
3883
|
+
return Hd(t, r, i);
|
|
3740
3884
|
}
|
|
3741
|
-
function
|
|
3742
|
-
if (
|
|
3885
|
+
function Hd(t, e, n) {
|
|
3886
|
+
if (Y1(t)) {
|
|
3743
3887
|
if ("value" in t)
|
|
3744
3888
|
return t.type === "html" && !n ? "" : t.value;
|
|
3745
3889
|
if (e && "alt" in t && t.alt)
|
|
@@ -3753,14 +3897,14 @@ function uu(t, e, n) {
|
|
|
3753
3897
|
const r = [];
|
|
3754
3898
|
let i = -1;
|
|
3755
3899
|
for (; ++i < t.length; )
|
|
3756
|
-
r[i] =
|
|
3900
|
+
r[i] = Hd(t[i], e, n);
|
|
3757
3901
|
return r.join("");
|
|
3758
3902
|
}
|
|
3759
|
-
function
|
|
3903
|
+
function Y1(t) {
|
|
3760
3904
|
return !!(t && typeof t == "object");
|
|
3761
3905
|
}
|
|
3762
3906
|
const fu = document.createElement("i");
|
|
3763
|
-
function
|
|
3907
|
+
function ja(t) {
|
|
3764
3908
|
const e = "&" + t + ";";
|
|
3765
3909
|
fu.innerHTML = e;
|
|
3766
3910
|
const n = fu.textContent;
|
|
@@ -3779,14 +3923,14 @@ function bt(t, e) {
|
|
|
3779
3923
|
return t.length > 0 ? (at(t, t.length, 0, e), t) : e;
|
|
3780
3924
|
}
|
|
3781
3925
|
const du = {}.hasOwnProperty;
|
|
3782
|
-
function
|
|
3926
|
+
function $d(t) {
|
|
3783
3927
|
const e = {};
|
|
3784
3928
|
let n = -1;
|
|
3785
3929
|
for (; ++n < t.length; )
|
|
3786
|
-
|
|
3930
|
+
X1(e, t[n]);
|
|
3787
3931
|
return e;
|
|
3788
3932
|
}
|
|
3789
|
-
function
|
|
3933
|
+
function X1(t, e) {
|
|
3790
3934
|
let n;
|
|
3791
3935
|
for (n in e) {
|
|
3792
3936
|
const i = (du.call(t, n) ? t[n] : void 0) || (t[n] = {}), o = e[n];
|
|
@@ -3795,7 +3939,7 @@ function q1(t, e) {
|
|
|
3795
3939
|
for (s in o) {
|
|
3796
3940
|
du.call(i, s) || (i[s] = []);
|
|
3797
3941
|
const l = o[s];
|
|
3798
|
-
|
|
3942
|
+
Q1(
|
|
3799
3943
|
// @ts-expect-error Looks like a list.
|
|
3800
3944
|
i[s],
|
|
3801
3945
|
Array.isArray(l) ? l : l ? [l] : []
|
|
@@ -3803,14 +3947,14 @@ function q1(t, e) {
|
|
|
3803
3947
|
}
|
|
3804
3948
|
}
|
|
3805
3949
|
}
|
|
3806
|
-
function
|
|
3950
|
+
function Q1(t, e) {
|
|
3807
3951
|
let n = -1;
|
|
3808
3952
|
const r = [];
|
|
3809
3953
|
for (; ++n < e.length; )
|
|
3810
3954
|
(e[n].add === "after" ? t : r).push(e[n]);
|
|
3811
3955
|
at(t, 0, 0, r);
|
|
3812
3956
|
}
|
|
3813
|
-
function
|
|
3957
|
+
function Vd(t, e) {
|
|
3814
3958
|
const n = Number.parseInt(t, e);
|
|
3815
3959
|
return (
|
|
3816
3960
|
// C0 except for HT, LF, FF, CR, space.
|
|
@@ -3826,7 +3970,7 @@ function $d(t, e) {
|
|
|
3826
3970
|
function Rt(t) {
|
|
3827
3971
|
return t.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
3828
3972
|
}
|
|
3829
|
-
const We = Bn(/[A-Za-z]/), Ze = Bn(/[\dA-Za-z]/),
|
|
3973
|
+
const We = Bn(/[A-Za-z]/), Ze = Bn(/[\dA-Za-z]/), Z1 = Bn(/[#-'*+\--9=?A-Z^-~]/);
|
|
3830
3974
|
function Uo(t) {
|
|
3831
3975
|
return (
|
|
3832
3976
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
@@ -3834,7 +3978,7 @@ function Uo(t) {
|
|
|
3834
3978
|
t !== null && (t < 32 || t === 127)
|
|
3835
3979
|
);
|
|
3836
3980
|
}
|
|
3837
|
-
const
|
|
3981
|
+
const ta = Bn(/\d/), ek = Bn(/[\dA-Fa-f]/), tk = Bn(/[!-/:-@[-`{-~]/);
|
|
3838
3982
|
function $(t) {
|
|
3839
3983
|
return t !== null && t < -2;
|
|
3840
3984
|
}
|
|
@@ -3844,7 +3988,7 @@ function de(t) {
|
|
|
3844
3988
|
function Z(t) {
|
|
3845
3989
|
return t === -2 || t === -1 || t === 32;
|
|
3846
3990
|
}
|
|
3847
|
-
const
|
|
3991
|
+
const ps = Bn(new RegExp("\\p{P}|\\p{S}", "u")), lr = Bn(/\s/);
|
|
3848
3992
|
function Bn(t) {
|
|
3849
3993
|
return e;
|
|
3850
3994
|
function e(n) {
|
|
@@ -3862,10 +4006,10 @@ function re(t, e, n, r) {
|
|
|
3862
4006
|
return Z(a) && o++ < i ? (t.consume(a), l) : (t.exit(n), e(a));
|
|
3863
4007
|
}
|
|
3864
4008
|
}
|
|
3865
|
-
const
|
|
3866
|
-
tokenize:
|
|
4009
|
+
const nk = {
|
|
4010
|
+
tokenize: rk
|
|
3867
4011
|
};
|
|
3868
|
-
function
|
|
4012
|
+
function rk(t) {
|
|
3869
4013
|
const e = t.attempt(this.parser.constructs.contentInitial, r, i);
|
|
3870
4014
|
let n;
|
|
3871
4015
|
return e;
|
|
@@ -3894,12 +4038,12 @@ function Y1(t) {
|
|
|
3894
4038
|
return $(l) ? (t.consume(l), t.exit("chunkText"), o) : (t.consume(l), s);
|
|
3895
4039
|
}
|
|
3896
4040
|
}
|
|
3897
|
-
const
|
|
3898
|
-
tokenize:
|
|
4041
|
+
const ik = {
|
|
4042
|
+
tokenize: ok
|
|
3899
4043
|
}, hu = {
|
|
3900
|
-
tokenize:
|
|
4044
|
+
tokenize: sk
|
|
3901
4045
|
};
|
|
3902
|
-
function
|
|
4046
|
+
function ok(t) {
|
|
3903
4047
|
const e = this, n = [];
|
|
3904
4048
|
let r = 0, i, o, s;
|
|
3905
4049
|
return l;
|
|
@@ -4011,16 +4155,16 @@ function Q1(t) {
|
|
|
4011
4155
|
i.write([null]), o = void 0, i = void 0, e.containerState._closeFlow = void 0;
|
|
4012
4156
|
}
|
|
4013
4157
|
}
|
|
4014
|
-
function
|
|
4158
|
+
function sk(t, e, n) {
|
|
4015
4159
|
return re(t, t.attempt(this.parser.constructs.document, e, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
4016
4160
|
}
|
|
4017
4161
|
function zr(t) {
|
|
4018
4162
|
if (t === null || de(t) || lr(t))
|
|
4019
4163
|
return 1;
|
|
4020
|
-
if (
|
|
4164
|
+
if (ps(t))
|
|
4021
4165
|
return 2;
|
|
4022
4166
|
}
|
|
4023
|
-
function
|
|
4167
|
+
function ms(t, e, n) {
|
|
4024
4168
|
const r = [];
|
|
4025
4169
|
let i = -1;
|
|
4026
4170
|
for (; ++i < t.length; ) {
|
|
@@ -4029,12 +4173,12 @@ function hs(t, e, n) {
|
|
|
4029
4173
|
}
|
|
4030
4174
|
return e;
|
|
4031
4175
|
}
|
|
4032
|
-
const
|
|
4176
|
+
const na = {
|
|
4033
4177
|
name: "attention",
|
|
4034
|
-
resolveAll:
|
|
4035
|
-
tokenize:
|
|
4178
|
+
resolveAll: lk,
|
|
4179
|
+
tokenize: ak
|
|
4036
4180
|
};
|
|
4037
|
-
function
|
|
4181
|
+
function lk(t, e) {
|
|
4038
4182
|
let n = -1, r, i, o, s, l, a, c, u;
|
|
4039
4183
|
for (; ++n < t.length; )
|
|
4040
4184
|
if (t[n][0] === "enter" && t[n][1].type === "attentionSequence" && t[n][1]._close) {
|
|
@@ -4081,7 +4225,7 @@ function ek(t, e) {
|
|
|
4081
4225
|
...s.start
|
|
4082
4226
|
}, t[n][1].start = {
|
|
4083
4227
|
...l.end
|
|
4084
|
-
}, c = [], t[r][1].end.offset - t[r][1].start.offset && (c = bt(c, [["enter", t[r][1], e], ["exit", t[r][1], e]])), c = bt(c, [["enter", i, e], ["enter", s, e], ["exit", s, e], ["enter", o, e]]), c = bt(c,
|
|
4228
|
+
}, c = [], t[r][1].end.offset - t[r][1].start.offset && (c = bt(c, [["enter", t[r][1], e], ["exit", t[r][1], e]])), c = bt(c, [["enter", i, e], ["enter", s, e], ["exit", s, e], ["enter", o, e]]), c = bt(c, ms(e.parser.constructs.insideSpan.null, t.slice(r + 1, n), e)), c = bt(c, [["exit", o, e], ["enter", l, e], ["exit", l, e], ["exit", i, e]]), t[n][1].end.offset - t[n][1].start.offset ? (u = 2, c = bt(c, [["enter", t[n][1], e], ["exit", t[n][1], e]])) : u = 0, at(t, r - 1, n - r + 3, c), n = r + c.length - u - 2;
|
|
4085
4229
|
break;
|
|
4086
4230
|
}
|
|
4087
4231
|
}
|
|
@@ -4089,7 +4233,7 @@ function ek(t, e) {
|
|
|
4089
4233
|
t[n][1].type === "attentionSequence" && (t[n][1].type = "data");
|
|
4090
4234
|
return t;
|
|
4091
4235
|
}
|
|
4092
|
-
function
|
|
4236
|
+
function ak(t, e) {
|
|
4093
4237
|
const n = this.parser.constructs.attentionMarkers.null, r = this.previous, i = zr(r);
|
|
4094
4238
|
let o;
|
|
4095
4239
|
return s;
|
|
@@ -4106,11 +4250,11 @@ function tk(t, e) {
|
|
|
4106
4250
|
function pu(t, e) {
|
|
4107
4251
|
t.column += e, t.offset += e, t._bufferIndex += e;
|
|
4108
4252
|
}
|
|
4109
|
-
const
|
|
4253
|
+
const ck = {
|
|
4110
4254
|
name: "autolink",
|
|
4111
|
-
tokenize:
|
|
4255
|
+
tokenize: uk
|
|
4112
4256
|
};
|
|
4113
|
-
function
|
|
4257
|
+
function uk(t, e, n) {
|
|
4114
4258
|
let r = 0;
|
|
4115
4259
|
return i;
|
|
4116
4260
|
function i(h) {
|
|
@@ -4129,7 +4273,7 @@ function rk(t, e, n) {
|
|
|
4129
4273
|
return h === 62 ? (t.exit("autolinkProtocol"), t.enter("autolinkMarker"), t.consume(h), t.exit("autolinkMarker"), t.exit("autolink"), e) : h === null || h === 32 || h === 60 || Uo(h) ? n(h) : (t.consume(h), a);
|
|
4130
4274
|
}
|
|
4131
4275
|
function c(h) {
|
|
4132
|
-
return h === 64 ? (t.consume(h), u) :
|
|
4276
|
+
return h === 64 ? (t.consume(h), u) : Z1(h) ? (t.consume(h), c) : n(h);
|
|
4133
4277
|
}
|
|
4134
4278
|
function u(h) {
|
|
4135
4279
|
return Ze(h) ? f(h) : n(h);
|
|
@@ -4147,9 +4291,9 @@ function rk(t, e, n) {
|
|
|
4147
4291
|
}
|
|
4148
4292
|
const ji = {
|
|
4149
4293
|
partial: !0,
|
|
4150
|
-
tokenize:
|
|
4294
|
+
tokenize: fk
|
|
4151
4295
|
};
|
|
4152
|
-
function
|
|
4296
|
+
function fk(t, e, n) {
|
|
4153
4297
|
return r;
|
|
4154
4298
|
function r(o) {
|
|
4155
4299
|
return Z(o) ? re(t, i, "linePrefix")(o) : i(o);
|
|
@@ -4158,15 +4302,15 @@ function ik(t, e, n) {
|
|
|
4158
4302
|
return o === null || $(o) ? e(o) : n(o);
|
|
4159
4303
|
}
|
|
4160
4304
|
}
|
|
4161
|
-
const
|
|
4305
|
+
const Wd = {
|
|
4162
4306
|
continuation: {
|
|
4163
|
-
tokenize:
|
|
4307
|
+
tokenize: hk
|
|
4164
4308
|
},
|
|
4165
|
-
exit:
|
|
4309
|
+
exit: pk,
|
|
4166
4310
|
name: "blockQuote",
|
|
4167
|
-
tokenize:
|
|
4311
|
+
tokenize: dk
|
|
4168
4312
|
};
|
|
4169
|
-
function
|
|
4313
|
+
function dk(t, e, n) {
|
|
4170
4314
|
const r = this;
|
|
4171
4315
|
return i;
|
|
4172
4316
|
function i(s) {
|
|
@@ -4182,37 +4326,37 @@ function ok(t, e, n) {
|
|
|
4182
4326
|
return Z(s) ? (t.enter("blockQuotePrefixWhitespace"), t.consume(s), t.exit("blockQuotePrefixWhitespace"), t.exit("blockQuotePrefix"), e) : (t.exit("blockQuotePrefix"), e(s));
|
|
4183
4327
|
}
|
|
4184
4328
|
}
|
|
4185
|
-
function
|
|
4329
|
+
function hk(t, e, n) {
|
|
4186
4330
|
const r = this;
|
|
4187
4331
|
return i;
|
|
4188
4332
|
function i(s) {
|
|
4189
4333
|
return Z(s) ? re(t, o, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(s) : o(s);
|
|
4190
4334
|
}
|
|
4191
4335
|
function o(s) {
|
|
4192
|
-
return t.attempt(
|
|
4336
|
+
return t.attempt(Wd, e, n)(s);
|
|
4193
4337
|
}
|
|
4194
4338
|
}
|
|
4195
|
-
function
|
|
4339
|
+
function pk(t) {
|
|
4196
4340
|
t.exit("blockQuote");
|
|
4197
4341
|
}
|
|
4198
|
-
const
|
|
4342
|
+
const qd = {
|
|
4199
4343
|
name: "characterEscape",
|
|
4200
|
-
tokenize:
|
|
4344
|
+
tokenize: mk
|
|
4201
4345
|
};
|
|
4202
|
-
function
|
|
4346
|
+
function mk(t, e, n) {
|
|
4203
4347
|
return r;
|
|
4204
4348
|
function r(o) {
|
|
4205
4349
|
return t.enter("characterEscape"), t.enter("escapeMarker"), t.consume(o), t.exit("escapeMarker"), i;
|
|
4206
4350
|
}
|
|
4207
4351
|
function i(o) {
|
|
4208
|
-
return
|
|
4352
|
+
return tk(o) ? (t.enter("characterEscapeValue"), t.consume(o), t.exit("characterEscapeValue"), t.exit("characterEscape"), e) : n(o);
|
|
4209
4353
|
}
|
|
4210
4354
|
}
|
|
4211
|
-
const
|
|
4355
|
+
const jd = {
|
|
4212
4356
|
name: "characterReference",
|
|
4213
|
-
tokenize:
|
|
4357
|
+
tokenize: gk
|
|
4214
4358
|
};
|
|
4215
|
-
function
|
|
4359
|
+
function gk(t, e, n) {
|
|
4216
4360
|
const r = this;
|
|
4217
4361
|
let i = 0, o, s;
|
|
4218
4362
|
return l;
|
|
@@ -4223,25 +4367,25 @@ function ck(t, e, n) {
|
|
|
4223
4367
|
return f === 35 ? (t.enter("characterReferenceMarkerNumeric"), t.consume(f), t.exit("characterReferenceMarkerNumeric"), c) : (t.enter("characterReferenceValue"), o = 31, s = Ze, u(f));
|
|
4224
4368
|
}
|
|
4225
4369
|
function c(f) {
|
|
4226
|
-
return f === 88 || f === 120 ? (t.enter("characterReferenceMarkerHexadecimal"), t.consume(f), t.exit("characterReferenceMarkerHexadecimal"), t.enter("characterReferenceValue"), o = 6, s =
|
|
4370
|
+
return f === 88 || f === 120 ? (t.enter("characterReferenceMarkerHexadecimal"), t.consume(f), t.exit("characterReferenceMarkerHexadecimal"), t.enter("characterReferenceValue"), o = 6, s = ek, u) : (t.enter("characterReferenceValue"), o = 7, s = ta, u(f));
|
|
4227
4371
|
}
|
|
4228
4372
|
function u(f) {
|
|
4229
4373
|
if (f === 59 && i) {
|
|
4230
4374
|
const d = t.exit("characterReferenceValue");
|
|
4231
|
-
return s === Ze && !
|
|
4375
|
+
return s === Ze && !ja(r.sliceSerialize(d)) ? n(f) : (t.enter("characterReferenceMarker"), t.consume(f), t.exit("characterReferenceMarker"), t.exit("characterReference"), e);
|
|
4232
4376
|
}
|
|
4233
4377
|
return s(f) && i++ < o ? (t.consume(f), u) : n(f);
|
|
4234
4378
|
}
|
|
4235
4379
|
}
|
|
4236
4380
|
const mu = {
|
|
4237
4381
|
partial: !0,
|
|
4238
|
-
tokenize:
|
|
4382
|
+
tokenize: kk
|
|
4239
4383
|
}, gu = {
|
|
4240
4384
|
concrete: !0,
|
|
4241
4385
|
name: "codeFenced",
|
|
4242
|
-
tokenize:
|
|
4386
|
+
tokenize: yk
|
|
4243
4387
|
};
|
|
4244
|
-
function
|
|
4388
|
+
function yk(t, e, n) {
|
|
4245
4389
|
const r = this, i = {
|
|
4246
4390
|
partial: !0,
|
|
4247
4391
|
tokenize: v
|
|
@@ -4312,7 +4456,7 @@ function uk(t, e, n) {
|
|
|
4312
4456
|
}
|
|
4313
4457
|
}
|
|
4314
4458
|
}
|
|
4315
|
-
function
|
|
4459
|
+
function kk(t, e, n) {
|
|
4316
4460
|
const r = this;
|
|
4317
4461
|
return i;
|
|
4318
4462
|
function i(s) {
|
|
@@ -4324,12 +4468,12 @@ function fk(t, e, n) {
|
|
|
4324
4468
|
}
|
|
4325
4469
|
const Gs = {
|
|
4326
4470
|
name: "codeIndented",
|
|
4327
|
-
tokenize:
|
|
4328
|
-
},
|
|
4471
|
+
tokenize: wk
|
|
4472
|
+
}, bk = {
|
|
4329
4473
|
partial: !0,
|
|
4330
|
-
tokenize:
|
|
4474
|
+
tokenize: xk
|
|
4331
4475
|
};
|
|
4332
|
-
function
|
|
4476
|
+
function wk(t, e, n) {
|
|
4333
4477
|
const r = this;
|
|
4334
4478
|
return i;
|
|
4335
4479
|
function i(c) {
|
|
@@ -4340,7 +4484,7 @@ function hk(t, e, n) {
|
|
|
4340
4484
|
return u && u[1].type === "linePrefix" && u[2].sliceSerialize(u[1], !0).length >= 4 ? s(c) : n(c);
|
|
4341
4485
|
}
|
|
4342
4486
|
function s(c) {
|
|
4343
|
-
return c === null ? a(c) : $(c) ? t.attempt(
|
|
4487
|
+
return c === null ? a(c) : $(c) ? t.attempt(bk, s, a)(c) : (t.enter("codeFlowValue"), l(c));
|
|
4344
4488
|
}
|
|
4345
4489
|
function l(c) {
|
|
4346
4490
|
return c === null || $(c) ? (t.exit("codeFlowValue"), s(c)) : (t.consume(c), l);
|
|
@@ -4349,7 +4493,7 @@ function hk(t, e, n) {
|
|
|
4349
4493
|
return t.exit("codeIndented"), e(c);
|
|
4350
4494
|
}
|
|
4351
4495
|
}
|
|
4352
|
-
function
|
|
4496
|
+
function xk(t, e, n) {
|
|
4353
4497
|
const r = this;
|
|
4354
4498
|
return i;
|
|
4355
4499
|
function i(s) {
|
|
@@ -4360,13 +4504,13 @@ function pk(t, e, n) {
|
|
|
4360
4504
|
return l && l[1].type === "linePrefix" && l[2].sliceSerialize(l[1], !0).length >= 4 ? e(s) : $(s) ? i(s) : n(s);
|
|
4361
4505
|
}
|
|
4362
4506
|
}
|
|
4363
|
-
const
|
|
4507
|
+
const Ck = {
|
|
4364
4508
|
name: "codeText",
|
|
4365
|
-
previous:
|
|
4366
|
-
resolve:
|
|
4367
|
-
tokenize:
|
|
4509
|
+
previous: Tk,
|
|
4510
|
+
resolve: Sk,
|
|
4511
|
+
tokenize: Mk
|
|
4368
4512
|
};
|
|
4369
|
-
function
|
|
4513
|
+
function Sk(t) {
|
|
4370
4514
|
let e = t.length - 4, n = 3, r, i;
|
|
4371
4515
|
if ((t[n][1].type === "lineEnding" || t[n][1].type === "space") && (t[e][1].type === "lineEnding" || t[e][1].type === "space")) {
|
|
4372
4516
|
for (r = n; ++r < e; )
|
|
@@ -4379,10 +4523,10 @@ function gk(t) {
|
|
|
4379
4523
|
i === void 0 ? r !== e && t[r][1].type !== "lineEnding" && (i = r) : (r === e || t[r][1].type === "lineEnding") && (t[i][1].type = "codeTextData", r !== i + 2 && (t[i][1].end = t[r - 1][1].end, t.splice(i + 2, r - i - 2), e -= r - i - 2, r = i + 2), i = void 0);
|
|
4380
4524
|
return t;
|
|
4381
4525
|
}
|
|
4382
|
-
function
|
|
4526
|
+
function Tk(t) {
|
|
4383
4527
|
return t !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
4384
4528
|
}
|
|
4385
|
-
function
|
|
4529
|
+
function Mk(t, e, n) {
|
|
4386
4530
|
let r = 0, i, o;
|
|
4387
4531
|
return s;
|
|
4388
4532
|
function s(f) {
|
|
@@ -4401,7 +4545,7 @@ function kk(t, e, n) {
|
|
|
4401
4545
|
return f === 96 ? (t.consume(f), i++, u) : i === r ? (t.exit("codeTextSequence"), t.exit("codeText"), e(f)) : (o.type = "codeTextData", c(f));
|
|
4402
4546
|
}
|
|
4403
4547
|
}
|
|
4404
|
-
class
|
|
4548
|
+
class Ak {
|
|
4405
4549
|
/**
|
|
4406
4550
|
* @param {ReadonlyArray<T> | null | undefined} [initial]
|
|
4407
4551
|
* Initial items (optional).
|
|
@@ -4573,10 +4717,10 @@ function ii(t, e) {
|
|
|
4573
4717
|
for (; n < e.length; )
|
|
4574
4718
|
t.push(...e.slice(n, n + 1e4)), n += 1e4;
|
|
4575
4719
|
}
|
|
4576
|
-
function
|
|
4720
|
+
function Ud(t) {
|
|
4577
4721
|
const e = {};
|
|
4578
4722
|
let n = -1, r, i, o, s, l, a, c;
|
|
4579
|
-
const u = new
|
|
4723
|
+
const u = new Ak(t);
|
|
4580
4724
|
for (; ++n < u.length; ) {
|
|
4581
4725
|
for (; n in e; )
|
|
4582
4726
|
n = e[n];
|
|
@@ -4584,7 +4728,7 @@ function jd(t) {
|
|
|
4584
4728
|
for (; ++o < a.length && a[o][1].type !== "content"; )
|
|
4585
4729
|
a[o][1].type === "chunkText" && (a[o][1]._isInFirstContentOfListItem = !0, o++);
|
|
4586
4730
|
if (r[0] === "enter")
|
|
4587
|
-
r[1].contentType && (Object.assign(e,
|
|
4731
|
+
r[1].contentType && (Object.assign(e, Nk(u, n)), n = e[n], c = !0);
|
|
4588
4732
|
else if (r[1]._container) {
|
|
4589
4733
|
for (o = n, i = void 0; o--; )
|
|
4590
4734
|
if (s = u.get(o), s[1].type === "lineEnding" || s[1].type === "lineEndingBlank")
|
|
@@ -4597,7 +4741,7 @@ function jd(t) {
|
|
|
4597
4741
|
}
|
|
4598
4742
|
return at(t, 0, Number.POSITIVE_INFINITY, u.slice(0)), !c;
|
|
4599
4743
|
}
|
|
4600
|
-
function
|
|
4744
|
+
function Nk(t, e) {
|
|
4601
4745
|
const n = t.get(e)[1], r = t.get(e)[2];
|
|
4602
4746
|
let i = e - 1;
|
|
4603
4747
|
const o = [];
|
|
@@ -4622,17 +4766,17 @@ function wk(t, e) {
|
|
|
4622
4766
|
c[p + a[d][0]] = p + a[d][1], p += a[d][1] - a[d][0] - 1;
|
|
4623
4767
|
return c;
|
|
4624
4768
|
}
|
|
4625
|
-
const
|
|
4626
|
-
resolve:
|
|
4627
|
-
tokenize:
|
|
4628
|
-
},
|
|
4769
|
+
const Ek = {
|
|
4770
|
+
resolve: vk,
|
|
4771
|
+
tokenize: Ok
|
|
4772
|
+
}, Ik = {
|
|
4629
4773
|
partial: !0,
|
|
4630
|
-
tokenize:
|
|
4774
|
+
tokenize: Rk
|
|
4631
4775
|
};
|
|
4632
|
-
function
|
|
4633
|
-
return
|
|
4776
|
+
function vk(t) {
|
|
4777
|
+
return Ud(t), t;
|
|
4634
4778
|
}
|
|
4635
|
-
function
|
|
4779
|
+
function Ok(t, e) {
|
|
4636
4780
|
let n;
|
|
4637
4781
|
return r;
|
|
4638
4782
|
function r(l) {
|
|
@@ -4641,7 +4785,7 @@ function Tk(t, e) {
|
|
|
4641
4785
|
}), i(l);
|
|
4642
4786
|
}
|
|
4643
4787
|
function i(l) {
|
|
4644
|
-
return l === null ? o(l) : $(l) ? t.check(
|
|
4788
|
+
return l === null ? o(l) : $(l) ? t.check(Ik, s, o)(l) : (t.consume(l), i);
|
|
4645
4789
|
}
|
|
4646
4790
|
function o(l) {
|
|
4647
4791
|
return t.exit("chunkContent"), t.exit("content"), e(l);
|
|
@@ -4653,7 +4797,7 @@ function Tk(t, e) {
|
|
|
4653
4797
|
}), n = n.next, i;
|
|
4654
4798
|
}
|
|
4655
4799
|
}
|
|
4656
|
-
function
|
|
4800
|
+
function Rk(t, e, n) {
|
|
4657
4801
|
const r = this;
|
|
4658
4802
|
return i;
|
|
4659
4803
|
function i(s) {
|
|
@@ -4666,7 +4810,7 @@ function Mk(t, e, n) {
|
|
|
4666
4810
|
return !r.parser.constructs.disable.null.includes("codeIndented") && l && l[1].type === "linePrefix" && l[2].sliceSerialize(l[1], !0).length >= 4 ? e(s) : t.interrupt(r.parser.constructs.flow, n, e)(s);
|
|
4667
4811
|
}
|
|
4668
4812
|
}
|
|
4669
|
-
function
|
|
4813
|
+
function Kd(t, e, n, r, i, o, s, l, a) {
|
|
4670
4814
|
const c = a || Number.POSITIVE_INFINITY;
|
|
4671
4815
|
let u = 0;
|
|
4672
4816
|
return f;
|
|
@@ -4693,7 +4837,7 @@ function Ud(t, e, n, r, i, o, s, l, a) {
|
|
|
4693
4837
|
return y === 40 || y === 41 || y === 92 ? (t.consume(y), m) : m(y);
|
|
4694
4838
|
}
|
|
4695
4839
|
}
|
|
4696
|
-
function
|
|
4840
|
+
function Jd(t, e, n, r, i, o) {
|
|
4697
4841
|
const s = this;
|
|
4698
4842
|
let l = 0, a;
|
|
4699
4843
|
return c;
|
|
@@ -4717,7 +4861,7 @@ function Kd(t, e, n, r, i, o) {
|
|
|
4717
4861
|
return h === 91 || h === 92 || h === 93 ? (t.consume(h), l++, f) : f(h);
|
|
4718
4862
|
}
|
|
4719
4863
|
}
|
|
4720
|
-
function
|
|
4864
|
+
function Gd(t, e, n, r, i, o) {
|
|
4721
4865
|
let s;
|
|
4722
4866
|
return l;
|
|
4723
4867
|
function l(d) {
|
|
@@ -4745,14 +4889,14 @@ function Mi(t, e) {
|
|
|
4745
4889
|
return $(i) ? (t.enter("lineEnding"), t.consume(i), t.exit("lineEnding"), n = !0, r) : Z(i) ? re(t, r, n ? "linePrefix" : "lineSuffix")(i) : e(i);
|
|
4746
4890
|
}
|
|
4747
4891
|
}
|
|
4748
|
-
const
|
|
4892
|
+
const Dk = {
|
|
4749
4893
|
name: "definition",
|
|
4750
|
-
tokenize:
|
|
4751
|
-
},
|
|
4894
|
+
tokenize: Lk
|
|
4895
|
+
}, _k = {
|
|
4752
4896
|
partial: !0,
|
|
4753
|
-
tokenize:
|
|
4897
|
+
tokenize: Pk
|
|
4754
4898
|
};
|
|
4755
|
-
function
|
|
4899
|
+
function Lk(t, e, n) {
|
|
4756
4900
|
const r = this;
|
|
4757
4901
|
let i;
|
|
4758
4902
|
return o;
|
|
@@ -4760,7 +4904,7 @@ function Ek(t, e, n) {
|
|
|
4760
4904
|
return t.enter("definition"), s(h);
|
|
4761
4905
|
}
|
|
4762
4906
|
function s(h) {
|
|
4763
|
-
return
|
|
4907
|
+
return Jd.call(
|
|
4764
4908
|
r,
|
|
4765
4909
|
t,
|
|
4766
4910
|
l,
|
|
@@ -4778,7 +4922,7 @@ function Ek(t, e, n) {
|
|
|
4778
4922
|
return de(h) ? Mi(t, c)(h) : c(h);
|
|
4779
4923
|
}
|
|
4780
4924
|
function c(h) {
|
|
4781
|
-
return
|
|
4925
|
+
return Kd(
|
|
4782
4926
|
t,
|
|
4783
4927
|
u,
|
|
4784
4928
|
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
@@ -4791,7 +4935,7 @@ function Ek(t, e, n) {
|
|
|
4791
4935
|
)(h);
|
|
4792
4936
|
}
|
|
4793
4937
|
function u(h) {
|
|
4794
|
-
return t.attempt(
|
|
4938
|
+
return t.attempt(_k, f, f)(h);
|
|
4795
4939
|
}
|
|
4796
4940
|
function f(h) {
|
|
4797
4941
|
return Z(h) ? re(t, d, "whitespace")(h) : d(h);
|
|
@@ -4800,13 +4944,13 @@ function Ek(t, e, n) {
|
|
|
4800
4944
|
return h === null || $(h) ? (t.exit("definition"), r.parser.defined.push(i), e(h)) : n(h);
|
|
4801
4945
|
}
|
|
4802
4946
|
}
|
|
4803
|
-
function
|
|
4947
|
+
function Pk(t, e, n) {
|
|
4804
4948
|
return r;
|
|
4805
4949
|
function r(l) {
|
|
4806
4950
|
return de(l) ? Mi(t, i)(l) : n(l);
|
|
4807
4951
|
}
|
|
4808
4952
|
function i(l) {
|
|
4809
|
-
return
|
|
4953
|
+
return Gd(t, o, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(l);
|
|
4810
4954
|
}
|
|
4811
4955
|
function o(l) {
|
|
4812
4956
|
return Z(l) ? re(t, s, "whitespace")(l) : s(l);
|
|
@@ -4815,11 +4959,11 @@ function Ik(t, e, n) {
|
|
|
4815
4959
|
return l === null || $(l) ? e(l) : n(l);
|
|
4816
4960
|
}
|
|
4817
4961
|
}
|
|
4818
|
-
const
|
|
4962
|
+
const zk = {
|
|
4819
4963
|
name: "hardBreakEscape",
|
|
4820
|
-
tokenize:
|
|
4964
|
+
tokenize: Bk
|
|
4821
4965
|
};
|
|
4822
|
-
function
|
|
4966
|
+
function Bk(t, e, n) {
|
|
4823
4967
|
return r;
|
|
4824
4968
|
function r(o) {
|
|
4825
4969
|
return t.enter("hardBreakEscape"), t.consume(o), i;
|
|
@@ -4828,12 +4972,12 @@ function Ok(t, e, n) {
|
|
|
4828
4972
|
return $(o) ? (t.exit("hardBreakEscape"), e(o)) : n(o);
|
|
4829
4973
|
}
|
|
4830
4974
|
}
|
|
4831
|
-
const
|
|
4975
|
+
const Fk = {
|
|
4832
4976
|
name: "headingAtx",
|
|
4833
|
-
resolve:
|
|
4834
|
-
tokenize:
|
|
4977
|
+
resolve: Hk,
|
|
4978
|
+
tokenize: $k
|
|
4835
4979
|
};
|
|
4836
|
-
function
|
|
4980
|
+
function Hk(t, e) {
|
|
4837
4981
|
let n = t.length - 2, r = 3, i, o;
|
|
4838
4982
|
return t[r][1].type === "whitespace" && (r += 2), n - 2 > r && t[n][1].type === "whitespace" && (n -= 2), t[n][1].type === "atxHeadingSequence" && (r === n - 1 || n - 4 > r && t[n - 2][1].type === "whitespace") && (n -= r + 1 === n ? 2 : 4), n > r && (i = {
|
|
4839
4983
|
type: "atxHeadingText",
|
|
@@ -4846,7 +4990,7 @@ function Dk(t, e) {
|
|
|
4846
4990
|
contentType: "text"
|
|
4847
4991
|
}, at(t, r, n - r + 1, [["enter", i, e], ["enter", o, e], ["exit", o, e], ["exit", i, e]])), t;
|
|
4848
4992
|
}
|
|
4849
|
-
function
|
|
4993
|
+
function $k(t, e, n) {
|
|
4850
4994
|
let r = 0;
|
|
4851
4995
|
return i;
|
|
4852
4996
|
function i(u) {
|
|
@@ -4868,7 +5012,7 @@ function _k(t, e, n) {
|
|
|
4868
5012
|
return u === null || u === 35 || de(u) ? (t.exit("atxHeadingText"), l(u)) : (t.consume(u), c);
|
|
4869
5013
|
}
|
|
4870
5014
|
}
|
|
4871
|
-
const
|
|
5015
|
+
const Vk = [
|
|
4872
5016
|
"address",
|
|
4873
5017
|
"article",
|
|
4874
5018
|
"aside",
|
|
@@ -4931,25 +5075,25 @@ const Lk = [
|
|
|
4931
5075
|
"tr",
|
|
4932
5076
|
"track",
|
|
4933
5077
|
"ul"
|
|
4934
|
-
], yu = ["pre", "script", "style", "textarea"],
|
|
5078
|
+
], yu = ["pre", "script", "style", "textarea"], Wk = {
|
|
4935
5079
|
concrete: !0,
|
|
4936
5080
|
name: "htmlFlow",
|
|
4937
|
-
resolveTo:
|
|
4938
|
-
tokenize:
|
|
4939
|
-
},
|
|
5081
|
+
resolveTo: Uk,
|
|
5082
|
+
tokenize: Kk
|
|
5083
|
+
}, qk = {
|
|
4940
5084
|
partial: !0,
|
|
4941
|
-
tokenize:
|
|
4942
|
-
},
|
|
5085
|
+
tokenize: Gk
|
|
5086
|
+
}, jk = {
|
|
4943
5087
|
partial: !0,
|
|
4944
|
-
tokenize:
|
|
5088
|
+
tokenize: Jk
|
|
4945
5089
|
};
|
|
4946
|
-
function
|
|
5090
|
+
function Uk(t) {
|
|
4947
5091
|
let e = t.length;
|
|
4948
5092
|
for (; e-- && !(t[e][0] === "enter" && t[e][1].type === "htmlFlow"); )
|
|
4949
5093
|
;
|
|
4950
5094
|
return e > 1 && t[e - 2][1].type === "linePrefix" && (t[e][1].start = t[e - 2][1].start, t[e + 1][1].start = t[e - 2][1].start, t.splice(e - 2, 2)), t;
|
|
4951
5095
|
}
|
|
4952
|
-
function
|
|
5096
|
+
function Kk(t, e, n) {
|
|
4953
5097
|
const r = this;
|
|
4954
5098
|
let i, o, s, l, a;
|
|
4955
5099
|
return c;
|
|
@@ -4978,7 +5122,7 @@ function Hk(t, e, n) {
|
|
|
4978
5122
|
function g(k) {
|
|
4979
5123
|
if (k === null || k === 47 || k === 62 || de(k)) {
|
|
4980
5124
|
const Ce = k === 47, ie = s.toLowerCase();
|
|
4981
|
-
return !Ce && !o && yu.includes(ie) ? (i = 1, r.interrupt ? e(k) : M(k)) :
|
|
5125
|
+
return !Ce && !o && yu.includes(ie) ? (i = 1, r.interrupt ? e(k) : M(k)) : Vk.includes(s.toLowerCase()) ? (i = 6, Ce ? (t.consume(k), y) : r.interrupt ? e(k) : M(k)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(k) : o ? A(k) : C(k));
|
|
4982
5126
|
}
|
|
4983
5127
|
return k === 45 || Ze(k) ? (t.consume(k), s += String.fromCharCode(k), g) : n(k);
|
|
4984
5128
|
}
|
|
@@ -5016,10 +5160,10 @@ function Hk(t, e, n) {
|
|
|
5016
5160
|
return k === null || $(k) ? M(k) : Z(k) ? (t.consume(k), S) : n(k);
|
|
5017
5161
|
}
|
|
5018
5162
|
function M(k) {
|
|
5019
|
-
return k === 45 && i === 2 ? (t.consume(k), pe) : k === 60 && i === 1 ? (t.consume(k), ue) : k === 62 && i === 4 ? (t.consume(k), X) : k === 63 && i === 3 ? (t.consume(k), b) : k === 93 && i === 5 ? (t.consume(k), be) : $(k) && (i === 6 || i === 7) ? (t.exit("htmlFlowData"), t.check(
|
|
5163
|
+
return k === 45 && i === 2 ? (t.consume(k), pe) : k === 60 && i === 1 ? (t.consume(k), ue) : k === 62 && i === 4 ? (t.consume(k), X) : k === 63 && i === 3 ? (t.consume(k), b) : k === 93 && i === 5 ? (t.consume(k), be) : $(k) && (i === 6 || i === 7) ? (t.exit("htmlFlowData"), t.check(qk, De, H)(k)) : k === null || $(k) ? (t.exit("htmlFlowData"), H(k)) : (t.consume(k), M);
|
|
5020
5164
|
}
|
|
5021
5165
|
function H(k) {
|
|
5022
|
-
return t.check(
|
|
5166
|
+
return t.check(jk, K, De)(k);
|
|
5023
5167
|
}
|
|
5024
5168
|
function K(k) {
|
|
5025
5169
|
return t.enter("lineEnding"), t.consume(k), t.exit("lineEnding"), W;
|
|
@@ -5053,7 +5197,7 @@ function Hk(t, e, n) {
|
|
|
5053
5197
|
return t.exit("htmlFlow"), e(k);
|
|
5054
5198
|
}
|
|
5055
5199
|
}
|
|
5056
|
-
function
|
|
5200
|
+
function Jk(t, e, n) {
|
|
5057
5201
|
const r = this;
|
|
5058
5202
|
return i;
|
|
5059
5203
|
function i(s) {
|
|
@@ -5063,17 +5207,17 @@ function $k(t, e, n) {
|
|
|
5063
5207
|
return r.parser.lazy[r.now().line] ? n(s) : e(s);
|
|
5064
5208
|
}
|
|
5065
5209
|
}
|
|
5066
|
-
function
|
|
5210
|
+
function Gk(t, e, n) {
|
|
5067
5211
|
return r;
|
|
5068
5212
|
function r(i) {
|
|
5069
5213
|
return t.enter("lineEnding"), t.consume(i), t.exit("lineEnding"), t.attempt(ji, e, n);
|
|
5070
5214
|
}
|
|
5071
5215
|
}
|
|
5072
|
-
const
|
|
5216
|
+
const Yk = {
|
|
5073
5217
|
name: "htmlText",
|
|
5074
|
-
tokenize:
|
|
5218
|
+
tokenize: Xk
|
|
5075
5219
|
};
|
|
5076
|
-
function
|
|
5220
|
+
function Xk(t, e, n) {
|
|
5077
5221
|
const r = this;
|
|
5078
5222
|
let i, o, s;
|
|
5079
5223
|
return l;
|
|
@@ -5166,19 +5310,19 @@ function qk(t, e, n) {
|
|
|
5166
5310
|
return t.enter("htmlTextData"), s(b);
|
|
5167
5311
|
}
|
|
5168
5312
|
}
|
|
5169
|
-
const
|
|
5313
|
+
const Ua = {
|
|
5170
5314
|
name: "labelEnd",
|
|
5171
|
-
resolveAll:
|
|
5172
|
-
resolveTo:
|
|
5173
|
-
tokenize:
|
|
5174
|
-
},
|
|
5175
|
-
tokenize:
|
|
5176
|
-
},
|
|
5177
|
-
tokenize:
|
|
5178
|
-
},
|
|
5179
|
-
tokenize:
|
|
5315
|
+
resolveAll: tb,
|
|
5316
|
+
resolveTo: nb,
|
|
5317
|
+
tokenize: rb
|
|
5318
|
+
}, Qk = {
|
|
5319
|
+
tokenize: ib
|
|
5320
|
+
}, Zk = {
|
|
5321
|
+
tokenize: ob
|
|
5322
|
+
}, eb = {
|
|
5323
|
+
tokenize: sb
|
|
5180
5324
|
};
|
|
5181
|
-
function
|
|
5325
|
+
function tb(t) {
|
|
5182
5326
|
let e = -1;
|
|
5183
5327
|
const n = [];
|
|
5184
5328
|
for (; ++e < t.length; ) {
|
|
@@ -5190,7 +5334,7 @@ function Jk(t) {
|
|
|
5190
5334
|
}
|
|
5191
5335
|
return t.length !== n.length && at(t, 0, t.length, n), t;
|
|
5192
5336
|
}
|
|
5193
|
-
function
|
|
5337
|
+
function nb(t, e) {
|
|
5194
5338
|
let n = t.length, r = 0, i, o, s, l;
|
|
5195
5339
|
for (; n--; )
|
|
5196
5340
|
if (i = t[n][1], o) {
|
|
@@ -5228,9 +5372,9 @@ function Gk(t, e) {
|
|
|
5228
5372
|
...t[s - 2][1].start
|
|
5229
5373
|
}
|
|
5230
5374
|
};
|
|
5231
|
-
return l = [["enter", a, e], ["enter", c, e]], l = bt(l, t.slice(o + 1, o + r + 3)), l = bt(l, [["enter", u, e]]), l = bt(l,
|
|
5375
|
+
return l = [["enter", a, e], ["enter", c, e]], l = bt(l, t.slice(o + 1, o + r + 3)), l = bt(l, [["enter", u, e]]), l = bt(l, ms(e.parser.constructs.insideSpan.null, t.slice(o + r + 4, s - 3), e)), l = bt(l, [["exit", u, e], t[s - 2], t[s - 1], ["exit", c, e]]), l = bt(l, t.slice(s + 1)), l = bt(l, [["exit", a, e]]), at(t, o, t.length, l), t;
|
|
5232
5376
|
}
|
|
5233
|
-
function
|
|
5377
|
+
function rb(t, e, n) {
|
|
5234
5378
|
const r = this;
|
|
5235
5379
|
let i = r.events.length, o, s;
|
|
5236
5380
|
for (; i--; )
|
|
@@ -5246,10 +5390,10 @@ function Yk(t, e, n) {
|
|
|
5246
5390
|
}))), t.enter("labelEnd"), t.enter("labelMarker"), t.consume(d), t.exit("labelMarker"), t.exit("labelEnd"), a) : n(d);
|
|
5247
5391
|
}
|
|
5248
5392
|
function a(d) {
|
|
5249
|
-
return d === 40 ? t.attempt(
|
|
5393
|
+
return d === 40 ? t.attempt(Qk, u, s ? u : f)(d) : d === 91 ? t.attempt(Zk, u, s ? c : f)(d) : s ? u(d) : f(d);
|
|
5250
5394
|
}
|
|
5251
5395
|
function c(d) {
|
|
5252
|
-
return t.attempt(
|
|
5396
|
+
return t.attempt(eb, u, f)(d);
|
|
5253
5397
|
}
|
|
5254
5398
|
function u(d) {
|
|
5255
5399
|
return e(d);
|
|
@@ -5258,7 +5402,7 @@ function Yk(t, e, n) {
|
|
|
5258
5402
|
return o._balanced = !0, n(d);
|
|
5259
5403
|
}
|
|
5260
5404
|
}
|
|
5261
|
-
function
|
|
5405
|
+
function ib(t, e, n) {
|
|
5262
5406
|
return r;
|
|
5263
5407
|
function r(f) {
|
|
5264
5408
|
return t.enter("resource"), t.enter("resourceMarker"), t.consume(f), t.exit("resourceMarker"), i;
|
|
@@ -5267,7 +5411,7 @@ function Xk(t, e, n) {
|
|
|
5267
5411
|
return de(f) ? Mi(t, o)(f) : o(f);
|
|
5268
5412
|
}
|
|
5269
5413
|
function o(f) {
|
|
5270
|
-
return f === 41 ? u(f) :
|
|
5414
|
+
return f === 41 ? u(f) : Kd(t, s, l, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(f);
|
|
5271
5415
|
}
|
|
5272
5416
|
function s(f) {
|
|
5273
5417
|
return de(f) ? Mi(t, a)(f) : u(f);
|
|
@@ -5276,7 +5420,7 @@ function Xk(t, e, n) {
|
|
|
5276
5420
|
return n(f);
|
|
5277
5421
|
}
|
|
5278
5422
|
function a(f) {
|
|
5279
|
-
return f === 34 || f === 39 || f === 40 ?
|
|
5423
|
+
return f === 34 || f === 39 || f === 40 ? Gd(t, c, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(f) : u(f);
|
|
5280
5424
|
}
|
|
5281
5425
|
function c(f) {
|
|
5282
5426
|
return de(f) ? Mi(t, u)(f) : u(f);
|
|
@@ -5285,11 +5429,11 @@ function Xk(t, e, n) {
|
|
|
5285
5429
|
return f === 41 ? (t.enter("resourceMarker"), t.consume(f), t.exit("resourceMarker"), t.exit("resource"), e) : n(f);
|
|
5286
5430
|
}
|
|
5287
5431
|
}
|
|
5288
|
-
function
|
|
5432
|
+
function ob(t, e, n) {
|
|
5289
5433
|
const r = this;
|
|
5290
5434
|
return i;
|
|
5291
5435
|
function i(l) {
|
|
5292
|
-
return
|
|
5436
|
+
return Jd.call(r, t, o, s, "reference", "referenceMarker", "referenceString")(l);
|
|
5293
5437
|
}
|
|
5294
5438
|
function o(l) {
|
|
5295
5439
|
return r.parser.defined.includes(Rt(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1))) ? e(l) : n(l);
|
|
@@ -5298,7 +5442,7 @@ function Qk(t, e, n) {
|
|
|
5298
5442
|
return n(l);
|
|
5299
5443
|
}
|
|
5300
5444
|
}
|
|
5301
|
-
function
|
|
5445
|
+
function sb(t, e, n) {
|
|
5302
5446
|
return r;
|
|
5303
5447
|
function r(o) {
|
|
5304
5448
|
return t.enter("reference"), t.enter("referenceMarker"), t.consume(o), t.exit("referenceMarker"), i;
|
|
@@ -5307,12 +5451,12 @@ function Zk(t, e, n) {
|
|
|
5307
5451
|
return o === 93 ? (t.enter("referenceMarker"), t.consume(o), t.exit("referenceMarker"), t.exit("reference"), e) : n(o);
|
|
5308
5452
|
}
|
|
5309
5453
|
}
|
|
5310
|
-
const
|
|
5454
|
+
const lb = {
|
|
5311
5455
|
name: "labelStartImage",
|
|
5312
|
-
resolveAll:
|
|
5313
|
-
tokenize:
|
|
5456
|
+
resolveAll: Ua.resolveAll,
|
|
5457
|
+
tokenize: ab
|
|
5314
5458
|
};
|
|
5315
|
-
function
|
|
5459
|
+
function ab(t, e, n) {
|
|
5316
5460
|
const r = this;
|
|
5317
5461
|
return i;
|
|
5318
5462
|
function i(l) {
|
|
@@ -5325,12 +5469,12 @@ function tb(t, e, n) {
|
|
|
5325
5469
|
return l === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(l) : e(l);
|
|
5326
5470
|
}
|
|
5327
5471
|
}
|
|
5328
|
-
const
|
|
5472
|
+
const cb = {
|
|
5329
5473
|
name: "labelStartLink",
|
|
5330
|
-
resolveAll:
|
|
5331
|
-
tokenize:
|
|
5474
|
+
resolveAll: Ua.resolveAll,
|
|
5475
|
+
tokenize: ub
|
|
5332
5476
|
};
|
|
5333
|
-
function
|
|
5477
|
+
function ub(t, e, n) {
|
|
5334
5478
|
const r = this;
|
|
5335
5479
|
return i;
|
|
5336
5480
|
function i(s) {
|
|
@@ -5342,9 +5486,9 @@ function rb(t, e, n) {
|
|
|
5342
5486
|
}
|
|
5343
5487
|
const Ys = {
|
|
5344
5488
|
name: "lineEnding",
|
|
5345
|
-
tokenize:
|
|
5489
|
+
tokenize: fb
|
|
5346
5490
|
};
|
|
5347
|
-
function
|
|
5491
|
+
function fb(t, e) {
|
|
5348
5492
|
return n;
|
|
5349
5493
|
function n(r) {
|
|
5350
5494
|
return t.enter("lineEnding"), t.consume(r), t.exit("lineEnding"), re(t, e, "linePrefix");
|
|
@@ -5352,9 +5496,9 @@ function ib(t, e) {
|
|
|
5352
5496
|
}
|
|
5353
5497
|
const Co = {
|
|
5354
5498
|
name: "thematicBreak",
|
|
5355
|
-
tokenize:
|
|
5499
|
+
tokenize: db
|
|
5356
5500
|
};
|
|
5357
|
-
function
|
|
5501
|
+
function db(t, e, n) {
|
|
5358
5502
|
let r = 0, i;
|
|
5359
5503
|
return o;
|
|
5360
5504
|
function o(c) {
|
|
@@ -5372,25 +5516,25 @@ function ob(t, e, n) {
|
|
|
5372
5516
|
}
|
|
5373
5517
|
const Qe = {
|
|
5374
5518
|
continuation: {
|
|
5375
|
-
tokenize:
|
|
5519
|
+
tokenize: gb
|
|
5376
5520
|
},
|
|
5377
|
-
exit:
|
|
5521
|
+
exit: kb,
|
|
5378
5522
|
name: "list",
|
|
5379
|
-
tokenize:
|
|
5380
|
-
},
|
|
5523
|
+
tokenize: mb
|
|
5524
|
+
}, hb = {
|
|
5381
5525
|
partial: !0,
|
|
5382
|
-
tokenize:
|
|
5383
|
-
},
|
|
5526
|
+
tokenize: bb
|
|
5527
|
+
}, pb = {
|
|
5384
5528
|
partial: !0,
|
|
5385
|
-
tokenize:
|
|
5529
|
+
tokenize: yb
|
|
5386
5530
|
};
|
|
5387
|
-
function
|
|
5531
|
+
function mb(t, e, n) {
|
|
5388
5532
|
const r = this, i = r.events[r.events.length - 1];
|
|
5389
5533
|
let o = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0, s = 0;
|
|
5390
5534
|
return l;
|
|
5391
5535
|
function l(h) {
|
|
5392
5536
|
const p = r.containerState.type || (h === 42 || h === 43 || h === 45 ? "listUnordered" : "listOrdered");
|
|
5393
|
-
if (p === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker :
|
|
5537
|
+
if (p === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker : ta(h)) {
|
|
5394
5538
|
if (r.containerState.type || (r.containerState.type = p, t.enter(p, {
|
|
5395
5539
|
_container: !0
|
|
5396
5540
|
})), p === "listUnordered")
|
|
@@ -5401,14 +5545,14 @@ function ab(t, e, n) {
|
|
|
5401
5545
|
return n(h);
|
|
5402
5546
|
}
|
|
5403
5547
|
function a(h) {
|
|
5404
|
-
return
|
|
5548
|
+
return ta(h) && ++s < 10 ? (t.consume(h), a) : (!r.interrupt || s < 2) && (r.containerState.marker ? h === r.containerState.marker : h === 41 || h === 46) ? (t.exit("listItemValue"), c(h)) : n(h);
|
|
5405
5549
|
}
|
|
5406
5550
|
function c(h) {
|
|
5407
5551
|
return t.enter("listItemMarker"), t.consume(h), t.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || h, t.check(
|
|
5408
5552
|
ji,
|
|
5409
5553
|
// Can’t be empty when interrupting.
|
|
5410
5554
|
r.interrupt ? n : u,
|
|
5411
|
-
t.attempt(
|
|
5555
|
+
t.attempt(hb, d, f)
|
|
5412
5556
|
);
|
|
5413
5557
|
}
|
|
5414
5558
|
function u(h) {
|
|
@@ -5421,20 +5565,20 @@ function ab(t, e, n) {
|
|
|
5421
5565
|
return r.containerState.size = o + r.sliceSerialize(t.exit("listItemPrefix"), !0).length, e(h);
|
|
5422
5566
|
}
|
|
5423
5567
|
}
|
|
5424
|
-
function
|
|
5568
|
+
function gb(t, e, n) {
|
|
5425
5569
|
const r = this;
|
|
5426
5570
|
return r.containerState._closeFlow = void 0, t.check(ji, i, o);
|
|
5427
5571
|
function i(l) {
|
|
5428
5572
|
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, re(t, e, "listItemIndent", r.containerState.size + 1)(l);
|
|
5429
5573
|
}
|
|
5430
5574
|
function o(l) {
|
|
5431
|
-
return r.containerState.furtherBlankLines || !Z(l) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, s(l)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, t.attempt(
|
|
5575
|
+
return r.containerState.furtherBlankLines || !Z(l) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, s(l)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, t.attempt(pb, e, s)(l));
|
|
5432
5576
|
}
|
|
5433
5577
|
function s(l) {
|
|
5434
5578
|
return r.containerState._closeFlow = !0, r.interrupt = void 0, re(t, t.attempt(Qe, e, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(l);
|
|
5435
5579
|
}
|
|
5436
5580
|
}
|
|
5437
|
-
function
|
|
5581
|
+
function yb(t, e, n) {
|
|
5438
5582
|
const r = this;
|
|
5439
5583
|
return re(t, i, "listItemIndent", r.containerState.size + 1);
|
|
5440
5584
|
function i(o) {
|
|
@@ -5442,10 +5586,10 @@ function ub(t, e, n) {
|
|
|
5442
5586
|
return s && s[1].type === "listItemIndent" && s[2].sliceSerialize(s[1], !0).length === r.containerState.size ? e(o) : n(o);
|
|
5443
5587
|
}
|
|
5444
5588
|
}
|
|
5445
|
-
function
|
|
5589
|
+
function kb(t) {
|
|
5446
5590
|
t.exit(this.containerState.type);
|
|
5447
5591
|
}
|
|
5448
|
-
function
|
|
5592
|
+
function bb(t, e, n) {
|
|
5449
5593
|
const r = this;
|
|
5450
5594
|
return re(t, i, "listItemPrefixWhitespace", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
|
|
5451
5595
|
function i(o) {
|
|
@@ -5455,10 +5599,10 @@ function db(t, e, n) {
|
|
|
5455
5599
|
}
|
|
5456
5600
|
const ku = {
|
|
5457
5601
|
name: "setextUnderline",
|
|
5458
|
-
resolveTo:
|
|
5459
|
-
tokenize:
|
|
5602
|
+
resolveTo: wb,
|
|
5603
|
+
tokenize: xb
|
|
5460
5604
|
};
|
|
5461
|
-
function
|
|
5605
|
+
function wb(t, e) {
|
|
5462
5606
|
let n = t.length, r, i, o;
|
|
5463
5607
|
for (; n--; )
|
|
5464
5608
|
if (t[n][0] === "enter") {
|
|
@@ -5482,7 +5626,7 @@ function hb(t, e) {
|
|
|
5482
5626
|
...t[o][1].end
|
|
5483
5627
|
}) : t[r][1] = s, t.push(["exit", s, e]), t;
|
|
5484
5628
|
}
|
|
5485
|
-
function
|
|
5629
|
+
function xb(t, e, n) {
|
|
5486
5630
|
const r = this;
|
|
5487
5631
|
let i;
|
|
5488
5632
|
return o;
|
|
@@ -5505,16 +5649,16 @@ function pb(t, e, n) {
|
|
|
5505
5649
|
return c === null || $(c) ? (t.exit("setextHeadingLine"), e(c)) : n(c);
|
|
5506
5650
|
}
|
|
5507
5651
|
}
|
|
5508
|
-
const
|
|
5509
|
-
tokenize:
|
|
5652
|
+
const Cb = {
|
|
5653
|
+
tokenize: Sb
|
|
5510
5654
|
};
|
|
5511
|
-
function
|
|
5655
|
+
function Sb(t) {
|
|
5512
5656
|
const e = this, n = t.attempt(
|
|
5513
5657
|
// Try to parse a blank line.
|
|
5514
5658
|
ji,
|
|
5515
5659
|
r,
|
|
5516
5660
|
// Try to parse initial flow (essentially, only code).
|
|
5517
|
-
t.attempt(this.parser.constructs.flowInitial, i, re(t, t.attempt(this.parser.constructs.flow, i, t.attempt(
|
|
5661
|
+
t.attempt(this.parser.constructs.flowInitial, i, re(t, t.attempt(this.parser.constructs.flow, i, t.attempt(Ek, i)), "linePrefix"))
|
|
5518
5662
|
);
|
|
5519
5663
|
return n;
|
|
5520
5664
|
function r(o) {
|
|
@@ -5532,12 +5676,12 @@ function gb(t) {
|
|
|
5532
5676
|
return t.enter("lineEnding"), t.consume(o), t.exit("lineEnding"), e.currentConstruct = void 0, n;
|
|
5533
5677
|
}
|
|
5534
5678
|
}
|
|
5535
|
-
const
|
|
5536
|
-
resolveAll:
|
|
5537
|
-
},
|
|
5538
|
-
function
|
|
5679
|
+
const Tb = {
|
|
5680
|
+
resolveAll: Xd()
|
|
5681
|
+
}, Mb = Yd("string"), Ab = Yd("text");
|
|
5682
|
+
function Yd(t) {
|
|
5539
5683
|
return {
|
|
5540
|
-
resolveAll:
|
|
5684
|
+
resolveAll: Xd(t === "text" ? Nb : void 0),
|
|
5541
5685
|
tokenize: e
|
|
5542
5686
|
};
|
|
5543
5687
|
function e(n) {
|
|
@@ -5571,7 +5715,7 @@ function Gd(t) {
|
|
|
5571
5715
|
}
|
|
5572
5716
|
}
|
|
5573
5717
|
}
|
|
5574
|
-
function
|
|
5718
|
+
function Xd(t) {
|
|
5575
5719
|
return e;
|
|
5576
5720
|
function e(n, r) {
|
|
5577
5721
|
let i = -1, o;
|
|
@@ -5580,7 +5724,7 @@ function Yd(t) {
|
|
|
5580
5724
|
return t ? t(n, r) : n;
|
|
5581
5725
|
}
|
|
5582
5726
|
}
|
|
5583
|
-
function
|
|
5727
|
+
function Nb(t, e) {
|
|
5584
5728
|
let n = 0;
|
|
5585
5729
|
for (; ++n <= t.length; )
|
|
5586
5730
|
if ((n === t.length || t[n][1].type === "lineEnding") && t[n - 1][1].type === "data") {
|
|
@@ -5622,7 +5766,7 @@ function wb(t, e) {
|
|
|
5622
5766
|
}
|
|
5623
5767
|
return t;
|
|
5624
5768
|
}
|
|
5625
|
-
const
|
|
5769
|
+
const Eb = {
|
|
5626
5770
|
42: Qe,
|
|
5627
5771
|
43: Qe,
|
|
5628
5772
|
45: Qe,
|
|
@@ -5636,57 +5780,57 @@ const xb = {
|
|
|
5636
5780
|
55: Qe,
|
|
5637
5781
|
56: Qe,
|
|
5638
5782
|
57: Qe,
|
|
5639
|
-
62:
|
|
5640
|
-
},
|
|
5641
|
-
91:
|
|
5642
|
-
},
|
|
5783
|
+
62: Wd
|
|
5784
|
+
}, Ib = {
|
|
5785
|
+
91: Dk
|
|
5786
|
+
}, vb = {
|
|
5643
5787
|
[-2]: Gs,
|
|
5644
5788
|
[-1]: Gs,
|
|
5645
5789
|
32: Gs
|
|
5646
|
-
},
|
|
5647
|
-
35:
|
|
5790
|
+
}, Ob = {
|
|
5791
|
+
35: Fk,
|
|
5648
5792
|
42: Co,
|
|
5649
5793
|
45: [ku, Co],
|
|
5650
|
-
60:
|
|
5794
|
+
60: Wk,
|
|
5651
5795
|
61: ku,
|
|
5652
5796
|
95: Co,
|
|
5653
5797
|
96: gu,
|
|
5654
5798
|
126: gu
|
|
5655
|
-
},
|
|
5656
|
-
38:
|
|
5657
|
-
92:
|
|
5658
|
-
},
|
|
5799
|
+
}, Rb = {
|
|
5800
|
+
38: jd,
|
|
5801
|
+
92: qd
|
|
5802
|
+
}, Db = {
|
|
5659
5803
|
[-5]: Ys,
|
|
5660
5804
|
[-4]: Ys,
|
|
5661
5805
|
[-3]: Ys,
|
|
5662
|
-
33:
|
|
5663
|
-
38:
|
|
5664
|
-
42:
|
|
5665
|
-
60: [
|
|
5666
|
-
91:
|
|
5667
|
-
92: [
|
|
5668
|
-
93:
|
|
5669
|
-
95:
|
|
5670
|
-
96:
|
|
5671
|
-
},
|
|
5672
|
-
null: [
|
|
5673
|
-
},
|
|
5806
|
+
33: lb,
|
|
5807
|
+
38: jd,
|
|
5808
|
+
42: na,
|
|
5809
|
+
60: [ck, Yk],
|
|
5810
|
+
91: cb,
|
|
5811
|
+
92: [zk, qd],
|
|
5812
|
+
93: Ua,
|
|
5813
|
+
95: na,
|
|
5814
|
+
96: Ck
|
|
5815
|
+
}, _b = {
|
|
5816
|
+
null: [na, Tb]
|
|
5817
|
+
}, Lb = {
|
|
5674
5818
|
null: [42, 95]
|
|
5675
|
-
},
|
|
5819
|
+
}, Pb = {
|
|
5676
5820
|
null: []
|
|
5677
|
-
},
|
|
5821
|
+
}, zb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5678
5822
|
__proto__: null,
|
|
5679
|
-
attentionMarkers:
|
|
5680
|
-
contentInitial:
|
|
5681
|
-
disable:
|
|
5682
|
-
document:
|
|
5683
|
-
flow:
|
|
5684
|
-
flowInitial:
|
|
5685
|
-
insideSpan:
|
|
5686
|
-
string:
|
|
5687
|
-
text:
|
|
5823
|
+
attentionMarkers: Lb,
|
|
5824
|
+
contentInitial: Ib,
|
|
5825
|
+
disable: Pb,
|
|
5826
|
+
document: Eb,
|
|
5827
|
+
flow: Ob,
|
|
5828
|
+
flowInitial: vb,
|
|
5829
|
+
insideSpan: _b,
|
|
5830
|
+
string: Rb,
|
|
5831
|
+
text: Db
|
|
5688
5832
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5689
|
-
function
|
|
5833
|
+
function Bb(t, e, n) {
|
|
5690
5834
|
let r = {
|
|
5691
5835
|
_bufferIndex: -1,
|
|
5692
5836
|
_index: 0,
|
|
@@ -5720,13 +5864,13 @@ function Ob(t, e, n) {
|
|
|
5720
5864
|
let u = e.tokenize.call(c, a);
|
|
5721
5865
|
return e.resolveAll && o.push(e), c;
|
|
5722
5866
|
function f(S) {
|
|
5723
|
-
return s = bt(s, S), g(), s[s.length - 1] !== null ? [] : (P(e, 0), c.events =
|
|
5867
|
+
return s = bt(s, S), g(), s[s.length - 1] !== null ? [] : (P(e, 0), c.events = ms(o, c.events, c), c.events);
|
|
5724
5868
|
}
|
|
5725
5869
|
function d(S, M) {
|
|
5726
|
-
return
|
|
5870
|
+
return Hb(h(S), M);
|
|
5727
5871
|
}
|
|
5728
5872
|
function h(S) {
|
|
5729
|
-
return
|
|
5873
|
+
return Fb(s, S);
|
|
5730
5874
|
}
|
|
5731
5875
|
function p() {
|
|
5732
5876
|
const {
|
|
@@ -5849,7 +5993,7 @@ function Ob(t, e, n) {
|
|
|
5849
5993
|
r.line in i && r.column < 2 && (r.column = i[r.line], r.offset += i[r.line] - 1);
|
|
5850
5994
|
}
|
|
5851
5995
|
}
|
|
5852
|
-
function
|
|
5996
|
+
function Fb(t, e) {
|
|
5853
5997
|
const n = e.start._index, r = e.start._bufferIndex, i = e.end._index, o = e.end._bufferIndex;
|
|
5854
5998
|
let s;
|
|
5855
5999
|
if (n === i)
|
|
@@ -5863,7 +6007,7 @@ function Rb(t, e) {
|
|
|
5863
6007
|
}
|
|
5864
6008
|
return s;
|
|
5865
6009
|
}
|
|
5866
|
-
function
|
|
6010
|
+
function Hb(t, e) {
|
|
5867
6011
|
let n = -1;
|
|
5868
6012
|
const r = [];
|
|
5869
6013
|
let i;
|
|
@@ -5903,35 +6047,35 @@ function Db(t, e) {
|
|
|
5903
6047
|
}
|
|
5904
6048
|
return r.join("");
|
|
5905
6049
|
}
|
|
5906
|
-
function
|
|
6050
|
+
function $b(t) {
|
|
5907
6051
|
const r = {
|
|
5908
6052
|
constructs: (
|
|
5909
6053
|
/** @type {FullNormalizedExtension} */
|
|
5910
|
-
|
|
6054
|
+
$d([zb, ...(t || {}).extensions || []])
|
|
5911
6055
|
),
|
|
5912
|
-
content: i(
|
|
6056
|
+
content: i(nk),
|
|
5913
6057
|
defined: [],
|
|
5914
|
-
document: i(
|
|
5915
|
-
flow: i(
|
|
6058
|
+
document: i(ik),
|
|
6059
|
+
flow: i(Cb),
|
|
5916
6060
|
lazy: {},
|
|
5917
|
-
string: i(
|
|
5918
|
-
text: i(
|
|
6061
|
+
string: i(Mb),
|
|
6062
|
+
text: i(Ab)
|
|
5919
6063
|
};
|
|
5920
6064
|
return r;
|
|
5921
6065
|
function i(o) {
|
|
5922
6066
|
return s;
|
|
5923
6067
|
function s(l) {
|
|
5924
|
-
return
|
|
6068
|
+
return Bb(r, o, l);
|
|
5925
6069
|
}
|
|
5926
6070
|
}
|
|
5927
6071
|
}
|
|
5928
|
-
function
|
|
5929
|
-
for (; !
|
|
6072
|
+
function Vb(t) {
|
|
6073
|
+
for (; !Ud(t); )
|
|
5930
6074
|
;
|
|
5931
6075
|
return t;
|
|
5932
6076
|
}
|
|
5933
6077
|
const bu = /[\0\t\n\r]/g;
|
|
5934
|
-
function
|
|
6078
|
+
function Wb() {
|
|
5935
6079
|
let t = 1, e = "", n = !0, r;
|
|
5936
6080
|
return i;
|
|
5937
6081
|
function i(o, s, l) {
|
|
@@ -5966,36 +6110,36 @@ function Pb() {
|
|
|
5966
6110
|
return l && (r && a.push(-5), e && a.push(e), a.push(null)), a;
|
|
5967
6111
|
}
|
|
5968
6112
|
}
|
|
5969
|
-
const
|
|
5970
|
-
function
|
|
5971
|
-
return t.replace(
|
|
6113
|
+
const qb = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
6114
|
+
function Qd(t) {
|
|
6115
|
+
return t.replace(qb, jb);
|
|
5972
6116
|
}
|
|
5973
|
-
function
|
|
6117
|
+
function jb(t, e, n) {
|
|
5974
6118
|
if (e)
|
|
5975
6119
|
return e;
|
|
5976
6120
|
if (n.charCodeAt(0) === 35) {
|
|
5977
6121
|
const i = n.charCodeAt(1), o = i === 120 || i === 88;
|
|
5978
|
-
return
|
|
6122
|
+
return Vd(n.slice(o ? 2 : 1), o ? 16 : 10);
|
|
5979
6123
|
}
|
|
5980
|
-
return
|
|
6124
|
+
return ja(n) || t;
|
|
5981
6125
|
}
|
|
5982
6126
|
function Ai(t) {
|
|
5983
|
-
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? wu(t.position) : "start" in t || "end" in t ? wu(t) : "line" in t || "column" in t ?
|
|
6127
|
+
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? wu(t.position) : "start" in t || "end" in t ? wu(t) : "line" in t || "column" in t ? ra(t) : "";
|
|
5984
6128
|
}
|
|
5985
|
-
function
|
|
6129
|
+
function ra(t) {
|
|
5986
6130
|
return xu(t && t.line) + ":" + xu(t && t.column);
|
|
5987
6131
|
}
|
|
5988
6132
|
function wu(t) {
|
|
5989
|
-
return
|
|
6133
|
+
return ra(t && t.start) + "-" + ra(t && t.end);
|
|
5990
6134
|
}
|
|
5991
6135
|
function xu(t) {
|
|
5992
6136
|
return t && typeof t == "number" ? t : 1;
|
|
5993
6137
|
}
|
|
5994
|
-
const
|
|
5995
|
-
function
|
|
5996
|
-
return typeof e != "string" && (n = e, e = void 0),
|
|
6138
|
+
const Zd = {}.hasOwnProperty;
|
|
6139
|
+
function Ub(t, e, n) {
|
|
6140
|
+
return typeof e != "string" && (n = e, e = void 0), Kb(n)(Vb($b(n).document().write(Wb()(t, e, !0))));
|
|
5997
6141
|
}
|
|
5998
|
-
function
|
|
6142
|
+
function Kb(t) {
|
|
5999
6143
|
const e = {
|
|
6000
6144
|
transforms: [],
|
|
6001
6145
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
@@ -6094,7 +6238,7 @@ function Hb(t) {
|
|
|
6094
6238
|
thematicBreak: a()
|
|
6095
6239
|
}
|
|
6096
6240
|
};
|
|
6097
|
-
|
|
6241
|
+
eh(e, (t || {}).mdastExtensions || []);
|
|
6098
6242
|
const n = {};
|
|
6099
6243
|
return r;
|
|
6100
6244
|
function r(N) {
|
|
@@ -6123,7 +6267,7 @@ function Hb(t) {
|
|
|
6123
6267
|
}
|
|
6124
6268
|
for (se = -1; ++se < N.length; ) {
|
|
6125
6269
|
const Ge = e[N[se][0]];
|
|
6126
|
-
|
|
6270
|
+
Zd.call(Ge, N[se][1].type) && Ge[N[se][1].type].call(Object.assign({
|
|
6127
6271
|
sliceSerialize: N[se][2].sliceSerialize
|
|
6128
6272
|
}, q), N[se][1]);
|
|
6129
6273
|
}
|
|
@@ -6232,7 +6376,7 @@ function Hb(t) {
|
|
|
6232
6376
|
q.position.end = xn(N.end);
|
|
6233
6377
|
}
|
|
6234
6378
|
function u() {
|
|
6235
|
-
return
|
|
6379
|
+
return qa(this.stack.pop());
|
|
6236
6380
|
}
|
|
6237
6381
|
function f() {
|
|
6238
6382
|
this.data.expectingFirstListItemValue = !0;
|
|
@@ -6348,7 +6492,7 @@ function Hb(t) {
|
|
|
6348
6492
|
}
|
|
6349
6493
|
function ce(N) {
|
|
6350
6494
|
const _ = this.sliceSerialize(N), q = this.stack[this.stack.length - 2];
|
|
6351
|
-
q.label =
|
|
6495
|
+
q.label = Qd(_), q.identifier = Rt(_).toLowerCase();
|
|
6352
6496
|
}
|
|
6353
6497
|
function be() {
|
|
6354
6498
|
const N = this.stack[this.stack.length - 1], _ = this.resume(), q = this.stack[this.stack.length - 1];
|
|
@@ -6382,7 +6526,7 @@ function Hb(t) {
|
|
|
6382
6526
|
function fe(N) {
|
|
6383
6527
|
const _ = this.sliceSerialize(N), q = this.data.characterReferenceType;
|
|
6384
6528
|
let G;
|
|
6385
|
-
q ? (G =
|
|
6529
|
+
q ? (G = Vd(_, q === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : G = ja(_);
|
|
6386
6530
|
const se = this.stack[this.stack.length - 1];
|
|
6387
6531
|
se.value += G;
|
|
6388
6532
|
}
|
|
@@ -6518,17 +6662,17 @@ function xn(t) {
|
|
|
6518
6662
|
offset: t.offset
|
|
6519
6663
|
};
|
|
6520
6664
|
}
|
|
6521
|
-
function
|
|
6665
|
+
function eh(t, e) {
|
|
6522
6666
|
let n = -1;
|
|
6523
6667
|
for (; ++n < e.length; ) {
|
|
6524
6668
|
const r = e[n];
|
|
6525
|
-
Array.isArray(r) ?
|
|
6669
|
+
Array.isArray(r) ? eh(t, r) : Jb(t, r);
|
|
6526
6670
|
}
|
|
6527
6671
|
}
|
|
6528
|
-
function
|
|
6672
|
+
function Jb(t, e) {
|
|
6529
6673
|
let n;
|
|
6530
6674
|
for (n in e)
|
|
6531
|
-
if (
|
|
6675
|
+
if (Zd.call(e, n))
|
|
6532
6676
|
switch (n) {
|
|
6533
6677
|
case "canContainEols": {
|
|
6534
6678
|
const r = e[n];
|
|
@@ -6560,11 +6704,11 @@ function Cu(t, e) {
|
|
|
6560
6704
|
end: e.end
|
|
6561
6705
|
}) + ") is still open");
|
|
6562
6706
|
}
|
|
6563
|
-
function
|
|
6707
|
+
function Gb(t) {
|
|
6564
6708
|
const e = this;
|
|
6565
6709
|
e.parser = n;
|
|
6566
6710
|
function n(r) {
|
|
6567
|
-
return
|
|
6711
|
+
return Ub(r, {
|
|
6568
6712
|
...e.data("settings"),
|
|
6569
6713
|
...t,
|
|
6570
6714
|
// Note: these options are not in the readme.
|
|
@@ -6576,7 +6720,7 @@ function Vb(t) {
|
|
|
6576
6720
|
}
|
|
6577
6721
|
}
|
|
6578
6722
|
const Su = {}.hasOwnProperty;
|
|
6579
|
-
function
|
|
6723
|
+
function Yb(t, e) {
|
|
6580
6724
|
const n = e || {};
|
|
6581
6725
|
function r(i, ...o) {
|
|
6582
6726
|
let s = r.invalid;
|
|
@@ -6590,14 +6734,14 @@ function Wb(t, e) {
|
|
|
6590
6734
|
}
|
|
6591
6735
|
return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
|
|
6592
6736
|
}
|
|
6593
|
-
const
|
|
6594
|
-
function
|
|
6737
|
+
const Xb = {}.hasOwnProperty;
|
|
6738
|
+
function th(t, e) {
|
|
6595
6739
|
let n = -1, r;
|
|
6596
6740
|
if (e.extensions)
|
|
6597
6741
|
for (; ++n < e.extensions.length; )
|
|
6598
|
-
|
|
6742
|
+
th(t, e.extensions[n]);
|
|
6599
6743
|
for (r in e)
|
|
6600
|
-
if (
|
|
6744
|
+
if (Xb.call(e, r))
|
|
6601
6745
|
switch (r) {
|
|
6602
6746
|
case "extensions":
|
|
6603
6747
|
break;
|
|
@@ -6611,7 +6755,7 @@ function eh(t, e) {
|
|
|
6611
6755
|
break;
|
|
6612
6756
|
}
|
|
6613
6757
|
case "handlers": {
|
|
6614
|
-
|
|
6758
|
+
Qb(t[r], e[r]);
|
|
6615
6759
|
break;
|
|
6616
6760
|
}
|
|
6617
6761
|
default:
|
|
@@ -6622,22 +6766,22 @@ function eh(t, e) {
|
|
|
6622
6766
|
function Tu(t, e) {
|
|
6623
6767
|
e && t.push(...e);
|
|
6624
6768
|
}
|
|
6625
|
-
function
|
|
6769
|
+
function Qb(t, e) {
|
|
6626
6770
|
e && Object.assign(t, e);
|
|
6627
6771
|
}
|
|
6628
|
-
function
|
|
6772
|
+
function Zb(t, e, n, r) {
|
|
6629
6773
|
const i = n.enter("blockquote"), o = n.createTracker(r);
|
|
6630
6774
|
o.move("> "), o.shift(2);
|
|
6631
6775
|
const s = n.indentLines(
|
|
6632
6776
|
n.containerFlow(t, o.current()),
|
|
6633
|
-
|
|
6777
|
+
e0
|
|
6634
6778
|
);
|
|
6635
6779
|
return i(), s;
|
|
6636
6780
|
}
|
|
6637
|
-
function
|
|
6781
|
+
function e0(t, e, n) {
|
|
6638
6782
|
return ">" + (n ? "" : " ") + t;
|
|
6639
6783
|
}
|
|
6640
|
-
function
|
|
6784
|
+
function nh(t, e) {
|
|
6641
6785
|
return Mu(t, e.inConstruct, !0) && !Mu(t, e.notInConstruct, !1);
|
|
6642
6786
|
}
|
|
6643
6787
|
function Mu(t, e, n) {
|
|
@@ -6653,12 +6797,12 @@ function Au(t, e, n, r) {
|
|
|
6653
6797
|
let i = -1;
|
|
6654
6798
|
for (; ++i < n.unsafe.length; )
|
|
6655
6799
|
if (n.unsafe[i].character === `
|
|
6656
|
-
` &&
|
|
6800
|
+
` && nh(n.stack, n.unsafe[i]))
|
|
6657
6801
|
return /[ \t]/.test(r.before) ? "" : " ";
|
|
6658
6802
|
return `\\
|
|
6659
6803
|
`;
|
|
6660
6804
|
}
|
|
6661
|
-
function
|
|
6805
|
+
function t0(t, e) {
|
|
6662
6806
|
const n = String(t);
|
|
6663
6807
|
let r = n.indexOf(e), i = r, o = 0, s = 0;
|
|
6664
6808
|
if (typeof e != "string")
|
|
@@ -6667,13 +6811,13 @@ function Jb(t, e) {
|
|
|
6667
6811
|
r === i ? ++o > s && (s = o) : o = 1, i = r + e.length, r = n.indexOf(e, i);
|
|
6668
6812
|
return s;
|
|
6669
6813
|
}
|
|
6670
|
-
function
|
|
6814
|
+
function ia(t, e) {
|
|
6671
6815
|
return !!(e.options.fences === !1 && t.value && // If there’s no info…
|
|
6672
6816
|
!t.lang && // And there’s a non-whitespace character…
|
|
6673
6817
|
/[^ \r\n]/.test(t.value) && // And the value doesn’t start or end in a blank…
|
|
6674
6818
|
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value));
|
|
6675
6819
|
}
|
|
6676
|
-
function
|
|
6820
|
+
function n0(t) {
|
|
6677
6821
|
const e = t.options.fence || "`";
|
|
6678
6822
|
if (e !== "`" && e !== "~")
|
|
6679
6823
|
throw new Error(
|
|
@@ -6681,13 +6825,13 @@ function Gb(t) {
|
|
|
6681
6825
|
);
|
|
6682
6826
|
return e;
|
|
6683
6827
|
}
|
|
6684
|
-
function
|
|
6685
|
-
const i =
|
|
6686
|
-
if (
|
|
6687
|
-
const f = n.enter("codeIndented"), d = n.indentLines(o,
|
|
6828
|
+
function r0(t, e, n, r) {
|
|
6829
|
+
const i = n0(n), o = t.value || "", s = i === "`" ? "GraveAccent" : "Tilde";
|
|
6830
|
+
if (ia(t, n)) {
|
|
6831
|
+
const f = n.enter("codeIndented"), d = n.indentLines(o, i0);
|
|
6688
6832
|
return f(), d;
|
|
6689
6833
|
}
|
|
6690
|
-
const l = n.createTracker(r), a = i.repeat(Math.max(
|
|
6834
|
+
const l = n.createTracker(r), a = i.repeat(Math.max(t0(o, i) + 1, 3)), c = n.enter("codeFenced");
|
|
6691
6835
|
let u = l.move(a);
|
|
6692
6836
|
if (t.lang) {
|
|
6693
6837
|
const f = n.enter(`codeFencedLang${s}`);
|
|
@@ -6716,10 +6860,10 @@ function Yb(t, e, n, r) {
|
|
|
6716
6860
|
`), o && (u += l.move(o + `
|
|
6717
6861
|
`)), u += l.move(a), c(), u;
|
|
6718
6862
|
}
|
|
6719
|
-
function
|
|
6863
|
+
function i0(t, e, n) {
|
|
6720
6864
|
return (n ? "" : " ") + t;
|
|
6721
6865
|
}
|
|
6722
|
-
function
|
|
6866
|
+
function Ka(t) {
|
|
6723
6867
|
const e = t.options.quote || '"';
|
|
6724
6868
|
if (e !== '"' && e !== "'")
|
|
6725
6869
|
throw new Error(
|
|
@@ -6727,8 +6871,8 @@ function Ua(t) {
|
|
|
6727
6871
|
);
|
|
6728
6872
|
return e;
|
|
6729
6873
|
}
|
|
6730
|
-
function
|
|
6731
|
-
const i =
|
|
6874
|
+
function o0(t, e, n, r) {
|
|
6875
|
+
const i = Ka(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.enter("definition");
|
|
6732
6876
|
let l = n.enter("label");
|
|
6733
6877
|
const a = n.createTracker(r);
|
|
6734
6878
|
let c = a.move("[");
|
|
@@ -6757,7 +6901,7 @@ function Qb(t, e, n, r) {
|
|
|
6757
6901
|
})
|
|
6758
6902
|
), c += a.move(i), l()), s(), c;
|
|
6759
6903
|
}
|
|
6760
|
-
function
|
|
6904
|
+
function s0(t) {
|
|
6761
6905
|
const e = t.options.emphasis || "*";
|
|
6762
6906
|
if (e !== "*" && e !== "_")
|
|
6763
6907
|
throw new Error(
|
|
@@ -6801,9 +6945,9 @@ function Ko(t, e, n) {
|
|
|
6801
6945
|
{ inside: !1, outside: !1 }
|
|
6802
6946
|
);
|
|
6803
6947
|
}
|
|
6804
|
-
|
|
6805
|
-
function
|
|
6806
|
-
const i =
|
|
6948
|
+
rh.peek = l0;
|
|
6949
|
+
function rh(t, e, n, r) {
|
|
6950
|
+
const i = s0(n), o = n.enter("emphasis"), s = n.createTracker(r), l = s.move(i);
|
|
6807
6951
|
let a = s.move(
|
|
6808
6952
|
n.containerPhrasing(t, {
|
|
6809
6953
|
after: i,
|
|
@@ -6825,159 +6969,15 @@ function nh(t, e, n, r) {
|
|
|
6825
6969
|
before: u.outside
|
|
6826
6970
|
}, l + a + h;
|
|
6827
6971
|
}
|
|
6828
|
-
function
|
|
6972
|
+
function l0(t, e, n) {
|
|
6829
6973
|
return n.options.emphasis || "*";
|
|
6830
6974
|
}
|
|
6831
|
-
const ps = (
|
|
6832
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
6833
|
-
/**
|
|
6834
|
-
* @type {(
|
|
6835
|
-
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
6836
|
-
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
6837
|
-
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
6838
|
-
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
6839
|
-
* ((test?: Test) => Check)
|
|
6840
|
-
* )}
|
|
6841
|
-
*/
|
|
6842
|
-
/**
|
|
6843
|
-
* @param {Test} [test]
|
|
6844
|
-
* @returns {Check}
|
|
6845
|
-
*/
|
|
6846
|
-
(function(t) {
|
|
6847
|
-
if (t == null)
|
|
6848
|
-
return i0;
|
|
6849
|
-
if (typeof t == "function")
|
|
6850
|
-
return ms(t);
|
|
6851
|
-
if (typeof t == "object")
|
|
6852
|
-
return Array.isArray(t) ? t0(t) : (
|
|
6853
|
-
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
6854
|
-
// narrows to `Array`.
|
|
6855
|
-
n0(
|
|
6856
|
-
/** @type {Props} */
|
|
6857
|
-
t
|
|
6858
|
-
)
|
|
6859
|
-
);
|
|
6860
|
-
if (typeof t == "string")
|
|
6861
|
-
return r0(t);
|
|
6862
|
-
throw new Error("Expected function, string, or object as test");
|
|
6863
|
-
})
|
|
6864
|
-
);
|
|
6865
|
-
function t0(t) {
|
|
6866
|
-
const e = [];
|
|
6867
|
-
let n = -1;
|
|
6868
|
-
for (; ++n < t.length; )
|
|
6869
|
-
e[n] = ps(t[n]);
|
|
6870
|
-
return ms(r);
|
|
6871
|
-
function r(...i) {
|
|
6872
|
-
let o = -1;
|
|
6873
|
-
for (; ++o < e.length; )
|
|
6874
|
-
if (e[o].apply(this, i)) return !0;
|
|
6875
|
-
return !1;
|
|
6876
|
-
}
|
|
6877
|
-
}
|
|
6878
|
-
function n0(t) {
|
|
6879
|
-
const e = (
|
|
6880
|
-
/** @type {Record<string, unknown>} */
|
|
6881
|
-
t
|
|
6882
|
-
);
|
|
6883
|
-
return ms(n);
|
|
6884
|
-
function n(r) {
|
|
6885
|
-
const i = (
|
|
6886
|
-
/** @type {Record<string, unknown>} */
|
|
6887
|
-
/** @type {unknown} */
|
|
6888
|
-
r
|
|
6889
|
-
);
|
|
6890
|
-
let o;
|
|
6891
|
-
for (o in t)
|
|
6892
|
-
if (i[o] !== e[o]) return !1;
|
|
6893
|
-
return !0;
|
|
6894
|
-
}
|
|
6895
|
-
}
|
|
6896
|
-
function r0(t) {
|
|
6897
|
-
return ms(e);
|
|
6898
|
-
function e(n) {
|
|
6899
|
-
return n && n.type === t;
|
|
6900
|
-
}
|
|
6901
|
-
}
|
|
6902
|
-
function ms(t) {
|
|
6903
|
-
return e;
|
|
6904
|
-
function e(n, r, i) {
|
|
6905
|
-
return !!(o0(n) && t.call(
|
|
6906
|
-
this,
|
|
6907
|
-
n,
|
|
6908
|
-
typeof r == "number" ? r : void 0,
|
|
6909
|
-
i || void 0
|
|
6910
|
-
));
|
|
6911
|
-
}
|
|
6912
|
-
}
|
|
6913
|
-
function i0() {
|
|
6914
|
-
return !0;
|
|
6915
|
-
}
|
|
6916
|
-
function o0(t) {
|
|
6917
|
-
return t !== null && typeof t == "object" && "type" in t;
|
|
6918
|
-
}
|
|
6919
|
-
const rh = [], s0 = !0, ra = !1, ia = "skip";
|
|
6920
|
-
function Ka(t, e, n, r) {
|
|
6921
|
-
let i;
|
|
6922
|
-
typeof e == "function" && typeof n != "function" ? (r = n, n = e) : i = e;
|
|
6923
|
-
const o = ps(i), s = r ? -1 : 1;
|
|
6924
|
-
l(t, void 0, [])();
|
|
6925
|
-
function l(a, c, u) {
|
|
6926
|
-
const f = (
|
|
6927
|
-
/** @type {Record<string, unknown>} */
|
|
6928
|
-
a && typeof a == "object" ? a : {}
|
|
6929
|
-
);
|
|
6930
|
-
if (typeof f.type == "string") {
|
|
6931
|
-
const h = (
|
|
6932
|
-
// `hast`
|
|
6933
|
-
typeof f.tagName == "string" ? f.tagName : (
|
|
6934
|
-
// `xast`
|
|
6935
|
-
typeof f.name == "string" ? f.name : void 0
|
|
6936
|
-
)
|
|
6937
|
-
);
|
|
6938
|
-
Object.defineProperty(d, "name", {
|
|
6939
|
-
value: "node (" + (a.type + (h ? "<" + h + ">" : "")) + ")"
|
|
6940
|
-
});
|
|
6941
|
-
}
|
|
6942
|
-
return d;
|
|
6943
|
-
function d() {
|
|
6944
|
-
let h = rh, p, m, g;
|
|
6945
|
-
if ((!e || o(a, c, u[u.length - 1] || void 0)) && (h = l0(n(a, u)), h[0] === ra))
|
|
6946
|
-
return h;
|
|
6947
|
-
if ("children" in a && a.children) {
|
|
6948
|
-
const y = (
|
|
6949
|
-
/** @type {UnistParent} */
|
|
6950
|
-
a
|
|
6951
|
-
);
|
|
6952
|
-
if (y.children && h[0] !== ia)
|
|
6953
|
-
for (m = (r ? y.children.length : -1) + s, g = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
6954
|
-
const A = y.children[m];
|
|
6955
|
-
if (p = l(A, m, g)(), p[0] === ra)
|
|
6956
|
-
return p;
|
|
6957
|
-
m = typeof p[1] == "number" ? p[1] : m + s;
|
|
6958
|
-
}
|
|
6959
|
-
}
|
|
6960
|
-
return h;
|
|
6961
|
-
}
|
|
6962
|
-
}
|
|
6963
|
-
}
|
|
6964
|
-
function l0(t) {
|
|
6965
|
-
return Array.isArray(t) ? t : typeof t == "number" ? [s0, t] : t == null ? rh : [t];
|
|
6966
|
-
}
|
|
6967
|
-
function Ur(t, e, n, r) {
|
|
6968
|
-
let i, o, s;
|
|
6969
|
-
typeof e == "function" && typeof n != "function" ? (o = void 0, s = e, i = n) : (o = e, s = n, i = r), Ka(t, o, l, i);
|
|
6970
|
-
function l(a, c) {
|
|
6971
|
-
const u = c[c.length - 1], f = u ? u.children.indexOf(a) : void 0;
|
|
6972
|
-
return s(a, f, u);
|
|
6973
|
-
}
|
|
6974
|
-
}
|
|
6975
6975
|
function ih(t, e) {
|
|
6976
6976
|
let n = !1;
|
|
6977
|
-
return
|
|
6977
|
+
return jr(t, function(r) {
|
|
6978
6978
|
if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
|
|
6979
|
-
return n = !0,
|
|
6980
|
-
}), !!((!t.depth || t.depth < 3) &&
|
|
6979
|
+
return n = !0, Yl;
|
|
6980
|
+
}), !!((!t.depth || t.depth < 3) && qa(t) && (e.options.setext || n));
|
|
6981
6981
|
}
|
|
6982
6982
|
function a0(t, e, n, r) {
|
|
6983
6983
|
const i = Math.max(Math.min(6, t.depth || 1), 1), o = n.createTracker(r);
|
|
@@ -7017,7 +7017,7 @@ function c0() {
|
|
|
7017
7017
|
}
|
|
7018
7018
|
sh.peek = u0;
|
|
7019
7019
|
function sh(t, e, n, r) {
|
|
7020
|
-
const i =
|
|
7020
|
+
const i = Ka(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.enter("image");
|
|
7021
7021
|
let l = n.enter("label");
|
|
7022
7022
|
const a = n.createTracker(r);
|
|
7023
7023
|
let c = a.move("![");
|
|
@@ -7088,7 +7088,7 @@ function d0() {
|
|
|
7088
7088
|
return "`";
|
|
7089
7089
|
}
|
|
7090
7090
|
function ch(t, e) {
|
|
7091
|
-
const n =
|
|
7091
|
+
const n = qa(t);
|
|
7092
7092
|
return !!(!e.options.resourceLink && // If there’s a url…
|
|
7093
7093
|
t.url && // And there’s a no title…
|
|
7094
7094
|
!t.title && // And the content of `node` is a single text node…
|
|
@@ -7100,7 +7100,7 @@ function ch(t, e) {
|
|
|
7100
7100
|
}
|
|
7101
7101
|
uh.peek = h0;
|
|
7102
7102
|
function uh(t, e, n, r) {
|
|
7103
|
-
const i =
|
|
7103
|
+
const i = Ka(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.createTracker(r);
|
|
7104
7104
|
let l, a;
|
|
7105
7105
|
if (ch(t, n)) {
|
|
7106
7106
|
const u = n.stack;
|
|
@@ -7264,7 +7264,7 @@ function w0(t, e, n, r) {
|
|
|
7264
7264
|
}
|
|
7265
7265
|
const x0 = (
|
|
7266
7266
|
/** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
|
|
7267
|
-
|
|
7267
|
+
cs([
|
|
7268
7268
|
"break",
|
|
7269
7269
|
"delete",
|
|
7270
7270
|
"emphasis",
|
|
@@ -7344,11 +7344,11 @@ function N0(t, e, n) {
|
|
|
7344
7344
|
return n.options.ruleSpaces ? r.slice(0, -1) : r;
|
|
7345
7345
|
}
|
|
7346
7346
|
const Ga = {
|
|
7347
|
-
blockquote:
|
|
7347
|
+
blockquote: Zb,
|
|
7348
7348
|
break: Au,
|
|
7349
|
-
code:
|
|
7350
|
-
definition:
|
|
7351
|
-
emphasis:
|
|
7349
|
+
code: r0,
|
|
7350
|
+
definition: o0,
|
|
7351
|
+
emphasis: rh,
|
|
7352
7352
|
hardBreak: Au,
|
|
7353
7353
|
heading: a0,
|
|
7354
7354
|
html: oh,
|
|
@@ -7366,7 +7366,7 @@ const Ga = {
|
|
|
7366
7366
|
thematicBreak: N0
|
|
7367
7367
|
}, E0 = [I0];
|
|
7368
7368
|
function I0(t, e, n, r) {
|
|
7369
|
-
if (e.type === "code" &&
|
|
7369
|
+
if (e.type === "code" && ia(e, r) && (t.type === "list" || t.type === e.type && ia(t, r)))
|
|
7370
7370
|
return !1;
|
|
7371
7371
|
if ("spread" in n && typeof n.spread == "boolean")
|
|
7372
7372
|
return t.type === "paragraph" && // Two paragraphs.
|
|
@@ -7511,7 +7511,7 @@ const Un = [
|
|
|
7511
7511
|
{ atBreak: !0, character: "~" }
|
|
7512
7512
|
];
|
|
7513
7513
|
function O0(t) {
|
|
7514
|
-
return t.label || !t.identifier ? t.label || "" :
|
|
7514
|
+
return t.label || !t.identifier ? t.label || "" : Qd(t.identifier);
|
|
7515
7515
|
}
|
|
7516
7516
|
function R0(t) {
|
|
7517
7517
|
if (!t._compiled) {
|
|
@@ -7613,7 +7613,7 @@ function B0(t, e, n) {
|
|
|
7613
7613
|
let l = -1;
|
|
7614
7614
|
for (; ++l < t.unsafe.length; ) {
|
|
7615
7615
|
const u = t.unsafe[l];
|
|
7616
|
-
if (!
|
|
7616
|
+
if (!nh(t.stack, u))
|
|
7617
7617
|
continue;
|
|
7618
7618
|
const f = t.compilePattern(u);
|
|
7619
7619
|
let d;
|
|
@@ -7679,7 +7679,7 @@ function $0(t, e) {
|
|
|
7679
7679
|
stack: [],
|
|
7680
7680
|
unsafe: [...v0]
|
|
7681
7681
|
};
|
|
7682
|
-
|
|
7682
|
+
th(r, n), r.options.tightDefinitions && r.join.push(q0), r.handle = Yb("type", {
|
|
7683
7683
|
invalid: V0,
|
|
7684
7684
|
unknown: W0,
|
|
7685
7685
|
handlers: r.handlers
|
|
@@ -9040,7 +9040,7 @@ class yh {
|
|
|
9040
9040
|
this.elements.push(e);
|
|
9041
9041
|
}, this.close = () => {
|
|
9042
9042
|
const e = this.elements.pop();
|
|
9043
|
-
if (!e) throw
|
|
9043
|
+
if (!e) throw xd();
|
|
9044
9044
|
return e;
|
|
9045
9045
|
};
|
|
9046
9046
|
}
|
|
@@ -9070,7 +9070,7 @@ const la = class extends yh {
|
|
|
9070
9070
|
...this.schema.nodes,
|
|
9071
9071
|
...this.schema.marks
|
|
9072
9072
|
}).find((i) => i.spec.parseMarkdown.match(n));
|
|
9073
|
-
if (!r) throw
|
|
9073
|
+
if (!r) throw g1(n);
|
|
9074
9074
|
return r;
|
|
9075
9075
|
}), ge(this, Mo, (n) => {
|
|
9076
9076
|
const r = Y(this, To).call(this, n);
|
|
@@ -9088,7 +9088,7 @@ const la = class extends yh {
|
|
|
9088
9088
|
return this;
|
|
9089
9089
|
}, ge(this, pi, (n, r, i) => {
|
|
9090
9090
|
const o = n.createAndFill(r, i, Y(this, Vt));
|
|
9091
|
-
if (!o) throw
|
|
9091
|
+
if (!o) throw m1(n, r, i);
|
|
9092
9092
|
return this.push(o), o;
|
|
9093
9093
|
}), this.addNode = (n, r, i) => {
|
|
9094
9094
|
try {
|
|
@@ -9103,7 +9103,7 @@ const la = class extends yh {
|
|
|
9103
9103
|
}, this.closeMark = (n) => (ge(this, Vt, n.removeFromSet(Y(this, Vt))), this), this.addText = (n) => {
|
|
9104
9104
|
try {
|
|
9105
9105
|
const r = this.top();
|
|
9106
|
-
if (!r) throw
|
|
9106
|
+
if (!r) throw xd();
|
|
9107
9107
|
const i = r.pop(), o = this.schema.text(n, Y(this, Vt));
|
|
9108
9108
|
if (!i)
|
|
9109
9109
|
return r.push(o), this;
|
|
@@ -9156,7 +9156,7 @@ const bw = (t) => Object.prototype.hasOwnProperty.call(t, "size"), ca = class ex
|
|
|
9156
9156
|
...this.schema.nodes,
|
|
9157
9157
|
...this.schema.marks
|
|
9158
9158
|
}).find((i) => i.spec.toMarkdown.match(n));
|
|
9159
|
-
if (!r) throw
|
|
9159
|
+
if (!r) throw y1(n.type);
|
|
9160
9160
|
return r;
|
|
9161
9161
|
}), ge(this, Ao, (n) => Y(this, mi).call(this, n).spec.toMarkdown.runner(this, n)), ge(this, No, (n, r) => Y(this, mi).call(this, n).spec.toMarkdown.runner(this, n, r)), ge(this, gi, (n) => {
|
|
9162
9162
|
const { marks: r } = n, i = (l) => l.type.spec.priority ?? 50;
|
|
@@ -9894,7 +9894,7 @@ function Tw(t, e, n, r) {
|
|
|
9894
9894
|
return;
|
|
9895
9895
|
o++;
|
|
9896
9896
|
let a = null;
|
|
9897
|
-
if (r instanceof
|
|
9897
|
+
if (r instanceof hs) {
|
|
9898
9898
|
let c = s.marks, u;
|
|
9899
9899
|
for (; u = r.isInSet(c); )
|
|
9900
9900
|
(a || (a = [])).push(u), c = u.removeFromSet(c);
|
|
@@ -13161,7 +13161,7 @@ class ur extends Yi {
|
|
|
13161
13161
|
}
|
|
13162
13162
|
static create(e, n, r, i) {
|
|
13163
13163
|
let o = i.nodeViews[n.type.name], s = o && o(n, i, r);
|
|
13164
|
-
return (!s || !s.dom) && (s =
|
|
13164
|
+
return (!s || !s.dom) && (s = Ur.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new ur(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
13165
13165
|
}
|
|
13166
13166
|
parseRule() {
|
|
13167
13167
|
return this.dirty & Jt || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -13216,7 +13216,7 @@ class On extends Yi {
|
|
|
13216
13216
|
u = document.createTextNode(n.text);
|
|
13217
13217
|
else if (u.nodeType != 3)
|
|
13218
13218
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
13219
|
-
} else u || ({ dom: u, contentDOM: f } =
|
|
13219
|
+
} else u || ({ dom: u, contentDOM: f } = Ur.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
13220
13220
|
!f && !n.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), n.type.spec.draggable && (u.draggable = !0));
|
|
13221
13221
|
let d = u;
|
|
13222
13222
|
return u = ip(u, r, n), c ? a = new nC(e, n, r, i, u, f || null, d, c, o, s + 1) : n.isText ? new Cs(e, n, r, i, u, d, o) : new On(e, n, r, i, u, f || null, d, o, s + 1);
|
|
@@ -14158,7 +14158,7 @@ function uc(t, e) {
|
|
|
14158
14158
|
let h = r.firstChild;
|
|
14159
14159
|
n.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), r = h.content;
|
|
14160
14160
|
}
|
|
14161
|
-
let s = t.someProp("clipboardSerializer") ||
|
|
14161
|
+
let s = t.someProp("clipboardSerializer") || Ur.fromSchema(t.state.schema), l = pp(), a = l.createElement("div");
|
|
14162
14162
|
a.appendChild(s.serializeFragment(r, { document: l }));
|
|
14163
14163
|
let c = a.firstChild, u, f = 0;
|
|
14164
14164
|
for (; c && c.nodeType == 1 && (u = hp[c.nodeName.toLowerCase()]); ) {
|
|
@@ -14193,7 +14193,7 @@ function cp(t, e, n, r, i) {
|
|
|
14193
14193
|
if (f)
|
|
14194
14194
|
l = f;
|
|
14195
14195
|
else {
|
|
14196
|
-
let d = i.marks(), { schema: h } = t.state, p =
|
|
14196
|
+
let d = i.marks(), { schema: h } = t.state, p = Ur.fromSchema(h);
|
|
14197
14197
|
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
14198
14198
|
let g = s.appendChild(document.createElement("p"));
|
|
14199
14199
|
m && g.appendChild(p.serializeNode(h.text(m, d)));
|
|
@@ -16123,7 +16123,7 @@ const pS = {
|
|
|
16123
16123
|
[],
|
|
16124
16124
|
"remarkPlugins"
|
|
16125
16125
|
), Aa = oe([], "nodeView"), Na = oe([], "markView"), ts = oe(
|
|
16126
|
-
pw().use(
|
|
16126
|
+
pw().use(Gb).use(J0),
|
|
16127
16127
|
"remark"
|
|
16128
16128
|
), Ap = oe(
|
|
16129
16129
|
{
|
|
@@ -16151,7 +16151,7 @@ const mS = (t) => (t.inject(Dn, {}).inject(vi, []).inject(Oi, []).inject(wl, [gc
|
|
|
16151
16151
|
t.get(vi).map(([l, a]) => [l, Mf(a)])
|
|
16152
16152
|
), o = Object.fromEntries(
|
|
16153
16153
|
t.get(Oi).map(([l, a]) => [l, Mf(a)])
|
|
16154
|
-
), s = new
|
|
16154
|
+
), s = new $1({ nodes: i, marks: o });
|
|
16155
16155
|
return t.set(Dn, s), t.done(ut), () => {
|
|
16156
16156
|
t.remove(Dn).remove(vi).remove(Oi).remove(wl).clearTimer(ut);
|
|
16157
16157
|
};
|
|
@@ -16161,7 +16161,7 @@ hr(mS, {
|
|
|
16161
16161
|
});
|
|
16162
16162
|
class Np {
|
|
16163
16163
|
constructor() {
|
|
16164
|
-
this.#t = new
|
|
16164
|
+
this.#t = new w1(), this.#e = null, this.setCtx = (e) => {
|
|
16165
16165
|
this.#e = e;
|
|
16166
16166
|
}, this.chain = () => {
|
|
16167
16167
|
if (this.#e == null) throw Us();
|
|
@@ -16267,7 +16267,7 @@ class bS {
|
|
|
16267
16267
|
);
|
|
16268
16268
|
return [r, (l, a, c) => {
|
|
16269
16269
|
const u = this.#t;
|
|
16270
|
-
if (u == null) throw
|
|
16270
|
+
if (u == null) throw ds();
|
|
16271
16271
|
const f = o.map((h) => h.onRun(u));
|
|
16272
16272
|
return Kr(...f)(l, a, c);
|
|
16273
16273
|
}];
|
|
@@ -16282,7 +16282,7 @@ class bS {
|
|
|
16282
16282
|
}
|
|
16283
16283
|
}
|
|
16284
16284
|
const Ep = oe(new bS(), "keymap"), Ip = Xt("KeymapReady"), Do = Xt("ParserReady"), vp = (() => {
|
|
16285
|
-
throw
|
|
16285
|
+
throw ds();
|
|
16286
16286
|
}), _o = oe(vp, "parser"), Cl = oe([], "parserTimer"), wS = (t) => (t.inject(_o, vp).inject(Cl, [ut]).record(Do), async () => {
|
|
16287
16287
|
await t.waitTimers(Cl);
|
|
16288
16288
|
const e = t.get(ts), n = t.get(Dn);
|
|
@@ -16297,7 +16297,7 @@ const Lo = Xt("SerializerReady"), Sl = oe(
|
|
|
16297
16297
|
[],
|
|
16298
16298
|
"serializerTimer"
|
|
16299
16299
|
), Op = (() => {
|
|
16300
|
-
throw
|
|
16300
|
+
throw ds();
|
|
16301
16301
|
}), Tl = oe(
|
|
16302
16302
|
Op,
|
|
16303
16303
|
"serializer"
|
|
@@ -16324,7 +16324,7 @@ function CS(t, e, n) {
|
|
|
16324
16324
|
return Pr.fromSchema(n).parse(t.dom);
|
|
16325
16325
|
if (t.type === "json")
|
|
16326
16326
|
return En.fromJSON(n, t.value);
|
|
16327
|
-
throw
|
|
16327
|
+
throw h1(t);
|
|
16328
16328
|
}
|
|
16329
16329
|
const SS = new ht("MILKDOWN_STATE_TRACKER"), TS = (t) => (t.inject(Ml, "").inject(Ci, {}).inject(Al, (e) => e).inject(Nl, [
|
|
16330
16330
|
Do,
|
|
@@ -16468,7 +16468,7 @@ function OS(t, e) {
|
|
|
16468
16468
|
};
|
|
16469
16469
|
return n.type = (r) => {
|
|
16470
16470
|
const i = r.get(Dn).marks[t];
|
|
16471
|
-
if (!i) throw
|
|
16471
|
+
if (!i) throw b1(t);
|
|
16472
16472
|
return i;
|
|
16473
16473
|
}, n;
|
|
16474
16474
|
}
|
|
@@ -16484,7 +16484,7 @@ function yc(t, e) {
|
|
|
16484
16484
|
};
|
|
16485
16485
|
return n.type = (r) => {
|
|
16486
16486
|
const i = r.get(Dn).nodes[t];
|
|
16487
|
-
if (!i) throw
|
|
16487
|
+
if (!i) throw k1(t);
|
|
16488
16488
|
return i;
|
|
16489
16489
|
}, n;
|
|
16490
16490
|
}
|
|
@@ -16618,7 +16618,7 @@ function LS(t) {
|
|
|
16618
16618
|
}
|
|
16619
16619
|
function PS(t, e, n, r) {
|
|
16620
16620
|
let i = t.tr, o = r.end, s = r.$to.end(r.depth);
|
|
16621
|
-
o < s && (i.step(new Be(o - 1, s, o, s, new L(O.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new
|
|
16621
|
+
o < s && (i.step(new Be(o - 1, s, o, s, new L(O.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Id(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
|
|
16622
16622
|
const l = gs(r);
|
|
16623
16623
|
if (l == null)
|
|
16624
16624
|
return !1;
|
|
@@ -16661,7 +16661,7 @@ function FS(t) {
|
|
|
16661
16661
|
const e = /* @__PURE__ */ new Map();
|
|
16662
16662
|
if (!t || !t.type)
|
|
16663
16663
|
throw new Error("mdast-util-definitions expected node");
|
|
16664
|
-
return
|
|
16664
|
+
return jr(t, "definition", function(r) {
|
|
16665
16665
|
const i = Af(r.identifier);
|
|
16666
16666
|
i && !e.get(i) && e.set(i, r);
|
|
16667
16667
|
}), n;
|
|
@@ -16676,9 +16676,9 @@ function Af(t) {
|
|
|
16676
16676
|
function HS() {
|
|
16677
16677
|
return function(t) {
|
|
16678
16678
|
const e = FS(t);
|
|
16679
|
-
|
|
16679
|
+
jr(t, function(n, r, i) {
|
|
16680
16680
|
if (n.type === "definition" && i !== void 0 && typeof r == "number")
|
|
16681
|
-
return i.children.splice(r, 1), [
|
|
16681
|
+
return i.children.splice(r, 1), [Xl, r];
|
|
16682
16682
|
if (n.type === "imageReference" || n.type === "linkReference") {
|
|
16683
16683
|
const o = e(n.identifier);
|
|
16684
16684
|
if (o && i && typeof r == "number")
|
|
@@ -16687,7 +16687,7 @@ function HS() {
|
|
|
16687
16687
|
url: o.url,
|
|
16688
16688
|
title: o.title,
|
|
16689
16689
|
children: n.children
|
|
16690
|
-
}, [
|
|
16690
|
+
}, [Xl, r];
|
|
16691
16691
|
}
|
|
16692
16692
|
});
|
|
16693
16693
|
};
|
|
@@ -17044,7 +17044,7 @@ E(KS, {
|
|
|
17044
17044
|
group: "Doc"
|
|
17045
17045
|
});
|
|
17046
17046
|
function JS(t) {
|
|
17047
|
-
return
|
|
17047
|
+
return Wa(
|
|
17048
17048
|
t,
|
|
17049
17049
|
(e) => e.type === "html" && ["<br />", "<br>", "<br >", "<br/>"].includes(
|
|
17050
17050
|
e.value?.trim()
|
|
@@ -18160,7 +18160,7 @@ E(km.ctx, {
|
|
|
18160
18160
|
const bm = pr(
|
|
18161
18161
|
"remarkAddOrderInList",
|
|
18162
18162
|
() => () => (t) => {
|
|
18163
|
-
|
|
18163
|
+
jr(t, "list", (e) => {
|
|
18164
18164
|
if (e.ordered) {
|
|
18165
18165
|
const n = e.start ?? 1;
|
|
18166
18166
|
e.children.forEach((r, i) => {
|
|
@@ -18182,7 +18182,7 @@ const wm = pr(
|
|
|
18182
18182
|
"remarkLineBreak",
|
|
18183
18183
|
() => () => (t) => {
|
|
18184
18184
|
const e = /[\t ]*(?:\r?\n|\r)/g;
|
|
18185
|
-
|
|
18185
|
+
jr(
|
|
18186
18186
|
t,
|
|
18187
18187
|
"text",
|
|
18188
18188
|
(n, r, i) => {
|
|
@@ -18264,7 +18264,7 @@ const Sm = pr(
|
|
|
18264
18264
|
"remarkMarker",
|
|
18265
18265
|
() => () => (t, e) => {
|
|
18266
18266
|
const n = (r) => e.value.charAt(r.position.start.offset);
|
|
18267
|
-
|
|
18267
|
+
jr(
|
|
18268
18268
|
t,
|
|
18269
18269
|
(r) => ["strong", "emphasis"].includes(r.type),
|
|
18270
18270
|
(r) => {
|
|
@@ -20105,10 +20105,10 @@ function v2(t) {
|
|
|
20105
20105
|
return t.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
20106
20106
|
}
|
|
20107
20107
|
function O2(t, e, n) {
|
|
20108
|
-
const i =
|
|
20108
|
+
const i = cs((n || {}).ignore || []), o = R2(e);
|
|
20109
20109
|
let s = -1;
|
|
20110
20110
|
for (; ++s < o.length; )
|
|
20111
|
-
|
|
20111
|
+
Wa(t, "text", l);
|
|
20112
20112
|
function l(c, u) {
|
|
20113
20113
|
let f = -1, d;
|
|
20114
20114
|
for (; ++f < u.length; ) {
|
|
@@ -20287,7 +20287,7 @@ function U2(t) {
|
|
|
20287
20287
|
}
|
|
20288
20288
|
function Pm(t, e) {
|
|
20289
20289
|
const n = t.input.charCodeAt(t.index - 1);
|
|
20290
|
-
return (t.index === 0 || lr(n) ||
|
|
20290
|
+
return (t.index === 0 || lr(n) || ps(n)) && // If it’s an email, the previous character should not be a slash.
|
|
20291
20291
|
(!e || n !== 47);
|
|
20292
20292
|
}
|
|
20293
20293
|
zm.peek = tM;
|
|
@@ -20792,7 +20792,7 @@ function RM(t, e, n) {
|
|
|
20792
20792
|
return f === 47 ? (t.consume(f), o ? c : (o = !0, a)) : n(f);
|
|
20793
20793
|
}
|
|
20794
20794
|
function c(f) {
|
|
20795
|
-
return f === null || Uo(f) || de(f) || lr(f) ||
|
|
20795
|
+
return f === null || Uo(f) || de(f) || lr(f) || ps(f) ? n(f) : t.attempt(Hm, t.attempt($m, u), n)(f);
|
|
20796
20796
|
}
|
|
20797
20797
|
function u(f) {
|
|
20798
20798
|
return t.exit("literalAutolinkHttp"), t.exit("literalAutolink"), e(f);
|
|
@@ -20812,7 +20812,7 @@ function _M(t, e, n) {
|
|
|
20812
20812
|
let r, i, o;
|
|
20813
20813
|
return s;
|
|
20814
20814
|
function s(c) {
|
|
20815
|
-
return c === 46 || c === 95 ? t.check(Vm, a, l)(c) : c === null || de(c) || lr(c) || c !== 45 &&
|
|
20815
|
+
return c === 46 || c === 95 ? t.check(Vm, a, l)(c) : c === null || de(c) || lr(c) || c !== 45 && ps(c) ? a(c) : (o = !0, t.consume(c), s);
|
|
20816
20816
|
}
|
|
20817
20817
|
function l(c) {
|
|
20818
20818
|
return c === 95 ? r = !0 : (i = r, r = void 0), t.consume(c), s;
|
|
@@ -21107,7 +21107,7 @@ function KM(t) {
|
|
|
21107
21107
|
start: Object.assign({}, s[c][1].end),
|
|
21108
21108
|
end: Object.assign({}, s[a][1].start)
|
|
21109
21109
|
}, d = [["enter", u, l], ["enter", s[c][1], l], ["exit", s[c][1], l], ["enter", f, l]], h = l.parser.constructs.insideSpan.null;
|
|
21110
|
-
h && at(d, d.length, 0,
|
|
21110
|
+
h && at(d, d.length, 0, ms(h, s.slice(c + 1, a), l)), at(d, d.length, 0, [["exit", f, l], ["enter", s[a][1], l], ["exit", s[a][1], l], ["exit", u, l]]), at(s, c - 1, a - c + 3, d), a = c + d.length - 2;
|
|
21111
21111
|
break;
|
|
21112
21112
|
}
|
|
21113
21113
|
}
|
|
@@ -21399,7 +21399,7 @@ function rA(t, e, n) {
|
|
|
21399
21399
|
}
|
|
21400
21400
|
}
|
|
21401
21401
|
function iA(t) {
|
|
21402
|
-
return
|
|
21402
|
+
return $d([
|
|
21403
21403
|
IM(),
|
|
21404
21404
|
FM(),
|
|
21405
21405
|
KM(t),
|
|
@@ -24602,20 +24602,20 @@ function PE(t = LE) {
|
|
|
24602
24602
|
}
|
|
24603
24603
|
};
|
|
24604
24604
|
}
|
|
24605
|
-
const zE =
|
|
24606
|
-
function FE(t) {
|
|
24607
|
-
return t.replace(BE, "$1");
|
|
24608
|
-
}
|
|
24605
|
+
const zE = String.raw`(?:var(?:\\?_table)?|step|check|ref\\?_(?:step|var|fig)|cite)`, BE = new RegExp(String.raw`\{\{${zE}\s*\|[^}]+?\}\}`, "g"), FE = /\\([\\!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-])/g;
|
|
24609
24606
|
function HE(t) {
|
|
24610
|
-
return t.replace(
|
|
24607
|
+
return t.replace(FE, "$1");
|
|
24608
|
+
}
|
|
24609
|
+
function $E(t) {
|
|
24610
|
+
return t.replace(BE, HE);
|
|
24611
24611
|
}
|
|
24612
24612
|
function Jn(t) {
|
|
24613
|
-
return
|
|
24613
|
+
return $E(yd(t));
|
|
24614
24614
|
}
|
|
24615
|
-
const
|
|
24615
|
+
const VE = {
|
|
24616
24616
|
key: 0,
|
|
24617
24617
|
class: "aimd-block-add-menu-divider"
|
|
24618
|
-
},
|
|
24618
|
+
}, WE = { class: "aimd-block-add-menu-group-label" }, qE = ["onClick"], jE = ["innerHTML"], UE = 420, bI = /* @__PURE__ */ Jl({
|
|
24619
24619
|
__name: "AimdWysiwygEditor",
|
|
24620
24620
|
props: {
|
|
24621
24621
|
content: {},
|
|
@@ -24914,7 +24914,7 @@ const $E = {
|
|
|
24914
24914
|
A = !0;
|
|
24915
24915
|
try {
|
|
24916
24916
|
const M = Jn(S);
|
|
24917
|
-
v = Date.now() +
|
|
24917
|
+
v = Date.now() + UE, I.track(M), y.value.action(zy(o(S))), C = M;
|
|
24918
24918
|
} catch {
|
|
24919
24919
|
return A = !1, !1;
|
|
24920
24920
|
}
|
|
@@ -24969,8 +24969,8 @@ const $E = {
|
|
|
24969
24969
|
(wn(!0), jn(ao, null, Kc(f.value, (H, K) => (wn(), jn(ao, {
|
|
24970
24970
|
key: H.label
|
|
24971
24971
|
}, [
|
|
24972
|
-
K > 0 ? (wn(), jn("div",
|
|
24973
|
-
co("div",
|
|
24972
|
+
K > 0 ? (wn(), jn("div", VE)) : Jc("", !0),
|
|
24973
|
+
co("div", WE, Gc(H.label), 1),
|
|
24974
24974
|
(wn(!0), jn(ao, null, Kc(H.items, (W) => (wn(), jn("button", {
|
|
24975
24975
|
key: W.label,
|
|
24976
24976
|
class: "aimd-block-add-menu-item",
|
|
@@ -24979,9 +24979,9 @@ const $E = {
|
|
|
24979
24979
|
co("span", {
|
|
24980
24980
|
class: "aimd-block-add-menu-icon",
|
|
24981
24981
|
innerHTML: W.icon
|
|
24982
|
-
}, null, 8,
|
|
24982
|
+
}, null, 8, jE),
|
|
24983
24983
|
co("span", null, Gc(W.label), 1)
|
|
24984
|
-
], 8,
|
|
24984
|
+
], 8, qE))), 128))
|
|
24985
24985
|
], 64))), 128))
|
|
24986
24986
|
], 4)) : Jc("", !0)
|
|
24987
24987
|
]))
|
|
@@ -24989,10 +24989,10 @@ const $E = {
|
|
|
24989
24989
|
}
|
|
24990
24990
|
});
|
|
24991
24991
|
export {
|
|
24992
|
-
|
|
24992
|
+
uI as A,
|
|
24993
24993
|
kd as D,
|
|
24994
|
-
|
|
24995
|
-
|
|
24994
|
+
fI as M,
|
|
24995
|
+
bI as _,
|
|
24996
24996
|
Yy as a,
|
|
24997
24997
|
Xy as b,
|
|
24998
24998
|
DE as c,
|
|
@@ -25000,13 +25000,13 @@ export {
|
|
|
25000
25000
|
OE as e,
|
|
25001
25001
|
_E as f,
|
|
25002
25002
|
IE as g,
|
|
25003
|
-
|
|
25003
|
+
hI as h,
|
|
25004
25004
|
Gy as i,
|
|
25005
25005
|
Qy as j,
|
|
25006
|
-
|
|
25006
|
+
cI as k,
|
|
25007
25007
|
e1 as l,
|
|
25008
|
-
|
|
25009
|
-
|
|
25010
|
-
|
|
25008
|
+
dI as m,
|
|
25009
|
+
pI as n,
|
|
25010
|
+
$E as o,
|
|
25011
25011
|
Jy as r
|
|
25012
25012
|
};
|