diff --git "a/src/backend/gradio_highlightedtextbox/templates/component/index.js" "b/src/backend/gradio_highlightedtextbox/templates/component/index.js"
--- "a/src/backend/gradio_highlightedtextbox/templates/component/index.js"
+++ "b/src/backend/gradio_highlightedtextbox/templates/component/index.js"
@@ -1,137 +1,137 @@
const {
- SvelteComponent: yl,
- append: se,
- attr: U,
- create_slot: Cl,
- destroy_each: ql,
+ SvelteComponent: qn,
+ append: re,
+ attr: K,
+ create_slot: kn,
+ destroy_each: Sn,
detach: fe,
- element: de,
- empty: Sl,
+ element: ge,
+ empty: yn,
ensure_array_like: lt,
- get_all_dirty_from_scope: Tl,
- get_slot_changes: Ll,
- init: jl,
- insert: _e,
- safe_not_equal: Fl,
- set_data: Ke,
- space: Me,
- text: Qe,
+ get_all_dirty_from_scope: Ln,
+ get_slot_changes: Mn,
+ init: jn,
+ insert: ce,
+ safe_not_equal: Tn,
+ set_data: Qe,
+ space: Ne,
+ text: xe,
toggle_class: V,
- transition_in: Hl,
- transition_out: Ml,
- update_slot_base: Nl
+ transition_in: Fn,
+ transition_out: Hn,
+ update_slot_base: Nn
} = window.__gradio__svelte__internal;
-function nt(l, e, t) {
- const n = l.slice();
- return n[8] = e[t][0], n[9] = e[t][1], n[11] = t, n;
+function it(n, e, t) {
+ const o = n.slice();
+ return o[8] = e[t][0], o[9] = e[t][1], o[11] = t, o;
}
-function it(l) {
- let e, t, n, i, o, s, f = lt(Object.entries(
+function st(n) {
+ let e, t, o, l, i, s, _ = lt(Object.entries(
/*_color_map*/
- l[4]
- )), a = [];
- for (let _ = 0; _ < f.length; _ += 1)
- a[_] = ot(nt(l, f, _));
+ n[4]
+ )), r = [];
+ for (let a = 0; a < _.length; a += 1)
+ r[a] = at(it(n, _, a));
return {
c() {
- e = de("span"), e.textContent = "·", t = Me(), n = de("div"), i = de("span"), o = Qe(
+ e = ge("span"), e.textContent = "·", t = Ne(), o = ge("div"), l = ge("span"), i = xe(
/*legend_label*/
- l[3]
- ), s = Me();
- for (let _ = 0; _ < a.length; _ += 1)
- a[_].c();
- U(e, "class", "legend-separator svelte-vm3q5z"), V(e, "hide", !/*show_legend*/
- l[1] || !/*show_label*/
- l[0]), V(
+ n[3]
+ ), s = Ne();
+ for (let a = 0; a < r.length; a += 1)
+ r[a].c();
+ K(e, "class", "legend-separator svelte-vm3q5z"), V(e, "hide", !/*show_legend*/
+ n[1] || !/*show_label*/
+ n[0]), V(
e,
"has-info",
/*info*/
- l[5] != null
- ), U(i, "class", "svelte-vm3q5z"), V(i, "hide", !/*show_legend_label*/
- l[2]), V(
- i,
+ n[5] != null
+ ), K(l, "class", "svelte-vm3q5z"), V(l, "hide", !/*show_legend_label*/
+ n[2]), V(
+ l,
"has-info",
/*info*/
- l[5] != null
- ), U(n, "class", "category-legend svelte-vm3q5z"), U(n, "data-testid", "highlighted-text:category-legend"), V(n, "hide", !/*show_legend*/
- l[1]);
+ n[5] != null
+ ), K(o, "class", "category-legend svelte-vm3q5z"), K(o, "data-testid", "highlighted-text:category-legend"), V(o, "hide", !/*show_legend*/
+ n[1]);
},
- m(_, r) {
- _e(_, e, r), _e(_, t, r), _e(_, n, r), se(n, i), se(i, o), se(n, s);
- for (let u = 0; u < a.length; u += 1)
- a[u] && a[u].m(n, null);
+ m(a, f) {
+ ce(a, e, f), ce(a, t, f), ce(a, o, f), re(o, l), re(l, i), re(o, s);
+ for (let c = 0; c < r.length; c += 1)
+ r[c] && r[c].m(o, null);
},
- p(_, r) {
- if (r & /*show_legend, show_label*/
+ p(a, f) {
+ if (f & /*show_legend, show_label*/
3 && V(e, "hide", !/*show_legend*/
- _[1] || !/*show_label*/
- _[0]), r & /*info*/
+ a[1] || !/*show_label*/
+ a[0]), f & /*info*/
32 && V(
e,
"has-info",
/*info*/
- _[5] != null
- ), r & /*legend_label*/
- 8 && Ke(
- o,
+ a[5] != null
+ ), f & /*legend_label*/
+ 8 && Qe(
+ i,
/*legend_label*/
- _[3]
- ), r & /*show_legend_label*/
- 4 && V(i, "hide", !/*show_legend_label*/
- _[2]), r & /*info*/
+ a[3]
+ ), f & /*show_legend_label*/
+ 4 && V(l, "hide", !/*show_legend_label*/
+ a[2]), f & /*info*/
32 && V(
- i,
+ l,
"has-info",
/*info*/
- _[5] != null
- ), r & /*Object, _color_map, info*/
+ a[5] != null
+ ), f & /*Object, _color_map, info*/
48) {
- f = lt(Object.entries(
+ _ = lt(Object.entries(
/*_color_map*/
- _[4]
+ a[4]
));
- let u;
- for (u = 0; u < f.length; u += 1) {
- const c = nt(_, f, u);
- a[u] ? a[u].p(c, r) : (a[u] = ot(c), a[u].c(), a[u].m(n, null));
+ let c;
+ for (c = 0; c < _.length; c += 1) {
+ const u = it(a, _, c);
+ r[c] ? r[c].p(u, f) : (r[c] = at(u), r[c].c(), r[c].m(o, null));
}
- for (; u < a.length; u += 1)
- a[u].d(1);
- a.length = f.length;
+ for (; c < r.length; c += 1)
+ r[c].d(1);
+ r.length = _.length;
}
- r & /*show_legend*/
- 2 && V(n, "hide", !/*show_legend*/
- _[1]);
+ f & /*show_legend*/
+ 2 && V(o, "hide", !/*show_legend*/
+ a[1]);
},
- d(_) {
- _ && (fe(e), fe(t), fe(n)), ql(a, _);
+ d(a) {
+ a && (fe(e), fe(t), fe(o)), Sn(r, a);
}
};
}
-function ot(l) {
+function at(n) {
let e, t = (
/*category*/
- l[8] + ""
- ), n, i, o;
+ n[8] + ""
+ ), o, l, i;
return {
c() {
- e = de("div"), n = Qe(t), i = Me(), U(e, "class", "category-label svelte-vm3q5z"), U(e, "style", o = "background-color:" + /*color*/
- l[9].secondary), V(
+ e = ge("div"), o = xe(t), l = Ne(), K(e, "class", "category-label svelte-vm3q5z"), K(e, "style", i = "background-color:" + /*color*/
+ n[9].secondary), V(
e,
"has-info",
/*info*/
- l[5] != null
+ n[5] != null
);
},
- m(s, f) {
- _e(s, e, f), se(e, n), se(e, i);
+ m(s, _) {
+ ce(s, e, _), re(e, o), re(e, l);
},
- p(s, f) {
- f & /*_color_map*/
+ p(s, _) {
+ _ & /*_color_map*/
16 && t !== (t = /*category*/
- s[8] + "") && Ke(n, t), f & /*_color_map*/
- 16 && o !== (o = "background-color:" + /*color*/
- s[9].secondary) && U(e, "style", o), f & /*info*/
+ s[8] + "") && Qe(o, t), _ & /*_color_map*/
+ 16 && i !== (i = "background-color:" + /*color*/
+ s[9].secondary) && K(e, "style", i), _ & /*info*/
32 && V(
e,
"has-info",
@@ -144,129 +144,129 @@ function ot(l) {
}
};
}
-function st(l) {
+function _t(n) {
let e, t;
return {
c() {
- e = de("div"), t = Qe(
+ e = ge("div"), t = xe(
/*info*/
- l[5]
- ), U(e, "class", "title-with-highlights-info svelte-vm3q5z");
+ n[5]
+ ), K(e, "class", "title-with-highlights-info svelte-vm3q5z");
},
- m(n, i) {
- _e(n, e, i), se(e, t);
+ m(o, l) {
+ ce(o, e, l), re(e, t);
},
- p(n, i) {
- i & /*info*/
- 32 && Ke(
+ p(o, l) {
+ l & /*info*/
+ 32 && Qe(
t,
/*info*/
- n[5]
+ o[5]
);
},
- d(n) {
- n && fe(e);
+ d(o) {
+ o && fe(e);
}
};
}
-function Vl(l) {
- let e, t, n, i = Object.keys(
+function Vn(n) {
+ let e, t, o, l = Object.keys(
/*_color_map*/
- l[4]
- ).length !== 0, o, s, f;
- const a = (
+ n[4]
+ ).length !== 0, i, s, _;
+ const r = (
/*#slots*/
- l[7].default
- ), _ = Cl(
- a,
- l,
+ n[7].default
+ ), a = kn(
+ r,
+ n,
/*$$scope*/
- l[6],
+ n[6],
null
);
- let r = i && it(l), u = (
+ let f = l && st(n), c = (
/*info*/
- l[5] && st(l)
+ n[5] && _t(n)
);
return {
c() {
- e = de("div"), t = de("span"), _ && _.c(), n = Me(), r && r.c(), o = Me(), u && u.c(), s = Sl(), U(t, "data-testid", "block-info"), U(t, "class", "svelte-vm3q5z"), V(t, "sr-only", !/*show_label*/
- l[0]), V(t, "hide", !/*show_label*/
- l[0]), V(
+ e = ge("div"), t = ge("span"), a && a.c(), o = Ne(), f && f.c(), i = Ne(), c && c.c(), s = yn(), K(t, "data-testid", "block-info"), K(t, "class", "svelte-vm3q5z"), V(t, "sr-only", !/*show_label*/
+ n[0]), V(t, "hide", !/*show_label*/
+ n[0]), V(
t,
"has-info",
/*info*/
- l[5] != null
- ), U(e, "class", "title-container svelte-vm3q5z");
+ n[5] != null
+ ), K(e, "class", "title-container svelte-vm3q5z");
},
- m(c, m) {
- _e(c, e, m), se(e, t), _ && _.m(t, null), se(e, n), r && r.m(e, null), _e(c, o, m), u && u.m(c, m), _e(c, s, m), f = !0;
+ m(u, m) {
+ ce(u, e, m), re(e, t), a && a.m(t, null), re(e, o), f && f.m(e, null), ce(u, i, m), c && c.m(u, m), ce(u, s, m), _ = !0;
},
- p(c, [m]) {
- _ && _.p && (!f || m & /*$$scope*/
- 64) && Nl(
- _,
+ p(u, [m]) {
+ a && a.p && (!_ || m & /*$$scope*/
+ 64) && Nn(
a,
- c,
+ r,
+ u,
/*$$scope*/
- c[6],
- f ? Ll(
- a,
+ u[6],
+ _ ? Mn(
+ r,
/*$$scope*/
- c[6],
+ u[6],
m,
null
- ) : Tl(
+ ) : Ln(
/*$$scope*/
- c[6]
+ u[6]
),
null
- ), (!f || m & /*show_label*/
+ ), (!_ || m & /*show_label*/
1) && V(t, "sr-only", !/*show_label*/
- c[0]), (!f || m & /*show_label*/
+ u[0]), (!_ || m & /*show_label*/
1) && V(t, "hide", !/*show_label*/
- c[0]), (!f || m & /*info*/
+ u[0]), (!_ || m & /*info*/
32) && V(
t,
"has-info",
/*info*/
- c[5] != null
+ u[5] != null
), m & /*_color_map*/
- 16 && (i = Object.keys(
+ 16 && (l = Object.keys(
/*_color_map*/
- c[4]
- ).length !== 0), i ? r ? r.p(c, m) : (r = it(c), r.c(), r.m(e, null)) : r && (r.d(1), r = null), /*info*/
- c[5] ? u ? u.p(c, m) : (u = st(c), u.c(), u.m(s.parentNode, s)) : u && (u.d(1), u = null);
+ u[4]
+ ).length !== 0), l ? f ? f.p(u, m) : (f = st(u), f.c(), f.m(e, null)) : f && (f.d(1), f = null), /*info*/
+ u[5] ? c ? c.p(u, m) : (c = _t(u), c.c(), c.m(s.parentNode, s)) : c && (c.d(1), c = null);
},
- i(c) {
- f || (Hl(_, c), f = !0);
+ i(u) {
+ _ || (Fn(a, u), _ = !0);
},
- o(c) {
- Ml(_, c), f = !1;
+ o(u) {
+ Hn(a, u), _ = !1;
},
- d(c) {
- c && (fe(e), fe(o), fe(s)), _ && _.d(c), r && r.d(), u && u.d(c);
+ d(u) {
+ u && (fe(e), fe(i), fe(s)), a && a.d(u), f && f.d(), c && c.d(u);
}
};
}
-function zl(l, e, t) {
- let { $$slots: n = {}, $$scope: i } = e, { show_label: o = !0 } = e, { show_legend: s = !0 } = e, { show_legend_label: f = !0 } = e, { legend_label: a = "Highlights:" } = e, { _color_map: _ = {} } = e, { info: r = void 0 } = e;
- return l.$$set = (u) => {
- "show_label" in u && t(0, o = u.show_label), "show_legend" in u && t(1, s = u.show_legend), "show_legend_label" in u && t(2, f = u.show_legend_label), "legend_label" in u && t(3, a = u.legend_label), "_color_map" in u && t(4, _ = u._color_map), "info" in u && t(5, r = u.info), "$$scope" in u && t(6, i = u.$$scope);
+function zn(n, e, t) {
+ let { $$slots: o = {}, $$scope: l } = e, { show_label: i = !0 } = e, { show_legend: s = !0 } = e, { show_legend_label: _ = !0 } = e, { legend_label: r = "Highlights:" } = e, { _color_map: a = {} } = e, { info: f = void 0 } = e;
+ return n.$$set = (c) => {
+ "show_label" in c && t(0, i = c.show_label), "show_legend" in c && t(1, s = c.show_legend), "show_legend_label" in c && t(2, _ = c.show_legend_label), "legend_label" in c && t(3, r = c.legend_label), "_color_map" in c && t(4, a = c._color_map), "info" in c && t(5, f = c.info), "$$scope" in c && t(6, l = c.$$scope);
}, [
- o,
+ i,
s,
- f,
- a,
_,
r,
- i,
- n
+ a,
+ f,
+ l,
+ o
];
}
-class El extends yl {
+class En extends qn {
constructor(e) {
- super(), jl(this, e, zl, Vl, Fl, {
+ super(), jn(this, e, zn, Vn, Tn, {
show_label: 0,
show_legend: 1,
show_legend_label: 2,
@@ -276,472 +276,1037 @@ class El extends yl {
});
}
}
-function Re() {
+function De() {
}
-const Rl = (l) => l;
-function Dl(l, e) {
- return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function";
+const Dn = (n) => n;
+function Rn(n, e) {
+ return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
}
-const ll = typeof window < "u";
-let ft = ll ? () => window.performance.now() : () => Date.now(), nl = ll ? (l) => requestAnimationFrame(l) : Re;
-const Ce = /* @__PURE__ */ new Set();
-function il(l) {
- Ce.forEach((e) => {
- e.c(l) || (Ce.delete(e), e.f());
- }), Ce.size !== 0 && nl(il);
+const ln = typeof window < "u";
+let rt = ln ? () => window.performance.now() : () => Date.now(), sn = ln ? (n) => requestAnimationFrame(n) : De;
+const ke = /* @__PURE__ */ new Set();
+function an(n) {
+ ke.forEach((e) => {
+ e.c(n) || (ke.delete(e), e.f());
+ }), ke.size !== 0 && sn(an);
}
-function Bl(l) {
+function On(n) {
let e;
- return Ce.size === 0 && nl(il), {
+ return ke.size === 0 && sn(an), {
promise: new Promise((t) => {
- Ce.add(e = { c: l, f: t });
+ ke.add(e = { c: n, f: t });
}),
abort() {
- Ce.delete(e);
+ ke.delete(e);
}
};
}
-function _t(l, { delay: e = 0, duration: t = 400, easing: n = Rl } = {}) {
- const i = +getComputedStyle(l).opacity;
+function ft(n, { delay: e = 0, duration: t = 400, easing: o = Dn } = {}) {
+ const l = +getComputedStyle(n).opacity;
return {
delay: e,
duration: t,
- easing: n,
- css: (o) => `opacity: ${o * i}`
+ easing: o,
+ css: (i) => `opacity: ${i * l}`
};
}
-const ve = [];
-function Pl(l, e = Re) {
+const we = [];
+function Zn(n, e = De) {
let t;
- const n = /* @__PURE__ */ new Set();
- function i(f) {
- if (Dl(l, f) && (l = f, t)) {
- const a = !ve.length;
- for (const _ of n)
- _[1](), ve.push(_, l);
- if (a) {
- for (let _ = 0; _ < ve.length; _ += 2)
- ve[_][0](ve[_ + 1]);
- ve.length = 0;
+ const o = /* @__PURE__ */ new Set();
+ function l(_) {
+ if (Rn(n, _) && (n = _, t)) {
+ const r = !we.length;
+ for (const a of o)
+ a[1](), we.push(a, n);
+ if (r) {
+ for (let a = 0; a < we.length; a += 2)
+ we[a][0](we[a + 1]);
+ we.length = 0;
}
}
}
- function o(f) {
- i(f(l));
+ function i(_) {
+ l(_(n));
}
- function s(f, a = Re) {
- const _ = [f, a];
- return n.add(_), n.size === 1 && (t = e(i, o) || Re), f(l), () => {
- n.delete(_), n.size === 0 && t && (t(), t = null);
+ function s(_, r = De) {
+ const a = [_, r];
+ return o.add(a), o.size === 1 && (t = e(l, i) || De), _(n), () => {
+ o.delete(a), o.size === 0 && t && (t(), t = null);
};
}
- return { set: i, update: o, subscribe: s };
+ return { set: l, update: i, subscribe: s };
}
-function at(l) {
- return Object.prototype.toString.call(l) === "[object Date]";
+function ct(n) {
+ return Object.prototype.toString.call(n) === "[object Date]";
}
-function Ge(l, e, t, n) {
- if (typeof t == "number" || at(t)) {
- const i = n - t, o = (t - e) / (l.dt || 1 / 60), s = l.opts.stiffness * i, f = l.opts.damping * o, a = (s - f) * l.inv_mass, _ = (o + a) * l.dt;
- return Math.abs(_) < l.opts.precision && Math.abs(i) < l.opts.precision ? n : (l.settled = !1, at(t) ? new Date(t.getTime() + _) : t + _);
+function Je(n, e, t, o) {
+ if (typeof t == "number" || ct(t)) {
+ const l = o - t, i = (t - e) / (n.dt || 1 / 60), s = n.opts.stiffness * l, _ = n.opts.damping * i, r = (s - _) * n.inv_mass, a = (i + r) * n.dt;
+ return Math.abs(a) < n.opts.precision && Math.abs(l) < n.opts.precision ? o : (n.settled = !1, ct(t) ? new Date(t.getTime() + a) : t + a);
} else {
if (Array.isArray(t))
return t.map(
- (i, o) => Ge(l, e[o], t[o], n[o])
+ (l, i) => Je(n, e[i], t[i], o[i])
);
if (typeof t == "object") {
- const i = {};
- for (const o in t)
- i[o] = Ge(l, e[o], t[o], n[o]);
- return i;
+ const l = {};
+ for (const i in t)
+ l[i] = Je(n, e[i], t[i], o[i]);
+ return l;
} else
throw new Error(`Cannot spring ${typeof t} values`);
}
}
-function rt(l, e = {}) {
- const t = Pl(l), { stiffness: n = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
- let s, f, a, _ = l, r = l, u = 1, c = 0, m = !1;
- function k(T, S = {}) {
- r = T;
- const y = a = {};
- return l == null || S.hard || j.stiffness >= 1 && j.damping >= 1 ? (m = !0, s = ft(), _ = T, t.set(l = r), Promise.resolve()) : (S.soft && (c = 1 / ((S.soft === !0 ? 0.5 : +S.soft) * 60), u = 0), f || (s = ft(), m = !1, f = Bl((d) => {
+function ut(n, e = {}) {
+ const t = Zn(n), { stiffness: o = 0.15, damping: l = 0.8, precision: i = 0.01 } = e;
+ let s, _, r, a = n, f = n, c = 1, u = 0, m = !1;
+ function b(y, L = {}) {
+ f = y;
+ const w = r = {};
+ return n == null || L.hard || k.stiffness >= 1 && k.damping >= 1 ? (m = !0, s = rt(), a = y, t.set(n = f), Promise.resolve()) : (L.soft && (u = 1 / ((L.soft === !0 ? 0.5 : +L.soft) * 60), c = 0), _ || (s = rt(), m = !1, _ = On((d) => {
if (m)
- return m = !1, f = null, !1;
- u = Math.min(u + c, 1);
- const C = {
- inv_mass: u,
- opts: j,
+ return m = !1, _ = null, !1;
+ c = Math.min(c + u, 1);
+ const q = {
+ inv_mass: c,
+ opts: k,
settled: !0,
dt: (d - s) * 60 / 1e3
- }, L = Ge(C, _, l, r);
- return s = d, _ = l, t.set(l = L), C.settled && (f = null), !C.settled;
+ }, M = Je(q, a, n, f);
+ return s = d, a = n, t.set(n = M), q.settled && (_ = null), !q.settled;
})), new Promise((d) => {
- f.promise.then(() => {
- y === a && d();
+ _.promise.then(() => {
+ w === r && d();
});
}));
}
- const j = {
- set: k,
- update: (T, S) => k(T(r, l), S),
+ const k = {
+ set: b,
+ update: (y, L) => b(y(f, n), L),
subscribe: t.subscribe,
- stiffness: n,
- damping: i,
- precision: o
+ stiffness: o,
+ damping: l,
+ precision: i
};
- return j;
+ return k;
}
const {
- SvelteComponent: Zl,
- append: Ol,
- attr: le,
- detach: Al,
- init: Wl,
- insert: Il,
+ SvelteComponent: Ci,
+ append: qi,
+ attr: ki,
+ detach: Si,
+ init: yi,
+ insert: Li,
+ noop: Mi,
+ safe_not_equal: ji,
+ svg_element: Ti
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Fi,
+ append: Hi,
+ attr: Ni,
+ detach: Vi,
+ init: zi,
+ insert: Ei,
+ noop: Di,
+ safe_not_equal: Ri,
+ svg_element: Oi
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Zi,
+ append: Ai,
+ attr: Bi,
+ detach: Ii,
+ init: Pi,
+ insert: Wi,
+ noop: Xi,
+ safe_not_equal: Gi,
+ svg_element: Ui
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Yi,
+ append: Ji,
+ attr: Ki,
+ detach: Qi,
+ init: xi,
+ insert: es,
+ noop: ts,
+ safe_not_equal: ns,
+ svg_element: os
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: ls,
+ append: is,
+ attr: ss,
+ detach: as,
+ init: _s,
+ insert: rs,
+ noop: fs,
+ safe_not_equal: cs,
+ svg_element: us
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: ds,
+ append: ms,
+ attr: ps,
+ detach: gs,
+ init: hs,
+ insert: vs,
+ noop: bs,
+ safe_not_equal: ws,
+ svg_element: $s
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: An,
+ append: Bn,
+ attr: ie,
+ detach: In,
+ init: Pn,
+ insert: Wn,
noop: We,
- safe_not_equal: Ul,
- svg_element: ut
+ safe_not_equal: Xn,
+ svg_element: dt
} = window.__gradio__svelte__internal;
-function Xl(l) {
+function Gn(n) {
let e, t;
return {
c() {
- e = ut("svg"), t = ut("polyline"), le(t, "points", "20 6 9 17 4 12"), le(e, "xmlns", "http://www.w3.org/2000/svg"), le(e, "viewBox", "2 0 20 20"), le(e, "fill", "none"), le(e, "stroke", "currentColor"), le(e, "stroke-width", "3"), le(e, "stroke-linecap", "round"), le(e, "stroke-linejoin", "round");
+ e = dt("svg"), t = dt("polyline"), ie(t, "points", "20 6 9 17 4 12"), ie(e, "xmlns", "http://www.w3.org/2000/svg"), ie(e, "viewBox", "2 0 20 20"), ie(e, "fill", "none"), ie(e, "stroke", "currentColor"), ie(e, "stroke-width", "3"), ie(e, "stroke-linecap", "round"), ie(e, "stroke-linejoin", "round");
},
- m(n, i) {
- Il(n, e, i), Ol(e, t);
+ m(o, l) {
+ Wn(o, e, l), Bn(e, t);
},
p: We,
i: We,
o: We,
- d(n) {
- n && Al(e);
+ d(o) {
+ o && In(e);
}
};
}
-class Yl extends Zl {
+class Un extends An {
constructor(e) {
- super(), Wl(this, e, null, Xl, Ul, {});
+ super(), Pn(this, e, null, Gn, Xn, {});
}
}
const {
- SvelteComponent: Gl,
- append: ct,
- attr: re,
- detach: Jl,
- init: Kl,
- insert: Ql,
- noop: Ie,
- safe_not_equal: xl,
- svg_element: Ue
+ SvelteComponent: Cs,
+ append: qs,
+ attr: ks,
+ detach: Ss,
+ init: ys,
+ insert: Ls,
+ noop: Ms,
+ safe_not_equal: js,
+ svg_element: Ts
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Fs,
+ append: Hs,
+ attr: Ns,
+ detach: Vs,
+ init: zs,
+ insert: Es,
+ noop: Ds,
+ safe_not_equal: Rs,
+ set_style: Os,
+ svg_element: Zs
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: As,
+ append: Bs,
+ attr: Is,
+ detach: Ps,
+ init: Ws,
+ insert: Xs,
+ noop: Gs,
+ safe_not_equal: Us,
+ svg_element: Ys
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Js,
+ append: Ks,
+ attr: Qs,
+ detach: xs,
+ init: ea,
+ insert: ta,
+ noop: na,
+ safe_not_equal: oa,
+ svg_element: la
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: ia,
+ append: sa,
+ attr: aa,
+ detach: _a,
+ init: ra,
+ insert: fa,
+ noop: ca,
+ safe_not_equal: ua,
+ svg_element: da
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Yn,
+ append: mt,
+ attr: de,
+ detach: Jn,
+ init: Kn,
+ insert: Qn,
+ noop: Xe,
+ safe_not_equal: xn,
+ svg_element: Ge
} = window.__gradio__svelte__internal;
-function $l(l) {
- let e, t, n;
+function eo(n) {
+ let e, t, o;
return {
c() {
- e = Ue("svg"), t = Ue("path"), n = Ue("path"), re(t, "fill", "currentColor"), re(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"), re(n, "fill", "currentColor"), re(n, "d", "M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z"), re(e, "xmlns", "http://www.w3.org/2000/svg"), re(e, "viewBox", "0 0 33 33"), re(e, "color", "currentColor");
+ e = Ge("svg"), t = Ge("path"), o = Ge("path"), de(t, "fill", "currentColor"), de(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"), de(o, "fill", "currentColor"), de(o, "d", "M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z"), de(e, "xmlns", "http://www.w3.org/2000/svg"), de(e, "viewBox", "0 0 33 33"), de(e, "color", "currentColor");
},
- m(i, o) {
- Ql(i, e, o), ct(e, t), ct(e, n);
+ m(l, i) {
+ Qn(l, e, i), mt(e, t), mt(e, o);
},
- p: Ie,
- i: Ie,
- o: Ie,
- d(i) {
- i && Jl(e);
+ p: Xe,
+ i: Xe,
+ o: Xe,
+ d(l) {
+ l && Jn(e);
}
};
}
-class en extends Gl {
+class to extends Yn {
constructor(e) {
- super(), Kl(this, e, null, $l, xl, {});
+ super(), Kn(this, e, null, eo, xn, {});
}
}
const {
- SvelteComponent: tn,
- add_render_callback: ln,
- append: nn,
- attr: ue,
- check_outros: on,
- create_bidirectional_transition: dt,
- create_component: ol,
- destroy_component: sl,
- detach: fl,
- element: _l,
- group_outros: sn,
- init: fn,
- insert: al,
- listen: _n,
- mount_component: rl,
- safe_not_equal: an,
- space: rn,
- toggle_class: mt,
+ SvelteComponent: ma,
+ append: pa,
+ attr: ga,
+ detach: ha,
+ init: va,
+ insert: ba,
+ noop: wa,
+ safe_not_equal: $a,
+ svg_element: Ca
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: qa,
+ append: ka,
+ attr: Sa,
+ detach: ya,
+ init: La,
+ insert: Ma,
+ noop: ja,
+ safe_not_equal: Ta,
+ svg_element: Fa
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Ha,
+ append: Na,
+ attr: Va,
+ detach: za,
+ init: Ea,
+ insert: Da,
+ noop: Ra,
+ safe_not_equal: Oa,
+ svg_element: Za
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Aa,
+ append: Ba,
+ attr: Ia,
+ detach: Pa,
+ init: Wa,
+ insert: Xa,
+ noop: Ga,
+ safe_not_equal: Ua,
+ svg_element: Ya
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Ja,
+ append: Ka,
+ attr: Qa,
+ detach: xa,
+ init: e_,
+ insert: t_,
+ noop: n_,
+ safe_not_equal: o_,
+ svg_element: l_
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: i_,
+ append: s_,
+ attr: a_,
+ detach: __,
+ init: r_,
+ insert: f_,
+ noop: c_,
+ safe_not_equal: u_,
+ svg_element: d_
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: m_,
+ append: p_,
+ attr: g_,
+ detach: h_,
+ init: v_,
+ insert: b_,
+ noop: w_,
+ safe_not_equal: $_,
+ svg_element: C_
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: q_,
+ append: k_,
+ attr: S_,
+ detach: y_,
+ init: L_,
+ insert: M_,
+ noop: j_,
+ safe_not_equal: T_,
+ svg_element: F_
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: H_,
+ append: N_,
+ attr: V_,
+ detach: z_,
+ init: E_,
+ insert: D_,
+ noop: R_,
+ safe_not_equal: O_,
+ svg_element: Z_
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: A_,
+ append: B_,
+ attr: I_,
+ detach: P_,
+ init: W_,
+ insert: X_,
+ noop: G_,
+ safe_not_equal: U_,
+ svg_element: Y_
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: J_,
+ append: K_,
+ attr: Q_,
+ detach: x_,
+ init: er,
+ insert: tr,
+ noop: nr,
+ safe_not_equal: or,
+ svg_element: lr
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: ir,
+ append: sr,
+ attr: ar,
+ detach: _r,
+ init: rr,
+ insert: fr,
+ noop: cr,
+ safe_not_equal: ur,
+ svg_element: dr
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: mr,
+ append: pr,
+ attr: gr,
+ detach: hr,
+ init: vr,
+ insert: br,
+ noop: wr,
+ safe_not_equal: $r,
+ svg_element: Cr
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: qr,
+ append: kr,
+ attr: Sr,
+ detach: yr,
+ init: Lr,
+ insert: Mr,
+ noop: jr,
+ safe_not_equal: Tr,
+ svg_element: Fr
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Hr,
+ append: Nr,
+ attr: Vr,
+ detach: zr,
+ init: Er,
+ insert: Dr,
+ noop: Rr,
+ safe_not_equal: Or,
+ svg_element: Zr
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Ar,
+ append: Br,
+ attr: Ir,
+ detach: Pr,
+ init: Wr,
+ insert: Xr,
+ noop: Gr,
+ safe_not_equal: Ur,
+ svg_element: Yr
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Jr,
+ append: Kr,
+ attr: Qr,
+ detach: xr,
+ init: ef,
+ insert: tf,
+ noop: nf,
+ safe_not_equal: of,
+ svg_element: lf
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: sf,
+ append: af,
+ attr: _f,
+ detach: rf,
+ init: ff,
+ insert: cf,
+ noop: uf,
+ safe_not_equal: df,
+ svg_element: mf
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: pf,
+ append: gf,
+ attr: hf,
+ detach: vf,
+ init: bf,
+ insert: wf,
+ noop: $f,
+ safe_not_equal: Cf,
+ svg_element: qf
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: kf,
+ append: Sf,
+ attr: yf,
+ detach: Lf,
+ init: Mf,
+ insert: jf,
+ noop: Tf,
+ safe_not_equal: Ff,
+ svg_element: Hf
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Nf,
+ append: Vf,
+ attr: zf,
+ detach: Ef,
+ init: Df,
+ insert: Rf,
+ noop: Of,
+ safe_not_equal: Zf,
+ svg_element: Af
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Bf,
+ append: If,
+ attr: Pf,
+ detach: Wf,
+ init: Xf,
+ insert: Gf,
+ noop: Uf,
+ safe_not_equal: Yf,
+ svg_element: Jf
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Kf,
+ append: Qf,
+ attr: xf,
+ detach: ec,
+ init: tc,
+ insert: nc,
+ noop: oc,
+ safe_not_equal: lc,
+ svg_element: ic
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: sc,
+ append: ac,
+ attr: _c,
+ detach: rc,
+ init: fc,
+ insert: cc,
+ noop: uc,
+ safe_not_equal: dc,
+ set_style: mc,
+ svg_element: pc
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: gc,
+ append: hc,
+ attr: vc,
+ detach: bc,
+ init: wc,
+ insert: $c,
+ noop: Cc,
+ safe_not_equal: qc,
+ svg_element: kc
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Sc,
+ append: yc,
+ attr: Lc,
+ detach: Mc,
+ init: jc,
+ insert: Tc,
+ noop: Fc,
+ safe_not_equal: Hc,
+ svg_element: Nc
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Vc,
+ append: zc,
+ attr: Ec,
+ detach: Dc,
+ init: Rc,
+ insert: Oc,
+ noop: Zc,
+ safe_not_equal: Ac,
+ svg_element: Bc
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Ic,
+ append: Pc,
+ attr: Wc,
+ detach: Xc,
+ init: Gc,
+ insert: Uc,
+ noop: Yc,
+ safe_not_equal: Jc,
+ svg_element: Kc
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Qc,
+ append: xc,
+ attr: eu,
+ detach: tu,
+ init: nu,
+ insert: ou,
+ noop: lu,
+ safe_not_equal: iu,
+ svg_element: su
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: au,
+ append: _u,
+ attr: ru,
+ detach: fu,
+ init: cu,
+ insert: uu,
+ noop: du,
+ safe_not_equal: mu,
+ svg_element: pu
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: gu,
+ append: hu,
+ attr: vu,
+ detach: bu,
+ init: wu,
+ insert: $u,
+ noop: Cu,
+ safe_not_equal: qu,
+ svg_element: ku
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Su,
+ append: yu,
+ attr: Lu,
+ detach: Mu,
+ init: ju,
+ insert: Tu,
+ noop: Fu,
+ safe_not_equal: Hu,
+ svg_element: Nu,
+ text: Vu
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: zu,
+ append: Eu,
+ attr: Du,
+ detach: Ru,
+ init: Ou,
+ insert: Zu,
+ noop: Au,
+ safe_not_equal: Bu,
+ svg_element: Iu
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Pu,
+ append: Wu,
+ attr: Xu,
+ detach: Gu,
+ init: Uu,
+ insert: Yu,
+ noop: Ju,
+ safe_not_equal: Ku,
+ svg_element: Qu
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: xu,
+ append: ed,
+ attr: td,
+ detach: nd,
+ init: od,
+ insert: ld,
+ noop: id,
+ safe_not_equal: sd,
+ svg_element: ad
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: _d,
+ append: rd,
+ attr: fd,
+ detach: cd,
+ init: ud,
+ insert: dd,
+ noop: md,
+ safe_not_equal: pd,
+ svg_element: gd
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: hd,
+ append: vd,
+ attr: bd,
+ detach: wd,
+ init: $d,
+ insert: Cd,
+ noop: qd,
+ safe_not_equal: kd,
+ svg_element: Sd
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: yd,
+ append: Ld,
+ attr: Md,
+ detach: jd,
+ init: Td,
+ insert: Fd,
+ noop: Hd,
+ safe_not_equal: Nd,
+ svg_element: Vd,
+ text: zd
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Ed,
+ append: Dd,
+ attr: Rd,
+ detach: Od,
+ init: Zd,
+ insert: Ad,
+ noop: Bd,
+ safe_not_equal: Id,
+ svg_element: Pd,
+ text: Wd
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Xd,
+ append: Gd,
+ attr: Ud,
+ detach: Yd,
+ init: Jd,
+ insert: Kd,
+ noop: Qd,
+ safe_not_equal: xd,
+ svg_element: e0,
+ text: t0
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: n0,
+ append: o0,
+ attr: l0,
+ detach: i0,
+ init: s0,
+ insert: a0,
+ noop: _0,
+ safe_not_equal: r0,
+ svg_element: f0
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: c0,
+ append: u0,
+ attr: d0,
+ detach: m0,
+ init: p0,
+ insert: g0,
+ noop: h0,
+ safe_not_equal: v0,
+ svg_element: b0
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: no,
+ add_render_callback: oo,
+ append: lo,
+ attr: me,
+ check_outros: io,
+ create_bidirectional_transition: pt,
+ create_component: _n,
+ destroy_component: rn,
+ detach: fn,
+ element: cn,
+ group_outros: so,
+ init: ao,
+ insert: un,
+ listen: _o,
+ mount_component: dn,
+ safe_not_equal: ro,
+ space: fo,
+ toggle_class: gt,
transition_in: Fe,
- transition_out: De
-} = window.__gradio__svelte__internal, { onDestroy: un } = window.__gradio__svelte__internal;
-function gt(l) {
- let e, t, n, i;
- return t = new Yl({}), {
+ transition_out: Re
+} = window.__gradio__svelte__internal, { onDestroy: co } = window.__gradio__svelte__internal;
+function ht(n) {
+ let e, t, o, l;
+ return t = new Un({}), {
c() {
- e = _l("span"), ol(t.$$.fragment), ue(e, "class", "check svelte-qjb524"), ue(e, "aria-roledescription", "Value copied"), ue(e, "aria-label", "Copied");
+ e = cn("span"), _n(t.$$.fragment), me(e, "class", "check svelte-qjb524"), me(e, "aria-roledescription", "Value copied"), me(e, "aria-label", "Copied");
},
- m(o, s) {
- al(o, e, s), rl(t, e, null), i = !0;
+ m(i, s) {
+ un(i, e, s), dn(t, e, null), l = !0;
},
- i(o) {
- i || (Fe(t.$$.fragment, o), o && ln(() => {
- i && (n || (n = dt(e, _t, {}, !0)), n.run(1));
- }), i = !0);
+ i(i) {
+ l || (Fe(t.$$.fragment, i), i && oo(() => {
+ l && (o || (o = pt(e, ft, {}, !0)), o.run(1));
+ }), l = !0);
},
- o(o) {
- De(t.$$.fragment, o), o && (n || (n = dt(e, _t, {}, !1)), n.run(0)), i = !1;
+ o(i) {
+ Re(t.$$.fragment, i), i && (o || (o = pt(e, ft, {}, !1)), o.run(0)), l = !1;
},
- d(o) {
- o && fl(e), sl(t), o && n && n.end();
+ d(i) {
+ i && fn(e), rn(t), i && o && o.end();
}
};
}
-function cn(l) {
- let e, t, n, i, o, s;
- t = new en({});
- let f = (
+function uo(n) {
+ let e, t, o, l, i, s;
+ t = new to({});
+ let _ = (
/*copied*/
- l[0] && gt()
+ n[0] && ht()
);
return {
c() {
- e = _l("button"), ol(t.$$.fragment), n = rn(), f && f.c(), ue(e, "title", "Copy text to clipboard"), ue(e, "aria-roledescription", "Copy value"), ue(e, "aria-label", "Copy"), ue(e, "class", "svelte-qjb524"), mt(
+ e = cn("button"), _n(t.$$.fragment), o = fo(), _ && _.c(), me(e, "title", "Copy text to clipboard"), me(e, "aria-roledescription", "Copy value"), me(e, "aria-label", "Copy"), me(e, "class", "svelte-qjb524"), gt(
e,
"copied",
/*copied*/
- l[0]
+ n[0]
);
},
- m(a, _) {
- al(a, e, _), rl(t, e, null), nn(e, n), f && f.m(e, null), i = !0, o || (s = _n(
+ m(r, a) {
+ un(r, e, a), dn(t, e, null), lo(e, o), _ && _.m(e, null), l = !0, i || (s = _o(
e,
"click",
/*handle_copy*/
- l[1]
- ), o = !0);
+ n[1]
+ ), i = !0);
},
- p(a, [_]) {
+ p(r, [a]) {
/*copied*/
- a[0] ? f ? _ & /*copied*/
- 1 && Fe(f, 1) : (f = gt(), f.c(), Fe(f, 1), f.m(e, null)) : f && (sn(), De(f, 1, 1, () => {
- f = null;
- }), on()), (!i || _ & /*copied*/
- 1) && mt(
+ r[0] ? _ ? a & /*copied*/
+ 1 && Fe(_, 1) : (_ = ht(), _.c(), Fe(_, 1), _.m(e, null)) : _ && (so(), Re(_, 1, 1, () => {
+ _ = null;
+ }), io()), (!l || a & /*copied*/
+ 1) && gt(
e,
"copied",
/*copied*/
- a[0]
+ r[0]
);
},
- i(a) {
- i || (Fe(t.$$.fragment, a), Fe(f), i = !0);
+ i(r) {
+ l || (Fe(t.$$.fragment, r), Fe(_), l = !0);
},
- o(a) {
- De(t.$$.fragment, a), De(f), i = !1;
+ o(r) {
+ Re(t.$$.fragment, r), Re(_), l = !1;
},
- d(a) {
- a && fl(e), sl(t), f && f.d(), o = !1, s();
+ d(r) {
+ r && fn(e), rn(t), _ && _.d(), i = !1, s();
}
};
}
-function dn(l, e, t) {
- let n = !1, { value: i } = e, o;
- function s() {
- t(0, n = !0), o && clearTimeout(o), o = setTimeout(
+function mo(n, e, t) {
+ var o = this && this.__awaiter || function(a, f, c, u) {
+ function m(b) {
+ return b instanceof c ? b : new c(function(k) {
+ k(b);
+ });
+ }
+ return new (c || (c = Promise))(function(b, k) {
+ function y(d) {
+ try {
+ w(u.next(d));
+ } catch (q) {
+ k(q);
+ }
+ }
+ function L(d) {
+ try {
+ w(u.throw(d));
+ } catch (q) {
+ k(q);
+ }
+ }
+ function w(d) {
+ d.done ? b(d.value) : m(d.value).then(y, L);
+ }
+ w((u = u.apply(a, f || [])).next());
+ });
+ };
+ let l = !1, { value: i } = e, s;
+ function _() {
+ t(0, l = !0), s && clearTimeout(s), s = setTimeout(
() => {
- t(0, n = !1);
+ t(0, l = !1);
},
2e3
);
}
- async function f() {
- "clipboard" in navigator && (await navigator.clipboard.writeText(i), s());
+ function r() {
+ return o(this, void 0, void 0, function* () {
+ "clipboard" in navigator && (yield navigator.clipboard.writeText(i), _());
+ });
}
- return un(() => {
- o && clearTimeout(o);
- }), l.$$set = (a) => {
+ return co(() => {
+ s && clearTimeout(s);
+ }), n.$$set = (a) => {
"value" in a && t(2, i = a.value);
- }, [n, f, i];
+ }, [l, r, i];
}
-class mn extends tn {
+class po extends no {
constructor(e) {
- super(), fn(this, e, dn, cn, an, { value: 2 });
+ super(), ao(this, e, mo, uo, ro, { value: 2 });
}
}
const {
- SvelteComponent: gn,
+ SvelteComponent: go,
attr: Ve,
- detach: hn,
- element: bn,
- init: wn,
- insert: vn,
- listen: pn,
- noop: Xe,
- safe_not_equal: kn
-} = window.__gradio__svelte__internal, { createEventDispatcher: yn } = window.__gradio__svelte__internal;
-function Cn(l) {
- let e, t, n;
+ detach: ho,
+ element: vo,
+ init: bo,
+ insert: wo,
+ listen: $o,
+ noop: Ue,
+ safe_not_equal: Co
+} = window.__gradio__svelte__internal, { createEventDispatcher: qo } = window.__gradio__svelte__internal;
+function ko(n) {
+ let e, t, o;
return {
c() {
- e = bn("button"), e.innerHTML = '', Ve(e, "title", "Remove highlights"), Ve(e, "aria-roledescription", "Remove highlights"), Ve(e, "aria-label", "Remove highlights"), Ve(e, "class", "svelte-1ga0gmr");
+ e = vo("button"), e.innerHTML = '', Ve(e, "title", "Remove highlights"), Ve(e, "aria-roledescription", "Remove highlights"), Ve(e, "aria-label", "Remove highlights"), Ve(e, "class", "svelte-1ga0gmr");
},
- m(i, o) {
- vn(i, e, o), t || (n = pn(
+ m(l, i) {
+ wo(l, e, i), t || (o = $o(
e,
"click",
/*click_handler*/
- l[1]
+ n[1]
), t = !0);
},
- p: Xe,
- i: Xe,
- o: Xe,
- d(i) {
- i && hn(e), t = !1, n();
+ p: Ue,
+ i: Ue,
+ o: Ue,
+ d(l) {
+ l && ho(e), t = !1, o();
}
};
}
-function qn(l) {
- const e = yn();
+function So(n) {
+ const e = qo();
return [e, () => e("clear")];
}
-class Sn extends gn {
+class yo extends go {
constructor(e) {
- super(), wn(this, e, qn, Cn, kn, {});
+ super(), bo(this, e, So, ko, Co, {});
}
}
const {
- SvelteComponent: Tn,
- append: Ln,
- attr: jn,
- check_outros: ht,
- create_component: ul,
- destroy_component: cl,
- detach: Fn,
- element: Hn,
+ SvelteComponent: Lo,
+ append: Mo,
+ attr: jo,
+ check_outros: vt,
+ create_component: mn,
+ destroy_component: pn,
+ detach: To,
+ element: Fo,
group_outros: bt,
- init: Mn,
- insert: Nn,
- mount_component: dl,
- noop: Vn,
- safe_not_equal: zn,
- space: En,
- transition_in: ie,
- transition_out: pe
-} = window.__gradio__svelte__internal, { createEventDispatcher: Rn } = window.__gradio__svelte__internal;
-function wt(l) {
+ init: Ho,
+ insert: No,
+ mount_component: gn,
+ noop: Vo,
+ safe_not_equal: zo,
+ space: Eo,
+ transition_in: ae,
+ transition_out: $e
+} = window.__gradio__svelte__internal, { createEventDispatcher: Do } = window.__gradio__svelte__internal;
+function wt(n) {
let e, t;
- return e = new Sn({}), e.$on(
+ return e = new yo({}), e.$on(
"clear",
/*clear_handler*/
- l[4]
+ n[4]
), {
c() {
- ul(e.$$.fragment);
+ mn(e.$$.fragment);
},
- m(n, i) {
- dl(e, n, i), t = !0;
+ m(o, l) {
+ gn(e, o, l), t = !0;
},
- p: Vn,
- i(n) {
- t || (ie(e.$$.fragment, n), t = !0);
+ p: Vo,
+ i(o) {
+ t || (ae(e.$$.fragment, o), t = !0);
},
- o(n) {
- pe(e.$$.fragment, n), t = !1;
+ o(o) {
+ $e(e.$$.fragment, o), t = !1;
},
- d(n) {
- cl(e, n);
+ d(o) {
+ pn(e, o);
}
};
}
-function vt(l) {
+function $t(n) {
let e, t;
- return e = new mn({ props: { value: (
+ return e = new po({ props: { value: (
/*value*/
- l[0]
+ n[0]
) } }), {
c() {
- ul(e.$$.fragment);
+ mn(e.$$.fragment);
},
- m(n, i) {
- dl(e, n, i), t = !0;
+ m(o, l) {
+ gn(e, o, l), t = !0;
},
- p(n, i) {
- const o = {};
- i & /*value*/
- 1 && (o.value = /*value*/
- n[0]), e.$set(o);
+ p(o, l) {
+ const i = {};
+ l & /*value*/
+ 1 && (i.value = /*value*/
+ o[0]), e.$set(i);
},
- i(n) {
- t || (ie(e.$$.fragment, n), t = !0);
+ i(o) {
+ t || (ae(e.$$.fragment, o), t = !0);
},
- o(n) {
- pe(e.$$.fragment, n), t = !1;
+ o(o) {
+ $e(e.$$.fragment, o), t = !1;
},
- d(n) {
- cl(e, n);
+ d(o) {
+ pn(e, o);
}
};
}
-function Dn(l) {
- let e, t, n, i = (
+function Ro(n) {
+ let e, t, o, l = (
/*show_remove_tags_button*/
- l[2] && wt(l)
- ), o = (
+ n[2] && wt(n)
+ ), i = (
/*show_copy_button*/
- l[1] && vt(l)
+ n[1] && $t(n)
);
return {
c() {
- e = Hn("div"), i && i.c(), t = En(), o && o.c(), jn(e, "class", "svelte-1bqqv16");
+ e = Fo("div"), l && l.c(), t = Eo(), i && i.c(), jo(e, "class", "svelte-1bqqv16");
},
- m(s, f) {
- Nn(s, e, f), i && i.m(e, null), Ln(e, t), o && o.m(e, null), n = !0;
+ m(s, _) {
+ No(s, e, _), l && l.m(e, null), Mo(e, t), i && i.m(e, null), o = !0;
},
- p(s, [f]) {
+ p(s, [_]) {
/*show_remove_tags_button*/
- s[2] ? i ? (i.p(s, f), f & /*show_remove_tags_button*/
- 4 && ie(i, 1)) : (i = wt(s), i.c(), ie(i, 1), i.m(e, t)) : i && (bt(), pe(i, 1, 1, () => {
+ s[2] ? l ? (l.p(s, _), _ & /*show_remove_tags_button*/
+ 4 && ae(l, 1)) : (l = wt(s), l.c(), ae(l, 1), l.m(e, t)) : l && (bt(), $e(l, 1, 1, () => {
+ l = null;
+ }), vt()), /*show_copy_button*/
+ s[1] ? i ? (i.p(s, _), _ & /*show_copy_button*/
+ 2 && ae(i, 1)) : (i = $t(s), i.c(), ae(i, 1), i.m(e, null)) : i && (bt(), $e(i, 1, 1, () => {
i = null;
- }), ht()), /*show_copy_button*/
- s[1] ? o ? (o.p(s, f), f & /*show_copy_button*/
- 2 && ie(o, 1)) : (o = vt(s), o.c(), ie(o, 1), o.m(e, null)) : o && (bt(), pe(o, 1, 1, () => {
- o = null;
- }), ht());
+ }), vt());
},
i(s) {
- n || (ie(i), ie(o), n = !0);
+ o || (ae(l), ae(i), o = !0);
},
o(s) {
- pe(i), pe(o), n = !1;
+ $e(l), $e(i), o = !1;
},
d(s) {
- s && Fn(e), i && i.d(), o && o.d();
+ s && To(e), l && l.d(), i && i.d();
}
};
}
-function Bn(l, e, t) {
- let { value: n } = e, { show_copy_button: i = !1 } = e, { show_remove_tags_button: o = !1 } = e;
- const s = Rn(), f = () => s("clear");
- return l.$$set = (a) => {
- "value" in a && t(0, n = a.value), "show_copy_button" in a && t(1, i = a.show_copy_button), "show_remove_tags_button" in a && t(2, o = a.show_remove_tags_button);
- }, [n, i, o, s, f];
+function Oo(n, e, t) {
+ let { value: o } = e, { show_copy_button: l = !1 } = e, { show_remove_tags_button: i = !1 } = e;
+ const s = Do(), _ = () => s("clear");
+ return n.$$set = (r) => {
+ "value" in r && t(0, o = r.value), "show_copy_button" in r && t(1, l = r.show_copy_button), "show_remove_tags_button" in r && t(2, i = r.show_remove_tags_button);
+ }, [o, l, i, s, _];
}
-class Pn extends Tn {
+class Zo extends Lo {
constructor(e) {
- super(), Mn(this, e, Bn, Dn, zn, {
+ super(), Ho(this, e, Oo, Ro, zo, {
value: 0,
show_copy_button: 1,
show_remove_tags_button: 2
});
}
}
-const pt = [
+const Ct = [
"red",
"green",
"blue",
@@ -752,7 +1317,7 @@ const pt = [
"cyan",
"lime",
"pink"
-], Zn = [
+], Ao = [
{ color: "red", primary: 600, secondary: 100 },
{ color: "green", primary: 600, secondary: 100 },
{ color: "blue", primary: 600, secondary: 100 },
@@ -763,7 +1328,7 @@ const pt = [
{ color: "cyan", primary: 600, secondary: 100 },
{ color: "lime", primary: 500, secondary: 100 },
{ color: "pink", primary: 600, secondary: 100 }
-], kt = {
+], qt = {
inherit: "inherit",
current: "currentColor",
transparent: "transparent",
@@ -1055,489 +1620,488 @@ const pt = [
900: "#881337",
950: "#4c0519"
}
-}, yt = Zn.reduce(
- (l, { color: e, primary: t, secondary: n }) => ({
- ...l,
+}, kt = Ao.reduce(
+ (n, { color: e, primary: t, secondary: o }) => ({
+ ...n,
[e]: {
- primary: kt[e][t],
- secondary: kt[e][n]
+ primary: qt[e][t],
+ secondary: qt[e][o]
}
}),
{}
-), On = (l) => pt[l % pt.length];
-function Ct(l, e, t) {
+), Bo = (n) => Ct[n % Ct.length];
+function St(n, e, t) {
if (!t) {
- var n = document.createElement("canvas");
- t = n.getContext("2d");
- }
- t.fillStyle = l, t.fillRect(0, 0, 1, 1);
- const [i, o, s] = t.getImageData(0, 0, 1, 1).data;
- return t.clearRect(0, 0, 1, 1), `rgba(${i}, ${o}, ${s}, ${255 / e})`;
-}
-function An(l, e, t) {
- var n = {};
- for (const i in l) {
- const o = l[i].trim();
- o in yt ? n[i] = yt[o] : n[i] = {
- primary: e ? Ct(l[i], 1, t) : l[i],
- secondary: e ? Ct(l[i], 0.5, t) : l[i]
+ var o = document.createElement("canvas");
+ t = o.getContext("2d");
+ }
+ t.fillStyle = n, t.fillRect(0, 0, 1, 1);
+ const [l, i, s] = t.getImageData(0, 0, 1, 1).data;
+ return t.clearRect(0, 0, 1, 1), `rgba(${l}, ${i}, ${s}, ${255 / e})`;
+}
+function Io(n, e, t) {
+ var o = {};
+ for (const l in n) {
+ const i = n[l].trim();
+ i in kt ? o[l] = kt[i] : o[l] = {
+ primary: e ? St(n[l], 1, t) : n[l],
+ secondary: e ? St(n[l], 0.5, t) : n[l]
};
}
- return n;
+ return o;
}
-function Wn(l, e) {
- let t = [], n = null, i = null;
- for (const [o, s] of l)
- e === "empty" && s === null || e === "equal" && i === s ? n = n ? n + o : o : (n !== null && t.push([n, i]), n = o, i = s);
- return n !== null && t.push([n, i]), t;
+function Po(n, e) {
+ let t = [], o = null, l = null;
+ for (const [i, s] of n)
+ l === s ? o = o ? o + i : i : (o !== null && t.push([o, l]), o = i, l = s);
+ return o !== null && t.push([o, l]), t;
}
-function In(l) {
+function Wo(n) {
const e = window.getSelection();
if (e.rangeCount > 0) {
const t = document.createRange();
- return t.setStart(l, 0), e.anchorNode !== null && t.setEnd(e.anchorNode, e.anchorOffset), t.toString().length;
+ return t.setStart(n, 0), e.anchorNode !== null && t.setEnd(e.anchorNode, e.anchorOffset), t.toString().length;
}
return -1;
}
-function Un(l, e) {
- var t = document.createTreeWalker(l, NodeFilter.SHOW_TEXT), n = t.nextNode();
- if (!n || !n.textContent)
+function Xo(n, e) {
+ var t = document.createTreeWalker(n, NodeFilter.SHOW_TEXT), o = t.nextNode();
+ if (!o || !o.textContent)
return null;
- for (var i = n.textContent.length; i < e; )
- if (n = t.nextNode(), n && n.textContent)
- i += n.textContent.length;
+ for (var l = o.textContent.length; l < e; )
+ if (o = t.nextNode(), o && o.textContent)
+ l += o.textContent.length;
else
return null;
- var o = n.textContent.length - (i - e);
- return { node: n, offset: o };
+ var i = o.textContent.length - (l - e);
+ return { node: o, offset: i };
}
const {
- SvelteComponent: Xn,
- add_render_callback: ml,
- append: qt,
- attr: X,
- binding_callbacks: St,
- bubble: je,
- create_component: Tt,
- destroy_component: Lt,
- detach: Pe,
- element: xe,
- init: Yn,
- insert: Ze,
- listen: x,
- mount_component: jt,
- run_all: Gn,
- safe_not_equal: Jn,
- set_data: Kn,
+ SvelteComponent: Go,
+ add_render_callback: hn,
+ append: yt,
+ attr: x,
+ binding_callbacks: Lt,
+ bubble: Te,
+ create_component: Mt,
+ destroy_component: jt,
+ detach: Ze,
+ element: et,
+ init: Uo,
+ insert: Ae,
+ listen: oe,
+ mount_component: Tt,
+ run_all: Yo,
+ safe_not_equal: Jo,
+ set_data: Ko,
space: Ft,
- text: Qn,
+ text: Qo,
toggle_class: Ht,
- transition_in: Mt,
- transition_out: Nt
-} = window.__gradio__svelte__internal, { beforeUpdate: xn, afterUpdate: $n, createEventDispatcher: ei } = window.__gradio__svelte__internal;
-function ti(l) {
+ transition_in: Nt,
+ transition_out: Vt
+} = window.__gradio__svelte__internal, { beforeUpdate: xo, afterUpdate: el, createEventDispatcher: tl } = window.__gradio__svelte__internal;
+function nl(n) {
let e;
return {
c() {
- e = Qn(
+ e = Qo(
/*label*/
- l[0]
+ n[0]
);
},
- m(t, n) {
- Ze(t, e, n);
+ m(t, o) {
+ Ae(t, e, o);
},
- p(t, n) {
- n[0] & /*label*/
- 1 && Kn(
+ p(t, o) {
+ o[0] & /*label*/
+ 1 && Ko(
e,
/*label*/
t[0]
);
},
d(t) {
- t && Pe(e);
+ t && Ze(e);
}
};
}
-function li(l) {
- let e, t, n;
+function ol(n) {
+ let e, t, o;
return {
c() {
- e = xe("div"), X(e, "class", "textfield svelte-1atky07"), X(e, "data-testid", "highlighted-textbox"), X(e, "contenteditable", "true"), X(e, "role", "textbox"), X(e, "tabindex", "0"), /*el_text*/
- (l[11] === void 0 || /*marked_el_text*/
- l[12] === void 0) && ml(() => (
+ e = et("div"), x(e, "class", "textfield svelte-1atky07"), x(e, "data-testid", "highlighted-textbox"), x(e, "contenteditable", "true"), x(e, "role", "textbox"), x(e, "tabindex", "0"), /*el_text*/
+ (n[11] === void 0 || /*marked_el_text*/
+ n[12] === void 0) && hn(() => (
/*div_input_handler_1*/
- l[29].call(e)
+ n[29].call(e)
));
},
- m(i, o) {
- Ze(i, e, o), l[28](e), /*el_text*/
- l[11] !== void 0 && (e.textContent = /*el_text*/
- l[11]), /*marked_el_text*/
- l[12] !== void 0 && (e.innerHTML = /*marked_el_text*/
- l[12]), t || (n = [
- x(
+ m(l, i) {
+ Ae(l, e, i), n[28](e), /*el_text*/
+ n[11] !== void 0 && (e.textContent = /*el_text*/
+ n[11]), /*marked_el_text*/
+ n[12] !== void 0 && (e.innerHTML = /*marked_el_text*/
+ n[12]), t || (o = [
+ oe(
e,
"input",
/*div_input_handler_1*/
- l[29]
+ n[29]
),
- x(
+ oe(
e,
"blur",
/*blur_handler*/
- l[21]
+ n[21]
),
- x(
+ oe(
e,
"keypress",
/*keypress_handler*/
- l[22]
+ n[22]
),
- x(
+ oe(
e,
"select",
/*select_handler*/
- l[23]
+ n[23]
),
- x(
+ oe(
e,
"scroll",
/*scroll_handler*/
- l[24]
+ n[24]
),
- x(
+ oe(
e,
"input",
/*handle_change*/
- l[16]
+ n[16]
),
- x(
+ oe(
e,
"focus",
/*focus_handler*/
- l[25]
+ n[25]
),
- x(
+ oe(
e,
"change",
/*handle_change*/
- l[16]
+ n[16]
)
], t = !0);
},
- p(i, o) {
- o[0] & /*el_text*/
+ p(l, i) {
+ i[0] & /*el_text*/
2048 && /*el_text*/
- i[11] !== e.textContent && (e.textContent = /*el_text*/
- i[11]), o[0] & /*marked_el_text*/
+ l[11] !== e.textContent && (e.textContent = /*el_text*/
+ l[11]), i[0] & /*marked_el_text*/
4096 && /*marked_el_text*/
- i[12] !== e.innerHTML && (e.innerHTML = /*marked_el_text*/
- i[12]);
+ l[12] !== e.innerHTML && (e.innerHTML = /*marked_el_text*/
+ l[12]);
},
- d(i) {
- i && Pe(e), l[28](null), t = !1, Gn(n);
+ d(l) {
+ l && Ze(e), n[28](null), t = !1, Yo(o);
}
};
}
-function ni(l) {
- let e, t, n;
+function ll(n) {
+ let e, t, o;
return {
c() {
- e = xe("div"), X(e, "class", "textfield svelte-1atky07"), X(e, "data-testid", "highlighted-textbox"), X(e, "contenteditable", "false"), /*el_text*/
- (l[11] === void 0 || /*marked_el_text*/
- l[12] === void 0) && ml(() => (
+ e = et("div"), x(e, "class", "textfield svelte-1atky07"), x(e, "data-testid", "highlighted-textbox"), x(e, "contenteditable", "false"), /*el_text*/
+ (n[11] === void 0 || /*marked_el_text*/
+ n[12] === void 0) && hn(() => (
/*div_input_handler*/
- l[27].call(e)
+ n[27].call(e)
));
},
- m(i, o) {
- Ze(i, e, o), l[26](e), /*el_text*/
- l[11] !== void 0 && (e.textContent = /*el_text*/
- l[11]), /*marked_el_text*/
- l[12] !== void 0 && (e.innerHTML = /*marked_el_text*/
- l[12]), t || (n = x(
+ m(l, i) {
+ Ae(l, e, i), n[26](e), /*el_text*/
+ n[11] !== void 0 && (e.textContent = /*el_text*/
+ n[11]), /*marked_el_text*/
+ n[12] !== void 0 && (e.innerHTML = /*marked_el_text*/
+ n[12]), t || (o = oe(
e,
"input",
/*div_input_handler*/
- l[27]
+ n[27]
), t = !0);
},
- p(i, o) {
- o[0] & /*el_text*/
+ p(l, i) {
+ i[0] & /*el_text*/
2048 && /*el_text*/
- i[11] !== e.textContent && (e.textContent = /*el_text*/
- i[11]), o[0] & /*marked_el_text*/
+ l[11] !== e.textContent && (e.textContent = /*el_text*/
+ l[11]), i[0] & /*marked_el_text*/
4096 && /*marked_el_text*/
- i[12] !== e.innerHTML && (e.innerHTML = /*marked_el_text*/
- i[12]);
+ l[12] !== e.innerHTML && (e.innerHTML = /*marked_el_text*/
+ l[12]);
},
- d(i) {
- i && Pe(e), l[26](null), t = !1, n();
+ d(l) {
+ l && Ze(e), n[26](null), t = !1, o();
}
};
}
-function ii(l) {
- let e, t, n, i, o, s;
- t = new El({
+function il(n) {
+ let e, t, o, l, i, s;
+ t = new En({
props: {
show_label: (
/*show_label*/
- l[3]
+ n[3]
),
show_legend: (
/*show_legend*/
- l[4]
+ n[4]
),
show_legend_label: (
/*show_legend_label*/
- l[5]
+ n[5]
),
legend_label: (
/*legend_label*/
- l[1]
+ n[1]
),
_color_map: (
/*_color_map*/
- l[13]
+ n[13]
),
info: (
/*info*/
- l[2]
+ n[2]
),
- $$slots: { default: [ti] },
- $$scope: { ctx: l }
+ $$slots: { default: [nl] },
+ $$scope: { ctx: n }
}
- }), i = new Pn({
+ }), l = new Zo({
props: {
show_copy_button: (
/*show_copy_button*/
- l[7]
+ n[7]
),
show_remove_tags_button: (
/*show_remove_tags_button*/
- l[8] && !/*tags_removed*/
- l[14]
+ n[8] && !/*tags_removed*/
+ n[14]
),
value: (
/*tagged_text*/
- l[15]
+ n[15]
)
}
- }), i.$on(
+ }), l.$on(
"clear",
/*handle_remove_tags*/
- l[17]
+ n[17]
);
- function f(r, u) {
+ function _(f, c) {
return (
/*disabled*/
- r[9] ? ni : li
+ f[9] ? ll : ol
);
}
- let a = f(l), _ = a(l);
+ let r = _(n), a = r(n);
return {
c() {
- e = xe("label"), Tt(t.$$.fragment), n = Ft(), Tt(i.$$.fragment), o = Ft(), _.c(), X(e, "for", "highlighted-textbox"), X(e, "class", "svelte-1atky07"), Ht(
+ e = et("label"), Mt(t.$$.fragment), o = Ft(), Mt(l.$$.fragment), i = Ft(), a.c(), x(e, "for", "highlighted-textbox"), x(e, "class", "svelte-1atky07"), Ht(
e,
"container",
/*container*/
- l[6]
+ n[6]
);
},
- m(r, u) {
- Ze(r, e, u), jt(t, e, null), qt(e, n), jt(i, e, null), qt(e, o), _.m(e, null), s = !0;
- },
- p(r, u) {
- const c = {};
- u[0] & /*show_label*/
- 8 && (c.show_label = /*show_label*/
- r[3]), u[0] & /*show_legend*/
- 16 && (c.show_legend = /*show_legend*/
- r[4]), u[0] & /*show_legend_label*/
- 32 && (c.show_legend_label = /*show_legend_label*/
- r[5]), u[0] & /*legend_label*/
- 2 && (c.legend_label = /*legend_label*/
- r[1]), u[0] & /*_color_map*/
- 8192 && (c._color_map = /*_color_map*/
- r[13]), u[0] & /*info*/
- 4 && (c.info = /*info*/
- r[2]), u[0] & /*label*/
- 1 | u[1] & /*$$scope*/
- 512 && (c.$$scope = { dirty: u, ctx: r }), t.$set(c);
+ m(f, c) {
+ Ae(f, e, c), Tt(t, e, null), yt(e, o), Tt(l, e, null), yt(e, i), a.m(e, null), s = !0;
+ },
+ p(f, c) {
+ const u = {};
+ c[0] & /*show_label*/
+ 8 && (u.show_label = /*show_label*/
+ f[3]), c[0] & /*show_legend*/
+ 16 && (u.show_legend = /*show_legend*/
+ f[4]), c[0] & /*show_legend_label*/
+ 32 && (u.show_legend_label = /*show_legend_label*/
+ f[5]), c[0] & /*legend_label*/
+ 2 && (u.legend_label = /*legend_label*/
+ f[1]), c[0] & /*_color_map*/
+ 8192 && (u._color_map = /*_color_map*/
+ f[13]), c[0] & /*info*/
+ 4 && (u.info = /*info*/
+ f[2]), c[0] & /*label*/
+ 1 | c[1] & /*$$scope*/
+ 512 && (u.$$scope = { dirty: c, ctx: f }), t.$set(u);
const m = {};
- u[0] & /*show_copy_button*/
+ c[0] & /*show_copy_button*/
128 && (m.show_copy_button = /*show_copy_button*/
- r[7]), u[0] & /*show_remove_tags_button, tags_removed*/
+ f[7]), c[0] & /*show_remove_tags_button, tags_removed*/
16640 && (m.show_remove_tags_button = /*show_remove_tags_button*/
- r[8] && !/*tags_removed*/
- r[14]), u[0] & /*tagged_text*/
+ f[8] && !/*tags_removed*/
+ f[14]), c[0] & /*tagged_text*/
32768 && (m.value = /*tagged_text*/
- r[15]), i.$set(m), a === (a = f(r)) && _ ? _.p(r, u) : (_.d(1), _ = a(r), _ && (_.c(), _.m(e, null))), (!s || u[0] & /*container*/
+ f[15]), l.$set(m), r === (r = _(f)) && a ? a.p(f, c) : (a.d(1), a = r(f), a && (a.c(), a.m(e, null))), (!s || c[0] & /*container*/
64) && Ht(
e,
"container",
/*container*/
- r[6]
+ f[6]
);
},
- i(r) {
- s || (Mt(t.$$.fragment, r), Mt(i.$$.fragment, r), s = !0);
+ i(f) {
+ s || (Nt(t.$$.fragment, f), Nt(l.$$.fragment, f), s = !0);
},
- o(r) {
- Nt(t.$$.fragment, r), Nt(i.$$.fragment, r), s = !1;
+ o(f) {
+ Vt(t.$$.fragment, f), Vt(l.$$.fragment, f), s = !1;
},
- d(r) {
- r && Pe(e), Lt(t), Lt(i), _.d();
+ d(f) {
+ f && Ze(e), jt(t), jt(l), a.d();
}
};
}
-function oi(l, e, t) {
- const n = typeof document < "u";
- let { value: i = [] } = e, { value_is_output: o = !1 } = e, { label: s } = e, { legend_label: f } = e, { info: a = void 0 } = e, { show_label: _ = !0 } = e, { show_legend: r = !1 } = e, { show_legend_label: u = !1 } = e, { container: c = !0 } = e, { color_map: m = {} } = e, { show_copy_button: k = !1 } = e, { show_remove_tags_button: j = !1 } = e, { disabled: T } = e, S, y = "", d = "", C, L, h = {}, Z = !1, J = "";
- function E() {
- L = !m || Object.keys(m).length === 0 ? {} : m;
- for (let g in L)
- i.map(([M, F]) => F).includes(g) || delete L[g];
- if (i.length > 0) {
- for (let [g, M] of i)
- if (M !== null && !(M in L)) {
- let F = On(Object.keys(L).length);
- L[M] = F;
+function sl(n, e, t) {
+ const o = typeof document < "u";
+ let { value: l = [] } = e, { value_is_output: i = !1 } = e, { label: s } = e, { legend_label: _ } = e, { info: r = void 0 } = e, { show_label: a = !0 } = e, { show_legend: f = !1 } = e, { show_legend_label: c = !1 } = e, { container: u = !0 } = e, { color_map: m = {} } = e, { show_copy_button: b = !1 } = e, { show_remove_tags_button: k = !1 } = e, { disabled: y } = e, L, w = "", d = "", q, M, g = {}, N = !1, E = "";
+ function Z() {
+ M = !m || Object.keys(m).length === 0 ? {} : m;
+ for (let p in M)
+ l.map(([j, T]) => T).includes(p) || delete M[p];
+ if (l.length > 0) {
+ for (let [p, j] of l)
+ if (j !== null && !(j in M)) {
+ let T = Bo(Object.keys(M).length);
+ M[j] = T;
}
}
- t(13, h = An(L, n, C));
+ t(13, g = Io(M, o, q));
}
- function O(g) {
- i.length > 0 && g && (t(11, y = i.map(([M, F]) => M).join("")), t(12, d = i.map(([M, F]) => F !== null ? `${M}` : M).join("")), t(15, J = i.map(([M, F]) => F !== null ? `<${F}>${M}${F}>` : M).join("")));
+ function X(p) {
+ l.length > 0 && p && (t(11, w = l.map(([j, T]) => j).join("")), t(12, d = l.map(([j, T]) => T !== null ? `${j}` : j).join("")), t(15, E = l.map(([j, T]) => T !== null ? `<${T}>${j}${T}>` : j).join("")));
}
- const R = ei();
- xn(() => {
- S && S.offsetHeight + S.scrollTop > S.scrollHeight - 100;
+ const A = tl();
+ xo(() => {
+ L && L.offsetHeight + L.scrollTop > L.scrollHeight - 100;
});
- function ae() {
- D(), A(), R("change", i), o || R("input", i);
+ function ue() {
+ B(), G(), A("change", l), i || A("input", l);
}
- $n(() => {
- E(), O(o), t(19, o = !1);
+ el(() => {
+ Z(), X(i), t(19, i = !1);
});
- function A() {
- let g = [], M = "", F = null, ee = !1, be = "", we = d.replace(/ |&|<|>/g, function(te) {
+ function G() {
+ let p = [], j = "", T = null, z = !1, U = "", Q = d.replace(/ |&|<|>/g, function(D) {
return {
" ": " ",
"&": "&",
"<": "<",
">": ">"
- }[te];
+ }[D];
});
- for (let te = 0; te < we.length; te++) {
- let Q = we[te];
- if (Q === "<")
- ee = !0, M && g.push([M, F]), M = "", F = null;
- else if (Q === ">") {
- if (ee = !1, be.slice(0, 4) === "mark") {
- let Ne = /class="hl ([^"]+)"/.exec(be);
- F = Ne ? Ne[1] : null;
+ for (let D = 0; D < Q.length; D++) {
+ let R = Q[D];
+ if (R === "<" && D + 5 <= Q.length && Q.slice(D + 1, D + 5) === "mark")
+ z = !0, j && p.push([j, T]), j = "", T = null;
+ else if (R === ">" && z) {
+ if (z = !1, U.slice(0, 4) === "mark") {
+ let I = /class="hl ([^"]+)"/.exec(U);
+ T = I ? I[1] : null;
}
- be = "";
- } else
- ee ? be += Q : M += Q;
+ U = "";
+ } else z ? U += R : j += R;
}
- M && g.push([M, F]), t(18, i = g);
- }
- function K() {
- t(12, d = y), ae(), t(14, Z = !0), R("clear");
- }
- function D() {
- const g = window.getSelection(), M = g.anchorOffset;
- if (g.rangeCount > 0) {
- var F = g.getRangeAt(0).commonAncestorContainer.parentElement;
- if (F && F.tagName.toLowerCase() === "mark") {
- const Ne = F.textContent;
- var ee = F.parentElement, be = document.createTextNode(Ne);
- ee.replaceChild(be, F), t(12, d = ee.innerHTML);
- var we = document.createRange(), te = window.getSelection();
- const kl = M + In(ee);
- var Q = Un(ee, kl);
- we.setStart(Q.node, Q.offset), we.setEnd(Q.node, Q.offset), te.removeAllRanges(), te.addRange(we);
+ j && p.push([j, T]), t(18, l = p);
+ }
+ function ne() {
+ t(12, d = w), ue(), t(14, N = !0), A("clear");
+ }
+ function B() {
+ const p = window.getSelection(), j = p.anchorOffset;
+ if (p.rangeCount > 0) {
+ var T = p.getRangeAt(0).commonAncestorContainer.parentElement;
+ if (T && T.tagName.toLowerCase() === "mark") {
+ const I = T.textContent;
+ var z = T.parentElement, U = document.createTextNode(I);
+ z.replaceChild(U, T), t(12, d = z.innerHTML);
+ var Q = document.createRange(), D = window.getSelection();
+ const je = j + Wo(z);
+ var R = Xo(z, je);
+ Q.setStart(R.node, R.offset), Q.setEnd(R.node, R.offset), D.removeAllRanges(), D.addRange(Q);
}
}
}
- function me(g) {
- je.call(this, l, g);
+ function he(p) {
+ Te.call(this, n, p);
}
- function Le(g) {
- je.call(this, l, g);
+ function Me(p) {
+ Te.call(this, n, p);
}
- function ge(g) {
- je.call(this, l, g);
+ function ve(p) {
+ Te.call(this, n, p);
}
- function b(g) {
- je.call(this, l, g);
+ function h(p) {
+ Te.call(this, n, p);
}
- function he(g) {
- je.call(this, l, g);
+ function be(p) {
+ Te.call(this, n, p);
}
- function Oe(g) {
- St[g ? "unshift" : "push"](() => {
- S = g, t(10, S);
+ function Be(p) {
+ Lt[p ? "unshift" : "push"](() => {
+ L = p, t(10, L);
});
}
- function Ae() {
- y = this.textContent, d = this.innerHTML, t(11, y), t(12, d);
+ function Ie() {
+ w = this.textContent, d = this.innerHTML, t(11, w), t(12, d);
}
- function w(g) {
- St[g ? "unshift" : "push"](() => {
- S = g, t(10, S);
+ function v(p) {
+ Lt[p ? "unshift" : "push"](() => {
+ L = p, t(10, L);
});
}
- function pl() {
- y = this.textContent, d = this.innerHTML, t(11, y), t(12, d);
+ function Pe() {
+ w = this.textContent, d = this.innerHTML, t(11, w), t(12, d);
}
- return l.$$set = (g) => {
- "value" in g && t(18, i = g.value), "value_is_output" in g && t(19, o = g.value_is_output), "label" in g && t(0, s = g.label), "legend_label" in g && t(1, f = g.legend_label), "info" in g && t(2, a = g.info), "show_label" in g && t(3, _ = g.show_label), "show_legend" in g && t(4, r = g.show_legend), "show_legend_label" in g && t(5, u = g.show_legend_label), "container" in g && t(6, c = g.container), "color_map" in g && t(20, m = g.color_map), "show_copy_button" in g && t(7, k = g.show_copy_button), "show_remove_tags_button" in g && t(8, j = g.show_remove_tags_button), "disabled" in g && t(9, T = g.disabled);
- }, E(), O(!0), [
+ return n.$$set = (p) => {
+ "value" in p && t(18, l = p.value), "value_is_output" in p && t(19, i = p.value_is_output), "label" in p && t(0, s = p.label), "legend_label" in p && t(1, _ = p.legend_label), "info" in p && t(2, r = p.info), "show_label" in p && t(3, a = p.show_label), "show_legend" in p && t(4, f = p.show_legend), "show_legend_label" in p && t(5, c = p.show_legend_label), "container" in p && t(6, u = p.container), "color_map" in p && t(20, m = p.color_map), "show_copy_button" in p && t(7, b = p.show_copy_button), "show_remove_tags_button" in p && t(8, k = p.show_remove_tags_button), "disabled" in p && t(9, y = p.disabled);
+ }, Z(), X(!0), [
s,
- f,
- a,
_,
r,
- u,
+ a,
+ f,
c,
+ u,
+ b,
k,
- j,
- T,
- S,
y,
+ L,
+ w,
d,
- h,
- Z,
- J,
- ae,
- K,
+ g,
+ N,
+ E,
+ ue,
+ ne,
+ l,
i,
- o,
m,
- me,
- Le,
- ge,
- b,
he,
- Oe,
- Ae,
- w,
- pl
+ Me,
+ ve,
+ h,
+ be,
+ Be,
+ Ie,
+ v,
+ Pe
];
}
-class si extends Xn {
+class al extends Go {
constructor(e) {
- super(), Yn(
+ super(), Uo(
this,
e,
- oi,
- ii,
- Jn,
+ sl,
+ il,
+ Jo,
{
value: 18,
value_is_output: 19,
@@ -1559,282 +2123,282 @@ class si extends Xn {
}
}
const {
- SvelteComponent: fi,
- assign: _i,
- create_slot: ai,
- detach: ri,
- element: ui,
- get_all_dirty_from_scope: ci,
- get_slot_changes: di,
- get_spread_update: mi,
- init: gi,
- insert: hi,
- safe_not_equal: bi,
- set_dynamic_element_data: Vt,
- set_style: z,
- toggle_class: ne,
- transition_in: gl,
- transition_out: hl,
- update_slot_base: wi
+ SvelteComponent: _l,
+ assign: rl,
+ create_slot: fl,
+ detach: cl,
+ element: ul,
+ get_all_dirty_from_scope: dl,
+ get_slot_changes: ml,
+ get_spread_update: pl,
+ init: gl,
+ insert: hl,
+ safe_not_equal: vl,
+ set_dynamic_element_data: zt,
+ set_style: O,
+ toggle_class: se,
+ transition_in: vn,
+ transition_out: bn,
+ update_slot_base: bl
} = window.__gradio__svelte__internal;
-function vi(l) {
- let e, t, n;
- const i = (
+function wl(n) {
+ let e, t, o;
+ const l = (
/*#slots*/
- l[18].default
- ), o = ai(
- i,
+ n[18].default
+ ), i = fl(
l,
+ n,
/*$$scope*/
- l[17],
+ n[17],
null
);
let s = [
{ "data-testid": (
/*test_id*/
- l[7]
+ n[7]
) },
{ id: (
/*elem_id*/
- l[2]
+ n[2]
) },
{
class: t = "block " + /*elem_classes*/
- l[3].join(" ") + " svelte-1t38q2d"
+ n[3].join(" ") + " svelte-1t38q2d"
}
- ], f = {};
- for (let a = 0; a < s.length; a += 1)
- f = _i(f, s[a]);
+ ], _ = {};
+ for (let r = 0; r < s.length; r += 1)
+ _ = rl(_, s[r]);
return {
c() {
- e = ui(
+ e = ul(
/*tag*/
- l[14]
- ), o && o.c(), Vt(
+ n[14]
+ ), i && i.c(), zt(
/*tag*/
- l[14]
- )(e, f), ne(
+ n[14]
+ )(e, _), se(
e,
"hidden",
/*visible*/
- l[10] === !1
- ), ne(
+ n[10] === !1
+ ), se(
e,
"padded",
/*padding*/
- l[6]
- ), ne(
+ n[6]
+ ), se(
e,
"border_focus",
/*border_mode*/
- l[5] === "focus"
- ), ne(e, "hide-container", !/*explicit_call*/
- l[8] && !/*container*/
- l[9]), z(
+ n[5] === "focus"
+ ), se(e, "hide-container", !/*explicit_call*/
+ n[8] && !/*container*/
+ n[9]), O(
e,
"height",
/*get_dimension*/
- l[15](
+ n[15](
/*height*/
- l[0]
+ n[0]
)
- ), z(e, "width", typeof /*width*/
- l[1] == "number" ? `calc(min(${/*width*/
- l[1]}px, 100%))` : (
+ ), O(e, "width", typeof /*width*/
+ n[1] == "number" ? `calc(min(${/*width*/
+ n[1]}px, 100%))` : (
/*get_dimension*/
- l[15](
+ n[15](
/*width*/
- l[1]
+ n[1]
)
- )), z(
+ )), O(
e,
"border-style",
/*variant*/
- l[4]
- ), z(
+ n[4]
+ ), O(
e,
"overflow",
/*allow_overflow*/
- l[11] ? "visible" : "hidden"
- ), z(
+ n[11] ? "visible" : "hidden"
+ ), O(
e,
"flex-grow",
/*scale*/
- l[12]
- ), z(e, "min-width", `calc(min(${/*min_width*/
- l[13]}px, 100%))`), z(e, "border-width", "var(--block-border-width)");
+ n[12]
+ ), O(e, "min-width", `calc(min(${/*min_width*/
+ n[13]}px, 100%))`), O(e, "border-width", "var(--block-border-width)");
},
- m(a, _) {
- hi(a, e, _), o && o.m(e, null), n = !0;
+ m(r, a) {
+ hl(r, e, a), i && i.m(e, null), o = !0;
},
- p(a, _) {
- o && o.p && (!n || _ & /*$$scope*/
- 131072) && wi(
- o,
+ p(r, a) {
+ i && i.p && (!o || a & /*$$scope*/
+ 131072) && bl(
i,
- a,
+ l,
+ r,
/*$$scope*/
- a[17],
- n ? di(
- i,
+ r[17],
+ o ? ml(
+ l,
/*$$scope*/
- a[17],
- _,
+ r[17],
+ a,
null
- ) : ci(
+ ) : dl(
/*$$scope*/
- a[17]
+ r[17]
),
null
- ), Vt(
+ ), zt(
/*tag*/
- a[14]
- )(e, f = mi(s, [
- (!n || _ & /*test_id*/
+ r[14]
+ )(e, _ = pl(s, [
+ (!o || a & /*test_id*/
128) && { "data-testid": (
/*test_id*/
- a[7]
+ r[7]
) },
- (!n || _ & /*elem_id*/
+ (!o || a & /*elem_id*/
4) && { id: (
/*elem_id*/
- a[2]
+ r[2]
) },
- (!n || _ & /*elem_classes*/
+ (!o || a & /*elem_classes*/
8 && t !== (t = "block " + /*elem_classes*/
- a[3].join(" ") + " svelte-1t38q2d")) && { class: t }
- ])), ne(
+ r[3].join(" ") + " svelte-1t38q2d")) && { class: t }
+ ])), se(
e,
"hidden",
/*visible*/
- a[10] === !1
- ), ne(
+ r[10] === !1
+ ), se(
e,
"padded",
/*padding*/
- a[6]
- ), ne(
+ r[6]
+ ), se(
e,
"border_focus",
/*border_mode*/
- a[5] === "focus"
- ), ne(e, "hide-container", !/*explicit_call*/
- a[8] && !/*container*/
- a[9]), _ & /*height*/
- 1 && z(
+ r[5] === "focus"
+ ), se(e, "hide-container", !/*explicit_call*/
+ r[8] && !/*container*/
+ r[9]), a & /*height*/
+ 1 && O(
e,
"height",
/*get_dimension*/
- a[15](
+ r[15](
/*height*/
- a[0]
+ r[0]
)
- ), _ & /*width*/
- 2 && z(e, "width", typeof /*width*/
- a[1] == "number" ? `calc(min(${/*width*/
- a[1]}px, 100%))` : (
+ ), a & /*width*/
+ 2 && O(e, "width", typeof /*width*/
+ r[1] == "number" ? `calc(min(${/*width*/
+ r[1]}px, 100%))` : (
/*get_dimension*/
- a[15](
+ r[15](
/*width*/
- a[1]
+ r[1]
)
- )), _ & /*variant*/
- 16 && z(
+ )), a & /*variant*/
+ 16 && O(
e,
"border-style",
/*variant*/
- a[4]
- ), _ & /*allow_overflow*/
- 2048 && z(
+ r[4]
+ ), a & /*allow_overflow*/
+ 2048 && O(
e,
"overflow",
/*allow_overflow*/
- a[11] ? "visible" : "hidden"
- ), _ & /*scale*/
- 4096 && z(
+ r[11] ? "visible" : "hidden"
+ ), a & /*scale*/
+ 4096 && O(
e,
"flex-grow",
/*scale*/
- a[12]
- ), _ & /*min_width*/
- 8192 && z(e, "min-width", `calc(min(${/*min_width*/
- a[13]}px, 100%))`);
+ r[12]
+ ), a & /*min_width*/
+ 8192 && O(e, "min-width", `calc(min(${/*min_width*/
+ r[13]}px, 100%))`);
},
- i(a) {
- n || (gl(o, a), n = !0);
+ i(r) {
+ o || (vn(i, r), o = !0);
},
- o(a) {
- hl(o, a), n = !1;
+ o(r) {
+ bn(i, r), o = !1;
},
- d(a) {
- a && ri(e), o && o.d(a);
+ d(r) {
+ r && cl(e), i && i.d(r);
}
};
}
-function pi(l) {
+function $l(n) {
let e, t = (
/*tag*/
- l[14] && vi(l)
+ n[14] && wl(n)
);
return {
c() {
t && t.c();
},
- m(n, i) {
- t && t.m(n, i), e = !0;
+ m(o, l) {
+ t && t.m(o, l), e = !0;
},
- p(n, [i]) {
+ p(o, [l]) {
/*tag*/
- n[14] && t.p(n, i);
+ o[14] && t.p(o, l);
},
- i(n) {
- e || (gl(t, n), e = !0);
+ i(o) {
+ e || (vn(t, o), e = !0);
},
- o(n) {
- hl(t, n), e = !1;
+ o(o) {
+ bn(t, o), e = !1;
},
- d(n) {
- t && t.d(n);
+ d(o) {
+ t && t.d(o);
}
};
}
-function ki(l, e, t) {
- let { $$slots: n = {}, $$scope: i } = e, { height: o = void 0 } = e, { width: s = void 0 } = e, { elem_id: f = "" } = e, { elem_classes: a = [] } = e, { variant: _ = "solid" } = e, { border_mode: r = "base" } = e, { padding: u = !0 } = e, { type: c = "normal" } = e, { test_id: m = void 0 } = e, { explicit_call: k = !1 } = e, { container: j = !0 } = e, { visible: T = !0 } = e, { allow_overflow: S = !0 } = e, { scale: y = null } = e, { min_width: d = 0 } = e, C = c === "fieldset" ? "fieldset" : "div";
- const L = (h) => {
- if (h !== void 0) {
- if (typeof h == "number")
- return h + "px";
- if (typeof h == "string")
- return h;
+function Cl(n, e, t) {
+ let { $$slots: o = {}, $$scope: l } = e, { height: i = void 0 } = e, { width: s = void 0 } = e, { elem_id: _ = "" } = e, { elem_classes: r = [] } = e, { variant: a = "solid" } = e, { border_mode: f = "base" } = e, { padding: c = !0 } = e, { type: u = "normal" } = e, { test_id: m = void 0 } = e, { explicit_call: b = !1 } = e, { container: k = !0 } = e, { visible: y = !0 } = e, { allow_overflow: L = !0 } = e, { scale: w = null } = e, { min_width: d = 0 } = e, q = u === "fieldset" ? "fieldset" : "div";
+ const M = (g) => {
+ if (g !== void 0) {
+ if (typeof g == "number")
+ return g + "px";
+ if (typeof g == "string")
+ return g;
}
};
- return l.$$set = (h) => {
- "height" in h && t(0, o = h.height), "width" in h && t(1, s = h.width), "elem_id" in h && t(2, f = h.elem_id), "elem_classes" in h && t(3, a = h.elem_classes), "variant" in h && t(4, _ = h.variant), "border_mode" in h && t(5, r = h.border_mode), "padding" in h && t(6, u = h.padding), "type" in h && t(16, c = h.type), "test_id" in h && t(7, m = h.test_id), "explicit_call" in h && t(8, k = h.explicit_call), "container" in h && t(9, j = h.container), "visible" in h && t(10, T = h.visible), "allow_overflow" in h && t(11, S = h.allow_overflow), "scale" in h && t(12, y = h.scale), "min_width" in h && t(13, d = h.min_width), "$$scope" in h && t(17, i = h.$$scope);
+ return n.$$set = (g) => {
+ "height" in g && t(0, i = g.height), "width" in g && t(1, s = g.width), "elem_id" in g && t(2, _ = g.elem_id), "elem_classes" in g && t(3, r = g.elem_classes), "variant" in g && t(4, a = g.variant), "border_mode" in g && t(5, f = g.border_mode), "padding" in g && t(6, c = g.padding), "type" in g && t(16, u = g.type), "test_id" in g && t(7, m = g.test_id), "explicit_call" in g && t(8, b = g.explicit_call), "container" in g && t(9, k = g.container), "visible" in g && t(10, y = g.visible), "allow_overflow" in g && t(11, L = g.allow_overflow), "scale" in g && t(12, w = g.scale), "min_width" in g && t(13, d = g.min_width), "$$scope" in g && t(17, l = g.$$scope);
}, [
- o,
+ i,
s,
- f,
- a,
_,
r,
- u,
+ a,
+ f,
+ c,
m,
+ b,
k,
- j,
- T,
- S,
y,
- d,
- C,
L,
- c,
- i,
- n
+ w,
+ d,
+ q,
+ M,
+ u,
+ l,
+ o
];
}
-class yi extends fi {
+class ql extends _l {
constructor(e) {
- super(), gi(this, e, ki, pi, bi, {
+ super(), gl(this, e, Cl, $l, vl, {
height: 0,
width: 1,
elem_id: 2,
@@ -1853,54 +2417,213 @@ class yi extends fi {
});
}
}
-function ke(l) {
+const {
+ SvelteComponent: w0,
+ attr: $0,
+ create_slot: C0,
+ detach: q0,
+ element: k0,
+ get_all_dirty_from_scope: S0,
+ get_slot_changes: y0,
+ init: L0,
+ insert: M0,
+ safe_not_equal: j0,
+ transition_in: T0,
+ transition_out: F0,
+ update_slot_base: H0
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: N0,
+ attr: V0,
+ check_outros: z0,
+ create_component: E0,
+ create_slot: D0,
+ destroy_component: R0,
+ detach: O0,
+ element: Z0,
+ empty: A0,
+ get_all_dirty_from_scope: B0,
+ get_slot_changes: I0,
+ group_outros: P0,
+ init: W0,
+ insert: X0,
+ mount_component: G0,
+ safe_not_equal: U0,
+ set_data: Y0,
+ space: J0,
+ text: K0,
+ toggle_class: Q0,
+ transition_in: x0,
+ transition_out: e1,
+ update_slot_base: t1
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: n1,
+ append: o1,
+ attr: l1,
+ create_component: i1,
+ destroy_component: s1,
+ detach: a1,
+ element: _1,
+ init: r1,
+ insert: f1,
+ mount_component: c1,
+ safe_not_equal: u1,
+ set_data: d1,
+ space: m1,
+ text: p1,
+ toggle_class: g1,
+ transition_in: h1,
+ transition_out: v1
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: b1,
+ append: w1,
+ attr: $1,
+ bubble: C1,
+ create_component: q1,
+ destroy_component: k1,
+ detach: S1,
+ element: y1,
+ init: L1,
+ insert: M1,
+ listen: j1,
+ mount_component: T1,
+ safe_not_equal: F1,
+ set_data: H1,
+ set_style: N1,
+ space: V1,
+ text: z1,
+ toggle_class: E1,
+ transition_in: D1,
+ transition_out: R1
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: O1,
+ append: Z1,
+ attr: A1,
+ binding_callbacks: B1,
+ create_slot: I1,
+ detach: P1,
+ element: W1,
+ get_all_dirty_from_scope: X1,
+ get_slot_changes: G1,
+ init: U1,
+ insert: Y1,
+ safe_not_equal: J1,
+ toggle_class: K1,
+ transition_in: Q1,
+ transition_out: x1,
+ update_slot_base: em
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: tm,
+ create_component: nm,
+ destroy_component: om,
+ init: lm,
+ mount_component: im,
+ safe_not_equal: sm,
+ transition_in: am,
+ transition_out: _m
+} = window.__gradio__svelte__internal, { createEventDispatcher: rm } = window.__gradio__svelte__internal, {
+ SvelteComponent: fm,
+ append: cm,
+ attr: um,
+ check_outros: dm,
+ create_component: mm,
+ destroy_component: pm,
+ detach: gm,
+ element: hm,
+ group_outros: vm,
+ init: bm,
+ insert: wm,
+ mount_component: $m,
+ safe_not_equal: Cm,
+ set_data: qm,
+ space: km,
+ text: Sm,
+ toggle_class: ym,
+ transition_in: Lm,
+ transition_out: Mm
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: jm,
+ attr: Tm,
+ create_slot: Fm,
+ detach: Hm,
+ element: Nm,
+ get_all_dirty_from_scope: Vm,
+ get_slot_changes: zm,
+ init: Em,
+ insert: Dm,
+ safe_not_equal: Rm,
+ toggle_class: Om,
+ transition_in: Zm,
+ transition_out: Am,
+ update_slot_base: Bm
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: Im,
+ append: Pm,
+ attr: Wm,
+ check_outros: Xm,
+ create_component: Gm,
+ destroy_component: Um,
+ detach: Ym,
+ element: Jm,
+ empty: Km,
+ group_outros: Qm,
+ init: xm,
+ insert: ep,
+ listen: tp,
+ mount_component: np,
+ safe_not_equal: op,
+ space: lp,
+ toggle_class: ip,
+ transition_in: sp,
+ transition_out: ap
+} = window.__gradio__svelte__internal;
+function Ce(n) {
let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0;
- for (; l > 1e3 && t < e.length - 1; )
- l /= 1e3, t++;
- let n = e[t];
- return (Number.isInteger(l) ? l : l.toFixed(1)) + n;
+ for (; n > 1e3 && t < e.length - 1; )
+ n /= 1e3, t++;
+ let o = e[t];
+ return (Number.isInteger(n) ? n : n.toFixed(1)) + o;
}
const {
- SvelteComponent: Ci,
- append: W,
- attr: q,
- component_subscribe: zt,
- detach: qi,
- element: Si,
- init: Ti,
- insert: Li,
- noop: Et,
- safe_not_equal: ji,
+ SvelteComponent: kl,
+ append: Y,
+ attr: S,
+ component_subscribe: Et,
+ detach: Sl,
+ element: yl,
+ init: Ll,
+ insert: Ml,
+ noop: Dt,
+ safe_not_equal: jl,
set_style: ze,
- svg_element: I,
+ svg_element: J,
toggle_class: Rt
-} = window.__gradio__svelte__internal, { onMount: Fi } = window.__gradio__svelte__internal;
-function Hi(l) {
- let e, t, n, i, o, s, f, a, _, r, u, c;
+} = window.__gradio__svelte__internal, { onMount: Tl } = window.__gradio__svelte__internal;
+function Fl(n) {
+ let e, t, o, l, i, s, _, r, a, f, c, u;
return {
c() {
- e = Si("div"), t = I("svg"), n = I("g"), i = I("path"), o = I("path"), s = I("path"), f = I("path"), a = I("g"), _ = I("path"), r = I("path"), u = I("path"), c = I("path"), q(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), q(i, "fill", "#FF7C00"), q(i, "fill-opacity", "0.4"), q(i, "class", "svelte-43sxxs"), q(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), q(o, "fill", "#FF7C00"), q(o, "class", "svelte-43sxxs"), q(s, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), q(s, "fill", "#FF7C00"), q(s, "fill-opacity", "0.4"), q(s, "class", "svelte-43sxxs"), q(f, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), q(f, "fill", "#FF7C00"), q(f, "class", "svelte-43sxxs"), ze(n, "transform", "translate(" + /*$top*/
- l[1][0] + "px, " + /*$top*/
- l[1][1] + "px)"), q(_, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), q(_, "fill", "#FF7C00"), q(_, "fill-opacity", "0.4"), q(_, "class", "svelte-43sxxs"), q(r, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), q(r, "fill", "#FF7C00"), q(r, "class", "svelte-43sxxs"), q(u, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), q(u, "fill", "#FF7C00"), q(u, "fill-opacity", "0.4"), q(u, "class", "svelte-43sxxs"), q(c, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), q(c, "fill", "#FF7C00"), q(c, "class", "svelte-43sxxs"), ze(a, "transform", "translate(" + /*$bottom*/
- l[2][0] + "px, " + /*$bottom*/
- l[2][1] + "px)"), q(t, "viewBox", "-1200 -1200 3000 3000"), q(t, "fill", "none"), q(t, "xmlns", "http://www.w3.org/2000/svg"), q(t, "class", "svelte-43sxxs"), q(e, "class", "svelte-43sxxs"), Rt(
+ e = yl("div"), t = J("svg"), o = J("g"), l = J("path"), i = J("path"), s = J("path"), _ = J("path"), r = J("g"), a = J("path"), f = J("path"), c = J("path"), u = J("path"), S(l, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), S(l, "fill", "#FF7C00"), S(l, "fill-opacity", "0.4"), S(l, "class", "svelte-43sxxs"), S(i, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), S(i, "fill", "#FF7C00"), S(i, "class", "svelte-43sxxs"), S(s, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), S(s, "fill", "#FF7C00"), S(s, "fill-opacity", "0.4"), S(s, "class", "svelte-43sxxs"), S(_, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), S(_, "fill", "#FF7C00"), S(_, "class", "svelte-43sxxs"), ze(o, "transform", "translate(" + /*$top*/
+ n[1][0] + "px, " + /*$top*/
+ n[1][1] + "px)"), S(a, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), S(a, "fill", "#FF7C00"), S(a, "fill-opacity", "0.4"), S(a, "class", "svelte-43sxxs"), S(f, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), S(f, "fill", "#FF7C00"), S(f, "class", "svelte-43sxxs"), S(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), S(c, "fill", "#FF7C00"), S(c, "fill-opacity", "0.4"), S(c, "class", "svelte-43sxxs"), S(u, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), S(u, "fill", "#FF7C00"), S(u, "class", "svelte-43sxxs"), ze(r, "transform", "translate(" + /*$bottom*/
+ n[2][0] + "px, " + /*$bottom*/
+ n[2][1] + "px)"), S(t, "viewBox", "-1200 -1200 3000 3000"), S(t, "fill", "none"), S(t, "xmlns", "http://www.w3.org/2000/svg"), S(t, "class", "svelte-43sxxs"), S(e, "class", "svelte-43sxxs"), Rt(
e,
"margin",
/*margin*/
- l[0]
+ n[0]
);
},
- m(m, k) {
- Li(m, e, k), W(e, t), W(t, n), W(n, i), W(n, o), W(n, s), W(n, f), W(t, a), W(a, _), W(a, r), W(a, u), W(a, c);
+ m(m, b) {
+ Ml(m, e, b), Y(e, t), Y(t, o), Y(o, l), Y(o, i), Y(o, s), Y(o, _), Y(t, r), Y(r, a), Y(r, f), Y(r, c), Y(r, u);
},
- p(m, [k]) {
- k & /*$top*/
- 2 && ze(n, "transform", "translate(" + /*$top*/
+ p(m, [b]) {
+ b & /*$top*/
+ 2 && ze(o, "transform", "translate(" + /*$top*/
m[1][0] + "px, " + /*$top*/
- m[1][1] + "px)"), k & /*$bottom*/
- 4 && ze(a, "transform", "translate(" + /*$bottom*/
+ m[1][1] + "px)"), b & /*$bottom*/
+ 4 && ze(r, "transform", "translate(" + /*$bottom*/
m[2][0] + "px, " + /*$bottom*/
- m[2][1] + "px)"), k & /*margin*/
+ m[2][1] + "px)"), b & /*margin*/
1 && Rt(
e,
"margin",
@@ -1908,165 +2631,196 @@ function Hi(l) {
m[0]
);
},
- i: Et,
- o: Et,
+ i: Dt,
+ o: Dt,
d(m) {
- m && qi(e);
+ m && Sl(e);
}
};
}
-function Mi(l, e, t) {
- let n, i, { margin: o = !0 } = e;
- const s = rt([0, 0]);
- zt(l, s, (c) => t(1, n = c));
- const f = rt([0, 0]);
- zt(l, f, (c) => t(2, i = c));
+function Hl(n, e, t) {
+ let o, l;
+ var i = this && this.__awaiter || function(m, b, k, y) {
+ function L(w) {
+ return w instanceof k ? w : new k(function(d) {
+ d(w);
+ });
+ }
+ return new (k || (k = Promise))(function(w, d) {
+ function q(N) {
+ try {
+ g(y.next(N));
+ } catch (E) {
+ d(E);
+ }
+ }
+ function M(N) {
+ try {
+ g(y.throw(N));
+ } catch (E) {
+ d(E);
+ }
+ }
+ function g(N) {
+ N.done ? w(N.value) : L(N.value).then(q, M);
+ }
+ g((y = y.apply(m, b || [])).next());
+ });
+ };
+ let { margin: s = !0 } = e;
+ const _ = ut([0, 0]);
+ Et(n, _, (m) => t(1, o = m));
+ const r = ut([0, 0]);
+ Et(n, r, (m) => t(2, l = m));
let a;
- async function _() {
- await Promise.all([s.set([125, 140]), f.set([-125, -140])]), await Promise.all([s.set([-125, 140]), f.set([125, -140])]), await Promise.all([s.set([-125, 0]), f.set([125, -0])]), await Promise.all([s.set([125, 0]), f.set([-125, 0])]);
+ function f() {
+ return i(this, void 0, void 0, function* () {
+ yield Promise.all([_.set([125, 140]), r.set([-125, -140])]), yield Promise.all([_.set([-125, 140]), r.set([125, -140])]), yield Promise.all([_.set([-125, 0]), r.set([125, -0])]), yield Promise.all([_.set([125, 0]), r.set([-125, 0])]);
+ });
}
- async function r() {
- await _(), a || r();
+ function c() {
+ return i(this, void 0, void 0, function* () {
+ yield f(), a || c();
+ });
}
- async function u() {
- await Promise.all([s.set([125, 0]), f.set([-125, 0])]), r();
+ function u() {
+ return i(this, void 0, void 0, function* () {
+ yield Promise.all([_.set([125, 0]), r.set([-125, 0])]), c();
+ });
}
- return Fi(() => (u(), () => a = !0)), l.$$set = (c) => {
- "margin" in c && t(0, o = c.margin);
- }, [o, n, i, s, f];
+ return Tl(() => (u(), () => a = !0)), n.$$set = (m) => {
+ "margin" in m && t(0, s = m.margin);
+ }, [s, o, l, _, r];
}
-class Ni extends Ci {
+class Nl extends kl {
constructor(e) {
- super(), Ti(this, e, Mi, Hi, ji, { margin: 0 });
+ super(), Ll(this, e, Hl, Fl, jl, { margin: 0 });
}
}
const {
- SvelteComponent: Vi,
- append: ce,
- attr: Y,
- binding_callbacks: Dt,
- check_outros: bl,
- create_component: zi,
- create_slot: Ei,
- destroy_component: Ri,
- destroy_each: wl,
- detach: v,
- element: $,
- empty: Te,
- ensure_array_like: Be,
- get_all_dirty_from_scope: Di,
- get_slot_changes: Bi,
- group_outros: vl,
- init: Pi,
- insert: p,
- mount_component: Zi,
- noop: Je,
- safe_not_equal: Oi,
- set_data: P,
- set_style: oe,
- space: G,
- text: H,
- toggle_class: B,
- transition_in: qe,
- transition_out: Se,
- update_slot_base: Ai
-} = window.__gradio__svelte__internal, { tick: Wi } = window.__gradio__svelte__internal, { onDestroy: Ii } = window.__gradio__svelte__internal, Ui = (l) => ({}), Bt = (l) => ({});
-function Pt(l, e, t) {
- const n = l.slice();
- return n[38] = e[t], n[40] = t, n;
-}
-function Zt(l, e, t) {
- const n = l.slice();
- return n[38] = e[t], n;
-}
-function Xi(l) {
+ SvelteComponent: Vl,
+ append: pe,
+ attr: ee,
+ binding_callbacks: Ot,
+ check_outros: wn,
+ create_component: zl,
+ create_slot: El,
+ destroy_component: Dl,
+ destroy_each: $n,
+ detach: $,
+ element: le,
+ empty: Le,
+ ensure_array_like: Oe,
+ get_all_dirty_from_scope: Rl,
+ get_slot_changes: Ol,
+ group_outros: Cn,
+ init: Zl,
+ insert: C,
+ mount_component: Al,
+ noop: Ke,
+ safe_not_equal: Bl,
+ set_data: W,
+ set_style: _e,
+ space: te,
+ text: F,
+ toggle_class: P,
+ transition_in: Se,
+ transition_out: ye,
+ update_slot_base: Il
+} = window.__gradio__svelte__internal, { tick: Pl } = window.__gradio__svelte__internal, { onDestroy: Wl } = window.__gradio__svelte__internal, Xl = (n) => ({}), Zt = (n) => ({});
+function At(n, e, t) {
+ const o = n.slice();
+ return o[39] = e[t], o[41] = t, o;
+}
+function Bt(n, e, t) {
+ const o = n.slice();
+ return o[39] = e[t], o;
+}
+function Gl(n) {
let e, t = (
/*i18n*/
- l[1]("common.error") + ""
- ), n, i, o;
+ n[1]("common.error") + ""
+ ), o, l, i;
const s = (
/*#slots*/
- l[29].error
- ), f = Ei(
+ n[29].error
+ ), _ = El(
s,
- l,
+ n,
/*$$scope*/
- l[28],
- Bt
+ n[28],
+ Zt
);
return {
c() {
- e = $("span"), n = H(t), i = G(), f && f.c(), Y(e, "class", "error svelte-1txqlrd");
+ e = le("span"), o = F(t), l = te(), _ && _.c(), ee(e, "class", "error svelte-1txqlrd");
},
- m(a, _) {
- p(a, e, _), ce(e, n), p(a, i, _), f && f.m(a, _), o = !0;
+ m(r, a) {
+ C(r, e, a), pe(e, o), C(r, l, a), _ && _.m(r, a), i = !0;
},
- p(a, _) {
- (!o || _[0] & /*i18n*/
+ p(r, a) {
+ (!i || a[0] & /*i18n*/
2) && t !== (t = /*i18n*/
- a[1]("common.error") + "") && P(n, t), f && f.p && (!o || _[0] & /*$$scope*/
- 268435456) && Ai(
- f,
+ r[1]("common.error") + "") && W(o, t), _ && _.p && (!i || a[0] & /*$$scope*/
+ 268435456) && Il(
+ _,
s,
- a,
+ r,
/*$$scope*/
- a[28],
- o ? Bi(
+ r[28],
+ i ? Ol(
s,
/*$$scope*/
- a[28],
- _,
- Ui
- ) : Di(
+ r[28],
+ a,
+ Xl
+ ) : Rl(
/*$$scope*/
- a[28]
+ r[28]
),
- Bt
+ Zt
);
},
- i(a) {
- o || (qe(f, a), o = !0);
+ i(r) {
+ i || (Se(_, r), i = !0);
},
- o(a) {
- Se(f, a), o = !1;
+ o(r) {
+ ye(_, r), i = !1;
},
- d(a) {
- a && (v(e), v(i)), f && f.d(a);
+ d(r) {
+ r && ($(e), $(l)), _ && _.d(r);
}
};
}
-function Yi(l) {
- let e, t, n, i, o, s, f, a, _, r = (
+function Ul(n) {
+ let e, t, o, l, i, s, _, r, a, f = (
/*variant*/
- l[8] === "default" && /*show_eta_bar*/
- l[18] && /*show_progress*/
- l[6] === "full" && Ot(l)
+ n[8] === "default" && /*show_eta_bar*/
+ n[18] && /*show_progress*/
+ n[6] === "full" && It(n)
);
- function u(d, C) {
+ function c(d, q) {
if (
/*progress*/
d[7]
- )
- return Ki;
+ ) return Kl;
if (
/*queue_position*/
d[2] !== null && /*queue_size*/
d[3] !== void 0 && /*queue_position*/
d[2] >= 0
- )
- return Ji;
+ ) return Jl;
if (
/*queue_position*/
d[2] === 0
- )
- return Gi;
+ ) return Yl;
}
- let c = u(l), m = c && c(l), k = (
+ let u = c(n), m = u && u(n), b = (
/*timer*/
- l[5] && It(l)
+ n[5] && Xt(n)
);
- const j = [eo, $i], T = [];
- function S(d, C) {
+ const k = [ti, ei], y = [];
+ function L(d, q) {
return (
/*last_progress_level*/
d[15] != null ? 0 : (
@@ -2075,789 +2829,818 @@ function Yi(l) {
)
);
}
- ~(o = S(l)) && (s = T[o] = j[o](l));
- let y = !/*timer*/
- l[5] && Qt(l);
+ ~(i = L(n)) && (s = y[i] = k[i](n));
+ let w = !/*timer*/
+ n[5] && xt(n);
return {
c() {
- r && r.c(), e = G(), t = $("div"), m && m.c(), n = G(), k && k.c(), i = G(), s && s.c(), f = G(), y && y.c(), a = Te(), Y(t, "class", "progress-text svelte-1txqlrd"), B(
+ f && f.c(), e = te(), t = le("div"), m && m.c(), o = te(), b && b.c(), l = te(), s && s.c(), _ = te(), w && w.c(), r = Le(), ee(t, "class", "progress-text svelte-1txqlrd"), P(
t,
"meta-text-center",
/*variant*/
- l[8] === "center"
- ), B(
+ n[8] === "center"
+ ), P(
t,
"meta-text",
/*variant*/
- l[8] === "default"
+ n[8] === "default"
);
},
- m(d, C) {
- r && r.m(d, C), p(d, e, C), p(d, t, C), m && m.m(t, null), ce(t, n), k && k.m(t, null), p(d, i, C), ~o && T[o].m(d, C), p(d, f, C), y && y.m(d, C), p(d, a, C), _ = !0;
+ m(d, q) {
+ f && f.m(d, q), C(d, e, q), C(d, t, q), m && m.m(t, null), pe(t, o), b && b.m(t, null), C(d, l, q), ~i && y[i].m(d, q), C(d, _, q), w && w.m(d, q), C(d, r, q), a = !0;
},
- p(d, C) {
+ p(d, q) {
/*variant*/
d[8] === "default" && /*show_eta_bar*/
d[18] && /*show_progress*/
- d[6] === "full" ? r ? r.p(d, C) : (r = Ot(d), r.c(), r.m(e.parentNode, e)) : r && (r.d(1), r = null), c === (c = u(d)) && m ? m.p(d, C) : (m && m.d(1), m = c && c(d), m && (m.c(), m.m(t, n))), /*timer*/
- d[5] ? k ? k.p(d, C) : (k = It(d), k.c(), k.m(t, null)) : k && (k.d(1), k = null), (!_ || C[0] & /*variant*/
- 256) && B(
+ d[6] === "full" ? f ? f.p(d, q) : (f = It(d), f.c(), f.m(e.parentNode, e)) : f && (f.d(1), f = null), u === (u = c(d)) && m ? m.p(d, q) : (m && m.d(1), m = u && u(d), m && (m.c(), m.m(t, o))), /*timer*/
+ d[5] ? b ? b.p(d, q) : (b = Xt(d), b.c(), b.m(t, null)) : b && (b.d(1), b = null), (!a || q[0] & /*variant*/
+ 256) && P(
t,
"meta-text-center",
/*variant*/
d[8] === "center"
- ), (!_ || C[0] & /*variant*/
- 256) && B(
+ ), (!a || q[0] & /*variant*/
+ 256) && P(
t,
"meta-text",
/*variant*/
d[8] === "default"
);
- let L = o;
- o = S(d), o === L ? ~o && T[o].p(d, C) : (s && (vl(), Se(T[L], 1, 1, () => {
- T[L] = null;
- }), bl()), ~o ? (s = T[o], s ? s.p(d, C) : (s = T[o] = j[o](d), s.c()), qe(s, 1), s.m(f.parentNode, f)) : s = null), /*timer*/
- d[5] ? y && (y.d(1), y = null) : y ? y.p(d, C) : (y = Qt(d), y.c(), y.m(a.parentNode, a));
+ let M = i;
+ i = L(d), i === M ? ~i && y[i].p(d, q) : (s && (Cn(), ye(y[M], 1, 1, () => {
+ y[M] = null;
+ }), wn()), ~i ? (s = y[i], s ? s.p(d, q) : (s = y[i] = k[i](d), s.c()), Se(s, 1), s.m(_.parentNode, _)) : s = null), /*timer*/
+ d[5] ? w && (w.d(1), w = null) : w ? w.p(d, q) : (w = xt(d), w.c(), w.m(r.parentNode, r));
},
i(d) {
- _ || (qe(s), _ = !0);
+ a || (Se(s), a = !0);
},
o(d) {
- Se(s), _ = !1;
+ ye(s), a = !1;
},
d(d) {
- d && (v(e), v(t), v(i), v(f), v(a)), r && r.d(d), m && m.d(), k && k.d(), ~o && T[o].d(d), y && y.d(d);
+ d && ($(e), $(t), $(l), $(_), $(r)), f && f.d(d), m && m.d(), b && b.d(), ~i && y[i].d(d), w && w.d(d);
}
};
}
-function Ot(l) {
+function It(n) {
let e, t = `translateX(${/*eta_level*/
- (l[17] || 0) * 100 - 100}%)`;
+ (n[17] || 0) * 100 - 100}%)`;
return {
c() {
- e = $("div"), Y(e, "class", "eta-bar svelte-1txqlrd"), oe(e, "transform", t);
+ e = le("div"), ee(e, "class", "eta-bar svelte-1txqlrd"), _e(e, "transform", t);
},
- m(n, i) {
- p(n, e, i);
+ m(o, l) {
+ C(o, e, l);
},
- p(n, i) {
- i[0] & /*eta_level*/
+ p(o, l) {
+ l[0] & /*eta_level*/
131072 && t !== (t = `translateX(${/*eta_level*/
- (n[17] || 0) * 100 - 100}%)`) && oe(e, "transform", t);
+ (o[17] || 0) * 100 - 100}%)`) && _e(e, "transform", t);
},
- d(n) {
- n && v(e);
+ d(o) {
+ o && $(e);
}
};
}
-function Gi(l) {
+function Yl(n) {
let e;
return {
c() {
- e = H("processing |");
+ e = F("processing |");
},
- m(t, n) {
- p(t, e, n);
+ m(t, o) {
+ C(t, e, o);
},
- p: Je,
+ p: Ke,
d(t) {
- t && v(e);
+ t && $(e);
}
};
}
-function Ji(l) {
+function Jl(n) {
let e, t = (
/*queue_position*/
- l[2] + 1 + ""
- ), n, i, o, s;
+ n[2] + 1 + ""
+ ), o, l, i, s;
return {
c() {
- e = H("queue: "), n = H(t), i = H("/"), o = H(
+ e = F("queue: "), o = F(t), l = F("/"), i = F(
/*queue_size*/
- l[3]
- ), s = H(" |");
+ n[3]
+ ), s = F(" |");
},
- m(f, a) {
- p(f, e, a), p(f, n, a), p(f, i, a), p(f, o, a), p(f, s, a);
+ m(_, r) {
+ C(_, e, r), C(_, o, r), C(_, l, r), C(_, i, r), C(_, s, r);
},
- p(f, a) {
- a[0] & /*queue_position*/
+ p(_, r) {
+ r[0] & /*queue_position*/
4 && t !== (t = /*queue_position*/
- f[2] + 1 + "") && P(n, t), a[0] & /*queue_size*/
- 8 && P(
- o,
+ _[2] + 1 + "") && W(o, t), r[0] & /*queue_size*/
+ 8 && W(
+ i,
/*queue_size*/
- f[3]
+ _[3]
);
},
- d(f) {
- f && (v(e), v(n), v(i), v(o), v(s));
+ d(_) {
+ _ && ($(e), $(o), $(l), $(i), $(s));
}
};
}
-function Ki(l) {
- let e, t = Be(
+function Kl(n) {
+ let e, t = Oe(
/*progress*/
- l[7]
- ), n = [];
- for (let i = 0; i < t.length; i += 1)
- n[i] = Wt(Zt(l, t, i));
+ n[7]
+ ), o = [];
+ for (let l = 0; l < t.length; l += 1)
+ o[l] = Wt(Bt(n, t, l));
return {
c() {
- for (let i = 0; i < n.length; i += 1)
- n[i].c();
- e = Te();
+ for (let l = 0; l < o.length; l += 1)
+ o[l].c();
+ e = Le();
},
- m(i, o) {
- for (let s = 0; s < n.length; s += 1)
- n[s] && n[s].m(i, o);
- p(i, e, o);
+ m(l, i) {
+ for (let s = 0; s < o.length; s += 1)
+ o[s] && o[s].m(l, i);
+ C(l, e, i);
},
- p(i, o) {
- if (o[0] & /*progress*/
+ p(l, i) {
+ if (i[0] & /*progress*/
128) {
- t = Be(
+ t = Oe(
/*progress*/
- i[7]
+ l[7]
);
let s;
for (s = 0; s < t.length; s += 1) {
- const f = Zt(i, t, s);
- n[s] ? n[s].p(f, o) : (n[s] = Wt(f), n[s].c(), n[s].m(e.parentNode, e));
+ const _ = Bt(l, t, s);
+ o[s] ? o[s].p(_, i) : (o[s] = Wt(_), o[s].c(), o[s].m(e.parentNode, e));
}
- for (; s < n.length; s += 1)
- n[s].d(1);
- n.length = t.length;
+ for (; s < o.length; s += 1)
+ o[s].d(1);
+ o.length = t.length;
}
},
- d(i) {
- i && v(e), wl(n, i);
+ d(l) {
+ l && $(e), $n(o, l);
}
};
}
-function At(l) {
+function Pt(n) {
let e, t = (
/*p*/
- l[38].unit + ""
- ), n, i, o = " ", s;
- function f(r, u) {
+ n[39].unit + ""
+ ), o, l, i = " ", s;
+ function _(f, c) {
return (
/*p*/
- r[38].length != null ? xi : Qi
+ f[39].length != null ? xl : Ql
);
}
- let a = f(l), _ = a(l);
+ let r = _(n), a = r(n);
return {
c() {
- _.c(), e = G(), n = H(t), i = H(" | "), s = H(o);
+ a.c(), e = te(), o = F(t), l = F(" | "), s = F(i);
},
- m(r, u) {
- _.m(r, u), p(r, e, u), p(r, n, u), p(r, i, u), p(r, s, u);
+ m(f, c) {
+ a.m(f, c), C(f, e, c), C(f, o, c), C(f, l, c), C(f, s, c);
},
- p(r, u) {
- a === (a = f(r)) && _ ? _.p(r, u) : (_.d(1), _ = a(r), _ && (_.c(), _.m(e.parentNode, e))), u[0] & /*progress*/
+ p(f, c) {
+ r === (r = _(f)) && a ? a.p(f, c) : (a.d(1), a = r(f), a && (a.c(), a.m(e.parentNode, e))), c[0] & /*progress*/
128 && t !== (t = /*p*/
- r[38].unit + "") && P(n, t);
+ f[39].unit + "") && W(o, t);
},
- d(r) {
- r && (v(e), v(n), v(i), v(s)), _.d(r);
+ d(f) {
+ f && ($(e), $(o), $(l), $(s)), a.d(f);
}
};
}
-function Qi(l) {
- let e = ke(
+function Ql(n) {
+ let e = Ce(
/*p*/
- l[38].index || 0
+ n[39].index || 0
) + "", t;
return {
c() {
- t = H(e);
+ t = F(e);
},
- m(n, i) {
- p(n, t, i);
+ m(o, l) {
+ C(o, t, l);
},
- p(n, i) {
- i[0] & /*progress*/
- 128 && e !== (e = ke(
+ p(o, l) {
+ l[0] & /*progress*/
+ 128 && e !== (e = Ce(
/*p*/
- n[38].index || 0
- ) + "") && P(t, e);
+ o[39].index || 0
+ ) + "") && W(t, e);
},
- d(n) {
- n && v(t);
+ d(o) {
+ o && $(t);
}
};
}
-function xi(l) {
- let e = ke(
+function xl(n) {
+ let e = Ce(
/*p*/
- l[38].index || 0
- ) + "", t, n, i = ke(
+ n[39].index || 0
+ ) + "", t, o, l = Ce(
/*p*/
- l[38].length
- ) + "", o;
+ n[39].length
+ ) + "", i;
return {
c() {
- t = H(e), n = H("/"), o = H(i);
+ t = F(e), o = F("/"), i = F(l);
},
- m(s, f) {
- p(s, t, f), p(s, n, f), p(s, o, f);
+ m(s, _) {
+ C(s, t, _), C(s, o, _), C(s, i, _);
},
- p(s, f) {
- f[0] & /*progress*/
- 128 && e !== (e = ke(
+ p(s, _) {
+ _[0] & /*progress*/
+ 128 && e !== (e = Ce(
/*p*/
- s[38].index || 0
- ) + "") && P(t, e), f[0] & /*progress*/
- 128 && i !== (i = ke(
+ s[39].index || 0
+ ) + "") && W(t, e), _[0] & /*progress*/
+ 128 && l !== (l = Ce(
/*p*/
- s[38].length
- ) + "") && P(o, i);
+ s[39].length
+ ) + "") && W(i, l);
},
d(s) {
- s && (v(t), v(n), v(o));
+ s && ($(t), $(o), $(i));
}
};
}
-function Wt(l) {
+function Wt(n) {
let e, t = (
/*p*/
- l[38].index != null && At(l)
+ n[39].index != null && Pt(n)
);
return {
c() {
- t && t.c(), e = Te();
+ t && t.c(), e = Le();
},
- m(n, i) {
- t && t.m(n, i), p(n, e, i);
+ m(o, l) {
+ t && t.m(o, l), C(o, e, l);
},
- p(n, i) {
+ p(o, l) {
/*p*/
- n[38].index != null ? t ? t.p(n, i) : (t = At(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
+ o[39].index != null ? t ? t.p(o, l) : (t = Pt(o), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
},
- d(n) {
- n && v(e), t && t.d(n);
+ d(o) {
+ o && $(e), t && t.d(o);
}
};
}
-function It(l) {
+function Xt(n) {
let e, t = (
/*eta*/
- l[0] ? `/${/*formatted_eta*/
- l[19]}` : ""
- ), n, i;
+ n[0] ? `/${/*formatted_eta*/
+ n[19]}` : ""
+ ), o, l;
return {
c() {
- e = H(
+ e = F(
/*formatted_timer*/
- l[20]
- ), n = H(t), i = H("s");
+ n[20]
+ ), o = F(t), l = F("s");
},
- m(o, s) {
- p(o, e, s), p(o, n, s), p(o, i, s);
+ m(i, s) {
+ C(i, e, s), C(i, o, s), C(i, l, s);
},
- p(o, s) {
+ p(i, s) {
s[0] & /*formatted_timer*/
- 1048576 && P(
+ 1048576 && W(
e,
/*formatted_timer*/
- o[20]
+ i[20]
), s[0] & /*eta, formatted_eta*/
524289 && t !== (t = /*eta*/
- o[0] ? `/${/*formatted_eta*/
- o[19]}` : "") && P(n, t);
+ i[0] ? `/${/*formatted_eta*/
+ i[19]}` : "") && W(o, t);
},
- d(o) {
- o && (v(e), v(n), v(i));
+ d(i) {
+ i && ($(e), $(o), $(l));
}
};
}
-function $i(l) {
+function ei(n) {
let e, t;
- return e = new Ni({
+ return e = new Nl({
props: { margin: (
/*variant*/
- l[8] === "default"
+ n[8] === "default"
) }
}), {
c() {
- zi(e.$$.fragment);
+ zl(e.$$.fragment);
},
- m(n, i) {
- Zi(e, n, i), t = !0;
+ m(o, l) {
+ Al(e, o, l), t = !0;
},
- p(n, i) {
- const o = {};
- i[0] & /*variant*/
- 256 && (o.margin = /*variant*/
- n[8] === "default"), e.$set(o);
+ p(o, l) {
+ const i = {};
+ l[0] & /*variant*/
+ 256 && (i.margin = /*variant*/
+ o[8] === "default"), e.$set(i);
},
- i(n) {
- t || (qe(e.$$.fragment, n), t = !0);
+ i(o) {
+ t || (Se(e.$$.fragment, o), t = !0);
},
- o(n) {
- Se(e.$$.fragment, n), t = !1;
+ o(o) {
+ ye(e.$$.fragment, o), t = !1;
},
- d(n) {
- Ri(e, n);
+ d(o) {
+ Dl(e, o);
}
};
}
-function eo(l) {
- let e, t, n, i, o, s = `${/*last_progress_level*/
- l[15] * 100}%`, f = (
+function ti(n) {
+ let e, t, o, l, i, s = `${/*last_progress_level*/
+ n[15] * 100}%`, _ = (
/*progress*/
- l[7] != null && Ut(l)
+ n[7] != null && Gt(n)
);
return {
c() {
- e = $("div"), t = $("div"), f && f.c(), n = G(), i = $("div"), o = $("div"), Y(t, "class", "progress-level-inner svelte-1txqlrd"), Y(o, "class", "progress-bar svelte-1txqlrd"), oe(o, "width", s), Y(i, "class", "progress-bar-wrap svelte-1txqlrd"), Y(e, "class", "progress-level svelte-1txqlrd");
+ e = le("div"), t = le("div"), _ && _.c(), o = te(), l = le("div"), i = le("div"), ee(t, "class", "progress-level-inner svelte-1txqlrd"), ee(i, "class", "progress-bar svelte-1txqlrd"), _e(i, "width", s), ee(l, "class", "progress-bar-wrap svelte-1txqlrd"), ee(e, "class", "progress-level svelte-1txqlrd");
},
- m(a, _) {
- p(a, e, _), ce(e, t), f && f.m(t, null), ce(e, n), ce(e, i), ce(i, o), l[30](o);
+ m(r, a) {
+ C(r, e, a), pe(e, t), _ && _.m(t, null), pe(e, o), pe(e, l), pe(l, i), n[30](i);
},
- p(a, _) {
+ p(r, a) {
/*progress*/
- a[7] != null ? f ? f.p(a, _) : (f = Ut(a), f.c(), f.m(t, null)) : f && (f.d(1), f = null), _[0] & /*last_progress_level*/
+ r[7] != null ? _ ? _.p(r, a) : (_ = Gt(r), _.c(), _.m(t, null)) : _ && (_.d(1), _ = null), a[0] & /*last_progress_level*/
32768 && s !== (s = `${/*last_progress_level*/
- a[15] * 100}%`) && oe(o, "width", s);
+ r[15] * 100}%`) && _e(i, "width", s);
},
- i: Je,
- o: Je,
- d(a) {
- a && v(e), f && f.d(), l[30](null);
+ i: Ke,
+ o: Ke,
+ d(r) {
+ r && $(e), _ && _.d(), n[30](null);
}
};
}
-function Ut(l) {
- let e, t = Be(
+function Gt(n) {
+ let e, t = Oe(
/*progress*/
- l[7]
- ), n = [];
- for (let i = 0; i < t.length; i += 1)
- n[i] = Kt(Pt(l, t, i));
+ n[7]
+ ), o = [];
+ for (let l = 0; l < t.length; l += 1)
+ o[l] = Qt(At(n, t, l));
return {
c() {
- for (let i = 0; i < n.length; i += 1)
- n[i].c();
- e = Te();
+ for (let l = 0; l < o.length; l += 1)
+ o[l].c();
+ e = Le();
},
- m(i, o) {
- for (let s = 0; s < n.length; s += 1)
- n[s] && n[s].m(i, o);
- p(i, e, o);
+ m(l, i) {
+ for (let s = 0; s < o.length; s += 1)
+ o[s] && o[s].m(l, i);
+ C(l, e, i);
},
- p(i, o) {
- if (o[0] & /*progress_level, progress*/
+ p(l, i) {
+ if (i[0] & /*progress_level, progress*/
16512) {
- t = Be(
+ t = Oe(
/*progress*/
- i[7]
+ l[7]
);
let s;
for (s = 0; s < t.length; s += 1) {
- const f = Pt(i, t, s);
- n[s] ? n[s].p(f, o) : (n[s] = Kt(f), n[s].c(), n[s].m(e.parentNode, e));
+ const _ = At(l, t, s);
+ o[s] ? o[s].p(_, i) : (o[s] = Qt(_), o[s].c(), o[s].m(e.parentNode, e));
}
- for (; s < n.length; s += 1)
- n[s].d(1);
- n.length = t.length;
+ for (; s < o.length; s += 1)
+ o[s].d(1);
+ o.length = t.length;
}
},
- d(i) {
- i && v(e), wl(n, i);
+ d(l) {
+ l && $(e), $n(o, l);
}
};
}
-function Xt(l) {
- let e, t, n, i, o = (
+function Ut(n) {
+ let e, t, o, l, i = (
/*i*/
- l[40] !== 0 && to()
+ n[41] !== 0 && ni()
), s = (
/*p*/
- l[38].desc != null && Yt(l)
- ), f = (
+ n[39].desc != null && Yt(n)
+ ), _ = (
/*p*/
- l[38].desc != null && /*progress_level*/
- l[14] && /*progress_level*/
- l[14][
+ n[39].desc != null && /*progress_level*/
+ n[14] && /*progress_level*/
+ n[14][
/*i*/
- l[40]
- ] != null && Gt()
- ), a = (
+ n[41]
+ ] != null && Jt()
+ ), r = (
/*progress_level*/
- l[14] != null && Jt(l)
+ n[14] != null && Kt(n)
);
return {
c() {
- o && o.c(), e = G(), s && s.c(), t = G(), f && f.c(), n = G(), a && a.c(), i = Te();
+ i && i.c(), e = te(), s && s.c(), t = te(), _ && _.c(), o = te(), r && r.c(), l = Le();
},
- m(_, r) {
- o && o.m(_, r), p(_, e, r), s && s.m(_, r), p(_, t, r), f && f.m(_, r), p(_, n, r), a && a.m(_, r), p(_, i, r);
+ m(a, f) {
+ i && i.m(a, f), C(a, e, f), s && s.m(a, f), C(a, t, f), _ && _.m(a, f), C(a, o, f), r && r.m(a, f), C(a, l, f);
},
- p(_, r) {
+ p(a, f) {
/*p*/
- _[38].desc != null ? s ? s.p(_, r) : (s = Yt(_), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*p*/
- _[38].desc != null && /*progress_level*/
- _[14] && /*progress_level*/
- _[14][
+ a[39].desc != null ? s ? s.p(a, f) : (s = Yt(a), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*p*/
+ a[39].desc != null && /*progress_level*/
+ a[14] && /*progress_level*/
+ a[14][
/*i*/
- _[40]
- ] != null ? f || (f = Gt(), f.c(), f.m(n.parentNode, n)) : f && (f.d(1), f = null), /*progress_level*/
- _[14] != null ? a ? a.p(_, r) : (a = Jt(_), a.c(), a.m(i.parentNode, i)) : a && (a.d(1), a = null);
+ a[41]
+ ] != null ? _ || (_ = Jt(), _.c(), _.m(o.parentNode, o)) : _ && (_.d(1), _ = null), /*progress_level*/
+ a[14] != null ? r ? r.p(a, f) : (r = Kt(a), r.c(), r.m(l.parentNode, l)) : r && (r.d(1), r = null);
},
- d(_) {
- _ && (v(e), v(t), v(n), v(i)), o && o.d(_), s && s.d(_), f && f.d(_), a && a.d(_);
+ d(a) {
+ a && ($(e), $(t), $(o), $(l)), i && i.d(a), s && s.d(a), _ && _.d(a), r && r.d(a);
}
};
}
-function to(l) {
+function ni(n) {
let e;
return {
c() {
- e = H(" /");
+ e = F(" /");
},
- m(t, n) {
- p(t, e, n);
+ m(t, o) {
+ C(t, e, o);
},
d(t) {
- t && v(e);
+ t && $(e);
}
};
}
-function Yt(l) {
+function Yt(n) {
let e = (
/*p*/
- l[38].desc + ""
+ n[39].desc + ""
), t;
return {
c() {
- t = H(e);
+ t = F(e);
},
- m(n, i) {
- p(n, t, i);
+ m(o, l) {
+ C(o, t, l);
},
- p(n, i) {
- i[0] & /*progress*/
+ p(o, l) {
+ l[0] & /*progress*/
128 && e !== (e = /*p*/
- n[38].desc + "") && P(t, e);
+ o[39].desc + "") && W(t, e);
},
- d(n) {
- n && v(t);
+ d(o) {
+ o && $(t);
}
};
}
-function Gt(l) {
+function Jt(n) {
let e;
return {
c() {
- e = H("-");
+ e = F("-");
},
- m(t, n) {
- p(t, e, n);
+ m(t, o) {
+ C(t, e, o);
},
d(t) {
- t && v(e);
+ t && $(e);
}
};
}
-function Jt(l) {
+function Kt(n) {
let e = (100 * /*progress_level*/
- (l[14][
+ (n[14][
/*i*/
- l[40]
- ] || 0)).toFixed(1) + "", t, n;
+ n[41]
+ ] || 0)).toFixed(1) + "", t, o;
return {
c() {
- t = H(e), n = H("%");
+ t = F(e), o = F("%");
},
- m(i, o) {
- p(i, t, o), p(i, n, o);
+ m(l, i) {
+ C(l, t, i), C(l, o, i);
},
- p(i, o) {
- o[0] & /*progress_level*/
+ p(l, i) {
+ i[0] & /*progress_level*/
16384 && e !== (e = (100 * /*progress_level*/
- (i[14][
+ (l[14][
/*i*/
- i[40]
- ] || 0)).toFixed(1) + "") && P(t, e);
+ l[41]
+ ] || 0)).toFixed(1) + "") && W(t, e);
},
- d(i) {
- i && (v(t), v(n));
+ d(l) {
+ l && ($(t), $(o));
}
};
}
-function Kt(l) {
+function Qt(n) {
let e, t = (
/*p*/
- (l[38].desc != null || /*progress_level*/
- l[14] && /*progress_level*/
- l[14][
+ (n[39].desc != null || /*progress_level*/
+ n[14] && /*progress_level*/
+ n[14][
/*i*/
- l[40]
- ] != null) && Xt(l)
+ n[41]
+ ] != null) && Ut(n)
);
return {
c() {
- t && t.c(), e = Te();
+ t && t.c(), e = Le();
},
- m(n, i) {
- t && t.m(n, i), p(n, e, i);
+ m(o, l) {
+ t && t.m(o, l), C(o, e, l);
},
- p(n, i) {
+ p(o, l) {
/*p*/
- n[38].desc != null || /*progress_level*/
- n[14] && /*progress_level*/
- n[14][
+ o[39].desc != null || /*progress_level*/
+ o[14] && /*progress_level*/
+ o[14][
/*i*/
- n[40]
- ] != null ? t ? t.p(n, i) : (t = Xt(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
+ o[41]
+ ] != null ? t ? t.p(o, l) : (t = Ut(o), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
},
- d(n) {
- n && v(e), t && t.d(n);
+ d(o) {
+ o && $(e), t && t.d(o);
}
};
}
-function Qt(l) {
+function xt(n) {
let e, t;
return {
c() {
- e = $("p"), t = H(
+ e = le("p"), t = F(
/*loading_text*/
- l[9]
- ), Y(e, "class", "loading svelte-1txqlrd");
+ n[9]
+ ), ee(e, "class", "loading svelte-1txqlrd");
},
- m(n, i) {
- p(n, e, i), ce(e, t);
+ m(o, l) {
+ C(o, e, l), pe(e, t);
},
- p(n, i) {
- i[0] & /*loading_text*/
- 512 && P(
+ p(o, l) {
+ l[0] & /*loading_text*/
+ 512 && W(
t,
/*loading_text*/
- n[9]
+ o[9]
);
},
- d(n) {
- n && v(e);
+ d(o) {
+ o && $(e);
}
};
}
-function lo(l) {
- let e, t, n, i, o;
- const s = [Yi, Xi], f = [];
- function a(_, r) {
+function oi(n) {
+ let e, t, o, l, i;
+ const s = [Ul, Gl], _ = [];
+ function r(a, f) {
return (
/*status*/
- _[4] === "pending" ? 0 : (
+ a[4] === "pending" ? 0 : (
/*status*/
- _[4] === "error" ? 1 : -1
+ a[4] === "error" ? 1 : -1
)
);
}
- return ~(t = a(l)) && (n = f[t] = s[t](l)), {
+ return ~(t = r(n)) && (o = _[t] = s[t](n)), {
c() {
- e = $("div"), n && n.c(), Y(e, "class", i = "wrap " + /*variant*/
- l[8] + " " + /*show_progress*/
- l[6] + " svelte-1txqlrd"), B(e, "hide", !/*status*/
- l[4] || /*status*/
- l[4] === "complete" || /*show_progress*/
- l[6] === "hidden"), B(
+ e = le("div"), o && o.c(), ee(e, "class", l = "wrap " + /*variant*/
+ n[8] + " " + /*show_progress*/
+ n[6] + " svelte-1txqlrd"), P(e, "hide", !/*status*/
+ n[4] || /*status*/
+ n[4] === "complete" || /*show_progress*/
+ n[6] === "hidden"), P(
e,
"translucent",
/*variant*/
- l[8] === "center" && /*status*/
- (l[4] === "pending" || /*status*/
- l[4] === "error") || /*translucent*/
- l[11] || /*show_progress*/
- l[6] === "minimal"
- ), B(
+ n[8] === "center" && /*status*/
+ (n[4] === "pending" || /*status*/
+ n[4] === "error") || /*translucent*/
+ n[11] || /*show_progress*/
+ n[6] === "minimal"
+ ), P(
e,
"generating",
/*status*/
- l[4] === "generating"
- ), B(
+ n[4] === "generating"
+ ), P(
e,
"border",
/*border*/
- l[12]
- ), oe(
+ n[12]
+ ), _e(
e,
"position",
/*absolute*/
- l[10] ? "absolute" : "static"
- ), oe(
+ n[10] ? "absolute" : "static"
+ ), _e(
e,
"padding",
/*absolute*/
- l[10] ? "0" : "var(--size-8) 0"
+ n[10] ? "0" : "var(--size-8) 0"
);
},
- m(_, r) {
- p(_, e, r), ~t && f[t].m(e, null), l[31](e), o = !0;
- },
- p(_, r) {
- let u = t;
- t = a(_), t === u ? ~t && f[t].p(_, r) : (n && (vl(), Se(f[u], 1, 1, () => {
- f[u] = null;
- }), bl()), ~t ? (n = f[t], n ? n.p(_, r) : (n = f[t] = s[t](_), n.c()), qe(n, 1), n.m(e, null)) : n = null), (!o || r[0] & /*variant, show_progress*/
- 320 && i !== (i = "wrap " + /*variant*/
- _[8] + " " + /*show_progress*/
- _[6] + " svelte-1txqlrd")) && Y(e, "class", i), (!o || r[0] & /*variant, show_progress, status, show_progress*/
- 336) && B(e, "hide", !/*status*/
- _[4] || /*status*/
- _[4] === "complete" || /*show_progress*/
- _[6] === "hidden"), (!o || r[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
- 2384) && B(
+ m(a, f) {
+ C(a, e, f), ~t && _[t].m(e, null), n[31](e), i = !0;
+ },
+ p(a, f) {
+ let c = t;
+ t = r(a), t === c ? ~t && _[t].p(a, f) : (o && (Cn(), ye(_[c], 1, 1, () => {
+ _[c] = null;
+ }), wn()), ~t ? (o = _[t], o ? o.p(a, f) : (o = _[t] = s[t](a), o.c()), Se(o, 1), o.m(e, null)) : o = null), (!i || f[0] & /*variant, show_progress*/
+ 320 && l !== (l = "wrap " + /*variant*/
+ a[8] + " " + /*show_progress*/
+ a[6] + " svelte-1txqlrd")) && ee(e, "class", l), (!i || f[0] & /*variant, show_progress, status, show_progress*/
+ 336) && P(e, "hide", !/*status*/
+ a[4] || /*status*/
+ a[4] === "complete" || /*show_progress*/
+ a[6] === "hidden"), (!i || f[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
+ 2384) && P(
e,
"translucent",
/*variant*/
- _[8] === "center" && /*status*/
- (_[4] === "pending" || /*status*/
- _[4] === "error") || /*translucent*/
- _[11] || /*show_progress*/
- _[6] === "minimal"
- ), (!o || r[0] & /*variant, show_progress, status*/
- 336) && B(
+ a[8] === "center" && /*status*/
+ (a[4] === "pending" || /*status*/
+ a[4] === "error") || /*translucent*/
+ a[11] || /*show_progress*/
+ a[6] === "minimal"
+ ), (!i || f[0] & /*variant, show_progress, status*/
+ 336) && P(
e,
"generating",
/*status*/
- _[4] === "generating"
- ), (!o || r[0] & /*variant, show_progress, border*/
- 4416) && B(
+ a[4] === "generating"
+ ), (!i || f[0] & /*variant, show_progress, border*/
+ 4416) && P(
e,
"border",
/*border*/
- _[12]
- ), r[0] & /*absolute*/
- 1024 && oe(
+ a[12]
+ ), f[0] & /*absolute*/
+ 1024 && _e(
e,
"position",
/*absolute*/
- _[10] ? "absolute" : "static"
- ), r[0] & /*absolute*/
- 1024 && oe(
+ a[10] ? "absolute" : "static"
+ ), f[0] & /*absolute*/
+ 1024 && _e(
e,
"padding",
/*absolute*/
- _[10] ? "0" : "var(--size-8) 0"
+ a[10] ? "0" : "var(--size-8) 0"
);
},
- i(_) {
- o || (qe(n), o = !0);
+ i(a) {
+ i || (Se(o), i = !0);
},
- o(_) {
- Se(n), o = !1;
+ o(a) {
+ ye(o), i = !1;
},
- d(_) {
- _ && v(e), ~t && f[t].d(), l[31](null);
+ d(a) {
+ a && $(e), ~t && _[t].d(), n[31](null);
}
};
}
-let Ee = [], Ye = !1;
-async function no(l, e = !0) {
- if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) {
- if (Ee.push(l), !Ye)
- Ye = !0;
- else
- return;
- await Wi(), requestAnimationFrame(() => {
- let t = [0, 0];
- for (let n = 0; n < Ee.length; n++) {
- const o = Ee[n].getBoundingClientRect();
- (n === 0 || o.top + window.scrollY <= t[0]) && (t[0] = o.top + window.scrollY, t[1] = n);
- }
- window.scrollTo({ top: t[0] - 20, behavior: "smooth" }), Ye = !1, Ee = [];
+var li = function(n, e, t, o) {
+ function l(i) {
+ return i instanceof t ? i : new t(function(s) {
+ s(i);
});
}
+ return new (t || (t = Promise))(function(i, s) {
+ function _(f) {
+ try {
+ a(o.next(f));
+ } catch (c) {
+ s(c);
+ }
+ }
+ function r(f) {
+ try {
+ a(o.throw(f));
+ } catch (c) {
+ s(c);
+ }
+ }
+ function a(f) {
+ f.done ? i(f.value) : l(f.value).then(_, r);
+ }
+ a((o = o.apply(n, e || [])).next());
+ });
+};
+let Ee = [], Ye = !1;
+function ii(n) {
+ return li(this, arguments, void 0, function* (e, t = !0) {
+ if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) {
+ if (Ee.push(e), !Ye) Ye = !0;
+ else return;
+ yield Pl(), requestAnimationFrame(() => {
+ let o = [0, 0];
+ for (let l = 0; l < Ee.length; l++) {
+ const s = Ee[l].getBoundingClientRect();
+ (l === 0 || s.top + window.scrollY <= o[0]) && (o[0] = s.top + window.scrollY, o[1] = l);
+ }
+ window.scrollTo({ top: o[0] - 20, behavior: "smooth" }), Ye = !1, Ee = [];
+ });
+ }
+ });
}
-function io(l, e, t) {
- let n, { $$slots: i = {}, $$scope: o } = e, { i18n: s } = e, { eta: f = null } = e, { queue_position: a } = e, { queue_size: _ } = e, { status: r } = e, { scroll_to_output: u = !1 } = e, { timer: c = !0 } = e, { show_progress: m = "full" } = e, { message: k = null } = e, { progress: j = null } = e, { variant: T = "default" } = e, { loading_text: S = "Loading..." } = e, { absolute: y = !0 } = e, { translucent: d = !1 } = e, { border: C = !1 } = e, { autoscroll: L } = e, h, Z = !1, J = 0, E = 0, O = null, R = null, ae = 0, A = null, K, D = null, me = !0;
- const Le = () => {
- t(0, f = t(26, O = t(19, he = null))), t(24, J = performance.now()), t(25, E = 0), Z = !0, ge();
+function si(n, e, t) {
+ let o, { $$slots: l = {}, $$scope: i } = e;
+ this && this.__awaiter;
+ let { i18n: s } = e, { eta: _ = null } = e, { queue_position: r } = e, { queue_size: a } = e, { status: f } = e, { scroll_to_output: c = !1 } = e, { timer: u = !0 } = e, { show_progress: m = "full" } = e, { message: b = null } = e, { progress: k = null } = e, { variant: y = "default" } = e, { loading_text: L = "Loading..." } = e, { absolute: w = !0 } = e, { translucent: d = !1 } = e, { border: q = !1 } = e, { autoscroll: M } = e, g, N = !1, E = 0, Z = 0, X = null, A = null, ue = 0, G = null, ne, B = null, he = !0;
+ const Me = () => {
+ t(0, _ = t(26, X = t(19, be = null))), t(24, E = performance.now()), t(25, Z = 0), N = !0, ve();
};
- function ge() {
+ function ve() {
requestAnimationFrame(() => {
- t(25, E = (performance.now() - J) / 1e3), Z && ge();
+ t(25, Z = (performance.now() - E) / 1e3), N && ve();
});
}
- function b() {
- t(25, E = 0), t(0, f = t(26, O = t(19, he = null))), Z && (Z = !1);
+ function h() {
+ t(25, Z = 0), t(0, _ = t(26, X = t(19, be = null))), N && (N = !1);
}
- Ii(() => {
- Z && b();
+ Wl(() => {
+ N && h();
});
- let he = null;
- function Oe(w) {
- Dt[w ? "unshift" : "push"](() => {
- D = w, t(16, D), t(7, j), t(14, A), t(15, K);
+ let be = null;
+ function Be(v) {
+ Ot[v ? "unshift" : "push"](() => {
+ B = v, t(16, B), t(7, k), t(14, G), t(15, ne);
});
}
- function Ae(w) {
- Dt[w ? "unshift" : "push"](() => {
- h = w, t(13, h);
+ function Ie(v) {
+ Ot[v ? "unshift" : "push"](() => {
+ g = v, t(13, g);
});
}
- return l.$$set = (w) => {
- "i18n" in w && t(1, s = w.i18n), "eta" in w && t(0, f = w.eta), "queue_position" in w && t(2, a = w.queue_position), "queue_size" in w && t(3, _ = w.queue_size), "status" in w && t(4, r = w.status), "scroll_to_output" in w && t(21, u = w.scroll_to_output), "timer" in w && t(5, c = w.timer), "show_progress" in w && t(6, m = w.show_progress), "message" in w && t(22, k = w.message), "progress" in w && t(7, j = w.progress), "variant" in w && t(8, T = w.variant), "loading_text" in w && t(9, S = w.loading_text), "absolute" in w && t(10, y = w.absolute), "translucent" in w && t(11, d = w.translucent), "border" in w && t(12, C = w.border), "autoscroll" in w && t(23, L = w.autoscroll), "$$scope" in w && t(28, o = w.$$scope);
- }, l.$$.update = () => {
- l.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
- 218103809 && (f === null && t(0, f = O), f != null && O !== f && (t(27, R = (performance.now() - J) / 1e3 + f), t(19, he = R.toFixed(1)), t(26, O = f))), l.$$.dirty[0] & /*eta_from_start, timer_diff*/
- 167772160 && t(17, ae = R === null || R <= 0 || !E ? null : Math.min(E / R, 1)), l.$$.dirty[0] & /*progress*/
- 128 && j != null && t(18, me = !1), l.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
- 114816 && (j != null ? t(14, A = j.map((w) => {
- if (w.index != null && w.length != null)
- return w.index / w.length;
- if (w.progress != null)
- return w.progress;
- })) : t(14, A = null), A ? (t(15, K = A[A.length - 1]), D && (K === 0 ? t(16, D.style.transition = "0", D) : t(16, D.style.transition = "150ms", D))) : t(15, K = void 0)), l.$$.dirty[0] & /*status*/
- 16 && (r === "pending" ? Le() : b()), l.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
- 10493968 && h && u && (r === "pending" || r === "complete") && no(h, L), l.$$.dirty[0] & /*status, message*/
- 4194320, l.$$.dirty[0] & /*timer_diff*/
- 33554432 && t(20, n = E.toFixed(1));
+ return n.$$set = (v) => {
+ "i18n" in v && t(1, s = v.i18n), "eta" in v && t(0, _ = v.eta), "queue_position" in v && t(2, r = v.queue_position), "queue_size" in v && t(3, a = v.queue_size), "status" in v && t(4, f = v.status), "scroll_to_output" in v && t(21, c = v.scroll_to_output), "timer" in v && t(5, u = v.timer), "show_progress" in v && t(6, m = v.show_progress), "message" in v && t(22, b = v.message), "progress" in v && t(7, k = v.progress), "variant" in v && t(8, y = v.variant), "loading_text" in v && t(9, L = v.loading_text), "absolute" in v && t(10, w = v.absolute), "translucent" in v && t(11, d = v.translucent), "border" in v && t(12, q = v.border), "autoscroll" in v && t(23, M = v.autoscroll), "$$scope" in v && t(28, i = v.$$scope);
+ }, n.$$.update = () => {
+ n.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
+ 218103809 && (_ === null && t(0, _ = X), _ != null && X !== _ && (t(27, A = (performance.now() - E) / 1e3 + _), t(19, be = A.toFixed(1)), t(26, X = _))), n.$$.dirty[0] & /*eta_from_start, timer_diff*/
+ 167772160 && t(17, ue = A === null || A <= 0 || !Z ? null : Math.min(Z / A, 1)), n.$$.dirty[0] & /*progress*/
+ 128 && k != null && t(18, he = !1), n.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
+ 114816 && (k != null ? t(14, G = k.map((v) => {
+ if (v.index != null && v.length != null)
+ return v.index / v.length;
+ if (v.progress != null)
+ return v.progress;
+ })) : t(14, G = null), G ? (t(15, ne = G[G.length - 1]), B && (ne === 0 ? t(16, B.style.transition = "0", B) : t(16, B.style.transition = "150ms", B))) : t(15, ne = void 0)), n.$$.dirty[0] & /*status*/
+ 16 && (f === "pending" ? Me() : h()), n.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
+ 10493968 && g && c && (f === "pending" || f === "complete") && ii(g, M), n.$$.dirty[0] & /*status, message*/
+ 4194320, n.$$.dirty[0] & /*timer_diff*/
+ 33554432 && t(20, o = Z.toFixed(1));
}, [
- f,
- s,
- a,
_,
+ s,
r,
- c,
+ a,
+ f,
+ u,
m,
- j,
- T,
- S,
+ k,
y,
+ L,
+ w,
d,
- C,
- h,
- A,
- K,
- D,
- ae,
- me,
+ q,
+ g,
+ G,
+ ne,
+ B,
+ ue,
he,
- n,
- u,
- k,
- L,
- J,
- E,
- O,
- R,
+ be,
o,
+ c,
+ b,
+ M,
+ E,
+ Z,
+ X,
+ A,
i,
- Oe,
- Ae
+ l,
+ Be,
+ Ie
];
}
-class oo extends Vi {
+class ai extends Vl {
constructor(e) {
- super(), Pi(
+ super(), Zl(
this,
e,
- io,
- lo,
- Oi,
+ si,
+ oi,
+ Bl,
{
i18n: 1,
eta: 0,
@@ -2882,354 +3665,405 @@ class oo extends Vi {
}
}
const {
- SvelteComponent: so,
- add_flush_callback: xt,
- assign: fo,
- bind: $t,
- binding_callbacks: el,
- check_outros: _o,
- create_component: $e,
- destroy_component: et,
- detach: ao,
- flush: N,
- get_spread_object: ro,
- get_spread_update: uo,
- group_outros: co,
- init: mo,
- insert: go,
- mount_component: tt,
- safe_not_equal: ho,
- space: bo,
- transition_in: ye,
+ SvelteComponent: _p,
+ add_render_callback: rp,
+ append: fp,
+ attr: cp,
+ bubble: up,
+ check_outros: dp,
+ create_component: mp,
+ create_in_transition: pp,
+ create_out_transition: gp,
+ destroy_component: hp,
+ detach: vp,
+ element: bp,
+ group_outros: wp,
+ init: $p,
+ insert: Cp,
+ listen: qp,
+ mount_component: kp,
+ run_all: Sp,
+ safe_not_equal: yp,
+ set_data: Lp,
+ space: Mp,
+ stop_propagation: jp,
+ text: Tp,
+ transition_in: Fp,
+ transition_out: Hp
+} = window.__gradio__svelte__internal, { createEventDispatcher: Np, onMount: Vp } = window.__gradio__svelte__internal, {
+ SvelteComponent: zp,
+ append: Ep,
+ attr: Dp,
+ bubble: Rp,
+ check_outros: Op,
+ create_animation: Zp,
+ create_component: Ap,
+ destroy_component: Bp,
+ detach: Ip,
+ element: Pp,
+ ensure_array_like: Wp,
+ fix_and_outro_and_destroy_block: Xp,
+ fix_position: Gp,
+ group_outros: Up,
+ init: Yp,
+ insert: Jp,
+ mount_component: Kp,
+ noop: Qp,
+ safe_not_equal: xp,
+ set_style: eg,
+ space: tg,
+ transition_in: ng,
+ transition_out: og,
+ update_keyed_each: lg
+} = window.__gradio__svelte__internal, {
+ SvelteComponent: _i,
+ add_flush_callback: en,
+ assign: ri,
+ bind: tn,
+ binding_callbacks: nn,
+ check_outros: fi,
+ create_component: tt,
+ destroy_component: nt,
+ detach: ci,
+ flush: H,
+ get_spread_object: ui,
+ get_spread_update: di,
+ group_outros: mi,
+ init: pi,
+ insert: gi,
+ mount_component: ot,
+ safe_not_equal: hi,
+ space: vi,
+ transition_in: qe,
transition_out: He
} = window.__gradio__svelte__internal;
-function tl(l) {
+function on(n) {
let e, t;
- const n = [
+ const o = [
{ autoscroll: (
/*gradio*/
- l[3].autoscroll
+ n[3].autoscroll
) },
{ i18n: (
/*gradio*/
- l[3].i18n
+ n[3].i18n
) },
/*loading_status*/
- l[18]
+ n[18]
];
- let i = {};
- for (let o = 0; o < n.length; o += 1)
- i = fo(i, n[o]);
- return e = new oo({ props: i }), {
+ let l = {};
+ for (let i = 0; i < o.length; i += 1)
+ l = ri(l, o[i]);
+ return e = new ai({ props: l }), {
c() {
- $e(e.$$.fragment);
+ tt(e.$$.fragment);
},
- m(o, s) {
- tt(e, o, s), t = !0;
+ m(i, s) {
+ ot(e, i, s), t = !0;
},
- p(o, s) {
- const f = s[0] & /*gradio, loading_status*/
- 262152 ? uo(n, [
+ p(i, s) {
+ const _ = s[0] & /*gradio, loading_status*/
+ 262152 ? di(o, [
s[0] & /*gradio*/
8 && { autoscroll: (
/*gradio*/
- o[3].autoscroll
+ i[3].autoscroll
) },
s[0] & /*gradio*/
8 && { i18n: (
/*gradio*/
- o[3].i18n
+ i[3].i18n
) },
s[0] & /*loading_status*/
- 262144 && ro(
+ 262144 && ui(
/*loading_status*/
- o[18]
+ i[18]
)
]) : {};
- e.$set(f);
+ e.$set(_);
},
- i(o) {
- t || (ye(e.$$.fragment, o), t = !0);
+ i(i) {
+ t || (qe(e.$$.fragment, i), t = !0);
},
- o(o) {
- He(e.$$.fragment, o), t = !1;
+ o(i) {
+ He(e.$$.fragment, i), t = !1;
},
- d(o) {
- et(e, o);
+ d(i) {
+ nt(e, i);
}
};
}
-function wo(l) {
- let e, t, n, i, o, s = (
+function bi(n) {
+ let e, t, o, l, i, s = (
/*loading_status*/
- l[18] && tl(l)
+ n[18] && on(n)
);
- function f(r) {
- l[23](r);
+ function _(f) {
+ n[23](f);
}
- function a(r) {
- l[24](r);
+ function r(f) {
+ n[24](f);
}
- let _ = {
+ let a = {
label: (
/*label*/
- l[4]
+ n[4]
),
info: (
/*info*/
- l[6]
+ n[6]
),
show_label: (
/*show_label*/
- l[10]
+ n[10]
),
show_legend: (
/*show_legend*/
- l[11]
+ n[11]
),
show_legend_label: (
/*show_legend_label*/
- l[12]
+ n[12]
),
legend_label: (
/*legend_label*/
- l[5]
+ n[5]
),
color_map: (
/*color_map*/
- l[1]
+ n[1]
),
show_copy_button: (
/*show_copy_button*/
- l[16]
+ n[16]
),
show_remove_tags_button: (
/*show_remove_tags_button*/
- l[17]
+ n[17]
),
container: (
/*container*/
- l[13]
+ n[13]
),
disabled: !/*interactive*/
- l[19]
+ n[19]
};
return (
/*value*/
- l[0] !== void 0 && (_.value = /*value*/
- l[0]), /*value_is_output*/
- l[2] !== void 0 && (_.value_is_output = /*value_is_output*/
- l[2]), t = new si({ props: _ }), el.push(() => $t(t, "value", f)), el.push(() => $t(t, "value_is_output", a)), t.$on(
+ n[0] !== void 0 && (a.value = /*value*/
+ n[0]), /*value_is_output*/
+ n[2] !== void 0 && (a.value_is_output = /*value_is_output*/
+ n[2]), t = new al({ props: a }), nn.push(() => tn(t, "value", _)), nn.push(() => tn(t, "value_is_output", r)), t.$on(
"change",
/*change_handler*/
- l[25]
+ n[25]
), t.$on(
"input",
/*input_handler*/
- l[26]
+ n[26]
), t.$on(
"submit",
/*submit_handler*/
- l[27]
+ n[27]
), t.$on(
"blur",
/*blur_handler*/
- l[28]
+ n[28]
), t.$on(
"select",
/*select_handler*/
- l[29]
+ n[29]
), t.$on(
"focus",
/*focus_handler*/
- l[30]
+ n[30]
), t.$on(
"clear",
/*clear_handler*/
- l[31]
+ n[31]
), {
c() {
- s && s.c(), e = bo(), $e(t.$$.fragment);
+ s && s.c(), e = vi(), tt(t.$$.fragment);
},
- m(r, u) {
- s && s.m(r, u), go(r, e, u), tt(t, r, u), o = !0;
+ m(f, c) {
+ s && s.m(f, c), gi(f, e, c), ot(t, f, c), i = !0;
},
- p(r, u) {
+ p(f, c) {
/*loading_status*/
- r[18] ? s ? (s.p(r, u), u[0] & /*loading_status*/
- 262144 && ye(s, 1)) : (s = tl(r), s.c(), ye(s, 1), s.m(e.parentNode, e)) : s && (co(), He(s, 1, 1, () => {
+ f[18] ? s ? (s.p(f, c), c[0] & /*loading_status*/
+ 262144 && qe(s, 1)) : (s = on(f), s.c(), qe(s, 1), s.m(e.parentNode, e)) : s && (mi(), He(s, 1, 1, () => {
s = null;
- }), _o());
- const c = {};
- u[0] & /*label*/
- 16 && (c.label = /*label*/
- r[4]), u[0] & /*info*/
- 64 && (c.info = /*info*/
- r[6]), u[0] & /*show_label*/
- 1024 && (c.show_label = /*show_label*/
- r[10]), u[0] & /*show_legend*/
- 2048 && (c.show_legend = /*show_legend*/
- r[11]), u[0] & /*show_legend_label*/
- 4096 && (c.show_legend_label = /*show_legend_label*/
- r[12]), u[0] & /*legend_label*/
- 32 && (c.legend_label = /*legend_label*/
- r[5]), u[0] & /*color_map*/
- 2 && (c.color_map = /*color_map*/
- r[1]), u[0] & /*show_copy_button*/
- 65536 && (c.show_copy_button = /*show_copy_button*/
- r[16]), u[0] & /*show_remove_tags_button*/
- 131072 && (c.show_remove_tags_button = /*show_remove_tags_button*/
- r[17]), u[0] & /*container*/
- 8192 && (c.container = /*container*/
- r[13]), u[0] & /*interactive*/
- 524288 && (c.disabled = !/*interactive*/
- r[19]), !n && u[0] & /*value*/
- 1 && (n = !0, c.value = /*value*/
- r[0], xt(() => n = !1)), !i && u[0] & /*value_is_output*/
- 4 && (i = !0, c.value_is_output = /*value_is_output*/
- r[2], xt(() => i = !1)), t.$set(c);
+ }), fi());
+ const u = {};
+ c[0] & /*label*/
+ 16 && (u.label = /*label*/
+ f[4]), c[0] & /*info*/
+ 64 && (u.info = /*info*/
+ f[6]), c[0] & /*show_label*/
+ 1024 && (u.show_label = /*show_label*/
+ f[10]), c[0] & /*show_legend*/
+ 2048 && (u.show_legend = /*show_legend*/
+ f[11]), c[0] & /*show_legend_label*/
+ 4096 && (u.show_legend_label = /*show_legend_label*/
+ f[12]), c[0] & /*legend_label*/
+ 32 && (u.legend_label = /*legend_label*/
+ f[5]), c[0] & /*color_map*/
+ 2 && (u.color_map = /*color_map*/
+ f[1]), c[0] & /*show_copy_button*/
+ 65536 && (u.show_copy_button = /*show_copy_button*/
+ f[16]), c[0] & /*show_remove_tags_button*/
+ 131072 && (u.show_remove_tags_button = /*show_remove_tags_button*/
+ f[17]), c[0] & /*container*/
+ 8192 && (u.container = /*container*/
+ f[13]), c[0] & /*interactive*/
+ 524288 && (u.disabled = !/*interactive*/
+ f[19]), !o && c[0] & /*value*/
+ 1 && (o = !0, u.value = /*value*/
+ f[0], en(() => o = !1)), !l && c[0] & /*value_is_output*/
+ 4 && (l = !0, u.value_is_output = /*value_is_output*/
+ f[2], en(() => l = !1)), t.$set(u);
},
- i(r) {
- o || (ye(s), ye(t.$$.fragment, r), o = !0);
+ i(f) {
+ i || (qe(s), qe(t.$$.fragment, f), i = !0);
},
- o(r) {
- He(s), He(t.$$.fragment, r), o = !1;
+ o(f) {
+ He(s), He(t.$$.fragment, f), i = !1;
},
- d(r) {
- r && ao(e), s && s.d(r), et(t, r);
+ d(f) {
+ f && ci(e), s && s.d(f), nt(t, f);
}
}
);
}
-function vo(l) {
+function wi(n) {
let e, t;
- return e = new yi({
+ return e = new ql({
props: {
visible: (
/*visible*/
- l[9]
+ n[9]
),
elem_id: (
/*elem_id*/
- l[7]
+ n[7]
),
elem_classes: (
/*elem_classes*/
- l[8]
+ n[8]
),
scale: (
/*scale*/
- l[14]
+ n[14]
),
min_width: (
/*min_width*/
- l[15]
+ n[15]
),
allow_overflow: !1,
padding: (
/*container*/
- l[13]
+ n[13]
),
- $$slots: { default: [wo] },
- $$scope: { ctx: l }
+ $$slots: { default: [bi] },
+ $$scope: { ctx: n }
}
}), {
c() {
- $e(e.$$.fragment);
- },
- m(n, i) {
- tt(e, n, i), t = !0;
- },
- p(n, i) {
- const o = {};
- i[0] & /*visible*/
- 512 && (o.visible = /*visible*/
- n[9]), i[0] & /*elem_id*/
- 128 && (o.elem_id = /*elem_id*/
- n[7]), i[0] & /*elem_classes*/
- 256 && (o.elem_classes = /*elem_classes*/
- n[8]), i[0] & /*scale*/
- 16384 && (o.scale = /*scale*/
- n[14]), i[0] & /*min_width*/
- 32768 && (o.min_width = /*min_width*/
- n[15]), i[0] & /*container*/
- 8192 && (o.padding = /*container*/
- n[13]), i[0] & /*label, info, show_label, show_legend, show_legend_label, legend_label, color_map, show_copy_button, show_remove_tags_button, container, interactive, value, value_is_output, gradio, loading_status*/
- 998527 | i[1] & /*$$scope*/
- 2 && (o.$$scope = { dirty: i, ctx: n }), e.$set(o);
- },
- i(n) {
- t || (ye(e.$$.fragment, n), t = !0);
- },
- o(n) {
- He(e.$$.fragment, n), t = !1;
- },
- d(n) {
- et(e, n);
+ tt(e.$$.fragment);
+ },
+ m(o, l) {
+ ot(e, o, l), t = !0;
+ },
+ p(o, l) {
+ const i = {};
+ l[0] & /*visible*/
+ 512 && (i.visible = /*visible*/
+ o[9]), l[0] & /*elem_id*/
+ 128 && (i.elem_id = /*elem_id*/
+ o[7]), l[0] & /*elem_classes*/
+ 256 && (i.elem_classes = /*elem_classes*/
+ o[8]), l[0] & /*scale*/
+ 16384 && (i.scale = /*scale*/
+ o[14]), l[0] & /*min_width*/
+ 32768 && (i.min_width = /*min_width*/
+ o[15]), l[0] & /*container*/
+ 8192 && (i.padding = /*container*/
+ o[13]), l[0] & /*label, info, show_label, show_legend, show_legend_label, legend_label, color_map, show_copy_button, show_remove_tags_button, container, interactive, value, value_is_output, gradio, loading_status*/
+ 998527 | l[1] & /*$$scope*/
+ 2 && (i.$$scope = { dirty: l, ctx: o }), e.$set(i);
+ },
+ i(o) {
+ t || (qe(e.$$.fragment, o), t = !0);
+ },
+ o(o) {
+ He(e.$$.fragment, o), t = !1;
+ },
+ d(o) {
+ nt(e, o);
}
};
}
-function po(l, e, t) {
- let { gradio: n } = e, { label: i = "Highlighted Textbox" } = e, { legend_label: o = "Highlights:" } = e, { info: s = void 0 } = e, { elem_id: f = "" } = e, { elem_classes: a = [] } = e, { visible: _ = !0 } = e, { value: r } = e, { show_label: u } = e, { show_legend: c } = e, { show_legend_label: m } = e, { color_map: k = {} } = e, { container: j = !0 } = e, { scale: T = null } = e, { min_width: S = void 0 } = e, { show_copy_button: y = !1 } = e, { show_remove_tags_button: d = !1 } = e, { loading_status: C = void 0 } = e, { value_is_output: L = !1 } = e, { combine_adjacent: h = !1 } = e, { interactive: Z = !0 } = e;
- const J = !1, E = !0;
- function O(b) {
- r = b, t(0, r), t(20, h);
+function $i(n, e, t) {
+ let { gradio: o } = e, { label: l = "Highlighted Textbox" } = e, { legend_label: i = "Highlights:" } = e, { info: s = void 0 } = e, { elem_id: _ = "" } = e, { elem_classes: r = [] } = e, { visible: a = !0 } = e, { value: f } = e, { show_label: c } = e, { show_legend: u } = e, { show_legend_label: m } = e, { color_map: b = {} } = e, { container: k = !0 } = e, { scale: y = null } = e, { min_width: L = void 0 } = e, { show_copy_button: w = !1 } = e, { show_remove_tags_button: d = !1 } = e, { loading_status: q = void 0 } = e, { value_is_output: M = !1 } = e, { combine_adjacent: g = !1 } = e, { interactive: N = !0 } = e;
+ const E = !1, Z = !0;
+ function X(h) {
+ f = h, t(0, f), t(20, g);
}
- function R(b) {
- L = b, t(2, L);
+ function A(h) {
+ M = h, t(2, M);
}
- const ae = () => n.dispatch("change"), A = () => n.dispatch("input"), K = () => n.dispatch("submit"), D = () => n.dispatch("blur"), me = (b) => n.dispatch("select", b.detail), Le = () => n.dispatch("focus"), ge = function() {
- console.log("test"), n.dispatch("clear");
+ const ue = () => o.dispatch("change"), G = () => o.dispatch("input"), ne = () => o.dispatch("submit"), B = () => o.dispatch("blur"), he = (h) => o.dispatch("select", h.detail), Me = () => o.dispatch("focus"), ve = function() {
+ console.log("test"), o.dispatch("clear");
};
- return l.$$set = (b) => {
- "gradio" in b && t(3, n = b.gradio), "label" in b && t(4, i = b.label), "legend_label" in b && t(5, o = b.legend_label), "info" in b && t(6, s = b.info), "elem_id" in b && t(7, f = b.elem_id), "elem_classes" in b && t(8, a = b.elem_classes), "visible" in b && t(9, _ = b.visible), "value" in b && t(0, r = b.value), "show_label" in b && t(10, u = b.show_label), "show_legend" in b && t(11, c = b.show_legend), "show_legend_label" in b && t(12, m = b.show_legend_label), "color_map" in b && t(1, k = b.color_map), "container" in b && t(13, j = b.container), "scale" in b && t(14, T = b.scale), "min_width" in b && t(15, S = b.min_width), "show_copy_button" in b && t(16, y = b.show_copy_button), "show_remove_tags_button" in b && t(17, d = b.show_remove_tags_button), "loading_status" in b && t(18, C = b.loading_status), "value_is_output" in b && t(2, L = b.value_is_output), "combine_adjacent" in b && t(20, h = b.combine_adjacent), "interactive" in b && t(19, Z = b.interactive);
- }, l.$$.update = () => {
- l.$$.dirty[0] & /*color_map*/
- 2 && !k && Object.keys(k).length && t(1, k), l.$$.dirty[0] & /*value, combine_adjacent*/
- 1048577 && r && h && t(0, r = Wn(r, "equal"));
+ return n.$$set = (h) => {
+ "gradio" in h && t(3, o = h.gradio), "label" in h && t(4, l = h.label), "legend_label" in h && t(5, i = h.legend_label), "info" in h && t(6, s = h.info), "elem_id" in h && t(7, _ = h.elem_id), "elem_classes" in h && t(8, r = h.elem_classes), "visible" in h && t(9, a = h.visible), "value" in h && t(0, f = h.value), "show_label" in h && t(10, c = h.show_label), "show_legend" in h && t(11, u = h.show_legend), "show_legend_label" in h && t(12, m = h.show_legend_label), "color_map" in h && t(1, b = h.color_map), "container" in h && t(13, k = h.container), "scale" in h && t(14, y = h.scale), "min_width" in h && t(15, L = h.min_width), "show_copy_button" in h && t(16, w = h.show_copy_button), "show_remove_tags_button" in h && t(17, d = h.show_remove_tags_button), "loading_status" in h && t(18, q = h.loading_status), "value_is_output" in h && t(2, M = h.value_is_output), "combine_adjacent" in h && t(20, g = h.combine_adjacent), "interactive" in h && t(19, N = h.interactive);
+ }, n.$$.update = () => {
+ n.$$.dirty[0] & /*color_map*/
+ 2 && !b && Object.keys(b).length && t(1, b), n.$$.dirty[0] & /*value, combine_adjacent*/
+ 1048577 && f && g && t(0, f = Po(f));
}, [
- r,
- k,
- L,
- n,
- i,
+ f,
+ b,
+ M,
o,
+ l,
+ i,
s,
- f,
- a,
_,
- u,
+ r,
+ a,
c,
+ u,
m,
- j,
- T,
- S,
+ k,
y,
+ L,
+ w,
d,
- C,
- Z,
- h,
- J,
+ q,
+ N,
+ g,
E,
- O,
- R,
- ae,
+ Z,
+ X,
A,
- K,
- D,
- me,
- Le,
- ge
+ ue,
+ G,
+ ne,
+ B,
+ he,
+ Me,
+ ve
];
}
-class ko extends so {
+class ig extends _i {
constructor(e) {
- super(), mo(
+ super(), pi(
this,
e,
- po,
- vo,
- ho,
+ $i,
+ wi,
+ hi,
{
gradio: 3,
label: 4,
@@ -3263,127 +4097,127 @@ class ko extends so {
return this.$$.ctx[3];
}
set gradio(e) {
- this.$$set({ gradio: e }), N();
+ this.$$set({ gradio: e }), H();
}
get label() {
return this.$$.ctx[4];
}
set label(e) {
- this.$$set({ label: e }), N();
+ this.$$set({ label: e }), H();
}
get legend_label() {
return this.$$.ctx[5];
}
set legend_label(e) {
- this.$$set({ legend_label: e }), N();
+ this.$$set({ legend_label: e }), H();
}
get info() {
return this.$$.ctx[6];
}
set info(e) {
- this.$$set({ info: e }), N();
+ this.$$set({ info: e }), H();
}
get elem_id() {
return this.$$.ctx[7];
}
set elem_id(e) {
- this.$$set({ elem_id: e }), N();
+ this.$$set({ elem_id: e }), H();
}
get elem_classes() {
return this.$$.ctx[8];
}
set elem_classes(e) {
- this.$$set({ elem_classes: e }), N();
+ this.$$set({ elem_classes: e }), H();
}
get visible() {
return this.$$.ctx[9];
}
set visible(e) {
- this.$$set({ visible: e }), N();
+ this.$$set({ visible: e }), H();
}
get value() {
return this.$$.ctx[0];
}
set value(e) {
- this.$$set({ value: e }), N();
+ this.$$set({ value: e }), H();
}
get show_label() {
return this.$$.ctx[10];
}
set show_label(e) {
- this.$$set({ show_label: e }), N();
+ this.$$set({ show_label: e }), H();
}
get show_legend() {
return this.$$.ctx[11];
}
set show_legend(e) {
- this.$$set({ show_legend: e }), N();
+ this.$$set({ show_legend: e }), H();
}
get show_legend_label() {
return this.$$.ctx[12];
}
set show_legend_label(e) {
- this.$$set({ show_legend_label: e }), N();
+ this.$$set({ show_legend_label: e }), H();
}
get color_map() {
return this.$$.ctx[1];
}
set color_map(e) {
- this.$$set({ color_map: e }), N();
+ this.$$set({ color_map: e }), H();
}
get container() {
return this.$$.ctx[13];
}
set container(e) {
- this.$$set({ container: e }), N();
+ this.$$set({ container: e }), H();
}
get scale() {
return this.$$.ctx[14];
}
set scale(e) {
- this.$$set({ scale: e }), N();
+ this.$$set({ scale: e }), H();
}
get min_width() {
return this.$$.ctx[15];
}
set min_width(e) {
- this.$$set({ min_width: e }), N();
+ this.$$set({ min_width: e }), H();
}
get show_copy_button() {
return this.$$.ctx[16];
}
set show_copy_button(e) {
- this.$$set({ show_copy_button: e }), N();
+ this.$$set({ show_copy_button: e }), H();
}
get show_remove_tags_button() {
return this.$$.ctx[17];
}
set show_remove_tags_button(e) {
- this.$$set({ show_remove_tags_button: e }), N();
+ this.$$set({ show_remove_tags_button: e }), H();
}
get loading_status() {
return this.$$.ctx[18];
}
set loading_status(e) {
- this.$$set({ loading_status: e }), N();
+ this.$$set({ loading_status: e }), H();
}
get value_is_output() {
return this.$$.ctx[2];
}
set value_is_output(e) {
- this.$$set({ value_is_output: e }), N();
+ this.$$set({ value_is_output: e }), H();
}
get combine_adjacent() {
return this.$$.ctx[20];
}
set combine_adjacent(e) {
- this.$$set({ combine_adjacent: e }), N();
+ this.$$set({ combine_adjacent: e }), H();
}
get interactive() {
return this.$$.ctx[19];
}
set interactive(e) {
- this.$$set({ interactive: e }), N();
+ this.$$set({ interactive: e }), H();
}
get autofocus() {
return this.$$.ctx[21];
@@ -3393,5 +4227,5 @@ class ko extends so {
}
}
export {
- ko as default
+ ig as default
};