@digipair/skill-web-chatbot 0.114.2 → 0.114.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/index.cjs.js +2118 -8
- package/dist/index.esm2.js +5 -5
- package/package.json +6 -2
- package/dist/SAP-icons.cjs.js +0 -2489
- package/dist/SAP-icons.cjs2.js +0 -2489
- package/dist/Tableau10-558cc280.cjs.js +0 -9
- package/dist/arc-d1f6357e.cjs.js +0 -88
- package/dist/array-2ff2c7a6.cjs.js +0 -11
- package/dist/blockDiagram-5dc23a45.cjs.js +0 -2916
- package/dist/c4Diagram-1e775db3.cjs.js +0 -4386
- package/dist/channel-ebbc4130.cjs.js +0 -9
- package/dist/classDiagram-f52caa06.cjs.js +0 -209
- package/dist/classDiagram-v2-640c694e.cjs.js +0 -401
- package/dist/clone-afc2f047.cjs.js +0 -10
- package/dist/createText-03b82060.cjs.js +0 -2940
- package/dist/edges-16357fde.cjs.js +0 -2002
- package/dist/erDiagram-c7ff1bec.cjs.js +0 -1807
- package/dist/flowDb-9a89ea33.cjs.js +0 -5542
- package/dist/flowDiagram-aadb13b0.cjs.js +0 -1351
- package/dist/flowDiagram-v2-f2119625.cjs.js +0 -31
- package/dist/flowchart-elk-definition-cf813a97.cjs.js +0 -50248
- package/dist/ganttDiagram-3c2fde2b.cjs.js +0 -3710
- package/dist/gitGraphDiagram-c3a0619c.cjs.js +0 -3815
- package/dist/graph-0ee63739.cjs.js +0 -954
- package/dist/index-bb6d8841.cjs.js +0 -648
- package/dist/index.cjs2.js +0 -76743
- package/dist/infoDiagram-2f5c50c0.cjs.js +0 -460
- package/dist/init-f9637058.cjs.js +0 -17
- package/dist/journeyDiagram-14fe341a.cjs.js +0 -1061
- package/dist/katex-d90b6d29.cjs.js +0 -25690
- package/dist/layout-fd473db2.cjs.js +0 -1613
- package/dist/line-24d93f1b.cjs.js +0 -34
- package/dist/linear-9bcf74c4.cjs.js +0 -537
- package/dist/mindmap-definition-9399c7e6.cjs.js +0 -20488
- package/dist/ordinal-5695958c.cjs.js +0 -330
- package/dist/path-428ebac9.cjs.js +0 -316
- package/dist/pieDiagram-828dae43.cjs.js +0 -949
- package/dist/quadrantDiagram-5fa00455.cjs.js +0 -2409
- package/dist/requirementDiagram-03163dc4.cjs.js +0 -2267
- package/dist/sankeyDiagram-52ec8976.cjs.js +0 -1848
- package/dist/sequenceDiagram-b517d154.cjs.js +0 -5948
- package/dist/stateDiagram-fca82b5b.cjs.js +0 -283
- package/dist/stateDiagram-v2-ed04200a.cjs.js +0 -373
- package/dist/styles-11e81fdd.cjs.js +0 -3943
- package/dist/styles-cacbff60.cjs.js +0 -2120
- package/dist/styles-e75131e4.cjs.js +0 -671
- package/dist/svgDrawCommon-ecc5f780.cjs.js +0 -68
- package/dist/timeline-definition-4ee9bff4.cjs.js +0 -1161
- package/dist/xychartDiagram-e5e6b652.cjs.js +0 -3150
|
@@ -1,2940 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index.cjs2.js');
|
|
4
|
-
|
|
5
|
-
function _array_like_to_array(arr, len) {
|
|
6
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
7
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
8
|
-
return arr2;
|
|
9
|
-
}
|
|
10
|
-
function _array_with_holes(arr) {
|
|
11
|
-
if (Array.isArray(arr)) return arr;
|
|
12
|
-
}
|
|
13
|
-
function _array_without_holes(arr) {
|
|
14
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
15
|
-
}
|
|
16
|
-
function _define_property(obj, key, value) {
|
|
17
|
-
if (key in obj) {
|
|
18
|
-
Object.defineProperty(obj, key, {
|
|
19
|
-
value: value,
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
obj[key] = value;
|
|
26
|
-
}
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
|
-
function _iterable_to_array(iter) {
|
|
30
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
31
|
-
}
|
|
32
|
-
function _iterable_to_array_limit(arr, i) {
|
|
33
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
34
|
-
if (_i == null) return;
|
|
35
|
-
var _arr = [];
|
|
36
|
-
var _n = true;
|
|
37
|
-
var _d = false;
|
|
38
|
-
var _s, _e;
|
|
39
|
-
try {
|
|
40
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
41
|
-
_arr.push(_s.value);
|
|
42
|
-
if (i && _arr.length === i) break;
|
|
43
|
-
}
|
|
44
|
-
} catch (err) {
|
|
45
|
-
_d = true;
|
|
46
|
-
_e = err;
|
|
47
|
-
} finally{
|
|
48
|
-
try {
|
|
49
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
50
|
-
} finally{
|
|
51
|
-
if (_d) throw _e;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return _arr;
|
|
55
|
-
}
|
|
56
|
-
function _non_iterable_rest() {
|
|
57
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
|
-
}
|
|
59
|
-
function _non_iterable_spread() {
|
|
60
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
61
|
-
}
|
|
62
|
-
function _sliced_to_array(arr, i) {
|
|
63
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
64
|
-
}
|
|
65
|
-
function _to_array(arr) {
|
|
66
|
-
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
67
|
-
}
|
|
68
|
-
function _to_consumable_array(arr) {
|
|
69
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
70
|
-
}
|
|
71
|
-
function _type_of(obj) {
|
|
72
|
-
"@swc/helpers - typeof";
|
|
73
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
74
|
-
}
|
|
75
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
76
|
-
if (!o) return;
|
|
77
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
78
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
80
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
81
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
82
|
-
}
|
|
83
|
-
var Tt = {};
|
|
84
|
-
function Bt(n, r) {
|
|
85
|
-
var t = Tt, e = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : true, u = typeof t.includeHtml == "boolean" ? t.includeHtml : true;
|
|
86
|
-
return et(n, e, u);
|
|
87
|
-
}
|
|
88
|
-
function et(n, r, t) {
|
|
89
|
-
if (Lt(n)) {
|
|
90
|
-
if ("value" in n) return n.type === "html" && !t ? "" : n.value;
|
|
91
|
-
if (r && "alt" in n && n.alt) return n.alt;
|
|
92
|
-
if ("children" in n) return Vn(n.children, r, t);
|
|
93
|
-
}
|
|
94
|
-
return Array.isArray(n) ? Vn(n, r, t) : "";
|
|
95
|
-
}
|
|
96
|
-
function Vn(n, r, t) {
|
|
97
|
-
var e = [];
|
|
98
|
-
var u = -1;
|
|
99
|
-
for(; ++u < n.length;)e[u] = et(n[u], r, t);
|
|
100
|
-
return e.join("");
|
|
101
|
-
}
|
|
102
|
-
function Lt(n) {
|
|
103
|
-
return !!(n && (typeof n === "undefined" ? "undefined" : _type_of(n)) == "object");
|
|
104
|
-
}
|
|
105
|
-
function tn(n, r, t, e) {
|
|
106
|
-
var _n, _n1;
|
|
107
|
-
var u = n.length;
|
|
108
|
-
var i = 0, l;
|
|
109
|
-
if (r < 0 ? r = -r > u ? 0 : u + r : r = r > u ? u : r, t = t > 0 ? t : 0, e.length < 1e4) l = Array.from(e), l.unshift(r, t), (_n = n).splice.apply(_n, _to_consumable_array(l));
|
|
110
|
-
else for(t && n.splice(r, t); i < e.length;)l = e.slice(i, i + 1e4), l.unshift(r, 0), (_n1 = n).splice.apply(_n1, _to_consumable_array(l)), i += 1e4, r += 1e4;
|
|
111
|
-
}
|
|
112
|
-
function Y(n, r) {
|
|
113
|
-
return n.length > 0 ? (tn(n, n.length, 0, r), n) : r;
|
|
114
|
-
}
|
|
115
|
-
var Wn = {}.hasOwnProperty;
|
|
116
|
-
function Ot(n) {
|
|
117
|
-
var r = {};
|
|
118
|
-
var t = -1;
|
|
119
|
-
for(; ++t < n.length;)Dt(r, n[t]);
|
|
120
|
-
return r;
|
|
121
|
-
}
|
|
122
|
-
function Dt(n, r) {
|
|
123
|
-
var t;
|
|
124
|
-
for(t in r){
|
|
125
|
-
var u = (Wn.call(n, t) ? n[t] : void 0) || (n[t] = {}), i = r[t];
|
|
126
|
-
var l = void 0;
|
|
127
|
-
if (i) for(l in i){
|
|
128
|
-
Wn.call(u, l) || (u[l] = []);
|
|
129
|
-
var a = i[l];
|
|
130
|
-
Pt(// @ts-expect-error Looks like a list.
|
|
131
|
-
u[l], Array.isArray(a) ? a : a ? [
|
|
132
|
-
a
|
|
133
|
-
] : []);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
function Pt(n, r) {
|
|
138
|
-
var t = -1;
|
|
139
|
-
var e = [];
|
|
140
|
-
for(; ++t < r.length;)(r[t].add === "after" ? n : e).push(r[t]);
|
|
141
|
-
tn(n, 0, 0, e);
|
|
142
|
-
}
|
|
143
|
-
var _t = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\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\u1B7D\u1B7E\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-\u2E5D\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]/, nn = cn(/[A-Za-z]/), v = cn(/[\dA-Za-z]/), Mt = cn(/[#-'*+\--9=?A-Z^-~]/);
|
|
144
|
-
function An(n) {
|
|
145
|
-
return(// Special whitespace codes (which have negative values), C0 and Control
|
|
146
|
-
// character DEL
|
|
147
|
-
n !== null && (n < 32 || n === 127));
|
|
148
|
-
}
|
|
149
|
-
var zn = cn(/\d/), jt = cn(/[\dA-Fa-f]/), Rt = cn(/[!-/:-@[-`{-~]/);
|
|
150
|
-
function C(n) {
|
|
151
|
-
return n !== null && n < -2;
|
|
152
|
-
}
|
|
153
|
-
function Z(n) {
|
|
154
|
-
return n !== null && (n < 0 || n === 32);
|
|
155
|
-
}
|
|
156
|
-
function z(n) {
|
|
157
|
-
return n === -2 || n === -1 || n === 32;
|
|
158
|
-
}
|
|
159
|
-
var qt = cn(_t), Ht = cn(/\s/);
|
|
160
|
-
function cn(n) {
|
|
161
|
-
return r;
|
|
162
|
-
function r(t) {
|
|
163
|
-
return t !== null && n.test(String.fromCharCode(t));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function O(n, r, t, e) {
|
|
167
|
-
var u = e ? e - 1 : Number.POSITIVE_INFINITY;
|
|
168
|
-
var i = 0;
|
|
169
|
-
return l;
|
|
170
|
-
function l(m) {
|
|
171
|
-
return z(m) ? (n.enter(t), a(m)) : r(m);
|
|
172
|
-
}
|
|
173
|
-
function a(m) {
|
|
174
|
-
return z(m) && i++ < u ? (n.consume(m), a) : (n.exit(t), r(m));
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
var Nt = {
|
|
178
|
-
tokenize: Vt
|
|
179
|
-
};
|
|
180
|
-
function Vt(n) {
|
|
181
|
-
var r = n.attempt(this.parser.constructs.contentInitial, e, u);
|
|
182
|
-
var t;
|
|
183
|
-
return r;
|
|
184
|
-
function e(a) {
|
|
185
|
-
if (a === null) {
|
|
186
|
-
n.consume(a);
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
return n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), O(n, r, "linePrefix");
|
|
190
|
-
}
|
|
191
|
-
function u(a) {
|
|
192
|
-
return n.enter("paragraph"), i(a);
|
|
193
|
-
}
|
|
194
|
-
function i(a) {
|
|
195
|
-
var m = n.enter("chunkText", {
|
|
196
|
-
contentType: "text",
|
|
197
|
-
previous: t
|
|
198
|
-
});
|
|
199
|
-
return t && (t.next = m), t = m, l(a);
|
|
200
|
-
}
|
|
201
|
-
function l(a) {
|
|
202
|
-
if (a === null) {
|
|
203
|
-
n.exit("chunkText"), n.exit("paragraph"), n.consume(a);
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
return C(a) ? (n.consume(a), n.exit("chunkText"), i) : (n.consume(a), l);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
var Wt = {
|
|
210
|
-
tokenize: Qt
|
|
211
|
-
}, Qn = {
|
|
212
|
-
tokenize: Ut
|
|
213
|
-
};
|
|
214
|
-
function Qt(n) {
|
|
215
|
-
var r = this, t = [];
|
|
216
|
-
var e = 0, u, i, l;
|
|
217
|
-
return a;
|
|
218
|
-
function a(F) {
|
|
219
|
-
if (e < t.length) {
|
|
220
|
-
var D = t[e];
|
|
221
|
-
return r.containerState = D[1], n.attempt(D[0].continuation, m, c)(F);
|
|
222
|
-
}
|
|
223
|
-
return c(F);
|
|
224
|
-
}
|
|
225
|
-
function m(F) {
|
|
226
|
-
if (e++, r.containerState._closeFlow) {
|
|
227
|
-
r.containerState._closeFlow = void 0, u && j();
|
|
228
|
-
var D = r.events.length;
|
|
229
|
-
var _ = D, k;
|
|
230
|
-
for(; _--;)if (r.events[_][0] === "exit" && r.events[_][1].type === "chunkFlow") {
|
|
231
|
-
k = r.events[_][1].end;
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
b(e);
|
|
235
|
-
var T = D;
|
|
236
|
-
for(; T < r.events.length;)r.events[T][1].end = Object.assign({}, k), T++;
|
|
237
|
-
return tn(r.events, _ + 1, 0, r.events.slice(D)), r.events.length = T, c(F);
|
|
238
|
-
}
|
|
239
|
-
return a(F);
|
|
240
|
-
}
|
|
241
|
-
function c(F) {
|
|
242
|
-
if (e === t.length) {
|
|
243
|
-
if (!u) return x(F);
|
|
244
|
-
if (u.currentConstruct && u.currentConstruct.concrete) return A(F);
|
|
245
|
-
r.interrupt = !!(u.currentConstruct && !u._gfmTableDynamicInterruptHack);
|
|
246
|
-
}
|
|
247
|
-
return r.containerState = {}, n.check(Qn, p, f)(F);
|
|
248
|
-
}
|
|
249
|
-
function p(F) {
|
|
250
|
-
return u && j(), b(e), x(F);
|
|
251
|
-
}
|
|
252
|
-
function f(F) {
|
|
253
|
-
return r.parser.lazy[r.now().line] = e !== t.length, l = r.now().offset, A(F);
|
|
254
|
-
}
|
|
255
|
-
function x(F) {
|
|
256
|
-
return r.containerState = {}, n.attempt(Qn, h, A)(F);
|
|
257
|
-
}
|
|
258
|
-
function h(F) {
|
|
259
|
-
return e++, t.push([
|
|
260
|
-
r.currentConstruct,
|
|
261
|
-
r.containerState
|
|
262
|
-
]), x(F);
|
|
263
|
-
}
|
|
264
|
-
function A(F) {
|
|
265
|
-
if (F === null) {
|
|
266
|
-
u && j(), b(0), n.consume(F);
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
return u = u || r.parser.flow(r.now()), n.enter("chunkFlow", {
|
|
270
|
-
contentType: "flow",
|
|
271
|
-
previous: i,
|
|
272
|
-
_tokenizer: u
|
|
273
|
-
}), I(F);
|
|
274
|
-
}
|
|
275
|
-
function I(F) {
|
|
276
|
-
if (F === null) {
|
|
277
|
-
M(n.exit("chunkFlow"), true), b(0), n.consume(F);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
return C(F) ? (n.consume(F), M(n.exit("chunkFlow")), e = 0, r.interrupt = void 0, a) : (n.consume(F), I);
|
|
281
|
-
}
|
|
282
|
-
function M(F, D) {
|
|
283
|
-
var _ = r.sliceStream(F);
|
|
284
|
-
if (D && _.push(null), F.previous = i, i && (i.next = F), i = F, u.defineSkip(F.start), u.write(_), r.parser.lazy[F.start.line]) {
|
|
285
|
-
var k = u.events.length;
|
|
286
|
-
for(; k--;)if (// The token starts before the line ending…
|
|
287
|
-
u.events[k][1].start.offset < l && // …and either is not ended yet…
|
|
288
|
-
(!u.events[k][1].end || // …or ends after it.
|
|
289
|
-
u.events[k][1].end.offset > l)) return;
|
|
290
|
-
var T = r.events.length;
|
|
291
|
-
var H = T, N, V;
|
|
292
|
-
for(; H--;)if (r.events[H][0] === "exit" && r.events[H][1].type === "chunkFlow") {
|
|
293
|
-
if (N) {
|
|
294
|
-
V = r.events[H][1].end;
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
N = true;
|
|
298
|
-
}
|
|
299
|
-
for(b(e), k = T; k < r.events.length;)r.events[k][1].end = Object.assign({}, V), k++;
|
|
300
|
-
tn(r.events, H + 1, 0, r.events.slice(T)), r.events.length = k;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
function b(F) {
|
|
304
|
-
var D = t.length;
|
|
305
|
-
for(; D-- > F;){
|
|
306
|
-
var _ = t[D];
|
|
307
|
-
r.containerState = _[1], _[0].exit.call(r, n);
|
|
308
|
-
}
|
|
309
|
-
t.length = F;
|
|
310
|
-
}
|
|
311
|
-
function j() {
|
|
312
|
-
u.write([
|
|
313
|
-
null
|
|
314
|
-
]), i = void 0, u = void 0, r.containerState._closeFlow = void 0;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
function Ut(n, r, t) {
|
|
318
|
-
return O(n, n.attempt(this.parser.constructs.document, r, t), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
319
|
-
}
|
|
320
|
-
function Un(n) {
|
|
321
|
-
if (n === null || Z(n) || Ht(n)) return 1;
|
|
322
|
-
if (qt(n)) return 2;
|
|
323
|
-
}
|
|
324
|
-
function Ln(n, r, t) {
|
|
325
|
-
var e = [];
|
|
326
|
-
var u = -1;
|
|
327
|
-
for(; ++u < n.length;){
|
|
328
|
-
var i = n[u].resolveAll;
|
|
329
|
-
i && !e.includes(i) && (r = i(r, t), e.push(i));
|
|
330
|
-
}
|
|
331
|
-
return r;
|
|
332
|
-
}
|
|
333
|
-
var In = {
|
|
334
|
-
name: "attention",
|
|
335
|
-
tokenize: Zt,
|
|
336
|
-
resolveAll: $t
|
|
337
|
-
};
|
|
338
|
-
function $t(n, r) {
|
|
339
|
-
var t = -1, e, u, i, l, a, m, c, p;
|
|
340
|
-
for(; ++t < n.length;)if (n[t][0] === "enter" && n[t][1].type === "attentionSequence" && n[t][1]._close) {
|
|
341
|
-
for(e = t; e--;)if (n[e][0] === "exit" && n[e][1].type === "attentionSequence" && n[e][1]._open && // If the markers are the same:
|
|
342
|
-
r.sliceSerialize(n[e][1]).charCodeAt(0) === r.sliceSerialize(n[t][1]).charCodeAt(0)) {
|
|
343
|
-
if ((n[e][1]._close || n[t][1]._open) && (n[t][1].end.offset - n[t][1].start.offset) % 3 && !((n[e][1].end.offset - n[e][1].start.offset + n[t][1].end.offset - n[t][1].start.offset) % 3)) continue;
|
|
344
|
-
m = n[e][1].end.offset - n[e][1].start.offset > 1 && n[t][1].end.offset - n[t][1].start.offset > 1 ? 2 : 1;
|
|
345
|
-
var f = Object.assign({}, n[e][1].end), x = Object.assign({}, n[t][1].start);
|
|
346
|
-
$n(f, -m), $n(x, m), l = {
|
|
347
|
-
type: m > 1 ? "strongSequence" : "emphasisSequence",
|
|
348
|
-
start: f,
|
|
349
|
-
end: Object.assign({}, n[e][1].end)
|
|
350
|
-
}, a = {
|
|
351
|
-
type: m > 1 ? "strongSequence" : "emphasisSequence",
|
|
352
|
-
start: Object.assign({}, n[t][1].start),
|
|
353
|
-
end: x
|
|
354
|
-
}, i = {
|
|
355
|
-
type: m > 1 ? "strongText" : "emphasisText",
|
|
356
|
-
start: Object.assign({}, n[e][1].end),
|
|
357
|
-
end: Object.assign({}, n[t][1].start)
|
|
358
|
-
}, u = {
|
|
359
|
-
type: m > 1 ? "strong" : "emphasis",
|
|
360
|
-
start: Object.assign({}, l.start),
|
|
361
|
-
end: Object.assign({}, a.end)
|
|
362
|
-
}, n[e][1].end = Object.assign({}, l.start), n[t][1].start = Object.assign({}, a.end), c = [], n[e][1].end.offset - n[e][1].start.offset && (c = Y(c, [
|
|
363
|
-
[
|
|
364
|
-
"enter",
|
|
365
|
-
n[e][1],
|
|
366
|
-
r
|
|
367
|
-
],
|
|
368
|
-
[
|
|
369
|
-
"exit",
|
|
370
|
-
n[e][1],
|
|
371
|
-
r
|
|
372
|
-
]
|
|
373
|
-
])), c = Y(c, [
|
|
374
|
-
[
|
|
375
|
-
"enter",
|
|
376
|
-
u,
|
|
377
|
-
r
|
|
378
|
-
],
|
|
379
|
-
[
|
|
380
|
-
"enter",
|
|
381
|
-
l,
|
|
382
|
-
r
|
|
383
|
-
],
|
|
384
|
-
[
|
|
385
|
-
"exit",
|
|
386
|
-
l,
|
|
387
|
-
r
|
|
388
|
-
],
|
|
389
|
-
[
|
|
390
|
-
"enter",
|
|
391
|
-
i,
|
|
392
|
-
r
|
|
393
|
-
]
|
|
394
|
-
]), c = Y(c, Ln(r.parser.constructs.insideSpan.null, n.slice(e + 1, t), r)), c = Y(c, [
|
|
395
|
-
[
|
|
396
|
-
"exit",
|
|
397
|
-
i,
|
|
398
|
-
r
|
|
399
|
-
],
|
|
400
|
-
[
|
|
401
|
-
"enter",
|
|
402
|
-
a,
|
|
403
|
-
r
|
|
404
|
-
],
|
|
405
|
-
[
|
|
406
|
-
"exit",
|
|
407
|
-
a,
|
|
408
|
-
r
|
|
409
|
-
],
|
|
410
|
-
[
|
|
411
|
-
"exit",
|
|
412
|
-
u,
|
|
413
|
-
r
|
|
414
|
-
]
|
|
415
|
-
]), n[t][1].end.offset - n[t][1].start.offset ? (p = 2, c = Y(c, [
|
|
416
|
-
[
|
|
417
|
-
"enter",
|
|
418
|
-
n[t][1],
|
|
419
|
-
r
|
|
420
|
-
],
|
|
421
|
-
[
|
|
422
|
-
"exit",
|
|
423
|
-
n[t][1],
|
|
424
|
-
r
|
|
425
|
-
]
|
|
426
|
-
])) : p = 0, tn(n, e - 1, t - e + 3, c), t = e + c.length - p - 2;
|
|
427
|
-
break;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
for(t = -1; ++t < n.length;)n[t][1].type === "attentionSequence" && (n[t][1].type = "data");
|
|
431
|
-
return n;
|
|
432
|
-
}
|
|
433
|
-
function Zt(n, r) {
|
|
434
|
-
var t = this.parser.constructs.attentionMarkers.null, e = this.previous, u = Un(e);
|
|
435
|
-
var i;
|
|
436
|
-
return l;
|
|
437
|
-
function l(m) {
|
|
438
|
-
return i = m, n.enter("attentionSequence"), a(m);
|
|
439
|
-
}
|
|
440
|
-
function a(m) {
|
|
441
|
-
if (m === i) return n.consume(m), a;
|
|
442
|
-
var c = n.exit("attentionSequence"), p = Un(m), f = !p || p === 2 && u || t.includes(m), x = !u || u === 2 && p || t.includes(e);
|
|
443
|
-
return c._open = !!(i === 42 ? f : f && (u || !x)), c._close = !!(i === 42 ? x : x && (p || !f)), r(m);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function $n(n, r) {
|
|
447
|
-
n.column += r, n.offset += r, n._bufferIndex += r;
|
|
448
|
-
}
|
|
449
|
-
var Yt = {
|
|
450
|
-
name: "autolink",
|
|
451
|
-
tokenize: Gt
|
|
452
|
-
};
|
|
453
|
-
function Gt(n, r, t) {
|
|
454
|
-
var e = 0;
|
|
455
|
-
return u;
|
|
456
|
-
function u(h) {
|
|
457
|
-
return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.enter("autolinkProtocol"), i;
|
|
458
|
-
}
|
|
459
|
-
function i(h) {
|
|
460
|
-
return nn(h) ? (n.consume(h), l) : c(h);
|
|
461
|
-
}
|
|
462
|
-
function l(h) {
|
|
463
|
-
return h === 43 || h === 45 || h === 46 || v(h) ? (e = 1, a(h)) : c(h);
|
|
464
|
-
}
|
|
465
|
-
function a(h) {
|
|
466
|
-
return h === 58 ? (n.consume(h), e = 0, m) : (h === 43 || h === 45 || h === 46 || v(h)) && e++ < 32 ? (n.consume(h), a) : (e = 0, c(h));
|
|
467
|
-
}
|
|
468
|
-
function m(h) {
|
|
469
|
-
return h === 62 ? (n.exit("autolinkProtocol"), n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.exit("autolink"), r) : h === null || h === 32 || h === 60 || An(h) ? t(h) : (n.consume(h), m);
|
|
470
|
-
}
|
|
471
|
-
function c(h) {
|
|
472
|
-
return h === 64 ? (n.consume(h), p) : Mt(h) ? (n.consume(h), c) : t(h);
|
|
473
|
-
}
|
|
474
|
-
function p(h) {
|
|
475
|
-
return v(h) ? f(h) : t(h);
|
|
476
|
-
}
|
|
477
|
-
function f(h) {
|
|
478
|
-
return h === 46 ? (n.consume(h), e = 0, p) : h === 62 ? (n.exit("autolinkProtocol").type = "autolinkEmail", n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.exit("autolink"), r) : x(h);
|
|
479
|
-
}
|
|
480
|
-
function x(h) {
|
|
481
|
-
if ((h === 45 || v(h)) && e++ < 63) {
|
|
482
|
-
var A = h === 45 ? x : f;
|
|
483
|
-
return n.consume(h), A;
|
|
484
|
-
}
|
|
485
|
-
return t(h);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
var Sn = {
|
|
489
|
-
tokenize: Jt,
|
|
490
|
-
partial: true
|
|
491
|
-
};
|
|
492
|
-
function Jt(n, r, t) {
|
|
493
|
-
return e;
|
|
494
|
-
function e(i) {
|
|
495
|
-
return z(i) ? O(n, u, "linePrefix")(i) : u(i);
|
|
496
|
-
}
|
|
497
|
-
function u(i) {
|
|
498
|
-
return i === null || C(i) ? r(i) : t(i);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
var rt = {
|
|
502
|
-
name: "blockQuote",
|
|
503
|
-
tokenize: Kt,
|
|
504
|
-
continuation: {
|
|
505
|
-
tokenize: Xt
|
|
506
|
-
},
|
|
507
|
-
exit: vt
|
|
508
|
-
};
|
|
509
|
-
function Kt(n, r, t) {
|
|
510
|
-
var e = this;
|
|
511
|
-
return u;
|
|
512
|
-
function u(l) {
|
|
513
|
-
if (l === 62) {
|
|
514
|
-
var a = e.containerState;
|
|
515
|
-
return a.open || (n.enter("blockQuote", {
|
|
516
|
-
_container: true
|
|
517
|
-
}), a.open = true), n.enter("blockQuotePrefix"), n.enter("blockQuoteMarker"), n.consume(l), n.exit("blockQuoteMarker"), i;
|
|
518
|
-
}
|
|
519
|
-
return t(l);
|
|
520
|
-
}
|
|
521
|
-
function i(l) {
|
|
522
|
-
return z(l) ? (n.enter("blockQuotePrefixWhitespace"), n.consume(l), n.exit("blockQuotePrefixWhitespace"), n.exit("blockQuotePrefix"), r) : (n.exit("blockQuotePrefix"), r(l));
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
function Xt(n, r, t) {
|
|
526
|
-
var e = this;
|
|
527
|
-
return u;
|
|
528
|
-
function u(l) {
|
|
529
|
-
return z(l) ? O(n, i, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(l) : i(l);
|
|
530
|
-
}
|
|
531
|
-
function i(l) {
|
|
532
|
-
return n.attempt(rt, r, t)(l);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
function vt(n) {
|
|
536
|
-
n.exit("blockQuote");
|
|
537
|
-
}
|
|
538
|
-
var it = {
|
|
539
|
-
name: "characterEscape",
|
|
540
|
-
tokenize: ne
|
|
541
|
-
};
|
|
542
|
-
function ne(n, r, t) {
|
|
543
|
-
return e;
|
|
544
|
-
function e(i) {
|
|
545
|
-
return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(i), n.exit("escapeMarker"), u;
|
|
546
|
-
}
|
|
547
|
-
function u(i) {
|
|
548
|
-
return Rt(i) ? (n.enter("characterEscapeValue"), n.consume(i), n.exit("characterEscapeValue"), n.exit("characterEscape"), r) : t(i);
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
var Zn = document.createElement("i");
|
|
552
|
-
function On(n) {
|
|
553
|
-
var r = "&" + n + ";";
|
|
554
|
-
Zn.innerHTML = r;
|
|
555
|
-
var t = Zn.textContent;
|
|
556
|
-
return t.charCodeAt(t.length - 1) === 59 && n !== "semi" || t === r ? false : t;
|
|
557
|
-
}
|
|
558
|
-
var ut = {
|
|
559
|
-
name: "characterReference",
|
|
560
|
-
tokenize: te
|
|
561
|
-
};
|
|
562
|
-
function te(n, r, t) {
|
|
563
|
-
var e = this;
|
|
564
|
-
var u = 0, i, l;
|
|
565
|
-
return a;
|
|
566
|
-
function a(f) {
|
|
567
|
-
return n.enter("characterReference"), n.enter("characterReferenceMarker"), n.consume(f), n.exit("characterReferenceMarker"), m;
|
|
568
|
-
}
|
|
569
|
-
function m(f) {
|
|
570
|
-
return f === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(f), n.exit("characterReferenceMarkerNumeric"), c) : (n.enter("characterReferenceValue"), i = 31, l = v, p(f));
|
|
571
|
-
}
|
|
572
|
-
function c(f) {
|
|
573
|
-
return f === 88 || f === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(f), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"), i = 6, l = jt, p) : (n.enter("characterReferenceValue"), i = 7, l = zn, p(f));
|
|
574
|
-
}
|
|
575
|
-
function p(f) {
|
|
576
|
-
if (f === 59 && u) {
|
|
577
|
-
var x = n.exit("characterReferenceValue");
|
|
578
|
-
return l === v && !On(e.sliceSerialize(x)) ? t(f) : (n.enter("characterReferenceMarker"), n.consume(f), n.exit("characterReferenceMarker"), n.exit("characterReference"), r);
|
|
579
|
-
}
|
|
580
|
-
return l(f) && u++ < i ? (n.consume(f), p) : t(f);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
var Yn = {
|
|
584
|
-
tokenize: re,
|
|
585
|
-
partial: true
|
|
586
|
-
}, Gn = {
|
|
587
|
-
name: "codeFenced",
|
|
588
|
-
tokenize: ee,
|
|
589
|
-
concrete: true
|
|
590
|
-
};
|
|
591
|
-
function ee(n, r, t) {
|
|
592
|
-
var e = this, u = {
|
|
593
|
-
tokenize: _,
|
|
594
|
-
partial: true
|
|
595
|
-
};
|
|
596
|
-
var i = 0, l = 0, a;
|
|
597
|
-
return m;
|
|
598
|
-
function m(k) {
|
|
599
|
-
return c(k);
|
|
600
|
-
}
|
|
601
|
-
function c(k) {
|
|
602
|
-
var T = e.events[e.events.length - 1];
|
|
603
|
-
return i = T && T[1].type === "linePrefix" ? T[2].sliceSerialize(T[1], true).length : 0, a = k, n.enter("codeFenced"), n.enter("codeFencedFence"), n.enter("codeFencedFenceSequence"), p(k);
|
|
604
|
-
}
|
|
605
|
-
function p(k) {
|
|
606
|
-
return k === a ? (l++, n.consume(k), p) : l < 3 ? t(k) : (n.exit("codeFencedFenceSequence"), z(k) ? O(n, f, "whitespace")(k) : f(k));
|
|
607
|
-
}
|
|
608
|
-
function f(k) {
|
|
609
|
-
return k === null || C(k) ? (n.exit("codeFencedFence"), e.interrupt ? r(k) : n.check(Yn, I, D)(k)) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", {
|
|
610
|
-
contentType: "string"
|
|
611
|
-
}), x(k));
|
|
612
|
-
}
|
|
613
|
-
function x(k) {
|
|
614
|
-
return k === null || C(k) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), f(k)) : z(k) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), O(n, h, "whitespace")(k)) : k === 96 && k === a ? t(k) : (n.consume(k), x);
|
|
615
|
-
}
|
|
616
|
-
function h(k) {
|
|
617
|
-
return k === null || C(k) ? f(k) : (n.enter("codeFencedFenceMeta"), n.enter("chunkString", {
|
|
618
|
-
contentType: "string"
|
|
619
|
-
}), A(k));
|
|
620
|
-
}
|
|
621
|
-
function A(k) {
|
|
622
|
-
return k === null || C(k) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), f(k)) : k === 96 && k === a ? t(k) : (n.consume(k), A);
|
|
623
|
-
}
|
|
624
|
-
function I(k) {
|
|
625
|
-
return n.attempt(u, D, M)(k);
|
|
626
|
-
}
|
|
627
|
-
function M(k) {
|
|
628
|
-
return n.enter("lineEnding"), n.consume(k), n.exit("lineEnding"), b;
|
|
629
|
-
}
|
|
630
|
-
function b(k) {
|
|
631
|
-
return i > 0 && z(k) ? O(n, j, "linePrefix", i + 1)(k) : j(k);
|
|
632
|
-
}
|
|
633
|
-
function j(k) {
|
|
634
|
-
return k === null || C(k) ? n.check(Yn, I, D)(k) : (n.enter("codeFlowValue"), F(k));
|
|
635
|
-
}
|
|
636
|
-
function F(k) {
|
|
637
|
-
return k === null || C(k) ? (n.exit("codeFlowValue"), j(k)) : (n.consume(k), F);
|
|
638
|
-
}
|
|
639
|
-
function D(k) {
|
|
640
|
-
return n.exit("codeFenced"), r(k);
|
|
641
|
-
}
|
|
642
|
-
function _(k, T, H) {
|
|
643
|
-
var N = 0;
|
|
644
|
-
return V;
|
|
645
|
-
function V(w) {
|
|
646
|
-
return k.enter("lineEnding"), k.consume(w), k.exit("lineEnding"), y;
|
|
647
|
-
}
|
|
648
|
-
function y(w) {
|
|
649
|
-
return k.enter("codeFencedFence"), z(w) ? O(k, S, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(w) : S(w);
|
|
650
|
-
}
|
|
651
|
-
function S(w) {
|
|
652
|
-
return w === a ? (k.enter("codeFencedFenceSequence"), P(w)) : H(w);
|
|
653
|
-
}
|
|
654
|
-
function P(w) {
|
|
655
|
-
return w === a ? (N++, k.consume(w), P) : N >= l ? (k.exit("codeFencedFenceSequence"), z(w) ? O(k, R, "whitespace")(w) : R(w)) : H(w);
|
|
656
|
-
}
|
|
657
|
-
function R(w) {
|
|
658
|
-
return w === null || C(w) ? (k.exit("codeFencedFence"), T(w)) : H(w);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
function re(n, r, t) {
|
|
663
|
-
var e = this;
|
|
664
|
-
return u;
|
|
665
|
-
function u(l) {
|
|
666
|
-
return l === null ? t(l) : (n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), i);
|
|
667
|
-
}
|
|
668
|
-
function i(l) {
|
|
669
|
-
return e.parser.lazy[e.now().line] ? t(l) : r(l);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
var Cn = {
|
|
673
|
-
name: "codeIndented",
|
|
674
|
-
tokenize: ue
|
|
675
|
-
}, ie = {
|
|
676
|
-
tokenize: le,
|
|
677
|
-
partial: true
|
|
678
|
-
};
|
|
679
|
-
function ue(n, r, t) {
|
|
680
|
-
var e = this;
|
|
681
|
-
return u;
|
|
682
|
-
function u(c) {
|
|
683
|
-
return n.enter("codeIndented"), O(n, i, "linePrefix", 4 + 1)(c);
|
|
684
|
-
}
|
|
685
|
-
function i(c) {
|
|
686
|
-
var p = e.events[e.events.length - 1];
|
|
687
|
-
return p && p[1].type === "linePrefix" && p[2].sliceSerialize(p[1], true).length >= 4 ? l(c) : t(c);
|
|
688
|
-
}
|
|
689
|
-
function l(c) {
|
|
690
|
-
return c === null ? m(c) : C(c) ? n.attempt(ie, l, m)(c) : (n.enter("codeFlowValue"), a(c));
|
|
691
|
-
}
|
|
692
|
-
function a(c) {
|
|
693
|
-
return c === null || C(c) ? (n.exit("codeFlowValue"), l(c)) : (n.consume(c), a);
|
|
694
|
-
}
|
|
695
|
-
function m(c) {
|
|
696
|
-
return n.exit("codeIndented"), r(c);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
function le(n, r, t) {
|
|
700
|
-
var e = this;
|
|
701
|
-
return u;
|
|
702
|
-
function u(l) {
|
|
703
|
-
return e.parser.lazy[e.now().line] ? t(l) : C(l) ? (n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), u) : O(n, i, "linePrefix", 4 + 1)(l);
|
|
704
|
-
}
|
|
705
|
-
function i(l) {
|
|
706
|
-
var a = e.events[e.events.length - 1];
|
|
707
|
-
return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], true).length >= 4 ? r(l) : C(l) ? u(l) : t(l);
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
var ae = {
|
|
711
|
-
name: "codeText",
|
|
712
|
-
tokenize: ce,
|
|
713
|
-
resolve: oe,
|
|
714
|
-
previous: se
|
|
715
|
-
};
|
|
716
|
-
function oe(n) {
|
|
717
|
-
var r = n.length - 4, t = 3, e, u;
|
|
718
|
-
if ((n[t][1].type === "lineEnding" || n[t][1].type === "space") && (n[r][1].type === "lineEnding" || n[r][1].type === "space")) {
|
|
719
|
-
for(e = t; ++e < r;)if (n[e][1].type === "codeTextData") {
|
|
720
|
-
n[t][1].type = "codeTextPadding", n[r][1].type = "codeTextPadding", t += 2, r -= 2;
|
|
721
|
-
break;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
for(e = t - 1, r++; ++e <= r;)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);
|
|
725
|
-
return n;
|
|
726
|
-
}
|
|
727
|
-
function se(n) {
|
|
728
|
-
return n !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
729
|
-
}
|
|
730
|
-
function ce(n, r, t) {
|
|
731
|
-
var e = 0, u, i;
|
|
732
|
-
return l;
|
|
733
|
-
function l(f) {
|
|
734
|
-
return n.enter("codeText"), n.enter("codeTextSequence"), a(f);
|
|
735
|
-
}
|
|
736
|
-
function a(f) {
|
|
737
|
-
return f === 96 ? (n.consume(f), e++, a) : (n.exit("codeTextSequence"), m(f));
|
|
738
|
-
}
|
|
739
|
-
function m(f) {
|
|
740
|
-
return f === null ? t(f) : f === 32 ? (n.enter("space"), n.consume(f), n.exit("space"), m) : f === 96 ? (i = n.enter("codeTextSequence"), u = 0, p(f)) : C(f) ? (n.enter("lineEnding"), n.consume(f), n.exit("lineEnding"), m) : (n.enter("codeTextData"), c(f));
|
|
741
|
-
}
|
|
742
|
-
function c(f) {
|
|
743
|
-
return f === null || f === 32 || f === 96 || C(f) ? (n.exit("codeTextData"), m(f)) : (n.consume(f), c);
|
|
744
|
-
}
|
|
745
|
-
function p(f) {
|
|
746
|
-
return f === 96 ? (n.consume(f), u++, p) : u === e ? (n.exit("codeTextSequence"), n.exit("codeText"), r(f)) : (i.type = "codeTextData", c(f));
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
function lt(n) {
|
|
750
|
-
var r = {};
|
|
751
|
-
var t = -1, e, u, i, l, a, m, c;
|
|
752
|
-
for(; ++t < n.length;){
|
|
753
|
-
for(; (t in r);)t = r[t];
|
|
754
|
-
if (e = n[t], t && e[1].type === "chunkFlow" && n[t - 1][1].type === "listItemPrefix" && (m = e[1]._tokenizer.events, i = 0, i < m.length && m[i][1].type === "lineEndingBlank" && (i += 2), i < m.length && m[i][1].type === "content")) for(; ++i < m.length && m[i][1].type !== "content";)m[i][1].type === "chunkText" && (m[i][1]._isInFirstContentOfListItem = true, i++);
|
|
755
|
-
if (e[0] === "enter") e[1].contentType && (Object.assign(r, he(n, t)), t = r[t], c = true);
|
|
756
|
-
else if (e[1]._container) {
|
|
757
|
-
for(i = t, u = void 0; i-- && (l = n[i], l[1].type === "lineEnding" || l[1].type === "lineEndingBlank");)l[0] === "enter" && (u && (n[u][1].type = "lineEndingBlank"), l[1].type = "lineEnding", u = i);
|
|
758
|
-
u && (e[1].end = Object.assign({}, n[u][1].start), a = n.slice(u, t), a.unshift(e), tn(n, u, t - u + 1, a));
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
return !c;
|
|
762
|
-
}
|
|
763
|
-
function he(n, r) {
|
|
764
|
-
var t = n[r][1], e = n[r][2];
|
|
765
|
-
var u = r - 1;
|
|
766
|
-
var i = [], l = t._tokenizer || e.parser[t.contentType](t.start), a = l.events, m = [], c = {};
|
|
767
|
-
var p, f, x = -1, h = t, A = 0, I = 0;
|
|
768
|
-
var M = [
|
|
769
|
-
I
|
|
770
|
-
];
|
|
771
|
-
for(; h;){
|
|
772
|
-
for(; n[++u][1] !== h;);
|
|
773
|
-
i.push(u), h._tokenizer || (p = e.sliceStream(h), h.next || p.push(null), f && l.defineSkip(h.start), h._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = true), l.write(p), h._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = void 0)), f = h, h = h.next;
|
|
774
|
-
}
|
|
775
|
-
for(h = t; ++x < a.length;)// Find a void token that includes a break.
|
|
776
|
-
a[x][0] === "exit" && a[x - 1][0] === "enter" && a[x][1].type === a[x - 1][1].type && a[x][1].start.line !== a[x][1].end.line && (I = x + 1, M.push(I), h._tokenizer = void 0, h.previous = void 0, h = h.next);
|
|
777
|
-
for(l.events = [], h ? (h._tokenizer = void 0, h.previous = void 0) : M.pop(), x = M.length; x--;){
|
|
778
|
-
var b = a.slice(M[x], M[x + 1]), j = i.pop();
|
|
779
|
-
m.unshift([
|
|
780
|
-
j,
|
|
781
|
-
j + b.length - 1
|
|
782
|
-
]), tn(n, j, 2, b);
|
|
783
|
-
}
|
|
784
|
-
for(x = -1; ++x < m.length;)c[A + m[x][0]] = A + m[x][1], A += m[x][1] - m[x][0] - 1;
|
|
785
|
-
return c;
|
|
786
|
-
}
|
|
787
|
-
var pe = {
|
|
788
|
-
tokenize: xe,
|
|
789
|
-
resolve: me
|
|
790
|
-
}, fe = {
|
|
791
|
-
tokenize: ge,
|
|
792
|
-
partial: true
|
|
793
|
-
};
|
|
794
|
-
function me(n) {
|
|
795
|
-
return lt(n), n;
|
|
796
|
-
}
|
|
797
|
-
function xe(n, r) {
|
|
798
|
-
var t;
|
|
799
|
-
return e;
|
|
800
|
-
function e(a) {
|
|
801
|
-
return n.enter("content"), t = n.enter("chunkContent", {
|
|
802
|
-
contentType: "content"
|
|
803
|
-
}), u(a);
|
|
804
|
-
}
|
|
805
|
-
function u(a) {
|
|
806
|
-
return a === null ? i(a) : C(a) ? n.check(fe, l, i)(a) : (n.consume(a), u);
|
|
807
|
-
}
|
|
808
|
-
function i(a) {
|
|
809
|
-
return n.exit("chunkContent"), n.exit("content"), r(a);
|
|
810
|
-
}
|
|
811
|
-
function l(a) {
|
|
812
|
-
return n.consume(a), n.exit("chunkContent"), t.next = n.enter("chunkContent", {
|
|
813
|
-
contentType: "content",
|
|
814
|
-
previous: t
|
|
815
|
-
}), t = t.next, u;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
function ge(n, r, t) {
|
|
819
|
-
var e = this;
|
|
820
|
-
return u;
|
|
821
|
-
function u(l) {
|
|
822
|
-
return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), O(n, i, "linePrefix");
|
|
823
|
-
}
|
|
824
|
-
function i(l) {
|
|
825
|
-
if (l === null || C(l)) return t(l);
|
|
826
|
-
var a = e.events[e.events.length - 1];
|
|
827
|
-
return !e.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], true).length >= 4 ? r(l) : n.interrupt(e.parser.constructs.flow, t, r)(l);
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
function at(n, r, t, e, u, i, l, a, m) {
|
|
831
|
-
var c = m || Number.POSITIVE_INFINITY;
|
|
832
|
-
var p = 0;
|
|
833
|
-
return f;
|
|
834
|
-
function f(b) {
|
|
835
|
-
return b === 60 ? (n.enter(e), n.enter(u), n.enter(i), n.consume(b), n.exit(i), x) : b === null || b === 32 || b === 41 || An(b) ? t(b) : (n.enter(e), n.enter(l), n.enter(a), n.enter("chunkString", {
|
|
836
|
-
contentType: "string"
|
|
837
|
-
}), I(b));
|
|
838
|
-
}
|
|
839
|
-
function x(b) {
|
|
840
|
-
return b === 62 ? (n.enter(i), n.consume(b), n.exit(i), n.exit(u), n.exit(e), r) : (n.enter(a), n.enter("chunkString", {
|
|
841
|
-
contentType: "string"
|
|
842
|
-
}), h(b));
|
|
843
|
-
}
|
|
844
|
-
function h(b) {
|
|
845
|
-
return b === 62 ? (n.exit("chunkString"), n.exit(a), x(b)) : b === null || b === 60 || C(b) ? t(b) : (n.consume(b), b === 92 ? A : h);
|
|
846
|
-
}
|
|
847
|
-
function A(b) {
|
|
848
|
-
return b === 60 || b === 62 || b === 92 ? (n.consume(b), h) : h(b);
|
|
849
|
-
}
|
|
850
|
-
function I(b) {
|
|
851
|
-
return !p && (b === null || b === 41 || Z(b)) ? (n.exit("chunkString"), n.exit(a), n.exit(l), n.exit(e), r(b)) : p < c && b === 40 ? (n.consume(b), p++, I) : b === 41 ? (n.consume(b), p--, I) : b === null || b === 32 || b === 40 || An(b) ? t(b) : (n.consume(b), b === 92 ? M : I);
|
|
852
|
-
}
|
|
853
|
-
function M(b) {
|
|
854
|
-
return b === 40 || b === 41 || b === 92 ? (n.consume(b), I) : I(b);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
function ot(n, r, t, e, u, i) {
|
|
858
|
-
var l = this;
|
|
859
|
-
var a = 0, m;
|
|
860
|
-
return c;
|
|
861
|
-
function c(h) {
|
|
862
|
-
return n.enter(e), n.enter(u), n.consume(h), n.exit(u), n.enter(i), p;
|
|
863
|
-
}
|
|
864
|
-
function p(h) {
|
|
865
|
-
return a > 999 || h === null || h === 91 || h === 93 && !m || // To do: remove in the future once we’ve switched from
|
|
866
|
-
// `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
|
|
867
|
-
// which doesn’t need this.
|
|
868
|
-
// Hidden footnotes hook.
|
|
869
|
-
/* c8 ignore next 3 */ h === 94 && !a && "_hiddenFootnoteSupport" in l.parser.constructs ? t(h) : h === 93 ? (n.exit(i), n.enter(u), n.consume(h), n.exit(u), n.exit(e), r) : C(h) ? (n.enter("lineEnding"), n.consume(h), n.exit("lineEnding"), p) : (n.enter("chunkString", {
|
|
870
|
-
contentType: "string"
|
|
871
|
-
}), f(h));
|
|
872
|
-
}
|
|
873
|
-
function f(h) {
|
|
874
|
-
return h === null || h === 91 || h === 93 || C(h) || a++ > 999 ? (n.exit("chunkString"), p(h)) : (n.consume(h), m || (m = !z(h)), h === 92 ? x : f);
|
|
875
|
-
}
|
|
876
|
-
function x(h) {
|
|
877
|
-
return h === 91 || h === 92 || h === 93 ? (n.consume(h), a++, f) : f(h);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
function st(n, r, t, e, u, i) {
|
|
881
|
-
var l;
|
|
882
|
-
return a;
|
|
883
|
-
function a(x) {
|
|
884
|
-
return x === 34 || x === 39 || x === 40 ? (n.enter(e), n.enter(u), n.consume(x), n.exit(u), l = x === 40 ? 41 : x, m) : t(x);
|
|
885
|
-
}
|
|
886
|
-
function m(x) {
|
|
887
|
-
return x === l ? (n.enter(u), n.consume(x), n.exit(u), n.exit(e), r) : (n.enter(i), c(x));
|
|
888
|
-
}
|
|
889
|
-
function c(x) {
|
|
890
|
-
return x === l ? (n.exit(i), m(l)) : x === null ? t(x) : C(x) ? (n.enter("lineEnding"), n.consume(x), n.exit("lineEnding"), O(n, c, "linePrefix")) : (n.enter("chunkString", {
|
|
891
|
-
contentType: "string"
|
|
892
|
-
}), p(x));
|
|
893
|
-
}
|
|
894
|
-
function p(x) {
|
|
895
|
-
return x === l || x === null || C(x) ? (n.exit("chunkString"), c(x)) : (n.consume(x), x === 92 ? f : p);
|
|
896
|
-
}
|
|
897
|
-
function f(x) {
|
|
898
|
-
return x === l || x === 92 ? (n.consume(x), p) : p(x);
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
function dn(n, r) {
|
|
902
|
-
var t;
|
|
903
|
-
return e;
|
|
904
|
-
function e(u) {
|
|
905
|
-
return C(u) ? (n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), t = true, e) : z(u) ? O(n, e, t ? "linePrefix" : "lineSuffix")(u) : r(u);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
function xn(n) {
|
|
909
|
-
return n.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
910
|
-
}
|
|
911
|
-
var ke = {
|
|
912
|
-
name: "definition",
|
|
913
|
-
tokenize: be
|
|
914
|
-
}, de = {
|
|
915
|
-
tokenize: ye,
|
|
916
|
-
partial: true
|
|
917
|
-
};
|
|
918
|
-
function be(n, r, t) {
|
|
919
|
-
var e = this;
|
|
920
|
-
var u;
|
|
921
|
-
return i;
|
|
922
|
-
function i(h) {
|
|
923
|
-
return n.enter("definition"), l(h);
|
|
924
|
-
}
|
|
925
|
-
function l(h) {
|
|
926
|
-
return ot.call(e, n, a, // Note: we don’t need to reset the way `markdown-rs` does.
|
|
927
|
-
t, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(h);
|
|
928
|
-
}
|
|
929
|
-
function a(h) {
|
|
930
|
-
return u = xn(e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1)), h === 58 ? (n.enter("definitionMarker"), n.consume(h), n.exit("definitionMarker"), m) : t(h);
|
|
931
|
-
}
|
|
932
|
-
function m(h) {
|
|
933
|
-
return Z(h) ? dn(n, c)(h) : c(h);
|
|
934
|
-
}
|
|
935
|
-
function c(h) {
|
|
936
|
-
return at(n, p, // Note: we don’t need to reset the way `markdown-rs` does.
|
|
937
|
-
t, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString")(h);
|
|
938
|
-
}
|
|
939
|
-
function p(h) {
|
|
940
|
-
return n.attempt(de, f, f)(h);
|
|
941
|
-
}
|
|
942
|
-
function f(h) {
|
|
943
|
-
return z(h) ? O(n, x, "whitespace")(h) : x(h);
|
|
944
|
-
}
|
|
945
|
-
function x(h) {
|
|
946
|
-
return h === null || C(h) ? (n.exit("definition"), e.parser.defined.push(u), r(h)) : t(h);
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
function ye(n, r, t) {
|
|
950
|
-
return e;
|
|
951
|
-
function e(a) {
|
|
952
|
-
return Z(a) ? dn(n, u)(a) : t(a);
|
|
953
|
-
}
|
|
954
|
-
function u(a) {
|
|
955
|
-
return st(n, i, t, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(a);
|
|
956
|
-
}
|
|
957
|
-
function i(a) {
|
|
958
|
-
return z(a) ? O(n, l, "whitespace")(a) : l(a);
|
|
959
|
-
}
|
|
960
|
-
function l(a) {
|
|
961
|
-
return a === null || C(a) ? r(a) : t(a);
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
var Se = {
|
|
965
|
-
name: "hardBreakEscape",
|
|
966
|
-
tokenize: Fe
|
|
967
|
-
};
|
|
968
|
-
function Fe(n, r, t) {
|
|
969
|
-
return e;
|
|
970
|
-
function e(i) {
|
|
971
|
-
return n.enter("hardBreakEscape"), n.consume(i), u;
|
|
972
|
-
}
|
|
973
|
-
function u(i) {
|
|
974
|
-
return C(i) ? (n.exit("hardBreakEscape"), r(i)) : t(i);
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
var Ee = {
|
|
978
|
-
name: "headingAtx",
|
|
979
|
-
tokenize: we,
|
|
980
|
-
resolve: Ce
|
|
981
|
-
};
|
|
982
|
-
function Ce(n, r) {
|
|
983
|
-
var t = n.length - 2, e = 3, u, i;
|
|
984
|
-
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 = {
|
|
985
|
-
type: "atxHeadingText",
|
|
986
|
-
start: n[e][1].start,
|
|
987
|
-
end: n[t][1].end
|
|
988
|
-
}, i = {
|
|
989
|
-
type: "chunkText",
|
|
990
|
-
start: n[e][1].start,
|
|
991
|
-
end: n[t][1].end,
|
|
992
|
-
contentType: "text"
|
|
993
|
-
}, tn(n, e, t - e + 1, [
|
|
994
|
-
[
|
|
995
|
-
"enter",
|
|
996
|
-
u,
|
|
997
|
-
r
|
|
998
|
-
],
|
|
999
|
-
[
|
|
1000
|
-
"enter",
|
|
1001
|
-
i,
|
|
1002
|
-
r
|
|
1003
|
-
],
|
|
1004
|
-
[
|
|
1005
|
-
"exit",
|
|
1006
|
-
i,
|
|
1007
|
-
r
|
|
1008
|
-
],
|
|
1009
|
-
[
|
|
1010
|
-
"exit",
|
|
1011
|
-
u,
|
|
1012
|
-
r
|
|
1013
|
-
]
|
|
1014
|
-
])), n;
|
|
1015
|
-
}
|
|
1016
|
-
function we(n, r, t) {
|
|
1017
|
-
var e = 0;
|
|
1018
|
-
return u;
|
|
1019
|
-
function u(p) {
|
|
1020
|
-
return n.enter("atxHeading"), i(p);
|
|
1021
|
-
}
|
|
1022
|
-
function i(p) {
|
|
1023
|
-
return n.enter("atxHeadingSequence"), l(p);
|
|
1024
|
-
}
|
|
1025
|
-
function l(p) {
|
|
1026
|
-
return p === 35 && e++ < 6 ? (n.consume(p), l) : p === null || Z(p) ? (n.exit("atxHeadingSequence"), a(p)) : t(p);
|
|
1027
|
-
}
|
|
1028
|
-
function a(p) {
|
|
1029
|
-
return p === 35 ? (n.enter("atxHeadingSequence"), m(p)) : p === null || C(p) ? (n.exit("atxHeading"), r(p)) : z(p) ? O(n, a, "whitespace")(p) : (n.enter("atxHeadingText"), c(p));
|
|
1030
|
-
}
|
|
1031
|
-
function m(p) {
|
|
1032
|
-
return p === 35 ? (n.consume(p), m) : (n.exit("atxHeadingSequence"), a(p));
|
|
1033
|
-
}
|
|
1034
|
-
function c(p) {
|
|
1035
|
-
return p === null || p === 35 || Z(p) ? (n.exit("atxHeadingText"), a(p)) : (n.consume(p), c);
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
var Ae = [
|
|
1039
|
-
"address",
|
|
1040
|
-
"article",
|
|
1041
|
-
"aside",
|
|
1042
|
-
"base",
|
|
1043
|
-
"basefont",
|
|
1044
|
-
"blockquote",
|
|
1045
|
-
"body",
|
|
1046
|
-
"caption",
|
|
1047
|
-
"center",
|
|
1048
|
-
"col",
|
|
1049
|
-
"colgroup",
|
|
1050
|
-
"dd",
|
|
1051
|
-
"details",
|
|
1052
|
-
"dialog",
|
|
1053
|
-
"dir",
|
|
1054
|
-
"div",
|
|
1055
|
-
"dl",
|
|
1056
|
-
"dt",
|
|
1057
|
-
"fieldset",
|
|
1058
|
-
"figcaption",
|
|
1059
|
-
"figure",
|
|
1060
|
-
"footer",
|
|
1061
|
-
"form",
|
|
1062
|
-
"frame",
|
|
1063
|
-
"frameset",
|
|
1064
|
-
"h1",
|
|
1065
|
-
"h2",
|
|
1066
|
-
"h3",
|
|
1067
|
-
"h4",
|
|
1068
|
-
"h5",
|
|
1069
|
-
"h6",
|
|
1070
|
-
"head",
|
|
1071
|
-
"header",
|
|
1072
|
-
"hr",
|
|
1073
|
-
"html",
|
|
1074
|
-
"iframe",
|
|
1075
|
-
"legend",
|
|
1076
|
-
"li",
|
|
1077
|
-
"link",
|
|
1078
|
-
"main",
|
|
1079
|
-
"menu",
|
|
1080
|
-
"menuitem",
|
|
1081
|
-
"nav",
|
|
1082
|
-
"noframes",
|
|
1083
|
-
"ol",
|
|
1084
|
-
"optgroup",
|
|
1085
|
-
"option",
|
|
1086
|
-
"p",
|
|
1087
|
-
"param",
|
|
1088
|
-
"search",
|
|
1089
|
-
"section",
|
|
1090
|
-
"summary",
|
|
1091
|
-
"table",
|
|
1092
|
-
"tbody",
|
|
1093
|
-
"td",
|
|
1094
|
-
"tfoot",
|
|
1095
|
-
"th",
|
|
1096
|
-
"thead",
|
|
1097
|
-
"title",
|
|
1098
|
-
"tr",
|
|
1099
|
-
"track",
|
|
1100
|
-
"ul"
|
|
1101
|
-
], Jn = [
|
|
1102
|
-
"pre",
|
|
1103
|
-
"script",
|
|
1104
|
-
"style",
|
|
1105
|
-
"textarea"
|
|
1106
|
-
], ze = {
|
|
1107
|
-
name: "htmlFlow",
|
|
1108
|
-
tokenize: Le,
|
|
1109
|
-
resolveTo: Be,
|
|
1110
|
-
concrete: true
|
|
1111
|
-
}, Ie = {
|
|
1112
|
-
tokenize: De,
|
|
1113
|
-
partial: true
|
|
1114
|
-
}, Te = {
|
|
1115
|
-
tokenize: Oe,
|
|
1116
|
-
partial: true
|
|
1117
|
-
};
|
|
1118
|
-
function Be(n) {
|
|
1119
|
-
var r = n.length;
|
|
1120
|
-
for(; r-- && !(n[r][0] === "enter" && n[r][1].type === "htmlFlow"););
|
|
1121
|
-
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;
|
|
1122
|
-
}
|
|
1123
|
-
function Le(n, r, t) {
|
|
1124
|
-
var e = this;
|
|
1125
|
-
var u, i, l, a, m;
|
|
1126
|
-
return c;
|
|
1127
|
-
function c(s) {
|
|
1128
|
-
return p(s);
|
|
1129
|
-
}
|
|
1130
|
-
function p(s) {
|
|
1131
|
-
return n.enter("htmlFlow"), n.enter("htmlFlowData"), n.consume(s), f;
|
|
1132
|
-
}
|
|
1133
|
-
function f(s) {
|
|
1134
|
-
return s === 33 ? (n.consume(s), x) : s === 47 ? (n.consume(s), i = true, I) : s === 63 ? (n.consume(s), u = 3, e.interrupt ? r : o) : nn(s) ? (n.consume(s), l = String.fromCharCode(s), M) : t(s);
|
|
1135
|
-
}
|
|
1136
|
-
function x(s) {
|
|
1137
|
-
return s === 45 ? (n.consume(s), u = 2, h) : s === 91 ? (n.consume(s), u = 5, a = 0, A) : nn(s) ? (n.consume(s), u = 4, e.interrupt ? r : o) : t(s);
|
|
1138
|
-
}
|
|
1139
|
-
function h(s) {
|
|
1140
|
-
return s === 45 ? (n.consume(s), e.interrupt ? r : o) : t(s);
|
|
1141
|
-
}
|
|
1142
|
-
function A(s) {
|
|
1143
|
-
var K = "CDATA[";
|
|
1144
|
-
return s === K.charCodeAt(a++) ? (n.consume(s), a === K.length ? e.interrupt ? r : S : A) : t(s);
|
|
1145
|
-
}
|
|
1146
|
-
function I(s) {
|
|
1147
|
-
return nn(s) ? (n.consume(s), l = String.fromCharCode(s), M) : t(s);
|
|
1148
|
-
}
|
|
1149
|
-
function M(s) {
|
|
1150
|
-
if (s === null || s === 47 || s === 62 || Z(s)) {
|
|
1151
|
-
var K = s === 47, hn = l.toLowerCase();
|
|
1152
|
-
return !K && !i && Jn.includes(hn) ? (u = 1, e.interrupt ? r(s) : S(s)) : Ae.includes(l.toLowerCase()) ? (u = 6, K ? (n.consume(s), b) : e.interrupt ? r(s) : S(s)) : (u = 7, e.interrupt && !e.parser.lazy[e.now().line] ? t(s) : i ? j(s) : F(s));
|
|
1153
|
-
}
|
|
1154
|
-
return s === 45 || v(s) ? (n.consume(s), l += String.fromCharCode(s), M) : t(s);
|
|
1155
|
-
}
|
|
1156
|
-
function b(s) {
|
|
1157
|
-
return s === 62 ? (n.consume(s), e.interrupt ? r : S) : t(s);
|
|
1158
|
-
}
|
|
1159
|
-
function j(s) {
|
|
1160
|
-
return z(s) ? (n.consume(s), j) : V(s);
|
|
1161
|
-
}
|
|
1162
|
-
function F(s) {
|
|
1163
|
-
return s === 47 ? (n.consume(s), V) : s === 58 || s === 95 || nn(s) ? (n.consume(s), D) : z(s) ? (n.consume(s), F) : V(s);
|
|
1164
|
-
}
|
|
1165
|
-
function D(s) {
|
|
1166
|
-
return s === 45 || s === 46 || s === 58 || s === 95 || v(s) ? (n.consume(s), D) : _(s);
|
|
1167
|
-
}
|
|
1168
|
-
function _(s) {
|
|
1169
|
-
return s === 61 ? (n.consume(s), k) : z(s) ? (n.consume(s), _) : F(s);
|
|
1170
|
-
}
|
|
1171
|
-
function k(s) {
|
|
1172
|
-
return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), m = s, T) : z(s) ? (n.consume(s), k) : H(s);
|
|
1173
|
-
}
|
|
1174
|
-
function T(s) {
|
|
1175
|
-
return s === m ? (n.consume(s), m = null, N) : s === null || C(s) ? t(s) : (n.consume(s), T);
|
|
1176
|
-
}
|
|
1177
|
-
function H(s) {
|
|
1178
|
-
return s === null || s === 34 || s === 39 || s === 47 || s === 60 || s === 61 || s === 62 || s === 96 || Z(s) ? _(s) : (n.consume(s), H);
|
|
1179
|
-
}
|
|
1180
|
-
function N(s) {
|
|
1181
|
-
return s === 47 || s === 62 || z(s) ? F(s) : t(s);
|
|
1182
|
-
}
|
|
1183
|
-
function V(s) {
|
|
1184
|
-
return s === 62 ? (n.consume(s), y) : t(s);
|
|
1185
|
-
}
|
|
1186
|
-
function y(s) {
|
|
1187
|
-
return s === null || C(s) ? S(s) : z(s) ? (n.consume(s), y) : t(s);
|
|
1188
|
-
}
|
|
1189
|
-
function S(s) {
|
|
1190
|
-
return s === 45 && u === 2 ? (n.consume(s), U) : s === 60 && u === 1 ? (n.consume(s), W) : s === 62 && u === 4 ? (n.consume(s), J) : s === 63 && u === 3 ? (n.consume(s), o) : s === 93 && u === 5 ? (n.consume(s), en) : C(s) && (u === 6 || u === 7) ? (n.exit("htmlFlowData"), n.check(Ie, rn, P)(s)) : s === null || C(s) ? (n.exit("htmlFlowData"), P(s)) : (n.consume(s), S);
|
|
1191
|
-
}
|
|
1192
|
-
function P(s) {
|
|
1193
|
-
return n.check(Te, R, rn)(s);
|
|
1194
|
-
}
|
|
1195
|
-
function R(s) {
|
|
1196
|
-
return n.enter("lineEnding"), n.consume(s), n.exit("lineEnding"), w;
|
|
1197
|
-
}
|
|
1198
|
-
function w(s) {
|
|
1199
|
-
return s === null || C(s) ? P(s) : (n.enter("htmlFlowData"), S(s));
|
|
1200
|
-
}
|
|
1201
|
-
function U(s) {
|
|
1202
|
-
return s === 45 ? (n.consume(s), o) : S(s);
|
|
1203
|
-
}
|
|
1204
|
-
function W(s) {
|
|
1205
|
-
return s === 47 ? (n.consume(s), l = "", G) : S(s);
|
|
1206
|
-
}
|
|
1207
|
-
function G(s) {
|
|
1208
|
-
if (s === 62) {
|
|
1209
|
-
var K = l.toLowerCase();
|
|
1210
|
-
return Jn.includes(K) ? (n.consume(s), J) : S(s);
|
|
1211
|
-
}
|
|
1212
|
-
return nn(s) && l.length < 8 ? (n.consume(s), l += String.fromCharCode(s), G) : S(s);
|
|
1213
|
-
}
|
|
1214
|
-
function en(s) {
|
|
1215
|
-
return s === 93 ? (n.consume(s), o) : S(s);
|
|
1216
|
-
}
|
|
1217
|
-
function o(s) {
|
|
1218
|
-
return s === 62 ? (n.consume(s), J) : s === 45 && u === 2 ? (n.consume(s), o) : S(s);
|
|
1219
|
-
}
|
|
1220
|
-
function J(s) {
|
|
1221
|
-
return s === null || C(s) ? (n.exit("htmlFlowData"), rn(s)) : (n.consume(s), J);
|
|
1222
|
-
}
|
|
1223
|
-
function rn(s) {
|
|
1224
|
-
return n.exit("htmlFlow"), r(s);
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
function Oe(n, r, t) {
|
|
1228
|
-
var e = this;
|
|
1229
|
-
return u;
|
|
1230
|
-
function u(l) {
|
|
1231
|
-
return C(l) ? (n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), i) : t(l);
|
|
1232
|
-
}
|
|
1233
|
-
function i(l) {
|
|
1234
|
-
return e.parser.lazy[e.now().line] ? t(l) : r(l);
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
function De(n, r, t) {
|
|
1238
|
-
return e;
|
|
1239
|
-
function e(u) {
|
|
1240
|
-
return n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), n.attempt(Sn, r, t);
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
var Pe = {
|
|
1244
|
-
name: "htmlText",
|
|
1245
|
-
tokenize: _e
|
|
1246
|
-
};
|
|
1247
|
-
function _e(n, r, t) {
|
|
1248
|
-
var e = this;
|
|
1249
|
-
var u, i, l;
|
|
1250
|
-
return a;
|
|
1251
|
-
function a(o) {
|
|
1252
|
-
return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(o), m;
|
|
1253
|
-
}
|
|
1254
|
-
function m(o) {
|
|
1255
|
-
return o === 33 ? (n.consume(o), c) : o === 47 ? (n.consume(o), _) : o === 63 ? (n.consume(o), F) : nn(o) ? (n.consume(o), H) : t(o);
|
|
1256
|
-
}
|
|
1257
|
-
function c(o) {
|
|
1258
|
-
return o === 45 ? (n.consume(o), p) : o === 91 ? (n.consume(o), i = 0, A) : nn(o) ? (n.consume(o), j) : t(o);
|
|
1259
|
-
}
|
|
1260
|
-
function p(o) {
|
|
1261
|
-
return o === 45 ? (n.consume(o), h) : t(o);
|
|
1262
|
-
}
|
|
1263
|
-
function f(o) {
|
|
1264
|
-
return o === null ? t(o) : o === 45 ? (n.consume(o), x) : C(o) ? (l = f, W(o)) : (n.consume(o), f);
|
|
1265
|
-
}
|
|
1266
|
-
function x(o) {
|
|
1267
|
-
return o === 45 ? (n.consume(o), h) : f(o);
|
|
1268
|
-
}
|
|
1269
|
-
function h(o) {
|
|
1270
|
-
return o === 62 ? U(o) : o === 45 ? x(o) : f(o);
|
|
1271
|
-
}
|
|
1272
|
-
function A(o) {
|
|
1273
|
-
var J = "CDATA[";
|
|
1274
|
-
return o === J.charCodeAt(i++) ? (n.consume(o), i === J.length ? I : A) : t(o);
|
|
1275
|
-
}
|
|
1276
|
-
function I(o) {
|
|
1277
|
-
return o === null ? t(o) : o === 93 ? (n.consume(o), M) : C(o) ? (l = I, W(o)) : (n.consume(o), I);
|
|
1278
|
-
}
|
|
1279
|
-
function M(o) {
|
|
1280
|
-
return o === 93 ? (n.consume(o), b) : I(o);
|
|
1281
|
-
}
|
|
1282
|
-
function b(o) {
|
|
1283
|
-
return o === 62 ? U(o) : o === 93 ? (n.consume(o), b) : I(o);
|
|
1284
|
-
}
|
|
1285
|
-
function j(o) {
|
|
1286
|
-
return o === null || o === 62 ? U(o) : C(o) ? (l = j, W(o)) : (n.consume(o), j);
|
|
1287
|
-
}
|
|
1288
|
-
function F(o) {
|
|
1289
|
-
return o === null ? t(o) : o === 63 ? (n.consume(o), D) : C(o) ? (l = F, W(o)) : (n.consume(o), F);
|
|
1290
|
-
}
|
|
1291
|
-
function D(o) {
|
|
1292
|
-
return o === 62 ? U(o) : F(o);
|
|
1293
|
-
}
|
|
1294
|
-
function _(o) {
|
|
1295
|
-
return nn(o) ? (n.consume(o), k) : t(o);
|
|
1296
|
-
}
|
|
1297
|
-
function k(o) {
|
|
1298
|
-
return o === 45 || v(o) ? (n.consume(o), k) : T(o);
|
|
1299
|
-
}
|
|
1300
|
-
function T(o) {
|
|
1301
|
-
return C(o) ? (l = T, W(o)) : z(o) ? (n.consume(o), T) : U(o);
|
|
1302
|
-
}
|
|
1303
|
-
function H(o) {
|
|
1304
|
-
return o === 45 || v(o) ? (n.consume(o), H) : o === 47 || o === 62 || Z(o) ? N(o) : t(o);
|
|
1305
|
-
}
|
|
1306
|
-
function N(o) {
|
|
1307
|
-
return o === 47 ? (n.consume(o), U) : o === 58 || o === 95 || nn(o) ? (n.consume(o), V) : C(o) ? (l = N, W(o)) : z(o) ? (n.consume(o), N) : U(o);
|
|
1308
|
-
}
|
|
1309
|
-
function V(o) {
|
|
1310
|
-
return o === 45 || o === 46 || o === 58 || o === 95 || v(o) ? (n.consume(o), V) : y(o);
|
|
1311
|
-
}
|
|
1312
|
-
function y(o) {
|
|
1313
|
-
return o === 61 ? (n.consume(o), S) : C(o) ? (l = y, W(o)) : z(o) ? (n.consume(o), y) : N(o);
|
|
1314
|
-
}
|
|
1315
|
-
function S(o) {
|
|
1316
|
-
return o === null || o === 60 || o === 61 || o === 62 || o === 96 ? t(o) : o === 34 || o === 39 ? (n.consume(o), u = o, P) : C(o) ? (l = S, W(o)) : z(o) ? (n.consume(o), S) : (n.consume(o), R);
|
|
1317
|
-
}
|
|
1318
|
-
function P(o) {
|
|
1319
|
-
return o === u ? (n.consume(o), u = void 0, w) : o === null ? t(o) : C(o) ? (l = P, W(o)) : (n.consume(o), P);
|
|
1320
|
-
}
|
|
1321
|
-
function R(o) {
|
|
1322
|
-
return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 96 ? t(o) : o === 47 || o === 62 || Z(o) ? N(o) : (n.consume(o), R);
|
|
1323
|
-
}
|
|
1324
|
-
function w(o) {
|
|
1325
|
-
return o === 47 || o === 62 || Z(o) ? N(o) : t(o);
|
|
1326
|
-
}
|
|
1327
|
-
function U(o) {
|
|
1328
|
-
return o === 62 ? (n.consume(o), n.exit("htmlTextData"), n.exit("htmlText"), r) : t(o);
|
|
1329
|
-
}
|
|
1330
|
-
function W(o) {
|
|
1331
|
-
return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(o), n.exit("lineEnding"), G;
|
|
1332
|
-
}
|
|
1333
|
-
function G(o) {
|
|
1334
|
-
return z(o) ? O(n, en, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(o) : en(o);
|
|
1335
|
-
}
|
|
1336
|
-
function en(o) {
|
|
1337
|
-
return n.enter("htmlTextData"), l(o);
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
var Dn = {
|
|
1341
|
-
name: "labelEnd",
|
|
1342
|
-
tokenize: Ne,
|
|
1343
|
-
resolveTo: He,
|
|
1344
|
-
resolveAll: qe
|
|
1345
|
-
}, Me = {
|
|
1346
|
-
tokenize: Ve
|
|
1347
|
-
}, je = {
|
|
1348
|
-
tokenize: We
|
|
1349
|
-
}, Re = {
|
|
1350
|
-
tokenize: Qe
|
|
1351
|
-
};
|
|
1352
|
-
function qe(n) {
|
|
1353
|
-
var r = -1;
|
|
1354
|
-
for(; ++r < n.length;){
|
|
1355
|
-
var t = n[r][1];
|
|
1356
|
-
(t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") && (n.splice(r + 1, t.type === "labelImage" ? 4 : 2), t.type = "data", r++);
|
|
1357
|
-
}
|
|
1358
|
-
return n;
|
|
1359
|
-
}
|
|
1360
|
-
function He(n, r) {
|
|
1361
|
-
var t = n.length, e = 0, u, i, l, a;
|
|
1362
|
-
for(; t--;)if (u = n[t][1], i) {
|
|
1363
|
-
if (u.type === "link" || u.type === "labelLink" && u._inactive) break;
|
|
1364
|
-
n[t][0] === "enter" && u.type === "labelLink" && (u._inactive = true);
|
|
1365
|
-
} else if (l) {
|
|
1366
|
-
if (n[t][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (i = t, u.type !== "labelLink")) {
|
|
1367
|
-
e = 2;
|
|
1368
|
-
break;
|
|
1369
|
-
}
|
|
1370
|
-
} else u.type === "labelEnd" && (l = t);
|
|
1371
|
-
var m = {
|
|
1372
|
-
type: n[i][1].type === "labelLink" ? "link" : "image",
|
|
1373
|
-
start: Object.assign({}, n[i][1].start),
|
|
1374
|
-
end: Object.assign({}, n[n.length - 1][1].end)
|
|
1375
|
-
}, c = {
|
|
1376
|
-
type: "label",
|
|
1377
|
-
start: Object.assign({}, n[i][1].start),
|
|
1378
|
-
end: Object.assign({}, n[l][1].end)
|
|
1379
|
-
}, p = {
|
|
1380
|
-
type: "labelText",
|
|
1381
|
-
start: Object.assign({}, n[i + e + 2][1].end),
|
|
1382
|
-
end: Object.assign({}, n[l - 2][1].start)
|
|
1383
|
-
};
|
|
1384
|
-
return a = [
|
|
1385
|
-
[
|
|
1386
|
-
"enter",
|
|
1387
|
-
m,
|
|
1388
|
-
r
|
|
1389
|
-
],
|
|
1390
|
-
[
|
|
1391
|
-
"enter",
|
|
1392
|
-
c,
|
|
1393
|
-
r
|
|
1394
|
-
]
|
|
1395
|
-
], a = Y(a, n.slice(i + 1, i + e + 3)), a = Y(a, [
|
|
1396
|
-
[
|
|
1397
|
-
"enter",
|
|
1398
|
-
p,
|
|
1399
|
-
r
|
|
1400
|
-
]
|
|
1401
|
-
]), a = Y(a, Ln(r.parser.constructs.insideSpan.null, n.slice(i + e + 4, l - 3), r)), a = Y(a, [
|
|
1402
|
-
[
|
|
1403
|
-
"exit",
|
|
1404
|
-
p,
|
|
1405
|
-
r
|
|
1406
|
-
],
|
|
1407
|
-
n[l - 2],
|
|
1408
|
-
n[l - 1],
|
|
1409
|
-
[
|
|
1410
|
-
"exit",
|
|
1411
|
-
c,
|
|
1412
|
-
r
|
|
1413
|
-
]
|
|
1414
|
-
]), a = Y(a, n.slice(l + 1)), a = Y(a, [
|
|
1415
|
-
[
|
|
1416
|
-
"exit",
|
|
1417
|
-
m,
|
|
1418
|
-
r
|
|
1419
|
-
]
|
|
1420
|
-
]), tn(n, i, n.length, a), n;
|
|
1421
|
-
}
|
|
1422
|
-
function Ne(n, r, t) {
|
|
1423
|
-
var e = this;
|
|
1424
|
-
var u = e.events.length, i, l;
|
|
1425
|
-
for(; u--;)if ((e.events[u][1].type === "labelImage" || e.events[u][1].type === "labelLink") && !e.events[u][1]._balanced) {
|
|
1426
|
-
i = e.events[u][1];
|
|
1427
|
-
break;
|
|
1428
|
-
}
|
|
1429
|
-
return a;
|
|
1430
|
-
function a(x) {
|
|
1431
|
-
return i ? i._inactive ? f(x) : (l = e.parser.defined.includes(xn(e.sliceSerialize({
|
|
1432
|
-
start: i.end,
|
|
1433
|
-
end: e.now()
|
|
1434
|
-
}))), n.enter("labelEnd"), n.enter("labelMarker"), n.consume(x), n.exit("labelMarker"), n.exit("labelEnd"), m) : t(x);
|
|
1435
|
-
}
|
|
1436
|
-
function m(x) {
|
|
1437
|
-
return x === 40 ? n.attempt(Me, p, l ? p : f)(x) : x === 91 ? n.attempt(je, p, l ? c : f)(x) : l ? p(x) : f(x);
|
|
1438
|
-
}
|
|
1439
|
-
function c(x) {
|
|
1440
|
-
return n.attempt(Re, p, f)(x);
|
|
1441
|
-
}
|
|
1442
|
-
function p(x) {
|
|
1443
|
-
return r(x);
|
|
1444
|
-
}
|
|
1445
|
-
function f(x) {
|
|
1446
|
-
return i._balanced = true, t(x);
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
function Ve(n, r, t) {
|
|
1450
|
-
return e;
|
|
1451
|
-
function e(f) {
|
|
1452
|
-
return n.enter("resource"), n.enter("resourceMarker"), n.consume(f), n.exit("resourceMarker"), u;
|
|
1453
|
-
}
|
|
1454
|
-
function u(f) {
|
|
1455
|
-
return Z(f) ? dn(n, i)(f) : i(f);
|
|
1456
|
-
}
|
|
1457
|
-
function i(f) {
|
|
1458
|
-
return f === 41 ? p(f) : at(n, l, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(f);
|
|
1459
|
-
}
|
|
1460
|
-
function l(f) {
|
|
1461
|
-
return Z(f) ? dn(n, m)(f) : p(f);
|
|
1462
|
-
}
|
|
1463
|
-
function a(f) {
|
|
1464
|
-
return t(f);
|
|
1465
|
-
}
|
|
1466
|
-
function m(f) {
|
|
1467
|
-
return f === 34 || f === 39 || f === 40 ? st(n, c, t, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(f) : p(f);
|
|
1468
|
-
}
|
|
1469
|
-
function c(f) {
|
|
1470
|
-
return Z(f) ? dn(n, p)(f) : p(f);
|
|
1471
|
-
}
|
|
1472
|
-
function p(f) {
|
|
1473
|
-
return f === 41 ? (n.enter("resourceMarker"), n.consume(f), n.exit("resourceMarker"), n.exit("resource"), r) : t(f);
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
function We(n, r, t) {
|
|
1477
|
-
var e = this;
|
|
1478
|
-
return u;
|
|
1479
|
-
function u(a) {
|
|
1480
|
-
return ot.call(e, n, i, l, "reference", "referenceMarker", "referenceString")(a);
|
|
1481
|
-
}
|
|
1482
|
-
function i(a) {
|
|
1483
|
-
return e.parser.defined.includes(xn(e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1))) ? r(a) : t(a);
|
|
1484
|
-
}
|
|
1485
|
-
function l(a) {
|
|
1486
|
-
return t(a);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
function Qe(n, r, t) {
|
|
1490
|
-
return e;
|
|
1491
|
-
function e(i) {
|
|
1492
|
-
return n.enter("reference"), n.enter("referenceMarker"), n.consume(i), n.exit("referenceMarker"), u;
|
|
1493
|
-
}
|
|
1494
|
-
function u(i) {
|
|
1495
|
-
return i === 93 ? (n.enter("referenceMarker"), n.consume(i), n.exit("referenceMarker"), n.exit("reference"), r) : t(i);
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
var Ue = {
|
|
1499
|
-
name: "labelStartImage",
|
|
1500
|
-
tokenize: $e,
|
|
1501
|
-
resolveAll: Dn.resolveAll
|
|
1502
|
-
};
|
|
1503
|
-
function $e(n, r, t) {
|
|
1504
|
-
var e = this;
|
|
1505
|
-
return u;
|
|
1506
|
-
function u(a) {
|
|
1507
|
-
return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(a), n.exit("labelImageMarker"), i;
|
|
1508
|
-
}
|
|
1509
|
-
function i(a) {
|
|
1510
|
-
return a === 91 ? (n.enter("labelMarker"), n.consume(a), n.exit("labelMarker"), n.exit("labelImage"), l) : t(a);
|
|
1511
|
-
}
|
|
1512
|
-
function l(a) {
|
|
1513
|
-
return a === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(a) : r(a);
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
var Ze = {
|
|
1517
|
-
name: "labelStartLink",
|
|
1518
|
-
tokenize: Ye,
|
|
1519
|
-
resolveAll: Dn.resolveAll
|
|
1520
|
-
};
|
|
1521
|
-
function Ye(n, r, t) {
|
|
1522
|
-
var e = this;
|
|
1523
|
-
return u;
|
|
1524
|
-
function u(l) {
|
|
1525
|
-
return n.enter("labelLink"), n.enter("labelMarker"), n.consume(l), n.exit("labelMarker"), n.exit("labelLink"), i;
|
|
1526
|
-
}
|
|
1527
|
-
function i(l) {
|
|
1528
|
-
return l === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(l) : r(l);
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
var wn = {
|
|
1532
|
-
name: "lineEnding",
|
|
1533
|
-
tokenize: Ge
|
|
1534
|
-
};
|
|
1535
|
-
function Ge(n, r) {
|
|
1536
|
-
return t;
|
|
1537
|
-
function t(e) {
|
|
1538
|
-
return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), O(n, r, "linePrefix");
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
var bn = {
|
|
1542
|
-
name: "thematicBreak",
|
|
1543
|
-
tokenize: Je
|
|
1544
|
-
};
|
|
1545
|
-
function Je(n, r, t) {
|
|
1546
|
-
var e = 0, u;
|
|
1547
|
-
return i;
|
|
1548
|
-
function i(c) {
|
|
1549
|
-
return n.enter("thematicBreak"), l(c);
|
|
1550
|
-
}
|
|
1551
|
-
function l(c) {
|
|
1552
|
-
return u = c, a(c);
|
|
1553
|
-
}
|
|
1554
|
-
function a(c) {
|
|
1555
|
-
return c === u ? (n.enter("thematicBreakSequence"), m(c)) : e >= 3 && (c === null || C(c)) ? (n.exit("thematicBreak"), r(c)) : t(c);
|
|
1556
|
-
}
|
|
1557
|
-
function m(c) {
|
|
1558
|
-
return c === u ? (n.consume(c), e++, m) : (n.exit("thematicBreakSequence"), z(c) ? O(n, a, "whitespace")(c) : a(c));
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
var $ = {
|
|
1562
|
-
name: "list",
|
|
1563
|
-
tokenize: ve,
|
|
1564
|
-
continuation: {
|
|
1565
|
-
tokenize: nr
|
|
1566
|
-
},
|
|
1567
|
-
exit: er
|
|
1568
|
-
}, Ke = {
|
|
1569
|
-
tokenize: rr,
|
|
1570
|
-
partial: true
|
|
1571
|
-
}, Xe = {
|
|
1572
|
-
tokenize: tr,
|
|
1573
|
-
partial: true
|
|
1574
|
-
};
|
|
1575
|
-
function ve(n, r, t) {
|
|
1576
|
-
var e = this, u = e.events[e.events.length - 1];
|
|
1577
|
-
var i = u && u[1].type === "linePrefix" ? u[2].sliceSerialize(u[1], true).length : 0, l = 0;
|
|
1578
|
-
return a;
|
|
1579
|
-
function a(h) {
|
|
1580
|
-
var A = e.containerState.type || (h === 42 || h === 43 || h === 45 ? "listUnordered" : "listOrdered");
|
|
1581
|
-
if (A === "listUnordered" ? !e.containerState.marker || h === e.containerState.marker : zn(h)) {
|
|
1582
|
-
if (e.containerState.type || (e.containerState.type = A, n.enter(A, {
|
|
1583
|
-
_container: true
|
|
1584
|
-
})), A === "listUnordered") return n.enter("listItemPrefix"), h === 42 || h === 45 ? n.check(bn, t, c)(h) : c(h);
|
|
1585
|
-
if (!e.interrupt || h === 49) return n.enter("listItemPrefix"), n.enter("listItemValue"), m(h);
|
|
1586
|
-
}
|
|
1587
|
-
return t(h);
|
|
1588
|
-
}
|
|
1589
|
-
function m(h) {
|
|
1590
|
-
return zn(h) && ++l < 10 ? (n.consume(h), m) : (!e.interrupt || l < 2) && (e.containerState.marker ? h === e.containerState.marker : h === 41 || h === 46) ? (n.exit("listItemValue"), c(h)) : t(h);
|
|
1591
|
-
}
|
|
1592
|
-
function c(h) {
|
|
1593
|
-
return n.enter("listItemMarker"), n.consume(h), n.exit("listItemMarker"), e.containerState.marker = e.containerState.marker || h, n.check(Sn, // Can’t be empty when interrupting.
|
|
1594
|
-
e.interrupt ? t : p, n.attempt(Ke, x, f));
|
|
1595
|
-
}
|
|
1596
|
-
function p(h) {
|
|
1597
|
-
return e.containerState.initialBlankLine = true, i++, x(h);
|
|
1598
|
-
}
|
|
1599
|
-
function f(h) {
|
|
1600
|
-
return z(h) ? (n.enter("listItemPrefixWhitespace"), n.consume(h), n.exit("listItemPrefixWhitespace"), x) : t(h);
|
|
1601
|
-
}
|
|
1602
|
-
function x(h) {
|
|
1603
|
-
return e.containerState.size = i + e.sliceSerialize(n.exit("listItemPrefix"), true).length, r(h);
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
function nr(n, r, t) {
|
|
1607
|
-
var e = this;
|
|
1608
|
-
return e.containerState._closeFlow = void 0, n.check(Sn, u, i);
|
|
1609
|
-
function u(a) {
|
|
1610
|
-
return e.containerState.furtherBlankLines = e.containerState.furtherBlankLines || e.containerState.initialBlankLine, O(n, r, "listItemIndent", e.containerState.size + 1)(a);
|
|
1611
|
-
}
|
|
1612
|
-
function i(a) {
|
|
1613
|
-
return e.containerState.furtherBlankLines || !z(a) ? (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, l(a)) : (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, n.attempt(Xe, r, l)(a));
|
|
1614
|
-
}
|
|
1615
|
-
function l(a) {
|
|
1616
|
-
return e.containerState._closeFlow = true, e.interrupt = void 0, O(n, n.attempt($, r, t), "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(a);
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
function tr(n, r, t) {
|
|
1620
|
-
var e = this;
|
|
1621
|
-
return O(n, u, "listItemIndent", e.containerState.size + 1);
|
|
1622
|
-
function u(i) {
|
|
1623
|
-
var l = e.events[e.events.length - 1];
|
|
1624
|
-
return l && l[1].type === "listItemIndent" && l[2].sliceSerialize(l[1], true).length === e.containerState.size ? r(i) : t(i);
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
function er(n) {
|
|
1628
|
-
n.exit(this.containerState.type);
|
|
1629
|
-
}
|
|
1630
|
-
function rr(n, r, t) {
|
|
1631
|
-
var e = this;
|
|
1632
|
-
return O(n, u, "listItemPrefixWhitespace", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1);
|
|
1633
|
-
function u(i) {
|
|
1634
|
-
var l = e.events[e.events.length - 1];
|
|
1635
|
-
return !z(i) && l && l[1].type === "listItemPrefixWhitespace" ? r(i) : t(i);
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
var Kn = {
|
|
1639
|
-
name: "setextUnderline",
|
|
1640
|
-
tokenize: ur,
|
|
1641
|
-
resolveTo: ir
|
|
1642
|
-
};
|
|
1643
|
-
function ir(n, r) {
|
|
1644
|
-
var t = n.length, e, u, i;
|
|
1645
|
-
for(; t--;)if (n[t][0] === "enter") {
|
|
1646
|
-
if (n[t][1].type === "content") {
|
|
1647
|
-
e = t;
|
|
1648
|
-
break;
|
|
1649
|
-
}
|
|
1650
|
-
n[t][1].type === "paragraph" && (u = t);
|
|
1651
|
-
} else n[t][1].type === "content" && n.splice(t, 1), !i && n[t][1].type === "definition" && (i = t);
|
|
1652
|
-
var l = {
|
|
1653
|
-
type: "setextHeading",
|
|
1654
|
-
start: Object.assign({}, n[u][1].start),
|
|
1655
|
-
end: Object.assign({}, n[n.length - 1][1].end)
|
|
1656
|
-
};
|
|
1657
|
-
return n[u][1].type = "setextHeadingText", i ? (n.splice(u, 0, [
|
|
1658
|
-
"enter",
|
|
1659
|
-
l,
|
|
1660
|
-
r
|
|
1661
|
-
]), n.splice(i + 1, 0, [
|
|
1662
|
-
"exit",
|
|
1663
|
-
n[e][1],
|
|
1664
|
-
r
|
|
1665
|
-
]), n[e][1].end = Object.assign({}, n[i][1].end)) : n[e][1] = l, n.push([
|
|
1666
|
-
"exit",
|
|
1667
|
-
l,
|
|
1668
|
-
r
|
|
1669
|
-
]), n;
|
|
1670
|
-
}
|
|
1671
|
-
function ur(n, r, t) {
|
|
1672
|
-
var e = this;
|
|
1673
|
-
var u;
|
|
1674
|
-
return i;
|
|
1675
|
-
function i(c) {
|
|
1676
|
-
var p = e.events.length, f;
|
|
1677
|
-
for(; p--;)if (e.events[p][1].type !== "lineEnding" && e.events[p][1].type !== "linePrefix" && e.events[p][1].type !== "content") {
|
|
1678
|
-
f = e.events[p][1].type === "paragraph";
|
|
1679
|
-
break;
|
|
1680
|
-
}
|
|
1681
|
-
return !e.parser.lazy[e.now().line] && (e.interrupt || f) ? (n.enter("setextHeadingLine"), u = c, l(c)) : t(c);
|
|
1682
|
-
}
|
|
1683
|
-
function l(c) {
|
|
1684
|
-
return n.enter("setextHeadingLineSequence"), a(c);
|
|
1685
|
-
}
|
|
1686
|
-
function a(c) {
|
|
1687
|
-
return c === u ? (n.consume(c), a) : (n.exit("setextHeadingLineSequence"), z(c) ? O(n, m, "lineSuffix")(c) : m(c));
|
|
1688
|
-
}
|
|
1689
|
-
function m(c) {
|
|
1690
|
-
return c === null || C(c) ? (n.exit("setextHeadingLine"), r(c)) : t(c);
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
var lr = {
|
|
1694
|
-
tokenize: ar
|
|
1695
|
-
};
|
|
1696
|
-
function ar(n) {
|
|
1697
|
-
var r = this, t = n.attempt(// Try to parse a blank line.
|
|
1698
|
-
Sn, e, // Try to parse initial flow (essentially, only code).
|
|
1699
|
-
n.attempt(this.parser.constructs.flowInitial, u, O(n, n.attempt(this.parser.constructs.flow, u, n.attempt(pe, u)), "linePrefix")));
|
|
1700
|
-
return t;
|
|
1701
|
-
function e(i) {
|
|
1702
|
-
if (i === null) {
|
|
1703
|
-
n.consume(i);
|
|
1704
|
-
return;
|
|
1705
|
-
}
|
|
1706
|
-
return n.enter("lineEndingBlank"), n.consume(i), n.exit("lineEndingBlank"), r.currentConstruct = void 0, t;
|
|
1707
|
-
}
|
|
1708
|
-
function u(i) {
|
|
1709
|
-
if (i === null) {
|
|
1710
|
-
n.consume(i);
|
|
1711
|
-
return;
|
|
1712
|
-
}
|
|
1713
|
-
return n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), r.currentConstruct = void 0, t;
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
var or = {
|
|
1717
|
-
resolveAll: ht()
|
|
1718
|
-
}, sr = ct("string"), cr = ct("text");
|
|
1719
|
-
function ct(n) {
|
|
1720
|
-
return {
|
|
1721
|
-
tokenize: r,
|
|
1722
|
-
resolveAll: ht(n === "text" ? hr : void 0)
|
|
1723
|
-
};
|
|
1724
|
-
function r(t) {
|
|
1725
|
-
var e = this, u = this.parser.constructs[n], i = t.attempt(u, l, a);
|
|
1726
|
-
return l;
|
|
1727
|
-
function l(p) {
|
|
1728
|
-
return c(p) ? i(p) : a(p);
|
|
1729
|
-
}
|
|
1730
|
-
function a(p) {
|
|
1731
|
-
if (p === null) {
|
|
1732
|
-
t.consume(p);
|
|
1733
|
-
return;
|
|
1734
|
-
}
|
|
1735
|
-
return t.enter("data"), t.consume(p), m;
|
|
1736
|
-
}
|
|
1737
|
-
function m(p) {
|
|
1738
|
-
return c(p) ? (t.exit("data"), i(p)) : (t.consume(p), m);
|
|
1739
|
-
}
|
|
1740
|
-
function c(p) {
|
|
1741
|
-
if (p === null) return true;
|
|
1742
|
-
var f = u[p];
|
|
1743
|
-
var x = -1;
|
|
1744
|
-
if (f) for(; ++x < f.length;){
|
|
1745
|
-
var h = f[x];
|
|
1746
|
-
if (!h.previous || h.previous.call(e, e.previous)) return true;
|
|
1747
|
-
}
|
|
1748
|
-
return false;
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
function ht(n) {
|
|
1753
|
-
return r;
|
|
1754
|
-
function r(t, e) {
|
|
1755
|
-
var u = -1, i;
|
|
1756
|
-
for(; ++u <= t.length;)i === void 0 ? t[u] && t[u][1].type === "data" && (i = u, u++) : (!t[u] || t[u][1].type !== "data") && (u !== i + 2 && (t[i][1].end = t[u - 1][1].end, t.splice(i + 2, u - i - 2), u = i + 2), i = void 0);
|
|
1757
|
-
return n ? n(t, e) : t;
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
function hr(n, r) {
|
|
1761
|
-
var t = 0;
|
|
1762
|
-
for(; ++t <= n.length;)if ((t === n.length || n[t][1].type === "lineEnding") && n[t - 1][1].type === "data") {
|
|
1763
|
-
var e = n[t - 1][1], u = r.sliceStream(e);
|
|
1764
|
-
var i = u.length, l = -1, a = 0, m = void 0;
|
|
1765
|
-
for(; i--;){
|
|
1766
|
-
var c = u[i];
|
|
1767
|
-
if (typeof c == "string") {
|
|
1768
|
-
for(l = c.length; c.charCodeAt(l - 1) === 32;)a++, l--;
|
|
1769
|
-
if (l) break;
|
|
1770
|
-
l = -1;
|
|
1771
|
-
} else if (c === -2) m = true, a++;
|
|
1772
|
-
else if (c !== -1) {
|
|
1773
|
-
i++;
|
|
1774
|
-
break;
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
if (a) {
|
|
1778
|
-
var c1 = {
|
|
1779
|
-
type: t === n.length || m || a < 2 ? "lineSuffix" : "hardBreakTrailing",
|
|
1780
|
-
start: {
|
|
1781
|
-
line: e.end.line,
|
|
1782
|
-
column: e.end.column - a,
|
|
1783
|
-
offset: e.end.offset - a,
|
|
1784
|
-
_index: e.start._index + i,
|
|
1785
|
-
_bufferIndex: i ? l : e.start._bufferIndex + l
|
|
1786
|
-
},
|
|
1787
|
-
end: Object.assign({}, e.end)
|
|
1788
|
-
};
|
|
1789
|
-
e.end = Object.assign({}, c1.start), e.start.offset === e.end.offset ? Object.assign(e, c1) : (n.splice(t, 0, [
|
|
1790
|
-
"enter",
|
|
1791
|
-
c1,
|
|
1792
|
-
r
|
|
1793
|
-
], [
|
|
1794
|
-
"exit",
|
|
1795
|
-
c1,
|
|
1796
|
-
r
|
|
1797
|
-
]), t += 2);
|
|
1798
|
-
}
|
|
1799
|
-
t++;
|
|
1800
|
-
}
|
|
1801
|
-
return n;
|
|
1802
|
-
}
|
|
1803
|
-
function pr(n, r, t) {
|
|
1804
|
-
var e = Object.assign(t ? Object.assign({}, t) : {
|
|
1805
|
-
line: 1,
|
|
1806
|
-
column: 1,
|
|
1807
|
-
offset: 0
|
|
1808
|
-
}, {
|
|
1809
|
-
_index: 0,
|
|
1810
|
-
_bufferIndex: -1
|
|
1811
|
-
});
|
|
1812
|
-
var u = {}, i = [];
|
|
1813
|
-
var l = [], a = [];
|
|
1814
|
-
var m = {
|
|
1815
|
-
consume: j,
|
|
1816
|
-
enter: F,
|
|
1817
|
-
exit: D,
|
|
1818
|
-
attempt: T(_),
|
|
1819
|
-
check: T(k),
|
|
1820
|
-
interrupt: T(k, {
|
|
1821
|
-
interrupt: true
|
|
1822
|
-
})
|
|
1823
|
-
}, c = {
|
|
1824
|
-
previous: null,
|
|
1825
|
-
code: null,
|
|
1826
|
-
containerState: {},
|
|
1827
|
-
events: [],
|
|
1828
|
-
parser: n,
|
|
1829
|
-
sliceStream: h,
|
|
1830
|
-
sliceSerialize: x,
|
|
1831
|
-
now: A,
|
|
1832
|
-
defineSkip: I,
|
|
1833
|
-
write: f
|
|
1834
|
-
};
|
|
1835
|
-
var p = r.tokenize.call(c, m);
|
|
1836
|
-
return r.resolveAll && i.push(r), c;
|
|
1837
|
-
function f(y) {
|
|
1838
|
-
return l = Y(l, y), M(), l[l.length - 1] !== null ? [] : (H(r, 0), c.events = Ln(i, c.events, c), c.events);
|
|
1839
|
-
}
|
|
1840
|
-
function x(y, S) {
|
|
1841
|
-
return mr(h(y), S);
|
|
1842
|
-
}
|
|
1843
|
-
function h(y) {
|
|
1844
|
-
return fr(l, y);
|
|
1845
|
-
}
|
|
1846
|
-
function A() {
|
|
1847
|
-
var y = e.line, S = e.column, P = e.offset, R = e._index, w = e._bufferIndex;
|
|
1848
|
-
return {
|
|
1849
|
-
line: y,
|
|
1850
|
-
column: S,
|
|
1851
|
-
offset: P,
|
|
1852
|
-
_index: R,
|
|
1853
|
-
_bufferIndex: w
|
|
1854
|
-
};
|
|
1855
|
-
}
|
|
1856
|
-
function I(y) {
|
|
1857
|
-
u[y.line] = y.column, V();
|
|
1858
|
-
}
|
|
1859
|
-
function M() {
|
|
1860
|
-
var y;
|
|
1861
|
-
for(; e._index < l.length;){
|
|
1862
|
-
var S = l[e._index];
|
|
1863
|
-
if (typeof S == "string") for(y = e._index, e._bufferIndex < 0 && (e._bufferIndex = 0); e._index === y && e._bufferIndex < S.length;)b(S.charCodeAt(e._bufferIndex));
|
|
1864
|
-
else b(S);
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
function b(y) {
|
|
1868
|
-
p = p(y);
|
|
1869
|
-
}
|
|
1870
|
-
function j(y) {
|
|
1871
|
-
C(y) ? (e.line++, e.column = 1, e.offset += y === -3 ? 2 : 1, V()) : y !== -1 && (e.column++, e.offset++), e._bufferIndex < 0 ? e._index++ : (e._bufferIndex++, e._bufferIndex === l[e._index].length && (e._bufferIndex = -1, e._index++)), c.previous = y;
|
|
1872
|
-
}
|
|
1873
|
-
function F(y, S) {
|
|
1874
|
-
var P = S || {};
|
|
1875
|
-
return P.type = y, P.start = A(), c.events.push([
|
|
1876
|
-
"enter",
|
|
1877
|
-
P,
|
|
1878
|
-
c
|
|
1879
|
-
]), a.push(P), P;
|
|
1880
|
-
}
|
|
1881
|
-
function D(y) {
|
|
1882
|
-
var S = a.pop();
|
|
1883
|
-
return S.end = A(), c.events.push([
|
|
1884
|
-
"exit",
|
|
1885
|
-
S,
|
|
1886
|
-
c
|
|
1887
|
-
]), S;
|
|
1888
|
-
}
|
|
1889
|
-
function _(y, S) {
|
|
1890
|
-
H(y, S.from);
|
|
1891
|
-
}
|
|
1892
|
-
function k(y, S) {
|
|
1893
|
-
S.restore();
|
|
1894
|
-
}
|
|
1895
|
-
function T(y, S) {
|
|
1896
|
-
return P;
|
|
1897
|
-
function P(R, w, U) {
|
|
1898
|
-
var W, G, en, o;
|
|
1899
|
-
return Array.isArray(R) ? rn(R) : "tokenize" in R ? // @ts-expect-error Looks like a construct.
|
|
1900
|
-
rn([
|
|
1901
|
-
R
|
|
1902
|
-
]) : J(R);
|
|
1903
|
-
function J(Q) {
|
|
1904
|
-
return pn;
|
|
1905
|
-
function pn(an) {
|
|
1906
|
-
var fn = an !== null && Q[an], mn = an !== null && Q.null, Fn = // To do: add more extension tests.
|
|
1907
|
-
/* c8 ignore next 2 */ _to_consumable_array(Array.isArray(fn) ? fn : fn ? [
|
|
1908
|
-
fn
|
|
1909
|
-
] : []).concat(_to_consumable_array(Array.isArray(mn) ? mn : mn ? [
|
|
1910
|
-
mn
|
|
1911
|
-
] : []));
|
|
1912
|
-
return rn(Fn)(an);
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
function rn(Q) {
|
|
1916
|
-
return W = Q, G = 0, Q.length === 0 ? U : s(Q[G]);
|
|
1917
|
-
}
|
|
1918
|
-
function s(Q) {
|
|
1919
|
-
return pn;
|
|
1920
|
-
function pn(an) {
|
|
1921
|
-
return o = N(), en = Q, Q.partial || (c.currentConstruct = Q), Q.name && c.parser.constructs.disable.null.includes(Q.name) ? hn() : Q.tokenize.call(// If we do have fields, create an object w/ `context` as its
|
|
1922
|
-
// prototype.
|
|
1923
|
-
// This allows a “live binding”, which is needed for `interrupt`.
|
|
1924
|
-
S ? Object.assign(Object.create(c), S) : c, m, K, hn)(an);
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
function K(Q) {
|
|
1928
|
-
return y(en, o), w;
|
|
1929
|
-
}
|
|
1930
|
-
function hn(Q) {
|
|
1931
|
-
return o.restore(), ++G < W.length ? s(W[G]) : U;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
function H(y, S) {
|
|
1936
|
-
y.resolveAll && !i.includes(y) && i.push(y), y.resolve && tn(c.events, S, c.events.length - S, y.resolve(c.events.slice(S), c)), y.resolveTo && (c.events = y.resolveTo(c.events, c));
|
|
1937
|
-
}
|
|
1938
|
-
function N() {
|
|
1939
|
-
var y = A(), S = c.previous, P = c.currentConstruct, R = c.events.length, w = Array.from(a);
|
|
1940
|
-
return {
|
|
1941
|
-
restore: U,
|
|
1942
|
-
from: R
|
|
1943
|
-
};
|
|
1944
|
-
function U() {
|
|
1945
|
-
e = y, c.previous = S, c.currentConstruct = P, c.events.length = R, a = w, V();
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
function V() {
|
|
1949
|
-
e.line in u && e.column < 2 && (e.column = u[e.line], e.offset += u[e.line] - 1);
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
function fr(n, r) {
|
|
1953
|
-
var t = r.start._index, e = r.start._bufferIndex, u = r.end._index, i = r.end._bufferIndex;
|
|
1954
|
-
var l;
|
|
1955
|
-
if (t === u) l = [
|
|
1956
|
-
n[t].slice(e, i)
|
|
1957
|
-
];
|
|
1958
|
-
else {
|
|
1959
|
-
if (l = n.slice(t, u), e > -1) {
|
|
1960
|
-
var a = l[0];
|
|
1961
|
-
typeof a == "string" ? l[0] = a.slice(e) : l.shift();
|
|
1962
|
-
}
|
|
1963
|
-
i > 0 && l.push(n[u].slice(0, i));
|
|
1964
|
-
}
|
|
1965
|
-
return l;
|
|
1966
|
-
}
|
|
1967
|
-
function mr(n, r) {
|
|
1968
|
-
var t = -1;
|
|
1969
|
-
var e = [];
|
|
1970
|
-
var u;
|
|
1971
|
-
for(; ++t < n.length;){
|
|
1972
|
-
var i = n[t];
|
|
1973
|
-
var l = void 0;
|
|
1974
|
-
if (typeof i == "string") l = i;
|
|
1975
|
-
else switch(i){
|
|
1976
|
-
case -5:
|
|
1977
|
-
{
|
|
1978
|
-
l = "\r";
|
|
1979
|
-
break;
|
|
1980
|
-
}
|
|
1981
|
-
case -4:
|
|
1982
|
-
{
|
|
1983
|
-
l = "\n";
|
|
1984
|
-
break;
|
|
1985
|
-
}
|
|
1986
|
-
case -3:
|
|
1987
|
-
{
|
|
1988
|
-
l = "\r\n";
|
|
1989
|
-
break;
|
|
1990
|
-
}
|
|
1991
|
-
case -2:
|
|
1992
|
-
{
|
|
1993
|
-
l = r ? " " : " ";
|
|
1994
|
-
break;
|
|
1995
|
-
}
|
|
1996
|
-
case -1:
|
|
1997
|
-
{
|
|
1998
|
-
if (!r && u) continue;
|
|
1999
|
-
l = " ";
|
|
2000
|
-
break;
|
|
2001
|
-
}
|
|
2002
|
-
default:
|
|
2003
|
-
l = String.fromCharCode(i);
|
|
2004
|
-
}
|
|
2005
|
-
u = i === -2, e.push(l);
|
|
2006
|
-
}
|
|
2007
|
-
return e.join("");
|
|
2008
|
-
}
|
|
2009
|
-
var _obj, _obj1;
|
|
2010
|
-
var xr = {
|
|
2011
|
-
42: $,
|
|
2012
|
-
43: $,
|
|
2013
|
-
45: $,
|
|
2014
|
-
48: $,
|
|
2015
|
-
49: $,
|
|
2016
|
-
50: $,
|
|
2017
|
-
51: $,
|
|
2018
|
-
52: $,
|
|
2019
|
-
53: $,
|
|
2020
|
-
54: $,
|
|
2021
|
-
55: $,
|
|
2022
|
-
56: $,
|
|
2023
|
-
57: $,
|
|
2024
|
-
62: rt
|
|
2025
|
-
}, gr = {
|
|
2026
|
-
91: ke
|
|
2027
|
-
}, kr = (_obj = {}, _define_property(_obj, -2, Cn), _define_property(_obj, -1, Cn), _define_property(_obj, 32, Cn), _obj), dr = {
|
|
2028
|
-
35: Ee,
|
|
2029
|
-
42: bn,
|
|
2030
|
-
45: [
|
|
2031
|
-
Kn,
|
|
2032
|
-
bn
|
|
2033
|
-
],
|
|
2034
|
-
60: ze,
|
|
2035
|
-
61: Kn,
|
|
2036
|
-
95: bn,
|
|
2037
|
-
96: Gn,
|
|
2038
|
-
126: Gn
|
|
2039
|
-
}, br = {
|
|
2040
|
-
38: ut,
|
|
2041
|
-
92: it
|
|
2042
|
-
}, yr = (_obj1 = {}, _define_property(_obj1, -5, wn), _define_property(_obj1, -4, wn), _define_property(_obj1, -3, wn), _define_property(_obj1, 33, Ue), _define_property(_obj1, 38, ut), _define_property(_obj1, 42, In), _define_property(_obj1, 60, [
|
|
2043
|
-
Yt,
|
|
2044
|
-
Pe
|
|
2045
|
-
]), _define_property(_obj1, 91, Ze), _define_property(_obj1, 92, [
|
|
2046
|
-
Se,
|
|
2047
|
-
it
|
|
2048
|
-
]), _define_property(_obj1, 93, Dn), _define_property(_obj1, 95, In), _define_property(_obj1, 96, ae), _obj1), Sr = {
|
|
2049
|
-
null: [
|
|
2050
|
-
In,
|
|
2051
|
-
or
|
|
2052
|
-
]
|
|
2053
|
-
}, Fr = {
|
|
2054
|
-
null: [
|
|
2055
|
-
42,
|
|
2056
|
-
95
|
|
2057
|
-
]
|
|
2058
|
-
}, Er = {
|
|
2059
|
-
null: []
|
|
2060
|
-
}, Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2061
|
-
__proto__: null,
|
|
2062
|
-
attentionMarkers: Fr,
|
|
2063
|
-
contentInitial: gr,
|
|
2064
|
-
disable: Er,
|
|
2065
|
-
document: xr,
|
|
2066
|
-
flow: dr,
|
|
2067
|
-
flowInitial: kr,
|
|
2068
|
-
insideSpan: Sr,
|
|
2069
|
-
string: br,
|
|
2070
|
-
text: yr
|
|
2071
|
-
}, Symbol.toStringTag, {
|
|
2072
|
-
value: "Module"
|
|
2073
|
-
}));
|
|
2074
|
-
function wr(n) {
|
|
2075
|
-
var t = /** @type {FullNormalizedExtension} */ Ot([
|
|
2076
|
-
Cr
|
|
2077
|
-
].concat(_to_consumable_array((n || {}).extensions || []))), e = {
|
|
2078
|
-
defined: [],
|
|
2079
|
-
lazy: {},
|
|
2080
|
-
constructs: t,
|
|
2081
|
-
content: u(Nt),
|
|
2082
|
-
document: u(Wt),
|
|
2083
|
-
flow: u(lr),
|
|
2084
|
-
string: u(sr),
|
|
2085
|
-
text: u(cr)
|
|
2086
|
-
};
|
|
2087
|
-
return e;
|
|
2088
|
-
function u(i) {
|
|
2089
|
-
return l;
|
|
2090
|
-
function l(a) {
|
|
2091
|
-
return pr(e, i, a);
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
var Xn = /[\0\t\n\r]/g;
|
|
2096
|
-
function Ar() {
|
|
2097
|
-
var n = 1, r = "", t = true, e;
|
|
2098
|
-
return u;
|
|
2099
|
-
function u(i, l, a) {
|
|
2100
|
-
var m = [];
|
|
2101
|
-
var c, p, f, x, h;
|
|
2102
|
-
for(i = r + i.toString(l), f = 0, r = "", t && (i.charCodeAt(0) === 65279 && f++, t = void 0); f < i.length;){
|
|
2103
|
-
if (Xn.lastIndex = f, c = Xn.exec(i), x = c && c.index !== void 0 ? c.index : i.length, h = i.charCodeAt(x), !c) {
|
|
2104
|
-
r = i.slice(f);
|
|
2105
|
-
break;
|
|
2106
|
-
}
|
|
2107
|
-
if (h === 10 && f === x && e) m.push(-3), e = void 0;
|
|
2108
|
-
else switch(e && (m.push(-5), e = void 0), f < x && (m.push(i.slice(f, x)), n += x - f), h){
|
|
2109
|
-
case 0:
|
|
2110
|
-
{
|
|
2111
|
-
m.push(65533), n++;
|
|
2112
|
-
break;
|
|
2113
|
-
}
|
|
2114
|
-
case 9:
|
|
2115
|
-
{
|
|
2116
|
-
for(p = Math.ceil(n / 4) * 4, m.push(-2); n++ < p;)m.push(-1);
|
|
2117
|
-
break;
|
|
2118
|
-
}
|
|
2119
|
-
case 10:
|
|
2120
|
-
{
|
|
2121
|
-
m.push(-4), n = 1;
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
default:
|
|
2125
|
-
e = true, n = 1;
|
|
2126
|
-
}
|
|
2127
|
-
f = x + 1;
|
|
2128
|
-
}
|
|
2129
|
-
return a && (e && m.push(-5), r && m.push(r), m.push(null)), m;
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
function zr(n) {
|
|
2133
|
-
for(; !lt(n););
|
|
2134
|
-
return n;
|
|
2135
|
-
}
|
|
2136
|
-
function pt(n, r) {
|
|
2137
|
-
var t = Number.parseInt(n, r);
|
|
2138
|
-
return(// C0 except for HT, LF, FF, CR, space.
|
|
2139
|
-
t < 9 || t === 11 || t > 13 && t < 32 || // Control character (DEL) of C0, and C1 controls.
|
|
2140
|
-
t > 126 && t < 160 || // Lone high surrogates and low surrogates.
|
|
2141
|
-
t > 55295 && t < 57344 || // Noncharacters.
|
|
2142
|
-
t > 64975 && t < 65008 || (t & 65535) === 65535 || (t & 65535) === 65534 || // Out of range
|
|
2143
|
-
t > 1114111 ? "�" : String.fromCharCode(t));
|
|
2144
|
-
}
|
|
2145
|
-
var Ir = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
2146
|
-
function Tr(n) {
|
|
2147
|
-
return n.replace(Ir, Br);
|
|
2148
|
-
}
|
|
2149
|
-
function Br(n, r, t) {
|
|
2150
|
-
if (r) return r;
|
|
2151
|
-
if (t.charCodeAt(0) === 35) {
|
|
2152
|
-
var u = t.charCodeAt(1), i = u === 120 || u === 88;
|
|
2153
|
-
return pt(t.slice(i ? 2 : 1), i ? 16 : 10);
|
|
2154
|
-
}
|
|
2155
|
-
return On(t) || n;
|
|
2156
|
-
}
|
|
2157
|
-
function yn(n) {
|
|
2158
|
-
return !n || (typeof n === "undefined" ? "undefined" : _type_of(n)) != "object" ? "" : "position" in n || "type" in n ? vn(n.position) : "start" in n || "end" in n ? vn(n) : "line" in n || "column" in n ? Tn(n) : "";
|
|
2159
|
-
}
|
|
2160
|
-
function Tn(n) {
|
|
2161
|
-
return nt(n && n.line) + ":" + nt(n && n.column);
|
|
2162
|
-
}
|
|
2163
|
-
function vn(n) {
|
|
2164
|
-
return Tn(n && n.start) + "-" + Tn(n && n.end);
|
|
2165
|
-
}
|
|
2166
|
-
function nt(n) {
|
|
2167
|
-
return n && typeof n == "number" ? n : 1;
|
|
2168
|
-
}
|
|
2169
|
-
var ft = {}.hasOwnProperty, mt = /**
|
|
2170
|
-
* @type {(
|
|
2171
|
-
* ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
|
|
2172
|
-
* ((value: Value, options?: Options | null | undefined) => Root)
|
|
2173
|
-
* )}
|
|
2174
|
-
*/ /**
|
|
2175
|
-
* @param {Value} value
|
|
2176
|
-
* @param {Encoding | Options | null | undefined} [encoding]
|
|
2177
|
-
* @param {Options | null | undefined} [options]
|
|
2178
|
-
* @returns {Root}
|
|
2179
|
-
*/ function mt(n, r, t) {
|
|
2180
|
-
return typeof r != "string" && (t = r, r = void 0), Lr(t)(zr(wr(t).document().write(Ar()(n, r, true))));
|
|
2181
|
-
};
|
|
2182
|
-
function Lr(n) {
|
|
2183
|
-
var r = {
|
|
2184
|
-
transforms: [],
|
|
2185
|
-
canContainEols: [
|
|
2186
|
-
"emphasis",
|
|
2187
|
-
"fragment",
|
|
2188
|
-
"heading",
|
|
2189
|
-
"paragraph",
|
|
2190
|
-
"strong"
|
|
2191
|
-
],
|
|
2192
|
-
enter: {
|
|
2193
|
-
autolink: a(Hn),
|
|
2194
|
-
autolinkProtocol: y,
|
|
2195
|
-
autolinkEmail: y,
|
|
2196
|
-
atxHeading: a(jn),
|
|
2197
|
-
blockQuote: a(Fn),
|
|
2198
|
-
characterEscape: y,
|
|
2199
|
-
characterReference: y,
|
|
2200
|
-
codeFenced: a(Mn),
|
|
2201
|
-
codeFencedFenceInfo: m,
|
|
2202
|
-
codeFencedFenceMeta: m,
|
|
2203
|
-
codeIndented: a(Mn, m),
|
|
2204
|
-
codeText: a(kt, m),
|
|
2205
|
-
codeTextData: y,
|
|
2206
|
-
data: y,
|
|
2207
|
-
codeFlowValue: y,
|
|
2208
|
-
definition: a(dt),
|
|
2209
|
-
definitionDestinationString: m,
|
|
2210
|
-
definitionLabelString: m,
|
|
2211
|
-
definitionTitleString: m,
|
|
2212
|
-
emphasis: a(bt),
|
|
2213
|
-
hardBreakEscape: a(Rn),
|
|
2214
|
-
hardBreakTrailing: a(Rn),
|
|
2215
|
-
htmlFlow: a(qn, m),
|
|
2216
|
-
htmlFlowData: y,
|
|
2217
|
-
htmlText: a(qn, m),
|
|
2218
|
-
htmlTextData: y,
|
|
2219
|
-
image: a(yt),
|
|
2220
|
-
label: m,
|
|
2221
|
-
link: a(Hn),
|
|
2222
|
-
listItem: a(St),
|
|
2223
|
-
listItemValue: A,
|
|
2224
|
-
listOrdered: a(Nn, h),
|
|
2225
|
-
listUnordered: a(Nn),
|
|
2226
|
-
paragraph: a(Ft),
|
|
2227
|
-
reference: hn,
|
|
2228
|
-
referenceString: m,
|
|
2229
|
-
resourceDestinationString: m,
|
|
2230
|
-
resourceTitleString: m,
|
|
2231
|
-
setextHeading: a(jn),
|
|
2232
|
-
strong: a(Et),
|
|
2233
|
-
thematicBreak: a(wt)
|
|
2234
|
-
},
|
|
2235
|
-
exit: {
|
|
2236
|
-
atxHeading: p(),
|
|
2237
|
-
atxHeadingSequence: T,
|
|
2238
|
-
autolink: p(),
|
|
2239
|
-
autolinkEmail: mn,
|
|
2240
|
-
autolinkProtocol: fn,
|
|
2241
|
-
blockQuote: p(),
|
|
2242
|
-
characterEscapeValue: S,
|
|
2243
|
-
characterReferenceMarkerHexadecimal: pn,
|
|
2244
|
-
characterReferenceMarkerNumeric: pn,
|
|
2245
|
-
characterReferenceValue: an,
|
|
2246
|
-
codeFenced: p(j),
|
|
2247
|
-
codeFencedFence: b,
|
|
2248
|
-
codeFencedFenceInfo: I,
|
|
2249
|
-
codeFencedFenceMeta: M,
|
|
2250
|
-
codeFlowValue: S,
|
|
2251
|
-
codeIndented: p(F),
|
|
2252
|
-
codeText: p(W),
|
|
2253
|
-
codeTextData: S,
|
|
2254
|
-
data: S,
|
|
2255
|
-
definition: p(),
|
|
2256
|
-
definitionDestinationString: k,
|
|
2257
|
-
definitionLabelString: D,
|
|
2258
|
-
definitionTitleString: _,
|
|
2259
|
-
emphasis: p(),
|
|
2260
|
-
hardBreakEscape: p(R),
|
|
2261
|
-
hardBreakTrailing: p(R),
|
|
2262
|
-
htmlFlow: p(w),
|
|
2263
|
-
htmlFlowData: S,
|
|
2264
|
-
htmlText: p(U),
|
|
2265
|
-
htmlTextData: S,
|
|
2266
|
-
image: p(en),
|
|
2267
|
-
label: J,
|
|
2268
|
-
labelText: o,
|
|
2269
|
-
lineEnding: P,
|
|
2270
|
-
link: p(G),
|
|
2271
|
-
listItem: p(),
|
|
2272
|
-
listOrdered: p(),
|
|
2273
|
-
listUnordered: p(),
|
|
2274
|
-
paragraph: p(),
|
|
2275
|
-
referenceString: Q,
|
|
2276
|
-
resourceDestinationString: rn,
|
|
2277
|
-
resourceTitleString: s,
|
|
2278
|
-
resource: K,
|
|
2279
|
-
setextHeading: p(V),
|
|
2280
|
-
setextHeadingLineSequence: N,
|
|
2281
|
-
setextHeadingText: H,
|
|
2282
|
-
strong: p(),
|
|
2283
|
-
thematicBreak: p()
|
|
2284
|
-
}
|
|
2285
|
-
};
|
|
2286
|
-
xt(r, (n || {}).mdastExtensions || []);
|
|
2287
|
-
var t = {};
|
|
2288
|
-
return e;
|
|
2289
|
-
function e(g) {
|
|
2290
|
-
var d = {
|
|
2291
|
-
type: "root",
|
|
2292
|
-
children: []
|
|
2293
|
-
};
|
|
2294
|
-
var E = {
|
|
2295
|
-
stack: [
|
|
2296
|
-
d
|
|
2297
|
-
],
|
|
2298
|
-
tokenStack: [],
|
|
2299
|
-
config: r,
|
|
2300
|
-
enter: c,
|
|
2301
|
-
exit: f,
|
|
2302
|
-
buffer: m,
|
|
2303
|
-
resume: x,
|
|
2304
|
-
setData: i,
|
|
2305
|
-
getData: l
|
|
2306
|
-
}, B = [];
|
|
2307
|
-
var L = -1;
|
|
2308
|
-
for(; ++L < g.length;)if (g[L][1].type === "listOrdered" || g[L][1].type === "listUnordered") if (g[L][0] === "enter") B.push(L);
|
|
2309
|
-
else {
|
|
2310
|
-
var X = B.pop();
|
|
2311
|
-
L = u(g, X, L);
|
|
2312
|
-
}
|
|
2313
|
-
for(L = -1; ++L < g.length;){
|
|
2314
|
-
var X1 = r[g[L][0]];
|
|
2315
|
-
ft.call(X1, g[L][1].type) && X1[g[L][1].type].call(Object.assign({
|
|
2316
|
-
sliceSerialize: g[L][2].sliceSerialize
|
|
2317
|
-
}, E), g[L][1]);
|
|
2318
|
-
}
|
|
2319
|
-
if (E.tokenStack.length > 0) {
|
|
2320
|
-
var X2 = E.tokenStack[E.tokenStack.length - 1];
|
|
2321
|
-
(X2[1] || tt).call(E, void 0, X2[0]);
|
|
2322
|
-
}
|
|
2323
|
-
for(d.position = {
|
|
2324
|
-
start: sn(g.length > 0 ? g[0][1].start : {
|
|
2325
|
-
line: 1,
|
|
2326
|
-
column: 1,
|
|
2327
|
-
offset: 0
|
|
2328
|
-
}),
|
|
2329
|
-
end: sn(g.length > 0 ? g[g.length - 2][1].end : {
|
|
2330
|
-
line: 1,
|
|
2331
|
-
column: 1,
|
|
2332
|
-
offset: 0
|
|
2333
|
-
})
|
|
2334
|
-
}, L = -1; ++L < r.transforms.length;)d = r.transforms[L](d) || d;
|
|
2335
|
-
return d;
|
|
2336
|
-
}
|
|
2337
|
-
function u(g, d, E) {
|
|
2338
|
-
var B = d - 1, L = -1, X = false, on, un, gn, kn;
|
|
2339
|
-
for(; ++B <= E;){
|
|
2340
|
-
var q = g[B];
|
|
2341
|
-
if (q[1].type === "listUnordered" || q[1].type === "listOrdered" || q[1].type === "blockQuote" ? (q[0] === "enter" ? L++ : L--, kn = void 0) : q[1].type === "lineEndingBlank" ? q[0] === "enter" && (on && !kn && !L && !gn && (gn = B), kn = void 0) : q[1].type === "linePrefix" || q[1].type === "listItemValue" || q[1].type === "listItemMarker" || q[1].type === "listItemPrefix" || q[1].type === "listItemPrefixWhitespace" || (kn = void 0), !L && q[0] === "enter" && q[1].type === "listItemPrefix" || L === -1 && q[0] === "exit" && (q[1].type === "listUnordered" || q[1].type === "listOrdered")) {
|
|
2342
|
-
if (on) {
|
|
2343
|
-
var En = B;
|
|
2344
|
-
for(un = void 0; En--;){
|
|
2345
|
-
var ln = g[En];
|
|
2346
|
-
if (ln[1].type === "lineEnding" || ln[1].type === "lineEndingBlank") {
|
|
2347
|
-
if (ln[0] === "exit") continue;
|
|
2348
|
-
un && (g[un][1].type = "lineEndingBlank", X = true), ln[1].type = "lineEnding", un = En;
|
|
2349
|
-
} else if (!(ln[1].type === "linePrefix" || ln[1].type === "blockQuotePrefix" || ln[1].type === "blockQuotePrefixWhitespace" || ln[1].type === "blockQuoteMarker" || ln[1].type === "listItemIndent")) break;
|
|
2350
|
-
}
|
|
2351
|
-
gn && (!un || gn < un) && (on._spread = true), on.end = Object.assign({}, un ? g[un][1].start : q[1].end), g.splice(un || B, 0, [
|
|
2352
|
-
"exit",
|
|
2353
|
-
on,
|
|
2354
|
-
q[2]
|
|
2355
|
-
]), B++, E++;
|
|
2356
|
-
}
|
|
2357
|
-
q[1].type === "listItemPrefix" && (on = {
|
|
2358
|
-
type: "listItem",
|
|
2359
|
-
_spread: false,
|
|
2360
|
-
start: Object.assign({}, q[1].start),
|
|
2361
|
-
// @ts-expect-error: we’ll add `end` in a second.
|
|
2362
|
-
end: void 0
|
|
2363
|
-
}, g.splice(B, 0, [
|
|
2364
|
-
"enter",
|
|
2365
|
-
on,
|
|
2366
|
-
q[2]
|
|
2367
|
-
]), B++, E++, gn = void 0, kn = true);
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
return g[d][1]._spread = X, E;
|
|
2371
|
-
}
|
|
2372
|
-
function i(g, d) {
|
|
2373
|
-
t[g] = d;
|
|
2374
|
-
}
|
|
2375
|
-
function l(g) {
|
|
2376
|
-
return t[g];
|
|
2377
|
-
}
|
|
2378
|
-
function a(g, d) {
|
|
2379
|
-
return E;
|
|
2380
|
-
function E(B) {
|
|
2381
|
-
c.call(this, g(B), B), d && d.call(this, B);
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
function m() {
|
|
2385
|
-
this.stack.push({
|
|
2386
|
-
type: "fragment",
|
|
2387
|
-
children: []
|
|
2388
|
-
});
|
|
2389
|
-
}
|
|
2390
|
-
function c(g, d, E) {
|
|
2391
|
-
return this.stack[this.stack.length - 1].children.push(g), this.stack.push(g), this.tokenStack.push([
|
|
2392
|
-
d,
|
|
2393
|
-
E
|
|
2394
|
-
]), g.position = {
|
|
2395
|
-
start: sn(d.start)
|
|
2396
|
-
}, g;
|
|
2397
|
-
}
|
|
2398
|
-
function p(g) {
|
|
2399
|
-
return d;
|
|
2400
|
-
function d(E) {
|
|
2401
|
-
g && g.call(this, E), f.call(this, E);
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
function f(g, d) {
|
|
2405
|
-
var E = this.stack.pop(), B = this.tokenStack.pop();
|
|
2406
|
-
if (B) B[0].type !== g.type && (d ? d.call(this, g, B[0]) : (B[1] || tt).call(this, g, B[0]));
|
|
2407
|
-
else throw new Error("Cannot close `" + g.type + "` (" + yn({
|
|
2408
|
-
start: g.start,
|
|
2409
|
-
end: g.end
|
|
2410
|
-
}) + "): it’s not open");
|
|
2411
|
-
return E.position.end = sn(g.end), E;
|
|
2412
|
-
}
|
|
2413
|
-
function x() {
|
|
2414
|
-
return Bt(this.stack.pop());
|
|
2415
|
-
}
|
|
2416
|
-
function h() {
|
|
2417
|
-
i("expectingFirstListItemValue", true);
|
|
2418
|
-
}
|
|
2419
|
-
function A(g) {
|
|
2420
|
-
if (l("expectingFirstListItemValue")) {
|
|
2421
|
-
var d = this.stack[this.stack.length - 2];
|
|
2422
|
-
d.start = Number.parseInt(this.sliceSerialize(g), 10), i("expectingFirstListItemValue");
|
|
2423
|
-
}
|
|
2424
|
-
}
|
|
2425
|
-
function I() {
|
|
2426
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2427
|
-
d.lang = g;
|
|
2428
|
-
}
|
|
2429
|
-
function M() {
|
|
2430
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2431
|
-
d.meta = g;
|
|
2432
|
-
}
|
|
2433
|
-
function b() {
|
|
2434
|
-
l("flowCodeInside") || (this.buffer(), i("flowCodeInside", true));
|
|
2435
|
-
}
|
|
2436
|
-
function j() {
|
|
2437
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2438
|
-
d.value = g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), i("flowCodeInside");
|
|
2439
|
-
}
|
|
2440
|
-
function F() {
|
|
2441
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2442
|
-
d.value = g.replace(/(\r?\n|\r)$/g, "");
|
|
2443
|
-
}
|
|
2444
|
-
function D(g) {
|
|
2445
|
-
var d = this.resume(), E = this.stack[this.stack.length - 1];
|
|
2446
|
-
E.label = d, E.identifier = xn(this.sliceSerialize(g)).toLowerCase();
|
|
2447
|
-
}
|
|
2448
|
-
function _() {
|
|
2449
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2450
|
-
d.title = g;
|
|
2451
|
-
}
|
|
2452
|
-
function k() {
|
|
2453
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2454
|
-
d.url = g;
|
|
2455
|
-
}
|
|
2456
|
-
function T(g) {
|
|
2457
|
-
var d = this.stack[this.stack.length - 1];
|
|
2458
|
-
if (!d.depth) {
|
|
2459
|
-
var E = this.sliceSerialize(g).length;
|
|
2460
|
-
d.depth = E;
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
function H() {
|
|
2464
|
-
i("setextHeadingSlurpLineEnding", true);
|
|
2465
|
-
}
|
|
2466
|
-
function N(g) {
|
|
2467
|
-
var d = this.stack[this.stack.length - 1];
|
|
2468
|
-
d.depth = this.sliceSerialize(g).charCodeAt(0) === 61 ? 1 : 2;
|
|
2469
|
-
}
|
|
2470
|
-
function V() {
|
|
2471
|
-
i("setextHeadingSlurpLineEnding");
|
|
2472
|
-
}
|
|
2473
|
-
function y(g) {
|
|
2474
|
-
var d = this.stack[this.stack.length - 1];
|
|
2475
|
-
var E = d.children[d.children.length - 1];
|
|
2476
|
-
(!E || E.type !== "text") && (E = Ct(), E.position = {
|
|
2477
|
-
start: sn(g.start)
|
|
2478
|
-
}, d.children.push(E)), this.stack.push(E);
|
|
2479
|
-
}
|
|
2480
|
-
function S(g) {
|
|
2481
|
-
var d = this.stack.pop();
|
|
2482
|
-
d.value += this.sliceSerialize(g), d.position.end = sn(g.end);
|
|
2483
|
-
}
|
|
2484
|
-
function P(g) {
|
|
2485
|
-
var d = this.stack[this.stack.length - 1];
|
|
2486
|
-
if (l("atHardBreak")) {
|
|
2487
|
-
var E = d.children[d.children.length - 1];
|
|
2488
|
-
E.position.end = sn(g.end), i("atHardBreak");
|
|
2489
|
-
return;
|
|
2490
|
-
}
|
|
2491
|
-
!l("setextHeadingSlurpLineEnding") && r.canContainEols.includes(d.type) && (y.call(this, g), S.call(this, g));
|
|
2492
|
-
}
|
|
2493
|
-
function R() {
|
|
2494
|
-
i("atHardBreak", true);
|
|
2495
|
-
}
|
|
2496
|
-
function w() {
|
|
2497
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2498
|
-
d.value = g;
|
|
2499
|
-
}
|
|
2500
|
-
function U() {
|
|
2501
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2502
|
-
d.value = g;
|
|
2503
|
-
}
|
|
2504
|
-
function W() {
|
|
2505
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2506
|
-
d.value = g;
|
|
2507
|
-
}
|
|
2508
|
-
function G() {
|
|
2509
|
-
var g = this.stack[this.stack.length - 1];
|
|
2510
|
-
if (l("inReference")) {
|
|
2511
|
-
var d = l("referenceType") || "shortcut";
|
|
2512
|
-
g.type += "Reference", g.referenceType = d, delete g.url, delete g.title;
|
|
2513
|
-
} else delete g.identifier, delete g.label;
|
|
2514
|
-
i("referenceType");
|
|
2515
|
-
}
|
|
2516
|
-
function en() {
|
|
2517
|
-
var g = this.stack[this.stack.length - 1];
|
|
2518
|
-
if (l("inReference")) {
|
|
2519
|
-
var d = l("referenceType") || "shortcut";
|
|
2520
|
-
g.type += "Reference", g.referenceType = d, delete g.url, delete g.title;
|
|
2521
|
-
} else delete g.identifier, delete g.label;
|
|
2522
|
-
i("referenceType");
|
|
2523
|
-
}
|
|
2524
|
-
function o(g) {
|
|
2525
|
-
var d = this.sliceSerialize(g), E = this.stack[this.stack.length - 2];
|
|
2526
|
-
E.label = Tr(d), E.identifier = xn(d).toLowerCase();
|
|
2527
|
-
}
|
|
2528
|
-
function J() {
|
|
2529
|
-
var g = this.stack[this.stack.length - 1], d = this.resume(), E = this.stack[this.stack.length - 1];
|
|
2530
|
-
if (i("inReference", true), E.type === "link") {
|
|
2531
|
-
var B = g.children;
|
|
2532
|
-
E.children = B;
|
|
2533
|
-
} else E.alt = d;
|
|
2534
|
-
}
|
|
2535
|
-
function rn() {
|
|
2536
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2537
|
-
d.url = g;
|
|
2538
|
-
}
|
|
2539
|
-
function s() {
|
|
2540
|
-
var g = this.resume(), d = this.stack[this.stack.length - 1];
|
|
2541
|
-
d.title = g;
|
|
2542
|
-
}
|
|
2543
|
-
function K() {
|
|
2544
|
-
i("inReference");
|
|
2545
|
-
}
|
|
2546
|
-
function hn() {
|
|
2547
|
-
i("referenceType", "collapsed");
|
|
2548
|
-
}
|
|
2549
|
-
function Q(g) {
|
|
2550
|
-
var d = this.resume(), E = this.stack[this.stack.length - 1];
|
|
2551
|
-
E.label = d, E.identifier = xn(this.sliceSerialize(g)).toLowerCase(), i("referenceType", "full");
|
|
2552
|
-
}
|
|
2553
|
-
function pn(g) {
|
|
2554
|
-
i("characterReferenceType", g.type);
|
|
2555
|
-
}
|
|
2556
|
-
function an(g) {
|
|
2557
|
-
var d = this.sliceSerialize(g), E = l("characterReferenceType");
|
|
2558
|
-
var B;
|
|
2559
|
-
E ? (B = pt(d, E === "characterReferenceMarkerNumeric" ? 10 : 16), i("characterReferenceType")) : B = On(d);
|
|
2560
|
-
var L = this.stack.pop();
|
|
2561
|
-
L.value += B, L.position.end = sn(g.end);
|
|
2562
|
-
}
|
|
2563
|
-
function fn(g) {
|
|
2564
|
-
S.call(this, g);
|
|
2565
|
-
var d = this.stack[this.stack.length - 1];
|
|
2566
|
-
d.url = this.sliceSerialize(g);
|
|
2567
|
-
}
|
|
2568
|
-
function mn(g) {
|
|
2569
|
-
S.call(this, g);
|
|
2570
|
-
var d = this.stack[this.stack.length - 1];
|
|
2571
|
-
d.url = "mailto:" + this.sliceSerialize(g);
|
|
2572
|
-
}
|
|
2573
|
-
function Fn() {
|
|
2574
|
-
return {
|
|
2575
|
-
type: "blockquote",
|
|
2576
|
-
children: []
|
|
2577
|
-
};
|
|
2578
|
-
}
|
|
2579
|
-
function Mn() {
|
|
2580
|
-
return {
|
|
2581
|
-
type: "code",
|
|
2582
|
-
lang: null,
|
|
2583
|
-
meta: null,
|
|
2584
|
-
value: ""
|
|
2585
|
-
};
|
|
2586
|
-
}
|
|
2587
|
-
function kt() {
|
|
2588
|
-
return {
|
|
2589
|
-
type: "inlineCode",
|
|
2590
|
-
value: ""
|
|
2591
|
-
};
|
|
2592
|
-
}
|
|
2593
|
-
function dt() {
|
|
2594
|
-
return {
|
|
2595
|
-
type: "definition",
|
|
2596
|
-
identifier: "",
|
|
2597
|
-
label: null,
|
|
2598
|
-
title: null,
|
|
2599
|
-
url: ""
|
|
2600
|
-
};
|
|
2601
|
-
}
|
|
2602
|
-
function bt() {
|
|
2603
|
-
return {
|
|
2604
|
-
type: "emphasis",
|
|
2605
|
-
children: []
|
|
2606
|
-
};
|
|
2607
|
-
}
|
|
2608
|
-
function jn() {
|
|
2609
|
-
return {
|
|
2610
|
-
type: "heading",
|
|
2611
|
-
depth: void 0,
|
|
2612
|
-
children: []
|
|
2613
|
-
};
|
|
2614
|
-
}
|
|
2615
|
-
function Rn() {
|
|
2616
|
-
return {
|
|
2617
|
-
type: "break"
|
|
2618
|
-
};
|
|
2619
|
-
}
|
|
2620
|
-
function qn() {
|
|
2621
|
-
return {
|
|
2622
|
-
type: "html",
|
|
2623
|
-
value: ""
|
|
2624
|
-
};
|
|
2625
|
-
}
|
|
2626
|
-
function yt() {
|
|
2627
|
-
return {
|
|
2628
|
-
type: "image",
|
|
2629
|
-
title: null,
|
|
2630
|
-
url: "",
|
|
2631
|
-
alt: null
|
|
2632
|
-
};
|
|
2633
|
-
}
|
|
2634
|
-
function Hn() {
|
|
2635
|
-
return {
|
|
2636
|
-
type: "link",
|
|
2637
|
-
title: null,
|
|
2638
|
-
url: "",
|
|
2639
|
-
children: []
|
|
2640
|
-
};
|
|
2641
|
-
}
|
|
2642
|
-
function Nn(g) {
|
|
2643
|
-
return {
|
|
2644
|
-
type: "list",
|
|
2645
|
-
ordered: g.type === "listOrdered",
|
|
2646
|
-
start: null,
|
|
2647
|
-
spread: g._spread,
|
|
2648
|
-
children: []
|
|
2649
|
-
};
|
|
2650
|
-
}
|
|
2651
|
-
function St(g) {
|
|
2652
|
-
return {
|
|
2653
|
-
type: "listItem",
|
|
2654
|
-
spread: g._spread,
|
|
2655
|
-
checked: null,
|
|
2656
|
-
children: []
|
|
2657
|
-
};
|
|
2658
|
-
}
|
|
2659
|
-
function Ft() {
|
|
2660
|
-
return {
|
|
2661
|
-
type: "paragraph",
|
|
2662
|
-
children: []
|
|
2663
|
-
};
|
|
2664
|
-
}
|
|
2665
|
-
function Et() {
|
|
2666
|
-
return {
|
|
2667
|
-
type: "strong",
|
|
2668
|
-
children: []
|
|
2669
|
-
};
|
|
2670
|
-
}
|
|
2671
|
-
function Ct() {
|
|
2672
|
-
return {
|
|
2673
|
-
type: "text",
|
|
2674
|
-
value: ""
|
|
2675
|
-
};
|
|
2676
|
-
}
|
|
2677
|
-
function wt() {
|
|
2678
|
-
return {
|
|
2679
|
-
type: "thematicBreak"
|
|
2680
|
-
};
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
function sn(n) {
|
|
2684
|
-
return {
|
|
2685
|
-
line: n.line,
|
|
2686
|
-
column: n.column,
|
|
2687
|
-
offset: n.offset
|
|
2688
|
-
};
|
|
2689
|
-
}
|
|
2690
|
-
function xt(n, r) {
|
|
2691
|
-
var t = -1;
|
|
2692
|
-
for(; ++t < r.length;){
|
|
2693
|
-
var e = r[t];
|
|
2694
|
-
Array.isArray(e) ? xt(n, e) : Or(n, e);
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
function Or(n, r) {
|
|
2698
|
-
var t;
|
|
2699
|
-
for(t in r)if (ft.call(r, t)) {
|
|
2700
|
-
if (t === "canContainEols") {
|
|
2701
|
-
var _n_t;
|
|
2702
|
-
var e = r[t];
|
|
2703
|
-
e && (_n_t = n[t]).push.apply(_n_t, _to_consumable_array(e));
|
|
2704
|
-
} else if (t === "transforms") {
|
|
2705
|
-
var _n_t1;
|
|
2706
|
-
var e1 = r[t];
|
|
2707
|
-
e1 && (_n_t1 = n[t]).push.apply(_n_t1, _to_consumable_array(e1));
|
|
2708
|
-
} else if (t === "enter" || t === "exit") {
|
|
2709
|
-
var e2 = r[t];
|
|
2710
|
-
e2 && Object.assign(n[t], e2);
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
function tt(n, r) {
|
|
2715
|
-
throw n ? new Error("Cannot close `" + n.type + "` (" + yn({
|
|
2716
|
-
start: n.start,
|
|
2717
|
-
end: n.end
|
|
2718
|
-
}) + "): a different token (`" + r.type + "`, " + yn({
|
|
2719
|
-
start: r.start,
|
|
2720
|
-
end: r.end
|
|
2721
|
-
}) + ") is open") : new Error("Cannot close document, a token (`" + r.type + "`, " + yn({
|
|
2722
|
-
start: r.start,
|
|
2723
|
-
end: r.end
|
|
2724
|
-
}) + ") is still open");
|
|
2725
|
-
}
|
|
2726
|
-
function Dr(n) {
|
|
2727
|
-
var r = n.replace(/\n{2,}/g, "\n");
|
|
2728
|
-
return index.mh(r);
|
|
2729
|
-
}
|
|
2730
|
-
function Pr(n) {
|
|
2731
|
-
var r = Dr(n), _mt = mt(r), t = _mt.children, e = [
|
|
2732
|
-
[]
|
|
2733
|
-
];
|
|
2734
|
-
var u = 0;
|
|
2735
|
-
function i(l) {
|
|
2736
|
-
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "normal";
|
|
2737
|
-
l.type === "text" ? l.value.split("\n").forEach(function(c, p) {
|
|
2738
|
-
p !== 0 && (u++, e.push([])), c.split(" ").forEach(function(f) {
|
|
2739
|
-
f && e[u].push({
|
|
2740
|
-
content: f,
|
|
2741
|
-
type: a
|
|
2742
|
-
});
|
|
2743
|
-
});
|
|
2744
|
-
}) : (l.type === "strong" || l.type === "emphasis") && l.children.forEach(function(m) {
|
|
2745
|
-
i(m, l.type);
|
|
2746
|
-
});
|
|
2747
|
-
}
|
|
2748
|
-
return t.forEach(function(l) {
|
|
2749
|
-
l.type === "paragraph" && l.children.forEach(function(a) {
|
|
2750
|
-
i(a);
|
|
2751
|
-
});
|
|
2752
|
-
}), e;
|
|
2753
|
-
}
|
|
2754
|
-
function _r(n) {
|
|
2755
|
-
var _mt = mt(n), r = _mt.children;
|
|
2756
|
-
function t(e) {
|
|
2757
|
-
return e.type === "text" ? e.value.replace(/\n/g, "<br/>") : e.type === "strong" ? "<strong>".concat(e.children.map(t).join(""), "</strong>") : e.type === "emphasis" ? "<em>".concat(e.children.map(t).join(""), "</em>") : e.type === "paragraph" ? "<p>".concat(e.children.map(t).join(""), "</p>") : "Unsupported markdown: ".concat(e.type);
|
|
2758
|
-
}
|
|
2759
|
-
return r.map(t).join("");
|
|
2760
|
-
}
|
|
2761
|
-
function Mr(n) {
|
|
2762
|
-
return Intl.Segmenter ? _to_consumable_array(new Intl.Segmenter().segment(n)).map(function(r) {
|
|
2763
|
-
return r.segment;
|
|
2764
|
-
}) : _to_consumable_array(n);
|
|
2765
|
-
}
|
|
2766
|
-
function jr(n, r) {
|
|
2767
|
-
var t = Mr(r.content);
|
|
2768
|
-
return gt(n, [], t, r.type);
|
|
2769
|
-
}
|
|
2770
|
-
function gt(n, r, t, e) {
|
|
2771
|
-
if (t.length === 0) return [
|
|
2772
|
-
{
|
|
2773
|
-
content: r.join(""),
|
|
2774
|
-
type: e
|
|
2775
|
-
},
|
|
2776
|
-
{
|
|
2777
|
-
content: "",
|
|
2778
|
-
type: e
|
|
2779
|
-
}
|
|
2780
|
-
];
|
|
2781
|
-
var _t = _to_array(t), u = _t[0], i = _t.slice(1), l = _to_consumable_array(r).concat([
|
|
2782
|
-
u
|
|
2783
|
-
]);
|
|
2784
|
-
return n([
|
|
2785
|
-
{
|
|
2786
|
-
content: l.join(""),
|
|
2787
|
-
type: e
|
|
2788
|
-
}
|
|
2789
|
-
]) ? gt(n, l, i, e) : (r.length === 0 && u && (r.push(u), t.shift()), [
|
|
2790
|
-
{
|
|
2791
|
-
content: r.join(""),
|
|
2792
|
-
type: e
|
|
2793
|
-
},
|
|
2794
|
-
{
|
|
2795
|
-
content: t.join(""),
|
|
2796
|
-
type: e
|
|
2797
|
-
}
|
|
2798
|
-
]);
|
|
2799
|
-
}
|
|
2800
|
-
function Rr(n, r) {
|
|
2801
|
-
if (n.some(function(param) {
|
|
2802
|
-
var t = param.content;
|
|
2803
|
-
return t.includes("\n");
|
|
2804
|
-
})) throw new Error("splitLineToFitWidth does not support newlines in the line");
|
|
2805
|
-
return Bn(n, r);
|
|
2806
|
-
}
|
|
2807
|
-
function Bn(n, r) {
|
|
2808
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
|
|
2809
|
-
if (n.length === 0) return e.length > 0 && t.push(e), t.length > 0 ? t : [];
|
|
2810
|
-
var u = "";
|
|
2811
|
-
n[0].content === " " && (u = " ", n.shift());
|
|
2812
|
-
var _n_shift;
|
|
2813
|
-
var i = (_n_shift = n.shift()) !== null && _n_shift !== void 0 ? _n_shift : {
|
|
2814
|
-
content: " ",
|
|
2815
|
-
type: "normal"
|
|
2816
|
-
}, l = _to_consumable_array(e);
|
|
2817
|
-
if (u !== "" && l.push({
|
|
2818
|
-
content: u,
|
|
2819
|
-
type: "normal"
|
|
2820
|
-
}), l.push(i), r(l)) return Bn(n, r, t, l);
|
|
2821
|
-
if (e.length > 0) t.push(e), n.unshift(i);
|
|
2822
|
-
else if (i.content) {
|
|
2823
|
-
var _jr = _sliced_to_array(jr(r, i), 2), a = _jr[0], m = _jr[1];
|
|
2824
|
-
t.push([
|
|
2825
|
-
a
|
|
2826
|
-
]), m.content && n.unshift(m);
|
|
2827
|
-
}
|
|
2828
|
-
return Bn(n, r, t);
|
|
2829
|
-
}
|
|
2830
|
-
function qr(n, r) {
|
|
2831
|
-
r && n.attr("style", r);
|
|
2832
|
-
}
|
|
2833
|
-
function Hr(n, r, t, e) {
|
|
2834
|
-
var u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
2835
|
-
var i = n.append("foreignObject"), l = i.append("xhtml:div"), a = r.label, m = r.isNode ? "nodeLabel" : "edgeLabel";
|
|
2836
|
-
l.html('\n <span class="'.concat(m, " ").concat(e, '" ') + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + a + "</span>"), qr(l, r.labelStyle), l.style("display", "table-cell"), l.style("white-space", "nowrap"), l.style("max-width", t + "px"), l.attr("xmlns", "http://www.w3.org/1999/xhtml"), u && l.attr("class", "labelBkg");
|
|
2837
|
-
var c = l.node().getBoundingClientRect();
|
|
2838
|
-
return c.width === t && (l.style("display", "table"), l.style("white-space", "break-spaces"), l.style("width", t + "px"), c = l.node().getBoundingClientRect()), i.style("width", c.width), i.style("height", c.height), i.node();
|
|
2839
|
-
}
|
|
2840
|
-
function Pn(n, r, t) {
|
|
2841
|
-
return n.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", r * t - 0.1 + "em").attr("dy", t + "em");
|
|
2842
|
-
}
|
|
2843
|
-
function Nr(n, r, t) {
|
|
2844
|
-
var e = n.append("text"), u = Pn(e, 1, r);
|
|
2845
|
-
_n(u, t);
|
|
2846
|
-
var i = u.node().getComputedTextLength();
|
|
2847
|
-
return e.remove(), i;
|
|
2848
|
-
}
|
|
2849
|
-
function Qr(n, r, t) {
|
|
2850
|
-
var l;
|
|
2851
|
-
var e = n.append("text"), u = Pn(e, 1, r);
|
|
2852
|
-
_n(u, [
|
|
2853
|
-
{
|
|
2854
|
-
content: t,
|
|
2855
|
-
type: "normal"
|
|
2856
|
-
}
|
|
2857
|
-
]);
|
|
2858
|
-
var i = (l = u.node()) == null ? void 0 : l.getBoundingClientRect();
|
|
2859
|
-
return i && e.remove(), i;
|
|
2860
|
-
}
|
|
2861
|
-
function Vr(n, r, t) {
|
|
2862
|
-
var e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
2863
|
-
var i = r.append("g"), l = i.insert("rect").attr("class", "background"), a = i.append("text").attr("y", "-10.1");
|
|
2864
|
-
var m = 0;
|
|
2865
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2866
|
-
try {
|
|
2867
|
-
for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
2868
|
-
var c = _step.value;
|
|
2869
|
-
var p = function(x) {
|
|
2870
|
-
return Nr(i, 1.1, x) <= n;
|
|
2871
|
-
}, f = p(c) ? [
|
|
2872
|
-
c
|
|
2873
|
-
] : Rr(c, p);
|
|
2874
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
2875
|
-
try {
|
|
2876
|
-
for(var _iterator1 = f[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
2877
|
-
var x = _step1.value;
|
|
2878
|
-
var h = Pn(a, m, 1.1);
|
|
2879
|
-
_n(h, x), m++;
|
|
2880
|
-
}
|
|
2881
|
-
} catch (err) {
|
|
2882
|
-
_didIteratorError1 = true;
|
|
2883
|
-
_iteratorError1 = err;
|
|
2884
|
-
} finally{
|
|
2885
|
-
try {
|
|
2886
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
2887
|
-
_iterator1.return();
|
|
2888
|
-
}
|
|
2889
|
-
} finally{
|
|
2890
|
-
if (_didIteratorError1) {
|
|
2891
|
-
throw _iteratorError1;
|
|
2892
|
-
}
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
}
|
|
2896
|
-
} catch (err) {
|
|
2897
|
-
_didIteratorError = true;
|
|
2898
|
-
_iteratorError = err;
|
|
2899
|
-
} finally{
|
|
2900
|
-
try {
|
|
2901
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2902
|
-
_iterator.return();
|
|
2903
|
-
}
|
|
2904
|
-
} finally{
|
|
2905
|
-
if (_didIteratorError) {
|
|
2906
|
-
throw _iteratorError;
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
}
|
|
2910
|
-
if (e) {
|
|
2911
|
-
var c1 = a.node().getBBox(), p1 = 2;
|
|
2912
|
-
return l.attr("x", -p1).attr("y", -p1).attr("width", c1.width + 2 * p1).attr("height", c1.height + 2 * p1), i.node();
|
|
2913
|
-
} else return a.node();
|
|
2914
|
-
}
|
|
2915
|
-
function _n(n, r) {
|
|
2916
|
-
n.text(""), r.forEach(function(t, e) {
|
|
2917
|
-
var u = n.append("tspan").attr("font-style", t.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", t.type === "strong" ? "bold" : "normal");
|
|
2918
|
-
e === 0 ? u.text(t.content) : u.text(" " + t.content);
|
|
2919
|
-
});
|
|
2920
|
-
}
|
|
2921
|
-
var Ur = function(n) {
|
|
2922
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, tmp = _ref.style, t = tmp === void 0 ? "" : tmp, tmp1 = _ref.isTitle, e = tmp1 === void 0 ? false : tmp1, tmp2 = _ref.classes, u = tmp2 === void 0 ? "" : tmp2, tmp3 = _ref.useHtmlLabels, i = tmp3 === void 0 ? true : tmp3, tmp4 = _ref.isNode, l = tmp4 === void 0 ? true : tmp4, tmp5 = _ref.width, a = tmp5 === void 0 ? 200 : tmp5, tmp6 = _ref.addSvgBackground, m = tmp6 === void 0 ? false : tmp6;
|
|
2923
|
-
if (index.L.info("createText", r, t, e, u, i, l, m), i) {
|
|
2924
|
-
var c = _r(r), p = {
|
|
2925
|
-
isNode: l,
|
|
2926
|
-
label: index.q0(c).replace(/fa[blrs]?:fa-[\w-]+/g, // cspell: disable-line
|
|
2927
|
-
function(x) {
|
|
2928
|
-
return "<i class='".concat(x.replace(":", " "), "'></i>");
|
|
2929
|
-
}),
|
|
2930
|
-
labelStyle: t.replace("fill:", "color:")
|
|
2931
|
-
};
|
|
2932
|
-
return Hr(n, p, a, u, m);
|
|
2933
|
-
} else {
|
|
2934
|
-
var c1 = Pr(r);
|
|
2935
|
-
return Vr(a, n, c1, m);
|
|
2936
|
-
}
|
|
2937
|
-
};
|
|
2938
|
-
|
|
2939
|
-
exports.Qr = Qr;
|
|
2940
|
-
exports.Ur = Ur;
|