@bluepic/embed 0.4.0-next.128 → 0.4.0-next.129
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/bluepic-embed.iife.js +132 -117
- package/dist/bluepic-embed.umd.js +132 -117
- package/dist/components/AssetViewer/AssetViewer.vue.d.ts +6 -0
- package/dist/main.cjs +71 -71
- package/dist/main.mjs +9249 -9095
- package/dist/markdown-it-BJC5HRVJ.js +3836 -0
- package/dist/markdown-it-D-2rX95W.cjs +16 -0
- package/dist/style.css +1 -1
- package/dist/util/gallery.d.ts +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,3836 @@
|
|
|
1
|
+
var Be = Object.defineProperty;
|
|
2
|
+
var ke = (A, e, n) => e in A ? Be(A, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : A[e] = n;
|
|
3
|
+
var E = (A, e, n) => ke(A, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
const kA = {};
|
|
5
|
+
function Ee(A) {
|
|
6
|
+
let e = kA[A];
|
|
7
|
+
if (e)
|
|
8
|
+
return e;
|
|
9
|
+
e = kA[A] = [];
|
|
10
|
+
for (let n = 0; n < 128; n++) {
|
|
11
|
+
const r = String.fromCharCode(n);
|
|
12
|
+
e.push(r);
|
|
13
|
+
}
|
|
14
|
+
for (let n = 0; n < A.length; n++) {
|
|
15
|
+
const r = A.charCodeAt(n);
|
|
16
|
+
e[r] = "%" + ("0" + r.toString(16).toUpperCase()).slice(-2);
|
|
17
|
+
}
|
|
18
|
+
return e;
|
|
19
|
+
}
|
|
20
|
+
function U(A, e) {
|
|
21
|
+
typeof e != "string" && (e = U.defaultChars);
|
|
22
|
+
const n = Ee(e);
|
|
23
|
+
return A.replace(/(%[a-f0-9]{2})+/gi, function(r) {
|
|
24
|
+
let t = "";
|
|
25
|
+
for (let i = 0, o = r.length; i < o; i += 3) {
|
|
26
|
+
const s = parseInt(r.slice(i + 1, i + 3), 16);
|
|
27
|
+
if (s < 128) {
|
|
28
|
+
t += n[s];
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if ((s & 224) === 192 && i + 3 < o) {
|
|
32
|
+
const c = parseInt(r.slice(i + 4, i + 6), 16);
|
|
33
|
+
if ((c & 192) === 128) {
|
|
34
|
+
const l = s << 6 & 1984 | c & 63;
|
|
35
|
+
l < 128 ? t += "��" : t += String.fromCharCode(l), i += 3;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if ((s & 240) === 224 && i + 6 < o) {
|
|
40
|
+
const c = parseInt(r.slice(i + 4, i + 6), 16), l = parseInt(r.slice(i + 7, i + 9), 16);
|
|
41
|
+
if ((c & 192) === 128 && (l & 192) === 128) {
|
|
42
|
+
const h = s << 12 & 61440 | c << 6 & 4032 | l & 63;
|
|
43
|
+
h < 2048 || h >= 55296 && h <= 57343 ? t += "���" : t += String.fromCharCode(h), i += 6;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if ((s & 248) === 240 && i + 9 < o) {
|
|
48
|
+
const c = parseInt(r.slice(i + 4, i + 6), 16), l = parseInt(r.slice(i + 7, i + 9), 16), h = parseInt(r.slice(i + 10, i + 12), 16);
|
|
49
|
+
if ((c & 192) === 128 && (l & 192) === 128 && (h & 192) === 128) {
|
|
50
|
+
let a = s << 18 & 1835008 | c << 12 & 258048 | l << 6 & 4032 | h & 63;
|
|
51
|
+
a < 65536 || a > 1114111 ? t += "����" : (a -= 65536, t += String.fromCharCode(55296 + (a >> 10), 56320 + (a & 1023))), i += 9;
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
t += "�";
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
U.defaultChars = ";/?:@&=+$,#";
|
|
61
|
+
U.componentChars = "";
|
|
62
|
+
const EA = {};
|
|
63
|
+
function be(A) {
|
|
64
|
+
let e = EA[A];
|
|
65
|
+
if (e)
|
|
66
|
+
return e;
|
|
67
|
+
e = EA[A] = [];
|
|
68
|
+
for (let n = 0; n < 128; n++) {
|
|
69
|
+
const r = String.fromCharCode(n);
|
|
70
|
+
/^[0-9a-z]$/i.test(r) ? e.push(r) : e.push("%" + ("0" + n.toString(16).toUpperCase()).slice(-2));
|
|
71
|
+
}
|
|
72
|
+
for (let n = 0; n < A.length; n++)
|
|
73
|
+
e[A.charCodeAt(n)] = A[n];
|
|
74
|
+
return e;
|
|
75
|
+
}
|
|
76
|
+
function $(A, e, n) {
|
|
77
|
+
typeof e != "string" && (n = e, e = $.defaultChars), typeof n > "u" && (n = !0);
|
|
78
|
+
const r = be(e);
|
|
79
|
+
let t = "";
|
|
80
|
+
for (let i = 0, o = A.length; i < o; i++) {
|
|
81
|
+
const s = A.charCodeAt(i);
|
|
82
|
+
if (n && s === 37 && i + 2 < o && /^[0-9a-f]{2}$/i.test(A.slice(i + 1, i + 3))) {
|
|
83
|
+
t += A.slice(i, i + 3), i += 2;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (s < 128) {
|
|
87
|
+
t += r[s];
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (s >= 55296 && s <= 57343) {
|
|
91
|
+
if (s >= 55296 && s <= 56319 && i + 1 < o) {
|
|
92
|
+
const c = A.charCodeAt(i + 1);
|
|
93
|
+
if (c >= 56320 && c <= 57343) {
|
|
94
|
+
t += encodeURIComponent(A[i] + A[i + 1]), i++;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
t += "%EF%BF%BD";
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
t += encodeURIComponent(A[i]);
|
|
102
|
+
}
|
|
103
|
+
return t;
|
|
104
|
+
}
|
|
105
|
+
$.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
106
|
+
$.componentChars = "-_.!~*'()";
|
|
107
|
+
function dA(A) {
|
|
108
|
+
let e = "";
|
|
109
|
+
return e += A.protocol || "", e += A.slashes ? "//" : "", e += A.auth ? A.auth + "@" : "", A.hostname && A.hostname.indexOf(":") !== -1 ? e += "[" + A.hostname + "]" : e += A.hostname || "", e += A.port ? ":" + A.port : "", e += A.pathname || "", e += A.search || "", e += A.hash || "", e;
|
|
110
|
+
}
|
|
111
|
+
function tA() {
|
|
112
|
+
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
113
|
+
}
|
|
114
|
+
const we = /^([a-z0-9.+-]+:)/i, _e = /:[0-9]*$/, ye = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Qe = ["<", ">", '"', "`", " ", "\r", `
|
|
115
|
+
`, " "], xe = ["{", "}", "|", "\\", "^", "`"].concat(Qe), Ke = ["'"].concat(xe), bA = ["%", "/", "?", ";", "#"].concat(Ke), wA = ["/", "?", "#"], Ge = 255, _A = /^[+a-z0-9A-Z_-]{0,63}$/, We = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, yA = {
|
|
116
|
+
javascript: !0,
|
|
117
|
+
"javascript:": !0
|
|
118
|
+
}, QA = {
|
|
119
|
+
http: !0,
|
|
120
|
+
https: !0,
|
|
121
|
+
ftp: !0,
|
|
122
|
+
gopher: !0,
|
|
123
|
+
file: !0,
|
|
124
|
+
"http:": !0,
|
|
125
|
+
"https:": !0,
|
|
126
|
+
"ftp:": !0,
|
|
127
|
+
"gopher:": !0,
|
|
128
|
+
"file:": !0
|
|
129
|
+
};
|
|
130
|
+
function CA(A, e) {
|
|
131
|
+
if (A && A instanceof tA) return A;
|
|
132
|
+
const n = new tA();
|
|
133
|
+
return n.parse(A, e), n;
|
|
134
|
+
}
|
|
135
|
+
tA.prototype.parse = function(A, e) {
|
|
136
|
+
let n, r, t, i = A;
|
|
137
|
+
if (i = i.trim(), !e && A.split("#").length === 1) {
|
|
138
|
+
const l = ye.exec(i);
|
|
139
|
+
if (l)
|
|
140
|
+
return this.pathname = l[1], l[2] && (this.search = l[2]), this;
|
|
141
|
+
}
|
|
142
|
+
let o = we.exec(i);
|
|
143
|
+
if (o && (o = o[0], n = o.toLowerCase(), this.protocol = o, i = i.substr(o.length)), (e || o || i.match(/^\/\/[^@\/]+@[^@\/]+/)) && (t = i.substr(0, 2) === "//", t && !(o && yA[o]) && (i = i.substr(2), this.slashes = !0)), !yA[o] && (t || o && !QA[o])) {
|
|
144
|
+
let l = -1;
|
|
145
|
+
for (let u = 0; u < wA.length; u++)
|
|
146
|
+
r = i.indexOf(wA[u]), r !== -1 && (l === -1 || r < l) && (l = r);
|
|
147
|
+
let h, a;
|
|
148
|
+
l === -1 ? a = i.lastIndexOf("@") : a = i.lastIndexOf("@", l), a !== -1 && (h = i.slice(0, a), i = i.slice(a + 1), this.auth = h), l = -1;
|
|
149
|
+
for (let u = 0; u < bA.length; u++)
|
|
150
|
+
r = i.indexOf(bA[u]), r !== -1 && (l === -1 || r < l) && (l = r);
|
|
151
|
+
l === -1 && (l = i.length), i[l - 1] === ":" && l--;
|
|
152
|
+
const f = i.slice(0, l);
|
|
153
|
+
i = i.slice(l), this.parseHost(f), this.hostname = this.hostname || "";
|
|
154
|
+
const g = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
155
|
+
if (!g) {
|
|
156
|
+
const u = this.hostname.split(/\./);
|
|
157
|
+
for (let I = 0, p = u.length; I < p; I++) {
|
|
158
|
+
const B = u[I];
|
|
159
|
+
if (B && !B.match(_A)) {
|
|
160
|
+
let D = "";
|
|
161
|
+
for (let F = 0, d = B.length; F < d; F++)
|
|
162
|
+
B.charCodeAt(F) > 127 ? D += "x" : D += B[F];
|
|
163
|
+
if (!D.match(_A)) {
|
|
164
|
+
const F = u.slice(0, I), d = u.slice(I + 1), m = B.match(We);
|
|
165
|
+
m && (F.push(m[1]), d.unshift(m[2])), d.length && (i = d.join(".") + i), this.hostname = F.join(".");
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
this.hostname.length > Ge && (this.hostname = ""), g && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
172
|
+
}
|
|
173
|
+
const s = i.indexOf("#");
|
|
174
|
+
s !== -1 && (this.hash = i.substr(s), i = i.slice(0, s));
|
|
175
|
+
const c = i.indexOf("?");
|
|
176
|
+
return c !== -1 && (this.search = i.substr(c), i = i.slice(0, c)), i && (this.pathname = i), QA[n] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
177
|
+
};
|
|
178
|
+
tA.prototype.parseHost = function(A) {
|
|
179
|
+
let e = _e.exec(A);
|
|
180
|
+
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), A = A.substr(0, A.length - e.length)), A && (this.hostname = A);
|
|
181
|
+
};
|
|
182
|
+
const Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
|
+
__proto__: null,
|
|
184
|
+
decode: U,
|
|
185
|
+
encode: $,
|
|
186
|
+
format: dA,
|
|
187
|
+
parse: CA
|
|
188
|
+
}, Symbol.toStringTag, { value: "Module" })), XA = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, zA = /[\0-\x1F\x7F-\x9F]/, Ze = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, mA = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\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\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/, LA = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8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A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
189
|
+
__proto__: null,
|
|
190
|
+
Any: XA,
|
|
191
|
+
Cc: zA,
|
|
192
|
+
Cf: Ze,
|
|
193
|
+
P: mA,
|
|
194
|
+
S: LA,
|
|
195
|
+
Z: jA
|
|
196
|
+
}, Symbol.toStringTag, { value: "Module" })), Re = /* @__PURE__ */ new Map([
|
|
197
|
+
[0, 65533],
|
|
198
|
+
// C1 Unicode control character reference replacements
|
|
199
|
+
[128, 8364],
|
|
200
|
+
[130, 8218],
|
|
201
|
+
[131, 402],
|
|
202
|
+
[132, 8222],
|
|
203
|
+
[133, 8230],
|
|
204
|
+
[134, 8224],
|
|
205
|
+
[135, 8225],
|
|
206
|
+
[136, 710],
|
|
207
|
+
[137, 8240],
|
|
208
|
+
[138, 352],
|
|
209
|
+
[139, 8249],
|
|
210
|
+
[140, 338],
|
|
211
|
+
[142, 381],
|
|
212
|
+
[145, 8216],
|
|
213
|
+
[146, 8217],
|
|
214
|
+
[147, 8220],
|
|
215
|
+
[148, 8221],
|
|
216
|
+
[149, 8226],
|
|
217
|
+
[150, 8211],
|
|
218
|
+
[151, 8212],
|
|
219
|
+
[152, 732],
|
|
220
|
+
[153, 8482],
|
|
221
|
+
[154, 353],
|
|
222
|
+
[155, 8250],
|
|
223
|
+
[156, 339],
|
|
224
|
+
[158, 382],
|
|
225
|
+
[159, 376]
|
|
226
|
+
]);
|
|
227
|
+
function Se(A) {
|
|
228
|
+
return A >= 55296 && A <= 57343 || A > 1114111 ? 65533 : Re.get(A) ?? A;
|
|
229
|
+
}
|
|
230
|
+
function He(A) {
|
|
231
|
+
const e = atob(A), n = e.length & -2, r = new Uint16Array(n / 2);
|
|
232
|
+
for (let t = 0, i = 0; t < n; t += 2) {
|
|
233
|
+
const o = e.charCodeAt(t), s = e.charCodeAt(t + 1);
|
|
234
|
+
r[i++] = o | s << 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aLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");
|
|
239
|
+
var Q;
|
|
240
|
+
(function(A) {
|
|
241
|
+
A[A.VALUE_LENGTH = 49152] = "VALUE_LENGTH", A[A.FLAG13 = 8192] = "FLAG13", A[A.BRANCH_LENGTH = 8064] = "BRANCH_LENGTH", A[A.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
242
|
+
})(Q || (Q = {}));
|
|
243
|
+
var w;
|
|
244
|
+
(function(A) {
|
|
245
|
+
A[A.NUM = 35] = "NUM", A[A.SEMI = 59] = "SEMI", A[A.EQUALS = 61] = "EQUALS", A[A.ZERO = 48] = "ZERO", A[A.NINE = 57] = "NINE", A[A.LOWER_A = 97] = "LOWER_A", A[A.LOWER_F = 102] = "LOWER_F", A[A.LOWER_X = 120] = "LOWER_X", A[A.LOWER_Z = 122] = "LOWER_Z", A[A.UPPER_A = 65] = "UPPER_A", A[A.UPPER_F = 70] = "UPPER_F", A[A.UPPER_Z = 90] = "UPPER_Z";
|
|
246
|
+
})(w || (w = {}));
|
|
247
|
+
const xA = 32;
|
|
248
|
+
function pA(A) {
|
|
249
|
+
return A >= w.ZERO && A <= w.NINE;
|
|
250
|
+
}
|
|
251
|
+
function ve(A) {
|
|
252
|
+
return A >= w.UPPER_A && A <= w.UPPER_F || A >= w.LOWER_A && A <= w.LOWER_F;
|
|
253
|
+
}
|
|
254
|
+
function Ne(A) {
|
|
255
|
+
return A >= w.UPPER_A && A <= w.UPPER_Z || A >= w.LOWER_A && A <= w.LOWER_Z || pA(A);
|
|
256
|
+
}
|
|
257
|
+
function Ue(A) {
|
|
258
|
+
return A === w.EQUALS || Ne(A);
|
|
259
|
+
}
|
|
260
|
+
var y;
|
|
261
|
+
(function(A) {
|
|
262
|
+
A[A.EntityStart = 0] = "EntityStart", A[A.NumericStart = 1] = "NumericStart", A[A.NumericDecimal = 2] = "NumericDecimal", A[A.NumericHex = 3] = "NumericHex", A[A.NamedEntity = 4] = "NamedEntity";
|
|
263
|
+
})(y || (y = {}));
|
|
264
|
+
var R;
|
|
265
|
+
(function(A) {
|
|
266
|
+
A[A.Legacy = 0] = "Legacy", A[A.Strict = 1] = "Strict", A[A.Attribute = 2] = "Attribute";
|
|
267
|
+
})(R || (R = {}));
|
|
268
|
+
class Oe {
|
|
269
|
+
constructor(e, n, r) {
|
|
270
|
+
E(this, "decodeTree");
|
|
271
|
+
E(this, "emitCodePoint");
|
|
272
|
+
E(this, "errors");
|
|
273
|
+
/** The current state of the decoder. */
|
|
274
|
+
E(this, "state", y.EntityStart);
|
|
275
|
+
/** Characters that were consumed while parsing an entity. */
|
|
276
|
+
E(this, "consumed", 1);
|
|
277
|
+
/**
|
|
278
|
+
* The result of the entity.
|
|
279
|
+
*
|
|
280
|
+
* Either the result index of a numeric entity, or the codepoint of a
|
|
281
|
+
* numeric entity.
|
|
282
|
+
*/
|
|
283
|
+
E(this, "result", 0);
|
|
284
|
+
/** The current index in the decode tree. */
|
|
285
|
+
E(this, "treeIndex", 0);
|
|
286
|
+
/** The number of characters that were consumed in excess. */
|
|
287
|
+
E(this, "excess", 1);
|
|
288
|
+
/** The mode in which the decoder is operating. */
|
|
289
|
+
E(this, "decodeMode", R.Strict);
|
|
290
|
+
/** The number of characters that have been consumed in the current run. */
|
|
291
|
+
E(this, "runConsumed", 0);
|
|
292
|
+
this.decodeTree = e, this.emitCodePoint = n, this.errors = r;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Resets the instance to make it reusable.
|
|
296
|
+
* @param decodeMode Entity decoding mode to use.
|
|
297
|
+
*/
|
|
298
|
+
startEntity(e) {
|
|
299
|
+
this.decodeMode = e, this.state = y.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1, this.runConsumed = 0;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
303
|
+
* If the entity is incomplete, the decoder will return -1.
|
|
304
|
+
*
|
|
305
|
+
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
|
306
|
+
* entity is incomplete, and resume when the next string is written.
|
|
307
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
308
|
+
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
309
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
310
|
+
*/
|
|
311
|
+
write(e, n) {
|
|
312
|
+
switch (this.state) {
|
|
313
|
+
case y.EntityStart:
|
|
314
|
+
return e.charCodeAt(n) === w.NUM ? (this.state = y.NumericStart, this.consumed += 1, this.stateNumericStart(e, n + 1)) : (this.state = y.NamedEntity, this.stateNamedEntity(e, n));
|
|
315
|
+
case y.NumericStart:
|
|
316
|
+
return this.stateNumericStart(e, n);
|
|
317
|
+
case y.NumericDecimal:
|
|
318
|
+
return this.stateNumericDecimal(e, n);
|
|
319
|
+
case y.NumericHex:
|
|
320
|
+
return this.stateNumericHex(e, n);
|
|
321
|
+
case y.NamedEntity:
|
|
322
|
+
return this.stateNamedEntity(e, n);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Switches between the numeric decimal and hexadecimal states.
|
|
327
|
+
*
|
|
328
|
+
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
|
329
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
330
|
+
* @param offset The current offset.
|
|
331
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
332
|
+
*/
|
|
333
|
+
stateNumericStart(e, n) {
|
|
334
|
+
return n >= e.length ? -1 : (e.charCodeAt(n) | xA) === w.LOWER_X ? (this.state = y.NumericHex, this.consumed += 1, this.stateNumericHex(e, n + 1)) : (this.state = y.NumericDecimal, this.stateNumericDecimal(e, n));
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Parses a hexadecimal numeric entity.
|
|
338
|
+
*
|
|
339
|
+
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
|
340
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
341
|
+
* @param offset The current offset.
|
|
342
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
343
|
+
*/
|
|
344
|
+
stateNumericHex(e, n) {
|
|
345
|
+
for (; n < e.length; ) {
|
|
346
|
+
const r = e.charCodeAt(n);
|
|
347
|
+
if (pA(r) || ve(r)) {
|
|
348
|
+
const t = r <= w.NINE ? r - w.ZERO : (r | xA) - w.LOWER_A + 10;
|
|
349
|
+
this.result = this.result * 16 + t, this.consumed++, n++;
|
|
350
|
+
} else
|
|
351
|
+
return this.emitNumericEntity(r, 3);
|
|
352
|
+
}
|
|
353
|
+
return -1;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Parses a decimal numeric entity.
|
|
357
|
+
*
|
|
358
|
+
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
|
359
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
360
|
+
* @param offset The current offset.
|
|
361
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
362
|
+
*/
|
|
363
|
+
stateNumericDecimal(e, n) {
|
|
364
|
+
for (; n < e.length; ) {
|
|
365
|
+
const r = e.charCodeAt(n);
|
|
366
|
+
if (pA(r))
|
|
367
|
+
this.result = this.result * 10 + (r - w.ZERO), this.consumed++, n++;
|
|
368
|
+
else
|
|
369
|
+
return this.emitNumericEntity(r, 2);
|
|
370
|
+
}
|
|
371
|
+
return -1;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Validate and emit a numeric entity.
|
|
375
|
+
*
|
|
376
|
+
* Implements the logic from the `Hexademical character reference start
|
|
377
|
+
* state` and `Numeric character reference end state` in the HTML spec.
|
|
378
|
+
* @param lastCp The last code point of the entity. Used to see if the
|
|
379
|
+
* entity was terminated with a semicolon.
|
|
380
|
+
* @param expectedLength The minimum number of characters that should be
|
|
381
|
+
* consumed. Used to validate that at least one digit
|
|
382
|
+
* was consumed.
|
|
383
|
+
* @returns The number of characters that were consumed.
|
|
384
|
+
*/
|
|
385
|
+
emitNumericEntity(e, n) {
|
|
386
|
+
var r;
|
|
387
|
+
if (this.consumed <= n)
|
|
388
|
+
return (r = this.errors) == null || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
389
|
+
if (e === w.SEMI)
|
|
390
|
+
this.consumed += 1;
|
|
391
|
+
else if (this.decodeMode === R.Strict)
|
|
392
|
+
return 0;
|
|
393
|
+
return this.emitCodePoint(Se(this.result), this.consumed), this.errors && (e !== w.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Parses a named entity.
|
|
397
|
+
*
|
|
398
|
+
* Equivalent to the `Named character reference state` in the HTML spec.
|
|
399
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
400
|
+
* @param offset The current offset.
|
|
401
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
402
|
+
*/
|
|
403
|
+
stateNamedEntity(e, n) {
|
|
404
|
+
const { decodeTree: r } = this;
|
|
405
|
+
let t = r[this.treeIndex], i = (t & Q.VALUE_LENGTH) >> 14;
|
|
406
|
+
for (; n < e.length; ) {
|
|
407
|
+
if (i === 0 && t & Q.FLAG13) {
|
|
408
|
+
const s = (t & Q.BRANCH_LENGTH) >> 7;
|
|
409
|
+
if (this.runConsumed === 0) {
|
|
410
|
+
const c = t & Q.JUMP_TABLE;
|
|
411
|
+
if (e.charCodeAt(n) !== c)
|
|
412
|
+
return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
|
|
413
|
+
n++, this.excess++, this.runConsumed++;
|
|
414
|
+
}
|
|
415
|
+
for (; this.runConsumed < s; ) {
|
|
416
|
+
if (n >= e.length)
|
|
417
|
+
return -1;
|
|
418
|
+
const c = this.runConsumed - 1, l = r[this.treeIndex + 1 + (c >> 1)], h = c % 2 === 0 ? l & 255 : l >> 8 & 255;
|
|
419
|
+
if (e.charCodeAt(n) !== h)
|
|
420
|
+
return this.runConsumed = 0, this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
|
|
421
|
+
n++, this.excess++, this.runConsumed++;
|
|
422
|
+
}
|
|
423
|
+
this.runConsumed = 0, this.treeIndex += 1 + (s >> 1), t = r[this.treeIndex], i = (t & Q.VALUE_LENGTH) >> 14;
|
|
424
|
+
}
|
|
425
|
+
if (n >= e.length)
|
|
426
|
+
break;
|
|
427
|
+
const o = e.charCodeAt(n);
|
|
428
|
+
if (o === w.SEMI && i !== 0 && t & Q.FLAG13)
|
|
429
|
+
return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
|
|
430
|
+
if (this.treeIndex = ze(r, t, this.treeIndex + Math.max(1, i), o), this.treeIndex < 0)
|
|
431
|
+
return this.result === 0 || // If we are parsing an attribute
|
|
432
|
+
this.decodeMode === R.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
433
|
+
(i === 0 || // And there should be no invalid characters.
|
|
434
|
+
Ue(o)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
435
|
+
if (t = r[this.treeIndex], i = (t & Q.VALUE_LENGTH) >> 14, i !== 0) {
|
|
436
|
+
if (o === w.SEMI)
|
|
437
|
+
return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
|
|
438
|
+
this.decodeMode !== R.Strict && !(t & Q.FLAG13) && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
439
|
+
}
|
|
440
|
+
n++, this.excess++;
|
|
441
|
+
}
|
|
442
|
+
return -1;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Emit a named entity that was not terminated with a semicolon.
|
|
446
|
+
* @returns The number of characters consumed.
|
|
447
|
+
*/
|
|
448
|
+
emitNotTerminatedNamedEntity() {
|
|
449
|
+
var t;
|
|
450
|
+
const { result: e, decodeTree: n } = this, r = (n[e] & Q.VALUE_LENGTH) >> 14;
|
|
451
|
+
return this.emitNamedEntityData(e, r, this.consumed), (t = this.errors) == null || t.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Emit a named entity.
|
|
455
|
+
* @param result The index of the entity in the decode tree.
|
|
456
|
+
* @param valueLength The number of bytes in the entity.
|
|
457
|
+
* @param consumed The number of characters consumed.
|
|
458
|
+
* @returns The number of characters consumed.
|
|
459
|
+
*/
|
|
460
|
+
emitNamedEntityData(e, n, r) {
|
|
461
|
+
const { decodeTree: t } = this;
|
|
462
|
+
return this.emitCodePoint(n === 1 ? t[e] & ~(Q.VALUE_LENGTH | Q.FLAG13) : t[e + 1], r), n === 3 && this.emitCodePoint(t[e + 2], r), r;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Signal to the parser that the end of the input was reached.
|
|
466
|
+
*
|
|
467
|
+
* Remaining data will be emitted and relevant errors will be produced.
|
|
468
|
+
* @returns The number of characters consumed.
|
|
469
|
+
*/
|
|
470
|
+
end() {
|
|
471
|
+
var e;
|
|
472
|
+
switch (this.state) {
|
|
473
|
+
case y.NamedEntity:
|
|
474
|
+
return this.result !== 0 && (this.decodeMode !== R.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
475
|
+
case y.NumericDecimal:
|
|
476
|
+
return this.emitNumericEntity(0, 2);
|
|
477
|
+
case y.NumericHex:
|
|
478
|
+
return this.emitNumericEntity(0, 3);
|
|
479
|
+
case y.NumericStart:
|
|
480
|
+
return (e = this.errors) == null || e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
481
|
+
case y.EntityStart:
|
|
482
|
+
return 0;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function Xe(A) {
|
|
487
|
+
let e = "";
|
|
488
|
+
const n = new Oe(A, (r) => e += String.fromCodePoint(r));
|
|
489
|
+
return function(t, i) {
|
|
490
|
+
let o = 0, s = 0;
|
|
491
|
+
for (; (s = t.indexOf("&", s)) >= 0; ) {
|
|
492
|
+
e += t.slice(o, s), n.startEntity(i);
|
|
493
|
+
const l = n.write(
|
|
494
|
+
t,
|
|
495
|
+
// Skip the "&"
|
|
496
|
+
s + 1
|
|
497
|
+
);
|
|
498
|
+
if (l < 0) {
|
|
499
|
+
o = s + n.end();
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
o = s + l, s = l === 0 ? o + 1 : o;
|
|
503
|
+
}
|
|
504
|
+
const c = e + t.slice(o);
|
|
505
|
+
return e = "", c;
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
function ze(A, e, n, r) {
|
|
509
|
+
const t = (e & Q.BRANCH_LENGTH) >> 7, i = e & Q.JUMP_TABLE;
|
|
510
|
+
if (t === 0)
|
|
511
|
+
return i !== 0 && r === i ? n : -1;
|
|
512
|
+
if (i) {
|
|
513
|
+
const l = r - i;
|
|
514
|
+
return l < 0 || l >= t ? -1 : A[n + l] - 1;
|
|
515
|
+
}
|
|
516
|
+
const o = t + 1 >> 1;
|
|
517
|
+
let s = 0, c = t - 1;
|
|
518
|
+
for (; s <= c; ) {
|
|
519
|
+
const l = s + c >>> 1, h = l >> 1, f = A[n + h] >> (l & 1) * 8 & 255;
|
|
520
|
+
if (f < r)
|
|
521
|
+
s = l + 1;
|
|
522
|
+
else if (f > r)
|
|
523
|
+
c = l - 1;
|
|
524
|
+
else
|
|
525
|
+
return A[n + o + l];
|
|
526
|
+
}
|
|
527
|
+
return -1;
|
|
528
|
+
}
|
|
529
|
+
const Le = /* @__PURE__ */ Xe(Me);
|
|
530
|
+
function VA(A) {
|
|
531
|
+
return Le(A, R.Strict);
|
|
532
|
+
}
|
|
533
|
+
var je = class {
|
|
534
|
+
constructor(A = {}) {
|
|
535
|
+
E(this, "src_Any", XA.source);
|
|
536
|
+
E(this, "src_Cc", zA.source);
|
|
537
|
+
E(this, "src_Z", jA.source);
|
|
538
|
+
E(this, "src_P", mA.source);
|
|
539
|
+
E(this, "src_ZPCc", [
|
|
540
|
+
this.src_Z,
|
|
541
|
+
this.src_P,
|
|
542
|
+
this.src_Cc
|
|
543
|
+
].join("|"));
|
|
544
|
+
E(this, "src_ZCc", [this.src_Z, this.src_Cc].join("|"));
|
|
545
|
+
E(this, "cache", {});
|
|
546
|
+
E(this, "opts", {
|
|
547
|
+
maxLength: 1e4,
|
|
548
|
+
urlAuth: !1,
|
|
549
|
+
schema_names: []
|
|
550
|
+
});
|
|
551
|
+
this.opts = {
|
|
552
|
+
...this.opts,
|
|
553
|
+
...A
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
set(A = {}) {
|
|
557
|
+
return this.opts = {
|
|
558
|
+
...this.opts,
|
|
559
|
+
...A
|
|
560
|
+
}, this.cache = {}, this;
|
|
561
|
+
}
|
|
562
|
+
escapeRE(A) {
|
|
563
|
+
return A.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
|
564
|
+
}
|
|
565
|
+
nestedPairRE(A, e, n = 4) {
|
|
566
|
+
const r = this.escapeRE(A), t = this.escapeRE(e), i = `(?:(?!${this.src_ZCc}|${r}|${t}).)`;
|
|
567
|
+
let o = `${r}${i}{0,1000}${t}`;
|
|
568
|
+
for (let s = 2; s <= n; s++) o = `${r}(?:${i}|${o}){0,1000}${t}`;
|
|
569
|
+
return o;
|
|
570
|
+
}
|
|
571
|
+
get_text_separators() {
|
|
572
|
+
var A;
|
|
573
|
+
return (A = this.cache).text_separators ?? (A.text_separators = /[><\uff5c]/);
|
|
574
|
+
}
|
|
575
|
+
get_pseudo_letter() {
|
|
576
|
+
var A;
|
|
577
|
+
return (A = this.cache).src_pseudo_letter ?? (A.src_pseudo_letter = new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`));
|
|
578
|
+
}
|
|
579
|
+
get_ipv4_addr() {
|
|
580
|
+
var A;
|
|
581
|
+
return (A = this.cache).src_ip4 ?? (A.src_ip4 = /* @__PURE__ */ new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])"));
|
|
582
|
+
}
|
|
583
|
+
get_ipv6_addr() {
|
|
584
|
+
var n;
|
|
585
|
+
const A = "[0-9A-Fa-f]{1,4}", e = `(?:(?:${A}:${A})|${this.get_ipv4_addr().source})`;
|
|
586
|
+
return (n = this.cache).src_ip6_addr ?? (n.src_ip6_addr = new RegExp(`(?:(?:${A}:){6}${e}|::(?:${A}:){5}${e}|(?:${A})?::(?:${A}:){4}${e}|(?:(?:${A}:){0,1}${A})?::(?:${A}:){3}${e}|(?:(?:${A}:){0,2}${A})?::(?:${A}:){2}${e}|(?:(?:${A}:){0,3}${A})?::${A}:${e}|(?:(?:${A}:){0,4}${A})?::${e}|(?:(?:${A}:){0,5}${A})?::${A}|(?:(?:${A}:){0,6}${A})?::)`));
|
|
587
|
+
}
|
|
588
|
+
get_ipv6_url_host() {
|
|
589
|
+
var A;
|
|
590
|
+
return (A = this.cache).src_ip6_host ?? (A.src_ip6_host = new RegExp(`\\[${this.get_ipv6_addr().source}\\]`));
|
|
591
|
+
}
|
|
592
|
+
get_ipv6_mail_host() {
|
|
593
|
+
var A;
|
|
594
|
+
return (A = this.cache).src_ipv6_mail_host ?? (A.src_ipv6_mail_host = new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`));
|
|
595
|
+
}
|
|
596
|
+
get_auth() {
|
|
597
|
+
var A;
|
|
598
|
+
return (A = this.cache).src_auth ?? (A.src_auth = new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`));
|
|
599
|
+
}
|
|
600
|
+
get_port() {
|
|
601
|
+
var A;
|
|
602
|
+
return (A = this.cache).src_port ?? (A.src_port = /* @__PURE__ */ new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"));
|
|
603
|
+
}
|
|
604
|
+
get_host_terminator() {
|
|
605
|
+
var A;
|
|
606
|
+
return (A = this.cache).src_host_terminator ?? (A.src_host_terminator = new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"] ? "-(?!--)|" : "-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`));
|
|
607
|
+
}
|
|
608
|
+
get_path_terminator() {
|
|
609
|
+
var A;
|
|
610
|
+
return (A = this.cache).src_path_terminator ?? (A.src_path_terminator = new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`));
|
|
611
|
+
}
|
|
612
|
+
get_path() {
|
|
613
|
+
var A;
|
|
614
|
+
return (A = this.cache).src_path ?? (A.src_path = new RegExp(`(?:[/?#](?:${this.nestedPairRE("[", "]")}|${this.nestedPairRE("(", ")")}|${this.nestedPairRE("{", "}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|` + (this.opts["---"] ? "\\-(?!--(?:[^-]|$))(?:-{0,19})|" : "\\-{1,20}|") + `,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|` + this.get_path_extra().source + `[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`));
|
|
615
|
+
}
|
|
616
|
+
get_mail_name() {
|
|
617
|
+
var A;
|
|
618
|
+
return (A = this.cache).src_mail_name ?? (A.src_mail_name = /* @__PURE__ */ new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}"));
|
|
619
|
+
}
|
|
620
|
+
get_xn() {
|
|
621
|
+
var A;
|
|
622
|
+
return (A = this.cache).src_xn ?? (A.src_xn = /* @__PURE__ */ new RegExp("xn--[a-z0-9\\-]{1,59}"));
|
|
623
|
+
}
|
|
624
|
+
get_tld() {
|
|
625
|
+
if (this.cache.tld) return this.cache.tld;
|
|
626
|
+
const A = [...new Set(this.opts.tlds || [])].sort().reverse().join("|");
|
|
627
|
+
return this.cache.tld = new RegExp(`${A || "$#none#$"}|${this.get_xn().source}`), this.cache.tld;
|
|
628
|
+
}
|
|
629
|
+
get_domain_root() {
|
|
630
|
+
var A;
|
|
631
|
+
return (A = this.cache).src_domain_root ?? (A.src_domain_root = new RegExp("(?:" + this.get_xn().source + `|${this.get_pseudo_letter().source}{1,63})`));
|
|
632
|
+
}
|
|
633
|
+
get_domain() {
|
|
634
|
+
var A;
|
|
635
|
+
return (A = this.cache).src_domain ?? (A.src_domain = new RegExp("(?:" + this.get_xn().source + `|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`));
|
|
636
|
+
}
|
|
637
|
+
get_url_host_port() {
|
|
638
|
+
var A;
|
|
639
|
+
return (A = this.cache).url_host_port ?? (A.url_host_port = new RegExp("(?:" + this.get_ipv6_url_host().source + `|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))` + this.get_port().source + this.get_host_terminator().source));
|
|
640
|
+
}
|
|
641
|
+
get_fuzzy_url_host_port() {
|
|
642
|
+
var A;
|
|
643
|
+
return (A = this.cache).fuzzy_url_host_port ?? (A.fuzzy_url_host_port = new RegExp("(?:" + (this.opts.fuzzyIP ? this.get_ipv4_addr().source + "|" : "") + `(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))` + this.get_host_terminator().source));
|
|
644
|
+
}
|
|
645
|
+
get_mail_host() {
|
|
646
|
+
var A;
|
|
647
|
+
return (A = this.cache).src_mail_host ?? (A.src_mail_host = new RegExp("(?:" + this.get_ipv6_mail_host().source + `|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))` + this.get_host_terminator().source));
|
|
648
|
+
}
|
|
649
|
+
get_fuzzy_mail_host() {
|
|
650
|
+
var A;
|
|
651
|
+
return (A = this.cache).src_fuzzy_mail_host ?? (A.src_fuzzy_mail_host = new RegExp("(?:" + this.get_ipv6_mail_host().source + `|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))` + this.get_host_terminator().source));
|
|
652
|
+
}
|
|
653
|
+
get_path_extra() {
|
|
654
|
+
var A;
|
|
655
|
+
return (A = this.cache).src_path_extra ?? (A.src_path_extra = /* @__PURE__ */ new RegExp(""));
|
|
656
|
+
}
|
|
657
|
+
get_fuzzy_mail_host_search() {
|
|
658
|
+
var A;
|
|
659
|
+
return (A = this.cache).mail_fuzzy_host_search ?? (A.mail_fuzzy_host_search = new RegExp(`@${this.get_fuzzy_mail_host().source}`, "ig"));
|
|
660
|
+
}
|
|
661
|
+
get_fuzzy_link_search() {
|
|
662
|
+
var A;
|
|
663
|
+
return (A = this.cache).link_fuzzy_search ?? (A.link_fuzzy_search = new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`, "ig"));
|
|
664
|
+
}
|
|
665
|
+
get_http_validator() {
|
|
666
|
+
var A;
|
|
667
|
+
return (A = this.cache).http_validator ?? (A.http_validator = new RegExp("\\/\\/" + (this.opts.urlAuth ? this.get_auth().source : "") + this.get_url_host_port().source + this.get_path().source, "iy"));
|
|
668
|
+
}
|
|
669
|
+
get_relative_proto_validator() {
|
|
670
|
+
var A;
|
|
671
|
+
return (A = this.cache).relative_proto_validator ?? (A.relative_proto_validator = new RegExp((this.opts.urlAuth ? this.get_auth().source : "") + `(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})` + this.get_port().source + this.get_host_terminator().source + this.get_path().source, "iy"));
|
|
672
|
+
}
|
|
673
|
+
get_mail_name_validator() {
|
|
674
|
+
var A;
|
|
675
|
+
return (A = this.cache).mail_name_validator ?? (A.mail_name_validator = new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`));
|
|
676
|
+
}
|
|
677
|
+
get_mailto_validator() {
|
|
678
|
+
var A;
|
|
679
|
+
return (A = this.cache).mailto_validator ?? (A.mailto_validator = new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`, "iy"));
|
|
680
|
+
}
|
|
681
|
+
get_schema_names() {
|
|
682
|
+
var A;
|
|
683
|
+
return (A = this.cache).schema_names ?? (A.schema_names = new RegExp((this.opts.schema_names || []).map((e) => this.escapeRE(e)).join("|")));
|
|
684
|
+
}
|
|
685
|
+
get_schema_search() {
|
|
686
|
+
var A;
|
|
687
|
+
return (A = this.cache).schema_search ?? (A.schema_search = new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`, "ig"));
|
|
688
|
+
}
|
|
689
|
+
get_schema_at_start() {
|
|
690
|
+
var A;
|
|
691
|
+
return (A = this.cache).schema_at_start ?? (A.schema_at_start = new RegExp(`^${this.get_schema_search().source}`, "i"));
|
|
692
|
+
}
|
|
693
|
+
}, cA = {
|
|
694
|
+
validate: (A, e, n) => {
|
|
695
|
+
const r = n.re.get_http_validator();
|
|
696
|
+
r.lastIndex = e;
|
|
697
|
+
const t = r.exec(A);
|
|
698
|
+
return t ? t[0].length : 0;
|
|
699
|
+
},
|
|
700
|
+
normalize: (A, e) => e.normalize(A)
|
|
701
|
+
}, Ve = {
|
|
702
|
+
"http:": cA,
|
|
703
|
+
"https:": cA,
|
|
704
|
+
"ftp:": cA,
|
|
705
|
+
"//": {
|
|
706
|
+
validate: function(A, e, n) {
|
|
707
|
+
const r = n.re.get_relative_proto_validator();
|
|
708
|
+
r.lastIndex = e;
|
|
709
|
+
const t = r.exec(A);
|
|
710
|
+
return t ? e >= 3 && A[e - 3] === ":" || e >= 3 && A[e - 3] === "/" ? 0 : t[0].length : 0;
|
|
711
|
+
},
|
|
712
|
+
normalize: (A, e) => e.normalize(A)
|
|
713
|
+
},
|
|
714
|
+
"mailto:": {
|
|
715
|
+
validate: function(A, e, n) {
|
|
716
|
+
const r = n.re.get_mailto_validator();
|
|
717
|
+
r.lastIndex = e;
|
|
718
|
+
const t = r.exec(A);
|
|
719
|
+
return t ? t[0].length : 0;
|
|
720
|
+
},
|
|
721
|
+
normalize: (A, e) => e.normalize(A)
|
|
722
|
+
}
|
|
723
|
+
}, Pe = "a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw", Te = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";
|
|
724
|
+
function qe() {
|
|
725
|
+
const A = Te.split("|");
|
|
726
|
+
return Pe.split("|").forEach((e) => {
|
|
727
|
+
const n = e.indexOf(":"), r = e.slice(0, n);
|
|
728
|
+
for (const t of e.slice(n + 1)) A.push(r + t);
|
|
729
|
+
}), A;
|
|
730
|
+
}
|
|
731
|
+
var $e = {
|
|
732
|
+
fuzzyLink: !1,
|
|
733
|
+
fuzzyEmail: !0,
|
|
734
|
+
fuzzyIP: !1,
|
|
735
|
+
"---": !1,
|
|
736
|
+
tlds: qe(),
|
|
737
|
+
urlAuth: !1,
|
|
738
|
+
maxLength: 1e4
|
|
739
|
+
}, KA = class {
|
|
740
|
+
constructor(A, e, n, r) {
|
|
741
|
+
/** Prefix (protocol) for matched string. Empty for fuzzy links. */
|
|
742
|
+
E(this, "schema");
|
|
743
|
+
/** First position of matched string. */
|
|
744
|
+
E(this, "index");
|
|
745
|
+
/** Next position after matched string. */
|
|
746
|
+
E(this, "lastIndex");
|
|
747
|
+
/** Matched string. */
|
|
748
|
+
E(this, "raw");
|
|
749
|
+
/** Normalized text of matched string. */
|
|
750
|
+
E(this, "text");
|
|
751
|
+
/** Normalized URL of matched string. */
|
|
752
|
+
E(this, "url");
|
|
753
|
+
const t = A.slice(n, r);
|
|
754
|
+
this.schema = e.toLowerCase(), this.index = n, this.lastIndex = r, this.raw = t, this.text = t, this.url = t;
|
|
755
|
+
}
|
|
756
|
+
}, An = class {
|
|
757
|
+
/**
|
|
758
|
+
* Creates new linkifier instance.
|
|
759
|
+
*
|
|
760
|
+
* By default understands:
|
|
761
|
+
*
|
|
762
|
+
* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
|
|
763
|
+
* - "fuzzy" emails (foo@bar.com).
|
|
764
|
+
*
|
|
765
|
+
* See {@link LinkifyConstructorOptions} for available options.
|
|
766
|
+
*
|
|
767
|
+
* @param options Recognition options.
|
|
768
|
+
*
|
|
769
|
+
* @example
|
|
770
|
+
* ```javascript
|
|
771
|
+
* import { LinkifyIt } from 'linkify-it'
|
|
772
|
+
*
|
|
773
|
+
* const linkify = new LinkifyIt({ fuzzyLink: true })
|
|
774
|
+
*
|
|
775
|
+
* linkify
|
|
776
|
+
* .tlds(require('tlds')) // Reload with full TLD list
|
|
777
|
+
* .tlds('onion', true) // Add unofficial `.onion` domain
|
|
778
|
+
* .add('ftp:', null) // Disable `ftp:` protocol
|
|
779
|
+
* .set({ fuzzyIP: true }) // Enable IPs in fuzzy links
|
|
780
|
+
*
|
|
781
|
+
* console.log(linkify.test('Site github.com!')) // true
|
|
782
|
+
* console.log(linkify.match('Site github.com!'))
|
|
783
|
+
* ```
|
|
784
|
+
*/
|
|
785
|
+
constructor(A = {}) {
|
|
786
|
+
E(this, "__opts__");
|
|
787
|
+
E(this, "__schemas__");
|
|
788
|
+
E(this, "re");
|
|
789
|
+
const { rebuilder: e, ...n } = A;
|
|
790
|
+
this.__opts__ = {
|
|
791
|
+
...$e,
|
|
792
|
+
...n
|
|
793
|
+
}, this.__schemas__ = { ...Ve }, this.re = e || new je(), this.re.set({
|
|
794
|
+
...this.__opts__,
|
|
795
|
+
schema_names: Object.keys(this.__schemas__)
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Add new rule definition.
|
|
800
|
+
*
|
|
801
|
+
* `schema` is a link prefix (usually, protocol name with `:` at the end,
|
|
802
|
+
* `skype:` for example). `linkify-it` makes sure that prefix is not
|
|
803
|
+
* preceded with alphanumeric char and symbols. Only whitespaces and
|
|
804
|
+
* punctuation allowed.
|
|
805
|
+
*
|
|
806
|
+
* `definition` is a rule to check tail after link prefix. To disable an
|
|
807
|
+
* existing rule, pass `null`.
|
|
808
|
+
*
|
|
809
|
+
* @param schema Rule name (fixed pattern prefix).
|
|
810
|
+
* @param definition Schema definition, or `null` to disable the rule.
|
|
811
|
+
*
|
|
812
|
+
* See [twitter mentions example](https://github.com/markdown-it/linkify-it/blob/master/examples/twitter.mjs).
|
|
813
|
+
*/
|
|
814
|
+
add(A, e = null) {
|
|
815
|
+
if (!e) delete this.__schemas__[A];
|
|
816
|
+
else {
|
|
817
|
+
const n = {
|
|
818
|
+
normalize: (r, t) => t.normalize(r),
|
|
819
|
+
...e
|
|
820
|
+
};
|
|
821
|
+
this.__schemas__[A] = n;
|
|
822
|
+
}
|
|
823
|
+
return this.re.set({
|
|
824
|
+
...this.__opts__,
|
|
825
|
+
schema_names: Object.keys(this.__schemas__)
|
|
826
|
+
}), this;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Set recognition options for links without schema.
|
|
830
|
+
*
|
|
831
|
+
* @param options Recognition options.
|
|
832
|
+
*/
|
|
833
|
+
set(A = {}) {
|
|
834
|
+
return this.__opts__ = {
|
|
835
|
+
...this.__opts__,
|
|
836
|
+
...A
|
|
837
|
+
}, this.re.set({
|
|
838
|
+
...this.__opts__,
|
|
839
|
+
schema_names: Object.keys(this.__schemas__)
|
|
840
|
+
}), this;
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
|
|
844
|
+
*
|
|
845
|
+
* @param text Text to scan.
|
|
846
|
+
*/
|
|
847
|
+
test(A) {
|
|
848
|
+
if (!A.length) return !1;
|
|
849
|
+
let e, n;
|
|
850
|
+
for (n = this.re.get_schema_search(), n.lastIndex = 0; (e = n.exec(A)) !== null; ) if (this.testSchemaAt(A, e[2], n.lastIndex)) return !0;
|
|
851
|
+
if (this.__opts__.fuzzyLink && this.__schemas__["http:"] && (n = this.re.get_fuzzy_link_search(), n.lastIndex = 0, n.exec(A) !== null))
|
|
852
|
+
return !0;
|
|
853
|
+
if (this.__opts__.fuzzyEmail && this.__schemas__["mailto:"] && A.indexOf("@") >= 0) {
|
|
854
|
+
const r = this.re.get_fuzzy_mail_host_search(), t = this.re.get_mail_name_validator();
|
|
855
|
+
for (r.lastIndex = 0; (e = r.exec(A)) !== null; ) {
|
|
856
|
+
const i = A.slice(Math.max(0, e.index - 65), e.index);
|
|
857
|
+
if (t.test(i)) return !0;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
return !1;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Similar to {@link LinkifyIt.test} but checks only specific protocol tail exactly
|
|
864
|
+
* at given position. Returns length of found pattern (0 on fail).
|
|
865
|
+
*
|
|
866
|
+
* @param text Text to scan.
|
|
867
|
+
* @param schema Rule (schema) name.
|
|
868
|
+
* @param pos Text offset to check from.
|
|
869
|
+
*/
|
|
870
|
+
testSchemaAt(A, e, n) {
|
|
871
|
+
return this.__schemas__[e.toLowerCase()] ? this.__schemas__[e.toLowerCase()].validate(A.slice(0, n + this.__opts__.maxLength), n, this) : 0;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Returns array of found link descriptions or `null` on fail. We strongly
|
|
875
|
+
* recommend to use {@link LinkifyIt.test} first, for best speed.
|
|
876
|
+
*
|
|
877
|
+
* @param text Text to scan.
|
|
878
|
+
*/
|
|
879
|
+
match(A) {
|
|
880
|
+
const e = [], n = this.re.get_schema_search();
|
|
881
|
+
let r, t, i, o, s, c, l = !1, h = !1, a = !1, f = 0;
|
|
882
|
+
if (!A.length) return null;
|
|
883
|
+
for (n.lastIndex = 0, this.__opts__.fuzzyLink && this.__schemas__["http:"] && (r = this.re.get_fuzzy_link_search(), r.lastIndex = 0), this.__opts__.fuzzyEmail && this.__schemas__["mailto:"] && (t = this.re.get_fuzzy_mail_host_search(), t.lastIndex = 0, i = this.re.get_mail_name_validator()); ; ) {
|
|
884
|
+
const g = Math.max(f - 1, 0);
|
|
885
|
+
if (t && i && !a && (!s || s.index < f))
|
|
886
|
+
for (t.lastIndex < g && (t.lastIndex = g); ; ) {
|
|
887
|
+
const D = t.exec(A);
|
|
888
|
+
if (!D) {
|
|
889
|
+
a = !0, s = void 0;
|
|
890
|
+
break;
|
|
891
|
+
}
|
|
892
|
+
const F = i.exec(A.slice(Math.max(0, D.index - 65), D.index));
|
|
893
|
+
if (F) {
|
|
894
|
+
if (s = {
|
|
895
|
+
schema: "mailto:",
|
|
896
|
+
index: D.index - F[1].length,
|
|
897
|
+
lastIndex: D.index + D[0].length
|
|
898
|
+
}, s.index >= f) break;
|
|
899
|
+
t.lastIndex < g && (t.lastIndex = g);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
if (r && !h && (!o || o.index < f))
|
|
903
|
+
for (r.lastIndex < g && (r.lastIndex = g); ; ) {
|
|
904
|
+
const D = r.exec(A);
|
|
905
|
+
if (!D) {
|
|
906
|
+
h = !0, o = void 0;
|
|
907
|
+
break;
|
|
908
|
+
}
|
|
909
|
+
if (o = {
|
|
910
|
+
schema: "",
|
|
911
|
+
index: D.index + D[1].length,
|
|
912
|
+
lastIndex: D.index + D[0].length
|
|
913
|
+
}, o.index >= f) break;
|
|
914
|
+
r.lastIndex < g && (r.lastIndex = g);
|
|
915
|
+
}
|
|
916
|
+
let u = s;
|
|
917
|
+
(!u || o && (o.index < u.index || o.index === u.index && o.lastIndex > u.lastIndex)) && (u = o);
|
|
918
|
+
let I;
|
|
919
|
+
if (!l) for (; ; ) {
|
|
920
|
+
if (!c) {
|
|
921
|
+
n.lastIndex < g && (n.lastIndex = g);
|
|
922
|
+
const d = n.exec(A);
|
|
923
|
+
if (!d) {
|
|
924
|
+
l = !0;
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
c = {
|
|
928
|
+
schema: d[2],
|
|
929
|
+
index: d.index + d[1].length,
|
|
930
|
+
lastIndex: d.index + d[0].length
|
|
931
|
+
};
|
|
932
|
+
}
|
|
933
|
+
if (c.index < f) {
|
|
934
|
+
c = void 0;
|
|
935
|
+
continue;
|
|
936
|
+
}
|
|
937
|
+
if (u && c.index > u.index) break;
|
|
938
|
+
const D = c;
|
|
939
|
+
c = void 0;
|
|
940
|
+
const F = this.testSchemaAt(A, D.schema, D.lastIndex);
|
|
941
|
+
if (F) {
|
|
942
|
+
I = {
|
|
943
|
+
schema: D.schema,
|
|
944
|
+
index: D.index,
|
|
945
|
+
lastIndex: D.lastIndex + F
|
|
946
|
+
};
|
|
947
|
+
break;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
let p = I;
|
|
951
|
+
if ((!p || s && (s.index < p.index || s.index === p.index && s.lastIndex > p.lastIndex)) && (p = s), (!p || o && (o.index < p.index || o.index === p.index && o.lastIndex > p.lastIndex)) && (p = o), !p) break;
|
|
952
|
+
p === s ? s = void 0 : p === o && (o = void 0);
|
|
953
|
+
const B = new KA(A, p.schema, p.index, p.lastIndex);
|
|
954
|
+
B.schema ? this.__schemas__[B.schema].normalize(B, this) : this.normalize(B), e.push(B), f = p.lastIndex;
|
|
955
|
+
}
|
|
956
|
+
return e.length ? e : null;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Returns fully-formed (not fuzzy) link if it starts at the beginning
|
|
960
|
+
* of the string, and null otherwise.
|
|
961
|
+
*
|
|
962
|
+
* @param text Text to scan.
|
|
963
|
+
*/
|
|
964
|
+
matchAtStart(A) {
|
|
965
|
+
if (!A.length) return null;
|
|
966
|
+
const e = this.re.get_schema_at_start().exec(A);
|
|
967
|
+
if (!e) return null;
|
|
968
|
+
const n = this.testSchemaAt(A, e[2], e[0].length);
|
|
969
|
+
if (!n) return null;
|
|
970
|
+
const r = new KA(A, e[2], e.index + e[1].length, e.index + e[0].length + n);
|
|
971
|
+
return this.__schemas__[r.schema].normalize(r, this), r;
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Load (or merge) new TLDs list. Those are used for fuzzy links (without
|
|
975
|
+
* prefix) to avoid false positives. By default this algorithm is used:
|
|
976
|
+
*
|
|
977
|
+
* - hostname with any 2-letter root zones are ok.
|
|
978
|
+
* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
|
|
979
|
+
* are ok.
|
|
980
|
+
* - encoded (`xn--...`) root zones are ok.
|
|
981
|
+
*
|
|
982
|
+
* If list is replaced, then exact match for 2-chars root zones will be checked.
|
|
983
|
+
*
|
|
984
|
+
* @param list List of TLDs.
|
|
985
|
+
* @param keepOld Merge with current list if `true` (`false` by default).
|
|
986
|
+
*/
|
|
987
|
+
tlds(A, e = !1) {
|
|
988
|
+
return A = Array.isArray(A) ? A : [A], e ? this.__opts__.tlds = this.__opts__.tlds.concat(A) : this.__opts__.tlds = A, this.re.set({
|
|
989
|
+
...this.__opts__,
|
|
990
|
+
schema_names: Object.keys(this.__schemas__)
|
|
991
|
+
}), this;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* Default normalizer (if schema does not define its own).
|
|
995
|
+
*
|
|
996
|
+
* @param match Match to normalize.
|
|
997
|
+
*/
|
|
998
|
+
normalize(A) {
|
|
999
|
+
A.schema || (A.url = `http://${A.url}`), A.schema === "mailto:" && !/^mailto:/i.test(A.url) && (A.url = `mailto:${A.url}`);
|
|
1000
|
+
}
|
|
1001
|
+
};
|
|
1002
|
+
const N = 2147483647, K = 36, DA = 1, z = 26, en = 38, nn = 700, PA = 72, TA = 128, qA = "-", tn = /^xn--/, rn = /[^\0-\x7F]/, on = /[\x2E\u3002\uFF0E\uFF61]/g, sn = {
|
|
1003
|
+
overflow: "Overflow: input needs wider integers to process",
|
|
1004
|
+
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
1005
|
+
"invalid-input": "Invalid input"
|
|
1006
|
+
}, lA = K - DA, G = Math.floor, uA = String.fromCharCode;
|
|
1007
|
+
function J(A) {
|
|
1008
|
+
throw new RangeError(sn[A]);
|
|
1009
|
+
}
|
|
1010
|
+
function cn(A, e) {
|
|
1011
|
+
const n = [];
|
|
1012
|
+
let r = A.length;
|
|
1013
|
+
for (; r--; )
|
|
1014
|
+
n[r] = e(A[r]);
|
|
1015
|
+
return n;
|
|
1016
|
+
}
|
|
1017
|
+
function $A(A, e) {
|
|
1018
|
+
const n = A.split("@");
|
|
1019
|
+
let r = "";
|
|
1020
|
+
n.length > 1 && (r = n[0] + "@", A = n[1]), A = A.replace(on, ".");
|
|
1021
|
+
const t = A.split("."), i = cn(t, e).join(".");
|
|
1022
|
+
return r + i;
|
|
1023
|
+
}
|
|
1024
|
+
function Ae(A) {
|
|
1025
|
+
const e = [];
|
|
1026
|
+
let n = 0;
|
|
1027
|
+
const r = A.length;
|
|
1028
|
+
for (; n < r; ) {
|
|
1029
|
+
const t = A.charCodeAt(n++);
|
|
1030
|
+
if (t >= 55296 && t <= 56319 && n < r) {
|
|
1031
|
+
const i = A.charCodeAt(n++);
|
|
1032
|
+
(i & 64512) == 56320 ? e.push(((t & 1023) << 10) + (i & 1023) + 65536) : (e.push(t), n--);
|
|
1033
|
+
} else
|
|
1034
|
+
e.push(t);
|
|
1035
|
+
}
|
|
1036
|
+
return e;
|
|
1037
|
+
}
|
|
1038
|
+
const ln = (A) => String.fromCodePoint(...A), un = function(A) {
|
|
1039
|
+
return A >= 48 && A < 58 ? 26 + (A - 48) : A >= 65 && A < 91 ? A - 65 : A >= 97 && A < 123 ? A - 97 : K;
|
|
1040
|
+
}, GA = function(A, e) {
|
|
1041
|
+
return A + 22 + 75 * (A < 26) - ((e != 0) << 5);
|
|
1042
|
+
}, ee = function(A, e, n) {
|
|
1043
|
+
let r = 0;
|
|
1044
|
+
for (A = n ? G(A / nn) : A >> 1, A += G(A / e); A > lA * z >> 1; r += K)
|
|
1045
|
+
A = G(A / lA);
|
|
1046
|
+
return G(r + (lA + 1) * A / (A + en));
|
|
1047
|
+
}, ne = function(A) {
|
|
1048
|
+
const e = [], n = A.length;
|
|
1049
|
+
let r = 0, t = TA, i = PA, o = A.lastIndexOf(qA);
|
|
1050
|
+
o < 0 && (o = 0);
|
|
1051
|
+
for (let s = 0; s < o; ++s)
|
|
1052
|
+
A.charCodeAt(s) >= 128 && J("not-basic"), e.push(A.charCodeAt(s));
|
|
1053
|
+
for (let s = o > 0 ? o + 1 : 0; s < n; ) {
|
|
1054
|
+
const c = r;
|
|
1055
|
+
for (let h = 1, a = K; ; a += K) {
|
|
1056
|
+
s >= n && J("invalid-input");
|
|
1057
|
+
const f = un(A.charCodeAt(s++));
|
|
1058
|
+
f >= K && J("invalid-input"), f > G((N - r) / h) && J("overflow"), r += f * h;
|
|
1059
|
+
const g = a <= i ? DA : a >= i + z ? z : a - i;
|
|
1060
|
+
if (f < g)
|
|
1061
|
+
break;
|
|
1062
|
+
const u = K - g;
|
|
1063
|
+
h > G(N / u) && J("overflow"), h *= u;
|
|
1064
|
+
}
|
|
1065
|
+
const l = e.length + 1;
|
|
1066
|
+
i = ee(r - c, l, c == 0), G(r / l) > N - t && J("overflow"), t += G(r / l), r %= l, e.splice(r++, 0, t);
|
|
1067
|
+
}
|
|
1068
|
+
return String.fromCodePoint(...e);
|
|
1069
|
+
}, te = function(A) {
|
|
1070
|
+
const e = [];
|
|
1071
|
+
A = Ae(A);
|
|
1072
|
+
const n = A.length;
|
|
1073
|
+
let r = TA, t = 0, i = PA;
|
|
1074
|
+
for (const c of A)
|
|
1075
|
+
c < 128 && e.push(uA(c));
|
|
1076
|
+
const o = e.length;
|
|
1077
|
+
let s = o;
|
|
1078
|
+
for (o && e.push(qA); s < n; ) {
|
|
1079
|
+
let c = N;
|
|
1080
|
+
for (const h of A)
|
|
1081
|
+
h >= r && h < c && (c = h);
|
|
1082
|
+
const l = s + 1;
|
|
1083
|
+
c - r > G((N - t) / l) && J("overflow"), t += (c - r) * l, r = c;
|
|
1084
|
+
for (const h of A)
|
|
1085
|
+
if (h < r && ++t > N && J("overflow"), h === r) {
|
|
1086
|
+
let a = t;
|
|
1087
|
+
for (let f = K; ; f += K) {
|
|
1088
|
+
const g = f <= i ? DA : f >= i + z ? z : f - i;
|
|
1089
|
+
if (a < g)
|
|
1090
|
+
break;
|
|
1091
|
+
const u = a - g, I = K - g;
|
|
1092
|
+
e.push(
|
|
1093
|
+
uA(GA(g + u % I, 0))
|
|
1094
|
+
), a = G(u / I);
|
|
1095
|
+
}
|
|
1096
|
+
e.push(uA(GA(a, 0))), i = ee(t, l, s === o), t = 0, ++s;
|
|
1097
|
+
}
|
|
1098
|
+
++t, ++r;
|
|
1099
|
+
}
|
|
1100
|
+
return e.join("");
|
|
1101
|
+
}, hn = function(A) {
|
|
1102
|
+
return $A(A, function(e) {
|
|
1103
|
+
return tn.test(e) ? ne(e.slice(4).toLowerCase()) : e;
|
|
1104
|
+
});
|
|
1105
|
+
}, an = function(A) {
|
|
1106
|
+
return $A(A, function(e) {
|
|
1107
|
+
return rn.test(e) ? "xn--" + te(e) : e;
|
|
1108
|
+
});
|
|
1109
|
+
}, WA = {
|
|
1110
|
+
/**
|
|
1111
|
+
* A string representing the current Punycode.js version number.
|
|
1112
|
+
* @memberOf punycode
|
|
1113
|
+
* @type String
|
|
1114
|
+
*/
|
|
1115
|
+
version: "2.3.1",
|
|
1116
|
+
/**
|
|
1117
|
+
* An object of methods to convert from JavaScript's internal character
|
|
1118
|
+
* representation (UCS-2) to Unicode code points, and back.
|
|
1119
|
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
1120
|
+
* @memberOf punycode
|
|
1121
|
+
* @type Object
|
|
1122
|
+
*/
|
|
1123
|
+
ucs2: {
|
|
1124
|
+
decode: Ae,
|
|
1125
|
+
encode: ln
|
|
1126
|
+
},
|
|
1127
|
+
decode: ne,
|
|
1128
|
+
encode: te,
|
|
1129
|
+
toASCII: an,
|
|
1130
|
+
toUnicode: hn
|
|
1131
|
+
};
|
|
1132
|
+
/*! markdown-it 15.0.0 https://github.com/markdown-it/markdown-it @license MIT */
|
|
1133
|
+
var YA = Object.defineProperty, ie = (A, e) => {
|
|
1134
|
+
let n = {};
|
|
1135
|
+
for (var r in A) YA(n, r, {
|
|
1136
|
+
get: A[r],
|
|
1137
|
+
enumerable: !0
|
|
1138
|
+
});
|
|
1139
|
+
return YA(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
1140
|
+
}, gn = /* @__PURE__ */ ie({
|
|
1141
|
+
arrayReplaceAt: () => oe,
|
|
1142
|
+
asciiTrim: () => rA,
|
|
1143
|
+
callable: () => re,
|
|
1144
|
+
escapeHtml: () => S,
|
|
1145
|
+
escapeRE: () => kn,
|
|
1146
|
+
fromCodePoint: () => L,
|
|
1147
|
+
isMdAsciiPunct: () => P,
|
|
1148
|
+
isPunctChar: () => ce,
|
|
1149
|
+
isPunctCharCode: () => V,
|
|
1150
|
+
isSpace: () => b,
|
|
1151
|
+
isValidEntityCode: () => IA,
|
|
1152
|
+
isWhiteSpace: () => j,
|
|
1153
|
+
lib: () => En,
|
|
1154
|
+
normalizeReference: () => iA,
|
|
1155
|
+
unescapeAll: () => O,
|
|
1156
|
+
unescapeMd: () => pn
|
|
1157
|
+
});
|
|
1158
|
+
function re(A) {
|
|
1159
|
+
const e = function(...n) {
|
|
1160
|
+
return Reflect.construct(A, n, new.target && new.target !== e ? new.target : A);
|
|
1161
|
+
};
|
|
1162
|
+
return Object.defineProperty(e, "name", { value: A.name }), Object.setPrototypeOf(e, A), e.prototype = A.prototype, e;
|
|
1163
|
+
}
|
|
1164
|
+
function oe(A, e, n) {
|
|
1165
|
+
return [].concat(A.slice(0, e), n, A.slice(e + 1));
|
|
1166
|
+
}
|
|
1167
|
+
function IA(A) {
|
|
1168
|
+
return !(A >= 55296 && A <= 57343 || A >= 64976 && A <= 65007 || (A & 65535) === 65535 || (A & 65535) === 65534 || A >= 0 && A <= 8 || A === 11 || A >= 14 && A <= 31 || A >= 127 && A <= 159 || A > 1114111);
|
|
1169
|
+
}
|
|
1170
|
+
function L(A) {
|
|
1171
|
+
if (A > 65535) {
|
|
1172
|
+
A -= 65536;
|
|
1173
|
+
const e = 55296 + (A >> 10), n = 56320 + (A & 1023);
|
|
1174
|
+
return String.fromCharCode(e, n);
|
|
1175
|
+
}
|
|
1176
|
+
return String.fromCharCode(A);
|
|
1177
|
+
}
|
|
1178
|
+
var se = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, fn = new RegExp(`${se.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`, "gi"), dn = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
|
|
1179
|
+
function Cn(A, e) {
|
|
1180
|
+
if (e.charCodeAt(0) === 35 && dn.test(e)) {
|
|
1181
|
+
const r = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1182
|
+
return IA(r) ? L(r) : A;
|
|
1183
|
+
}
|
|
1184
|
+
const n = VA(A);
|
|
1185
|
+
return n !== A ? n : A;
|
|
1186
|
+
}
|
|
1187
|
+
function pn(A) {
|
|
1188
|
+
return A.indexOf("\\") < 0 ? A : A.replace(se, "$1");
|
|
1189
|
+
}
|
|
1190
|
+
function O(A) {
|
|
1191
|
+
return A.indexOf("\\") < 0 && A.indexOf("&") < 0 ? A : A.replace(fn, function(e, n, r) {
|
|
1192
|
+
return n || Cn(e, r);
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
var mn = /[&<>"]/, Dn = /[&<>"]/g, In = {
|
|
1196
|
+
"&": "&",
|
|
1197
|
+
"<": "<",
|
|
1198
|
+
">": ">",
|
|
1199
|
+
'"': """
|
|
1200
|
+
};
|
|
1201
|
+
function Fn(A) {
|
|
1202
|
+
return In[A];
|
|
1203
|
+
}
|
|
1204
|
+
function S(A) {
|
|
1205
|
+
return mn.test(A) ? A.replace(Dn, Fn) : A;
|
|
1206
|
+
}
|
|
1207
|
+
var Bn = /[.?*+^$[\]\\(){}|-]/g;
|
|
1208
|
+
function kn(A) {
|
|
1209
|
+
return A.replace(Bn, "\\$&");
|
|
1210
|
+
}
|
|
1211
|
+
function b(A) {
|
|
1212
|
+
switch (A) {
|
|
1213
|
+
case 9:
|
|
1214
|
+
case 32:
|
|
1215
|
+
return !0;
|
|
1216
|
+
}
|
|
1217
|
+
return !1;
|
|
1218
|
+
}
|
|
1219
|
+
function j(A) {
|
|
1220
|
+
if (A >= 8192 && A <= 8202) return !0;
|
|
1221
|
+
switch (A) {
|
|
1222
|
+
case 9:
|
|
1223
|
+
case 10:
|
|
1224
|
+
case 11:
|
|
1225
|
+
case 12:
|
|
1226
|
+
case 13:
|
|
1227
|
+
case 32:
|
|
1228
|
+
case 160:
|
|
1229
|
+
case 5760:
|
|
1230
|
+
case 8239:
|
|
1231
|
+
case 8287:
|
|
1232
|
+
case 12288:
|
|
1233
|
+
return !0;
|
|
1234
|
+
}
|
|
1235
|
+
return !1;
|
|
1236
|
+
}
|
|
1237
|
+
function ce(A) {
|
|
1238
|
+
return mA.test(A) || LA.test(A);
|
|
1239
|
+
}
|
|
1240
|
+
function V(A) {
|
|
1241
|
+
return ce(L(A));
|
|
1242
|
+
}
|
|
1243
|
+
function P(A) {
|
|
1244
|
+
switch (A) {
|
|
1245
|
+
case 33:
|
|
1246
|
+
case 34:
|
|
1247
|
+
case 35:
|
|
1248
|
+
case 36:
|
|
1249
|
+
case 37:
|
|
1250
|
+
case 38:
|
|
1251
|
+
case 39:
|
|
1252
|
+
case 40:
|
|
1253
|
+
case 41:
|
|
1254
|
+
case 42:
|
|
1255
|
+
case 43:
|
|
1256
|
+
case 44:
|
|
1257
|
+
case 45:
|
|
1258
|
+
case 46:
|
|
1259
|
+
case 47:
|
|
1260
|
+
case 58:
|
|
1261
|
+
case 59:
|
|
1262
|
+
case 60:
|
|
1263
|
+
case 61:
|
|
1264
|
+
case 62:
|
|
1265
|
+
case 63:
|
|
1266
|
+
case 64:
|
|
1267
|
+
case 91:
|
|
1268
|
+
case 92:
|
|
1269
|
+
case 93:
|
|
1270
|
+
case 94:
|
|
1271
|
+
case 95:
|
|
1272
|
+
case 96:
|
|
1273
|
+
case 123:
|
|
1274
|
+
case 124:
|
|
1275
|
+
case 125:
|
|
1276
|
+
case 126:
|
|
1277
|
+
return !0;
|
|
1278
|
+
default:
|
|
1279
|
+
return !1;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
function iA(A) {
|
|
1283
|
+
return A = A.trim().replace(/\s+/g, " "), A.toLowerCase().toUpperCase();
|
|
1284
|
+
}
|
|
1285
|
+
function ZA(A) {
|
|
1286
|
+
return A === 32 || A === 9 || A === 10 || A === 13;
|
|
1287
|
+
}
|
|
1288
|
+
function rA(A) {
|
|
1289
|
+
let e = 0;
|
|
1290
|
+
for (; e < A.length && ZA(A.charCodeAt(e)); e++) ;
|
|
1291
|
+
let n = A.length - 1;
|
|
1292
|
+
for (; n >= e && ZA(A.charCodeAt(n)); n--) ;
|
|
1293
|
+
return A.slice(e, n + 1);
|
|
1294
|
+
}
|
|
1295
|
+
var En = {
|
|
1296
|
+
mdurl: Ye,
|
|
1297
|
+
ucmicro: Je
|
|
1298
|
+
};
|
|
1299
|
+
function bn(A, e, n) {
|
|
1300
|
+
let r, t, i, o;
|
|
1301
|
+
const s = A.posMax, c = A.pos;
|
|
1302
|
+
for (A.pos = e + 1, r = 1; A.pos < s; ) {
|
|
1303
|
+
if (i = A.src.charCodeAt(A.pos), i === 93 && (r--, r === 0)) {
|
|
1304
|
+
t = !0;
|
|
1305
|
+
break;
|
|
1306
|
+
}
|
|
1307
|
+
if (o = A.pos, A.md.inline.skipToken(A), i === 91) {
|
|
1308
|
+
if (o === A.pos - 1) r++;
|
|
1309
|
+
else if (n)
|
|
1310
|
+
return A.pos = c, -1;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
let l = -1;
|
|
1314
|
+
return t && (l = A.pos), A.pos = c, l;
|
|
1315
|
+
}
|
|
1316
|
+
function wn(A, e, n) {
|
|
1317
|
+
let r, t = e;
|
|
1318
|
+
const i = {
|
|
1319
|
+
ok: !1,
|
|
1320
|
+
pos: 0,
|
|
1321
|
+
str: ""
|
|
1322
|
+
};
|
|
1323
|
+
if (A.charCodeAt(t) === 60) {
|
|
1324
|
+
for (t++; t < n; ) {
|
|
1325
|
+
if (r = A.charCodeAt(t), r === 10 || r === 60) return i;
|
|
1326
|
+
if (r === 62)
|
|
1327
|
+
return i.pos = t + 1, i.str = O(A.slice(e + 1, t)), i.ok = !0, i;
|
|
1328
|
+
if (r === 92 && t + 1 < n) {
|
|
1329
|
+
t += 2;
|
|
1330
|
+
continue;
|
|
1331
|
+
}
|
|
1332
|
+
t++;
|
|
1333
|
+
}
|
|
1334
|
+
return i;
|
|
1335
|
+
}
|
|
1336
|
+
let o = 0;
|
|
1337
|
+
for (; t < n && (r = A.charCodeAt(t), !(r === 32 || r < 32 || r === 127)); ) {
|
|
1338
|
+
if (r === 92 && t + 1 < n) {
|
|
1339
|
+
if (A.charCodeAt(t + 1) === 32) {
|
|
1340
|
+
t++;
|
|
1341
|
+
continue;
|
|
1342
|
+
}
|
|
1343
|
+
t += 2;
|
|
1344
|
+
continue;
|
|
1345
|
+
}
|
|
1346
|
+
if (r === 40 && (o++, o > 32))
|
|
1347
|
+
return i;
|
|
1348
|
+
if (r === 41) {
|
|
1349
|
+
if (o === 0) break;
|
|
1350
|
+
o--;
|
|
1351
|
+
}
|
|
1352
|
+
t++;
|
|
1353
|
+
}
|
|
1354
|
+
return e === t || o !== 0 || (i.str = O(A.slice(e, t)), i.pos = t, i.ok = !0), i;
|
|
1355
|
+
}
|
|
1356
|
+
function _n(A, e, n, r) {
|
|
1357
|
+
let t, i = e;
|
|
1358
|
+
const o = {
|
|
1359
|
+
ok: !1,
|
|
1360
|
+
can_continue: !1,
|
|
1361
|
+
pos: 0,
|
|
1362
|
+
str: "",
|
|
1363
|
+
marker: 0
|
|
1364
|
+
};
|
|
1365
|
+
if (r)
|
|
1366
|
+
o.str = r.str, o.marker = r.marker;
|
|
1367
|
+
else {
|
|
1368
|
+
if (i >= n) return o;
|
|
1369
|
+
let s = A.charCodeAt(i);
|
|
1370
|
+
if (s !== 34 && s !== 39 && s !== 40) return o;
|
|
1371
|
+
e++, i++, s === 40 && (s = 41), o.marker = s;
|
|
1372
|
+
}
|
|
1373
|
+
for (; i < n; ) {
|
|
1374
|
+
if (t = A.charCodeAt(i), t === o.marker)
|
|
1375
|
+
return o.pos = i + 1, o.str += O(A.slice(e, i)), o.ok = !0, o;
|
|
1376
|
+
if (t === 40 && o.marker === 41) return o;
|
|
1377
|
+
t === 92 && i + 1 < n && i++, i++;
|
|
1378
|
+
}
|
|
1379
|
+
return o.can_continue = !0, o.str += O(A.slice(e, i)), o;
|
|
1380
|
+
}
|
|
1381
|
+
var yn = /* @__PURE__ */ ie({
|
|
1382
|
+
parseLinkDestination: () => wn,
|
|
1383
|
+
parseLinkLabel: () => bn,
|
|
1384
|
+
parseLinkTitle: () => _n
|
|
1385
|
+
});
|
|
1386
|
+
function T(A) {
|
|
1387
|
+
"@babel/helpers - typeof";
|
|
1388
|
+
return T = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1389
|
+
return typeof e;
|
|
1390
|
+
} : function(e) {
|
|
1391
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1392
|
+
}, T(A);
|
|
1393
|
+
}
|
|
1394
|
+
function Qn(A, e) {
|
|
1395
|
+
if (T(A) != "object" || !A) return A;
|
|
1396
|
+
var n = A[Symbol.toPrimitive];
|
|
1397
|
+
if (n !== void 0) {
|
|
1398
|
+
var r = n.call(A, e);
|
|
1399
|
+
if (T(r) != "object") return r;
|
|
1400
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1401
|
+
}
|
|
1402
|
+
return (e === "string" ? String : Number)(A);
|
|
1403
|
+
}
|
|
1404
|
+
function xn(A) {
|
|
1405
|
+
var e = Qn(A, "string");
|
|
1406
|
+
return T(e) == "symbol" ? e : e + "";
|
|
1407
|
+
}
|
|
1408
|
+
function C(A, e, n) {
|
|
1409
|
+
return (e = xn(e)) in A ? Object.defineProperty(A, e, {
|
|
1410
|
+
value: n,
|
|
1411
|
+
enumerable: !0,
|
|
1412
|
+
configurable: !0,
|
|
1413
|
+
writable: !0
|
|
1414
|
+
}) : A[e] = n, A;
|
|
1415
|
+
}
|
|
1416
|
+
var M = class {
|
|
1417
|
+
constructor(A, e, n) {
|
|
1418
|
+
C(
|
|
1419
|
+
this,
|
|
1420
|
+
/**
|
|
1421
|
+
* Source map info. Format: `[ line_begin, line_end ]`
|
|
1422
|
+
*/
|
|
1423
|
+
"map",
|
|
1424
|
+
null
|
|
1425
|
+
), C(
|
|
1426
|
+
this,
|
|
1427
|
+
/**
|
|
1428
|
+
* nesting level, the same as `state.level`
|
|
1429
|
+
*/
|
|
1430
|
+
"level",
|
|
1431
|
+
0
|
|
1432
|
+
), C(
|
|
1433
|
+
this,
|
|
1434
|
+
/**
|
|
1435
|
+
* An array of child nodes (inline and img tokens)
|
|
1436
|
+
*/
|
|
1437
|
+
"children",
|
|
1438
|
+
null
|
|
1439
|
+
), C(
|
|
1440
|
+
this,
|
|
1441
|
+
/**
|
|
1442
|
+
* In a case of self-closing tag (code, html, fence, etc.),
|
|
1443
|
+
* it has contents of this tag.
|
|
1444
|
+
*/
|
|
1445
|
+
"content",
|
|
1446
|
+
""
|
|
1447
|
+
), C(
|
|
1448
|
+
this,
|
|
1449
|
+
/**
|
|
1450
|
+
* '*' or '_' for emphasis, fence string for fence, etc.
|
|
1451
|
+
*/
|
|
1452
|
+
"markup",
|
|
1453
|
+
""
|
|
1454
|
+
), C(
|
|
1455
|
+
this,
|
|
1456
|
+
/**
|
|
1457
|
+
* Additional information:
|
|
1458
|
+
*
|
|
1459
|
+
* - Info string for "fence" tokens
|
|
1460
|
+
* - The value "auto" for autolink "link_open" and "link_close" tokens
|
|
1461
|
+
* - The string value of the item marker for ordered-list "list_item_open" tokens
|
|
1462
|
+
*/
|
|
1463
|
+
"info",
|
|
1464
|
+
""
|
|
1465
|
+
), C(
|
|
1466
|
+
this,
|
|
1467
|
+
/**
|
|
1468
|
+
* True for block-level tokens, false for inline tokens.
|
|
1469
|
+
* Used in renderer to calculate line breaks
|
|
1470
|
+
*/
|
|
1471
|
+
"block",
|
|
1472
|
+
!1
|
|
1473
|
+
), C(
|
|
1474
|
+
this,
|
|
1475
|
+
/**
|
|
1476
|
+
* If it's true, ignore this element when rendering. Used for tight lists
|
|
1477
|
+
* to hide paragraphs.
|
|
1478
|
+
*/
|
|
1479
|
+
"hidden",
|
|
1480
|
+
!1
|
|
1481
|
+
), this.type = A, this.tag = e, this.attrs = null, this.nesting = n, this.meta = null;
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* Search attribute index by name.
|
|
1485
|
+
*/
|
|
1486
|
+
attrIndex(A) {
|
|
1487
|
+
if (!this.attrs) return -1;
|
|
1488
|
+
const e = this.attrs;
|
|
1489
|
+
for (let n = 0, r = e.length; n < r; n++) if (e[n][0] === A) return n;
|
|
1490
|
+
return -1;
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Add `[ name, value ]` attribute to list. Init attrs if necessary
|
|
1494
|
+
*/
|
|
1495
|
+
attrPush(A) {
|
|
1496
|
+
this.attrs ? this.attrs.push(A) : this.attrs = [A];
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Set `name` attribute to `value`. Override old value if exists.
|
|
1500
|
+
*/
|
|
1501
|
+
attrSet(A, e) {
|
|
1502
|
+
const n = this.attrIndex(A), r = [A, e];
|
|
1503
|
+
n < 0 ? this.attrPush(r) : this.attrs[n] = r;
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Get the value of attribute `name`, or null if it does not exist.
|
|
1507
|
+
*/
|
|
1508
|
+
attrGet(A) {
|
|
1509
|
+
const e = this.attrIndex(A);
|
|
1510
|
+
let n = null;
|
|
1511
|
+
return e >= 0 && (n = this.attrs[e][1]), n;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Join value to existing attribute via space. Or create new attribute if not
|
|
1515
|
+
* exists. Useful to operate with token classes.
|
|
1516
|
+
*/
|
|
1517
|
+
attrJoin(A, e) {
|
|
1518
|
+
const n = this.attrIndex(A);
|
|
1519
|
+
n < 0 ? this.attrPush([A, e]) : this.attrs[n][1] = `${this.attrs[n][1]} ${e}`;
|
|
1520
|
+
}
|
|
1521
|
+
}, q = class {
|
|
1522
|
+
constructor() {
|
|
1523
|
+
C(this, "__rules__", []), C(this, "__cache__", null);
|
|
1524
|
+
}
|
|
1525
|
+
__find__(A) {
|
|
1526
|
+
for (let e = 0; e < this.__rules__.length; e++) if (this.__rules__[e].name === A) return e;
|
|
1527
|
+
return -1;
|
|
1528
|
+
}
|
|
1529
|
+
__compile__() {
|
|
1530
|
+
const A = /* @__PURE__ */ new Set();
|
|
1531
|
+
this.__rules__.forEach((e) => {
|
|
1532
|
+
e.enabled && e.alt.forEach((n) => {
|
|
1533
|
+
n && A.add(n);
|
|
1534
|
+
});
|
|
1535
|
+
}), this.__cache__ = /* @__PURE__ */ Object.create(null), this.__cache__[""] = [], this.__rules__.forEach((e) => {
|
|
1536
|
+
e.enabled && this.__cache__[""].push(e.fn);
|
|
1537
|
+
}), A.forEach((e) => {
|
|
1538
|
+
this.__cache__[e] = [], this.__rules__.forEach((n) => {
|
|
1539
|
+
n.enabled && n.alt.indexOf(e) >= 0 && this.__cache__[e].push(n.fn);
|
|
1540
|
+
});
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Replace rule by name with new function & options. Throws error if name not
|
|
1545
|
+
* found.
|
|
1546
|
+
*
|
|
1547
|
+
* @param name Rule name to replace.
|
|
1548
|
+
* @param fn New rule function.
|
|
1549
|
+
* @param options Rule options. `alt` is an array with names of "alternate"
|
|
1550
|
+
* chains.
|
|
1551
|
+
*
|
|
1552
|
+
* @example Replace existing typographer replacement rule with new one
|
|
1553
|
+
* ```javascript
|
|
1554
|
+
* import MarkdownIt from 'markdown-it'
|
|
1555
|
+
* const md = new MarkdownIt()
|
|
1556
|
+
*
|
|
1557
|
+
* md.core.ruler.at('replacements', function replace(state) {
|
|
1558
|
+
* //...
|
|
1559
|
+
* });
|
|
1560
|
+
* ```
|
|
1561
|
+
*/
|
|
1562
|
+
at(A, e, n = {}) {
|
|
1563
|
+
const r = this.__find__(A);
|
|
1564
|
+
if (r === -1) throw new Error(`Parser rule not found: ${A}`);
|
|
1565
|
+
this.__rules__[r].fn = e, this.__rules__[r].alt = n.alt || [], this.__cache__ = null;
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* Add new rule to chain before one with given name. See also
|
|
1569
|
+
* {@link Ruler.after}, {@link Ruler.push}.
|
|
1570
|
+
*
|
|
1571
|
+
* @param beforeName New rule will be added before this one.
|
|
1572
|
+
* @param ruleName Name of added rule.
|
|
1573
|
+
* @param fn Rule function.
|
|
1574
|
+
* @param options Rule options. `alt` is an array with names of "alternate"
|
|
1575
|
+
* chains.
|
|
1576
|
+
*
|
|
1577
|
+
* @example
|
|
1578
|
+
* ```javascript
|
|
1579
|
+
* import MarkdownIt from 'markdown-it'
|
|
1580
|
+
* const md = new MarkdownIt()
|
|
1581
|
+
*
|
|
1582
|
+
* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
|
|
1583
|
+
* //...
|
|
1584
|
+
* });
|
|
1585
|
+
* ```
|
|
1586
|
+
*/
|
|
1587
|
+
before(A, e, n, r = {}) {
|
|
1588
|
+
const t = this.__find__(A);
|
|
1589
|
+
if (t === -1) throw new Error(`Parser rule not found: ${A}`);
|
|
1590
|
+
this.__rules__.splice(t, 0, {
|
|
1591
|
+
name: e,
|
|
1592
|
+
enabled: !0,
|
|
1593
|
+
fn: n,
|
|
1594
|
+
alt: r.alt || []
|
|
1595
|
+
}), this.__cache__ = null;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Add new rule to chain after one with given name. See also
|
|
1599
|
+
* {@link Ruler.before}, {@link Ruler.push}.
|
|
1600
|
+
*
|
|
1601
|
+
* @param afterName New rule will be added after this one.
|
|
1602
|
+
* @param ruleName Name of added rule.
|
|
1603
|
+
* @param fn Rule function.
|
|
1604
|
+
* @param options Rule options. `alt` is an array with names of "alternate"
|
|
1605
|
+
* chains.
|
|
1606
|
+
*
|
|
1607
|
+
* @example
|
|
1608
|
+
* ```javascript
|
|
1609
|
+
* import MarkdownIt from 'markdown-it'
|
|
1610
|
+
* const md = new MarkdownIt()
|
|
1611
|
+
*
|
|
1612
|
+
* md.inline.ruler.after('text', 'my_rule', function replace(state) {
|
|
1613
|
+
* //...
|
|
1614
|
+
* });
|
|
1615
|
+
* ```
|
|
1616
|
+
*/
|
|
1617
|
+
after(A, e, n, r = {}) {
|
|
1618
|
+
const t = this.__find__(A);
|
|
1619
|
+
if (t === -1) throw new Error(`Parser rule not found: ${A}`);
|
|
1620
|
+
this.__rules__.splice(t + 1, 0, {
|
|
1621
|
+
name: e,
|
|
1622
|
+
enabled: !0,
|
|
1623
|
+
fn: n,
|
|
1624
|
+
alt: r.alt || []
|
|
1625
|
+
}), this.__cache__ = null;
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Push new rule to the end of chain. See also
|
|
1629
|
+
* {@link Ruler.before}, {@link Ruler.after}.
|
|
1630
|
+
*
|
|
1631
|
+
* @param ruleName Name of added rule.
|
|
1632
|
+
* @param fn Rule function.
|
|
1633
|
+
* @param options Rule options. `alt` is an array with names of "alternate"
|
|
1634
|
+
* chains.
|
|
1635
|
+
*
|
|
1636
|
+
* @example
|
|
1637
|
+
* ```javascript
|
|
1638
|
+
* import MarkdownIt from 'markdown-it'
|
|
1639
|
+
* const md = new MarkdownIt()
|
|
1640
|
+
*
|
|
1641
|
+
* md.core.ruler.push('my_rule', function replace(state) {
|
|
1642
|
+
* //...
|
|
1643
|
+
* });
|
|
1644
|
+
* ```
|
|
1645
|
+
*/
|
|
1646
|
+
push(A, e, n = {}) {
|
|
1647
|
+
this.__rules__.push({
|
|
1648
|
+
name: A,
|
|
1649
|
+
enabled: !0,
|
|
1650
|
+
fn: e,
|
|
1651
|
+
alt: n.alt || []
|
|
1652
|
+
}), this.__cache__ = null;
|
|
1653
|
+
}
|
|
1654
|
+
/**
|
|
1655
|
+
* Enable rules with given names. If any rule name not found - throw Error.
|
|
1656
|
+
* Errors can be disabled by second param.
|
|
1657
|
+
*
|
|
1658
|
+
* See also {@link Ruler.disable}, {@link Ruler.enableOnly}.
|
|
1659
|
+
*
|
|
1660
|
+
* @param list List of rule names to enable.
|
|
1661
|
+
* @param ignoreInvalid Set `true` to ignore errors when rule not found.
|
|
1662
|
+
* @returns List of found rule names (if no exception happened).
|
|
1663
|
+
*/
|
|
1664
|
+
enable(A, e = !1) {
|
|
1665
|
+
Array.isArray(A) || (A = [A]);
|
|
1666
|
+
const n = [];
|
|
1667
|
+
return A.forEach((r) => {
|
|
1668
|
+
const t = this.__find__(r);
|
|
1669
|
+
if (t < 0) {
|
|
1670
|
+
if (e) return;
|
|
1671
|
+
throw new Error(`Rules manager: invalid rule name ${r}`);
|
|
1672
|
+
}
|
|
1673
|
+
this.__rules__[t].enabled = !0, n.push(r);
|
|
1674
|
+
}), this.__cache__ = null, n;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Enable rules with given names, and disable everything else. If any rule name
|
|
1678
|
+
* not found - throw Error. Errors can be disabled by second param.
|
|
1679
|
+
*
|
|
1680
|
+
* See also {@link Ruler.disable}, {@link Ruler.enable}.
|
|
1681
|
+
*
|
|
1682
|
+
* @param list List of rule names to enable (whitelist).
|
|
1683
|
+
* @param ignoreInvalid Set `true` to ignore errors when rule not found.
|
|
1684
|
+
*/
|
|
1685
|
+
enableOnly(A, e = !1) {
|
|
1686
|
+
Array.isArray(A) || (A = [A]), this.__rules__.forEach((n) => {
|
|
1687
|
+
n.enabled = !1;
|
|
1688
|
+
}), this.enable(A, e);
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Disable rules with given names. If any rule name not found - throw Error.
|
|
1692
|
+
* Errors can be disabled by second param.
|
|
1693
|
+
*
|
|
1694
|
+
* See also {@link Ruler.enable}, {@link Ruler.enableOnly}.
|
|
1695
|
+
*
|
|
1696
|
+
* @param list List of rule names to disable.
|
|
1697
|
+
* @param ignoreInvalid Set `true` to ignore errors when rule not found.
|
|
1698
|
+
* @returns List of found rule names (if no exception happened).
|
|
1699
|
+
*/
|
|
1700
|
+
disable(A, e = !1) {
|
|
1701
|
+
Array.isArray(A) || (A = [A]);
|
|
1702
|
+
const n = [];
|
|
1703
|
+
return A.forEach((r) => {
|
|
1704
|
+
const t = this.__find__(r);
|
|
1705
|
+
if (t < 0) {
|
|
1706
|
+
if (e) return;
|
|
1707
|
+
throw new Error(`Rules manager: invalid rule name ${r}`);
|
|
1708
|
+
}
|
|
1709
|
+
this.__rules__[t].enabled = !1, n.push(r);
|
|
1710
|
+
}), this.__cache__ = null, n;
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Return array of active functions (rules) for given chain name. It analyzes
|
|
1714
|
+
* rules configuration, compiles caches if not exists and returns result.
|
|
1715
|
+
*
|
|
1716
|
+
* Default chain name is `''` (empty string). It can't be skipped. That's
|
|
1717
|
+
* done intentionally, to keep signature monomorphic for high speed.
|
|
1718
|
+
*/
|
|
1719
|
+
getRules(A) {
|
|
1720
|
+
return this.__cache__ || this.__compile__(), this.__cache__[A] || [];
|
|
1721
|
+
}
|
|
1722
|
+
}, W = {};
|
|
1723
|
+
W.code_inline = function(A, e, n, r, t) {
|
|
1724
|
+
const i = A[e];
|
|
1725
|
+
return `<code${t.renderAttrs(i)}>${S(i.content)}</code>`;
|
|
1726
|
+
};
|
|
1727
|
+
W.code_block = function(A, e, n, r, t) {
|
|
1728
|
+
const i = A[e];
|
|
1729
|
+
return `<pre${t.renderAttrs(i)}><code>${S(A[e].content)}</code></pre>
|
|
1730
|
+
`;
|
|
1731
|
+
};
|
|
1732
|
+
W.fence = function(A, e, n, r, t) {
|
|
1733
|
+
const i = A[e], o = i.info ? O(i.info).trim() : "";
|
|
1734
|
+
let s = "", c = "";
|
|
1735
|
+
if (o) {
|
|
1736
|
+
const h = o.split(/(\s+)/g);
|
|
1737
|
+
s = h[0], c = h.slice(2).join("");
|
|
1738
|
+
}
|
|
1739
|
+
let l;
|
|
1740
|
+
if (n.highlight ? l = n.highlight(i.content, s, c) || S(i.content) : l = S(i.content), l.indexOf("<pre") === 0) return l + `
|
|
1741
|
+
`;
|
|
1742
|
+
if (o) {
|
|
1743
|
+
const h = i.attrIndex("class"), a = i.attrs ? i.attrs.slice() : [];
|
|
1744
|
+
h < 0 ? a.push(["class", `${n.langPrefix}${s}`]) : (a[h] = [a[h][0], a[h][1]], a[h][1] += ` ${n.langPrefix}${s}`);
|
|
1745
|
+
const f = { attrs: a };
|
|
1746
|
+
return `<pre><code${t.renderAttrs(f)}>${l}</code></pre>
|
|
1747
|
+
`;
|
|
1748
|
+
}
|
|
1749
|
+
return `<pre><code${t.renderAttrs(i)}>${l}</code></pre>
|
|
1750
|
+
`;
|
|
1751
|
+
};
|
|
1752
|
+
W.image = function(A, e, n, r, t) {
|
|
1753
|
+
const i = A[e];
|
|
1754
|
+
return i.attrs[i.attrIndex("alt")][1] = t.renderInlineAsText(i.children, n, r), t.renderToken(A, e, n);
|
|
1755
|
+
};
|
|
1756
|
+
W.hardbreak = function(A, e, n) {
|
|
1757
|
+
return n.xhtmlOut ? `<br />
|
|
1758
|
+
` : `<br>
|
|
1759
|
+
`;
|
|
1760
|
+
};
|
|
1761
|
+
W.softbreak = function(A, e, n) {
|
|
1762
|
+
return n.breaks ? n.xhtmlOut ? `<br />
|
|
1763
|
+
` : `<br>
|
|
1764
|
+
` : `
|
|
1765
|
+
`;
|
|
1766
|
+
};
|
|
1767
|
+
W.text = function(A, e) {
|
|
1768
|
+
return S(A[e].content);
|
|
1769
|
+
};
|
|
1770
|
+
W.html_block = function(A, e) {
|
|
1771
|
+
return A[e].content;
|
|
1772
|
+
};
|
|
1773
|
+
W.html_inline = function(A, e) {
|
|
1774
|
+
return A[e].content;
|
|
1775
|
+
};
|
|
1776
|
+
var le = class {
|
|
1777
|
+
constructor() {
|
|
1778
|
+
C(
|
|
1779
|
+
this,
|
|
1780
|
+
/**
|
|
1781
|
+
* Contains render rules for tokens. Can be updated and extended.
|
|
1782
|
+
*
|
|
1783
|
+
* See [source code](https://github.com/markdown-it/markdown-it/blob/master/src/renderer.ts)
|
|
1784
|
+
* for more details and examples.
|
|
1785
|
+
*
|
|
1786
|
+
* @example Custom render rules
|
|
1787
|
+
* ```javascript
|
|
1788
|
+
* import MarkdownIt from 'markdown-it'
|
|
1789
|
+
* const md = new MarkdownIt()
|
|
1790
|
+
*
|
|
1791
|
+
* md.renderer.rules.strong_open = function () { return '<b>'; };
|
|
1792
|
+
* md.renderer.rules.strong_close = function () { return '</b>'; };
|
|
1793
|
+
*
|
|
1794
|
+
* const result = md.renderInline(...);
|
|
1795
|
+
* ```
|
|
1796
|
+
*
|
|
1797
|
+
* @example Each rule is called as independent static function with fixed signature
|
|
1798
|
+
* ```javascript
|
|
1799
|
+
* function my_token_render(tokens, idx, options, env, renderer) {
|
|
1800
|
+
* // ...
|
|
1801
|
+
* return renderedHTML;
|
|
1802
|
+
* }
|
|
1803
|
+
* ```
|
|
1804
|
+
*/
|
|
1805
|
+
"rules",
|
|
1806
|
+
Object.assign({}, W)
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
/**
|
|
1810
|
+
* Render token attributes to string.
|
|
1811
|
+
*/
|
|
1812
|
+
renderAttrs(A) {
|
|
1813
|
+
let e, n, r;
|
|
1814
|
+
if (!A.attrs) return "";
|
|
1815
|
+
for (r = "", e = 0, n = A.attrs.length; e < n; e++) r += ` ${S(A.attrs[e][0])}="${S(String(A.attrs[e][1]))}"`;
|
|
1816
|
+
return r;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Default token renderer. Can be overriden by custom function
|
|
1820
|
+
* in {@link Renderer.rules}.
|
|
1821
|
+
*
|
|
1822
|
+
* @param tokens List of tokens.
|
|
1823
|
+
* @param idx Token index to render.
|
|
1824
|
+
* @param options Params of parser instance.
|
|
1825
|
+
*/
|
|
1826
|
+
renderToken(A, e, n) {
|
|
1827
|
+
const r = A[e];
|
|
1828
|
+
let t = "";
|
|
1829
|
+
if (r.hidden) return "";
|
|
1830
|
+
let i = e - 1;
|
|
1831
|
+
for (; i >= 0 && A[i].hidden && A[i].nesting === 0; ) i--;
|
|
1832
|
+
r.block && r.nesting !== -1 && i >= 0 && A[i].hidden && A[i].nesting === -1 && (t += `
|
|
1833
|
+
`), t += (r.nesting === -1 ? "</" : "<") + r.tag, t += this.renderAttrs(r), r.nesting === 0 && n.xhtmlOut && (t += " /");
|
|
1834
|
+
let o = !1;
|
|
1835
|
+
if (r.block && (o = !0, r.nesting === 1)) {
|
|
1836
|
+
let s = e + 1;
|
|
1837
|
+
for (; s < A.length && A[s].hidden && A[s].nesting === 0; ) s++;
|
|
1838
|
+
if (s < A.length) {
|
|
1839
|
+
const c = A[s];
|
|
1840
|
+
(c.type === "inline" || c.hidden || c.nesting === -1 && c.tag === r.tag) && (o = !1);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
return t += o ? `>
|
|
1844
|
+
` : ">", t;
|
|
1845
|
+
}
|
|
1846
|
+
/**
|
|
1847
|
+
* The same as {@link Renderer.render}, but for single token of `inline` type.
|
|
1848
|
+
*
|
|
1849
|
+
* @param tokens List on block tokens to render.
|
|
1850
|
+
* @param options Params of parser instance.
|
|
1851
|
+
* @param env Additional data from parsed input (references, for example).
|
|
1852
|
+
*/
|
|
1853
|
+
renderInline(A, e, n) {
|
|
1854
|
+
let r = "";
|
|
1855
|
+
const t = this.rules;
|
|
1856
|
+
for (let i = 0, o = A.length; i < o; i++) {
|
|
1857
|
+
const s = A[i].type;
|
|
1858
|
+
typeof t[s] < "u" ? r += t[s](A, i, e, n, this) : r += this.renderToken(A, i, e);
|
|
1859
|
+
}
|
|
1860
|
+
return r;
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* Special kludge for image `alt` attributes to conform CommonMark spec.
|
|
1864
|
+
* Don't try to use it! Spec requires to show `alt` content with stripped markup,
|
|
1865
|
+
* instead of simple escaping.
|
|
1866
|
+
*
|
|
1867
|
+
* @param tokens List on block tokens to render.
|
|
1868
|
+
* @param options Params of parser instance.
|
|
1869
|
+
* @param env Additional data from parsed input (references, for example).
|
|
1870
|
+
*/
|
|
1871
|
+
renderInlineAsText(A, e, n) {
|
|
1872
|
+
let r = "";
|
|
1873
|
+
for (let t = 0, i = A.length; t < i; t++) switch (A[t].type) {
|
|
1874
|
+
case "text":
|
|
1875
|
+
case "code_inline":
|
|
1876
|
+
r += A[t].content;
|
|
1877
|
+
break;
|
|
1878
|
+
case "image":
|
|
1879
|
+
r += this.renderInlineAsText(A[t].children, e, n);
|
|
1880
|
+
break;
|
|
1881
|
+
case "html_inline":
|
|
1882
|
+
case "html_block":
|
|
1883
|
+
r += A[t].content;
|
|
1884
|
+
break;
|
|
1885
|
+
case "softbreak":
|
|
1886
|
+
case "hardbreak":
|
|
1887
|
+
r += `
|
|
1888
|
+
`;
|
|
1889
|
+
}
|
|
1890
|
+
return r;
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Takes token stream and generates HTML. Probably, you will never need to call
|
|
1894
|
+
* this method directly.
|
|
1895
|
+
*
|
|
1896
|
+
* @param tokens List on block tokens to render.
|
|
1897
|
+
* @param options Params of parser instance.
|
|
1898
|
+
* @param env Additional data from parsed input (references, for example).
|
|
1899
|
+
*/
|
|
1900
|
+
render(A, e, n) {
|
|
1901
|
+
let r = "";
|
|
1902
|
+
const t = this.rules;
|
|
1903
|
+
for (let i = 0, o = A.length; i < o; i++) {
|
|
1904
|
+
const s = A[i].type;
|
|
1905
|
+
s === "inline" ? r += this.renderInline(A[i].children, e, n) : typeof t[s] < "u" ? r += t[s](A, i, e, n, this) : r += this.renderToken(A, i, e);
|
|
1906
|
+
}
|
|
1907
|
+
return r;
|
|
1908
|
+
}
|
|
1909
|
+
}, ue = class {
|
|
1910
|
+
constructor(A, e, n) {
|
|
1911
|
+
C(this, "tokens", []), C(this, "inlineMode", !1), C(this, "Token", M), this.src = A, this.env = n, this.md = e;
|
|
1912
|
+
}
|
|
1913
|
+
}, Kn = /\r\n?|\n/g, Gn = /\0/g;
|
|
1914
|
+
function Wn(A) {
|
|
1915
|
+
let e;
|
|
1916
|
+
e = A.src.replace(Kn, `
|
|
1917
|
+
`), e = e.replace(Gn, "�"), A.src = e;
|
|
1918
|
+
}
|
|
1919
|
+
function Yn(A) {
|
|
1920
|
+
let e;
|
|
1921
|
+
A.inlineMode ? (e = new A.Token("inline", "", 0), e.content = A.src, e.map = [0, 1], e.children = [], A.tokens.push(e)) : A.md.block.parse(A.src, A.md, A.env, A.tokens);
|
|
1922
|
+
}
|
|
1923
|
+
function Zn(A) {
|
|
1924
|
+
const e = A.tokens;
|
|
1925
|
+
let n = 0;
|
|
1926
|
+
for (let r = 0; r < e.length; r++)
|
|
1927
|
+
e[r].type !== "reference_definition" && (r !== n && (e[n] = e[r]), n++);
|
|
1928
|
+
e.length !== n && (e.length = n);
|
|
1929
|
+
}
|
|
1930
|
+
function Jn(A) {
|
|
1931
|
+
const e = A.tokens;
|
|
1932
|
+
for (let n = 0, r = e.length; n < r; n++) {
|
|
1933
|
+
const t = e[n];
|
|
1934
|
+
t.type === "inline" && A.md.inline.parse(t.content, A.md, A.env, t.children);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
function Rn(A) {
|
|
1938
|
+
return /^<a[>\s]/i.test(A);
|
|
1939
|
+
}
|
|
1940
|
+
function Sn(A) {
|
|
1941
|
+
return /^<\/a\s*>/i.test(A);
|
|
1942
|
+
}
|
|
1943
|
+
function Hn(A) {
|
|
1944
|
+
const e = A.tokens;
|
|
1945
|
+
if (A.md.options.linkify)
|
|
1946
|
+
for (let n = 0, r = e.length; n < r; n++) {
|
|
1947
|
+
if (e[n].type !== "inline" || !A.md.linkify.test(e[n].content)) continue;
|
|
1948
|
+
let t = e[n].children, i = 0;
|
|
1949
|
+
for (let o = t.length - 1; o >= 0; o--) {
|
|
1950
|
+
const s = t[o];
|
|
1951
|
+
if (s.type === "link_close") {
|
|
1952
|
+
for (o--; t[o].level !== s.level && t[o].type !== "link_open"; ) o--;
|
|
1953
|
+
continue;
|
|
1954
|
+
}
|
|
1955
|
+
if (s.type === "html_inline" && (Rn(s.content) && i > 0 && i--, Sn(s.content) && i++), !(i > 0) && s.type === "text" && A.md.linkify.test(s.content)) {
|
|
1956
|
+
const c = s.content;
|
|
1957
|
+
let l = A.md.linkify.match(c);
|
|
1958
|
+
const h = [];
|
|
1959
|
+
let a = s.level, f = 0;
|
|
1960
|
+
l.length > 0 && l[0].index === 0 && o > 0 && t[o - 1].type === "text_special" && (l = l.slice(1));
|
|
1961
|
+
for (let g = 0; g < l.length; g++) {
|
|
1962
|
+
const u = l[g].url, I = A.md.normalizeLink(u);
|
|
1963
|
+
if (!A.md.validateLink(I)) continue;
|
|
1964
|
+
let p = l[g].text;
|
|
1965
|
+
l[g].schema ? l[g].schema === "mailto:" && !/^mailto:/i.test(p) ? p = A.md.normalizeLinkText(`mailto:${p}`).replace(/^mailto:/, "") : p = A.md.normalizeLinkText(p) : p = A.md.normalizeLinkText(`http://${p}`).replace(/^http:\/\//, "");
|
|
1966
|
+
const B = l[g].index;
|
|
1967
|
+
if (B > f) {
|
|
1968
|
+
const m = new A.Token("text", "", 0);
|
|
1969
|
+
m.content = c.slice(f, B), m.level = a, h.push(m);
|
|
1970
|
+
}
|
|
1971
|
+
const D = new A.Token("link_open", "a", 1);
|
|
1972
|
+
D.attrs = [["href", I]], D.level = a++, D.markup = "linkify", D.info = "auto", h.push(D);
|
|
1973
|
+
const F = new A.Token("text", "", 0);
|
|
1974
|
+
F.content = p, F.level = a, h.push(F);
|
|
1975
|
+
const d = new A.Token("link_close", "a", -1);
|
|
1976
|
+
d.level = --a, d.markup = "linkify", d.info = "auto", h.push(d), f = l[g].lastIndex;
|
|
1977
|
+
}
|
|
1978
|
+
if (f < c.length) {
|
|
1979
|
+
const g = new A.Token("text", "", 0);
|
|
1980
|
+
g.content = c.slice(f), g.level = a, h.push(g);
|
|
1981
|
+
}
|
|
1982
|
+
e[n].children = t = oe(t, o, h);
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
var he = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Mn = /\((c|tm|r)\)/i, vn = /\((c|tm|r)\)/gi, Nn = {
|
|
1988
|
+
c: "©",
|
|
1989
|
+
r: "®",
|
|
1990
|
+
tm: "™"
|
|
1991
|
+
};
|
|
1992
|
+
function Un(A, e) {
|
|
1993
|
+
return Nn[e.toLowerCase()];
|
|
1994
|
+
}
|
|
1995
|
+
function On(A) {
|
|
1996
|
+
let e = 0;
|
|
1997
|
+
for (let n = A.length - 1; n >= 0; n--) {
|
|
1998
|
+
const r = A[n];
|
|
1999
|
+
r.type === "text" && !e && (r.content = r.content.replace(vn, Un)), r.type === "link_open" && r.info === "auto" && e--, r.type === "link_close" && r.info === "auto" && e++;
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
function Xn(A) {
|
|
2003
|
+
let e = 0;
|
|
2004
|
+
for (let n = A.length - 1; n >= 0; n--) {
|
|
2005
|
+
const r = A[n];
|
|
2006
|
+
r.type === "text" && !e && he.test(r.content) && (r.content = r.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/gm, "$1—").replace(/(^|\s)--(?=\s|$)/gm, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm, "$1–")), r.type === "link_open" && r.info === "auto" && e--, r.type === "link_close" && r.info === "auto" && e++;
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
function zn(A) {
|
|
2010
|
+
let e;
|
|
2011
|
+
if (A.md.options.typographer)
|
|
2012
|
+
for (e = A.tokens.length - 1; e >= 0; e--)
|
|
2013
|
+
A.tokens[e].type === "inline" && (Mn.test(A.tokens[e].content) && On(A.tokens[e].children), he.test(A.tokens[e].content) && Xn(A.tokens[e].children));
|
|
2014
|
+
}
|
|
2015
|
+
var Ln = /['"]/, JA = /['"]/g, RA = "’";
|
|
2016
|
+
function eA(A, e, n, r) {
|
|
2017
|
+
A[e] || (A[e] = []), A[e].push({
|
|
2018
|
+
pos: n,
|
|
2019
|
+
ch: r
|
|
2020
|
+
});
|
|
2021
|
+
}
|
|
2022
|
+
function jn(A, e) {
|
|
2023
|
+
let n = "", r = 0;
|
|
2024
|
+
e.sort((t, i) => t.pos - i.pos);
|
|
2025
|
+
for (let t = 0; t < e.length; t++) {
|
|
2026
|
+
const i = e[t];
|
|
2027
|
+
n += A.slice(r, i.pos) + i.ch, r = i.pos + 1;
|
|
2028
|
+
}
|
|
2029
|
+
return n + A.slice(r);
|
|
2030
|
+
}
|
|
2031
|
+
function Vn(A, e) {
|
|
2032
|
+
let n;
|
|
2033
|
+
const r = [], t = {};
|
|
2034
|
+
for (let i = 0; i < A.length; i++) {
|
|
2035
|
+
const o = A[i], s = A[i].level;
|
|
2036
|
+
for (n = r.length - 1; n >= 0 && !(r[n].level <= s); n--) ;
|
|
2037
|
+
if (r.length = n + 1, o.type !== "text") continue;
|
|
2038
|
+
const c = o.content;
|
|
2039
|
+
let l = 0;
|
|
2040
|
+
const h = c.length;
|
|
2041
|
+
A: for (; l < h; ) {
|
|
2042
|
+
JA.lastIndex = l;
|
|
2043
|
+
const a = JA.exec(c);
|
|
2044
|
+
if (!a) break;
|
|
2045
|
+
let f = !0, g = !0;
|
|
2046
|
+
l = a.index + 1;
|
|
2047
|
+
const u = a[0] === "'";
|
|
2048
|
+
let I = 32;
|
|
2049
|
+
if (a.index - 1 >= 0) I = c.charCodeAt(a.index - 1);
|
|
2050
|
+
else for (n = i - 1; n >= 0 && !(A[n].type === "softbreak" || A[n].type === "hardbreak"); n--)
|
|
2051
|
+
if (A[n].content) {
|
|
2052
|
+
I = A[n].content.charCodeAt(A[n].content.length - 1);
|
|
2053
|
+
break;
|
|
2054
|
+
}
|
|
2055
|
+
let p = 32;
|
|
2056
|
+
if (l < h) p = c.charCodeAt(l);
|
|
2057
|
+
else for (n = i + 1; n < A.length && !(A[n].type === "softbreak" || A[n].type === "hardbreak"); n++)
|
|
2058
|
+
if (A[n].content) {
|
|
2059
|
+
p = A[n].content.charCodeAt(0);
|
|
2060
|
+
break;
|
|
2061
|
+
}
|
|
2062
|
+
const B = P(I) || V(I), D = P(p) || V(p), F = j(I), d = j(p);
|
|
2063
|
+
if (d ? f = !1 : D && (F || B || (f = !1)), F ? g = !1 : B && (d || D || (g = !1)), p === 34 && a[0] === '"' && I >= 48 && I <= 57 && (g = f = !1), f && g && (f = B, g = D), !f && !g) {
|
|
2064
|
+
u && eA(t, i, a.index, RA);
|
|
2065
|
+
continue;
|
|
2066
|
+
}
|
|
2067
|
+
if (g) for (n = r.length - 1; n >= 0; n--) {
|
|
2068
|
+
let m = r[n];
|
|
2069
|
+
if (r[n].level < s) break;
|
|
2070
|
+
if (m.single === u && r[n].level === s) {
|
|
2071
|
+
m = r[n];
|
|
2072
|
+
let k, _;
|
|
2073
|
+
u ? (k = e.md.options.quotes[2], _ = e.md.options.quotes[3]) : (k = e.md.options.quotes[0], _ = e.md.options.quotes[1]), eA(t, i, a.index, _), eA(t, m.token, m.pos, k), r.length = n;
|
|
2074
|
+
continue A;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
f ? r.push({
|
|
2078
|
+
token: i,
|
|
2079
|
+
pos: a.index,
|
|
2080
|
+
single: u,
|
|
2081
|
+
level: s
|
|
2082
|
+
}) : g && u && eA(t, i, a.index, RA);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
Object.keys(t).forEach(function(i) {
|
|
2086
|
+
const o = Number(i);
|
|
2087
|
+
A[o].content = jn(A[o].content, t[i]);
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
function Pn(A) {
|
|
2091
|
+
if (A.md.options.typographer)
|
|
2092
|
+
for (let e = A.tokens.length - 1; e >= 0; e--)
|
|
2093
|
+
A.tokens[e].type !== "inline" || !Ln.test(A.tokens[e].content) || Vn(A.tokens[e].children, A);
|
|
2094
|
+
}
|
|
2095
|
+
function Tn(A) {
|
|
2096
|
+
let e, n;
|
|
2097
|
+
const r = A.length;
|
|
2098
|
+
for (e = 0; e < r; e++) A[e].type === "text_special" && (A[e].type = "text");
|
|
2099
|
+
for (e = n = 0; e < r; e++) A[e].type === "text" && e + 1 < r && A[e + 1].type === "text" ? A[e + 1].content = A[e].content + A[e + 1].content : (e !== n && (A[n] = A[e]), n++);
|
|
2100
|
+
e !== n && (A.length = n);
|
|
2101
|
+
}
|
|
2102
|
+
function qn(A) {
|
|
2103
|
+
let e, n;
|
|
2104
|
+
const r = A.tokens, t = r.length;
|
|
2105
|
+
for (let i = 0; i < t; i++) {
|
|
2106
|
+
if (r[i].type !== "inline") continue;
|
|
2107
|
+
const o = r[i].children, s = o.length;
|
|
2108
|
+
for (e = 0; e < s; e++)
|
|
2109
|
+
o[e].type === "text_special" && (o[e].type = "text"), o[e].children && Tn(o[e].children);
|
|
2110
|
+
for (e = n = 0; e < s; e++) o[e].type === "text" && e + 1 < s && o[e + 1].type === "text" ? o[e + 1].content = o[e].content + o[e + 1].content : (e !== n && (o[n] = o[e]), n++);
|
|
2111
|
+
e !== n && (o.length = n);
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
var hA = [
|
|
2115
|
+
["normalize", Wn],
|
|
2116
|
+
["block", Yn],
|
|
2117
|
+
["strip_references", Zn],
|
|
2118
|
+
["inline", Jn],
|
|
2119
|
+
["linkify", Hn],
|
|
2120
|
+
["replacements", zn],
|
|
2121
|
+
["smartquotes", Pn],
|
|
2122
|
+
["text_join", qn]
|
|
2123
|
+
], ae = class {
|
|
2124
|
+
constructor() {
|
|
2125
|
+
C(
|
|
2126
|
+
this,
|
|
2127
|
+
/**
|
|
2128
|
+
* {@link Ruler} instance. Keep configuration of core rules.
|
|
2129
|
+
*/
|
|
2130
|
+
"ruler",
|
|
2131
|
+
new q()
|
|
2132
|
+
), C(this, "State", ue);
|
|
2133
|
+
for (let A = 0; A < hA.length; A++) this.ruler.push(hA[A][0], hA[A][1]);
|
|
2134
|
+
}
|
|
2135
|
+
/**
|
|
2136
|
+
* Executes core chain rules.
|
|
2137
|
+
*/
|
|
2138
|
+
process(A) {
|
|
2139
|
+
const e = this.ruler.getRules("");
|
|
2140
|
+
for (let n = 0, r = e.length; n < r; n++) e[n](A);
|
|
2141
|
+
}
|
|
2142
|
+
}, ge = class {
|
|
2143
|
+
constructor(A, e, n, r) {
|
|
2144
|
+
C(this, "bMarks", []), C(this, "eMarks", []), C(this, "tShift", []), C(this, "sCount", []), C(this, "bsCount", []), C(this, "blkIndent", 0), C(this, "line", 0), C(this, "lineMax", 0), C(this, "tight", !1), C(this, "listIndent", -1), C(this, "parentType", "root"), C(this, "level", 0), C(this, "Token", M), this.src = A, this.md = e, this.env = n, this.tokens = r;
|
|
2145
|
+
const t = this.src;
|
|
2146
|
+
for (let i = 0, o = 0, s = 0, c = 0, l = t.length, h = !1; o < l; o++) {
|
|
2147
|
+
const a = t.charCodeAt(o);
|
|
2148
|
+
if (!h) if (b(a)) {
|
|
2149
|
+
s++, a === 9 ? c += 4 - c % 4 : c++;
|
|
2150
|
+
continue;
|
|
2151
|
+
} else h = !0;
|
|
2152
|
+
(a === 10 || o === l - 1) && (a !== 10 && o++, this.bMarks.push(i), this.eMarks.push(o), this.tShift.push(s), this.sCount.push(c), this.bsCount.push(0), h = !1, s = 0, c = 0, i = o + 1);
|
|
2153
|
+
}
|
|
2154
|
+
this.bMarks.push(t.length), this.eMarks.push(t.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
2155
|
+
}
|
|
2156
|
+
push(A, e, n) {
|
|
2157
|
+
const r = new M(A, e, n);
|
|
2158
|
+
return r.block = !0, n < 0 && this.level--, r.level = this.level, n > 0 && this.level++, this.tokens.push(r), r;
|
|
2159
|
+
}
|
|
2160
|
+
isEmpty(A) {
|
|
2161
|
+
return this.bMarks[A] + this.tShift[A] >= this.eMarks[A];
|
|
2162
|
+
}
|
|
2163
|
+
skipEmptyLines(A) {
|
|
2164
|
+
for (let e = this.lineMax; A < e && !(this.bMarks[A] + this.tShift[A] < this.eMarks[A]); A++) ;
|
|
2165
|
+
return A;
|
|
2166
|
+
}
|
|
2167
|
+
skipSpaces(A) {
|
|
2168
|
+
for (let e = this.src.length; A < e && b(this.src.charCodeAt(A)); A++) ;
|
|
2169
|
+
return A;
|
|
2170
|
+
}
|
|
2171
|
+
skipSpacesBack(A, e) {
|
|
2172
|
+
if (A <= e) return A;
|
|
2173
|
+
for (; A > e; ) if (!b(this.src.charCodeAt(--A))) return A + 1;
|
|
2174
|
+
return A;
|
|
2175
|
+
}
|
|
2176
|
+
skipChars(A, e) {
|
|
2177
|
+
for (let n = this.src.length; A < n && this.src.charCodeAt(A) === e; A++) ;
|
|
2178
|
+
return A;
|
|
2179
|
+
}
|
|
2180
|
+
skipCharsBack(A, e, n) {
|
|
2181
|
+
if (A <= n) return A;
|
|
2182
|
+
for (; A > n; ) if (e !== this.src.charCodeAt(--A)) return A + 1;
|
|
2183
|
+
return A;
|
|
2184
|
+
}
|
|
2185
|
+
getLines(A, e, n, r) {
|
|
2186
|
+
if (A >= e) return "";
|
|
2187
|
+
const t = new Array(e - A);
|
|
2188
|
+
for (let i = 0, o = A; o < e; o++, i++) {
|
|
2189
|
+
let s = 0;
|
|
2190
|
+
const c = this.bMarks[o];
|
|
2191
|
+
let l = c, h;
|
|
2192
|
+
for (o + 1 < e || r ? h = this.eMarks[o] + 1 : h = this.eMarks[o]; l < h && s < n; ) {
|
|
2193
|
+
const a = this.src.charCodeAt(l);
|
|
2194
|
+
if (b(a)) a === 9 ? s += 4 - (s + this.bsCount[o]) % 4 : s++;
|
|
2195
|
+
else if (l - c < this.tShift[o]) s++;
|
|
2196
|
+
else break;
|
|
2197
|
+
l++;
|
|
2198
|
+
}
|
|
2199
|
+
s > n ? t[i] = new Array(s - n + 1).join(" ") + this.src.slice(l, h) : t[i] = this.src.slice(l, h);
|
|
2200
|
+
}
|
|
2201
|
+
return t.join("");
|
|
2202
|
+
}
|
|
2203
|
+
}, $n = 65536;
|
|
2204
|
+
function aA(A, e) {
|
|
2205
|
+
const n = A.bMarks[e] + A.tShift[e], r = A.eMarks[e];
|
|
2206
|
+
return A.src.slice(n, r);
|
|
2207
|
+
}
|
|
2208
|
+
function SA(A) {
|
|
2209
|
+
const e = [], n = A.length;
|
|
2210
|
+
let r = 0, t = A.charCodeAt(r), i = !1, o = 0, s = "";
|
|
2211
|
+
for (; r < n; )
|
|
2212
|
+
t === 124 && (i ? (s += A.substring(o, r - 1), o = r) : (e.push(s + A.substring(o, r)), s = "", o = r + 1)), i = t === 92, r++, t = A.charCodeAt(r);
|
|
2213
|
+
return e.push(s + A.substring(o)), e;
|
|
2214
|
+
}
|
|
2215
|
+
function At(A, e, n, r) {
|
|
2216
|
+
if (e + 2 > n) return !1;
|
|
2217
|
+
let t = e + 1;
|
|
2218
|
+
if (A.sCount[t] < A.blkIndent || A.sCount[t] - A.blkIndent >= 4) return !1;
|
|
2219
|
+
let i = A.bMarks[t] + A.tShift[t];
|
|
2220
|
+
if (i >= A.eMarks[t]) return !1;
|
|
2221
|
+
const o = A.src.charCodeAt(i++);
|
|
2222
|
+
if (o !== 124 && o !== 45 && o !== 58 || i >= A.eMarks[t]) return !1;
|
|
2223
|
+
const s = A.src.charCodeAt(i++);
|
|
2224
|
+
if (s !== 124 && s !== 45 && s !== 58 && !b(s) || o === 45 && b(s)) return !1;
|
|
2225
|
+
for (; i < A.eMarks[t]; ) {
|
|
2226
|
+
const d = A.src.charCodeAt(i);
|
|
2227
|
+
if (d !== 124 && d !== 45 && d !== 58 && !b(d)) return !1;
|
|
2228
|
+
i++;
|
|
2229
|
+
}
|
|
2230
|
+
let c = aA(A, e + 1), l = c.split("|");
|
|
2231
|
+
const h = [];
|
|
2232
|
+
for (let d = 0; d < l.length; d++) {
|
|
2233
|
+
const m = l[d].trim();
|
|
2234
|
+
if (!m) {
|
|
2235
|
+
if (d === 0 || d === l.length - 1) continue;
|
|
2236
|
+
return !1;
|
|
2237
|
+
}
|
|
2238
|
+
if (!/^:?-+:?$/.test(m)) return !1;
|
|
2239
|
+
m.charCodeAt(m.length - 1) === 58 ? h.push(m.charCodeAt(0) === 58 ? "center" : "right") : m.charCodeAt(0) === 58 ? h.push("left") : h.push("");
|
|
2240
|
+
}
|
|
2241
|
+
if (c = aA(A, e).trim(), c.indexOf("|") === -1 || A.sCount[e] - A.blkIndent >= 4) return !1;
|
|
2242
|
+
l = SA(c), l.length && l[0] === "" && l.shift(), l.length && l[l.length - 1] === "" && l.pop();
|
|
2243
|
+
const a = l.length;
|
|
2244
|
+
if (a === 0 || a !== h.length) return !1;
|
|
2245
|
+
if (r) return !0;
|
|
2246
|
+
const f = A.parentType;
|
|
2247
|
+
A.parentType = "table";
|
|
2248
|
+
const g = A.md.block.ruler.getRules("blockquote"), u = A.push("table_open", "table", 1), I = [e, 0];
|
|
2249
|
+
u.map = I;
|
|
2250
|
+
const p = A.push("thead_open", "thead", 1);
|
|
2251
|
+
p.map = [e, e + 1];
|
|
2252
|
+
const B = A.push("tr_open", "tr", 1);
|
|
2253
|
+
B.map = [e, e + 1];
|
|
2254
|
+
for (let d = 0; d < l.length; d++) {
|
|
2255
|
+
const m = A.push("th_open", "th", 1);
|
|
2256
|
+
h[d] && (m.attrs = [["style", `text-align:${h[d]}`]]);
|
|
2257
|
+
const k = A.push("inline", "", 0);
|
|
2258
|
+
k.content = l[d].trim(), k.children = [], A.push("th_close", "th", -1);
|
|
2259
|
+
}
|
|
2260
|
+
A.push("tr_close", "tr", -1), A.push("thead_close", "thead", -1);
|
|
2261
|
+
let D, F = 0;
|
|
2262
|
+
for (t = e + 2; t < n && !(A.sCount[t] < A.blkIndent); t++) {
|
|
2263
|
+
let d = !1;
|
|
2264
|
+
for (let k = 0, _ = g.length; k < _; k++) if (g[k](A, t, n, !0)) {
|
|
2265
|
+
d = !0;
|
|
2266
|
+
break;
|
|
2267
|
+
}
|
|
2268
|
+
if (d || (c = aA(A, t).trim(), !c) || A.sCount[t] - A.blkIndent >= 4 || (l = SA(c), l.length && l[0] === "" && l.shift(), l.length && l[l.length - 1] === "" && l.pop(), F += a - l.length, F > $n)) break;
|
|
2269
|
+
if (t === e + 2) {
|
|
2270
|
+
const k = A.push("tbody_open", "tbody", 1);
|
|
2271
|
+
k.map = D = [e + 2, 0];
|
|
2272
|
+
}
|
|
2273
|
+
const m = A.push("tr_open", "tr", 1);
|
|
2274
|
+
m.map = [t, t + 1];
|
|
2275
|
+
for (let k = 0; k < a; k++) {
|
|
2276
|
+
const _ = A.push("td_open", "td", 1);
|
|
2277
|
+
h[k] && (_.attrs = [["style", `text-align:${h[k]}`]]);
|
|
2278
|
+
const x = A.push("inline", "", 0);
|
|
2279
|
+
x.content = l[k] ? l[k].trim() : "", x.children = [], A.push("td_close", "td", -1);
|
|
2280
|
+
}
|
|
2281
|
+
A.push("tr_close", "tr", -1);
|
|
2282
|
+
}
|
|
2283
|
+
return D && (A.push("tbody_close", "tbody", -1), D[1] = t), A.push("table_close", "table", -1), I[1] = t, A.parentType = f, A.line = t, !0;
|
|
2284
|
+
}
|
|
2285
|
+
function et(A, e, n) {
|
|
2286
|
+
if (A.sCount[e] - A.blkIndent < 4) return !1;
|
|
2287
|
+
let r = e + 1, t = r;
|
|
2288
|
+
for (; r < n; ) {
|
|
2289
|
+
if (A.isEmpty(r)) {
|
|
2290
|
+
r++;
|
|
2291
|
+
continue;
|
|
2292
|
+
}
|
|
2293
|
+
if (A.sCount[r] - A.blkIndent >= 4) {
|
|
2294
|
+
r++, t = r;
|
|
2295
|
+
continue;
|
|
2296
|
+
}
|
|
2297
|
+
break;
|
|
2298
|
+
}
|
|
2299
|
+
A.line = t;
|
|
2300
|
+
const i = A.push("code_block", "code", 0);
|
|
2301
|
+
return i.content = A.getLines(e, t, 4 + A.blkIndent, !1) + `
|
|
2302
|
+
`, i.map = [e, A.line], !0;
|
|
2303
|
+
}
|
|
2304
|
+
function nt(A, e, n, r) {
|
|
2305
|
+
let t = A.bMarks[e] + A.tShift[e], i = A.eMarks[e];
|
|
2306
|
+
if (A.sCount[e] - A.blkIndent >= 4 || t + 3 > i) return !1;
|
|
2307
|
+
const o = A.src.charCodeAt(t);
|
|
2308
|
+
if (o !== 126 && o !== 96) return !1;
|
|
2309
|
+
let s = t;
|
|
2310
|
+
t = A.skipChars(t, o);
|
|
2311
|
+
let c = t - s;
|
|
2312
|
+
if (c < 3) return !1;
|
|
2313
|
+
const l = A.src.slice(s, t), h = A.src.slice(t, i);
|
|
2314
|
+
if (o === 96 && h.indexOf(String.fromCharCode(o)) >= 0)
|
|
2315
|
+
return !1;
|
|
2316
|
+
if (r) return !0;
|
|
2317
|
+
let a = e, f = !1;
|
|
2318
|
+
for (; a++, !(a >= n || (t = s = A.bMarks[a] + A.tShift[a], i = A.eMarks[a], t < i && A.sCount[a] < A.blkIndent)); )
|
|
2319
|
+
if (A.src.charCodeAt(t) === o && !(A.sCount[a] - A.blkIndent >= 4) && (t = A.skipChars(t, o), !(t - s < c) && (t = A.skipSpaces(t), !(t < i)))) {
|
|
2320
|
+
f = !0;
|
|
2321
|
+
break;
|
|
2322
|
+
}
|
|
2323
|
+
c = A.sCount[e], A.line = a + (f ? 1 : 0);
|
|
2324
|
+
const g = A.push("fence", "code", 0);
|
|
2325
|
+
return g.info = h, g.content = A.getLines(e + 1, a, c, !0), g.markup = l, g.map = [e, A.line], !0;
|
|
2326
|
+
}
|
|
2327
|
+
function tt(A, e, n, r) {
|
|
2328
|
+
let t = A.bMarks[e] + A.tShift[e], i = A.eMarks[e];
|
|
2329
|
+
const o = A.lineMax;
|
|
2330
|
+
if (A.sCount[e] - A.blkIndent >= 4 || A.src.charCodeAt(t) !== 62) return !1;
|
|
2331
|
+
if (r) return !0;
|
|
2332
|
+
const s = [], c = [], l = [], h = [], a = A.md.block.ruler.getRules("blockquote"), f = A.parentType;
|
|
2333
|
+
A.parentType = "blockquote";
|
|
2334
|
+
let g = !1, u;
|
|
2335
|
+
for (u = e; u < n; u++) {
|
|
2336
|
+
const F = A.sCount[u] < A.blkIndent;
|
|
2337
|
+
if (t = A.bMarks[u] + A.tShift[u], i = A.eMarks[u], t >= i) break;
|
|
2338
|
+
if (A.src.charCodeAt(t++) === 62 && !F) {
|
|
2339
|
+
let m = A.sCount[u] + 1, k, _;
|
|
2340
|
+
A.src.charCodeAt(t) === 32 ? (t++, m++, _ = !1, k = !0) : A.src.charCodeAt(t) === 9 ? (k = !0, (A.bsCount[u] + m) % 4 === 3 ? (t++, m++, _ = !1) : _ = !0) : k = !1;
|
|
2341
|
+
let x = m;
|
|
2342
|
+
for (s.push(A.bMarks[u]), A.bMarks[u] = t; t < i; ) {
|
|
2343
|
+
const Z = A.src.charCodeAt(t);
|
|
2344
|
+
if (b(Z)) Z === 9 ? x += 4 - (x + A.bsCount[u] + (_ ? 1 : 0)) % 4 : x++;
|
|
2345
|
+
else break;
|
|
2346
|
+
t++;
|
|
2347
|
+
}
|
|
2348
|
+
g = t >= i, c.push(A.bsCount[u]), A.bsCount[u] = A.sCount[u] + 1 + (k ? 1 : 0), l.push(A.sCount[u]), A.sCount[u] = x - m, h.push(A.tShift[u]), A.tShift[u] = t - A.bMarks[u];
|
|
2349
|
+
continue;
|
|
2350
|
+
}
|
|
2351
|
+
if (g) break;
|
|
2352
|
+
let d = !1;
|
|
2353
|
+
for (let m = 0, k = a.length; m < k; m++) if (a[m](A, u, n, !0)) {
|
|
2354
|
+
d = !0;
|
|
2355
|
+
break;
|
|
2356
|
+
}
|
|
2357
|
+
if (d) {
|
|
2358
|
+
A.lineMax = u, A.blkIndent !== 0 && (s.push(A.bMarks[u]), c.push(A.bsCount[u]), h.push(A.tShift[u]), l.push(A.sCount[u]), A.sCount[u] -= A.blkIndent);
|
|
2359
|
+
break;
|
|
2360
|
+
}
|
|
2361
|
+
s.push(A.bMarks[u]), c.push(A.bsCount[u]), h.push(A.tShift[u]), l.push(A.sCount[u]), A.sCount[u] = -1;
|
|
2362
|
+
}
|
|
2363
|
+
const I = A.blkIndent;
|
|
2364
|
+
A.blkIndent = 0;
|
|
2365
|
+
const p = A.push("blockquote_open", "blockquote", 1);
|
|
2366
|
+
p.markup = ">";
|
|
2367
|
+
const B = [e, 0];
|
|
2368
|
+
p.map = B, A.md.block.tokenize(A, e, u);
|
|
2369
|
+
const D = A.push("blockquote_close", "blockquote", -1);
|
|
2370
|
+
D.markup = ">", A.lineMax = o, A.parentType = f, B[1] = A.line;
|
|
2371
|
+
for (let F = 0; F < h.length; F++)
|
|
2372
|
+
A.bMarks[F + e] = s[F], A.tShift[F + e] = h[F], A.sCount[F + e] = l[F], A.bsCount[F + e] = c[F];
|
|
2373
|
+
return A.blkIndent = I, !0;
|
|
2374
|
+
}
|
|
2375
|
+
function it(A, e, n, r) {
|
|
2376
|
+
const t = A.eMarks[e];
|
|
2377
|
+
if (A.sCount[e] - A.blkIndent >= 4) return !1;
|
|
2378
|
+
let i = A.bMarks[e] + A.tShift[e];
|
|
2379
|
+
const o = A.src.charCodeAt(i++);
|
|
2380
|
+
if (o !== 42 && o !== 45 && o !== 95) return !1;
|
|
2381
|
+
let s = 1;
|
|
2382
|
+
for (; i < t; ) {
|
|
2383
|
+
const l = A.src.charCodeAt(i++);
|
|
2384
|
+
if (l !== o && !b(l)) return !1;
|
|
2385
|
+
l === o && s++;
|
|
2386
|
+
}
|
|
2387
|
+
if (s < 3) return !1;
|
|
2388
|
+
if (r) return !0;
|
|
2389
|
+
A.line = e + 1;
|
|
2390
|
+
const c = A.push("hr", "hr", 0);
|
|
2391
|
+
return c.map = [e, A.line], c.markup = Array(s + 1).join(String.fromCharCode(o)), !0;
|
|
2392
|
+
}
|
|
2393
|
+
function HA(A, e) {
|
|
2394
|
+
const n = A.eMarks[e];
|
|
2395
|
+
let r = A.bMarks[e] + A.tShift[e];
|
|
2396
|
+
const t = A.src.charCodeAt(r++);
|
|
2397
|
+
return t !== 42 && t !== 45 && t !== 43 || r < n && !b(A.src.charCodeAt(r)) ? -1 : r;
|
|
2398
|
+
}
|
|
2399
|
+
function MA(A, e) {
|
|
2400
|
+
const n = A.bMarks[e] + A.tShift[e], r = A.eMarks[e];
|
|
2401
|
+
let t = n;
|
|
2402
|
+
if (t + 1 >= r) return -1;
|
|
2403
|
+
let i = A.src.charCodeAt(t++);
|
|
2404
|
+
if (i < 48 || i > 57) return -1;
|
|
2405
|
+
for (; ; ) {
|
|
2406
|
+
if (t >= r) return -1;
|
|
2407
|
+
if (i = A.src.charCodeAt(t++), i >= 48 && i <= 57) {
|
|
2408
|
+
if (t - n >= 10) return -1;
|
|
2409
|
+
continue;
|
|
2410
|
+
}
|
|
2411
|
+
if (i === 41 || i === 46) break;
|
|
2412
|
+
return -1;
|
|
2413
|
+
}
|
|
2414
|
+
return t < r && (i = A.src.charCodeAt(t), !b(i)) ? -1 : t;
|
|
2415
|
+
}
|
|
2416
|
+
function rt(A, e) {
|
|
2417
|
+
const n = A.level + 2;
|
|
2418
|
+
for (let r = e + 2, t = A.tokens.length - 2; r < t; r++) A.tokens[r].level === n && A.tokens[r].type === "paragraph_open" && (A.tokens[r + 2].hidden = !0, A.tokens[r].hidden = !0, r += 2);
|
|
2419
|
+
}
|
|
2420
|
+
function ot(A, e, n, r) {
|
|
2421
|
+
let t, i, o, s, c = e, l = !0;
|
|
2422
|
+
if (A.sCount[c] - A.blkIndent >= 4 || A.listIndent >= 0 && A.sCount[c] - A.listIndent >= 4 && A.sCount[c] < A.blkIndent) return !1;
|
|
2423
|
+
let h = !1;
|
|
2424
|
+
r && A.parentType === "paragraph" && A.sCount[c] >= A.blkIndent && (h = !0);
|
|
2425
|
+
let a, f, g;
|
|
2426
|
+
if ((g = MA(A, c)) >= 0) {
|
|
2427
|
+
if (a = !0, o = A.bMarks[c] + A.tShift[c], f = Number(A.src.slice(o, g - 1)), h && f !== 1) return !1;
|
|
2428
|
+
} else if ((g = HA(A, c)) >= 0) a = !1;
|
|
2429
|
+
else return !1;
|
|
2430
|
+
if (h && A.skipSpaces(g) >= A.eMarks[c])
|
|
2431
|
+
return !1;
|
|
2432
|
+
if (r) return !0;
|
|
2433
|
+
const u = A.src.charCodeAt(g - 1), I = A.tokens.length;
|
|
2434
|
+
a ? (s = A.push("ordered_list_open", "ol", 1), f !== 1 && (s.attrs = [["start", f]])) : s = A.push("bullet_list_open", "ul", 1);
|
|
2435
|
+
const p = [c, 0];
|
|
2436
|
+
s.map = p, s.markup = String.fromCharCode(u);
|
|
2437
|
+
let B = !1;
|
|
2438
|
+
const D = A.md.block.ruler.getRules("list"), F = A.parentType;
|
|
2439
|
+
for (A.parentType = "list"; c < n; ) {
|
|
2440
|
+
i = g, t = A.eMarks[c];
|
|
2441
|
+
const d = A.sCount[c] + g - (A.bMarks[c] + A.tShift[c]);
|
|
2442
|
+
let m = d;
|
|
2443
|
+
for (; i < t; ) {
|
|
2444
|
+
const v = A.src.charCodeAt(i);
|
|
2445
|
+
if (v === 9) m += 4 - (m + A.bsCount[c]) % 4;
|
|
2446
|
+
else if (v === 32) m++;
|
|
2447
|
+
else break;
|
|
2448
|
+
i++;
|
|
2449
|
+
}
|
|
2450
|
+
const k = i;
|
|
2451
|
+
let _;
|
|
2452
|
+
k >= t ? _ = 1 : _ = m - d, _ > 4 && (_ = 1);
|
|
2453
|
+
const x = d + _;
|
|
2454
|
+
s = A.push("list_item_open", "li", 1), s.markup = String.fromCharCode(u);
|
|
2455
|
+
const Z = [c, 0];
|
|
2456
|
+
s.map = Z, a && (s.info = A.src.slice(o, g - 1));
|
|
2457
|
+
const oA = A.tight, AA = A.tShift[c], X = A.sCount[c], sA = A.listIndent;
|
|
2458
|
+
if (A.listIndent = A.blkIndent, A.blkIndent = x, A.tight = !0, A.tShift[c] = k - A.bMarks[c], A.sCount[c] = m, k >= t && A.isEmpty(c + 1) ? A.line = Math.min(A.line + 2, n) : A.md.block.tokenize(A, c, n), (!A.tight || B) && (l = !1), B = A.line - c > 1 && A.isEmpty(A.line - 1), A.blkIndent = A.listIndent, A.listIndent = sA, A.tShift[c] = AA, A.sCount[c] = X, A.tight = oA, s = A.push("list_item_close", "li", -1), s.markup = String.fromCharCode(u), c = A.line, Z[1] = c, c >= n || A.sCount[c] < A.blkIndent || A.sCount[c] - A.blkIndent >= 4) break;
|
|
2459
|
+
let BA = !1;
|
|
2460
|
+
for (let v = 0, Fe = D.length; v < Fe; v++) if (D[v](A, c, n, !0)) {
|
|
2461
|
+
BA = !0;
|
|
2462
|
+
break;
|
|
2463
|
+
}
|
|
2464
|
+
if (BA) break;
|
|
2465
|
+
if (a) {
|
|
2466
|
+
if (g = MA(A, c), g < 0) break;
|
|
2467
|
+
o = A.bMarks[c] + A.tShift[c];
|
|
2468
|
+
} else if (g = HA(A, c), g < 0) break;
|
|
2469
|
+
if (u !== A.src.charCodeAt(g - 1)) break;
|
|
2470
|
+
}
|
|
2471
|
+
return a ? s = A.push("ordered_list_close", "ol", -1) : s = A.push("bullet_list_close", "ul", -1), s.markup = String.fromCharCode(u), p[1] = c, A.line = c, A.parentType = F, l && rt(A, I), !0;
|
|
2472
|
+
}
|
|
2473
|
+
function st(A, e, n, r) {
|
|
2474
|
+
let t = A.bMarks[e] + A.tShift[e], i = A.eMarks[e], o = e + 1;
|
|
2475
|
+
if (A.sCount[e] - A.blkIndent >= 4 || A.src.charCodeAt(t) !== 91) return !1;
|
|
2476
|
+
function s(d) {
|
|
2477
|
+
const m = A.lineMax;
|
|
2478
|
+
if (d >= m || A.isEmpty(d)) return null;
|
|
2479
|
+
let k = !1;
|
|
2480
|
+
if (A.sCount[d] - A.blkIndent > 3 && (k = !0), A.sCount[d] < 0 && (k = !0), !k) {
|
|
2481
|
+
const Z = A.md.block.ruler.getRules("reference"), oA = A.parentType;
|
|
2482
|
+
A.parentType = "reference";
|
|
2483
|
+
let AA = !1;
|
|
2484
|
+
for (let X = 0, sA = Z.length; X < sA; X++) if (Z[X](A, d, m, !0)) {
|
|
2485
|
+
AA = !0;
|
|
2486
|
+
break;
|
|
2487
|
+
}
|
|
2488
|
+
if (A.parentType = oA, AA) return null;
|
|
2489
|
+
}
|
|
2490
|
+
const _ = A.bMarks[d] + A.tShift[d], x = A.eMarks[d];
|
|
2491
|
+
return A.src.slice(_, x + 1);
|
|
2492
|
+
}
|
|
2493
|
+
let c = A.src.slice(t, i + 1);
|
|
2494
|
+
i = c.length;
|
|
2495
|
+
let l = -1;
|
|
2496
|
+
for (t = 1; t < i; t++) {
|
|
2497
|
+
const d = c.charCodeAt(t);
|
|
2498
|
+
if (d === 91) return !1;
|
|
2499
|
+
if (d === 93) {
|
|
2500
|
+
l = t;
|
|
2501
|
+
break;
|
|
2502
|
+
} else if (d === 10) {
|
|
2503
|
+
const m = s(o);
|
|
2504
|
+
m !== null && (c += m, i = c.length, o++);
|
|
2505
|
+
} else if (d === 92 && (t++, t < i && c.charCodeAt(t) === 10)) {
|
|
2506
|
+
const m = s(o);
|
|
2507
|
+
m !== null && (c += m, i = c.length, o++);
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
if (l < 0 || c.charCodeAt(l + 1) !== 58) return !1;
|
|
2511
|
+
for (t = l + 2; t < i; t++) {
|
|
2512
|
+
const d = c.charCodeAt(t);
|
|
2513
|
+
if (d === 10) {
|
|
2514
|
+
const m = s(o);
|
|
2515
|
+
m !== null && (c += m, i = c.length, o++);
|
|
2516
|
+
} else if (!b(d)) break;
|
|
2517
|
+
}
|
|
2518
|
+
const h = A.md.helpers.parseLinkDestination(c, t, i);
|
|
2519
|
+
if (!h.ok) return !1;
|
|
2520
|
+
const a = A.md.normalizeLink(h.str);
|
|
2521
|
+
if (!A.md.validateLink(a)) return !1;
|
|
2522
|
+
t = h.pos;
|
|
2523
|
+
const f = t, g = o, u = t;
|
|
2524
|
+
for (; t < i; t++) {
|
|
2525
|
+
const d = c.charCodeAt(t);
|
|
2526
|
+
if (d === 10) {
|
|
2527
|
+
const m = s(o);
|
|
2528
|
+
m !== null && (c += m, i = c.length, o++);
|
|
2529
|
+
} else if (!b(d)) break;
|
|
2530
|
+
}
|
|
2531
|
+
let I = A.md.helpers.parseLinkTitle(c, t, i);
|
|
2532
|
+
for (; I.can_continue; ) {
|
|
2533
|
+
const d = s(o);
|
|
2534
|
+
if (d === null) break;
|
|
2535
|
+
c += d, t = i, i = c.length, o++, I = A.md.helpers.parseLinkTitle(c, t, i, I);
|
|
2536
|
+
}
|
|
2537
|
+
let p;
|
|
2538
|
+
for (t < i && u !== t && I.ok ? (p = I.str, t = I.pos) : (p = "", t = f, o = g); t < i && b(c.charCodeAt(t)); )
|
|
2539
|
+
t++;
|
|
2540
|
+
if (t < i && c.charCodeAt(t) !== 10 && p)
|
|
2541
|
+
for (p = "", t = f, o = g; t < i && b(c.charCodeAt(t)); )
|
|
2542
|
+
t++;
|
|
2543
|
+
if (t < i && c.charCodeAt(t) !== 10) return !1;
|
|
2544
|
+
const B = iA(c.slice(1, l));
|
|
2545
|
+
if (!B) return !1;
|
|
2546
|
+
if (r) return !0;
|
|
2547
|
+
typeof A.env.references > "u" && (A.env.references = {}), typeof A.env.references[B] > "u" && (A.env.references[B] = {
|
|
2548
|
+
title: p,
|
|
2549
|
+
href: a
|
|
2550
|
+
});
|
|
2551
|
+
const D = A.push("reference_definition", "", 0);
|
|
2552
|
+
D.map = [e, o], D.hidden = !0;
|
|
2553
|
+
const F = /* @__PURE__ */ Object.create(null);
|
|
2554
|
+
return F.label = B, D.meta = F, A.line = o, !0;
|
|
2555
|
+
}
|
|
2556
|
+
var ct = [
|
|
2557
|
+
"address",
|
|
2558
|
+
"article",
|
|
2559
|
+
"aside",
|
|
2560
|
+
"base",
|
|
2561
|
+
"basefont",
|
|
2562
|
+
"blockquote",
|
|
2563
|
+
"body",
|
|
2564
|
+
"caption",
|
|
2565
|
+
"center",
|
|
2566
|
+
"col",
|
|
2567
|
+
"colgroup",
|
|
2568
|
+
"dd",
|
|
2569
|
+
"details",
|
|
2570
|
+
"dialog",
|
|
2571
|
+
"dir",
|
|
2572
|
+
"div",
|
|
2573
|
+
"dl",
|
|
2574
|
+
"dt",
|
|
2575
|
+
"fieldset",
|
|
2576
|
+
"figcaption",
|
|
2577
|
+
"figure",
|
|
2578
|
+
"footer",
|
|
2579
|
+
"form",
|
|
2580
|
+
"frame",
|
|
2581
|
+
"frameset",
|
|
2582
|
+
"h1",
|
|
2583
|
+
"h2",
|
|
2584
|
+
"h3",
|
|
2585
|
+
"h4",
|
|
2586
|
+
"h5",
|
|
2587
|
+
"h6",
|
|
2588
|
+
"head",
|
|
2589
|
+
"header",
|
|
2590
|
+
"hr",
|
|
2591
|
+
"html",
|
|
2592
|
+
"iframe",
|
|
2593
|
+
"legend",
|
|
2594
|
+
"li",
|
|
2595
|
+
"link",
|
|
2596
|
+
"main",
|
|
2597
|
+
"menu",
|
|
2598
|
+
"menuitem",
|
|
2599
|
+
"nav",
|
|
2600
|
+
"noframes",
|
|
2601
|
+
"ol",
|
|
2602
|
+
"optgroup",
|
|
2603
|
+
"option",
|
|
2604
|
+
"p",
|
|
2605
|
+
"param",
|
|
2606
|
+
"search",
|
|
2607
|
+
"section",
|
|
2608
|
+
"summary",
|
|
2609
|
+
"table",
|
|
2610
|
+
"tbody",
|
|
2611
|
+
"td",
|
|
2612
|
+
"tfoot",
|
|
2613
|
+
"th",
|
|
2614
|
+
"thead",
|
|
2615
|
+
"title",
|
|
2616
|
+
"tr",
|
|
2617
|
+
"track",
|
|
2618
|
+
"ul"
|
|
2619
|
+
], fe = `<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`, de = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", lt = new RegExp(`^(?:${fe}|${de}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`), ut = new RegExp(`^(?:${fe}|${de})`), H = [
|
|
2620
|
+
[
|
|
2621
|
+
/^<(script|pre|style|textarea)(?=(\s|>|$))/i,
|
|
2622
|
+
/<\/(script|pre|style|textarea)>/i,
|
|
2623
|
+
!0
|
|
2624
|
+
],
|
|
2625
|
+
[
|
|
2626
|
+
/^<!--/,
|
|
2627
|
+
/-->/,
|
|
2628
|
+
!0
|
|
2629
|
+
],
|
|
2630
|
+
[
|
|
2631
|
+
/^<\?/,
|
|
2632
|
+
/\?>/,
|
|
2633
|
+
!0
|
|
2634
|
+
],
|
|
2635
|
+
[
|
|
2636
|
+
/^<![A-Za-z]/,
|
|
2637
|
+
/>/,
|
|
2638
|
+
!0
|
|
2639
|
+
],
|
|
2640
|
+
[
|
|
2641
|
+
/^<!\[CDATA\[/,
|
|
2642
|
+
/\]\]>/,
|
|
2643
|
+
!0
|
|
2644
|
+
],
|
|
2645
|
+
[
|
|
2646
|
+
new RegExp(`^</?(${ct.join("|")})(?=(\\s|/?>|$))`, "i"),
|
|
2647
|
+
/^$/,
|
|
2648
|
+
!0
|
|
2649
|
+
],
|
|
2650
|
+
[
|
|
2651
|
+
new RegExp(`${ut.source}\\s*$`),
|
|
2652
|
+
/^$/,
|
|
2653
|
+
!1
|
|
2654
|
+
]
|
|
2655
|
+
];
|
|
2656
|
+
function ht(A, e, n, r) {
|
|
2657
|
+
let t = A.bMarks[e] + A.tShift[e], i = A.eMarks[e];
|
|
2658
|
+
if (A.sCount[e] - A.blkIndent >= 4 || !A.md.options.html || A.src.charCodeAt(t) !== 60) return !1;
|
|
2659
|
+
let o = A.src.slice(t, i), s = 0;
|
|
2660
|
+
for (; s < H.length && !H[s][0].test(o); s++) ;
|
|
2661
|
+
if (s === H.length) return !1;
|
|
2662
|
+
if (r) return H[s][2];
|
|
2663
|
+
let c = e + 1;
|
|
2664
|
+
const l = H[s][1].test("");
|
|
2665
|
+
if (!H[s][1].test(o)) {
|
|
2666
|
+
for (; c < n && !(A.sCount[c] < A.blkIndent && (l || !A.isEmpty(c))); c++)
|
|
2667
|
+
if (t = A.bMarks[c] + A.tShift[c], i = A.eMarks[c], o = A.src.slice(t, i), H[s][1].test(o)) {
|
|
2668
|
+
o.length !== 0 && c++;
|
|
2669
|
+
break;
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
A.line = c;
|
|
2673
|
+
const h = A.push("html_block", "", 0);
|
|
2674
|
+
return h.map = [e, c], h.content = A.getLines(e, c, A.blkIndent, !0), !0;
|
|
2675
|
+
}
|
|
2676
|
+
function at(A, e, n, r) {
|
|
2677
|
+
let t = A.bMarks[e] + A.tShift[e], i = A.eMarks[e];
|
|
2678
|
+
if (A.sCount[e] - A.blkIndent >= 4) return !1;
|
|
2679
|
+
let o = A.src.charCodeAt(t);
|
|
2680
|
+
if (o !== 35 || t >= i) return !1;
|
|
2681
|
+
let s = 1;
|
|
2682
|
+
for (o = A.src.charCodeAt(++t); o === 35 && t < i && s <= 6; )
|
|
2683
|
+
s++, o = A.src.charCodeAt(++t);
|
|
2684
|
+
if (s > 6 || t < i && !b(o)) return !1;
|
|
2685
|
+
if (r) return !0;
|
|
2686
|
+
i = A.skipSpacesBack(i, t);
|
|
2687
|
+
const c = A.skipCharsBack(i, 35, t);
|
|
2688
|
+
c > t && b(A.src.charCodeAt(c - 1)) && (i = c), A.line = e + 1;
|
|
2689
|
+
const l = A.push("heading_open", `h${s}`, 1);
|
|
2690
|
+
l.markup = "########".slice(0, s), l.map = [e, A.line];
|
|
2691
|
+
const h = A.push("inline", "", 0);
|
|
2692
|
+
h.content = rA(A.src.slice(t, i)), h.map = [e, A.line], h.children = [];
|
|
2693
|
+
const a = A.push("heading_close", `h${s}`, -1);
|
|
2694
|
+
return a.markup = "########".slice(0, s), !0;
|
|
2695
|
+
}
|
|
2696
|
+
function gt(A, e, n) {
|
|
2697
|
+
const r = A.md.block.ruler.getRules("paragraph");
|
|
2698
|
+
if (A.sCount[e] - A.blkIndent >= 4) return !1;
|
|
2699
|
+
const t = A.parentType;
|
|
2700
|
+
A.parentType = "paragraph";
|
|
2701
|
+
let i = 0, o, s = e + 1;
|
|
2702
|
+
for (; s < n && !A.isEmpty(s); s++) {
|
|
2703
|
+
if (A.sCount[s] - A.blkIndent > 3) continue;
|
|
2704
|
+
if (A.sCount[s] >= A.blkIndent) {
|
|
2705
|
+
let g = A.bMarks[s] + A.tShift[s];
|
|
2706
|
+
const u = A.eMarks[s];
|
|
2707
|
+
if (g < u && (o = A.src.charCodeAt(g), (o === 45 || o === 61) && (g = A.skipChars(g, o), g = A.skipSpaces(g), g >= u))) {
|
|
2708
|
+
i = o === 61 ? 1 : 2;
|
|
2709
|
+
break;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
if (A.sCount[s] < 0) continue;
|
|
2713
|
+
let f = !1;
|
|
2714
|
+
for (let g = 0, u = r.length; g < u; g++) if (r[g](A, s, n, !0)) {
|
|
2715
|
+
f = !0;
|
|
2716
|
+
break;
|
|
2717
|
+
}
|
|
2718
|
+
if (f) break;
|
|
2719
|
+
}
|
|
2720
|
+
if (!i)
|
|
2721
|
+
return A.parentType = t, !1;
|
|
2722
|
+
const c = rA(A.getLines(e, s, A.blkIndent, !1));
|
|
2723
|
+
A.line = s + 1;
|
|
2724
|
+
const l = A.push("heading_open", `h${i}`, 1);
|
|
2725
|
+
l.markup = String.fromCharCode(o), l.map = [e, A.line];
|
|
2726
|
+
const h = A.push("inline", "", 0);
|
|
2727
|
+
h.content = c, h.map = [e, A.line - 1], h.children = [];
|
|
2728
|
+
const a = A.push("heading_close", `h${i}`, -1);
|
|
2729
|
+
return a.markup = String.fromCharCode(o), A.parentType = t, !0;
|
|
2730
|
+
}
|
|
2731
|
+
function ft(A, e, n) {
|
|
2732
|
+
const r = A.md.block.ruler.getRules("paragraph"), t = A.parentType;
|
|
2733
|
+
let i = e + 1;
|
|
2734
|
+
for (A.parentType = "paragraph"; i < n && !A.isEmpty(i); i++) {
|
|
2735
|
+
if (A.sCount[i] - A.blkIndent > 3 || A.sCount[i] < 0) continue;
|
|
2736
|
+
let l = !1;
|
|
2737
|
+
for (let h = 0, a = r.length; h < a; h++) if (r[h](A, i, n, !0)) {
|
|
2738
|
+
l = !0;
|
|
2739
|
+
break;
|
|
2740
|
+
}
|
|
2741
|
+
if (l) break;
|
|
2742
|
+
}
|
|
2743
|
+
const o = rA(A.getLines(e, i, A.blkIndent, !1));
|
|
2744
|
+
A.line = i;
|
|
2745
|
+
const s = A.push("paragraph_open", "p", 1);
|
|
2746
|
+
s.map = [e, A.line];
|
|
2747
|
+
const c = A.push("inline", "", 0);
|
|
2748
|
+
return c.content = o, c.map = [e, A.line], c.children = [], A.push("paragraph_close", "p", -1), A.parentType = t, !0;
|
|
2749
|
+
}
|
|
2750
|
+
var nA = [
|
|
2751
|
+
[
|
|
2752
|
+
"table",
|
|
2753
|
+
At,
|
|
2754
|
+
["paragraph", "reference"]
|
|
2755
|
+
],
|
|
2756
|
+
["code", et],
|
|
2757
|
+
[
|
|
2758
|
+
"fence",
|
|
2759
|
+
nt,
|
|
2760
|
+
[
|
|
2761
|
+
"paragraph",
|
|
2762
|
+
"reference",
|
|
2763
|
+
"blockquote",
|
|
2764
|
+
"list"
|
|
2765
|
+
]
|
|
2766
|
+
],
|
|
2767
|
+
[
|
|
2768
|
+
"blockquote",
|
|
2769
|
+
tt,
|
|
2770
|
+
[
|
|
2771
|
+
"paragraph",
|
|
2772
|
+
"reference",
|
|
2773
|
+
"blockquote",
|
|
2774
|
+
"list"
|
|
2775
|
+
]
|
|
2776
|
+
],
|
|
2777
|
+
[
|
|
2778
|
+
"hr",
|
|
2779
|
+
it,
|
|
2780
|
+
[
|
|
2781
|
+
"paragraph",
|
|
2782
|
+
"reference",
|
|
2783
|
+
"blockquote",
|
|
2784
|
+
"list"
|
|
2785
|
+
]
|
|
2786
|
+
],
|
|
2787
|
+
[
|
|
2788
|
+
"list",
|
|
2789
|
+
ot,
|
|
2790
|
+
[
|
|
2791
|
+
"paragraph",
|
|
2792
|
+
"reference",
|
|
2793
|
+
"blockquote"
|
|
2794
|
+
]
|
|
2795
|
+
],
|
|
2796
|
+
["reference", st],
|
|
2797
|
+
[
|
|
2798
|
+
"html_block",
|
|
2799
|
+
ht,
|
|
2800
|
+
[
|
|
2801
|
+
"paragraph",
|
|
2802
|
+
"reference",
|
|
2803
|
+
"blockquote"
|
|
2804
|
+
]
|
|
2805
|
+
],
|
|
2806
|
+
[
|
|
2807
|
+
"heading",
|
|
2808
|
+
at,
|
|
2809
|
+
[
|
|
2810
|
+
"paragraph",
|
|
2811
|
+
"reference",
|
|
2812
|
+
"blockquote"
|
|
2813
|
+
]
|
|
2814
|
+
],
|
|
2815
|
+
["lheading", gt],
|
|
2816
|
+
["paragraph", ft]
|
|
2817
|
+
], Ce = class {
|
|
2818
|
+
constructor() {
|
|
2819
|
+
C(
|
|
2820
|
+
this,
|
|
2821
|
+
/**
|
|
2822
|
+
* {@link Ruler} instance. Keep configuration of block rules.
|
|
2823
|
+
*/
|
|
2824
|
+
"ruler",
|
|
2825
|
+
new q()
|
|
2826
|
+
), C(this, "State", ge);
|
|
2827
|
+
for (let A = 0; A < nA.length; A++) this.ruler.push(nA[A][0], nA[A][1], { alt: (nA[A][2] || []).slice() });
|
|
2828
|
+
}
|
|
2829
|
+
tokenize(A, e, n) {
|
|
2830
|
+
const r = this.ruler.getRules(""), t = r.length, i = A.md.options.maxNesting;
|
|
2831
|
+
let o = e, s = !1;
|
|
2832
|
+
for (; o < n && (A.line = o = A.skipEmptyLines(o), !(o >= n || A.sCount[o] < A.blkIndent)); ) {
|
|
2833
|
+
if (A.level >= i) {
|
|
2834
|
+
A.line = n;
|
|
2835
|
+
break;
|
|
2836
|
+
}
|
|
2837
|
+
const c = A.line;
|
|
2838
|
+
let l = !1;
|
|
2839
|
+
for (let h = 0; h < t; h++)
|
|
2840
|
+
if (l = r[h](A, o, n, !1), l) {
|
|
2841
|
+
if (c >= A.line) throw new Error("block rule didn't increment state.line");
|
|
2842
|
+
break;
|
|
2843
|
+
}
|
|
2844
|
+
if (!l) throw new Error("none of the block rules matched");
|
|
2845
|
+
A.tight = !s, A.isEmpty(A.line - 1) && (s = !0), o = A.line, o < n && A.isEmpty(o) && (s = !0, o++, A.line = o);
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
/**
|
|
2849
|
+
* Process input string and push block tokens into `outTokens`
|
|
2850
|
+
*/
|
|
2851
|
+
parse(A, e, n, r) {
|
|
2852
|
+
if (!A) return;
|
|
2853
|
+
const t = new this.State(A, e, n, r);
|
|
2854
|
+
this.tokenize(t, t.line, t.lineMax);
|
|
2855
|
+
}
|
|
2856
|
+
}, pe = class {
|
|
2857
|
+
constructor(A, e, n, r) {
|
|
2858
|
+
C(this, "pos", 0), C(this, "level", 0), C(this, "pending", ""), C(this, "pendingLevel", 0), C(this, "cache", {}), C(this, "backticks", {}), C(this, "backticksScanned", !1), C(this, "linkLevel", 0), C(this, "delimiters", []), C(this, "_prev_delimiters", []), C(this, "Token", M), this.src = A, this.env = n, this.md = e, this.tokens = r, this.tokens_meta = Array(r.length), this.posMax = this.src.length;
|
|
2859
|
+
}
|
|
2860
|
+
pushPending() {
|
|
2861
|
+
const A = new M("text", "", 0);
|
|
2862
|
+
return A.content = this.pending, A.level = this.pendingLevel, this.tokens.push(A), this.pending = "", A;
|
|
2863
|
+
}
|
|
2864
|
+
push(A, e, n) {
|
|
2865
|
+
this.pending && this.pushPending();
|
|
2866
|
+
const r = new M(A, e, n);
|
|
2867
|
+
let t;
|
|
2868
|
+
return n < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), r.level = this.level, n > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], t = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(r), this.tokens_meta.push(t), r;
|
|
2869
|
+
}
|
|
2870
|
+
scanDelims(A, e) {
|
|
2871
|
+
const n = this.posMax, r = this.src.charCodeAt(A);
|
|
2872
|
+
let t;
|
|
2873
|
+
if (A === 0) t = 32;
|
|
2874
|
+
else if (A === 1)
|
|
2875
|
+
t = this.src.charCodeAt(0), (t & 63488) === 55296 && (t = 65533);
|
|
2876
|
+
else if (t = this.src.charCodeAt(A - 1), (t & 64512) === 56320) {
|
|
2877
|
+
const u = this.src.charCodeAt(A - 2);
|
|
2878
|
+
t = (u & 64512) === 55296 ? 65536 + (u - 55296 << 10) + (t - 56320) : 65533;
|
|
2879
|
+
} else (t & 64512) === 55296 && (t = 65533);
|
|
2880
|
+
let i = A;
|
|
2881
|
+
for (; i < n && this.src.charCodeAt(i) === r; ) i++;
|
|
2882
|
+
const o = i - A;
|
|
2883
|
+
let s = i < n ? this.src.charCodeAt(i) : 32;
|
|
2884
|
+
if ((s & 64512) === 55296) {
|
|
2885
|
+
const u = this.src.charCodeAt(i + 1);
|
|
2886
|
+
s = (u & 64512) === 56320 ? 65536 + (s - 55296 << 10) + (u - 56320) : 65533;
|
|
2887
|
+
} else (s & 64512) === 56320 && (s = 65533);
|
|
2888
|
+
const c = P(t) || V(t), l = P(s) || V(s), h = j(t), a = j(s), f = !a && (!l || h || c), g = !h && (!c || a || l);
|
|
2889
|
+
return {
|
|
2890
|
+
can_open: f && (e || !g || c),
|
|
2891
|
+
can_close: g && (e || !f || l),
|
|
2892
|
+
length: o
|
|
2893
|
+
};
|
|
2894
|
+
}
|
|
2895
|
+
};
|
|
2896
|
+
function dt(A) {
|
|
2897
|
+
switch (A) {
|
|
2898
|
+
case 10:
|
|
2899
|
+
case 33:
|
|
2900
|
+
case 35:
|
|
2901
|
+
case 36:
|
|
2902
|
+
case 37:
|
|
2903
|
+
case 38:
|
|
2904
|
+
case 42:
|
|
2905
|
+
case 43:
|
|
2906
|
+
case 45:
|
|
2907
|
+
case 58:
|
|
2908
|
+
case 60:
|
|
2909
|
+
case 61:
|
|
2910
|
+
case 62:
|
|
2911
|
+
case 64:
|
|
2912
|
+
case 91:
|
|
2913
|
+
case 92:
|
|
2914
|
+
case 93:
|
|
2915
|
+
case 94:
|
|
2916
|
+
case 95:
|
|
2917
|
+
case 96:
|
|
2918
|
+
case 123:
|
|
2919
|
+
case 125:
|
|
2920
|
+
case 126:
|
|
2921
|
+
return !0;
|
|
2922
|
+
default:
|
|
2923
|
+
return !1;
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
function Ct(A, e) {
|
|
2927
|
+
let n = A.pos;
|
|
2928
|
+
for (; n < A.posMax && !dt(A.src.charCodeAt(n)); ) n++;
|
|
2929
|
+
return n === A.pos ? !1 : (e || (A.pending += A.src.slice(A.pos, n)), A.pos = n, !0);
|
|
2930
|
+
}
|
|
2931
|
+
var pt = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
|
|
2932
|
+
function mt(A, e) {
|
|
2933
|
+
if (!A.md.options.linkify || A.linkLevel > 0) return !1;
|
|
2934
|
+
const n = A.pos, r = A.posMax;
|
|
2935
|
+
if (n + 3 > r || A.src.charCodeAt(n) !== 58 || A.src.charCodeAt(n + 1) !== 47 || A.src.charCodeAt(n + 2) !== 47) return !1;
|
|
2936
|
+
const t = A.pending.match(pt);
|
|
2937
|
+
if (!t) return !1;
|
|
2938
|
+
const i = t[1], o = A.md.linkify.matchAtStart(A.src.slice(n - i.length));
|
|
2939
|
+
if (!o) return !1;
|
|
2940
|
+
let s = o.url;
|
|
2941
|
+
if (s.length <= i.length) return !1;
|
|
2942
|
+
let c = s.length;
|
|
2943
|
+
for (; c > 0 && s.charCodeAt(c - 1) === 42; ) c--;
|
|
2944
|
+
c !== s.length && (s = s.slice(0, c));
|
|
2945
|
+
const l = A.md.normalizeLink(s);
|
|
2946
|
+
if (!A.md.validateLink(l)) return !1;
|
|
2947
|
+
if (!e) {
|
|
2948
|
+
A.pending = A.pending.slice(0, -i.length);
|
|
2949
|
+
const h = A.push("link_open", "a", 1);
|
|
2950
|
+
h.attrs = [["href", l]], h.markup = "linkify", h.info = "auto";
|
|
2951
|
+
const a = A.push("text", "", 0);
|
|
2952
|
+
a.content = A.md.normalizeLinkText(s);
|
|
2953
|
+
const f = A.push("link_close", "a", -1);
|
|
2954
|
+
f.markup = "linkify", f.info = "auto";
|
|
2955
|
+
}
|
|
2956
|
+
return A.pos += s.length - i.length, !0;
|
|
2957
|
+
}
|
|
2958
|
+
function Dt(A, e) {
|
|
2959
|
+
let n = A.pos;
|
|
2960
|
+
if (A.src.charCodeAt(n) !== 10) return !1;
|
|
2961
|
+
const r = A.pending.length - 1, t = A.posMax;
|
|
2962
|
+
if (!e) if (r >= 0 && A.pending.charCodeAt(r) === 32) if (r >= 1 && A.pending.charCodeAt(r - 1) === 32) {
|
|
2963
|
+
let i = r - 1;
|
|
2964
|
+
for (; i >= 1 && A.pending.charCodeAt(i - 1) === 32; ) i--;
|
|
2965
|
+
A.pending = A.pending.slice(0, i), A.push("hardbreak", "br", 0);
|
|
2966
|
+
} else
|
|
2967
|
+
A.pending = A.pending.slice(0, -1), A.push("softbreak", "br", 0);
|
|
2968
|
+
else A.push("softbreak", "br", 0);
|
|
2969
|
+
for (n++; n < t && b(A.src.charCodeAt(n)); ) n++;
|
|
2970
|
+
return A.pos = n, !0;
|
|
2971
|
+
}
|
|
2972
|
+
var FA = [];
|
|
2973
|
+
for (let A = 0; A < 256; A++) FA.push(0);
|
|
2974
|
+
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(A) {
|
|
2975
|
+
FA[A.charCodeAt(0)] = 1;
|
|
2976
|
+
});
|
|
2977
|
+
function It(A, e) {
|
|
2978
|
+
let n = A.pos;
|
|
2979
|
+
const r = A.posMax;
|
|
2980
|
+
if (A.src.charCodeAt(n) !== 92 || (n++, n >= r)) return !1;
|
|
2981
|
+
let t = A.src.charCodeAt(n);
|
|
2982
|
+
if (t === 10) {
|
|
2983
|
+
for (e || A.push("hardbreak", "br", 0), n++; n < r && (t = A.src.charCodeAt(n), !!b(t)); )
|
|
2984
|
+
n++;
|
|
2985
|
+
return A.pos = n, !0;
|
|
2986
|
+
}
|
|
2987
|
+
if (t === 32) {
|
|
2988
|
+
if (!e) {
|
|
2989
|
+
const s = A.push("text_special", "", 0);
|
|
2990
|
+
s.content = "\\", s.markup = "\\", s.info = "escape";
|
|
2991
|
+
}
|
|
2992
|
+
return A.pos = n, !0;
|
|
2993
|
+
}
|
|
2994
|
+
let i = A.src[n];
|
|
2995
|
+
if (t >= 55296 && t <= 56319 && n + 1 < r) {
|
|
2996
|
+
const s = A.src.charCodeAt(n + 1);
|
|
2997
|
+
s >= 56320 && s <= 57343 && (i += A.src[n + 1], n++);
|
|
2998
|
+
}
|
|
2999
|
+
const o = "\\" + i;
|
|
3000
|
+
if (!e) {
|
|
3001
|
+
const s = A.push("text_special", "", 0);
|
|
3002
|
+
t < 256 && FA[t] !== 0 ? s.content = i : s.content = o, s.markup = o, s.info = "escape";
|
|
3003
|
+
}
|
|
3004
|
+
return A.pos = n + 1, !0;
|
|
3005
|
+
}
|
|
3006
|
+
function Ft(A, e) {
|
|
3007
|
+
let n = A.pos;
|
|
3008
|
+
if (A.src.charCodeAt(n) !== 96) return !1;
|
|
3009
|
+
const r = n;
|
|
3010
|
+
n++;
|
|
3011
|
+
const t = A.posMax;
|
|
3012
|
+
for (; n < t && A.src.charCodeAt(n) === 96; ) n++;
|
|
3013
|
+
const i = A.src.slice(r, n), o = i.length;
|
|
3014
|
+
if (A.backticksScanned && (A.backticks[o] || 0) <= r)
|
|
3015
|
+
return e || (A.pending += i), A.pos += o, !0;
|
|
3016
|
+
let s = n, c;
|
|
3017
|
+
for (; (c = A.src.indexOf("`", s)) !== -1; ) {
|
|
3018
|
+
for (s = c + 1; s < t && A.src.charCodeAt(s) === 96; ) s++;
|
|
3019
|
+
const l = s - c;
|
|
3020
|
+
if (l === o) {
|
|
3021
|
+
if (!e) {
|
|
3022
|
+
const h = A.push("code_inline", "code", 0);
|
|
3023
|
+
h.markup = i, h.content = A.src.slice(n, c).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
|
|
3024
|
+
}
|
|
3025
|
+
return A.pos = s, !0;
|
|
3026
|
+
}
|
|
3027
|
+
A.backticks[l] = c;
|
|
3028
|
+
}
|
|
3029
|
+
return A.backticksScanned = !0, e || (A.pending += i), A.pos += o, !0;
|
|
3030
|
+
}
|
|
3031
|
+
function Bt(A, e) {
|
|
3032
|
+
const n = A.pos, r = A.src.charCodeAt(n);
|
|
3033
|
+
if (e || r !== 126) return !1;
|
|
3034
|
+
const t = A.scanDelims(A.pos, !0);
|
|
3035
|
+
let i = t.length;
|
|
3036
|
+
const o = String.fromCharCode(r);
|
|
3037
|
+
if (i < 2) return !1;
|
|
3038
|
+
let s;
|
|
3039
|
+
i % 2 && (s = A.push("text", "", 0), s.content = o, i--);
|
|
3040
|
+
for (let c = 0; c < i; c += 2)
|
|
3041
|
+
s = A.push("text", "", 0), s.content = o + o, A.delimiters.push({
|
|
3042
|
+
marker: r,
|
|
3043
|
+
length: 0,
|
|
3044
|
+
token: A.tokens.length - 1,
|
|
3045
|
+
end: -1,
|
|
3046
|
+
open: t.can_open,
|
|
3047
|
+
close: t.can_close
|
|
3048
|
+
});
|
|
3049
|
+
return A.pos += t.length, !0;
|
|
3050
|
+
}
|
|
3051
|
+
function vA(A, e) {
|
|
3052
|
+
let n;
|
|
3053
|
+
const r = [], t = e.length;
|
|
3054
|
+
for (let i = 0; i < t; i++) {
|
|
3055
|
+
const o = e[i];
|
|
3056
|
+
if (o.marker !== 126 || o.end === -1) continue;
|
|
3057
|
+
const s = e[o.end];
|
|
3058
|
+
n = A.tokens[o.token], n.type = "s_open", n.tag = "s", n.nesting = 1, n.markup = "~~", n.content = "", n = A.tokens[s.token], n.type = "s_close", n.tag = "s", n.nesting = -1, n.markup = "~~", n.content = "", A.tokens[s.token - 1].type === "text" && A.tokens[s.token - 1].content === "~" && r.push(s.token - 1);
|
|
3059
|
+
}
|
|
3060
|
+
for (; r.length; ) {
|
|
3061
|
+
const i = r.pop();
|
|
3062
|
+
let o = i + 1;
|
|
3063
|
+
for (; o < A.tokens.length && A.tokens[o].type === "s_close"; ) o++;
|
|
3064
|
+
o--, i !== o && (n = A.tokens[o], A.tokens[o] = A.tokens[i], A.tokens[i] = n);
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
function kt(A) {
|
|
3068
|
+
const e = A.tokens_meta, n = A.tokens_meta.length;
|
|
3069
|
+
vA(A, A.delimiters);
|
|
3070
|
+
for (let t = 0; t < n; t++) {
|
|
3071
|
+
var r;
|
|
3072
|
+
const i = (r = e[t]) === null || r === void 0 ? void 0 : r.delimiters;
|
|
3073
|
+
i && vA(A, i);
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
var me = {
|
|
3077
|
+
tokenize: Bt,
|
|
3078
|
+
postProcess: kt
|
|
3079
|
+
};
|
|
3080
|
+
function Et(A, e) {
|
|
3081
|
+
const n = A.pos, r = A.src.charCodeAt(n);
|
|
3082
|
+
if (e || r !== 95 && r !== 42) return !1;
|
|
3083
|
+
const t = A.scanDelims(A.pos, r === 42);
|
|
3084
|
+
for (let i = 0; i < t.length; i++) {
|
|
3085
|
+
const o = A.push("text", "", 0);
|
|
3086
|
+
o.content = String.fromCharCode(r), A.delimiters.push({
|
|
3087
|
+
marker: r,
|
|
3088
|
+
length: t.length,
|
|
3089
|
+
token: A.tokens.length - 1,
|
|
3090
|
+
end: -1,
|
|
3091
|
+
open: t.can_open,
|
|
3092
|
+
close: t.can_close
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
return A.pos += t.length, !0;
|
|
3096
|
+
}
|
|
3097
|
+
function NA(A, e) {
|
|
3098
|
+
const n = e.length;
|
|
3099
|
+
for (let r = n - 1; r >= 0; r--) {
|
|
3100
|
+
const t = e[r];
|
|
3101
|
+
if (t.marker !== 95 && t.marker !== 42 || t.end === -1) continue;
|
|
3102
|
+
const i = e[t.end], o = r > 0 && e[r - 1].end === t.end + 1 && e[r - 1].marker === t.marker && e[r - 1].token === t.token - 1 && e[t.end + 1].token === i.token + 1, s = String.fromCharCode(t.marker), c = A.tokens[t.token];
|
|
3103
|
+
c.type = o ? "strong_open" : "em_open", c.tag = o ? "strong" : "em", c.nesting = 1, c.markup = o ? s + s : s, c.content = "";
|
|
3104
|
+
const l = A.tokens[i.token];
|
|
3105
|
+
l.type = o ? "strong_close" : "em_close", l.tag = o ? "strong" : "em", l.nesting = -1, l.markup = o ? s + s : s, l.content = "", o && (A.tokens[e[r - 1].token].content = "", A.tokens[e[t.end + 1].token].content = "", r--);
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
function bt(A) {
|
|
3109
|
+
const e = A.tokens_meta, n = A.tokens_meta.length;
|
|
3110
|
+
NA(A, A.delimiters);
|
|
3111
|
+
for (let t = 0; t < n; t++) {
|
|
3112
|
+
var r;
|
|
3113
|
+
const i = (r = e[t]) === null || r === void 0 ? void 0 : r.delimiters;
|
|
3114
|
+
i && NA(A, i);
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
var De = {
|
|
3118
|
+
tokenize: Et,
|
|
3119
|
+
postProcess: bt
|
|
3120
|
+
};
|
|
3121
|
+
function wt(A, e) {
|
|
3122
|
+
let n, r, t, i, o = "", s = "", c = A.pos, l = !0;
|
|
3123
|
+
if (A.src.charCodeAt(A.pos) !== 91) return !1;
|
|
3124
|
+
const h = A.pos, a = A.posMax, f = A.pos + 1, g = A.md.helpers.parseLinkLabel(A, A.pos, !0);
|
|
3125
|
+
if (g < 0) return !1;
|
|
3126
|
+
let u = g + 1;
|
|
3127
|
+
if (u < a && A.src.charCodeAt(u) === 40) {
|
|
3128
|
+
for (l = !1, u++; u < a && (n = A.src.charCodeAt(u), !(!b(n) && n !== 10)); u++)
|
|
3129
|
+
;
|
|
3130
|
+
if (u >= a) return !1;
|
|
3131
|
+
if (c = u, t = A.md.helpers.parseLinkDestination(A.src, u, A.posMax), t.ok) {
|
|
3132
|
+
for (o = A.md.normalizeLink(t.str), A.md.validateLink(o) ? u = t.pos : o = "", c = u; u < a && (n = A.src.charCodeAt(u), !(!b(n) && n !== 10)); u++)
|
|
3133
|
+
;
|
|
3134
|
+
if (t = A.md.helpers.parseLinkTitle(A.src, u, A.posMax), u < a && c !== u && t.ok)
|
|
3135
|
+
for (s = t.str, u = t.pos; u < a && (n = A.src.charCodeAt(u), !(!b(n) && n !== 10)); u++)
|
|
3136
|
+
;
|
|
3137
|
+
}
|
|
3138
|
+
(u >= a || A.src.charCodeAt(u) !== 41) && (l = !0), u++;
|
|
3139
|
+
}
|
|
3140
|
+
if (l) {
|
|
3141
|
+
if (typeof A.env.references > "u") return !1;
|
|
3142
|
+
if (u < a && A.src.charCodeAt(u) === 91 ? (c = u + 1, u = A.md.helpers.parseLinkLabel(A, u), u >= 0 ? r = A.src.slice(c, u++) : u = g + 1) : u = g + 1, r || (r = A.src.slice(f, g)), r = iA(r), i = A.env.references[r], !i)
|
|
3143
|
+
return A.pos = h, !1;
|
|
3144
|
+
o = i.href, s = i.title;
|
|
3145
|
+
}
|
|
3146
|
+
if (!e) {
|
|
3147
|
+
A.pos = f, A.posMax = g;
|
|
3148
|
+
const I = A.push("link_open", "a", 1), p = [["href", o]];
|
|
3149
|
+
if (I.attrs = p, s && p.push(["title", s]), r) {
|
|
3150
|
+
const B = /* @__PURE__ */ Object.create(null);
|
|
3151
|
+
B.label = r, I.meta = B;
|
|
3152
|
+
}
|
|
3153
|
+
A.linkLevel++, A.md.inline.tokenize(A), A.linkLevel--, A.push("link_close", "a", -1);
|
|
3154
|
+
}
|
|
3155
|
+
return A.pos = u, A.posMax = a, !0;
|
|
3156
|
+
}
|
|
3157
|
+
function _t(A, e) {
|
|
3158
|
+
let n, r, t, i, o, s, c, l, h = "";
|
|
3159
|
+
const a = A.pos, f = A.posMax;
|
|
3160
|
+
if (A.src.charCodeAt(A.pos) !== 33 || A.src.charCodeAt(A.pos + 1) !== 91) return !1;
|
|
3161
|
+
const g = A.pos + 2, u = A.md.helpers.parseLinkLabel(A, A.pos + 1, !1);
|
|
3162
|
+
if (u < 0) return !1;
|
|
3163
|
+
if (i = u + 1, i < f && A.src.charCodeAt(i) === 40) {
|
|
3164
|
+
for (i++; i < f && (n = A.src.charCodeAt(i), !(!b(n) && n !== 10)); i++)
|
|
3165
|
+
;
|
|
3166
|
+
if (i >= f) return !1;
|
|
3167
|
+
for (l = i, s = A.md.helpers.parseLinkDestination(A.src, i, A.posMax), s.ok && (h = A.md.normalizeLink(s.str), A.md.validateLink(h) ? i = s.pos : h = ""), l = i; i < f && (n = A.src.charCodeAt(i), !(!b(n) && n !== 10)); i++)
|
|
3168
|
+
;
|
|
3169
|
+
if (s = A.md.helpers.parseLinkTitle(A.src, i, A.posMax), i < f && l !== i && s.ok)
|
|
3170
|
+
for (c = s.str, i = s.pos; i < f && (n = A.src.charCodeAt(i), !(!b(n) && n !== 10)); i++)
|
|
3171
|
+
;
|
|
3172
|
+
else c = "";
|
|
3173
|
+
if (i >= f || A.src.charCodeAt(i) !== 41)
|
|
3174
|
+
return A.pos = a, !1;
|
|
3175
|
+
i++;
|
|
3176
|
+
} else {
|
|
3177
|
+
if (typeof A.env.references > "u") return !1;
|
|
3178
|
+
if (i < f && A.src.charCodeAt(i) === 91 ? (l = i + 1, i = A.md.helpers.parseLinkLabel(A, i), i >= 0 ? t = A.src.slice(l, i++) : i = u + 1) : i = u + 1, t || (t = A.src.slice(g, u)), t = iA(t), o = A.env.references[t], !o)
|
|
3179
|
+
return A.pos = a, !1;
|
|
3180
|
+
h = o.href, c = o.title;
|
|
3181
|
+
}
|
|
3182
|
+
if (!e) {
|
|
3183
|
+
r = A.src.slice(g, u);
|
|
3184
|
+
const I = [];
|
|
3185
|
+
A.md.inline.parse(r, A.md, A.env, I);
|
|
3186
|
+
const p = A.push("image", "img", 0), B = [["src", h], ["alt", ""]];
|
|
3187
|
+
if (p.attrs = B, p.children = I, p.content = r, c && B.push(["title", c]), t) {
|
|
3188
|
+
const D = /* @__PURE__ */ Object.create(null);
|
|
3189
|
+
D.label = t, p.meta = D;
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
return A.pos = i, A.posMax = f, !0;
|
|
3193
|
+
}
|
|
3194
|
+
var yt = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, Qt = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
|
|
3195
|
+
function xt(A, e) {
|
|
3196
|
+
let n = A.pos;
|
|
3197
|
+
if (A.src.charCodeAt(n) !== 60) return !1;
|
|
3198
|
+
const r = A.pos, t = A.posMax;
|
|
3199
|
+
for (; ; ) {
|
|
3200
|
+
if (++n >= t) return !1;
|
|
3201
|
+
const o = A.src.charCodeAt(n);
|
|
3202
|
+
if (o === 60) return !1;
|
|
3203
|
+
if (o === 62) break;
|
|
3204
|
+
}
|
|
3205
|
+
const i = A.src.slice(r + 1, n);
|
|
3206
|
+
if (Qt.test(i)) {
|
|
3207
|
+
const o = A.md.normalizeLink(i);
|
|
3208
|
+
if (!A.md.validateLink(o)) return !1;
|
|
3209
|
+
if (!e) {
|
|
3210
|
+
const s = A.push("link_open", "a", 1);
|
|
3211
|
+
s.attrs = [["href", o]], s.markup = "autolink", s.info = "auto";
|
|
3212
|
+
const c = A.push("text", "", 0);
|
|
3213
|
+
c.content = A.md.normalizeLinkText(i);
|
|
3214
|
+
const l = A.push("link_close", "a", -1);
|
|
3215
|
+
l.markup = "autolink", l.info = "auto";
|
|
3216
|
+
}
|
|
3217
|
+
return A.pos += i.length + 2, !0;
|
|
3218
|
+
}
|
|
3219
|
+
if (yt.test(i)) {
|
|
3220
|
+
const o = A.md.normalizeLink(`mailto:${i}`);
|
|
3221
|
+
if (!A.md.validateLink(o)) return !1;
|
|
3222
|
+
if (!e) {
|
|
3223
|
+
const s = A.push("link_open", "a", 1);
|
|
3224
|
+
s.attrs = [["href", o]], s.markup = "autolink", s.info = "auto";
|
|
3225
|
+
const c = A.push("text", "", 0);
|
|
3226
|
+
c.content = A.md.normalizeLinkText(i);
|
|
3227
|
+
const l = A.push("link_close", "a", -1);
|
|
3228
|
+
l.markup = "autolink", l.info = "auto";
|
|
3229
|
+
}
|
|
3230
|
+
return A.pos += i.length + 2, !0;
|
|
3231
|
+
}
|
|
3232
|
+
return !1;
|
|
3233
|
+
}
|
|
3234
|
+
function Kt(A) {
|
|
3235
|
+
return /^<a[>\s]/i.test(A);
|
|
3236
|
+
}
|
|
3237
|
+
function Gt(A) {
|
|
3238
|
+
return /^<\/a\s*>/i.test(A);
|
|
3239
|
+
}
|
|
3240
|
+
function Wt(A) {
|
|
3241
|
+
const e = A | 32;
|
|
3242
|
+
return e >= 97 && e <= 122;
|
|
3243
|
+
}
|
|
3244
|
+
function Yt(A, e) {
|
|
3245
|
+
if (!A.md.options.html) return !1;
|
|
3246
|
+
const n = A.posMax, r = A.pos;
|
|
3247
|
+
if (A.src.charCodeAt(r) !== 60 || r + 2 >= n) return !1;
|
|
3248
|
+
const t = A.src.charCodeAt(r + 1);
|
|
3249
|
+
if (t !== 33 && t !== 63 && t !== 47 && !Wt(t)) return !1;
|
|
3250
|
+
const i = A.src.slice(r).match(lt);
|
|
3251
|
+
if (!i) return !1;
|
|
3252
|
+
if (!e) {
|
|
3253
|
+
const o = A.push("html_inline", "", 0);
|
|
3254
|
+
o.content = i[0], Kt(o.content) && A.linkLevel++, Gt(o.content) && A.linkLevel--;
|
|
3255
|
+
}
|
|
3256
|
+
return A.pos += i[0].length, !0;
|
|
3257
|
+
}
|
|
3258
|
+
var Zt = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Jt = /^&([a-z][a-z0-9]{1,31});/i;
|
|
3259
|
+
function Rt(A, e) {
|
|
3260
|
+
const n = A.pos, r = A.posMax;
|
|
3261
|
+
if (A.src.charCodeAt(n) !== 38 || n + 1 >= r) return !1;
|
|
3262
|
+
if (A.src.charCodeAt(n + 1) === 35) {
|
|
3263
|
+
const t = A.src.slice(n).match(Zt);
|
|
3264
|
+
if (t) {
|
|
3265
|
+
if (!e) {
|
|
3266
|
+
const i = t[1][0].toLowerCase() === "x" ? parseInt(t[1].slice(1), 16) : parseInt(t[1], 10), o = A.push("text_special", "", 0);
|
|
3267
|
+
o.content = IA(i) ? L(i) : L(65533), o.markup = t[0], o.info = "entity";
|
|
3268
|
+
}
|
|
3269
|
+
return A.pos += t[0].length, !0;
|
|
3270
|
+
}
|
|
3271
|
+
} else {
|
|
3272
|
+
const t = A.src.slice(n).match(Jt);
|
|
3273
|
+
if (t) {
|
|
3274
|
+
const i = VA(t[0]);
|
|
3275
|
+
if (i !== t[0]) {
|
|
3276
|
+
if (!e) {
|
|
3277
|
+
const o = A.push("text_special", "", 0);
|
|
3278
|
+
o.content = i, o.markup = t[0], o.info = "entity";
|
|
3279
|
+
}
|
|
3280
|
+
return A.pos += t[0].length, !0;
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
return !1;
|
|
3285
|
+
}
|
|
3286
|
+
function UA(A) {
|
|
3287
|
+
const e = {}, n = A.length;
|
|
3288
|
+
if (!n) return;
|
|
3289
|
+
let r = 0, t = -2;
|
|
3290
|
+
const i = [];
|
|
3291
|
+
for (let o = 0; o < n; o++) {
|
|
3292
|
+
const s = A[o];
|
|
3293
|
+
if (i.push(0), (A[r].marker !== s.marker || t !== s.token - 1) && (r = o), t = s.token, s.length = s.length || 0, !s.close) continue;
|
|
3294
|
+
e.hasOwnProperty(s.marker) || (e[s.marker] = [
|
|
3295
|
+
-1,
|
|
3296
|
+
-1,
|
|
3297
|
+
-1,
|
|
3298
|
+
-1,
|
|
3299
|
+
-1,
|
|
3300
|
+
-1
|
|
3301
|
+
]);
|
|
3302
|
+
const c = e[s.marker][(s.open ? 3 : 0) + s.length % 3];
|
|
3303
|
+
let l = r - i[r] - 1, h = l;
|
|
3304
|
+
for (; l > c; l -= i[l] + 1) {
|
|
3305
|
+
const a = A[l];
|
|
3306
|
+
if (a.marker === s.marker && a.open && a.end < 0) {
|
|
3307
|
+
let f = !1;
|
|
3308
|
+
if ((a.close || s.open) && (a.length + s.length) % 3 === 0 && (a.length % 3 !== 0 || s.length % 3 !== 0) && (f = !0), !f) {
|
|
3309
|
+
const g = l > 0 && !A[l - 1].open ? i[l - 1] + 1 : 0;
|
|
3310
|
+
i[o] = o - l + g, i[l] = g, s.open = !1, a.end = o, a.close = !1, h = -1, t = -2;
|
|
3311
|
+
break;
|
|
3312
|
+
}
|
|
3313
|
+
}
|
|
3314
|
+
}
|
|
3315
|
+
h !== -1 && (e[s.marker][(s.open ? 3 : 0) + (s.length || 0) % 3] = h);
|
|
3316
|
+
}
|
|
3317
|
+
}
|
|
3318
|
+
function St(A) {
|
|
3319
|
+
const e = A.tokens_meta, n = A.tokens_meta.length;
|
|
3320
|
+
UA(A.delimiters);
|
|
3321
|
+
for (let t = 0; t < n; t++) {
|
|
3322
|
+
var r;
|
|
3323
|
+
const i = (r = e[t]) === null || r === void 0 ? void 0 : r.delimiters;
|
|
3324
|
+
i && UA(i);
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
function Ht(A) {
|
|
3328
|
+
let e, n, r = 0;
|
|
3329
|
+
const t = A.tokens, i = A.tokens.length;
|
|
3330
|
+
for (e = n = 0; e < i; e++)
|
|
3331
|
+
t[e].nesting < 0 && r--, t[e].level = r, t[e].nesting > 0 && r++, t[e].type === "text" && e + 1 < i && t[e + 1].type === "text" ? t[e + 1].content = t[e].content + t[e + 1].content : (e !== n && (t[n] = t[e]), n++);
|
|
3332
|
+
e !== n && (t.length = n);
|
|
3333
|
+
}
|
|
3334
|
+
var gA = [
|
|
3335
|
+
["text", Ct],
|
|
3336
|
+
["linkify", mt],
|
|
3337
|
+
["newline", Dt],
|
|
3338
|
+
["escape", It],
|
|
3339
|
+
["backticks", Ft],
|
|
3340
|
+
["strikethrough", me.tokenize],
|
|
3341
|
+
["emphasis", De.tokenize],
|
|
3342
|
+
["link", wt],
|
|
3343
|
+
["image", _t],
|
|
3344
|
+
["autolink", xt],
|
|
3345
|
+
["html_inline", Yt],
|
|
3346
|
+
["entity", Rt]
|
|
3347
|
+
], fA = [
|
|
3348
|
+
["balance_pairs", St],
|
|
3349
|
+
["strikethrough", me.postProcess],
|
|
3350
|
+
["emphasis", De.postProcess],
|
|
3351
|
+
["fragments_join", Ht]
|
|
3352
|
+
], Ie = class {
|
|
3353
|
+
constructor() {
|
|
3354
|
+
C(
|
|
3355
|
+
this,
|
|
3356
|
+
/**
|
|
3357
|
+
* {@link Ruler} instance. Keep configuration of inline rules.
|
|
3358
|
+
*/
|
|
3359
|
+
"ruler",
|
|
3360
|
+
new q()
|
|
3361
|
+
), C(
|
|
3362
|
+
this,
|
|
3363
|
+
/**
|
|
3364
|
+
* {@link Ruler} instance. Second ruler used for post-processing
|
|
3365
|
+
* (e.g. in emphasis-like rules).
|
|
3366
|
+
*/
|
|
3367
|
+
"ruler2",
|
|
3368
|
+
new q()
|
|
3369
|
+
), C(this, "State", pe);
|
|
3370
|
+
for (let A = 0; A < gA.length; A++) this.ruler.push(gA[A][0], gA[A][1]);
|
|
3371
|
+
for (let A = 0; A < fA.length; A++) this.ruler2.push(fA[A][0], fA[A][1]);
|
|
3372
|
+
}
|
|
3373
|
+
skipToken(A) {
|
|
3374
|
+
const e = A.pos, n = this.ruler.getRules(""), r = n.length, t = A.md.options.maxNesting, i = A.cache;
|
|
3375
|
+
if (typeof i[e] < "u") {
|
|
3376
|
+
A.pos = i[e];
|
|
3377
|
+
return;
|
|
3378
|
+
}
|
|
3379
|
+
let o = !1;
|
|
3380
|
+
if (A.level < t) {
|
|
3381
|
+
for (let s = 0; s < r; s++)
|
|
3382
|
+
if (A.level++, o = n[s](A, !0), A.level--, o) {
|
|
3383
|
+
if (e >= A.pos) throw new Error("inline rule didn't increment state.pos");
|
|
3384
|
+
break;
|
|
3385
|
+
}
|
|
3386
|
+
} else A.pos = A.posMax;
|
|
3387
|
+
o || A.pos++, i[e] = A.pos;
|
|
3388
|
+
}
|
|
3389
|
+
tokenize(A) {
|
|
3390
|
+
const e = this.ruler.getRules(""), n = e.length, r = A.posMax, t = A.md.options.maxNesting;
|
|
3391
|
+
for (; A.pos < r; ) {
|
|
3392
|
+
const i = A.pos;
|
|
3393
|
+
let o = !1;
|
|
3394
|
+
if (A.level < t) {
|
|
3395
|
+
for (let s = 0; s < n; s++)
|
|
3396
|
+
if (o = e[s](A, !1), o) {
|
|
3397
|
+
if (i >= A.pos) throw new Error("inline rule didn't increment state.pos");
|
|
3398
|
+
break;
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
if (o) {
|
|
3402
|
+
if (A.pos >= r) break;
|
|
3403
|
+
continue;
|
|
3404
|
+
}
|
|
3405
|
+
A.pending += A.src[A.pos++];
|
|
3406
|
+
}
|
|
3407
|
+
A.pending && A.pushPending();
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* Process input string and push inline tokens into `outTokens`
|
|
3411
|
+
*/
|
|
3412
|
+
parse(A, e, n, r) {
|
|
3413
|
+
const t = new this.State(A, e, n, r);
|
|
3414
|
+
this.tokenize(t);
|
|
3415
|
+
const i = this.ruler2.getRules(""), o = i.length;
|
|
3416
|
+
for (let s = 0; s < o; s++) i[s](t);
|
|
3417
|
+
}
|
|
3418
|
+
}, Mt = {
|
|
3419
|
+
default: {
|
|
3420
|
+
options: {
|
|
3421
|
+
html: !1,
|
|
3422
|
+
xhtmlOut: !1,
|
|
3423
|
+
breaks: !1,
|
|
3424
|
+
langPrefix: "language-",
|
|
3425
|
+
linkify: !1,
|
|
3426
|
+
typographer: !1,
|
|
3427
|
+
quotes: "“”‘’",
|
|
3428
|
+
highlight: null,
|
|
3429
|
+
maxNesting: 100
|
|
3430
|
+
},
|
|
3431
|
+
components: {
|
|
3432
|
+
core: {},
|
|
3433
|
+
block: {},
|
|
3434
|
+
inline: {}
|
|
3435
|
+
}
|
|
3436
|
+
},
|
|
3437
|
+
zero: {
|
|
3438
|
+
options: {
|
|
3439
|
+
html: !1,
|
|
3440
|
+
xhtmlOut: !1,
|
|
3441
|
+
breaks: !1,
|
|
3442
|
+
langPrefix: "language-",
|
|
3443
|
+
linkify: !1,
|
|
3444
|
+
typographer: !1,
|
|
3445
|
+
quotes: "“”‘’",
|
|
3446
|
+
highlight: null,
|
|
3447
|
+
maxNesting: 20
|
|
3448
|
+
},
|
|
3449
|
+
components: {
|
|
3450
|
+
core: { rules: [
|
|
3451
|
+
"normalize",
|
|
3452
|
+
"block",
|
|
3453
|
+
"strip_references",
|
|
3454
|
+
"inline",
|
|
3455
|
+
"text_join"
|
|
3456
|
+
] },
|
|
3457
|
+
block: { rules: ["paragraph"] },
|
|
3458
|
+
inline: {
|
|
3459
|
+
rules: ["text"],
|
|
3460
|
+
rules2: ["balance_pairs", "fragments_join"]
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
},
|
|
3464
|
+
commonmark: {
|
|
3465
|
+
options: {
|
|
3466
|
+
html: !0,
|
|
3467
|
+
xhtmlOut: !0,
|
|
3468
|
+
breaks: !1,
|
|
3469
|
+
langPrefix: "language-",
|
|
3470
|
+
linkify: !1,
|
|
3471
|
+
typographer: !1,
|
|
3472
|
+
quotes: "“”‘’",
|
|
3473
|
+
highlight: null,
|
|
3474
|
+
maxNesting: 20
|
|
3475
|
+
},
|
|
3476
|
+
components: {
|
|
3477
|
+
core: { rules: [
|
|
3478
|
+
"normalize",
|
|
3479
|
+
"block",
|
|
3480
|
+
"strip_references",
|
|
3481
|
+
"inline",
|
|
3482
|
+
"text_join"
|
|
3483
|
+
] },
|
|
3484
|
+
block: { rules: [
|
|
3485
|
+
"blockquote",
|
|
3486
|
+
"code",
|
|
3487
|
+
"fence",
|
|
3488
|
+
"heading",
|
|
3489
|
+
"hr",
|
|
3490
|
+
"html_block",
|
|
3491
|
+
"lheading",
|
|
3492
|
+
"list",
|
|
3493
|
+
"reference",
|
|
3494
|
+
"paragraph"
|
|
3495
|
+
] },
|
|
3496
|
+
inline: {
|
|
3497
|
+
rules: [
|
|
3498
|
+
"autolink",
|
|
3499
|
+
"backticks",
|
|
3500
|
+
"emphasis",
|
|
3501
|
+
"entity",
|
|
3502
|
+
"escape",
|
|
3503
|
+
"html_inline",
|
|
3504
|
+
"image",
|
|
3505
|
+
"link",
|
|
3506
|
+
"newline",
|
|
3507
|
+
"text"
|
|
3508
|
+
],
|
|
3509
|
+
rules2: [
|
|
3510
|
+
"balance_pairs",
|
|
3511
|
+
"emphasis",
|
|
3512
|
+
"fragments_join"
|
|
3513
|
+
]
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
}, vt = /^(vbscript|javascript|file|data):/, Nt = /^data:image\/(gif|png|jpeg|webp);/, OA = [
|
|
3518
|
+
"http:",
|
|
3519
|
+
"https:",
|
|
3520
|
+
"mailto:"
|
|
3521
|
+
], Y = class {
|
|
3522
|
+
/**
|
|
3523
|
+
* Link validation function. CommonMark allows too much in links. By default
|
|
3524
|
+
* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
|
|
3525
|
+
* except some embedded image types.
|
|
3526
|
+
*
|
|
3527
|
+
* You can change this behaviour:
|
|
3528
|
+
*
|
|
3529
|
+
* @example
|
|
3530
|
+
* ```javascript
|
|
3531
|
+
* import MarkdownIt from 'markdown-it'
|
|
3532
|
+
* const md = new MarkdownIt()
|
|
3533
|
+
*
|
|
3534
|
+
* // enable everything
|
|
3535
|
+
* md.validateLink = function () { return true; }
|
|
3536
|
+
* ```
|
|
3537
|
+
*/
|
|
3538
|
+
validateLink(A) {
|
|
3539
|
+
const e = A.trim().toLowerCase();
|
|
3540
|
+
return vt.test(e) ? Nt.test(e) : !0;
|
|
3541
|
+
}
|
|
3542
|
+
/**
|
|
3543
|
+
* Function used to encode link url to a machine-readable format,
|
|
3544
|
+
* which includes url-encoding, punycode, etc.
|
|
3545
|
+
*/
|
|
3546
|
+
normalizeLink(A) {
|
|
3547
|
+
const e = CA(A, !0);
|
|
3548
|
+
if (e.hostname && (!e.protocol || OA.indexOf(e.protocol) >= 0))
|
|
3549
|
+
try {
|
|
3550
|
+
e.hostname = WA.toASCII(e.hostname);
|
|
3551
|
+
} catch {
|
|
3552
|
+
}
|
|
3553
|
+
return $(dA(e));
|
|
3554
|
+
}
|
|
3555
|
+
/**
|
|
3556
|
+
* Function used to decode link url to a human-readable format`
|
|
3557
|
+
*/
|
|
3558
|
+
normalizeLinkText(A) {
|
|
3559
|
+
const e = CA(A, !0);
|
|
3560
|
+
if (e.hostname && (!e.protocol || OA.indexOf(e.protocol) >= 0))
|
|
3561
|
+
try {
|
|
3562
|
+
e.hostname = WA.toUnicode(e.hostname);
|
|
3563
|
+
} catch {
|
|
3564
|
+
}
|
|
3565
|
+
return U(dA(e), U.defaultChars + "%");
|
|
3566
|
+
}
|
|
3567
|
+
constructor(...A) {
|
|
3568
|
+
C(
|
|
3569
|
+
this,
|
|
3570
|
+
/**
|
|
3571
|
+
* Instance of {@link ParserInline}. You may need it to add new rules when
|
|
3572
|
+
* writing plugins. For simple rules control use {@link MarkdownIt.disable}
|
|
3573
|
+
* and {@link MarkdownIt.enable}.
|
|
3574
|
+
*/
|
|
3575
|
+
"inline",
|
|
3576
|
+
new Ie()
|
|
3577
|
+
), C(
|
|
3578
|
+
this,
|
|
3579
|
+
/**
|
|
3580
|
+
* Instance of {@link ParserBlock}. You may need it to add new rules when
|
|
3581
|
+
* writing plugins. For simple rules control use {@link MarkdownIt.disable}
|
|
3582
|
+
* and {@link MarkdownIt.enable}.
|
|
3583
|
+
*/
|
|
3584
|
+
"block",
|
|
3585
|
+
new Ce()
|
|
3586
|
+
), C(
|
|
3587
|
+
this,
|
|
3588
|
+
/**
|
|
3589
|
+
* Instance of {@link ParserCore} chain executor. You may need it to add new
|
|
3590
|
+
* rules when writing plugins. For simple rules control use
|
|
3591
|
+
* {@link MarkdownIt.disable} and {@link MarkdownIt.enable}.
|
|
3592
|
+
*/
|
|
3593
|
+
"core",
|
|
3594
|
+
new ae()
|
|
3595
|
+
), C(
|
|
3596
|
+
this,
|
|
3597
|
+
/**
|
|
3598
|
+
* Instance of {@link Renderer}. Use it to modify output look. Or to add rendering
|
|
3599
|
+
* rules for new token types, generated by plugins.
|
|
3600
|
+
*
|
|
3601
|
+
* See {@link Renderer} docs and
|
|
3602
|
+
* [source code](https://github.com/markdown-it/markdown-it/blob/master/src/renderer.ts).
|
|
3603
|
+
*
|
|
3604
|
+
* @example
|
|
3605
|
+
* ```javascript
|
|
3606
|
+
* import MarkdownIt from 'markdown-it'
|
|
3607
|
+
* const md = new MarkdownIt()
|
|
3608
|
+
*
|
|
3609
|
+
* function myToken(tokens, idx, options, env, self) {
|
|
3610
|
+
* //...
|
|
3611
|
+
* return result;
|
|
3612
|
+
* };
|
|
3613
|
+
*
|
|
3614
|
+
* md.renderer.rules['my_token'] = myToken
|
|
3615
|
+
* ```
|
|
3616
|
+
*/
|
|
3617
|
+
"renderer",
|
|
3618
|
+
new le()
|
|
3619
|
+
), C(
|
|
3620
|
+
this,
|
|
3621
|
+
/**
|
|
3622
|
+
* [linkify-it](https://github.com/markdown-it/linkify-it) instance.
|
|
3623
|
+
* Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/src/rules_core/linkify.ts)
|
|
3624
|
+
* rule.
|
|
3625
|
+
*/
|
|
3626
|
+
"linkify",
|
|
3627
|
+
new An()
|
|
3628
|
+
), C(
|
|
3629
|
+
this,
|
|
3630
|
+
/**
|
|
3631
|
+
* Assorted utility functions, useful to write plugins. See details
|
|
3632
|
+
* [here](https://github.com/markdown-it/markdown-it/blob/master/src/common/utils.ts).
|
|
3633
|
+
*/
|
|
3634
|
+
"utils",
|
|
3635
|
+
gn
|
|
3636
|
+
), C(
|
|
3637
|
+
this,
|
|
3638
|
+
/**
|
|
3639
|
+
* Link components parser functions, useful to write plugins. See details
|
|
3640
|
+
* [here](https://github.com/markdown-it/markdown-it/blob/master/src/helpers).
|
|
3641
|
+
*/
|
|
3642
|
+
"helpers",
|
|
3643
|
+
Object.assign({}, yn)
|
|
3644
|
+
);
|
|
3645
|
+
const [e, n] = A;
|
|
3646
|
+
typeof e == "string" ? (this.configure(e), n && this.set(n)) : (this.configure("default"), this.set(e || {}));
|
|
3647
|
+
}
|
|
3648
|
+
/**
|
|
3649
|
+
* Set parser options (in the same format as in constructor). Probably, you
|
|
3650
|
+
* will never need it, but you can change options after constructor call.
|
|
3651
|
+
*
|
|
3652
|
+
* __Note:__ To achieve the best possible performance, don't modify a
|
|
3653
|
+
* `markdown-it` instance options on the fly. If you need multiple configurations
|
|
3654
|
+
* it's best to create multiple instances and initialize each with separate
|
|
3655
|
+
* config.
|
|
3656
|
+
*
|
|
3657
|
+
* @example
|
|
3658
|
+
* ```javascript
|
|
3659
|
+
* import MarkdownIt from 'markdown-it'
|
|
3660
|
+
*
|
|
3661
|
+
* const md = new MarkdownIt()
|
|
3662
|
+
* .set({ html: true, breaks: true })
|
|
3663
|
+
* .set({ typographer: true })
|
|
3664
|
+
* ```
|
|
3665
|
+
*/
|
|
3666
|
+
set(A) {
|
|
3667
|
+
return Object.assign(this.options, A), this;
|
|
3668
|
+
}
|
|
3669
|
+
/**
|
|
3670
|
+
* Batch load of all options and compenent settings. This is internal method,
|
|
3671
|
+
* and you probably will not need it. But if you will - see available presets
|
|
3672
|
+
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/src/presets)
|
|
3673
|
+
*
|
|
3674
|
+
* We strongly recommend to use presets instead of direct config loads. That
|
|
3675
|
+
* will give better compatibility with next versions.
|
|
3676
|
+
*/
|
|
3677
|
+
configure(A) {
|
|
3678
|
+
let e;
|
|
3679
|
+
if (typeof A == "string") {
|
|
3680
|
+
const t = A;
|
|
3681
|
+
if (e = Mt[t], !e) throw new Error(`Wrong 'markdown-it' preset "${t}", check name`);
|
|
3682
|
+
} else e = A;
|
|
3683
|
+
if (!e) throw new Error("Wrong `markdown-it` preset, can't be empty");
|
|
3684
|
+
e.options && (this.options = { ...e.options });
|
|
3685
|
+
const n = e.components;
|
|
3686
|
+
if (n) {
|
|
3687
|
+
var r;
|
|
3688
|
+
[
|
|
3689
|
+
"core",
|
|
3690
|
+
"block",
|
|
3691
|
+
"inline"
|
|
3692
|
+
].forEach((i) => {
|
|
3693
|
+
var o;
|
|
3694
|
+
const s = (o = n[i]) === null || o === void 0 ? void 0 : o.rules;
|
|
3695
|
+
s && this[i].ruler.enableOnly(s);
|
|
3696
|
+
});
|
|
3697
|
+
const t = (r = n.inline) === null || r === void 0 ? void 0 : r.rules2;
|
|
3698
|
+
t && this.inline.ruler2.enableOnly(t);
|
|
3699
|
+
}
|
|
3700
|
+
return this;
|
|
3701
|
+
}
|
|
3702
|
+
/**
|
|
3703
|
+
* Enable list or rules. It will automatically find appropriate components,
|
|
3704
|
+
* containing rules with given names. If rule not found, and `ignoreInvalid`
|
|
3705
|
+
* not set - throws exception.
|
|
3706
|
+
*
|
|
3707
|
+
* @param list Rule name or list of rule names to enable.
|
|
3708
|
+
* @param ignoreInvalid Set `true` to ignore errors when rule not found.
|
|
3709
|
+
*
|
|
3710
|
+
* @example
|
|
3711
|
+
* ```javascript
|
|
3712
|
+
* import MarkdownIt from 'markdown-it'
|
|
3713
|
+
*
|
|
3714
|
+
* const md = new MarkdownIt()
|
|
3715
|
+
* .enable(['sub', 'sup'])
|
|
3716
|
+
* .disable('smartquotes')
|
|
3717
|
+
* ```
|
|
3718
|
+
*/
|
|
3719
|
+
enable(A, e = !1) {
|
|
3720
|
+
let n = [];
|
|
3721
|
+
Array.isArray(A) || (A = [A]), [
|
|
3722
|
+
"core",
|
|
3723
|
+
"block",
|
|
3724
|
+
"inline"
|
|
3725
|
+
].forEach((t) => {
|
|
3726
|
+
n = n.concat(this[t].ruler.enable(A, !0));
|
|
3727
|
+
}), n = n.concat(this.inline.ruler2.enable(A, !0));
|
|
3728
|
+
const r = A.filter((t) => n.indexOf(t) < 0);
|
|
3729
|
+
if (r.length && !e) throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);
|
|
3730
|
+
return this;
|
|
3731
|
+
}
|
|
3732
|
+
/**
|
|
3733
|
+
* The same as {@link MarkdownIt.enable}, but turn specified rules off.
|
|
3734
|
+
*
|
|
3735
|
+
* @param list Rule name or list of rule names to disable.
|
|
3736
|
+
* @param ignoreInvalid Set `true` to ignore errors when rule not found.
|
|
3737
|
+
*/
|
|
3738
|
+
disable(A, e = !1) {
|
|
3739
|
+
let n = [];
|
|
3740
|
+
Array.isArray(A) || (A = [A]), [
|
|
3741
|
+
"core",
|
|
3742
|
+
"block",
|
|
3743
|
+
"inline"
|
|
3744
|
+
].forEach((t) => {
|
|
3745
|
+
n = n.concat(this[t].ruler.disable(A, !0));
|
|
3746
|
+
}), n = n.concat(this.inline.ruler2.disable(A, !0));
|
|
3747
|
+
const r = A.filter((t) => n.indexOf(t) < 0);
|
|
3748
|
+
if (r.length && !e) throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);
|
|
3749
|
+
return this;
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* Load specified plugin with given params into current parser instance.
|
|
3753
|
+
* It's just a sugar to call `plugin(md, params)` with curring.
|
|
3754
|
+
*
|
|
3755
|
+
* @example
|
|
3756
|
+
* ```javascript
|
|
3757
|
+
* import MarkdownIt from 'markdown-it'
|
|
3758
|
+
* import iterator from 'markdown-it-for-inline'
|
|
3759
|
+
*
|
|
3760
|
+
* const md = new MarkdownIt()
|
|
3761
|
+
* .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
|
|
3762
|
+
* tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar')
|
|
3763
|
+
* })
|
|
3764
|
+
* ```
|
|
3765
|
+
*/
|
|
3766
|
+
use(A, ...e) {
|
|
3767
|
+
return A.apply(A, [this, ...e]), this;
|
|
3768
|
+
}
|
|
3769
|
+
/**
|
|
3770
|
+
* Parse input string and return list of block tokens (special token type
|
|
3771
|
+
* "inline" will contain list of inline tokens). You should not call this
|
|
3772
|
+
* method directly, until you write custom renderer (for example, to produce
|
|
3773
|
+
* AST).
|
|
3774
|
+
*
|
|
3775
|
+
* `env` is used to pass data between "distributed" rules and return additional
|
|
3776
|
+
* metadata like reference info, needed for the renderer. It also can be used to
|
|
3777
|
+
* inject data in specific cases. Usually, you will be ok to pass `{}`,
|
|
3778
|
+
* and then pass updated object to renderer.
|
|
3779
|
+
*
|
|
3780
|
+
* @param src Source string.
|
|
3781
|
+
* @param env Environment sandbox.
|
|
3782
|
+
*/
|
|
3783
|
+
parse(A, e) {
|
|
3784
|
+
if (typeof A != "string") throw new Error("Input data should be a String");
|
|
3785
|
+
const n = new this.core.State(A, this, e);
|
|
3786
|
+
return this.core.process(n), n.tokens;
|
|
3787
|
+
}
|
|
3788
|
+
/**
|
|
3789
|
+
* Render markdown string into html. It does all magic for you :).
|
|
3790
|
+
*
|
|
3791
|
+
* `env` can be used to inject additional metadata (`{}` by default).
|
|
3792
|
+
* But you will not need it with high probability. See also comment
|
|
3793
|
+
* in {@link MarkdownIt.parse}.
|
|
3794
|
+
*
|
|
3795
|
+
* @param src Source string.
|
|
3796
|
+
* @param env Environment sandbox.
|
|
3797
|
+
*/
|
|
3798
|
+
render(A, e = {}) {
|
|
3799
|
+
return this.renderer.render(this.parse(A, e), this.options, e);
|
|
3800
|
+
}
|
|
3801
|
+
/**
|
|
3802
|
+
* The same as {@link MarkdownIt.parse} but skip all block rules. It returns
|
|
3803
|
+
* the block tokens list with the single `inline` element, containing parsed
|
|
3804
|
+
* inline tokens in `children` property. Also updates `env` object.
|
|
3805
|
+
*
|
|
3806
|
+
* @param src Source string.
|
|
3807
|
+
* @param env Environment sandbox.
|
|
3808
|
+
*/
|
|
3809
|
+
parseInline(A, e) {
|
|
3810
|
+
const n = new this.core.State(A, this, e);
|
|
3811
|
+
return n.inlineMode = !0, this.core.process(n), n.tokens;
|
|
3812
|
+
}
|
|
3813
|
+
/**
|
|
3814
|
+
* Similar to {@link MarkdownIt.render} but for single paragraph content.
|
|
3815
|
+
* Result will NOT be wrapped into `<p>` tags.
|
|
3816
|
+
*
|
|
3817
|
+
* @param src Source string.
|
|
3818
|
+
* @param env Environment sandbox.
|
|
3819
|
+
*/
|
|
3820
|
+
renderInline(A, e = {}) {
|
|
3821
|
+
return this.renderer.render(this.parseInline(A, e), this.options, e);
|
|
3822
|
+
}
|
|
3823
|
+
};
|
|
3824
|
+
C(Y, "Token", M);
|
|
3825
|
+
C(Y, "Ruler", q);
|
|
3826
|
+
C(Y, "Renderer", le);
|
|
3827
|
+
C(Y, "ParserCore", ae);
|
|
3828
|
+
C(Y, "StateCore", ue);
|
|
3829
|
+
C(Y, "ParserBlock", Ce);
|
|
3830
|
+
C(Y, "StateBlock", ge);
|
|
3831
|
+
C(Y, "ParserInline", Ie);
|
|
3832
|
+
C(Y, "StateInline", pe);
|
|
3833
|
+
var Ot = re(Y);
|
|
3834
|
+
export {
|
|
3835
|
+
Ot as default
|
|
3836
|
+
};
|