@jojovms/scripto 0.0.6 → 0.0.7

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.
@@ -1,827 +1,203 @@
1
- var Jn = Object.defineProperty;
2
- var bn = (l) => {
1
+ var Vn = Object.defineProperty;
2
+ var Jt = (l) => {
3
3
  throw TypeError(l);
4
4
  };
5
- var er = (l, e, t) => e in l ? Jn(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
6
- var j = (l, e, t) => er(l, typeof e != "symbol" ? e + "" : e, t), tr = (l, e, t) => e.has(l) || bn("Cannot " + t);
7
- var xn = (l, e, t) => e.has(l) ? bn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(l) : e.set(l, t);
8
- var Dt = (l, e, t) => (tr(l, e, "access private method"), t);
9
- import me, { useRef as nr, useState as ye, useEffect as Ye } from "react";
10
- var nn = { exports: {} }, lt = {};
11
- /**
12
- * @license React
13
- * react-jsx-runtime.production.min.js
14
- *
15
- * Copyright (c) Facebook, Inc. and its affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- */
20
- var Tn;
21
- function rr() {
22
- if (Tn) return lt;
23
- Tn = 1;
24
- var l = me, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, r = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
25
- function s(c, u, x) {
26
- var h, w = {}, g = null, E = null;
27
- x !== void 0 && (g = "" + x), u.key !== void 0 && (g = "" + u.key), u.ref !== void 0 && (E = u.ref);
28
- for (h in u) n.call(u, h) && !a.hasOwnProperty(h) && (w[h] = u[h]);
29
- if (c && c.defaultProps) for (h in u = c.defaultProps, u) w[h] === void 0 && (w[h] = u[h]);
30
- return { $$typeof: e, type: c, key: g, ref: E, props: w, _owner: r.current };
31
- }
32
- return lt.Fragment = t, lt.jsx = s, lt.jsxs = s, lt;
33
- }
34
- var ct = {};
35
- /**
36
- * @license React
37
- * react-jsx-runtime.development.js
38
- *
39
- * Copyright (c) Facebook, Inc. and its affiliates.
40
- *
41
- * This source code is licensed under the MIT license found in the
42
- * LICENSE file in the root directory of this source tree.
43
- */
44
- var wn;
45
- function ir() {
46
- return wn || (wn = 1, process.env.NODE_ENV !== "production" && function() {
47
- var l = me, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), T = Symbol.iterator, m = "@@iterator";
48
- function O(o) {
49
- if (o === null || typeof o != "object")
50
- return null;
51
- var p = T && o[T] || o[m];
52
- return typeof p == "function" ? p : null;
53
- }
54
- var M = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
55
- function N(o) {
56
- {
57
- for (var p = arguments.length, k = new Array(p > 1 ? p - 1 : 0), _ = 1; _ < p; _++)
58
- k[_ - 1] = arguments[_];
59
- K("error", o, k);
60
- }
61
- }
62
- function K(o, p, k) {
63
- {
64
- var _ = M.ReactDebugCurrentFrame, S = _.getStackAddendum();
65
- S !== "" && (p += "%s", k = k.concat([S]));
66
- var I = k.map(function(A) {
67
- return String(A);
68
- });
69
- I.unshift("Warning: " + p), Function.prototype.apply.call(console[o], console, I);
70
- }
71
- }
72
- var H = !1, oe = !1, Ve = !1, Bt = !1, Wt = !1, Tt;
73
- Tt = Symbol.for("react.module.reference");
74
- function Gt(o) {
75
- return !!(typeof o == "string" || typeof o == "function" || o === n || o === a || Wt || o === r || o === x || o === h || Bt || o === E || H || oe || Ve || typeof o == "object" && o !== null && (o.$$typeof === g || o.$$typeof === w || o.$$typeof === s || o.$$typeof === c || o.$$typeof === u || // This needs to include all possible module reference object
76
- // types supported by any Flight configuration anywhere since
77
- // we don't know which Flight build this will end up being used
78
- // with.
79
- o.$$typeof === Tt || o.getModuleId !== void 0));
80
- }
81
- function W(o, p, k) {
82
- var _ = o.displayName;
83
- if (_)
84
- return _;
85
- var S = p.displayName || p.name || "";
86
- return S !== "" ? k + "(" + S + ")" : k;
87
- }
88
- function je(o) {
89
- return o.displayName || "Context";
90
- }
91
- function ee(o) {
92
- if (o == null)
93
- return null;
94
- if (typeof o.tag == "number" && N("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
95
- return o.displayName || o.name || null;
96
- if (typeof o == "string")
97
- return o;
98
- switch (o) {
99
- case n:
100
- return "Fragment";
101
- case t:
102
- return "Portal";
103
- case a:
104
- return "Profiler";
105
- case r:
106
- return "StrictMode";
107
- case x:
108
- return "Suspense";
109
- case h:
110
- return "SuspenseList";
111
- }
112
- if (typeof o == "object")
113
- switch (o.$$typeof) {
114
- case c:
115
- var p = o;
116
- return je(p) + ".Consumer";
117
- case s:
118
- var k = o;
119
- return je(k._context) + ".Provider";
120
- case u:
121
- return W(o, o.render, "ForwardRef");
122
- case w:
123
- var _ = o.displayName || null;
124
- return _ !== null ? _ : ee(o.type) || "Memo";
125
- case g: {
126
- var S = o, I = S._payload, A = S._init;
127
- try {
128
- return ee(A(I));
129
- } catch {
130
- return null;
131
- }
132
- }
133
- }
134
- return null;
135
- }
136
- var se = Object.assign, Le = 0, wt, _t, qe, yt, Ze, F, Xe;
137
- function B() {
138
- }
139
- B.__reactDisabledLog = !0;
140
- function Et() {
141
- {
142
- if (Le === 0) {
143
- wt = console.log, _t = console.info, qe = console.warn, yt = console.error, Ze = console.group, F = console.groupCollapsed, Xe = console.groupEnd;
144
- var o = {
145
- configurable: !0,
146
- enumerable: !0,
147
- value: B,
148
- writable: !0
149
- };
150
- Object.defineProperties(console, {
151
- info: o,
152
- log: o,
153
- warn: o,
154
- error: o,
155
- group: o,
156
- groupCollapsed: o,
157
- groupEnd: o
158
- });
159
- }
160
- Le++;
161
- }
162
- }
163
- function $() {
164
- {
165
- if (Le--, Le === 0) {
166
- var o = {
167
- configurable: !0,
168
- enumerable: !0,
169
- writable: !0
170
- };
171
- Object.defineProperties(console, {
172
- log: se({}, o, {
173
- value: wt
174
- }),
175
- info: se({}, o, {
176
- value: _t
177
- }),
178
- warn: se({}, o, {
179
- value: qe
180
- }),
181
- error: se({}, o, {
182
- value: yt
183
- }),
184
- group: se({}, o, {
185
- value: Ze
186
- }),
187
- groupCollapsed: se({}, o, {
188
- value: F
189
- }),
190
- groupEnd: se({}, o, {
191
- value: Xe
192
- })
193
- });
194
- }
195
- Le < 0 && N("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
196
- }
197
- }
198
- var ge = M.ReactCurrentDispatcher, Ie;
199
- function ae(o, p, k) {
200
- {
201
- if (Ie === void 0)
202
- try {
203
- throw Error();
204
- } catch (S) {
205
- var _ = S.stack.trim().match(/\n( *(at )?)/);
206
- Ie = _ && _[1] || "";
207
- }
208
- return `
209
- ` + Ie + o;
210
- }
211
- }
212
- var ze = !1, Ee;
213
- {
214
- var vt = typeof WeakMap == "function" ? WeakMap : Map;
215
- Ee = new vt();
216
- }
217
- function Ke(o, p) {
218
- if (!o || ze)
219
- return "";
220
- {
221
- var k = Ee.get(o);
222
- if (k !== void 0)
223
- return k;
224
- }
225
- var _;
226
- ze = !0;
227
- var S = Error.prepareStackTrace;
228
- Error.prepareStackTrace = void 0;
229
- var I;
230
- I = ge.current, ge.current = null, Et();
231
- try {
232
- if (p) {
233
- var A = function() {
234
- throw Error();
235
- };
236
- if (Object.defineProperty(A.prototype, "props", {
237
- set: function() {
238
- throw Error();
239
- }
240
- }), typeof Reflect == "object" && Reflect.construct) {
241
- try {
242
- Reflect.construct(A, []);
243
- } catch (L) {
244
- _ = L;
245
- }
246
- Reflect.construct(o, [], A);
247
- } else {
248
- try {
249
- A.call();
250
- } catch (L) {
251
- _ = L;
252
- }
253
- o.call(A.prototype);
254
- }
255
- } else {
256
- try {
257
- throw Error();
258
- } catch (L) {
259
- _ = L;
260
- }
261
- o();
262
- }
263
- } catch (L) {
264
- if (L && _ && typeof L.stack == "string") {
265
- for (var v = L.stack.split(`
266
- `), G = _.stack.split(`
267
- `), d = v.length - 1, i = G.length - 1; d >= 1 && i >= 0 && v[d] !== G[i]; )
268
- i--;
269
- for (; d >= 1 && i >= 0; d--, i--)
270
- if (v[d] !== G[i]) {
271
- if (d !== 1 || i !== 1)
272
- do
273
- if (d--, i--, i < 0 || v[d] !== G[i]) {
274
- var f = `
275
- ` + v[d].replace(" at new ", " at ");
276
- return o.displayName && f.includes("<anonymous>") && (f = f.replace("<anonymous>", o.displayName)), typeof o == "function" && Ee.set(o, f), f;
277
- }
278
- while (d >= 1 && i >= 0);
279
- break;
280
- }
281
- }
282
- } finally {
283
- ze = !1, ge.current = I, $(), Error.prepareStackTrace = S;
284
- }
285
- var b = o ? o.displayName || o.name : "", C = b ? ae(b) : "";
286
- return typeof o == "function" && Ee.set(o, C), C;
287
- }
288
- function ve(o, p, k) {
289
- return Ke(o, !1);
290
- }
291
- function $e(o) {
292
- var p = o.prototype;
293
- return !!(p && p.isReactComponent);
294
- }
295
- function te(o, p, k) {
296
- if (o == null)
297
- return "";
298
- if (typeof o == "function")
299
- return Ke(o, $e(o));
300
- if (typeof o == "string")
301
- return ae(o);
302
- switch (o) {
303
- case x:
304
- return ae("Suspense");
305
- case h:
306
- return ae("SuspenseList");
307
- }
308
- if (typeof o == "object")
309
- switch (o.$$typeof) {
310
- case u:
311
- return ve(o.render);
312
- case w:
313
- return te(o.type, p, k);
314
- case g: {
315
- var _ = o, S = _._payload, I = _._init;
316
- try {
317
- return te(I(S), p, k);
318
- } catch {
319
- }
320
- }
321
- }
322
- return "";
323
- }
324
- var ke = Object.prototype.hasOwnProperty, Fe = {}, be = M.ReactDebugCurrentFrame;
325
- function xe(o) {
326
- if (o) {
327
- var p = o._owner, k = te(o.type, o._source, p ? p.type : null);
328
- be.setExtraStackFrame(k);
329
- } else
330
- be.setExtraStackFrame(null);
331
- }
332
- function Ue(o, p, k, _, S) {
333
- {
334
- var I = Function.call.bind(ke);
335
- for (var A in o)
336
- if (I(o, A)) {
337
- var v = void 0;
338
- try {
339
- if (typeof o[A] != "function") {
340
- var G = Error((_ || "React class") + ": " + k + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
- throw G.name = "Invariant Violation", G;
342
- }
343
- v = o[A](p, A, _, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
- } catch (d) {
345
- v = d;
346
- }
347
- v && !(v instanceof Error) && (xe(S), N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", k, A, typeof v), xe(null)), v instanceof Error && !(v.message in Fe) && (Fe[v.message] = !0, xe(S), N("Failed %s type: %s", k, v.message), xe(null));
348
- }
349
- }
350
- }
351
- var Rt = Array.isArray;
352
- function He(o) {
353
- return Rt(o);
354
- }
355
- function Yt(o) {
356
- {
357
- var p = typeof Symbol == "function" && Symbol.toStringTag, k = p && o[Symbol.toStringTag] || o.constructor.name || "Object";
358
- return k;
359
- }
360
- }
361
- function Qe(o) {
362
- try {
363
- return Re(o), !1;
364
- } catch {
365
- return !0;
366
- }
367
- }
368
- function Re(o) {
369
- return "" + o;
370
- }
371
- function Te(o) {
372
- if (Qe(o))
373
- return N("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Yt(o)), Re(o);
374
- }
375
- var Q = M.ReactCurrentOwner, Je = {
376
- key: !0,
377
- ref: !0,
378
- __self: !0,
379
- __source: !0
380
- }, et, tt;
381
- function nt(o) {
382
- if (ke.call(o, "ref")) {
383
- var p = Object.getOwnPropertyDescriptor(o, "ref").get;
384
- if (p && p.isReactWarning)
385
- return !1;
386
- }
387
- return o.ref !== void 0;
388
- }
389
- function At(o) {
390
- if (ke.call(o, "key")) {
391
- var p = Object.getOwnPropertyDescriptor(o, "key").get;
392
- if (p && p.isReactWarning)
393
- return !1;
394
- }
395
- return o.key !== void 0;
396
- }
397
- function Be(o, p) {
398
- typeof o.ref == "string" && Q.current;
399
- }
400
- function We(o, p) {
401
- {
402
- var k = function() {
403
- et || (et = !0, N("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
404
- };
405
- k.isReactWarning = !0, Object.defineProperty(o, "key", {
406
- get: k,
407
- configurable: !0
408
- });
409
- }
410
- }
411
- function le(o, p) {
412
- {
413
- var k = function() {
414
- tt || (tt = !0, N("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
415
- };
416
- k.isReactWarning = !0, Object.defineProperty(o, "ref", {
417
- get: k,
418
- configurable: !0
419
- });
420
- }
421
- }
422
- var Ae = function(o, p, k, _, S, I, A) {
423
- var v = {
424
- // This tag allows us to uniquely identify this as a React Element
425
- $$typeof: e,
426
- // Built-in properties that belong on the element
427
- type: o,
428
- key: p,
429
- ref: k,
430
- props: A,
431
- // Record the component responsible for creating this element.
432
- _owner: I
433
- };
434
- return v._store = {}, Object.defineProperty(v._store, "validated", {
435
- configurable: !1,
436
- enumerable: !1,
437
- writable: !0,
438
- value: !1
439
- }), Object.defineProperty(v, "_self", {
440
- configurable: !1,
441
- enumerable: !1,
442
- writable: !1,
443
- value: _
444
- }), Object.defineProperty(v, "_source", {
445
- configurable: !1,
446
- enumerable: !1,
447
- writable: !1,
448
- value: S
449
- }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
450
- };
451
- function rt(o, p, k, _, S) {
452
- {
453
- var I, A = {}, v = null, G = null;
454
- k !== void 0 && (Te(k), v = "" + k), At(p) && (Te(p.key), v = "" + p.key), nt(p) && (G = p.ref, Be(p, S));
455
- for (I in p)
456
- ke.call(p, I) && !Je.hasOwnProperty(I) && (A[I] = p[I]);
457
- if (o && o.defaultProps) {
458
- var d = o.defaultProps;
459
- for (I in d)
460
- A[I] === void 0 && (A[I] = d[I]);
461
- }
462
- if (v || G) {
463
- var i = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
464
- v && We(A, i), G && le(A, i);
465
- }
466
- return Ae(o, v, G, S, _, Q.current, A);
467
- }
468
- }
469
- var De = M.ReactCurrentOwner, St = M.ReactDebugCurrentFrame;
470
- function ce(o) {
471
- if (o) {
472
- var p = o._owner, k = te(o.type, o._source, p ? p.type : null);
473
- St.setExtraStackFrame(k);
474
- } else
475
- St.setExtraStackFrame(null);
476
- }
477
- var Se;
478
- Se = !1;
479
- function it(o) {
480
- return typeof o == "object" && o !== null && o.$$typeof === e;
481
- }
482
- function Oe() {
483
- {
484
- if (De.current) {
485
- var o = ee(De.current.type);
486
- if (o)
487
- return `
488
-
489
- Check the render method of \`` + o + "`.";
490
- }
491
- return "";
492
- }
493
- }
494
- function Vt(o) {
495
- return "";
496
- }
497
- var Ot = {};
498
- function U(o) {
499
- {
500
- var p = Oe();
501
- if (!p) {
502
- var k = typeof o == "string" ? o : o.displayName || o.name;
503
- k && (p = `
504
-
505
- Check the top-level render call using <` + k + ">.");
506
- }
507
- return p;
508
- }
509
- }
510
- function we(o, p) {
511
- {
512
- if (!o._store || o._store.validated || o.key != null)
513
- return;
514
- o._store.validated = !0;
515
- var k = U(p);
516
- if (Ot[k])
517
- return;
518
- Ot[k] = !0;
519
- var _ = "";
520
- o && o._owner && o._owner !== De.current && (_ = " It was passed a child from " + ee(o._owner.type) + "."), ce(o), N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', k, _), ce(null);
521
- }
522
- }
523
- function Ct(o, p) {
524
- {
525
- if (typeof o != "object")
526
- return;
527
- if (He(o))
528
- for (var k = 0; k < o.length; k++) {
529
- var _ = o[k];
530
- it(_) && we(_, p);
531
- }
532
- else if (it(o))
533
- o._store && (o._store.validated = !0);
534
- else if (o) {
535
- var S = O(o);
536
- if (typeof S == "function" && S !== o.entries)
537
- for (var I = S.call(o), A; !(A = I.next()).done; )
538
- it(A.value) && we(A.value, p);
539
- }
540
- }
541
- }
542
- function Lt(o) {
543
- {
544
- var p = o.type;
545
- if (p == null || typeof p == "string")
546
- return;
547
- var k;
548
- if (typeof p == "function")
549
- k = p.propTypes;
550
- else if (typeof p == "object" && (p.$$typeof === u || // Note: Memo only checks outer props here.
551
- // Inner props are checked in the reconciler.
552
- p.$$typeof === w))
553
- k = p.propTypes;
554
- else
555
- return;
556
- if (k) {
557
- var _ = ee(p);
558
- Ue(k, o.props, "prop", _, o);
559
- } else if (p.PropTypes !== void 0 && !Se) {
560
- Se = !0;
561
- var S = ee(p);
562
- N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
563
- }
564
- typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
- }
566
- }
567
- function ot(o) {
568
- {
569
- for (var p = Object.keys(o.props), k = 0; k < p.length; k++) {
570
- var _ = p[k];
571
- if (_ !== "children" && _ !== "key") {
572
- ce(o), N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), ce(null);
573
- break;
574
- }
575
- }
576
- o.ref !== null && (ce(o), N("Invalid attribute `ref` supplied to `React.Fragment`."), ce(null));
577
- }
578
- }
579
- var st = {};
580
- function at(o, p, k, _, S, I) {
581
- {
582
- var A = Gt(o);
583
- if (!A) {
584
- var v = "";
585
- (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
586
- var G = Vt();
587
- G ? v += G : v += Oe();
588
- var d;
589
- o === null ? d = "null" : He(o) ? d = "array" : o !== void 0 && o.$$typeof === e ? (d = "<" + (ee(o.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : d = typeof o, N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, v);
590
- }
591
- var i = rt(o, p, k, S, I);
592
- if (i == null)
593
- return i;
594
- if (A) {
595
- var f = p.children;
596
- if (f !== void 0)
597
- if (_)
598
- if (He(f)) {
599
- for (var b = 0; b < f.length; b++)
600
- Ct(f[b], o);
601
- Object.freeze && Object.freeze(f);
602
- } else
603
- N("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
604
- else
605
- Ct(f, o);
606
- }
607
- if (ke.call(p, "key")) {
608
- var C = ee(o), L = Object.keys(p).filter(function(ue) {
609
- return ue !== "key";
610
- }), z = L.length > 0 ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}";
611
- if (!st[C + z]) {
612
- var V = L.length > 0 ? "{" + L.join(": ..., ") + ": ...}" : "{}";
613
- N(`A props object containing a "key" prop is being spread into JSX:
614
- let props = %s;
615
- <%s {...props} />
616
- React keys must be passed directly to JSX without using spread:
617
- let props = %s;
618
- <%s key={someKey} {...props} />`, z, C, V, C), st[C + z] = !0;
619
- }
620
- }
621
- return o === n ? ot(i) : Lt(i), i;
622
- }
623
- }
624
- function qt(o, p, k) {
625
- return at(o, p, k, !0);
626
- }
627
- function ne(o, p, k) {
628
- return at(o, p, k, !1);
629
- }
630
- var _e = ne, It = qt;
631
- ct.Fragment = n, ct.jsx = _e, ct.jsxs = It;
632
- }()), ct;
633
- }
634
- process.env.NODE_ENV === "production" ? nn.exports = rr() : nn.exports = ir();
635
- var y = nn.exports, Mn = {
5
+ var Xn = (l, e, t) => e in l ? Vn(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
6
+ var A = (l, e, t) => Xn(l, typeof e != "symbol" ? e + "" : e, t), Qn = (l, e, t) => e.has(l) || Jt("Cannot " + t);
7
+ var en = (l, e, t) => e.has(l) ? Jt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(l) : e.set(l, t);
8
+ var Ue = (l, e, t) => (Qn(l, e, "access private method"), t);
9
+ import { jsxs as $, jsx as w } from "react/jsx-runtime";
10
+ import re, { useRef as Kn, useState as ie, useEffect as be } from "react";
11
+ var gn = {
636
12
  color: void 0,
637
13
  size: void 0,
638
14
  className: void 0,
639
15
  style: void 0,
640
16
  attr: void 0
641
- }, _n = me.createContext && me.createContext(Mn), Ce = function() {
642
- return Ce = Object.assign || function(l) {
17
+ }, tn = re.createContext && re.createContext(gn), se = function() {
18
+ return se = Object.assign || function(l) {
643
19
  for (var e, t = 1, n = arguments.length; t < n; t++) {
644
20
  e = arguments[t];
645
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (l[r] = e[r]);
21
+ for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (l[i] = e[i]);
646
22
  }
647
23
  return l;
648
- }, Ce.apply(this, arguments);
649
- }, or = function(l, e) {
24
+ }, se.apply(this, arguments);
25
+ }, Jn = function(l, e) {
650
26
  var t = {};
651
27
  for (var n in l) Object.prototype.hasOwnProperty.call(l, n) && e.indexOf(n) < 0 && (t[n] = l[n]);
652
- if (l != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(l); r < n.length; r++)
653
- e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(l, n[r]) && (t[n[r]] = l[n[r]]);
28
+ if (l != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(l); i < n.length; i++)
29
+ e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(l, n[i]) && (t[n[i]] = l[n[i]]);
654
30
  return t;
655
31
  };
656
- function jn(l) {
32
+ function kn(l) {
657
33
  return l && l.map(function(e, t) {
658
- return me.createElement(e.tag, Ce({
34
+ return re.createElement(e.tag, se({
659
35
  key: t
660
- }, e.attr), jn(e.child));
36
+ }, e.attr), kn(e.child));
661
37
  });
662
38
  }
663
- function ie(l) {
39
+ function G(l) {
664
40
  return function(e) {
665
- return me.createElement(sr, Ce({
666
- attr: Ce({}, l.attr)
667
- }, e), jn(l.child));
41
+ return re.createElement(ei, se({
42
+ attr: se({}, l.attr)
43
+ }, e), kn(l.child));
668
44
  };
669
45
  }
670
- function sr(l) {
46
+ function ei(l) {
671
47
  var e = function(t) {
672
- var n = l.attr, r = l.size, a = l.title, s = or(l, ["attr", "size", "title"]), c = r || t.size || "1em", u;
673
- return t.className && (u = t.className), l.className && (u = (u ? u + " " : "") + l.className), me.createElement("svg", Ce({
48
+ var n = l.attr, i = l.size, o = l.title, r = Jn(l, ["attr", "size", "title"]), a = i || t.size || "1em", c;
49
+ return t.className && (c = t.className), l.className && (c = (c ? c + " " : "") + l.className), re.createElement("svg", se({
674
50
  stroke: "currentColor",
675
51
  fill: "currentColor",
676
52
  strokeWidth: "0"
677
- }, t.attr, n, s, {
678
- className: u,
679
- style: Ce(Ce({
53
+ }, t.attr, n, r, {
54
+ className: c,
55
+ style: se(se({
680
56
  color: l.color || t.color
681
57
  }, t.style), l.style),
682
- height: c,
683
- width: c,
58
+ height: a,
59
+ width: a,
684
60
  xmlns: "http://www.w3.org/2000/svg"
685
- }), a && me.createElement("title", null, a), l.children);
61
+ }), o && re.createElement("title", null, o), l.children);
686
62
  };
687
- return _n !== void 0 ? me.createElement(_n.Consumer, null, function(t) {
63
+ return tn !== void 0 ? re.createElement(tn.Consumer, null, function(t) {
688
64
  return e(t);
689
- }) : e(Mn);
65
+ }) : e(gn);
690
66
  }
691
- function ar(l) {
692
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "48", d: "M112 244l144-144 144 144M256 120v292" } }] })(l);
67
+ function ti(l) {
68
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "48", d: "M112 244l144-144 144 144M256 120v292" } }] })(l);
693
69
  }
694
- function lr(l) {
695
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M416 128L192 384l-96-96" } }] })(l);
70
+ function ni(l) {
71
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M416 128L192 384l-96-96" } }] })(l);
696
72
  }
697
- function cr(l) {
698
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M368 368L144 144m224 0L144 368" } }] })(l);
73
+ function ii(l) {
74
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M368 368L144 144m224 0L144 368" } }] })(l);
699
75
  }
700
- function ur(l) {
701
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8-69 0-113.44 45.79-128 91.2-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M320 255.79l-64-64-64 64m64 192.42V207.79" } }] })(l);
76
+ function ri(l) {
77
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8-69 0-113.44 45.79-128 91.2-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M320 255.79l-64-64-64 64m64 192.42V207.79" } }] })(l);
702
78
  }
703
- function fr(l) {
704
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "rect", attr: { width: "336", height: "336", x: "128", y: "128", fill: "none", strokeLinejoin: "round", strokeWidth: "32", rx: "57", ry: "57" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24" } }] })(l);
79
+ function si(l) {
80
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "rect", attr: { width: "336", height: "336", x: "128", y: "128", fill: "none", strokeLinejoin: "round", strokeWidth: "32", rx: "57", ry: "57" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24" } }] })(l);
705
81
  }
706
- function pr(l) {
707
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinejoin: "round", strokeWidth: "32", d: "M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M256 56v120a32 32 0 0032 32h120m-232 80h160m-160 80h160" } }] })(l);
82
+ function oi(l) {
83
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinejoin: "round", strokeWidth: "32", d: "M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M256 56v120a32 32 0 0032 32h120m-232 80h160m-160 80h160" } }] })(l);
708
84
  }
709
- function hr(l) {
710
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M176 272l80 80 80-80M256 48v288" } }] })(l);
85
+ function li(l) {
86
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40" } }, { tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M176 272l80 80 80-80M256 48v288" } }] })(l);
711
87
  }
712
- function dr(l) {
713
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z" } }] })(l);
88
+ function ai(l) {
89
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z" } }] })(l);
714
90
  }
715
- function mr(l) {
716
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeMiterlimit: "10", strokeWidth: "32", d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z" } }, { tag: "path", attr: { d: "M310.4 336H201.6a25.62 25.62 0 01-25.6-25.6V201.6a25.62 25.62 0 0125.6-25.6h108.8a25.62 25.62 0 0125.6 25.6v108.8a25.62 25.62 0 01-25.6 25.6z" } }] })(l);
91
+ function ci(l) {
92
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeMiterlimit: "10", strokeWidth: "32", d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z" } }, { tag: "path", attr: { d: "M310.4 336H201.6a25.62 25.62 0 01-25.6-25.6V201.6a25.62 25.62 0 0125.6-25.6h108.8a25.62 25.62 0 0125.6 25.6v108.8a25.62 25.62 0 01-25.6 25.6z" } }] })(l);
717
93
  }
718
- function gr(l) {
719
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "32", d: "M256 48v48m0 320v48m147.08-355.08l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48m-320 0H48m355.08 147.08l-33.94-33.94M142.86 142.86l-33.94-33.94" } }, { tag: "circle", attr: { cx: "256", cy: "256", r: "80", fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "32" } }] })(l);
94
+ function ui(l) {
95
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "32", d: "M256 48v48m0 320v48m147.08-355.08l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48m-320 0H48m355.08 147.08l-33.94-33.94M142.86 142.86l-33.94-33.94" } }, { tag: "circle", attr: { cx: "256", cy: "256", r: "80", fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "32" } }] })(l);
720
96
  }
721
- function kr(l) {
722
- return ie({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M126 192H56a8 8 0 00-8 8v112a8 8 0 008 8h69.65a15.93 15.93 0 0110.14 3.54l91.47 74.89A8 8 0 00240 392V120a8 8 0 00-12.74-6.43l-91.47 74.89A15 15 0 01126 192zm194 128c9.74-19.38 16-40.84 16-64 0-23.48-6-44.42-16-64m48 176c19.48-33.92 32-64.06 32-112s-12-77.74-32-112m48 272c30-46 48-91.43 48-160s-18-113-48-160" } }] })(l);
97
+ function pi(l) {
98
+ return G({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M126 192H56a8 8 0 00-8 8v112a8 8 0 008 8h69.65a15.93 15.93 0 0110.14 3.54l91.47 74.89A8 8 0 00240 392V120a8 8 0 00-12.74-6.43l-91.47 74.89A15 15 0 01126 192zm194 128c9.74-19.38 16-40.84 16-64 0-23.48-6-44.42-16-64m48 176c19.48-33.92 32-64.06 32-112s-12-77.74-32-112m48 272c30-46 48-91.43 48-160s-18-113-48-160" } }] })(l);
723
99
  }
724
- function br(l) {
725
- return ie({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z" } }] })(l);
100
+ function hi(l) {
101
+ return G({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z" } }] })(l);
726
102
  }
727
- const xr = ({ onFileLoaded: l }) => {
728
- const e = nr(null), [t, n] = ye(!1), [r, a] = ye(""), [s, c] = ye(!1), u = (m) => {
729
- if (m.length > 0) {
730
- const O = m[0];
731
- x(O) ? h(O) : alert("Please upload a valid Markdown (.md) file.");
732
- }
733
- }, x = (m) => m.name.endsWith(".md") || m.name.endsWith(".markdown") || m.type === "text/markdown", h = (m) => {
734
- const O = new FileReader();
735
- O.onload = (M) => {
736
- l({ name: m.name, content: M.target.result });
737
- }, O.readAsText(m);
738
- }, w = (m) => {
739
- m.preventDefault(), m.stopPropagation(), m.type === "dragenter" || m.type === "dragover" ? n(!0) : (m.type === "dragleave" || m.type === "drop") && n(!1);
740
- }, g = (m) => {
741
- m.preventDefault(), m.stopPropagation(), n(!1), m.dataTransfer.files && m.dataTransfer.files[0] && u(m.dataTransfer.files);
742
- }, E = async () => {
743
- const m = r.trim();
744
- if (m) {
745
- c(!0);
103
+ const fi = ({ onFileLoaded: l }) => {
104
+ const e = Kn(null), [t, n] = ie(!1), [i, o] = ie(""), [r, a] = ie(!1), c = (p) => {
105
+ if (p.length > 0) {
106
+ const _ = p[0];
107
+ g(_) ? f(_) : alert("Please upload a valid Markdown (.md) file.");
108
+ }
109
+ }, g = (p) => p.name.endsWith(".md") || p.name.endsWith(".markdown") || p.type === "text/markdown", f = (p) => {
110
+ const _ = new FileReader();
111
+ _.onload = (I) => {
112
+ l({ name: p.name, content: I.target.result });
113
+ }, _.readAsText(p);
114
+ }, T = (p) => {
115
+ p.preventDefault(), p.stopPropagation(), p.type === "dragenter" || p.type === "dragover" ? n(!0) : (p.type === "dragleave" || p.type === "drop") && n(!1);
116
+ }, h = (p) => {
117
+ p.preventDefault(), p.stopPropagation(), n(!1), p.dataTransfer.files && p.dataTransfer.files[0] && c(p.dataTransfer.files);
118
+ }, b = async () => {
119
+ const p = i.trim();
120
+ if (p) {
121
+ a(!0);
746
122
  try {
747
- const O = T(m), M = await fetch(O);
748
- if (!M.ok)
749
- throw new Error(`HTTP error! status: ${M.status}`);
750
- const N = await M.text();
751
- let K = m.substring(m.lastIndexOf("/") + 1) || "remote-file.md";
752
- K.includes("?") && (K = K.split("?")[0]), l({ name: K, content: N });
753
- } catch (O) {
754
- console.error("Fetch error:", O), alert(`Failed to load Markdown from URL.
123
+ const _ = m(p), I = await fetch(_);
124
+ if (!I.ok)
125
+ throw new Error(`HTTP error! status: ${I.status}`);
126
+ const q = await I.text();
127
+ let W = p.substring(p.lastIndexOf("/") + 1) || "remote-file.md";
128
+ W.includes("?") && (W = W.split("?")[0]), l({ name: W, content: q });
129
+ } catch (_) {
130
+ console.error("Fetch error:", _), alert(`Failed to load Markdown from URL.
755
131
 
756
132
  Note: This might be due to CORS restrictions. Try a raw GitHub URL.`);
757
133
  } finally {
758
- c(!1);
134
+ a(!1);
759
135
  }
760
136
  }
761
- }, T = (m) => {
137
+ }, m = (p) => {
762
138
  try {
763
- if (new URL(m).hostname === "github.com" && m.includes("/blob/"))
764
- return m.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/");
139
+ if (new URL(p).hostname === "github.com" && p.includes("/blob/"))
140
+ return p.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/");
765
141
  } catch {
766
142
  }
767
- return m;
143
+ return p;
768
144
  };
769
- return /* @__PURE__ */ y.jsxs(
145
+ return /* @__PURE__ */ $(
770
146
  "section",
771
147
  {
772
148
  className: `upload-zone ${t ? "drag-active" : ""}`,
773
149
  onClick: () => e.current.click(),
774
- onDragEnter: w,
775
- onDragLeave: w,
776
- onDragOver: w,
777
- onDrop: g,
150
+ onDragEnter: T,
151
+ onDragLeave: T,
152
+ onDragOver: T,
153
+ onDrop: h,
778
154
  id: "upload-area",
779
155
  children: [
780
- /* @__PURE__ */ y.jsx(
156
+ /* @__PURE__ */ w(
781
157
  "input",
782
158
  {
783
159
  type: "file",
784
160
  ref: e,
785
161
  accept: ".md,.markdown",
786
162
  hidden: !0,
787
- onChange: (m) => u(m.target.files)
163
+ onChange: (p) => c(p.target.files)
788
164
  }
789
165
  ),
790
- /* @__PURE__ */ y.jsxs("div", { className: "upload-content", children: [
791
- /* @__PURE__ */ y.jsx("div", { className: "icon-wrapper", children: /* @__PURE__ */ y.jsx(ur, {}) }),
792
- /* @__PURE__ */ y.jsx("h2", { children: "Drop your Markdown file here" }),
793
- /* @__PURE__ */ y.jsxs("p", { children: [
166
+ /* @__PURE__ */ $("div", { className: "upload-content", children: [
167
+ /* @__PURE__ */ w("div", { className: "icon-wrapper", children: /* @__PURE__ */ w(ri, {}) }),
168
+ /* @__PURE__ */ w("h2", { children: "Drop your Markdown file here" }),
169
+ /* @__PURE__ */ $("p", { children: [
794
170
  "or ",
795
- /* @__PURE__ */ y.jsx("span", { className: "browse-btn", children: "browse files" })
171
+ /* @__PURE__ */ w("span", { className: "browse-btn", children: "browse files" })
796
172
  ] }),
797
- /* @__PURE__ */ y.jsx("div", { className: "divider", children: /* @__PURE__ */ y.jsx("span", { children: "OR" }) }),
798
- /* @__PURE__ */ y.jsxs("div", { className: "url-input-container", onClick: (m) => m.stopPropagation(), children: [
799
- /* @__PURE__ */ y.jsx(
173
+ /* @__PURE__ */ w("div", { className: "divider", children: /* @__PURE__ */ w("span", { children: "OR" }) }),
174
+ /* @__PURE__ */ $("div", { className: "url-input-container", onClick: (p) => p.stopPropagation(), children: [
175
+ /* @__PURE__ */ w(
800
176
  "input",
801
177
  {
802
178
  type: "url",
803
179
  id: "url-input",
804
180
  placeholder: "Paste a raw Markdown URL...",
805
181
  spellCheck: "false",
806
- value: r,
807
- onChange: (m) => a(m.target.value),
808
- onKeyDown: (m) => m.key === "Enter" && E()
182
+ value: i,
183
+ onChange: (p) => o(p.target.value),
184
+ onKeyDown: (p) => p.key === "Enter" && b()
809
185
  }
810
186
  ),
811
- /* @__PURE__ */ y.jsx("button", { id: "url-btn", onClick: E, disabled: s, children: s ? "..." : "Go" })
187
+ /* @__PURE__ */ w("button", { id: "url-btn", onClick: b, disabled: r, children: r ? "..." : "Go" })
812
188
  ] }),
813
- /* @__PURE__ */ y.jsxs("p", { className: "sub-text", children: [
189
+ /* @__PURE__ */ $("p", { className: "sub-text", children: [
814
190
  "Supports ",
815
- /* @__PURE__ */ y.jsx("span", { style: { color: "aqua" }, children: ".md" }),
191
+ /* @__PURE__ */ w("span", { style: { color: "aqua" }, children: ".md" }),
816
192
  " and ",
817
- /* @__PURE__ */ y.jsx("span", { style: { color: "aqua" }, children: ".markdown" })
193
+ /* @__PURE__ */ w("span", { style: { color: "aqua" }, children: ".markdown" })
818
194
  ] })
819
195
  ] })
820
196
  ]
821
197
  }
822
198
  );
823
199
  };
824
- function cn() {
200
+ function _t() {
825
201
  return {
826
202
  async: !1,
827
203
  breaks: !1,
@@ -835,43 +211,43 @@ function cn() {
835
211
  walkTokens: null
836
212
  };
837
213
  }
838
- let Me = cn();
839
- function zn(l) {
840
- Me = l;
214
+ let ue = _t();
215
+ function bn(l) {
216
+ ue = l;
841
217
  }
842
- const $n = /[&<>"']/, Tr = new RegExp($n.source, "g"), Fn = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, wr = new RegExp(Fn.source, "g"), _r = {
218
+ const Tn = /[&<>"']/, di = new RegExp(Tn.source, "g"), wn = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, mi = new RegExp(wn.source, "g"), gi = {
843
219
  "&": "&amp;",
844
220
  "<": "&lt;",
845
221
  ">": "&gt;",
846
222
  '"': "&quot;",
847
223
  "'": "&#39;"
848
- }, yn = (l) => _r[l];
849
- function J(l, e) {
224
+ }, nn = (l) => gi[l];
225
+ function B(l, e) {
850
226
  if (e) {
851
- if ($n.test(l))
852
- return l.replace(Tr, yn);
853
- } else if (Fn.test(l))
854
- return l.replace(wr, yn);
227
+ if (Tn.test(l))
228
+ return l.replace(di, nn);
229
+ } else if (wn.test(l))
230
+ return l.replace(mi, nn);
855
231
  return l;
856
232
  }
857
- const yr = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
858
- function Er(l) {
859
- return l.replace(yr, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
233
+ const ki = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
234
+ function bi(l) {
235
+ return l.replace(ki, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
860
236
  }
861
- const vr = /(^|[^\[])\^/g;
862
- function P(l, e) {
237
+ const Ti = /(^|[^\[])\^/g;
238
+ function E(l, e) {
863
239
  let t = typeof l == "string" ? l : l.source;
864
240
  e = e || "";
865
241
  const n = {
866
- replace: (r, a) => {
867
- let s = typeof a == "string" ? a : a.source;
868
- return s = s.replace(vr, "$1"), t = t.replace(r, s), n;
242
+ replace: (i, o) => {
243
+ let r = typeof o == "string" ? o : o.source;
244
+ return r = r.replace(Ti, "$1"), t = t.replace(i, r), n;
869
245
  },
870
246
  getRegex: () => new RegExp(t, e)
871
247
  };
872
248
  return n;
873
249
  }
874
- function En(l) {
250
+ function rn(l) {
875
251
  try {
876
252
  l = encodeURI(l).replace(/%25/g, "%");
877
253
  } catch {
@@ -879,35 +255,35 @@ function En(l) {
879
255
  }
880
256
  return l;
881
257
  }
882
- const gt = { exec: () => null };
883
- function vn(l, e) {
884
- const t = l.replace(/\|/g, (a, s, c) => {
885
- let u = !1, x = s;
886
- for (; --x >= 0 && c[x] === "\\"; )
887
- u = !u;
888
- return u ? "|" : " |";
258
+ const Le = { exec: () => null };
259
+ function sn(l, e) {
260
+ const t = l.replace(/\|/g, (o, r, a) => {
261
+ let c = !1, g = r;
262
+ for (; --g >= 0 && a[g] === "\\"; )
263
+ c = !c;
264
+ return c ? "|" : " |";
889
265
  }), n = t.split(/ \|/);
890
- let r = 0;
266
+ let i = 0;
891
267
  if (n[0].trim() || n.shift(), n.length > 0 && !n[n.length - 1].trim() && n.pop(), e)
892
268
  if (n.length > e)
893
269
  n.splice(e);
894
270
  else
895
271
  for (; n.length < e; )
896
272
  n.push("");
897
- for (; r < n.length; r++)
898
- n[r] = n[r].trim().replace(/\\\|/g, "|");
273
+ for (; i < n.length; i++)
274
+ n[i] = n[i].trim().replace(/\\\|/g, "|");
899
275
  return n;
900
276
  }
901
- function Pt(l, e, t) {
277
+ function Fe(l, e, t) {
902
278
  const n = l.length;
903
279
  if (n === 0)
904
280
  return "";
905
- let r = 0;
906
- for (; r < n && l.charAt(n - r - 1) === e; )
907
- r++;
908
- return l.slice(0, n - r);
281
+ let i = 0;
282
+ for (; i < n && l.charAt(n - i - 1) === e; )
283
+ i++;
284
+ return l.slice(0, n - i);
909
285
  }
910
- function Rr(l, e) {
286
+ function wi(l, e) {
911
287
  if (l.indexOf(e[1]) === -1)
912
288
  return -1;
913
289
  let t = 0;
@@ -920,51 +296,51 @@ function Rr(l, e) {
920
296
  return n;
921
297
  return -1;
922
298
  }
923
- function Rn(l, e, t, n) {
924
- const r = e.href, a = e.title ? J(e.title) : null, s = l[1].replace(/\\([\[\]])/g, "$1");
299
+ function on(l, e, t, n) {
300
+ const i = e.href, o = e.title ? B(e.title) : null, r = l[1].replace(/\\([\[\]])/g, "$1");
925
301
  if (l[0].charAt(0) !== "!") {
926
302
  n.state.inLink = !0;
927
- const c = {
303
+ const a = {
928
304
  type: "link",
929
305
  raw: t,
930
- href: r,
931
- title: a,
932
- text: s,
933
- tokens: n.inlineTokens(s)
306
+ href: i,
307
+ title: o,
308
+ text: r,
309
+ tokens: n.inlineTokens(r)
934
310
  };
935
- return n.state.inLink = !1, c;
311
+ return n.state.inLink = !1, a;
936
312
  }
937
313
  return {
938
314
  type: "image",
939
315
  raw: t,
940
- href: r,
941
- title: a,
942
- text: J(s)
316
+ href: i,
317
+ title: o,
318
+ text: B(r)
943
319
  };
944
320
  }
945
- function Ar(l, e) {
321
+ function xi(l, e) {
946
322
  const t = l.match(/^(\s+)(?:```)/);
947
323
  if (t === null)
948
324
  return e;
949
325
  const n = t[1];
950
326
  return e.split(`
951
- `).map((r) => {
952
- const a = r.match(/^\s+/);
953
- if (a === null)
954
- return r;
955
- const [s] = a;
956
- return s.length >= n.length ? r.slice(n.length) : r;
327
+ `).map((i) => {
328
+ const o = i.match(/^\s+/);
329
+ if (o === null)
330
+ return i;
331
+ const [r] = o;
332
+ return r.length >= n.length ? i.slice(n.length) : i;
957
333
  }).join(`
958
334
  `);
959
335
  }
960
- class $t {
336
+ class Ge {
961
337
  // set by the lexer
962
338
  constructor(e) {
963
- j(this, "options");
964
- j(this, "rules");
339
+ A(this, "options");
340
+ A(this, "rules");
965
341
  // set by the lexer
966
- j(this, "lexer");
967
- this.options = e || Me;
342
+ A(this, "lexer");
343
+ this.options = e || ue;
968
344
  }
969
345
  space(e) {
970
346
  const t = this.rules.block.newline.exec(e);
@@ -982,7 +358,7 @@ class $t {
982
358
  type: "code",
983
359
  raw: t[0],
984
360
  codeBlockStyle: "indented",
985
- text: this.options.pedantic ? n : Pt(n, `
361
+ text: this.options.pedantic ? n : Fe(n, `
986
362
  `)
987
363
  };
988
364
  }
@@ -990,12 +366,12 @@ class $t {
990
366
  fences(e) {
991
367
  const t = this.rules.block.fences.exec(e);
992
368
  if (t) {
993
- const n = t[0], r = Ar(n, t[3] || "");
369
+ const n = t[0], i = xi(n, t[3] || "");
994
370
  return {
995
371
  type: "code",
996
372
  raw: n,
997
373
  lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
998
- text: r
374
+ text: i
999
375
  };
1000
376
  }
1001
377
  }
@@ -1004,8 +380,8 @@ class $t {
1004
380
  if (t) {
1005
381
  let n = t[2].trim();
1006
382
  if (/#$/.test(n)) {
1007
- const r = Pt(n, "#");
1008
- (this.options.pedantic || !r || / $/.test(r)) && (n = r.trim());
383
+ const i = Fe(n, "#");
384
+ (this.options.pedantic || !i || / $/.test(i)) && (n = i.trim());
1009
385
  }
1010
386
  return {
1011
387
  type: "heading",
@@ -1027,14 +403,14 @@ class $t {
1027
403
  blockquote(e) {
1028
404
  const t = this.rules.block.blockquote.exec(e);
1029
405
  if (t) {
1030
- const n = Pt(t[0].replace(/^ *>[ \t]?/gm, ""), `
1031
- `), r = this.lexer.state.top;
406
+ const n = Fe(t[0].replace(/^ *>[ \t]?/gm, ""), `
407
+ `), i = this.lexer.state.top;
1032
408
  this.lexer.state.top = !0;
1033
- const a = this.lexer.blockTokens(n);
1034
- return this.lexer.state.top = r, {
409
+ const o = this.lexer.blockTokens(n);
410
+ return this.lexer.state.top = i, {
1035
411
  type: "blockquote",
1036
412
  raw: t[0],
1037
- tokens: a,
413
+ tokens: o,
1038
414
  text: n
1039
415
  };
1040
416
  }
@@ -1043,70 +419,70 @@ class $t {
1043
419
  let t = this.rules.block.list.exec(e);
1044
420
  if (t) {
1045
421
  let n = t[1].trim();
1046
- const r = n.length > 1, a = {
422
+ const i = n.length > 1, o = {
1047
423
  type: "list",
1048
424
  raw: "",
1049
- ordered: r,
1050
- start: r ? +n.slice(0, -1) : "",
425
+ ordered: i,
426
+ start: i ? +n.slice(0, -1) : "",
1051
427
  loose: !1,
1052
428
  items: []
1053
429
  };
1054
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1055
- const s = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);
1056
- let c = "", u = "", x = !1;
430
+ n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
431
+ const r = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);
432
+ let a = "", c = "", g = !1;
1057
433
  for (; e; ) {
1058
- let h = !1;
1059
- if (!(t = s.exec(e)) || this.rules.block.hr.test(e))
434
+ let f = !1;
435
+ if (!(t = r.exec(e)) || this.rules.block.hr.test(e))
1060
436
  break;
1061
- c = t[0], e = e.substring(c.length);
1062
- let w = t[2].split(`
1063
- `, 1)[0].replace(/^\t+/, (M) => " ".repeat(3 * M.length)), g = e.split(`
1064
- `, 1)[0], E = 0;
1065
- this.options.pedantic ? (E = 2, u = w.trimStart()) : (E = t[2].search(/[^ ]/), E = E > 4 ? 1 : E, u = w.slice(E), E += t[1].length);
1066
- let T = !1;
1067
- if (!w && /^ *$/.test(g) && (c += g + `
1068
- `, e = e.substring(g.length + 1), h = !0), !h) {
1069
- const M = new RegExp(`^ {0,${Math.min(3, E - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), N = new RegExp(`^ {0,${Math.min(3, E - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), K = new RegExp(`^ {0,${Math.min(3, E - 1)}}(?:\`\`\`|~~~)`), H = new RegExp(`^ {0,${Math.min(3, E - 1)}}#`);
437
+ a = t[0], e = e.substring(a.length);
438
+ let T = t[2].split(`
439
+ `, 1)[0].replace(/^\t+/, (I) => " ".repeat(3 * I.length)), h = e.split(`
440
+ `, 1)[0], b = 0;
441
+ this.options.pedantic ? (b = 2, c = T.trimStart()) : (b = t[2].search(/[^ ]/), b = b > 4 ? 1 : b, c = T.slice(b), b += t[1].length);
442
+ let m = !1;
443
+ if (!T && /^ *$/.test(h) && (a += h + `
444
+ `, e = e.substring(h.length + 1), f = !0), !f) {
445
+ const I = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), q = new RegExp(`^ {0,${Math.min(3, b - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), W = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:\`\`\`|~~~)`), C = new RegExp(`^ {0,${Math.min(3, b - 1)}}#`);
1070
446
  for (; e; ) {
1071
- const oe = e.split(`
447
+ const J = e.split(`
1072
448
  `, 1)[0];
1073
- if (g = oe, this.options.pedantic && (g = g.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), K.test(g) || H.test(g) || M.test(g) || N.test(e))
449
+ if (h = J, this.options.pedantic && (h = h.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), W.test(h) || C.test(h) || I.test(h) || q.test(e))
1074
450
  break;
1075
- if (g.search(/[^ ]/) >= E || !g.trim())
1076
- u += `
1077
- ` + g.slice(E);
451
+ if (h.search(/[^ ]/) >= b || !h.trim())
452
+ c += `
453
+ ` + h.slice(b);
1078
454
  else {
1079
- if (T || w.search(/[^ ]/) >= 4 || K.test(w) || H.test(w) || N.test(w))
455
+ if (m || T.search(/[^ ]/) >= 4 || W.test(T) || C.test(T) || q.test(T))
1080
456
  break;
1081
- u += `
1082
- ` + g;
457
+ c += `
458
+ ` + h;
1083
459
  }
1084
- !T && !g.trim() && (T = !0), c += oe + `
1085
- `, e = e.substring(oe.length + 1), w = g.slice(E);
460
+ !m && !h.trim() && (m = !0), a += J + `
461
+ `, e = e.substring(J.length + 1), T = h.slice(b);
1086
462
  }
1087
463
  }
1088
- a.loose || (x ? a.loose = !0 : /\n *\n *$/.test(c) && (x = !0));
1089
- let m = null, O;
1090
- this.options.gfm && (m = /^\[[ xX]\] /.exec(u), m && (O = m[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), a.items.push({
464
+ o.loose || (g ? o.loose = !0 : /\n *\n *$/.test(a) && (g = !0));
465
+ let p = null, _;
466
+ this.options.gfm && (p = /^\[[ xX]\] /.exec(c), p && (_ = p[0] !== "[ ] ", c = c.replace(/^\[[ xX]\] +/, ""))), o.items.push({
1091
467
  type: "list_item",
1092
- raw: c,
1093
- task: !!m,
1094
- checked: O,
468
+ raw: a,
469
+ task: !!p,
470
+ checked: _,
1095
471
  loose: !1,
1096
- text: u,
472
+ text: c,
1097
473
  tokens: []
1098
- }), a.raw += c;
474
+ }), o.raw += a;
1099
475
  }
1100
- a.items[a.items.length - 1].raw = c.trimEnd(), a.items[a.items.length - 1].text = u.trimEnd(), a.raw = a.raw.trimEnd();
1101
- for (let h = 0; h < a.items.length; h++)
1102
- if (this.lexer.state.top = !1, a.items[h].tokens = this.lexer.blockTokens(a.items[h].text, []), !a.loose) {
1103
- const w = a.items[h].tokens.filter((E) => E.type === "space"), g = w.length > 0 && w.some((E) => /\n.*\n/.test(E.raw));
1104
- a.loose = g;
1105
- }
1106
- if (a.loose)
1107
- for (let h = 0; h < a.items.length; h++)
1108
- a.items[h].loose = !0;
1109
- return a;
476
+ o.items[o.items.length - 1].raw = a.trimEnd(), o.items[o.items.length - 1].text = c.trimEnd(), o.raw = o.raw.trimEnd();
477
+ for (let f = 0; f < o.items.length; f++)
478
+ if (this.lexer.state.top = !1, o.items[f].tokens = this.lexer.blockTokens(o.items[f].text, []), !o.loose) {
479
+ const T = o.items[f].tokens.filter((b) => b.type === "space"), h = T.length > 0 && T.some((b) => /\n.*\n/.test(b.raw));
480
+ o.loose = h;
481
+ }
482
+ if (o.loose)
483
+ for (let f = 0; f < o.items.length; f++)
484
+ o.items[f].loose = !0;
485
+ return o;
1110
486
  }
1111
487
  }
1112
488
  html(e) {
@@ -1123,13 +499,13 @@ class $t {
1123
499
  def(e) {
1124
500
  const t = this.rules.block.def.exec(e);
1125
501
  if (t) {
1126
- const n = t[1].toLowerCase().replace(/\s+/g, " "), r = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", a = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
502
+ const n = t[1].toLowerCase().replace(/\s+/g, " "), i = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", o = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1127
503
  return {
1128
504
  type: "def",
1129
505
  tag: n,
1130
506
  raw: t[0],
1131
- href: r,
1132
- title: a
507
+ href: i,
508
+ title: o
1133
509
  };
1134
510
  }
1135
511
  }
@@ -1137,28 +513,28 @@ class $t {
1137
513
  const t = this.rules.block.table.exec(e);
1138
514
  if (!t || !/[:|]/.test(t[2]))
1139
515
  return;
1140
- const n = vn(t[1]), r = t[2].replace(/^\||\| *$/g, "").split("|"), a = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
1141
- `) : [], s = {
516
+ const n = sn(t[1]), i = t[2].replace(/^\||\| *$/g, "").split("|"), o = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
517
+ `) : [], r = {
1142
518
  type: "table",
1143
519
  raw: t[0],
1144
520
  header: [],
1145
521
  align: [],
1146
522
  rows: []
1147
523
  };
1148
- if (n.length === r.length) {
1149
- for (const c of r)
1150
- /^ *-+: *$/.test(c) ? s.align.push("right") : /^ *:-+: *$/.test(c) ? s.align.push("center") : /^ *:-+ *$/.test(c) ? s.align.push("left") : s.align.push(null);
1151
- for (const c of n)
1152
- s.header.push({
524
+ if (n.length === i.length) {
525
+ for (const a of i)
526
+ /^ *-+: *$/.test(a) ? r.align.push("right") : /^ *:-+: *$/.test(a) ? r.align.push("center") : /^ *:-+ *$/.test(a) ? r.align.push("left") : r.align.push(null);
527
+ for (const a of n)
528
+ r.header.push({
529
+ text: a,
530
+ tokens: this.lexer.inline(a)
531
+ });
532
+ for (const a of o)
533
+ r.rows.push(sn(a, r.header.length).map((c) => ({
1153
534
  text: c,
1154
535
  tokens: this.lexer.inline(c)
1155
- });
1156
- for (const c of a)
1157
- s.rows.push(vn(c, s.header.length).map((u) => ({
1158
- text: u,
1159
- tokens: this.lexer.inline(u)
1160
536
  })));
1161
- return s;
537
+ return r;
1162
538
  }
1163
539
  }
1164
540
  lheading(e) {
@@ -1201,7 +577,7 @@ class $t {
1201
577
  return {
1202
578
  type: "escape",
1203
579
  raw: t[0],
1204
- text: J(t[1])
580
+ text: B(t[1])
1205
581
  };
1206
582
  }
1207
583
  tag(e) {
@@ -1223,80 +599,80 @@ class $t {
1223
599
  if (!this.options.pedantic && /^</.test(n)) {
1224
600
  if (!/>$/.test(n))
1225
601
  return;
1226
- const s = Pt(n.slice(0, -1), "\\");
1227
- if ((n.length - s.length) % 2 === 0)
602
+ const r = Fe(n.slice(0, -1), "\\");
603
+ if ((n.length - r.length) % 2 === 0)
1228
604
  return;
1229
605
  } else {
1230
- const s = Rr(t[2], "()");
1231
- if (s > -1) {
1232
- const u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
1233
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, u).trim(), t[3] = "";
606
+ const r = wi(t[2], "()");
607
+ if (r > -1) {
608
+ const c = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + r;
609
+ t[2] = t[2].substring(0, r), t[0] = t[0].substring(0, c).trim(), t[3] = "";
1234
610
  }
1235
611
  }
1236
- let r = t[2], a = "";
612
+ let i = t[2], o = "";
1237
613
  if (this.options.pedantic) {
1238
- const s = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);
1239
- s && (r = s[1], a = s[3]);
614
+ const r = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);
615
+ r && (i = r[1], o = r[3]);
1240
616
  } else
1241
- a = t[3] ? t[3].slice(1, -1) : "";
1242
- return r = r.trim(), /^</.test(r) && (this.options.pedantic && !/>$/.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), Rn(t, {
1243
- href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
1244
- title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
617
+ o = t[3] ? t[3].slice(1, -1) : "";
618
+ return i = i.trim(), /^</.test(i) && (this.options.pedantic && !/>$/.test(n) ? i = i.slice(1) : i = i.slice(1, -1)), on(t, {
619
+ href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
620
+ title: o && o.replace(this.rules.inline.anyPunctuation, "$1")
1245
621
  }, t[0], this.lexer);
1246
622
  }
1247
623
  }
1248
624
  reflink(e, t) {
1249
625
  let n;
1250
626
  if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1251
- const r = (n[2] || n[1]).replace(/\s+/g, " "), a = t[r.toLowerCase()];
1252
- if (!a) {
1253
- const s = n[0].charAt(0);
627
+ const i = (n[2] || n[1]).replace(/\s+/g, " "), o = t[i.toLowerCase()];
628
+ if (!o) {
629
+ const r = n[0].charAt(0);
1254
630
  return {
1255
631
  type: "text",
1256
- raw: s,
1257
- text: s
632
+ raw: r,
633
+ text: r
1258
634
  };
1259
635
  }
1260
- return Rn(n, a, n[0], this.lexer);
636
+ return on(n, o, n[0], this.lexer);
1261
637
  }
1262
638
  }
1263
639
  emStrong(e, t, n = "") {
1264
- let r = this.rules.inline.emStrongLDelim.exec(e);
1265
- if (!r || r[3] && n.match(/[\p{L}\p{N}]/u))
640
+ let i = this.rules.inline.emStrongLDelim.exec(e);
641
+ if (!i || i[3] && n.match(/[\p{L}\p{N}]/u))
1266
642
  return;
1267
- if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
1268
- const s = [...r[0]].length - 1;
1269
- let c, u, x = s, h = 0;
1270
- const w = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1271
- for (w.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = w.exec(t)) != null; ) {
1272
- if (c = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !c)
643
+ if (!(i[1] || i[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
644
+ const r = [...i[0]].length - 1;
645
+ let a, c, g = r, f = 0;
646
+ const T = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
647
+ for (T.lastIndex = 0, t = t.slice(-1 * e.length + r); (i = T.exec(t)) != null; ) {
648
+ if (a = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !a)
1273
649
  continue;
1274
- if (u = [...c].length, r[3] || r[4]) {
1275
- x += u;
650
+ if (c = [...a].length, i[3] || i[4]) {
651
+ g += c;
1276
652
  continue;
1277
- } else if ((r[5] || r[6]) && s % 3 && !((s + u) % 3)) {
1278
- h += u;
653
+ } else if ((i[5] || i[6]) && r % 3 && !((r + c) % 3)) {
654
+ f += c;
1279
655
  continue;
1280
656
  }
1281
- if (x -= u, x > 0)
657
+ if (g -= c, g > 0)
1282
658
  continue;
1283
- u = Math.min(u, u + x + h);
1284
- const g = [...r[0]][0].length, E = e.slice(0, s + r.index + g + u);
1285
- if (Math.min(s, u) % 2) {
1286
- const m = E.slice(1, -1);
659
+ c = Math.min(c, c + g + f);
660
+ const h = [...i[0]][0].length, b = e.slice(0, r + i.index + h + c);
661
+ if (Math.min(r, c) % 2) {
662
+ const p = b.slice(1, -1);
1287
663
  return {
1288
664
  type: "em",
1289
- raw: E,
1290
- text: m,
1291
- tokens: this.lexer.inlineTokens(m)
665
+ raw: b,
666
+ text: p,
667
+ tokens: this.lexer.inlineTokens(p)
1292
668
  };
1293
669
  }
1294
- const T = E.slice(2, -2);
670
+ const m = b.slice(2, -2);
1295
671
  return {
1296
672
  type: "strong",
1297
- raw: E,
1298
- text: T,
1299
- tokens: this.lexer.inlineTokens(T)
673
+ raw: b,
674
+ text: m,
675
+ tokens: this.lexer.inlineTokens(m)
1300
676
  };
1301
677
  }
1302
678
  }
@@ -1305,8 +681,8 @@ class $t {
1305
681
  const t = this.rules.inline.code.exec(e);
1306
682
  if (t) {
1307
683
  let n = t[2].replace(/\n/g, " ");
1308
- const r = /[^ ]/.test(n), a = /^ /.test(n) && / $/.test(n);
1309
- return r && a && (n = n.substring(1, n.length - 1)), n = J(n, !0), {
684
+ const i = /[^ ]/.test(n), o = /^ /.test(n) && / $/.test(n);
685
+ return i && o && (n = n.substring(1, n.length - 1)), n = B(n, !0), {
1310
686
  type: "codespan",
1311
687
  raw: t[0],
1312
688
  text: n
@@ -1334,12 +710,12 @@ class $t {
1334
710
  autolink(e) {
1335
711
  const t = this.rules.inline.autolink.exec(e);
1336
712
  if (t) {
1337
- let n, r;
1338
- return t[2] === "@" ? (n = J(t[1]), r = "mailto:" + n) : (n = J(t[1]), r = n), {
713
+ let n, i;
714
+ return t[2] === "@" ? (n = B(t[1]), i = "mailto:" + n) : (n = B(t[1]), i = n), {
1339
715
  type: "link",
1340
716
  raw: t[0],
1341
717
  text: n,
1342
- href: r,
718
+ href: i,
1343
719
  tokens: [
1344
720
  {
1345
721
  type: "text",
@@ -1354,26 +730,26 @@ class $t {
1354
730
  var n;
1355
731
  let t;
1356
732
  if (t = this.rules.inline.url.exec(e)) {
1357
- let r, a;
733
+ let i, o;
1358
734
  if (t[2] === "@")
1359
- r = J(t[0]), a = "mailto:" + r;
735
+ i = B(t[0]), o = "mailto:" + i;
1360
736
  else {
1361
- let s;
737
+ let r;
1362
738
  do
1363
- s = t[0], t[0] = ((n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) ?? "";
1364
- while (s !== t[0]);
1365
- r = J(t[0]), t[1] === "www." ? a = "http://" + t[0] : a = t[0];
739
+ r = t[0], t[0] = ((n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) ?? "";
740
+ while (r !== t[0]);
741
+ i = B(t[0]), t[1] === "www." ? o = "http://" + t[0] : o = t[0];
1366
742
  }
1367
743
  return {
1368
744
  type: "link",
1369
745
  raw: t[0],
1370
- text: r,
1371
- href: a,
746
+ text: i,
747
+ href: o,
1372
748
  tokens: [
1373
749
  {
1374
750
  type: "text",
1375
- raw: r,
1376
- text: r
751
+ raw: i,
752
+ text: i
1377
753
  }
1378
754
  ]
1379
755
  };
@@ -1383,7 +759,7 @@ class $t {
1383
759
  const t = this.rules.inline.text.exec(e);
1384
760
  if (t) {
1385
761
  let n;
1386
- return this.lexer.state.inRawBlock ? n = t[0] : n = J(t[0]), {
762
+ return this.lexer.state.inRawBlock ? n = t[0] : n = B(t[0]), {
1387
763
  type: "text",
1388
764
  raw: t[0],
1389
765
  text: n
@@ -1391,118 +767,118 @@ class $t {
1391
767
  }
1392
768
  }
1393
769
  }
1394
- const Sr = /^(?: *(?:\n|$))+/, Or = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Cr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, bt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Lr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Un = /(?:[*+-]|\d{1,9}[.)])/, Hn = P(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Un).getRegex(), un = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ir = /^[^\n]+/, fn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Dr = P(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", fn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pr = P(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Un).getRegex(), Ht = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", pn = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, Nr = P("^ {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", pn).replace("tag", Ht).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Bn = P(un).replace("hr", bt).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", Ht).getRegex(), Mr = P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Bn).getRegex(), hn = {
1395
- blockquote: Mr,
1396
- code: Or,
1397
- def: Dr,
1398
- fences: Cr,
1399
- heading: Lr,
1400
- hr: bt,
1401
- html: Nr,
1402
- lheading: Hn,
1403
- list: Pr,
1404
- newline: Sr,
1405
- paragraph: Bn,
1406
- table: gt,
1407
- text: Ir
1408
- }, An = P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", bt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\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", Ht).getRegex(), jr = {
1409
- ...hn,
1410
- table: An,
1411
- paragraph: P(un).replace("hr", bt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", An).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", Ht).getRegex()
1412
- }, zr = {
1413
- ...hn,
1414
- html: P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", pn).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(),
770
+ const _i = /^(?: *(?:\n|$))+/, yi = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Ei = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Ie = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ai = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, xn = /(?:[*+-]|\d{1,9}[.)])/, _n = E(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, xn).getRegex(), yt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Si = /^[^\n]+/, Et = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Ri = E(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Et).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Li = E(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, xn).getRegex(), Ye = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", At = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, vi = E("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", At).replace("tag", Ye).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), yn = E(yt).replace("hr", Ie).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", Ye).getRegex(), Ii = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", yn).getRegex(), St = {
771
+ blockquote: Ii,
772
+ code: yi,
773
+ def: Ri,
774
+ fences: Ei,
775
+ heading: Ai,
776
+ hr: Ie,
777
+ html: vi,
778
+ lheading: _n,
779
+ list: Li,
780
+ newline: _i,
781
+ paragraph: yn,
782
+ table: Le,
783
+ text: Si
784
+ }, ln = E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Ie).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\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", Ye).getRegex(), Ci = {
785
+ ...St,
786
+ table: ln,
787
+ paragraph: E(yt).replace("hr", Ie).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ln).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", Ye).getRegex()
788
+ }, Oi = {
789
+ ...St,
790
+ html: E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", At).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(),
1415
791
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1416
792
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1417
- fences: gt,
793
+ fences: Le,
1418
794
  // fences not supported
1419
795
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1420
- paragraph: P(un).replace("hr", bt).replace("heading", ` *#{1,6} *[^
1421
- ]`).replace("lheading", Hn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1422
- }, Wn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, $r = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Gn = /^( {2,}|\\)\n(?!\s*$)/, Fr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, xt = "\\p{P}$+<=>`^|~", Ur = P(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, xt).getRegex(), Hr = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Br = P(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, xt).getRegex(), Wr = P("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, xt).getRegex(), Gr = P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, xt).getRegex(), Yr = P(/\\([punct])/, "gu").replace(/punct/g, xt).getRegex(), Vr = P(/^<(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(), qr = P(pn).replace("(?:-->|$)", "-->").getRegex(), Zr = P("^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", qr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ft = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Xr = P(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Ft).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Yn = P(/^!?\[(label)\]\[(ref)\]/).replace("label", Ft).replace("ref", fn).getRegex(), Vn = P(/^!?\[(ref)\](?:\[\])?/).replace("ref", fn).getRegex(), Kr = P("reflink|nolink(?!\\()", "g").replace("reflink", Yn).replace("nolink", Vn).getRegex(), dn = {
1423
- _backpedal: gt,
796
+ paragraph: E(yt).replace("hr", Ie).replace("heading", ` *#{1,6} *[^
797
+ ]`).replace("lheading", _n).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
798
+ }, En = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Di = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, An = /^( {2,}|\\)\n(?!\s*$)/, Ni = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ce = "\\p{P}$+<=>`^|~", Mi = E(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ce).getRegex(), zi = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Pi = E(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ce).getRegex(), $i = E("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ce).getRegex(), Ui = E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ce).getRegex(), Fi = E(/\\([punct])/, "gu").replace(/punct/g, Ce).getRegex(), Hi = E(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Bi = E(At).replace("(?:-->|$)", "-->").getRegex(), Wi = E("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Bi).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), qe = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, ji = E(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", qe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Sn = E(/^!?\[(label)\]\[(ref)\]/).replace("label", qe).replace("ref", Et).getRegex(), Rn = E(/^!?\[(ref)\](?:\[\])?/).replace("ref", Et).getRegex(), Gi = E("reflink|nolink(?!\\()", "g").replace("reflink", Sn).replace("nolink", Rn).getRegex(), Rt = {
799
+ _backpedal: Le,
1424
800
  // only used for GFM url
1425
- anyPunctuation: Yr,
1426
- autolink: Vr,
1427
- blockSkip: Hr,
1428
- br: Gn,
1429
- code: $r,
1430
- del: gt,
1431
- emStrongLDelim: Br,
1432
- emStrongRDelimAst: Wr,
1433
- emStrongRDelimUnd: Gr,
1434
- escape: Wn,
1435
- link: Xr,
1436
- nolink: Vn,
1437
- punctuation: Ur,
1438
- reflink: Yn,
1439
- reflinkSearch: Kr,
1440
- tag: Zr,
1441
- text: Fr,
1442
- url: gt
1443
- }, Qr = {
1444
- ...dn,
1445
- link: P(/^!?\[(label)\]\((.*?)\)/).replace("label", Ft).getRegex(),
1446
- reflink: P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ft).getRegex()
1447
- }, rn = {
1448
- ...dn,
1449
- escape: P(Wn).replace("])", "~|])").getRegex(),
1450
- url: P(/^((?: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(),
801
+ anyPunctuation: Fi,
802
+ autolink: Hi,
803
+ blockSkip: zi,
804
+ br: An,
805
+ code: Di,
806
+ del: Le,
807
+ emStrongLDelim: Pi,
808
+ emStrongRDelimAst: $i,
809
+ emStrongRDelimUnd: Ui,
810
+ escape: En,
811
+ link: ji,
812
+ nolink: Rn,
813
+ punctuation: Mi,
814
+ reflink: Sn,
815
+ reflinkSearch: Gi,
816
+ tag: Wi,
817
+ text: Ni,
818
+ url: Le
819
+ }, qi = {
820
+ ...Rt,
821
+ link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", qe).getRegex(),
822
+ reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", qe).getRegex()
823
+ }, kt = {
824
+ ...Rt,
825
+ escape: E(En).replace("])", "~|])").getRegex(),
826
+ url: E(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
1451
827
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1452
828
  del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
1453
829
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
1454
- }, Jr = {
1455
- ...rn,
1456
- br: P(Gn).replace("{2,}", "*").getRegex(),
1457
- text: P(rn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1458
- }, Nt = {
1459
- normal: hn,
1460
- gfm: jr,
1461
- pedantic: zr
1462
- }, ut = {
1463
- normal: dn,
1464
- gfm: rn,
1465
- breaks: Jr,
1466
- pedantic: Qr
830
+ }, Zi = {
831
+ ...kt,
832
+ br: E(An).replace("{2,}", "*").getRegex(),
833
+ text: E(kt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
834
+ }, He = {
835
+ normal: St,
836
+ gfm: Ci,
837
+ pedantic: Oi
838
+ }, _e = {
839
+ normal: Rt,
840
+ gfm: kt,
841
+ breaks: Zi,
842
+ pedantic: qi
1467
843
  };
1468
- class he {
844
+ class Q {
1469
845
  constructor(e) {
1470
- j(this, "tokens");
1471
- j(this, "options");
1472
- j(this, "state");
1473
- j(this, "tokenizer");
1474
- j(this, "inlineQueue");
1475
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Me, this.options.tokenizer = this.options.tokenizer || new $t(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
846
+ A(this, "tokens");
847
+ A(this, "options");
848
+ A(this, "state");
849
+ A(this, "tokenizer");
850
+ A(this, "inlineQueue");
851
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ue, this.options.tokenizer = this.options.tokenizer || new Ge(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1476
852
  inLink: !1,
1477
853
  inRawBlock: !1,
1478
854
  top: !0
1479
855
  };
1480
856
  const t = {
1481
- block: Nt.normal,
1482
- inline: ut.normal
857
+ block: He.normal,
858
+ inline: _e.normal
1483
859
  };
1484
- this.options.pedantic ? (t.block = Nt.pedantic, t.inline = ut.pedantic) : this.options.gfm && (t.block = Nt.gfm, this.options.breaks ? t.inline = ut.breaks : t.inline = ut.gfm), this.tokenizer.rules = t;
860
+ this.options.pedantic ? (t.block = He.pedantic, t.inline = _e.pedantic) : this.options.gfm && (t.block = He.gfm, this.options.breaks ? t.inline = _e.breaks : t.inline = _e.gfm), this.tokenizer.rules = t;
1485
861
  }
1486
862
  /**
1487
863
  * Expose Rules
1488
864
  */
1489
865
  static get rules() {
1490
866
  return {
1491
- block: Nt,
1492
- inline: ut
867
+ block: He,
868
+ inline: _e
1493
869
  };
1494
870
  }
1495
871
  /**
1496
872
  * Static Lex Method
1497
873
  */
1498
874
  static lex(e, t) {
1499
- return new he(t).lex(e);
875
+ return new Q(t).lex(e);
1500
876
  }
1501
877
  /**
1502
878
  * Static Lex Inline Method
1503
879
  */
1504
880
  static lexInline(e, t) {
1505
- return new he(t).inlineTokens(e);
881
+ return new Q(t).inlineTokens(e);
1506
882
  }
1507
883
  /**
1508
884
  * Preprocessing
@@ -1517,19 +893,19 @@ class he {
1517
893
  return this.inlineQueue = [], this.tokens;
1518
894
  }
1519
895
  blockTokens(e, t = []) {
1520
- this.options.pedantic ? e = e.replace(/\t/g, " ").replace(/^ +$/gm, "") : e = e.replace(/^( *)(\t+)/gm, (c, u, x) => u + " ".repeat(x.length));
1521
- let n, r, a, s;
896
+ this.options.pedantic ? e = e.replace(/\t/g, " ").replace(/^ +$/gm, "") : e = e.replace(/^( *)(\t+)/gm, (a, c, g) => c + " ".repeat(g.length));
897
+ let n, i, o, r;
1522
898
  for (; e; )
1523
- if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((c) => (n = c.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
899
+ if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((a) => (n = a.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
1524
900
  if (n = this.tokenizer.space(e)) {
1525
901
  e = e.substring(n.raw.length), n.raw.length === 1 && t.length > 0 ? t[t.length - 1].raw += `
1526
902
  ` : t.push(n);
1527
903
  continue;
1528
904
  }
1529
905
  if (n = this.tokenizer.code(e)) {
1530
- e = e.substring(n.raw.length), r = t[t.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += `
1531
- ` + n.raw, r.text += `
1532
- ` + n.text, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : t.push(n);
906
+ e = e.substring(n.raw.length), i = t[t.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
907
+ ` + n.raw, i.text += `
908
+ ` + n.text, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n);
1533
909
  continue;
1534
910
  }
1535
911
  if (n = this.tokenizer.fences(e)) {
@@ -1557,9 +933,9 @@ class he {
1557
933
  continue;
1558
934
  }
1559
935
  if (n = this.tokenizer.def(e)) {
1560
- e = e.substring(n.raw.length), r = t[t.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += `
1561
- ` + n.raw, r.text += `
1562
- ` + n.raw, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : this.tokens.links[n.tag] || (this.tokens.links[n.tag] = {
936
+ e = e.substring(n.raw.length), i = t[t.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
937
+ ` + n.raw, i.text += `
938
+ ` + n.raw, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : this.tokens.links[n.tag] || (this.tokens.links[n.tag] = {
1563
939
  href: n.href,
1564
940
  title: n.title
1565
941
  });
@@ -1573,33 +949,33 @@ class he {
1573
949
  e = e.substring(n.raw.length), t.push(n);
1574
950
  continue;
1575
951
  }
1576
- if (a = e, this.options.extensions && this.options.extensions.startBlock) {
1577
- let c = 1 / 0;
1578
- const u = e.slice(1);
1579
- let x;
1580
- this.options.extensions.startBlock.forEach((h) => {
1581
- x = h.call({ lexer: this }, u), typeof x == "number" && x >= 0 && (c = Math.min(c, x));
1582
- }), c < 1 / 0 && c >= 0 && (a = e.substring(0, c + 1));
1583
- }
1584
- if (this.state.top && (n = this.tokenizer.paragraph(a))) {
1585
- r = t[t.length - 1], s && r.type === "paragraph" ? (r.raw += `
1586
- ` + n.raw, r.text += `
1587
- ` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : t.push(n), s = a.length !== e.length, e = e.substring(n.raw.length);
952
+ if (o = e, this.options.extensions && this.options.extensions.startBlock) {
953
+ let a = 1 / 0;
954
+ const c = e.slice(1);
955
+ let g;
956
+ this.options.extensions.startBlock.forEach((f) => {
957
+ g = f.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (a = Math.min(a, g));
958
+ }), a < 1 / 0 && a >= 0 && (o = e.substring(0, a + 1));
959
+ }
960
+ if (this.state.top && (n = this.tokenizer.paragraph(o))) {
961
+ i = t[t.length - 1], r && i.type === "paragraph" ? (i.raw += `
962
+ ` + n.raw, i.text += `
963
+ ` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n), r = o.length !== e.length, e = e.substring(n.raw.length);
1588
964
  continue;
1589
965
  }
1590
966
  if (n = this.tokenizer.text(e)) {
1591
- e = e.substring(n.raw.length), r = t[t.length - 1], r && r.type === "text" ? (r.raw += `
1592
- ` + n.raw, r.text += `
1593
- ` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : t.push(n);
967
+ e = e.substring(n.raw.length), i = t[t.length - 1], i && i.type === "text" ? (i.raw += `
968
+ ` + n.raw, i.text += `
969
+ ` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n);
1594
970
  continue;
1595
971
  }
1596
972
  if (e) {
1597
- const c = "Infinite loop on byte: " + e.charCodeAt(0);
973
+ const a = "Infinite loop on byte: " + e.charCodeAt(0);
1598
974
  if (this.options.silent) {
1599
- console.error(c);
975
+ console.error(a);
1600
976
  break;
1601
977
  } else
1602
- throw new Error(c);
978
+ throw new Error(a);
1603
979
  }
1604
980
  }
1605
981
  return this.state.top = !0, t;
@@ -1611,25 +987,25 @@ class he {
1611
987
  * Lexing/Compiling
1612
988
  */
1613
989
  inlineTokens(e, t = []) {
1614
- let n, r, a, s = e, c, u, x;
990
+ let n, i, o, r = e, a, c, g;
1615
991
  if (this.tokens.links) {
1616
- const h = Object.keys(this.tokens.links);
1617
- if (h.length > 0)
1618
- for (; (c = this.tokenizer.rules.inline.reflinkSearch.exec(s)) != null; )
1619
- h.includes(c[0].slice(c[0].lastIndexOf("[") + 1, -1)) && (s = s.slice(0, c.index) + "[" + "a".repeat(c[0].length - 2) + "]" + s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1620
- }
1621
- for (; (c = this.tokenizer.rules.inline.blockSkip.exec(s)) != null; )
1622
- s = s.slice(0, c.index) + "[" + "a".repeat(c[0].length - 2) + "]" + s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1623
- for (; (c = this.tokenizer.rules.inline.anyPunctuation.exec(s)) != null; )
1624
- s = s.slice(0, c.index) + "++" + s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
992
+ const f = Object.keys(this.tokens.links);
993
+ if (f.length > 0)
994
+ for (; (a = this.tokenizer.rules.inline.reflinkSearch.exec(r)) != null; )
995
+ f.includes(a[0].slice(a[0].lastIndexOf("[") + 1, -1)) && (r = r.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
996
+ }
997
+ for (; (a = this.tokenizer.rules.inline.blockSkip.exec(r)) != null; )
998
+ r = r.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
999
+ for (; (a = this.tokenizer.rules.inline.anyPunctuation.exec(r)) != null; )
1000
+ r = r.slice(0, a.index) + "++" + r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1625
1001
  for (; e; )
1626
- if (u || (x = ""), u = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((h) => (n = h.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
1002
+ if (c || (g = ""), c = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((f) => (n = f.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
1627
1003
  if (n = this.tokenizer.escape(e)) {
1628
1004
  e = e.substring(n.raw.length), t.push(n);
1629
1005
  continue;
1630
1006
  }
1631
1007
  if (n = this.tokenizer.tag(e)) {
1632
- e = e.substring(n.raw.length), r = t[t.length - 1], r && n.type === "text" && r.type === "text" ? (r.raw += n.raw, r.text += n.text) : t.push(n);
1008
+ e = e.substring(n.raw.length), i = t[t.length - 1], i && n.type === "text" && i.type === "text" ? (i.raw += n.raw, i.text += n.text) : t.push(n);
1633
1009
  continue;
1634
1010
  }
1635
1011
  if (n = this.tokenizer.link(e)) {
@@ -1637,10 +1013,10 @@ class he {
1637
1013
  continue;
1638
1014
  }
1639
1015
  if (n = this.tokenizer.reflink(e, this.tokens.links)) {
1640
- e = e.substring(n.raw.length), r = t[t.length - 1], r && n.type === "text" && r.type === "text" ? (r.raw += n.raw, r.text += n.text) : t.push(n);
1016
+ e = e.substring(n.raw.length), i = t[t.length - 1], i && n.type === "text" && i.type === "text" ? (i.raw += n.raw, i.text += n.text) : t.push(n);
1641
1017
  continue;
1642
1018
  }
1643
- if (n = this.tokenizer.emStrong(e, s, x)) {
1019
+ if (n = this.tokenizer.emStrong(e, r, g)) {
1644
1020
  e = e.substring(n.raw.length), t.push(n);
1645
1021
  continue;
1646
1022
  }
@@ -1664,41 +1040,41 @@ class he {
1664
1040
  e = e.substring(n.raw.length), t.push(n);
1665
1041
  continue;
1666
1042
  }
1667
- if (a = e, this.options.extensions && this.options.extensions.startInline) {
1668
- let h = 1 / 0;
1669
- const w = e.slice(1);
1670
- let g;
1671
- this.options.extensions.startInline.forEach((E) => {
1672
- g = E.call({ lexer: this }, w), typeof g == "number" && g >= 0 && (h = Math.min(h, g));
1673
- }), h < 1 / 0 && h >= 0 && (a = e.substring(0, h + 1));
1043
+ if (o = e, this.options.extensions && this.options.extensions.startInline) {
1044
+ let f = 1 / 0;
1045
+ const T = e.slice(1);
1046
+ let h;
1047
+ this.options.extensions.startInline.forEach((b) => {
1048
+ h = b.call({ lexer: this }, T), typeof h == "number" && h >= 0 && (f = Math.min(f, h));
1049
+ }), f < 1 / 0 && f >= 0 && (o = e.substring(0, f + 1));
1674
1050
  }
1675
- if (n = this.tokenizer.inlineText(a)) {
1676
- e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (x = n.raw.slice(-1)), u = !0, r = t[t.length - 1], r && r.type === "text" ? (r.raw += n.raw, r.text += n.text) : t.push(n);
1051
+ if (n = this.tokenizer.inlineText(o)) {
1052
+ e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (g = n.raw.slice(-1)), c = !0, i = t[t.length - 1], i && i.type === "text" ? (i.raw += n.raw, i.text += n.text) : t.push(n);
1677
1053
  continue;
1678
1054
  }
1679
1055
  if (e) {
1680
- const h = "Infinite loop on byte: " + e.charCodeAt(0);
1056
+ const f = "Infinite loop on byte: " + e.charCodeAt(0);
1681
1057
  if (this.options.silent) {
1682
- console.error(h);
1058
+ console.error(f);
1683
1059
  break;
1684
1060
  } else
1685
- throw new Error(h);
1061
+ throw new Error(f);
1686
1062
  }
1687
1063
  }
1688
1064
  return t;
1689
1065
  }
1690
1066
  }
1691
- class Ut {
1067
+ class Ze {
1692
1068
  constructor(e) {
1693
- j(this, "options");
1694
- this.options = e || Me;
1069
+ A(this, "options");
1070
+ this.options = e || ue;
1695
1071
  }
1696
1072
  code(e, t, n) {
1697
- var a;
1698
- const r = (a = (t || "").match(/^\S*/)) == null ? void 0 : a[0];
1073
+ var o;
1074
+ const i = (o = (t || "").match(/^\S*/)) == null ? void 0 : o[0];
1699
1075
  return e = e.replace(/\n$/, "") + `
1700
- `, r ? '<pre><code class="language-' + J(r) + '">' + (n ? e : J(e, !0)) + `</code></pre>
1701
- ` : "<pre><code>" + (n ? e : J(e, !0)) + `</code></pre>
1076
+ `, i ? '<pre><code class="language-' + B(i) + '">' + (n ? e : B(e, !0)) + `</code></pre>
1077
+ ` : "<pre><code>" + (n ? e : B(e, !0)) + `</code></pre>
1702
1078
  `;
1703
1079
  }
1704
1080
  blockquote(e) {
@@ -1718,9 +1094,9 @@ ${e}</blockquote>
1718
1094
  `;
1719
1095
  }
1720
1096
  list(e, t, n) {
1721
- const r = t ? "ol" : "ul", a = t && n !== 1 ? ' start="' + n + '"' : "";
1722
- return "<" + r + a + `>
1723
- ` + e + "</" + r + `>
1097
+ const i = t ? "ol" : "ul", o = t && n !== 1 ? ' start="' + n + '"' : "";
1098
+ return "<" + i + o + `>
1099
+ ` + e + "</" + i + `>
1724
1100
  `;
1725
1101
  }
1726
1102
  listitem(e, t, n) {
@@ -1770,26 +1146,26 @@ ${e}</tr>
1770
1146
  return `<del>${e}</del>`;
1771
1147
  }
1772
1148
  link(e, t, n) {
1773
- const r = En(e);
1774
- if (r === null)
1149
+ const i = rn(e);
1150
+ if (i === null)
1775
1151
  return n;
1776
- e = r;
1777
- let a = '<a href="' + e + '"';
1778
- return t && (a += ' title="' + t + '"'), a += ">" + n + "</a>", a;
1152
+ e = i;
1153
+ let o = '<a href="' + e + '"';
1154
+ return t && (o += ' title="' + t + '"'), o += ">" + n + "</a>", o;
1779
1155
  }
1780
1156
  image(e, t, n) {
1781
- const r = En(e);
1782
- if (r === null)
1157
+ const i = rn(e);
1158
+ if (i === null)
1783
1159
  return n;
1784
- e = r;
1785
- let a = `<img src="${e}" alt="${n}"`;
1786
- return t && (a += ` title="${t}"`), a += ">", a;
1160
+ e = i;
1161
+ let o = `<img src="${e}" alt="${n}"`;
1162
+ return t && (o += ` title="${t}"`), o += ">", o;
1787
1163
  }
1788
1164
  text(e) {
1789
1165
  return e;
1790
1166
  }
1791
1167
  }
1792
- class mn {
1168
+ class Lt {
1793
1169
  // no need for block level renderers
1794
1170
  strong(e) {
1795
1171
  return e;
@@ -1819,40 +1195,40 @@ class mn {
1819
1195
  return "";
1820
1196
  }
1821
1197
  }
1822
- class de {
1198
+ class K {
1823
1199
  constructor(e) {
1824
- j(this, "options");
1825
- j(this, "renderer");
1826
- j(this, "textRenderer");
1827
- this.options = e || Me, this.options.renderer = this.options.renderer || new Ut(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new mn();
1200
+ A(this, "options");
1201
+ A(this, "renderer");
1202
+ A(this, "textRenderer");
1203
+ this.options = e || ue, this.options.renderer = this.options.renderer || new Ze(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Lt();
1828
1204
  }
1829
1205
  /**
1830
1206
  * Static Parse Method
1831
1207
  */
1832
1208
  static parse(e, t) {
1833
- return new de(t).parse(e);
1209
+ return new K(t).parse(e);
1834
1210
  }
1835
1211
  /**
1836
1212
  * Static Parse Inline Method
1837
1213
  */
1838
1214
  static parseInline(e, t) {
1839
- return new de(t).parseInline(e);
1215
+ return new K(t).parseInline(e);
1840
1216
  }
1841
1217
  /**
1842
1218
  * Parse Loop
1843
1219
  */
1844
1220
  parse(e, t = !0) {
1845
1221
  let n = "";
1846
- for (let r = 0; r < e.length; r++) {
1847
- const a = e[r];
1848
- if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[a.type]) {
1849
- const s = a, c = this.options.extensions.renderers[s.type].call({ parser: this }, s);
1850
- if (c !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(s.type)) {
1851
- n += c || "";
1222
+ for (let i = 0; i < e.length; i++) {
1223
+ const o = e[i];
1224
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type]) {
1225
+ const r = o, a = this.options.extensions.renderers[r.type].call({ parser: this }, r);
1226
+ if (a !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(r.type)) {
1227
+ n += a || "";
1852
1228
  continue;
1853
1229
  }
1854
1230
  }
1855
- switch (a.type) {
1231
+ switch (o.type) {
1856
1232
  case "space":
1857
1233
  continue;
1858
1234
  case "hr": {
@@ -1860,78 +1236,78 @@ class de {
1860
1236
  continue;
1861
1237
  }
1862
1238
  case "heading": {
1863
- const s = a;
1864
- n += this.renderer.heading(this.parseInline(s.tokens), s.depth, Er(this.parseInline(s.tokens, this.textRenderer)));
1239
+ const r = o;
1240
+ n += this.renderer.heading(this.parseInline(r.tokens), r.depth, bi(this.parseInline(r.tokens, this.textRenderer)));
1865
1241
  continue;
1866
1242
  }
1867
1243
  case "code": {
1868
- const s = a;
1869
- n += this.renderer.code(s.text, s.lang, !!s.escaped);
1244
+ const r = o;
1245
+ n += this.renderer.code(r.text, r.lang, !!r.escaped);
1870
1246
  continue;
1871
1247
  }
1872
1248
  case "table": {
1873
- const s = a;
1874
- let c = "", u = "";
1875
- for (let h = 0; h < s.header.length; h++)
1876
- u += this.renderer.tablecell(this.parseInline(s.header[h].tokens), { header: !0, align: s.align[h] });
1877
- c += this.renderer.tablerow(u);
1878
- let x = "";
1879
- for (let h = 0; h < s.rows.length; h++) {
1880
- const w = s.rows[h];
1881
- u = "";
1882
- for (let g = 0; g < w.length; g++)
1883
- u += this.renderer.tablecell(this.parseInline(w[g].tokens), { header: !1, align: s.align[g] });
1884
- x += this.renderer.tablerow(u);
1249
+ const r = o;
1250
+ let a = "", c = "";
1251
+ for (let f = 0; f < r.header.length; f++)
1252
+ c += this.renderer.tablecell(this.parseInline(r.header[f].tokens), { header: !0, align: r.align[f] });
1253
+ a += this.renderer.tablerow(c);
1254
+ let g = "";
1255
+ for (let f = 0; f < r.rows.length; f++) {
1256
+ const T = r.rows[f];
1257
+ c = "";
1258
+ for (let h = 0; h < T.length; h++)
1259
+ c += this.renderer.tablecell(this.parseInline(T[h].tokens), { header: !1, align: r.align[h] });
1260
+ g += this.renderer.tablerow(c);
1885
1261
  }
1886
- n += this.renderer.table(c, x);
1262
+ n += this.renderer.table(a, g);
1887
1263
  continue;
1888
1264
  }
1889
1265
  case "blockquote": {
1890
- const s = a, c = this.parse(s.tokens);
1891
- n += this.renderer.blockquote(c);
1266
+ const r = o, a = this.parse(r.tokens);
1267
+ n += this.renderer.blockquote(a);
1892
1268
  continue;
1893
1269
  }
1894
1270
  case "list": {
1895
- const s = a, c = s.ordered, u = s.start, x = s.loose;
1896
- let h = "";
1897
- for (let w = 0; w < s.items.length; w++) {
1898
- const g = s.items[w], E = g.checked, T = g.task;
1899
- let m = "";
1900
- if (g.task) {
1901
- const O = this.renderer.checkbox(!!E);
1902
- x ? g.tokens.length > 0 && g.tokens[0].type === "paragraph" ? (g.tokens[0].text = O + " " + g.tokens[0].text, g.tokens[0].tokens && g.tokens[0].tokens.length > 0 && g.tokens[0].tokens[0].type === "text" && (g.tokens[0].tokens[0].text = O + " " + g.tokens[0].tokens[0].text)) : g.tokens.unshift({
1271
+ const r = o, a = r.ordered, c = r.start, g = r.loose;
1272
+ let f = "";
1273
+ for (let T = 0; T < r.items.length; T++) {
1274
+ const h = r.items[T], b = h.checked, m = h.task;
1275
+ let p = "";
1276
+ if (h.task) {
1277
+ const _ = this.renderer.checkbox(!!b);
1278
+ g ? h.tokens.length > 0 && h.tokens[0].type === "paragraph" ? (h.tokens[0].text = _ + " " + h.tokens[0].text, h.tokens[0].tokens && h.tokens[0].tokens.length > 0 && h.tokens[0].tokens[0].type === "text" && (h.tokens[0].tokens[0].text = _ + " " + h.tokens[0].tokens[0].text)) : h.tokens.unshift({
1903
1279
  type: "text",
1904
- text: O + " "
1905
- }) : m += O + " ";
1280
+ text: _ + " "
1281
+ }) : p += _ + " ";
1906
1282
  }
1907
- m += this.parse(g.tokens, x), h += this.renderer.listitem(m, T, !!E);
1283
+ p += this.parse(h.tokens, g), f += this.renderer.listitem(p, m, !!b);
1908
1284
  }
1909
- n += this.renderer.list(h, c, u);
1285
+ n += this.renderer.list(f, a, c);
1910
1286
  continue;
1911
1287
  }
1912
1288
  case "html": {
1913
- const s = a;
1914
- n += this.renderer.html(s.text, s.block);
1289
+ const r = o;
1290
+ n += this.renderer.html(r.text, r.block);
1915
1291
  continue;
1916
1292
  }
1917
1293
  case "paragraph": {
1918
- const s = a;
1919
- n += this.renderer.paragraph(this.parseInline(s.tokens));
1294
+ const r = o;
1295
+ n += this.renderer.paragraph(this.parseInline(r.tokens));
1920
1296
  continue;
1921
1297
  }
1922
1298
  case "text": {
1923
- let s = a, c = s.tokens ? this.parseInline(s.tokens) : s.text;
1924
- for (; r + 1 < e.length && e[r + 1].type === "text"; )
1925
- s = e[++r], c += `
1926
- ` + (s.tokens ? this.parseInline(s.tokens) : s.text);
1927
- n += t ? this.renderer.paragraph(c) : c;
1299
+ let r = o, a = r.tokens ? this.parseInline(r.tokens) : r.text;
1300
+ for (; i + 1 < e.length && e[i + 1].type === "text"; )
1301
+ r = e[++i], a += `
1302
+ ` + (r.tokens ? this.parseInline(r.tokens) : r.text);
1303
+ n += t ? this.renderer.paragraph(a) : a;
1928
1304
  continue;
1929
1305
  }
1930
1306
  default: {
1931
- const s = 'Token with "' + a.type + '" type was not found.';
1307
+ const r = 'Token with "' + o.type + '" type was not found.';
1932
1308
  if (this.options.silent)
1933
- return console.error(s), "";
1934
- throw new Error(s);
1309
+ return console.error(r), "";
1310
+ throw new Error(r);
1935
1311
  }
1936
1312
  }
1937
1313
  }
@@ -1943,49 +1319,49 @@ class de {
1943
1319
  parseInline(e, t) {
1944
1320
  t = t || this.renderer;
1945
1321
  let n = "";
1946
- for (let r = 0; r < e.length; r++) {
1947
- const a = e[r];
1948
- if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[a.type]) {
1949
- const s = this.options.extensions.renderers[a.type].call({ parser: this }, a);
1950
- if (s !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(a.type)) {
1951
- n += s || "";
1322
+ for (let i = 0; i < e.length; i++) {
1323
+ const o = e[i];
1324
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type]) {
1325
+ const r = this.options.extensions.renderers[o.type].call({ parser: this }, o);
1326
+ if (r !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(o.type)) {
1327
+ n += r || "";
1952
1328
  continue;
1953
1329
  }
1954
1330
  }
1955
- switch (a.type) {
1331
+ switch (o.type) {
1956
1332
  case "escape": {
1957
- const s = a;
1958
- n += t.text(s.text);
1333
+ const r = o;
1334
+ n += t.text(r.text);
1959
1335
  break;
1960
1336
  }
1961
1337
  case "html": {
1962
- const s = a;
1963
- n += t.html(s.text);
1338
+ const r = o;
1339
+ n += t.html(r.text);
1964
1340
  break;
1965
1341
  }
1966
1342
  case "link": {
1967
- const s = a;
1968
- n += t.link(s.href, s.title, this.parseInline(s.tokens, t));
1343
+ const r = o;
1344
+ n += t.link(r.href, r.title, this.parseInline(r.tokens, t));
1969
1345
  break;
1970
1346
  }
1971
1347
  case "image": {
1972
- const s = a;
1973
- n += t.image(s.href, s.title, s.text);
1348
+ const r = o;
1349
+ n += t.image(r.href, r.title, r.text);
1974
1350
  break;
1975
1351
  }
1976
1352
  case "strong": {
1977
- const s = a;
1978
- n += t.strong(this.parseInline(s.tokens, t));
1353
+ const r = o;
1354
+ n += t.strong(this.parseInline(r.tokens, t));
1979
1355
  break;
1980
1356
  }
1981
1357
  case "em": {
1982
- const s = a;
1983
- n += t.em(this.parseInline(s.tokens, t));
1358
+ const r = o;
1359
+ n += t.em(this.parseInline(r.tokens, t));
1984
1360
  break;
1985
1361
  }
1986
1362
  case "codespan": {
1987
- const s = a;
1988
- n += t.codespan(s.text);
1363
+ const r = o;
1364
+ n += t.codespan(r.text);
1989
1365
  break;
1990
1366
  }
1991
1367
  case "br": {
@@ -1993,30 +1369,30 @@ class de {
1993
1369
  break;
1994
1370
  }
1995
1371
  case "del": {
1996
- const s = a;
1997
- n += t.del(this.parseInline(s.tokens, t));
1372
+ const r = o;
1373
+ n += t.del(this.parseInline(r.tokens, t));
1998
1374
  break;
1999
1375
  }
2000
1376
  case "text": {
2001
- const s = a;
2002
- n += t.text(s.text);
1377
+ const r = o;
1378
+ n += t.text(r.text);
2003
1379
  break;
2004
1380
  }
2005
1381
  default: {
2006
- const s = 'Token with "' + a.type + '" type was not found.';
1382
+ const r = 'Token with "' + o.type + '" type was not found.';
2007
1383
  if (this.options.silent)
2008
- return console.error(s), "";
2009
- throw new Error(s);
1384
+ return console.error(r), "";
1385
+ throw new Error(r);
2010
1386
  }
2011
1387
  }
2012
1388
  }
2013
1389
  return n;
2014
1390
  }
2015
1391
  }
2016
- class kt {
1392
+ class ve {
2017
1393
  constructor(e) {
2018
- j(this, "options");
2019
- this.options = e || Me;
1394
+ A(this, "options");
1395
+ this.options = e || ue;
2020
1396
  }
2021
1397
  /**
2022
1398
  * Process markdown before marked
@@ -2037,55 +1413,55 @@ class kt {
2037
1413
  return e;
2038
1414
  }
2039
1415
  }
2040
- j(kt, "passThroughHooks", /* @__PURE__ */ new Set([
1416
+ A(ve, "passThroughHooks", /* @__PURE__ */ new Set([
2041
1417
  "preprocess",
2042
1418
  "postprocess",
2043
1419
  "processAllTokens"
2044
1420
  ]));
2045
- var Ne, on, qn;
2046
- class ei {
1421
+ var ce, bt, Ln;
1422
+ class Yi {
2047
1423
  constructor(...e) {
2048
- xn(this, Ne);
2049
- j(this, "defaults", cn());
2050
- j(this, "options", this.setOptions);
2051
- j(this, "parse", Dt(this, Ne, on).call(this, he.lex, de.parse));
2052
- j(this, "parseInline", Dt(this, Ne, on).call(this, he.lexInline, de.parseInline));
2053
- j(this, "Parser", de);
2054
- j(this, "Renderer", Ut);
2055
- j(this, "TextRenderer", mn);
2056
- j(this, "Lexer", he);
2057
- j(this, "Tokenizer", $t);
2058
- j(this, "Hooks", kt);
1424
+ en(this, ce);
1425
+ A(this, "defaults", _t());
1426
+ A(this, "options", this.setOptions);
1427
+ A(this, "parse", Ue(this, ce, bt).call(this, Q.lex, K.parse));
1428
+ A(this, "parseInline", Ue(this, ce, bt).call(this, Q.lexInline, K.parseInline));
1429
+ A(this, "Parser", K);
1430
+ A(this, "Renderer", Ze);
1431
+ A(this, "TextRenderer", Lt);
1432
+ A(this, "Lexer", Q);
1433
+ A(this, "Tokenizer", Ge);
1434
+ A(this, "Hooks", ve);
2059
1435
  this.use(...e);
2060
1436
  }
2061
1437
  /**
2062
1438
  * Run callback for every token
2063
1439
  */
2064
1440
  walkTokens(e, t) {
2065
- var r, a;
1441
+ var i, o;
2066
1442
  let n = [];
2067
- for (const s of e)
2068
- switch (n = n.concat(t.call(this, s)), s.type) {
1443
+ for (const r of e)
1444
+ switch (n = n.concat(t.call(this, r)), r.type) {
2069
1445
  case "table": {
2070
- const c = s;
2071
- for (const u of c.header)
2072
- n = n.concat(this.walkTokens(u.tokens, t));
2073
- for (const u of c.rows)
2074
- for (const x of u)
2075
- n = n.concat(this.walkTokens(x.tokens, t));
1446
+ const a = r;
1447
+ for (const c of a.header)
1448
+ n = n.concat(this.walkTokens(c.tokens, t));
1449
+ for (const c of a.rows)
1450
+ for (const g of c)
1451
+ n = n.concat(this.walkTokens(g.tokens, t));
2076
1452
  break;
2077
1453
  }
2078
1454
  case "list": {
2079
- const c = s;
2080
- n = n.concat(this.walkTokens(c.items, t));
1455
+ const a = r;
1456
+ n = n.concat(this.walkTokens(a.items, t));
2081
1457
  break;
2082
1458
  }
2083
1459
  default: {
2084
- const c = s;
2085
- (a = (r = this.defaults.extensions) == null ? void 0 : r.childTokens) != null && a[c.type] ? this.defaults.extensions.childTokens[c.type].forEach((u) => {
2086
- const x = c[u].flat(1 / 0);
2087
- n = n.concat(this.walkTokens(x, t));
2088
- }) : c.tokens && (n = n.concat(this.walkTokens(c.tokens, t)));
1460
+ const a = r;
1461
+ (o = (i = this.defaults.extensions) == null ? void 0 : i.childTokens) != null && o[a.type] ? this.defaults.extensions.childTokens[a.type].forEach((c) => {
1462
+ const g = a[c].flat(1 / 0);
1463
+ n = n.concat(this.walkTokens(g, t));
1464
+ }) : a.tokens && (n = n.concat(this.walkTokens(a.tokens, t)));
2089
1465
  }
2090
1466
  }
2091
1467
  return n;
@@ -2093,297 +1469,297 @@ class ei {
2093
1469
  use(...e) {
2094
1470
  const t = this.defaults.extensions || { renderers: {}, childTokens: {} };
2095
1471
  return e.forEach((n) => {
2096
- const r = { ...n };
2097
- if (r.async = this.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((a) => {
2098
- if (!a.name)
1472
+ const i = { ...n };
1473
+ if (i.async = this.defaults.async || i.async || !1, n.extensions && (n.extensions.forEach((o) => {
1474
+ if (!o.name)
2099
1475
  throw new Error("extension name required");
2100
- if ("renderer" in a) {
2101
- const s = t.renderers[a.name];
2102
- s ? t.renderers[a.name] = function(...c) {
2103
- let u = a.renderer.apply(this, c);
2104
- return u === !1 && (u = s.apply(this, c)), u;
2105
- } : t.renderers[a.name] = a.renderer;
2106
- }
2107
- if ("tokenizer" in a) {
2108
- if (!a.level || a.level !== "block" && a.level !== "inline")
1476
+ if ("renderer" in o) {
1477
+ const r = t.renderers[o.name];
1478
+ r ? t.renderers[o.name] = function(...a) {
1479
+ let c = o.renderer.apply(this, a);
1480
+ return c === !1 && (c = r.apply(this, a)), c;
1481
+ } : t.renderers[o.name] = o.renderer;
1482
+ }
1483
+ if ("tokenizer" in o) {
1484
+ if (!o.level || o.level !== "block" && o.level !== "inline")
2109
1485
  throw new Error("extension level must be 'block' or 'inline'");
2110
- const s = t[a.level];
2111
- s ? s.unshift(a.tokenizer) : t[a.level] = [a.tokenizer], a.start && (a.level === "block" ? t.startBlock ? t.startBlock.push(a.start) : t.startBlock = [a.start] : a.level === "inline" && (t.startInline ? t.startInline.push(a.start) : t.startInline = [a.start]));
2112
- }
2113
- "childTokens" in a && a.childTokens && (t.childTokens[a.name] = a.childTokens);
2114
- }), r.extensions = t), n.renderer) {
2115
- const a = this.defaults.renderer || new Ut(this.defaults);
2116
- for (const s in n.renderer) {
2117
- if (!(s in a))
2118
- throw new Error(`renderer '${s}' does not exist`);
2119
- if (s === "options")
1486
+ const r = t[o.level];
1487
+ r ? r.unshift(o.tokenizer) : t[o.level] = [o.tokenizer], o.start && (o.level === "block" ? t.startBlock ? t.startBlock.push(o.start) : t.startBlock = [o.start] : o.level === "inline" && (t.startInline ? t.startInline.push(o.start) : t.startInline = [o.start]));
1488
+ }
1489
+ "childTokens" in o && o.childTokens && (t.childTokens[o.name] = o.childTokens);
1490
+ }), i.extensions = t), n.renderer) {
1491
+ const o = this.defaults.renderer || new Ze(this.defaults);
1492
+ for (const r in n.renderer) {
1493
+ if (!(r in o))
1494
+ throw new Error(`renderer '${r}' does not exist`);
1495
+ if (r === "options")
2120
1496
  continue;
2121
- const c = s, u = n.renderer[c], x = a[c];
2122
- a[c] = (...h) => {
2123
- let w = u.apply(a, h);
2124
- return w === !1 && (w = x.apply(a, h)), w || "";
1497
+ const a = r, c = n.renderer[a], g = o[a];
1498
+ o[a] = (...f) => {
1499
+ let T = c.apply(o, f);
1500
+ return T === !1 && (T = g.apply(o, f)), T || "";
2125
1501
  };
2126
1502
  }
2127
- r.renderer = a;
1503
+ i.renderer = o;
2128
1504
  }
2129
1505
  if (n.tokenizer) {
2130
- const a = this.defaults.tokenizer || new $t(this.defaults);
2131
- for (const s in n.tokenizer) {
2132
- if (!(s in a))
2133
- throw new Error(`tokenizer '${s}' does not exist`);
2134
- if (["options", "rules", "lexer"].includes(s))
1506
+ const o = this.defaults.tokenizer || new Ge(this.defaults);
1507
+ for (const r in n.tokenizer) {
1508
+ if (!(r in o))
1509
+ throw new Error(`tokenizer '${r}' does not exist`);
1510
+ if (["options", "rules", "lexer"].includes(r))
2135
1511
  continue;
2136
- const c = s, u = n.tokenizer[c], x = a[c];
2137
- a[c] = (...h) => {
2138
- let w = u.apply(a, h);
2139
- return w === !1 && (w = x.apply(a, h)), w;
1512
+ const a = r, c = n.tokenizer[a], g = o[a];
1513
+ o[a] = (...f) => {
1514
+ let T = c.apply(o, f);
1515
+ return T === !1 && (T = g.apply(o, f)), T;
2140
1516
  };
2141
1517
  }
2142
- r.tokenizer = a;
1518
+ i.tokenizer = o;
2143
1519
  }
2144
1520
  if (n.hooks) {
2145
- const a = this.defaults.hooks || new kt();
2146
- for (const s in n.hooks) {
2147
- if (!(s in a))
2148
- throw new Error(`hook '${s}' does not exist`);
2149
- if (s === "options")
1521
+ const o = this.defaults.hooks || new ve();
1522
+ for (const r in n.hooks) {
1523
+ if (!(r in o))
1524
+ throw new Error(`hook '${r}' does not exist`);
1525
+ if (r === "options")
2150
1526
  continue;
2151
- const c = s, u = n.hooks[c], x = a[c];
2152
- kt.passThroughHooks.has(s) ? a[c] = (h) => {
1527
+ const a = r, c = n.hooks[a], g = o[a];
1528
+ ve.passThroughHooks.has(r) ? o[a] = (f) => {
2153
1529
  if (this.defaults.async)
2154
- return Promise.resolve(u.call(a, h)).then((g) => x.call(a, g));
2155
- const w = u.call(a, h);
2156
- return x.call(a, w);
2157
- } : a[c] = (...h) => {
2158
- let w = u.apply(a, h);
2159
- return w === !1 && (w = x.apply(a, h)), w;
1530
+ return Promise.resolve(c.call(o, f)).then((h) => g.call(o, h));
1531
+ const T = c.call(o, f);
1532
+ return g.call(o, T);
1533
+ } : o[a] = (...f) => {
1534
+ let T = c.apply(o, f);
1535
+ return T === !1 && (T = g.apply(o, f)), T;
2160
1536
  };
2161
1537
  }
2162
- r.hooks = a;
1538
+ i.hooks = o;
2163
1539
  }
2164
1540
  if (n.walkTokens) {
2165
- const a = this.defaults.walkTokens, s = n.walkTokens;
2166
- r.walkTokens = function(c) {
2167
- let u = [];
2168
- return u.push(s.call(this, c)), a && (u = u.concat(a.call(this, c))), u;
1541
+ const o = this.defaults.walkTokens, r = n.walkTokens;
1542
+ i.walkTokens = function(a) {
1543
+ let c = [];
1544
+ return c.push(r.call(this, a)), o && (c = c.concat(o.call(this, a))), c;
2169
1545
  };
2170
1546
  }
2171
- this.defaults = { ...this.defaults, ...r };
1547
+ this.defaults = { ...this.defaults, ...i };
2172
1548
  }), this;
2173
1549
  }
2174
1550
  setOptions(e) {
2175
1551
  return this.defaults = { ...this.defaults, ...e }, this;
2176
1552
  }
2177
1553
  lexer(e, t) {
2178
- return he.lex(e, t ?? this.defaults);
1554
+ return Q.lex(e, t ?? this.defaults);
2179
1555
  }
2180
1556
  parser(e, t) {
2181
- return de.parse(e, t ?? this.defaults);
1557
+ return K.parse(e, t ?? this.defaults);
2182
1558
  }
2183
1559
  }
2184
- Ne = new WeakSet(), on = function(e, t) {
2185
- return (n, r) => {
2186
- const a = { ...r }, s = { ...this.defaults, ...a };
2187
- this.defaults.async === !0 && a.async === !1 && (s.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), s.async = !0);
2188
- const c = Dt(this, Ne, qn).call(this, !!s.silent, !!s.async);
1560
+ ce = new WeakSet(), bt = function(e, t) {
1561
+ return (n, i) => {
1562
+ const o = { ...i }, r = { ...this.defaults, ...o };
1563
+ this.defaults.async === !0 && o.async === !1 && (r.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), r.async = !0);
1564
+ const a = Ue(this, ce, Ln).call(this, !!r.silent, !!r.async);
2189
1565
  if (typeof n > "u" || n === null)
2190
- return c(new Error("marked(): input parameter is undefined or null"));
1566
+ return a(new Error("marked(): input parameter is undefined or null"));
2191
1567
  if (typeof n != "string")
2192
- return c(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
2193
- if (s.hooks && (s.hooks.options = s), s.async)
2194
- return Promise.resolve(s.hooks ? s.hooks.preprocess(n) : n).then((u) => e(u, s)).then((u) => s.hooks ? s.hooks.processAllTokens(u) : u).then((u) => s.walkTokens ? Promise.all(this.walkTokens(u, s.walkTokens)).then(() => u) : u).then((u) => t(u, s)).then((u) => s.hooks ? s.hooks.postprocess(u) : u).catch(c);
1568
+ return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1569
+ if (r.hooks && (r.hooks.options = r), r.async)
1570
+ return Promise.resolve(r.hooks ? r.hooks.preprocess(n) : n).then((c) => e(c, r)).then((c) => r.hooks ? r.hooks.processAllTokens(c) : c).then((c) => r.walkTokens ? Promise.all(this.walkTokens(c, r.walkTokens)).then(() => c) : c).then((c) => t(c, r)).then((c) => r.hooks ? r.hooks.postprocess(c) : c).catch(a);
2195
1571
  try {
2196
- s.hooks && (n = s.hooks.preprocess(n));
2197
- let u = e(n, s);
2198
- s.hooks && (u = s.hooks.processAllTokens(u)), s.walkTokens && this.walkTokens(u, s.walkTokens);
2199
- let x = t(u, s);
2200
- return s.hooks && (x = s.hooks.postprocess(x)), x;
2201
- } catch (u) {
2202
- return c(u);
1572
+ r.hooks && (n = r.hooks.preprocess(n));
1573
+ let c = e(n, r);
1574
+ r.hooks && (c = r.hooks.processAllTokens(c)), r.walkTokens && this.walkTokens(c, r.walkTokens);
1575
+ let g = t(c, r);
1576
+ return r.hooks && (g = r.hooks.postprocess(g)), g;
1577
+ } catch (c) {
1578
+ return a(c);
2203
1579
  }
2204
1580
  };
2205
- }, qn = function(e, t) {
1581
+ }, Ln = function(e, t) {
2206
1582
  return (n) => {
2207
1583
  if (n.message += `
2208
1584
  Please report this to https://github.com/markedjs/marked.`, e) {
2209
- const r = "<p>An error occurred:</p><pre>" + J(n.message + "", !0) + "</pre>";
2210
- return t ? Promise.resolve(r) : r;
1585
+ const i = "<p>An error occurred:</p><pre>" + B(n.message + "", !0) + "</pre>";
1586
+ return t ? Promise.resolve(i) : i;
2211
1587
  }
2212
1588
  if (t)
2213
1589
  return Promise.reject(n);
2214
1590
  throw n;
2215
1591
  };
2216
1592
  };
2217
- const Pe = new ei();
2218
- function D(l, e) {
2219
- return Pe.parse(l, e);
1593
+ const ae = new Yi();
1594
+ function y(l, e) {
1595
+ return ae.parse(l, e);
2220
1596
  }
2221
- D.options = D.setOptions = function(l) {
2222
- return Pe.setOptions(l), D.defaults = Pe.defaults, zn(D.defaults), D;
1597
+ y.options = y.setOptions = function(l) {
1598
+ return ae.setOptions(l), y.defaults = ae.defaults, bn(y.defaults), y;
2223
1599
  };
2224
- D.getDefaults = cn;
2225
- D.defaults = Me;
2226
- D.use = function(...l) {
2227
- return Pe.use(...l), D.defaults = Pe.defaults, zn(D.defaults), D;
1600
+ y.getDefaults = _t;
1601
+ y.defaults = ue;
1602
+ y.use = function(...l) {
1603
+ return ae.use(...l), y.defaults = ae.defaults, bn(y.defaults), y;
2228
1604
  };
2229
- D.walkTokens = function(l, e) {
2230
- return Pe.walkTokens(l, e);
1605
+ y.walkTokens = function(l, e) {
1606
+ return ae.walkTokens(l, e);
2231
1607
  };
2232
- D.parseInline = Pe.parseInline;
2233
- D.Parser = de;
2234
- D.parser = de.parse;
2235
- D.Renderer = Ut;
2236
- D.TextRenderer = mn;
2237
- D.Lexer = he;
2238
- D.lexer = he.lex;
2239
- D.Tokenizer = $t;
2240
- D.Hooks = kt;
2241
- D.parse = D;
2242
- D.options;
2243
- D.setOptions;
2244
- D.use;
2245
- D.walkTokens;
2246
- D.parseInline;
2247
- de.parse;
2248
- he.lex;
1608
+ y.parseInline = ae.parseInline;
1609
+ y.Parser = K;
1610
+ y.parser = K.parse;
1611
+ y.Renderer = Ze;
1612
+ y.TextRenderer = Lt;
1613
+ y.Lexer = Q;
1614
+ y.lexer = Q.lex;
1615
+ y.Tokenizer = Ge;
1616
+ y.Hooks = ve;
1617
+ y.parse = y;
1618
+ y.options;
1619
+ y.setOptions;
1620
+ y.use;
1621
+ y.walkTokens;
1622
+ y.parseInline;
1623
+ K.parse;
1624
+ Q.lex;
2249
1625
  /*! @license DOMPurify 3.3.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.3.1/LICENSE */
2250
1626
  const {
2251
- entries: Zn,
2252
- setPrototypeOf: Sn,
2253
- isFrozen: ti,
2254
- getPrototypeOf: ni,
2255
- getOwnPropertyDescriptor: ri
1627
+ entries: vn,
1628
+ setPrototypeOf: an,
1629
+ isFrozen: Vi,
1630
+ getPrototypeOf: Xi,
1631
+ getOwnPropertyDescriptor: Qi
2256
1632
  } = Object;
2257
1633
  let {
2258
- freeze: Z,
2259
- seal: re,
2260
- create: sn
1634
+ freeze: U,
1635
+ seal: j,
1636
+ create: Tt
2261
1637
  } = Object, {
2262
- apply: an,
2263
- construct: ln
1638
+ apply: wt,
1639
+ construct: xt
2264
1640
  } = typeof Reflect < "u" && Reflect;
2265
- Z || (Z = function(e) {
1641
+ U || (U = function(e) {
2266
1642
  return e;
2267
1643
  });
2268
- re || (re = function(e) {
1644
+ j || (j = function(e) {
2269
1645
  return e;
2270
1646
  });
2271
- an || (an = function(e, t) {
2272
- for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), a = 2; a < n; a++)
2273
- r[a - 2] = arguments[a];
2274
- return e.apply(t, r);
1647
+ wt || (wt = function(e, t) {
1648
+ for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++)
1649
+ i[o - 2] = arguments[o];
1650
+ return e.apply(t, i);
2275
1651
  });
2276
- ln || (ln = function(e) {
2277
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
2278
- n[r - 1] = arguments[r];
1652
+ xt || (xt = function(e) {
1653
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
1654
+ n[i - 1] = arguments[i];
2279
1655
  return new e(...n);
2280
1656
  });
2281
- const Mt = X(Array.prototype.forEach), ii = X(Array.prototype.lastIndexOf), On = X(Array.prototype.pop), ft = X(Array.prototype.push), oi = X(Array.prototype.splice), zt = X(String.prototype.toLowerCase), Xt = X(String.prototype.toString), Kt = X(String.prototype.match), pt = X(String.prototype.replace), si = X(String.prototype.indexOf), ai = X(String.prototype.trim), fe = X(Object.prototype.hasOwnProperty), q = X(RegExp.prototype.test), ht = li(TypeError);
2282
- function X(l) {
1657
+ const Be = F(Array.prototype.forEach), Ki = F(Array.prototype.lastIndexOf), cn = F(Array.prototype.pop), ye = F(Array.prototype.push), Ji = F(Array.prototype.splice), je = F(String.prototype.toLowerCase), pt = F(String.prototype.toString), ht = F(String.prototype.match), Ee = F(String.prototype.replace), er = F(String.prototype.indexOf), tr = F(String.prototype.trim), Z = F(Object.prototype.hasOwnProperty), P = F(RegExp.prototype.test), Ae = nr(TypeError);
1658
+ function F(l) {
2283
1659
  return function(e) {
2284
1660
  e instanceof RegExp && (e.lastIndex = 0);
2285
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
2286
- n[r - 1] = arguments[r];
2287
- return an(l, e, n);
1661
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
1662
+ n[i - 1] = arguments[i];
1663
+ return wt(l, e, n);
2288
1664
  };
2289
1665
  }
2290
- function li(l) {
1666
+ function nr(l) {
2291
1667
  return function() {
2292
1668
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
2293
1669
  t[n] = arguments[n];
2294
- return ln(l, t);
1670
+ return xt(l, t);
2295
1671
  };
2296
1672
  }
2297
- function R(l, e) {
2298
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : zt;
2299
- Sn && Sn(l, null);
1673
+ function x(l, e) {
1674
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : je;
1675
+ an && an(l, null);
2300
1676
  let n = e.length;
2301
1677
  for (; n--; ) {
2302
- let r = e[n];
2303
- if (typeof r == "string") {
2304
- const a = t(r);
2305
- a !== r && (ti(e) || (e[n] = a), r = a);
1678
+ let i = e[n];
1679
+ if (typeof i == "string") {
1680
+ const o = t(i);
1681
+ o !== i && (Vi(e) || (e[n] = o), i = o);
2306
1682
  }
2307
- l[r] = !0;
1683
+ l[i] = !0;
2308
1684
  }
2309
1685
  return l;
2310
1686
  }
2311
- function ci(l) {
1687
+ function ir(l) {
2312
1688
  for (let e = 0; e < l.length; e++)
2313
- fe(l, e) || (l[e] = null);
1689
+ Z(l, e) || (l[e] = null);
2314
1690
  return l;
2315
1691
  }
2316
- function pe(l) {
2317
- const e = sn(null);
2318
- for (const [t, n] of Zn(l))
2319
- fe(l, t) && (Array.isArray(n) ? e[t] = ci(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = pe(n) : e[t] = n);
1692
+ function X(l) {
1693
+ const e = Tt(null);
1694
+ for (const [t, n] of vn(l))
1695
+ Z(l, t) && (Array.isArray(n) ? e[t] = ir(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = X(n) : e[t] = n);
2320
1696
  return e;
2321
1697
  }
2322
- function dt(l, e) {
1698
+ function Se(l, e) {
2323
1699
  for (; l !== null; ) {
2324
- const n = ri(l, e);
1700
+ const n = Qi(l, e);
2325
1701
  if (n) {
2326
1702
  if (n.get)
2327
- return X(n.get);
1703
+ return F(n.get);
2328
1704
  if (typeof n.value == "function")
2329
- return X(n.value);
1705
+ return F(n.value);
2330
1706
  }
2331
- l = ni(l);
1707
+ l = Xi(l);
2332
1708
  }
2333
1709
  function t() {
2334
1710
  return null;
2335
1711
  }
2336
1712
  return t;
2337
1713
  }
2338
- const Cn = 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"]), Qt = 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"]), Jt = 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"]), ui = 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"]), en = 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"]), fi = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ln = Z(["#text"]), In = 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", "slot"]), tn = 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"]), Dn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), jt = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), pi = re(/\{\{[\w\W]*|[\w\W]*\}\}/gm), hi = re(/<%[\w\W]*|[\w\W]*%>/gm), di = re(/\$\{[\w\W]*/gm), mi = re(/^data-[\-\w.\u00B7-\uFFFF]+$/), gi = re(/^aria-[\-\w]+$/), Xn = re(
1714
+ const un = U(["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 = U(["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"]), dt = U(["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"]), rr = U(["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"]), mt = U(["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"]), sr = U(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), pn = U(["#text"]), hn = U(["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", "slot"]), gt = U(["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"]), fn = U(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), We = U(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), or = j(/\{\{[\w\W]*|[\w\W]*\}\}/gm), lr = j(/<%[\w\W]*|[\w\W]*%>/gm), ar = j(/\$\{[\w\W]*/gm), cr = j(/^data-[\-\w.\u00B7-\uFFFF]+$/), ur = j(/^aria-[\-\w]+$/), In = j(
2339
1715
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2340
1716
  // eslint-disable-line no-useless-escape
2341
- ), ki = re(/^(?:\w+script|data):/i), bi = re(
1717
+ ), pr = j(/^(?:\w+script|data):/i), hr = j(
2342
1718
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2343
1719
  // eslint-disable-line no-control-regex
2344
- ), Kn = re(/^html$/i), xi = re(/^[a-z][.\w]*(-[.\w]+)+$/i);
2345
- var Pn = /* @__PURE__ */ Object.freeze({
1720
+ ), Cn = j(/^html$/i), fr = j(/^[a-z][.\w]*(-[.\w]+)+$/i);
1721
+ var dn = /* @__PURE__ */ Object.freeze({
2346
1722
  __proto__: null,
2347
- ARIA_ATTR: gi,
2348
- ATTR_WHITESPACE: bi,
2349
- CUSTOM_ELEMENT: xi,
2350
- DATA_ATTR: mi,
2351
- DOCTYPE_NAME: Kn,
2352
- ERB_EXPR: hi,
2353
- IS_ALLOWED_URI: Xn,
2354
- IS_SCRIPT_OR_DATA: ki,
2355
- MUSTACHE_EXPR: pi,
2356
- TMPLIT_EXPR: di
1723
+ ARIA_ATTR: ur,
1724
+ ATTR_WHITESPACE: hr,
1725
+ CUSTOM_ELEMENT: fr,
1726
+ DATA_ATTR: cr,
1727
+ DOCTYPE_NAME: Cn,
1728
+ ERB_EXPR: lr,
1729
+ IS_ALLOWED_URI: In,
1730
+ IS_SCRIPT_OR_DATA: pr,
1731
+ MUSTACHE_EXPR: or,
1732
+ TMPLIT_EXPR: ar
2357
1733
  });
2358
- const mt = {
1734
+ const Re = {
2359
1735
  element: 1,
2360
1736
  text: 3,
2361
1737
  // Deprecated
2362
1738
  progressingInstruction: 7,
2363
1739
  comment: 8,
2364
1740
  document: 9
2365
- }, Ti = function() {
1741
+ }, dr = function() {
2366
1742
  return typeof window > "u" ? null : window;
2367
- }, wi = function(e, t) {
1743
+ }, mr = function(e, t) {
2368
1744
  if (typeof e != "object" || typeof e.createPolicy != "function")
2369
1745
  return null;
2370
1746
  let n = null;
2371
- const r = "data-tt-policy-suffix";
2372
- t && t.hasAttribute(r) && (n = t.getAttribute(r));
2373
- const a = "dompurify" + (n ? "#" + n : "");
1747
+ const i = "data-tt-policy-suffix";
1748
+ t && t.hasAttribute(i) && (n = t.getAttribute(i));
1749
+ const o = "dompurify" + (n ? "#" + n : "");
2374
1750
  try {
2375
- return e.createPolicy(a, {
2376
- createHTML(s) {
2377
- return s;
1751
+ return e.createPolicy(o, {
1752
+ createHTML(r) {
1753
+ return r;
2378
1754
  },
2379
- createScriptURL(s) {
2380
- return s;
1755
+ createScriptURL(r) {
1756
+ return r;
2381
1757
  }
2382
1758
  });
2383
1759
  } catch {
2384
- return console.warn("TrustedTypes policy " + a + " could not be created."), null;
1760
+ return console.warn("TrustedTypes policy " + o + " could not be created."), null;
2385
1761
  }
2386
- }, Nn = function() {
1762
+ }, mn = function() {
2387
1763
  return {
2388
1764
  afterSanitizeAttributes: [],
2389
1765
  afterSanitizeElements: [],
@@ -2396,57 +1772,57 @@ const mt = {
2396
1772
  uponSanitizeShadowNode: []
2397
1773
  };
2398
1774
  };
2399
- function Qn() {
2400
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ti();
2401
- const e = (d) => Qn(d);
2402
- if (e.version = "3.3.1", e.removed = [], !l || !l.document || l.document.nodeType !== mt.document || !l.Element)
1775
+ function On() {
1776
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : dr();
1777
+ const e = (k) => On(k);
1778
+ if (e.version = "3.3.1", e.removed = [], !l || !l.document || l.document.nodeType !== Re.document || !l.Element)
2403
1779
  return e.isSupported = !1, e;
2404
1780
  let {
2405
1781
  document: t
2406
1782
  } = l;
2407
- const n = t, r = n.currentScript, {
2408
- DocumentFragment: a,
2409
- HTMLTemplateElement: s,
2410
- Node: c,
2411
- Element: u,
2412
- NodeFilter: x,
2413
- NamedNodeMap: h = l.NamedNodeMap || l.MozNamedAttrMap,
2414
- HTMLFormElement: w,
2415
- DOMParser: g,
2416
- trustedTypes: E
2417
- } = l, T = u.prototype, m = dt(T, "cloneNode"), O = dt(T, "remove"), M = dt(T, "nextSibling"), N = dt(T, "childNodes"), K = dt(T, "parentNode");
2418
- if (typeof s == "function") {
2419
- const d = t.createElement("template");
2420
- d.content && d.content.ownerDocument && (t = d.content.ownerDocument);
2421
- }
2422
- let H, oe = "";
1783
+ const n = t, i = n.currentScript, {
1784
+ DocumentFragment: o,
1785
+ HTMLTemplateElement: r,
1786
+ Node: a,
1787
+ Element: c,
1788
+ NodeFilter: g,
1789
+ NamedNodeMap: f = l.NamedNodeMap || l.MozNamedAttrMap,
1790
+ HTMLFormElement: T,
1791
+ DOMParser: h,
1792
+ trustedTypes: b
1793
+ } = l, m = c.prototype, p = Se(m, "cloneNode"), _ = Se(m, "remove"), I = Se(m, "nextSibling"), q = Se(m, "childNodes"), W = Se(m, "parentNode");
1794
+ if (typeof r == "function") {
1795
+ const k = t.createElement("template");
1796
+ k.content && k.content.ownerDocument && (t = k.content.ownerDocument);
1797
+ }
1798
+ let C, J = "";
2423
1799
  const {
2424
1800
  implementation: Ve,
2425
- createNodeIterator: Bt,
2426
- createDocumentFragment: Wt,
2427
- getElementsByTagName: Tt
1801
+ createNodeIterator: Dn,
1802
+ createDocumentFragment: Nn,
1803
+ getElementsByTagName: Mn
2428
1804
  } = t, {
2429
- importNode: Gt
1805
+ importNode: zn
2430
1806
  } = n;
2431
- let W = Nn();
2432
- e.isSupported = typeof Zn == "function" && typeof K == "function" && Ve && Ve.createHTMLDocument !== void 0;
1807
+ let z = mn();
1808
+ e.isSupported = typeof vn == "function" && typeof W == "function" && Ve && Ve.createHTMLDocument !== void 0;
2433
1809
  const {
2434
- MUSTACHE_EXPR: je,
2435
- ERB_EXPR: ee,
2436
- TMPLIT_EXPR: se,
2437
- DATA_ATTR: Le,
2438
- ARIA_ATTR: wt,
2439
- IS_SCRIPT_OR_DATA: _t,
2440
- ATTR_WHITESPACE: qe,
2441
- CUSTOM_ELEMENT: yt
2442
- } = Pn;
1810
+ MUSTACHE_EXPR: Xe,
1811
+ ERB_EXPR: Qe,
1812
+ TMPLIT_EXPR: Ke,
1813
+ DATA_ATTR: Pn,
1814
+ ARIA_ATTR: $n,
1815
+ IS_SCRIPT_OR_DATA: Un,
1816
+ ATTR_WHITESPACE: vt,
1817
+ CUSTOM_ELEMENT: Fn
1818
+ } = dn;
2443
1819
  let {
2444
- IS_ALLOWED_URI: Ze
2445
- } = Pn, F = null;
2446
- const Xe = R({}, [...Cn, ...Qt, ...Jt, ...en, ...Ln]);
2447
- let B = null;
2448
- const Et = R({}, [...In, ...tn, ...Dn, ...jt]);
2449
- let $ = Object.seal(sn(null, {
1820
+ IS_ALLOWED_URI: It
1821
+ } = dn, O = null;
1822
+ const Ct = x({}, [...un, ...ft, ...dt, ...mt, ...pn]);
1823
+ let D = null;
1824
+ const Ot = x({}, [...hn, ...gt, ...fn, ...We]);
1825
+ let R = Object.seal(Tt(null, {
2450
1826
  tagNameCheck: {
2451
1827
  writable: !0,
2452
1828
  configurable: !1,
@@ -2465,8 +1841,8 @@ function Qn() {
2465
1841
  enumerable: !0,
2466
1842
  value: !1
2467
1843
  }
2468
- })), ge = null, Ie = null;
2469
- const ae = Object.seal(sn(null, {
1844
+ })), Te = null, Je = null;
1845
+ const pe = Object.seal(Tt(null, {
2470
1846
  tagCheck: {
2471
1847
  writable: !0,
2472
1848
  configurable: !1,
@@ -2480,169 +1856,169 @@ function Qn() {
2480
1856
  value: null
2481
1857
  }
2482
1858
  }));
2483
- let ze = !0, Ee = !0, vt = !1, Ke = !0, ve = !1, $e = !0, te = !1, ke = !1, Fe = !1, be = !1, xe = !1, Ue = !1, Rt = !0, He = !1;
2484
- const Yt = "user-content-";
2485
- let Qe = !0, Re = !1, Te = {}, Q = null;
2486
- const Je = R({}, ["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"]);
2487
- let et = null;
2488
- const tt = R({}, ["audio", "video", "img", "source", "image", "track"]);
2489
- let nt = null;
2490
- const At = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Be = "http://www.w3.org/1998/Math/MathML", We = "http://www.w3.org/2000/svg", le = "http://www.w3.org/1999/xhtml";
2491
- let Ae = le, rt = !1, De = null;
2492
- const St = R({}, [Be, We, le], Xt);
2493
- let ce = R({}, ["mi", "mo", "mn", "ms", "mtext"]), Se = R({}, ["annotation-xml"]);
2494
- const it = R({}, ["title", "style", "font", "a", "script"]);
2495
- let Oe = null;
2496
- const Vt = ["application/xhtml+xml", "text/html"], Ot = "text/html";
2497
- let U = null, we = null;
2498
- const Ct = t.createElement("form"), Lt = function(i) {
2499
- return i instanceof RegExp || i instanceof Function;
2500
- }, ot = function() {
2501
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2502
- if (!(we && we === i)) {
2503
- if ((!i || typeof i != "object") && (i = {}), i = pe(i), Oe = // eslint-disable-next-line unicorn/prefer-includes
2504
- Vt.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Ot : i.PARSER_MEDIA_TYPE, U = Oe === "application/xhtml+xml" ? Xt : zt, F = fe(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, U) : Xe, B = fe(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, U) : Et, De = fe(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Xt) : St, nt = fe(i, "ADD_URI_SAFE_ATTR") ? R(pe(At), i.ADD_URI_SAFE_ATTR, U) : At, et = fe(i, "ADD_DATA_URI_TAGS") ? R(pe(tt), i.ADD_DATA_URI_TAGS, U) : tt, Q = fe(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, U) : Je, ge = fe(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, U) : pe({}), Ie = fe(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, U) : pe({}), Te = fe(i, "USE_PROFILES") ? i.USE_PROFILES : !1, ze = i.ALLOW_ARIA_ATTR !== !1, Ee = i.ALLOW_DATA_ATTR !== !1, vt = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Ke = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ve = i.SAFE_FOR_TEMPLATES || !1, $e = i.SAFE_FOR_XML !== !1, te = i.WHOLE_DOCUMENT || !1, be = i.RETURN_DOM || !1, xe = i.RETURN_DOM_FRAGMENT || !1, Ue = i.RETURN_TRUSTED_TYPE || !1, Fe = i.FORCE_BODY || !1, Rt = i.SANITIZE_DOM !== !1, He = i.SANITIZE_NAMED_PROPS || !1, Qe = i.KEEP_CONTENT !== !1, Re = i.IN_PLACE || !1, Ze = i.ALLOWED_URI_REGEXP || Xn, Ae = i.NAMESPACE || le, ce = i.MATHML_TEXT_INTEGRATION_POINTS || ce, Se = i.HTML_INTEGRATION_POINTS || Se, $ = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && Lt(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && Lt(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ve && (Ee = !1), xe && (be = !0), Te && (F = R({}, Ln), B = [], Te.html === !0 && (R(F, Cn), R(B, In)), Te.svg === !0 && (R(F, Qt), R(B, tn), R(B, jt)), Te.svgFilters === !0 && (R(F, Jt), R(B, tn), R(B, jt)), Te.mathMl === !0 && (R(F, en), R(B, Dn), R(B, jt))), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ae.tagCheck = i.ADD_TAGS : (F === Xe && (F = pe(F)), R(F, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ae.attributeCheck = i.ADD_ATTR : (B === Et && (B = pe(B)), R(B, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && R(nt, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (Q === Je && (Q = pe(Q)), R(Q, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (Q === Je && (Q = pe(Q)), R(Q, i.ADD_FORBID_CONTENTS, U)), Qe && (F["#text"] = !0), te && R(F, ["html", "head", "body"]), F.table && (R(F, ["tbody"]), delete ge.tbody), i.TRUSTED_TYPES_POLICY) {
2505
- if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
2506
- throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2507
- if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
2508
- throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2509
- H = i.TRUSTED_TYPES_POLICY, oe = H.createHTML("");
1859
+ let Dt = !0, et = !0, Nt = !1, Mt = !0, he = !1, Oe = !0, oe = !1, tt = !1, nt = !1, fe = !1, De = !1, Ne = !1, zt = !0, Pt = !1;
1860
+ const Hn = "user-content-";
1861
+ let it = !0, we = !1, de = {}, Y = null;
1862
+ const rt = x({}, ["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"]);
1863
+ let $t = null;
1864
+ const Ut = x({}, ["audio", "video", "img", "source", "image", "track"]);
1865
+ let st = null;
1866
+ const Ft = x({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Me = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", ee = "http://www.w3.org/1999/xhtml";
1867
+ let me = ee, ot = !1, lt = null;
1868
+ const Bn = x({}, [Me, ze, ee], pt);
1869
+ let Pe = x({}, ["mi", "mo", "mn", "ms", "mtext"]), $e = x({}, ["annotation-xml"]);
1870
+ const Wn = x({}, ["title", "style", "font", "a", "script"]);
1871
+ let xe = null;
1872
+ const jn = ["application/xhtml+xml", "text/html"], Gn = "text/html";
1873
+ let v = null, ge = null;
1874
+ const qn = t.createElement("form"), Ht = function(s) {
1875
+ return s instanceof RegExp || s instanceof Function;
1876
+ }, at = function() {
1877
+ let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1878
+ if (!(ge && ge === s)) {
1879
+ if ((!s || typeof s != "object") && (s = {}), s = X(s), xe = // eslint-disable-next-line unicorn/prefer-includes
1880
+ jn.indexOf(s.PARSER_MEDIA_TYPE) === -1 ? Gn : s.PARSER_MEDIA_TYPE, v = xe === "application/xhtml+xml" ? pt : je, O = Z(s, "ALLOWED_TAGS") ? x({}, s.ALLOWED_TAGS, v) : Ct, D = Z(s, "ALLOWED_ATTR") ? x({}, s.ALLOWED_ATTR, v) : Ot, lt = Z(s, "ALLOWED_NAMESPACES") ? x({}, s.ALLOWED_NAMESPACES, pt) : Bn, st = Z(s, "ADD_URI_SAFE_ATTR") ? x(X(Ft), s.ADD_URI_SAFE_ATTR, v) : Ft, $t = Z(s, "ADD_DATA_URI_TAGS") ? x(X(Ut), s.ADD_DATA_URI_TAGS, v) : Ut, Y = Z(s, "FORBID_CONTENTS") ? x({}, s.FORBID_CONTENTS, v) : rt, Te = Z(s, "FORBID_TAGS") ? x({}, s.FORBID_TAGS, v) : X({}), Je = Z(s, "FORBID_ATTR") ? x({}, s.FORBID_ATTR, v) : X({}), de = Z(s, "USE_PROFILES") ? s.USE_PROFILES : !1, Dt = s.ALLOW_ARIA_ATTR !== !1, et = s.ALLOW_DATA_ATTR !== !1, Nt = s.ALLOW_UNKNOWN_PROTOCOLS || !1, Mt = s.ALLOW_SELF_CLOSE_IN_ATTR !== !1, he = s.SAFE_FOR_TEMPLATES || !1, Oe = s.SAFE_FOR_XML !== !1, oe = s.WHOLE_DOCUMENT || !1, fe = s.RETURN_DOM || !1, De = s.RETURN_DOM_FRAGMENT || !1, Ne = s.RETURN_TRUSTED_TYPE || !1, nt = s.FORCE_BODY || !1, zt = s.SANITIZE_DOM !== !1, Pt = s.SANITIZE_NAMED_PROPS || !1, it = s.KEEP_CONTENT !== !1, we = s.IN_PLACE || !1, It = s.ALLOWED_URI_REGEXP || In, me = s.NAMESPACE || ee, Pe = s.MATHML_TEXT_INTEGRATION_POINTS || Pe, $e = s.HTML_INTEGRATION_POINTS || $e, R = s.CUSTOM_ELEMENT_HANDLING || {}, s.CUSTOM_ELEMENT_HANDLING && Ht(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (R.tagNameCheck = s.CUSTOM_ELEMENT_HANDLING.tagNameCheck), s.CUSTOM_ELEMENT_HANDLING && Ht(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (R.attributeNameCheck = s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), s.CUSTOM_ELEMENT_HANDLING && typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), he && (et = !1), De && (fe = !0), de && (O = x({}, pn), D = [], de.html === !0 && (x(O, un), x(D, hn)), de.svg === !0 && (x(O, ft), x(D, gt), x(D, We)), de.svgFilters === !0 && (x(O, dt), x(D, gt), x(D, We)), de.mathMl === !0 && (x(O, mt), x(D, fn), x(D, We))), s.ADD_TAGS && (typeof s.ADD_TAGS == "function" ? pe.tagCheck = s.ADD_TAGS : (O === Ct && (O = X(O)), x(O, s.ADD_TAGS, v))), s.ADD_ATTR && (typeof s.ADD_ATTR == "function" ? pe.attributeCheck = s.ADD_ATTR : (D === Ot && (D = X(D)), x(D, s.ADD_ATTR, v))), s.ADD_URI_SAFE_ATTR && x(st, s.ADD_URI_SAFE_ATTR, v), s.FORBID_CONTENTS && (Y === rt && (Y = X(Y)), x(Y, s.FORBID_CONTENTS, v)), s.ADD_FORBID_CONTENTS && (Y === rt && (Y = X(Y)), x(Y, s.ADD_FORBID_CONTENTS, v)), it && (O["#text"] = !0), oe && x(O, ["html", "head", "body"]), O.table && (x(O, ["tbody"]), delete Te.tbody), s.TRUSTED_TYPES_POLICY) {
1881
+ if (typeof s.TRUSTED_TYPES_POLICY.createHTML != "function")
1882
+ throw Ae('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1883
+ if (typeof s.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1884
+ throw Ae('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1885
+ C = s.TRUSTED_TYPES_POLICY, J = C.createHTML("");
2510
1886
  } else
2511
- H === void 0 && (H = wi(E, r)), H !== null && typeof oe == "string" && (oe = H.createHTML(""));
2512
- Z && Z(i), we = i;
1887
+ C === void 0 && (C = mr(b, i)), C !== null && typeof J == "string" && (J = C.createHTML(""));
1888
+ U && U(s), ge = s;
2513
1889
  }
2514
- }, st = R({}, [...Qt, ...Jt, ...ui]), at = R({}, [...en, ...fi]), qt = function(i) {
2515
- let f = K(i);
2516
- (!f || !f.tagName) && (f = {
2517
- namespaceURI: Ae,
1890
+ }, Bt = x({}, [...ft, ...dt, ...rr]), Wt = x({}, [...mt, ...sr]), Zn = function(s) {
1891
+ let u = W(s);
1892
+ (!u || !u.tagName) && (u = {
1893
+ namespaceURI: me,
2518
1894
  tagName: "template"
2519
1895
  });
2520
- const b = zt(i.tagName), C = zt(f.tagName);
2521
- return De[i.namespaceURI] ? i.namespaceURI === We ? f.namespaceURI === le ? b === "svg" : f.namespaceURI === Be ? b === "svg" && (C === "annotation-xml" || ce[C]) : !!st[b] : i.namespaceURI === Be ? f.namespaceURI === le ? b === "math" : f.namespaceURI === We ? b === "math" && Se[C] : !!at[b] : i.namespaceURI === le ? f.namespaceURI === We && !Se[C] || f.namespaceURI === Be && !ce[C] ? !1 : !at[b] && (it[b] || !st[b]) : !!(Oe === "application/xhtml+xml" && De[i.namespaceURI]) : !1;
2522
- }, ne = function(i) {
2523
- ft(e.removed, {
2524
- element: i
1896
+ const d = je(s.tagName), S = je(u.tagName);
1897
+ return lt[s.namespaceURI] ? s.namespaceURI === ze ? u.namespaceURI === ee ? d === "svg" : u.namespaceURI === Me ? d === "svg" && (S === "annotation-xml" || Pe[S]) : !!Bt[d] : s.namespaceURI === Me ? u.namespaceURI === ee ? d === "math" : u.namespaceURI === ze ? d === "math" && $e[S] : !!Wt[d] : s.namespaceURI === ee ? u.namespaceURI === ze && !$e[S] || u.namespaceURI === Me && !Pe[S] ? !1 : !Wt[d] && (Wn[d] || !Bt[d]) : !!(xe === "application/xhtml+xml" && lt[s.namespaceURI]) : !1;
1898
+ }, V = function(s) {
1899
+ ye(e.removed, {
1900
+ element: s
2525
1901
  });
2526
1902
  try {
2527
- K(i).removeChild(i);
1903
+ W(s).removeChild(s);
2528
1904
  } catch {
2529
- O(i);
1905
+ _(s);
2530
1906
  }
2531
- }, _e = function(i, f) {
1907
+ }, le = function(s, u) {
2532
1908
  try {
2533
- ft(e.removed, {
2534
- attribute: f.getAttributeNode(i),
2535
- from: f
1909
+ ye(e.removed, {
1910
+ attribute: u.getAttributeNode(s),
1911
+ from: u
2536
1912
  });
2537
1913
  } catch {
2538
- ft(e.removed, {
1914
+ ye(e.removed, {
2539
1915
  attribute: null,
2540
- from: f
1916
+ from: u
2541
1917
  });
2542
1918
  }
2543
- if (f.removeAttribute(i), i === "is")
2544
- if (be || xe)
1919
+ if (u.removeAttribute(s), s === "is")
1920
+ if (fe || De)
2545
1921
  try {
2546
- ne(f);
1922
+ V(u);
2547
1923
  } catch {
2548
1924
  }
2549
1925
  else
2550
1926
  try {
2551
- f.setAttribute(i, "");
1927
+ u.setAttribute(s, "");
2552
1928
  } catch {
2553
1929
  }
2554
- }, It = function(i) {
2555
- let f = null, b = null;
2556
- if (Fe)
2557
- i = "<remove></remove>" + i;
1930
+ }, jt = function(s) {
1931
+ let u = null, d = null;
1932
+ if (nt)
1933
+ s = "<remove></remove>" + s;
2558
1934
  else {
2559
- const z = Kt(i, /^[\r\n\t ]+/);
2560
- b = z && z[0];
1935
+ const L = ht(s, /^[\r\n\t ]+/);
1936
+ d = L && L[0];
2561
1937
  }
2562
- Oe === "application/xhtml+xml" && Ae === le && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
2563
- const C = H ? H.createHTML(i) : i;
2564
- if (Ae === le)
1938
+ xe === "application/xhtml+xml" && me === ee && (s = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + s + "</body></html>");
1939
+ const S = C ? C.createHTML(s) : s;
1940
+ if (me === ee)
2565
1941
  try {
2566
- f = new g().parseFromString(C, Oe);
1942
+ u = new h().parseFromString(S, xe);
2567
1943
  } catch {
2568
1944
  }
2569
- if (!f || !f.documentElement) {
2570
- f = Ve.createDocument(Ae, "template", null);
1945
+ if (!u || !u.documentElement) {
1946
+ u = Ve.createDocument(me, "template", null);
2571
1947
  try {
2572
- f.documentElement.innerHTML = rt ? oe : C;
1948
+ u.documentElement.innerHTML = ot ? J : S;
2573
1949
  } catch {
2574
1950
  }
2575
1951
  }
2576
- const L = f.body || f.documentElement;
2577
- return i && b && L.insertBefore(t.createTextNode(b), L.childNodes[0] || null), Ae === le ? Tt.call(f, te ? "html" : "body")[0] : te ? f.documentElement : L;
2578
- }, o = function(i) {
2579
- return Bt.call(
2580
- i.ownerDocument || i,
2581
- i,
1952
+ const M = u.body || u.documentElement;
1953
+ return s && d && M.insertBefore(t.createTextNode(d), M.childNodes[0] || null), me === ee ? Mn.call(u, oe ? "html" : "body")[0] : oe ? u.documentElement : M;
1954
+ }, Gt = function(s) {
1955
+ return Dn.call(
1956
+ s.ownerDocument || s,
1957
+ s,
2582
1958
  // eslint-disable-next-line no-bitwise
2583
- x.SHOW_ELEMENT | x.SHOW_COMMENT | x.SHOW_TEXT | x.SHOW_PROCESSING_INSTRUCTION | x.SHOW_CDATA_SECTION,
1959
+ g.SHOW_ELEMENT | g.SHOW_COMMENT | g.SHOW_TEXT | g.SHOW_PROCESSING_INSTRUCTION | g.SHOW_CDATA_SECTION,
2584
1960
  null
2585
1961
  );
2586
- }, p = function(i) {
2587
- return i instanceof w && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof h) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
2588
- }, k = function(i) {
2589
- return typeof c == "function" && i instanceof c;
1962
+ }, ct = function(s) {
1963
+ return s instanceof T && (typeof s.nodeName != "string" || typeof s.textContent != "string" || typeof s.removeChild != "function" || !(s.attributes instanceof f) || typeof s.removeAttribute != "function" || typeof s.setAttribute != "function" || typeof s.namespaceURI != "string" || typeof s.insertBefore != "function" || typeof s.hasChildNodes != "function");
1964
+ }, qt = function(s) {
1965
+ return typeof a == "function" && s instanceof a;
2590
1966
  };
2591
- function _(d, i, f) {
2592
- Mt(d, (b) => {
2593
- b.call(e, i, f, we);
1967
+ function te(k, s, u) {
1968
+ Be(k, (d) => {
1969
+ d.call(e, s, u, ge);
2594
1970
  });
2595
1971
  }
2596
- const S = function(i) {
2597
- let f = null;
2598
- if (_(W.beforeSanitizeElements, i, null), p(i))
2599
- return ne(i), !0;
2600
- const b = U(i.nodeName);
2601
- if (_(W.uponSanitizeElement, i, {
2602
- tagName: b,
2603
- allowedTags: F
2604
- }), $e && i.hasChildNodes() && !k(i.firstElementChild) && q(/<[/\w!]/g, i.innerHTML) && q(/<[/\w!]/g, i.textContent) || i.nodeType === mt.progressingInstruction || $e && i.nodeType === mt.comment && q(/<[/\w]/g, i.data))
2605
- return ne(i), !0;
2606
- if (!(ae.tagCheck instanceof Function && ae.tagCheck(b)) && (!F[b] || ge[b])) {
2607
- if (!ge[b] && A(b) && ($.tagNameCheck instanceof RegExp && q($.tagNameCheck, b) || $.tagNameCheck instanceof Function && $.tagNameCheck(b)))
1972
+ const Zt = function(s) {
1973
+ let u = null;
1974
+ if (te(z.beforeSanitizeElements, s, null), ct(s))
1975
+ return V(s), !0;
1976
+ const d = v(s.nodeName);
1977
+ if (te(z.uponSanitizeElement, s, {
1978
+ tagName: d,
1979
+ allowedTags: O
1980
+ }), Oe && s.hasChildNodes() && !qt(s.firstElementChild) && P(/<[/\w!]/g, s.innerHTML) && P(/<[/\w!]/g, s.textContent) || s.nodeType === Re.progressingInstruction || Oe && s.nodeType === Re.comment && P(/<[/\w]/g, s.data))
1981
+ return V(s), !0;
1982
+ if (!(pe.tagCheck instanceof Function && pe.tagCheck(d)) && (!O[d] || Te[d])) {
1983
+ if (!Te[d] && Vt(d) && (R.tagNameCheck instanceof RegExp && P(R.tagNameCheck, d) || R.tagNameCheck instanceof Function && R.tagNameCheck(d)))
2608
1984
  return !1;
2609
- if (Qe && !Q[b]) {
2610
- const C = K(i) || i.parentNode, L = N(i) || i.childNodes;
2611
- if (L && C) {
2612
- const z = L.length;
2613
- for (let V = z - 1; V >= 0; --V) {
2614
- const ue = m(L[V], !0);
2615
- ue.__removalCount = (i.__removalCount || 0) + 1, C.insertBefore(ue, M(i));
1985
+ if (it && !Y[d]) {
1986
+ const S = W(s) || s.parentNode, M = q(s) || s.childNodes;
1987
+ if (M && S) {
1988
+ const L = M.length;
1989
+ for (let H = L - 1; H >= 0; --H) {
1990
+ const ne = p(M[H], !0);
1991
+ ne.__removalCount = (s.__removalCount || 0) + 1, S.insertBefore(ne, I(s));
2616
1992
  }
2617
1993
  }
2618
1994
  }
2619
- return ne(i), !0;
2620
- }
2621
- return i instanceof u && !qt(i) || (b === "noscript" || b === "noembed" || b === "noframes") && q(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ne(i), !0) : (ve && i.nodeType === mt.text && (f = i.textContent, Mt([je, ee, se], (C) => {
2622
- f = pt(f, C, " ");
2623
- }), i.textContent !== f && (ft(e.removed, {
2624
- element: i.cloneNode()
2625
- }), i.textContent = f)), _(W.afterSanitizeElements, i, null), !1);
2626
- }, I = function(i, f, b) {
2627
- if (Rt && (f === "id" || f === "name") && (b in t || b in Ct))
1995
+ return V(s), !0;
1996
+ }
1997
+ return s instanceof c && !Zn(s) || (d === "noscript" || d === "noembed" || d === "noframes") && P(/<\/no(script|embed|frames)/i, s.innerHTML) ? (V(s), !0) : (he && s.nodeType === Re.text && (u = s.textContent, Be([Xe, Qe, Ke], (S) => {
1998
+ u = Ee(u, S, " ");
1999
+ }), s.textContent !== u && (ye(e.removed, {
2000
+ element: s.cloneNode()
2001
+ }), s.textContent = u)), te(z.afterSanitizeElements, s, null), !1);
2002
+ }, Yt = function(s, u, d) {
2003
+ if (zt && (u === "id" || u === "name") && (d in t || d in qn))
2628
2004
  return !1;
2629
- if (!(Ee && !Ie[f] && q(Le, f))) {
2630
- if (!(ze && q(wt, f))) {
2631
- if (!(ae.attributeCheck instanceof Function && ae.attributeCheck(f, i))) {
2632
- if (!B[f] || Ie[f]) {
2005
+ if (!(et && !Je[u] && P(Pn, u))) {
2006
+ if (!(Dt && P($n, u))) {
2007
+ if (!(pe.attributeCheck instanceof Function && pe.attributeCheck(u, s))) {
2008
+ if (!D[u] || Je[u]) {
2633
2009
  if (
2634
2010
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
2635
2011
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2636
2012
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
2637
- !(A(i) && ($.tagNameCheck instanceof RegExp && q($.tagNameCheck, i) || $.tagNameCheck instanceof Function && $.tagNameCheck(i)) && ($.attributeNameCheck instanceof RegExp && q($.attributeNameCheck, f) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(f, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2013
+ !(Vt(s) && (R.tagNameCheck instanceof RegExp && P(R.tagNameCheck, s) || R.tagNameCheck instanceof Function && R.tagNameCheck(s)) && (R.attributeNameCheck instanceof RegExp && P(R.attributeNameCheck, u) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(u, s)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2638
2014
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2639
- f === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && q($.tagNameCheck, b) || $.tagNameCheck instanceof Function && $.tagNameCheck(b)))
2015
+ u === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && P(R.tagNameCheck, d) || R.tagNameCheck instanceof Function && R.tagNameCheck(d)))
2640
2016
  ) return !1;
2641
- } else if (!nt[f]) {
2642
- if (!q(Ze, pt(b, qe, ""))) {
2643
- if (!((f === "src" || f === "xlink:href" || f === "href") && i !== "script" && si(b, "data:") === 0 && et[i])) {
2644
- if (!(vt && !q(_t, pt(b, qe, "")))) {
2645
- if (b)
2017
+ } else if (!st[u]) {
2018
+ if (!P(It, Ee(d, vt, ""))) {
2019
+ if (!((u === "src" || u === "xlink:href" || u === "href") && s !== "script" && er(d, "data:") === 0 && $t[s])) {
2020
+ if (!(Nt && !P(Un, Ee(d, vt, "")))) {
2021
+ if (d)
2646
2022
  return !1;
2647
2023
  }
2648
2024
  }
@@ -2652,244 +2028,242 @@ function Qn() {
2652
2028
  }
2653
2029
  }
2654
2030
  return !0;
2655
- }, A = function(i) {
2656
- return i !== "annotation-xml" && Kt(i, yt);
2657
- }, v = function(i) {
2658
- _(W.beforeSanitizeAttributes, i, null);
2031
+ }, Vt = function(s) {
2032
+ return s !== "annotation-xml" && ht(s, Fn);
2033
+ }, Xt = function(s) {
2034
+ te(z.beforeSanitizeAttributes, s, null);
2659
2035
  const {
2660
- attributes: f
2661
- } = i;
2662
- if (!f || p(i))
2036
+ attributes: u
2037
+ } = s;
2038
+ if (!u || ct(s))
2663
2039
  return;
2664
- const b = {
2040
+ const d = {
2665
2041
  attrName: "",
2666
2042
  attrValue: "",
2667
2043
  keepAttr: !0,
2668
- allowedAttributes: B,
2044
+ allowedAttributes: D,
2669
2045
  forceKeepAttr: void 0
2670
2046
  };
2671
- let C = f.length;
2672
- for (; C--; ) {
2673
- const L = f[C], {
2674
- name: z,
2675
- namespaceURI: V,
2676
- value: ue
2677
- } = L, Ge = U(z), Zt = ue;
2678
- let Y = z === "value" ? Zt : ai(Zt);
2679
- if (b.attrName = Ge, b.attrValue = Y, b.keepAttr = !0, b.forceKeepAttr = void 0, _(W.uponSanitizeAttribute, i, b), Y = b.attrValue, He && (Ge === "id" || Ge === "name") && (_e(z, i), Y = Yt + Y), $e && q(/((--!?|])>)|<\/(style|title|textarea)/i, Y)) {
2680
- _e(z, i);
2047
+ let S = u.length;
2048
+ for (; S--; ) {
2049
+ const M = u[S], {
2050
+ name: L,
2051
+ namespaceURI: H,
2052
+ value: ne
2053
+ } = M, ke = v(L), ut = ne;
2054
+ let N = L === "value" ? ut : tr(ut);
2055
+ if (d.attrName = ke, d.attrValue = N, d.keepAttr = !0, d.forceKeepAttr = void 0, te(z.uponSanitizeAttribute, s, d), N = d.attrValue, Pt && (ke === "id" || ke === "name") && (le(L, s), N = Hn + N), Oe && P(/((--!?|])>)|<\/(style|title|textarea)/i, N)) {
2056
+ le(L, s);
2681
2057
  continue;
2682
2058
  }
2683
- if (Ge === "attributename" && Kt(Y, "href")) {
2684
- _e(z, i);
2059
+ if (ke === "attributename" && ht(N, "href")) {
2060
+ le(L, s);
2685
2061
  continue;
2686
2062
  }
2687
- if (b.forceKeepAttr)
2063
+ if (d.forceKeepAttr)
2688
2064
  continue;
2689
- if (!b.keepAttr) {
2690
- _e(z, i);
2065
+ if (!d.keepAttr) {
2066
+ le(L, s);
2691
2067
  continue;
2692
2068
  }
2693
- if (!Ke && q(/\/>/i, Y)) {
2694
- _e(z, i);
2069
+ if (!Mt && P(/\/>/i, N)) {
2070
+ le(L, s);
2695
2071
  continue;
2696
2072
  }
2697
- ve && Mt([je, ee, se], (kn) => {
2698
- Y = pt(Y, kn, " ");
2073
+ he && Be([Xe, Qe, Ke], (Kt) => {
2074
+ N = Ee(N, Kt, " ");
2699
2075
  });
2700
- const gn = U(i.nodeName);
2701
- if (!I(gn, Ge, Y)) {
2702
- _e(z, i);
2076
+ const Qt = v(s.nodeName);
2077
+ if (!Yt(Qt, ke, N)) {
2078
+ le(L, s);
2703
2079
  continue;
2704
2080
  }
2705
- if (H && typeof E == "object" && typeof E.getAttributeType == "function" && !V)
2706
- switch (E.getAttributeType(gn, Ge)) {
2081
+ if (C && typeof b == "object" && typeof b.getAttributeType == "function" && !H)
2082
+ switch (b.getAttributeType(Qt, ke)) {
2707
2083
  case "TrustedHTML": {
2708
- Y = H.createHTML(Y);
2084
+ N = C.createHTML(N);
2709
2085
  break;
2710
2086
  }
2711
2087
  case "TrustedScriptURL": {
2712
- Y = H.createScriptURL(Y);
2088
+ N = C.createScriptURL(N);
2713
2089
  break;
2714
2090
  }
2715
2091
  }
2716
- if (Y !== Zt)
2092
+ if (N !== ut)
2717
2093
  try {
2718
- V ? i.setAttributeNS(V, z, Y) : i.setAttribute(z, Y), p(i) ? ne(i) : On(e.removed);
2094
+ H ? s.setAttributeNS(H, L, N) : s.setAttribute(L, N), ct(s) ? V(s) : cn(e.removed);
2719
2095
  } catch {
2720
- _e(z, i);
2096
+ le(L, s);
2721
2097
  }
2722
2098
  }
2723
- _(W.afterSanitizeAttributes, i, null);
2724
- }, G = function d(i) {
2725
- let f = null;
2726
- const b = o(i);
2727
- for (_(W.beforeSanitizeShadowDOM, i, null); f = b.nextNode(); )
2728
- _(W.uponSanitizeShadowNode, f, null), S(f), v(f), f.content instanceof a && d(f.content);
2729
- _(W.afterSanitizeShadowDOM, i, null);
2099
+ te(z.afterSanitizeAttributes, s, null);
2100
+ }, Yn = function k(s) {
2101
+ let u = null;
2102
+ const d = Gt(s);
2103
+ for (te(z.beforeSanitizeShadowDOM, s, null); u = d.nextNode(); )
2104
+ te(z.uponSanitizeShadowNode, u, null), Zt(u), Xt(u), u.content instanceof o && k(u.content);
2105
+ te(z.afterSanitizeShadowDOM, s, null);
2730
2106
  };
2731
- return e.sanitize = function(d) {
2732
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, f = null, b = null, C = null, L = null;
2733
- if (rt = !d, rt && (d = "<!-->"), typeof d != "string" && !k(d))
2734
- if (typeof d.toString == "function") {
2735
- if (d = d.toString(), typeof d != "string")
2736
- throw ht("dirty is not a string, aborting");
2107
+ return e.sanitize = function(k) {
2108
+ let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, d = null, S = null, M = null;
2109
+ if (ot = !k, ot && (k = "<!-->"), typeof k != "string" && !qt(k))
2110
+ if (typeof k.toString == "function") {
2111
+ if (k = k.toString(), typeof k != "string")
2112
+ throw Ae("dirty is not a string, aborting");
2737
2113
  } else
2738
- throw ht("toString is not a function");
2114
+ throw Ae("toString is not a function");
2739
2115
  if (!e.isSupported)
2740
- return d;
2741
- if (ke || ot(i), e.removed = [], typeof d == "string" && (Re = !1), Re) {
2742
- if (d.nodeName) {
2743
- const ue = U(d.nodeName);
2744
- if (!F[ue] || ge[ue])
2745
- throw ht("root node is forbidden and cannot be sanitized in-place");
2116
+ return k;
2117
+ if (tt || at(s), e.removed = [], typeof k == "string" && (we = !1), we) {
2118
+ if (k.nodeName) {
2119
+ const ne = v(k.nodeName);
2120
+ if (!O[ne] || Te[ne])
2121
+ throw Ae("root node is forbidden and cannot be sanitized in-place");
2746
2122
  }
2747
- } else if (d instanceof c)
2748
- f = It("<!---->"), b = f.ownerDocument.importNode(d, !0), b.nodeType === mt.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? f = b : f.appendChild(b);
2123
+ } else if (k instanceof a)
2124
+ u = jt("<!---->"), d = u.ownerDocument.importNode(k, !0), d.nodeType === Re.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? u = d : u.appendChild(d);
2749
2125
  else {
2750
- if (!be && !ve && !te && // eslint-disable-next-line unicorn/prefer-includes
2751
- d.indexOf("<") === -1)
2752
- return H && Ue ? H.createHTML(d) : d;
2753
- if (f = It(d), !f)
2754
- return be ? null : Ue ? oe : "";
2755
- }
2756
- f && Fe && ne(f.firstChild);
2757
- const z = o(Re ? d : f);
2758
- for (; C = z.nextNode(); )
2759
- S(C), v(C), C.content instanceof a && G(C.content);
2760
- if (Re)
2761
- return d;
2762
- if (be) {
2763
- if (xe)
2764
- for (L = Wt.call(f.ownerDocument); f.firstChild; )
2765
- L.appendChild(f.firstChild);
2126
+ if (!fe && !he && !oe && // eslint-disable-next-line unicorn/prefer-includes
2127
+ k.indexOf("<") === -1)
2128
+ return C && Ne ? C.createHTML(k) : k;
2129
+ if (u = jt(k), !u)
2130
+ return fe ? null : Ne ? J : "";
2131
+ }
2132
+ u && nt && V(u.firstChild);
2133
+ const L = Gt(we ? k : u);
2134
+ for (; S = L.nextNode(); )
2135
+ Zt(S), Xt(S), S.content instanceof o && Yn(S.content);
2136
+ if (we)
2137
+ return k;
2138
+ if (fe) {
2139
+ if (De)
2140
+ for (M = Nn.call(u.ownerDocument); u.firstChild; )
2141
+ M.appendChild(u.firstChild);
2766
2142
  else
2767
- L = f;
2768
- return (B.shadowroot || B.shadowrootmode) && (L = Gt.call(n, L, !0)), L;
2769
- }
2770
- let V = te ? f.outerHTML : f.innerHTML;
2771
- return te && F["!doctype"] && f.ownerDocument && f.ownerDocument.doctype && f.ownerDocument.doctype.name && q(Kn, f.ownerDocument.doctype.name) && (V = "<!DOCTYPE " + f.ownerDocument.doctype.name + `>
2772
- ` + V), ve && Mt([je, ee, se], (ue) => {
2773
- V = pt(V, ue, " ");
2774
- }), H && Ue ? H.createHTML(V) : V;
2143
+ M = u;
2144
+ return (D.shadowroot || D.shadowrootmode) && (M = zn.call(n, M, !0)), M;
2145
+ }
2146
+ let H = oe ? u.outerHTML : u.innerHTML;
2147
+ return oe && O["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && P(Cn, u.ownerDocument.doctype.name) && (H = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
2148
+ ` + H), he && Be([Xe, Qe, Ke], (ne) => {
2149
+ H = Ee(H, ne, " ");
2150
+ }), C && Ne ? C.createHTML(H) : H;
2775
2151
  }, e.setConfig = function() {
2776
- let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2777
- ot(d), ke = !0;
2152
+ let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2153
+ at(k), tt = !0;
2778
2154
  }, e.clearConfig = function() {
2779
- we = null, ke = !1;
2780
- }, e.isValidAttribute = function(d, i, f) {
2781
- we || ot({});
2782
- const b = U(d), C = U(i);
2783
- return I(b, C, f);
2784
- }, e.addHook = function(d, i) {
2785
- typeof i == "function" && ft(W[d], i);
2786
- }, e.removeHook = function(d, i) {
2787
- if (i !== void 0) {
2788
- const f = ii(W[d], i);
2789
- return f === -1 ? void 0 : oi(W[d], f, 1)[0];
2790
- }
2791
- return On(W[d]);
2792
- }, e.removeHooks = function(d) {
2793
- W[d] = [];
2155
+ ge = null, tt = !1;
2156
+ }, e.isValidAttribute = function(k, s, u) {
2157
+ ge || at({});
2158
+ const d = v(k), S = v(s);
2159
+ return Yt(d, S, u);
2160
+ }, e.addHook = function(k, s) {
2161
+ typeof s == "function" && ye(z[k], s);
2162
+ }, e.removeHook = function(k, s) {
2163
+ if (s !== void 0) {
2164
+ const u = Ki(z[k], s);
2165
+ return u === -1 ? void 0 : Ji(z[k], u, 1)[0];
2166
+ }
2167
+ return cn(z[k]);
2168
+ }, e.removeHooks = function(k) {
2169
+ z[k] = [];
2794
2170
  }, e.removeAllHooks = function() {
2795
- W = Nn();
2171
+ z = mn();
2796
2172
  }, e;
2797
2173
  }
2798
- var _i = Qn();
2799
- const yi = {
2174
+ var gr = On();
2175
+ const kr = {
2800
2176
  heading(l, e, t) {
2801
2177
  typeof l == "object" && l !== null && (t = l.raw || t, e = l.depth || l.level || e, l = l.text || "");
2802
- const r = (t || String(l)).toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
2803
- return `<h${e} id="${r}">${l}</h${e}>`;
2178
+ const i = (t || String(l)).toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
2179
+ return `<h${e} id="${i}">${l}</h${e}>`;
2804
2180
  }
2805
2181
  };
2806
- D.use({ renderer: yi });
2807
- function Ei(l) {
2808
- const e = D.parse(l);
2809
- return _i.sanitize(e, {
2182
+ y.use({ renderer: kr });
2183
+ function br(l) {
2184
+ const e = y.parse(l);
2185
+ return gr.sanitize(e, {
2810
2186
  ADD_ATTR: ["id", "name"],
2811
2187
  // 'name' sometimes used for anchors too
2812
2188
  ADD_TAGS: ["h1", "h2", "h3", "h4", "h5", "h6"]
2813
2189
  // Ensure headers aren't stripped (redundant but safe)
2814
2190
  });
2815
2191
  }
2816
- const vi = ({ content: l, filename: e, onClose: t }) => {
2817
- const [n, r] = ye(""), [a, s] = ye(!1), [c, u] = ye(!1);
2818
- Ye(() => {
2192
+ const Tr = ({ content: l, filename: e, onClose: t }) => {
2193
+ const [n, i] = ie(""), [o, r] = ie(!1), [a, c] = ie(!1);
2194
+ be(() => {
2819
2195
  if (l) {
2820
- const g = Ei(l);
2821
- r(g);
2196
+ const h = br(l);
2197
+ i(h);
2822
2198
  }
2823
- }, [l]), Ye(() => {
2824
- const g = (T) => {
2825
- var O;
2826
- const m = (O = T.target.getAttribute("href")) == null ? void 0 : O.substring(1);
2827
- if (m) {
2828
- const M = document.getElementById(m);
2829
- M && (T.preventDefault(), M.scrollIntoView({ behavior: "smooth", block: "start" }));
2199
+ }, [l]), be(() => {
2200
+ const h = (m) => {
2201
+ var _;
2202
+ const p = (_ = m.target.getAttribute("href")) == null ? void 0 : _.substring(1);
2203
+ if (p) {
2204
+ const I = document.getElementById(p);
2205
+ I && (m.preventDefault(), I.scrollIntoView({ behavior: "smooth", block: "start" }));
2830
2206
  }
2831
- }, E = document.querySelectorAll('.markdown-body a[href^="#"]');
2832
- return E.forEach((T) => T.addEventListener("click", g)), () => {
2833
- E.forEach((T) => T.removeEventListener("click", g));
2207
+ }, b = document.querySelectorAll('.markdown-body a[href^="#"]');
2208
+ return b.forEach((m) => m.addEventListener("click", h)), () => {
2209
+ b.forEach((m) => m.removeEventListener("click", h));
2834
2210
  };
2835
2211
  }, [n]);
2836
- const x = () => {
2837
- var g;
2838
- if (a)
2839
- window.speechSynthesis.cancel(), s(!1);
2212
+ const g = () => {
2213
+ var h;
2214
+ if (o)
2215
+ window.speechSynthesis.cancel(), r(!1);
2840
2216
  else {
2841
- const E = (g = document.getElementById("markdown-content")) == null ? void 0 : g.innerText;
2842
- if (!E) return;
2843
- const T = new SpeechSynthesisUtterance(E);
2844
- T.rate = 1, T.onend = () => s(!1), T.onerror = () => s(!1), window.speechSynthesis.speak(T), s(!0);
2217
+ const b = (h = document.getElementById("markdown-content")) == null ? void 0 : h.innerText;
2218
+ if (!b) return;
2219
+ const m = new SpeechSynthesisUtterance(b);
2220
+ m.rate = 1, m.onend = () => r(!1), m.onerror = () => r(!1), window.speechSynthesis.speak(m), r(!0);
2845
2221
  }
2846
2222
  };
2847
- Ye(() => () => window.speechSynthesis.cancel(), []);
2848
- const h = () => {
2849
- const g = document.getElementById("markdown-content");
2850
- if (!g) return;
2851
- const E = g.innerText, T = g.innerHTML, m = new Blob([T], { type: "text/html" }), O = new Blob([E], { type: "text/plain" }), M = [new ClipboardItem({
2852
- "text/html": m,
2853
- "text/plain": O
2854
- })];
2855
- navigator.clipboard.write(M).then(() => {
2856
- u(!0), setTimeout(() => u(!1), 2e3);
2857
- }).catch(() => {
2858
- navigator.clipboard.writeText(E).then(() => {
2859
- u(!0), setTimeout(() => u(!1), 2e3);
2860
- });
2861
- });
2862
- }, w = () => {
2863
- alert("💡 Tip: To preserve the visual theme in your PDF, make sure to check 'Background graphics' in the print settings window."), window.print();
2864
- };
2865
- return /* @__PURE__ */ y.jsxs("section", { className: "preview-zone", children: [
2866
- /* @__PURE__ */ y.jsxs("div", { className: "preview-header", children: [
2867
- /* @__PURE__ */ y.jsx("span", { id: "filename-display", children: e || "filename.md" }),
2868
- /* @__PURE__ */ y.jsxs("div", { className: "header-actions", children: [
2869
- /* @__PURE__ */ y.jsx(
2223
+ return be(() => () => window.speechSynthesis.cancel(), []), /* @__PURE__ */ $("section", { className: "preview-zone", children: [
2224
+ /* @__PURE__ */ $("div", { className: "preview-header", children: [
2225
+ /* @__PURE__ */ w("span", { id: "filename-display", children: e || "filename.md" }),
2226
+ /* @__PURE__ */ $("div", { className: "header-actions", children: [
2227
+ /* @__PURE__ */ w(
2870
2228
  "button",
2871
2229
  {
2872
- className: `icon-btn ${a ? "speaking" : ""}`,
2873
- onClick: x,
2874
- title: a ? "Stop Reading" : "Read Aloud",
2875
- children: a ? /* @__PURE__ */ y.jsx(mr, {}) : /* @__PURE__ */ y.jsx(kr, {})
2230
+ className: `icon-btn ${o ? "speaking" : ""}`,
2231
+ onClick: g,
2232
+ title: o ? "Stop Reading" : "Read Aloud",
2233
+ children: o ? /* @__PURE__ */ w(ci, {}) : /* @__PURE__ */ w(pi, {})
2876
2234
  }
2877
2235
  ),
2878
- /* @__PURE__ */ y.jsx(
2236
+ /* @__PURE__ */ w(
2879
2237
  "button",
2880
2238
  {
2881
2239
  className: "icon-btn",
2882
- onClick: h,
2240
+ onClick: () => {
2241
+ const h = document.getElementById("markdown-content");
2242
+ if (!h) return;
2243
+ const b = h.innerText, m = h.innerHTML, p = new Blob([m], { type: "text/html" }), _ = new Blob([b], { type: "text/plain" }), I = [new ClipboardItem({
2244
+ "text/html": p,
2245
+ "text/plain": _
2246
+ })];
2247
+ navigator.clipboard.write(I).then(() => {
2248
+ c(!0), setTimeout(() => c(!1), 2e3);
2249
+ }).catch(() => {
2250
+ navigator.clipboard.writeText(b).then(() => {
2251
+ c(!0), setTimeout(() => c(!1), 2e3);
2252
+ });
2253
+ });
2254
+ },
2883
2255
  title: "Copy to Clipboard",
2884
- style: { color: c ? "var(--accent-color)" : "" },
2885
- children: c ? /* @__PURE__ */ y.jsx(lr, {}) : /* @__PURE__ */ y.jsx(fr, {})
2256
+ style: { color: a ? "var(--accent-color)" : "" },
2257
+ children: a ? /* @__PURE__ */ w(ni, {}) : /* @__PURE__ */ w(si, {})
2886
2258
  }
2887
2259
  ),
2888
- /* @__PURE__ */ y.jsx("button", { className: "icon-btn", onClick: w, title: "Save as PDF", children: /* @__PURE__ */ y.jsx(hr, {}) }),
2889
- /* @__PURE__ */ y.jsx("button", { className: "icon-btn", onClick: t, title: "Close File", id: "close-btn", children: /* @__PURE__ */ y.jsx(cr, {}) })
2260
+ /* @__PURE__ */ w("button", { className: "icon-btn", onClick: () => {
2261
+ alert("💡 Tip: To preserve the visual theme in your PDF, make sure to check 'Background graphics' in the print settings window."), window.print();
2262
+ }, title: "Save as PDF", children: /* @__PURE__ */ w(li, {}) }),
2263
+ /* @__PURE__ */ w("button", { className: "icon-btn", onClick: t, title: "Close File", id: "close-btn", children: /* @__PURE__ */ w(ii, {}) })
2890
2264
  ] })
2891
2265
  ] }),
2892
- /* @__PURE__ */ y.jsx(
2266
+ /* @__PURE__ */ w(
2893
2267
  "div",
2894
2268
  {
2895
2269
  id: "markdown-content",
@@ -2898,101 +2272,100 @@ const vi = ({ content: l, filename: e, onClose: t }) => {
2898
2272
  }
2899
2273
  )
2900
2274
  ] });
2901
- }, Si = ({ url: l }) => {
2902
- const [e, t] = ye("light"), [n, r] = ye(null), [a, s] = ye(!1), c = me.useRef(null);
2903
- Ye(() => {
2904
- const T = localStorage.getItem("theme"), m = window.matchMedia("(prefers-color-scheme: dark)").matches;
2905
- t(T || (m ? "dark" : "light"));
2275
+ }, yr = ({ url: l }) => {
2276
+ const [e, t] = ie("light"), [n, i] = ie(null), [o, r] = ie(!1), a = re.useRef(null);
2277
+ be(() => {
2278
+ const m = localStorage.getItem("theme"), p = window.matchMedia("(prefers-color-scheme: dark)").matches;
2279
+ t(m || (p ? "dark" : "light"));
2906
2280
  }, []);
2907
- const u = () => {
2908
- const T = e === "light" ? "dark" : "light";
2909
- t(T), localStorage.setItem("theme", T);
2910
- }, x = (T) => {
2281
+ const c = () => {
2282
+ const m = e === "light" ? "dark" : "light";
2283
+ t(m), localStorage.setItem("theme", m);
2284
+ }, g = (m) => {
2911
2285
  try {
2912
- if (new URL(T).hostname === "github.com" && T.includes("/blob/"))
2913
- return T.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/");
2286
+ if (new URL(m).hostname === "github.com" && m.includes("/blob/"))
2287
+ return m.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/");
2914
2288
  } catch {
2915
2289
  }
2916
- return T;
2917
- }, h = async (T) => {
2918
- if (T)
2290
+ return m;
2291
+ }, f = async (m) => {
2292
+ if (m)
2919
2293
  try {
2920
- const m = x(T), O = await fetch(m);
2921
- if (!O.ok) throw new Error("Failed to fetch");
2922
- const M = await O.text();
2923
- let N = T.substring(T.lastIndexOf("/") + 1) || "remote-file.md";
2924
- N.includes("?") && (N = N.split("?")[0]), r({ name: N, content: M });
2925
- } catch (m) {
2926
- console.error("Scripto Load Error:", m);
2294
+ const p = g(m), _ = await fetch(p);
2295
+ if (!_.ok) throw new Error("Failed to fetch");
2296
+ const I = await _.text();
2297
+ let q = m.substring(m.lastIndexOf("/") + 1) || "remote-file.md";
2298
+ q.includes("?") && (q = q.split("?")[0]), i({ name: q, content: I });
2299
+ } catch (p) {
2300
+ console.error("Scripto Load Error:", p);
2927
2301
  }
2928
2302
  };
2929
- Ye(() => {
2930
- const T = c.current;
2931
- if (!T) return;
2932
- const m = () => {
2933
- T.scrollTop > 300 ? s(!0) : s(!1);
2303
+ be(() => {
2304
+ const m = a.current;
2305
+ if (!m) return;
2306
+ const p = () => {
2307
+ m.scrollTop > 300 ? r(!0) : r(!1);
2934
2308
  };
2935
- return T.addEventListener("scroll", m), () => T.removeEventListener("scroll", m);
2309
+ return m.addEventListener("scroll", p), () => m.removeEventListener("scroll", p);
2936
2310
  }, []);
2937
- const w = () => {
2938
- c.current && c.current.scrollTo({ top: 0, behavior: "smooth" });
2939
- }, g = (T) => {
2940
- r(T), c.current && (c.current.scrollTop = 0);
2941
- }, E = () => {
2942
- r(null);
2943
- const T = new URL(window.location);
2944
- T.searchParams.delete("url"), window.history.pushState({}, "", T);
2311
+ const T = () => {
2312
+ a.current && a.current.scrollTo({ top: 0, behavior: "smooth" });
2313
+ }, h = (m) => {
2314
+ i(m), a.current && (a.current.scrollTop = 0);
2315
+ }, b = () => {
2316
+ i(null);
2317
+ const m = new URL(window.location);
2318
+ m.searchParams.delete("url"), window.history.pushState({}, "", m);
2945
2319
  };
2946
- return Ye(() => {
2947
- const T = new URLSearchParams(window.location.search), m = l || T.get("url");
2948
- m && h(m);
2949
- }, [l]), /* @__PURE__ */ y.jsxs("div", { className: "scripto-wrapper", "data-theme": e, children: [
2950
- /* @__PURE__ */ y.jsxs("div", { className: "background-blobs", children: [
2951
- /* @__PURE__ */ y.jsx("div", { className: "blob blob-1" }),
2952
- /* @__PURE__ */ y.jsx("div", { className: "blob blob-2" }),
2953
- /* @__PURE__ */ y.jsx("div", { className: "blob blob-3" })
2320
+ return be(() => {
2321
+ const m = new URLSearchParams(window.location.search), p = l || m.get("url");
2322
+ p && f(p);
2323
+ }, [l]), /* @__PURE__ */ $("div", { className: "scripto-wrapper", "data-theme": e, children: [
2324
+ /* @__PURE__ */ $("div", { className: "background-blobs", children: [
2325
+ /* @__PURE__ */ w("div", { className: "blob blob-1" }),
2326
+ /* @__PURE__ */ w("div", { className: "blob blob-2" }),
2327
+ /* @__PURE__ */ w("div", { className: "blob blob-3" })
2954
2328
  ] }),
2955
- /* @__PURE__ */ y.jsx("button", { id: "theme-toggle", "aria-label": "Toggle Theme", onClick: u, children: e === "light" ? /* @__PURE__ */ y.jsx(gr, {}) : /* @__PURE__ */ y.jsx(dr, {}) }),
2956
- /* @__PURE__ */ y.jsxs("main", { className: "app-container", ref: c, children: [
2957
- /* @__PURE__ */ y.jsxs("header", { className: "glass-header", children: [
2958
- /* @__PURE__ */ y.jsxs("div", { className: "logo", children: [
2959
- /* @__PURE__ */ y.jsx(pr, {}),
2960
- /* @__PURE__ */ y.jsxs("h1", { children: [
2329
+ /* @__PURE__ */ w("button", { id: "theme-toggle", "aria-label": "Toggle Theme", onClick: c, children: e === "light" ? /* @__PURE__ */ w(ui, {}) : /* @__PURE__ */ w(ai, {}) }),
2330
+ /* @__PURE__ */ $("main", { className: "app-container", ref: a, children: [
2331
+ /* @__PURE__ */ $("header", { className: "glass-header", children: [
2332
+ /* @__PURE__ */ $("div", { className: "logo", children: [
2333
+ /* @__PURE__ */ w(oi, {}),
2334
+ /* @__PURE__ */ $("h1", { children: [
2961
2335
  "Scr!p",
2962
- /* @__PURE__ */ y.jsx("span", { children: "tō" })
2336
+ /* @__PURE__ */ w("span", { children: "tō" })
2963
2337
  ] })
2964
2338
  ] }),
2965
- /* @__PURE__ */ y.jsx("p", { children: "“Simple, elegant visualization — where every mark becomes meaning.”" })
2339
+ /* @__PURE__ */ w("p", { children: "“Simple, elegant visualization — where every mark becomes meaning.”" })
2966
2340
  ] }),
2967
- n ? /* @__PURE__ */ y.jsx(
2968
- vi,
2341
+ n ? /* @__PURE__ */ w(
2342
+ Tr,
2969
2343
  {
2970
2344
  content: n.content,
2971
2345
  filename: n.name,
2972
- onClose: E
2346
+ onClose: b
2973
2347
  }
2974
- ) : /* @__PURE__ */ y.jsx(xr, { onFileLoaded: g }),
2975
- /* @__PURE__ */ y.jsx("footer", { className: "app-footer", children: /* @__PURE__ */ y.jsxs("p", { children: [
2348
+ ) : /* @__PURE__ */ w(fi, { onFileLoaded: h }),
2349
+ /* @__PURE__ */ w("footer", { className: "app-footer", children: /* @__PURE__ */ $("p", { children: [
2976
2350
  " Try it out on  ",
2977
- /* @__PURE__ */ y.jsx("a", { href: "https://www.npmjs.com/package/@jojovms/scripto", target: "_blank", rel: "noopener noreferrer", className: "npm-link", title: "View on NPM", children: /* @__PURE__ */ y.jsx(br, { style: { fontSize: "2.5em", verticalAlign: "middle", marginRight: "5px" } }) }),
2978
- /* @__PURE__ */ y.jsx("span", { style: { margin: "0 10px", opacity: 0.5 }, children: "|" }),
2351
+ /* @__PURE__ */ w("a", { href: "https://www.npmjs.com/package/@jojovms/scripto", target: "_blank", rel: "noopener noreferrer", className: "npm-link", title: "View on NPM", children: /* @__PURE__ */ w(hi, { style: { fontSize: "2.5em", verticalAlign: "middle", marginRight: "5px" } }) }),
2352
+ /* @__PURE__ */ w("span", { style: { margin: "0 10px", opacity: 0.5 }, children: "|" }),
2979
2353
  "🎯 App created by ",
2980
- /* @__PURE__ */ y.jsx("a", { href: "https://bio.link/shijoshaji", target: "_blank", rel: "noopener noreferrer", children: "Shijo Shaji" })
2354
+ /* @__PURE__ */ w("a", { href: "https://bio.link/shijoshaji", target: "_blank", rel: "noopener noreferrer", children: "Shijo Shaji" })
2981
2355
  ] }) })
2982
2356
  ] }),
2983
- /* @__PURE__ */ y.jsx(
2357
+ /* @__PURE__ */ w(
2984
2358
  "button",
2985
2359
  {
2986
2360
  id: "scroll-top-btn",
2987
2361
  "aria-label": "Scroll to Top",
2988
- className: a ? "visible" : "",
2989
- onClick: w,
2990
- children: /* @__PURE__ */ y.jsx(ar, {})
2362
+ className: o ? "visible" : "",
2363
+ onClick: T,
2364
+ children: /* @__PURE__ */ w(ti, {})
2991
2365
  }
2992
2366
  )
2993
2367
  ] });
2994
2368
  };
2995
2369
  export {
2996
- Si as Scripto,
2997
- Si as default
2370
+ yr as Scripto
2998
2371
  };