diff --git "a/src/backend/gradio_videogallery/templates/component/index.js" "b/src/backend/gradio_videogallery/templates/component/index.js" --- "a/src/backend/gradio_videogallery/templates/component/index.js" +++ "b/src/backend/gradio_videogallery/templates/component/index.js" @@ -1,28 +1,28 @@ const { - SvelteComponent: Pr, - assign: Ir, - create_slot: kr, - detach: Lr, - element: Nr, - get_all_dirty_from_scope: Or, - get_slot_changes: Mr, - get_spread_update: Rr, - init: Dr, - insert: Ur, - safe_not_equal: Gr, - set_dynamic_element_data: Tn, - set_style: X, - toggle_class: de, - transition_in: Oi, - transition_out: Mi, - update_slot_base: Fr + SvelteComponent: Mr, + assign: Rr, + create_slot: Dr, + detach: Ur, + element: Gr, + get_all_dirty_from_scope: xr, + get_slot_changes: Fr, + get_spread_update: jr, + init: Vr, + insert: qr, + safe_not_equal: zr, + set_dynamic_element_data: Hn, + set_style: Q, + toggle_class: be, + transition_in: Ui, + transition_out: Gi, + update_slot_base: Xr } = window.__gradio__svelte__internal; -function xr(e) { +function Zr(e) { let t, n, i; const r = ( /*#slots*/ e[17].default - ), l = kr( + ), l = Dr( r, e, /*$$scope*/ @@ -44,82 +44,82 @@ function xr(e) { } ], a = {}; for (let s = 0; s < o.length; s += 1) - a = Ir(a, o[s]); + a = Rr(a, o[s]); return { c() { - t = Nr( + t = Gr( /*tag*/ e[14] - ), l && l.c(), Tn( + ), l && l.c(), Hn( /*tag*/ e[14] - )(t, a), de( + )(t, a), be( t, "hidden", /*visible*/ e[10] === !1 - ), de( + ), be( t, "padded", /*padding*/ e[6] - ), de( + ), be( t, "border_focus", /*border_mode*/ e[5] === "focus" - ), de(t, "hide-container", !/*explicit_call*/ + ), be(t, "hide-container", !/*explicit_call*/ e[8] && !/*container*/ - e[9]), X(t, "height", typeof /*height*/ + e[9]), Q(t, "height", typeof /*height*/ e[0] == "number" ? ( /*height*/ e[0] + "px" - ) : void 0), X(t, "width", typeof /*width*/ + ) : void 0), Q(t, "width", typeof /*width*/ e[1] == "number" ? `calc(min(${/*width*/ - e[1]}px, 100%))` : void 0), X( + e[1]}px, 100%))` : void 0), Q( t, "border-style", /*variant*/ e[4] - ), X( + ), Q( t, "overflow", /*allow_overflow*/ e[11] ? "visible" : "hidden" - ), X( + ), Q( t, "flex-grow", /*scale*/ e[12] - ), X(t, "min-width", `calc(min(${/*min_width*/ - e[13]}px, 100%))`), X(t, "border-width", "var(--block-border-width)"); + ), Q(t, "min-width", `calc(min(${/*min_width*/ + e[13]}px, 100%))`), Q(t, "border-width", "var(--block-border-width)"); }, m(s, u) { - Ur(s, t, u), l && l.m(t, null), i = !0; + qr(s, t, u), l && l.m(t, null), i = !0; }, p(s, u) { l && l.p && (!i || u & /*$$scope*/ - 65536) && Fr( + 65536) && Xr( l, r, s, /*$$scope*/ s[16], - i ? Mr( + i ? Fr( r, /*$$scope*/ s[16], u, null - ) : Or( + ) : xr( /*$$scope*/ s[16] ), null - ), Tn( + ), Hn( /*tag*/ s[14] - )(t, a = Rr(o, [ + )(t, a = jr(o, [ (!i || u & /*test_id*/ 128) && { "data-testid": ( /*test_id*/ @@ -133,68 +133,68 @@ function xr(e) { (!i || u & /*elem_classes*/ 8 && n !== (n = "block " + /*elem_classes*/ s[3].join(" ") + " svelte-1t38q2d")) && { class: n } - ])), de( + ])), be( t, "hidden", /*visible*/ s[10] === !1 - ), de( + ), be( t, "padded", /*padding*/ s[6] - ), de( + ), be( t, "border_focus", /*border_mode*/ s[5] === "focus" - ), de(t, "hide-container", !/*explicit_call*/ + ), be(t, "hide-container", !/*explicit_call*/ s[8] && !/*container*/ s[9]), u & /*height*/ - 1 && X(t, "height", typeof /*height*/ + 1 && Q(t, "height", typeof /*height*/ s[0] == "number" ? ( /*height*/ s[0] + "px" ) : void 0), u & /*width*/ - 2 && X(t, "width", typeof /*width*/ + 2 && Q(t, "width", typeof /*width*/ s[1] == "number" ? `calc(min(${/*width*/ s[1]}px, 100%))` : void 0), u & /*variant*/ - 16 && X( + 16 && Q( t, "border-style", /*variant*/ s[4] ), u & /*allow_overflow*/ - 2048 && X( + 2048 && Q( t, "overflow", /*allow_overflow*/ s[11] ? "visible" : "hidden" ), u & /*scale*/ - 4096 && X( + 4096 && Q( t, "flex-grow", /*scale*/ s[12] ), u & /*min_width*/ - 8192 && X(t, "min-width", `calc(min(${/*min_width*/ + 8192 && Q(t, "min-width", `calc(min(${/*min_width*/ s[13]}px, 100%))`); }, i(s) { - i || (Oi(l, s), i = !0); + i || (Ui(l, s), i = !0); }, o(s) { - Mi(l, s), i = !1; + Gi(l, s), i = !1; }, d(s) { - s && Lr(t), l && l.d(s); + s && Ur(t), l && l.d(s); } }; } -function jr(e) { +function Wr(e) { let t, n = ( /*tag*/ - e[14] && xr(e) + e[14] && Zr(e) ); return { c() { @@ -208,20 +208,20 @@ function jr(e) { i[14] && n.p(i, r); }, i(i) { - t || (Oi(n, i), t = !0); + t || (Ui(n, i), t = !0); }, o(i) { - Mi(n, i), t = !1; + Gi(n, i), t = !1; }, d(i) { n && n.d(i); } }; } -function Vr(e, t, n) { - let { $$slots: i = {}, $$scope: r } = t, { height: l = void 0 } = t, { width: o = void 0 } = t, { elem_id: a = "" } = t, { elem_classes: s = [] } = t, { variant: u = "solid" } = t, { border_mode: f = "base" } = t, { padding: c = !0 } = t, { type: h = "normal" } = t, { test_id: _ = void 0 } = t, { explicit_call: b = !1 } = t, { container: T = !0 } = t, { visible: y = !0 } = t, { allow_overflow: C = !0 } = t, { scale: E = null } = t, { min_width: m = 0 } = t, g = h === "fieldset" ? "fieldset" : "div"; - return e.$$set = (p) => { - "height" in p && n(0, l = p.height), "width" in p && n(1, o = p.width), "elem_id" in p && n(2, a = p.elem_id), "elem_classes" in p && n(3, s = p.elem_classes), "variant" in p && n(4, u = p.variant), "border_mode" in p && n(5, f = p.border_mode), "padding" in p && n(6, c = p.padding), "type" in p && n(15, h = p.type), "test_id" in p && n(7, _ = p.test_id), "explicit_call" in p && n(8, b = p.explicit_call), "container" in p && n(9, T = p.container), "visible" in p && n(10, y = p.visible), "allow_overflow" in p && n(11, C = p.allow_overflow), "scale" in p && n(12, E = p.scale), "min_width" in p && n(13, m = p.min_width), "$$scope" in p && n(16, r = p.$$scope); +function Qr(e, t, n) { + let { $$slots: i = {}, $$scope: r } = t, { height: l = void 0 } = t, { width: o = void 0 } = t, { elem_id: a = "" } = t, { elem_classes: s = [] } = t, { variant: u = "solid" } = t, { border_mode: f = "base" } = t, { padding: c = !0 } = t, { type: h = "normal" } = t, { test_id: _ = void 0 } = t, { explicit_call: g = !1 } = t, { container: S = !0 } = t, { visible: v = !0 } = t, { allow_overflow: A = !0 } = t, { scale: y = null } = t, { min_width: d = 0 } = t, T = h === "fieldset" ? "fieldset" : "div"; + return e.$$set = (b) => { + "height" in b && n(0, l = b.height), "width" in b && n(1, o = b.width), "elem_id" in b && n(2, a = b.elem_id), "elem_classes" in b && n(3, s = b.elem_classes), "variant" in b && n(4, u = b.variant), "border_mode" in b && n(5, f = b.border_mode), "padding" in b && n(6, c = b.padding), "type" in b && n(15, h = b.type), "test_id" in b && n(7, _ = b.test_id), "explicit_call" in b && n(8, g = b.explicit_call), "container" in b && n(9, S = b.container), "visible" in b && n(10, v = b.visible), "allow_overflow" in b && n(11, A = b.allow_overflow), "scale" in b && n(12, y = b.scale), "min_width" in b && n(13, d = b.min_width), "$$scope" in b && n(16, r = b.$$scope); }, [ l, o, @@ -231,21 +231,21 @@ function Vr(e, t, n) { f, c, _, - b, - T, - y, - C, - E, - m, g, + S, + v, + A, + y, + d, + T, h, r, i ]; } -class zr extends Pr { +class Jr extends Mr { constructor(t) { - super(), Dr(this, t, Vr, jr, Gr, { + super(), Vr(this, t, Qr, Wr, zr, { height: 0, width: 1, elem_id: 2, @@ -265,40 +265,40 @@ class zr extends Pr { } } const { - SvelteComponent: qr, + SvelteComponent: Yr, append: It, - attr: at, - create_component: Xr, - destroy_component: Zr, - detach: Wr, - element: An, - init: Qr, - insert: Jr, - mount_component: Yr, - safe_not_equal: Kr, - set_data: $r, - space: el, - text: tl, - toggle_class: be, - transition_in: nl, - transition_out: il + attr: ct, + create_component: Kr, + destroy_component: $r, + detach: el, + element: Bn, + init: tl, + insert: nl, + mount_component: il, + safe_not_equal: rl, + set_data: ll, + space: ol, + text: sl, + toggle_class: ge, + transition_in: al, + transition_out: ul } = window.__gradio__svelte__internal; -function rl(e) { +function fl(e) { let t, n, i, r, l, o; return i = new /*Icon*/ e[1]({}), { c() { - t = An("label"), n = An("span"), Xr(i.$$.fragment), r = el(), l = tl( + t = Bn("label"), n = Bn("span"), Kr(i.$$.fragment), r = ol(), l = sl( /*label*/ e[0] - ), at(n, "class", "svelte-9gxdi0"), at(t, "for", ""), at(t, "data-testid", "block-label"), at(t, "class", "svelte-9gxdi0"), be(t, "hide", !/*show_label*/ - e[2]), be(t, "sr-only", !/*show_label*/ - e[2]), be( + ), ct(n, "class", "svelte-9gxdi0"), ct(t, "for", ""), ct(t, "data-testid", "block-label"), ct(t, "class", "svelte-9gxdi0"), ge(t, "hide", !/*show_label*/ + e[2]), ge(t, "sr-only", !/*show_label*/ + e[2]), ge( t, "float", /*float*/ e[4] - ), be( + ), ge( t, "hide-label", /*disable*/ @@ -306,26 +306,26 @@ function rl(e) { ); }, m(a, s) { - Jr(a, t, s), It(t, n), Yr(i, n, null), It(t, r), It(t, l), o = !0; + nl(a, t, s), It(t, n), il(i, n, null), It(t, r), It(t, l), o = !0; }, p(a, [s]) { (!o || s & /*label*/ - 1) && $r( + 1) && ll( l, /*label*/ a[0] ), (!o || s & /*show_label*/ - 4) && be(t, "hide", !/*show_label*/ + 4) && ge(t, "hide", !/*show_label*/ a[2]), (!o || s & /*show_label*/ - 4) && be(t, "sr-only", !/*show_label*/ + 4) && ge(t, "sr-only", !/*show_label*/ a[2]), (!o || s & /*float*/ - 16) && be( + 16) && ge( t, "float", /*float*/ a[4] ), (!o || s & /*disable*/ - 8) && be( + 8) && ge( t, "hide-label", /*disable*/ @@ -333,25 +333,25 @@ function rl(e) { ); }, i(a) { - o || (nl(i.$$.fragment, a), o = !0); + o || (al(i.$$.fragment, a), o = !0); }, o(a) { - il(i.$$.fragment, a), o = !1; + ul(i.$$.fragment, a), o = !1; }, d(a) { - a && Wr(t), Zr(i); + a && el(t), $r(i); } }; } -function ll(e, t, n) { +function cl(e, t, n) { let { label: i = null } = t, { Icon: r } = t, { show_label: l = !0 } = t, { disable: o = !1 } = t, { float: a = !0 } = t; return e.$$set = (s) => { "label" in s && n(0, i = s.label), "Icon" in s && n(1, r = s.Icon), "show_label" in s && n(2, l = s.show_label), "disable" in s && n(3, o = s.disable), "float" in s && n(4, a = s.float); }, [i, r, l, o, a]; } -class ol extends qr { +class hl extends Yr { constructor(t) { - super(), Qr(this, t, ll, rl, Kr, { + super(), tl(this, t, cl, fl, rl, { label: 0, Icon: 1, show_label: 2, @@ -361,85 +361,85 @@ class ol extends qr { } } const { - SvelteComponent: sl, - append: Qt, - attr: Se, - bubble: al, - create_component: ul, - destroy_component: fl, - detach: Ri, - element: Jt, - init: cl, - insert: Di, - listen: hl, - mount_component: _l, - safe_not_equal: ml, - set_data: dl, - space: bl, - text: gl, - toggle_class: ge, - transition_in: pl, - transition_out: vl + SvelteComponent: _l, + append: Yt, + attr: Te, + bubble: ml, + create_component: dl, + destroy_component: bl, + detach: xi, + element: Kt, + init: gl, + insert: Fi, + listen: pl, + mount_component: vl, + safe_not_equal: wl, + set_data: yl, + space: El, + text: Sl, + toggle_class: pe, + transition_in: Tl, + transition_out: Al } = window.__gradio__svelte__internal; -function Hn(e) { +function kn(e) { let t, n; return { c() { - t = Jt("span"), n = gl( + t = Kt("span"), n = Sl( /*label*/ e[1] - ), Se(t, "class", "svelte-xtz2g8"); + ), Te(t, "class", "svelte-xtz2g8"); }, m(i, r) { - Di(i, t, r), Qt(t, n); + Fi(i, t, r), Yt(t, n); }, p(i, r) { r & /*label*/ - 2 && dl( + 2 && yl( n, /*label*/ i[1] ); }, d(i) { - i && Ri(t); + i && xi(t); } }; } -function wl(e) { +function Hl(e) { let t, n, i, r, l, o, a, s = ( /*show_label*/ - e[2] && Hn(e) + e[2] && kn(e) ); return r = new /*Icon*/ e[0]({}), { c() { - t = Jt("button"), s && s.c(), n = bl(), i = Jt("div"), ul(r.$$.fragment), Se(i, "class", "svelte-xtz2g8"), ge( + t = Kt("button"), s && s.c(), n = El(), i = Kt("div"), dl(r.$$.fragment), Te(i, "class", "svelte-xtz2g8"), pe( i, "small", /*size*/ e[4] === "small" - ), ge( + ), pe( i, "large", /*size*/ e[4] === "large" - ), Se( + ), Te( t, "aria-label", /*label*/ e[1] - ), Se( + ), Te( t, "title", /*label*/ e[1] - ), Se(t, "class", "svelte-xtz2g8"), ge( + ), Te(t, "class", "svelte-xtz2g8"), pe( t, "pending", /*pending*/ e[3] - ), ge( + ), pe( t, "padded", /*padded*/ @@ -447,7 +447,7 @@ function wl(e) { ); }, m(u, f) { - Di(u, t, f), s && s.m(t, null), Qt(t, n), Qt(t, i), _l(r, i, null), l = !0, o || (a = hl( + Fi(u, t, f), s && s.m(t, null), Yt(t, n), Yt(t, i), vl(r, i, null), l = !0, o || (a = pl( t, "click", /*click_handler*/ @@ -456,38 +456,38 @@ function wl(e) { }, p(u, [f]) { /*show_label*/ - u[2] ? s ? s.p(u, f) : (s = Hn(u), s.c(), s.m(t, n)) : s && (s.d(1), s = null), (!l || f & /*size*/ - 16) && ge( + u[2] ? s ? s.p(u, f) : (s = kn(u), s.c(), s.m(t, n)) : s && (s.d(1), s = null), (!l || f & /*size*/ + 16) && pe( i, "small", /*size*/ u[4] === "small" ), (!l || f & /*size*/ - 16) && ge( + 16) && pe( i, "large", /*size*/ u[4] === "large" ), (!l || f & /*label*/ - 2) && Se( + 2) && Te( t, "aria-label", /*label*/ u[1] ), (!l || f & /*label*/ - 2) && Se( + 2) && Te( t, "title", /*label*/ u[1] ), (!l || f & /*pending*/ - 8) && ge( + 8) && pe( t, "pending", /*pending*/ u[3] ), (!l || f & /*padded*/ - 32) && ge( + 32) && pe( t, "padded", /*padded*/ @@ -495,28 +495,28 @@ function wl(e) { ); }, i(u) { - l || (pl(r.$$.fragment, u), l = !0); + l || (Tl(r.$$.fragment, u), l = !0); }, o(u) { - vl(r.$$.fragment, u), l = !1; + Al(r.$$.fragment, u), l = !1; }, d(u) { - u && Ri(t), s && s.d(), fl(r), o = !1, a(); + u && xi(t), s && s.d(), bl(r), o = !1, a(); } }; } -function yl(e, t, n) { +function Bl(e, t, n) { let { Icon: i } = t, { label: r = "" } = t, { show_label: l = !1 } = t, { pending: o = !1 } = t, { size: a = "small" } = t, { padded: s = !0 } = t; function u(f) { - al.call(this, e, f); + ml.call(this, e, f); } return e.$$set = (f) => { "Icon" in f && n(0, i = f.Icon), "label" in f && n(1, r = f.label), "show_label" in f && n(2, l = f.show_label), "pending" in f && n(3, o = f.pending), "size" in f && n(4, a = f.size), "padded" in f && n(5, s = f.padded); }, [i, r, l, o, a, s, u]; } -class et extends sl { +class nt extends _l { constructor(t) { - super(), cl(this, t, yl, wl, ml, { + super(), gl(this, t, Bl, Hl, wl, { Icon: 0, label: 1, show_label: 2, @@ -527,29 +527,29 @@ class et extends sl { } } const { - SvelteComponent: El, - append: Sl, - attr: kt, - binding_callbacks: Tl, - create_slot: Al, - detach: Hl, - element: Bn, - get_all_dirty_from_scope: Bl, - get_slot_changes: Cl, - init: Pl, - insert: Il, - safe_not_equal: kl, - toggle_class: pe, - transition_in: Ll, - transition_out: Nl, - update_slot_base: Ol + SvelteComponent: kl, + append: Cl, + attr: Lt, + binding_callbacks: Pl, + create_slot: Il, + detach: Ll, + element: Cn, + get_all_dirty_from_scope: Nl, + get_slot_changes: Ol, + init: Ml, + insert: Rl, + safe_not_equal: Dl, + toggle_class: ve, + transition_in: Ul, + transition_out: Gl, + update_slot_base: xl } = window.__gradio__svelte__internal; -function Ml(e) { +function Fl(e) { let t, n, i; const r = ( /*#slots*/ e[5].default - ), l = Al( + ), l = Il( r, e, /*$$scope*/ @@ -558,22 +558,22 @@ function Ml(e) { ); return { c() { - t = Bn("div"), n = Bn("div"), l && l.c(), kt(n, "class", "icon svelte-3w3rth"), kt(t, "class", "empty svelte-3w3rth"), kt(t, "aria-label", "Empty value"), pe( + t = Cn("div"), n = Cn("div"), l && l.c(), Lt(n, "class", "icon svelte-3w3rth"), Lt(t, "class", "empty svelte-3w3rth"), Lt(t, "aria-label", "Empty value"), ve( t, "small", /*size*/ e[0] === "small" - ), pe( + ), ve( t, "large", /*size*/ e[0] === "large" - ), pe( + ), ve( t, "unpadded_box", /*unpadded_box*/ e[1] - ), pe( + ), ve( t, "small_parent", /*parent_height*/ @@ -581,47 +581,47 @@ function Ml(e) { ); }, m(o, a) { - Il(o, t, a), Sl(t, n), l && l.m(n, null), e[6](t), i = !0; + Rl(o, t, a), Cl(t, n), l && l.m(n, null), e[6](t), i = !0; }, p(o, [a]) { l && l.p && (!i || a & /*$$scope*/ - 16) && Ol( + 16) && xl( l, r, o, /*$$scope*/ o[4], - i ? Cl( + i ? Ol( r, /*$$scope*/ o[4], a, null - ) : Bl( + ) : Nl( /*$$scope*/ o[4] ), null ), (!i || a & /*size*/ - 1) && pe( + 1) && ve( t, "small", /*size*/ o[0] === "small" ), (!i || a & /*size*/ - 1) && pe( + 1) && ve( t, "large", /*size*/ o[0] === "large" ), (!i || a & /*unpadded_box*/ - 2) && pe( + 2) && ve( t, "unpadded_box", /*unpadded_box*/ o[1] ), (!i || a & /*parent_height*/ - 8) && pe( + 8) && ve( t, "small_parent", /*parent_height*/ @@ -629,17 +629,17 @@ function Ml(e) { ); }, i(o) { - i || (Ll(l, o), i = !0); + i || (Ul(l, o), i = !0); }, o(o) { - Nl(l, o), i = !1; + Gl(l, o), i = !1; }, d(o) { - o && Hl(t), l && l.d(o), e[6](null); + o && Ll(t), l && l.d(o), e[6](null); } }; } -function Rl(e) { +function jl(e) { let t, n = e[0], i = 1; for (; i < e.length; ) { const r = e[i], l = e[i + 1]; @@ -649,24 +649,24 @@ function Rl(e) { } return n; } -function Dl(e, t, n) { +function Vl(e, t, n) { let i, { $$slots: r = {}, $$scope: l } = t, { size: o = "small" } = t, { unpadded_box: a = !1 } = t, s; function u(c) { if (!c) return !1; - const { height: h } = c.getBoundingClientRect(), { height: _ } = Rl([ + const { height: h } = c.getBoundingClientRect(), { height: _ } = jl([ c, "access", - (b) => b.parentElement, + (g) => g.parentElement, "optionalAccess", - (b) => b.getBoundingClientRect, + (g) => g.getBoundingClientRect, "call", - (b) => b() + (g) => g() ]) || { height: h }; return h > _ + 2; } function f(c) { - Tl[c ? "unshift" : "push"](() => { + Pl[c ? "unshift" : "push"](() => { s = c, n(2, s); }); } @@ -677,211 +677,244 @@ function Dl(e, t, n) { 4 && n(3, i = u(s)); }, [o, a, s, i, l, r, f]; } -class Ul extends El { +class ql extends kl { constructor(t) { - super(), Pl(this, t, Dl, Ml, kl, { size: 0, unpadded_box: 1 }); + super(), Ml(this, t, Vl, Fl, Dl, { size: 0, unpadded_box: 1 }); } } const { - SvelteComponent: Gl, - append: Lt, - attr: te, - detach: Fl, - init: xl, - insert: jl, - noop: Nt, - safe_not_equal: Vl, + SvelteComponent: zl, + append: Nt, + attr: ee, + detach: Xl, + init: Zl, + insert: Wl, + noop: Ot, + safe_not_equal: Ql, set_style: oe, - svg_element: ut + svg_element: ht } = window.__gradio__svelte__internal; -function zl(e) { +function Jl(e) { let t, n, i, r; return { c() { - t = ut("svg"), n = ut("g"), i = ut("path"), r = ut("path"), te(i, "d", "M18,6L6.087,17.913"), oe(i, "fill", "none"), oe(i, "fill-rule", "nonzero"), oe(i, "stroke-width", "2px"), te(n, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), te(r, "d", "M4.364,4.364L19.636,19.636"), oe(r, "fill", "none"), oe(r, "fill-rule", "nonzero"), oe(r, "stroke-width", "2px"), te(t, "width", "100%"), te(t, "height", "100%"), te(t, "viewBox", "0 0 24 24"), te(t, "version", "1.1"), te(t, "xmlns", "http://www.w3.org/2000/svg"), te(t, "xmlns:xlink", "http://www.w3.org/1999/xlink"), te(t, "xml:space", "preserve"), te(t, "stroke", "currentColor"), oe(t, "fill-rule", "evenodd"), oe(t, "clip-rule", "evenodd"), oe(t, "stroke-linecap", "round"), oe(t, "stroke-linejoin", "round"); + t = ht("svg"), n = ht("g"), i = ht("path"), r = ht("path"), ee(i, "d", "M18,6L6.087,17.913"), oe(i, "fill", "none"), oe(i, "fill-rule", "nonzero"), oe(i, "stroke-width", "2px"), ee(n, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), ee(r, "d", "M4.364,4.364L19.636,19.636"), oe(r, "fill", "none"), oe(r, "fill-rule", "nonzero"), oe(r, "stroke-width", "2px"), ee(t, "width", "100%"), ee(t, "height", "100%"), ee(t, "viewBox", "0 0 24 24"), ee(t, "version", "1.1"), ee(t, "xmlns", "http://www.w3.org/2000/svg"), ee(t, "xmlns:xlink", "http://www.w3.org/1999/xlink"), ee(t, "xml:space", "preserve"), ee(t, "stroke", "currentColor"), oe(t, "fill-rule", "evenodd"), oe(t, "clip-rule", "evenodd"), oe(t, "stroke-linecap", "round"), oe(t, "stroke-linejoin", "round"); }, m(l, o) { - jl(l, t, o), Lt(t, n), Lt(n, i), Lt(t, r); - }, - p: Nt, - i: Nt, - o: Nt, - d(l) { - l && Fl(t); - } - }; -} -class ql extends Gl { - constructor(t) { - super(), xl(this, t, null, zl, Vl, {}); - } -} -const { - SvelteComponent: Xl, - append: Zl, - attr: Xe, - detach: Wl, - init: Ql, - insert: Jl, - noop: Ot, - safe_not_equal: Yl, - svg_element: Cn -} = window.__gradio__svelte__internal; -function Kl(e) { - let t, n; - return { - c() { - t = Cn("svg"), n = Cn("path"), Xe(n, "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"), Xe(n, "fill", "currentColor"), Xe(t, "id", "icon"), Xe(t, "xmlns", "http://www.w3.org/2000/svg"), Xe(t, "viewBox", "0 0 32 32"); - }, - m(i, r) { - Jl(i, t, r), Zl(t, n); + Wl(l, t, o), Nt(t, n), Nt(n, i), Nt(t, r); }, p: Ot, i: Ot, o: Ot, - d(i) { - i && Wl(t); + d(l) { + l && Xl(t); } }; } -class $l extends Xl { +class Yl extends zl { constructor(t) { - super(), Ql(this, t, null, Kl, Yl, {}); + super(), Zl(this, t, null, Jl, Ql, {}); } } const { - SvelteComponent: eo, - append: to, - attr: Ce, - detach: no, - init: io, - insert: ro, + SvelteComponent: Kl, + append: $l, + attr: Je, + detach: eo, + init: to, + insert: no, noop: Mt, - safe_not_equal: lo, + safe_not_equal: io, svg_element: Pn } = window.__gradio__svelte__internal; -function oo(e) { +function ro(e) { let t, n; return { c() { - t = Pn("svg"), n = Pn("path"), Ce(n, "fill", "currentColor"), Ce(n, "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"), Ce(t, "xmlns", "http://www.w3.org/2000/svg"), Ce(t, "width", "100%"), Ce(t, "height", "100%"), Ce(t, "viewBox", "0 0 32 32"); + t = Pn("svg"), n = Pn("path"), Je(n, "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"), Je(n, "fill", "currentColor"), Je(t, "id", "icon"), Je(t, "xmlns", "http://www.w3.org/2000/svg"), Je(t, "viewBox", "0 0 32 32"); }, m(i, r) { - ro(i, t, r), to(t, n); + no(i, t, r), $l(t, n); }, p: Mt, i: Mt, o: Mt, d(i) { - i && no(t); + i && eo(t); } }; } -class so extends eo { +class lo extends Kl { constructor(t) { - super(), io(this, t, null, oo, lo, {}); + super(), to(this, t, null, ro, io, {}); } } const { - SvelteComponent: ao, - append: uo, - attr: ne, - detach: fo, - init: co, - insert: ho, + SvelteComponent: oo, + append: so, + attr: Re, + detach: ao, + init: uo, + insert: fo, noop: Rt, - safe_not_equal: _o, + safe_not_equal: co, svg_element: In } = window.__gradio__svelte__internal; -function mo(e) { +function ho(e) { let t, n; return { c() { - t = In("svg"), n = In("path"), ne(n, "d", "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"), ne(t, "xmlns", "http://www.w3.org/2000/svg"), ne(t, "width", "100%"), ne(t, "height", "100%"), ne(t, "viewBox", "0 0 24 24"), ne(t, "fill", "none"), ne(t, "stroke", "currentColor"), ne(t, "stroke-width", "1.5"), ne(t, "stroke-linecap", "round"), ne(t, "stroke-linejoin", "round"), ne(t, "class", "feather feather-edit-2"); + t = In("svg"), n = In("path"), Re(n, "fill", "currentColor"), Re(n, "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"), Re(t, "xmlns", "http://www.w3.org/2000/svg"), Re(t, "width", "100%"), Re(t, "height", "100%"), Re(t, "viewBox", "0 0 32 32"); }, m(i, r) { - ho(i, t, r), uo(t, n); + fo(i, t, r), so(t, n); }, p: Rt, i: Rt, o: Rt, d(i) { - i && fo(t); + i && ao(t); } }; } -class bo extends ao { +class _o extends oo { constructor(t) { - super(), co(this, t, null, mo, _o, {}); + super(), uo(this, t, null, ho, co, {}); } } const { - SvelteComponent: go, - append: Dt, - attr: R, - detach: po, - init: vo, - insert: wo, - noop: Ut, - safe_not_equal: yo, - svg_element: ft + SvelteComponent: mo, + append: bo, + attr: te, + detach: go, + init: po, + insert: vo, + noop: Dt, + safe_not_equal: wo, + svg_element: Ln } = window.__gradio__svelte__internal; -function Eo(e) { - let t, n, i, r; +function yo(e) { + let t, n; return { c() { - t = ft("svg"), n = ft("rect"), i = ft("circle"), r = ft("polyline"), R(n, "x", "3"), R(n, "y", "3"), R(n, "width", "18"), R(n, "height", "18"), R(n, "rx", "2"), R(n, "ry", "2"), R(i, "cx", "8.5"), R(i, "cy", "8.5"), R(i, "r", "1.5"), R(r, "points", "21 15 16 10 5 21"), R(t, "xmlns", "http://www.w3.org/2000/svg"), R(t, "width", "100%"), R(t, "height", "100%"), R(t, "viewBox", "0 0 24 24"), R(t, "fill", "none"), R(t, "stroke", "currentColor"), R(t, "stroke-width", "1.5"), R(t, "stroke-linecap", "round"), R(t, "stroke-linejoin", "round"), R(t, "class", "feather feather-image"); + t = Ln("svg"), n = Ln("path"), te(n, "d", "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"), te(t, "xmlns", "http://www.w3.org/2000/svg"), te(t, "width", "100%"), te(t, "height", "100%"), te(t, "viewBox", "0 0 24 24"), te(t, "fill", "none"), te(t, "stroke", "currentColor"), te(t, "stroke-width", "1.5"), te(t, "stroke-linecap", "round"), te(t, "stroke-linejoin", "round"), te(t, "class", "feather feather-edit-2"); }, - m(l, o) { - wo(l, t, o), Dt(t, n), Dt(t, i), Dt(t, r); + m(i, r) { + vo(i, t, r), bo(t, n); }, - p: Ut, - i: Ut, - o: Ut, - d(l) { - l && po(t); + p: Dt, + i: Dt, + o: Dt, + d(i) { + i && go(t); } }; } -class Ui extends go { +class Eo extends mo { constructor(t) { - super(), vo(this, t, null, Eo, yo, {}); + super(), po(this, t, null, yo, wo, {}); } } const { SvelteComponent: So, - append: kn, - attr: Q, + append: Ut, + attr: x, detach: To, init: Ao, insert: Ho, noop: Gt, safe_not_equal: Bo, - svg_element: Ft + svg_element: _t } = window.__gradio__svelte__internal; -function Co(e) { - let t, n, i; +function ko(e) { + let t, n, i, r; return { c() { - t = Ft("svg"), n = Ft("polyline"), i = Ft("path"), Q(n, "points", "1 4 1 10 7 10"), Q(i, "d", "M3.51 15a9 9 0 1 0 2.13-9.36L1 10"), Q(t, "xmlns", "http://www.w3.org/2000/svg"), Q(t, "width", "100%"), Q(t, "height", "100%"), Q(t, "viewBox", "0 0 24 24"), Q(t, "fill", "none"), Q(t, "stroke", "currentColor"), Q(t, "stroke-width", "2"), Q(t, "stroke-linecap", "round"), Q(t, "stroke-linejoin", "round"), Q(t, "class", "feather feather-rotate-ccw"); + t = _t("svg"), n = _t("rect"), i = _t("circle"), r = _t("polyline"), x(n, "x", "3"), x(n, "y", "3"), x(n, "width", "18"), x(n, "height", "18"), x(n, "rx", "2"), x(n, "ry", "2"), x(i, "cx", "8.5"), x(i, "cy", "8.5"), x(i, "r", "1.5"), x(r, "points", "21 15 16 10 5 21"), x(t, "xmlns", "http://www.w3.org/2000/svg"), x(t, "width", "100%"), x(t, "height", "100%"), x(t, "viewBox", "0 0 24 24"), x(t, "fill", "none"), x(t, "stroke", "currentColor"), x(t, "stroke-width", "1.5"), x(t, "stroke-linecap", "round"), x(t, "stroke-linejoin", "round"), x(t, "class", "feather feather-image"); }, - m(r, l) { - Ho(r, t, l), kn(t, n), kn(t, i); + m(l, o) { + Ho(l, t, o), Ut(t, n), Ut(t, i), Ut(t, r); }, p: Gt, i: Gt, o: Gt, + d(l) { + l && To(t); + } + }; +} +class ji extends So { + constructor(t) { + super(), Ao(this, t, null, ko, Bo, {}); + } +} +const { + SvelteComponent: Co, + append: Po, + attr: se, + detach: Io, + init: Lo, + insert: No, + noop: xt, + safe_not_equal: Oo, + svg_element: Nn +} = window.__gradio__svelte__internal; +function Mo(e) { + let t, n; + return { + c() { + t = Nn("svg"), n = Nn("polygon"), se(n, "points", "5 3 19 12 5 21 5 3"), se(t, "xmlns", "http://www.w3.org/2000/svg"), se(t, "width", "100%"), se(t, "height", "100%"), se(t, "viewBox", "0 0 24 24"), se(t, "fill", "currentColor"), se(t, "stroke", "currentColor"), se(t, "stroke-width", "1.5"), se(t, "stroke-linecap", "round"), se(t, "stroke-linejoin", "round"); + }, + m(i, r) { + No(i, t, r), Po(t, n); + }, + p: xt, + i: xt, + o: xt, + d(i) { + i && Io(t); + } + }; +} +class Ro extends Co { + constructor(t) { + super(), Lo(this, t, null, Mo, Oo, {}); + } +} +const { + SvelteComponent: Do, + append: On, + attr: Y, + detach: Uo, + init: Go, + insert: xo, + noop: Ft, + safe_not_equal: Fo, + svg_element: jt +} = window.__gradio__svelte__internal; +function jo(e) { + let t, n, i; + return { + c() { + t = jt("svg"), n = jt("polyline"), i = jt("path"), Y(n, "points", "1 4 1 10 7 10"), Y(i, "d", "M3.51 15a9 9 0 1 0 2.13-9.36L1 10"), Y(t, "xmlns", "http://www.w3.org/2000/svg"), Y(t, "width", "100%"), Y(t, "height", "100%"), Y(t, "viewBox", "0 0 24 24"), Y(t, "fill", "none"), Y(t, "stroke", "currentColor"), Y(t, "stroke-width", "2"), Y(t, "stroke-linecap", "round"), Y(t, "stroke-linejoin", "round"), Y(t, "class", "feather feather-rotate-ccw"); + }, + m(r, l) { + xo(r, t, l), On(t, n), On(t, i); + }, + p: Ft, + i: Ft, + o: Ft, d(r) { - r && To(t); + r && Uo(t); } }; } -class Po extends So { +class Vo extends Do { constructor(t) { - super(), Ao(this, t, null, Co, Bo, {}); + super(), Go(this, t, null, jo, Fo, {}); } } -const Io = [ +const qo = [ { color: "red", primary: 600, secondary: 100 }, { color: "green", primary: 600, secondary: 100 }, { color: "blue", primary: 600, secondary: 100 }, @@ -892,7 +925,7 @@ const Io = [ { color: "cyan", primary: 600, secondary: 100 }, { color: "lime", primary: 500, secondary: 100 }, { color: "pink", primary: 600, secondary: 100 } -], Ln = { +], Mn = { inherit: "inherit", current: "currentColor", transparent: "transparent", @@ -1185,17 +1218,17 @@ const Io = [ 950: "#4c0519" } }; -Io.reduce( +qo.reduce( (e, { color: t, primary: n, secondary: i }) => ({ ...e, [t]: { - primary: Ln[t][n], - secondary: Ln[t][i] + primary: Mn[t][n], + secondary: Mn[t][i] } }), {} ); -function ko(e) { +function zo(e) { let t, n = e[0], i = 1; for (; i < e.length; ) { const r = e[i], l = e[i + 1]; @@ -1205,20 +1238,20 @@ function ko(e) { } return n; } -class mt extends Error { +class gt extends Error { constructor(t) { super(t), this.name = "ShareError"; } } -async function Lo(e, t) { +async function Xo(e, t) { if (window.__gradio_space__ == null) - throw new mt("Must be on Spaces to share."); + throw new gt("Must be on Spaces to share."); let n, i, r; if (t === "url") { const s = await fetch(e); n = await s.blob(), i = s.headers.get("content-type") || "", r = s.headers.get("content-disposition") || ""; } else - n = No(e), i = e.split(";")[0].split(":")[1], r = "file" + i.split("/")[1]; + n = Zo(e), i = e.split(";")[0].split(":")[1], r = "file" + i.split("/")[1]; const l = new File([n], r, { type: i }), o = await fetch("https://huggingface.co/uploads", { method: "POST", body: l, @@ -1228,34 +1261,34 @@ async function Lo(e, t) { } }); if (!o.ok) { - if (ko([o, "access", (s) => s.headers, "access", (s) => s.get, "call", (s) => s("content-type"), "optionalAccess", (s) => s.includes, "call", (s) => s("application/json")])) { + if (zo([o, "access", (s) => s.headers, "access", (s) => s.get, "call", (s) => s("content-type"), "optionalAccess", (s) => s.includes, "call", (s) => s("application/json")])) { const s = await o.json(); - throw new mt(`Upload failed: ${s.error}`); + throw new gt(`Upload failed: ${s.error}`); } - throw new mt("Upload failed."); + throw new gt("Upload failed."); } return await o.text(); } -function No(e) { +function Zo(e) { for (var t = e.split(","), n = t[0].match(/:(.*?);/)[1], i = atob(t[1]), r = i.length, l = new Uint8Array(r); r--; ) l[r] = i.charCodeAt(r); return new Blob([l], { type: n }); } const { - SvelteComponent: Oo, - create_component: Mo, - destroy_component: Ro, - init: Do, - mount_component: Uo, - safe_not_equal: Go, - transition_in: Fo, - transition_out: xo -} = window.__gradio__svelte__internal, { createEventDispatcher: jo } = window.__gradio__svelte__internal; -function Vo(e) { + SvelteComponent: Wo, + create_component: Qo, + destroy_component: Jo, + init: Yo, + mount_component: Ko, + safe_not_equal: $o, + transition_in: es, + transition_out: ts +} = window.__gradio__svelte__internal, { createEventDispatcher: ns } = window.__gradio__svelte__internal; +function is(e) { let t, n; - return t = new et({ + return t = new nt({ props: { - Icon: $l, + Icon: lo, label: ( /*i18n*/ e[2]("common.share") @@ -1271,10 +1304,10 @@ function Vo(e) { e[5] ), { c() { - Mo(t.$$.fragment); + Qo(t.$$.fragment); }, m(i, r) { - Uo(t, i, r), n = !0; + Ko(t, i, r), n = !0; }, p(i, [r]) { const l = {}; @@ -1285,18 +1318,18 @@ function Vo(e) { i[3]), t.$set(l); }, i(i) { - n || (Fo(t.$$.fragment, i), n = !0); + n || (es(t.$$.fragment, i), n = !0); }, o(i) { - xo(t.$$.fragment, i), n = !1; + ts(t.$$.fragment, i), n = !1; }, d(i) { - Ro(t, i); + Jo(t, i); } }; } -function zo(e, t, n) { - const i = jo(); +function rs(e, t, n) { + const i = ns(); let { formatter: r } = t, { value: l } = t, { i18n: o } = t, a = !1; const s = async () => { try { @@ -1305,7 +1338,7 @@ function zo(e, t, n) { i("share", { description: u }); } catch (u) { console.error(u); - let f = u instanceof mt ? u.message : "Share failed."; + let f = u instanceof gt ? u.message : "Share failed."; i("error", f); } finally { n(3, a = !1); @@ -1315,33 +1348,33 @@ function zo(e, t, n) { "formatter" in u && n(0, r = u.formatter), "value" in u && n(1, l = u.value), "i18n" in u && n(2, o = u.i18n); }, [r, l, o, a, i, s]; } -class qo extends Oo { +class ls extends Wo { constructor(t) { - super(), Do(this, t, zo, Vo, Go, { formatter: 0, value: 1, i18n: 2 }); + super(), Yo(this, t, rs, is, $o, { formatter: 0, value: 1, i18n: 2 }); } } new Intl.Collator(0, { numeric: 1 }).compare; -function Gi(e, t, n) { +function Vi(e, t, n) { if (e == null) return null; if (Array.isArray(e)) { const i = []; for (const r of e) - r == null ? i.push(null) : i.push(Gi(r, t, n)); + r == null ? i.push(null) : i.push(Vi(r, t, n)); return i; } - return e.is_stream ? n == null ? new xt({ + return e.is_stream ? n == null ? new Vt({ ...e, url: t + "/stream/" + e.path - }) : new xt({ + }) : new Vt({ ...e, url: "/proxy=" + n + "stream/" + e.path - }) : new xt({ + }) : new Vt({ ...e, - url: Zo(e.path, t, n) + url: ss(e.path, t, n) }); } -function Xo(e) { +function os(e) { try { const t = new URL(e); return t.protocol === "http:" || t.protocol === "https:"; @@ -1349,10 +1382,10 @@ function Xo(e) { return !1; } } -function Zo(e, t, n) { - return e == null ? n ? `/proxy=${n}file=` : `${t}/file=` : Xo(e) ? e : n ? `/proxy=${n}file=${e}` : `${t}/file=${e}`; +function ss(e, t, n) { + return e == null ? n ? `/proxy=${n}file=` : `${t}/file=` : os(e) ? e : n ? `/proxy=${n}file=${e}` : `${t}/file=${e}`; } -class xt { +class Vt { constructor({ path: t, url: n, @@ -1366,321 +1399,321 @@ class xt { this.path = t, this.url = n, this.orig_name = i, this.size = r, this.blob = n ? void 0 : l, this.is_stream = o, this.mime_type = a, this.alt_text = s; } } -function He() { +function Be() { } -function Wo(e) { +function as(e) { return e(); } -function Qo(e) { - e.forEach(Wo); +function us(e) { + e.forEach(as); } -function Jo(e) { +function fs(e) { return typeof e == "function"; } -function Yo(e, t) { +function cs(e, t) { return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function"; } -function Ko(e, ...t) { +function hs(e, ...t) { if (e == null) { for (const i of t) i(void 0); - return He; + return Be; } const n = e.subscribe(...t); return n.unsubscribe ? () => n.unsubscribe() : n; } -const Fi = typeof window < "u"; -let Nn = Fi ? () => window.performance.now() : () => Date.now(), xi = Fi ? (e) => requestAnimationFrame(e) : He; -const ke = /* @__PURE__ */ new Set(); -function ji(e) { - ke.forEach((t) => { - t.c(e) || (ke.delete(t), t.f()); - }), ke.size !== 0 && xi(ji); +const qi = typeof window < "u"; +let Rn = qi ? () => window.performance.now() : () => Date.now(), zi = qi ? (e) => requestAnimationFrame(e) : Be; +const Ge = /* @__PURE__ */ new Set(); +function Xi(e) { + Ge.forEach((t) => { + t.c(e) || (Ge.delete(t), t.f()); + }), Ge.size !== 0 && zi(Xi); } -function $o(e) { +function _s(e) { let t; - return ke.size === 0 && xi(ji), { + return Ge.size === 0 && zi(Xi), { promise: new Promise((n) => { - ke.add(t = { c: e, f: n }); + Ge.add(t = { c: e, f: n }); }), abort() { - ke.delete(t); + Ge.delete(t); } }; } -const Pe = []; -function es(e, t) { +const De = []; +function ms(e, t) { return { - subscribe: tt(e, t).subscribe + subscribe: it(e, t).subscribe }; } -function tt(e, t = He) { +function it(e, t = Be) { let n; const i = /* @__PURE__ */ new Set(); function r(a) { - if (Yo(e, a) && (e = a, n)) { - const s = !Pe.length; + if (cs(e, a) && (e = a, n)) { + const s = !De.length; for (const u of i) - u[1](), Pe.push(u, e); + u[1](), De.push(u, e); if (s) { - for (let u = 0; u < Pe.length; u += 2) - Pe[u][0](Pe[u + 1]); - Pe.length = 0; + for (let u = 0; u < De.length; u += 2) + De[u][0](De[u + 1]); + De.length = 0; } } } function l(a) { r(a(e)); } - function o(a, s = He) { + function o(a, s = Be) { const u = [a, s]; - return i.add(u), i.size === 1 && (n = t(r, l) || He), a(e), () => { + return i.add(u), i.size === 1 && (n = t(r, l) || Be), a(e), () => { i.delete(u), i.size === 0 && n && (n(), n = null); }; } return { set: r, update: l, subscribe: o }; } -function Ue(e, t, n) { +function Xe(e, t, n) { const i = !Array.isArray(e), r = i ? [e] : e; if (!r.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); const l = t.length < 2; - return es(n, (o, a) => { + return ms(n, (o, a) => { let s = !1; const u = []; - let f = 0, c = He; + let f = 0, c = Be; const h = () => { if (f) return; c(); - const b = t(i ? u[0] : u, o, a); - l ? o(b) : c = Jo(b) ? b : He; + const g = t(i ? u[0] : u, o, a); + l ? o(g) : c = fs(g) ? g : Be; }, _ = r.map( - (b, T) => Ko( - b, - (y) => { - u[T] = y, f &= ~(1 << T), s && h(); + (g, S) => hs( + g, + (v) => { + u[S] = v, f &= ~(1 << S), s && h(); }, () => { - f |= 1 << T; + f |= 1 << S; } ) ); return s = !0, h(), function() { - Qo(_), c(), s = !1; + us(_), c(), s = !1; }; }); } -function On(e) { +function Dn(e) { return Object.prototype.toString.call(e) === "[object Date]"; } -function Yt(e, t, n, i) { - if (typeof n == "number" || On(n)) { +function $t(e, t, n, i) { + if (typeof n == "number" || Dn(n)) { const r = i - n, l = (n - t) / (e.dt || 1 / 60), o = e.opts.stiffness * r, a = e.opts.damping * l, s = (o - a) * e.inv_mass, u = (l + s) * e.dt; - return Math.abs(u) < e.opts.precision && Math.abs(r) < e.opts.precision ? i : (e.settled = !1, On(n) ? new Date(n.getTime() + u) : n + u); + return Math.abs(u) < e.opts.precision && Math.abs(r) < e.opts.precision ? i : (e.settled = !1, Dn(n) ? new Date(n.getTime() + u) : n + u); } else { if (Array.isArray(n)) return n.map( - (r, l) => Yt(e, t[l], n[l], i[l]) + (r, l) => $t(e, t[l], n[l], i[l]) ); if (typeof n == "object") { const r = {}; for (const l in n) - r[l] = Yt(e, t[l], n[l], i[l]); + r[l] = $t(e, t[l], n[l], i[l]); return r; } else throw new Error(`Cannot spring ${typeof n} values`); } } -function Mn(e, t = {}) { - const n = tt(e), { stiffness: i = 0.15, damping: r = 0.8, precision: l = 0.01 } = t; +function Un(e, t = {}) { + const n = it(e), { stiffness: i = 0.15, damping: r = 0.8, precision: l = 0.01 } = t; let o, a, s, u = e, f = e, c = 1, h = 0, _ = !1; - function b(y, C = {}) { - f = y; - const E = s = {}; - return e == null || C.hard || T.stiffness >= 1 && T.damping >= 1 ? (_ = !0, o = Nn(), u = y, n.set(e = f), Promise.resolve()) : (C.soft && (h = 1 / ((C.soft === !0 ? 0.5 : +C.soft) * 60), c = 0), a || (o = Nn(), _ = !1, a = $o((m) => { + function g(v, A = {}) { + f = v; + const y = s = {}; + return e == null || A.hard || S.stiffness >= 1 && S.damping >= 1 ? (_ = !0, o = Rn(), u = v, n.set(e = f), Promise.resolve()) : (A.soft && (h = 1 / ((A.soft === !0 ? 0.5 : +A.soft) * 60), c = 0), a || (o = Rn(), _ = !1, a = _s((d) => { if (_) return _ = !1, a = null, !1; c = Math.min(c + h, 1); - const g = { + const T = { inv_mass: c, - opts: T, + opts: S, settled: !0, - dt: (m - o) * 60 / 1e3 - }, p = Yt(g, u, e, f); - return o = m, u = e, n.set(e = p), g.settled && (a = null), !g.settled; - })), new Promise((m) => { + dt: (d - o) * 60 / 1e3 + }, b = $t(T, u, e, f); + return o = d, u = e, n.set(e = b), T.settled && (a = null), !T.settled; + })), new Promise((d) => { a.promise.then(() => { - E === s && m(); + y === s && d(); }); })); } - const T = { - set: b, - update: (y, C) => b(y(f, e), C), + const S = { + set: g, + update: (v, A) => g(v(f, e), A), subscribe: n.subscribe, stiffness: i, damping: r, precision: l }; - return T; + return S; } -function ts(e) { +function ds(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } -var ns = function(t) { - return is(t) && !rs(t); +var bs = function(t) { + return gs(t) && !ps(t); }; -function is(e) { +function gs(e) { return !!e && typeof e == "object"; } -function rs(e) { +function ps(e) { var t = Object.prototype.toString.call(e); - return t === "[object RegExp]" || t === "[object Date]" || ss(e); + return t === "[object RegExp]" || t === "[object Date]" || ys(e); } -var ls = typeof Symbol == "function" && Symbol.for, os = ls ? Symbol.for("react.element") : 60103; -function ss(e) { - return e.$$typeof === os; +var vs = typeof Symbol == "function" && Symbol.for, ws = vs ? Symbol.for("react.element") : 60103; +function ys(e) { + return e.$$typeof === ws; } -function as(e) { +function Es(e) { return Array.isArray(e) ? [] : {}; } -function Je(e, t) { - return t.clone !== !1 && t.isMergeableObject(e) ? Le(as(e), e, t) : e; +function et(e, t) { + return t.clone !== !1 && t.isMergeableObject(e) ? xe(Es(e), e, t) : e; } -function us(e, t, n) { +function Ss(e, t, n) { return e.concat(t).map(function(i) { - return Je(i, n); + return et(i, n); }); } -function fs(e, t) { +function Ts(e, t) { if (!t.customMerge) - return Le; + return xe; var n = t.customMerge(e); - return typeof n == "function" ? n : Le; + return typeof n == "function" ? n : xe; } -function cs(e) { +function As(e) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) { return Object.propertyIsEnumerable.call(e, t); }) : []; } -function Rn(e) { - return Object.keys(e).concat(cs(e)); +function Gn(e) { + return Object.keys(e).concat(As(e)); } -function Vi(e, t) { +function Zi(e, t) { try { return t in e; } catch { return !1; } } -function hs(e, t) { - return Vi(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t)); +function Hs(e, t) { + return Zi(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t)); } -function _s(e, t, n) { +function Bs(e, t, n) { var i = {}; - return n.isMergeableObject(e) && Rn(e).forEach(function(r) { - i[r] = Je(e[r], n); - }), Rn(t).forEach(function(r) { - hs(e, r) || (Vi(e, r) && n.isMergeableObject(t[r]) ? i[r] = fs(r, n)(e[r], t[r], n) : i[r] = Je(t[r], n)); + return n.isMergeableObject(e) && Gn(e).forEach(function(r) { + i[r] = et(e[r], n); + }), Gn(t).forEach(function(r) { + Hs(e, r) || (Zi(e, r) && n.isMergeableObject(t[r]) ? i[r] = Ts(r, n)(e[r], t[r], n) : i[r] = et(t[r], n)); }), i; } -function Le(e, t, n) { - n = n || {}, n.arrayMerge = n.arrayMerge || us, n.isMergeableObject = n.isMergeableObject || ns, n.cloneUnlessOtherwiseSpecified = Je; +function xe(e, t, n) { + n = n || {}, n.arrayMerge = n.arrayMerge || Ss, n.isMergeableObject = n.isMergeableObject || bs, n.cloneUnlessOtherwiseSpecified = et; var i = Array.isArray(t), r = Array.isArray(e), l = i === r; - return l ? i ? n.arrayMerge(e, t, n) : _s(e, t, n) : Je(t, n); + return l ? i ? n.arrayMerge(e, t, n) : Bs(e, t, n) : et(t, n); } -Le.all = function(t, n) { +xe.all = function(t, n) { if (!Array.isArray(t)) throw new Error("first argument should be an array"); return t.reduce(function(i, r) { - return Le(i, r, n); + return xe(i, r, n); }, {}); }; -var ms = Le, ds = ms; -const bs = /* @__PURE__ */ ts(ds); -var Kt = function(e, t) { - return Kt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { +var ks = xe, Cs = ks; +const Ps = /* @__PURE__ */ ds(Cs); +var en = function(e, t) { + return en = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var r in i) Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]); - }, Kt(e, t); + }, en(e, t); }; -function yt(e, t) { +function Tt(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); - Kt(e, t); + en(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); } -var k = function() { - return k = Object.assign || function(t) { +var L = function() { + return L = Object.assign || function(t) { for (var n, i = 1, r = arguments.length; i < r; i++) { n = arguments[i]; for (var l in n) Object.prototype.hasOwnProperty.call(n, l) && (t[l] = n[l]); } return t; - }, k.apply(this, arguments); + }, L.apply(this, arguments); }; -function jt(e, t, n) { +function qt(e, t, n) { if (n || arguments.length === 2) for (var i = 0, r = t.length, l; i < r; i++) (l || !(i in t)) && (l || (l = Array.prototype.slice.call(t, 0, i)), l[i] = t[i]); return e.concat(l || Array.prototype.slice.call(t)); } -var B; +var k; (function(e) { e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; -})(B || (B = {})); -var O; +})(k || (k = {})); +var R; (function(e) { e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag"; -})(O || (O = {})); -var Ne; +})(R || (R = {})); +var Fe; (function(e) { e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime"; -})(Ne || (Ne = {})); -function Dn(e) { - return e.type === O.literal; +})(Fe || (Fe = {})); +function xn(e) { + return e.type === R.literal; } -function gs(e) { - return e.type === O.argument; +function Is(e) { + return e.type === R.argument; } -function zi(e) { - return e.type === O.number; +function Wi(e) { + return e.type === R.number; } -function qi(e) { - return e.type === O.date; +function Qi(e) { + return e.type === R.date; } -function Xi(e) { - return e.type === O.time; +function Ji(e) { + return e.type === R.time; } -function Zi(e) { - return e.type === O.select; +function Yi(e) { + return e.type === R.select; } -function Wi(e) { - return e.type === O.plural; +function Ki(e) { + return e.type === R.plural; } -function ps(e) { - return e.type === O.pound; +function Ls(e) { + return e.type === R.pound; } -function Qi(e) { - return e.type === O.tag; +function $i(e) { + return e.type === R.tag; } -function Ji(e) { - return !!(e && typeof e == "object" && e.type === Ne.number); +function er(e) { + return !!(e && typeof e == "object" && e.type === Fe.number); } -function $t(e) { - return !!(e && typeof e == "object" && e.type === Ne.dateTime); +function tn(e) { + return !!(e && typeof e == "object" && e.type === Fe.dateTime); } -var Yi = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, vs = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; -function ws(e) { +var tr = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, Ns = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; +function Os(e) { var t = {}; - return e.replace(vs, function(n) { + return e.replace(Ns, function(n) { var i = n.length; switch (n[0]) { case "G": @@ -1769,11 +1802,11 @@ function ws(e) { return ""; }), t; } -var ys = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; -function Es(e) { +var Ms = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; +function Rs(e) { if (e.length === 0) throw new Error("Number skeleton cannot be empty"); - for (var t = e.split(ys).filter(function(h) { + for (var t = e.split(Ms).filter(function(h) { return h.length > 0; }), n = [], i = 0, r = t; i < r.length; i++) { var l = r[i], o = l.split("/"); @@ -1788,17 +1821,17 @@ function Es(e) { } return n; } -function Ss(e) { +function Ds(e) { return e.replace(/^(.*?)-/, ""); } -var Un = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Ki = /^(@+)?(\+|#+)?[rs]?$/g, Ts = /(\*)(0+)|(#+)(0+)|(0+)/g, $i = /^(0+)$/; -function Gn(e) { +var Fn = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, nr = /^(@+)?(\+|#+)?[rs]?$/g, Us = /(\*)(0+)|(#+)(0+)|(0+)/g, ir = /^(0+)$/; +function jn(e) { var t = {}; - return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Ki, function(n, i, r) { + return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(nr, function(n, i, r) { return typeof r != "string" ? (t.minimumSignificantDigits = i.length, t.maximumSignificantDigits = i.length) : r === "+" ? t.minimumSignificantDigits = i.length : i[0] === "#" ? t.maximumSignificantDigits = i.length : (t.minimumSignificantDigits = i.length, t.maximumSignificantDigits = i.length + (typeof r == "string" ? r.length : 0)), ""; }), t; } -function er(e) { +function rr(e) { switch (e) { case "sign-auto": return { @@ -1838,7 +1871,7 @@ function er(e) { }; } } -function As(e) { +function Gs(e) { var t; if (e[0] === "E" && e[1] === "E" ? (t = { notation: "engineering" @@ -1846,17 +1879,17 @@ function As(e) { notation: "scientific" }, e = e.slice(1)), t) { var n = e.slice(0, 2); - if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !$i.test(e)) + if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !ir.test(e)) throw new Error("Malformed concise eng/scientific notation"); t.minimumIntegerDigits = e.length; } return t; } -function Fn(e) { - var t = {}, n = er(e); +function Vn(e) { + var t = {}, n = rr(e); return n || t; } -function Hs(e) { +function xs(e) { for (var t = {}, n = 0, i = e; n < i.length; n++) { var r = i[n]; switch (r.stem) { @@ -1880,7 +1913,7 @@ function Hs(e) { continue; case "measure-unit": case "unit": - t.style = "unit", t.unit = Ss(r.options[0]); + t.style = "unit", t.unit = Ds(r.options[0]); continue; case "compact-short": case "K": @@ -1891,13 +1924,13 @@ function Hs(e) { t.notation = "compact", t.compactDisplay = "long"; continue; case "scientific": - t = k(k(k({}, t), { notation: "scientific" }), r.options.reduce(function(s, u) { - return k(k({}, s), Fn(u)); + t = L(L(L({}, t), { notation: "scientific" }), r.options.reduce(function(s, u) { + return L(L({}, s), Vn(u)); }, {})); continue; case "engineering": - t = k(k(k({}, t), { notation: "engineering" }), r.options.reduce(function(s, u) { - return k(k({}, s), Fn(u)); + t = L(L(L({}, t), { notation: "engineering" }), r.options.reduce(function(s, u) { + return L(L({}, s), Vn(u)); }, {})); continue; case "notation-simple": @@ -1921,7 +1954,7 @@ function Hs(e) { case "integer-width": if (r.options.length > 1) throw new RangeError("integer-width stems only accept a single optional option"); - r.options[0].replace(Ts, function(s, u, f, c, h, _) { + r.options[0].replace(Us, function(s, u, f, c, h, _) { if (u) t.minimumIntegerDigits = f.length; else { @@ -1934,32 +1967,32 @@ function Hs(e) { }); continue; } - if ($i.test(r.stem)) { + if (ir.test(r.stem)) { t.minimumIntegerDigits = r.stem.length; continue; } - if (Un.test(r.stem)) { + if (Fn.test(r.stem)) { if (r.options.length > 1) throw new RangeError("Fraction-precision stems only accept a single optional option"); - r.stem.replace(Un, function(s, u, f, c, h, _) { + r.stem.replace(Fn, function(s, u, f, c, h, _) { return f === "*" ? t.minimumFractionDigits = u.length : c && c[0] === "#" ? t.maximumFractionDigits = c.length : h && _ ? (t.minimumFractionDigits = h.length, t.maximumFractionDigits = h.length + _.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), ""; }); var l = r.options[0]; - l === "w" ? t = k(k({}, t), { trailingZeroDisplay: "stripIfInteger" }) : l && (t = k(k({}, t), Gn(l))); + l === "w" ? t = L(L({}, t), { trailingZeroDisplay: "stripIfInteger" }) : l && (t = L(L({}, t), jn(l))); continue; } - if (Ki.test(r.stem)) { - t = k(k({}, t), Gn(r.stem)); + if (nr.test(r.stem)) { + t = L(L({}, t), jn(r.stem)); continue; } - var o = er(r.stem); - o && (t = k(k({}, t), o)); - var a = As(r.stem); - a && (t = k(k({}, t), a)); + var o = rr(r.stem); + o && (t = L(L({}, t), o)); + var a = Gs(r.stem); + a && (t = L(L({}, t), a)); } return t; } -var ct = { +var mt = { AX: [ "H" ], @@ -3296,13 +3329,13 @@ var ct = { "h" ] }; -function Bs(e, t) { +function Fs(e, t) { for (var n = "", i = 0; i < e.length; i++) { var r = e.charAt(i); if (r === "j") { for (var l = 0; i + 1 < e.length && e.charAt(i + 1) === r; ) l++, i++; - var o = 1 + (l & 1), a = l < 2 ? 1 : 3 + (l >> 1), s = "a", u = Cs(t); + var o = 1 + (l & 1), a = l < 2 ? 1 : 3 + (l >> 1), s = "a", u = js(t); for ((u == "H" || u == "k") && (a = 0); a-- > 0; ) n += s; for (; o-- > 0; ) @@ -3312,7 +3345,7 @@ function Bs(e, t) { } return n; } -function Cs(e) { +function js(e) { var t = e.hourCycle; if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet e.hourCycles && // @ts-ignore @@ -3331,23 +3364,23 @@ function Cs(e) { } var n = e.language, i; n !== "root" && (i = e.maximize().region); - var r = ct[i || ""] || ct[n || ""] || ct["".concat(n, "-001")] || ct["001"]; + var r = mt[i || ""] || mt[n || ""] || mt["".concat(n, "-001")] || mt["001"]; return r[0]; } -var Vt, Ps = new RegExp("^".concat(Yi.source, "*")), Is = new RegExp("".concat(Yi.source, "*$")); -function P(e, t) { +var zt, Vs = new RegExp("^".concat(tr.source, "*")), qs = new RegExp("".concat(tr.source, "*$")); +function C(e, t) { return { start: e, end: t }; } -var ks = !!String.prototype.startsWith, Ls = !!String.fromCodePoint, Ns = !!Object.fromEntries, Os = !!String.prototype.codePointAt, Ms = !!String.prototype.trimStart, Rs = !!String.prototype.trimEnd, Ds = !!Number.isSafeInteger, Us = Ds ? Number.isSafeInteger : function(e) { +var zs = !!String.prototype.startsWith, Xs = !!String.fromCodePoint, Zs = !!Object.fromEntries, Ws = !!String.prototype.codePointAt, Qs = !!String.prototype.trimStart, Js = !!String.prototype.trimEnd, Ys = !!Number.isSafeInteger, Ks = Ys ? Number.isSafeInteger : function(e) { return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991; -}, en = !0; +}, nn = !0; try { - var Gs = nr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - en = ((Vt = Gs.exec("a")) === null || Vt === void 0 ? void 0 : Vt[0]) === "a"; + var $s = or("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + nn = ((zt = $s.exec("a")) === null || zt === void 0 ? void 0 : zt[0]) === "a"; } catch { - en = !1; + nn = !1; } -var xn = ks ? ( +var qn = zs ? ( // Native function(t, n, i) { return t.startsWith(n, i); @@ -3357,7 +3390,7 @@ var xn = ks ? ( function(t, n, i) { return t.slice(i, i + n.length) === n; } -), tn = Ls ? String.fromCodePoint : ( +), rn = Xs ? String.fromCodePoint : ( // IE11 function() { for (var t = [], n = 0; n < arguments.length; n++) @@ -3369,9 +3402,9 @@ var xn = ks ? ( } return i; } -), jn = ( +), zn = ( // native - Ns ? Object.fromEntries : ( + Zs ? Object.fromEntries : ( // Ponyfill function(t) { for (var n = {}, i = 0, r = t; i < r.length; i++) { @@ -3381,7 +3414,7 @@ var xn = ks ? ( return n; } ) -), tr = Os ? ( +), lr = Ws ? ( // Native function(t, n) { return t.codePointAt(n); @@ -3395,7 +3428,7 @@ var xn = ks ? ( return r < 55296 || r > 56319 || n + 1 === i || (l = t.charCodeAt(n + 1)) < 56320 || l > 57343 ? r : (r - 55296 << 10) + (l - 56320) + 65536; } } -), Fs = Ms ? ( +), ea = Qs ? ( // Native function(t) { return t.trimStart(); @@ -3403,9 +3436,9 @@ var xn = ks ? ( ) : ( // Ponyfill function(t) { - return t.replace(Ps, ""); + return t.replace(Vs, ""); } -), xs = Rs ? ( +), ta = Js ? ( // Native function(t) { return t.trimEnd(); @@ -3413,32 +3446,32 @@ var xn = ks ? ( ) : ( // Ponyfill function(t) { - return t.replace(Is, ""); + return t.replace(qs, ""); } ); -function nr(e, t) { +function or(e, t) { return new RegExp(e, t); } -var nn; -if (en) { - var Vn = nr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - nn = function(t, n) { +var ln; +if (nn) { + var Xn = or("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + ln = function(t, n) { var i; - Vn.lastIndex = n; - var r = Vn.exec(t); + Xn.lastIndex = n; + var r = Xn.exec(t); return (i = r[1]) !== null && i !== void 0 ? i : ""; }; } else - nn = function(t, n) { + ln = function(t, n) { for (var i = []; ; ) { - var r = tr(t, n); - if (r === void 0 || ir(r) || qs(r)) + var r = lr(t, n); + if (r === void 0 || sr(r) || la(r)) break; i.push(r), n += r >= 65536 ? 2 : 1; } - return tn.apply(void 0, i); + return rn.apply(void 0, i); }; -var js = ( +var na = ( /** @class */ function() { function e(t, n) { @@ -3462,14 +3495,14 @@ var js = ( if (l === 35 && (n === "plural" || n === "selectordinal")) { var a = this.clonePosition(); this.bump(), r.push({ - type: O.pound, - location: P(a, this.clonePosition()) + type: R.pound, + location: C(a, this.clonePosition()) }); } else if (l === 60 && !this.ignoreTag && this.peek() === 47) { if (i) break; - return this.error(B.UNMATCHED_CLOSING_TAG, P(this.clonePosition(), this.clonePosition())); - } else if (l === 60 && !this.ignoreTag && rn(this.peek() || 0)) { + return this.error(k.UNMATCHED_CLOSING_TAG, C(this.clonePosition(), this.clonePosition())); + } else if (l === 60 && !this.ignoreTag && on(this.peek() || 0)) { var o = this.parseTag(t, n); if (o.err) return o; @@ -3490,9 +3523,9 @@ var js = ( if (this.bumpSpace(), this.bumpIf("/>")) return { val: { - type: O.literal, + type: R.literal, value: "<".concat(r, "/>"), - location: P(i, this.clonePosition()) + location: C(i, this.clonePosition()) }, err: null }; @@ -3502,25 +3535,25 @@ var js = ( return l; var o = l.val, a = this.clonePosition(); if (this.bumpIf("")) { - if (this.isEOF() || !rn(this.char())) - return this.error(B.INVALID_TAG, P(a, this.clonePosition())); + if (this.isEOF() || !on(this.char())) + return this.error(k.INVALID_TAG, C(a, this.clonePosition())); var s = this.clonePosition(), u = this.parseTagName(); - return r !== u ? this.error(B.UNMATCHED_CLOSING_TAG, P(s, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { + return r !== u ? this.error(k.UNMATCHED_CLOSING_TAG, C(s, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { val: { - type: O.tag, + type: R.tag, value: r, children: o, - location: P(i, this.clonePosition()) + location: C(i, this.clonePosition()) }, err: null - } : this.error(B.INVALID_TAG, P(a, this.clonePosition()))); + } : this.error(k.INVALID_TAG, C(a, this.clonePosition()))); } else - return this.error(B.UNCLOSED_TAG, P(i, this.clonePosition())); + return this.error(k.UNCLOSED_TAG, C(i, this.clonePosition())); } else - return this.error(B.INVALID_TAG, P(i, this.clonePosition())); + return this.error(k.INVALID_TAG, C(i, this.clonePosition())); }, e.prototype.parseTagName = function() { var t = this.offset(); - for (this.bump(); !this.isEOF() && zs(this.char()); ) + for (this.bump(); !this.isEOF() && ra(this.char()); ) this.bump(); return this.message.slice(t, this.offset()); }, e.prototype.parseLiteral = function(t, n) { @@ -3542,14 +3575,14 @@ var js = ( } break; } - var s = P(i, this.clonePosition()); + var s = C(i, this.clonePosition()); return { - val: { type: O.literal, value: r, location: s }, + val: { type: R.literal, value: r, location: s }, err: null }; }, e.prototype.tryParseLeftAngleBracket = function() { return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail. - !Vs(this.peek() || 0)) ? (this.bump(), "<") : null; + !ia(this.peek() || 0)) ? (this.bump(), "<") : null; }, e.prototype.tryParseQuote = function(t) { if (this.isEOF() || this.char() !== 39) return null; @@ -3583,49 +3616,49 @@ var js = ( n.push(i); this.bump(); } - return tn.apply(void 0, n); + return rn.apply(void 0, n); }, e.prototype.tryParseUnquoted = function(t, n) { if (this.isEOF()) return null; var i = this.char(); - return i === 60 || i === 123 || i === 35 && (n === "plural" || n === "selectordinal") || i === 125 && t > 0 ? null : (this.bump(), tn(i)); + return i === 60 || i === 123 || i === 35 && (n === "plural" || n === "selectordinal") || i === 125 && t > 0 ? null : (this.bump(), rn(i)); }, e.prototype.parseArgument = function(t, n) { var i = this.clonePosition(); if (this.bump(), this.bumpSpace(), this.isEOF()) - return this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE, P(i, this.clonePosition())); + return this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE, C(i, this.clonePosition())); if (this.char() === 125) - return this.bump(), this.error(B.EMPTY_ARGUMENT, P(i, this.clonePosition())); + return this.bump(), this.error(k.EMPTY_ARGUMENT, C(i, this.clonePosition())); var r = this.parseIdentifierIfPossible().value; if (!r) - return this.error(B.MALFORMED_ARGUMENT, P(i, this.clonePosition())); + return this.error(k.MALFORMED_ARGUMENT, C(i, this.clonePosition())); if (this.bumpSpace(), this.isEOF()) - return this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE, P(i, this.clonePosition())); + return this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE, C(i, this.clonePosition())); switch (this.char()) { case 125: return this.bump(), { val: { - type: O.argument, + type: R.argument, // value does not include the opening and closing braces. value: r, - location: P(i, this.clonePosition()) + location: C(i, this.clonePosition()) }, err: null }; case 44: - return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE, P(i, this.clonePosition())) : this.parseArgumentOptions(t, n, r, i); + return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE, C(i, this.clonePosition())) : this.parseArgumentOptions(t, n, r, i); default: - return this.error(B.MALFORMED_ARGUMENT, P(i, this.clonePosition())); + return this.error(k.MALFORMED_ARGUMENT, C(i, this.clonePosition())); } }, e.prototype.parseIdentifierIfPossible = function() { - var t = this.clonePosition(), n = this.offset(), i = nn(this.message, n), r = n + i.length; + var t = this.clonePosition(), n = this.offset(), i = ln(this.message, n), r = n + i.length; this.bumpTo(r); - var l = this.clonePosition(), o = P(t, l); + var l = this.clonePosition(), o = C(t, l); return { value: i, location: o }; }, e.prototype.parseArgumentOptions = function(t, n, i, r) { var l, o = this.clonePosition(), a = this.parseIdentifierIfPossible().value, s = this.clonePosition(); switch (a) { case "": - return this.error(B.EXPECT_ARGUMENT_TYPE, P(o, s)); + return this.error(k.EXPECT_ARGUMENT_TYPE, C(o, s)); case "number": case "date": case "time": { @@ -3636,46 +3669,46 @@ var js = ( var f = this.clonePosition(), c = this.parseSimpleArgStyleIfPossible(); if (c.err) return c; - var h = xs(c.val); + var h = ta(c.val); if (h.length === 0) - return this.error(B.EXPECT_ARGUMENT_STYLE, P(this.clonePosition(), this.clonePosition())); - var _ = P(f, this.clonePosition()); + return this.error(k.EXPECT_ARGUMENT_STYLE, C(this.clonePosition(), this.clonePosition())); + var _ = C(f, this.clonePosition()); u = { style: h, styleLocation: _ }; } - var b = this.tryParseArgumentClose(r); - if (b.err) - return b; - var T = P(r, this.clonePosition()); - if (u && xn(u == null ? void 0 : u.style, "::", 0)) { - var y = Fs(u.style.slice(2)); + var g = this.tryParseArgumentClose(r); + if (g.err) + return g; + var S = C(r, this.clonePosition()); + if (u && qn(u == null ? void 0 : u.style, "::", 0)) { + var v = ea(u.style.slice(2)); if (a === "number") { - var c = this.parseNumberSkeletonFromString(y, u.styleLocation); + var c = this.parseNumberSkeletonFromString(v, u.styleLocation); return c.err ? c : { - val: { type: O.number, value: i, location: T, style: c.val }, + val: { type: R.number, value: i, location: S, style: c.val }, err: null }; } else { - if (y.length === 0) - return this.error(B.EXPECT_DATE_TIME_SKELETON, T); - var C = y; - this.locale && (C = Bs(y, this.locale)); + if (v.length === 0) + return this.error(k.EXPECT_DATE_TIME_SKELETON, S); + var A = v; + this.locale && (A = Fs(v, this.locale)); var h = { - type: Ne.dateTime, - pattern: C, + type: Fe.dateTime, + pattern: A, location: u.styleLocation, - parsedOptions: this.shouldParseSkeletons ? ws(C) : {} - }, E = a === "date" ? O.date : O.time; + parsedOptions: this.shouldParseSkeletons ? Os(A) : {} + }, y = a === "date" ? R.date : R.time; return { - val: { type: E, value: i, location: T, style: h }, + val: { type: y, value: i, location: S, style: h }, err: null }; } } return { val: { - type: a === "number" ? O.number : a === "date" ? O.date : O.time, + type: a === "number" ? R.number : a === "date" ? R.date : R.time, value: i, - location: T, + location: S, style: (l = u == null ? void 0 : u.style) !== null && l !== void 0 ? l : null }, err: null @@ -3684,52 +3717,52 @@ var js = ( case "plural": case "selectordinal": case "select": { - var m = this.clonePosition(); + var d = this.clonePosition(); if (this.bumpSpace(), !this.bumpIf(",")) - return this.error(B.EXPECT_SELECT_ARGUMENT_OPTIONS, P(m, k({}, m))); + return this.error(k.EXPECT_SELECT_ARGUMENT_OPTIONS, C(d, L({}, d))); this.bumpSpace(); - var g = this.parseIdentifierIfPossible(), p = 0; - if (a !== "select" && g.value === "offset") { + var T = this.parseIdentifierIfPossible(), b = 0; + if (a !== "select" && T.value === "offset") { if (!this.bumpIf(":")) - return this.error(B.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, P(this.clonePosition(), this.clonePosition())); + return this.error(k.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, C(this.clonePosition(), this.clonePosition())); this.bumpSpace(); - var c = this.tryParseDecimalInteger(B.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, B.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE); + var c = this.tryParseDecimalInteger(k.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, k.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE); if (c.err) return c; - this.bumpSpace(), g = this.parseIdentifierIfPossible(), p = c.val; + this.bumpSpace(), T = this.parseIdentifierIfPossible(), b = c.val; } - var N = this.tryParsePluralOrSelectOptions(t, a, n, g); - if (N.err) - return N; - var b = this.tryParseArgumentClose(r); - if (b.err) - return b; - var G = P(r, this.clonePosition()); + var I = this.tryParsePluralOrSelectOptions(t, a, n, T); + if (I.err) + return I; + var g = this.tryParseArgumentClose(r); + if (g.err) + return g; + var M = C(r, this.clonePosition()); return a === "select" ? { val: { - type: O.select, + type: R.select, value: i, - options: jn(N.val), - location: G + options: zn(I.val), + location: M }, err: null } : { val: { - type: O.plural, + type: R.plural, value: i, - options: jn(N.val), - offset: p, + options: zn(I.val), + offset: b, pluralType: a === "plural" ? "cardinal" : "ordinal", - location: G + location: M }, err: null }; } default: - return this.error(B.INVALID_ARGUMENT_TYPE, P(o, s)); + return this.error(k.INVALID_ARGUMENT_TYPE, C(o, s)); } }, e.prototype.tryParseArgumentClose = function(t) { - return this.isEOF() || this.char() !== 125 ? this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE, P(t, this.clonePosition())) : (this.bump(), { val: !0, err: null }); + return this.isEOF() || this.char() !== 125 ? this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE, C(t, this.clonePosition())) : (this.bump(), { val: !0, err: null }); }, e.prototype.parseSimpleArgStyleIfPossible = function() { for (var t = 0, n = this.clonePosition(); !this.isEOF(); ) { var i = this.char(); @@ -3738,7 +3771,7 @@ var js = ( this.bump(); var r = this.clonePosition(); if (!this.bumpUntil("'")) - return this.error(B.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, P(r, this.clonePosition())); + return this.error(k.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, C(r, this.clonePosition())); this.bump(); break; } @@ -3768,16 +3801,16 @@ var js = ( }, e.prototype.parseNumberSkeletonFromString = function(t, n) { var i = []; try { - i = Es(t); + i = Rs(t); } catch { - return this.error(B.INVALID_NUMBER_SKELETON, n); + return this.error(k.INVALID_NUMBER_SKELETON, n); } return { val: { - type: Ne.number, + type: Fe.number, tokens: i, location: n, - parsedOptions: this.shouldParseSkeletons ? Hs(i) : {} + parsedOptions: this.shouldParseSkeletons ? xs(i) : {} }, err: null }; @@ -3786,34 +3819,34 @@ var js = ( if (u.length === 0) { var c = this.clonePosition(); if (n !== "select" && this.bumpIf("=")) { - var h = this.tryParseDecimalInteger(B.EXPECT_PLURAL_ARGUMENT_SELECTOR, B.INVALID_PLURAL_ARGUMENT_SELECTOR); + var h = this.tryParseDecimalInteger(k.EXPECT_PLURAL_ARGUMENT_SELECTOR, k.INVALID_PLURAL_ARGUMENT_SELECTOR); if (h.err) return h; - f = P(c, this.clonePosition()), u = this.message.slice(c.offset, this.offset()); + f = C(c, this.clonePosition()), u = this.message.slice(c.offset, this.offset()); } else break; } if (s.has(u)) - return this.error(n === "select" ? B.DUPLICATE_SELECT_ARGUMENT_SELECTOR : B.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f); + return this.error(n === "select" ? k.DUPLICATE_SELECT_ARGUMENT_SELECTOR : k.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f); u === "other" && (o = !0), this.bumpSpace(); var _ = this.clonePosition(); if (!this.bumpIf("{")) - return this.error(n === "select" ? B.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : B.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, P(this.clonePosition(), this.clonePosition())); - var b = this.parseMessage(t + 1, n, i); - if (b.err) - return b; - var T = this.tryParseArgumentClose(_); - if (T.err) - return T; + return this.error(n === "select" ? k.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : k.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, C(this.clonePosition(), this.clonePosition())); + var g = this.parseMessage(t + 1, n, i); + if (g.err) + return g; + var S = this.tryParseArgumentClose(_); + if (S.err) + return S; a.push([ u, { - value: b.val, - location: P(_, this.clonePosition()) + value: g.val, + location: C(_, this.clonePosition()) } ]), s.add(u), this.bumpSpace(), l = this.parseIdentifierIfPossible(), u = l.value, f = l.location; } - return a.length === 0 ? this.error(n === "select" ? B.EXPECT_SELECT_ARGUMENT_SELECTOR : B.EXPECT_PLURAL_ARGUMENT_SELECTOR, P(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(B.MISSING_OTHER_CLAUSE, P(this.clonePosition(), this.clonePosition())) : { val: a, err: null }; + return a.length === 0 ? this.error(n === "select" ? k.EXPECT_SELECT_ARGUMENT_SELECTOR : k.EXPECT_PLURAL_ARGUMENT_SELECTOR, C(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(k.MISSING_OTHER_CLAUSE, C(this.clonePosition(), this.clonePosition())) : { val: a, err: null }; }, e.prototype.tryParseDecimalInteger = function(t, n) { var i = 1, r = this.clonePosition(); this.bumpIf("+") || this.bumpIf("-") && (i = -1); @@ -3824,8 +3857,8 @@ var js = ( else break; } - var s = P(r, this.clonePosition()); - return l ? (o *= i, Us(o) ? { val: o, err: null } : this.error(n, s)) : this.error(t, s); + var s = C(r, this.clonePosition()); + return l ? (o *= i, Ks(o) ? { val: o, err: null } : this.error(n, s)) : this.error(t, s); }, e.prototype.offset = function() { return this.position.offset; }, e.prototype.isEOF = function() { @@ -3840,7 +3873,7 @@ var js = ( var t = this.position.offset; if (t >= this.message.length) throw Error("out of bound"); - var n = tr(this.message, t); + var n = lr(this.message, t); if (n === void 0) throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary")); return n; @@ -3859,7 +3892,7 @@ var js = ( t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2); } }, e.prototype.bumpIf = function(t) { - if (xn(this.message, t, this.offset())) { + if (qn(this.message, t, this.offset())) { for (var n = 0; n < t.length; n++) this.bump(); return !0; @@ -3881,7 +3914,7 @@ var js = ( break; } }, e.prototype.bumpSpace = function() { - for (; !this.isEOF() && ir(this.char()); ) + for (; !this.isEOF() && sr(this.char()); ) this.bump(); }, e.prototype.peek = function() { if (this.isEOF()) @@ -3891,97 +3924,97 @@ var js = ( }, e; }() ); -function rn(e) { +function on(e) { return e >= 97 && e <= 122 || e >= 65 && e <= 90; } -function Vs(e) { - return rn(e) || e === 47; +function ia(e) { + return on(e) || e === 47; } -function zs(e) { +function ra(e) { return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039; } -function ir(e) { +function sr(e) { return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233; } -function qs(e) { +function la(e) { return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094; } -function ln(e) { +function sn(e) { e.forEach(function(t) { - if (delete t.location, Zi(t) || Wi(t)) + if (delete t.location, Yi(t) || Ki(t)) for (var n in t.options) - delete t.options[n].location, ln(t.options[n].value); + delete t.options[n].location, sn(t.options[n].value); else - zi(t) && Ji(t.style) || (qi(t) || Xi(t)) && $t(t.style) ? delete t.style.location : Qi(t) && ln(t.children); + Wi(t) && er(t.style) || (Qi(t) || Ji(t)) && tn(t.style) ? delete t.style.location : $i(t) && sn(t.children); }); } -function Xs(e, t) { - t === void 0 && (t = {}), t = k({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t); - var n = new js(e, t).parse(); +function oa(e, t) { + t === void 0 && (t = {}), t = L({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t); + var n = new na(e, t).parse(); if (n.err) { - var i = SyntaxError(B[n.err.kind]); + var i = SyntaxError(k[n.err.kind]); throw i.location = n.err.location, i.originalMessage = n.err.message, i; } - return t != null && t.captureLocation || ln(n.val), n.val; + return t != null && t.captureLocation || sn(n.val), n.val; } -function zt(e, t) { - var n = t && t.cache ? t.cache : Ks, i = t && t.serializer ? t.serializer : Ys, r = t && t.strategy ? t.strategy : Ws; +function Xt(e, t) { + var n = t && t.cache ? t.cache : ha, i = t && t.serializer ? t.serializer : ca, r = t && t.strategy ? t.strategy : aa; return r(e, { cache: n, serializer: i }); } -function Zs(e) { +function sa(e) { return e == null || typeof e == "number" || typeof e == "boolean"; } -function rr(e, t, n, i) { - var r = Zs(i) ? i : n(i), l = t.get(r); +function ar(e, t, n, i) { + var r = sa(i) ? i : n(i), l = t.get(r); return typeof l > "u" && (l = e.call(this, i), t.set(r, l)), l; } -function lr(e, t, n) { +function ur(e, t, n) { var i = Array.prototype.slice.call(arguments, 3), r = n(i), l = t.get(r); return typeof l > "u" && (l = e.apply(this, i), t.set(r, l)), l; } -function dn(e, t, n, i, r) { +function gn(e, t, n, i, r) { return n.bind(t, e, i, r); } -function Ws(e, t) { - var n = e.length === 1 ? rr : lr; - return dn(e, this, n, t.cache.create(), t.serializer); +function aa(e, t) { + var n = e.length === 1 ? ar : ur; + return gn(e, this, n, t.cache.create(), t.serializer); } -function Qs(e, t) { - return dn(e, this, lr, t.cache.create(), t.serializer); +function ua(e, t) { + return gn(e, this, ur, t.cache.create(), t.serializer); } -function Js(e, t) { - return dn(e, this, rr, t.cache.create(), t.serializer); +function fa(e, t) { + return gn(e, this, ar, t.cache.create(), t.serializer); } -var Ys = function() { +var ca = function() { return JSON.stringify(arguments); }; -function bn() { +function pn() { this.cache = /* @__PURE__ */ Object.create(null); } -bn.prototype.get = function(e) { +pn.prototype.get = function(e) { return this.cache[e]; }; -bn.prototype.set = function(e, t) { +pn.prototype.set = function(e, t) { this.cache[e] = t; }; -var Ks = { +var ha = { create: function() { - return new bn(); + return new pn(); } -}, qt = { - variadic: Qs, - monadic: Js -}, Oe; +}, Zt = { + variadic: ua, + monadic: fa +}, je; (function(e) { e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API"; -})(Oe || (Oe = {})); -var Et = ( +})(je || (je = {})); +var At = ( /** @class */ function(e) { - yt(t, e); + Tt(t, e); function t(n, i, r) { var l = e.call(this, n) || this; return l.code = i, l.originalMessage = r, l; @@ -3990,155 +4023,155 @@ var Et = ( return "[formatjs Error: ".concat(this.code, "] ").concat(this.message); }, t; }(Error) -), zn = ( +), Zn = ( /** @class */ function(e) { - yt(t, e); + Tt(t, e); function t(n, i, r, l) { - return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Oe.INVALID_VALUE, l) || this; + return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), je.INVALID_VALUE, l) || this; } return t; - }(Et) -), $s = ( + }(At) +), _a = ( /** @class */ function(e) { - yt(t, e); + Tt(t, e); function t(n, i, r) { - return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(i), Oe.INVALID_VALUE, r) || this; + return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(i), je.INVALID_VALUE, r) || this; } return t; - }(Et) -), ea = ( + }(At) +), ma = ( /** @class */ function(e) { - yt(t, e); + Tt(t, e); function t(n, i) { - return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(i, '"'), Oe.MISSING_VALUE, i) || this; + return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(i, '"'), je.MISSING_VALUE, i) || this; } return t; - }(Et) -), j; + }(At) +), W; (function(e) { e[e.literal = 0] = "literal", e[e.object = 1] = "object"; -})(j || (j = {})); -function ta(e) { +})(W || (W = {})); +function da(e) { return e.length < 2 ? e : e.reduce(function(t, n) { var i = t[t.length - 1]; - return !i || i.type !== j.literal || n.type !== j.literal ? t.push(n) : i.value += n.value, t; + return !i || i.type !== W.literal || n.type !== W.literal ? t.push(n) : i.value += n.value, t; }, []); } -function na(e) { +function ba(e) { return typeof e == "function"; } -function dt(e, t, n, i, r, l, o) { - if (e.length === 1 && Dn(e[0])) +function pt(e, t, n, i, r, l, o) { + if (e.length === 1 && xn(e[0])) return [ { - type: j.literal, + type: W.literal, value: e[0].value } ]; for (var a = [], s = 0, u = e; s < u.length; s++) { var f = u[s]; - if (Dn(f)) { + if (xn(f)) { a.push({ - type: j.literal, + type: W.literal, value: f.value }); continue; } - if (ps(f)) { + if (Ls(f)) { typeof l == "number" && a.push({ - type: j.literal, + type: W.literal, value: n.getNumberFormat(t).format(l) }); continue; } var c = f.value; if (!(r && c in r)) - throw new ea(c, o); + throw new ma(c, o); var h = r[c]; - if (gs(f)) { + if (Is(f)) { (!h || typeof h == "string" || typeof h == "number") && (h = typeof h == "string" || typeof h == "number" ? String(h) : ""), a.push({ - type: typeof h == "string" ? j.literal : j.object, + type: typeof h == "string" ? W.literal : W.object, value: h }); continue; } - if (qi(f)) { - var _ = typeof f.style == "string" ? i.date[f.style] : $t(f.style) ? f.style.parsedOptions : void 0; + if (Qi(f)) { + var _ = typeof f.style == "string" ? i.date[f.style] : tn(f.style) ? f.style.parsedOptions : void 0; a.push({ - type: j.literal, + type: W.literal, value: n.getDateTimeFormat(t, _).format(h) }); continue; } - if (Xi(f)) { - var _ = typeof f.style == "string" ? i.time[f.style] : $t(f.style) ? f.style.parsedOptions : i.time.medium; + if (Ji(f)) { + var _ = typeof f.style == "string" ? i.time[f.style] : tn(f.style) ? f.style.parsedOptions : i.time.medium; a.push({ - type: j.literal, + type: W.literal, value: n.getDateTimeFormat(t, _).format(h) }); continue; } - if (zi(f)) { - var _ = typeof f.style == "string" ? i.number[f.style] : Ji(f.style) ? f.style.parsedOptions : void 0; + if (Wi(f)) { + var _ = typeof f.style == "string" ? i.number[f.style] : er(f.style) ? f.style.parsedOptions : void 0; _ && _.scale && (h = h * (_.scale || 1)), a.push({ - type: j.literal, + type: W.literal, value: n.getNumberFormat(t, _).format(h) }); continue; } - if (Qi(f)) { - var b = f.children, T = f.value, y = r[T]; - if (!na(y)) - throw new $s(T, "function", o); - var C = dt(b, t, n, i, r, l), E = y(C.map(function(p) { - return p.value; + if ($i(f)) { + var g = f.children, S = f.value, v = r[S]; + if (!ba(v)) + throw new _a(S, "function", o); + var A = pt(g, t, n, i, r, l), y = v(A.map(function(b) { + return b.value; })); - Array.isArray(E) || (E = [E]), a.push.apply(a, E.map(function(p) { + Array.isArray(y) || (y = [y]), a.push.apply(a, y.map(function(b) { return { - type: typeof p == "string" ? j.literal : j.object, - value: p + type: typeof b == "string" ? W.literal : W.object, + value: b }; })); } - if (Zi(f)) { - var m = f.options[h] || f.options.other; - if (!m) - throw new zn(f.value, h, Object.keys(f.options), o); - a.push.apply(a, dt(m.value, t, n, i, r)); + if (Yi(f)) { + var d = f.options[h] || f.options.other; + if (!d) + throw new Zn(f.value, h, Object.keys(f.options), o); + a.push.apply(a, pt(d.value, t, n, i, r)); continue; } - if (Wi(f)) { - var m = f.options["=".concat(h)]; - if (!m) { + if (Ki(f)) { + var d = f.options["=".concat(h)]; + if (!d) { if (!Intl.PluralRules) - throw new Et(`Intl.PluralRules is not available in this environment. + throw new At(`Intl.PluralRules is not available in this environment. Try polyfilling it using "@formatjs/intl-pluralrules" -`, Oe.MISSING_INTL_API, o); - var g = n.getPluralRules(t, { type: f.pluralType }).select(h - (f.offset || 0)); - m = f.options[g] || f.options.other; +`, je.MISSING_INTL_API, o); + var T = n.getPluralRules(t, { type: f.pluralType }).select(h - (f.offset || 0)); + d = f.options[T] || f.options.other; } - if (!m) - throw new zn(f.value, h, Object.keys(f.options), o); - a.push.apply(a, dt(m.value, t, n, i, r, h - (f.offset || 0))); + if (!d) + throw new Zn(f.value, h, Object.keys(f.options), o); + a.push.apply(a, pt(d.value, t, n, i, r, h - (f.offset || 0))); continue; } } - return ta(a); + return da(a); } -function ia(e, t) { - return t ? k(k(k({}, e || {}), t || {}), Object.keys(e).reduce(function(n, i) { - return n[i] = k(k({}, e[i]), t[i] || {}), n; +function ga(e, t) { + return t ? L(L(L({}, e || {}), t || {}), Object.keys(e).reduce(function(n, i) { + return n[i] = L(L({}, e[i]), t[i] || {}), n; }, {})) : e; } -function ra(e, t) { +function pa(e, t) { return t ? Object.keys(e).reduce(function(n, i) { - return n[i] = ia(e[i], t[i]), n; - }, k({}, e)) : e; + return n[i] = ga(e[i], t[i]), n; + }, L({}, e)) : e; } -function Xt(e) { +function Wt(e) { return { create: function() { return { @@ -4152,39 +4185,39 @@ function Xt(e) { } }; } -function la(e) { +function va(e) { return e === void 0 && (e = { number: {}, dateTime: {}, pluralRules: {} }), { - getNumberFormat: zt(function() { + getNumberFormat: Xt(function() { for (var t, n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i]; - return new ((t = Intl.NumberFormat).bind.apply(t, jt([void 0], n, !1)))(); + return new ((t = Intl.NumberFormat).bind.apply(t, qt([void 0], n, !1)))(); }, { - cache: Xt(e.number), - strategy: qt.variadic + cache: Wt(e.number), + strategy: Zt.variadic }), - getDateTimeFormat: zt(function() { + getDateTimeFormat: Xt(function() { for (var t, n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i]; - return new ((t = Intl.DateTimeFormat).bind.apply(t, jt([void 0], n, !1)))(); + return new ((t = Intl.DateTimeFormat).bind.apply(t, qt([void 0], n, !1)))(); }, { - cache: Xt(e.dateTime), - strategy: qt.variadic + cache: Wt(e.dateTime), + strategy: Zt.variadic }), - getPluralRules: zt(function() { + getPluralRules: Xt(function() { for (var t, n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i]; - return new ((t = Intl.PluralRules).bind.apply(t, jt([void 0], n, !1)))(); + return new ((t = Intl.PluralRules).bind.apply(t, qt([void 0], n, !1)))(); }, { - cache: Xt(e.pluralRules), - strategy: qt.variadic + cache: Wt(e.pluralRules), + strategy: Zt.variadic }) }; } -var oa = ( +var wa = ( /** @class */ function() { function e(t, n, i, r) { @@ -4198,11 +4231,11 @@ var oa = ( if (a.length === 1) return a[0].value; var s = a.reduce(function(u, f) { - return !u.length || f.type !== j.literal || typeof u[u.length - 1] != "string" ? u.push(f.value) : u[u.length - 1] += f.value, u; + return !u.length || f.type !== W.literal || typeof u[u.length - 1] != "string" ? u.push(f.value) : u[u.length - 1] += f.value, u; }, []); return s.length <= 1 ? s[0] || "" : s; }, this.formatToParts = function(o) { - return dt(l.ast, l.locales, l.formatters, l.formats, o, void 0, l.message); + return pt(l.ast, l.locales, l.formatters, l.formats, o, void 0, l.message); }, this.resolvedOptions = function() { return { locale: l.resolvedLocale.toString() @@ -4220,7 +4253,7 @@ var oa = ( this.ast = t; if (!Array.isArray(this.ast)) throw new TypeError("A message must be provided as a String or AST."); - this.formats = ra(e.formats, i), this.formatters = r && r.formatters || la(this.formatterCache); + this.formats = pa(e.formats, i), this.formatters = r && r.formatters || va(this.formatterCache); } return Object.defineProperty(e, "defaultLocale", { get: function() { @@ -4231,7 +4264,7 @@ var oa = ( }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) { var n = Intl.NumberFormat.supportedLocalesOf(t); return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]); - }, e.__parse = Xs, e.formats = { + }, e.__parse = oa, e.formats = { number: { integer: { maximumFractionDigits: 0 @@ -4292,7 +4325,7 @@ var oa = ( }, e; }() ); -function sa(e, t) { +function ya(e, t) { if (t == null) return; if (t in e) @@ -4313,92 +4346,92 @@ function sa(e, t) { i = void 0; return i; } -const we = {}, aa = (e, t, n) => n && (t in we || (we[t] = {}), e in we[t] || (we[t][e] = n), n), or = (e, t) => { +const ye = {}, Ea = (e, t, n) => n && (t in ye || (ye[t] = {}), e in ye[t] || (ye[t][e] = n), n), fr = (e, t) => { if (t == null) return; - if (t in we && e in we[t]) - return we[t][e]; - const n = St(t); + if (t in ye && e in ye[t]) + return ye[t][e]; + const n = Ht(t); for (let i = 0; i < n.length; i++) { - const r = n[i], l = fa(r, e); + const r = n[i], l = Ta(r, e); if (l) - return aa(e, t, l); + return Ea(e, t, l); } }; -let gn; -const nt = tt({}); -function ua(e) { - return gn[e] || null; +let vn; +const rt = it({}); +function Sa(e) { + return vn[e] || null; } -function sr(e) { - return e in gn; +function cr(e) { + return e in vn; } -function fa(e, t) { - if (!sr(e)) +function Ta(e, t) { + if (!cr(e)) return null; - const n = ua(e); - return sa(n, t); + const n = Sa(e); + return ya(n, t); } -function ca(e) { +function Aa(e) { if (e == null) return; - const t = St(e); + const t = Ht(e); for (let n = 0; n < t.length; n++) { const i = t[n]; - if (sr(i)) + if (cr(i)) return i; } } -function ha(e, ...t) { - delete we[e], nt.update((n) => (n[e] = bs.all([n[e] || {}, ...t]), n)); +function Ha(e, ...t) { + delete ye[e], rt.update((n) => (n[e] = Ps.all([n[e] || {}, ...t]), n)); } -Ue( - [nt], +Xe( + [rt], ([e]) => Object.keys(e) ); -nt.subscribe((e) => gn = e); -const bt = {}; -function _a(e, t) { - bt[e].delete(t), bt[e].size === 0 && delete bt[e]; +rt.subscribe((e) => vn = e); +const vt = {}; +function Ba(e, t) { + vt[e].delete(t), vt[e].size === 0 && delete vt[e]; } -function ar(e) { - return bt[e]; +function hr(e) { + return vt[e]; } -function ma(e) { - return St(e).map((t) => { - const n = ar(t); +function ka(e) { + return Ht(e).map((t) => { + const n = hr(t); return [t, n ? [...n] : []]; }).filter(([, t]) => t.length > 0); } -function on(e) { - return e == null ? !1 : St(e).some( +function an(e) { + return e == null ? !1 : Ht(e).some( (t) => { var n; - return (n = ar(t)) == null ? void 0 : n.size; + return (n = hr(t)) == null ? void 0 : n.size; } ); } -function da(e, t) { +function Ca(e, t) { return Promise.all( - t.map((i) => (_a(e, i), i().then((r) => r.default || r))) - ).then((i) => ha(e, ...i)); -} -const Ze = {}; -function ur(e) { - if (!on(e)) - return e in Ze ? Ze[e] : Promise.resolve(); - const t = ma(e); - return Ze[e] = Promise.all( + t.map((i) => (Ba(e, i), i().then((r) => r.default || r))) + ).then((i) => Ha(e, ...i)); +} +const Ye = {}; +function _r(e) { + if (!an(e)) + return e in Ye ? Ye[e] : Promise.resolve(); + const t = ka(e); + return Ye[e] = Promise.all( t.map( - ([n, i]) => da(n, i) + ([n, i]) => Ca(n, i) ) ).then(() => { - if (on(e)) - return ur(e); - delete Ze[e]; - }), Ze[e]; + if (an(e)) + return _r(e); + delete Ye[e]; + }), Ye[e]; } -const ba = { +const Pa = { number: { scientific: { notation: "scientific" }, engineering: { notation: "engineering" }, @@ -4427,150 +4460,150 @@ const ba = { timeZoneName: "short" } } -}, ga = { +}, Ia = { fallbackLocale: null, loadingDelay: 200, - formats: ba, + formats: Pa, warnOnMissingMessages: !0, handleMissingMessage: void 0, ignoreTag: !0 -}, pa = ga; -function Me() { - return pa; +}, La = Ia; +function Ve() { + return La; } -const Zt = tt(!1); -var va = Object.defineProperty, wa = Object.defineProperties, ya = Object.getOwnPropertyDescriptors, qn = Object.getOwnPropertySymbols, Ea = Object.prototype.hasOwnProperty, Sa = Object.prototype.propertyIsEnumerable, Xn = (e, t, n) => t in e ? va(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ta = (e, t) => { +const Qt = it(!1); +var Na = Object.defineProperty, Oa = Object.defineProperties, Ma = Object.getOwnPropertyDescriptors, Wn = Object.getOwnPropertySymbols, Ra = Object.prototype.hasOwnProperty, Da = Object.prototype.propertyIsEnumerable, Qn = (e, t, n) => t in e ? Na(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ua = (e, t) => { for (var n in t || (t = {})) - Ea.call(t, n) && Xn(e, n, t[n]); - if (qn) - for (var n of qn(t)) - Sa.call(t, n) && Xn(e, n, t[n]); + Ra.call(t, n) && Qn(e, n, t[n]); + if (Wn) + for (var n of Wn(t)) + Da.call(t, n) && Qn(e, n, t[n]); return e; -}, Aa = (e, t) => wa(e, ya(t)); -let sn; -const gt = tt(null); -function Zn(e) { +}, Ga = (e, t) => Oa(e, Ma(t)); +let un; +const wt = it(null); +function Jn(e) { return e.split("-").map((t, n, i) => i.slice(0, n + 1).join("-")).reverse(); } -function St(e, t = Me().fallbackLocale) { - const n = Zn(e); - return t ? [.../* @__PURE__ */ new Set([...n, ...Zn(t)])] : n; +function Ht(e, t = Ve().fallbackLocale) { + const n = Jn(e); + return t ? [.../* @__PURE__ */ new Set([...n, ...Jn(t)])] : n; } -function Be() { - return sn ?? void 0; +function Pe() { + return un ?? void 0; } -gt.subscribe((e) => { - sn = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e); +wt.subscribe((e) => { + un = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e); }); -const Ha = (e) => { - if (e && ca(e) && on(e)) { - const { loadingDelay: t } = Me(); +const xa = (e) => { + if (e && Aa(e) && an(e)) { + const { loadingDelay: t } = Ve(); let n; - return typeof window < "u" && Be() != null && t ? n = window.setTimeout( - () => Zt.set(!0), + return typeof window < "u" && Pe() != null && t ? n = window.setTimeout( + () => Qt.set(!0), t - ) : Zt.set(!0), ur(e).then(() => { - gt.set(e); + ) : Qt.set(!0), _r(e).then(() => { + wt.set(e); }).finally(() => { - clearTimeout(n), Zt.set(!1); + clearTimeout(n), Qt.set(!1); }); } - return gt.set(e); -}, it = Aa(Ta({}, gt), { - set: Ha -}), Tt = (e) => { + return wt.set(e); +}, lt = Ga(Ua({}, wt), { + set: xa +}), Bt = (e) => { const t = /* @__PURE__ */ Object.create(null); return (i) => { const r = JSON.stringify(i); return r in t ? t[r] : t[r] = e(i); }; }; -var Ba = Object.defineProperty, pt = Object.getOwnPropertySymbols, fr = Object.prototype.hasOwnProperty, cr = Object.prototype.propertyIsEnumerable, Wn = (e, t, n) => t in e ? Ba(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, pn = (e, t) => { +var Fa = Object.defineProperty, yt = Object.getOwnPropertySymbols, mr = Object.prototype.hasOwnProperty, dr = Object.prototype.propertyIsEnumerable, Yn = (e, t, n) => t in e ? Fa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, wn = (e, t) => { for (var n in t || (t = {})) - fr.call(t, n) && Wn(e, n, t[n]); - if (pt) - for (var n of pt(t)) - cr.call(t, n) && Wn(e, n, t[n]); + mr.call(t, n) && Yn(e, n, t[n]); + if (yt) + for (var n of yt(t)) + dr.call(t, n) && Yn(e, n, t[n]); return e; -}, Ge = (e, t) => { +}, Ze = (e, t) => { var n = {}; for (var i in e) - fr.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]); - if (e != null && pt) - for (var i of pt(e)) - t.indexOf(i) < 0 && cr.call(e, i) && (n[i] = e[i]); + mr.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]); + if (e != null && yt) + for (var i of yt(e)) + t.indexOf(i) < 0 && dr.call(e, i) && (n[i] = e[i]); return n; }; -const Ye = (e, t) => { - const { formats: n } = Me(); +const tt = (e, t) => { + const { formats: n } = Ve(); if (e in n && t in n[e]) return n[e][t]; throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`); -}, Ca = Tt( +}, ja = Bt( (e) => { - var t = e, { locale: n, format: i } = t, r = Ge(t, ["locale", "format"]); + var t = e, { locale: n, format: i } = t, r = Ze(t, ["locale", "format"]); if (n == null) throw new Error('[svelte-i18n] A "locale" must be set to format numbers'); - return i && (r = Ye("number", i)), new Intl.NumberFormat(n, r); + return i && (r = tt("number", i)), new Intl.NumberFormat(n, r); } -), Pa = Tt( +), Va = Bt( (e) => { - var t = e, { locale: n, format: i } = t, r = Ge(t, ["locale", "format"]); + var t = e, { locale: n, format: i } = t, r = Ze(t, ["locale", "format"]); if (n == null) throw new Error('[svelte-i18n] A "locale" must be set to format dates'); - return i ? r = Ye("date", i) : Object.keys(r).length === 0 && (r = Ye("date", "short")), new Intl.DateTimeFormat(n, r); + return i ? r = tt("date", i) : Object.keys(r).length === 0 && (r = tt("date", "short")), new Intl.DateTimeFormat(n, r); } -), Ia = Tt( +), qa = Bt( (e) => { - var t = e, { locale: n, format: i } = t, r = Ge(t, ["locale", "format"]); + var t = e, { locale: n, format: i } = t, r = Ze(t, ["locale", "format"]); if (n == null) throw new Error( '[svelte-i18n] A "locale" must be set to format time values' ); - return i ? r = Ye("time", i) : Object.keys(r).length === 0 && (r = Ye("time", "short")), new Intl.DateTimeFormat(n, r); + return i ? r = tt("time", i) : Object.keys(r).length === 0 && (r = tt("time", "short")), new Intl.DateTimeFormat(n, r); } -), ka = (e = {}) => { +), za = (e = {}) => { var t = e, { - locale: n = Be() - } = t, i = Ge(t, [ + locale: n = Pe() + } = t, i = Ze(t, [ "locale" ]); - return Ca(pn({ locale: n }, i)); -}, La = (e = {}) => { + return ja(wn({ locale: n }, i)); +}, Xa = (e = {}) => { var t = e, { - locale: n = Be() - } = t, i = Ge(t, [ + locale: n = Pe() + } = t, i = Ze(t, [ "locale" ]); - return Pa(pn({ locale: n }, i)); -}, Na = (e = {}) => { + return Va(wn({ locale: n }, i)); +}, Za = (e = {}) => { var t = e, { - locale: n = Be() - } = t, i = Ge(t, [ + locale: n = Pe() + } = t, i = Ze(t, [ "locale" ]); - return Ia(pn({ locale: n }, i)); -}, Oa = Tt( + return qa(wn({ locale: n }, i)); +}, Wa = Bt( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - (e, t = Be()) => new oa(e, t, Me().formats, { - ignoreTag: Me().ignoreTag + (e, t = Pe()) => new wa(e, t, Ve().formats, { + ignoreTag: Ve().ignoreTag }) -), Ma = (e, t = {}) => { +), Qa = (e, t = {}) => { var n, i, r, l; let o = t; typeof e == "object" && (o = e, e = o.id); const { values: a, - locale: s = Be(), + locale: s = Pe(), default: u } = o; if (s == null) throw new Error( "[svelte-i18n] Cannot format a message without first setting the initial locale." ); - let f = or(e, s); + let f = fr(e, s); if (!f) - f = (l = (r = (i = (n = Me()).handleMissingMessage) == null ? void 0 : i.call(n, { locale: s, id: e, defaultValue: u })) != null ? r : u) != null ? l : e; + f = (l = (r = (i = (n = Ve()).handleMissingMessage) == null ? void 0 : i.call(n, { locale: s, id: e, defaultValue: u })) != null ? r : u) != null ? l : e; else if (typeof f != "string") return console.warn( `[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.` @@ -4579,7 +4612,7 @@ const Ye = (e, t) => { return f; let c = f; try { - c = Oa(f, s).format(a); + c = Wa(f, s).format(a); } catch (h) { h instanceof Error && console.warn( `[svelte-i18n] Message "${e}" has syntax error:`, @@ -4587,37 +4620,37 @@ const Ye = (e, t) => { ); } return c; -}, Ra = (e, t) => Na(t).format(e), Da = (e, t) => La(t).format(e), Ua = (e, t) => ka(t).format(e), Ga = (e, t = Be()) => or(e, t); -Ue([it, nt], () => Ma); -Ue([it], () => Ra); -Ue([it], () => Da); -Ue([it], () => Ua); -Ue([it, nt], () => Ga); +}, Ja = (e, t) => Za(t).format(e), Ya = (e, t) => Xa(t).format(e), Ka = (e, t) => za(t).format(e), $a = (e, t = Pe()) => fr(e, t); +Xe([lt, rt], () => Qa); +Xe([lt], () => Ja); +Xe([lt], () => Ya); +Xe([lt], () => Ka); +Xe([lt, rt], () => $a); const { - SvelteComponent: Fa, - append: Qn, - attr: xa, - check_outros: Jn, - create_component: vn, - destroy_component: wn, - detach: ja, - element: Va, - group_outros: Yn, - init: za, - insert: qa, - mount_component: yn, - safe_not_equal: Xa, - set_style: Kn, - space: $n, - toggle_class: ei, + SvelteComponent: eu, + append: Kn, + attr: tu, + check_outros: $n, + create_component: yn, + destroy_component: En, + detach: nu, + element: iu, + group_outros: ei, + init: ru, + insert: lu, + mount_component: Sn, + safe_not_equal: ou, + set_style: ti, + space: ni, + toggle_class: ii, transition_in: _e, - transition_out: Te -} = window.__gradio__svelte__internal, { createEventDispatcher: Za } = window.__gradio__svelte__internal; -function ti(e) { + transition_out: Ae +} = window.__gradio__svelte__internal, { createEventDispatcher: su } = window.__gradio__svelte__internal; +function ri(e) { let t, n; - return t = new et({ + return t = new nt({ props: { - Icon: bo, + Icon: Eo, label: ( /*i18n*/ e[3]("common.edit") @@ -4629,10 +4662,10 @@ function ti(e) { e[5] ), { c() { - vn(t.$$.fragment); + yn(t.$$.fragment); }, m(i, r) { - yn(t, i, r), n = !0; + Sn(t, i, r), n = !0; }, p(i, r) { const l = {}; @@ -4644,18 +4677,18 @@ function ti(e) { n || (_e(t.$$.fragment, i), n = !0); }, o(i) { - Te(t.$$.fragment, i), n = !1; + Ae(t.$$.fragment, i), n = !1; }, d(i) { - wn(t, i); + En(t, i); } }; } -function ni(e) { +function li(e) { let t, n; - return t = new et({ + return t = new nt({ props: { - Icon: Po, + Icon: Vo, label: ( /*i18n*/ e[3]("common.undo") @@ -4667,10 +4700,10 @@ function ni(e) { e[6] ), { c() { - vn(t.$$.fragment); + yn(t.$$.fragment); }, m(i, r) { - yn(t, i, r), n = !0; + Sn(t, i, r), n = !0; }, p(i, r) { const l = {}; @@ -4682,24 +4715,24 @@ function ni(e) { n || (_e(t.$$.fragment, i), n = !0); }, o(i) { - Te(t.$$.fragment, i), n = !1; + Ae(t.$$.fragment, i), n = !1; }, d(i) { - wn(t, i); + En(t, i); } }; } -function Wa(e) { +function au(e) { let t, n, i, r, l, o = ( /*editable*/ - e[0] && ti(e) + e[0] && ri(e) ), a = ( /*undoable*/ - e[1] && ni(e) + e[1] && li(e) ); - return r = new et({ + return r = new nt({ props: { - Icon: ql, + Icon: Yl, label: ( /*i18n*/ e[3]("common.clear") @@ -4711,8 +4744,8 @@ function Wa(e) { e[7] ), { c() { - t = Va("div"), o && o.c(), n = $n(), a && a.c(), i = $n(), vn(r.$$.fragment), xa(t, "class", "svelte-1wj0ocy"), ei(t, "not-absolute", !/*absolute*/ - e[2]), Kn( + t = iu("div"), o && o.c(), n = ni(), a && a.c(), i = ni(), yn(r.$$.fragment), tu(t, "class", "svelte-1wj0ocy"), ii(t, "not-absolute", !/*absolute*/ + e[2]), ti( t, "position", /*absolute*/ @@ -4720,25 +4753,25 @@ function Wa(e) { ); }, m(s, u) { - qa(s, t, u), o && o.m(t, null), Qn(t, n), a && a.m(t, null), Qn(t, i), yn(r, t, null), l = !0; + lu(s, t, u), o && o.m(t, null), Kn(t, n), a && a.m(t, null), Kn(t, i), Sn(r, t, null), l = !0; }, p(s, [u]) { /*editable*/ s[0] ? o ? (o.p(s, u), u & /*editable*/ - 1 && _e(o, 1)) : (o = ti(s), o.c(), _e(o, 1), o.m(t, n)) : o && (Yn(), Te(o, 1, 1, () => { + 1 && _e(o, 1)) : (o = ri(s), o.c(), _e(o, 1), o.m(t, n)) : o && (ei(), Ae(o, 1, 1, () => { o = null; - }), Jn()), /*undoable*/ + }), $n()), /*undoable*/ s[1] ? a ? (a.p(s, u), u & /*undoable*/ - 2 && _e(a, 1)) : (a = ni(s), a.c(), _e(a, 1), a.m(t, i)) : a && (Yn(), Te(a, 1, 1, () => { + 2 && _e(a, 1)) : (a = li(s), a.c(), _e(a, 1), a.m(t, i)) : a && (ei(), Ae(a, 1, 1, () => { a = null; - }), Jn()); + }), $n()); const f = {}; u & /*i18n*/ 8 && (f.label = /*i18n*/ s[3]("common.clear")), r.$set(f), (!l || u & /*absolute*/ - 4) && ei(t, "not-absolute", !/*absolute*/ + 4) && ii(t, "not-absolute", !/*absolute*/ s[2]), u & /*absolute*/ - 4 && Kn( + 4 && ti( t, "position", /*absolute*/ @@ -4749,16 +4782,16 @@ function Wa(e) { l || (_e(o), _e(a), _e(r.$$.fragment, s), l = !0); }, o(s) { - Te(o), Te(a), Te(r.$$.fragment, s), l = !1; + Ae(o), Ae(a), Ae(r.$$.fragment, s), l = !1; }, d(s) { - s && ja(t), o && o.d(), a && a.d(), wn(r); + s && nu(t), o && o.d(), a && a.d(), En(r); } }; } -function Qa(e, t, n) { +function uu(e, t, n) { let { editable: i = !1 } = t, { undoable: r = !1 } = t, { absolute: l = !0 } = t, { i18n: o } = t; - const a = Za(), s = () => a("edit"), u = () => a("undo"), f = (c) => { + const a = su(), s = () => a("edit"), u = () => a("undo"), f = (c) => { a("clear"), c.stopPropagation(); }; return e.$$set = (c) => { @@ -4774,9 +4807,9 @@ function Qa(e, t, n) { f ]; } -class Ja extends Fa { +class fu extends eu { constructor(t) { - super(), za(this, t, Qa, Wa, Xa, { + super(), ru(this, t, uu, au, ou, { editable: 0, undoable: 1, absolute: 2, @@ -4784,13 +4817,13 @@ class Ja extends Fa { }); } } -var ii = Object.prototype.hasOwnProperty; -function ri(e, t, n) { +var oi = Object.prototype.hasOwnProperty; +function si(e, t, n) { for (n of e.keys()) - if (Qe(n, t)) + if ($e(n, t)) return n; } -function Qe(e, t) { +function $e(e, t) { var n, i, r; if (e === t) return !0; @@ -4801,7 +4834,7 @@ function Qe(e, t) { return e.toString() === t.toString(); if (n === Array) { if ((i = e.length) === t.length) - for (; i-- && Qe(e[i], t[i]); ) + for (; i-- && $e(e[i], t[i]); ) ; return i === -1; } @@ -4809,7 +4842,7 @@ function Qe(e, t) { if (e.size !== t.size) return !1; for (i of e) - if (r = i, r && typeof r == "object" && (r = ri(t, r), !r) || !t.has(r)) + if (r = i, r && typeof r == "object" && (r = si(t, r), !r) || !t.has(r)) return !1; return !0; } @@ -4817,7 +4850,7 @@ function Qe(e, t) { if (e.size !== t.size) return !1; for (i of e) - if (r = i[0], r && typeof r == "object" && (r = ri(t, r), !r) || !Qe(i[1], t.get(r))) + if (r = i[0], r && typeof r == "object" && (r = si(t, r), !r) || !$e(i[1], t.get(r))) return !1; return !0; } @@ -4838,68 +4871,68 @@ function Qe(e, t) { if (!n || typeof e == "object") { i = 0; for (n in e) - if (ii.call(e, n) && ++i && !ii.call(t, n) || !(n in t) || !Qe(e[n], t[n])) + if (oi.call(e, n) && ++i && !oi.call(t, n) || !(n in t) || !$e(e[n], t[n])) return !1; return Object.keys(t).length === i; } } return e !== e && t !== t; } -async function Ya(e) { +async function cu(e) { return e ? `