8201 lines
297 KiB
JavaScript
8201 lines
297 KiB
JavaScript
/*
|
||
* Extracted from browser-delivered Turbopack chunk: fd0220e4d10052af.701bdafa2d.js
|
||
* Module id: 457044
|
||
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
||
*/
|
||
|
||
const moduleFactory = (e) => {
|
||
"use strict";
|
||
let t;
|
||
var n,
|
||
i,
|
||
r,
|
||
a,
|
||
o,
|
||
s,
|
||
c,
|
||
l,
|
||
u,
|
||
h,
|
||
f,
|
||
d,
|
||
p,
|
||
g = e.i(462214),
|
||
b = e.i(358379),
|
||
m = e.i(600354),
|
||
w = e.i(292002),
|
||
v = e.i(768924),
|
||
x = e.i(82114),
|
||
y = e.i(41671),
|
||
_ = e.i(777784),
|
||
S = e.i(184656),
|
||
E = e.i(485615),
|
||
M = e.i(703962),
|
||
T = e.i(713118),
|
||
k = e.i(182004),
|
||
C = e.i(500724),
|
||
A = e.i(216257),
|
||
N = e.i(929286),
|
||
I = e.i(664115),
|
||
P = e.i(717139),
|
||
R = e.i(464025),
|
||
L = e.i(856685),
|
||
D = e.i(316925),
|
||
j = e.i(959248),
|
||
O = e.i(380332),
|
||
F = e.i(117313),
|
||
U = e.i(589001),
|
||
B = e.i(710871),
|
||
H = e.i(260561),
|
||
z = e.i(174008),
|
||
G = e.i(853025),
|
||
$ = e.i(616777),
|
||
V = e.i(999445),
|
||
W = e.i(673654),
|
||
K = e.i(47091);
|
||
let q = {};
|
||
function X(e, t) {
|
||
"string" != typeof t && (t = X.defaultChars);
|
||
let n = (function (e) {
|
||
let t = q[e];
|
||
if (t) return t;
|
||
t = q[e] = [];
|
||
for (let e = 0; e < 128; e++) {
|
||
let n = String.fromCharCode(e);
|
||
t.push(n);
|
||
}
|
||
for (let n = 0; n < e.length; n++) {
|
||
let i = e.charCodeAt(n);
|
||
t[i] = "%" + ("0" + i.toString(16).toUpperCase()).slice(-2);
|
||
}
|
||
return t;
|
||
})(t);
|
||
return e.replace(/(%[a-f0-9]{2})+/gi, function (e) {
|
||
let t = "";
|
||
for (let i = 0, r = e.length; i < r; i += 3) {
|
||
let a = parseInt(e.slice(i + 1, i + 3), 16);
|
||
if (a < 128) {
|
||
t += n[a];
|
||
continue;
|
||
}
|
||
if ((224 & a) == 192 && i + 3 < r) {
|
||
let n = parseInt(e.slice(i + 4, i + 6), 16);
|
||
if ((192 & n) == 128) {
|
||
let e = ((a << 6) & 1984) | (63 & n);
|
||
e < 128 ? (t += "<22><>") : (t += String.fromCharCode(e)), (i += 3);
|
||
continue;
|
||
}
|
||
}
|
||
if ((240 & a) == 224 && i + 6 < r) {
|
||
let n = parseInt(e.slice(i + 4, i + 6), 16),
|
||
r = parseInt(e.slice(i + 7, i + 9), 16);
|
||
if ((192 & n) == 128 && (192 & r) == 128) {
|
||
let e = ((a << 12) & 61440) | ((n << 6) & 4032) | (63 & r);
|
||
e < 2048 || (e >= 55296 && e <= 57343)
|
||
? (t += "<22><><EFBFBD>")
|
||
: (t += String.fromCharCode(e)),
|
||
(i += 6);
|
||
continue;
|
||
}
|
||
}
|
||
if ((248 & a) == 240 && i + 9 < r) {
|
||
let n = parseInt(e.slice(i + 4, i + 6), 16),
|
||
r = parseInt(e.slice(i + 7, i + 9), 16),
|
||
o = parseInt(e.slice(i + 10, i + 12), 16);
|
||
if ((192 & n) == 128 && (192 & r) == 128 && (192 & o) == 128) {
|
||
let e =
|
||
((a << 18) & 1835008) |
|
||
((n << 12) & 258048) |
|
||
((r << 6) & 4032) |
|
||
(63 & o);
|
||
e < 65536 || e > 1114111
|
||
? (t += "<22><><EFBFBD><EFBFBD>")
|
||
: ((e -= 65536),
|
||
(t += String.fromCharCode(
|
||
55296 + (e >> 10),
|
||
56320 + (1023 & e),
|
||
))),
|
||
(i += 9);
|
||
continue;
|
||
}
|
||
}
|
||
t += "<22>";
|
||
}
|
||
return t;
|
||
});
|
||
}
|
||
(X.defaultChars = ";/?:@&=+$,#"), (X.componentChars = "");
|
||
let Y = {};
|
||
function J(e, t, n) {
|
||
"string" != typeof t && ((n = t), (t = J.defaultChars)),
|
||
void 0 === n && (n = !0);
|
||
let i = (function (e) {
|
||
let t = Y[e];
|
||
if (t) return t;
|
||
t = Y[e] = [];
|
||
for (let e = 0; e < 128; e++) {
|
||
let n = String.fromCharCode(e);
|
||
/^[0-9a-z]$/i.test(n)
|
||
? t.push(n)
|
||
: t.push("%" + ("0" + e.toString(16).toUpperCase()).slice(-2));
|
||
}
|
||
for (let n = 0; n < e.length; n++) t[e.charCodeAt(n)] = e[n];
|
||
return t;
|
||
})(t),
|
||
r = "";
|
||
for (let t = 0, a = e.length; t < a; t++) {
|
||
let o = e.charCodeAt(t);
|
||
if (
|
||
n &&
|
||
37 === o &&
|
||
t + 2 < a &&
|
||
/^[0-9a-f]{2}$/i.test(e.slice(t + 1, t + 3))
|
||
) {
|
||
(r += e.slice(t, t + 3)), (t += 2);
|
||
continue;
|
||
}
|
||
if (o < 128) {
|
||
r += i[o];
|
||
continue;
|
||
}
|
||
if (o >= 55296 && o <= 57343) {
|
||
if (o >= 55296 && o <= 56319 && t + 1 < a) {
|
||
let n = e.charCodeAt(t + 1);
|
||
if (n >= 56320 && n <= 57343) {
|
||
(r += encodeURIComponent(e[t] + e[t + 1])), t++;
|
||
continue;
|
||
}
|
||
}
|
||
r += "%EF%BF%BD";
|
||
continue;
|
||
}
|
||
r += encodeURIComponent(e[t]);
|
||
}
|
||
return r;
|
||
}
|
||
function Z(e) {
|
||
let t = "";
|
||
return (
|
||
(t += e.protocol || ""),
|
||
(t += e.slashes ? "//" : ""),
|
||
(t += e.auth ? e.auth + "@" : ""),
|
||
e.hostname && -1 !== e.hostname.indexOf(":")
|
||
? (t += "[" + e.hostname + "]")
|
||
: (t += e.hostname || ""),
|
||
(t += e.port ? ":" + e.port : ""),
|
||
(t += e.pathname || ""),
|
||
(t += e.search || ""),
|
||
(t += e.hash || "")
|
||
);
|
||
}
|
||
function Q() {
|
||
(this.protocol = null),
|
||
(this.slashes = null),
|
||
(this.auth = null),
|
||
(this.port = null),
|
||
(this.hostname = null),
|
||
(this.hash = null),
|
||
(this.search = null),
|
||
(this.pathname = null);
|
||
}
|
||
(J.defaultChars = ";/?:@&=+$,-_.!~*'()#"), (J.componentChars = "-_.!~*'()");
|
||
let ee = /^([a-z0-9.+-]+:)/i,
|
||
et = /:[0-9]*$/,
|
||
en = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
|
||
ei = ["%", "/", "?", ";", "#"].concat(
|
||
["'"].concat(
|
||
["{", "}", "|", "\\", "^", "`"].concat([
|
||
"<",
|
||
">",
|
||
'"',
|
||
"`",
|
||
" ",
|
||
"\r",
|
||
"\n",
|
||
" ",
|
||
]),
|
||
),
|
||
),
|
||
er = ["/", "?", "#"],
|
||
ea = /^[+a-z0-9A-Z_-]{0,63}$/,
|
||
eo = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
|
||
es = { javascript: !0, "javascript:": !0 },
|
||
ec = {
|
||
http: !0,
|
||
https: !0,
|
||
ftp: !0,
|
||
gopher: !0,
|
||
file: !0,
|
||
"http:": !0,
|
||
"https:": !0,
|
||
"ftp:": !0,
|
||
"gopher:": !0,
|
||
"file:": !0,
|
||
};
|
||
(Q.prototype.parse = function (e, t) {
|
||
let n,
|
||
i,
|
||
r,
|
||
a = e;
|
||
if (((a = a.trim()), !t && 1 === e.split("#").length)) {
|
||
let e = en.exec(a);
|
||
if (e)
|
||
return (this.pathname = e[1]), e[2] && (this.search = e[2]), this;
|
||
}
|
||
let o = ee.exec(a);
|
||
if (
|
||
(o &&
|
||
((n = (o = o[0]).toLowerCase()),
|
||
(this.protocol = o),
|
||
(a = a.substr(o.length))),
|
||
(t || o || a.match(/^\/\/[^@\/]+@[^@\/]+/)) &&
|
||
(r = "//" === a.substr(0, 2)) &&
|
||
!(o && es[o]) &&
|
||
((a = a.substr(2)), (this.slashes = !0)),
|
||
!es[o] && (r || (o && !ec[o])))
|
||
) {
|
||
let e,
|
||
t,
|
||
n = -1;
|
||
for (let e = 0; e < er.length; e++)
|
||
-1 !== (i = a.indexOf(er[e])) && (-1 === n || i < n) && (n = i);
|
||
-1 !== (t = -1 === n ? a.lastIndexOf("@") : a.lastIndexOf("@", n)) &&
|
||
((e = a.slice(0, t)), (a = a.slice(t + 1)), (this.auth = e)),
|
||
(n = -1);
|
||
for (let e = 0; e < ei.length; e++)
|
||
-1 !== (i = a.indexOf(ei[e])) && (-1 === n || i < n) && (n = i);
|
||
-1 === n && (n = a.length), ":" === a[n - 1] && n--;
|
||
let r = a.slice(0, n);
|
||
(a = a.slice(n)),
|
||
this.parseHost(r),
|
||
(this.hostname = this.hostname || "");
|
||
let o =
|
||
"[" === this.hostname[0] &&
|
||
"]" === this.hostname[this.hostname.length - 1];
|
||
if (!o) {
|
||
let e = this.hostname.split(/\./);
|
||
for (let t = 0, n = e.length; t < n; t++) {
|
||
let n = e[t];
|
||
if (n && !n.match(ea)) {
|
||
let i = "";
|
||
for (let e = 0, t = n.length; e < t; e++)
|
||
n.charCodeAt(e) > 127 ? (i += "x") : (i += n[e]);
|
||
if (!i.match(ea)) {
|
||
let i = e.slice(0, t),
|
||
r = e.slice(t + 1),
|
||
o = n.match(eo);
|
||
o && (i.push(o[1]), r.unshift(o[2])),
|
||
r.length && (a = r.join(".") + a),
|
||
(this.hostname = i.join("."));
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
this.hostname.length > 255 && (this.hostname = ""),
|
||
o &&
|
||
(this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
||
}
|
||
let s = a.indexOf("#");
|
||
-1 !== s && ((this.hash = a.substr(s)), (a = a.slice(0, s)));
|
||
let c = a.indexOf("?");
|
||
return (
|
||
-1 !== c && ((this.search = a.substr(c)), (a = a.slice(0, c))),
|
||
a && (this.pathname = a),
|
||
ec[n] && this.hostname && !this.pathname && (this.pathname = ""),
|
||
this
|
||
);
|
||
}),
|
||
(Q.prototype.parseHost = function (e) {
|
||
let t = et.exec(e);
|
||
t &&
|
||
(":" !== (t = t[0]) && (this.port = t.substr(1)),
|
||
(e = e.substr(0, e.length - t.length))),
|
||
e && (this.hostname = e);
|
||
});
|
||
let el = function (e, t) {
|
||
if (e && e instanceof Q) return e;
|
||
let n = new Q();
|
||
return n.parse(e, t), n;
|
||
};
|
||
e.s([], 729435),
|
||
e.i(729435),
|
||
e.s(
|
||
["decode", 0, X, "encode", 0, J, "format", () => Z, "parse", 0, el],
|
||
954489,
|
||
);
|
||
var eu = e.i(954489);
|
||
let eh =
|
||
/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,
|
||
ef = /[\0-\x1F\x7F-\x9F]/,
|
||
ed =
|
||
/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\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]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,
|
||
ep =
|
||
/[\$\+<->\^`\|~\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-\u20C0\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-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\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-\u31E3\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-\uFBC2\uFD40-\uFD4F\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-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,
|
||
eg = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
|
||
e.s([], 57177),
|
||
e.i(57177),
|
||
e.s(
|
||
[
|
||
"Any",
|
||
0,
|
||
eh,
|
||
"Cc",
|
||
0,
|
||
ef,
|
||
"Cf",
|
||
0,
|
||
/[\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]/,
|
||
"P",
|
||
0,
|
||
ed,
|
||
"S",
|
||
0,
|
||
ep,
|
||
"Z",
|
||
0,
|
||
eg,
|
||
],
|
||
107206,
|
||
);
|
||
var eb = e.i(107206);
|
||
let em = new Uint16Array(
|
||
'ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'
|
||
.split("")
|
||
.map((e) => e.charCodeAt(0)),
|
||
),
|
||
ew = new Uint16Array(
|
||
"Ȁaglq \x15\x18\x1bɭ\x0f\0\0\x12p;䀦os;䀧t;䀾t;䀼uot;䀢"
|
||
.split("")
|
||
.map((e) => e.charCodeAt(0)),
|
||
),
|
||
ev = new Map([
|
||
[0, 65533],
|
||
[128, 8364],
|
||
[130, 8218],
|
||
[131, 402],
|
||
[132, 8222],
|
||
[133, 8230],
|
||
[134, 8224],
|
||
[135, 8225],
|
||
[136, 710],
|
||
[137, 8240],
|
||
[138, 352],
|
||
[139, 8249],
|
||
[140, 338],
|
||
[142, 381],
|
||
[145, 8216],
|
||
[146, 8217],
|
||
[147, 8220],
|
||
[148, 8221],
|
||
[149, 8226],
|
||
[150, 8211],
|
||
[151, 8212],
|
||
[152, 732],
|
||
[153, 8482],
|
||
[154, 353],
|
||
[155, 8250],
|
||
[156, 339],
|
||
[158, 382],
|
||
[159, 376],
|
||
]),
|
||
ex =
|
||
null != (c = String.fromCodePoint)
|
||
? c
|
||
: function (e) {
|
||
let t = "";
|
||
return (
|
||
e > 65535 &&
|
||
((e -= 65536),
|
||
(t += String.fromCharCode(((e >>> 10) & 1023) | 55296)),
|
||
(e = 56320 | (1023 & e))),
|
||
(t += String.fromCharCode(e))
|
||
);
|
||
};
|
||
function ey(e) {
|
||
return e >= l.ZERO && e <= l.NINE;
|
||
}
|
||
((n = l || (l = {}))[(n.NUM = 35)] = "NUM"),
|
||
(n[(n.SEMI = 59)] = "SEMI"),
|
||
(n[(n.EQUALS = 61)] = "EQUALS"),
|
||
(n[(n.ZERO = 48)] = "ZERO"),
|
||
(n[(n.NINE = 57)] = "NINE"),
|
||
(n[(n.LOWER_A = 97)] = "LOWER_A"),
|
||
(n[(n.LOWER_F = 102)] = "LOWER_F"),
|
||
(n[(n.LOWER_X = 120)] = "LOWER_X"),
|
||
(n[(n.LOWER_Z = 122)] = "LOWER_Z"),
|
||
(n[(n.UPPER_A = 65)] = "UPPER_A"),
|
||
(n[(n.UPPER_F = 70)] = "UPPER_F"),
|
||
(n[(n.UPPER_Z = 90)] = "UPPER_Z"),
|
||
((i = u || (u = {}))[(i.VALUE_LENGTH = 49152)] = "VALUE_LENGTH"),
|
||
(i[(i.BRANCH_LENGTH = 16256)] = "BRANCH_LENGTH"),
|
||
(i[(i.JUMP_TABLE = 127)] = "JUMP_TABLE"),
|
||
((r = h || (h = {}))[(r.EntityStart = 0)] = "EntityStart"),
|
||
(r[(r.NumericStart = 1)] = "NumericStart"),
|
||
(r[(r.NumericDecimal = 2)] = "NumericDecimal"),
|
||
(r[(r.NumericHex = 3)] = "NumericHex"),
|
||
(r[(r.NamedEntity = 4)] = "NamedEntity"),
|
||
((a = f || (f = {}))[(a.Legacy = 0)] = "Legacy"),
|
||
(a[(a.Strict = 1)] = "Strict"),
|
||
(a[(a.Attribute = 2)] = "Attribute");
|
||
class e_ {
|
||
constructor(e, t, n) {
|
||
(this.decodeTree = e),
|
||
(this.emitCodePoint = t),
|
||
(this.errors = n),
|
||
(this.state = h.EntityStart),
|
||
(this.consumed = 1),
|
||
(this.result = 0),
|
||
(this.treeIndex = 0),
|
||
(this.excess = 1),
|
||
(this.decodeMode = f.Strict);
|
||
}
|
||
startEntity(e) {
|
||
(this.decodeMode = e),
|
||
(this.state = h.EntityStart),
|
||
(this.result = 0),
|
||
(this.treeIndex = 0),
|
||
(this.excess = 1),
|
||
(this.consumed = 1);
|
||
}
|
||
write(e, t) {
|
||
switch (this.state) {
|
||
case h.EntityStart:
|
||
if (e.charCodeAt(t) === l.NUM)
|
||
return (
|
||
(this.state = h.NumericStart),
|
||
(this.consumed += 1),
|
||
this.stateNumericStart(e, t + 1)
|
||
);
|
||
return (this.state = h.NamedEntity), this.stateNamedEntity(e, t);
|
||
case h.NumericStart:
|
||
return this.stateNumericStart(e, t);
|
||
case h.NumericDecimal:
|
||
return this.stateNumericDecimal(e, t);
|
||
case h.NumericHex:
|
||
return this.stateNumericHex(e, t);
|
||
case h.NamedEntity:
|
||
return this.stateNamedEntity(e, t);
|
||
}
|
||
}
|
||
stateNumericStart(e, t) {
|
||
return t >= e.length
|
||
? -1
|
||
: (32 | e.charCodeAt(t)) === l.LOWER_X
|
||
? ((this.state = h.NumericHex),
|
||
(this.consumed += 1),
|
||
this.stateNumericHex(e, t + 1))
|
||
: ((this.state = h.NumericDecimal), this.stateNumericDecimal(e, t));
|
||
}
|
||
addToNumericResult(e, t, n, i) {
|
||
if (t !== n) {
|
||
let r = n - t;
|
||
(this.result =
|
||
this.result * Math.pow(i, r) + parseInt(e.substr(t, r), i)),
|
||
(this.consumed += r);
|
||
}
|
||
}
|
||
stateNumericHex(e, t) {
|
||
let n = t;
|
||
for (; t < e.length; ) {
|
||
var i;
|
||
let r = e.charCodeAt(t);
|
||
if (
|
||
!ey(r) &&
|
||
(!((i = r) >= l.UPPER_A) || !(i <= l.UPPER_F)) &&
|
||
(!(i >= l.LOWER_A) || !(i <= l.LOWER_F))
|
||
)
|
||
return (
|
||
this.addToNumericResult(e, n, t, 16), this.emitNumericEntity(r, 3)
|
||
);
|
||
t += 1;
|
||
}
|
||
return this.addToNumericResult(e, n, t, 16), -1;
|
||
}
|
||
stateNumericDecimal(e, t) {
|
||
let n = t;
|
||
for (; t < e.length; ) {
|
||
let i = e.charCodeAt(t);
|
||
if (!ey(i))
|
||
return (
|
||
this.addToNumericResult(e, n, t, 10), this.emitNumericEntity(i, 2)
|
||
);
|
||
t += 1;
|
||
}
|
||
return this.addToNumericResult(e, n, t, 10), -1;
|
||
}
|
||
emitNumericEntity(e, t) {
|
||
var n, i, r;
|
||
if (this.consumed <= t)
|
||
return (
|
||
null == (n = this.errors) ||
|
||
n.absenceOfDigitsInNumericCharacterReference(this.consumed),
|
||
0
|
||
);
|
||
if (e === l.SEMI) this.consumed += 1;
|
||
else if (this.decodeMode === f.Strict) return 0;
|
||
return (
|
||
this.emitCodePoint(
|
||
((i = this.result) >= 55296 && i <= 57343) || i > 1114111
|
||
? 65533
|
||
: null != (r = ev.get(i))
|
||
? r
|
||
: i,
|
||
this.consumed,
|
||
),
|
||
this.errors &&
|
||
(e !== l.SEMI &&
|
||
this.errors.missingSemicolonAfterCharacterReference(),
|
||
this.errors.validateNumericCharacterReference(this.result)),
|
||
this.consumed
|
||
);
|
||
}
|
||
stateNamedEntity(e, t) {
|
||
let { decodeTree: n } = this,
|
||
i = n[this.treeIndex],
|
||
r = (i & u.VALUE_LENGTH) >> 14;
|
||
for (; t < e.length; t++, this.excess++) {
|
||
let a = e.charCodeAt(t);
|
||
if (
|
||
((this.treeIndex = (function (e, t, n, i) {
|
||
let r = (t & u.BRANCH_LENGTH) >> 7,
|
||
a = t & u.JUMP_TABLE;
|
||
if (0 === r) return 0 !== a && i === a ? n : -1;
|
||
if (a) {
|
||
let t = i - a;
|
||
return t < 0 || t >= r ? -1 : e[n + t] - 1;
|
||
}
|
||
let o = n,
|
||
s = o + r - 1;
|
||
for (; o <= s; ) {
|
||
let t = (o + s) >>> 1,
|
||
n = e[t];
|
||
if (n < i) o = t + 1;
|
||
else {
|
||
if (!(n > i)) return e[t + r];
|
||
s = t - 1;
|
||
}
|
||
}
|
||
return -1;
|
||
})(n, i, this.treeIndex + Math.max(1, r), a)),
|
||
this.treeIndex < 0)
|
||
)
|
||
return 0 === this.result ||
|
||
(this.decodeMode === f.Attribute &&
|
||
(0 === r ||
|
||
(function (e) {
|
||
var t;
|
||
return (
|
||
e === l.EQUALS ||
|
||
((t = e) >= l.UPPER_A && t <= l.UPPER_Z) ||
|
||
(t >= l.LOWER_A && t <= l.LOWER_Z) ||
|
||
ey(t)
|
||
);
|
||
})(a)))
|
||
? 0
|
||
: this.emitNotTerminatedNamedEntity();
|
||
if (0 != (r = ((i = n[this.treeIndex]) & u.VALUE_LENGTH) >> 14)) {
|
||
if (a === l.SEMI)
|
||
return this.emitNamedEntityData(
|
||
this.treeIndex,
|
||
r,
|
||
this.consumed + this.excess,
|
||
);
|
||
this.decodeMode !== f.Strict &&
|
||
((this.result = this.treeIndex),
|
||
(this.consumed += this.excess),
|
||
(this.excess = 0));
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
emitNotTerminatedNamedEntity() {
|
||
var e;
|
||
let { result: t, decodeTree: n } = this,
|
||
i = (n[t] & u.VALUE_LENGTH) >> 14;
|
||
return (
|
||
this.emitNamedEntityData(t, i, this.consumed),
|
||
null == (e = this.errors) ||
|
||
e.missingSemicolonAfterCharacterReference(),
|
||
this.consumed
|
||
);
|
||
}
|
||
emitNamedEntityData(e, t, n) {
|
||
let { decodeTree: i } = this;
|
||
return (
|
||
this.emitCodePoint(1 === t ? i[e] & ~u.VALUE_LENGTH : i[e + 1], n),
|
||
3 === t && this.emitCodePoint(i[e + 2], n),
|
||
n
|
||
);
|
||
}
|
||
end() {
|
||
var e;
|
||
switch (this.state) {
|
||
case h.NamedEntity:
|
||
return 0 !== this.result &&
|
||
(this.decodeMode !== f.Attribute ||
|
||
this.result === this.treeIndex)
|
||
? this.emitNotTerminatedNamedEntity()
|
||
: 0;
|
||
case h.NumericDecimal:
|
||
return this.emitNumericEntity(0, 2);
|
||
case h.NumericHex:
|
||
return this.emitNumericEntity(0, 3);
|
||
case h.NumericStart:
|
||
return (
|
||
null == (e = this.errors) ||
|
||
e.absenceOfDigitsInNumericCharacterReference(this.consumed),
|
||
0
|
||
);
|
||
case h.EntityStart:
|
||
return 0;
|
||
}
|
||
}
|
||
}
|
||
function eS(e) {
|
||
let t = "",
|
||
n = new e_(e, (e) => (t += ex(e)));
|
||
return function (e, i) {
|
||
let r = 0,
|
||
a = 0;
|
||
for (; (a = e.indexOf("&", a)) >= 0; ) {
|
||
(t += e.slice(r, a)), n.startEntity(i);
|
||
let o = n.write(e, a + 1);
|
||
if (o < 0) {
|
||
r = a + n.end();
|
||
break;
|
||
}
|
||
(r = a + o), (a = 0 === o ? r + 1 : r);
|
||
}
|
||
let o = t + e.slice(r);
|
||
return (t = ""), o;
|
||
};
|
||
}
|
||
let eE = eS(em);
|
||
function eM(e, t = f.Legacy) {
|
||
return eE(e, t);
|
||
}
|
||
eS(ew);
|
||
let eT = new Map([
|
||
[34, """],
|
||
[38, "&"],
|
||
[39, "'"],
|
||
[60, "<"],
|
||
[62, ">"],
|
||
]);
|
||
function ek(e, t) {
|
||
return function (n) {
|
||
let i,
|
||
r = 0,
|
||
a = "";
|
||
for (; (i = e.exec(n)); )
|
||
r !== i.index && (a += n.substring(r, i.index)),
|
||
(a += t.get(i[0].charCodeAt(0))),
|
||
(r = i.index + 1);
|
||
return a + n.substring(r);
|
||
};
|
||
}
|
||
function eC(e) {
|
||
return "[object String]" === Object.prototype.toString.call(e);
|
||
}
|
||
String.prototype.codePointAt,
|
||
ek(/[&<>'"]/g, eT),
|
||
ek(
|
||
/["&\u00A0]/g,
|
||
new Map([
|
||
[34, """],
|
||
[38, "&"],
|
||
[160, " "],
|
||
]),
|
||
),
|
||
ek(
|
||
/[&<>\u00A0]/g,
|
||
new Map([
|
||
[38, "&"],
|
||
[60, "<"],
|
||
[62, ">"],
|
||
[160, " "],
|
||
]),
|
||
),
|
||
((o = d || (d = {}))[(o.XML = 0)] = "XML"),
|
||
(o[(o.HTML = 1)] = "HTML"),
|
||
((s = p || (p = {}))[(s.UTF8 = 0)] = "UTF8"),
|
||
(s[(s.ASCII = 1)] = "ASCII"),
|
||
(s[(s.Extensive = 2)] = "Extensive"),
|
||
(s[(s.Attribute = 3)] = "Attribute"),
|
||
(s[(s.Text = 4)] = "Text");
|
||
let eA = Object.prototype.hasOwnProperty;
|
||
function eN(e, t) {
|
||
return eA.call(e, t);
|
||
}
|
||
function eI(e) {
|
||
let t = Array.prototype.slice.call(arguments, 1);
|
||
return (
|
||
t.forEach(function (t) {
|
||
if (t) {
|
||
if ("object" != typeof t) throw TypeError(t + "must be object");
|
||
Object.keys(t).forEach(function (n) {
|
||
e[n] = t[n];
|
||
});
|
||
}
|
||
}),
|
||
e
|
||
);
|
||
}
|
||
function eP(e, t, n) {
|
||
return [].concat(e.slice(0, t), n, e.slice(t + 1));
|
||
}
|
||
function eR(e) {
|
||
return (
|
||
(!(e >= 55296) || !(e <= 57343)) &&
|
||
(!(e >= 64976) || !(e <= 65007)) &&
|
||
(65535 & e) != 65535 &&
|
||
(65535 & e) != 65534 &&
|
||
(!(e >= 0) || !(e <= 8)) &&
|
||
11 !== e &&
|
||
(!(e >= 14) || !(e <= 31)) &&
|
||
(!(e >= 127) || !(e <= 159)) &&
|
||
!(e > 1114111) &&
|
||
!0
|
||
);
|
||
}
|
||
function eL(e) {
|
||
return e > 65535
|
||
? String.fromCharCode(55296 + ((e -= 65536) >> 10), 56320 + (1023 & e))
|
||
: String.fromCharCode(e);
|
||
}
|
||
let eD = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,
|
||
ej = RegExp(eD.source + "|" + /&([a-z#][a-z0-9]{1,31});/gi.source, "gi"),
|
||
eO = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
|
||
function eF(e) {
|
||
return 0 > e.indexOf("\\") ? e : e.replace(eD, "$1");
|
||
}
|
||
function eU(e) {
|
||
return 0 > e.indexOf("\\") && 0 > e.indexOf("&")
|
||
? e
|
||
: e.replace(ej, function (e, t, n) {
|
||
if (t) return t;
|
||
if (35 === n.charCodeAt(0) && eO.test(n)) {
|
||
let t =
|
||
"x" === n[1].toLowerCase()
|
||
? parseInt(n.slice(2), 16)
|
||
: parseInt(n.slice(1), 10);
|
||
return eR(t) ? eL(t) : e;
|
||
}
|
||
let i = eM(e);
|
||
return i !== e ? i : e;
|
||
});
|
||
}
|
||
let eB = /[&<>"]/,
|
||
eH = /[&<>"]/g,
|
||
ez = { "&": "&", "<": "<", ">": ">", '"': """ };
|
||
function eG(e) {
|
||
return ez[e];
|
||
}
|
||
function e$(e) {
|
||
return eB.test(e) ? e.replace(eH, eG) : e;
|
||
}
|
||
let eV = /[.?*+^$[\]\\(){}|-]/g;
|
||
function eW(e) {
|
||
return e.replace(eV, "\\$&");
|
||
}
|
||
function eK(e) {
|
||
switch (e) {
|
||
case 9:
|
||
case 32:
|
||
return !0;
|
||
}
|
||
return !1;
|
||
}
|
||
function eq(e) {
|
||
if (e >= 8192 && e <= 8202) return !0;
|
||
switch (e) {
|
||
case 9:
|
||
case 10:
|
||
case 11:
|
||
case 12:
|
||
case 13:
|
||
case 32:
|
||
case 160:
|
||
case 5760:
|
||
case 8239:
|
||
case 8287:
|
||
case 12288:
|
||
return !0;
|
||
}
|
||
return !1;
|
||
}
|
||
function eX(e) {
|
||
return ed.test(e) || ep.test(e);
|
||
}
|
||
function eY(e) {
|
||
switch (e) {
|
||
case 33:
|
||
case 34:
|
||
case 35:
|
||
case 36:
|
||
case 37:
|
||
case 38:
|
||
case 39:
|
||
case 40:
|
||
case 41:
|
||
case 42:
|
||
case 43:
|
||
case 44:
|
||
case 45:
|
||
case 46:
|
||
case 47:
|
||
case 58:
|
||
case 59:
|
||
case 60:
|
||
case 61:
|
||
case 62:
|
||
case 63:
|
||
case 64:
|
||
case 91:
|
||
case 92:
|
||
case 93:
|
||
case 94:
|
||
case 95:
|
||
case 96:
|
||
case 123:
|
||
case 124:
|
||
case 125:
|
||
case 126:
|
||
return !0;
|
||
default:
|
||
return !1;
|
||
}
|
||
}
|
||
function eJ(e) {
|
||
return (e = e.trim().replace(/\s+/g, " ")).toLowerCase().toUpperCase();
|
||
}
|
||
let eZ = { mdurl: eu, ucmicro: eb };
|
||
e.s(
|
||
[
|
||
"arrayReplaceAt",
|
||
() => eP,
|
||
"assign",
|
||
() => eI,
|
||
"escapeHtml",
|
||
() => e$,
|
||
"escapeRE",
|
||
() => eW,
|
||
"fromCodePoint",
|
||
() => eL,
|
||
"has",
|
||
() => eN,
|
||
"isMdAsciiPunct",
|
||
() => eY,
|
||
"isPunctChar",
|
||
() => eX,
|
||
"isSpace",
|
||
() => eK,
|
||
"isString",
|
||
() => eC,
|
||
"isValidEntityCode",
|
||
() => eR,
|
||
"isWhiteSpace",
|
||
() => eq,
|
||
"lib",
|
||
() => eZ,
|
||
"normalizeReference",
|
||
() => eJ,
|
||
"unescapeAll",
|
||
() => eU,
|
||
"unescapeMd",
|
||
() => eF,
|
||
],
|
||
503809,
|
||
);
|
||
var eQ = e.i(503809);
|
||
function e1(e, t, n) {
|
||
let i,
|
||
r,
|
||
a,
|
||
o,
|
||
s = e.posMax,
|
||
c = e.pos;
|
||
for (e.pos = t + 1, i = 1; e.pos < s; ) {
|
||
if (93 === (a = e.src.charCodeAt(e.pos)) && 0 == --i) {
|
||
r = !0;
|
||
break;
|
||
}
|
||
if (((o = e.pos), e.md.inline.skipToken(e), 91 === a)) {
|
||
if (o === e.pos - 1) i++;
|
||
else if (n) return (e.pos = c), -1;
|
||
}
|
||
}
|
||
let l = -1;
|
||
return r && (l = e.pos), (e.pos = c), l;
|
||
}
|
||
function e0(e, t, n) {
|
||
let i,
|
||
r = t,
|
||
a = { ok: !1, pos: 0, str: "" };
|
||
if (60 === e.charCodeAt(r)) {
|
||
for (r++; r < n && 10 !== (i = e.charCodeAt(r)) && 60 !== i; ) {
|
||
if (62 === i) {
|
||
(a.pos = r + 1), (a.str = eU(e.slice(t + 1, r))), (a.ok = !0);
|
||
break;
|
||
}
|
||
if (92 === i && r + 1 < n) {
|
||
r += 2;
|
||
continue;
|
||
}
|
||
r++;
|
||
}
|
||
return a;
|
||
}
|
||
let o = 0;
|
||
for (
|
||
;
|
||
r < n && 32 !== (i = e.charCodeAt(r)) && !(i < 32) && 127 !== i;
|
||
|
||
) {
|
||
if (92 === i && r + 1 < n) {
|
||
if (32 === e.charCodeAt(r + 1)) break;
|
||
r += 2;
|
||
continue;
|
||
}
|
||
if (40 === i && ++o > 32) return a;
|
||
if (41 === i) {
|
||
if (0 === o) break;
|
||
o--;
|
||
}
|
||
r++;
|
||
}
|
||
return (
|
||
t === r ||
|
||
0 !== o ||
|
||
((a.str = eU(e.slice(t, r))), (a.pos = r), (a.ok = !0)),
|
||
a
|
||
);
|
||
}
|
||
function e2(e, t, n, i) {
|
||
let r,
|
||
a = t,
|
||
o = { ok: !1, can_continue: !1, pos: 0, str: "", marker: 0 };
|
||
if (i) (o.str = i.str), (o.marker = i.marker);
|
||
else {
|
||
if (a >= n) return o;
|
||
let i = e.charCodeAt(a);
|
||
if (34 !== i && 39 !== i && 40 !== i) return o;
|
||
t++, a++, 40 === i && (i = 41), (o.marker = i);
|
||
}
|
||
for (; a < n; ) {
|
||
if ((r = e.charCodeAt(a)) === o.marker)
|
||
return (o.pos = a + 1), (o.str += eU(e.slice(t, a))), (o.ok = !0), o;
|
||
if (40 === r && 41 === o.marker) return o;
|
||
92 === r && a + 1 < n && a++, a++;
|
||
}
|
||
return (o.can_continue = !0), (o.str += eU(e.slice(t, a))), o;
|
||
}
|
||
e.s([], 313224),
|
||
e.i(313224),
|
||
e.s(
|
||
[
|
||
"parseLinkDestination",
|
||
() => e0,
|
||
"parseLinkLabel",
|
||
() => e1,
|
||
"parseLinkTitle",
|
||
() => e2,
|
||
],
|
||
876139,
|
||
);
|
||
var e3 = e.i(876139);
|
||
let e4 = {};
|
||
function e5() {
|
||
this.rules = eI({}, e4);
|
||
}
|
||
function e6() {
|
||
(this.__rules__ = []), (this.__cache__ = null);
|
||
}
|
||
function e8(e, t, n) {
|
||
(this.type = e),
|
||
(this.tag = t),
|
||
(this.attrs = null),
|
||
(this.map = null),
|
||
(this.nesting = n),
|
||
(this.level = 0),
|
||
(this.children = null),
|
||
(this.content = ""),
|
||
(this.markup = ""),
|
||
(this.info = ""),
|
||
(this.meta = null),
|
||
(this.block = !1),
|
||
(this.hidden = !1);
|
||
}
|
||
function e9(e, t, n) {
|
||
(this.src = e),
|
||
(this.env = n),
|
||
(this.tokens = []),
|
||
(this.inlineMode = !1),
|
||
(this.md = t);
|
||
}
|
||
(e4.code_inline = function (e, t, n, i, r) {
|
||
let a = e[t];
|
||
return "<code" + r.renderAttrs(a) + ">" + e$(a.content) + "</code>";
|
||
}),
|
||
(e4.code_block = function (e, t, n, i, r) {
|
||
let a = e[t];
|
||
return (
|
||
"<pre" +
|
||
r.renderAttrs(a) +
|
||
"><code>" +
|
||
e$(e[t].content) +
|
||
"</code></pre>\n"
|
||
);
|
||
}),
|
||
(e4.fence = function (e, t, n, i, r) {
|
||
let a,
|
||
o = e[t],
|
||
s = o.info ? eU(o.info).trim() : "",
|
||
c = "",
|
||
l = "";
|
||
if (s) {
|
||
let e = s.split(/(\s+)/g);
|
||
(c = e[0]), (l = e.slice(2).join(""));
|
||
}
|
||
if (
|
||
0 ===
|
||
(a =
|
||
(n.highlight && n.highlight(o.content, c, l)) ||
|
||
e$(o.content)).indexOf("<pre")
|
||
)
|
||
return a + "\n";
|
||
if (s) {
|
||
let e = o.attrIndex("class"),
|
||
t = o.attrs ? o.attrs.slice() : [];
|
||
return (
|
||
e < 0
|
||
? t.push(["class", n.langPrefix + c])
|
||
: ((t[e] = t[e].slice()), (t[e][1] += " " + n.langPrefix + c)),
|
||
`<pre><code${r.renderAttrs({ attrs: t })}>${a}</code></pre>
|
||
`
|
||
);
|
||
}
|
||
return `<pre><code${r.renderAttrs(o)}>${a}</code></pre>
|
||
`;
|
||
}),
|
||
(e4.image = function (e, t, n, i, r) {
|
||
let a = e[t];
|
||
return (
|
||
(a.attrs[a.attrIndex("alt")][1] = r.renderInlineAsText(
|
||
a.children,
|
||
n,
|
||
i,
|
||
)),
|
||
r.renderToken(e, t, n)
|
||
);
|
||
}),
|
||
(e4.hardbreak = function (e, t, n) {
|
||
return n.xhtmlOut ? "<br />\n" : "<br>\n";
|
||
}),
|
||
(e4.softbreak = function (e, t, n) {
|
||
return n.breaks ? (n.xhtmlOut ? "<br />\n" : "<br>\n") : "\n";
|
||
}),
|
||
(e4.text = function (e, t) {
|
||
return e$(e[t].content);
|
||
}),
|
||
(e4.html_block = function (e, t) {
|
||
return e[t].content;
|
||
}),
|
||
(e4.html_inline = function (e, t) {
|
||
return e[t].content;
|
||
}),
|
||
(e5.prototype.renderAttrs = function (e) {
|
||
let t, n, i;
|
||
if (!e.attrs) return "";
|
||
for (t = 0, i = "", n = e.attrs.length; t < n; t++)
|
||
i += " " + e$(e.attrs[t][0]) + '="' + e$(e.attrs[t][1]) + '"';
|
||
return i;
|
||
}),
|
||
(e5.prototype.renderToken = function (e, t, n) {
|
||
let i = e[t],
|
||
r = "";
|
||
if (i.hidden) return "";
|
||
i.block && -1 !== i.nesting && t && e[t - 1].hidden && (r += "\n"),
|
||
(r += (-1 === i.nesting ? "</" : "<") + i.tag),
|
||
(r += this.renderAttrs(i)),
|
||
0 === i.nesting && n.xhtmlOut && (r += " /");
|
||
let a = !1;
|
||
if (i.block && ((a = !0), 1 === i.nesting && t + 1 < e.length)) {
|
||
let n = e[t + 1];
|
||
"inline" === n.type || n.hidden
|
||
? (a = !1)
|
||
: -1 === n.nesting && n.tag === i.tag && (a = !1);
|
||
}
|
||
return r + (a ? ">\n" : ">");
|
||
}),
|
||
(e5.prototype.renderInline = function (e, t, n) {
|
||
let i = "",
|
||
r = this.rules;
|
||
for (let a = 0, o = e.length; a < o; a++) {
|
||
let o = e[a].type;
|
||
void 0 !== r[o]
|
||
? (i += r[o](e, a, t, n, this))
|
||
: (i += this.renderToken(e, a, t));
|
||
}
|
||
return i;
|
||
}),
|
||
(e5.prototype.renderInlineAsText = function (e, t, n) {
|
||
let i = "";
|
||
for (let r = 0, a = e.length; r < a; r++)
|
||
switch (e[r].type) {
|
||
case "text":
|
||
case "html_inline":
|
||
case "html_block":
|
||
i += e[r].content;
|
||
break;
|
||
case "image":
|
||
i += this.renderInlineAsText(e[r].children, t, n);
|
||
break;
|
||
case "softbreak":
|
||
case "hardbreak":
|
||
i += "\n";
|
||
}
|
||
return i;
|
||
}),
|
||
(e5.prototype.render = function (e, t, n) {
|
||
let i = "",
|
||
r = this.rules;
|
||
for (let a = 0, o = e.length; a < o; a++) {
|
||
let o = e[a].type;
|
||
"inline" === o
|
||
? (i += this.renderInline(e[a].children, t, n))
|
||
: void 0 !== r[o]
|
||
? (i += r[o](e, a, t, n, this))
|
||
: (i += this.renderToken(e, a, t, n));
|
||
}
|
||
return i;
|
||
}),
|
||
(e6.prototype.__find__ = function (e) {
|
||
for (let t = 0; t < this.__rules__.length; t++)
|
||
if (this.__rules__[t].name === e) return t;
|
||
return -1;
|
||
}),
|
||
(e6.prototype.__compile__ = function () {
|
||
let e = this,
|
||
t = [""];
|
||
e.__rules__.forEach(function (e) {
|
||
e.enabled &&
|
||
e.alt.forEach(function (e) {
|
||
0 > t.indexOf(e) && t.push(e);
|
||
});
|
||
}),
|
||
(e.__cache__ = {}),
|
||
t.forEach(function (t) {
|
||
(e.__cache__[t] = []),
|
||
e.__rules__.forEach(function (n) {
|
||
!n.enabled ||
|
||
(t && 0 > n.alt.indexOf(t)) ||
|
||
e.__cache__[t].push(n.fn);
|
||
});
|
||
});
|
||
}),
|
||
(e6.prototype.at = function (e, t, n) {
|
||
let i = this.__find__(e);
|
||
if (-1 === i) throw Error("Parser rule not found: " + e);
|
||
(this.__rules__[i].fn = t),
|
||
(this.__rules__[i].alt = (n || {}).alt || []),
|
||
(this.__cache__ = null);
|
||
}),
|
||
(e6.prototype.before = function (e, t, n, i) {
|
||
let r = this.__find__(e);
|
||
if (-1 === r) throw Error("Parser rule not found: " + e);
|
||
this.__rules__.splice(r, 0, {
|
||
name: t,
|
||
enabled: !0,
|
||
fn: n,
|
||
alt: (i || {}).alt || [],
|
||
}),
|
||
(this.__cache__ = null);
|
||
}),
|
||
(e6.prototype.after = function (e, t, n, i) {
|
||
let r = this.__find__(e);
|
||
if (-1 === r) throw Error("Parser rule not found: " + e);
|
||
this.__rules__.splice(r + 1, 0, {
|
||
name: t,
|
||
enabled: !0,
|
||
fn: n,
|
||
alt: (i || {}).alt || [],
|
||
}),
|
||
(this.__cache__ = null);
|
||
}),
|
||
(e6.prototype.push = function (e, t, n) {
|
||
this.__rules__.push({
|
||
name: e,
|
||
enabled: !0,
|
||
fn: t,
|
||
alt: (n || {}).alt || [],
|
||
}),
|
||
(this.__cache__ = null);
|
||
}),
|
||
(e6.prototype.enable = function (e, t) {
|
||
Array.isArray(e) || (e = [e]);
|
||
let n = [];
|
||
return (
|
||
e.forEach(function (e) {
|
||
let i = this.__find__(e);
|
||
if (i < 0) {
|
||
if (t) return;
|
||
throw Error("Rules manager: invalid rule name " + e);
|
||
}
|
||
(this.__rules__[i].enabled = !0), n.push(e);
|
||
}, this),
|
||
(this.__cache__ = null),
|
||
n
|
||
);
|
||
}),
|
||
(e6.prototype.enableOnly = function (e, t) {
|
||
Array.isArray(e) || (e = [e]),
|
||
this.__rules__.forEach(function (e) {
|
||
e.enabled = !1;
|
||
}),
|
||
this.enable(e, t);
|
||
}),
|
||
(e6.prototype.disable = function (e, t) {
|
||
Array.isArray(e) || (e = [e]);
|
||
let n = [];
|
||
return (
|
||
e.forEach(function (e) {
|
||
let i = this.__find__(e);
|
||
if (i < 0) {
|
||
if (t) return;
|
||
throw Error("Rules manager: invalid rule name " + e);
|
||
}
|
||
(this.__rules__[i].enabled = !1), n.push(e);
|
||
}, this),
|
||
(this.__cache__ = null),
|
||
n
|
||
);
|
||
}),
|
||
(e6.prototype.getRules = function (e) {
|
||
return (
|
||
null === this.__cache__ && this.__compile__(), this.__cache__[e] || []
|
||
);
|
||
}),
|
||
(e8.prototype.attrIndex = function (e) {
|
||
if (!this.attrs) return -1;
|
||
let t = this.attrs;
|
||
for (let n = 0, i = t.length; n < i; n++) if (t[n][0] === e) return n;
|
||
return -1;
|
||
}),
|
||
(e8.prototype.attrPush = function (e) {
|
||
this.attrs ? this.attrs.push(e) : (this.attrs = [e]);
|
||
}),
|
||
(e8.prototype.attrSet = function (e, t) {
|
||
let n = this.attrIndex(e),
|
||
i = [e, t];
|
||
n < 0 ? this.attrPush(i) : (this.attrs[n] = i);
|
||
}),
|
||
(e8.prototype.attrGet = function (e) {
|
||
let t = this.attrIndex(e),
|
||
n = null;
|
||
return t >= 0 && (n = this.attrs[t][1]), n;
|
||
}),
|
||
(e8.prototype.attrJoin = function (e, t) {
|
||
let n = this.attrIndex(e);
|
||
n < 0
|
||
? this.attrPush([e, t])
|
||
: (this.attrs[n][1] = this.attrs[n][1] + " " + t);
|
||
}),
|
||
(e9.prototype.Token = e8);
|
||
let e7 = /\r\n?|\n/g,
|
||
te = /\0/g,
|
||
tt = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/,
|
||
tn = /\((c|tm|r)\)/i,
|
||
ti = /\((c|tm|r)\)/gi,
|
||
tr = { c: "©", r: "®", tm: "™" };
|
||
function ta(e, t) {
|
||
return tr[t.toLowerCase()];
|
||
}
|
||
let to = /['"]/,
|
||
ts = /['"]/g;
|
||
function tc(e, t, n) {
|
||
return e.slice(0, t) + n + e.slice(t + 1);
|
||
}
|
||
let tl = [
|
||
[
|
||
"normalize",
|
||
function (e) {
|
||
let t;
|
||
(t = (t = e.src.replace(e7, "\n")).replace(te, "<22>")), (e.src = t);
|
||
},
|
||
],
|
||
[
|
||
"block",
|
||
function (e) {
|
||
let t;
|
||
e.inlineMode
|
||
? (((t = new e.Token("inline", "", 0)).content = e.src),
|
||
(t.map = [0, 1]),
|
||
(t.children = []),
|
||
e.tokens.push(t))
|
||
: e.md.block.parse(e.src, e.md, e.env, e.tokens);
|
||
},
|
||
],
|
||
[
|
||
"inline",
|
||
function (e) {
|
||
let t = e.tokens;
|
||
for (let n = 0, i = t.length; n < i; n++) {
|
||
let i = t[n];
|
||
"inline" === i.type &&
|
||
e.md.inline.parse(i.content, e.md, e.env, i.children);
|
||
}
|
||
},
|
||
],
|
||
[
|
||
"linkify",
|
||
function (e) {
|
||
let t = e.tokens;
|
||
if (e.md.options.linkify)
|
||
for (let r = 0, a = t.length; r < a; r++) {
|
||
if ("inline" !== t[r].type || !e.md.linkify.pretest(t[r].content))
|
||
continue;
|
||
let a = t[r].children,
|
||
o = 0;
|
||
for (let s = a.length - 1; s >= 0; s--) {
|
||
let c = a[s];
|
||
if ("link_close" === c.type) {
|
||
for (
|
||
s--;
|
||
a[s].level !== c.level && "link_open" !== a[s].type;
|
||
|
||
)
|
||
s--;
|
||
continue;
|
||
}
|
||
if ("html_inline" === c.type) {
|
||
var n, i;
|
||
(n = c.content),
|
||
/^<a[>\s]/i.test(n) && o > 0 && o--,
|
||
(i = c.content),
|
||
/^<\/a\s*>/i.test(i) && o++;
|
||
}
|
||
if (
|
||
!(o > 0) &&
|
||
"text" === c.type &&
|
||
e.md.linkify.test(c.content)
|
||
) {
|
||
let n = c.content,
|
||
i = e.md.linkify.match(n),
|
||
o = [],
|
||
l = c.level,
|
||
u = 0;
|
||
i.length > 0 &&
|
||
0 === i[0].index &&
|
||
s > 0 &&
|
||
"text_special" === a[s - 1].type &&
|
||
(i = i.slice(1));
|
||
for (let t = 0; t < i.length; t++) {
|
||
let r = i[t].url,
|
||
a = e.md.normalizeLink(r);
|
||
if (!e.md.validateLink(a)) continue;
|
||
let s = i[t].text;
|
||
s = i[t].schema
|
||
? "mailto:" !== i[t].schema || /^mailto:/i.test(s)
|
||
? e.md.normalizeLinkText(s)
|
||
: e.md
|
||
.normalizeLinkText("mailto:" + s)
|
||
.replace(/^mailto:/, "")
|
||
: e.md
|
||
.normalizeLinkText("http://" + s)
|
||
.replace(/^http:\/\//, "");
|
||
let c = i[t].index;
|
||
if (c > u) {
|
||
let t = new e.Token("text", "", 0);
|
||
(t.content = n.slice(u, c)), (t.level = l), o.push(t);
|
||
}
|
||
let h = new e.Token("link_open", "a", 1);
|
||
(h.attrs = [["href", a]]),
|
||
(h.level = l++),
|
||
(h.markup = "linkify"),
|
||
(h.info = "auto"),
|
||
o.push(h);
|
||
let f = new e.Token("text", "", 0);
|
||
(f.content = s), (f.level = l), o.push(f);
|
||
let d = new e.Token("link_close", "a", -1);
|
||
(d.level = --l),
|
||
(d.markup = "linkify"),
|
||
(d.info = "auto"),
|
||
o.push(d),
|
||
(u = i[t].lastIndex);
|
||
}
|
||
if (u < n.length) {
|
||
let t = new e.Token("text", "", 0);
|
||
(t.content = n.slice(u)), (t.level = l), o.push(t);
|
||
}
|
||
t[r].children = a = eP(a, s, o);
|
||
}
|
||
}
|
||
}
|
||
},
|
||
],
|
||
[
|
||
"replacements",
|
||
function (e) {
|
||
let t;
|
||
if (e.md.options.typographer)
|
||
for (t = e.tokens.length - 1; t >= 0; t--)
|
||
"inline" === e.tokens[t].type &&
|
||
(tn.test(e.tokens[t].content) &&
|
||
(function (e) {
|
||
let t = 0;
|
||
for (let n = e.length - 1; n >= 0; n--) {
|
||
let i = e[n];
|
||
"text" !== i.type ||
|
||
t ||
|
||
(i.content = i.content.replace(ti, ta)),
|
||
"link_open" === i.type && "auto" === i.info && t--,
|
||
"link_close" === i.type && "auto" === i.info && t++;
|
||
}
|
||
})(e.tokens[t].children),
|
||
tt.test(e.tokens[t].content) &&
|
||
(function (e) {
|
||
let t = 0;
|
||
for (let n = e.length - 1; n >= 0; n--) {
|
||
let i = e[n];
|
||
"text" === i.type &&
|
||
!t &&
|
||
tt.test(i.content) &&
|
||
(i.content = i.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–")),
|
||
"link_open" === i.type && "auto" === i.info && t--,
|
||
"link_close" === i.type && "auto" === i.info && t++;
|
||
}
|
||
})(e.tokens[t].children));
|
||
},
|
||
],
|
||
[
|
||
"smartquotes",
|
||
function (e) {
|
||
if (e.md.options.typographer)
|
||
for (let t = e.tokens.length - 1; t >= 0; t--)
|
||
"inline" === e.tokens[t].type &&
|
||
to.test(e.tokens[t].content) &&
|
||
(function (e, t) {
|
||
let n,
|
||
i = [];
|
||
for (let r = 0; r < e.length; r++) {
|
||
let a = e[r],
|
||
o = e[r].level;
|
||
for (n = i.length - 1; n >= 0 && !(i[n].level <= o); n--);
|
||
if (((i.length = n + 1), "text" !== a.type)) continue;
|
||
let s = a.content,
|
||
c = 0,
|
||
l = s.length;
|
||
r: for (; c < l; ) {
|
||
ts.lastIndex = c;
|
||
let u = ts.exec(s);
|
||
if (!u) break;
|
||
let h = !0,
|
||
f = !0;
|
||
c = u.index + 1;
|
||
let d = "'" === u[0],
|
||
p = 32;
|
||
if (u.index - 1 >= 0) p = s.charCodeAt(u.index - 1);
|
||
else
|
||
for (
|
||
n = r - 1;
|
||
n >= 0 &&
|
||
"softbreak" !== e[n].type &&
|
||
"hardbreak" !== e[n].type;
|
||
n--
|
||
)
|
||
if (e[n].content) {
|
||
p = e[n].content.charCodeAt(
|
||
e[n].content.length - 1,
|
||
);
|
||
break;
|
||
}
|
||
let g = 32;
|
||
if (c < l) g = s.charCodeAt(c);
|
||
else
|
||
for (
|
||
n = r + 1;
|
||
n < e.length &&
|
||
"softbreak" !== e[n].type &&
|
||
"hardbreak" !== e[n].type;
|
||
n++
|
||
)
|
||
if (e[n].content) {
|
||
g = e[n].content.charCodeAt(0);
|
||
break;
|
||
}
|
||
let b = eY(p) || eX(String.fromCharCode(p)),
|
||
m = eY(g) || eX(String.fromCharCode(g)),
|
||
w = eq(p),
|
||
v = eq(g);
|
||
if (
|
||
(v ? (h = !1) : m && !(w || b) && (h = !1),
|
||
w ? (f = !1) : b && !(v || m) && (f = !1),
|
||
34 === g &&
|
||
'"' === u[0] &&
|
||
p >= 48 &&
|
||
p <= 57 &&
|
||
(f = h = !1),
|
||
h && f && ((h = b), (f = m)),
|
||
!h && !f)
|
||
) {
|
||
d && (a.content = tc(a.content, u.index, "’"));
|
||
continue;
|
||
}
|
||
if (f)
|
||
for (n = i.length - 1; n >= 0; n--) {
|
||
let h = i[n];
|
||
if (i[n].level < o) break;
|
||
if (h.single === d && i[n].level === o) {
|
||
let o, f;
|
||
(h = i[n]),
|
||
d
|
||
? ((o = t.md.options.quotes[2]),
|
||
(f = t.md.options.quotes[3]))
|
||
: ((o = t.md.options.quotes[0]),
|
||
(f = t.md.options.quotes[1])),
|
||
(a.content = tc(a.content, u.index, f)),
|
||
(e[h.token].content = tc(
|
||
e[h.token].content,
|
||
h.pos,
|
||
o,
|
||
)),
|
||
(c += f.length - 1),
|
||
h.token === r && (c += o.length - 1),
|
||
(l = (s = a.content).length),
|
||
(i.length = n);
|
||
continue r;
|
||
}
|
||
}
|
||
h
|
||
? i.push({
|
||
token: r,
|
||
pos: u.index,
|
||
single: d,
|
||
level: o,
|
||
})
|
||
: f && d && (a.content = tc(a.content, u.index, "’"));
|
||
}
|
||
}
|
||
})(e.tokens[t].children, e);
|
||
},
|
||
],
|
||
[
|
||
"text_join",
|
||
function (e) {
|
||
let t,
|
||
n,
|
||
i = e.tokens,
|
||
r = i.length;
|
||
for (let e = 0; e < r; e++) {
|
||
if ("inline" !== i[e].type) continue;
|
||
let r = i[e].children,
|
||
a = r.length;
|
||
for (t = 0; t < a; t++)
|
||
"text_special" === r[t].type && (r[t].type = "text");
|
||
for (t = n = 0; t < a; t++)
|
||
"text" === r[t].type && t + 1 < a && "text" === r[t + 1].type
|
||
? (r[t + 1].content = r[t].content + r[t + 1].content)
|
||
: (t !== n && (r[n] = r[t]), n++);
|
||
t !== n && (r.length = n);
|
||
}
|
||
},
|
||
],
|
||
];
|
||
function tu() {
|
||
this.ruler = new e6();
|
||
for (let e = 0; e < tl.length; e++) this.ruler.push(tl[e][0], tl[e][1]);
|
||
}
|
||
function th(e, t, n, i) {
|
||
(this.src = e),
|
||
(this.md = t),
|
||
(this.env = n),
|
||
(this.tokens = i),
|
||
(this.bMarks = []),
|
||
(this.eMarks = []),
|
||
(this.tShift = []),
|
||
(this.sCount = []),
|
||
(this.bsCount = []),
|
||
(this.blkIndent = 0),
|
||
(this.line = 0),
|
||
(this.lineMax = 0),
|
||
(this.tight = !1),
|
||
(this.ddIndent = -1),
|
||
(this.listIndent = -1),
|
||
(this.parentType = "root"),
|
||
(this.level = 0);
|
||
let r = this.src;
|
||
for (let e = 0, t = 0, n = 0, i = 0, a = r.length, o = !1; t < a; t++) {
|
||
let s = r.charCodeAt(t);
|
||
if (!o)
|
||
if (eK(s)) {
|
||
n++, 9 === s ? (i += 4 - (i % 4)) : i++;
|
||
continue;
|
||
} else o = !0;
|
||
(10 === s || t === a - 1) &&
|
||
(10 !== s && t++,
|
||
this.bMarks.push(e),
|
||
this.eMarks.push(t),
|
||
this.tShift.push(n),
|
||
this.sCount.push(i),
|
||
this.bsCount.push(0),
|
||
(o = !1),
|
||
(n = 0),
|
||
(i = 0),
|
||
(e = t + 1));
|
||
}
|
||
this.bMarks.push(r.length),
|
||
this.eMarks.push(r.length),
|
||
this.tShift.push(0),
|
||
this.sCount.push(0),
|
||
this.bsCount.push(0),
|
||
(this.lineMax = this.bMarks.length - 1);
|
||
}
|
||
function tf(e, t) {
|
||
let n = e.bMarks[t] + e.tShift[t],
|
||
i = e.eMarks[t];
|
||
return e.src.slice(n, i);
|
||
}
|
||
function td(e) {
|
||
let t = [],
|
||
n = e.length,
|
||
i = 0,
|
||
r = e.charCodeAt(i),
|
||
a = !1,
|
||
o = 0,
|
||
s = "";
|
||
for (; i < n; )
|
||
124 === r &&
|
||
(a
|
||
? ((s += e.substring(o, i - 1)), (o = i))
|
||
: (t.push(s + e.substring(o, i)), (s = ""), (o = i + 1))),
|
||
(a = 92 === r),
|
||
i++,
|
||
(r = e.charCodeAt(i));
|
||
return t.push(s + e.substring(o)), t;
|
||
}
|
||
function tp(e, t) {
|
||
let n = e.eMarks[t],
|
||
i = e.bMarks[t] + e.tShift[t],
|
||
r = e.src.charCodeAt(i++);
|
||
return (42 !== r && 45 !== r && 43 !== r) ||
|
||
(i < n && !eK(e.src.charCodeAt(i)))
|
||
? -1
|
||
: i;
|
||
}
|
||
function tg(e, t) {
|
||
let n = e.bMarks[t] + e.tShift[t],
|
||
i = e.eMarks[t],
|
||
r = n;
|
||
if (r + 1 >= i) return -1;
|
||
let a = e.src.charCodeAt(r++);
|
||
if (a < 48 || a > 57) return -1;
|
||
for (;;) {
|
||
if (r >= i) return -1;
|
||
if ((a = e.src.charCodeAt(r++)) >= 48 && a <= 57) {
|
||
if (r - n >= 10) return -1;
|
||
continue;
|
||
}
|
||
if (41 === a || 46 === a) break;
|
||
return -1;
|
||
}
|
||
return r < i && !eK((a = e.src.charCodeAt(r))) ? -1 : r;
|
||
}
|
||
(tu.prototype.process = function (e) {
|
||
let t = this.ruler.getRules("");
|
||
for (let n = 0, i = t.length; n < i; n++) t[n](e);
|
||
}),
|
||
(tu.prototype.State = e9),
|
||
(th.prototype.push = function (e, t, n) {
|
||
let i = new e8(e, t, n);
|
||
return (
|
||
(i.block = !0),
|
||
n < 0 && this.level--,
|
||
(i.level = this.level),
|
||
n > 0 && this.level++,
|
||
this.tokens.push(i),
|
||
i
|
||
);
|
||
}),
|
||
(th.prototype.isEmpty = function (e) {
|
||
return this.bMarks[e] + this.tShift[e] >= this.eMarks[e];
|
||
}),
|
||
(th.prototype.skipEmptyLines = function (e) {
|
||
for (
|
||
let t = this.lineMax;
|
||
e < t && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]);
|
||
e++
|
||
);
|
||
return e;
|
||
}),
|
||
(th.prototype.skipSpaces = function (e) {
|
||
for (let t = this.src.length; e < t && eK(this.src.charCodeAt(e)); e++);
|
||
return e;
|
||
}),
|
||
(th.prototype.skipSpacesBack = function (e, t) {
|
||
if (e <= t) return e;
|
||
for (; e > t; ) if (!eK(this.src.charCodeAt(--e))) return e + 1;
|
||
return e;
|
||
}),
|
||
(th.prototype.skipChars = function (e, t) {
|
||
for (
|
||
let n = this.src.length;
|
||
e < n && this.src.charCodeAt(e) === t;
|
||
e++
|
||
);
|
||
return e;
|
||
}),
|
||
(th.prototype.skipCharsBack = function (e, t, n) {
|
||
if (e <= n) return e;
|
||
for (; e > n; ) if (t !== this.src.charCodeAt(--e)) return e + 1;
|
||
return e;
|
||
}),
|
||
(th.prototype.getLines = function (e, t, n, i) {
|
||
if (e >= t) return "";
|
||
let r = Array(t - e);
|
||
for (let a = 0, o = e; o < t; o++, a++) {
|
||
let e,
|
||
s = 0,
|
||
c = this.bMarks[o],
|
||
l = c;
|
||
for (
|
||
e = o + 1 < t || i ? this.eMarks[o] + 1 : this.eMarks[o];
|
||
l < e && s < n;
|
||
|
||
) {
|
||
let e = this.src.charCodeAt(l);
|
||
if (eK(e)) 9 === e ? (s += 4 - ((s + this.bsCount[o]) % 4)) : s++;
|
||
else if (l - c < this.tShift[o]) s++;
|
||
else break;
|
||
l++;
|
||
}
|
||
s > n
|
||
? (r[a] = Array(s - n + 1).join(" ") + this.src.slice(l, e))
|
||
: (r[a] = this.src.slice(l, e));
|
||
}
|
||
return r.join("");
|
||
}),
|
||
(th.prototype.Token = e8);
|
||
let tb =
|
||
"<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",
|
||
tm = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",
|
||
tw = RegExp(
|
||
"^(?:" +
|
||
tb +
|
||
"|" +
|
||
tm +
|
||
"|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)",
|
||
),
|
||
tv = RegExp("^(?:" + tb + "|" + tm + ")"),
|
||
tx = [
|
||
[
|
||
/^<(script|pre|style|textarea)(?=(\s|>|$))/i,
|
||
/<\/(script|pre|style|textarea)>/i,
|
||
!0,
|
||
],
|
||
[/^<!--/, /-->/, !0],
|
||
[/^<\?/, /\?>/, !0],
|
||
[/^<![A-Z]/, />/, !0],
|
||
[/^<!\[CDATA\[/, /\]\]>/, !0],
|
||
[
|
||
RegExp(
|
||
"^</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?=(\\s|/?>|$))",
|
||
"i",
|
||
),
|
||
/^$/,
|
||
!0,
|
||
],
|
||
[RegExp(tv.source + "\\s*$"), /^$/, !1],
|
||
],
|
||
ty = [
|
||
[
|
||
"table",
|
||
function (e, t, n, i) {
|
||
let r;
|
||
if (t + 2 > n) return !1;
|
||
let a = t + 1;
|
||
if (e.sCount[a] < e.blkIndent || e.sCount[a] - e.blkIndent >= 4)
|
||
return !1;
|
||
let o = e.bMarks[a] + e.tShift[a];
|
||
if (o >= e.eMarks[a]) return !1;
|
||
let s = e.src.charCodeAt(o++);
|
||
if ((124 !== s && 45 !== s && 58 !== s) || o >= e.eMarks[a])
|
||
return !1;
|
||
let c = e.src.charCodeAt(o++);
|
||
if (
|
||
(124 !== c && 45 !== c && 58 !== c && !eK(c)) ||
|
||
(45 === s && eK(c))
|
||
)
|
||
return !1;
|
||
for (; o < e.eMarks[a]; ) {
|
||
let t = e.src.charCodeAt(o);
|
||
if (124 !== t && 45 !== t && 58 !== t && !eK(t)) return !1;
|
||
o++;
|
||
}
|
||
let l = tf(e, t + 1),
|
||
u = l.split("|"),
|
||
h = [];
|
||
for (let e = 0; e < u.length; e++) {
|
||
let t = u[e].trim();
|
||
if (!t)
|
||
if (0 === e || e === u.length - 1) continue;
|
||
else return !1;
|
||
if (!/^:?-+:?$/.test(t)) return !1;
|
||
58 === t.charCodeAt(t.length - 1)
|
||
? h.push(58 === t.charCodeAt(0) ? "center" : "right")
|
||
: 58 === t.charCodeAt(0)
|
||
? h.push("left")
|
||
: h.push("");
|
||
}
|
||
if (
|
||
-1 === (l = tf(e, t).trim()).indexOf("|") ||
|
||
e.sCount[t] - e.blkIndent >= 4
|
||
)
|
||
return !1;
|
||
(u = td(l)).length && "" === u[0] && u.shift(),
|
||
u.length && "" === u[u.length - 1] && u.pop();
|
||
let f = u.length;
|
||
if (0 === f || f !== h.length) return !1;
|
||
if (i) return !0;
|
||
let d = e.parentType;
|
||
e.parentType = "table";
|
||
let p = e.md.block.ruler.getRules("blockquote"),
|
||
g = e.push("table_open", "table", 1),
|
||
b = [t, 0];
|
||
(g.map = b),
|
||
(e.push("thead_open", "thead", 1).map = [t, t + 1]),
|
||
(e.push("tr_open", "tr", 1).map = [t, t + 1]);
|
||
for (let t = 0; t < u.length; t++) {
|
||
let n = e.push("th_open", "th", 1);
|
||
h[t] && (n.attrs = [["style", "text-align:" + h[t]]]);
|
||
let i = e.push("inline", "", 0);
|
||
(i.content = u[t].trim()),
|
||
(i.children = []),
|
||
e.push("th_close", "th", -1);
|
||
}
|
||
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
||
let m = 0;
|
||
for (a = t + 2; a < n && !(e.sCount[a] < e.blkIndent); a++) {
|
||
let i = !1;
|
||
for (let t = 0, r = p.length; t < r; t++)
|
||
if (p[t](e, a, n, !0)) {
|
||
i = !0;
|
||
break;
|
||
}
|
||
if (
|
||
i ||
|
||
!(l = tf(e, a).trim()) ||
|
||
e.sCount[a] - e.blkIndent >= 4 ||
|
||
((u = td(l)).length && "" === u[0] && u.shift(),
|
||
u.length && "" === u[u.length - 1] && u.pop(),
|
||
(m += f - u.length) > 65536)
|
||
)
|
||
break;
|
||
a === t + 2 &&
|
||
(e.push("tbody_open", "tbody", 1).map = r = [t + 2, 0]),
|
||
(e.push("tr_open", "tr", 1).map = [a, a + 1]);
|
||
for (let t = 0; t < f; t++) {
|
||
let n = e.push("td_open", "td", 1);
|
||
h[t] && (n.attrs = [["style", "text-align:" + h[t]]]);
|
||
let i = e.push("inline", "", 0);
|
||
(i.content = u[t] ? u[t].trim() : ""),
|
||
(i.children = []),
|
||
e.push("td_close", "td", -1);
|
||
}
|
||
e.push("tr_close", "tr", -1);
|
||
}
|
||
return (
|
||
r && (e.push("tbody_close", "tbody", -1), (r[1] = a)),
|
||
e.push("table_close", "table", -1),
|
||
(b[1] = a),
|
||
(e.parentType = d),
|
||
(e.line = a),
|
||
!0
|
||
);
|
||
},
|
||
["paragraph", "reference"],
|
||
],
|
||
[
|
||
"code",
|
||
function (e, t, n) {
|
||
if (e.sCount[t] - e.blkIndent < 4) return !1;
|
||
let i = t + 1,
|
||
r = i;
|
||
for (; i < n; ) {
|
||
if (e.isEmpty(i)) {
|
||
i++;
|
||
continue;
|
||
}
|
||
if (e.sCount[i] - e.blkIndent >= 4) {
|
||
r = ++i;
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
e.line = r;
|
||
let a = e.push("code_block", "code", 0);
|
||
return (
|
||
(a.content = e.getLines(t, r, 4 + e.blkIndent, !1) + "\n"),
|
||
(a.map = [t, e.line]),
|
||
!0
|
||
);
|
||
},
|
||
],
|
||
[
|
||
"fence",
|
||
function (e, t, n, i) {
|
||
let r = e.bMarks[t] + e.tShift[t],
|
||
a = e.eMarks[t];
|
||
if (e.sCount[t] - e.blkIndent >= 4 || r + 3 > a) return !1;
|
||
let o = e.src.charCodeAt(r);
|
||
if (126 !== o && 96 !== o) return !1;
|
||
let s = r,
|
||
c = (r = e.skipChars(r, o)) - s;
|
||
if (c < 3) return !1;
|
||
let l = e.src.slice(s, r),
|
||
u = e.src.slice(r, a);
|
||
if (96 === o && u.indexOf(String.fromCharCode(o)) >= 0) return !1;
|
||
if (i) return !0;
|
||
let h = t,
|
||
f = !1;
|
||
for (
|
||
;
|
||
!(++h >= n) &&
|
||
(!((r = s = e.bMarks[h] + e.tShift[h]) < (a = e.eMarks[h])) ||
|
||
!(e.sCount[h] < e.blkIndent));
|
||
|
||
) {
|
||
if (
|
||
!(
|
||
e.src.charCodeAt(r) !== o ||
|
||
e.sCount[h] - e.blkIndent >= 4 ||
|
||
(r = e.skipChars(r, o)) - s < c
|
||
) &&
|
||
!((r = e.skipSpaces(r)) < a)
|
||
) {
|
||
f = !0;
|
||
break;
|
||
}
|
||
}
|
||
(c = e.sCount[t]), (e.line = h + +!!f);
|
||
let d = e.push("fence", "code", 0);
|
||
return (
|
||
(d.info = u),
|
||
(d.content = e.getLines(t + 1, h, c, !0)),
|
||
(d.markup = l),
|
||
(d.map = [t, e.line]),
|
||
!0
|
||
);
|
||
},
|
||
["paragraph", "reference", "blockquote", "list"],
|
||
],
|
||
[
|
||
"blockquote",
|
||
function (e, t, n, i) {
|
||
let r,
|
||
a = e.bMarks[t] + e.tShift[t],
|
||
o = e.eMarks[t],
|
||
s = e.lineMax;
|
||
if (e.sCount[t] - e.blkIndent >= 4 || 62 !== e.src.charCodeAt(a))
|
||
return !1;
|
||
if (i) return !0;
|
||
let c = [],
|
||
l = [],
|
||
u = [],
|
||
h = [],
|
||
f = e.md.block.ruler.getRules("blockquote"),
|
||
d = e.parentType;
|
||
e.parentType = "blockquote";
|
||
let p = !1;
|
||
for (r = t; r < n; r++) {
|
||
let t = e.sCount[r] < e.blkIndent;
|
||
if ((a = e.bMarks[r] + e.tShift[r]) >= (o = e.eMarks[r])) break;
|
||
if (62 === e.src.charCodeAt(a++) && !t) {
|
||
let t,
|
||
n,
|
||
i = e.sCount[r] + 1;
|
||
32 === e.src.charCodeAt(a)
|
||
? (a++, i++, (n = !1), (t = !0))
|
||
: 9 === e.src.charCodeAt(a)
|
||
? ((t = !0),
|
||
(e.bsCount[r] + i) % 4 == 3
|
||
? (a++, i++, (n = !1))
|
||
: (n = !0))
|
||
: (t = !1);
|
||
let s = i;
|
||
for (c.push(e.bMarks[r]), e.bMarks[r] = a; a < o; ) {
|
||
let t = e.src.charCodeAt(a);
|
||
if (eK(t))
|
||
9 === t ? (s += 4 - ((s + e.bsCount[r] + +!!n) % 4)) : s++;
|
||
else break;
|
||
a++;
|
||
}
|
||
(p = a >= o),
|
||
l.push(e.bsCount[r]),
|
||
(e.bsCount[r] = e.sCount[r] + 1 + +!!t),
|
||
u.push(e.sCount[r]),
|
||
(e.sCount[r] = s - i),
|
||
h.push(e.tShift[r]),
|
||
(e.tShift[r] = a - e.bMarks[r]);
|
||
continue;
|
||
}
|
||
if (p) break;
|
||
let i = !1;
|
||
for (let t = 0, a = f.length; t < a; t++)
|
||
if (f[t](e, r, n, !0)) {
|
||
i = !0;
|
||
break;
|
||
}
|
||
if (i) {
|
||
(e.lineMax = r),
|
||
0 !== e.blkIndent &&
|
||
(c.push(e.bMarks[r]),
|
||
l.push(e.bsCount[r]),
|
||
h.push(e.tShift[r]),
|
||
u.push(e.sCount[r]),
|
||
(e.sCount[r] -= e.blkIndent));
|
||
break;
|
||
}
|
||
c.push(e.bMarks[r]),
|
||
l.push(e.bsCount[r]),
|
||
h.push(e.tShift[r]),
|
||
u.push(e.sCount[r]),
|
||
(e.sCount[r] = -1);
|
||
}
|
||
let g = e.blkIndent;
|
||
e.blkIndent = 0;
|
||
let b = e.push("blockquote_open", "blockquote", 1);
|
||
b.markup = ">";
|
||
let m = [t, 0];
|
||
(b.map = m),
|
||
e.md.block.tokenize(e, t, r),
|
||
(e.push("blockquote_close", "blockquote", -1).markup = ">"),
|
||
(e.lineMax = s),
|
||
(e.parentType = d),
|
||
(m[1] = e.line);
|
||
for (let n = 0; n < h.length; n++)
|
||
(e.bMarks[n + t] = c[n]),
|
||
(e.tShift[n + t] = h[n]),
|
||
(e.sCount[n + t] = u[n]),
|
||
(e.bsCount[n + t] = l[n]);
|
||
return (e.blkIndent = g), !0;
|
||
},
|
||
["paragraph", "reference", "blockquote", "list"],
|
||
],
|
||
[
|
||
"hr",
|
||
function (e, t, n, i) {
|
||
let r = e.eMarks[t];
|
||
if (e.sCount[t] - e.blkIndent >= 4) return !1;
|
||
let a = e.bMarks[t] + e.tShift[t],
|
||
o = e.src.charCodeAt(a++);
|
||
if (42 !== o && 45 !== o && 95 !== o) return !1;
|
||
let s = 1;
|
||
for (; a < r; ) {
|
||
let t = e.src.charCodeAt(a++);
|
||
if (t !== o && !eK(t)) return !1;
|
||
t === o && s++;
|
||
}
|
||
if (s < 3) return !1;
|
||
if (i) return !0;
|
||
e.line = t + 1;
|
||
let c = e.push("hr", "hr", 0);
|
||
return (
|
||
(c.map = [t, e.line]),
|
||
(c.markup = Array(s + 1).join(String.fromCharCode(o))),
|
||
!0
|
||
);
|
||
},
|
||
["paragraph", "reference", "blockquote", "list"],
|
||
],
|
||
[
|
||
"list",
|
||
function (e, t, n, i) {
|
||
let r,
|
||
a,
|
||
o,
|
||
s,
|
||
c,
|
||
l,
|
||
u,
|
||
h = t,
|
||
f = !0;
|
||
if (
|
||
e.sCount[h] - e.blkIndent >= 4 ||
|
||
(e.listIndent >= 0 &&
|
||
e.sCount[h] - e.listIndent >= 4 &&
|
||
e.sCount[h] < e.blkIndent)
|
||
)
|
||
return !1;
|
||
let d = !1;
|
||
if (
|
||
(i &&
|
||
"paragraph" === e.parentType &&
|
||
e.sCount[h] >= e.blkIndent &&
|
||
(d = !0),
|
||
(u = tg(e, h)) >= 0)
|
||
) {
|
||
if (
|
||
((c = !0),
|
||
(o = e.bMarks[h] + e.tShift[h]),
|
||
(l = Number(e.src.slice(o, u - 1))),
|
||
d && 1 !== l)
|
||
)
|
||
return !1;
|
||
} else {
|
||
if (!((u = tp(e, h)) >= 0)) return !1;
|
||
c = !1;
|
||
}
|
||
if (d && e.skipSpaces(u) >= e.eMarks[h]) return !1;
|
||
if (i) return !0;
|
||
let p = e.src.charCodeAt(u - 1),
|
||
g = e.tokens.length;
|
||
c
|
||
? ((s = e.push("ordered_list_open", "ol", 1)),
|
||
1 !== l && (s.attrs = [["start", l]]))
|
||
: (s = e.push("bullet_list_open", "ul", 1));
|
||
let b = [h, 0];
|
||
(s.map = b), (s.markup = String.fromCharCode(p));
|
||
let m = !1,
|
||
w = e.md.block.ruler.getRules("list"),
|
||
v = e.parentType;
|
||
for (e.parentType = "list"; h < n; ) {
|
||
let t;
|
||
(a = u), (r = e.eMarks[h]);
|
||
let i = e.sCount[h] + u - (e.bMarks[h] + e.tShift[h]),
|
||
l = i;
|
||
for (; a < r; ) {
|
||
let t = e.src.charCodeAt(a);
|
||
if (9 === t) l += 4 - ((l + e.bsCount[h]) % 4);
|
||
else if (32 === t) l++;
|
||
else break;
|
||
a++;
|
||
}
|
||
let d = a;
|
||
(t = d >= r ? 1 : l - i) > 4 && (t = 1);
|
||
let g = i + t;
|
||
(s = e.push("list_item_open", "li", 1)).markup =
|
||
String.fromCharCode(p);
|
||
let b = [h, 0];
|
||
(s.map = b), c && (s.info = e.src.slice(o, u - 1));
|
||
let v = e.tight,
|
||
x = e.tShift[h],
|
||
y = e.sCount[h],
|
||
_ = e.listIndent;
|
||
if (
|
||
((e.listIndent = e.blkIndent),
|
||
(e.blkIndent = g),
|
||
(e.tight = !0),
|
||
(e.tShift[h] = d - e.bMarks[h]),
|
||
(e.sCount[h] = l),
|
||
d >= r && e.isEmpty(h + 1)
|
||
? (e.line = Math.min(e.line + 2, n))
|
||
: e.md.block.tokenize(e, h, n, !0),
|
||
(!e.tight || m) && (f = !1),
|
||
(m = e.line - h > 1 && e.isEmpty(e.line - 1)),
|
||
(e.blkIndent = e.listIndent),
|
||
(e.listIndent = _),
|
||
(e.tShift[h] = x),
|
||
(e.sCount[h] = y),
|
||
(e.tight = v),
|
||
((s = e.push("list_item_close", "li", -1)).markup =
|
||
String.fromCharCode(p)),
|
||
(h = e.line),
|
||
(b[1] = h),
|
||
h >= n ||
|
||
e.sCount[h] < e.blkIndent ||
|
||
e.sCount[h] - e.blkIndent >= 4)
|
||
)
|
||
break;
|
||
let S = !1;
|
||
for (let t = 0, i = w.length; t < i; t++)
|
||
if (w[t](e, h, n, !0)) {
|
||
S = !0;
|
||
break;
|
||
}
|
||
if (S) break;
|
||
if (c) {
|
||
if ((u = tg(e, h)) < 0) break;
|
||
o = e.bMarks[h] + e.tShift[h];
|
||
} else if ((u = tp(e, h)) < 0) break;
|
||
if (p !== e.src.charCodeAt(u - 1)) break;
|
||
}
|
||
return (
|
||
((s = c
|
||
? e.push("ordered_list_close", "ol", -1)
|
||
: e.push("bullet_list_close", "ul", -1)).markup =
|
||
String.fromCharCode(p)),
|
||
(b[1] = h),
|
||
(e.line = h),
|
||
(e.parentType = v),
|
||
f &&
|
||
(function (e, t) {
|
||
let n = e.level + 2;
|
||
for (let i = t + 2, r = e.tokens.length - 2; i < r; i++)
|
||
e.tokens[i].level === n &&
|
||
"paragraph_open" === e.tokens[i].type &&
|
||
((e.tokens[i + 2].hidden = !0),
|
||
(e.tokens[i].hidden = !0),
|
||
(i += 2));
|
||
})(e, g),
|
||
!0
|
||
);
|
||
},
|
||
["paragraph", "reference", "blockquote"],
|
||
],
|
||
[
|
||
"reference",
|
||
function (e, t, n, i) {
|
||
let r,
|
||
a = e.bMarks[t] + e.tShift[t],
|
||
o = e.eMarks[t],
|
||
s = t + 1;
|
||
if (e.sCount[t] - e.blkIndent >= 4 || 91 !== e.src.charCodeAt(a))
|
||
return !1;
|
||
function c(t) {
|
||
let n = e.lineMax;
|
||
if (t >= n || e.isEmpty(t)) return null;
|
||
let i = !1;
|
||
if (
|
||
(e.sCount[t] - e.blkIndent > 3 && (i = !0),
|
||
e.sCount[t] < 0 && (i = !0),
|
||
!i)
|
||
) {
|
||
let i = e.md.block.ruler.getRules("reference"),
|
||
r = e.parentType;
|
||
e.parentType = "reference";
|
||
let a = !1;
|
||
for (let r = 0, o = i.length; r < o; r++)
|
||
if (i[r](e, t, n, !0)) {
|
||
a = !0;
|
||
break;
|
||
}
|
||
if (((e.parentType = r), a)) return null;
|
||
}
|
||
let r = e.bMarks[t] + e.tShift[t],
|
||
a = e.eMarks[t];
|
||
return e.src.slice(r, a + 1);
|
||
}
|
||
let l = e.src.slice(a, o + 1);
|
||
o = l.length;
|
||
let u = -1;
|
||
for (a = 1; a < o; a++) {
|
||
let e = l.charCodeAt(a);
|
||
if (91 === e) return !1;
|
||
if (93 === e) {
|
||
u = a;
|
||
break;
|
||
}
|
||
if (10 === e) {
|
||
let e = c(s);
|
||
null !== e && ((l += e), (o = l.length), s++);
|
||
} else if (92 === e && ++a < o && 10 === l.charCodeAt(a)) {
|
||
let e = c(s);
|
||
null !== e && ((l += e), (o = l.length), s++);
|
||
}
|
||
}
|
||
if (u < 0 || 58 !== l.charCodeAt(u + 1)) return !1;
|
||
for (a = u + 2; a < o; a++) {
|
||
let e = l.charCodeAt(a);
|
||
if (10 === e) {
|
||
let e = c(s);
|
||
null !== e && ((l += e), (o = l.length), s++);
|
||
} else if (eK(e));
|
||
else break;
|
||
}
|
||
let h = e.md.helpers.parseLinkDestination(l, a, o);
|
||
if (!h.ok) return !1;
|
||
let f = e.md.normalizeLink(h.str);
|
||
if (!e.md.validateLink(f)) return !1;
|
||
let d = (a = h.pos),
|
||
p = s,
|
||
g = a;
|
||
for (; a < o; a++) {
|
||
let e = l.charCodeAt(a);
|
||
if (10 === e) {
|
||
let e = c(s);
|
||
null !== e && ((l += e), (o = l.length), s++);
|
||
} else if (eK(e));
|
||
else break;
|
||
}
|
||
let b = e.md.helpers.parseLinkTitle(l, a, o);
|
||
for (; b.can_continue; ) {
|
||
let t = c(s);
|
||
if (null === t) break;
|
||
(l += t),
|
||
(a = o),
|
||
(o = l.length),
|
||
s++,
|
||
(b = e.md.helpers.parseLinkTitle(l, a, o, b));
|
||
}
|
||
for (
|
||
a < o && g !== a && b.ok
|
||
? ((r = b.str), (a = b.pos))
|
||
: ((r = ""), (a = d), (s = p));
|
||
a < o && eK(l.charCodeAt(a));
|
||
|
||
)
|
||
a++;
|
||
if (a < o && 10 !== l.charCodeAt(a) && r)
|
||
for (r = "", a = d, s = p; a < o && eK(l.charCodeAt(a)); ) a++;
|
||
if (a < o && 10 !== l.charCodeAt(a)) return !1;
|
||
let m = eJ(l.slice(1, u));
|
||
return (
|
||
!!m &&
|
||
(!!i ||
|
||
(void 0 === e.env.references && (e.env.references = {}),
|
||
void 0 === e.env.references[m] &&
|
||
(e.env.references[m] = { title: r, href: f }),
|
||
(e.line = s),
|
||
!0))
|
||
);
|
||
},
|
||
],
|
||
[
|
||
"html_block",
|
||
function (e, t, n, i) {
|
||
let r = e.bMarks[t] + e.tShift[t],
|
||
a = e.eMarks[t];
|
||
if (
|
||
e.sCount[t] - e.blkIndent >= 4 ||
|
||
!e.md.options.html ||
|
||
60 !== e.src.charCodeAt(r)
|
||
)
|
||
return !1;
|
||
let o = e.src.slice(r, a),
|
||
s = 0;
|
||
for (; s < tx.length && !tx[s][0].test(o); s++);
|
||
if (s === tx.length) return !1;
|
||
if (i) return tx[s][2];
|
||
let c = t + 1;
|
||
if (!tx[s][1].test(o)) {
|
||
for (; c < n && !(e.sCount[c] < e.blkIndent); c++)
|
||
if (
|
||
((r = e.bMarks[c] + e.tShift[c]),
|
||
(a = e.eMarks[c]),
|
||
(o = e.src.slice(r, a)),
|
||
tx[s][1].test(o))
|
||
) {
|
||
0 !== o.length && c++;
|
||
break;
|
||
}
|
||
}
|
||
e.line = c;
|
||
let l = e.push("html_block", "", 0);
|
||
return (
|
||
(l.map = [t, c]),
|
||
(l.content = e.getLines(t, c, e.blkIndent, !0)),
|
||
!0
|
||
);
|
||
},
|
||
["paragraph", "reference", "blockquote"],
|
||
],
|
||
[
|
||
"heading",
|
||
function (e, t, n, i) {
|
||
let r = e.bMarks[t] + e.tShift[t],
|
||
a = e.eMarks[t];
|
||
if (e.sCount[t] - e.blkIndent >= 4) return !1;
|
||
let o = e.src.charCodeAt(r);
|
||
if (35 !== o || r >= a) return !1;
|
||
let s = 1;
|
||
for (o = e.src.charCodeAt(++r); 35 === o && r < a && s <= 6; )
|
||
s++, (o = e.src.charCodeAt(++r));
|
||
if (s > 6 || (r < a && !eK(o))) return !1;
|
||
if (i) return !0;
|
||
a = e.skipSpacesBack(a, r);
|
||
let c = e.skipCharsBack(a, 35, r);
|
||
c > r && eK(e.src.charCodeAt(c - 1)) && (a = c), (e.line = t + 1);
|
||
let l = e.push("heading_open", "h" + String(s), 1);
|
||
(l.markup = "########".slice(0, s)), (l.map = [t, e.line]);
|
||
let u = e.push("inline", "", 0);
|
||
return (
|
||
(u.content = e.src.slice(r, a).trim()),
|
||
(u.map = [t, e.line]),
|
||
(u.children = []),
|
||
(e.push("heading_close", "h" + String(s), -1).markup =
|
||
"########".slice(0, s)),
|
||
!0
|
||
);
|
||
},
|
||
["paragraph", "reference", "blockquote"],
|
||
],
|
||
[
|
||
"lheading",
|
||
function (e, t, n) {
|
||
let i,
|
||
r = e.md.block.ruler.getRules("paragraph");
|
||
if (e.sCount[t] - e.blkIndent >= 4) return !1;
|
||
let a = e.parentType;
|
||
e.parentType = "paragraph";
|
||
let o = 0,
|
||
s = t + 1;
|
||
for (; s < n && !e.isEmpty(s); s++) {
|
||
if (e.sCount[s] - e.blkIndent > 3) continue;
|
||
if (e.sCount[s] >= e.blkIndent) {
|
||
let t = e.bMarks[s] + e.tShift[s],
|
||
n = e.eMarks[s];
|
||
if (
|
||
t < n &&
|
||
(45 === (i = e.src.charCodeAt(t)) || 61 === i) &&
|
||
((t = e.skipChars(t, i)), (t = e.skipSpaces(t)) >= n)
|
||
) {
|
||
o = 61 === i ? 1 : 2;
|
||
break;
|
||
}
|
||
}
|
||
if (e.sCount[s] < 0) continue;
|
||
let t = !1;
|
||
for (let i = 0, a = r.length; i < a; i++)
|
||
if (r[i](e, s, n, !0)) {
|
||
t = !0;
|
||
break;
|
||
}
|
||
if (t) break;
|
||
}
|
||
if (!o) return !1;
|
||
let c = e.getLines(t, s, e.blkIndent, !1).trim();
|
||
e.line = s + 1;
|
||
let l = e.push("heading_open", "h" + String(o), 1);
|
||
(l.markup = String.fromCharCode(i)), (l.map = [t, e.line]);
|
||
let u = e.push("inline", "", 0);
|
||
return (
|
||
(u.content = c),
|
||
(u.map = [t, e.line - 1]),
|
||
(u.children = []),
|
||
(e.push("heading_close", "h" + String(o), -1).markup =
|
||
String.fromCharCode(i)),
|
||
(e.parentType = a),
|
||
!0
|
||
);
|
||
},
|
||
],
|
||
[
|
||
"paragraph",
|
||
function (e, t, n) {
|
||
let i = e.md.block.ruler.getRules("paragraph"),
|
||
r = e.parentType,
|
||
a = t + 1;
|
||
for (e.parentType = "paragraph"; a < n && !e.isEmpty(a); a++) {
|
||
if (e.sCount[a] - e.blkIndent > 3 || e.sCount[a] < 0) continue;
|
||
let t = !1;
|
||
for (let r = 0, o = i.length; r < o; r++)
|
||
if (i[r](e, a, n, !0)) {
|
||
t = !0;
|
||
break;
|
||
}
|
||
if (t) break;
|
||
}
|
||
let o = e.getLines(t, a, e.blkIndent, !1).trim();
|
||
(e.line = a), (e.push("paragraph_open", "p", 1).map = [t, e.line]);
|
||
let s = e.push("inline", "", 0);
|
||
return (
|
||
(s.content = o),
|
||
(s.map = [t, e.line]),
|
||
(s.children = []),
|
||
e.push("paragraph_close", "p", -1),
|
||
(e.parentType = r),
|
||
!0
|
||
);
|
||
},
|
||
],
|
||
];
|
||
function t_() {
|
||
this.ruler = new e6();
|
||
for (let e = 0; e < ty.length; e++)
|
||
this.ruler.push(ty[e][0], ty[e][1], { alt: (ty[e][2] || []).slice() });
|
||
}
|
||
function tS(e, t, n, i) {
|
||
(this.src = e),
|
||
(this.env = n),
|
||
(this.md = t),
|
||
(this.tokens = i),
|
||
(this.tokens_meta = Array(i.length)),
|
||
(this.pos = 0),
|
||
(this.posMax = this.src.length),
|
||
(this.level = 0),
|
||
(this.pending = ""),
|
||
(this.pendingLevel = 0),
|
||
(this.cache = {}),
|
||
(this.delimiters = []),
|
||
(this._prev_delimiters = []),
|
||
(this.backticks = {}),
|
||
(this.backticksScanned = !1),
|
||
(this.linkLevel = 0);
|
||
}
|
||
(t_.prototype.tokenize = function (e, t, n) {
|
||
let i = this.ruler.getRules(""),
|
||
r = i.length,
|
||
a = e.md.options.maxNesting,
|
||
o = t,
|
||
s = !1;
|
||
for (
|
||
;
|
||
o < n &&
|
||
((e.line = o = e.skipEmptyLines(o)),
|
||
!(o >= n) && !(e.sCount[o] < e.blkIndent));
|
||
|
||
) {
|
||
if (e.level >= a) {
|
||
e.line = n;
|
||
break;
|
||
}
|
||
let t = e.line,
|
||
c = !1;
|
||
for (let a = 0; a < r; a++)
|
||
if ((c = i[a](e, o, n, !1))) {
|
||
if (t >= e.line)
|
||
throw Error("block rule didn't increment state.line");
|
||
break;
|
||
}
|
||
if (!c) throw Error("none of the block rules matched");
|
||
(e.tight = !s),
|
||
e.isEmpty(e.line - 1) && (s = !0),
|
||
(o = e.line) < n && e.isEmpty(o) && ((s = !0), (e.line = ++o));
|
||
}
|
||
}),
|
||
(t_.prototype.parse = function (e, t, n, i) {
|
||
if (!e) return;
|
||
let r = new this.State(e, t, n, i);
|
||
this.tokenize(r, r.line, r.lineMax);
|
||
}),
|
||
(t_.prototype.State = th),
|
||
(tS.prototype.pushPending = function () {
|
||
let e = new e8("text", "", 0);
|
||
return (
|
||
(e.content = this.pending),
|
||
(e.level = this.pendingLevel),
|
||
this.tokens.push(e),
|
||
(this.pending = ""),
|
||
e
|
||
);
|
||
}),
|
||
(tS.prototype.push = function (e, t, n) {
|
||
this.pending && this.pushPending();
|
||
let i = new e8(e, t, n),
|
||
r = null;
|
||
return (
|
||
n < 0 &&
|
||
(this.level--, (this.delimiters = this._prev_delimiters.pop())),
|
||
(i.level = this.level),
|
||
n > 0 &&
|
||
(this.level++,
|
||
this._prev_delimiters.push(this.delimiters),
|
||
(this.delimiters = []),
|
||
(r = { delimiters: this.delimiters })),
|
||
(this.pendingLevel = this.level),
|
||
this.tokens.push(i),
|
||
this.tokens_meta.push(r),
|
||
i
|
||
);
|
||
}),
|
||
(tS.prototype.scanDelims = function (e, t) {
|
||
let n = this.posMax,
|
||
i = this.src.charCodeAt(e),
|
||
r = e > 0 ? this.src.charCodeAt(e - 1) : 32,
|
||
a = e;
|
||
for (; a < n && this.src.charCodeAt(a) === i; ) a++;
|
||
let o = a - e,
|
||
s = a < n ? this.src.charCodeAt(a) : 32,
|
||
c = eY(r) || eX(String.fromCharCode(r)),
|
||
l = eY(s) || eX(String.fromCharCode(s)),
|
||
u = eq(r),
|
||
h = eq(s),
|
||
f = !h && (!l || u || c),
|
||
d = !u && (!c || h || l);
|
||
return {
|
||
can_open: f && (t || !d || c),
|
||
can_close: d && (t || !f || l),
|
||
length: o,
|
||
};
|
||
}),
|
||
(tS.prototype.Token = e8);
|
||
let tE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,
|
||
tM = [];
|
||
for (let e = 0; e < 256; e++) tM.push(0);
|
||
function tT(e, t) {
|
||
let n,
|
||
i = [],
|
||
r = t.length;
|
||
for (let a = 0; a < r; a++) {
|
||
let r = t[a];
|
||
if (126 !== r.marker || -1 === r.end) continue;
|
||
let o = t[r.end];
|
||
((n = e.tokens[r.token]).type = "s_open"),
|
||
(n.tag = "s"),
|
||
(n.nesting = 1),
|
||
(n.markup = "~~"),
|
||
(n.content = ""),
|
||
((n = e.tokens[o.token]).type = "s_close"),
|
||
(n.tag = "s"),
|
||
(n.nesting = -1),
|
||
(n.markup = "~~"),
|
||
(n.content = ""),
|
||
"text" === e.tokens[o.token - 1].type &&
|
||
"~" === e.tokens[o.token - 1].content &&
|
||
i.push(o.token - 1);
|
||
}
|
||
for (; i.length; ) {
|
||
let t = i.pop(),
|
||
r = t + 1;
|
||
for (; r < e.tokens.length && "s_close" === e.tokens[r].type; ) r++;
|
||
t !== --r &&
|
||
((n = e.tokens[r]), (e.tokens[r] = e.tokens[t]), (e.tokens[t] = n));
|
||
}
|
||
}
|
||
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function (e) {
|
||
tM[e.charCodeAt(0)] = 1;
|
||
});
|
||
function tk(e, t) {
|
||
let n = t.length;
|
||
for (let i = n - 1; i >= 0; i--) {
|
||
let n = t[i];
|
||
if ((95 !== n.marker && 42 !== n.marker) || -1 === n.end) continue;
|
||
let r = t[n.end],
|
||
a =
|
||
i > 0 &&
|
||
t[i - 1].end === n.end + 1 &&
|
||
t[i - 1].marker === n.marker &&
|
||
t[i - 1].token === n.token - 1 &&
|
||
t[n.end + 1].token === r.token + 1,
|
||
o = String.fromCharCode(n.marker),
|
||
s = e.tokens[n.token];
|
||
(s.type = a ? "strong_open" : "em_open"),
|
||
(s.tag = a ? "strong" : "em"),
|
||
(s.nesting = 1),
|
||
(s.markup = a ? o + o : o),
|
||
(s.content = "");
|
||
let c = e.tokens[r.token];
|
||
(c.type = a ? "strong_close" : "em_close"),
|
||
(c.tag = a ? "strong" : "em"),
|
||
(c.nesting = -1),
|
||
(c.markup = a ? o + o : o),
|
||
(c.content = ""),
|
||
a &&
|
||
((e.tokens[t[i - 1].token].content = ""),
|
||
(e.tokens[t[n.end + 1].token].content = ""),
|
||
i--);
|
||
}
|
||
}
|
||
let tC =
|
||
/^([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])?)*)$/,
|
||
tA = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/,
|
||
tN = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,
|
||
tI = /^&([a-z][a-z0-9]{1,31});/i;
|
||
function tP(e) {
|
||
let t = {},
|
||
n = e.length;
|
||
if (!n) return;
|
||
let i = 0,
|
||
r = -2,
|
||
a = [];
|
||
for (let o = 0; o < n; o++) {
|
||
let n = e[o];
|
||
if (
|
||
(a.push(0),
|
||
(e[i].marker !== n.marker || r !== n.token - 1) && (i = o),
|
||
(r = n.token),
|
||
(n.length = n.length || 0),
|
||
!n.close)
|
||
)
|
||
continue;
|
||
t.hasOwnProperty(n.marker) || (t[n.marker] = [-1, -1, -1, -1, -1, -1]);
|
||
let s = t[n.marker][3 * !!n.open + (n.length % 3)],
|
||
c = i - a[i] - 1,
|
||
l = c;
|
||
for (; c > s; c -= a[c] + 1) {
|
||
let t = e[c];
|
||
if (t.marker === n.marker && t.open && t.end < 0) {
|
||
let i = !1;
|
||
if (
|
||
((t.close || n.open) &&
|
||
(t.length + n.length) % 3 == 0 &&
|
||
(t.length % 3 != 0 || n.length % 3 != 0) &&
|
||
(i = !0),
|
||
!i)
|
||
) {
|
||
let i = c > 0 && !e[c - 1].open ? a[c - 1] + 1 : 0;
|
||
(a[o] = o - c + i),
|
||
(a[c] = i),
|
||
(n.open = !1),
|
||
(t.end = o),
|
||
(t.close = !1),
|
||
(l = -1),
|
||
(r = -2);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
-1 !== l && (t[n.marker][3 * !!n.open + ((n.length || 0) % 3)] = l);
|
||
}
|
||
}
|
||
let tR = [
|
||
[
|
||
"text",
|
||
function (e, t) {
|
||
let n = e.pos;
|
||
for (
|
||
;
|
||
n < e.posMax &&
|
||
!(function (e) {
|
||
switch (e) {
|
||
case 10:
|
||
case 33:
|
||
case 35:
|
||
case 36:
|
||
case 37:
|
||
case 38:
|
||
case 42:
|
||
case 43:
|
||
case 45:
|
||
case 58:
|
||
case 60:
|
||
case 61:
|
||
case 62:
|
||
case 64:
|
||
case 91:
|
||
case 92:
|
||
case 93:
|
||
case 94:
|
||
case 95:
|
||
case 96:
|
||
case 123:
|
||
case 125:
|
||
case 126:
|
||
return !0;
|
||
default:
|
||
return !1;
|
||
}
|
||
})(e.src.charCodeAt(n));
|
||
|
||
)
|
||
n++;
|
||
return (
|
||
n !== e.pos &&
|
||
(t || (e.pending += e.src.slice(e.pos, n)), (e.pos = n), !0)
|
||
);
|
||
},
|
||
],
|
||
[
|
||
"linkify",
|
||
function (e, t) {
|
||
if (!e.md.options.linkify || e.linkLevel > 0) return !1;
|
||
let n = e.pos;
|
||
if (
|
||
n + 3 > e.posMax ||
|
||
58 !== e.src.charCodeAt(n) ||
|
||
47 !== e.src.charCodeAt(n + 1) ||
|
||
47 !== e.src.charCodeAt(n + 2)
|
||
)
|
||
return !1;
|
||
let i = e.pending.match(tE);
|
||
if (!i) return !1;
|
||
let r = i[1],
|
||
a = e.md.linkify.matchAtStart(e.src.slice(n - r.length));
|
||
if (!a) return !1;
|
||
let o = a.url;
|
||
if (o.length <= r.length) return !1;
|
||
o = o.replace(/\*+$/, "");
|
||
let s = e.md.normalizeLink(o);
|
||
if (!e.md.validateLink(s)) return !1;
|
||
if (!t) {
|
||
e.pending = e.pending.slice(0, -r.length);
|
||
let t = e.push("link_open", "a", 1);
|
||
(t.attrs = [["href", s]]),
|
||
(t.markup = "linkify"),
|
||
(t.info = "auto"),
|
||
(e.push("text", "", 0).content = e.md.normalizeLinkText(o));
|
||
let n = e.push("link_close", "a", -1);
|
||
(n.markup = "linkify"), (n.info = "auto");
|
||
}
|
||
return (e.pos += o.length - r.length), !0;
|
||
},
|
||
],
|
||
[
|
||
"newline",
|
||
function (e, t) {
|
||
let n = e.pos;
|
||
if (10 !== e.src.charCodeAt(n)) return !1;
|
||
let i = e.pending.length - 1,
|
||
r = e.posMax;
|
||
if (!t)
|
||
if (i >= 0 && 32 === e.pending.charCodeAt(i))
|
||
if (i >= 1 && 32 === e.pending.charCodeAt(i - 1)) {
|
||
let t = i - 1;
|
||
for (; t >= 1 && 32 === e.pending.charCodeAt(t - 1); ) t--;
|
||
(e.pending = e.pending.slice(0, t)),
|
||
e.push("hardbreak", "br", 0);
|
||
} else
|
||
(e.pending = e.pending.slice(0, -1)),
|
||
e.push("softbreak", "br", 0);
|
||
else e.push("softbreak", "br", 0);
|
||
for (n++; n < r && eK(e.src.charCodeAt(n)); ) n++;
|
||
return (e.pos = n), !0;
|
||
},
|
||
],
|
||
[
|
||
"escape",
|
||
function (e, t) {
|
||
let n = e.pos,
|
||
i = e.posMax;
|
||
if (92 !== e.src.charCodeAt(n) || ++n >= i) return !1;
|
||
let r = e.src.charCodeAt(n);
|
||
if (10 === r) {
|
||
for (
|
||
t || e.push("hardbreak", "br", 0), n++;
|
||
n < i && eK((r = e.src.charCodeAt(n)));
|
||
|
||
)
|
||
n++;
|
||
return (e.pos = n), !0;
|
||
}
|
||
let a = e.src[n];
|
||
if (r >= 55296 && r <= 56319 && n + 1 < i) {
|
||
let t = e.src.charCodeAt(n + 1);
|
||
t >= 56320 && t <= 57343 && ((a += e.src[n + 1]), n++);
|
||
}
|
||
let o = "\\" + a;
|
||
if (!t) {
|
||
let t = e.push("text_special", "", 0);
|
||
r < 256 && 0 !== tM[r] ? (t.content = a) : (t.content = o),
|
||
(t.markup = o),
|
||
(t.info = "escape");
|
||
}
|
||
return (e.pos = n + 1), !0;
|
||
},
|
||
],
|
||
[
|
||
"backticks",
|
||
function (e, t) {
|
||
let n,
|
||
i = e.pos;
|
||
if (96 !== e.src.charCodeAt(i)) return !1;
|
||
let r = i;
|
||
i++;
|
||
let a = e.posMax;
|
||
for (; i < a && 96 === e.src.charCodeAt(i); ) i++;
|
||
let o = e.src.slice(r, i),
|
||
s = o.length;
|
||
if (e.backticksScanned && (e.backticks[s] || 0) <= r)
|
||
return t || (e.pending += o), (e.pos += s), !0;
|
||
let c = i;
|
||
for (; -1 !== (n = e.src.indexOf("`", c)); ) {
|
||
for (c = n + 1; c < a && 96 === e.src.charCodeAt(c); ) c++;
|
||
let r = c - n;
|
||
if (r === s) {
|
||
if (!t) {
|
||
let t = e.push("code_inline", "code", 0);
|
||
(t.markup = o),
|
||
(t.content = e.src
|
||
.slice(i, n)
|
||
.replace(/\n/g, " ")
|
||
.replace(/^ (.+) $/, "$1"));
|
||
}
|
||
return (e.pos = c), !0;
|
||
}
|
||
e.backticks[r] = n;
|
||
}
|
||
return (
|
||
(e.backticksScanned = !0), t || (e.pending += o), (e.pos += s), !0
|
||
);
|
||
},
|
||
],
|
||
[
|
||
"strikethrough",
|
||
function (e, t) {
|
||
let n = e.pos,
|
||
i = e.src.charCodeAt(n);
|
||
if (t || 126 !== i) return !1;
|
||
let r = e.scanDelims(e.pos, !0),
|
||
a = r.length,
|
||
o = String.fromCharCode(i);
|
||
if (a < 2) return !1;
|
||
a % 2 && ((e.push("text", "", 0).content = o), a--);
|
||
for (let t = 0; t < a; t += 2)
|
||
(e.push("text", "", 0).content = o + o),
|
||
e.delimiters.push({
|
||
marker: i,
|
||
length: 0,
|
||
token: e.tokens.length - 1,
|
||
end: -1,
|
||
open: r.can_open,
|
||
close: r.can_close,
|
||
});
|
||
return (e.pos += r.length), !0;
|
||
},
|
||
],
|
||
[
|
||
"emphasis",
|
||
function (e, t) {
|
||
let n = e.pos,
|
||
i = e.src.charCodeAt(n);
|
||
if (t || (95 !== i && 42 !== i)) return !1;
|
||
let r = e.scanDelims(e.pos, 42 === i);
|
||
for (let t = 0; t < r.length; t++)
|
||
(e.push("text", "", 0).content = String.fromCharCode(i)),
|
||
e.delimiters.push({
|
||
marker: i,
|
||
length: r.length,
|
||
token: e.tokens.length - 1,
|
||
end: -1,
|
||
open: r.can_open,
|
||
close: r.can_close,
|
||
});
|
||
return (e.pos += r.length), !0;
|
||
},
|
||
],
|
||
[
|
||
"link",
|
||
function (e, t) {
|
||
let n,
|
||
i,
|
||
r,
|
||
a,
|
||
o = "",
|
||
s = "",
|
||
c = e.pos,
|
||
l = !0;
|
||
if (91 !== e.src.charCodeAt(e.pos)) return !1;
|
||
let u = e.pos,
|
||
h = e.posMax,
|
||
f = e.pos + 1,
|
||
d = e.md.helpers.parseLinkLabel(e, e.pos, !0);
|
||
if (d < 0) return !1;
|
||
let p = d + 1;
|
||
if (p < h && 40 === e.src.charCodeAt(p)) {
|
||
for (
|
||
l = !1, p++;
|
||
p < h && (eK((n = e.src.charCodeAt(p))) || 10 === n);
|
||
p++
|
||
);
|
||
if (p >= h) return !1;
|
||
if (
|
||
((c = p),
|
||
(r = e.md.helpers.parseLinkDestination(e.src, p, e.posMax)).ok)
|
||
) {
|
||
for (
|
||
o = e.md.normalizeLink(r.str),
|
||
e.md.validateLink(o) ? (p = r.pos) : (o = ""),
|
||
c = p;
|
||
p < h && (eK((n = e.src.charCodeAt(p))) || 10 === n);
|
||
p++
|
||
);
|
||
if (
|
||
((r = e.md.helpers.parseLinkTitle(e.src, p, e.posMax)),
|
||
p < h && c !== p && r.ok)
|
||
)
|
||
for (
|
||
s = r.str, p = r.pos;
|
||
p < h && (eK((n = e.src.charCodeAt(p))) || 10 === n);
|
||
p++
|
||
);
|
||
}
|
||
(p >= h || 41 !== e.src.charCodeAt(p)) && (l = !0), p++;
|
||
}
|
||
if (l) {
|
||
if (void 0 === e.env.references) return !1;
|
||
if (
|
||
(p < h && 91 === e.src.charCodeAt(p)
|
||
? ((c = p + 1),
|
||
(p = e.md.helpers.parseLinkLabel(e, p)) >= 0
|
||
? (i = e.src.slice(c, p++))
|
||
: (p = d + 1))
|
||
: (p = d + 1),
|
||
i || (i = e.src.slice(f, d)),
|
||
!(a = e.env.references[eJ(i)]))
|
||
)
|
||
return (e.pos = u), !1;
|
||
(o = a.href), (s = a.title);
|
||
}
|
||
if (!t) {
|
||
(e.pos = f), (e.posMax = d);
|
||
let t = e.push("link_open", "a", 1),
|
||
n = [["href", o]];
|
||
(t.attrs = n),
|
||
s && n.push(["title", s]),
|
||
e.linkLevel++,
|
||
e.md.inline.tokenize(e),
|
||
e.linkLevel--,
|
||
e.push("link_close", "a", -1);
|
||
}
|
||
return (e.pos = p), (e.posMax = h), !0;
|
||
},
|
||
],
|
||
[
|
||
"image",
|
||
function (e, t) {
|
||
let n,
|
||
i,
|
||
r,
|
||
a,
|
||
o,
|
||
s,
|
||
c,
|
||
l,
|
||
u = "",
|
||
h = e.pos,
|
||
f = e.posMax;
|
||
if (
|
||
33 !== e.src.charCodeAt(e.pos) ||
|
||
91 !== e.src.charCodeAt(e.pos + 1)
|
||
)
|
||
return !1;
|
||
let d = e.pos + 2,
|
||
p = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
|
||
if (p < 0) return !1;
|
||
if ((a = p + 1) < f && 40 === e.src.charCodeAt(a)) {
|
||
for (
|
||
a++;
|
||
a < f && (eK((n = e.src.charCodeAt(a))) || 10 === n);
|
||
a++
|
||
);
|
||
if (a >= f) return !1;
|
||
for (
|
||
l = a,
|
||
(s = e.md.helpers.parseLinkDestination(e.src, a, e.posMax))
|
||
.ok &&
|
||
((u = e.md.normalizeLink(s.str)),
|
||
e.md.validateLink(u) ? (a = s.pos) : (u = "")),
|
||
l = a;
|
||
a < f && (eK((n = e.src.charCodeAt(a))) || 10 === n);
|
||
a++
|
||
);
|
||
if (
|
||
((s = e.md.helpers.parseLinkTitle(e.src, a, e.posMax)),
|
||
a < f && l !== a && s.ok)
|
||
)
|
||
for (
|
||
c = s.str, a = s.pos;
|
||
a < f && (eK((n = e.src.charCodeAt(a))) || 10 === n);
|
||
a++
|
||
);
|
||
else c = "";
|
||
if (a >= f || 41 !== e.src.charCodeAt(a)) return (e.pos = h), !1;
|
||
a++;
|
||
} else {
|
||
if (void 0 === e.env.references) return !1;
|
||
if (
|
||
(a < f && 91 === e.src.charCodeAt(a)
|
||
? ((l = a + 1),
|
||
(a = e.md.helpers.parseLinkLabel(e, a)) >= 0
|
||
? (r = e.src.slice(l, a++))
|
||
: (a = p + 1))
|
||
: (a = p + 1),
|
||
r || (r = e.src.slice(d, p)),
|
||
!(o = e.env.references[eJ(r)]))
|
||
)
|
||
return (e.pos = h), !1;
|
||
(u = o.href), (c = o.title);
|
||
}
|
||
if (!t) {
|
||
i = e.src.slice(d, p);
|
||
let t = [];
|
||
e.md.inline.parse(i, e.md, e.env, t);
|
||
let n = e.push("image", "img", 0),
|
||
r = [
|
||
["src", u],
|
||
["alt", ""],
|
||
];
|
||
(n.attrs = r),
|
||
(n.children = t),
|
||
(n.content = i),
|
||
c && r.push(["title", c]);
|
||
}
|
||
return (e.pos = a), (e.posMax = f), !0;
|
||
},
|
||
],
|
||
[
|
||
"autolink",
|
||
function (e, t) {
|
||
let n = e.pos;
|
||
if (60 !== e.src.charCodeAt(n)) return !1;
|
||
let i = e.pos,
|
||
r = e.posMax;
|
||
for (;;) {
|
||
if (++n >= r) return !1;
|
||
let t = e.src.charCodeAt(n);
|
||
if (60 === t) return !1;
|
||
if (62 === t) break;
|
||
}
|
||
let a = e.src.slice(i + 1, n);
|
||
if (tA.test(a)) {
|
||
let n = e.md.normalizeLink(a);
|
||
if (!e.md.validateLink(n)) return !1;
|
||
if (!t) {
|
||
let t = e.push("link_open", "a", 1);
|
||
(t.attrs = [["href", n]]),
|
||
(t.markup = "autolink"),
|
||
(t.info = "auto"),
|
||
(e.push("text", "", 0).content = e.md.normalizeLinkText(a));
|
||
let i = e.push("link_close", "a", -1);
|
||
(i.markup = "autolink"), (i.info = "auto");
|
||
}
|
||
return (e.pos += a.length + 2), !0;
|
||
}
|
||
if (tC.test(a)) {
|
||
let n = e.md.normalizeLink("mailto:" + a);
|
||
if (!e.md.validateLink(n)) return !1;
|
||
if (!t) {
|
||
let t = e.push("link_open", "a", 1);
|
||
(t.attrs = [["href", n]]),
|
||
(t.markup = "autolink"),
|
||
(t.info = "auto"),
|
||
(e.push("text", "", 0).content = e.md.normalizeLinkText(a));
|
||
let i = e.push("link_close", "a", -1);
|
||
(i.markup = "autolink"), (i.info = "auto");
|
||
}
|
||
return (e.pos += a.length + 2), !0;
|
||
}
|
||
return !1;
|
||
},
|
||
],
|
||
[
|
||
"html_inline",
|
||
function (e, t) {
|
||
let n;
|
||
if (!e.md.options.html) return !1;
|
||
let i = e.posMax,
|
||
r = e.pos;
|
||
if (60 !== e.src.charCodeAt(r) || r + 2 >= i) return !1;
|
||
let a = e.src.charCodeAt(r + 1);
|
||
if (
|
||
33 !== a &&
|
||
63 !== a &&
|
||
47 !== a &&
|
||
(!((n = 32 | a) >= 97) || !(n <= 122))
|
||
)
|
||
return !1;
|
||
let o = e.src.slice(r).match(tw);
|
||
if (!o) return !1;
|
||
if (!t) {
|
||
var s, c;
|
||
let t = e.push("html_inline", "", 0);
|
||
(t.content = o[0]),
|
||
(s = t.content),
|
||
/^<a[>\s]/i.test(s) && e.linkLevel++,
|
||
(c = t.content),
|
||
/^<\/a\s*>/i.test(c) && e.linkLevel--;
|
||
}
|
||
return (e.pos += o[0].length), !0;
|
||
},
|
||
],
|
||
[
|
||
"entity",
|
||
function (e, t) {
|
||
let n = e.pos,
|
||
i = e.posMax;
|
||
if (38 !== e.src.charCodeAt(n) || n + 1 >= i) return !1;
|
||
if (35 === e.src.charCodeAt(n + 1)) {
|
||
let i = e.src.slice(n).match(tN);
|
||
if (i) {
|
||
if (!t) {
|
||
let t =
|
||
"x" === i[1][0].toLowerCase()
|
||
? parseInt(i[1].slice(1), 16)
|
||
: parseInt(i[1], 10),
|
||
n = e.push("text_special", "", 0);
|
||
(n.content = eR(t) ? eL(t) : eL(65533)),
|
||
(n.markup = i[0]),
|
||
(n.info = "entity");
|
||
}
|
||
return (e.pos += i[0].length), !0;
|
||
}
|
||
} else {
|
||
let i = e.src.slice(n).match(tI);
|
||
if (i) {
|
||
let n = eM(i[0]);
|
||
if (n !== i[0]) {
|
||
if (!t) {
|
||
let t = e.push("text_special", "", 0);
|
||
(t.content = n), (t.markup = i[0]), (t.info = "entity");
|
||
}
|
||
return (e.pos += i[0].length), !0;
|
||
}
|
||
}
|
||
}
|
||
return !1;
|
||
},
|
||
],
|
||
],
|
||
tL = [
|
||
[
|
||
"balance_pairs",
|
||
function (e) {
|
||
let t = e.tokens_meta,
|
||
n = e.tokens_meta.length;
|
||
tP(e.delimiters);
|
||
for (let e = 0; e < n; e++)
|
||
t[e] && t[e].delimiters && tP(t[e].delimiters);
|
||
},
|
||
],
|
||
[
|
||
"strikethrough",
|
||
function (e) {
|
||
let t = e.tokens_meta,
|
||
n = e.tokens_meta.length;
|
||
tT(e, e.delimiters);
|
||
for (let i = 0; i < n; i++)
|
||
t[i] && t[i].delimiters && tT(e, t[i].delimiters);
|
||
},
|
||
],
|
||
[
|
||
"emphasis",
|
||
function (e) {
|
||
let t = e.tokens_meta,
|
||
n = e.tokens_meta.length;
|
||
tk(e, e.delimiters);
|
||
for (let i = 0; i < n; i++)
|
||
t[i] && t[i].delimiters && tk(e, t[i].delimiters);
|
||
},
|
||
],
|
||
[
|
||
"fragments_join",
|
||
function (e) {
|
||
let t,
|
||
n,
|
||
i = 0,
|
||
r = e.tokens,
|
||
a = e.tokens.length;
|
||
for (t = n = 0; t < a; t++)
|
||
r[t].nesting < 0 && i--,
|
||
(r[t].level = i),
|
||
r[t].nesting > 0 && i++,
|
||
"text" === r[t].type && t + 1 < a && "text" === r[t + 1].type
|
||
? (r[t + 1].content = r[t].content + r[t + 1].content)
|
||
: (t !== n && (r[n] = r[t]), n++);
|
||
t !== n && (r.length = n);
|
||
},
|
||
],
|
||
];
|
||
function tD() {
|
||
this.ruler = new e6();
|
||
for (let e = 0; e < tR.length; e++) this.ruler.push(tR[e][0], tR[e][1]);
|
||
this.ruler2 = new e6();
|
||
for (let e = 0; e < tL.length; e++) this.ruler2.push(tL[e][0], tL[e][1]);
|
||
}
|
||
function tj(e) {
|
||
let t = Array.prototype.slice.call(arguments, 1);
|
||
return (
|
||
t.forEach(function (t) {
|
||
t &&
|
||
Object.keys(t).forEach(function (n) {
|
||
e[n] = t[n];
|
||
});
|
||
}),
|
||
e
|
||
);
|
||
}
|
||
function tO(e) {
|
||
return Object.prototype.toString.call(e);
|
||
}
|
||
function tF(e) {
|
||
return "[object Function]" === tO(e);
|
||
}
|
||
function tU(e) {
|
||
return e.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
||
}
|
||
(tD.prototype.skipToken = function (e) {
|
||
let t = e.pos,
|
||
n = this.ruler.getRules(""),
|
||
i = n.length,
|
||
r = e.md.options.maxNesting,
|
||
a = e.cache;
|
||
if (void 0 !== a[t]) {
|
||
e.pos = a[t];
|
||
return;
|
||
}
|
||
let o = !1;
|
||
if (e.level < r) {
|
||
for (let r = 0; r < i; r++)
|
||
if ((e.level++, (o = n[r](e, !0)), e.level--, o)) {
|
||
if (t >= e.pos)
|
||
throw Error("inline rule didn't increment state.pos");
|
||
break;
|
||
}
|
||
} else e.pos = e.posMax;
|
||
!o && e.pos++, (a[t] = e.pos);
|
||
}),
|
||
(tD.prototype.tokenize = function (e) {
|
||
let t = this.ruler.getRules(""),
|
||
n = t.length,
|
||
i = e.posMax,
|
||
r = e.md.options.maxNesting;
|
||
for (; e.pos < i; ) {
|
||
let a = e.pos,
|
||
o = !1;
|
||
if (e.level < r) {
|
||
for (let i = 0; i < n; i++)
|
||
if ((o = t[i](e, !1))) {
|
||
if (a >= e.pos)
|
||
throw Error("inline rule didn't increment state.pos");
|
||
break;
|
||
}
|
||
}
|
||
if (o) {
|
||
if (e.pos >= i) break;
|
||
continue;
|
||
}
|
||
e.pending += e.src[e.pos++];
|
||
}
|
||
e.pending && e.pushPending();
|
||
}),
|
||
(tD.prototype.parse = function (e, t, n, i) {
|
||
let r = new this.State(e, t, n, i);
|
||
this.tokenize(r);
|
||
let a = this.ruler2.getRules(""),
|
||
o = a.length;
|
||
for (let e = 0; e < o; e++) a[e](r);
|
||
}),
|
||
(tD.prototype.State = tS);
|
||
let tB = { fuzzyLink: !0, fuzzyEmail: !0, fuzzyIP: !1 },
|
||
tH = {
|
||
"http:": {
|
||
validate: function (e, t, n) {
|
||
let i = e.slice(t);
|
||
return (n.re.http ||
|
||
(n.re.http = RegExp(
|
||
"^\\/\\/" +
|
||
n.re.src_auth +
|
||
n.re.src_host_port_strict +
|
||
n.re.src_path,
|
||
"i",
|
||
)),
|
||
n.re.http.test(i))
|
||
? i.match(n.re.http)[0].length
|
||
: 0;
|
||
},
|
||
},
|
||
"https:": "http:",
|
||
"ftp:": "http:",
|
||
"//": {
|
||
validate: function (e, t, n) {
|
||
let i = e.slice(t);
|
||
return (n.re.no_http ||
|
||
(n.re.no_http = RegExp(
|
||
"^" +
|
||
n.re.src_auth +
|
||
"(?:localhost|(?:(?:" +
|
||
n.re.src_domain +
|
||
")\\.)+" +
|
||
n.re.src_domain_root +
|
||
")" +
|
||
n.re.src_port +
|
||
n.re.src_host_terminator +
|
||
n.re.src_path,
|
||
"i",
|
||
)),
|
||
n.re.no_http.test(i))
|
||
? (t >= 3 && ":" === e[t - 3]) || (t >= 3 && "/" === e[t - 3])
|
||
? 0
|
||
: i.match(n.re.no_http)[0].length
|
||
: 0;
|
||
},
|
||
},
|
||
"mailto:": {
|
||
validate: function (e, t, n) {
|
||
let i = e.slice(t);
|
||
return (n.re.mailto ||
|
||
(n.re.mailto = RegExp(
|
||
"^" + n.re.src_email_name + "@" + n.re.src_host_strict,
|
||
"i",
|
||
)),
|
||
n.re.mailto.test(i))
|
||
? i.match(n.re.mailto)[0].length
|
||
: 0;
|
||
},
|
||
},
|
||
},
|
||
tz =
|
||
"biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split(
|
||
"|",
|
||
);
|
||
function tG() {
|
||
return function (e, t) {
|
||
t.normalize(e);
|
||
};
|
||
}
|
||
function t$(e) {
|
||
var t;
|
||
let n,
|
||
i,
|
||
r =
|
||
((t = e.__opts__),
|
||
(t = t || {}),
|
||
((n = {}).src_Any = eh.source),
|
||
(n.src_Cc = ef.source),
|
||
(n.src_Z = eg.source),
|
||
(n.src_P = ed.source),
|
||
(n.src_ZPCc = [n.src_Z, n.src_P, n.src_Cc].join("|")),
|
||
(n.src_ZCc = [n.src_Z, n.src_Cc].join("|")),
|
||
(n.src_pseudo_letter =
|
||
"(?:(?!" +
|
||
(i = "[><|]") +
|
||
"|" +
|
||
n.src_ZPCc +
|
||
")" +
|
||
n.src_Any +
|
||
")"),
|
||
(n.src_ip4 =
|
||
"(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"),
|
||
(n.src_auth = "(?:(?:(?!" + n.src_ZCc + "|[@/\\[\\]()]).)+@)?"),
|
||
(n.src_port =
|
||
"(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"),
|
||
(n.src_host_terminator =
|
||
"(?=$|" +
|
||
i +
|
||
"|" +
|
||
n.src_ZPCc +
|
||
")(?!" +
|
||
(t["---"] ? "-(?!--)|" : "-|") +
|
||
"_|:\\d|\\.-|\\.(?!$|" +
|
||
n.src_ZPCc +
|
||
"))"),
|
||
(n.src_path =
|
||
"(?:[/?#](?:(?!" +
|
||
n.src_ZCc +
|
||
"|" +
|
||
i +
|
||
"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!" +
|
||
n.src_ZCc +
|
||
"|\\]).)*\\]|\\((?:(?!" +
|
||
n.src_ZCc +
|
||
"|[)]).)*\\)|\\{(?:(?!" +
|
||
n.src_ZCc +
|
||
'|[}]).)*\\}|\\"(?:(?!' +
|
||
n.src_ZCc +
|
||
'|["]).)+\\"|\\\'(?:(?!' +
|
||
n.src_ZCc +
|
||
"|[']).)+\\'|\\'(?=" +
|
||
n.src_pseudo_letter +
|
||
"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" +
|
||
n.src_ZCc +
|
||
"|[.]|$)|" +
|
||
(t["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") +
|
||
",(?!" +
|
||
n.src_ZCc +
|
||
"|$)|;(?!" +
|
||
n.src_ZCc +
|
||
"|$)|\\!+(?!" +
|
||
n.src_ZCc +
|
||
"|[!]|$)|\\?(?!" +
|
||
n.src_ZCc +
|
||
"|[?]|$))+|\\/)?"),
|
||
(n.src_email_name =
|
||
'[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*'),
|
||
(n.src_xn = "xn--[a-z0-9\\-]{1,59}"),
|
||
(n.src_domain_root =
|
||
"(?:" + n.src_xn + "|" + n.src_pseudo_letter + "{1,63})"),
|
||
(n.src_domain =
|
||
"(?:" +
|
||
n.src_xn +
|
||
"|(?:" +
|
||
n.src_pseudo_letter +
|
||
")|(?:" +
|
||
n.src_pseudo_letter +
|
||
"(?:-|" +
|
||
n.src_pseudo_letter +
|
||
"){0,61}" +
|
||
n.src_pseudo_letter +
|
||
"))"),
|
||
(n.src_host =
|
||
"(?:(?:(?:(?:" + n.src_domain + ")\\.)*" + n.src_domain + "))"),
|
||
(n.tpl_host_fuzzy =
|
||
"(?:" +
|
||
n.src_ip4 +
|
||
"|(?:(?:(?:" +
|
||
n.src_domain +
|
||
")\\.)+(?:%TLDS%)))"),
|
||
(n.tpl_host_no_ip_fuzzy =
|
||
"(?:(?:(?:" + n.src_domain + ")\\.)+(?:%TLDS%))"),
|
||
(n.src_host_strict = n.src_host + n.src_host_terminator),
|
||
(n.tpl_host_fuzzy_strict = n.tpl_host_fuzzy + n.src_host_terminator),
|
||
(n.src_host_port_strict =
|
||
n.src_host + n.src_port + n.src_host_terminator),
|
||
(n.tpl_host_port_fuzzy_strict =
|
||
n.tpl_host_fuzzy + n.src_port + n.src_host_terminator),
|
||
(n.tpl_host_port_no_ip_fuzzy_strict =
|
||
n.tpl_host_no_ip_fuzzy + n.src_port + n.src_host_terminator),
|
||
(n.tpl_host_fuzzy_test =
|
||
"localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" +
|
||
n.src_ZPCc +
|
||
"|>|$))"),
|
||
(n.tpl_email_fuzzy =
|
||
"(^|" +
|
||
i +
|
||
'|"|\\(|' +
|
||
n.src_ZCc +
|
||
")(" +
|
||
n.src_email_name +
|
||
"@" +
|
||
n.tpl_host_fuzzy_strict +
|
||
")"),
|
||
(n.tpl_link_fuzzy =
|
||
"(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" +
|
||
n.src_ZPCc +
|
||
"))((?![$+<=>^`||])" +
|
||
n.tpl_host_port_fuzzy_strict +
|
||
n.src_path +
|
||
")"),
|
||
(n.tpl_link_no_ip_fuzzy =
|
||
"(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" +
|
||
n.src_ZPCc +
|
||
"))((?![$+<=>^`||])" +
|
||
n.tpl_host_port_no_ip_fuzzy_strict +
|
||
n.src_path +
|
||
")"),
|
||
(e.re = n)),
|
||
a = e.__tlds__.slice();
|
||
function o(e) {
|
||
return e.replace("%TLDS%", r.src_tlds);
|
||
}
|
||
e.onCompile(),
|
||
e.__tlds_replaced__ ||
|
||
a.push(
|
||
"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]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",
|
||
),
|
||
a.push(r.src_xn),
|
||
(r.src_tlds = a.join("|")),
|
||
(r.email_fuzzy = RegExp(o(r.tpl_email_fuzzy), "i")),
|
||
(r.link_fuzzy = RegExp(o(r.tpl_link_fuzzy), "i")),
|
||
(r.link_no_ip_fuzzy = RegExp(o(r.tpl_link_no_ip_fuzzy), "i")),
|
||
(r.host_fuzzy_test = RegExp(o(r.tpl_host_fuzzy_test), "i"));
|
||
let s = [];
|
||
function c(e, t) {
|
||
throw Error('(LinkifyIt) Invalid schema "' + e + '": ' + t);
|
||
}
|
||
(e.__compiled__ = {}),
|
||
Object.keys(e.__schemas__).forEach(function (t) {
|
||
let n = e.__schemas__[t];
|
||
if (null === n) return;
|
||
let i = { validate: null, link: null };
|
||
if (((e.__compiled__[t] = i), "[object Object]" === tO(n))) {
|
||
if ("[object RegExp]" === tO(n.validate)) {
|
||
var r;
|
||
(r = n.validate),
|
||
(i.validate = function (e, t) {
|
||
let n = e.slice(t);
|
||
return r.test(n) ? n.match(r)[0].length : 0;
|
||
});
|
||
} else tF(n.validate) ? (i.validate = n.validate) : c(t, n);
|
||
tF(n.normalize)
|
||
? (i.normalize = n.normalize)
|
||
: n.normalize
|
||
? c(t, n)
|
||
: (i.normalize = tG());
|
||
return;
|
||
}
|
||
"[object String]" === tO(n) ? s.push(t) : c(t, n);
|
||
}),
|
||
s.forEach(function (t) {
|
||
e.__compiled__[e.__schemas__[t]] &&
|
||
((e.__compiled__[t].validate =
|
||
e.__compiled__[e.__schemas__[t]].validate),
|
||
(e.__compiled__[t].normalize =
|
||
e.__compiled__[e.__schemas__[t]].normalize));
|
||
}),
|
||
(e.__compiled__[""] = { validate: null, normalize: tG() });
|
||
let l = Object.keys(e.__compiled__)
|
||
.filter(function (t) {
|
||
return t.length > 0 && e.__compiled__[t];
|
||
})
|
||
.map(tU)
|
||
.join("|");
|
||
(e.re.schema_test = RegExp(
|
||
"(^|(?!_)(?:[><|]|" + r.src_ZPCc + "))(" + l + ")",
|
||
"i",
|
||
)),
|
||
(e.re.schema_search = RegExp(
|
||
"(^|(?!_)(?:[><|]|" + r.src_ZPCc + "))(" + l + ")",
|
||
"ig",
|
||
)),
|
||
(e.re.schema_at_start = RegExp("^" + e.re.schema_search.source, "i")),
|
||
(e.re.pretest = RegExp(
|
||
"(" +
|
||
e.re.schema_test.source +
|
||
")|(" +
|
||
e.re.host_fuzzy_test.source +
|
||
")|@",
|
||
"i",
|
||
)),
|
||
(e.__index__ = -1),
|
||
(e.__text_cache__ = "");
|
||
}
|
||
function tV(e, t) {
|
||
let n = e.__index__,
|
||
i = e.__last_index__,
|
||
r = e.__text_cache__.slice(n, i);
|
||
(this.schema = e.__schema__.toLowerCase()),
|
||
(this.index = n + t),
|
||
(this.lastIndex = i + t),
|
||
(this.raw = r),
|
||
(this.text = r),
|
||
(this.url = r);
|
||
}
|
||
function tW(e, t) {
|
||
let n = new tV(e, t);
|
||
return e.__compiled__[n.schema].normalize(n, e), n;
|
||
}
|
||
function tK(e, t) {
|
||
if (!(this instanceof tK)) return new tK(e, t);
|
||
!t &&
|
||
Object.keys(e || {}).reduce(function (e, t) {
|
||
return e || tB.hasOwnProperty(t);
|
||
}, !1) &&
|
||
((t = e), (e = {})),
|
||
(this.__opts__ = tj({}, tB, t)),
|
||
(this.__index__ = -1),
|
||
(this.__last_index__ = -1),
|
||
(this.__schema__ = ""),
|
||
(this.__text_cache__ = ""),
|
||
(this.__schemas__ = tj({}, tH, e)),
|
||
(this.__compiled__ = {}),
|
||
(this.__tlds__ = tz),
|
||
(this.__tlds_replaced__ = !1),
|
||
(this.re = {}),
|
||
t$(this);
|
||
}
|
||
(tK.prototype.add = function (e, t) {
|
||
return (this.__schemas__[e] = t), t$(this), this;
|
||
}),
|
||
(tK.prototype.set = function (e) {
|
||
return (this.__opts__ = tj(this.__opts__, e)), this;
|
||
}),
|
||
(tK.prototype.test = function (e) {
|
||
let t, n, i, r, a, o, s, c;
|
||
if (((this.__text_cache__ = e), (this.__index__ = -1), !e.length))
|
||
return !1;
|
||
if (this.re.schema_test.test(e)) {
|
||
for (
|
||
(s = this.re.schema_search).lastIndex = 0;
|
||
null !== (t = s.exec(e));
|
||
|
||
)
|
||
if ((r = this.testSchemaAt(e, t[2], s.lastIndex))) {
|
||
(this.__schema__ = t[2]),
|
||
(this.__index__ = t.index + t[1].length),
|
||
(this.__last_index__ = t.index + t[0].length + r);
|
||
break;
|
||
}
|
||
}
|
||
return (
|
||
this.__opts__.fuzzyLink &&
|
||
this.__compiled__["http:"] &&
|
||
(c = e.search(this.re.host_fuzzy_test)) >= 0 &&
|
||
(this.__index__ < 0 || c < this.__index__) &&
|
||
null !==
|
||
(n = e.match(
|
||
this.__opts__.fuzzyIP
|
||
? this.re.link_fuzzy
|
||
: this.re.link_no_ip_fuzzy,
|
||
)) &&
|
||
((a = n.index + n[1].length),
|
||
(this.__index__ < 0 || a < this.__index__) &&
|
||
((this.__schema__ = ""),
|
||
(this.__index__ = a),
|
||
(this.__last_index__ = n.index + n[0].length))),
|
||
this.__opts__.fuzzyEmail &&
|
||
this.__compiled__["mailto:"] &&
|
||
e.indexOf("@") >= 0 &&
|
||
null !== (i = e.match(this.re.email_fuzzy)) &&
|
||
((a = i.index + i[1].length),
|
||
(o = i.index + i[0].length),
|
||
(this.__index__ < 0 ||
|
||
a < this.__index__ ||
|
||
(a === this.__index__ && o > this.__last_index__)) &&
|
||
((this.__schema__ = "mailto:"),
|
||
(this.__index__ = a),
|
||
(this.__last_index__ = o))),
|
||
this.__index__ >= 0
|
||
);
|
||
}),
|
||
(tK.prototype.pretest = function (e) {
|
||
return this.re.pretest.test(e);
|
||
}),
|
||
(tK.prototype.testSchemaAt = function (e, t, n) {
|
||
return this.__compiled__[t.toLowerCase()]
|
||
? this.__compiled__[t.toLowerCase()].validate(e, n, this)
|
||
: 0;
|
||
}),
|
||
(tK.prototype.match = function (e) {
|
||
let t = [],
|
||
n = 0;
|
||
this.__index__ >= 0 &&
|
||
this.__text_cache__ === e &&
|
||
(t.push(tW(this, n)), (n = this.__last_index__));
|
||
let i = n ? e.slice(n) : e;
|
||
for (; this.test(i); )
|
||
t.push(tW(this, n)),
|
||
(i = i.slice(this.__last_index__)),
|
||
(n += this.__last_index__);
|
||
return t.length ? t : null;
|
||
}),
|
||
(tK.prototype.matchAtStart = function (e) {
|
||
if (((this.__text_cache__ = e), (this.__index__ = -1), !e.length))
|
||
return null;
|
||
let t = this.re.schema_at_start.exec(e);
|
||
if (!t) return null;
|
||
let n = this.testSchemaAt(e, t[2], t[0].length);
|
||
return n
|
||
? ((this.__schema__ = t[2]),
|
||
(this.__index__ = t.index + t[1].length),
|
||
(this.__last_index__ = t.index + t[0].length + n),
|
||
tW(this, 0))
|
||
: null;
|
||
}),
|
||
(tK.prototype.tlds = function (e, t) {
|
||
return (
|
||
((e = Array.isArray(e) ? e : [e]), t)
|
||
? (this.__tlds__ = this.__tlds__
|
||
.concat(e)
|
||
.sort()
|
||
.filter(function (e, t, n) {
|
||
return e !== n[t - 1];
|
||
})
|
||
.reverse())
|
||
: ((this.__tlds__ = e.slice()), (this.__tlds_replaced__ = !0)),
|
||
t$(this),
|
||
this
|
||
);
|
||
}),
|
||
(tK.prototype.normalize = function (e) {
|
||
e.schema || (e.url = "http://" + e.url),
|
||
"mailto:" !== e.schema ||
|
||
/^mailto:/i.test(e.url) ||
|
||
(e.url = "mailto:" + e.url);
|
||
}),
|
||
(tK.prototype.onCompile = function () {});
|
||
let tq = /^xn--/,
|
||
tX = /[^\0-\x7F]/,
|
||
tY = /[\x2E\u3002\uFF0E\uFF61]/g,
|
||
tJ = {
|
||
overflow: "Overflow: input needs wider integers to process",
|
||
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
||
"invalid-input": "Invalid input",
|
||
},
|
||
tZ = Math.floor,
|
||
tQ = String.fromCharCode;
|
||
function t1(e) {
|
||
throw RangeError(tJ[e]);
|
||
}
|
||
function t0(e, t) {
|
||
let n = e.split("@"),
|
||
i = "";
|
||
return (
|
||
n.length > 1 && ((i = n[0] + "@"), (e = n[1])),
|
||
i +
|
||
(function (e, t) {
|
||
let n = [],
|
||
i = e.length;
|
||
for (; i--; ) n[i] = t(e[i]);
|
||
return n;
|
||
})((e = e.replace(tY, ".")).split("."), t).join(".")
|
||
);
|
||
}
|
||
let t2 = function (e, t) {
|
||
return e + 22 + 75 * (e < 26) - ((0 != t) << 5);
|
||
},
|
||
t3 = function (e, t, n) {
|
||
let i = 0;
|
||
for (e = n ? tZ(e / 700) : e >> 1, e += tZ(e / t); e > 455; i += 36)
|
||
e = tZ(e / 35);
|
||
return tZ(i + (36 * e) / (e + 38));
|
||
},
|
||
t4 = function (e) {
|
||
let t = [],
|
||
n = e.length,
|
||
i = 0,
|
||
r = 128,
|
||
a = 72,
|
||
o = e.lastIndexOf("-");
|
||
o < 0 && (o = 0);
|
||
for (let n = 0; n < o; ++n)
|
||
e.charCodeAt(n) >= 128 && t1("not-basic"), t.push(e.charCodeAt(n));
|
||
for (let c = o > 0 ? o + 1 : 0; c < n; ) {
|
||
let o = i;
|
||
for (let t = 1, r = 36; ; r += 36) {
|
||
var s;
|
||
c >= n && t1("invalid-input");
|
||
let o =
|
||
(s = e.charCodeAt(c++)) >= 48 && s < 58
|
||
? 26 + (s - 48)
|
||
: s >= 65 && s < 91
|
||
? s - 65
|
||
: s >= 97 && s < 123
|
||
? s - 97
|
||
: 36;
|
||
o >= 36 && t1("invalid-input"),
|
||
o > tZ((0x7fffffff - i) / t) && t1("overflow"),
|
||
(i += o * t);
|
||
let l = r <= a ? 1 : r >= a + 26 ? 26 : r - a;
|
||
if (o < l) break;
|
||
let u = 36 - l;
|
||
t > tZ(0x7fffffff / u) && t1("overflow"), (t *= u);
|
||
}
|
||
let l = t.length + 1;
|
||
(a = t3(i - o, l, 0 == o)),
|
||
tZ(i / l) > 0x7fffffff - r && t1("overflow"),
|
||
(r += tZ(i / l)),
|
||
(i %= l),
|
||
t.splice(i++, 0, r);
|
||
}
|
||
return String.fromCodePoint(...t);
|
||
},
|
||
t5 = function (e) {
|
||
let t = [],
|
||
n = (e = (function (e) {
|
||
let t = [],
|
||
n = 0,
|
||
i = e.length;
|
||
for (; n < i; ) {
|
||
let r = e.charCodeAt(n++);
|
||
if (r >= 55296 && r <= 56319 && n < i) {
|
||
let i = e.charCodeAt(n++);
|
||
(64512 & i) == 56320
|
||
? t.push(((1023 & r) << 10) + (1023 & i) + 65536)
|
||
: (t.push(r), n--);
|
||
} else t.push(r);
|
||
}
|
||
return t;
|
||
})(e)).length,
|
||
i = 128,
|
||
r = 0,
|
||
a = 72;
|
||
for (let n of e) n < 128 && t.push(tQ(n));
|
||
let o = t.length,
|
||
s = o;
|
||
for (o && t.push("-"); s < n; ) {
|
||
let n = 0x7fffffff;
|
||
for (let t of e) t >= i && t < n && (n = t);
|
||
let c = s + 1;
|
||
for (let l of (n - i > tZ((0x7fffffff - r) / c) && t1("overflow"),
|
||
(r += (n - i) * c),
|
||
(i = n),
|
||
e))
|
||
if ((l < i && ++r > 0x7fffffff && t1("overflow"), l === i)) {
|
||
let e = r;
|
||
for (let n = 36; ; n += 36) {
|
||
let i = n <= a ? 1 : n >= a + 26 ? 26 : n - a;
|
||
if (e < i) break;
|
||
let r = e - i,
|
||
o = 36 - i;
|
||
t.push(tQ(t2(i + (r % o), 0))), (e = tZ(r / o));
|
||
}
|
||
t.push(tQ(t2(e, 0))), (a = t3(r, c, s === o)), (r = 0), ++s;
|
||
}
|
||
++r, ++i;
|
||
}
|
||
return t.join("");
|
||
},
|
||
t6 = {
|
||
default: {
|
||
options: {
|
||
html: !1,
|
||
xhtmlOut: !1,
|
||
breaks: !1,
|
||
langPrefix: "language-",
|
||
linkify: !1,
|
||
typographer: !1,
|
||
quotes: "“”‘’",
|
||
highlight: null,
|
||
maxNesting: 100,
|
||
},
|
||
components: { core: {}, block: {}, inline: {} },
|
||
},
|
||
zero: {
|
||
options: {
|
||
html: !1,
|
||
xhtmlOut: !1,
|
||
breaks: !1,
|
||
langPrefix: "language-",
|
||
linkify: !1,
|
||
typographer: !1,
|
||
quotes: "“”‘’",
|
||
highlight: null,
|
||
maxNesting: 20,
|
||
},
|
||
components: {
|
||
core: { rules: ["normalize", "block", "inline", "text_join"] },
|
||
block: { rules: ["paragraph"] },
|
||
inline: {
|
||
rules: ["text"],
|
||
rules2: ["balance_pairs", "fragments_join"],
|
||
},
|
||
},
|
||
},
|
||
commonmark: {
|
||
options: {
|
||
html: !0,
|
||
xhtmlOut: !0,
|
||
breaks: !1,
|
||
langPrefix: "language-",
|
||
linkify: !1,
|
||
typographer: !1,
|
||
quotes: "“”‘’",
|
||
highlight: null,
|
||
maxNesting: 20,
|
||
},
|
||
components: {
|
||
core: { rules: ["normalize", "block", "inline", "text_join"] },
|
||
block: {
|
||
rules: [
|
||
"blockquote",
|
||
"code",
|
||
"fence",
|
||
"heading",
|
||
"hr",
|
||
"html_block",
|
||
"lheading",
|
||
"list",
|
||
"reference",
|
||
"paragraph",
|
||
],
|
||
},
|
||
inline: {
|
||
rules: [
|
||
"autolink",
|
||
"backticks",
|
||
"emphasis",
|
||
"entity",
|
||
"escape",
|
||
"html_inline",
|
||
"image",
|
||
"link",
|
||
"newline",
|
||
"text",
|
||
],
|
||
rules2: ["balance_pairs", "emphasis", "fragments_join"],
|
||
},
|
||
},
|
||
},
|
||
},
|
||
t8 = /^(vbscript|javascript|file|data):/,
|
||
t9 = /^data:image\/(gif|png|jpeg|webp);/;
|
||
function t7(e) {
|
||
let t = e.trim().toLowerCase();
|
||
return !t8.test(t) || t9.test(t);
|
||
}
|
||
let ne = ["http:", "https:", "mailto:"];
|
||
function nt(e) {
|
||
let t = el(e, !0);
|
||
if (t.hostname && (!t.protocol || ne.indexOf(t.protocol) >= 0))
|
||
try {
|
||
var n;
|
||
(n = t.hostname),
|
||
(t.hostname = t0(n, function (e) {
|
||
return tX.test(e) ? "xn--" + t5(e) : e;
|
||
}));
|
||
} catch (e) {}
|
||
return J(Z(t));
|
||
}
|
||
function nn(e) {
|
||
let t = el(e, !0);
|
||
if (t.hostname && (!t.protocol || ne.indexOf(t.protocol) >= 0))
|
||
try {
|
||
var n;
|
||
(n = t.hostname),
|
||
(t.hostname = t0(n, function (e) {
|
||
return tq.test(e) ? t4(e.slice(4).toLowerCase()) : e;
|
||
}));
|
||
} catch (e) {}
|
||
return X(Z(t), X.defaultChars + "%");
|
||
}
|
||
function ni(e, t) {
|
||
if (!(this instanceof ni)) return new ni(e, t);
|
||
t || eQ.isString(e) || ((t = e || {}), (e = "default")),
|
||
(this.inline = new tD()),
|
||
(this.block = new t_()),
|
||
(this.core = new tu()),
|
||
(this.renderer = new e5()),
|
||
(this.linkify = new tK()),
|
||
(this.validateLink = t7),
|
||
(this.normalizeLink = nt),
|
||
(this.normalizeLinkText = nn),
|
||
(this.utils = eQ),
|
||
(this.helpers = eQ.assign({}, e3)),
|
||
(this.options = {}),
|
||
this.configure(e),
|
||
t && this.set(t);
|
||
}
|
||
(ni.prototype.set = function (e) {
|
||
return eQ.assign(this.options, e), this;
|
||
}),
|
||
(ni.prototype.configure = function (e) {
|
||
let t = this;
|
||
if (eQ.isString(e)) {
|
||
let t = e;
|
||
if (!(e = t6[t]))
|
||
throw Error('Wrong `markdown-it` preset "' + t + '", check name');
|
||
}
|
||
if (!e) throw Error("Wrong `markdown-it` preset, can't be empty");
|
||
return (
|
||
e.options && t.set(e.options),
|
||
e.components &&
|
||
Object.keys(e.components).forEach(function (n) {
|
||
e.components[n].rules &&
|
||
t[n].ruler.enableOnly(e.components[n].rules),
|
||
e.components[n].rules2 &&
|
||
t[n].ruler2.enableOnly(e.components[n].rules2);
|
||
}),
|
||
this
|
||
);
|
||
}),
|
||
(ni.prototype.enable = function (e, t) {
|
||
let n = [];
|
||
Array.isArray(e) || (e = [e]),
|
||
["core", "block", "inline"].forEach(function (t) {
|
||
n = n.concat(this[t].ruler.enable(e, !0));
|
||
}, this),
|
||
(n = n.concat(this.inline.ruler2.enable(e, !0)));
|
||
let i = e.filter(function (e) {
|
||
return 0 > n.indexOf(e);
|
||
});
|
||
if (i.length && !t)
|
||
throw Error("MarkdownIt. Failed to enable unknown rule(s): " + i);
|
||
return this;
|
||
}),
|
||
(ni.prototype.disable = function (e, t) {
|
||
let n = [];
|
||
Array.isArray(e) || (e = [e]),
|
||
["core", "block", "inline"].forEach(function (t) {
|
||
n = n.concat(this[t].ruler.disable(e, !0));
|
||
}, this),
|
||
(n = n.concat(this.inline.ruler2.disable(e, !0)));
|
||
let i = e.filter(function (e) {
|
||
return 0 > n.indexOf(e);
|
||
});
|
||
if (i.length && !t)
|
||
throw Error("MarkdownIt. Failed to disable unknown rule(s): " + i);
|
||
return this;
|
||
}),
|
||
(ni.prototype.use = function (e) {
|
||
let t = [this].concat(Array.prototype.slice.call(arguments, 1));
|
||
return e.apply(e, t), this;
|
||
}),
|
||
(ni.prototype.parse = function (e, t) {
|
||
if ("string" != typeof e) throw Error("Input data should be a String");
|
||
let n = new this.core.State(e, this, t);
|
||
return this.core.process(n), n.tokens;
|
||
}),
|
||
(ni.prototype.render = function (e, t) {
|
||
return (
|
||
(t = t || {}), this.renderer.render(this.parse(e, t), this.options, t)
|
||
);
|
||
}),
|
||
(ni.prototype.parseInline = function (e, t) {
|
||
let n = new this.core.State(e, this, t);
|
||
return (n.inlineMode = !0), this.core.process(n), n.tokens;
|
||
}),
|
||
(ni.prototype.renderInline = function (e, t) {
|
||
return (
|
||
(t = t || {}),
|
||
this.renderer.render(this.parseInline(e, t), this.options, t)
|
||
);
|
||
}),
|
||
e.s(["default", 0, ni], 793143),
|
||
e.s([], 352103);
|
||
let nr = new K.Schema({
|
||
nodes: {
|
||
doc: { content: "block+" },
|
||
paragraph: {
|
||
content: "inline*",
|
||
group: "block",
|
||
parseDOM: [{ tag: "p" }],
|
||
toDOM: () => ["p", 0],
|
||
},
|
||
blockquote: {
|
||
content: "block+",
|
||
group: "block",
|
||
parseDOM: [{ tag: "blockquote" }],
|
||
toDOM: () => ["blockquote", 0],
|
||
},
|
||
horizontal_rule: {
|
||
group: "block",
|
||
parseDOM: [{ tag: "hr" }],
|
||
toDOM: () => ["div", ["hr"]],
|
||
},
|
||
heading: {
|
||
attrs: { level: { default: 1 } },
|
||
content: "(text | image)*",
|
||
group: "block",
|
||
defining: !0,
|
||
parseDOM: [
|
||
{ tag: "h1", attrs: { level: 1 } },
|
||
{ tag: "h2", attrs: { level: 2 } },
|
||
{ tag: "h3", attrs: { level: 3 } },
|
||
{ tag: "h4", attrs: { level: 4 } },
|
||
{ tag: "h5", attrs: { level: 5 } },
|
||
{ tag: "h6", attrs: { level: 6 } },
|
||
],
|
||
toDOM: (e) => ["h" + e.attrs.level, 0],
|
||
},
|
||
code_block: {
|
||
content: "text*",
|
||
group: "block",
|
||
code: !0,
|
||
defining: !0,
|
||
marks: "",
|
||
attrs: { params: { default: "" } },
|
||
parseDOM: [
|
||
{
|
||
tag: "pre",
|
||
preserveWhitespace: "full",
|
||
getAttrs: (e) => ({
|
||
params: e.getAttribute("data-params") || "",
|
||
}),
|
||
},
|
||
],
|
||
toDOM: (e) => [
|
||
"pre",
|
||
e.attrs.params ? { "data-params": e.attrs.params } : {},
|
||
["code", 0],
|
||
],
|
||
},
|
||
ordered_list: {
|
||
content: "list_item+",
|
||
group: "block",
|
||
attrs: { order: { default: 1 }, tight: { default: !1 } },
|
||
parseDOM: [
|
||
{
|
||
tag: "ol",
|
||
getAttrs: (e) => ({
|
||
order: e.hasAttribute("start") ? +e.getAttribute("start") : 1,
|
||
tight: e.hasAttribute("data-tight"),
|
||
}),
|
||
},
|
||
],
|
||
toDOM: (e) => [
|
||
"ol",
|
||
{
|
||
start: 1 == e.attrs.order ? null : e.attrs.order,
|
||
"data-tight": e.attrs.tight ? "true" : null,
|
||
},
|
||
0,
|
||
],
|
||
},
|
||
bullet_list: {
|
||
content: "list_item+",
|
||
group: "block",
|
||
attrs: { tight: { default: !1 } },
|
||
parseDOM: [
|
||
{
|
||
tag: "ul",
|
||
getAttrs: (e) => ({ tight: e.hasAttribute("data-tight") }),
|
||
},
|
||
],
|
||
toDOM: (e) => [
|
||
"ul",
|
||
{ "data-tight": e.attrs.tight ? "true" : null },
|
||
0,
|
||
],
|
||
},
|
||
list_item: {
|
||
content: "block+",
|
||
defining: !0,
|
||
parseDOM: [{ tag: "li" }],
|
||
toDOM: () => ["li", 0],
|
||
},
|
||
text: { group: "inline" },
|
||
image: {
|
||
inline: !0,
|
||
attrs: { src: {}, alt: { default: null }, title: { default: null } },
|
||
group: "inline",
|
||
draggable: !0,
|
||
parseDOM: [
|
||
{
|
||
tag: "img[src]",
|
||
getAttrs: (e) => ({
|
||
src: e.getAttribute("src"),
|
||
title: e.getAttribute("title"),
|
||
alt: e.getAttribute("alt"),
|
||
}),
|
||
},
|
||
],
|
||
toDOM: (e) => ["img", e.attrs],
|
||
},
|
||
hard_break: {
|
||
inline: !0,
|
||
group: "inline",
|
||
selectable: !1,
|
||
parseDOM: [{ tag: "br" }],
|
||
toDOM: () => ["br"],
|
||
},
|
||
},
|
||
marks: {
|
||
em: {
|
||
parseDOM: [
|
||
{ tag: "i" },
|
||
{ tag: "em" },
|
||
{ style: "font-style=italic" },
|
||
{
|
||
style: "font-style=normal",
|
||
clearMark: (e) => "em" == e.type.name,
|
||
},
|
||
],
|
||
toDOM: () => ["em"],
|
||
},
|
||
strong: {
|
||
parseDOM: [
|
||
{ tag: "strong" },
|
||
{
|
||
tag: "b",
|
||
getAttrs: (e) => "normal" != e.style.fontWeight && null,
|
||
},
|
||
{
|
||
style: "font-weight=400",
|
||
clearMark: (e) => "strong" == e.type.name,
|
||
},
|
||
{
|
||
style: "font-weight",
|
||
getAttrs: (e) => /^(bold(er)?|[5-9]\d{2,})$/.test(e) && null,
|
||
},
|
||
],
|
||
toDOM: () => ["strong"],
|
||
},
|
||
link: {
|
||
attrs: { href: {}, title: { default: null } },
|
||
inclusive: !1,
|
||
parseDOM: [
|
||
{
|
||
tag: "a[href]",
|
||
getAttrs: (e) => ({
|
||
href: e.getAttribute("href"),
|
||
title: e.getAttribute("title"),
|
||
}),
|
||
},
|
||
],
|
||
toDOM: (e) => ["a", e.attrs],
|
||
},
|
||
code: { code: !0, parseDOM: [{ tag: "code" }], toDOM: () => ["code"] },
|
||
},
|
||
});
|
||
class na {
|
||
constructor(e, t) {
|
||
(this.schema = e),
|
||
(this.tokenHandlers = t),
|
||
(this.stack = [
|
||
{
|
||
type: e.topNodeType,
|
||
attrs: null,
|
||
content: [],
|
||
marks: K.Mark.none,
|
||
},
|
||
]);
|
||
}
|
||
top() {
|
||
return this.stack[this.stack.length - 1];
|
||
}
|
||
push(e) {
|
||
this.stack.length && this.top().content.push(e);
|
||
}
|
||
addText(e) {
|
||
if (!e) return;
|
||
let t = this.top(),
|
||
n = t.content,
|
||
i = n[n.length - 1],
|
||
r = this.schema.text(e, t.marks),
|
||
a;
|
||
i &&
|
||
(a = (function (e, t) {
|
||
if (e.isText && t.isText && K.Mark.sameSet(e.marks, t.marks))
|
||
return e.withText(e.text + t.text);
|
||
})(i, r))
|
||
? (n[n.length - 1] = a)
|
||
: n.push(r);
|
||
}
|
||
openMark(e) {
|
||
let t = this.top();
|
||
t.marks = e.addToSet(t.marks);
|
||
}
|
||
closeMark(e) {
|
||
let t = this.top();
|
||
t.marks = e.removeFromSet(t.marks);
|
||
}
|
||
parseTokens(e) {
|
||
for (let t = 0; t < e.length; t++) {
|
||
let n = e[t],
|
||
i = this.tokenHandlers[n.type];
|
||
if (!i)
|
||
throw Error(
|
||
"Token type `" + n.type + "` not supported by Markdown parser",
|
||
);
|
||
i(this, n, e, t);
|
||
}
|
||
}
|
||
addNode(e, t, n) {
|
||
let i = this.top(),
|
||
r = e.createAndFill(t, n, i ? i.marks : []);
|
||
return r ? (this.push(r), r) : null;
|
||
}
|
||
openNode(e, t) {
|
||
this.stack.push({ type: e, attrs: t, content: [], marks: K.Mark.none });
|
||
}
|
||
closeNode() {
|
||
let e = this.stack.pop();
|
||
return this.addNode(e.type, e.attrs, e.content);
|
||
}
|
||
}
|
||
function no(e, t, n, i) {
|
||
return e.getAttrs
|
||
? e.getAttrs(t, n, i)
|
||
: e.attrs instanceof Function
|
||
? e.attrs(t)
|
||
: e.attrs;
|
||
}
|
||
function ns(e, t) {
|
||
return (
|
||
e.noCloseToken ||
|
||
"code_inline" == t ||
|
||
"code_block" == t ||
|
||
"fence" == t
|
||
);
|
||
}
|
||
function nc(e) {
|
||
return "\n" == e[e.length - 1] ? e.slice(0, e.length - 1) : e;
|
||
}
|
||
function nl() {}
|
||
function nu(e, t) {
|
||
for (; ++t < e.length; )
|
||
if ("list_item_open" != e[t].type) return e[t].hidden;
|
||
return !1;
|
||
}
|
||
new (class {
|
||
constructor(e, t, n) {
|
||
(this.schema = e),
|
||
(this.tokenizer = t),
|
||
(this.tokens = n),
|
||
(this.tokenHandlers = (function (e, t) {
|
||
let n = Object.create(null);
|
||
for (let i in t) {
|
||
let r = t[i];
|
||
if (r.block) {
|
||
let t = e.nodeType(r.block);
|
||
ns(r, i)
|
||
? (n[i] = (e, n, i, a) => {
|
||
e.openNode(t, no(r, n, i, a)),
|
||
e.addText(nc(n.content)),
|
||
e.closeNode();
|
||
})
|
||
: ((n[i + "_open"] = (e, n, i, a) =>
|
||
e.openNode(t, no(r, n, i, a))),
|
||
(n[i + "_close"] = (e) => e.closeNode()));
|
||
} else if (r.node) {
|
||
let t = e.nodeType(r.node);
|
||
n[i] = (e, n, i, a) => e.addNode(t, no(r, n, i, a));
|
||
} else if (r.mark) {
|
||
let t = e.marks[r.mark];
|
||
ns(r, i)
|
||
? (n[i] = (e, n, i, a) => {
|
||
e.openMark(t.create(no(r, n, i, a))),
|
||
e.addText(nc(n.content)),
|
||
e.closeMark(t);
|
||
})
|
||
: ((n[i + "_open"] = (e, n, i, a) =>
|
||
e.openMark(t.create(no(r, n, i, a)))),
|
||
(n[i + "_close"] = (e) => e.closeMark(t)));
|
||
} else if (r.ignore)
|
||
ns(r, i)
|
||
? (n[i] = nl)
|
||
: ((n[i + "_open"] = nl), (n[i + "_close"] = nl));
|
||
else
|
||
throw RangeError(
|
||
"Unrecognized parsing spec " + JSON.stringify(r),
|
||
);
|
||
}
|
||
return (
|
||
(n.text = (e, t) => e.addText(t.content)),
|
||
(n.inline = (e, t) => e.parseTokens(t.children)),
|
||
(n.softbreak = n.softbreak || ((e) => e.addText(" "))),
|
||
n
|
||
);
|
||
})(e, n));
|
||
}
|
||
parse(e, t = {}) {
|
||
let n = new na(this.schema, this.tokenHandlers),
|
||
i;
|
||
n.parseTokens(this.tokenizer.parse(e, t));
|
||
do i = n.closeNode();
|
||
while (n.stack.length);
|
||
return i || this.schema.topNodeType.createAndFill();
|
||
}
|
||
})(nr, ni("commonmark", { html: !1 }), {
|
||
blockquote: { block: "blockquote" },
|
||
paragraph: { block: "paragraph" },
|
||
list_item: { block: "list_item" },
|
||
bullet_list: {
|
||
block: "bullet_list",
|
||
getAttrs: (e, t, n) => ({ tight: nu(t, n) }),
|
||
},
|
||
ordered_list: {
|
||
block: "ordered_list",
|
||
getAttrs: (e, t, n) => ({
|
||
order: +e.attrGet("start") || 1,
|
||
tight: nu(t, n),
|
||
}),
|
||
},
|
||
heading: {
|
||
block: "heading",
|
||
getAttrs: (e) => ({ level: +e.tag.slice(1) }),
|
||
},
|
||
code_block: { block: "code_block", noCloseToken: !0 },
|
||
fence: {
|
||
block: "code_block",
|
||
getAttrs: (e) => ({ params: e.info || "" }),
|
||
noCloseToken: !0,
|
||
},
|
||
hr: { node: "horizontal_rule" },
|
||
image: {
|
||
node: "image",
|
||
getAttrs: (e) => ({
|
||
src: e.attrGet("src"),
|
||
title: e.attrGet("title") || null,
|
||
alt: (e.children[0] && e.children[0].content) || null,
|
||
}),
|
||
},
|
||
hardbreak: { node: "hard_break" },
|
||
em: { mark: "em" },
|
||
strong: { mark: "strong" },
|
||
link: {
|
||
mark: "link",
|
||
getAttrs: (e) => ({
|
||
href: e.attrGet("href"),
|
||
title: e.attrGet("title") || null,
|
||
}),
|
||
},
|
||
code_inline: { mark: "code", noCloseToken: !0 },
|
||
});
|
||
let nh = { open: "", close: "", mixable: !0 },
|
||
nf = new (class {
|
||
constructor(e, t, n = {}) {
|
||
(this.nodes = e), (this.marks = t), (this.options = n);
|
||
}
|
||
serialize(e, t = {}) {
|
||
t = Object.assign({}, this.options, t);
|
||
let n = new np(this.nodes, this.marks, t);
|
||
return n.renderContent(e), n.out;
|
||
}
|
||
})(
|
||
{
|
||
blockquote(e, t) {
|
||
e.wrapBlock("> ", null, t, () => e.renderContent(t));
|
||
},
|
||
code_block(e, t) {
|
||
let n = t.textContent.match(/`{3,}/gm),
|
||
i = n ? n.sort().slice(-1)[0] + "`" : "```";
|
||
e.write(i + (t.attrs.params || "") + "\n"),
|
||
e.text(t.textContent, !1),
|
||
e.write("\n"),
|
||
e.write(i),
|
||
e.closeBlock(t);
|
||
},
|
||
heading(e, t) {
|
||
e.write(e.repeat("#", t.attrs.level) + " "),
|
||
e.renderInline(t, !1),
|
||
e.closeBlock(t);
|
||
},
|
||
horizontal_rule(e, t) {
|
||
e.write(t.attrs.markup || "---"), e.closeBlock(t);
|
||
},
|
||
bullet_list(e, t) {
|
||
e.renderList(t, " ", () => (t.attrs.bullet || "*") + " ");
|
||
},
|
||
ordered_list(e, t) {
|
||
let n = t.attrs.order || 1,
|
||
i = String(n + t.childCount - 1).length,
|
||
r = e.repeat(" ", i + 2);
|
||
e.renderList(t, r, (t) => {
|
||
let r = String(n + t);
|
||
return e.repeat(" ", i - r.length) + r + ". ";
|
||
});
|
||
},
|
||
list_item(e, t) {
|
||
e.renderContent(t);
|
||
},
|
||
paragraph(e, t) {
|
||
e.renderInline(t), e.closeBlock(t);
|
||
},
|
||
image(e, t) {
|
||
e.write(
|
||
"]/g, "\\$&") +
|
||
(t.attrs.title
|
||
? ' "' + t.attrs.title.replace(/"/g, '\\"') + '"'
|
||
: "") +
|
||
")",
|
||
);
|
||
},
|
||
hard_break(e, t, n, i) {
|
||
for (let r = i + 1; r < n.childCount; r++)
|
||
if (n.child(r).type != t.type) return void e.write("\\\n");
|
||
},
|
||
text(e, t) {
|
||
e.text(t.text, !e.inAutolink);
|
||
},
|
||
},
|
||
{
|
||
em: {
|
||
open: "*",
|
||
close: "*",
|
||
mixable: !0,
|
||
expelEnclosingWhitespace: !0,
|
||
},
|
||
strong: {
|
||
open: "**",
|
||
close: "**",
|
||
mixable: !0,
|
||
expelEnclosingWhitespace: !0,
|
||
},
|
||
link: {
|
||
open: (e, t, n, i) => (
|
||
(e.inAutolink = (function (e, t, n) {
|
||
if (e.attrs.title || !/^\w+:/.test(e.attrs.href)) return !1;
|
||
let i = t.child(n);
|
||
return (
|
||
!!i.isText &&
|
||
i.text == e.attrs.href &&
|
||
i.marks[i.marks.length - 1] == e &&
|
||
(n == t.childCount - 1 || !e.isInSet(t.child(n + 1).marks))
|
||
);
|
||
})(t, n, i)),
|
||
e.inAutolink ? "<" : "["
|
||
),
|
||
close(e, t, n, i) {
|
||
let { inAutolink: r } = e;
|
||
return (
|
||
(e.inAutolink = void 0),
|
||
r
|
||
? ">"
|
||
: "](" +
|
||
t.attrs.href.replace(/[\(\)"]/g, "\\$&") +
|
||
(t.attrs.title
|
||
? ` "${t.attrs.title.replace(/"/g, '\\"')}"`
|
||
: "") +
|
||
")"
|
||
);
|
||
},
|
||
mixable: !0,
|
||
},
|
||
code: {
|
||
open: (e, t, n, i) => nd(n.child(i), -1),
|
||
close: (e, t, n, i) => nd(n.child(i - 1), 1),
|
||
escape: !1,
|
||
},
|
||
},
|
||
);
|
||
function nd(e, t) {
|
||
let n = /`+/g,
|
||
i,
|
||
r = 0;
|
||
if (e.isText) for (; (i = n.exec(e.text)); ) r = Math.max(r, i[0].length);
|
||
let a = r > 0 && t > 0 ? " `" : "`";
|
||
for (let e = 0; e < r; e++) a += "`";
|
||
return r > 0 && t < 0 && (a += " "), a;
|
||
}
|
||
class np {
|
||
constructor(e, t, n) {
|
||
(this.nodes = e),
|
||
(this.marks = t),
|
||
(this.options = n),
|
||
(this.delim = ""),
|
||
(this.out = ""),
|
||
(this.closed = null),
|
||
(this.inAutolink = void 0),
|
||
(this.atBlockStart = !1),
|
||
(this.inTightList = !1),
|
||
void 0 === this.options.tightLists && (this.options.tightLists = !1),
|
||
void 0 === this.options.hardBreakNodeName &&
|
||
(this.options.hardBreakNodeName = "hard_break");
|
||
}
|
||
flushClose(e = 2) {
|
||
if (this.closed) {
|
||
if ((this.atBlank() || (this.out += "\n"), e > 1)) {
|
||
let t = this.delim,
|
||
n = /\s+$/.exec(t);
|
||
n && (t = t.slice(0, t.length - n[0].length));
|
||
for (let n = 1; n < e; n++) this.out += t + "\n";
|
||
}
|
||
this.closed = null;
|
||
}
|
||
}
|
||
getMark(e) {
|
||
let t = this.marks[e];
|
||
if (!t) {
|
||
if (!1 !== this.options.strict)
|
||
throw Error(
|
||
`Mark type \`${e}\` not supported by Markdown renderer`,
|
||
);
|
||
t = nh;
|
||
}
|
||
return t;
|
||
}
|
||
wrapBlock(e, t, n, i) {
|
||
let r = this.delim;
|
||
this.write(null != t ? t : e),
|
||
(this.delim += e),
|
||
i(),
|
||
(this.delim = r),
|
||
this.closeBlock(n);
|
||
}
|
||
atBlank() {
|
||
return /(^|\n)$/.test(this.out);
|
||
}
|
||
ensureNewLine() {
|
||
this.atBlank() || (this.out += "\n");
|
||
}
|
||
write(e) {
|
||
this.flushClose(),
|
||
this.delim && this.atBlank() && (this.out += this.delim),
|
||
e && (this.out += e);
|
||
}
|
||
closeBlock(e) {
|
||
this.closed = e;
|
||
}
|
||
text(e, t = !0) {
|
||
let n = e.split("\n");
|
||
for (let e = 0; e < n.length; e++)
|
||
this.write(),
|
||
!t &&
|
||
"[" == n[e][0] &&
|
||
/(^|[^\\])\!$/.test(this.out) &&
|
||
(this.out = this.out.slice(0, this.out.length - 1) + "\\!"),
|
||
(this.out += t ? this.esc(n[e], this.atBlockStart) : n[e]),
|
||
e != n.length - 1 && (this.out += "\n");
|
||
}
|
||
render(e, t, n) {
|
||
if (this.nodes[e.type.name]) this.nodes[e.type.name](this, e, t, n);
|
||
else if (!1 !== this.options.strict)
|
||
throw Error(
|
||
"Token type `" +
|
||
e.type.name +
|
||
"` not supported by Markdown renderer",
|
||
);
|
||
else
|
||
!e.type.isLeaf &&
|
||
(e.type.inlineContent
|
||
? this.renderInline(e)
|
||
: this.renderContent(e),
|
||
e.isBlock && this.closeBlock(e));
|
||
}
|
||
renderContent(e) {
|
||
e.forEach((t, n, i) => this.render(t, e, i));
|
||
}
|
||
renderInline(e, t = !0) {
|
||
this.atBlockStart = t;
|
||
let n = [],
|
||
i = "",
|
||
r = (t, r, a) => {
|
||
let o = t ? t.marks : [];
|
||
t &&
|
||
t.type.name === this.options.hardBreakNodeName &&
|
||
(o = o.filter((t) => {
|
||
if (a + 1 == e.childCount) return !1;
|
||
let n = e.child(a + 1);
|
||
return t.isInSet(n.marks) && (!n.isText || /\S/.test(n.text));
|
||
}));
|
||
let s = i;
|
||
if (
|
||
((i = ""),
|
||
t &&
|
||
t.isText &&
|
||
o.some((e) => {
|
||
let t = this.getMark(e.type.name);
|
||
return t && t.expelEnclosingWhitespace && !e.isInSet(n);
|
||
}))
|
||
) {
|
||
let [e, i, r] = /^(\s*)(.*)$/m.exec(t.text);
|
||
i && ((s += i), (t = r ? t.withText(r) : null) || (o = n));
|
||
}
|
||
if (
|
||
t &&
|
||
t.isText &&
|
||
o.some((t) => {
|
||
let n = this.getMark(t.type.name);
|
||
return (
|
||
n &&
|
||
n.expelEnclosingWhitespace &&
|
||
!this.isMarkAhead(e, a + 1, t)
|
||
);
|
||
})
|
||
) {
|
||
let [e, r, a] = /^(.*?)(\s*)$/m.exec(t.text);
|
||
a && ((i = a), (t = r ? t.withText(r) : null) || (o = n));
|
||
}
|
||
let c = o.length ? o[o.length - 1] : null,
|
||
l = c && !1 === this.getMark(c.type.name).escape,
|
||
u = o.length - !!l;
|
||
a: for (let e = 0; e < u; e++) {
|
||
let t = o[e];
|
||
if (!this.getMark(t.type.name).mixable) break;
|
||
for (let i = 0; i < n.length; i++) {
|
||
let r = n[i];
|
||
if (!this.getMark(r.type.name).mixable) break;
|
||
if (t.eq(r)) {
|
||
e > i
|
||
? (o = o
|
||
.slice(0, i)
|
||
.concat(t)
|
||
.concat(o.slice(i, e))
|
||
.concat(o.slice(e + 1, u)))
|
||
: i > e &&
|
||
(o = o
|
||
.slice(0, e)
|
||
.concat(o.slice(e + 1, i))
|
||
.concat(t)
|
||
.concat(o.slice(i, u)));
|
||
continue a;
|
||
}
|
||
}
|
||
}
|
||
let h = 0;
|
||
for (; h < Math.min(n.length, u) && o[h].eq(n[h]); ) ++h;
|
||
for (; h < n.length; )
|
||
this.text(this.markString(n.pop(), !1, e, a), !1);
|
||
if ((s && this.text(s), t)) {
|
||
for (; n.length < u; ) {
|
||
let t = o[n.length];
|
||
n.push(t),
|
||
this.text(this.markString(t, !0, e, a), !1),
|
||
(this.atBlockStart = !1);
|
||
}
|
||
l && t.isText
|
||
? this.text(
|
||
this.markString(c, !0, e, a) +
|
||
t.text +
|
||
this.markString(c, !1, e, a + 1),
|
||
!1,
|
||
)
|
||
: this.render(t, e, a),
|
||
(this.atBlockStart = !1);
|
||
}
|
||
(null == t ? void 0 : t.isText) &&
|
||
t.nodeSize > 0 &&
|
||
(this.atBlockStart = !1);
|
||
};
|
||
e.forEach(r), r(null, 0, e.childCount), (this.atBlockStart = !1);
|
||
}
|
||
renderList(e, t, n) {
|
||
this.closed && this.closed.type == e.type
|
||
? this.flushClose(3)
|
||
: this.inTightList && this.flushClose(1);
|
||
let i =
|
||
void 0 !== e.attrs.tight ? e.attrs.tight : this.options.tightLists,
|
||
r = this.inTightList;
|
||
(this.inTightList = i),
|
||
e.forEach((r, a, o) => {
|
||
o && i && this.flushClose(1),
|
||
this.wrapBlock(t, n(o), e, () => this.render(r, e, o));
|
||
}),
|
||
(this.inTightList = r);
|
||
}
|
||
esc(e, t = !1) {
|
||
return (
|
||
(e = e.replace(/[`*\\~\[\]_]/g, (t, n) =>
|
||
"_" == t &&
|
||
n > 0 &&
|
||
n + 1 < e.length &&
|
||
e[n - 1].match(/\w/) &&
|
||
e[n + 1].match(/\w/)
|
||
? t
|
||
: "\\" + t,
|
||
)),
|
||
t &&
|
||
(e = e
|
||
.replace(/^(\+[ ]|[\-*>])/, "\\$&")
|
||
.replace(/^(\s*)(#{1,6})(\s|$)/, "$1\\$2$3")
|
||
.replace(/^(\s*\d+)\.\s/, "$1\\. ")),
|
||
this.options.escapeExtraCharacters &&
|
||
(e = e.replace(this.options.escapeExtraCharacters, "\\$&")),
|
||
e
|
||
);
|
||
}
|
||
quote(e) {
|
||
let t =
|
||
-1 == e.indexOf('"') ? '""' : -1 == e.indexOf("'") ? "''" : "()";
|
||
return t[0] + e + t[1];
|
||
}
|
||
repeat(e, t) {
|
||
let n = "";
|
||
for (let i = 0; i < t; i++) n += e;
|
||
return n;
|
||
}
|
||
markString(e, t, n, i) {
|
||
let r = this.getMark(e.type.name),
|
||
a = t ? r.open : r.close;
|
||
return "string" == typeof a ? a : a(this, e, n, i);
|
||
}
|
||
getEnclosingWhitespace(e) {
|
||
return {
|
||
leading: (e.match(/^(\s+)/) || [void 0])[0],
|
||
trailing: (e.match(/(\s+)$/) || [void 0])[0],
|
||
};
|
||
}
|
||
isMarkAhead(e, t, n) {
|
||
for (; ; t++) {
|
||
if (t == e.childCount) return !1;
|
||
let i = e.child(t);
|
||
if (i.type.name != this.options.hardBreakNodeName)
|
||
return n.isInSet(i.marks);
|
||
t++;
|
||
}
|
||
}
|
||
}
|
||
e.i(49174);
|
||
var ng = e.i(603932);
|
||
e.i(418874);
|
||
var nb = e.i(111092),
|
||
nm = Object.defineProperty,
|
||
nw = (e, t, n) => {
|
||
let i;
|
||
return (
|
||
(i = "symbol" != typeof t ? t + "" : t) in e
|
||
? nm(e, i, {
|
||
enumerable: !0,
|
||
configurable: !0,
|
||
writable: !0,
|
||
value: n,
|
||
})
|
||
: (e[i] = n),
|
||
n
|
||
);
|
||
};
|
||
let nv = W.Extension.create({
|
||
name: "markdownTightLists",
|
||
addOptions: () => ({
|
||
tight: !0,
|
||
tightClass: "tight",
|
||
listTypes: ["bulletList", "orderedList"],
|
||
}),
|
||
addGlobalAttributes() {
|
||
return [
|
||
{
|
||
types: this.options.listTypes,
|
||
attributes: {
|
||
tight: {
|
||
default: this.options.tight,
|
||
parseHTML: (e) =>
|
||
"true" === e.getAttribute("data-tight") ||
|
||
!e.querySelector("p"),
|
||
renderHTML: (e) => ({
|
||
class: e.tight ? this.options.tightClass : null,
|
||
"data-tight": e.tight ? "true" : null,
|
||
}),
|
||
},
|
||
},
|
||
},
|
||
];
|
||
},
|
||
addCommands() {
|
||
var e = this;
|
||
return {
|
||
toggleTight: function () {
|
||
let t =
|
||
arguments.length > 0 && void 0 !== arguments[0]
|
||
? arguments[0]
|
||
: null;
|
||
return (n) => {
|
||
let { editor: i, commands: r } = n;
|
||
return e.options.listTypes.some((e) =>
|
||
(function (e) {
|
||
if (!i.isActive(e)) return !1;
|
||
let n = i.getAttributes(e);
|
||
return r.updateAttributes(e, {
|
||
tight: null != t ? t : !(null != n && n.tight),
|
||
});
|
||
})(e),
|
||
);
|
||
};
|
||
},
|
||
};
|
||
},
|
||
}),
|
||
nx = ni();
|
||
function ny(e, t) {
|
||
return (
|
||
nx.inline.State.prototype.scanDelims.call({ src: e, posMax: e.length }),
|
||
new nx.inline.State(e, null, null, []).scanDelims(t, !0)
|
||
);
|
||
}
|
||
function n_(e, t, n, i) {
|
||
let r = e.substring(0, n) + e.substring(n + t.length);
|
||
return r.substring(0, n + i) + t + r.substring(n + i);
|
||
}
|
||
class nS extends np {
|
||
constructor(e, t, n) {
|
||
super(e, t, null != n ? n : {}),
|
||
nw(this, "inTable", !1),
|
||
(this.inlines = []);
|
||
}
|
||
render(e, t, n) {
|
||
super.render(e, t, n);
|
||
let i = this.inlines[this.inlines.length - 1];
|
||
if (null != i && i.start && null != i && i.end) {
|
||
var r;
|
||
let e,
|
||
{ delimiter: t, start: n, end: a } = this.normalizeInline(i);
|
||
(this.out =
|
||
((r = this.out),
|
||
(e = (function (e, t, n, i) {
|
||
let r = i,
|
||
a = e;
|
||
for (; r > n && !ny(a, r).can_close; ) (a = n_(a, t, r, -1)), r--;
|
||
return { text: a, from: n, to: r };
|
||
})(
|
||
(e = (function (e, t, n, i) {
|
||
let r = n,
|
||
a = e;
|
||
for (; r < i && !ny(a, r).can_open; ) (a = n_(a, t, r, 1)), r++;
|
||
return { text: a, from: r, to: i };
|
||
})((e = { text: r, from: n, to: a }).text, t, e.from, e.to)).text,
|
||
t,
|
||
e.from,
|
||
e.to,
|
||
)).to -
|
||
e.from <
|
||
t.length + 1 &&
|
||
(e.text =
|
||
e.text.substring(0, e.from) +
|
||
e.text.substring(e.to + t.length)),
|
||
e.text)),
|
||
this.inlines.pop();
|
||
}
|
||
}
|
||
markString(e, t, n, i) {
|
||
let r = this.marks[e.type.name];
|
||
if (r.expelEnclosingWhitespace)
|
||
if (t)
|
||
this.inlines.push({ start: this.out.length, delimiter: r.open });
|
||
else {
|
||
let e = this.inlines.pop();
|
||
this.inlines.push({ ...e, end: this.out.length });
|
||
}
|
||
return super.markString(e, t, n, i);
|
||
}
|
||
normalizeInline(e) {
|
||
let { start: t, end: n } = e;
|
||
for (; this.out.charAt(t).match(/\s/); ) t++;
|
||
return { ...e, start: t };
|
||
}
|
||
}
|
||
let nE = W.Mark.create({
|
||
name: "markdownHTMLMark",
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize: {
|
||
open(e, t) {
|
||
var n, i;
|
||
return this.editor.storage.markdown.options.html
|
||
? null != (n = null == (i = nM(t)) ? void 0 : i[0])
|
||
? n
|
||
: ""
|
||
: (console.warn(
|
||
`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`,
|
||
),
|
||
"");
|
||
},
|
||
close(e, t) {
|
||
var n, i;
|
||
return this.editor.storage.markdown.options.html &&
|
||
null != (n = null == (i = nM(t)) ? void 0 : i[1])
|
||
? n
|
||
: "";
|
||
},
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
});
|
||
function nM(e) {
|
||
let t = e.type.schema,
|
||
n = t.text(" ", [e]),
|
||
i = (0, W.getHTMLFromFragment)(K.Fragment.from(n), t).match(
|
||
/^(<.*?>) (<\/.*?>)$/,
|
||
);
|
||
return i ? [i[1], i[2]] : null;
|
||
}
|
||
function nT(e) {
|
||
let t = `<body>${e}</body>`;
|
||
return new window.DOMParser().parseFromString(t, "text/html").body;
|
||
}
|
||
let nk = W.Node.create({
|
||
name: "markdownHTMLNode",
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t, n) {
|
||
var i, r;
|
||
let a, o, s;
|
||
this.editor.storage.markdown.options.html
|
||
? e.write(
|
||
((i = t),
|
||
(r = n),
|
||
(a = i.type.schema),
|
||
(o = (0, W.getHTMLFromFragment)(K.Fragment.from(i), a)),
|
||
i.isBlock &&
|
||
(r instanceof K.Fragment ||
|
||
r.type.name === a.topNodeType.name)
|
||
? (((s = nT(o).firstElementChild).innerHTML =
|
||
s.innerHTML.trim()
|
||
? `
|
||
${s.innerHTML}
|
||
`
|
||
: `
|
||
`),
|
||
s.outerHTML)
|
||
: o),
|
||
)
|
||
: (console.warn(
|
||
`Tiptap Markdown: "${t.type.name}" node is only available in html mode`,
|
||
),
|
||
e.write(`[${t.type.name}]`)),
|
||
t.isBlock && e.closeBlock(t);
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
}),
|
||
nC = W.Node.create({ name: "blockquote" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.nodes.blockquote, parse: {} },
|
||
}),
|
||
}),
|
||
nA = W.Node.create({ name: "bulletList" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t) {
|
||
return e.renderList(
|
||
t,
|
||
" ",
|
||
() =>
|
||
(this.editor.storage.markdown.options.bulletListMarker ||
|
||
"-") + " ",
|
||
);
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
}),
|
||
nN = W.Node.create({ name: "codeBlock" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t) {
|
||
e.write("```" + (t.attrs.language || "") + "\n"),
|
||
e.text(t.textContent, !1),
|
||
e.ensureNewLine(),
|
||
e.write("```"),
|
||
e.closeBlock(t);
|
||
},
|
||
parse: {
|
||
setup(e) {
|
||
var t;
|
||
e.set({
|
||
langPrefix:
|
||
null != (t = this.options.languageClassPrefix)
|
||
? t
|
||
: "language-",
|
||
});
|
||
},
|
||
updateDOM(e) {
|
||
e.innerHTML = e.innerHTML.replace(
|
||
/\n<\/code><\/pre>/g,
|
||
"</code></pre>",
|
||
);
|
||
},
|
||
},
|
||
},
|
||
}),
|
||
}),
|
||
nI = W.Node.create({ name: "hardBreak" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t, n, i) {
|
||
for (let r = i + 1; r < n.childCount; r++)
|
||
if (n.child(r).type != t.type)
|
||
return void e.write(
|
||
e.inTable
|
||
? nk.storage.markdown.serialize.call(this, e, t, n)
|
||
: "\\\n",
|
||
);
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
}),
|
||
nP = W.Node.create({ name: "heading" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.nodes.heading, parse: {} },
|
||
}),
|
||
}),
|
||
nR = W.Node.create({ name: "horizontalRule" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.nodes.horizontal_rule, parse: {} },
|
||
}),
|
||
}),
|
||
nL = W.Node.create({ name: "image" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.nodes.image, parse: {} },
|
||
}),
|
||
}),
|
||
nD = W.Node.create({ name: "listItem" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.nodes.list_item, parse: {} },
|
||
}),
|
||
}),
|
||
nj = W.Node.create({ name: "orderedList" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t, n, i) {
|
||
let r = t.attrs.start || 1,
|
||
a = String(r + t.childCount - 1).length,
|
||
o = e.repeat(" ", a + 2),
|
||
s =
|
||
(function (e, t, n) {
|
||
let i = 0;
|
||
for (
|
||
;
|
||
n - i > 0 && t.child(n - i - 1).type.name === e.type.name;
|
||
i++
|
||
);
|
||
return i;
|
||
})(t, n, i) % 2
|
||
? ") "
|
||
: ". ";
|
||
e.renderList(t, o, (t) => {
|
||
let n = String(r + t);
|
||
return e.repeat(" ", a - n.length) + n + s;
|
||
});
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
}),
|
||
nO = W.Node.create({ name: "paragraph" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.nodes.paragraph, parse: {} },
|
||
}),
|
||
});
|
||
function nF(e) {
|
||
var t, n;
|
||
return null !=
|
||
(t = null == e || null == (n = e.content) ? void 0 : n.content)
|
||
? t
|
||
: [];
|
||
}
|
||
let nU = W.Node.create({ name: "table" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t, n) {
|
||
let i, r, a;
|
||
((r = (i = nF(t))[0]),
|
||
(a = i.slice(1)),
|
||
nF(r).some(
|
||
(e) => "tableHeader" !== e.type.name || nB(e) || e.childCount > 1,
|
||
) ||
|
||
a.some((e) =>
|
||
nF(e).some(
|
||
(e) =>
|
||
"tableHeader" === e.type.name || nB(e) || e.childCount > 1,
|
||
),
|
||
))
|
||
? nk.storage.markdown.serialize.call(this, e, t, n)
|
||
: ((e.inTable = !0),
|
||
t.forEach((t, n, i) => {
|
||
if (
|
||
(e.write("| "),
|
||
t.forEach((t, n, i) => {
|
||
i && e.write(" | ");
|
||
let r = t.firstChild;
|
||
r.textContent.trim() && e.renderInline(r);
|
||
}),
|
||
e.write(" |"),
|
||
e.ensureNewLine(),
|
||
!i)
|
||
) {
|
||
let n = Array.from({ length: t.childCount })
|
||
.map(() => "---")
|
||
.join(" | ");
|
||
e.write(`| ${n} |`), e.ensureNewLine();
|
||
}
|
||
}),
|
||
e.closeBlock(t),
|
||
(e.inTable = !1));
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
});
|
||
function nB(e) {
|
||
return e.attrs.colspan > 1 || e.attrs.rowspan > 1;
|
||
}
|
||
let nH = W.Node.create({ name: "taskItem" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t) {
|
||
let n = t.attrs.checked ? "[x]" : "[ ]";
|
||
e.write(`${n} `), e.renderContent(t);
|
||
},
|
||
parse: {
|
||
updateDOM(e) {
|
||
[...e.querySelectorAll(".task-list-item")].forEach((e) => {
|
||
let t = e.querySelector("input");
|
||
e.setAttribute("data-type", "taskItem"),
|
||
t &&
|
||
(e.setAttribute("data-checked", t.checked), t.remove());
|
||
});
|
||
},
|
||
},
|
||
},
|
||
}),
|
||
}),
|
||
nz = W.Node.create({ name: "taskList" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize: nA.storage.markdown.serialize,
|
||
parse: {
|
||
setup(e) {
|
||
e.use(ng.default);
|
||
},
|
||
updateDOM(e) {
|
||
[...e.querySelectorAll(".contains-task-list")].forEach((e) => {
|
||
e.setAttribute("data-type", "taskList");
|
||
});
|
||
},
|
||
},
|
||
},
|
||
}),
|
||
}),
|
||
nG = [
|
||
nC,
|
||
nA,
|
||
nN,
|
||
nI,
|
||
nP,
|
||
nR,
|
||
nk,
|
||
nL,
|
||
nD,
|
||
nj,
|
||
nO,
|
||
nU,
|
||
nH,
|
||
nz,
|
||
W.Node.create({ name: "text" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize(e, t) {
|
||
var n;
|
||
e.text(
|
||
null == (n = t.text)
|
||
? void 0
|
||
: n.replace(/</g, "<").replace(/>/g, ">"),
|
||
);
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
}),
|
||
W.Mark.create({ name: "bold" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.marks.strong, parse: {} },
|
||
}),
|
||
}),
|
||
W.Mark.create({ name: "code" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.marks.code, parse: {} },
|
||
}),
|
||
}),
|
||
nE,
|
||
W.Mark.create({ name: "italic" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.marks.em, parse: {} },
|
||
}),
|
||
}),
|
||
W.Mark.create({ name: "link" }).extend({
|
||
addStorage: () => ({
|
||
markdown: { serialize: nf.marks.link, parse: {} },
|
||
}),
|
||
}),
|
||
W.Mark.create({ name: "strike" }).extend({
|
||
addStorage: () => ({
|
||
markdown: {
|
||
serialize: {
|
||
open: "~~",
|
||
close: "~~",
|
||
expelEnclosingWhitespace: !0,
|
||
},
|
||
parse: {},
|
||
},
|
||
}),
|
||
}),
|
||
];
|
||
function n$(e) {
|
||
var t, n;
|
||
let i = null == (t = e.storage) ? void 0 : t.markdown,
|
||
r =
|
||
null == (n = nG.find((t) => t.name === e.name))
|
||
? void 0
|
||
: n.storage.markdown;
|
||
return i || r ? { ...r, ...i } : null;
|
||
}
|
||
class nV {
|
||
constructor(e) {
|
||
nw(this, "editor", null), (this.editor = e);
|
||
}
|
||
serialize(e) {
|
||
let t = new nS(this.nodes, this.marks, { hardBreakNodeName: nI.name });
|
||
return t.renderContent(e), t.out;
|
||
}
|
||
get nodes() {
|
||
var e;
|
||
return {
|
||
...Object.fromEntries(
|
||
Object.keys(this.editor.schema.nodes).map((e) => [
|
||
e,
|
||
this.serializeNode(nk),
|
||
]),
|
||
),
|
||
...Object.fromEntries(
|
||
null !=
|
||
(e = this.editor.extensionManager.extensions
|
||
.filter((e) => "node" === e.type && this.serializeNode(e))
|
||
.map((e) => [e.name, this.serializeNode(e)]))
|
||
? e
|
||
: [],
|
||
),
|
||
};
|
||
}
|
||
get marks() {
|
||
var e;
|
||
return {
|
||
...Object.fromEntries(
|
||
Object.keys(this.editor.schema.marks).map((e) => [
|
||
e,
|
||
this.serializeMark(nE),
|
||
]),
|
||
),
|
||
...Object.fromEntries(
|
||
null !=
|
||
(e = this.editor.extensionManager.extensions
|
||
.filter((e) => "mark" === e.type && this.serializeMark(e))
|
||
.map((e) => [e.name, this.serializeMark(e)]))
|
||
? e
|
||
: [],
|
||
),
|
||
};
|
||
}
|
||
serializeNode(e) {
|
||
var t;
|
||
return null == (t = n$(e)) || null == (t = t.serialize)
|
||
? void 0
|
||
: t.bind({ editor: this.editor, options: e.options });
|
||
}
|
||
serializeMark(e) {
|
||
var t;
|
||
let n = null == (t = n$(e)) ? void 0 : t.serialize;
|
||
return n
|
||
? {
|
||
...n,
|
||
open:
|
||
"function" == typeof n.open
|
||
? n.open.bind({ editor: this.editor, options: e.options })
|
||
: n.open,
|
||
close:
|
||
"function" == typeof n.close
|
||
? n.close.bind({ editor: this.editor, options: e.options })
|
||
: n.close,
|
||
}
|
||
: null;
|
||
}
|
||
}
|
||
class nW {
|
||
constructor(e, t) {
|
||
nw(this, "editor", null), nw(this, "md", null);
|
||
let { html: n, linkify: i, breaks: r } = t;
|
||
(this.editor = e),
|
||
(this.md = this.withPatchedRenderer(
|
||
ni({ html: n, linkify: i, breaks: r }),
|
||
));
|
||
}
|
||
parse(e) {
|
||
let { inline: t } =
|
||
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
||
if ("string" == typeof e) {
|
||
this.editor.extensionManager.extensions.forEach((e) => {
|
||
var t;
|
||
return null == (t = n$(e)) ||
|
||
null == (t = t.parse) ||
|
||
null == (t = t.setup)
|
||
? void 0
|
||
: t.call({ editor: this.editor, options: e.options }, this.md);
|
||
});
|
||
let n = nT(this.md.render(e));
|
||
return (
|
||
this.editor.extensionManager.extensions.forEach((e) => {
|
||
var t;
|
||
return null == (t = n$(e)) ||
|
||
null == (t = t.parse) ||
|
||
null == (t = t.updateDOM)
|
||
? void 0
|
||
: t.call({ editor: this.editor, options: e.options }, n);
|
||
}),
|
||
this.normalizeDOM(n, { inline: t, content: e }),
|
||
n.innerHTML
|
||
);
|
||
}
|
||
return e;
|
||
}
|
||
normalizeDOM(e, t) {
|
||
let { inline: n, content: i } = t;
|
||
return (
|
||
this.normalizeBlocks(e),
|
||
e.querySelectorAll("*").forEach((e) => {
|
||
var t;
|
||
(null == (t = e.nextSibling) ? void 0 : t.nodeType) !==
|
||
Node.TEXT_NODE ||
|
||
e.closest("pre") ||
|
||
(e.nextSibling.textContent = e.nextSibling.textContent.replace(
|
||
/^\n/,
|
||
"",
|
||
));
|
||
}),
|
||
n && this.normalizeInline(e, i),
|
||
e
|
||
);
|
||
}
|
||
normalizeBlocks(e) {
|
||
let t = Object.values(this.editor.schema.nodes)
|
||
.filter((e) => e.isBlock)
|
||
.map((e) => {
|
||
var t;
|
||
return null == (t = e.spec.parseDOM) ? void 0 : t.map((e) => e.tag);
|
||
})
|
||
.flat()
|
||
.filter(Boolean)
|
||
.join(",");
|
||
t &&
|
||
[...e.querySelectorAll(t)].forEach((e) => {
|
||
e.parentElement.matches("p") &&
|
||
(function (e) {
|
||
let t = e.parentElement,
|
||
n = t.cloneNode();
|
||
for (; t.firstChild && t.firstChild !== e; )
|
||
n.appendChild(t.firstChild);
|
||
n.childNodes.length > 0 && t.parentElement.insertBefore(n, t),
|
||
t.parentElement.insertBefore(e, t),
|
||
0 === t.childNodes.length && t.remove();
|
||
})(e);
|
||
});
|
||
}
|
||
normalizeInline(e, t) {
|
||
var n, i, r, a, o;
|
||
if (null != (n = e.firstElementChild) && n.matches("p")) {
|
||
let n = e.firstElementChild,
|
||
{ nextElementSibling: s } = n,
|
||
c =
|
||
null != (i = null == (r = t.match(/^\s+/)) ? void 0 : r[0])
|
||
? i
|
||
: "",
|
||
l = s
|
||
? ""
|
||
: null != (a = null == (o = t.match(/\s+$/)) ? void 0 : o[0])
|
||
? a
|
||
: "";
|
||
if (t.match(/^\n\n/)) {
|
||
n.innerHTML = `${n.innerHTML}${l}`;
|
||
return;
|
||
}
|
||
let u = n.parentNode;
|
||
for (; n.firstChild; ) u.insertBefore(n.firstChild, n);
|
||
u.removeChild(n), (e.innerHTML = `${c}${e.innerHTML}${l}`);
|
||
}
|
||
}
|
||
withPatchedRenderer(e) {
|
||
let t = (e) =>
|
||
function () {
|
||
let t = e(...arguments);
|
||
return "\n" === t
|
||
? t
|
||
: "\n" === t[t.length - 1]
|
||
? t.slice(0, -1)
|
||
: t;
|
||
};
|
||
return (
|
||
(e.renderer.rules.hardbreak = t(e.renderer.rules.hardbreak)),
|
||
(e.renderer.rules.softbreak = t(e.renderer.rules.softbreak)),
|
||
(e.renderer.rules.fence = t(e.renderer.rules.fence)),
|
||
(e.renderer.rules.code_block = t(e.renderer.rules.code_block)),
|
||
(e.renderer.renderToken = t(e.renderer.renderToken.bind(e.renderer))),
|
||
e
|
||
);
|
||
}
|
||
}
|
||
let nK = W.Extension.create({
|
||
name: "markdownClipboard",
|
||
addOptions: () => ({
|
||
transformPastedText: !1,
|
||
transformCopiedText: !1,
|
||
}),
|
||
addProseMirrorPlugins() {
|
||
return [
|
||
new nb.Plugin({
|
||
key: new nb.PluginKey("markdownClipboard"),
|
||
props: {
|
||
clipboardTextParser: (e, t, n) => {
|
||
if (n || !this.options.transformPastedText) return null;
|
||
let i = this.editor.storage.markdown.parser.parse(e, {
|
||
inline: !0,
|
||
});
|
||
return K.DOMParser.fromSchema(this.editor.schema).parseSlice(
|
||
nT(i),
|
||
{ preserveWhitespace: !0, context: t },
|
||
);
|
||
},
|
||
clipboardTextSerializer: (e) =>
|
||
this.options.transformCopiedText
|
||
? this.editor.storage.markdown.serializer.serialize(
|
||
e.content,
|
||
)
|
||
: null,
|
||
},
|
||
}),
|
||
];
|
||
},
|
||
}),
|
||
nq = W.Extension.create({
|
||
name: "markdown",
|
||
priority: 50,
|
||
addOptions: () => ({
|
||
html: !0,
|
||
tightLists: !0,
|
||
tightListClass: "tight",
|
||
bulletListMarker: "-",
|
||
linkify: !1,
|
||
breaks: !1,
|
||
transformPastedText: !1,
|
||
transformCopiedText: !1,
|
||
}),
|
||
addCommands() {
|
||
let e = W.extensions.Commands.config.addCommands();
|
||
return {
|
||
setContent: (t, n, i) => (r) =>
|
||
e.setContent(r.editor.storage.markdown.parser.parse(t), n, i)(r),
|
||
insertContentAt: (t, n, i) => (r) =>
|
||
e.insertContentAt(
|
||
t,
|
||
r.editor.storage.markdown.parser.parse(n, { inline: !0 }),
|
||
i,
|
||
)(r),
|
||
};
|
||
},
|
||
onBeforeCreate() {
|
||
(this.editor.storage.markdown = {
|
||
options: { ...this.options },
|
||
parser: new nW(this.editor, this.options),
|
||
serializer: new nV(this.editor),
|
||
getMarkdown: () =>
|
||
this.editor.storage.markdown.serializer.serialize(
|
||
this.editor.state.doc,
|
||
),
|
||
}),
|
||
(this.editor.options.initialContent = this.editor.options.content),
|
||
(this.editor.options.content =
|
||
this.editor.storage.markdown.parser.parse(
|
||
this.editor.options.content,
|
||
));
|
||
},
|
||
onCreate() {
|
||
(this.editor.options.content = this.editor.options.initialContent),
|
||
delete this.editor.options.initialContent;
|
||
},
|
||
addStorage: () => ({}),
|
||
addExtensions() {
|
||
return [
|
||
nv.configure({
|
||
tight: this.options.tightLists,
|
||
tightClass: this.options.tightListClass,
|
||
}),
|
||
nK.configure({
|
||
transformPastedText: this.options.transformPastedText,
|
||
transformCopiedText: this.options.transformCopiedText,
|
||
}),
|
||
];
|
||
},
|
||
});
|
||
function nX(e) {
|
||
return e.replace(/[ \t\n\r]+$/g, "");
|
||
}
|
||
let nY = (0, b.forwardRef)(function (
|
||
{ initialText: e, editable: t, onUpdate: n, onBlur: i, onReady: r },
|
||
a,
|
||
) {
|
||
var o;
|
||
let s,
|
||
c,
|
||
l = (0, b.useRef)(nX(e ?? "")),
|
||
u = (0, $.useEditor)({
|
||
extensions: [
|
||
V.default.configure({
|
||
heading: { levels: [1, 2, 3] },
|
||
bulletList: {},
|
||
orderedList: {},
|
||
horizontalRule: {},
|
||
bold: {},
|
||
italic: {},
|
||
code: {},
|
||
codeBlock: {},
|
||
blockquote: {},
|
||
}),
|
||
G.default.configure({ placeholder: "输入内容…" }),
|
||
nq.configure({
|
||
html: !1,
|
||
transformCopiedText: !0,
|
||
transformPastedText: !0,
|
||
}),
|
||
],
|
||
content: e ?? "",
|
||
editable: t,
|
||
immediatelyRender: !1,
|
||
editorProps: {
|
||
attributes: {
|
||
class: "markdown-content outline-none min-h-[100px] text-sm",
|
||
style:
|
||
"color: var(--fg-default); caret-color: var(--fg-default);",
|
||
},
|
||
},
|
||
});
|
||
(0, b.useEffect)(() => {
|
||
u && r?.(u);
|
||
}, [u, r]),
|
||
(0, b.useLayoutEffect)(() => {
|
||
u && u.isEditable !== t && u.setEditable(t);
|
||
}, [u, t]),
|
||
(0, b.useEffect)(() => {
|
||
if (!u) return;
|
||
let t = nX(e ?? "");
|
||
t === l.current ||
|
||
u.isFocused ||
|
||
((l.current = t), u.commands.setContent(t, !1));
|
||
}, [u, e]);
|
||
let h =
|
||
((o = (e) => {
|
||
n?.(e);
|
||
}),
|
||
(s = (0, b.useRef)()),
|
||
((c = (0, b.useRef)(o)).current = o),
|
||
(0, b.useCallback)(
|
||
(...e) => {
|
||
s.current && clearTimeout(s.current),
|
||
(s.current = setTimeout(() => c.current(...e), 300));
|
||
},
|
||
[300],
|
||
));
|
||
return ((0, b.useEffect)(() => {
|
||
if (!u) return;
|
||
let e = () => {
|
||
let e = nX(u.storage.markdown.getMarkdown());
|
||
(l.current = e), h(e);
|
||
};
|
||
return (
|
||
u.on("update", e),
|
||
() => {
|
||
u.off("update", e);
|
||
}
|
||
);
|
||
}, [u, h]),
|
||
(0, b.useEffect)(() => {
|
||
if (!u) return;
|
||
let e = () => {
|
||
i?.();
|
||
};
|
||
return (
|
||
u.on("blur", e),
|
||
() => {
|
||
u.off("blur", e);
|
||
}
|
||
);
|
||
}, [u, i]),
|
||
(0, b.useImperativeHandle)(a, () => ({
|
||
getEditor: () => u,
|
||
focus: () => u?.commands.focus(),
|
||
})),
|
||
u)
|
||
? (0, g.jsx)("div", {
|
||
className: "tiptap-editor-wrapper",
|
||
children: (0, g.jsx)($.EditorContent, { editor: u }),
|
||
})
|
||
: null;
|
||
});
|
||
var nJ = e.i(244263),
|
||
nZ = e.i(41114),
|
||
nQ = e.i(276204);
|
||
let n1 = [
|
||
{ id: "line-1", width: "85%" },
|
||
{ id: "line-2", width: "100%" },
|
||
{ id: "line-3", width: "100%" },
|
||
{ id: "line-4", width: "90%" },
|
||
{ id: "line-5", width: "100%" },
|
||
{ id: "line-6", width: "100%" },
|
||
{ id: "line-7", width: "70%" },
|
||
{ id: "line-8", width: "100%" },
|
||
{ id: "line-9", width: "60%" },
|
||
{ id: "line-10", width: "45%" },
|
||
];
|
||
function n0({ taskInfo: e }) {
|
||
return (0, g.jsxs)("div", {
|
||
className:
|
||
"skeleton-shimmer relative flex h-full flex-col overflow-hidden p-4",
|
||
children: [
|
||
(0, g.jsx)("div", {
|
||
className: "flex flex-1 flex-col gap-2.5",
|
||
children: n1.map((e) =>
|
||
(0, g.jsx)(
|
||
"div",
|
||
{
|
||
className: (0, nZ.cn)(
|
||
"h-3 rounded bg-white/[0.12]",
|
||
"canvas-light:bg-neutral-300",
|
||
),
|
||
style: { width: e.width },
|
||
},
|
||
e.id,
|
||
),
|
||
),
|
||
}),
|
||
(0, g.jsx)("div", {
|
||
className: "mt-3 flex justify-center",
|
||
children: (0, g.jsx)(nQ.default, { taskInfo: e }),
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
var n2 = e.i(374090);
|
||
function n3(e) {
|
||
let { doc: t } = e.state;
|
||
return t.textBetween(0, t.content.size, "\n", "\n");
|
||
}
|
||
let n4 = (0, b.memo)(function ({ editor: e, onCopy: t, onExpand: n }) {
|
||
let i = (0, v.useStore)((e) => e.transform[2]);
|
||
return (0, g.jsx)(E.default, {
|
||
className: "absolute left-1/2 origin-bottom -translate-x-1/2",
|
||
style: { bottom: `calc(100% + ${24 + 8 / i}px)`, zIndex: 50 },
|
||
children: (0, g.jsx)(nJ.MarkdownToolbar, {
|
||
editor: e,
|
||
onCopy: t,
|
||
onExpand: n,
|
||
}),
|
||
});
|
||
}),
|
||
n5 = (0, b.memo)(function ({ id: e, selected: t }) {
|
||
var n;
|
||
let i,
|
||
r,
|
||
a,
|
||
o,
|
||
s,
|
||
c,
|
||
l,
|
||
u = (0, A.useCanvasStore)((t) => t.getNode(e)?.data),
|
||
h = (0, A.useCanvasStore)((0, N.selectHasIncomingEdge)(e)),
|
||
f = (0, A.useCanvasStore)((e) => e.updateNodeData),
|
||
d = (0, A.useCanvasStore)((e) => e.markDownstreamStale),
|
||
p = (0, A.useCanvasStore)((e) => e.addNode),
|
||
E = (0, A.useCanvasStore)((e) => e.addEdge),
|
||
G = (0, A.useCanvasStore)((e) => e.applyNodeChanges),
|
||
$ = (0, A.useCanvasStore)((e) => e.isReadonly),
|
||
V = (0, P.useNodeDimensionSync)(e),
|
||
W = (0, R.useShouldShowGenerator)(t, e),
|
||
K = W && u?.action !== k.NodeAction.TEXT_RESOURCE,
|
||
q = (0, S.useIncomingNodeData)(e),
|
||
{ getNode: X, getNodes: Y, getViewport: J } = (0, v.useReactFlow)(),
|
||
Z = (0, b.useCallback)(
|
||
(e) => {
|
||
let t = Y().map((t) => ({
|
||
type: "select",
|
||
id: t.id,
|
||
selected: t.id === e,
|
||
}));
|
||
t.push({ type: "select", id: e, selected: !0 }), G(t);
|
||
},
|
||
[Y, G],
|
||
),
|
||
Q = (0, v.useUpdateNodeInternals)(),
|
||
ee = (0, O.useNodeInteraction)(e, t),
|
||
{
|
||
handleVisible: et,
|
||
pipelineNodeStatus: en,
|
||
pipelineBorderColor: ei,
|
||
} = ee,
|
||
[er, ea] = (0, b.useState)(!1),
|
||
[eo, es] = (0, b.useState)(null),
|
||
[ec, el] = (0, b.useState)(null),
|
||
eu = (0, b.useRef)(null),
|
||
eh = (0, b.useRef)(null),
|
||
ef = (0, b.useRef)(null),
|
||
ed = (0, m.useMergedRef)(V, ef),
|
||
ep = (0, b.useRef)(null),
|
||
eg = (0, b.useRef)(!1),
|
||
eb = (0, b.useCallback)(() => {
|
||
ep.current && clearTimeout(ep.current),
|
||
(ep.current = setTimeout(() => {
|
||
d(e), (ep.current = null);
|
||
}, 250));
|
||
}, [e, d]),
|
||
{
|
||
isFullScreen: em,
|
||
openFullScreen: ew,
|
||
closeFullScreen: ev,
|
||
} = (0, U.useNodeFullScreen)(),
|
||
[ex, ey] = (0, b.useState)(null),
|
||
e_ = (0, b.useRef)(null),
|
||
eS = null !== ex,
|
||
eE = (0, j.isTaskGenerating)(u?.taskInfo),
|
||
eM = (0, j.isTaskFailed)(u?.taskInfo),
|
||
eT = Array.isArray(u?.content)
|
||
? u.content.length > 0
|
||
: !!(u?.content && "" !== u.content),
|
||
ek = u?.content ?? "",
|
||
eC = u?.name || u?.label || "文字",
|
||
eA = (0, b.useCallback)((t) => f(e, { name: t }), [e, f]),
|
||
eN = (0, b.useCallback)(() => f(e, { isStale: !1 }), [e, f]),
|
||
eI = u?.action === k.NodeAction.TEXT_RESOURCE,
|
||
eP = eE
|
||
? "generating"
|
||
: eM
|
||
? "failed"
|
||
: eT || eI
|
||
? "resource"
|
||
: h
|
||
? "pending"
|
||
: "empty_generate";
|
||
(0, b.useEffect)(() => {
|
||
Q(e);
|
||
}, [eP, e, Q]);
|
||
let eR = ex?.w ?? u?.nodeWidth ?? T.NODE_WIDTH,
|
||
eL = ex?.h ?? u?.nodeHeight ?? nJ.NODE_HEIGHT_TEXT;
|
||
(0, b.useEffect)(() => {
|
||
!($ || u?.action) &&
|
||
h &&
|
||
f(e, { action: k.NodeAction.TEXT_GENERATE });
|
||
}, [u?.action, h, e, f, $]);
|
||
let eD = (0, b.useCallback)(() => {
|
||
$ || "resource" !== eP || ((eg.current = !0), ea(!0));
|
||
}, [eP, $]),
|
||
ej = (0, b.useCallback)(
|
||
(t) => {
|
||
f(e, { content: [t] }), eb();
|
||
},
|
||
[e, f, eb],
|
||
),
|
||
eO = (0, b.useCallback)((e) => {
|
||
es(e);
|
||
}, []);
|
||
(0, b.useLayoutEffect)(() => {
|
||
er && eo && (eo.commands.focus(), eo.commands.selectAll());
|
||
}, [er, eo]);
|
||
let eF = (0, b.useCallback)(() => {
|
||
setTimeout(() => {
|
||
!eg.current ||
|
||
ef.current?.contains(document.activeElement) ||
|
||
eu.current?.focus();
|
||
}, 0);
|
||
}, []),
|
||
eU = (0, b.useCallback)(() => {
|
||
let e = em ? eh.current?.getEditor() : eu.current?.getEditor(),
|
||
t = e ? e.storage.markdown.getMarkdown() : "";
|
||
navigator.clipboard.writeText(t).then(
|
||
() => _.Notify.success("已复制到剪贴板"),
|
||
() => _.Notify.error("复制失败"),
|
||
);
|
||
}, [em]),
|
||
eB = (0, b.useCallback)(() => {
|
||
ew();
|
||
}, [ew]),
|
||
eH = (0, b.useCallback)(() => {
|
||
let e = (0, L.getTextNodeMarkdownForExportFromData)(u);
|
||
e
|
||
? (0, x.saveAs)(
|
||
new Blob([e], { type: "text/plain;charset=utf-8" }),
|
||
(0, I.formatDownloadFileName)(eC, "txt"),
|
||
)
|
||
: _.Notify.warn("暂无内容可下载");
|
||
}, [u, eC]),
|
||
ez = (0, b.useMemo)(
|
||
() =>
|
||
!!W &&
|
||
!$ &&
|
||
!er &&
|
||
!em &&
|
||
"resource" === eP &&
|
||
null != (0, L.getTextNodeMarkdownForExportFromData)(u),
|
||
[W, $, er, em, eP, u],
|
||
);
|
||
(0, b.useEffect)(() => {
|
||
if (!er) return;
|
||
let e = (e) => {
|
||
ef.current &&
|
||
!ef.current.contains(e.target) &&
|
||
((eg.current = !1), ea(!1));
|
||
};
|
||
return (
|
||
document.addEventListener("mousedown", e, !0),
|
||
() => {
|
||
document.removeEventListener("mousedown", e, !0);
|
||
}
|
||
);
|
||
}, [er]);
|
||
let eG = (0, b.useCallback)(() => {
|
||
f(e, { content: [], action: k.NodeAction.TEXT_RESOURCE }),
|
||
(eg.current = !0),
|
||
ea(!0);
|
||
}, [e, f]),
|
||
e$ = (0, b.useCallback)(() => {
|
||
let t = X(e);
|
||
if (!t) return;
|
||
f(e, {
|
||
content: [(0, C.pickRandom)(C.TEXT_PRESETS.textToVideo.prompts)],
|
||
action: k.NodeAction.TEXT_GENERATE,
|
||
});
|
||
let n = crypto.randomUUID();
|
||
p({
|
||
id: n,
|
||
type: k.NodeType.VIDEO,
|
||
data: {
|
||
type: k.NodeType.VIDEO,
|
||
name: "视频",
|
||
url: [],
|
||
poster: "",
|
||
action: k.NodeAction.VIDEO_GENERATE,
|
||
params: { prompt: C.TEXT_PRESETS.textToVideo.videoPrompt },
|
||
},
|
||
position: {
|
||
x: t.position.x + T.NODE_WIDTH + T.NODE_GAP,
|
||
y: t.position.y,
|
||
},
|
||
sourcePosition: w.Position.Right,
|
||
targetPosition: w.Position.Left,
|
||
}),
|
||
E({
|
||
id: crypto.randomUUID(),
|
||
source: e,
|
||
sourceHandle: "source",
|
||
target: n,
|
||
targetHandle: "target",
|
||
}),
|
||
Z(n);
|
||
}, [e, X, f, p, E, Z]),
|
||
eV = (0, b.useCallback)(() => {
|
||
let t = X(e);
|
||
if (!t) return;
|
||
let n = crypto.randomUUID();
|
||
p({
|
||
id: n,
|
||
type: k.NodeType.IMAGE,
|
||
data: {
|
||
type: k.NodeType.IMAGE,
|
||
name: "图片",
|
||
url: [C.TEXT_PRESETS.imageToPrompt.imageUrl],
|
||
alt: "反推提示词图片",
|
||
action: k.NodeAction.IMAGE_RESOURCE,
|
||
},
|
||
position: {
|
||
x: t.position.x - T.NODE_WIDTH - T.NODE_GAP,
|
||
y: t.position.y,
|
||
},
|
||
sourcePosition: w.Position.Right,
|
||
targetPosition: w.Position.Left,
|
||
}),
|
||
E({
|
||
id: crypto.randomUUID(),
|
||
source: n,
|
||
sourceHandle: "source",
|
||
target: e,
|
||
targetHandle: "target",
|
||
}),
|
||
f(e, {
|
||
content: [],
|
||
params: {
|
||
...(u?.params ?? {}),
|
||
prompt: C.TEXT_PRESETS.imageToPrompt.prompt,
|
||
},
|
||
action: k.NodeAction.TEXT_GENERATE,
|
||
}),
|
||
Z(n);
|
||
}, [e, X, u?.params, f, p, E, Z]),
|
||
eW = (0, b.useCallback)(() => {
|
||
let t = X(e);
|
||
if (!t) return;
|
||
f(e, {
|
||
content: [C.TEXT_PRESETS.textToMusic.prompt],
|
||
action: k.NodeAction.TEXT_GENERATE,
|
||
});
|
||
let n = crypto.randomUUID();
|
||
p({
|
||
id: n,
|
||
type: k.NodeType.AUDIO,
|
||
data: {
|
||
type: k.NodeType.AUDIO,
|
||
name: "音频",
|
||
url: [],
|
||
action: k.NodeAction.AUDIO_GENERATE,
|
||
params: { scene: "Music" },
|
||
},
|
||
position: {
|
||
x: t.position.x + T.NODE_WIDTH + T.NODE_GAP,
|
||
y: t.position.y,
|
||
},
|
||
sourcePosition: w.Position.Right,
|
||
targetPosition: w.Position.Left,
|
||
}),
|
||
E({
|
||
id: crypto.randomUUID(),
|
||
source: e,
|
||
sourceHandle: "source",
|
||
target: n,
|
||
targetHandle: "target",
|
||
}),
|
||
Z(n);
|
||
}, [e, X, f, p, E, Z]),
|
||
eK = em ? ec : eo,
|
||
eq = (0, b.useCallback)(
|
||
(t) => {
|
||
let n = Array.isArray(ek) ? ek.join("\n") : String(ek || "");
|
||
for (let { word: e, replacement: i } of t) {
|
||
let t = i.replace(/[*_~`]/g, "\\$&");
|
||
n = n.replaceAll(e, t);
|
||
}
|
||
f(e, { content: [n] }), eb(), _.Notify.info("已自动过滤风险内容");
|
||
},
|
||
[ek, e, f, eb],
|
||
);
|
||
(n = $ ? null : eK),
|
||
(i = (0, b.useRef)()),
|
||
(r = (0, b.useRef)("")),
|
||
(a = (0, b.useRef)(!1)),
|
||
(o = (0, b.useRef)(0)),
|
||
((s = (0, b.useRef)(eq)).current = eq),
|
||
(c = (0, b.useCallback)(async () => {
|
||
if (!n || n.isDestroyed)
|
||
return void console.log(
|
||
"[SWF] checkAndReplace: skip — editor null or destroyed",
|
||
);
|
||
let e = n3(n);
|
||
if (!e)
|
||
return void console.log(
|
||
"[SWF] checkAndReplace: skip — plainText empty",
|
||
);
|
||
if (e === r.current)
|
||
return void console.log(
|
||
"[SWF] checkAndReplace: skip — same as lastChecked",
|
||
);
|
||
let t = ++o.current;
|
||
console.log(
|
||
"[SWF] checkAndReplace: calling API with plainText:",
|
||
JSON.stringify(e),
|
||
);
|
||
let i = await (0, n2.filterSensitiveWords)(e);
|
||
if (
|
||
(console.log(
|
||
"[SWF] checkAndReplace: API returned filtered:",
|
||
JSON.stringify(i),
|
||
),
|
||
o.current !== t)
|
||
)
|
||
return void console.log(
|
||
"[SWF] checkAndReplace: skip — stale request",
|
||
);
|
||
if (i === e) {
|
||
console.log(
|
||
"[SWF] checkAndReplace: skip — filtered === original (no sensitive words)",
|
||
),
|
||
(r.current = e);
|
||
return;
|
||
}
|
||
let c = (function (e, t) {
|
||
let n = e.split("\n"),
|
||
i = t.split("\n"),
|
||
r = [],
|
||
a = Math.min(n.length, i.length);
|
||
for (let e = 0; e < a; e++)
|
||
r.push(
|
||
...(function (e, t) {
|
||
let n = [],
|
||
i = 0,
|
||
r = 0;
|
||
for (; i < e.length && r < t.length; ) {
|
||
if (e[i] === t[r] || "*" !== t[r]) {
|
||
i++, r++;
|
||
continue;
|
||
}
|
||
let a = r;
|
||
for (; a < t.length && "*" === t[a]; ) a++;
|
||
let o = t.substring(r, a),
|
||
s = a,
|
||
c = i;
|
||
if (s >= t.length) c = e.length;
|
||
else {
|
||
let n = Math.min(10, t.length - s),
|
||
a = t.substring(s, s + n);
|
||
for (let t = 1; t <= e.length - i; t++)
|
||
if (e.substring(i + t, i + t + n) === a) {
|
||
c = i + t;
|
||
break;
|
||
}
|
||
if (c === i) {
|
||
r = s;
|
||
continue;
|
||
}
|
||
}
|
||
let l = e.substring(i, c);
|
||
l && n.push({ word: l, replacement: o }),
|
||
(i = c),
|
||
(r = s);
|
||
}
|
||
return n;
|
||
})(n[e], i[e]),
|
||
);
|
||
let o = new Set();
|
||
return r.filter((e) => !o.has(e.word) && (o.add(e.word), !0));
|
||
})(e, i);
|
||
if (
|
||
(console.log(
|
||
"[SWF] checkAndReplace: sensitiveMatches:",
|
||
JSON.stringify(c),
|
||
),
|
||
0 === c.length)
|
||
) {
|
||
console.log(
|
||
"[SWF] checkAndReplace: skip — extractSensitiveWords returned empty",
|
||
),
|
||
(r.current = e);
|
||
return;
|
||
}
|
||
if (n.isDestroyed) {
|
||
console.log(
|
||
"[SWF] checkAndReplace: editor destroyed after API — using fallback",
|
||
),
|
||
s.current?.(c),
|
||
(r.current = "");
|
||
return;
|
||
}
|
||
let l = n3(n);
|
||
if (l !== e) {
|
||
console.log(
|
||
"[SWF] checkAndReplace: text changed during API call — using fallback. current:",
|
||
JSON.stringify(l),
|
||
"snapshot:",
|
||
JSON.stringify(e),
|
||
),
|
||
s.current?.(c),
|
||
(r.current = "");
|
||
return;
|
||
}
|
||
a.current = !0;
|
||
let { state: u } = n,
|
||
{ tr: h } = u,
|
||
f = [];
|
||
for (let { word: e, replacement: t } of c)
|
||
u.doc.descendants((n, i) => {
|
||
if (!n.isText || !n.text) return;
|
||
let r = n.text.indexOf(e);
|
||
for (; -1 !== r; )
|
||
f.push({ from: i + r, to: i + r + e.length, replacement: t }),
|
||
(r = n.text.indexOf(e, r + e.length));
|
||
});
|
||
for (let e of (f.sort((e, t) => t.from - e.from),
|
||
console.log(
|
||
"[SWF] checkAndReplace: hits to replace:",
|
||
JSON.stringify(f),
|
||
),
|
||
f))
|
||
h.insertText(e.replacement, e.from, e.to);
|
||
h.steps.length > 0
|
||
? (console.log(
|
||
"[SWF] checkAndReplace: dispatching transaction with",
|
||
h.steps.length,
|
||
"steps",
|
||
),
|
||
n.view.dispatch(h),
|
||
(r.current = n3(n)),
|
||
console.log(
|
||
"[SWF] checkAndReplace: done. new text:",
|
||
JSON.stringify(r.current),
|
||
),
|
||
_.Notify.info("已自动过滤风险内容"))
|
||
: (console.log(
|
||
"[SWF] checkAndReplace: no steps generated (hits found but no transaction steps)",
|
||
),
|
||
(r.current = e)),
|
||
(a.current = !1);
|
||
}, [n])),
|
||
(l = (0, b.useCallback)(() => {
|
||
i.current && clearTimeout(i.current),
|
||
(i.current = setTimeout(() => {
|
||
c();
|
||
}, 2e3));
|
||
}, [c])),
|
||
(0, b.useEffect)(() => {
|
||
if (!n || n.isDestroyed) return;
|
||
r.current = "";
|
||
let e = () => {
|
||
a.current || l();
|
||
},
|
||
t = () => {
|
||
i.current && clearTimeout(i.current), c();
|
||
};
|
||
return (
|
||
n.on("update", e),
|
||
n.on("blur", t),
|
||
() => {
|
||
n.off("update", e),
|
||
n.off("blur", t),
|
||
i.current && clearTimeout(i.current);
|
||
}
|
||
);
|
||
}, [n, l, c]),
|
||
(0, b.useEffect)(
|
||
() => () => {
|
||
ep.current && (clearTimeout(ep.current), (ep.current = null));
|
||
},
|
||
[],
|
||
);
|
||
let eX = Array.isArray(ek) ? ek.join("\n") : String(ek || "");
|
||
(0, b.useEffect)(() => {
|
||
em || el(null);
|
||
}, [em]);
|
||
let eY = (0, b.useCallback)(
|
||
(e) => {
|
||
e.preventDefault(),
|
||
e.stopPropagation(),
|
||
e.target.setPointerCapture(e.pointerId),
|
||
(e_.current = {
|
||
startX: e.clientX,
|
||
startY: e.clientY,
|
||
startW: u?.nodeWidth ?? T.NODE_WIDTH,
|
||
startH: u?.nodeHeight ?? nJ.NODE_HEIGHT_TEXT,
|
||
zoom: J().zoom,
|
||
});
|
||
},
|
||
[u?.nodeWidth, u?.nodeHeight, J],
|
||
),
|
||
eJ = (0, b.useCallback)((e) => {
|
||
if (!e_.current) return;
|
||
let {
|
||
startX: t,
|
||
startY: n,
|
||
startW: i,
|
||
startH: r,
|
||
zoom: a,
|
||
} = e_.current;
|
||
ey({
|
||
w: Math.max(200, Math.round(i + (e.clientX - t) / a)),
|
||
h: Math.max(100, Math.round(r + (e.clientY - n) / a)),
|
||
});
|
||
}, []),
|
||
eZ = (0, b.useCallback)(
|
||
(t) => {
|
||
if (!e_.current) return;
|
||
let {
|
||
startX: n,
|
||
startY: i,
|
||
startW: r,
|
||
startH: a,
|
||
zoom: o,
|
||
} = e_.current;
|
||
f(e, {
|
||
nodeWidth: Math.max(200, Math.round(r + (t.clientX - n) / o)),
|
||
nodeHeight: Math.max(100, Math.round(a + (t.clientY - i) / o)),
|
||
}),
|
||
ey(null),
|
||
(e_.current = null);
|
||
},
|
||
[e, f],
|
||
),
|
||
eQ = {
|
||
width: `${eR}px`,
|
||
position: "relative",
|
||
...("resource" === eP
|
||
? { height: `${eL}px`, padding: "12px 16px" }
|
||
: { height: `${T.NODE_HEIGHT_EMPTY}px` }),
|
||
background:
|
||
"empty_generate" === eP
|
||
? "var(--Surface-secondary-background, #262626)"
|
||
: "var(--Surface-Panel-background, #171717)",
|
||
border: `1px solid ${er ? "var(--canvas-node-border-selected)" : "var(--canvas-node-border)"}`,
|
||
backdropFilter: "blur(1.5px)",
|
||
...(0, H.getPipelineStyles)(
|
||
en,
|
||
ei,
|
||
t,
|
||
"var(--canvas-node-border-selected)",
|
||
),
|
||
},
|
||
e1 = (0, b.useRef)(null);
|
||
(eg.current = er), (0, F.useScrollPassthrough)(e1, eg, eP);
|
||
let e0 = (0, g.jsxs)(g.Fragment, {
|
||
children: [
|
||
(0, g.jsx)("style", { children: nJ.MARKDOWN_CONTENT_STYLES }),
|
||
ez &&
|
||
(0, g.jsx)(M.default, {
|
||
nodeId: e,
|
||
children: (0, g.jsx)("div", {
|
||
className: "flex w-max items-center",
|
||
children: (0, g.jsx)("div", {
|
||
className: "flex items-center justify-center gap-1",
|
||
style: z.FLOATING_TOOLBAR_STYLE,
|
||
children: (0, g.jsx)("button", {
|
||
type: "button",
|
||
title: "下载",
|
||
"data-auth-download-trigger": "true",
|
||
className:
|
||
"text-canvas-controls-text hover:bg-canvas-controls-hover flex h-8 w-8 min-w-8 shrink-0 items-center justify-center rounded-lg transition-colors",
|
||
onClick: (e) => {
|
||
e.stopPropagation(), eH();
|
||
},
|
||
children: (0, g.jsx)(y.Icons.download, {
|
||
className: "h-4 w-4",
|
||
}),
|
||
}),
|
||
}),
|
||
}),
|
||
}),
|
||
er &&
|
||
"resource" === eP &&
|
||
eo &&
|
||
(0, g.jsx)(n4, { editor: eo, onCopy: eU, onExpand: eB }),
|
||
],
|
||
});
|
||
return (0, g.jsxs)(B.default, {
|
||
ref: ed,
|
||
id: e,
|
||
selected: t,
|
||
label: eC,
|
||
titleIcon: (0, g.jsx)(nJ.TextIcon, { size: 14 }),
|
||
isStale: u?.isStale,
|
||
onDismissStale: eN,
|
||
isReadonly: $,
|
||
onLabelChange: eA,
|
||
maxWidth: eR,
|
||
interaction: ee,
|
||
contentStyle: eQ,
|
||
contentClassName: er
|
||
? "group overflow-visible rounded-xl nodrag"
|
||
: "group overflow-visible rounded-xl",
|
||
hideTargetHandle: (0, k.isResourceAction)(u?.action),
|
||
shouldShowGenerator: K,
|
||
nodeType: k.NodeType.TEXT,
|
||
generatorType: u?.generatorType,
|
||
incomingData: q,
|
||
beforeContent: e0,
|
||
children: [
|
||
"failed" === eP &&
|
||
(0, g.jsx)(j.default, { taskInfo: u?.taskInfo, nodeId: e }),
|
||
"generating" === eP && (0, g.jsx)(n0, { taskInfo: u?.taskInfo }),
|
||
"resource" === eP &&
|
||
(eX.trim() || er
|
||
? (0, g.jsx)("div", {
|
||
ref: e1,
|
||
className: `tiny-scrollbar h-full overflow-y-auto ${er ? "nodrag nowheel" : t ? "nowheel" : ""}`,
|
||
style: er
|
||
? {
|
||
cursor: "text",
|
||
scrollbarWidth: "auto",
|
||
scrollbarGutter: "auto",
|
||
}
|
||
: { scrollbarWidth: "auto", scrollbarGutter: "auto" },
|
||
onDoubleClick: eD,
|
||
onPointerDown: (e) => {
|
||
eg.current && e.stopPropagation();
|
||
},
|
||
onMouseDown: (e) => {
|
||
eg.current && e.stopPropagation();
|
||
},
|
||
onContextMenu: er
|
||
? (e) => {
|
||
e.preventDefault(), e.stopPropagation();
|
||
}
|
||
: void 0,
|
||
children: (0, g.jsx)(nY, {
|
||
ref: eu,
|
||
initialText: eX,
|
||
editable: er,
|
||
onUpdate: ej,
|
||
onBlur: eF,
|
||
onReady: eO,
|
||
}),
|
||
})
|
||
: (0, g.jsxs)("div", {
|
||
className:
|
||
"flex h-full flex-col items-center justify-center gap-3",
|
||
onDoubleClick: eD,
|
||
children: [
|
||
(0, g.jsx)("span", {
|
||
className: "text-fg-muted text-sm",
|
||
children: "请编写内容,开始你的创作。",
|
||
}),
|
||
(0, g.jsx)(nJ.Text2Icon, {
|
||
size: 90,
|
||
className: "text-fg-disabled",
|
||
}),
|
||
],
|
||
})),
|
||
"empty_generate" === eP &&
|
||
(0, g.jsx)(D.default, {
|
||
icon: (0, g.jsx)(nJ.Text2Icon, {
|
||
size: 90,
|
||
className: "text-fg-disabled",
|
||
}),
|
||
isReadonly: $,
|
||
actions: [
|
||
{
|
||
icon: (0, g.jsx)(nJ.TextIcon, { size: 14 }),
|
||
label: "自己编写内容",
|
||
onClick: eG,
|
||
},
|
||
{
|
||
icon: (0, g.jsx)(y.Icons.VideoAddS, {
|
||
width: 14,
|
||
height: 14,
|
||
}),
|
||
label: "文生视频",
|
||
onClick: e$,
|
||
},
|
||
{
|
||
icon: (0, g.jsx)(y.Icons.ImageS, { width: 14, height: 14 }),
|
||
label: "图片反推提示词",
|
||
onClick: eV,
|
||
},
|
||
{
|
||
icon: (0, g.jsx)(y.Icons.music, { width: 14, height: 14 }),
|
||
label: "文字生音乐",
|
||
onClick: eW,
|
||
},
|
||
],
|
||
}),
|
||
"pending" === eP &&
|
||
(0, g.jsx)("div", {
|
||
className: "flex h-full items-center justify-center",
|
||
children: (0, g.jsx)(nJ.Text2Icon, {
|
||
size: 90,
|
||
className: "text-fg-disabled",
|
||
}),
|
||
}),
|
||
(0, g.jsxs)(U.NodeFullScreenOverlay, {
|
||
open: em,
|
||
onClose: ev,
|
||
title: eC,
|
||
children: [
|
||
(0, g.jsx)("style", { children: nJ.MARKDOWN_CONTENT_STYLES }),
|
||
(0, g.jsxs)("div", {
|
||
className: "mx-auto flex h-full max-w-3xl flex-col",
|
||
children: [
|
||
(0, g.jsx)("div", {
|
||
className: "sticky top-0 z-10 flex justify-center pb-4",
|
||
style: { background: "rgba(10, 10, 10, 0.95)" },
|
||
children: (0, g.jsx)(nJ.MarkdownToolbar, {
|
||
editor: ec,
|
||
onCopy: eU,
|
||
variant: "inline",
|
||
}),
|
||
}),
|
||
(0, g.jsx)("div", {
|
||
className: "min-h-0 flex-1",
|
||
children: (0, g.jsx)(nY, {
|
||
ref: eh,
|
||
initialText: eX,
|
||
editable: !0,
|
||
onUpdate: ej,
|
||
onReady: el,
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
"resource" === eP &&
|
||
!$ &&
|
||
(0, g.jsx)("div", {
|
||
className:
|
||
"nodrag nopan nowheel text-fg-disabled hover:text-fg-muted absolute bottom-1 right-1 z-30 flex h-4 w-4 cursor-nwse-resize items-center justify-center rounded-sm transition-opacity",
|
||
style: { opacity: et || eS ? 1 : 0, touchAction: "none" },
|
||
onPointerDown: eY,
|
||
onPointerMove: eJ,
|
||
onPointerUp: eZ,
|
||
children: (0, g.jsxs)("svg", {
|
||
width: "8",
|
||
height: "8",
|
||
viewBox: "0 0 8 8",
|
||
fill: "none",
|
||
children: [
|
||
(0, g.jsx)("path", {
|
||
d: "M7 1L1 7",
|
||
stroke: "currentColor",
|
||
strokeWidth: "1.5",
|
||
strokeLinecap: "round",
|
||
}),
|
||
(0, g.jsx)("path", {
|
||
d: "M7 5L5 7",
|
||
stroke: "currentColor",
|
||
strokeWidth: "1.5",
|
||
strokeLinecap: "round",
|
||
}),
|
||
],
|
||
}),
|
||
}),
|
||
],
|
||
});
|
||
});
|
||
(n5.displayName = "TextNode"), e.s(["default", 0, n5], 367656);
|
||
var n6 = e.i(403094),
|
||
n8 = e.i(295085),
|
||
n9 = e.i(42939),
|
||
n7 = e.i(36108),
|
||
ie = e.i(500536),
|
||
it = e.i(799093);
|
||
let ii = {
|
||
MIN_SIZE: 4,
|
||
MAX_CAP:
|
||
"number" == typeof (t = navigator.deviceMemory) && t <= 4 ? 15 : 30,
|
||
RATIO: 0.5,
|
||
EVICT_BATCH: 3,
|
||
SHRINK_COOLDOWN_MS: 3e4,
|
||
},
|
||
ir = ii.MIN_SIZE,
|
||
ia = 0,
|
||
io = new Map(),
|
||
is = new Map();
|
||
function ic() {
|
||
if (is.size <= ir) return;
|
||
let e = [...is.entries()].sort(
|
||
(e, t) => e[1].returnedAt - t[1].returnedAt,
|
||
),
|
||
t = 0;
|
||
for (; is.size > ir && e.length > 0 && t < ii.EVICT_BATCH; ) {
|
||
var n;
|
||
let i = e.shift();
|
||
if (!i) break;
|
||
let [r, a] = i;
|
||
(n = a.el).pause(),
|
||
n.removeAttribute("src"),
|
||
n.load(),
|
||
is.delete(r),
|
||
t++;
|
||
}
|
||
is.size > ir && setTimeout(ic, 500);
|
||
}
|
||
function il(e) {
|
||
let t = Math.min(
|
||
Math.max(Math.ceil(e * ii.RATIO), ii.MIN_SIZE),
|
||
ii.MAX_CAP,
|
||
);
|
||
t >= ir
|
||
? (ir = t)
|
||
: Date.now() - ia > ii.SHRINK_COOLDOWN_MS &&
|
||
((ir = t), (ia = Date.now()), ic());
|
||
}
|
||
function iu(e) {
|
||
let t,
|
||
n = io.get(e);
|
||
if (n) return n;
|
||
let i = is.get(e);
|
||
if (i) return is.delete(e), io.set(e, i.el), i.el;
|
||
let r =
|
||
(((t = document.createElement("video")).muted = !0),
|
||
(t.playsInline = !0),
|
||
(t.preload = "metadata"),
|
||
(t.style.width = "100%"),
|
||
(t.style.height = "100%"),
|
||
(t.style.objectFit = "cover"),
|
||
t);
|
||
return io.set(e, r), r;
|
||
}
|
||
function ih(e) {
|
||
let t = io.get(e);
|
||
if (!t) return;
|
||
io.delete(e), t.pause();
|
||
let n = t.src || "";
|
||
is.set(e, { el: t, url: n, returnedAt: Date.now() }), ic();
|
||
}
|
||
e.s(
|
||
[
|
||
"acquireVideoElement",
|
||
() => iu,
|
||
"releaseVideoElement",
|
||
() => ih,
|
||
"updateVideoPoolSize",
|
||
() => il,
|
||
],
|
||
983802,
|
||
);
|
||
let id = "frames",
|
||
ip = [0.5, 1, 2];
|
||
function ig(e, t) {
|
||
return `${e}|${t}`;
|
||
}
|
||
let ib = new Map(),
|
||
im = new Set();
|
||
function iw(e, t, n) {
|
||
im.forEach((i) => i(e, t, n));
|
||
}
|
||
let iv = null;
|
||
function ix() {
|
||
if (null !== iv) return iv;
|
||
try {
|
||
let e = document.createElement("canvas");
|
||
(e.width = 1),
|
||
(e.height = 1),
|
||
(iv = e.toDataURL("image/webp").startsWith("data:image/webp"));
|
||
} catch {
|
||
iv = !1;
|
||
}
|
||
return iv;
|
||
}
|
||
function iy() {
|
||
return new Promise((e, t) => {
|
||
let n = indexedDB.open("libtv-thumbnails", 1);
|
||
(n.onupgradeneeded = () => {
|
||
let e = n.result;
|
||
e.objectStoreNames.contains(id) ||
|
||
e
|
||
.createObjectStore(id, { keyPath: "url" })
|
||
.createIndex("capturedAt", "capturedAt", { unique: !1 });
|
||
}),
|
||
(n.onsuccess = () => e(n.result)),
|
||
(n.onerror = () => t(n.error));
|
||
});
|
||
}
|
||
async function i_(e, t) {
|
||
try {
|
||
let n = await iy(),
|
||
i = n.transaction(id, "readwrite"),
|
||
r = i.objectStore(id),
|
||
a = { url: e, dataUrl: t, capturedAt: Date.now() };
|
||
r.put(a),
|
||
await new Promise((e, t) => {
|
||
(i.oncomplete = () => e()), (i.onerror = () => t(i.error));
|
||
}),
|
||
n.close();
|
||
} catch {}
|
||
}
|
||
function iS(e, t, n) {
|
||
try {
|
||
let i = Math.min(t, 50),
|
||
r = Math.min(n, 50),
|
||
a = Math.max(0, Math.floor((t - i) / 2)),
|
||
o = Math.max(0, Math.floor((n - r) / 2)),
|
||
s = e.getImageData(a, o, i, r),
|
||
c = i * r,
|
||
l = 0;
|
||
for (let e = 0; e < s.data.length; e += 4)
|
||
l +=
|
||
0.299 * s.data[e] + 0.587 * s.data[e + 1] + 0.114 * s.data[e + 2];
|
||
return l / c;
|
||
} catch {
|
||
return 255;
|
||
}
|
||
}
|
||
let iE = new Set();
|
||
async function iM(e, t) {
|
||
let n = ig(e, t);
|
||
if (!iE.has(n)) {
|
||
iE.add(n);
|
||
try {
|
||
let i = document.createElement("video");
|
||
for (let r of ((i.muted = !0),
|
||
(i.playsInline = !0),
|
||
(i.crossOrigin = "anonymous"),
|
||
(i.preload = "auto"),
|
||
await new Promise((t, n) => {
|
||
let r = setTimeout(() => {
|
||
i.removeAttribute("src"), i.load(), n(Error("timeout"));
|
||
}, 15e3);
|
||
i.addEventListener(
|
||
"loadeddata",
|
||
() => {
|
||
clearTimeout(r), t();
|
||
},
|
||
{ once: !0 },
|
||
),
|
||
i.addEventListener(
|
||
"error",
|
||
() => {
|
||
clearTimeout(r), n(Error("load error"));
|
||
},
|
||
{ once: !0 },
|
||
),
|
||
(i.src = e);
|
||
}),
|
||
ip)) {
|
||
if (r >= (i.duration || 1 / 0)) continue;
|
||
await new Promise((e) => {
|
||
i.addEventListener("seeked", () => e(), { once: !0 }),
|
||
(i.currentTime = r);
|
||
});
|
||
let { videoWidth: a, videoHeight: o } = i;
|
||
if (0 === a || 0 === o) continue;
|
||
let s = t / Math.min(a, o),
|
||
c = document.createElement("canvas");
|
||
(c.width = Math.round(a * s)), (c.height = Math.round(o * s));
|
||
let l = c.getContext("2d");
|
||
if (
|
||
l &&
|
||
(l.drawImage(i, 0, 0, c.width, c.height),
|
||
iS(l, c.width, c.height) >= 15)
|
||
) {
|
||
let i = ix()
|
||
? c.toDataURL("image/webp", 0.8)
|
||
: c.toDataURL("image/jpeg", 0.8);
|
||
ib.set(n, i), iw(e, i, t), i_(n, i);
|
||
break;
|
||
}
|
||
}
|
||
i.removeAttribute("src"), i.load();
|
||
} catch {
|
||
} finally {
|
||
iE.delete(n);
|
||
}
|
||
}
|
||
}
|
||
function iT(e, t) {
|
||
let { videoWidth: n, videoHeight: i } = e;
|
||
if (0 === n || 0 === i)
|
||
return { dataUrl: null, brightness: -1, width: 0, height: 0 };
|
||
let r = t / Math.min(n, i),
|
||
a = Math.round(n * r),
|
||
o = Math.round(i * r),
|
||
s = document.createElement("canvas");
|
||
(s.width = a), (s.height = o);
|
||
let c = s.getContext("2d");
|
||
if (!c) return { dataUrl: null, brightness: -1, width: a, height: o };
|
||
c.drawImage(e, 0, 0, a, o);
|
||
let l = iS(c, a, o);
|
||
return l < 15
|
||
? { dataUrl: null, brightness: l, width: a, height: o }
|
||
: {
|
||
dataUrl: ix()
|
||
? s.toDataURL("image/webp", 0.8)
|
||
: s.toDataURL("image/jpeg", 0.8),
|
||
brightness: l,
|
||
width: a,
|
||
height: o,
|
||
};
|
||
}
|
||
function ik(e, t, n, i, r, a) {
|
||
let o = ig(e, a);
|
||
return (
|
||
ib.set(o, t),
|
||
iw(e, t, a),
|
||
e.startsWith("blob:") || e.startsWith("data:") || i_(o, t),
|
||
t
|
||
);
|
||
}
|
||
async function iC(e, t, n = 200) {
|
||
try {
|
||
await new Promise((t) => {
|
||
let n = !1,
|
||
i = () => {
|
||
n || ((n = !0), t());
|
||
};
|
||
"requestVideoFrameCallback" in e &&
|
||
"function" == typeof e.requestVideoFrameCallback
|
||
? (e.requestVideoFrameCallback(i), setTimeout(i, 200))
|
||
: requestAnimationFrame(() =>
|
||
requestAnimationFrame(() => requestAnimationFrame(i)),
|
||
);
|
||
});
|
||
let i = iT(e, n);
|
||
if (null !== i.dataUrl)
|
||
return ik(t, i.dataUrl, i.brightness, i.width, i.height, n);
|
||
await new Promise((e) => setTimeout(e, 150));
|
||
let r = iT(e, n);
|
||
if (null !== r.dataUrl)
|
||
return ik(t, r.dataUrl, r.brightness, r.width, r.height, n);
|
||
return t.startsWith("blob:") || t.startsWith("data:") || iM(t, n), null;
|
||
} catch {
|
||
return null;
|
||
}
|
||
}
|
||
function iA(e, t) {
|
||
if (!e) return;
|
||
let n = ib.get(ig(e, t));
|
||
if (n) return { dataUrl: n, shortSidePx: t };
|
||
for (let n of (0, ie.getFallbackShortSides)(t)) {
|
||
let t = ib.get(ig(e, n));
|
||
if (t) return { dataUrl: t, shortSidePx: n };
|
||
}
|
||
let i = ib.get(e);
|
||
if (i) return { dataUrl: i, shortSidePx: 200 };
|
||
}
|
||
async function iN(e, t = 200) {
|
||
try {
|
||
let n = await iy(),
|
||
i = n.transaction(id, "readonly").objectStore(id),
|
||
r = ig(e, t),
|
||
a = await new Promise((e, t) => {
|
||
let n = i.get(r);
|
||
(n.onsuccess = () => e(n.result)), (n.onerror = () => t(n.error));
|
||
});
|
||
if ((n.close(), a && Date.now() - a.capturedAt <= 2592e6))
|
||
return ib.set(r, a.dataUrl), a.dataUrl;
|
||
if (t > 200)
|
||
for (let n of (0, ie.getFallbackShortSides)(t)) {
|
||
let t = await iN(e, n);
|
||
if (t) return t;
|
||
}
|
||
return null;
|
||
} catch {
|
||
return null;
|
||
}
|
||
}
|
||
async function iI(e, t = 200) {
|
||
!e ||
|
||
e.startsWith("blob:") ||
|
||
e.startsWith("data:") ||
|
||
iA(e, t) ||
|
||
(await iN(e, t)) ||
|
||
(await iM(e, t));
|
||
}
|
||
let iP = ({ size: e = 14, className: t = "" }) =>
|
||
(0, g.jsx)(y.Icons.scissors, { width: e, height: e, className: t }),
|
||
iR = ({ size: e = 14, className: t = "" }) =>
|
||
(0, g.jsx)(y.Icons.GridPercent, { width: e, height: e, className: t }),
|
||
iL = { width: T.NODE_WIDTH, height: T.NODE_WIDTH };
|
||
function iD({
|
||
mainUrl: e,
|
||
poster: t,
|
||
onOpen: n,
|
||
isReadonly: i,
|
||
nodeId: r,
|
||
isDraggingConnection: a,
|
||
selected: o,
|
||
composeGenerating: s,
|
||
}) {
|
||
let c = (0, ie.useVideoTargetWidth)(T.NODE_WIDTH),
|
||
[l, u] = (0, b.useState)(() => iA(e, c)?.dataUrl),
|
||
[h, f] = (0, b.useState)(!1),
|
||
d = h && !a,
|
||
p = (0, b.useRef)(null),
|
||
m = (0, b.useRef)(null),
|
||
w = (0, b.useRef)(null),
|
||
[v, x] = (0, b.useState)(!1),
|
||
[_, S] = (0, b.useState)(0),
|
||
[E, M] = (0, b.useState)(0),
|
||
[k, C] = (0, b.useState)(!1),
|
||
[A, N] = (0, b.useState)(void 0),
|
||
[I, P] = (0, b.useState)(!0),
|
||
[R, L] = (0, b.useState)(1);
|
||
(0, n7.useFrozenEffect)(() => {
|
||
let t = iA(e, c);
|
||
if (t) return void u(t.dataUrl);
|
||
if ((u(void 0), !e)) return;
|
||
let n = !1;
|
||
return (
|
||
iN(e, c).then((e) => {
|
||
!n && e && u(e);
|
||
}),
|
||
() => {
|
||
n = !0;
|
||
}
|
||
);
|
||
}, [e, c]),
|
||
(0, n7.useFrozenEffect)(() => {
|
||
if (e) {
|
||
var t;
|
||
return (
|
||
(t = (t, n, i) => {
|
||
t === e && i >= c && u(n);
|
||
}),
|
||
im.add(t),
|
||
() => im.delete(t)
|
||
);
|
||
}
|
||
}, [e, c]),
|
||
(0, b.useEffect)(() => {
|
||
if (!e || l || t) return;
|
||
let n = !1;
|
||
return (
|
||
iI(e, c).then(() => {
|
||
if (n) return;
|
||
let t = iA(e, c);
|
||
t && u(t.dataUrl);
|
||
}),
|
||
() => {
|
||
n = !0;
|
||
}
|
||
);
|
||
}, [e, c, l, t]);
|
||
let D = (0, b.useCallback)(() => {
|
||
a || (p.current = setTimeout(() => f(!0), 300));
|
||
}, [a]),
|
||
j = (0, b.useCallback)(() => {
|
||
p.current && (clearTimeout(p.current), (p.current = null)), f(!1);
|
||
}, []),
|
||
O = o || d;
|
||
(0, b.useEffect)(() => {
|
||
if (!d) return;
|
||
let t = w.current;
|
||
if (!t) return;
|
||
let n = iu(r);
|
||
return (
|
||
(n.className = "h-full w-full object-cover"),
|
||
(n.muted = I),
|
||
(n.volume = R),
|
||
(n.playsInline = !0),
|
||
(n.preload = "metadata"),
|
||
(n.src = e),
|
||
(m.current = n),
|
||
t.contains(n) || t.appendChild(n),
|
||
O && n.play().catch(() => {}),
|
||
() => {
|
||
n.pause(),
|
||
(m.current = null),
|
||
t.contains(n) && t.removeChild(n),
|
||
ih(r);
|
||
}
|
||
);
|
||
}, [r, e, d, O]),
|
||
(0, b.useEffect)(() => {
|
||
let e = m.current;
|
||
e && d && ((e.muted = I), (e.volume = R));
|
||
}, [d, I, R]),
|
||
(0, b.useEffect)(() => {
|
||
let t = m.current;
|
||
if (!t) return;
|
||
let n = () => {
|
||
t.duration && isFinite(t.duration) && M(t.duration),
|
||
C(!0),
|
||
O && t.play().catch(() => {});
|
||
},
|
||
i = () => {
|
||
e &&
|
||
!iA(e, c) &&
|
||
iC(t, e, c).then((e) => {
|
||
e && u(e);
|
||
});
|
||
},
|
||
r = !1,
|
||
a = () => {
|
||
S(t.currentTime),
|
||
(() => {
|
||
if (r) return;
|
||
let e = (0, n9.detectVideoHasAudio)(t, {
|
||
minCurrentTimeSec: 0.5,
|
||
});
|
||
null !== e && ((r = !0), N(e));
|
||
})();
|
||
},
|
||
o = () => x(!0),
|
||
s = () => x(!1),
|
||
l = () => {
|
||
x(!1), (t.currentTime = 0), S(0);
|
||
};
|
||
return (
|
||
t.addEventListener("loadedmetadata", n),
|
||
t.addEventListener("loadeddata", i),
|
||
t.addEventListener("timeupdate", a),
|
||
t.addEventListener("play", o),
|
||
t.addEventListener("pause", s),
|
||
t.addEventListener("ended", l),
|
||
() => {
|
||
t.removeEventListener("loadedmetadata", n),
|
||
t.removeEventListener("loadeddata", i),
|
||
t.removeEventListener("timeupdate", a),
|
||
t.removeEventListener("play", o),
|
||
t.removeEventListener("pause", s),
|
||
t.removeEventListener("ended", l);
|
||
}
|
||
);
|
||
}, [d, O, e, c]);
|
||
let F = (0, b.useCallback)((e) => {
|
||
e.stopPropagation();
|
||
let t = m.current;
|
||
t && (t.paused ? t.play().catch(() => {}) : t.pause());
|
||
}, []),
|
||
U = (0, b.useCallback)((e) => {
|
||
let t = m.current;
|
||
t && (t.currentTime = e);
|
||
}, []),
|
||
B = (0, b.useCallback)((e) => L(e), []),
|
||
H = (0, b.useCallback)(() => P((e) => !e), []);
|
||
return (0, g.jsxs)("div", {
|
||
className: "relative h-full w-full overflow-hidden rounded-xl",
|
||
onMouseEnter: D,
|
||
onMouseLeave: j,
|
||
children: [
|
||
(0, g.jsxs)("div", {
|
||
className: "absolute inset-0 overflow-hidden",
|
||
children: [
|
||
!d && (l || t)
|
||
? (0, g.jsx)("img", {
|
||
src:
|
||
l ||
|
||
(t
|
||
? (0, n8.getFasterImage)(t, { width: T.NODE_WIDTH }) ||
|
||
t
|
||
: ""),
|
||
alt: "",
|
||
className: "h-full w-full object-cover",
|
||
style: {
|
||
background: "var(--Surface-Panel-background, #171717)",
|
||
},
|
||
})
|
||
: !d && e
|
||
? (0, g.jsx)("div", {
|
||
className: "absolute inset-0",
|
||
style: {
|
||
background: "var(--Surface-Panel-background, #171717)",
|
||
},
|
||
})
|
||
: d
|
||
? null
|
||
: (0, g.jsx)("div", {
|
||
className: "h-full w-full",
|
||
style: {
|
||
background:
|
||
"var(--Surface-Panel-background, #171717)",
|
||
},
|
||
}),
|
||
d &&
|
||
(0, g.jsx)("div", {
|
||
ref: w,
|
||
className: "absolute inset-0",
|
||
style: {
|
||
opacity: +!!k,
|
||
transition: "opacity 300ms ease-out",
|
||
},
|
||
}),
|
||
],
|
||
}),
|
||
O &&
|
||
d &&
|
||
(0, g.jsx)(z.VideoPlayerBar, {
|
||
isPlaying: v,
|
||
currentTime: _,
|
||
duration: E,
|
||
volume: R,
|
||
muted: I,
|
||
hasAudio: !1 !== A,
|
||
onPlayPause: F,
|
||
onSeek: U,
|
||
onVolumeChange: B,
|
||
onToggleMute: H,
|
||
}),
|
||
(0, g.jsx)("div", {
|
||
className:
|
||
"pointer-events-none absolute inset-0 z-10 flex items-center justify-center",
|
||
children: (0, g.jsxs)("button", {
|
||
type: "button",
|
||
onClick: i ? void 0 : n,
|
||
disabled: i,
|
||
className:
|
||
"nodrag border-white/16 pointer-events-auto flex h-8 min-w-12 shrink-0 items-center justify-center gap-1 rounded-lg border bg-[rgba(31,31,31,0.9)] px-3 py-1 text-[13px] text-white/90 shadow-md backdrop-blur-sm transition-colors hover:enabled:bg-white/10 disabled:cursor-not-allowed disabled:opacity-50",
|
||
children: [
|
||
s
|
||
? (0, g.jsx)(y.Icons.Loading, {
|
||
width: 14,
|
||
height: 14,
|
||
className: "shrink-0 animate-spin",
|
||
})
|
||
: (0, g.jsx)(iP, { size: 14 }),
|
||
s ? "生成中" : "打开视频合成",
|
||
],
|
||
}),
|
||
}),
|
||
!d &&
|
||
e &&
|
||
!l &&
|
||
!t &&
|
||
(0, g.jsx)("div", {
|
||
className:
|
||
"pointer-events-none absolute inset-0 z-20 flex items-center justify-center",
|
||
children: (0, g.jsx)(n6.Loader, {
|
||
color: "white",
|
||
className: "mix-blend-difference",
|
||
}),
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
function ij({
|
||
canOpen: e,
|
||
hasInput: t,
|
||
onOpen: n,
|
||
isReadonly: i,
|
||
composeGenerating: r,
|
||
}) {
|
||
return (0, g.jsxs)("div", {
|
||
className:
|
||
"flex h-full w-full flex-col items-center justify-center gap-4 rounded-xl p-8",
|
||
children: [
|
||
r
|
||
? (0, g.jsx)(y.Icons.Loading, {
|
||
width: 66,
|
||
height: 66,
|
||
className: "text-fg-disabled shrink-0 animate-spin",
|
||
})
|
||
: (0, g.jsx)(iP, {
|
||
size: 66,
|
||
className: "text-fg-disabled shrink-0",
|
||
}),
|
||
e
|
||
? (0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: i ? void 0 : n,
|
||
disabled: i,
|
||
className:
|
||
"text-fg-muted border-canvas-node-border hover:enabled:bg-btn-ghost-hover flex h-8 min-w-12 shrink-0 items-center justify-center gap-1 rounded-lg border bg-transparent px-3 py-1 text-[13px] transition-colors disabled:cursor-not-allowed disabled:opacity-50",
|
||
children: r ? "生成中" : "打开视频合成",
|
||
})
|
||
: (0, g.jsx)("span", {
|
||
className: "text-fg-muted shrink-0 text-center text-[13px]",
|
||
children: t
|
||
? "请连接2个及以上的视频/音频后操作"
|
||
: "空空如也,请连接多个视频节点后操作",
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
let iO = (0, b.memo)(function ({ id: e, selected: t }) {
|
||
let n = (0, A.useCanvasStore)((t) => t.getNode(e)?.data),
|
||
i = (0, A.useCanvasStore)((e) => e.updateNodeData),
|
||
r = (0, A.useCanvasStore)((e) => e.isReadonly),
|
||
a = (0, P.useNodeDimensionSync)(e);
|
||
(0, R.useShouldShowGenerator)(t, e);
|
||
let o = (0, S.useIncomingNodeData)(e),
|
||
s = (0, O.useNodeInteraction)(e, t),
|
||
{
|
||
pipelineNodeStatus: c,
|
||
pipelineBorderColor: l,
|
||
isDraggingConnection: u,
|
||
} = s,
|
||
h = (n?.url ?? [])[0],
|
||
f = !!h,
|
||
d = o.videoList,
|
||
p = o.audioList,
|
||
m = !!d[0]?.url,
|
||
w = d.length >= 2,
|
||
v = p.length > 0,
|
||
x = (0, A.useCanvasStore)((e) => e.editingClipNodeId),
|
||
E = (0, A.useCanvasStore)((e) => e.editingClipPreviewExpanded),
|
||
M = (0, A.useCanvasStore)((e) => e.setEditingClipNodeId),
|
||
k = (0, b.useMemo)(
|
||
() => d.filter((e) => e.url).map((e) => e.nodeId),
|
||
[d],
|
||
),
|
||
C = (0, b.useMemo)(
|
||
() => p.filter((e) => e.url).map((e) => e.nodeId),
|
||
[p],
|
||
),
|
||
N = m && (w || v),
|
||
L = x === e,
|
||
D = L && !E,
|
||
F = n?.name || n?.label || "视频合成节点",
|
||
U = (0, b.useCallback)((t) => i(e, { name: t }), [e, i]),
|
||
z = (0, b.useRef)(!1),
|
||
G = (0, b.useCallback)(() => {
|
||
if (h && !z.current) {
|
||
(z.current = !0),
|
||
setTimeout(() => {
|
||
z.current = !1;
|
||
}, 2e3);
|
||
try {
|
||
(0, I.triggerDownload)(
|
||
h,
|
||
(0, I.formatDownloadFileName)(F, "mp4"),
|
||
);
|
||
} catch (e) {
|
||
console.error("下载失败:", e), _.Notify.error("下载失败,请重试");
|
||
}
|
||
}
|
||
}, [h, F]),
|
||
$ = L ? T.NODE_WIDTH : iL.width,
|
||
V = L ? (n?.embedContentHeight ?? 260) : iL.height,
|
||
W = (0, b.useMemo)(() => new Set(k), [k]),
|
||
K = (0, b.useMemo)(() => new Set(C), [C]);
|
||
(0, b.useEffect)(() => {
|
||
let t = n?.clipTimelineData;
|
||
if (!t) return;
|
||
let r = t.videoSourceNodeIds.filter((e) => W.has(e)),
|
||
a = t.audioSourceNodeIds.filter((e) => K.has(e)),
|
||
o = t.clips.filter(
|
||
(e) =>
|
||
(e.sourceNodeId && W.has(e.sourceNodeId)) ||
|
||
(e.sourceNodeId && K.has(e.sourceNodeId)),
|
||
),
|
||
s =
|
||
r.length !== t.videoSourceNodeIds.length ||
|
||
r.some((e, n) => e !== t.videoSourceNodeIds[n]),
|
||
c =
|
||
a.length !== t.audioSourceNodeIds.length ||
|
||
a.some((e, n) => e !== t.audioSourceNodeIds[n]),
|
||
l = o.length !== t.clips.length;
|
||
(s || c || l) &&
|
||
i(e, {
|
||
clipTimelineData: {
|
||
...t,
|
||
videoSourceNodeIds: r,
|
||
audioSourceNodeIds: a,
|
||
clips: o,
|
||
},
|
||
});
|
||
}, [e, n?.clipTimelineData, W, K, i]);
|
||
let q = {
|
||
width: `${$}px`,
|
||
height: `${V}px`,
|
||
position: "relative",
|
||
background: "var(--Surface-secondary-background, #262626)",
|
||
border: "1px solid var(--canvas-node-border)",
|
||
borderRadius: "12px",
|
||
...(0, H.getPipelineStyles)(
|
||
c,
|
||
l,
|
||
!D && t,
|
||
"var(--canvas-node-border-selected)",
|
||
),
|
||
},
|
||
X = (0, j.isTaskGenerating)(n?.taskInfo);
|
||
return (0, g.jsxs)(B.default, {
|
||
ref: a,
|
||
id: e,
|
||
selected: t,
|
||
label: F,
|
||
titleIcon: (0, g.jsx)(iR, { size: 14 }),
|
||
isStale: n?.isStale,
|
||
isReadonly: r,
|
||
onLabelChange: U,
|
||
maxWidth: $,
|
||
rootClassName: (0, nZ.cn)(
|
||
"relative",
|
||
D && "box-border rounded-[14px] border-2 border-[#3b82f6]",
|
||
),
|
||
interaction: s,
|
||
contentStyle: q,
|
||
contentClassName: "group overflow-hidden rounded-xl",
|
||
shouldShowGenerator: !1,
|
||
hideTargetHandle: !1,
|
||
children: [
|
||
!L &&
|
||
(f
|
||
? (0, g.jsx)(iD, {
|
||
mainUrl: h,
|
||
poster: n?.poster,
|
||
onOpen: () => M(e),
|
||
isReadonly: r,
|
||
nodeId: e,
|
||
isDraggingConnection: u,
|
||
selected: t,
|
||
composeGenerating: X,
|
||
})
|
||
: (0, g.jsx)(ij, {
|
||
canOpen: N,
|
||
hasInput: m,
|
||
onOpen: () => M(e),
|
||
isReadonly: r,
|
||
composeGenerating: X,
|
||
})),
|
||
L &&
|
||
(0, g.jsx)("div", {
|
||
className:
|
||
"nodrag nopan flex h-full w-full flex-col overflow-hidden",
|
||
style: { pointerEvents: "auto" },
|
||
children: (0, g.jsx)("div", {
|
||
id: `clip-preview-drop-${e}`,
|
||
className: "min-h-0 flex-1 overflow-hidden",
|
||
}),
|
||
}),
|
||
f &&
|
||
!L &&
|
||
!X &&
|
||
(0, g.jsx)("div", {
|
||
className: "pointer-events-auto absolute right-2 top-2",
|
||
children: (0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: G,
|
||
className:
|
||
"flex h-8 w-8 min-w-8 shrink-0 items-center justify-center rounded-lg text-neutral-50 transition-colors hover:bg-white/10",
|
||
style: {
|
||
border: "0.5px solid rgba(255, 255, 255, 0.08)",
|
||
background: "rgba(31, 31, 31, 0.9)",
|
||
boxShadow:
|
||
"0 4px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.2)",
|
||
backdropFilter: "blur(16px)",
|
||
},
|
||
title: "下载视频",
|
||
children: (0, g.jsx)(y.Icons.download, {
|
||
className: "h-4 w-4",
|
||
}),
|
||
}),
|
||
}),
|
||
(0, g.jsx)(it.default, { nodeId: e, hasContent: f }),
|
||
],
|
||
});
|
||
});
|
||
(iO.displayName = "VideoClipNode"), e.s(["default", 0, iO], 616439);
|
||
var iF = e.i(791997),
|
||
iU = e.i(463672),
|
||
iB = e.i(386951),
|
||
iH = e.i(210550),
|
||
iz = e.i(395);
|
||
let iG = (0, b.memo)(function ({ item: e, onRegenerate: t }) {
|
||
let n = "done" === e.status && !!e.videoUrl,
|
||
i = "generating" === e.status,
|
||
r = "failed" === e.status,
|
||
a = "pending" === e.status,
|
||
o = (0, b.useCallback)(
|
||
(n) => {
|
||
n.stopPropagation(), t(e.id);
|
||
},
|
||
[e.id, t],
|
||
);
|
||
return (0, g.jsxs)("div", {
|
||
className: "flex flex-col overflow-hidden rounded-xl",
|
||
style: {
|
||
background: "rgba(255, 255, 255, 0.04)",
|
||
border: `1px solid ${r ? "rgba(239, 68, 68, 0.3)" : "rgba(255, 255, 255, 0.06)"}`,
|
||
},
|
||
children: [
|
||
(0, g.jsxs)("div", {
|
||
className:
|
||
"relative aspect-video w-full overflow-hidden bg-black/20",
|
||
children: [
|
||
(0, g.jsx)("div", {
|
||
className:
|
||
"absolute left-2 top-2 z-10 flex h-5 items-center gap-1 rounded-full px-1.5 text-[10px] font-semibold text-white",
|
||
style: { background: "rgba(0, 0, 0, 0.6)" },
|
||
children: (0, g.jsx)("span", { children: e.shotNumber }),
|
||
}),
|
||
(0, g.jsxs)("div", {
|
||
className: "absolute right-2 top-2 z-10",
|
||
children: [
|
||
i &&
|
||
(0, g.jsxs)("span", {
|
||
className:
|
||
"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-blue-300",
|
||
style: { background: "rgba(0, 0, 0, 0.6)" },
|
||
children: [
|
||
(0, g.jsx)(y.Icons.loader2, {
|
||
width: 10,
|
||
height: 10,
|
||
className: "animate-spin",
|
||
}),
|
||
"生成中",
|
||
],
|
||
}),
|
||
r &&
|
||
(0, g.jsx)("span", {
|
||
className:
|
||
"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-red-400",
|
||
style: { background: "rgba(0, 0, 0, 0.6)" },
|
||
children: "失败",
|
||
}),
|
||
a &&
|
||
(0, g.jsx)("span", {
|
||
className:
|
||
"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-white/50",
|
||
style: { background: "rgba(0, 0, 0, 0.6)" },
|
||
children: "待生成",
|
||
}),
|
||
],
|
||
}),
|
||
n &&
|
||
(0, g.jsx)("div", {
|
||
className:
|
||
"absolute inset-0 z-[5] flex items-center justify-center",
|
||
children: (0, g.jsx)("div", {
|
||
className:
|
||
"flex h-10 w-10 items-center justify-center rounded-full bg-black/50 text-white/80 backdrop-blur-sm",
|
||
children: (0, g.jsx)(y.Icons.play, {
|
||
width: 18,
|
||
height: 18,
|
||
className: "ml-0.5",
|
||
}),
|
||
}),
|
||
}),
|
||
e.metadata.durationSeconds > 0 &&
|
||
(0, g.jsxs)("div", {
|
||
className:
|
||
"absolute bottom-2 right-2 z-10 rounded px-1.5 py-0.5 text-[10px] tabular-nums text-white/80",
|
||
style: { background: "rgba(0, 0, 0, 0.6)" },
|
||
children: [e.metadata.durationSeconds.toFixed(1), "s"],
|
||
}),
|
||
n || e.posterUrl
|
||
? (0, g.jsx)(iz.default, {
|
||
src: (0, n8.getFasterImage)(e.posterUrl || e.videoUrl, {
|
||
width: 220,
|
||
}),
|
||
alt: `镜头 ${e.shotNumber}`,
|
||
className: "h-full w-full object-cover",
|
||
decoding: "async",
|
||
})
|
||
: i
|
||
? (0, g.jsxs)("div", {
|
||
className:
|
||
"flex h-full w-full flex-col items-center justify-center gap-2 text-blue-300/60",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.loader2, {
|
||
width: 28,
|
||
height: 28,
|
||
className: "animate-spin",
|
||
}),
|
||
(0, g.jsx)("span", {
|
||
className: "text-[10px]",
|
||
children: "生成中...",
|
||
}),
|
||
],
|
||
})
|
||
: r
|
||
? (0, g.jsxs)("div", {
|
||
className:
|
||
"flex h-full w-full flex-col items-center justify-center gap-2 text-red-400/60",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.circleAlert, {
|
||
width: 28,
|
||
height: 28,
|
||
}),
|
||
(0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: o,
|
||
className:
|
||
"nodrag rounded bg-red-500/20 px-2 py-1 text-[10px] text-red-300 transition-colors hover:bg-red-500/30",
|
||
children: "重新生成",
|
||
}),
|
||
],
|
||
})
|
||
: (0, g.jsxs)("div", {
|
||
className:
|
||
"flex h-full w-full flex-col items-center justify-center gap-1.5 text-white/20",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.VideoAddS, {
|
||
width: 28,
|
||
height: 28,
|
||
}),
|
||
(0, g.jsx)("span", {
|
||
className: "text-[10px]",
|
||
children: "待生成",
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
(0, g.jsxs)("div", {
|
||
className: "flex flex-col gap-1 px-2.5 pb-2 pt-1.5",
|
||
children: [
|
||
(0, g.jsx)("p", {
|
||
className:
|
||
"break-words text-[11px] leading-snug text-white/60",
|
||
style: {
|
||
display: "-webkit-box",
|
||
WebkitLineClamp: 2,
|
||
WebkitBoxOrient: "vertical",
|
||
overflow: "hidden",
|
||
},
|
||
title: e.prompt,
|
||
children: e.prompt || e.metadata.scene || "-",
|
||
}),
|
||
(0, g.jsxs)("div", {
|
||
className: "flex items-center justify-between pt-0.5",
|
||
children: [
|
||
(0, g.jsx)("span", {
|
||
className: "text-[9px] text-white/30",
|
||
children: e.metadata.cameraMovement || e.model || "默认",
|
||
}),
|
||
(n || r) &&
|
||
(0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: o,
|
||
className:
|
||
"nodrag flex items-center gap-0.5 rounded p-0.5 text-white/30 transition-colors hover:bg-white/10 hover:text-white/60",
|
||
title: "重新生成",
|
||
children: (0, g.jsx)(y.Icons.Refresh, {
|
||
width: 11,
|
||
height: 11,
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
});
|
||
}),
|
||
i$ = 220;
|
||
function iV({ viewMode: e, onViewModeChange: t, isCanvasLight: n }) {
|
||
return (0, g.jsxs)("div", {
|
||
className: (0, nZ.cn)(
|
||
"nodrag flex items-center rounded-lg",
|
||
n ? "bg-black/5" : "bg-white/5",
|
||
),
|
||
children: [
|
||
(0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: () => t("grid"),
|
||
className: (0, nZ.cn)(
|
||
"flex items-center justify-center rounded-l-lg px-2 py-1 transition-colors",
|
||
n
|
||
? "grid" === e
|
||
? "bg-black/10 text-neutral-900"
|
||
: "text-neutral-500 hover:text-neutral-800"
|
||
: "grid" === e
|
||
? "bg-white/15 text-white"
|
||
: "text-white/40 hover:text-white/60",
|
||
),
|
||
title: "网格视图",
|
||
children: (0, g.jsx)(y.Icons.layoutGrid, { width: 14, height: 14 }),
|
||
}),
|
||
(0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: () => t("list"),
|
||
className: (0, nZ.cn)(
|
||
"flex items-center justify-center rounded-r-lg px-2 py-1 transition-colors",
|
||
n
|
||
? "list" === e
|
||
? "bg-black/10 text-neutral-900"
|
||
: "text-neutral-500 hover:text-neutral-800"
|
||
: "list" === e
|
||
? "bg-white/15 text-white"
|
||
: "text-white/40 hover:text-white/60",
|
||
),
|
||
title: "列表视图",
|
||
children: (0, g.jsx)(y.Icons.list, { width: 14, height: 14 }),
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
function iW({ stats: e, isCanvasLight: t }) {
|
||
return (0, g.jsxs)("div", {
|
||
className: "flex items-center gap-2 text-[10px]",
|
||
children: [
|
||
(0, g.jsxs)("span", {
|
||
className: t ? "text-neutral-400" : "text-white/30",
|
||
children: [e.total, " 个"],
|
||
}),
|
||
e.done > 0 &&
|
||
(0, g.jsxs)("span", {
|
||
className: "text-green-600/90",
|
||
children: [e.done, " 完成"],
|
||
}),
|
||
e.generating > 0 &&
|
||
(0, g.jsxs)("span", {
|
||
className: "text-blue-600/90",
|
||
children: [e.generating, " 生成中"],
|
||
}),
|
||
e.pending > 0 &&
|
||
(0, g.jsxs)("span", {
|
||
className: t ? "text-neutral-500" : "text-white/40",
|
||
children: [e.pending, " 待生成"],
|
||
}),
|
||
e.failed > 0 &&
|
||
(0, g.jsxs)("span", {
|
||
className: "text-red-500/90",
|
||
children: [e.failed, " 失败"],
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
let iK = (0, b.memo)(function ({ id: e, selected: t }) {
|
||
let n = (0, A.useCanvasStore)((t) => t.getNode(e)?.data),
|
||
i = (0, A.useCanvasStore)((e) => e.updateNodeData),
|
||
r = (0, A.useCanvasStore)((e) => e.isReadonly),
|
||
a = "light" === (0, iF.useCanvasThemeStore)((e) => e.theme),
|
||
{
|
||
isConnectionTarget: o,
|
||
isConnectionBlocked: s,
|
||
isConnectionInvalid: c,
|
||
nodeHovered: l,
|
||
onNodeMouseEnter: u,
|
||
onNodeMouseLeave: h,
|
||
tiltStyle: f,
|
||
handleTiltMove: d,
|
||
} = (0, iB.useConnection3DTilt)(e),
|
||
p = !!t || l,
|
||
{
|
||
isFullScreen: m,
|
||
openFullScreen: w,
|
||
closeFullScreen: x,
|
||
} = (0, U.useNodeFullScreen)(),
|
||
_ = (0, b.useMemo)(() => n?.items ?? [], [n?.items]),
|
||
S = n?.viewMode ?? "grid",
|
||
E = n?.nodeWidth ?? 900,
|
||
M = n?.nodeHeight ?? 500,
|
||
k = n?.title ?? "视频组",
|
||
C = (0, b.useMemo)(
|
||
() =>
|
||
(function (e) {
|
||
let t = {
|
||
total: e.length,
|
||
done: 0,
|
||
generating: 0,
|
||
pending: 0,
|
||
failed: 0,
|
||
};
|
||
for (let n of e) t[n.status]++;
|
||
return t;
|
||
})(_),
|
||
[_],
|
||
),
|
||
N = (0, b.useCallback)((t) => i(e, { title: t, name: t }), [e, i]),
|
||
I = (0, b.useCallback)(
|
||
(t) => {
|
||
i(e, { viewMode: t });
|
||
},
|
||
[e, i],
|
||
),
|
||
P = (0, b.useCallback)(
|
||
(t, n) => {
|
||
i(e, { nodeWidth: n.width, nodeHeight: n.height });
|
||
},
|
||
[e, i],
|
||
),
|
||
R = (0, b.useCallback)(
|
||
(e) => {
|
||
e.stopPropagation(), w();
|
||
},
|
||
[w],
|
||
),
|
||
L = (0, b.useCallback)(
|
||
(t) => {
|
||
r ||
|
||
i(e, {
|
||
items: _.map((e) =>
|
||
e.id === t
|
||
? { ...e, status: "pending", videoUrl: "", taskId: void 0 }
|
||
: e,
|
||
),
|
||
});
|
||
},
|
||
[e, _, i, r],
|
||
),
|
||
D = (0, b.useCallback)(() => {
|
||
r ||
|
||
i(e, {
|
||
items: _.map((e) => ({
|
||
...e,
|
||
status: "pending",
|
||
videoUrl: "",
|
||
taskId: void 0,
|
||
})),
|
||
});
|
||
}, [e, _, i, r]),
|
||
j = (0, b.useCallback)(
|
||
(e = i$) =>
|
||
0 === _.length
|
||
? (0, g.jsx)("div", {
|
||
className: "flex h-full w-full items-center justify-center",
|
||
children: (0, g.jsxs)("div", {
|
||
className: "flex flex-col items-center gap-3 text-white/30",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.VideoAddS, { width: 48, height: 48 }),
|
||
(0, g.jsx)("span", {
|
||
className: "text-sm",
|
||
children: "暂无视频",
|
||
}),
|
||
],
|
||
}),
|
||
})
|
||
: (0, g.jsx)("div", {
|
||
style: { padding: `${T.GRID_PADDING}px` },
|
||
children: (0, g.jsx)("div", {
|
||
className: "grid",
|
||
style: {
|
||
gridTemplateColumns: `repeat(auto-fill, ${e}px)`,
|
||
gap: `${T.GRID_GAP}px`,
|
||
justifyContent: "start",
|
||
},
|
||
children: _.map((e) =>
|
||
(0, g.jsx)(iG, { item: e, onRegenerate: L }, e.id),
|
||
),
|
||
}),
|
||
}),
|
||
[_, L],
|
||
);
|
||
return (0, g.jsxs)(g.Fragment, {
|
||
children: [
|
||
(0, g.jsx)(v.NodeResizer, {
|
||
isVisible: !!t,
|
||
minWidth: 500,
|
||
minHeight: 300,
|
||
onResizeEnd: P,
|
||
lineStyle: {
|
||
borderColor: t
|
||
? "var(--canvas-node-border-selected)"
|
||
: "transparent",
|
||
},
|
||
handleStyle: {
|
||
width: 8,
|
||
height: 8,
|
||
borderRadius: 2,
|
||
backgroundColor: "var(--canvas-node-border-selected)",
|
||
border: "none",
|
||
},
|
||
}),
|
||
(0, g.jsxs)("div", {
|
||
className: "node-shell flex flex-col overflow-hidden rounded-xl",
|
||
"data-nodeid": e,
|
||
style: {
|
||
width: `${E}px`,
|
||
height: `${M}px`,
|
||
background: "var(--Surface-Panel-background, #171717)",
|
||
border: "1px solid var(--canvas-node-border)",
|
||
outline: t
|
||
? "2px solid var(--canvas-node-border-selected)"
|
||
: "none",
|
||
outlineOffset: "-1px",
|
||
...f,
|
||
},
|
||
onMouseEnter: u,
|
||
onMouseLeave: h,
|
||
onMouseMove: d,
|
||
children: [
|
||
(0, g.jsx)(iH.TargetHandle, { visible: p }),
|
||
(0, g.jsx)(iB.default, { active: o, invalid: c }),
|
||
(0, g.jsx)(iB.NodeFrostedOverlay, { active: s || c }),
|
||
(0, g.jsxs)("div", {
|
||
className:
|
||
"flex shrink-0 items-center justify-between border-b border-white/10 px-3",
|
||
style: { height: "40px" },
|
||
onDoubleClick: R,
|
||
children: [
|
||
(0, g.jsxs)("div", {
|
||
className: "flex items-center gap-2",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.VideoAddS, {
|
||
width: 14,
|
||
height: 14,
|
||
className: "shrink-0 text-purple-400/60",
|
||
}),
|
||
(0, g.jsx)(iU.default, {
|
||
nodeId: e,
|
||
label: k,
|
||
onLabelChange: N,
|
||
readOnly: r,
|
||
variant: "inline",
|
||
}),
|
||
(0, g.jsx)(iW, { stats: C }),
|
||
],
|
||
}),
|
||
(0, g.jsxs)("div", {
|
||
className: "flex items-center gap-1",
|
||
children: [
|
||
!r &&
|
||
_.length > 0 &&
|
||
(0, g.jsxs)("button", {
|
||
type: "button",
|
||
onClick: D,
|
||
className:
|
||
"nodrag flex items-center gap-1 rounded-md px-2 py-1 text-xs text-white/50 transition-colors hover:bg-white/10 hover:text-white/70",
|
||
title: "全部重新生成",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.Refresh, {
|
||
width: 12,
|
||
height: 12,
|
||
}),
|
||
(0, g.jsx)("span", { children: "全部重生" }),
|
||
],
|
||
}),
|
||
(0, g.jsx)(iV, { viewMode: S, onViewModeChange: I }),
|
||
(0, g.jsx)("button", {
|
||
type: "button",
|
||
onClick: w,
|
||
className:
|
||
"nodrag flex items-center justify-center rounded-md p-1.5 text-white/50 transition-colors hover:bg-white/10 hover:text-white/80",
|
||
title: "全屏展开",
|
||
children: (0, g.jsx)(y.Icons.BroadPicture, {
|
||
width: 16,
|
||
height: 16,
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
(0, g.jsx)("div", {
|
||
className: "nodrag tiny-scrollbar min-h-0 flex-1 overflow-auto",
|
||
onDoubleClick: R,
|
||
children: j(),
|
||
}),
|
||
(0, g.jsx)(iH.SourceHandle, { visible: p }),
|
||
],
|
||
}),
|
||
(0, g.jsx)(U.NodeFullScreenOverlay, {
|
||
open: m,
|
||
onClose: x,
|
||
title: k,
|
||
headerExtra: (0, g.jsxs)("div", {
|
||
className: "flex items-center gap-3",
|
||
children: [
|
||
(0, g.jsx)(iW, { stats: C, isCanvasLight: a }),
|
||
!r &&
|
||
_.length > 0 &&
|
||
(0, g.jsxs)("button", {
|
||
type: "button",
|
||
onClick: D,
|
||
className: (0, nZ.cn)(
|
||
"flex items-center gap-1 rounded-md px-2 py-1 text-xs transition-colors",
|
||
a
|
||
? "text-neutral-600 hover:bg-black/5 hover:text-neutral-900"
|
||
: "text-white/50 hover:bg-white/10 hover:text-white/70",
|
||
),
|
||
title: "全部重新生成",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.Refresh, { width: 12, height: 12 }),
|
||
(0, g.jsx)("span", { children: "全部重生" }),
|
||
],
|
||
}),
|
||
(0, g.jsx)(iV, {
|
||
viewMode: S,
|
||
onViewModeChange: I,
|
||
isCanvasLight: a,
|
||
}),
|
||
],
|
||
}),
|
||
children: (0, g.jsx)("div", {
|
||
className:
|
||
"tiny-scrollbar min-h-0 flex-1 overflow-auto px-6 pb-4 pt-2",
|
||
children: j(260),
|
||
}),
|
||
}),
|
||
],
|
||
});
|
||
});
|
||
(iK.displayName = "VideoGroupNode"), e.s(["default", 0, iK], 39676);
|
||
let iq = /\.(jpg|jpeg|png|gif|webp|bmp|svg)(\?|$)/i;
|
||
function iX(e) {
|
||
return "string" == typeof e && e.startsWith("http") && iq.test(e);
|
||
}
|
||
let iY = new Set([
|
||
"visual_description",
|
||
"content",
|
||
"focal_depth",
|
||
"lighting",
|
||
]),
|
||
iJ = (e) =>
|
||
null == e
|
||
? ""
|
||
: "string" == typeof e ||
|
||
"number" == typeof e ||
|
||
"boolean" == typeof e
|
||
? String(e)
|
||
: JSON.stringify(e),
|
||
iZ = (0, b.memo)(function ({ id: e, selected: t }) {
|
||
let n = (0, A.useCanvasStore)((t) => t.getNode(e)?.data),
|
||
i = (0, A.useCanvasStore)((e) => e.updateNodeData),
|
||
{
|
||
isFullScreen: r,
|
||
openFullScreen: a,
|
||
closeFullScreen: o,
|
||
} = (0, U.useNodeFullScreen)(),
|
||
s = (0, F.useNodeWheelCapture)(!!t),
|
||
c = n?.title || n?.name || n?.label || "视频故事",
|
||
l = (0, b.useCallback)((t) => i(e, { name: t, title: t }), [e, i]),
|
||
{
|
||
isConnectionTarget: u,
|
||
isConnectionBlocked: h,
|
||
isConnectionInvalid: f,
|
||
nodeHovered: d,
|
||
onNodeMouseEnter: p,
|
||
onNodeMouseLeave: m,
|
||
tiltStyle: w,
|
||
handleTiltMove: v,
|
||
} = (0, iB.useConnection3DTilt)(e),
|
||
x = n?.rows ?? [],
|
||
_ = x.length > 0,
|
||
S = n?.nodeWidth || 800,
|
||
E = n?.nodeHeight || 400,
|
||
M = n?.shotColumns,
|
||
T = (0, b.useMemo)(() => {
|
||
let e = new Map();
|
||
return M?.length && M.forEach((t) => e.set(t.field, t.label)), e;
|
||
}, [M]),
|
||
k = (0, b.useMemo)(() => {
|
||
if (!x.length) return [];
|
||
let e = new Set();
|
||
return (
|
||
x.forEach((t) => Object.keys(t).forEach((t) => e.add(t))),
|
||
Array.from(e)
|
||
);
|
||
}, [x]),
|
||
C = (0, b.useCallback)(
|
||
() =>
|
||
(0, g.jsxs)("table", {
|
||
className: "w-full border-collapse",
|
||
style: { minWidth: 140 * k.length },
|
||
children: [
|
||
(0, g.jsx)("thead", {
|
||
className: "sticky top-0 z-10",
|
||
children: (0, g.jsx)("tr", {
|
||
children: k.map((e) => {
|
||
let t = iX(x[0]?.[e]),
|
||
n = iY.has(e);
|
||
return (0, g.jsx)(
|
||
"th",
|
||
{
|
||
className:
|
||
"text-fg-on-emphasis select-none border border-white/10 px-2 py-1.5 text-left text-[11px] font-medium opacity-50",
|
||
style: {
|
||
width: t ? 90 : n ? 200 : 140,
|
||
background: "var(--color-neutral-900)",
|
||
},
|
||
children: T.get(e) ?? e,
|
||
},
|
||
e,
|
||
);
|
||
}),
|
||
}),
|
||
}),
|
||
(0, g.jsx)("tbody", {
|
||
children: x.map((e) =>
|
||
(0, g.jsx)(
|
||
"tr",
|
||
{
|
||
className: "hover:bg-canvas-controls-hover",
|
||
children: k.map((t) => {
|
||
let n = e[t];
|
||
if (iX(n))
|
||
return (0, g.jsx)(
|
||
"td",
|
||
{
|
||
className:
|
||
"border-border-muted border align-middle",
|
||
style: { width: 90 },
|
||
children: (0, g.jsx)("div", {
|
||
className:
|
||
"flex h-full w-full items-center justify-center p-1",
|
||
children: (0, g.jsx)(iz.default, {
|
||
src: (0, n8.getFasterImage)(n, {
|
||
width: 120,
|
||
}),
|
||
alt: t,
|
||
className: "h-full w-full object-cover",
|
||
iconSize: 16,
|
||
}),
|
||
}),
|
||
},
|
||
t,
|
||
);
|
||
let i = iJ(n);
|
||
return (0, g.jsx)(
|
||
"td",
|
||
{
|
||
className:
|
||
"border-border-muted border align-top",
|
||
children: i
|
||
? (0, g.jsx)("textarea", {
|
||
readOnly: !0,
|
||
value: i,
|
||
className:
|
||
"nodrag nowheel tiny-scrollbar text-fg-default wrap-break-word w-full resize-none border-none bg-transparent p-1 text-xs outline-none",
|
||
style: {
|
||
maxHeight: 120,
|
||
overflowY: "auto",
|
||
},
|
||
rows: 3,
|
||
})
|
||
: (0, g.jsx)("div", {
|
||
className: "text-fg-disabled p-1 text-xs",
|
||
children: "-",
|
||
}),
|
||
},
|
||
t,
|
||
);
|
||
}),
|
||
},
|
||
iJ(e.shotNumber ?? e.hiddenUuid ?? e.uuid ?? e),
|
||
),
|
||
),
|
||
}),
|
||
],
|
||
}),
|
||
[x, k, T],
|
||
);
|
||
return (0, g.jsxs)("div", {
|
||
className: "flex flex-col",
|
||
style: { width: S, height: E },
|
||
children: [
|
||
(0, g.jsxs)("div", {
|
||
ref: s,
|
||
className:
|
||
"node-shell relative flex h-full flex-col overflow-hidden rounded-xl",
|
||
"data-nodeid": e,
|
||
style: {
|
||
background: "var(--Surface-Panel-background)",
|
||
border: "1px solid var(--canvas-node-border)",
|
||
outline: t
|
||
? "2px solid var(--canvas-node-border-selected)"
|
||
: "none",
|
||
outlineOffset: "-1px",
|
||
...w,
|
||
},
|
||
onMouseEnter: p,
|
||
onMouseLeave: m,
|
||
onMouseMove: v,
|
||
children: [
|
||
(0, g.jsx)(iH.TargetHandle, { visible: !!t || d }),
|
||
(0, g.jsx)(iB.default, { active: u, invalid: f }),
|
||
(0, g.jsx)(iB.NodeFrostedOverlay, { active: h || f }),
|
||
(0, g.jsxs)("div", {
|
||
className:
|
||
"border-border-muted flex h-9 shrink-0 cursor-grab items-center gap-2 border-b px-3 active:cursor-grabbing",
|
||
children: [
|
||
(0, g.jsx)(y.Icons.Imageset, {
|
||
className: "h-4 w-4 shrink-0 text-purple-400",
|
||
}),
|
||
(0, g.jsx)(iU.default, {
|
||
nodeId: e,
|
||
label: c,
|
||
onLabelChange: l,
|
||
variant: "inline",
|
||
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
||
textClassName: "text-[13px] text-fg-muted",
|
||
}),
|
||
_ &&
|
||
(0, g.jsx)("button", {
|
||
type: "button",
|
||
className:
|
||
"text-fg-muted hover:bg-canvas-controls-hover hover:text-fg-default shrink-0 rounded p-0.5 transition-colors",
|
||
onClick: a,
|
||
children: (0, g.jsx)(y.Icons.maximize2, {
|
||
className: "h-3.5 w-3.5",
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
(0, g.jsx)("div", {
|
||
className: `nodrag tiny-scrollbar flex-1 overflow-auto${t ? " nowheel cursor-default" : ""}`,
|
||
children: _
|
||
? C()
|
||
: (0, g.jsx)("div", {
|
||
className:
|
||
"text-fg-disabled flex h-full items-center justify-center text-sm",
|
||
children: "暂无数据",
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
(0, g.jsx)(U.NodeFullScreenOverlay, {
|
||
open: r,
|
||
onClose: o,
|
||
title: c,
|
||
children: (0, g.jsx)("div", {
|
||
className: "flex h-full flex-col overflow-auto p-2",
|
||
children: _ && C(),
|
||
}),
|
||
}),
|
||
],
|
||
});
|
||
});
|
||
(iZ.displayName = "VideoStoryNode"), e.s(["default", 0, iZ], 411664);
|
||
var iQ = e.i(23741),
|
||
i1 = e.i(168161);
|
||
let i0 = void 0 !== iQ.default && !1,
|
||
i2 = {
|
||
poolHits: 0,
|
||
warmCount: 0,
|
||
warmLatencies: [],
|
||
getP50() {
|
||
return i3(this.warmLatencies, 0.5);
|
||
},
|
||
getP95() {
|
||
return i3(this.warmLatencies, 0.95);
|
||
},
|
||
reset() {
|
||
(this.poolHits = 0), (this.warmCount = 0), (this.warmLatencies = []);
|
||
},
|
||
};
|
||
function i3(e, t) {
|
||
if (0 === e.length) return 0;
|
||
let n = [...e].sort((e, t) => e - t),
|
||
i = Math.ceil(n.length * t) - 1;
|
||
return n[Math.max(0, i)];
|
||
}
|
||
function i4(e, t) {
|
||
i0 && console.debug(`[tier-commit] ${e}`, t);
|
||
}
|
||
function i5(e, t) {
|
||
let n = e ?? null,
|
||
[i, r] = (0, b.useState)(n),
|
||
a = (0, b.useRef)(n),
|
||
o = (0, b.useRef)(null),
|
||
s = (0, b.useRef)(t),
|
||
c = (0, b.useRef)(0);
|
||
return (
|
||
(0, b.useEffect)(() => {
|
||
let e = t !== s.current;
|
||
if (((s.current = t), !n)) {
|
||
(a.current = null), r(null), (o.current = null);
|
||
return;
|
||
}
|
||
if (n === a.current) return;
|
||
let i = i1.imgPool.tryAcquire(n);
|
||
if (i) {
|
||
let e = i.complete && i.naturalWidth > 0;
|
||
if ((i1.imgPool.release(i), e)) {
|
||
i2.poolHits++,
|
||
i4("poolHit", { target: n.slice(-60) }),
|
||
(a.current = n),
|
||
r(n),
|
||
(o.current = null);
|
||
return;
|
||
}
|
||
}
|
||
if (!a.current || e) {
|
||
(a.current = n), r(n), (o.current = null);
|
||
return;
|
||
}
|
||
if (o.current === n) return;
|
||
(o.current = n),
|
||
(c.current = performance.now()),
|
||
i4("tierWarmStart", { target: n.slice(-60) });
|
||
let l = !1,
|
||
u = new Image();
|
||
function h() {
|
||
if (((u.onload = null), (u.onerror = null), l || o.current !== n))
|
||
return;
|
||
let e = Math.round(performance.now() - c.current);
|
||
i2.warmCount++,
|
||
i2.warmLatencies.push(e),
|
||
u.complete && u.naturalWidth > 0
|
||
? (i1.imgPool.release(u, n),
|
||
i4("tierWarmReady", { target: n.slice(-60), latency: e }))
|
||
: i4("tierWarmFallback", { target: n.slice(-60), latency: e }),
|
||
(a.current = n),
|
||
r(n),
|
||
(o.current = null);
|
||
}
|
||
return (
|
||
(u.decoding = "async"),
|
||
(u.src = n),
|
||
u.complete && u.naturalWidth > 0
|
||
? h()
|
||
: ((u.onload = h),
|
||
(u.onerror = function () {
|
||
(u.onload = null),
|
||
(u.onerror = null),
|
||
l ||
|
||
o.current !== n ||
|
||
(i4("tierWarmError", { target: n.slice(-60) }),
|
||
(o.current = null));
|
||
})),
|
||
() => {
|
||
(l = !0),
|
||
o.current === n && (o.current = null),
|
||
(u.onload = null),
|
||
(u.onerror = null);
|
||
}
|
||
);
|
||
}, [n, t]),
|
||
i
|
||
);
|
||
}
|
||
i0 && (window.__tierCommitStats = i2),
|
||
e.s(["useTierCommit", () => i5], 457044);
|
||
};
|
||
|
||
export default moduleFactory;
|