@opengis/bi 1.1.2 → 1.2.1

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.
Files changed (32) hide show
  1. package/dist/bi.js +11 -2
  2. package/dist/bi.umd.cjs +72 -720
  3. package/dist/import-file-D06AZEtP.js +3493 -0
  4. package/dist/style.css +1 -7
  5. package/dist/{vs-funnel-bar-mWZ8lvEq.js → vs-funnel-bar-C8m-602x.js} +11 -11
  6. package/dist/vs-list-BJ0NjSm5.js +525 -0
  7. package/dist/vs-map-PLlJqaaW.js +294 -0
  8. package/dist/vs-map-cluster-9tV6eiDA.js +356 -0
  9. package/dist/{vs-number-CRUhHKym.js → vs-number-B2V_BPer.js} +3 -3
  10. package/dist/{vs-table-OddIdr1s.js → vs-table-WGE9jyDq.js} +6 -6
  11. package/dist/vs-text-DkLKRC7F.js +1528 -0
  12. package/package.json +77 -84
  13. package/plugin.js +13 -13
  14. package/server/plugins/vite.js +69 -69
  15. package/server/routes/dashboard/controllers/utils/yaml.js +11 -11
  16. package/server/routes/data/controllers/data.js +7 -6
  17. package/server/routes/data/controllers/util/chartSQL.js +2 -2
  18. package/server/routes/map/controllers/cluster.js +125 -125
  19. package/server/routes/map/controllers/clusterVtile.js +166 -166
  20. package/server/routes/map/controllers/geojson.js +127 -127
  21. package/server/routes/map/controllers/map.js +69 -69
  22. package/server/routes/map/controllers/utils/downloadClusterData.js +44 -44
  23. package/server/routes/map/controllers/vtile.js +183 -183
  24. package/server/utils/getWidget.js +3 -3
  25. package/utils.js +12 -12
  26. package/config.js +0 -12
  27. package/dist/import-file-XFI3CaVb.js +0 -63458
  28. package/dist/vs-donut-al85JwBt.js +0 -148
  29. package/dist/vs-list-1QDnN3pH.js +0 -18510
  30. package/dist/vs-map-CwR6ZYur.js +0 -285
  31. package/dist/vs-map-cluster-YdXTBIVf.js +0 -314
  32. package/dist/vs-text-CQ9vn0qO.js +0 -40
@@ -0,0 +1,1528 @@
1
+ var ge = Object.defineProperty;
2
+ var ke = (c, e, t) => e in c ? ge(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
3
+ var k = (c, e, t) => ke(c, typeof e != "symbol" ? e + "" : e, t);
4
+ import { _ as de, c as xe } from "./import-file-D06AZEtP.js";
5
+ import { openBlock as V, createElementBlock as J, createCommentVNode as be } from "vue";
6
+ function Q() {
7
+ return {
8
+ async: !1,
9
+ breaks: !1,
10
+ extensions: null,
11
+ gfm: !0,
12
+ hooks: null,
13
+ pedantic: !1,
14
+ renderer: null,
15
+ silent: !1,
16
+ tokenizer: null,
17
+ walkTokens: null
18
+ };
19
+ }
20
+ let z = Q();
21
+ function se(c) {
22
+ z = c;
23
+ }
24
+ const ie = /[&<>"']/, me = new RegExp(ie.source, "g"), re = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, we = new RegExp(re.source, "g"), ye = {
25
+ "&": "&amp;",
26
+ "<": "&lt;",
27
+ ">": "&gt;",
28
+ '"': "&quot;",
29
+ "'": "&#39;"
30
+ }, K = (c) => ye[c];
31
+ function b(c, e) {
32
+ if (e) {
33
+ if (ie.test(c))
34
+ return c.replace(me, K);
35
+ } else if (re.test(c))
36
+ return c.replace(we, K);
37
+ return c;
38
+ }
39
+ const $e = /(^|[^\[])\^/g;
40
+ function f(c, e) {
41
+ let t = typeof c == "string" ? c : c.source;
42
+ e = e || "";
43
+ const n = {
44
+ replace: (s, i) => {
45
+ let r = typeof i == "string" ? i : i.source;
46
+ return r = r.replace($e, "$1"), t = t.replace(s, r), n;
47
+ },
48
+ getRegex: () => new RegExp(t, e)
49
+ };
50
+ return n;
51
+ }
52
+ function Y(c) {
53
+ try {
54
+ c = encodeURI(c).replace(/%25/g, "%");
55
+ } catch {
56
+ return null;
57
+ }
58
+ return c;
59
+ }
60
+ const S = { exec: () => null };
61
+ function ee(c, e) {
62
+ const t = c.replace(/\|/g, (i, r, l) => {
63
+ let o = !1, h = r;
64
+ for (; --h >= 0 && l[h] === "\\"; )
65
+ o = !o;
66
+ return o ? "|" : " |";
67
+ }), n = t.split(/ \|/);
68
+ let s = 0;
69
+ if (n[0].trim() || n.shift(), n.length > 0 && !n[n.length - 1].trim() && n.pop(), e)
70
+ if (n.length > e)
71
+ n.splice(e);
72
+ else
73
+ for (; n.length < e; )
74
+ n.push("");
75
+ for (; s < n.length; s++)
76
+ n[s] = n[s].trim().replace(/\\\|/g, "|");
77
+ return n;
78
+ }
79
+ function _(c, e, t) {
80
+ const n = c.length;
81
+ if (n === 0)
82
+ return "";
83
+ let s = 0;
84
+ for (; s < n; ) {
85
+ const i = c.charAt(n - s - 1);
86
+ if (i === e && !t)
87
+ s++;
88
+ else if (i !== e && t)
89
+ s++;
90
+ else
91
+ break;
92
+ }
93
+ return c.slice(0, n - s);
94
+ }
95
+ function Te(c, e) {
96
+ if (c.indexOf(e[1]) === -1)
97
+ return -1;
98
+ let t = 0;
99
+ for (let n = 0; n < c.length; n++)
100
+ if (c[n] === "\\")
101
+ n++;
102
+ else if (c[n] === e[0])
103
+ t++;
104
+ else if (c[n] === e[1] && (t--, t < 0))
105
+ return n;
106
+ return -1;
107
+ }
108
+ function te(c, e, t, n) {
109
+ const s = e.href, i = e.title ? b(e.title) : null, r = c[1].replace(/\\([\[\]])/g, "$1");
110
+ if (c[0].charAt(0) !== "!") {
111
+ n.state.inLink = !0;
112
+ const l = {
113
+ type: "link",
114
+ raw: t,
115
+ href: s,
116
+ title: i,
117
+ text: r,
118
+ tokens: n.inlineTokens(r)
119
+ };
120
+ return n.state.inLink = !1, l;
121
+ }
122
+ return {
123
+ type: "image",
124
+ raw: t,
125
+ href: s,
126
+ title: i,
127
+ text: b(r)
128
+ };
129
+ }
130
+ function ze(c, e) {
131
+ const t = c.match(/^(\s+)(?:```)/);
132
+ if (t === null)
133
+ return e;
134
+ const n = t[1];
135
+ return e.split(`
136
+ `).map((s) => {
137
+ const i = s.match(/^\s+/);
138
+ if (i === null)
139
+ return s;
140
+ const [r] = i;
141
+ return r.length >= n.length ? s.slice(n.length) : s;
142
+ }).join(`
143
+ `);
144
+ }
145
+ class v {
146
+ // set by the lexer
147
+ constructor(e) {
148
+ k(this, "options");
149
+ k(this, "rules");
150
+ // set by the lexer
151
+ k(this, "lexer");
152
+ this.options = e || z;
153
+ }
154
+ space(e) {
155
+ const t = this.rules.block.newline.exec(e);
156
+ if (t && t[0].length > 0)
157
+ return {
158
+ type: "space",
159
+ raw: t[0]
160
+ };
161
+ }
162
+ code(e) {
163
+ const t = this.rules.block.code.exec(e);
164
+ if (t) {
165
+ const n = t[0].replace(/^(?: {1,4}| {0,3}\t)/gm, "");
166
+ return {
167
+ type: "code",
168
+ raw: t[0],
169
+ codeBlockStyle: "indented",
170
+ text: this.options.pedantic ? n : _(n, `
171
+ `)
172
+ };
173
+ }
174
+ }
175
+ fences(e) {
176
+ const t = this.rules.block.fences.exec(e);
177
+ if (t) {
178
+ const n = t[0], s = ze(n, t[3] || "");
179
+ return {
180
+ type: "code",
181
+ raw: n,
182
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
183
+ text: s
184
+ };
185
+ }
186
+ }
187
+ heading(e) {
188
+ const t = this.rules.block.heading.exec(e);
189
+ if (t) {
190
+ let n = t[2].trim();
191
+ if (/#$/.test(n)) {
192
+ const s = _(n, "#");
193
+ (this.options.pedantic || !s || / $/.test(s)) && (n = s.trim());
194
+ }
195
+ return {
196
+ type: "heading",
197
+ raw: t[0],
198
+ depth: t[1].length,
199
+ text: n,
200
+ tokens: this.lexer.inline(n)
201
+ };
202
+ }
203
+ }
204
+ hr(e) {
205
+ const t = this.rules.block.hr.exec(e);
206
+ if (t)
207
+ return {
208
+ type: "hr",
209
+ raw: _(t[0], `
210
+ `)
211
+ };
212
+ }
213
+ blockquote(e) {
214
+ const t = this.rules.block.blockquote.exec(e);
215
+ if (t) {
216
+ let n = _(t[0], `
217
+ `).split(`
218
+ `), s = "", i = "";
219
+ const r = [];
220
+ for (; n.length > 0; ) {
221
+ let l = !1;
222
+ const o = [];
223
+ let h;
224
+ for (h = 0; h < n.length; h++)
225
+ if (/^ {0,3}>/.test(n[h]))
226
+ o.push(n[h]), l = !0;
227
+ else if (!l)
228
+ o.push(n[h]);
229
+ else
230
+ break;
231
+ n = n.slice(h);
232
+ const a = o.join(`
233
+ `), p = a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
234
+ $1`).replace(/^ {0,3}>[ \t]?/gm, "");
235
+ s = s ? `${s}
236
+ ${a}` : a, i = i ? `${i}
237
+ ${p}` : p;
238
+ const g = this.lexer.state.top;
239
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(p, r, !0), this.lexer.state.top = g, n.length === 0)
240
+ break;
241
+ const x = r[r.length - 1];
242
+ if ((x == null ? void 0 : x.type) === "code")
243
+ break;
244
+ if ((x == null ? void 0 : x.type) === "blockquote") {
245
+ const d = x, m = d.raw + `
246
+ ` + n.join(`
247
+ `), $ = this.blockquote(m);
248
+ r[r.length - 1] = $, s = s.substring(0, s.length - d.raw.length) + $.raw, i = i.substring(0, i.length - d.text.length) + $.text;
249
+ break;
250
+ } else if ((x == null ? void 0 : x.type) === "list") {
251
+ const d = x, m = d.raw + `
252
+ ` + n.join(`
253
+ `), $ = this.list(m);
254
+ r[r.length - 1] = $, s = s.substring(0, s.length - x.raw.length) + $.raw, i = i.substring(0, i.length - d.raw.length) + $.raw, n = m.substring(r[r.length - 1].raw.length).split(`
255
+ `);
256
+ continue;
257
+ }
258
+ }
259
+ return {
260
+ type: "blockquote",
261
+ raw: s,
262
+ tokens: r,
263
+ text: i
264
+ };
265
+ }
266
+ }
267
+ list(e) {
268
+ let t = this.rules.block.list.exec(e);
269
+ if (t) {
270
+ let n = t[1].trim();
271
+ const s = n.length > 1, i = {
272
+ type: "list",
273
+ raw: "",
274
+ ordered: s,
275
+ start: s ? +n.slice(0, -1) : "",
276
+ loose: !1,
277
+ items: []
278
+ };
279
+ n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
280
+ const r = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);
281
+ let l = !1;
282
+ for (; e; ) {
283
+ let o = !1, h = "", a = "";
284
+ if (!(t = r.exec(e)) || this.rules.block.hr.test(e))
285
+ break;
286
+ h = t[0], e = e.substring(h.length);
287
+ let p = t[2].split(`
288
+ `, 1)[0].replace(/^\t+/, (Z) => " ".repeat(3 * Z.length)), g = e.split(`
289
+ `, 1)[0], x = !p.trim(), d = 0;
290
+ if (this.options.pedantic ? (d = 2, a = p.trimStart()) : x ? d = t[1].length + 1 : (d = t[2].search(/[^ ]/), d = d > 4 ? 1 : d, a = p.slice(d), d += t[1].length), x && /^[ \t]*$/.test(g) && (h += g + `
291
+ `, e = e.substring(g.length + 1), o = !0), !o) {
292
+ const Z = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), W = new RegExp(`^ {0,${Math.min(3, d - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), X = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:\`\`\`|~~~)`), G = new RegExp(`^ {0,${Math.min(3, d - 1)}}#`), fe = new RegExp(`^ {0,${Math.min(3, d - 1)}}<[a-z].*>`, "i");
293
+ for (; e; ) {
294
+ const M = e.split(`
295
+ `, 1)[0];
296
+ let R;
297
+ if (g = M, this.options.pedantic ? (g = g.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), R = g) : R = g.replace(/\t/g, " "), X.test(g) || G.test(g) || fe.test(g) || Z.test(g) || W.test(g))
298
+ break;
299
+ if (R.search(/[^ ]/) >= d || !g.trim())
300
+ a += `
301
+ ` + R.slice(d);
302
+ else {
303
+ if (x || p.replace(/\t/g, " ").search(/[^ ]/) >= 4 || X.test(p) || G.test(p) || W.test(p))
304
+ break;
305
+ a += `
306
+ ` + g;
307
+ }
308
+ !x && !g.trim() && (x = !0), h += M + `
309
+ `, e = e.substring(M.length + 1), p = R.slice(d);
310
+ }
311
+ }
312
+ i.loose || (l ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(h) && (l = !0));
313
+ let m = null, $;
314
+ this.options.gfm && (m = /^\[[ xX]\] /.exec(a), m && ($ = m[0] !== "[ ] ", a = a.replace(/^\[[ xX]\] +/, ""))), i.items.push({
315
+ type: "list_item",
316
+ raw: h,
317
+ task: !!m,
318
+ checked: $,
319
+ loose: !1,
320
+ text: a,
321
+ tokens: []
322
+ }), i.raw += h;
323
+ }
324
+ i.items[i.items.length - 1].raw = i.items[i.items.length - 1].raw.trimEnd(), i.items[i.items.length - 1].text = i.items[i.items.length - 1].text.trimEnd(), i.raw = i.raw.trimEnd();
325
+ for (let o = 0; o < i.items.length; o++)
326
+ if (this.lexer.state.top = !1, i.items[o].tokens = this.lexer.blockTokens(i.items[o].text, []), !i.loose) {
327
+ const h = i.items[o].tokens.filter((p) => p.type === "space"), a = h.length > 0 && h.some((p) => /\n.*\n/.test(p.raw));
328
+ i.loose = a;
329
+ }
330
+ if (i.loose)
331
+ for (let o = 0; o < i.items.length; o++)
332
+ i.items[o].loose = !0;
333
+ return i;
334
+ }
335
+ }
336
+ html(e) {
337
+ const t = this.rules.block.html.exec(e);
338
+ if (t)
339
+ return {
340
+ type: "html",
341
+ block: !0,
342
+ raw: t[0],
343
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
344
+ text: t[0]
345
+ };
346
+ }
347
+ def(e) {
348
+ const t = this.rules.block.def.exec(e);
349
+ if (t) {
350
+ const n = t[1].toLowerCase().replace(/\s+/g, " "), s = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
351
+ return {
352
+ type: "def",
353
+ tag: n,
354
+ raw: t[0],
355
+ href: s,
356
+ title: i
357
+ };
358
+ }
359
+ }
360
+ table(e) {
361
+ const t = this.rules.block.table.exec(e);
362
+ if (!t || !/[:|]/.test(t[2]))
363
+ return;
364
+ const n = ee(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), i = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
365
+ `) : [], r = {
366
+ type: "table",
367
+ raw: t[0],
368
+ header: [],
369
+ align: [],
370
+ rows: []
371
+ };
372
+ if (n.length === s.length) {
373
+ for (const l of s)
374
+ /^ *-+: *$/.test(l) ? r.align.push("right") : /^ *:-+: *$/.test(l) ? r.align.push("center") : /^ *:-+ *$/.test(l) ? r.align.push("left") : r.align.push(null);
375
+ for (let l = 0; l < n.length; l++)
376
+ r.header.push({
377
+ text: n[l],
378
+ tokens: this.lexer.inline(n[l]),
379
+ header: !0,
380
+ align: r.align[l]
381
+ });
382
+ for (const l of i)
383
+ r.rows.push(ee(l, r.header.length).map((o, h) => ({
384
+ text: o,
385
+ tokens: this.lexer.inline(o),
386
+ header: !1,
387
+ align: r.align[h]
388
+ })));
389
+ return r;
390
+ }
391
+ }
392
+ lheading(e) {
393
+ const t = this.rules.block.lheading.exec(e);
394
+ if (t)
395
+ return {
396
+ type: "heading",
397
+ raw: t[0],
398
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
399
+ text: t[1],
400
+ tokens: this.lexer.inline(t[1])
401
+ };
402
+ }
403
+ paragraph(e) {
404
+ const t = this.rules.block.paragraph.exec(e);
405
+ if (t) {
406
+ const n = t[1].charAt(t[1].length - 1) === `
407
+ ` ? t[1].slice(0, -1) : t[1];
408
+ return {
409
+ type: "paragraph",
410
+ raw: t[0],
411
+ text: n,
412
+ tokens: this.lexer.inline(n)
413
+ };
414
+ }
415
+ }
416
+ text(e) {
417
+ const t = this.rules.block.text.exec(e);
418
+ if (t)
419
+ return {
420
+ type: "text",
421
+ raw: t[0],
422
+ text: t[0],
423
+ tokens: this.lexer.inline(t[0])
424
+ };
425
+ }
426
+ escape(e) {
427
+ const t = this.rules.inline.escape.exec(e);
428
+ if (t)
429
+ return {
430
+ type: "escape",
431
+ raw: t[0],
432
+ text: b(t[1])
433
+ };
434
+ }
435
+ tag(e) {
436
+ const t = this.rules.inline.tag.exec(e);
437
+ if (t)
438
+ return !this.lexer.state.inLink && /^<a /i.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && /^<\/a>/i.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
439
+ type: "html",
440
+ raw: t[0],
441
+ inLink: this.lexer.state.inLink,
442
+ inRawBlock: this.lexer.state.inRawBlock,
443
+ block: !1,
444
+ text: t[0]
445
+ };
446
+ }
447
+ link(e) {
448
+ const t = this.rules.inline.link.exec(e);
449
+ if (t) {
450
+ const n = t[2].trim();
451
+ if (!this.options.pedantic && /^</.test(n)) {
452
+ if (!/>$/.test(n))
453
+ return;
454
+ const r = _(n.slice(0, -1), "\\");
455
+ if ((n.length - r.length) % 2 === 0)
456
+ return;
457
+ } else {
458
+ const r = Te(t[2], "()");
459
+ if (r > -1) {
460
+ const o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + r;
461
+ t[2] = t[2].substring(0, r), t[0] = t[0].substring(0, o).trim(), t[3] = "";
462
+ }
463
+ }
464
+ let s = t[2], i = "";
465
+ if (this.options.pedantic) {
466
+ const r = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);
467
+ r && (s = r[1], i = r[3]);
468
+ } else
469
+ i = t[3] ? t[3].slice(1, -1) : "";
470
+ return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), te(t, {
471
+ href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
472
+ title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
473
+ }, t[0], this.lexer);
474
+ }
475
+ }
476
+ reflink(e, t) {
477
+ let n;
478
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
479
+ const s = (n[2] || n[1]).replace(/\s+/g, " "), i = t[s.toLowerCase()];
480
+ if (!i) {
481
+ const r = n[0].charAt(0);
482
+ return {
483
+ type: "text",
484
+ raw: r,
485
+ text: r
486
+ };
487
+ }
488
+ return te(n, i, n[0], this.lexer);
489
+ }
490
+ }
491
+ emStrong(e, t, n = "") {
492
+ let s = this.rules.inline.emStrongLDelim.exec(e);
493
+ if (!s || s[3] && n.match(/[\p{L}\p{N}]/u))
494
+ return;
495
+ if (!(s[1] || s[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
496
+ const r = [...s[0]].length - 1;
497
+ let l, o, h = r, a = 0;
498
+ const p = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
499
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + r); (s = p.exec(t)) != null; ) {
500
+ if (l = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !l)
501
+ continue;
502
+ if (o = [...l].length, s[3] || s[4]) {
503
+ h += o;
504
+ continue;
505
+ } else if ((s[5] || s[6]) && r % 3 && !((r + o) % 3)) {
506
+ a += o;
507
+ continue;
508
+ }
509
+ if (h -= o, h > 0)
510
+ continue;
511
+ o = Math.min(o, o + h + a);
512
+ const g = [...s[0]][0].length, x = e.slice(0, r + s.index + g + o);
513
+ if (Math.min(r, o) % 2) {
514
+ const m = x.slice(1, -1);
515
+ return {
516
+ type: "em",
517
+ raw: x,
518
+ text: m,
519
+ tokens: this.lexer.inlineTokens(m)
520
+ };
521
+ }
522
+ const d = x.slice(2, -2);
523
+ return {
524
+ type: "strong",
525
+ raw: x,
526
+ text: d,
527
+ tokens: this.lexer.inlineTokens(d)
528
+ };
529
+ }
530
+ }
531
+ }
532
+ codespan(e) {
533
+ const t = this.rules.inline.code.exec(e);
534
+ if (t) {
535
+ let n = t[2].replace(/\n/g, " ");
536
+ const s = /[^ ]/.test(n), i = /^ /.test(n) && / $/.test(n);
537
+ return s && i && (n = n.substring(1, n.length - 1)), n = b(n, !0), {
538
+ type: "codespan",
539
+ raw: t[0],
540
+ text: n
541
+ };
542
+ }
543
+ }
544
+ br(e) {
545
+ const t = this.rules.inline.br.exec(e);
546
+ if (t)
547
+ return {
548
+ type: "br",
549
+ raw: t[0]
550
+ };
551
+ }
552
+ del(e) {
553
+ const t = this.rules.inline.del.exec(e);
554
+ if (t)
555
+ return {
556
+ type: "del",
557
+ raw: t[0],
558
+ text: t[2],
559
+ tokens: this.lexer.inlineTokens(t[2])
560
+ };
561
+ }
562
+ autolink(e) {
563
+ const t = this.rules.inline.autolink.exec(e);
564
+ if (t) {
565
+ let n, s;
566
+ return t[2] === "@" ? (n = b(t[1]), s = "mailto:" + n) : (n = b(t[1]), s = n), {
567
+ type: "link",
568
+ raw: t[0],
569
+ text: n,
570
+ href: s,
571
+ tokens: [
572
+ {
573
+ type: "text",
574
+ raw: n,
575
+ text: n
576
+ }
577
+ ]
578
+ };
579
+ }
580
+ }
581
+ url(e) {
582
+ var n;
583
+ let t;
584
+ if (t = this.rules.inline.url.exec(e)) {
585
+ let s, i;
586
+ if (t[2] === "@")
587
+ s = b(t[0]), i = "mailto:" + s;
588
+ else {
589
+ let r;
590
+ do
591
+ r = t[0], t[0] = ((n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) ?? "";
592
+ while (r !== t[0]);
593
+ s = b(t[0]), t[1] === "www." ? i = "http://" + t[0] : i = t[0];
594
+ }
595
+ return {
596
+ type: "link",
597
+ raw: t[0],
598
+ text: s,
599
+ href: i,
600
+ tokens: [
601
+ {
602
+ type: "text",
603
+ raw: s,
604
+ text: s
605
+ }
606
+ ]
607
+ };
608
+ }
609
+ }
610
+ inlineText(e) {
611
+ const t = this.rules.inline.text.exec(e);
612
+ if (t) {
613
+ let n;
614
+ return this.lexer.state.inRawBlock ? n = t[0] : n = b(t[0]), {
615
+ type: "text",
616
+ raw: t[0],
617
+ text: n
618
+ };
619
+ }
620
+ }
621
+ }
622
+ const Re = /^(?:[ \t]*(?:\n|$))+/, _e = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ie = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Se = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, le = /(?:[*+-]|\d{1,9}[.)])/, oe = f(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, le).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(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ae = /^[^\n]+/, O = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Ee = f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", O).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Le = f(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, le).getRegex(), P = "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", H = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, qe = f("^ {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", H).replace("tag", P).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = f(j).replace("hr", E).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", P).getRegex(), ve = f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), N = {
623
+ blockquote: ve,
624
+ code: _e,
625
+ def: Ee,
626
+ fences: Ie,
627
+ heading: Se,
628
+ hr: E,
629
+ html: qe,
630
+ lheading: oe,
631
+ list: Le,
632
+ newline: Re,
633
+ paragraph: ae,
634
+ table: S,
635
+ text: Ae
636
+ }, ne = f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).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", P).getRegex(), Be = {
637
+ ...N,
638
+ table: ne,
639
+ paragraph: f(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).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", P).getRegex()
640
+ }, Ce = {
641
+ ...N,
642
+ html: f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", H).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(),
643
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
644
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
645
+ fences: S,
646
+ // fences not supported
647
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
648
+ paragraph: f(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
649
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
650
+ }, ce = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, he = /^( {2,}|\\)\n(?!\s*$)/, Ze = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, L = "\\p{P}\\p{S}", Me = f(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, L).getRegex(), De = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Qe = f(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, L).getRegex(), je = f("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, L).getRegex(), Oe = f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, L).getRegex(), He = f(/\\([punct])/, "gu").replace(/punct/g, L).getRegex(), Ne = f(/^<(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(), Ue = f(H).replace("(?:-->|$)", "-->").getRegex(), Fe = f("^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", Ue).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), B = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, We = f(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", B).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), pe = f(/^!?\[(label)\]\[(ref)\]/).replace("label", B).replace("ref", O).getRegex(), ue = f(/^!?\[(ref)\](?:\[\])?/).replace("ref", O).getRegex(), Xe = f("reflink|nolink(?!\\()", "g").replace("reflink", pe).replace("nolink", ue).getRegex(), U = {
651
+ _backpedal: S,
652
+ // only used for GFM url
653
+ anyPunctuation: He,
654
+ autolink: Ne,
655
+ blockSkip: De,
656
+ br: he,
657
+ code: Pe,
658
+ del: S,
659
+ emStrongLDelim: Qe,
660
+ emStrongRDelimAst: je,
661
+ emStrongRDelimUnd: Oe,
662
+ escape: ce,
663
+ link: We,
664
+ nolink: ue,
665
+ punctuation: Me,
666
+ reflink: pe,
667
+ reflinkSearch: Xe,
668
+ tag: Fe,
669
+ text: Ze,
670
+ url: S
671
+ }, Ge = {
672
+ ...U,
673
+ link: f(/^!?\[(label)\]\((.*?)\)/).replace("label", B).getRegex(),
674
+ reflink: f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", B).getRegex()
675
+ }, D = {
676
+ ...U,
677
+ escape: f(ce).replace("])", "~|])").getRegex(),
678
+ url: f(/^((?: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(),
679
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
680
+ del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
681
+ text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
682
+ }, Ve = {
683
+ ...D,
684
+ br: f(he).replace("{2,}", "*").getRegex(),
685
+ text: f(D.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
686
+ }, q = {
687
+ normal: N,
688
+ gfm: Be,
689
+ pedantic: Ce
690
+ }, I = {
691
+ normal: U,
692
+ gfm: D,
693
+ breaks: Ve,
694
+ pedantic: Ge
695
+ };
696
+ class w {
697
+ constructor(e) {
698
+ k(this, "tokens");
699
+ k(this, "options");
700
+ k(this, "state");
701
+ k(this, "tokenizer");
702
+ k(this, "inlineQueue");
703
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || z, this.options.tokenizer = this.options.tokenizer || new v(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
704
+ inLink: !1,
705
+ inRawBlock: !1,
706
+ top: !0
707
+ };
708
+ const t = {
709
+ block: q.normal,
710
+ inline: I.normal
711
+ };
712
+ this.options.pedantic ? (t.block = q.pedantic, t.inline = I.pedantic) : this.options.gfm && (t.block = q.gfm, this.options.breaks ? t.inline = I.breaks : t.inline = I.gfm), this.tokenizer.rules = t;
713
+ }
714
+ /**
715
+ * Expose Rules
716
+ */
717
+ static get rules() {
718
+ return {
719
+ block: q,
720
+ inline: I
721
+ };
722
+ }
723
+ /**
724
+ * Static Lex Method
725
+ */
726
+ static lex(e, t) {
727
+ return new w(t).lex(e);
728
+ }
729
+ /**
730
+ * Static Lex Inline Method
731
+ */
732
+ static lexInline(e, t) {
733
+ return new w(t).inlineTokens(e);
734
+ }
735
+ /**
736
+ * Preprocessing
737
+ */
738
+ lex(e) {
739
+ e = e.replace(/\r\n|\r/g, `
740
+ `), this.blockTokens(e, this.tokens);
741
+ for (let t = 0; t < this.inlineQueue.length; t++) {
742
+ const n = this.inlineQueue[t];
743
+ this.inlineTokens(n.src, n.tokens);
744
+ }
745
+ return this.inlineQueue = [], this.tokens;
746
+ }
747
+ blockTokens(e, t = [], n = !1) {
748
+ this.options.pedantic && (e = e.replace(/\t/g, " ").replace(/^ +$/gm, ""));
749
+ let s, i, r;
750
+ for (; e; )
751
+ if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((l) => (s = l.call({ lexer: this }, e, t)) ? (e = e.substring(s.raw.length), t.push(s), !0) : !1))) {
752
+ if (s = this.tokenizer.space(e)) {
753
+ e = e.substring(s.raw.length), s.raw.length === 1 && t.length > 0 ? t[t.length - 1].raw += `
754
+ ` : t.push(s);
755
+ continue;
756
+ }
757
+ if (s = this.tokenizer.code(e)) {
758
+ e = e.substring(s.raw.length), i = t[t.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
759
+ ` + s.raw, i.text += `
760
+ ` + s.text, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(s);
761
+ continue;
762
+ }
763
+ if (s = this.tokenizer.fences(e)) {
764
+ e = e.substring(s.raw.length), t.push(s);
765
+ continue;
766
+ }
767
+ if (s = this.tokenizer.heading(e)) {
768
+ e = e.substring(s.raw.length), t.push(s);
769
+ continue;
770
+ }
771
+ if (s = this.tokenizer.hr(e)) {
772
+ e = e.substring(s.raw.length), t.push(s);
773
+ continue;
774
+ }
775
+ if (s = this.tokenizer.blockquote(e)) {
776
+ e = e.substring(s.raw.length), t.push(s);
777
+ continue;
778
+ }
779
+ if (s = this.tokenizer.list(e)) {
780
+ e = e.substring(s.raw.length), t.push(s);
781
+ continue;
782
+ }
783
+ if (s = this.tokenizer.html(e)) {
784
+ e = e.substring(s.raw.length), t.push(s);
785
+ continue;
786
+ }
787
+ if (s = this.tokenizer.def(e)) {
788
+ e = e.substring(s.raw.length), i = t[t.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
789
+ ` + s.raw, i.text += `
790
+ ` + s.raw, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : this.tokens.links[s.tag] || (this.tokens.links[s.tag] = {
791
+ href: s.href,
792
+ title: s.title
793
+ });
794
+ continue;
795
+ }
796
+ if (s = this.tokenizer.table(e)) {
797
+ e = e.substring(s.raw.length), t.push(s);
798
+ continue;
799
+ }
800
+ if (s = this.tokenizer.lheading(e)) {
801
+ e = e.substring(s.raw.length), t.push(s);
802
+ continue;
803
+ }
804
+ if (r = e, this.options.extensions && this.options.extensions.startBlock) {
805
+ let l = 1 / 0;
806
+ const o = e.slice(1);
807
+ let h;
808
+ this.options.extensions.startBlock.forEach((a) => {
809
+ h = a.call({ lexer: this }, o), typeof h == "number" && h >= 0 && (l = Math.min(l, h));
810
+ }), l < 1 / 0 && l >= 0 && (r = e.substring(0, l + 1));
811
+ }
812
+ if (this.state.top && (s = this.tokenizer.paragraph(r))) {
813
+ i = t[t.length - 1], n && (i == null ? void 0 : i.type) === "paragraph" ? (i.raw += `
814
+ ` + s.raw, i.text += `
815
+ ` + s.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(s), n = r.length !== e.length, e = e.substring(s.raw.length);
816
+ continue;
817
+ }
818
+ if (s = this.tokenizer.text(e)) {
819
+ e = e.substring(s.raw.length), i = t[t.length - 1], i && i.type === "text" ? (i.raw += `
820
+ ` + s.raw, i.text += `
821
+ ` + s.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(s);
822
+ continue;
823
+ }
824
+ if (e) {
825
+ const l = "Infinite loop on byte: " + e.charCodeAt(0);
826
+ if (this.options.silent) {
827
+ console.error(l);
828
+ break;
829
+ } else
830
+ throw new Error(l);
831
+ }
832
+ }
833
+ return this.state.top = !0, t;
834
+ }
835
+ inline(e, t = []) {
836
+ return this.inlineQueue.push({ src: e, tokens: t }), t;
837
+ }
838
+ /**
839
+ * Lexing/Compiling
840
+ */
841
+ inlineTokens(e, t = []) {
842
+ let n, s, i, r = e, l, o, h;
843
+ if (this.tokens.links) {
844
+ const a = Object.keys(this.tokens.links);
845
+ if (a.length > 0)
846
+ for (; (l = this.tokenizer.rules.inline.reflinkSearch.exec(r)) != null; )
847
+ a.includes(l[0].slice(l[0].lastIndexOf("[") + 1, -1)) && (r = r.slice(0, l.index) + "[" + "a".repeat(l[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
848
+ }
849
+ for (; (l = this.tokenizer.rules.inline.blockSkip.exec(r)) != null; )
850
+ r = r.slice(0, l.index) + "[" + "a".repeat(l[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
851
+ for (; (l = this.tokenizer.rules.inline.anyPunctuation.exec(r)) != null; )
852
+ r = r.slice(0, l.index) + "++" + r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
853
+ for (; e; )
854
+ if (o || (h = ""), o = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((a) => (n = a.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
855
+ if (n = this.tokenizer.escape(e)) {
856
+ e = e.substring(n.raw.length), t.push(n);
857
+ continue;
858
+ }
859
+ if (n = this.tokenizer.tag(e)) {
860
+ e = e.substring(n.raw.length), s = t[t.length - 1], s && n.type === "text" && s.type === "text" ? (s.raw += n.raw, s.text += n.text) : t.push(n);
861
+ continue;
862
+ }
863
+ if (n = this.tokenizer.link(e)) {
864
+ e = e.substring(n.raw.length), t.push(n);
865
+ continue;
866
+ }
867
+ if (n = this.tokenizer.reflink(e, this.tokens.links)) {
868
+ e = e.substring(n.raw.length), s = t[t.length - 1], s && n.type === "text" && s.type === "text" ? (s.raw += n.raw, s.text += n.text) : t.push(n);
869
+ continue;
870
+ }
871
+ if (n = this.tokenizer.emStrong(e, r, h)) {
872
+ e = e.substring(n.raw.length), t.push(n);
873
+ continue;
874
+ }
875
+ if (n = this.tokenizer.codespan(e)) {
876
+ e = e.substring(n.raw.length), t.push(n);
877
+ continue;
878
+ }
879
+ if (n = this.tokenizer.br(e)) {
880
+ e = e.substring(n.raw.length), t.push(n);
881
+ continue;
882
+ }
883
+ if (n = this.tokenizer.del(e)) {
884
+ e = e.substring(n.raw.length), t.push(n);
885
+ continue;
886
+ }
887
+ if (n = this.tokenizer.autolink(e)) {
888
+ e = e.substring(n.raw.length), t.push(n);
889
+ continue;
890
+ }
891
+ if (!this.state.inLink && (n = this.tokenizer.url(e))) {
892
+ e = e.substring(n.raw.length), t.push(n);
893
+ continue;
894
+ }
895
+ if (i = e, this.options.extensions && this.options.extensions.startInline) {
896
+ let a = 1 / 0;
897
+ const p = e.slice(1);
898
+ let g;
899
+ this.options.extensions.startInline.forEach((x) => {
900
+ g = x.call({ lexer: this }, p), typeof g == "number" && g >= 0 && (a = Math.min(a, g));
901
+ }), a < 1 / 0 && a >= 0 && (i = e.substring(0, a + 1));
902
+ }
903
+ if (n = this.tokenizer.inlineText(i)) {
904
+ e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (h = n.raw.slice(-1)), o = !0, s = t[t.length - 1], s && s.type === "text" ? (s.raw += n.raw, s.text += n.text) : t.push(n);
905
+ continue;
906
+ }
907
+ if (e) {
908
+ const a = "Infinite loop on byte: " + e.charCodeAt(0);
909
+ if (this.options.silent) {
910
+ console.error(a);
911
+ break;
912
+ } else
913
+ throw new Error(a);
914
+ }
915
+ }
916
+ return t;
917
+ }
918
+ }
919
+ class C {
920
+ // set by the parser
921
+ constructor(e) {
922
+ k(this, "options");
923
+ k(this, "parser");
924
+ this.options = e || z;
925
+ }
926
+ space(e) {
927
+ return "";
928
+ }
929
+ code({ text: e, lang: t, escaped: n }) {
930
+ var r;
931
+ const s = (r = (t || "").match(/^\S*/)) == null ? void 0 : r[0], i = e.replace(/\n$/, "") + `
932
+ `;
933
+ return s ? '<pre><code class="language-' + b(s) + '">' + (n ? i : b(i, !0)) + `</code></pre>
934
+ ` : "<pre><code>" + (n ? i : b(i, !0)) + `</code></pre>
935
+ `;
936
+ }
937
+ blockquote({ tokens: e }) {
938
+ return `<blockquote>
939
+ ${this.parser.parse(e)}</blockquote>
940
+ `;
941
+ }
942
+ html({ text: e }) {
943
+ return e;
944
+ }
945
+ heading({ tokens: e, depth: t }) {
946
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
947
+ `;
948
+ }
949
+ hr(e) {
950
+ return `<hr>
951
+ `;
952
+ }
953
+ list(e) {
954
+ const t = e.ordered, n = e.start;
955
+ let s = "";
956
+ for (let l = 0; l < e.items.length; l++) {
957
+ const o = e.items[l];
958
+ s += this.listitem(o);
959
+ }
960
+ const i = t ? "ol" : "ul", r = t && n !== 1 ? ' start="' + n + '"' : "";
961
+ return "<" + i + r + `>
962
+ ` + s + "</" + i + `>
963
+ `;
964
+ }
965
+ listitem(e) {
966
+ let t = "";
967
+ if (e.task) {
968
+ const n = this.checkbox({ checked: !!e.checked });
969
+ e.loose ? e.tokens.length > 0 && e.tokens[0].type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + e.tokens[0].tokens[0].text)) : e.tokens.unshift({
970
+ type: "text",
971
+ raw: n + " ",
972
+ text: n + " "
973
+ }) : t += n + " ";
974
+ }
975
+ return t += this.parser.parse(e.tokens, !!e.loose), `<li>${t}</li>
976
+ `;
977
+ }
978
+ checkbox({ checked: e }) {
979
+ return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
980
+ }
981
+ paragraph({ tokens: e }) {
982
+ return `<p>${this.parser.parseInline(e)}</p>
983
+ `;
984
+ }
985
+ table(e) {
986
+ let t = "", n = "";
987
+ for (let i = 0; i < e.header.length; i++)
988
+ n += this.tablecell(e.header[i]);
989
+ t += this.tablerow({ text: n });
990
+ let s = "";
991
+ for (let i = 0; i < e.rows.length; i++) {
992
+ const r = e.rows[i];
993
+ n = "";
994
+ for (let l = 0; l < r.length; l++)
995
+ n += this.tablecell(r[l]);
996
+ s += this.tablerow({ text: n });
997
+ }
998
+ return s && (s = `<tbody>${s}</tbody>`), `<table>
999
+ <thead>
1000
+ ` + t + `</thead>
1001
+ ` + s + `</table>
1002
+ `;
1003
+ }
1004
+ tablerow({ text: e }) {
1005
+ return `<tr>
1006
+ ${e}</tr>
1007
+ `;
1008
+ }
1009
+ tablecell(e) {
1010
+ const t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1011
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1012
+ `;
1013
+ }
1014
+ /**
1015
+ * span level renderer
1016
+ */
1017
+ strong({ tokens: e }) {
1018
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1019
+ }
1020
+ em({ tokens: e }) {
1021
+ return `<em>${this.parser.parseInline(e)}</em>`;
1022
+ }
1023
+ codespan({ text: e }) {
1024
+ return `<code>${e}</code>`;
1025
+ }
1026
+ br(e) {
1027
+ return "<br>";
1028
+ }
1029
+ del({ tokens: e }) {
1030
+ return `<del>${this.parser.parseInline(e)}</del>`;
1031
+ }
1032
+ link({ href: e, title: t, tokens: n }) {
1033
+ const s = this.parser.parseInline(n), i = Y(e);
1034
+ if (i === null)
1035
+ return s;
1036
+ e = i;
1037
+ let r = '<a href="' + e + '"';
1038
+ return t && (r += ' title="' + t + '"'), r += ">" + s + "</a>", r;
1039
+ }
1040
+ image({ href: e, title: t, text: n }) {
1041
+ const s = Y(e);
1042
+ if (s === null)
1043
+ return n;
1044
+ e = s;
1045
+ let i = `<img src="${e}" alt="${n}"`;
1046
+ return t && (i += ` title="${t}"`), i += ">", i;
1047
+ }
1048
+ text(e) {
1049
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : e.text;
1050
+ }
1051
+ }
1052
+ class F {
1053
+ // no need for block level renderers
1054
+ strong({ text: e }) {
1055
+ return e;
1056
+ }
1057
+ em({ text: e }) {
1058
+ return e;
1059
+ }
1060
+ codespan({ text: e }) {
1061
+ return e;
1062
+ }
1063
+ del({ text: e }) {
1064
+ return e;
1065
+ }
1066
+ html({ text: e }) {
1067
+ return e;
1068
+ }
1069
+ text({ text: e }) {
1070
+ return e;
1071
+ }
1072
+ link({ text: e }) {
1073
+ return "" + e;
1074
+ }
1075
+ image({ text: e }) {
1076
+ return "" + e;
1077
+ }
1078
+ br() {
1079
+ return "";
1080
+ }
1081
+ }
1082
+ class y {
1083
+ constructor(e) {
1084
+ k(this, "options");
1085
+ k(this, "renderer");
1086
+ k(this, "textRenderer");
1087
+ this.options = e || z, this.options.renderer = this.options.renderer || new C(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new F();
1088
+ }
1089
+ /**
1090
+ * Static Parse Method
1091
+ */
1092
+ static parse(e, t) {
1093
+ return new y(t).parse(e);
1094
+ }
1095
+ /**
1096
+ * Static Parse Inline Method
1097
+ */
1098
+ static parseInline(e, t) {
1099
+ return new y(t).parseInline(e);
1100
+ }
1101
+ /**
1102
+ * Parse Loop
1103
+ */
1104
+ parse(e, t = !0) {
1105
+ let n = "";
1106
+ for (let s = 0; s < e.length; s++) {
1107
+ const i = e[s];
1108
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
1109
+ const l = i, o = this.options.extensions.renderers[l.type].call({ parser: this }, l);
1110
+ if (o !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(l.type)) {
1111
+ n += o || "";
1112
+ continue;
1113
+ }
1114
+ }
1115
+ const r = i;
1116
+ switch (r.type) {
1117
+ case "space": {
1118
+ n += this.renderer.space(r);
1119
+ continue;
1120
+ }
1121
+ case "hr": {
1122
+ n += this.renderer.hr(r);
1123
+ continue;
1124
+ }
1125
+ case "heading": {
1126
+ n += this.renderer.heading(r);
1127
+ continue;
1128
+ }
1129
+ case "code": {
1130
+ n += this.renderer.code(r);
1131
+ continue;
1132
+ }
1133
+ case "table": {
1134
+ n += this.renderer.table(r);
1135
+ continue;
1136
+ }
1137
+ case "blockquote": {
1138
+ n += this.renderer.blockquote(r);
1139
+ continue;
1140
+ }
1141
+ case "list": {
1142
+ n += this.renderer.list(r);
1143
+ continue;
1144
+ }
1145
+ case "html": {
1146
+ n += this.renderer.html(r);
1147
+ continue;
1148
+ }
1149
+ case "paragraph": {
1150
+ n += this.renderer.paragraph(r);
1151
+ continue;
1152
+ }
1153
+ case "text": {
1154
+ let l = r, o = this.renderer.text(l);
1155
+ for (; s + 1 < e.length && e[s + 1].type === "text"; )
1156
+ l = e[++s], o += `
1157
+ ` + this.renderer.text(l);
1158
+ t ? n += this.renderer.paragraph({
1159
+ type: "paragraph",
1160
+ raw: o,
1161
+ text: o,
1162
+ tokens: [{ type: "text", raw: o, text: o }]
1163
+ }) : n += o;
1164
+ continue;
1165
+ }
1166
+ default: {
1167
+ const l = 'Token with "' + r.type + '" type was not found.';
1168
+ if (this.options.silent)
1169
+ return console.error(l), "";
1170
+ throw new Error(l);
1171
+ }
1172
+ }
1173
+ }
1174
+ return n;
1175
+ }
1176
+ /**
1177
+ * Parse Inline Tokens
1178
+ */
1179
+ parseInline(e, t) {
1180
+ t = t || this.renderer;
1181
+ let n = "";
1182
+ for (let s = 0; s < e.length; s++) {
1183
+ const i = e[s];
1184
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
1185
+ const l = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1186
+ if (l !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
1187
+ n += l || "";
1188
+ continue;
1189
+ }
1190
+ }
1191
+ const r = i;
1192
+ switch (r.type) {
1193
+ case "escape": {
1194
+ n += t.text(r);
1195
+ break;
1196
+ }
1197
+ case "html": {
1198
+ n += t.html(r);
1199
+ break;
1200
+ }
1201
+ case "link": {
1202
+ n += t.link(r);
1203
+ break;
1204
+ }
1205
+ case "image": {
1206
+ n += t.image(r);
1207
+ break;
1208
+ }
1209
+ case "strong": {
1210
+ n += t.strong(r);
1211
+ break;
1212
+ }
1213
+ case "em": {
1214
+ n += t.em(r);
1215
+ break;
1216
+ }
1217
+ case "codespan": {
1218
+ n += t.codespan(r);
1219
+ break;
1220
+ }
1221
+ case "br": {
1222
+ n += t.br(r);
1223
+ break;
1224
+ }
1225
+ case "del": {
1226
+ n += t.del(r);
1227
+ break;
1228
+ }
1229
+ case "text": {
1230
+ n += t.text(r);
1231
+ break;
1232
+ }
1233
+ default: {
1234
+ const l = 'Token with "' + r.type + '" type was not found.';
1235
+ if (this.options.silent)
1236
+ return console.error(l), "";
1237
+ throw new Error(l);
1238
+ }
1239
+ }
1240
+ }
1241
+ return n;
1242
+ }
1243
+ }
1244
+ class A {
1245
+ constructor(e) {
1246
+ k(this, "options");
1247
+ k(this, "block");
1248
+ this.options = e || z;
1249
+ }
1250
+ /**
1251
+ * Process markdown before marked
1252
+ */
1253
+ preprocess(e) {
1254
+ return e;
1255
+ }
1256
+ /**
1257
+ * Process HTML after marked is finished
1258
+ */
1259
+ postprocess(e) {
1260
+ return e;
1261
+ }
1262
+ /**
1263
+ * Process all tokens before walk tokens
1264
+ */
1265
+ processAllTokens(e) {
1266
+ return e;
1267
+ }
1268
+ /**
1269
+ * Provide function to tokenize markdown
1270
+ */
1271
+ provideLexer() {
1272
+ return this.block ? w.lex : w.lexInline;
1273
+ }
1274
+ /**
1275
+ * Provide function to parse tokens
1276
+ */
1277
+ provideParser() {
1278
+ return this.block ? y.parse : y.parseInline;
1279
+ }
1280
+ }
1281
+ k(A, "passThroughHooks", /* @__PURE__ */ new Set([
1282
+ "preprocess",
1283
+ "postprocess",
1284
+ "processAllTokens"
1285
+ ]));
1286
+ class Je {
1287
+ constructor(...e) {
1288
+ k(this, "defaults", Q());
1289
+ k(this, "options", this.setOptions);
1290
+ k(this, "parse", this.parseMarkdown(!0));
1291
+ k(this, "parseInline", this.parseMarkdown(!1));
1292
+ k(this, "Parser", y);
1293
+ k(this, "Renderer", C);
1294
+ k(this, "TextRenderer", F);
1295
+ k(this, "Lexer", w);
1296
+ k(this, "Tokenizer", v);
1297
+ k(this, "Hooks", A);
1298
+ this.use(...e);
1299
+ }
1300
+ /**
1301
+ * Run callback for every token
1302
+ */
1303
+ walkTokens(e, t) {
1304
+ var s, i;
1305
+ let n = [];
1306
+ for (const r of e)
1307
+ switch (n = n.concat(t.call(this, r)), r.type) {
1308
+ case "table": {
1309
+ const l = r;
1310
+ for (const o of l.header)
1311
+ n = n.concat(this.walkTokens(o.tokens, t));
1312
+ for (const o of l.rows)
1313
+ for (const h of o)
1314
+ n = n.concat(this.walkTokens(h.tokens, t));
1315
+ break;
1316
+ }
1317
+ case "list": {
1318
+ const l = r;
1319
+ n = n.concat(this.walkTokens(l.items, t));
1320
+ break;
1321
+ }
1322
+ default: {
1323
+ const l = r;
1324
+ (i = (s = this.defaults.extensions) == null ? void 0 : s.childTokens) != null && i[l.type] ? this.defaults.extensions.childTokens[l.type].forEach((o) => {
1325
+ const h = l[o].flat(1 / 0);
1326
+ n = n.concat(this.walkTokens(h, t));
1327
+ }) : l.tokens && (n = n.concat(this.walkTokens(l.tokens, t)));
1328
+ }
1329
+ }
1330
+ return n;
1331
+ }
1332
+ use(...e) {
1333
+ const t = this.defaults.extensions || { renderers: {}, childTokens: {} };
1334
+ return e.forEach((n) => {
1335
+ const s = { ...n };
1336
+ if (s.async = this.defaults.async || s.async || !1, n.extensions && (n.extensions.forEach((i) => {
1337
+ if (!i.name)
1338
+ throw new Error("extension name required");
1339
+ if ("renderer" in i) {
1340
+ const r = t.renderers[i.name];
1341
+ r ? t.renderers[i.name] = function(...l) {
1342
+ let o = i.renderer.apply(this, l);
1343
+ return o === !1 && (o = r.apply(this, l)), o;
1344
+ } : t.renderers[i.name] = i.renderer;
1345
+ }
1346
+ if ("tokenizer" in i) {
1347
+ if (!i.level || i.level !== "block" && i.level !== "inline")
1348
+ throw new Error("extension level must be 'block' or 'inline'");
1349
+ const r = t[i.level];
1350
+ r ? r.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
1351
+ }
1352
+ "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
1353
+ }), s.extensions = t), n.renderer) {
1354
+ const i = this.defaults.renderer || new C(this.defaults);
1355
+ for (const r in n.renderer) {
1356
+ if (!(r in i))
1357
+ throw new Error(`renderer '${r}' does not exist`);
1358
+ if (["options", "parser"].includes(r))
1359
+ continue;
1360
+ const l = r, o = n.renderer[l], h = i[l];
1361
+ i[l] = (...a) => {
1362
+ let p = o.apply(i, a);
1363
+ return p === !1 && (p = h.apply(i, a)), p || "";
1364
+ };
1365
+ }
1366
+ s.renderer = i;
1367
+ }
1368
+ if (n.tokenizer) {
1369
+ const i = this.defaults.tokenizer || new v(this.defaults);
1370
+ for (const r in n.tokenizer) {
1371
+ if (!(r in i))
1372
+ throw new Error(`tokenizer '${r}' does not exist`);
1373
+ if (["options", "rules", "lexer"].includes(r))
1374
+ continue;
1375
+ const l = r, o = n.tokenizer[l], h = i[l];
1376
+ i[l] = (...a) => {
1377
+ let p = o.apply(i, a);
1378
+ return p === !1 && (p = h.apply(i, a)), p;
1379
+ };
1380
+ }
1381
+ s.tokenizer = i;
1382
+ }
1383
+ if (n.hooks) {
1384
+ const i = this.defaults.hooks || new A();
1385
+ for (const r in n.hooks) {
1386
+ if (!(r in i))
1387
+ throw new Error(`hook '${r}' does not exist`);
1388
+ if (["options", "block"].includes(r))
1389
+ continue;
1390
+ const l = r, o = n.hooks[l], h = i[l];
1391
+ A.passThroughHooks.has(r) ? i[l] = (a) => {
1392
+ if (this.defaults.async)
1393
+ return Promise.resolve(o.call(i, a)).then((g) => h.call(i, g));
1394
+ const p = o.call(i, a);
1395
+ return h.call(i, p);
1396
+ } : i[l] = (...a) => {
1397
+ let p = o.apply(i, a);
1398
+ return p === !1 && (p = h.apply(i, a)), p;
1399
+ };
1400
+ }
1401
+ s.hooks = i;
1402
+ }
1403
+ if (n.walkTokens) {
1404
+ const i = this.defaults.walkTokens, r = n.walkTokens;
1405
+ s.walkTokens = function(l) {
1406
+ let o = [];
1407
+ return o.push(r.call(this, l)), i && (o = o.concat(i.call(this, l))), o;
1408
+ };
1409
+ }
1410
+ this.defaults = { ...this.defaults, ...s };
1411
+ }), this;
1412
+ }
1413
+ setOptions(e) {
1414
+ return this.defaults = { ...this.defaults, ...e }, this;
1415
+ }
1416
+ lexer(e, t) {
1417
+ return w.lex(e, t ?? this.defaults);
1418
+ }
1419
+ parser(e, t) {
1420
+ return y.parse(e, t ?? this.defaults);
1421
+ }
1422
+ parseMarkdown(e) {
1423
+ return (n, s) => {
1424
+ const i = { ...s }, r = { ...this.defaults, ...i }, l = this.onError(!!r.silent, !!r.async);
1425
+ if (this.defaults.async === !0 && i.async === !1)
1426
+ return l(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."));
1427
+ if (typeof n > "u" || n === null)
1428
+ return l(new Error("marked(): input parameter is undefined or null"));
1429
+ if (typeof n != "string")
1430
+ return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1431
+ r.hooks && (r.hooks.options = r, r.hooks.block = e);
1432
+ const o = r.hooks ? r.hooks.provideLexer() : e ? w.lex : w.lexInline, h = r.hooks ? r.hooks.provideParser() : e ? y.parse : y.parseInline;
1433
+ if (r.async)
1434
+ return Promise.resolve(r.hooks ? r.hooks.preprocess(n) : n).then((a) => o(a, r)).then((a) => r.hooks ? r.hooks.processAllTokens(a) : a).then((a) => r.walkTokens ? Promise.all(this.walkTokens(a, r.walkTokens)).then(() => a) : a).then((a) => h(a, r)).then((a) => r.hooks ? r.hooks.postprocess(a) : a).catch(l);
1435
+ try {
1436
+ r.hooks && (n = r.hooks.preprocess(n));
1437
+ let a = o(n, r);
1438
+ r.hooks && (a = r.hooks.processAllTokens(a)), r.walkTokens && this.walkTokens(a, r.walkTokens);
1439
+ let p = h(a, r);
1440
+ return r.hooks && (p = r.hooks.postprocess(p)), p;
1441
+ } catch (a) {
1442
+ return l(a);
1443
+ }
1444
+ };
1445
+ }
1446
+ onError(e, t) {
1447
+ return (n) => {
1448
+ if (n.message += `
1449
+ Please report this to https://github.com/markedjs/marked.`, e) {
1450
+ const s = "<p>An error occurred:</p><pre>" + b(n.message + "", !0) + "</pre>";
1451
+ return t ? Promise.resolve(s) : s;
1452
+ }
1453
+ if (t)
1454
+ return Promise.reject(n);
1455
+ throw n;
1456
+ };
1457
+ }
1458
+ }
1459
+ const T = new Je();
1460
+ function u(c, e) {
1461
+ return T.parse(c, e);
1462
+ }
1463
+ u.options = u.setOptions = function(c) {
1464
+ return T.setOptions(c), u.defaults = T.defaults, se(u.defaults), u;
1465
+ };
1466
+ u.getDefaults = Q;
1467
+ u.defaults = z;
1468
+ u.use = function(...c) {
1469
+ return T.use(...c), u.defaults = T.defaults, se(u.defaults), u;
1470
+ };
1471
+ u.walkTokens = function(c, e) {
1472
+ return T.walkTokens(c, e);
1473
+ };
1474
+ u.parseInline = T.parseInline;
1475
+ u.Parser = y;
1476
+ u.parser = y.parse;
1477
+ u.Renderer = C;
1478
+ u.TextRenderer = F;
1479
+ u.Lexer = w;
1480
+ u.lexer = w.lex;
1481
+ u.Tokenizer = v;
1482
+ u.Hooks = A;
1483
+ u.parse = u;
1484
+ u.options;
1485
+ u.setOptions;
1486
+ u.use;
1487
+ u.walkTokens;
1488
+ u.parseInline;
1489
+ y.parse;
1490
+ w.lex;
1491
+ const Ke = {
1492
+ name: "VsText",
1493
+ mixins: [xe],
1494
+ data() {
1495
+ return {
1496
+ markedText: null,
1497
+ uniqueID: null
1498
+ };
1499
+ },
1500
+ async mounted() {
1501
+ this.uniqueID = this.widget;
1502
+ try {
1503
+ await this.getData(), this.markedText = u(this.sourceData);
1504
+ } catch (c) {
1505
+ console.error(c);
1506
+ }
1507
+ },
1508
+ methods: {
1509
+ onChangedData() {
1510
+ return null;
1511
+ }
1512
+ }
1513
+ }, Ye = ["id"], et = ["innerHTML"];
1514
+ function tt(c, e, t, n, s, i) {
1515
+ return V(), J("div", {
1516
+ id: s.uniqueID,
1517
+ class: "relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"
1518
+ }, [
1519
+ s.markedText ? (V(), J("div", {
1520
+ key: 0,
1521
+ innerHTML: s.markedText
1522
+ }, null, 8, et)) : be("", !0)
1523
+ ], 8, Ye);
1524
+ }
1525
+ const rt = /* @__PURE__ */ de(Ke, [["render", tt]]);
1526
+ export {
1527
+ rt as default
1528
+ };