@kong-ui-public/entities-plugins 9.199.5 → 9.199.6

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.
@@ -0,0 +1,3014 @@
1
+ var Ys = Object.defineProperty;
2
+ var Zs = (t, e, n) => e in t ? Ys(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var E = (t, e, n) => Zs(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { get as Xs } from "lodash-es";
5
+ const Ki = {
6
+ // Common
7
+ field: (t) => `[data-testid="ff-${t}"]`,
8
+ label: (t) => `[data-testid="ff-label-${t}"]`,
9
+ // EnumField
10
+ selectTrigger: (t) => `[data-testid="ff-enum-${t}-items"]`,
11
+ multiSelectItem: (t) => `[data-testid="multiselect-item-${t}"]`,
12
+ selectItem: (t) => `[data-testid="select-item-${t}"]`,
13
+ // ArrayField
14
+ array: (t) => `[data-testid="ff-array-${t}"]`,
15
+ arrayTabContainer: (t) => `[data-appearance="tabs"][data-testid="ff-array-${t}"]`,
16
+ arrayBasicContainer: (t) => `[data-testid="ff-array-${t}"]:not([data-appearance="tabs"])`,
17
+ arrayTabs: (t) => `[data-testid="ff-array-tabs-${t}"]`,
18
+ arrayItem: (t, e) => `[data-testid="ff-array-item-${t}.${e}"]`,
19
+ arrayAddBtn: (t) => `[data-testid="ff-add-item-btn-${t}"]`,
20
+ arrayRemoveBtns: (t) => `[data-testid^="ff-array-remove-item-btn-${t}"]`,
21
+ arrayRemoveBtn: (t, e) => `[data-testid="ff-array-remove-item-btn-${t}.${e}"]`,
22
+ // ObjectField
23
+ object: (t) => `[data-testid="ff-object-${t}"]`,
24
+ objectToggleBtn: (t) => `[data-testid="ff-object-toggle-btn-${t}"]`,
25
+ objectSwitch: (t) => `[data-testid="ff-object-switch-${t}"]`,
26
+ objectContent: (t) => `[data-testid="ff-object-content-${t}"]`,
27
+ // MapField
28
+ map: (t) => `[data-testid="ff-map-${t}"]`,
29
+ mapContainer: (t, e) => `[data-testid="ff-map-container-${t}.${e}"]`,
30
+ mapKey: (t, e) => `[data-testid="ff-map-key-${t}.${e}"]`,
31
+ mapRemoveBtns: (t) => `[data-testid^="ff-map-remove-btn-${t}"]`,
32
+ mapRemoveBtn: (t, e) => `[data-testid="ff-map-remove-btn-${t}.${e}"]`,
33
+ mapAddBtn: (t) => `[data-testid="ff-map-add-btn-${t}"]`,
34
+ // StringArrayField
35
+ tag: (t) => `[data-testid="ff-tag-${t}"]`,
36
+ tagInput: (t) => `[data-testid="ff-tag-${t}"] input`,
37
+ // JsonField
38
+ json: (t) => `[data-testid="ff-json-${t}"]`
39
+ };
40
+ /**
41
+ * @vue/shared v3.5.33
42
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
43
+ * @license MIT
44
+ **/
45
+ const Vt = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
46
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
47
+ const Jn = () => {
48
+ }, Ks = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
49
+ (t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), Qs = (t) => t.startsWith("onUpdate:"), ht = Object.assign, Q = Array.isArray, ie = (t) => typeof t == "function", se = (t) => typeof t == "string", Js = (t) => typeof t == "symbol", he = (t) => t !== null && typeof t == "object";
50
+ let Mn;
51
+ const dt = () => Mn || (Mn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
52
+ function Xt(t) {
53
+ if (Q(t)) {
54
+ const e = {};
55
+ for (let n = 0; n < t.length; n++) {
56
+ const s = t[n], r = se(s) ? sr(s) : Xt(s);
57
+ if (r)
58
+ for (const i in r)
59
+ e[i] = r[i];
60
+ }
61
+ return e;
62
+ } else if (se(t) || he(t))
63
+ return t;
64
+ }
65
+ const er = /;(?![^(]*\))/g, tr = /:([^]+)/, nr = /\/\*[^]*?\*\//g;
66
+ function sr(t) {
67
+ const e = {};
68
+ return t.replace(nr, "").split(er).forEach((n) => {
69
+ if (n) {
70
+ const s = n.split(tr);
71
+ s.length > 1 && (e[s[0].trim()] = s[1].trim());
72
+ }
73
+ }), e;
74
+ }
75
+ function Kt(t) {
76
+ let e = "";
77
+ if (se(t))
78
+ e = t;
79
+ else if (Q(t))
80
+ for (let n = 0; n < t.length; n++) {
81
+ const s = Kt(t[n]);
82
+ s && (e += s + " ");
83
+ }
84
+ else if (he(t))
85
+ for (const n in t)
86
+ t[n] && (e += n + " ");
87
+ return e.trim();
88
+ }
89
+ /**
90
+ * @vue/reactivity v3.5.33
91
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
92
+ * @license MIT
93
+ **/
94
+ process.env.NODE_ENV;
95
+ process.env.NODE_ENV;
96
+ process.env.NODE_ENV;
97
+ new Set(
98
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(Js)
99
+ );
100
+ // @__NO_SIDE_EFFECTS__
101
+ function es(t) {
102
+ return /* @__PURE__ */ jt(t) ? /* @__PURE__ */ es(t.__v_raw) : !!(t && t.__v_isReactive);
103
+ }
104
+ // @__NO_SIDE_EFFECTS__
105
+ function jt(t) {
106
+ return !!(t && t.__v_isReadonly);
107
+ }
108
+ // @__NO_SIDE_EFFECTS__
109
+ function Mt(t) {
110
+ return !!(t && t.__v_isShallow);
111
+ }
112
+ // @__NO_SIDE_EFFECTS__
113
+ function Wt(t) {
114
+ return t ? !!t.__v_raw : !1;
115
+ }
116
+ // @__NO_SIDE_EFFECTS__
117
+ function de(t) {
118
+ const e = t && t.__v_raw;
119
+ return e ? /* @__PURE__ */ de(e) : t;
120
+ }
121
+ // @__NO_SIDE_EFFECTS__
122
+ function gt(t) {
123
+ return t ? t.__v_isRef === !0 : !1;
124
+ }
125
+ function rr(t) {
126
+ return /* @__PURE__ */ gt(t) ? t.value : t;
127
+ }
128
+ function ir(t) {
129
+ return ie(t) ? t() : rr(t);
130
+ }
131
+ /**
132
+ * @vue/runtime-core v3.5.33
133
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
134
+ * @license MIT
135
+ **/
136
+ const ge = [];
137
+ function or(t) {
138
+ ge.push(t);
139
+ }
140
+ function lr() {
141
+ ge.pop();
142
+ }
143
+ let $t = !1;
144
+ function Oe(t, ...e) {
145
+ if ($t) return;
146
+ $t = !0;
147
+ const n = ge.length ? ge[ge.length - 1].component : null, s = n && n.appContext.config.warnHandler, r = ar();
148
+ if (s)
149
+ Qt(
150
+ s,
151
+ n,
152
+ 11,
153
+ [
154
+ // eslint-disable-next-line no-restricted-syntax
155
+ t + e.map((i) => {
156
+ var o, a;
157
+ return (a = (o = i.toString) == null ? void 0 : o.call(i)) != null ? a : JSON.stringify(i);
158
+ }).join(""),
159
+ n && n.proxy,
160
+ r.map(
161
+ ({ vnode: i }) => `at <${gs(n, i.type)}>`
162
+ ).join(`
163
+ `),
164
+ r
165
+ ]
166
+ );
167
+ else {
168
+ const i = [`[Vue warn]: ${t}`, ...e];
169
+ r.length && i.push(`
170
+ `, ...cr(r)), console.warn(...i);
171
+ }
172
+ $t = !1;
173
+ }
174
+ function ar() {
175
+ let t = ge[ge.length - 1];
176
+ if (!t)
177
+ return [];
178
+ const e = [];
179
+ for (; t; ) {
180
+ const n = e[0];
181
+ n && n.vnode === t ? n.recurseCount++ : e.push({
182
+ vnode: t,
183
+ recurseCount: 0
184
+ });
185
+ const s = t.component && t.component.parent;
186
+ t = s && s.vnode;
187
+ }
188
+ return e;
189
+ }
190
+ function cr(t) {
191
+ const e = [];
192
+ return t.forEach((n, s) => {
193
+ e.push(...s === 0 ? [] : [`
194
+ `], ...ur(n));
195
+ }), e;
196
+ }
197
+ function ur({ vnode: t, recurseCount: e }) {
198
+ const n = e > 0 ? `... (${e} recursive calls)` : "", s = t.component ? t.component.parent == null : !1, r = ` at <${gs(
199
+ t.component,
200
+ t.type,
201
+ s
202
+ )}`, i = ">" + n;
203
+ return t.props ? [r, ...fr(t.props), i] : [r + i];
204
+ }
205
+ function fr(t) {
206
+ const e = [], n = Object.keys(t);
207
+ return n.slice(0, 3).forEach((s) => {
208
+ e.push(...ts(s, t[s]));
209
+ }), n.length > 3 && e.push(" ..."), e;
210
+ }
211
+ function ts(t, e, n) {
212
+ return se(e) ? (e = JSON.stringify(e), n ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? n ? e : [`${t}=${e}`] : /* @__PURE__ */ gt(e) ? (e = ts(t, /* @__PURE__ */ de(e.value), !0), n ? e : [`${t}=Ref<`, e, ">"]) : ie(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = /* @__PURE__ */ de(e), n ? e : [`${t}=`, e]);
213
+ }
214
+ const ns = {
215
+ sp: "serverPrefetch hook",
216
+ bc: "beforeCreate hook",
217
+ c: "created hook",
218
+ bm: "beforeMount hook",
219
+ m: "mounted hook",
220
+ bu: "beforeUpdate hook",
221
+ u: "updated",
222
+ bum: "beforeUnmount hook",
223
+ um: "unmounted hook",
224
+ a: "activated hook",
225
+ da: "deactivated hook",
226
+ ec: "errorCaptured hook",
227
+ rtc: "renderTracked hook",
228
+ rtg: "renderTriggered hook",
229
+ 0: "setup function",
230
+ 1: "render function",
231
+ 2: "watcher getter",
232
+ 3: "watcher callback",
233
+ 4: "watcher cleanup function",
234
+ 5: "native event handler",
235
+ 6: "component event handler",
236
+ 7: "vnode hook",
237
+ 8: "directive hook",
238
+ 9: "transition hook",
239
+ 10: "app errorHandler",
240
+ 11: "app warnHandler",
241
+ 12: "ref function",
242
+ 13: "async component loader",
243
+ 14: "scheduler flush",
244
+ 15: "component update",
245
+ 16: "app unmount cleanup function"
246
+ };
247
+ function Qt(t, e, n, s) {
248
+ try {
249
+ return s ? t(...s) : t();
250
+ } catch (r) {
251
+ ss(r, e, n);
252
+ }
253
+ }
254
+ function ss(t, e, n, s = !0) {
255
+ const r = e ? e.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: o } = e && e.appContext.config || Vt;
256
+ if (e) {
257
+ let a = e.parent;
258
+ const c = e.proxy, h = process.env.NODE_ENV !== "production" ? ns[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
259
+ for (; a; ) {
260
+ const p = a.ec;
261
+ if (p) {
262
+ for (let f = 0; f < p.length; f++)
263
+ if (p[f](t, c, h) === !1)
264
+ return;
265
+ }
266
+ a = a.parent;
267
+ }
268
+ if (i) {
269
+ Qt(i, null, 10, [
270
+ t,
271
+ c,
272
+ h
273
+ ]);
274
+ return;
275
+ }
276
+ }
277
+ pr(t, n, r, s, o);
278
+ }
279
+ function pr(t, e, n, s = !0, r = !1) {
280
+ if (process.env.NODE_ENV !== "production") {
281
+ const i = ns[e];
282
+ if (n && or(n), Oe(`Unhandled error${i ? ` during execution of ${i}` : ""}`), n && lr(), s)
283
+ throw t;
284
+ console.error(t);
285
+ } else {
286
+ if (r)
287
+ throw t;
288
+ console.error(t);
289
+ }
290
+ }
291
+ const j = [];
292
+ let ee = -1;
293
+ const Re = [];
294
+ let ne = null, we = 0;
295
+ const hr = /* @__PURE__ */ Promise.resolve();
296
+ let Gt = null;
297
+ const dr = 100;
298
+ function gr(t) {
299
+ let e = ee + 1, n = j.length;
300
+ for (; e < n; ) {
301
+ const s = e + n >>> 1, r = j[s], i = Ve(r);
302
+ i < t || i === t && r.flags & 2 ? e = s + 1 : n = s;
303
+ }
304
+ return e;
305
+ }
306
+ function mr(t) {
307
+ if (!(t.flags & 1)) {
308
+ const e = Ve(t), n = j[j.length - 1];
309
+ !n || // fast path when the job id is larger than the tail
310
+ !(t.flags & 2) && e >= Ve(n) ? j.push(t) : j.splice(gr(e), 0, t), t.flags |= 1, rs();
311
+ }
312
+ }
313
+ function rs() {
314
+ Gt || (Gt = hr.then(is));
315
+ }
316
+ function br(t) {
317
+ Q(t) ? Re.push(...t) : ne && t.id === -1 ? ne.splice(we + 1, 0, t) : t.flags & 1 || (Re.push(t), t.flags |= 1), rs();
318
+ }
319
+ function _r(t) {
320
+ if (Re.length) {
321
+ const e = [...new Set(Re)].sort(
322
+ (n, s) => Ve(n) - Ve(s)
323
+ );
324
+ if (Re.length = 0, ne) {
325
+ ne.push(...e);
326
+ return;
327
+ }
328
+ for (ne = e, process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()), we = 0; we < ne.length; we++) {
329
+ const n = ne[we];
330
+ process.env.NODE_ENV !== "production" && os(t, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
331
+ }
332
+ ne = null, we = 0;
333
+ }
334
+ }
335
+ const Ve = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
336
+ function is(t) {
337
+ process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
338
+ const e = process.env.NODE_ENV !== "production" ? (n) => os(t, n) : Jn;
339
+ try {
340
+ for (ee = 0; ee < j.length; ee++) {
341
+ const n = j[ee];
342
+ if (n && !(n.flags & 8)) {
343
+ if (process.env.NODE_ENV !== "production" && e(n))
344
+ continue;
345
+ n.flags & 4 && (n.flags &= -2), Qt(
346
+ n,
347
+ n.i,
348
+ n.i ? 15 : 14
349
+ ), n.flags & 4 || (n.flags &= -2);
350
+ }
351
+ }
352
+ } finally {
353
+ for (; ee < j.length; ee++) {
354
+ const n = j[ee];
355
+ n && (n.flags &= -2);
356
+ }
357
+ ee = -1, j.length = 0, _r(t), Gt = null, (j.length || Re.length) && is(t);
358
+ }
359
+ }
360
+ function os(t, e) {
361
+ const n = t.get(e) || 0;
362
+ if (n > dr) {
363
+ const s = e.i, r = s && ds(s.type);
364
+ return ss(
365
+ `Maximum recursive updates exceeded${r ? ` in component <${r}>` : ""}. 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
+ null,
367
+ 10
368
+ ), !0;
369
+ }
370
+ return t.set(e, n + 1), !1;
371
+ }
372
+ const Pt = /* @__PURE__ */ new Map();
373
+ process.env.NODE_ENV !== "production" && (dt().__VUE_HMR_RUNTIME__ = {
374
+ createRecord: vt(kr),
375
+ rerender: vt(yr),
376
+ reload: vt(Tr)
377
+ });
378
+ const ot = /* @__PURE__ */ new Map();
379
+ function kr(t, e) {
380
+ return ot.has(t) ? !1 : (ot.set(t, {
381
+ initialDef: lt(e),
382
+ instances: /* @__PURE__ */ new Set()
383
+ }), !0);
384
+ }
385
+ function lt(t) {
386
+ return ms(t) ? t.__vccOpts : t;
387
+ }
388
+ function yr(t, e) {
389
+ const n = ot.get(t);
390
+ n && (n.initialDef.render = e, [...n.instances].forEach((s) => {
391
+ e && (s.render = e, lt(s.type).render = e), s.renderCache = [], s.job.flags & 8 || s.update();
392
+ }));
393
+ }
394
+ function Tr(t, e) {
395
+ const n = ot.get(t);
396
+ if (!n) return;
397
+ e = lt(e), $n(n.initialDef, e);
398
+ const s = [...n.instances];
399
+ for (let r = 0; r < s.length; r++) {
400
+ const i = s[r], o = lt(i.type);
401
+ let a = Pt.get(o);
402
+ a || (o !== n.initialDef && $n(o, e), Pt.set(o, 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 ? mr(() => {
403
+ i.job.flags & 8 || (i.parent.update(), a.delete(i));
404
+ }) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
405
+ "[HMR] Root or manually mounted instance modified. Full reload required."
406
+ ), i.root.ce && i !== i.root && i.root.ce._removeChildStyle(o);
407
+ }
408
+ br(() => {
409
+ Pt.clear();
410
+ });
411
+ }
412
+ function $n(t, e) {
413
+ ht(t, e);
414
+ for (const n in t)
415
+ n !== "__file" && !(n in e) && delete t[n];
416
+ }
417
+ function vt(t) {
418
+ return (e, n) => {
419
+ try {
420
+ return t(e, n);
421
+ } catch (s) {
422
+ console.error(s), console.warn(
423
+ "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
424
+ );
425
+ }
426
+ };
427
+ }
428
+ let xe, tt = [];
429
+ function ls(t, e) {
430
+ var n, s;
431
+ xe = t, xe ? (xe.enabled = !0, tt.forEach(({ event: r, args: i }) => xe.emit(r, ...i)), tt = []) : /* 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
+ window.HTMLElement && // also exclude jsdom
433
+ // eslint-disable-next-line no-restricted-syntax
434
+ !((s = (n = window.navigator) == null ? void 0 : n.userAgent) != null && s.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((i) => {
435
+ ls(i, e);
436
+ }), setTimeout(() => {
437
+ xe || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, tt = []);
438
+ }, 3e3)) : tt = [];
439
+ }
440
+ let at = null, Er = null;
441
+ const wr = (t) => t.__isTeleport;
442
+ function as(t, e) {
443
+ t.shapeFlag & 6 && t.component ? (t.transition = e, as(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
+ dt().requestIdleCallback;
446
+ dt().cancelIdleCallback;
447
+ const xr = /* @__PURE__ */ Symbol.for("v-ndc"), Ar = {};
448
+ process.env.NODE_ENV !== "production" && (Ar.ownKeys = (t) => (Oe(
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
+ ), Reflect.ownKeys(t)));
451
+ const Sr = {}, cs = (t) => Object.getPrototypeOf(t) === Sr, Rr = (t) => t.__isSuspense, us = /* @__PURE__ */ Symbol.for("v-fgt"), Or = /* @__PURE__ */ Symbol.for("v-txt"), Ir = /* @__PURE__ */ Symbol.for("v-cmt");
452
+ function Nr(t) {
453
+ return t ? t.__v_isVNode === !0 : !1;
454
+ }
455
+ const Dr = (...t) => ps(
456
+ ...t
457
+ ), fs = ({ key: t }) => t ?? null, it = ({
458
+ ref: t,
459
+ ref_key: e,
460
+ ref_for: n
461
+ }) => (typeof t == "number" && (t = "" + t), t != null ? se(t) || /* @__PURE__ */ gt(t) || ie(t) ? { i: at, r: t, k: e, f: !!n } : t : null);
462
+ function Cr(t, e = null, n = null, s = 0, r = null, i = t === us ? 0 : 1, o = !1, a = !1) {
463
+ const c = {
464
+ __v_isVNode: !0,
465
+ __v_skip: !0,
466
+ type: t,
467
+ props: e,
468
+ key: e && fs(e),
469
+ ref: e && it(e),
470
+ scopeId: Er,
471
+ slotScopeIds: null,
472
+ children: n,
473
+ component: null,
474
+ suspense: null,
475
+ ssContent: null,
476
+ ssFallback: null,
477
+ dirs: null,
478
+ transition: null,
479
+ el: null,
480
+ anchor: null,
481
+ target: null,
482
+ targetStart: null,
483
+ targetAnchor: null,
484
+ staticCount: 0,
485
+ shapeFlag: i,
486
+ patchFlag: s,
487
+ dynamicProps: r,
488
+ dynamicChildren: null,
489
+ appContext: null,
490
+ ctx: at
491
+ };
492
+ return a ? (Jt(c, n), i & 128 && t.normalize(c)) : n && (c.shapeFlag |= se(n) ? 8 : 16), process.env.NODE_ENV !== "production" && c.key !== c.key && Oe("VNode created with invalid key (NaN). VNode type:", c.type), c;
493
+ }
494
+ const Lr = process.env.NODE_ENV !== "production" ? Dr : ps;
495
+ function ps(t, e = null, n = null, s = 0, r = null, i = !1) {
496
+ if ((!t || t === xr) && (process.env.NODE_ENV !== "production" && !t && Oe(`Invalid vnode type when creating vnode: ${t}.`), t = Ir), Nr(t)) {
497
+ const a = ct(
498
+ t,
499
+ e,
500
+ !0
501
+ /* mergeRef: true */
502
+ );
503
+ return n && Jt(a, n), a.patchFlag = -2, a;
504
+ }
505
+ if (ms(t) && (t = t.__vccOpts), e) {
506
+ e = Mr(e);
507
+ let { class: a, style: c } = e;
508
+ a && !se(a) && (e.class = Kt(a)), he(c) && (/* @__PURE__ */ Wt(c) && !Q(c) && (c = ht({}, c)), e.style = Xt(c));
509
+ }
510
+ const o = se(t) ? 1 : Rr(t) ? 128 : wr(t) ? 64 : he(t) ? 4 : ie(t) ? 2 : 0;
511
+ return process.env.NODE_ENV !== "production" && o & 4 && /* @__PURE__ */ Wt(t) && (t = /* @__PURE__ */ de(t), Oe(
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
+ `
514
+ Component that was made reactive: `,
515
+ t
516
+ )), Cr(
517
+ t,
518
+ e,
519
+ n,
520
+ s,
521
+ r,
522
+ o,
523
+ i,
524
+ !0
525
+ );
526
+ }
527
+ function Mr(t) {
528
+ return t ? /* @__PURE__ */ Wt(t) || cs(t) ? ht({}, t) : t : null;
529
+ }
530
+ function ct(t, e, n = !1, s = !1) {
531
+ const { props: r, ref: i, patchFlag: o, children: a, transition: c } = t, h = e ? Pr(r || {}, e) : r, p = {
532
+ __v_isVNode: !0,
533
+ __v_skip: !0,
534
+ type: t.type,
535
+ props: h,
536
+ key: h && fs(h),
537
+ ref: e && e.ref ? (
538
+ // #2078 in the case of <component :is="vnode" ref="extra"/>
539
+ // if the vnode itself already has a ref, cloneVNode will need to merge
540
+ // the refs so the single vnode can be set on multiple refs
541
+ n && i ? Q(i) ? i.concat(it(e)) : [i, it(e)] : it(e)
542
+ ) : i,
543
+ scopeId: t.scopeId,
544
+ slotScopeIds: t.slotScopeIds,
545
+ children: process.env.NODE_ENV !== "production" && o === -1 && Q(a) ? a.map(hs) : a,
546
+ target: t.target,
547
+ targetStart: t.targetStart,
548
+ targetAnchor: t.targetAnchor,
549
+ staticCount: t.staticCount,
550
+ shapeFlag: t.shapeFlag,
551
+ // if the vnode is cloned with extra props, we can no longer assume its
552
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
553
+ // note: preserve flag for fragments since they use the flag for children
554
+ // fast paths only.
555
+ patchFlag: e && t.type !== us ? o === -1 ? 16 : o | 16 : o,
556
+ dynamicProps: t.dynamicProps,
557
+ dynamicChildren: t.dynamicChildren,
558
+ appContext: t.appContext,
559
+ dirs: t.dirs,
560
+ transition: c,
561
+ // These should technically only be non-null on mounted VNodes. However,
562
+ // they *should* be copied for kept-alive vnodes. So we just always copy
563
+ // them since them being non-null during a mount doesn't affect the logic as
564
+ // they will simply be overwritten.
565
+ component: t.component,
566
+ suspense: t.suspense,
567
+ ssContent: t.ssContent && ct(t.ssContent),
568
+ ssFallback: t.ssFallback && ct(t.ssFallback),
569
+ placeholder: t.placeholder,
570
+ el: t.el,
571
+ anchor: t.anchor,
572
+ ctx: t.ctx,
573
+ ce: t.ce
574
+ };
575
+ return c && s && as(
576
+ p,
577
+ c.clone(p)
578
+ ), p;
579
+ }
580
+ function hs(t) {
581
+ const e = ct(t);
582
+ return Q(t.children) && (e.children = t.children.map(hs)), e;
583
+ }
584
+ function $r(t = " ", e = 0) {
585
+ return Lr(Or, null, t, e);
586
+ }
587
+ function Jt(t, e) {
588
+ let n = 0;
589
+ const { shapeFlag: s } = t;
590
+ if (e == null)
591
+ e = null;
592
+ else if (Q(e))
593
+ n = 16;
594
+ else if (typeof e == "object")
595
+ if (s & 65) {
596
+ const r = e.default;
597
+ r && (r._c && (r._d = !1), Jt(t, r()), r._c && (r._d = !0));
598
+ return;
599
+ } else
600
+ n = 32, !e._ && !cs(e) && (e._ctx = at);
601
+ else ie(e) ? (e = { default: e, _ctx: at }, n = 32) : (e = String(e), s & 64 ? (n = 16, e = [$r(e)]) : n = 8);
602
+ t.children = e, t.shapeFlag |= n;
603
+ }
604
+ function Pr(...t) {
605
+ const e = {};
606
+ for (let n = 0; n < t.length; n++) {
607
+ const s = t[n];
608
+ for (const r in s)
609
+ if (r === "class")
610
+ e.class !== s.class && (e.class = Kt([e.class, s.class]));
611
+ else if (r === "style")
612
+ e.style = Xt([e.style, s.style]);
613
+ else if (Ks(r)) {
614
+ const i = e[r], o = s[r];
615
+ o && i !== o && !(Q(i) && i.includes(o)) ? e[r] = i ? [].concat(i, o) : o : o == null && i == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
616
+ // the model listener.
617
+ !Qs(r) && (e[r] = o);
618
+ } else r !== "" && (e[r] = s[r]);
619
+ }
620
+ return e;
621
+ }
622
+ {
623
+ const t = dt(), e = (n, s) => {
624
+ let r;
625
+ return (r = t[n]) || (r = t[n] = []), r.push(s), (i) => {
626
+ r.length > 1 ? r.forEach((o) => o(i)) : r[0](i);
627
+ };
628
+ };
629
+ e(
630
+ "__VUE_INSTANCE_SETTERS__",
631
+ (n) => n
632
+ ), e(
633
+ "__VUE_SSR_SETTERS__",
634
+ (n) => n
635
+ );
636
+ }
637
+ process.env.NODE_ENV;
638
+ const vr = /(?:^|[-_])\w/g, zr = (t) => t.replace(vr, (e) => e.toUpperCase()).replace(/[-_]/g, "");
639
+ function ds(t, e = !0) {
640
+ return ie(t) ? t.displayName || t.name : t.name || e && t.__name;
641
+ }
642
+ function gs(t, e, n = !1) {
643
+ let s = ds(e);
644
+ if (!s && e.__file) {
645
+ const r = e.__file.match(/([^/\\]+)\.\w+$/);
646
+ r && (s = r[1]);
647
+ }
648
+ if (!s && t) {
649
+ const r = (i) => {
650
+ for (const o in i)
651
+ if (i[o] === e)
652
+ return o;
653
+ };
654
+ s = r(t.components) || t.parent && r(
655
+ t.parent.type.components
656
+ ) || r(t.appContext.components);
657
+ }
658
+ return s ? zr(s) : n ? "App" : "Anonymous";
659
+ }
660
+ function ms(t) {
661
+ return ie(t) && "__vccOpts" in t;
662
+ }
663
+ function Fr() {
664
+ if (process.env.NODE_ENV === "production" || typeof window > "u")
665
+ return;
666
+ const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, s = { style: "color:#eb2f96" }, r = {
667
+ __vue_custom_formatter: !0,
668
+ header(f) {
669
+ if (!he(f))
670
+ return null;
671
+ if (f.__isVue)
672
+ return ["div", t, "VueInstance"];
673
+ if (/* @__PURE__ */ gt(f)) {
674
+ const g = f.value;
675
+ return [
676
+ "div",
677
+ {},
678
+ ["span", t, p(f)],
679
+ "<",
680
+ a(g),
681
+ ">"
682
+ ];
683
+ } else {
684
+ if (/* @__PURE__ */ es(f))
685
+ return [
686
+ "div",
687
+ {},
688
+ ["span", t, /* @__PURE__ */ Mt(f) ? "ShallowReactive" : "Reactive"],
689
+ "<",
690
+ a(f),
691
+ `>${/* @__PURE__ */ jt(f) ? " (readonly)" : ""}`
692
+ ];
693
+ if (/* @__PURE__ */ jt(f))
694
+ return [
695
+ "div",
696
+ {},
697
+ ["span", t, /* @__PURE__ */ Mt(f) ? "ShallowReadonly" : "Readonly"],
698
+ "<",
699
+ a(f),
700
+ ">"
701
+ ];
702
+ }
703
+ return null;
704
+ },
705
+ hasBody(f) {
706
+ return f && f.__isVue;
707
+ },
708
+ body(f) {
709
+ if (f && f.__isVue)
710
+ return [
711
+ "div",
712
+ {},
713
+ ...i(f.$)
714
+ ];
715
+ }
716
+ };
717
+ function i(f) {
718
+ const g = [];
719
+ f.type.props && f.props && g.push(o("props", /* @__PURE__ */ de(f.props))), f.setupState !== Vt && g.push(o("setup", f.setupState)), f.data !== Vt && g.push(o("data", /* @__PURE__ */ de(f.data)));
720
+ const b = c(f, "computed");
721
+ b && g.push(o("computed", b));
722
+ const _ = c(f, "inject");
723
+ return _ && g.push(o("injected", _)), g.push([
724
+ "div",
725
+ {},
726
+ [
727
+ "span",
728
+ {
729
+ style: s.style + ";opacity:0.66"
730
+ },
731
+ "$ (internal): "
732
+ ],
733
+ ["object", { object: f }]
734
+ ]), g;
735
+ }
736
+ function o(f, g) {
737
+ return g = ht({}, g), Object.keys(g).length ? [
738
+ "div",
739
+ { style: "line-height:1.25em;margin-bottom:0.6em" },
740
+ [
741
+ "div",
742
+ {
743
+ style: "color:#476582"
744
+ },
745
+ f
746
+ ],
747
+ [
748
+ "div",
749
+ {
750
+ style: "padding-left:1.25em"
751
+ },
752
+ ...Object.keys(g).map((b) => [
753
+ "div",
754
+ {},
755
+ ["span", s, b + ": "],
756
+ a(g[b], !1)
757
+ ])
758
+ ]
759
+ ] : ["span", {}];
760
+ }
761
+ function a(f, g = !0) {
762
+ return typeof f == "number" ? ["span", e, f] : typeof f == "string" ? ["span", n, JSON.stringify(f)] : typeof f == "boolean" ? ["span", s, f] : he(f) ? ["object", { object: g ? /* @__PURE__ */ de(f) : f }] : ["span", n, String(f)];
763
+ }
764
+ function c(f, g) {
765
+ const b = f.type;
766
+ if (ie(b))
767
+ return;
768
+ const _ = {};
769
+ for (const S in f.ctx)
770
+ h(b, S, g) && (_[S] = f.ctx[S]);
771
+ return _;
772
+ }
773
+ function h(f, g, b) {
774
+ const _ = f[b];
775
+ if (Q(_) && _.includes(g) || he(_) && g in _ || f.extends && h(f.extends, g, b) || f.mixins && f.mixins.some((S) => h(S, g, b)))
776
+ return !0;
777
+ }
778
+ function p(f) {
779
+ return /* @__PURE__ */ Mt(f) ? "ShallowRef" : f.effect ? "ComputedRef" : "Ref";
780
+ }
781
+ window.devtoolsFormatters ? window.devtoolsFormatters.push(r) : window.devtoolsFormatters = [r];
782
+ }
783
+ process.env.NODE_ENV;
784
+ process.env.NODE_ENV;
785
+ process.env.NODE_ENV;
786
+ /**
787
+ * vue v3.5.33
788
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
789
+ * @license MIT
790
+ **/
791
+ function Ur() {
792
+ Fr();
793
+ }
794
+ process.env.NODE_ENV !== "production" && Ur();
795
+ const bs = "*", _s = "#", ks = ".";
796
+ function re(...t) {
797
+ return t.join(ks);
798
+ }
799
+ function Hr(t) {
800
+ return t.split(ks).filter((e) => e !== "");
801
+ }
802
+ function Br(t) {
803
+ const e = ir(t);
804
+ return e ? e.type === "set" && e.elements.type === "string" && !e.elements.one_of : !1;
805
+ }
806
+ function Vr(t) {
807
+ return "one_of" in t && Array.isArray(t.one_of);
808
+ }
809
+ function Qi(t) {
810
+ return t.type === "set" && "elements" in t && "one_of" in t.elements;
811
+ }
812
+ function en() {
813
+ return {
814
+ async: !1,
815
+ breaks: !1,
816
+ extensions: null,
817
+ gfm: !0,
818
+ hooks: null,
819
+ pedantic: !1,
820
+ renderer: null,
821
+ silent: !1,
822
+ tokenizer: null,
823
+ walkTokens: null
824
+ };
825
+ }
826
+ let be = en();
827
+ function ys(t) {
828
+ be = t;
829
+ }
830
+ const Ts = /[&<>"']/, jr = new RegExp(Ts.source, "g"), Es = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Wr = new RegExp(Es.source, "g"), Gr = {
831
+ "&": "&amp;",
832
+ "<": "&lt;",
833
+ ">": "&gt;",
834
+ '"': "&quot;",
835
+ "'": "&#39;"
836
+ }, Pn = (t) => Gr[t];
837
+ function H(t, e) {
838
+ if (e) {
839
+ if (Ts.test(t))
840
+ return t.replace(jr, Pn);
841
+ } else if (Es.test(t))
842
+ return t.replace(Wr, Pn);
843
+ return t;
844
+ }
845
+ const qr = /(^|[^\[])\^/g;
846
+ function T(t, e) {
847
+ let n = typeof t == "string" ? t : t.source;
848
+ e = e || "";
849
+ const s = {
850
+ replace: (r, i) => {
851
+ let o = typeof i == "string" ? i : i.source;
852
+ return o = o.replace(qr, "$1"), n = n.replace(r, o), s;
853
+ },
854
+ getRegex: () => new RegExp(n, e)
855
+ };
856
+ return s;
857
+ }
858
+ function vn(t) {
859
+ try {
860
+ t = encodeURI(t).replace(/%25/g, "%");
861
+ } catch {
862
+ return null;
863
+ }
864
+ return t;
865
+ }
866
+ const He = { exec: () => null };
867
+ function zn(t, e) {
868
+ const n = t.replace(/\|/g, (i, o, a) => {
869
+ let c = !1, h = o;
870
+ for (; --h >= 0 && a[h] === "\\"; )
871
+ c = !c;
872
+ return c ? "|" : " |";
873
+ }), s = n.split(/ \|/);
874
+ let r = 0;
875
+ if (s[0].trim() || s.shift(), s.length > 0 && !s[s.length - 1].trim() && s.pop(), e)
876
+ if (s.length > e)
877
+ s.splice(e);
878
+ else
879
+ for (; s.length < e; )
880
+ s.push("");
881
+ for (; r < s.length; r++)
882
+ s[r] = s[r].trim().replace(/\\\|/g, "|");
883
+ return s;
884
+ }
885
+ function Me(t, e, n) {
886
+ const s = t.length;
887
+ if (s === 0)
888
+ return "";
889
+ let r = 0;
890
+ for (; r < s && t.charAt(s - r - 1) === e; )
891
+ r++;
892
+ return t.slice(0, s - r);
893
+ }
894
+ function Yr(t, e) {
895
+ if (t.indexOf(e[1]) === -1)
896
+ return -1;
897
+ let n = 0;
898
+ for (let s = 0; s < t.length; s++)
899
+ if (t[s] === "\\")
900
+ s++;
901
+ else if (t[s] === e[0])
902
+ n++;
903
+ else if (t[s] === e[1] && (n--, n < 0))
904
+ return s;
905
+ return -1;
906
+ }
907
+ function Fn(t, e, n, s) {
908
+ const r = e.href, i = e.title ? H(e.title) : null, o = t[1].replace(/\\([\[\]])/g, "$1");
909
+ if (t[0].charAt(0) !== "!") {
910
+ s.state.inLink = !0;
911
+ const a = {
912
+ type: "link",
913
+ raw: n,
914
+ href: r,
915
+ title: i,
916
+ text: o,
917
+ tokens: s.inlineTokens(o)
918
+ };
919
+ return s.state.inLink = !1, a;
920
+ }
921
+ return {
922
+ type: "image",
923
+ raw: n,
924
+ href: r,
925
+ title: i,
926
+ text: H(o)
927
+ };
928
+ }
929
+ function Zr(t, e) {
930
+ const n = t.match(/^(\s+)(?:```)/);
931
+ if (n === null)
932
+ return e;
933
+ const s = n[1];
934
+ return e.split(`
935
+ `).map((r) => {
936
+ const i = r.match(/^\s+/);
937
+ if (i === null)
938
+ return r;
939
+ const [o] = i;
940
+ return o.length >= s.length ? r.slice(s.length) : r;
941
+ }).join(`
942
+ `);
943
+ }
944
+ class ut {
945
+ // set by the lexer
946
+ constructor(e) {
947
+ E(this, "options");
948
+ E(this, "rules");
949
+ // set by the lexer
950
+ E(this, "lexer");
951
+ this.options = e || be;
952
+ }
953
+ space(e) {
954
+ const n = this.rules.block.newline.exec(e);
955
+ if (n && n[0].length > 0)
956
+ return {
957
+ type: "space",
958
+ raw: n[0]
959
+ };
960
+ }
961
+ code(e) {
962
+ const n = this.rules.block.code.exec(e);
963
+ if (n) {
964
+ const s = n[0].replace(/^(?: {1,4}| {0,3}\t)/gm, "");
965
+ return {
966
+ type: "code",
967
+ raw: n[0],
968
+ codeBlockStyle: "indented",
969
+ text: this.options.pedantic ? s : Me(s, `
970
+ `)
971
+ };
972
+ }
973
+ }
974
+ fences(e) {
975
+ const n = this.rules.block.fences.exec(e);
976
+ if (n) {
977
+ const s = n[0], r = Zr(s, n[3] || "");
978
+ return {
979
+ type: "code",
980
+ raw: s,
981
+ lang: n[2] ? n[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : n[2],
982
+ text: r
983
+ };
984
+ }
985
+ }
986
+ heading(e) {
987
+ const n = this.rules.block.heading.exec(e);
988
+ if (n) {
989
+ let s = n[2].trim();
990
+ if (/#$/.test(s)) {
991
+ const r = Me(s, "#");
992
+ (this.options.pedantic || !r || / $/.test(r)) && (s = r.trim());
993
+ }
994
+ return {
995
+ type: "heading",
996
+ raw: n[0],
997
+ depth: n[1].length,
998
+ text: s,
999
+ tokens: this.lexer.inline(s)
1000
+ };
1001
+ }
1002
+ }
1003
+ hr(e) {
1004
+ const n = this.rules.block.hr.exec(e);
1005
+ if (n)
1006
+ return {
1007
+ type: "hr",
1008
+ raw: Me(n[0], `
1009
+ `)
1010
+ };
1011
+ }
1012
+ blockquote(e) {
1013
+ const n = this.rules.block.blockquote.exec(e);
1014
+ if (n) {
1015
+ let s = Me(n[0], `
1016
+ `).split(`
1017
+ `), r = "", i = "";
1018
+ const o = [];
1019
+ for (; s.length > 0; ) {
1020
+ let a = !1;
1021
+ const c = [];
1022
+ let h;
1023
+ for (h = 0; h < s.length; h++)
1024
+ if (/^ {0,3}>/.test(s[h]))
1025
+ c.push(s[h]), a = !0;
1026
+ else if (!a)
1027
+ c.push(s[h]);
1028
+ else
1029
+ break;
1030
+ s = s.slice(h);
1031
+ const p = c.join(`
1032
+ `), f = p.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
1033
+ $1`).replace(/^ {0,3}>[ \t]?/gm, "");
1034
+ r = r ? `${r}
1035
+ ${p}` : p, i = i ? `${i}
1036
+ ${f}` : f;
1037
+ const g = this.lexer.state.top;
1038
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(f, o, !0), this.lexer.state.top = g, s.length === 0)
1039
+ break;
1040
+ const b = o[o.length - 1];
1041
+ if ((b == null ? void 0 : b.type) === "code")
1042
+ break;
1043
+ if ((b == null ? void 0 : b.type) === "blockquote") {
1044
+ const _ = b, S = _.raw + `
1045
+ ` + s.join(`
1046
+ `), B = this.blockquote(S);
1047
+ o[o.length - 1] = B, r = r.substring(0, r.length - _.raw.length) + B.raw, i = i.substring(0, i.length - _.text.length) + B.text;
1048
+ break;
1049
+ } else if ((b == null ? void 0 : b.type) === "list") {
1050
+ const _ = b, S = _.raw + `
1051
+ ` + s.join(`
1052
+ `), B = this.list(S);
1053
+ o[o.length - 1] = B, r = r.substring(0, r.length - b.raw.length) + B.raw, i = i.substring(0, i.length - _.raw.length) + B.raw, s = S.substring(o[o.length - 1].raw.length).split(`
1054
+ `);
1055
+ continue;
1056
+ }
1057
+ }
1058
+ return {
1059
+ type: "blockquote",
1060
+ raw: r,
1061
+ tokens: o,
1062
+ text: i
1063
+ };
1064
+ }
1065
+ }
1066
+ list(e) {
1067
+ let n = this.rules.block.list.exec(e);
1068
+ if (n) {
1069
+ let s = n[1].trim();
1070
+ const r = s.length > 1, i = {
1071
+ type: "list",
1072
+ raw: "",
1073
+ ordered: r,
1074
+ start: r ? +s.slice(0, -1) : "",
1075
+ loose: !1,
1076
+ items: []
1077
+ };
1078
+ s = r ? `\\d{1,9}\\${s.slice(-1)}` : `\\${s}`, this.options.pedantic && (s = r ? s : "[*+-]");
1079
+ const o = new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`);
1080
+ let a = !1;
1081
+ for (; e; ) {
1082
+ let c = !1, h = "", p = "";
1083
+ if (!(n = o.exec(e)) || this.rules.block.hr.test(e))
1084
+ break;
1085
+ h = n[0], e = e.substring(h.length);
1086
+ let f = n[2].split(`
1087
+ `, 1)[0].replace(/^\t+/, (Ie) => " ".repeat(3 * Ie.length)), g = e.split(`
1088
+ `, 1)[0], b = !f.trim(), _ = 0;
1089
+ if (this.options.pedantic ? (_ = 2, p = f.trimStart()) : b ? _ = n[1].length + 1 : (_ = n[2].search(/[^ ]/), _ = _ > 4 ? 1 : _, p = f.slice(_), _ += n[1].length), b && /^[ \t]*$/.test(g) && (h += g + `
1090
+ `, e = e.substring(g.length + 1), c = !0), !c) {
1091
+ const Ie = new RegExp(`^ {0,${Math.min(3, _ - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), Ge = new RegExp(`^ {0,${Math.min(3, _ - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), oe = new RegExp(`^ {0,${Math.min(3, _ - 1)}}(?:\`\`\`|~~~)`), N = new RegExp(`^ {0,${Math.min(3, _ - 1)}}#`), le = new RegExp(`^ {0,${Math.min(3, _ - 1)}}<(?:[a-z].*>|!--)`, "i");
1092
+ for (; e; ) {
1093
+ const ae = e.split(`
1094
+ `, 1)[0];
1095
+ let ce;
1096
+ if (g = ae, this.options.pedantic ? (g = g.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), ce = g) : ce = g.replace(/\t/g, " "), oe.test(g) || N.test(g) || le.test(g) || Ie.test(g) || Ge.test(g))
1097
+ break;
1098
+ if (ce.search(/[^ ]/) >= _ || !g.trim())
1099
+ p += `
1100
+ ` + ce.slice(_);
1101
+ else {
1102
+ if (b || f.replace(/\t/g, " ").search(/[^ ]/) >= 4 || oe.test(f) || N.test(f) || Ge.test(f))
1103
+ break;
1104
+ p += `
1105
+ ` + g;
1106
+ }
1107
+ !b && !g.trim() && (b = !0), h += ae + `
1108
+ `, e = e.substring(ae.length + 1), f = ce.slice(_);
1109
+ }
1110
+ }
1111
+ i.loose || (a ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(h) && (a = !0));
1112
+ let S = null, B;
1113
+ this.options.gfm && (S = /^\[[ xX]\] /.exec(p), S && (B = S[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), i.items.push({
1114
+ type: "list_item",
1115
+ raw: h,
1116
+ task: !!S,
1117
+ checked: B,
1118
+ loose: !1,
1119
+ text: p,
1120
+ tokens: []
1121
+ }), i.raw += h;
1122
+ }
1123
+ 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();
1124
+ for (let c = 0; c < i.items.length; c++)
1125
+ if (this.lexer.state.top = !1, i.items[c].tokens = this.lexer.blockTokens(i.items[c].text, []), !i.loose) {
1126
+ const h = i.items[c].tokens.filter((f) => f.type === "space"), p = h.length > 0 && h.some((f) => /\n.*\n/.test(f.raw));
1127
+ i.loose = p;
1128
+ }
1129
+ if (i.loose)
1130
+ for (let c = 0; c < i.items.length; c++)
1131
+ i.items[c].loose = !0;
1132
+ return i;
1133
+ }
1134
+ }
1135
+ html(e) {
1136
+ const n = this.rules.block.html.exec(e);
1137
+ if (n)
1138
+ return {
1139
+ type: "html",
1140
+ block: !0,
1141
+ raw: n[0],
1142
+ pre: n[1] === "pre" || n[1] === "script" || n[1] === "style",
1143
+ text: n[0]
1144
+ };
1145
+ }
1146
+ def(e) {
1147
+ const n = this.rules.block.def.exec(e);
1148
+ if (n) {
1149
+ const s = n[1].toLowerCase().replace(/\s+/g, " "), r = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : n[3];
1150
+ return {
1151
+ type: "def",
1152
+ tag: s,
1153
+ raw: n[0],
1154
+ href: r,
1155
+ title: i
1156
+ };
1157
+ }
1158
+ }
1159
+ table(e) {
1160
+ const n = this.rules.block.table.exec(e);
1161
+ if (!n || !/[:|]/.test(n[2]))
1162
+ return;
1163
+ const s = zn(n[1]), r = n[2].replace(/^\||\| *$/g, "").split("|"), i = n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(`
1164
+ `) : [], o = {
1165
+ type: "table",
1166
+ raw: n[0],
1167
+ header: [],
1168
+ align: [],
1169
+ rows: []
1170
+ };
1171
+ if (s.length === r.length) {
1172
+ for (const a of r)
1173
+ /^ *-+: *$/.test(a) ? o.align.push("right") : /^ *:-+: *$/.test(a) ? o.align.push("center") : /^ *:-+ *$/.test(a) ? o.align.push("left") : o.align.push(null);
1174
+ for (let a = 0; a < s.length; a++)
1175
+ o.header.push({
1176
+ text: s[a],
1177
+ tokens: this.lexer.inline(s[a]),
1178
+ header: !0,
1179
+ align: o.align[a]
1180
+ });
1181
+ for (const a of i)
1182
+ o.rows.push(zn(a, o.header.length).map((c, h) => ({
1183
+ text: c,
1184
+ tokens: this.lexer.inline(c),
1185
+ header: !1,
1186
+ align: o.align[h]
1187
+ })));
1188
+ return o;
1189
+ }
1190
+ }
1191
+ lheading(e) {
1192
+ const n = this.rules.block.lheading.exec(e);
1193
+ if (n)
1194
+ return {
1195
+ type: "heading",
1196
+ raw: n[0],
1197
+ depth: n[2].charAt(0) === "=" ? 1 : 2,
1198
+ text: n[1],
1199
+ tokens: this.lexer.inline(n[1])
1200
+ };
1201
+ }
1202
+ paragraph(e) {
1203
+ const n = this.rules.block.paragraph.exec(e);
1204
+ if (n) {
1205
+ const s = n[1].charAt(n[1].length - 1) === `
1206
+ ` ? n[1].slice(0, -1) : n[1];
1207
+ return {
1208
+ type: "paragraph",
1209
+ raw: n[0],
1210
+ text: s,
1211
+ tokens: this.lexer.inline(s)
1212
+ };
1213
+ }
1214
+ }
1215
+ text(e) {
1216
+ const n = this.rules.block.text.exec(e);
1217
+ if (n)
1218
+ return {
1219
+ type: "text",
1220
+ raw: n[0],
1221
+ text: n[0],
1222
+ tokens: this.lexer.inline(n[0])
1223
+ };
1224
+ }
1225
+ escape(e) {
1226
+ const n = this.rules.inline.escape.exec(e);
1227
+ if (n)
1228
+ return {
1229
+ type: "escape",
1230
+ raw: n[0],
1231
+ text: H(n[1])
1232
+ };
1233
+ }
1234
+ tag(e) {
1235
+ const n = this.rules.inline.tag.exec(e);
1236
+ if (n)
1237
+ return !this.lexer.state.inLink && /^<a /i.test(n[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && /^<\/a>/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), {
1238
+ type: "html",
1239
+ raw: n[0],
1240
+ inLink: this.lexer.state.inLink,
1241
+ inRawBlock: this.lexer.state.inRawBlock,
1242
+ block: !1,
1243
+ text: n[0]
1244
+ };
1245
+ }
1246
+ link(e) {
1247
+ const n = this.rules.inline.link.exec(e);
1248
+ if (n) {
1249
+ const s = n[2].trim();
1250
+ if (!this.options.pedantic && /^</.test(s)) {
1251
+ if (!/>$/.test(s))
1252
+ return;
1253
+ const o = Me(s.slice(0, -1), "\\");
1254
+ if ((s.length - o.length) % 2 === 0)
1255
+ return;
1256
+ } else {
1257
+ const o = Yr(n[2], "()");
1258
+ if (o > -1) {
1259
+ const c = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + o;
1260
+ n[2] = n[2].substring(0, o), n[0] = n[0].substring(0, c).trim(), n[3] = "";
1261
+ }
1262
+ }
1263
+ let r = n[2], i = "";
1264
+ if (this.options.pedantic) {
1265
+ const o = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);
1266
+ o && (r = o[1], i = o[3]);
1267
+ } else
1268
+ i = n[3] ? n[3].slice(1, -1) : "";
1269
+ return r = r.trim(), /^</.test(r) && (this.options.pedantic && !/>$/.test(s) ? r = r.slice(1) : r = r.slice(1, -1)), Fn(n, {
1270
+ href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
1271
+ title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
1272
+ }, n[0], this.lexer);
1273
+ }
1274
+ }
1275
+ reflink(e, n) {
1276
+ let s;
1277
+ if ((s = this.rules.inline.reflink.exec(e)) || (s = this.rules.inline.nolink.exec(e))) {
1278
+ const r = (s[2] || s[1]).replace(/\s+/g, " "), i = n[r.toLowerCase()];
1279
+ if (!i) {
1280
+ const o = s[0].charAt(0);
1281
+ return {
1282
+ type: "text",
1283
+ raw: o,
1284
+ text: o
1285
+ };
1286
+ }
1287
+ return Fn(s, i, s[0], this.lexer);
1288
+ }
1289
+ }
1290
+ emStrong(e, n, s = "") {
1291
+ let r = this.rules.inline.emStrongLDelim.exec(e);
1292
+ if (!r || r[3] && s.match(/[\p{L}\p{N}]/u))
1293
+ return;
1294
+ if (!(r[1] || r[2] || "") || !s || this.rules.inline.punctuation.exec(s)) {
1295
+ const o = [...r[0]].length - 1;
1296
+ let a, c, h = o, p = 0;
1297
+ const f = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1298
+ for (f.lastIndex = 0, n = n.slice(-1 * e.length + o); (r = f.exec(n)) != null; ) {
1299
+ if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a)
1300
+ continue;
1301
+ if (c = [...a].length, r[3] || r[4]) {
1302
+ h += c;
1303
+ continue;
1304
+ } else if ((r[5] || r[6]) && o % 3 && !((o + c) % 3)) {
1305
+ p += c;
1306
+ continue;
1307
+ }
1308
+ if (h -= c, h > 0)
1309
+ continue;
1310
+ c = Math.min(c, c + h + p);
1311
+ const g = [...r[0]][0].length, b = e.slice(0, o + r.index + g + c);
1312
+ if (Math.min(o, c) % 2) {
1313
+ const S = b.slice(1, -1);
1314
+ return {
1315
+ type: "em",
1316
+ raw: b,
1317
+ text: S,
1318
+ tokens: this.lexer.inlineTokens(S)
1319
+ };
1320
+ }
1321
+ const _ = b.slice(2, -2);
1322
+ return {
1323
+ type: "strong",
1324
+ raw: b,
1325
+ text: _,
1326
+ tokens: this.lexer.inlineTokens(_)
1327
+ };
1328
+ }
1329
+ }
1330
+ }
1331
+ codespan(e) {
1332
+ const n = this.rules.inline.code.exec(e);
1333
+ if (n) {
1334
+ let s = n[2].replace(/\n/g, " ");
1335
+ const r = /[^ ]/.test(s), i = /^ /.test(s) && / $/.test(s);
1336
+ return r && i && (s = s.substring(1, s.length - 1)), s = H(s, !0), {
1337
+ type: "codespan",
1338
+ raw: n[0],
1339
+ text: s
1340
+ };
1341
+ }
1342
+ }
1343
+ br(e) {
1344
+ const n = this.rules.inline.br.exec(e);
1345
+ if (n)
1346
+ return {
1347
+ type: "br",
1348
+ raw: n[0]
1349
+ };
1350
+ }
1351
+ del(e) {
1352
+ const n = this.rules.inline.del.exec(e);
1353
+ if (n)
1354
+ return {
1355
+ type: "del",
1356
+ raw: n[0],
1357
+ text: n[2],
1358
+ tokens: this.lexer.inlineTokens(n[2])
1359
+ };
1360
+ }
1361
+ autolink(e) {
1362
+ const n = this.rules.inline.autolink.exec(e);
1363
+ if (n) {
1364
+ let s, r;
1365
+ return n[2] === "@" ? (s = H(n[1]), r = "mailto:" + s) : (s = H(n[1]), r = s), {
1366
+ type: "link",
1367
+ raw: n[0],
1368
+ text: s,
1369
+ href: r,
1370
+ tokens: [
1371
+ {
1372
+ type: "text",
1373
+ raw: s,
1374
+ text: s
1375
+ }
1376
+ ]
1377
+ };
1378
+ }
1379
+ }
1380
+ url(e) {
1381
+ var s;
1382
+ let n;
1383
+ if (n = this.rules.inline.url.exec(e)) {
1384
+ let r, i;
1385
+ if (n[2] === "@")
1386
+ r = H(n[0]), i = "mailto:" + r;
1387
+ else {
1388
+ let o;
1389
+ do
1390
+ o = n[0], n[0] = ((s = this.rules.inline._backpedal.exec(n[0])) == null ? void 0 : s[0]) ?? "";
1391
+ while (o !== n[0]);
1392
+ r = H(n[0]), n[1] === "www." ? i = "http://" + n[0] : i = n[0];
1393
+ }
1394
+ return {
1395
+ type: "link",
1396
+ raw: n[0],
1397
+ text: r,
1398
+ href: i,
1399
+ tokens: [
1400
+ {
1401
+ type: "text",
1402
+ raw: r,
1403
+ text: r
1404
+ }
1405
+ ]
1406
+ };
1407
+ }
1408
+ }
1409
+ inlineText(e) {
1410
+ const n = this.rules.inline.text.exec(e);
1411
+ if (n) {
1412
+ let s;
1413
+ return this.lexer.state.inRawBlock ? s = n[0] : s = H(n[0]), {
1414
+ type: "text",
1415
+ raw: n[0],
1416
+ text: s
1417
+ };
1418
+ }
1419
+ }
1420
+ }
1421
+ const Xr = /^(?:[ \t]*(?:\n|$))+/, Kr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Qr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Jr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ws = /(?:[*+-]|\d{1,9}[.)])/, xs = T(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, ws).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(), tn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ei = /^[^\n]+/, nn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, ti = T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", nn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ni = T(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ws).getRegex(), mt = "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", sn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, si = T("^ {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", sn).replace("tag", mt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), As = T(tn).replace("hr", je).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", mt).getRegex(), ri = T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", As).getRegex(), rn = {
1422
+ blockquote: ri,
1423
+ code: Kr,
1424
+ def: ti,
1425
+ fences: Qr,
1426
+ heading: Jr,
1427
+ hr: je,
1428
+ html: si,
1429
+ lheading: xs,
1430
+ list: ni,
1431
+ newline: Xr,
1432
+ paragraph: As,
1433
+ table: He,
1434
+ text: ei
1435
+ }, Un = T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", je).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", mt).getRegex(), ii = {
1436
+ ...rn,
1437
+ table: Un,
1438
+ paragraph: T(tn).replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Un).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", mt).getRegex()
1439
+ }, oi = {
1440
+ ...rn,
1441
+ html: T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", sn).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
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1443
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
1444
+ fences: He,
1445
+ // fences not supported
1446
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1447
+ paragraph: T(tn).replace("hr", je).replace("heading", ` *#{1,6} *[^
1448
+ ]`).replace("lheading", xs).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1449
+ }, Ss = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, li = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Rs = /^( {2,}|\\)\n(?!\s*$)/, ai = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, We = "\\p{P}\\p{S}", ci = T(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, We).getRegex(), ui = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, fi = T(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, We).getRegex(), pi = T("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, We).getRegex(), hi = T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, We).getRegex(), di = T(/\\([punct])/, "gu").replace(/punct/g, We).getRegex(), gi = T(/^<(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(), mi = T(sn).replace("(?:-->|$)", "-->").getRegex(), bi = T("^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", mi).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ft = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, _i = T(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", ft).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Os = T(/^!?\[(label)\]\[(ref)\]/).replace("label", ft).replace("ref", nn).getRegex(), Is = T(/^!?\[(ref)\](?:\[\])?/).replace("ref", nn).getRegex(), ki = T("reflink|nolink(?!\\()", "g").replace("reflink", Os).replace("nolink", Is).getRegex(), on = {
1450
+ _backpedal: He,
1451
+ // only used for GFM url
1452
+ anyPunctuation: di,
1453
+ autolink: gi,
1454
+ blockSkip: ui,
1455
+ br: Rs,
1456
+ code: li,
1457
+ del: He,
1458
+ emStrongLDelim: fi,
1459
+ emStrongRDelimAst: pi,
1460
+ emStrongRDelimUnd: hi,
1461
+ escape: Ss,
1462
+ link: _i,
1463
+ nolink: Is,
1464
+ punctuation: ci,
1465
+ reflink: Os,
1466
+ reflinkSearch: ki,
1467
+ tag: bi,
1468
+ text: ai,
1469
+ url: He
1470
+ }, yi = {
1471
+ ...on,
1472
+ link: T(/^!?\[(label)\]\((.*?)\)/).replace("label", ft).getRegex(),
1473
+ reflink: T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ft).getRegex()
1474
+ }, qt = {
1475
+ ...on,
1476
+ escape: T(Ss).replace("])", "~|])").getRegex(),
1477
+ url: T(/^((?: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
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1479
+ del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
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
+ }, Ti = {
1482
+ ...qt,
1483
+ br: T(Rs).replace("{2,}", "*").getRegex(),
1484
+ text: T(qt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1485
+ }, nt = {
1486
+ normal: rn,
1487
+ gfm: ii,
1488
+ pedantic: oi
1489
+ }, $e = {
1490
+ normal: on,
1491
+ gfm: qt,
1492
+ breaks: Ti,
1493
+ pedantic: yi
1494
+ };
1495
+ class W {
1496
+ constructor(e) {
1497
+ E(this, "tokens");
1498
+ E(this, "options");
1499
+ E(this, "state");
1500
+ E(this, "tokenizer");
1501
+ E(this, "inlineQueue");
1502
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || be, this.options.tokenizer = this.options.tokenizer || new ut(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1503
+ inLink: !1,
1504
+ inRawBlock: !1,
1505
+ top: !0
1506
+ };
1507
+ const n = {
1508
+ block: nt.normal,
1509
+ inline: $e.normal
1510
+ };
1511
+ this.options.pedantic ? (n.block = nt.pedantic, n.inline = $e.pedantic) : this.options.gfm && (n.block = nt.gfm, this.options.breaks ? n.inline = $e.breaks : n.inline = $e.gfm), this.tokenizer.rules = n;
1512
+ }
1513
+ /**
1514
+ * Expose Rules
1515
+ */
1516
+ static get rules() {
1517
+ return {
1518
+ block: nt,
1519
+ inline: $e
1520
+ };
1521
+ }
1522
+ /**
1523
+ * Static Lex Method
1524
+ */
1525
+ static lex(e, n) {
1526
+ return new W(n).lex(e);
1527
+ }
1528
+ /**
1529
+ * Static Lex Inline Method
1530
+ */
1531
+ static lexInline(e, n) {
1532
+ return new W(n).inlineTokens(e);
1533
+ }
1534
+ /**
1535
+ * Preprocessing
1536
+ */
1537
+ lex(e) {
1538
+ e = e.replace(/\r\n|\r/g, `
1539
+ `), this.blockTokens(e, this.tokens);
1540
+ for (let n = 0; n < this.inlineQueue.length; n++) {
1541
+ const s = this.inlineQueue[n];
1542
+ this.inlineTokens(s.src, s.tokens);
1543
+ }
1544
+ return this.inlineQueue = [], this.tokens;
1545
+ }
1546
+ blockTokens(e, n = [], s = !1) {
1547
+ this.options.pedantic && (e = e.replace(/\t/g, " ").replace(/^ +$/gm, ""));
1548
+ let r, i, o;
1549
+ for (; e; )
1550
+ if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((a) => (r = a.call({ lexer: this }, e, n)) ? (e = e.substring(r.raw.length), n.push(r), !0) : !1))) {
1551
+ if (r = this.tokenizer.space(e)) {
1552
+ e = e.substring(r.raw.length), r.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += `
1553
+ ` : n.push(r);
1554
+ continue;
1555
+ }
1556
+ if (r = this.tokenizer.code(e)) {
1557
+ e = e.substring(r.raw.length), i = n[n.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
1558
+ ` + r.raw, i.text += `
1559
+ ` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(r);
1560
+ continue;
1561
+ }
1562
+ if (r = this.tokenizer.fences(e)) {
1563
+ e = e.substring(r.raw.length), n.push(r);
1564
+ continue;
1565
+ }
1566
+ if (r = this.tokenizer.heading(e)) {
1567
+ e = e.substring(r.raw.length), n.push(r);
1568
+ continue;
1569
+ }
1570
+ if (r = this.tokenizer.hr(e)) {
1571
+ e = e.substring(r.raw.length), n.push(r);
1572
+ continue;
1573
+ }
1574
+ if (r = this.tokenizer.blockquote(e)) {
1575
+ e = e.substring(r.raw.length), n.push(r);
1576
+ continue;
1577
+ }
1578
+ if (r = this.tokenizer.list(e)) {
1579
+ e = e.substring(r.raw.length), n.push(r);
1580
+ continue;
1581
+ }
1582
+ if (r = this.tokenizer.html(e)) {
1583
+ e = e.substring(r.raw.length), n.push(r);
1584
+ continue;
1585
+ }
1586
+ if (r = this.tokenizer.def(e)) {
1587
+ e = e.substring(r.raw.length), i = n[n.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
1588
+ ` + r.raw, i.text += `
1589
+ ` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
1590
+ href: r.href,
1591
+ title: r.title
1592
+ });
1593
+ continue;
1594
+ }
1595
+ if (r = this.tokenizer.table(e)) {
1596
+ e = e.substring(r.raw.length), n.push(r);
1597
+ continue;
1598
+ }
1599
+ if (r = this.tokenizer.lheading(e)) {
1600
+ e = e.substring(r.raw.length), n.push(r);
1601
+ continue;
1602
+ }
1603
+ if (o = e, this.options.extensions && this.options.extensions.startBlock) {
1604
+ let a = 1 / 0;
1605
+ const c = e.slice(1);
1606
+ let h;
1607
+ this.options.extensions.startBlock.forEach((p) => {
1608
+ h = p.call({ lexer: this }, c), typeof h == "number" && h >= 0 && (a = Math.min(a, h));
1609
+ }), a < 1 / 0 && a >= 0 && (o = e.substring(0, a + 1));
1610
+ }
1611
+ if (this.state.top && (r = this.tokenizer.paragraph(o))) {
1612
+ i = n[n.length - 1], s && (i == null ? void 0 : i.type) === "paragraph" ? (i.raw += `
1613
+ ` + r.raw, i.text += `
1614
+ ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(r), s = o.length !== e.length, e = e.substring(r.raw.length);
1615
+ continue;
1616
+ }
1617
+ if (r = this.tokenizer.text(e)) {
1618
+ e = e.substring(r.raw.length), i = n[n.length - 1], i && i.type === "text" ? (i.raw += `
1619
+ ` + r.raw, i.text += `
1620
+ ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(r);
1621
+ continue;
1622
+ }
1623
+ if (e) {
1624
+ const a = "Infinite loop on byte: " + e.charCodeAt(0);
1625
+ if (this.options.silent) {
1626
+ console.error(a);
1627
+ break;
1628
+ } else
1629
+ throw new Error(a);
1630
+ }
1631
+ }
1632
+ return this.state.top = !0, n;
1633
+ }
1634
+ inline(e, n = []) {
1635
+ return this.inlineQueue.push({ src: e, tokens: n }), n;
1636
+ }
1637
+ /**
1638
+ * Lexing/Compiling
1639
+ */
1640
+ inlineTokens(e, n = []) {
1641
+ let s, r, i, o = e, a, c, h;
1642
+ if (this.tokens.links) {
1643
+ const p = Object.keys(this.tokens.links);
1644
+ if (p.length > 0)
1645
+ for (; (a = this.tokenizer.rules.inline.reflinkSearch.exec(o)) != null; )
1646
+ p.includes(a[0].slice(a[0].lastIndexOf("[") + 1, -1)) && (o = o.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1647
+ }
1648
+ for (; (a = this.tokenizer.rules.inline.blockSkip.exec(o)) != null; )
1649
+ o = o.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1650
+ for (; (a = this.tokenizer.rules.inline.anyPunctuation.exec(o)) != null; )
1651
+ o = o.slice(0, a.index) + "++" + o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1652
+ for (; e; )
1653
+ if (c || (h = ""), c = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((p) => (s = p.call({ lexer: this }, e, n)) ? (e = e.substring(s.raw.length), n.push(s), !0) : !1))) {
1654
+ if (s = this.tokenizer.escape(e)) {
1655
+ e = e.substring(s.raw.length), n.push(s);
1656
+ continue;
1657
+ }
1658
+ if (s = this.tokenizer.tag(e)) {
1659
+ e = e.substring(s.raw.length), r = n[n.length - 1], r && s.type === "text" && r.type === "text" ? (r.raw += s.raw, r.text += s.text) : n.push(s);
1660
+ continue;
1661
+ }
1662
+ if (s = this.tokenizer.link(e)) {
1663
+ e = e.substring(s.raw.length), n.push(s);
1664
+ continue;
1665
+ }
1666
+ if (s = this.tokenizer.reflink(e, this.tokens.links)) {
1667
+ e = e.substring(s.raw.length), r = n[n.length - 1], r && s.type === "text" && r.type === "text" ? (r.raw += s.raw, r.text += s.text) : n.push(s);
1668
+ continue;
1669
+ }
1670
+ if (s = this.tokenizer.emStrong(e, o, h)) {
1671
+ e = e.substring(s.raw.length), n.push(s);
1672
+ continue;
1673
+ }
1674
+ if (s = this.tokenizer.codespan(e)) {
1675
+ e = e.substring(s.raw.length), n.push(s);
1676
+ continue;
1677
+ }
1678
+ if (s = this.tokenizer.br(e)) {
1679
+ e = e.substring(s.raw.length), n.push(s);
1680
+ continue;
1681
+ }
1682
+ if (s = this.tokenizer.del(e)) {
1683
+ e = e.substring(s.raw.length), n.push(s);
1684
+ continue;
1685
+ }
1686
+ if (s = this.tokenizer.autolink(e)) {
1687
+ e = e.substring(s.raw.length), n.push(s);
1688
+ continue;
1689
+ }
1690
+ if (!this.state.inLink && (s = this.tokenizer.url(e))) {
1691
+ e = e.substring(s.raw.length), n.push(s);
1692
+ continue;
1693
+ }
1694
+ if (i = e, this.options.extensions && this.options.extensions.startInline) {
1695
+ let p = 1 / 0;
1696
+ const f = e.slice(1);
1697
+ let g;
1698
+ this.options.extensions.startInline.forEach((b) => {
1699
+ g = b.call({ lexer: this }, f), typeof g == "number" && g >= 0 && (p = Math.min(p, g));
1700
+ }), p < 1 / 0 && p >= 0 && (i = e.substring(0, p + 1));
1701
+ }
1702
+ if (s = this.tokenizer.inlineText(i)) {
1703
+ e = e.substring(s.raw.length), s.raw.slice(-1) !== "_" && (h = s.raw.slice(-1)), c = !0, r = n[n.length - 1], r && r.type === "text" ? (r.raw += s.raw, r.text += s.text) : n.push(s);
1704
+ continue;
1705
+ }
1706
+ if (e) {
1707
+ const p = "Infinite loop on byte: " + e.charCodeAt(0);
1708
+ if (this.options.silent) {
1709
+ console.error(p);
1710
+ break;
1711
+ } else
1712
+ throw new Error(p);
1713
+ }
1714
+ }
1715
+ return n;
1716
+ }
1717
+ }
1718
+ class pt {
1719
+ // set by the parser
1720
+ constructor(e) {
1721
+ E(this, "options");
1722
+ E(this, "parser");
1723
+ this.options = e || be;
1724
+ }
1725
+ space(e) {
1726
+ return "";
1727
+ }
1728
+ code({ text: e, lang: n, escaped: s }) {
1729
+ var o;
1730
+ const r = (o = (n || "").match(/^\S*/)) == null ? void 0 : o[0], i = e.replace(/\n$/, "") + `
1731
+ `;
1732
+ return r ? '<pre><code class="language-' + H(r) + '">' + (s ? i : H(i, !0)) + `</code></pre>
1733
+ ` : "<pre><code>" + (s ? i : H(i, !0)) + `</code></pre>
1734
+ `;
1735
+ }
1736
+ blockquote({ tokens: e }) {
1737
+ return `<blockquote>
1738
+ ${this.parser.parse(e)}</blockquote>
1739
+ `;
1740
+ }
1741
+ html({ text: e }) {
1742
+ return e;
1743
+ }
1744
+ heading({ tokens: e, depth: n }) {
1745
+ return `<h${n}>${this.parser.parseInline(e)}</h${n}>
1746
+ `;
1747
+ }
1748
+ hr(e) {
1749
+ return `<hr>
1750
+ `;
1751
+ }
1752
+ list(e) {
1753
+ const n = e.ordered, s = e.start;
1754
+ let r = "";
1755
+ for (let a = 0; a < e.items.length; a++) {
1756
+ const c = e.items[a];
1757
+ r += this.listitem(c);
1758
+ }
1759
+ const i = n ? "ol" : "ul", o = n && s !== 1 ? ' start="' + s + '"' : "";
1760
+ return "<" + i + o + `>
1761
+ ` + r + "</" + i + `>
1762
+ `;
1763
+ }
1764
+ listitem(e) {
1765
+ let n = "";
1766
+ if (e.task) {
1767
+ const s = this.checkbox({ checked: !!e.checked });
1768
+ e.loose ? e.tokens.length > 0 && e.tokens[0].type === "paragraph" ? (e.tokens[0].text = s + " " + 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 = s + " " + e.tokens[0].tokens[0].text)) : e.tokens.unshift({
1769
+ type: "text",
1770
+ raw: s + " ",
1771
+ text: s + " "
1772
+ }) : n += s + " ";
1773
+ }
1774
+ return n += this.parser.parse(e.tokens, !!e.loose), `<li>${n}</li>
1775
+ `;
1776
+ }
1777
+ checkbox({ checked: e }) {
1778
+ return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
1779
+ }
1780
+ paragraph({ tokens: e }) {
1781
+ return `<p>${this.parser.parseInline(e)}</p>
1782
+ `;
1783
+ }
1784
+ table(e) {
1785
+ let n = "", s = "";
1786
+ for (let i = 0; i < e.header.length; i++)
1787
+ s += this.tablecell(e.header[i]);
1788
+ n += this.tablerow({ text: s });
1789
+ let r = "";
1790
+ for (let i = 0; i < e.rows.length; i++) {
1791
+ const o = e.rows[i];
1792
+ s = "";
1793
+ for (let a = 0; a < o.length; a++)
1794
+ s += this.tablecell(o[a]);
1795
+ r += this.tablerow({ text: s });
1796
+ }
1797
+ return r && (r = `<tbody>${r}</tbody>`), `<table>
1798
+ <thead>
1799
+ ` + n + `</thead>
1800
+ ` + r + `</table>
1801
+ `;
1802
+ }
1803
+ tablerow({ text: e }) {
1804
+ return `<tr>
1805
+ ${e}</tr>
1806
+ `;
1807
+ }
1808
+ tablecell(e) {
1809
+ const n = this.parser.parseInline(e.tokens), s = e.header ? "th" : "td";
1810
+ return (e.align ? `<${s} align="${e.align}">` : `<${s}>`) + n + `</${s}>
1811
+ `;
1812
+ }
1813
+ /**
1814
+ * span level renderer
1815
+ */
1816
+ strong({ tokens: e }) {
1817
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1818
+ }
1819
+ em({ tokens: e }) {
1820
+ return `<em>${this.parser.parseInline(e)}</em>`;
1821
+ }
1822
+ codespan({ text: e }) {
1823
+ return `<code>${e}</code>`;
1824
+ }
1825
+ br(e) {
1826
+ return "<br>";
1827
+ }
1828
+ del({ tokens: e }) {
1829
+ return `<del>${this.parser.parseInline(e)}</del>`;
1830
+ }
1831
+ link({ href: e, title: n, tokens: s }) {
1832
+ const r = this.parser.parseInline(s), i = vn(e);
1833
+ if (i === null)
1834
+ return r;
1835
+ e = i;
1836
+ let o = '<a href="' + e + '"';
1837
+ return n && (o += ' title="' + n + '"'), o += ">" + r + "</a>", o;
1838
+ }
1839
+ image({ href: e, title: n, text: s }) {
1840
+ const r = vn(e);
1841
+ if (r === null)
1842
+ return s;
1843
+ e = r;
1844
+ let i = `<img src="${e}" alt="${s}"`;
1845
+ return n && (i += ` title="${n}"`), i += ">", i;
1846
+ }
1847
+ text(e) {
1848
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : e.text;
1849
+ }
1850
+ }
1851
+ class ln {
1852
+ // no need for block level renderers
1853
+ strong({ text: e }) {
1854
+ return e;
1855
+ }
1856
+ em({ text: e }) {
1857
+ return e;
1858
+ }
1859
+ codespan({ text: e }) {
1860
+ return e;
1861
+ }
1862
+ del({ text: e }) {
1863
+ return e;
1864
+ }
1865
+ html({ text: e }) {
1866
+ return e;
1867
+ }
1868
+ text({ text: e }) {
1869
+ return e;
1870
+ }
1871
+ link({ text: e }) {
1872
+ return "" + e;
1873
+ }
1874
+ image({ text: e }) {
1875
+ return "" + e;
1876
+ }
1877
+ br() {
1878
+ return "";
1879
+ }
1880
+ }
1881
+ class G {
1882
+ constructor(e) {
1883
+ E(this, "options");
1884
+ E(this, "renderer");
1885
+ E(this, "textRenderer");
1886
+ this.options = e || be, this.options.renderer = this.options.renderer || new pt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ln();
1887
+ }
1888
+ /**
1889
+ * Static Parse Method
1890
+ */
1891
+ static parse(e, n) {
1892
+ return new G(n).parse(e);
1893
+ }
1894
+ /**
1895
+ * Static Parse Inline Method
1896
+ */
1897
+ static parseInline(e, n) {
1898
+ return new G(n).parseInline(e);
1899
+ }
1900
+ /**
1901
+ * Parse Loop
1902
+ */
1903
+ parse(e, n = !0) {
1904
+ let s = "";
1905
+ for (let r = 0; r < e.length; r++) {
1906
+ const i = e[r];
1907
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
1908
+ const a = i, c = this.options.extensions.renderers[a.type].call({ parser: this }, a);
1909
+ if (c !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(a.type)) {
1910
+ s += c || "";
1911
+ continue;
1912
+ }
1913
+ }
1914
+ const o = i;
1915
+ switch (o.type) {
1916
+ case "space": {
1917
+ s += this.renderer.space(o);
1918
+ continue;
1919
+ }
1920
+ case "hr": {
1921
+ s += this.renderer.hr(o);
1922
+ continue;
1923
+ }
1924
+ case "heading": {
1925
+ s += this.renderer.heading(o);
1926
+ continue;
1927
+ }
1928
+ case "code": {
1929
+ s += this.renderer.code(o);
1930
+ continue;
1931
+ }
1932
+ case "table": {
1933
+ s += this.renderer.table(o);
1934
+ continue;
1935
+ }
1936
+ case "blockquote": {
1937
+ s += this.renderer.blockquote(o);
1938
+ continue;
1939
+ }
1940
+ case "list": {
1941
+ s += this.renderer.list(o);
1942
+ continue;
1943
+ }
1944
+ case "html": {
1945
+ s += this.renderer.html(o);
1946
+ continue;
1947
+ }
1948
+ case "paragraph": {
1949
+ s += this.renderer.paragraph(o);
1950
+ continue;
1951
+ }
1952
+ case "text": {
1953
+ let a = o, c = this.renderer.text(a);
1954
+ for (; r + 1 < e.length && e[r + 1].type === "text"; )
1955
+ a = e[++r], c += `
1956
+ ` + this.renderer.text(a);
1957
+ n ? s += this.renderer.paragraph({
1958
+ type: "paragraph",
1959
+ raw: c,
1960
+ text: c,
1961
+ tokens: [{ type: "text", raw: c, text: c }]
1962
+ }) : s += c;
1963
+ continue;
1964
+ }
1965
+ default: {
1966
+ const a = 'Token with "' + o.type + '" type was not found.';
1967
+ if (this.options.silent)
1968
+ return console.error(a), "";
1969
+ throw new Error(a);
1970
+ }
1971
+ }
1972
+ }
1973
+ return s;
1974
+ }
1975
+ /**
1976
+ * Parse Inline Tokens
1977
+ */
1978
+ parseInline(e, n) {
1979
+ n = n || this.renderer;
1980
+ let s = "";
1981
+ for (let r = 0; r < e.length; r++) {
1982
+ const i = e[r];
1983
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
1984
+ const a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1985
+ if (a !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
1986
+ s += a || "";
1987
+ continue;
1988
+ }
1989
+ }
1990
+ const o = i;
1991
+ switch (o.type) {
1992
+ case "escape": {
1993
+ s += n.text(o);
1994
+ break;
1995
+ }
1996
+ case "html": {
1997
+ s += n.html(o);
1998
+ break;
1999
+ }
2000
+ case "link": {
2001
+ s += n.link(o);
2002
+ break;
2003
+ }
2004
+ case "image": {
2005
+ s += n.image(o);
2006
+ break;
2007
+ }
2008
+ case "strong": {
2009
+ s += n.strong(o);
2010
+ break;
2011
+ }
2012
+ case "em": {
2013
+ s += n.em(o);
2014
+ break;
2015
+ }
2016
+ case "codespan": {
2017
+ s += n.codespan(o);
2018
+ break;
2019
+ }
2020
+ case "br": {
2021
+ s += n.br(o);
2022
+ break;
2023
+ }
2024
+ case "del": {
2025
+ s += n.del(o);
2026
+ break;
2027
+ }
2028
+ case "text": {
2029
+ s += n.text(o);
2030
+ break;
2031
+ }
2032
+ default: {
2033
+ const a = 'Token with "' + o.type + '" type was not found.';
2034
+ if (this.options.silent)
2035
+ return console.error(a), "";
2036
+ throw new Error(a);
2037
+ }
2038
+ }
2039
+ }
2040
+ return s;
2041
+ }
2042
+ }
2043
+ class Be {
2044
+ constructor(e) {
2045
+ E(this, "options");
2046
+ E(this, "block");
2047
+ this.options = e || be;
2048
+ }
2049
+ /**
2050
+ * Process markdown before marked
2051
+ */
2052
+ preprocess(e) {
2053
+ return e;
2054
+ }
2055
+ /**
2056
+ * Process HTML after marked is finished
2057
+ */
2058
+ postprocess(e) {
2059
+ return e;
2060
+ }
2061
+ /**
2062
+ * Process all tokens before walk tokens
2063
+ */
2064
+ processAllTokens(e) {
2065
+ return e;
2066
+ }
2067
+ /**
2068
+ * Provide function to tokenize markdown
2069
+ */
2070
+ provideLexer() {
2071
+ return this.block ? W.lex : W.lexInline;
2072
+ }
2073
+ /**
2074
+ * Provide function to parse tokens
2075
+ */
2076
+ provideParser() {
2077
+ return this.block ? G.parse : G.parseInline;
2078
+ }
2079
+ }
2080
+ E(Be, "passThroughHooks", /* @__PURE__ */ new Set([
2081
+ "preprocess",
2082
+ "postprocess",
2083
+ "processAllTokens"
2084
+ ]));
2085
+ class Ei {
2086
+ constructor(...e) {
2087
+ E(this, "defaults", en());
2088
+ E(this, "options", this.setOptions);
2089
+ E(this, "parse", this.parseMarkdown(!0));
2090
+ E(this, "parseInline", this.parseMarkdown(!1));
2091
+ E(this, "Parser", G);
2092
+ E(this, "Renderer", pt);
2093
+ E(this, "TextRenderer", ln);
2094
+ E(this, "Lexer", W);
2095
+ E(this, "Tokenizer", ut);
2096
+ E(this, "Hooks", Be);
2097
+ this.use(...e);
2098
+ }
2099
+ /**
2100
+ * Run callback for every token
2101
+ */
2102
+ walkTokens(e, n) {
2103
+ var r, i;
2104
+ let s = [];
2105
+ for (const o of e)
2106
+ switch (s = s.concat(n.call(this, o)), o.type) {
2107
+ case "table": {
2108
+ const a = o;
2109
+ for (const c of a.header)
2110
+ s = s.concat(this.walkTokens(c.tokens, n));
2111
+ for (const c of a.rows)
2112
+ for (const h of c)
2113
+ s = s.concat(this.walkTokens(h.tokens, n));
2114
+ break;
2115
+ }
2116
+ case "list": {
2117
+ const a = o;
2118
+ s = s.concat(this.walkTokens(a.items, n));
2119
+ break;
2120
+ }
2121
+ default: {
2122
+ const a = o;
2123
+ (i = (r = this.defaults.extensions) == null ? void 0 : r.childTokens) != null && i[a.type] ? this.defaults.extensions.childTokens[a.type].forEach((c) => {
2124
+ const h = a[c].flat(1 / 0);
2125
+ s = s.concat(this.walkTokens(h, n));
2126
+ }) : a.tokens && (s = s.concat(this.walkTokens(a.tokens, n)));
2127
+ }
2128
+ }
2129
+ return s;
2130
+ }
2131
+ use(...e) {
2132
+ const n = this.defaults.extensions || { renderers: {}, childTokens: {} };
2133
+ return e.forEach((s) => {
2134
+ const r = { ...s };
2135
+ if (r.async = this.defaults.async || r.async || !1, s.extensions && (s.extensions.forEach((i) => {
2136
+ if (!i.name)
2137
+ throw new Error("extension name required");
2138
+ if ("renderer" in i) {
2139
+ const o = n.renderers[i.name];
2140
+ o ? n.renderers[i.name] = function(...a) {
2141
+ let c = i.renderer.apply(this, a);
2142
+ return c === !1 && (c = o.apply(this, a)), c;
2143
+ } : n.renderers[i.name] = i.renderer;
2144
+ }
2145
+ if ("tokenizer" in i) {
2146
+ if (!i.level || i.level !== "block" && i.level !== "inline")
2147
+ throw new Error("extension level must be 'block' or 'inline'");
2148
+ const o = n[i.level];
2149
+ o ? o.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
+ }
2151
+ "childTokens" in i && i.childTokens && (n.childTokens[i.name] = i.childTokens);
2152
+ }), r.extensions = n), s.renderer) {
2153
+ const i = this.defaults.renderer || new pt(this.defaults);
2154
+ for (const o in s.renderer) {
2155
+ if (!(o in i))
2156
+ throw new Error(`renderer '${o}' does not exist`);
2157
+ if (["options", "parser"].includes(o))
2158
+ continue;
2159
+ const a = o, c = s.renderer[a], h = i[a];
2160
+ i[a] = (...p) => {
2161
+ let f = c.apply(i, p);
2162
+ return f === !1 && (f = h.apply(i, p)), f || "";
2163
+ };
2164
+ }
2165
+ r.renderer = i;
2166
+ }
2167
+ if (s.tokenizer) {
2168
+ const i = this.defaults.tokenizer || new ut(this.defaults);
2169
+ for (const o in s.tokenizer) {
2170
+ if (!(o in i))
2171
+ throw new Error(`tokenizer '${o}' does not exist`);
2172
+ if (["options", "rules", "lexer"].includes(o))
2173
+ continue;
2174
+ const a = o, c = s.tokenizer[a], h = i[a];
2175
+ i[a] = (...p) => {
2176
+ let f = c.apply(i, p);
2177
+ return f === !1 && (f = h.apply(i, p)), f;
2178
+ };
2179
+ }
2180
+ r.tokenizer = i;
2181
+ }
2182
+ if (s.hooks) {
2183
+ const i = this.defaults.hooks || new Be();
2184
+ for (const o in s.hooks) {
2185
+ if (!(o in i))
2186
+ throw new Error(`hook '${o}' does not exist`);
2187
+ if (["options", "block"].includes(o))
2188
+ continue;
2189
+ const a = o, c = s.hooks[a], h = i[a];
2190
+ Be.passThroughHooks.has(o) ? i[a] = (p) => {
2191
+ if (this.defaults.async)
2192
+ return Promise.resolve(c.call(i, p)).then((g) => h.call(i, g));
2193
+ const f = c.call(i, p);
2194
+ return h.call(i, f);
2195
+ } : i[a] = (...p) => {
2196
+ let f = c.apply(i, p);
2197
+ return f === !1 && (f = h.apply(i, p)), f;
2198
+ };
2199
+ }
2200
+ r.hooks = i;
2201
+ }
2202
+ if (s.walkTokens) {
2203
+ const i = this.defaults.walkTokens, o = s.walkTokens;
2204
+ r.walkTokens = function(a) {
2205
+ let c = [];
2206
+ return c.push(o.call(this, a)), i && (c = c.concat(i.call(this, a))), c;
2207
+ };
2208
+ }
2209
+ this.defaults = { ...this.defaults, ...r };
2210
+ }), this;
2211
+ }
2212
+ setOptions(e) {
2213
+ return this.defaults = { ...this.defaults, ...e }, this;
2214
+ }
2215
+ lexer(e, n) {
2216
+ return W.lex(e, n ?? this.defaults);
2217
+ }
2218
+ parser(e, n) {
2219
+ return G.parse(e, n ?? this.defaults);
2220
+ }
2221
+ parseMarkdown(e) {
2222
+ return (s, r) => {
2223
+ const i = { ...r }, o = { ...this.defaults, ...i }, a = this.onError(!!o.silent, !!o.async);
2224
+ if (this.defaults.async === !0 && i.async === !1)
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
+ if (typeof s > "u" || s === null)
2227
+ return a(new Error("marked(): input parameter is undefined or null"));
2228
+ if (typeof s != "string")
2229
+ return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(s) + ", string expected"));
2230
+ o.hooks && (o.hooks.options = o, o.hooks.block = e);
2231
+ const c = o.hooks ? o.hooks.provideLexer() : e ? W.lex : W.lexInline, h = o.hooks ? o.hooks.provideParser() : e ? G.parse : G.parseInline;
2232
+ if (o.async)
2233
+ return Promise.resolve(o.hooks ? o.hooks.preprocess(s) : s).then((p) => c(p, o)).then((p) => o.hooks ? o.hooks.processAllTokens(p) : p).then((p) => o.walkTokens ? Promise.all(this.walkTokens(p, o.walkTokens)).then(() => p) : p).then((p) => h(p, o)).then((p) => o.hooks ? o.hooks.postprocess(p) : p).catch(a);
2234
+ try {
2235
+ o.hooks && (s = o.hooks.preprocess(s));
2236
+ let p = c(s, o);
2237
+ o.hooks && (p = o.hooks.processAllTokens(p)), o.walkTokens && this.walkTokens(p, o.walkTokens);
2238
+ let f = h(p, o);
2239
+ return o.hooks && (f = o.hooks.postprocess(f)), f;
2240
+ } catch (p) {
2241
+ return a(p);
2242
+ }
2243
+ };
2244
+ }
2245
+ onError(e, n) {
2246
+ return (s) => {
2247
+ if (s.message += `
2248
+ Please report this to https://github.com/markedjs/marked.`, e) {
2249
+ const r = "<p>An error occurred:</p><pre>" + H(s.message + "", !0) + "</pre>";
2250
+ return n ? Promise.resolve(r) : r;
2251
+ }
2252
+ if (n)
2253
+ return Promise.reject(s);
2254
+ throw s;
2255
+ };
2256
+ }
2257
+ }
2258
+ const me = new Ei();
2259
+ function y(t, e) {
2260
+ return me.parse(t, e);
2261
+ }
2262
+ y.options = y.setOptions = function(t) {
2263
+ return me.setOptions(t), y.defaults = me.defaults, ys(y.defaults), y;
2264
+ };
2265
+ y.getDefaults = en;
2266
+ y.defaults = be;
2267
+ y.use = function(...t) {
2268
+ return me.use(...t), y.defaults = me.defaults, ys(y.defaults), y;
2269
+ };
2270
+ y.walkTokens = function(t, e) {
2271
+ return me.walkTokens(t, e);
2272
+ };
2273
+ y.parseInline = me.parseInline;
2274
+ y.Parser = G;
2275
+ y.parser = G.parse;
2276
+ y.Renderer = pt;
2277
+ y.TextRenderer = ln;
2278
+ y.Lexer = W;
2279
+ y.lexer = W.lex;
2280
+ y.Tokenizer = ut;
2281
+ y.Hooks = Be;
2282
+ y.parse = y;
2283
+ y.options;
2284
+ y.setOptions;
2285
+ y.use;
2286
+ y.walkTokens;
2287
+ y.parseInline;
2288
+ G.parse;
2289
+ W.lex;
2290
+ /*! @license DOMPurify 3.4.1 | (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.1/LICENSE */
2291
+ const {
2292
+ entries: Ns,
2293
+ setPrototypeOf: Hn,
2294
+ isFrozen: wi,
2295
+ getPrototypeOf: xi,
2296
+ getOwnPropertyDescriptor: Ai
2297
+ } = Object;
2298
+ let {
2299
+ freeze: z,
2300
+ seal: q,
2301
+ create: Ae
2302
+ } = Object, {
2303
+ apply: Yt,
2304
+ construct: Zt
2305
+ } = typeof Reflect < "u" && Reflect;
2306
+ z || (z = function(e) {
2307
+ return e;
2308
+ });
2309
+ q || (q = function(e) {
2310
+ return e;
2311
+ });
2312
+ Yt || (Yt = function(e, n) {
2313
+ for (var s = arguments.length, r = new Array(s > 2 ? s - 2 : 0), i = 2; i < s; i++)
2314
+ r[i - 2] = arguments[i];
2315
+ return e.apply(n, r);
2316
+ });
2317
+ Zt || (Zt = function(e) {
2318
+ for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
2319
+ s[r - 1] = arguments[r];
2320
+ return new e(...s);
2321
+ });
2322
+ const Pe = O(Array.prototype.forEach), Si = O(Array.prototype.lastIndexOf), Bn = O(Array.prototype.pop), ve = O(Array.prototype.push), Ri = O(Array.prototype.splice), v = Array.isArray, Ue = O(String.prototype.toLowerCase), zt = O(String.prototype.toString), Vn = O(String.prototype.match), Ee = O(String.prototype.replace), jn = O(String.prototype.indexOf), Oi = O(String.prototype.trim), Ii = O(Number.prototype.toString), Ni = O(Boolean.prototype.toString), Wn = typeof BigInt > "u" ? null : O(BigInt.prototype.toString), Gn = typeof Symbol > "u" ? null : O(Symbol.prototype.toString), x = O(Object.prototype.hasOwnProperty), ze = O(Object.prototype.toString), M = O(RegExp.prototype.test), st = Di(TypeError);
2323
+ function O(t) {
2324
+ return function(e) {
2325
+ e instanceof RegExp && (e.lastIndex = 0);
2326
+ for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
2327
+ s[r - 1] = arguments[r];
2328
+ return Yt(t, e, s);
2329
+ };
2330
+ }
2331
+ function Di(t) {
2332
+ return function() {
2333
+ for (var e = arguments.length, n = new Array(e), s = 0; s < e; s++)
2334
+ n[s] = arguments[s];
2335
+ return Zt(t, n);
2336
+ };
2337
+ }
2338
+ function k(t, e) {
2339
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ue;
2340
+ if (Hn && Hn(t, null), !v(e))
2341
+ return t;
2342
+ let s = e.length;
2343
+ for (; s--; ) {
2344
+ let r = e[s];
2345
+ if (typeof r == "string") {
2346
+ const i = n(r);
2347
+ i !== r && (wi(e) || (e[s] = i), r = i);
2348
+ }
2349
+ t[r] = !0;
2350
+ }
2351
+ return t;
2352
+ }
2353
+ function Ci(t) {
2354
+ for (let e = 0; e < t.length; e++)
2355
+ x(t, e) || (t[e] = null);
2356
+ return t;
2357
+ }
2358
+ function U(t) {
2359
+ const e = Ae(null);
2360
+ for (const [n, s] of Ns(t))
2361
+ x(t, n) && (v(s) ? e[n] = Ci(s) : s && typeof s == "object" && s.constructor === Object ? e[n] = U(s) : e[n] = s);
2362
+ return e;
2363
+ }
2364
+ function Li(t) {
2365
+ switch (typeof t) {
2366
+ case "string":
2367
+ return t;
2368
+ case "number":
2369
+ return Ii(t);
2370
+ case "boolean":
2371
+ return Ni(t);
2372
+ case "bigint":
2373
+ return Wn ? Wn(t) : "0";
2374
+ case "symbol":
2375
+ return Gn ? Gn(t) : "Symbol()";
2376
+ case "undefined":
2377
+ return ze(t);
2378
+ case "function":
2379
+ case "object": {
2380
+ if (t === null)
2381
+ return ze(t);
2382
+ const e = t, n = Se(e, "toString");
2383
+ if (typeof n == "function") {
2384
+ const s = n(e);
2385
+ return typeof s == "string" ? s : ze(s);
2386
+ }
2387
+ return ze(t);
2388
+ }
2389
+ default:
2390
+ return ze(t);
2391
+ }
2392
+ }
2393
+ function Se(t, e) {
2394
+ for (; t !== null; ) {
2395
+ const s = Ai(t, e);
2396
+ if (s) {
2397
+ if (s.get)
2398
+ return O(s.get);
2399
+ if (typeof s.value == "function")
2400
+ return O(s.value);
2401
+ }
2402
+ t = xi(t);
2403
+ }
2404
+ function n() {
2405
+ return null;
2406
+ }
2407
+ return n;
2408
+ }
2409
+ function Mi(t) {
2410
+ try {
2411
+ return M(t, ""), !0;
2412
+ } catch {
2413
+ return !1;
2414
+ }
2415
+ }
2416
+ const qn = z(["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"]), Ft = z(["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"]), Ut = z(["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"]), $i = z(["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"]), Ht = z(["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"]), Pi = z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Yn = z(["#text"]), Zn = z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "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"]), Bt = z(["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"]), Xn = z(["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"]), rt = z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), vi = q(/\{\{[\w\W]*|[\w\W]*\}\}/gm), zi = q(/<%[\w\W]*|[\w\W]*%>/gm), Fi = q(/\$\{[\w\W]*/gm), Ui = q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Hi = q(/^aria-[\-\w]+$/), Ds = q(
2417
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2418
+ // eslint-disable-line no-useless-escape
2419
+ ), Bi = q(/^(?:\w+script|data):/i), Vi = q(
2420
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2421
+ // eslint-disable-line no-control-regex
2422
+ ), Cs = q(/^html$/i), ji = q(/^[a-z][.\w]*(-[.\w]+)+$/i);
2423
+ var Kn = /* @__PURE__ */ Object.freeze({
2424
+ __proto__: null,
2425
+ ARIA_ATTR: Hi,
2426
+ ATTR_WHITESPACE: Vi,
2427
+ CUSTOM_ELEMENT: ji,
2428
+ DATA_ATTR: Ui,
2429
+ DOCTYPE_NAME: Cs,
2430
+ ERB_EXPR: zi,
2431
+ IS_ALLOWED_URI: Ds,
2432
+ IS_SCRIPT_OR_DATA: Bi,
2433
+ MUSTACHE_EXPR: vi,
2434
+ TMPLIT_EXPR: Fi
2435
+ });
2436
+ const Fe = {
2437
+ element: 1,
2438
+ text: 3,
2439
+ // Deprecated
2440
+ progressingInstruction: 7,
2441
+ comment: 8,
2442
+ document: 9
2443
+ }, Wi = function() {
2444
+ return typeof window > "u" ? null : window;
2445
+ }, Gi = function(e, n) {
2446
+ if (typeof e != "object" || typeof e.createPolicy != "function")
2447
+ return null;
2448
+ let s = null;
2449
+ const r = "data-tt-policy-suffix";
2450
+ n && n.hasAttribute(r) && (s = n.getAttribute(r));
2451
+ const i = "dompurify" + (s ? "#" + s : "");
2452
+ try {
2453
+ return e.createPolicy(i, {
2454
+ createHTML(o) {
2455
+ return o;
2456
+ },
2457
+ createScriptURL(o) {
2458
+ return o;
2459
+ }
2460
+ });
2461
+ } catch {
2462
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
2463
+ }
2464
+ }, Qn = function() {
2465
+ return {
2466
+ afterSanitizeAttributes: [],
2467
+ afterSanitizeElements: [],
2468
+ afterSanitizeShadowDOM: [],
2469
+ beforeSanitizeAttributes: [],
2470
+ beforeSanitizeElements: [],
2471
+ beforeSanitizeShadowDOM: [],
2472
+ uponSanitizeAttribute: [],
2473
+ uponSanitizeElement: [],
2474
+ uponSanitizeShadowNode: []
2475
+ };
2476
+ };
2477
+ function Ls() {
2478
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Wi();
2479
+ const e = (m) => Ls(m);
2480
+ if (e.version = "3.4.1", e.removed = [], !t || !t.document || t.document.nodeType !== Fe.document || !t.Element)
2481
+ return e.isSupported = !1, e;
2482
+ let {
2483
+ document: n
2484
+ } = t;
2485
+ const s = n, r = s.currentScript, {
2486
+ DocumentFragment: i,
2487
+ HTMLTemplateElement: o,
2488
+ Node: a,
2489
+ Element: c,
2490
+ NodeFilter: h,
2491
+ NamedNodeMap: p = t.NamedNodeMap || t.MozNamedAttrMap,
2492
+ HTMLFormElement: f,
2493
+ DOMParser: g,
2494
+ trustedTypes: b
2495
+ } = t, _ = c.prototype, S = Se(_, "cloneNode"), B = Se(_, "remove"), Ie = Se(_, "nextSibling"), Ge = Se(_, "childNodes"), oe = Se(_, "parentNode");
2496
+ if (typeof o == "function") {
2497
+ const m = n.createElement("template");
2498
+ m.content && m.content.ownerDocument && (n = m.content.ownerDocument);
2499
+ }
2500
+ let N, le = "";
2501
+ const {
2502
+ implementation: ae,
2503
+ createNodeIterator: ce,
2504
+ createDocumentFragment: Ms,
2505
+ getElementsByTagName: $s
2506
+ } = n, {
2507
+ importNode: Ps
2508
+ } = s;
2509
+ let P = Qn();
2510
+ e.isSupported = typeof Ns == "function" && typeof oe == "function" && ae && ae.createHTMLDocument !== void 0;
2511
+ const {
2512
+ MUSTACHE_EXPR: qe,
2513
+ ERB_EXPR: Ye,
2514
+ TMPLIT_EXPR: Ze,
2515
+ DATA_ATTR: vs,
2516
+ ARIA_ATTR: zs,
2517
+ IS_SCRIPT_OR_DATA: Fs,
2518
+ ATTR_WHITESPACE: cn,
2519
+ CUSTOM_ELEMENT: Us
2520
+ } = Kn;
2521
+ let {
2522
+ IS_ALLOWED_URI: un
2523
+ } = Kn, D = null;
2524
+ const fn = k({}, [...qn, ...Ft, ...Ut, ...Ht, ...Yn]);
2525
+ let L = null;
2526
+ const pn = k({}, [...Zn, ...Bt, ...Xn, ...rt]);
2527
+ let A = Object.seal(Ae(null, {
2528
+ tagNameCheck: {
2529
+ writable: !0,
2530
+ configurable: !1,
2531
+ enumerable: !0,
2532
+ value: null
2533
+ },
2534
+ attributeNameCheck: {
2535
+ writable: !0,
2536
+ configurable: !1,
2537
+ enumerable: !0,
2538
+ value: null
2539
+ },
2540
+ allowCustomizedBuiltInElements: {
2541
+ writable: !0,
2542
+ configurable: !1,
2543
+ enumerable: !0,
2544
+ value: !1
2545
+ }
2546
+ })), Ne = null, Xe = null;
2547
+ const te = Object.seal(Ae(null, {
2548
+ tagCheck: {
2549
+ writable: !0,
2550
+ configurable: !1,
2551
+ enumerable: !0,
2552
+ value: null
2553
+ },
2554
+ attributeCheck: {
2555
+ writable: !0,
2556
+ configurable: !1,
2557
+ enumerable: !0,
2558
+ value: null
2559
+ }
2560
+ }));
2561
+ let hn = !0, yt = !0, dn = !1, gn = !0, ue = !1, De = !0, fe = !1, Tt = !1, Et = !1, _e = !1, Ke = !1, Qe = !1, mn = !0, bn = !1;
2562
+ const _n = "user-content-";
2563
+ let wt = !0, Ce = !1, ke = {}, X = null;
2564
+ const xt = k({}, ["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"]);
2565
+ let kn = null;
2566
+ const yn = k({}, ["audio", "video", "img", "source", "image", "track"]);
2567
+ let At = null;
2568
+ const Tn = k({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Je = "http://www.w3.org/1998/Math/MathML", et = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml";
2569
+ let ye = K, St = !1, Rt = null;
2570
+ const Hs = k({}, [Je, et, K], zt);
2571
+ let Ot = k({}, ["mi", "mo", "mn", "ms", "mtext"]), It = k({}, ["annotation-xml"]);
2572
+ const Bs = k({}, ["title", "style", "font", "a", "script"]);
2573
+ let Le = null;
2574
+ const Vs = ["application/xhtml+xml", "text/html"], js = "text/html";
2575
+ let I = null, Te = null;
2576
+ const Ws = n.createElement("form"), En = function(l) {
2577
+ return l instanceof RegExp || l instanceof Function;
2578
+ }, Nt = function() {
2579
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2580
+ if (Te && Te === l)
2581
+ return;
2582
+ (!l || typeof l != "object") && (l = {}), l = U(l), Le = // eslint-disable-next-line unicorn/prefer-includes
2583
+ Vs.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? js : l.PARSER_MEDIA_TYPE, I = Le === "application/xhtml+xml" ? zt : Ue, D = x(l, "ALLOWED_TAGS") && v(l.ALLOWED_TAGS) ? k({}, l.ALLOWED_TAGS, I) : fn, L = x(l, "ALLOWED_ATTR") && v(l.ALLOWED_ATTR) ? k({}, l.ALLOWED_ATTR, I) : pn, Rt = x(l, "ALLOWED_NAMESPACES") && v(l.ALLOWED_NAMESPACES) ? k({}, l.ALLOWED_NAMESPACES, zt) : Hs, At = x(l, "ADD_URI_SAFE_ATTR") && v(l.ADD_URI_SAFE_ATTR) ? k(U(Tn), l.ADD_URI_SAFE_ATTR, I) : Tn, kn = x(l, "ADD_DATA_URI_TAGS") && v(l.ADD_DATA_URI_TAGS) ? k(U(yn), l.ADD_DATA_URI_TAGS, I) : yn, X = x(l, "FORBID_CONTENTS") && v(l.FORBID_CONTENTS) ? k({}, l.FORBID_CONTENTS, I) : xt, Ne = x(l, "FORBID_TAGS") && v(l.FORBID_TAGS) ? k({}, l.FORBID_TAGS, I) : U({}), Xe = x(l, "FORBID_ATTR") && v(l.FORBID_ATTR) ? k({}, l.FORBID_ATTR, I) : U({}), ke = x(l, "USE_PROFILES") ? l.USE_PROFILES && typeof l.USE_PROFILES == "object" ? U(l.USE_PROFILES) : l.USE_PROFILES : !1, hn = l.ALLOW_ARIA_ATTR !== !1, yt = l.ALLOW_DATA_ATTR !== !1, dn = l.ALLOW_UNKNOWN_PROTOCOLS || !1, gn = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ue = l.SAFE_FOR_TEMPLATES || !1, De = l.SAFE_FOR_XML !== !1, fe = l.WHOLE_DOCUMENT || !1, _e = l.RETURN_DOM || !1, Ke = l.RETURN_DOM_FRAGMENT || !1, Qe = l.RETURN_TRUSTED_TYPE || !1, Et = l.FORCE_BODY || !1, mn = l.SANITIZE_DOM !== !1, bn = l.SANITIZE_NAMED_PROPS || !1, wt = l.KEEP_CONTENT !== !1, Ce = l.IN_PLACE || !1, un = Mi(l.ALLOWED_URI_REGEXP) ? l.ALLOWED_URI_REGEXP : Ds, ye = typeof l.NAMESPACE == "string" ? l.NAMESPACE : K, Ot = x(l, "MATHML_TEXT_INTEGRATION_POINTS") && l.MATHML_TEXT_INTEGRATION_POINTS && typeof l.MATHML_TEXT_INTEGRATION_POINTS == "object" ? U(l.MATHML_TEXT_INTEGRATION_POINTS) : k({}, ["mi", "mo", "mn", "ms", "mtext"]), It = x(l, "HTML_INTEGRATION_POINTS") && l.HTML_INTEGRATION_POINTS && typeof l.HTML_INTEGRATION_POINTS == "object" ? U(l.HTML_INTEGRATION_POINTS) : k({}, ["annotation-xml"]);
2584
+ const u = x(l, "CUSTOM_ELEMENT_HANDLING") && l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING == "object" ? U(l.CUSTOM_ELEMENT_HANDLING) : Ae(null);
2585
+ if (A = Ae(null), x(u, "tagNameCheck") && En(u.tagNameCheck) && (A.tagNameCheck = u.tagNameCheck), x(u, "attributeNameCheck") && En(u.attributeNameCheck) && (A.attributeNameCheck = u.attributeNameCheck), x(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (A.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), ue && (yt = !1), Ke && (_e = !0), ke && (D = k({}, Yn), L = Ae(null), ke.html === !0 && (k(D, qn), k(L, Zn)), ke.svg === !0 && (k(D, Ft), k(L, Bt), k(L, rt)), ke.svgFilters === !0 && (k(D, Ut), k(L, Bt), k(L, rt)), ke.mathMl === !0 && (k(D, Ht), k(L, Xn), k(L, rt))), te.tagCheck = null, te.attributeCheck = null, x(l, "ADD_TAGS") && (typeof l.ADD_TAGS == "function" ? te.tagCheck = l.ADD_TAGS : v(l.ADD_TAGS) && (D === fn && (D = U(D)), k(D, l.ADD_TAGS, I))), x(l, "ADD_ATTR") && (typeof l.ADD_ATTR == "function" ? te.attributeCheck = l.ADD_ATTR : v(l.ADD_ATTR) && (L === pn && (L = U(L)), k(L, l.ADD_ATTR, I))), x(l, "ADD_URI_SAFE_ATTR") && v(l.ADD_URI_SAFE_ATTR) && k(At, l.ADD_URI_SAFE_ATTR, I), x(l, "FORBID_CONTENTS") && v(l.FORBID_CONTENTS) && (X === xt && (X = U(X)), k(X, l.FORBID_CONTENTS, I)), x(l, "ADD_FORBID_CONTENTS") && v(l.ADD_FORBID_CONTENTS) && (X === xt && (X = U(X)), k(X, l.ADD_FORBID_CONTENTS, I)), wt && (D["#text"] = !0), fe && k(D, ["html", "head", "body"]), D.table && (k(D, ["tbody"]), delete Ne.tbody), l.TRUSTED_TYPES_POLICY) {
2586
+ if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
2587
+ throw st('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2588
+ if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
2589
+ throw st('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2590
+ N = l.TRUSTED_TYPES_POLICY, le = N.createHTML("");
2591
+ } else
2592
+ N === void 0 && (N = Gi(b, r)), N !== null && typeof le == "string" && (le = N.createHTML(""));
2593
+ z && z(l), Te = l;
2594
+ }, wn = k({}, [...Ft, ...Ut, ...$i]), xn = k({}, [...Ht, ...Pi]), Gs = function(l) {
2595
+ let u = oe(l);
2596
+ (!u || !u.tagName) && (u = {
2597
+ namespaceURI: ye,
2598
+ tagName: "template"
2599
+ });
2600
+ const d = Ue(l.tagName), w = Ue(u.tagName);
2601
+ return Rt[l.namespaceURI] ? l.namespaceURI === et ? u.namespaceURI === K ? d === "svg" : u.namespaceURI === Je ? d === "svg" && (w === "annotation-xml" || Ot[w]) : !!wn[d] : l.namespaceURI === Je ? u.namespaceURI === K ? d === "math" : u.namespaceURI === et ? d === "math" && It[w] : !!xn[d] : l.namespaceURI === K ? u.namespaceURI === et && !It[w] || u.namespaceURI === Je && !Ot[w] ? !1 : !xn[d] && (Bs[d] || !wn[d]) : !!(Le === "application/xhtml+xml" && Rt[l.namespaceURI]) : !1;
2602
+ }, Y = function(l) {
2603
+ ve(e.removed, {
2604
+ element: l
2605
+ });
2606
+ try {
2607
+ oe(l).removeChild(l);
2608
+ } catch {
2609
+ B(l);
2610
+ }
2611
+ }, pe = function(l, u) {
2612
+ try {
2613
+ ve(e.removed, {
2614
+ attribute: u.getAttributeNode(l),
2615
+ from: u
2616
+ });
2617
+ } catch {
2618
+ ve(e.removed, {
2619
+ attribute: null,
2620
+ from: u
2621
+ });
2622
+ }
2623
+ if (u.removeAttribute(l), l === "is")
2624
+ if (_e || Ke)
2625
+ try {
2626
+ Y(u);
2627
+ } catch {
2628
+ }
2629
+ else
2630
+ try {
2631
+ u.setAttribute(l, "");
2632
+ } catch {
2633
+ }
2634
+ }, An = function(l) {
2635
+ let u = null, d = null;
2636
+ if (Et)
2637
+ l = "<remove></remove>" + l;
2638
+ else {
2639
+ const R = Vn(l, /^[\r\n\t ]+/);
2640
+ d = R && R[0];
2641
+ }
2642
+ Le === "application/xhtml+xml" && ye === K && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
2643
+ const w = N ? N.createHTML(l) : l;
2644
+ if (ye === K)
2645
+ try {
2646
+ u = new g().parseFromString(w, Le);
2647
+ } catch {
2648
+ }
2649
+ if (!u || !u.documentElement) {
2650
+ u = ae.createDocument(ye, "template", null);
2651
+ try {
2652
+ u.documentElement.innerHTML = St ? le : w;
2653
+ } catch {
2654
+ }
2655
+ }
2656
+ const $ = u.body || u.documentElement;
2657
+ return l && d && $.insertBefore(n.createTextNode(d), $.childNodes[0] || null), ye === K ? $s.call(u, fe ? "html" : "body")[0] : fe ? u.documentElement : $;
2658
+ }, Sn = function(l) {
2659
+ return ce.call(
2660
+ l.ownerDocument || l,
2661
+ l,
2662
+ // eslint-disable-next-line no-bitwise
2663
+ h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT | h.SHOW_PROCESSING_INSTRUCTION | h.SHOW_CDATA_SECTION,
2664
+ null
2665
+ );
2666
+ }, Dt = function(l) {
2667
+ return l instanceof f && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof p) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
2668
+ }, Ct = function(l) {
2669
+ return typeof a == "function" && l instanceof a;
2670
+ };
2671
+ function J(m, l, u) {
2672
+ Pe(m, (d) => {
2673
+ d.call(e, l, u, Te);
2674
+ });
2675
+ }
2676
+ const Rn = function(l) {
2677
+ let u = null;
2678
+ if (J(P.beforeSanitizeElements, l, null), Dt(l))
2679
+ return Y(l), !0;
2680
+ const d = I(l.nodeName);
2681
+ if (J(P.uponSanitizeElement, l, {
2682
+ tagName: d,
2683
+ allowedTags: D
2684
+ }), De && l.hasChildNodes() && !Ct(l.firstElementChild) && M(/<[/\w!]/g, l.innerHTML) && M(/<[/\w!]/g, l.textContent) || De && l.namespaceURI === K && d === "style" && Ct(l.firstElementChild) || l.nodeType === Fe.progressingInstruction || De && l.nodeType === Fe.comment && M(/<[/\w]/g, l.data))
2685
+ return Y(l), !0;
2686
+ if (Ne[d] || !(te.tagCheck instanceof Function && te.tagCheck(d)) && !D[d]) {
2687
+ if (!Ne[d] && In(d) && (A.tagNameCheck instanceof RegExp && M(A.tagNameCheck, d) || A.tagNameCheck instanceof Function && A.tagNameCheck(d)))
2688
+ return !1;
2689
+ if (wt && !X[d]) {
2690
+ const w = oe(l) || l.parentNode, $ = Ge(l) || l.childNodes;
2691
+ if ($ && w) {
2692
+ const R = $.length;
2693
+ for (let F = R - 1; F >= 0; --F) {
2694
+ const V = S($[F], !0);
2695
+ w.insertBefore(V, Ie(l));
2696
+ }
2697
+ }
2698
+ }
2699
+ return Y(l), !0;
2700
+ }
2701
+ return l instanceof c && !Gs(l) || (d === "noscript" || d === "noembed" || d === "noframes") && M(/<\/no(script|embed|frames)/i, l.innerHTML) ? (Y(l), !0) : (ue && l.nodeType === Fe.text && (u = l.textContent, Pe([qe, Ye, Ze], (w) => {
2702
+ u = Ee(u, w, " ");
2703
+ }), l.textContent !== u && (ve(e.removed, {
2704
+ element: l.cloneNode()
2705
+ }), l.textContent = u)), J(P.afterSanitizeElements, l, null), !1);
2706
+ }, On = function(l, u, d) {
2707
+ if (Xe[u] || mn && (u === "id" || u === "name") && (d in n || d in Ws))
2708
+ return !1;
2709
+ if (!(yt && !Xe[u] && M(vs, u))) {
2710
+ if (!(hn && M(zs, u))) {
2711
+ if (!(te.attributeCheck instanceof Function && te.attributeCheck(u, l))) {
2712
+ if (!L[u] || Xe[u]) {
2713
+ if (
2714
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
2715
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2716
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
2717
+ !(In(l) && (A.tagNameCheck instanceof RegExp && M(A.tagNameCheck, l) || A.tagNameCheck instanceof Function && A.tagNameCheck(l)) && (A.attributeNameCheck instanceof RegExp && M(A.attributeNameCheck, u) || A.attributeNameCheck instanceof Function && A.attributeNameCheck(u, l)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2718
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2719
+ u === "is" && A.allowCustomizedBuiltInElements && (A.tagNameCheck instanceof RegExp && M(A.tagNameCheck, d) || A.tagNameCheck instanceof Function && A.tagNameCheck(d)))
2720
+ ) return !1;
2721
+ } else if (!At[u]) {
2722
+ if (!M(un, Ee(d, cn, ""))) {
2723
+ if (!((u === "src" || u === "xlink:href" || u === "href") && l !== "script" && jn(d, "data:") === 0 && kn[l])) {
2724
+ if (!(dn && !M(Fs, Ee(d, cn, "")))) {
2725
+ if (d)
2726
+ return !1;
2727
+ }
2728
+ }
2729
+ }
2730
+ }
2731
+ }
2732
+ }
2733
+ }
2734
+ return !0;
2735
+ }, qs = k({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), In = function(l) {
2736
+ return !qs[Ue(l)] && M(Us, l);
2737
+ }, Nn = function(l) {
2738
+ J(P.beforeSanitizeAttributes, l, null);
2739
+ const {
2740
+ attributes: u
2741
+ } = l;
2742
+ if (!u || Dt(l))
2743
+ return;
2744
+ const d = {
2745
+ attrName: "",
2746
+ attrValue: "",
2747
+ keepAttr: !0,
2748
+ allowedAttributes: L,
2749
+ forceKeepAttr: void 0
2750
+ };
2751
+ let w = u.length;
2752
+ for (; w--; ) {
2753
+ const $ = u[w], {
2754
+ name: R,
2755
+ namespaceURI: F,
2756
+ value: V
2757
+ } = $, Z = I(R), Lt = V;
2758
+ let C = R === "value" ? Lt : Oi(Lt);
2759
+ if (d.attrName = Z, d.attrValue = C, d.keepAttr = !0, d.forceKeepAttr = void 0, J(P.uponSanitizeAttribute, l, d), C = d.attrValue, bn && (Z === "id" || Z === "name") && jn(C, _n) !== 0 && (pe(R, l), C = _n + C), De && M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, C)) {
2760
+ pe(R, l);
2761
+ continue;
2762
+ }
2763
+ if (Z === "attributename" && Vn(C, "href")) {
2764
+ pe(R, l);
2765
+ continue;
2766
+ }
2767
+ if (d.forceKeepAttr)
2768
+ continue;
2769
+ if (!d.keepAttr) {
2770
+ pe(R, l);
2771
+ continue;
2772
+ }
2773
+ if (!gn && M(/\/>/i, C)) {
2774
+ pe(R, l);
2775
+ continue;
2776
+ }
2777
+ ue && Pe([qe, Ye, Ze], (Ln) => {
2778
+ C = Ee(C, Ln, " ");
2779
+ });
2780
+ const Cn = I(l.nodeName);
2781
+ if (!On(Cn, Z, C)) {
2782
+ pe(R, l);
2783
+ continue;
2784
+ }
2785
+ if (N && typeof b == "object" && typeof b.getAttributeType == "function" && !F)
2786
+ switch (b.getAttributeType(Cn, Z)) {
2787
+ case "TrustedHTML": {
2788
+ C = N.createHTML(C);
2789
+ break;
2790
+ }
2791
+ case "TrustedScriptURL": {
2792
+ C = N.createScriptURL(C);
2793
+ break;
2794
+ }
2795
+ }
2796
+ if (C !== Lt)
2797
+ try {
2798
+ F ? l.setAttributeNS(F, R, C) : l.setAttribute(R, C), Dt(l) ? Y(l) : Bn(e.removed);
2799
+ } catch {
2800
+ pe(R, l);
2801
+ }
2802
+ }
2803
+ J(P.afterSanitizeAttributes, l, null);
2804
+ }, Dn = function(l) {
2805
+ let u = null;
2806
+ const d = Sn(l);
2807
+ for (J(P.beforeSanitizeShadowDOM, l, null); u = d.nextNode(); )
2808
+ J(P.uponSanitizeShadowNode, u, null), Rn(u), Nn(u), u.content instanceof i && Dn(u.content);
2809
+ J(P.afterSanitizeShadowDOM, l, null);
2810
+ };
2811
+ return e.sanitize = function(m) {
2812
+ let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, d = null, w = null, $ = null;
2813
+ if (St = !m, St && (m = "<!-->"), typeof m != "string" && !Ct(m) && (m = Li(m), typeof m != "string"))
2814
+ throw st("dirty is not a string, aborting");
2815
+ if (!e.isSupported)
2816
+ return m;
2817
+ if (Tt || Nt(l), e.removed = [], typeof m == "string" && (Ce = !1), Ce) {
2818
+ const V = m.nodeName;
2819
+ if (typeof V == "string") {
2820
+ const Z = I(V);
2821
+ if (!D[Z] || Ne[Z])
2822
+ throw st("root node is forbidden and cannot be sanitized in-place");
2823
+ }
2824
+ } else if (m instanceof a)
2825
+ u = An("<!---->"), d = u.ownerDocument.importNode(m, !0), d.nodeType === Fe.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? u = d : u.appendChild(d);
2826
+ else {
2827
+ if (!_e && !ue && !fe && // eslint-disable-next-line unicorn/prefer-includes
2828
+ m.indexOf("<") === -1)
2829
+ return N && Qe ? N.createHTML(m) : m;
2830
+ if (u = An(m), !u)
2831
+ return _e ? null : Qe ? le : "";
2832
+ }
2833
+ u && Et && Y(u.firstChild);
2834
+ const R = Sn(Ce ? m : u);
2835
+ for (; w = R.nextNode(); )
2836
+ Rn(w), Nn(w), w.content instanceof i && Dn(w.content);
2837
+ if (Ce)
2838
+ return m;
2839
+ if (_e) {
2840
+ if (ue) {
2841
+ u.normalize();
2842
+ let V = u.innerHTML;
2843
+ Pe([qe, Ye, Ze], (Z) => {
2844
+ V = Ee(V, Z, " ");
2845
+ }), u.innerHTML = V;
2846
+ }
2847
+ if (Ke)
2848
+ for ($ = Ms.call(u.ownerDocument); u.firstChild; )
2849
+ $.appendChild(u.firstChild);
2850
+ else
2851
+ $ = u;
2852
+ return (L.shadowroot || L.shadowrootmode) && ($ = Ps.call(s, $, !0)), $;
2853
+ }
2854
+ let F = fe ? u.outerHTML : u.innerHTML;
2855
+ return fe && D["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && M(Cs, u.ownerDocument.doctype.name) && (F = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
2856
+ ` + F), ue && Pe([qe, Ye, Ze], (V) => {
2857
+ F = Ee(F, V, " ");
2858
+ }), N && Qe ? N.createHTML(F) : F;
2859
+ }, e.setConfig = function() {
2860
+ let m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2861
+ Nt(m), Tt = !0;
2862
+ }, e.clearConfig = function() {
2863
+ Te = null, Tt = !1;
2864
+ }, e.isValidAttribute = function(m, l, u) {
2865
+ Te || Nt({});
2866
+ const d = I(m), w = I(l);
2867
+ return On(d, w, u);
2868
+ }, e.addHook = function(m, l) {
2869
+ typeof l == "function" && ve(P[m], l);
2870
+ }, e.removeHook = function(m, l) {
2871
+ if (l !== void 0) {
2872
+ const u = Si(P[m], l);
2873
+ return u === -1 ? void 0 : Ri(P[m], u, 1)[0];
2874
+ }
2875
+ return Bn(P[m]);
2876
+ }, e.removeHooks = function(m) {
2877
+ P[m] = [];
2878
+ }, e.removeAllHooks = function() {
2879
+ P = Qn();
2880
+ }, e;
2881
+ }
2882
+ Ls();
2883
+ function qi(t, e = "") {
2884
+ const n = {}, s = t;
2885
+ return Array.isArray(s.fields) ? Object.assign(n, bt(s, e)) : t.type === "array" && t.elements ? Object.assign(n, _t(t, e)) : t.type === "map" && t.values && Object.assign(n, kt(t, e)), n;
2886
+ }
2887
+ function bt(t, e = "") {
2888
+ const n = {};
2889
+ if (Array.isArray(t.fields))
2890
+ for (const s of t.fields) {
2891
+ const r = Object.keys(s)[0], i = s[r], o = e ? re(e, r) : r;
2892
+ if (n[o] = i, i.type === "record" && Array.isArray(i.fields)) {
2893
+ const a = bt(i, o);
2894
+ Object.assign(n, a);
2895
+ } else if (i.type === "array" && i.elements) {
2896
+ const a = _t(i, o);
2897
+ Object.assign(n, a);
2898
+ } else if (i.type === "map" && i.values) {
2899
+ const a = kt(i, o);
2900
+ Object.assign(n, a);
2901
+ }
2902
+ }
2903
+ return n;
2904
+ }
2905
+ function _t(t, e = "") {
2906
+ const n = {};
2907
+ if (t.elements) {
2908
+ const s = t.elements, r = re(e, bs);
2909
+ if (n[r] = s, s.type === "record" && Array.isArray(s.fields)) {
2910
+ const i = bt(s, r);
2911
+ Object.assign(n, i);
2912
+ } else if (s.type === "array" && s.elements) {
2913
+ const i = _t(s, r);
2914
+ Object.assign(n, i);
2915
+ } else if (s.type === "map" && s.values) {
2916
+ const i = kt(s, r);
2917
+ Object.assign(n, i);
2918
+ }
2919
+ }
2920
+ return n;
2921
+ }
2922
+ function kt(t, e = "") {
2923
+ const n = {}, s = re(e, _s);
2924
+ if (n[s] = t.values, t.values.type === "record" && Array.isArray(t.values.fields)) {
2925
+ const r = bt(t.values, s);
2926
+ Object.assign(n, r);
2927
+ } else if ((t.values.type === "array" || t.values.type === "set") && t.values.elements) {
2928
+ const r = _t(t.values, s);
2929
+ Object.assign(n, r);
2930
+ } else if (t.values.type === "map" && t.values.values) {
2931
+ const r = kt(t.values, s);
2932
+ Object.assign(n, r);
2933
+ }
2934
+ return n;
2935
+ }
2936
+ function an(t, e) {
2937
+ const n = Hr(t), s = [];
2938
+ for (let r = 0; r < n.length; r++) {
2939
+ const i = n[r], o = s.length > 0 ? re(...s) : "", a = o ? e[o] : void 0;
2940
+ (a == null ? void 0 : a.type) === "map" ? s.push(_s) : (a == null ? void 0 : a.type) === "array" ? s.push(bs) : s.push(i);
2941
+ }
2942
+ return re(...s);
2943
+ }
2944
+ function Yi(t) {
2945
+ if (Vr(t)) return "enum";
2946
+ switch (t.type) {
2947
+ case "string":
2948
+ return "string";
2949
+ case "number":
2950
+ case "integer":
2951
+ return "number";
2952
+ case "boolean":
2953
+ return "boolean";
2954
+ case "set":
2955
+ return Br(t) ? "tag" : "enum";
2956
+ case "array":
2957
+ return "array";
2958
+ case "record":
2959
+ return "record";
2960
+ case "map":
2961
+ return "map";
2962
+ case "json":
2963
+ return "json";
2964
+ case "foreign":
2965
+ return "foreign";
2966
+ default:
2967
+ throw new Error(`Unknown field type: ${t.type}`);
2968
+ }
2969
+ }
2970
+ function* Ji(t, e, n, s = "") {
2971
+ for (const r of t) {
2972
+ const i = Object.keys(r)[0], o = s ? re(s, i) : i, a = Xs(e, i);
2973
+ if (a === void 0) continue;
2974
+ const c = an(o, n.schemaMap), h = n.schemaMap[c];
2975
+ if (!h)
2976
+ throw new Error(`Field schema for "${o}" not found in schema map`);
2977
+ yield {
2978
+ handlerType: Yi(h),
2979
+ fieldKey: o,
2980
+ fieldSchema: h,
2981
+ value: a
2982
+ };
2983
+ }
2984
+ }
2985
+ function eo(t, e, n) {
2986
+ const s = re(t, String(e)), r = an(s, n.schemaMap), i = n.schemaMap[r];
2987
+ if (!i)
2988
+ throw new Error(`Item schema for "${s}" not found in schema map`);
2989
+ return { itemKey: s, itemSchema: i };
2990
+ }
2991
+ function to(t, e, n) {
2992
+ const s = re(t, e), r = an(s, n.schemaMap), i = n.schemaMap[r];
2993
+ if (!i)
2994
+ throw new Error(`Map entry schema for "${s}" not found in schema map`);
2995
+ return { entryKey: s, entrySchema: i };
2996
+ }
2997
+ function no(t) {
2998
+ return t.type === "record" && Array.isArray(t.fields);
2999
+ }
3000
+ function so(t) {
3001
+ return {
3002
+ schemaMap: qi(t)
3003
+ };
3004
+ }
3005
+ export {
3006
+ eo as a,
3007
+ no as b,
3008
+ so as c,
3009
+ to as d,
3010
+ Yi as g,
3011
+ Qi as i,
3012
+ Ki as s,
3013
+ Ji as w
3014
+ };