@kong-ui-public/entities-plugins 9.210.4 → 9.210.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-plugins.es.js +10485 -10392
- package/dist/entities-plugins.umd.js +116 -116
- package/dist/filler/cypress/index.js +1 -1
- package/dist/filler/{field-walker-DMJsTz2L.js → field-walker-GKhLVBvo.js} +1040 -947
- package/dist/filler/playwright/index.js +1 -1
- package/package.json +17 -17
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { get as
|
|
5
|
-
const
|
|
1
|
+
var ns = Object.defineProperty;
|
|
2
|
+
var rs = (t, e, n) => e in t ? ns(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var A = (t, e, n) => rs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { get as ss } from "lodash-es";
|
|
5
|
+
const fo = {
|
|
6
6
|
// Common
|
|
7
7
|
field: (t) => `[data-testid="ff-${t}"]`,
|
|
8
8
|
label: (t) => `[data-testid="ff-label-${t}"]`,
|
|
@@ -42,46 +42,46 @@ const oo = {
|
|
|
42
42
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
43
43
|
* @license MIT
|
|
44
44
|
**/
|
|
45
|
-
const
|
|
45
|
+
const Jt = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
46
46
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
47
|
-
const
|
|
48
|
-
},
|
|
49
|
-
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97),
|
|
50
|
-
let
|
|
51
|
-
const
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
47
|
+
const ar = () => {
|
|
48
|
+
}, is = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
|
|
49
|
+
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), os = (t) => t.startsWith("onUpdate:"), Tt = Object.assign, re = Array.isArray, pe = (t) => typeof t == "function", ue = (t) => typeof t == "string", ls = (t) => typeof t == "symbol", be = (t) => t !== null && typeof t == "object";
|
|
50
|
+
let Bn;
|
|
51
|
+
const kt = () => Bn || (Bn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
52
|
+
function ln(t) {
|
|
53
|
+
if (re(t)) {
|
|
54
54
|
const e = {};
|
|
55
55
|
for (let n = 0; n < t.length; n++) {
|
|
56
|
-
const r = t[n], s =
|
|
56
|
+
const r = t[n], s = ue(r) ? fs(r) : ln(r);
|
|
57
57
|
if (s)
|
|
58
58
|
for (const i in s)
|
|
59
59
|
e[i] = s[i];
|
|
60
60
|
}
|
|
61
61
|
return e;
|
|
62
|
-
} else if (
|
|
62
|
+
} else if (ue(t) || be(t))
|
|
63
63
|
return t;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const as = /;(?![^(]*\))/g, cs = /:([^]+)/, us = /\/\*[^]*?\*\//g;
|
|
66
|
+
function fs(t) {
|
|
67
67
|
const e = {};
|
|
68
|
-
return t.replace(
|
|
68
|
+
return t.replace(us, "").split(as).forEach((n) => {
|
|
69
69
|
if (n) {
|
|
70
|
-
const r = n.split(
|
|
70
|
+
const r = n.split(cs);
|
|
71
71
|
r.length > 1 && (e[r[0].trim()] = r[1].trim());
|
|
72
72
|
}
|
|
73
73
|
}), e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function an(t) {
|
|
76
76
|
let e = "";
|
|
77
|
-
if (
|
|
77
|
+
if (ue(t))
|
|
78
78
|
e = t;
|
|
79
|
-
else if (
|
|
79
|
+
else if (re(t))
|
|
80
80
|
for (let n = 0; n < t.length; n++) {
|
|
81
|
-
const r =
|
|
81
|
+
const r = an(t[n]);
|
|
82
82
|
r && (e += r + " ");
|
|
83
83
|
}
|
|
84
|
-
else if (
|
|
84
|
+
else if (be(t))
|
|
85
85
|
for (const n in t)
|
|
86
86
|
t[n] && (e += n + " ");
|
|
87
87
|
return e.trim();
|
|
@@ -95,70 +95,70 @@ process.env.NODE_ENV;
|
|
|
95
95
|
process.env.NODE_ENV;
|
|
96
96
|
process.env.NODE_ENV;
|
|
97
97
|
new Set(
|
|
98
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(
|
|
98
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(ls)
|
|
99
99
|
);
|
|
100
100
|
// @__NO_SIDE_EFFECTS__
|
|
101
|
-
function
|
|
102
|
-
return /* @__PURE__ */
|
|
101
|
+
function cr(t) {
|
|
102
|
+
return /* @__PURE__ */ en(t) ? /* @__PURE__ */ cr(t.__v_raw) : !!(t && t.__v_isReactive);
|
|
103
103
|
}
|
|
104
104
|
// @__NO_SIDE_EFFECTS__
|
|
105
|
-
function
|
|
105
|
+
function en(t) {
|
|
106
106
|
return !!(t && t.__v_isReadonly);
|
|
107
107
|
}
|
|
108
108
|
// @__NO_SIDE_EFFECTS__
|
|
109
|
-
function
|
|
109
|
+
function Vt(t) {
|
|
110
110
|
return !!(t && t.__v_isShallow);
|
|
111
111
|
}
|
|
112
112
|
// @__NO_SIDE_EFFECTS__
|
|
113
|
-
function
|
|
113
|
+
function tn(t) {
|
|
114
114
|
return t ? !!t.__v_raw : !1;
|
|
115
115
|
}
|
|
116
116
|
// @__NO_SIDE_EFFECTS__
|
|
117
|
-
function
|
|
117
|
+
function ye(t) {
|
|
118
118
|
const e = t && t.__v_raw;
|
|
119
|
-
return e ? /* @__PURE__ */
|
|
119
|
+
return e ? /* @__PURE__ */ ye(e) : t;
|
|
120
120
|
}
|
|
121
121
|
// @__NO_SIDE_EFFECTS__
|
|
122
|
-
function
|
|
122
|
+
function wt(t) {
|
|
123
123
|
return t ? t.__v_isRef === !0 : !1;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return /* @__PURE__ */
|
|
125
|
+
function ps(t) {
|
|
126
|
+
return /* @__PURE__ */ wt(t) ? t.value : t;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
return
|
|
128
|
+
function hs(t) {
|
|
129
|
+
return pe(t) ? t() : ps(t);
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
132
|
* @vue/runtime-core v3.5.34
|
|
133
133
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
134
134
|
* @license MIT
|
|
135
135
|
**/
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
function
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
let
|
|
144
|
-
function
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
const n =
|
|
136
|
+
const _e = [];
|
|
137
|
+
function ds(t) {
|
|
138
|
+
_e.push(t);
|
|
139
|
+
}
|
|
140
|
+
function ms() {
|
|
141
|
+
_e.pop();
|
|
142
|
+
}
|
|
143
|
+
let Wt = !1;
|
|
144
|
+
function Pe(t, ...e) {
|
|
145
|
+
if (Wt) return;
|
|
146
|
+
Wt = !0;
|
|
147
|
+
const n = _e.length ? _e[_e.length - 1].component : null, r = n && n.appContext.config.warnHandler, s = gs();
|
|
148
148
|
if (r)
|
|
149
|
-
|
|
149
|
+
cn(
|
|
150
150
|
r,
|
|
151
151
|
n,
|
|
152
152
|
11,
|
|
153
153
|
[
|
|
154
154
|
// eslint-disable-next-line no-restricted-syntax
|
|
155
155
|
t + e.map((i) => {
|
|
156
|
-
var
|
|
157
|
-
return (a = (
|
|
156
|
+
var l, a;
|
|
157
|
+
return (a = (l = i.toString) == null ? void 0 : l.call(i)) != null ? a : JSON.stringify(i);
|
|
158
158
|
}).join(""),
|
|
159
159
|
n && n.proxy,
|
|
160
160
|
s.map(
|
|
161
|
-
({ vnode: i }) => `at <${
|
|
161
|
+
({ vnode: i }) => `at <${xr(n, i.type)}>`
|
|
162
162
|
).join(`
|
|
163
163
|
`),
|
|
164
164
|
s
|
|
@@ -167,12 +167,12 @@ function Ne(t, ...e) {
|
|
|
167
167
|
else {
|
|
168
168
|
const i = [`[Vue warn]: ${t}`, ...e];
|
|
169
169
|
s.length && i.push(`
|
|
170
|
-
`, ...
|
|
170
|
+
`, ...bs(s)), console.warn(...i);
|
|
171
171
|
}
|
|
172
|
-
|
|
172
|
+
Wt = !1;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
let t =
|
|
174
|
+
function gs() {
|
|
175
|
+
let t = _e[_e.length - 1];
|
|
176
176
|
if (!t)
|
|
177
177
|
return [];
|
|
178
178
|
const e = [];
|
|
@@ -187,31 +187,31 @@ function fs() {
|
|
|
187
187
|
}
|
|
188
188
|
return e;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function bs(t) {
|
|
191
191
|
const e = [];
|
|
192
192
|
return t.forEach((n, r) => {
|
|
193
193
|
e.push(...r === 0 ? [] : [`
|
|
194
|
-
`], ...
|
|
194
|
+
`], ...ys(n));
|
|
195
195
|
}), e;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
const n = e > 0 ? `... (${e} recursive calls)` : "", r = t.component ? t.component.parent == null : !1, s = ` at <${
|
|
197
|
+
function ys({ vnode: t, recurseCount: e }) {
|
|
198
|
+
const n = e > 0 ? `... (${e} recursive calls)` : "", r = t.component ? t.component.parent == null : !1, s = ` at <${xr(
|
|
199
199
|
t.component,
|
|
200
200
|
t.type,
|
|
201
201
|
r
|
|
202
202
|
)}`, i = ">" + n;
|
|
203
|
-
return t.props ? [s, ...
|
|
203
|
+
return t.props ? [s, ..._s(t.props), i] : [s + i];
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function _s(t) {
|
|
206
206
|
const e = [], n = Object.keys(t);
|
|
207
207
|
return n.slice(0, 3).forEach((r) => {
|
|
208
|
-
e.push(...
|
|
208
|
+
e.push(...ur(r, t[r]));
|
|
209
209
|
}), n.length > 3 && e.push(" ..."), e;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
return
|
|
211
|
+
function ur(t, e, n) {
|
|
212
|
+
return ue(e) ? (e = JSON.stringify(e), n ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? n ? e : [`${t}=${e}`] : /* @__PURE__ */ wt(e) ? (e = ur(t, /* @__PURE__ */ ye(e.value), !0), n ? e : [`${t}=Ref<`, e, ">"]) : pe(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = /* @__PURE__ */ ye(e), n ? e : [`${t}=`, e]);
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const fr = {
|
|
215
215
|
sp: "serverPrefetch hook",
|
|
216
216
|
bc: "beforeCreate hook",
|
|
217
217
|
c: "created hook",
|
|
@@ -244,18 +244,18 @@ const ir = {
|
|
|
244
244
|
15: "component update",
|
|
245
245
|
16: "app unmount cleanup function"
|
|
246
246
|
};
|
|
247
|
-
function
|
|
247
|
+
function cn(t, e, n, r) {
|
|
248
248
|
try {
|
|
249
249
|
return r ? t(...r) : t();
|
|
250
250
|
} catch (s) {
|
|
251
|
-
|
|
251
|
+
pr(s, e, n);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const s = e ? e.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction:
|
|
254
|
+
function pr(t, e, n, r = !0) {
|
|
255
|
+
const s = e ? e.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: l } = e && e.appContext.config || Jt;
|
|
256
256
|
if (e) {
|
|
257
257
|
let a = e.parent;
|
|
258
|
-
const c = e.proxy, h = process.env.NODE_ENV !== "production" ?
|
|
258
|
+
const c = e.proxy, h = process.env.NODE_ENV !== "production" ? fr[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
|
|
259
259
|
for (; a; ) {
|
|
260
260
|
const p = a.ec;
|
|
261
261
|
if (p) {
|
|
@@ -266,7 +266,7 @@ function or(t, e, n, r = !0) {
|
|
|
266
266
|
a = a.parent;
|
|
267
267
|
}
|
|
268
268
|
if (i) {
|
|
269
|
-
|
|
269
|
+
cn(i, null, 10, [
|
|
270
270
|
t,
|
|
271
271
|
c,
|
|
272
272
|
h
|
|
@@ -274,12 +274,12 @@ function or(t, e, n, r = !0) {
|
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
Ts(t, n, s, r, l);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Ts(t, e, n, r = !0, s = !1) {
|
|
280
280
|
if (process.env.NODE_ENV !== "production") {
|
|
281
|
-
const i =
|
|
282
|
-
if (n &&
|
|
281
|
+
const i = fr[e];
|
|
282
|
+
if (n && ds(n), Pe(`Unhandled error${i ? ` during execution of ${i}` : ""}`), n && ms(), r)
|
|
283
283
|
throw t;
|
|
284
284
|
console.error(t);
|
|
285
285
|
} else {
|
|
@@ -288,61 +288,61 @@ function ms(t, e, n, r = !0, s = !1) {
|
|
|
288
288
|
console.error(t);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
const
|
|
292
|
-
let
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
const
|
|
296
|
-
let
|
|
297
|
-
const
|
|
298
|
-
function
|
|
299
|
-
let e =
|
|
291
|
+
const W = [];
|
|
292
|
+
let ie = -1;
|
|
293
|
+
const $e = [];
|
|
294
|
+
let ce = null, Ce = 0;
|
|
295
|
+
const ks = /* @__PURE__ */ Promise.resolve();
|
|
296
|
+
let nn = null;
|
|
297
|
+
const ws = 100;
|
|
298
|
+
function Es(t) {
|
|
299
|
+
let e = ie + 1, n = W.length;
|
|
300
300
|
for (; e < n; ) {
|
|
301
|
-
const r = e + n >>> 1, s =
|
|
301
|
+
const r = e + n >>> 1, s = W[r], i = qe(s);
|
|
302
302
|
i < t || i === t && s.flags & 2 ? e = r + 1 : n = r;
|
|
303
303
|
}
|
|
304
304
|
return e;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function xs(t) {
|
|
307
307
|
if (!(t.flags & 1)) {
|
|
308
|
-
const e =
|
|
308
|
+
const e = qe(t), n = W[W.length - 1];
|
|
309
309
|
!n || // fast path when the job id is larger than the tail
|
|
310
|
-
!(t.flags & 2) && e >=
|
|
310
|
+
!(t.flags & 2) && e >= qe(n) ? W.push(t) : W.splice(Es(e), 0, t), t.flags |= 1, hr();
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
|
|
313
|
+
function hr() {
|
|
314
|
+
nn || (nn = ks.then(dr));
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
|
|
316
|
+
function As(t) {
|
|
317
|
+
re(t) ? $e.push(...t) : ce && t.id === -1 ? ce.splice(Ce + 1, 0, t) : t.flags & 1 || ($e.push(t), t.flags |= 1), hr();
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
if (
|
|
321
|
-
const e = [...new Set(
|
|
322
|
-
(n, r) =>
|
|
319
|
+
function Ss(t) {
|
|
320
|
+
if ($e.length) {
|
|
321
|
+
const e = [...new Set($e)].sort(
|
|
322
|
+
(n, r) => qe(n) - qe(r)
|
|
323
323
|
);
|
|
324
|
-
if (
|
|
325
|
-
|
|
324
|
+
if ($e.length = 0, ce) {
|
|
325
|
+
ce.push(...e);
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
for (
|
|
329
|
-
const n =
|
|
330
|
-
process.env.NODE_ENV !== "production" &&
|
|
328
|
+
for (ce = e, process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()), Ce = 0; Ce < ce.length; Ce++) {
|
|
329
|
+
const n = ce[Ce];
|
|
330
|
+
process.env.NODE_ENV !== "production" && mr(t, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
|
|
331
331
|
}
|
|
332
|
-
|
|
332
|
+
ce = null, Ce = 0;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
const
|
|
336
|
-
function
|
|
335
|
+
const qe = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
|
|
336
|
+
function dr(t) {
|
|
337
337
|
process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
|
|
338
|
-
const e = process.env.NODE_ENV !== "production" ? (n) =>
|
|
338
|
+
const e = process.env.NODE_ENV !== "production" ? (n) => mr(t, n) : ar;
|
|
339
339
|
try {
|
|
340
|
-
for (
|
|
341
|
-
const n =
|
|
340
|
+
for (ie = 0; ie < W.length; ie++) {
|
|
341
|
+
const n = W[ie];
|
|
342
342
|
if (n && !(n.flags & 8)) {
|
|
343
343
|
if (process.env.NODE_ENV !== "production" && e(n))
|
|
344
344
|
continue;
|
|
345
|
-
n.flags & 4 && (n.flags &= -2),
|
|
345
|
+
n.flags & 4 && (n.flags &= -2), cn(
|
|
346
346
|
n,
|
|
347
347
|
n.i,
|
|
348
348
|
n.i ? 15 : 14
|
|
@@ -350,18 +350,18 @@ function ar(t) {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
} finally {
|
|
353
|
-
for (;
|
|
354
|
-
const n =
|
|
353
|
+
for (; ie < W.length; ie++) {
|
|
354
|
+
const n = W[ie];
|
|
355
355
|
n && (n.flags &= -2);
|
|
356
356
|
}
|
|
357
|
-
|
|
357
|
+
ie = -1, W.length = 0, Ss(t), nn = null, (W.length || $e.length) && dr(t);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function mr(t, e) {
|
|
361
361
|
const n = t.get(e) || 0;
|
|
362
|
-
if (n >
|
|
363
|
-
const r = e.i, s = r &&
|
|
364
|
-
return
|
|
362
|
+
if (n > ws) {
|
|
363
|
+
const r = e.i, s = r && Er(r.type);
|
|
364
|
+
return pr(
|
|
365
365
|
`Maximum recursive updates exceeded${s ? ` in component <${s}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
366
366
|
null,
|
|
367
367
|
10
|
|
@@ -369,52 +369,52 @@ function cr(t, e) {
|
|
|
369
369
|
}
|
|
370
370
|
return t.set(e, n + 1), !1;
|
|
371
371
|
}
|
|
372
|
-
const
|
|
373
|
-
process.env.NODE_ENV !== "production" && (
|
|
374
|
-
createRecord:
|
|
375
|
-
rerender:
|
|
376
|
-
reload:
|
|
372
|
+
const Gt = /* @__PURE__ */ new Map();
|
|
373
|
+
process.env.NODE_ENV !== "production" && (kt().__VUE_HMR_RUNTIME__ = {
|
|
374
|
+
createRecord: qt(Rs),
|
|
375
|
+
rerender: qt(Os),
|
|
376
|
+
reload: qt(Ns)
|
|
377
377
|
});
|
|
378
|
-
const
|
|
379
|
-
function
|
|
380
|
-
return
|
|
381
|
-
initialDef:
|
|
378
|
+
const ht = /* @__PURE__ */ new Map();
|
|
379
|
+
function Rs(t, e) {
|
|
380
|
+
return ht.has(t) ? !1 : (ht.set(t, {
|
|
381
|
+
initialDef: dt(e),
|
|
382
382
|
instances: /* @__PURE__ */ new Set()
|
|
383
383
|
}), !0);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
return
|
|
385
|
+
function dt(t) {
|
|
386
|
+
return Ar(t) ? t.__vccOpts : t;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
const n =
|
|
388
|
+
function Os(t, e) {
|
|
389
|
+
const n = ht.get(t);
|
|
390
390
|
n && (n.initialDef.render = e, [...n.instances].forEach((r) => {
|
|
391
|
-
e && (r.render = e,
|
|
391
|
+
e && (r.render = e, dt(r.type).render = e), r.renderCache = [], r.job.flags & 8 || r.update();
|
|
392
392
|
}));
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const n =
|
|
394
|
+
function Ns(t, e) {
|
|
395
|
+
const n = ht.get(t);
|
|
396
396
|
if (!n) return;
|
|
397
|
-
e =
|
|
397
|
+
e = dt(e), jn(n.initialDef, e);
|
|
398
398
|
const r = [...n.instances];
|
|
399
399
|
for (let s = 0; s < r.length; s++) {
|
|
400
|
-
const i = r[s],
|
|
401
|
-
let a =
|
|
402
|
-
a || (
|
|
400
|
+
const i = r[s], l = dt(i.type);
|
|
401
|
+
let a = Gt.get(l);
|
|
402
|
+
a || (l !== n.initialDef && jn(l, e), Gt.set(l, a = /* @__PURE__ */ new Set())), a.add(i), i.appContext.propsCache.delete(i.type), i.appContext.emitsCache.delete(i.type), i.appContext.optionsCache.delete(i.type), i.ceReload ? (a.add(i), i.ceReload(e.styles), a.delete(i)) : i.parent ? xs(() => {
|
|
403
403
|
i.job.flags & 8 || (i.parent.update(), a.delete(i));
|
|
404
404
|
}) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
|
|
405
405
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
406
|
-
), i.root.ce && i !== i.root && i.root.ce._removeChildStyle(
|
|
406
|
+
), i.root.ce && i !== i.root && i.root.ce._removeChildStyle(l);
|
|
407
407
|
}
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
As(() => {
|
|
409
|
+
Gt.clear();
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
|
|
412
|
+
function jn(t, e) {
|
|
413
|
+
Tt(t, e);
|
|
414
414
|
for (const n in t)
|
|
415
415
|
n !== "__file" && !(n in e) && delete t[n];
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function qt(t) {
|
|
418
418
|
return (e, n) => {
|
|
419
419
|
try {
|
|
420
420
|
return t(e, n);
|
|
@@ -425,49 +425,49 @@ function Ut(t) {
|
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
let
|
|
429
|
-
function
|
|
428
|
+
let Le, ct = [];
|
|
429
|
+
function gr(t, e) {
|
|
430
430
|
var n, r;
|
|
431
|
-
|
|
431
|
+
Le = t, Le ? (Le.enabled = !0, ct.forEach(({ event: s, args: i }) => Le.emit(s, ...i)), ct = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
|
|
432
432
|
window.HTMLElement && // also exclude jsdom
|
|
433
433
|
// eslint-disable-next-line no-restricted-syntax
|
|
434
434
|
!((r = (n = window.navigator) == null ? void 0 : n.userAgent) != null && r.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((i) => {
|
|
435
|
-
|
|
435
|
+
gr(i, e);
|
|
436
436
|
}), setTimeout(() => {
|
|
437
|
-
|
|
438
|
-
}, 3e3)) :
|
|
439
|
-
}
|
|
440
|
-
let
|
|
441
|
-
const
|
|
442
|
-
function
|
|
443
|
-
t.shapeFlag & 6 && t.component ? (t.transition = e,
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
process.env.NODE_ENV !== "production" && (
|
|
437
|
+
Le || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, ct = []);
|
|
438
|
+
}, 3e3)) : ct = [];
|
|
439
|
+
}
|
|
440
|
+
let mt = null, Is = null;
|
|
441
|
+
const Ds = (t) => t.__isTeleport;
|
|
442
|
+
function br(t, e) {
|
|
443
|
+
t.shapeFlag & 6 && t.component ? (t.transition = e, br(t.component.subTree, e)) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent), t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e;
|
|
444
|
+
}
|
|
445
|
+
kt().requestIdleCallback;
|
|
446
|
+
kt().cancelIdleCallback;
|
|
447
|
+
const Cs = /* @__PURE__ */ Symbol.for("v-ndc"), Ls = {};
|
|
448
|
+
process.env.NODE_ENV !== "production" && (Ls.ownKeys = (t) => (Pe(
|
|
449
449
|
"Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
|
|
450
450
|
), Reflect.ownKeys(t)));
|
|
451
|
-
const
|
|
452
|
-
function
|
|
451
|
+
const Ms = {}, yr = (t) => Object.getPrototypeOf(t) === Ms, $s = (t) => t.__isSuspense, _r = /* @__PURE__ */ Symbol.for("v-fgt"), Ps = /* @__PURE__ */ Symbol.for("v-txt"), vs = /* @__PURE__ */ Symbol.for("v-cmt");
|
|
452
|
+
function zs(t) {
|
|
453
453
|
return t ? t.__v_isVNode === !0 : !1;
|
|
454
454
|
}
|
|
455
|
-
const
|
|
455
|
+
const Fs = (...t) => kr(
|
|
456
456
|
...t
|
|
457
|
-
),
|
|
457
|
+
), Tr = ({ key: t }) => t ?? null, pt = ({
|
|
458
458
|
ref: t,
|
|
459
459
|
ref_key: e,
|
|
460
460
|
ref_for: n
|
|
461
|
-
}) => (typeof t == "number" && (t = "" + t), t != null ?
|
|
462
|
-
function
|
|
461
|
+
}) => (typeof t == "number" && (t = "" + t), t != null ? ue(t) || /* @__PURE__ */ wt(t) || pe(t) ? { i: mt, r: t, k: e, f: !!n } : t : null);
|
|
462
|
+
function Us(t, e = null, n = null, r = 0, s = null, i = t === _r ? 0 : 1, l = !1, a = !1) {
|
|
463
463
|
const c = {
|
|
464
464
|
__v_isVNode: !0,
|
|
465
465
|
__v_skip: !0,
|
|
466
466
|
type: t,
|
|
467
467
|
props: e,
|
|
468
|
-
key: e &&
|
|
469
|
-
ref: e &&
|
|
470
|
-
scopeId:
|
|
468
|
+
key: e && Tr(e),
|
|
469
|
+
ref: e && pt(e),
|
|
470
|
+
scopeId: Is,
|
|
471
471
|
slotScopeIds: null,
|
|
472
472
|
children: n,
|
|
473
473
|
component: null,
|
|
@@ -487,62 +487,62 @@ function $s(t, e = null, n = null, r = 0, s = null, i = t === hr ? 0 : 1, o = !1
|
|
|
487
487
|
dynamicProps: s,
|
|
488
488
|
dynamicChildren: null,
|
|
489
489
|
appContext: null,
|
|
490
|
-
ctx:
|
|
490
|
+
ctx: mt
|
|
491
491
|
};
|
|
492
|
-
return a ? (
|
|
492
|
+
return a ? (un(c, n), i & 128 && t.normalize(c)) : n && (c.shapeFlag |= ue(n) ? 8 : 16), process.env.NODE_ENV !== "production" && c.key !== c.key && Pe("VNode created with invalid key (NaN). VNode type:", c.type), c;
|
|
493
493
|
}
|
|
494
|
-
const
|
|
495
|
-
function
|
|
496
|
-
if ((!t || t ===
|
|
497
|
-
const a =
|
|
494
|
+
const Hs = process.env.NODE_ENV !== "production" ? Fs : kr;
|
|
495
|
+
function kr(t, e = null, n = null, r = 0, s = null, i = !1) {
|
|
496
|
+
if ((!t || t === Cs) && (process.env.NODE_ENV !== "production" && !t && Pe(`Invalid vnode type when creating vnode: ${t}.`), t = vs), zs(t)) {
|
|
497
|
+
const a = gt(
|
|
498
498
|
t,
|
|
499
499
|
e,
|
|
500
500
|
!0
|
|
501
501
|
/* mergeRef: true */
|
|
502
502
|
);
|
|
503
|
-
return n &&
|
|
503
|
+
return n && un(a, n), a.patchFlag = -2, a;
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
506
|
-
e =
|
|
505
|
+
if (Ar(t) && (t = t.__vccOpts), e) {
|
|
506
|
+
e = Bs(e);
|
|
507
507
|
let { class: a, style: c } = e;
|
|
508
|
-
a && !
|
|
508
|
+
a && !ue(a) && (e.class = an(a)), be(c) && (/* @__PURE__ */ tn(c) && !re(c) && (c = Tt({}, c)), e.style = ln(c));
|
|
509
509
|
}
|
|
510
|
-
const
|
|
511
|
-
return process.env.NODE_ENV !== "production" &&
|
|
510
|
+
const l = ue(t) ? 1 : $s(t) ? 128 : Ds(t) ? 64 : be(t) ? 4 : pe(t) ? 2 : 0;
|
|
511
|
+
return process.env.NODE_ENV !== "production" && l & 4 && /* @__PURE__ */ tn(t) && (t = /* @__PURE__ */ ye(t), Pe(
|
|
512
512
|
"Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
|
|
513
513
|
`
|
|
514
514
|
Component that was made reactive: `,
|
|
515
515
|
t
|
|
516
|
-
)),
|
|
516
|
+
)), Us(
|
|
517
517
|
t,
|
|
518
518
|
e,
|
|
519
519
|
n,
|
|
520
520
|
r,
|
|
521
521
|
s,
|
|
522
|
-
|
|
522
|
+
l,
|
|
523
523
|
i,
|
|
524
524
|
!0
|
|
525
525
|
);
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
return t ? /* @__PURE__ */
|
|
527
|
+
function Bs(t) {
|
|
528
|
+
return t ? /* @__PURE__ */ tn(t) || yr(t) ? Tt({}, t) : t : null;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const { props: s, ref: i, patchFlag:
|
|
530
|
+
function gt(t, e, n = !1, r = !1) {
|
|
531
|
+
const { props: s, ref: i, patchFlag: l, children: a, transition: c } = t, h = e ? Vs(s || {}, e) : s, p = {
|
|
532
532
|
__v_isVNode: !0,
|
|
533
533
|
__v_skip: !0,
|
|
534
534
|
type: t.type,
|
|
535
535
|
props: h,
|
|
536
|
-
key: h &&
|
|
536
|
+
key: h && Tr(h),
|
|
537
537
|
ref: e && e.ref ? (
|
|
538
538
|
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
539
539
|
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
540
540
|
// the refs so the single vnode can be set on multiple refs
|
|
541
|
-
n && i ?
|
|
541
|
+
n && i ? re(i) ? i.concat(pt(e)) : [i, pt(e)] : pt(e)
|
|
542
542
|
) : i,
|
|
543
543
|
scopeId: t.scopeId,
|
|
544
544
|
slotScopeIds: t.slotScopeIds,
|
|
545
|
-
children: process.env.NODE_ENV !== "production" &&
|
|
545
|
+
children: process.env.NODE_ENV !== "production" && l === -1 && re(a) ? a.map(wr) : a,
|
|
546
546
|
target: t.target,
|
|
547
547
|
targetStart: t.targetStart,
|
|
548
548
|
targetAnchor: t.targetAnchor,
|
|
@@ -552,7 +552,7 @@ function ut(t, e, n = !1, r = !1) {
|
|
|
552
552
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
553
553
|
// note: preserve flag for fragments since they use the flag for children
|
|
554
554
|
// fast paths only.
|
|
555
|
-
patchFlag: e && t.type !==
|
|
555
|
+
patchFlag: e && t.type !== _r ? l === -1 ? 16 : l | 16 : l,
|
|
556
556
|
dynamicProps: t.dynamicProps,
|
|
557
557
|
dynamicChildren: t.dynamicChildren,
|
|
558
558
|
appContext: t.appContext,
|
|
@@ -564,66 +564,66 @@ function ut(t, e, n = !1, r = !1) {
|
|
|
564
564
|
// they will simply be overwritten.
|
|
565
565
|
component: t.component,
|
|
566
566
|
suspense: t.suspense,
|
|
567
|
-
ssContent: t.ssContent &&
|
|
568
|
-
ssFallback: t.ssFallback &&
|
|
567
|
+
ssContent: t.ssContent && gt(t.ssContent),
|
|
568
|
+
ssFallback: t.ssFallback && gt(t.ssFallback),
|
|
569
569
|
placeholder: t.placeholder,
|
|
570
570
|
el: t.el,
|
|
571
571
|
anchor: t.anchor,
|
|
572
572
|
ctx: t.ctx,
|
|
573
573
|
ce: t.ce
|
|
574
574
|
};
|
|
575
|
-
return c && r &&
|
|
575
|
+
return c && r && br(
|
|
576
576
|
p,
|
|
577
577
|
c.clone(p)
|
|
578
578
|
), p;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
581
|
-
const e =
|
|
582
|
-
return
|
|
580
|
+
function wr(t) {
|
|
581
|
+
const e = gt(t);
|
|
582
|
+
return re(t.children) && (e.children = t.children.map(wr)), e;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
return Ps
|
|
584
|
+
function js(t = " ", e = 0) {
|
|
585
|
+
return Hs(Ps, null, t, e);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function un(t, e) {
|
|
588
588
|
let n = 0;
|
|
589
589
|
const { shapeFlag: r } = t;
|
|
590
590
|
if (e == null)
|
|
591
591
|
e = null;
|
|
592
|
-
else if (
|
|
592
|
+
else if (re(e))
|
|
593
593
|
n = 16;
|
|
594
594
|
else if (typeof e == "object")
|
|
595
595
|
if (r & 65) {
|
|
596
596
|
const s = e.default;
|
|
597
|
-
s && (s._c && (s._d = !1),
|
|
597
|
+
s && (s._c && (s._d = !1), un(t, s()), s._c && (s._d = !0));
|
|
598
598
|
return;
|
|
599
599
|
} else
|
|
600
|
-
n = 32, !e._ && !
|
|
601
|
-
else
|
|
600
|
+
n = 32, !e._ && !yr(e) && (e._ctx = mt);
|
|
601
|
+
else pe(e) ? (e = { default: e, _ctx: mt }, n = 32) : (e = String(e), r & 64 ? (n = 16, e = [js(e)]) : n = 8);
|
|
602
602
|
t.children = e, t.shapeFlag |= n;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Vs(...t) {
|
|
605
605
|
const e = {};
|
|
606
606
|
for (let n = 0; n < t.length; n++) {
|
|
607
607
|
const r = t[n];
|
|
608
608
|
for (const s in r)
|
|
609
609
|
if (s === "class")
|
|
610
|
-
e.class !== r.class && (e.class =
|
|
610
|
+
e.class !== r.class && (e.class = an([e.class, r.class]));
|
|
611
611
|
else if (s === "style")
|
|
612
|
-
e.style =
|
|
613
|
-
else if (
|
|
614
|
-
const i = e[s],
|
|
615
|
-
|
|
612
|
+
e.style = ln([e.style, r.style]);
|
|
613
|
+
else if (is(s)) {
|
|
614
|
+
const i = e[s], l = r[s];
|
|
615
|
+
l && i !== l && !(re(i) && i.includes(l)) ? e[s] = i ? [].concat(i, l) : l : l == null && i == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
616
616
|
// the model listener.
|
|
617
|
-
!
|
|
617
|
+
!os(s) && (e[s] = l);
|
|
618
618
|
} else s !== "" && (e[s] = r[s]);
|
|
619
619
|
}
|
|
620
620
|
return e;
|
|
621
621
|
}
|
|
622
622
|
{
|
|
623
|
-
const t =
|
|
623
|
+
const t = kt(), e = (n, r) => {
|
|
624
624
|
let s;
|
|
625
625
|
return (s = t[n]) || (s = t[n] = []), s.push(r), (i) => {
|
|
626
|
-
s.length > 1 ? s.forEach((
|
|
626
|
+
s.length > 1 ? s.forEach((l) => l(i)) : s[0](i);
|
|
627
627
|
};
|
|
628
628
|
};
|
|
629
629
|
e(
|
|
@@ -635,42 +635,42 @@ function Fs(...t) {
|
|
|
635
635
|
);
|
|
636
636
|
}
|
|
637
637
|
process.env.NODE_ENV;
|
|
638
|
-
const
|
|
639
|
-
function
|
|
640
|
-
return
|
|
638
|
+
const Ws = /(?:^|[-_])\w/g, Gs = (t) => t.replace(Ws, (e) => e.toUpperCase()).replace(/[-_]/g, "");
|
|
639
|
+
function Er(t, e = !0) {
|
|
640
|
+
return pe(t) ? t.displayName || t.name : t.name || e && t.__name;
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
let r =
|
|
642
|
+
function xr(t, e, n = !1) {
|
|
643
|
+
let r = Er(e);
|
|
644
644
|
if (!r && e.__file) {
|
|
645
645
|
const s = e.__file.match(/([^/\\]+)\.\w+$/);
|
|
646
646
|
s && (r = s[1]);
|
|
647
647
|
}
|
|
648
648
|
if (!r && t) {
|
|
649
649
|
const s = (i) => {
|
|
650
|
-
for (const
|
|
651
|
-
if (i[
|
|
652
|
-
return
|
|
650
|
+
for (const l in i)
|
|
651
|
+
if (i[l] === e)
|
|
652
|
+
return l;
|
|
653
653
|
};
|
|
654
654
|
r = s(t.components) || t.parent && s(
|
|
655
655
|
t.parent.type.components
|
|
656
656
|
) || s(t.appContext.components);
|
|
657
657
|
}
|
|
658
|
-
return r ?
|
|
658
|
+
return r ? Gs(r) : n ? "App" : "Anonymous";
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
660
|
+
function Ar(t) {
|
|
661
|
+
return pe(t) && "__vccOpts" in t;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function qs() {
|
|
664
664
|
if (process.env.NODE_ENV === "production" || typeof window > "u")
|
|
665
665
|
return;
|
|
666
666
|
const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, r = { style: "color:#eb2f96" }, s = {
|
|
667
667
|
__vue_custom_formatter: !0,
|
|
668
668
|
header(f) {
|
|
669
|
-
if (!
|
|
669
|
+
if (!be(f))
|
|
670
670
|
return null;
|
|
671
671
|
if (f.__isVue)
|
|
672
672
|
return ["div", t, "VueInstance"];
|
|
673
|
-
if (/* @__PURE__ */
|
|
673
|
+
if (/* @__PURE__ */ wt(f)) {
|
|
674
674
|
const m = f.value;
|
|
675
675
|
return [
|
|
676
676
|
"div",
|
|
@@ -681,20 +681,20 @@ function Bs() {
|
|
|
681
681
|
">"
|
|
682
682
|
];
|
|
683
683
|
} else {
|
|
684
|
-
if (/* @__PURE__ */
|
|
684
|
+
if (/* @__PURE__ */ cr(f))
|
|
685
685
|
return [
|
|
686
686
|
"div",
|
|
687
687
|
{},
|
|
688
|
-
["span", t, /* @__PURE__ */
|
|
688
|
+
["span", t, /* @__PURE__ */ Vt(f) ? "ShallowReactive" : "Reactive"],
|
|
689
689
|
"<",
|
|
690
690
|
a(f),
|
|
691
|
-
`>${/* @__PURE__ */
|
|
691
|
+
`>${/* @__PURE__ */ en(f) ? " (readonly)" : ""}`
|
|
692
692
|
];
|
|
693
|
-
if (/* @__PURE__ */
|
|
693
|
+
if (/* @__PURE__ */ en(f))
|
|
694
694
|
return [
|
|
695
695
|
"div",
|
|
696
696
|
{},
|
|
697
|
-
["span", t, /* @__PURE__ */
|
|
697
|
+
["span", t, /* @__PURE__ */ Vt(f) ? "ShallowReadonly" : "Readonly"],
|
|
698
698
|
"<",
|
|
699
699
|
a(f),
|
|
700
700
|
">"
|
|
@@ -716,11 +716,11 @@ function Bs() {
|
|
|
716
716
|
};
|
|
717
717
|
function i(f) {
|
|
718
718
|
const m = [];
|
|
719
|
-
f.type.props && f.props && m.push(
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
return
|
|
719
|
+
f.type.props && f.props && m.push(l("props", /* @__PURE__ */ ye(f.props))), f.setupState !== Jt && m.push(l("setup", f.setupState)), f.data !== Jt && m.push(l("data", /* @__PURE__ */ ye(f.data)));
|
|
720
|
+
const y = c(f, "computed");
|
|
721
|
+
y && m.push(l("computed", y));
|
|
722
|
+
const _ = c(f, "inject");
|
|
723
|
+
return _ && m.push(l("injected", _)), m.push([
|
|
724
724
|
"div",
|
|
725
725
|
{},
|
|
726
726
|
[
|
|
@@ -733,8 +733,8 @@ function Bs() {
|
|
|
733
733
|
["object", { object: f }]
|
|
734
734
|
]), m;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return m =
|
|
736
|
+
function l(f, m) {
|
|
737
|
+
return m = Tt({}, m), Object.keys(m).length ? [
|
|
738
738
|
"div",
|
|
739
739
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
740
740
|
[
|
|
@@ -749,34 +749,34 @@ function Bs() {
|
|
|
749
749
|
{
|
|
750
750
|
style: "padding-left:1.25em"
|
|
751
751
|
},
|
|
752
|
-
...Object.keys(m).map((
|
|
752
|
+
...Object.keys(m).map((y) => [
|
|
753
753
|
"div",
|
|
754
754
|
{},
|
|
755
|
-
["span", r,
|
|
756
|
-
a(m[
|
|
755
|
+
["span", r, y + ": "],
|
|
756
|
+
a(m[y], !1)
|
|
757
757
|
])
|
|
758
758
|
]
|
|
759
759
|
] : ["span", {}];
|
|
760
760
|
}
|
|
761
761
|
function a(f, m = !0) {
|
|
762
|
-
return typeof f == "number" ? ["span", e, f] : typeof f == "string" ? ["span", n, JSON.stringify(f)] : typeof f == "boolean" ? ["span", r, f] :
|
|
762
|
+
return typeof f == "number" ? ["span", e, f] : typeof f == "string" ? ["span", n, JSON.stringify(f)] : typeof f == "boolean" ? ["span", r, f] : be(f) ? ["object", { object: m ? /* @__PURE__ */ ye(f) : f }] : ["span", n, String(f)];
|
|
763
763
|
}
|
|
764
764
|
function c(f, m) {
|
|
765
|
-
const
|
|
766
|
-
if (
|
|
765
|
+
const y = f.type;
|
|
766
|
+
if (pe(y))
|
|
767
767
|
return;
|
|
768
|
-
const
|
|
769
|
-
for (const
|
|
770
|
-
h(
|
|
771
|
-
return
|
|
772
|
-
}
|
|
773
|
-
function h(f, m,
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
768
|
+
const _ = {};
|
|
769
|
+
for (const I in f.ctx)
|
|
770
|
+
h(y, I, m) && (_[I] = f.ctx[I]);
|
|
771
|
+
return _;
|
|
772
|
+
}
|
|
773
|
+
function h(f, m, y) {
|
|
774
|
+
const _ = f[y];
|
|
775
|
+
if (re(_) && _.includes(m) || be(_) && m in _ || f.extends && h(f.extends, m, y) || f.mixins && f.mixins.some((I) => h(I, m, y)))
|
|
776
776
|
return !0;
|
|
777
777
|
}
|
|
778
778
|
function p(f) {
|
|
779
|
-
return /* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ Vt(f) ? "ShallowRef" : f.effect ? "ComputedRef" : "Ref";
|
|
780
780
|
}
|
|
781
781
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(s) : window.devtoolsFormatters = [s];
|
|
782
782
|
}
|
|
@@ -788,28 +788,28 @@ process.env.NODE_ENV;
|
|
|
788
788
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
789
789
|
* @license MIT
|
|
790
790
|
**/
|
|
791
|
-
function
|
|
792
|
-
|
|
791
|
+
function Ys() {
|
|
792
|
+
qs();
|
|
793
793
|
}
|
|
794
|
-
process.env.NODE_ENV !== "production" &&
|
|
795
|
-
const
|
|
796
|
-
function
|
|
797
|
-
return t.join(
|
|
794
|
+
process.env.NODE_ENV !== "production" && Ys();
|
|
795
|
+
const Sr = "*", Rr = "#", Or = ".";
|
|
796
|
+
function fe(...t) {
|
|
797
|
+
return t.join(Or);
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
return t.split(
|
|
799
|
+
function Zs(t) {
|
|
800
|
+
return t.split(Or).filter((e) => e !== "");
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
const e =
|
|
802
|
+
function Xs(t) {
|
|
803
|
+
const e = hs(t);
|
|
804
804
|
return e ? e.type === "set" && e.elements.type === "string" && !e.elements.one_of : !1;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Ks(t) {
|
|
807
807
|
return "one_of" in t && Array.isArray(t.one_of);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function po(t) {
|
|
810
810
|
return t.type === "set" && "elements" in t && "one_of" in t.elements;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function fn() {
|
|
813
813
|
return {
|
|
814
814
|
async: !1,
|
|
815
815
|
breaks: !1,
|
|
@@ -823,39 +823,39 @@ function rn() {
|
|
|
823
823
|
walkTokens: null
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
|
-
let
|
|
827
|
-
function
|
|
828
|
-
|
|
826
|
+
let ke = fn();
|
|
827
|
+
function Nr(t) {
|
|
828
|
+
ke = t;
|
|
829
829
|
}
|
|
830
|
-
const
|
|
830
|
+
const Ir = /[&<>"']/, Qs = new RegExp(Ir.source, "g"), Dr = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Js = new RegExp(Dr.source, "g"), ei = {
|
|
831
831
|
"&": "&",
|
|
832
832
|
"<": "<",
|
|
833
833
|
">": ">",
|
|
834
834
|
'"': """,
|
|
835
835
|
"'": "'"
|
|
836
|
-
},
|
|
837
|
-
function
|
|
836
|
+
}, Vn = (t) => ei[t];
|
|
837
|
+
function j(t, e) {
|
|
838
838
|
if (e) {
|
|
839
|
-
if (
|
|
840
|
-
return t.replace(
|
|
841
|
-
} else if (
|
|
842
|
-
return t.replace(
|
|
839
|
+
if (Ir.test(t))
|
|
840
|
+
return t.replace(Qs, Vn);
|
|
841
|
+
} else if (Dr.test(t))
|
|
842
|
+
return t.replace(Js, Vn);
|
|
843
843
|
return t;
|
|
844
844
|
}
|
|
845
|
-
const
|
|
846
|
-
function
|
|
845
|
+
const ti = /(^|[^\[])\^/g;
|
|
846
|
+
function E(t, e) {
|
|
847
847
|
let n = typeof t == "string" ? t : t.source;
|
|
848
848
|
e = e || "";
|
|
849
849
|
const r = {
|
|
850
850
|
replace: (s, i) => {
|
|
851
|
-
let
|
|
852
|
-
return
|
|
851
|
+
let l = typeof i == "string" ? i : i.source;
|
|
852
|
+
return l = l.replace(ti, "$1"), n = n.replace(s, l), r;
|
|
853
853
|
},
|
|
854
854
|
getRegex: () => new RegExp(n, e)
|
|
855
855
|
};
|
|
856
856
|
return r;
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Wn(t) {
|
|
859
859
|
try {
|
|
860
860
|
t = encodeURI(t).replace(/%25/g, "%");
|
|
861
861
|
} catch {
|
|
@@ -863,10 +863,10 @@ function Fn(t) {
|
|
|
863
863
|
}
|
|
864
864
|
return t;
|
|
865
865
|
}
|
|
866
|
-
const
|
|
867
|
-
function
|
|
868
|
-
const n = t.replace(/\|/g, (i,
|
|
869
|
-
let c = !1, h =
|
|
866
|
+
const We = { exec: () => null };
|
|
867
|
+
function Gn(t, e) {
|
|
868
|
+
const n = t.replace(/\|/g, (i, l, a) => {
|
|
869
|
+
let c = !1, h = l;
|
|
870
870
|
for (; --h >= 0 && a[h] === "\\"; )
|
|
871
871
|
c = !c;
|
|
872
872
|
return c ? "|" : " |";
|
|
@@ -882,7 +882,7 @@ function Un(t, e) {
|
|
|
882
882
|
r[s] = r[s].trim().replace(/\\\|/g, "|");
|
|
883
883
|
return r;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function He(t, e, n) {
|
|
886
886
|
const r = t.length;
|
|
887
887
|
if (r === 0)
|
|
888
888
|
return "";
|
|
@@ -891,7 +891,7 @@ function Pe(t, e, n) {
|
|
|
891
891
|
s++;
|
|
892
892
|
return t.slice(0, r - s);
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function ni(t, e) {
|
|
895
895
|
if (t.indexOf(e[1]) === -1)
|
|
896
896
|
return -1;
|
|
897
897
|
let n = 0;
|
|
@@ -904,8 +904,8 @@ function Ks(t, e) {
|
|
|
904
904
|
return r;
|
|
905
905
|
return -1;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
const s = e.href, i = e.title ?
|
|
907
|
+
function qn(t, e, n, r) {
|
|
908
|
+
const s = e.href, i = e.title ? j(e.title) : null, l = t[1].replace(/\\([\[\]])/g, "$1");
|
|
909
909
|
if (t[0].charAt(0) !== "!") {
|
|
910
910
|
r.state.inLink = !0;
|
|
911
911
|
const a = {
|
|
@@ -913,8 +913,8 @@ function Hn(t, e, n, r) {
|
|
|
913
913
|
raw: n,
|
|
914
914
|
href: s,
|
|
915
915
|
title: i,
|
|
916
|
-
text:
|
|
917
|
-
tokens: r.inlineTokens(
|
|
916
|
+
text: l,
|
|
917
|
+
tokens: r.inlineTokens(l)
|
|
918
918
|
};
|
|
919
919
|
return r.state.inLink = !1, a;
|
|
920
920
|
}
|
|
@@ -923,10 +923,10 @@ function Hn(t, e, n, r) {
|
|
|
923
923
|
raw: n,
|
|
924
924
|
href: s,
|
|
925
925
|
title: i,
|
|
926
|
-
text:
|
|
926
|
+
text: j(l)
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function ri(t, e) {
|
|
930
930
|
const n = t.match(/^(\s+)(?:```)/);
|
|
931
931
|
if (n === null)
|
|
932
932
|
return e;
|
|
@@ -936,19 +936,19 @@ function Qs(t, e) {
|
|
|
936
936
|
const i = s.match(/^\s+/);
|
|
937
937
|
if (i === null)
|
|
938
938
|
return s;
|
|
939
|
-
const [
|
|
940
|
-
return
|
|
939
|
+
const [l] = i;
|
|
940
|
+
return l.length >= r.length ? s.slice(r.length) : s;
|
|
941
941
|
}).join(`
|
|
942
942
|
`);
|
|
943
943
|
}
|
|
944
|
-
class
|
|
944
|
+
class bt {
|
|
945
945
|
// set by the lexer
|
|
946
946
|
constructor(e) {
|
|
947
|
-
|
|
948
|
-
|
|
947
|
+
A(this, "options");
|
|
948
|
+
A(this, "rules");
|
|
949
949
|
// set by the lexer
|
|
950
|
-
|
|
951
|
-
this.options = e ||
|
|
950
|
+
A(this, "lexer");
|
|
951
|
+
this.options = e || ke;
|
|
952
952
|
}
|
|
953
953
|
space(e) {
|
|
954
954
|
const n = this.rules.block.newline.exec(e);
|
|
@@ -966,7 +966,7 @@ class ft {
|
|
|
966
966
|
type: "code",
|
|
967
967
|
raw: n[0],
|
|
968
968
|
codeBlockStyle: "indented",
|
|
969
|
-
text: this.options.pedantic ? r :
|
|
969
|
+
text: this.options.pedantic ? r : He(r, `
|
|
970
970
|
`)
|
|
971
971
|
};
|
|
972
972
|
}
|
|
@@ -974,7 +974,7 @@ class ft {
|
|
|
974
974
|
fences(e) {
|
|
975
975
|
const n = this.rules.block.fences.exec(e);
|
|
976
976
|
if (n) {
|
|
977
|
-
const r = n[0], s =
|
|
977
|
+
const r = n[0], s = ri(r, n[3] || "");
|
|
978
978
|
return {
|
|
979
979
|
type: "code",
|
|
980
980
|
raw: r,
|
|
@@ -988,7 +988,7 @@ class ft {
|
|
|
988
988
|
if (n) {
|
|
989
989
|
let r = n[2].trim();
|
|
990
990
|
if (/#$/.test(r)) {
|
|
991
|
-
const s =
|
|
991
|
+
const s = He(r, "#");
|
|
992
992
|
(this.options.pedantic || !s || / $/.test(s)) && (r = s.trim());
|
|
993
993
|
}
|
|
994
994
|
return {
|
|
@@ -1005,17 +1005,17 @@ class ft {
|
|
|
1005
1005
|
if (n)
|
|
1006
1006
|
return {
|
|
1007
1007
|
type: "hr",
|
|
1008
|
-
raw:
|
|
1008
|
+
raw: He(n[0], `
|
|
1009
1009
|
`)
|
|
1010
1010
|
};
|
|
1011
1011
|
}
|
|
1012
1012
|
blockquote(e) {
|
|
1013
1013
|
const n = this.rules.block.blockquote.exec(e);
|
|
1014
1014
|
if (n) {
|
|
1015
|
-
let r =
|
|
1015
|
+
let r = He(n[0], `
|
|
1016
1016
|
`).split(`
|
|
1017
1017
|
`), s = "", i = "";
|
|
1018
|
-
const
|
|
1018
|
+
const l = [];
|
|
1019
1019
|
for (; r.length > 0; ) {
|
|
1020
1020
|
let a = !1;
|
|
1021
1021
|
const c = [];
|
|
@@ -1035,22 +1035,22 @@ class ft {
|
|
|
1035
1035
|
${p}` : p, i = i ? `${i}
|
|
1036
1036
|
${f}` : f;
|
|
1037
1037
|
const m = this.lexer.state.top;
|
|
1038
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(f,
|
|
1038
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(f, l, !0), this.lexer.state.top = m, r.length === 0)
|
|
1039
1039
|
break;
|
|
1040
|
-
const
|
|
1041
|
-
if ((
|
|
1040
|
+
const y = l[l.length - 1];
|
|
1041
|
+
if ((y == null ? void 0 : y.type) === "code")
|
|
1042
1042
|
break;
|
|
1043
|
-
if ((
|
|
1044
|
-
const
|
|
1043
|
+
if ((y == null ? void 0 : y.type) === "blockquote") {
|
|
1044
|
+
const _ = y, I = _.raw + `
|
|
1045
1045
|
` + r.join(`
|
|
1046
|
-
`),
|
|
1047
|
-
|
|
1046
|
+
`), F = this.blockquote(I);
|
|
1047
|
+
l[l.length - 1] = F, s = s.substring(0, s.length - _.raw.length) + F.raw, i = i.substring(0, i.length - _.text.length) + F.text;
|
|
1048
1048
|
break;
|
|
1049
|
-
} else if ((
|
|
1050
|
-
const
|
|
1049
|
+
} else if ((y == null ? void 0 : y.type) === "list") {
|
|
1050
|
+
const _ = y, I = _.raw + `
|
|
1051
1051
|
` + r.join(`
|
|
1052
|
-
`),
|
|
1053
|
-
|
|
1052
|
+
`), F = this.list(I);
|
|
1053
|
+
l[l.length - 1] = F, s = s.substring(0, s.length - y.raw.length) + F.raw, i = i.substring(0, i.length - _.raw.length) + F.raw, r = I.substring(l[l.length - 1].raw.length).split(`
|
|
1054
1054
|
`);
|
|
1055
1055
|
continue;
|
|
1056
1056
|
}
|
|
@@ -1058,7 +1058,7 @@ ${f}` : f;
|
|
|
1058
1058
|
return {
|
|
1059
1059
|
type: "blockquote",
|
|
1060
1060
|
raw: s,
|
|
1061
|
-
tokens:
|
|
1061
|
+
tokens: l,
|
|
1062
1062
|
text: i
|
|
1063
1063
|
};
|
|
1064
1064
|
}
|
|
@@ -1076,45 +1076,45 @@ ${f}` : f;
|
|
|
1076
1076
|
items: []
|
|
1077
1077
|
};
|
|
1078
1078
|
r = s ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = s ? r : "[*+-]");
|
|
1079
|
-
const
|
|
1079
|
+
const l = new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);
|
|
1080
1080
|
let a = !1;
|
|
1081
1081
|
for (; e; ) {
|
|
1082
1082
|
let c = !1, h = "", p = "";
|
|
1083
|
-
if (!(n =
|
|
1083
|
+
if (!(n = l.exec(e)) || this.rules.block.hr.test(e))
|
|
1084
1084
|
break;
|
|
1085
1085
|
h = n[0], e = e.substring(h.length);
|
|
1086
1086
|
let f = n[2].split(`
|
|
1087
|
-
`, 1)[0].replace(/^\t+/, (
|
|
1088
|
-
`, 1)[0],
|
|
1089
|
-
if (this.options.pedantic ? (
|
|
1087
|
+
`, 1)[0].replace(/^\t+/, (oe) => " ".repeat(3 * oe.length)), m = e.split(`
|
|
1088
|
+
`, 1)[0], y = !f.trim(), _ = 0;
|
|
1089
|
+
if (this.options.pedantic ? (_ = 2, p = f.trimStart()) : y ? _ = n[1].length + 1 : (_ = n[2].search(/[^ ]/), _ = _ > 4 ? 1 : _, p = f.slice(_), _ += n[1].length), y && /^[ \t]*$/.test(m) && (h += m + `
|
|
1090
1090
|
`, e = e.substring(m.length + 1), c = !0), !c) {
|
|
1091
|
-
const
|
|
1091
|
+
const oe = new RegExp(`^ {0,${Math.min(3, _ - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), he = new RegExp(`^ {0,${Math.min(3, _ - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), Xe = new RegExp(`^ {0,${Math.min(3, _ - 1)}}(?:\`\`\`|~~~)`), B = new RegExp(`^ {0,${Math.min(3, _ - 1)}}#`), Q = new RegExp(`^ {0,${Math.min(3, _ - 1)}}<(?:[a-z].*>|!--)`, "i");
|
|
1092
1092
|
for (; e; ) {
|
|
1093
|
-
const
|
|
1093
|
+
const v = e.split(`
|
|
1094
1094
|
`, 1)[0];
|
|
1095
|
-
let
|
|
1096
|
-
if (m =
|
|
1095
|
+
let Z;
|
|
1096
|
+
if (m = v, this.options.pedantic ? (m = m.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), Z = m) : Z = m.replace(/\t/g, " "), Xe.test(m) || B.test(m) || Q.test(m) || oe.test(m) || he.test(m))
|
|
1097
1097
|
break;
|
|
1098
|
-
if (
|
|
1098
|
+
if (Z.search(/[^ ]/) >= _ || !m.trim())
|
|
1099
1099
|
p += `
|
|
1100
|
-
` +
|
|
1100
|
+
` + Z.slice(_);
|
|
1101
1101
|
else {
|
|
1102
|
-
if (
|
|
1102
|
+
if (y || f.replace(/\t/g, " ").search(/[^ ]/) >= 4 || Xe.test(f) || B.test(f) || he.test(f))
|
|
1103
1103
|
break;
|
|
1104
1104
|
p += `
|
|
1105
1105
|
` + m;
|
|
1106
1106
|
}
|
|
1107
|
-
!
|
|
1108
|
-
`, e = e.substring(
|
|
1107
|
+
!y && !m.trim() && (y = !0), h += v + `
|
|
1108
|
+
`, e = e.substring(v.length + 1), f = Z.slice(_);
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
i.loose || (a ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(h) && (a = !0));
|
|
1112
|
-
let
|
|
1113
|
-
this.options.gfm && (
|
|
1112
|
+
let I = null, F;
|
|
1113
|
+
this.options.gfm && (I = /^\[[ xX]\] /.exec(p), I && (F = I[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), i.items.push({
|
|
1114
1114
|
type: "list_item",
|
|
1115
1115
|
raw: h,
|
|
1116
|
-
task: !!
|
|
1117
|
-
checked:
|
|
1116
|
+
task: !!I,
|
|
1117
|
+
checked: F,
|
|
1118
1118
|
loose: !1,
|
|
1119
1119
|
text: p,
|
|
1120
1120
|
tokens: []
|
|
@@ -1160,8 +1160,8 @@ ${f}` : f;
|
|
|
1160
1160
|
const n = this.rules.block.table.exec(e);
|
|
1161
1161
|
if (!n || !/[:|]/.test(n[2]))
|
|
1162
1162
|
return;
|
|
1163
|
-
const r =
|
|
1164
|
-
`) : [],
|
|
1163
|
+
const r = Gn(n[1]), s = n[2].replace(/^\||\| *$/g, "").split("|"), i = n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(`
|
|
1164
|
+
`) : [], l = {
|
|
1165
1165
|
type: "table",
|
|
1166
1166
|
raw: n[0],
|
|
1167
1167
|
header: [],
|
|
@@ -1170,22 +1170,22 @@ ${f}` : f;
|
|
|
1170
1170
|
};
|
|
1171
1171
|
if (r.length === s.length) {
|
|
1172
1172
|
for (const a of s)
|
|
1173
|
-
/^ *-+: *$/.test(a) ?
|
|
1173
|
+
/^ *-+: *$/.test(a) ? l.align.push("right") : /^ *:-+: *$/.test(a) ? l.align.push("center") : /^ *:-+ *$/.test(a) ? l.align.push("left") : l.align.push(null);
|
|
1174
1174
|
for (let a = 0; a < r.length; a++)
|
|
1175
|
-
|
|
1175
|
+
l.header.push({
|
|
1176
1176
|
text: r[a],
|
|
1177
1177
|
tokens: this.lexer.inline(r[a]),
|
|
1178
1178
|
header: !0,
|
|
1179
|
-
align:
|
|
1179
|
+
align: l.align[a]
|
|
1180
1180
|
});
|
|
1181
1181
|
for (const a of i)
|
|
1182
|
-
|
|
1182
|
+
l.rows.push(Gn(a, l.header.length).map((c, h) => ({
|
|
1183
1183
|
text: c,
|
|
1184
1184
|
tokens: this.lexer.inline(c),
|
|
1185
1185
|
header: !1,
|
|
1186
|
-
align:
|
|
1186
|
+
align: l.align[h]
|
|
1187
1187
|
})));
|
|
1188
|
-
return
|
|
1188
|
+
return l;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
1191
|
lheading(e) {
|
|
@@ -1228,7 +1228,7 @@ ${f}` : f;
|
|
|
1228
1228
|
return {
|
|
1229
1229
|
type: "escape",
|
|
1230
1230
|
raw: n[0],
|
|
1231
|
-
text:
|
|
1231
|
+
text: j(n[1])
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
1234
|
tag(e) {
|
|
@@ -1250,23 +1250,23 @@ ${f}` : f;
|
|
|
1250
1250
|
if (!this.options.pedantic && /^</.test(r)) {
|
|
1251
1251
|
if (!/>$/.test(r))
|
|
1252
1252
|
return;
|
|
1253
|
-
const
|
|
1254
|
-
if ((r.length -
|
|
1253
|
+
const l = He(r.slice(0, -1), "\\");
|
|
1254
|
+
if ((r.length - l.length) % 2 === 0)
|
|
1255
1255
|
return;
|
|
1256
1256
|
} else {
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1259
|
-
const c = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length +
|
|
1260
|
-
n[2] = n[2].substring(0,
|
|
1257
|
+
const l = ni(n[2], "()");
|
|
1258
|
+
if (l > -1) {
|
|
1259
|
+
const c = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + l;
|
|
1260
|
+
n[2] = n[2].substring(0, l), n[0] = n[0].substring(0, c).trim(), n[3] = "";
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
let s = n[2], i = "";
|
|
1264
1264
|
if (this.options.pedantic) {
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1265
|
+
const l = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);
|
|
1266
|
+
l && (s = l[1], i = l[3]);
|
|
1267
1267
|
} else
|
|
1268
1268
|
i = n[3] ? n[3].slice(1, -1) : "";
|
|
1269
|
-
return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(r) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
1269
|
+
return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(r) ? s = s.slice(1) : s = s.slice(1, -1)), qn(n, {
|
|
1270
1270
|
href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1271
1271
|
title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1272
1272
|
}, n[0], this.lexer);
|
|
@@ -1277,14 +1277,14 @@ ${f}` : f;
|
|
|
1277
1277
|
if ((r = this.rules.inline.reflink.exec(e)) || (r = this.rules.inline.nolink.exec(e))) {
|
|
1278
1278
|
const s = (r[2] || r[1]).replace(/\s+/g, " "), i = n[s.toLowerCase()];
|
|
1279
1279
|
if (!i) {
|
|
1280
|
-
const
|
|
1280
|
+
const l = r[0].charAt(0);
|
|
1281
1281
|
return {
|
|
1282
1282
|
type: "text",
|
|
1283
|
-
raw:
|
|
1284
|
-
text:
|
|
1283
|
+
raw: l,
|
|
1284
|
+
text: l
|
|
1285
1285
|
};
|
|
1286
1286
|
}
|
|
1287
|
-
return
|
|
1287
|
+
return qn(r, i, r[0], this.lexer);
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
emStrong(e, n, r = "") {
|
|
@@ -1292,38 +1292,38 @@ ${f}` : f;
|
|
|
1292
1292
|
if (!s || s[3] && r.match(/[\p{L}\p{N}]/u))
|
|
1293
1293
|
return;
|
|
1294
1294
|
if (!(s[1] || s[2] || "") || !r || this.rules.inline.punctuation.exec(r)) {
|
|
1295
|
-
const
|
|
1296
|
-
let a, c, h =
|
|
1295
|
+
const l = [...s[0]].length - 1;
|
|
1296
|
+
let a, c, h = l, p = 0;
|
|
1297
1297
|
const f = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
1298
|
-
for (f.lastIndex = 0, n = n.slice(-1 * e.length +
|
|
1298
|
+
for (f.lastIndex = 0, n = n.slice(-1 * e.length + l); (s = f.exec(n)) != null; ) {
|
|
1299
1299
|
if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a)
|
|
1300
1300
|
continue;
|
|
1301
1301
|
if (c = [...a].length, s[3] || s[4]) {
|
|
1302
1302
|
h += c;
|
|
1303
1303
|
continue;
|
|
1304
|
-
} else if ((s[5] || s[6]) &&
|
|
1304
|
+
} else if ((s[5] || s[6]) && l % 3 && !((l + c) % 3)) {
|
|
1305
1305
|
p += c;
|
|
1306
1306
|
continue;
|
|
1307
1307
|
}
|
|
1308
1308
|
if (h -= c, h > 0)
|
|
1309
1309
|
continue;
|
|
1310
1310
|
c = Math.min(c, c + h + p);
|
|
1311
|
-
const m = [...s[0]][0].length,
|
|
1312
|
-
if (Math.min(
|
|
1313
|
-
const
|
|
1311
|
+
const m = [...s[0]][0].length, y = e.slice(0, l + s.index + m + c);
|
|
1312
|
+
if (Math.min(l, c) % 2) {
|
|
1313
|
+
const I = y.slice(1, -1);
|
|
1314
1314
|
return {
|
|
1315
1315
|
type: "em",
|
|
1316
|
-
raw:
|
|
1317
|
-
text:
|
|
1318
|
-
tokens: this.lexer.inlineTokens(
|
|
1316
|
+
raw: y,
|
|
1317
|
+
text: I,
|
|
1318
|
+
tokens: this.lexer.inlineTokens(I)
|
|
1319
1319
|
};
|
|
1320
1320
|
}
|
|
1321
|
-
const
|
|
1321
|
+
const _ = y.slice(2, -2);
|
|
1322
1322
|
return {
|
|
1323
1323
|
type: "strong",
|
|
1324
|
-
raw:
|
|
1325
|
-
text:
|
|
1326
|
-
tokens: this.lexer.inlineTokens(
|
|
1324
|
+
raw: y,
|
|
1325
|
+
text: _,
|
|
1326
|
+
tokens: this.lexer.inlineTokens(_)
|
|
1327
1327
|
};
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
@@ -1333,7 +1333,7 @@ ${f}` : f;
|
|
|
1333
1333
|
if (n) {
|
|
1334
1334
|
let r = n[2].replace(/\n/g, " ");
|
|
1335
1335
|
const s = /[^ ]/.test(r), i = /^ /.test(r) && / $/.test(r);
|
|
1336
|
-
return s && i && (r = r.substring(1, r.length - 1)), r =
|
|
1336
|
+
return s && i && (r = r.substring(1, r.length - 1)), r = j(r, !0), {
|
|
1337
1337
|
type: "codespan",
|
|
1338
1338
|
raw: n[0],
|
|
1339
1339
|
text: r
|
|
@@ -1362,7 +1362,7 @@ ${f}` : f;
|
|
|
1362
1362
|
const n = this.rules.inline.autolink.exec(e);
|
|
1363
1363
|
if (n) {
|
|
1364
1364
|
let r, s;
|
|
1365
|
-
return n[2] === "@" ? (r =
|
|
1365
|
+
return n[2] === "@" ? (r = j(n[1]), s = "mailto:" + r) : (r = j(n[1]), s = r), {
|
|
1366
1366
|
type: "link",
|
|
1367
1367
|
raw: n[0],
|
|
1368
1368
|
text: r,
|
|
@@ -1383,13 +1383,13 @@ ${f}` : f;
|
|
|
1383
1383
|
if (n = this.rules.inline.url.exec(e)) {
|
|
1384
1384
|
let s, i;
|
|
1385
1385
|
if (n[2] === "@")
|
|
1386
|
-
s =
|
|
1386
|
+
s = j(n[0]), i = "mailto:" + s;
|
|
1387
1387
|
else {
|
|
1388
|
-
let
|
|
1388
|
+
let l;
|
|
1389
1389
|
do
|
|
1390
|
-
|
|
1391
|
-
while (
|
|
1392
|
-
s =
|
|
1390
|
+
l = n[0], n[0] = ((r = this.rules.inline._backpedal.exec(n[0])) == null ? void 0 : r[0]) ?? "";
|
|
1391
|
+
while (l !== n[0]);
|
|
1392
|
+
s = j(n[0]), n[1] === "www." ? i = "http://" + n[0] : i = n[0];
|
|
1393
1393
|
}
|
|
1394
1394
|
return {
|
|
1395
1395
|
type: "link",
|
|
@@ -1410,7 +1410,7 @@ ${f}` : f;
|
|
|
1410
1410
|
const n = this.rules.inline.text.exec(e);
|
|
1411
1411
|
if (n) {
|
|
1412
1412
|
let r;
|
|
1413
|
-
return this.lexer.state.inRawBlock ? r = n[0] : r =
|
|
1413
|
+
return this.lexer.state.inRawBlock ? r = n[0] : r = j(n[0]), {
|
|
1414
1414
|
type: "text",
|
|
1415
1415
|
raw: n[0],
|
|
1416
1416
|
text: r
|
|
@@ -1418,105 +1418,105 @@ ${f}` : f;
|
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
|
-
const
|
|
1422
|
-
blockquote:
|
|
1423
|
-
code:
|
|
1424
|
-
def:
|
|
1425
|
-
fences:
|
|
1426
|
-
heading:
|
|
1427
|
-
hr:
|
|
1428
|
-
html:
|
|
1429
|
-
lheading:
|
|
1430
|
-
list:
|
|
1431
|
-
newline:
|
|
1432
|
-
paragraph:
|
|
1433
|
-
table:
|
|
1434
|
-
text:
|
|
1435
|
-
},
|
|
1436
|
-
...
|
|
1437
|
-
table:
|
|
1438
|
-
paragraph:
|
|
1439
|
-
},
|
|
1440
|
-
...
|
|
1441
|
-
html:
|
|
1421
|
+
const si = /^(?:[ \t]*(?:\n|$))+/, ii = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, oi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Ye = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, li = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Cr = /(?:[*+-]|\d{1,9}[.)])/, Lr = E(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Cr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), pn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ai = /^[^\n]+/, hn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, ci = E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", hn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ui = E(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Cr).getRegex(), Et = "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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", dn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, fi = E("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", dn).replace("tag", Et).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Mr = E(pn).replace("hr", Ye).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Et).getRegex(), pi = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Mr).getRegex(), mn = {
|
|
1422
|
+
blockquote: pi,
|
|
1423
|
+
code: ii,
|
|
1424
|
+
def: ci,
|
|
1425
|
+
fences: oi,
|
|
1426
|
+
heading: li,
|
|
1427
|
+
hr: Ye,
|
|
1428
|
+
html: fi,
|
|
1429
|
+
lheading: Lr,
|
|
1430
|
+
list: ui,
|
|
1431
|
+
newline: si,
|
|
1432
|
+
paragraph: Mr,
|
|
1433
|
+
table: We,
|
|
1434
|
+
text: ai
|
|
1435
|
+
}, Yn = E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Ye).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Et).getRegex(), hi = {
|
|
1436
|
+
...mn,
|
|
1437
|
+
table: Yn,
|
|
1438
|
+
paragraph: E(pn).replace("hr", Ye).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Yn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Et).getRegex()
|
|
1439
|
+
}, di = {
|
|
1440
|
+
...mn,
|
|
1441
|
+
html: E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", dn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
1442
1442
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
1443
1443
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
1444
|
-
fences:
|
|
1444
|
+
fences: We,
|
|
1445
1445
|
// fences not supported
|
|
1446
1446
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
1447
|
-
paragraph:
|
|
1448
|
-
]`).replace("lheading",
|
|
1449
|
-
},
|
|
1450
|
-
_backpedal:
|
|
1447
|
+
paragraph: E(pn).replace("hr", Ye).replace("heading", ` *#{1,6} *[^
|
|
1448
|
+
]`).replace("lheading", Lr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
1449
|
+
}, $r = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mi = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Pr = /^( {2,}|\\)\n(?!\s*$)/, gi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ze = "\\p{P}\\p{S}", bi = E(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ze).getRegex(), yi = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, _i = E(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ze).getRegex(), Ti = E("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ze).getRegex(), ki = E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ze).getRegex(), wi = E(/\\([punct])/, "gu").replace(/punct/g, Ze).getRegex(), Ei = E(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[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])?)+(?![-_])/).getRegex(), xi = E(dn).replace("(?:-->|$)", "-->").getRegex(), Ai = E("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xi).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), yt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Si = E(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", yt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vr = E(/^!?\[(label)\]\[(ref)\]/).replace("label", yt).replace("ref", hn).getRegex(), zr = E(/^!?\[(ref)\](?:\[\])?/).replace("ref", hn).getRegex(), Ri = E("reflink|nolink(?!\\()", "g").replace("reflink", vr).replace("nolink", zr).getRegex(), gn = {
|
|
1450
|
+
_backpedal: We,
|
|
1451
1451
|
// only used for GFM url
|
|
1452
|
-
anyPunctuation:
|
|
1453
|
-
autolink:
|
|
1454
|
-
blockSkip:
|
|
1455
|
-
br:
|
|
1456
|
-
code:
|
|
1457
|
-
del:
|
|
1458
|
-
emStrongLDelim:
|
|
1459
|
-
emStrongRDelimAst:
|
|
1460
|
-
emStrongRDelimUnd:
|
|
1461
|
-
escape:
|
|
1462
|
-
link:
|
|
1463
|
-
nolink:
|
|
1464
|
-
punctuation:
|
|
1465
|
-
reflink:
|
|
1466
|
-
reflinkSearch:
|
|
1467
|
-
tag:
|
|
1468
|
-
text:
|
|
1469
|
-
url:
|
|
1470
|
-
},
|
|
1471
|
-
...
|
|
1472
|
-
link:
|
|
1473
|
-
reflink:
|
|
1474
|
-
},
|
|
1475
|
-
...
|
|
1476
|
-
escape:
|
|
1477
|
-
url:
|
|
1452
|
+
anyPunctuation: wi,
|
|
1453
|
+
autolink: Ei,
|
|
1454
|
+
blockSkip: yi,
|
|
1455
|
+
br: Pr,
|
|
1456
|
+
code: mi,
|
|
1457
|
+
del: We,
|
|
1458
|
+
emStrongLDelim: _i,
|
|
1459
|
+
emStrongRDelimAst: Ti,
|
|
1460
|
+
emStrongRDelimUnd: ki,
|
|
1461
|
+
escape: $r,
|
|
1462
|
+
link: Si,
|
|
1463
|
+
nolink: zr,
|
|
1464
|
+
punctuation: bi,
|
|
1465
|
+
reflink: vr,
|
|
1466
|
+
reflinkSearch: Ri,
|
|
1467
|
+
tag: Ai,
|
|
1468
|
+
text: gi,
|
|
1469
|
+
url: We
|
|
1470
|
+
}, Oi = {
|
|
1471
|
+
...gn,
|
|
1472
|
+
link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", yt).getRegex(),
|
|
1473
|
+
reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", yt).getRegex()
|
|
1474
|
+
}, rn = {
|
|
1475
|
+
...gn,
|
|
1476
|
+
escape: E($r).replace("])", "~|])").getRegex(),
|
|
1477
|
+
url: E(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
1478
1478
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
1479
1479
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
1480
1480
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
1481
|
-
},
|
|
1482
|
-
...
|
|
1483
|
-
br:
|
|
1484
|
-
text:
|
|
1485
|
-
},
|
|
1486
|
-
normal:
|
|
1487
|
-
gfm:
|
|
1488
|
-
pedantic:
|
|
1489
|
-
},
|
|
1490
|
-
normal:
|
|
1491
|
-
gfm:
|
|
1492
|
-
breaks:
|
|
1493
|
-
pedantic:
|
|
1481
|
+
}, Ni = {
|
|
1482
|
+
...rn,
|
|
1483
|
+
br: E(Pr).replace("{2,}", "*").getRegex(),
|
|
1484
|
+
text: E(rn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1485
|
+
}, ut = {
|
|
1486
|
+
normal: mn,
|
|
1487
|
+
gfm: hi,
|
|
1488
|
+
pedantic: di
|
|
1489
|
+
}, Be = {
|
|
1490
|
+
normal: gn,
|
|
1491
|
+
gfm: rn,
|
|
1492
|
+
breaks: Ni,
|
|
1493
|
+
pedantic: Oi
|
|
1494
1494
|
};
|
|
1495
1495
|
class G {
|
|
1496
1496
|
constructor(e) {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
1497
|
+
A(this, "tokens");
|
|
1498
|
+
A(this, "options");
|
|
1499
|
+
A(this, "state");
|
|
1500
|
+
A(this, "tokenizer");
|
|
1501
|
+
A(this, "inlineQueue");
|
|
1502
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ke, this.options.tokenizer = this.options.tokenizer || new bt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1503
1503
|
inLink: !1,
|
|
1504
1504
|
inRawBlock: !1,
|
|
1505
1505
|
top: !0
|
|
1506
1506
|
};
|
|
1507
1507
|
const n = {
|
|
1508
|
-
block:
|
|
1509
|
-
inline:
|
|
1508
|
+
block: ut.normal,
|
|
1509
|
+
inline: Be.normal
|
|
1510
1510
|
};
|
|
1511
|
-
this.options.pedantic ? (n.block =
|
|
1511
|
+
this.options.pedantic ? (n.block = ut.pedantic, n.inline = Be.pedantic) : this.options.gfm && (n.block = ut.gfm, this.options.breaks ? n.inline = Be.breaks : n.inline = Be.gfm), this.tokenizer.rules = n;
|
|
1512
1512
|
}
|
|
1513
1513
|
/**
|
|
1514
1514
|
* Expose Rules
|
|
1515
1515
|
*/
|
|
1516
1516
|
static get rules() {
|
|
1517
1517
|
return {
|
|
1518
|
-
block:
|
|
1519
|
-
inline:
|
|
1518
|
+
block: ut,
|
|
1519
|
+
inline: Be
|
|
1520
1520
|
};
|
|
1521
1521
|
}
|
|
1522
1522
|
/**
|
|
@@ -1545,7 +1545,7 @@ class G {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
blockTokens(e, n = [], r = !1) {
|
|
1547
1547
|
this.options.pedantic && (e = e.replace(/\t/g, " ").replace(/^ +$/gm, ""));
|
|
1548
|
-
let s, i,
|
|
1548
|
+
let s, i, l;
|
|
1549
1549
|
for (; e; )
|
|
1550
1550
|
if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((a) => (s = a.call({ lexer: this }, e, n)) ? (e = e.substring(s.raw.length), n.push(s), !0) : !1))) {
|
|
1551
1551
|
if (s = this.tokenizer.space(e)) {
|
|
@@ -1600,18 +1600,18 @@ class G {
|
|
|
1600
1600
|
e = e.substring(s.raw.length), n.push(s);
|
|
1601
1601
|
continue;
|
|
1602
1602
|
}
|
|
1603
|
-
if (
|
|
1603
|
+
if (l = e, this.options.extensions && this.options.extensions.startBlock) {
|
|
1604
1604
|
let a = 1 / 0;
|
|
1605
1605
|
const c = e.slice(1);
|
|
1606
1606
|
let h;
|
|
1607
1607
|
this.options.extensions.startBlock.forEach((p) => {
|
|
1608
1608
|
h = p.call({ lexer: this }, c), typeof h == "number" && h >= 0 && (a = Math.min(a, h));
|
|
1609
|
-
}), a < 1 / 0 && a >= 0 && (
|
|
1609
|
+
}), a < 1 / 0 && a >= 0 && (l = e.substring(0, a + 1));
|
|
1610
1610
|
}
|
|
1611
|
-
if (this.state.top && (s = this.tokenizer.paragraph(
|
|
1611
|
+
if (this.state.top && (s = this.tokenizer.paragraph(l))) {
|
|
1612
1612
|
i = n[n.length - 1], r && (i == null ? void 0 : i.type) === "paragraph" ? (i.raw += `
|
|
1613
1613
|
` + s.raw, i.text += `
|
|
1614
|
-
` + s.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(s), r =
|
|
1614
|
+
` + s.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(s), r = l.length !== e.length, e = e.substring(s.raw.length);
|
|
1615
1615
|
continue;
|
|
1616
1616
|
}
|
|
1617
1617
|
if (s = this.tokenizer.text(e)) {
|
|
@@ -1638,17 +1638,17 @@ class G {
|
|
|
1638
1638
|
* Lexing/Compiling
|
|
1639
1639
|
*/
|
|
1640
1640
|
inlineTokens(e, n = []) {
|
|
1641
|
-
let r, s, i,
|
|
1641
|
+
let r, s, i, l = e, a, c, h;
|
|
1642
1642
|
if (this.tokens.links) {
|
|
1643
1643
|
const p = Object.keys(this.tokens.links);
|
|
1644
1644
|
if (p.length > 0)
|
|
1645
|
-
for (; (a = this.tokenizer.rules.inline.reflinkSearch.exec(
|
|
1646
|
-
p.includes(a[0].slice(a[0].lastIndexOf("[") + 1, -1)) && (
|
|
1645
|
+
for (; (a = this.tokenizer.rules.inline.reflinkSearch.exec(l)) != null; )
|
|
1646
|
+
p.includes(a[0].slice(a[0].lastIndexOf("[") + 1, -1)) && (l = l.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
1647
1647
|
}
|
|
1648
|
-
for (; (a = this.tokenizer.rules.inline.blockSkip.exec(
|
|
1649
|
-
|
|
1650
|
-
for (; (a = this.tokenizer.rules.inline.anyPunctuation.exec(
|
|
1651
|
-
|
|
1648
|
+
for (; (a = this.tokenizer.rules.inline.blockSkip.exec(l)) != null; )
|
|
1649
|
+
l = l.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
1650
|
+
for (; (a = this.tokenizer.rules.inline.anyPunctuation.exec(l)) != null; )
|
|
1651
|
+
l = l.slice(0, a.index) + "++" + l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
1652
1652
|
for (; e; )
|
|
1653
1653
|
if (c || (h = ""), c = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((p) => (r = p.call({ lexer: this }, e, n)) ? (e = e.substring(r.raw.length), n.push(r), !0) : !1))) {
|
|
1654
1654
|
if (r = this.tokenizer.escape(e)) {
|
|
@@ -1667,7 +1667,7 @@ class G {
|
|
|
1667
1667
|
e = e.substring(r.raw.length), s = n[n.length - 1], s && r.type === "text" && s.type === "text" ? (s.raw += r.raw, s.text += r.text) : n.push(r);
|
|
1668
1668
|
continue;
|
|
1669
1669
|
}
|
|
1670
|
-
if (r = this.tokenizer.emStrong(e,
|
|
1670
|
+
if (r = this.tokenizer.emStrong(e, l, h)) {
|
|
1671
1671
|
e = e.substring(r.raw.length), n.push(r);
|
|
1672
1672
|
continue;
|
|
1673
1673
|
}
|
|
@@ -1695,8 +1695,8 @@ class G {
|
|
|
1695
1695
|
let p = 1 / 0;
|
|
1696
1696
|
const f = e.slice(1);
|
|
1697
1697
|
let m;
|
|
1698
|
-
this.options.extensions.startInline.forEach((
|
|
1699
|
-
m =
|
|
1698
|
+
this.options.extensions.startInline.forEach((y) => {
|
|
1699
|
+
m = y.call({ lexer: this }, f), typeof m == "number" && m >= 0 && (p = Math.min(p, m));
|
|
1700
1700
|
}), p < 1 / 0 && p >= 0 && (i = e.substring(0, p + 1));
|
|
1701
1701
|
}
|
|
1702
1702
|
if (r = this.tokenizer.inlineText(i)) {
|
|
@@ -1715,22 +1715,22 @@ class G {
|
|
|
1715
1715
|
return n;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
class
|
|
1718
|
+
class _t {
|
|
1719
1719
|
// set by the parser
|
|
1720
1720
|
constructor(e) {
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
this.options = e ||
|
|
1721
|
+
A(this, "options");
|
|
1722
|
+
A(this, "parser");
|
|
1723
|
+
this.options = e || ke;
|
|
1724
1724
|
}
|
|
1725
1725
|
space(e) {
|
|
1726
1726
|
return "";
|
|
1727
1727
|
}
|
|
1728
1728
|
code({ text: e, lang: n, escaped: r }) {
|
|
1729
|
-
var
|
|
1730
|
-
const s = (
|
|
1729
|
+
var l;
|
|
1730
|
+
const s = (l = (n || "").match(/^\S*/)) == null ? void 0 : l[0], i = e.replace(/\n$/, "") + `
|
|
1731
1731
|
`;
|
|
1732
|
-
return s ? '<pre><code class="language-' +
|
|
1733
|
-
` : "<pre><code>" + (r ? i :
|
|
1732
|
+
return s ? '<pre><code class="language-' + j(s) + '">' + (r ? i : j(i, !0)) + `</code></pre>
|
|
1733
|
+
` : "<pre><code>" + (r ? i : j(i, !0)) + `</code></pre>
|
|
1734
1734
|
`;
|
|
1735
1735
|
}
|
|
1736
1736
|
blockquote({ tokens: e }) {
|
|
@@ -1756,8 +1756,8 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
1756
1756
|
const c = e.items[a];
|
|
1757
1757
|
s += this.listitem(c);
|
|
1758
1758
|
}
|
|
1759
|
-
const i = n ? "ol" : "ul",
|
|
1760
|
-
return "<" + i +
|
|
1759
|
+
const i = n ? "ol" : "ul", l = n && r !== 1 ? ' start="' + r + '"' : "";
|
|
1760
|
+
return "<" + i + l + `>
|
|
1761
1761
|
` + s + "</" + i + `>
|
|
1762
1762
|
`;
|
|
1763
1763
|
}
|
|
@@ -1788,10 +1788,10 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
1788
1788
|
n += this.tablerow({ text: r });
|
|
1789
1789
|
let s = "";
|
|
1790
1790
|
for (let i = 0; i < e.rows.length; i++) {
|
|
1791
|
-
const
|
|
1791
|
+
const l = e.rows[i];
|
|
1792
1792
|
r = "";
|
|
1793
|
-
for (let a = 0; a <
|
|
1794
|
-
r += this.tablecell(
|
|
1793
|
+
for (let a = 0; a < l.length; a++)
|
|
1794
|
+
r += this.tablecell(l[a]);
|
|
1795
1795
|
s += this.tablerow({ text: r });
|
|
1796
1796
|
}
|
|
1797
1797
|
return s && (s = `<tbody>${s}</tbody>`), `<table>
|
|
@@ -1829,15 +1829,15 @@ ${e}</tr>
|
|
|
1829
1829
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1830
1830
|
}
|
|
1831
1831
|
link({ href: e, title: n, tokens: r }) {
|
|
1832
|
-
const s = this.parser.parseInline(r), i =
|
|
1832
|
+
const s = this.parser.parseInline(r), i = Wn(e);
|
|
1833
1833
|
if (i === null)
|
|
1834
1834
|
return s;
|
|
1835
1835
|
e = i;
|
|
1836
|
-
let
|
|
1837
|
-
return n && (
|
|
1836
|
+
let l = '<a href="' + e + '"';
|
|
1837
|
+
return n && (l += ' title="' + n + '"'), l += ">" + s + "</a>", l;
|
|
1838
1838
|
}
|
|
1839
1839
|
image({ href: e, title: n, text: r }) {
|
|
1840
|
-
const s =
|
|
1840
|
+
const s = Wn(e);
|
|
1841
1841
|
if (s === null)
|
|
1842
1842
|
return r;
|
|
1843
1843
|
e = s;
|
|
@@ -1848,7 +1848,7 @@ ${e}</tr>
|
|
|
1848
1848
|
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : e.text;
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
|
-
class
|
|
1851
|
+
class bn {
|
|
1852
1852
|
// no need for block level renderers
|
|
1853
1853
|
strong({ text: e }) {
|
|
1854
1854
|
return e;
|
|
@@ -1878,24 +1878,24 @@ class un {
|
|
|
1878
1878
|
return "";
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
|
-
class
|
|
1881
|
+
class q {
|
|
1882
1882
|
constructor(e) {
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
this.options = e ||
|
|
1883
|
+
A(this, "options");
|
|
1884
|
+
A(this, "renderer");
|
|
1885
|
+
A(this, "textRenderer");
|
|
1886
|
+
this.options = e || ke, this.options.renderer = this.options.renderer || new _t(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new bn();
|
|
1887
1887
|
}
|
|
1888
1888
|
/**
|
|
1889
1889
|
* Static Parse Method
|
|
1890
1890
|
*/
|
|
1891
1891
|
static parse(e, n) {
|
|
1892
|
-
return new
|
|
1892
|
+
return new q(n).parse(e);
|
|
1893
1893
|
}
|
|
1894
1894
|
/**
|
|
1895
1895
|
* Static Parse Inline Method
|
|
1896
1896
|
*/
|
|
1897
1897
|
static parseInline(e, n) {
|
|
1898
|
-
return new
|
|
1898
|
+
return new q(n).parseInline(e);
|
|
1899
1899
|
}
|
|
1900
1900
|
/**
|
|
1901
1901
|
* Parse Loop
|
|
@@ -1911,46 +1911,46 @@ class W {
|
|
|
1911
1911
|
continue;
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
const
|
|
1915
|
-
switch (
|
|
1914
|
+
const l = i;
|
|
1915
|
+
switch (l.type) {
|
|
1916
1916
|
case "space": {
|
|
1917
|
-
r += this.renderer.space(
|
|
1917
|
+
r += this.renderer.space(l);
|
|
1918
1918
|
continue;
|
|
1919
1919
|
}
|
|
1920
1920
|
case "hr": {
|
|
1921
|
-
r += this.renderer.hr(
|
|
1921
|
+
r += this.renderer.hr(l);
|
|
1922
1922
|
continue;
|
|
1923
1923
|
}
|
|
1924
1924
|
case "heading": {
|
|
1925
|
-
r += this.renderer.heading(
|
|
1925
|
+
r += this.renderer.heading(l);
|
|
1926
1926
|
continue;
|
|
1927
1927
|
}
|
|
1928
1928
|
case "code": {
|
|
1929
|
-
r += this.renderer.code(
|
|
1929
|
+
r += this.renderer.code(l);
|
|
1930
1930
|
continue;
|
|
1931
1931
|
}
|
|
1932
1932
|
case "table": {
|
|
1933
|
-
r += this.renderer.table(
|
|
1933
|
+
r += this.renderer.table(l);
|
|
1934
1934
|
continue;
|
|
1935
1935
|
}
|
|
1936
1936
|
case "blockquote": {
|
|
1937
|
-
r += this.renderer.blockquote(
|
|
1937
|
+
r += this.renderer.blockquote(l);
|
|
1938
1938
|
continue;
|
|
1939
1939
|
}
|
|
1940
1940
|
case "list": {
|
|
1941
|
-
r += this.renderer.list(
|
|
1941
|
+
r += this.renderer.list(l);
|
|
1942
1942
|
continue;
|
|
1943
1943
|
}
|
|
1944
1944
|
case "html": {
|
|
1945
|
-
r += this.renderer.html(
|
|
1945
|
+
r += this.renderer.html(l);
|
|
1946
1946
|
continue;
|
|
1947
1947
|
}
|
|
1948
1948
|
case "paragraph": {
|
|
1949
|
-
r += this.renderer.paragraph(
|
|
1949
|
+
r += this.renderer.paragraph(l);
|
|
1950
1950
|
continue;
|
|
1951
1951
|
}
|
|
1952
1952
|
case "text": {
|
|
1953
|
-
let a =
|
|
1953
|
+
let a = l, c = this.renderer.text(a);
|
|
1954
1954
|
for (; s + 1 < e.length && e[s + 1].type === "text"; )
|
|
1955
1955
|
a = e[++s], c += `
|
|
1956
1956
|
` + this.renderer.text(a);
|
|
@@ -1963,7 +1963,7 @@ class W {
|
|
|
1963
1963
|
continue;
|
|
1964
1964
|
}
|
|
1965
1965
|
default: {
|
|
1966
|
-
const a = 'Token with "' +
|
|
1966
|
+
const a = 'Token with "' + l.type + '" type was not found.';
|
|
1967
1967
|
if (this.options.silent)
|
|
1968
1968
|
return console.error(a), "";
|
|
1969
1969
|
throw new Error(a);
|
|
@@ -1987,50 +1987,50 @@ class W {
|
|
|
1987
1987
|
continue;
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
1990
|
-
const
|
|
1991
|
-
switch (
|
|
1990
|
+
const l = i;
|
|
1991
|
+
switch (l.type) {
|
|
1992
1992
|
case "escape": {
|
|
1993
|
-
r += n.text(
|
|
1993
|
+
r += n.text(l);
|
|
1994
1994
|
break;
|
|
1995
1995
|
}
|
|
1996
1996
|
case "html": {
|
|
1997
|
-
r += n.html(
|
|
1997
|
+
r += n.html(l);
|
|
1998
1998
|
break;
|
|
1999
1999
|
}
|
|
2000
2000
|
case "link": {
|
|
2001
|
-
r += n.link(
|
|
2001
|
+
r += n.link(l);
|
|
2002
2002
|
break;
|
|
2003
2003
|
}
|
|
2004
2004
|
case "image": {
|
|
2005
|
-
r += n.image(
|
|
2005
|
+
r += n.image(l);
|
|
2006
2006
|
break;
|
|
2007
2007
|
}
|
|
2008
2008
|
case "strong": {
|
|
2009
|
-
r += n.strong(
|
|
2009
|
+
r += n.strong(l);
|
|
2010
2010
|
break;
|
|
2011
2011
|
}
|
|
2012
2012
|
case "em": {
|
|
2013
|
-
r += n.em(
|
|
2013
|
+
r += n.em(l);
|
|
2014
2014
|
break;
|
|
2015
2015
|
}
|
|
2016
2016
|
case "codespan": {
|
|
2017
|
-
r += n.codespan(
|
|
2017
|
+
r += n.codespan(l);
|
|
2018
2018
|
break;
|
|
2019
2019
|
}
|
|
2020
2020
|
case "br": {
|
|
2021
|
-
r += n.br(
|
|
2021
|
+
r += n.br(l);
|
|
2022
2022
|
break;
|
|
2023
2023
|
}
|
|
2024
2024
|
case "del": {
|
|
2025
|
-
r += n.del(
|
|
2025
|
+
r += n.del(l);
|
|
2026
2026
|
break;
|
|
2027
2027
|
}
|
|
2028
2028
|
case "text": {
|
|
2029
|
-
r += n.text(
|
|
2029
|
+
r += n.text(l);
|
|
2030
2030
|
break;
|
|
2031
2031
|
}
|
|
2032
2032
|
default: {
|
|
2033
|
-
const a = 'Token with "' +
|
|
2033
|
+
const a = 'Token with "' + l.type + '" type was not found.';
|
|
2034
2034
|
if (this.options.silent)
|
|
2035
2035
|
return console.error(a), "";
|
|
2036
2036
|
throw new Error(a);
|
|
@@ -2040,11 +2040,11 @@ class W {
|
|
|
2040
2040
|
return r;
|
|
2041
2041
|
}
|
|
2042
2042
|
}
|
|
2043
|
-
class
|
|
2043
|
+
class Ge {
|
|
2044
2044
|
constructor(e) {
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
this.options = e ||
|
|
2045
|
+
A(this, "options");
|
|
2046
|
+
A(this, "block");
|
|
2047
|
+
this.options = e || ke;
|
|
2048
2048
|
}
|
|
2049
2049
|
/**
|
|
2050
2050
|
* Process markdown before marked
|
|
@@ -2074,26 +2074,26 @@ class He {
|
|
|
2074
2074
|
* Provide function to parse tokens
|
|
2075
2075
|
*/
|
|
2076
2076
|
provideParser() {
|
|
2077
|
-
return this.block ?
|
|
2077
|
+
return this.block ? q.parse : q.parseInline;
|
|
2078
2078
|
}
|
|
2079
2079
|
}
|
|
2080
|
-
|
|
2080
|
+
A(Ge, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
2081
2081
|
"preprocess",
|
|
2082
2082
|
"postprocess",
|
|
2083
2083
|
"processAllTokens"
|
|
2084
2084
|
]));
|
|
2085
|
-
class
|
|
2085
|
+
class Ii {
|
|
2086
2086
|
constructor(...e) {
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2087
|
+
A(this, "defaults", fn());
|
|
2088
|
+
A(this, "options", this.setOptions);
|
|
2089
|
+
A(this, "parse", this.parseMarkdown(!0));
|
|
2090
|
+
A(this, "parseInline", this.parseMarkdown(!1));
|
|
2091
|
+
A(this, "Parser", q);
|
|
2092
|
+
A(this, "Renderer", _t);
|
|
2093
|
+
A(this, "TextRenderer", bn);
|
|
2094
|
+
A(this, "Lexer", G);
|
|
2095
|
+
A(this, "Tokenizer", bt);
|
|
2096
|
+
A(this, "Hooks", Ge);
|
|
2097
2097
|
this.use(...e);
|
|
2098
2098
|
}
|
|
2099
2099
|
/**
|
|
@@ -2102,10 +2102,10 @@ class Ai {
|
|
|
2102
2102
|
walkTokens(e, n) {
|
|
2103
2103
|
var s, i;
|
|
2104
2104
|
let r = [];
|
|
2105
|
-
for (const
|
|
2106
|
-
switch (r = r.concat(n.call(this,
|
|
2105
|
+
for (const l of e)
|
|
2106
|
+
switch (r = r.concat(n.call(this, l)), l.type) {
|
|
2107
2107
|
case "table": {
|
|
2108
|
-
const a =
|
|
2108
|
+
const a = l;
|
|
2109
2109
|
for (const c of a.header)
|
|
2110
2110
|
r = r.concat(this.walkTokens(c.tokens, n));
|
|
2111
2111
|
for (const c of a.rows)
|
|
@@ -2114,12 +2114,12 @@ class Ai {
|
|
|
2114
2114
|
break;
|
|
2115
2115
|
}
|
|
2116
2116
|
case "list": {
|
|
2117
|
-
const a =
|
|
2117
|
+
const a = l;
|
|
2118
2118
|
r = r.concat(this.walkTokens(a.items, n));
|
|
2119
2119
|
break;
|
|
2120
2120
|
}
|
|
2121
2121
|
default: {
|
|
2122
|
-
const a =
|
|
2122
|
+
const a = l;
|
|
2123
2123
|
(i = (s = this.defaults.extensions) == null ? void 0 : s.childTokens) != null && i[a.type] ? this.defaults.extensions.childTokens[a.type].forEach((c) => {
|
|
2124
2124
|
const h = a[c].flat(1 / 0);
|
|
2125
2125
|
r = r.concat(this.walkTokens(h, n));
|
|
@@ -2136,27 +2136,27 @@ class Ai {
|
|
|
2136
2136
|
if (!i.name)
|
|
2137
2137
|
throw new Error("extension name required");
|
|
2138
2138
|
if ("renderer" in i) {
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2139
|
+
const l = n.renderers[i.name];
|
|
2140
|
+
l ? n.renderers[i.name] = function(...a) {
|
|
2141
2141
|
let c = i.renderer.apply(this, a);
|
|
2142
|
-
return c === !1 && (c =
|
|
2142
|
+
return c === !1 && (c = l.apply(this, a)), c;
|
|
2143
2143
|
} : n.renderers[i.name] = i.renderer;
|
|
2144
2144
|
}
|
|
2145
2145
|
if ("tokenizer" in i) {
|
|
2146
2146
|
if (!i.level || i.level !== "block" && i.level !== "inline")
|
|
2147
2147
|
throw new Error("extension level must be 'block' or 'inline'");
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2148
|
+
const l = n[i.level];
|
|
2149
|
+
l ? l.unshift(i.tokenizer) : n[i.level] = [i.tokenizer], i.start && (i.level === "block" ? n.startBlock ? n.startBlock.push(i.start) : n.startBlock = [i.start] : i.level === "inline" && (n.startInline ? n.startInline.push(i.start) : n.startInline = [i.start]));
|
|
2150
2150
|
}
|
|
2151
2151
|
"childTokens" in i && i.childTokens && (n.childTokens[i.name] = i.childTokens);
|
|
2152
2152
|
}), s.extensions = n), r.renderer) {
|
|
2153
|
-
const i = this.defaults.renderer || new
|
|
2154
|
-
for (const
|
|
2155
|
-
if (!(
|
|
2156
|
-
throw new Error(`renderer '${
|
|
2157
|
-
if (["options", "parser"].includes(
|
|
2153
|
+
const i = this.defaults.renderer || new _t(this.defaults);
|
|
2154
|
+
for (const l in r.renderer) {
|
|
2155
|
+
if (!(l in i))
|
|
2156
|
+
throw new Error(`renderer '${l}' does not exist`);
|
|
2157
|
+
if (["options", "parser"].includes(l))
|
|
2158
2158
|
continue;
|
|
2159
|
-
const a =
|
|
2159
|
+
const a = l, c = r.renderer[a], h = i[a];
|
|
2160
2160
|
i[a] = (...p) => {
|
|
2161
2161
|
let f = c.apply(i, p);
|
|
2162
2162
|
return f === !1 && (f = h.apply(i, p)), f || "";
|
|
@@ -2165,13 +2165,13 @@ class Ai {
|
|
|
2165
2165
|
s.renderer = i;
|
|
2166
2166
|
}
|
|
2167
2167
|
if (r.tokenizer) {
|
|
2168
|
-
const i = this.defaults.tokenizer || new
|
|
2169
|
-
for (const
|
|
2170
|
-
if (!(
|
|
2171
|
-
throw new Error(`tokenizer '${
|
|
2172
|
-
if (["options", "rules", "lexer"].includes(
|
|
2168
|
+
const i = this.defaults.tokenizer || new bt(this.defaults);
|
|
2169
|
+
for (const l in r.tokenizer) {
|
|
2170
|
+
if (!(l in i))
|
|
2171
|
+
throw new Error(`tokenizer '${l}' does not exist`);
|
|
2172
|
+
if (["options", "rules", "lexer"].includes(l))
|
|
2173
2173
|
continue;
|
|
2174
|
-
const a =
|
|
2174
|
+
const a = l, c = r.tokenizer[a], h = i[a];
|
|
2175
2175
|
i[a] = (...p) => {
|
|
2176
2176
|
let f = c.apply(i, p);
|
|
2177
2177
|
return f === !1 && (f = h.apply(i, p)), f;
|
|
@@ -2180,14 +2180,14 @@ class Ai {
|
|
|
2180
2180
|
s.tokenizer = i;
|
|
2181
2181
|
}
|
|
2182
2182
|
if (r.hooks) {
|
|
2183
|
-
const i = this.defaults.hooks || new
|
|
2184
|
-
for (const
|
|
2185
|
-
if (!(
|
|
2186
|
-
throw new Error(`hook '${
|
|
2187
|
-
if (["options", "block"].includes(
|
|
2183
|
+
const i = this.defaults.hooks || new Ge();
|
|
2184
|
+
for (const l in r.hooks) {
|
|
2185
|
+
if (!(l in i))
|
|
2186
|
+
throw new Error(`hook '${l}' does not exist`);
|
|
2187
|
+
if (["options", "block"].includes(l))
|
|
2188
2188
|
continue;
|
|
2189
|
-
const a =
|
|
2190
|
-
|
|
2189
|
+
const a = l, c = r.hooks[a], h = i[a];
|
|
2190
|
+
Ge.passThroughHooks.has(l) ? i[a] = (p) => {
|
|
2191
2191
|
if (this.defaults.async)
|
|
2192
2192
|
return Promise.resolve(c.call(i, p)).then((m) => h.call(i, m));
|
|
2193
2193
|
const f = c.call(i, p);
|
|
@@ -2200,10 +2200,10 @@ class Ai {
|
|
|
2200
2200
|
s.hooks = i;
|
|
2201
2201
|
}
|
|
2202
2202
|
if (r.walkTokens) {
|
|
2203
|
-
const i = this.defaults.walkTokens,
|
|
2203
|
+
const i = this.defaults.walkTokens, l = r.walkTokens;
|
|
2204
2204
|
s.walkTokens = function(a) {
|
|
2205
2205
|
let c = [];
|
|
2206
|
-
return c.push(
|
|
2206
|
+
return c.push(l.call(this, a)), i && (c = c.concat(i.call(this, a))), c;
|
|
2207
2207
|
};
|
|
2208
2208
|
}
|
|
2209
2209
|
this.defaults = { ...this.defaults, ...s };
|
|
@@ -2216,27 +2216,27 @@ class Ai {
|
|
|
2216
2216
|
return G.lex(e, n ?? this.defaults);
|
|
2217
2217
|
}
|
|
2218
2218
|
parser(e, n) {
|
|
2219
|
-
return
|
|
2219
|
+
return q.parse(e, n ?? this.defaults);
|
|
2220
2220
|
}
|
|
2221
2221
|
parseMarkdown(e) {
|
|
2222
2222
|
return (r, s) => {
|
|
2223
|
-
const i = { ...s },
|
|
2223
|
+
const i = { ...s }, l = { ...this.defaults, ...i }, a = this.onError(!!l.silent, !!l.async);
|
|
2224
2224
|
if (this.defaults.async === !0 && i.async === !1)
|
|
2225
2225
|
return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
2226
2226
|
if (typeof r > "u" || r === null)
|
|
2227
2227
|
return a(new Error("marked(): input parameter is undefined or null"));
|
|
2228
2228
|
if (typeof r != "string")
|
|
2229
2229
|
return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(r) + ", string expected"));
|
|
2230
|
-
|
|
2231
|
-
const c =
|
|
2232
|
-
if (
|
|
2233
|
-
return Promise.resolve(
|
|
2230
|
+
l.hooks && (l.hooks.options = l, l.hooks.block = e);
|
|
2231
|
+
const c = l.hooks ? l.hooks.provideLexer() : e ? G.lex : G.lexInline, h = l.hooks ? l.hooks.provideParser() : e ? q.parse : q.parseInline;
|
|
2232
|
+
if (l.async)
|
|
2233
|
+
return Promise.resolve(l.hooks ? l.hooks.preprocess(r) : r).then((p) => c(p, l)).then((p) => l.hooks ? l.hooks.processAllTokens(p) : p).then((p) => l.walkTokens ? Promise.all(this.walkTokens(p, l.walkTokens)).then(() => p) : p).then((p) => h(p, l)).then((p) => l.hooks ? l.hooks.postprocess(p) : p).catch(a);
|
|
2234
2234
|
try {
|
|
2235
|
-
|
|
2236
|
-
let p = c(r,
|
|
2237
|
-
|
|
2238
|
-
let f = h(p,
|
|
2239
|
-
return
|
|
2235
|
+
l.hooks && (r = l.hooks.preprocess(r));
|
|
2236
|
+
let p = c(r, l);
|
|
2237
|
+
l.hooks && (p = l.hooks.processAllTokens(p)), l.walkTokens && this.walkTokens(p, l.walkTokens);
|
|
2238
|
+
let f = h(p, l);
|
|
2239
|
+
return l.hooks && (f = l.hooks.postprocess(f)), f;
|
|
2240
2240
|
} catch (p) {
|
|
2241
2241
|
return a(p);
|
|
2242
2242
|
}
|
|
@@ -2246,7 +2246,7 @@ class Ai {
|
|
|
2246
2246
|
return (r) => {
|
|
2247
2247
|
if (r.message += `
|
|
2248
2248
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
2249
|
-
const s = "<p>An error occurred:</p><pre>" +
|
|
2249
|
+
const s = "<p>An error occurred:</p><pre>" + j(r.message + "", !0) + "</pre>";
|
|
2250
2250
|
return n ? Promise.resolve(s) : s;
|
|
2251
2251
|
}
|
|
2252
2252
|
if (n)
|
|
@@ -2255,58 +2255,58 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
2255
2255
|
};
|
|
2256
2256
|
}
|
|
2257
2257
|
}
|
|
2258
|
-
const
|
|
2259
|
-
function
|
|
2260
|
-
return
|
|
2258
|
+
const Te = new Ii();
|
|
2259
|
+
function w(t, e) {
|
|
2260
|
+
return Te.parse(t, e);
|
|
2261
2261
|
}
|
|
2262
|
-
|
|
2263
|
-
return
|
|
2262
|
+
w.options = w.setOptions = function(t) {
|
|
2263
|
+
return Te.setOptions(t), w.defaults = Te.defaults, Nr(w.defaults), w;
|
|
2264
2264
|
};
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
return
|
|
2265
|
+
w.getDefaults = fn;
|
|
2266
|
+
w.defaults = ke;
|
|
2267
|
+
w.use = function(...t) {
|
|
2268
|
+
return Te.use(...t), w.defaults = Te.defaults, Nr(w.defaults), w;
|
|
2269
2269
|
};
|
|
2270
|
-
|
|
2271
|
-
return
|
|
2270
|
+
w.walkTokens = function(t, e) {
|
|
2271
|
+
return Te.walkTokens(t, e);
|
|
2272
2272
|
};
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2273
|
+
w.parseInline = Te.parseInline;
|
|
2274
|
+
w.Parser = q;
|
|
2275
|
+
w.parser = q.parse;
|
|
2276
|
+
w.Renderer = _t;
|
|
2277
|
+
w.TextRenderer = bn;
|
|
2278
|
+
w.Lexer = G;
|
|
2279
|
+
w.lexer = G.lex;
|
|
2280
|
+
w.Tokenizer = bt;
|
|
2281
|
+
w.Hooks = Ge;
|
|
2282
|
+
w.parse = w;
|
|
2283
|
+
w.options;
|
|
2284
|
+
w.setOptions;
|
|
2285
|
+
w.use;
|
|
2286
|
+
w.walkTokens;
|
|
2287
|
+
w.parseInline;
|
|
2288
|
+
q.parse;
|
|
2289
2289
|
G.lex;
|
|
2290
|
-
/*! @license DOMPurify 3.4.
|
|
2291
|
-
function
|
|
2290
|
+
/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */
|
|
2291
|
+
function Zn(t, e) {
|
|
2292
2292
|
(e == null || e > t.length) && (e = t.length);
|
|
2293
2293
|
for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
|
|
2294
2294
|
return r;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function Di(t) {
|
|
2297
2297
|
if (Array.isArray(t)) return t;
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function Ci(t, e) {
|
|
2300
2300
|
var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
2301
2301
|
if (n != null) {
|
|
2302
|
-
var r, s, i,
|
|
2302
|
+
var r, s, i, l, a = [], c = !0, h = !1;
|
|
2303
2303
|
try {
|
|
2304
2304
|
if (i = (n = n.call(t)).next, e !== 0) for (; !(c = (r = i.call(n)).done) && (a.push(r.value), a.length !== e); c = !0) ;
|
|
2305
2305
|
} catch (p) {
|
|
2306
2306
|
h = !0, s = p;
|
|
2307
2307
|
} finally {
|
|
2308
2308
|
try {
|
|
2309
|
-
if (!c && n.return != null && (
|
|
2309
|
+
if (!c && n.return != null && (l = n.return(), Object(l) !== l)) return;
|
|
2310
2310
|
} finally {
|
|
2311
2311
|
if (h) throw s;
|
|
2312
2312
|
}
|
|
@@ -2314,151 +2314,160 @@ function Ri(t, e) {
|
|
|
2314
2314
|
return a;
|
|
2315
2315
|
}
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function Li() {
|
|
2318
2318
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2319
2319
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2322
|
-
return
|
|
2321
|
+
function Mi(t, e) {
|
|
2322
|
+
return Di(t) || Ci(t, e) || $i(t, e) || Li();
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function $i(t, e) {
|
|
2325
2325
|
if (t) {
|
|
2326
|
-
if (typeof t == "string") return
|
|
2326
|
+
if (typeof t == "string") return Zn(t, e);
|
|
2327
2327
|
var n = {}.toString.call(t).slice(8, -1);
|
|
2328
|
-
return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
2328
|
+
return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Zn(t, e) : void 0;
|
|
2329
2329
|
}
|
|
2330
2330
|
}
|
|
2331
|
-
const
|
|
2332
|
-
let
|
|
2333
|
-
|
|
2331
|
+
const Fr = Object.entries, Xn = Object.setPrototypeOf, Pi = Object.isFrozen, vi = Object.getPrototypeOf, zi = Object.getOwnPropertyDescriptor;
|
|
2332
|
+
let H = Object.freeze, Y = Object.seal, Me = Object.create, Ur = typeof Reflect < "u" && Reflect, sn = Ur.apply, on = Ur.construct;
|
|
2333
|
+
H || (H = function(e) {
|
|
2334
2334
|
return e;
|
|
2335
2335
|
});
|
|
2336
|
-
|
|
2336
|
+
Y || (Y = function(e) {
|
|
2337
2337
|
return e;
|
|
2338
2338
|
});
|
|
2339
|
-
|
|
2339
|
+
sn || (sn = function(e, n) {
|
|
2340
2340
|
for (var r = arguments.length, s = new Array(r > 2 ? r - 2 : 0), i = 2; i < r; i++)
|
|
2341
2341
|
s[i - 2] = arguments[i];
|
|
2342
2342
|
return e.apply(n, s);
|
|
2343
2343
|
});
|
|
2344
|
-
|
|
2344
|
+
on || (on = function(e) {
|
|
2345
2345
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
|
|
2346
2346
|
r[s - 1] = arguments[s];
|
|
2347
2347
|
return new e(...r);
|
|
2348
2348
|
});
|
|
2349
|
-
const
|
|
2350
|
-
function
|
|
2349
|
+
const ge = C(Array.prototype.forEach), Fi = C(Array.prototype.lastIndexOf), Kn = C(Array.prototype.pop), Ne = C(Array.prototype.push), Ui = C(Array.prototype.splice), U = Array.isArray, Ve = C(String.prototype.toLowerCase), Yt = C(String.prototype.toString), Qn = C(String.prototype.match), Ie = C(String.prototype.replace), Jn = C(String.prototype.indexOf), Hi = C(String.prototype.trim), Bi = C(Number.prototype.toString), ji = C(Boolean.prototype.toString), er = typeof BigInt > "u" ? null : C(BigInt.prototype.toString), tr = typeof Symbol > "u" ? null : C(Symbol.prototype.toString), S = C(Object.prototype.hasOwnProperty), je = C(Object.prototype.toString), P = C(RegExp.prototype.test), De = Vi(TypeError);
|
|
2350
|
+
function C(t) {
|
|
2351
2351
|
return function(e) {
|
|
2352
2352
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
2353
2353
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
|
|
2354
2354
|
r[s - 1] = arguments[s];
|
|
2355
|
-
return
|
|
2355
|
+
return sn(t, e, r);
|
|
2356
2356
|
};
|
|
2357
2357
|
}
|
|
2358
|
-
function
|
|
2358
|
+
function Vi(t) {
|
|
2359
2359
|
return function() {
|
|
2360
2360
|
for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
|
|
2361
2361
|
n[r] = arguments[r];
|
|
2362
|
-
return
|
|
2362
|
+
return on(t, n);
|
|
2363
2363
|
};
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2366
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
2367
|
-
if (
|
|
2365
|
+
function b(t, e) {
|
|
2366
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ve;
|
|
2367
|
+
if (Xn && Xn(t, null), !U(e))
|
|
2368
2368
|
return t;
|
|
2369
2369
|
let r = e.length;
|
|
2370
2370
|
for (; r--; ) {
|
|
2371
2371
|
let s = e[r];
|
|
2372
2372
|
if (typeof s == "string") {
|
|
2373
2373
|
const i = n(s);
|
|
2374
|
-
i !== s && (
|
|
2374
|
+
i !== s && (Pi(e) || (e[r] = i), s = i);
|
|
2375
2375
|
}
|
|
2376
2376
|
t[s] = !0;
|
|
2377
2377
|
}
|
|
2378
2378
|
return t;
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2380
|
+
function Wi(t) {
|
|
2381
2381
|
for (let e = 0; e < t.length; e++)
|
|
2382
|
-
|
|
2382
|
+
S(t, e) || (t[e] = null);
|
|
2383
2383
|
return t;
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2386
|
-
const e =
|
|
2387
|
-
for (const r of
|
|
2388
|
-
var n =
|
|
2385
|
+
function z(t) {
|
|
2386
|
+
const e = Me(null);
|
|
2387
|
+
for (const r of Fr(t)) {
|
|
2388
|
+
var n = Mi(r, 2);
|
|
2389
2389
|
const s = n[0], i = n[1];
|
|
2390
|
-
|
|
2390
|
+
S(t, s) && (U(i) ? e[s] = Wi(i) : i && typeof i == "object" && i.constructor === Object ? e[s] = z(i) : e[s] = i);
|
|
2391
2391
|
}
|
|
2392
2392
|
return e;
|
|
2393
2393
|
}
|
|
2394
|
-
function
|
|
2394
|
+
function Gi(t) {
|
|
2395
2395
|
switch (typeof t) {
|
|
2396
2396
|
case "string":
|
|
2397
2397
|
return t;
|
|
2398
2398
|
case "number":
|
|
2399
|
-
return
|
|
2399
|
+
return Bi(t);
|
|
2400
2400
|
case "boolean":
|
|
2401
|
-
return
|
|
2401
|
+
return ji(t);
|
|
2402
2402
|
case "bigint":
|
|
2403
|
-
return
|
|
2403
|
+
return er ? er(t) : "0";
|
|
2404
2404
|
case "symbol":
|
|
2405
|
-
return
|
|
2405
|
+
return tr ? tr(t) : "Symbol()";
|
|
2406
2406
|
case "undefined":
|
|
2407
|
-
return
|
|
2407
|
+
return je(t);
|
|
2408
2408
|
case "function":
|
|
2409
2409
|
case "object": {
|
|
2410
2410
|
if (t === null)
|
|
2411
|
-
return
|
|
2412
|
-
const e = t, n =
|
|
2411
|
+
return je(t);
|
|
2412
|
+
const e = t, n = ne(e, "toString");
|
|
2413
2413
|
if (typeof n == "function") {
|
|
2414
2414
|
const r = n(e);
|
|
2415
|
-
return typeof r == "string" ? r :
|
|
2415
|
+
return typeof r == "string" ? r : je(r);
|
|
2416
2416
|
}
|
|
2417
|
-
return
|
|
2417
|
+
return je(t);
|
|
2418
2418
|
}
|
|
2419
2419
|
default:
|
|
2420
|
-
return
|
|
2420
|
+
return je(t);
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
|
-
function
|
|
2423
|
+
function ne(t, e) {
|
|
2424
2424
|
for (; t !== null; ) {
|
|
2425
|
-
const r =
|
|
2425
|
+
const r = zi(t, e);
|
|
2426
2426
|
if (r) {
|
|
2427
2427
|
if (r.get)
|
|
2428
|
-
return
|
|
2428
|
+
return C(r.get);
|
|
2429
2429
|
if (typeof r.value == "function")
|
|
2430
|
-
return
|
|
2430
|
+
return C(r.value);
|
|
2431
2431
|
}
|
|
2432
|
-
t =
|
|
2432
|
+
t = vi(t);
|
|
2433
2433
|
}
|
|
2434
2434
|
function n() {
|
|
2435
2435
|
return null;
|
|
2436
2436
|
}
|
|
2437
2437
|
return n;
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function qi(t) {
|
|
2440
2440
|
try {
|
|
2441
|
-
return
|
|
2441
|
+
return P(t, ""), !0;
|
|
2442
2442
|
} catch {
|
|
2443
2443
|
return !1;
|
|
2444
2444
|
}
|
|
2445
2445
|
}
|
|
2446
|
-
const
|
|
2446
|
+
const nr = H(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Zt = H(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Xt = H(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Yi = H(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Kt = H(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Zi = H(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), rr = H(["#text"]), sr = H(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), Qt = H(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ir = H(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ft = H(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Xi = Y(/{{[\w\W]*|^[\w\W]*}}/g), Ki = Y(/<%[\w\W]*|^[\w\W]*%>/g), Qi = Y(/\${[\w\W]*/g), Ji = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), eo = Y(/^aria-[\-\w]+$/), or = Y(
|
|
2447
2447
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
2448
2448
|
// eslint-disable-line no-useless-escape
|
|
2449
|
-
),
|
|
2449
|
+
), to = Y(/^(?:\w+script|data):/i), no = Y(
|
|
2450
2450
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
2451
2451
|
// eslint-disable-line no-control-regex
|
|
2452
|
-
),
|
|
2452
|
+
), ro = Y(/^html$/i), so = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), te = {
|
|
2453
2453
|
element: 1,
|
|
2454
|
+
attribute: 2,
|
|
2454
2455
|
text: 3,
|
|
2456
|
+
cdataSection: 4,
|
|
2457
|
+
entityReference: 5,
|
|
2458
|
+
// Deprecated
|
|
2459
|
+
entityNode: 6,
|
|
2455
2460
|
// Deprecated
|
|
2456
2461
|
progressingInstruction: 7,
|
|
2457
2462
|
comment: 8,
|
|
2458
|
-
document: 9
|
|
2459
|
-
|
|
2463
|
+
document: 9,
|
|
2464
|
+
documentType: 10,
|
|
2465
|
+
documentFragment: 11,
|
|
2466
|
+
notation: 12
|
|
2467
|
+
// Deprecated
|
|
2468
|
+
}, io = function() {
|
|
2460
2469
|
return typeof window > "u" ? null : window;
|
|
2461
|
-
},
|
|
2470
|
+
}, oo = function(e, n) {
|
|
2462
2471
|
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
2463
2472
|
return null;
|
|
2464
2473
|
let r = null;
|
|
@@ -2467,17 +2476,17 @@ const Xn = z(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
2467
2476
|
const i = "dompurify" + (r ? "#" + r : "");
|
|
2468
2477
|
try {
|
|
2469
2478
|
return e.createPolicy(i, {
|
|
2470
|
-
createHTML(
|
|
2471
|
-
return
|
|
2479
|
+
createHTML(l) {
|
|
2480
|
+
return l;
|
|
2472
2481
|
},
|
|
2473
|
-
createScriptURL(
|
|
2474
|
-
return
|
|
2482
|
+
createScriptURL(l) {
|
|
2483
|
+
return l;
|
|
2475
2484
|
}
|
|
2476
2485
|
});
|
|
2477
2486
|
} catch {
|
|
2478
2487
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
2479
2488
|
}
|
|
2480
|
-
},
|
|
2489
|
+
}, lr = function() {
|
|
2481
2490
|
return {
|
|
2482
2491
|
afterSanitizeAttributes: [],
|
|
2483
2492
|
afterSanitizeElements: [],
|
|
@@ -2490,27 +2499,40 @@ const Xn = z(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
2490
2499
|
uponSanitizeShadowNode: []
|
|
2491
2500
|
};
|
|
2492
2501
|
};
|
|
2493
|
-
function
|
|
2494
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
2495
|
-
const e = (g) =>
|
|
2496
|
-
if (e.version = "3.4.
|
|
2502
|
+
function Hr() {
|
|
2503
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : io();
|
|
2504
|
+
const e = (g) => Hr(g);
|
|
2505
|
+
if (e.version = "3.4.8", e.removed = [], !t || !t.document || t.document.nodeType !== te.document || !t.Element)
|
|
2497
2506
|
return e.isSupported = !1, e;
|
|
2498
2507
|
let n = t.document;
|
|
2499
|
-
const r = n, s = r.currentScript
|
|
2500
|
-
|
|
2508
|
+
const r = n, s = r.currentScript;
|
|
2509
|
+
t.DocumentFragment;
|
|
2510
|
+
const i = t.HTMLTemplateElement, l = t.Node, a = t.Element, c = t.NodeFilter, h = t.NamedNodeMap;
|
|
2511
|
+
h === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
|
|
2512
|
+
const p = t.DOMParser, f = t.trustedTypes, m = a.prototype, y = ne(m, "cloneNode"), _ = ne(m, "remove"), I = ne(m, "nextSibling"), F = ne(m, "childNodes"), oe = ne(m, "parentNode"), he = ne(m, "shadowRoot"), Xe = ne(m, "attributes"), B = l && l.prototype ? ne(l.prototype, "nodeType") : null, Q = l && l.prototype ? ne(l.prototype, "nodeName") : null;
|
|
2513
|
+
if (typeof i == "function") {
|
|
2501
2514
|
const g = n.createElement("template");
|
|
2502
2515
|
g.content && g.content.ownerDocument && (n = g.content.ownerDocument);
|
|
2503
2516
|
}
|
|
2504
|
-
let
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2517
|
+
let v, Z = "", Rt = 0;
|
|
2518
|
+
const we = function(o) {
|
|
2519
|
+
if (Rt > 0)
|
|
2520
|
+
throw De('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
2521
|
+
Rt++;
|
|
2522
|
+
try {
|
|
2523
|
+
return v.createHTML(o);
|
|
2524
|
+
} finally {
|
|
2525
|
+
Rt--;
|
|
2526
|
+
}
|
|
2527
|
+
}, Ke = n, Ot = Ke.implementation, _n = Ke.createNodeIterator, Br = Ke.createDocumentFragment, jr = Ke.getElementsByTagName, Vr = r.importNode;
|
|
2528
|
+
let M = lr();
|
|
2529
|
+
e.isSupported = typeof Fr == "function" && typeof oe == "function" && Ot && Ot.createHTMLDocument !== void 0;
|
|
2530
|
+
const Qe = Xi, Je = Ki, et = Qi, Wr = Ji, Gr = eo, qr = to, Tn = no, Yr = so;
|
|
2531
|
+
let kn = or, R = null;
|
|
2532
|
+
const Nt = b({}, [...nr, ...Zt, ...Xt, ...Kt, ...rr]);
|
|
2533
|
+
let D = null;
|
|
2534
|
+
const It = b({}, [...sr, ...Qt, ...ir, ...ft]);
|
|
2535
|
+
let O = Object.seal(Me(null, {
|
|
2514
2536
|
tagNameCheck: {
|
|
2515
2537
|
writable: !0,
|
|
2516
2538
|
configurable: !1,
|
|
@@ -2529,8 +2551,8 @@ function $r() {
|
|
|
2529
2551
|
enumerable: !0,
|
|
2530
2552
|
value: !1
|
|
2531
2553
|
}
|
|
2532
|
-
})),
|
|
2533
|
-
const
|
|
2554
|
+
})), ve = null, tt = null;
|
|
2555
|
+
const le = Object.seal(Me(null, {
|
|
2534
2556
|
tagCheck: {
|
|
2535
2557
|
writable: !0,
|
|
2536
2558
|
configurable: !1,
|
|
@@ -2544,170 +2566,235 @@ function $r() {
|
|
|
2544
2566
|
value: null
|
|
2545
2567
|
}
|
|
2546
2568
|
}));
|
|
2547
|
-
let
|
|
2548
|
-
const
|
|
2549
|
-
let
|
|
2550
|
-
const
|
|
2551
|
-
let
|
|
2552
|
-
const
|
|
2553
|
-
let
|
|
2554
|
-
const
|
|
2555
|
-
let
|
|
2556
|
-
const
|
|
2557
|
-
let
|
|
2558
|
-
const
|
|
2559
|
-
let
|
|
2560
|
-
const
|
|
2561
|
-
let
|
|
2562
|
-
const
|
|
2563
|
-
return
|
|
2564
|
-
},
|
|
2565
|
-
let
|
|
2566
|
-
if (
|
|
2569
|
+
let wn = !0, Dt = !0, En = !1, xn = !0, ae = !1, ze = !0, de = !1, Ct = !1, Lt = !1, Ee = !1, nt = !1, rt = !1, An = !0, Sn = !1;
|
|
2570
|
+
const Rn = "user-content-";
|
|
2571
|
+
let Mt = !0, Fe = !1, xe = {}, J = null;
|
|
2572
|
+
const $t = b({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
2573
|
+
let On = null;
|
|
2574
|
+
const Nn = b({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
2575
|
+
let Pt = null;
|
|
2576
|
+
const In = b({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), st = "http://www.w3.org/1998/Math/MathML", it = "http://www.w3.org/2000/svg", ee = "http://www.w3.org/1999/xhtml";
|
|
2577
|
+
let Ae = ee, vt = !1, zt = null;
|
|
2578
|
+
const Zr = b({}, [st, it, ee], Yt);
|
|
2579
|
+
let Ft = b({}, ["mi", "mo", "mn", "ms", "mtext"]), Ut = b({}, ["annotation-xml"]);
|
|
2580
|
+
const Xr = b({}, ["title", "style", "font", "a", "script"]);
|
|
2581
|
+
let Ue = null;
|
|
2582
|
+
const Kr = ["application/xhtml+xml", "text/html"], Qr = "text/html";
|
|
2583
|
+
let N = null, Se = null;
|
|
2584
|
+
const Jr = n.createElement("form"), Dn = function(o) {
|
|
2585
|
+
return o instanceof RegExp || o instanceof Function;
|
|
2586
|
+
}, Ht = function() {
|
|
2587
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2588
|
+
if (Se && Se === o)
|
|
2567
2589
|
return;
|
|
2568
|
-
(!
|
|
2569
|
-
|
|
2570
|
-
const u =
|
|
2571
|
-
if (
|
|
2572
|
-
if (typeof
|
|
2573
|
-
throw
|
|
2574
|
-
if (typeof
|
|
2575
|
-
throw
|
|
2576
|
-
|
|
2590
|
+
(!o || typeof o != "object") && (o = {}), o = z(o), Ue = // eslint-disable-next-line unicorn/prefer-includes
|
|
2591
|
+
Kr.indexOf(o.PARSER_MEDIA_TYPE) === -1 ? Qr : o.PARSER_MEDIA_TYPE, N = Ue === "application/xhtml+xml" ? Yt : Ve, R = S(o, "ALLOWED_TAGS") && U(o.ALLOWED_TAGS) ? b({}, o.ALLOWED_TAGS, N) : Nt, D = S(o, "ALLOWED_ATTR") && U(o.ALLOWED_ATTR) ? b({}, o.ALLOWED_ATTR, N) : It, zt = S(o, "ALLOWED_NAMESPACES") && U(o.ALLOWED_NAMESPACES) ? b({}, o.ALLOWED_NAMESPACES, Yt) : Zr, Pt = S(o, "ADD_URI_SAFE_ATTR") && U(o.ADD_URI_SAFE_ATTR) ? b(z(In), o.ADD_URI_SAFE_ATTR, N) : In, On = S(o, "ADD_DATA_URI_TAGS") && U(o.ADD_DATA_URI_TAGS) ? b(z(Nn), o.ADD_DATA_URI_TAGS, N) : Nn, J = S(o, "FORBID_CONTENTS") && U(o.FORBID_CONTENTS) ? b({}, o.FORBID_CONTENTS, N) : $t, ve = S(o, "FORBID_TAGS") && U(o.FORBID_TAGS) ? b({}, o.FORBID_TAGS, N) : z({}), tt = S(o, "FORBID_ATTR") && U(o.FORBID_ATTR) ? b({}, o.FORBID_ATTR, N) : z({}), xe = S(o, "USE_PROFILES") ? o.USE_PROFILES && typeof o.USE_PROFILES == "object" ? z(o.USE_PROFILES) : o.USE_PROFILES : !1, wn = o.ALLOW_ARIA_ATTR !== !1, Dt = o.ALLOW_DATA_ATTR !== !1, En = o.ALLOW_UNKNOWN_PROTOCOLS || !1, xn = o.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ae = o.SAFE_FOR_TEMPLATES || !1, ze = o.SAFE_FOR_XML !== !1, de = o.WHOLE_DOCUMENT || !1, Ee = o.RETURN_DOM || !1, nt = o.RETURN_DOM_FRAGMENT || !1, rt = o.RETURN_TRUSTED_TYPE || !1, Lt = o.FORCE_BODY || !1, An = o.SANITIZE_DOM !== !1, Sn = o.SANITIZE_NAMED_PROPS || !1, Mt = o.KEEP_CONTENT !== !1, Fe = o.IN_PLACE || !1, kn = qi(o.ALLOWED_URI_REGEXP) ? o.ALLOWED_URI_REGEXP : or, Ae = typeof o.NAMESPACE == "string" ? o.NAMESPACE : ee, Ft = S(o, "MATHML_TEXT_INTEGRATION_POINTS") && o.MATHML_TEXT_INTEGRATION_POINTS && typeof o.MATHML_TEXT_INTEGRATION_POINTS == "object" ? z(o.MATHML_TEXT_INTEGRATION_POINTS) : b({}, ["mi", "mo", "mn", "ms", "mtext"]), Ut = S(o, "HTML_INTEGRATION_POINTS") && o.HTML_INTEGRATION_POINTS && typeof o.HTML_INTEGRATION_POINTS == "object" ? z(o.HTML_INTEGRATION_POINTS) : b({}, ["annotation-xml"]);
|
|
2592
|
+
const u = S(o, "CUSTOM_ELEMENT_HANDLING") && o.CUSTOM_ELEMENT_HANDLING && typeof o.CUSTOM_ELEMENT_HANDLING == "object" ? z(o.CUSTOM_ELEMENT_HANDLING) : Me(null);
|
|
2593
|
+
if (O = Me(null), S(u, "tagNameCheck") && Dn(u.tagNameCheck) && (O.tagNameCheck = u.tagNameCheck), S(u, "attributeNameCheck") && Dn(u.attributeNameCheck) && (O.attributeNameCheck = u.attributeNameCheck), S(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), ae && (Dt = !1), nt && (Ee = !0), xe && (R = b({}, rr), D = Me(null), xe.html === !0 && (b(R, nr), b(D, sr)), xe.svg === !0 && (b(R, Zt), b(D, Qt), b(D, ft)), xe.svgFilters === !0 && (b(R, Xt), b(D, Qt), b(D, ft)), xe.mathMl === !0 && (b(R, Kt), b(D, ir), b(D, ft))), le.tagCheck = null, le.attributeCheck = null, S(o, "ADD_TAGS") && (typeof o.ADD_TAGS == "function" ? le.tagCheck = o.ADD_TAGS : U(o.ADD_TAGS) && (R === Nt && (R = z(R)), b(R, o.ADD_TAGS, N))), S(o, "ADD_ATTR") && (typeof o.ADD_ATTR == "function" ? le.attributeCheck = o.ADD_ATTR : U(o.ADD_ATTR) && (D === It && (D = z(D)), b(D, o.ADD_ATTR, N))), S(o, "ADD_URI_SAFE_ATTR") && U(o.ADD_URI_SAFE_ATTR) && b(Pt, o.ADD_URI_SAFE_ATTR, N), S(o, "FORBID_CONTENTS") && U(o.FORBID_CONTENTS) && (J === $t && (J = z(J)), b(J, o.FORBID_CONTENTS, N)), S(o, "ADD_FORBID_CONTENTS") && U(o.ADD_FORBID_CONTENTS) && (J === $t && (J = z(J)), b(J, o.ADD_FORBID_CONTENTS, N)), Mt && (R["#text"] = !0), de && b(R, ["html", "head", "body"]), R.table && (b(R, ["tbody"]), delete ve.tbody), o.TRUSTED_TYPES_POLICY) {
|
|
2594
|
+
if (typeof o.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
2595
|
+
throw De('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2596
|
+
if (typeof o.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
2597
|
+
throw De('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2598
|
+
const d = v;
|
|
2599
|
+
v = o.TRUSTED_TYPES_POLICY;
|
|
2600
|
+
try {
|
|
2601
|
+
Z = we("");
|
|
2602
|
+
} catch (k) {
|
|
2603
|
+
throw v = d, k;
|
|
2604
|
+
}
|
|
2577
2605
|
} else
|
|
2578
|
-
|
|
2579
|
-
z && z(
|
|
2580
|
-
},
|
|
2581
|
-
let u =
|
|
2606
|
+
v === void 0 && o.TRUSTED_TYPES_POLICY !== null && (v = oo(f, s)), v && typeof Z == "string" && (Z = we(""));
|
|
2607
|
+
(M.uponSanitizeElement.length > 0 || M.uponSanitizeAttribute.length > 0) && R === Nt && (R = z(R)), M.uponSanitizeAttribute.length > 0 && D === It && (D = z(D)), H && H(o), Se = o;
|
|
2608
|
+
}, Cn = b({}, [...Zt, ...Xt, ...Yi]), Ln = b({}, [...Kt, ...Zi]), es = function(o) {
|
|
2609
|
+
let u = oe(o);
|
|
2582
2610
|
(!u || !u.tagName) && (u = {
|
|
2583
|
-
namespaceURI:
|
|
2611
|
+
namespaceURI: Ae,
|
|
2584
2612
|
tagName: "template"
|
|
2585
2613
|
});
|
|
2586
|
-
const d =
|
|
2587
|
-
return
|
|
2588
|
-
},
|
|
2589
|
-
|
|
2590
|
-
element:
|
|
2614
|
+
const d = Ve(o.tagName), k = Ve(u.tagName);
|
|
2615
|
+
return zt[o.namespaceURI] ? o.namespaceURI === it ? u.namespaceURI === ee ? d === "svg" : u.namespaceURI === st ? d === "svg" && (k === "annotation-xml" || Ft[k]) : !!Cn[d] : o.namespaceURI === st ? u.namespaceURI === ee ? d === "math" : u.namespaceURI === it ? d === "math" && Ut[k] : !!Ln[d] : o.namespaceURI === ee ? u.namespaceURI === it && !Ut[k] || u.namespaceURI === st && !Ft[k] ? !1 : !Ln[d] && (Xr[d] || !Cn[d]) : !!(Ue === "application/xhtml+xml" && zt[o.namespaceURI]) : !1;
|
|
2616
|
+
}, X = function(o) {
|
|
2617
|
+
Ne(e.removed, {
|
|
2618
|
+
element: o
|
|
2591
2619
|
});
|
|
2592
2620
|
try {
|
|
2593
|
-
|
|
2621
|
+
oe(o).removeChild(o);
|
|
2594
2622
|
} catch {
|
|
2595
|
-
|
|
2623
|
+
_(o);
|
|
2596
2624
|
}
|
|
2597
|
-
},
|
|
2625
|
+
}, me = function(o, u) {
|
|
2598
2626
|
try {
|
|
2599
|
-
|
|
2600
|
-
attribute: u.getAttributeNode(
|
|
2627
|
+
Ne(e.removed, {
|
|
2628
|
+
attribute: u.getAttributeNode(o),
|
|
2601
2629
|
from: u
|
|
2602
2630
|
});
|
|
2603
2631
|
} catch {
|
|
2604
|
-
|
|
2632
|
+
Ne(e.removed, {
|
|
2605
2633
|
attribute: null,
|
|
2606
2634
|
from: u
|
|
2607
2635
|
});
|
|
2608
2636
|
}
|
|
2609
|
-
if (u.removeAttribute(
|
|
2610
|
-
if (
|
|
2637
|
+
if (u.removeAttribute(o), o === "is")
|
|
2638
|
+
if (Ee || nt)
|
|
2611
2639
|
try {
|
|
2612
|
-
|
|
2640
|
+
X(u);
|
|
2613
2641
|
} catch {
|
|
2614
2642
|
}
|
|
2615
2643
|
else
|
|
2616
2644
|
try {
|
|
2617
|
-
u.setAttribute(
|
|
2645
|
+
u.setAttribute(o, "");
|
|
2618
2646
|
} catch {
|
|
2619
2647
|
}
|
|
2620
|
-
},
|
|
2648
|
+
}, Mn = function(o) {
|
|
2621
2649
|
let u = null, d = null;
|
|
2622
|
-
if (
|
|
2623
|
-
|
|
2650
|
+
if (Lt)
|
|
2651
|
+
o = "<remove></remove>" + o;
|
|
2624
2652
|
else {
|
|
2625
|
-
const
|
|
2626
|
-
d =
|
|
2653
|
+
const x = Qn(o, /^[\r\n\t ]+/);
|
|
2654
|
+
d = x && x[0];
|
|
2627
2655
|
}
|
|
2628
|
-
|
|
2629
|
-
const k =
|
|
2630
|
-
if (
|
|
2656
|
+
Ue === "application/xhtml+xml" && Ae === ee && (o = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + o + "</body></html>");
|
|
2657
|
+
const k = v ? we(o) : o;
|
|
2658
|
+
if (Ae === ee)
|
|
2631
2659
|
try {
|
|
2632
|
-
u = new
|
|
2660
|
+
u = new p().parseFromString(k, Ue);
|
|
2633
2661
|
} catch {
|
|
2634
2662
|
}
|
|
2635
2663
|
if (!u || !u.documentElement) {
|
|
2636
|
-
u =
|
|
2664
|
+
u = Ot.createDocument(Ae, "template", null);
|
|
2637
2665
|
try {
|
|
2638
|
-
u.documentElement.innerHTML =
|
|
2666
|
+
u.documentElement.innerHTML = vt ? Z : k;
|
|
2639
2667
|
} catch {
|
|
2640
2668
|
}
|
|
2641
2669
|
}
|
|
2642
|
-
const
|
|
2643
|
-
return
|
|
2644
|
-
},
|
|
2645
|
-
return
|
|
2646
|
-
|
|
2647
|
-
|
|
2670
|
+
const T = u.body || u.documentElement;
|
|
2671
|
+
return o && d && T.insertBefore(n.createTextNode(d), T.childNodes[0] || null), Ae === ee ? jr.call(u, de ? "html" : "body")[0] : de ? u.documentElement : T;
|
|
2672
|
+
}, $n = function(o) {
|
|
2673
|
+
return _n.call(
|
|
2674
|
+
o.ownerDocument || o,
|
|
2675
|
+
o,
|
|
2676
|
+
// eslint-disable-next-line no-bitwise
|
|
2677
|
+
c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION,
|
|
2678
|
+
null
|
|
2679
|
+
);
|
|
2680
|
+
}, Bt = function(o) {
|
|
2681
|
+
var u, d;
|
|
2682
|
+
o.normalize();
|
|
2683
|
+
const k = _n.call(
|
|
2684
|
+
o.ownerDocument || o,
|
|
2685
|
+
o,
|
|
2648
2686
|
// eslint-disable-next-line no-bitwise
|
|
2649
|
-
|
|
2687
|
+
c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION,
|
|
2650
2688
|
null
|
|
2651
2689
|
);
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2690
|
+
let T = k.nextNode();
|
|
2691
|
+
for (; T; ) {
|
|
2692
|
+
let L = T.data;
|
|
2693
|
+
ge([Qe, Je, et], (V) => {
|
|
2694
|
+
L = Ie(L, V, " ");
|
|
2695
|
+
}), T.data = L, T = k.nextNode();
|
|
2696
|
+
}
|
|
2697
|
+
const x = (u = (d = o.querySelectorAll) === null || d === void 0 ? void 0 : d.call(o, "template")) !== null && u !== void 0 ? u : [];
|
|
2698
|
+
ge(Array.from(x), (L) => {
|
|
2699
|
+
Re(L.content) && Bt(L.content);
|
|
2700
|
+
});
|
|
2701
|
+
}, ot = function(o) {
|
|
2702
|
+
const u = Q ? Q(o) : null;
|
|
2703
|
+
return typeof u != "string" || N(u) !== "form" ? !1 : typeof o.nodeName != "string" || typeof o.textContent != "string" || typeof o.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
|
|
2704
|
+
// prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
|
|
2705
|
+
// makes the direct read diverge from the cached read; a clean form
|
|
2706
|
+
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
2707
|
+
// canonical NamedNodeMap.
|
|
2708
|
+
o.attributes !== Xe(o) || typeof o.removeAttribute != "function" || typeof o.setAttribute != "function" || typeof o.namespaceURI != "string" || typeof o.insertBefore != "function" || typeof o.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
2709
|
+
// returns the integer 1 for any Element regardless of realm; direct
|
|
2710
|
+
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
2711
|
+
// the named child element. Cheap addition — nodeType is read from
|
|
2712
|
+
// an internal slot, no serialization cost — and removes a residual
|
|
2713
|
+
// clobbering surface used by several mXSS / PI / comment branches
|
|
2714
|
+
// in _sanitizeElements that compare currentNode.nodeType directly.
|
|
2715
|
+
o.nodeType !== B(o) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
|
|
2716
|
+
// "childNodes" shadows the prototype getter. Direct reads of
|
|
2717
|
+
// form.childNodes from a clobbered form return the named child
|
|
2718
|
+
// instead of the real NodeList, so any walk that reads it directly
|
|
2719
|
+
// skips the form's real children. Compare the direct read to the
|
|
2720
|
+
// cached Node.prototype getter — when the form's named-property
|
|
2721
|
+
// getter intercepts the read, the two values differ and we flag
|
|
2722
|
+
// the form. This catches every clobbering child type (input,
|
|
2723
|
+
// select, etc.) regardless of whether the named child happens to
|
|
2724
|
+
// carry a numeric .length, which a typeof-based probe would miss
|
|
2725
|
+
// (e.g. HTMLSelectElement.length is a defined unsigned-long).
|
|
2726
|
+
o.childNodes !== F(o);
|
|
2727
|
+
}, Re = function(o) {
|
|
2728
|
+
if (!B || typeof o != "object" || o === null)
|
|
2729
|
+
return !1;
|
|
2730
|
+
try {
|
|
2731
|
+
return B(o) === te.documentFragment;
|
|
2732
|
+
} catch {
|
|
2733
|
+
return !1;
|
|
2734
|
+
}
|
|
2735
|
+
}, lt = function(o) {
|
|
2736
|
+
if (!B || typeof o != "object" || o === null)
|
|
2737
|
+
return !1;
|
|
2738
|
+
try {
|
|
2739
|
+
return typeof B(o) == "number";
|
|
2740
|
+
} catch {
|
|
2741
|
+
return !1;
|
|
2742
|
+
}
|
|
2656
2743
|
};
|
|
2657
|
-
function
|
|
2658
|
-
|
|
2659
|
-
d.call(e,
|
|
2744
|
+
function se(g, o, u) {
|
|
2745
|
+
ge(g, (d) => {
|
|
2746
|
+
d.call(e, o, u, Se);
|
|
2660
2747
|
});
|
|
2661
2748
|
}
|
|
2662
|
-
const
|
|
2749
|
+
const Pn = function(o) {
|
|
2663
2750
|
let u = null;
|
|
2664
|
-
if (
|
|
2665
|
-
return
|
|
2666
|
-
const d =
|
|
2667
|
-
if (
|
|
2751
|
+
if (se(M.beforeSanitizeElements, o, null), ot(o))
|
|
2752
|
+
return X(o), !0;
|
|
2753
|
+
const d = N(Q ? Q(o) : o.nodeName);
|
|
2754
|
+
if (se(M.uponSanitizeElement, o, {
|
|
2668
2755
|
tagName: d,
|
|
2669
|
-
allowedTags:
|
|
2670
|
-
}),
|
|
2671
|
-
return
|
|
2672
|
-
if (
|
|
2673
|
-
if (!
|
|
2756
|
+
allowedTags: R
|
|
2757
|
+
}), ze && o.hasChildNodes() && !lt(o.firstElementChild) && P(/<[/\w!]/g, o.innerHTML) && P(/<[/\w!]/g, o.textContent) || ze && o.namespaceURI === ee && d === "style" && lt(o.firstElementChild) || o.nodeType === te.progressingInstruction || ze && o.nodeType === te.comment && P(/<[/\w]/g, o.data))
|
|
2758
|
+
return X(o), !0;
|
|
2759
|
+
if (ve[d] || !(le.tagCheck instanceof Function && le.tagCheck(d)) && !R[d]) {
|
|
2760
|
+
if (!ve[d] && zn(d) && (O.tagNameCheck instanceof RegExp && P(O.tagNameCheck, d) || O.tagNameCheck instanceof Function && O.tagNameCheck(d)))
|
|
2674
2761
|
return !1;
|
|
2675
|
-
if (
|
|
2676
|
-
const
|
|
2677
|
-
if (
|
|
2678
|
-
const
|
|
2679
|
-
for (let
|
|
2680
|
-
const
|
|
2681
|
-
|
|
2762
|
+
if (Mt && !J[d]) {
|
|
2763
|
+
const T = oe(o), x = F(o);
|
|
2764
|
+
if (x && T) {
|
|
2765
|
+
const L = x.length;
|
|
2766
|
+
for (let V = L - 1; V >= 0; --V) {
|
|
2767
|
+
const K = y(x[V], !0);
|
|
2768
|
+
T.insertBefore(K, I(o));
|
|
2682
2769
|
}
|
|
2683
2770
|
}
|
|
2684
2771
|
}
|
|
2685
|
-
return
|
|
2772
|
+
return X(o), !0;
|
|
2686
2773
|
}
|
|
2687
|
-
return
|
|
2688
|
-
u =
|
|
2689
|
-
}),
|
|
2690
|
-
element:
|
|
2691
|
-
}),
|
|
2692
|
-
},
|
|
2693
|
-
if (
|
|
2774
|
+
return (B ? B(o) : o.nodeType) === te.element && !es(o) || (d === "noscript" || d === "noembed" || d === "noframes") && P(/<\/no(script|embed|frames)/i, o.innerHTML) ? (X(o), !0) : (ae && o.nodeType === te.text && (u = o.textContent, ge([Qe, Je, et], (T) => {
|
|
2775
|
+
u = Ie(u, T, " ");
|
|
2776
|
+
}), o.textContent !== u && (Ne(e.removed, {
|
|
2777
|
+
element: o.cloneNode()
|
|
2778
|
+
}), o.textContent = u)), se(M.afterSanitizeElements, o, null), !1);
|
|
2779
|
+
}, vn = function(o, u, d) {
|
|
2780
|
+
if (tt[u] || An && (u === "id" || u === "name") && (d in n || d in Jr))
|
|
2694
2781
|
return !1;
|
|
2695
|
-
const k =
|
|
2696
|
-
if (!(
|
|
2697
|
-
if (!(
|
|
2698
|
-
if (!k ||
|
|
2782
|
+
const k = D[u] || le.attributeCheck instanceof Function && le.attributeCheck(u, o);
|
|
2783
|
+
if (!(Dt && !tt[u] && P(Wr, u))) {
|
|
2784
|
+
if (!(wn && P(Gr, u))) {
|
|
2785
|
+
if (!k || tt[u]) {
|
|
2699
2786
|
if (
|
|
2700
2787
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
2701
2788
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2702
2789
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
2703
|
-
!(
|
|
2790
|
+
!(zn(o) && (O.tagNameCheck instanceof RegExp && P(O.tagNameCheck, o) || O.tagNameCheck instanceof Function && O.tagNameCheck(o)) && (O.attributeNameCheck instanceof RegExp && P(O.attributeNameCheck, u) || O.attributeNameCheck instanceof Function && O.attributeNameCheck(u, o)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
2704
2791
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2705
|
-
u === "is" &&
|
|
2792
|
+
u === "is" && O.allowCustomizedBuiltInElements && (O.tagNameCheck instanceof RegExp && P(O.tagNameCheck, d) || O.tagNameCheck instanceof Function && O.tagNameCheck(d)))
|
|
2706
2793
|
) return !1;
|
|
2707
|
-
} else if (!
|
|
2708
|
-
if (
|
|
2709
|
-
if (!((u === "src" || u === "xlink:href" || u === "href") &&
|
|
2710
|
-
if (!(
|
|
2794
|
+
} else if (!Pt[u]) {
|
|
2795
|
+
if (!P(kn, Ie(d, Tn, ""))) {
|
|
2796
|
+
if (!((u === "src" || u === "xlink:href" || u === "href") && o !== "script" && Jn(d, "data:") === 0 && On[o])) {
|
|
2797
|
+
if (!(En && !P(qr, Ie(d, Tn, "")))) {
|
|
2711
2798
|
if (d)
|
|
2712
2799
|
return !1;
|
|
2713
2800
|
}
|
|
@@ -2717,226 +2804,232 @@ function $r() {
|
|
|
2717
2804
|
}
|
|
2718
2805
|
}
|
|
2719
2806
|
return !0;
|
|
2720
|
-
},
|
|
2721
|
-
return !
|
|
2722
|
-
},
|
|
2723
|
-
|
|
2724
|
-
const u =
|
|
2725
|
-
if (!u ||
|
|
2807
|
+
}, ts = b({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), zn = function(o) {
|
|
2808
|
+
return !ts[Ve(o)] && P(Yr, o);
|
|
2809
|
+
}, Fn = function(o) {
|
|
2810
|
+
se(M.beforeSanitizeAttributes, o, null);
|
|
2811
|
+
const u = o.attributes;
|
|
2812
|
+
if (!u || ot(o))
|
|
2726
2813
|
return;
|
|
2727
2814
|
const d = {
|
|
2728
2815
|
attrName: "",
|
|
2729
2816
|
attrValue: "",
|
|
2730
2817
|
keepAttr: !0,
|
|
2731
|
-
allowedAttributes:
|
|
2818
|
+
allowedAttributes: D,
|
|
2732
2819
|
forceKeepAttr: void 0
|
|
2733
2820
|
};
|
|
2734
2821
|
let k = u.length;
|
|
2735
2822
|
for (; k--; ) {
|
|
2736
|
-
const
|
|
2737
|
-
let
|
|
2738
|
-
if (d.attrName =
|
|
2739
|
-
|
|
2823
|
+
const T = u[k], x = T.name, L = T.namespaceURI, V = T.value, K = N(x), jt = V;
|
|
2824
|
+
let $ = x === "value" ? jt : Hi(jt);
|
|
2825
|
+
if (d.attrName = K, d.attrValue = $, d.keepAttr = !0, d.forceKeepAttr = void 0, se(M.uponSanitizeAttribute, o, d), $ = d.attrValue, Sn && (K === "id" || K === "name") && Jn($, Rn) !== 0 && (me(x, o), $ = Rn + $), ze && P(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, $)) {
|
|
2826
|
+
me(x, o);
|
|
2740
2827
|
continue;
|
|
2741
2828
|
}
|
|
2742
|
-
if (
|
|
2743
|
-
|
|
2829
|
+
if (K === "attributename" && Qn($, "href")) {
|
|
2830
|
+
me(x, o);
|
|
2744
2831
|
continue;
|
|
2745
2832
|
}
|
|
2746
2833
|
if (d.forceKeepAttr)
|
|
2747
2834
|
continue;
|
|
2748
2835
|
if (!d.keepAttr) {
|
|
2749
|
-
|
|
2836
|
+
me(x, o);
|
|
2750
2837
|
continue;
|
|
2751
2838
|
}
|
|
2752
|
-
if (!
|
|
2753
|
-
|
|
2839
|
+
if (!xn && P(/\/>/i, $)) {
|
|
2840
|
+
me(x, o);
|
|
2754
2841
|
continue;
|
|
2755
2842
|
}
|
|
2756
|
-
|
|
2757
|
-
|
|
2843
|
+
ae && ge([Qe, Je, et], (Hn) => {
|
|
2844
|
+
$ = Ie($, Hn, " ");
|
|
2758
2845
|
});
|
|
2759
|
-
const
|
|
2760
|
-
if (!
|
|
2761
|
-
|
|
2846
|
+
const Un = N(o.nodeName);
|
|
2847
|
+
if (!vn(Un, K, $)) {
|
|
2848
|
+
me(x, o);
|
|
2762
2849
|
continue;
|
|
2763
2850
|
}
|
|
2764
|
-
if (
|
|
2765
|
-
switch (
|
|
2851
|
+
if (v && typeof f == "object" && typeof f.getAttributeType == "function" && !L)
|
|
2852
|
+
switch (f.getAttributeType(Un, K)) {
|
|
2766
2853
|
case "TrustedHTML": {
|
|
2767
|
-
|
|
2854
|
+
$ = we($);
|
|
2768
2855
|
break;
|
|
2769
2856
|
}
|
|
2770
2857
|
case "TrustedScriptURL": {
|
|
2771
|
-
|
|
2858
|
+
$ = v.createScriptURL($);
|
|
2772
2859
|
break;
|
|
2773
2860
|
}
|
|
2774
2861
|
}
|
|
2775
|
-
if (
|
|
2862
|
+
if ($ !== jt)
|
|
2776
2863
|
try {
|
|
2777
|
-
|
|
2864
|
+
L ? o.setAttributeNS(L, x, $) : o.setAttribute(x, $), ot(o) ? X(o) : Kn(e.removed);
|
|
2778
2865
|
} catch {
|
|
2779
|
-
|
|
2866
|
+
me(x, o);
|
|
2780
2867
|
}
|
|
2781
2868
|
}
|
|
2782
|
-
|
|
2783
|
-
},
|
|
2869
|
+
se(M.afterSanitizeAttributes, o, null);
|
|
2870
|
+
}, at = function(o) {
|
|
2784
2871
|
let u = null;
|
|
2785
|
-
const d =
|
|
2786
|
-
for (
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2872
|
+
const d = $n(o);
|
|
2873
|
+
for (se(M.beforeSanitizeShadowDOM, o, null); u = d.nextNode(); )
|
|
2874
|
+
if (se(M.uponSanitizeShadowNode, u, null), Pn(u), Fn(u), Re(u.content) && at(u.content), (B ? B(u) : u.nodeType) === te.element) {
|
|
2875
|
+
const T = he ? he(u) : u.shadowRoot;
|
|
2876
|
+
Re(T) && (Oe(T), at(T));
|
|
2877
|
+
}
|
|
2878
|
+
se(M.afterSanitizeShadowDOM, o, null);
|
|
2879
|
+
}, Oe = function(o) {
|
|
2880
|
+
const u = B ? B(o) : o.nodeType;
|
|
2881
|
+
if (u === te.element) {
|
|
2882
|
+
const T = he ? he(o) : o.shadowRoot;
|
|
2883
|
+
Re(T) && (Oe(T), at(T));
|
|
2793
2884
|
}
|
|
2794
|
-
const
|
|
2795
|
-
if (!
|
|
2885
|
+
const d = F ? F(o) : o.childNodes;
|
|
2886
|
+
if (!d)
|
|
2796
2887
|
return;
|
|
2797
|
-
const
|
|
2798
|
-
|
|
2799
|
-
|
|
2888
|
+
const k = [];
|
|
2889
|
+
ge(d, (T) => {
|
|
2890
|
+
Ne(k, T);
|
|
2800
2891
|
});
|
|
2801
|
-
for (const
|
|
2802
|
-
|
|
2892
|
+
for (const T of k)
|
|
2893
|
+
Oe(T);
|
|
2894
|
+
if (u === te.element) {
|
|
2895
|
+
const T = Q ? Q(o) : null;
|
|
2896
|
+
if (typeof T == "string" && N(T) === "template") {
|
|
2897
|
+
const x = o.content;
|
|
2898
|
+
Re(x) && Oe(x);
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2803
2901
|
};
|
|
2804
2902
|
return e.sanitize = function(g) {
|
|
2805
|
-
let
|
|
2806
|
-
if (
|
|
2807
|
-
throw
|
|
2903
|
+
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, d = null, k = null, T = null;
|
|
2904
|
+
if (vt = !g, vt && (g = "<!-->"), typeof g != "string" && !lt(g) && (g = Gi(g), typeof g != "string"))
|
|
2905
|
+
throw De("dirty is not a string, aborting");
|
|
2808
2906
|
if (!e.isSupported)
|
|
2809
2907
|
return g;
|
|
2810
|
-
if (
|
|
2811
|
-
const
|
|
2812
|
-
if (typeof
|
|
2813
|
-
const
|
|
2814
|
-
if (!
|
|
2815
|
-
throw
|
|
2908
|
+
if (Ct || Ht(o), e.removed = [], typeof g == "string" && (Fe = !1), Fe) {
|
|
2909
|
+
const V = Q ? Q(g) : g.nodeName;
|
|
2910
|
+
if (typeof V == "string") {
|
|
2911
|
+
const K = N(V);
|
|
2912
|
+
if (!R[K] || ve[K])
|
|
2913
|
+
throw De("root node is forbidden and cannot be sanitized in-place");
|
|
2816
2914
|
}
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2915
|
+
if (ot(g))
|
|
2916
|
+
throw De("root node is clobbered and cannot be sanitized in-place");
|
|
2917
|
+
Oe(g);
|
|
2918
|
+
} else if (lt(g))
|
|
2919
|
+
u = Mn("<!---->"), d = u.ownerDocument.importNode(g, !0), d.nodeType === te.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? u = d : u.appendChild(d), Oe(d);
|
|
2820
2920
|
else {
|
|
2821
|
-
if (!
|
|
2921
|
+
if (!Ee && !ae && !de && // eslint-disable-next-line unicorn/prefer-includes
|
|
2822
2922
|
g.indexOf("<") === -1)
|
|
2823
|
-
return
|
|
2824
|
-
if (u =
|
|
2825
|
-
return
|
|
2923
|
+
return v && rt ? we(g) : g;
|
|
2924
|
+
if (u = Mn(g), !u)
|
|
2925
|
+
return Ee ? null : rt ? Z : "";
|
|
2826
2926
|
}
|
|
2827
|
-
u &&
|
|
2828
|
-
const
|
|
2829
|
-
for (; k =
|
|
2830
|
-
|
|
2831
|
-
if (
|
|
2832
|
-
return g;
|
|
2833
|
-
if (
|
|
2834
|
-
if (
|
|
2835
|
-
u.
|
|
2836
|
-
|
|
2837
|
-
Te([qe, Ye, Ze], (Z) => {
|
|
2838
|
-
j = xe(j, Z, " ");
|
|
2839
|
-
}), u.innerHTML = j;
|
|
2840
|
-
}
|
|
2841
|
-
if (Ke)
|
|
2842
|
-
for (D = vr.call(u.ownerDocument); u.firstChild; )
|
|
2843
|
-
D.appendChild(u.firstChild);
|
|
2927
|
+
u && Lt && X(u.firstChild);
|
|
2928
|
+
const x = $n(Fe ? g : u);
|
|
2929
|
+
for (; k = x.nextNode(); )
|
|
2930
|
+
Pn(k), Fn(k), Re(k.content) && at(k.content);
|
|
2931
|
+
if (Fe)
|
|
2932
|
+
return ae && Bt(g), g;
|
|
2933
|
+
if (Ee) {
|
|
2934
|
+
if (ae && Bt(u), nt)
|
|
2935
|
+
for (T = Br.call(u.ownerDocument); u.firstChild; )
|
|
2936
|
+
T.appendChild(u.firstChild);
|
|
2844
2937
|
else
|
|
2845
|
-
|
|
2846
|
-
return (
|
|
2938
|
+
T = u;
|
|
2939
|
+
return (D.shadowroot || D.shadowrootmode) && (T = Vr.call(r, T, !0)), T;
|
|
2847
2940
|
}
|
|
2848
|
-
let
|
|
2849
|
-
return
|
|
2850
|
-
` +
|
|
2851
|
-
|
|
2852
|
-
}),
|
|
2941
|
+
let L = de ? u.outerHTML : u.innerHTML;
|
|
2942
|
+
return de && R["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && P(ro, u.ownerDocument.doctype.name) && (L = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
|
|
2943
|
+
` + L), ae && ge([Qe, Je, et], (V) => {
|
|
2944
|
+
L = Ie(L, V, " ");
|
|
2945
|
+
}), v && rt ? we(L) : L;
|
|
2853
2946
|
}, e.setConfig = function() {
|
|
2854
2947
|
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2855
|
-
|
|
2948
|
+
Ht(g), Ct = !0;
|
|
2856
2949
|
}, e.clearConfig = function() {
|
|
2857
|
-
|
|
2858
|
-
}, e.isValidAttribute = function(g,
|
|
2859
|
-
|
|
2860
|
-
const d =
|
|
2861
|
-
return
|
|
2862
|
-
}, e.addHook = function(g,
|
|
2863
|
-
typeof
|
|
2864
|
-
}, e.removeHook = function(g,
|
|
2865
|
-
if (
|
|
2866
|
-
const u =
|
|
2867
|
-
return u === -1 ? void 0 :
|
|
2950
|
+
Se = null, Ct = !1;
|
|
2951
|
+
}, e.isValidAttribute = function(g, o, u) {
|
|
2952
|
+
Se || Ht({});
|
|
2953
|
+
const d = N(g), k = N(o);
|
|
2954
|
+
return vn(d, k, u);
|
|
2955
|
+
}, e.addHook = function(g, o) {
|
|
2956
|
+
typeof o == "function" && Ne(M[g], o);
|
|
2957
|
+
}, e.removeHook = function(g, o) {
|
|
2958
|
+
if (o !== void 0) {
|
|
2959
|
+
const u = Fi(M[g], o);
|
|
2960
|
+
return u === -1 ? void 0 : Ui(M[g], u, 1)[0];
|
|
2868
2961
|
}
|
|
2869
|
-
return
|
|
2962
|
+
return Kn(M[g]);
|
|
2870
2963
|
}, e.removeHooks = function(g) {
|
|
2871
|
-
|
|
2964
|
+
M[g] = [];
|
|
2872
2965
|
}, e.removeAllHooks = function() {
|
|
2873
|
-
|
|
2966
|
+
M = lr();
|
|
2874
2967
|
}, e;
|
|
2875
2968
|
}
|
|
2876
|
-
|
|
2877
|
-
function
|
|
2969
|
+
Hr();
|
|
2970
|
+
function lo(t, e = "") {
|
|
2878
2971
|
const n = {}, r = t;
|
|
2879
|
-
return Array.isArray(r.fields) ? Object.assign(n,
|
|
2972
|
+
return Array.isArray(r.fields) ? Object.assign(n, xt(r, e)) : t.type === "array" && t.elements ? Object.assign(n, At(t, e)) : t.type === "map" && t.values && Object.assign(n, St(t, e)), n;
|
|
2880
2973
|
}
|
|
2881
|
-
function
|
|
2974
|
+
function xt(t, e = "") {
|
|
2882
2975
|
const n = {};
|
|
2883
2976
|
if (Array.isArray(t.fields))
|
|
2884
2977
|
for (const r of t.fields) {
|
|
2885
|
-
const s = Object.keys(r)[0], i = r[s],
|
|
2886
|
-
if (n[
|
|
2887
|
-
const a =
|
|
2978
|
+
const s = Object.keys(r)[0], i = r[s], l = e ? fe(e, s) : s;
|
|
2979
|
+
if (n[l] = i, i.type === "record" && Array.isArray(i.fields)) {
|
|
2980
|
+
const a = xt(i, l);
|
|
2888
2981
|
Object.assign(n, a);
|
|
2889
2982
|
} else if (i.type === "array" && i.elements) {
|
|
2890
|
-
const a =
|
|
2983
|
+
const a = At(i, l);
|
|
2891
2984
|
Object.assign(n, a);
|
|
2892
2985
|
} else if (i.type === "map" && i.values) {
|
|
2893
|
-
const a =
|
|
2986
|
+
const a = St(i, l);
|
|
2894
2987
|
Object.assign(n, a);
|
|
2895
2988
|
}
|
|
2896
2989
|
}
|
|
2897
2990
|
return n;
|
|
2898
2991
|
}
|
|
2899
|
-
function
|
|
2992
|
+
function At(t, e = "") {
|
|
2900
2993
|
const n = {};
|
|
2901
2994
|
if (t.elements) {
|
|
2902
|
-
const r = t.elements, s =
|
|
2995
|
+
const r = t.elements, s = fe(e, Sr);
|
|
2903
2996
|
if (n[s] = r, r.type === "record" && Array.isArray(r.fields)) {
|
|
2904
|
-
const i =
|
|
2997
|
+
const i = xt(r, s);
|
|
2905
2998
|
Object.assign(n, i);
|
|
2906
2999
|
} else if (r.type === "array" && r.elements) {
|
|
2907
|
-
const i =
|
|
3000
|
+
const i = At(r, s);
|
|
2908
3001
|
Object.assign(n, i);
|
|
2909
3002
|
} else if (r.type === "map" && r.values) {
|
|
2910
|
-
const i =
|
|
3003
|
+
const i = St(r, s);
|
|
2911
3004
|
Object.assign(n, i);
|
|
2912
3005
|
}
|
|
2913
3006
|
}
|
|
2914
3007
|
return n;
|
|
2915
3008
|
}
|
|
2916
|
-
function
|
|
2917
|
-
const n = {}, r =
|
|
3009
|
+
function St(t, e = "") {
|
|
3010
|
+
const n = {}, r = fe(e, Rr);
|
|
2918
3011
|
if (n[r] = t.values, t.values.type === "record" && Array.isArray(t.values.fields)) {
|
|
2919
|
-
const s =
|
|
3012
|
+
const s = xt(t.values, r);
|
|
2920
3013
|
Object.assign(n, s);
|
|
2921
3014
|
} else if ((t.values.type === "array" || t.values.type === "set") && t.values.elements) {
|
|
2922
|
-
const s =
|
|
3015
|
+
const s = At(t.values, r);
|
|
2923
3016
|
Object.assign(n, s);
|
|
2924
3017
|
} else if (t.values.type === "map" && t.values.values) {
|
|
2925
|
-
const s =
|
|
3018
|
+
const s = St(t.values, r);
|
|
2926
3019
|
Object.assign(n, s);
|
|
2927
3020
|
}
|
|
2928
3021
|
return n;
|
|
2929
3022
|
}
|
|
2930
|
-
function
|
|
2931
|
-
const n =
|
|
3023
|
+
function yn(t, e) {
|
|
3024
|
+
const n = Zs(t), r = [];
|
|
2932
3025
|
for (let s = 0; s < n.length; s++) {
|
|
2933
|
-
const i = n[s],
|
|
2934
|
-
(a == null ? void 0 : a.type) === "map" ? r.push(
|
|
3026
|
+
const i = n[s], l = r.length > 0 ? fe(...r) : "", a = l ? e[l] : void 0;
|
|
3027
|
+
(a == null ? void 0 : a.type) === "map" ? r.push(Rr) : (a == null ? void 0 : a.type) === "array" ? r.push(Sr) : r.push(i);
|
|
2935
3028
|
}
|
|
2936
|
-
return
|
|
3029
|
+
return fe(...r);
|
|
2937
3030
|
}
|
|
2938
|
-
function
|
|
2939
|
-
if (
|
|
3031
|
+
function ao(t) {
|
|
3032
|
+
if (Ks(t)) return "enum";
|
|
2940
3033
|
switch (t.type) {
|
|
2941
3034
|
case "string":
|
|
2942
3035
|
return "string";
|
|
@@ -2946,7 +3039,7 @@ function ro(t) {
|
|
|
2946
3039
|
case "boolean":
|
|
2947
3040
|
return "boolean";
|
|
2948
3041
|
case "set":
|
|
2949
|
-
return
|
|
3042
|
+
return Xs(t) ? "tag" : "enum";
|
|
2950
3043
|
case "array":
|
|
2951
3044
|
return "array";
|
|
2952
3045
|
case "record":
|
|
@@ -2961,48 +3054,48 @@ function ro(t) {
|
|
|
2961
3054
|
throw new Error(`Unknown field type: ${t.type}`);
|
|
2962
3055
|
}
|
|
2963
3056
|
}
|
|
2964
|
-
function*
|
|
3057
|
+
function* ho(t, e, n, r = "") {
|
|
2965
3058
|
for (const s of t) {
|
|
2966
|
-
const i = Object.keys(s)[0],
|
|
3059
|
+
const i = Object.keys(s)[0], l = r ? fe(r, i) : i, a = ss(e, i);
|
|
2967
3060
|
if (a === void 0) continue;
|
|
2968
|
-
const c =
|
|
3061
|
+
const c = yn(l, n.schemaMap), h = n.schemaMap[c];
|
|
2969
3062
|
if (!h)
|
|
2970
|
-
throw new Error(`Field schema for "${
|
|
3063
|
+
throw new Error(`Field schema for "${l}" not found in schema map`);
|
|
2971
3064
|
yield {
|
|
2972
|
-
handlerType:
|
|
2973
|
-
fieldKey:
|
|
3065
|
+
handlerType: ao(h),
|
|
3066
|
+
fieldKey: l,
|
|
2974
3067
|
fieldSchema: h,
|
|
2975
3068
|
value: a
|
|
2976
3069
|
};
|
|
2977
3070
|
}
|
|
2978
3071
|
}
|
|
2979
|
-
function
|
|
2980
|
-
const r =
|
|
3072
|
+
function mo(t, e, n) {
|
|
3073
|
+
const r = fe(t, String(e)), s = yn(r, n.schemaMap), i = n.schemaMap[s];
|
|
2981
3074
|
if (!i)
|
|
2982
3075
|
throw new Error(`Item schema for "${r}" not found in schema map`);
|
|
2983
3076
|
return { itemKey: r, itemSchema: i };
|
|
2984
3077
|
}
|
|
2985
|
-
function
|
|
2986
|
-
const r =
|
|
3078
|
+
function go(t, e, n) {
|
|
3079
|
+
const r = fe(t, e), s = yn(r, n.schemaMap), i = n.schemaMap[s];
|
|
2987
3080
|
if (!i)
|
|
2988
3081
|
throw new Error(`Map entry schema for "${r}" not found in schema map`);
|
|
2989
3082
|
return { entryKey: r, entrySchema: i };
|
|
2990
3083
|
}
|
|
2991
|
-
function
|
|
3084
|
+
function bo(t) {
|
|
2992
3085
|
return t.type === "record" && Array.isArray(t.fields);
|
|
2993
3086
|
}
|
|
2994
|
-
function
|
|
3087
|
+
function yo(t) {
|
|
2995
3088
|
return {
|
|
2996
|
-
schemaMap:
|
|
3089
|
+
schemaMap: lo(t)
|
|
2997
3090
|
};
|
|
2998
3091
|
}
|
|
2999
3092
|
export {
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3093
|
+
mo as a,
|
|
3094
|
+
bo as b,
|
|
3095
|
+
yo as c,
|
|
3096
|
+
go as d,
|
|
3097
|
+
ao as g,
|
|
3098
|
+
po as i,
|
|
3099
|
+
fo as s,
|
|
3100
|
+
ho as w
|
|
3008
3101
|
};
|