diff --git "a/src/backend/gradio_markdownlabel/templates/component/index.js" "b/src/backend/gradio_markdownlabel/templates/component/index.js"
--- "a/src/backend/gradio_markdownlabel/templates/component/index.js"
+++ "b/src/backend/gradio_markdownlabel/templates/component/index.js"
@@ -1,11 +1,11 @@
-var Uo = Object.defineProperty;
+var zo = Object.defineProperty;
var wa = (l) => {
throw TypeError(l);
};
-var Go = (l, e, t) => e in l ? Uo(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
-var ee = (l, e, t) => Go(l, typeof e != "symbol" ? e + "" : e, t), Vo = (l, e, t) => e.has(l) || wa("Cannot " + t);
+var Ho = (l, e, t) => e in l ? zo(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
+var J = (l, e, t) => Ho(l, typeof e != "symbol" ? e + "" : e, t), Uo = (l, e, t) => e.has(l) || wa("Cannot " + t);
var ya = (l, e, t) => e.has(l) ? wa("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(l) : e.set(l, t);
-var vn = (l, e, t) => (Vo(l, e, "access private method"), t);
+var vn = (l, e, t) => (Uo(l, e, "access private method"), t);
function Gi() {
return {
async: !1,
@@ -21,36 +21,36 @@ function Gi() {
};
}
let St = Gi();
-function Hl(l) {
+function Pl(l) {
St = l;
}
-const Ul = /[&<>"']/, jo = new RegExp(Ul.source, "g"), Gl = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Wo = new RegExp(Gl.source, "g"), Zo = {
+const zl = /[&<>"']/, Go = new RegExp(zl.source, "g"), Hl = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Vo = new RegExp(Hl.source, "g"), jo = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
-}, ka = (l) => Zo[l];
-function Te(l, e) {
+}, ka = (l) => jo[l];
+function Re(l, e) {
if (e) {
- if (Ul.test(l))
- return l.replace(jo, ka);
- } else if (Gl.test(l))
- return l.replace(Wo, ka);
+ if (zl.test(l))
+ return l.replace(Go, ka);
+ } else if (Hl.test(l))
+ return l.replace(Vo, ka);
return l;
}
-const Yo = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
-function Xo(l) {
- return l.replace(Yo, (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 Wo = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
+function Zo(l) {
+ return l.replace(Wo, (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 Ko = /(^|[^\[])\^/g;
-function Q(l, e) {
+const Yo = /(^|[^\[])\^/g;
+function K(l, e) {
let t = typeof l == "string" ? l : l.source;
e = e || "";
const n = {
replace: (i, a) => {
let o = typeof a == "string" ? a : a.source;
- return o = o.replace(Ko, "$1"), t = t.replace(i, o), n;
+ return o = o.replace(Yo, "$1"), t = t.replace(i, o), n;
},
getRegex: () => new RegExp(t, e)
};
@@ -92,7 +92,7 @@ function bn(l, e, t) {
i++;
return l.slice(0, n - i);
}
-function Qo(l, e) {
+function Xo(l, e) {
if (l.indexOf(e[1]) === -1)
return -1;
let t = 0;
@@ -106,7 +106,7 @@ function Qo(l, e) {
return -1;
}
function Ea(l, e, t, n) {
- const i = e.href, a = e.title ? Te(e.title) : null, o = l[1].replace(/\\([\[\]])/g, "$1");
+ const i = e.href, a = e.title ? Re(e.title) : null, o = l[1].replace(/\\([\[\]])/g, "$1");
if (l[0].charAt(0) !== "!") {
n.state.inLink = !0;
const r = {
@@ -124,10 +124,10 @@ function Ea(l, e, t, n) {
raw: t,
href: i,
title: a,
- text: Te(o)
+ text: Re(o)
};
}
-function Jo(l, e) {
+function Ko(l, e) {
const t = l.match(/^(\s+)(?:```)/);
if (t === null)
return e;
@@ -142,13 +142,13 @@ function Jo(l, e) {
}).join(`
`);
}
-class Nn {
+class Mn {
// set by the lexer
constructor(e) {
- ee(this, "options");
- ee(this, "rules");
+ J(this, "options");
+ J(this, "rules");
// set by the lexer
- ee(this, "lexer");
+ J(this, "lexer");
this.options = e || St;
}
space(e) {
@@ -175,7 +175,7 @@ class Nn {
fences(e) {
const t = this.rules.block.fences.exec(e);
if (t) {
- const n = t[0], i = Jo(n, t[3] || "");
+ const n = t[0], i = Ko(n, t[3] || "");
return {
type: "code",
raw: n,
@@ -248,37 +248,37 @@ class Nn {
break;
r = t[0], e = e.substring(r.length);
let f = t[2].split(`
-`, 1)[0].replace(/^\t+/, (w) => " ".repeat(3 * w.length)), d = e.split(`
+`, 1)[0].replace(/^\t+/, (F) => " ".repeat(3 * F.length)), d = e.split(`
`, 1)[0], h = 0;
this.options.pedantic ? (h = 2, s = f.trimStart()) : (h = t[2].search(/[^ ]/), h = h > 4 ? 1 : h, s = f.slice(h), h += t[1].length);
- let m = !1;
+ let p = !1;
if (!f && /^ *$/.test(d) && (r += d + `
`, e = e.substring(d.length + 1), c = !0), !c) {
- const w = new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), p = new RegExp(`^ {0,${Math.min(3, h - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:\`\`\`|~~~)`), b = new RegExp(`^ {0,${Math.min(3, h - 1)}}#`);
+ const F = new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), g = new RegExp(`^ {0,${Math.min(3, h - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:\`\`\`|~~~)`), D = new RegExp(`^ {0,${Math.min(3, h - 1)}}#`);
for (; e; ) {
const y = e.split(`
`, 1)[0];
- if (d = y, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || b.test(d) || w.test(d) || p.test(e))
+ if (d = y, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || D.test(d) || F.test(d) || g.test(e))
break;
if (d.search(/[^ ]/) >= h || !d.trim())
s += `
` + d.slice(h);
else {
- if (m || f.search(/[^ ]/) >= 4 || _.test(f) || b.test(f) || p.test(f))
+ if (p || f.search(/[^ ]/) >= 4 || _.test(f) || D.test(f) || g.test(f))
break;
s += `
` + d;
}
- !m && !d.trim() && (m = !0), r += y + `
+ !p && !d.trim() && (p = !0), r += y + `
`, e = e.substring(y.length + 1), f = d.slice(h);
}
}
a.loose || (u ? a.loose = !0 : /\n *\n *$/.test(r) && (u = !0));
- let D = null, v;
- this.options.gfm && (D = /^\[[ xX]\] /.exec(s), D && (v = D[0] !== "[ ] ", s = s.replace(/^\[[ xX]\] +/, ""))), a.items.push({
+ let b = null, v;
+ this.options.gfm && (b = /^\[[ xX]\] /.exec(s), b && (v = b[0] !== "[ ] ", s = s.replace(/^\[[ xX]\] +/, ""))), a.items.push({
type: "list_item",
raw: r,
- task: !!D,
+ task: !!b,
checked: v,
loose: !1,
text: s,
@@ -389,7 +389,7 @@ class Nn {
return {
type: "escape",
raw: t[0],
- text: Te(t[1])
+ text: Re(t[1])
};
}
tag(e) {
@@ -415,7 +415,7 @@ class Nn {
if ((n.length - o.length) % 2 === 0)
return;
} else {
- const o = Qo(t[2], "()");
+ const o = Xo(t[2], "()");
if (o > -1) {
const s = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + o;
t[2] = t[2].substring(0, o), t[0] = t[0].substring(0, s).trim(), t[3] = "";
@@ -471,20 +471,20 @@ class Nn {
s = Math.min(s, s + u + c);
const d = [...i[0]][0].length, h = e.slice(0, o + i.index + d + s);
if (Math.min(o, s) % 2) {
- const D = h.slice(1, -1);
+ const b = h.slice(1, -1);
return {
type: "em",
raw: h,
- text: D,
- tokens: this.lexer.inlineTokens(D)
+ text: b,
+ tokens: this.lexer.inlineTokens(b)
};
}
- const m = h.slice(2, -2);
+ const p = h.slice(2, -2);
return {
type: "strong",
raw: h,
- text: m,
- tokens: this.lexer.inlineTokens(m)
+ text: p,
+ tokens: this.lexer.inlineTokens(p)
};
}
}
@@ -494,7 +494,7 @@ class Nn {
if (t) {
let n = t[2].replace(/\n/g, " ");
const i = /[^ ]/.test(n), a = /^ /.test(n) && / $/.test(n);
- return i && a && (n = n.substring(1, n.length - 1)), n = Te(n, !0), {
+ return i && a && (n = n.substring(1, n.length - 1)), n = Re(n, !0), {
type: "codespan",
raw: t[0],
text: n
@@ -523,7 +523,7 @@ class Nn {
const t = this.rules.inline.autolink.exec(e);
if (t) {
let n, i;
- return t[2] === "@" ? (n = Te(t[1]), i = "mailto:" + n) : (n = Te(t[1]), i = n), {
+ return t[2] === "@" ? (n = Re(t[1]), i = "mailto:" + n) : (n = Re(t[1]), i = n), {
type: "link",
raw: t[0],
text: n,
@@ -544,13 +544,13 @@ class Nn {
if (t = this.rules.inline.url.exec(e)) {
let i, a;
if (t[2] === "@")
- i = Te(t[0]), a = "mailto:" + i;
+ i = Re(t[0]), a = "mailto:" + i;
else {
let o;
do
o = t[0], t[0] = ((n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) ?? "";
while (o !== t[0]);
- i = Te(t[0]), t[1] === "www." ? a = "http://" + t[0] : a = t[0];
+ i = Re(t[0]), t[1] === "www." ? a = "http://" + t[0] : a = t[0];
}
return {
type: "link",
@@ -571,7 +571,7 @@ class Nn {
const t = this.rules.inline.text.exec(e);
if (t) {
let n;
- return this.lexer.state.inRawBlock ? n = t[0] : n = Te(t[0]), {
+ return this.lexer.state.inRawBlock ? n = t[0] : n = Re(t[0]), {
type: "text",
raw: t[0],
text: n
@@ -579,88 +579,88 @@ class Nn {
}
}
}
-const er = /^(?: *(?:\n|$))+/, tr = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, nr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, cn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ir = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Vl = /(?:[*+-]|\d{1,9}[.)])/, jl = Q(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Vl).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(), Vi = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ar = /^[^\n]+/, ji = /(?!\s*\])(?:\\.|[^\[\]\\])+/, lr = Q(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ji).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), or = Q(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Vl).getRegex(), Wn = "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", Wi = /|$))/, rr = Q("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\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", Wi).replace("tag", Wn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Wl = Q(Vi).replace("hr", cn).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", Wn).getRegex(), sr = Q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Wl).getRegex(), Zi = {
- blockquote: sr,
- code: tr,
- def: lr,
- fences: nr,
- heading: ir,
+const Qo = /^(?: *(?:\n|$))+/, Jo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, er = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, cn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, tr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ul = /(?:[*+-]|\d{1,9}[.)])/, Gl = K(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ul).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(), Vi = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, nr = /^[^\n]+/, ji = /(?!\s*\])(?:\\.|[^\[\]\\])+/, ir = K(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ji).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ar = K(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ul).getRegex(), Wn = "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", Wi = /|$))/, lr = K("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\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", Wi).replace("tag", Wn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Vl = K(Vi).replace("hr", cn).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", Wn).getRegex(), or = K(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Vl).getRegex(), Zi = {
+ blockquote: or,
+ code: Jo,
+ def: ir,
+ fences: er,
+ heading: tr,
hr: cn,
- html: rr,
- lheading: jl,
- list: or,
- newline: er,
- paragraph: Wl,
+ html: lr,
+ lheading: Gl,
+ list: ar,
+ newline: Qo,
+ paragraph: Vl,
table: tn,
- text: ar
-}, Ca = Q("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", cn).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", Wn).getRegex(), ur = {
+ text: nr
+}, Ca = K("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", cn).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", Wn).getRegex(), rr = {
...Zi,
table: Ca,
- paragraph: Q(Vi).replace("hr", cn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ca).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", Wn).getRegex()
-}, cr = {
+ paragraph: K(Vi).replace("hr", cn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ca).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", Wn).getRegex()
+}, sr = {
...Zi,
- html: Q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Wi).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(),
+ html: K(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Wi).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: /^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
heading: /^(#{1,6})(.*)(?:\n+|$)/,
fences: tn,
// fences not supported
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
- paragraph: Q(Vi).replace("hr", cn).replace("heading", ` *#{1,6} *[^
-]`).replace("lheading", jl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
-}, Zl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, _r = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Yl = /^( {2,}|\\)\n(?!\s*$)/, dr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, pr = Q(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, _n).getRegex(), mr = Q("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, _n).getRegex(), gr = Q("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, _n).getRegex(), vr = Q(/\\([punct])/, "gu").replace(/punct/g, _n).getRegex(), br = Q(/^<(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(), Dr = Q(Wi).replace("(?:-->|$)", "-->").getRegex(), wr = Q("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Dr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Mn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, yr = Q(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Mn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xl = Q(/^!?\[(label)\]\[(ref)\]/).replace("label", Mn).replace("ref", ji).getRegex(), Kl = Q(/^!?\[(ref)\](?:\[\])?/).replace("ref", ji).getRegex(), kr = Q("reflink|nolink(?!\\()", "g").replace("reflink", Xl).replace("nolink", Kl).getRegex(), Yi = {
+ paragraph: K(Vi).replace("hr", cn).replace("heading", ` *#{1,6} *[^
+]`).replace("lheading", Gl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
+}, jl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ur = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Wl = /^( {2,}|\\)\n(?!\s*$)/, cr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, fr = K(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, _n).getRegex(), hr = K("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, _n).getRegex(), pr = K("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, _n).getRegex(), mr = K(/\\([punct])/, "gu").replace(/punct/g, _n).getRegex(), gr = K(/^<(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(), vr = K(Wi).replace("(?:-->|$)", "-->").getRegex(), br = K("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", vr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Nn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Dr = K(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Nn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Zl = K(/^!?\[(label)\]\[(ref)\]/).replace("label", Nn).replace("ref", ji).getRegex(), Yl = K(/^!?\[(ref)\](?:\[\])?/).replace("ref", ji).getRegex(), wr = K("reflink|nolink(?!\\()", "g").replace("reflink", Zl).replace("nolink", Yl).getRegex(), Yi = {
_backpedal: tn,
// only used for GFM url
- anyPunctuation: vr,
- autolink: br,
- blockSkip: hr,
- br: Yl,
- code: _r,
+ anyPunctuation: mr,
+ autolink: gr,
+ blockSkip: dr,
+ br: Wl,
+ code: ur,
del: tn,
- emStrongLDelim: pr,
- emStrongRDelimAst: mr,
- emStrongRDelimUnd: gr,
- escape: Zl,
- link: yr,
- nolink: Kl,
- punctuation: fr,
- reflink: Xl,
- reflinkSearch: kr,
- tag: wr,
- text: dr,
+ emStrongLDelim: fr,
+ emStrongRDelimAst: hr,
+ emStrongRDelimUnd: pr,
+ escape: jl,
+ link: Dr,
+ nolink: Yl,
+ punctuation: _r,
+ reflink: Zl,
+ reflinkSearch: wr,
+ tag: br,
+ text: cr,
url: tn
-}, Fr = {
+}, yr = {
...Yi,
- link: Q(/^!?\[(label)\]\((.*?)\)/).replace("label", Mn).getRegex(),
- reflink: Q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Mn).getRegex()
+ link: K(/^!?\[(label)\]\((.*?)\)/).replace("label", Nn).getRegex(),
+ reflink: K(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Nn).getRegex()
}, Si = {
...Yi,
- escape: Q(Zl).replace("])", "~|])").getRegex(),
- url: Q(/^((?: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(),
+ escape: K(jl).replace("])", "~|])").getRegex(),
+ url: K(/^((?: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]*?(?:(?=[\\' + (n ? e : Te(e, !0)) + `
-` : "
" + (n ? e : Te(e, !0)) + `
+`, i ? '' + (n ? e : Re(e, !0)) + `
+` : "" + (n ? e : Re(e, !0)) + `
`;
}
blockquote(e) {
@@ -1007,24 +1007,24 @@ class Xi {
return "";
}
}
-class at {
+class ot {
constructor(e) {
- ee(this, "options");
- ee(this, "renderer");
- ee(this, "textRenderer");
- this.options = e || St, this.options.renderer = this.options.renderer || new zn(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Xi();
+ J(this, "options");
+ J(this, "renderer");
+ J(this, "textRenderer");
+ this.options = e || St, this.options.renderer = this.options.renderer || new Pn(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Xi();
}
/**
* Static Parse Method
*/
static parse(e, t) {
- return new at(t).parse(e);
+ return new ot(t).parse(e);
}
/**
* Static Parse Inline Method
*/
static parseInline(e, t) {
- return new at(t).parseInline(e);
+ return new ot(t).parseInline(e);
}
/**
* Parse Loop
@@ -1049,7 +1049,7 @@ class at {
}
case "heading": {
const o = a;
- n += this.renderer.heading(this.parseInline(o.tokens), o.depth, Xo(this.parseInline(o.tokens, this.textRenderer)));
+ n += this.renderer.heading(this.parseInline(o.tokens), o.depth, Zo(this.parseInline(o.tokens, this.textRenderer)));
continue;
}
case "code": {
@@ -1083,16 +1083,16 @@ class at {
const o = a, r = o.ordered, s = o.start, u = o.loose;
let c = "";
for (let f = 0; f < o.items.length; f++) {
- const d = o.items[f], h = d.checked, m = d.task;
- let D = "";
+ const d = o.items[f], h = d.checked, p = d.task;
+ let b = "";
if (d.task) {
const v = this.renderer.checkbox(!!h);
u ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = v + " " + 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 = v + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({
type: "text",
text: v + " "
- }) : D += v + " ";
+ }) : b += v + " ";
}
- D += this.parse(d.tokens, u), c += this.renderer.listitem(D, m, !!h);
+ b += this.parse(d.tokens, u), c += this.renderer.listitem(b, p, !!h);
}
n += this.renderer.list(c, r, s);
continue;
@@ -1203,7 +1203,7 @@ class at {
}
class nn {
constructor(e) {
- ee(this, "options");
+ J(this, "options");
this.options = e || St;
}
/**
@@ -1225,25 +1225,25 @@ class nn {
return e;
}
}
-ee(nn, "passThroughHooks", /* @__PURE__ */ new Set([
+J(nn, "passThroughHooks", /* @__PURE__ */ new Set([
"preprocess",
"postprocess",
"processAllTokens"
]));
-var At, Ti, Ql;
-class Er {
+var At, Ti, Xl;
+class Fr {
constructor(...e) {
ya(this, At);
- ee(this, "defaults", Gi());
- ee(this, "options", this.setOptions);
- ee(this, "parse", vn(this, At, Ti).call(this, it.lex, at.parse));
- ee(this, "parseInline", vn(this, At, Ti).call(this, it.lexInline, at.parseInline));
- ee(this, "Parser", at);
- ee(this, "Renderer", zn);
- ee(this, "TextRenderer", Xi);
- ee(this, "Lexer", it);
- ee(this, "Tokenizer", Nn);
- ee(this, "Hooks", nn);
+ J(this, "defaults", Gi());
+ J(this, "options", this.setOptions);
+ J(this, "parse", vn(this, At, Ti).call(this, lt.lex, ot.parse));
+ J(this, "parseInline", vn(this, At, Ti).call(this, lt.lexInline, ot.parseInline));
+ J(this, "Parser", ot);
+ J(this, "Renderer", Pn);
+ J(this, "TextRenderer", Xi);
+ J(this, "Lexer", lt);
+ J(this, "Tokenizer", Mn);
+ J(this, "Hooks", nn);
this.use(...e);
}
/**
@@ -1300,7 +1300,7 @@ class Er {
}
"childTokens" in a && a.childTokens && (t.childTokens[a.name] = a.childTokens);
}), i.extensions = t), n.renderer) {
- const a = this.defaults.renderer || new zn(this.defaults);
+ const a = this.defaults.renderer || new Pn(this.defaults);
for (const o in n.renderer) {
if (!(o in a))
throw new Error(`renderer '${o}' does not exist`);
@@ -1315,7 +1315,7 @@ class Er {
i.renderer = a;
}
if (n.tokenizer) {
- const a = this.defaults.tokenizer || new Nn(this.defaults);
+ const a = this.defaults.tokenizer || new Mn(this.defaults);
for (const o in n.tokenizer) {
if (!(o in a))
throw new Error(`tokenizer '${o}' does not exist`);
@@ -1363,17 +1363,17 @@ class Er {
return this.defaults = { ...this.defaults, ...e }, this;
}
lexer(e, t) {
- return it.lex(e, t ?? this.defaults);
+ return lt.lex(e, t ?? this.defaults);
}
parser(e, t) {
- return at.parse(e, t ?? this.defaults);
+ return ot.parse(e, t ?? this.defaults);
}
}
At = new WeakSet(), Ti = function(e, t) {
return (n, i) => {
const a = { ...i }, o = { ...this.defaults, ...a };
this.defaults.async === !0 && a.async === !1 && (o.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), o.async = !0);
- const r = vn(this, At, Ql).call(this, !!o.silent, !!o.async);
+ const r = vn(this, At, Xl).call(this, !!o.silent, !!o.async);
if (typeof n > "u" || n === null)
return r(new Error("marked(): input parameter is undefined or null"));
if (typeof n != "string")
@@ -1390,11 +1390,11 @@ At = new WeakSet(), Ti = function(e, t) {
return r(s);
}
};
-}, Ql = function(e, t) {
+}, Xl = function(e, t) {
return (n) => {
if (n.message += `
Please report this to https://github.com/markedjs/marked.`, e) {
- const i = "An error occurred:
" + Te(n.message + "", !0) + "
";
+ const i = "An error occurred:
" + Re(n.message + "", !0) + "
";
return t ? Promise.resolve(i) : i;
}
if (t)
@@ -1402,128 +1402,128 @@ Please report this to https://github.com/markedjs/marked.`, e) {
throw n;
};
};
-const Ct = new Er();
-function j(l, e) {
+const Ct = new Fr();
+function W(l, e) {
return Ct.parse(l, e);
}
-j.options = j.setOptions = function(l) {
- return Ct.setOptions(l), j.defaults = Ct.defaults, Hl(j.defaults), j;
+W.options = W.setOptions = function(l) {
+ return Ct.setOptions(l), W.defaults = Ct.defaults, Pl(W.defaults), W;
};
-j.getDefaults = Gi;
-j.defaults = St;
-j.use = function(...l) {
- return Ct.use(...l), j.defaults = Ct.defaults, Hl(j.defaults), j;
+W.getDefaults = Gi;
+W.defaults = St;
+W.use = function(...l) {
+ return Ct.use(...l), W.defaults = Ct.defaults, Pl(W.defaults), W;
};
-j.walkTokens = function(l, e) {
+W.walkTokens = function(l, e) {
return Ct.walkTokens(l, e);
};
-j.parseInline = Ct.parseInline;
-j.Parser = at;
-j.parser = at.parse;
-j.Renderer = zn;
-j.TextRenderer = Xi;
-j.Lexer = it;
-j.lexer = it.lex;
-j.Tokenizer = Nn;
-j.Hooks = nn;
-j.parse = j;
-j.options;
-j.setOptions;
-j.use;
-j.walkTokens;
-j.parseInline;
-at.parse;
-it.lex;
+W.parseInline = Ct.parseInline;
+W.Parser = ot;
+W.parser = ot.parse;
+W.Renderer = Pn;
+W.TextRenderer = Xi;
+W.Lexer = lt;
+W.lexer = lt.lex;
+W.Tokenizer = Mn;
+W.Hooks = nn;
+W.parse = W;
+W.options;
+W.setOptions;
+W.use;
+W.walkTokens;
+W.parseInline;
+ot.parse;
+lt.lex;
const {
- HtmlTagHydration: Jl,
- SvelteComponent: Cr,
- append_hydration: qe,
- attr: Ye,
+ HtmlTagHydration: Kl,
+ SvelteComponent: $r,
+ append_hydration: Ne,
+ attr: Ke,
children: yt,
- claim_element: mt,
- claim_html_tag: eo,
+ claim_element: gt,
+ claim_html_tag: Ql,
claim_space: xn,
- claim_text: to,
- detach: Xe,
- element: gt,
- get_svelte_dataset: Ar,
- init: Sr,
+ claim_text: Jl,
+ detach: Qe,
+ element: vt,
+ get_svelte_dataset: Er,
+ init: Cr,
insert_hydration: Ki,
listen: xi,
noop: Aa,
- run_all: Tr,
- safe_not_equal: xr,
- set_data: no,
- set_style: Pn,
+ run_all: Ar,
+ safe_not_equal: Sr,
+ set_data: eo,
+ set_style: zn,
space: Bn,
- text: io,
+ text: to,
toggle_class: Sa
-} = window.__gradio__svelte__internal, { createEventDispatcher: Br } = window.__gradio__svelte__internal;
+} = window.__gradio__svelte__internal, { createEventDispatcher: Tr } = window.__gradio__svelte__internal;
function Ta(l) {
let e, t, n, i = (
/*selectedHighlight*/
(l[2].title || /*selectedHighlight*/
l[2].term || "Highlighted Text") + ""
- ), a, o, r, s = "×", u, c, f, d, h, m, D, v = (
+ ), a, o, r, s = "×", u, c, f, d, h, p, b, v = (
/*selectedHighlight*/
l[2].category && xa(l)
);
return {
c() {
- e = gt("div"), t = gt("div"), n = gt("h3"), a = io(i), o = Bn(), r = gt("button"), r.textContent = s, u = Bn(), c = gt("div"), v && v.c(), f = Bn(), d = gt("div"), h = new Jl(!1), this.h();
+ e = vt("div"), t = vt("div"), n = vt("h3"), a = to(i), o = Bn(), r = vt("button"), r.textContent = s, u = Bn(), c = vt("div"), v && v.c(), f = Bn(), d = vt("div"), h = new Kl(!1), this.h();
},
- l(w) {
- e = mt(w, "DIV", { class: !0, style: !0 });
- var p = yt(e);
- t = mt(p, "DIV", { class: !0 });
+ l(F) {
+ e = gt(F, "DIV", { class: !0, style: !0 });
+ var g = yt(e);
+ t = gt(g, "DIV", { class: !0 });
var _ = yt(t);
- n = mt(_, "H3", { class: !0 });
- var b = yt(n);
- a = to(b, i), b.forEach(Xe), o = xn(_), r = mt(_, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ar(r) !== "svelte-1klfhb2" && (r.textContent = s), _.forEach(Xe), u = xn(p), c = mt(p, "DIV", { class: !0 });
+ n = gt(_, "H3", { class: !0 });
+ var D = yt(n);
+ a = Jl(D, i), D.forEach(Qe), o = xn(_), r = gt(_, "BUTTON", { class: !0, "data-svelte-h": !0 }), Er(r) !== "svelte-1klfhb2" && (r.textContent = s), _.forEach(Qe), u = xn(g), c = gt(g, "DIV", { class: !0 });
var y = yt(c);
- v && v.l(y), f = xn(y), d = mt(y, "DIV", { class: !0 });
+ v && v.l(y), f = xn(y), d = gt(y, "DIV", { class: !0 });
var k = yt(d);
- h = eo(k, !1), k.forEach(Xe), y.forEach(Xe), p.forEach(Xe), this.h();
+ h = Ql(k, !1), k.forEach(Qe), y.forEach(Qe), g.forEach(Qe), this.h();
},
h() {
- Ye(n, "class", "svelte-lwvfz"), Ye(r, "class", "close-btn svelte-lwvfz"), Ye(t, "class", "panel-header svelte-lwvfz"), h.a = null, Ye(d, "class", "content-text svelte-lwvfz"), Ye(c, "class", "panel-content svelte-lwvfz"), Ye(e, "class", "side-panel svelte-lwvfz"), Pn(
+ Ke(n, "class", "svelte-lwvfz"), Ke(r, "class", "close-btn svelte-lwvfz"), Ke(t, "class", "panel-header svelte-lwvfz"), h.a = null, Ke(d, "class", "content-text svelte-lwvfz"), Ke(c, "class", "panel-content svelte-lwvfz"), Ke(e, "class", "side-panel svelte-lwvfz"), zn(
e,
"width",
/*panel_width*/
l[1]
);
},
- m(w, p) {
- Ki(w, e, p), qe(e, t), qe(t, n), qe(n, a), qe(t, o), qe(t, r), qe(e, u), qe(e, c), v && v.m(c, null), qe(c, f), qe(c, d), h.m(
+ m(F, g) {
+ Ki(F, e, g), Ne(e, t), Ne(t, n), Ne(n, a), Ne(t, o), Ne(t, r), Ne(e, u), Ne(e, c), v && v.m(c, null), Ne(c, f), Ne(c, d), h.m(
/*panelContent*/
l[4],
d
- ), m || (D = xi(
+ ), p || (b = xi(
r,
"click",
/*closeSidePanel*/
l[7]
- ), m = !0);
+ ), p = !0);
},
- p(w, p) {
- p & /*selectedHighlight*/
+ p(F, g) {
+ g & /*selectedHighlight*/
4 && i !== (i = /*selectedHighlight*/
- (w[2].title || /*selectedHighlight*/
- w[2].term || "Highlighted Text") + "") && no(a, i), /*selectedHighlight*/
- w[2].category ? v ? v.p(w, p) : (v = xa(w), v.c(), v.m(c, f)) : v && (v.d(1), v = null), p & /*panelContent*/
+ (F[2].title || /*selectedHighlight*/
+ F[2].term || "Highlighted Text") + "") && eo(a, i), /*selectedHighlight*/
+ F[2].category ? v ? v.p(F, g) : (v = xa(F), v.c(), v.m(c, f)) : v && (v.d(1), v = null), g & /*panelContent*/
16 && h.p(
/*panelContent*/
- w[4]
- ), p & /*panel_width*/
- 2 && Pn(
+ F[4]
+ ), g & /*panel_width*/
+ 2 && zn(
e,
"width",
/*panel_width*/
- w[1]
+ F[1]
);
},
- d(w) {
- w && Xe(e), v && v.d(), m = !1, D();
+ d(F) {
+ F && Qe(e), v && v.d(), p = !1, b();
}
};
}
@@ -1534,15 +1534,15 @@ function xa(l) {
), n;
return {
c() {
- e = gt("div"), n = io(t), this.h();
+ e = vt("div"), n = to(t), this.h();
},
l(i) {
- e = mt(i, "DIV", { class: !0, style: !0 });
+ e = gt(i, "DIV", { class: !0, style: !0 });
var a = yt(e);
- n = to(a, t), a.forEach(Xe), this.h();
+ n = Jl(a, t), a.forEach(Qe), this.h();
},
h() {
- Ye(e, "class", "category-badge svelte-lwvfz"), Pn(
+ Ke(e, "class", "category-badge svelte-lwvfz"), zn(
e,
"background-color",
/*selectedHighlight*/
@@ -1550,13 +1550,13 @@ function xa(l) {
);
},
m(i, a) {
- Ki(i, e, a), qe(e, n);
+ Ki(i, e, a), Ne(e, n);
},
p(i, a) {
a & /*selectedHighlight*/
4 && t !== (t = /*selectedHighlight*/
- i[2].category + "") && no(n, t), a & /*selectedHighlight*/
- 4 && Pn(
+ i[2].category + "") && eo(n, t), a & /*selectedHighlight*/
+ 4 && zn(
e,
"background-color",
/*selectedHighlight*/
@@ -1564,11 +1564,11 @@ function xa(l) {
);
},
d(i) {
- i && Xe(e);
+ i && Qe(e);
}
};
}
-function Rr(l) {
+function xr(l) {
let e, t, n, i, a, o, r = (
/*show_side_panel*/
l[0] && /*selectedHighlight*/
@@ -1576,21 +1576,21 @@ function Rr(l) {
);
return {
c() {
- e = gt("div"), t = gt("div"), n = new Jl(!1), i = Bn(), r && r.c(), this.h();
+ e = vt("div"), t = vt("div"), n = new Kl(!1), i = Bn(), r && r.c(), this.h();
},
l(s) {
- e = mt(s, "DIV", { class: !0 });
+ e = gt(s, "DIV", { class: !0 });
var u = yt(e);
- t = mt(u, "DIV", {
+ t = gt(u, "DIV", {
class: !0,
role: !0,
"aria-label": !0
});
var c = yt(t);
- n = eo(c, !1), c.forEach(Xe), i = xn(u), r && r.l(u), u.forEach(Xe), this.h();
+ n = Ql(c, !1), c.forEach(Qe), i = xn(u), r && r.l(u), u.forEach(Qe), this.h();
},
h() {
- n.a = null, Ye(t, "class", "markdown-content svelte-lwvfz"), Ye(t, "role", "document"), Ye(t, "aria-label", "Markdown content with interactive highlights"), Ye(e, "class", "markdown-container svelte-lwvfz"), Sa(
+ n.a = null, Ke(t, "class", "markdown-content svelte-lwvfz"), Ke(t, "role", "document"), Ke(t, "aria-label", "Markdown content with interactive highlights"), Ke(e, "class", "markdown-container svelte-lwvfz"), Sa(
e,
"with-panel",
/*show_side_panel*/
@@ -1599,11 +1599,11 @@ function Rr(l) {
);
},
m(s, u) {
- Ki(s, e, u), qe(e, t), n.m(
+ Ki(s, e, u), Ne(e, t), n.m(
/*processedHtml*/
l[3],
t
- ), qe(e, i), r && r.m(e, null), a || (o = [
+ ), Ne(e, i), r && r.m(e, null), a || (o = [
xi(
t,
"click",
@@ -1637,122 +1637,136 @@ function Rr(l) {
i: Aa,
o: Aa,
d(s) {
- s && Xe(e), r && r.d(), a = !1, Tr(o);
+ s && Qe(e), r && r.d(), a = !1, Ar(o);
}
};
}
-function Ba(l) {
+function Br(l) {
return l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
-function Ir(l, e, t) {
- var n = this && this.__awaiter || function(w, p, _, b) {
- function y(k) {
- return k instanceof _ ? k : new _(function(C) {
- C(k);
+function Rr(l, e, t) {
+ var n = this && this.__awaiter || function(_, D, y, k) {
+ function $(T) {
+ return T instanceof y ? T : new y(function(A) {
+ A(T);
});
}
- return new (_ || (_ = Promise))(function(k, C) {
- function x(R) {
+ return new (y || (y = Promise))(function(T, A) {
+ function R(S) {
try {
- O(b.next(R));
- } catch (P) {
- C(P);
+ P(k.next(S));
+ } catch (te) {
+ A(te);
}
}
- function A(R) {
+ function B(S) {
try {
- O(b.throw(R));
- } catch (P) {
- C(P);
+ P(k.throw(S));
+ } catch (te) {
+ A(te);
}
}
- function O(R) {
- R.done ? k(R.value) : y(R.value).then(x, A);
+ function P(S) {
+ S.done ? T(S.value) : $(S.value).then(R, B);
}
- O((b = b.apply(w, p || [])).next());
+ P((k = k.apply(_, D || [])).next());
});
};
let { markdown_content: i = "" } = e, { highlights: a = [] } = e, { show_side_panel: o = !0 } = e, { panel_width: r = "300px" } = e;
- const s = Br();
+ const s = Tr();
let u = null, c = "", f = "";
function d() {
return n(this, void 0, void 0, function* () {
- let w = yield j(i);
- const p = a.filter((b) => b.position && b.position.length === 2);
- a.filter((b) => b.term && b.term.trim()).forEach((b) => {
- if (b.term && b.term.trim()) {
- const y = a.indexOf(b), k = new RegExp(`\\b${Ba(b.term)}\\b`, "gi");
- w = w.replace(k, (C) => {
- const x = b.color || "#e3f2fd";
+ const _ = a.filter(($) => $.position && $.position.length === 2), D = a.filter(($) => $.term && $.term.trim());
+ let y = h(i, _), k = yield W(y);
+ k = p(k, _), D.forEach(($) => {
+ if ($.term && $.term.trim()) {
+ const T = a.indexOf($), A = new RegExp(`\\b${Br($.term)}\\b`, "gi");
+ k = k.replace(A, (R) => {
+ const B = $.color || "#e3f2fd";
return `
- ${C}
+ aria-label="Highlighted term: ${$.term}">
+ ${R}
`;
});
}
- }), p.forEach((b) => {
- const [y, k] = b.position;
- if (y >= 0 && k <= i.length && y < k) {
- const C = i.substring(y, k), x = b.color || "#e3f2fd", A = a.indexOf(b), O = Ba(C).replace(/\s+/g, "\\s+"), R = new RegExp(`\\b${O}\\b`, "gi");
- w = w.replace(R, (P) => `
- ${P}
- `);
- }
- }), t(3, c = w);
+ }), t(3, c = k);
});
}
- function h() {
+ function h(_, D) {
+ const y = [...D].sort(($, T) => T.position[0] - $.position[0]);
+ let k = _;
+ return y.forEach(($) => {
+ const [T, A] = $.position;
+ if (T >= 0 && A <= k.length && T < A) {
+ const R = k.substring(T, A), B = a.indexOf($), P = `|||POSHL_START_${B}|||`, S = `|||POSHL_END_${B}|||`;
+ k = k.substring(0, T) + P + R + S + k.substring(A);
+ }
+ }), k;
+ }
+ function p(_, D) {
+ return D.forEach((y) => {
+ const [k, $] = y.position;
+ if (k >= 0 && $ <= i.length && k < $) {
+ const T = i.substring(k, $), A = y.color || "#e3f2fd", R = a.indexOf(y), B = new RegExp(`\\|\\|\\|POSHL_START_${R}\\|\\|\\|(.*?)\\|\\|\\|POSHL_END_${R}\\|\\|\\|`, "g");
+ _ = _.replace(B, (P, S) => `
+ ${S}
+ `);
+ }
+ }), _;
+ }
+ function b() {
return n(this, void 0, void 0, function* () {
- u && t(4, f = yield j(u.content || "No additional information available."));
+ u && t(4, f = yield W(u.content || "No additional information available."));
});
}
- function m(w) {
- const p = w.target;
- if (p.classList.contains("highlight-term") || p.classList.contains("highlight-position")) {
- const _ = parseInt(p.dataset.index || "0"), b = a[_];
- b && (t(2, u = b), s("select", { index: _, value: b }));
+ function v(_) {
+ const D = _.target;
+ if (D.classList.contains("highlight-term") || D.classList.contains("highlight-position")) {
+ const y = parseInt(D.dataset.index || "0"), k = a[y];
+ k && (t(2, u = k), s("select", { index: y, value: k }));
}
}
- function D(w) {
- const p = w.target;
- (w.key === "Enter" || w.key === " ") && (p.classList.contains("highlight-term") || p.classList.contains("highlight-position")) && (w.preventDefault(), m(w));
+ function F(_) {
+ const D = _.target;
+ (_.key === "Enter" || _.key === " ") && (D.classList.contains("highlight-term") || D.classList.contains("highlight-position")) && (_.preventDefault(), v(_));
}
- function v() {
+ function g() {
t(2, u = null);
}
- return l.$$set = (w) => {
- "markdown_content" in w && t(8, i = w.markdown_content), "highlights" in w && t(9, a = w.highlights), "show_side_panel" in w && t(0, o = w.show_side_panel), "panel_width" in w && t(1, r = w.panel_width);
+ return l.$$set = (_) => {
+ "markdown_content" in _ && t(8, i = _.markdown_content), "highlights" in _ && t(9, a = _.highlights), "show_side_panel" in _ && t(0, o = _.show_side_panel), "panel_width" in _ && t(1, r = _.panel_width);
}, l.$$.update = () => {
l.$$.dirty & /*markdown_content*/
256 && i && d(), l.$$.dirty & /*selectedHighlight*/
- 4 && u && h();
+ 4 && u && b();
}, [
o,
r,
u,
c,
f,
- m,
- D,
v,
+ F,
+ g,
i,
a
];
}
-class Lr extends Cr {
+class Ir extends $r {
constructor(e) {
- super(), Sr(this, e, Ir, Rr, xr, {
+ super(), Cr(this, e, Rr, xr, Sr, {
markdown_content: 8,
highlights: 9,
show_side_panel: 0,
@@ -1805,11 +1819,11 @@ const {
detach: L_,
init: O_,
insert_hydration: q_,
- noop: N_,
- safe_not_equal: M_,
- svg_element: z_
+ noop: M_,
+ safe_not_equal: N_,
+ svg_element: P_
} = window.__gradio__svelte__internal, {
- SvelteComponent: P_,
+ SvelteComponent: z_,
append_hydration: H_,
attr: U_,
children: G_,
@@ -1864,10 +1878,10 @@ const {
claim_svg_element: Ld,
detach: Od,
init: qd,
- insert_hydration: Nd,
- noop: Md,
- safe_not_equal: zd,
- svg_element: Pd
+ insert_hydration: Md,
+ noop: Nd,
+ safe_not_equal: Pd,
+ svg_element: zd
} = window.__gradio__svelte__internal, {
SvelteComponent: Hd,
append_hydration: Ud,
@@ -1905,20 +1919,20 @@ const {
safe_not_equal: Df,
svg_element: wf
} = window.__gradio__svelte__internal, {
- SvelteComponent: Or,
+ SvelteComponent: Lr,
append_hydration: li,
- attr: Ge,
+ attr: je,
children: wn,
claim_svg_element: yn,
detach: Yt,
- init: qr,
- insert_hydration: Nr,
+ init: Or,
+ insert_hydration: qr,
noop: oi,
safe_not_equal: Mr,
- set_style: et,
+ set_style: nt,
svg_element: kn
} = window.__gradio__svelte__internal;
-function zr(l) {
+function Nr(l) {
let e, t, n, i;
return {
c() {
@@ -1942,10 +1956,10 @@ function zr(l) {
n = yn(r, "path", { d: !0, style: !0 }), wn(n).forEach(Yt), r.forEach(Yt), i = yn(o, "path", { d: !0, style: !0 }), wn(i).forEach(Yt), o.forEach(Yt), this.h();
},
h() {
- Ge(n, "d", "M18,6L6.087,17.913"), et(n, "fill", "none"), et(n, "fill-rule", "nonzero"), et(n, "stroke-width", "2px"), Ge(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Ge(i, "d", "M4.364,4.364L19.636,19.636"), et(i, "fill", "none"), et(i, "fill-rule", "nonzero"), et(i, "stroke-width", "2px"), Ge(e, "width", "100%"), Ge(e, "height", "100%"), Ge(e, "viewBox", "0 0 24 24"), Ge(e, "version", "1.1"), Ge(e, "xmlns", "http://www.w3.org/2000/svg"), Ge(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Ge(e, "xml:space", "preserve"), Ge(e, "stroke", "currentColor"), et(e, "fill-rule", "evenodd"), et(e, "clip-rule", "evenodd"), et(e, "stroke-linecap", "round"), et(e, "stroke-linejoin", "round");
+ je(n, "d", "M18,6L6.087,17.913"), nt(n, "fill", "none"), nt(n, "fill-rule", "nonzero"), nt(n, "stroke-width", "2px"), je(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), je(i, "d", "M4.364,4.364L19.636,19.636"), nt(i, "fill", "none"), nt(i, "fill-rule", "nonzero"), nt(i, "stroke-width", "2px"), je(e, "width", "100%"), je(e, "height", "100%"), je(e, "viewBox", "0 0 24 24"), je(e, "version", "1.1"), je(e, "xmlns", "http://www.w3.org/2000/svg"), je(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), je(e, "xml:space", "preserve"), je(e, "stroke", "currentColor"), nt(e, "fill-rule", "evenodd"), nt(e, "clip-rule", "evenodd"), nt(e, "stroke-linecap", "round"), nt(e, "stroke-linejoin", "round");
},
m(a, o) {
- Nr(a, e, o), li(e, t), li(t, n), li(e, i);
+ qr(a, e, o), li(e, t), li(t, n), li(e, i);
},
p: oi,
i: oi,
@@ -1955,9 +1969,9 @@ function zr(l) {
}
};
}
-class Pr extends Or {
+class Pr extends Lr {
constructor(e) {
- super(), qr(this, e, null, zr, Mr, {});
+ super(), Or(this, e, null, Nr, Mr, {});
}
}
const {
@@ -1978,10 +1992,10 @@ const {
attr: Lf,
children: Of,
claim_svg_element: qf,
- detach: Nf,
- init: Mf,
- insert_hydration: zf,
- noop: Pf,
+ detach: Mf,
+ init: Nf,
+ insert_hydration: Pf,
+ noop: zf,
safe_not_equal: Hf,
svg_element: Uf
} = window.__gradio__svelte__internal, {
@@ -2009,19 +2023,19 @@ const {
safe_not_equal: ch,
svg_element: _h
} = window.__gradio__svelte__internal, {
- SvelteComponent: Hr,
- append_hydration: Ra,
- attr: tt,
+ SvelteComponent: zr,
+ append_hydration: Ba,
+ attr: it,
children: ri,
claim_svg_element: si,
detach: Fn,
- init: Ur,
- insert_hydration: Gr,
+ init: Hr,
+ insert_hydration: Ur,
noop: ui,
- safe_not_equal: Vr,
+ safe_not_equal: Gr,
svg_element: ci
} = window.__gradio__svelte__internal;
-function jr(l) {
+function Vr(l) {
let e, t, n;
return {
c() {
@@ -2040,10 +2054,10 @@ function jr(l) {
t = si(a, "path", { fill: !0, d: !0 }), ri(t).forEach(Fn), n = si(a, "path", { fill: !0, d: !0 }), ri(n).forEach(Fn), a.forEach(Fn), this.h();
},
h() {
- tt(t, "fill", "currentColor"), tt(t, "d", "M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z"), tt(n, "fill", "currentColor"), tt(n, "d", "M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z"), tt(e, "xmlns", "http://www.w3.org/2000/svg"), tt(e, "viewBox", "0 0 33 33"), tt(e, "color", "currentColor"), tt(e, "aria-hidden", "true"), tt(e, "width", "100%"), tt(e, "height", "100%");
+ it(t, "fill", "currentColor"), it(t, "d", "M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z"), it(n, "fill", "currentColor"), it(n, "d", "M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z"), it(e, "xmlns", "http://www.w3.org/2000/svg"), it(e, "viewBox", "0 0 33 33"), it(e, "color", "currentColor"), it(e, "aria-hidden", "true"), it(e, "width", "100%"), it(e, "height", "100%");
},
m(i, a) {
- Gr(i, e, a), Ra(e, t), Ra(e, n);
+ Ur(i, e, a), Ba(e, t), Ba(e, n);
},
p: ui,
i: ui,
@@ -2053,9 +2067,9 @@ function jr(l) {
}
};
}
-class Qi extends Hr {
+class Qi extends zr {
constructor(e) {
- super(), Ur(this, e, null, jr, Vr, {});
+ super(), Hr(this, e, null, Vr, Gr, {});
}
}
const {
@@ -2087,10 +2101,10 @@ const {
append_hydration: Lh,
attr: Oh,
children: qh,
- claim_svg_element: Nh,
- detach: Mh,
- init: zh,
- insert_hydration: Ph,
+ claim_svg_element: Mh,
+ detach: Nh,
+ init: Ph,
+ insert_hydration: zh,
noop: Hh,
safe_not_equal: Uh,
svg_element: Gh
@@ -2146,10 +2160,10 @@ const {
SvelteComponent: Lp,
append_hydration: Op,
attr: qp,
- children: Np,
- claim_svg_element: Mp,
- detach: zp,
- init: Pp,
+ children: Mp,
+ claim_svg_element: Np,
+ detach: Pp,
+ init: zp,
insert_hydration: Hp,
noop: Up,
safe_not_equal: Gp,
@@ -2205,10 +2219,10 @@ const {
} = window.__gradio__svelte__internal, {
SvelteComponent: Om,
append_hydration: qm,
- attr: Nm,
- children: Mm,
- claim_svg_element: zm,
- detach: Pm,
+ attr: Mm,
+ children: Nm,
+ claim_svg_element: Pm,
+ detach: zm,
init: Hm,
insert_hydration: Um,
noop: Gm,
@@ -2264,10 +2278,10 @@ const {
svg_element: Og
} = window.__gradio__svelte__internal, {
SvelteComponent: qg,
- append_hydration: Ng,
- attr: Mg,
- children: zg,
- claim_svg_element: Pg,
+ append_hydration: Mg,
+ attr: Ng,
+ children: Pg,
+ claim_svg_element: zg,
detach: Hg,
init: Ug,
insert_hydration: Gg,
@@ -2323,10 +2337,10 @@ const {
safe_not_equal: O0,
svg_element: q0
} = window.__gradio__svelte__internal, {
- SvelteComponent: N0,
- append_hydration: M0,
- attr: z0,
- children: P0,
+ SvelteComponent: M0,
+ append_hydration: N0,
+ attr: P0,
+ children: z0,
claim_svg_element: H0,
detach: U0,
init: G0,
@@ -2381,11 +2395,11 @@ const {
insert_hydration: L1,
noop: O1,
safe_not_equal: q1,
- svg_element: N1
+ svg_element: M1
} = window.__gradio__svelte__internal, {
- SvelteComponent: M1,
- append_hydration: z1,
- attr: P1,
+ SvelteComponent: N1,
+ append_hydration: P1,
+ attr: z1,
children: H1,
claim_svg_element: U1,
detach: G1,
@@ -2440,11 +2454,11 @@ const {
detach: Lv,
init: Ov,
insert_hydration: qv,
- noop: Nv,
- safe_not_equal: Mv,
- svg_element: zv
+ noop: Mv,
+ safe_not_equal: Nv,
+ svg_element: Pv
} = window.__gradio__svelte__internal, {
- SvelteComponent: Pv,
+ SvelteComponent: zv,
append_hydration: Hv,
attr: Uv,
children: Gv,
@@ -2499,24 +2513,24 @@ const {
claim_svg_element: Lb,
detach: Ob,
init: qb,
- insert_hydration: Nb,
- noop: Mb,
- safe_not_equal: zb,
- svg_element: Pb
+ insert_hydration: Mb,
+ noop: Nb,
+ safe_not_equal: Pb,
+ svg_element: zb
} = window.__gradio__svelte__internal, {
- SvelteComponent: Wr,
- append_hydration: Ia,
- attr: Ae,
+ SvelteComponent: jr,
+ append_hydration: Ra,
+ attr: xe,
children: _i,
claim_svg_element: di,
detach: $n,
- init: Zr,
- insert_hydration: Yr,
+ init: Wr,
+ insert_hydration: Zr,
noop: fi,
- safe_not_equal: Xr,
+ safe_not_equal: Yr,
svg_element: hi
} = window.__gradio__svelte__internal;
-function Kr(l) {
+function Xr(l) {
let e, t, n;
return {
c() {
@@ -2538,10 +2552,10 @@ function Kr(l) {
t = di(a, "path", { fill: !0, d: !0 }), _i(t).forEach($n), n = di(a, "path", { fill: !0, d: !0 }), _i(n).forEach($n), a.forEach($n), this.h();
},
h() {
- Ae(t, "fill", "currentColor"), Ae(t, "d", "M12 15H5a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5V5a1 1 0 0 0-1-1H3V2h6a3 3 0 0 1 3 3zM5 9a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h5V9zm15 14v2a1 1 0 0 0 1 1h5v-4h-5a1 1 0 0 0-1 1z"), Ae(n, "fill", "currentColor"), Ae(n, "d", "M2 30h28V2Zm26-2h-7a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5v-2a1 1 0 0 0-1-1h-6v-2h6a3 3 0 0 1 3 3Z"), Ae(e, "xmlns", "http://www.w3.org/2000/svg"), Ae(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Ae(e, "aria-hidden", "true"), Ae(e, "role", "img"), Ae(e, "class", "iconify iconify--carbon"), Ae(e, "width", "100%"), Ae(e, "height", "100%"), Ae(e, "preserveAspectRatio", "xMidYMid meet"), Ae(e, "viewBox", "0 0 32 32");
+ xe(t, "fill", "currentColor"), xe(t, "d", "M12 15H5a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5V5a1 1 0 0 0-1-1H3V2h6a3 3 0 0 1 3 3zM5 9a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h5V9zm15 14v2a1 1 0 0 0 1 1h5v-4h-5a1 1 0 0 0-1 1z"), xe(n, "fill", "currentColor"), xe(n, "d", "M2 30h28V2Zm26-2h-7a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5v-2a1 1 0 0 0-1-1h-6v-2h6a3 3 0 0 1 3 3Z"), xe(e, "xmlns", "http://www.w3.org/2000/svg"), xe(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), xe(e, "aria-hidden", "true"), xe(e, "role", "img"), xe(e, "class", "iconify iconify--carbon"), xe(e, "width", "100%"), xe(e, "height", "100%"), xe(e, "preserveAspectRatio", "xMidYMid meet"), xe(e, "viewBox", "0 0 32 32");
},
m(i, a) {
- Yr(i, e, a), Ia(e, t), Ia(e, n);
+ Zr(i, e, a), Ra(e, t), Ra(e, n);
},
p: fi,
i: fi,
@@ -2551,9 +2565,9 @@ function Kr(l) {
}
};
}
-class ao extends Wr {
+class no extends jr {
constructor(e) {
- super(), Zr(this, e, null, Kr, Xr, {});
+ super(), Wr(this, e, null, Xr, Yr, {});
}
}
const {
@@ -2611,10 +2625,10 @@ const {
append_hydration: LD,
attr: OD,
children: qD,
- claim_svg_element: ND,
- detach: MD,
- init: zD,
- insert_hydration: PD,
+ claim_svg_element: MD,
+ detach: ND,
+ init: PD,
+ insert_hydration: zD,
noop: HD,
safe_not_equal: UD,
svg_element: GD
@@ -2670,10 +2684,10 @@ const {
text: Ow
} = window.__gradio__svelte__internal, {
SvelteComponent: qw,
- append_hydration: Nw,
- attr: Mw,
- children: zw,
- claim_svg_element: Pw,
+ append_hydration: Mw,
+ attr: Nw,
+ children: Pw,
+ claim_svg_element: zw,
claim_text: Hw,
detach: Uw,
init: Gw,
@@ -2728,10 +2742,10 @@ const {
claim_svg_element: Ly,
detach: Oy,
init: qy,
- insert_hydration: Ny,
- noop: My,
- safe_not_equal: zy,
- svg_element: Py
+ insert_hydration: My,
+ noop: Ny,
+ safe_not_equal: Py,
+ svg_element: zy
} = window.__gradio__svelte__internal, {
SvelteComponent: Hy,
append_hydration: Uy,
@@ -2787,71 +2801,71 @@ const {
children: Lk,
claim_svg_element: Ok,
detach: qk,
- init: Nk,
- insert_hydration: Mk,
- noop: zk,
- safe_not_equal: Pk,
+ init: Mk,
+ insert_hydration: Nk,
+ noop: Pk,
+ safe_not_equal: zk,
svg_element: Hk
} = window.__gradio__svelte__internal, {
HtmlTagHydration: Zn,
- SvelteComponent: Qr,
- append_hydration: G,
- attr: q,
+ SvelteComponent: Kr,
+ append_hydration: V,
+ attr: O,
check_outros: an,
children: ne,
claim_component: Ji,
- claim_element: W,
+ claim_element: Z,
claim_html_tag: Yn,
- claim_space: De,
- claim_text: lo,
+ claim_space: $e,
+ claim_text: io,
create_component: ea,
destroy_component: ta,
- detach: H,
- element: Z,
+ detach: U,
+ element: Y,
empty: Hn,
get_svelte_dataset: Ft,
group_outros: ln,
- init: Jr,
- insert_hydration: ve,
- listen: se,
+ init: Qr,
+ insert_hydration: we,
+ listen: ue,
mount_component: na,
noop: sn,
run_all: Tt,
- safe_not_equal: es,
- set_data: oo,
+ safe_not_equal: Jr,
+ set_data: ao,
set_input_value: Un,
set_style: Gn,
- space: we,
- text: ro,
- toggle_class: nt,
- transition_in: ge,
- transition_out: xe
-} = window.__gradio__svelte__internal, { createEventDispatcher: ts } = window.__gradio__svelte__internal;
-function La(l) {
+ space: Ee,
+ text: lo,
+ toggle_class: at,
+ transition_in: De,
+ transition_out: Ie
+} = window.__gradio__svelte__internal, { createEventDispatcher: es } = window.__gradio__svelte__internal;
+function Ia(l) {
let e, t, n, i, a, o, r, s = (
/*interactive*/
- l[2] && Oa(l)
+ l[2] && La(l)
);
return i = new Qi({}), {
c() {
- e = Z("div"), s && s.c(), t = we(), n = Z("button"), ea(i.$$.fragment), this.h();
+ e = Y("div"), s && s.c(), t = Ee(), n = Y("button"), ea(i.$$.fragment), this.h();
},
l(u) {
- e = W(u, "DIV", { class: !0 });
+ e = Z(u, "DIV", { class: !0 });
var c = ne(e);
- s && s.l(c), t = De(c), n = W(c, "BUTTON", {
+ s && s.l(c), t = $e(c), n = Z(c, "BUTTON", {
class: !0,
"aria-label": !0,
"aria-roledescription": !0
});
var f = ne(n);
- Ji(i.$$.fragment, f), f.forEach(H), c.forEach(H), this.h();
+ Ji(i.$$.fragment, f), f.forEach(U), c.forEach(U), this.h();
},
h() {
- q(n, "class", "copy-btn svelte-x24fyc"), q(n, "aria-label", "Copy"), q(n, "aria-roledescription", "Copy text"), q(e, "class", "edit-controls svelte-x24fyc");
+ O(n, "class", "copy-btn svelte-x24fyc"), O(n, "aria-label", "Copy"), O(n, "aria-roledescription", "Copy text"), O(e, "class", "edit-controls svelte-x24fyc");
},
m(u, c) {
- ve(u, e, c), s && s.m(e, null), G(e, t), G(e, n), na(i, n, null), a = !0, o || (r = se(
+ we(u, e, c), s && s.m(e, null), V(e, t), V(e, n), na(i, n, null), a = !0, o || (r = ue(
n,
"click",
/*copyToClipboard*/
@@ -2860,33 +2874,33 @@ function La(l) {
},
p(u, c) {
/*interactive*/
- u[2] ? s ? s.p(u, c) : (s = Oa(u), s.c(), s.m(e, t)) : s && (s.d(1), s = null);
+ u[2] ? s ? s.p(u, c) : (s = La(u), s.c(), s.m(e, t)) : s && (s.d(1), s = null);
},
i(u) {
- a || (ge(i.$$.fragment, u), a = !0);
+ a || (De(i.$$.fragment, u), a = !0);
},
o(u) {
- xe(i.$$.fragment, u), a = !1;
+ Ie(i.$$.fragment, u), a = !1;
},
d(u) {
- u && H(e), s && s.d(), ta(i), o = !1, r();
+ u && U(e), s && s.d(), ta(i), o = !1, r();
}
};
}
-function Oa(l) {
+function La(l) {
let e, t = "✏️ Edit", n, i;
return {
c() {
- e = Z("button"), e.textContent = t, this.h();
+ e = Y("button"), e.textContent = t, this.h();
},
l(a) {
- e = W(a, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(e) !== "svelte-n56vpj" && (e.textContent = t), this.h();
+ e = Z(a, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(e) !== "svelte-n56vpj" && (e.textContent = t), this.h();
},
h() {
- q(e, "class", "edit-btn svelte-x24fyc");
+ O(e, "class", "edit-btn svelte-x24fyc");
},
m(a, o) {
- ve(a, e, o), n || (i = se(
+ we(a, e, o), n || (i = ue(
e,
"click",
/*startEditing*/
@@ -2895,36 +2909,36 @@ function Oa(l) {
},
p: sn,
d(a) {
- a && H(e), n = !1, i();
+ a && U(e), n = !1, i();
}
};
}
-function qa(l) {
+function Oa(l) {
let e, t, n = "💾 Save", i, a, o = "❌ Cancel", r, s, u, c, f = (
/*edit_mode*/
- l[3] === "tabs" && Na(l)
+ l[3] === "tabs" && qa(l)
);
return {
c() {
- e = Z("div"), t = Z("button"), t.textContent = n, i = we(), a = Z("button"), a.textContent = o, r = we(), f && f.c(), this.h();
+ e = Y("div"), t = Y("button"), t.textContent = n, i = Ee(), a = Y("button"), a.textContent = o, r = Ee(), f && f.c(), this.h();
},
l(d) {
- e = W(d, "DIV", { class: !0 });
+ e = Z(d, "DIV", { class: !0 });
var h = ne(e);
- t = W(h, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(t) !== "svelte-1gd1bpi" && (t.textContent = n), i = De(h), a = W(h, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(a) !== "svelte-1h9521n" && (a.textContent = o), r = De(h), f && f.l(h), h.forEach(H), this.h();
+ t = Z(h, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(t) !== "svelte-1gd1bpi" && (t.textContent = n), i = $e(h), a = Z(h, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(a) !== "svelte-1h9521n" && (a.textContent = o), r = $e(h), f && f.l(h), h.forEach(U), this.h();
},
h() {
- q(t, "class", "save-btn svelte-x24fyc"), q(a, "class", "cancel-btn svelte-x24fyc"), q(e, "class", "edit-controls svelte-x24fyc");
+ O(t, "class", "save-btn svelte-x24fyc"), O(a, "class", "cancel-btn svelte-x24fyc"), O(e, "class", "edit-controls svelte-x24fyc");
},
m(d, h) {
- ve(d, e, h), G(e, t), G(e, i), G(e, a), G(e, r), f && f.m(e, null), s = !0, u || (c = [
- se(
+ we(d, e, h), V(e, t), V(e, i), V(e, a), V(e, r), f && f.m(e, null), s = !0, u || (c = [
+ ue(
t,
"click",
/*saveChanges*/
l[15]
),
- se(
+ ue(
a,
"click",
/*cancelEditing*/
@@ -2935,66 +2949,66 @@ function qa(l) {
p(d, h) {
/*edit_mode*/
d[3] === "tabs" ? f ? (f.p(d, h), h[0] & /*edit_mode*/
- 8 && ge(f, 1)) : (f = Na(d), f.c(), ge(f, 1), f.m(e, null)) : f && (ln(), xe(f, 1, 1, () => {
+ 8 && De(f, 1)) : (f = qa(d), f.c(), De(f, 1), f.m(e, null)) : f && (ln(), Ie(f, 1, 1, () => {
f = null;
}), an());
},
i(d) {
- s || (ge(f), s = !0);
+ s || (De(f), s = !0);
},
o(d) {
- xe(f), s = !1;
+ Ie(f), s = !1;
},
d(d) {
- d && H(e), f && f.d(), u = !1, Tt(c);
+ d && U(e), f && f.d(), u = !1, Tt(c);
}
};
}
-function Na(l) {
+function qa(l) {
let e, t, n = "Edit", i, a, o = "Preview", r, s, u, c, f, d;
return u = new Qi({}), {
c() {
- e = Z("div"), t = Z("button"), t.textContent = n, i = we(), a = Z("button"), a.textContent = o, r = we(), s = Z("button"), ea(u.$$.fragment), this.h();
+ e = Y("div"), t = Y("button"), t.textContent = n, i = Ee(), a = Y("button"), a.textContent = o, r = Ee(), s = Y("button"), ea(u.$$.fragment), this.h();
},
l(h) {
- e = W(h, "DIV", { class: !0 });
- var m = ne(e);
- t = W(m, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(t) !== "svelte-1a32n6r" && (t.textContent = n), i = De(m), a = W(m, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(a) !== "svelte-cybavr" && (a.textContent = o), r = De(m), s = W(m, "BUTTON", {
+ e = Z(h, "DIV", { class: !0 });
+ var p = ne(e);
+ t = Z(p, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(t) !== "svelte-1a32n6r" && (t.textContent = n), i = $e(p), a = Z(p, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(a) !== "svelte-cybavr" && (a.textContent = o), r = $e(p), s = Z(p, "BUTTON", {
class: !0,
"aria-label": !0,
"aria-roledescription": !0
});
- var D = ne(s);
- Ji(u.$$.fragment, D), D.forEach(H), m.forEach(H), this.h();
+ var b = ne(s);
+ Ji(u.$$.fragment, b), b.forEach(U), p.forEach(U), this.h();
},
h() {
- q(t, "class", "tab-btn svelte-x24fyc"), nt(
+ O(t, "class", "tab-btn svelte-x24fyc"), at(
t,
"active",
/*currentTab*/
l[10] === "edit"
- ), q(a, "class", "tab-btn svelte-x24fyc"), nt(
+ ), O(a, "class", "tab-btn svelte-x24fyc"), at(
a,
"active",
/*currentTab*/
l[10] === "preview"
- ), q(s, "class", "copy-btn svelte-x24fyc"), q(s, "aria-label", "Copy"), q(s, "aria-roledescription", "Copy text"), q(e, "class", "tab-controls svelte-x24fyc");
+ ), O(s, "class", "copy-btn svelte-x24fyc"), O(s, "aria-label", "Copy"), O(s, "aria-roledescription", "Copy text"), O(e, "class", "tab-controls svelte-x24fyc");
},
- m(h, m) {
- ve(h, e, m), G(e, t), G(e, i), G(e, a), G(e, r), G(e, s), na(u, s, null), c = !0, f || (d = [
- se(
+ m(h, p) {
+ we(h, e, p), V(e, t), V(e, i), V(e, a), V(e, r), V(e, s), na(u, s, null), c = !0, f || (d = [
+ ue(
t,
"click",
/*click_handler*/
l[23]
),
- se(
+ ue(
a,
"click",
/*click_handler_1*/
l[24]
),
- se(
+ ue(
s,
"click",
/*copyToClipboard*/
@@ -3002,15 +3016,15 @@ function Na(l) {
)
], f = !0);
},
- p(h, m) {
- (!c || m[0] & /*currentTab*/
- 1024) && nt(
+ p(h, p) {
+ (!c || p[0] & /*currentTab*/
+ 1024) && at(
t,
"active",
/*currentTab*/
h[10] === "edit"
- ), (!c || m[0] & /*currentTab*/
- 1024) && nt(
+ ), (!c || p[0] & /*currentTab*/
+ 1024) && at(
a,
"active",
/*currentTab*/
@@ -3018,47 +3032,47 @@ function Na(l) {
);
},
i(h) {
- c || (ge(u.$$.fragment, h), c = !0);
+ c || (De(u.$$.fragment, h), c = !0);
},
o(h) {
- xe(u.$$.fragment, h), c = !1;
+ Ie(u.$$.fragment, h), c = !1;
},
d(h) {
- h && H(e), ta(u), f = !1, Tt(d);
+ h && U(e), ta(u), f = !1, Tt(d);
}
};
}
-function ns(l) {
+function ts(l) {
let e, t, n, i;
return {
c() {
- e = Z("div"), t = new Zn(!1), this.h();
+ e = Y("div"), t = new Zn(!1), this.h();
},
l(a) {
- e = W(a, "DIV", {
+ e = Z(a, "DIV", {
class: !0,
role: !0,
"aria-label": !0
});
var o = ne(e);
- t = Yn(o, !1), o.forEach(H), this.h();
+ t = Yn(o, !1), o.forEach(U), this.h();
},
h() {
- t.a = null, q(e, "class", "markdown-content svelte-x24fyc"), q(e, "role", "document"), q(e, "aria-label", "Markdown content with interactive highlights");
+ t.a = null, O(e, "class", "markdown-content svelte-x24fyc"), O(e, "role", "document"), O(e, "aria-label", "Markdown content with interactive highlights");
},
m(a, o) {
- ve(a, e, o), t.m(
+ we(a, e, o), t.m(
/*processedHtml*/
l[8],
e
), n || (i = [
- se(
+ ue(
e,
"click",
/*handleTermClick*/
l[11]
),
- se(
+ ue(
e,
"keydown",
/*handleKeydown*/
@@ -3076,13 +3090,13 @@ function ns(l) {
i: sn,
o: sn,
d(a) {
- a && H(e), n = !1, Tt(i);
+ a && U(e), n = !1, Tt(i);
}
};
}
-function is(l) {
+function ns(l) {
let e, t, n, i;
- const a = [ls, as], o = [];
+ const a = [as, is], o = [];
function r(s, u) {
return (
/*edit_mode*/
@@ -3100,52 +3114,52 @@ function is(l) {
t && t.l(s), n = Hn();
},
m(s, u) {
- ~e && o[e].m(s, u), ve(s, n, u), i = !0;
+ ~e && o[e].m(s, u), we(s, n, u), i = !0;
},
p(s, u) {
let c = e;
- e = r(s), e === c ? ~e && o[e].p(s, u) : (t && (ln(), xe(o[c], 1, 1, () => {
+ e = r(s), e === c ? ~e && o[e].p(s, u) : (t && (ln(), Ie(o[c], 1, 1, () => {
o[c] = null;
- }), an()), ~e ? (t = o[e], t ? t.p(s, u) : (t = o[e] = a[e](s), t.c()), ge(t, 1), t.m(n.parentNode, n)) : t = null);
+ }), an()), ~e ? (t = o[e], t ? t.p(s, u) : (t = o[e] = a[e](s), t.c()), De(t, 1), t.m(n.parentNode, n)) : t = null);
},
i(s) {
- i || (ge(t), i = !0);
+ i || (De(t), i = !0);
},
o(s) {
- xe(t), i = !1;
+ Ie(t), i = !1;
},
d(s) {
- s && H(n), ~e && o[e].d(s);
+ s && U(n), ~e && o[e].d(s);
}
};
}
-function as(l) {
+function is(l) {
let e;
function t(a, o) {
if (
/*currentTab*/
a[10] === "edit"
- ) return rs;
+ ) return os;
if (
/*currentTab*/
a[10] === "preview"
- ) return os;
+ ) return ls;
}
let n = t(l), i = n && n(l);
return {
c() {
- e = Z("div"), i && i.c(), this.h();
+ e = Y("div"), i && i.c(), this.h();
},
l(a) {
- e = W(a, "DIV", { class: !0 });
+ e = Z(a, "DIV", { class: !0 });
var o = ne(e);
- i && i.l(o), o.forEach(H), this.h();
+ i && i.l(o), o.forEach(U), this.h();
},
h() {
- q(e, "class", "tab-content svelte-x24fyc");
+ O(e, "class", "tab-content svelte-x24fyc");
},
m(a, o) {
- ve(a, e, o), i && i.m(e, null);
+ we(a, e, o), i && i.m(e, null);
},
p(a, o) {
n === (n = t(a)) && i ? i.p(a, o) : (i && i.d(1), i = n && n(a), i && (i.c(), i.m(e, null)));
@@ -3153,60 +3167,60 @@ function as(l) {
i: sn,
o: sn,
d(a) {
- a && H(e), i && i.d();
+ a && U(e), i && i.d();
}
};
}
-function ls(l) {
- let e, t, n, i = "Markdown Editor", a, o, r, s, u, c, f, d, h, m;
+function as(l) {
+ let e, t, n, i = "Markdown Editor", a, o, r, s, u, c, f, d, h, p;
r = new Qi({});
- let D = (
+ let b = (
/*show_preview*/
l[4] && Ma(l)
);
return {
c() {
- e = Z("div"), t = Z("div"), n = Z("h4"), n.textContent = i, a = we(), o = Z("button"), ea(r.$$.fragment), s = we(), u = Z("textarea"), c = we(), D && D.c(), f = Hn(), this.h();
+ e = Y("div"), t = Y("div"), n = Y("h4"), n.textContent = i, a = Ee(), o = Y("button"), ea(r.$$.fragment), s = Ee(), u = Y("textarea"), c = Ee(), b && b.c(), f = Hn(), this.h();
},
l(v) {
- e = W(v, "DIV", { class: !0 });
- var w = ne(e);
- t = W(w, "DIV", { class: !0 });
- var p = ne(t);
- n = W(p, "H4", { class: !0, "data-svelte-h": !0 }), Ft(n) !== "svelte-1nsb0do" && (n.textContent = i), a = De(p), o = W(p, "BUTTON", {
+ e = Z(v, "DIV", { class: !0 });
+ var F = ne(e);
+ t = Z(F, "DIV", { class: !0 });
+ var g = ne(t);
+ n = Z(g, "H4", { class: !0, "data-svelte-h": !0 }), Ft(n) !== "svelte-1nsb0do" && (n.textContent = i), a = $e(g), o = Z(g, "BUTTON", {
class: !0,
"aria-label": !0,
"aria-roledescription": !0
});
var _ = ne(o);
- Ji(r.$$.fragment, _), _.forEach(H), p.forEach(H), s = De(w), u = W(w, "TEXTAREA", {
+ Ji(r.$$.fragment, _), _.forEach(U), g.forEach(U), s = $e(F), u = Z(F, "TEXTAREA", {
class: !0,
placeholder: !0,
spellcheck: !0
- }), ne(u).forEach(H), w.forEach(H), c = De(v), D && D.l(v), f = Hn(), this.h();
+ }), ne(u).forEach(U), F.forEach(U), c = $e(v), b && b.l(v), f = Hn(), this.h();
},
h() {
- q(n, "class", "svelte-x24fyc"), q(o, "class", "copy-btn svelte-x24fyc"), q(o, "aria-label", "Copy"), q(o, "aria-roledescription", "Copy text"), q(t, "class", "editor-header svelte-x24fyc"), q(u, "class", "markdown-editor svelte-x24fyc"), q(u, "placeholder", "Enter your markdown content..."), q(u, "spellcheck", "false"), q(e, "class", "editor-section svelte-x24fyc");
+ O(n, "class", "svelte-x24fyc"), O(o, "class", "copy-btn svelte-x24fyc"), O(o, "aria-label", "Copy"), O(o, "aria-roledescription", "Copy text"), O(t, "class", "editor-header svelte-x24fyc"), O(u, "class", "markdown-editor svelte-x24fyc"), O(u, "placeholder", "Enter your markdown content..."), O(u, "spellcheck", "false"), O(e, "class", "editor-section svelte-x24fyc");
},
- m(v, w) {
- ve(v, e, w), G(e, t), G(t, n), G(t, a), G(t, o), na(r, o, null), G(e, s), G(e, u), Un(
+ m(v, F) {
+ we(v, e, F), V(e, t), V(t, n), V(t, a), V(t, o), na(r, o, null), V(e, s), V(e, u), Un(
u,
/*editingContent*/
l[7]
- ), ve(v, c, w), D && D.m(v, w), ve(v, f, w), d = !0, h || (m = [
- se(
+ ), we(v, c, F), b && b.m(v, F), we(v, f, F), d = !0, h || (p = [
+ ue(
o,
"click",
/*copyToClipboard*/
l[19]
),
- se(
+ ue(
u,
"input",
/*textarea_input_handler*/
l[25]
),
- se(
+ ue(
u,
"input",
/*handleTextareaInput*/
@@ -3214,57 +3228,57 @@ function ls(l) {
)
], h = !0);
},
- p(v, w) {
- w[0] & /*editingContent*/
+ p(v, F) {
+ F[0] & /*editingContent*/
128 && Un(
u,
/*editingContent*/
v[7]
), /*show_preview*/
- v[4] ? D ? D.p(v, w) : (D = Ma(v), D.c(), D.m(f.parentNode, f)) : D && (D.d(1), D = null);
+ v[4] ? b ? b.p(v, F) : (b = Ma(v), b.c(), b.m(f.parentNode, f)) : b && (b.d(1), b = null);
},
i(v) {
- d || (ge(r.$$.fragment, v), d = !0);
+ d || (De(r.$$.fragment, v), d = !0);
},
o(v) {
- xe(r.$$.fragment, v), d = !1;
+ Ie(r.$$.fragment, v), d = !1;
},
d(v) {
- v && (H(e), H(c), H(f)), ta(r), D && D.d(v), h = !1, Tt(m);
+ v && (U(e), U(c), U(f)), ta(r), b && b.d(v), h = !1, Tt(p);
}
};
}
-function os(l) {
+function ls(l) {
let e, t, n, i;
return {
c() {
- e = Z("div"), t = new Zn(!1), this.h();
+ e = Y("div"), t = new Zn(!1), this.h();
},
l(a) {
- e = W(a, "DIV", {
+ e = Z(a, "DIV", {
class: !0,
role: !0,
"aria-label": !0
});
var o = ne(e);
- t = Yn(o, !1), o.forEach(H), this.h();
+ t = Yn(o, !1), o.forEach(U), this.h();
},
h() {
- t.a = null, q(e, "class", "markdown-content preview svelte-x24fyc"), q(e, "role", "document"), q(e, "aria-label", "Markdown preview with interactive highlights");
+ t.a = null, O(e, "class", "markdown-content preview svelte-x24fyc"), O(e, "role", "document"), O(e, "aria-label", "Markdown preview with interactive highlights");
},
m(a, o) {
- ve(a, e, o), t.m(
+ we(a, e, o), t.m(
/*processedHtml*/
l[8],
e
), n || (i = [
- se(
+ ue(
e,
"click",
/*handleTermClick*/
l[11]
),
- se(
+ ue(
e,
"keydown",
/*handleKeydown*/
@@ -3280,39 +3294,39 @@ function os(l) {
);
},
d(a) {
- a && H(e), n = !1, Tt(i);
+ a && U(e), n = !1, Tt(i);
}
};
}
-function rs(l) {
+function os(l) {
let e, t, n;
return {
c() {
- e = Z("textarea"), this.h();
+ e = Y("textarea"), this.h();
},
l(i) {
- e = W(i, "TEXTAREA", {
+ e = Z(i, "TEXTAREA", {
class: !0,
placeholder: !0,
spellcheck: !0
- }), ne(e).forEach(H), this.h();
+ }), ne(e).forEach(U), this.h();
},
h() {
- q(e, "class", "markdown-editor fullwidth svelte-x24fyc"), q(e, "placeholder", "Enter your markdown content..."), q(e, "spellcheck", "false");
+ O(e, "class", "markdown-editor fullwidth svelte-x24fyc"), O(e, "placeholder", "Enter your markdown content..."), O(e, "spellcheck", "false");
},
m(i, a) {
- ve(i, e, a), Un(
+ we(i, e, a), Un(
e,
/*editingContent*/
l[7]
), t || (n = [
- se(
+ ue(
e,
"input",
/*textarea_input_handler_1*/
l[26]
),
- se(
+ ue(
e,
"input",
/*handleTextareaInput*/
@@ -3329,7 +3343,7 @@ function rs(l) {
);
},
d(i) {
- i && H(e), t = !1, Tt(n);
+ i && U(e), t = !1, Tt(n);
}
};
}
@@ -3337,35 +3351,35 @@ function Ma(l) {
let e, t, n = 'Live Preview
', i, a, o, r, s;
return {
c() {
- e = Z("div"), t = Z("div"), t.innerHTML = n, i = we(), a = Z("div"), o = new Zn(!1), this.h();
+ e = Y("div"), t = Y("div"), t.innerHTML = n, i = Ee(), a = Y("div"), o = new Zn(!1), this.h();
},
l(u) {
- e = W(u, "DIV", { class: !0 });
+ e = Z(u, "DIV", { class: !0 });
var c = ne(e);
- t = W(c, "DIV", { class: !0, "data-svelte-h": !0 }), Ft(t) !== "svelte-10am53t" && (t.innerHTML = n), i = De(c), a = W(c, "DIV", {
+ t = Z(c, "DIV", { class: !0, "data-svelte-h": !0 }), Ft(t) !== "svelte-10am53t" && (t.innerHTML = n), i = $e(c), a = Z(c, "DIV", {
class: !0,
role: !0,
"aria-label": !0
});
var f = ne(a);
- o = Yn(f, !1), f.forEach(H), c.forEach(H), this.h();
+ o = Yn(f, !1), f.forEach(U), c.forEach(U), this.h();
},
h() {
- q(t, "class", "preview-header svelte-x24fyc"), o.a = null, q(a, "class", "markdown-content preview svelte-x24fyc"), q(a, "role", "document"), q(a, "aria-label", "Markdown preview with interactive highlights"), q(e, "class", "preview-section svelte-x24fyc");
+ O(t, "class", "preview-header svelte-x24fyc"), o.a = null, O(a, "class", "markdown-content preview svelte-x24fyc"), O(a, "role", "document"), O(a, "aria-label", "Markdown preview with interactive highlights"), O(e, "class", "preview-section svelte-x24fyc");
},
m(u, c) {
- ve(u, e, c), G(e, t), G(e, i), G(e, a), o.m(
+ we(u, e, c), V(e, t), V(e, i), V(e, a), o.m(
/*processedHtml*/
l[8],
a
), r || (s = [
- se(
+ ue(
a,
"click",
/*handleTermClick*/
l[11]
),
- se(
+ ue(
a,
"keydown",
/*handleKeydown*/
@@ -3381,75 +3395,75 @@ function Ma(l) {
);
},
d(u) {
- u && H(e), r = !1, Tt(s);
+ u && U(e), r = !1, Tt(s);
}
};
}
-function za(l) {
+function Na(l) {
let e, t, n, i = (
/*selectedHighlight*/
(l[5].title || /*selectedHighlight*/
l[5].term || "Highlighted Text") + ""
- ), a, o, r, s = "×", u, c, f, d, h, m, D, v = (
+ ), a, o, r, s = "×", u, c, f, d, h, p, b, v = (
/*selectedHighlight*/
l[5].category && Pa(l)
);
return {
c() {
- e = Z("div"), t = Z("div"), n = Z("h3"), a = ro(i), o = we(), r = Z("button"), r.textContent = s, u = we(), c = Z("div"), v && v.c(), f = we(), d = Z("div"), h = new Zn(!1), this.h();
+ e = Y("div"), t = Y("div"), n = Y("h3"), a = lo(i), o = Ee(), r = Y("button"), r.textContent = s, u = Ee(), c = Y("div"), v && v.c(), f = Ee(), d = Y("div"), h = new Zn(!1), this.h();
},
- l(w) {
- e = W(w, "DIV", { class: !0, style: !0 });
- var p = ne(e);
- t = W(p, "DIV", { class: !0 });
+ l(F) {
+ e = Z(F, "DIV", { class: !0, style: !0 });
+ var g = ne(e);
+ t = Z(g, "DIV", { class: !0 });
var _ = ne(t);
- n = W(_, "H3", { class: !0 });
- var b = ne(n);
- a = lo(b, i), b.forEach(H), o = De(_), r = W(_, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(r) !== "svelte-1klfhb2" && (r.textContent = s), _.forEach(H), u = De(p), c = W(p, "DIV", { class: !0 });
+ n = Z(_, "H3", { class: !0 });
+ var D = ne(n);
+ a = io(D, i), D.forEach(U), o = $e(_), r = Z(_, "BUTTON", { class: !0, "data-svelte-h": !0 }), Ft(r) !== "svelte-1klfhb2" && (r.textContent = s), _.forEach(U), u = $e(g), c = Z(g, "DIV", { class: !0 });
var y = ne(c);
- v && v.l(y), f = De(y), d = W(y, "DIV", { class: !0 });
+ v && v.l(y), f = $e(y), d = Z(y, "DIV", { class: !0 });
var k = ne(d);
- h = Yn(k, !1), k.forEach(H), y.forEach(H), p.forEach(H), this.h();
+ h = Yn(k, !1), k.forEach(U), y.forEach(U), g.forEach(U), this.h();
},
h() {
- q(n, "class", "svelte-x24fyc"), q(r, "class", "close-btn svelte-x24fyc"), q(t, "class", "panel-header svelte-x24fyc"), h.a = null, q(d, "class", "content-text svelte-x24fyc"), q(c, "class", "panel-content svelte-x24fyc"), q(e, "class", "side-panel svelte-x24fyc"), Gn(
+ O(n, "class", "svelte-x24fyc"), O(r, "class", "close-btn svelte-x24fyc"), O(t, "class", "panel-header svelte-x24fyc"), h.a = null, O(d, "class", "content-text svelte-x24fyc"), O(c, "class", "panel-content svelte-x24fyc"), O(e, "class", "side-panel svelte-x24fyc"), Gn(
e,
"width",
/*panel_width*/
l[1]
);
},
- m(w, p) {
- ve(w, e, p), G(e, t), G(t, n), G(n, a), G(t, o), G(t, r), G(e, u), G(e, c), v && v.m(c, null), G(c, f), G(c, d), h.m(
+ m(F, g) {
+ we(F, e, g), V(e, t), V(t, n), V(n, a), V(t, o), V(t, r), V(e, u), V(e, c), v && v.m(c, null), V(c, f), V(c, d), h.m(
/*panelContent*/
l[9],
d
- ), m || (D = se(
+ ), p || (b = ue(
r,
"click",
/*closeSidePanel*/
l[13]
- ), m = !0);
+ ), p = !0);
},
- p(w, p) {
- p[0] & /*selectedHighlight*/
+ p(F, g) {
+ g[0] & /*selectedHighlight*/
32 && i !== (i = /*selectedHighlight*/
- (w[5].title || /*selectedHighlight*/
- w[5].term || "Highlighted Text") + "") && oo(a, i), /*selectedHighlight*/
- w[5].category ? v ? v.p(w, p) : (v = Pa(w), v.c(), v.m(c, f)) : v && (v.d(1), v = null), p[0] & /*panelContent*/
+ (F[5].title || /*selectedHighlight*/
+ F[5].term || "Highlighted Text") + "") && ao(a, i), /*selectedHighlight*/
+ F[5].category ? v ? v.p(F, g) : (v = Pa(F), v.c(), v.m(c, f)) : v && (v.d(1), v = null), g[0] & /*panelContent*/
512 && h.p(
/*panelContent*/
- w[9]
- ), p[0] & /*panel_width*/
+ F[9]
+ ), g[0] & /*panel_width*/
2 && Gn(
e,
"width",
/*panel_width*/
- w[1]
+ F[1]
);
},
- d(w) {
- w && H(e), v && v.d(), m = !1, D();
+ d(F) {
+ F && U(e), v && v.d(), p = !1, b();
}
};
}
@@ -3460,15 +3474,15 @@ function Pa(l) {
), n;
return {
c() {
- e = Z("div"), n = ro(t), this.h();
+ e = Y("div"), n = lo(t), this.h();
},
l(i) {
- e = W(i, "DIV", { class: !0, style: !0 });
+ e = Z(i, "DIV", { class: !0, style: !0 });
var a = ne(e);
- n = lo(a, t), a.forEach(H), this.h();
+ n = io(a, t), a.forEach(U), this.h();
},
h() {
- q(e, "class", "category-badge svelte-x24fyc"), Gn(
+ O(e, "class", "category-badge svelte-x24fyc"), Gn(
e,
"background-color",
/*selectedHighlight*/
@@ -3476,12 +3490,12 @@ function Pa(l) {
);
},
m(i, a) {
- ve(i, e, a), G(e, n);
+ we(i, e, a), V(e, n);
},
p(i, a) {
a[0] & /*selectedHighlight*/
32 && t !== (t = /*selectedHighlight*/
- i[5].category + "") && oo(n, t), a[0] & /*selectedHighlight*/
+ i[5].category + "") && ao(n, t), a[0] & /*selectedHighlight*/
32 && Gn(
e,
"background-color",
@@ -3490,53 +3504,53 @@ function Pa(l) {
);
},
d(i) {
- i && H(e);
+ i && U(e);
}
};
}
-function ss(l) {
+function rs(l) {
let e, t, n, i, a, o, r, s, u = !/*isEditing*/
- l[6] && La(l), c = (
+ l[6] && Ia(l), c = (
/*isEditing*/
- l[6] && qa(l)
+ l[6] && Oa(l)
);
- const f = [is, ns], d = [];
- function h(D, v) {
+ const f = [ns, ts], d = [];
+ function h(b, v) {
return (
/*isEditing*/
- D[6] ? 0 : 1
+ b[6] ? 0 : 1
);
}
a = h(l), o = d[a] = f[a](l);
- let m = (
+ let p = (
/*show_side_panel*/
l[0] && /*selectedHighlight*/
- l[5] && za(l)
+ l[5] && Na(l)
);
return {
c() {
- e = Z("div"), u && u.c(), t = we(), c && c.c(), n = we(), i = Z("div"), o.c(), r = we(), m && m.c(), this.h();
+ e = Y("div"), u && u.c(), t = Ee(), c && c.c(), n = Ee(), i = Y("div"), o.c(), r = Ee(), p && p.c(), this.h();
},
- l(D) {
- e = W(D, "DIV", { class: !0 });
+ l(b) {
+ e = Z(b, "DIV", { class: !0 });
var v = ne(e);
- u && u.l(v), t = De(v), c && c.l(v), n = De(v), i = W(v, "DIV", { class: !0 });
- var w = ne(i);
- o.l(w), w.forEach(H), r = De(v), m && m.l(v), v.forEach(H), this.h();
+ u && u.l(v), t = $e(v), c && c.l(v), n = $e(v), i = Z(v, "DIV", { class: !0 });
+ var F = ne(i);
+ o.l(F), F.forEach(U), r = $e(v), p && p.l(v), v.forEach(U), this.h();
},
h() {
- q(i, "class", "content-area svelte-x24fyc"), nt(
+ O(i, "class", "content-area svelte-x24fyc"), at(
i,
"split-mode",
/*edit_mode*/
l[3] === "split" && /*isEditing*/
l[6]
- ), q(e, "class", "markdown-container svelte-x24fyc"), nt(
+ ), O(e, "class", "markdown-container svelte-x24fyc"), at(
e,
"editing",
/*isEditing*/
l[6]
- ), nt(
+ ), at(
e,
"with-panel",
/*show_side_panel*/
@@ -3544,199 +3558,215 @@ function ss(l) {
l[5]
);
},
- m(D, v) {
- ve(D, e, v), u && u.m(e, null), G(e, t), c && c.m(e, null), G(e, n), G(e, i), d[a].m(i, null), G(e, r), m && m.m(e, null), s = !0;
+ m(b, v) {
+ we(b, e, v), u && u.m(e, null), V(e, t), c && c.m(e, null), V(e, n), V(e, i), d[a].m(i, null), V(e, r), p && p.m(e, null), s = !0;
},
- p(D, v) {
+ p(b, v) {
/*isEditing*/
- D[6] ? u && (ln(), xe(u, 1, 1, () => {
+ b[6] ? u && (ln(), Ie(u, 1, 1, () => {
u = null;
- }), an()) : u ? (u.p(D, v), v[0] & /*isEditing*/
- 64 && ge(u, 1)) : (u = La(D), u.c(), ge(u, 1), u.m(e, t)), /*isEditing*/
- D[6] ? c ? (c.p(D, v), v[0] & /*isEditing*/
- 64 && ge(c, 1)) : (c = qa(D), c.c(), ge(c, 1), c.m(e, n)) : c && (ln(), xe(c, 1, 1, () => {
+ }), an()) : u ? (u.p(b, v), v[0] & /*isEditing*/
+ 64 && De(u, 1)) : (u = Ia(b), u.c(), De(u, 1), u.m(e, t)), /*isEditing*/
+ b[6] ? c ? (c.p(b, v), v[0] & /*isEditing*/
+ 64 && De(c, 1)) : (c = Oa(b), c.c(), De(c, 1), c.m(e, n)) : c && (ln(), Ie(c, 1, 1, () => {
c = null;
}), an());
- let w = a;
- a = h(D), a === w ? d[a].p(D, v) : (ln(), xe(d[w], 1, 1, () => {
- d[w] = null;
- }), an(), o = d[a], o ? o.p(D, v) : (o = d[a] = f[a](D), o.c()), ge(o, 1), o.m(i, null)), (!s || v[0] & /*edit_mode, isEditing*/
- 72) && nt(
+ let F = a;
+ a = h(b), a === F ? d[a].p(b, v) : (ln(), Ie(d[F], 1, 1, () => {
+ d[F] = null;
+ }), an(), o = d[a], o ? o.p(b, v) : (o = d[a] = f[a](b), o.c()), De(o, 1), o.m(i, null)), (!s || v[0] & /*edit_mode, isEditing*/
+ 72) && at(
i,
"split-mode",
/*edit_mode*/
- D[3] === "split" && /*isEditing*/
- D[6]
+ b[3] === "split" && /*isEditing*/
+ b[6]
), /*show_side_panel*/
- D[0] && /*selectedHighlight*/
- D[5] ? m ? m.p(D, v) : (m = za(D), m.c(), m.m(e, null)) : m && (m.d(1), m = null), (!s || v[0] & /*isEditing*/
- 64) && nt(
+ b[0] && /*selectedHighlight*/
+ b[5] ? p ? p.p(b, v) : (p = Na(b), p.c(), p.m(e, null)) : p && (p.d(1), p = null), (!s || v[0] & /*isEditing*/
+ 64) && at(
e,
"editing",
/*isEditing*/
- D[6]
+ b[6]
), (!s || v[0] & /*show_side_panel, selectedHighlight*/
- 33) && nt(
+ 33) && at(
e,
"with-panel",
/*show_side_panel*/
- D[0] && /*selectedHighlight*/
- D[5]
+ b[0] && /*selectedHighlight*/
+ b[5]
);
},
- i(D) {
- s || (ge(u), ge(c), ge(o), s = !0);
+ i(b) {
+ s || (De(u), De(c), De(o), s = !0);
},
- o(D) {
- xe(u), xe(c), xe(o), s = !1;
+ o(b) {
+ Ie(u), Ie(c), Ie(o), s = !1;
},
- d(D) {
- D && H(e), u && u.d(), c && c.d(), d[a].d(), m && m.d();
+ d(b) {
+ b && U(e), u && u.d(), c && c.d(), d[a].d(), p && p.d();
}
};
}
-function Ha(l) {
+function ss(l) {
return l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function us(l, e, t) {
- var n = this && this.__awaiter || function(B, z, F, Y) {
- function N(K) {
- return K instanceof F ? K : new F(function($) {
- $(K);
+ var n = this && this.__awaiter || function(w, q, z, H) {
+ function E(N) {
+ return N instanceof z ? N : new z(function(le) {
+ le(N);
});
}
- return new (F || (F = Promise))(function(K, $) {
- function le(de) {
+ return new (z || (z = Promise))(function(N, le) {
+ function pe(re) {
try {
- Ie(Y.next(de));
- } catch (Le) {
- $(Le);
+ ke(H.next(re));
+ } catch (qe) {
+ le(qe);
}
}
- function $e(de) {
+ function ye(re) {
try {
- Ie(Y.throw(de));
- } catch (Le) {
- $(Le);
+ ke(H.throw(re));
+ } catch (qe) {
+ le(qe);
}
}
- function Ie(de) {
- de.done ? K(de.value) : N(de.value).then(le, $e);
+ function ke(re) {
+ re.done ? N(re.value) : E(re.value).then(pe, ye);
}
- Ie((Y = Y.apply(B, z || [])).next());
+ ke((H = H.apply(w, q || [])).next());
});
};
let { markdown_content: i = "" } = e, { highlights: a = [] } = e, { show_side_panel: o = !0 } = e, { panel_width: r = "300px" } = e, { interactive: s = !1 } = e, { edit_mode: u = "split" } = e, { show_preview: c = !0 } = e;
- const f = "textarea", d = ts();
- let h = null, m = "", D = "", v = !1, w = "", p = "", _ = "edit";
- function b(B) {
+ const f = "textarea", d = es();
+ let h = null, p = "", b = "", v = !1, F = "", g = "", _ = "edit";
+ function D(w) {
return n(this, void 0, void 0, function* () {
- let z = yield j(B);
- const F = a.filter((N) => N.position && N.position.length === 2);
- a.filter((N) => N.term && N.term.trim()).forEach((N) => {
+ const q = a.filter((N) => N.position && N.position.length === 2), z = a.filter((N) => N.term && N.term.trim());
+ let H = w;
+ w === i && (H = y(w, q));
+ let E = yield W(H);
+ w === i && (E = k(E, q)), z.forEach((N) => {
if (N.term && N.term.trim()) {
- const K = a.indexOf(N), $ = new RegExp(`\\b${Ha(N.term)}\\b`, "gi");
- z = z.replace($, (le) => {
- const $e = N.color || "#e3f2fd";
+ const le = a.indexOf(N), pe = new RegExp(`\\b${ss(N.term)}\\b`, "gi");
+ E = E.replace(pe, (ye) => {
+ const ke = N.color || "#e3f2fd";
return `
- ${le}
+ ${ye}
`;
});
}
- }), F.forEach((N) => {
- const [K, $] = N.position;
- if (K >= 0 && $ <= B.length && K < $) {
- const le = B.substring(K, $), $e = N.color || "#e3f2fd", Ie = a.indexOf(N), de = Ha(le).replace(/\s+/g, "\\s+"), Le = new RegExp(`\\b${de}\\b`, "gi");
- z = z.replace(Le, (ct) => `
- ${ct}
- `);
- }
- }), t(8, m = z);
+ }), t(8, p = E);
});
}
- function y() {
+ function y(w, q) {
+ const z = [...q].sort((E, N) => N.position[0] - E.position[0]);
+ let H = w;
+ return z.forEach((E) => {
+ const [N, le] = E.position;
+ if (N >= 0 && le <= H.length && N < le) {
+ const pe = H.substring(N, le), ye = a.indexOf(E), ke = `|||POSHL_START_${ye}|||`, re = `|||POSHL_END_${ye}|||`;
+ H = H.substring(0, N) + ke + pe + re + H.substring(le);
+ }
+ }), H;
+ }
+ function k(w, q) {
+ return q.forEach((z) => {
+ const [H, E] = z.position;
+ if (H >= 0 && E <= i.length && H < E) {
+ const N = i.substring(H, E), le = z.color || "#e3f2fd", pe = a.indexOf(z), ye = new RegExp(`\\|\\|\\|POSHL_START_${pe}\\|\\|\\|(.*?)\\|\\|\\|POSHL_END_${pe}\\|\\|\\|`, "g");
+ w = w.replace(ye, (ke, re) => `
+ ${re}
+ `);
+ }
+ }), w;
+ }
+ function $() {
return n(this, void 0, void 0, function* () {
- h && t(9, D = yield j(h.content || "No additional information available."));
+ h && t(9, b = yield W(h.content || "No additional information available."));
});
}
- function k(B) {
- const z = B.target;
- if (z.classList.contains("highlight-term") || z.classList.contains("highlight-position")) {
- const F = parseInt(z.dataset.index || "0"), Y = a[F];
- Y && (t(5, h = Y), d("select", { index: F, value: Y }));
+ function T(w) {
+ const q = w.target;
+ if (q.classList.contains("highlight-term") || q.classList.contains("highlight-position")) {
+ const z = parseInt(q.dataset.index || "0"), H = a[z];
+ H && (t(5, h = H), d("select", { index: z, value: H }));
}
}
- function C(B) {
- const z = B.target;
- (B.key === "Enter" || B.key === " ") && (z.classList.contains("highlight-term") || z.classList.contains("highlight-position")) && (B.preventDefault(), k(B));
+ function A(w) {
+ const q = w.target;
+ (w.key === "Enter" || w.key === " ") && (q.classList.contains("highlight-term") || q.classList.contains("highlight-position")) && (w.preventDefault(), T(w));
}
- function x() {
+ function R() {
t(5, h = null);
}
- function A() {
- t(6, v = !0), t(7, w = i), p = i, d("edit", { markdown_content: i, highlights: a });
+ function B() {
+ t(6, v = !0), t(7, F = i), g = i, d("edit", { markdown_content: i, highlights: a });
}
- function O() {
- t(20, i = w), t(6, v = !1), d("save", { markdown_content: i, highlights: a }), d("change", { markdown_content: i, highlights: a });
+ function P() {
+ t(20, i = F), t(6, v = !1), d("save", { markdown_content: i, highlights: a }), d("change", { markdown_content: i, highlights: a });
}
- function R() {
- t(7, w = p), t(6, v = !1), d("cancel", {
- markdown_content: p,
+ function S() {
+ t(7, F = g), t(6, v = !1), d("cancel", {
+ markdown_content: g,
highlights: a
});
}
- function P(B) {
- const z = B.target;
- t(7, w = z.value);
+ function te(w) {
+ const q = w.target;
+ t(7, F = q.value);
}
- function S(B) {
- t(10, _ = B);
+ function fe(w) {
+ t(10, _ = w);
}
- function oe() {
+ function ce() {
return n(this, void 0, void 0, function* () {
try {
- const B = v ? w : i;
+ const w = v ? F : i;
if (navigator.clipboard && window.isSecureContext)
- yield navigator.clipboard.writeText(B);
+ yield navigator.clipboard.writeText(w);
else {
- const z = document.createElement("textarea");
- z.value = B, z.style.position = "fixed", z.style.left = "-999999px", z.style.top = "-999999px", document.body.appendChild(z), z.focus(), z.select(), document.execCommand("copy"), z.remove();
+ const q = document.createElement("textarea");
+ q.value = w, q.style.position = "fixed", q.style.left = "-999999px", q.style.top = "-999999px", document.body.appendChild(q), q.focus(), q.select(), document.execCommand("copy"), q.remove();
}
- } catch (B) {
- console.error("Failed to copy text: ", B);
+ } catch (w) {
+ console.error("Failed to copy text: ", w);
}
});
}
- const Fe = () => S("edit"), ue = () => S("preview");
- function Re() {
- w = this.value, t(7, w);
+ const Oe = () => fe("edit"), Q = () => fe("preview");
+ function oe() {
+ F = this.value, t(7, F);
}
- function J() {
- w = this.value, t(7, w);
+ function he() {
+ F = this.value, t(7, F);
}
- return l.$$set = (B) => {
- "markdown_content" in B && t(20, i = B.markdown_content), "highlights" in B && t(21, a = B.highlights), "show_side_panel" in B && t(0, o = B.show_side_panel), "panel_width" in B && t(1, r = B.panel_width), "interactive" in B && t(2, s = B.interactive), "edit_mode" in B && t(3, u = B.edit_mode), "show_preview" in B && t(4, c = B.show_preview);
+ return l.$$set = (w) => {
+ "markdown_content" in w && t(20, i = w.markdown_content), "highlights" in w && t(21, a = w.highlights), "show_side_panel" in w && t(0, o = w.show_side_panel), "panel_width" in w && t(1, r = w.panel_width), "interactive" in w && t(2, s = w.interactive), "edit_mode" in w && t(3, u = w.edit_mode), "show_preview" in w && t(4, c = w.show_preview);
}, l.$$.update = () => {
if (l.$$.dirty[0] & /*isEditing, markdown_content*/
- 1048640 && (v || (p = i)), l.$$.dirty[0] & /*isEditing, edit_mode, show_preview, editingContent, markdown_content*/
+ 1048640 && (v || (g = i)), l.$$.dirty[0] & /*isEditing, edit_mode, show_preview, editingContent, markdown_content*/
1048792) {
- const B = v && u === "split" && c ? w : i;
- B && b(B);
+ const w = v && u === "split" && c ? F : i;
+ w && D(w);
}
l.$$.dirty[0] & /*selectedHighlight*/
- 32 && h && y();
+ 32 && h && $();
}, [
o,
r,
@@ -3745,36 +3775,36 @@ function us(l, e, t) {
c,
h,
v,
- w,
- m,
- D,
+ F,
+ p,
+ b,
_,
- k,
- C,
- x,
+ T,
A,
- O,
R,
+ B,
P,
S,
- oe,
+ te,
+ fe,
+ ce,
i,
a,
f,
- Fe,
- ue,
- Re,
- J
+ Oe,
+ Q,
+ oe,
+ he
];
}
-class cs extends Qr {
+class cs extends Kr {
constructor(e) {
- super(), Jr(
+ super(), Qr(
this,
e,
us,
- ss,
- es,
+ rs,
+ Jr,
{
markdown_content: 20,
highlights: 21,
@@ -3797,16 +3827,16 @@ const {
SvelteComponent: _s,
append_hydration: Bi,
assign: ds,
- attr: me,
+ attr: be,
binding_callbacks: fs,
children: on,
- claim_element: so,
- claim_space: uo,
+ claim_element: oo,
+ claim_space: ro,
claim_svg_element: pi,
create_slot: hs,
- detach: lt,
- element: co,
- empty: Ua,
+ detach: rt,
+ element: so,
+ empty: za,
get_all_dirty_from_scope: ps,
get_slot_changes: ms,
get_spread_update: gs,
@@ -3815,16 +3845,16 @@ const {
listen: bs,
noop: Ds,
safe_not_equal: ws,
- set_dynamic_element_data: Ga,
+ set_dynamic_element_data: Ha,
set_style: X,
- space: _o,
+ space: uo,
svg_element: mi,
- toggle_class: _e,
- transition_in: fo,
- transition_out: ho,
+ toggle_class: de,
+ transition_in: co,
+ transition_out: _o,
update_slot_base: ys
} = window.__gradio__svelte__internal;
-function Va(l) {
+function Ua(l) {
let e, t, n, i, a;
return {
c() {
@@ -3840,17 +3870,17 @@ function Va(l) {
y2: !0,
stroke: !0,
"stroke-width": !0
- }), on(t).forEach(lt), n = pi(r, "line", {
+ }), on(t).forEach(rt), n = pi(r, "line", {
x1: !0,
y1: !0,
x2: !0,
y2: !0,
stroke: !0,
"stroke-width": !0
- }), on(n).forEach(lt), r.forEach(lt), this.h();
+ }), on(n).forEach(rt), r.forEach(rt), this.h();
},
h() {
- me(t, "x1", "1"), me(t, "y1", "9"), me(t, "x2", "9"), me(t, "y2", "1"), me(t, "stroke", "gray"), me(t, "stroke-width", "0.5"), me(n, "x1", "5"), me(n, "y1", "9"), me(n, "x2", "9"), me(n, "y2", "5"), me(n, "stroke", "gray"), me(n, "stroke-width", "0.5"), me(e, "class", "resize-handle svelte-239wnu"), me(e, "xmlns", "http://www.w3.org/2000/svg"), me(e, "viewBox", "0 0 10 10");
+ be(t, "x1", "1"), be(t, "y1", "9"), be(t, "x2", "9"), be(t, "y2", "1"), be(t, "stroke", "gray"), be(t, "stroke-width", "0.5"), be(n, "x1", "5"), be(n, "y1", "9"), be(n, "x2", "9"), be(n, "y2", "5"), be(n, "stroke", "gray"), be(n, "stroke-width", "0.5"), be(e, "class", "resize-handle svelte-239wnu"), be(e, "xmlns", "http://www.w3.org/2000/svg"), be(e, "viewBox", "0 0 10 10");
},
m(o, r) {
un(o, e, r), Bi(e, t), Bi(e, n), i || (a = bs(
@@ -3862,7 +3892,7 @@ function Va(l) {
},
p: Ds,
d(o) {
- o && lt(e), i = !1, a();
+ o && rt(e), i = !1, a();
}
};
}
@@ -3881,7 +3911,7 @@ function ks(l) {
);
let s = (
/*resizable*/
- l[19] && Va(l)
+ l[19] && Ua(l)
), u = [
{ "data-testid": (
/*test_id*/
@@ -3904,13 +3934,13 @@ function ks(l) {
c = ds(c, u[d]);
return {
c() {
- e = co(
+ e = so(
/*tag*/
l[25]
- ), r && r.c(), t = _o(), s && s.c(), this.h();
+ ), r && r.c(), t = uo(), s && s.c(), this.h();
},
l(d) {
- e = so(
+ e = oo(
d,
/*tag*/
(l[25] || "null").toUpperCase(),
@@ -3922,51 +3952,51 @@ function ks(l) {
}
);
var h = on(e);
- r && r.l(h), t = uo(h), s && s.l(h), h.forEach(lt), this.h();
+ r && r.l(h), t = ro(h), s && s.l(h), h.forEach(rt), this.h();
},
h() {
- Ga(
+ Ha(
/*tag*/
l[25]
- )(e, c), _e(
+ )(e, c), de(
e,
"hidden",
/*visible*/
l[14] === !1
- ), _e(
+ ), de(
e,
"padded",
/*padding*/
l[10]
- ), _e(
+ ), de(
e,
"flex",
/*flex*/
l[1]
- ), _e(
+ ), de(
e,
"border_focus",
/*border_mode*/
l[9] === "focus"
- ), _e(
+ ), de(
e,
"border_contrast",
/*border_mode*/
l[9] === "contrast"
- ), _e(e, "hide-container", !/*explicit_call*/
+ ), de(e, "hide-container", !/*explicit_call*/
l[12] && !/*container*/
- l[13]), _e(
+ l[13]), de(
e,
"fullscreen",
/*fullscreen*/
l[0]
- ), _e(
+ ), de(
e,
"animating",
/*fullscreen*/
l[0] && /*preexpansionBoundingRect*/
l[24] !== null
- ), _e(
+ ), de(
e,
"auto-margin",
/*scale*/
@@ -4066,7 +4096,7 @@ function ks(l) {
un(d, e, h), r && r.m(e, null), Bi(e, t), s && s.m(e, null), l[32](e), a = !0;
},
p(d, h) {
- var m;
+ var p;
r && r.p && (!a || h[0] & /*$$scope*/
1073741824) && ys(
r,
@@ -4086,7 +4116,7 @@ function ks(l) {
),
null
), /*resizable*/
- d[19] ? s ? s.p(d, h) : (s = Va(d), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Ga(
+ d[19] ? s ? s.p(d, h) : (s = Ua(d), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Ha(
/*tag*/
d[25]
)(e, c = gs(u, [
@@ -4102,49 +4132,49 @@ function ks(l) {
) },
(!a || h[0] & /*elem_classes*/
128 && n !== (n = "block " + /*elem_classes*/
- (((m = d[7]) == null ? void 0 : m.join(" ")) || "") + " svelte-239wnu")) && { class: n },
+ (((p = d[7]) == null ? void 0 : p.join(" ")) || "") + " svelte-239wnu")) && { class: n },
(!a || h[0] & /*rtl*/
1048576 && i !== (i = /*rtl*/
d[20] ? "rtl" : "ltr")) && { dir: i }
- ])), _e(
+ ])), de(
e,
"hidden",
/*visible*/
d[14] === !1
- ), _e(
+ ), de(
e,
"padded",
/*padding*/
d[10]
- ), _e(
+ ), de(
e,
"flex",
/*flex*/
d[1]
- ), _e(
+ ), de(
e,
"border_focus",
/*border_mode*/
d[9] === "focus"
- ), _e(
+ ), de(
e,
"border_contrast",
/*border_mode*/
d[9] === "contrast"
- ), _e(e, "hide-container", !/*explicit_call*/
+ ), de(e, "hide-container", !/*explicit_call*/
d[12] && !/*container*/
- d[13]), _e(
+ d[13]), de(
e,
"fullscreen",
/*fullscreen*/
d[0]
- ), _e(
+ ), de(
e,
"animating",
/*fullscreen*/
d[0] && /*preexpansionBoundingRect*/
d[24] !== null
- ), _e(
+ ), de(
e,
"auto-margin",
/*scale*/
@@ -4253,27 +4283,27 @@ function ks(l) {
d[18]}px, 100%))`);
},
i(d) {
- a || (fo(r, d), a = !0);
+ a || (co(r, d), a = !0);
},
o(d) {
- ho(r, d), a = !1;
+ _o(r, d), a = !1;
},
d(d) {
- d && lt(e), r && r.d(d), s && s.d(), l[32](null);
+ d && rt(e), r && r.d(d), s && s.d(), l[32](null);
}
};
}
-function ja(l) {
+function Ga(l) {
let e;
return {
c() {
- e = co("div"), this.h();
+ e = so("div"), this.h();
},
l(t) {
- e = so(t, "DIV", { class: !0 }), on(e).forEach(lt), this.h();
+ e = oo(t, "DIV", { class: !0 }), on(e).forEach(rt), this.h();
},
h() {
- me(e, "class", "placeholder svelte-239wnu"), X(
+ be(e, "class", "placeholder svelte-239wnu"), X(
e,
"height",
/*placeholder_height*/
@@ -4304,7 +4334,7 @@ function ja(l) {
);
},
d(t) {
- t && lt(e);
+ t && rt(e);
}
};
}
@@ -4314,14 +4344,14 @@ function Fs(l) {
l[25] && ks(l)
), a = (
/*fullscreen*/
- l[0] && ja(l)
+ l[0] && Ga(l)
);
return {
c() {
- i && i.c(), e = _o(), a && a.c(), t = Ua();
+ i && i.c(), e = uo(), a && a.c(), t = za();
},
l(o) {
- i && i.l(o), e = uo(o), a && a.l(o), t = Ua();
+ i && i.l(o), e = ro(o), a && a.l(o), t = za();
},
m(o, r) {
i && i.m(o, r), un(o, e, r), a && a.m(o, r), un(o, t, r), n = !0;
@@ -4329,55 +4359,55 @@ function Fs(l) {
p(o, r) {
/*tag*/
o[25] && i.p(o, r), /*fullscreen*/
- o[0] ? a ? a.p(o, r) : (a = ja(o), a.c(), a.m(t.parentNode, t)) : a && (a.d(1), a = null);
+ o[0] ? a ? a.p(o, r) : (a = Ga(o), a.c(), a.m(t.parentNode, t)) : a && (a.d(1), a = null);
},
i(o) {
- n || (fo(i, o), n = !0);
+ n || (co(i, o), n = !0);
},
o(o) {
- ho(i, o), n = !1;
+ _o(i, o), n = !1;
},
d(o) {
- o && (lt(e), lt(t)), i && i.d(o), a && a.d(o);
+ o && (rt(e), rt(t)), i && i.d(o), a && a.d(o);
}
};
}
function $s(l, e, t) {
- let { $$slots: n = {}, $$scope: i } = e, { height: a = void 0 } = e, { min_height: o = void 0 } = e, { max_height: r = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: f = "solid" } = e, { border_mode: d = "base" } = e, { padding: h = !0 } = e, { type: m = "normal" } = e, { test_id: D = void 0 } = e, { explicit_call: v = !1 } = e, { container: w = !0 } = e, { visible: p = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: b = "auto" } = e, { scale: y = null } = e, { min_width: k = 0 } = e, { flex: C = !1 } = e, { resizable: x = !1 } = e, { rtl: A = !1 } = e, { fullscreen: O = !1 } = e, R = O, P, S = m === "fieldset" ? "fieldset" : "div", oe = 0, Fe = 0, ue = null;
- function Re(F) {
- O && F.key === "Escape" && t(0, O = !1);
- }
- const J = (F) => {
- if (F !== void 0) {
- if (typeof F == "number")
- return F + "px";
- if (typeof F == "string")
- return F;
- }
- }, B = (F) => {
- let Y = F.clientY;
- const N = ($) => {
- const le = $.clientY - Y;
- Y = $.clientY, t(21, P.style.height = `${P.offsetHeight + le}px`, P);
- }, K = () => {
- window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", K);
+ let { $$slots: n = {}, $$scope: i } = e, { height: a = void 0 } = e, { min_height: o = void 0 } = e, { max_height: r = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: f = "solid" } = e, { border_mode: d = "base" } = e, { padding: h = !0 } = e, { type: p = "normal" } = e, { test_id: b = void 0 } = e, { explicit_call: v = !1 } = e, { container: F = !0 } = e, { visible: g = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: D = "auto" } = e, { scale: y = null } = e, { min_width: k = 0 } = e, { flex: $ = !1 } = e, { resizable: T = !1 } = e, { rtl: A = !1 } = e, { fullscreen: R = !1 } = e, B = R, P, S = p === "fieldset" ? "fieldset" : "div", te = 0, fe = 0, ce = null;
+ function Oe(w) {
+ R && w.key === "Escape" && t(0, R = !1);
+ }
+ const Q = (w) => {
+ if (w !== void 0) {
+ if (typeof w == "number")
+ return w + "px";
+ if (typeof w == "string")
+ return w;
+ }
+ }, oe = (w) => {
+ let q = w.clientY;
+ const z = (E) => {
+ const N = E.clientY - q;
+ q = E.clientY, t(21, P.style.height = `${P.offsetHeight + N}px`, P);
+ }, H = () => {
+ window.removeEventListener("mousemove", z), window.removeEventListener("mouseup", H);
};
- window.addEventListener("mousemove", N), window.addEventListener("mouseup", K);
+ window.addEventListener("mousemove", z), window.addEventListener("mouseup", H);
};
- function z(F) {
- fs[F ? "unshift" : "push"](() => {
- P = F, t(21, P);
+ function he(w) {
+ fs[w ? "unshift" : "push"](() => {
+ P = w, t(21, P);
});
}
- return l.$$set = (F) => {
- "height" in F && t(2, a = F.height), "min_height" in F && t(3, o = F.min_height), "max_height" in F && t(4, r = F.max_height), "width" in F && t(5, s = F.width), "elem_id" in F && t(6, u = F.elem_id), "elem_classes" in F && t(7, c = F.elem_classes), "variant" in F && t(8, f = F.variant), "border_mode" in F && t(9, d = F.border_mode), "padding" in F && t(10, h = F.padding), "type" in F && t(28, m = F.type), "test_id" in F && t(11, D = F.test_id), "explicit_call" in F && t(12, v = F.explicit_call), "container" in F && t(13, w = F.container), "visible" in F && t(14, p = F.visible), "allow_overflow" in F && t(15, _ = F.allow_overflow), "overflow_behavior" in F && t(16, b = F.overflow_behavior), "scale" in F && t(17, y = F.scale), "min_width" in F && t(18, k = F.min_width), "flex" in F && t(1, C = F.flex), "resizable" in F && t(19, x = F.resizable), "rtl" in F && t(20, A = F.rtl), "fullscreen" in F && t(0, O = F.fullscreen), "$$scope" in F && t(30, i = F.$$scope);
+ return l.$$set = (w) => {
+ "height" in w && t(2, a = w.height), "min_height" in w && t(3, o = w.min_height), "max_height" in w && t(4, r = w.max_height), "width" in w && t(5, s = w.width), "elem_id" in w && t(6, u = w.elem_id), "elem_classes" in w && t(7, c = w.elem_classes), "variant" in w && t(8, f = w.variant), "border_mode" in w && t(9, d = w.border_mode), "padding" in w && t(10, h = w.padding), "type" in w && t(28, p = w.type), "test_id" in w && t(11, b = w.test_id), "explicit_call" in w && t(12, v = w.explicit_call), "container" in w && t(13, F = w.container), "visible" in w && t(14, g = w.visible), "allow_overflow" in w && t(15, _ = w.allow_overflow), "overflow_behavior" in w && t(16, D = w.overflow_behavior), "scale" in w && t(17, y = w.scale), "min_width" in w && t(18, k = w.min_width), "flex" in w && t(1, $ = w.flex), "resizable" in w && t(19, T = w.resizable), "rtl" in w && t(20, A = w.rtl), "fullscreen" in w && t(0, R = w.fullscreen), "$$scope" in w && t(30, i = w.$$scope);
}, l.$$.update = () => {
l.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/
- 538968065 && O !== R && (t(29, R = O), O ? (t(24, ue = P.getBoundingClientRect()), t(22, oe = P.offsetHeight), t(23, Fe = P.offsetWidth), window.addEventListener("keydown", Re)) : (t(24, ue = null), window.removeEventListener("keydown", Re))), l.$$.dirty[0] & /*visible*/
- 16384 && (p || t(1, C = !1));
+ 538968065 && R !== B && (t(29, B = R), R ? (t(24, ce = P.getBoundingClientRect()), t(22, te = P.offsetHeight), t(23, fe = P.offsetWidth), window.addEventListener("keydown", Oe)) : (t(24, ce = null), window.removeEventListener("keydown", Oe))), l.$$.dirty[0] & /*visible*/
+ 16384 && (g || t(1, $ = !1));
}, [
- O,
- C,
+ R,
+ $,
a,
o,
r,
@@ -4387,28 +4417,28 @@ function $s(l, e, t) {
f,
d,
h,
- D,
+ b,
v,
- w,
- p,
+ F,
+ g,
_,
- b,
+ D,
y,
k,
- x,
+ T,
A,
P,
- oe,
- Fe,
- ue,
+ te,
+ fe,
+ ce,
S,
- J,
+ Q,
+ oe,
+ p,
B,
- m,
- R,
i,
n,
- z
+ he
];
}
class Es extends _s {
@@ -4449,7 +4479,7 @@ class Es extends _s {
}
}
const Cs = /[\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\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\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-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\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, As = Object.hasOwnProperty;
-class po {
+class fo {
/**
* Create a new slug class.
*/
@@ -4490,8 +4520,8 @@ class po {
function Ss(l, e) {
return typeof l != "string" ? "" : (e || (l = l.toLowerCase()), l.replace(Cs, "").replace(/ /g, "-"));
}
-new po();
-var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ts = { exports: {} };
+new fo();
+var Va = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ts = { exports: {} };
(function(l) {
var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
/**
@@ -4558,8 +4588,8 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @memberof Prism
*/
util: {
- encode: function p(_) {
- return _ instanceof s ? new s(_.type, p(_.content), _.alias) : Array.isArray(_) ? _.map(p) : _.replace(/&/g, "&").replace(/} */
- {}, b[k] = y;
- for (var C in _)
- _.hasOwnProperty(C) && (y[C] = p(_[C], b));
+ {}, D[k] = y;
+ for (var $ in _)
+ _.hasOwnProperty($) && (y[$] = g(_[$], D));
return (
/** @type {any} */
y
);
case "Array":
- return k = r.util.objId(_), b[k] ? b[k] : (y = [], b[k] = y, /** @type {Array} */
+ return k = r.util.objId(_), D[k] ? D[k] : (y = [], D[k] = y, /** @type {Array} */
/** @type {any} */
- _.forEach(function(x, A) {
- y[A] = p(x, b);
+ _.forEach(function(T, A) {
+ y[A] = g(T, D);
}), /** @type {any} */
y);
default:
@@ -4633,12 +4663,12 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @param {Element} element
* @returns {string}
*/
- getLanguage: function(p) {
- for (; p; ) {
- var _ = i.exec(p.className);
+ getLanguage: function(g) {
+ for (; g; ) {
+ var _ = i.exec(g.className);
if (_)
return _[1].toLowerCase();
- p = p.parentElement;
+ g = g.parentElement;
}
return "none";
},
@@ -4649,8 +4679,8 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @param {string} language
* @returns {void}
*/
- setLanguage: function(p, _) {
- p.className = p.className.replace(RegExp(i, "gi"), ""), p.classList.add("language-" + _);
+ setLanguage: function(g, _) {
+ g.className = g.className.replace(RegExp(i, "gi"), ""), g.classList.add("language-" + _);
},
/**
* Returns the script element that is currently executing.
@@ -4670,12 +4700,12 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
try {
throw new Error();
} catch (y) {
- var p = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack) || [])[1];
- if (p) {
+ var g = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack) || [])[1];
+ if (g) {
var _ = document.getElementsByTagName("script");
- for (var b in _)
- if (_[b].src == p)
- return _[b];
+ for (var D in _)
+ if (_[D].src == g)
+ return _[D];
}
return null;
}
@@ -4699,16 +4729,16 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @param {boolean} [defaultActivation=false]
* @returns {boolean}
*/
- isActive: function(p, _, b) {
- for (var y = "no-" + _; p; ) {
- var k = p.classList;
+ isActive: function(g, _, D) {
+ for (var y = "no-" + _; g; ) {
+ var k = g.classList;
if (k.contains(_))
return !0;
if (k.contains(y))
return !1;
- p = p.parentElement;
+ g = g.parentElement;
}
- return !!b;
+ return !!D;
}
},
/**
@@ -4754,11 +4784,11 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* 'color': /\b(?:red|green|blue)\b/
* });
*/
- extend: function(p, _) {
- var b = r.util.clone(r.languages[p]);
+ extend: function(g, _) {
+ var D = r.util.clone(r.languages[g]);
for (var y in _)
- b[y] = _[y];
- return b;
+ D[y] = _[y];
+ return D;
},
/**
* Inserts tokens _before_ another token in a language definition or any other grammar.
@@ -4835,31 +4865,31 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @returns {Grammar} The new grammar object.
* @public
*/
- insertBefore: function(p, _, b, y) {
+ insertBefore: function(g, _, D, y) {
y = y || /** @type {any} */
r.languages;
- var k = y[p], C = {};
- for (var x in k)
- if (k.hasOwnProperty(x)) {
- if (x == _)
- for (var A in b)
- b.hasOwnProperty(A) && (C[A] = b[A]);
- b.hasOwnProperty(x) || (C[x] = k[x]);
+ var k = y[g], $ = {};
+ for (var T in k)
+ if (k.hasOwnProperty(T)) {
+ if (T == _)
+ for (var A in D)
+ D.hasOwnProperty(A) && ($[A] = D[A]);
+ D.hasOwnProperty(T) || ($[T] = k[T]);
}
- var O = y[p];
- return y[p] = C, r.languages.DFS(r.languages, function(R, P) {
- P === O && R != p && (this[R] = C);
- }), C;
+ var R = y[g];
+ return y[g] = $, r.languages.DFS(r.languages, function(B, P) {
+ P === R && B != g && (this[B] = $);
+ }), $;
},
// Traverse a language definition with Depth First Search
- DFS: function p(_, b, y, k) {
+ DFS: function g(_, D, y, k) {
k = k || {};
- var C = r.util.objId;
- for (var x in _)
- if (_.hasOwnProperty(x)) {
- b.call(_, x, _[x], y || x);
- var A = _[x], O = r.util.type(A);
- O === "Object" && !k[C(A)] ? (k[C(A)] = !0, p(A, b, null, k)) : O === "Array" && !k[C(A)] && (k[C(A)] = !0, p(A, b, x, k));
+ var $ = r.util.objId;
+ for (var T in _)
+ if (_.hasOwnProperty(T)) {
+ D.call(_, T, _[T], y || T);
+ var A = _[T], R = r.util.type(A);
+ R === "Object" && !k[$(A)] ? (k[$(A)] = !0, g(A, D, null, k)) : R === "Array" && !k[$(A)] && (k[$(A)] = !0, g(A, D, T, k));
}
}
},
@@ -4876,8 +4906,8 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @memberof Prism
* @public
*/
- highlightAll: function(p, _) {
- r.highlightAllUnder(document, p, _);
+ highlightAll: function(g, _) {
+ r.highlightAllUnder(document, g, _);
},
/**
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
@@ -4894,15 +4924,15 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @memberof Prism
* @public
*/
- highlightAllUnder: function(p, _, b) {
+ highlightAllUnder: function(g, _, D) {
var y = {
- callback: b,
- container: p,
+ callback: D,
+ container: g,
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
};
r.hooks.run("before-highlightall", y), y.elements = Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)), r.hooks.run("before-all-elements-highlight", y);
- for (var k = 0, C; C = y.elements[k++]; )
- r.highlightElement(C, _ === !0, y.callback);
+ for (var k = 0, $; $ = y.elements[k++]; )
+ r.highlightElement($, _ === !0, y.callback);
},
/**
* Highlights the code inside a single element.
@@ -4932,39 +4962,39 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @memberof Prism
* @public
*/
- highlightElement: function(p, _, b) {
- var y = r.util.getLanguage(p), k = r.languages[y];
- r.util.setLanguage(p, y);
- var C = p.parentElement;
- C && C.nodeName.toLowerCase() === "pre" && r.util.setLanguage(C, y);
- var x = p.textContent, A = {
- element: p,
+ highlightElement: function(g, _, D) {
+ var y = r.util.getLanguage(g), k = r.languages[y];
+ r.util.setLanguage(g, y);
+ var $ = g.parentElement;
+ $ && $.nodeName.toLowerCase() === "pre" && r.util.setLanguage($, y);
+ var T = g.textContent, A = {
+ element: g,
language: y,
grammar: k,
- code: x
+ code: T
};
- function O(P) {
- A.highlightedCode = P, r.hooks.run("before-insert", A), A.element.innerHTML = A.highlightedCode, r.hooks.run("after-highlight", A), r.hooks.run("complete", A), b && b.call(A.element);
+ function R(P) {
+ A.highlightedCode = P, r.hooks.run("before-insert", A), A.element.innerHTML = A.highlightedCode, r.hooks.run("after-highlight", A), r.hooks.run("complete", A), D && D.call(A.element);
}
- if (r.hooks.run("before-sanity-check", A), C = A.element.parentElement, C && C.nodeName.toLowerCase() === "pre" && !C.hasAttribute("tabindex") && C.setAttribute("tabindex", "0"), !A.code) {
- r.hooks.run("complete", A), b && b.call(A.element);
+ if (r.hooks.run("before-sanity-check", A), $ = A.element.parentElement, $ && $.nodeName.toLowerCase() === "pre" && !$.hasAttribute("tabindex") && $.setAttribute("tabindex", "0"), !A.code) {
+ r.hooks.run("complete", A), D && D.call(A.element);
return;
}
if (r.hooks.run("before-highlight", A), !A.grammar) {
- O(r.util.encode(A.code));
+ R(r.util.encode(A.code));
return;
}
if (_ && n.Worker) {
- var R = new Worker(r.filename);
- R.onmessage = function(P) {
- O(P.data);
- }, R.postMessage(JSON.stringify({
+ var B = new Worker(r.filename);
+ B.onmessage = function(P) {
+ R(P.data);
+ }, B.postMessage(JSON.stringify({
language: A.language,
code: A.code,
immediateClose: !0
}));
} else
- O(r.highlight(A.code, A.grammar, A.language));
+ R(r.highlight(A.code, A.grammar, A.language));
},
/**
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
@@ -4986,11 +5016,11 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @example
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
*/
- highlight: function(p, _, b) {
+ highlight: function(g, _, D) {
var y = {
- code: p,
+ code: g,
grammar: _,
- language: b
+ language: D
};
if (r.hooks.run("before-tokenize", y), !y.grammar)
throw new Error('The language "' + y.language + '" has no grammar.');
@@ -5020,15 +5050,15 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* }
* });
*/
- tokenize: function(p, _) {
- var b = _.rest;
- if (b) {
- for (var y in b)
- _[y] = b[y];
+ tokenize: function(g, _) {
+ var D = _.rest;
+ if (D) {
+ for (var y in D)
+ _[y] = D[y];
delete _.rest;
}
var k = new f();
- return d(k, k.head, p), c(p, k, _, k.head, 0), m(k);
+ return d(k, k.head, g), c(g, k, _, k.head, 0), p(k);
},
/**
* @namespace
@@ -5049,9 +5079,9 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @param {HookCallback} callback The callback function which is given environment variables.
* @public
*/
- add: function(p, _) {
- var b = r.hooks.all;
- b[p] = b[p] || [], b[p].push(_);
+ add: function(g, _) {
+ var D = r.hooks.all;
+ D[g] = D[g] || [], D[g].push(_);
},
/**
* Runs a hook invoking all registered callbacks with the given environment variables.
@@ -5062,94 +5092,94 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @param {Object} env The environment variables of the hook passed to all callbacks registered.
* @public
*/
- run: function(p, _) {
- var b = r.hooks.all[p];
- if (!(!b || !b.length))
- for (var y = 0, k; k = b[y++]; )
+ run: function(g, _) {
+ var D = r.hooks.all[g];
+ if (!(!D || !D.length))
+ for (var y = 0, k; k = D[y++]; )
k(_);
}
},
Token: s
};
n.Prism = r;
- function s(p, _, b, y) {
- this.type = p, this.content = _, this.alias = b, this.length = (y || "").length | 0;
+ function s(g, _, D, y) {
+ this.type = g, this.content = _, this.alias = D, this.length = (y || "").length | 0;
}
- s.stringify = function p(_, b) {
+ s.stringify = function g(_, D) {
if (typeof _ == "string")
return _;
if (Array.isArray(_)) {
var y = "";
- return _.forEach(function(O) {
- y += p(O, b);
+ return _.forEach(function(R) {
+ y += g(R, D);
}), y;
}
var k = {
type: _.type,
- content: p(_.content, b),
+ content: g(_.content, D),
tag: "span",
classes: ["token", _.type],
attributes: {},
- language: b
- }, C = _.alias;
- C && (Array.isArray(C) ? Array.prototype.push.apply(k.classes, C) : k.classes.push(C)), r.hooks.run("wrap", k);
- var x = "";
+ language: D
+ }, $ = _.alias;
+ $ && (Array.isArray($) ? Array.prototype.push.apply(k.classes, $) : k.classes.push($)), r.hooks.run("wrap", k);
+ var T = "";
for (var A in k.attributes)
- x += " " + A + '="' + (k.attributes[A] || "").replace(/"/g, """) + '"';
- return "<" + k.tag + ' class="' + k.classes.join(" ") + '"' + x + ">" + k.content + "" + k.tag + ">";
+ T += " " + A + '="' + (k.attributes[A] || "").replace(/"/g, """) + '"';
+ return "<" + k.tag + ' class="' + k.classes.join(" ") + '"' + T + ">" + k.content + "" + k.tag + ">";
};
- function u(p, _, b, y) {
- p.lastIndex = _;
- var k = p.exec(b);
+ function u(g, _, D, y) {
+ g.lastIndex = _;
+ var k = g.exec(D);
if (k && y && k[1]) {
- var C = k[1].length;
- k.index += C, k[0] = k[0].slice(C);
+ var $ = k[1].length;
+ k.index += $, k[0] = k[0].slice($);
}
return k;
}
- function c(p, _, b, y, k, C) {
- for (var x in b)
- if (!(!b.hasOwnProperty(x) || !b[x])) {
- var A = b[x];
+ function c(g, _, D, y, k, $) {
+ for (var T in D)
+ if (!(!D.hasOwnProperty(T) || !D[T])) {
+ var A = D[T];
A = Array.isArray(A) ? A : [A];
- for (var O = 0; O < A.length; ++O) {
- if (C && C.cause == x + "," + O)
+ for (var R = 0; R < A.length; ++R) {
+ if ($ && $.cause == T + "," + R)
return;
- var R = A[O], P = R.inside, S = !!R.lookbehind, oe = !!R.greedy, Fe = R.alias;
- if (oe && !R.pattern.global) {
- var ue = R.pattern.toString().match(/[imsuy]*$/)[0];
- R.pattern = RegExp(R.pattern.source, ue + "g");
+ var B = A[R], P = B.inside, S = !!B.lookbehind, te = !!B.greedy, fe = B.alias;
+ if (te && !B.pattern.global) {
+ var ce = B.pattern.toString().match(/[imsuy]*$/)[0];
+ B.pattern = RegExp(B.pattern.source, ce + "g");
}
- for (var Re = R.pattern || R, J = y.next, B = k; J !== _.tail && !(C && B >= C.reach); B += J.value.length, J = J.next) {
- var z = J.value;
- if (_.length > p.length)
+ for (var Oe = B.pattern || B, Q = y.next, oe = k; Q !== _.tail && !($ && oe >= $.reach); oe += Q.value.length, Q = Q.next) {
+ var he = Q.value;
+ if (_.length > g.length)
return;
- if (!(z instanceof s)) {
- var F = 1, Y;
- if (oe) {
- if (Y = u(Re, B, p, S), !Y || Y.index >= p.length)
+ if (!(he instanceof s)) {
+ var w = 1, q;
+ if (te) {
+ if (q = u(Oe, oe, g, S), !q || q.index >= g.length)
break;
- var le = Y.index, N = Y.index + Y[0].length, K = B;
- for (K += J.value.length; le >= K; )
- J = J.next, K += J.value.length;
- if (K -= J.value.length, B = K, J.value instanceof s)
+ var N = q.index, z = q.index + q[0].length, H = oe;
+ for (H += Q.value.length; N >= H; )
+ Q = Q.next, H += Q.value.length;
+ if (H -= Q.value.length, oe = H, Q.value instanceof s)
continue;
- for (var $ = J; $ !== _.tail && (K < N || typeof $.value == "string"); $ = $.next)
- F++, K += $.value.length;
- F--, z = p.slice(B, K), Y.index -= B;
- } else if (Y = u(Re, 0, z, S), !Y)
+ for (var E = Q; E !== _.tail && (H < z || typeof E.value == "string"); E = E.next)
+ w++, H += E.value.length;
+ w--, he = g.slice(oe, H), q.index -= oe;
+ } else if (q = u(Oe, 0, he, S), !q)
continue;
- var le = Y.index, $e = Y[0], Ie = z.slice(0, le), de = z.slice(le + $e.length), Le = B + z.length;
- C && Le > C.reach && (C.reach = Le);
- var ct = J.prev;
- Ie && (ct = d(_, ct, Ie), B += Ie.length), h(_, ct, F);
- var vt = new s(x, P ? r.tokenize($e, P) : $e, Fe, $e);
- if (J = d(_, ct, vt), de && d(_, J, de), F > 1) {
+ var N = q.index, le = q[0], pe = he.slice(0, N), ye = he.slice(N + le.length), ke = oe + he.length;
+ $ && ke > $.reach && ($.reach = ke);
+ var re = Q.prev;
+ pe && (re = d(_, re, pe), oe += pe.length), h(_, re, w);
+ var qe = new s(T, P ? r.tokenize(le, P) : le, fe, le);
+ if (Q = d(_, re, qe), ye && d(_, Q, ye), w > 1) {
var bt = {
- cause: x + "," + O,
- reach: Le
+ cause: T + "," + R,
+ reach: ke
};
- c(p, _, b, J.prev, B, bt), C && bt.reach > C.reach && (C.reach = bt.reach);
+ c(g, _, D, Q.prev, oe, bt), $ && bt.reach > $.reach && ($.reach = bt.reach);
}
}
}
@@ -5157,40 +5187,40 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
}
}
function f() {
- var p = { value: null, prev: null, next: null }, _ = { value: null, prev: p, next: null };
- p.next = _, this.head = p, this.tail = _, this.length = 0;
+ var g = { value: null, prev: null, next: null }, _ = { value: null, prev: g, next: null };
+ g.next = _, this.head = g, this.tail = _, this.length = 0;
}
- function d(p, _, b) {
- var y = _.next, k = { value: b, prev: _, next: y };
- return _.next = k, y.prev = k, p.length++, k;
+ function d(g, _, D) {
+ var y = _.next, k = { value: D, prev: _, next: y };
+ return _.next = k, y.prev = k, g.length++, k;
}
- function h(p, _, b) {
- for (var y = _.next, k = 0; k < b && y !== p.tail; k++)
+ function h(g, _, D) {
+ for (var y = _.next, k = 0; k < D && y !== g.tail; k++)
y = y.next;
- _.next = y, y.prev = _, p.length -= k;
+ _.next = y, y.prev = _, g.length -= k;
}
- function m(p) {
- for (var _ = [], b = p.head.next; b !== p.tail; )
- _.push(b.value), b = b.next;
+ function p(g) {
+ for (var _ = [], D = g.head.next; D !== g.tail; )
+ _.push(D.value), D = D.next;
return _;
}
if (!n.document)
- return n.addEventListener && (r.disableWorkerMessageHandler || n.addEventListener("message", function(p) {
- var _ = JSON.parse(p.data), b = _.language, y = _.code, k = _.immediateClose;
- n.postMessage(r.highlight(y, r.languages[b], b)), k && n.close();
+ return n.addEventListener && (r.disableWorkerMessageHandler || n.addEventListener("message", function(g) {
+ var _ = JSON.parse(g.data), D = _.language, y = _.code, k = _.immediateClose;
+ n.postMessage(r.highlight(y, r.languages[D], D)), k && n.close();
}, !1)), r;
- var D = r.util.currentScript();
- D && (r.filename = D.src, D.hasAttribute("data-manual") && (r.manual = !0));
+ var b = r.util.currentScript();
+ b && (r.filename = b.src, b.hasAttribute("data-manual") && (r.manual = !0));
function v() {
r.manual || r.highlightAll();
}
if (!r.manual) {
- var w = document.readyState;
- w === "loading" || w === "interactive" && D && D.defer ? document.addEventListener("DOMContentLoaded", v) : window.requestAnimationFrame ? window.requestAnimationFrame(v) : window.setTimeout(v, 16);
+ var F = document.readyState;
+ F === "loading" || F === "interactive" && b && b.defer ? document.addEventListener("DOMContentLoaded", v) : window.requestAnimationFrame ? window.requestAnimationFrame(v) : window.setTimeout(v, 16);
}
return r;
}(e);
- l.exports && (l.exports = t), typeof Wa < "u" && (Wa.Prism = t), t.languages.markup = {
+ l.exports && (l.exports = t), typeof Va < "u" && (Va.Prism = t), t.languages.markup = {
comment: {
pattern: //,
greedy: !0
@@ -5568,8 +5598,8 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
if (typeof t > "u" || typeof document > "u")
return;
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
- var n = "Loading…", i = function(D, v) {
- return "✖ Error " + D + " while fetching file: " + v;
+ var n = "Loading…", i = function(b, v) {
+ return "✖ Error " + b + " while fetching file: " + v;
}, a = "✖ Error: File does not exist or is empty", o = {
js: "javascript",
py: "python",
@@ -5581,51 +5611,51 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
h: "c",
tex: "latex"
}, r = "data-src-status", s = "loading", u = "loaded", c = "failed", f = "pre[data-src]:not([" + r + '="' + u + '"]):not([' + r + '="' + s + '"])';
- function d(D, v, w) {
- var p = new XMLHttpRequest();
- p.open("GET", D, !0), p.onreadystatechange = function() {
- p.readyState == 4 && (p.status < 400 && p.responseText ? v(p.responseText) : p.status >= 400 ? w(i(p.status, p.statusText)) : w(a));
- }, p.send(null);
- }
- function h(D) {
- var v = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(D || "");
+ function d(b, v, F) {
+ var g = new XMLHttpRequest();
+ g.open("GET", b, !0), g.onreadystatechange = function() {
+ g.readyState == 4 && (g.status < 400 && g.responseText ? v(g.responseText) : g.status >= 400 ? F(i(g.status, g.statusText)) : F(a));
+ }, g.send(null);
+ }
+ function h(b) {
+ var v = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b || "");
if (v) {
- var w = Number(v[1]), p = v[2], _ = v[3];
- return p ? _ ? [w, Number(_)] : [w, void 0] : [w, w];
+ var F = Number(v[1]), g = v[2], _ = v[3];
+ return g ? _ ? [F, Number(_)] : [F, void 0] : [F, F];
}
}
- t.hooks.add("before-highlightall", function(D) {
- D.selector += ", " + f;
- }), t.hooks.add("before-sanity-check", function(D) {
+ t.hooks.add("before-highlightall", function(b) {
+ b.selector += ", " + f;
+ }), t.hooks.add("before-sanity-check", function(b) {
var v = (
/** @type {HTMLPreElement} */
- D.element
+ b.element
);
if (v.matches(f)) {
- D.code = "", v.setAttribute(r, s);
- var w = v.appendChild(document.createElement("CODE"));
- w.textContent = n;
- var p = v.getAttribute("data-src"), _ = D.language;
+ b.code = "", v.setAttribute(r, s);
+ var F = v.appendChild(document.createElement("CODE"));
+ F.textContent = n;
+ var g = v.getAttribute("data-src"), _ = b.language;
if (_ === "none") {
- var b = (/\.(\w+)$/.exec(p) || [, "none"])[1];
- _ = o[b] || b;
+ var D = (/\.(\w+)$/.exec(g) || [, "none"])[1];
+ _ = o[D] || D;
}
- t.util.setLanguage(w, _), t.util.setLanguage(v, _);
+ t.util.setLanguage(F, _), t.util.setLanguage(v, _);
var y = t.plugins.autoloader;
y && y.loadLanguages(_), d(
- p,
+ g,
function(k) {
v.setAttribute(r, u);
- var C = h(v.getAttribute("data-range"));
- if (C) {
- var x = k.split(/\r\n?|\n/g), A = C[0], O = C[1] == null ? x.length : C[1];
- A < 0 && (A += x.length), A = Math.max(0, Math.min(A - 1, x.length)), O < 0 && (O += x.length), O = Math.max(0, Math.min(O, x.length)), k = x.slice(A, O).join(`
+ var $ = h(v.getAttribute("data-range"));
+ if ($) {
+ var T = k.split(/\r\n?|\n/g), A = $[0], R = $[1] == null ? T.length : $[1];
+ A < 0 && (A += T.length), A = Math.max(0, Math.min(A - 1, T.length)), R < 0 && (R += T.length), R = Math.max(0, Math.min(R, T.length)), k = T.slice(A, R).join(`
`), v.hasAttribute("data-start") || v.setAttribute("data-start", String(A + 1));
}
- w.textContent = k, t.highlightElement(w);
+ F.textContent = k, t.highlightElement(F);
},
function(k) {
- v.setAttribute(r, c), w.textContent = k;
+ v.setAttribute(r, c), F.textContent = k;
}
);
}
@@ -5638,13 +5668,13 @@ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
* @param {ParentNode} [container=document]
*/
highlight: function(v) {
- for (var w = (v || document).querySelectorAll(f), p = 0, _; _ = w[p++]; )
+ for (var F = (v || document).querySelectorAll(f), g = 0, _; _ = F[g++]; )
t.highlightElement(_);
}
};
- var m = !1;
+ var p = !1;
t.fileHighlight = function() {
- m || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), m = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
+ p || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), p = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
};
}();
})(Ts);
@@ -5989,7 +6019,7 @@ Prism.languages.py = Prism.languages.python;
a[i[o]] = l.languages.bash[i[o]];
l.languages.sh = l.languages.bash, l.languages.shell = l.languages.bash;
})(Prism);
-new po();
+new fo();
const xs = (l) => {
const e = {};
for (let t = 0, n = l.length; t < n; t++) {
@@ -6500,10 +6530,10 @@ const {
get_slot_changes: L2,
group_outros: O2,
init: q2,
- insert_hydration: N2,
- mount_component: M2,
- safe_not_equal: z2,
- space: P2,
+ insert_hydration: M2,
+ mount_component: N2,
+ safe_not_equal: P2,
+ space: z2,
toggle_class: H2,
transition_in: U2,
transition_out: G2,
@@ -6511,17 +6541,17 @@ const {
} = window.__gradio__svelte__internal, {
SvelteComponent: Ls,
append_hydration: gi,
- attr: Pt,
- children: Za,
+ attr: zt,
+ children: ja,
claim_component: Os,
- claim_element: Ya,
+ claim_element: Wa,
claim_space: qs,
- claim_text: Ns,
- create_component: Ms,
- destroy_component: zs,
+ claim_text: Ms,
+ create_component: Ns,
+ destroy_component: Ps,
detach: vi,
- element: Xa,
- init: Ps,
+ element: Za,
+ init: zs,
insert_hydration: Hs,
mount_component: Us,
safe_not_equal: Gs,
@@ -6537,30 +6567,30 @@ function Xs(l) {
return n = new /*Icon*/
l[1]({}), {
c() {
- e = Xa("label"), t = Xa("span"), Ms(n.$$.fragment), i = js(), a = Ws(
+ e = Za("label"), t = Za("span"), Ns(n.$$.fragment), i = js(), a = Ws(
/*label*/
l[0]
), this.h();
},
l(s) {
- e = Ya(s, "LABEL", {
+ e = Wa(s, "LABEL", {
for: !0,
"data-testid": !0,
dir: !0,
class: !0
});
- var u = Za(e);
- t = Ya(u, "SPAN", { class: !0 });
- var c = Za(t);
- Os(n.$$.fragment, c), c.forEach(vi), i = qs(u), a = Ns(
+ var u = ja(e);
+ t = Wa(u, "SPAN", { class: !0 });
+ var c = ja(t);
+ Os(n.$$.fragment, c), c.forEach(vi), i = qs(u), a = Ms(
u,
/*label*/
l[0]
), u.forEach(vi), this.h();
},
h() {
- Pt(t, "class", "svelte-13ao5pu"), Pt(e, "for", ""), Pt(e, "data-testid", "block-label"), Pt(e, "dir", o = /*rtl*/
- l[5] ? "rtl" : "ltr"), Pt(e, "class", "svelte-13ao5pu"), Dt(e, "hide", !/*show_label*/
+ zt(t, "class", "svelte-13ao5pu"), zt(e, "for", ""), zt(e, "data-testid", "block-label"), zt(e, "dir", o = /*rtl*/
+ l[5] ? "rtl" : "ltr"), zt(e, "class", "svelte-13ao5pu"), Dt(e, "hide", !/*show_label*/
l[2]), Dt(e, "sr-only", !/*show_label*/
l[2]), Dt(
e,
@@ -6585,7 +6615,7 @@ function Xs(l) {
s[0]
), (!r || u & /*rtl*/
32 && o !== (o = /*rtl*/
- s[5] ? "rtl" : "ltr")) && Pt(e, "dir", o), (!r || u & /*show_label*/
+ s[5] ? "rtl" : "ltr")) && zt(e, "dir", o), (!r || u & /*show_label*/
4) && Dt(e, "hide", !/*show_label*/
s[2]), (!r || u & /*show_label*/
4) && Dt(e, "sr-only", !/*show_label*/
@@ -6610,7 +6640,7 @@ function Xs(l) {
Ys(n.$$.fragment, s), r = !1;
},
d(s) {
- s && vi(e), zs(n);
+ s && vi(e), Ps(n);
}
};
}
@@ -6622,7 +6652,7 @@ function Ks(l, e, t) {
}
class Qs extends Ls {
constructor(e) {
- super(), Ps(this, e, Ks, Xs, Gs, {
+ super(), zs(this, e, Ks, Xs, Gs, {
label: 0,
Icon: 1,
show_label: 2,
@@ -6635,38 +6665,38 @@ class Qs extends Ls {
const {
SvelteComponent: Js,
append_hydration: Rn,
- attr: ht,
+ attr: pt,
bubble: eu,
check_outros: tu,
children: Ri,
claim_component: nu,
claim_element: Ii,
- claim_space: Ka,
+ claim_space: Ya,
claim_text: iu,
- construct_svelte_component: Qa,
- create_component: Ja,
+ construct_svelte_component: Xa,
+ create_component: Ka,
create_slot: au,
- destroy_component: el,
+ destroy_component: Qa,
detach: rn,
element: Li,
get_all_dirty_from_scope: lu,
get_slot_changes: ou,
group_outros: ru,
init: su,
- insert_hydration: mo,
+ insert_hydration: ho,
listen: uu,
- mount_component: tl,
+ mount_component: Ja,
safe_not_equal: cu,
set_data: _u,
set_style: En,
- space: nl,
+ space: el,
text: du,
- toggle_class: pe,
+ toggle_class: ve,
transition_in: bi,
transition_out: Di,
update_slot_base: fu
} = window.__gradio__svelte__internal;
-function il(l) {
+function tl(l) {
let e, t;
return {
c() {
@@ -6685,10 +6715,10 @@ function il(l) {
), i.forEach(rn), this.h();
},
h() {
- ht(e, "class", "svelte-qgco6m");
+ pt(e, "class", "svelte-qgco6m");
},
m(n, i) {
- mo(n, e, i), Rn(e, t);
+ ho(n, e, i), Rn(e, t);
},
p(n, i) {
i & /*label*/
@@ -6706,16 +6736,16 @@ function il(l) {
function hu(l) {
let e, t, n, i, a, o, r, s, u = (
/*show_label*/
- l[2] && il(l)
+ l[2] && tl(l)
);
var c = (
/*Icon*/
l[0]
);
- function f(m, D) {
+ function f(p, b) {
return {};
}
- c && (i = Qa(c, f()));
+ c && (i = Xa(c, f()));
const d = (
/*#slots*/
l[14].default
@@ -6728,73 +6758,73 @@ function hu(l) {
);
return {
c() {
- e = Li("button"), u && u.c(), t = nl(), n = Li("div"), i && Ja(i.$$.fragment), a = nl(), h && h.c(), this.h();
+ e = Li("button"), u && u.c(), t = el(), n = Li("div"), i && Ka(i.$$.fragment), a = el(), h && h.c(), this.h();
},
- l(m) {
- e = Ii(m, "BUTTON", {
+ l(p) {
+ e = Ii(p, "BUTTON", {
"aria-label": !0,
"aria-haspopup": !0,
title: !0,
class: !0
});
- var D = Ri(e);
- u && u.l(D), t = Ka(D), n = Ii(D, "DIV", { class: !0 });
+ var b = Ri(e);
+ u && u.l(b), t = Ya(b), n = Ii(b, "DIV", { class: !0 });
var v = Ri(n);
- i && nu(i.$$.fragment, v), a = Ka(v), h && h.l(v), v.forEach(rn), D.forEach(rn), this.h();
+ i && nu(i.$$.fragment, v), a = Ya(v), h && h.l(v), v.forEach(rn), b.forEach(rn), this.h();
},
h() {
- ht(n, "class", "svelte-qgco6m"), pe(
+ pt(n, "class", "svelte-qgco6m"), ve(
n,
"x-small",
/*size*/
l[4] === "x-small"
- ), pe(
+ ), ve(
n,
"small",
/*size*/
l[4] === "small"
- ), pe(
+ ), ve(
n,
"large",
/*size*/
l[4] === "large"
- ), pe(
+ ), ve(
n,
"medium",
/*size*/
l[4] === "medium"
), e.disabled = /*disabled*/
- l[7], ht(
+ l[7], pt(
e,
"aria-label",
/*label*/
l[1]
- ), ht(
+ ), pt(
e,
"aria-haspopup",
/*hasPopup*/
l[8]
- ), ht(
+ ), pt(
e,
"title",
/*label*/
l[1]
- ), ht(e, "class", "svelte-qgco6m"), pe(
+ ), pt(e, "class", "svelte-qgco6m"), ve(
e,
"pending",
/*pending*/
l[3]
- ), pe(
+ ), ve(
e,
"padded",
/*padded*/
l[5]
- ), pe(
+ ), ve(
e,
"highlight",
/*highlight*/
l[6]
- ), pe(
+ ), ve(
e,
"transparent",
/*transparent*/
@@ -6810,148 +6840,148 @@ function hu(l) {
l[10]
));
},
- m(m, D) {
- mo(m, e, D), u && u.m(e, null), Rn(e, t), Rn(e, n), i && tl(i, n, null), Rn(n, a), h && h.m(n, null), o = !0, r || (s = uu(
+ m(p, b) {
+ ho(p, e, b), u && u.m(e, null), Rn(e, t), Rn(e, n), i && Ja(i, n, null), Rn(n, a), h && h.m(n, null), o = !0, r || (s = uu(
e,
"click",
/*click_handler*/
l[15]
), r = !0);
},
- p(m, [D]) {
+ p(p, [b]) {
if (/*show_label*/
- m[2] ? u ? u.p(m, D) : (u = il(m), u.c(), u.m(e, t)) : u && (u.d(1), u = null), D & /*Icon*/
+ p[2] ? u ? u.p(p, b) : (u = tl(p), u.c(), u.m(e, t)) : u && (u.d(1), u = null), b & /*Icon*/
1 && c !== (c = /*Icon*/
- m[0])) {
+ p[0])) {
if (i) {
ru();
const v = i;
Di(v.$$.fragment, 1, 0, () => {
- el(v, 1);
+ Qa(v, 1);
}), tu();
}
- c ? (i = Qa(c, f()), Ja(i.$$.fragment), bi(i.$$.fragment, 1), tl(i, n, a)) : i = null;
+ c ? (i = Xa(c, f()), Ka(i.$$.fragment), bi(i.$$.fragment, 1), Ja(i, n, a)) : i = null;
}
- h && h.p && (!o || D & /*$$scope*/
+ h && h.p && (!o || b & /*$$scope*/
8192) && fu(
h,
d,
- m,
+ p,
/*$$scope*/
- m[13],
+ p[13],
o ? ou(
d,
/*$$scope*/
- m[13],
- D,
+ p[13],
+ b,
null
) : lu(
/*$$scope*/
- m[13]
+ p[13]
),
null
- ), (!o || D & /*size*/
- 16) && pe(
+ ), (!o || b & /*size*/
+ 16) && ve(
n,
"x-small",
/*size*/
- m[4] === "x-small"
- ), (!o || D & /*size*/
- 16) && pe(
+ p[4] === "x-small"
+ ), (!o || b & /*size*/
+ 16) && ve(
n,
"small",
/*size*/
- m[4] === "small"
- ), (!o || D & /*size*/
- 16) && pe(
+ p[4] === "small"
+ ), (!o || b & /*size*/
+ 16) && ve(
n,
"large",
/*size*/
- m[4] === "large"
- ), (!o || D & /*size*/
- 16) && pe(
+ p[4] === "large"
+ ), (!o || b & /*size*/
+ 16) && ve(
n,
"medium",
/*size*/
- m[4] === "medium"
- ), (!o || D & /*disabled*/
+ p[4] === "medium"
+ ), (!o || b & /*disabled*/
128) && (e.disabled = /*disabled*/
- m[7]), (!o || D & /*label*/
- 2) && ht(
+ p[7]), (!o || b & /*label*/
+ 2) && pt(
e,
"aria-label",
/*label*/
- m[1]
- ), (!o || D & /*hasPopup*/
- 256) && ht(
+ p[1]
+ ), (!o || b & /*hasPopup*/
+ 256) && pt(
e,
"aria-haspopup",
/*hasPopup*/
- m[8]
- ), (!o || D & /*label*/
- 2) && ht(
+ p[8]
+ ), (!o || b & /*label*/
+ 2) && pt(
e,
"title",
/*label*/
- m[1]
- ), (!o || D & /*pending*/
- 8) && pe(
+ p[1]
+ ), (!o || b & /*pending*/
+ 8) && ve(
e,
"pending",
/*pending*/
- m[3]
- ), (!o || D & /*padded*/
- 32) && pe(
+ p[3]
+ ), (!o || b & /*padded*/
+ 32) && ve(
e,
"padded",
/*padded*/
- m[5]
- ), (!o || D & /*highlight*/
- 64) && pe(
+ p[5]
+ ), (!o || b & /*highlight*/
+ 64) && ve(
e,
"highlight",
/*highlight*/
- m[6]
- ), (!o || D & /*transparent*/
- 512) && pe(
+ p[6]
+ ), (!o || b & /*transparent*/
+ 512) && ve(
e,
"transparent",
/*transparent*/
- m[9]
- ), D & /*disabled, _color*/
+ p[9]
+ ), b & /*disabled, _color*/
2176 && En(e, "color", !/*disabled*/
- m[7] && /*_color*/
- m[11] ? (
+ p[7] && /*_color*/
+ p[11] ? (
/*_color*/
- m[11]
- ) : "var(--block-label-text-color)"), D & /*disabled, background*/
+ p[11]
+ ) : "var(--block-label-text-color)"), b & /*disabled, background*/
1152 && En(e, "--bg-color", /*disabled*/
- m[7] ? "auto" : (
+ p[7] ? "auto" : (
/*background*/
- m[10]
+ p[10]
));
},
- i(m) {
- o || (i && bi(i.$$.fragment, m), bi(h, m), o = !0);
+ i(p) {
+ o || (i && bi(i.$$.fragment, p), bi(h, p), o = !0);
},
- o(m) {
- i && Di(i.$$.fragment, m), Di(h, m), o = !1;
+ o(p) {
+ i && Di(i.$$.fragment, p), Di(h, p), o = !1;
},
- d(m) {
- m && rn(e), u && u.d(), i && el(i), h && h.d(m), r = !1, s();
+ d(p) {
+ p && rn(e), u && u.d(), i && Qa(i), h && h.d(p), r = !1, s();
}
};
}
function pu(l, e, t) {
- let n, { $$slots: i = {}, $$scope: a } = e, { Icon: o } = e, { label: r = "" } = e, { show_label: s = !1 } = e, { pending: u = !1 } = e, { size: c = "small" } = e, { padded: f = !0 } = e, { highlight: d = !1 } = e, { disabled: h = !1 } = e, { hasPopup: m = !1 } = e, { color: D = "var(--block-label-text-color)" } = e, { transparent: v = !1 } = e, { background: w = "var(--block-background-fill)" } = e;
- function p(_) {
+ let n, { $$slots: i = {}, $$scope: a } = e, { Icon: o } = e, { label: r = "" } = e, { show_label: s = !1 } = e, { pending: u = !1 } = e, { size: c = "small" } = e, { padded: f = !0 } = e, { highlight: d = !1 } = e, { disabled: h = !1 } = e, { hasPopup: p = !1 } = e, { color: b = "var(--block-label-text-color)" } = e, { transparent: v = !1 } = e, { background: F = "var(--block-background-fill)" } = e;
+ function g(_) {
eu.call(this, l, _);
}
return l.$$set = (_) => {
- "Icon" in _ && t(0, o = _.Icon), "label" in _ && t(1, r = _.label), "show_label" in _ && t(2, s = _.show_label), "pending" in _ && t(3, u = _.pending), "size" in _ && t(4, c = _.size), "padded" in _ && t(5, f = _.padded), "highlight" in _ && t(6, d = _.highlight), "disabled" in _ && t(7, h = _.disabled), "hasPopup" in _ && t(8, m = _.hasPopup), "color" in _ && t(12, D = _.color), "transparent" in _ && t(9, v = _.transparent), "background" in _ && t(10, w = _.background), "$$scope" in _ && t(13, a = _.$$scope);
+ "Icon" in _ && t(0, o = _.Icon), "label" in _ && t(1, r = _.label), "show_label" in _ && t(2, s = _.show_label), "pending" in _ && t(3, u = _.pending), "size" in _ && t(4, c = _.size), "padded" in _ && t(5, f = _.padded), "highlight" in _ && t(6, d = _.highlight), "disabled" in _ && t(7, h = _.disabled), "hasPopup" in _ && t(8, p = _.hasPopup), "color" in _ && t(12, b = _.color), "transparent" in _ && t(9, v = _.transparent), "background" in _ && t(10, F = _.background), "$$scope" in _ && t(13, a = _.$$scope);
}, l.$$.update = () => {
l.$$.dirty & /*highlight, color*/
- 4160 && t(11, n = d ? "var(--color-accent)" : D);
+ 4160 && t(11, n = d ? "var(--color-accent)" : b);
}, [
o,
r,
@@ -6961,14 +6991,14 @@ function pu(l, e, t) {
f,
d,
h,
- m,
+ p,
v,
- w,
+ F,
n,
- D,
+ b,
a,
i,
- p
+ g
];
}
class mu extends Js {
@@ -6994,11 +7024,11 @@ const {
append_hydration: vu,
attr: wi,
binding_callbacks: bu,
- children: al,
- claim_element: ll,
+ children: nl,
+ claim_element: il,
create_slot: Du,
detach: yi,
- element: ol,
+ element: al,
get_all_dirty_from_scope: wu,
get_slot_changes: yu,
init: ku,
@@ -7023,13 +7053,13 @@ function Su(l) {
);
return {
c() {
- e = ol("div"), t = ol("div"), a && a.c(), this.h();
+ e = al("div"), t = al("div"), a && a.c(), this.h();
},
l(o) {
- e = ll(o, "DIV", { class: !0, "aria-label": !0 });
- var r = al(e);
- t = ll(r, "DIV", { class: !0 });
- var s = al(t);
+ e = il(o, "DIV", { class: !0, "aria-label": !0 });
+ var r = nl(e);
+ t = il(r, "DIV", { class: !0 });
+ var s = nl(t);
a && a.l(s), s.forEach(yi), r.forEach(yi), this.h();
},
h() {
@@ -7119,8 +7149,8 @@ function Tu(l, e, t) {
function u(f) {
var d;
if (!f) return !1;
- const { height: h } = f.getBoundingClientRect(), { height: m } = ((d = f.parentElement) === null || d === void 0 ? void 0 : d.getBoundingClientRect()) || { height: h };
- return h > m + 2;
+ const { height: h } = f.getBoundingClientRect(), { height: p } = ((d = f.parentElement) === null || d === void 0 ? void 0 : d.getBoundingClientRect()) || { height: h };
+ return h > p + 2;
}
function c(f) {
bu[f ? "unshift" : "push"](() => {
@@ -7150,7 +7180,7 @@ const Bu = [
{ color: "cyan", primary: 600, secondary: 100 },
{ color: "lime", primary: 500, secondary: 100 },
{ color: "pink", primary: 600, secondary: 100 }
-], rl = {
+], ll = {
inherit: "inherit",
current: "currentColor",
transparent: "transparent",
@@ -7447,8 +7477,8 @@ Bu.reduce(
(l, { color: e, primary: t, secondary: n }) => ({
...l,
[e]: {
- primary: rl[e][t],
- secondary: rl[e][n]
+ primary: ll[e][t],
+ secondary: ll[e][n]
}
}),
{}
@@ -7501,10 +7531,10 @@ const {
get_slot_changes: LF,
init: OF,
insert_hydration: qF,
- safe_not_equal: NF,
- toggle_class: MF,
- transition_in: zF,
- transition_out: PF,
+ safe_not_equal: MF,
+ toggle_class: NF,
+ transition_in: PF,
+ transition_out: zF,
update_slot_base: HF
} = window.__gradio__svelte__internal, {
SvelteComponent: UF,
@@ -7558,10 +7588,10 @@ const {
group_outros: L$,
init: O$,
insert_hydration: q$,
- mount_component: N$,
- noop: M$,
- safe_not_equal: z$,
- transition_in: P$,
+ mount_component: M$,
+ noop: N$,
+ safe_not_equal: P$,
+ transition_in: z$,
transition_out: H$
} = window.__gradio__svelte__internal, { createEventDispatcher: U$ } = window.__gradio__svelte__internal;
function Ut(l) {
@@ -7573,17 +7603,17 @@ function Ut(l) {
}
function In() {
}
-const go = typeof window < "u";
-let sl = go ? () => window.performance.now() : () => Date.now(), vo = go ? (l) => requestAnimationFrame(l) : In;
+const po = typeof window < "u";
+let ol = po ? () => window.performance.now() : () => Date.now(), mo = po ? (l) => requestAnimationFrame(l) : In;
const Gt = /* @__PURE__ */ new Set();
-function bo(l) {
+function go(l) {
Gt.forEach((e) => {
e.c(l) || (Gt.delete(e), e.f());
- }), Gt.size !== 0 && vo(bo);
+ }), Gt.size !== 0 && mo(go);
}
function Ru(l) {
let e;
- return Gt.size === 0 && vo(bo), { promise: new Promise((t) => {
+ return Gt.size === 0 && mo(go), { promise: new Promise((t) => {
Gt.add(e = { c: l, f: t });
}), abort() {
Gt.delete(e);
@@ -7614,13 +7644,13 @@ function Iu(l, e = In) {
};
} };
}
-function ul(l) {
+function rl(l) {
return Object.prototype.toString.call(l) === "[object Date]";
}
function Oi(l, e, t, n) {
- if (typeof t == "number" || ul(t)) {
+ if (typeof t == "number" || rl(t)) {
const i = n - t, a = (t - e) / (l.dt || 1 / 60), o = (a + (l.opts.stiffness * i - l.opts.damping * a) * l.inv_mass) * l.dt;
- return Math.abs(o) < l.opts.precision && Math.abs(i) < l.opts.precision ? n : (l.settled = !1, ul(t) ? new Date(t.getTime() + o) : t + o);
+ return Math.abs(o) < l.opts.precision && Math.abs(i) < l.opts.precision ? n : (l.settled = !1, rl(t) ? new Date(t.getTime() + o) : t + o);
}
if (Array.isArray(t)) return t.map((i, a) => Oi(l, e[a], t[a], n[a]));
if (typeof t == "object") {
@@ -7630,157 +7660,157 @@ function Oi(l, e, t, n) {
}
throw new Error(`Cannot spring ${typeof t} values`);
}
-function cl(l, e = {}) {
+function sl(l, e = {}) {
const t = Iu(l), { stiffness: n = 0.15, damping: i = 0.8, precision: a = 0.01 } = e;
let o, r, s, u = l, c = l, f = 1, d = 0, h = !1;
- function m(v, w = {}) {
+ function p(v, F = {}) {
c = v;
- const p = s = {};
- return l == null || w.hard || D.stiffness >= 1 && D.damping >= 1 ? (h = !0, o = sl(), u = v, t.set(l = c), Promise.resolve()) : (w.soft && (d = 1 / (60 * (w.soft === !0 ? 0.5 : +w.soft)), f = 0), r || (o = sl(), h = !1, r = Ru((_) => {
+ const g = s = {};
+ return l == null || F.hard || b.stiffness >= 1 && b.damping >= 1 ? (h = !0, o = ol(), u = v, t.set(l = c), Promise.resolve()) : (F.soft && (d = 1 / (60 * (F.soft === !0 ? 0.5 : +F.soft)), f = 0), r || (o = ol(), h = !1, r = Ru((_) => {
if (h) return h = !1, r = null, !1;
f = Math.min(f + d, 1);
- const b = { inv_mass: f, opts: D, settled: !0, dt: 60 * (_ - o) / 1e3 }, y = Oi(b, u, l, c);
- return o = _, u = l, t.set(l = y), b.settled && (r = null), !b.settled;
+ const D = { inv_mass: f, opts: b, settled: !0, dt: 60 * (_ - o) / 1e3 }, y = Oi(D, u, l, c);
+ return o = _, u = l, t.set(l = y), D.settled && (r = null), !D.settled;
})), new Promise((_) => {
r.promise.then(() => {
- p === s && _();
+ g === s && _();
});
}));
}
- const D = { set: m, update: (v, w) => m(v(c, l), w), subscribe: t.subscribe, stiffness: n, damping: i, precision: a };
- return D;
+ const b = { set: p, update: (v, F) => p(v(c, l), F), subscribe: t.subscribe, stiffness: n, damping: i, precision: a };
+ return b;
}
const {
SvelteComponent: Lu,
- append_hydration: Ve,
- attr: V,
- children: Oe,
+ append_hydration: We,
+ attr: j,
+ children: Me,
claim_element: Ou,
- claim_svg_element: je,
- component_subscribe: _l,
- detach: Se,
+ claim_svg_element: Ze,
+ component_subscribe: ul,
+ detach: Be,
element: qu,
- init: Nu,
- insert_hydration: Mu,
- noop: dl,
- safe_not_equal: zu,
+ init: Mu,
+ insert_hydration: Nu,
+ noop: cl,
+ safe_not_equal: Pu,
set_style: Cn,
- svg_element: We,
- toggle_class: fl
-} = window.__gradio__svelte__internal, { onMount: Pu } = window.__gradio__svelte__internal;
+ svg_element: Ye,
+ toggle_class: _l
+} = window.__gradio__svelte__internal, { onMount: zu } = window.__gradio__svelte__internal;
function Hu(l) {
let e, t, n, i, a, o, r, s, u, c, f, d;
return {
c() {
- e = qu("div"), t = We("svg"), n = We("g"), i = We("path"), a = We("path"), o = We("path"), r = We("path"), s = We("g"), u = We("path"), c = We("path"), f = We("path"), d = We("path"), this.h();
+ e = qu("div"), t = Ye("svg"), n = Ye("g"), i = Ye("path"), a = Ye("path"), o = Ye("path"), r = Ye("path"), s = Ye("g"), u = Ye("path"), c = Ye("path"), f = Ye("path"), d = Ye("path"), this.h();
},
l(h) {
e = Ou(h, "DIV", { class: !0 });
- var m = Oe(e);
- t = je(m, "svg", {
+ var p = Me(e);
+ t = Ze(p, "svg", {
viewBox: !0,
fill: !0,
xmlns: !0,
class: !0
});
- var D = Oe(t);
- n = je(D, "g", { style: !0 });
- var v = Oe(n);
- i = je(v, "path", {
+ var b = Me(t);
+ n = Ze(b, "g", { style: !0 });
+ var v = Me(n);
+ i = Ze(v, "path", {
d: !0,
fill: !0,
"fill-opacity": !0,
class: !0
- }), Oe(i).forEach(Se), a = je(v, "path", { d: !0, fill: !0, class: !0 }), Oe(a).forEach(Se), o = je(v, "path", {
+ }), Me(i).forEach(Be), a = Ze(v, "path", { d: !0, fill: !0, class: !0 }), Me(a).forEach(Be), o = Ze(v, "path", {
d: !0,
fill: !0,
"fill-opacity": !0,
class: !0
- }), Oe(o).forEach(Se), r = je(v, "path", { d: !0, fill: !0, class: !0 }), Oe(r).forEach(Se), v.forEach(Se), s = je(D, "g", { style: !0 });
- var w = Oe(s);
- u = je(w, "path", {
+ }), Me(o).forEach(Be), r = Ze(v, "path", { d: !0, fill: !0, class: !0 }), Me(r).forEach(Be), v.forEach(Be), s = Ze(b, "g", { style: !0 });
+ var F = Me(s);
+ u = Ze(F, "path", {
d: !0,
fill: !0,
"fill-opacity": !0,
class: !0
- }), Oe(u).forEach(Se), c = je(w, "path", { d: !0, fill: !0, class: !0 }), Oe(c).forEach(Se), f = je(w, "path", {
+ }), Me(u).forEach(Be), c = Ze(F, "path", { d: !0, fill: !0, class: !0 }), Me(c).forEach(Be), f = Ze(F, "path", {
d: !0,
fill: !0,
"fill-opacity": !0,
class: !0
- }), Oe(f).forEach(Se), d = je(w, "path", { d: !0, fill: !0, class: !0 }), Oe(d).forEach(Se), w.forEach(Se), D.forEach(Se), m.forEach(Se), this.h();
+ }), Me(f).forEach(Be), d = Ze(F, "path", { d: !0, fill: !0, class: !0 }), Me(d).forEach(Be), F.forEach(Be), b.forEach(Be), p.forEach(Be), this.h();
},
h() {
- V(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), V(i, "fill", "#FF7C00"), V(i, "fill-opacity", "0.4"), V(i, "class", "svelte-43sxxs"), V(a, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), V(a, "fill", "#FF7C00"), V(a, "class", "svelte-43sxxs"), V(o, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), V(o, "fill", "#FF7C00"), V(o, "fill-opacity", "0.4"), V(o, "class", "svelte-43sxxs"), V(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), V(r, "fill", "#FF7C00"), V(r, "class", "svelte-43sxxs"), Cn(n, "transform", "translate(" + /*$top*/
+ j(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), j(i, "fill", "#FF7C00"), j(i, "fill-opacity", "0.4"), j(i, "class", "svelte-43sxxs"), j(a, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), j(a, "fill", "#FF7C00"), j(a, "class", "svelte-43sxxs"), j(o, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), j(o, "fill", "#FF7C00"), j(o, "fill-opacity", "0.4"), j(o, "class", "svelte-43sxxs"), j(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), j(r, "fill", "#FF7C00"), j(r, "class", "svelte-43sxxs"), Cn(n, "transform", "translate(" + /*$top*/
l[1][0] + "px, " + /*$top*/
- l[1][1] + "px)"), V(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), V(u, "fill", "#FF7C00"), V(u, "fill-opacity", "0.4"), V(u, "class", "svelte-43sxxs"), V(c, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), V(c, "fill", "#FF7C00"), V(c, "class", "svelte-43sxxs"), V(f, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), V(f, "fill", "#FF7C00"), V(f, "fill-opacity", "0.4"), V(f, "class", "svelte-43sxxs"), V(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), V(d, "fill", "#FF7C00"), V(d, "class", "svelte-43sxxs"), Cn(s, "transform", "translate(" + /*$bottom*/
+ l[1][1] + "px)"), j(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), j(u, "fill", "#FF7C00"), j(u, "fill-opacity", "0.4"), j(u, "class", "svelte-43sxxs"), j(c, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), j(c, "fill", "#FF7C00"), j(c, "class", "svelte-43sxxs"), j(f, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), j(f, "fill", "#FF7C00"), j(f, "fill-opacity", "0.4"), j(f, "class", "svelte-43sxxs"), j(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), j(d, "fill", "#FF7C00"), j(d, "class", "svelte-43sxxs"), Cn(s, "transform", "translate(" + /*$bottom*/
l[2][0] + "px, " + /*$bottom*/
- l[2][1] + "px)"), V(t, "viewBox", "-1200 -1200 3000 3000"), V(t, "fill", "none"), V(t, "xmlns", "http://www.w3.org/2000/svg"), V(t, "class", "svelte-43sxxs"), V(e, "class", "svelte-43sxxs"), fl(
+ l[2][1] + "px)"), j(t, "viewBox", "-1200 -1200 3000 3000"), j(t, "fill", "none"), j(t, "xmlns", "http://www.w3.org/2000/svg"), j(t, "class", "svelte-43sxxs"), j(e, "class", "svelte-43sxxs"), _l(
e,
"margin",
/*margin*/
l[0]
);
},
- m(h, m) {
- Mu(h, e, m), Ve(e, t), Ve(t, n), Ve(n, i), Ve(n, a), Ve(n, o), Ve(n, r), Ve(t, s), Ve(s, u), Ve(s, c), Ve(s, f), Ve(s, d);
+ m(h, p) {
+ Nu(h, e, p), We(e, t), We(t, n), We(n, i), We(n, a), We(n, o), We(n, r), We(t, s), We(s, u), We(s, c), We(s, f), We(s, d);
},
- p(h, [m]) {
- m & /*$top*/
+ p(h, [p]) {
+ p & /*$top*/
2 && Cn(n, "transform", "translate(" + /*$top*/
h[1][0] + "px, " + /*$top*/
- h[1][1] + "px)"), m & /*$bottom*/
+ h[1][1] + "px)"), p & /*$bottom*/
4 && Cn(s, "transform", "translate(" + /*$bottom*/
h[2][0] + "px, " + /*$bottom*/
- h[2][1] + "px)"), m & /*margin*/
- 1 && fl(
+ h[2][1] + "px)"), p & /*margin*/
+ 1 && _l(
e,
"margin",
/*margin*/
h[0]
);
},
- i: dl,
- o: dl,
+ i: cl,
+ o: cl,
d(h) {
- h && Se(e);
+ h && Be(e);
}
};
}
function Uu(l, e, t) {
let n, i;
- var a = this && this.__awaiter || function(h, m, D, v) {
- function w(p) {
- return p instanceof D ? p : new D(function(_) {
- _(p);
+ var a = this && this.__awaiter || function(h, p, b, v) {
+ function F(g) {
+ return g instanceof b ? g : new b(function(_) {
+ _(g);
});
}
- return new (D || (D = Promise))(function(p, _) {
- function b(C) {
+ return new (b || (b = Promise))(function(g, _) {
+ function D($) {
try {
- k(v.next(C));
- } catch (x) {
- _(x);
+ k(v.next($));
+ } catch (T) {
+ _(T);
}
}
- function y(C) {
+ function y($) {
try {
- k(v.throw(C));
- } catch (x) {
- _(x);
+ k(v.throw($));
+ } catch (T) {
+ _(T);
}
}
- function k(C) {
- C.done ? p(C.value) : w(C.value).then(b, y);
+ function k($) {
+ $.done ? g($.value) : F($.value).then(D, y);
}
- k((v = v.apply(h, m || [])).next());
+ k((v = v.apply(h, p || [])).next());
});
};
let { margin: o = !0 } = e;
- const r = cl([0, 0]);
- _l(l, r, (h) => t(1, n = h));
- const s = cl([0, 0]);
- _l(l, s, (h) => t(2, i = h));
+ const r = sl([0, 0]);
+ ul(l, r, (h) => t(1, n = h));
+ const s = sl([0, 0]);
+ ul(l, s, (h) => t(2, i = h));
let u;
function c() {
return a(this, void 0, void 0, function* () {
@@ -7797,56 +7827,56 @@ function Uu(l, e, t) {
yield Promise.all([r.set([125, 0]), s.set([-125, 0])]), f();
});
}
- return Pu(() => (d(), () => u = !0)), l.$$set = (h) => {
+ return zu(() => (d(), () => u = !0)), l.$$set = (h) => {
"margin" in h && t(0, o = h.margin);
}, [o, n, i, r, s];
}
class Gu extends Lu {
constructor(e) {
- super(), Nu(this, e, Uu, Hu, zu, { margin: 0 });
+ super(), Mu(this, e, Uu, Hu, Pu, { margin: 0 });
}
}
const {
SvelteComponent: Vu,
append_hydration: Et,
- attr: Qe,
- binding_callbacks: hl,
+ attr: et,
+ binding_callbacks: dl,
check_outros: qi,
- children: ot,
- claim_component: Do,
- claim_element: rt,
- claim_space: Me,
+ children: st,
+ claim_component: vo,
+ claim_element: ut,
+ claim_space: ze,
claim_text: ie,
- create_component: wo,
- create_slot: yo,
- destroy_component: ko,
- destroy_each: Fo,
+ create_component: bo,
+ create_slot: Do,
+ destroy_component: wo,
+ destroy_each: yo,
detach: L,
- element: st,
- empty: Pe,
+ element: ct,
+ empty: Ue,
ensure_array_like: Vn,
- get_all_dirty_from_scope: $o,
- get_slot_changes: Eo,
- group_outros: Ni,
+ get_all_dirty_from_scope: ko,
+ get_slot_changes: Fo,
+ group_outros: Mi,
init: ju,
insert_hydration: M,
- mount_component: Co,
- noop: Mi,
+ mount_component: $o,
+ noop: Ni,
safe_not_equal: Wu,
- set_data: He,
+ set_data: Ge,
set_style: kt,
- space: ze,
+ space: He,
text: ae,
- toggle_class: Ne,
- transition_in: Ke,
- transition_out: ut,
- update_slot_base: Ao
-} = window.__gradio__svelte__internal, { tick: Zu } = window.__gradio__svelte__internal, { onDestroy: Yu } = window.__gradio__svelte__internal, { createEventDispatcher: Xu } = window.__gradio__svelte__internal, Ku = (l) => ({}), pl = (l) => ({}), Qu = (l) => ({}), ml = (l) => ({});
-function gl(l, e, t) {
+ toggle_class: Pe,
+ transition_in: Je,
+ transition_out: _t,
+ update_slot_base: Eo
+} = window.__gradio__svelte__internal, { tick: Zu } = window.__gradio__svelte__internal, { onDestroy: Yu } = window.__gradio__svelte__internal, { createEventDispatcher: Xu } = window.__gradio__svelte__internal, Ku = (l) => ({}), fl = (l) => ({}), Qu = (l) => ({}), hl = (l) => ({});
+function pl(l, e, t) {
const n = l.slice();
return n[40] = e[t], n[42] = t, n;
}
-function vl(l, e, t) {
+function ml(l, e, t) {
const n = l.slice();
return n[40] = e[t], n;
}
@@ -7872,29 +7902,29 @@ function Ju(l) {
const u = (
/*#slots*/
l[30].error
- ), c = yo(
+ ), c = Do(
u,
l,
/*$$scope*/
l[29],
- pl
+ fl
);
return {
c() {
- e = st("div"), wo(t.$$.fragment), n = ze(), i = st("span"), o = ae(a), r = ze(), c && c.c(), this.h();
+ e = ct("div"), bo(t.$$.fragment), n = He(), i = ct("span"), o = ae(a), r = He(), c && c.c(), this.h();
},
l(f) {
- e = rt(f, "DIV", { class: !0 });
- var d = ot(e);
- Do(t.$$.fragment, d), d.forEach(L), n = Me(f), i = rt(f, "SPAN", { class: !0 });
- var h = ot(i);
- o = ie(h, a), h.forEach(L), r = Me(f), c && c.l(f), this.h();
+ e = ut(f, "DIV", { class: !0 });
+ var d = st(e);
+ vo(t.$$.fragment, d), d.forEach(L), n = ze(f), i = ut(f, "SPAN", { class: !0 });
+ var h = st(i);
+ o = ie(h, a), h.forEach(L), r = ze(f), c && c.l(f), this.h();
},
h() {
- Qe(e, "class", "clear-status svelte-17v219f"), Qe(i, "class", "error svelte-17v219f");
+ et(e, "class", "clear-status svelte-17v219f"), et(i, "class", "error svelte-17v219f");
},
m(f, d) {
- M(f, e, d), Co(t, e, null), M(f, n, d), M(f, i, d), Et(i, o), M(f, r, d), c && c.m(f, d), s = !0;
+ M(f, e, d), $o(t, e, null), M(f, n, d), M(f, i, d), Et(i, o), M(f, r, d), c && c.m(f, d), s = !0;
},
p(f, d) {
const h = {};
@@ -7902,34 +7932,34 @@ function Ju(l) {
2 && (h.label = /*i18n*/
f[1]("common.clear")), t.$set(h), (!s || d[0] & /*i18n*/
2) && a !== (a = /*i18n*/
- f[1]("common.error") + "") && He(o, a), c && c.p && (!s || d[0] & /*$$scope*/
- 536870912) && Ao(
+ f[1]("common.error") + "") && Ge(o, a), c && c.p && (!s || d[0] & /*$$scope*/
+ 536870912) && Eo(
c,
u,
f,
/*$$scope*/
f[29],
- s ? Eo(
+ s ? Fo(
u,
/*$$scope*/
f[29],
d,
Ku
- ) : $o(
+ ) : ko(
/*$$scope*/
f[29]
),
- pl
+ fl
);
},
i(f) {
- s || (Ke(t.$$.fragment, f), Ke(c, f), s = !0);
+ s || (Je(t.$$.fragment, f), Je(c, f), s = !0);
},
o(f) {
- ut(t.$$.fragment, f), ut(c, f), s = !1;
+ _t(t.$$.fragment, f), _t(c, f), s = !1;
},
d(f) {
- f && (L(e), L(n), L(i), L(r)), ko(t), c && c.d(f);
+ f && (L(e), L(n), L(i), L(r)), wo(t), c && c.d(f);
}
};
}
@@ -7938,9 +7968,9 @@ function ec(l) {
/*variant*/
l[8] === "default" && /*show_eta_bar*/
l[18] && /*show_progress*/
- l[6] === "full" && bl(l)
+ l[6] === "full" && gl(l)
);
- function f(_, b) {
+ function f(_, D) {
if (
/*progress*/
_[7]
@@ -7956,12 +7986,12 @@ function ec(l) {
_[2] === 0
) return tc;
}
- let d = f(l), h = d && d(l), m = (
+ let d = f(l), h = d && d(l), p = (
/*timer*/
- l[5] && yl(l)
+ l[5] && Dl(l)
);
- const D = [rc, oc], v = [];
- function w(_, b) {
+ const b = [rc, oc], v = [];
+ function F(_, D) {
return (
/*last_progress_level*/
_[15] != null ? 0 : (
@@ -7970,84 +8000,84 @@ function ec(l) {
)
);
}
- ~(a = w(l)) && (o = v[a] = D[a](l));
- let p = !/*timer*/
- l[5] && Sl(l);
+ ~(a = F(l)) && (o = v[a] = b[a](l));
+ let g = !/*timer*/
+ l[5] && Cl(l);
return {
c() {
- c && c.c(), e = ze(), t = st("div"), h && h.c(), n = ze(), m && m.c(), i = ze(), o && o.c(), r = ze(), p && p.c(), s = Pe(), this.h();
+ c && c.c(), e = He(), t = ct("div"), h && h.c(), n = He(), p && p.c(), i = He(), o && o.c(), r = He(), g && g.c(), s = Ue(), this.h();
},
l(_) {
- c && c.l(_), e = Me(_), t = rt(_, "DIV", { class: !0 });
- var b = ot(t);
- h && h.l(b), n = Me(b), m && m.l(b), b.forEach(L), i = Me(_), o && o.l(_), r = Me(_), p && p.l(_), s = Pe(), this.h();
+ c && c.l(_), e = ze(_), t = ut(_, "DIV", { class: !0 });
+ var D = st(t);
+ h && h.l(D), n = ze(D), p && p.l(D), D.forEach(L), i = ze(_), o && o.l(_), r = ze(_), g && g.l(_), s = Ue(), this.h();
},
h() {
- Qe(t, "class", "progress-text svelte-17v219f"), Ne(
+ et(t, "class", "progress-text svelte-17v219f"), Pe(
t,
"meta-text-center",
/*variant*/
l[8] === "center"
- ), Ne(
+ ), Pe(
t,
"meta-text",
/*variant*/
l[8] === "default"
);
},
- m(_, b) {
- c && c.m(_, b), M(_, e, b), M(_, t, b), h && h.m(t, null), Et(t, n), m && m.m(t, null), M(_, i, b), ~a && v[a].m(_, b), M(_, r, b), p && p.m(_, b), M(_, s, b), u = !0;
+ m(_, D) {
+ c && c.m(_, D), M(_, e, D), M(_, t, D), h && h.m(t, null), Et(t, n), p && p.m(t, null), M(_, i, D), ~a && v[a].m(_, D), M(_, r, D), g && g.m(_, D), M(_, s, D), u = !0;
},
- p(_, b) {
+ p(_, D) {
/*variant*/
_[8] === "default" && /*show_eta_bar*/
_[18] && /*show_progress*/
- _[6] === "full" ? c ? c.p(_, b) : (c = bl(_), c.c(), c.m(e.parentNode, e)) : c && (c.d(1), c = null), d === (d = f(_)) && h ? h.p(_, b) : (h && h.d(1), h = d && d(_), h && (h.c(), h.m(t, n))), /*timer*/
- _[5] ? m ? m.p(_, b) : (m = yl(_), m.c(), m.m(t, null)) : m && (m.d(1), m = null), (!u || b[0] & /*variant*/
- 256) && Ne(
+ _[6] === "full" ? c ? c.p(_, D) : (c = gl(_), c.c(), c.m(e.parentNode, e)) : c && (c.d(1), c = null), d === (d = f(_)) && h ? h.p(_, D) : (h && h.d(1), h = d && d(_), h && (h.c(), h.m(t, n))), /*timer*/
+ _[5] ? p ? p.p(_, D) : (p = Dl(_), p.c(), p.m(t, null)) : p && (p.d(1), p = null), (!u || D[0] & /*variant*/
+ 256) && Pe(
t,
"meta-text-center",
/*variant*/
_[8] === "center"
- ), (!u || b[0] & /*variant*/
- 256) && Ne(
+ ), (!u || D[0] & /*variant*/
+ 256) && Pe(
t,
"meta-text",
/*variant*/
_[8] === "default"
);
let y = a;
- a = w(_), a === y ? ~a && v[a].p(_, b) : (o && (Ni(), ut(v[y], 1, 1, () => {
+ a = F(_), a === y ? ~a && v[a].p(_, D) : (o && (Mi(), _t(v[y], 1, 1, () => {
v[y] = null;
- }), qi()), ~a ? (o = v[a], o ? o.p(_, b) : (o = v[a] = D[a](_), o.c()), Ke(o, 1), o.m(r.parentNode, r)) : o = null), /*timer*/
- _[5] ? p && (Ni(), ut(p, 1, 1, () => {
- p = null;
- }), qi()) : p ? (p.p(_, b), b[0] & /*timer*/
- 32 && Ke(p, 1)) : (p = Sl(_), p.c(), Ke(p, 1), p.m(s.parentNode, s));
+ }), qi()), ~a ? (o = v[a], o ? o.p(_, D) : (o = v[a] = b[a](_), o.c()), Je(o, 1), o.m(r.parentNode, r)) : o = null), /*timer*/
+ _[5] ? g && (Mi(), _t(g, 1, 1, () => {
+ g = null;
+ }), qi()) : g ? (g.p(_, D), D[0] & /*timer*/
+ 32 && Je(g, 1)) : (g = Cl(_), g.c(), Je(g, 1), g.m(s.parentNode, s));
},
i(_) {
- u || (Ke(o), Ke(p), u = !0);
+ u || (Je(o), Je(g), u = !0);
},
o(_) {
- ut(o), ut(p), u = !1;
+ _t(o), _t(g), u = !1;
},
d(_) {
- _ && (L(e), L(t), L(i), L(r), L(s)), c && c.d(_), h && h.d(), m && m.d(), ~a && v[a].d(_), p && p.d(_);
+ _ && (L(e), L(t), L(i), L(r), L(s)), c && c.d(_), h && h.d(), p && p.d(), ~a && v[a].d(_), g && g.d(_);
}
};
}
-function bl(l) {
+function gl(l) {
let e, t = `translateX(${/*eta_level*/
(l[17] || 0) * 100 - 100}%)`;
return {
c() {
- e = st("div"), this.h();
+ e = ct("div"), this.h();
},
l(n) {
- e = rt(n, "DIV", { class: !0 }), ot(e).forEach(L), this.h();
+ e = ut(n, "DIV", { class: !0 }), st(e).forEach(L), this.h();
},
h() {
- Qe(e, "class", "eta-bar svelte-17v219f"), kt(e, "transform", t);
+ et(e, "class", "eta-bar svelte-17v219f"), kt(e, "transform", t);
},
m(n, i) {
M(n, e, i);
@@ -8074,7 +8104,7 @@ function tc(l) {
m(t, n) {
M(t, e, n);
},
- p: Mi,
+ p: Ni,
d(t) {
t && L(e);
}
@@ -8105,8 +8135,8 @@ function nc(l) {
p(r, s) {
s[0] & /*queue_position*/
4 && t !== (t = /*queue_position*/
- r[2] + 1 + "") && He(n, t), s[0] & /*queue_size*/
- 8 && He(
+ r[2] + 1 + "") && Ge(n, t), s[0] & /*queue_size*/
+ 8 && Ge(
a,
/*queue_size*/
r[3]
@@ -8123,17 +8153,17 @@ function ic(l) {
l[7]
), n = [];
for (let i = 0; i < t.length; i += 1)
- n[i] = wl(vl(l, t, i));
+ n[i] = bl(ml(l, t, i));
return {
c() {
for (let i = 0; i < n.length; i += 1)
n[i].c();
- e = Pe();
+ e = Ue();
},
l(i) {
for (let a = 0; a < n.length; a += 1)
n[a].l(i);
- e = Pe();
+ e = Ue();
},
m(i, a) {
for (let o = 0; o < n.length; o += 1)
@@ -8149,8 +8179,8 @@ function ic(l) {
);
let o;
for (o = 0; o < t.length; o += 1) {
- const r = vl(i, t, o);
- n[o] ? n[o].p(r, a) : (n[o] = wl(r), n[o].c(), n[o].m(e.parentNode, e));
+ const r = ml(i, t, o);
+ n[o] ? n[o].p(r, a) : (n[o] = bl(r), n[o].c(), n[o].m(e.parentNode, e));
}
for (; o < n.length; o += 1)
n[o].d(1);
@@ -8158,11 +8188,11 @@ function ic(l) {
}
},
d(i) {
- i && L(e), Fo(n, i);
+ i && L(e), yo(n, i);
}
};
}
-function Dl(l) {
+function vl(l) {
let e, t = (
/*p*/
l[40].unit + ""
@@ -8176,10 +8206,10 @@ function Dl(l) {
let s = r(l), u = s(l);
return {
c() {
- u.c(), e = ze(), n = ae(t), i = ae(" | "), o = ae(a);
+ u.c(), e = He(), n = ae(t), i = ae(" | "), o = ae(a);
},
l(c) {
- u.l(c), e = Me(c), n = ie(c, t), i = ie(c, " | "), o = ie(c, a);
+ u.l(c), e = ze(c), n = ie(c, t), i = ie(c, " | "), o = ie(c, a);
},
m(c, f) {
u.m(c, f), M(c, e, f), M(c, n, f), M(c, i, f), M(c, o, f);
@@ -8187,7 +8217,7 @@ function Dl(l) {
p(c, f) {
s === (s = r(c)) && u ? u.p(c, f) : (u.d(1), u = s(c), u && (u.c(), u.m(e.parentNode, e))), f[0] & /*progress*/
128 && t !== (t = /*p*/
- c[40].unit + "") && He(n, t);
+ c[40].unit + "") && Ge(n, t);
},
d(c) {
c && (L(e), L(n), L(i), L(o)), u.d(c);
@@ -8214,7 +8244,7 @@ function ac(l) {
128 && e !== (e = Ut(
/*p*/
n[40].index || 0
- ) + "") && He(t, e);
+ ) + "") && Ge(t, e);
},
d(n) {
n && L(t);
@@ -8244,42 +8274,42 @@ function lc(l) {
128 && e !== (e = Ut(
/*p*/
o[40].index || 0
- ) + "") && He(t, e), r[0] & /*progress*/
+ ) + "") && Ge(t, e), r[0] & /*progress*/
128 && i !== (i = Ut(
/*p*/
o[40].length
- ) + "") && He(a, i);
+ ) + "") && Ge(a, i);
},
d(o) {
o && (L(t), L(n), L(a));
}
};
}
-function wl(l) {
+function bl(l) {
let e, t = (
/*p*/
- l[40].index != null && Dl(l)
+ l[40].index != null && vl(l)
);
return {
c() {
- t && t.c(), e = Pe();
+ t && t.c(), e = Ue();
},
l(n) {
- t && t.l(n), e = Pe();
+ t && t.l(n), e = Ue();
},
m(n, i) {
t && t.m(n, i), M(n, e, i);
},
p(n, i) {
/*p*/
- n[40].index != null ? t ? t.p(n, i) : (t = Dl(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
+ n[40].index != null ? t ? t.p(n, i) : (t = vl(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
},
d(n) {
n && L(e), t && t.d(n);
}
};
}
-function yl(l) {
+function Dl(l) {
let e, t = (
/*eta*/
l[0] ? `/${/*formatted_eta*/
@@ -8304,14 +8334,14 @@ function yl(l) {
},
p(a, o) {
o[0] & /*formatted_timer*/
- 1048576 && He(
+ 1048576 && Ge(
e,
/*formatted_timer*/
a[20]
), o[0] & /*eta, formatted_eta*/
524289 && t !== (t = /*eta*/
a[0] ? `/${/*formatted_eta*/
- a[19]}` : "") && He(n, t);
+ a[19]}` : "") && Ge(n, t);
},
d(a) {
a && (L(e), L(n), L(i));
@@ -8327,13 +8357,13 @@ function oc(l) {
) }
}), {
c() {
- wo(e.$$.fragment);
+ bo(e.$$.fragment);
},
l(n) {
- Do(e.$$.fragment, n);
+ vo(e.$$.fragment, n);
},
m(n, i) {
- Co(e, n, i), t = !0;
+ $o(e, n, i), t = !0;
},
p(n, i) {
const a = {};
@@ -8342,13 +8372,13 @@ function oc(l) {
n[8] === "default"), e.$set(a);
},
i(n) {
- t || (Ke(e.$$.fragment, n), t = !0);
+ t || (Je(e.$$.fragment, n), t = !0);
},
o(n) {
- ut(e.$$.fragment, n), t = !1;
+ _t(e.$$.fragment, n), t = !1;
},
d(n) {
- ko(e, n);
+ wo(e, n);
}
};
}
@@ -8356,57 +8386,57 @@ function rc(l) {
let e, t, n, i, a, o = `${/*last_progress_level*/
l[15] * 100}%`, r = (
/*progress*/
- l[7] != null && kl(l)
+ l[7] != null && wl(l)
);
return {
c() {
- e = st("div"), t = st("div"), r && r.c(), n = ze(), i = st("div"), a = st("div"), this.h();
+ e = ct("div"), t = ct("div"), r && r.c(), n = He(), i = ct("div"), a = ct("div"), this.h();
},
l(s) {
- e = rt(s, "DIV", { class: !0 });
- var u = ot(e);
- t = rt(u, "DIV", { class: !0 });
- var c = ot(t);
- r && r.l(c), c.forEach(L), n = Me(u), i = rt(u, "DIV", { class: !0 });
- var f = ot(i);
- a = rt(f, "DIV", { class: !0 }), ot(a).forEach(L), f.forEach(L), u.forEach(L), this.h();
+ e = ut(s, "DIV", { class: !0 });
+ var u = st(e);
+ t = ut(u, "DIV", { class: !0 });
+ var c = st(t);
+ r && r.l(c), c.forEach(L), n = ze(u), i = ut(u, "DIV", { class: !0 });
+ var f = st(i);
+ a = ut(f, "DIV", { class: !0 }), st(a).forEach(L), f.forEach(L), u.forEach(L), this.h();
},
h() {
- Qe(t, "class", "progress-level-inner svelte-17v219f"), Qe(a, "class", "progress-bar svelte-17v219f"), kt(a, "width", o), Qe(i, "class", "progress-bar-wrap svelte-17v219f"), Qe(e, "class", "progress-level svelte-17v219f");
+ et(t, "class", "progress-level-inner svelte-17v219f"), et(a, "class", "progress-bar svelte-17v219f"), kt(a, "width", o), et(i, "class", "progress-bar-wrap svelte-17v219f"), et(e, "class", "progress-level svelte-17v219f");
},
m(s, u) {
M(s, e, u), Et(e, t), r && r.m(t, null), Et(e, n), Et(e, i), Et(i, a), l[31](a);
},
p(s, u) {
/*progress*/
- s[7] != null ? r ? r.p(s, u) : (r = kl(s), r.c(), r.m(t, null)) : r && (r.d(1), r = null), u[0] & /*last_progress_level*/
+ s[7] != null ? r ? r.p(s, u) : (r = wl(s), r.c(), r.m(t, null)) : r && (r.d(1), r = null), u[0] & /*last_progress_level*/
32768 && o !== (o = `${/*last_progress_level*/
s[15] * 100}%`) && kt(a, "width", o);
},
- i: Mi,
- o: Mi,
+ i: Ni,
+ o: Ni,
d(s) {
s && L(e), r && r.d(), l[31](null);
}
};
}
-function kl(l) {
+function wl(l) {
let e, t = Vn(
/*progress*/
l[7]
), n = [];
for (let i = 0; i < t.length; i += 1)
- n[i] = Al(gl(l, t, i));
+ n[i] = El(pl(l, t, i));
return {
c() {
for (let i = 0; i < n.length; i += 1)
n[i].c();
- e = Pe();
+ e = Ue();
},
l(i) {
for (let a = 0; a < n.length; a += 1)
n[a].l(i);
- e = Pe();
+ e = Ue();
},
m(i, a) {
for (let o = 0; o < n.length; o += 1)
@@ -8422,8 +8452,8 @@ function kl(l) {
);
let o;
for (o = 0; o < t.length; o += 1) {
- const r = gl(i, t, o);
- n[o] ? n[o].p(r, a) : (n[o] = Al(r), n[o].c(), n[o].m(e.parentNode, e));
+ const r = pl(i, t, o);
+ n[o] ? n[o].p(r, a) : (n[o] = El(r), n[o].c(), n[o].m(e.parentNode, e));
}
for (; o < n.length; o += 1)
n[o].d(1);
@@ -8431,17 +8461,17 @@ function kl(l) {
}
},
d(i) {
- i && L(e), Fo(n, i);
+ i && L(e), yo(n, i);
}
};
}
-function Fl(l) {
+function yl(l) {
let e, t, n, i, a = (
/*i*/
l[42] !== 0 && sc()
), o = (
/*p*/
- l[40].desc != null && $l(l)
+ l[40].desc != null && kl(l)
), r = (
/*p*/
l[40].desc != null && /*progress_level*/
@@ -8449,31 +8479,31 @@ function Fl(l) {
l[14][
/*i*/
l[42]
- ] != null && El()
+ ] != null && Fl()
), s = (
/*progress_level*/
- l[14] != null && Cl(l)
+ l[14] != null && $l(l)
);
return {
c() {
- a && a.c(), e = ze(), o && o.c(), t = ze(), r && r.c(), n = ze(), s && s.c(), i = Pe();
+ a && a.c(), e = He(), o && o.c(), t = He(), r && r.c(), n = He(), s && s.c(), i = Ue();
},
l(u) {
- a && a.l(u), e = Me(u), o && o.l(u), t = Me(u), r && r.l(u), n = Me(u), s && s.l(u), i = Pe();
+ a && a.l(u), e = ze(u), o && o.l(u), t = ze(u), r && r.l(u), n = ze(u), s && s.l(u), i = Ue();
},
m(u, c) {
a && a.m(u, c), M(u, e, c), o && o.m(u, c), M(u, t, c), r && r.m(u, c), M(u, n, c), s && s.m(u, c), M(u, i, c);
},
p(u, c) {
/*p*/
- u[40].desc != null ? o ? o.p(u, c) : (o = $l(u), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null), /*p*/
+ u[40].desc != null ? o ? o.p(u, c) : (o = kl(u), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null), /*p*/
u[40].desc != null && /*progress_level*/
u[14] && /*progress_level*/
u[14][
/*i*/
u[42]
- ] != null ? r || (r = El(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/
- u[14] != null ? s ? s.p(u, c) : (s = Cl(u), s.c(), s.m(i.parentNode, i)) : s && (s.d(1), s = null);
+ ] != null ? r || (r = Fl(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/
+ u[14] != null ? s ? s.p(u, c) : (s = $l(u), s.c(), s.m(i.parentNode, i)) : s && (s.d(1), s = null);
},
d(u) {
u && (L(e), L(t), L(n), L(i)), a && a.d(u), o && o.d(u), r && r.d(u), s && s.d(u);
@@ -8497,7 +8527,7 @@ function sc(l) {
}
};
}
-function $l(l) {
+function kl(l) {
let e = (
/*p*/
l[40].desc + ""
@@ -8515,14 +8545,14 @@ function $l(l) {
p(n, i) {
i[0] & /*progress*/
128 && e !== (e = /*p*/
- n[40].desc + "") && He(t, e);
+ n[40].desc + "") && Ge(t, e);
},
d(n) {
n && L(t);
}
};
}
-function El(l) {
+function Fl(l) {
let e;
return {
c() {
@@ -8539,7 +8569,7 @@ function El(l) {
}
};
}
-function Cl(l) {
+function $l(l) {
let e = (100 * /*progress_level*/
(l[14][
/*i*/
@@ -8561,14 +8591,14 @@ function Cl(l) {
(i[14][
/*i*/
i[42]
- ] || 0)).toFixed(1) + "") && He(t, e);
+ ] || 0)).toFixed(1) + "") && Ge(t, e);
},
d(i) {
i && (L(t), L(n));
}
};
}
-function Al(l) {
+function El(l) {
let e, t = (
/*p*/
(l[40].desc != null || /*progress_level*/
@@ -8576,14 +8606,14 @@ function Al(l) {
l[14][
/*i*/
l[42]
- ] != null) && Fl(l)
+ ] != null) && yl(l)
);
return {
c() {
- t && t.c(), e = Pe();
+ t && t.c(), e = Ue();
},
l(n) {
- t && t.l(n), e = Pe();
+ t && t.l(n), e = Ue();
},
m(n, i) {
t && t.m(n, i), M(n, e, i);
@@ -8595,78 +8625,78 @@ function Al(l) {
n[14][
/*i*/
n[42]
- ] != null ? t ? t.p(n, i) : (t = Fl(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
+ ] != null ? t ? t.p(n, i) : (t = yl(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
},
d(n) {
n && L(e), t && t.d(n);
}
};
}
-function Sl(l) {
+function Cl(l) {
let e, t, n, i;
const a = (
/*#slots*/
l[30]["additional-loading-text"]
- ), o = yo(
+ ), o = Do(
a,
l,
/*$$scope*/
l[29],
- ml
+ hl
);
return {
c() {
- e = st("p"), t = ae(
+ e = ct("p"), t = ae(
/*loading_text*/
l[9]
- ), n = ze(), o && o.c(), this.h();
+ ), n = He(), o && o.c(), this.h();
},
l(r) {
- e = rt(r, "P", { class: !0 });
- var s = ot(e);
+ e = ut(r, "P", { class: !0 });
+ var s = st(e);
t = ie(
s,
/*loading_text*/
l[9]
- ), s.forEach(L), n = Me(r), o && o.l(r), this.h();
+ ), s.forEach(L), n = ze(r), o && o.l(r), this.h();
},
h() {
- Qe(e, "class", "loading svelte-17v219f");
+ et(e, "class", "loading svelte-17v219f");
},
m(r, s) {
M(r, e, s), Et(e, t), M(r, n, s), o && o.m(r, s), i = !0;
},
p(r, s) {
(!i || s[0] & /*loading_text*/
- 512) && He(
+ 512) && Ge(
t,
/*loading_text*/
r[9]
), o && o.p && (!i || s[0] & /*$$scope*/
- 536870912) && Ao(
+ 536870912) && Eo(
o,
a,
r,
/*$$scope*/
r[29],
- i ? Eo(
+ i ? Fo(
a,
/*$$scope*/
r[29],
s,
Qu
- ) : $o(
+ ) : ko(
/*$$scope*/
r[29]
),
- ml
+ hl
);
},
i(r) {
- i || (Ke(o, r), i = !0);
+ i || (Je(o, r), i = !0);
},
o(r) {
- ut(o, r), i = !1;
+ _t(o, r), i = !1;
},
d(r) {
r && (L(e), L(n)), o && o.d(r);
@@ -8687,21 +8717,21 @@ function uc(l) {
}
return ~(t = s(l)) && (n = r[t] = o[t](l)), {
c() {
- e = st("div"), n && n.c(), this.h();
+ e = ct("div"), n && n.c(), this.h();
},
l(u) {
- e = rt(u, "DIV", { class: !0 });
- var c = ot(e);
+ e = ut(u, "DIV", { class: !0 });
+ var c = st(e);
n && n.l(c), c.forEach(L), this.h();
},
h() {
- Qe(e, "class", i = "wrap " + /*variant*/
+ et(e, "class", i = "wrap " + /*variant*/
l[8] + " " + /*show_progress*/
- l[6] + " svelte-17v219f"), Ne(e, "hide", !/*status*/
+ l[6] + " svelte-17v219f"), Pe(e, "hide", !/*status*/
l[4] || /*status*/
l[4] === "complete" || /*show_progress*/
l[6] === "hidden" || /*status*/
- l[4] == "streaming"), Ne(
+ l[4] == "streaming"), Pe(
e,
"translucent",
/*variant*/
@@ -8710,13 +8740,13 @@ function uc(l) {
l[4] === "error") || /*translucent*/
l[11] || /*show_progress*/
l[6] === "minimal"
- ), Ne(
+ ), Pe(
e,
"generating",
/*status*/
l[4] === "generating" && /*show_progress*/
l[6] === "full"
- ), Ne(
+ ), Pe(
e,
"border",
/*border*/
@@ -8738,18 +8768,18 @@ function uc(l) {
},
p(u, c) {
let f = t;
- t = s(u), t === f ? ~t && r[t].p(u, c) : (n && (Ni(), ut(r[f], 1, 1, () => {
+ t = s(u), t === f ? ~t && r[t].p(u, c) : (n && (Mi(), _t(r[f], 1, 1, () => {
r[f] = null;
- }), qi()), ~t ? (n = r[t], n ? n.p(u, c) : (n = r[t] = o[t](u), n.c()), Ke(n, 1), n.m(e, null)) : n = null), (!a || c[0] & /*variant, show_progress*/
+ }), qi()), ~t ? (n = r[t], n ? n.p(u, c) : (n = r[t] = o[t](u), n.c()), Je(n, 1), n.m(e, null)) : n = null), (!a || c[0] & /*variant, show_progress*/
320 && i !== (i = "wrap " + /*variant*/
u[8] + " " + /*show_progress*/
- u[6] + " svelte-17v219f")) && Qe(e, "class", i), (!a || c[0] & /*variant, show_progress, status, show_progress*/
- 336) && Ne(e, "hide", !/*status*/
+ u[6] + " svelte-17v219f")) && et(e, "class", i), (!a || c[0] & /*variant, show_progress, status, show_progress*/
+ 336) && Pe(e, "hide", !/*status*/
u[4] || /*status*/
u[4] === "complete" || /*show_progress*/
u[6] === "hidden" || /*status*/
u[4] == "streaming"), (!a || c[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
- 2384) && Ne(
+ 2384) && Pe(
e,
"translucent",
/*variant*/
@@ -8759,14 +8789,14 @@ function uc(l) {
u[11] || /*show_progress*/
u[6] === "minimal"
), (!a || c[0] & /*variant, show_progress, status, show_progress*/
- 336) && Ne(
+ 336) && Pe(
e,
"generating",
/*status*/
u[4] === "generating" && /*show_progress*/
u[6] === "full"
), (!a || c[0] & /*variant, show_progress, border*/
- 4416) && Ne(
+ 4416) && Pe(
e,
"border",
/*border*/
@@ -8786,10 +8816,10 @@ function uc(l) {
);
},
i(u) {
- a || (Ke(n), a = !0);
+ a || (Je(n), a = !0);
},
o(u) {
- ut(n), a = !1;
+ _t(n), a = !1;
},
d(u) {
u && L(e), ~t && r[t].d(), l[33](null);
@@ -8824,14 +8854,14 @@ var cc = function(l, e, t, n) {
});
};
let An = [], ki = !1;
-const _c = typeof window < "u", So = _c ? window.requestAnimationFrame : (l) => {
+const _c = typeof window < "u", Co = _c ? window.requestAnimationFrame : (l) => {
};
function dc(l) {
return cc(this, arguments, void 0, function* (e, t = !0) {
if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) {
if (An.push(e), !ki) ki = !0;
else return;
- yield Zu(), So(() => {
+ yield Zu(), Co(() => {
let n = [0, 0];
for (let i = 0; i < An.length; i++) {
const o = An[i].getBoundingClientRect();
@@ -8845,52 +8875,52 @@ function dc(l) {
function fc(l, e, t) {
let n, { $$slots: i = {}, $$scope: a } = e;
const o = Xu();
- let { i18n: r } = e, { eta: s = null } = e, { queue_position: u } = e, { queue_size: c } = e, { status: f } = e, { scroll_to_output: d = !1 } = e, { timer: h = !0 } = e, { show_progress: m = "full" } = e, { message: D = null } = e, { progress: v = null } = e, { variant: w = "default" } = e, { loading_text: p = "Loading..." } = e, { absolute: _ = !0 } = e, { translucent: b = !1 } = e, { border: y = !1 } = e, { autoscroll: k } = e, C, x = !1, A = 0, O = 0, R = null, P = null, S = 0, oe = null, Fe, ue = null, Re = !0;
- const J = () => {
- t(0, s = t(27, R = t(19, F = null))), t(25, A = performance.now()), t(26, O = 0), x = !0, B();
+ let { i18n: r } = e, { eta: s = null } = e, { queue_position: u } = e, { queue_size: c } = e, { status: f } = e, { scroll_to_output: d = !1 } = e, { timer: h = !0 } = e, { show_progress: p = "full" } = e, { message: b = null } = e, { progress: v = null } = e, { variant: F = "default" } = e, { loading_text: g = "Loading..." } = e, { absolute: _ = !0 } = e, { translucent: D = !1 } = e, { border: y = !1 } = e, { autoscroll: k } = e, $, T = !1, A = 0, R = 0, B = null, P = null, S = 0, te = null, fe, ce = null, Oe = !0;
+ const Q = () => {
+ t(0, s = t(27, B = t(19, w = null))), t(25, A = performance.now()), t(26, R = 0), T = !0, oe();
};
- function B() {
- So(() => {
- t(26, O = (performance.now() - A) / 1e3), x && B();
+ function oe() {
+ Co(() => {
+ t(26, R = (performance.now() - A) / 1e3), T && oe();
});
}
- function z() {
- t(26, O = 0), t(0, s = t(27, R = t(19, F = null))), x && (x = !1);
+ function he() {
+ t(26, R = 0), t(0, s = t(27, B = t(19, w = null))), T && (T = !1);
}
Yu(() => {
- x && z();
+ T && he();
});
- let F = null;
- function Y($) {
- hl[$ ? "unshift" : "push"](() => {
- ue = $, t(16, ue), t(7, v), t(14, oe), t(15, Fe);
+ let w = null;
+ function q(E) {
+ dl[E ? "unshift" : "push"](() => {
+ ce = E, t(16, ce), t(7, v), t(14, te), t(15, fe);
});
}
- const N = () => {
+ const z = () => {
o("clear_status");
};
- function K($) {
- hl[$ ? "unshift" : "push"](() => {
- C = $, t(13, C);
+ function H(E) {
+ dl[E ? "unshift" : "push"](() => {
+ $ = E, t(13, $);
});
}
- return l.$$set = ($) => {
- "i18n" in $ && t(1, r = $.i18n), "eta" in $ && t(0, s = $.eta), "queue_position" in $ && t(2, u = $.queue_position), "queue_size" in $ && t(3, c = $.queue_size), "status" in $ && t(4, f = $.status), "scroll_to_output" in $ && t(22, d = $.scroll_to_output), "timer" in $ && t(5, h = $.timer), "show_progress" in $ && t(6, m = $.show_progress), "message" in $ && t(23, D = $.message), "progress" in $ && t(7, v = $.progress), "variant" in $ && t(8, w = $.variant), "loading_text" in $ && t(9, p = $.loading_text), "absolute" in $ && t(10, _ = $.absolute), "translucent" in $ && t(11, b = $.translucent), "border" in $ && t(12, y = $.border), "autoscroll" in $ && t(24, k = $.autoscroll), "$$scope" in $ && t(29, a = $.$$scope);
+ return l.$$set = (E) => {
+ "i18n" in E && t(1, r = E.i18n), "eta" in E && t(0, s = E.eta), "queue_position" in E && t(2, u = E.queue_position), "queue_size" in E && t(3, c = E.queue_size), "status" in E && t(4, f = E.status), "scroll_to_output" in E && t(22, d = E.scroll_to_output), "timer" in E && t(5, h = E.timer), "show_progress" in E && t(6, p = E.show_progress), "message" in E && t(23, b = E.message), "progress" in E && t(7, v = E.progress), "variant" in E && t(8, F = E.variant), "loading_text" in E && t(9, g = E.loading_text), "absolute" in E && t(10, _ = E.absolute), "translucent" in E && t(11, D = E.translucent), "border" in E && t(12, y = E.border), "autoscroll" in E && t(24, k = E.autoscroll), "$$scope" in E && t(29, a = E.$$scope);
}, l.$$.update = () => {
l.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
- 436207617 && (s === null && t(0, s = R), s != null && R !== s && (t(28, P = (performance.now() - A) / 1e3 + s), t(19, F = P.toFixed(1)), t(27, R = s))), l.$$.dirty[0] & /*eta_from_start, timer_diff*/
- 335544320 && t(17, S = P === null || P <= 0 || !O ? null : Math.min(O / P, 1)), l.$$.dirty[0] & /*progress*/
- 128 && v != null && t(18, Re = !1), l.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
- 114816 && (v != null ? t(14, oe = v.map(($) => {
- if ($.index != null && $.length != null)
- return $.index / $.length;
- if ($.progress != null)
- return $.progress;
- })) : t(14, oe = null), oe ? (t(15, Fe = oe[oe.length - 1]), ue && (Fe === 0 ? t(16, ue.style.transition = "0", ue) : t(16, ue.style.transition = "150ms", ue))) : t(15, Fe = void 0)), l.$$.dirty[0] & /*status*/
- 16 && (f === "pending" ? J() : z()), l.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
- 20979728 && C && d && (f === "pending" || f === "complete") && dc(C, k), l.$$.dirty[0] & /*status, message*/
+ 436207617 && (s === null && t(0, s = B), s != null && B !== s && (t(28, P = (performance.now() - A) / 1e3 + s), t(19, w = P.toFixed(1)), t(27, B = s))), l.$$.dirty[0] & /*eta_from_start, timer_diff*/
+ 335544320 && t(17, S = P === null || P <= 0 || !R ? null : Math.min(R / P, 1)), l.$$.dirty[0] & /*progress*/
+ 128 && v != null && t(18, Oe = !1), l.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
+ 114816 && (v != null ? t(14, te = v.map((E) => {
+ if (E.index != null && E.length != null)
+ return E.index / E.length;
+ if (E.progress != null)
+ return E.progress;
+ })) : t(14, te = null), te ? (t(15, fe = te[te.length - 1]), ce && (fe === 0 ? t(16, ce.style.transition = "0", ce) : t(16, ce.style.transition = "150ms", ce))) : t(15, fe = void 0)), l.$$.dirty[0] & /*status*/
+ 16 && (f === "pending" ? Q() : he()), l.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
+ 20979728 && $ && d && (f === "pending" || f === "complete") && dc($, k), l.$$.dirty[0] & /*status, message*/
8388624, l.$$.dirty[0] & /*timer_diff*/
- 67108864 && t(20, n = O.toFixed(1));
+ 67108864 && t(20, n = R.toFixed(1));
}, [
s,
r,
@@ -8898,34 +8928,34 @@ function fc(l, e, t) {
c,
f,
h,
- m,
- v,
- w,
p,
+ v,
+ F,
+ g,
_,
- b,
+ D,
y,
- C,
- oe,
- Fe,
- ue,
+ $,
+ te,
+ fe,
+ ce,
S,
- Re,
- F,
+ Oe,
+ w,
n,
o,
d,
- D,
+ b,
k,
A,
- O,
R,
+ B,
P,
a,
i,
- Y,
- N,
- K
+ q,
+ z,
+ H
];
}
class hc extends Vu {
@@ -8961,51 +8991,51 @@ class hc extends Vu {
}
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
const {
- entries: To,
- setPrototypeOf: Tl,
+ entries: Ao,
+ setPrototypeOf: Al,
isFrozen: pc,
getPrototypeOf: mc,
getOwnPropertyDescriptor: gc
} = Object;
let {
- freeze: ye,
- seal: Ue,
- create: xo
+ freeze: Ce,
+ seal: Ve,
+ create: So
} = Object, {
- apply: zi,
- construct: Pi
+ apply: Pi,
+ construct: zi
} = typeof Reflect < "u" && Reflect;
-ye || (ye = function(e) {
+Ce || (Ce = function(e) {
return e;
});
-Ue || (Ue = function(e) {
+Ve || (Ve = function(e) {
return e;
});
-zi || (zi = function(e, t, n) {
+Pi || (Pi = function(e, t, n) {
return e.apply(t, n);
});
-Pi || (Pi = function(e, t) {
+zi || (zi = function(e, t) {
return new e(...t);
});
-const Sn = ke(Array.prototype.forEach), vc = ke(Array.prototype.lastIndexOf), xl = ke(Array.prototype.pop), Xt = ke(Array.prototype.push), bc = ke(Array.prototype.splice), Ln = ke(String.prototype.toLowerCase), Fi = ke(String.prototype.toString), Bl = ke(String.prototype.match), Kt = ke(String.prototype.replace), Dc = ke(String.prototype.indexOf), wc = ke(String.prototype.trim), Ze = ke(Object.prototype.hasOwnProperty), be = ke(RegExp.prototype.test), Qt = yc(TypeError);
-function ke(l) {
+const Sn = Ae(Array.prototype.forEach), vc = Ae(Array.prototype.lastIndexOf), Sl = Ae(Array.prototype.pop), Xt = Ae(Array.prototype.push), bc = Ae(Array.prototype.splice), Ln = Ae(String.prototype.toLowerCase), Fi = Ae(String.prototype.toString), Tl = Ae(String.prototype.match), Kt = Ae(String.prototype.replace), Dc = Ae(String.prototype.indexOf), wc = Ae(String.prototype.trim), Xe = Ae(Object.prototype.hasOwnProperty), Fe = Ae(RegExp.prototype.test), Qt = yc(TypeError);
+function Ae(l) {
return function(e) {
e instanceof RegExp && (e.lastIndex = 0);
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
n[i - 1] = arguments[i];
- return zi(l, e, n);
+ return Pi(l, e, n);
};
}
function yc(l) {
return function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
- return Pi(l, t);
+ return zi(l, t);
};
}
-function U(l, e) {
+function G(l, e) {
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ln;
- Tl && Tl(l, null);
+ Al && Al(l, null);
let n = e.length;
for (; n--; ) {
let i = e[n];
@@ -9019,13 +9049,13 @@ function U(l, e) {
}
function kc(l) {
for (let e = 0; e < l.length; e++)
- Ze(l, e) || (l[e] = null);
+ Xe(l, e) || (l[e] = null);
return l;
}
-function pt(l) {
- const e = xo(null);
- for (const [t, n] of To(l))
- Ze(l, t) && (Array.isArray(n) ? e[t] = kc(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = pt(n) : e[t] = n);
+function mt(l) {
+ const e = So(null);
+ for (const [t, n] of Ao(l))
+ Xe(l, t) && (Array.isArray(n) ? e[t] = kc(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = mt(n) : e[t] = n);
return e;
}
function Jt(l, e) {
@@ -9033,9 +9063,9 @@ function Jt(l, e) {
const n = gc(l, e);
if (n) {
if (n.get)
- return ke(n.get);
+ return Ae(n.get);
if (typeof n.value == "function")
- return ke(n.value);
+ return Ae(n.value);
}
l = mc(l);
}
@@ -9044,22 +9074,22 @@ function Jt(l, e) {
}
return t;
}
-const Rl = ye(["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", "section", "select", "shadow", "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"]), $i = ye(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ei = ye(["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"]), Fc = ye(["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"]), Ci = ye(["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"]), $c = ye(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Il = ye(["#text"]), Ll = ye(["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", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ai = ye(["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", "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"]), Ol = ye(["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"]), Tn = ye(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ec = Ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Cc = Ue(/<%[\w\W]*|[\w\W]*%>/gm), Ac = Ue(/\$\{[\w\W]*/gm), Sc = Ue(/^data-[\-\w.\u00B7-\uFFFF]+$/), Tc = Ue(/^aria-[\-\w]+$/), Bo = Ue(
+const xl = Ce(["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", "section", "select", "shadow", "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"]), $i = Ce(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ei = Ce(["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"]), Fc = Ce(["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"]), Ci = Ce(["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"]), $c = Ce(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Bl = Ce(["#text"]), Rl = Ce(["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", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ai = Ce(["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", "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"]), Il = Ce(["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"]), Tn = Ce(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ec = Ve(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Cc = Ve(/<%[\w\W]*|[\w\W]*%>/gm), Ac = Ve(/\$\{[\w\W]*/gm), Sc = Ve(/^data-[\-\w.\u00B7-\uFFFF]+$/), Tc = Ve(/^aria-[\-\w]+$/), To = Ve(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
// eslint-disable-line no-useless-escape
-), xc = Ue(/^(?:\w+script|data):/i), Bc = Ue(
+), xc = Ve(/^(?:\w+script|data):/i), Bc = Ve(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
// eslint-disable-line no-control-regex
-), Ro = Ue(/^html$/i), Rc = Ue(/^[a-z][.\w]*(-[.\w]+)+$/i);
-var ql = /* @__PURE__ */ Object.freeze({
+), xo = Ve(/^html$/i), Rc = Ve(/^[a-z][.\w]*(-[.\w]+)+$/i);
+var Ll = /* @__PURE__ */ Object.freeze({
__proto__: null,
ARIA_ATTR: Tc,
ATTR_WHITESPACE: Bc,
CUSTOM_ELEMENT: Rc,
DATA_ATTR: Sc,
- DOCTYPE_NAME: Ro,
+ DOCTYPE_NAME: xo,
ERB_EXPR: Cc,
- IS_ALLOWED_URI: Bo,
+ IS_ALLOWED_URI: To,
IS_SCRIPT_OR_DATA: xc,
MUSTACHE_EXPR: Ec,
TMPLIT_EXPR: Ac
@@ -9092,7 +9122,7 @@ const en = {
} catch {
return console.warn("TrustedTypes policy " + a + " could not be created."), null;
}
-}, Nl = function() {
+}, Ol = function() {
return {
afterSanitizeAttributes: [],
afterSanitizeElements: [],
@@ -9105,9 +9135,9 @@ const en = {
uponSanitizeShadowNode: []
};
};
-function Io() {
+function Bo() {
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ic();
- const e = (I) => Io(I);
+ const e = (I) => Bo(I);
if (e.version = "3.2.6", e.removed = [], !l || !l.document || l.document.nodeType !== en.document || !l.Element)
return e.isSupported = !1, e;
let {
@@ -9123,39 +9153,39 @@ function Io() {
HTMLFormElement: f,
DOMParser: d,
trustedTypes: h
- } = l, m = s.prototype, D = Jt(m, "cloneNode"), v = Jt(m, "remove"), w = Jt(m, "nextSibling"), p = Jt(m, "childNodes"), _ = Jt(m, "parentNode");
+ } = l, p = s.prototype, b = Jt(p, "cloneNode"), v = Jt(p, "remove"), F = Jt(p, "nextSibling"), g = Jt(p, "childNodes"), _ = Jt(p, "parentNode");
if (typeof o == "function") {
const I = t.createElement("template");
I.content && I.content.ownerDocument && (t = I.content.ownerDocument);
}
- let b, y = "";
+ let D, y = "";
const {
implementation: k,
- createNodeIterator: C,
- createDocumentFragment: x,
+ createNodeIterator: $,
+ createDocumentFragment: T,
getElementsByTagName: A
} = t, {
- importNode: O
+ importNode: R
} = n;
- let R = Nl();
- e.isSupported = typeof To == "function" && typeof _ == "function" && k && k.createHTMLDocument !== void 0;
+ let B = Ol();
+ e.isSupported = typeof Ao == "function" && typeof _ == "function" && k && k.createHTMLDocument !== void 0;
const {
MUSTACHE_EXPR: P,
ERB_EXPR: S,
- TMPLIT_EXPR: oe,
- DATA_ATTR: Fe,
- ARIA_ATTR: ue,
- IS_SCRIPT_OR_DATA: Re,
- ATTR_WHITESPACE: J,
- CUSTOM_ELEMENT: B
- } = ql;
+ TMPLIT_EXPR: te,
+ DATA_ATTR: fe,
+ ARIA_ATTR: ce,
+ IS_SCRIPT_OR_DATA: Oe,
+ ATTR_WHITESPACE: Q,
+ CUSTOM_ELEMENT: oe
+ } = Ll;
let {
- IS_ALLOWED_URI: z
- } = ql, F = null;
- const Y = U({}, [...Rl, ...$i, ...Ei, ...Ci, ...Il]);
- let N = null;
- const K = U({}, [...Ll, ...Ai, ...Ol, ...Tn]);
- let $ = Object.seal(xo(null, {
+ IS_ALLOWED_URI: he
+ } = Ll, w = null;
+ const q = G({}, [...xl, ...$i, ...Ei, ...Ci, ...Bl]);
+ let z = null;
+ const H = G({}, [...Rl, ...Ai, ...Il, ...Tn]);
+ let E = Object.seal(So(null, {
tagNameCheck: {
writable: !0,
configurable: !1,
@@ -9174,168 +9204,168 @@ function Io() {
enumerable: !0,
value: !1
}
- })), le = null, $e = null, Ie = !0, de = !0, Le = !1, ct = !0, vt = !1, bt = !0, $t = !1, Xn = !1, Kn = !1, Lt = !1, dn = !1, fn = !1, ia = !0, aa = !1;
- const Lo = "user-content-";
+ })), N = null, le = null, pe = !0, ye = !0, ke = !1, re = !0, qe = !1, bt = !0, $t = !1, Xn = !1, Kn = !1, Lt = !1, dn = !1, fn = !1, ia = !0, aa = !1;
+ const Ro = "user-content-";
let Qn = !0, Vt = !1, Ot = {}, qt = null;
- const la = U({}, ["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"]);
+ const la = G({}, ["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"]);
let oa = null;
- const ra = U({}, ["audio", "video", "img", "source", "image", "track"]);
+ const ra = G({}, ["audio", "video", "img", "source", "image", "track"]);
let Jn = null;
- const sa = U({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), hn = "http://www.w3.org/1998/Math/MathML", pn = "http://www.w3.org/2000/svg", _t = "http://www.w3.org/1999/xhtml";
- let Nt = _t, ei = !1, ti = null;
- const Oo = U({}, [hn, pn, _t], Fi);
- let mn = U({}, ["mi", "mo", "mn", "ms", "mtext"]), gn = U({}, ["annotation-xml"]);
- const qo = U({}, ["title", "style", "font", "a", "script"]);
+ const sa = G({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), hn = "http://www.w3.org/1998/Math/MathML", pn = "http://www.w3.org/2000/svg", dt = "http://www.w3.org/1999/xhtml";
+ let Mt = dt, ei = !1, ti = null;
+ const Io = G({}, [hn, pn, dt], Fi);
+ let mn = G({}, ["mi", "mo", "mn", "ms", "mtext"]), gn = G({}, ["annotation-xml"]);
+ const Lo = G({}, ["title", "style", "font", "a", "script"]);
let jt = null;
- const No = ["application/xhtml+xml", "text/html"], Mo = "text/html";
- let ce = null, Mt = null;
- const zo = t.createElement("form"), ua = function(g) {
- return g instanceof RegExp || g instanceof Function;
+ const Oo = ["application/xhtml+xml", "text/html"], qo = "text/html";
+ let _e = null, Nt = null;
+ const Mo = t.createElement("form"), ua = function(m) {
+ return m instanceof RegExp || m instanceof Function;
}, ni = function() {
- let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
- if (!(Mt && Mt === g)) {
- if ((!g || typeof g != "object") && (g = {}), g = pt(g), jt = // eslint-disable-next-line unicorn/prefer-includes
- No.indexOf(g.PARSER_MEDIA_TYPE) === -1 ? Mo : g.PARSER_MEDIA_TYPE, ce = jt === "application/xhtml+xml" ? Fi : Ln, F = Ze(g, "ALLOWED_TAGS") ? U({}, g.ALLOWED_TAGS, ce) : Y, N = Ze(g, "ALLOWED_ATTR") ? U({}, g.ALLOWED_ATTR, ce) : K, ti = Ze(g, "ALLOWED_NAMESPACES") ? U({}, g.ALLOWED_NAMESPACES, Fi) : Oo, Jn = Ze(g, "ADD_URI_SAFE_ATTR") ? U(pt(sa), g.ADD_URI_SAFE_ATTR, ce) : sa, oa = Ze(g, "ADD_DATA_URI_TAGS") ? U(pt(ra), g.ADD_DATA_URI_TAGS, ce) : ra, qt = Ze(g, "FORBID_CONTENTS") ? U({}, g.FORBID_CONTENTS, ce) : la, le = Ze(g, "FORBID_TAGS") ? U({}, g.FORBID_TAGS, ce) : pt({}), $e = Ze(g, "FORBID_ATTR") ? U({}, g.FORBID_ATTR, ce) : pt({}), Ot = Ze(g, "USE_PROFILES") ? g.USE_PROFILES : !1, Ie = g.ALLOW_ARIA_ATTR !== !1, de = g.ALLOW_DATA_ATTR !== !1, Le = g.ALLOW_UNKNOWN_PROTOCOLS || !1, ct = g.ALLOW_SELF_CLOSE_IN_ATTR !== !1, vt = g.SAFE_FOR_TEMPLATES || !1, bt = g.SAFE_FOR_XML !== !1, $t = g.WHOLE_DOCUMENT || !1, Lt = g.RETURN_DOM || !1, dn = g.RETURN_DOM_FRAGMENT || !1, fn = g.RETURN_TRUSTED_TYPE || !1, Kn = g.FORCE_BODY || !1, ia = g.SANITIZE_DOM !== !1, aa = g.SANITIZE_NAMED_PROPS || !1, Qn = g.KEEP_CONTENT !== !1, Vt = g.IN_PLACE || !1, z = g.ALLOWED_URI_REGEXP || Bo, Nt = g.NAMESPACE || _t, mn = g.MATHML_TEXT_INTEGRATION_POINTS || mn, gn = g.HTML_INTEGRATION_POINTS || gn, $ = g.CUSTOM_ELEMENT_HANDLING || {}, g.CUSTOM_ELEMENT_HANDLING && ua(g.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = g.CUSTOM_ELEMENT_HANDLING.tagNameCheck), g.CUSTOM_ELEMENT_HANDLING && ua(g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), g.CUSTOM_ELEMENT_HANDLING && typeof g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), vt && (de = !1), dn && (Lt = !0), Ot && (F = U({}, Il), N = [], Ot.html === !0 && (U(F, Rl), U(N, Ll)), Ot.svg === !0 && (U(F, $i), U(N, Ai), U(N, Tn)), Ot.svgFilters === !0 && (U(F, Ei), U(N, Ai), U(N, Tn)), Ot.mathMl === !0 && (U(F, Ci), U(N, Ol), U(N, Tn))), g.ADD_TAGS && (F === Y && (F = pt(F)), U(F, g.ADD_TAGS, ce)), g.ADD_ATTR && (N === K && (N = pt(N)), U(N, g.ADD_ATTR, ce)), g.ADD_URI_SAFE_ATTR && U(Jn, g.ADD_URI_SAFE_ATTR, ce), g.FORBID_CONTENTS && (qt === la && (qt = pt(qt)), U(qt, g.FORBID_CONTENTS, ce)), Qn && (F["#text"] = !0), $t && U(F, ["html", "head", "body"]), F.table && (U(F, ["tbody"]), delete le.tbody), g.TRUSTED_TYPES_POLICY) {
- if (typeof g.TRUSTED_TYPES_POLICY.createHTML != "function")
+ let m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ if (!(Nt && Nt === m)) {
+ if ((!m || typeof m != "object") && (m = {}), m = mt(m), jt = // eslint-disable-next-line unicorn/prefer-includes
+ Oo.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? qo : m.PARSER_MEDIA_TYPE, _e = jt === "application/xhtml+xml" ? Fi : Ln, w = Xe(m, "ALLOWED_TAGS") ? G({}, m.ALLOWED_TAGS, _e) : q, z = Xe(m, "ALLOWED_ATTR") ? G({}, m.ALLOWED_ATTR, _e) : H, ti = Xe(m, "ALLOWED_NAMESPACES") ? G({}, m.ALLOWED_NAMESPACES, Fi) : Io, Jn = Xe(m, "ADD_URI_SAFE_ATTR") ? G(mt(sa), m.ADD_URI_SAFE_ATTR, _e) : sa, oa = Xe(m, "ADD_DATA_URI_TAGS") ? G(mt(ra), m.ADD_DATA_URI_TAGS, _e) : ra, qt = Xe(m, "FORBID_CONTENTS") ? G({}, m.FORBID_CONTENTS, _e) : la, N = Xe(m, "FORBID_TAGS") ? G({}, m.FORBID_TAGS, _e) : mt({}), le = Xe(m, "FORBID_ATTR") ? G({}, m.FORBID_ATTR, _e) : mt({}), Ot = Xe(m, "USE_PROFILES") ? m.USE_PROFILES : !1, pe = m.ALLOW_ARIA_ATTR !== !1, ye = m.ALLOW_DATA_ATTR !== !1, ke = m.ALLOW_UNKNOWN_PROTOCOLS || !1, re = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, qe = m.SAFE_FOR_TEMPLATES || !1, bt = m.SAFE_FOR_XML !== !1, $t = m.WHOLE_DOCUMENT || !1, Lt = m.RETURN_DOM || !1, dn = m.RETURN_DOM_FRAGMENT || !1, fn = m.RETURN_TRUSTED_TYPE || !1, Kn = m.FORCE_BODY || !1, ia = m.SANITIZE_DOM !== !1, aa = m.SANITIZE_NAMED_PROPS || !1, Qn = m.KEEP_CONTENT !== !1, Vt = m.IN_PLACE || !1, he = m.ALLOWED_URI_REGEXP || To, Mt = m.NAMESPACE || dt, mn = m.MATHML_TEXT_INTEGRATION_POINTS || mn, gn = m.HTML_INTEGRATION_POINTS || gn, E = m.CUSTOM_ELEMENT_HANDLING || {}, m.CUSTOM_ELEMENT_HANDLING && ua(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (E.tagNameCheck = m.CUSTOM_ELEMENT_HANDLING.tagNameCheck), m.CUSTOM_ELEMENT_HANDLING && ua(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (E.attributeNameCheck = m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), m.CUSTOM_ELEMENT_HANDLING && typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (E.allowCustomizedBuiltInElements = m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), qe && (ye = !1), dn && (Lt = !0), Ot && (w = G({}, Bl), z = [], Ot.html === !0 && (G(w, xl), G(z, Rl)), Ot.svg === !0 && (G(w, $i), G(z, Ai), G(z, Tn)), Ot.svgFilters === !0 && (G(w, Ei), G(z, Ai), G(z, Tn)), Ot.mathMl === !0 && (G(w, Ci), G(z, Il), G(z, Tn))), m.ADD_TAGS && (w === q && (w = mt(w)), G(w, m.ADD_TAGS, _e)), m.ADD_ATTR && (z === H && (z = mt(z)), G(z, m.ADD_ATTR, _e)), m.ADD_URI_SAFE_ATTR && G(Jn, m.ADD_URI_SAFE_ATTR, _e), m.FORBID_CONTENTS && (qt === la && (qt = mt(qt)), G(qt, m.FORBID_CONTENTS, _e)), Qn && (w["#text"] = !0), $t && G(w, ["html", "head", "body"]), w.table && (G(w, ["tbody"]), delete N.tbody), m.TRUSTED_TYPES_POLICY) {
+ if (typeof m.TRUSTED_TYPES_POLICY.createHTML != "function")
throw Qt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
- if (typeof g.TRUSTED_TYPES_POLICY.createScriptURL != "function")
+ if (typeof m.TRUSTED_TYPES_POLICY.createScriptURL != "function")
throw Qt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
- b = g.TRUSTED_TYPES_POLICY, y = b.createHTML("");
+ D = m.TRUSTED_TYPES_POLICY, y = D.createHTML("");
} else
- b === void 0 && (b = Lc(h, i)), b !== null && typeof y == "string" && (y = b.createHTML(""));
- ye && ye(g), Mt = g;
+ D === void 0 && (D = Lc(h, i)), D !== null && typeof y == "string" && (y = D.createHTML(""));
+ Ce && Ce(m), Nt = m;
}
- }, ca = U({}, [...$i, ...Ei, ...Fc]), _a = U({}, [...Ci, ...$c]), Po = function(g) {
- let E = _(g);
- (!E || !E.tagName) && (E = {
- namespaceURI: Nt,
+ }, ca = G({}, [...$i, ...Ei, ...Fc]), _a = G({}, [...Ci, ...$c]), No = function(m) {
+ let C = _(m);
+ (!C || !C.tagName) && (C = {
+ namespaceURI: Mt,
tagName: "template"
});
- const T = Ln(g.tagName), te = Ln(E.tagName);
- return ti[g.namespaceURI] ? g.namespaceURI === pn ? E.namespaceURI === _t ? T === "svg" : E.namespaceURI === hn ? T === "svg" && (te === "annotation-xml" || mn[te]) : !!ca[T] : g.namespaceURI === hn ? E.namespaceURI === _t ? T === "math" : E.namespaceURI === pn ? T === "math" && gn[te] : !!_a[T] : g.namespaceURI === _t ? E.namespaceURI === pn && !gn[te] || E.namespaceURI === hn && !mn[te] ? !1 : !_a[T] && (qo[T] || !ca[T]) : !!(jt === "application/xhtml+xml" && ti[g.namespaceURI]) : !1;
- }, Je = function(g) {
+ const x = Ln(m.tagName), ee = Ln(C.tagName);
+ return ti[m.namespaceURI] ? m.namespaceURI === pn ? C.namespaceURI === dt ? x === "svg" : C.namespaceURI === hn ? x === "svg" && (ee === "annotation-xml" || mn[ee]) : !!ca[x] : m.namespaceURI === hn ? C.namespaceURI === dt ? x === "math" : C.namespaceURI === pn ? x === "math" && gn[ee] : !!_a[x] : m.namespaceURI === dt ? C.namespaceURI === pn && !gn[ee] || C.namespaceURI === hn && !mn[ee] ? !1 : !_a[x] && (Lo[x] || !ca[x]) : !!(jt === "application/xhtml+xml" && ti[m.namespaceURI]) : !1;
+ }, tt = function(m) {
Xt(e.removed, {
- element: g
+ element: m
});
try {
- _(g).removeChild(g);
+ _(m).removeChild(m);
} catch {
- v(g);
+ v(m);
}
- }, zt = function(g, E) {
+ }, Pt = function(m, C) {
try {
Xt(e.removed, {
- attribute: E.getAttributeNode(g),
- from: E
+ attribute: C.getAttributeNode(m),
+ from: C
});
} catch {
Xt(e.removed, {
attribute: null,
- from: E
+ from: C
});
}
- if (E.removeAttribute(g), g === "is")
+ if (C.removeAttribute(m), m === "is")
if (Lt || dn)
try {
- Je(E);
+ tt(C);
} catch {
}
else
try {
- E.setAttribute(g, "");
+ C.setAttribute(m, "");
} catch {
}
- }, da = function(g) {
- let E = null, T = null;
+ }, da = function(m) {
+ let C = null, x = null;
if (Kn)
- g = "" + g;
+ m = "" + m;
else {
- const re = Bl(g, /^[\r\n\t ]+/);
- T = re && re[0];
+ const se = Tl(m, /^[\r\n\t ]+/);
+ x = se && se[0];
}
- jt === "application/xhtml+xml" && Nt === _t && (g = '' + g + "");
- const te = b ? b.createHTML(g) : g;
- if (Nt === _t)
+ jt === "application/xhtml+xml" && Mt === dt && (m = '' + m + "");
+ const ee = D ? D.createHTML(m) : m;
+ if (Mt === dt)
try {
- E = new d().parseFromString(te, jt);
+ C = new d().parseFromString(ee, jt);
} catch {
}
- if (!E || !E.documentElement) {
- E = k.createDocument(Nt, "template", null);
+ if (!C || !C.documentElement) {
+ C = k.createDocument(Mt, "template", null);
try {
- E.documentElement.innerHTML = ei ? y : te;
+ C.documentElement.innerHTML = ei ? y : ee;
} catch {
}
}
- const fe = E.body || E.documentElement;
- return g && T && fe.insertBefore(t.createTextNode(T), fe.childNodes[0] || null), Nt === _t ? A.call(E, $t ? "html" : "body")[0] : $t ? E.documentElement : fe;
- }, fa = function(g) {
- return C.call(
- g.ownerDocument || g,
- g,
+ const me = C.body || C.documentElement;
+ return m && x && me.insertBefore(t.createTextNode(x), me.childNodes[0] || null), Mt === dt ? A.call(C, $t ? "html" : "body")[0] : $t ? C.documentElement : me;
+ }, fa = function(m) {
+ return $.call(
+ m.ownerDocument || m,
+ m,
// eslint-disable-next-line no-bitwise
u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
null
);
- }, ii = function(g) {
- return g instanceof f && (typeof g.nodeName != "string" || typeof g.textContent != "string" || typeof g.removeChild != "function" || !(g.attributes instanceof c) || typeof g.removeAttribute != "function" || typeof g.setAttribute != "function" || typeof g.namespaceURI != "string" || typeof g.insertBefore != "function" || typeof g.hasChildNodes != "function");
- }, ha = function(g) {
- return typeof r == "function" && g instanceof r;
+ }, ii = function(m) {
+ return m instanceof f && (typeof m.nodeName != "string" || typeof m.textContent != "string" || typeof m.removeChild != "function" || !(m.attributes instanceof c) || typeof m.removeAttribute != "function" || typeof m.setAttribute != "function" || typeof m.namespaceURI != "string" || typeof m.insertBefore != "function" || typeof m.hasChildNodes != "function");
+ }, ha = function(m) {
+ return typeof r == "function" && m instanceof r;
};
- function dt(I, g, E) {
- Sn(I, (T) => {
- T.call(e, g, E, Mt);
+ function ft(I, m, C) {
+ Sn(I, (x) => {
+ x.call(e, m, C, Nt);
});
}
- const pa = function(g) {
- let E = null;
- if (dt(R.beforeSanitizeElements, g, null), ii(g))
- return Je(g), !0;
- const T = ce(g.nodeName);
- if (dt(R.uponSanitizeElement, g, {
- tagName: T,
- allowedTags: F
- }), bt && g.hasChildNodes() && !ha(g.firstElementChild) && be(/<[/\w!]/g, g.innerHTML) && be(/<[/\w!]/g, g.textContent) || g.nodeType === en.progressingInstruction || bt && g.nodeType === en.comment && be(/<[/\w]/g, g.data))
- return Je(g), !0;
- if (!F[T] || le[T]) {
- if (!le[T] && ga(T) && ($.tagNameCheck instanceof RegExp && be($.tagNameCheck, T) || $.tagNameCheck instanceof Function && $.tagNameCheck(T)))
+ const pa = function(m) {
+ let C = null;
+ if (ft(B.beforeSanitizeElements, m, null), ii(m))
+ return tt(m), !0;
+ const x = _e(m.nodeName);
+ if (ft(B.uponSanitizeElement, m, {
+ tagName: x,
+ allowedTags: w
+ }), bt && m.hasChildNodes() && !ha(m.firstElementChild) && Fe(/<[/\w!]/g, m.innerHTML) && Fe(/<[/\w!]/g, m.textContent) || m.nodeType === en.progressingInstruction || bt && m.nodeType === en.comment && Fe(/<[/\w]/g, m.data))
+ return tt(m), !0;
+ if (!w[x] || N[x]) {
+ if (!N[x] && ga(x) && (E.tagNameCheck instanceof RegExp && Fe(E.tagNameCheck, x) || E.tagNameCheck instanceof Function && E.tagNameCheck(x)))
return !1;
- if (Qn && !qt[T]) {
- const te = _(g) || g.parentNode, fe = p(g) || g.childNodes;
- if (fe && te) {
- const re = fe.length;
- for (let Ee = re - 1; Ee >= 0; --Ee) {
- const ft = D(fe[Ee], !0);
- ft.__removalCount = (g.__removalCount || 0) + 1, te.insertBefore(ft, w(g));
+ if (Qn && !qt[x]) {
+ const ee = _(m) || m.parentNode, me = g(m) || m.childNodes;
+ if (me && ee) {
+ const se = me.length;
+ for (let Se = se - 1; Se >= 0; --Se) {
+ const ht = b(me[Se], !0);
+ ht.__removalCount = (m.__removalCount || 0) + 1, ee.insertBefore(ht, F(m));
}
}
}
- return Je(g), !0;
- }
- return g instanceof s && !Po(g) || (T === "noscript" || T === "noembed" || T === "noframes") && be(/<\/no(script|embed|frames)/i, g.innerHTML) ? (Je(g), !0) : (vt && g.nodeType === en.text && (E = g.textContent, Sn([P, S, oe], (te) => {
- E = Kt(E, te, " ");
- }), g.textContent !== E && (Xt(e.removed, {
- element: g.cloneNode()
- }), g.textContent = E)), dt(R.afterSanitizeElements, g, null), !1);
- }, ma = function(g, E, T) {
- if (ia && (E === "id" || E === "name") && (T in t || T in zo))
+ return tt(m), !0;
+ }
+ return m instanceof s && !No(m) || (x === "noscript" || x === "noembed" || x === "noframes") && Fe(/<\/no(script|embed|frames)/i, m.innerHTML) ? (tt(m), !0) : (qe && m.nodeType === en.text && (C = m.textContent, Sn([P, S, te], (ee) => {
+ C = Kt(C, ee, " ");
+ }), m.textContent !== C && (Xt(e.removed, {
+ element: m.cloneNode()
+ }), m.textContent = C)), ft(B.afterSanitizeElements, m, null), !1);
+ }, ma = function(m, C, x) {
+ if (ia && (C === "id" || C === "name") && (x in t || x in Mo))
return !1;
- if (!(de && !$e[E] && be(Fe, E))) {
- if (!(Ie && be(ue, E))) {
- if (!N[E] || $e[E]) {
+ if (!(ye && !le[C] && Fe(fe, C))) {
+ if (!(pe && Fe(ce, C))) {
+ if (!z[C] || le[C]) {
if (
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
- !(ga(g) && ($.tagNameCheck instanceof RegExp && be($.tagNameCheck, g) || $.tagNameCheck instanceof Function && $.tagNameCheck(g)) && ($.attributeNameCheck instanceof RegExp && be($.attributeNameCheck, E) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(E)) || // Alternative, second condition checks if it's an `is`-attribute, AND
+ !(ga(m) && (E.tagNameCheck instanceof RegExp && Fe(E.tagNameCheck, m) || E.tagNameCheck instanceof Function && E.tagNameCheck(m)) && (E.attributeNameCheck instanceof RegExp && Fe(E.attributeNameCheck, C) || E.attributeNameCheck instanceof Function && E.attributeNameCheck(C)) || // Alternative, second condition checks if it's an `is`-attribute, AND
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
- E === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && be($.tagNameCheck, T) || $.tagNameCheck instanceof Function && $.tagNameCheck(T)))
+ C === "is" && E.allowCustomizedBuiltInElements && (E.tagNameCheck instanceof RegExp && Fe(E.tagNameCheck, x) || E.tagNameCheck instanceof Function && E.tagNameCheck(x)))
) return !1;
- } else if (!Jn[E]) {
- if (!be(z, Kt(T, J, ""))) {
- if (!((E === "src" || E === "xlink:href" || E === "href") && g !== "script" && Dc(T, "data:") === 0 && oa[g])) {
- if (!(Le && !be(Re, Kt(T, J, "")))) {
- if (T)
+ } else if (!Jn[C]) {
+ if (!Fe(he, Kt(x, Q, ""))) {
+ if (!((C === "src" || C === "xlink:href" || C === "href") && m !== "script" && Dc(x, "data:") === 0 && oa[m])) {
+ if (!(ke && !Fe(Oe, Kt(x, Q, "")))) {
+ if (x)
return !1;
}
}
@@ -9344,80 +9374,80 @@ function Io() {
}
}
return !0;
- }, ga = function(g) {
- return g !== "annotation-xml" && Bl(g, B);
- }, va = function(g) {
- dt(R.beforeSanitizeAttributes, g, null);
+ }, ga = function(m) {
+ return m !== "annotation-xml" && Tl(m, oe);
+ }, va = function(m) {
+ ft(B.beforeSanitizeAttributes, m, null);
const {
- attributes: E
- } = g;
- if (!E || ii(g))
+ attributes: C
+ } = m;
+ if (!C || ii(m))
return;
- const T = {
+ const x = {
attrName: "",
attrValue: "",
keepAttr: !0,
- allowedAttributes: N,
+ allowedAttributes: z,
forceKeepAttr: void 0
};
- let te = E.length;
- for (; te--; ) {
- const fe = E[te], {
- name: re,
- namespaceURI: Ee,
- value: ft
- } = fe, Wt = ce(re), ai = ft;
- let he = re === "value" ? ai : wc(ai);
- if (T.attrName = Wt, T.attrValue = he, T.keepAttr = !0, T.forceKeepAttr = void 0, dt(R.uponSanitizeAttribute, g, T), he = T.attrValue, aa && (Wt === "id" || Wt === "name") && (zt(re, g), he = Lo + he), bt && be(/((--!?|])>)|<\/(style|title)/i, he)) {
- zt(re, g);
+ let ee = C.length;
+ for (; ee--; ) {
+ const me = C[ee], {
+ name: se,
+ namespaceURI: Se,
+ value: ht
+ } = me, Wt = _e(se), ai = ht;
+ let ge = se === "value" ? ai : wc(ai);
+ if (x.attrName = Wt, x.attrValue = ge, x.keepAttr = !0, x.forceKeepAttr = void 0, ft(B.uponSanitizeAttribute, m, x), ge = x.attrValue, aa && (Wt === "id" || Wt === "name") && (Pt(se, m), ge = Ro + ge), bt && Fe(/((--!?|])>)|<\/(style|title)/i, ge)) {
+ Pt(se, m);
continue;
}
- if (T.forceKeepAttr)
+ if (x.forceKeepAttr)
continue;
- if (!T.keepAttr) {
- zt(re, g);
+ if (!x.keepAttr) {
+ Pt(se, m);
continue;
}
- if (!ct && be(/\/>/i, he)) {
- zt(re, g);
+ if (!re && Fe(/\/>/i, ge)) {
+ Pt(se, m);
continue;
}
- vt && Sn([P, S, oe], (Da) => {
- he = Kt(he, Da, " ");
+ qe && Sn([P, S, te], (Da) => {
+ ge = Kt(ge, Da, " ");
});
- const ba = ce(g.nodeName);
- if (!ma(ba, Wt, he)) {
- zt(re, g);
+ const ba = _e(m.nodeName);
+ if (!ma(ba, Wt, ge)) {
+ Pt(se, m);
continue;
}
- if (b && typeof h == "object" && typeof h.getAttributeType == "function" && !Ee)
+ if (D && typeof h == "object" && typeof h.getAttributeType == "function" && !Se)
switch (h.getAttributeType(ba, Wt)) {
case "TrustedHTML": {
- he = b.createHTML(he);
+ ge = D.createHTML(ge);
break;
}
case "TrustedScriptURL": {
- he = b.createScriptURL(he);
+ ge = D.createScriptURL(ge);
break;
}
}
- if (he !== ai)
+ if (ge !== ai)
try {
- Ee ? g.setAttributeNS(Ee, re, he) : g.setAttribute(re, he), ii(g) ? Je(g) : xl(e.removed);
+ Se ? m.setAttributeNS(Se, se, ge) : m.setAttribute(se, ge), ii(m) ? tt(m) : Sl(e.removed);
} catch {
- zt(re, g);
+ Pt(se, m);
}
}
- dt(R.afterSanitizeAttributes, g, null);
- }, Ho = function I(g) {
- let E = null;
- const T = fa(g);
- for (dt(R.beforeSanitizeShadowDOM, g, null); E = T.nextNode(); )
- dt(R.uponSanitizeShadowNode, E, null), pa(E), va(E), E.content instanceof a && I(E.content);
- dt(R.afterSanitizeShadowDOM, g, null);
+ ft(B.afterSanitizeAttributes, m, null);
+ }, Po = function I(m) {
+ let C = null;
+ const x = fa(m);
+ for (ft(B.beforeSanitizeShadowDOM, m, null); C = x.nextNode(); )
+ ft(B.uponSanitizeShadowNode, C, null), pa(C), va(C), C.content instanceof a && I(C.content);
+ ft(B.afterSanitizeShadowDOM, m, null);
};
return e.sanitize = function(I) {
- let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, E = null, T = null, te = null, fe = null;
+ let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, C = null, x = null, ee = null, me = null;
if (ei = !I, ei && (I = ""), typeof I != "string" && !ha(I))
if (typeof I.toString == "function") {
if (I = I.toString(), typeof I != "string")
@@ -9426,64 +9456,64 @@ function Io() {
throw Qt("toString is not a function");
if (!e.isSupported)
return I;
- if (Xn || ni(g), e.removed = [], typeof I == "string" && (Vt = !1), Vt) {
+ if (Xn || ni(m), e.removed = [], typeof I == "string" && (Vt = !1), Vt) {
if (I.nodeName) {
- const ft = ce(I.nodeName);
- if (!F[ft] || le[ft])
+ const ht = _e(I.nodeName);
+ if (!w[ht] || N[ht])
throw Qt("root node is forbidden and cannot be sanitized in-place");
}
} else if (I instanceof r)
- E = da(""), T = E.ownerDocument.importNode(I, !0), T.nodeType === en.element && T.nodeName === "BODY" || T.nodeName === "HTML" ? E = T : E.appendChild(T);
+ C = da(""), x = C.ownerDocument.importNode(I, !0), x.nodeType === en.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? C = x : C.appendChild(x);
else {
- if (!Lt && !vt && !$t && // eslint-disable-next-line unicorn/prefer-includes
+ if (!Lt && !qe && !$t && // eslint-disable-next-line unicorn/prefer-includes
I.indexOf("<") === -1)
- return b && fn ? b.createHTML(I) : I;
- if (E = da(I), !E)
+ return D && fn ? D.createHTML(I) : I;
+ if (C = da(I), !C)
return Lt ? null : fn ? y : "";
}
- E && Kn && Je(E.firstChild);
- const re = fa(Vt ? I : E);
- for (; te = re.nextNode(); )
- pa(te), va(te), te.content instanceof a && Ho(te.content);
+ C && Kn && tt(C.firstChild);
+ const se = fa(Vt ? I : C);
+ for (; ee = se.nextNode(); )
+ pa(ee), va(ee), ee.content instanceof a && Po(ee.content);
if (Vt)
return I;
if (Lt) {
if (dn)
- for (fe = x.call(E.ownerDocument); E.firstChild; )
- fe.appendChild(E.firstChild);
+ for (me = T.call(C.ownerDocument); C.firstChild; )
+ me.appendChild(C.firstChild);
else
- fe = E;
- return (N.shadowroot || N.shadowrootmode) && (fe = O.call(n, fe, !0)), fe;
- }
- let Ee = $t ? E.outerHTML : E.innerHTML;
- return $t && F["!doctype"] && E.ownerDocument && E.ownerDocument.doctype && E.ownerDocument.doctype.name && be(Ro, E.ownerDocument.doctype.name) && (Ee = "
-` + Ee), vt && Sn([P, S, oe], (ft) => {
- Ee = Kt(Ee, ft, " ");
- }), b && fn ? b.createHTML(Ee) : Ee;
+ me = C;
+ return (z.shadowroot || z.shadowrootmode) && (me = R.call(n, me, !0)), me;
+ }
+ let Se = $t ? C.outerHTML : C.innerHTML;
+ return $t && w["!doctype"] && C.ownerDocument && C.ownerDocument.doctype && C.ownerDocument.doctype.name && Fe(xo, C.ownerDocument.doctype.name) && (Se = "
+` + Se), qe && Sn([P, S, te], (ht) => {
+ Se = Kt(Se, ht, " ");
+ }), D && fn ? D.createHTML(Se) : Se;
}, e.setConfig = function() {
let I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
ni(I), Xn = !0;
}, e.clearConfig = function() {
- Mt = null, Xn = !1;
- }, e.isValidAttribute = function(I, g, E) {
- Mt || ni({});
- const T = ce(I), te = ce(g);
- return ma(T, te, E);
- }, e.addHook = function(I, g) {
- typeof g == "function" && Xt(R[I], g);
- }, e.removeHook = function(I, g) {
- if (g !== void 0) {
- const E = vc(R[I], g);
- return E === -1 ? void 0 : bc(R[I], E, 1)[0];
- }
- return xl(R[I]);
+ Nt = null, Xn = !1;
+ }, e.isValidAttribute = function(I, m, C) {
+ Nt || ni({});
+ const x = _e(I), ee = _e(m);
+ return ma(x, ee, C);
+ }, e.addHook = function(I, m) {
+ typeof m == "function" && Xt(B[I], m);
+ }, e.removeHook = function(I, m) {
+ if (m !== void 0) {
+ const C = vc(B[I], m);
+ return C === -1 ? void 0 : bc(B[I], C, 1)[0];
+ }
+ return Sl(B[I]);
}, e.removeHooks = function(I) {
- R[I] = [];
+ B[I] = [];
}, e.removeAllHooks = function() {
- R = Nl();
+ B = Ol();
}, e;
}
-Io();
+Bo();
const {
HtmlTagHydration: G$,
SvelteComponent: V$,
@@ -9532,10 +9562,10 @@ const {
create_animation: LE,
create_component: OE,
destroy_component: qE,
- detach: NE,
- element: ME,
- ensure_array_like: zE,
- fix_and_outro_and_destroy_block: PE,
+ detach: ME,
+ element: NE,
+ ensure_array_like: PE,
+ fix_and_outro_and_destroy_block: zE,
fix_position: HE,
group_outros: UE,
init: GE,
@@ -9566,27 +9596,27 @@ const {
assign: qc,
check_outros: Hi,
claim_component: xt,
- claim_space: Ml,
+ claim_space: ql,
create_component: Bt,
destroy_component: Rt,
detach: On,
empty: jn,
- get_spread_object: Nc,
- get_spread_update: Mc,
+ get_spread_object: Mc,
+ get_spread_update: Nc,
group_outros: Ui,
- init: zc,
+ init: Pc,
insert_hydration: qn,
mount_component: It,
- safe_not_equal: Pc,
- space: zl,
- transition_in: Ce,
- transition_out: Be
+ safe_not_equal: zc,
+ space: Ml,
+ transition_in: Te,
+ transition_out: Le
} = window.__gradio__svelte__internal;
-function Pl(l) {
+function Nl(l) {
let e, t;
return e = new Qs({
props: {
- Icon: ao,
+ Icon: no,
label: (
/*label*/
l[11]
@@ -9628,10 +9658,10 @@ function Pl(l) {
n[16]), e.$set(a);
},
i(n) {
- t || (Ce(e.$$.fragment, n), t = !0);
+ t || (Te(e.$$.fragment, n), t = !0);
},
o(n) {
- Be(e.$$.fragment, n), t = !1;
+ Le(e.$$.fragment, n), t = !1;
},
d(n) {
Rt(e, n);
@@ -9661,10 +9691,10 @@ function Hc(l) {
67108864 && (a.$$scope = { dirty: i, ctx: n }), e.$set(a);
},
i(n) {
- t || (Ce(e.$$.fragment, n), t = !0);
+ t || (Te(e.$$.fragment, n), t = !0);
},
o(n) {
- Be(e.$$.fragment, n), t = !1;
+ Le(e.$$.fragment, n), t = !1;
},
d(n) {
Rt(e, n);
@@ -9692,15 +9722,15 @@ function Uc(l) {
},
p(s, u) {
let c = e;
- e = r(s), e === c ? o[e].p(s, u) : (Ui(), Be(o[c], 1, 1, () => {
+ e = r(s), e === c ? o[e].p(s, u) : (Ui(), Le(o[c], 1, 1, () => {
o[c] = null;
- }), Hi(), t = o[e], t ? t.p(s, u) : (t = o[e] = a[e](s), t.c()), Ce(t, 1), t.m(n.parentNode, n));
+ }), Hi(), t = o[e], t ? t.p(s, u) : (t = o[e] = a[e](s), t.c()), Te(t, 1), t.m(n.parentNode, n));
},
i(s) {
- i || (Ce(t), i = !0);
+ i || (Te(t), i = !0);
},
o(s) {
- Be(t), i = !1;
+ Le(t), i = !1;
},
d(s) {
s && On(n), o[e].d(s);
@@ -9709,7 +9739,7 @@ function Uc(l) {
}
function Gc(l) {
let e, t;
- return e = new ao({}), {
+ return e = new no({}), {
c() {
Bt(e.$$.fragment);
},
@@ -9720,10 +9750,10 @@ function Gc(l) {
It(e, n, i), t = !0;
},
i(n) {
- t || (Ce(e.$$.fragment, n), t = !0);
+ t || (Te(e.$$.fragment, n), t = !0);
},
o(n) {
- Be(e.$$.fragment, n), t = !1;
+ Le(e.$$.fragment, n), t = !1;
},
d(n) {
Rt(e, n);
@@ -9732,7 +9762,7 @@ function Gc(l) {
}
function Vc(l) {
let e, t;
- return e = new Lr({
+ return e = new Ir({
props: {
markdown_content: (
/*value*/
@@ -9778,10 +9808,10 @@ function Vc(l) {
n[6]), e.$set(a);
},
i(n) {
- t || (Ce(e.$$.fragment, n), t = !0);
+ t || (Te(e.$$.fragment, n), t = !0);
},
o(n) {
- Be(e.$$.fragment, n), t = !1;
+ Le(e.$$.fragment, n), t = !1;
},
d(n) {
Rt(e, n);
@@ -9876,10 +9906,10 @@ function jc(l) {
n[10]), e.$set(a);
},
i(n) {
- t || (Ce(e.$$.fragment, n), t = !0);
+ t || (Te(e.$$.fragment, n), t = !0);
},
o(n) {
- Be(e.$$.fragment, n), t = !1;
+ Le(e.$$.fragment, n), t = !1;
},
d(n) {
Rt(e, n);
@@ -9901,8 +9931,8 @@ function Wc(l) {
l[17]
];
let u = {};
- for (let m = 0; m < s.length; m += 1)
- u = qc(u, s[m]);
+ for (let p = 0; p < s.length; p += 1)
+ u = qc(u, s[p]);
e = new hc({ props: u }), e.$on(
"clear_status",
/*clear_status_handler*/
@@ -9911,64 +9941,64 @@ function Wc(l) {
let c = (
/*label*/
l[11] && /*show_label*/
- l[15] && Pl(l)
+ l[15] && Nl(l)
);
const f = [Uc, Hc], d = [];
- function h(m, D) {
+ function h(p, b) {
return (
/*value*/
- m[0] && /*value*/
- m[0].markdown_content ? 0 : 1
+ p[0] && /*value*/
+ p[0].markdown_content ? 0 : 1
);
}
return i = h(l), a = d[i] = f[i](l), {
c() {
- Bt(e.$$.fragment), t = zl(), c && c.c(), n = zl(), a.c(), o = jn();
+ Bt(e.$$.fragment), t = Ml(), c && c.c(), n = Ml(), a.c(), o = jn();
},
- l(m) {
- xt(e.$$.fragment, m), t = Ml(m), c && c.l(m), n = Ml(m), a.l(m), o = jn();
+ l(p) {
+ xt(e.$$.fragment, p), t = ql(p), c && c.l(p), n = ql(p), a.l(p), o = jn();
},
- m(m, D) {
- It(e, m, D), qn(m, t, D), c && c.m(m, D), qn(m, n, D), d[i].m(m, D), qn(m, o, D), r = !0;
+ m(p, b) {
+ It(e, p, b), qn(p, t, b), c && c.m(p, b), qn(p, n, b), d[i].m(p, b), qn(p, o, b), r = !0;
},
- p(m, D) {
- const v = D & /*gradio, loading_status*/
- 131074 ? Mc(s, [
- D & /*gradio*/
+ p(p, b) {
+ const v = b & /*gradio, loading_status*/
+ 131074 ? Nc(s, [
+ b & /*gradio*/
2 && { autoscroll: (
/*gradio*/
- m[1].autoscroll
+ p[1].autoscroll
) },
- D & /*gradio*/
+ b & /*gradio*/
2 && { i18n: (
/*gradio*/
- m[1].i18n
+ p[1].i18n
) },
- D & /*loading_status*/
- 131072 && Nc(
+ b & /*loading_status*/
+ 131072 && Mc(
/*loading_status*/
- m[17]
+ p[17]
)
]) : {};
e.$set(v), /*label*/
- m[11] && /*show_label*/
- m[15] ? c ? (c.p(m, D), D & /*label, show_label*/
- 34816 && Ce(c, 1)) : (c = Pl(m), c.c(), Ce(c, 1), c.m(n.parentNode, n)) : c && (Ui(), Be(c, 1, 1, () => {
+ p[11] && /*show_label*/
+ p[15] ? c ? (c.p(p, b), b & /*label, show_label*/
+ 34816 && Te(c, 1)) : (c = Nl(p), c.c(), Te(c, 1), c.m(n.parentNode, n)) : c && (Ui(), Le(c, 1, 1, () => {
c = null;
}), Hi());
- let w = i;
- i = h(m), i === w ? d[i].p(m, D) : (Ui(), Be(d[w], 1, 1, () => {
- d[w] = null;
- }), Hi(), a = d[i], a ? a.p(m, D) : (a = d[i] = f[i](m), a.c()), Ce(a, 1), a.m(o.parentNode, o));
+ let F = i;
+ i = h(p), i === F ? d[i].p(p, b) : (Ui(), Le(d[F], 1, 1, () => {
+ d[F] = null;
+ }), Hi(), a = d[i], a ? a.p(p, b) : (a = d[i] = f[i](p), a.c()), Te(a, 1), a.m(o.parentNode, o));
},
- i(m) {
- r || (Ce(e.$$.fragment, m), Ce(c), Ce(a), r = !0);
+ i(p) {
+ r || (Te(e.$$.fragment, p), Te(c), Te(a), r = !0);
},
- o(m) {
- Be(e.$$.fragment, m), Be(c), Be(a), r = !1;
+ o(p) {
+ Le(e.$$.fragment, p), Le(c), Le(a), r = !1;
},
- d(m) {
- m && (On(t), On(n), On(o)), Rt(e, m), c && c.d(m), d[i].d(m);
+ d(p) {
+ p && (On(t), On(n), On(o)), Rt(e, p), c && c.d(p), d[i].d(p);
}
};
}
@@ -10040,10 +10070,10 @@ function Zc(l) {
67346403 && (a.$$scope = { dirty: i, ctx: n }), e.$set(a);
},
i(n) {
- t || (Ce(e.$$.fragment, n), t = !0);
+ t || (Te(e.$$.fragment, n), t = !0);
},
o(n) {
- Be(e.$$.fragment, n), t = !1;
+ Le(e.$$.fragment, n), t = !1;
},
d(n) {
Rt(e, n);
@@ -10051,14 +10081,14 @@ function Zc(l) {
};
}
function Yc(l, e, t) {
- let { gradio: n } = e, { elem_id: i = "" } = e, { elem_classes: a = [] } = e, { visible: o = !0 } = e, { value: r = null } = e, s, { show_side_panel: u = !0 } = e, { panel_width: c = "300px" } = e, { edit_mode: f = "split" } = e, { show_preview: d = !0 } = e, { markdown_editor: h = "textarea" } = e, { interactive: m = !1 } = e, { label: D = n.i18n("markdown_label.markdown_label") } = e, { container: v = !0 } = e, { scale: w = null } = e, { min_width: p = void 0 } = e, { show_label: _ = !0 } = e, { rtl: b = !1 } = e, { loading_status: y } = e;
- const k = () => n.dispatch("clear_status", y), C = ({ detail: S }) => n.dispatch("select", S), x = ({ detail: S }) => {
+ let { gradio: n } = e, { elem_id: i = "" } = e, { elem_classes: a = [] } = e, { visible: o = !0 } = e, { value: r = null } = e, s, { show_side_panel: u = !0 } = e, { panel_width: c = "300px" } = e, { edit_mode: f = "split" } = e, { show_preview: d = !0 } = e, { markdown_editor: h = "textarea" } = e, { interactive: p = !1 } = e, { label: b = n.i18n("markdown_label.markdown_label") } = e, { container: v = !0 } = e, { scale: F = null } = e, { min_width: g = void 0 } = e, { show_label: _ = !0 } = e, { rtl: D = !1 } = e, { loading_status: y } = e;
+ const k = () => n.dispatch("clear_status", y), $ = ({ detail: S }) => n.dispatch("select", S), T = ({ detail: S }) => {
t(0, r = S), n.dispatch("change");
- }, A = ({ detail: S }) => n.dispatch("edit", S), O = ({ detail: S }) => {
+ }, A = ({ detail: S }) => n.dispatch("edit", S), R = ({ detail: S }) => {
t(0, r = S), n.dispatch("submit", S);
- }, R = ({ detail: S }) => n.dispatch("clear", S), P = ({ detail: S }) => n.dispatch("select", S);
+ }, B = ({ detail: S }) => n.dispatch("clear", S), P = ({ detail: S }) => n.dispatch("select", S);
return l.$$set = (S) => {
- "gradio" in S && t(1, n = S.gradio), "elem_id" in S && t(2, i = S.elem_id), "elem_classes" in S && t(3, a = S.elem_classes), "visible" in S && t(4, o = S.visible), "value" in S && t(0, r = S.value), "show_side_panel" in S && t(5, u = S.show_side_panel), "panel_width" in S && t(6, c = S.panel_width), "edit_mode" in S && t(7, f = S.edit_mode), "show_preview" in S && t(8, d = S.show_preview), "markdown_editor" in S && t(9, h = S.markdown_editor), "interactive" in S && t(10, m = S.interactive), "label" in S && t(11, D = S.label), "container" in S && t(12, v = S.container), "scale" in S && t(13, w = S.scale), "min_width" in S && t(14, p = S.min_width), "show_label" in S && t(15, _ = S.show_label), "rtl" in S && t(16, b = S.rtl), "loading_status" in S && t(17, y = S.loading_status);
+ "gradio" in S && t(1, n = S.gradio), "elem_id" in S && t(2, i = S.elem_id), "elem_classes" in S && t(3, a = S.elem_classes), "visible" in S && t(4, o = S.visible), "value" in S && t(0, r = S.value), "show_side_panel" in S && t(5, u = S.show_side_panel), "panel_width" in S && t(6, c = S.panel_width), "edit_mode" in S && t(7, f = S.edit_mode), "show_preview" in S && t(8, d = S.show_preview), "markdown_editor" in S && t(9, h = S.markdown_editor), "interactive" in S && t(10, p = S.interactive), "label" in S && t(11, b = S.label), "container" in S && t(12, v = S.container), "scale" in S && t(13, F = S.scale), "min_width" in S && t(14, g = S.min_width), "show_label" in S && t(15, _ = S.show_label), "rtl" in S && t(16, D = S.rtl), "loading_status" in S && t(17, y = S.loading_status);
}, l.$$.update = () => {
l.$$.dirty & /*value, old_value, gradio*/
262147 && r !== s && (t(18, s = r), n.dispatch("change"));
@@ -10073,27 +10103,27 @@ function Yc(l, e, t) {
f,
d,
h,
- m,
- D,
- v,
- w,
p,
- _,
b,
+ v,
+ F,
+ g,
+ _,
+ D,
y,
s,
k,
- C,
- x,
+ $,
+ T,
A,
- O,
R,
+ B,
P
];
}
class dC extends Oc {
constructor(e) {
- super(), zc(this, e, Yc, Zc, Pc, {
+ super(), Pc(this, e, Yc, Zc, zc, {
gradio: 1,
elem_id: 2,
elem_classes: 3,
@@ -10117,6 +10147,6 @@ class dC extends Oc {
}
export {
cs as BaseEditableMarkdownRenderer,
- Lr as BaseMarkdownRenderer,
+ Ir as BaseMarkdownRenderer,
dC as default
};