diff --git "a/src/backend/gradio_image_annotation/templates/component/index.js" "b/src/backend/gradio_image_annotation/templates/component/index.js" --- "a/src/backend/gradio_image_annotation/templates/component/index.js" +++ "b/src/backend/gradio_image_annotation/templates/component/index.js" @@ -1,35 +1,35 @@ const { - SvelteComponent: ra, - assign: fa, - create_slot: ua, - detach: ca, - element: _a, - get_all_dirty_from_scope: da, - get_slot_changes: ha, - get_spread_update: ma, - init: ba, - insert: ga, - safe_not_equal: wa, - set_dynamic_element_data: Bi, - set_style: pe, - toggle_class: He, - transition_in: lo, - transition_out: io, - update_slot_base: pa + SvelteComponent: ma, + assign: ga, + create_slot: ba, + detach: wa, + element: pa, + get_all_dirty_from_scope: va, + get_slot_changes: ka, + get_spread_update: ya, + init: Ca, + insert: Sa, + safe_not_equal: za, + set_dynamic_element_data: Ti, + set_style: we, + toggle_class: Ve, + transition_in: cs, + transition_out: _s, + update_slot_base: qa } = window.__gradio__svelte__internal; -function ka(l) { +function Ba(l) { let e, t, n; const i = ( /*#slots*/ l[18].default - ), s = ua( + ), o = ba( i, l, /*$$scope*/ l[17], null ); - let a = [ + let s = [ { "data-testid": ( /*test_id*/ l[7] @@ -43,39 +43,39 @@ function ka(l) { l[3].join(" ") + " svelte-nl1om8" } ], r = {}; - for (let o = 0; o < a.length; o += 1) - r = fa(r, a[o]); + for (let a = 0; a < s.length; a += 1) + r = ga(r, s[a]); return { c() { - e = _a( + e = pa( /*tag*/ l[14] - ), s && s.c(), Bi( + ), o && o.c(), Ti( /*tag*/ l[14] - )(e, r), He( + )(e, r), Ve( e, "hidden", /*visible*/ l[10] === !1 - ), He( + ), Ve( e, "padded", /*padding*/ l[6] - ), He( + ), Ve( e, "border_focus", /*border_mode*/ l[5] === "focus" - ), He( + ), Ve( e, "border_contrast", /*border_mode*/ l[5] === "contrast" - ), He(e, "hide-container", !/*explicit_call*/ + ), Ve(e, "hide-container", !/*explicit_call*/ l[8] && !/*container*/ - l[9]), pe( + l[9]), we( e, "height", /*get_dimension*/ @@ -83,7 +83,7 @@ function ka(l) { /*height*/ l[0] ) - ), pe(e, "width", typeof /*width*/ + ), we(e, "width", typeof /*width*/ l[1] == "number" ? `calc(min(${/*width*/ l[1]}px, 100%))` : ( /*get_dimension*/ @@ -91,140 +91,140 @@ function ka(l) { /*width*/ l[1] ) - )), pe( + )), we( e, "border-style", /*variant*/ l[4] - ), pe( + ), we( e, "overflow", /*allow_overflow*/ l[11] ? "visible" : "hidden" - ), pe( + ), we( e, "flex-grow", /*scale*/ l[12] - ), pe(e, "min-width", `calc(min(${/*min_width*/ - l[13]}px, 100%))`), pe(e, "border-width", "var(--block-border-width)"); + ), we(e, "min-width", `calc(min(${/*min_width*/ + l[13]}px, 100%))`), we(e, "border-width", "var(--block-border-width)"); }, - m(o, f) { - ga(o, e, f), s && s.m(e, null), n = !0; + m(a, f) { + Sa(a, e, f), o && o.m(e, null), n = !0; }, - p(o, f) { - s && s.p && (!n || f & /*$$scope*/ - 131072) && pa( - s, - i, + p(a, f) { + o && o.p && (!n || f & /*$$scope*/ + 131072) && qa( o, + i, + a, /*$$scope*/ - o[17], - n ? ha( + a[17], + n ? ka( i, /*$$scope*/ - o[17], + a[17], f, null - ) : da( + ) : va( /*$$scope*/ - o[17] + a[17] ), null - ), Bi( + ), Ti( /*tag*/ - o[14] - )(e, r = ma(a, [ + a[14] + )(e, r = ya(s, [ (!n || f & /*test_id*/ 128) && { "data-testid": ( /*test_id*/ - o[7] + a[7] ) }, (!n || f & /*elem_id*/ 4) && { id: ( /*elem_id*/ - o[2] + a[2] ) }, (!n || f & /*elem_classes*/ 8 && t !== (t = "block " + /*elem_classes*/ - o[3].join(" ") + " svelte-nl1om8")) && { class: t } - ])), He( + a[3].join(" ") + " svelte-nl1om8")) && { class: t } + ])), Ve( e, "hidden", /*visible*/ - o[10] === !1 - ), He( + a[10] === !1 + ), Ve( e, "padded", /*padding*/ - o[6] - ), He( + a[6] + ), Ve( e, "border_focus", /*border_mode*/ - o[5] === "focus" - ), He( + a[5] === "focus" + ), Ve( e, "border_contrast", /*border_mode*/ - o[5] === "contrast" - ), He(e, "hide-container", !/*explicit_call*/ - o[8] && !/*container*/ - o[9]), f & /*height*/ - 1 && pe( + a[5] === "contrast" + ), Ve(e, "hide-container", !/*explicit_call*/ + a[8] && !/*container*/ + a[9]), f & /*height*/ + 1 && we( e, "height", /*get_dimension*/ - o[15]( + a[15]( /*height*/ - o[0] + a[0] ) ), f & /*width*/ - 2 && pe(e, "width", typeof /*width*/ - o[1] == "number" ? `calc(min(${/*width*/ - o[1]}px, 100%))` : ( + 2 && we(e, "width", typeof /*width*/ + a[1] == "number" ? `calc(min(${/*width*/ + a[1]}px, 100%))` : ( /*get_dimension*/ - o[15]( + a[15]( /*width*/ - o[1] + a[1] ) )), f & /*variant*/ - 16 && pe( + 16 && we( e, "border-style", /*variant*/ - o[4] + a[4] ), f & /*allow_overflow*/ - 2048 && pe( + 2048 && we( e, "overflow", /*allow_overflow*/ - o[11] ? "visible" : "hidden" + a[11] ? "visible" : "hidden" ), f & /*scale*/ - 4096 && pe( + 4096 && we( e, "flex-grow", /*scale*/ - o[12] + a[12] ), f & /*min_width*/ - 8192 && pe(e, "min-width", `calc(min(${/*min_width*/ - o[13]}px, 100%))`); + 8192 && we(e, "min-width", `calc(min(${/*min_width*/ + a[13]}px, 100%))`); }, - i(o) { - n || (lo(s, o), n = !0); + i(a) { + n || (cs(o, a), n = !0); }, - o(o) { - io(s, o), n = !1; + o(a) { + _s(o, a), n = !1; }, - d(o) { - o && ca(e), s && s.d(o); + d(a) { + a && wa(e), o && o.d(a); } }; } -function va(l) { +function Ea(l) { let e, t = ( /*tag*/ - l[14] && ka(l) + l[14] && Ba(l) ); return { c() { @@ -238,19 +238,19 @@ function va(l) { n[14] && t.p(n, i); }, i(n) { - e || (lo(t, n), e = !0); + e || (cs(t, n), e = !0); }, o(n) { - io(t, n), e = !1; + _s(t, n), e = !1; }, d(n) { t && t.d(n); } }; } -function ya(l, e, t) { - let { $$slots: n = {}, $$scope: i } = e, { height: s = void 0 } = e, { width: a = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: o = [] } = e, { variant: f = "solid" } = e, { border_mode: u = "base" } = e, { padding: c = !0 } = e, { type: d = "normal" } = e, { test_id: _ = void 0 } = e, { explicit_call: b = !1 } = e, { container: h = !0 } = e, { visible: w = !0 } = e, { allow_overflow: g = !0 } = e, { scale: p = null } = e, { min_width: m = 0 } = e, C = d === "fieldset" ? "fieldset" : "div"; - const z = (y) => { +function Ma(l, e, t) { + let { $$slots: n = {}, $$scope: i } = e, { height: o = void 0 } = e, { width: s = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: a = [] } = e, { variant: f = "solid" } = e, { border_mode: u = "base" } = e, { padding: c = !0 } = e, { type: _ = "normal" } = e, { test_id: d = void 0 } = e, { explicit_call: h = !1 } = e, { container: b = !0 } = e, { visible: g = !0 } = e, { allow_overflow: w = !0 } = e, { scale: p = null } = e, { min_width: m = 0 } = e, v = _ === "fieldset" ? "fieldset" : "div"; + const S = (y) => { if (y !== void 0) { if (typeof y == "number") return y + "px"; @@ -259,32 +259,32 @@ function ya(l, e, t) { } }; return l.$$set = (y) => { - "height" in y && t(0, s = y.height), "width" in y && t(1, a = y.width), "elem_id" in y && t(2, r = y.elem_id), "elem_classes" in y && t(3, o = y.elem_classes), "variant" in y && t(4, f = y.variant), "border_mode" in y && t(5, u = y.border_mode), "padding" in y && t(6, c = y.padding), "type" in y && t(16, d = y.type), "test_id" in y && t(7, _ = y.test_id), "explicit_call" in y && t(8, b = y.explicit_call), "container" in y && t(9, h = y.container), "visible" in y && t(10, w = y.visible), "allow_overflow" in y && t(11, g = y.allow_overflow), "scale" in y && t(12, p = y.scale), "min_width" in y && t(13, m = y.min_width), "$$scope" in y && t(17, i = y.$$scope); + "height" in y && t(0, o = y.height), "width" in y && t(1, s = y.width), "elem_id" in y && t(2, r = y.elem_id), "elem_classes" in y && t(3, a = y.elem_classes), "variant" in y && t(4, f = y.variant), "border_mode" in y && t(5, u = y.border_mode), "padding" in y && t(6, c = y.padding), "type" in y && t(16, _ = y.type), "test_id" in y && t(7, d = y.test_id), "explicit_call" in y && t(8, h = y.explicit_call), "container" in y && t(9, b = y.container), "visible" in y && t(10, g = y.visible), "allow_overflow" in y && t(11, w = y.allow_overflow), "scale" in y && t(12, p = y.scale), "min_width" in y && t(13, m = y.min_width), "$$scope" in y && t(17, i = y.$$scope); }, [ + o, s, - a, r, - o, + a, f, u, c, - _, - b, + d, h, - w, + b, g, + w, p, m, - C, - z, - d, + v, + S, + _, i, n ]; } -class Ca extends ra { +class Aa extends ma { constructor(e) { - super(), ba(this, e, ya, va, wa, { + super(), Ca(this, e, Ma, Ea, za, { height: 0, width: 1, elem_id: 2, @@ -304,26 +304,26 @@ class Ca extends ra { } } const { - SvelteComponent: Sa, - attr: za, - create_slot: qa, - detach: Ea, - element: Aa, - get_all_dirty_from_scope: Ba, - get_slot_changes: Ma, - init: La, - insert: Da, - safe_not_equal: Ta, - transition_in: Ra, - transition_out: ja, - update_slot_base: Ia + SvelteComponent: La, + attr: Ra, + create_slot: Da, + detach: Ta, + element: ja, + get_all_dirty_from_scope: Ha, + get_slot_changes: Ia, + init: Fa, + insert: Xa, + safe_not_equal: Ya, + transition_in: Ua, + transition_out: Va, + update_slot_base: Na } = window.__gradio__svelte__internal; -function Fa(l) { +function Oa(l) { let e, t; const n = ( /*#slots*/ l[1].default - ), i = qa( + ), i = Da( n, l, /*$$scope*/ @@ -332,141 +332,141 @@ function Fa(l) { ); return { c() { - e = Aa("div"), i && i.c(), za(e, "class", "svelte-1hnfib2"); + e = ja("div"), i && i.c(), Ra(e, "class", "svelte-1hnfib2"); }, - m(s, a) { - Da(s, e, a), i && i.m(e, null), t = !0; + m(o, s) { + Xa(o, e, s), i && i.m(e, null), t = !0; }, - p(s, [a]) { - i && i.p && (!t || a & /*$$scope*/ - 1) && Ia( + p(o, [s]) { + i && i.p && (!t || s & /*$$scope*/ + 1) && Na( i, n, - s, + o, /*$$scope*/ - s[0], - t ? Ma( + o[0], + t ? Ia( n, /*$$scope*/ - s[0], - a, + o[0], + s, null - ) : Ba( + ) : Ha( /*$$scope*/ - s[0] + o[0] ), null ); }, - i(s) { - t || (Ra(i, s), t = !0); + i(o) { + t || (Ua(i, o), t = !0); }, - o(s) { - ja(i, s), t = !1; + o(o) { + Va(i, o), t = !1; }, - d(s) { - s && Ea(e), i && i.d(s); + d(o) { + o && Ta(e), i && i.d(o); } }; } -function Ha(l, e, t) { +function Wa(l, e, t) { let { $$slots: n = {}, $$scope: i } = e; - return l.$$set = (s) => { - "$$scope" in s && t(0, i = s.$$scope); + return l.$$set = (o) => { + "$$scope" in o && t(0, i = o.$$scope); }, [i, n]; } -class Xa extends Sa { +class Pa extends La { constructor(e) { - super(), La(this, e, Ha, Fa, Ta, {}); + super(), Fa(this, e, Wa, Oa, Ya, {}); } } const { - SvelteComponent: Ya, - attr: Mi, - check_outros: Ua, - create_component: Na, - create_slot: Va, - destroy_component: Oa, - detach: Vn, - element: Wa, - empty: Pa, - get_all_dirty_from_scope: Za, - get_slot_changes: Ka, - group_outros: Ga, - init: Ja, - insert: On, - mount_component: Qa, - safe_not_equal: xa, - set_data: $a, - space: er, - text: tr, - toggle_class: Rt, - transition_in: rn, - transition_out: Wn, - update_slot_base: nr + SvelteComponent: Za, + attr: ji, + check_outros: Ka, + create_component: Ga, + create_slot: Ja, + destroy_component: Qa, + detach: Qn, + element: xa, + empty: $a, + get_all_dirty_from_scope: er, + get_slot_changes: tr, + group_outros: nr, + init: lr, + insert: xn, + mount_component: ir, + safe_not_equal: or, + set_data: sr, + space: ar, + text: rr, + toggle_class: It, + transition_in: cn, + transition_out: $n, + update_slot_base: fr } = window.__gradio__svelte__internal; -function Li(l) { +function Hi(l) { let e, t; - return e = new Xa({ + return e = new Pa({ props: { - $$slots: { default: [lr] }, + $$slots: { default: [ur] }, $$scope: { ctx: l } } }), { c() { - Na(e.$$.fragment); + Ga(e.$$.fragment); }, m(n, i) { - Qa(e, n, i), t = !0; + ir(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i & /*$$scope, info*/ - 10 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); + 10 && (o.$$scope = { dirty: i, ctx: n }), e.$set(o); }, i(n) { - t || (rn(e.$$.fragment, n), t = !0); + t || (cn(e.$$.fragment, n), t = !0); }, o(n) { - Wn(e.$$.fragment, n), t = !1; + $n(e.$$.fragment, n), t = !1; }, d(n) { - Oa(e, n); + Qa(e, n); } }; } -function lr(l) { +function ur(l) { let e; return { c() { - e = tr( + e = rr( /*info*/ l[1] ); }, m(t, n) { - On(t, e, n); + xn(t, e, n); }, p(t, n) { n & /*info*/ - 2 && $a( + 2 && sr( e, /*info*/ t[1] ); }, d(t) { - t && Vn(e); + t && Qn(e); } }; } -function ir(l) { +function cr(l) { let e, t, n, i; - const s = ( + const o = ( /*#slots*/ l[2].default - ), a = Va( - s, + ), s = Ja( + o, l, /*$$scope*/ l[3], @@ -474,141 +474,141 @@ function ir(l) { ); let r = ( /*info*/ - l[1] && Li(l) + l[1] && Hi(l) ); return { c() { - e = Wa("span"), a && a.c(), t = er(), r && r.c(), n = Pa(), Mi(e, "data-testid", "block-info"), Mi(e, "class", "svelte-22c38v"), Rt(e, "sr-only", !/*show_label*/ - l[0]), Rt(e, "hide", !/*show_label*/ - l[0]), Rt( + e = xa("span"), s && s.c(), t = ar(), r && r.c(), n = $a(), ji(e, "data-testid", "block-info"), ji(e, "class", "svelte-22c38v"), It(e, "sr-only", !/*show_label*/ + l[0]), It(e, "hide", !/*show_label*/ + l[0]), It( e, "has-info", /*info*/ l[1] != null ); }, - m(o, f) { - On(o, e, f), a && a.m(e, null), On(o, t, f), r && r.m(o, f), On(o, n, f), i = !0; + m(a, f) { + xn(a, e, f), s && s.m(e, null), xn(a, t, f), r && r.m(a, f), xn(a, n, f), i = !0; }, - p(o, [f]) { - a && a.p && (!i || f & /*$$scope*/ - 8) && nr( - a, + p(a, [f]) { + s && s.p && (!i || f & /*$$scope*/ + 8) && fr( s, o, + a, /*$$scope*/ - o[3], - i ? Ka( - s, + a[3], + i ? tr( + o, /*$$scope*/ - o[3], + a[3], f, null - ) : Za( + ) : er( /*$$scope*/ - o[3] + a[3] ), null ), (!i || f & /*show_label*/ - 1) && Rt(e, "sr-only", !/*show_label*/ - o[0]), (!i || f & /*show_label*/ - 1) && Rt(e, "hide", !/*show_label*/ - o[0]), (!i || f & /*info*/ - 2) && Rt( + 1) && It(e, "sr-only", !/*show_label*/ + a[0]), (!i || f & /*show_label*/ + 1) && It(e, "hide", !/*show_label*/ + a[0]), (!i || f & /*info*/ + 2) && It( e, "has-info", /*info*/ - o[1] != null + a[1] != null ), /*info*/ - o[1] ? r ? (r.p(o, f), f & /*info*/ - 2 && rn(r, 1)) : (r = Li(o), r.c(), rn(r, 1), r.m(n.parentNode, n)) : r && (Ga(), Wn(r, 1, 1, () => { + a[1] ? r ? (r.p(a, f), f & /*info*/ + 2 && cn(r, 1)) : (r = Hi(a), r.c(), cn(r, 1), r.m(n.parentNode, n)) : r && (nr(), $n(r, 1, 1, () => { r = null; - }), Ua()); + }), Ka()); }, - i(o) { - i || (rn(a, o), rn(r), i = !0); + i(a) { + i || (cn(s, a), cn(r), i = !0); }, - o(o) { - Wn(a, o), Wn(r), i = !1; + o(a) { + $n(s, a), $n(r), i = !1; }, - d(o) { - o && (Vn(e), Vn(t), Vn(n)), a && a.d(o), r && r.d(o); + d(a) { + a && (Qn(e), Qn(t), Qn(n)), s && s.d(a), r && r.d(a); } }; } -function sr(l, e, t) { - let { $$slots: n = {}, $$scope: i } = e, { show_label: s = !0 } = e, { info: a = void 0 } = e; +function _r(l, e, t) { + let { $$slots: n = {}, $$scope: i } = e, { show_label: o = !0 } = e, { info: s = void 0 } = e; return l.$$set = (r) => { - "show_label" in r && t(0, s = r.show_label), "info" in r && t(1, a = r.info), "$$scope" in r && t(3, i = r.$$scope); - }, [s, a, n, i]; + "show_label" in r && t(0, o = r.show_label), "info" in r && t(1, s = r.info), "$$scope" in r && t(3, i = r.$$scope); + }, [o, s, n, i]; } -class so extends Ya { +class ds extends Za { constructor(e) { - super(), Ja(this, e, sr, ir, xa, { show_label: 0, info: 1 }); + super(), lr(this, e, _r, cr, or, { show_label: 0, info: 1 }); } } const { - SvelteComponent: or, - append: zl, - attr: Mn, - create_component: ar, - destroy_component: rr, - detach: fr, - element: Di, - init: ur, - insert: cr, - mount_component: _r, - safe_not_equal: dr, - set_data: hr, - space: mr, - text: br, - toggle_class: $e, - transition_in: gr, - transition_out: wr + SvelteComponent: dr, + append: Ll, + attr: In, + create_component: hr, + destroy_component: mr, + detach: gr, + element: Ii, + init: br, + insert: wr, + mount_component: pr, + safe_not_equal: vr, + set_data: kr, + space: yr, + text: Cr, + toggle_class: nt, + transition_in: Sr, + transition_out: zr } = window.__gradio__svelte__internal; -function pr(l) { - let e, t, n, i, s, a; +function qr(l) { + let e, t, n, i, o, s; return n = new /*Icon*/ l[1]({}), { c() { - e = Di("label"), t = Di("span"), ar(n.$$.fragment), i = mr(), s = br( + e = Ii("label"), t = Ii("span"), hr(n.$$.fragment), i = yr(), o = Cr( /*label*/ l[0] - ), Mn(t, "class", "svelte-9gxdi0"), Mn(e, "for", ""), Mn(e, "data-testid", "block-label"), Mn(e, "class", "svelte-9gxdi0"), $e(e, "hide", !/*show_label*/ - l[2]), $e(e, "sr-only", !/*show_label*/ - l[2]), $e( + ), In(t, "class", "svelte-9gxdi0"), In(e, "for", ""), In(e, "data-testid", "block-label"), In(e, "class", "svelte-9gxdi0"), nt(e, "hide", !/*show_label*/ + l[2]), nt(e, "sr-only", !/*show_label*/ + l[2]), nt( e, "float", /*float*/ l[4] - ), $e( + ), nt( e, "hide-label", /*disable*/ l[3] ); }, - m(r, o) { - cr(r, e, o), zl(e, t), _r(n, t, null), zl(e, i), zl(e, s), a = !0; + m(r, a) { + wr(r, e, a), Ll(e, t), pr(n, t, null), Ll(e, i), Ll(e, o), s = !0; }, - p(r, [o]) { - (!a || o & /*label*/ - 1) && hr( - s, + p(r, [a]) { + (!s || a & /*label*/ + 1) && kr( + o, /*label*/ r[0] - ), (!a || o & /*show_label*/ - 4) && $e(e, "hide", !/*show_label*/ - r[2]), (!a || o & /*show_label*/ - 4) && $e(e, "sr-only", !/*show_label*/ - r[2]), (!a || o & /*float*/ - 16) && $e( + ), (!s || a & /*show_label*/ + 4) && nt(e, "hide", !/*show_label*/ + r[2]), (!s || a & /*show_label*/ + 4) && nt(e, "sr-only", !/*show_label*/ + r[2]), (!s || a & /*float*/ + 16) && nt( e, "float", /*float*/ r[4] - ), (!a || o & /*disable*/ - 8) && $e( + ), (!s || a & /*disable*/ + 8) && nt( e, "hide-label", /*disable*/ @@ -616,25 +616,25 @@ function pr(l) { ); }, i(r) { - a || (gr(n.$$.fragment, r), a = !0); + s || (Sr(n.$$.fragment, r), s = !0); }, o(r) { - wr(n.$$.fragment, r), a = !1; + zr(n.$$.fragment, r), s = !1; }, d(r) { - r && fr(e), rr(n); + r && gr(e), mr(n); } }; } -function kr(l, e, t) { - let { label: n = null } = e, { Icon: i } = e, { show_label: s = !0 } = e, { disable: a = !1 } = e, { float: r = !0 } = e; - return l.$$set = (o) => { - "label" in o && t(0, n = o.label), "Icon" in o && t(1, i = o.Icon), "show_label" in o && t(2, s = o.show_label), "disable" in o && t(3, a = o.disable), "float" in o && t(4, r = o.float); - }, [n, i, s, a, r]; +function Br(l, e, t) { + let { label: n = null } = e, { Icon: i } = e, { show_label: o = !0 } = e, { disable: s = !1 } = e, { float: r = !0 } = e; + return l.$$set = (a) => { + "label" in a && t(0, n = a.label), "Icon" in a && t(1, i = a.Icon), "show_label" in a && t(2, o = a.show_label), "disable" in a && t(3, s = a.disable), "float" in a && t(4, r = a.float); + }, [n, i, o, s, r]; } -class vr extends or { +class Er extends dr { constructor(e) { - super(), ur(this, e, kr, pr, dr, { + super(), br(this, e, Br, qr, vr, { label: 0, Icon: 1, show_label: 2, @@ -644,121 +644,121 @@ class vr extends or { } } const { - SvelteComponent: yr, - append: ni, - attr: Je, - bubble: Cr, - create_component: Sr, - destroy_component: zr, - detach: oo, - element: li, - init: qr, - insert: ao, - listen: Er, - mount_component: Ar, - safe_not_equal: Br, - set_data: Mr, - set_style: jt, - space: Lr, - text: Dr, - toggle_class: _e, - transition_in: Tr, - transition_out: Rr + SvelteComponent: Mr, + append: ai, + attr: $e, + bubble: Ar, + create_component: Lr, + destroy_component: Rr, + detach: hs, + element: ri, + init: Dr, + insert: ms, + listen: Tr, + mount_component: jr, + safe_not_equal: Hr, + set_data: Ir, + set_style: Ft, + space: Fr, + text: Xr, + toggle_class: he, + transition_in: Yr, + transition_out: Ur } = window.__gradio__svelte__internal; -function Ti(l) { +function Fi(l) { let e, t; return { c() { - e = li("span"), t = Dr( + e = ri("span"), t = Xr( /*label*/ l[1] - ), Je(e, "class", "svelte-1lrphxw"); + ), $e(e, "class", "svelte-1lrphxw"); }, m(n, i) { - ao(n, e, i), ni(e, t); + ms(n, e, i), ai(e, t); }, p(n, i) { i & /*label*/ - 2 && Mr( + 2 && Ir( t, /*label*/ n[1] ); }, d(n) { - n && oo(e); + n && hs(e); } }; } -function jr(l) { - let e, t, n, i, s, a, r, o = ( +function Vr(l) { + let e, t, n, i, o, s, r, a = ( /*show_label*/ - l[2] && Ti(l) + l[2] && Fi(l) ); return i = new /*Icon*/ l[0]({}), { c() { - e = li("button"), o && o.c(), t = Lr(), n = li("div"), Sr(i.$$.fragment), Je(n, "class", "svelte-1lrphxw"), _e( + e = ri("button"), a && a.c(), t = Fr(), n = ri("div"), Lr(i.$$.fragment), $e(n, "class", "svelte-1lrphxw"), he( n, "small", /*size*/ l[4] === "small" - ), _e( + ), he( n, "large", /*size*/ l[4] === "large" - ), _e( + ), he( n, "medium", /*size*/ l[4] === "medium" ), e.disabled = /*disabled*/ - l[7], Je( + l[7], $e( e, "aria-label", /*label*/ l[1] - ), Je( + ), $e( e, "aria-haspopup", /*hasPopup*/ l[8] - ), Je( + ), $e( e, "title", /*label*/ l[1] - ), Je(e, "class", "svelte-1lrphxw"), _e( + ), $e(e, "class", "svelte-1lrphxw"), he( e, "pending", /*pending*/ l[3] - ), _e( + ), he( e, "padded", /*padded*/ l[5] - ), _e( + ), he( e, "highlight", /*highlight*/ l[6] - ), _e( + ), he( e, "transparent", /*transparent*/ l[9] - ), jt(e, "color", !/*disabled*/ + ), Ft(e, "color", !/*disabled*/ l[7] && /*_color*/ l[12] ? ( /*_color*/ l[12] - ) : "var(--block-label-text-color)"), jt(e, "--bg-color", /*disabled*/ + ) : "var(--block-label-text-color)"), Ft(e, "--bg-color", /*disabled*/ l[7] ? "auto" : ( /*background*/ l[10] - )), jt( + )), Ft( e, "margin-left", /*offset*/ @@ -766,90 +766,90 @@ function jr(l) { ); }, m(f, u) { - ao(f, e, u), o && o.m(e, null), ni(e, t), ni(e, n), Ar(i, n, null), s = !0, a || (r = Er( + ms(f, e, u), a && a.m(e, null), ai(e, t), ai(e, n), jr(i, n, null), o = !0, s || (r = Tr( e, "click", /*click_handler*/ l[14] - ), a = !0); + ), s = !0); }, p(f, [u]) { /*show_label*/ - f[2] ? o ? o.p(f, u) : (o = Ti(f), o.c(), o.m(e, t)) : o && (o.d(1), o = null), (!s || u & /*size*/ - 16) && _e( + f[2] ? a ? a.p(f, u) : (a = Fi(f), a.c(), a.m(e, t)) : a && (a.d(1), a = null), (!o || u & /*size*/ + 16) && he( n, "small", /*size*/ f[4] === "small" - ), (!s || u & /*size*/ - 16) && _e( + ), (!o || u & /*size*/ + 16) && he( n, "large", /*size*/ f[4] === "large" - ), (!s || u & /*size*/ - 16) && _e( + ), (!o || u & /*size*/ + 16) && he( n, "medium", /*size*/ f[4] === "medium" - ), (!s || u & /*disabled*/ + ), (!o || u & /*disabled*/ 128) && (e.disabled = /*disabled*/ - f[7]), (!s || u & /*label*/ - 2) && Je( + f[7]), (!o || u & /*label*/ + 2) && $e( e, "aria-label", /*label*/ f[1] - ), (!s || u & /*hasPopup*/ - 256) && Je( + ), (!o || u & /*hasPopup*/ + 256) && $e( e, "aria-haspopup", /*hasPopup*/ f[8] - ), (!s || u & /*label*/ - 2) && Je( + ), (!o || u & /*label*/ + 2) && $e( e, "title", /*label*/ f[1] - ), (!s || u & /*pending*/ - 8) && _e( + ), (!o || u & /*pending*/ + 8) && he( e, "pending", /*pending*/ f[3] - ), (!s || u & /*padded*/ - 32) && _e( + ), (!o || u & /*padded*/ + 32) && he( e, "padded", /*padded*/ f[5] - ), (!s || u & /*highlight*/ - 64) && _e( + ), (!o || u & /*highlight*/ + 64) && he( e, "highlight", /*highlight*/ f[6] - ), (!s || u & /*transparent*/ - 512) && _e( + ), (!o || u & /*transparent*/ + 512) && he( e, "transparent", /*transparent*/ f[9] ), u & /*disabled, _color*/ - 4224 && jt(e, "color", !/*disabled*/ + 4224 && Ft(e, "color", !/*disabled*/ f[7] && /*_color*/ f[12] ? ( /*_color*/ f[12] ) : "var(--block-label-text-color)"), u & /*disabled, background*/ - 1152 && jt(e, "--bg-color", /*disabled*/ + 1152 && Ft(e, "--bg-color", /*disabled*/ f[7] ? "auto" : ( /*background*/ f[10] )), u & /*offset*/ - 2048 && jt( + 2048 && Ft( e, "margin-left", /*offset*/ @@ -857,47 +857,47 @@ function jr(l) { ); }, i(f) { - s || (Tr(i.$$.fragment, f), s = !0); + o || (Yr(i.$$.fragment, f), o = !0); }, o(f) { - Rr(i.$$.fragment, f), s = !1; + Ur(i.$$.fragment, f), o = !1; }, d(f) { - f && oo(e), o && o.d(), zr(i), a = !1, r(); + f && hs(e), a && a.d(), Rr(i), s = !1, r(); } }; } -function Ir(l, e, t) { - let n, { Icon: i } = e, { label: s = "" } = e, { show_label: a = !1 } = e, { pending: r = !1 } = e, { size: o = "small" } = e, { padded: f = !0 } = e, { highlight: u = !1 } = e, { disabled: c = !1 } = e, { hasPopup: d = !1 } = e, { color: _ = "var(--block-label-text-color)" } = e, { transparent: b = !1 } = e, { background: h = "var(--background-fill-primary)" } = e, { offset: w = 0 } = e; - function g(p) { - Cr.call(this, l, p); +function Nr(l, e, t) { + let n, { Icon: i } = e, { label: o = "" } = e, { show_label: s = !1 } = e, { pending: r = !1 } = e, { size: a = "small" } = e, { padded: f = !0 } = e, { highlight: u = !1 } = e, { disabled: c = !1 } = e, { hasPopup: _ = !1 } = e, { color: d = "var(--block-label-text-color)" } = e, { transparent: h = !1 } = e, { background: b = "var(--background-fill-primary)" } = e, { offset: g = 0 } = e; + function w(p) { + Ar.call(this, l, p); } return l.$$set = (p) => { - "Icon" in p && t(0, i = p.Icon), "label" in p && t(1, s = p.label), "show_label" in p && t(2, a = p.show_label), "pending" in p && t(3, r = p.pending), "size" in p && t(4, o = p.size), "padded" in p && t(5, f = p.padded), "highlight" in p && t(6, u = p.highlight), "disabled" in p && t(7, c = p.disabled), "hasPopup" in p && t(8, d = p.hasPopup), "color" in p && t(13, _ = p.color), "transparent" in p && t(9, b = p.transparent), "background" in p && t(10, h = p.background), "offset" in p && t(11, w = p.offset); + "Icon" in p && t(0, i = p.Icon), "label" in p && t(1, o = p.label), "show_label" in p && t(2, s = p.show_label), "pending" in p && t(3, r = p.pending), "size" in p && t(4, a = p.size), "padded" in p && t(5, f = p.padded), "highlight" in p && t(6, u = p.highlight), "disabled" in p && t(7, c = p.disabled), "hasPopup" in p && t(8, _ = p.hasPopup), "color" in p && t(13, d = p.color), "transparent" in p && t(9, h = p.transparent), "background" in p && t(10, b = p.background), "offset" in p && t(11, g = p.offset); }, l.$$.update = () => { l.$$.dirty & /*highlight, color*/ - 8256 && t(12, n = u ? "var(--color-accent)" : _); + 8256 && t(12, n = u ? "var(--color-accent)" : d); }, [ i, + o, s, - a, r, - o, + a, f, u, c, - d, - b, + _, h, - w, + b, + g, n, - _, - g + d, + w ]; } -class hl extends yr { +class pl extends Mr { constructor(e) { - super(), qr(this, e, Ir, jr, Br, { + super(), Dr(this, e, Nr, Vr, Hr, { Icon: 0, label: 1, show_label: 2, @@ -915,29 +915,29 @@ class hl extends yr { } } const { - SvelteComponent: Fr, - append: Hr, - attr: ql, - binding_callbacks: Xr, - create_slot: Yr, - detach: Ur, - element: Ri, - get_all_dirty_from_scope: Nr, - get_slot_changes: Vr, - init: Or, - insert: Wr, - safe_not_equal: Pr, - toggle_class: et, - transition_in: Zr, - transition_out: Kr, - update_slot_base: Gr + SvelteComponent: Or, + append: Wr, + attr: Rl, + binding_callbacks: Pr, + create_slot: Zr, + detach: Kr, + element: Xi, + get_all_dirty_from_scope: Gr, + get_slot_changes: Jr, + init: Qr, + insert: xr, + safe_not_equal: $r, + toggle_class: lt, + transition_in: ef, + transition_out: tf, + update_slot_base: nf } = window.__gradio__svelte__internal; -function Jr(l) { +function lf(l) { let e, t, n; const i = ( /*#slots*/ l[5].default - ), s = Yr( + ), o = Zr( i, l, /*$$scope*/ @@ -946,411 +946,411 @@ function Jr(l) { ); return { c() { - e = Ri("div"), t = Ri("div"), s && s.c(), ql(t, "class", "icon svelte-3w3rth"), ql(e, "class", "empty svelte-3w3rth"), ql(e, "aria-label", "Empty value"), et( + e = Xi("div"), t = Xi("div"), o && o.c(), Rl(t, "class", "icon svelte-3w3rth"), Rl(e, "class", "empty svelte-3w3rth"), Rl(e, "aria-label", "Empty value"), lt( e, "small", /*size*/ l[0] === "small" - ), et( + ), lt( e, "large", /*size*/ l[0] === "large" - ), et( + ), lt( e, "unpadded_box", /*unpadded_box*/ l[1] - ), et( + ), lt( e, "small_parent", /*parent_height*/ l[3] ); }, - m(a, r) { - Wr(a, e, r), Hr(e, t), s && s.m(t, null), l[6](e), n = !0; + m(s, r) { + xr(s, e, r), Wr(e, t), o && o.m(t, null), l[6](e), n = !0; }, - p(a, [r]) { - s && s.p && (!n || r & /*$$scope*/ - 16) && Gr( - s, + p(s, [r]) { + o && o.p && (!n || r & /*$$scope*/ + 16) && nf( + o, i, - a, + s, /*$$scope*/ - a[4], - n ? Vr( + s[4], + n ? Jr( i, /*$$scope*/ - a[4], + s[4], r, null - ) : Nr( + ) : Gr( /*$$scope*/ - a[4] + s[4] ), null ), (!n || r & /*size*/ - 1) && et( + 1) && lt( e, "small", /*size*/ - a[0] === "small" + s[0] === "small" ), (!n || r & /*size*/ - 1) && et( + 1) && lt( e, "large", /*size*/ - a[0] === "large" + s[0] === "large" ), (!n || r & /*unpadded_box*/ - 2) && et( + 2) && lt( e, "unpadded_box", /*unpadded_box*/ - a[1] + s[1] ), (!n || r & /*parent_height*/ - 8) && et( + 8) && lt( e, "small_parent", /*parent_height*/ - a[3] + s[3] ); }, - i(a) { - n || (Zr(s, a), n = !0); + i(s) { + n || (ef(o, s), n = !0); }, - o(a) { - Kr(s, a), n = !1; + o(s) { + tf(o, s), n = !1; }, - d(a) { - a && Ur(e), s && s.d(a), l[6](null); + d(s) { + s && Kr(e), o && o.d(s), l[6](null); } }; } -function Qr(l, e, t) { - let n, { $$slots: i = {}, $$scope: s } = e, { size: a = "small" } = e, { unpadded_box: r = !1 } = e, o; +function of(l, e, t) { + let n, { $$slots: i = {}, $$scope: o } = e, { size: s = "small" } = e, { unpadded_box: r = !1 } = e, a; function f(c) { - var d; + var _; if (!c) return !1; - const { height: _ } = c.getBoundingClientRect(), { height: b } = ((d = c.parentElement) === null || d === void 0 ? void 0 : d.getBoundingClientRect()) || { height: _ }; - return _ > b + 2; + const { height: d } = c.getBoundingClientRect(), { height: h } = ((_ = c.parentElement) === null || _ === void 0 ? void 0 : _.getBoundingClientRect()) || { height: d }; + return d > h + 2; } function u(c) { - Xr[c ? "unshift" : "push"](() => { - o = c, t(2, o); + Pr[c ? "unshift" : "push"](() => { + a = c, t(2, a); }); } return l.$$set = (c) => { - "size" in c && t(0, a = c.size), "unpadded_box" in c && t(1, r = c.unpadded_box), "$$scope" in c && t(4, s = c.$$scope); + "size" in c && t(0, s = c.size), "unpadded_box" in c && t(1, r = c.unpadded_box), "$$scope" in c && t(4, o = c.$$scope); }, l.$$.update = () => { l.$$.dirty & /*el*/ - 4 && t(3, n = f(o)); - }, [a, r, o, n, s, i, u]; -} -class xr extends Fr { - constructor(e) { - super(), Or(this, e, Qr, Jr, Pr, { size: 0, unpadded_box: 1 }); - } -} -const { - SvelteComponent: $r, - append: El, - attr: Le, - detach: ef, - init: tf, - insert: nf, - noop: Al, - safe_not_equal: lf, - set_style: Xe, - svg_element: Ln -} = window.__gradio__svelte__internal; -function sf(l) { - let e, t, n, i; - return { - c() { - e = Ln("svg"), t = Ln("g"), n = Ln("path"), i = Ln("path"), Le(n, "d", "M18,6L6.087,17.913"), Xe(n, "fill", "none"), Xe(n, "fill-rule", "nonzero"), Xe(n, "stroke-width", "2px"), Le(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Le(i, "d", "M4.364,4.364L19.636,19.636"), Xe(i, "fill", "none"), Xe(i, "fill-rule", "nonzero"), Xe(i, "stroke-width", "2px"), Le(e, "width", "100%"), Le(e, "height", "100%"), Le(e, "viewBox", "0 0 24 24"), Le(e, "version", "1.1"), Le(e, "xmlns", "http://www.w3.org/2000/svg"), Le(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Le(e, "xml:space", "preserve"), Le(e, "stroke", "currentColor"), Xe(e, "fill-rule", "evenodd"), Xe(e, "clip-rule", "evenodd"), Xe(e, "stroke-linecap", "round"), Xe(e, "stroke-linejoin", "round"); - }, - m(s, a) { - nf(s, e, a), El(e, t), El(t, n), El(e, i); - }, - p: Al, - i: Al, - o: Al, - d(s) { - s && ef(e); - } - }; + 4 && t(3, n = f(a)); + }, [s, r, a, n, o, i, u]; } -class ro extends $r { +class sf extends Or { constructor(e) { - super(), tf(this, e, null, sf, lf, {}); + super(), Qr(this, e, of, lf, $r, { size: 0, unpadded_box: 1 }); } } const { - SvelteComponent: of, - append: af, - attr: nn, + SvelteComponent: af, + append: Dl, + attr: Re, detach: rf, init: ff, insert: uf, - noop: Bl, + noop: Tl, safe_not_equal: cf, - svg_element: ji + set_style: Ne, + svg_element: Fn } = window.__gradio__svelte__internal; function _f(l) { - let e, t; + let e, t, n, i; return { c() { - e = ji("svg"), t = ji("path"), nn(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), nn(t, "fill", "currentColor"), nn(e, "id", "icon"), nn(e, "xmlns", "http://www.w3.org/2000/svg"), nn(e, "viewBox", "0 0 32 32"); + e = Fn("svg"), t = Fn("g"), n = Fn("path"), i = Fn("path"), Re(n, "d", "M18,6L6.087,17.913"), Ne(n, "fill", "none"), Ne(n, "fill-rule", "nonzero"), Ne(n, "stroke-width", "2px"), Re(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Re(i, "d", "M4.364,4.364L19.636,19.636"), Ne(i, "fill", "none"), Ne(i, "fill-rule", "nonzero"), Ne(i, "stroke-width", "2px"), Re(e, "width", "100%"), Re(e, "height", "100%"), Re(e, "viewBox", "0 0 24 24"), Re(e, "version", "1.1"), Re(e, "xmlns", "http://www.w3.org/2000/svg"), Re(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Re(e, "xml:space", "preserve"), Re(e, "stroke", "currentColor"), Ne(e, "fill-rule", "evenodd"), Ne(e, "clip-rule", "evenodd"), Ne(e, "stroke-linecap", "round"), Ne(e, "stroke-linejoin", "round"); }, - m(n, i) { - uf(n, e, i), af(e, t); + m(o, s) { + uf(o, e, s), Dl(e, t), Dl(t, n), Dl(e, i); }, - p: Bl, - i: Bl, - o: Bl, - d(n) { - n && rf(e); + p: Tl, + i: Tl, + o: Tl, + d(o) { + o && rf(e); } }; } -class df extends of { +class gs extends af { constructor(e) { super(), ff(this, e, null, _f, cf, {}); } } const { - SvelteComponent: hf, - append: mf, - attr: It, - detach: bf, + SvelteComponent: df, + append: hf, + attr: sn, + detach: mf, init: gf, - insert: wf, - noop: Ml, - safe_not_equal: pf, - svg_element: Ii + insert: bf, + noop: jl, + safe_not_equal: wf, + svg_element: Yi } = window.__gradio__svelte__internal; -function kf(l) { +function pf(l) { let e, t; return { c() { - e = Ii("svg"), t = Ii("path"), It(t, "fill", "currentColor"), It(t, "d", "M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"), It(e, "xmlns", "http://www.w3.org/2000/svg"), It(e, "width", "100%"), It(e, "height", "100%"), It(e, "viewBox", "0 0 32 32"); + e = Yi("svg"), t = Yi("path"), sn(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), sn(t, "fill", "currentColor"), sn(e, "id", "icon"), sn(e, "xmlns", "http://www.w3.org/2000/svg"), sn(e, "viewBox", "0 0 32 32"); }, m(n, i) { - wf(n, e, i), mf(e, t); + bf(n, e, i), hf(e, t); }, - p: Ml, - i: Ml, - o: Ml, + p: jl, + i: jl, + o: jl, d(n) { - n && bf(e); + n && mf(e); } }; } -class vf extends hf { +class vf extends df { constructor(e) { - super(), gf(this, e, null, kf, pf, {}); + super(), gf(this, e, null, pf, wf, {}); } } const { - SvelteComponent: yf, - append: Cf, - attr: Ft, - detach: Sf, - init: zf, - insert: qf, - noop: Ll, - safe_not_equal: Ef, - svg_element: Fi + SvelteComponent: kf, + append: yf, + attr: Xt, + detach: Cf, + init: Sf, + insert: zf, + noop: Hl, + safe_not_equal: qf, + svg_element: Ui } = window.__gradio__svelte__internal; -function Af(l) { +function Bf(l) { let e, t; return { c() { - e = Fi("svg"), t = Fi("path"), Ft(t, "d", "M5 8l4 4 4-4z"), Ft(e, "class", "dropdown-arrow svelte-145leq6"), Ft(e, "xmlns", "http://www.w3.org/2000/svg"), Ft(e, "width", "100%"), Ft(e, "height", "100%"), Ft(e, "viewBox", "0 0 18 18"); + e = Ui("svg"), t = Ui("path"), Xt(t, "fill", "currentColor"), Xt(t, "d", "M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"), Xt(e, "xmlns", "http://www.w3.org/2000/svg"), Xt(e, "width", "100%"), Xt(e, "height", "100%"), Xt(e, "viewBox", "0 0 32 32"); }, m(n, i) { - qf(n, e, i), Cf(e, t); + zf(n, e, i), yf(e, t); }, - p: Ll, - i: Ll, - o: Ll, + p: Hl, + i: Hl, + o: Hl, d(n) { - n && Sf(e); + n && Cf(e); } }; } -class Bf extends yf { +class Ef extends kf { constructor(e) { - super(), zf(this, e, null, Af, Ef, {}); + super(), Sf(this, e, null, Bf, qf, {}); } } const { SvelteComponent: Mf, - append: Dl, - attr: x, + append: Af, + attr: Yt, detach: Lf, - init: Df, - insert: Tf, - noop: Tl, - safe_not_equal: Rf, - svg_element: Dn + init: Rf, + insert: Df, + noop: Il, + safe_not_equal: Tf, + svg_element: Vi } = window.__gradio__svelte__internal; function jf(l) { - let e, t, n, i; + let e, t; return { c() { - e = Dn("svg"), t = Dn("rect"), n = Dn("circle"), i = Dn("polyline"), x(t, "x", "3"), x(t, "y", "3"), x(t, "width", "18"), x(t, "height", "18"), x(t, "rx", "2"), x(t, "ry", "2"), x(n, "cx", "8.5"), x(n, "cy", "8.5"), x(n, "r", "1.5"), x(i, "points", "21 15 16 10 5 21"), x(e, "xmlns", "http://www.w3.org/2000/svg"), x(e, "width", "100%"), x(e, "height", "100%"), x(e, "viewBox", "0 0 24 24"), x(e, "fill", "none"), x(e, "stroke", "currentColor"), x(e, "stroke-width", "1.5"), x(e, "stroke-linecap", "round"), x(e, "stroke-linejoin", "round"), x(e, "class", "feather feather-image"); + e = Vi("svg"), t = Vi("path"), Yt(t, "d", "M5 8l4 4 4-4z"), Yt(e, "class", "dropdown-arrow svelte-145leq6"), Yt(e, "xmlns", "http://www.w3.org/2000/svg"), Yt(e, "width", "100%"), Yt(e, "height", "100%"), Yt(e, "viewBox", "0 0 18 18"); }, - m(s, a) { - Tf(s, e, a), Dl(e, t), Dl(e, n), Dl(e, i); + m(n, i) { + Df(n, e, i), Af(e, t); }, - p: Tl, - i: Tl, - o: Tl, - d(s) { - s && Lf(e); + p: Il, + i: Il, + o: Il, + d(n) { + n && Lf(e); } }; } -let fo = class extends Mf { +class Hf extends Mf { constructor(e) { - super(), Df(this, e, null, jf, Rf, {}); + super(), Rf(this, e, null, jf, Tf, {}); } -}; +} const { SvelteComponent: If, - append: Ff, - attr: Tn, - detach: Hf, + append: Fl, + attr: Q, + detach: Ff, init: Xf, insert: Yf, - noop: Rl, + noop: Xl, safe_not_equal: Uf, - svg_element: Hi + svg_element: Xn } = window.__gradio__svelte__internal; -function Nf(l) { - let e, t; +function Vf(l) { + let e, t, n, i; return { c() { - e = Hi("svg"), t = Hi("path"), Tn(t, "fill", "currentColor"), Tn(t, "d", "M13.75 2a2.25 2.25 0 0 1 2.236 2.002V4h1.764A2.25 2.25 0 0 1 20 6.25V11h-1.5V6.25a.75.75 0 0 0-.75-.75h-2.129c-.404.603-1.091 1-1.871 1h-3.5c-.78 0-1.467-.397-1.871-1H6.25a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h4.78a4 4 0 0 0 .505 1.5H6.25A2.25 2.25 0 0 1 4 19.75V6.25A2.25 2.25 0 0 1 6.25 4h1.764a2.25 2.25 0 0 1 2.236-2zm2.245 2.096L16 4.25q0-.078-.005-.154M13.75 3.5h-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5M15 12a3 3 0 0 0-3 3v5c0 .556.151 1.077.415 1.524l3.494-3.494a2.25 2.25 0 0 1 3.182 0l3.494 3.494c.264-.447.415-.968.415-1.524v-5a3 3 0 0 0-3-3zm0 11a3 3 0 0 1-1.524-.415l3.494-3.494a.75.75 0 0 1 1.06 0l3.494 3.494A3 3 0 0 1 20 23zm5-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2"), Tn(e, "xmlns", "http://www.w3.org/2000/svg"), Tn(e, "viewBox", "0 0 24 24"); + e = Xn("svg"), t = Xn("rect"), n = Xn("circle"), i = Xn("polyline"), Q(t, "x", "3"), Q(t, "y", "3"), Q(t, "width", "18"), Q(t, "height", "18"), Q(t, "rx", "2"), Q(t, "ry", "2"), Q(n, "cx", "8.5"), Q(n, "cy", "8.5"), Q(n, "r", "1.5"), Q(i, "points", "21 15 16 10 5 21"), Q(e, "xmlns", "http://www.w3.org/2000/svg"), Q(e, "width", "100%"), Q(e, "height", "100%"), Q(e, "viewBox", "0 0 24 24"), Q(e, "fill", "none"), Q(e, "stroke", "currentColor"), Q(e, "stroke-width", "1.5"), Q(e, "stroke-linecap", "round"), Q(e, "stroke-linejoin", "round"), Q(e, "class", "feather feather-image"); }, - m(n, i) { - Yf(n, e, i), Ff(e, t); + m(o, s) { + Yf(o, e, s), Fl(e, t), Fl(e, n), Fl(e, i); }, - p: Rl, - i: Rl, - o: Rl, - d(n) { - n && Hf(e); + p: Xl, + i: Xl, + o: Xl, + d(o) { + o && Ff(e); } }; } -class uo extends If { +let bs = class extends If { constructor(e) { - super(), Xf(this, e, null, Nf, Uf, {}); + super(), Xf(this, e, null, Vf, Uf, {}); } -} +}; const { - SvelteComponent: Vf, - append: Rn, - attr: $, - detach: Of, - init: Wf, - insert: Pf, - noop: jl, - safe_not_equal: Zf, - svg_element: ln + SvelteComponent: Nf, + append: Of, + attr: Yn, + detach: Wf, + init: Pf, + insert: Zf, + noop: Yl, + safe_not_equal: Kf, + svg_element: Ni } = window.__gradio__svelte__internal; -function Kf(l) { - let e, t, n, i, s; +function Gf(l) { + let e, t; return { c() { - e = ln("svg"), t = ln("path"), n = ln("path"), i = ln("line"), s = ln("line"), $(t, "d", "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"), $(n, "d", "M19 10v2a7 7 0 0 1-14 0v-2"), $(i, "x1", "12"), $(i, "y1", "19"), $(i, "x2", "12"), $(i, "y2", "23"), $(s, "x1", "8"), $(s, "y1", "23"), $(s, "x2", "16"), $(s, "y2", "23"), $(e, "xmlns", "http://www.w3.org/2000/svg"), $(e, "width", "100%"), $(e, "height", "100%"), $(e, "viewBox", "0 0 24 24"), $(e, "fill", "none"), $(e, "stroke", "currentColor"), $(e, "stroke-width", "2"), $(e, "stroke-linecap", "round"), $(e, "stroke-linejoin", "round"), $(e, "class", "feather feather-mic"); + e = Ni("svg"), t = Ni("path"), Yn(t, "fill", "currentColor"), Yn(t, "d", "M13.75 2a2.25 2.25 0 0 1 2.236 2.002V4h1.764A2.25 2.25 0 0 1 20 6.25V11h-1.5V6.25a.75.75 0 0 0-.75-.75h-2.129c-.404.603-1.091 1-1.871 1h-3.5c-.78 0-1.467-.397-1.871-1H6.25a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h4.78a4 4 0 0 0 .505 1.5H6.25A2.25 2.25 0 0 1 4 19.75V6.25A2.25 2.25 0 0 1 6.25 4h1.764a2.25 2.25 0 0 1 2.236-2zm2.245 2.096L16 4.25q0-.078-.005-.154M13.75 3.5h-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5M15 12a3 3 0 0 0-3 3v5c0 .556.151 1.077.415 1.524l3.494-3.494a2.25 2.25 0 0 1 3.182 0l3.494 3.494c.264-.447.415-.968.415-1.524v-5a3 3 0 0 0-3-3zm0 11a3 3 0 0 1-1.524-.415l3.494-3.494a.75.75 0 0 1 1.06 0l3.494 3.494A3 3 0 0 1 20 23zm5-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2"), Yn(e, "xmlns", "http://www.w3.org/2000/svg"), Yn(e, "viewBox", "0 0 24 24"); }, - m(a, r) { - Pf(a, e, r), Rn(e, t), Rn(e, n), Rn(e, i), Rn(e, s); + m(n, i) { + Zf(n, e, i), Of(e, t); }, - p: jl, - i: jl, - o: jl, - d(a) { - a && Of(e); + p: Yl, + i: Yl, + o: Yl, + d(n) { + n && Wf(e); } }; } -class Gf extends Vf { +class ws extends Nf { constructor(e) { - super(), Wf(this, e, null, Kf, Zf, {}); + super(), Pf(this, e, null, Gf, Kf, {}); } } const { SvelteComponent: Jf, - append: Il, - attr: ie, + append: Un, + attr: x, detach: Qf, init: xf, insert: $f, - noop: Fl, + noop: Ul, safe_not_equal: eu, - svg_element: jn + svg_element: an } = window.__gradio__svelte__internal; function tu(l) { - let e, t, n, i; + let e, t, n, i, o; return { c() { - e = jn("svg"), t = jn("path"), n = jn("polyline"), i = jn("line"), ie(t, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), ie(n, "points", "17 8 12 3 7 8"), ie(i, "x1", "12"), ie(i, "y1", "3"), ie(i, "x2", "12"), ie(i, "y2", "15"), ie(e, "xmlns", "http://www.w3.org/2000/svg"), ie(e, "width", "90%"), ie(e, "height", "90%"), ie(e, "viewBox", "0 0 24 24"), ie(e, "fill", "none"), ie(e, "stroke", "currentColor"), ie(e, "stroke-width", "2"), ie(e, "stroke-linecap", "round"), ie(e, "stroke-linejoin", "round"), ie(e, "class", "feather feather-upload"); + e = an("svg"), t = an("path"), n = an("path"), i = an("line"), o = an("line"), x(t, "d", "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"), x(n, "d", "M19 10v2a7 7 0 0 1-14 0v-2"), x(i, "x1", "12"), x(i, "y1", "19"), x(i, "x2", "12"), x(i, "y2", "23"), x(o, "x1", "8"), x(o, "y1", "23"), x(o, "x2", "16"), x(o, "y2", "23"), x(e, "xmlns", "http://www.w3.org/2000/svg"), x(e, "width", "100%"), x(e, "height", "100%"), x(e, "viewBox", "0 0 24 24"), x(e, "fill", "none"), x(e, "stroke", "currentColor"), x(e, "stroke-width", "2"), x(e, "stroke-linecap", "round"), x(e, "stroke-linejoin", "round"), x(e, "class", "feather feather-mic"); }, - m(s, a) { - $f(s, e, a), Il(e, t), Il(e, n), Il(e, i); + m(s, r) { + $f(s, e, r), Un(e, t), Un(e, n), Un(e, i), Un(e, o); }, - p: Fl, - i: Fl, - o: Fl, + p: Ul, + i: Ul, + o: Ul, d(s) { s && Qf(e); } }; } -let co = class extends Jf { +class nu extends Jf { constructor(e) { super(), xf(this, e, null, tu, eu, {}); } -}; +} const { - SvelteComponent: nu, - append: Xi, - attr: tt, - detach: lu, - init: iu, + SvelteComponent: lu, + append: Vl, + attr: ae, + detach: iu, + init: ou, insert: su, - noop: Hl, - safe_not_equal: ou, - svg_element: Xl + noop: Nl, + safe_not_equal: au, + svg_element: Vn +} = window.__gradio__svelte__internal; +function ru(l) { + let e, t, n, i; + return { + c() { + e = Vn("svg"), t = Vn("path"), n = Vn("polyline"), i = Vn("line"), ae(t, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), ae(n, "points", "17 8 12 3 7 8"), ae(i, "x1", "12"), ae(i, "y1", "3"), ae(i, "x2", "12"), ae(i, "y2", "15"), ae(e, "xmlns", "http://www.w3.org/2000/svg"), ae(e, "width", "90%"), ae(e, "height", "90%"), ae(e, "viewBox", "0 0 24 24"), ae(e, "fill", "none"), ae(e, "stroke", "currentColor"), ae(e, "stroke-width", "2"), ae(e, "stroke-linecap", "round"), ae(e, "stroke-linejoin", "round"), ae(e, "class", "feather feather-upload"); + }, + m(o, s) { + su(o, e, s), Vl(e, t), Vl(e, n), Vl(e, i); + }, + p: Nl, + i: Nl, + o: Nl, + d(o) { + o && iu(e); + } + }; +} +let ps = class extends lu { + constructor(e) { + super(), ou(this, e, null, ru, au, {}); + } +}; +const { + SvelteComponent: fu, + append: Oi, + attr: it, + detach: uu, + init: cu, + insert: _u, + noop: Ol, + safe_not_equal: du, + svg_element: Wl } = window.__gradio__svelte__internal; -function au(l) { +function hu(l) { let e, t, n; return { c() { - e = Xl("svg"), t = Xl("path"), n = Xl("path"), tt(t, "fill", "currentColor"), tt(t, "d", "M12 2c-4.963 0-9 4.038-9 9c0 3.328 1.82 6.232 4.513 7.79l-2.067 1.378A1 1 0 0 0 6 22h12a1 1 0 0 0 .555-1.832l-2.067-1.378C19.18 17.232 21 14.328 21 11c0-4.962-4.037-9-9-9zm0 16c-3.859 0-7-3.141-7-7c0-3.86 3.141-7 7-7s7 3.14 7 7c0 3.859-3.141 7-7 7z"), tt(n, "fill", "currentColor"), tt(n, "d", "M12 6c-2.757 0-5 2.243-5 5s2.243 5 5 5s5-2.243 5-5s-2.243-5-5-5zm0 8c-1.654 0-3-1.346-3-3s1.346-3 3-3s3 1.346 3 3s-1.346 3-3 3z"), tt(e, "xmlns", "http://www.w3.org/2000/svg"), tt(e, "width", "100%"), tt(e, "height", "100%"), tt(e, "viewBox", "0 0 24 24"); + e = Wl("svg"), t = Wl("path"), n = Wl("path"), it(t, "fill", "currentColor"), it(t, "d", "M12 2c-4.963 0-9 4.038-9 9c0 3.328 1.82 6.232 4.513 7.79l-2.067 1.378A1 1 0 0 0 6 22h12a1 1 0 0 0 .555-1.832l-2.067-1.378C19.18 17.232 21 14.328 21 11c0-4.962-4.037-9-9-9zm0 16c-3.859 0-7-3.141-7-7c0-3.86 3.141-7 7-7s7 3.14 7 7c0 3.859-3.141 7-7 7z"), it(n, "fill", "currentColor"), it(n, "d", "M12 6c-2.757 0-5 2.243-5 5s2.243 5 5 5s5-2.243 5-5s-2.243-5-5-5zm0 8c-1.654 0-3-1.346-3-3s1.346-3 3-3s3 1.346 3 3s-1.346 3-3 3z"), it(e, "xmlns", "http://www.w3.org/2000/svg"), it(e, "width", "100%"), it(e, "height", "100%"), it(e, "viewBox", "0 0 24 24"); }, - m(i, s) { - su(i, e, s), Xi(e, t), Xi(e, n); + m(i, o) { + _u(i, e, o), Oi(e, t), Oi(e, n); }, - p: Hl, - i: Hl, - o: Hl, + p: Ol, + i: Ol, + o: Ol, d(i) { - i && lu(e); + i && uu(e); } }; } -class ru extends nu { +class mu extends fu { constructor(e) { - super(), iu(this, e, null, au, ou, {}); + super(), cu(this, e, null, hu, du, {}); } } -const fu = [ +const gu = [ { color: "red", primary: 600, secondary: 100 }, { color: "green", primary: 600, secondary: 100 }, { color: "blue", primary: 600, secondary: 100 }, @@ -1361,7 +1361,7 @@ const fu = [ { color: "cyan", primary: 600, secondary: 100 }, { color: "lime", primary: 500, secondary: 100 }, { color: "pink", primary: 600, secondary: 100 } -], Yi = { +], Wi = { inherit: "inherit", current: "currentColor", transparent: "transparent", @@ -1654,64 +1654,64 @@ const fu = [ 950: "#4c0519" } }; -fu.reduce( +gu.reduce( (l, { color: e, primary: t, secondary: n }) => ({ ...l, [e]: { - primary: Yi[e][t], - secondary: Yi[e][n] + primary: Wi[e][t], + secondary: Wi[e][n] } }), {} ); -class Pn extends Error { +class el extends Error { constructor(e) { super(e), this.name = "ShareError"; } } -async function uu(l, e) { - var o; +async function bu(l, e) { + var a; if (window.__gradio_space__ == null) - throw new Pn("Must be on Spaces to share."); + throw new el("Must be on Spaces to share."); let t, n, i; - t = cu(l), n = l.split(";")[0].split(":")[1], i = "file" + n.split("/")[1]; - const s = new File([t], i, { type: n }), a = await fetch("https://huggingface.co/uploads", { + t = wu(l), n = l.split(";")[0].split(":")[1], i = "file" + n.split("/")[1]; + const o = new File([t], i, { type: n }), s = await fetch("https://huggingface.co/uploads", { method: "POST", - body: s, + body: o, headers: { - "Content-Type": s.type, + "Content-Type": o.type, "X-Requested-With": "XMLHttpRequest" } }); - if (!a.ok) { - if ((o = a.headers.get("content-type")) != null && o.includes("application/json")) { - const f = await a.json(); - throw new Pn(`Upload failed: ${f.error}`); + if (!s.ok) { + if ((a = s.headers.get("content-type")) != null && a.includes("application/json")) { + const f = await s.json(); + throw new el(`Upload failed: ${f.error}`); } - throw new Pn("Upload failed."); + throw new el("Upload failed."); } - return await a.text(); + return await s.text(); } -function cu(l) { - for (var e = l.split(","), t = e[0].match(/:(.*?);/)[1], n = atob(e[1]), i = n.length, s = new Uint8Array(i); i--; ) - s[i] = n.charCodeAt(i); - return new Blob([s], { type: t }); +function wu(l) { + for (var e = l.split(","), t = e[0].match(/:(.*?);/)[1], n = atob(e[1]), i = n.length, o = new Uint8Array(i); i--; ) + o[i] = n.charCodeAt(i); + return new Blob([o], { type: t }); } const { - SvelteComponent: _u, - create_component: du, - destroy_component: hu, - init: mu, - mount_component: bu, - safe_not_equal: gu, - transition_in: wu, - transition_out: pu -} = window.__gradio__svelte__internal, { createEventDispatcher: ku } = window.__gradio__svelte__internal; -function vu(l) { + SvelteComponent: pu, + create_component: vu, + destroy_component: ku, + init: yu, + mount_component: Cu, + safe_not_equal: Su, + transition_in: zu, + transition_out: qu +} = window.__gradio__svelte__internal, { createEventDispatcher: Bu } = window.__gradio__svelte__internal; +function Eu(l) { let e, t; - return e = new hl({ + return e = new pl({ props: { - Icon: df, + Icon: vf, label: ( /*i18n*/ l[2]("common.share") @@ -1727,147 +1727,147 @@ function vu(l) { l[5] ), { c() { - du(e.$$.fragment); + vu(e.$$.fragment); }, m(n, i) { - bu(e, n, i), t = !0; + Cu(e, n, i), t = !0; }, p(n, [i]) { - const s = {}; + const o = {}; i & /*i18n*/ - 4 && (s.label = /*i18n*/ + 4 && (o.label = /*i18n*/ n[2]("common.share")), i & /*pending*/ - 8 && (s.pending = /*pending*/ - n[3]), e.$set(s); + 8 && (o.pending = /*pending*/ + n[3]), e.$set(o); }, i(n) { - t || (wu(e.$$.fragment, n), t = !0); + t || (zu(e.$$.fragment, n), t = !0); }, o(n) { - pu(e.$$.fragment, n), t = !1; + qu(e.$$.fragment, n), t = !1; }, d(n) { - hu(e, n); + ku(e, n); } }; } -function yu(l, e, t) { - const n = ku(); - let { formatter: i } = e, { value: s } = e, { i18n: a } = e, r = !1; - const o = async () => { +function Mu(l, e, t) { + const n = Bu(); + let { formatter: i } = e, { value: o } = e, { i18n: s } = e, r = !1; + const a = async () => { try { t(3, r = !0); - const f = await i(s); + const f = await i(o); n("share", { description: f }); } catch (f) { console.error(f); - let u = f instanceof Pn ? f.message : "Share failed."; + let u = f instanceof el ? f.message : "Share failed."; n("error", u); } finally { t(3, r = !1); } }; return l.$$set = (f) => { - "formatter" in f && t(0, i = f.formatter), "value" in f && t(1, s = f.value), "i18n" in f && t(2, a = f.i18n); - }, [i, s, a, r, n, o]; + "formatter" in f && t(0, i = f.formatter), "value" in f && t(1, o = f.value), "i18n" in f && t(2, s = f.i18n); + }, [i, o, s, r, n, a]; } -class Cu extends _u { +class Au extends pu { constructor(e) { - super(), mu(this, e, yu, vu, gu, { formatter: 0, value: 1, i18n: 2 }); + super(), yu(this, e, Mu, Eu, Su, { formatter: 0, value: 1, i18n: 2 }); } } const { - SvelteComponent: Su, - append: St, - attr: ii, - check_outros: zu, - create_component: _o, - destroy_component: ho, - detach: Zn, - element: si, - group_outros: qu, - init: Eu, - insert: Kn, - mount_component: mo, - safe_not_equal: Au, - set_data: oi, - space: ai, - text: fn, - toggle_class: Ui, - transition_in: $n, - transition_out: el + SvelteComponent: Lu, + append: Bt, + attr: fi, + check_outros: Ru, + create_component: vs, + destroy_component: ks, + detach: tl, + element: ui, + group_outros: Du, + init: Tu, + insert: nl, + mount_component: ys, + safe_not_equal: ju, + set_data: ci, + space: _i, + text: _n, + toggle_class: Pi, + transition_in: al, + transition_out: rl } = window.__gradio__svelte__internal; -function Bu(l) { +function Hu(l) { let e, t; - return e = new co({}), { + return e = new ps({}), { c() { - _o(e.$$.fragment); + vs(e.$$.fragment); }, m(n, i) { - mo(e, n, i), t = !0; + ys(e, n, i), t = !0; }, i(n) { - t || ($n(e.$$.fragment, n), t = !0); + t || (al(e.$$.fragment, n), t = !0); }, o(n) { - el(e.$$.fragment, n), t = !1; + rl(e.$$.fragment, n), t = !1; }, d(n) { - ho(e, n); + ks(e, n); } }; } -function Mu(l) { +function Iu(l) { let e, t; - return e = new uo({}), { + return e = new ws({}), { c() { - _o(e.$$.fragment); + vs(e.$$.fragment); }, m(n, i) { - mo(e, n, i), t = !0; + ys(e, n, i), t = !0; }, i(n) { - t || ($n(e.$$.fragment, n), t = !0); + t || (al(e.$$.fragment, n), t = !0); }, o(n) { - el(e.$$.fragment, n), t = !1; + rl(e.$$.fragment, n), t = !1; }, d(n) { - ho(e, n); + ks(e, n); } }; } -function Ni(l) { +function Zi(l) { let e, t, n = ( /*i18n*/ l[1]("common.or") + "" - ), i, s, a, r = ( + ), i, o, s, r = ( /*message*/ (l[2] || /*i18n*/ l[1]("upload_text.click_to_upload")) + "" - ), o; + ), a; return { c() { - e = si("span"), t = fn("- "), i = fn(n), s = fn(" -"), a = ai(), o = fn(r), ii(e, "class", "or svelte-kzcjhc"); + e = ui("span"), t = _n("- "), i = _n(n), o = _n(" -"), s = _i(), a = _n(r), fi(e, "class", "or svelte-kzcjhc"); }, m(f, u) { - Kn(f, e, u), St(e, t), St(e, i), St(e, s), Kn(f, a, u), Kn(f, o, u); + nl(f, e, u), Bt(e, t), Bt(e, i), Bt(e, o), nl(f, s, u), nl(f, a, u); }, p(f, u) { u & /*i18n*/ 2 && n !== (n = /*i18n*/ - f[1]("common.or") + "") && oi(i, n), u & /*message, i18n*/ + f[1]("common.or") + "") && ci(i, n), u & /*message, i18n*/ 6 && r !== (r = /*message*/ (f[2] || /*i18n*/ - f[1]("upload_text.click_to_upload")) + "") && oi(o, r); + f[1]("upload_text.click_to_upload")) + "") && ci(a, r); }, d(f) { - f && (Zn(e), Zn(a), Zn(o)); + f && (tl(e), tl(s), tl(a)); } }; } -function Lu(l) { - let e, t, n, i, s, a = ( +function Fu(l) { + let e, t, n, i, o, s = ( /*i18n*/ l[1]( /*defs*/ @@ -1877,67 +1877,67 @@ function Lu(l) { ] || /*defs*/ l[5].file ) + "" - ), r, o, f; - const u = [Mu, Bu], c = []; - function d(b, h) { + ), r, a, f; + const u = [Iu, Hu], c = []; + function _(h, b) { return ( /*type*/ - b[0] === "clipboard" ? 0 : 1 + h[0] === "clipboard" ? 0 : 1 ); } - n = d(l), i = c[n] = u[n](l); - let _ = ( + n = _(l), i = c[n] = u[n](l); + let d = ( /*mode*/ - l[3] !== "short" && Ni(l) + l[3] !== "short" && Zi(l) ); return { c() { - e = si("div"), t = si("span"), i.c(), s = ai(), r = fn(a), o = ai(), _ && _.c(), ii(t, "class", "icon-wrap svelte-kzcjhc"), Ui( + e = ui("div"), t = ui("span"), i.c(), o = _i(), r = _n(s), a = _i(), d && d.c(), fi(t, "class", "icon-wrap svelte-kzcjhc"), Pi( t, "hovered", /*hovered*/ l[4] - ), ii(e, "class", "wrap svelte-kzcjhc"); + ), fi(e, "class", "wrap svelte-kzcjhc"); }, - m(b, h) { - Kn(b, e, h), St(e, t), c[n].m(t, null), St(e, s), St(e, r), St(e, o), _ && _.m(e, null), f = !0; + m(h, b) { + nl(h, e, b), Bt(e, t), c[n].m(t, null), Bt(e, o), Bt(e, r), Bt(e, a), d && d.m(e, null), f = !0; }, - p(b, [h]) { - let w = n; - n = d(b), n !== w && (qu(), el(c[w], 1, 1, () => { - c[w] = null; - }), zu(), i = c[n], i || (i = c[n] = u[n](b), i.c()), $n(i, 1), i.m(t, null)), (!f || h & /*hovered*/ - 16) && Ui( + p(h, [b]) { + let g = n; + n = _(h), n !== g && (Du(), rl(c[g], 1, 1, () => { + c[g] = null; + }), Ru(), i = c[n], i || (i = c[n] = u[n](h), i.c()), al(i, 1), i.m(t, null)), (!f || b & /*hovered*/ + 16) && Pi( t, "hovered", /*hovered*/ - b[4] - ), (!f || h & /*i18n, type*/ - 3) && a !== (a = /*i18n*/ - b[1]( + h[4] + ), (!f || b & /*i18n, type*/ + 3) && s !== (s = /*i18n*/ + h[1]( /*defs*/ - b[5][ + h[5][ /*type*/ - b[0] + h[0] ] || /*defs*/ - b[5].file - ) + "") && oi(r, a), /*mode*/ - b[3] !== "short" ? _ ? _.p(b, h) : (_ = Ni(b), _.c(), _.m(e, null)) : _ && (_.d(1), _ = null); + h[5].file + ) + "") && ci(r, s), /*mode*/ + h[3] !== "short" ? d ? d.p(h, b) : (d = Zi(h), d.c(), d.m(e, null)) : d && (d.d(1), d = null); }, - i(b) { - f || ($n(i), f = !0); + i(h) { + f || (al(i), f = !0); }, - o(b) { - el(i), f = !1; + o(h) { + rl(i), f = !1; }, - d(b) { - b && Zn(e), c[n].d(), _ && _.d(); + d(h) { + h && tl(e), c[n].d(), d && d.d(); } }; } -function Du(l, e, t) { - let { type: n = "file" } = e, { i18n: i } = e, { message: s = void 0 } = e, { mode: a = "full" } = e, { hovered: r = !1 } = e; - const o = { +function Xu(l, e, t) { + let { type: n = "file" } = e, { i18n: i } = e, { message: o = void 0 } = e, { mode: s = "full" } = e, { hovered: r = !1 } = e; + const a = { image: "upload_text.drop_image", video: "upload_text.drop_video", audio: "upload_text.drop_audio", @@ -1947,12 +1947,12 @@ function Du(l, e, t) { clipboard: "upload_text.paste_clipboard" }; return l.$$set = (f) => { - "type" in f && t(0, n = f.type), "i18n" in f && t(1, i = f.i18n), "message" in f && t(2, s = f.message), "mode" in f && t(3, a = f.mode), "hovered" in f && t(4, r = f.hovered); - }, [n, i, s, a, r, o]; + "type" in f && t(0, n = f.type), "i18n" in f && t(1, i = f.i18n), "message" in f && t(2, o = f.message), "mode" in f && t(3, s = f.mode), "hovered" in f && t(4, r = f.hovered); + }, [n, i, o, s, r, a]; } -class bo extends Su { +class Cs extends Lu { constructor(e) { - super(), Eu(this, e, Du, Lu, Au, { + super(), Tu(this, e, Xu, Fu, ju, { type: 0, i18n: 1, message: 2, @@ -1962,86 +1962,86 @@ class bo extends Su { } } const { - SvelteComponent: Tu, - append: Yl, - attr: We, - check_outros: un, - create_component: ml, - destroy_component: bl, - detach: $t, - element: zn, - empty: Ru, - group_outros: cn, - init: ju, - insert: en, - listen: gl, - mount_component: wl, - safe_not_equal: Iu, - space: Ul, - toggle_class: ct, + SvelteComponent: Yu, + append: Pl, + attr: Ge, + check_outros: dn, + create_component: vl, + destroy_component: kl, + detach: tn, + element: Rn, + empty: Uu, + group_outros: hn, + init: Vu, + insert: nn, + listen: yl, + mount_component: Cl, + safe_not_equal: Nu, + space: Zl, + toggle_class: ht, transition_in: ee, - transition_out: de + transition_out: me } = window.__gradio__svelte__internal; -function Vi(l) { +function Ki(l) { let e, t = ( /*sources*/ l[1].includes("upload") ), n, i = ( /*sources*/ l[1].includes("microphone") - ), s, a = ( + ), o, s = ( /*sources*/ l[1].includes("webcam") - ), r, o = ( + ), r, a = ( /*sources*/ l[1].includes("clipboard") - ), f, u = t && Oi(l), c = i && Wi(l), d = a && Pi(l), _ = o && Zi(l); + ), f, u = t && Gi(l), c = i && Ji(l), _ = s && Qi(l), d = a && xi(l); return { c() { - e = zn("span"), u && u.c(), n = Ul(), c && c.c(), s = Ul(), d && d.c(), r = Ul(), _ && _.c(), We(e, "class", "source-selection svelte-1jp3vgd"), We(e, "data-testid", "source-select"); + e = Rn("span"), u && u.c(), n = Zl(), c && c.c(), o = Zl(), _ && _.c(), r = Zl(), d && d.c(), Ge(e, "class", "source-selection svelte-1jp3vgd"), Ge(e, "data-testid", "source-select"); }, - m(b, h) { - en(b, e, h), u && u.m(e, null), Yl(e, n), c && c.m(e, null), Yl(e, s), d && d.m(e, null), Yl(e, r), _ && _.m(e, null), f = !0; + m(h, b) { + nn(h, e, b), u && u.m(e, null), Pl(e, n), c && c.m(e, null), Pl(e, o), _ && _.m(e, null), Pl(e, r), d && d.m(e, null), f = !0; }, - p(b, h) { - h & /*sources*/ + p(h, b) { + b & /*sources*/ 2 && (t = /*sources*/ - b[1].includes("upload")), t ? u ? (u.p(b, h), h & /*sources*/ - 2 && ee(u, 1)) : (u = Oi(b), u.c(), ee(u, 1), u.m(e, n)) : u && (cn(), de(u, 1, 1, () => { + h[1].includes("upload")), t ? u ? (u.p(h, b), b & /*sources*/ + 2 && ee(u, 1)) : (u = Gi(h), u.c(), ee(u, 1), u.m(e, n)) : u && (hn(), me(u, 1, 1, () => { u = null; - }), un()), h & /*sources*/ + }), dn()), b & /*sources*/ 2 && (i = /*sources*/ - b[1].includes("microphone")), i ? c ? (c.p(b, h), h & /*sources*/ - 2 && ee(c, 1)) : (c = Wi(b), c.c(), ee(c, 1), c.m(e, s)) : c && (cn(), de(c, 1, 1, () => { + h[1].includes("microphone")), i ? c ? (c.p(h, b), b & /*sources*/ + 2 && ee(c, 1)) : (c = Ji(h), c.c(), ee(c, 1), c.m(e, o)) : c && (hn(), me(c, 1, 1, () => { c = null; - }), un()), h & /*sources*/ + }), dn()), b & /*sources*/ + 2 && (s = /*sources*/ + h[1].includes("webcam")), s ? _ ? (_.p(h, b), b & /*sources*/ + 2 && ee(_, 1)) : (_ = Qi(h), _.c(), ee(_, 1), _.m(e, r)) : _ && (hn(), me(_, 1, 1, () => { + _ = null; + }), dn()), b & /*sources*/ 2 && (a = /*sources*/ - b[1].includes("webcam")), a ? d ? (d.p(b, h), h & /*sources*/ - 2 && ee(d, 1)) : (d = Pi(b), d.c(), ee(d, 1), d.m(e, r)) : d && (cn(), de(d, 1, 1, () => { + h[1].includes("clipboard")), a ? d ? (d.p(h, b), b & /*sources*/ + 2 && ee(d, 1)) : (d = xi(h), d.c(), ee(d, 1), d.m(e, null)) : d && (hn(), me(d, 1, 1, () => { d = null; - }), un()), h & /*sources*/ - 2 && (o = /*sources*/ - b[1].includes("clipboard")), o ? _ ? (_.p(b, h), h & /*sources*/ - 2 && ee(_, 1)) : (_ = Zi(b), _.c(), ee(_, 1), _.m(e, null)) : _ && (cn(), de(_, 1, 1, () => { - _ = null; - }), un()); + }), dn()); }, - i(b) { - f || (ee(u), ee(c), ee(d), ee(_), f = !0); + i(h) { + f || (ee(u), ee(c), ee(_), ee(d), f = !0); }, - o(b) { - de(u), de(c), de(d), de(_), f = !1; + o(h) { + me(u), me(c), me(_), me(d), f = !1; }, - d(b) { - b && $t(e), u && u.d(), c && c.d(), d && d.d(), _ && _.d(); + d(h) { + h && tn(e), u && u.d(), c && c.d(), _ && _.d(), d && d.d(); } }; } -function Oi(l) { - let e, t, n, i, s; - return t = new co({}), { +function Gi(l) { + let e, t, n, i, o; + return t = new ps({}), { c() { - e = zn("button"), ml(t.$$.fragment), We(e, "class", "icon svelte-1jp3vgd"), We(e, "aria-label", "Upload file"), ct( + e = Rn("button"), vl(t.$$.fragment), Ge(e, "class", "icon svelte-1jp3vgd"), Ge(e, "aria-label", "Upload file"), ht( e, "selected", /*active_source*/ @@ -2049,241 +2049,241 @@ function Oi(l) { l[0] ); }, - m(a, r) { - en(a, e, r), wl(t, e, null), n = !0, i || (s = gl( + m(s, r) { + nn(s, e, r), Cl(t, e, null), n = !0, i || (o = yl( e, "click", /*click_handler*/ l[6] ), i = !0); }, - p(a, r) { + p(s, r) { (!n || r & /*active_source*/ - 1) && ct( + 1) && ht( e, "selected", /*active_source*/ - a[0] === "upload" || !/*active_source*/ - a[0] + s[0] === "upload" || !/*active_source*/ + s[0] ); }, - i(a) { - n || (ee(t.$$.fragment, a), n = !0); + i(s) { + n || (ee(t.$$.fragment, s), n = !0); }, - o(a) { - de(t.$$.fragment, a), n = !1; + o(s) { + me(t.$$.fragment, s), n = !1; }, - d(a) { - a && $t(e), bl(t), i = !1, s(); + d(s) { + s && tn(e), kl(t), i = !1, o(); } }; } -function Wi(l) { - let e, t, n, i, s; - return t = new Gf({}), { +function Ji(l) { + let e, t, n, i, o; + return t = new nu({}), { c() { - e = zn("button"), ml(t.$$.fragment), We(e, "class", "icon svelte-1jp3vgd"), We(e, "aria-label", "Record audio"), ct( + e = Rn("button"), vl(t.$$.fragment), Ge(e, "class", "icon svelte-1jp3vgd"), Ge(e, "aria-label", "Record audio"), ht( e, "selected", /*active_source*/ l[0] === "microphone" ); }, - m(a, r) { - en(a, e, r), wl(t, e, null), n = !0, i || (s = gl( + m(s, r) { + nn(s, e, r), Cl(t, e, null), n = !0, i || (o = yl( e, "click", /*click_handler_1*/ l[7] ), i = !0); }, - p(a, r) { + p(s, r) { (!n || r & /*active_source*/ - 1) && ct( + 1) && ht( e, "selected", /*active_source*/ - a[0] === "microphone" + s[0] === "microphone" ); }, - i(a) { - n || (ee(t.$$.fragment, a), n = !0); + i(s) { + n || (ee(t.$$.fragment, s), n = !0); }, - o(a) { - de(t.$$.fragment, a), n = !1; + o(s) { + me(t.$$.fragment, s), n = !1; }, - d(a) { - a && $t(e), bl(t), i = !1, s(); + d(s) { + s && tn(e), kl(t), i = !1, o(); } }; } -function Pi(l) { - let e, t, n, i, s; - return t = new ru({}), { +function Qi(l) { + let e, t, n, i, o; + return t = new mu({}), { c() { - e = zn("button"), ml(t.$$.fragment), We(e, "class", "icon svelte-1jp3vgd"), We(e, "aria-label", "Capture from camera"), ct( + e = Rn("button"), vl(t.$$.fragment), Ge(e, "class", "icon svelte-1jp3vgd"), Ge(e, "aria-label", "Capture from camera"), ht( e, "selected", /*active_source*/ l[0] === "webcam" ); }, - m(a, r) { - en(a, e, r), wl(t, e, null), n = !0, i || (s = gl( + m(s, r) { + nn(s, e, r), Cl(t, e, null), n = !0, i || (o = yl( e, "click", /*click_handler_2*/ l[8] ), i = !0); }, - p(a, r) { + p(s, r) { (!n || r & /*active_source*/ - 1) && ct( + 1) && ht( e, "selected", /*active_source*/ - a[0] === "webcam" + s[0] === "webcam" ); }, - i(a) { - n || (ee(t.$$.fragment, a), n = !0); + i(s) { + n || (ee(t.$$.fragment, s), n = !0); }, - o(a) { - de(t.$$.fragment, a), n = !1; + o(s) { + me(t.$$.fragment, s), n = !1; }, - d(a) { - a && $t(e), bl(t), i = !1, s(); + d(s) { + s && tn(e), kl(t), i = !1, o(); } }; } -function Zi(l) { - let e, t, n, i, s; - return t = new uo({}), { +function xi(l) { + let e, t, n, i, o; + return t = new ws({}), { c() { - e = zn("button"), ml(t.$$.fragment), We(e, "class", "icon svelte-1jp3vgd"), We(e, "aria-label", "Paste from clipboard"), ct( + e = Rn("button"), vl(t.$$.fragment), Ge(e, "class", "icon svelte-1jp3vgd"), Ge(e, "aria-label", "Paste from clipboard"), ht( e, "selected", /*active_source*/ l[0] === "clipboard" ); }, - m(a, r) { - en(a, e, r), wl(t, e, null), n = !0, i || (s = gl( + m(s, r) { + nn(s, e, r), Cl(t, e, null), n = !0, i || (o = yl( e, "click", /*click_handler_3*/ l[9] ), i = !0); }, - p(a, r) { + p(s, r) { (!n || r & /*active_source*/ - 1) && ct( + 1) && ht( e, "selected", /*active_source*/ - a[0] === "clipboard" + s[0] === "clipboard" ); }, - i(a) { - n || (ee(t.$$.fragment, a), n = !0); + i(s) { + n || (ee(t.$$.fragment, s), n = !0); }, - o(a) { - de(t.$$.fragment, a), n = !1; + o(s) { + me(t.$$.fragment, s), n = !1; }, - d(a) { - a && $t(e), bl(t), i = !1, s(); + d(s) { + s && tn(e), kl(t), i = !1, o(); } }; } -function Fu(l) { +function Ou(l) { let e, t, n = ( /*unique_sources*/ - l[2].length > 1 && Vi(l) + l[2].length > 1 && Ki(l) ); return { c() { - n && n.c(), e = Ru(); + n && n.c(), e = Uu(); }, - m(i, s) { - n && n.m(i, s), en(i, e, s), t = !0; + m(i, o) { + n && n.m(i, o), nn(i, e, o), t = !0; }, - p(i, [s]) { + p(i, [o]) { /*unique_sources*/ - i[2].length > 1 ? n ? (n.p(i, s), s & /*unique_sources*/ - 4 && ee(n, 1)) : (n = Vi(i), n.c(), ee(n, 1), n.m(e.parentNode, e)) : n && (cn(), de(n, 1, 1, () => { + i[2].length > 1 ? n ? (n.p(i, o), o & /*unique_sources*/ + 4 && ee(n, 1)) : (n = Ki(i), n.c(), ee(n, 1), n.m(e.parentNode, e)) : n && (hn(), me(n, 1, 1, () => { n = null; - }), un()); + }), dn()); }, i(i) { t || (ee(n), t = !0); }, o(i) { - de(n), t = !1; + me(n), t = !1; }, d(i) { - i && $t(e), n && n.d(i); + i && tn(e), n && n.d(i); } }; } -function Hu(l, e, t) { +function Wu(l, e, t) { let n; - var i = this && this.__awaiter || function(b, h, w, g) { + var i = this && this.__awaiter || function(h, b, g, w) { function p(m) { - return m instanceof w ? m : new w(function(C) { - C(m); + return m instanceof g ? m : new g(function(v) { + v(m); }); } - return new (w || (w = Promise))(function(m, C) { - function z(v) { + return new (g || (g = Promise))(function(m, v) { + function S(k) { try { - q(g.next(v)); - } catch (E) { - C(E); + z(w.next(k)); + } catch (q) { + v(q); } } - function y(v) { + function y(k) { try { - q(g.throw(v)); - } catch (E) { - C(E); + z(w.throw(k)); + } catch (q) { + v(q); } } - function q(v) { - v.done ? m(v.value) : p(v.value).then(z, y); + function z(k) { + k.done ? m(k.value) : p(k.value).then(S, y); } - q((g = g.apply(b, h || [])).next()); + z((w = w.apply(h, b || [])).next()); }); }; - let { sources: s } = e, { active_source: a } = e, { handle_clear: r = () => { - } } = e, { handle_select: o = () => { + let { sources: o } = e, { active_source: s } = e, { handle_clear: r = () => { + } } = e, { handle_select: a = () => { } } = e; - function f(b) { + function f(h) { return i(this, void 0, void 0, function* () { - r(), t(0, a = b), o(b); + r(), t(0, s = h), a(h); }); } - const u = () => f("upload"), c = () => f("microphone"), d = () => f("webcam"), _ = () => f("clipboard"); - return l.$$set = (b) => { - "sources" in b && t(1, s = b.sources), "active_source" in b && t(0, a = b.active_source), "handle_clear" in b && t(4, r = b.handle_clear), "handle_select" in b && t(5, o = b.handle_select); + const u = () => f("upload"), c = () => f("microphone"), _ = () => f("webcam"), d = () => f("clipboard"); + return l.$$set = (h) => { + "sources" in h && t(1, o = h.sources), "active_source" in h && t(0, s = h.active_source), "handle_clear" in h && t(4, r = h.handle_clear), "handle_select" in h && t(5, a = h.handle_select); }, l.$$.update = () => { l.$$.dirty & /*sources*/ - 2 && t(2, n = [...new Set(s)]); + 2 && t(2, n = [...new Set(o)]); }, [ - a, s, + o, n, f, r, - o, + a, u, c, - d, - _ + _, + d ]; } -class Xu extends Tu { +class Pu extends Yu { constructor(e) { - super(), ju(this, e, Hu, Fu, Iu, { + super(), Vu(this, e, Wu, Ou, Nu, { sources: 1, active_source: 0, handle_clear: 4, @@ -2291,19 +2291,19 @@ class Xu extends Tu { }); } } -function Gt(l) { +function Jt(l) { 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; } -function Gn() { +function ll() { } -function Yu(l, e) { +function Zu(l, e) { return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function"; } -function Ki(l) { +function $i(l) { const e = typeof l == "string" && l.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); return e ? [parseFloat(e[1]), e[2] || "px"] : [ /** @type {number} */ @@ -2311,282 +2311,282 @@ function Ki(l) { "px" ]; } -const go = typeof window < "u"; -let Gi = go ? () => window.performance.now() : () => Date.now(), wo = go ? (l) => requestAnimationFrame(l) : Gn; -const xt = /* @__PURE__ */ new Set(); -function po(l) { - xt.forEach((e) => { - e.c(l) || (xt.delete(e), e.f()); - }), xt.size !== 0 && wo(po); +const Ss = typeof window < "u"; +let eo = Ss ? () => window.performance.now() : () => Date.now(), zs = Ss ? (l) => requestAnimationFrame(l) : ll; +const $t = /* @__PURE__ */ new Set(); +function qs(l) { + $t.forEach((e) => { + e.c(l) || ($t.delete(e), e.f()); + }), $t.size !== 0 && zs(qs); } -function Uu(l) { +function Ku(l) { let e; - return xt.size === 0 && wo(po), { + return $t.size === 0 && zs(qs), { promise: new Promise((t) => { - xt.add(e = { c: l, f: t }); + $t.add(e = { c: l, f: t }); }), abort() { - xt.delete(e); + $t.delete(e); } }; } -function Nu(l) { +function Gu(l) { const e = l - 1; return e * e * e + 1; } -function Ji(l, { delay: e = 0, duration: t = 400, easing: n = Nu, x: i = 0, y: s = 0, opacity: a = 0 } = {}) { - const r = getComputedStyle(l), o = +r.opacity, f = r.transform === "none" ? "" : r.transform, u = o * (1 - a), [c, d] = Ki(i), [_, b] = Ki(s); +function to(l, { delay: e = 0, duration: t = 400, easing: n = Gu, x: i = 0, y: o = 0, opacity: s = 0 } = {}) { + const r = getComputedStyle(l), a = +r.opacity, f = r.transform === "none" ? "" : r.transform, u = a * (1 - s), [c, _] = $i(i), [d, h] = $i(o); return { delay: e, duration: t, easing: n, - css: (h, w) => ` - transform: ${f} translate(${(1 - h) * c}${d}, ${(1 - h) * _}${b}); - opacity: ${o - u * w}` + css: (b, g) => ` + transform: ${f} translate(${(1 - b) * c}${_}, ${(1 - b) * d}${h}); + opacity: ${a - u * g}` }; } -const Ht = []; -function Vu(l, e = Gn) { +const Ut = []; +function Ju(l, e = ll) { let t; const n = /* @__PURE__ */ new Set(); function i(r) { - if (Yu(l, r) && (l = r, t)) { - const o = !Ht.length; + if (Zu(l, r) && (l = r, t)) { + const a = !Ut.length; for (const f of n) - f[1](), Ht.push(f, l); - if (o) { - for (let f = 0; f < Ht.length; f += 2) - Ht[f][0](Ht[f + 1]); - Ht.length = 0; + f[1](), Ut.push(f, l); + if (a) { + for (let f = 0; f < Ut.length; f += 2) + Ut[f][0](Ut[f + 1]); + Ut.length = 0; } } } - function s(r) { + function o(r) { i(r(l)); } - function a(r, o = Gn) { - const f = [r, o]; - return n.add(f), n.size === 1 && (t = e(i, s) || Gn), r(l), () => { + function s(r, a = ll) { + const f = [r, a]; + return n.add(f), n.size === 1 && (t = e(i, o) || ll), r(l), () => { n.delete(f), n.size === 0 && t && (t(), t = null); }; } - return { set: i, update: s, subscribe: a }; + return { set: i, update: o, subscribe: s }; } -function Qi(l) { +function no(l) { return Object.prototype.toString.call(l) === "[object Date]"; } -function ri(l, e, t, n) { - if (typeof t == "number" || Qi(t)) { - const i = n - t, s = (t - e) / (l.dt || 1 / 60), a = l.opts.stiffness * i, r = l.opts.damping * s, o = (a - r) * l.inv_mass, f = (s + o) * l.dt; - return Math.abs(f) < l.opts.precision && Math.abs(i) < l.opts.precision ? n : (l.settled = !1, Qi(t) ? new Date(t.getTime() + f) : t + f); +function di(l, e, t, n) { + if (typeof t == "number" || no(t)) { + const i = n - t, o = (t - e) / (l.dt || 1 / 60), s = l.opts.stiffness * i, r = l.opts.damping * o, a = (s - r) * l.inv_mass, f = (o + a) * l.dt; + return Math.abs(f) < l.opts.precision && Math.abs(i) < l.opts.precision ? n : (l.settled = !1, no(t) ? new Date(t.getTime() + f) : t + f); } else { if (Array.isArray(t)) return t.map( - (i, s) => ri(l, e[s], t[s], n[s]) + (i, o) => di(l, e[o], t[o], n[o]) ); if (typeof t == "object") { const i = {}; - for (const s in t) - i[s] = ri(l, e[s], t[s], n[s]); + for (const o in t) + i[o] = di(l, e[o], t[o], n[o]); return i; } else throw new Error(`Cannot spring ${typeof t} values`); } } -function xi(l, e = {}) { - const t = Vu(l), { stiffness: n = 0.15, damping: i = 0.8, precision: s = 0.01 } = e; - let a, r, o, f = l, u = l, c = 1, d = 0, _ = !1; - function b(w, g = {}) { - u = w; - const p = o = {}; - return l == null || g.hard || h.stiffness >= 1 && h.damping >= 1 ? (_ = !0, a = Gi(), f = w, t.set(l = u), Promise.resolve()) : (g.soft && (d = 1 / ((g.soft === !0 ? 0.5 : +g.soft) * 60), c = 0), r || (a = Gi(), _ = !1, r = Uu((m) => { - if (_) - return _ = !1, r = null, !1; - c = Math.min(c + d, 1); - const C = { +function lo(l, e = {}) { + const t = Ju(l), { stiffness: n = 0.15, damping: i = 0.8, precision: o = 0.01 } = e; + let s, r, a, f = l, u = l, c = 1, _ = 0, d = !1; + function h(g, w = {}) { + u = g; + const p = a = {}; + return l == null || w.hard || b.stiffness >= 1 && b.damping >= 1 ? (d = !0, s = eo(), f = g, t.set(l = u), Promise.resolve()) : (w.soft && (_ = 1 / ((w.soft === !0 ? 0.5 : +w.soft) * 60), c = 0), r || (s = eo(), d = !1, r = Ku((m) => { + if (d) + return d = !1, r = null, !1; + c = Math.min(c + _, 1); + const v = { inv_mass: c, - opts: h, + opts: b, settled: !0, - dt: (m - a) * 60 / 1e3 - }, z = ri(C, f, l, u); - return a = m, f = l, t.set(l = z), C.settled && (r = null), !C.settled; + dt: (m - s) * 60 / 1e3 + }, S = di(v, f, l, u); + return s = m, f = l, t.set(l = S), v.settled && (r = null), !v.settled; })), new Promise((m) => { r.promise.then(() => { - p === o && m(); + p === a && m(); }); })); } - const h = { - set: b, - update: (w, g) => b(w(u, l), g), + const b = { + set: h, + update: (g, w) => h(g(u, l), w), subscribe: t.subscribe, stiffness: n, damping: i, - precision: s + precision: o }; - return h; + return b; } const { - SvelteComponent: Ou, + SvelteComponent: Qu, append: De, attr: Y, - component_subscribe: $i, - detach: Wu, - element: Pu, - init: Zu, - insert: Ku, - noop: es, - safe_not_equal: Gu, - set_style: In, + component_subscribe: io, + detach: xu, + element: $u, + init: ec, + insert: tc, + noop: oo, + safe_not_equal: nc, + set_style: Nn, svg_element: Te, - toggle_class: ts -} = window.__gradio__svelte__internal, { onMount: Ju } = window.__gradio__svelte__internal; -function Qu(l) { - let e, t, n, i, s, a, r, o, f, u, c, d; + toggle_class: so +} = window.__gradio__svelte__internal, { onMount: lc } = window.__gradio__svelte__internal; +function ic(l) { + let e, t, n, i, o, s, r, a, f, u, c, _; return { c() { - e = Pu("div"), t = Te("svg"), n = Te("g"), i = Te("path"), s = Te("path"), a = Te("path"), r = Te("path"), o = Te("g"), f = Te("path"), u = Te("path"), c = Te("path"), d = Te("path"), Y(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), Y(i, "fill", "#FF7C00"), Y(i, "fill-opacity", "0.4"), Y(i, "class", "svelte-43sxxs"), Y(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), Y(s, "fill", "#FF7C00"), Y(s, "class", "svelte-43sxxs"), Y(a, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), Y(a, "fill", "#FF7C00"), Y(a, "fill-opacity", "0.4"), Y(a, "class", "svelte-43sxxs"), Y(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), Y(r, "fill", "#FF7C00"), Y(r, "class", "svelte-43sxxs"), In(n, "transform", "translate(" + /*$top*/ + e = $u("div"), t = Te("svg"), n = Te("g"), i = Te("path"), o = Te("path"), s = Te("path"), r = Te("path"), a = Te("g"), f = Te("path"), u = Te("path"), c = Te("path"), _ = Te("path"), Y(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), Y(i, "fill", "#FF7C00"), Y(i, "fill-opacity", "0.4"), Y(i, "class", "svelte-43sxxs"), Y(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), Y(o, "fill", "#FF7C00"), Y(o, "class", "svelte-43sxxs"), Y(s, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), Y(s, "fill", "#FF7C00"), Y(s, "fill-opacity", "0.4"), Y(s, "class", "svelte-43sxxs"), Y(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), Y(r, "fill", "#FF7C00"), Y(r, "class", "svelte-43sxxs"), Nn(n, "transform", "translate(" + /*$top*/ l[1][0] + "px, " + /*$top*/ - l[1][1] + "px)"), Y(f, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), Y(f, "fill", "#FF7C00"), Y(f, "fill-opacity", "0.4"), Y(f, "class", "svelte-43sxxs"), Y(u, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), Y(u, "fill", "#FF7C00"), Y(u, "class", "svelte-43sxxs"), Y(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), Y(c, "fill", "#FF7C00"), Y(c, "fill-opacity", "0.4"), Y(c, "class", "svelte-43sxxs"), Y(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), Y(d, "fill", "#FF7C00"), Y(d, "class", "svelte-43sxxs"), In(o, "transform", "translate(" + /*$bottom*/ + l[1][1] + "px)"), Y(f, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), Y(f, "fill", "#FF7C00"), Y(f, "fill-opacity", "0.4"), Y(f, "class", "svelte-43sxxs"), Y(u, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), Y(u, "fill", "#FF7C00"), Y(u, "class", "svelte-43sxxs"), Y(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), Y(c, "fill", "#FF7C00"), Y(c, "fill-opacity", "0.4"), Y(c, "class", "svelte-43sxxs"), Y(_, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), Y(_, "fill", "#FF7C00"), Y(_, "class", "svelte-43sxxs"), Nn(a, "transform", "translate(" + /*$bottom*/ l[2][0] + "px, " + /*$bottom*/ - l[2][1] + "px)"), Y(t, "viewBox", "-1200 -1200 3000 3000"), Y(t, "fill", "none"), Y(t, "xmlns", "http://www.w3.org/2000/svg"), Y(t, "class", "svelte-43sxxs"), Y(e, "class", "svelte-43sxxs"), ts( + l[2][1] + "px)"), Y(t, "viewBox", "-1200 -1200 3000 3000"), Y(t, "fill", "none"), Y(t, "xmlns", "http://www.w3.org/2000/svg"), Y(t, "class", "svelte-43sxxs"), Y(e, "class", "svelte-43sxxs"), so( e, "margin", /*margin*/ l[0] ); }, - m(_, b) { - Ku(_, e, b), De(e, t), De(t, n), De(n, i), De(n, s), De(n, a), De(n, r), De(t, o), De(o, f), De(o, u), De(o, c), De(o, d); + m(d, h) { + tc(d, e, h), De(e, t), De(t, n), De(n, i), De(n, o), De(n, s), De(n, r), De(t, a), De(a, f), De(a, u), De(a, c), De(a, _); }, - p(_, [b]) { - b & /*$top*/ - 2 && In(n, "transform", "translate(" + /*$top*/ - _[1][0] + "px, " + /*$top*/ - _[1][1] + "px)"), b & /*$bottom*/ - 4 && In(o, "transform", "translate(" + /*$bottom*/ - _[2][0] + "px, " + /*$bottom*/ - _[2][1] + "px)"), b & /*margin*/ - 1 && ts( + p(d, [h]) { + h & /*$top*/ + 2 && Nn(n, "transform", "translate(" + /*$top*/ + d[1][0] + "px, " + /*$top*/ + d[1][1] + "px)"), h & /*$bottom*/ + 4 && Nn(a, "transform", "translate(" + /*$bottom*/ + d[2][0] + "px, " + /*$bottom*/ + d[2][1] + "px)"), h & /*margin*/ + 1 && so( e, "margin", /*margin*/ - _[0] + d[0] ); }, - i: es, - o: es, - d(_) { - _ && Wu(e); + i: oo, + o: oo, + d(d) { + d && xu(e); } }; } -function xu(l, e, t) { +function oc(l, e, t) { let n, i; - var s = this && this.__awaiter || function(_, b, h, w) { - function g(p) { - return p instanceof h ? p : new h(function(m) { + var o = this && this.__awaiter || function(d, h, b, g) { + function w(p) { + return p instanceof b ? p : new b(function(m) { m(p); }); } - return new (h || (h = Promise))(function(p, m) { - function C(q) { + return new (b || (b = Promise))(function(p, m) { + function v(z) { try { - y(w.next(q)); - } catch (v) { - m(v); + y(g.next(z)); + } catch (k) { + m(k); } } - function z(q) { + function S(z) { try { - y(w.throw(q)); - } catch (v) { - m(v); + y(g.throw(z)); + } catch (k) { + m(k); } } - function y(q) { - q.done ? p(q.value) : g(q.value).then(C, z); + function y(z) { + z.done ? p(z.value) : w(z.value).then(v, S); } - y((w = w.apply(_, b || [])).next()); + y((g = g.apply(d, h || [])).next()); }); }; - let { margin: a = !0 } = e; - const r = xi([0, 0]); - $i(l, r, (_) => t(1, n = _)); - const o = xi([0, 0]); - $i(l, o, (_) => t(2, i = _)); + let { margin: s = !0 } = e; + const r = lo([0, 0]); + io(l, r, (d) => t(1, n = d)); + const a = lo([0, 0]); + io(l, a, (d) => t(2, i = d)); let f; function u() { - return s(this, void 0, void 0, function* () { - yield Promise.all([r.set([125, 140]), o.set([-125, -140])]), yield Promise.all([r.set([-125, 140]), o.set([125, -140])]), yield Promise.all([r.set([-125, 0]), o.set([125, -0])]), yield Promise.all([r.set([125, 0]), o.set([-125, 0])]); + return o(this, void 0, void 0, function* () { + yield Promise.all([r.set([125, 140]), a.set([-125, -140])]), yield Promise.all([r.set([-125, 140]), a.set([125, -140])]), yield Promise.all([r.set([-125, 0]), a.set([125, -0])]), yield Promise.all([r.set([125, 0]), a.set([-125, 0])]); }); } function c() { - return s(this, void 0, void 0, function* () { + return o(this, void 0, void 0, function* () { yield u(), f || c(); }); } - function d() { - return s(this, void 0, void 0, function* () { - yield Promise.all([r.set([125, 0]), o.set([-125, 0])]), c(); + function _() { + return o(this, void 0, void 0, function* () { + yield Promise.all([r.set([125, 0]), a.set([-125, 0])]), c(); }); } - return Ju(() => (d(), () => f = !0)), l.$$set = (_) => { - "margin" in _ && t(0, a = _.margin); - }, [a, n, i, r, o]; + return lc(() => (_(), () => f = !0)), l.$$set = (d) => { + "margin" in d && t(0, s = d.margin); + }, [s, n, i, r, a]; } -class $u extends Ou { +class sc extends Qu { constructor(e) { - super(), Zu(this, e, xu, Qu, Gu, { margin: 0 }); + super(), ec(this, e, oc, ic, nc, { margin: 0 }); } } const { - SvelteComponent: ec, - append: zt, - attr: Ie, - binding_callbacks: ns, - check_outros: fi, - create_component: ko, - create_slot: vo, - destroy_component: yo, - destroy_each: Co, - detach: R, - element: Ve, - empty: tn, - ensure_array_like: tl, - get_all_dirty_from_scope: So, - get_slot_changes: zo, - group_outros: ui, - init: tc, + SvelteComponent: ac, + append: Et, + attr: Fe, + binding_callbacks: ao, + check_outros: hi, + create_component: Bs, + create_slot: Es, + destroy_component: Ms, + destroy_each: As, + detach: T, + element: Ze, + empty: ln, + ensure_array_like: fl, + get_all_dirty_from_scope: Ls, + get_slot_changes: Rs, + group_outros: mi, + init: rc, insert: j, - mount_component: qo, - noop: ci, - safe_not_equal: nc, - set_data: Me, - set_style: ft, - space: Be, + mount_component: Ds, + noop: gi, + safe_not_equal: fc, + set_data: Ae, + set_style: _t, + space: Me, text: K, - toggle_class: Ae, - transition_in: je, - transition_out: Oe, - update_slot_base: Eo -} = window.__gradio__svelte__internal, { tick: lc } = window.__gradio__svelte__internal, { onDestroy: ic } = window.__gradio__svelte__internal, { createEventDispatcher: sc } = window.__gradio__svelte__internal, oc = (l) => ({}), ls = (l) => ({}), ac = (l) => ({}), is = (l) => ({}); -function ss(l, e, t) { + toggle_class: Ee, + transition_in: Ie, + transition_out: Ke, + update_slot_base: Ts +} = window.__gradio__svelte__internal, { tick: uc } = window.__gradio__svelte__internal, { onDestroy: cc } = window.__gradio__svelte__internal, { createEventDispatcher: _c } = window.__gradio__svelte__internal, dc = (l) => ({}), ro = (l) => ({}), hc = (l) => ({}), fo = (l) => ({}); +function uo(l, e, t) { const n = l.slice(); return n[41] = e[t], n[43] = t, n; } -function os(l, e, t) { +function co(l, e, t) { const n = l.slice(); return n[41] = e[t], n; } -function rc(l) { - let e, t, n, i, s = ( +function mc(l) { + let e, t, n, i, o = ( /*i18n*/ l[1]("common.error") + "" - ), a, r, o; - t = new hl({ + ), s, r, a; + t = new pl({ props: { - Icon: ro, + Icon: gs, label: ( /*i18n*/ l[1]("common.clear") @@ -2601,86 +2601,86 @@ function rc(l) { const f = ( /*#slots*/ l[30].error - ), u = vo( + ), u = Es( f, l, /*$$scope*/ l[29], - ls + ro ); return { c() { - e = Ve("div"), ko(t.$$.fragment), n = Be(), i = Ve("span"), a = K(s), r = Be(), u && u.c(), Ie(e, "class", "clear-status svelte-16nch4a"), Ie(i, "class", "error svelte-16nch4a"); - }, - m(c, d) { - j(c, e, d), qo(t, e, null), j(c, n, d), j(c, i, d), zt(i, a), j(c, r, d), u && u.m(c, d), o = !0; - }, - p(c, d) { - const _ = {}; - d[0] & /*i18n*/ - 2 && (_.label = /*i18n*/ - c[1]("common.clear")), t.$set(_), (!o || d[0] & /*i18n*/ - 2) && s !== (s = /*i18n*/ - c[1]("common.error") + "") && Me(a, s), u && u.p && (!o || d[0] & /*$$scope*/ - 536870912) && Eo( + e = Ze("div"), Bs(t.$$.fragment), n = Me(), i = Ze("span"), s = K(o), r = Me(), u && u.c(), Fe(e, "class", "clear-status svelte-16nch4a"), Fe(i, "class", "error svelte-16nch4a"); + }, + m(c, _) { + j(c, e, _), Ds(t, e, null), j(c, n, _), j(c, i, _), Et(i, s), j(c, r, _), u && u.m(c, _), a = !0; + }, + p(c, _) { + const d = {}; + _[0] & /*i18n*/ + 2 && (d.label = /*i18n*/ + c[1]("common.clear")), t.$set(d), (!a || _[0] & /*i18n*/ + 2) && o !== (o = /*i18n*/ + c[1]("common.error") + "") && Ae(s, o), u && u.p && (!a || _[0] & /*$$scope*/ + 536870912) && Ts( u, f, c, /*$$scope*/ c[29], - o ? zo( + a ? Rs( f, /*$$scope*/ c[29], - d, - oc - ) : So( + _, + dc + ) : Ls( /*$$scope*/ c[29] ), - ls + ro ); }, i(c) { - o || (je(t.$$.fragment, c), je(u, c), o = !0); + a || (Ie(t.$$.fragment, c), Ie(u, c), a = !0); }, o(c) { - Oe(t.$$.fragment, c), Oe(u, c), o = !1; + Ke(t.$$.fragment, c), Ke(u, c), a = !1; }, d(c) { - c && (R(e), R(n), R(i), R(r)), yo(t), u && u.d(c); + c && (T(e), T(n), T(i), T(r)), Ms(t), u && u.d(c); } }; } -function fc(l) { - let e, t, n, i, s, a, r, o, f, u = ( +function gc(l) { + let e, t, n, i, o, s, r, a, f, u = ( /*variant*/ l[8] === "default" && /*show_eta_bar*/ l[18] && /*show_progress*/ - l[6] === "full" && as(l) + l[6] === "full" && _o(l) ); - function c(m, C) { + function c(m, v) { if ( /*progress*/ m[7] - ) return _c; + ) return pc; if ( /*queue_position*/ m[2] !== null && /*queue_size*/ m[3] !== void 0 && /*queue_position*/ m[2] >= 0 - ) return cc; + ) return wc; if ( /*queue_position*/ m[2] === 0 - ) return uc; + ) return bc; } - let d = c(l), _ = d && d(l), b = ( + let _ = c(l), d = _ && _(l), h = ( /*timer*/ - l[5] && us(l) + l[5] && go(l) ); - const h = [bc, mc], w = []; - function g(m, C) { + const b = [Cc, yc], g = []; + function w(m, v) { return ( /*last_progress_level*/ m[15] != null ? 0 : ( @@ -2689,70 +2689,70 @@ function fc(l) { ) ); } - ~(s = g(l)) && (a = w[s] = h[s](l)); + ~(o = w(l)) && (s = g[o] = b[o](l)); let p = !/*timer*/ - l[5] && gs(l); + l[5] && Co(l); return { c() { - u && u.c(), e = Be(), t = Ve("div"), _ && _.c(), n = Be(), b && b.c(), i = Be(), a && a.c(), r = Be(), p && p.c(), o = tn(), Ie(t, "class", "progress-text svelte-16nch4a"), Ae( + u && u.c(), e = Me(), t = Ze("div"), d && d.c(), n = Me(), h && h.c(), i = Me(), s && s.c(), r = Me(), p && p.c(), a = ln(), Fe(t, "class", "progress-text svelte-16nch4a"), Ee( t, "meta-text-center", /*variant*/ l[8] === "center" - ), Ae( + ), Ee( t, "meta-text", /*variant*/ l[8] === "default" ); }, - m(m, C) { - u && u.m(m, C), j(m, e, C), j(m, t, C), _ && _.m(t, null), zt(t, n), b && b.m(t, null), j(m, i, C), ~s && w[s].m(m, C), j(m, r, C), p && p.m(m, C), j(m, o, C), f = !0; + m(m, v) { + u && u.m(m, v), j(m, e, v), j(m, t, v), d && d.m(t, null), Et(t, n), h && h.m(t, null), j(m, i, v), ~o && g[o].m(m, v), j(m, r, v), p && p.m(m, v), j(m, a, v), f = !0; }, - p(m, C) { + p(m, v) { /*variant*/ m[8] === "default" && /*show_eta_bar*/ m[18] && /*show_progress*/ - m[6] === "full" ? u ? u.p(m, C) : (u = as(m), u.c(), u.m(e.parentNode, e)) : u && (u.d(1), u = null), d === (d = c(m)) && _ ? _.p(m, C) : (_ && _.d(1), _ = d && d(m), _ && (_.c(), _.m(t, n))), /*timer*/ - m[5] ? b ? b.p(m, C) : (b = us(m), b.c(), b.m(t, null)) : b && (b.d(1), b = null), (!f || C[0] & /*variant*/ - 256) && Ae( + m[6] === "full" ? u ? u.p(m, v) : (u = _o(m), u.c(), u.m(e.parentNode, e)) : u && (u.d(1), u = null), _ === (_ = c(m)) && d ? d.p(m, v) : (d && d.d(1), d = _ && _(m), d && (d.c(), d.m(t, n))), /*timer*/ + m[5] ? h ? h.p(m, v) : (h = go(m), h.c(), h.m(t, null)) : h && (h.d(1), h = null), (!f || v[0] & /*variant*/ + 256) && Ee( t, "meta-text-center", /*variant*/ m[8] === "center" - ), (!f || C[0] & /*variant*/ - 256) && Ae( + ), (!f || v[0] & /*variant*/ + 256) && Ee( t, "meta-text", /*variant*/ m[8] === "default" ); - let z = s; - s = g(m), s === z ? ~s && w[s].p(m, C) : (a && (ui(), Oe(w[z], 1, 1, () => { - w[z] = null; - }), fi()), ~s ? (a = w[s], a ? a.p(m, C) : (a = w[s] = h[s](m), a.c()), je(a, 1), a.m(r.parentNode, r)) : a = null), /*timer*/ - m[5] ? p && (ui(), Oe(p, 1, 1, () => { + let S = o; + o = w(m), o === S ? ~o && g[o].p(m, v) : (s && (mi(), Ke(g[S], 1, 1, () => { + g[S] = null; + }), hi()), ~o ? (s = g[o], s ? s.p(m, v) : (s = g[o] = b[o](m), s.c()), Ie(s, 1), s.m(r.parentNode, r)) : s = null), /*timer*/ + m[5] ? p && (mi(), Ke(p, 1, 1, () => { p = null; - }), fi()) : p ? (p.p(m, C), C[0] & /*timer*/ - 32 && je(p, 1)) : (p = gs(m), p.c(), je(p, 1), p.m(o.parentNode, o)); + }), hi()) : p ? (p.p(m, v), v[0] & /*timer*/ + 32 && Ie(p, 1)) : (p = Co(m), p.c(), Ie(p, 1), p.m(a.parentNode, a)); }, i(m) { - f || (je(a), je(p), f = !0); + f || (Ie(s), Ie(p), f = !0); }, o(m) { - Oe(a), Oe(p), f = !1; + Ke(s), Ke(p), f = !1; }, d(m) { - m && (R(e), R(t), R(i), R(r), R(o)), u && u.d(m), _ && _.d(), b && b.d(), ~s && w[s].d(m), p && p.d(m); + m && (T(e), T(t), T(i), T(r), T(a)), u && u.d(m), d && d.d(), h && h.d(), ~o && g[o].d(m), p && p.d(m); } }; } -function as(l) { +function _o(l) { let e, t = `translateX(${/*eta_level*/ (l[17] || 0) * 100 - 100}%)`; return { c() { - e = Ve("div"), Ie(e, "class", "eta-bar svelte-16nch4a"), ft(e, "transform", t); + e = Ze("div"), Fe(e, "class", "eta-bar svelte-16nch4a"), _t(e, "transform", t); }, m(n, i) { j(n, e, i); @@ -2760,14 +2760,14 @@ function as(l) { p(n, i) { i[0] & /*eta_level*/ 131072 && t !== (t = `translateX(${/*eta_level*/ - (n[17] || 0) * 100 - 100}%)`) && ft(e, "transform", t); + (n[17] || 0) * 100 - 100}%)`) && _t(e, "transform", t); }, d(n) { - n && R(e); + n && T(e); } }; } -function uc(l) { +function bc(l) { let e; return { c() { @@ -2776,113 +2776,113 @@ function uc(l) { m(t, n) { j(t, e, n); }, - p: ci, + p: gi, d(t) { - t && R(e); + t && T(e); } }; } -function cc(l) { +function wc(l) { let e, t = ( /*queue_position*/ l[2] + 1 + "" - ), n, i, s, a; + ), n, i, o, s; return { c() { - e = K("queue: "), n = K(t), i = K("/"), s = K( + e = K("queue: "), n = K(t), i = K("/"), o = K( /*queue_size*/ l[3] - ), a = K(" |"); + ), s = K(" |"); }, - m(r, o) { - j(r, e, o), j(r, n, o), j(r, i, o), j(r, s, o), j(r, a, o); + m(r, a) { + j(r, e, a), j(r, n, a), j(r, i, a), j(r, o, a), j(r, s, a); }, - p(r, o) { - o[0] & /*queue_position*/ + p(r, a) { + a[0] & /*queue_position*/ 4 && t !== (t = /*queue_position*/ - r[2] + 1 + "") && Me(n, t), o[0] & /*queue_size*/ - 8 && Me( - s, + r[2] + 1 + "") && Ae(n, t), a[0] & /*queue_size*/ + 8 && Ae( + o, /*queue_size*/ r[3] ); }, d(r) { - r && (R(e), R(n), R(i), R(s), R(a)); + r && (T(e), T(n), T(i), T(o), T(s)); } }; } -function _c(l) { - let e, t = tl( +function pc(l) { + let e, t = fl( /*progress*/ l[7] ), n = []; for (let i = 0; i < t.length; i += 1) - n[i] = fs(os(l, t, i)); + n[i] = mo(co(l, t, i)); return { c() { for (let i = 0; i < n.length; i += 1) n[i].c(); - e = tn(); + e = ln(); }, - m(i, s) { - for (let a = 0; a < n.length; a += 1) - n[a] && n[a].m(i, s); - j(i, e, s); + m(i, o) { + for (let s = 0; s < n.length; s += 1) + n[s] && n[s].m(i, o); + j(i, e, o); }, - p(i, s) { - if (s[0] & /*progress*/ + p(i, o) { + if (o[0] & /*progress*/ 128) { - t = tl( + t = fl( /*progress*/ i[7] ); - let a; - for (a = 0; a < t.length; a += 1) { - const r = os(i, t, a); - n[a] ? n[a].p(r, s) : (n[a] = fs(r), n[a].c(), n[a].m(e.parentNode, e)); + let s; + for (s = 0; s < t.length; s += 1) { + const r = co(i, t, s); + n[s] ? n[s].p(r, o) : (n[s] = mo(r), n[s].c(), n[s].m(e.parentNode, e)); } - for (; a < n.length; a += 1) - n[a].d(1); + for (; s < n.length; s += 1) + n[s].d(1); n.length = t.length; } }, d(i) { - i && R(e), Co(n, i); + i && T(e), As(n, i); } }; } -function rs(l) { +function ho(l) { let e, t = ( /*p*/ l[41].unit + "" - ), n, i, s = " ", a; + ), n, i, o = " ", s; function r(u, c) { return ( /*p*/ - u[41].length != null ? hc : dc + u[41].length != null ? kc : vc ); } - let o = r(l), f = o(l); + let a = r(l), f = a(l); return { c() { - f.c(), e = Be(), n = K(t), i = K(" | "), a = K(s); + f.c(), e = Me(), n = K(t), i = K(" | "), s = K(o); }, m(u, c) { - f.m(u, c), j(u, e, c), j(u, n, c), j(u, i, c), j(u, a, c); + f.m(u, c), j(u, e, c), j(u, n, c), j(u, i, c), j(u, s, c); }, p(u, c) { - o === (o = r(u)) && f ? f.p(u, c) : (f.d(1), f = o(u), f && (f.c(), f.m(e.parentNode, e))), c[0] & /*progress*/ + a === (a = r(u)) && f ? f.p(u, c) : (f.d(1), f = a(u), f && (f.c(), f.m(e.parentNode, e))), c[0] & /*progress*/ 128 && t !== (t = /*p*/ - u[41].unit + "") && Me(n, t); + u[41].unit + "") && Ae(n, t); }, d(u) { - u && (R(e), R(n), R(i), R(a)), f.d(u); + u && (T(e), T(n), T(i), T(s)), f.d(u); } }; } -function dc(l) { - let e = Gt( +function vc(l) { + let e = Jt( /*p*/ l[41].index || 0 ) + "", t; @@ -2895,69 +2895,69 @@ function dc(l) { }, p(n, i) { i[0] & /*progress*/ - 128 && e !== (e = Gt( + 128 && e !== (e = Jt( /*p*/ n[41].index || 0 - ) + "") && Me(t, e); + ) + "") && Ae(t, e); }, d(n) { - n && R(t); + n && T(t); } }; } -function hc(l) { - let e = Gt( +function kc(l) { + let e = Jt( /*p*/ l[41].index || 0 - ) + "", t, n, i = Gt( + ) + "", t, n, i = Jt( /*p*/ l[41].length - ) + "", s; + ) + "", o; return { c() { - t = K(e), n = K("/"), s = K(i); + t = K(e), n = K("/"), o = K(i); }, - m(a, r) { - j(a, t, r), j(a, n, r), j(a, s, r); + m(s, r) { + j(s, t, r), j(s, n, r), j(s, o, r); }, - p(a, r) { + p(s, r) { r[0] & /*progress*/ - 128 && e !== (e = Gt( + 128 && e !== (e = Jt( /*p*/ - a[41].index || 0 - ) + "") && Me(t, e), r[0] & /*progress*/ - 128 && i !== (i = Gt( + s[41].index || 0 + ) + "") && Ae(t, e), r[0] & /*progress*/ + 128 && i !== (i = Jt( /*p*/ - a[41].length - ) + "") && Me(s, i); + s[41].length + ) + "") && Ae(o, i); }, - d(a) { - a && (R(t), R(n), R(s)); + d(s) { + s && (T(t), T(n), T(o)); } }; } -function fs(l) { +function mo(l) { let e, t = ( /*p*/ - l[41].index != null && rs(l) + l[41].index != null && ho(l) ); return { c() { - t && t.c(), e = tn(); + t && t.c(), e = ln(); }, m(n, i) { t && t.m(n, i), j(n, e, i); }, p(n, i) { /*p*/ - n[41].index != null ? t ? t.p(n, i) : (t = rs(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + n[41].index != null ? t ? t.p(n, i) : (t = ho(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { - n && R(e), t && t.d(n); + n && T(e), t && t.d(n); } }; } -function us(l) { +function go(l) { let e, t = ( /*eta*/ l[0] ? `/${/*formatted_eta*/ @@ -2970,129 +2970,129 @@ function us(l) { l[20] ), n = K(t), i = K("s"); }, - m(s, a) { - j(s, e, a), j(s, n, a), j(s, i, a); + m(o, s) { + j(o, e, s), j(o, n, s), j(o, i, s); }, - p(s, a) { - a[0] & /*formatted_timer*/ - 1048576 && Me( + p(o, s) { + s[0] & /*formatted_timer*/ + 1048576 && Ae( e, /*formatted_timer*/ - s[20] - ), a[0] & /*eta, formatted_eta*/ + o[20] + ), s[0] & /*eta, formatted_eta*/ 524289 && t !== (t = /*eta*/ - s[0] ? `/${/*formatted_eta*/ - s[19]}` : "") && Me(n, t); + o[0] ? `/${/*formatted_eta*/ + o[19]}` : "") && Ae(n, t); }, - d(s) { - s && (R(e), R(n), R(i)); + d(o) { + o && (T(e), T(n), T(i)); } }; } -function mc(l) { +function yc(l) { let e, t; - return e = new $u({ + return e = new sc({ props: { margin: ( /*variant*/ l[8] === "default" ) } }), { c() { - ko(e.$$.fragment); + Bs(e.$$.fragment); }, m(n, i) { - qo(e, n, i), t = !0; + Ds(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*variant*/ - 256 && (s.margin = /*variant*/ - n[8] === "default"), e.$set(s); + 256 && (o.margin = /*variant*/ + n[8] === "default"), e.$set(o); }, i(n) { - t || (je(e.$$.fragment, n), t = !0); + t || (Ie(e.$$.fragment, n), t = !0); }, o(n) { - Oe(e.$$.fragment, n), t = !1; + Ke(e.$$.fragment, n), t = !1; }, d(n) { - yo(e, n); + Ms(e, n); } }; } -function bc(l) { - let e, t, n, i, s, a = `${/*last_progress_level*/ +function Cc(l) { + let e, t, n, i, o, s = `${/*last_progress_level*/ l[15] * 100}%`, r = ( /*progress*/ - l[7] != null && cs(l) + l[7] != null && bo(l) ); return { c() { - e = Ve("div"), t = Ve("div"), r && r.c(), n = Be(), i = Ve("div"), s = Ve("div"), Ie(t, "class", "progress-level-inner svelte-16nch4a"), Ie(s, "class", "progress-bar svelte-16nch4a"), ft(s, "width", a), Ie(i, "class", "progress-bar-wrap svelte-16nch4a"), Ie(e, "class", "progress-level svelte-16nch4a"); + e = Ze("div"), t = Ze("div"), r && r.c(), n = Me(), i = Ze("div"), o = Ze("div"), Fe(t, "class", "progress-level-inner svelte-16nch4a"), Fe(o, "class", "progress-bar svelte-16nch4a"), _t(o, "width", s), Fe(i, "class", "progress-bar-wrap svelte-16nch4a"), Fe(e, "class", "progress-level svelte-16nch4a"); }, - m(o, f) { - j(o, e, f), zt(e, t), r && r.m(t, null), zt(e, n), zt(e, i), zt(i, s), l[31](s); + m(a, f) { + j(a, e, f), Et(e, t), r && r.m(t, null), Et(e, n), Et(e, i), Et(i, o), l[31](o); }, - p(o, f) { + p(a, f) { /*progress*/ - o[7] != null ? r ? r.p(o, f) : (r = cs(o), r.c(), r.m(t, null)) : r && (r.d(1), r = null), f[0] & /*last_progress_level*/ - 32768 && a !== (a = `${/*last_progress_level*/ - o[15] * 100}%`) && ft(s, "width", a); + a[7] != null ? r ? r.p(a, f) : (r = bo(a), r.c(), r.m(t, null)) : r && (r.d(1), r = null), f[0] & /*last_progress_level*/ + 32768 && s !== (s = `${/*last_progress_level*/ + a[15] * 100}%`) && _t(o, "width", s); }, - i: ci, - o: ci, - d(o) { - o && R(e), r && r.d(), l[31](null); + i: gi, + o: gi, + d(a) { + a && T(e), r && r.d(), l[31](null); } }; } -function cs(l) { - let e, t = tl( +function bo(l) { + let e, t = fl( /*progress*/ l[7] ), n = []; for (let i = 0; i < t.length; i += 1) - n[i] = bs(ss(l, t, i)); + n[i] = yo(uo(l, t, i)); return { c() { for (let i = 0; i < n.length; i += 1) n[i].c(); - e = tn(); + e = ln(); }, - m(i, s) { - for (let a = 0; a < n.length; a += 1) - n[a] && n[a].m(i, s); - j(i, e, s); + m(i, o) { + for (let s = 0; s < n.length; s += 1) + n[s] && n[s].m(i, o); + j(i, e, o); }, - p(i, s) { - if (s[0] & /*progress_level, progress*/ + p(i, o) { + if (o[0] & /*progress_level, progress*/ 16512) { - t = tl( + t = fl( /*progress*/ i[7] ); - let a; - for (a = 0; a < t.length; a += 1) { - const r = ss(i, t, a); - n[a] ? n[a].p(r, s) : (n[a] = bs(r), n[a].c(), n[a].m(e.parentNode, e)); + let s; + for (s = 0; s < t.length; s += 1) { + const r = uo(i, t, s); + n[s] ? n[s].p(r, o) : (n[s] = yo(r), n[s].c(), n[s].m(e.parentNode, e)); } - for (; a < n.length; a += 1) - n[a].d(1); + for (; s < n.length; s += 1) + n[s].d(1); n.length = t.length; } }, d(i) { - i && R(e), Co(n, i); + i && T(e), As(n, i); } }; } -function _s(l) { - let e, t, n, i, s = ( +function wo(l) { + let e, t, n, i, o = ( /*i*/ - l[43] !== 0 && gc() - ), a = ( + l[43] !== 0 && Sc() + ), s = ( /*p*/ - l[41].desc != null && ds(l) + l[41].desc != null && po(l) ), r = ( /*p*/ l[41].desc != null && /*progress_level*/ @@ -3100,35 +3100,35 @@ function _s(l) { l[14][ /*i*/ l[43] - ] != null && hs() - ), o = ( + ] != null && vo() + ), a = ( /*progress_level*/ - l[14] != null && ms(l) + l[14] != null && ko(l) ); return { c() { - s && s.c(), e = Be(), a && a.c(), t = Be(), r && r.c(), n = Be(), o && o.c(), i = tn(); + o && o.c(), e = Me(), s && s.c(), t = Me(), r && r.c(), n = Me(), a && a.c(), i = ln(); }, m(f, u) { - s && s.m(f, u), j(f, e, u), a && a.m(f, u), j(f, t, u), r && r.m(f, u), j(f, n, u), o && o.m(f, u), j(f, i, u); + o && o.m(f, u), j(f, e, u), s && s.m(f, u), j(f, t, u), r && r.m(f, u), j(f, n, u), a && a.m(f, u), j(f, i, u); }, p(f, u) { /*p*/ - f[41].desc != null ? a ? a.p(f, u) : (a = ds(f), a.c(), a.m(t.parentNode, t)) : a && (a.d(1), a = null), /*p*/ + f[41].desc != null ? s ? s.p(f, u) : (s = po(f), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*p*/ f[41].desc != null && /*progress_level*/ f[14] && /*progress_level*/ f[14][ /*i*/ f[43] - ] != null ? r || (r = hs(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/ - f[14] != null ? o ? o.p(f, u) : (o = ms(f), o.c(), o.m(i.parentNode, i)) : o && (o.d(1), o = null); + ] != null ? r || (r = vo(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/ + f[14] != null ? a ? a.p(f, u) : (a = ko(f), a.c(), a.m(i.parentNode, i)) : a && (a.d(1), a = null); }, d(f) { - f && (R(e), R(t), R(n), R(i)), s && s.d(f), a && a.d(f), r && r.d(f), o && o.d(f); + f && (T(e), T(t), T(n), T(i)), o && o.d(f), s && s.d(f), r && r.d(f), a && a.d(f); } }; } -function gc(l) { +function Sc(l) { let e; return { c() { @@ -3138,11 +3138,11 @@ function gc(l) { j(t, e, n); }, d(t) { - t && R(e); + t && T(e); } }; } -function ds(l) { +function po(l) { let e = ( /*p*/ l[41].desc + "" @@ -3157,14 +3157,14 @@ function ds(l) { p(n, i) { i[0] & /*progress*/ 128 && e !== (e = /*p*/ - n[41].desc + "") && Me(t, e); + n[41].desc + "") && Ae(t, e); }, d(n) { - n && R(t); + n && T(t); } }; } -function hs(l) { +function vo(l) { let e; return { c() { @@ -3174,11 +3174,11 @@ function hs(l) { j(t, e, n); }, d(t) { - t && R(e); + t && T(e); } }; } -function ms(l) { +function ko(l) { let e = (100 * /*progress_level*/ (l[14][ /*i*/ @@ -3188,23 +3188,23 @@ function ms(l) { c() { t = K(e), n = K("%"); }, - m(i, s) { - j(i, t, s), j(i, n, s); + m(i, o) { + j(i, t, o), j(i, n, o); }, - p(i, s) { - s[0] & /*progress_level*/ + p(i, o) { + o[0] & /*progress_level*/ 16384 && e !== (e = (100 * /*progress_level*/ (i[14][ /*i*/ i[43] - ] || 0)).toFixed(1) + "") && Me(t, e); + ] || 0)).toFixed(1) + "") && Ae(t, e); }, d(i) { - i && (R(t), R(n)); + i && (T(t), T(n)); } }; } -function bs(l) { +function yo(l) { let e, t = ( /*p*/ (l[41].desc != null || /*progress_level*/ @@ -3212,11 +3212,11 @@ function bs(l) { l[14][ /*i*/ l[43] - ] != null) && _s(l) + ] != null) && wo(l) ); return { c() { - t && t.c(), e = tn(); + t && t.c(), e = ln(); }, m(n, i) { t && t.m(n, i), j(n, e, i); @@ -3228,76 +3228,76 @@ function bs(l) { n[14][ /*i*/ n[43] - ] != null ? t ? t.p(n, i) : (t = _s(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + ] != null ? t ? t.p(n, i) : (t = wo(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { - n && R(e), t && t.d(n); + n && T(e), t && t.d(n); } }; } -function gs(l) { +function Co(l) { let e, t, n, i; - const s = ( + const o = ( /*#slots*/ l[30]["additional-loading-text"] - ), a = vo( - s, + ), s = Es( + o, l, /*$$scope*/ l[29], - is + fo ); return { c() { - e = Ve("p"), t = K( + e = Ze("p"), t = K( /*loading_text*/ l[9] - ), n = Be(), a && a.c(), Ie(e, "class", "loading svelte-16nch4a"); + ), n = Me(), s && s.c(), Fe(e, "class", "loading svelte-16nch4a"); }, - m(r, o) { - j(r, e, o), zt(e, t), j(r, n, o), a && a.m(r, o), i = !0; + m(r, a) { + j(r, e, a), Et(e, t), j(r, n, a), s && s.m(r, a), i = !0; }, - p(r, o) { - (!i || o[0] & /*loading_text*/ - 512) && Me( + p(r, a) { + (!i || a[0] & /*loading_text*/ + 512) && Ae( t, /*loading_text*/ r[9] - ), a && a.p && (!i || o[0] & /*$$scope*/ - 536870912) && Eo( - a, + ), s && s.p && (!i || a[0] & /*$$scope*/ + 536870912) && Ts( s, + o, r, /*$$scope*/ r[29], - i ? zo( - s, + i ? Rs( + o, /*$$scope*/ r[29], - o, - ac - ) : So( + a, + hc + ) : Ls( /*$$scope*/ r[29] ), - is + fo ); }, i(r) { - i || (je(a, r), i = !0); + i || (Ie(s, r), i = !0); }, o(r) { - Oe(a, r), i = !1; + Ke(s, r), i = !1; }, d(r) { - r && (R(e), R(n)), a && a.d(r); + r && (T(e), T(n)), s && s.d(r); } }; } -function wc(l) { - let e, t, n, i, s; - const a = [fc, rc], r = []; - function o(f, u) { +function zc(l) { + let e, t, n, i, o; + const s = [gc, mc], r = []; + function a(f, u) { return ( /*status*/ f[4] === "pending" ? 0 : ( @@ -3306,14 +3306,14 @@ function wc(l) { ) ); } - return ~(t = o(l)) && (n = r[t] = a[t](l)), { + return ~(t = a(l)) && (n = r[t] = s[t](l)), { c() { - e = Ve("div"), n && n.c(), Ie(e, "class", i = "wrap " + /*variant*/ + e = Ze("div"), n && n.c(), Fe(e, "class", i = "wrap " + /*variant*/ l[8] + " " + /*show_progress*/ - l[6] + " svelte-16nch4a"), Ae(e, "hide", !/*status*/ + l[6] + " svelte-16nch4a"), Ee(e, "hide", !/*status*/ l[4] || /*status*/ l[4] === "complete" || /*show_progress*/ - l[6] === "hidden"), Ae( + l[6] === "hidden"), Ee( e, "translucent", /*variant*/ @@ -3322,22 +3322,22 @@ function wc(l) { l[4] === "error") || /*translucent*/ l[11] || /*show_progress*/ l[6] === "minimal" - ), Ae( + ), Ee( e, "generating", /*status*/ l[4] === "generating" - ), Ae( + ), Ee( e, "border", /*border*/ l[12] - ), ft( + ), _t( e, "position", /*absolute*/ l[10] ? "absolute" : "static" - ), ft( + ), _t( e, "padding", /*absolute*/ @@ -3345,21 +3345,21 @@ function wc(l) { ); }, m(f, u) { - j(f, e, u), ~t && r[t].m(e, null), l[33](e), s = !0; + j(f, e, u), ~t && r[t].m(e, null), l[33](e), o = !0; }, p(f, u) { let c = t; - t = o(f), t === c ? ~t && r[t].p(f, u) : (n && (ui(), Oe(r[c], 1, 1, () => { + t = a(f), t === c ? ~t && r[t].p(f, u) : (n && (mi(), Ke(r[c], 1, 1, () => { r[c] = null; - }), fi()), ~t ? (n = r[t], n ? n.p(f, u) : (n = r[t] = a[t](f), n.c()), je(n, 1), n.m(e, null)) : n = null), (!s || u[0] & /*variant, show_progress*/ + }), hi()), ~t ? (n = r[t], n ? n.p(f, u) : (n = r[t] = s[t](f), n.c()), Ie(n, 1), n.m(e, null)) : n = null), (!o || u[0] & /*variant, show_progress*/ 320 && i !== (i = "wrap " + /*variant*/ f[8] + " " + /*show_progress*/ - f[6] + " svelte-16nch4a")) && Ie(e, "class", i), (!s || u[0] & /*variant, show_progress, status, show_progress*/ - 336) && Ae(e, "hide", !/*status*/ + f[6] + " svelte-16nch4a")) && Fe(e, "class", i), (!o || u[0] & /*variant, show_progress, status, show_progress*/ + 336) && Ee(e, "hide", !/*status*/ f[4] || /*status*/ f[4] === "complete" || /*show_progress*/ - f[6] === "hidden"), (!s || u[0] & /*variant, show_progress, variant, status, translucent, show_progress*/ - 2384) && Ae( + f[6] === "hidden"), (!o || u[0] & /*variant, show_progress, variant, status, translucent, show_progress*/ + 2384) && Ee( e, "translucent", /*variant*/ @@ -3368,26 +3368,26 @@ function wc(l) { f[4] === "error") || /*translucent*/ f[11] || /*show_progress*/ f[6] === "minimal" - ), (!s || u[0] & /*variant, show_progress, status*/ - 336) && Ae( + ), (!o || u[0] & /*variant, show_progress, status*/ + 336) && Ee( e, "generating", /*status*/ f[4] === "generating" - ), (!s || u[0] & /*variant, show_progress, border*/ - 4416) && Ae( + ), (!o || u[0] & /*variant, show_progress, border*/ + 4416) && Ee( e, "border", /*border*/ f[12] ), u[0] & /*absolute*/ - 1024 && ft( + 1024 && _t( e, "position", /*absolute*/ f[10] ? "absolute" : "static" ), u[0] & /*absolute*/ - 1024 && ft( + 1024 && _t( e, "padding", /*absolute*/ @@ -3395,155 +3395,155 @@ function wc(l) { ); }, i(f) { - s || (je(n), s = !0); + o || (Ie(n), o = !0); }, o(f) { - Oe(n), s = !1; + Ke(n), o = !1; }, d(f) { - f && R(e), ~t && r[t].d(), l[33](null); + f && T(e), ~t && r[t].d(), l[33](null); } }; } -var pc = function(l, e, t, n) { - function i(s) { - return s instanceof t ? s : new t(function(a) { - a(s); +var qc = function(l, e, t, n) { + function i(o) { + return o instanceof t ? o : new t(function(s) { + s(o); }); } - return new (t || (t = Promise))(function(s, a) { + return new (t || (t = Promise))(function(o, s) { function r(u) { try { f(n.next(u)); } catch (c) { - a(c); + s(c); } } - function o(u) { + function a(u) { try { f(n.throw(u)); } catch (c) { - a(c); + s(c); } } function f(u) { - u.done ? s(u.value) : i(u.value).then(r, o); + u.done ? o(u.value) : i(u.value).then(r, a); } f((n = n.apply(l, e || [])).next()); }); }; -let Fn = [], Nl = !1; -function kc(l) { - return pc(this, arguments, void 0, function* (e, t = !0) { +let On = [], Kl = !1; +function Bc(l) { + return qc(this, arguments, void 0, function* (e, t = !0) { if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) { - if (Fn.push(e), !Nl) Nl = !0; + if (On.push(e), !Kl) Kl = !0; else return; - yield lc(), requestAnimationFrame(() => { + yield uc(), requestAnimationFrame(() => { let n = [0, 0]; - for (let i = 0; i < Fn.length; i++) { - const a = Fn[i].getBoundingClientRect(); - (i === 0 || a.top + window.scrollY <= n[0]) && (n[0] = a.top + window.scrollY, n[1] = i); + for (let i = 0; i < On.length; i++) { + const s = On[i].getBoundingClientRect(); + (i === 0 || s.top + window.scrollY <= n[0]) && (n[0] = s.top + window.scrollY, n[1] = i); } - window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), Nl = !1, Fn = []; + window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), Kl = !1, On = []; }); } }); } -function vc(l, e, t) { - let n, { $$slots: i = {}, $$scope: s } = e; +function Ec(l, e, t) { + let n, { $$slots: i = {}, $$scope: o } = e; this && this.__awaiter; - const a = sc(); - let { i18n: r } = e, { eta: o = null } = e, { queue_position: f } = e, { queue_size: u } = e, { status: c } = e, { scroll_to_output: d = !1 } = e, { timer: _ = !0 } = e, { show_progress: b = "full" } = e, { message: h = null } = e, { progress: w = null } = e, { variant: g = "default" } = e, { loading_text: p = "Loading..." } = e, { absolute: m = !0 } = e, { translucent: C = !1 } = e, { border: z = !1 } = e, { autoscroll: y } = e, q, v = !1, E = 0, F = 0, X = null, L = null, V = 0, I = null, Q, W = null, le = !0; - const ae = () => { - t(0, o = t(27, X = t(19, fe = null))), t(25, E = performance.now()), t(26, F = 0), v = !0, re(); + const s = _c(); + let { i18n: r } = e, { eta: a = null } = e, { queue_position: f } = e, { queue_size: u } = e, { status: c } = e, { scroll_to_output: _ = !1 } = e, { timer: d = !0 } = e, { show_progress: h = "full" } = e, { message: b = null } = e, { progress: g = null } = e, { variant: w = "default" } = e, { loading_text: p = "Loading..." } = e, { absolute: m = !0 } = e, { translucent: v = !1 } = e, { border: S = !1 } = e, { autoscroll: y } = e, z, k = !1, q = 0, I = 0, F = null, R = null, G = 0, U = null, X, O = null, _e = !0; + const oe = () => { + t(0, a = t(27, F = t(19, ue = null))), t(25, q = performance.now()), t(26, I = 0), k = !0, fe(); }; - function re() { + function fe() { requestAnimationFrame(() => { - t(26, F = (performance.now() - E) / 1e3), v && re(); + t(26, I = (performance.now() - q) / 1e3), k && fe(); }); } function D() { - t(26, F = 0), t(0, o = t(27, X = t(19, fe = null))), v && (v = !1); + t(26, I = 0), t(0, a = t(27, F = t(19, ue = null))), k && (k = !1); } - ic(() => { - v && D(); + cc(() => { + k && D(); }); - let fe = null; - function Se(B) { - ns[B ? "unshift" : "push"](() => { - W = B, t(16, W), t(7, w), t(14, I), t(15, Q); + let ue = null; + function Ce(A) { + ao[A ? "unshift" : "push"](() => { + O = A, t(16, O), t(7, g), t(14, U), t(15, X); }); } - const Fe = () => { - a("clear_status"); + const Xe = () => { + s("clear_status"); }; - function Pe(B) { - ns[B ? "unshift" : "push"](() => { - q = B, t(13, q); + function Ye(A) { + ao[A ? "unshift" : "push"](() => { + z = A, t(13, z); }); } - return l.$$set = (B) => { - "i18n" in B && t(1, r = B.i18n), "eta" in B && t(0, o = B.eta), "queue_position" in B && t(2, f = B.queue_position), "queue_size" in B && t(3, u = B.queue_size), "status" in B && t(4, c = B.status), "scroll_to_output" in B && t(22, d = B.scroll_to_output), "timer" in B && t(5, _ = B.timer), "show_progress" in B && t(6, b = B.show_progress), "message" in B && t(23, h = B.message), "progress" in B && t(7, w = B.progress), "variant" in B && t(8, g = B.variant), "loading_text" in B && t(9, p = B.loading_text), "absolute" in B && t(10, m = B.absolute), "translucent" in B && t(11, C = B.translucent), "border" in B && t(12, z = B.border), "autoscroll" in B && t(24, y = B.autoscroll), "$$scope" in B && t(29, s = B.$$scope); + return l.$$set = (A) => { + "i18n" in A && t(1, r = A.i18n), "eta" in A && t(0, a = A.eta), "queue_position" in A && t(2, f = A.queue_position), "queue_size" in A && t(3, u = A.queue_size), "status" in A && t(4, c = A.status), "scroll_to_output" in A && t(22, _ = A.scroll_to_output), "timer" in A && t(5, d = A.timer), "show_progress" in A && t(6, h = A.show_progress), "message" in A && t(23, b = A.message), "progress" in A && t(7, g = A.progress), "variant" in A && t(8, w = A.variant), "loading_text" in A && t(9, p = A.loading_text), "absolute" in A && t(10, m = A.absolute), "translucent" in A && t(11, v = A.translucent), "border" in A && t(12, S = A.border), "autoscroll" in A && t(24, y = A.autoscroll), "$$scope" in A && t(29, o = A.$$scope); }, l.$$.update = () => { l.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/ - 436207617 && (o === null && t(0, o = X), o != null && X !== o && (t(28, L = (performance.now() - E) / 1e3 + o), t(19, fe = L.toFixed(1)), t(27, X = o))), l.$$.dirty[0] & /*eta_from_start, timer_diff*/ - 335544320 && t(17, V = L === null || L <= 0 || !F ? null : Math.min(F / L, 1)), l.$$.dirty[0] & /*progress*/ - 128 && w != null && t(18, le = !1), l.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ - 114816 && (w != null ? t(14, I = w.map((B) => { - if (B.index != null && B.length != null) - return B.index / B.length; - if (B.progress != null) - return B.progress; - })) : t(14, I = null), I ? (t(15, Q = I[I.length - 1]), W && (Q === 0 ? t(16, W.style.transition = "0", W) : t(16, W.style.transition = "150ms", W))) : t(15, Q = void 0)), l.$$.dirty[0] & /*status*/ - 16 && (c === "pending" ? ae() : D()), l.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ - 20979728 && q && d && (c === "pending" || c === "complete") && kc(q, y), l.$$.dirty[0] & /*status, message*/ + 436207617 && (a === null && t(0, a = F), a != null && F !== a && (t(28, R = (performance.now() - q) / 1e3 + a), t(19, ue = R.toFixed(1)), t(27, F = a))), l.$$.dirty[0] & /*eta_from_start, timer_diff*/ + 335544320 && t(17, G = R === null || R <= 0 || !I ? null : Math.min(I / R, 1)), l.$$.dirty[0] & /*progress*/ + 128 && g != null && t(18, _e = !1), l.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ + 114816 && (g != null ? t(14, U = g.map((A) => { + if (A.index != null && A.length != null) + return A.index / A.length; + if (A.progress != null) + return A.progress; + })) : t(14, U = null), U ? (t(15, X = U[U.length - 1]), O && (X === 0 ? t(16, O.style.transition = "0", O) : t(16, O.style.transition = "150ms", O))) : t(15, X = void 0)), l.$$.dirty[0] & /*status*/ + 16 && (c === "pending" ? oe() : D()), l.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ + 20979728 && z && _ && (c === "pending" || c === "complete") && Bc(z, y), l.$$.dirty[0] & /*status, message*/ 8388624, l.$$.dirty[0] & /*timer_diff*/ - 67108864 && t(20, n = F.toFixed(1)); + 67108864 && t(20, n = I.toFixed(1)); }, [ - o, + a, r, f, u, c, - _, - b, - w, + d, + h, g, + w, p, m, - C, + v, + S, z, - q, - I, - Q, - W, - V, - le, - fe, + U, + X, + O, + G, + _e, + ue, n, - a, - d, - h, + s, + _, + b, y, - E, + q, + I, F, - X, - L, - s, + R, + o, i, - Se, - Fe, - Pe + Ce, + Xe, + Ye ]; } -class yc extends ec { +class Mc extends ac { constructor(e) { - super(), tc( + super(), rc( this, e, - vc, - wc, - nc, + Ec, + zc, + fc, { i18n: 1, eta: 0, @@ -3567,30 +3567,30 @@ class yc extends ec { ); } } -const { setContext: z0, getContext: Cc } = window.__gradio__svelte__internal, Sc = "WORKER_PROXY_CONTEXT_KEY"; -function Ao() { - return Cc(Sc); +const { setContext: U0, getContext: Ac } = window.__gradio__svelte__internal, Lc = "WORKER_PROXY_CONTEXT_KEY"; +function js() { + return Ac(Lc); } -function zc(l) { +function Rc(l) { return l.host === window.location.host || l.host === "localhost:7860" || l.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194 l.host === "lite.local"; } -function Bo(l, e) { +function Hs(l, e) { const t = e.toLowerCase(); for (const [n, i] of Object.entries(l)) if (n.toLowerCase() === t) return i; } -function Mo(l) { +function Is(l) { if (l == null) return !1; const e = new URL(l, window.location.href); - return !(!zc(e) || e.protocol !== "http:" && e.protocol !== "https:"); + return !(!Rc(e) || e.protocol !== "http:" && e.protocol !== "https:"); } -async function qc(l) { - if (l == null || !Mo(l)) +async function Dc(l) { + if (l == null || !Is(l)) return l; - const e = Ao(); + const e = js(); if (e == null) return l; const n = new URL(l, window.location.href).pathname; @@ -3602,49 +3602,49 @@ async function qc(l) { }).then((i) => { if (i.status !== 200) throw new Error(`Failed to get file ${n} from the Wasm worker.`); - const s = new Blob([i.body], { - type: Bo(i.headers, "content-type") + const o = new Blob([i.body], { + type: Hs(i.headers, "content-type") }); - return URL.createObjectURL(s); + return URL.createObjectURL(o); }); } const { - SvelteComponent: Ec, - assign: nl, - check_outros: Lo, - compute_rest_props: ws, - create_slot: vi, - detach: pl, - element: Do, - empty: To, - exclude_internal_props: Ac, - get_all_dirty_from_scope: yi, - get_slot_changes: Ci, - get_spread_update: Ro, - group_outros: jo, - init: Bc, - insert: kl, - listen: Io, - prevent_default: Mc, - safe_not_equal: Lc, - set_attributes: ll, - transition_in: At, - transition_out: Bt, - update_slot_base: Si -} = window.__gradio__svelte__internal, { createEventDispatcher: Dc } = window.__gradio__svelte__internal; -function Tc(l) { - let e, t, n, i, s; - const a = ( + SvelteComponent: Tc, + assign: ul, + check_outros: Fs, + compute_rest_props: So, + create_slot: qi, + detach: Sl, + element: Xs, + empty: Ys, + exclude_internal_props: jc, + get_all_dirty_from_scope: Bi, + get_slot_changes: Ei, + get_spread_update: Us, + group_outros: Vs, + init: Hc, + insert: zl, + listen: Ns, + prevent_default: Ic, + safe_not_equal: Fc, + set_attributes: cl, + transition_in: Lt, + transition_out: Rt, + update_slot_base: Mi +} = window.__gradio__svelte__internal, { createEventDispatcher: Xc } = window.__gradio__svelte__internal; +function Yc(l) { + let e, t, n, i, o; + const s = ( /*#slots*/ l[8].default - ), r = vi( - a, + ), r = qi( + s, l, /*$$scope*/ l[7], null ); - let o = [ + let a = [ { href: ( /*href*/ l[0] @@ -3660,14 +3660,14 @@ function Tc(l) { /*$$restProps*/ l[6] ], f = {}; - for (let u = 0; u < o.length; u += 1) - f = nl(f, o[u]); + for (let u = 0; u < a.length; u += 1) + f = ul(f, a[u]); return { c() { - e = Do("a"), r && r.c(), ll(e, f); + e = Xs("a"), r && r.c(), cl(e, f); }, m(u, c) { - kl(u, e, c), r && r.m(e, null), n = !0, i || (s = Io( + zl(u, e, c), r && r.m(e, null), n = !0, i || (o = Ns( e, "click", /*dispatch*/ @@ -3676,24 +3676,24 @@ function Tc(l) { }, p(u, c) { r && r.p && (!n || c & /*$$scope*/ - 128) && Si( + 128) && Mi( r, - a, + s, u, /*$$scope*/ u[7], - n ? Ci( - a, + n ? Ei( + s, /*$$scope*/ u[7], c, null - ) : yi( + ) : Bi( /*$$scope*/ u[7] ), null - ), ll(e, f = Ro(o, [ + ), cl(e, f = Us(a, [ (!n || c & /*href*/ 1) && { href: ( /*href*/ @@ -3712,56 +3712,56 @@ function Tc(l) { ])); }, i(u) { - n || (At(r, u), n = !0); + n || (Lt(r, u), n = !0); }, o(u) { - Bt(r, u), n = !1; + Rt(r, u), n = !1; }, d(u) { - u && pl(e), r && r.d(u), i = !1, s(); + u && Sl(e), r && r.d(u), i = !1, o(); } }; } -function Rc(l) { +function Uc(l) { let e, t, n, i; - const s = [Ic, jc], a = []; - function r(o, f) { + const o = [Nc, Vc], s = []; + function r(a, f) { return ( /*is_downloading*/ - o[2] ? 0 : 1 + a[2] ? 0 : 1 ); } - return e = r(l), t = a[e] = s[e](l), { + return e = r(l), t = s[e] = o[e](l), { c() { - t.c(), n = To(); + t.c(), n = Ys(); }, - m(o, f) { - a[e].m(o, f), kl(o, n, f), i = !0; + m(a, f) { + s[e].m(a, f), zl(a, n, f), i = !0; }, - p(o, f) { + p(a, f) { let u = e; - e = r(o), e === u ? a[e].p(o, f) : (jo(), Bt(a[u], 1, 1, () => { - a[u] = null; - }), Lo(), t = a[e], t ? t.p(o, f) : (t = a[e] = s[e](o), t.c()), At(t, 1), t.m(n.parentNode, n)); + e = r(a), e === u ? s[e].p(a, f) : (Vs(), Rt(s[u], 1, 1, () => { + s[u] = null; + }), Fs(), t = s[e], t ? t.p(a, f) : (t = s[e] = o[e](a), t.c()), Lt(t, 1), t.m(n.parentNode, n)); }, - i(o) { - i || (At(t), i = !0); + i(a) { + i || (Lt(t), i = !0); }, - o(o) { - Bt(t), i = !1; + o(a) { + Rt(t), i = !1; }, - d(o) { - o && pl(n), a[e].d(o); + d(a) { + a && Sl(n), s[e].d(a); } }; } -function jc(l) { +function Vc(l) { let e, t, n, i; - const s = ( + const o = ( /*#slots*/ l[8].default - ), a = vi( - s, + ), s = qi( + o, l, /*$$scope*/ l[7], @@ -3774,39 +3774,39 @@ function jc(l) { /*href*/ l[0] ) } - ], o = {}; + ], a = {}; for (let f = 0; f < r.length; f += 1) - o = nl(o, r[f]); + a = ul(a, r[f]); return { c() { - e = Do("a"), a && a.c(), ll(e, o); + e = Xs("a"), s && s.c(), cl(e, a); }, m(f, u) { - kl(f, e, u), a && a.m(e, null), t = !0, n || (i = Io(e, "click", Mc( + zl(f, e, u), s && s.m(e, null), t = !0, n || (i = Ns(e, "click", Ic( /*wasm_click_handler*/ l[5] )), n = !0); }, p(f, u) { - a && a.p && (!t || u & /*$$scope*/ - 128) && Si( - a, + s && s.p && (!t || u & /*$$scope*/ + 128) && Mi( s, + o, f, /*$$scope*/ f[7], - t ? Ci( - s, + t ? Ei( + o, /*$$scope*/ f[7], u, null - ) : yi( + ) : Bi( /*$$scope*/ f[7] ), null - ), ll(e, o = Ro(r, [ + ), cl(e, a = Us(r, [ u & /*$$restProps*/ 64 && /*$$restProps*/ f[6], @@ -3818,22 +3818,22 @@ function jc(l) { ])); }, i(f) { - t || (At(a, f), t = !0); + t || (Lt(s, f), t = !0); }, o(f) { - Bt(a, f), t = !1; + Rt(s, f), t = !1; }, d(f) { - f && pl(e), a && a.d(f), n = !1, i(); + f && Sl(e), s && s.d(f), n = !1, i(); } }; } -function Ic(l) { +function Nc(l) { let e; const t = ( /*#slots*/ l[8].default - ), n = vi( + ), n = qi( t, l, /*$$scope*/ @@ -3844,24 +3844,24 @@ function Ic(l) { c() { n && n.c(); }, - m(i, s) { - n && n.m(i, s), e = !0; + m(i, o) { + n && n.m(i, o), e = !0; }, - p(i, s) { - n && n.p && (!e || s & /*$$scope*/ - 128) && Si( + p(i, o) { + n && n.p && (!e || o & /*$$scope*/ + 128) && Mi( n, t, i, /*$$scope*/ i[7], - e ? Ci( + e ? Ei( t, /*$$scope*/ i[7], - s, + o, null - ) : yi( + ) : Bi( /*$$scope*/ i[7] ), @@ -3869,145 +3869,145 @@ function Ic(l) { ); }, i(i) { - e || (At(n, i), e = !0); + e || (Lt(n, i), e = !0); }, o(i) { - Bt(n, i), e = !1; + Rt(n, i), e = !1; }, d(i) { n && n.d(i); } }; } -function Fc(l) { - let e, t, n, i, s; - const a = [Rc, Tc], r = []; - function o(f, u) { +function Oc(l) { + let e, t, n, i, o; + const s = [Uc, Yc], r = []; + function a(f, u) { return u & /*href*/ 1 && (e = null), e == null && (e = !!/*worker_proxy*/ - (f[4] && Mo( + (f[4] && Is( /*href*/ f[0] ))), e ? 0 : 1; } - return t = o(l, -1), n = r[t] = a[t](l), { + return t = a(l, -1), n = r[t] = s[t](l), { c() { - n.c(), i = To(); + n.c(), i = Ys(); }, m(f, u) { - r[t].m(f, u), kl(f, i, u), s = !0; + r[t].m(f, u), zl(f, i, u), o = !0; }, p(f, [u]) { let c = t; - t = o(f, u), t === c ? r[t].p(f, u) : (jo(), Bt(r[c], 1, 1, () => { + t = a(f, u), t === c ? r[t].p(f, u) : (Vs(), Rt(r[c], 1, 1, () => { r[c] = null; - }), Lo(), n = r[t], n ? n.p(f, u) : (n = r[t] = a[t](f), n.c()), At(n, 1), n.m(i.parentNode, i)); + }), Fs(), n = r[t], n ? n.p(f, u) : (n = r[t] = s[t](f), n.c()), Lt(n, 1), n.m(i.parentNode, i)); }, i(f) { - s || (At(n), s = !0); + o || (Lt(n), o = !0); }, o(f) { - Bt(n), s = !1; + Rt(n), o = !1; }, d(f) { - f && pl(i), r[t].d(f); + f && Sl(i), r[t].d(f); } }; } -function Hc(l, e, t) { +function Wc(l, e, t) { const n = ["href", "download"]; - let i = ws(e, n), { $$slots: s = {}, $$scope: a } = e; - var r = this && this.__awaiter || function(b, h, w, g) { + let i = So(e, n), { $$slots: o = {}, $$scope: s } = e; + var r = this && this.__awaiter || function(h, b, g, w) { function p(m) { - return m instanceof w ? m : new w(function(C) { - C(m); + return m instanceof g ? m : new g(function(v) { + v(m); }); } - return new (w || (w = Promise))(function(m, C) { - function z(v) { + return new (g || (g = Promise))(function(m, v) { + function S(k) { try { - q(g.next(v)); - } catch (E) { - C(E); + z(w.next(k)); + } catch (q) { + v(q); } } - function y(v) { + function y(k) { try { - q(g.throw(v)); - } catch (E) { - C(E); + z(w.throw(k)); + } catch (q) { + v(q); } } - function q(v) { - v.done ? m(v.value) : p(v.value).then(z, y); + function z(k) { + k.done ? m(k.value) : p(k.value).then(S, y); } - q((g = g.apply(b, h || [])).next()); + z((w = w.apply(h, b || [])).next()); }); }; - let { href: o = void 0 } = e, { download: f } = e; - const u = Dc(); + let { href: a = void 0 } = e, { download: f } = e; + const u = Xc(); let c = !1; - const d = Ao(); - function _() { + const _ = js(); + function d() { return r(this, void 0, void 0, function* () { if (c) return; - if (u("click"), o == null) + if (u("click"), a == null) throw new Error("href is not defined."); - if (d == null) + if (_ == null) throw new Error("Wasm worker proxy is not available."); - const h = new URL(o, window.location.href).pathname; - t(2, c = !0), d.httpRequest({ + const b = new URL(a, window.location.href).pathname; + t(2, c = !0), _.httpRequest({ method: "GET", - path: h, + path: b, headers: {}, query_string: "" - }).then((w) => { - if (w.status !== 200) - throw new Error(`Failed to get file ${h} from the Wasm worker.`); - const g = new Blob( - [w.body], + }).then((g) => { + if (g.status !== 200) + throw new Error(`Failed to get file ${b} from the Wasm worker.`); + const w = new Blob( + [g.body], { - type: Bo(w.headers, "content-type") + type: Hs(g.headers, "content-type") } - ), p = URL.createObjectURL(g), m = document.createElement("a"); + ), p = URL.createObjectURL(w), m = document.createElement("a"); m.href = p, m.download = f, m.click(), URL.revokeObjectURL(p); }).finally(() => { t(2, c = !1); }); }); } - return l.$$set = (b) => { - e = nl(nl({}, e), Ac(b)), t(6, i = ws(e, n)), "href" in b && t(0, o = b.href), "download" in b && t(1, f = b.download), "$$scope" in b && t(7, a = b.$$scope); + return l.$$set = (h) => { + e = ul(ul({}, e), jc(h)), t(6, i = So(e, n)), "href" in h && t(0, a = h.href), "download" in h && t(1, f = h.download), "$$scope" in h && t(7, s = h.$$scope); }, [ - o, + a, f, c, u, - d, _, + d, i, - a, - s + s, + o ]; } -class Xc extends Ec { +class Pc extends Tc { constructor(e) { - super(), Bc(this, e, Hc, Fc, Lc, { href: 0, download: 1 }); + super(), Hc(this, e, Wc, Oc, Fc, { href: 0, download: 1 }); } } -var Yc = Object.defineProperty, Uc = (l, e, t) => e in l ? Yc(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, Ke = (l, e, t) => (Uc(l, typeof e != "symbol" ? e + "" : e, t), t), Fo = (l, e, t) => { +var Zc = Object.defineProperty, Kc = (l, e, t) => e in l ? Zc(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, Qe = (l, e, t) => (Kc(l, typeof e != "symbol" ? e + "" : e, t), t), Os = (l, e, t) => { if (!e.has(l)) throw TypeError("Cannot " + t); -}, sn = (l, e, t) => (Fo(l, e, "read from private field"), t ? t.call(l) : e.get(l)), Nc = (l, e, t) => { +}, rn = (l, e, t) => (Os(l, e, "read from private field"), t ? t.call(l) : e.get(l)), Gc = (l, e, t) => { if (e.has(l)) throw TypeError("Cannot add the same private member more than once"); e instanceof WeakSet ? e.add(l) : e.set(l, t); -}, Vc = (l, e, t, n) => (Fo(l, e, "write to private field"), e.set(l, t), t), st; +}, Jc = (l, e, t, n) => (Os(l, e, "write to private field"), e.set(l, t), t), rt; new Intl.Collator(0, { numeric: 1 }).compare; -async function Oc(l, e) { +async function Qc(l, e) { return l.map( - (t) => new Wc({ + (t) => new xc({ path: t.name, orig_name: t.name, blob: t, @@ -4017,219 +4017,219 @@ async function Oc(l, e) { }) ); } -class Wc { +class xc { constructor({ path: e, url: t, orig_name: n, size: i, - blob: s, - is_stream: a, + blob: o, + is_stream: s, mime_type: r, - alt_text: o + alt_text: a }) { - Ke(this, "path"), Ke(this, "url"), Ke(this, "orig_name"), Ke(this, "size"), Ke(this, "blob"), Ke(this, "is_stream"), Ke(this, "mime_type"), Ke(this, "alt_text"), Ke(this, "meta", { _type: "gradio.FileData" }), this.path = e, this.url = t, this.orig_name = n, this.size = i, this.blob = t ? void 0 : s, this.is_stream = a, this.mime_type = r, this.alt_text = o; + Qe(this, "path"), Qe(this, "url"), Qe(this, "orig_name"), Qe(this, "size"), Qe(this, "blob"), Qe(this, "is_stream"), Qe(this, "mime_type"), Qe(this, "alt_text"), Qe(this, "meta", { _type: "gradio.FileData" }), this.path = e, this.url = t, this.orig_name = n, this.size = i, this.blob = t ? void 0 : o, this.is_stream = s, this.mime_type = r, this.alt_text = a; } } typeof process < "u" && process.versions && process.versions.node; -class q0 extends TransformStream { +class V0 extends TransformStream { /** Constructs a new instance. */ constructor(e = { allowCR: !1 }) { super({ transform: (t, n) => { - for (t = sn(this, st) + t; ; ) { + for (t = rn(this, rt) + t; ; ) { const i = t.indexOf(` -`), s = e.allowCR ? t.indexOf("\r") : -1; - if (s !== -1 && s !== t.length - 1 && (i === -1 || i - 1 > s)) { - n.enqueue(t.slice(0, s)), t = t.slice(s + 1); +`), o = e.allowCR ? t.indexOf("\r") : -1; + if (o !== -1 && o !== t.length - 1 && (i === -1 || i - 1 > o)) { + n.enqueue(t.slice(0, o)), t = t.slice(o + 1); continue; } if (i === -1) break; - const a = t[i - 1] === "\r" ? i - 1 : i; - n.enqueue(t.slice(0, a)), t = t.slice(i + 1); + const s = t[i - 1] === "\r" ? i - 1 : i; + n.enqueue(t.slice(0, s)), t = t.slice(i + 1); } - Vc(this, st, t); + Jc(this, rt, t); }, flush: (t) => { - if (sn(this, st) === "") + if (rn(this, rt) === "") return; - const n = e.allowCR && sn(this, st).endsWith("\r") ? sn(this, st).slice(0, -1) : sn(this, st); + const n = e.allowCR && rn(this, rt).endsWith("\r") ? rn(this, rt).slice(0, -1) : rn(this, rt); t.enqueue(n); } - }), Nc(this, st, ""); + }), Gc(this, rt, ""); } } -st = /* @__PURE__ */ new WeakMap(); +rt = /* @__PURE__ */ new WeakMap(); const { - SvelteComponent: Pc, - append: me, - attr: vt, - detach: Ho, - element: yt, - init: Zc, - insert: Xo, - noop: ps, - safe_not_equal: Kc, - set_data: il, - set_style: Vl, - space: _i, - text: Jt, - toggle_class: ks -} = window.__gradio__svelte__internal, { onMount: Gc, createEventDispatcher: Jc, onDestroy: Qc } = window.__gradio__svelte__internal; -function vs(l) { - let e, t, n, i, s = _n( + SvelteComponent: $c, + append: be, + attr: Ct, + detach: Ws, + element: St, + init: e_, + insert: Ps, + noop: zo, + safe_not_equal: t_, + set_data: _l, + set_style: Gl, + space: bi, + text: Qt, + toggle_class: qo +} = window.__gradio__svelte__internal, { onMount: n_, createEventDispatcher: l_, onDestroy: i_ } = window.__gradio__svelte__internal; +function Bo(l) { + let e, t, n, i, o = mn( /*file_to_display*/ l[2] - ) + "", a, r, o, f, u = ( + ) + "", s, r, a, f, u = ( /*file_to_display*/ l[2].orig_name + "" ), c; return { c() { - e = yt("div"), t = yt("span"), n = yt("div"), i = yt("progress"), a = Jt(s), o = _i(), f = yt("span"), c = Jt(u), Vl(i, "visibility", "hidden"), Vl(i, "height", "0"), Vl(i, "width", "0"), i.value = r = _n( + e = St("div"), t = St("span"), n = St("div"), i = St("progress"), s = Qt(o), a = bi(), f = St("span"), c = Qt(u), Gl(i, "visibility", "hidden"), Gl(i, "height", "0"), Gl(i, "width", "0"), i.value = r = mn( /*file_to_display*/ l[2] - ), vt(i, "max", "100"), vt(i, "class", "svelte-cr2edf"), vt(n, "class", "progress-bar svelte-cr2edf"), vt(f, "class", "file-name svelte-cr2edf"), vt(e, "class", "file svelte-cr2edf"); + ), Ct(i, "max", "100"), Ct(i, "class", "svelte-cr2edf"), Ct(n, "class", "progress-bar svelte-cr2edf"), Ct(f, "class", "file-name svelte-cr2edf"), Ct(e, "class", "file svelte-cr2edf"); }, - m(d, _) { - Xo(d, e, _), me(e, t), me(t, n), me(n, i), me(i, a), me(e, o), me(e, f), me(f, c); + m(_, d) { + Ps(_, e, d), be(e, t), be(t, n), be(n, i), be(i, s), be(e, a), be(e, f), be(f, c); }, - p(d, _) { - _ & /*file_to_display*/ - 4 && s !== (s = _n( + p(_, d) { + d & /*file_to_display*/ + 4 && o !== (o = mn( /*file_to_display*/ - d[2] - ) + "") && il(a, s), _ & /*file_to_display*/ - 4 && r !== (r = _n( + _[2] + ) + "") && _l(s, o), d & /*file_to_display*/ + 4 && r !== (r = mn( /*file_to_display*/ - d[2] - )) && (i.value = r), _ & /*file_to_display*/ + _[2] + )) && (i.value = r), d & /*file_to_display*/ 4 && u !== (u = /*file_to_display*/ - d[2].orig_name + "") && il(c, u); + _[2].orig_name + "") && _l(c, u); }, - d(d) { - d && Ho(e); + d(_) { + _ && Ws(e); } }; } -function xc(l) { +function o_(l) { let e, t, n, i = ( /*files_with_progress*/ l[0].length + "" - ), s, a, r = ( + ), o, s, r = ( /*files_with_progress*/ l[0].length > 1 ? "files" : "file" - ), o, f, u, c = ( + ), a, f, u, c = ( /*file_to_display*/ - l[2] && vs(l) + l[2] && Bo(l) ); return { c() { - e = yt("div"), t = yt("span"), n = Jt("Uploading "), s = Jt(i), a = _i(), o = Jt(r), f = Jt("..."), u = _i(), c && c.c(), vt(t, "class", "uploading svelte-cr2edf"), vt(e, "class", "wrap svelte-cr2edf"), ks( + e = St("div"), t = St("span"), n = Qt("Uploading "), o = Qt(i), s = bi(), a = Qt(r), f = Qt("..."), u = bi(), c && c.c(), Ct(t, "class", "uploading svelte-cr2edf"), Ct(e, "class", "wrap svelte-cr2edf"), qo( e, "progress", /*progress*/ l[1] ); }, - m(d, _) { - Xo(d, e, _), me(e, t), me(t, n), me(t, s), me(t, a), me(t, o), me(t, f), me(e, u), c && c.m(e, null); + m(_, d) { + Ps(_, e, d), be(e, t), be(t, n), be(t, o), be(t, s), be(t, a), be(t, f), be(e, u), c && c.m(e, null); }, - p(d, [_]) { - _ & /*files_with_progress*/ + p(_, [d]) { + d & /*files_with_progress*/ 1 && i !== (i = /*files_with_progress*/ - d[0].length + "") && il(s, i), _ & /*files_with_progress*/ + _[0].length + "") && _l(o, i), d & /*files_with_progress*/ 1 && r !== (r = /*files_with_progress*/ - d[0].length > 1 ? "files" : "file") && il(o, r), /*file_to_display*/ - d[2] ? c ? c.p(d, _) : (c = vs(d), c.c(), c.m(e, null)) : c && (c.d(1), c = null), _ & /*progress*/ - 2 && ks( + _[0].length > 1 ? "files" : "file") && _l(a, r), /*file_to_display*/ + _[2] ? c ? c.p(_, d) : (c = Bo(_), c.c(), c.m(e, null)) : c && (c.d(1), c = null), d & /*progress*/ + 2 && qo( e, "progress", /*progress*/ - d[1] + _[1] ); }, - i: ps, - o: ps, - d(d) { - d && Ho(e), c && c.d(); + i: zo, + o: zo, + d(_) { + _ && Ws(e), c && c.d(); } }; } -function _n(l) { +function mn(l) { return l.progress * 100 / (l.size || 0) || 0; } -function $c(l) { +function s_(l) { let e = 0; return l.forEach((t) => { - e += _n(t); + e += mn(t); }), document.documentElement.style.setProperty("--upload-progress-width", (e / l.length).toFixed(2) + "%"), e / l.length; } -function e_(l, e, t) { - var n = this && this.__awaiter || function(h, w, g, p) { - function m(C) { - return C instanceof g ? C : new g(function(z) { - z(C); +function a_(l, e, t) { + var n = this && this.__awaiter || function(b, g, w, p) { + function m(v) { + return v instanceof w ? v : new w(function(S) { + S(v); }); } - return new (g || (g = Promise))(function(C, z) { - function y(E) { + return new (w || (w = Promise))(function(v, S) { + function y(q) { try { - v(p.next(E)); - } catch (F) { - z(F); + k(p.next(q)); + } catch (I) { + S(I); } } - function q(E) { + function z(q) { try { - v(p.throw(E)); - } catch (F) { - z(F); + k(p.throw(q)); + } catch (I) { + S(I); } } - function v(E) { - E.done ? C(E.value) : m(E.value).then(y, q); + function k(q) { + q.done ? v(q.value) : m(q.value).then(y, z); } - v((p = p.apply(h, w || [])).next()); + k((p = p.apply(b, g || [])).next()); }); }; - let { upload_id: i } = e, { root: s } = e, { files: a } = e, { stream_handler: r } = e, o, f = !1, u, c, d = a.map((h) => Object.assign(Object.assign({}, h), { progress: 0 })); - const _ = Jc(); - function b(h, w) { - t(0, d = d.map((g) => (g.orig_name === h && (g.progress += w), g))); + let { upload_id: i } = e, { root: o } = e, { files: s } = e, { stream_handler: r } = e, a, f = !1, u, c, _ = s.map((b) => Object.assign(Object.assign({}, b), { progress: 0 })); + const d = l_(); + function h(b, g) { + t(0, _ = _.map((w) => (w.orig_name === b && (w.progress += g), w))); } - return Gc(() => n(void 0, void 0, void 0, function* () { - if (o = yield r(new URL(`${s}/upload_progress?upload_id=${i}`)), o == null) + return n_(() => n(void 0, void 0, void 0, function* () { + if (a = yield r(new URL(`${o}/upload_progress?upload_id=${i}`)), a == null) throw new Error("Event source is not defined"); - o.onmessage = function(h) { + a.onmessage = function(b) { return n(this, void 0, void 0, function* () { - const w = JSON.parse(h.data); - f || t(1, f = !0), w.msg === "done" ? (o == null || o.close(), _("done")) : (t(7, u = w), b(w.orig_name, w.chunk_size)); + const g = JSON.parse(b.data); + f || t(1, f = !0), g.msg === "done" ? (a == null || a.close(), d("done")) : (t(7, u = g), h(g.orig_name, g.chunk_size)); }); }; - })), Qc(() => { - (o != null || o != null) && o.close(); - }), l.$$set = (h) => { - "upload_id" in h && t(3, i = h.upload_id), "root" in h && t(4, s = h.root), "files" in h && t(5, a = h.files), "stream_handler" in h && t(6, r = h.stream_handler); + })), i_(() => { + (a != null || a != null) && a.close(); + }), l.$$set = (b) => { + "upload_id" in b && t(3, i = b.upload_id), "root" in b && t(4, o = b.root), "files" in b && t(5, s = b.files), "stream_handler" in b && t(6, r = b.stream_handler); }, l.$$.update = () => { l.$$.dirty & /*files_with_progress*/ - 1 && $c(d), l.$$.dirty & /*current_file_upload, files_with_progress*/ - 129 && t(2, c = u || d[0]); + 1 && s_(_), l.$$.dirty & /*current_file_upload, files_with_progress*/ + 129 && t(2, c = u || _[0]); }, [ - d, + _, f, c, i, + o, s, - a, r, u ]; } -class t_ extends Pc { +class r_ extends $c { constructor(e) { - super(), Zc(this, e, e_, xc, Kc, { + super(), e_(this, e, a_, o_, t_, { upload_id: 3, root: 4, files: 5, @@ -4238,43 +4238,43 @@ class t_ extends Pc { } } const { - SvelteComponent: n_, - append: ys, - attr: se, - binding_callbacks: l_, - bubble: bt, - check_outros: Yo, - create_component: i_, - create_slot: Uo, - destroy_component: s_, - detach: vl, - element: di, - empty: No, - get_all_dirty_from_scope: Vo, - get_slot_changes: Oo, - group_outros: Wo, - init: o_, - insert: yl, - listen: ke, - mount_component: a_, - prevent_default: gt, - run_all: r_, - safe_not_equal: f_, - set_style: Po, - space: u_, - stop_propagation: wt, - toggle_class: ne, - transition_in: ut, - transition_out: Mt, - update_slot_base: Zo -} = window.__gradio__svelte__internal, { createEventDispatcher: c_, tick: __ } = window.__gradio__svelte__internal; -function d_(l) { - let e, t, n, i, s, a, r, o, f, u, c; - const d = ( + SvelteComponent: f_, + append: Eo, + attr: re, + binding_callbacks: u_, + bubble: wt, + check_outros: Zs, + create_component: c_, + create_slot: Ks, + destroy_component: __, + detach: ql, + element: wi, + empty: Gs, + get_all_dirty_from_scope: Js, + get_slot_changes: Qs, + group_outros: xs, + init: d_, + insert: Bl, + listen: pe, + mount_component: h_, + prevent_default: pt, + run_all: m_, + safe_not_equal: g_, + set_style: $s, + space: b_, + stop_propagation: vt, + toggle_class: le, + transition_in: dt, + transition_out: Dt, + update_slot_base: ea +} = window.__gradio__svelte__internal, { createEventDispatcher: w_, tick: p_ } = window.__gradio__svelte__internal; +function v_(l) { + let e, t, n, i, o, s, r, a, f, u, c; + const _ = ( /*#slots*/ l[26].default - ), _ = Uo( - d, + ), d = Ks( + _, l, /*$$scope*/ l[25], @@ -4282,93 +4282,93 @@ function d_(l) { ); return { c() { - e = di("button"), _ && _.c(), t = u_(), n = di("input"), se(n, "aria-label", "file upload"), se(n, "data-testid", "file-upload"), se(n, "type", "file"), se(n, "accept", i = /*accept_file_types*/ - l[16] || void 0), n.multiple = s = /*file_count*/ - l[6] === "multiple" || void 0, se(n, "webkitdirectory", a = /*file_count*/ - l[6] === "directory" || void 0), se(n, "mozdirectory", r = /*file_count*/ - l[6] === "directory" || void 0), se(n, "class", "svelte-1s26xmt"), se(e, "tabindex", o = /*hidden*/ - l[9] ? -1 : 0), se(e, "class", "svelte-1s26xmt"), ne( + e = wi("button"), d && d.c(), t = b_(), n = wi("input"), re(n, "aria-label", "file upload"), re(n, "data-testid", "file-upload"), re(n, "type", "file"), re(n, "accept", i = /*accept_file_types*/ + l[16] || void 0), n.multiple = o = /*file_count*/ + l[6] === "multiple" || void 0, re(n, "webkitdirectory", s = /*file_count*/ + l[6] === "directory" || void 0), re(n, "mozdirectory", r = /*file_count*/ + l[6] === "directory" || void 0), re(n, "class", "svelte-1s26xmt"), re(e, "tabindex", a = /*hidden*/ + l[9] ? -1 : 0), re(e, "class", "svelte-1s26xmt"), le( e, "hidden", /*hidden*/ l[9] - ), ne( + ), le( e, "center", /*center*/ l[4] - ), ne( + ), le( e, "boundedheight", /*boundedheight*/ l[3] - ), ne( + ), le( e, "flex", /*flex*/ l[5] - ), ne( + ), le( e, "disable_click", /*disable_click*/ l[7] - ), Po(e, "height", "100%"); + ), $s(e, "height", "100%"); }, - m(b, h) { - yl(b, e, h), _ && _.m(e, null), ys(e, t), ys(e, n), l[34](n), f = !0, u || (c = [ - ke( + m(h, b) { + Bl(h, e, b), d && d.m(e, null), Eo(e, t), Eo(e, n), l[34](n), f = !0, u || (c = [ + pe( n, "change", /*load_files_from_upload*/ l[18] ), - ke(e, "drag", wt(gt( + pe(e, "drag", vt(pt( /*drag_handler*/ l[27] ))), - ke(e, "dragstart", wt(gt( + pe(e, "dragstart", vt(pt( /*dragstart_handler*/ l[28] ))), - ke(e, "dragend", wt(gt( + pe(e, "dragend", vt(pt( /*dragend_handler*/ l[29] ))), - ke(e, "dragover", wt(gt( + pe(e, "dragover", vt(pt( /*dragover_handler*/ l[30] ))), - ke(e, "dragenter", wt(gt( + pe(e, "dragenter", vt(pt( /*dragenter_handler*/ l[31] ))), - ke(e, "dragleave", wt(gt( + pe(e, "dragleave", vt(pt( /*dragleave_handler*/ l[32] ))), - ke(e, "drop", wt(gt( + pe(e, "drop", vt(pt( /*drop_handler*/ l[33] ))), - ke( + pe( e, "click", /*open_file_upload*/ l[13] ), - ke( + pe( e, "drop", /*loadFilesFromDrop*/ l[19] ), - ke( + pe( e, "dragenter", /*updateDragging*/ l[17] ), - ke( + pe( e, "dragleave", /*updateDragging*/ @@ -4376,113 +4376,113 @@ function d_(l) { ) ], u = !0); }, - p(b, h) { - _ && _.p && (!f || h[0] & /*$$scope*/ - 33554432) && Zo( - _, + p(h, b) { + d && d.p && (!f || b[0] & /*$$scope*/ + 33554432) && ea( d, - b, + _, + h, /*$$scope*/ - b[25], - f ? Oo( - d, + h[25], + f ? Qs( + _, /*$$scope*/ - b[25], - h, + h[25], + b, null - ) : Vo( + ) : Js( /*$$scope*/ - b[25] + h[25] ), null - ), (!f || h[0] & /*accept_file_types*/ + ), (!f || b[0] & /*accept_file_types*/ 65536 && i !== (i = /*accept_file_types*/ - b[16] || void 0)) && se(n, "accept", i), (!f || h[0] & /*file_count*/ + h[16] || void 0)) && re(n, "accept", i), (!f || b[0] & /*file_count*/ + 64 && o !== (o = /*file_count*/ + h[6] === "multiple" || void 0)) && (n.multiple = o), (!f || b[0] & /*file_count*/ 64 && s !== (s = /*file_count*/ - b[6] === "multiple" || void 0)) && (n.multiple = s), (!f || h[0] & /*file_count*/ - 64 && a !== (a = /*file_count*/ - b[6] === "directory" || void 0)) && se(n, "webkitdirectory", a), (!f || h[0] & /*file_count*/ + h[6] === "directory" || void 0)) && re(n, "webkitdirectory", s), (!f || b[0] & /*file_count*/ 64 && r !== (r = /*file_count*/ - b[6] === "directory" || void 0)) && se(n, "mozdirectory", r), (!f || h[0] & /*hidden*/ - 512 && o !== (o = /*hidden*/ - b[9] ? -1 : 0)) && se(e, "tabindex", o), (!f || h[0] & /*hidden*/ - 512) && ne( + h[6] === "directory" || void 0)) && re(n, "mozdirectory", r), (!f || b[0] & /*hidden*/ + 512 && a !== (a = /*hidden*/ + h[9] ? -1 : 0)) && re(e, "tabindex", a), (!f || b[0] & /*hidden*/ + 512) && le( e, "hidden", /*hidden*/ - b[9] - ), (!f || h[0] & /*center*/ - 16) && ne( + h[9] + ), (!f || b[0] & /*center*/ + 16) && le( e, "center", /*center*/ - b[4] - ), (!f || h[0] & /*boundedheight*/ - 8) && ne( + h[4] + ), (!f || b[0] & /*boundedheight*/ + 8) && le( e, "boundedheight", /*boundedheight*/ - b[3] - ), (!f || h[0] & /*flex*/ - 32) && ne( + h[3] + ), (!f || b[0] & /*flex*/ + 32) && le( e, "flex", /*flex*/ - b[5] - ), (!f || h[0] & /*disable_click*/ - 128) && ne( + h[5] + ), (!f || b[0] & /*disable_click*/ + 128) && le( e, "disable_click", /*disable_click*/ - b[7] + h[7] ); }, - i(b) { - f || (ut(_, b), f = !0); + i(h) { + f || (dt(d, h), f = !0); }, - o(b) { - Mt(_, b), f = !1; + o(h) { + Dt(d, h), f = !1; }, - d(b) { - b && vl(e), _ && _.d(b), l[34](null), u = !1, r_(c); + d(h) { + h && ql(e), d && d.d(h), l[34](null), u = !1, m_(c); } }; } -function h_(l) { +function k_(l) { let e, t, n = !/*hidden*/ - l[9] && Cs(l); + l[9] && Mo(l); return { c() { - n && n.c(), e = No(); + n && n.c(), e = Gs(); }, - m(i, s) { - n && n.m(i, s), yl(i, e, s), t = !0; + m(i, o) { + n && n.m(i, o), Bl(i, e, o), t = !0; }, - p(i, s) { + p(i, o) { /*hidden*/ - i[9] ? n && (Wo(), Mt(n, 1, 1, () => { + i[9] ? n && (xs(), Dt(n, 1, 1, () => { n = null; - }), Yo()) : n ? (n.p(i, s), s[0] & /*hidden*/ - 512 && ut(n, 1)) : (n = Cs(i), n.c(), ut(n, 1), n.m(e.parentNode, e)); + }), Zs()) : n ? (n.p(i, o), o[0] & /*hidden*/ + 512 && dt(n, 1)) : (n = Mo(i), n.c(), dt(n, 1), n.m(e.parentNode, e)); }, i(i) { - t || (ut(n), t = !0); + t || (dt(n), t = !0); }, o(i) { - Mt(n), t = !1; + Dt(n), t = !1; }, d(i) { - i && vl(e), n && n.d(i); + i && ql(e), n && n.d(i); } }; } -function m_(l) { - let e, t, n, i, s; - const a = ( +function y_(l) { + let e, t, n, i, o; + const s = ( /*#slots*/ l[26].default - ), r = Uo( - a, + ), r = Ks( + s, l, /*$$scope*/ l[25], @@ -4490,98 +4490,98 @@ function m_(l) { ); return { c() { - e = di("button"), r && r.c(), se(e, "tabindex", t = /*hidden*/ - l[9] ? -1 : 0), se(e, "class", "svelte-1s26xmt"), ne( + e = wi("button"), r && r.c(), re(e, "tabindex", t = /*hidden*/ + l[9] ? -1 : 0), re(e, "class", "svelte-1s26xmt"), le( e, "hidden", /*hidden*/ l[9] - ), ne( + ), le( e, "center", /*center*/ l[4] - ), ne( + ), le( e, "boundedheight", /*boundedheight*/ l[3] - ), ne( + ), le( e, "flex", /*flex*/ l[5] - ), Po(e, "height", "100%"); + ), $s(e, "height", "100%"); }, - m(o, f) { - yl(o, e, f), r && r.m(e, null), n = !0, i || (s = ke( + m(a, f) { + Bl(a, e, f), r && r.m(e, null), n = !0, i || (o = pe( e, "click", /*paste_clipboard*/ l[12] ), i = !0); }, - p(o, f) { + p(a, f) { r && r.p && (!n || f[0] & /*$$scope*/ - 33554432) && Zo( + 33554432) && ea( r, + s, a, - o, /*$$scope*/ - o[25], - n ? Oo( - a, + a[25], + n ? Qs( + s, /*$$scope*/ - o[25], + a[25], f, null - ) : Vo( + ) : Js( /*$$scope*/ - o[25] + a[25] ), null ), (!n || f[0] & /*hidden*/ 512 && t !== (t = /*hidden*/ - o[9] ? -1 : 0)) && se(e, "tabindex", t), (!n || f[0] & /*hidden*/ - 512) && ne( + a[9] ? -1 : 0)) && re(e, "tabindex", t), (!n || f[0] & /*hidden*/ + 512) && le( e, "hidden", /*hidden*/ - o[9] + a[9] ), (!n || f[0] & /*center*/ - 16) && ne( + 16) && le( e, "center", /*center*/ - o[4] + a[4] ), (!n || f[0] & /*boundedheight*/ - 8) && ne( + 8) && le( e, "boundedheight", /*boundedheight*/ - o[3] + a[3] ), (!n || f[0] & /*flex*/ - 32) && ne( + 32) && le( e, "flex", /*flex*/ - o[5] + a[5] ); }, - i(o) { - n || (ut(r, o), n = !0); + i(a) { + n || (dt(r, a), n = !0); }, - o(o) { - Mt(r, o), n = !1; + o(a) { + Dt(r, a), n = !1; }, - d(o) { - o && vl(e), r && r.d(o), i = !1, s(); + d(a) { + a && ql(e), r && r.d(a), i = !1, o(); } }; } -function Cs(l) { +function Mo(l) { let e, t; - return e = new t_({ + return e = new r_({ props: { root: ( /*root*/ @@ -4602,72 +4602,72 @@ function Cs(l) { } }), { c() { - i_(e.$$.fragment); + c_(e.$$.fragment); }, m(n, i) { - a_(e, n, i), t = !0; + h_(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*root*/ - 256 && (s.root = /*root*/ + 256 && (o.root = /*root*/ n[8]), i[0] & /*upload_id*/ - 16384 && (s.upload_id = /*upload_id*/ + 16384 && (o.upload_id = /*upload_id*/ n[14]), i[0] & /*file_data*/ - 32768 && (s.files = /*file_data*/ + 32768 && (o.files = /*file_data*/ n[15]), i[0] & /*stream_handler*/ - 2048 && (s.stream_handler = /*stream_handler*/ - n[11]), e.$set(s); + 2048 && (o.stream_handler = /*stream_handler*/ + n[11]), e.$set(o); }, i(n) { - t || (ut(e.$$.fragment, n), t = !0); + t || (dt(e.$$.fragment, n), t = !0); }, o(n) { - Mt(e.$$.fragment, n), t = !1; + Dt(e.$$.fragment, n), t = !1; }, d(n) { - s_(e, n); + __(e, n); } }; } -function b_(l) { +function C_(l) { let e, t, n, i; - const s = [m_, h_, d_], a = []; - function r(o, f) { + const o = [y_, k_, v_], s = []; + function r(a, f) { return ( /*filetype*/ - o[0] === "clipboard" ? 0 : ( + a[0] === "clipboard" ? 0 : ( /*uploading*/ - o[1] && /*show_progress*/ - o[10] ? 1 : 2 + a[1] && /*show_progress*/ + a[10] ? 1 : 2 ) ); } - return e = r(l), t = a[e] = s[e](l), { + return e = r(l), t = s[e] = o[e](l), { c() { - t.c(), n = No(); + t.c(), n = Gs(); }, - m(o, f) { - a[e].m(o, f), yl(o, n, f), i = !0; + m(a, f) { + s[e].m(a, f), Bl(a, n, f), i = !0; }, - p(o, f) { + p(a, f) { let u = e; - e = r(o), e === u ? a[e].p(o, f) : (Wo(), Mt(a[u], 1, 1, () => { - a[u] = null; - }), Yo(), t = a[e], t ? t.p(o, f) : (t = a[e] = s[e](o), t.c()), ut(t, 1), t.m(n.parentNode, n)); + e = r(a), e === u ? s[e].p(a, f) : (xs(), Dt(s[u], 1, 1, () => { + s[u] = null; + }), Zs(), t = s[e], t ? t.p(a, f) : (t = s[e] = o[e](a), t.c()), dt(t, 1), t.m(n.parentNode, n)); }, - i(o) { - i || (ut(t), i = !0); + i(a) { + i || (dt(t), i = !0); }, - o(o) { - Mt(t), i = !1; + o(a) { + Dt(t), i = !1; }, - d(o) { - o && vl(n), a[e].d(o); + d(a) { + a && ql(n), s[e].d(a); } }; } -function g_(l, e, t) { +function S_(l, e, t) { if (!l || l === "*" || l === "file/*" || Array.isArray(l) && l.some((i) => i === "*" || i === "file/*")) return !0; let n; @@ -4678,183 +4678,183 @@ function g_(l, e, t) { else return !1; return n.includes(e) || n.some((i) => { - const [s] = i.split("/").map((a) => a.trim()); - return i.endsWith("/*") && t.startsWith(s + "/"); + const [o] = i.split("/").map((s) => s.trim()); + return i.endsWith("/*") && t.startsWith(o + "/"); }); } -function w_(l, e, t) { +function z_(l, e, t) { let { $$slots: n = {}, $$scope: i } = e; - var s = this && this.__awaiter || function(k, H, O, G) { - function S(be) { - return be instanceof O ? be : new O(function(ge) { - ge(be); + var o = this && this.__awaiter || function(E, C, W, P) { + function te(B) { + return B instanceof W ? B : new W(function(Se) { + Se(B); }); } - return new (O || (O = Promise))(function(be, ge) { - function ze(ue) { + return new (W || (W = Promise))(function(B, Se) { + function ze(ce) { try { - oe(G.next(ue)); - } catch (mt) { - ge(mt); + Le(P.next(ce)); + } catch (Ue) { + Se(Ue); } } - function we(ue) { + function se(ce) { try { - oe(G.throw(ue)); - } catch (mt) { - ge(mt); + Le(P.throw(ce)); + } catch (Ue) { + Se(Ue); } } - function oe(ue) { - ue.done ? be(ue.value) : S(ue.value).then(ze, we); + function Le(ce) { + ce.done ? B(ce.value) : te(ce.value).then(ze, se); } - oe((G = G.apply(k, H || [])).next()); + Le((P = P.apply(E, C || [])).next()); }); }; - let { filetype: a = null } = e, { dragging: r = !1 } = e, { boundedheight: o = !0 } = e, { center: f = !0 } = e, { flex: u = !0 } = e, { file_count: c = "single" } = e, { disable_click: d = !1 } = e, { root: _ } = e, { hidden: b = !1 } = e, { format: h = "file" } = e, { uploading: w = !1 } = e, { hidden_upload: g = null } = e, { show_progress: p = !0 } = e, { max_file_size: m = null } = e, { upload: C } = e, { stream_handler: z } = e, y, q, v; - const E = c_(), F = ["image", "video", "audio", "text", "file"], X = (k) => k.startsWith(".") || k.endsWith("/*") ? k : F.includes(k) ? k + "/*" : "." + k; - function L() { + let { filetype: s = null } = e, { dragging: r = !1 } = e, { boundedheight: a = !0 } = e, { center: f = !0 } = e, { flex: u = !0 } = e, { file_count: c = "single" } = e, { disable_click: _ = !1 } = e, { root: d } = e, { hidden: h = !1 } = e, { format: b = "file" } = e, { uploading: g = !1 } = e, { hidden_upload: w = null } = e, { show_progress: p = !0 } = e, { max_file_size: m = null } = e, { upload: v } = e, { stream_handler: S } = e, y, z, k; + const q = w_(), I = ["image", "video", "audio", "text", "file"], F = (E) => E.startsWith(".") || E.endsWith("/*") ? E : I.includes(E) ? E + "/*" : "." + E; + function R() { t(20, r = !r); } - function V() { - navigator.clipboard.read().then((k) => s(this, void 0, void 0, function* () { - for (let H = 0; H < k.length; H++) { - const O = k[H].types.find((G) => G.startsWith("image/")); - if (O) { - k[H].getType(O).then((G) => s(this, void 0, void 0, function* () { - const S = new File([G], `clipboard.${O.replace("image/", "")}`); - yield W([S]); + function G() { + navigator.clipboard.read().then((E) => o(this, void 0, void 0, function* () { + for (let C = 0; C < E.length; C++) { + const W = E[C].types.find((P) => P.startsWith("image/")); + if (W) { + E[C].getType(W).then((P) => o(this, void 0, void 0, function* () { + const te = new File([P], `clipboard.${W.replace("image/", "")}`); + yield O([te]); })); break; } } })); } - function I() { - d || g && (t(2, g.value = "", g), g.click()); + function U() { + _ || w && (t(2, w.value = "", w), w.click()); } - function Q(k) { - return s(this, void 0, void 0, function* () { - yield __(), t(14, y = Math.random().toString(36).substring(2, 15)), t(1, w = !0); + function X(E) { + return o(this, void 0, void 0, function* () { + yield p_(), t(14, y = Math.random().toString(36).substring(2, 15)), t(1, g = !0); try { - const H = yield C(k, _, y, m ?? 1 / 0); - return E("load", c === "single" ? H == null ? void 0 : H[0] : H), t(1, w = !1), H || []; - } catch (H) { - return E("error", H.message), t(1, w = !1), []; + const C = yield v(E, d, y, m ?? 1 / 0); + return q("load", c === "single" ? C == null ? void 0 : C[0] : C), t(1, g = !1), C || []; + } catch (C) { + return q("error", C.message), t(1, g = !1), []; } }); } - function W(k) { - return s(this, void 0, void 0, function* () { - if (!k.length) + function O(E) { + return o(this, void 0, void 0, function* () { + if (!E.length) return; - let H = k.map((O) => new File([O], O instanceof File ? O.name : "file", { type: O.type })); - return t(15, q = yield Oc(H)), yield Q(q); + let C = E.map((W) => new File([W], W instanceof File ? W.name : "file", { type: W.type })); + return t(15, z = yield Qc(C)), yield X(z); }); } - function le(k) { - return s(this, void 0, void 0, function* () { - const H = k.target; - if (H.files) - if (h != "blob") - yield W(Array.from(H.files)); + function _e(E) { + return o(this, void 0, void 0, function* () { + const C = E.target; + if (C.files) + if (b != "blob") + yield O(Array.from(C.files)); else { if (c === "single") { - E("load", H.files[0]); + q("load", C.files[0]); return; } - E("load", H.files); + q("load", C.files); } }); } - function ae(k) { - return s(this, void 0, void 0, function* () { - var H; - if (t(20, r = !1), !(!((H = k.dataTransfer) === null || H === void 0) && H.files)) return; - const O = Array.from(k.dataTransfer.files).filter((G) => { - const S = "." + G.name.split(".").pop(); - return S && g_(v, S, G.type) || (S && Array.isArray(a) ? a.includes(S) : S === a) ? !0 : (E("error", `Invalid file type only ${a} allowed.`), !1); + function oe(E) { + return o(this, void 0, void 0, function* () { + var C; + if (t(20, r = !1), !(!((C = E.dataTransfer) === null || C === void 0) && C.files)) return; + const W = Array.from(E.dataTransfer.files).filter((P) => { + const te = "." + P.name.split(".").pop(); + return te && S_(k, te, P.type) || (te && Array.isArray(s) ? s.includes(te) : te === s) ? !0 : (q("error", `Invalid file type only ${s} allowed.`), !1); }); - yield W(O); + yield O(W); }); } - function re(k) { - bt.call(this, l, k); + function fe(E) { + wt.call(this, l, E); } - function D(k) { - bt.call(this, l, k); + function D(E) { + wt.call(this, l, E); } - function fe(k) { - bt.call(this, l, k); + function ue(E) { + wt.call(this, l, E); } - function Se(k) { - bt.call(this, l, k); + function Ce(E) { + wt.call(this, l, E); } - function Fe(k) { - bt.call(this, l, k); + function Xe(E) { + wt.call(this, l, E); } - function Pe(k) { - bt.call(this, l, k); + function Ye(E) { + wt.call(this, l, E); } - function B(k) { - bt.call(this, l, k); + function A(E) { + wt.call(this, l, E); } - function Ze(k) { - l_[k ? "unshift" : "push"](() => { - g = k, t(2, g); + function Je(E) { + u_[E ? "unshift" : "push"](() => { + w = E, t(2, w); }); } - return l.$$set = (k) => { - "filetype" in k && t(0, a = k.filetype), "dragging" in k && t(20, r = k.dragging), "boundedheight" in k && t(3, o = k.boundedheight), "center" in k && t(4, f = k.center), "flex" in k && t(5, u = k.flex), "file_count" in k && t(6, c = k.file_count), "disable_click" in k && t(7, d = k.disable_click), "root" in k && t(8, _ = k.root), "hidden" in k && t(9, b = k.hidden), "format" in k && t(21, h = k.format), "uploading" in k && t(1, w = k.uploading), "hidden_upload" in k && t(2, g = k.hidden_upload), "show_progress" in k && t(10, p = k.show_progress), "max_file_size" in k && t(22, m = k.max_file_size), "upload" in k && t(23, C = k.upload), "stream_handler" in k && t(11, z = k.stream_handler), "$$scope" in k && t(25, i = k.$$scope); + return l.$$set = (E) => { + "filetype" in E && t(0, s = E.filetype), "dragging" in E && t(20, r = E.dragging), "boundedheight" in E && t(3, a = E.boundedheight), "center" in E && t(4, f = E.center), "flex" in E && t(5, u = E.flex), "file_count" in E && t(6, c = E.file_count), "disable_click" in E && t(7, _ = E.disable_click), "root" in E && t(8, d = E.root), "hidden" in E && t(9, h = E.hidden), "format" in E && t(21, b = E.format), "uploading" in E && t(1, g = E.uploading), "hidden_upload" in E && t(2, w = E.hidden_upload), "show_progress" in E && t(10, p = E.show_progress), "max_file_size" in E && t(22, m = E.max_file_size), "upload" in E && t(23, v = E.upload), "stream_handler" in E && t(11, S = E.stream_handler), "$$scope" in E && t(25, i = E.$$scope); }, l.$$.update = () => { l.$$.dirty[0] & /*filetype*/ - 1 && (a == null ? t(16, v = null) : typeof a == "string" ? t(16, v = X(a)) : (t(0, a = a.map(X)), t(16, v = a.join(", ")))); + 1 && (s == null ? t(16, k = null) : typeof s == "string" ? t(16, k = F(s)) : (t(0, s = s.map(F)), t(16, k = s.join(", ")))); }, [ - a, - w, + s, g, - o, + w, + a, f, u, c, - d, _, - b, + d, + h, p, - z, - V, - I, + S, + G, + U, y, - q, - v, - L, - le, - ae, + z, + k, + R, + _e, + oe, r, - h, + b, m, - C, - W, + v, + O, i, n, - re, - D, fe, - Se, - Fe, - Pe, - B, - Ze + D, + ue, + Ce, + Xe, + Ye, + A, + Je ]; } -class p_ extends n_ { +class q_ extends f_ { constructor(e) { - super(), o_( + super(), d_( this, e, - w_, - b_, - f_, + z_, + C_, + g_, { filetype: 0, dragging: 20, @@ -4891,123 +4891,157 @@ class p_ extends n_ { } } const { - SvelteComponent: k_, - append: nt, - attr: M, - detach: v_, - init: y_, - insert: C_, - noop: Ol, - safe_not_equal: S_, - set_style: lt, - svg_element: Ge + SvelteComponent: B_, + append: ot, + attr: L, + detach: E_, + init: M_, + insert: A_, + noop: Jl, + safe_not_equal: L_, + set_style: st, + svg_element: xe } = window.__gradio__svelte__internal; -function z_(l) { - let e, t, n, i, s, a, r, o, f; +function R_(l) { + let e, t, n, i, o, s, r, a, f; return { c() { - e = Ge("svg"), t = Ge("rect"), n = Ge("rect"), i = Ge("rect"), s = Ge("rect"), a = Ge("line"), r = Ge("line"), o = Ge("line"), f = Ge("line"), M(t, "x", "2"), M(t, "y", "2"), M(t, "width", "5"), M(t, "height", "5"), M(t, "rx", "1"), M(t, "ry", "1"), M(t, "stroke-width", "2"), M(t, "fill", "none"), M(n, "x", "17"), M(n, "y", "2"), M(n, "width", "5"), M(n, "height", "5"), M(n, "rx", "1"), M(n, "ry", "1"), M(n, "stroke-width", "2"), M(n, "fill", "none"), M(i, "x", "2"), M(i, "y", "17"), M(i, "width", "5"), M(i, "height", "5"), M(i, "rx", "1"), M(i, "ry", "1"), M(i, "stroke-width", "2"), M(i, "fill", "none"), M(s, "x", "17"), M(s, "y", "17"), M(s, "width", "5"), M(s, "height", "5"), M(s, "rx", "1"), M(s, "ry", "1"), M(s, "stroke-width", "2"), M(s, "fill", "none"), M(a, "x1", "7.5"), M(a, "y1", "4.5"), M(a, "x2", "16"), M(a, "y2", "4.5"), lt(a, "stroke-width", "2px"), M(r, "x1", "7.5"), M(r, "y1", "19.5"), M(r, "x2", "16"), M(r, "y2", "19.5"), lt(r, "stroke-width", "2px"), M(o, "x1", "4.5"), M(o, "y1", "8"), M(o, "x2", "4.5"), M(o, "y2", "16"), lt(o, "stroke-width", "2px"), M(f, "x1", "19.5"), M(f, "y1", "8"), M(f, "x2", "19.5"), M(f, "y2", "16"), lt(f, "stroke-width", "2px"), M(e, "width", "100%"), M(e, "height", "100%"), M(e, "viewBox", "0 0 24 24"), M(e, "version", "1.1"), M(e, "xmlns", "http://www.w3.org/2000/svg"), M(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), M(e, "xml:space", "preserve"), M(e, "stroke", "currentColor"), lt(e, "fill-rule", "evenodd"), lt(e, "clip-rule", "evenodd"), lt(e, "stroke-linecap", "round"), lt(e, "stroke-linejoin", "round"); + e = xe("svg"), t = xe("rect"), n = xe("rect"), i = xe("rect"), o = xe("rect"), s = xe("line"), r = xe("line"), a = xe("line"), f = xe("line"), L(t, "x", "2"), L(t, "y", "2"), L(t, "width", "5"), L(t, "height", "5"), L(t, "rx", "1"), L(t, "ry", "1"), L(t, "stroke-width", "2"), L(t, "fill", "none"), L(n, "x", "17"), L(n, "y", "2"), L(n, "width", "5"), L(n, "height", "5"), L(n, "rx", "1"), L(n, "ry", "1"), L(n, "stroke-width", "2"), L(n, "fill", "none"), L(i, "x", "2"), L(i, "y", "17"), L(i, "width", "5"), L(i, "height", "5"), L(i, "rx", "1"), L(i, "ry", "1"), L(i, "stroke-width", "2"), L(i, "fill", "none"), L(o, "x", "17"), L(o, "y", "17"), L(o, "width", "5"), L(o, "height", "5"), L(o, "rx", "1"), L(o, "ry", "1"), L(o, "stroke-width", "2"), L(o, "fill", "none"), L(s, "x1", "7.5"), L(s, "y1", "4.5"), L(s, "x2", "16"), L(s, "y2", "4.5"), st(s, "stroke-width", "2px"), L(r, "x1", "7.5"), L(r, "y1", "19.5"), L(r, "x2", "16"), L(r, "y2", "19.5"), st(r, "stroke-width", "2px"), L(a, "x1", "4.5"), L(a, "y1", "8"), L(a, "x2", "4.5"), L(a, "y2", "16"), st(a, "stroke-width", "2px"), L(f, "x1", "19.5"), L(f, "y1", "8"), L(f, "x2", "19.5"), L(f, "y2", "16"), st(f, "stroke-width", "2px"), L(e, "width", "100%"), L(e, "height", "100%"), L(e, "viewBox", "0 0 24 24"), L(e, "version", "1.1"), L(e, "xmlns", "http://www.w3.org/2000/svg"), L(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), L(e, "xml:space", "preserve"), L(e, "stroke", "currentColor"), st(e, "fill-rule", "evenodd"), st(e, "clip-rule", "evenodd"), st(e, "stroke-linecap", "round"), st(e, "stroke-linejoin", "round"); }, m(u, c) { - C_(u, e, c), nt(e, t), nt(e, n), nt(e, i), nt(e, s), nt(e, a), nt(e, r), nt(e, o), nt(e, f); + A_(u, e, c), ot(e, t), ot(e, n), ot(e, i), ot(e, o), ot(e, s), ot(e, r), ot(e, a), ot(e, f); }, - p: Ol, - i: Ol, - o: Ol, + p: Jl, + i: Jl, + o: Jl, d(u) { - u && v_(e); + u && E_(e); } }; } -class q_ extends k_ { +class D_ extends B_ { constructor(e) { - super(), y_(this, e, null, z_, S_, {}); + super(), M_(this, e, null, R_, L_, {}); } } const { - SvelteComponent: E_, - append: A_, - attr: Re, - detach: B_, - init: M_, - insert: L_, - noop: Wl, - safe_not_equal: D_, - set_style: Hn, - svg_element: Ss + SvelteComponent: T_, + append: j_, + attr: je, + detach: H_, + init: I_, + insert: F_, + noop: Ql, + safe_not_equal: X_, + set_style: Wn, + svg_element: Ao +} = window.__gradio__svelte__internal; +function Y_(l) { + let e, t; + return { + c() { + e = Ao("svg"), t = Ao("path"), je(t, "d", "M 14.4 2.85 V 11.1 V 3.95 C 14.4 3.0387 15.1388 2.3 16.05 2.3 C 16.9612 2.3 17.7 3.0387 17.7 3.95 V 11.1 V 7.25 C 17.7 6.3387 18.4388 5.6 19.35 5.6 C 20.2612 5.6 21 6.3387 21 7.25 V 16.6 C 21 20.2451 18.0451 23.2 14.4 23.2 H 13.16 C 11.4831 23.2 9.8692 22.5618 8.6459 21.4149 L 3.1915 16.3014 C 2.403 15.5622 2.3829 14.3171 3.1472 13.5528 C 3.8943 12.8057 5.1057 12.8057 5.8528 13.5528 L 7.8 15.5 V 6.15 C 7.8 5.2387 8.5387 4.5 9.45 4.5 C 10.3612 4.5 11.1 5.2387 11.1 6.15 V 11.1 V 2.85 C 11.1 1.9387 11.8388 1.2 12.75 1.2 C 13.6612 1.2 14.4 1.9387 14.4 2.85 Z"), je(t, "fill", "none"), je(t, "stroke-width", "2"), je(e, "width", "100%"), je(e, "height", "100%"), je(e, "viewBox", "0 0 24 24"), je(e, "version", "1.1"), je(e, "xmlns", "http://www.w3.org/2000/svg"), je(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), je(e, "xml:space", "preserve"), je(e, "stroke", "currentColor"), Wn(e, "fill-rule", "evenodd"), Wn(e, "clip-rule", "evenodd"), Wn(e, "stroke-linecap", "round"), Wn(e, "stroke-linejoin", "round"); + }, + m(n, i) { + F_(n, e, i), j_(e, t); + }, + p: Ql, + i: Ql, + o: Ql, + d(n) { + n && H_(e); + } + }; +} +class U_ extends T_ { + constructor(e) { + super(), I_(this, e, null, Y_, X_, {}); + } +} +const { + SvelteComponent: V_, + append: N_, + attr: He, + detach: O_, + init: W_, + insert: P_, + noop: xl, + safe_not_equal: Z_, + set_style: Pn, + svg_element: Lo } = window.__gradio__svelte__internal; -function T_(l) { +function K_(l) { let e, t; return { c() { - e = Ss("svg"), t = Ss("path"), Re(t, "d", "M 14.4 2.85 V 11.1 V 3.95 C 14.4 3.0387 15.1388 2.3 16.05 2.3 C 16.9612 2.3 17.7 3.0387 17.7 3.95 V 11.1 V 7.25 C 17.7 6.3387 18.4388 5.6 19.35 5.6 C 20.2612 5.6 21 6.3387 21 7.25 V 16.6 C 21 20.2451 18.0451 23.2 14.4 23.2 H 13.16 C 11.4831 23.2 9.8692 22.5618 8.6459 21.4149 L 3.1915 16.3014 C 2.403 15.5622 2.3829 14.3171 3.1472 13.5528 C 3.8943 12.8057 5.1057 12.8057 5.8528 13.5528 L 7.8 15.5 V 6.15 C 7.8 5.2387 8.5387 4.5 9.45 4.5 C 10.3612 4.5 11.1 5.2387 11.1 6.15 V 11.1 V 2.85 C 11.1 1.9387 11.8388 1.2 12.75 1.2 C 13.6612 1.2 14.4 1.9387 14.4 2.85 Z"), Re(t, "fill", "none"), Re(t, "stroke-width", "2"), Re(e, "width", "100%"), Re(e, "height", "100%"), Re(e, "viewBox", "0 0 24 24"), Re(e, "version", "1.1"), Re(e, "xmlns", "http://www.w3.org/2000/svg"), Re(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Re(e, "xml:space", "preserve"), Re(e, "stroke", "currentColor"), Hn(e, "fill-rule", "evenodd"), Hn(e, "clip-rule", "evenodd"), Hn(e, "stroke-linecap", "round"), Hn(e, "stroke-linejoin", "round"); + e = Lo("svg"), t = Lo("path"), He(t, "d", "M10 12L14 16M14 12L10 16M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6"), He(t, "fill", "none"), He(t, "stroke-width", "2"), He(e, "width", "100%"), He(e, "height", "100%"), He(e, "viewBox", "0 0 24 24"), He(e, "version", "1.1"), He(e, "xmlns", "http://www.w3.org/2000/svg"), He(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), He(e, "xml:space", "preserve"), He(e, "stroke", "currentColor"), Pn(e, "fill-rule", "evenodd"), Pn(e, "clip-rule", "evenodd"), Pn(e, "stroke-linecap", "round"), Pn(e, "stroke-linejoin", "round"); }, m(n, i) { - L_(n, e, i), A_(e, t); + P_(n, e, i), N_(e, t); }, - p: Wl, - i: Wl, - o: Wl, + p: xl, + i: xl, + o: xl, d(n) { - n && B_(e); + n && O_(e); } }; } -class R_ extends E_ { +class G_ extends V_ { constructor(e) { - super(), M_(this, e, null, T_, D_, {}); + super(), W_(this, e, null, K_, Z_, {}); } } const { - SvelteComponent: j_, - append: zs, - attr: Pl, - bubble: qs, - create_component: I_, - destroy_component: F_, - detach: Ko, - element: Es, - init: H_, - insert: Go, - listen: Zl, - mount_component: X_, - run_all: Y_, - safe_not_equal: U_, - set_data: N_, - set_input_value: As, - space: V_, - text: O_, - transition_in: W_, - transition_out: P_ -} = window.__gradio__svelte__internal, { createEventDispatcher: Z_, afterUpdate: K_ } = window.__gradio__svelte__internal; -function G_(l) { + SvelteComponent: J_, + append: Ro, + attr: $l, + bubble: Do, + create_component: Q_, + destroy_component: x_, + detach: ta, + element: To, + init: $_, + insert: na, + listen: ei, + mount_component: ed, + run_all: td, + safe_not_equal: nd, + set_data: ld, + set_input_value: jo, + space: id, + text: od, + transition_in: sd, + transition_out: ad +} = window.__gradio__svelte__internal, { createEventDispatcher: rd, afterUpdate: fd } = window.__gradio__svelte__internal; +function ud(l) { let e; return { c() { - e = O_( + e = od( /*label*/ l[1] ); }, m(t, n) { - Go(t, e, n); + na(t, e, n); }, p(t, n) { n & /*label*/ - 2 && N_( + 2 && ld( e, /*label*/ t[1] ); }, d(t) { - t && Ko(e); + t && ta(e); } }; } -function J_(l) { - let e, t, n, i, s, a, r; - return t = new so({ +function cd(l) { + let e, t, n, i, o, s, r; + return t = new ds({ props: { show_label: ( /*show_label*/ @@ -5017,105 +5051,105 @@ function J_(l) { /*info*/ l[2] ), - $$slots: { default: [G_] }, + $$slots: { default: [ud] }, $$scope: { ctx: l } } }), { c() { - e = Es("label"), I_(t.$$.fragment), n = V_(), i = Es("input"), Pl(i, "type", "color"), i.disabled = /*disabled*/ - l[3], Pl(i, "class", "svelte-16l8u73"), Pl(e, "class", "block"); + e = To("label"), Q_(t.$$.fragment), n = id(), i = To("input"), $l(i, "type", "color"), i.disabled = /*disabled*/ + l[3], $l(i, "class", "svelte-16l8u73"), $l(e, "class", "block"); }, - m(o, f) { - Go(o, e, f), X_(t, e, null), zs(e, n), zs(e, i), As( + m(a, f) { + na(a, e, f), ed(t, e, null), Ro(e, n), Ro(e, i), jo( i, /*value*/ l[0] - ), s = !0, a || (r = [ - Zl( + ), o = !0, s || (r = [ + ei( i, "input", /*input_input_handler*/ l[8] ), - Zl( + ei( i, "focus", /*focus_handler*/ l[6] ), - Zl( + ei( i, "blur", /*blur_handler*/ l[7] ) - ], a = !0); + ], s = !0); }, - p(o, [f]) { + p(a, [f]) { const u = {}; f & /*show_label*/ 16 && (u.show_label = /*show_label*/ - o[4]), f & /*info*/ + a[4]), f & /*info*/ 4 && (u.info = /*info*/ - o[2]), f & /*$$scope, label*/ - 2050 && (u.$$scope = { dirty: f, ctx: o }), t.$set(u), (!s || f & /*disabled*/ + a[2]), f & /*$$scope, label*/ + 2050 && (u.$$scope = { dirty: f, ctx: a }), t.$set(u), (!o || f & /*disabled*/ 8) && (i.disabled = /*disabled*/ - o[3]), f & /*value*/ - 1 && As( + a[3]), f & /*value*/ + 1 && jo( i, /*value*/ - o[0] + a[0] ); }, - i(o) { - s || (W_(t.$$.fragment, o), s = !0); + i(a) { + o || (sd(t.$$.fragment, a), o = !0); }, - o(o) { - P_(t.$$.fragment, o), s = !1; + o(a) { + ad(t.$$.fragment, a), o = !1; }, - d(o) { - o && Ko(e), F_(t), a = !1, Y_(r); + d(a) { + a && ta(e), x_(t), s = !1, td(r); } }; } -function Q_(l, e, t) { - let { value: n = "#000000" } = e, { value_is_output: i = !1 } = e, { label: s } = e, { info: a = void 0 } = e, { disabled: r = !1 } = e, { show_label: o = !0 } = e; - const f = Z_(); +function _d(l, e, t) { + let { value: n = "#000000" } = e, { value_is_output: i = !1 } = e, { label: o } = e, { info: s = void 0 } = e, { disabled: r = !1 } = e, { show_label: a = !0 } = e; + const f = rd(); function u() { f("change", n), i || f("input"); } - K_(() => { + fd(() => { t(5, i = !1); }); - function c(b) { - qs.call(this, l, b); + function c(h) { + Do.call(this, l, h); } - function d(b) { - qs.call(this, l, b); + function _(h) { + Do.call(this, l, h); } - function _() { + function d() { n = this.value, t(0, n); } - return l.$$set = (b) => { - "value" in b && t(0, n = b.value), "value_is_output" in b && t(5, i = b.value_is_output), "label" in b && t(1, s = b.label), "info" in b && t(2, a = b.info), "disabled" in b && t(3, r = b.disabled), "show_label" in b && t(4, o = b.show_label); + return l.$$set = (h) => { + "value" in h && t(0, n = h.value), "value_is_output" in h && t(5, i = h.value_is_output), "label" in h && t(1, o = h.label), "info" in h && t(2, s = h.info), "disabled" in h && t(3, r = h.disabled), "show_label" in h && t(4, a = h.show_label); }, l.$$.update = () => { l.$$.dirty & /*value*/ 1 && u(); }, [ n, + o, s, - a, r, - o, + a, i, c, - d, - _ + _, + d ]; } -class x_ extends j_ { +class dd extends J_ { constructor(e) { - super(), H_(this, e, Q_, J_, U_, { + super(), $_(this, e, _d, cd, nd, { value: 0, value_is_output: 5, label: 1, @@ -5126,40 +5160,40 @@ class x_ extends j_ { } } const { - SvelteComponent: $_, - append: Jo, + SvelteComponent: hd, + append: la, attr: Z, - bubble: ed, - check_outros: td, - create_slot: Qo, - detach: qn, - element: Cl, - empty: nd, - get_all_dirty_from_scope: xo, - get_slot_changes: $o, - group_outros: ld, - init: id, - insert: En, - listen: sd, - safe_not_equal: od, - set_style: he, - space: ea, - src_url_equal: sl, - toggle_class: Qt, - transition_in: ol, - transition_out: al, - update_slot_base: ta + bubble: md, + check_outros: gd, + create_slot: ia, + detach: Dn, + element: El, + empty: bd, + get_all_dirty_from_scope: oa, + get_slot_changes: sa, + group_outros: wd, + init: pd, + insert: Tn, + listen: vd, + safe_not_equal: kd, + set_style: ge, + space: aa, + src_url_equal: dl, + toggle_class: xt, + transition_in: hl, + transition_out: ml, + update_slot_base: ra } = window.__gradio__svelte__internal; -function ad(l) { - let e, t, n, i, s, a, r = ( +function yd(l) { + let e, t, n, i, o, s, r = ( /*icon*/ - l[7] && Bs(l) + l[7] && Ho(l) ); - const o = ( + const a = ( /*#slots*/ l[12].default - ), f = Qo( - o, + ), f = ia( + a, l, /*$$scope*/ l[11], @@ -5167,7 +5201,7 @@ function ad(l) { ); return { c() { - e = Cl("button"), r && r.c(), t = ea(), f && f.c(), Z(e, "class", n = /*size*/ + e = El("button"), r && r.c(), t = aa(), f && f.c(), Z(e, "class", n = /*size*/ l[4] + " " + /*variant*/ l[3] + " " + /*elem_classes*/ l[1].join(" ") + " svelte-8huxfn"), Z( @@ -5176,45 +5210,45 @@ function ad(l) { /*elem_id*/ l[0] ), e.disabled = /*disabled*/ - l[8], Qt(e, "hidden", !/*visible*/ - l[2]), he( + l[8], xt(e, "hidden", !/*visible*/ + l[2]), ge( e, "flex-grow", /*scale*/ l[9] - ), he( + ), ge( e, "width", /*scale*/ l[9] === 0 ? "fit-content" : null - ), he(e, "min-width", typeof /*min_width*/ + ), ge(e, "min-width", typeof /*min_width*/ l[10] == "number" ? `calc(min(${/*min_width*/ l[10]}px, 100%))` : null); }, m(u, c) { - En(u, e, c), r && r.m(e, null), Jo(e, t), f && f.m(e, null), i = !0, s || (a = sd( + Tn(u, e, c), r && r.m(e, null), la(e, t), f && f.m(e, null), i = !0, o || (s = vd( e, "click", /*click_handler*/ l[13] - ), s = !0); + ), o = !0); }, p(u, c) { /*icon*/ - u[7] ? r ? r.p(u, c) : (r = Bs(u), r.c(), r.m(e, t)) : r && (r.d(1), r = null), f && f.p && (!i || c & /*$$scope*/ - 2048) && ta( + u[7] ? r ? r.p(u, c) : (r = Ho(u), r.c(), r.m(e, t)) : r && (r.d(1), r = null), f && f.p && (!i || c & /*$$scope*/ + 2048) && ra( f, - o, + a, u, /*$$scope*/ u[11], - i ? $o( - o, + i ? sa( + a, /*$$scope*/ u[11], c, null - ) : xo( + ) : oa( /*$$scope*/ u[11] ), @@ -5232,45 +5266,45 @@ function ad(l) { ), (!i || c & /*disabled*/ 256) && (e.disabled = /*disabled*/ u[8]), (!i || c & /*size, variant, elem_classes, visible*/ - 30) && Qt(e, "hidden", !/*visible*/ + 30) && xt(e, "hidden", !/*visible*/ u[2]), c & /*scale*/ - 512 && he( + 512 && ge( e, "flex-grow", /*scale*/ u[9] ), c & /*scale*/ - 512 && he( + 512 && ge( e, "width", /*scale*/ u[9] === 0 ? "fit-content" : null ), c & /*min_width*/ - 1024 && he(e, "min-width", typeof /*min_width*/ + 1024 && ge(e, "min-width", typeof /*min_width*/ u[10] == "number" ? `calc(min(${/*min_width*/ u[10]}px, 100%))` : null); }, i(u) { - i || (ol(f, u), i = !0); + i || (hl(f, u), i = !0); }, o(u) { - al(f, u), i = !1; + ml(f, u), i = !1; }, d(u) { - u && qn(e), r && r.d(), f && f.d(u), s = !1, a(); + u && Dn(e), r && r.d(), f && f.d(u), o = !1, s(); } }; } -function rd(l) { - let e, t, n, i, s = ( +function Cd(l) { + let e, t, n, i, o = ( /*icon*/ - l[7] && Ms(l) + l[7] && Io(l) ); - const a = ( + const s = ( /*#slots*/ l[12].default - ), r = Qo( - a, + ), r = ia( + s, l, /*$$scope*/ l[11], @@ -5278,7 +5312,7 @@ function rd(l) { ); return { c() { - e = Cl("a"), s && s.c(), t = ea(), r && r.c(), Z( + e = El("a"), o && o.c(), t = aa(), r && r.c(), Z( e, "href", /*link*/ @@ -5296,52 +5330,52 @@ function rd(l) { "id", /*elem_id*/ l[0] - ), Qt(e, "hidden", !/*visible*/ - l[2]), Qt( + ), xt(e, "hidden", !/*visible*/ + l[2]), xt( e, "disabled", /*disabled*/ l[8] - ), he( + ), ge( e, "flex-grow", /*scale*/ l[9] - ), he( + ), ge( e, "pointer-events", /*disabled*/ l[8] ? "none" : null - ), he( + ), ge( e, "width", /*scale*/ l[9] === 0 ? "fit-content" : null - ), he(e, "min-width", typeof /*min_width*/ + ), ge(e, "min-width", typeof /*min_width*/ l[10] == "number" ? `calc(min(${/*min_width*/ l[10]}px, 100%))` : null); }, - m(o, f) { - En(o, e, f), s && s.m(e, null), Jo(e, t), r && r.m(e, null), i = !0; + m(a, f) { + Tn(a, e, f), o && o.m(e, null), la(e, t), r && r.m(e, null), i = !0; }, - p(o, f) { + p(a, f) { /*icon*/ - o[7] ? s ? s.p(o, f) : (s = Ms(o), s.c(), s.m(e, t)) : s && (s.d(1), s = null), r && r.p && (!i || f & /*$$scope*/ - 2048) && ta( + a[7] ? o ? o.p(a, f) : (o = Io(a), o.c(), o.m(e, t)) : o && (o.d(1), o = null), r && r.p && (!i || f & /*$$scope*/ + 2048) && ra( r, + s, a, - o, /*$$scope*/ - o[11], - i ? $o( - a, + a[11], + i ? sa( + s, /*$$scope*/ - o[11], + a[11], f, null - ) : xo( + ) : oa( /*$$scope*/ - o[11] + a[11] ), null ), (!i || f & /*link*/ @@ -5349,172 +5383,172 @@ function rd(l) { e, "href", /*link*/ - o[6] + a[6] ), (!i || f & /*disabled*/ 256) && Z( e, "aria-disabled", /*disabled*/ - o[8] + a[8] ), (!i || f & /*size, variant, elem_classes*/ 26 && n !== (n = /*size*/ - o[4] + " " + /*variant*/ - o[3] + " " + /*elem_classes*/ - o[1].join(" ") + " svelte-8huxfn")) && Z(e, "class", n), (!i || f & /*elem_id*/ + a[4] + " " + /*variant*/ + a[3] + " " + /*elem_classes*/ + a[1].join(" ") + " svelte-8huxfn")) && Z(e, "class", n), (!i || f & /*elem_id*/ 1) && Z( e, "id", /*elem_id*/ - o[0] + a[0] ), (!i || f & /*size, variant, elem_classes, visible*/ - 30) && Qt(e, "hidden", !/*visible*/ - o[2]), (!i || f & /*size, variant, elem_classes, disabled*/ - 282) && Qt( + 30) && xt(e, "hidden", !/*visible*/ + a[2]), (!i || f & /*size, variant, elem_classes, disabled*/ + 282) && xt( e, "disabled", /*disabled*/ - o[8] + a[8] ), f & /*scale*/ - 512 && he( + 512 && ge( e, "flex-grow", /*scale*/ - o[9] + a[9] ), f & /*disabled*/ - 256 && he( + 256 && ge( e, "pointer-events", /*disabled*/ - o[8] ? "none" : null + a[8] ? "none" : null ), f & /*scale*/ - 512 && he( + 512 && ge( e, "width", /*scale*/ - o[9] === 0 ? "fit-content" : null + a[9] === 0 ? "fit-content" : null ), f & /*min_width*/ - 1024 && he(e, "min-width", typeof /*min_width*/ - o[10] == "number" ? `calc(min(${/*min_width*/ - o[10]}px, 100%))` : null); + 1024 && ge(e, "min-width", typeof /*min_width*/ + a[10] == "number" ? `calc(min(${/*min_width*/ + a[10]}px, 100%))` : null); }, - i(o) { - i || (ol(r, o), i = !0); + i(a) { + i || (hl(r, a), i = !0); }, - o(o) { - al(r, o), i = !1; + o(a) { + ml(r, a), i = !1; }, - d(o) { - o && qn(e), s && s.d(), r && r.d(o); + d(a) { + a && Dn(e), o && o.d(), r && r.d(a); } }; } -function Bs(l) { +function Ho(l) { let e, t, n; return { c() { - e = Cl("img"), Z(e, "class", "button-icon svelte-8huxfn"), sl(e.src, t = /*icon*/ + e = El("img"), Z(e, "class", "button-icon svelte-8huxfn"), dl(e.src, t = /*icon*/ l[7].url) || Z(e, "src", t), Z(e, "alt", n = `${/*value*/ l[5]} icon`); }, - m(i, s) { - En(i, e, s); + m(i, o) { + Tn(i, e, o); }, - p(i, s) { - s & /*icon*/ - 128 && !sl(e.src, t = /*icon*/ - i[7].url) && Z(e, "src", t), s & /*value*/ + p(i, o) { + o & /*icon*/ + 128 && !dl(e.src, t = /*icon*/ + i[7].url) && Z(e, "src", t), o & /*value*/ 32 && n !== (n = `${/*value*/ i[5]} icon`) && Z(e, "alt", n); }, d(i) { - i && qn(e); + i && Dn(e); } }; } -function Ms(l) { +function Io(l) { let e, t, n; return { c() { - e = Cl("img"), Z(e, "class", "button-icon svelte-8huxfn"), sl(e.src, t = /*icon*/ + e = El("img"), Z(e, "class", "button-icon svelte-8huxfn"), dl(e.src, t = /*icon*/ l[7].url) || Z(e, "src", t), Z(e, "alt", n = `${/*value*/ l[5]} icon`); }, - m(i, s) { - En(i, e, s); + m(i, o) { + Tn(i, e, o); }, - p(i, s) { - s & /*icon*/ - 128 && !sl(e.src, t = /*icon*/ - i[7].url) && Z(e, "src", t), s & /*value*/ + p(i, o) { + o & /*icon*/ + 128 && !dl(e.src, t = /*icon*/ + i[7].url) && Z(e, "src", t), o & /*value*/ 32 && n !== (n = `${/*value*/ i[5]} icon`) && Z(e, "alt", n); }, d(i) { - i && qn(e); + i && Dn(e); } }; } -function fd(l) { +function Sd(l) { let e, t, n, i; - const s = [rd, ad], a = []; - function r(o, f) { + const o = [Cd, yd], s = []; + function r(a, f) { return ( /*link*/ - o[6] && /*link*/ - o[6].length > 0 ? 0 : 1 + a[6] && /*link*/ + a[6].length > 0 ? 0 : 1 ); } - return e = r(l), t = a[e] = s[e](l), { + return e = r(l), t = s[e] = o[e](l), { c() { - t.c(), n = nd(); + t.c(), n = bd(); }, - m(o, f) { - a[e].m(o, f), En(o, n, f), i = !0; + m(a, f) { + s[e].m(a, f), Tn(a, n, f), i = !0; }, - p(o, [f]) { + p(a, [f]) { let u = e; - e = r(o), e === u ? a[e].p(o, f) : (ld(), al(a[u], 1, 1, () => { - a[u] = null; - }), td(), t = a[e], t ? t.p(o, f) : (t = a[e] = s[e](o), t.c()), ol(t, 1), t.m(n.parentNode, n)); + e = r(a), e === u ? s[e].p(a, f) : (wd(), ml(s[u], 1, 1, () => { + s[u] = null; + }), gd(), t = s[e], t ? t.p(a, f) : (t = s[e] = o[e](a), t.c()), hl(t, 1), t.m(n.parentNode, n)); }, - i(o) { - i || (ol(t), i = !0); + i(a) { + i || (hl(t), i = !0); }, - o(o) { - al(t), i = !1; + o(a) { + ml(t), i = !1; }, - d(o) { - o && qn(n), a[e].d(o); + d(a) { + a && Dn(n), s[e].d(a); } }; } -function ud(l, e, t) { - let { $$slots: n = {}, $$scope: i } = e, { elem_id: s = "" } = e, { elem_classes: a = [] } = e, { visible: r = !0 } = e, { variant: o = "secondary" } = e, { size: f = "lg" } = e, { value: u = null } = e, { link: c = null } = e, { icon: d = null } = e, { disabled: _ = !1 } = e, { scale: b = null } = e, { min_width: h = void 0 } = e; - function w(g) { - ed.call(this, l, g); +function zd(l, e, t) { + let { $$slots: n = {}, $$scope: i } = e, { elem_id: o = "" } = e, { elem_classes: s = [] } = e, { visible: r = !0 } = e, { variant: a = "secondary" } = e, { size: f = "lg" } = e, { value: u = null } = e, { link: c = null } = e, { icon: _ = null } = e, { disabled: d = !1 } = e, { scale: h = null } = e, { min_width: b = void 0 } = e; + function g(w) { + md.call(this, l, w); } - return l.$$set = (g) => { - "elem_id" in g && t(0, s = g.elem_id), "elem_classes" in g && t(1, a = g.elem_classes), "visible" in g && t(2, r = g.visible), "variant" in g && t(3, o = g.variant), "size" in g && t(4, f = g.size), "value" in g && t(5, u = g.value), "link" in g && t(6, c = g.link), "icon" in g && t(7, d = g.icon), "disabled" in g && t(8, _ = g.disabled), "scale" in g && t(9, b = g.scale), "min_width" in g && t(10, h = g.min_width), "$$scope" in g && t(11, i = g.$$scope); + return l.$$set = (w) => { + "elem_id" in w && t(0, o = w.elem_id), "elem_classes" in w && t(1, s = w.elem_classes), "visible" in w && t(2, r = w.visible), "variant" in w && t(3, a = w.variant), "size" in w && t(4, f = w.size), "value" in w && t(5, u = w.value), "link" in w && t(6, c = w.link), "icon" in w && t(7, _ = w.icon), "disabled" in w && t(8, d = w.disabled), "scale" in w && t(9, h = w.scale), "min_width" in w && t(10, b = w.min_width), "$$scope" in w && t(11, i = w.$$scope); }, [ + o, s, - a, r, - o, + a, f, u, c, - d, _, - b, + d, h, + b, i, n, - w + g ]; } -class hi extends $_ { +class pi extends hd { constructor(e) { - super(), id(this, e, ud, fd, od, { + super(), pd(this, e, zd, Sd, kd, { elem_id: 0, elem_classes: 1, visible: 2, @@ -5530,140 +5564,140 @@ class hi extends $_ { } } const { - SvelteComponent: cd, - add_render_callback: na, - append: Xn, - attr: ye, - binding_callbacks: Ls, - check_outros: _d, - create_bidirectional_transition: Ds, - destroy_each: dd, - detach: pn, - element: rl, - empty: hd, - ensure_array_like: Ts, - group_outros: md, - init: bd, - insert: kn, - listen: mi, - prevent_default: gd, - run_all: wd, - safe_not_equal: pd, - set_data: kd, - set_style: Xt, - space: bi, - text: vd, - toggle_class: Ye, - transition_in: Kl, - transition_out: Rs -} = window.__gradio__svelte__internal, { createEventDispatcher: yd } = window.__gradio__svelte__internal; -function js(l, e, t) { + SvelteComponent: qd, + add_render_callback: fa, + append: Zn, + attr: ke, + binding_callbacks: Fo, + check_outros: Bd, + create_bidirectional_transition: Xo, + destroy_each: Ed, + detach: Cn, + element: gl, + empty: Md, + ensure_array_like: Yo, + group_outros: Ad, + init: Ld, + insert: Sn, + listen: vi, + prevent_default: Rd, + run_all: Dd, + safe_not_equal: Td, + set_data: jd, + set_style: Vt, + space: ki, + text: Hd, + toggle_class: Oe, + transition_in: ti, + transition_out: Uo +} = window.__gradio__svelte__internal, { createEventDispatcher: Id } = window.__gradio__svelte__internal; +function Vo(l, e, t) { const n = l.slice(); return n[26] = e[t], n; } -function Is(l) { - let e, t, n, i, s, a = Ts( +function No(l) { + let e, t, n, i, o, s = Yo( /*filtered_indices*/ l[1] ), r = []; - for (let o = 0; o < a.length; o += 1) - r[o] = Fs(js(l, a, o)); + for (let a = 0; a < s.length; a += 1) + r[a] = Oo(Vo(l, s, a)); return { c() { - e = rl("ul"); - for (let o = 0; o < r.length; o += 1) - r[o].c(); - ye(e, "class", "options svelte-yuohum"), ye(e, "role", "listbox"), Xt( + e = gl("ul"); + for (let a = 0; a < r.length; a += 1) + r[a].c(); + ke(e, "class", "options svelte-yuohum"), ke(e, "role", "listbox"), Vt( e, "bottom", /*bottom*/ l[9] - ), Xt(e, "max-height", `calc(${/*max_height*/ - l[10]}px - var(--window-padding))`), Xt( + ), Vt(e, "max-height", `calc(${/*max_height*/ + l[10]}px - var(--window-padding))`), Vt( e, "width", /*input_width*/ l[8] + "px" ); }, - m(o, f) { - kn(o, e, f); + m(a, f) { + Sn(a, e, f); for (let u = 0; u < r.length; u += 1) r[u] && r[u].m(e, null); - l[22](e), n = !0, i || (s = mi(e, "mousedown", gd( + l[22](e), n = !0, i || (o = vi(e, "mousedown", Rd( /*mousedown_handler*/ l[21] )), i = !0); }, - p(o, f) { + p(a, f) { if (f & /*filtered_indices, choices, selected_indices, active_index*/ 51) { - a = Ts( + s = Yo( /*filtered_indices*/ - o[1] + a[1] ); let u; - for (u = 0; u < a.length; u += 1) { - const c = js(o, a, u); - r[u] ? r[u].p(c, f) : (r[u] = Fs(c), r[u].c(), r[u].m(e, null)); + for (u = 0; u < s.length; u += 1) { + const c = Vo(a, s, u); + r[u] ? r[u].p(c, f) : (r[u] = Oo(c), r[u].c(), r[u].m(e, null)); } for (; u < r.length; u += 1) r[u].d(1); - r.length = a.length; + r.length = s.length; } f & /*bottom*/ - 512 && Xt( + 512 && Vt( e, "bottom", /*bottom*/ - o[9] + a[9] ), f & /*max_height*/ - 1024 && Xt(e, "max-height", `calc(${/*max_height*/ - o[10]}px - var(--window-padding))`), f & /*input_width*/ - 256 && Xt( + 1024 && Vt(e, "max-height", `calc(${/*max_height*/ + a[10]}px - var(--window-padding))`), f & /*input_width*/ + 256 && Vt( e, "width", /*input_width*/ - o[8] + "px" + a[8] + "px" ); }, - i(o) { - n || (o && na(() => { - n && (t || (t = Ds(e, Ji, { duration: 200, y: 5 }, !0)), t.run(1)); + i(a) { + n || (a && fa(() => { + n && (t || (t = Xo(e, to, { duration: 200, y: 5 }, !0)), t.run(1)); }), n = !0); }, - o(o) { - o && (t || (t = Ds(e, Ji, { duration: 200, y: 5 }, !1)), t.run(0)), n = !1; + o(a) { + a && (t || (t = Xo(e, to, { duration: 200, y: 5 }, !1)), t.run(0)), n = !1; }, - d(o) { - o && pn(e), dd(r, o), l[22](null), o && t && t.end(), i = !1, s(); + d(a) { + a && Cn(e), Ed(r, a), l[22](null), a && t && t.end(), i = !1, o(); } }; } -function Fs(l) { +function Oo(l) { let e, t, n, i = ( /*choices*/ l[0][ /*index*/ l[26] ][0] + "" - ), s, a, r, o, f; + ), o, s, r, a, f; return { c() { - e = rl("li"), t = rl("span"), t.textContent = "✓", n = bi(), s = vd(i), a = bi(), ye(t, "class", "inner-item svelte-yuohum"), Ye(t, "hide", !/*selected_indices*/ + e = gl("li"), t = gl("span"), t.textContent = "✓", n = ki(), o = Hd(i), s = ki(), ke(t, "class", "inner-item svelte-yuohum"), Oe(t, "hide", !/*selected_indices*/ l[4].includes( /*index*/ l[26] - )), ye(e, "class", "item svelte-yuohum"), ye(e, "data-index", r = /*index*/ - l[26]), ye(e, "aria-label", o = /*choices*/ + )), ke(e, "class", "item svelte-yuohum"), ke(e, "data-index", r = /*index*/ + l[26]), ke(e, "aria-label", a = /*choices*/ l[0][ /*index*/ l[26] - ][0]), ye(e, "data-testid", "dropdown-option"), ye(e, "role", "option"), ye(e, "aria-selected", f = /*selected_indices*/ + ][0]), ke(e, "data-testid", "dropdown-option"), ke(e, "role", "option"), ke(e, "aria-selected", f = /*selected_indices*/ l[4].includes( /*index*/ l[26] - )), Ye( + )), Oe( e, "selected", /*selected_indices*/ @@ -5671,19 +5705,19 @@ function Fs(l) { /*index*/ l[26] ) - ), Ye( + ), Oe( e, "active", /*index*/ l[26] === /*active_index*/ l[5] - ), Ye( + ), Oe( e, "bg-gray-100", /*index*/ l[26] === /*active_index*/ l[5] - ), Ye( + ), Oe( e, "dark:bg-gray-600", /*index*/ @@ -5692,11 +5726,11 @@ function Fs(l) { ); }, m(u, c) { - kn(u, e, c), Xn(e, t), Xn(e, n), Xn(e, s), Xn(e, a); + Sn(u, e, c), Zn(e, t), Zn(e, n), Zn(e, o), Zn(e, s); }, p(u, c) { c & /*selected_indices, filtered_indices*/ - 18 && Ye(t, "hide", !/*selected_indices*/ + 18 && Oe(t, "hide", !/*selected_indices*/ u[4].includes( /*index*/ u[26] @@ -5705,20 +5739,20 @@ function Fs(l) { u[0][ /*index*/ u[26] - ][0] + "") && kd(s, i), c & /*filtered_indices*/ + ][0] + "") && jd(o, i), c & /*filtered_indices*/ 2 && r !== (r = /*index*/ - u[26]) && ye(e, "data-index", r), c & /*choices, filtered_indices*/ - 3 && o !== (o = /*choices*/ + u[26]) && ke(e, "data-index", r), c & /*choices, filtered_indices*/ + 3 && a !== (a = /*choices*/ u[0][ /*index*/ u[26] - ][0]) && ye(e, "aria-label", o), c & /*selected_indices, filtered_indices*/ + ][0]) && ke(e, "aria-label", a), c & /*selected_indices, filtered_indices*/ 18 && f !== (f = /*selected_indices*/ u[4].includes( /*index*/ u[26] - )) && ye(e, "aria-selected", f), c & /*selected_indices, filtered_indices*/ - 18 && Ye( + )) && ke(e, "aria-selected", f), c & /*selected_indices, filtered_indices*/ + 18 && Oe( e, "selected", /*selected_indices*/ @@ -5727,21 +5761,21 @@ function Fs(l) { u[26] ) ), c & /*filtered_indices, active_index*/ - 34 && Ye( + 34 && Oe( e, "active", /*index*/ u[26] === /*active_index*/ u[5] ), c & /*filtered_indices, active_index*/ - 34 && Ye( + 34 && Oe( e, "bg-gray-100", /*index*/ u[26] === /*active_index*/ u[5] ), c & /*filtered_indices, active_index*/ - 34 && Ye( + 34 && Oe( e, "dark:bg-gray-600", /*index*/ @@ -5750,34 +5784,34 @@ function Fs(l) { ); }, d(u) { - u && pn(e); + u && Cn(e); } }; } -function Cd(l) { - let e, t, n, i, s; - na( +function Fd(l) { + let e, t, n, i, o; + fa( /*onwindowresize*/ l[19] ); - let a = ( + let s = ( /*show_options*/ l[2] && !/*disabled*/ - l[3] && Is(l) + l[3] && No(l) ); return { c() { - e = rl("div"), t = bi(), a && a.c(), n = hd(), ye(e, "class", "reference"); + e = gl("div"), t = ki(), s && s.c(), n = Md(), ke(e, "class", "reference"); }, - m(r, o) { - kn(r, e, o), l[20](e), kn(r, t, o), a && a.m(r, o), kn(r, n, o), i || (s = [ - mi( + m(r, a) { + Sn(r, e, a), l[20](e), Sn(r, t, a), s && s.m(r, a), Sn(r, n, a), i || (o = [ + vi( window, "scroll", /*scroll_listener*/ l[12] ), - mi( + vi( window, "resize", /*onwindowresize*/ @@ -5785,105 +5819,105 @@ function Cd(l) { ) ], i = !0); }, - p(r, [o]) { + p(r, [a]) { /*show_options*/ r[2] && !/*disabled*/ - r[3] ? a ? (a.p(r, o), o & /*show_options, disabled*/ - 12 && Kl(a, 1)) : (a = Is(r), a.c(), Kl(a, 1), a.m(n.parentNode, n)) : a && (md(), Rs(a, 1, 1, () => { - a = null; - }), _d()); + r[3] ? s ? (s.p(r, a), a & /*show_options, disabled*/ + 12 && ti(s, 1)) : (s = No(r), s.c(), ti(s, 1), s.m(n.parentNode, n)) : s && (Ad(), Uo(s, 1, 1, () => { + s = null; + }), Bd()); }, i(r) { - Kl(a); + ti(s); }, o(r) { - Rs(a); + Uo(s); }, d(r) { - r && (pn(e), pn(t), pn(n)), l[20](null), a && a.d(r), i = !1, wd(s); + r && (Cn(e), Cn(t), Cn(n)), l[20](null), s && s.d(r), i = !1, Dd(o); } }; } -function Sd(l, e, t) { +function Xd(l, e, t) { var n, i; - let { choices: s } = e, { filtered_indices: a } = e, { show_options: r = !1 } = e, { disabled: o = !1 } = e, { selected_indices: f = [] } = e, { active_index: u = null } = e, c, d, _, b, h, w, g, p, m; - function C() { - const { top: L, bottom: V } = h.getBoundingClientRect(); - t(16, c = L), t(17, d = m - V); + let { choices: o } = e, { filtered_indices: s } = e, { show_options: r = !1 } = e, { disabled: a = !1 } = e, { selected_indices: f = [] } = e, { active_index: u = null } = e, c, _, d, h, b, g, w, p, m; + function v() { + const { top: R, bottom: G } = b.getBoundingClientRect(); + t(16, c = R), t(17, _ = m - G); } - let z = null; + let S = null; function y() { - r && (z !== null && clearTimeout(z), z = setTimeout( + r && (S !== null && clearTimeout(S), S = setTimeout( () => { - C(), z = null; + v(), S = null; }, 10 )); } - const q = yd(); - function v() { + const z = Id(); + function k() { t(11, m = window.innerHeight); } - function E(L) { - Ls[L ? "unshift" : "push"](() => { - h = L, t(6, h); + function q(R) { + Fo[R ? "unshift" : "push"](() => { + b = R, t(6, b); }); } - const F = (L) => q("change", L); - function X(L) { - Ls[L ? "unshift" : "push"](() => { - w = L, t(7, w); + const I = (R) => z("change", R); + function F(R) { + Fo[R ? "unshift" : "push"](() => { + g = R, t(7, g); }); } - return l.$$set = (L) => { - "choices" in L && t(0, s = L.choices), "filtered_indices" in L && t(1, a = L.filtered_indices), "show_options" in L && t(2, r = L.show_options), "disabled" in L && t(3, o = L.disabled), "selected_indices" in L && t(4, f = L.selected_indices), "active_index" in L && t(5, u = L.active_index); + return l.$$set = (R) => { + "choices" in R && t(0, o = R.choices), "filtered_indices" in R && t(1, s = R.filtered_indices), "show_options" in R && t(2, r = R.show_options), "disabled" in R && t(3, a = R.disabled), "selected_indices" in R && t(4, f = R.selected_indices), "active_index" in R && t(5, u = R.active_index); }, l.$$.update = () => { if (l.$$.dirty & /*show_options, refElement, listElement, selected_indices, _a, _b, distance_from_bottom, distance_from_top, input_height*/ 508116) { - if (r && h) { - if (w && f.length > 0) { - let V = w.querySelectorAll("li"); - for (const I of Array.from(V)) - if (I.getAttribute("data-index") === f[0].toString()) { - t(14, n = w == null ? void 0 : w.scrollTo) === null || n === void 0 || n.call(w, 0, I.offsetTop); + if (r && b) { + if (g && f.length > 0) { + let G = g.querySelectorAll("li"); + for (const U of Array.from(G)) + if (U.getAttribute("data-index") === f[0].toString()) { + t(14, n = g == null ? void 0 : g.scrollTo) === null || n === void 0 || n.call(g, 0, U.offsetTop); break; } } - C(); - const L = t(15, i = h.parentElement) === null || i === void 0 ? void 0 : i.getBoundingClientRect(); - t(18, _ = (L == null ? void 0 : L.height) || 0), t(8, b = (L == null ? void 0 : L.width) || 0); + v(); + const R = t(15, i = b.parentElement) === null || i === void 0 ? void 0 : i.getBoundingClientRect(); + t(18, d = (R == null ? void 0 : R.height) || 0), t(8, h = (R == null ? void 0 : R.width) || 0); } - d > c ? (t(10, p = d), t(9, g = null)) : (t(9, g = `${d + _}px`), t(10, p = c - _)); + _ > c ? (t(10, p = _), t(9, w = null)) : (t(9, w = `${_ + d}px`), t(10, p = c - d)); } }, [ + o, s, - a, r, - o, + a, f, u, - h, - w, b, g, + h, + w, p, m, y, - q, + z, n, i, c, - d, _, - v, - E, - F, - X + d, + k, + q, + I, + F ]; } -class zd extends cd { +class Yd extends qd { constructor(e) { - super(), bd(this, e, Sd, Cd, pd, { + super(), Ld(this, e, Xd, Fd, Td, { choices: 0, filtered_indices: 1, show_options: 2, @@ -5893,16 +5927,16 @@ class zd extends cd { }); } } -function qd(l, e) { +function Ud(l, e) { return (l % e + e) % e; } -function Hs(l, e) { +function Wo(l, e) { return l.reduce((t, n, i) => ((!e || n[0].toLowerCase().includes(e.toLowerCase())) && t.push(i), t), []); } -function Ed(l, e, t) { +function Vd(l, e, t) { l("change", e), t || l("input"); } -function Ad(l, e, t) { +function Nd(l, e, t) { if (l.key === "Escape") return [!1, e]; if ((l.key === "ArrowDown" || l.key === "ArrowUp") && t.length >= 0) @@ -5910,83 +5944,83 @@ function Ad(l, e, t) { e = l.key === "ArrowDown" ? t[0] : t[t.length - 1]; else { const n = t.indexOf(e), i = l.key === "ArrowUp" ? -1 : 1; - e = t[qd(n + i, t.length)]; + e = t[Ud(n + i, t.length)]; } return [!0, e]; } const { - SvelteComponent: Bd, - append: pt, + SvelteComponent: Od, + append: kt, attr: ve, - binding_callbacks: Md, - check_outros: Ld, - create_component: gi, - destroy_component: wi, - detach: zi, - element: Vt, - group_outros: Dd, - init: Td, - insert: qi, - listen: on, - mount_component: pi, - run_all: Rd, - safe_not_equal: jd, - set_data: Id, - set_input_value: Xs, - space: Gl, - text: Fd, - toggle_class: Yt, - transition_in: Ot, - transition_out: dn -} = window.__gradio__svelte__internal, { onMount: Hd } = window.__gradio__svelte__internal, { createEventDispatcher: Xd, afterUpdate: Yd } = window.__gradio__svelte__internal; -function Ud(l) { + binding_callbacks: Wd, + check_outros: Pd, + create_component: yi, + destroy_component: Ci, + detach: Ai, + element: Pt, + group_outros: Zd, + init: Kd, + insert: Li, + listen: fn, + mount_component: Si, + run_all: Gd, + safe_not_equal: Jd, + set_data: Qd, + set_input_value: Po, + space: ni, + text: xd, + toggle_class: Nt, + transition_in: Zt, + transition_out: gn +} = window.__gradio__svelte__internal, { onMount: $d } = window.__gradio__svelte__internal, { createEventDispatcher: e1, afterUpdate: t1 } = window.__gradio__svelte__internal; +function n1(l) { let e; return { c() { - e = Fd( + e = xd( /*label*/ l[0] ); }, m(t, n) { - qi(t, e, n); + Li(t, e, n); }, p(t, n) { n[0] & /*label*/ - 1 && Id( + 1 && Qd( e, /*label*/ t[0] ); }, d(t) { - t && zi(e); + t && Ai(e); } }; } -function Ys(l) { +function Zo(l) { let e, t, n; - return t = new Bf({}), { + return t = new Hf({}), { c() { - e = Vt("div"), gi(t.$$.fragment), ve(e, "class", "icon-wrap svelte-1m1zvyj"); + e = Pt("div"), yi(t.$$.fragment), ve(e, "class", "icon-wrap svelte-1m1zvyj"); }, - m(i, s) { - qi(i, e, s), pi(t, e, null), n = !0; + m(i, o) { + Li(i, e, o), Si(t, e, null), n = !0; }, i(i) { - n || (Ot(t.$$.fragment, i), n = !0); + n || (Zt(t.$$.fragment, i), n = !0); }, o(i) { - dn(t.$$.fragment, i), n = !1; + gn(t.$$.fragment, i), n = !1; }, d(i) { - i && zi(e), wi(t); + i && Ai(e), Ci(t); } }; } -function Nd(l) { - let e, t, n, i, s, a, r, o, f, u, c, d, _, b; - t = new so({ +function l1(l) { + let e, t, n, i, o, s, r, a, f, u, c, _, d, h; + t = new ds({ props: { show_label: ( /*show_label*/ @@ -5996,13 +6030,13 @@ function Nd(l) { /*info*/ l[1] ), - $$slots: { default: [Ud] }, + $$slots: { default: [n1] }, $$scope: { ctx: l } } }); - let h = !/*disabled*/ - l[3] && Ys(); - return c = new zd({ + let b = !/*disabled*/ + l[3] && Zo(); + return c = new Yd({ props: { show_options: ( /*show_options*/ @@ -6038,7 +6072,7 @@ function Nd(l) { l[16] ), { c() { - e = Vt("div"), gi(t.$$.fragment), n = Gl(), i = Vt("div"), s = Vt("div"), a = Vt("div"), r = Vt("input"), f = Gl(), h && h.c(), u = Gl(), gi(c.$$.fragment), ve(r, "role", "listbox"), ve(r, "aria-controls", "dropdown-options"), ve( + e = Pt("div"), yi(t.$$.fragment), n = ni(), i = Pt("div"), o = Pt("div"), s = Pt("div"), r = Pt("input"), f = ni(), b && b.c(), u = ni(), yi(c.$$.fragment), ve(r, "role", "listbox"), ve(r, "aria-controls", "dropdown-options"), ve( r, "aria-expanded", /*show_options*/ @@ -6049,239 +6083,239 @@ function Nd(l) { /*label*/ l[0] ), ve(r, "class", "border-none svelte-1m1zvyj"), r.disabled = /*disabled*/ - l[3], ve(r, "autocomplete", "off"), r.readOnly = o = !/*filterable*/ - l[7], Yt(r, "subdued", !/*choices_names*/ + l[3], ve(r, "autocomplete", "off"), r.readOnly = a = !/*filterable*/ + l[7], Nt(r, "subdued", !/*choices_names*/ l[13].includes( /*input_text*/ l[9] ) && !/*allow_custom_value*/ - l[6]), ve(a, "class", "secondary-wrap svelte-1m1zvyj"), ve(s, "class", "wrap-inner svelte-1m1zvyj"), Yt( - s, + l[6]), ve(s, "class", "secondary-wrap svelte-1m1zvyj"), ve(o, "class", "wrap-inner svelte-1m1zvyj"), Nt( + o, "show_options", /*show_options*/ l[12] - ), ve(i, "class", "wrap svelte-1m1zvyj"), ve(e, "class", "svelte-1m1zvyj"), Yt( + ), ve(i, "class", "wrap svelte-1m1zvyj"), ve(e, "class", "svelte-1m1zvyj"), Nt( e, "container", /*container*/ l[5] ); }, - m(w, g) { - qi(w, e, g), pi(t, e, null), pt(e, n), pt(e, i), pt(i, s), pt(s, a), pt(a, r), Xs( + m(g, w) { + Li(g, e, w), Si(t, e, null), kt(e, n), kt(e, i), kt(i, o), kt(o, s), kt(s, r), Po( r, /*input_text*/ l[9] - ), l[29](r), pt(a, f), h && h.m(a, null), pt(i, u), pi(c, i, null), d = !0, _ || (b = [ - on( + ), l[29](r), kt(s, f), b && b.m(s, null), kt(i, u), Si(c, i, null), _ = !0, d || (h = [ + fn( r, "input", /*input_input_handler*/ l[28] ), - on( + fn( r, "keydown", /*handle_key_down*/ l[19] ), - on( + fn( r, "keyup", /*keyup_handler*/ l[30] ), - on( + fn( r, "blur", /*handle_blur*/ l[18] ), - on( + fn( r, "focus", /*handle_focus*/ l[17] ) - ], _ = !0); + ], d = !0); }, - p(w, g) { + p(g, w) { const p = {}; - g[0] & /*show_label*/ + w[0] & /*show_label*/ 16 && (p.show_label = /*show_label*/ - w[4]), g[0] & /*info*/ + g[4]), w[0] & /*info*/ 2 && (p.info = /*info*/ - w[1]), g[0] & /*label*/ - 1 | g[1] & /*$$scope*/ - 4 && (p.$$scope = { dirty: g, ctx: w }), t.$set(p), (!d || g[0] & /*show_options*/ + g[1]), w[0] & /*label*/ + 1 | w[1] & /*$$scope*/ + 4 && (p.$$scope = { dirty: w, ctx: g }), t.$set(p), (!_ || w[0] & /*show_options*/ 4096) && ve( r, "aria-expanded", /*show_options*/ - w[12] - ), (!d || g[0] & /*label*/ + g[12] + ), (!_ || w[0] & /*label*/ 1) && ve( r, "aria-label", /*label*/ - w[0] - ), (!d || g[0] & /*disabled*/ + g[0] + ), (!_ || w[0] & /*disabled*/ 8) && (r.disabled = /*disabled*/ - w[3]), (!d || g[0] & /*filterable*/ - 128 && o !== (o = !/*filterable*/ - w[7])) && (r.readOnly = o), g[0] & /*input_text*/ + g[3]), (!_ || w[0] & /*filterable*/ + 128 && a !== (a = !/*filterable*/ + g[7])) && (r.readOnly = a), w[0] & /*input_text*/ 512 && r.value !== /*input_text*/ - w[9] && Xs( + g[9] && Po( r, /*input_text*/ - w[9] - ), (!d || g[0] & /*choices_names, input_text, allow_custom_value*/ - 8768) && Yt(r, "subdued", !/*choices_names*/ - w[13].includes( + g[9] + ), (!_ || w[0] & /*choices_names, input_text, allow_custom_value*/ + 8768) && Nt(r, "subdued", !/*choices_names*/ + g[13].includes( /*input_text*/ - w[9] + g[9] ) && !/*allow_custom_value*/ - w[6]), /*disabled*/ - w[3] ? h && (Dd(), dn(h, 1, 1, () => { - h = null; - }), Ld()) : h ? g[0] & /*disabled*/ - 8 && Ot(h, 1) : (h = Ys(), h.c(), Ot(h, 1), h.m(a, null)), (!d || g[0] & /*show_options*/ - 4096) && Yt( - s, + g[6]), /*disabled*/ + g[3] ? b && (Zd(), gn(b, 1, 1, () => { + b = null; + }), Pd()) : b ? w[0] & /*disabled*/ + 8 && Zt(b, 1) : (b = Zo(), b.c(), Zt(b, 1), b.m(s, null)), (!_ || w[0] & /*show_options*/ + 4096) && Nt( + o, "show_options", /*show_options*/ - w[12] + g[12] ); const m = {}; - g[0] & /*show_options*/ + w[0] & /*show_options*/ 4096 && (m.show_options = /*show_options*/ - w[12]), g[0] & /*choices*/ + g[12]), w[0] & /*choices*/ 4 && (m.choices = /*choices*/ - w[2]), g[0] & /*filtered_indices*/ + g[2]), w[0] & /*filtered_indices*/ 1024 && (m.filtered_indices = /*filtered_indices*/ - w[10]), g[0] & /*disabled*/ + g[10]), w[0] & /*disabled*/ 8 && (m.disabled = /*disabled*/ - w[3]), g[0] & /*selected_index*/ + g[3]), w[0] & /*selected_index*/ 2048 && (m.selected_indices = /*selected_index*/ - w[11] === null ? [] : [ + g[11] === null ? [] : [ /*selected_index*/ - w[11] - ]), g[0] & /*active_index*/ + g[11] + ]), w[0] & /*active_index*/ 16384 && (m.active_index = /*active_index*/ - w[14]), c.$set(m), (!d || g[0] & /*container*/ - 32) && Yt( + g[14]), c.$set(m), (!_ || w[0] & /*container*/ + 32) && Nt( e, "container", /*container*/ - w[5] + g[5] ); }, - i(w) { - d || (Ot(t.$$.fragment, w), Ot(h), Ot(c.$$.fragment, w), d = !0); + i(g) { + _ || (Zt(t.$$.fragment, g), Zt(b), Zt(c.$$.fragment, g), _ = !0); }, - o(w) { - dn(t.$$.fragment, w), dn(h), dn(c.$$.fragment, w), d = !1; + o(g) { + gn(t.$$.fragment, g), gn(b), gn(c.$$.fragment, g), _ = !1; }, - d(w) { - w && zi(e), wi(t), l[29](null), h && h.d(), wi(c), _ = !1, Rd(b); + d(g) { + g && Ai(e), Ci(t), l[29](null), b && b.d(), Ci(c), d = !1, Gd(h); } }; } -function Vd(l, e, t) { - let { label: n } = e, { info: i = void 0 } = e, { value: s = [] } = e, a = [], { value_is_output: r = !1 } = e, { choices: o } = e, f, { disabled: u = !1 } = e, { show_label: c } = e, { container: d = !0 } = e, { allow_custom_value: _ = !1 } = e, { filterable: b = !0 } = e, h, w = !1, g, p, m = "", C = "", z = !1, y = [], q = null, v = null, E; - const F = Xd(); - s ? (E = o.map((D) => D[1]).indexOf(s), v = E, v === -1 ? (a = s, v = null) : ([m, a] = o[v], C = m), L()) : o.length > 0 && (E = 0, v = 0, [m, s] = o[v], a = s, C = m); - function X() { - t(13, g = o.map((D) => D[0])), t(24, p = o.map((D) => D[1])); +function i1(l, e, t) { + let { label: n } = e, { info: i = void 0 } = e, { value: o = [] } = e, s = [], { value_is_output: r = !1 } = e, { choices: a } = e, f, { disabled: u = !1 } = e, { show_label: c } = e, { container: _ = !0 } = e, { allow_custom_value: d = !1 } = e, { filterable: h = !0 } = e, b, g = !1, w, p, m = "", v = "", S = !1, y = [], z = null, k = null, q; + const I = e1(); + o ? (q = a.map((D) => D[1]).indexOf(o), k = q, k === -1 ? (s = o, k = null) : ([m, s] = a[k], v = m), R()) : a.length > 0 && (q = 0, k = 0, [m, o] = a[k], s = o, v = m); + function F() { + t(13, w = a.map((D) => D[0])), t(24, p = a.map((D) => D[1])); } - function L() { - X(), s === void 0 || Array.isArray(s) && s.length === 0 ? (t(9, m = ""), t(11, v = null)) : p.includes(s) ? (t(9, m = g[p.indexOf(s)]), t(11, v = p.indexOf(s))) : _ ? (t(9, m = s), t(11, v = null)) : (t(9, m = ""), t(11, v = null)), t(27, E = v); + function R() { + F(), o === void 0 || Array.isArray(o) && o.length === 0 ? (t(9, m = ""), t(11, k = null)) : p.includes(o) ? (t(9, m = w[p.indexOf(o)]), t(11, k = p.indexOf(o))) : d ? (t(9, m = o), t(11, k = null)) : (t(9, m = ""), t(11, k = null)), t(27, q = k); } - function V(D) { - if (t(11, v = parseInt(D.detail.target.dataset.index)), isNaN(v)) { - t(11, v = null); + function G(D) { + if (t(11, k = parseInt(D.detail.target.dataset.index)), isNaN(k)) { + t(11, k = null); return; } - t(12, w = !1), t(14, q = null), h.blur(); + t(12, g = !1), t(14, z = null), b.blur(); } - function I(D) { - t(10, y = o.map((fe, Se) => Se)), t(12, w = !0), F("focus"); + function U(D) { + t(10, y = a.map((ue, Ce) => Ce)), t(12, g = !0), I("focus"); } - function Q() { - _ ? t(20, s = m) : t(9, m = g[p.indexOf(s)]), t(12, w = !1), t(14, q = null), F("blur"); + function X() { + d ? t(20, o = m) : t(9, m = w[p.indexOf(o)]), t(12, g = !1), t(14, z = null), I("blur"); } - function W(D) { - t(12, [w, q] = Ad(D, q, y), w, (t(14, q), t(2, o), t(23, f), t(6, _), t(9, m), t(10, y), t(8, h), t(25, C), t(11, v), t(27, E), t(26, z), t(24, p))), D.key === "Enter" && (q !== null ? (t(11, v = q), t(12, w = !1), h.blur(), t(14, q = null)) : g.includes(m) ? (t(11, v = g.indexOf(m)), t(12, w = !1), t(14, q = null), h.blur()) : _ && (t(20, s = m), t(11, v = null), t(12, w = !1), t(14, q = null), h.blur()), F("enter", s)); + function O(D) { + t(12, [g, z] = Nd(D, z, y), g, (t(14, z), t(2, a), t(23, f), t(6, d), t(9, m), t(10, y), t(8, b), t(25, v), t(11, k), t(27, q), t(26, S), t(24, p))), D.key === "Enter" && (z !== null ? (t(11, k = z), t(12, g = !1), b.blur(), t(14, z = null)) : w.includes(m) ? (t(11, k = w.indexOf(m)), t(12, g = !1), t(14, z = null), b.blur()) : d && (t(20, o = m), t(11, k = null), t(12, g = !1), t(14, z = null), b.blur()), I("enter", o)); } - Yd(() => { - t(21, r = !1), t(26, z = !0); - }), Hd(() => { - h.focus(); + t1(() => { + t(21, r = !1), t(26, S = !0); + }), $d(() => { + b.focus(); }); - function le() { - m = this.value, t(9, m), t(11, v), t(27, E), t(26, z), t(2, o), t(24, p); + function _e() { + m = this.value, t(9, m), t(11, k), t(27, q), t(26, S), t(2, a), t(24, p); } - function ae(D) { - Md[D ? "unshift" : "push"](() => { - h = D, t(8, h); + function oe(D) { + Wd[D ? "unshift" : "push"](() => { + b = D, t(8, b); }); } - const re = (D) => F("key_up", { key: D.key, input_value: m }); + const fe = (D) => I("key_up", { key: D.key, input_value: m }); return l.$$set = (D) => { - "label" in D && t(0, n = D.label), "info" in D && t(1, i = D.info), "value" in D && t(20, s = D.value), "value_is_output" in D && t(21, r = D.value_is_output), "choices" in D && t(2, o = D.choices), "disabled" in D && t(3, u = D.disabled), "show_label" in D && t(4, c = D.show_label), "container" in D && t(5, d = D.container), "allow_custom_value" in D && t(6, _ = D.allow_custom_value), "filterable" in D && t(7, b = D.filterable); + "label" in D && t(0, n = D.label), "info" in D && t(1, i = D.info), "value" in D && t(20, o = D.value), "value_is_output" in D && t(21, r = D.value_is_output), "choices" in D && t(2, a = D.choices), "disabled" in D && t(3, u = D.disabled), "show_label" in D && t(4, c = D.show_label), "container" in D && t(5, _ = D.container), "allow_custom_value" in D && t(6, d = D.allow_custom_value), "filterable" in D && t(7, h = D.filterable); }, l.$$.update = () => { l.$$.dirty[0] & /*selected_index, old_selected_index, initialized, choices, choices_values*/ - 218105860 && v !== E && v !== null && z && (t(9, [m, s] = o[v], m, (t(20, s), t(11, v), t(27, E), t(26, z), t(2, o), t(24, p))), t(27, E = v), F("select", { - index: v, - value: p[v], + 218105860 && k !== q && k !== null && S && (t(9, [m, o] = a[k], m, (t(20, o), t(11, k), t(27, q), t(26, S), t(2, a), t(24, p))), t(27, q = k), I("select", { + index: k, + value: p[k], selected: !0 })), l.$$.dirty[0] & /*value, old_value, value_is_output*/ - 7340032 && s != a && (L(), Ed(F, s, r), t(22, a = s)), l.$$.dirty[0] & /*choices*/ - 4 && X(), l.$$.dirty[0] & /*choices, old_choices, allow_custom_value, input_text, filtered_indices, filter_input*/ - 8390468 && o !== f && (_ || L(), t(23, f = o), t(10, y = Hs(o, m)), !_ && y.length > 0 && t(14, q = y[0]), h == document.activeElement && t(12, w = !0)), l.$$.dirty[0] & /*input_text, old_input_text, choices, allow_custom_value, filtered_indices*/ - 33556036 && m !== C && (t(10, y = Hs(o, m)), t(25, C = m), !_ && y.length > 0 && t(14, q = y[0])); + 7340032 && o != s && (R(), Vd(I, o, r), t(22, s = o)), l.$$.dirty[0] & /*choices*/ + 4 && F(), l.$$.dirty[0] & /*choices, old_choices, allow_custom_value, input_text, filtered_indices, filter_input*/ + 8390468 && a !== f && (d || R(), t(23, f = a), t(10, y = Wo(a, m)), !d && y.length > 0 && t(14, z = y[0]), b == document.activeElement && t(12, g = !0)), l.$$.dirty[0] & /*input_text, old_input_text, choices, allow_custom_value, filtered_indices*/ + 33556036 && m !== v && (t(10, y = Wo(a, m)), t(25, v = m), !d && y.length > 0 && t(14, z = y[0])); }, [ n, i, - o, + a, u, c, - d, _, - b, + d, h, + b, m, y, - v, - w, + k, g, - q, - F, - V, + w, + z, I, - Q, - W, - s, + G, + U, + X, + O, + o, r, - a, + s, f, p, - C, - z, - E, - le, - ae, - re + v, + S, + q, + _e, + oe, + fe ]; } -class Od extends Bd { +class o1 extends Od { constructor(e) { - super(), Td( + super(), Kd( this, e, - Vd, - Nd, - jd, + i1, + l1, + Jd, { label: 0, info: 1, @@ -6300,45 +6334,45 @@ class Od extends Bd { } } const { - SvelteComponent: Wd, - append: Ue, - attr: Yn, - check_outros: Pd, - create_component: hn, - destroy_component: mn, - detach: An, - element: ot, - group_outros: Zd, - init: Kd, - insert: Bn, - mount_component: bn, - safe_not_equal: Gd, - set_style: gn, - space: Un, - text: Ei, - transition_in: at, - transition_out: kt -} = window.__gradio__svelte__internal, { createEventDispatcher: Jd } = window.__gradio__svelte__internal, { onMount: Qd, onDestroy: xd } = window.__gradio__svelte__internal; -function $d(l) { + SvelteComponent: s1, + append: We, + attr: Kn, + check_outros: a1, + create_component: bn, + destroy_component: wn, + detach: jn, + element: ft, + group_outros: r1, + init: f1, + insert: Hn, + mount_component: pn, + safe_not_equal: u1, + set_style: vn, + space: Gn, + text: Ri, + transition_in: ut, + transition_out: yt +} = window.__gradio__svelte__internal, { createEventDispatcher: c1 } = window.__gradio__svelte__internal, { onMount: _1, onDestroy: d1 } = window.__gradio__svelte__internal; +function h1(l) { let e; return { c() { - e = Ei("Cancel"); + e = Ri("Cancel"); }, m(t, n) { - Bn(t, e, n); + Hn(t, e, n); }, d(t) { - t && An(e); + t && jn(e); } }; } -function Us(l) { +function Ko(l) { let e, t, n; - return t = new hi({ + return t = new pi({ props: { variant: "stop", - $$slots: { default: [e1] }, + $$slots: { default: [m1] }, $$scope: { ctx: l } } }), t.$on( @@ -6347,58 +6381,58 @@ function Us(l) { l[12] ), { c() { - e = ot("div"), hn(t.$$.fragment), gn(e, "margin-right", "8px"); + e = ft("div"), bn(t.$$.fragment), vn(e, "margin-right", "8px"); }, - m(i, s) { - Bn(i, e, s), bn(t, e, null), n = !0; + m(i, o) { + Hn(i, e, o), pn(t, e, null), n = !0; }, - p(i, s) { - const a = {}; - s & /*$$scope*/ - 65536 && (a.$$scope = { dirty: s, ctx: i }), t.$set(a); + p(i, o) { + const s = {}; + o & /*$$scope*/ + 65536 && (s.$$scope = { dirty: o, ctx: i }), t.$set(s); }, i(i) { - n || (at(t.$$.fragment, i), n = !0); + n || (ut(t.$$.fragment, i), n = !0); }, o(i) { - kt(t.$$.fragment, i), n = !1; + yt(t.$$.fragment, i), n = !1; }, d(i) { - i && An(e), mn(t); + i && jn(e), wn(t); } }; } -function e1(l) { +function m1(l) { let e; return { c() { - e = Ei("Remove"); + e = Ri("Remove"); }, m(t, n) { - Bn(t, e, n); + Hn(t, e, n); }, d(t) { - t && An(e); + t && jn(e); } }; } -function t1(l) { +function g1(l) { let e; return { c() { - e = Ei("OK"); + e = Ri("OK"); }, m(t, n) { - Bn(t, e, n); + Hn(t, e, n); }, d(t) { - t && An(e); + t && jn(e); } }; } -function n1(l) { - let e, t, n, i, s, a, r, o, f, u, c, d, _, b, h, w; - s = new Od({ +function b1(l) { + let e, t, n, i, o, s, r, a, f, u, c, _, d, h, b, g; + o = new o1({ props: { value: ( /*currentLabel*/ @@ -6412,15 +6446,15 @@ function n1(l) { show_label: !1, allow_custom_value: !0 } - }), s.$on( + }), o.$on( "change", /*onDropDownChange*/ l[5] - ), s.$on( + ), o.$on( "enter", /*onDropDownEnter*/ l[7] - ), o = new x_({ + ), a = new dd({ props: { value: ( /*currentColor*/ @@ -6429,13 +6463,13 @@ function n1(l) { label: "Color", show_label: !1 } - }), o.$on( + }), a.$on( "change", /*onColorChange*/ l[6] - ), c = new hi({ + ), c = new pi({ props: { - $$slots: { default: [$d] }, + $$slots: { default: [h1] }, $$scope: { ctx: l } } }), c.$on( @@ -6443,118 +6477,118 @@ function n1(l) { /*click_handler*/ l[11] ); - let g = ( + let w = ( /*showRemove*/ - l[3] && Us(l) + l[3] && Ko(l) ); - return h = new hi({ + return b = new pi({ props: { variant: "primary", - $$slots: { default: [t1] }, + $$slots: { default: [g1] }, $$scope: { ctx: l } } - }), h.$on( + }), b.$on( "click", /*click_handler_2*/ l[13] ), { c() { - e = ot("div"), t = ot("div"), n = ot("span"), i = ot("div"), hn(s.$$.fragment), a = Un(), r = ot("div"), hn(o.$$.fragment), f = Un(), u = ot("div"), hn(c.$$.fragment), d = Un(), g && g.c(), _ = Un(), b = ot("div"), hn(h.$$.fragment), gn(i, "margin-right", "10px"), gn(r, "margin-right", "40px"), gn(r, "margin-bottom", "8px"), gn(u, "margin-right", "8px"), Yn(n, "class", "model-content svelte-hkn2q1"), Yn(t, "class", "modal-container svelte-hkn2q1"), Yn(e, "class", "modal svelte-hkn2q1"), Yn(e, "id", "model-box-edit"); + e = ft("div"), t = ft("div"), n = ft("span"), i = ft("div"), bn(o.$$.fragment), s = Gn(), r = ft("div"), bn(a.$$.fragment), f = Gn(), u = ft("div"), bn(c.$$.fragment), _ = Gn(), w && w.c(), d = Gn(), h = ft("div"), bn(b.$$.fragment), vn(i, "margin-right", "10px"), vn(r, "margin-right", "40px"), vn(r, "margin-bottom", "8px"), vn(u, "margin-right", "8px"), Kn(n, "class", "model-content svelte-hkn2q1"), Kn(t, "class", "modal-container svelte-hkn2q1"), Kn(e, "class", "modal svelte-hkn2q1"), Kn(e, "id", "model-box-edit"); }, m(p, m) { - Bn(p, e, m), Ue(e, t), Ue(t, n), Ue(n, i), bn(s, i, null), Ue(n, a), Ue(n, r), bn(o, r, null), Ue(n, f), Ue(n, u), bn(c, u, null), Ue(n, d), g && g.m(n, null), Ue(n, _), Ue(n, b), bn(h, b, null), w = !0; + Hn(p, e, m), We(e, t), We(t, n), We(n, i), pn(o, i, null), We(n, s), We(n, r), pn(a, r, null), We(n, f), We(n, u), pn(c, u, null), We(n, _), w && w.m(n, null), We(n, d), We(n, h), pn(b, h, null), g = !0; }, p(p, [m]) { - const C = {}; + const v = {}; m & /*currentLabel*/ - 1 && (C.value = /*currentLabel*/ + 1 && (v.value = /*currentLabel*/ p[0]), m & /*choices*/ - 4 && (C.choices = /*choices*/ - p[2]), s.$set(C); - const z = {}; + 4 && (v.choices = /*choices*/ + p[2]), o.$set(v); + const S = {}; m & /*currentColor*/ - 2 && (z.value = /*currentColor*/ - p[1]), o.$set(z); + 2 && (S.value = /*currentColor*/ + p[1]), a.$set(S); const y = {}; m & /*$$scope*/ 65536 && (y.$$scope = { dirty: m, ctx: p }), c.$set(y), /*showRemove*/ - p[3] ? g ? (g.p(p, m), m & /*showRemove*/ - 8 && at(g, 1)) : (g = Us(p), g.c(), at(g, 1), g.m(n, _)) : g && (Zd(), kt(g, 1, 1, () => { - g = null; - }), Pd()); - const q = {}; + p[3] ? w ? (w.p(p, m), m & /*showRemove*/ + 8 && ut(w, 1)) : (w = Ko(p), w.c(), ut(w, 1), w.m(n, d)) : w && (r1(), yt(w, 1, 1, () => { + w = null; + }), a1()); + const z = {}; m & /*$$scope*/ - 65536 && (q.$$scope = { dirty: m, ctx: p }), h.$set(q); + 65536 && (z.$$scope = { dirty: m, ctx: p }), b.$set(z); }, i(p) { - w || (at(s.$$.fragment, p), at(o.$$.fragment, p), at(c.$$.fragment, p), at(g), at(h.$$.fragment, p), w = !0); + g || (ut(o.$$.fragment, p), ut(a.$$.fragment, p), ut(c.$$.fragment, p), ut(w), ut(b.$$.fragment, p), g = !0); }, o(p) { - kt(s.$$.fragment, p), kt(o.$$.fragment, p), kt(c.$$.fragment, p), kt(g), kt(h.$$.fragment, p), w = !1; + yt(o.$$.fragment, p), yt(a.$$.fragment, p), yt(c.$$.fragment, p), yt(w), yt(b.$$.fragment, p), g = !1; }, d(p) { - p && An(e), mn(s), mn(o), mn(c), g && g.d(), mn(h); + p && jn(e), wn(o), wn(a), wn(c), w && w.d(), wn(b); } }; } -function l1(l, e, t) { - let { label: n = "" } = e, { currentLabel: i = "" } = e, { choices: s = [] } = e, { choicesColors: a = [] } = e, { color: r = "" } = e, { currentColor: o = "" } = e, { showRemove: f = !0 } = e; - const u = Jd(); +function w1(l, e, t) { + let { label: n = "" } = e, { currentLabel: i = "" } = e, { choices: o = [] } = e, { choicesColors: s = [] } = e, { color: r = "" } = e, { currentColor: a = "" } = e, { showRemove: f = !0 } = e; + const u = c1(); function c(m) { u("change", { label: i, - color: o, + color: a, ret: m // -1: remove, 0: cancel, 1: change }); } - function d(m) { - const { detail: C } = m; - let z = C; - Number.isInteger(z) ? (Array.isArray(a) && z < a.length && t(1, o = a[z]), Array.isArray(s) && z < s.length && t(0, i = s[z][0])) : t(0, i = z); - } function _(m) { - const { detail: C } = m; - t(1, o = C); + const { detail: v } = m; + let S = v; + Number.isInteger(S) ? (Array.isArray(s) && S < s.length && t(1, a = s[S]), Array.isArray(o) && S < o.length && t(0, i = o[S][0])) : t(0, i = S); } - function b(m) { - d(m), c(1); + function d(m) { + const { detail: v } = m; + t(1, a = v); } function h(m) { + _(m), c(1); + } + function b(m) { switch (m.key) { case "Enter": c(1); break; } } - Qd(() => { - document.addEventListener("keydown", h), t(0, i = n), t(1, o = r); - }), xd(() => { - document.removeEventListener("keydown", h); + _1(() => { + document.addEventListener("keydown", b), t(0, i = n), t(1, a = r); + }), d1(() => { + document.removeEventListener("keydown", b); }); - const w = () => c(0), g = () => c(-1), p = () => c(1); + const g = () => c(0), w = () => c(-1), p = () => c(1); return l.$$set = (m) => { - "label" in m && t(8, n = m.label), "currentLabel" in m && t(0, i = m.currentLabel), "choices" in m && t(2, s = m.choices), "choicesColors" in m && t(9, a = m.choicesColors), "color" in m && t(10, r = m.color), "currentColor" in m && t(1, o = m.currentColor), "showRemove" in m && t(3, f = m.showRemove); + "label" in m && t(8, n = m.label), "currentLabel" in m && t(0, i = m.currentLabel), "choices" in m && t(2, o = m.choices), "choicesColors" in m && t(9, s = m.choicesColors), "color" in m && t(10, r = m.color), "currentColor" in m && t(1, a = m.currentColor), "showRemove" in m && t(3, f = m.showRemove); }, [ i, + a, o, - s, f, c, - d, _, - b, + d, + h, n, - a, + s, r, - w, g, + w, p ]; } -class la extends Wd { +class ua extends s1 { constructor(e) { - super(), Kd(this, e, l1, n1, Gd, { + super(), f1(this, e, w1, b1, u1, { label: 8, currentLabel: 0, choices: 2, @@ -6565,71 +6599,71 @@ class la extends Wd { }); } } -const te = (l, e, t) => Math.min(Math.max(l, e), t); -function Jl(l, e) { +const ne = (l, e, t) => Math.min(Math.max(l, e), t); +function li(l, e) { if (l.startsWith("rgba")) return l.replace(/[\d.]+$/, e.toString()); const t = l.match(/\d+/g); if (!t || t.length !== 3) return `rgba(50, 50, 50, ${e})`; - const [n, i, s] = t; - return `rgba(${n}, ${i}, ${s}, ${e})`; + const [n, i, o] = t; + return `rgba(${n}, ${i}, ${o}, ${e})`; } -class Ql { - constructor(e, t, n, i, s, a, r, o, f, u, c, d = "rgb(255, 255, 255)", _ = 0.5, b = 25, h = 8, w = 2, g = 4, p = 1) { +class ii { + constructor(e, t, n, i, o, s, r, a, f, u, c, _ = "rgb(255, 255, 255)", d = 0.5, h = 25, b = 8, g = 2, w = 4, p = 1) { this.stopDrag = () => { this.isDragging = !1, document.removeEventListener("mousemove", this.handleDrag), document.removeEventListener("mouseup", this.stopDrag); }, this.handleDrag = (m) => { if (this.isDragging) { - let C = m.clientX - this.offsetMouseX - this.xmin, z = m.clientY - this.offsetMouseY - this.ymin; - const y = this.canvasXmax - this.canvasXmin, q = this.canvasYmax - this.canvasYmin; - C = te(C, -this.xmin, y - this.xmax), z = te(z, -this.ymin, q - this.ymax), this.xmin += C, this.ymin += z, this.xmax += C, this.ymax += z, this.updateHandles(), this.renderCallBack(); + let v = m.clientX - this.offsetMouseX - this.xmin, S = m.clientY - this.offsetMouseY - this.ymin; + const y = this.canvasXmax - this.canvasXmin, z = this.canvasYmax - this.canvasYmin; + v = ne(v, -this.xmin, y - this.xmax), S = ne(S, -this.ymin, z - this.ymax), this.xmin += v, this.ymin += S, this.xmax += v, this.ymax += S, this.updateHandles(), this.renderCallBack(); } }, this.handleCreating = (m) => { if (this.isCreating) { - let [C, z] = this.toBoxCoordinates(m.clientX, m.clientY); - C -= this.offsetMouseX, z -= this.offsetMouseY, C > this.xmax ? (this.creatingAnchorX == "xmax" && (this.xmin = this.xmax), this.xmax = C, this.creatingAnchorX = "xmin") : C > this.xmin && C < this.xmax && this.creatingAnchorX == "xmin" ? this.xmax = C : C > this.xmin && C < this.xmax && this.creatingAnchorX == "xmax" ? this.xmin = C : C < this.xmin && (this.creatingAnchorX == "xmin" && (this.xmax = this.xmin), this.xmin = C, this.creatingAnchorX = "xmax"), z > this.ymax ? (this.creatingAnchorY == "ymax" && (this.ymin = this.ymax), this.ymax = z, this.creatingAnchorY = "ymin") : z > this.ymin && z < this.ymax && this.creatingAnchorY == "ymin" ? this.ymax = z : z > this.ymin && z < this.ymax && this.creatingAnchorY == "ymax" ? this.ymin = z : z < this.ymin && (this.creatingAnchorY == "ymin" && (this.ymax = this.ymin), this.ymin = z, this.creatingAnchorY = "ymax"), this.updateHandles(), this.renderCallBack(); + let [v, S] = this.toBoxCoordinates(m.clientX, m.clientY); + v -= this.offsetMouseX, S -= this.offsetMouseY, v > this.xmax ? (this.creatingAnchorX == "xmax" && (this.xmin = this.xmax), this.xmax = v, this.creatingAnchorX = "xmin") : v > this.xmin && v < this.xmax && this.creatingAnchorX == "xmin" ? this.xmax = v : v > this.xmin && v < this.xmax && this.creatingAnchorX == "xmax" ? this.xmin = v : v < this.xmin && (this.creatingAnchorX == "xmin" && (this.xmax = this.xmin), this.xmin = v, this.creatingAnchorX = "xmax"), S > this.ymax ? (this.creatingAnchorY == "ymax" && (this.ymin = this.ymax), this.ymax = S, this.creatingAnchorY = "ymin") : S > this.ymin && S < this.ymax && this.creatingAnchorY == "ymin" ? this.ymax = S : S > this.ymin && S < this.ymax && this.creatingAnchorY == "ymax" ? this.ymin = S : S < this.ymin && (this.creatingAnchorY == "ymin" && (this.ymax = this.ymin), this.ymin = S, this.creatingAnchorY = "ymax"), this.updateHandles(), this.renderCallBack(); } }, this.stopCreating = (m) => { if (this.isCreating = !1, document.removeEventListener("mousemove", this.handleCreating), document.removeEventListener("mouseup", this.stopCreating), this.getArea() > 0) { - const C = this.canvasXmax - this.canvasXmin, z = this.canvasYmax - this.canvasYmin; - this.xmin = te(this.xmin, 0, C - this.minSize), this.ymin = te(this.ymin, 0, z - this.minSize), this.xmax = te(this.xmax, this.minSize, C), this.ymax = te(this.ymax, this.minSize, z), this.minSize > 0 && (this.getWidth() < this.minSize && (this.creatingAnchorX == "xmin" ? this.xmax = this.xmin + this.minSize : this.xmin = this.xmax - this.minSize), this.getHeight() < this.minSize && (this.creatingAnchorY == "ymin" ? this.ymax = this.ymin + this.minSize : this.ymin = this.ymax - this.minSize), this.xmax > C ? (this.xmin -= this.xmax - C, this.xmax = C) : this.xmin < 0 && (this.xmax -= this.xmin, this.xmin = 0), this.ymax > z ? (this.ymin -= this.ymax - z, this.ymax = z) : this.ymin < 0 && (this.ymax -= this.ymin, this.ymin = 0)), this.updateHandles(), this.renderCallBack(); + const v = this.canvasXmax - this.canvasXmin, S = this.canvasYmax - this.canvasYmin; + this.xmin = ne(this.xmin, 0, v - this.minSize), this.ymin = ne(this.ymin, 0, S - this.minSize), this.xmax = ne(this.xmax, this.minSize, v), this.ymax = ne(this.ymax, this.minSize, S), this.minSize > 0 && (this.getWidth() < this.minSize && (this.creatingAnchorX == "xmin" ? this.xmax = this.xmin + this.minSize : this.xmin = this.xmax - this.minSize), this.getHeight() < this.minSize && (this.creatingAnchorY == "ymin" ? this.ymax = this.ymin + this.minSize : this.ymin = this.ymax - this.minSize), this.xmax > v ? (this.xmin -= this.xmax - v, this.xmax = v) : this.xmin < 0 && (this.xmax -= this.xmin, this.xmin = 0), this.ymax > S ? (this.ymin -= this.ymax - S, this.ymax = S) : this.ymin < 0 && (this.ymax -= this.ymin, this.ymin = 0)), this.updateHandles(), this.renderCallBack(); } this.onFinishCreation(); }, this.handleResize = (m) => { if (this.isResizing) { - const C = m.clientX, z = m.clientY, y = C - this.resizeHandles[this.resizingHandleIndex].xmin - this.offsetMouseX, q = z - this.resizeHandles[this.resizingHandleIndex].ymin - this.offsetMouseY, v = this.canvasXmax - this.canvasXmin, E = this.canvasYmax - this.canvasYmin; + const v = m.clientX, S = m.clientY, y = v - this.resizeHandles[this.resizingHandleIndex].xmin - this.offsetMouseX, z = S - this.resizeHandles[this.resizingHandleIndex].ymin - this.offsetMouseY, k = this.canvasXmax - this.canvasXmin, q = this.canvasYmax - this.canvasYmin; switch (this.resizingHandleIndex) { case 0: - this.xmin += y, this.ymin += q, this.xmin = te(this.xmin, 0, this.xmax - this.minSize), this.ymin = te(this.ymin, 0, this.ymax - this.minSize); + this.xmin += y, this.ymin += z, this.xmin = ne(this.xmin, 0, this.xmax - this.minSize), this.ymin = ne(this.ymin, 0, this.ymax - this.minSize); break; case 1: - this.xmax += y, this.ymin += q, this.xmax = te(this.xmax, this.xmin + this.minSize, v), this.ymin = te(this.ymin, 0, this.ymax - this.minSize); + this.xmax += y, this.ymin += z, this.xmax = ne(this.xmax, this.xmin + this.minSize, k), this.ymin = ne(this.ymin, 0, this.ymax - this.minSize); break; case 2: - this.xmax += y, this.ymax += q, this.xmax = te(this.xmax, this.xmin + this.minSize, v), this.ymax = te(this.ymax, this.ymin + this.minSize, E); + this.xmax += y, this.ymax += z, this.xmax = ne(this.xmax, this.xmin + this.minSize, k), this.ymax = ne(this.ymax, this.ymin + this.minSize, q); break; case 3: - this.xmin += y, this.ymax += q, this.xmin = te(this.xmin, 0, this.xmax - this.minSize), this.ymax = te(this.ymax, this.ymin + this.minSize, E); + this.xmin += y, this.ymax += z, this.xmin = ne(this.xmin, 0, this.xmax - this.minSize), this.ymax = ne(this.ymax, this.ymin + this.minSize, q); break; case 4: - this.ymin += q, this.ymin = te(this.ymin, 0, this.ymax - this.minSize); + this.ymin += z, this.ymin = ne(this.ymin, 0, this.ymax - this.minSize); break; case 5: - this.xmax += y, this.xmax = te(this.xmax, this.xmin + this.minSize, v); + this.xmax += y, this.xmax = ne(this.xmax, this.xmin + this.minSize, k); break; case 6: - this.ymax += q, this.ymax = te(this.ymax, this.ymin + this.minSize, E); + this.ymax += z, this.ymax = ne(this.ymax, this.ymin + this.minSize, q); break; case 7: - this.xmin += y, this.xmin = te(this.xmin, 0, this.xmax - this.minSize); + this.xmin += y, this.xmin = ne(this.xmin, 0, this.xmax - this.minSize); break; } this.updateHandles(), this.renderCallBack(); } }, this.stopResize = () => { this.isResizing = !1, document.removeEventListener("mousemove", this.handleResize), document.removeEventListener("mouseup", this.stopResize); - }, this.renderCallBack = e, this.onFinishCreation = t, this.canvasXmin = n, this.canvasYmin = i, this.canvasXmax = s, this.canvasYmax = a, this.scaleFactor = p, this.label = r, this.isDragging = !1, this.isCreating = !1, this.xmin = o, this.ymin = f, this.xmax = u, this.ymax = c, this.isResizing = !1, this.isSelected = !1, this.offsetMouseX = 0, this.offsetMouseY = 0, this.resizeHandleSize = h, this.thickness = w, this.selectedThickness = g, this.updateHandles(), this.resizingHandleIndex = -1, this.minSize = b, this.color = d, this.alpha = _, this.creatingAnchorX = "xmin", this.creatingAnchorY = "ymin"; + }, this.renderCallBack = e, this.onFinishCreation = t, this.canvasXmin = n, this.canvasYmin = i, this.canvasXmax = o, this.canvasYmax = s, this.scaleFactor = p, this.label = r, this.isDragging = !1, this.isCreating = !1, this.xmin = a, this.ymin = f, this.xmax = u, this.ymax = c, this.isResizing = !1, this.isSelected = !1, this.offsetMouseX = 0, this.offsetMouseY = 0, this.resizeHandleSize = b, this.thickness = g, this.selectedThickness = w, this.updateHandles(), this.resizingHandleIndex = -1, this.minSize = h, this.color = _, this.alpha = d, this.creatingAnchorX = "xmin", this.creatingAnchorY = "ymin"; } toJSON() { return { @@ -6727,13 +6761,13 @@ class Ql { } render(e) { let t, n; - if (e.beginPath(), [t, n] = this.toCanvasCoordinates(this.xmin, this.ymin), e.rect(t, n, this.getWidth(), this.getHeight()), e.fillStyle = Jl(this.color, this.alpha), e.fill(), this.isSelected ? e.lineWidth = this.selectedThickness : e.lineWidth = this.thickness, e.strokeStyle = Jl(this.color, 1), e.stroke(), e.closePath(), this.label !== null && this.label.trim() !== "") { + if (e.beginPath(), [t, n] = this.toCanvasCoordinates(this.xmin, this.ymin), e.rect(t, n, this.getWidth(), this.getHeight()), e.fillStyle = li(this.color, this.alpha), e.fill(), this.isSelected ? e.lineWidth = this.selectedThickness : e.lineWidth = this.thickness, e.strokeStyle = li(this.color, 1), e.stroke(), e.closePath(), this.label !== null && this.label.trim() !== "") { this.isSelected ? e.font = "bold 14px Arial" : e.font = "12px Arial"; - const i = e.measureText(this.label).width + 10, s = 20; - let a = this.xmin, r = this.ymin - s; - e.fillStyle = "white", [a, r] = this.toCanvasCoordinates(a, r), e.fillRect(a, r, i, s), e.lineWidth = 1, e.strokeStyle = "black", e.strokeRect(a, r, i, s), e.fillStyle = "black", e.fillText(this.label, a + 5, r + 15); + const i = e.measureText(this.label).width + 10, o = 20; + let s = this.xmin, r = this.ymin - o; + e.fillStyle = "white", [s, r] = this.toCanvasCoordinates(s, r), e.fillRect(s, r, i, o), e.lineWidth = 1, e.strokeStyle = "black", e.strokeRect(s, r, i, o), e.fillStyle = "black", e.fillText(this.label, s + 5, r + 15); } - e.fillStyle = Jl(this.color, 1); + e.fillStyle = li(this.color, 1); for (const i of this.resizeHandles) [t, n] = this.toCanvasCoordinates(i.xmin, i.ymin), e.fillRect( t, @@ -6764,7 +6798,7 @@ class Ql { this.resizingHandleIndex = e, this.isResizing = !0, this.offsetMouseX = t.clientX - this.resizeHandles[e].xmin, this.offsetMouseY = t.clientY - this.resizeHandles[e].ymin, document.addEventListener("mousemove", this.handleResize), document.addEventListener("mouseup", this.stopResize); } } -const Ut = [ +const Ot = [ "rgb(255, 168, 77)", "rgb(92, 172, 238)", "rgb(255, 99, 71)", @@ -6779,124 +6813,160 @@ const Ut = [ "rgb(255, 193, 7)", "rgb(255, 250, 138)" ], { - SvelteComponent: i1, - append: Jn, - attr: rt, - binding_callbacks: s1, - bubble: Ns, - check_outros: xl, - create_component: fl, - destroy_component: ul, - detach: Wt, - element: vn, - empty: o1, - group_outros: $l, - init: a1, - insert: Pt, - listen: Ct, - mount_component: cl, - run_all: ia, - safe_not_equal: r1, - space: Qn, - toggle_class: Nn, - transition_in: Ce, - transition_out: Ne -} = window.__gradio__svelte__internal, { onMount: f1, onDestroy: u1, createEventDispatcher: c1 } = window.__gradio__svelte__internal; -function Vs(l) { - let e, t, n, i, s, a, r, o, f; - return n = new q_({}), a = new R_({}), { + SvelteComponent: p1, + append: kn, + attr: Pe, + binding_callbacks: v1, + bubble: Go, + check_outros: il, + create_component: Bn, + destroy_component: En, + detach: zt, + element: en, + empty: k1, + group_outros: ol, + init: y1, + insert: qt, + listen: ct, + mount_component: Mn, + noop: C1, + run_all: ca, + safe_not_equal: S1, + space: zn, + toggle_class: Jn, + transition_in: ie, + transition_out: ye +} = window.__gradio__svelte__internal, { onMount: z1, onDestroy: q1, createEventDispatcher: B1 } = window.__gradio__svelte__internal; +function Jo(l) { + let e, t, n, i, o, s, r, a, f, u; + n = new D_({}), s = new U_({}); + let c = ( + /*showRemoveButton*/ + l[1] && Qo(l) + ); + return { c() { - e = vn("span"), t = vn("button"), fl(n.$$.fragment), i = Qn(), s = vn("button"), fl(a.$$.fragment), rt(t, "class", "icon svelte-10jprmi"), rt(t, "aria-label", "Create box"), Nn( + e = en("span"), t = en("button"), Bn(n.$$.fragment), i = zn(), o = en("button"), Bn(s.$$.fragment), r = zn(), c && c.c(), Pe(t, "class", "icon svelte-10jprmi"), Pe(t, "aria-label", "Create box"), Jn( t, "selected", /*mode*/ - l[7] === /*Mode*/ - l[4].creation - ), rt(s, "class", "icon svelte-10jprmi"), rt(s, "aria-label", "Edit boxes"), Nn( - s, + l[8] === /*Mode*/ + l[5].creation + ), Pe(o, "class", "icon svelte-10jprmi"), Pe(o, "aria-label", "Edit boxes"), Jn( + o, "selected", /*mode*/ - l[7] === /*Mode*/ - l[4].drag - ), rt(e, "class", "canvas-control svelte-10jprmi"); + l[8] === /*Mode*/ + l[5].drag + ), Pe(e, "class", "canvas-control svelte-10jprmi"); }, - m(u, c) { - Pt(u, e, c), Jn(e, t), cl(n, t, null), Jn(e, i), Jn(e, s), cl(a, s, null), r = !0, o || (f = [ - Ct( + m(_, d) { + qt(_, e, d), kn(e, t), Mn(n, t, null), kn(e, i), kn(e, o), Mn(s, o, null), kn(e, r), c && c.m(e, null), a = !0, f || (u = [ + ct( t, "click", /*click_handler*/ - l[27] + l[29] ), - Ct( - s, + ct( + o, "click", /*click_handler_1*/ - l[28] + l[30] ) - ], o = !0); + ], f = !0); }, - p(u, c) { - (!r || c[0] & /*mode, Mode*/ - 144) && Nn( + p(_, d) { + (!a || d[0] & /*mode, Mode*/ + 288) && Jn( t, "selected", /*mode*/ - u[7] === /*Mode*/ - u[4].creation - ), (!r || c[0] & /*mode, Mode*/ - 144) && Nn( - s, + _[8] === /*Mode*/ + _[5].creation + ), (!a || d[0] & /*mode, Mode*/ + 288) && Jn( + o, "selected", /*mode*/ - u[7] === /*Mode*/ - u[4].drag - ); + _[8] === /*Mode*/ + _[5].drag + ), /*showRemoveButton*/ + _[1] ? c ? (c.p(_, d), d[0] & /*showRemoveButton*/ + 2 && ie(c, 1)) : (c = Qo(_), c.c(), ie(c, 1), c.m(e, null)) : c && (ol(), ye(c, 1, 1, () => { + c = null; + }), il()); }, - i(u) { - r || (Ce(n.$$.fragment, u), Ce(a.$$.fragment, u), r = !0); + i(_) { + a || (ie(n.$$.fragment, _), ie(s.$$.fragment, _), ie(c), a = !0); }, - o(u) { - Ne(n.$$.fragment, u), Ne(a.$$.fragment, u), r = !1; + o(_) { + ye(n.$$.fragment, _), ye(s.$$.fragment, _), ye(c), a = !1; }, - d(u) { - u && Wt(e), ul(n), ul(a), o = !1, ia(f); + d(_) { + _ && zt(e), En(n), En(s), c && c.d(), f = !1, ca(u); + } + }; +} +function Qo(l) { + let e, t, n, i, o; + return t = new G_({}), { + c() { + e = en("button"), Bn(t.$$.fragment), Pe(e, "class", "icon svelte-10jprmi"), Pe(e, "aria-label", "Remove boxes"); + }, + m(s, r) { + qt(s, e, r), Mn(t, e, null), n = !0, i || (o = ct( + e, + "click", + /*click_handler_2*/ + l[31] + ), i = !0); + }, + p: C1, + i(s) { + n || (ie(t.$$.fragment, s), n = !0); + }, + o(s) { + ye(t.$$.fragment, s), n = !1; + }, + d(s) { + s && zt(e), En(t), i = !1, o(); } }; } -function Os(l) { +function xo(l) { let e, t; - return e = new la({ + return e = new ua({ props: { choices: ( /*choices*/ - l[2] + l[3] ), choicesColors: ( /*choicesColors*/ - l[3] + l[4] ), label: ( /*selectedBox*/ - l[6] >= 0 && /*selectedBox*/ - l[6] < /*value*/ + l[7] >= 0 && /*selectedBox*/ + l[7] < /*value*/ l[0].boxes.length ? ( /*value*/ l[0].boxes[ /*selectedBox*/ - l[6] + l[7] ].label ) : "" ), color: ( /*selectedBox*/ - l[6] >= 0 && /*selectedBox*/ - l[6] < /*value*/ - l[0].boxes.length ? Cn( + l[7] >= 0 && /*selectedBox*/ + l[7] < /*value*/ + l[0].boxes.length ? An( /*value*/ l[0].boxes[ /*selectedBox*/ - l[6] + l[7] ].color ) : "" ) @@ -6904,91 +6974,91 @@ function Os(l) { }), e.$on( "change", /*onModalEditChange*/ - l[15] + l[16] ), e.$on( "enter{onModalEditChange}", /*enter_onModalEditChange_handler*/ - l[29] + l[32] ), { c() { - fl(e.$$.fragment); + Bn(e.$$.fragment); }, m(n, i) { - cl(e, n, i), t = !0; + Mn(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*choices*/ - 4 && (s.choices = /*choices*/ - n[2]), i[0] & /*choicesColors*/ - 8 && (s.choicesColors = /*choicesColors*/ - n[3]), i[0] & /*selectedBox, value*/ - 65 && (s.label = /*selectedBox*/ - n[6] >= 0 && /*selectedBox*/ - n[6] < /*value*/ + 8 && (o.choices = /*choices*/ + n[3]), i[0] & /*choicesColors*/ + 16 && (o.choicesColors = /*choicesColors*/ + n[4]), i[0] & /*selectedBox, value*/ + 129 && (o.label = /*selectedBox*/ + n[7] >= 0 && /*selectedBox*/ + n[7] < /*value*/ n[0].boxes.length ? ( /*value*/ n[0].boxes[ /*selectedBox*/ - n[6] + n[7] ].label ) : ""), i[0] & /*selectedBox, value*/ - 65 && (s.color = /*selectedBox*/ - n[6] >= 0 && /*selectedBox*/ - n[6] < /*value*/ - n[0].boxes.length ? Cn( + 129 && (o.color = /*selectedBox*/ + n[7] >= 0 && /*selectedBox*/ + n[7] < /*value*/ + n[0].boxes.length ? An( /*value*/ n[0].boxes[ /*selectedBox*/ - n[6] + n[7] ].color - ) : ""), e.$set(s); + ) : ""), e.$set(o); }, i(n) { - t || (Ce(e.$$.fragment, n), t = !0); + t || (ie(e.$$.fragment, n), t = !0); }, o(n) { - Ne(e.$$.fragment, n), t = !1; + ye(e.$$.fragment, n), t = !1; }, d(n) { - ul(e, n); + En(e, n); } }; } -function Ws(l) { +function $o(l) { let e, t; - return e = new la({ + return e = new ua({ props: { choices: ( /*choices*/ - l[2] + l[3] ), showRemove: !1, choicesColors: ( /*choicesColors*/ - l[3] + l[4] ), label: ( /*selectedBox*/ - l[6] >= 0 && /*selectedBox*/ - l[6] < /*value*/ + l[7] >= 0 && /*selectedBox*/ + l[7] < /*value*/ l[0].boxes.length ? ( /*value*/ l[0].boxes[ /*selectedBox*/ - l[6] + l[7] ].label ) : "" ), color: ( /*selectedBox*/ - l[6] >= 0 && /*selectedBox*/ - l[6] < /*value*/ - l[0].boxes.length ? Cn( + l[7] >= 0 && /*selectedBox*/ + l[7] < /*value*/ + l[0].boxes.length ? An( /*value*/ l[0].boxes[ /*selectedBox*/ - l[6] + l[7] ].color ) : "" ) @@ -6996,355 +7066,361 @@ function Ws(l) { }), e.$on( "change", /*onModalNewChange*/ - l[16] + l[17] ), e.$on( "enter{onModalNewChange}", /*enter_onModalNewChange_handler*/ - l[30] + l[33] ), { c() { - fl(e.$$.fragment); + Bn(e.$$.fragment); }, m(n, i) { - cl(e, n, i), t = !0; + Mn(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*choices*/ - 4 && (s.choices = /*choices*/ - n[2]), i[0] & /*choicesColors*/ - 8 && (s.choicesColors = /*choicesColors*/ - n[3]), i[0] & /*selectedBox, value*/ - 65 && (s.label = /*selectedBox*/ - n[6] >= 0 && /*selectedBox*/ - n[6] < /*value*/ + 8 && (o.choices = /*choices*/ + n[3]), i[0] & /*choicesColors*/ + 16 && (o.choicesColors = /*choicesColors*/ + n[4]), i[0] & /*selectedBox, value*/ + 129 && (o.label = /*selectedBox*/ + n[7] >= 0 && /*selectedBox*/ + n[7] < /*value*/ n[0].boxes.length ? ( /*value*/ n[0].boxes[ /*selectedBox*/ - n[6] + n[7] ].label ) : ""), i[0] & /*selectedBox, value*/ - 65 && (s.color = /*selectedBox*/ - n[6] >= 0 && /*selectedBox*/ - n[6] < /*value*/ - n[0].boxes.length ? Cn( + 129 && (o.color = /*selectedBox*/ + n[7] >= 0 && /*selectedBox*/ + n[7] < /*value*/ + n[0].boxes.length ? An( /*value*/ n[0].boxes[ /*selectedBox*/ - n[6] + n[7] ].color - ) : ""), e.$set(s); + ) : ""), e.$set(o); }, i(n) { - t || (Ce(e.$$.fragment, n), t = !0); + t || (ie(e.$$.fragment, n), t = !0); }, o(n) { - Ne(e.$$.fragment, n), t = !1; + ye(e.$$.fragment, n), t = !1; }, d(n) { - ul(e, n); + En(e, n); } }; } -function _1(l) { - let e, t, n, i, s, a, r, o, f, u = ( +function E1(l) { + let e, t, n, i, o, s, r, a, f, u = ( /*interactive*/ - l[1] && Vs(l) + l[2] && Jo(l) ), c = ( /*editModalVisible*/ - l[8] && Os(l) - ), d = ( + l[9] && xo(l) + ), _ = ( /*newModalVisible*/ - l[9] && Ws(l) + l[10] && $o(l) ); return { c() { - e = vn("div"), t = vn("canvas"), n = Qn(), u && u.c(), i = Qn(), c && c.c(), s = Qn(), d && d.c(), a = o1(), rt(t, "class", "canvas-annotator svelte-10jprmi"), rt(e, "class", "canvas-container svelte-10jprmi"), rt(e, "tabindex", "-1"); + e = en("div"), t = en("canvas"), n = zn(), u && u.c(), i = zn(), c && c.c(), o = zn(), _ && _.c(), s = k1(), Pe(t, "class", "canvas-annotator svelte-10jprmi"), Pe(e, "class", "canvas-container svelte-10jprmi"), Pe(e, "tabindex", "-1"); }, - m(_, b) { - Pt(_, e, b), Jn(e, t), l[26](t), Pt(_, n, b), u && u.m(_, b), Pt(_, i, b), c && c.m(_, b), Pt(_, s, b), d && d.m(_, b), Pt(_, a, b), r = !0, o || (f = [ - Ct( + m(d, h) { + qt(d, e, h), kn(e, t), l[28](t), qt(d, n, h), u && u.m(d, h), qt(d, i, h), c && c.m(d, h), qt(d, o, h), _ && _.m(d, h), qt(d, s, h), r = !0, a || (f = [ + ct( t, "mousedown", /*handleMouseDown*/ - l[10] + l[11] ), - Ct( + ct( t, "mouseup", /*handleMouseUp*/ - l[11] + l[12] ), - Ct( + ct( t, "dblclick", /*handleDoubleClick*/ - l[14] + l[15] ), - Ct( + ct( e, "focusin", /*handleCanvasFocus*/ - l[17] + l[19] ), - Ct( + ct( e, "focusout", /*handleCanvasBlur*/ - l[18] + l[20] ) - ], o = !0); + ], a = !0); }, - p(_, b) { + p(d, h) { /*interactive*/ - _[1] ? u ? (u.p(_, b), b[0] & /*interactive*/ - 2 && Ce(u, 1)) : (u = Vs(_), u.c(), Ce(u, 1), u.m(i.parentNode, i)) : u && ($l(), Ne(u, 1, 1, () => { + d[2] ? u ? (u.p(d, h), h[0] & /*interactive*/ + 4 && ie(u, 1)) : (u = Jo(d), u.c(), ie(u, 1), u.m(i.parentNode, i)) : u && (ol(), ye(u, 1, 1, () => { u = null; - }), xl()), /*editModalVisible*/ - _[8] ? c ? (c.p(_, b), b[0] & /*editModalVisible*/ - 256 && Ce(c, 1)) : (c = Os(_), c.c(), Ce(c, 1), c.m(s.parentNode, s)) : c && ($l(), Ne(c, 1, 1, () => { + }), il()), /*editModalVisible*/ + d[9] ? c ? (c.p(d, h), h[0] & /*editModalVisible*/ + 512 && ie(c, 1)) : (c = xo(d), c.c(), ie(c, 1), c.m(o.parentNode, o)) : c && (ol(), ye(c, 1, 1, () => { c = null; - }), xl()), /*newModalVisible*/ - _[9] ? d ? (d.p(_, b), b[0] & /*newModalVisible*/ - 512 && Ce(d, 1)) : (d = Ws(_), d.c(), Ce(d, 1), d.m(a.parentNode, a)) : d && ($l(), Ne(d, 1, 1, () => { - d = null; - }), xl()); + }), il()), /*newModalVisible*/ + d[10] ? _ ? (_.p(d, h), h[0] & /*newModalVisible*/ + 1024 && ie(_, 1)) : (_ = $o(d), _.c(), ie(_, 1), _.m(s.parentNode, s)) : _ && (ol(), ye(_, 1, 1, () => { + _ = null; + }), il()); }, - i(_) { - r || (Ce(u), Ce(c), Ce(d), r = !0); + i(d) { + r || (ie(u), ie(c), ie(_), r = !0); }, - o(_) { - Ne(u), Ne(c), Ne(d), r = !1; + o(d) { + ye(u), ye(c), ye(_), r = !1; }, - d(_) { - _ && (Wt(e), Wt(n), Wt(i), Wt(s), Wt(a)), l[26](null), u && u.d(_), c && c.d(_), d && d.d(_), o = !1, ia(f); + d(d) { + d && (zt(e), zt(n), zt(i), zt(o), zt(s)), l[28](null), u && u.d(d), c && c.d(d), _ && _.d(d), a = !1, ca(f); } }; } -function ei(l) { +function oi(l) { var e = parseInt(l.slice(1, 3), 16), t = parseInt(l.slice(3, 5), 16), n = parseInt(l.slice(5, 7), 16); return "rgb(" + e + ", " + t + ", " + n + ")"; } -function Cn(l) { +function An(l) { const e = l.match(/(\d+(\.\d+)?)/g), t = parseInt(e[0]), n = parseInt(e[1]), i = parseInt(e[2]); return "#" + (1 << 24 | t << 16 | n << 8 | i).toString(16).slice(1); } -function d1(l, e, t) { +function M1(l, e, t) { var n; - (function(A) { - A[A.creation = 0] = "creation", A[A.drag = 1] = "drag"; + (function(M) { + M[M.creation = 0] = "creation", M[M.drag = 1] = "drag"; })(n || (n = {})); - let { imageUrl: i = null } = e, { interactive: s } = e, { boxAlpha: a = 0.5 } = e, { boxMinSize: r = 25 } = e, { handleSize: o } = e, { boxThickness: f } = e, { boxSelectedThickness: u } = e, { value: c } = e, { choices: d = [] } = e, { choicesColors: _ = [] } = e, { disableEditBoxes: b = !1 } = e, h, w, g = null, p = -1, m = n.drag; - c !== null && c.boxes.length == 0 && (m = n.creation); - let C = 0, z = 0, y = 0, q = 0, v = 1, E = 0, F = 0, X = !1, L = !1; - const V = c1(); - function I() { + let { imageUrl: i = null } = e, { interactive: o } = e, { boxAlpha: s = 0.5 } = e, { boxMinSize: r = 25 } = e, { handleSize: a } = e, { boxThickness: f } = e, { boxSelectedThickness: u } = e, { value: c } = e, { choices: _ = [] } = e, { choicesColors: d = [] } = e, { disableEditBoxes: h = !1 } = e, { showRemoveButton: b = null } = e; + b === null && (b = h); + let g, w, p = null, m = -1, v = n.drag; + c !== null && c.boxes.length == 0 && (v = n.creation); + let S = 0, y = 0, z = 0, k = 0, q = 1, I = 0, F = 0, R = !1, G = !1; + const U = B1(); + function X() { if (w) { - w.clearRect(0, 0, h.width, h.height), g !== null && w.drawImage(g, C, z, E, F); - for (const A of c.boxes.slice().reverse()) - A.render(w); + w.clearRect(0, 0, g.width, g.height), p !== null && w.drawImage(p, S, y, I, F); + for (const M of c.boxes.slice().reverse()) + M.render(w); } } - function Q(A) { - t(6, p = A), c.boxes.forEach((T) => { - T.setSelected(!1); - }), A >= 0 && A < c.boxes.length && c.boxes[A].setSelected(!0), I(); + function O(M) { + t(7, m = M), c.boxes.forEach((H) => { + H.setSelected(!1); + }), M >= 0 && M < c.boxes.length && c.boxes[M].setSelected(!0), X(); } - function W(A) { - s && (m === n.creation ? D(A) : m === n.drag && le(A)); + function _e(M) { + o && (v === n.creation ? ue(M) : v === n.drag && oe(M)); } - function le(A) { - const T = h.getBoundingClientRect(), P = A.clientX - T.left, qe = A.clientY - T.top; - for (const [Ee, ce] of c.boxes.entries()) { - const Ai = ce.indexOfPointInsideHandle(P, qe); - if (Ai >= 0) { - Q(Ee), ce.startResize(Ai, A); + function oe(M) { + const H = g.getBoundingClientRect(), $ = M.clientX - H.left, qe = M.clientY - H.top; + for (const [Be, de] of c.boxes.entries()) { + const Di = de.indexOfPointInsideHandle($, qe); + if (Di >= 0) { + O(Be), de.startResize(Di, M); return; } } - for (const [Ee, ce] of c.boxes.entries()) - if (ce.isPointInsideBox(P, qe)) { - Q(Ee), ce.startDrag(A); + for (const [Be, de] of c.boxes.entries()) + if (de.isPointInsideBox($, qe)) { + O(Be), de.startDrag(M); return; } - Q(-1); + O(-1); } - function ae(A) { - V("change"); + function fe(M) { + U("change"); } - function re(A) { - if (s) - switch (A.key) { + function D(M) { + if (o) + switch (M.key) { case "Delete": - H(); + W(); break; } } - function D(A) { - const T = h.getBoundingClientRect(), P = (A.clientX - T.left - C) / v, qe = (A.clientY - T.top - z) / v; - let Ee; - _.length > 0 ? Ee = ei(_[0]) : Ee = Ut[c.boxes.length % Ut.length]; - let ce = new Ql(I, Fe, C, z, y, q, "", P, qe, P, qe, Ee, a, r, o, f, u); - ce.startCreating(A, T.left, T.top), t(0, c.boxes = [ce, ...c.boxes], c), Q(0), I(), V("change"); + function ue(M) { + const H = g.getBoundingClientRect(), $ = (M.clientX - H.left - S) / q, qe = (M.clientY - H.top - y) / q; + let Be; + d.length > 0 ? Be = oi(d[0]) : Be = Ot[c.boxes.length % Ot.length]; + let de = new ii(X, Ye, S, y, z, k, "", $, qe, $, qe, Be, s, r, a, f, u); + de.startCreating(M, H.left, H.top), t(0, c.boxes = [de, ...c.boxes], c), O(0), X(), U("change"); } - function fe() { - t(7, m = n.creation), t(5, h.style.cursor = "crosshair", h); + function Ce() { + t(8, v = n.creation), t(6, g.style.cursor = "crosshair", g); } - function Se() { - t(7, m = n.drag), t(5, h.style.cursor = "default", h); + function Xe() { + t(8, v = n.drag), t(6, g.style.cursor = "default", g); } - function Fe() { - p >= 0 && p < c.boxes.length && (c.boxes[p].getArea() < 1 ? H() : b || t(9, L = !0)); + function Ye() { + m >= 0 && m < c.boxes.length && (c.boxes[m].getArea() < 1 ? W() : h || t(10, G = !0)); } - function Pe() { - p >= 0 && p < c.boxes.length && !b && t(8, X = !0); + function A() { + m >= 0 && m < c.boxes.length && !h && t(9, R = !0); } - function B(A) { - s && Pe(); + function Je(M) { + o && A(); } - function Ze(A) { - t(8, X = !1); - const { detail: T } = A; - let P = T.label, qe = T.color, Ee = T.ret; - if (p >= 0 && p < c.boxes.length) { - let ce = c.boxes[p]; - Ee == 1 ? (ce.label = P, ce.color = ei(qe), I(), V("change")) : Ee == -1 && H(); + function E(M) { + t(9, R = !1); + const { detail: H } = M; + let $ = H.label, qe = H.color, Be = H.ret; + if (m >= 0 && m < c.boxes.length) { + let de = c.boxes[m]; + Be == 1 ? (de.label = $, de.color = oi(qe), X(), U("change")) : Be == -1 && W(); } } - function k(A) { - t(9, L = !1); - const { detail: T } = A; - let P = T.label, qe = T.color, Ee = T.ret; - if (p >= 0 && p < c.boxes.length) { - let ce = c.boxes[p]; - Ee == 1 ? (ce.label = P, ce.color = ei(qe), I(), V("change")) : H(); + function C(M) { + t(10, G = !1); + const { detail: H } = M; + let $ = H.label, qe = H.color, Be = H.ret; + if (m >= 0 && m < c.boxes.length) { + let de = c.boxes[m]; + Be == 1 ? (de.label = $, de.color = oi(qe), X(), U("change")) : W(); } } - function H() { - p >= 0 && p < c.boxes.length && (c.boxes.splice(p, 1), Q(-1), V("change")); + function W() { + m >= 0 && m < c.boxes.length && (c.boxes.splice(m, 1), O(-1), U("change")); } - function O() { - if (h) { - if (v = 1, t(5, h.width = h.clientWidth, h), g !== null) - if (g.width > h.width) - v = h.width / g.width, E = g.width * v, F = g.height * v, C = 0, z = 0, y = E, q = F, t(5, h.height = F, h); + function P() { + if (g) { + if (q = 1, t(6, g.width = g.clientWidth, g), p !== null) + if (p.width > g.width) + q = g.width / p.width, I = p.width * q, F = p.height * q, S = 0, y = 0, z = I, k = F, t(6, g.height = F, g); else { - E = g.width, F = g.height; - var A = (h.width - E) / 2; - C = A, z = 0, y = A + E, q = g.height, t(5, h.height = F, h); + I = p.width, F = p.height; + var M = (g.width - I) / 2; + S = M, y = 0, z = M + I, k = p.height, t(6, g.height = F, g); } else - C = 0, z = 0, y = h.width, q = h.height, t(5, h.height = h.clientHeight, h); - if (y > 0 && q > 0) - for (const T of c.boxes) - T.canvasXmin = C, T.canvasYmin = z, T.canvasXmax = y, T.canvasYmax = q, T.setScaleFactor(v); - I(), V("change"); - } - } - const G = new ResizeObserver(O); - function S() { - for (let A = 0; A < c.boxes.length; A++) { - let T = c.boxes[A]; - if (!(T instanceof Ql)) { - let P = "", qe = ""; - T.hasOwnProperty("color") ? (P = T.color, Array.isArray(P) && P.length === 3 && (P = `rgb(${P[0]}, ${P[1]}, ${P[2]})`)) : P = Ut[A % Ut.length], T.hasOwnProperty("label") && (qe = T.label), T = new Ql(I, Fe, C, z, y, q, qe, T.xmin, T.ymin, T.xmax, T.ymax, P, a, r, o, f, u), t(0, c.boxes[A] = T, c); + S = 0, y = 0, z = g.width, k = g.height, t(6, g.height = g.clientHeight, g); + if (z > 0 && k > 0) + for (const H of c.boxes) + H.canvasXmin = S, H.canvasYmin = y, H.canvasXmax = z, H.canvasYmax = k, H.setScaleFactor(q); + X(), U("change"); + } + } + const te = new ResizeObserver(P); + function B() { + for (let M = 0; M < c.boxes.length; M++) { + let H = c.boxes[M]; + if (!(H instanceof ii)) { + let $ = "", qe = ""; + H.hasOwnProperty("color") ? ($ = H.color, Array.isArray($) && $.length === 3 && ($ = `rgb(${$[0]}, ${$[1]}, ${$[2]})`)) : $ = Ot[M % Ot.length], H.hasOwnProperty("label") && (qe = H.label), H = new ii(X, Ye, S, y, z, k, qe, H.xmin, H.ymin, H.xmax, H.ymax, $, s, r, a, f, u), t(0, c.boxes[M] = H, c); } } } - function be() { - i !== null && (g === null || g.src != i) && (g = new Image(), g.src = i, g.onload = function() { - O(), I(); + function Se() { + i !== null && (p === null || p.src != i) && (p = new Image(), p.src = i, p.onload = function() { + P(), X(); }); } - f1(() => { - if (Array.isArray(d) && d.length > 0 && (!Array.isArray(_) || _.length == 0)) - for (let A = 0; A < d.length; A++) { - let T = Ut[A % Ut.length]; - _.push(Cn(T)); + z1(() => { + if (Array.isArray(_) && _.length > 0 && (!Array.isArray(d) || d.length == 0)) + for (let M = 0; M < _.length; M++) { + let H = Ot[M % Ot.length]; + d.push(An(H)); } - w = h.getContext("2d"), G.observe(h), be(), O(), I(); + w = g.getContext("2d"), te.observe(g), Se(), P(), X(); }); - function ge() { - document.addEventListener("keydown", re); - } function ze() { - document.removeEventListener("keydown", re); + document.addEventListener("keydown", D); + } + function se() { + document.removeEventListener("keydown", D); } - u1(() => { - document.removeEventListener("keydown", re); + q1(() => { + document.removeEventListener("keydown", D); }); - function we(A) { - s1[A ? "unshift" : "push"](() => { - h = A, t(5, h); + function Le(M) { + v1[M ? "unshift" : "push"](() => { + g = M, t(6, g); }); } - const oe = () => fe(), ue = () => Se(); - function mt(A) { - Ns.call(this, l, A); + const ce = () => Ce(), Ue = () => Xe(), Ml = () => W(); + function Al(M) { + Go.call(this, l, M); } - function Sl(A) { - Ns.call(this, l, A); + function on(M) { + Go.call(this, l, M); } - return l.$$set = (A) => { - "imageUrl" in A && t(19, i = A.imageUrl), "interactive" in A && t(1, s = A.interactive), "boxAlpha" in A && t(20, a = A.boxAlpha), "boxMinSize" in A && t(21, r = A.boxMinSize), "handleSize" in A && t(22, o = A.handleSize), "boxThickness" in A && t(23, f = A.boxThickness), "boxSelectedThickness" in A && t(24, u = A.boxSelectedThickness), "value" in A && t(0, c = A.value), "choices" in A && t(2, d = A.choices), "choicesColors" in A && t(3, _ = A.choicesColors), "disableEditBoxes" in A && t(25, b = A.disableEditBoxes); + return l.$$set = (M) => { + "imageUrl" in M && t(21, i = M.imageUrl), "interactive" in M && t(2, o = M.interactive), "boxAlpha" in M && t(22, s = M.boxAlpha), "boxMinSize" in M && t(23, r = M.boxMinSize), "handleSize" in M && t(24, a = M.handleSize), "boxThickness" in M && t(25, f = M.boxThickness), "boxSelectedThickness" in M && t(26, u = M.boxSelectedThickness), "value" in M && t(0, c = M.value), "choices" in M && t(3, _ = M.choices), "choicesColors" in M && t(4, d = M.choicesColors), "disableEditBoxes" in M && t(27, h = M.disableEditBoxes), "showRemoveButton" in M && t(1, b = M.showRemoveButton); }, l.$$.update = () => { l.$$.dirty[0] & /*value*/ - 1 && (be(), S(), O(), I()); + 1 && (Se(), B(), P(), X()); }, [ c, - s, - d, + b, + o, _, + d, n, - h, - p, + g, m, - X, - L, - W, - ae, + v, + R, + G, + _e, fe, - Se, - B, - Ze, - k, - ge, + Ce, + Xe, + Je, + E, + C, + W, ze, + se, i, - a, + s, r, - o, + a, f, u, - b, - we, - oe, - ue, - mt, - Sl + h, + Le, + ce, + Ue, + Ml, + Al, + on ]; } -class h1 extends i1 { +class A1 extends p1 { constructor(e) { - super(), a1( + super(), y1( this, e, - d1, - _1, - r1, + M1, + E1, + S1, { - imageUrl: 19, - interactive: 1, - boxAlpha: 20, - boxMinSize: 21, - handleSize: 22, - boxThickness: 23, - boxSelectedThickness: 24, + imageUrl: 21, + interactive: 2, + boxAlpha: 22, + boxMinSize: 23, + handleSize: 24, + boxThickness: 25, + boxSelectedThickness: 26, value: 0, - choices: 2, - choicesColors: 3, - disableEditBoxes: 25 + choices: 3, + choicesColors: 4, + disableEditBoxes: 27, + showRemoveButton: 1 }, null, [-1, -1] @@ -7352,24 +7428,24 @@ class h1 extends i1 { } } const { - SvelteComponent: m1, - add_flush_callback: b1, - bind: g1, - binding_callbacks: w1, - create_component: p1, - destroy_component: k1, - init: v1, - mount_component: y1, - safe_not_equal: C1, - transition_in: S1, - transition_out: z1 -} = window.__gradio__svelte__internal, { createEventDispatcher: q1 } = window.__gradio__svelte__internal; -function E1(l) { + SvelteComponent: L1, + add_flush_callback: R1, + bind: D1, + binding_callbacks: T1, + create_component: j1, + destroy_component: H1, + init: I1, + mount_component: F1, + safe_not_equal: X1, + transition_in: Y1, + transition_out: U1 +} = window.__gradio__svelte__internal, { createEventDispatcher: V1 } = window.__gradio__svelte__internal; +function N1(l) { let e, t, n; - function i(a) { - l[14](a); + function i(s) { + l[15](s); } - let s = { + let o = { interactive: ( /*interactive*/ l[1] @@ -7406,104 +7482,111 @@ function E1(l) { /*disableEditBoxes*/ l[9] ), + showRemoveButton: ( + /*showRemoveButton*/ + l[10] + ), imageUrl: ( /*resolved_src*/ - l[10] + l[11] ) }; return ( /*value*/ - l[0] !== void 0 && (s.value = /*value*/ - l[0]), e = new h1({ props: s }), w1.push(() => g1(e, "value", i)), e.$on( + l[0] !== void 0 && (o.value = /*value*/ + l[0]), e = new A1({ props: o }), T1.push(() => D1(e, "value", i)), e.$on( "change", /*change_handler*/ - l[15] + l[16] ), { c() { - p1(e.$$.fragment); + j1(e.$$.fragment); }, - m(a, r) { - y1(e, a, r), n = !0; + m(s, r) { + F1(e, s, r), n = !0; }, - p(a, [r]) { - const o = {}; + p(s, [r]) { + const a = {}; r & /*interactive*/ - 2 && (o.interactive = /*interactive*/ - a[1]), r & /*boxesAlpha*/ - 4 && (o.boxAlpha = /*boxesAlpha*/ - a[2]), r & /*labelList*/ - 8 && (o.choices = /*labelList*/ - a[3]), r & /*labelColors*/ - 16 && (o.choicesColors = /*labelColors*/ - a[4]), r & /*boxMinSize*/ - 32 && (o.boxMinSize = /*boxMinSize*/ - a[5]), r & /*handleSize*/ - 64 && (o.handleSize = /*handleSize*/ - a[6]), r & /*boxThickness*/ - 128 && (o.boxThickness = /*boxThickness*/ - a[7]), r & /*boxSelectedThickness*/ - 256 && (o.boxSelectedThickness = /*boxSelectedThickness*/ - a[8]), r & /*disableEditBoxes*/ - 512 && (o.disableEditBoxes = /*disableEditBoxes*/ - a[9]), r & /*resolved_src*/ - 1024 && (o.imageUrl = /*resolved_src*/ - a[10]), !t && r & /*value*/ - 1 && (t = !0, o.value = /*value*/ - a[0], b1(() => t = !1)), e.$set(o); + 2 && (a.interactive = /*interactive*/ + s[1]), r & /*boxesAlpha*/ + 4 && (a.boxAlpha = /*boxesAlpha*/ + s[2]), r & /*labelList*/ + 8 && (a.choices = /*labelList*/ + s[3]), r & /*labelColors*/ + 16 && (a.choicesColors = /*labelColors*/ + s[4]), r & /*boxMinSize*/ + 32 && (a.boxMinSize = /*boxMinSize*/ + s[5]), r & /*handleSize*/ + 64 && (a.handleSize = /*handleSize*/ + s[6]), r & /*boxThickness*/ + 128 && (a.boxThickness = /*boxThickness*/ + s[7]), r & /*boxSelectedThickness*/ + 256 && (a.boxSelectedThickness = /*boxSelectedThickness*/ + s[8]), r & /*disableEditBoxes*/ + 512 && (a.disableEditBoxes = /*disableEditBoxes*/ + s[9]), r & /*showRemoveButton*/ + 1024 && (a.showRemoveButton = /*showRemoveButton*/ + s[10]), r & /*resolved_src*/ + 2048 && (a.imageUrl = /*resolved_src*/ + s[11]), !t && r & /*value*/ + 1 && (t = !0, a.value = /*value*/ + s[0], R1(() => t = !1)), e.$set(a); }, - i(a) { - n || (S1(e.$$.fragment, a), n = !0); + i(s) { + n || (Y1(e.$$.fragment, s), n = !0); }, - o(a) { - z1(e.$$.fragment, a), n = !1; + o(s) { + U1(e.$$.fragment, s), n = !1; }, - d(a) { - k1(e, a); + d(s) { + H1(e, s); } } ); } -function A1(l, e, t) { - let { src: n = void 0 } = e, { interactive: i } = e, { boxesAlpha: s } = e, { labelList: a } = e, { labelColors: r } = e, { boxMinSize: o } = e, { handleSize: f } = e, { boxThickness: u } = e, { boxSelectedThickness: c } = e, { value: d } = e, { disableEditBoxes: _ } = e, b, h; - const w = q1(); - function g(m) { - d = m, t(0, d); +function O1(l, e, t) { + let { src: n = void 0 } = e, { interactive: i } = e, { boxesAlpha: o } = e, { labelList: s } = e, { labelColors: r } = e, { boxMinSize: a } = e, { handleSize: f } = e, { boxThickness: u } = e, { boxSelectedThickness: c } = e, { value: _ } = e, { disableEditBoxes: d } = e, { showRemoveButton: h } = e, b, g; + const w = V1(); + function p(v) { + _ = v, t(0, _); } - const p = () => w("change"); - return l.$$set = (m) => { - "src" in m && t(12, n = m.src), "interactive" in m && t(1, i = m.interactive), "boxesAlpha" in m && t(2, s = m.boxesAlpha), "labelList" in m && t(3, a = m.labelList), "labelColors" in m && t(4, r = m.labelColors), "boxMinSize" in m && t(5, o = m.boxMinSize), "handleSize" in m && t(6, f = m.handleSize), "boxThickness" in m && t(7, u = m.boxThickness), "boxSelectedThickness" in m && t(8, c = m.boxSelectedThickness), "value" in m && t(0, d = m.value), "disableEditBoxes" in m && t(9, _ = m.disableEditBoxes); + const m = () => w("change"); + return l.$$set = (v) => { + "src" in v && t(13, n = v.src), "interactive" in v && t(1, i = v.interactive), "boxesAlpha" in v && t(2, o = v.boxesAlpha), "labelList" in v && t(3, s = v.labelList), "labelColors" in v && t(4, r = v.labelColors), "boxMinSize" in v && t(5, a = v.boxMinSize), "handleSize" in v && t(6, f = v.handleSize), "boxThickness" in v && t(7, u = v.boxThickness), "boxSelectedThickness" in v && t(8, c = v.boxSelectedThickness), "value" in v && t(0, _ = v.value), "disableEditBoxes" in v && t(9, d = v.disableEditBoxes), "showRemoveButton" in v && t(10, h = v.showRemoveButton); }, l.$$.update = () => { if (l.$$.dirty & /*src, latest_src*/ - 12288) { - t(10, b = n), t(13, h = n); - const m = n; - qc(m).then((C) => { - h === m && t(10, b = C); + 24576) { + t(11, b = n), t(14, g = n); + const v = n; + Dc(v).then((S) => { + g === v && t(11, b = S); }); } }, [ - d, + _, i, + o, s, - a, r, - o, + a, f, u, c, - _, + d, + h, b, w, n, - h, g, - p + p, + m ]; } -class sa extends m1 { +class _a extends L1 { constructor(e) { - super(), v1(this, e, A1, E1, C1, { - src: 12, + super(), I1(this, e, O1, N1, X1, { + src: 13, interactive: 1, boxesAlpha: 2, labelList: 3, @@ -7513,47 +7596,48 @@ class sa extends m1 { boxThickness: 7, boxSelectedThickness: 8, value: 0, - disableEditBoxes: 9 + disableEditBoxes: 9, + showRemoveButton: 10 }); } } -class B1 { +class W1 { constructor() { this.boxes = []; } } const { - SvelteComponent: M1, - add_flush_callback: _l, - append: an, - attr: wn, - bind: dl, - binding_callbacks: Sn, - bubble: ti, - check_outros: Zt, - create_component: _t, - create_slot: L1, - destroy_component: dt, - detach: qt, - element: yn, - empty: D1, - get_all_dirty_from_scope: T1, - get_slot_changes: R1, - group_outros: Kt, - init: j1, - insert: Et, - mount_component: ht, - noop: I1, - safe_not_equal: F1, - space: Nt, - toggle_class: Ps, + SvelteComponent: P1, + add_flush_callback: bl, + append: un, + attr: yn, + bind: wl, + binding_callbacks: Ln, + bubble: si, + check_outros: Kt, + create_component: mt, + create_slot: Z1, + destroy_component: gt, + detach: Mt, + element: qn, + empty: K1, + get_all_dirty_from_scope: G1, + get_slot_changes: J1, + group_outros: Gt, + init: Q1, + insert: At, + mount_component: bt, + noop: x1, + safe_not_equal: $1, + space: Wt, + toggle_class: es, transition_in: N, transition_out: J, - update_slot_base: H1 -} = window.__gradio__svelte__internal, { createEventDispatcher: X1 } = window.__gradio__svelte__internal; -function Zs(l) { + update_slot_base: e0 +} = window.__gradio__svelte__internal, { createEventDispatcher: t0 } = window.__gradio__svelte__internal; +function ts(l) { let e, t; - return e = new Xc({ + return e = new Pc({ props: { href: ( /*value*/ @@ -7563,25 +7647,25 @@ function Zs(l) { /*value*/ l[1].image.orig_name || "image" ), - $$slots: { default: [Y1] }, + $$slots: { default: [n0] }, $$scope: { ctx: l } } }), { c() { - _t(e.$$.fragment); + mt(e.$$.fragment); }, m(n, i) { - ht(e, n, i), t = !0; + bt(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*value*/ - 2 && (s.href = /*value*/ + 2 && (o.href = /*value*/ n[1].image.url), i[0] & /*value*/ - 2 && (s.download = /*value*/ + 2 && (o.download = /*value*/ n[1].image.orig_name || "image"), i[0] & /*i18n*/ 256 | i[1] & /*$$scope*/ - 2048 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); + 4096 && (o.$$scope = { dirty: i, ctx: n }), e.$set(o); }, i(n) { t || (N(e.$$.fragment, n), t = !0); @@ -7590,15 +7674,15 @@ function Zs(l) { J(e.$$.fragment, n), t = !1; }, d(n) { - dt(e, n); + gt(e, n); } }; } -function Y1(l) { +function n0(l) { let e, t; - return e = new hl({ + return e = new pl({ props: { - Icon: vf, + Icon: Ef, label: ( /*i18n*/ l[8]("common.download") @@ -7606,16 +7690,16 @@ function Y1(l) { } }), { c() { - _t(e.$$.fragment); + mt(e.$$.fragment); }, m(n, i) { - ht(e, n, i), t = !0; + bt(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*i18n*/ - 256 && (s.label = /*i18n*/ - n[8]("common.download")), e.$set(s); + 256 && (o.label = /*i18n*/ + n[8]("common.download")), e.$set(o); }, i(n) { t || (N(e.$$.fragment, n), t = !0); @@ -7624,13 +7708,13 @@ function Y1(l) { J(e.$$.fragment, n), t = !1; }, d(n) { - dt(e, n); + gt(e, n); } }; } -function Ks(l) { +function ns(l) { let e, t; - return e = new Cu({ + return e = new Au({ props: { i18n: ( /*i18n*/ @@ -7638,7 +7722,7 @@ function Ks(l) { ), formatter: ( /*func*/ - l[32] + l[33] ), value: ( /*value*/ @@ -7648,25 +7732,25 @@ function Ks(l) { }), e.$on( "share", /*share_handler*/ - l[33] + l[34] ), e.$on( "error", /*error_handler*/ - l[34] + l[35] ), { c() { - _t(e.$$.fragment); + mt(e.$$.fragment); }, m(n, i) { - ht(e, n, i), t = !0; + bt(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*i18n*/ - 256 && (s.i18n = /*i18n*/ + 256 && (o.i18n = /*i18n*/ n[8]), i[0] & /*value*/ - 2 && (s.value = /*value*/ - n[1]), e.$set(s); + 2 && (o.value = /*value*/ + n[1]), e.$set(o); }, i(n) { t || (N(e.$$.fragment, n), t = !0); @@ -7675,26 +7759,26 @@ function Ks(l) { J(e.$$.fragment, n), t = !1; }, d(n) { - dt(e, n); + gt(e, n); } }; } -function Gs(l) { +function ls(l) { let e, t, n; - return t = new hl({ - props: { Icon: ro, label: "Remove Image" } + return t = new pl({ + props: { Icon: gs, label: "Remove Image" } }), t.$on( "click", /*clear*/ - l[30] + l[31] ), { c() { - e = yn("div"), _t(t.$$.fragment); + e = qn("div"), mt(t.$$.fragment); }, - m(i, s) { - Et(i, e, s), ht(t, e, null), n = !0; + m(i, o) { + At(i, e, o), bt(t, e, null), n = !0; }, - p: I1, + p: x1, i(i) { n || (N(t.$$.fragment, i), n = !0); }, @@ -7702,46 +7786,46 @@ function Gs(l) { J(t.$$.fragment, i), n = !1; }, d(i) { - i && qt(e), dt(t); + i && Mt(e), gt(t); } }; } -function Js(l) { +function is(l) { let e; const t = ( /*#slots*/ - l[31].default - ), n = L1( + l[32].default + ), n = Z1( t, l, /*$$scope*/ - l[42], + l[43], null ); return { c() { n && n.c(); }, - m(i, s) { - n && n.m(i, s), e = !0; + m(i, o) { + n && n.m(i, o), e = !0; }, - p(i, s) { - n && n.p && (!e || s[1] & /*$$scope*/ - 2048) && H1( + p(i, o) { + n && n.p && (!e || o[1] & /*$$scope*/ + 4096) && e0( n, t, i, /*$$scope*/ - i[42], - e ? R1( + i[43], + e ? J1( t, /*$$scope*/ - i[42], - s, + i[43], + o, null - ) : T1( + ) : G1( /*$$scope*/ - i[42] + i[43] ), null ); @@ -7757,24 +7841,24 @@ function Js(l) { } }; } -function U1(l) { +function l0(l) { let e, t, n = ( /*value*/ - l[1] === null && Js(l) + l[1] === null && is(l) ); return { c() { - n && n.c(), e = D1(); + n && n.c(), e = K1(); }, - m(i, s) { - n && n.m(i, s), Et(i, e, s), t = !0; + m(i, o) { + n && n.m(i, o), At(i, e, o), t = !0; }, - p(i, s) { + p(i, o) { /*value*/ - i[1] === null ? n ? (n.p(i, s), s[0] & /*value*/ - 2 && N(n, 1)) : (n = Js(i), n.c(), N(n, 1), n.m(e.parentNode, e)) : n && (Kt(), J(n, 1, 1, () => { + i[1] === null ? n ? (n.p(i, o), o[0] & /*value*/ + 2 && N(n, 1)) : (n = is(i), n.c(), N(n, 1), n.m(e.parentNode, e)) : n && (Gt(), J(n, 1, 1, () => { n = null; - }), Zt()); + }), Kt()); }, i(i) { t || (N(n), t = !0); @@ -7783,16 +7867,16 @@ function U1(l) { J(n), t = !1; }, d(i) { - i && qt(e), n && n.d(i); + i && Mt(e), n && n.d(i); } }; } -function Qs(l) { +function os(l) { let e, t, n, i; - function s(r) { - l[39](r); + function o(r) { + l[40](r); } - let a = { + let s = { boxesAlpha: ( /*boxesAlpha*/ l[12] @@ -7825,9 +7909,13 @@ function Qs(l) { /*disableEditBoxes*/ l[18] ), + showRemoveButton: ( + /*showRemoveButton*/ + l[19] + ), boxSelectedThickness: ( /*boxSelectedThickness*/ - l[19] + l[20] ), src: ( /*value*/ @@ -7836,49 +7924,51 @@ function Qs(l) { }; return ( /*value*/ - l[1] !== void 0 && (a.value = /*value*/ - l[1]), t = new sa({ props: a }), Sn.push(() => dl(t, "value", s)), t.$on( + l[1] !== void 0 && (s.value = /*value*/ + l[1]), t = new _a({ props: s }), Ln.push(() => wl(t, "value", o)), t.$on( "change", /*change_handler*/ - l[40] + l[41] ), { c() { - e = yn("div"), _t(t.$$.fragment), wn(e, "class", "image-frame svelte-1gjdske"), Ps( + e = qn("div"), mt(t.$$.fragment), yn(e, "class", "image-frame svelte-1gjdske"), es( e, "selectable", /*selectable*/ l[5] ); }, - m(r, o) { - Et(r, e, o), ht(t, e, null), i = !0; + m(r, a) { + At(r, e, a), bt(t, e, null), i = !0; }, - p(r, o) { + p(r, a) { const f = {}; - o[0] & /*boxesAlpha*/ + a[0] & /*boxesAlpha*/ 4096 && (f.boxesAlpha = /*boxesAlpha*/ - r[12]), o[0] & /*labelList*/ + r[12]), a[0] & /*labelList*/ 8192 && (f.labelList = /*labelList*/ - r[13]), o[0] & /*labelColors*/ + r[13]), a[0] & /*labelColors*/ 16384 && (f.labelColors = /*labelColors*/ - r[14]), o[0] & /*boxMinSize*/ + r[14]), a[0] & /*boxMinSize*/ 32768 && (f.boxMinSize = /*boxMinSize*/ - r[15]), o[0] & /*interactive*/ + r[15]), a[0] & /*interactive*/ 128 && (f.interactive = /*interactive*/ - r[7]), o[0] & /*handleSize*/ + r[7]), a[0] & /*handleSize*/ 65536 && (f.handleSize = /*handleSize*/ - r[16]), o[0] & /*boxThickness*/ + r[16]), a[0] & /*boxThickness*/ 131072 && (f.boxThickness = /*boxThickness*/ - r[17]), o[0] & /*disableEditBoxes*/ + r[17]), a[0] & /*disableEditBoxes*/ 262144 && (f.disableEditBoxes = /*disableEditBoxes*/ - r[18]), o[0] & /*boxSelectedThickness*/ - 524288 && (f.boxSelectedThickness = /*boxSelectedThickness*/ - r[19]), o[0] & /*value*/ + r[18]), a[0] & /*showRemoveButton*/ + 524288 && (f.showRemoveButton = /*showRemoveButton*/ + r[19]), a[0] & /*boxSelectedThickness*/ + 1048576 && (f.boxSelectedThickness = /*boxSelectedThickness*/ + r[20]), a[0] & /*value*/ 2 && (f.src = /*value*/ - r[1].image.url), !n && o[0] & /*value*/ + r[1].image.url), !n && a[0] & /*value*/ 2 && (n = !0, f.value = /*value*/ - r[1], _l(() => n = !1)), t.$set(f), (!i || o[0] & /*selectable*/ - 32) && Ps( + r[1], bl(() => n = !1)), t.$set(f), (!i || a[0] & /*selectable*/ + 32) && es( e, "selectable", /*selectable*/ @@ -7892,102 +7982,102 @@ function Qs(l) { J(t.$$.fragment, r), i = !1; }, d(r) { - r && qt(e), dt(t); + r && Mt(e), gt(t); } } ); } -function xs(l) { +function ss(l) { let e, t, n; - function i(a) { - l[41](a); + function i(s) { + l[42](s); } - let s = { + let o = { sources: ( /*sources*/ l[4] ), handle_clear: ( /*handle_clear*/ - l[27] + l[28] ), handle_select: ( /*handle_select_source*/ - l[29] + l[30] ) }; return ( /*active_source*/ - l[0] !== void 0 && (s.active_source = /*active_source*/ - l[0]), e = new Xu({ props: s }), Sn.push(() => dl(e, "active_source", i)), { + l[0] !== void 0 && (o.active_source = /*active_source*/ + l[0]), e = new Pu({ props: o }), Ln.push(() => wl(e, "active_source", i)), { c() { - _t(e.$$.fragment); + mt(e.$$.fragment); }, - m(a, r) { - ht(e, a, r), n = !0; + m(s, r) { + bt(e, s, r), n = !0; }, - p(a, r) { - const o = {}; + p(s, r) { + const a = {}; r[0] & /*sources*/ - 16 && (o.sources = /*sources*/ - a[4]), !t && r[0] & /*active_source*/ - 1 && (t = !0, o.active_source = /*active_source*/ - a[0], _l(() => t = !1)), e.$set(o); + 16 && (a.sources = /*sources*/ + s[4]), !t && r[0] & /*active_source*/ + 1 && (t = !0, a.active_source = /*active_source*/ + s[0], bl(() => t = !1)), e.$set(a); }, - i(a) { - n || (N(e.$$.fragment, a), n = !0); + i(s) { + n || (N(e.$$.fragment, s), n = !0); }, - o(a) { - J(e.$$.fragment, a), n = !1; + o(s) { + J(e.$$.fragment, s), n = !1; }, - d(a) { - dt(e, a); + d(s) { + gt(e, s); } } ); } -function N1(l) { - let e, t, n, i, s, a, r, o, f, u, c, d, _, b = ( +function i0(l) { + let e, t, n, i, o, s, r, a, f, u, c, _, d, h = ( /*sources*/ (l[4].length > 1 || /*sources*/ l[4].includes("clipboard")) && /*value*/ l[1] === null && /*interactive*/ l[7] - ), h; - e = new vr({ + ), b; + e = new Er({ props: { show_label: ( /*show_label*/ l[3] ), - Icon: fo, + Icon: bs, label: ( /*label*/ l[2] || "Image Annotator" ) } }); - let w = ( + let g = ( /*showDownloadButton*/ l[10] && /*value*/ - l[1] !== null && Zs(l) - ), g = ( + l[1] !== null && ts(l) + ), w = ( /*showShareButton*/ l[9] && /*value*/ - l[1] !== null && Ks(l) + l[1] !== null && ns(l) ), p = ( /*showClearButton*/ l[11] && /*value*/ l[1] !== null && /*interactive*/ - l[7] && Gs(l) + l[7] && ls(l) ); - function m(v) { - l[36](v); + function m(k) { + l[37](k); } - function C(v) { - l[37](v); + function v(k) { + l[38](k); } - let z = { + let S = { hidden: ( /*value*/ l[1] !== null @@ -8002,253 +8092,254 @@ function N1(l) { ), max_file_size: ( /*max_file_size*/ - l[20] + l[21] ), disable_click: !/*sources*/ l[4].includes("upload"), upload: ( /*cli_upload*/ - l[21] + l[22] ), stream_handler: ( /*stream_handler*/ - l[22] + l[23] ), - $$slots: { default: [U1] }, + $$slots: { default: [l0] }, $$scope: { ctx: l } }; /*uploading*/ - l[23] !== void 0 && (z.uploading = /*uploading*/ - l[23]), /*dragging*/ - l[24] !== void 0 && (z.dragging = /*dragging*/ - l[24]), f = new p_({ props: z }), l[35](f), Sn.push(() => dl(f, "uploading", m)), Sn.push(() => dl(f, "dragging", C)), f.$on( + l[24] !== void 0 && (S.uploading = /*uploading*/ + l[24]), /*dragging*/ + l[25] !== void 0 && (S.dragging = /*dragging*/ + l[25]), f = new q_({ props: S }), l[36](f), Ln.push(() => wl(f, "uploading", m)), Ln.push(() => wl(f, "dragging", v)), f.$on( "load", /*handle_upload*/ - l[26] + l[27] ), f.$on( "error", /*error_handler_1*/ - l[38] + l[39] ); let y = ( /*value*/ - l[1] !== null && Qs(l) - ), q = b && xs(l); + l[1] !== null && os(l) + ), z = h && ss(l); return { c() { - _t(e.$$.fragment), t = Nt(), n = yn("div"), w && w.c(), i = Nt(), g && g.c(), s = Nt(), p && p.c(), a = Nt(), r = yn("div"), o = yn("div"), _t(f.$$.fragment), d = Nt(), y && y.c(), _ = Nt(), q && q.c(), wn(n, "class", "icon-buttons svelte-1gjdske"), wn(o, "class", "upload-container svelte-1gjdske"), wn(r, "data-testid", "image"), wn(r, "class", "image-container svelte-1gjdske"); - }, - m(v, E) { - ht(e, v, E), Et(v, t, E), Et(v, n, E), w && w.m(n, null), an(n, i), g && g.m(n, null), an(n, s), p && p.m(n, null), Et(v, a, E), Et(v, r, E), an(r, o), ht(f, o, null), an(o, d), y && y.m(o, null), an(r, _), q && q.m(r, null), h = !0; - }, - p(v, E) { - const F = {}; - E[0] & /*show_label*/ - 8 && (F.show_label = /*show_label*/ - v[3]), E[0] & /*label*/ - 4 && (F.label = /*label*/ - v[2] || "Image Annotator"), e.$set(F), /*showDownloadButton*/ - v[10] && /*value*/ - v[1] !== null ? w ? (w.p(v, E), E[0] & /*showDownloadButton, value*/ - 1026 && N(w, 1)) : (w = Zs(v), w.c(), N(w, 1), w.m(n, i)) : w && (Kt(), J(w, 1, 1, () => { - w = null; - }), Zt()), /*showShareButton*/ - v[9] && /*value*/ - v[1] !== null ? g ? (g.p(v, E), E[0] & /*showShareButton, value*/ - 514 && N(g, 1)) : (g = Ks(v), g.c(), N(g, 1), g.m(n, s)) : g && (Kt(), J(g, 1, 1, () => { + mt(e.$$.fragment), t = Wt(), n = qn("div"), g && g.c(), i = Wt(), w && w.c(), o = Wt(), p && p.c(), s = Wt(), r = qn("div"), a = qn("div"), mt(f.$$.fragment), _ = Wt(), y && y.c(), d = Wt(), z && z.c(), yn(n, "class", "icon-buttons svelte-1gjdske"), yn(a, "class", "upload-container svelte-1gjdske"), yn(r, "data-testid", "image"), yn(r, "class", "image-container svelte-1gjdske"); + }, + m(k, q) { + bt(e, k, q), At(k, t, q), At(k, n, q), g && g.m(n, null), un(n, i), w && w.m(n, null), un(n, o), p && p.m(n, null), At(k, s, q), At(k, r, q), un(r, a), bt(f, a, null), un(a, _), y && y.m(a, null), un(r, d), z && z.m(r, null), b = !0; + }, + p(k, q) { + const I = {}; + q[0] & /*show_label*/ + 8 && (I.show_label = /*show_label*/ + k[3]), q[0] & /*label*/ + 4 && (I.label = /*label*/ + k[2] || "Image Annotator"), e.$set(I), /*showDownloadButton*/ + k[10] && /*value*/ + k[1] !== null ? g ? (g.p(k, q), q[0] & /*showDownloadButton, value*/ + 1026 && N(g, 1)) : (g = ts(k), g.c(), N(g, 1), g.m(n, i)) : g && (Gt(), J(g, 1, 1, () => { g = null; - }), Zt()), /*showClearButton*/ - v[11] && /*value*/ - v[1] !== null && /*interactive*/ - v[7] ? p ? (p.p(v, E), E[0] & /*showClearButton, value, interactive*/ - 2178 && N(p, 1)) : (p = Gs(v), p.c(), N(p, 1), p.m(n, null)) : p && (Kt(), J(p, 1, 1, () => { + }), Kt()), /*showShareButton*/ + k[9] && /*value*/ + k[1] !== null ? w ? (w.p(k, q), q[0] & /*showShareButton, value*/ + 514 && N(w, 1)) : (w = ns(k), w.c(), N(w, 1), w.m(n, o)) : w && (Gt(), J(w, 1, 1, () => { + w = null; + }), Kt()), /*showClearButton*/ + k[11] && /*value*/ + k[1] !== null && /*interactive*/ + k[7] ? p ? (p.p(k, q), q[0] & /*showClearButton, value, interactive*/ + 2178 && N(p, 1)) : (p = ls(k), p.c(), N(p, 1), p.m(n, null)) : p && (Gt(), J(p, 1, 1, () => { p = null; - }), Zt()); - const X = {}; - E[0] & /*value*/ - 2 && (X.hidden = /*value*/ - v[1] !== null), E[0] & /*active_source*/ - 1 && (X.filetype = /*active_source*/ - v[0] === "clipboard" ? "clipboard" : "image/*"), E[0] & /*root*/ - 64 && (X.root = /*root*/ - v[6]), E[0] & /*max_file_size*/ - 1048576 && (X.max_file_size = /*max_file_size*/ - v[20]), E[0] & /*sources*/ - 16 && (X.disable_click = !/*sources*/ - v[4].includes("upload")), E[0] & /*cli_upload*/ - 2097152 && (X.upload = /*cli_upload*/ - v[21]), E[0] & /*stream_handler*/ - 4194304 && (X.stream_handler = /*stream_handler*/ - v[22]), E[0] & /*value*/ - 2 | E[1] & /*$$scope*/ - 2048 && (X.$$scope = { dirty: E, ctx: v }), !u && E[0] & /*uploading*/ - 8388608 && (u = !0, X.uploading = /*uploading*/ - v[23], _l(() => u = !1)), !c && E[0] & /*dragging*/ - 16777216 && (c = !0, X.dragging = /*dragging*/ - v[24], _l(() => c = !1)), f.$set(X), /*value*/ - v[1] !== null ? y ? (y.p(v, E), E[0] & /*value*/ - 2 && N(y, 1)) : (y = Qs(v), y.c(), N(y, 1), y.m(o, null)) : y && (Kt(), J(y, 1, 1, () => { + }), Kt()); + const F = {}; + q[0] & /*value*/ + 2 && (F.hidden = /*value*/ + k[1] !== null), q[0] & /*active_source*/ + 1 && (F.filetype = /*active_source*/ + k[0] === "clipboard" ? "clipboard" : "image/*"), q[0] & /*root*/ + 64 && (F.root = /*root*/ + k[6]), q[0] & /*max_file_size*/ + 2097152 && (F.max_file_size = /*max_file_size*/ + k[21]), q[0] & /*sources*/ + 16 && (F.disable_click = !/*sources*/ + k[4].includes("upload")), q[0] & /*cli_upload*/ + 4194304 && (F.upload = /*cli_upload*/ + k[22]), q[0] & /*stream_handler*/ + 8388608 && (F.stream_handler = /*stream_handler*/ + k[23]), q[0] & /*value*/ + 2 | q[1] & /*$$scope*/ + 4096 && (F.$$scope = { dirty: q, ctx: k }), !u && q[0] & /*uploading*/ + 16777216 && (u = !0, F.uploading = /*uploading*/ + k[24], bl(() => u = !1)), !c && q[0] & /*dragging*/ + 33554432 && (c = !0, F.dragging = /*dragging*/ + k[25], bl(() => c = !1)), f.$set(F), /*value*/ + k[1] !== null ? y ? (y.p(k, q), q[0] & /*value*/ + 2 && N(y, 1)) : (y = os(k), y.c(), N(y, 1), y.m(a, null)) : y && (Gt(), J(y, 1, 1, () => { y = null; - }), Zt()), E[0] & /*sources, value, interactive*/ - 146 && (b = /*sources*/ - (v[4].length > 1 || /*sources*/ - v[4].includes("clipboard")) && /*value*/ - v[1] === null && /*interactive*/ - v[7]), b ? q ? (q.p(v, E), E[0] & /*sources, value, interactive*/ - 146 && N(q, 1)) : (q = xs(v), q.c(), N(q, 1), q.m(r, null)) : q && (Kt(), J(q, 1, 1, () => { - q = null; - }), Zt()); + }), Kt()), q[0] & /*sources, value, interactive*/ + 146 && (h = /*sources*/ + (k[4].length > 1 || /*sources*/ + k[4].includes("clipboard")) && /*value*/ + k[1] === null && /*interactive*/ + k[7]), h ? z ? (z.p(k, q), q[0] & /*sources, value, interactive*/ + 146 && N(z, 1)) : (z = ss(k), z.c(), N(z, 1), z.m(r, null)) : z && (Gt(), J(z, 1, 1, () => { + z = null; + }), Kt()); }, - i(v) { - h || (N(e.$$.fragment, v), N(w), N(g), N(p), N(f.$$.fragment, v), N(y), N(q), h = !0); + i(k) { + b || (N(e.$$.fragment, k), N(g), N(w), N(p), N(f.$$.fragment, k), N(y), N(z), b = !0); }, - o(v) { - J(e.$$.fragment, v), J(w), J(g), J(p), J(f.$$.fragment, v), J(y), J(q), h = !1; + o(k) { + J(e.$$.fragment, k), J(g), J(w), J(p), J(f.$$.fragment, k), J(y), J(z), b = !1; }, - d(v) { - v && (qt(t), qt(n), qt(a), qt(r)), dt(e, v), w && w.d(), g && g.d(), p && p.d(), l[35](null), dt(f), y && y.d(), q && q.d(); + d(k) { + k && (Mt(t), Mt(n), Mt(s), Mt(r)), gt(e, k), g && g.d(), w && w.d(), p && p.d(), l[36](null), gt(f), y && y.d(), z && z.d(); } }; } -function V1(l, e, t) { +function o0(l, e, t) { let { $$slots: n = {}, $$scope: i } = e; - var s = this && this.__awaiter || function(S, be, ge, ze) { - function we(oe) { - return oe instanceof ge ? oe : new ge(function(ue) { - ue(oe); + var o = this && this.__awaiter || function(B, Se, ze, se) { + function Le(ce) { + return ce instanceof ze ? ce : new ze(function(Ue) { + Ue(ce); }); } - return new (ge || (ge = Promise))(function(oe, ue) { - function mt(T) { + return new (ze || (ze = Promise))(function(ce, Ue) { + function Ml(M) { try { - A(ze.next(T)); - } catch (P) { - ue(P); + on(se.next(M)); + } catch (H) { + Ue(H); } } - function Sl(T) { + function Al(M) { try { - A(ze.throw(T)); - } catch (P) { - ue(P); + on(se.throw(M)); + } catch (H) { + Ue(H); } } - function A(T) { - T.done ? oe(T.value) : we(T.value).then(mt, Sl); + function on(M) { + M.done ? ce(M.value) : Le(M.value).then(Ml, Al); } - A((ze = ze.apply(S, be || [])).next()); + on((se = se.apply(B, Se || [])).next()); }); }; - let { value: a } = e, { label: r = void 0 } = e, { show_label: o } = e, { sources: f = ["upload", "clipboard"] } = e, { selectable: u = !1 } = e, { root: c } = e, { interactive: d } = e, { i18n: _ } = e, { showShareButton: b } = e, { showDownloadButton: h } = e, { showClearButton: w } = e, { boxesAlpha: g } = e, { labelList: p } = e, { labelColors: m } = e, { boxMinSize: C } = e, { handleSize: z } = e, { boxThickness: y } = e, { disableEditBoxes: q } = e, { boxSelectedThickness: v } = e, { max_file_size: E = null } = e, { cli_upload: F } = e, { stream_handler: X } = e, L, V = !1, { active_source: I = null } = e; - function Q({ detail: S }) { - t(1, a = new B1()), t(1, a.image = S, a), le("upload"); - } - function W() { - D(), le("clear"), le("change"); - } - const le = X1(); - let ae = !1; - function re(S) { - return s(this, void 0, void 0, function* () { - switch (S) { + let { value: s } = e, { label: r = void 0 } = e, { show_label: a } = e, { sources: f = ["upload", "clipboard"] } = e, { selectable: u = !1 } = e, { root: c } = e, { interactive: _ } = e, { i18n: d } = e, { showShareButton: h } = e, { showDownloadButton: b } = e, { showClearButton: g } = e, { boxesAlpha: w } = e, { labelList: p } = e, { labelColors: m } = e, { boxMinSize: v } = e, { handleSize: S } = e, { boxThickness: y } = e, { disableEditBoxes: z } = e, { showRemoveButton: k } = e, { boxSelectedThickness: q } = e, { max_file_size: I = null } = e, { cli_upload: F } = e, { stream_handler: R } = e, G, U = !1, { active_source: X = null } = e; + function O({ detail: B }) { + t(1, s = new W1()), t(1, s.image = B, s), oe("upload"); + } + function _e() { + ue(), oe("clear"), oe("change"); + } + const oe = t0(); + let fe = !1; + function D(B) { + return o(this, void 0, void 0, function* () { + switch (B) { case "clipboard": - L.paste_clipboard(); + G.paste_clipboard(); break; } }); } - function D() { - t(1, a = null); + function ue() { + t(1, s = null); } - const fe = async (S) => S === null ? "" : ``; - function Se(S) { - ti.call(this, l, S); + const Ce = async (B) => B === null ? "" : ``; + function Xe(B) { + si.call(this, l, B); } - function Fe(S) { - ti.call(this, l, S); + function Ye(B) { + si.call(this, l, B); } - function Pe(S) { - Sn[S ? "unshift" : "push"](() => { - L = S, t(25, L); + function A(B) { + Ln[B ? "unshift" : "push"](() => { + G = B, t(26, G); }); } - function B(S) { - V = S, t(23, V); + function Je(B) { + U = B, t(24, U); } - function Ze(S) { - ae = S, t(24, ae); + function E(B) { + fe = B, t(25, fe); } - function k(S) { - ti.call(this, l, S); + function C(B) { + si.call(this, l, B); } - function H(S) { - a = S, t(1, a); + function W(B) { + s = B, t(1, s); } - const O = () => le("change"); - function G(S) { - I = S, t(0, I), t(4, f); + const P = () => oe("change"); + function te(B) { + X = B, t(0, X), t(4, f); } - return l.$$set = (S) => { - "value" in S && t(1, a = S.value), "label" in S && t(2, r = S.label), "show_label" in S && t(3, o = S.show_label), "sources" in S && t(4, f = S.sources), "selectable" in S && t(5, u = S.selectable), "root" in S && t(6, c = S.root), "interactive" in S && t(7, d = S.interactive), "i18n" in S && t(8, _ = S.i18n), "showShareButton" in S && t(9, b = S.showShareButton), "showDownloadButton" in S && t(10, h = S.showDownloadButton), "showClearButton" in S && t(11, w = S.showClearButton), "boxesAlpha" in S && t(12, g = S.boxesAlpha), "labelList" in S && t(13, p = S.labelList), "labelColors" in S && t(14, m = S.labelColors), "boxMinSize" in S && t(15, C = S.boxMinSize), "handleSize" in S && t(16, z = S.handleSize), "boxThickness" in S && t(17, y = S.boxThickness), "disableEditBoxes" in S && t(18, q = S.disableEditBoxes), "boxSelectedThickness" in S && t(19, v = S.boxSelectedThickness), "max_file_size" in S && t(20, E = S.max_file_size), "cli_upload" in S && t(21, F = S.cli_upload), "stream_handler" in S && t(22, X = S.stream_handler), "active_source" in S && t(0, I = S.active_source), "$$scope" in S && t(42, i = S.$$scope); + return l.$$set = (B) => { + "value" in B && t(1, s = B.value), "label" in B && t(2, r = B.label), "show_label" in B && t(3, a = B.show_label), "sources" in B && t(4, f = B.sources), "selectable" in B && t(5, u = B.selectable), "root" in B && t(6, c = B.root), "interactive" in B && t(7, _ = B.interactive), "i18n" in B && t(8, d = B.i18n), "showShareButton" in B && t(9, h = B.showShareButton), "showDownloadButton" in B && t(10, b = B.showDownloadButton), "showClearButton" in B && t(11, g = B.showClearButton), "boxesAlpha" in B && t(12, w = B.boxesAlpha), "labelList" in B && t(13, p = B.labelList), "labelColors" in B && t(14, m = B.labelColors), "boxMinSize" in B && t(15, v = B.boxMinSize), "handleSize" in B && t(16, S = B.handleSize), "boxThickness" in B && t(17, y = B.boxThickness), "disableEditBoxes" in B && t(18, z = B.disableEditBoxes), "showRemoveButton" in B && t(19, k = B.showRemoveButton), "boxSelectedThickness" in B && t(20, q = B.boxSelectedThickness), "max_file_size" in B && t(21, I = B.max_file_size), "cli_upload" in B && t(22, F = B.cli_upload), "stream_handler" in B && t(23, R = B.stream_handler), "active_source" in B && t(0, X = B.active_source), "$$scope" in B && t(43, i = B.$$scope); }, l.$$.update = () => { l.$$.dirty[0] & /*uploading*/ - 8388608 && V && D(), l.$$.dirty[0] & /*dragging*/ - 16777216 && le("drag", ae), l.$$.dirty[0] & /*active_source, sources*/ - 17 && !I && f && t(0, I = f[0]); + 16777216 && U && ue(), l.$$.dirty[0] & /*dragging*/ + 33554432 && oe("drag", fe), l.$$.dirty[0] & /*active_source, sources*/ + 17 && !X && f && t(0, X = f[0]); }, [ - I, - a, + X, + s, r, - o, + a, f, u, c, - d, _, - b, + d, h, - w, + b, g, + w, p, m, - C, - z, + v, + S, y, + z, + k, q, - v, - E, + I, F, - X, - V, - ae, - L, - Q, - W, - le, - re, - D, - n, + R, + U, fe, - Se, - Fe, - Pe, - B, - Ze, - k, - H, - O, G, + O, + _e, + oe, + D, + ue, + n, + Ce, + Xe, + Ye, + A, + Je, + E, + C, + W, + P, + te, i ]; } -class O1 extends M1 { +class s0 extends P1 { constructor(e) { - super(), j1( + super(), Q1( this, e, - V1, - N1, - F1, + o0, + i0, + $1, { value: 1, label: 2, @@ -8268,10 +8359,11 @@ class O1 extends M1 { handleSize: 16, boxThickness: 17, disableEditBoxes: 18, - boxSelectedThickness: 19, - max_file_size: 20, - cli_upload: 21, - stream_handler: 22, + showRemoveButton: 19, + boxSelectedThickness: 20, + max_file_size: 21, + cli_upload: 22, + stream_handler: 23, active_source: 0 }, null, @@ -8280,25 +8372,25 @@ class O1 extends M1 { } } const { - SvelteComponent: W1, - attr: P1, - check_outros: Z1, - create_component: K1, - destroy_component: G1, - detach: J1, - element: Q1, - group_outros: x1, - init: $1, - insert: e0, - mount_component: t0, - safe_not_equal: n0, - toggle_class: it, - transition_in: xn, - transition_out: ki + SvelteComponent: a0, + attr: r0, + check_outros: f0, + create_component: u0, + destroy_component: c0, + detach: _0, + element: d0, + group_outros: h0, + init: m0, + insert: g0, + mount_component: b0, + safe_not_equal: w0, + toggle_class: at, + transition_in: sl, + transition_out: zi } = window.__gradio__svelte__internal; -function $s(l) { +function as(l) { let e, t; - return e = new sa({ + return e = new _a({ props: { src: ( /*samples_dir*/ @@ -8309,86 +8401,86 @@ function $s(l) { } }), { c() { - K1(e.$$.fragment); + u0(e.$$.fragment); }, m(n, i) { - t0(e, n, i), t = !0; + b0(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i & /*samples_dir, value*/ - 3 && (s.src = /*samples_dir*/ + 3 && (o.src = /*samples_dir*/ n[1] + /*value*/ - n[0].path), e.$set(s); + n[0].path), e.$set(o); }, i(n) { - t || (xn(e.$$.fragment, n), t = !0); + t || (sl(e.$$.fragment, n), t = !0); }, o(n) { - ki(e.$$.fragment, n), t = !1; + zi(e.$$.fragment, n), t = !1; }, d(n) { - G1(e, n); + c0(e, n); } }; } -function l0(l) { +function p0(l) { let e, t, n = ( /*value*/ - l[0] && $s(l) + l[0] && as(l) ); return { c() { - e = Q1("div"), n && n.c(), P1(e, "class", "container svelte-1sgcyba"), it( + e = d0("div"), n && n.c(), r0(e, "class", "container svelte-1sgcyba"), at( e, "table", /*type*/ l[2] === "table" - ), it( + ), at( e, "gallery", /*type*/ l[2] === "gallery" - ), it( + ), at( e, "selected", /*selected*/ l[3] - ), it( + ), at( e, "border", /*value*/ l[0] ); }, - m(i, s) { - e0(i, e, s), n && n.m(e, null), t = !0; + m(i, o) { + g0(i, e, o), n && n.m(e, null), t = !0; }, - p(i, [s]) { + p(i, [o]) { /*value*/ - i[0] ? n ? (n.p(i, s), s & /*value*/ - 1 && xn(n, 1)) : (n = $s(i), n.c(), xn(n, 1), n.m(e, null)) : n && (x1(), ki(n, 1, 1, () => { + i[0] ? n ? (n.p(i, o), o & /*value*/ + 1 && sl(n, 1)) : (n = as(i), n.c(), sl(n, 1), n.m(e, null)) : n && (h0(), zi(n, 1, 1, () => { n = null; - }), Z1()), (!t || s & /*type*/ - 4) && it( + }), f0()), (!t || o & /*type*/ + 4) && at( e, "table", /*type*/ i[2] === "table" - ), (!t || s & /*type*/ - 4) && it( + ), (!t || o & /*type*/ + 4) && at( e, "gallery", /*type*/ i[2] === "gallery" - ), (!t || s & /*selected*/ - 8) && it( + ), (!t || o & /*selected*/ + 8) && at( e, "selected", /*selected*/ i[3] - ), (!t || s & /*value*/ - 1) && it( + ), (!t || o & /*value*/ + 1) && at( e, "border", /*value*/ @@ -8396,25 +8488,25 @@ function l0(l) { ); }, i(i) { - t || (xn(n), t = !0); + t || (sl(n), t = !0); }, o(i) { - ki(n), t = !1; + zi(n), t = !1; }, d(i) { - i && J1(e), n && n.d(); + i && _0(e), n && n.d(); } }; } -function i0(l, e, t) { - let { value: n } = e, { samples_dir: i } = e, { type: s } = e, { selected: a = !1 } = e; +function v0(l, e, t) { + let { value: n } = e, { samples_dir: i } = e, { type: o } = e, { selected: s = !1 } = e; return l.$$set = (r) => { - "value" in r && t(0, n = r.value), "samples_dir" in r && t(1, i = r.samples_dir), "type" in r && t(2, s = r.type), "selected" in r && t(3, a = r.selected); - }, [n, i, s, a]; + "value" in r && t(0, n = r.value), "samples_dir" in r && t(1, i = r.samples_dir), "type" in r && t(2, o = r.type), "selected" in r && t(3, s = r.selected); + }, [n, i, o, s]; } -class E0 extends W1 { +class N0 extends a0 { constructor(e) { - super(), $1(this, e, i0, l0, n0, { + super(), m0(this, e, v0, p0, w0, { value: 0, samples_dir: 1, type: 2, @@ -8423,210 +8515,210 @@ class E0 extends W1 { } } const { - SvelteComponent: s0, - add_flush_callback: eo, - assign: o0, - bind: to, - binding_callbacks: no, - check_outros: a0, - create_component: Lt, - destroy_component: Dt, - detach: oa, - empty: r0, - flush: U, - get_spread_object: f0, - get_spread_update: u0, - group_outros: c0, - init: _0, - insert: aa, - mount_component: Tt, - safe_not_equal: d0, - space: h0, - transition_in: Qe, - transition_out: xe + SvelteComponent: k0, + add_flush_callback: rs, + assign: y0, + bind: fs, + binding_callbacks: us, + check_outros: C0, + create_component: Tt, + destroy_component: jt, + detach: da, + empty: S0, + flush: V, + get_spread_object: z0, + get_spread_update: q0, + group_outros: B0, + init: E0, + insert: ha, + mount_component: Ht, + safe_not_equal: M0, + space: A0, + transition_in: et, + transition_out: tt } = window.__gradio__svelte__internal; -function m0(l) { +function L0(l) { let e, t; - return e = new xr({ + return e = new sf({ props: { unpadded_box: !0, size: "large", - $$slots: { default: [w0] }, + $$slots: { default: [T0] }, $$scope: { ctx: l } } }), { c() { - Lt(e.$$.fragment); + Tt(e.$$.fragment); }, m(n, i) { - Tt(e, n, i), t = !0; + Ht(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[1] & /*$$scope*/ - 512 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); + 1024 && (o.$$scope = { dirty: i, ctx: n }), e.$set(o); }, i(n) { - t || (Qe(e.$$.fragment, n), t = !0); + t || (et(e.$$.fragment, n), t = !0); }, o(n) { - xe(e.$$.fragment, n), t = !1; + tt(e.$$.fragment, n), t = !1; }, d(n) { - Dt(e, n); + jt(e, n); } }; } -function b0(l) { +function R0(l) { let e, t; - return e = new bo({ + return e = new Cs({ props: { i18n: ( /*gradio*/ - l[27].i18n + l[28].i18n ), type: "clipboard", mode: "short" } }), { c() { - Lt(e.$$.fragment); + Tt(e.$$.fragment); }, m(n, i) { - Tt(e, n, i), t = !0; + Ht(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*gradio*/ - 134217728 && (s.i18n = /*gradio*/ - n[27].i18n), e.$set(s); + 268435456 && (o.i18n = /*gradio*/ + n[28].i18n), e.$set(o); }, i(n) { - t || (Qe(e.$$.fragment, n), t = !0); + t || (et(e.$$.fragment, n), t = !0); }, o(n) { - xe(e.$$.fragment, n), t = !1; + tt(e.$$.fragment, n), t = !1; }, d(n) { - Dt(e, n); + jt(e, n); } }; } -function g0(l) { +function D0(l) { let e, t; - return e = new bo({ + return e = new Cs({ props: { i18n: ( /*gradio*/ - l[27].i18n + l[28].i18n ), type: "image" } }), { c() { - Lt(e.$$.fragment); + Tt(e.$$.fragment); }, m(n, i) { - Tt(e, n, i), t = !0; + Ht(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*gradio*/ - 134217728 && (s.i18n = /*gradio*/ - n[27].i18n), e.$set(s); + 268435456 && (o.i18n = /*gradio*/ + n[28].i18n), e.$set(o); }, i(n) { - t || (Qe(e.$$.fragment, n), t = !0); + t || (et(e.$$.fragment, n), t = !0); }, o(n) { - xe(e.$$.fragment, n), t = !1; + tt(e.$$.fragment, n), t = !1; }, d(n) { - Dt(e, n); + jt(e, n); } }; } -function w0(l) { +function T0(l) { let e, t; - return e = new fo({}), { + return e = new bs({}), { c() { - Lt(e.$$.fragment); + Tt(e.$$.fragment); }, m(n, i) { - Tt(e, n, i), t = !0; + Ht(e, n, i), t = !0; }, i(n) { - t || (Qe(e.$$.fragment, n), t = !0); + t || (et(e.$$.fragment, n), t = !0); }, o(n) { - xe(e.$$.fragment, n), t = !1; + tt(e.$$.fragment, n), t = !1; }, d(n) { - Dt(e, n); + jt(e, n); } }; } -function p0(l) { +function j0(l) { let e, t, n, i; - const s = [g0, b0, m0], a = []; - function r(o, f) { + const o = [D0, R0, L0], s = []; + function r(a, f) { return ( /*active_source*/ - o[29] === "upload" ? 0 : ( + a[30] === "upload" ? 0 : ( /*active_source*/ - o[29] === "clipboard" ? 1 : 2 + a[30] === "clipboard" ? 1 : 2 ) ); } - return e = r(l), t = a[e] = s[e](l), { + return e = r(l), t = s[e] = o[e](l), { c() { - t.c(), n = r0(); + t.c(), n = S0(); }, - m(o, f) { - a[e].m(o, f), aa(o, n, f), i = !0; + m(a, f) { + s[e].m(a, f), ha(a, n, f), i = !0; }, - p(o, f) { + p(a, f) { let u = e; - e = r(o), e === u ? a[e].p(o, f) : (c0(), xe(a[u], 1, 1, () => { - a[u] = null; - }), a0(), t = a[e], t ? t.p(o, f) : (t = a[e] = s[e](o), t.c()), Qe(t, 1), t.m(n.parentNode, n)); + e = r(a), e === u ? s[e].p(a, f) : (B0(), tt(s[u], 1, 1, () => { + s[u] = null; + }), C0(), t = s[e], t ? t.p(a, f) : (t = s[e] = o[e](a), t.c()), et(t, 1), t.m(n.parentNode, n)); }, - i(o) { - i || (Qe(t), i = !0); + i(a) { + i || (et(t), i = !0); }, - o(o) { - xe(t), i = !1; + o(a) { + tt(t), i = !1; }, - d(o) { - o && oa(n), a[e].d(o); + d(a) { + a && da(n), s[e].d(a); } }; } -function k0(l) { - let e, t, n, i, s, a; +function H0(l) { + let e, t, n, i, o, s; const r = [ { autoscroll: ( /*gradio*/ - l[27].autoscroll + l[28].autoscroll ) }, { i18n: ( /*gradio*/ - l[27].i18n + l[28].i18n ) }, /*loading_status*/ l[1] ]; - let o = {}; - for (let d = 0; d < r.length; d += 1) - o = o0(o, r[d]); - e = new yc({ props: o }); - function f(d) { - l[30](d); + let a = {}; + for (let _ = 0; _ < r.length; _ += 1) + a = y0(a, r[_]); + e = new Mc({ props: a }); + function f(_) { + l[31](_); } - function u(d) { - l[31](d); + function u(_) { + l[32](_); } let c = { selectable: ( @@ -8659,7 +8751,7 @@ function k0(l) { ), i18n: ( /*gradio*/ - l[27].i18n + l[28].i18n ), boxesAlpha: ( /*boxes_alpha*/ @@ -8687,15 +8779,15 @@ function k0(l) { ), max_file_size: ( /*gradio*/ - l[27].max_file_size + l[28].max_file_size ), cli_upload: ( /*gradio*/ - l[27].client.upload + l[28].client.upload ), stream_handler: ( /*gradio*/ - l[27].client.stream + l[28].client.stream ), handleSize: ( /*handle_size*/ @@ -8713,141 +8805,147 @@ function k0(l) { /*disable_edit_boxes*/ l[26] ), - $$slots: { default: [p0] }, + showRemoveButton: ( + /*show_remove_button*/ + l[27] + ), + $$slots: { default: [j0] }, $$scope: { ctx: l } }; return ( /*active_source*/ - l[29] !== void 0 && (c.active_source = /*active_source*/ - l[29]), /*value*/ + l[30] !== void 0 && (c.active_source = /*active_source*/ + l[30]), /*value*/ l[0] !== void 0 && (c.value = /*value*/ - l[0]), n = new O1({ props: c }), no.push(() => to(n, "active_source", f)), no.push(() => to(n, "value", u)), n.$on( + l[0]), n = new s0({ props: c }), us.push(() => fs(n, "active_source", f)), us.push(() => fs(n, "value", u)), n.$on( "change", /*change_handler*/ - l[32] + l[33] ), n.$on( "edit", /*edit_handler*/ - l[33] + l[34] ), n.$on( "clear", /*clear_handler*/ - l[34] + l[35] ), n.$on( "drag", /*drag_handler*/ - l[35] + l[36] ), n.$on( "upload", /*upload_handler*/ - l[36] + l[37] ), n.$on( "select", /*select_handler*/ - l[37] + l[38] ), n.$on( "share", /*share_handler*/ - l[38] + l[39] ), n.$on( "error", /*error_handler*/ - l[39] + l[40] ), { c() { - Lt(e.$$.fragment), t = h0(), Lt(n.$$.fragment); + Tt(e.$$.fragment), t = A0(), Tt(n.$$.fragment); }, - m(d, _) { - Tt(e, d, _), aa(d, t, _), Tt(n, d, _), a = !0; + m(_, d) { + Ht(e, _, d), ha(_, t, d), Ht(n, _, d), s = !0; }, - p(d, _) { - const b = _[0] & /*gradio, loading_status*/ - 134217730 ? u0(r, [ - _[0] & /*gradio*/ - 134217728 && { + p(_, d) { + const h = d[0] & /*gradio, loading_status*/ + 268435458 ? q0(r, [ + d[0] & /*gradio*/ + 268435456 && { autoscroll: ( /*gradio*/ - d[27].autoscroll + _[28].autoscroll ) }, - _[0] & /*gradio*/ - 134217728 && { i18n: ( + d[0] & /*gradio*/ + 268435456 && { i18n: ( /*gradio*/ - d[27].i18n + _[28].i18n ) }, - _[0] & /*loading_status*/ - 2 && f0( + d[0] & /*loading_status*/ + 2 && z0( /*loading_status*/ - d[1] + _[1] ) ]) : {}; - e.$set(b); - const h = {}; - _[0] & /*_selectable*/ - 1024 && (h.selectable = /*_selectable*/ - d[10]), _[0] & /*root*/ - 128 && (h.root = /*root*/ - d[7]), _[0] & /*sources*/ - 16384 && (h.sources = /*sources*/ - d[14]), _[0] & /*interactive*/ - 262144 && (h.interactive = /*interactive*/ - d[18]), _[0] & /*show_download_button*/ - 32768 && (h.showDownloadButton = /*show_download_button*/ - d[15]), _[0] & /*show_share_button*/ - 65536 && (h.showShareButton = /*show_share_button*/ - d[16]), _[0] & /*show_clear_button*/ - 131072 && (h.showClearButton = /*show_clear_button*/ - d[17]), _[0] & /*gradio*/ - 134217728 && (h.i18n = /*gradio*/ - d[27].i18n), _[0] & /*boxes_alpha*/ - 524288 && (h.boxesAlpha = /*boxes_alpha*/ - d[19]), _[0] & /*label_list*/ - 1048576 && (h.labelList = /*label_list*/ - d[20]), _[0] & /*label_colors*/ - 2097152 && (h.labelColors = /*label_colors*/ - d[21]), _[0] & /*box_min_size*/ - 4194304 && (h.boxMinSize = /*box_min_size*/ - d[22]), _[0] & /*label*/ - 32 && (h.label = /*label*/ - d[5]), _[0] & /*show_label*/ - 64 && (h.show_label = /*show_label*/ - d[6]), _[0] & /*gradio*/ - 134217728 && (h.max_file_size = /*gradio*/ - d[27].max_file_size), _[0] & /*gradio*/ - 134217728 && (h.cli_upload = /*gradio*/ - d[27].client.upload), _[0] & /*gradio*/ - 134217728 && (h.stream_handler = /*gradio*/ - d[27].client.stream), _[0] & /*handle_size*/ - 8388608 && (h.handleSize = /*handle_size*/ - d[23]), _[0] & /*box_thickness*/ - 16777216 && (h.boxThickness = /*box_thickness*/ - d[24]), _[0] & /*box_selected_thickness*/ - 33554432 && (h.boxSelectedThickness = /*box_selected_thickness*/ - d[25]), _[0] & /*disable_edit_boxes*/ - 67108864 && (h.disableEditBoxes = /*disable_edit_boxes*/ - d[26]), _[0] & /*gradio, active_source*/ - 671088640 | _[1] & /*$$scope*/ - 512 && (h.$$scope = { dirty: _, ctx: d }), !i && _[0] & /*active_source*/ - 536870912 && (i = !0, h.active_source = /*active_source*/ - d[29], eo(() => i = !1)), !s && _[0] & /*value*/ - 1 && (s = !0, h.value = /*value*/ - d[0], eo(() => s = !1)), n.$set(h); + e.$set(h); + const b = {}; + d[0] & /*_selectable*/ + 1024 && (b.selectable = /*_selectable*/ + _[10]), d[0] & /*root*/ + 128 && (b.root = /*root*/ + _[7]), d[0] & /*sources*/ + 16384 && (b.sources = /*sources*/ + _[14]), d[0] & /*interactive*/ + 262144 && (b.interactive = /*interactive*/ + _[18]), d[0] & /*show_download_button*/ + 32768 && (b.showDownloadButton = /*show_download_button*/ + _[15]), d[0] & /*show_share_button*/ + 65536 && (b.showShareButton = /*show_share_button*/ + _[16]), d[0] & /*show_clear_button*/ + 131072 && (b.showClearButton = /*show_clear_button*/ + _[17]), d[0] & /*gradio*/ + 268435456 && (b.i18n = /*gradio*/ + _[28].i18n), d[0] & /*boxes_alpha*/ + 524288 && (b.boxesAlpha = /*boxes_alpha*/ + _[19]), d[0] & /*label_list*/ + 1048576 && (b.labelList = /*label_list*/ + _[20]), d[0] & /*label_colors*/ + 2097152 && (b.labelColors = /*label_colors*/ + _[21]), d[0] & /*box_min_size*/ + 4194304 && (b.boxMinSize = /*box_min_size*/ + _[22]), d[0] & /*label*/ + 32 && (b.label = /*label*/ + _[5]), d[0] & /*show_label*/ + 64 && (b.show_label = /*show_label*/ + _[6]), d[0] & /*gradio*/ + 268435456 && (b.max_file_size = /*gradio*/ + _[28].max_file_size), d[0] & /*gradio*/ + 268435456 && (b.cli_upload = /*gradio*/ + _[28].client.upload), d[0] & /*gradio*/ + 268435456 && (b.stream_handler = /*gradio*/ + _[28].client.stream), d[0] & /*handle_size*/ + 8388608 && (b.handleSize = /*handle_size*/ + _[23]), d[0] & /*box_thickness*/ + 16777216 && (b.boxThickness = /*box_thickness*/ + _[24]), d[0] & /*box_selected_thickness*/ + 33554432 && (b.boxSelectedThickness = /*box_selected_thickness*/ + _[25]), d[0] & /*disable_edit_boxes*/ + 67108864 && (b.disableEditBoxes = /*disable_edit_boxes*/ + _[26]), d[0] & /*show_remove_button*/ + 134217728 && (b.showRemoveButton = /*show_remove_button*/ + _[27]), d[0] & /*gradio, active_source*/ + 1342177280 | d[1] & /*$$scope*/ + 1024 && (b.$$scope = { dirty: d, ctx: _ }), !i && d[0] & /*active_source*/ + 1073741824 && (i = !0, b.active_source = /*active_source*/ + _[30], rs(() => i = !1)), !o && d[0] & /*value*/ + 1 && (o = !0, b.value = /*value*/ + _[0], rs(() => o = !1)), n.$set(b); }, - i(d) { - a || (Qe(e.$$.fragment, d), Qe(n.$$.fragment, d), a = !0); + i(_) { + s || (et(e.$$.fragment, _), et(n.$$.fragment, _), s = !0); }, - o(d) { - xe(e.$$.fragment, d), xe(n.$$.fragment, d), a = !1; + o(_) { + tt(e.$$.fragment, _), tt(n.$$.fragment, _), s = !1; }, - d(d) { - d && oa(t), Dt(e, d), Dt(n, d); + d(_) { + _ && da(t), jt(e, _), jt(n, _); } } ); } -function v0(l) { +function I0(l) { let e, t; - return e = new Ca({ + return e = new Aa({ props: { visible: ( /*visible*/ @@ -8856,7 +8954,7 @@ function v0(l) { variant: "solid", border_mode: ( /*dragging*/ - l[28] ? "focus" : "base" + l[29] ? "focus" : "base" ), padding: !1, elem_id: ( @@ -8888,117 +8986,118 @@ function v0(l) { /*min_width*/ l[13] ), - $$slots: { default: [k0] }, + $$slots: { default: [H0] }, $$scope: { ctx: l } } }), { c() { - Lt(e.$$.fragment); + Tt(e.$$.fragment); }, m(n, i) { - Tt(e, n, i), t = !0; + Ht(e, n, i), t = !0; }, p(n, i) { - const s = {}; + const o = {}; i[0] & /*visible*/ - 16 && (s.visible = /*visible*/ + 16 && (o.visible = /*visible*/ n[4]), i[0] & /*dragging*/ - 268435456 && (s.border_mode = /*dragging*/ - n[28] ? "focus" : "base"), i[0] & /*elem_id*/ - 4 && (s.elem_id = /*elem_id*/ + 536870912 && (o.border_mode = /*dragging*/ + n[29] ? "focus" : "base"), i[0] & /*elem_id*/ + 4 && (o.elem_id = /*elem_id*/ n[2]), i[0] & /*elem_classes*/ - 8 && (s.elem_classes = /*elem_classes*/ + 8 && (o.elem_classes = /*elem_classes*/ n[3]), i[0] & /*height*/ - 256 && (s.height = /*height*/ + 256 && (o.height = /*height*/ n[8] || void 0), i[0] & /*width*/ - 512 && (s.width = /*width*/ + 512 && (o.width = /*width*/ n[9]), i[0] & /*container*/ - 2048 && (s.container = /*container*/ + 2048 && (o.container = /*container*/ n[11]), i[0] & /*scale*/ - 4096 && (s.scale = /*scale*/ + 4096 && (o.scale = /*scale*/ n[12]), i[0] & /*min_width*/ - 8192 && (s.min_width = /*min_width*/ - n[13]), i[0] & /*_selectable, root, sources, interactive, show_download_button, show_share_button, show_clear_button, gradio, boxes_alpha, label_list, label_colors, box_min_size, label, show_label, handle_size, box_thickness, box_selected_thickness, disable_edit_boxes, active_source, value, dragging, loading_status*/ - 1073726691 | i[1] & /*$$scope*/ - 512 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); + 8192 && (o.min_width = /*min_width*/ + n[13]), i[0] & /*_selectable, root, sources, interactive, show_download_button, show_share_button, show_clear_button, gradio, boxes_alpha, label_list, label_colors, box_min_size, label, show_label, handle_size, box_thickness, box_selected_thickness, disable_edit_boxes, show_remove_button, active_source, value, dragging, loading_status*/ + 2147468515 | i[1] & /*$$scope*/ + 1024 && (o.$$scope = { dirty: i, ctx: n }), e.$set(o); }, i(n) { - t || (Qe(e.$$.fragment, n), t = !0); + t || (et(e.$$.fragment, n), t = !0); }, o(n) { - xe(e.$$.fragment, n), t = !1; + tt(e.$$.fragment, n), t = !1; }, d(n) { - Dt(e, n); + jt(e, n); } }; } -function y0(l, e, t) { - let { elem_id: n = "" } = e, { elem_classes: i = [] } = e, { visible: s = !0 } = e, { value: a = null } = e, { label: r } = e, { show_label: o } = e, { root: f } = e, { height: u } = e, { width: c } = e, { _selectable: d = !1 } = e, { container: _ = !0 } = e, { scale: b = null } = e, { min_width: h = void 0 } = e, { loading_status: w } = e, { sources: g = ["upload", "clipboard"] } = e, { show_download_button: p } = e, { show_share_button: m } = e, { show_clear_button: C } = e, { interactive: z } = e, { boxes_alpha: y } = e, { label_list: q } = e, { label_colors: v } = e, { box_min_size: E } = e, { handle_size: F } = e, { box_thickness: X } = e, { box_selected_thickness: L } = e, { disable_edit_boxes: V } = e, { gradio: I } = e, Q, W = null; - function le(k) { - W = k, t(29, W); +function F0(l, e, t) { + let { elem_id: n = "" } = e, { elem_classes: i = [] } = e, { visible: o = !0 } = e, { value: s = null } = e, { label: r } = e, { show_label: a } = e, { root: f } = e, { height: u } = e, { width: c } = e, { _selectable: _ = !1 } = e, { container: d = !0 } = e, { scale: h = null } = e, { min_width: b = void 0 } = e, { loading_status: g } = e, { sources: w = ["upload", "clipboard"] } = e, { show_download_button: p } = e, { show_share_button: m } = e, { show_clear_button: v } = e, { interactive: S } = e, { boxes_alpha: y } = e, { label_list: z } = e, { label_colors: k } = e, { box_min_size: q } = e, { handle_size: I } = e, { box_thickness: F } = e, { box_selected_thickness: R } = e, { disable_edit_boxes: G } = e, { show_remove_button: U } = e, { gradio: X } = e, O, _e = null; + function oe(C) { + _e = C, t(30, _e); } - function ae(k) { - a = k, t(0, a); + function fe(C) { + s = C, t(0, s); } - const re = () => I.dispatch("change"), D = () => I.dispatch("edit"), fe = () => { - I.dispatch("clear"); - }, Se = ({ detail: k }) => t(28, Q = k), Fe = () => I.dispatch("upload"), Pe = ({ detail: k }) => I.dispatch("select", k), B = ({ detail: k }) => I.dispatch("share", k), Ze = ({ detail: k }) => { - t(1, w = w || {}), t(1, w.status = "error", w), I.dispatch("error", k); + const D = () => X.dispatch("change"), ue = () => X.dispatch("edit"), Ce = () => { + X.dispatch("clear"); + }, Xe = ({ detail: C }) => t(29, O = C), Ye = () => X.dispatch("upload"), A = ({ detail: C }) => X.dispatch("select", C), Je = ({ detail: C }) => X.dispatch("share", C), E = ({ detail: C }) => { + t(1, g = g || {}), t(1, g.status = "error", g), X.dispatch("error", C); }; - return l.$$set = (k) => { - "elem_id" in k && t(2, n = k.elem_id), "elem_classes" in k && t(3, i = k.elem_classes), "visible" in k && t(4, s = k.visible), "value" in k && t(0, a = k.value), "label" in k && t(5, r = k.label), "show_label" in k && t(6, o = k.show_label), "root" in k && t(7, f = k.root), "height" in k && t(8, u = k.height), "width" in k && t(9, c = k.width), "_selectable" in k && t(10, d = k._selectable), "container" in k && t(11, _ = k.container), "scale" in k && t(12, b = k.scale), "min_width" in k && t(13, h = k.min_width), "loading_status" in k && t(1, w = k.loading_status), "sources" in k && t(14, g = k.sources), "show_download_button" in k && t(15, p = k.show_download_button), "show_share_button" in k && t(16, m = k.show_share_button), "show_clear_button" in k && t(17, C = k.show_clear_button), "interactive" in k && t(18, z = k.interactive), "boxes_alpha" in k && t(19, y = k.boxes_alpha), "label_list" in k && t(20, q = k.label_list), "label_colors" in k && t(21, v = k.label_colors), "box_min_size" in k && t(22, E = k.box_min_size), "handle_size" in k && t(23, F = k.handle_size), "box_thickness" in k && t(24, X = k.box_thickness), "box_selected_thickness" in k && t(25, L = k.box_selected_thickness), "disable_edit_boxes" in k && t(26, V = k.disable_edit_boxes), "gradio" in k && t(27, I = k.gradio); + return l.$$set = (C) => { + "elem_id" in C && t(2, n = C.elem_id), "elem_classes" in C && t(3, i = C.elem_classes), "visible" in C && t(4, o = C.visible), "value" in C && t(0, s = C.value), "label" in C && t(5, r = C.label), "show_label" in C && t(6, a = C.show_label), "root" in C && t(7, f = C.root), "height" in C && t(8, u = C.height), "width" in C && t(9, c = C.width), "_selectable" in C && t(10, _ = C._selectable), "container" in C && t(11, d = C.container), "scale" in C && t(12, h = C.scale), "min_width" in C && t(13, b = C.min_width), "loading_status" in C && t(1, g = C.loading_status), "sources" in C && t(14, w = C.sources), "show_download_button" in C && t(15, p = C.show_download_button), "show_share_button" in C && t(16, m = C.show_share_button), "show_clear_button" in C && t(17, v = C.show_clear_button), "interactive" in C && t(18, S = C.interactive), "boxes_alpha" in C && t(19, y = C.boxes_alpha), "label_list" in C && t(20, z = C.label_list), "label_colors" in C && t(21, k = C.label_colors), "box_min_size" in C && t(22, q = C.box_min_size), "handle_size" in C && t(23, I = C.handle_size), "box_thickness" in C && t(24, F = C.box_thickness), "box_selected_thickness" in C && t(25, R = C.box_selected_thickness), "disable_edit_boxes" in C && t(26, G = C.disable_edit_boxes), "show_remove_button" in C && t(27, U = C.show_remove_button), "gradio" in C && t(28, X = C.gradio); }, [ - a, - w, + s, + g, n, i, - s, - r, o, + r, + a, f, u, c, - d, _, - b, + d, h, - g, + b, + w, p, m, - C, - z, + v, + S, y, + z, + k, q, - v, - E, + I, F, + R, + G, + U, X, - L, - V, - I, - Q, - W, - le, - ae, - re, - D, + O, + _e, + oe, fe, - Se, - Fe, - Pe, - B, - Ze + D, + ue, + Ce, + Xe, + Ye, + A, + Je, + E ]; } -class A0 extends s0 { +class O0 extends k0 { constructor(e) { - super(), _0( + super(), E0( this, e, - y0, - v0, - d0, + F0, + I0, + M0, { elem_id: 2, elem_classes: 3, @@ -9027,7 +9126,8 @@ class A0 extends s0 { box_thickness: 24, box_selected_thickness: 25, disable_edit_boxes: 26, - gradio: 27 + show_remove_button: 27, + gradio: 28 }, null, [-1, -1] @@ -9037,172 +9137,178 @@ class A0 extends s0 { return this.$$.ctx[2]; } set elem_id(e) { - this.$$set({ elem_id: e }), U(); + this.$$set({ elem_id: e }), V(); } get elem_classes() { return this.$$.ctx[3]; } set elem_classes(e) { - this.$$set({ elem_classes: e }), U(); + this.$$set({ elem_classes: e }), V(); } get visible() { return this.$$.ctx[4]; } set visible(e) { - this.$$set({ visible: e }), U(); + this.$$set({ visible: e }), V(); } get value() { return this.$$.ctx[0]; } set value(e) { - this.$$set({ value: e }), U(); + this.$$set({ value: e }), V(); } get label() { return this.$$.ctx[5]; } set label(e) { - this.$$set({ label: e }), U(); + this.$$set({ label: e }), V(); } get show_label() { return this.$$.ctx[6]; } set show_label(e) { - this.$$set({ show_label: e }), U(); + this.$$set({ show_label: e }), V(); } get root() { return this.$$.ctx[7]; } set root(e) { - this.$$set({ root: e }), U(); + this.$$set({ root: e }), V(); } get height() { return this.$$.ctx[8]; } set height(e) { - this.$$set({ height: e }), U(); + this.$$set({ height: e }), V(); } get width() { return this.$$.ctx[9]; } set width(e) { - this.$$set({ width: e }), U(); + this.$$set({ width: e }), V(); } get _selectable() { return this.$$.ctx[10]; } set _selectable(e) { - this.$$set({ _selectable: e }), U(); + this.$$set({ _selectable: e }), V(); } get container() { return this.$$.ctx[11]; } set container(e) { - this.$$set({ container: e }), U(); + this.$$set({ container: e }), V(); } get scale() { return this.$$.ctx[12]; } set scale(e) { - this.$$set({ scale: e }), U(); + this.$$set({ scale: e }), V(); } get min_width() { return this.$$.ctx[13]; } set min_width(e) { - this.$$set({ min_width: e }), U(); + this.$$set({ min_width: e }), V(); } get loading_status() { return this.$$.ctx[1]; } set loading_status(e) { - this.$$set({ loading_status: e }), U(); + this.$$set({ loading_status: e }), V(); } get sources() { return this.$$.ctx[14]; } set sources(e) { - this.$$set({ sources: e }), U(); + this.$$set({ sources: e }), V(); } get show_download_button() { return this.$$.ctx[15]; } set show_download_button(e) { - this.$$set({ show_download_button: e }), U(); + this.$$set({ show_download_button: e }), V(); } get show_share_button() { return this.$$.ctx[16]; } set show_share_button(e) { - this.$$set({ show_share_button: e }), U(); + this.$$set({ show_share_button: e }), V(); } get show_clear_button() { return this.$$.ctx[17]; } set show_clear_button(e) { - this.$$set({ show_clear_button: e }), U(); + this.$$set({ show_clear_button: e }), V(); } get interactive() { return this.$$.ctx[18]; } set interactive(e) { - this.$$set({ interactive: e }), U(); + this.$$set({ interactive: e }), V(); } get boxes_alpha() { return this.$$.ctx[19]; } set boxes_alpha(e) { - this.$$set({ boxes_alpha: e }), U(); + this.$$set({ boxes_alpha: e }), V(); } get label_list() { return this.$$.ctx[20]; } set label_list(e) { - this.$$set({ label_list: e }), U(); + this.$$set({ label_list: e }), V(); } get label_colors() { return this.$$.ctx[21]; } set label_colors(e) { - this.$$set({ label_colors: e }), U(); + this.$$set({ label_colors: e }), V(); } get box_min_size() { return this.$$.ctx[22]; } set box_min_size(e) { - this.$$set({ box_min_size: e }), U(); + this.$$set({ box_min_size: e }), V(); } get handle_size() { return this.$$.ctx[23]; } set handle_size(e) { - this.$$set({ handle_size: e }), U(); + this.$$set({ handle_size: e }), V(); } get box_thickness() { return this.$$.ctx[24]; } set box_thickness(e) { - this.$$set({ box_thickness: e }), U(); + this.$$set({ box_thickness: e }), V(); } get box_selected_thickness() { return this.$$.ctx[25]; } set box_selected_thickness(e) { - this.$$set({ box_selected_thickness: e }), U(); + this.$$set({ box_selected_thickness: e }), V(); } get disable_edit_boxes() { return this.$$.ctx[26]; } set disable_edit_boxes(e) { - this.$$set({ disable_edit_boxes: e }), U(); + this.$$set({ disable_edit_boxes: e }), V(); } - get gradio() { + get show_remove_button() { return this.$$.ctx[27]; } + set show_remove_button(e) { + this.$$set({ show_remove_button: e }), V(); + } + get gradio() { + return this.$$.ctx[28]; + } set gradio(e) { - this.$$set({ gradio: e }), U(); + this.$$set({ gradio: e }), V(); } } export { - E0 as BaseExample, - A0 as default + N0 as BaseExample, + O0 as default };