diff --git "a/src/backend/gradio_videoslider/templates/component/index.js" "b/src/backend/gradio_videoslider/templates/component/index.js" new file mode 100644--- /dev/null +++ "b/src/backend/gradio_videoslider/templates/component/index.js" @@ -0,0 +1,42879 @@ +var E1 = Object.defineProperty; +var sm = (n) => { + throw TypeError(n); +}; +var b1 = (n, e, t) => e in n ? E1(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; +var de = (n, e, t) => b1(n, typeof e != "symbol" ? e + "" : e, t), Ru = (n, e, t) => e.has(n) || sm("Cannot " + t); +var ue = (n, e, t) => (Ru(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Mi = (n, e, t) => e.has(n) ? sm("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), $s = (n, e, t, i) => (Ru(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t), mo = (n, e, t) => (Ru(n, e, "access private method"), t); +const { + SvelteComponent: T1, + append_hydration: Hh, + assign: S1, + attr: _t, + binding_callbacks: A1, + children: ba, + claim_element: G_, + claim_space: H_, + claim_svg_element: Cu, + create_slot: x1, + detach: Wi, + element: V_, + empty: rm, + get_all_dirty_from_scope: D1, + get_slot_changes: w1, + get_spread_update: L1, + init: I1, + insert_hydration: Ca, + listen: k1, + noop: R1, + safe_not_equal: C1, + set_dynamic_element_data: am, + set_style: xe, + space: q_, + svg_element: Fu, + toggle_class: et, + transition_in: K_, + transition_out: j_, + update_slot_base: F1 +} = window.__gradio__svelte__internal; +function om(n) { + let e, t, i, s, r; + return { + c() { + e = Fu("svg"), t = Fu("line"), i = Fu("line"), this.h(); + }, + l(a) { + e = Cu(a, "svg", { class: !0, xmlns: !0, viewBox: !0 }); + var o = ba(e); + t = Cu(o, "line", { + x1: !0, + y1: !0, + x2: !0, + y2: !0, + stroke: !0, + "stroke-width": !0 + }), ba(t).forEach(Wi), i = Cu(o, "line", { + x1: !0, + y1: !0, + x2: !0, + y2: !0, + stroke: !0, + "stroke-width": !0 + }), ba(i).forEach(Wi), o.forEach(Wi), this.h(); + }, + h() { + _t(t, "x1", "1"), _t(t, "y1", "9"), _t(t, "x2", "9"), _t(t, "y2", "1"), _t(t, "stroke", "gray"), _t(t, "stroke-width", "0.5"), _t(i, "x1", "5"), _t(i, "y1", "9"), _t(i, "x2", "9"), _t(i, "y2", "5"), _t(i, "stroke", "gray"), _t(i, "stroke-width", "0.5"), _t(e, "class", "resize-handle svelte-239wnu"), _t(e, "xmlns", "http://www.w3.org/2000/svg"), _t(e, "viewBox", "0 0 10 10"); + }, + m(a, o) { + Ca(a, e, o), Hh(e, t), Hh(e, i), s || (r = k1( + e, + "mousedown", + /*resize*/ + n[27] + ), s = !0); + }, + p: R1, + d(a) { + a && Wi(e), s = !1, r(); + } + }; +} +function P1(n) { + var h; + let e, t, i, s, r; + const a = ( + /*#slots*/ + n[31].default + ), o = x1( + a, + n, + /*$$scope*/ + n[30], + null + ); + let u = ( + /*resizable*/ + n[19] && om(n) + ), l = [ + { "data-testid": ( + /*test_id*/ + n[11] + ) }, + { id: ( + /*elem_id*/ + n[6] + ) }, + { + class: i = "block " + /*elem_classes*/ + (((h = n[7]) == null ? void 0 : h.join(" ")) || "") + " svelte-239wnu" + }, + { + dir: s = /*rtl*/ + n[20] ? "rtl" : "ltr" + } + ], c = {}; + for (let d = 0; d < l.length; d += 1) + c = S1(c, l[d]); + return { + c() { + e = V_( + /*tag*/ + n[25] + ), o && o.c(), t = q_(), u && u.c(), this.h(); + }, + l(d) { + e = G_( + d, + /*tag*/ + (n[25] || "null").toUpperCase(), + { + "data-testid": !0, + id: !0, + class: !0, + dir: !0 + } + ); + var f = ba(e); + o && o.l(f), t = H_(f), u && u.l(f), f.forEach(Wi), this.h(); + }, + h() { + am( + /*tag*/ + n[25] + )(e, c), et( + e, + "hidden", + /*visible*/ + n[14] === !1 + ), et( + e, + "padded", + /*padding*/ + n[10] + ), et( + e, + "flex", + /*flex*/ + n[1] + ), et( + e, + "border_focus", + /*border_mode*/ + n[9] === "focus" + ), et( + e, + "border_contrast", + /*border_mode*/ + n[9] === "contrast" + ), et(e, "hide-container", !/*explicit_call*/ + n[12] && !/*container*/ + n[13]), et( + e, + "fullscreen", + /*fullscreen*/ + n[0] + ), et( + e, + "animating", + /*fullscreen*/ + n[0] && /*preexpansionBoundingRect*/ + n[24] !== null + ), et( + e, + "auto-margin", + /*scale*/ + n[17] === null + ), xe( + e, + "height", + /*fullscreen*/ + n[0] ? void 0 : ( + /*get_dimension*/ + n[26]( + /*height*/ + n[2] + ) + ) + ), xe( + e, + "min-height", + /*fullscreen*/ + n[0] ? void 0 : ( + /*get_dimension*/ + n[26]( + /*min_height*/ + n[3] + ) + ) + ), xe( + e, + "max-height", + /*fullscreen*/ + n[0] ? void 0 : ( + /*get_dimension*/ + n[26]( + /*max_height*/ + n[4] + ) + ) + ), xe( + e, + "--start-top", + /*preexpansionBoundingRect*/ + n[24] ? `${/*preexpansionBoundingRect*/ + n[24].top}px` : "0px" + ), xe( + e, + "--start-left", + /*preexpansionBoundingRect*/ + n[24] ? `${/*preexpansionBoundingRect*/ + n[24].left}px` : "0px" + ), xe( + e, + "--start-width", + /*preexpansionBoundingRect*/ + n[24] ? `${/*preexpansionBoundingRect*/ + n[24].width}px` : "0px" + ), xe( + e, + "--start-height", + /*preexpansionBoundingRect*/ + n[24] ? `${/*preexpansionBoundingRect*/ + n[24].height}px` : "0px" + ), xe( + e, + "width", + /*fullscreen*/ + n[0] ? void 0 : typeof /*width*/ + n[5] == "number" ? `calc(min(${/*width*/ + n[5]}px, 100%))` : ( + /*get_dimension*/ + n[26]( + /*width*/ + n[5] + ) + ) + ), xe( + e, + "border-style", + /*variant*/ + n[8] + ), xe( + e, + "overflow", + /*allow_overflow*/ + n[15] ? ( + /*overflow_behavior*/ + n[16] + ) : "hidden" + ), xe( + e, + "flex-grow", + /*scale*/ + n[17] + ), xe(e, "min-width", `calc(min(${/*min_width*/ + n[18]}px, 100%))`), xe(e, "border-width", "var(--block-border-width)"); + }, + m(d, f) { + Ca(d, e, f), o && o.m(e, null), Hh(e, t), u && u.m(e, null), n[32](e), r = !0; + }, + p(d, f) { + var m; + o && o.p && (!r || f[0] & /*$$scope*/ + 1073741824) && F1( + o, + a, + d, + /*$$scope*/ + d[30], + r ? w1( + a, + /*$$scope*/ + d[30], + f, + null + ) : D1( + /*$$scope*/ + d[30] + ), + null + ), /*resizable*/ + d[19] ? u ? u.p(d, f) : (u = om(d), u.c(), u.m(e, null)) : u && (u.d(1), u = null), am( + /*tag*/ + d[25] + )(e, c = L1(l, [ + (!r || f[0] & /*test_id*/ + 2048) && { "data-testid": ( + /*test_id*/ + d[11] + ) }, + (!r || f[0] & /*elem_id*/ + 64) && { id: ( + /*elem_id*/ + d[6] + ) }, + (!r || f[0] & /*elem_classes*/ + 128 && i !== (i = "block " + /*elem_classes*/ + (((m = d[7]) == null ? void 0 : m.join(" ")) || "") + " svelte-239wnu")) && { class: i }, + (!r || f[0] & /*rtl*/ + 1048576 && s !== (s = /*rtl*/ + d[20] ? "rtl" : "ltr")) && { dir: s } + ])), et( + e, + "hidden", + /*visible*/ + d[14] === !1 + ), et( + e, + "padded", + /*padding*/ + d[10] + ), et( + e, + "flex", + /*flex*/ + d[1] + ), et( + e, + "border_focus", + /*border_mode*/ + d[9] === "focus" + ), et( + e, + "border_contrast", + /*border_mode*/ + d[9] === "contrast" + ), et(e, "hide-container", !/*explicit_call*/ + d[12] && !/*container*/ + d[13]), et( + e, + "fullscreen", + /*fullscreen*/ + d[0] + ), et( + e, + "animating", + /*fullscreen*/ + d[0] && /*preexpansionBoundingRect*/ + d[24] !== null + ), et( + e, + "auto-margin", + /*scale*/ + d[17] === null + ), f[0] & /*fullscreen, height*/ + 5 && xe( + e, + "height", + /*fullscreen*/ + d[0] ? void 0 : ( + /*get_dimension*/ + d[26]( + /*height*/ + d[2] + ) + ) + ), f[0] & /*fullscreen, min_height*/ + 9 && xe( + e, + "min-height", + /*fullscreen*/ + d[0] ? void 0 : ( + /*get_dimension*/ + d[26]( + /*min_height*/ + d[3] + ) + ) + ), f[0] & /*fullscreen, max_height*/ + 17 && xe( + e, + "max-height", + /*fullscreen*/ + d[0] ? void 0 : ( + /*get_dimension*/ + d[26]( + /*max_height*/ + d[4] + ) + ) + ), f[0] & /*preexpansionBoundingRect*/ + 16777216 && xe( + e, + "--start-top", + /*preexpansionBoundingRect*/ + d[24] ? `${/*preexpansionBoundingRect*/ + d[24].top}px` : "0px" + ), f[0] & /*preexpansionBoundingRect*/ + 16777216 && xe( + e, + "--start-left", + /*preexpansionBoundingRect*/ + d[24] ? `${/*preexpansionBoundingRect*/ + d[24].left}px` : "0px" + ), f[0] & /*preexpansionBoundingRect*/ + 16777216 && xe( + e, + "--start-width", + /*preexpansionBoundingRect*/ + d[24] ? `${/*preexpansionBoundingRect*/ + d[24].width}px` : "0px" + ), f[0] & /*preexpansionBoundingRect*/ + 16777216 && xe( + e, + "--start-height", + /*preexpansionBoundingRect*/ + d[24] ? `${/*preexpansionBoundingRect*/ + d[24].height}px` : "0px" + ), f[0] & /*fullscreen, width*/ + 33 && xe( + e, + "width", + /*fullscreen*/ + d[0] ? void 0 : typeof /*width*/ + d[5] == "number" ? `calc(min(${/*width*/ + d[5]}px, 100%))` : ( + /*get_dimension*/ + d[26]( + /*width*/ + d[5] + ) + ) + ), f[0] & /*variant*/ + 256 && xe( + e, + "border-style", + /*variant*/ + d[8] + ), f[0] & /*allow_overflow, overflow_behavior*/ + 98304 && xe( + e, + "overflow", + /*allow_overflow*/ + d[15] ? ( + /*overflow_behavior*/ + d[16] + ) : "hidden" + ), f[0] & /*scale*/ + 131072 && xe( + e, + "flex-grow", + /*scale*/ + d[17] + ), f[0] & /*min_width*/ + 262144 && xe(e, "min-width", `calc(min(${/*min_width*/ + d[18]}px, 100%))`); + }, + i(d) { + r || (K_(o, d), r = !0); + }, + o(d) { + j_(o, d), r = !1; + }, + d(d) { + d && Wi(e), o && o.d(d), u && u.d(), n[32](null); + } + }; +} +function lm(n) { + let e; + return { + c() { + e = V_("div"), this.h(); + }, + l(t) { + e = G_(t, "DIV", { class: !0 }), ba(e).forEach(Wi), this.h(); + }, + h() { + _t(e, "class", "placeholder svelte-239wnu"), xe( + e, + "height", + /*placeholder_height*/ + n[22] + "px" + ), xe( + e, + "width", + /*placeholder_width*/ + n[23] + "px" + ); + }, + m(t, i) { + Ca(t, e, i); + }, + p(t, i) { + i[0] & /*placeholder_height*/ + 4194304 && xe( + e, + "height", + /*placeholder_height*/ + t[22] + "px" + ), i[0] & /*placeholder_width*/ + 8388608 && xe( + e, + "width", + /*placeholder_width*/ + t[23] + "px" + ); + }, + d(t) { + t && Wi(e); + } + }; +} +function O1(n) { + let e, t, i, s = ( + /*tag*/ + n[25] && P1(n) + ), r = ( + /*fullscreen*/ + n[0] && lm(n) + ); + return { + c() { + s && s.c(), e = q_(), r && r.c(), t = rm(); + }, + l(a) { + s && s.l(a), e = H_(a), r && r.l(a), t = rm(); + }, + m(a, o) { + s && s.m(a, o), Ca(a, e, o), r && r.m(a, o), Ca(a, t, o), i = !0; + }, + p(a, o) { + /*tag*/ + a[25] && s.p(a, o), /*fullscreen*/ + a[0] ? r ? r.p(a, o) : (r = lm(a), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null); + }, + i(a) { + i || (K_(s, a), i = !0); + }, + o(a) { + j_(s, a), i = !1; + }, + d(a) { + a && (Wi(e), Wi(t)), s && s.d(a), r && r.d(a); + } + }; +} +function M1(n, e, t) { + let { $$slots: i = {}, $$scope: s } = e, { height: r = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: u = void 0 } = e, { elem_id: l = "" } = e, { elem_classes: c = [] } = e, { variant: h = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: m = "normal" } = e, { test_id: g = void 0 } = e, { explicit_call: p = !1 } = e, { container: y = !0 } = e, { visible: v = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: E = "auto" } = e, { scale: T = null } = e, { min_width: A = 0 } = e, { flex: S = !1 } = e, { resizable: D = !1 } = e, { rtl: x = !1 } = e, { fullscreen: w = !1 } = e, I = w, R, M = m === "fieldset" ? "fieldset" : "div", P = 0, K = 0, q = null; + function W(L) { + w && L.key === "Escape" && t(0, w = !1); + } + const U = (L) => { + if (L !== void 0) { + if (typeof L == "number") + return L + "px"; + if (typeof L == "string") + return L; + } + }, j = (L) => { + let H = L.clientY; + const Q = (C) => { + const B = C.clientY - H; + H = C.clientY, t(21, R.style.height = `${R.offsetHeight + B}px`, R); + }, X = () => { + window.removeEventListener("mousemove", Q), window.removeEventListener("mouseup", X); + }; + window.addEventListener("mousemove", Q), window.addEventListener("mouseup", X); + }; + function $(L) { + A1[L ? "unshift" : "push"](() => { + R = L, t(21, R); + }); + } + return n.$$set = (L) => { + "height" in L && t(2, r = L.height), "min_height" in L && t(3, a = L.min_height), "max_height" in L && t(4, o = L.max_height), "width" in L && t(5, u = L.width), "elem_id" in L && t(6, l = L.elem_id), "elem_classes" in L && t(7, c = L.elem_classes), "variant" in L && t(8, h = L.variant), "border_mode" in L && t(9, d = L.border_mode), "padding" in L && t(10, f = L.padding), "type" in L && t(28, m = L.type), "test_id" in L && t(11, g = L.test_id), "explicit_call" in L && t(12, p = L.explicit_call), "container" in L && t(13, y = L.container), "visible" in L && t(14, v = L.visible), "allow_overflow" in L && t(15, _ = L.allow_overflow), "overflow_behavior" in L && t(16, E = L.overflow_behavior), "scale" in L && t(17, T = L.scale), "min_width" in L && t(18, A = L.min_width), "flex" in L && t(1, S = L.flex), "resizable" in L && t(19, D = L.resizable), "rtl" in L && t(20, x = L.rtl), "fullscreen" in L && t(0, w = L.fullscreen), "$$scope" in L && t(30, s = L.$$scope); + }, n.$$.update = () => { + n.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/ + 538968065 && w !== I && (t(29, I = w), w ? (t(24, q = R.getBoundingClientRect()), t(22, P = R.offsetHeight), t(23, K = R.offsetWidth), window.addEventListener("keydown", W)) : (t(24, q = null), window.removeEventListener("keydown", W))), n.$$.dirty[0] & /*visible*/ + 16384 && (v || t(1, S = !1)); + }, [ + w, + S, + r, + a, + o, + u, + l, + c, + h, + d, + f, + g, + p, + y, + v, + _, + E, + T, + A, + D, + x, + R, + P, + K, + q, + M, + U, + j, + m, + I, + s, + i, + $ + ]; +} +class z_ extends T1 { + constructor(e) { + super(), I1( + this, + e, + M1, + O1, + C1, + { + height: 2, + min_height: 3, + max_height: 4, + width: 5, + elem_id: 6, + elem_classes: 7, + variant: 8, + border_mode: 9, + padding: 10, + type: 28, + test_id: 11, + explicit_call: 12, + container: 13, + visible: 14, + allow_overflow: 15, + overflow_behavior: 16, + scale: 17, + min_width: 18, + flex: 1, + resizable: 19, + rtl: 20, + fullscreen: 0 + }, + null, + [-1, -1] + ); + } +} +function Kd() { + return { + async: !1, + breaks: !1, + extensions: null, + gfm: !0, + hooks: null, + pedantic: !1, + renderer: null, + silent: !1, + tokenizer: null, + walkTokens: null + }; +} +let ks = Kd(); +function W_(n) { + ks = n; +} +const Y_ = /[&<>"']/, $1 = new RegExp(Y_.source, "g"), X_ = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, B1 = new RegExp(X_.source, "g"), N1 = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" +}, um = (n) => N1[n]; +function Gt(n, e) { + if (e) { + if (Y_.test(n)) + return n.replace($1, um); + } else if (X_.test(n)) + return n.replace(B1, um); + return n; +} +const U1 = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; +function G1(n) { + return n.replace(U1, (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)) : "")); +} +const H1 = /(^|[^\[])\^/g; +function Ce(n, e) { + let t = typeof n == "string" ? n : n.source; + e = e || ""; + const i = { + replace: (s, r) => { + let a = typeof r == "string" ? r : r.source; + return a = a.replace(H1, "$1"), t = t.replace(s, a), i; + }, + getRegex: () => new RegExp(t, e) + }; + return i; +} +function cm(n) { + try { + n = encodeURI(n).replace(/%25/g, "%"); + } catch { + return null; + } + return n; +} +const Ta = { exec: () => null }; +function hm(n, e) { + const t = n.replace(/\|/g, (r, a, o) => { + let u = !1, l = a; + for (; --l >= 0 && o[l] === "\\"; ) + u = !u; + return u ? "|" : " |"; + }), i = t.split(/ \|/); + let s = 0; + if (i[0].trim() || i.shift(), i.length > 0 && !i[i.length - 1].trim() && i.pop(), e) + if (i.length > e) + i.splice(e); + else + for (; i.length < e; ) + i.push(""); + for (; s < i.length; s++) + i[s] = i[s].trim().replace(/\\\|/g, "|"); + return i; +} +function go(n, e, t) { + const i = n.length; + if (i === 0) + return ""; + let s = 0; + for (; s < i && n.charAt(i - s - 1) === e; ) + s++; + return n.slice(0, i - s); +} +function V1(n, e) { + if (n.indexOf(e[1]) === -1) + return -1; + let t = 0; + for (let i = 0; i < n.length; i++) + if (n[i] === "\\") + i++; + else if (n[i] === e[0]) + t++; + else if (n[i] === e[1] && (t--, t < 0)) + return i; + return -1; +} +function dm(n, e, t, i) { + const s = e.href, r = e.title ? Gt(e.title) : null, a = n[1].replace(/\\([\[\]])/g, "$1"); + if (n[0].charAt(0) !== "!") { + i.state.inLink = !0; + const o = { + type: "link", + raw: t, + href: s, + title: r, + text: a, + tokens: i.inlineTokens(a) + }; + return i.state.inLink = !1, o; + } + return { + type: "image", + raw: t, + href: s, + title: r, + text: Gt(a) + }; +} +function q1(n, e) { + const t = n.match(/^(\s+)(?:```)/); + if (t === null) + return e; + const i = t[1]; + return e.split(` +`).map((s) => { + const r = s.match(/^\s+/); + if (r === null) + return s; + const [a] = r; + return a.length >= i.length ? s.slice(i.length) : s; + }).join(` +`); +} +class Dl { + // set by the lexer + constructor(e) { + de(this, "options"); + de(this, "rules"); + // set by the lexer + de(this, "lexer"); + this.options = e || ks; + } + space(e) { + const t = this.rules.block.newline.exec(e); + if (t && t[0].length > 0) + return { + type: "space", + raw: t[0] + }; + } + code(e) { + const t = this.rules.block.code.exec(e); + if (t) { + const i = t[0].replace(/^ {1,4}/gm, ""); + return { + type: "code", + raw: t[0], + codeBlockStyle: "indented", + text: this.options.pedantic ? i : go(i, ` +`) + }; + } + } + fences(e) { + const t = this.rules.block.fences.exec(e); + if (t) { + const i = t[0], s = q1(i, t[3] || ""); + return { + type: "code", + raw: i, + lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], + text: s + }; + } + } + heading(e) { + const t = this.rules.block.heading.exec(e); + if (t) { + let i = t[2].trim(); + if (/#$/.test(i)) { + const s = go(i, "#"); + (this.options.pedantic || !s || / $/.test(s)) && (i = s.trim()); + } + return { + type: "heading", + raw: t[0], + depth: t[1].length, + text: i, + tokens: this.lexer.inline(i) + }; + } + } + hr(e) { + const t = this.rules.block.hr.exec(e); + if (t) + return { + type: "hr", + raw: t[0] + }; + } + blockquote(e) { + const t = this.rules.block.blockquote.exec(e); + if (t) { + let i = t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, ` + $1`); + i = go(i.replace(/^ *>[ \t]?/gm, ""), ` +`); + const s = this.lexer.state.top; + this.lexer.state.top = !0; + const r = this.lexer.blockTokens(i); + return this.lexer.state.top = s, { + type: "blockquote", + raw: t[0], + tokens: r, + text: i + }; + } + } + list(e) { + let t = this.rules.block.list.exec(e); + if (t) { + let i = t[1].trim(); + const s = i.length > 1, r = { + type: "list", + raw: "", + ordered: s, + start: s ? +i.slice(0, -1) : "", + loose: !1, + items: [] + }; + i = s ? `\\d{1,9}\\${i.slice(-1)}` : `\\${i}`, this.options.pedantic && (i = s ? i : "[*+-]"); + const a = new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`); + let o = "", u = "", l = !1; + for (; e; ) { + let c = !1; + if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) + break; + o = t[0], e = e.substring(o.length); + let h = t[2].split(` +`, 1)[0].replace(/^\t+/, (y) => " ".repeat(3 * y.length)), d = e.split(` +`, 1)[0], f = 0; + this.options.pedantic ? (f = 2, u = h.trimStart()) : (f = t[2].search(/[^ ]/), f = f > 4 ? 1 : f, u = h.slice(f), f += t[1].length); + let m = !1; + if (!h && /^ *$/.test(d) && (o += d + ` +`, e = e.substring(d.length + 1), c = !0), !c) { + const y = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), v = new RegExp(`^ {0,${Math.min(3, f - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:\`\`\`|~~~)`), E = new RegExp(`^ {0,${Math.min(3, f - 1)}}#`); + for (; e; ) { + const T = e.split(` +`, 1)[0]; + if (d = T, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || E.test(d) || y.test(d) || v.test(e)) + break; + if (d.search(/[^ ]/) >= f || !d.trim()) + u += ` +` + d.slice(f); + else { + if (m || h.search(/[^ ]/) >= 4 || _.test(h) || E.test(h) || v.test(h)) + break; + u += ` +` + d; + } + !m && !d.trim() && (m = !0), o += T + ` +`, e = e.substring(T.length + 1), h = d.slice(f); + } + } + r.loose || (l ? r.loose = !0 : /\n *\n *$/.test(o) && (l = !0)); + let g = null, p; + this.options.gfm && (g = /^\[[ xX]\] /.exec(u), g && (p = g[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), r.items.push({ + type: "list_item", + raw: o, + task: !!g, + checked: p, + loose: !1, + text: u, + tokens: [] + }), r.raw += o; + } + r.items[r.items.length - 1].raw = o.trimEnd(), r.items[r.items.length - 1].text = u.trimEnd(), r.raw = r.raw.trimEnd(); + for (let c = 0; c < r.items.length; c++) + if (this.lexer.state.top = !1, r.items[c].tokens = this.lexer.blockTokens(r.items[c].text, []), !r.loose) { + const h = r.items[c].tokens.filter((f) => f.type === "space"), d = h.length > 0 && h.some((f) => /\n.*\n/.test(f.raw)); + r.loose = d; + } + if (r.loose) + for (let c = 0; c < r.items.length; c++) + r.items[c].loose = !0; + return r; + } + } + html(e) { + const t = this.rules.block.html.exec(e); + if (t) + return { + type: "html", + block: !0, + raw: t[0], + pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", + text: t[0] + }; + } + def(e) { + const t = this.rules.block.def.exec(e); + if (t) { + const i = t[1].toLowerCase().replace(/\s+/g, " "), s = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3]; + return { + type: "def", + tag: i, + raw: t[0], + href: s, + title: r + }; + } + } + table(e) { + const t = this.rules.block.table.exec(e); + if (!t || !/[:|]/.test(t[2])) + return; + const i = hm(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(` +`) : [], a = { + type: "table", + raw: t[0], + header: [], + align: [], + rows: [] + }; + if (i.length === s.length) { + for (const o of s) + /^ *-+: *$/.test(o) ? a.align.push("right") : /^ *:-+: *$/.test(o) ? a.align.push("center") : /^ *:-+ *$/.test(o) ? a.align.push("left") : a.align.push(null); + for (const o of i) + a.header.push({ + text: o, + tokens: this.lexer.inline(o) + }); + for (const o of r) + a.rows.push(hm(o, a.header.length).map((u) => ({ + text: u, + tokens: this.lexer.inline(u) + }))); + return a; + } + } + lheading(e) { + const t = this.rules.block.lheading.exec(e); + if (t) + return { + type: "heading", + raw: t[0], + depth: t[2].charAt(0) === "=" ? 1 : 2, + text: t[1], + tokens: this.lexer.inline(t[1]) + }; + } + paragraph(e) { + const t = this.rules.block.paragraph.exec(e); + if (t) { + const i = t[1].charAt(t[1].length - 1) === ` +` ? t[1].slice(0, -1) : t[1]; + return { + type: "paragraph", + raw: t[0], + text: i, + tokens: this.lexer.inline(i) + }; + } + } + text(e) { + const t = this.rules.block.text.exec(e); + if (t) + return { + type: "text", + raw: t[0], + text: t[0], + tokens: this.lexer.inline(t[0]) + }; + } + escape(e) { + const t = this.rules.inline.escape.exec(e); + if (t) + return { + type: "escape", + raw: t[0], + text: Gt(t[1]) + }; + } + tag(e) { + const t = this.rules.inline.tag.exec(e); + if (t) + return !this.lexer.state.inLink && /^/i.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0]) && (this.lexer.state.inRawBlock = !1), { + type: "html", + raw: t[0], + inLink: this.lexer.state.inLink, + inRawBlock: this.lexer.state.inRawBlock, + block: !1, + text: t[0] + }; + } + link(e) { + const t = this.rules.inline.link.exec(e); + if (t) { + const i = t[2].trim(); + if (!this.options.pedantic && /^$/.test(i)) + return; + const a = go(i.slice(0, -1), "\\"); + if ((i.length - a.length) % 2 === 0) + return; + } else { + const a = V1(t[2], "()"); + if (a > -1) { + const u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + a; + t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, u).trim(), t[3] = ""; + } + } + let s = t[2], r = ""; + if (this.options.pedantic) { + const a = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s); + a && (s = a[1], r = a[3]); + } else + r = t[3] ? t[3].slice(1, -1) : ""; + return s = s.trim(), /^$/.test(i) ? s = s.slice(1) : s = s.slice(1, -1)), dm(t, { + href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), + title: r && r.replace(this.rules.inline.anyPunctuation, "$1") + }, t[0], this.lexer); + } + } + reflink(e, t) { + let i; + if ((i = this.rules.inline.reflink.exec(e)) || (i = this.rules.inline.nolink.exec(e))) { + const s = (i[2] || i[1]).replace(/\s+/g, " "), r = t[s.toLowerCase()]; + if (!r) { + const a = i[0].charAt(0); + return { + type: "text", + raw: a, + text: a + }; + } + return dm(i, r, i[0], this.lexer); + } + } + emStrong(e, t, i = "") { + let s = this.rules.inline.emStrongLDelim.exec(e); + if (!s || s[3] && i.match(/[\p{L}\p{N}]/u)) + return; + if (!(s[1] || s[2] || "") || !i || this.rules.inline.punctuation.exec(i)) { + const a = [...s[0]].length - 1; + let o, u, l = a, c = 0; + const h = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; + for (h.lastIndex = 0, t = t.slice(-1 * e.length + a); (s = h.exec(t)) != null; ) { + if (o = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o) + continue; + if (u = [...o].length, s[3] || s[4]) { + l += u; + continue; + } else if ((s[5] || s[6]) && a % 3 && !((a + u) % 3)) { + c += u; + continue; + } + if (l -= u, l > 0) + continue; + u = Math.min(u, u + l + c); + const d = [...s[0]][0].length, f = e.slice(0, a + s.index + d + u); + if (Math.min(a, u) % 2) { + const g = f.slice(1, -1); + return { + type: "em", + raw: f, + text: g, + tokens: this.lexer.inlineTokens(g) + }; + } + const m = f.slice(2, -2); + return { + type: "strong", + raw: f, + text: m, + tokens: this.lexer.inlineTokens(m) + }; + } + } + } + codespan(e) { + const t = this.rules.inline.code.exec(e); + if (t) { + let i = t[2].replace(/\n/g, " "); + const s = /[^ ]/.test(i), r = /^ /.test(i) && / $/.test(i); + return s && r && (i = i.substring(1, i.length - 1)), i = Gt(i, !0), { + type: "codespan", + raw: t[0], + text: i + }; + } + } + br(e) { + const t = this.rules.inline.br.exec(e); + if (t) + return { + type: "br", + raw: t[0] + }; + } + del(e) { + const t = this.rules.inline.del.exec(e); + if (t) + return { + type: "del", + raw: t[0], + text: t[2], + tokens: this.lexer.inlineTokens(t[2]) + }; + } + autolink(e) { + const t = this.rules.inline.autolink.exec(e); + if (t) { + let i, s; + return t[2] === "@" ? (i = Gt(t[1]), s = "mailto:" + i) : (i = Gt(t[1]), s = i), { + type: "link", + raw: t[0], + text: i, + href: s, + tokens: [ + { + type: "text", + raw: i, + text: i + } + ] + }; + } + } + url(e) { + var i; + let t; + if (t = this.rules.inline.url.exec(e)) { + let s, r; + if (t[2] === "@") + s = Gt(t[0]), r = "mailto:" + s; + else { + let a; + do + a = t[0], t[0] = ((i = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : i[0]) ?? ""; + while (a !== t[0]); + s = Gt(t[0]), t[1] === "www." ? r = "http://" + t[0] : r = t[0]; + } + return { + type: "link", + raw: t[0], + text: s, + href: r, + tokens: [ + { + type: "text", + raw: s, + text: s + } + ] + }; + } + } + inlineText(e) { + const t = this.rules.inline.text.exec(e); + if (t) { + let i; + return this.lexer.state.inRawBlock ? i = t[0] : i = Gt(t[0]), { + type: "text", + raw: t[0], + text: i + }; + } + } +} +const K1 = /^(?: *(?:\n|$))+/, j1 = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, z1 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Qa = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, W1 = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q_ = /(?:[*+-]|\d{1,9}[.)])/, Z_ = Ce(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Q_).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), jd = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Y1 = /^[^\n]+/, zd = /(?!\s*\])(?:\\.|[^\[\]\\])+/, X1 = Ce(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", zd).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Q1 = Ce(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q_).getRegex(), ru = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Wd = /|$))/, Z1 = Ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Wd).replace("tag", ru).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), J_ = Ce(jd).replace("hr", Qa).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", ")|<(?:script|pre|style|textarea|!--)").replace("tag", ru).getRegex(), J1 = Ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", J_).getRegex(), Yd = { + blockquote: J1, + code: j1, + def: X1, + fences: z1, + heading: W1, + hr: Qa, + html: Z1, + lheading: Z_, + list: Q1, + newline: K1, + paragraph: J_, + table: Ta, + text: Y1 +}, fm = Ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Qa).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", ")|<(?:script|pre|style|textarea|!--)").replace("tag", ru).getRegex(), eb = { + ...Yd, + table: fm, + paragraph: Ce(jd).replace("hr", Qa).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fm).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", ru).getRegex() +}, tb = { + ...Yd, + html: Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Wd).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(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^(#{1,6})(.*)(?:\n+|$)/, + fences: Ta, + // fences not supported + lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + paragraph: Ce(jd).replace("hr", Qa).replace("heading", ` *#{1,6} *[^ +]`).replace("lheading", Z_).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() +}, ev = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ib = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, tv = /^( {2,}|\\)\n(?!\s*$)/, nb = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, ab = Ce(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Za).getRegex(), ob = Ce("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Za).getRegex(), lb = Ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Za).getRegex(), ub = Ce(/\\([punct])/, "gu").replace(/punct/g, Za).getRegex(), cb = Ce(/^<(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(), hb = Ce(Wd).replace("(?:-->|$)", "-->").getRegex(), db = Ce("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", hb).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), wl = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, fb = Ce(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", wl).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), iv = Ce(/^!?\[(label)\]\[(ref)\]/).replace("label", wl).replace("ref", zd).getRegex(), nv = Ce(/^!?\[(ref)\](?:\[\])?/).replace("ref", zd).getRegex(), mb = Ce("reflink|nolink(?!\\()", "g").replace("reflink", iv).replace("nolink", nv).getRegex(), Xd = { + _backpedal: Ta, + // only used for GFM url + anyPunctuation: ub, + autolink: cb, + blockSkip: rb, + br: tv, + code: ib, + del: Ta, + emStrongLDelim: ab, + emStrongRDelimAst: ob, + emStrongRDelimUnd: lb, + escape: ev, + link: fb, + nolink: nv, + punctuation: sb, + reflink: iv, + reflinkSearch: mb, + tag: db, + text: nb, + url: Ta +}, gb = { + ...Xd, + link: Ce(/^!?\[(label)\]\((.*?)\)/).replace("label", wl).getRegex(), + reflink: Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", wl).getRegex() +}, Vh = { + ...Xd, + escape: Ce(ev).replace("])", "~|])").getRegex(), + url: Ce(/^((?: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(), + _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, + del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, + text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ u + " ".repeat(l.length)); + let i, s, r, a; + for (; e; ) + if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((o) => (i = o.call({ lexer: this }, e, t)) ? (e = e.substring(i.raw.length), t.push(i), !0) : !1))) { + if (i = this.tokenizer.space(e)) { + e = e.substring(i.raw.length), i.raw.length === 1 && t.length > 0 ? t[t.length - 1].raw += ` +` : t.push(i); + continue; + } + if (i = this.tokenizer.code(e)) { + e = e.substring(i.raw.length), s = t[t.length - 1], s && (s.type === "paragraph" || s.type === "text") ? (s.raw += ` +` + i.raw, s.text += ` +` + i.text, this.inlineQueue[this.inlineQueue.length - 1].src = s.text) : t.push(i); + continue; + } + if (i = this.tokenizer.fences(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.heading(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.hr(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.blockquote(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.list(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.html(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.def(e)) { + e = e.substring(i.raw.length), s = t[t.length - 1], s && (s.type === "paragraph" || s.type === "text") ? (s.raw += ` +` + i.raw, s.text += ` +` + i.raw, this.inlineQueue[this.inlineQueue.length - 1].src = s.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { + href: i.href, + title: i.title + }); + continue; + } + if (i = this.tokenizer.table(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.lheading(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (r = e, this.options.extensions && this.options.extensions.startBlock) { + let o = 1 / 0; + const u = e.slice(1); + let l; + this.options.extensions.startBlock.forEach((c) => { + l = c.call({ lexer: this }, u), typeof l == "number" && l >= 0 && (o = Math.min(o, l)); + }), o < 1 / 0 && o >= 0 && (r = e.substring(0, o + 1)); + } + if (this.state.top && (i = this.tokenizer.paragraph(r))) { + s = t[t.length - 1], a && s.type === "paragraph" ? (s.raw += ` +` + i.raw, s.text += ` +` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = s.text) : t.push(i), a = r.length !== e.length, e = e.substring(i.raw.length); + continue; + } + if (i = this.tokenizer.text(e)) { + e = e.substring(i.raw.length), s = t[t.length - 1], s && s.type === "text" ? (s.raw += ` +` + i.raw, s.text += ` +` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = s.text) : t.push(i); + continue; + } + if (e) { + const o = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(o); + break; + } else + throw new Error(o); + } + } + return this.state.top = !0, t; + } + inline(e, t = []) { + return this.inlineQueue.push({ src: e, tokens: t }), t; + } + /** + * Lexing/Compiling + */ + inlineTokens(e, t = []) { + let i, s, r, a = e, o, u, l; + if (this.tokens.links) { + const c = Object.keys(this.tokens.links); + if (c.length > 0) + for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; ) + c.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); + } + for (; (o = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; ) + a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; ) + a = a.slice(0, o.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); + for (; e; ) + if (u || (l = ""), u = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (i = c.call({ lexer: this }, e, t)) ? (e = e.substring(i.raw.length), t.push(i), !0) : !1))) { + if (i = this.tokenizer.escape(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.tag(e)) { + e = e.substring(i.raw.length), s = t[t.length - 1], s && i.type === "text" && s.type === "text" ? (s.raw += i.raw, s.text += i.text) : t.push(i); + continue; + } + if (i = this.tokenizer.link(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.reflink(e, this.tokens.links)) { + e = e.substring(i.raw.length), s = t[t.length - 1], s && i.type === "text" && s.type === "text" ? (s.raw += i.raw, s.text += i.text) : t.push(i); + continue; + } + if (i = this.tokenizer.emStrong(e, a, l)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.codespan(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.br(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.del(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (i = this.tokenizer.autolink(e)) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (!this.state.inLink && (i = this.tokenizer.url(e))) { + e = e.substring(i.raw.length), t.push(i); + continue; + } + if (r = e, this.options.extensions && this.options.extensions.startInline) { + let c = 1 / 0; + const h = e.slice(1); + let d; + this.options.extensions.startInline.forEach((f) => { + d = f.call({ lexer: this }, h), typeof d == "number" && d >= 0 && (c = Math.min(c, d)); + }), c < 1 / 0 && c >= 0 && (r = e.substring(0, c + 1)); + } + if (i = this.tokenizer.inlineText(r)) { + e = e.substring(i.raw.length), i.raw.slice(-1) !== "_" && (l = i.raw.slice(-1)), u = !0, s = t[t.length - 1], s && s.type === "text" ? (s.raw += i.raw, s.text += i.text) : t.push(i); + continue; + } + if (e) { + const c = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(c); + break; + } else + throw new Error(c); + } + } + return t; + } +} +class Ll { + constructor(e) { + de(this, "options"); + this.options = e || ks; + } + code(e, t, i) { + var r; + const s = (r = (t || "").match(/^\S*/)) == null ? void 0 : r[0]; + return e = e.replace(/\n$/, "") + ` +`, s ? '
' + (i ? e : Gt(e, !0)) + `
+` : "
" + (i ? e : Gt(e, !0)) + `
+`; + } + blockquote(e) { + return `
+${e}
+`; + } + html(e, t) { + return e; + } + heading(e, t, i) { + return `${e} +`; + } + hr() { + return `
+`; + } + list(e, t, i) { + const s = t ? "ol" : "ul", r = t && i !== 1 ? ' start="' + i + '"' : ""; + return "<" + s + r + `> +` + e + " +`; + } + listitem(e, t, i) { + return `
  • ${e}
  • +`; + } + checkbox(e) { + return "'; + } + paragraph(e) { + return `

    ${e}

    +`; + } + table(e, t) { + return t && (t = `${t}`), ` + +` + e + ` +` + t + `
    +`; + } + tablerow(e) { + return ` +${e} +`; + } + tablecell(e, t) { + const i = t.header ? "th" : "td"; + return (t.align ? `<${i} align="${t.align}">` : `<${i}>`) + e + ` +`; + } + /** + * span level renderer + */ + strong(e) { + return `${e}`; + } + em(e) { + return `${e}`; + } + codespan(e) { + return `${e}`; + } + br() { + return "
    "; + } + del(e) { + return `${e}`; + } + link(e, t, i) { + const s = cm(e); + if (s === null) + return i; + e = s; + let r = '
    ", r; + } + image(e, t, i) { + const s = cm(e); + if (s === null) + return i; + e = s; + let r = `${i} 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = p + " " + d.tokens[0].text, d.tokens[0].tokens && d.tokens[0].tokens.length > 0 && d.tokens[0].tokens[0].type === "text" && (d.tokens[0].tokens[0].text = p + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({ + type: "text", + text: p + " " + }) : g += p + " "; + } + g += this.parse(d.tokens, l), c += this.renderer.listitem(g, m, !!f); + } + i += this.renderer.list(c, o, u); + continue; + } + case "html": { + const a = r; + i += this.renderer.html(a.text, a.block); + continue; + } + case "paragraph": { + const a = r; + i += this.renderer.paragraph(this.parseInline(a.tokens)); + continue; + } + case "text": { + let a = r, o = a.tokens ? this.parseInline(a.tokens) : a.text; + for (; s + 1 < e.length && e[s + 1].type === "text"; ) + a = e[++s], o += ` +` + (a.tokens ? this.parseInline(a.tokens) : a.text); + i += t ? this.renderer.paragraph(o) : o; + continue; + } + default: { + const a = 'Token with "' + r.type + '" type was not found.'; + if (this.options.silent) + return console.error(a), ""; + throw new Error(a); + } + } + } + return i; + } + /** + * Parse Inline Tokens + */ + parseInline(e, t) { + t = t || this.renderer; + let i = ""; + for (let s = 0; s < e.length; s++) { + const r = e[s]; + if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[r.type]) { + const a = this.options.extensions.renderers[r.type].call({ parser: this }, r); + if (a !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r.type)) { + i += a || ""; + continue; + } + } + switch (r.type) { + case "escape": { + const a = r; + i += t.text(a.text); + break; + } + case "html": { + const a = r; + i += t.html(a.text); + break; + } + case "link": { + const a = r; + i += t.link(a.href, a.title, this.parseInline(a.tokens, t)); + break; + } + case "image": { + const a = r; + i += t.image(a.href, a.title, a.text); + break; + } + case "strong": { + const a = r; + i += t.strong(this.parseInline(a.tokens, t)); + break; + } + case "em": { + const a = r; + i += t.em(this.parseInline(a.tokens, t)); + break; + } + case "codespan": { + const a = r; + i += t.codespan(a.text); + break; + } + case "br": { + i += t.br(); + break; + } + case "del": { + const a = r; + i += t.del(this.parseInline(a.tokens, t)); + break; + } + case "text": { + const a = r; + i += t.text(a.text); + break; + } + default: { + const a = 'Token with "' + r.type + '" type was not found.'; + if (this.options.silent) + return console.error(a), ""; + throw new Error(a); + } + } + } + return i; + } +} +class Sa { + constructor(e) { + de(this, "options"); + this.options = e || ks; + } + /** + * Process markdown before marked + */ + preprocess(e) { + return e; + } + /** + * Process HTML after marked is finished + */ + postprocess(e) { + return e; + } + /** + * Process all tokens before walk tokens + */ + processAllTokens(e) { + return e; + } +} +de(Sa, "passThroughHooks", /* @__PURE__ */ new Set([ + "preprocess", + "postprocess", + "processAllTokens" +])); +var Is, qh, sv; +class _b { + constructor(...e) { + Mi(this, Is); + de(this, "defaults", Kd()); + de(this, "options", this.setOptions); + de(this, "parse", mo(this, Is, qh).call(this, Yi.lex, Xi.parse)); + de(this, "parseInline", mo(this, Is, qh).call(this, Yi.lexInline, Xi.parseInline)); + de(this, "Parser", Xi); + de(this, "Renderer", Ll); + de(this, "TextRenderer", Qd); + de(this, "Lexer", Yi); + de(this, "Tokenizer", Dl); + de(this, "Hooks", Sa); + this.use(...e); + } + /** + * Run callback for every token + */ + walkTokens(e, t) { + var s, r; + let i = []; + for (const a of e) + switch (i = i.concat(t.call(this, a)), a.type) { + case "table": { + const o = a; + for (const u of o.header) + i = i.concat(this.walkTokens(u.tokens, t)); + for (const u of o.rows) + for (const l of u) + i = i.concat(this.walkTokens(l.tokens, t)); + break; + } + case "list": { + const o = a; + i = i.concat(this.walkTokens(o.items, t)); + break; + } + default: { + const o = a; + (r = (s = this.defaults.extensions) == null ? void 0 : s.childTokens) != null && r[o.type] ? this.defaults.extensions.childTokens[o.type].forEach((u) => { + const l = o[u].flat(1 / 0); + i = i.concat(this.walkTokens(l, t)); + }) : o.tokens && (i = i.concat(this.walkTokens(o.tokens, t))); + } + } + return i; + } + use(...e) { + const t = this.defaults.extensions || { renderers: {}, childTokens: {} }; + return e.forEach((i) => { + const s = { ...i }; + if (s.async = this.defaults.async || s.async || !1, i.extensions && (i.extensions.forEach((r) => { + if (!r.name) + throw new Error("extension name required"); + if ("renderer" in r) { + const a = t.renderers[r.name]; + a ? t.renderers[r.name] = function(...o) { + let u = r.renderer.apply(this, o); + return u === !1 && (u = a.apply(this, o)), u; + } : t.renderers[r.name] = r.renderer; + } + if ("tokenizer" in r) { + if (!r.level || r.level !== "block" && r.level !== "inline") + throw new Error("extension level must be 'block' or 'inline'"); + const a = t[r.level]; + a ? a.unshift(r.tokenizer) : t[r.level] = [r.tokenizer], r.start && (r.level === "block" ? t.startBlock ? t.startBlock.push(r.start) : t.startBlock = [r.start] : r.level === "inline" && (t.startInline ? t.startInline.push(r.start) : t.startInline = [r.start])); + } + "childTokens" in r && r.childTokens && (t.childTokens[r.name] = r.childTokens); + }), s.extensions = t), i.renderer) { + const r = this.defaults.renderer || new Ll(this.defaults); + for (const a in i.renderer) { + if (!(a in r)) + throw new Error(`renderer '${a}' does not exist`); + if (a === "options") + continue; + const o = a, u = i.renderer[o], l = r[o]; + r[o] = (...c) => { + let h = u.apply(r, c); + return h === !1 && (h = l.apply(r, c)), h || ""; + }; + } + s.renderer = r; + } + if (i.tokenizer) { + const r = this.defaults.tokenizer || new Dl(this.defaults); + for (const a in i.tokenizer) { + if (!(a in r)) + throw new Error(`tokenizer '${a}' does not exist`); + if (["options", "rules", "lexer"].includes(a)) + continue; + const o = a, u = i.tokenizer[o], l = r[o]; + r[o] = (...c) => { + let h = u.apply(r, c); + return h === !1 && (h = l.apply(r, c)), h; + }; + } + s.tokenizer = r; + } + if (i.hooks) { + const r = this.defaults.hooks || new Sa(); + for (const a in i.hooks) { + if (!(a in r)) + throw new Error(`hook '${a}' does not exist`); + if (a === "options") + continue; + const o = a, u = i.hooks[o], l = r[o]; + Sa.passThroughHooks.has(a) ? r[o] = (c) => { + if (this.defaults.async) + return Promise.resolve(u.call(r, c)).then((d) => l.call(r, d)); + const h = u.call(r, c); + return l.call(r, h); + } : r[o] = (...c) => { + let h = u.apply(r, c); + return h === !1 && (h = l.apply(r, c)), h; + }; + } + s.hooks = r; + } + if (i.walkTokens) { + const r = this.defaults.walkTokens, a = i.walkTokens; + s.walkTokens = function(o) { + let u = []; + return u.push(a.call(this, o)), r && (u = u.concat(r.call(this, o))), u; + }; + } + this.defaults = { ...this.defaults, ...s }; + }), this; + } + setOptions(e) { + return this.defaults = { ...this.defaults, ...e }, this; + } + lexer(e, t) { + return Yi.lex(e, t ?? this.defaults); + } + parser(e, t) { + return Xi.parse(e, t ?? this.defaults); + } +} +Is = new WeakSet(), qh = function(e, t) { + return (i, s) => { + const r = { ...s }, a = { ...this.defaults, ...r }; + this.defaults.async === !0 && r.async === !1 && (a.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), a.async = !0); + const o = mo(this, Is, sv).call(this, !!a.silent, !!a.async); + if (typeof i > "u" || i === null) + return o(new Error("marked(): input parameter is undefined or null")); + if (typeof i != "string") + return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(i) + ", string expected")); + if (a.hooks && (a.hooks.options = a), a.async) + return Promise.resolve(a.hooks ? a.hooks.preprocess(i) : i).then((u) => e(u, a)).then((u) => a.hooks ? a.hooks.processAllTokens(u) : u).then((u) => a.walkTokens ? Promise.all(this.walkTokens(u, a.walkTokens)).then(() => u) : u).then((u) => t(u, a)).then((u) => a.hooks ? a.hooks.postprocess(u) : u).catch(o); + try { + a.hooks && (i = a.hooks.preprocess(i)); + let u = e(i, a); + a.hooks && (u = a.hooks.processAllTokens(u)), a.walkTokens && this.walkTokens(u, a.walkTokens); + let l = t(u, a); + return a.hooks && (l = a.hooks.postprocess(l)), l; + } catch (u) { + return o(u); + } + }; +}, sv = function(e, t) { + return (i) => { + if (i.message += ` +Please report this to https://github.com/markedjs/marked.`, e) { + const s = "

    An error occurred:

    " + Gt(i.message + "", !0) + "
    "; + return t ? Promise.resolve(s) : s; + } + if (t) + return Promise.reject(i); + throw i; + }; +}; +const As = new _b(); +function ke(n, e) { + return As.parse(n, e); +} +ke.options = ke.setOptions = function(n) { + return As.setOptions(n), ke.defaults = As.defaults, W_(ke.defaults), ke; +}; +ke.getDefaults = Kd; +ke.defaults = ks; +ke.use = function(...n) { + return As.use(...n), ke.defaults = As.defaults, W_(ke.defaults), ke; +}; +ke.walkTokens = function(n, e) { + return As.walkTokens(n, e); +}; +ke.parseInline = As.parseInline; +ke.Parser = Xi; +ke.parser = Xi.parse; +ke.Renderer = Ll; +ke.TextRenderer = Qd; +ke.Lexer = Yi; +ke.lexer = Yi.lex; +ke.Tokenizer = Dl; +ke.Hooks = Sa; +ke.parse = ke; +ke.options; +ke.setOptions; +ke.use; +ke.walkTokens; +ke.parseInline; +Xi.parse; +Yi.lex; +const vb = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0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-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30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D4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, yb = Object.hasOwnProperty; +class rv { + /** + * Create a new slug class. + */ + constructor() { + this.occurrences, this.reset(); + } + /** + * Generate a unique slug. + * + * Tracks previously generated slugs: repeated calls with the same value + * will result in different slugs. + * Use the `slug` function to get same slugs. + * + * @param {string} value + * String of text to slugify + * @param {boolean} [maintainCase=false] + * Keep the current case, otherwise make all lowercase + * @return {string} + * A unique slug string + */ + slug(e, t) { + const i = this; + let s = Eb(e, t === !0); + const r = s; + for (; yb.call(i.occurrences, s); ) + i.occurrences[r]++, s = r + "-" + i.occurrences[r]; + return i.occurrences[s] = 0, s; + } + /** + * Reset - Forget all previous slugs + * + * @return void + */ + reset() { + this.occurrences = /* @__PURE__ */ Object.create(null); + } +} +function Eb(n, e) { + return typeof n != "string" ? "" : (e || (n = n.toLowerCase()), n.replace(vb, "").replace(/ /g, "-")); +} +new rv(); +var mm = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, bb = { exports: {} }; +(function(n) { + var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {}; + /** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ + var t = function(i) { + var s = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, r = 0, a = {}, o = { + /** + * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the + * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load + * additional languages or plugins yourself. + * + * By setting this value to `true`, Prism will not automatically highlight all code elements on the page. + * + * You obviously have to change this value before the automatic highlighting started. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.manual = true; + * // add a new