mermaid 10.2.2 → 10.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{arc-2c65c00d.js → arc-7150e654.js} +29 -29
- package/dist/{arc-56235257.js → arc-7eb198ee.js} +1 -1
- package/dist/{c4Diagram-30400ad0.js → c4Diagram-380bf510.js} +2 -2
- package/dist/{c4Diagram-4015ed94.js → c4Diagram-9cddb37f.js} +1 -1
- package/dist/{c4Diagram-c5f6cac5.js → c4Diagram-cfee614a.js} +2 -2
- package/dist/{classDiagram-a3547413.js → classDiagram-5d1b8e6f.js} +5 -5
- package/dist/{classDiagram-4adda95e.js → classDiagram-a96cd833.js} +5 -5
- package/dist/{classDiagram-f9088573.js → classDiagram-bc733c3b.js} +3 -3
- package/dist/{classDiagram-v2-0a70a412.js → classDiagram-v2-67cfdf13.js} +8 -8
- package/dist/{classDiagram-v2-56d00918.js → classDiagram-v2-8931bdaf.js} +6 -6
- package/dist/{classDiagram-v2-60cd73ae.js → classDiagram-v2-c07ab2ac.js} +8 -8
- package/dist/{createText-31812fd1.js → createText-3df630b5.js} +39 -18
- package/dist/{createText-2f2a343a.js → createText-d34e51c6.js} +39 -18
- package/dist/{createText-34ecf23e.js → createText-f4a1d776.js} +759 -741
- package/dist/{edges-06fe0e9b.js → edges-49ac43a2.js} +3 -3
- package/dist/{edges-8c2fb38e.js → edges-b5d62f50.js} +4 -4
- package/dist/{edges-84ec6f60.js → edges-e08b4480.js} +4 -4
- package/dist/{erDiagram-2034ab6f.js → erDiagram-67d49ee6.js} +3 -3
- package/dist/{erDiagram-79324bed.js → erDiagram-bd715e3e.js} +3 -3
- package/dist/{erDiagram-3f713c6a.js → erDiagram-f6946109.js} +1 -1
- package/dist/{flowDb-197cd6d1.js → flowDb-6a57c1b4.js} +1 -1
- package/dist/{flowDb-4e7c4aec.js → flowDb-b96f714d.js} +1 -1
- package/dist/{flowDb-7f7635cc.js → flowDb-e0e3fd7a.js} +1 -1
- package/dist/{flowDiagram-d3a638d5.js → flowDiagram-8fe09f21.js} +10 -10
- package/dist/{flowDiagram-a2b06433.js → flowDiagram-93327f21.js} +7 -7
- package/dist/{flowDiagram-7f2bb914.js → flowDiagram-98e6d0e8.js} +10 -10
- package/dist/{flowDiagram-v2-c75a17c2.js → flowDiagram-v2-3b8e6891.js} +10 -10
- package/dist/{flowDiagram-v2-9f8fab07.js → flowDiagram-v2-476db779.js} +7 -7
- package/dist/{flowDiagram-v2-d84f41d0.js → flowDiagram-v2-c3745723.js} +10 -10
- package/dist/{flowchart-elk-definition-73ae1d0b.js → flowchart-elk-definition-37f84cb6.js} +7 -7
- package/dist/{flowchart-elk-definition-5cf0e905.js → flowchart-elk-definition-5082a990.js} +6 -6
- package/dist/{flowchart-elk-definition-b299cff1.js → flowchart-elk-definition-9b5375b9.js} +223 -223
- package/dist/{ganttDiagram-1781195b.js → ganttDiagram-06967d3a.js} +2 -2
- package/dist/{ganttDiagram-4e00717f.js → ganttDiagram-7ce12d6b.js} +1 -1
- package/dist/{ganttDiagram-eddf2b5d.js → ganttDiagram-8a43e655.js} +2 -2
- package/dist/{gitGraphDiagram-ac8b1a85.js → gitGraphDiagram-1e960c50.js} +1 -1
- package/dist/{gitGraphDiagram-71d608d2.js → gitGraphDiagram-2e5972b2.js} +1 -1
- package/dist/{gitGraphDiagram-bd04333d.js → gitGraphDiagram-49074372.js} +1 -1
- package/dist/{index-ce156fd5.js → index-714fe675.js} +4 -4
- package/dist/{index-7484f147.js → index-a92ac404.js} +3 -3
- package/dist/{index-bf86b901.js → index-e1d945fd.js} +4 -4
- package/dist/{infoDiagram-bc0d5d92.js → infoDiagram-264bed3e.js} +1 -1
- package/dist/{infoDiagram-d8edadcf.js → infoDiagram-a3502c4f.js} +1 -1
- package/dist/{infoDiagram-e2ad1b58.js → infoDiagram-bb968efd.js} +1 -1
- package/dist/{journeyDiagram-eeb24d29.js → journeyDiagram-255a0ba0.js} +3 -3
- package/dist/{journeyDiagram-b5476ffb.js → journeyDiagram-31be0096.js} +1 -1
- package/dist/{journeyDiagram-1eb6fba0.js → journeyDiagram-b4ecc044.js} +3 -3
- package/dist/{layout-1171b506.js → layout-3ecfba7d.js} +1 -1
- package/dist/{layout-23ab7ebc.js → layout-db328a38.js} +1 -1
- package/dist/{line-47adbd5d.js → line-130fa1e5.js} +1 -1
- package/dist/{line-850ff9a1.js → line-9ed8ba8b.js} +1 -1
- package/dist/{linear-8f527e14.js → linear-6a545413.js} +1 -1
- package/dist/{linear-cedd28c4.js → linear-cfd7abf9.js} +1 -1
- package/dist/{mermaid-c66525a4.js → mermaid-34beccd0.js} +74 -72
- package/dist/{mermaid-08b2ff5f.js → mermaid-8ea29a40.js} +371 -370
- package/dist/{mermaid-ddfd1cde.js → mermaid-b0ad2de1.js} +23 -21
- package/dist/mermaid.core.mjs +1 -1
- package/dist/mermaid.esm.min.mjs +1 -1
- package/dist/mermaid.esm.mjs +2 -2
- package/dist/mermaid.js +47 -24
- package/dist/mermaid.min.js +122 -122
- package/dist/{mindmap-definition-7c7f5519.js → mindmap-definition-4fc2557c.js} +2 -2
- package/dist/{mindmap-definition-b35271d9.js → mindmap-definition-c274dca3.js} +2 -2
- package/dist/{mindmap-definition-825812a2.js → mindmap-definition-d99fa72b.js} +2 -2
- package/dist/{pieDiagram-c9e1e65d.js → pieDiagram-157505fe.js} +1 -1
- package/dist/{pieDiagram-9f52f3c8.js → pieDiagram-b14d6516.js} +2 -2
- package/dist/{pieDiagram-427d710c.js → pieDiagram-ca09f680.js} +2 -2
- package/dist/{quadrantDiagram-dbf8fc84.js → quadrantDiagram-4a0aa1c7.js} +4 -4
- package/dist/{quadrantDiagram-0bfe3602.js → quadrantDiagram-5b13e66e.js} +61 -61
- package/dist/{quadrantDiagram-1ee9b076.js → quadrantDiagram-fd70f2d0.js} +3 -3
- package/dist/{requirementDiagram-a1feb0ba.js → requirementDiagram-19c99588.js} +1 -1
- package/dist/{requirementDiagram-480c4b33.js → requirementDiagram-20d822e5.js} +3 -3
- package/dist/{requirementDiagram-f7bd47cb.js → requirementDiagram-3071de27.js} +3 -3
- package/dist/{selectAll-776a0c51.js → selectAll-92b901d1.js} +1 -1
- package/dist/{selectAll-378e90f0.js → selectAll-c295459b.js} +1 -1
- package/dist/{sequenceDiagram-5e6de89c.js → sequenceDiagram-1d99af4c.js} +216 -214
- package/dist/{sequenceDiagram-d370aecf.js → sequenceDiagram-317224a5.js} +6 -5
- package/dist/{sequenceDiagram-4a53e255.js → sequenceDiagram-5dfd0049.js} +4 -3
- package/dist/{stateDiagram-a0ac330a.js → stateDiagram-133e3642.js} +2 -2
- package/dist/{stateDiagram-eed21683.js → stateDiagram-4e50f1a0.js} +4 -4
- package/dist/{stateDiagram-f56100fa.js → stateDiagram-a9a9b756.js} +4 -4
- package/dist/{stateDiagram-v2-cfe94687.js → stateDiagram-v2-6371a76b.js} +6 -6
- package/dist/{stateDiagram-v2-2a8ef368.js → stateDiagram-v2-b34fad08.js} +8 -8
- package/dist/{stateDiagram-v2-7684bed5.js → stateDiagram-v2-ef99b8a4.js} +8 -8
- package/dist/{styles-2f9839dc.js → styles-29b137c7.js} +1 -1
- package/dist/{styles-1557db13.js → styles-313a4a41.js} +5 -5
- package/dist/{styles-aea5c17b.js → styles-5f89df53.js} +3 -3
- package/dist/{styles-b9045be1.js → styles-74f60bde.js} +1 -1
- package/dist/{styles-ad91cc54.js → styles-82a206d5.js} +5 -5
- package/dist/{styles-a40c3df8.js → styles-aae272b4.js} +1 -1
- package/dist/{styles-0a525a9a.js → styles-aefe6593.js} +1 -1
- package/dist/{styles-ed94903c.js → styles-bed8d31d.js} +1 -1
- package/dist/{styles-d9667b1f.js → styles-fa41df25.js} +1 -1
- package/dist/{svgDraw-14f13a51.js → svgDraw-0fcc813d.js} +1 -1
- package/dist/{svgDraw-d5bb5edb.js → svgDraw-591e3474.js} +2 -2
- package/dist/{svgDraw-39291d2f.js → svgDraw-b2141e90.js} +2 -2
- package/dist/{svgDrawCommon-b06ba884.js → svgDrawCommon-0bff53a1.js} +1 -1
- package/dist/{svgDrawCommon-87f2bfe2.js → svgDrawCommon-daf0bec5.js} +1 -1
- package/dist/{timeline-definition-4cdb07ca.js → timeline-definition-5ed366f4.js} +1 -1
- package/dist/{timeline-definition-927a93b1.js → timeline-definition-ee1cab63.js} +2 -2
- package/dist/{timeline-definition-afaf264f.js → timeline-definition-fff849c3.js} +2 -2
- package/dist/utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { aO as At, l as nt, aw as zt } from "./mermaid-8ea29a40.js";
|
|
2
|
+
function It(n, r) {
|
|
3
3
|
var { includeImageAlt: t = !0 } = r || {};
|
|
4
4
|
return tt(n, t);
|
|
5
5
|
}
|
|
@@ -16,48 +16,48 @@ function qn(n, r) {
|
|
|
16
16
|
}
|
|
17
17
|
function en(n, r, t, e) {
|
|
18
18
|
const u = n.length;
|
|
19
|
-
let
|
|
19
|
+
let l = 0, i;
|
|
20
20
|
if (r < 0 ? r = -r > u ? 0 : u + r : r = r > u ? u : r, t = t > 0 ? t : 0, e.length < 1e4)
|
|
21
21
|
i = Array.from(e), i.unshift(r, t), [].splice.apply(n, i);
|
|
22
22
|
else
|
|
23
|
-
for (t && [].splice.apply(n, [r, t]);
|
|
24
|
-
i = e.slice(
|
|
23
|
+
for (t && [].splice.apply(n, [r, t]); l < e.length; )
|
|
24
|
+
i = e.slice(l, l + 1e4), i.unshift(r, 0), [].splice.apply(n, i), l += 1e4, r += 1e4;
|
|
25
25
|
}
|
|
26
26
|
function Z(n, r) {
|
|
27
27
|
return n.length > 0 ? (en(n, n.length, 0, r), n) : r;
|
|
28
28
|
}
|
|
29
29
|
const Hn = {}.hasOwnProperty;
|
|
30
|
-
function
|
|
30
|
+
function Tt(n) {
|
|
31
31
|
const r = {};
|
|
32
32
|
let t = -1;
|
|
33
33
|
for (; ++t < n.length; )
|
|
34
|
-
|
|
34
|
+
Bt(r, n[t]);
|
|
35
35
|
return r;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Bt(n, r) {
|
|
38
38
|
let t;
|
|
39
39
|
for (t in r) {
|
|
40
|
-
const u = (Hn.call(n, t) ? n[t] : void 0) || (n[t] = {}),
|
|
40
|
+
const u = (Hn.call(n, t) ? n[t] : void 0) || (n[t] = {}), l = r[t];
|
|
41
41
|
let i;
|
|
42
|
-
for (i in
|
|
42
|
+
for (i in l) {
|
|
43
43
|
Hn.call(u, i) || (u[i] = []);
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const a = l[i];
|
|
45
|
+
Lt(
|
|
46
46
|
// @ts-expect-error Looks like a list.
|
|
47
47
|
u[i],
|
|
48
|
-
Array.isArray(
|
|
48
|
+
Array.isArray(a) ? a : a ? [a] : []
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Lt(n, r) {
|
|
54
54
|
let t = -1;
|
|
55
55
|
const e = [];
|
|
56
56
|
for (; ++t < r.length; )
|
|
57
57
|
(r[t].add === "after" ? n : e).push(r[t]);
|
|
58
58
|
en(n, 0, 0, e);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const Ot = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, tn = sn(/[A-Za-z]/), An = sn(/\d/), Dt = sn(/[\dA-Fa-f]/), v = sn(/[\dA-Za-z]/), Pt = sn(/[!-/:-@[-`{-~]/), Vn = sn(/[#-'*+\--9=?A-Z^-~]/);
|
|
61
61
|
function zn(n) {
|
|
62
62
|
return (
|
|
63
63
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
@@ -74,28 +74,28 @@ function C(n) {
|
|
|
74
74
|
function q(n) {
|
|
75
75
|
return n === -2 || n === -1 || n === 32;
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const _t = sn(/\s/), Mt = sn(Ot);
|
|
78
78
|
function sn(n) {
|
|
79
79
|
return r;
|
|
80
80
|
function r(t) {
|
|
81
81
|
return t !== null && n.test(String.fromCharCode(t));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function B(n, r, t, e) {
|
|
85
85
|
const u = e ? e - 1 : Number.POSITIVE_INFINITY;
|
|
86
|
-
let
|
|
86
|
+
let l = 0;
|
|
87
87
|
return i;
|
|
88
88
|
function i(c) {
|
|
89
|
-
return q(c) ? (n.enter(t),
|
|
89
|
+
return q(c) ? (n.enter(t), a(c)) : r(c);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return q(c) &&
|
|
91
|
+
function a(c) {
|
|
92
|
+
return q(c) && l++ < u ? (n.consume(c), a) : (n.exit(t), r(c));
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
tokenize:
|
|
95
|
+
const Rt = {
|
|
96
|
+
tokenize: jt
|
|
97
97
|
};
|
|
98
|
-
function
|
|
98
|
+
function jt(n) {
|
|
99
99
|
const r = n.attempt(
|
|
100
100
|
this.parser.constructs.contentInitial,
|
|
101
101
|
e,
|
|
@@ -103,45 +103,45 @@ function Rt(n) {
|
|
|
103
103
|
);
|
|
104
104
|
let t;
|
|
105
105
|
return r;
|
|
106
|
-
function e(
|
|
107
|
-
if (
|
|
108
|
-
n.consume(
|
|
106
|
+
function e(a) {
|
|
107
|
+
if (a === null) {
|
|
108
|
+
n.consume(a);
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
return n.enter("lineEnding"), n.consume(
|
|
111
|
+
return n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), B(n, r, "linePrefix");
|
|
112
112
|
}
|
|
113
|
-
function u(
|
|
114
|
-
return n.enter("paragraph"), a
|
|
113
|
+
function u(a) {
|
|
114
|
+
return n.enter("paragraph"), l(a);
|
|
115
115
|
}
|
|
116
|
-
function a
|
|
116
|
+
function l(a) {
|
|
117
117
|
const c = n.enter("chunkText", {
|
|
118
118
|
contentType: "text",
|
|
119
119
|
previous: t
|
|
120
120
|
});
|
|
121
|
-
return t && (t.next = c), t = c, i(
|
|
121
|
+
return t && (t.next = c), t = c, i(a);
|
|
122
122
|
}
|
|
123
|
-
function i(
|
|
124
|
-
if (
|
|
125
|
-
n.exit("chunkText"), n.exit("paragraph"), n.consume(
|
|
123
|
+
function i(a) {
|
|
124
|
+
if (a === null) {
|
|
125
|
+
n.exit("chunkText"), n.exit("paragraph"), n.consume(a);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
return C(
|
|
128
|
+
return C(a) ? (n.consume(a), n.exit("chunkText"), l) : (n.consume(a), i);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
const
|
|
132
|
-
tokenize: qt
|
|
133
|
-
}, Vn = {
|
|
131
|
+
const qt = {
|
|
134
132
|
tokenize: Ht
|
|
133
|
+
}, Nn = {
|
|
134
|
+
tokenize: Vt
|
|
135
135
|
};
|
|
136
|
-
function
|
|
136
|
+
function Ht(n) {
|
|
137
137
|
const r = this, t = [];
|
|
138
|
-
let e = 0, u,
|
|
139
|
-
return
|
|
140
|
-
function
|
|
138
|
+
let e = 0, u, l, i;
|
|
139
|
+
return a;
|
|
140
|
+
function a(F) {
|
|
141
141
|
if (e < t.length) {
|
|
142
|
-
const
|
|
143
|
-
return r.containerState =
|
|
144
|
-
|
|
142
|
+
const O = t[e];
|
|
143
|
+
return r.containerState = O[1], n.attempt(
|
|
144
|
+
O[0].continuation,
|
|
145
145
|
c,
|
|
146
146
|
p
|
|
147
147
|
)(F);
|
|
@@ -151,25 +151,25 @@ function qt(n) {
|
|
|
151
151
|
function c(F) {
|
|
152
152
|
if (e++, r.containerState._closeFlow) {
|
|
153
153
|
r.containerState._closeFlow = void 0, u && _();
|
|
154
|
-
const
|
|
155
|
-
let
|
|
156
|
-
for (;
|
|
157
|
-
if (r.events[
|
|
158
|
-
d = r.events[
|
|
154
|
+
const O = r.events.length;
|
|
155
|
+
let D = O, d;
|
|
156
|
+
for (; D--; )
|
|
157
|
+
if (r.events[D][0] === "exit" && r.events[D][1].type === "chunkFlow") {
|
|
158
|
+
d = r.events[D][1].end;
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
161
|
y(e);
|
|
162
|
-
let P =
|
|
162
|
+
let P = O;
|
|
163
163
|
for (; P < r.events.length; )
|
|
164
164
|
r.events[P][1].end = Object.assign({}, d), P++;
|
|
165
165
|
return en(
|
|
166
166
|
r.events,
|
|
167
|
-
|
|
167
|
+
D + 1,
|
|
168
168
|
0,
|
|
169
|
-
r.events.slice(
|
|
169
|
+
r.events.slice(O)
|
|
170
170
|
), r.events.length = P, p(F);
|
|
171
171
|
}
|
|
172
|
-
return
|
|
172
|
+
return a(F);
|
|
173
173
|
}
|
|
174
174
|
function p(F) {
|
|
175
175
|
if (e === t.length) {
|
|
@@ -180,7 +180,7 @@ function qt(n) {
|
|
|
180
180
|
r.interrupt = !!(u.currentConstruct && !u._gfmTableDynamicInterruptHack);
|
|
181
181
|
}
|
|
182
182
|
return r.containerState = {}, n.check(
|
|
183
|
-
|
|
183
|
+
Nn,
|
|
184
184
|
h,
|
|
185
185
|
x
|
|
186
186
|
)(F);
|
|
@@ -193,7 +193,7 @@ function qt(n) {
|
|
|
193
193
|
}
|
|
194
194
|
function g(F) {
|
|
195
195
|
return r.containerState = {}, n.attempt(
|
|
196
|
-
|
|
196
|
+
Nn,
|
|
197
197
|
f,
|
|
198
198
|
k
|
|
199
199
|
)(F);
|
|
@@ -208,20 +208,20 @@ function qt(n) {
|
|
|
208
208
|
}
|
|
209
209
|
return u = u || r.parser.flow(r.now()), n.enter("chunkFlow", {
|
|
210
210
|
contentType: "flow",
|
|
211
|
-
previous:
|
|
211
|
+
previous: l,
|
|
212
212
|
_tokenizer: u
|
|
213
|
-
}),
|
|
213
|
+
}), A(F);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function A(F) {
|
|
216
216
|
if (F === null) {
|
|
217
|
-
|
|
217
|
+
L(n.exit("chunkFlow"), !0), y(0), n.consume(F);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
return C(F) ? (n.consume(F),
|
|
220
|
+
return C(F) ? (n.consume(F), L(n.exit("chunkFlow")), e = 0, r.interrupt = void 0, a) : (n.consume(F), A);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
222
|
+
function L(F, O) {
|
|
223
|
+
const D = r.sliceStream(F);
|
|
224
|
+
if (O && D.push(null), F.previous = l, l && (l.next = F), l = F, u.defineSkip(F.start), u.write(D), r.parser.lazy[F.start.line]) {
|
|
225
225
|
let d = u.events.length;
|
|
226
226
|
for (; d--; )
|
|
227
227
|
if (
|
|
@@ -232,17 +232,17 @@ function qt(n) {
|
|
|
232
232
|
)
|
|
233
233
|
return;
|
|
234
234
|
const P = r.events.length;
|
|
235
|
-
let R = P, j,
|
|
235
|
+
let R = P, j, N;
|
|
236
236
|
for (; R--; )
|
|
237
237
|
if (r.events[R][0] === "exit" && r.events[R][1].type === "chunkFlow") {
|
|
238
238
|
if (j) {
|
|
239
|
-
|
|
239
|
+
N = r.events[R][1].end;
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
242
|
j = !0;
|
|
243
243
|
}
|
|
244
244
|
for (y(e), d = P; d < r.events.length; )
|
|
245
|
-
r.events[d][1].end = Object.assign({},
|
|
245
|
+
r.events[d][1].end = Object.assign({}, N), d++;
|
|
246
246
|
en(
|
|
247
247
|
r.events,
|
|
248
248
|
R + 1,
|
|
@@ -252,19 +252,19 @@ function qt(n) {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
function y(F) {
|
|
255
|
-
let
|
|
256
|
-
for (;
|
|
257
|
-
const
|
|
258
|
-
r.containerState =
|
|
255
|
+
let O = t.length;
|
|
256
|
+
for (; O-- > F; ) {
|
|
257
|
+
const D = t[O];
|
|
258
|
+
r.containerState = D[1], D[0].exit.call(r, n);
|
|
259
259
|
}
|
|
260
260
|
t.length = F;
|
|
261
261
|
}
|
|
262
262
|
function _() {
|
|
263
|
-
u.write([null]),
|
|
263
|
+
u.write([null]), l = void 0, u = void 0, r.containerState._closeFlow = void 0;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
266
|
+
function Vt(n, r, t) {
|
|
267
|
+
return B(
|
|
268
268
|
n,
|
|
269
269
|
n.attempt(this.parser.constructs.document, r, t),
|
|
270
270
|
"linePrefix",
|
|
@@ -272,27 +272,27 @@ function Ht(n, r, t) {
|
|
|
272
272
|
);
|
|
273
273
|
}
|
|
274
274
|
function Qn(n) {
|
|
275
|
-
if (n === null || Y(n) ||
|
|
275
|
+
if (n === null || Y(n) || _t(n))
|
|
276
276
|
return 1;
|
|
277
|
-
if (
|
|
277
|
+
if (Mt(n))
|
|
278
278
|
return 2;
|
|
279
279
|
}
|
|
280
280
|
function Bn(n, r, t) {
|
|
281
281
|
const e = [];
|
|
282
282
|
let u = -1;
|
|
283
283
|
for (; ++u < n.length; ) {
|
|
284
|
-
const
|
|
285
|
-
|
|
284
|
+
const l = n[u].resolveAll;
|
|
285
|
+
l && !e.includes(l) && (r = l(r, t), e.push(l));
|
|
286
286
|
}
|
|
287
287
|
return r;
|
|
288
288
|
}
|
|
289
289
|
const In = {
|
|
290
290
|
name: "attention",
|
|
291
|
-
tokenize:
|
|
291
|
+
tokenize: Qt,
|
|
292
292
|
resolveAll: Nt
|
|
293
293
|
};
|
|
294
294
|
function Nt(n, r) {
|
|
295
|
-
let t = -1, e, u,
|
|
295
|
+
let t = -1, e, u, l, i, a, c, p, h;
|
|
296
296
|
for (; ++t < n.length; )
|
|
297
297
|
if (n[t][0] === "enter" && n[t][1].type === "attentionSequence" && n[t][1]._close) {
|
|
298
298
|
for (e = t; e--; )
|
|
@@ -306,26 +306,26 @@ function Nt(n, r) {
|
|
|
306
306
|
type: c > 1 ? "strongSequence" : "emphasisSequence",
|
|
307
307
|
start: x,
|
|
308
308
|
end: Object.assign({}, n[e][1].end)
|
|
309
|
-
},
|
|
309
|
+
}, a = {
|
|
310
310
|
type: c > 1 ? "strongSequence" : "emphasisSequence",
|
|
311
311
|
start: Object.assign({}, n[t][1].start),
|
|
312
312
|
end: g
|
|
313
|
-
},
|
|
313
|
+
}, l = {
|
|
314
314
|
type: c > 1 ? "strongText" : "emphasisText",
|
|
315
315
|
start: Object.assign({}, n[e][1].end),
|
|
316
316
|
end: Object.assign({}, n[t][1].start)
|
|
317
317
|
}, u = {
|
|
318
318
|
type: c > 1 ? "strong" : "emphasis",
|
|
319
319
|
start: Object.assign({}, i.start),
|
|
320
|
-
end: Object.assign({},
|
|
321
|
-
}, n[e][1].end = Object.assign({}, i.start), n[t][1].start = Object.assign({},
|
|
320
|
+
end: Object.assign({}, a.end)
|
|
321
|
+
}, n[e][1].end = Object.assign({}, i.start), n[t][1].start = Object.assign({}, a.end), p = [], n[e][1].end.offset - n[e][1].start.offset && (p = Z(p, [
|
|
322
322
|
["enter", n[e][1], r],
|
|
323
323
|
["exit", n[e][1], r]
|
|
324
324
|
])), p = Z(p, [
|
|
325
325
|
["enter", u, r],
|
|
326
326
|
["enter", i, r],
|
|
327
327
|
["exit", i, r],
|
|
328
|
-
["enter",
|
|
328
|
+
["enter", l, r]
|
|
329
329
|
]), p = Z(
|
|
330
330
|
p,
|
|
331
331
|
Bn(
|
|
@@ -334,9 +334,9 @@ function Nt(n, r) {
|
|
|
334
334
|
r
|
|
335
335
|
)
|
|
336
336
|
), p = Z(p, [
|
|
337
|
-
["exit", a, r],
|
|
338
|
-
["enter", l, r],
|
|
339
337
|
["exit", l, r],
|
|
338
|
+
["enter", a, r],
|
|
339
|
+
["exit", a, r],
|
|
340
340
|
["exit", u, r]
|
|
341
341
|
]), n[t][1].end.offset - n[t][1].start.offset ? (h = 2, p = Z(p, [
|
|
342
342
|
["enter", n[t][1], r],
|
|
@@ -349,47 +349,47 @@ function Nt(n, r) {
|
|
|
349
349
|
n[t][1].type === "attentionSequence" && (n[t][1].type = "data");
|
|
350
350
|
return n;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Qt(n, r) {
|
|
353
353
|
const t = this.parser.constructs.attentionMarkers.null, e = this.previous, u = Qn(e);
|
|
354
|
-
let
|
|
354
|
+
let l;
|
|
355
355
|
return i;
|
|
356
356
|
function i(c) {
|
|
357
|
-
return n.enter("attentionSequence"),
|
|
357
|
+
return n.enter("attentionSequence"), l = c, a(c);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
if (c ===
|
|
361
|
-
return n.consume(c),
|
|
359
|
+
function a(c) {
|
|
360
|
+
if (c === l)
|
|
361
|
+
return n.consume(c), a;
|
|
362
362
|
const p = n.exit("attentionSequence"), h = Qn(c), x = !h || h === 2 && u || t.includes(c), g = !u || u === 2 && h || t.includes(e);
|
|
363
|
-
return p._open = !!(
|
|
363
|
+
return p._open = !!(l === 42 ? x : x && (u || !g)), p._close = !!(l === 42 ? g : g && (h || !x)), r(c);
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
function Un(n, r) {
|
|
367
367
|
n.column += r, n.offset += r, n._bufferIndex += r;
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Ut = {
|
|
370
370
|
name: "autolink",
|
|
371
|
-
tokenize:
|
|
371
|
+
tokenize: Wt
|
|
372
372
|
};
|
|
373
|
-
function
|
|
373
|
+
function Wt(n, r, t) {
|
|
374
374
|
let e = 1;
|
|
375
375
|
return u;
|
|
376
376
|
function u(k) {
|
|
377
|
-
return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(k), n.exit("autolinkMarker"), n.enter("autolinkProtocol"),
|
|
377
|
+
return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(k), n.exit("autolinkMarker"), n.enter("autolinkProtocol"), l;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return tn(k) ? (n.consume(k), i) :
|
|
379
|
+
function l(k) {
|
|
380
|
+
return tn(k) ? (n.consume(k), i) : Vn(k) ? p(k) : t(k);
|
|
381
381
|
}
|
|
382
382
|
function i(k) {
|
|
383
|
-
return k === 43 || k === 45 || k === 46 || v(k) ?
|
|
383
|
+
return k === 43 || k === 45 || k === 46 || v(k) ? a(k) : p(k);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
return k === 58 ? (n.consume(k), c) : (k === 43 || k === 45 || k === 46 || v(k)) && e++ < 32 ? (n.consume(k),
|
|
385
|
+
function a(k) {
|
|
386
|
+
return k === 58 ? (n.consume(k), c) : (k === 43 || k === 45 || k === 46 || v(k)) && e++ < 32 ? (n.consume(k), a) : p(k);
|
|
387
387
|
}
|
|
388
388
|
function c(k) {
|
|
389
389
|
return k === 62 ? (n.exit("autolinkProtocol"), f(k)) : k === null || k === 32 || k === 60 || zn(k) ? t(k) : (n.consume(k), c);
|
|
390
390
|
}
|
|
391
391
|
function p(k) {
|
|
392
|
-
return k === 64 ? (n.consume(k), e = 0, h) :
|
|
392
|
+
return k === 64 ? (n.consume(k), e = 0, h) : Vn(k) ? (n.consume(k), p) : t(k);
|
|
393
393
|
}
|
|
394
394
|
function h(k) {
|
|
395
395
|
return v(k) ? x(k) : t(k);
|
|
@@ -405,61 +405,61 @@ function Ut(n, r, t) {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
const Sn = {
|
|
408
|
-
tokenize:
|
|
408
|
+
tokenize: $t,
|
|
409
409
|
partial: !0
|
|
410
410
|
};
|
|
411
|
-
function
|
|
412
|
-
return
|
|
411
|
+
function $t(n, r, t) {
|
|
412
|
+
return B(n, e, "linePrefix");
|
|
413
413
|
function e(u) {
|
|
414
414
|
return u === null || C(u) ? r(u) : t(u);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
const et = {
|
|
418
418
|
name: "blockQuote",
|
|
419
|
-
tokenize:
|
|
419
|
+
tokenize: Zt,
|
|
420
420
|
continuation: {
|
|
421
|
-
tokenize:
|
|
421
|
+
tokenize: Yt
|
|
422
422
|
},
|
|
423
|
-
exit:
|
|
423
|
+
exit: Gt
|
|
424
424
|
};
|
|
425
|
-
function
|
|
425
|
+
function Zt(n, r, t) {
|
|
426
426
|
const e = this;
|
|
427
427
|
return u;
|
|
428
428
|
function u(i) {
|
|
429
429
|
if (i === 62) {
|
|
430
|
-
const
|
|
431
|
-
return
|
|
430
|
+
const a = e.containerState;
|
|
431
|
+
return a.open || (n.enter("blockQuote", {
|
|
432
432
|
_container: !0
|
|
433
|
-
}),
|
|
433
|
+
}), a.open = !0), n.enter("blockQuotePrefix"), n.enter("blockQuoteMarker"), n.consume(i), n.exit("blockQuoteMarker"), l;
|
|
434
434
|
}
|
|
435
435
|
return t(i);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function l(i) {
|
|
438
438
|
return q(i) ? (n.enter("blockQuotePrefixWhitespace"), n.consume(i), n.exit("blockQuotePrefixWhitespace"), n.exit("blockQuotePrefix"), r) : (n.exit("blockQuotePrefix"), r(i));
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
return
|
|
441
|
+
function Yt(n, r, t) {
|
|
442
|
+
return B(
|
|
443
443
|
n,
|
|
444
444
|
n.attempt(et, r, t),
|
|
445
445
|
"linePrefix",
|
|
446
446
|
this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
447
447
|
);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Gt(n) {
|
|
450
450
|
n.exit("blockQuote");
|
|
451
451
|
}
|
|
452
452
|
const rt = {
|
|
453
453
|
name: "characterEscape",
|
|
454
|
-
tokenize:
|
|
454
|
+
tokenize: Jt
|
|
455
455
|
};
|
|
456
|
-
function
|
|
456
|
+
function Jt(n, r, t) {
|
|
457
457
|
return e;
|
|
458
|
-
function e(
|
|
459
|
-
return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(
|
|
458
|
+
function e(l) {
|
|
459
|
+
return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(l), n.exit("escapeMarker"), u;
|
|
460
460
|
}
|
|
461
|
-
function u(
|
|
462
|
-
return
|
|
461
|
+
function u(l) {
|
|
462
|
+
return Pt(l) ? (n.enter("characterEscapeValue"), n.consume(l), n.exit("characterEscapeValue"), n.exit("characterEscape"), r) : t(l);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
const Wn = document.createElement("i");
|
|
@@ -471,77 +471,77 @@ function Ln(n) {
|
|
|
471
471
|
}
|
|
472
472
|
const it = {
|
|
473
473
|
name: "characterReference",
|
|
474
|
-
tokenize:
|
|
474
|
+
tokenize: Kt
|
|
475
475
|
};
|
|
476
|
-
function
|
|
476
|
+
function Kt(n, r, t) {
|
|
477
477
|
const e = this;
|
|
478
|
-
let u = 0,
|
|
479
|
-
return
|
|
480
|
-
function
|
|
478
|
+
let u = 0, l, i;
|
|
479
|
+
return a;
|
|
480
|
+
function a(x) {
|
|
481
481
|
return n.enter("characterReference"), n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), c;
|
|
482
482
|
}
|
|
483
483
|
function c(x) {
|
|
484
|
-
return x === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(x), n.exit("characterReferenceMarkerNumeric"), p) : (n.enter("characterReferenceValue"),
|
|
484
|
+
return x === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(x), n.exit("characterReferenceMarkerNumeric"), p) : (n.enter("characterReferenceValue"), l = 31, i = v, h(x));
|
|
485
485
|
}
|
|
486
486
|
function p(x) {
|
|
487
|
-
return x === 88 || x === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(x), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"),
|
|
487
|
+
return x === 88 || x === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(x), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"), l = 6, i = Dt, h) : (n.enter("characterReferenceValue"), l = 7, i = An, h(x));
|
|
488
488
|
}
|
|
489
489
|
function h(x) {
|
|
490
490
|
let g;
|
|
491
|
-
return x === 59 && u ? (g = n.exit("characterReferenceValue"), i === v && !Ln(e.sliceSerialize(g)) ? t(x) : (n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), n.exit("characterReference"), r)) : i(x) && u++ <
|
|
491
|
+
return x === 59 && u ? (g = n.exit("characterReferenceValue"), i === v && !Ln(e.sliceSerialize(g)) ? t(x) : (n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), n.exit("characterReference"), r)) : i(x) && u++ < l ? (n.consume(x), h) : t(x);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
const $n = {
|
|
495
495
|
name: "codeFenced",
|
|
496
|
-
tokenize:
|
|
496
|
+
tokenize: Xt,
|
|
497
497
|
concrete: !0
|
|
498
498
|
};
|
|
499
|
-
function
|
|
499
|
+
function Xt(n, r, t) {
|
|
500
500
|
const e = this, u = {
|
|
501
|
-
tokenize:
|
|
501
|
+
tokenize: D,
|
|
502
502
|
partial: !0
|
|
503
|
-
},
|
|
504
|
-
tokenize:
|
|
503
|
+
}, l = {
|
|
504
|
+
tokenize: O,
|
|
505
505
|
partial: !0
|
|
506
|
-
}, i = this.events[this.events.length - 1],
|
|
506
|
+
}, i = this.events[this.events.length - 1], a = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0;
|
|
507
507
|
let c = 0, p;
|
|
508
508
|
return h;
|
|
509
509
|
function h(d) {
|
|
510
510
|
return n.enter("codeFenced"), n.enter("codeFencedFence"), n.enter("codeFencedFenceSequence"), p = d, x(d);
|
|
511
511
|
}
|
|
512
512
|
function x(d) {
|
|
513
|
-
return d === p ? (n.consume(d), c++, x) : (n.exit("codeFencedFenceSequence"), c < 3 ? t(d) :
|
|
513
|
+
return d === p ? (n.consume(d), c++, x) : (n.exit("codeFencedFenceSequence"), c < 3 ? t(d) : B(n, g, "whitespace")(d));
|
|
514
514
|
}
|
|
515
515
|
function g(d) {
|
|
516
|
-
return d === null || C(d) ?
|
|
516
|
+
return d === null || C(d) ? L(d) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", {
|
|
517
517
|
contentType: "string"
|
|
518
518
|
}), f(d));
|
|
519
519
|
}
|
|
520
520
|
function f(d) {
|
|
521
|
-
return d === null || Y(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"),
|
|
521
|
+
return d === null || Y(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), B(n, k, "whitespace")(d)) : d === 96 && d === p ? t(d) : (n.consume(d), f);
|
|
522
522
|
}
|
|
523
523
|
function k(d) {
|
|
524
|
-
return d === null || C(d) ?
|
|
524
|
+
return d === null || C(d) ? L(d) : (n.enter("codeFencedFenceMeta"), n.enter("chunkString", {
|
|
525
525
|
contentType: "string"
|
|
526
|
-
}),
|
|
526
|
+
}), A(d));
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
return d === null || C(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"),
|
|
528
|
+
function A(d) {
|
|
529
|
+
return d === null || C(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), L(d)) : d === 96 && d === p ? t(d) : (n.consume(d), A);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function L(d) {
|
|
532
532
|
return n.exit("codeFencedFence"), e.interrupt ? r(d) : y(d);
|
|
533
533
|
}
|
|
534
534
|
function y(d) {
|
|
535
535
|
return d === null ? F(d) : C(d) ? n.attempt(
|
|
536
|
-
|
|
536
|
+
l,
|
|
537
537
|
n.attempt(
|
|
538
538
|
u,
|
|
539
539
|
F,
|
|
540
|
-
|
|
540
|
+
a ? B(
|
|
541
541
|
n,
|
|
542
542
|
y,
|
|
543
543
|
"linePrefix",
|
|
544
|
-
|
|
544
|
+
a + 1
|
|
545
545
|
) : y
|
|
546
546
|
),
|
|
547
547
|
F
|
|
@@ -553,80 +553,80 @@ function Kt(n, r, t) {
|
|
|
553
553
|
function F(d) {
|
|
554
554
|
return n.exit("codeFenced"), r(d);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function O(d, P, R) {
|
|
557
557
|
const j = this;
|
|
558
|
-
return
|
|
559
|
-
function
|
|
558
|
+
return N;
|
|
559
|
+
function N(w) {
|
|
560
560
|
return d.enter("lineEnding"), d.consume(w), d.exit("lineEnding"), S;
|
|
561
561
|
}
|
|
562
562
|
function S(w) {
|
|
563
563
|
return j.parser.lazy[j.now().line] ? R(w) : P(w);
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function D(d, P, R) {
|
|
567
567
|
let j = 0;
|
|
568
|
-
return
|
|
568
|
+
return B(
|
|
569
569
|
d,
|
|
570
|
-
|
|
570
|
+
N,
|
|
571
571
|
"linePrefix",
|
|
572
572
|
this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
573
573
|
);
|
|
574
|
-
function
|
|
575
|
-
return d.enter("codeFencedFence"), d.enter("codeFencedFenceSequence"), S(
|
|
574
|
+
function N(z) {
|
|
575
|
+
return d.enter("codeFencedFence"), d.enter("codeFencedFenceSequence"), S(z);
|
|
576
576
|
}
|
|
577
|
-
function S(
|
|
578
|
-
return
|
|
577
|
+
function S(z) {
|
|
578
|
+
return z === p ? (d.consume(z), j++, S) : j < c ? R(z) : (d.exit("codeFencedFenceSequence"), B(d, w, "whitespace")(z));
|
|
579
579
|
}
|
|
580
|
-
function w(
|
|
581
|
-
return
|
|
580
|
+
function w(z) {
|
|
581
|
+
return z === null || C(z) ? (d.exit("codeFencedFence"), P(z)) : R(z);
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
const En = {
|
|
586
586
|
name: "codeIndented",
|
|
587
|
-
tokenize:
|
|
588
|
-
},
|
|
589
|
-
tokenize:
|
|
587
|
+
tokenize: ne
|
|
588
|
+
}, vt = {
|
|
589
|
+
tokenize: te,
|
|
590
590
|
partial: !0
|
|
591
591
|
};
|
|
592
|
-
function
|
|
592
|
+
function ne(n, r, t) {
|
|
593
593
|
const e = this;
|
|
594
594
|
return u;
|
|
595
595
|
function u(p) {
|
|
596
|
-
return n.enter("codeIndented"),
|
|
596
|
+
return n.enter("codeIndented"), B(n, l, "linePrefix", 4 + 1)(p);
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function l(p) {
|
|
599
599
|
const h = e.events[e.events.length - 1];
|
|
600
600
|
return h && h[1].type === "linePrefix" && h[2].sliceSerialize(h[1], !0).length >= 4 ? i(p) : t(p);
|
|
601
601
|
}
|
|
602
602
|
function i(p) {
|
|
603
|
-
return p === null ? c(p) : C(p) ? n.attempt(
|
|
603
|
+
return p === null ? c(p) : C(p) ? n.attempt(vt, i, c)(p) : (n.enter("codeFlowValue"), a(p));
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
return p === null || C(p) ? (n.exit("codeFlowValue"), i(p)) : (n.consume(p),
|
|
605
|
+
function a(p) {
|
|
606
|
+
return p === null || C(p) ? (n.exit("codeFlowValue"), i(p)) : (n.consume(p), a);
|
|
607
607
|
}
|
|
608
608
|
function c(p) {
|
|
609
609
|
return n.exit("codeIndented"), r(p);
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function te(n, r, t) {
|
|
613
613
|
const e = this;
|
|
614
614
|
return u;
|
|
615
615
|
function u(i) {
|
|
616
|
-
return e.parser.lazy[e.now().line] ? t(i) : C(i) ? (n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), u) :
|
|
616
|
+
return e.parser.lazy[e.now().line] ? t(i) : C(i) ? (n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), u) : B(n, l, "linePrefix", 4 + 1)(i);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
const
|
|
620
|
-
return
|
|
618
|
+
function l(i) {
|
|
619
|
+
const a = e.events[e.events.length - 1];
|
|
620
|
+
return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(i) : C(i) ? u(i) : t(i);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
const
|
|
623
|
+
const ee = {
|
|
624
624
|
name: "codeText",
|
|
625
|
-
tokenize:
|
|
626
|
-
resolve:
|
|
627
|
-
previous:
|
|
625
|
+
tokenize: ue,
|
|
626
|
+
resolve: re,
|
|
627
|
+
previous: ie
|
|
628
628
|
};
|
|
629
|
-
function
|
|
629
|
+
function re(n) {
|
|
630
630
|
let r = n.length - 4, t = 3, e, u;
|
|
631
631
|
if ((n[t][1].type === "lineEnding" || n[t][1].type === "space") && (n[r][1].type === "lineEnding" || n[r][1].type === "space")) {
|
|
632
632
|
for (e = t; ++e < r; )
|
|
@@ -639,63 +639,63 @@ function ee(n) {
|
|
|
639
639
|
u === void 0 ? e !== r && n[e][1].type !== "lineEnding" && (u = e) : (e === r || n[e][1].type === "lineEnding") && (n[u][1].type = "codeTextData", e !== u + 2 && (n[u][1].end = n[e - 1][1].end, n.splice(u + 2, e - u - 2), r -= e - u - 2, e = u + 2), u = void 0);
|
|
640
640
|
return n;
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function ie(n) {
|
|
643
643
|
return n !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
let e = 0, u,
|
|
645
|
+
function ue(n, r, t) {
|
|
646
|
+
let e = 0, u, l;
|
|
647
647
|
return i;
|
|
648
648
|
function i(x) {
|
|
649
|
-
return n.enter("codeText"), n.enter("codeTextSequence"),
|
|
649
|
+
return n.enter("codeText"), n.enter("codeTextSequence"), a(x);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
return x === 96 ? (n.consume(x), e++,
|
|
651
|
+
function a(x) {
|
|
652
|
+
return x === 96 ? (n.consume(x), e++, a) : (n.exit("codeTextSequence"), c(x));
|
|
653
653
|
}
|
|
654
654
|
function c(x) {
|
|
655
|
-
return x === null ? t(x) : x === 96 ? (
|
|
655
|
+
return x === null ? t(x) : x === 96 ? (l = n.enter("codeTextSequence"), u = 0, h(x)) : x === 32 ? (n.enter("space"), n.consume(x), n.exit("space"), c) : C(x) ? (n.enter("lineEnding"), n.consume(x), n.exit("lineEnding"), c) : (n.enter("codeTextData"), p(x));
|
|
656
656
|
}
|
|
657
657
|
function p(x) {
|
|
658
658
|
return x === null || x === 32 || x === 96 || C(x) ? (n.exit("codeTextData"), c(x)) : (n.consume(x), p);
|
|
659
659
|
}
|
|
660
660
|
function h(x) {
|
|
661
|
-
return x === 96 ? (n.consume(x), u++, h) : u === e ? (n.exit("codeTextSequence"), n.exit("codeText"), r(x)) : (
|
|
661
|
+
return x === 96 ? (n.consume(x), u++, h) : u === e ? (n.exit("codeTextSequence"), n.exit("codeText"), r(x)) : (l.type = "codeTextData", p(x));
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
function ut(n) {
|
|
665
665
|
const r = {};
|
|
666
|
-
let t = -1, e, u,
|
|
666
|
+
let t = -1, e, u, l, i, a, c, p;
|
|
667
667
|
for (; ++t < n.length; ) {
|
|
668
668
|
for (; t in r; )
|
|
669
669
|
t = r[t];
|
|
670
|
-
if (e = n[t], t && e[1].type === "chunkFlow" && n[t - 1][1].type === "listItemPrefix" && (c = e[1]._tokenizer.events,
|
|
671
|
-
for (; ++
|
|
672
|
-
c[
|
|
670
|
+
if (e = n[t], t && e[1].type === "chunkFlow" && n[t - 1][1].type === "listItemPrefix" && (c = e[1]._tokenizer.events, l = 0, l < c.length && c[l][1].type === "lineEndingBlank" && (l += 2), l < c.length && c[l][1].type === "content"))
|
|
671
|
+
for (; ++l < c.length && c[l][1].type !== "content"; )
|
|
672
|
+
c[l][1].type === "chunkText" && (c[l][1]._isInFirstContentOfListItem = !0, l++);
|
|
673
673
|
if (e[0] === "enter")
|
|
674
|
-
e[1].contentType && (Object.assign(r,
|
|
674
|
+
e[1].contentType && (Object.assign(r, le(n, t)), t = r[t], p = !0);
|
|
675
675
|
else if (e[1]._container) {
|
|
676
|
-
for (
|
|
677
|
-
i[0] === "enter" && (u && (n[u][1].type = "lineEndingBlank"), i[1].type = "lineEnding", u =
|
|
678
|
-
u && (e[1].end = Object.assign({}, n[u][1].start),
|
|
676
|
+
for (l = t, u = void 0; l-- && (i = n[l], i[1].type === "lineEnding" || i[1].type === "lineEndingBlank"); )
|
|
677
|
+
i[0] === "enter" && (u && (n[u][1].type = "lineEndingBlank"), i[1].type = "lineEnding", u = l);
|
|
678
|
+
u && (e[1].end = Object.assign({}, n[u][1].start), a = n.slice(u, t), a.unshift(e), en(n, u, t - u + 1, a));
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
return !p;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function le(n, r) {
|
|
684
684
|
const t = n[r][1], e = n[r][2];
|
|
685
685
|
let u = r - 1;
|
|
686
|
-
const
|
|
687
|
-
let h, x, g = -1, f = t, k = 0,
|
|
688
|
-
const
|
|
686
|
+
const l = [], i = t._tokenizer || e.parser[t.contentType](t.start), a = i.events, c = [], p = {};
|
|
687
|
+
let h, x, g = -1, f = t, k = 0, A = 0;
|
|
688
|
+
const L = [A];
|
|
689
689
|
for (; f; ) {
|
|
690
690
|
for (; n[++u][1] !== f; )
|
|
691
691
|
;
|
|
692
|
-
|
|
692
|
+
l.push(u), f._tokenizer || (h = e.sliceStream(f), f.next || h.push(null), x && i.defineSkip(f.start), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = !0), i.write(h), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = void 0)), x = f, f = f.next;
|
|
693
693
|
}
|
|
694
|
-
for (f = t; ++g <
|
|
694
|
+
for (f = t; ++g < a.length; )
|
|
695
695
|
// Find a void token that includes a break.
|
|
696
|
-
|
|
697
|
-
for (i.events = [], f ? (f._tokenizer = void 0, f.previous = void 0) :
|
|
698
|
-
const y =
|
|
696
|
+
a[g][0] === "exit" && a[g - 1][0] === "enter" && a[g][1].type === a[g - 1][1].type && a[g][1].start.line !== a[g][1].end.line && (A = g + 1, L.push(A), f._tokenizer = void 0, f.previous = void 0, f = f.next);
|
|
697
|
+
for (i.events = [], f ? (f._tokenizer = void 0, f.previous = void 0) : L.pop(), g = L.length; g--; ) {
|
|
698
|
+
const y = a.slice(L[g], L[g + 1]), _ = l.pop();
|
|
699
699
|
c.unshift([_, _ + y.length - 1]), en(n, _, 2, y);
|
|
700
700
|
}
|
|
701
701
|
for (g = -1; ++g < c.length; )
|
|
@@ -703,86 +703,86 @@ function ue(n, r) {
|
|
|
703
703
|
return p;
|
|
704
704
|
}
|
|
705
705
|
const ae = {
|
|
706
|
-
tokenize: se,
|
|
707
|
-
resolve: oe
|
|
708
|
-
}, le = {
|
|
709
706
|
tokenize: ce,
|
|
707
|
+
resolve: se
|
|
708
|
+
}, oe = {
|
|
709
|
+
tokenize: he,
|
|
710
710
|
partial: !0
|
|
711
711
|
};
|
|
712
|
-
function
|
|
712
|
+
function se(n) {
|
|
713
713
|
return ut(n), n;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function ce(n, r) {
|
|
716
716
|
let t;
|
|
717
717
|
return e;
|
|
718
|
-
function e(
|
|
718
|
+
function e(a) {
|
|
719
719
|
return n.enter("content"), t = n.enter("chunkContent", {
|
|
720
720
|
contentType: "content"
|
|
721
|
-
}), u(
|
|
721
|
+
}), u(a);
|
|
722
722
|
}
|
|
723
|
-
function u(
|
|
724
|
-
return
|
|
725
|
-
|
|
723
|
+
function u(a) {
|
|
724
|
+
return a === null ? l(a) : C(a) ? n.check(
|
|
725
|
+
oe,
|
|
726
726
|
i,
|
|
727
|
-
|
|
728
|
-
)(
|
|
727
|
+
l
|
|
728
|
+
)(a) : (n.consume(a), u);
|
|
729
729
|
}
|
|
730
|
-
function a
|
|
731
|
-
return n.exit("chunkContent"), n.exit("content"), r(
|
|
730
|
+
function l(a) {
|
|
731
|
+
return n.exit("chunkContent"), n.exit("content"), r(a);
|
|
732
732
|
}
|
|
733
|
-
function i(
|
|
734
|
-
return n.consume(
|
|
733
|
+
function i(a) {
|
|
734
|
+
return n.consume(a), n.exit("chunkContent"), t.next = n.enter("chunkContent", {
|
|
735
735
|
contentType: "content",
|
|
736
736
|
previous: t
|
|
737
737
|
}), t = t.next, u;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function he(n, r, t) {
|
|
741
741
|
const e = this;
|
|
742
742
|
return u;
|
|
743
743
|
function u(i) {
|
|
744
|
-
return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"),
|
|
744
|
+
return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), B(n, l, "linePrefix");
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function l(i) {
|
|
747
747
|
if (i === null || C(i))
|
|
748
748
|
return t(i);
|
|
749
|
-
const
|
|
750
|
-
return !e.parser.constructs.disable.null.includes("codeIndented") &&
|
|
749
|
+
const a = e.events[e.events.length - 1];
|
|
750
|
+
return !e.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(i) : n.interrupt(e.parser.constructs.flow, t, r)(i);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function lt(n, r, t, e, u, l, i, a, c) {
|
|
754
754
|
const p = c || Number.POSITIVE_INFINITY;
|
|
755
755
|
let h = 0;
|
|
756
756
|
return x;
|
|
757
757
|
function x(y) {
|
|
758
|
-
return y === 60 ? (n.enter(e), n.enter(u), n.enter(
|
|
758
|
+
return y === 60 ? (n.enter(e), n.enter(u), n.enter(l), n.consume(y), n.exit(l), g) : y === null || y === 41 || zn(y) ? t(y) : (n.enter(e), n.enter(i), n.enter(a), n.enter("chunkString", {
|
|
759
759
|
contentType: "string"
|
|
760
|
-
}),
|
|
760
|
+
}), A(y));
|
|
761
761
|
}
|
|
762
762
|
function g(y) {
|
|
763
|
-
return y === 62 ? (n.enter(
|
|
763
|
+
return y === 62 ? (n.enter(l), n.consume(y), n.exit(l), n.exit(u), n.exit(e), r) : (n.enter(a), n.enter("chunkString", {
|
|
764
764
|
contentType: "string"
|
|
765
765
|
}), f(y));
|
|
766
766
|
}
|
|
767
767
|
function f(y) {
|
|
768
|
-
return y === 62 ? (n.exit("chunkString"), n.exit(
|
|
768
|
+
return y === 62 ? (n.exit("chunkString"), n.exit(a), g(y)) : y === null || y === 60 || C(y) ? t(y) : (n.consume(y), y === 92 ? k : f);
|
|
769
769
|
}
|
|
770
770
|
function k(y) {
|
|
771
771
|
return y === 60 || y === 62 || y === 92 ? (n.consume(y), f) : f(y);
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
return y === 40 ? ++h > p ? t(y) : (n.consume(y),
|
|
773
|
+
function A(y) {
|
|
774
|
+
return y === 40 ? ++h > p ? t(y) : (n.consume(y), A) : y === 41 ? h-- ? (n.consume(y), A) : (n.exit("chunkString"), n.exit(a), n.exit(i), n.exit(e), r(y)) : y === null || Y(y) ? h ? t(y) : (n.exit("chunkString"), n.exit(a), n.exit(i), n.exit(e), r(y)) : zn(y) ? t(y) : (n.consume(y), y === 92 ? L : A);
|
|
775
775
|
}
|
|
776
|
-
function
|
|
777
|
-
return y === 40 || y === 41 || y === 92 ? (n.consume(y),
|
|
776
|
+
function L(y) {
|
|
777
|
+
return y === 40 || y === 41 || y === 92 ? (n.consume(y), A) : A(y);
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function at(n, r, t, e, u, l) {
|
|
781
781
|
const i = this;
|
|
782
|
-
let
|
|
782
|
+
let a = 0, c;
|
|
783
783
|
return p;
|
|
784
784
|
function p(f) {
|
|
785
|
-
return n.enter(e), n.enter(u), n.consume(f), n.exit(u), n.enter(
|
|
785
|
+
return n.enter(e), n.enter(u), n.consume(f), n.exit(u), n.enter(l), h;
|
|
786
786
|
}
|
|
787
787
|
function h(f) {
|
|
788
788
|
return f === null || f === 91 || f === 93 && !c || /* To do: remove in the future once we’ve switched from
|
|
@@ -790,28 +790,28 @@ function lt(n, r, t, e, u, a) {
|
|
|
790
790
|
* which doesn’t need this */
|
|
791
791
|
/* Hidden footnotes hook */
|
|
792
792
|
/* c8 ignore next 3 */
|
|
793
|
-
f === 94 && !
|
|
793
|
+
f === 94 && !a && "_hiddenFootnoteSupport" in i.parser.constructs || a > 999 ? t(f) : f === 93 ? (n.exit(l), n.enter(u), n.consume(f), n.exit(u), n.exit(e), r) : C(f) ? (n.enter("lineEnding"), n.consume(f), n.exit("lineEnding"), h) : (n.enter("chunkString", {
|
|
794
794
|
contentType: "string"
|
|
795
795
|
}), x(f));
|
|
796
796
|
}
|
|
797
797
|
function x(f) {
|
|
798
|
-
return f === null || f === 91 || f === 93 || C(f) ||
|
|
798
|
+
return f === null || f === 91 || f === 93 || C(f) || a++ > 999 ? (n.exit("chunkString"), h(f)) : (n.consume(f), c = c || !q(f), f === 92 ? g : x);
|
|
799
799
|
}
|
|
800
800
|
function g(f) {
|
|
801
|
-
return f === 91 || f === 92 || f === 93 ? (n.consume(f),
|
|
801
|
+
return f === 91 || f === 92 || f === 93 ? (n.consume(f), a++, x) : x(f);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
function ot(n, r, t, e, u,
|
|
804
|
+
function ot(n, r, t, e, u, l) {
|
|
805
805
|
let i;
|
|
806
|
-
return
|
|
807
|
-
function
|
|
806
|
+
return a;
|
|
807
|
+
function a(g) {
|
|
808
808
|
return n.enter(e), n.enter(u), n.consume(g), n.exit(u), i = g === 40 ? 41 : g, c;
|
|
809
809
|
}
|
|
810
810
|
function c(g) {
|
|
811
|
-
return g === i ? (n.enter(u), n.consume(g), n.exit(u), n.exit(e), r) : (n.enter(
|
|
811
|
+
return g === i ? (n.enter(u), n.consume(g), n.exit(u), n.exit(e), r) : (n.enter(l), p(g));
|
|
812
812
|
}
|
|
813
813
|
function p(g) {
|
|
814
|
-
return g === i ? (n.exit(
|
|
814
|
+
return g === i ? (n.exit(l), c(i)) : g === null ? t(g) : C(g) ? (n.enter("lineEnding"), n.consume(g), n.exit("lineEnding"), B(n, p, "linePrefix")) : (n.enter("chunkString", {
|
|
815
815
|
contentType: "string"
|
|
816
816
|
}), h(g));
|
|
817
817
|
}
|
|
@@ -826,7 +826,7 @@ function dn(n, r) {
|
|
|
826
826
|
let t;
|
|
827
827
|
return e;
|
|
828
828
|
function e(u) {
|
|
829
|
-
return C(u) ? (n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), t = !0, e) : q(u) ?
|
|
829
|
+
return C(u) ? (n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), t = !0, e) : q(u) ? B(
|
|
830
830
|
n,
|
|
831
831
|
e,
|
|
832
832
|
t ? "linePrefix" : "lineSuffix"
|
|
@@ -836,19 +836,19 @@ function dn(n, r) {
|
|
|
836
836
|
function fn(n) {
|
|
837
837
|
return n.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
838
838
|
}
|
|
839
|
-
const
|
|
839
|
+
const pe = {
|
|
840
840
|
name: "definition",
|
|
841
|
-
tokenize:
|
|
842
|
-
},
|
|
843
|
-
tokenize:
|
|
841
|
+
tokenize: fe
|
|
842
|
+
}, me = {
|
|
843
|
+
tokenize: xe,
|
|
844
844
|
partial: !0
|
|
845
845
|
};
|
|
846
|
-
function
|
|
846
|
+
function fe(n, r, t) {
|
|
847
847
|
const e = this;
|
|
848
848
|
let u;
|
|
849
|
-
return
|
|
850
|
-
function
|
|
851
|
-
return n.enter("definition"),
|
|
849
|
+
return l;
|
|
850
|
+
function l(c) {
|
|
851
|
+
return n.enter("definition"), at.call(
|
|
852
852
|
e,
|
|
853
853
|
n,
|
|
854
854
|
i,
|
|
@@ -863,12 +863,12 @@ function me(n, r, t) {
|
|
|
863
863
|
e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1)
|
|
864
864
|
), c === 58 ? (n.enter("definitionMarker"), n.consume(c), n.exit("definitionMarker"), dn(
|
|
865
865
|
n,
|
|
866
|
-
|
|
866
|
+
lt(
|
|
867
867
|
n,
|
|
868
868
|
n.attempt(
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
869
|
+
me,
|
|
870
|
+
B(n, a, "whitespace"),
|
|
871
|
+
B(n, a, "whitespace")
|
|
872
872
|
),
|
|
873
873
|
t,
|
|
874
874
|
"definitionDestination",
|
|
@@ -879,11 +879,11 @@ function me(n, r, t) {
|
|
|
879
879
|
)
|
|
880
880
|
)) : t(c);
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function a(c) {
|
|
883
883
|
return c === null || C(c) ? (n.exit("definition"), e.parser.defined.includes(u) || e.parser.defined.push(u), r(c)) : t(c);
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function xe(n, r, t) {
|
|
887
887
|
return e;
|
|
888
888
|
function e(i) {
|
|
889
889
|
return Y(i) ? dn(n, u)(i) : t(i);
|
|
@@ -891,42 +891,42 @@ function fe(n, r, t) {
|
|
|
891
891
|
function u(i) {
|
|
892
892
|
return i === 34 || i === 39 || i === 40 ? ot(
|
|
893
893
|
n,
|
|
894
|
-
|
|
894
|
+
B(n, l, "whitespace"),
|
|
895
895
|
t,
|
|
896
896
|
"definitionTitle",
|
|
897
897
|
"definitionTitleMarker",
|
|
898
898
|
"definitionTitleString"
|
|
899
899
|
)(i) : t(i);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function l(i) {
|
|
902
902
|
return i === null || C(i) ? r(i) : t(i);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const ge = {
|
|
906
906
|
name: "hardBreakEscape",
|
|
907
|
-
tokenize:
|
|
907
|
+
tokenize: ke
|
|
908
908
|
};
|
|
909
|
-
function
|
|
909
|
+
function ke(n, r, t) {
|
|
910
910
|
return e;
|
|
911
|
-
function e(
|
|
912
|
-
return n.enter("hardBreakEscape"), n.enter("escapeMarker"), n.consume(
|
|
911
|
+
function e(l) {
|
|
912
|
+
return n.enter("hardBreakEscape"), n.enter("escapeMarker"), n.consume(l), u;
|
|
913
913
|
}
|
|
914
|
-
function u(
|
|
915
|
-
return C(
|
|
914
|
+
function u(l) {
|
|
915
|
+
return C(l) ? (n.exit("escapeMarker"), n.exit("hardBreakEscape"), r(l)) : t(l);
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
const
|
|
918
|
+
const de = {
|
|
919
919
|
name: "headingAtx",
|
|
920
|
-
tokenize:
|
|
921
|
-
resolve:
|
|
920
|
+
tokenize: ye,
|
|
921
|
+
resolve: be
|
|
922
922
|
};
|
|
923
|
-
function
|
|
924
|
-
let t = n.length - 2, e = 3, u,
|
|
923
|
+
function be(n, r) {
|
|
924
|
+
let t = n.length - 2, e = 3, u, l;
|
|
925
925
|
return n[e][1].type === "whitespace" && (e += 2), t - 2 > e && n[t][1].type === "whitespace" && (t -= 2), n[t][1].type === "atxHeadingSequence" && (e === t - 1 || t - 4 > e && n[t - 2][1].type === "whitespace") && (t -= e + 1 === t ? 2 : 4), t > e && (u = {
|
|
926
926
|
type: "atxHeadingText",
|
|
927
927
|
start: n[e][1].start,
|
|
928
928
|
end: n[t][1].end
|
|
929
|
-
},
|
|
929
|
+
}, l = {
|
|
930
930
|
type: "chunkText",
|
|
931
931
|
start: n[e][1].start,
|
|
932
932
|
end: n[t][1].end,
|
|
@@ -934,32 +934,32 @@ function de(n, r) {
|
|
|
934
934
|
contentType: "text"
|
|
935
935
|
}, en(n, e, t - e + 1, [
|
|
936
936
|
["enter", u, r],
|
|
937
|
-
["enter",
|
|
938
|
-
["exit",
|
|
937
|
+
["enter", l, r],
|
|
938
|
+
["exit", l, r],
|
|
939
939
|
["exit", u, r]
|
|
940
940
|
])), n;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ye(n, r, t) {
|
|
943
943
|
const e = this;
|
|
944
944
|
let u = 0;
|
|
945
|
-
return
|
|
946
|
-
function
|
|
945
|
+
return l;
|
|
946
|
+
function l(h) {
|
|
947
947
|
return n.enter("atxHeading"), n.enter("atxHeadingSequence"), i(h);
|
|
948
948
|
}
|
|
949
949
|
function i(h) {
|
|
950
|
-
return h === 35 && u++ < 6 ? (n.consume(h), i) : h === null || Y(h) ? (n.exit("atxHeadingSequence"), e.interrupt ? r(h) :
|
|
950
|
+
return h === 35 && u++ < 6 ? (n.consume(h), i) : h === null || Y(h) ? (n.exit("atxHeadingSequence"), e.interrupt ? r(h) : a(h)) : t(h);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return h === 35 ? (n.enter("atxHeadingSequence"), c(h)) : h === null || C(h) ? (n.exit("atxHeading"), r(h)) : q(h) ?
|
|
952
|
+
function a(h) {
|
|
953
|
+
return h === 35 ? (n.enter("atxHeadingSequence"), c(h)) : h === null || C(h) ? (n.exit("atxHeading"), r(h)) : q(h) ? B(n, a, "whitespace")(h) : (n.enter("atxHeadingText"), p(h));
|
|
954
954
|
}
|
|
955
955
|
function c(h) {
|
|
956
|
-
return h === 35 ? (n.consume(h), c) : (n.exit("atxHeadingSequence"),
|
|
956
|
+
return h === 35 ? (n.consume(h), c) : (n.exit("atxHeadingSequence"), a(h));
|
|
957
957
|
}
|
|
958
958
|
function p(h) {
|
|
959
|
-
return h === null || h === 35 || Y(h) ? (n.exit("atxHeadingText"),
|
|
959
|
+
return h === null || h === 35 || Y(h) ? (n.exit("atxHeadingText"), a(h)) : (n.consume(h), p);
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
const
|
|
962
|
+
const Se = [
|
|
963
963
|
"address",
|
|
964
964
|
"article",
|
|
965
965
|
"aside",
|
|
@@ -1021,47 +1021,47 @@ const ye = [
|
|
|
1021
1021
|
"tr",
|
|
1022
1022
|
"track",
|
|
1023
1023
|
"ul"
|
|
1024
|
-
], Zn = ["pre", "script", "style", "textarea"],
|
|
1024
|
+
], Zn = ["pre", "script", "style", "textarea"], Fe = {
|
|
1025
1025
|
name: "htmlFlow",
|
|
1026
|
-
tokenize: Ee,
|
|
1027
|
-
resolveTo: we,
|
|
1028
|
-
concrete: !0
|
|
1029
|
-
}, Fe = {
|
|
1030
1026
|
tokenize: Ce,
|
|
1027
|
+
resolveTo: Ee,
|
|
1028
|
+
concrete: !0
|
|
1029
|
+
}, we = {
|
|
1030
|
+
tokenize: Ae,
|
|
1031
1031
|
partial: !0
|
|
1032
1032
|
};
|
|
1033
|
-
function
|
|
1033
|
+
function Ee(n) {
|
|
1034
1034
|
let r = n.length;
|
|
1035
1035
|
for (; r-- && !(n[r][0] === "enter" && n[r][1].type === "htmlFlow"); )
|
|
1036
1036
|
;
|
|
1037
1037
|
return r > 1 && n[r - 2][1].type === "linePrefix" && (n[r][1].start = n[r - 2][1].start, n[r + 1][1].start = n[r - 2][1].start, n.splice(r - 2, 2)), n;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function Ce(n, r, t) {
|
|
1040
1040
|
const e = this;
|
|
1041
|
-
let u,
|
|
1041
|
+
let u, l, i, a, c;
|
|
1042
1042
|
return p;
|
|
1043
1043
|
function p(o) {
|
|
1044
1044
|
return n.enter("htmlFlow"), n.enter("htmlFlowData"), n.consume(o), h;
|
|
1045
1045
|
}
|
|
1046
1046
|
function h(o) {
|
|
1047
|
-
return o === 33 ? (n.consume(o), x) : o === 47 ? (n.consume(o), k) : o === 63 ? (n.consume(o), u = 3, e.interrupt ? r : W) : tn(o) ? (n.consume(o), i = String.fromCharCode(o),
|
|
1047
|
+
return o === 33 ? (n.consume(o), x) : o === 47 ? (n.consume(o), k) : o === 63 ? (n.consume(o), u = 3, e.interrupt ? r : W) : tn(o) ? (n.consume(o), i = String.fromCharCode(o), l = !0, A) : t(o);
|
|
1048
1048
|
}
|
|
1049
1049
|
function x(o) {
|
|
1050
|
-
return o === 45 ? (n.consume(o), u = 2, g) : o === 91 ? (n.consume(o), u = 5, i = "CDATA[",
|
|
1050
|
+
return o === 45 ? (n.consume(o), u = 2, g) : o === 91 ? (n.consume(o), u = 5, i = "CDATA[", a = 0, f) : tn(o) ? (n.consume(o), u = 4, e.interrupt ? r : W) : t(o);
|
|
1051
1051
|
}
|
|
1052
1052
|
function g(o) {
|
|
1053
1053
|
return o === 45 ? (n.consume(o), e.interrupt ? r : W) : t(o);
|
|
1054
1054
|
}
|
|
1055
1055
|
function f(o) {
|
|
1056
|
-
return o === i.charCodeAt(
|
|
1056
|
+
return o === i.charCodeAt(a++) ? (n.consume(o), a === i.length ? e.interrupt ? r : S : f) : t(o);
|
|
1057
1057
|
}
|
|
1058
1058
|
function k(o) {
|
|
1059
|
-
return tn(o) ? (n.consume(o), i = String.fromCharCode(o),
|
|
1059
|
+
return tn(o) ? (n.consume(o), i = String.fromCharCode(o), A) : t(o);
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return o === null || o === 47 || o === 62 || Y(o) ? o !== 47 &&
|
|
1061
|
+
function A(o) {
|
|
1062
|
+
return o === null || o === 47 || o === 62 || Y(o) ? o !== 47 && l && Zn.includes(i.toLowerCase()) ? (u = 1, e.interrupt ? r(o) : S(o)) : Se.includes(i.toLowerCase()) ? (u = 6, o === 47 ? (n.consume(o), L) : e.interrupt ? r(o) : S(o)) : (u = 7, e.interrupt && !e.parser.lazy[e.now().line] ? t(o) : l ? _(o) : y(o)) : o === 45 || v(o) ? (n.consume(o), i += String.fromCharCode(o), A) : t(o);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function L(o) {
|
|
1065
1065
|
return o === 62 ? (n.consume(o), e.interrupt ? r : S) : t(o);
|
|
1066
1066
|
}
|
|
1067
1067
|
function y(o) {
|
|
@@ -1071,55 +1071,55 @@ function Ee(n, r, t) {
|
|
|
1071
1071
|
return o === 47 ? (n.consume(o), j) : o === 58 || o === 95 || tn(o) ? (n.consume(o), F) : q(o) ? (n.consume(o), _) : j(o);
|
|
1072
1072
|
}
|
|
1073
1073
|
function F(o) {
|
|
1074
|
-
return o === 45 || o === 46 || o === 58 || o === 95 || v(o) ? (n.consume(o), F) :
|
|
1075
|
-
}
|
|
1076
|
-
function L(o) {
|
|
1077
|
-
return o === 61 ? (n.consume(o), O) : q(o) ? (n.consume(o), L) : _(o);
|
|
1074
|
+
return o === 45 || o === 46 || o === 58 || o === 95 || v(o) ? (n.consume(o), F) : O(o);
|
|
1078
1075
|
}
|
|
1079
1076
|
function O(o) {
|
|
1080
|
-
return o ===
|
|
1077
|
+
return o === 61 ? (n.consume(o), D) : q(o) ? (n.consume(o), O) : _(o);
|
|
1078
|
+
}
|
|
1079
|
+
function D(o) {
|
|
1080
|
+
return o === null || o === 60 || o === 61 || o === 62 || o === 96 ? t(o) : o === 34 || o === 39 ? (n.consume(o), c = o, d) : q(o) ? (n.consume(o), D) : (c = null, P(o));
|
|
1081
1081
|
}
|
|
1082
1082
|
function d(o) {
|
|
1083
1083
|
return o === null || C(o) ? t(o) : o === c ? (n.consume(o), R) : (n.consume(o), d);
|
|
1084
1084
|
}
|
|
1085
1085
|
function P(o) {
|
|
1086
|
-
return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 62 || o === 96 || Y(o) ?
|
|
1086
|
+
return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 62 || o === 96 || Y(o) ? O(o) : (n.consume(o), P);
|
|
1087
1087
|
}
|
|
1088
1088
|
function R(o) {
|
|
1089
1089
|
return o === 47 || o === 62 || q(o) ? _(o) : t(o);
|
|
1090
1090
|
}
|
|
1091
1091
|
function j(o) {
|
|
1092
|
-
return o === 62 ? (n.consume(o),
|
|
1092
|
+
return o === 62 ? (n.consume(o), N) : t(o);
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return q(o) ? (n.consume(o),
|
|
1094
|
+
function N(o) {
|
|
1095
|
+
return q(o) ? (n.consume(o), N) : o === null || C(o) ? S(o) : t(o);
|
|
1096
1096
|
}
|
|
1097
1097
|
function S(o) {
|
|
1098
1098
|
return o === 45 && u === 2 ? (n.consume(o), G) : o === 60 && u === 1 ? (n.consume(o), nn) : o === 62 && u === 4 ? (n.consume(o), H) : o === 63 && u === 3 ? (n.consume(o), W) : o === 93 && u === 5 ? (n.consume(o), Q) : C(o) && (u === 6 || u === 7) ? n.check(
|
|
1099
|
-
|
|
1099
|
+
we,
|
|
1100
1100
|
H,
|
|
1101
1101
|
w
|
|
1102
1102
|
)(o) : o === null || C(o) ? w(o) : (n.consume(o), S);
|
|
1103
1103
|
}
|
|
1104
1104
|
function w(o) {
|
|
1105
|
-
return n.exit("htmlFlowData"),
|
|
1105
|
+
return n.exit("htmlFlowData"), z(o);
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function z(o) {
|
|
1108
1108
|
return o === null ? s(o) : C(o) ? n.attempt(
|
|
1109
1109
|
{
|
|
1110
1110
|
tokenize: U,
|
|
1111
1111
|
partial: !0
|
|
1112
1112
|
},
|
|
1113
|
-
|
|
1113
|
+
z,
|
|
1114
1114
|
s
|
|
1115
1115
|
)(o) : (n.enter("htmlFlowData"), S(o));
|
|
1116
1116
|
}
|
|
1117
1117
|
function U(o, cn, xn) {
|
|
1118
1118
|
return hn;
|
|
1119
1119
|
function hn(K) {
|
|
1120
|
-
return o.enter("lineEnding"), o.consume(K), o.exit("lineEnding"),
|
|
1120
|
+
return o.enter("lineEnding"), o.consume(K), o.exit("lineEnding"), V;
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function V(K) {
|
|
1123
1123
|
return e.parser.lazy[e.now().line] ? xn(K) : cn(K);
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
@@ -1145,28 +1145,28 @@ function Ee(n, r, t) {
|
|
|
1145
1145
|
return n.exit("htmlFlow"), r(o);
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function Ae(n, r, t) {
|
|
1149
1149
|
return e;
|
|
1150
1150
|
function e(u) {
|
|
1151
1151
|
return n.exit("htmlFlowData"), n.enter("lineEndingBlank"), n.consume(u), n.exit("lineEndingBlank"), n.attempt(Sn, r, t);
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
const
|
|
1154
|
+
const ze = {
|
|
1155
1155
|
name: "htmlText",
|
|
1156
|
-
tokenize:
|
|
1156
|
+
tokenize: Ie
|
|
1157
1157
|
};
|
|
1158
|
-
function
|
|
1158
|
+
function Ie(n, r, t) {
|
|
1159
1159
|
const e = this;
|
|
1160
|
-
let u,
|
|
1160
|
+
let u, l, i, a;
|
|
1161
1161
|
return c;
|
|
1162
1162
|
function c(s) {
|
|
1163
1163
|
return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(s), p;
|
|
1164
1164
|
}
|
|
1165
1165
|
function p(s) {
|
|
1166
|
-
return s === 33 ? (n.consume(s), h) : s === 47 ? (n.consume(s), P) : s === 63 ? (n.consume(s),
|
|
1166
|
+
return s === 33 ? (n.consume(s), h) : s === 47 ? (n.consume(s), P) : s === 63 ? (n.consume(s), D) : tn(s) ? (n.consume(s), N) : t(s);
|
|
1167
1167
|
}
|
|
1168
1168
|
function h(s) {
|
|
1169
|
-
return s === 45 ? (n.consume(s), x) : s === 91 ? (n.consume(s),
|
|
1169
|
+
return s === 45 ? (n.consume(s), x) : s === 91 ? (n.consume(s), l = "CDATA[", i = 0, L) : tn(s) ? (n.consume(s), O) : t(s);
|
|
1170
1170
|
}
|
|
1171
1171
|
function x(s) {
|
|
1172
1172
|
return s === 45 ? (n.consume(s), g) : t(s);
|
|
@@ -1178,16 +1178,16 @@ function ze(n, r, t) {
|
|
|
1178
1178
|
return s === null || s === 62 ? t(s) : k(s);
|
|
1179
1179
|
}
|
|
1180
1180
|
function k(s) {
|
|
1181
|
-
return s === null ? t(s) : s === 45 ? (n.consume(s),
|
|
1181
|
+
return s === null ? t(s) : s === 45 ? (n.consume(s), A) : C(s) ? (a = k, Q(s)) : (n.consume(s), k);
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function A(s) {
|
|
1184
1184
|
return s === 45 ? (n.consume(s), H) : k(s);
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1187
|
-
return s ===
|
|
1186
|
+
function L(s) {
|
|
1187
|
+
return s === l.charCodeAt(i++) ? (n.consume(s), i === l.length ? y : L) : t(s);
|
|
1188
1188
|
}
|
|
1189
1189
|
function y(s) {
|
|
1190
|
-
return s === null ? t(s) : s === 93 ? (n.consume(s), _) : C(s) ? (
|
|
1190
|
+
return s === null ? t(s) : s === 93 ? (n.consume(s), _) : C(s) ? (a = y, Q(s)) : (n.consume(s), y);
|
|
1191
1191
|
}
|
|
1192
1192
|
function _(s) {
|
|
1193
1193
|
return s === 93 ? (n.consume(s), F) : y(s);
|
|
@@ -1195,14 +1195,14 @@ function ze(n, r, t) {
|
|
|
1195
1195
|
function F(s) {
|
|
1196
1196
|
return s === 62 ? H(s) : s === 93 ? (n.consume(s), F) : y(s);
|
|
1197
1197
|
}
|
|
1198
|
-
function L(s) {
|
|
1199
|
-
return s === null || s === 62 ? H(s) : C(s) ? (l = L, Q(s)) : (n.consume(s), L);
|
|
1200
|
-
}
|
|
1201
1198
|
function O(s) {
|
|
1202
|
-
return s === null
|
|
1199
|
+
return s === null || s === 62 ? H(s) : C(s) ? (a = O, Q(s)) : (n.consume(s), O);
|
|
1200
|
+
}
|
|
1201
|
+
function D(s) {
|
|
1202
|
+
return s === null ? t(s) : s === 63 ? (n.consume(s), d) : C(s) ? (a = D, Q(s)) : (n.consume(s), D);
|
|
1203
1203
|
}
|
|
1204
1204
|
function d(s) {
|
|
1205
|
-
return s === 62 ? H(s) :
|
|
1205
|
+
return s === 62 ? H(s) : D(s);
|
|
1206
1206
|
}
|
|
1207
1207
|
function P(s) {
|
|
1208
1208
|
return tn(s) ? (n.consume(s), R) : t(s);
|
|
@@ -1211,25 +1211,25 @@ function ze(n, r, t) {
|
|
|
1211
1211
|
return s === 45 || v(s) ? (n.consume(s), R) : j(s);
|
|
1212
1212
|
}
|
|
1213
1213
|
function j(s) {
|
|
1214
|
-
return C(s) ? (
|
|
1214
|
+
return C(s) ? (a = j, Q(s)) : q(s) ? (n.consume(s), j) : H(s);
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1217
|
-
return s === 45 || v(s) ? (n.consume(s),
|
|
1216
|
+
function N(s) {
|
|
1217
|
+
return s === 45 || v(s) ? (n.consume(s), N) : s === 47 || s === 62 || Y(s) ? S(s) : t(s);
|
|
1218
1218
|
}
|
|
1219
1219
|
function S(s) {
|
|
1220
|
-
return s === 47 ? (n.consume(s), H) : s === 58 || s === 95 || tn(s) ? (n.consume(s), w) : C(s) ? (
|
|
1220
|
+
return s === 47 ? (n.consume(s), H) : s === 58 || s === 95 || tn(s) ? (n.consume(s), w) : C(s) ? (a = S, Q(s)) : q(s) ? (n.consume(s), S) : H(s);
|
|
1221
1221
|
}
|
|
1222
1222
|
function w(s) {
|
|
1223
|
-
return s === 45 || s === 46 || s === 58 || s === 95 || v(s) ? (n.consume(s), w) :
|
|
1223
|
+
return s === 45 || s === 46 || s === 58 || s === 95 || v(s) ? (n.consume(s), w) : z(s);
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1226
|
-
return s === 61 ? (n.consume(s), U) : C(s) ? (
|
|
1225
|
+
function z(s) {
|
|
1226
|
+
return s === 61 ? (n.consume(s), U) : C(s) ? (a = z, Q(s)) : q(s) ? (n.consume(s), z) : S(s);
|
|
1227
1227
|
}
|
|
1228
1228
|
function U(s) {
|
|
1229
|
-
return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), u = s, G) : C(s) ? (
|
|
1229
|
+
return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), u = s, G) : C(s) ? (a = U, Q(s)) : q(s) ? (n.consume(s), U) : (n.consume(s), u = void 0, J);
|
|
1230
1230
|
}
|
|
1231
1231
|
function G(s) {
|
|
1232
|
-
return s === u ? (n.consume(s), nn) : s === null ? t(s) : C(s) ? (
|
|
1232
|
+
return s === u ? (n.consume(s), nn) : s === null ? t(s) : C(s) ? (a = G, Q(s)) : (n.consume(s), G);
|
|
1233
1233
|
}
|
|
1234
1234
|
function nn(s) {
|
|
1235
1235
|
return s === 62 || s === 47 || Y(s) ? S(s) : t(s);
|
|
@@ -1238,7 +1238,7 @@ function ze(n, r, t) {
|
|
|
1238
1238
|
return s === null || s === 34 || s === 39 || s === 60 || s === 61 || s === 96 ? t(s) : s === 62 || Y(s) ? S(s) : (n.consume(s), J);
|
|
1239
1239
|
}
|
|
1240
1240
|
function Q(s) {
|
|
1241
|
-
return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(s), n.exit("lineEnding"),
|
|
1241
|
+
return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(s), n.exit("lineEnding"), B(
|
|
1242
1242
|
n,
|
|
1243
1243
|
W,
|
|
1244
1244
|
"linePrefix",
|
|
@@ -1246,7 +1246,7 @@ function ze(n, r, t) {
|
|
|
1246
1246
|
);
|
|
1247
1247
|
}
|
|
1248
1248
|
function W(s) {
|
|
1249
|
-
return n.enter("htmlTextData"),
|
|
1249
|
+
return n.enter("htmlTextData"), a(s);
|
|
1250
1250
|
}
|
|
1251
1251
|
function H(s) {
|
|
1252
1252
|
return s === 62 ? (n.consume(s), n.exit("htmlTextData"), n.exit("htmlText"), r) : t(s);
|
|
@@ -1254,80 +1254,80 @@ function ze(n, r, t) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
const On = {
|
|
1256
1256
|
name: "labelEnd",
|
|
1257
|
-
tokenize:
|
|
1258
|
-
resolveTo:
|
|
1259
|
-
resolveAll:
|
|
1260
|
-
}, Ie = {
|
|
1261
|
-
tokenize: Pe
|
|
1257
|
+
tokenize: Pe,
|
|
1258
|
+
resolveTo: De,
|
|
1259
|
+
resolveAll: Oe
|
|
1262
1260
|
}, Te = {
|
|
1263
1261
|
tokenize: _e
|
|
1264
1262
|
}, Be = {
|
|
1265
1263
|
tokenize: Me
|
|
1264
|
+
}, Le = {
|
|
1265
|
+
tokenize: Re
|
|
1266
1266
|
};
|
|
1267
|
-
function
|
|
1267
|
+
function Oe(n) {
|
|
1268
1268
|
let r = -1, t;
|
|
1269
1269
|
for (; ++r < n.length; )
|
|
1270
1270
|
t = n[r][1], (t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") && (n.splice(r + 1, t.type === "labelImage" ? 4 : 2), t.type = "data", r++);
|
|
1271
1271
|
return n;
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
let t = n.length, e = 0, u,
|
|
1273
|
+
function De(n, r) {
|
|
1274
|
+
let t = n.length, e = 0, u, l, i, a;
|
|
1275
1275
|
for (; t--; )
|
|
1276
|
-
if (u = n[t][1],
|
|
1276
|
+
if (u = n[t][1], l) {
|
|
1277
1277
|
if (u.type === "link" || u.type === "labelLink" && u._inactive)
|
|
1278
1278
|
break;
|
|
1279
1279
|
n[t][0] === "enter" && u.type === "labelLink" && (u._inactive = !0);
|
|
1280
1280
|
} else if (i) {
|
|
1281
|
-
if (n[t][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (
|
|
1281
|
+
if (n[t][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (l = t, u.type !== "labelLink")) {
|
|
1282
1282
|
e = 2;
|
|
1283
1283
|
break;
|
|
1284
1284
|
}
|
|
1285
1285
|
} else
|
|
1286
1286
|
u.type === "labelEnd" && (i = t);
|
|
1287
1287
|
const c = {
|
|
1288
|
-
type: n[
|
|
1289
|
-
start: Object.assign({}, n[
|
|
1288
|
+
type: n[l][1].type === "labelLink" ? "link" : "image",
|
|
1289
|
+
start: Object.assign({}, n[l][1].start),
|
|
1290
1290
|
end: Object.assign({}, n[n.length - 1][1].end)
|
|
1291
1291
|
}, p = {
|
|
1292
1292
|
type: "label",
|
|
1293
|
-
start: Object.assign({}, n[
|
|
1293
|
+
start: Object.assign({}, n[l][1].start),
|
|
1294
1294
|
end: Object.assign({}, n[i][1].end)
|
|
1295
1295
|
}, h = {
|
|
1296
1296
|
type: "labelText",
|
|
1297
|
-
start: Object.assign({}, n[
|
|
1297
|
+
start: Object.assign({}, n[l + e + 2][1].end),
|
|
1298
1298
|
end: Object.assign({}, n[i - 2][1].start)
|
|
1299
1299
|
};
|
|
1300
|
-
return
|
|
1300
|
+
return a = [
|
|
1301
1301
|
["enter", c, r],
|
|
1302
1302
|
["enter", p, r]
|
|
1303
|
-
],
|
|
1304
|
-
|
|
1303
|
+
], a = Z(a, n.slice(l + 1, l + e + 3)), a = Z(a, [["enter", h, r]]), a = Z(
|
|
1304
|
+
a,
|
|
1305
1305
|
Bn(
|
|
1306
1306
|
r.parser.constructs.insideSpan.null,
|
|
1307
|
-
n.slice(
|
|
1307
|
+
n.slice(l + e + 4, i - 3),
|
|
1308
1308
|
r
|
|
1309
1309
|
)
|
|
1310
|
-
),
|
|
1310
|
+
), a = Z(a, [
|
|
1311
1311
|
["exit", h, r],
|
|
1312
1312
|
n[i - 2],
|
|
1313
1313
|
n[i - 1],
|
|
1314
1314
|
["exit", p, r]
|
|
1315
|
-
]),
|
|
1315
|
+
]), a = Z(a, n.slice(i + 1)), a = Z(a, [["exit", c, r]]), en(n, l, n.length, a), n;
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Pe(n, r, t) {
|
|
1318
1318
|
const e = this;
|
|
1319
|
-
let u = e.events.length,
|
|
1319
|
+
let u = e.events.length, l, i;
|
|
1320
1320
|
for (; u--; )
|
|
1321
1321
|
if ((e.events[u][1].type === "labelImage" || e.events[u][1].type === "labelLink") && !e.events[u][1]._balanced) {
|
|
1322
|
-
|
|
1322
|
+
l = e.events[u][1];
|
|
1323
1323
|
break;
|
|
1324
1324
|
}
|
|
1325
|
-
return
|
|
1326
|
-
function
|
|
1327
|
-
return
|
|
1325
|
+
return a;
|
|
1326
|
+
function a(h) {
|
|
1327
|
+
return l ? l._inactive ? p(h) : (i = e.parser.defined.includes(
|
|
1328
1328
|
fn(
|
|
1329
1329
|
e.sliceSerialize({
|
|
1330
|
-
start:
|
|
1330
|
+
start: l.end,
|
|
1331
1331
|
end: e.now()
|
|
1332
1332
|
})
|
|
1333
1333
|
)
|
|
@@ -1335,28 +1335,28 @@ function De(n, r, t) {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
function c(h) {
|
|
1337
1337
|
return h === 40 ? n.attempt(
|
|
1338
|
-
|
|
1338
|
+
Te,
|
|
1339
1339
|
r,
|
|
1340
1340
|
i ? r : p
|
|
1341
1341
|
)(h) : h === 91 ? n.attempt(
|
|
1342
|
-
|
|
1342
|
+
Be,
|
|
1343
1343
|
r,
|
|
1344
|
-
i ? n.attempt(
|
|
1344
|
+
i ? n.attempt(Le, r, p) : p
|
|
1345
1345
|
)(h) : i ? r(h) : p(h);
|
|
1346
1346
|
}
|
|
1347
1347
|
function p(h) {
|
|
1348
|
-
return
|
|
1348
|
+
return l._balanced = !0, t(h);
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function _e(n, r, t) {
|
|
1352
1352
|
return e;
|
|
1353
1353
|
function e(c) {
|
|
1354
1354
|
return n.enter("resource"), n.enter("resourceMarker"), n.consume(c), n.exit("resourceMarker"), dn(n, u);
|
|
1355
1355
|
}
|
|
1356
1356
|
function u(c) {
|
|
1357
|
-
return c === 41 ?
|
|
1357
|
+
return c === 41 ? a(c) : lt(
|
|
1358
1358
|
n,
|
|
1359
|
-
|
|
1359
|
+
l,
|
|
1360
1360
|
t,
|
|
1361
1361
|
"resourceDestination",
|
|
1362
1362
|
"resourceDestinationLiteral",
|
|
@@ -1366,38 +1366,38 @@ function Pe(n, r, t) {
|
|
|
1366
1366
|
32
|
|
1367
1367
|
)(c);
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1370
|
-
return Y(c) ? dn(n, i)(c) :
|
|
1369
|
+
function l(c) {
|
|
1370
|
+
return Y(c) ? dn(n, i)(c) : a(c);
|
|
1371
1371
|
}
|
|
1372
1372
|
function i(c) {
|
|
1373
1373
|
return c === 34 || c === 39 || c === 40 ? ot(
|
|
1374
1374
|
n,
|
|
1375
|
-
dn(n,
|
|
1375
|
+
dn(n, a),
|
|
1376
1376
|
t,
|
|
1377
1377
|
"resourceTitle",
|
|
1378
1378
|
"resourceTitleMarker",
|
|
1379
1379
|
"resourceTitleString"
|
|
1380
|
-
)(c) :
|
|
1380
|
+
)(c) : a(c);
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function a(c) {
|
|
1383
1383
|
return c === 41 ? (n.enter("resourceMarker"), n.consume(c), n.exit("resourceMarker"), n.exit("resource"), r) : t(c);
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function Me(n, r, t) {
|
|
1387
1387
|
const e = this;
|
|
1388
1388
|
return u;
|
|
1389
1389
|
function u(i) {
|
|
1390
|
-
return
|
|
1390
|
+
return at.call(
|
|
1391
1391
|
e,
|
|
1392
1392
|
n,
|
|
1393
|
-
|
|
1393
|
+
l,
|
|
1394
1394
|
t,
|
|
1395
1395
|
"reference",
|
|
1396
1396
|
"referenceMarker",
|
|
1397
1397
|
"referenceString"
|
|
1398
1398
|
)(i);
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function l(i) {
|
|
1401
1401
|
return e.parser.defined.includes(
|
|
1402
1402
|
fn(
|
|
1403
1403
|
e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1)
|
|
@@ -1405,45 +1405,45 @@ function _e(n, r, t) {
|
|
|
1405
1405
|
) ? r(i) : t(i);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function Re(n, r, t) {
|
|
1409
1409
|
return e;
|
|
1410
|
-
function e(
|
|
1411
|
-
return n.enter("reference"), n.enter("referenceMarker"), n.consume(
|
|
1410
|
+
function e(l) {
|
|
1411
|
+
return n.enter("reference"), n.enter("referenceMarker"), n.consume(l), n.exit("referenceMarker"), u;
|
|
1412
1412
|
}
|
|
1413
|
-
function u(
|
|
1414
|
-
return
|
|
1413
|
+
function u(l) {
|
|
1414
|
+
return l === 93 ? (n.enter("referenceMarker"), n.consume(l), n.exit("referenceMarker"), n.exit("reference"), r) : t(l);
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
|
-
const
|
|
1417
|
+
const je = {
|
|
1418
1418
|
name: "labelStartImage",
|
|
1419
|
-
tokenize:
|
|
1419
|
+
tokenize: qe,
|
|
1420
1420
|
resolveAll: On.resolveAll
|
|
1421
1421
|
};
|
|
1422
|
-
function
|
|
1422
|
+
function qe(n, r, t) {
|
|
1423
1423
|
const e = this;
|
|
1424
1424
|
return u;
|
|
1425
|
-
function u(
|
|
1426
|
-
return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(
|
|
1425
|
+
function u(a) {
|
|
1426
|
+
return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(a), n.exit("labelImageMarker"), l;
|
|
1427
1427
|
}
|
|
1428
|
-
function a
|
|
1429
|
-
return
|
|
1428
|
+
function l(a) {
|
|
1429
|
+
return a === 91 ? (n.enter("labelMarker"), n.consume(a), n.exit("labelMarker"), n.exit("labelImage"), i) : t(a);
|
|
1430
1430
|
}
|
|
1431
|
-
function i(
|
|
1432
|
-
return
|
|
1431
|
+
function i(a) {
|
|
1432
|
+
return a === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(a) : r(a);
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1435
|
+
const He = {
|
|
1436
1436
|
name: "labelStartLink",
|
|
1437
|
-
tokenize:
|
|
1437
|
+
tokenize: Ve,
|
|
1438
1438
|
resolveAll: On.resolveAll
|
|
1439
1439
|
};
|
|
1440
|
-
function
|
|
1440
|
+
function Ve(n, r, t) {
|
|
1441
1441
|
const e = this;
|
|
1442
1442
|
return u;
|
|
1443
1443
|
function u(i) {
|
|
1444
|
-
return n.enter("labelLink"), n.enter("labelMarker"), n.consume(i), n.exit("labelMarker"), n.exit("labelLink"),
|
|
1444
|
+
return n.enter("labelLink"), n.enter("labelMarker"), n.consume(i), n.exit("labelMarker"), n.exit("labelLink"), l;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function l(i) {
|
|
1447
1447
|
return i === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(i) : r(i);
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
@@ -1454,45 +1454,45 @@ const Cn = {
|
|
|
1454
1454
|
function Ne(n, r) {
|
|
1455
1455
|
return t;
|
|
1456
1456
|
function t(e) {
|
|
1457
|
-
return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"),
|
|
1457
|
+
return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), B(n, r, "linePrefix");
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
1460
|
const bn = {
|
|
1461
1461
|
name: "thematicBreak",
|
|
1462
|
-
tokenize:
|
|
1462
|
+
tokenize: Qe
|
|
1463
1463
|
};
|
|
1464
|
-
function
|
|
1464
|
+
function Qe(n, r, t) {
|
|
1465
1465
|
let e = 0, u;
|
|
1466
|
-
return
|
|
1467
|
-
function
|
|
1466
|
+
return l;
|
|
1467
|
+
function l(c) {
|
|
1468
1468
|
return n.enter("thematicBreak"), u = c, i(c);
|
|
1469
1469
|
}
|
|
1470
1470
|
function i(c) {
|
|
1471
|
-
return c === u ? (n.enter("thematicBreakSequence"),
|
|
1471
|
+
return c === u ? (n.enter("thematicBreakSequence"), a(c)) : q(c) ? B(n, i, "whitespace")(c) : e < 3 || c !== null && !C(c) ? t(c) : (n.exit("thematicBreak"), r(c));
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1474
|
-
return c === u ? (n.consume(c), e++,
|
|
1473
|
+
function a(c) {
|
|
1474
|
+
return c === u ? (n.consume(c), e++, a) : (n.exit("thematicBreakSequence"), i(c));
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
1477
|
const $ = {
|
|
1478
1478
|
name: "list",
|
|
1479
|
-
tokenize:
|
|
1479
|
+
tokenize: $e,
|
|
1480
1480
|
continuation: {
|
|
1481
|
-
tokenize:
|
|
1481
|
+
tokenize: Ze
|
|
1482
1482
|
},
|
|
1483
|
-
exit:
|
|
1484
|
-
}, Qe = {
|
|
1485
|
-
tokenize: Ge,
|
|
1486
|
-
partial: !0
|
|
1483
|
+
exit: Ge
|
|
1487
1484
|
}, Ue = {
|
|
1488
|
-
tokenize:
|
|
1485
|
+
tokenize: Je,
|
|
1486
|
+
partial: !0
|
|
1487
|
+
}, We = {
|
|
1488
|
+
tokenize: Ye,
|
|
1489
1489
|
partial: !0
|
|
1490
1490
|
};
|
|
1491
|
-
function
|
|
1491
|
+
function $e(n, r, t) {
|
|
1492
1492
|
const e = this, u = e.events[e.events.length - 1];
|
|
1493
|
-
let
|
|
1494
|
-
return
|
|
1495
|
-
function
|
|
1493
|
+
let l = u && u[1].type === "linePrefix" ? u[2].sliceSerialize(u[1], !0).length : 0, i = 0;
|
|
1494
|
+
return a;
|
|
1495
|
+
function a(f) {
|
|
1496
1496
|
const k = e.containerState.type || (f === 42 || f === 43 || f === 45 ? "listUnordered" : "listOrdered");
|
|
1497
1497
|
if (k === "listUnordered" ? !e.containerState.marker || f === e.containerState.marker : An(f)) {
|
|
1498
1498
|
if (e.containerState.type || (e.containerState.type = k, n.enter(k, {
|
|
@@ -1513,81 +1513,81 @@ function We(n, r, t) {
|
|
|
1513
1513
|
// Can’t be empty when interrupting.
|
|
1514
1514
|
e.interrupt ? t : h,
|
|
1515
1515
|
n.attempt(
|
|
1516
|
-
|
|
1516
|
+
Ue,
|
|
1517
1517
|
g,
|
|
1518
1518
|
x
|
|
1519
1519
|
)
|
|
1520
1520
|
);
|
|
1521
1521
|
}
|
|
1522
1522
|
function h(f) {
|
|
1523
|
-
return e.containerState.initialBlankLine = !0,
|
|
1523
|
+
return e.containerState.initialBlankLine = !0, l++, g(f);
|
|
1524
1524
|
}
|
|
1525
1525
|
function x(f) {
|
|
1526
1526
|
return q(f) ? (n.enter("listItemPrefixWhitespace"), n.consume(f), n.exit("listItemPrefixWhitespace"), g) : t(f);
|
|
1527
1527
|
}
|
|
1528
1528
|
function g(f) {
|
|
1529
|
-
return e.containerState.size =
|
|
1529
|
+
return e.containerState.size = l + e.sliceSerialize(n.exit("listItemPrefix"), !0).length, r(f);
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function Ze(n, r, t) {
|
|
1533
1533
|
const e = this;
|
|
1534
|
-
return e.containerState._closeFlow = void 0, n.check(Sn, u,
|
|
1535
|
-
function u(
|
|
1536
|
-
return e.containerState.furtherBlankLines = e.containerState.furtherBlankLines || e.containerState.initialBlankLine,
|
|
1534
|
+
return e.containerState._closeFlow = void 0, n.check(Sn, u, l);
|
|
1535
|
+
function u(a) {
|
|
1536
|
+
return e.containerState.furtherBlankLines = e.containerState.furtherBlankLines || e.containerState.initialBlankLine, B(
|
|
1537
1537
|
n,
|
|
1538
1538
|
r,
|
|
1539
1539
|
"listItemIndent",
|
|
1540
1540
|
e.containerState.size + 1
|
|
1541
|
-
)(
|
|
1541
|
+
)(a);
|
|
1542
1542
|
}
|
|
1543
|
-
function a
|
|
1544
|
-
return e.containerState.furtherBlankLines || !q(
|
|
1543
|
+
function l(a) {
|
|
1544
|
+
return e.containerState.furtherBlankLines || !q(a) ? (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, i(a)) : (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, n.attempt(We, r, i)(a));
|
|
1545
1545
|
}
|
|
1546
|
-
function i(
|
|
1547
|
-
return e.containerState._closeFlow = !0, e.interrupt = void 0,
|
|
1546
|
+
function i(a) {
|
|
1547
|
+
return e.containerState._closeFlow = !0, e.interrupt = void 0, B(
|
|
1548
1548
|
n,
|
|
1549
1549
|
n.attempt($, r, t),
|
|
1550
1550
|
"linePrefix",
|
|
1551
1551
|
e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
1552
|
-
)(
|
|
1552
|
+
)(a);
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function Ye(n, r, t) {
|
|
1556
1556
|
const e = this;
|
|
1557
|
-
return
|
|
1557
|
+
return B(
|
|
1558
1558
|
n,
|
|
1559
1559
|
u,
|
|
1560
1560
|
"listItemIndent",
|
|
1561
1561
|
e.containerState.size + 1
|
|
1562
1562
|
);
|
|
1563
|
-
function u(
|
|
1563
|
+
function u(l) {
|
|
1564
1564
|
const i = e.events[e.events.length - 1];
|
|
1565
|
-
return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === e.containerState.size ? r(
|
|
1565
|
+
return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === e.containerState.size ? r(l) : t(l);
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function Ge(n) {
|
|
1569
1569
|
n.exit(this.containerState.type);
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Je(n, r, t) {
|
|
1572
1572
|
const e = this;
|
|
1573
|
-
return
|
|
1573
|
+
return B(
|
|
1574
1574
|
n,
|
|
1575
1575
|
u,
|
|
1576
1576
|
"listItemPrefixWhitespace",
|
|
1577
1577
|
e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1
|
|
1578
1578
|
);
|
|
1579
|
-
function u(
|
|
1579
|
+
function u(l) {
|
|
1580
1580
|
const i = e.events[e.events.length - 1];
|
|
1581
|
-
return !q(
|
|
1581
|
+
return !q(l) && i && i[1].type === "listItemPrefixWhitespace" ? r(l) : t(l);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
const Yn = {
|
|
1585
1585
|
name: "setextUnderline",
|
|
1586
|
-
tokenize:
|
|
1587
|
-
resolveTo:
|
|
1586
|
+
tokenize: Xe,
|
|
1587
|
+
resolveTo: Ke
|
|
1588
1588
|
};
|
|
1589
|
-
function
|
|
1590
|
-
let t = n.length, e, u,
|
|
1589
|
+
function Ke(n, r) {
|
|
1590
|
+
let t = n.length, e, u, l;
|
|
1591
1591
|
for (; t--; )
|
|
1592
1592
|
if (n[t][0] === "enter") {
|
|
1593
1593
|
if (n[t][1].type === "content") {
|
|
@@ -1596,37 +1596,37 @@ function Je(n, r) {
|
|
|
1596
1596
|
}
|
|
1597
1597
|
n[t][1].type === "paragraph" && (u = t);
|
|
1598
1598
|
} else
|
|
1599
|
-
n[t][1].type === "content" && n.splice(t, 1), !
|
|
1599
|
+
n[t][1].type === "content" && n.splice(t, 1), !l && n[t][1].type === "definition" && (l = t);
|
|
1600
1600
|
const i = {
|
|
1601
1601
|
type: "setextHeading",
|
|
1602
1602
|
start: Object.assign({}, n[u][1].start),
|
|
1603
1603
|
end: Object.assign({}, n[n.length - 1][1].end)
|
|
1604
1604
|
};
|
|
1605
|
-
return n[u][1].type = "setextHeadingText",
|
|
1605
|
+
return n[u][1].type = "setextHeadingText", l ? (n.splice(u, 0, ["enter", i, r]), n.splice(l + 1, 0, ["exit", n[e][1], r]), n[e][1].end = Object.assign({}, n[l][1].end)) : n[e][1] = i, n.push(["exit", i, r]), n;
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1607
|
+
function Xe(n, r, t) {
|
|
1608
1608
|
const e = this;
|
|
1609
|
-
let u = e.events.length,
|
|
1609
|
+
let u = e.events.length, l, i;
|
|
1610
1610
|
for (; u--; )
|
|
1611
1611
|
if (e.events[u][1].type !== "lineEnding" && e.events[u][1].type !== "linePrefix" && e.events[u][1].type !== "content") {
|
|
1612
1612
|
i = e.events[u][1].type === "paragraph";
|
|
1613
1613
|
break;
|
|
1614
1614
|
}
|
|
1615
|
-
return
|
|
1616
|
-
function
|
|
1617
|
-
return !e.parser.lazy[e.now().line] && (e.interrupt || i) ? (n.enter("setextHeadingLine"), n.enter("setextHeadingLineSequence"),
|
|
1615
|
+
return a;
|
|
1616
|
+
function a(h) {
|
|
1617
|
+
return !e.parser.lazy[e.now().line] && (e.interrupt || i) ? (n.enter("setextHeadingLine"), n.enter("setextHeadingLineSequence"), l = h, c(h)) : t(h);
|
|
1618
1618
|
}
|
|
1619
1619
|
function c(h) {
|
|
1620
|
-
return h ===
|
|
1620
|
+
return h === l ? (n.consume(h), c) : (n.exit("setextHeadingLineSequence"), B(n, p, "lineSuffix")(h));
|
|
1621
1621
|
}
|
|
1622
1622
|
function p(h) {
|
|
1623
1623
|
return h === null || C(h) ? (n.exit("setextHeadingLine"), r(h)) : t(h);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
|
-
const
|
|
1627
|
-
tokenize:
|
|
1626
|
+
const ve = {
|
|
1627
|
+
tokenize: nr
|
|
1628
1628
|
};
|
|
1629
|
-
function
|
|
1629
|
+
function nr(n) {
|
|
1630
1630
|
const r = this, t = n.attempt(
|
|
1631
1631
|
// Try to parse a blank line.
|
|
1632
1632
|
Sn,
|
|
@@ -1635,7 +1635,7 @@ function ve(n) {
|
|
|
1635
1635
|
n.attempt(
|
|
1636
1636
|
this.parser.constructs.flowInitial,
|
|
1637
1637
|
u,
|
|
1638
|
-
|
|
1638
|
+
B(
|
|
1639
1639
|
n,
|
|
1640
1640
|
n.attempt(
|
|
1641
1641
|
this.parser.constructs.flow,
|
|
@@ -1647,38 +1647,38 @@ function ve(n) {
|
|
|
1647
1647
|
)
|
|
1648
1648
|
);
|
|
1649
1649
|
return t;
|
|
1650
|
-
function e(
|
|
1651
|
-
if (
|
|
1652
|
-
n.consume(
|
|
1650
|
+
function e(l) {
|
|
1651
|
+
if (l === null) {
|
|
1652
|
+
n.consume(l);
|
|
1653
1653
|
return;
|
|
1654
1654
|
}
|
|
1655
|
-
return n.enter("lineEndingBlank"), n.consume(
|
|
1655
|
+
return n.enter("lineEndingBlank"), n.consume(l), n.exit("lineEndingBlank"), r.currentConstruct = void 0, t;
|
|
1656
1656
|
}
|
|
1657
|
-
function u(
|
|
1658
|
-
if (
|
|
1659
|
-
n.consume(
|
|
1657
|
+
function u(l) {
|
|
1658
|
+
if (l === null) {
|
|
1659
|
+
n.consume(l);
|
|
1660
1660
|
return;
|
|
1661
1661
|
}
|
|
1662
|
-
return n.enter("lineEnding"), n.consume(
|
|
1662
|
+
return n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), r.currentConstruct = void 0, t;
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
const
|
|
1665
|
+
const tr = {
|
|
1666
1666
|
resolveAll: ct()
|
|
1667
|
-
},
|
|
1667
|
+
}, er = st("string"), rr = st("text");
|
|
1668
1668
|
function st(n) {
|
|
1669
1669
|
return {
|
|
1670
1670
|
tokenize: r,
|
|
1671
1671
|
resolveAll: ct(
|
|
1672
|
-
n === "text" ?
|
|
1672
|
+
n === "text" ? ir : void 0
|
|
1673
1673
|
)
|
|
1674
1674
|
};
|
|
1675
1675
|
function r(t) {
|
|
1676
|
-
const e = this, u = this.parser.constructs[n],
|
|
1676
|
+
const e = this, u = this.parser.constructs[n], l = t.attempt(u, i, a);
|
|
1677
1677
|
return i;
|
|
1678
1678
|
function i(h) {
|
|
1679
|
-
return p(h) ?
|
|
1679
|
+
return p(h) ? l(h) : a(h);
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function a(h) {
|
|
1682
1682
|
if (h === null) {
|
|
1683
1683
|
t.consume(h);
|
|
1684
1684
|
return;
|
|
@@ -1686,7 +1686,7 @@ function st(n) {
|
|
|
1686
1686
|
return t.enter("data"), t.consume(h), c;
|
|
1687
1687
|
}
|
|
1688
1688
|
function c(h) {
|
|
1689
|
-
return p(h) ? (t.exit("data"),
|
|
1689
|
+
return p(h) ? (t.exit("data"), l(h)) : (t.consume(h), c);
|
|
1690
1690
|
}
|
|
1691
1691
|
function p(h) {
|
|
1692
1692
|
if (h === null)
|
|
@@ -1706,42 +1706,42 @@ function st(n) {
|
|
|
1706
1706
|
function ct(n) {
|
|
1707
1707
|
return r;
|
|
1708
1708
|
function r(t, e) {
|
|
1709
|
-
let u = -1,
|
|
1709
|
+
let u = -1, l;
|
|
1710
1710
|
for (; ++u <= t.length; )
|
|
1711
|
-
|
|
1711
|
+
l === void 0 ? t[u] && t[u][1].type === "data" && (l = u, u++) : (!t[u] || t[u][1].type !== "data") && (u !== l + 2 && (t[l][1].end = t[u - 1][1].end, t.splice(l + 2, u - l - 2), u = l + 2), l = void 0);
|
|
1712
1712
|
return n ? n(t, e) : t;
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1715
|
+
function ir(n, r) {
|
|
1716
1716
|
let t = 0;
|
|
1717
1717
|
for (; ++t <= n.length; )
|
|
1718
1718
|
if ((t === n.length || n[t][1].type === "lineEnding") && n[t - 1][1].type === "data") {
|
|
1719
1719
|
const e = n[t - 1][1], u = r.sliceStream(e);
|
|
1720
|
-
let
|
|
1721
|
-
for (;
|
|
1722
|
-
const p = u[
|
|
1720
|
+
let l = u.length, i = -1, a = 0, c;
|
|
1721
|
+
for (; l--; ) {
|
|
1722
|
+
const p = u[l];
|
|
1723
1723
|
if (typeof p == "string") {
|
|
1724
1724
|
for (i = p.length; p.charCodeAt(i - 1) === 32; )
|
|
1725
|
-
|
|
1725
|
+
a++, i--;
|
|
1726
1726
|
if (i)
|
|
1727
1727
|
break;
|
|
1728
1728
|
i = -1;
|
|
1729
1729
|
} else if (p === -2)
|
|
1730
|
-
c = !0,
|
|
1730
|
+
c = !0, a++;
|
|
1731
1731
|
else if (p !== -1) {
|
|
1732
|
-
|
|
1732
|
+
l++;
|
|
1733
1733
|
break;
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
if (
|
|
1736
|
+
if (a) {
|
|
1737
1737
|
const p = {
|
|
1738
|
-
type: t === n.length || c ||
|
|
1738
|
+
type: t === n.length || c || a < 2 ? "lineSuffix" : "hardBreakTrailing",
|
|
1739
1739
|
start: {
|
|
1740
1740
|
line: e.end.line,
|
|
1741
|
-
column: e.end.column -
|
|
1742
|
-
offset: e.end.offset -
|
|
1743
|
-
_index: e.start._index +
|
|
1744
|
-
_bufferIndex:
|
|
1741
|
+
column: e.end.column - a,
|
|
1742
|
+
offset: e.end.offset - a,
|
|
1743
|
+
_index: e.start._index + l,
|
|
1744
|
+
_bufferIndex: l ? i : e.start._bufferIndex + i
|
|
1745
1745
|
},
|
|
1746
1746
|
end: Object.assign({}, e.end)
|
|
1747
1747
|
};
|
|
@@ -1756,7 +1756,7 @@ function rr(n, r) {
|
|
|
1756
1756
|
}
|
|
1757
1757
|
return n;
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function ur(n, r, t) {
|
|
1760
1760
|
let e = Object.assign(
|
|
1761
1761
|
t ? Object.assign({}, t) : {
|
|
1762
1762
|
line: 1,
|
|
@@ -1768,13 +1768,13 @@ function ir(n, r, t) {
|
|
|
1768
1768
|
_bufferIndex: -1
|
|
1769
1769
|
}
|
|
1770
1770
|
);
|
|
1771
|
-
const u = {},
|
|
1772
|
-
let i = [],
|
|
1771
|
+
const u = {}, l = [];
|
|
1772
|
+
let i = [], a = [];
|
|
1773
1773
|
const c = {
|
|
1774
1774
|
consume: _,
|
|
1775
1775
|
enter: F,
|
|
1776
|
-
exit:
|
|
1777
|
-
attempt: P(
|
|
1776
|
+
exit: O,
|
|
1777
|
+
attempt: P(D),
|
|
1778
1778
|
check: P(d),
|
|
1779
1779
|
interrupt: P(d, {
|
|
1780
1780
|
interrupt: !0
|
|
@@ -1788,27 +1788,27 @@ function ir(n, r, t) {
|
|
|
1788
1788
|
sliceStream: f,
|
|
1789
1789
|
sliceSerialize: g,
|
|
1790
1790
|
now: k,
|
|
1791
|
-
defineSkip:
|
|
1791
|
+
defineSkip: A,
|
|
1792
1792
|
write: x
|
|
1793
1793
|
};
|
|
1794
1794
|
let h = r.tokenize.call(p, c);
|
|
1795
|
-
return r.resolveAll &&
|
|
1795
|
+
return r.resolveAll && l.push(r), p;
|
|
1796
1796
|
function x(S) {
|
|
1797
|
-
return i = Z(i, S),
|
|
1797
|
+
return i = Z(i, S), L(), i[i.length - 1] !== null ? [] : (R(r, 0), p.events = Bn(l, p.events, p), p.events);
|
|
1798
1798
|
}
|
|
1799
1799
|
function g(S, w) {
|
|
1800
1800
|
return ar(f(S), w);
|
|
1801
1801
|
}
|
|
1802
1802
|
function f(S) {
|
|
1803
|
-
return
|
|
1803
|
+
return lr(i, S);
|
|
1804
1804
|
}
|
|
1805
1805
|
function k() {
|
|
1806
1806
|
return Object.assign({}, e);
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1809
|
-
u[S.line] = S.column,
|
|
1808
|
+
function A(S) {
|
|
1809
|
+
u[S.line] = S.column, N();
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1811
|
+
function L() {
|
|
1812
1812
|
let S;
|
|
1813
1813
|
for (; e._index < i.length; ) {
|
|
1814
1814
|
const w = i[e._index];
|
|
@@ -1823,49 +1823,49 @@ function ir(n, r, t) {
|
|
|
1823
1823
|
h = h(S);
|
|
1824
1824
|
}
|
|
1825
1825
|
function _(S) {
|
|
1826
|
-
C(S) ? (e.line++, e.column = 1, e.offset += S === -3 ? 2 : 1,
|
|
1826
|
+
C(S) ? (e.line++, e.column = 1, e.offset += S === -3 ? 2 : 1, N()) : S !== -1 && (e.column++, e.offset++), e._bufferIndex < 0 ? e._index++ : (e._bufferIndex++, e._bufferIndex === i[e._index].length && (e._bufferIndex = -1, e._index++)), p.previous = S;
|
|
1827
1827
|
}
|
|
1828
1828
|
function F(S, w) {
|
|
1829
|
-
const
|
|
1830
|
-
return
|
|
1829
|
+
const z = w || {};
|
|
1830
|
+
return z.type = S, z.start = k(), p.events.push(["enter", z, p]), a.push(z), z;
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1833
|
-
const w =
|
|
1832
|
+
function O(S) {
|
|
1833
|
+
const w = a.pop();
|
|
1834
1834
|
return w.end = k(), p.events.push(["exit", w, p]), w;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function D(S, w) {
|
|
1837
1837
|
R(S, w.from);
|
|
1838
1838
|
}
|
|
1839
1839
|
function d(S, w) {
|
|
1840
1840
|
w.restore();
|
|
1841
1841
|
}
|
|
1842
1842
|
function P(S, w) {
|
|
1843
|
-
return
|
|
1844
|
-
function
|
|
1843
|
+
return z;
|
|
1844
|
+
function z(U, G, nn) {
|
|
1845
1845
|
let J, Q, W, H;
|
|
1846
1846
|
return Array.isArray(U) ? (
|
|
1847
1847
|
/* c8 ignore next 1 */
|
|
1848
1848
|
o(U)
|
|
1849
1849
|
) : "tokenize" in U ? o([U]) : s(U);
|
|
1850
|
-
function s(
|
|
1850
|
+
function s(V) {
|
|
1851
1851
|
return K;
|
|
1852
|
-
function K(
|
|
1853
|
-
const pn =
|
|
1852
|
+
function K(ln) {
|
|
1853
|
+
const pn = ln !== null && V[ln], mn = ln !== null && V.null, Fn = [
|
|
1854
1854
|
// To do: add more extension tests.
|
|
1855
1855
|
/* c8 ignore next 2 */
|
|
1856
1856
|
...Array.isArray(pn) ? pn : pn ? [pn] : [],
|
|
1857
1857
|
...Array.isArray(mn) ? mn : mn ? [mn] : []
|
|
1858
1858
|
];
|
|
1859
|
-
return o(Fn)(
|
|
1859
|
+
return o(Fn)(ln);
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
function o(
|
|
1863
|
-
return J =
|
|
1862
|
+
function o(V) {
|
|
1863
|
+
return J = V, Q = 0, V.length === 0 ? nn : cn(V[Q]);
|
|
1864
1864
|
}
|
|
1865
|
-
function cn(
|
|
1865
|
+
function cn(V) {
|
|
1866
1866
|
return K;
|
|
1867
|
-
function K(
|
|
1868
|
-
return H = j(), W =
|
|
1867
|
+
function K(ln) {
|
|
1868
|
+
return H = j(), W = V, V.partial || (p.currentConstruct = V), V.name && p.parser.constructs.disable.null.includes(V.name) ? hn() : V.tokenize.call(
|
|
1869
1869
|
// If we do have fields, create an object w/ `context` as its
|
|
1870
1870
|
// prototype.
|
|
1871
1871
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -1873,19 +1873,19 @@ function ir(n, r, t) {
|
|
|
1873
1873
|
c,
|
|
1874
1874
|
xn,
|
|
1875
1875
|
hn
|
|
1876
|
-
)(
|
|
1876
|
+
)(ln);
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
|
-
function xn(
|
|
1879
|
+
function xn(V) {
|
|
1880
1880
|
return S(W, H), G;
|
|
1881
1881
|
}
|
|
1882
|
-
function hn(
|
|
1882
|
+
function hn(V) {
|
|
1883
1883
|
return H.restore(), ++Q < J.length ? cn(J[Q]) : nn;
|
|
1884
1884
|
}
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
1887
|
function R(S, w) {
|
|
1888
|
-
S.resolveAll && !
|
|
1888
|
+
S.resolveAll && !l.includes(S) && l.push(S), S.resolve && en(
|
|
1889
1889
|
p.events,
|
|
1890
1890
|
w,
|
|
1891
1891
|
p.events.length - w,
|
|
@@ -1893,35 +1893,35 @@ function ir(n, r, t) {
|
|
|
1893
1893
|
), S.resolveTo && (p.events = S.resolveTo(p.events, p));
|
|
1894
1894
|
}
|
|
1895
1895
|
function j() {
|
|
1896
|
-
const S = k(), w = p.previous,
|
|
1896
|
+
const S = k(), w = p.previous, z = p.currentConstruct, U = p.events.length, G = Array.from(a);
|
|
1897
1897
|
return {
|
|
1898
1898
|
restore: nn,
|
|
1899
1899
|
from: U
|
|
1900
1900
|
};
|
|
1901
1901
|
function nn() {
|
|
1902
|
-
e = S, p.previous = w, p.currentConstruct =
|
|
1902
|
+
e = S, p.previous = w, p.currentConstruct = z, p.events.length = U, a = G, N();
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function N() {
|
|
1906
1906
|
e.line in u && e.column < 2 && (e.column = u[e.line], e.offset += u[e.line] - 1);
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1910
|
-
const t = r.start._index, e = r.start._bufferIndex, u = r.end._index,
|
|
1909
|
+
function lr(n, r) {
|
|
1910
|
+
const t = r.start._index, e = r.start._bufferIndex, u = r.end._index, l = r.end._bufferIndex;
|
|
1911
1911
|
let i;
|
|
1912
|
-
return t === u ? i = [n[t].slice(e,
|
|
1912
|
+
return t === u ? i = [n[t].slice(e, l)] : (i = n.slice(t, u), e > -1 && (i[0] = i[0].slice(e)), l > 0 && i.push(n[u].slice(0, l))), i;
|
|
1913
1913
|
}
|
|
1914
1914
|
function ar(n, r) {
|
|
1915
1915
|
let t = -1;
|
|
1916
1916
|
const e = [];
|
|
1917
1917
|
let u;
|
|
1918
1918
|
for (; ++t < n.length; ) {
|
|
1919
|
-
const
|
|
1919
|
+
const l = n[t];
|
|
1920
1920
|
let i;
|
|
1921
|
-
if (typeof
|
|
1922
|
-
i =
|
|
1921
|
+
if (typeof l == "string")
|
|
1922
|
+
i = l;
|
|
1923
1923
|
else
|
|
1924
|
-
switch (
|
|
1924
|
+
switch (l) {
|
|
1925
1925
|
case -5: {
|
|
1926
1926
|
i = "\r";
|
|
1927
1927
|
break;
|
|
@@ -1947,13 +1947,13 @@ function ar(n, r) {
|
|
|
1947
1947
|
break;
|
|
1948
1948
|
}
|
|
1949
1949
|
default:
|
|
1950
|
-
i = String.fromCharCode(
|
|
1950
|
+
i = String.fromCharCode(l);
|
|
1951
1951
|
}
|
|
1952
|
-
u =
|
|
1952
|
+
u = l === -2, e.push(i);
|
|
1953
1953
|
}
|
|
1954
1954
|
return e.join("");
|
|
1955
1955
|
}
|
|
1956
|
-
const
|
|
1956
|
+
const or = {
|
|
1957
1957
|
[42]: $,
|
|
1958
1958
|
[43]: $,
|
|
1959
1959
|
[45]: $,
|
|
@@ -1968,93 +1968,93 @@ const lr = {
|
|
|
1968
1968
|
[56]: $,
|
|
1969
1969
|
[57]: $,
|
|
1970
1970
|
[62]: et
|
|
1971
|
-
}, or = {
|
|
1972
|
-
[91]: he
|
|
1973
1971
|
}, sr = {
|
|
1972
|
+
[91]: pe
|
|
1973
|
+
}, cr = {
|
|
1974
1974
|
[-2]: En,
|
|
1975
1975
|
[-1]: En,
|
|
1976
1976
|
[32]: En
|
|
1977
|
-
},
|
|
1978
|
-
[35]:
|
|
1977
|
+
}, hr = {
|
|
1978
|
+
[35]: de,
|
|
1979
1979
|
[42]: bn,
|
|
1980
1980
|
[45]: [Yn, bn],
|
|
1981
|
-
[60]:
|
|
1981
|
+
[60]: Fe,
|
|
1982
1982
|
[61]: Yn,
|
|
1983
1983
|
[95]: bn,
|
|
1984
1984
|
[96]: $n,
|
|
1985
1985
|
[126]: $n
|
|
1986
|
-
},
|
|
1986
|
+
}, pr = {
|
|
1987
1987
|
[38]: it,
|
|
1988
1988
|
[92]: rt
|
|
1989
|
-
},
|
|
1989
|
+
}, mr = {
|
|
1990
1990
|
[-5]: Cn,
|
|
1991
1991
|
[-4]: Cn,
|
|
1992
1992
|
[-3]: Cn,
|
|
1993
|
-
[33]:
|
|
1993
|
+
[33]: je,
|
|
1994
1994
|
[38]: it,
|
|
1995
1995
|
[42]: In,
|
|
1996
|
-
[60]: [
|
|
1997
|
-
[91]:
|
|
1998
|
-
[92]: [
|
|
1996
|
+
[60]: [Ut, ze],
|
|
1997
|
+
[91]: He,
|
|
1998
|
+
[92]: [ge, rt],
|
|
1999
1999
|
[93]: On,
|
|
2000
2000
|
[95]: In,
|
|
2001
|
-
[96]:
|
|
2002
|
-
}, mr = {
|
|
2003
|
-
null: [In, nr]
|
|
2001
|
+
[96]: ee
|
|
2004
2002
|
}, fr = {
|
|
2005
|
-
null: [
|
|
2003
|
+
null: [In, tr]
|
|
2006
2004
|
}, xr = {
|
|
2005
|
+
null: [42, 95]
|
|
2006
|
+
}, gr = {
|
|
2007
2007
|
null: []
|
|
2008
|
-
},
|
|
2008
|
+
}, kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2009
2009
|
__proto__: null,
|
|
2010
|
-
attentionMarkers:
|
|
2011
|
-
contentInitial:
|
|
2012
|
-
disable:
|
|
2013
|
-
document:
|
|
2014
|
-
flow:
|
|
2015
|
-
flowInitial:
|
|
2016
|
-
insideSpan:
|
|
2017
|
-
string:
|
|
2018
|
-
text:
|
|
2010
|
+
attentionMarkers: xr,
|
|
2011
|
+
contentInitial: sr,
|
|
2012
|
+
disable: gr,
|
|
2013
|
+
document: or,
|
|
2014
|
+
flow: hr,
|
|
2015
|
+
flowInitial: cr,
|
|
2016
|
+
insideSpan: fr,
|
|
2017
|
+
string: pr,
|
|
2018
|
+
text: mr
|
|
2019
2019
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2020
|
-
function
|
|
2021
|
-
const r =
|
|
2020
|
+
function dr(n = {}) {
|
|
2021
|
+
const r = Tt(
|
|
2022
2022
|
// @ts-expect-error Same as above.
|
|
2023
|
-
[
|
|
2023
|
+
[kr].concat(n.extensions || [])
|
|
2024
2024
|
), t = {
|
|
2025
2025
|
defined: [],
|
|
2026
2026
|
lazy: {},
|
|
2027
2027
|
constructs: r,
|
|
2028
|
-
content: e(
|
|
2029
|
-
document: e(
|
|
2030
|
-
flow: e(
|
|
2031
|
-
string: e(
|
|
2032
|
-
text: e(
|
|
2028
|
+
content: e(Rt),
|
|
2029
|
+
document: e(qt),
|
|
2030
|
+
flow: e(ve),
|
|
2031
|
+
string: e(er),
|
|
2032
|
+
text: e(rr)
|
|
2033
2033
|
};
|
|
2034
2034
|
return t;
|
|
2035
2035
|
function e(u) {
|
|
2036
|
-
return
|
|
2037
|
-
function
|
|
2038
|
-
return
|
|
2036
|
+
return l;
|
|
2037
|
+
function l(i) {
|
|
2038
|
+
return ur(t, u, i);
|
|
2039
2039
|
}
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
2042
|
const Gn = /[\0\t\n\r]/g;
|
|
2043
|
-
function
|
|
2043
|
+
function br() {
|
|
2044
2044
|
let n = 1, r = "", t = !0, e;
|
|
2045
2045
|
return u;
|
|
2046
|
-
function u(
|
|
2046
|
+
function u(l, i, a) {
|
|
2047
2047
|
const c = [];
|
|
2048
2048
|
let p, h, x, g, f;
|
|
2049
|
-
for (
|
|
2050
|
-
if (Gn.lastIndex = x, p = Gn.exec(
|
|
2051
|
-
r =
|
|
2049
|
+
for (l = r + l.toString(i), x = 0, r = "", t && (l.charCodeAt(0) === 65279 && x++, t = void 0); x < l.length; ) {
|
|
2050
|
+
if (Gn.lastIndex = x, p = Gn.exec(l), g = p && p.index !== void 0 ? p.index : l.length, f = l.charCodeAt(g), !p) {
|
|
2051
|
+
r = l.slice(x);
|
|
2052
2052
|
break;
|
|
2053
2053
|
}
|
|
2054
2054
|
if (f === 10 && x === g && e)
|
|
2055
2055
|
c.push(-3), e = void 0;
|
|
2056
2056
|
else
|
|
2057
|
-
switch (e && (c.push(-5), e = void 0), x < g && (c.push(
|
|
2057
|
+
switch (e && (c.push(-5), e = void 0), x < g && (c.push(l.slice(x, g)), n += g - x), f) {
|
|
2058
2058
|
case 0: {
|
|
2059
2059
|
c.push(65533), n++;
|
|
2060
2060
|
break;
|
|
@@ -2073,10 +2073,10 @@ function dr() {
|
|
|
2073
2073
|
}
|
|
2074
2074
|
x = g + 1;
|
|
2075
2075
|
}
|
|
2076
|
-
return
|
|
2076
|
+
return a && (e && c.push(-5), r && c.push(r), c.push(null)), c;
|
|
2077
2077
|
}
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2079
|
+
function yr(n) {
|
|
2080
2080
|
for (; !ut(n); )
|
|
2081
2081
|
;
|
|
2082
2082
|
return n;
|
|
@@ -2092,16 +2092,16 @@ function ht(n, r) {
|
|
|
2092
2092
|
t > 1114111 ? "�" : String.fromCharCode(t)
|
|
2093
2093
|
);
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2096
|
-
function
|
|
2097
|
-
return n.replace(
|
|
2095
|
+
const Sr = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
2096
|
+
function Fr(n) {
|
|
2097
|
+
return n.replace(Sr, wr);
|
|
2098
2098
|
}
|
|
2099
|
-
function
|
|
2099
|
+
function wr(n, r, t) {
|
|
2100
2100
|
if (r)
|
|
2101
2101
|
return r;
|
|
2102
2102
|
if (t.charCodeAt(0) === 35) {
|
|
2103
|
-
const u = t.charCodeAt(1),
|
|
2104
|
-
return ht(t.slice(
|
|
2103
|
+
const u = t.charCodeAt(1), l = u === 120 || u === 88;
|
|
2104
|
+
return ht(t.slice(l ? 2 : 1), l ? 16 : 10);
|
|
2105
2105
|
}
|
|
2106
2106
|
return Ln(t) || n;
|
|
2107
2107
|
}
|
|
@@ -2131,60 +2131,60 @@ const pt = {}.hasOwnProperty, mt = (
|
|
|
2131
2131
|
* @returns {Root}
|
|
2132
2132
|
*/
|
|
2133
2133
|
function(n, r, t) {
|
|
2134
|
-
return typeof r != "string" && (t = r, r = void 0),
|
|
2135
|
-
|
|
2134
|
+
return typeof r != "string" && (t = r, r = void 0), Er(t)(
|
|
2135
|
+
yr(
|
|
2136
2136
|
// @ts-expect-error: micromark types need to accept `null`.
|
|
2137
|
-
|
|
2137
|
+
dr(t).document().write(br()(n, r, !0))
|
|
2138
2138
|
)
|
|
2139
2139
|
);
|
|
2140
2140
|
}
|
|
2141
2141
|
);
|
|
2142
|
-
function
|
|
2142
|
+
function Er(n) {
|
|
2143
2143
|
const r = {
|
|
2144
2144
|
transforms: [],
|
|
2145
2145
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
2146
2146
|
enter: {
|
|
2147
|
-
autolink:
|
|
2147
|
+
autolink: a(Rn),
|
|
2148
2148
|
autolinkProtocol: S,
|
|
2149
2149
|
autolinkEmail: S,
|
|
2150
|
-
atxHeading:
|
|
2151
|
-
blockQuote:
|
|
2150
|
+
atxHeading: a(Pn),
|
|
2151
|
+
blockQuote: a(Fn),
|
|
2152
2152
|
characterEscape: S,
|
|
2153
2153
|
characterReference: S,
|
|
2154
|
-
codeFenced:
|
|
2154
|
+
codeFenced: a(Dn),
|
|
2155
2155
|
codeFencedFenceInfo: c,
|
|
2156
2156
|
codeFencedFenceMeta: c,
|
|
2157
|
-
codeIndented:
|
|
2158
|
-
codeText:
|
|
2157
|
+
codeIndented: a(Dn, c),
|
|
2158
|
+
codeText: a(kt, c),
|
|
2159
2159
|
codeTextData: S,
|
|
2160
2160
|
data: S,
|
|
2161
2161
|
codeFlowValue: S,
|
|
2162
|
-
definition:
|
|
2162
|
+
definition: a(dt),
|
|
2163
2163
|
definitionDestinationString: c,
|
|
2164
2164
|
definitionLabelString: c,
|
|
2165
2165
|
definitionTitleString: c,
|
|
2166
|
-
emphasis:
|
|
2167
|
-
hardBreakEscape:
|
|
2168
|
-
hardBreakTrailing:
|
|
2169
|
-
htmlFlow:
|
|
2166
|
+
emphasis: a(bt),
|
|
2167
|
+
hardBreakEscape: a(_n),
|
|
2168
|
+
hardBreakTrailing: a(_n),
|
|
2169
|
+
htmlFlow: a(Mn, c),
|
|
2170
2170
|
htmlFlowData: S,
|
|
2171
|
-
htmlText:
|
|
2171
|
+
htmlText: a(Mn, c),
|
|
2172
2172
|
htmlTextData: S,
|
|
2173
|
-
image:
|
|
2173
|
+
image: a(yt),
|
|
2174
2174
|
label: c,
|
|
2175
|
-
link:
|
|
2176
|
-
listItem:
|
|
2175
|
+
link: a(Rn),
|
|
2176
|
+
listItem: a(St),
|
|
2177
2177
|
listItemValue: k,
|
|
2178
|
-
listOrdered:
|
|
2179
|
-
listUnordered:
|
|
2180
|
-
paragraph:
|
|
2178
|
+
listOrdered: a(jn, f),
|
|
2179
|
+
listUnordered: a(jn),
|
|
2180
|
+
paragraph: a(Ft),
|
|
2181
2181
|
reference: hn,
|
|
2182
2182
|
referenceString: c,
|
|
2183
2183
|
resourceDestinationString: c,
|
|
2184
2184
|
resourceTitleString: c,
|
|
2185
|
-
setextHeading:
|
|
2186
|
-
strong:
|
|
2187
|
-
thematicBreak:
|
|
2185
|
+
setextHeading: a(Pn),
|
|
2186
|
+
strong: a(wt),
|
|
2187
|
+
thematicBreak: a(Ct)
|
|
2188
2188
|
},
|
|
2189
2189
|
exit: {
|
|
2190
2190
|
atxHeading: h(),
|
|
@@ -2196,11 +2196,11 @@ function wr(n) {
|
|
|
2196
2196
|
characterEscapeValue: w,
|
|
2197
2197
|
characterReferenceMarkerHexadecimal: K,
|
|
2198
2198
|
characterReferenceMarkerNumeric: K,
|
|
2199
|
-
characterReferenceValue:
|
|
2199
|
+
characterReferenceValue: ln,
|
|
2200
2200
|
codeFenced: h(_),
|
|
2201
2201
|
codeFencedFence: y,
|
|
2202
|
-
codeFencedFenceInfo:
|
|
2203
|
-
codeFencedFenceMeta:
|
|
2202
|
+
codeFencedFenceInfo: A,
|
|
2203
|
+
codeFencedFenceMeta: L,
|
|
2204
2204
|
codeFlowValue: w,
|
|
2205
2205
|
codeIndented: h(F),
|
|
2206
2206
|
codeText: h(J),
|
|
@@ -2208,8 +2208,8 @@ function wr(n) {
|
|
|
2208
2208
|
data: w,
|
|
2209
2209
|
definition: h(),
|
|
2210
2210
|
definitionDestinationString: d,
|
|
2211
|
-
definitionLabelString:
|
|
2212
|
-
definitionTitleString:
|
|
2211
|
+
definitionLabelString: O,
|
|
2212
|
+
definitionTitleString: D,
|
|
2213
2213
|
emphasis: h(),
|
|
2214
2214
|
hardBreakEscape: h(U),
|
|
2215
2215
|
hardBreakTrailing: h(U),
|
|
@@ -2220,17 +2220,17 @@ function wr(n) {
|
|
|
2220
2220
|
image: h(W),
|
|
2221
2221
|
label: s,
|
|
2222
2222
|
labelText: H,
|
|
2223
|
-
lineEnding:
|
|
2223
|
+
lineEnding: z,
|
|
2224
2224
|
link: h(Q),
|
|
2225
2225
|
listItem: h(),
|
|
2226
2226
|
listOrdered: h(),
|
|
2227
2227
|
listUnordered: h(),
|
|
2228
2228
|
paragraph: h(),
|
|
2229
|
-
referenceString:
|
|
2229
|
+
referenceString: V,
|
|
2230
2230
|
resourceDestinationString: o,
|
|
2231
2231
|
resourceTitleString: cn,
|
|
2232
2232
|
resource: xn,
|
|
2233
|
-
setextHeading: h(
|
|
2233
|
+
setextHeading: h(N),
|
|
2234
2234
|
setextHeadingLineSequence: j,
|
|
2235
2235
|
setextHeadingText: R,
|
|
2236
2236
|
strong: h(),
|
|
@@ -2253,28 +2253,28 @@ function wr(n) {
|
|
|
2253
2253
|
exit: x,
|
|
2254
2254
|
buffer: c,
|
|
2255
2255
|
resume: g,
|
|
2256
|
-
setData:
|
|
2256
|
+
setData: l,
|
|
2257
2257
|
getData: i
|
|
2258
|
-
},
|
|
2259
|
-
let
|
|
2260
|
-
for (; ++
|
|
2261
|
-
if (m[
|
|
2262
|
-
if (m[
|
|
2263
|
-
|
|
2258
|
+
}, I = [];
|
|
2259
|
+
let T = -1;
|
|
2260
|
+
for (; ++T < m.length; )
|
|
2261
|
+
if (m[T][1].type === "listOrdered" || m[T][1].type === "listUnordered")
|
|
2262
|
+
if (m[T][0] === "enter")
|
|
2263
|
+
I.push(T);
|
|
2264
2264
|
else {
|
|
2265
|
-
const X =
|
|
2266
|
-
|
|
2265
|
+
const X = I.pop();
|
|
2266
|
+
T = u(m, X, T);
|
|
2267
2267
|
}
|
|
2268
|
-
for (
|
|
2269
|
-
const X = r[m[
|
|
2270
|
-
pt.call(X, m[
|
|
2268
|
+
for (T = -1; ++T < m.length; ) {
|
|
2269
|
+
const X = r[m[T][0]];
|
|
2270
|
+
pt.call(X, m[T][1].type) && X[m[T][1].type].call(
|
|
2271
2271
|
Object.assign(
|
|
2272
2272
|
{
|
|
2273
|
-
sliceSerialize: m[
|
|
2273
|
+
sliceSerialize: m[T][2].sliceSerialize
|
|
2274
2274
|
},
|
|
2275
2275
|
E
|
|
2276
2276
|
),
|
|
2277
|
-
m[
|
|
2277
|
+
m[T][1]
|
|
2278
2278
|
);
|
|
2279
2279
|
}
|
|
2280
2280
|
if (E.tokenStack.length > 0) {
|
|
@@ -2296,17 +2296,17 @@ function wr(n) {
|
|
|
2296
2296
|
offset: 0
|
|
2297
2297
|
}
|
|
2298
2298
|
)
|
|
2299
|
-
},
|
|
2300
|
-
b = r.transforms[
|
|
2299
|
+
}, T = -1; ++T < r.transforms.length; )
|
|
2300
|
+
b = r.transforms[T](b) || b;
|
|
2301
2301
|
return b;
|
|
2302
2302
|
}
|
|
2303
2303
|
function u(m, b, E) {
|
|
2304
|
-
let
|
|
2305
|
-
for (; ++
|
|
2306
|
-
const M = m[
|
|
2307
|
-
if (M[1].type === "listUnordered" || M[1].type === "listOrdered" || M[1].type === "blockQuote" ? (M[0] === "enter" ?
|
|
2308
|
-
if (
|
|
2309
|
-
let wn =
|
|
2304
|
+
let I = b - 1, T = -1, X = !1, an, rn, gn, kn;
|
|
2305
|
+
for (; ++I <= E; ) {
|
|
2306
|
+
const M = m[I];
|
|
2307
|
+
if (M[1].type === "listUnordered" || M[1].type === "listOrdered" || M[1].type === "blockQuote" ? (M[0] === "enter" ? T++ : T--, kn = void 0) : M[1].type === "lineEndingBlank" ? M[0] === "enter" && (an && !kn && !T && !gn && (gn = I), kn = void 0) : M[1].type === "linePrefix" || M[1].type === "listItemValue" || M[1].type === "listItemMarker" || M[1].type === "listItemPrefix" || M[1].type === "listItemPrefixWhitespace" || (kn = void 0), !T && M[0] === "enter" && M[1].type === "listItemPrefix" || T === -1 && M[0] === "exit" && (M[1].type === "listUnordered" || M[1].type === "listOrdered")) {
|
|
2308
|
+
if (an) {
|
|
2309
|
+
let wn = I;
|
|
2310
2310
|
for (rn = void 0; wn--; ) {
|
|
2311
2311
|
const un = m[wn];
|
|
2312
2312
|
if (un[1].type === "lineEnding" || un[1].type === "lineEndingBlank") {
|
|
@@ -2316,31 +2316,31 @@ function wr(n) {
|
|
|
2316
2316
|
} else if (!(un[1].type === "linePrefix" || un[1].type === "blockQuotePrefix" || un[1].type === "blockQuotePrefixWhitespace" || un[1].type === "blockQuoteMarker" || un[1].type === "listItemIndent"))
|
|
2317
2317
|
break;
|
|
2318
2318
|
}
|
|
2319
|
-
gn && (!rn || gn < rn) && (
|
|
2319
|
+
gn && (!rn || gn < rn) && (an._spread = !0), an.end = Object.assign(
|
|
2320
2320
|
{},
|
|
2321
2321
|
rn ? m[rn][1].start : M[1].end
|
|
2322
|
-
), m.splice(rn ||
|
|
2322
|
+
), m.splice(rn || I, 0, ["exit", an, M[2]]), I++, E++;
|
|
2323
2323
|
}
|
|
2324
|
-
M[1].type === "listItemPrefix" && (
|
|
2324
|
+
M[1].type === "listItemPrefix" && (an = {
|
|
2325
2325
|
type: "listItem",
|
|
2326
2326
|
// @ts-expect-error Patched
|
|
2327
2327
|
_spread: !1,
|
|
2328
2328
|
start: Object.assign({}, M[1].start)
|
|
2329
|
-
}, m.splice(
|
|
2329
|
+
}, m.splice(I, 0, ["enter", an, M[2]]), I++, E++, gn = void 0, kn = !0);
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
2332
|
return m[b][1]._spread = X, E;
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function l(m, b) {
|
|
2335
2335
|
t[m] = b;
|
|
2336
2336
|
}
|
|
2337
2337
|
function i(m) {
|
|
2338
2338
|
return t[m];
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function a(m, b) {
|
|
2341
2341
|
return E;
|
|
2342
|
-
function E(
|
|
2343
|
-
p.call(this, m(
|
|
2342
|
+
function E(I) {
|
|
2343
|
+
p.call(this, m(I), I), b && b.call(this, I);
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
2346
|
function c() {
|
|
@@ -2361,9 +2361,9 @@ function wr(n) {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
2363
|
function x(m, b) {
|
|
2364
|
-
const E = this.stack.pop(),
|
|
2365
|
-
if (
|
|
2366
|
-
|
|
2364
|
+
const E = this.stack.pop(), I = this.tokenStack.pop();
|
|
2365
|
+
if (I)
|
|
2366
|
+
I[0].type !== m.type && (b ? b.call(this, m, I[0]) : (I[1] || Xn).call(this, m, I[0]));
|
|
2367
2367
|
else
|
|
2368
2368
|
throw new Error(
|
|
2369
2369
|
"Cannot close `" + m.type + "` (" + yn({
|
|
@@ -2374,43 +2374,43 @@ function wr(n) {
|
|
|
2374
2374
|
return E.position.end = on(m.end), E;
|
|
2375
2375
|
}
|
|
2376
2376
|
function g() {
|
|
2377
|
-
return
|
|
2377
|
+
return It(this.stack.pop());
|
|
2378
2378
|
}
|
|
2379
2379
|
function f() {
|
|
2380
|
-
|
|
2380
|
+
l("expectingFirstListItemValue", !0);
|
|
2381
2381
|
}
|
|
2382
2382
|
function k(m) {
|
|
2383
2383
|
if (i("expectingFirstListItemValue")) {
|
|
2384
2384
|
const b = this.stack[this.stack.length - 2];
|
|
2385
|
-
b.start = Number.parseInt(this.sliceSerialize(m), 10),
|
|
2385
|
+
b.start = Number.parseInt(this.sliceSerialize(m), 10), l("expectingFirstListItemValue");
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
|
-
function
|
|
2388
|
+
function A() {
|
|
2389
2389
|
const m = this.resume(), b = this.stack[this.stack.length - 1];
|
|
2390
2390
|
b.lang = m;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function L() {
|
|
2393
2393
|
const m = this.resume(), b = this.stack[this.stack.length - 1];
|
|
2394
2394
|
b.meta = m;
|
|
2395
2395
|
}
|
|
2396
2396
|
function y() {
|
|
2397
|
-
i("flowCodeInside") || (this.buffer(),
|
|
2397
|
+
i("flowCodeInside") || (this.buffer(), l("flowCodeInside", !0));
|
|
2398
2398
|
}
|
|
2399
2399
|
function _() {
|
|
2400
2400
|
const m = this.resume(), b = this.stack[this.stack.length - 1];
|
|
2401
|
-
b.value = m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""),
|
|
2401
|
+
b.value = m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), l("flowCodeInside");
|
|
2402
2402
|
}
|
|
2403
2403
|
function F() {
|
|
2404
2404
|
const m = this.resume(), b = this.stack[this.stack.length - 1];
|
|
2405
2405
|
b.value = m.replace(/(\r?\n|\r)$/g, "");
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2407
|
+
function O(m) {
|
|
2408
2408
|
const b = this.resume(), E = this.stack[this.stack.length - 1];
|
|
2409
2409
|
E.label = b, E.identifier = fn(
|
|
2410
2410
|
this.sliceSerialize(m)
|
|
2411
2411
|
).toLowerCase();
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2413
|
+
function D() {
|
|
2414
2414
|
const m = this.resume(), b = this.stack[this.stack.length - 1];
|
|
2415
2415
|
b.title = m;
|
|
2416
2416
|
}
|
|
@@ -2426,19 +2426,19 @@ function wr(n) {
|
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
2428
|
function R() {
|
|
2429
|
-
|
|
2429
|
+
l("setextHeadingSlurpLineEnding", !0);
|
|
2430
2430
|
}
|
|
2431
2431
|
function j(m) {
|
|
2432
2432
|
const b = this.stack[this.stack.length - 1];
|
|
2433
2433
|
b.depth = this.sliceSerialize(m).charCodeAt(0) === 61 ? 1 : 2;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2436
|
-
|
|
2435
|
+
function N() {
|
|
2436
|
+
l("setextHeadingSlurpLineEnding");
|
|
2437
2437
|
}
|
|
2438
2438
|
function S(m) {
|
|
2439
2439
|
const b = this.stack[this.stack.length - 1];
|
|
2440
2440
|
let E = b.children[b.children.length - 1];
|
|
2441
|
-
(!E || E.type !== "text") && (E =
|
|
2441
|
+
(!E || E.type !== "text") && (E = Et(), E.position = {
|
|
2442
2442
|
start: on(m.start)
|
|
2443
2443
|
}, b.children.push(E)), this.stack.push(E);
|
|
2444
2444
|
}
|
|
@@ -2446,17 +2446,17 @@ function wr(n) {
|
|
|
2446
2446
|
const b = this.stack.pop();
|
|
2447
2447
|
b.value += this.sliceSerialize(m), b.position.end = on(m.end);
|
|
2448
2448
|
}
|
|
2449
|
-
function
|
|
2449
|
+
function z(m) {
|
|
2450
2450
|
const b = this.stack[this.stack.length - 1];
|
|
2451
2451
|
if (i("atHardBreak")) {
|
|
2452
2452
|
const E = b.children[b.children.length - 1];
|
|
2453
|
-
E.position.end = on(m.end),
|
|
2453
|
+
E.position.end = on(m.end), l("atHardBreak");
|
|
2454
2454
|
return;
|
|
2455
2455
|
}
|
|
2456
2456
|
!i("setextHeadingSlurpLineEnding") && r.canContainEols.includes(b.type) && (S.call(this, m), w.call(this, m));
|
|
2457
2457
|
}
|
|
2458
2458
|
function U() {
|
|
2459
|
-
|
|
2459
|
+
l("atHardBreak", !0);
|
|
2460
2460
|
}
|
|
2461
2461
|
function G() {
|
|
2462
2462
|
const m = this.resume(), b = this.stack[this.stack.length - 1];
|
|
@@ -2477,7 +2477,7 @@ function wr(n) {
|
|
|
2477
2477
|
m.type += "Reference", m.referenceType = b, delete m.url, delete m.title;
|
|
2478
2478
|
} else
|
|
2479
2479
|
delete m.identifier, delete m.label;
|
|
2480
|
-
|
|
2480
|
+
l("referenceType");
|
|
2481
2481
|
}
|
|
2482
2482
|
function W() {
|
|
2483
2483
|
const m = this.stack[this.stack.length - 1];
|
|
@@ -2486,17 +2486,17 @@ function wr(n) {
|
|
|
2486
2486
|
m.type += "Reference", m.referenceType = b, delete m.url, delete m.title;
|
|
2487
2487
|
} else
|
|
2488
2488
|
delete m.identifier, delete m.label;
|
|
2489
|
-
|
|
2489
|
+
l("referenceType");
|
|
2490
2490
|
}
|
|
2491
2491
|
function H(m) {
|
|
2492
2492
|
const b = this.sliceSerialize(m), E = this.stack[this.stack.length - 2];
|
|
2493
|
-
E.label =
|
|
2493
|
+
E.label = Fr(b), E.identifier = fn(b).toLowerCase();
|
|
2494
2494
|
}
|
|
2495
2495
|
function s() {
|
|
2496
2496
|
const m = this.stack[this.stack.length - 1], b = this.resume(), E = this.stack[this.stack.length - 1];
|
|
2497
|
-
if (
|
|
2498
|
-
const
|
|
2499
|
-
E.children =
|
|
2497
|
+
if (l("inReference", !0), E.type === "link") {
|
|
2498
|
+
const I = m.children;
|
|
2499
|
+
E.children = I;
|
|
2500
2500
|
} else
|
|
2501
2501
|
E.alt = b;
|
|
2502
2502
|
}
|
|
@@ -2509,29 +2509,29 @@ function wr(n) {
|
|
|
2509
2509
|
b.title = m;
|
|
2510
2510
|
}
|
|
2511
2511
|
function xn() {
|
|
2512
|
-
|
|
2512
|
+
l("inReference");
|
|
2513
2513
|
}
|
|
2514
2514
|
function hn() {
|
|
2515
|
-
|
|
2515
|
+
l("referenceType", "collapsed");
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2517
|
+
function V(m) {
|
|
2518
2518
|
const b = this.resume(), E = this.stack[this.stack.length - 1];
|
|
2519
2519
|
E.label = b, E.identifier = fn(
|
|
2520
2520
|
this.sliceSerialize(m)
|
|
2521
|
-
).toLowerCase(),
|
|
2521
|
+
).toLowerCase(), l("referenceType", "full");
|
|
2522
2522
|
}
|
|
2523
2523
|
function K(m) {
|
|
2524
|
-
|
|
2524
|
+
l("characterReferenceType", m.type);
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2526
|
+
function ln(m) {
|
|
2527
2527
|
const b = this.sliceSerialize(m), E = i("characterReferenceType");
|
|
2528
|
-
let
|
|
2529
|
-
E ? (
|
|
2528
|
+
let I;
|
|
2529
|
+
E ? (I = ht(
|
|
2530
2530
|
b,
|
|
2531
2531
|
E === "characterReferenceMarkerNumeric" ? 10 : 16
|
|
2532
|
-
),
|
|
2533
|
-
const
|
|
2534
|
-
|
|
2532
|
+
), l("characterReferenceType")) : I = Ln(b);
|
|
2533
|
+
const T = this.stack.pop();
|
|
2534
|
+
T.value += I, T.position.end = on(m.end);
|
|
2535
2535
|
}
|
|
2536
2536
|
function pn(m) {
|
|
2537
2537
|
w.call(this, m);
|
|
@@ -2557,13 +2557,13 @@ function wr(n) {
|
|
|
2557
2557
|
value: ""
|
|
2558
2558
|
};
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function kt() {
|
|
2561
2561
|
return {
|
|
2562
2562
|
type: "inlineCode",
|
|
2563
2563
|
value: ""
|
|
2564
2564
|
};
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2566
|
+
function dt() {
|
|
2567
2567
|
return {
|
|
2568
2568
|
type: "definition",
|
|
2569
2569
|
identifier: "",
|
|
@@ -2572,7 +2572,7 @@ function wr(n) {
|
|
|
2572
2572
|
url: ""
|
|
2573
2573
|
};
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2575
|
+
function bt() {
|
|
2576
2576
|
return {
|
|
2577
2577
|
type: "emphasis",
|
|
2578
2578
|
children: []
|
|
@@ -2596,7 +2596,7 @@ function wr(n) {
|
|
|
2596
2596
|
value: ""
|
|
2597
2597
|
};
|
|
2598
2598
|
}
|
|
2599
|
-
function
|
|
2599
|
+
function yt() {
|
|
2600
2600
|
return {
|
|
2601
2601
|
type: "image",
|
|
2602
2602
|
title: null,
|
|
@@ -2622,7 +2622,7 @@ function wr(n) {
|
|
|
2622
2622
|
children: []
|
|
2623
2623
|
};
|
|
2624
2624
|
}
|
|
2625
|
-
function
|
|
2625
|
+
function St(m) {
|
|
2626
2626
|
return {
|
|
2627
2627
|
type: "listItem",
|
|
2628
2628
|
// @ts-expect-error Patched.
|
|
@@ -2631,25 +2631,25 @@ function wr(n) {
|
|
|
2631
2631
|
children: []
|
|
2632
2632
|
};
|
|
2633
2633
|
}
|
|
2634
|
-
function
|
|
2634
|
+
function Ft() {
|
|
2635
2635
|
return {
|
|
2636
2636
|
type: "paragraph",
|
|
2637
2637
|
children: []
|
|
2638
2638
|
};
|
|
2639
2639
|
}
|
|
2640
|
-
function
|
|
2640
|
+
function wt() {
|
|
2641
2641
|
return {
|
|
2642
2642
|
type: "strong",
|
|
2643
2643
|
children: []
|
|
2644
2644
|
};
|
|
2645
2645
|
}
|
|
2646
|
-
function
|
|
2646
|
+
function Et() {
|
|
2647
2647
|
return {
|
|
2648
2648
|
type: "text",
|
|
2649
2649
|
value: ""
|
|
2650
2650
|
};
|
|
2651
2651
|
}
|
|
2652
|
-
function
|
|
2652
|
+
function Ct() {
|
|
2653
2653
|
return {
|
|
2654
2654
|
type: "thematicBreak"
|
|
2655
2655
|
};
|
|
@@ -2666,10 +2666,10 @@ function ft(n, r) {
|
|
|
2666
2666
|
let t = -1;
|
|
2667
2667
|
for (; ++t < r.length; ) {
|
|
2668
2668
|
const e = r[t];
|
|
2669
|
-
Array.isArray(e) ? ft(n, e) :
|
|
2669
|
+
Array.isArray(e) ? ft(n, e) : Cr(n, e);
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function Cr(n, r) {
|
|
2673
2673
|
let t;
|
|
2674
2674
|
for (t in r)
|
|
2675
2675
|
if (pt.call(r, t)) {
|
|
@@ -2701,98 +2701,116 @@ function Xn(n, r) {
|
|
|
2701
2701
|
}) + ") is still open"
|
|
2702
2702
|
);
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2704
|
+
function Ar(n) {
|
|
2705
2705
|
const r = n.replace(/\n{2,}/g, `
|
|
2706
2706
|
`);
|
|
2707
|
-
return
|
|
2707
|
+
return At(r);
|
|
2708
2708
|
}
|
|
2709
|
-
function
|
|
2710
|
-
const r =
|
|
2709
|
+
function zr(n) {
|
|
2710
|
+
const r = Ar(n), { children: t } = mt(r), e = [[]];
|
|
2711
2711
|
let u = 0;
|
|
2712
|
-
function
|
|
2712
|
+
function l(i, a = "normal") {
|
|
2713
2713
|
i.type === "text" ? i.value.split(`
|
|
2714
2714
|
`).forEach((p, h) => {
|
|
2715
2715
|
h !== 0 && (u++, e.push([])), p.split(" ").forEach((x) => {
|
|
2716
|
-
x && e[u].push({ content: x, type:
|
|
2716
|
+
x && e[u].push({ content: x, type: a });
|
|
2717
2717
|
});
|
|
2718
2718
|
}) : (i.type === "strong" || i.type === "emphasis") && i.children.forEach((c) => {
|
|
2719
|
-
|
|
2719
|
+
l(c, i.type);
|
|
2720
2720
|
});
|
|
2721
2721
|
}
|
|
2722
2722
|
return t.forEach((i) => {
|
|
2723
|
-
i.type === "paragraph" && i.children.forEach((
|
|
2724
|
-
a
|
|
2723
|
+
i.type === "paragraph" && i.children.forEach((a) => {
|
|
2724
|
+
l(a);
|
|
2725
2725
|
});
|
|
2726
2726
|
}), e;
|
|
2727
2727
|
}
|
|
2728
|
-
function
|
|
2728
|
+
function Ir(n) {
|
|
2729
2729
|
const { children: r } = mt(n);
|
|
2730
2730
|
function t(e) {
|
|
2731
2731
|
return e.type === "text" ? e.value.replace(/\n/g, "<br/>") : e.type === "strong" ? `<strong>${e.children.map(t).join("")}</strong>` : e.type === "emphasis" ? `<em>${e.children.map(t).join("")}</em>` : e.type === "paragraph" ? `<p>${e.children.map(t).join("")}</p>` : `Unsupported markdown: ${e.type}`;
|
|
2732
2732
|
}
|
|
2733
2733
|
return r.map(t).join("");
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2735
|
+
function Tr(n, r) {
|
|
2736
2736
|
r && n.attr("style", r);
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2739
|
-
const
|
|
2738
|
+
function Br(n, r, t, e, u = !1) {
|
|
2739
|
+
const l = n.append("foreignObject"), i = l.append("xhtml:div"), a = r.label, c = r.isNode ? "nodeLabel" : "edgeLabel";
|
|
2740
2740
|
i.html(
|
|
2741
2741
|
`
|
|
2742
|
-
<span class="${c} ${e}" ` + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" +
|
|
2743
|
-
),
|
|
2742
|
+
<span class="${c} ${e}" ` + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + a + "</span>"
|
|
2743
|
+
), Tr(i, r.labelStyle), i.style("display", "table-cell"), i.style("white-space", "nowrap"), i.style("max-width", t + "px"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), u && i.attr("class", "labelBkg");
|
|
2744
2744
|
let p = i.node().getBoundingClientRect();
|
|
2745
|
-
return p.width === t && (i.style("display", "table"), i.style("white-space", "break-spaces"), i.style("width", t + "px"), p = i.node().getBoundingClientRect()),
|
|
2745
|
+
return p.width === t && (i.style("display", "table"), i.style("white-space", "break-spaces"), i.style("width", t + "px"), p = i.node().getBoundingClientRect()), l.style("width", p.width), l.style("height", p.height), l.node();
|
|
2746
2746
|
}
|
|
2747
|
-
function
|
|
2747
|
+
function xt(n, r, t) {
|
|
2748
2748
|
return n.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", r * t - 0.1 + "em").attr("dy", t + "em");
|
|
2749
2749
|
}
|
|
2750
|
-
function
|
|
2751
|
-
const
|
|
2752
|
-
|
|
2753
|
-
const l =
|
|
2754
|
-
|
|
2750
|
+
function vn(n, r, t) {
|
|
2751
|
+
const e = n.append("text"), u = xt(e, 1, r);
|
|
2752
|
+
gt(u, [{ content: t, type: "normal" }]);
|
|
2753
|
+
const l = u.node().getComputedTextLength();
|
|
2754
|
+
return e.remove(), l;
|
|
2755
|
+
}
|
|
2756
|
+
function Lr(n, r, t, e = !1) {
|
|
2757
|
+
const l = r.append("g");
|
|
2758
|
+
let i = l.insert("rect").attr("class", "background");
|
|
2759
|
+
const a = l.append("text").attr("y", "-10.1");
|
|
2760
|
+
let c = 0;
|
|
2755
2761
|
if (t.forEach((p) => {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2762
|
+
let h = p.map((A) => A.content).join(" "), x = "", g = [], f = 0;
|
|
2763
|
+
if (vn(l, 1.1, h) <= n)
|
|
2764
|
+
g.push(h);
|
|
2765
|
+
else {
|
|
2766
|
+
for (let A = 0; A <= h.length; A++)
|
|
2767
|
+
if (x = h.slice(f, A), nt.info(x, f, A), vn(l, 1.1, x) > n) {
|
|
2768
|
+
const y = h.slice(f, A).lastIndexOf(" ");
|
|
2769
|
+
y > -1 && (A = f + y + 1), g.push(h.slice(f, A).trim()), f = A, x = null;
|
|
2770
|
+
}
|
|
2771
|
+
x != null && g.push(x);
|
|
2772
|
+
}
|
|
2773
|
+
const k = g.map((A) => ({ content: A, type: p.type }));
|
|
2774
|
+
for (const A of k) {
|
|
2775
|
+
let L = xt(a, c, 1.1);
|
|
2776
|
+
gt(L, [A]), c++;
|
|
2777
|
+
}
|
|
2760
2778
|
}), e) {
|
|
2761
|
-
const p =
|
|
2762
|
-
return i.attr("x", -h).attr("y", -h).attr("width", p.width + 2 * h).attr("height", p.height + 2 * h),
|
|
2779
|
+
const p = a.node().getBBox(), h = 2;
|
|
2780
|
+
return i.attr("x", -h).attr("y", -h).attr("width", p.width + 2 * h).attr("height", p.height + 2 * h), l.node();
|
|
2763
2781
|
} else
|
|
2764
|
-
return
|
|
2782
|
+
return a.node();
|
|
2765
2783
|
}
|
|
2766
|
-
function
|
|
2784
|
+
function gt(n, r) {
|
|
2767
2785
|
n.text(""), r.forEach((t, e) => {
|
|
2768
2786
|
const u = n.append("tspan").attr("font-style", t.type === "em" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", t.type === "strong" ? "bold" : "normal");
|
|
2769
2787
|
e === 0 ? u.text(t.content) : u.text(" " + t.content);
|
|
2770
2788
|
});
|
|
2771
2789
|
}
|
|
2772
|
-
const
|
|
2790
|
+
const Dr = (n, r = "", {
|
|
2773
2791
|
style: t = "",
|
|
2774
2792
|
isTitle: e = !1,
|
|
2775
2793
|
classes: u = "",
|
|
2776
|
-
useHtmlLabels:
|
|
2794
|
+
useHtmlLabels: l = !0,
|
|
2777
2795
|
isNode: i = !0,
|
|
2778
|
-
width:
|
|
2796
|
+
width: a,
|
|
2779
2797
|
addSvgBackground: c = !1
|
|
2780
2798
|
} = {}) => {
|
|
2781
|
-
if (
|
|
2782
|
-
const p =
|
|
2799
|
+
if (nt.info("createText", r, t, e, u, l, i, c), l) {
|
|
2800
|
+
const p = Ir(r), h = {
|
|
2783
2801
|
isNode: i,
|
|
2784
|
-
label:
|
|
2802
|
+
label: zt(p).replace(
|
|
2785
2803
|
/fa[blrs]?:fa-[\w-]+/g,
|
|
2786
2804
|
(g) => `<i class='${g.replace(":", " ")}'></i>`
|
|
2787
2805
|
),
|
|
2788
2806
|
labelStyle: t.replace("fill:", "color:")
|
|
2789
2807
|
};
|
|
2790
|
-
return
|
|
2808
|
+
return Br(n, h, a, u, c);
|
|
2791
2809
|
} else {
|
|
2792
|
-
const p =
|
|
2793
|
-
return
|
|
2810
|
+
const p = zr(r);
|
|
2811
|
+
return Lr(a, n, p, c);
|
|
2794
2812
|
}
|
|
2795
2813
|
};
|
|
2796
2814
|
export {
|
|
2797
|
-
|
|
2815
|
+
Dr as c
|
|
2798
2816
|
};
|