diff --git "a/src/backend/gradio_videoslider/templates/component/index.js" "b/src/backend/gradio_videoslider/templates/component/index.js"
--- "a/src/backend/gradio_videoslider/templates/component/index.js"
+++ "b/src/backend/gradio_videoslider/templates/component/index.js"
@@ -1,90 +1,90 @@
-var E1 = Object.defineProperty;
-var sm = (n) => {
+var M1 = Object.defineProperty;
+var Em = (n) => {
throw TypeError(n);
};
-var b1 = (n, e, t) => e in n ? E1(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
-var de = (n, e, t) => b1(n, typeof e != "symbol" ? e + "" : e, t), Ru = (n, e, t) => e.has(n) || sm("Cannot " + t);
-var ue = (n, e, t) => (Ru(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Mi = (n, e, t) => e.has(n) ? sm("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), $s = (n, e, t, i) => (Ru(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t), mo = (n, e, t) => (Ru(n, e, "access private method"), t);
+var $1 = (n, e, t) => e in n ? M1(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
+var de = (n, e, t) => $1(n, typeof e != "symbol" ? e + "" : e, t), Zu = (n, e, t) => e.has(n) || Em("Cannot " + t);
+var ce = (n, e, t) => (Zu(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Gi = (n, e, t) => e.has(n) ? Em("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Ws = (n, e, t, i) => (Zu(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t), Co = (n, e, t) => (Zu(n, e, "access private method"), t);
const {
- SvelteComponent: T1,
- append_hydration: Hh,
- assign: S1,
- attr: _t,
- binding_callbacks: A1,
- children: ba,
- claim_element: G_,
- claim_space: H_,
- claim_svg_element: Cu,
- create_slot: x1,
- detach: Wi,
- element: V_,
- empty: rm,
- get_all_dirty_from_scope: D1,
- get_slot_changes: w1,
- get_spread_update: L1,
- init: I1,
- insert_hydration: Ca,
- listen: k1,
- noop: R1,
- safe_not_equal: C1,
- set_dynamic_element_data: am,
- set_style: xe,
- space: q_,
- svg_element: Fu,
- toggle_class: et,
- transition_in: K_,
- transition_out: j_,
- update_slot_base: F1
+ SvelteComponent: B1,
+ append_hydration: ud,
+ assign: N1,
+ attr: Tt,
+ binding_callbacks: U1,
+ children: Ca,
+ claim_element: nv,
+ claim_space: sv,
+ claim_svg_element: Ju,
+ create_slot: G1,
+ detach: Qi,
+ element: rv,
+ empty: bm,
+ get_all_dirty_from_scope: H1,
+ get_slot_changes: V1,
+ get_spread_update: q1,
+ init: K1,
+ insert_hydration: qa,
+ listen: j1,
+ noop: z1,
+ safe_not_equal: W1,
+ set_dynamic_element_data: Tm,
+ set_style: De,
+ space: av,
+ svg_element: ec,
+ toggle_class: at,
+ transition_in: ov,
+ transition_out: lv,
+ update_slot_base: Y1
} = window.__gradio__svelte__internal;
-function om(n) {
+function Sm(n) {
let e, t, i, s, r;
return {
c() {
- e = Fu("svg"), t = Fu("line"), i = Fu("line"), this.h();
+ e = ec("svg"), t = ec("line"), i = ec("line"), this.h();
},
l(a) {
- e = Cu(a, "svg", { class: !0, xmlns: !0, viewBox: !0 });
- var o = ba(e);
- t = Cu(o, "line", {
+ e = Ju(a, "svg", { class: !0, xmlns: !0, viewBox: !0 });
+ var o = Ca(e);
+ t = Ju(o, "line", {
x1: !0,
y1: !0,
x2: !0,
y2: !0,
stroke: !0,
"stroke-width": !0
- }), ba(t).forEach(Wi), i = Cu(o, "line", {
+ }), Ca(t).forEach(Qi), i = Ju(o, "line", {
x1: !0,
y1: !0,
x2: !0,
y2: !0,
stroke: !0,
"stroke-width": !0
- }), ba(i).forEach(Wi), o.forEach(Wi), this.h();
+ }), Ca(i).forEach(Qi), o.forEach(Qi), this.h();
},
h() {
- _t(t, "x1", "1"), _t(t, "y1", "9"), _t(t, "x2", "9"), _t(t, "y2", "1"), _t(t, "stroke", "gray"), _t(t, "stroke-width", "0.5"), _t(i, "x1", "5"), _t(i, "y1", "9"), _t(i, "x2", "9"), _t(i, "y2", "5"), _t(i, "stroke", "gray"), _t(i, "stroke-width", "0.5"), _t(e, "class", "resize-handle svelte-239wnu"), _t(e, "xmlns", "http://www.w3.org/2000/svg"), _t(e, "viewBox", "0 0 10 10");
+ Tt(t, "x1", "1"), Tt(t, "y1", "9"), Tt(t, "x2", "9"), Tt(t, "y2", "1"), Tt(t, "stroke", "gray"), Tt(t, "stroke-width", "0.5"), Tt(i, "x1", "5"), Tt(i, "y1", "9"), Tt(i, "x2", "9"), Tt(i, "y2", "5"), Tt(i, "stroke", "gray"), Tt(i, "stroke-width", "0.5"), Tt(e, "class", "resize-handle svelte-239wnu"), Tt(e, "xmlns", "http://www.w3.org/2000/svg"), Tt(e, "viewBox", "0 0 10 10");
},
m(a, o) {
- Ca(a, e, o), Hh(e, t), Hh(e, i), s || (r = k1(
+ qa(a, e, o), ud(e, t), ud(e, i), s || (r = j1(
e,
"mousedown",
/*resize*/
n[27]
), s = !0);
},
- p: R1,
+ p: z1,
d(a) {
- a && Wi(e), s = !1, r();
+ a && Qi(e), s = !1, r();
}
};
}
-function P1(n) {
+function X1(n) {
var h;
let e, t, i, s, r;
const a = (
/*#slots*/
n[31].default
- ), o = x1(
+ ), o = G1(
a,
n,
/*$$scope*/
@@ -93,7 +93,7 @@ function P1(n) {
);
let u = (
/*resizable*/
- n[19] && om(n)
+ n[19] && Sm(n)
), l = [
{ "data-testid": (
/*test_id*/
@@ -113,16 +113,16 @@ function P1(n) {
}
], c = {};
for (let d = 0; d < l.length; d += 1)
- c = S1(c, l[d]);
+ c = N1(c, l[d]);
return {
c() {
- e = V_(
+ e = rv(
/*tag*/
n[25]
- ), o && o.c(), t = q_(), u && u.c(), this.h();
+ ), o && o.c(), t = av(), u && u.c(), this.h();
},
l(d) {
- e = G_(
+ e = nv(
d,
/*tag*/
(n[25] || "null").toUpperCase(),
@@ -133,57 +133,57 @@ function P1(n) {
dir: !0
}
);
- var f = ba(e);
- o && o.l(f), t = H_(f), u && u.l(f), f.forEach(Wi), this.h();
+ var f = Ca(e);
+ o && o.l(f), t = sv(f), u && u.l(f), f.forEach(Qi), this.h();
},
h() {
- am(
+ Tm(
/*tag*/
n[25]
- )(e, c), et(
+ )(e, c), at(
e,
"hidden",
/*visible*/
n[14] === !1
- ), et(
+ ), at(
e,
"padded",
/*padding*/
n[10]
- ), et(
+ ), at(
e,
"flex",
/*flex*/
n[1]
- ), et(
+ ), at(
e,
"border_focus",
/*border_mode*/
n[9] === "focus"
- ), et(
+ ), at(
e,
"border_contrast",
/*border_mode*/
n[9] === "contrast"
- ), et(e, "hide-container", !/*explicit_call*/
+ ), at(e, "hide-container", !/*explicit_call*/
n[12] && !/*container*/
- n[13]), et(
+ n[13]), at(
e,
"fullscreen",
/*fullscreen*/
n[0]
- ), et(
+ ), at(
e,
"animating",
/*fullscreen*/
n[0] && /*preexpansionBoundingRect*/
n[24] !== null
- ), et(
+ ), at(
e,
"auto-margin",
/*scale*/
n[17] === null
- ), xe(
+ ), De(
e,
"height",
/*fullscreen*/
@@ -194,7 +194,7 @@ function P1(n) {
n[2]
)
)
- ), xe(
+ ), De(
e,
"min-height",
/*fullscreen*/
@@ -205,7 +205,7 @@ function P1(n) {
n[3]
)
)
- ), xe(
+ ), De(
e,
"max-height",
/*fullscreen*/
@@ -216,31 +216,31 @@ function P1(n) {
n[4]
)
)
- ), xe(
+ ), De(
e,
"--start-top",
/*preexpansionBoundingRect*/
n[24] ? `${/*preexpansionBoundingRect*/
n[24].top}px` : "0px"
- ), xe(
+ ), De(
e,
"--start-left",
/*preexpansionBoundingRect*/
n[24] ? `${/*preexpansionBoundingRect*/
n[24].left}px` : "0px"
- ), xe(
+ ), De(
e,
"--start-width",
/*preexpansionBoundingRect*/
n[24] ? `${/*preexpansionBoundingRect*/
n[24].width}px` : "0px"
- ), xe(
+ ), De(
e,
"--start-height",
/*preexpansionBoundingRect*/
n[24] ? `${/*preexpansionBoundingRect*/
n[24].height}px` : "0px"
- ), xe(
+ ), De(
e,
"width",
/*fullscreen*/
@@ -253,12 +253,12 @@ function P1(n) {
n[5]
)
)
- ), xe(
+ ), De(
e,
"border-style",
/*variant*/
n[8]
- ), xe(
+ ), De(
e,
"overflow",
/*allow_overflow*/
@@ -266,42 +266,42 @@ function P1(n) {
/*overflow_behavior*/
n[16]
) : "hidden"
- ), xe(
+ ), De(
e,
"flex-grow",
/*scale*/
n[17]
- ), xe(e, "min-width", `calc(min(${/*min_width*/
- n[18]}px, 100%))`), xe(e, "border-width", "var(--block-border-width)");
+ ), De(e, "min-width", `calc(min(${/*min_width*/
+ n[18]}px, 100%))`), De(e, "border-width", "var(--block-border-width)");
},
m(d, f) {
- Ca(d, e, f), o && o.m(e, null), Hh(e, t), u && u.m(e, null), n[32](e), r = !0;
+ qa(d, e, f), o && o.m(e, null), ud(e, t), u && u.m(e, null), n[32](e), r = !0;
},
p(d, f) {
var m;
o && o.p && (!r || f[0] & /*$$scope*/
- 1073741824) && F1(
+ 1073741824) && Y1(
o,
a,
d,
/*$$scope*/
d[30],
- r ? w1(
+ r ? V1(
a,
/*$$scope*/
d[30],
f,
null
- ) : D1(
+ ) : H1(
/*$$scope*/
d[30]
),
null
), /*resizable*/
- d[19] ? u ? u.p(d, f) : (u = om(d), u.c(), u.m(e, null)) : u && (u.d(1), u = null), am(
+ d[19] ? u ? u.p(d, f) : (u = Sm(d), u.c(), u.m(e, null)) : u && (u.d(1), u = null), Tm(
/*tag*/
d[25]
- )(e, c = L1(l, [
+ )(e, c = q1(l, [
(!r || f[0] & /*test_id*/
2048) && { "data-testid": (
/*test_id*/
@@ -318,51 +318,51 @@ function P1(n) {
(!r || f[0] & /*rtl*/
1048576 && s !== (s = /*rtl*/
d[20] ? "rtl" : "ltr")) && { dir: s }
- ])), et(
+ ])), at(
e,
"hidden",
/*visible*/
d[14] === !1
- ), et(
+ ), at(
e,
"padded",
/*padding*/
d[10]
- ), et(
+ ), at(
e,
"flex",
/*flex*/
d[1]
- ), et(
+ ), at(
e,
"border_focus",
/*border_mode*/
d[9] === "focus"
- ), et(
+ ), at(
e,
"border_contrast",
/*border_mode*/
d[9] === "contrast"
- ), et(e, "hide-container", !/*explicit_call*/
+ ), at(e, "hide-container", !/*explicit_call*/
d[12] && !/*container*/
- d[13]), et(
+ d[13]), at(
e,
"fullscreen",
/*fullscreen*/
d[0]
- ), et(
+ ), at(
e,
"animating",
/*fullscreen*/
d[0] && /*preexpansionBoundingRect*/
d[24] !== null
- ), et(
+ ), at(
e,
"auto-margin",
/*scale*/
d[17] === null
), f[0] & /*fullscreen, height*/
- 5 && xe(
+ 5 && De(
e,
"height",
/*fullscreen*/
@@ -374,7 +374,7 @@ function P1(n) {
)
)
), f[0] & /*fullscreen, min_height*/
- 9 && xe(
+ 9 && De(
e,
"min-height",
/*fullscreen*/
@@ -386,7 +386,7 @@ function P1(n) {
)
)
), f[0] & /*fullscreen, max_height*/
- 17 && xe(
+ 17 && De(
e,
"max-height",
/*fullscreen*/
@@ -398,35 +398,35 @@ function P1(n) {
)
)
), f[0] & /*preexpansionBoundingRect*/
- 16777216 && xe(
+ 16777216 && De(
e,
"--start-top",
/*preexpansionBoundingRect*/
d[24] ? `${/*preexpansionBoundingRect*/
d[24].top}px` : "0px"
), f[0] & /*preexpansionBoundingRect*/
- 16777216 && xe(
+ 16777216 && De(
e,
"--start-left",
/*preexpansionBoundingRect*/
d[24] ? `${/*preexpansionBoundingRect*/
d[24].left}px` : "0px"
), f[0] & /*preexpansionBoundingRect*/
- 16777216 && xe(
+ 16777216 && De(
e,
"--start-width",
/*preexpansionBoundingRect*/
d[24] ? `${/*preexpansionBoundingRect*/
d[24].width}px` : "0px"
), f[0] & /*preexpansionBoundingRect*/
- 16777216 && xe(
+ 16777216 && De(
e,
"--start-height",
/*preexpansionBoundingRect*/
d[24] ? `${/*preexpansionBoundingRect*/
d[24].height}px` : "0px"
), f[0] & /*fullscreen, width*/
- 33 && xe(
+ 33 && De(
e,
"width",
/*fullscreen*/
@@ -440,13 +440,13 @@ function P1(n) {
)
)
), f[0] & /*variant*/
- 256 && xe(
+ 256 && De(
e,
"border-style",
/*variant*/
d[8]
), f[0] & /*allow_overflow, overflow_behavior*/
- 98304 && xe(
+ 98304 && De(
e,
"overflow",
/*allow_overflow*/
@@ -455,42 +455,42 @@ function P1(n) {
d[16]
) : "hidden"
), f[0] & /*scale*/
- 131072 && xe(
+ 131072 && De(
e,
"flex-grow",
/*scale*/
d[17]
), f[0] & /*min_width*/
- 262144 && xe(e, "min-width", `calc(min(${/*min_width*/
+ 262144 && De(e, "min-width", `calc(min(${/*min_width*/
d[18]}px, 100%))`);
},
i(d) {
- r || (K_(o, d), r = !0);
+ r || (ov(o, d), r = !0);
},
o(d) {
- j_(o, d), r = !1;
+ lv(o, d), r = !1;
},
d(d) {
- d && Wi(e), o && o.d(d), u && u.d(), n[32](null);
+ d && Qi(e), o && o.d(d), u && u.d(), n[32](null);
}
};
}
-function lm(n) {
+function Am(n) {
let e;
return {
c() {
- e = V_("div"), this.h();
+ e = rv("div"), this.h();
},
l(t) {
- e = G_(t, "DIV", { class: !0 }), ba(e).forEach(Wi), this.h();
+ e = nv(t, "DIV", { class: !0 }), Ca(e).forEach(Qi), this.h();
},
h() {
- _t(e, "class", "placeholder svelte-239wnu"), xe(
+ Tt(e, "class", "placeholder svelte-239wnu"), De(
e,
"height",
/*placeholder_height*/
n[22] + "px"
- ), xe(
+ ), De(
e,
"width",
/*placeholder_width*/
@@ -498,17 +498,17 @@ function lm(n) {
);
},
m(t, i) {
- Ca(t, e, i);
+ qa(t, e, i);
},
p(t, i) {
i[0] & /*placeholder_height*/
- 4194304 && xe(
+ 4194304 && De(
e,
"height",
/*placeholder_height*/
t[22] + "px"
), i[0] & /*placeholder_width*/
- 8388608 && xe(
+ 8388608 && De(
e,
"width",
/*placeholder_width*/
@@ -516,76 +516,76 @@ function lm(n) {
);
},
d(t) {
- t && Wi(e);
+ t && Qi(e);
}
};
}
-function O1(n) {
+function Q1(n) {
let e, t, i, s = (
/*tag*/
- n[25] && P1(n)
+ n[25] && X1(n)
), r = (
/*fullscreen*/
- n[0] && lm(n)
+ n[0] && Am(n)
);
return {
c() {
- s && s.c(), e = q_(), r && r.c(), t = rm();
+ s && s.c(), e = av(), r && r.c(), t = bm();
},
l(a) {
- s && s.l(a), e = H_(a), r && r.l(a), t = rm();
+ s && s.l(a), e = sv(a), r && r.l(a), t = bm();
},
m(a, o) {
- s && s.m(a, o), Ca(a, e, o), r && r.m(a, o), Ca(a, t, o), i = !0;
+ s && s.m(a, o), qa(a, e, o), r && r.m(a, o), qa(a, t, o), i = !0;
},
p(a, o) {
/*tag*/
a[25] && s.p(a, o), /*fullscreen*/
- a[0] ? r ? r.p(a, o) : (r = lm(a), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null);
+ a[0] ? r ? r.p(a, o) : (r = Am(a), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null);
},
i(a) {
- i || (K_(s, a), i = !0);
+ i || (ov(s, a), i = !0);
},
o(a) {
- j_(s, a), i = !1;
+ lv(s, a), i = !1;
},
d(a) {
- a && (Wi(e), Wi(t)), s && s.d(a), r && r.d(a);
+ a && (Qi(e), Qi(t)), s && s.d(a), r && r.d(a);
}
};
}
-function M1(n, e, t) {
- let { $$slots: i = {}, $$scope: s } = e, { height: r = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: u = void 0 } = e, { elem_id: l = "" } = e, { elem_classes: c = [] } = e, { variant: h = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: m = "normal" } = e, { test_id: g = void 0 } = e, { explicit_call: p = !1 } = e, { container: y = !0 } = e, { visible: v = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: E = "auto" } = e, { scale: T = null } = e, { min_width: A = 0 } = e, { flex: S = !1 } = e, { resizable: D = !1 } = e, { rtl: x = !1 } = e, { fullscreen: w = !1 } = e, I = w, R, M = m === "fieldset" ? "fieldset" : "div", P = 0, K = 0, q = null;
- function W(L) {
+function Z1(n, e, t) {
+ let { $$slots: i = {}, $$scope: s } = e, { height: r = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: u = void 0 } = e, { elem_id: l = "" } = e, { elem_classes: c = [] } = e, { variant: h = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: m = "normal" } = e, { test_id: g = void 0 } = e, { explicit_call: p = !1 } = e, { container: y = !0 } = e, { visible: v = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: E = "auto" } = e, { scale: T = null } = e, { min_width: x = 0 } = e, { flex: S = !1 } = e, { resizable: D = !1 } = e, { rtl: A = !1 } = e, { fullscreen: w = !1 } = e, I = w, M, k = m === "fieldset" ? "fieldset" : "div", q = 0, K = 0, H = null;
+ function Y(L) {
w && L.key === "Escape" && t(0, w = !1);
}
- const U = (L) => {
+ const B = (L) => {
if (L !== void 0) {
if (typeof L == "number")
return L + "px";
if (typeof L == "string")
return L;
}
- }, j = (L) => {
- let H = L.clientY;
- const Q = (C) => {
- const B = C.clientY - H;
- H = C.clientY, t(21, R.style.height = `${R.offsetHeight + B}px`, R);
- }, X = () => {
- window.removeEventListener("mousemove", Q), window.removeEventListener("mouseup", X);
+ }, z = (L) => {
+ let $ = L.clientY;
+ const Q = (O) => {
+ const N = O.clientY - $;
+ $ = O.clientY, t(21, M.style.height = `${M.offsetHeight + N}px`, M);
+ }, C = () => {
+ window.removeEventListener("mousemove", Q), window.removeEventListener("mouseup", C);
};
- window.addEventListener("mousemove", Q), window.addEventListener("mouseup", X);
+ window.addEventListener("mousemove", Q), window.addEventListener("mouseup", C);
};
- function $(L) {
- A1[L ? "unshift" : "push"](() => {
- R = L, t(21, R);
+ function W(L) {
+ U1[L ? "unshift" : "push"](() => {
+ M = L, t(21, M);
});
}
return n.$$set = (L) => {
- "height" in L && t(2, r = L.height), "min_height" in L && t(3, a = L.min_height), "max_height" in L && t(4, o = L.max_height), "width" in L && t(5, u = L.width), "elem_id" in L && t(6, l = L.elem_id), "elem_classes" in L && t(7, c = L.elem_classes), "variant" in L && t(8, h = L.variant), "border_mode" in L && t(9, d = L.border_mode), "padding" in L && t(10, f = L.padding), "type" in L && t(28, m = L.type), "test_id" in L && t(11, g = L.test_id), "explicit_call" in L && t(12, p = L.explicit_call), "container" in L && t(13, y = L.container), "visible" in L && t(14, v = L.visible), "allow_overflow" in L && t(15, _ = L.allow_overflow), "overflow_behavior" in L && t(16, E = L.overflow_behavior), "scale" in L && t(17, T = L.scale), "min_width" in L && t(18, A = L.min_width), "flex" in L && t(1, S = L.flex), "resizable" in L && t(19, D = L.resizable), "rtl" in L && t(20, x = L.rtl), "fullscreen" in L && t(0, w = L.fullscreen), "$$scope" in L && t(30, s = L.$$scope);
+ "height" in L && t(2, r = L.height), "min_height" in L && t(3, a = L.min_height), "max_height" in L && t(4, o = L.max_height), "width" in L && t(5, u = L.width), "elem_id" in L && t(6, l = L.elem_id), "elem_classes" in L && t(7, c = L.elem_classes), "variant" in L && t(8, h = L.variant), "border_mode" in L && t(9, d = L.border_mode), "padding" in L && t(10, f = L.padding), "type" in L && t(28, m = L.type), "test_id" in L && t(11, g = L.test_id), "explicit_call" in L && t(12, p = L.explicit_call), "container" in L && t(13, y = L.container), "visible" in L && t(14, v = L.visible), "allow_overflow" in L && t(15, _ = L.allow_overflow), "overflow_behavior" in L && t(16, E = L.overflow_behavior), "scale" in L && t(17, T = L.scale), "min_width" in L && t(18, x = L.min_width), "flex" in L && t(1, S = L.flex), "resizable" in L && t(19, D = L.resizable), "rtl" in L && t(20, A = L.rtl), "fullscreen" in L && t(0, w = L.fullscreen), "$$scope" in L && t(30, s = L.$$scope);
}, n.$$.update = () => {
n.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/
- 538968065 && w !== I && (t(29, I = w), w ? (t(24, q = R.getBoundingClientRect()), t(22, P = R.offsetHeight), t(23, K = R.offsetWidth), window.addEventListener("keydown", W)) : (t(24, q = null), window.removeEventListener("keydown", W))), n.$$.dirty[0] & /*visible*/
+ 538968065 && w !== I && (t(29, I = w), w ? (t(24, H = M.getBoundingClientRect()), t(22, q = M.offsetHeight), t(23, K = M.offsetWidth), window.addEventListener("keydown", Y)) : (t(24, H = null), window.removeEventListener("keydown", Y))), n.$$.dirty[0] & /*visible*/
16384 && (v || t(1, S = !1));
}, [
w,
@@ -606,31 +606,31 @@ function M1(n, e, t) {
_,
E,
T,
- A,
- D,
x,
- R,
- P,
- K,
- q,
+ D,
+ A,
M,
- U,
- j,
+ q,
+ K,
+ H,
+ k,
+ B,
+ z,
m,
I,
s,
i,
- $
+ W
];
}
-class z_ extends T1 {
+class uv extends B1 {
constructor(e) {
- super(), I1(
+ super(), K1(
this,
e,
- M1,
- O1,
- C1,
+ Z1,
+ Q1,
+ W1,
{
height: 2,
min_height: 3,
@@ -660,7 +660,7 @@ class z_ extends T1 {
);
}
}
-function Kd() {
+function ff() {
return {
async: !1,
breaks: !1,
@@ -674,43 +674,43 @@ function Kd() {
walkTokens: null
};
}
-let ks = Kd();
-function W_(n) {
- ks = n;
+let Gs = ff();
+function cv(n) {
+ Gs = n;
}
-const Y_ = /[&<>"']/, $1 = new RegExp(Y_.source, "g"), X_ = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, B1 = new RegExp(X_.source, "g"), N1 = {
+const hv = /[&<>"']/, J1 = new RegExp(hv.source, "g"), dv = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, eb = new RegExp(dv.source, "g"), tb = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
-}, um = (n) => N1[n];
-function Gt(n, e) {
+}, xm = (n) => tb[n];
+function zt(n, e) {
if (e) {
- if (Y_.test(n))
- return n.replace($1, um);
- } else if (X_.test(n))
- return n.replace(B1, um);
+ if (hv.test(n))
+ return n.replace(J1, xm);
+ } else if (dv.test(n))
+ return n.replace(eb, xm);
return n;
}
-const U1 = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
-function G1(n) {
- return n.replace(U1, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
+const ib = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
+function nb(n) {
+ return n.replace(ib, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
}
-const H1 = /(^|[^\[])\^/g;
+const sb = /(^|[^\[])\^/g;
function Ce(n, e) {
let t = typeof n == "string" ? n : n.source;
e = e || "";
const i = {
replace: (s, r) => {
let a = typeof r == "string" ? r : r.source;
- return a = a.replace(H1, "$1"), t = t.replace(s, a), i;
+ return a = a.replace(sb, "$1"), t = t.replace(s, a), i;
},
getRegex: () => new RegExp(t, e)
};
return i;
}
-function cm(n) {
+function Dm(n) {
try {
n = encodeURI(n).replace(/%25/g, "%");
} catch {
@@ -718,8 +718,8 @@ function cm(n) {
}
return n;
}
-const Ta = { exec: () => null };
-function hm(n, e) {
+const Fa = { exec: () => null };
+function wm(n, e) {
const t = n.replace(/\|/g, (r, a, o) => {
let u = !1, l = a;
for (; --l >= 0 && o[l] === "\\"; )
@@ -737,7 +737,7 @@ function hm(n, e) {
i[s] = i[s].trim().replace(/\\\|/g, "|");
return i;
}
-function go(n, e, t) {
+function Fo(n, e, t) {
const i = n.length;
if (i === 0)
return "";
@@ -746,7 +746,7 @@ function go(n, e, t) {
s++;
return n.slice(0, i - s);
}
-function V1(n, e) {
+function rb(n, e) {
if (n.indexOf(e[1]) === -1)
return -1;
let t = 0;
@@ -759,8 +759,8 @@ function V1(n, e) {
return i;
return -1;
}
-function dm(n, e, t, i) {
- const s = e.href, r = e.title ? Gt(e.title) : null, a = n[1].replace(/\\([\[\]])/g, "$1");
+function Lm(n, e, t, i) {
+ const s = e.href, r = e.title ? zt(e.title) : null, a = n[1].replace(/\\([\[\]])/g, "$1");
if (n[0].charAt(0) !== "!") {
i.state.inLink = !0;
const o = {
@@ -778,10 +778,10 @@ function dm(n, e, t, i) {
raw: t,
href: s,
title: r,
- text: Gt(a)
+ text: zt(a)
};
}
-function q1(n, e) {
+function ab(n, e) {
const t = n.match(/^(\s+)(?:```)/);
if (t === null)
return e;
@@ -796,14 +796,14 @@ function q1(n, e) {
}).join(`
`);
}
-class Dl {
+class ql {
// set by the lexer
constructor(e) {
de(this, "options");
de(this, "rules");
// set by the lexer
de(this, "lexer");
- this.options = e || ks;
+ this.options = e || Gs;
}
space(e) {
const t = this.rules.block.newline.exec(e);
@@ -821,7 +821,7 @@ class Dl {
type: "code",
raw: t[0],
codeBlockStyle: "indented",
- text: this.options.pedantic ? i : go(i, `
+ text: this.options.pedantic ? i : Fo(i, `
`)
};
}
@@ -829,7 +829,7 @@ class Dl {
fences(e) {
const t = this.rules.block.fences.exec(e);
if (t) {
- const i = t[0], s = q1(i, t[3] || "");
+ const i = t[0], s = ab(i, t[3] || "");
return {
type: "code",
raw: i,
@@ -843,7 +843,7 @@ class Dl {
if (t) {
let i = t[2].trim();
if (/#$/.test(i)) {
- const s = go(i, "#");
+ const s = Fo(i, "#");
(this.options.pedantic || !s || / $/.test(s)) && (i = s.trim());
}
return {
@@ -868,7 +868,7 @@ class Dl {
if (t) {
let i = t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
$1`);
- i = go(i.replace(/^ *>[ \t]?/gm, ""), `
+ i = Fo(i.replace(/^ *>[ \t]?/gm, ""), `
`);
const s = this.lexer.state.top;
this.lexer.state.top = !0;
@@ -979,7 +979,7 @@ class Dl {
const t = this.rules.block.table.exec(e);
if (!t || !/[:|]/.test(t[2]))
return;
- const i = hm(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
+ const i = wm(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
`) : [], a = {
type: "table",
raw: t[0],
@@ -996,7 +996,7 @@ class Dl {
tokens: this.lexer.inline(o)
});
for (const o of r)
- a.rows.push(hm(o, a.header.length).map((u) => ({
+ a.rows.push(wm(o, a.header.length).map((u) => ({
text: u,
tokens: this.lexer.inline(u)
})));
@@ -1043,7 +1043,7 @@ class Dl {
return {
type: "escape",
raw: t[0],
- text: Gt(t[1])
+ text: zt(t[1])
};
}
tag(e) {
@@ -1065,11 +1065,11 @@ class Dl {
if (!this.options.pedantic && /^$/.test(i))
return;
- const a = go(i.slice(0, -1), "\\");
+ const a = Fo(i.slice(0, -1), "\\");
if ((i.length - a.length) % 2 === 0)
return;
} else {
- const a = V1(t[2], "()");
+ const a = rb(t[2], "()");
if (a > -1) {
const u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + a;
t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, u).trim(), t[3] = "";
@@ -1081,7 +1081,7 @@ class Dl {
a && (s = a[1], r = a[3]);
} else
r = t[3] ? t[3].slice(1, -1) : "";
- return s = s.trim(), /^$/.test(i) ? s = s.slice(1) : s = s.slice(1, -1)), dm(t, {
+ return s = s.trim(), /^$/.test(i) ? s = s.slice(1) : s = s.slice(1, -1)), Lm(t, {
href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
}, t[0], this.lexer);
@@ -1099,7 +1099,7 @@ class Dl {
text: a
};
}
- return dm(i, r, i[0], this.lexer);
+ return Lm(i, r, i[0], this.lexer);
}
}
emStrong(e, t, i = "") {
@@ -1148,7 +1148,7 @@ class Dl {
if (t) {
let i = t[2].replace(/\n/g, " ");
const s = /[^ ]/.test(i), r = /^ /.test(i) && / $/.test(i);
- return s && r && (i = i.substring(1, i.length - 1)), i = Gt(i, !0), {
+ return s && r && (i = i.substring(1, i.length - 1)), i = zt(i, !0), {
type: "codespan",
raw: t[0],
text: i
@@ -1177,7 +1177,7 @@ class Dl {
const t = this.rules.inline.autolink.exec(e);
if (t) {
let i, s;
- return t[2] === "@" ? (i = Gt(t[1]), s = "mailto:" + i) : (i = Gt(t[1]), s = i), {
+ return t[2] === "@" ? (i = zt(t[1]), s = "mailto:" + i) : (i = zt(t[1]), s = i), {
type: "link",
raw: t[0],
text: i,
@@ -1198,13 +1198,13 @@ class Dl {
if (t = this.rules.inline.url.exec(e)) {
let s, r;
if (t[2] === "@")
- s = Gt(t[0]), r = "mailto:" + s;
+ s = zt(t[0]), r = "mailto:" + s;
else {
let a;
do
a = t[0], t[0] = ((i = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : i[0]) ?? "";
while (a !== t[0]);
- s = Gt(t[0]), t[1] === "www." ? r = "http://" + t[0] : r = t[0];
+ s = zt(t[0]), t[1] === "www." ? r = "http://" + t[0] : r = t[0];
}
return {
type: "link",
@@ -1225,7 +1225,7 @@ class Dl {
const t = this.rules.inline.text.exec(e);
if (t) {
let i;
- return this.lexer.state.inRawBlock ? i = t[0] : i = Gt(t[0]), {
+ return this.lexer.state.inRawBlock ? i = t[0] : i = zt(t[0]), {
type: "text",
raw: t[0],
text: i
@@ -1233,118 +1233,118 @@ class Dl {
}
}
}
-const K1 = /^(?: *(?:\n|$))+/, j1 = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, z1 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Qa = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, W1 = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q_ = /(?:[*+-]|\d{1,9}[.)])/, Z_ = Ce(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Q_).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), jd = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Y1 = /^[^\n]+/, zd = /(?!\s*\])(?:\\.|[^\[\]\\])+/, X1 = Ce(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", zd).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Q1 = Ce(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q_).getRegex(), ru = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Wd = /|$))/, Z1 = Ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Wd).replace("tag", ru).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), J_ = Ce(jd).replace("hr", Qa).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ru).getRegex(), J1 = Ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", J_).getRegex(), Yd = {
- blockquote: J1,
- code: j1,
- def: X1,
- fences: z1,
- heading: W1,
- hr: Qa,
- html: Z1,
- lheading: Z_,
- list: Q1,
- newline: K1,
- paragraph: J_,
- table: Ta,
- text: Y1
-}, fm = Ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Qa).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ru).getRegex(), eb = {
- ...Yd,
- table: fm,
- paragraph: Ce(jd).replace("hr", Qa).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fm).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ru).getRegex()
-}, tb = {
- ...Yd,
- html: Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|' + (i ? e : Gt(e, !0)) + `
-` : "
" + (i ? e : Gt(e, !0)) + `
+`, s ? '' + (i ? e : zt(e, !0)) + `
+` : "" + (i ? e : zt(e, !0)) + `
`;
}
blockquote(e) {
@@ -1612,7 +1612,7 @@ ${e}
return `An error occurred:
" + Gt(i.message + "", !0) + ""; + const s = "
An error occurred:
" + zt(i.message + "", !0) + ""; return t ? Promise.resolve(s) : s; } if (t) @@ -2056,40 +2056,40 @@ Please report this to https://github.com/markedjs/marked.`, e) { throw i; }; }; -const As = new _b(); +const Os = new Fb(); function ke(n, e) { - return As.parse(n, e); + return Os.parse(n, e); } ke.options = ke.setOptions = function(n) { - return As.setOptions(n), ke.defaults = As.defaults, W_(ke.defaults), ke; + return Os.setOptions(n), ke.defaults = Os.defaults, cv(ke.defaults), ke; }; -ke.getDefaults = Kd; -ke.defaults = ks; +ke.getDefaults = ff; +ke.defaults = Gs; ke.use = function(...n) { - return As.use(...n), ke.defaults = As.defaults, W_(ke.defaults), ke; + return Os.use(...n), ke.defaults = Os.defaults, cv(ke.defaults), ke; }; ke.walkTokens = function(n, e) { - return As.walkTokens(n, e); + return Os.walkTokens(n, e); }; -ke.parseInline = As.parseInline; -ke.Parser = Xi; -ke.parser = Xi.parse; -ke.Renderer = Ll; -ke.TextRenderer = Qd; -ke.Lexer = Yi; -ke.lexer = Yi.lex; -ke.Tokenizer = Dl; -ke.Hooks = Sa; +ke.parseInline = Os.parseInline; +ke.Parser = Ji; +ke.parser = Ji.parse; +ke.Renderer = jl; +ke.TextRenderer = yf; +ke.Lexer = Zi; +ke.lexer = Zi.lex; +ke.Tokenizer = ql; +ke.Hooks = Pa; ke.parse = ke; ke.options; ke.setOptions; ke.use; ke.walkTokens; ke.parseInline; -Xi.parse; -Yi.lex; -const vb = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, yb = Object.hasOwnProperty; -class rv { +Ji.parse; +Zi.lex; +const Pb = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Ob = Object.hasOwnProperty; +class bv { /** * Create a new slug class. */ @@ -2112,9 +2112,9 @@ class rv { */ slug(e, t) { const i = this; - let s = Eb(e, t === !0); + let s = Mb(e, t === !0); const r = s; - for (; yb.call(i.occurrences, s); ) + for (; Ob.call(i.occurrences, s); ) i.occurrences[r]++, s = r + "-" + i.occurrences[r]; return i.occurrences[s] = 0, s; } @@ -2127,11 +2127,11 @@ class rv { this.occurrences = /* @__PURE__ */ Object.create(null); } } -function Eb(n, e) { - return typeof n != "string" ? "" : (e || (n = n.toLowerCase()), n.replace(vb, "").replace(/ /g, "-")); +function Mb(n, e) { + return typeof n != "string" ? "" : (e || (n = n.toLowerCase()), n.replace(Pb, "").replace(/ /g, "-")); } -new rv(); -var mm = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, bb = { exports: {} }; +new bv(); +var km = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, $b = { exports: {} }; (function(n) { var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {}; /** @@ -2241,13 +2241,13 @@ var mm = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t */ clone: function v(_, E) { E = E || {}; - var T, A; + var T, x; switch (o.util.type(_)) { case "Object": - if (A = o.util.objId(_), E[A]) - return E[A]; + if (x = o.util.objId(_), E[x]) + return E[x]; T = /** @type {Record
" : n.cue.post ? "" : ""}${n.timelineStart.toFixed(2)}-${n.resumeTime.toFixed(2)}]`; } -function nr(n) { +function gr(n) { const e = n.timelineStart, t = n.duration || 0; return `["${n.identifier}" ${e.toFixed(2)}-${(e + t).toFixed(2)}]`; } -class o2 { +class k2 { constructor(e, t, i, s) { this.hls = void 0, this.interstitial = void 0, this.assetItem = void 0, this.tracks = null, this.hasDetails = !1, this.mediaAttached = null, this._currentTime = void 0, this._bufferedEosTime = void 0, this.checkPlayout = () => { this.reachedPlayout(this.currentTime) && this.hls.trigger(b.PLAYOUT_LIMIT_REACHED, {}); @@ -25535,7 +25603,7 @@ class o2 { this.interstitial = i, this.assetItem = s; let a = s.uri; try { - a = dE(a, t.primarySessionId).href; + a = LE(a, t.primarySessionId).href; } catch { } r.loadSource(a); @@ -25563,7 +25631,7 @@ class o2 { return !0; if (!e || !this._bufferedEosTime) return !1; - const i = this.timelineOffset, s = le.bufferInfo(e, i, 0); + const i = this.timelineOffset, s = ue.bufferInfo(e, i, 0); return this.getAssetTime(s.end) >= this._bufferedEosTime - 0.02; } reachedPlayout(e) { @@ -25588,7 +25656,7 @@ class o2 { const e = this.media || this.mediaAttached; if (!e) return this._bufferedEosTime ? this._bufferedEosTime : this.currentTime; - const t = le.bufferInfo(e, e.currentTime, 1e-3); + const t = ue.bufferInfo(e, e.currentTime, 1e-3); return this.getAssetTime(t.end); } get currentTime() { @@ -25672,11 +25740,11 @@ class o2 { } toString() { var e; - return `HlsAssetPlayer: ${nr(this.assetItem)} ${(e = this.hls) == null ? void 0 : e.sessionId} ${this.appendInPlace ? "append-in-place" : ""}`; + return `HlsAssetPlayer: ${gr(this.assetItem)} ${(e = this.hls) == null ? void 0 : e.sessionId} ${this.appendInPlace ? "append-in-place" : ""}`; } } -const d0 = 0.033; -class l2 extends Fi { +const I0 = 0.033; +class R2 extends Bi { constructor(e, t) { super("interstitials-sched", t), this.onScheduleUpdate = void 0, this.eventMap = {}, this.events = null, this.items = null, this.durations = { primary: 0, @@ -25809,7 +25877,7 @@ class l2 extends Fi { const o = r[a], u = e[o]; if (u.isInterstitial) { let l = this.eventMap[o]; - l ? l.setDateRange(u) : (l = new r2(u, t), this.eventMap[o] = l, i === !1 && (l.appendInPlace = i)), s.push(l); + l ? l.setDateRange(u) : (l = new L2(u, t), this.eventMap[o] = l, i === !1 && (l.appendInPlace = i)), s.push(l); } } return s; @@ -25821,18 +25889,18 @@ class l2 extends Fi { this.resolveOffsets(e, t); let u = 0, l = 0; if (e.forEach((c, h) => { - const d = c.cue.pre, f = c.cue.post, m = e[h - 1] || null, g = c.appendInPlace, p = f ? r : c.startOffset, y = c.duration, v = c.timelineOccupancy === jl.Range ? y : 0, _ = c.resumptionOffset, E = (m == null ? void 0 : m.startTime) === p, T = p + c.cumulativeDuration; - let A = g ? T + y : p + _; + const d = c.cue.pre, f = c.cue.post, m = e[h - 1] || null, g = c.appendInPlace, p = f ? r : c.startOffset, y = c.duration, v = c.timelineOccupancy === cu.Range ? y : 0, _ = c.resumptionOffset, E = (m == null ? void 0 : m.startTime) === p, T = p + c.cumulativeDuration; + let x = g ? T + y : p + _; if (d || !f && p <= 0) { const D = l; l += v, c.timelineStart = T; - const x = a; + const A = a; a += y, i.push({ event: c, start: T, - end: A, + end: x, playout: { - start: x, + start: A, end: a }, integrated: { @@ -25843,38 +25911,38 @@ class l2 extends Fi { } else if (p <= r) { if (!E) { const w = p - u; - if (w > d0) { - const I = u, R = l; + if (w > I0) { + const I = u, M = l; l += w; - const M = a; + const k = a; a += w; - const P = { + const q = { previousEvent: e[h - 1] || null, nextEvent: c, start: I, end: I + w, playout: { - start: M, + start: k, end: a }, integrated: { - start: R, + start: M, end: l } }; - i.push(P); + i.push(q); } else w > 0 && m && (m.cumulativeDuration += w, i[i.length - 1].end = p); } - f && (A = T), c.timelineStart = T; + f && (x = T), c.timelineStart = T; const D = l; l += v; - const x = a; + const A = a; a += y, i.push({ event: c, start: T, - end: A, + end: x, playout: { - start: x, + start: A, end: a }, integrated: { @@ -25936,22 +26004,22 @@ class l2 extends Fi { let r = 0, a = -1; e.forEach((o, u) => { const l = o.cue.pre, c = o.cue.post, h = l ? 0 : c ? s : o.startTime; - this.updateAssetDurations(o), a === h ? o.cumulativeDuration = r : (r = 0, a = h), !c && o.snapOptions.in && (o.resumeAnchor = ws(null, i.fragments, o.startOffset + o.resumptionOffset, 0, 0) || void 0), o.appendInPlace && !o.appendInPlaceStarted && (this.primaryCanResumeInPlaceAt(o, t) || (o.appendInPlace = !1)), !o.appendInPlace && u + 1 < e.length && e[u + 1].startTime - e[u].resumeTime < d0 && (e[u + 1].appendInPlace = !1, e[u + 1].appendInPlace && this.warn(`Could not change append strategy for abutting event ${o}`)); - const f = Z(o.resumeOffset) ? o.resumeOffset : o.duration; + this.updateAssetDurations(o), a === h ? o.cumulativeDuration = r : (r = 0, a = h), !c && o.snapOptions.in && (o.resumeAnchor = Bs(null, i.fragments, o.startOffset + o.resumptionOffset, 0, 0) || void 0), o.appendInPlace && !o.appendInPlaceStarted && (this.primaryCanResumeInPlaceAt(o, t) || (o.appendInPlace = !1)), !o.appendInPlace && u + 1 < e.length && e[u + 1].startTime - e[u].resumeTime < I0 && (e[u + 1].appendInPlace = !1, e[u + 1].appendInPlace && this.warn(`Could not change append strategy for abutting event ${o}`)); + const f = J(o.resumeOffset) ? o.resumeOffset : o.duration; r += f; }); } primaryCanResumeInPlaceAt(e, t) { const i = e.resumeTime, s = e.startTime + e.resumptionOffset; - return Math.abs(i - s) > gr ? (this.log(`"${e.identifier}" resumption ${i} not aligned with estimated timeline end ${s}`), !1) : t ? !Object.keys(t).some((a) => { + return Math.abs(i - s) > wr ? (this.log(`"${e.identifier}" resumption ${i} not aligned with estimated timeline end ${s}`), !1) : t ? !Object.keys(t).some((a) => { const o = t[a].details, u = o.edge; if (i >= u) return this.log(`"${e.identifier}" resumption ${i} past ${a} playlist end ${u}`), !1; - const l = ws(null, o.fragments, i); + const l = Bs(null, o.fragments, i); if (!l) return this.log(`"${e.identifier}" resumption ${i} does not align with any fragments in ${a} playlist (${o.fragStart}-${o.fragmentEnd})`), !0; const c = a === "audio" ? 0.175 : 0; - return Math.abs(l.start - i) < gr + c || Math.abs(l.end - i) < gr + c ? !1 : (this.log(`"${e.identifier}" resumption ${i} not aligned with ${a} fragment bounds (${l.start}-${l.end} sn: ${l.sn} cc: ${l.cc})`), !0); + return Math.abs(l.start - i) < wr + c || Math.abs(l.end - i) < wr + c ? !1 : (this.log(`"${e.identifier}" resumption ${i} not aligned with ${a} fragment bounds (${l.start}-${l.end} sn: ${l.sn} cc: ${l.cc})`), !0); }) : (this.log(`"${e.identifier}" resumption ${i} can not be aligned with media (none selected)`), !1); } updateAssetDurations(e) { @@ -25970,10 +26038,10 @@ class l2 extends Fi { e.reset(), delete this.eventMap[e.identifier]; } } -function Mn(n) { +function qn(n) { return `[${n.event ? '"' + n.event.identifier + '"' : "primary"}: ${n.start.toFixed(2)}-${n.end.toFixed(2)}]`; } -class u2 { +class C2 { constructor(e) { this.hls = void 0, this.hls = e; } @@ -25984,9 +26052,9 @@ class u2 { const i = e.assetListUrl; let s; try { - s = dE(i, this.hls.sessionId, e.baseUrl); + s = LE(i, this.hls.sessionId, e.baseUrl); } catch (d) { - const f = this.assignAssetListError(e, O.ASSET_LIST_LOAD_ERROR, d, i); + const f = this.assignAssetListError(e, P.ASSET_LIST_LOAD_ERROR, d, i); this.hls.trigger(b.ERROR, f); return; } @@ -26004,7 +26072,7 @@ class u2 { onSuccess: (d, f, m, g) => { const p = d.data, y = p == null ? void 0 : p.ASSETS; if (!Array.isArray(y)) { - const v = this.assignAssetListError(e, O.ASSET_LIST_PARSING_ERROR, new Error("Invalid interstitial asset list"), m.url, f, g); + const v = this.assignAssetListError(e, P.ASSET_LIST_PARSING_ERROR, new Error("Invalid interstitial asset list"), m.url, f, g); this.hls.trigger(b.ERROR, v); return; } @@ -26015,11 +26083,11 @@ class u2 { }); }, onError: (d, f, m, g) => { - const p = this.assignAssetListError(e, O.ASSET_LIST_LOAD_ERROR, new Error(`Error loading X-ASSET-LIST: HTTP status ${d.code} ${d.text} (${f.url})`), f.url, g, m); + const p = this.assignAssetListError(e, P.ASSET_LIST_LOAD_ERROR, new Error(`Error loading X-ASSET-LIST: HTTP status ${d.code} ${d.text} (${f.url})`), f.url, g, m); this.hls.trigger(b.ERROR, p); }, onTimeout: (d, f, m) => { - const g = this.assignAssetListError(e, O.ASSET_LIST_LOAD_TIMEOUT, new Error(`Timeout loading X-ASSET-LIST (${f.url})`), f.url, d, m); + const g = this.assignAssetListError(e, P.ASSET_LIST_LOAD_TIMEOUT, new Error(`Timeout loading X-ASSET-LIST (${f.url})`), f.url, d, m); this.hls.trigger(b.ERROR, g); } }; @@ -26029,7 +26097,7 @@ class u2 { } assignAssetListError(e, t, i, s, r, a) { return e.error = i, { - type: ie.NETWORK_ERROR, + type: ne.NETWORK_ERROR, details: t, fatal: !1, interstitial: e, @@ -26040,11 +26108,11 @@ class u2 { }; } } -function f0(n) { +function k0(n) { n == null || n.play().catch(() => { }); } -class c2 extends Fi { +class F2 extends Bi { constructor(e, t) { super("interstitials", e.logger), this.HlsPlayerClass = void 0, this.hls = void 0, this.assetListLoader = void 0, this.mediaSelection = null, this.altSelection = null, this.media = null, this.detachedData = null, this.requiredTracks = null, this.manager = null, this.playerQueue = [], this.bufferedPos = -1, this.timelinePos = -1, this.schedule = void 0, this.playingItem = null, this.bufferingItem = null, this.waitingItem = null, this.endedItem = null, this.playingAsset = null, this.endedAsset = null, this.bufferingAsset = null, this.shouldPlay = !1, this.onPlay = () => { this.shouldPlay = !0; @@ -26114,14 +26182,14 @@ class c2 extends Fi { }, this.onScheduleUpdate = (i, s) => { const r = this.schedule, a = this.playingItem, o = r.events || [], u = r.items || [], l = r.durations, c = i.map((m) => m.identifier), h = !!(o.length || c.length); (h || s) && this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o} -Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.log(`Removed events ${c}`), this.playerQueue.forEach((m) => { +Schedule: ${u.map((m) => qn(m))} pos: ${this.timelinePos}`), c.length && this.log(`Removed events ${c}`), this.playerQueue.forEach((m) => { if (m.interstitial.appendInPlace) { const g = m.assetItem.timelineStart, p = m.timelineOffset - g; if (p) try { m.timelineOffset = g; } catch (y) { - Math.abs(p) > gr && this.warn(`${y} ("${m.assetId}" ${m.timelineOffset}->${g})`); + Math.abs(p) > wr && this.warn(`${y} ("${m.assetId}" ${m.timelineOffset}->${g})`); } } }); @@ -26152,7 +26220,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } d && d(), this.checkBuffer(); } - }, this.hls = e, this.HlsPlayerClass = t, this.assetListLoader = new u2(e), this.schedule = new l2(this.onScheduleUpdate, e.logger), this.registerListeners(); + }, this.hls = e, this.HlsPlayerClass = t, this.assetListLoader = new C2(e), this.schedule = new R2(this.onScheduleUpdate, e.logger), this.registerListeners(); } registerListeners() { const e = this.hls; @@ -26184,11 +26252,11 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo e && this.removeMediaListeners(e); } removeMediaListeners(e) { - Di(e, "play", this.onPlay), Di(e, "pause", this.onPause), Di(e, "seeking", this.onSeeking), Di(e, "timeupdate", this.onTimeupdate); + Mi(e, "play", this.onPlay), Mi(e, "pause", this.onPause), Mi(e, "seeking", this.onSeeking), Mi(e, "timeupdate", this.onTimeupdate); } onMediaAttaching(e, t) { const i = this.media = t.media; - ti(i, "seeking", this.onSeeking), ti(i, "timeupdate", this.onTimeupdate), ti(i, "play", this.onPlay), ti(i, "pause", this.onPause); + ri(i, "seeking", this.onSeeking), ri(i, "timeupdate", this.onTimeupdate), ri(i, "play", this.onPlay), ri(i, "pause", this.onPause); } onMediaAttached(e, t) { const i = this.effectivePlayingItem, s = this.detachedData; @@ -26219,7 +26287,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo let p = h[d].start; const y = h.event; if (y) { - if (d === "playout" || y.timelineOccupancy !== jl.Point) { + if (d === "playout" || y.timelineOccupancy !== cu.Point) { const v = i(f); (v == null ? void 0 : v.interstitial) === y && (p += v.assetItem.startOffset + v[g]); } @@ -26252,13 +26320,13 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo if (g != null && (f = g.event) != null && f.restrictions.skip) return; e.log(`seek to ${h} "${d}"`); - const p = e.effectivePlayingItem, y = e.schedule.findItemIndexAtTime(h, d), v = (m = e.schedule.items) == null ? void 0 : m[y], _ = e.getBufferingPlayer(), E = _ == null ? void 0 : _.interstitial, T = E == null ? void 0 : E.appendInPlace, A = p && e.itemsMatch(p, v); - if (p && (T || A)) { - const D = i(e.playingAsset), x = (D == null ? void 0 : D.media) || e.primaryMedia; - if (x) { - const w = d === "primary" ? x.currentTime : s(p, d, e.playingAsset, "timelinePos", "currentTime"), I = h - w, R = (T ? w : x.currentTime) + I; - if (R >= 0 && (!D || T || R <= D.duration)) { - x.currentTime = R; + const p = e.effectivePlayingItem, y = e.schedule.findItemIndexAtTime(h, d), v = (m = e.schedule.items) == null ? void 0 : m[y], _ = e.getBufferingPlayer(), E = _ == null ? void 0 : _.interstitial, T = E == null ? void 0 : E.appendInPlace, x = p && e.itemsMatch(p, v); + if (p && (T || x)) { + const D = i(e.playingAsset), A = (D == null ? void 0 : D.media) || e.primaryMedia; + if (A) { + const w = d === "primary" ? A.currentTime : s(p, d, e.playingAsset, "timelinePos", "currentTime"), I = h - w, M = (T ? w : A.currentTime) + I; + if (M >= 0 && (!D || T || M <= D.duration)) { + A.currentTime = M; return; } } @@ -26269,31 +26337,31 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const w = v[d].start, I = h - w; D = v.start + I; } - const x = !e.isInterstitial(v); - if ((!e.isInterstitial(p) || p.event.appendInPlace) && (x || v.event.appendInPlace)) { + const A = !e.isInterstitial(v); + if ((!e.isInterstitial(p) || p.event.appendInPlace) && (A || v.event.appendInPlace)) { const w = e.media || (T ? _ == null ? void 0 : _.media : null); w && (w.currentTime = D); } else if (p) { const w = e.findItemIndex(p); if (y > w) { - const R = e.schedule.findJumpRestrictedIndex(w + 1, y); - if (R > w) { - e.setSchedulePosition(R); + const M = e.schedule.findJumpRestrictedIndex(w + 1, y); + if (M > w) { + e.setSchedulePosition(M); return; } } let I = 0; - if (x) + if (A) e.timelinePos = D, e.checkBuffer(); else { var S; - const R = v == null || (S = v.event) == null ? void 0 : S.assetList; - if (R) { - const M = h - (v[d] || v).start; - for (let P = R.length; P--; ) { - const K = R[P]; - if (K.duration && M >= K.startOffset && M < K.startOffset + K.duration) { - I = P; + const M = v == null || (S = v.event) == null ? void 0 : S.assetList; + if (M) { + const k = h - (v[d] || v).start; + for (let q = M.length; q--; ) { + const K = M[q]; + if (K.duration && k >= K.startOffset && k < K.startOffset + K.duration) { + I = q; break; } } @@ -26448,7 +26516,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo let r = this.media; !r && (e = this.bufferingItem) != null && (t = e.event) != null && t.appendInPlace && (r = this.primaryMedia); const a = (i = r) == null ? void 0 : i.currentTime; - if (!(a === void 0 || !Z(a))) + if (!(a === void 0 || !J(a))) return a; } get primaryMedia() { @@ -26472,7 +26540,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo return; } const r = e.transferMedia(); - this.log(`transfer MediaSource from ${e} ${Oe(r)}`), this.detachedData = r; + this.log(`transfer MediaSource from ${e} ${$e(r)}`), this.detachedData = r; } else t && s && (this.shouldPlay || (this.shouldPlay = !s.paused)); } transferMediaTo(e, t) { @@ -26491,7 +26559,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo c = "detached media"; if (!r) { if (l) - r = this.detachedData, this.log(`using detachedData: MediaSource ${Oe(r)}`); + r = this.detachedData, this.log(`using detachedData: MediaSource ${$e(r)}`); else if (!this.detachedData || a.media === t) { const f = this.playerQueue; f.length > 1 && f.forEach((m) => { @@ -26540,7 +26608,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } } advanceAfterAssetEnded(e, t, i) { - const s = ah(e, i); + const s = Dh(e, i); if (!e.isAssetPastPlayoutLimit(s)) this.setSchedulePosition(t, s); else { @@ -26575,7 +26643,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo if (d && h && (!this.eventItemsMatch(r, s) || t !== void 0 && h !== ((o = l.assetList) == null ? void 0 : o[t].identifier))) { var u; const f = l.findAssetIndex(c); - if (this.log(`INTERSTITIAL_ASSET_ENDED ${f + 1}/${l.assetList.length} ${nr(c)}`), this.endedAsset = c, this.playingAsset = null, this.hls.trigger(b.INTERSTITIAL_ASSET_ENDED, { + if (this.log(`INTERSTITIAL_ASSET_ENDED ${f + 1}/${l.assetList.length} ${gr(c)}`), this.endedAsset = c, this.playingAsset = null, this.hls.trigger(b.INTERSTITIAL_ASSET_ENDED, { asset: c, assetListIndex: f, event: l, @@ -26588,7 +26656,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } this.retreiveMediaSource(h, s), d.media && !((u = this.detachedData) != null && u.mediaSource) && d.detachMedia(); } - if (!this.eventItemsMatch(r, s) && (this.endedItem = r, this.playingItem = null, this.log(`INTERSTITIAL_ENDED ${l} ${Mn(r)}`), l.hasPlayed = !0, this.hls.trigger(b.INTERSTITIAL_ENDED, { + if (!this.eventItemsMatch(r, s) && (this.endedItem = r, this.playingItem = null, this.log(`INTERSTITIAL_ENDED ${l} ${qn(r)}`), l.hasPlayed = !0, this.hls.trigger(b.INTERSTITIAL_ENDED, { event: l, schedule: i.slice(0), scheduleIndex: e @@ -26614,7 +26682,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const l = a.event; if (i === void 0) { i = this.schedule.findAssetIndex(l, this.timelinePos); - const f = ah(l, i - 1); + const f = Dh(l, i - 1); if (l.isAssetPastPlayoutLimit(f)) { this.advanceAfterAssetEnded(l, e, i); return; @@ -26624,7 +26692,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const c = this.waitingItem; this.assetsBuffered(a, o) || this.setBufferingItem(a); let h = this.preloadAssets(l, i); - if (this.eventItemsMatch(a, c || s) || (this.waitingItem = a, this.log(`INTERSTITIAL_STARTED ${Mn(a)} ${l.appendInPlace ? "append in place" : ""}`), this.hls.trigger(b.INTERSTITIAL_STARTED, { + if (this.eventItemsMatch(a, c || s) || (this.waitingItem = a, this.log(`INTERSTITIAL_STARTED ${qn(a)} ${l.appendInPlace ? "append in place" : ""}`), this.hls.trigger(b.INTERSTITIAL_STARTED, { event: l, schedule: t.slice(0), scheduleIndex: e @@ -26649,8 +26717,8 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } if (!this.eventItemsMatch(a, this.bufferingItem) && l.appendInPlace && this.isAssetBuffered(d)) return; - this.startAssetPlayer(h, i, t, e, o), this.shouldPlay && f0(h.media); - } else a !== null ? (this.resumePrimary(a, e, s), this.shouldPlay && f0(this.hls.media)) : r && this.isInterstitial(s) && (this.endedItem = null, this.playingItem = s, s.event.appendInPlace || this.attachPrimary(this.schedule.durations.primary, null)); + this.startAssetPlayer(h, i, t, e, o), this.shouldPlay && k0(h.media); + } else a !== null ? (this.resumePrimary(a, e, s), this.shouldPlay && k0(this.hls.media)) : r && this.isInterstitial(s) && (this.endedItem = null, this.playingItem = s, s.event.appendInPlace || this.attachPrimary(this.schedule.durations.primary, null)); } get playbackDisabled() { return this.hls.config.enableInterstitialPlayback === !1; @@ -26665,14 +26733,14 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } resumePrimary(e, t, i) { var s; - if (this.playingItem = e, this.playingAsset = this.endedAsset = null, this.waitingItem = this.endedItem = null, this.bufferedToItem(e), this.log(`resuming ${Mn(e)}`), !((s = this.detachedData) != null && s.mediaSource)) { + if (this.playingItem = e, this.playingAsset = this.endedAsset = null, this.waitingItem = this.endedItem = null, this.bufferedToItem(e), this.log(`resuming ${qn(e)}`), !((s = this.detachedData) != null && s.mediaSource)) { let a = this.timelinePos; (a < e.start || a >= e.end) && (a = this.getPrimaryResumption(e, t), this.timelinePos = a), this.attachPrimary(a, e); } if (!i) return; const r = this.schedule.items; - r && (this.log(`INTERSTITIALS_PRIMARY_RESUMED ${Mn(e)}`), this.hls.trigger(b.INTERSTITIALS_PRIMARY_RESUMED, { + r && (this.log(`INTERSTITIALS_PRIMARY_RESUMED ${qn(e)}`), this.hls.trigger(b.INTERSTITIALS_PRIMARY_RESUMED, { schedule: r.slice(0), scheduleIndex: t }), this.checkBuffer()); @@ -26690,7 +26758,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } isAssetBuffered(e) { const t = this.getAssetPlayer(e.identifier); - return t != null && t.hls ? t.hls.bufferedToEnd : le.bufferInfo(this.primaryMedia, this.timelinePos, 0).end + 1 >= e.timelineStart + (e.duration || 0); + return t != null && t.hls ? t.hls.bufferedToEnd : ue.bufferInfo(this.primaryMedia, this.timelinePos, 0).end + 1 >= e.timelineStart + (e.duration || 0); } attachPrimary(e, t, i) { t ? this.setBufferingItem(t) : this.bufferingItem = this.playingItem, this.bufferingAsset = null; @@ -26712,7 +26780,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo onLevelUpdated(e, t) { if (t.level === -1) return; - const i = this.hls.levels[t.level], s = Le(Le({}, this.mediaSelection || this.altSelection), {}, { + const i = this.hls.levels[t.level], s = Ie(Ie({}, this.mediaSelection || this.altSelection), {}, { main: i }); this.mediaSelection = s, this.schedule.parseInterstitialDateRanges(s, this.hls.config.interstitialAppendInPlace), !this.effectivePlayingItem && this.schedule.items && this.checkStart(); @@ -26720,12 +26788,12 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo onAudioTrackUpdated(e, t) { const i = this.hls.audioTracks[t.id], s = this.mediaSelection; if (!s) { - this.altSelection = Le(Le({}, this.altSelection), {}, { + this.altSelection = Ie(Ie({}, this.altSelection), {}, { audio: i }); return; } - const r = Le(Le({}, s), {}, { + const r = Ie(Ie({}, s), {}, { audio: i }); this.mediaSelection = r; @@ -26733,22 +26801,22 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo onSubtitleTrackUpdated(e, t) { const i = this.hls.subtitleTracks[t.id], s = this.mediaSelection; if (!s) { - this.altSelection = Le(Le({}, this.altSelection), {}, { + this.altSelection = Ie(Ie({}, this.altSelection), {}, { subtitles: i }); return; } - const r = Le(Le({}, s), {}, { + const r = Ie(Ie({}, s), {}, { subtitles: i }); this.mediaSelection = r; } onAudioTrackSwitching(e, t) { - const i = Ap(t); + const i = Gp(t); this.playerQueue.forEach((s) => s.hls.setAudioOption(t) || s.hls.setAudioOption(i)); } onSubtitleTrackSwitch(e, t) { - const i = Ap(t); + const i = Gp(t); this.playerQueue.forEach((s) => s.hls.setSubtitleOption(t) || t.id !== -1 && s.hls.setSubtitleOption(i)); } onBufferCodecs(e, t) { @@ -26801,7 +26869,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo e.event.assetList.forEach((r, a) => { e.event.isAssetPastPlayoutLimit(a) && this.clearAssetPlayer(r.identifier, null); }); - const i = e.end + 0.25, s = le.bufferInfo(this.primaryMedia, i, 0); + const i = e.end + 0.25, s = ue.bufferInfo(this.primaryMedia, i, 0); (s.end > i || (s.nextStart || 0) > i) && (this.attachPrimary(i, null), this.flushFrontBuffer(i)); } } @@ -26824,7 +26892,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const t = this.schedule.items; if (!t) return; - const i = le.bufferInfo(this.primaryMedia, this.timelinePos, 0); + const i = ue.bufferInfo(this.primaryMedia, this.timelinePos, 0); e && (this.bufferedPos = this.timelinePos), e || (e = i.len < 1), this.updateBufferedPos(i.end, t, e); } updateBufferedPos(e, t, i) { @@ -26870,7 +26938,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const a = this.isInterstitial(e), o = this.getBufferingPlayer(); this.bufferingItem = e, this.bufferedPos = Math.max(e.start, Math.min(e.end, this.timelinePos)); const u = o ? o.remaining : t ? t.end - this.timelinePos : 0; - this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${Mn(e)}` + (t ? ` (${u.toFixed(2)} remaining)` : "")), this.playbackDisabled || (a ? e.event.assetList.forEach((l) => { + this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${qn(e)}` + (t ? ` (${u.toFixed(2)} remaining)` : "")), this.playbackDisabled || (a ? e.event.assetList.forEach((l) => { const c = this.getAssetPlayer(l.identifier); c && c.resumeBuffering(); }) : (this.hls.resumeBuffering(), this.playerQueue.forEach((l) => l.pauseBuffering()))), this.hls.trigger(b.INTERSTITIALS_BUFFERED_TO_BOUNDARY, { @@ -26974,7 +27042,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo createAsset(e, t, i, s, r, a) { const o = { parentIdentifier: e.identifier, - identifier: s2(e, a, t), + identifier: w2(e, a, t), duration: r, startOffset: i, timelineStart: s, @@ -26986,7 +27054,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const s = this.hls, r = s.userConfig; let a = r.videoPreference; const o = s.loadLevelObj || s.levels[s.currentLevel]; - (a || o) && (a = De({}, a), o.videoCodec && (a.videoCodec = o.videoCodec), o.videoRange && (a.allowedVideoRanges = [o.videoRange])); + (a || o) && (a = we({}, a), o.videoCodec && (a.videoCodec = o.videoCodec), o.videoRange && (a.allowedVideoRanges = [o.videoRange])); const u = s.audioTracks[s.audioTrack], l = s.subtitleTracks[s.subtitleTrack]; let c = 0; if (this.primaryLive || e.appendInPlace) { @@ -26996,7 +27064,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo E && _ < E && (c = _); } } - const h = t.identifier, d = Le(Le({}, r), {}, { + const h = t.identifier, d = Ie(Ie({}, r), {}, { autoStartLoad: !0, startFragPrefetch: !0, primarySessionId: s.sessionId, @@ -27012,20 +27080,20 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo }); e.appendInPlace && (e.appendInPlaceStarted = !0, t.timelineStart && (d.timelineOffset = t.timelineStart)); const f = d.cmcd; - f != null && f.sessionId && f.contentId && (d.cmcd = De({}, f, { - contentId: wa(t.uri) + f != null && f.sessionId && f.contentId && (d.cmcd = we({}, f, { + contentId: Ba(t.uri) })), this.getAssetPlayer(h) && this.warn(`Duplicate date range identifier ${e} and asset ${h}`); - const m = new o2(this.HlsPlayerClass, d, e, t); + const m = new k2(this.HlsPlayerClass, d, e, t); this.playerQueue.push(m), e.assetList[i] = t; const g = (_) => { if (_.live) { - const A = new Error(`Interstitials MUST be VOD assets ${e}`), S = { + const x = new Error(`Interstitials MUST be VOD assets ${e}`), S = { fatal: !0, - type: ie.OTHER_ERROR, - details: O.INTERSTITIAL_ASSET_ITEM_ERROR, - error: A + type: ne.OTHER_ERROR, + details: P.INTERSTITIAL_ASSET_ITEM_ERROR, + error: x }; - this.handleAssetItemError(S, e, this.schedule.findEventIndex(e.identifier), i, A.message); + this.handleAssetItemError(S, e, this.schedule.findEventIndex(e.identifier), i, x.message); return; } const E = _.edge - _.fragmentStart, T = t.duration; @@ -27040,8 +27108,8 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const T = this.getAssetPlayer(h); if (T && E.tracks) { T.off(b.BUFFER_CODECS, p), T.tracks = E.tracks; - const A = this.primaryMedia; - this.bufferingAsset === T.assetItem && A && !T.media && this.bufferAssetPlayer(T, A); + const x = this.primaryMedia; + this.bufferingAsset === T.assetItem && x && !T.media && this.bufferAssetPlayer(T, x); } }; m.on(b.BUFFER_CODECS, p); @@ -27050,11 +27118,11 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo const E = this.getAssetPlayer(h); if (this.log(`buffered to end of asset ${E}`), !E) return; - const T = this.schedule.findEventIndex(e.identifier), A = (_ = this.schedule.items) == null ? void 0 : _[T]; - if (this.isInterstitial(A)) { - const D = e.findAssetIndex(t), x = ah(e, D); - if (!e.isAssetPastPlayoutLimit(x)) - this.bufferedToItem(A, x); + const T = this.schedule.findEventIndex(e.identifier), x = (_ = this.schedule.items) == null ? void 0 : _[T]; + if (this.isInterstitial(x)) { + const D = e.findAssetIndex(t), A = Dh(e, D); + if (!e.isAssetPastPlayoutLimit(A)) + this.bufferedToItem(x, A); else { var S; const w = (S = this.schedule.items) == null ? void 0 : S[T + 1]; @@ -27072,10 +27140,10 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo }; return m.once(b.MEDIA_ENDED, v(i)), m.once(b.PLAYOUT_LIMIT_REACHED, v(1 / 0)), m.on(b.ERROR, (_, E) => { const T = this.getAssetPlayer(h); - if (E.details === O.BUFFER_STALLED_ERROR) { + if (E.details === P.BUFFER_STALLED_ERROR) { if (T != null && T.media) { - const A = T.currentTime, S = T.duration - A; - A && e.appendInPlace && S / T.media.playbackRate < 0.5 ? (this.log(`Advancing buffer past end of asset ${h} ${e} at ${T.media.currentTime}`), y()) : (this.warn(`Stalled at ${A} of ${A + S} in asset ${h} ${e}`), this.onTimeupdate(), this.checkBuffer(!0)); + const x = T.currentTime, S = T.duration - x; + x && e.appendInPlace && S / T.media.playbackRate < 0.5 ? (this.log(`Advancing buffer past end of asset ${h} ${e} at ${T.media.currentTime}`), y()) : (this.warn(`Stalled at ${x} of ${x + S} in asset ${h} ${e}`), this.onTimeupdate(), this.checkBuffer(!0)); } return; } @@ -27085,12 +27153,12 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo return; const E = new Error(`Asset player destroyed unexpectedly ${h}`), T = { fatal: !0, - type: ie.OTHER_ERROR, - details: O.INTERSTITIAL_ASSET_ITEM_ERROR, + type: ne.OTHER_ERROR, + details: P.INTERSTITIAL_ASSET_ITEM_ERROR, error: E }; this.handleAssetItemError(T, e, this.schedule.findEventIndex(e.identifier), i, E.message); - }), this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${nr(t)}`), this.hls.trigger(b.INTERSTITIAL_ASSET_PLAYER_CREATED, { + }), this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${gr(t)}`), this.hls.trigger(b.INTERSTITIAL_ASSET_PLAYER_CREATED, { asset: t, assetListIndex: i, event: e, @@ -27113,7 +27181,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo clearAssetPlayer(e, t) { const i = this.getAssetPlayerQueueIndex(e); if (i !== -1) { - this.log(`clear asset player "${e}" toSegment: ${t && Mn(t)}`); + this.log(`clear asset player "${e}" toSegment: ${t && qn(t)}`); const s = this.playerQueue[i]; this.transferMediaFromPlayer(s, t), this.playerQueue.splice(i, 1), s.destroy(); } @@ -27130,7 +27198,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo assetItem: o, assetId: u } = e, l = a.assetList.length, c = this.playingAsset; - this.endedAsset = null, this.playingAsset = o, (!c || c.identifier !== u) && (c && (this.clearAssetPlayer(c.identifier, i[s]), delete c.error), this.log(`INTERSTITIAL_ASSET_STARTED ${t + 1}/${l} ${nr(o)}`), this.hls.trigger(b.INTERSTITIAL_ASSET_STARTED, { + this.endedAsset = null, this.playingAsset = o, (!c || c.identifier !== u) && (c && (this.clearAssetPlayer(c.identifier, i[s]), delete c.error), this.log(`INTERSTITIAL_ASSET_STARTED ${t + 1}/${l} ${gr(o)}`), this.hls.trigger(b.INTERSTITIAL_ASSET_STARTED, { asset: o, assetListIndex: t, event: a, @@ -27158,11 +27226,11 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo if (c && a !== this.playingAsset) { if (!e.tracks) return; - if (h && !ry(h, e.tracks)) { - const d = new Error(`Asset ${nr(a)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(h)}')`), f = { + if (h && !by(h, e.tracks)) { + const d = new Error(`Asset ${gr(a)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(h)}')`), f = { fatal: !0, - type: ie.OTHER_ERROR, - details: O.INTERSTITIAL_ASSET_ITEM_ERROR, + type: ne.OTHER_ERROR, + details: P.INTERSTITIAL_ASSET_ITEM_ERROR, error: d }, m = r.findAssetIndex(a); this.handleAssetItemError(f, r, o, m, d.message); @@ -27172,13 +27240,13 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo this.transferMediaTo(e, t); } handleAssetItemError(e, t, i, s, r) { - if (e.details === O.BUFFER_STALLED_ERROR) + if (e.details === P.BUFFER_STALLED_ERROR) return; const a = t.assetList[s]; - this.warn(`INTERSTITIAL_ASSET_ERROR ${a && nr(a)} ${e.error}`); - const o = a == null ? void 0 : a.identifier, u = this.getAssetPlayerQueueIndex(o), l = this.playerQueue[u] || null, c = this.schedule.items, h = De({}, e, { + this.warn(`INTERSTITIAL_ASSET_ERROR ${a && gr(a)} ${e.error}`); + const o = a == null ? void 0 : a.identifier, u = this.getAssetPlayerQueueIndex(o), l = this.playerQueue[u] || null, c = this.schedule.items, h = we({}, e, { fatal: !1, - errorAction: $a(!0), + errorAction: Ya(!0), asset: a, assetListIndex: s, event: t, @@ -27201,7 +27269,7 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo primaryFallback(e) { const t = e.timelineStart, i = this.effectivePlayingItem; if (this.updateSchedule(), i) { - this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${i ? Mn(i) : " "} error: ${e.error}`); + this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${i ? qn(i) : " "} error: ${e.error}`); let s = this.timelinePos; s === -1 && (s = this.hls.startPosition); const r = this.updateItem(i, s); @@ -27244,24 +27312,24 @@ Schedule: ${u.map((m) => Mn(m))} pos: ${this.timelinePos}`), c.length && this.lo } onError(e, t) { switch (t.details) { - case O.ASSET_LIST_PARSING_ERROR: - case O.ASSET_LIST_LOAD_ERROR: - case O.ASSET_LIST_LOAD_TIMEOUT: { + case P.ASSET_LIST_PARSING_ERROR: + case P.ASSET_LIST_LOAD_ERROR: + case P.ASSET_LIST_LOAD_TIMEOUT: { const i = t.interstitial; i && this.primaryFallback(i); break; } - case O.BUFFER_STALLED_ERROR: { + case P.BUFFER_STALLED_ERROR: { this.onTimeupdate(), this.checkBuffer(!0); break; } } } } -const m0 = 500; -class h2 extends pf { +const R0 = 500; +class P2 extends $f { constructor(e, t, i) { - super(e, t, i, "subtitle-stream-controller", J.SUBTITLE), this.currentTrackId = -1, this.tracksBuffered = [], this.mainDetails = null, this.registerListeners(); + super(e, t, i, "subtitle-stream-controller", te.SUBTITLE), this.currentTrackId = -1, this.tracksBuffered = [], this.mainDetails = null, this.registerListeners(); } onHandlerDestroying() { this.unregisterListeners(), super.onHandlerDestroying(), this.mainDetails = null; @@ -27281,7 +27349,7 @@ class h2 extends pf { e.off(b.LEVEL_LOADED, this.onLevelLoaded, this), e.off(b.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.off(b.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this), e.off(b.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this), e.off(b.SUBTITLE_FRAG_PROCESSED, this.onSubtitleFragProcessed, this), e.off(b.BUFFER_FLUSHING, this.onBufferFlushing, this); } startLoad(e, t) { - this.stopLoad(), this.state = V.IDLE, this.setInterval(m0), this.nextLoadPosition = this.lastCurrentTime = e + this.timelineOffset, this.startPosition = t ? -1 : e, this.tick(); + this.stopLoad(), this.state = V.IDLE, this.setInterval(R0), this.nextLoadPosition = this.lastCurrentTime = e + this.timelineOffset, this.startPosition = t ? -1 : e, this.tick(); } onManifestLoading() { super.onManifestLoading(), this.mainDetails = null; @@ -27297,7 +27365,7 @@ class h2 extends pf { frag: i, success: s } = t; - if (this.fragContextChanged(i) || (Ye(i) && (this.fragPrevious = i), this.state = V.IDLE), !s) + if (this.fragContextChanged(i) || (Ze(i) && (this.fragPrevious = i), this.state = V.IDLE), !s) return; const r = this.tracksBuffered[this.currentTrackId]; if (!r) @@ -27335,26 +27403,26 @@ class h2 extends pf { break; o++; } - }), this.fragmentTracker.removeFragmentsInRange(i, r, J.SUBTITLE); + }), this.fragmentTracker.removeFragmentsInRange(i, r, te.SUBTITLE); } } // If something goes wrong, proceed to next frag, if we were processing one. onError(e, t) { const i = t.frag; - (i == null ? void 0 : i.type) === J.SUBTITLE && (t.details === O.FRAG_GAP && this.fragmentTracker.fragBuffered(i, !0), this.fragCurrent && this.fragCurrent.abortRequests(), this.state !== V.STOPPED && (this.state = V.IDLE)); + (i == null ? void 0 : i.type) === te.SUBTITLE && (t.details === P.FRAG_GAP && this.fragmentTracker.fragBuffered(i, !0), this.fragCurrent && this.fragCurrent.abortRequests(), this.state !== V.STOPPED && (this.state = V.IDLE)); } // Got all new subtitle levels. onSubtitleTracksUpdated(e, { subtitleTracks: t }) { - if (this.levels && iE(this.levels, t)) { - this.levels = t.map((i) => new Ma(i)); + if (this.levels && vE(this.levels, t)) { + this.levels = t.map((i) => new Wa(i)); return; } this.tracksBuffered = [], this.levels = t.map((i) => { - const s = new Ma(i); + const s = new Wa(i); return this.tracksBuffered[s.id] = [], s; - }), this.fragmentTracker.removeFragmentsInRange(0, Number.POSITIVE_INFINITY, J.SUBTITLE), this.fragPrevious = null, this.mediaBuffer = null; + }), this.fragmentTracker.removeFragmentsInRange(0, Number.POSITIVE_INFINITY, te.SUBTITLE), this.fragPrevious = null, this.mediaBuffer = null; } onSubtitleTrackSwitch(e, t) { var i; @@ -27363,7 +27431,7 @@ class h2 extends pf { return; } const s = this.levels[this.currentTrackId]; - s != null && s.details ? this.mediaBuffer = this.mediaBufferTimeRanges : this.mediaBuffer = null, s && this.state !== V.STOPPED && this.setInterval(m0); + s != null && s.details ? this.mediaBuffer = this.mediaBufferTimeRanges : this.mediaBuffer = null, s && this.state !== V.STOPPED && this.setInterval(R0); } // Got a new set of subtitle fragments. onSubtitleTrackLoaded(e, t) { @@ -27394,10 +27462,10 @@ class h2 extends pf { } const d = h.fragments[0]; if (!u.details) - a.hasProgramDateTime && h.hasProgramDateTime ? (ql(a, h), l = a.fragmentStart) : d && (l = d.start, fd(a, l)); + a.hasProgramDateTime && h.hasProgramDateTime ? (lu(a, h), l = a.fragmentStart) : d && (l = d.start, Pd(a, l)); else { var c; - l = this.alignPlaylists(a, u.details, (c = this.levelLastLoaded) == null ? void 0 : c.details), l === 0 && d && (l = d.start, fd(a, l)); + l = this.alignPlaylists(a, u.details, (c = this.levelLastLoaded) == null ? void 0 : c.details), l === 0 && d && (l = d.start, Pd(a, l)); } h && !this.startFragRequested && this.setStartPosition(h, l); } @@ -27405,19 +27473,19 @@ class h2 extends pf { details: a, id: o, groupId: t.groupId - }), this.tick(), a.live && !this.fragCurrent && this.media && this.state === V.IDLE && (ws(null, a.fragments, this.media.currentTime, 0) || (this.warn("Subtitle playlist not aligned with playback"), u.details = void 0))); + }), this.tick(), a.live && !this.fragCurrent && this.media && this.state === V.IDLE && (Bs(null, a.fragments, this.media.currentTime, 0) || (this.warn("Subtitle playlist not aligned with playback"), u.details = void 0))); } _handleFragmentLoadComplete(e) { const { frag: t, payload: i } = e, s = t.decryptdata, r = this.hls; - if (!this.fragContextChanged(t) && i && i.byteLength > 0 && s != null && s.key && s.iv && fr(s.method)) { + if (!this.fragContextChanged(t) && i && i.byteLength > 0 && s != null && s.key && s.iv && xr(s.method)) { const a = performance.now(); - this.decrypter.decrypt(new Uint8Array(i), s.key.buffer, s.iv.buffer, gf(s.method)).catch((o) => { + this.decrypter.decrypt(new Uint8Array(i), s.key.buffer, s.iv.buffer, Mf(s.method)).catch((o) => { throw r.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.FRAG_DECRYPT_ERROR, + type: ne.MEDIA_ERROR, + details: P.FRAG_DECRYPT_ERROR, fatal: !1, error: o, reason: o.message, @@ -27452,7 +27520,7 @@ class h2 extends pf { return; const { config: s - } = this, r = this.getLoadPosition(), a = le.bufferedInfo(this.tracksBuffered[this.currentTrackId] || [], r, s.maxBufferHole), { + } = this, r = this.getLoadPosition(), a = ue.bufferedInfo(this.tracksBuffered[this.currentTrackId] || [], r, s.maxBufferHole), { end: o, len: u } = a, l = i.details, c = this.hls.maxBufferLength + l.levelTargetDuration; @@ -27463,26 +27531,26 @@ class h2 extends pf { const g = this.fragPrevious; if (o < f) { const v = s.maxFragLookUpTolerance, _ = o > f - v ? 0 : v; - m = ws(g, h, Math.max(h[0].start, o), _), !m && g && g.start < h[0].start && (m = h[0]); + m = Bs(g, h, Math.max(h[0].start, o), _), !m && g && g.start < h[0].start && (m = h[0]); } else m = h[d - 1]; if (m = this.filterReplacedPrimary(m, i.details), !m) return; const p = m.sn - l.startSN, y = h[p - 1]; - if (y && y.cc === m.cc && this.fragmentTracker.getState(y) === Ze.NOT_LOADED && (m = y), this.fragmentTracker.getState(m) === Ze.NOT_LOADED) { + if (y && y.cc === m.cc && this.fragmentTracker.getState(y) === nt.NOT_LOADED && (m = y), this.fragmentTracker.getState(m) === nt.NOT_LOADED) { const v = this.mapToInitFragWhenRequired(m); v && this.loadFragment(v, i, o); } } } loadFragment(e, t, i) { - Ye(e) ? super.loadFragment(e, t, i) : this._loadInitSegment(e, t); + Ze(e) ? super.loadFragment(e, t, i) : this._loadInitSegment(e, t); } get mediaBufferTimeRanges() { - return new d2(this.tracksBuffered[this.currentTrackId] || []); + return new O2(this.tracksBuffered[this.currentTrackId] || []); } } -class d2 { +class O2 { constructor(e) { this.buffered = void 0; const t = (i, s, r) => { @@ -27503,7 +27571,7 @@ class d2 { }; } } -const f2 = { +const M2 = { 42: 225, // lowercase a, acute accent 92: 233, @@ -27691,7 +27759,7 @@ const f2 = { // Box drawings heavy up and right 207: 9499 // Box drawings heavy up and left -}, fE = (n) => String.fromCharCode(f2[n] || n), yi = 15, pn = 100, m2 = { +}, IE = (n) => String.fromCharCode(M2[n] || n), Ii = 15, yn = 100, $2 = { 17: 1, 18: 3, 21: 5, @@ -27700,7 +27768,7 @@ const f2 = { 16: 11, 19: 12, 20: 14 -}, g2 = { +}, B2 = { 17: 2, 18: 4, 21: 6, @@ -27708,7 +27776,7 @@ const f2 = { 23: 10, 19: 13, 20: 15 -}, p2 = { +}, N2 = { 25: 1, 26: 3, 29: 5, @@ -27717,7 +27785,7 @@ const f2 = { 24: 11, 27: 12, 28: 14 -}, _2 = { +}, U2 = { 25: 2, 26: 4, 29: 6, @@ -27725,25 +27793,25 @@ const f2 = { 31: 10, 27: 13, 28: 15 -}, v2 = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "black", "transparent"]; -class y2 { +}, G2 = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "black", "transparent"]; +class H2 { constructor() { this.time = null, this.verboseLevel = 0; } log(e, t) { if (this.verboseLevel >= e) { const i = typeof t == "function" ? t() : t; - Ee.log(`${this.time} [${e}] ${i}`); + Te.log(`${this.time} [${e}] ${i}`); } } } -const os = function(e) { +const fs = function(e) { const t = []; for (let i = 0; i < e.length; i++) t.push(e[i].toString(16)); return t; }; -class mE { +class kE { constructor() { this.foreground = "white", this.underline = !1, this.italics = !1, this.background = "black", this.flash = !1; } @@ -27770,9 +27838,9 @@ class mE { return "color=" + this.foreground + ", underline=" + this.underline + ", italics=" + this.italics + ", background=" + this.background + ", flash=" + this.flash; } } -class E2 { +class V2 { constructor() { - this.uchar = " ", this.penState = new mE(); + this.uchar = " ", this.penState = new kE(); } reset() { this.uchar = " ", this.penState.reset(); @@ -27793,26 +27861,26 @@ class E2 { return this.uchar === " " && this.penState.isDefault(); } } -class b2 { +class q2 { constructor(e) { - this.chars = [], this.pos = 0, this.currPenState = new mE(), this.cueStartTime = null, this.logger = void 0; - for (let t = 0; t < pn; t++) - this.chars.push(new E2()); + this.chars = [], this.pos = 0, this.currPenState = new kE(), this.cueStartTime = null, this.logger = void 0; + for (let t = 0; t < yn; t++) + this.chars.push(new V2()); this.logger = e; } equals(e) { - for (let t = 0; t < pn; t++) + for (let t = 0; t < yn; t++) if (!this.chars[t].equals(e.chars[t])) return !1; return !0; } copy(e) { - for (let t = 0; t < pn; t++) + for (let t = 0; t < yn; t++) this.chars[t].copy(e.chars[t]); } isEmpty() { let e = !0; - for (let t = 0; t < pn; t++) + for (let t = 0; t < yn; t++) if (!this.chars[t].isEmpty()) { e = !1; break; @@ -27823,7 +27891,7 @@ class b2 { * Set the cursor to a valid column. */ setCursor(e) { - this.pos !== e && (this.pos = e), this.pos < 0 ? (this.logger.log(3, "Negative cursor position " + this.pos), this.pos = 0) : this.pos > pn && (this.logger.log(3, "Too large cursor position " + this.pos), this.pos = pn); + this.pos !== e && (this.pos = e), this.pos < 0 ? (this.logger.log(3, "Negative cursor position " + this.pos), this.pos = 0) : this.pos > yn && (this.logger.log(3, "Too large cursor position " + this.pos), this.pos = yn); } /** * Move the cursor relative to current position. @@ -27843,8 +27911,8 @@ class b2 { } insertChar(e) { e >= 144 && this.backSpace(); - const t = fE(e); - if (this.pos >= pn) { + const t = IE(e); + if (this.pos >= yn) { this.logger.log(0, () => "Cannot insert " + e.toString(16) + " (" + t + ") at position " + this.pos + ". Skipping it!"); return; } @@ -27852,7 +27920,7 @@ class b2 { } clearFromPos(e) { let t; - for (t = e; t < pn; t++) + for (t = e; t < yn; t++) this.chars[t].reset(); } clear() { @@ -27864,7 +27932,7 @@ class b2 { getTextString() { const e = []; let t = !0; - for (let i = 0; i < pn; i++) { + for (let i = 0; i < yn; i++) { const s = this.chars[i].uchar; s !== " " && (t = !1), e.push(s); } @@ -27874,21 +27942,21 @@ class b2 { this.currPenState.setStyles(e), this.chars[this.pos].setPenState(this.currPenState); } } -class oh { +class wh { constructor(e) { - this.rows = [], this.currRow = yi - 1, this.nrRollUpRows = null, this.lastOutputScreen = null, this.logger = void 0; - for (let t = 0; t < yi; t++) - this.rows.push(new b2(e)); + this.rows = [], this.currRow = Ii - 1, this.nrRollUpRows = null, this.lastOutputScreen = null, this.logger = void 0; + for (let t = 0; t < Ii; t++) + this.rows.push(new q2(e)); this.logger = e; } reset() { - for (let e = 0; e < yi; e++) + for (let e = 0; e < Ii; e++) this.rows[e].clear(); - this.currRow = yi - 1; + this.currRow = Ii - 1; } equals(e) { let t = !0; - for (let i = 0; i < yi; i++) + for (let i = 0; i < Ii; i++) if (!this.rows[i].equals(e.rows[i])) { t = !1; break; @@ -27896,12 +27964,12 @@ class oh { return t; } copy(e) { - for (let t = 0; t < yi; t++) + for (let t = 0; t < Ii; t++) this.rows[t].copy(e.rows[t]); } isEmpty() { let e = !0; - for (let t = 0; t < yi; t++) + for (let t = 0; t < Ii; t++) if (!this.rows[t].isEmpty()) { e = !1; break; @@ -27930,10 +27998,10 @@ class oh { this.logger.log(2, "setCursor: " + e), this.rows[this.currRow].setCursor(e); } setPAC(e) { - this.logger.log(2, () => "pacData = " + Oe(e)); + this.logger.log(2, () => "pacData = " + $e(e)); let t = e.row - 1; if (this.nrRollUpRows && t < this.nrRollUpRows - 1 && (t = this.nrRollUpRows - 1), this.nrRollUpRows && this.currRow !== t) { - for (let o = 0; o < yi; o++) + for (let o = 0; o < Ii; o++) this.rows[o].clear(); const r = this.currRow + 1 - this.nrRollUpRows, a = this.lastOutputScreen; if (a) { @@ -27962,7 +28030,7 @@ class oh { * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility). */ setBkgData(e) { - this.logger.log(2, () => "bkgData = " + Oe(e)), this.backSpace(), this.setPen(e), this.insertChar(32); + this.logger.log(2, () => "bkgData = " + $e(e)), this.backSpace(), this.setPen(e), this.insertChar(32); } setRollUpRows(e) { this.nrRollUpRows = e; @@ -27983,7 +28051,7 @@ class oh { e = e || !1; const t = []; let i = "", s = -1; - for (let r = 0; r < yi; r++) { + for (let r = 0; r < Ii; r++) { const a = this.rows[r].getTextString(); a && (s = r + 1, e ? t.push("Row " + s + ": '" + a + "'") : t.push(a.trim())); } @@ -27994,12 +28062,12 @@ class oh { return this.rows; } } -class g0 { +class C0 { constructor(e, t, i) { - this.chNr = void 0, this.outputFilter = void 0, this.mode = void 0, this.verbose = void 0, this.displayedMemory = void 0, this.nonDisplayedMemory = void 0, this.lastOutputScreen = void 0, this.currRollUpRow = void 0, this.writeScreen = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chNr = e, this.outputFilter = t, this.mode = null, this.verbose = 0, this.displayedMemory = new oh(i), this.nonDisplayedMemory = new oh(i), this.lastOutputScreen = new oh(i), this.currRollUpRow = this.displayedMemory.rows[yi - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null, this.logger = i; + this.chNr = void 0, this.outputFilter = void 0, this.mode = void 0, this.verbose = void 0, this.displayedMemory = void 0, this.nonDisplayedMemory = void 0, this.lastOutputScreen = void 0, this.currRollUpRow = void 0, this.writeScreen = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chNr = e, this.outputFilter = t, this.mode = null, this.verbose = 0, this.displayedMemory = new wh(i), this.nonDisplayedMemory = new wh(i), this.lastOutputScreen = new wh(i), this.currRollUpRow = this.displayedMemory.rows[Ii - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null, this.logger = i; } reset() { - this.mode = null, this.displayedMemory.reset(), this.nonDisplayedMemory.reset(), this.lastOutputScreen.reset(), this.outputFilter.reset(), this.currRollUpRow = this.displayedMemory.rows[yi - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null; + this.mode = null, this.displayedMemory.reset(), this.nonDisplayedMemory.reset(), this.lastOutputScreen.reset(), this.outputFilter.reset(), this.currRollUpRow = this.displayedMemory.rows[Ii - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null; } getHandler() { return this.outputFilter; @@ -28081,7 +28149,7 @@ class g0 { const i = Math.floor(e / 2) - 16, s = ["white", "green", "blue", "cyan", "red", "yellow", "magenta"]; t.foreground = s[i]; } - this.logger.log(2, "MIDROW: " + Oe(t)), this.writeScreen.setPen(t); + this.logger.log(2, "MIDROW: " + $e(t)), this.writeScreen.setPen(t); } outputDataUpdate(e = !1) { const t = this.logger.time; @@ -28091,11 +28159,11 @@ class g0 { this.outputFilter && (this.displayedMemory.isEmpty() || (this.outputFilter.newCue && this.outputFilter.newCue(this.cueStartTime, e, this.displayedMemory), this.cueStartTime = e)); } } -class p0 { +class F0 { constructor(e, t, i) { - this.channels = void 0, this.currentChannel = 0, this.cmdHistory = S2(), this.logger = void 0; - const s = this.logger = new y2(); - this.channels = [null, new g0(e, t, s), new g0(e + 1, i, s)]; + this.channels = void 0, this.currentChannel = 0, this.cmdHistory = j2(), this.logger = void 0; + const s = this.logger = new H2(); + this.channels = [null, new C0(e, t, s), new C0(e + 1, i, s)]; } getHandler(e) { return this.channels[e].getHandler(); @@ -28113,21 +28181,21 @@ class p0 { let a = !1, o = null; if (s === 0 && r === 0) continue; - this.logger.log(3, () => "[" + os([t[i], t[i + 1]]) + "] -> (" + os([s, r]) + ")"); + this.logger.log(3, () => "[" + fs([t[i], t[i + 1]]) + "] -> (" + fs([s, r]) + ")"); const u = this.cmdHistory; if (s >= 16 && s <= 31) { - if (T2(s, r, u)) { - Wo(null, null, u), this.logger.log(3, () => "Repeated command (" + os([s, r]) + ") is dropped"); + if (K2(s, r, u)) { + fl(null, null, u), this.logger.log(3, () => "Repeated command (" + fs([s, r]) + ") is dropped"); continue; } - Wo(s, r, this.cmdHistory), a = this.parseCmd(s, r), a || (a = this.parseMidrow(s, r)), a || (a = this.parsePAC(s, r)), a || (a = this.parseBackgroundAttributes(s, r)); + fl(s, r, this.cmdHistory), a = this.parseCmd(s, r), a || (a = this.parseMidrow(s, r)), a || (a = this.parsePAC(s, r)), a || (a = this.parseBackgroundAttributes(s, r)); } else - Wo(null, null, u); + fl(null, null, u); if (!a && (o = this.parseChars(s, r), o)) { const c = this.currentChannel; c && c > 0 ? this.channels[c].insertChars(o) : this.logger.log(2, "No channel found yet. TEXT-MODE?"); } - !a && !o && this.logger.log(2, () => "Couldn't parse cleaned data " + os([s, r]) + " orig: " + os([t[i], t[i + 1]])); + !a && !o && this.logger.log(2, () => "Couldn't parse cleaned data " + fs([s, r]) + " orig: " + fs([t[i], t[i + 1]])); } } /** @@ -28150,7 +28218,7 @@ class p0 { if (e === 17 ? i = 1 : i = 2, i !== this.currentChannel) return this.logger.log(0, "Mismatch channel in midrow parsing"), !1; const s = this.channels[i]; - return s ? (s.ccMIDROW(t), this.logger.log(3, () => "MIDROW (" + os([e, t]) + ")"), !0) : !1; + return s ? (s.ccMIDROW(t), this.logger.log(3, () => "MIDROW (" + fs([e, t]) + ")"), !0) : !1; } return !1; } @@ -28164,7 +28232,7 @@ class p0 { if (!(s || r)) return !1; const a = e <= 23 ? 1 : 2; - t >= 64 && t <= 95 ? i = a === 1 ? m2[e] : p2[e] : i = a === 1 ? g2[e] : _2[e]; + t >= 64 && t <= 95 ? i = a === 1 ? $2[e] : N2[e] : i = a === 1 ? B2[e] : U2[e]; const o = this.channels[a]; return o ? (o.setPAC(this.interpretPAC(i, t)), this.currentChannel = a, !0) : !1; } @@ -28191,9 +28259,9 @@ class p0 { let i, s = null, r = null; if (e >= 25 ? (i = 2, r = e - 8) : (i = 1, r = e), r >= 17 && r <= 19) { let a; - r === 17 ? a = t + 80 : r === 18 ? a = t + 112 : a = t + 144, this.logger.log(2, () => "Special char '" + fE(a) + "' in channel " + i), s = [a]; + r === 17 ? a = t + 80 : r === 18 ? a = t + 112 : a = t + 144, this.logger.log(2, () => "Special char '" + IE(a) + "' in channel " + i), s = [a]; } else e >= 32 && e <= 127 && (s = t === 0 ? [e] : [e, t]); - return s && this.logger.log(3, () => "Char codes = " + os(s).join(",")), s; + return s && this.logger.log(3, () => "Char codes = " + fs(s).join(",")), s; } /** * Parse extended background attributes as well as new foreground color black. @@ -28205,7 +28273,7 @@ class p0 { return !1; let r; const a = {}; - e === 16 || e === 24 ? (r = Math.floor((t - 32) / 2), a.background = v2[r], t % 2 === 1 && (a.background = a.background + "_semi")) : t === 45 ? a.background = "transparent" : (a.foreground = "black", t === 47 && (a.underline = !0)); + e === 16 || e === 24 ? (r = Math.floor((t - 32) / 2), a.background = G2[r], t % 2 === 1 && (a.background = a.background + "_semi")) : t === 45 ? a.background = "transparent" : (a.foreground = "black", t === 47 && (a.underline = !0)); const o = e <= 23 ? 1 : 2; return this.channels[o].setBkgData(a), !0; } @@ -28217,7 +28285,7 @@ class p0 { const t = this.channels[e]; t && t.reset(); } - Wo(null, null, this.cmdHistory); + fl(null, null, this.cmdHistory); } /** * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty. @@ -28229,20 +28297,20 @@ class p0 { } } } -function Wo(n, e, t) { +function fl(n, e, t) { t.a = n, t.b = e; } -function T2(n, e, t) { +function K2(n, e, t) { return t.a === n && t.b === e; } -function S2() { +function j2() { return { a: null, b: null }; } -var wf = function() { - if (Vl != null && Vl.VTTCue) +var Wf = function() { + if (ou != null && ou.VTTCue) return self.VTTCue; const n = ["", "lr", "rl"], e = ["start", "middle", "end", "left", "right"]; function t(o, u) { @@ -28271,7 +28339,7 @@ var wf = function() { enumerable: !0 }; c.hasBeenReset = !1; - let d = "", f = !1, m = o, g = u, p = l, y = null, v = "", _ = !0, E = "auto", T = "start", A = 50, S = "middle", D = 50, x = "middle"; + let d = "", f = !1, m = o, g = u, p = l, y = null, v = "", _ = !0, E = "auto", T = "start", x = 50, S = "middle", D = 50, A = "middle"; Object.defineProperty(c, "id", r({}, h, { get: function() { return d; @@ -28356,12 +28424,12 @@ var wf = function() { } })), Object.defineProperty(c, "position", r({}, h, { get: function() { - return A; + return x; }, set: function(w) { if (w < 0 || w > 100) throw new Error("Position must be between 0 and 100."); - A = w, this.hasBeenReset = !0; + x = w, this.hasBeenReset = !0; } })), Object.defineProperty(c, "positionAlign", r({}, h, { get: function() { @@ -28384,13 +28452,13 @@ var wf = function() { } })), Object.defineProperty(c, "align", r({}, h, { get: function() { - return x; + return A; }, set: function(w) { const I = s(w); if (!I) throw new SyntaxError("An invalid or illegal string was specified."); - x = I, this.hasBeenReset = !0; + A = I, this.hasBeenReset = !0; } })), c.displayState = void 0; } @@ -28398,7 +28466,7 @@ var wf = function() { return self.WebVTT.convertCueToDOMTree(self, this.text); }, a; }(); -class A2 { +class z2 { decode(e, t) { if (!e) return ""; @@ -28407,14 +28475,14 @@ class A2 { return decodeURIComponent(encodeURIComponent(e)); } } -function gE(n) { +function RE(n) { function e(i, s, r, a) { return (i | 0) * 3600 + (s | 0) * 60 + (r | 0) + parseFloat(a || 0); } const t = n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/); return t ? parseFloat(t[2]) > 59 ? e(t[2], t[3], 0, t[4]) : e(t[1], t[2], t[3], t[4]) : null; } -class x2 { +class W2 { constructor() { this.values = /* @__PURE__ */ Object.create(null); } @@ -28456,7 +28524,7 @@ class x2 { return !1; } } -function pE(n, e, t, i) { +function CE(n, e, t, i) { const s = i ? n.split(i) : [n]; for (const r in s) { if (typeof s[r] != "string") @@ -28468,18 +28536,18 @@ function pE(n, e, t, i) { e(o, u); } } -const Ed = new wf(0, 0, ""), Yo = Ed.align === "middle" ? "middle" : "center"; -function D2(n, e, t) { +const Gd = new Wf(0, 0, ""), ml = Gd.align === "middle" ? "middle" : "center"; +function Y2(n, e, t) { const i = n; function s() { - const o = gE(n); + const o = RE(n); if (o === null) throw new Error("Malformed timestamp: " + i); return n = n.replace(/^[^\sa-zA-Z-]+/, ""), o; } function r(o, u) { - const l = new x2(); - pE(o, function(d, f) { + const l = new W2(); + CE(o, function(d, f) { let m; switch (d) { case "region": @@ -28493,23 +28561,23 @@ function D2(n, e, t) { l.alt(d, f, ["rl", "lr"]); break; case "line": - m = f.split(","), l.integer(d, m[0]), l.percent(d, m[0]) && l.set("snapToLines", !1), l.alt(d, m[0], ["auto"]), m.length === 2 && l.alt("lineAlign", m[1], ["start", Yo, "end"]); + m = f.split(","), l.integer(d, m[0]), l.percent(d, m[0]) && l.set("snapToLines", !1), l.alt(d, m[0], ["auto"]), m.length === 2 && l.alt("lineAlign", m[1], ["start", ml, "end"]); break; case "position": - m = f.split(","), l.percent(d, m[0]), m.length === 2 && l.alt("positionAlign", m[1], ["start", Yo, "end", "line-left", "line-right", "auto"]); + m = f.split(","), l.percent(d, m[0]), m.length === 2 && l.alt("positionAlign", m[1], ["start", ml, "end", "line-left", "line-right", "auto"]); break; case "size": l.percent(d, f); break; case "align": - l.alt(d, f, ["start", Yo, "end", "left", "right"]); + l.alt(d, f, ["start", ml, "end", "left", "right"]); break; } }, /:/, /\s/), u.region = l.get("region", null), u.vertical = l.get("vertical", ""); let c = l.get("line", "auto"); - c === "auto" && Ed.line === -1 && (c = -1), u.line = c, u.lineAlign = l.get("lineAlign", "start"), u.snapToLines = l.get("snapToLines", !0), u.size = l.get("size", 100), u.align = l.get("align", Yo); + c === "auto" && Gd.line === -1 && (c = -1), u.line = c, u.lineAlign = l.get("lineAlign", "start"), u.snapToLines = l.get("snapToLines", !0), u.size = l.get("size", 100), u.align = l.get("align", ml); let h = l.get("position", "auto"); - h === "auto" && Ed.position === 50 && (h = u.align === "start" || u.align === "left" ? 0 : u.align === "end" || u.align === "right" ? 100 : 50), u.position = h; + h === "auto" && Gd.position === 50 && (h = u.align === "start" || u.align === "left" ? 0 : u.align === "end" || u.align === "right" ? 100 : 50), u.position = h; } function a() { n = n.replace(/^\s+/, ""); @@ -28518,13 +28586,13 @@ function D2(n, e, t) { throw new Error("Malformed time stamp (time stamps must be separated by '-->'): " + i); n = n.slice(3), a(), e.endTime = s(), a(), r(n, e); } -function _E(n) { +function FE(n) { return n.replace(/
/gi, ` `); } -class w2 { +class X2 { constructor() { - this.state = "INITIAL", this.buffer = "", this.decoder = new A2(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0; + this.state = "INITIAL", this.buffer = "", this.decoder = new z2(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0; } parse(e) { const t = this; @@ -28533,7 +28601,7 @@ class w2 { })); function i() { let r = t.buffer, a = 0; - for (r = _E(r); a < r.length && r[a] !== "\r" && r[a] !== ` + for (r = FE(r); a < r.length && r[a] !== "\r" && r[a] !== ` `; ) ++a; const o = r.slice(0, a); @@ -28541,7 +28609,7 @@ class w2 { ` && ++a, t.buffer = r.slice(a), o; } function s(r) { - pE(r, function(a, o) { + CE(r, function(a, o) { }, /:/); } try { @@ -28573,7 +28641,7 @@ class w2 { } if (!r) continue; - if (t.cue = new wf(0, 0, ""), t.state = "CUE", r.indexOf("-->") === -1) { + if (t.cue = new Wf(0, 0, ""), t.state = "CUE", r.indexOf("-->") === -1) { t.cue.id = r; continue; } @@ -28583,7 +28651,7 @@ class w2 { continue; } try { - D2(r, t.cue, t.regionList); + Y2(r, t.cue, t.regionList); } catch { t.cue = null, t.state = "BADCUE"; continue; @@ -28625,19 +28693,19 @@ class w2 { return e.onflush && e.onflush(), this; } } -const L2 = /\r\n|\n\r|\n|\r/g, lh = function(e, t, i = 0) { +const Q2 = /\r\n|\n\r|\n|\r/g, Lh = function(e, t, i = 0) { return e.slice(i, i + t.length) === t; -}, I2 = function(e) { +}, Z2 = function(e) { let t = parseInt(e.slice(-3)); const i = parseInt(e.slice(-6, -4)), s = parseInt(e.slice(-9, -7)), r = e.length > 9 ? parseInt(e.substring(0, e.indexOf(":"))) : 0; - if (!Z(t) || !Z(i) || !Z(s) || !Z(r)) + if (!J(t) || !J(i) || !J(s) || !J(r)) throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`); return t += 1e3 * i, t += 60 * 1e3 * s, t += 60 * 60 * 1e3 * r, t; }; -function Lf(n, e, t) { - return wa(n.toString()) + wa(e.toString()) + wa(t); +function Yf(n, e, t) { + return Ba(n.toString()) + Ba(e.toString()) + Ba(t); } -const k2 = function(e, t, i) { +const J2 = function(e, t, i) { let s = e[t], r = e[s.prevCC]; if (!r || !r.new && s.new) { e.ccOffset = e.presentationOffset = s.start, s.new = !1; @@ -28649,26 +28717,26 @@ const k2 = function(e, t, i) { } e.presentationOffset = i; }; -function R2(n, e, t, i, s, r, a) { - const o = new w2(), u = Kt(new Uint8Array(n)).trim().replace(L2, ` +function eF(n, e, t, i, s, r, a) { + const o = new X2(), u = Qt(new Uint8Array(n)).trim().replace(Q2, ` `).split(` -`), l = [], c = e ? jR(e.baseTime, e.timescale) : 0; +`), l = [], c = e ? gC(e.baseTime, e.timescale) : 0; let h = "00:00.000", d = 0, f = 0, m, g = !0; o.oncue = function(p) { const y = t[i]; let v = t.ccOffset; const _ = (d - c) / 9e4; - if (y != null && y.new && (f !== void 0 ? v = t.ccOffset = y.start : k2(t, i, _)), _) { + if (y != null && y.new && (f !== void 0 ? v = t.ccOffset = y.start : J2(t, i, _)), _) { if (!e) { m = new Error("Missing initPTS for VTT MPEGTS"); return; } v = _ - t.presentationOffset; } - const E = p.endTime - p.startTime, T = Zt((p.startTime + v - f) * 9e4, s * 9e4) / 9e4; + const E = p.endTime - p.startTime, T = ii((p.startTime + v - f) * 9e4, s * 9e4) / 9e4; p.startTime = Math.max(T, 0), p.endTime = Math.max(T + E, 0); - const A = p.text.trim(); - p.text = decodeURIComponent(encodeURIComponent(A)), p.id || (p.id = Lf(p.startTime, p.endTime, A)), p.endTime > 0 && l.push(p); + const x = p.text.trim(); + p.text = decodeURIComponent(encodeURIComponent(x)), p.id || (p.id = Yf(p.startTime, p.endTime, x)), p.endTime > 0 && l.push(p); }, o.onparsingerror = function(p) { m = p; }, o.onflush = function() { @@ -28679,12 +28747,12 @@ function R2(n, e, t, i, s, r, a) { r(l); }, u.forEach((p) => { if (g) - if (lh(p, "X-TIMESTAMP-MAP=")) { + if (Lh(p, "X-TIMESTAMP-MAP=")) { g = !1, p.slice(16).split(",").forEach((y) => { - lh(y, "LOCAL:") ? h = y.slice(6) : lh(y, "MPEGTS:") && (d = parseInt(y.slice(7))); + Lh(y, "LOCAL:") ? h = y.slice(6) : Lh(y, "MPEGTS:") && (d = parseInt(y.slice(7))); }); try { - f = I2(h) / 1e3; + f = Z2(h) / 1e3; } catch (y) { m = y; } @@ -28694,27 +28762,27 @@ function R2(n, e, t, i, s, r, a) { `); }), o.flush(); } -const uh = "stpp.ttml.im1t", vE = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/, yE = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/, C2 = { +const Ih = "stpp.ttml.im1t", PE = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/, OE = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/, tF = { left: "start", center: "center", right: "end", start: "start", end: "end" }; -function _0(n, e, t, i) { +function P0(n, e, t, i) { const s = fe(new Uint8Array(n), ["mdat"]); if (s.length === 0) { i(new Error("Could not parse IMSC1 mdat")); return; } - const r = s.map((o) => Kt(o)), a = KR(e.baseTime, 1, e.timescale); + const r = s.map((o) => Qt(o)), a = mC(e.baseTime, 1, e.timescale); try { - r.forEach((o) => t(F2(o, a))); + r.forEach((o) => t(iF(o, a))); } catch (o) { i(o); } } -function F2(n, e) { +function iF(n, e) { const s = new DOMParser().parseFromString(n, "text/xml").getElementsByTagName("tt")[0]; if (!s) throw new Error("Invalid ttml"); @@ -28723,50 +28791,50 @@ function F2(n, e) { subFrameRate: 1, frameRateMultiplier: 0, tickRate: 0 - }, a = Object.keys(r).reduce((h, d) => (h[d] = s.getAttribute(`ttp:${d}`) || r[d], h), {}), o = s.getAttribute("xml:space") !== "preserve", u = v0(ch(s, "styling", "style")), l = v0(ch(s, "layout", "region")), c = ch(s, "body", "[begin]"); + }, a = Object.keys(r).reduce((h, d) => (h[d] = s.getAttribute(`ttp:${d}`) || r[d], h), {}), o = s.getAttribute("xml:space") !== "preserve", u = O0(kh(s, "styling", "style")), l = O0(kh(s, "layout", "region")), c = kh(s, "body", "[begin]"); return [].map.call(c, (h) => { - const d = EE(h, o); + const d = ME(h, o); if (!d || !h.hasAttribute("begin")) return null; - const f = dh(h.getAttribute("begin"), a), m = dh(h.getAttribute("dur"), a); - let g = dh(h.getAttribute("end"), a); + const f = Ch(h.getAttribute("begin"), a), m = Ch(h.getAttribute("dur"), a); + let g = Ch(h.getAttribute("end"), a); if (f === null) - throw y0(h); + throw M0(h); if (g === null) { if (m === null) - throw y0(h); + throw M0(h); g = f + m; } - const p = new wf(f - e, g - e, d); - p.id = Lf(p.startTime, p.endTime, p.text); - const y = l[h.getAttribute("region")], v = u[h.getAttribute("style")], _ = P2(y, v, u), { + const p = new Wf(f - e, g - e, d); + p.id = Yf(p.startTime, p.endTime, p.text); + const y = l[h.getAttribute("region")], v = u[h.getAttribute("style")], _ = nF(y, v, u), { textAlign: E } = _; if (E) { - const T = C2[E]; + const T = tF[E]; T && (p.lineAlign = T), p.align = E; } - return De(p, _), p; + return we(p, _), p; }).filter((h) => h !== null); } -function ch(n, e, t) { +function kh(n, e, t) { const i = n.getElementsByTagName(e)[0]; return i ? [].slice.call(i.querySelectorAll(t)) : []; } -function v0(n) { +function O0(n) { return n.reduce((e, t) => { const i = t.getAttribute("xml:id"); return i && (e[i] = t), e; }, {}); } -function EE(n, e) { +function ME(n, e) { return [].slice.call(n.childNodes).reduce((t, i, s) => { var r; return i.nodeName === "br" && s ? t + ` -` : (r = i.childNodes) != null && r.length ? EE(i, e) : e ? t + i.textContent.trim().replace(/\s+/g, " ") : t + i.textContent; +` : (r = i.childNodes) != null && r.length ? ME(i, e) : e ? t + i.textContent.trim().replace(/\s+/g, " ") : t + i.textContent; }, ""); } -function P2(n, e, t) { +function nF(n, e, t) { const i = "http://www.w3.org/ns/ttml#styling"; let s = null; const r = [ @@ -28784,28 +28852,28 @@ function P2(n, e, t) { // 'writingMode' ], a = n != null && n.hasAttribute("style") ? n.getAttribute("style") : null; return a && t.hasOwnProperty(a) && (s = t[a]), r.reduce((o, u) => { - const l = hh(e, i, u) || hh(n, i, u) || hh(s, i, u); + const l = Rh(e, i, u) || Rh(n, i, u) || Rh(s, i, u); return l && (o[u] = l), o; }, {}); } -function hh(n, e, t) { +function Rh(n, e, t) { return n && n.hasAttributeNS(e, t) ? n.getAttributeNS(e, t) : null; } -function y0(n) { +function M0(n) { return new Error(`Could not parse ttml timestamp ${n}`); } -function dh(n, e) { +function Ch(n, e) { if (!n) return null; - let t = gE(n); - return t === null && (vE.test(n) ? t = O2(n, e) : yE.test(n) && (t = M2(n, e))), t; + let t = RE(n); + return t === null && (PE.test(n) ? t = sF(n, e) : OE.test(n) && (t = rF(n, e))), t; } -function O2(n, e) { - const t = vE.exec(n), i = (t[4] | 0) + (t[5] | 0) / e.subFrameRate; +function sF(n, e) { + const t = PE.exec(n), i = (t[4] | 0) + (t[5] | 0) / e.subFrameRate; return (t[1] | 0) * 3600 + (t[2] | 0) * 60 + (t[3] | 0) + i / e.frameRate; } -function M2(n, e) { - const t = yE.exec(n), i = Number(t[1]); +function rF(n, e) { + const t = OE.exec(n), i = Number(t[1]); switch (t[2]) { case "h": return i * 3600; @@ -28820,7 +28888,7 @@ function M2(n, e) { } return i; } -class Xo { +class gl { constructor(e, t) { this.timelineController = void 0, this.cueRanges = [], this.trackName = void 0, this.startTime = null, this.endTime = null, this.screen = null, this.timelineController = e, this.trackName = t; } @@ -28834,9 +28902,9 @@ class Xo { this.cueRanges = [], this.startTime = null; } } -class $2 { +class aF { constructor(e) { - this.hls = void 0, this.media = null, this.config = void 0, this.enabled = !0, this.Cues = void 0, this.textTracks = [], this.tracks = [], this.initPTS = [], this.unparsedVttFrags = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.cea608Parser1 = void 0, this.cea608Parser2 = void 0, this.lastCc = -1, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = b0(), this.captionsProperties = void 0, this.hls = e, this.config = e.config, this.Cues = e.config.cueHandler, this.captionsProperties = { + this.hls = void 0, this.media = null, this.config = void 0, this.enabled = !0, this.Cues = void 0, this.textTracks = [], this.tracks = [], this.initPTS = [], this.unparsedVttFrags = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.cea608Parser1 = void 0, this.cea608Parser2 = void 0, this.lastCc = -1, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = B0(), this.captionsProperties = void 0, this.hls = e, this.config = e.config, this.Cues = e.config.cueHandler, this.captionsProperties = { textTrack1: { label: this.config.captionsTextTrack1Label, languageCode: this.config.captionsTextTrack1LanguageCode @@ -28862,13 +28930,13 @@ class $2 { e.off(b.MEDIA_ATTACHING, this.onMediaAttaching, this), e.off(b.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(b.MANIFEST_LOADING, this.onManifestLoading, this), e.off(b.MANIFEST_LOADED, this.onManifestLoaded, this), e.off(b.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.off(b.FRAG_LOADING, this.onFragLoading, this), e.off(b.FRAG_LOADED, this.onFragLoaded, this), e.off(b.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this), e.off(b.FRAG_DECRYPTED, this.onFragDecrypted, this), e.off(b.INIT_PTS_FOUND, this.onInitPtsFound, this), e.off(b.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this), e.off(b.BUFFER_FLUSHING, this.onBufferFlushing, this), this.hls = this.config = this.media = null, this.cea608Parser1 = this.cea608Parser2 = void 0; } initCea608Parsers() { - const e = new Xo(this, "textTrack1"), t = new Xo(this, "textTrack2"), i = new Xo(this, "textTrack3"), s = new Xo(this, "textTrack4"); - this.cea608Parser1 = new p0(1, e, t), this.cea608Parser2 = new p0(3, i, s); + const e = new gl(this, "textTrack1"), t = new gl(this, "textTrack2"), i = new gl(this, "textTrack3"), s = new gl(this, "textTrack4"); + this.cea608Parser1 = new F0(1, e, t), this.cea608Parser2 = new F0(3, i, s); } addCues(e, t, i, s, r) { let a = !1; for (let o = r.length; o--; ) { - const u = r[o], l = B2(u[0], u[1], t, i); + const u = r[o], l = oF(u[0], u[1], t, i); if (l >= 0 && (u[0] = Math.min(u[0], t), u[1] = Math.max(u[1], i), a = !0, l / (i - t) > 0.5)) return; } @@ -28894,7 +28962,7 @@ class $2 { const { unparsedVttFrags: a } = this; - i === J.MAIN && (this.initPTS[t.cc] = { + i === te.MAIN && (this.initPTS[t.cc] = { baseTime: s, timescale: r }), a.length && (this.unparsedVttFrags = [], a.forEach((o) => { @@ -28912,7 +28980,7 @@ class $2 { if (i) for (let s = 0; s < i.textTracks.length; s++) { const r = i.textTracks[s]; - if (E0(r, { + if ($0(r, { name: e, lang: t, characteristics: "transcribes-spoken-dialog,describes-music-and-sound" @@ -28936,7 +29004,7 @@ class $2 { languageCode: a } = t[e], o = this.getExistingTrack(r, a); if (o) - i[e] = o, ar(i[e]), cE(i[e], s); + i[e] = o, vr(i[e]), DE(i[e], s); else { const u = this.createTextTrack("captions", r, a); u && (u[e] = !0, i[e] = u); @@ -28975,11 +29043,11 @@ class $2 { captionsTracks: s } = this; Object.keys(s).forEach((r) => { - ar(s[r]), delete s[r]; + vr(s[r]), delete s[r]; }), this.nonNativeCaptionsTracks = {}; } onManifestLoading() { - this.lastCc = -1, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = b0(), this._cleanTracks(), this.tracks = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.textTracks = [], this.unparsedVttFrags = [], this.initPTS = [], this.cea608Parser1 && this.cea608Parser2 && (this.cea608Parser1.reset(), this.cea608Parser2.reset()); + this.lastCc = -1, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = B0(), this._cleanTracks(), this.tracks = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.textTracks = [], this.unparsedVttFrags = [], this.initPTS = [], this.cea608Parser1 && this.cea608Parser2 && (this.cea608Parser1.reset(), this.cea608Parser2.reset()); } _cleanTracks() { const { @@ -28990,32 +29058,32 @@ class $2 { const t = e.textTracks; if (t) for (let i = 0; i < t.length; i++) - ar(t[i]); + vr(t[i]); } onSubtitleTracksUpdated(e, t) { - const i = t.subtitleTracks || [], s = i.some((r) => r.textCodec === uh); + const i = t.subtitleTracks || [], s = i.some((r) => r.textCodec === Ih); if (this.config.enableWebVTT || s && this.config.enableIMSC1) { - if (iE(this.tracks, i)) { + if (vE(this.tracks, i)) { this.tracks = i; return; } if (this.textTracks = [], this.tracks = i, this.config.renderTextTracksNatively) { - const a = this.media, o = a ? bl(a.textTracks) : null; + const a = this.media, o = a ? Ul(a.textTracks) : null; if (this.tracks.forEach((u, l) => { let c; if (o) { let h = null; for (let d = 0; d < o.length; d++) - if (o[d] && E0(o[d], u)) { + if (o[d] && $0(o[d], u)) { h = o[d], o[d] = null; break; } h && (c = h); } if (c) - ar(c); + vr(c); else { - const h = bE(u); + const h = $E(u); c = this.createTextTrack(h, u.name, u.lang), c && (c.mode = "disabled"); } c && this.textTracks.push(c); @@ -29050,7 +29118,7 @@ class $2 { return t == null ? void 0 : t.attrs["CLOSED-CAPTIONS"]; } onFragLoading(e, t) { - if (this.enabled && t.frag.type === J.MAIN) { + if (this.enabled && t.frag.type === te.MAIN) { var i, s; const { cea608Parser1: r, @@ -29068,7 +29136,7 @@ class $2 { frag: i, payload: s } = t; - if (i.type === J.SUBTITLE) + if (i.type === te.SUBTITLE) if (s.byteLength) { const r = i.decryptdata, a = "stats" in t; if (r == null || !r.encrypted || a) { @@ -29077,7 +29145,7 @@ class $2 { start: i.start, prevCC: this.prevCC, new: !0 - }, this.prevCC = i.cc), o && o.textCodec === uh ? this._parseIMSC1(i, s) : this._parseVTTs(t); + }, this.prevCC = i.cc), o && o.textCodec === Ih ? this._parseIMSC1(i, s) : this._parseVTTs(t); } } else this.hls.trigger(b.SUBTITLE_FRAG_PROCESSED, { @@ -29088,7 +29156,7 @@ class $2 { } _parseIMSC1(e, t) { const i = this.hls; - _0(t, this.initPTS[e.cc], (s) => { + P0(t, this.initPTS[e.cc], (s) => { this._appendCues(s, e.level), i.trigger(b.SUBTITLE_FRAG_PROCESSED, { success: !0, frag: e @@ -29114,8 +29182,8 @@ class $2 { a.push(e); return; } - const u = this.hls, l = (t = i.initSegment) != null && t.data ? li(i.initSegment.data, new Uint8Array(s)).buffer : s; - R2(l, this.initPTS[i.cc], this.vttCCs, i.cc, i.start, (c) => { + const u = this.hls, l = (t = i.initSegment) != null && t.data ? fi(i.initSegment.data, new Uint8Array(s)).buffer : s; + eF(l, this.initPTS[i.cc], this.vttCCs, i.cc, i.start, (c) => { this._appendCues(c, i.level), u.trigger(b.SUBTITLE_FRAG_PROCESSED, { success: !0, frag: i @@ -29131,8 +29199,8 @@ class $2 { } _fallbackToIMSC1(e, t) { const i = this.tracks[e.level]; - i.textCodec || _0(t, this.initPTS[e.cc], () => { - i.textCodec = uh, this._parseIMSC1(e, t); + i.textCodec || P0(t, this.initPTS[e.cc], () => { + i.textCodec = Ih, this._parseIMSC1(e, t); }, () => { i.textCodec = "wvtt"; }); @@ -29143,7 +29211,7 @@ class $2 { const s = this.textTracks[t]; if (!s || s.mode === "disabled") return; - e.forEach((r) => hE(s, r)); + e.forEach((r) => wE(s, r)); } else { const s = this.tracks[t]; if (!s) @@ -29160,7 +29228,7 @@ class $2 { const { frag: i } = t; - i.type === J.SUBTITLE && this.onFragLoaded(b.FRAG_LOADED, t); + i.type === te.SUBTITLE && this.onFragLoaded(b.FRAG_LOADED, t); } onSubtitleTracksCleared() { this.tracks = [], this.captionsTracks = {}; @@ -29172,7 +29240,7 @@ class $2 { frag: i, samples: s } = t; - if (!(i.type === J.MAIN && this.closedCaptionsForLevel(i) === "NONE")) + if (!(i.type === te.MAIN && this.closedCaptionsForLevel(i) === "NONE")) for (let r = 0; r < s.length; r++) { const a = s[r].bytes; if (a) { @@ -29196,13 +29264,13 @@ class $2 { const { captionsTracks: o } = this; - Object.keys(o).forEach((u) => yd(o[u], t, i)); + Object.keys(o).forEach((u) => Ud(o[u], t, i)); } if (this.config.renderTextTracksNatively && t === 0 && s !== void 0) { const { textTracks: o } = this; - Object.keys(o).forEach((u) => yd(o[u], t, s)); + Object.keys(o).forEach((u) => Ud(o[u], t, s)); } } } @@ -29221,16 +29289,16 @@ class $2 { return t; } } -function bE(n) { +function $E(n) { return n.characteristics && /transcribes-spoken-dialog/gi.test(n.characteristics) && /describes-music-and-sound/gi.test(n.characteristics) ? "captions" : "subtitles"; } -function E0(n, e) { - return !!n && n.kind === bE(e) && pd(e, n); +function $0(n, e) { + return !!n && n.kind === $E(e) && $d(e, n); } -function B2(n, e, t, i) { +function oF(n, e, t, i) { return Math.min(e, i) - Math.max(n, t); } -function b0() { +function B0() { return { ccOffset: 0, presentationOffset: 0, @@ -29241,7 +29309,7 @@ function b0() { } }; } -const N2 = /\s/, U2 = { +const lF = /\s/, uF = { newCue(n, e, t, i) { const s = []; let r, a, o, u, l; @@ -29250,15 +29318,15 @@ const N2 = /\s/, U2 = { if (r = i.rows[d], o = !0, u = 0, l = "", !r.isEmpty()) { var h; for (let g = 0; g < r.chars.length; g++) - N2.test(r.chars[g].uchar) && o ? u++ : (l += r.chars[g].uchar, o = !1); + lF.test(r.chars[g].uchar) && o ? u++ : (l += r.chars[g].uchar, o = !1); r.cueStartTime = e, e === t && (t += 1e-4), u >= 16 ? u-- : u++; - const f = _E(l.trim()), m = Lf(e, t, f); + const f = FE(l.trim()), m = Yf(e, t, f); n != null && (h = n.cues) != null && h.getCueById(m) || (a = new c(e, t, f), a.id = m, a.line = d + 1, a.align = "left", a.position = 10 + Math.min(80, Math.floor(u * 8 / 32) * 10), s.push(a)); } - return n && s.length && (s.sort((d, f) => d.line === "auto" || f.line === "auto" ? 0 : d.line > 8 && f.line > 8 ? f.line - d.line : d.line - f.line), s.forEach((d) => hE(n, d))), s; + return n && s.length && (s.sort((d, f) => d.line === "auto" || f.line === "auto" ? 0 : d.line > 8 && f.line > 8 ? f.line - d.line : d.line - f.line), s.forEach((d) => wE(n, d))), s; } }; -function G2() { +function cF() { if ( // @ts-ignore self.fetch && self.AbortController && self.ReadableStream && self.Request @@ -29269,10 +29337,10 @@ function G2() { } return !1; } -const H2 = /(\d+)-(\d+)\/(\d+)/; -class T0 { +const hF = /(\d+)-(\d+)\/(\d+)/; +class N0 { constructor(e) { - this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = null, this.response = null, this.controller = void 0, this.context = null, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = e.fetchSetup || j2, this.controller = new self.AbortController(), this.stats = new lf(); + this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = null, this.response = null, this.controller = void 0, this.context = null, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = e.fetchSetup || gF, this.controller = new self.AbortController(), this.stats = new If(); } destroy() { this.loader = this.callbacks = this.context = this.config = this.request = null, this.abortInternal(), this.response = null, this.fetchSetup = this.controller = this.stats = null; @@ -29289,13 +29357,13 @@ class T0 { if (s.loading.start) throw new Error("Loader can only be used once."); s.loading.start = self.performance.now(); - const r = V2(e, this.controller.signal), a = e.responseType === "arraybuffer", o = a ? "byteLength" : "length", { + const r = dF(e, this.controller.signal), a = e.responseType === "arraybuffer", o = a ? "byteLength" : "length", { maxTimeToFirstByteMs: u, maxLoadTimeMs: l } = t.loadPolicy; - this.context = e, this.config = t, this.callbacks = i, this.request = this.fetchSetup(e, r), self.clearTimeout(this.requestTimeout), t.timeout = u && Z(u) ? u : l, this.requestTimeout = self.setTimeout(() => { + this.context = e, this.config = t, this.callbacks = i, this.request = this.fetchSetup(e, r), self.clearTimeout(this.requestTimeout), t.timeout = u && J(u) ? u : l, this.requestTimeout = self.setTimeout(() => { this.callbacks && (this.abortInternal(), this.callbacks.onTimeout(s, e, this.response)); - }, t.timeout), (Ua(this.request) ? this.request.then(self.fetch) : self.fetch(this.request)).then((h) => { + }, t.timeout), (Za(this.request) ? this.request.then(self.fetch) : self.fetch(this.request)).then((h) => { var d; this.response = this.loader = h; const f = Math.max(self.performance.now(), s.loading.start); @@ -29306,11 +29374,11 @@ class T0 { status: g, statusText: p } = h; - throw new z2(p || "fetch, bad network response", g, h); + throw new pF(p || "fetch, bad network response", g, h); } - s.loading.first = f, s.total = K2(h.headers) || s.total; + s.loading.first = f, s.total = mF(h.headers) || s.total; const m = (d = this.callbacks) == null ? void 0 : d.onProgress; - return m && Z(t.highWaterMark) ? this.loadProgressively(h, s, e, t.highWaterMark, m) : a ? h.arrayBuffer() : e.responseType === "json" ? h.json() : h.text(); + return m && J(t.highWaterMark) ? this.loadProgressively(h, s, e, t.highWaterMark, m) : a ? h.arrayBuffer() : e.responseType === "json" ? h.json() : h.text(); }).then((h) => { var d, f; const m = this.response; @@ -29324,7 +29392,7 @@ class T0 { data: h, code: m.status }, y = (d = this.callbacks) == null ? void 0 : d.onProgress; - y && !Z(t.highWaterMark) && y(s, e, h, m), (f = this.callbacks) == null || f.onSuccess(p, s, e, m); + y && !J(t.highWaterMark) && y(s, e, h, m), (f = this.callbacks) == null || f.onSuccess(p, s, e, m); }).catch((h) => { var d; if (self.clearTimeout(this.requestTimeout), s.aborted) @@ -29348,7 +29416,7 @@ class T0 { return this.response ? this.response.headers.get(e) : null; } loadProgressively(e, t, i, s = 0, r) { - const a = new My(), o = e.body.getReader(), u = () => o.read().then((l) => { + const a = new Zy(), o = e.body.getReader(), u = () => o.read().then((l) => { if (l.done) return a.dataLength && r(t, i, a.flush().buffer, e), Promise.resolve(new ArrayBuffer(0)); const c = l.value, h = c.length; @@ -29357,44 +29425,44 @@ class T0 { return u(); } } -function V2(n, e) { +function dF(n, e) { const t = { method: "GET", mode: "cors", credentials: "same-origin", signal: e, - headers: new self.Headers(De({}, n.headers)) + headers: new self.Headers(we({}, n.headers)) }; return n.rangeEnd && t.headers.set("Range", "bytes=" + n.rangeStart + "-" + String(n.rangeEnd - 1)), t; } -function q2(n) { - const e = H2.exec(n); +function fF(n) { + const e = hF.exec(n); if (e) return parseInt(e[2]) - parseInt(e[1]) + 1; } -function K2(n) { +function mF(n) { const e = n.get("Content-Range"); if (e) { - const i = q2(e); - if (Z(i)) + const i = fF(e); + if (J(i)) return i; } const t = n.get("Content-Length"); if (t) return parseInt(t); } -function j2(n, e) { +function gF(n, e) { return new self.Request(n.url, e); } -class z2 extends Error { +class pF extends Error { constructor(e, t, i) { super(e), this.code = void 0, this.details = void 0, this.code = t, this.details = i; } } -const W2 = /^age:\s*[\d.]+\s*$/im; -class TE { +const _F = /^age:\s*[\d.]+\s*$/im; +class BE { constructor(e) { - this.xhrSetup = void 0, this.requestTimeout = void 0, this.retryTimeout = void 0, this.retryDelay = void 0, this.config = null, this.callbacks = null, this.context = null, this.loader = null, this.stats = void 0, this.xhrSetup = e && e.xhrSetup || null, this.stats = new lf(), this.retryDelay = 0; + this.xhrSetup = void 0, this.requestTimeout = void 0, this.retryTimeout = void 0, this.retryDelay = void 0, this.config = null, this.callbacks = null, this.context = null, this.loader = null, this.stats = void 0, this.xhrSetup = e && e.xhrSetup || null, this.stats = new If(), this.retryDelay = 0; } destroy() { this.callbacks = null, this.abortInternal(), this.loader = null, this.config = null, this.context = null, this.xhrSetup = null; @@ -29447,7 +29515,7 @@ class TE { if (s) for (const o in s) e.setRequestHeader(o, s[o]); - t.rangeEnd && e.setRequestHeader("Range", "bytes=" + t.rangeStart + "-" + (t.rangeEnd - 1)), e.onreadystatechange = this.readystatechange.bind(this), e.onprogress = this.loadprogress.bind(this), e.responseType = t.responseType, self.clearTimeout(this.requestTimeout), i.timeout = r && Z(r) ? r : a, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), i.timeout), e.send(); + t.rangeEnd && e.setRequestHeader("Range", "bytes=" + t.rangeStart + "-" + (t.rangeEnd - 1)), e.onreadystatechange = this.readystatechange.bind(this), e.onprogress = this.loadprogress.bind(this), e.responseType = t.responseType, self.clearTimeout(this.requestTimeout), i.timeout = r && J(r) ? r : a, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), i.timeout), e.send(); } readystatechange() { const { @@ -29484,11 +29552,11 @@ class TE { data: void 0, code: l }; - if (Hl(h, d, !1, f)) + if (au(h, d, !1, f)) this.retry(h); else { var u; - Ee.error(`${l} while loading ${e.url}`), (u = this.callbacks) == null || u.onError({ + Te.error(`${l} while loading ${e.url}`), (u = this.callbacks) == null || u.onError({ code: l, text: t.statusText }, e, t, i); @@ -29498,11 +29566,11 @@ class TE { loadtimeout() { if (!this.config) return; const e = this.config.loadPolicy.timeoutRetry, t = this.stats.retry; - if (Hl(e, t, !0)) + if (au(e, t, !0)) this.retry(e); else { var i; - Ee.warn(`timeout while loading ${(i = this.context) == null ? void 0 : i.url}`); + Te.warn(`timeout while loading ${(i = this.context) == null ? void 0 : i.url}`); const s = this.callbacks; s && (this.abortInternal(), s.onTimeout(this.stats, this.context, this.loader)); } @@ -29512,7 +29580,7 @@ class TE { context: t, stats: i } = this; - this.retryDelay = df(e, i.retry), i.retry++, Ee.warn(`${status ? "HTTP Status " + status : "Timeout"} while loading ${t == null ? void 0 : t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`), this.abortInternal(), this.loader = null, self.clearTimeout(this.retryTimeout), this.retryTimeout = self.setTimeout(this.loadInternal.bind(this), this.retryDelay); + this.retryDelay = Ff(e, i.retry), i.retry++, Te.warn(`${status ? "HTTP Status " + status : "Timeout"} while loading ${t == null ? void 0 : t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`), this.abortInternal(), this.loader = null, self.clearTimeout(this.retryTimeout), this.retryTimeout = self.setTimeout(this.loadInternal.bind(this), this.retryDelay); } loadprogress(e) { const t = this.stats; @@ -29520,7 +29588,7 @@ class TE { } getCacheAge() { let e = null; - if (this.loader && W2.test(this.loader.getAllResponseHeaders())) { + if (this.loader && _F.test(this.loader.getAllResponseHeaders())) { const t = this.loader.getResponseHeader("age"); e = t ? parseFloat(t) : null; } @@ -29530,12 +29598,12 @@ class TE { return this.loader && new RegExp(`^${e}:\\s*[\\d.]+\\s*$`, "im").test(this.loader.getAllResponseHeaders()) ? this.loader.getResponseHeader(e) : null; } } -const Y2 = { +const vF = { maxTimeToFirstByteMs: 8e3, maxLoadTimeMs: 2e4, timeoutRetry: null, errorRetry: null -}, X2 = Le(Le({ +}, yF = Ie(Ie({ autoStartLoad: !0, // used by stream-controller startPosition: -1, @@ -29618,7 +29686,7 @@ const Y2 = { appendErrorMaxRetry: 3, // used by buffer-controller ignorePlaylistParsingErrors: !1, - loader: TE, + loader: BE, // loader: FetchLoader, fLoader: void 0, // used by fragment-loader @@ -29630,11 +29698,11 @@ const Y2 = { // used by eme-controller licenseResponseCallback: void 0, // used by eme-controller - abrController: vk, - bufferController: oC, - capLevelController: xf, - errorController: Sk, - fpsController: JC, + abrController: Gk, + bufferController: kC, + capLevelController: jf, + errorController: jk, + fpsController: T2, stretchShortVideoTrack: !1, // used by mp4-remuxer maxAudioFramesDrift: 1, @@ -29673,7 +29741,7 @@ const Y2 = { // used by eme-controller drmSystemOptions: {}, // used by eme-controller - requestMediaKeySystemAccessFunc: Dy, + requestMediaKeySystemAccessFunc: Hy, // used by eme-controller requireKeySystemAccessOnStart: !1, // used by eme-controller @@ -29691,7 +29759,7 @@ const Y2 = { useMediaCapabilities: !0, preserveManualLevelOnError: !1, certLoadPolicy: { - default: Y2 + default: vF }, keyLoadPolicy: { default: { @@ -29805,20 +29873,20 @@ const Y2 = { fragLoadingMaxRetry: 6, fragLoadingRetryDelay: 1e3, fragLoadingMaxRetryTimeout: 64e3 -}, Q2()), {}, { - subtitleStreamController: h2, - subtitleTrackController: i2, - timelineController: $2, - audioStreamController: nC, - audioTrackController: sC, - emeController: mr, - cmcdController: XC, - contentSteeringController: ZC, - interstitialsController: c2 +}, EF()), {}, { + subtitleStreamController: P2, + subtitleTrackController: x2, + timelineController: aF, + audioStreamController: DC, + audioTrackController: wC, + emeController: Dr, + cmcdController: y2, + contentSteeringController: b2, + interstitialsController: F2 }); -function Q2() { +function EF() { return { - cueHandler: U2, + cueHandler: uF, // used by timeline-controller enableWebVTT: !0, // used by timeline-controller @@ -29845,14 +29913,14 @@ function Q2() { renderTextTracksNatively: !0 }; } -function Z2(n, e, t) { +function bF(n, e, t) { if ((e.liveSyncDurationCount || e.liveMaxLatencyDurationCount) && (e.liveSyncDuration || e.liveMaxLatencyDuration)) throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration"); if (e.liveMaxLatencyDurationCount !== void 0 && (e.liveSyncDurationCount === void 0 || e.liveMaxLatencyDurationCount <= e.liveSyncDurationCount)) throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"'); if (e.liveMaxLatencyDuration !== void 0 && (e.liveSyncDuration === void 0 || e.liveMaxLatencyDuration <= e.liveSyncDuration)) throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"'); - const i = bd(n), s = ["manifest", "level", "frag"], r = ["TimeOut", "MaxRetry", "RetryDelay", "MaxRetryTimeout"]; + const i = Hd(n), s = ["manifest", "level", "frag"], r = ["TimeOut", "MaxRetry", "RetryDelay", "MaxRetryTimeout"]; return s.forEach((a) => { const o = `${a === "level" ? "playlist" : a}LoadPolicy`, u = e[o] === void 0, l = []; r.forEach((c) => { @@ -29877,18 +29945,18 @@ function Z2(n, e, t) { break; } } - }), l.length && t.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${o}": ${Oe(e[o])}`); - }), Le(Le({}, i), e); + }), l.length && t.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${o}": ${$e(e[o])}`); + }), Ie(Ie({}, i), e); } -function bd(n) { - return n && typeof n == "object" ? Array.isArray(n) ? n.map(bd) : Object.keys(n).reduce((e, t) => (e[t] = bd(n[t]), e), {}) : n; +function Hd(n) { + return n && typeof n == "object" ? Array.isArray(n) ? n.map(Hd) : Object.keys(n).reduce((e, t) => (e[t] = Hd(n[t]), e), {}) : n; } -function J2(n, e) { +function TF(n, e) { const t = n.loader; - t !== T0 && t !== TE ? (e.log("[config]: Custom loader detected, cannot enable progressive streaming"), n.progressive = !1) : G2() && (n.loader = T0, n.progressive = !0, n.enableSoftwareAES = !0, e.log("[config]: Progressive streaming enabled, using FetchLoader")); + t !== N0 && t !== BE ? (e.log("[config]: Custom loader detected, cannot enable progressive streaming"), n.progressive = !1) : cF() && (n.loader = N0, n.progressive = !0, n.enableSoftwareAES = !0, e.log("[config]: Progressive streaming enabled, using FetchLoader")); } -const Tl = 2, eF = 0.1, tF = 0.05, iF = 100; -class nF extends Ty { +const Gl = 2, SF = 0.1, AF = 0.05, xF = 100; +class DF extends By { constructor(e, t) { super("gap-controller", e.logger), this.hls = null, this.fragmentTracker = null, this.media = null, this.mediaSource = void 0, this.nudgeRetry = 0, this.stallReported = !1, this.stalled = null, this.moved = !1, this.seeking = !1, this.buffered = {}, this.lastCurrentTime = 0, this.ended = 0, this.waiting = 0, this.onMediaPlaying = () => { this.ended = 0, this.waiting = 0; @@ -29920,16 +29988,16 @@ class nF extends Ty { super.destroy(), this.unregisterListeners(), this.media = this.hls = this.fragmentTracker = null, this.mediaSource = void 0; } onMediaAttached(e, t) { - this.setInterval(iF), this.mediaSource = t.mediaSource; + this.setInterval(xF), this.mediaSource = t.mediaSource; const i = this.media = t.media; - ti(i, "playing", this.onMediaPlaying), ti(i, "waiting", this.onMediaWaiting), ti(i, "ended", this.onMediaEnded); + ri(i, "playing", this.onMediaPlaying), ri(i, "waiting", this.onMediaWaiting), ri(i, "ended", this.onMediaEnded); } onMediaDetaching(e, t) { this.clearInterval(); const { media: i } = this; - i && (Di(i, "playing", this.onMediaPlaying), Di(i, "waiting", this.onMediaWaiting), Di(i, "ended", this.onMediaEnded), this.media = null), this.mediaSource = void 0; + i && (Mi(i, "playing", this.onMediaPlaying), Mi(i, "waiting", this.onMediaWaiting), Mi(i, "ended", this.onMediaEnded), this.media = null), this.mediaSource = void 0; } onBufferAppended(e, t) { this.buffered = t.timeRanges; @@ -29975,13 +30043,13 @@ class nF extends Ty { })); return; } - if (!le.getBuffered(a).length) { + if (!ue.getBuffered(a).length) { this.nudgeRetry = 0; return; } - const h = le.bufferInfo(a, e, 0), d = h.nextStart || 0, f = this.fragmentTracker; + const h = ue.bufferInfo(a, e, 0), d = h.nextStart || 0, f = this.fragmentTracker; if (o && f && this.hls) { - const A = S0(this.hls.inFlightFragments, e), S = h.len > Tl, D = !d || A || d - e > Tl && !f.getPartialFragment(e); + const x = U0(this.hls.inFlightFragments, e), S = h.len > Gl, D = !d || x || d - e > Gl && !f.getPartialFragment(e); if (S || D) return; this.moved = !1; @@ -29990,8 +30058,8 @@ class nF extends Ty { if (!this.moved && this.stalled !== null && f) { if (!(h.len > 0) && !d) return; - const S = Math.max(d, h.start || 0) - e, x = !!(m != null && m.live) ? m.targetduration * 2 : Tl, w = f.getPartialFragment(e); - if (S > 0 && (S <= x || w)) { + const S = Math.max(d, h.start || 0) - e, A = !!(m != null && m.live) ? m.targetduration * 2 : Gl, w = f.getPartialFragment(e); + if (S > 0 && (S <= A || w)) { a.paused || this._trySkipBufferHole(w); return; } @@ -30019,7 +30087,7 @@ class nF extends Ty { if (this._reportStall(h), !this.media || !this.hls) return; } - const T = le.bufferInfo(a, e, r.maxBufferHole); + const T = ue.bufferInfo(a, e, r.maxBufferHole); this._tryFixBufferStall(T, _, e); } stallResolved(e) { @@ -30033,19 +30101,19 @@ class nF extends Ty { var i; const s = this.buffered.video; if (this.hls && this.media && this.fragmentTracker && (i = this.buffered.audio) != null && i.length && s && s.length > 1 && e > s.end(0)) { - const r = le.bufferedInfo(le.timeRangesToArray(this.buffered.audio), e, 0); + const r = ue.bufferedInfo(ue.timeRangesToArray(this.buffered.audio), e, 0); if (r.len > 1 && t >= r.start) { - const a = le.timeRangesToArray(s), o = le.bufferedInfo(a, t, 0).bufferedIndex; + const a = ue.timeRangesToArray(s), o = ue.bufferedInfo(a, t, 0).bufferedIndex; if (o > -1 && o < a.length - 1) { - const u = le.bufferedInfo(a, e, 0).bufferedIndex, l = a[o].end, c = a[o + 1].start; + const u = ue.bufferedInfo(a, e, 0).bufferedIndex, l = a[o].end, c = a[o + 1].start; if ((u === -1 || u > o) && c - l < 1 && // `maxBufferHole` may be too small and setting it to 0 should not disable this feature e - l < 2) { const h = new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${l} -> ${c} buffered index: ${u}`); this.warn(h.message), this.media.currentTime += 1e-6; - const d = this.fragmentTracker.getPartialFragment(e) || void 0, f = le.bufferInfo(this.media, e, 0); + const d = this.fragmentTracker.getPartialFragment(e) || void 0, f = ue.bufferInfo(this.media, e, 0); this.hls.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.BUFFER_SEEK_OVER_HOLE, + type: ne.MEDIA_ERROR, + details: P.BUFFER_SEEK_OVER_HOLE, fatal: !1, error: h, reason: h.message, @@ -30081,7 +30149,7 @@ class nF extends Ty { adjacentTraversal(e, t) { const i = this.fragmentTracker, s = e.nextStart; if (i && s) { - const r = i.getFragAtPos(t, J.MAIN), a = i.getFragAtPos(s, J.MAIN); + const r = i.getFragAtPos(t, te.MAIN), a = i.getFragAtPos(s, te.MAIN); if (r && a) return a.sn - r.sn < 2; } @@ -30101,10 +30169,10 @@ class nF extends Ty { } = this; if (!s && r !== null && i && t) { this.stallReported = !0; - const a = new Error(`Playback stalling at @${i.currentTime} due to low buffer (${Oe(e)})`); + const a = new Error(`Playback stalling at @${i.currentTime} due to low buffer (${$e(e)})`); this.warn(a.message), t.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.BUFFER_STALLED_ERROR, + type: ne.MEDIA_ERROR, + details: P.BUFFER_STALLED_ERROR, fatal: !1, error: a, buffer: e.len, @@ -30128,25 +30196,25 @@ class nF extends Ty { } = this, r = (t = this.hls) == null ? void 0 : t.config; if (!s || !i || !r) return 0; - const a = s.currentTime, o = le.bufferInfo(s, a, 0), u = a < o.start ? o.start : o.nextStart; + const a = s.currentTime, o = ue.bufferInfo(s, a, 0), u = a < o.start ? o.start : o.nextStart; if (u && this.hls) { const c = o.len <= r.maxBufferHole, h = o.len > 0 && o.len < 1 && s.readyState < 3, d = u - a; if (d > 0 && (c || h)) { if (d > r.maxBufferHole) { let m = !1; if (a === 0) { - const g = i.getAppendedFrag(0, J.MAIN); + const g = i.getAppendedFrag(0, te.MAIN); g && u < g.end && (m = !0); } if (!m) { - const g = e || i.getAppendedFrag(a, J.MAIN); + const g = e || i.getAppendedFrag(a, te.MAIN); if (g) { var l; - if (!((l = this.hls.loadLevelObj) != null && l.details) || S0(this.hls.inFlightFragments, u)) + if (!((l = this.hls.loadLevelObj) != null && l.details) || U0(this.hls.inFlightFragments, u)) return 0; let y = !1, v = g.end; for (; v < u; ) { - const _ = i.getAppendedFrag(v, J.MAIN) || i.getPartialFragment(v); + const _ = i.getAppendedFrag(v, te.MAIN) || i.getPartialFragment(v); if (_) v += _.duration; else { @@ -30159,12 +30227,12 @@ class nF extends Ty { } } } - const f = Math.max(u + tF, a + eF); + const f = Math.max(u + AF, a + SF); if (this.warn(`skipping hole, adjusting currentTime from ${a} to ${f}`), this.moved = !0, s.currentTime = f, !(e != null && e.gap)) { const m = new Error(`fragment loaded with buffer holes, seeking from ${a} to ${f}`); this.hls.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.BUFFER_SEEK_OVER_HOLE, + type: ne.MEDIA_ERROR, + details: P.BUFFER_SEEK_OVER_HOLE, fatal: !1, error: m, reason: m.message, @@ -30194,8 +30262,8 @@ class nF extends Ty { if (this.nudgeRetry++, s < r.nudgeMaxRetry) { const o = a + (s + 1) * r.nudgeOffset, u = new Error(`Nudging 'currentTime' from ${a} to ${o}`); this.warn(u.message), i.currentTime = o, t.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.BUFFER_NUDGE_ON_STALL, + type: ne.MEDIA_ERROR, + details: P.BUFFER_NUDGE_ON_STALL, error: u, fatal: !1, buffer: e.len, @@ -30204,8 +30272,8 @@ class nF extends Ty { } else { const o = new Error(`Playhead still not moving while enough data buffered @${a} after ${r.nudgeMaxRetry} nudges`); this.error(o.message), t.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.BUFFER_STALLED_ERROR, + type: ne.MEDIA_ERROR, + details: P.BUFFER_STALLED_ERROR, error: o, fatal: !0, buffer: e.len, @@ -30214,14 +30282,14 @@ class nF extends Ty { } } } -function S0(n, e) { - const t = A0(n.main); +function U0(n, e) { + const t = G0(n.main); if (t && t.start <= e) return t; - const i = A0(n.audio); + const i = G0(n.audio); return i && i.start <= e ? i : null; } -function A0(n) { +function G0(n) { if (!n) return null; switch (n.state) { @@ -30233,24 +30301,24 @@ function A0(n) { } return n.frag; } -const sF = 0.25; -function Td() { +const wF = 0.25; +function Vd() { if (!(typeof self > "u")) return self.VTTCue || self.TextTrackCue; } -function x0(n, e, t, i, s) { +function H0(n, e, t, i, s) { let r = new n(e, t, ""); try { r.value = i, s && (r.type = s); } catch { - r = new n(e, t, Oe(s ? Le({ + r = new n(e, t, $e(s ? Ie({ type: s }, i) : i)); } return r; } -const Qo = (() => { - const n = Td(); +const pl = (() => { + const n = Vd(); try { n && new n(0, Number.POSITIVE_INFINITY, ""); } catch { @@ -30258,7 +30326,7 @@ const Qo = (() => { } return Number.POSITIVE_INFINITY; })(); -class rF { +class LF { constructor(e) { this.hls = void 0, this.id3Track = null, this.media = null, this.dateRangeCuesAppended = {}, this.removeCues = !0, this.onEventCueEnter = () => { this.hls && this.hls.trigger(b.EVENT_CUE_ENTER, {}); @@ -30289,7 +30357,7 @@ class rF { e && this.updateDateRangeCues(e); } onMediaDetaching(e, t) { - this.media = null, !t.transferMedia && (this.id3Track && (this.removeCues && ar(this.id3Track, this.onEventCueEnter), this.id3Track = null), this.dateRangeCuesAppended = {}); + this.media = null, !t.transferMedia && (this.id3Track && (this.removeCues && vr(this.id3Track, this.onEventCueEnter), this.id3Track = null), this.dateRangeCuesAppended = {}); } onManifestLoading() { this.dateRangeCuesAppended = {}; @@ -30303,7 +30371,7 @@ class rF { for (let t = 0; t < e.length; t++) { const i = e[t]; if (i.kind === "metadata" && i.label === "id3") - return cE(i, this.media), i; + return DE(i, this.media), i; } return this.media.addTextTrack("metadata", "id3"); } @@ -30325,22 +30393,22 @@ class rF { samples: r } = t; this.id3Track || (this.id3Track = this.createTrack(this.media)); - const a = Td(); + const a = Vd(); if (a) for (let o = 0; o < r.length; o++) { const u = r[o].type; - if (u === Ht.emsg && !i || !s) + if (u === Wt.emsg && !i || !s) continue; - const l = Vy(r[o].data); + const l = rE(r[o].data); if (l) { const c = r[o].pts; let h = c + r[o].duration; - h > Qo && (h = Qo), h - c <= 0 && (h = c + sF); + h > pl && (h = pl), h - c <= 0 && (h = c + wF); for (let f = 0; f < l.length; f++) { const m = l[f]; - if (!qy(m)) { + if (!aE(m)) { this.updateId3CueEnds(c, u); - const g = x0(a, c, h, m, u); + const g = H0(a, c, h, m, u); g && this.id3Track.addCue(g); } } @@ -30353,7 +30421,7 @@ class rF { if (s) for (let r = s.length; r--; ) { const a = s[r]; - a.type === t && a.startTime < e && a.endTime === Qo && (a.endTime = e); + a.type === t && a.startTime < e && a.endTime === pl && (a.endTime = e); } } onBufferFlushing(e, { @@ -30375,7 +30443,7 @@ class rF { } = a; if (r && (o || u)) { let l; - s === "audio" ? l = (c) => c.type === Ht.audioId3 && u : s === "video" ? l = (c) => c.type === Ht.emsg && o : l = (c) => c.type === Ht.audioId3 && u || c.type === Ht.emsg && o, yd(r, t, i, l); + s === "audio" ? l = (c) => c.type === Wt.audioId3 && u : s === "video" ? l = (c) => c.type === Wt.emsg && o : l = (c) => c.type === Wt.audioId3 && u || c.type === Wt.emsg && o, Ud(r, t, i, l); } } onLevelUpdated(e, { @@ -30413,13 +30481,13 @@ class rF { a = this.dateRangeCuesAppended = {}; } const u = e.fragments[e.fragments.length - 1]; - if (r.length === 0 || !Z(u == null ? void 0 : u.programDateTime)) + if (r.length === 0 || !J(u == null ? void 0 : u.programDateTime)) return; this.id3Track || (this.id3Track = this.createTrack(this.media)); - const l = Td(); + const l = Vd(); for (let c = 0; c < r.length; c++) { const h = r[c], d = s[h], f = d.startTime, m = a[h], g = (m == null ? void 0 : m.cues) || {}; - let p = (m == null ? void 0 : m.durationKnown) || !1, y = Qo; + let p = (m == null ? void 0 : m.durationKnown) || !1, y = pl; const { duration: v, endDate: _ @@ -30427,32 +30495,32 @@ class rF { if (_ && v !== null) y = f + v, p = !0; else if (d.endOnNext && !p) { - const T = r.reduce((A, S) => { + const T = r.reduce((x, S) => { if (S !== d.id) { const D = s[S]; - if (D.class === d.class && D.startDate > d.startDate && (!A || d.startDate < A.startDate)) + if (D.class === d.class && D.startDate > d.startDate && (!x || d.startDate < x.startDate)) return D; } - return A; + return x; }, null); T && (y = T.startTime, p = !0); } const E = Object.keys(d.attr); for (let T = 0; T < E.length; T++) { - const A = E[T]; - if (!Mk(A)) + const x = E[T]; + if (!rR(x)) continue; - const S = g[A]; + const S = g[x]; if (S) p && !m.durationKnown ? S.endTime = y : Math.abs(S.startTime - f) > 0.01 && (S.startTime = f, S.endTime = y); else if (l) { - let D = d.attr[A]; - $k(A) && (D = ay(D)); - const w = x0(l, f, y, { - key: A, + let D = d.attr[x]; + aR(x) && (D = Ty(D)); + const w = H0(l, f, y, { + key: x, data: D - }, Ht.dateRange); - w && (w.id = h, this.id3Track.addCue(w), g[A] = w, this.hls.config.interstitialsController && (A === "X-ASSET-LIST" || A === "X-ASSET-URL") && w.addEventListener("enter", this.onEventCueEnter)); + }, Wt.dateRange); + w && (w.id = h, this.id3Track.addCue(w), g[x] = w, this.hls.config.interstitialsController && (x === "X-ASSET-LIST" || x === "X-ASSET-URL") && w.addEventListener("enter", this.onEventCueEnter)); } } a[h] = { @@ -30463,7 +30531,7 @@ class rF { } } } -class aF { +class IF { constructor(e) { this.hls = void 0, this.config = void 0, this.media = null, this.currentTime = 0, this.stallCount = 0, this._latency = null, this._targetLatencyUpdated = !1, this.onTimeupdate = () => { const { @@ -30590,7 +30658,7 @@ class aF { } onError(e, t) { var i; - t.details === O.BUFFER_STALLED_ERROR && (this.stallCount++, this.hls && (i = this.levelDetails) != null && i.live && this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency")); + t.details === P.BUFFER_STALLED_ERROR && (this.stallCount++, this.hls && (i = this.levelDetails) != null && i.live && this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency")); } changeMediaPlaybackRate(e, t) { var i, s; @@ -30605,7 +30673,7 @@ class aF { return e === null ? null : e - this.currentTime; } } -class oF extends Af { +class kF extends Kf { constructor(e, t) { super(e, "level-controller"), this._levels = [], this._firstLevel = -1, this._maxAutoLevel = -1, this._startLevel = void 0, this.currentLevel = null, this.currentLevelIndex = -1, this.manualLevelIndex = -1, this.steering = void 0, this.onParsedComplete = void 0, this.steering = t, this._registerListeners(); } @@ -30644,7 +30712,7 @@ class oF extends Af { audioCodec: d, videoCodec: f } = c; - d && (c.audioCodec = d = Bl(d, i) || void 0), f && (f = c.videoCodec = tk(f)); + d && (c.audioCodec = d = iu(d, i) || void 0), f && (f = c.videoCodec = Ak(f)); const { width: m, height: g, @@ -30654,7 +30722,7 @@ class oF extends Af { if (p) for (let w = y; w--; ) { const I = p[w]; - this.isAudioSupported(I) ? (c.audioCodec = d = d ? `${d},${I}` : I, y--, Tr.audio[d.substring(0, 4)] = 2) : this.isVideoSupported(I) && (c.videoCodec = f = f ? `${f},${I}` : I, y--, Tr.video[f.substring(0, 4)] = 2); + this.isAudioSupported(I) ? (c.audioCodec = d = d ? `${d},${I}` : I, y--, Rr.audio[d.substring(0, 4)] = 2) : this.isVideoSupported(I) && (c.videoCodec = f = f ? `${f},${I}` : I, y--, Rr.video[f.substring(0, 4)] = 2); } if (o || (o = !!(m && g)), u || (u = !!f), l || (l = !!d), y || d && !this.isAudioSupported(d) || f && !this.isVideoSupported(f)) { this.log(`Some or all CODECS not supported "${h.CODECS}"`); @@ -30665,36 +30733,36 @@ class oF extends Af { "FRAME-RATE": _, "HDCP-LEVEL": E, "PATHWAY-ID": T, - RESOLUTION: A, + RESOLUTION: x, "VIDEO-RANGE": S - } = h, x = `${`${T || "."}-`}${c.bitrate}-${A}-${_}-${v}-${S}-${E}`; - if (r[x]) - if (r[x].uri !== c.url && !c.attrs["PATHWAY-ID"]) { - const w = a[x] += 1; + } = h, A = `${`${T || "."}-`}${c.bitrate}-${x}-${_}-${v}-${S}-${E}`; + if (r[A]) + if (r[A].uri !== c.url && !c.attrs["PATHWAY-ID"]) { + const w = a[A] += 1; c.attrs["PATHWAY-ID"] = new Array(w + 1).join("."); const I = this.createLevel(c); - r[x] = I, s.push(I); + r[A] = I, s.push(I); } else - r[x].addGroupId("audio", h.AUDIO), r[x].addGroupId("text", h.SUBTITLES); + r[A].addGroupId("audio", h.AUDIO), r[A].addGroupId("text", h.SUBTITLES); else { const w = this.createLevel(c); - r[x] = w, a[x] = 1, s.push(w); + r[A] = w, a[A] = 1, s.push(w); } }), this.filterAndSortMediaOptions(s, t, o, u, l); } createLevel(e) { - const t = new Ma(e), i = e.supplemental; + const t = new Wa(e), i = e.supplemental; if (i != null && i.videoCodec && !this.isVideoSupported(i.videoCodec)) { const s = new Error(`SUPPLEMENTAL-CODECS not supported "${i.videoCodec}"`); - this.log(s.message), t.supportedResult = py(s, []); + this.log(s.message), t.supportedResult = Cy(s, []); } return t; } isAudioSupported(e) { - return ad(e, "audio", this.hls.config.preferManagedMediaSource); + return wd(e, "audio", this.hls.config.preferManagedMediaSource); } isVideoSupported(e) { - return ad(e, "video", this.hls.config.preferManagedMediaSource); + return wd(e, "video", this.hls.config.preferManagedMediaSource); } filterAndSortMediaOptions(e, t, i, s, r) { let a = [], o = [], u = e; @@ -30703,15 +30771,15 @@ class oF extends Af { videoRange: y, width: v, height: _ - }) => (!!p || !!(v && _)) && uk(y))), u.length === 0) { + }) => (!!p || !!(v && _)) && Ck(y))), u.length === 0) { Promise.resolve().then(() => { if (this.hls) { let p = "no level with compatible codecs found in manifest", y = p; - t.levels.length && (y = `one or more CODECS in variant not supported: ${Oe(t.levels.map((_) => _.attrs.CODECS).filter((_, E, T) => T.indexOf(_) === E))}`, this.warn(y), p += ` (${y})`); + t.levels.length && (y = `one or more CODECS in variant not supported: ${$e(t.levels.map((_) => _.attrs.CODECS).filter((_, E, T) => T.indexOf(_) === E))}`, this.warn(y), p += ` (${y})`); const v = new Error(p); this.hls.trigger(b.ERROR, { - type: ie.MEDIA_ERROR, - details: O.MANIFEST_INCOMPATIBLE_CODECS_ERROR, + type: ne.MEDIA_ERROR, + details: P.MANIFEST_INCOMPATIBLE_CODECS_ERROR, fatal: !0, url: t.url, error: v, @@ -30721,7 +30789,7 @@ class oF extends Af { }); return; } - t.audioTracks && (a = t.audioTracks.filter((p) => !p.audioCodec || this.isAudioSupported(p.audioCodec)), D0(a)), t.subtitles && (o = t.subtitles, D0(o)); + t.audioTracks && (a = t.audioTracks.filter((p) => !p.audioCodec || this.isAudioSupported(p.audioCodec)), V0(a)), t.subtitles && (o = t.subtitles, V0(o)); const l = u.slice(0); u.sort((p, y) => { if (p.attrs["HDCP-LEVEL"] !== y.attrs["HDCP-LEVEL"]) @@ -30731,14 +30799,14 @@ class oF extends Af { if (p.frameRate !== y.frameRate) return p.frameRate - y.frameRate; if (p.videoRange !== y.videoRange) - return Nl.indexOf(p.videoRange) - Nl.indexOf(y.videoRange); + return nu.indexOf(p.videoRange) - nu.indexOf(y.videoRange); if (p.videoCodec !== y.videoCodec) { - const v = vp(p.videoCodec), _ = vp(y.videoCodec); + const v = Op(p.videoCodec), _ = Op(y.videoCodec); if (v !== _) return _ - v; } if (p.uri === y.uri && p.codecSet !== y.codecSet) { - const v = $l(p.codecSet), _ = $l(y.codecSet); + const v = tu(p.codecSet), _ = tu(y.codecSet); if (v !== _) return _ - v; } @@ -30794,8 +30862,8 @@ class oF extends Af { if (e < 0 || e >= t.length) { const c = new Error("invalid level idx"), h = e < 0; if (this.hls.trigger(b.ERROR, { - type: ie.OTHER_ERROR, - details: O.LEVEL_SWITCH_ERROR, + type: ne.OTHER_ERROR, + details: P.LEVEL_SWITCH_ERROR, level: e, fatal: h, error: c, @@ -30886,7 +30954,7 @@ class oF extends Af { onFragBuffered(e, { frag: t }) { - if (t !== void 0 && t.type === J.MAIN) { + if (t !== void 0 && t.type === te.MAIN) { const i = t.elementaryStreams; if (!Object.keys(i).some((r) => !!i[r])) return; @@ -30938,7 +31006,7 @@ class oF extends Af { if (this._levels.length === 1) return; const i = this._levels.filter((r, a) => a !== e ? !0 : (this.steering && this.steering.removeLevel(r), r === this.currentLevel && (this.currentLevel = null, this.currentLevelIndex = -1, r.details && r.details.fragments.forEach((o) => o.level = -1)), !1)); - Fy(i), this._levels = i, this.currentLevelIndex > -1 && (t = this.currentLevel) != null && t.details && (this.currentLevelIndex = this.currentLevel.details.fragments[0].level), this.manualLevelIndex > -1 && (this.manualLevelIndex = this.currentLevelIndex); + Yy(i), this._levels = i, this.currentLevelIndex > -1 && (t = this.currentLevel) != null && t.details && (this.currentLevelIndex = this.currentLevel.details.fragments[0].level), this.manualLevelIndex > -1 && (this.manualLevelIndex = this.currentLevelIndex); const s = i.length - 1; this._firstLevel = Math.min(this._firstLevel, s), this._startLevel && (this._startLevel = Math.min(this._startLevel, s)), this.hls.trigger(b.LEVELS_UPDATED, { levels: i @@ -30964,43 +31032,43 @@ class oF extends Af { })); } } -function D0(n) { +function V0(n) { const e = {}; n.forEach((t) => { const i = t.groupId || ""; t.id = e[i] = e[i] || 0, e[i]++; }); } -function SE() { +function NE() { return self.SourceBuffer || self.WebKitSourceBuffer; } -function AE() { - if (!Qn()) +function UE() { + if (!ns()) return !1; - const e = SE(); + const e = NE(); return !e || e.prototype && typeof e.prototype.appendBuffer == "function" && typeof e.prototype.remove == "function"; } -function lF() { - if (!AE()) +function RF() { + if (!UE()) return !1; - const n = Qn(); - return typeof (n == null ? void 0 : n.isTypeSupported) == "function" && (["avc1.42E01E,mp4a.40.2", "av01.0.01M.08", "vp09.00.50.08"].some((e) => n.isTypeSupported(Oa(e, "video"))) || ["mp4a.40.2", "fLaC"].some((e) => n.isTypeSupported(Oa(e, "audio")))); + const n = ns(); + return typeof (n == null ? void 0 : n.isTypeSupported) == "function" && (["avc1.42E01E,mp4a.40.2", "av01.0.01M.08", "vp09.00.50.08"].some((e) => n.isTypeSupported(za(e, "video"))) || ["mp4a.40.2", "fLaC"].some((e) => n.isTypeSupported(za(e, "audio")))); } -function uF() { +function CF() { var n; - const e = SE(); + const e = NE(); return typeof (e == null || (n = e.prototype) == null ? void 0 : n.changeType) == "function"; } -const cF = 100; -class hF extends pf { +const FF = 100; +class PF extends $f { constructor(e, t, i) { - super(e, t, i, "stream-controller", J.MAIN), this.audioCodecSwap = !1, this.level = -1, this._forceStartLoad = !1, this._hasEnoughToStart = !1, this.altAudio = 0, this.audioOnly = !1, this.fragPlaying = null, this.fragLastKbps = 0, this.couldBacktrack = !1, this.backtrackFragment = null, this.audioCodecSwitch = !1, this.videoBuffer = null, this.onMediaPlaying = () => { + super(e, t, i, "stream-controller", te.MAIN), this.audioCodecSwap = !1, this.level = -1, this._forceStartLoad = !1, this._hasEnoughToStart = !1, this.altAudio = 0, this.audioOnly = !1, this.fragPlaying = null, this.fragLastKbps = 0, this.couldBacktrack = !1, this.backtrackFragment = null, this.audioCodecSwitch = !1, this.videoBuffer = null, this.onMediaPlaying = () => { this.tick(); }, this.onMediaSeeked = () => { const s = this.media, r = s ? s.currentTime : null; - if (r === null || !Z(r) || (this.log(`Media seeked to ${r.toFixed(3)}`), !this.getBufferedFrag(r))) + if (r === null || !J(r) || (this.log(`Media seeked to ${r.toFixed(3)}`), !this.getBufferedFrag(r))) return; - const a = this.getFwdBufferInfoAtPos(s, r, J.MAIN, 0); + const a = this.getFwdBufferInfoAtPos(s, r, te.MAIN, 0); if (a === null || a.len === 0) { this.warn(`Main forward buffer length at ${r} on "seeked" event ${a ? a.len : "empty"})`); return; @@ -31031,7 +31099,7 @@ class hF extends pf { lastCurrentTime: i, hls: s } = this; - if (this.stopLoad(), this.setInterval(cF), this.level = -1, !this.startFragRequested) { + if (this.stopLoad(), this.setInterval(FF), this.level = -1, !this.startFragRequested) { let r = s.startLevel; r === -1 && (s.config.testBandwidth && this.levels.length > 1 ? (r = 0, this.bitrateTest = !0) : r = s.firstAutoLevel), s.nextLoadLevel = r, this.level = s.loadLevel, this._hasEnoughToStart = !!t; } @@ -31115,26 +31183,26 @@ class hF extends pf { this.backtrackFragment && this.backtrackFragment.start > o.end && (this.backtrackFragment = null); const d = this.backtrackFragment ? this.backtrackFragment.start : o.end; let f = this.getNextFragment(d, l); - if (this.couldBacktrack && !this.fragPrevious && f && Ye(f) && this.fragmentTracker.getState(f) !== Ze.OK) { + if (this.couldBacktrack && !this.fragPrevious && f && Ze(f) && this.fragmentTracker.getState(f) !== nt.OK) { var m; const p = ((m = this.backtrackFragment) != null ? m : f).sn - l.startSN, y = l.fragments[p - 1]; y && f.cc === y.cc && (f = y, this.fragmentTracker.removeFragment(y)); } else this.backtrackFragment && o.len && (this.backtrackFragment = null); if (f && this.isLoopLoading(f, d)) { if (!f.gap) { - const p = this.audioOnly && !this.altAudio ? Fe.AUDIO : Fe.VIDEO, y = (p === Fe.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media; - y && this.afterBufferFlushed(y, p, J.MAIN); + const p = this.audioOnly && !this.altAudio ? Pe.AUDIO : Pe.VIDEO, y = (p === Pe.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media; + y && this.afterBufferFlushed(y, p, te.MAIN); } - f = this.getNextFragmentLoopLoading(f, l, o, J.MAIN, h); + f = this.getNextFragmentLoopLoading(f, l, o, te.MAIN, h); } f && (f.initSegment && !f.initSegment.data && !this.bitrateTest && (f = f.initSegment), this.loadFragment(f, a, d)); } loadFragment(e, t, i) { const s = this.fragmentTracker.getState(e); - s === Ze.NOT_LOADED || s === Ze.PARTIAL ? Ye(e) ? this.bitrateTest ? (this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`), this._loadBitrateTestFrag(e, t)) : super.loadFragment(e, t, i) : this._loadInitSegment(e, t) : this.clearTrackerIfNeeded(e); + s === nt.NOT_LOADED || s === nt.PARTIAL ? Ze(e) ? this.bitrateTest ? (this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`), this._loadBitrateTestFrag(e, t)) : super.loadFragment(e, t, i) : this._loadInitSegment(e, t) : this.clearTrackerIfNeeded(e); } getBufferedFrag(e) { - return this.fragmentTracker.getBufferedFrag(e, J.MAIN); + return this.fragmentTracker.getBufferedFrag(e, te.MAIN); } followingBufferedFrag(e) { return e ? this.getBufferedFrag(e.end + 0.5) : null; @@ -31204,13 +31272,13 @@ class hF extends pf { onMediaAttached(e, t) { super.onMediaAttached(e, t); const i = t.media; - ti(i, "playing", this.onMediaPlaying), ti(i, "seeked", this.onMediaSeeked); + ri(i, "playing", this.onMediaPlaying), ri(i, "seeked", this.onMediaSeeked); } onMediaDetaching(e, t) { const { media: i } = this; - i && (Di(i, "playing", this.onMediaPlaying), Di(i, "seeked", this.onMediaSeeked)), this.videoBuffer = null, this.fragPlaying = null, super.onMediaDetaching(e, t), !t.transferMedia && (this._hasEnoughToStart = !1); + i && (Mi(i, "playing", this.onMediaPlaying), Mi(i, "seeked", this.onMediaSeeked)), this.videoBuffer = null, this.fragPlaying = null, super.onMediaDetaching(e, t), !t.transferMedia && (this._hasEnoughToStart = !1); } onManifestLoading() { super.onManifestLoading(), this.log("Trigger BUFFER_RESET"), this.hls.trigger(b.BUFFER_RESET, void 0), this.couldBacktrack = !1, this.fragLastKbps = 0, this.fragPlaying = this.backtrackFragment = null, this.altAudio = 0, this.audioOnly = !1; @@ -31220,7 +31288,7 @@ class hF extends pf { t.levels.forEach((r) => { const a = r.audioCodec; a && (i = i || a.indexOf("mp4a.40.2") !== -1, s = s || a.indexOf("mp4a.40.5") !== -1); - }), this.audioCodecSwitch = i && s && !uF(), this.audioCodecSwitch && this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = t.levels, this.startFragRequested = !1; + }), this.audioCodecSwitch = i && s && !CF(), this.audioCodecSwitch && this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = t.levels, this.startFragRequested = !1; } onLevelLoading(e, t) { const { @@ -31274,7 +31342,7 @@ class hF extends pf { if ((!u && i.readyState < 4 || r < o - c) && (this._hasEnoughToStart || (this.nextLoadPosition = s), i.readyState)) if (this.warn(`Playback: ${r.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${s.toFixed(3)}`), this.config.liveSyncMode === "buffered") { var l; - const h = le.bufferInfo(i, s, 0); + const h = ue.bufferInfo(i, s, 0); if (!(h != null && (l = h.buffered) != null && l.length)) { i.currentTime = s; return; @@ -31285,7 +31353,7 @@ class hF extends pf { } const { nextStart: f - } = le.bufferedInfo(h.buffered, r, 0); + } = ue.bufferedInfo(h.buffered, r, 0); f && (i.currentTime = f); } else i.currentTime = s; @@ -31313,12 +31381,12 @@ class hF extends pf { this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`), this.fragmentTracker.removeFragment(i); return; } - const l = o.videoCodec, c = u.PTSKnown || !u.live, h = (t = i.initSegment) == null ? void 0 : t.data, d = this._getAudioCodec(o), f = this.transmuxer = this.transmuxer || new tE(this.hls, J.MAIN, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)), m = s ? s.index : -1, g = m !== -1, p = new mf(i.level, i.sn, i.stats.chunkCount, r.byteLength, m, g), y = this.initPTS[i.cc]; + const l = o.videoCodec, c = u.PTSKnown || !u.live, h = (t = i.initSegment) == null ? void 0 : t.data, d = this._getAudioCodec(o), f = this.transmuxer = this.transmuxer || new _E(this.hls, te.MAIN, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)), m = s ? s.index : -1, g = m !== -1, p = new Of(i.level, i.sn, i.stats.chunkCount, r.byteLength, m, g), y = this.initPTS[i.cc]; f.push(r, h, d, l, i, s, u.totalduration, c, p, y); } onAudioTrackSwitching(e, t) { const i = this.hls, s = this.altAudio === 2; - if (Ul(t.url, i)) + if (su(t.url, i)) this.altAudio = 1; else { if (this.mediaBuffer !== this.media) { @@ -31341,7 +31409,7 @@ class hF extends pf { } } onAudioTrackSwitched(e, t) { - const i = Ul(t.url, this.hls); + const i = su(t.url, this.hls); if (i) { const s = this.videoBuffer; s && this.mediaBuffer !== s && (this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"), this.mediaBuffer = s); @@ -31367,17 +31435,17 @@ class hF extends pf { const { frag: i, part: s - } = t, r = i.type === J.MAIN; + } = t, r = i.type === te.MAIN; if (r) { if (this.fragContextChanged(i)) { this.warn(`Fragment ${i.sn}${s ? " p: " + s.index : ""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`), this.state === V.PARSED && (this.state = V.IDLE); return; } const o = s ? s.stats : i.stats; - this.fragLastKbps = Math.round(8 * o.total / (o.buffering.end - o.loading.first)), Ye(i) && (this.fragPrevious = i), this.fragBufferedComplete(i, s); + this.fragLastKbps = Math.round(8 * o.total / (o.buffering.end - o.loading.first)), Ze(i) && (this.fragPrevious = i), this.fragBufferedComplete(i, s); } const a = this.media; - a && (!this._hasEnoughToStart && le.getBuffered(a).length && (this._hasEnoughToStart = !0, this.seekToStartPos()), r && this.tick()); + a && (!this._hasEnoughToStart && ue.getBuffered(a).length && (this._hasEnoughToStart = !0, this.seekToStartPos()), r && this.tick()); } get hasEnoughToStart() { return this._hasEnoughToStart; @@ -31389,32 +31457,32 @@ class hF extends pf { return; } switch (t.details) { - case O.FRAG_GAP: - case O.FRAG_PARSING_ERROR: - case O.FRAG_DECRYPT_ERROR: - case O.FRAG_LOAD_ERROR: - case O.FRAG_LOAD_TIMEOUT: - case O.KEY_LOAD_ERROR: - case O.KEY_LOAD_TIMEOUT: - this.onFragmentOrKeyLoadError(J.MAIN, t); + case P.FRAG_GAP: + case P.FRAG_PARSING_ERROR: + case P.FRAG_DECRYPT_ERROR: + case P.FRAG_LOAD_ERROR: + case P.FRAG_LOAD_TIMEOUT: + case P.KEY_LOAD_ERROR: + case P.KEY_LOAD_TIMEOUT: + this.onFragmentOrKeyLoadError(te.MAIN, t); break; - case O.LEVEL_LOAD_ERROR: - case O.LEVEL_LOAD_TIMEOUT: - case O.LEVEL_PARSING_ERROR: + case P.LEVEL_LOAD_ERROR: + case P.LEVEL_LOAD_TIMEOUT: + case P.LEVEL_PARSING_ERROR: !t.levelRetry && this.state === V.WAITING_LEVEL && ((i = t.context) == null ? void 0 : i.type) === me.LEVEL && (this.state = V.IDLE); break; - case O.BUFFER_ADD_CODEC_ERROR: - case O.BUFFER_APPEND_ERROR: + case P.BUFFER_ADD_CODEC_ERROR: + case P.BUFFER_APPEND_ERROR: if (t.parent !== "main") return; this.reduceLengthAndFlushBuffer(t) && this.resetLoadingState(); break; - case O.BUFFER_FULL_ERROR: + case P.BUFFER_FULL_ERROR: if (t.parent !== "main") return; this.reduceLengthAndFlushBuffer(t) && this.flushMainBuffer(0, Number.POSITIVE_INFINITY); break; - case O.INTERNAL_EXCEPTION: + case P.INTERNAL_EXCEPTION: this.recoverWorkerError(t); break; } @@ -31425,9 +31493,9 @@ class hF extends pf { onBufferFlushed(e, { type: t }) { - if (t !== Fe.AUDIO || !this.altAudio) { - const i = (t === Fe.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media; - i && (this.afterBufferFlushed(i, t, J.MAIN), this.tick()); + if (t !== Pe.AUDIO || !this.altAudio) { + const i = (t === Pe.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media; + i && (this.afterBufferFlushed(i, t, te.MAIN), this.tick()); } } onLevelsUpdated(e, t) { @@ -31454,7 +31522,7 @@ class hF extends pf { } const s = this.timelineOffset; s && i && (i += s); - const r = this.getLevelDetails(), a = le.getBuffered(e), o = a.length ? a.start(0) : 0, u = o - i, l = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance); + const r = this.getLevelDetails(), a = ue.getBuffered(e), o = a.length ? a.start(0) : 0, u = o - i, l = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance); (this.config.startOnSegmentBoundary || u > 0 && (u < l || this.loadingParts && u < 2 * ((r == null ? void 0 : r.partTarget) || 0))) && (this.log(`adjusting start position by ${u} to match buffer start`), i += u, this.startPosition = i), t < i && (this.log(`seek to target start position ${i} from current time ${t} buffer start ${o}`), e.currentTime = i); } } @@ -31512,7 +31580,7 @@ class hF extends pf { }); } const y = m.initPTS, v = m.timescale, _ = this.initPTS[u.cc]; - Z(y) && (!_ || _.baseTime !== y || _.timescale !== v) && (this.initPTS[u.cc] = { + J(y) && (!_ || _.baseTime !== y || _.timescale !== v) && (this.initPTS[u.cc] = { baseTime: y, timescale: v }, s.trigger(b.INIT_PTS_FOUND, { @@ -31529,25 +31597,25 @@ class hF extends pf { const { startPTS: E, endPTS: T, - startDTS: A, + startDTS: x, endDTS: S } = h; if (l) l.elementaryStreams[h.type] = { startPTS: E, endPTS: T, - startDTS: A, + startDTS: x, endDTS: S }; else if (h.firstKeyFrame && h.independent && a.id === 1 && !_ && (this.couldBacktrack = !0), h.dropped && h.independent) { - const D = this.getMainFwdBufferInfo(), x = (D ? D.end : this.getLoadPosition()) + this.config.maxBufferHole, w = h.firstKeyFramePTS ? h.firstKeyFramePTS : E; - if (!v && x < w - this.config.maxBufferHole && !_) { + const D = this.getMainFwdBufferInfo(), A = (D ? D.end : this.getLoadPosition()) + this.config.maxBufferHole, w = h.firstKeyFramePTS ? h.firstKeyFramePTS : E; + if (!v && A < w - this.config.maxBufferHole && !_) { this.backtrack(u); return; } else _ && (u.gap = !0); u.setElementaryStreamInfo(h.type, u.start, T, u.start, S, !0); - } else v && E - (g.appliedTimelineOffset || 0) > Tl && (u.gap = !0); - u.setElementaryStreamInfo(h.type, E, T, A, S), this.backtrackFragment && (this.backtrackFragment = u), this.bufferFragmentData(h, u, l, a, v || _); + } else v && E - (g.appliedTimelineOffset || 0) > Gl && (u.gap = !0); + u.setElementaryStreamInfo(h.type, E, T, x, S), this.backtrackFragment && (this.backtrackFragment = u), this.bufferFragmentData(h, u, l, a, v || _); } else if (v || _) u.gap = !0; else { @@ -31562,12 +31630,12 @@ class hF extends pf { startDTS: _, endDTS: E } = p; - l && (l.elementaryStreams[Fe.AUDIO] = { + l && (l.elementaryStreams[Pe.AUDIO] = { startPTS: y, endPTS: v, startDTS: _, endDTS: E - }), u.setElementaryStreamInfo(Fe.AUDIO, y, v, _, E), this.bufferFragmentData(p, u, l, a); + }), u.setElementaryStreamInfo(Pe.AUDIO, y, v, _, E), this.bufferFragmentData(p, u, l, a); } if (g && f != null && (t = f.samples) != null && t.length) { const y = { @@ -31589,7 +31657,7 @@ class hF extends pf { } } logMuxedErr(e) { - this.warn(`${Ye(e) ? "Media" : "Init"} segment with muxed audiovideo where only video expected: ${e.url}`); + this.warn(`${Ze(e) ? "Media" : "Init"} segment with muxed audiovideo where only video expected: ${e.url}`); } _bufferInitSegment(e, t, i, s) { if (this.state !== V.PARSING) @@ -31602,7 +31670,7 @@ class hF extends pf { } = t; if (r) { const l = e.audioCodec; - let c = gl(r.codec, l); + let c = Pl(r.codec, l); c === "mp4a" && (c = "mp4a.40.5"); const h = navigator.userAgent.toLowerCase(); if (this.audioCodecSwitch) { @@ -31610,10 +31678,10 @@ class hF extends pf { const d = r.metadata; d && "channelCount" in d && (d.channelCount || 1) !== 1 && h.indexOf("firefox") === -1 && (c = "mp4a.40.5"); } - c && c.indexOf("mp4a.40.5") !== -1 && h.indexOf("android") !== -1 && r.container !== "audio/mpeg" && (c = "mp4a.40.2", this.log(`Android: force audio codec to ${c}`)), l && l !== c && this.log(`Swapping manifest audio codec "${l}" for "${c}"`), r.levelCodec = c, r.id = J.MAIN, this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${c || ""}/${l || ""}/${r.codec}]`), delete t.audiovideo; + c && c.indexOf("mp4a.40.5") !== -1 && h.indexOf("android") !== -1 && r.container !== "audio/mpeg" && (c = "mp4a.40.2", this.log(`Android: force audio codec to ${c}`)), l && l !== c && this.log(`Swapping manifest audio codec "${l}" for "${c}"`), r.levelCodec = c, r.id = te.MAIN, this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${c || ""}/${l || ""}/${r.codec}]`), delete t.audiovideo; } if (a) { - a.levelCodec = e.videoCodec, a.id = J.MAIN; + a.levelCodec = e.videoCodec, a.id = te.MAIN; const l = a.codec; if ((l == null ? void 0 : l.length) === 4) switch (l) { @@ -31651,7 +31719,7 @@ class hF extends pf { } getMainFwdBufferInfo() { const e = this.mediaBuffer && this.altAudio === 2 ? this.mediaBuffer : this.media; - return this.getFwdBufferInfo(e, J.MAIN); + return this.getFwdBufferInfo(e, te.MAIN); } get maxBufferLength() { const { @@ -31668,7 +31736,7 @@ class hF extends pf { let t = null; if (e && e.readyState > 1 && e.seeking === !1) { const i = e.currentTime; - if (le.isBuffered(e, i) ? t = this.getAppendedFrag(i) : le.isBuffered(e, i + 0.1) && (t = this.getAppendedFrag(i + 0.1)), t) { + if (ue.isBuffered(e, i) ? t = this.getAppendedFrag(i) : ue.isBuffered(e, i + 0.1) && (t = this.getAppendedFrag(i + 0.1)), t) { this.backtrackFragment = null; const s = this.fragPlaying, r = t.level; (!s || t.sn !== s.sn || s.level !== r) && (this.fragPlaying = t, this.hls.trigger(b.FRAG_CHANGED, { @@ -31688,13 +31756,13 @@ class hF extends pf { if (this.fragPlaying) return this.fragPlaying; const t = ((e = this.media) == null ? void 0 : e.currentTime) || this.lastCurrentTime; - return Z(t) ? this.getAppendedFrag(t) : null; + return J(t) ? this.getAppendedFrag(t) : null; } get currentProgramDateTime() { var e; const t = ((e = this.media) == null ? void 0 : e.currentTime) || this.lastCurrentTime; - if (Z(t)) { - const i = this.getLevelDetails(), s = this.currentFrag || (i ? ws(null, i.fragments, t) : null); + if (J(t)) { + const i = this.getLevelDetails(), s = this.currentFrag || (i ? Bs(null, i.fragments, t) : null); if (s) { const r = s.programDateTime; if (r !== null) { @@ -31717,7 +31785,7 @@ class hF extends pf { return this._forceStartLoad; } } -class dF { +class OF { constructor(e) { this.config = void 0, this.keyUriToKeyInfo = {}, this.emeController = null, this.config = e; } @@ -31746,9 +31814,9 @@ class dF { } this.keyUriToKeyInfo = {}; } - createKeyLoadError(e, t = O.KEY_LOAD_ERROR, i, s, r) { - return new bn({ - type: ie.NETWORK_ERROR, + createKeyLoadError(e, t = P.KEY_LOAD_ERROR, i, s, r) { + return new Tn({ + type: ne.NETWORK_ERROR, details: t, fatal: !1, frag: e, @@ -31762,18 +31830,18 @@ class dF { if (t.length) for (let s = 0, r = t.length; s < r; s++) { const a = t[s]; - if (e.cc <= a.cc && (!Ye(e) || !Ye(a) || e.sn < a.sn) || !i && s == r - 1) + if (e.cc <= a.cc && (!Ze(e) || !Ze(a) || e.sn < a.sn) || !i && s == r - 1) return this.emeController.selectKeySystemFormat(a).then((o) => { if (!this.emeController) return; a.setKeyFormat(o); - const u = hd(o); + const u = Cd(o); if (u) return this.emeController.getKeySystemAccess([u]); }); } if (this.config.requireKeySystemAccessOnStart) { - const s = _l(this.config); + const s = Ml(this.config); if (s.length) return this.emeController.getKeySystemAccess(s); } @@ -31789,11 +31857,11 @@ class dF { const r = e.decryptdata; if (!r) { const l = new Error(t ? `Expected frag.decryptdata to be defined after setting format ${t}` : "Missing decryption data on fragment in onKeyLoading"); - return Promise.reject(this.createKeyLoadError(e, O.KEY_LOAD_ERROR, l)); + return Promise.reject(this.createKeyLoadError(e, P.KEY_LOAD_ERROR, l)); } const a = r.uri; if (!a) - return Promise.reject(this.createKeyLoadError(e, O.KEY_LOAD_ERROR, new Error(`Invalid key URI: "${a}"`))); + return Promise.reject(this.createKeyLoadError(e, P.KEY_LOAD_ERROR, new Error(`Invalid key URI: "${a}"`))); let o = this.keyUriToKeyInfo[a]; if ((i = o) != null && i.decryptdata.key) return r.key = o.decryptdata.key, Promise.resolve({ @@ -31829,7 +31897,7 @@ class dF { case "AES-256-CTR": return this.loadKeyHTTP(o, e); default: - return Promise.reject(this.createKeyLoadError(e, O.KEY_LOAD_ERROR, new Error(`Key supplied with unsupported METHOD: "${r.method}"`))); + return Promise.reject(this.createKeyLoadError(e, P.KEY_LOAD_ERROR, new Error(`Key supplied with unsupported METHOD: "${r.method}"`))); } } loadKeyEME(e, t) { @@ -31868,23 +31936,23 @@ class dF { url: v } = m; if (!p.decryptdata || y !== this.keyUriToKeyInfo[v]) - return o(this.createKeyLoadError(p, O.KEY_LOAD_ERROR, new Error("after key load, decryptdata unset or changed"), g)); + return o(this.createKeyLoadError(p, P.KEY_LOAD_ERROR, new Error("after key load, decryptdata unset or changed"), g)); y.decryptdata.key = p.decryptdata.key = new Uint8Array(d.data), p.keyLoader = null, y.loader = null, a({ frag: p, keyInfo: y }); }, onError: (d, f, m, g) => { - this.resetLoader(f), o(this.createKeyLoadError(t, O.KEY_LOAD_ERROR, new Error(`HTTP Error ${d.code} loading key ${d.text}`), m, Le({ + this.resetLoader(f), o(this.createKeyLoadError(t, P.KEY_LOAD_ERROR, new Error(`HTTP Error ${d.code} loading key ${d.text}`), m, Ie({ url: u.url, data: void 0 }, d))); }, onTimeout: (d, f, m) => { - this.resetLoader(f), o(this.createKeyLoadError(t, O.KEY_LOAD_TIMEOUT, new Error("key loading timed out"), m)); + this.resetLoader(f), o(this.createKeyLoadError(t, P.KEY_LOAD_TIMEOUT, new Error("key loading timed out"), m)); }, onAbort: (d, f, m) => { - this.resetLoader(f), o(this.createKeyLoadError(t, O.INTERNAL_ABORTED, new Error("key loading aborted"), m)); + this.resetLoader(f), o(this.createKeyLoadError(t, P.INTERNAL_ABORTED, new Error("key loading aborted"), m)); } }; r.load(u, c, h); @@ -31899,24 +31967,24 @@ class dF { t.keyLoader === r && (t.keyLoader = null, i.loader = null), delete this.keyUriToKeyInfo[s], r && r.destroy(); } } -function w0(n) { +function q0(n) { const { type: e } = n; switch (e) { case me.AUDIO_TRACK: - return J.AUDIO; + return te.AUDIO; case me.SUBTITLE_TRACK: - return J.SUBTITLE; + return te.SUBTITLE; default: - return J.MAIN; + return te.MAIN; } } -function fh(n, e) { +function Fh(n, e) { let t = n.url; return (t === void 0 || t.indexOf("data:") === 0) && (t = e.url), t; } -class fF { +class MF { constructor(e) { this.hls = void 0, this.loaders = /* @__PURE__ */ Object.create(null), this.variableList = null, this.onManifestLoaded = this.checkAutostartLoad, this.hls = e, this.registerListeners(); } @@ -32054,16 +32122,16 @@ class fF { l.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`), s.abort(); } let r; - if (e.type === me.MANIFEST ? r = i.manifestLoadPolicy.default : r = De({}, i.playlistLoadPolicy.default, { + if (e.type === me.MANIFEST ? r = i.manifestLoadPolicy.default : r = we({}, i.playlistLoadPolicy.default, { timeoutRetry: null, errorRetry: null - }), s = this.createInternalLoader(e), Z((t = e.deliveryDirectives) == null ? void 0 : t.part)) { + }), s = this.createInternalLoader(e), J((t = e.deliveryDirectives) == null ? void 0 : t.part)) { let l; if (e.type === me.LEVEL && e.level !== null ? l = this.hls.levels[e.level].details : e.type === me.AUDIO_TRACK && e.id !== null ? l = this.hls.audioTracks[e.id].details : e.type === me.SUBTITLE_TRACK && e.id !== null && (l = this.hls.subtitleTracks[e.id].details), l) { const c = l.partTarget, h = l.targetduration; if (c && h) { const d = Math.max(c * 3, h * 0.8) * 1e3; - r = De({}, r, { + r = we({}, r, { maxTimeToFirstByteMs: Math.min(d, r.maxTimeToFirstByteMs), maxLoadTimeMs: Math.min(d, r.maxTimeToFirstByteMs) }); @@ -32085,7 +32153,7 @@ class fF { this.handleManifestParsingError(l, h, new Error("no EXTM3U delimiter"), d || null, c); return; } - c.parsing.start = performance.now(), nn.isMediaPlaylist(m) || h.type !== me.MANIFEST ? this.handleTrackOrLevelPlaylist(l, c, h, d || null, f) : this.handleMasterPlaylist(l, c, h, d); + c.parsing.start = performance.now(), an.isMediaPlaylist(m) || h.type !== me.MANIFEST ? this.handleTrackOrLevelPlaylist(l, c, h, d || null, f) : this.handleMasterPlaylist(l, c, h, d); }, onError: (l, c, h, d) => { this.handleNetworkError(c, h, !1, l, d); @@ -32109,7 +32177,7 @@ class fF { (e || i) && (this.hls.logger.log(`${e ? "auto" : "force"} startLoad with configured startPosition ${t}`), this.hls.startLoad(t)); } handleMasterPlaylist(e, t, i, s) { - const r = this.hls, a = e.data, o = fh(e, i), u = nn.parseMasterPlaylist(a, o); + const r = this.hls, a = e.data, o = Fh(e, i), u = an.parseMasterPlaylist(a, o); if (u.playlistParsingError) { this.handleManifestParsingError(e, i, u.playlistParsingError, s, t); return; @@ -32127,7 +32195,7 @@ class fF { AUDIO: g = [], SUBTITLES: p, "CLOSED-CAPTIONS": y - } = nn.parseMasterPlaylistMedia(a, o, u); + } = an.parseMasterPlaylistMedia(a, o, u); g.length && !g.some((_) => !_.url) && c[0].audioCodec && !c[0].attrs.AUDIO && (this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"), g.unshift({ type: "main", name: "main", @@ -32136,7 +32204,7 @@ class fF { autoselect: !1, forced: !1, id: -1, - attrs: new Be({}), + attrs: new Ue({}), bitrate: 0, url: "" })), r.trigger(b.MANIFEST_LOADED, { @@ -32159,16 +32227,16 @@ class fF { id: o, level: u, type: l - } = i, c = fh(e, i), h = Z(u) ? u : Z(o) ? o : 0, d = w0(i), f = nn.parseLevelPlaylist(e.data, c, h, d, 0, this.variableList); + } = i, c = Fh(e, i), h = J(u) ? u : J(o) ? o : 0, d = q0(i), f = an.parseLevelPlaylist(e.data, c, h, d, 0, this.variableList); if (l === me.MANIFEST) { const m = { - attrs: new Be({}), + attrs: new Ue({}), bitrate: 0, details: f, name: "", url: c }; - f.requestScheduled = t.loading.start + ky(f, 0), a.trigger(b.MANIFEST_LOADED, { + f.requestScheduled = t.loading.start + jy(f, 0), a.trigger(b.MANIFEST_LOADED, { levels: [m], audioTracks: [], url: c, @@ -32185,8 +32253,8 @@ class fF { } handleManifestParsingError(e, t, i, s, r) { this.hls.trigger(b.ERROR, { - type: ie.NETWORK_ERROR, - details: O.MANIFEST_PARSING_ERROR, + type: ne.NETWORK_ERROR, + details: P.MANIFEST_PARSING_ERROR, fatal: t.type === me.MANIFEST, url: e.url, err: i, @@ -32203,25 +32271,25 @@ class fF { e.type === me.LEVEL ? a += `: ${e.level} id: ${e.id}` : (e.type === me.AUDIO_TRACK || e.type === me.SUBTITLE_TRACK) && (a += ` id: ${e.id} group-id: "${e.groupId}"`); const o = new Error(a); this.hls.logger.warn(`[playlist-loader]: ${a}`); - let u = O.UNKNOWN, l = !1; + let u = P.UNKNOWN, l = !1; const c = this.getInternalLoader(e); switch (e.type) { case me.MANIFEST: - u = i ? O.MANIFEST_LOAD_TIMEOUT : O.MANIFEST_LOAD_ERROR, l = !0; + u = i ? P.MANIFEST_LOAD_TIMEOUT : P.MANIFEST_LOAD_ERROR, l = !0; break; case me.LEVEL: - u = i ? O.LEVEL_LOAD_TIMEOUT : O.LEVEL_LOAD_ERROR, l = !1; + u = i ? P.LEVEL_LOAD_TIMEOUT : P.LEVEL_LOAD_ERROR, l = !1; break; case me.AUDIO_TRACK: - u = i ? O.AUDIO_TRACK_LOAD_TIMEOUT : O.AUDIO_TRACK_LOAD_ERROR, l = !1; + u = i ? P.AUDIO_TRACK_LOAD_TIMEOUT : P.AUDIO_TRACK_LOAD_ERROR, l = !1; break; case me.SUBTITLE_TRACK: - u = i ? O.SUBTITLE_TRACK_LOAD_TIMEOUT : O.SUBTITLE_LOAD_ERROR, l = !1; + u = i ? P.SUBTITLE_TRACK_LOAD_TIMEOUT : P.SUBTITLE_LOAD_ERROR, l = !1; break; } c && this.resetInternalLoader(e.type); const h = { - type: ie.NETWORK_ERROR, + type: ne.NETWORK_ERROR, details: u, fatal: l, url: e.url, @@ -32233,7 +32301,7 @@ class fF { }; if (s) { const d = (t == null ? void 0 : t.url) || e.url; - h.response = Le({ + h.response = Ie({ url: d, data: void 0 }, s); @@ -32247,12 +32315,12 @@ class fF { id: c, groupId: h, deliveryDirectives: d - } = s, f = fh(t, s), m = w0(s), g = typeof s.level == "number" && m === J.MAIN ? l : void 0; + } = s, f = Fh(t, s), m = q0(s), g = typeof s.level == "number" && m === te.MAIN ? l : void 0; if (!e.fragments.length) { const y = e.playlistParsingError = new Error("No Segments found in Playlist"); o.trigger(b.ERROR, { - type: ie.NETWORK_ERROR, - details: O.LEVEL_EMPTY_ERROR, + type: ne.NETWORK_ERROR, + details: P.LEVEL_EMPTY_ERROR, fatal: !1, url: f, error: y, @@ -32271,8 +32339,8 @@ class fF { if (p) { if (this.hls.logger.warn(p), !o.config.ignorePlaylistParsingErrors) { o.trigger(b.ERROR, { - type: ie.NETWORK_ERROR, - details: O.LEVEL_PARSING_ERROR, + type: ne.NETWORK_ERROR, + details: P.LEVEL_PARSING_ERROR, fatal: !1, url: f, error: p, @@ -32327,81 +32395,81 @@ class fF { } } } -class Vt { +class Yt { /** * Get the video-dev/hls.js package version. */ static get version() { - return Ba; + return Xa; } /** * Check if the required MediaSource Extensions are available. */ static isMSESupported() { - return AE(); + return UE(); } /** * Check if MediaSource Extensions are available and isTypeSupported checks pass for any baseline codecs. */ static isSupported() { - return lF(); + return RF(); } /** * Get the MediaSource global used for MSE playback (ManagedMediaSource, MediaSource, or WebKitMediaSource). */ static getMediaSource() { - return Qn(); + return ns(); } static get Events() { return b; } static get MetadataSchema() { - return Ht; + return Wt; } static get ErrorTypes() { - return ie; + return ne; } static get ErrorDetails() { - return O; + return P; } /** * Get the default configuration applied to new instances. */ static get DefaultConfig() { - return Vt.defaultConfig ? Vt.defaultConfig : X2; + return Yt.defaultConfig ? Yt.defaultConfig : yF; } /** * Replace the default configuration applied to new instances. */ static set DefaultConfig(e) { - Vt.defaultConfig = e; + Yt.defaultConfig = e; } /** * Creates an instance of an HLS client that can attach to exactly one `HTMLMediaElement`. * @param userConfig - Configuration options applied over `Hls.DefaultConfig` */ constructor(e = {}) { - this.config = void 0, this.userConfig = void 0, this.logger = void 0, this.coreComponents = void 0, this.networkControllers = void 0, this._emitter = new _f(), this._autoLevelCapping = -1, this._maxHdcpLevel = null, this.abrController = void 0, this.bufferController = void 0, this.capLevelController = void 0, this.latencyController = void 0, this.levelController = void 0, this.streamController = void 0, this.audioStreamController = void 0, this.subtititleStreamController = void 0, this.audioTrackController = void 0, this.subtitleTrackController = void 0, this.interstitialsController = void 0, this.gapController = void 0, this.emeController = void 0, this.cmcdController = void 0, this._media = null, this._url = null, this._sessionId = void 0, this.triggeringException = void 0, this.started = !1; - const t = this.logger = FI(e.debug || !1, "Hls instance", e.assetPlayerId), i = this.config = Z2(Vt.DefaultConfig, e, t); - this.userConfig = e, i.progressive && J2(i, t); + this.config = void 0, this.userConfig = void 0, this.logger = void 0, this.coreComponents = void 0, this.networkControllers = void 0, this._emitter = new Bf(), this._autoLevelCapping = -1, this._maxHdcpLevel = null, this.abrController = void 0, this.bufferController = void 0, this.capLevelController = void 0, this.latencyController = void 0, this.levelController = void 0, this.streamController = void 0, this.audioStreamController = void 0, this.subtititleStreamController = void 0, this.audioTrackController = void 0, this.subtitleTrackController = void 0, this.interstitialsController = void 0, this.gapController = void 0, this.emeController = void 0, this.cmcdController = void 0, this._media = null, this._url = null, this._sessionId = void 0, this.triggeringException = void 0, this.started = !1; + const t = this.logger = ik(e.debug || !1, "Hls instance", e.assetPlayerId), i = this.config = bF(Yt.DefaultConfig, e, t); + this.userConfig = e, i.progressive && TF(i, t); const { abrController: s, bufferController: r, capLevelController: a, errorController: o, fpsController: u - } = i, l = new o(this), c = this.abrController = new s(this), h = new Ak(this), d = i.interstitialsController, f = d ? this.interstitialsController = new d(this, Vt) : null, m = this.bufferController = new r(this, h), g = this.capLevelController = new a(this), p = new u(this), y = new fF(this), v = i.contentSteeringController, _ = v ? new v(this) : null, E = this.levelController = new oF(this, _), T = new rF(this), A = new dF(this.config), S = this.streamController = new hF(this, h, A), D = this.gapController = new nF(this, h); + } = i, l = new o(this), c = this.abrController = new s(this), h = new zk(this), d = i.interstitialsController, f = d ? this.interstitialsController = new d(this, Yt) : null, m = this.bufferController = new r(this, h), g = this.capLevelController = new a(this), p = new u(this), y = new MF(this), v = i.contentSteeringController, _ = v ? new v(this) : null, E = this.levelController = new kF(this, _), T = new LF(this), x = new OF(this.config), S = this.streamController = new PF(this, h, x), D = this.gapController = new DF(this, h); g.setStreamController(S), p.setStreamController(S); - const x = [y, E, S]; - f && x.splice(1, 0, f), _ && x.splice(1, 0, _), this.networkControllers = x; + const A = [y, E, S]; + f && A.splice(1, 0, f), _ && A.splice(1, 0, _), this.networkControllers = A; const w = [c, m, D, g, p, T, h]; - this.audioTrackController = this.createController(i.audioTrackController, x); + this.audioTrackController = this.createController(i.audioTrackController, A); const I = i.audioStreamController; - I && x.push(this.audioStreamController = new I(this, h, A)), this.subtitleTrackController = this.createController(i.subtitleTrackController, x); - const R = i.subtitleStreamController; - R && x.push(this.subtititleStreamController = new R(this, h, A)), this.createController(i.timelineController, w), A.emeController = this.emeController = this.createController(i.emeController, w), this.cmcdController = this.createController(i.cmcdController, w), this.latencyController = this.createController(aF, w), this.coreComponents = w, x.push(l); - const M = l.onErrorOut; - typeof M == "function" && this.on(b.ERROR, M, l), this.on(b.MANIFEST_LOADED, y.onManifestLoaded, y); + I && A.push(this.audioStreamController = new I(this, h, x)), this.subtitleTrackController = this.createController(i.subtitleTrackController, A); + const M = i.subtitleStreamController; + M && A.push(this.subtititleStreamController = new M(this, h, x)), this.createController(i.timelineController, w), x.emeController = this.emeController = this.createController(i.emeController, w), this.cmcdController = this.createController(i.cmcdController, w), this.latencyController = this.createController(IF, w), this.coreComponents = w, A.push(l); + const k = l.onErrorOut; + typeof k == "function" && this.on(b.ERROR, k, l), this.on(b.MANIFEST_LOADED, y.onManifestLoaded, y); } createController(e, t) { if (e) { @@ -32439,8 +32507,8 @@ class Vt { this.triggeringException = !0; const s = e === b.ERROR; this.trigger(b.ERROR, { - type: ie.OTHER_ERROR, - details: O.INTERNAL_EXCEPTION, + type: ne.OTHER_ERROR, + details: P.INTERNAL_EXCEPTION, fatal: s, event: e, error: i @@ -32467,8 +32535,8 @@ class Vt { if (!e || "media" in e && !e.media) { const r = new Error(`attachMedia failed: invalid argument (${e})`); this.trigger(b.ERROR, { - type: ie.OTHER_ERROR, - details: O.ATTACH_MEDIA_ERROR, + type: ne.OTHER_ERROR, + details: P.ATTACH_MEDIA_ERROR, fatal: !0, error: r }); @@ -32501,7 +32569,7 @@ class Vt { */ loadSource(e) { this.stopLoad(); - const t = this.media, i = this._url, s = this._url = of.buildAbsoluteURL(self.location.href, e, { + const t = this.media, i = this._url, s = this._url = Lf.buildAbsoluteURL(self.location.href, e, { alwaysNormalize: !0 }); this._autoLevelCapping = -1, this._maxHdcpLevel = null, this.logger.log(`loadSource:${s}`), t && i && (i !== s || this.bufferController.hasSourceTypes()) && (this.detachMedia(), this.attachMedia(t)), this.trigger(b.MANIFEST_LOADING, { @@ -32577,9 +32645,9 @@ class Vt { } get inFlightFragments() { const e = { - [J.MAIN]: this.streamController.inFlightFrag + [te.MAIN]: this.streamController.inFlightFrag }; - return this.audioStreamController && (e[J.AUDIO] = this.audioStreamController.inFlightFrag), this.subtititleStreamController && (e[J.SUBTITLE] = this.subtititleStreamController.inFlightFrag), e; + return this.audioStreamController && (e[te.AUDIO] = this.audioStreamController.inFlightFrag), this.subtititleStreamController && (e[te.SUBTITLE] = this.subtititleStreamController.inFlightFrag), e; } /** * Swap through possible audio codecs in the stream (for example to switch from stereo to 5.1) @@ -32606,7 +32674,7 @@ class Vt { */ get sessionId() { let e = this._sessionId; - return e || (e = this._sessionId = n2()), e; + return e || (e = this._sessionId = D2()), e; } /** * @returns an array of levels (variants) sorted by HDCP-LEVEL, RESOLUTION (height), FRAME-RATE, CODECS, VIDEO-RANGE, and BANDWIDTH @@ -32772,7 +32840,7 @@ class Vt { return this._maxHdcpLevel; } set maxHdcpLevel(e) { - lk(e) && this._maxHdcpLevel !== e && (this._maxHdcpLevel = e, this.levelController.checkMaxAutoUpdated()); + Rk(e) && this._maxHdcpLevel !== e && (this._maxHdcpLevel = e, this.levelController.checkMaxAutoUpdated()); } /** * True when automatic level selection enabled @@ -33029,78 +33097,78 @@ class Vt { * returns mediaCapabilities.decodingInfo for a variant/rendition */ getMediaDecodingInfo(e, t = this.allAudioTracks) { - const i = yy(t); - return _y(e, i, navigator.mediaCapabilities); + const i = Oy(t); + return Fy(e, i, navigator.mediaCapabilities); } } -Vt.defaultConfig = void 0; +Yt.defaultConfig = void 0; const { - SvelteComponent: mF, - action_destroyer: gF, - add_render_callback: pF, - assign: L0, - attr: $n, - binding_callbacks: _F, - children: vF, - claim_element: I0, - claim_space: yF, - create_slot: EF, - detach: Zo, - element: k0, - exclude_internal_props: R0, - flush: Bt, - get_all_dirty_from_scope: bF, - get_slot_changes: TF, - get_svelte_dataset: SF, - init: AF, - insert_hydration: mh, - is_function: xF, - listen: Hi, - raf: DF, - run_all: wF, - safe_not_equal: LF, - space: IF, - src_url_equal: C0, - toggle_class: F0, - transition_in: kF, - transition_out: RF, - update_slot_base: CF -} = window.__gradio__svelte__internal, { createEventDispatcher: FF } = window.__gradio__svelte__internal; -function PF(n) { - let e, t = '', i, s, r, a, o = !1, u, l = !0, c, h, d, f; + SvelteComponent: $F, + action_destroyer: BF, + add_render_callback: NF, + assign: K0, + attr: Kn, + binding_callbacks: UF, + children: GF, + claim_element: j0, + claim_space: HF, + create_slot: VF, + detach: _l, + element: z0, + exclude_internal_props: W0, + flush: Dt, + get_all_dirty_from_scope: qF, + get_slot_changes: KF, + get_svelte_dataset: jF, + init: zF, + insert_hydration: Ph, + is_function: WF, + listen: ji, + raf: YF, + run_all: XF, + safe_not_equal: QF, + space: ZF, + src_url_equal: Y0, + toggle_class: cr, + transition_in: JF, + transition_out: eP, + update_slot_base: tP +} = window.__gradio__svelte__internal, { createEventDispatcher: iP } = window.__gradio__svelte__internal; +function nP(n) { + let e, t = '', i, s, r, a, o = !1, u, l = !0, c, h, d, f; const m = ( /*#slots*/ - n[18].default - ), g = EF( + n[20].default + ), g = VF( m, n, /*$$scope*/ - n[17], + n[19], null ); function p() { - cancelAnimationFrame(u), s.paused || (u = DF(p), o = !0), n[19].call(s); + cancelAnimationFrame(u), s.paused || (u = YF(p), o = !0), n[21].call(s); } return { c() { - e = k0("div"), e.innerHTML = t, i = IF(), s = k0("video"), g && g.c(), this.h(); + e = z0("div"), e.innerHTML = t, i = ZF(), s = z0("video"), g && g.c(), this.h(); }, l(y) { - e = I0(y, "DIV", { class: !0, "data-svelte-h": !0 }), SF(e) !== "svelte-mez4j5" && (e.innerHTML = t), i = yF(y), s = I0(y, "VIDEO", { + e = j0(y, "DIV", { class: !0, "data-svelte-h": !0 }), jF(e) !== "svelte-mez4j5" && (e.innerHTML = t), i = HF(y), s = j0(y, "VIDEO", { src: !0, preload: !0, "data-testid": !0, crossorigin: !0 }); - var v = vF(s); - g && g.l(v), v.forEach(Zo), this.h(); + var v = GF(s); + g && g.l(v), v.forEach(_l), this.h(); }, h() { - $n(e, "class", "overlay svelte-1pwzuub"), F0(e, "hidden", !/*processingVideo*/ - n[10]), C0(s.src, r = /*resolved_src*/ - n[11]) || $n(s, "src", r), s.muted = /*muted*/ + Kn(e, "class", "overlay svelte-1p2o6nz"), cr(e, "hidden", !/*processingVideo*/ + n[12]), Y0(s.src, r = /*resolved_src*/ + n[13]) || Kn(s, "src", r), s.muted = /*muted*/ n[4], s.playsInline = /*playsinline*/ - n[5], $n( + n[5], Kn( s, "preload", /*preload*/ @@ -33108,71 +33176,81 @@ function PF(n) { ), s.autoplay = /*autoplay*/ n[7], s.controls = /*controls*/ n[8], s.loop = /*loop*/ - n[9], $n(s, "data-testid", a = /*$$props*/ - n[13]["data-testid"]), $n(s, "crossorigin", "anonymous"), /*duration*/ - n[2] === void 0 && pF(() => ( + n[9], Kn(s, "data-testid", a = /*$$props*/ + n[15]["data-testid"]), Kn(s, "crossorigin", "anonymous"), /*duration*/ + n[2] === void 0 && NF(() => ( /*video_durationchange_handler*/ - n[20].call(s) - )); + n[22].call(s) + )), cr( + s, + "fullscreen", + /*fullscreen*/ + n[10] + ), cr( + s, + "small", + /*small*/ + n[11] + ); }, m(y, v) { - mh(y, e, v), mh(y, i, v), mh(y, s, v), g && g.m(s, null), n[22](s), h = !0, d || (f = [ - Hi( + Ph(y, e, v), Ph(y, i, v), Ph(y, s, v), g && g.m(s, null), n[24](s), h = !0, d || (f = [ + ji( s, "loadeddata", /*dispatch*/ - n[12].bind(null, "loadeddata") + n[14].bind(null, "loadeddata") ), - Hi( + ji( s, "click", /*dispatch*/ - n[12].bind(null, "click") + n[14].bind(null, "click") ), - Hi( + ji( s, "play", /*dispatch*/ - n[12].bind(null, "play") + n[14].bind(null, "play") ), - Hi( + ji( s, "pause", /*dispatch*/ - n[12].bind(null, "pause") + n[14].bind(null, "pause") ), - Hi( + ji( s, "ended", /*dispatch*/ - n[12].bind(null, "ended") + n[14].bind(null, "ended") ), - Hi( + ji( s, "error", /*dispatch*/ - n[12].bind(null, "error", "Video not playable") + n[14].bind(null, "error", "Video not playable") ), - Hi(s, "timeupdate", p), - Hi( + ji(s, "timeupdate", p), + ji( s, "durationchange", /*video_durationchange_handler*/ - n[20] + n[22] ), - Hi( + ji( s, "play", /*video_play_pause_handler*/ - n[21] + n[23] ), - Hi( + ji( s, "pause", /*video_play_pause_handler*/ - n[21] + n[23] ), - gF(c = sI.call(null, s, { autoplay: ( + BF(c = wI.call(null, s, { autoplay: ( /*autoplay*/ n[7] ?? !1 ) })) @@ -33180,33 +33258,33 @@ function PF(n) { }, p(y, [v]) { (!h || v & /*processingVideo*/ - 1024) && F0(e, "hidden", !/*processingVideo*/ - y[10]), g && g.p && (!h || v & /*$$scope*/ - 131072) && CF( + 4096) && cr(e, "hidden", !/*processingVideo*/ + y[12]), g && g.p && (!h || v & /*$$scope*/ + 524288) && tP( g, m, y, /*$$scope*/ - y[17], - h ? TF( + y[19], + h ? KF( m, /*$$scope*/ - y[17], + y[19], v, null - ) : bF( + ) : qF( /*$$scope*/ - y[17] + y[19] ), null ), (!h || v & /*resolved_src*/ - 2048 && !C0(s.src, r = /*resolved_src*/ - y[11])) && $n(s, "src", r), (!h || v & /*muted*/ + 8192 && !Y0(s.src, r = /*resolved_src*/ + y[13])) && Kn(s, "src", r), (!h || v & /*muted*/ 16) && (s.muted = /*muted*/ y[4]), (!h || v & /*playsinline*/ 32) && (s.playsInline = /*playsinline*/ y[5]), (!h || v & /*preload*/ - 64) && $n( + 64) && Kn( s, "preload", /*preload*/ @@ -33218,240 +33296,265 @@ function PF(n) { y[8]), (!h || v & /*loop*/ 512) && (s.loop = /*loop*/ y[9]), (!h || v & /*$$props*/ - 8192 && a !== (a = /*$$props*/ - y[13]["data-testid"])) && $n(s, "data-testid", a), !o && v & /*currentTime*/ + 32768 && a !== (a = /*$$props*/ + y[15]["data-testid"])) && Kn(s, "data-testid", a), !o && v & /*currentTime*/ 2 && !isNaN( /*currentTime*/ y[1] ) && (s.currentTime = /*currentTime*/ y[1]), o = !1, v & /*paused*/ 8 && l !== (l = /*paused*/ - y[3]) && s[l ? "pause" : "play"](), c && xF(c.update) && v & /*autoplay*/ + y[3]) && s[l ? "pause" : "play"](), c && WF(c.update) && v & /*autoplay*/ 128 && c.update.call(null, { autoplay: ( /*autoplay*/ y[7] ?? !1 - ) }); + ) }), (!h || v & /*fullscreen*/ + 1024) && cr( + s, + "fullscreen", + /*fullscreen*/ + y[10] + ), (!h || v & /*small*/ + 2048) && cr( + s, + "small", + /*small*/ + y[11] + ); }, i(y) { - h || (kF(g, y), h = !0); + h || (JF(g, y), h = !0); }, o(y) { - RF(g, y), h = !1; + eP(g, y), h = !1; }, d(y) { - y && (Zo(e), Zo(i), Zo(s)), g && g.d(y), n[22](null), d = !1, wF(f); + y && (_l(e), _l(i), _l(s)), g && g.d(y), n[24](null), d = !1, XF(f); } }; } -function OF(n, e, t) { - let { $$slots: i = {}, $$scope: s } = e, { src: r = void 0 } = e, { muted: a = void 0 } = e, { playsinline: o = void 0 } = e, { preload: u = void 0 } = e, { autoplay: l = void 0 } = e, { controls: c = void 0 } = e, { loop: h } = e, { currentTime: d = void 0 } = e, { duration: f = void 0 } = e, { paused: m = void 0 } = e, { node: g = void 0 } = e, { is_stream: p } = e, { processingVideo: y = !1 } = e, v, _ = !1, E; - const T = FF(); - function A(I, R, M) { - if (!(!I || !R) && Vt.isSupported() && !_) { - const P = new Vt({ - // Low-latency configuration +function sP(n, e, t) { + let { $$slots: i = {}, $$scope: s } = e, { src: r = void 0 } = e, { muted: a = void 0 } = e, { playsinline: o = void 0 } = e, { preload: u = void 0 } = e, { autoplay: l = void 0 } = e, { controls: c = void 0 } = e, { loop: h } = e, { fullscreen: d = !1 } = e, { small: f = !1 } = e, { node: m = void 0 } = e, { is_stream: g } = e, { processingVideo: p = !1 } = e, { currentTime: y = void 0 } = e, { duration: v = void 0 } = e, { paused: _ = void 0 } = e, E, T = !1, x; + const S = iP(); + function D(k, q, K) { + if (!(!k || !q) && Yt.isSupported() && !T) { + const H = new Yt({ maxBufferLength: 1, maxMaxBufferLength: 1, lowLatencyMode: !0 }); - P.loadSource(I), P.attachMedia(M), P.on(Vt.Events.MANIFEST_PARSED, function() { - M.play(); - }), P.on(Vt.Events.ERROR, function(K, q) { - if (q.fatal) - switch (q.type) { - case Vt.ErrorTypes.NETWORK_ERROR: - P.startLoad(); + H.loadSource(k), H.attachMedia(K), H.on(Yt.Events.MANIFEST_PARSED, () => K.play()), H.on(Yt.Events.ERROR, (Y, B) => { + if (B.fatal) + switch (B.type) { + case Yt.ErrorTypes.NETWORK_ERROR: + H.startLoad(); break; - case Vt.ErrorTypes.MEDIA_ERROR: - P.recoverMediaError(); + case Yt.ErrorTypes.MEDIA_ERROR: + H.recoverMediaError(); break; default: - P.destroy(); + H.destroy(); break; } - }), _ = !0; + }), T = !0; } } - function S() { - d = this.currentTime, t(1, d); + function A() { + y = this.currentTime, t(1, y); } - function D() { - f = this.duration, t(2, f); + function w() { + v = this.duration, t(2, v); } - function x() { - m = this.paused, t(3, m); + function I() { + _ = this.paused, t(3, _); } - function w(I) { - _F[I ? "unshift" : "push"](() => { - g = I, t(0, g); + function M(k) { + UF[k ? "unshift" : "push"](() => { + m = k, t(0, m); }); } - return n.$$set = (I) => { - t(13, e = L0(L0({}, e), R0(I))), "src" in I && t(14, r = I.src), "muted" in I && t(4, a = I.muted), "playsinline" in I && t(5, o = I.playsinline), "preload" in I && t(6, u = I.preload), "autoplay" in I && t(7, l = I.autoplay), "controls" in I && t(8, c = I.controls), "loop" in I && t(9, h = I.loop), "currentTime" in I && t(1, d = I.currentTime), "duration" in I && t(2, f = I.duration), "paused" in I && t(3, m = I.paused), "node" in I && t(0, g = I.node), "is_stream" in I && t(15, p = I.is_stream), "processingVideo" in I && t(10, y = I.processingVideo), "$$scope" in I && t(17, s = I.$$scope); + return n.$$set = (k) => { + t(15, e = K0(K0({}, e), W0(k))), "src" in k && t(16, r = k.src), "muted" in k && t(4, a = k.muted), "playsinline" in k && t(5, o = k.playsinline), "preload" in k && t(6, u = k.preload), "autoplay" in k && t(7, l = k.autoplay), "controls" in k && t(8, c = k.controls), "loop" in k && t(9, h = k.loop), "fullscreen" in k && t(10, d = k.fullscreen), "small" in k && t(11, f = k.small), "node" in k && t(0, m = k.node), "is_stream" in k && t(17, g = k.is_stream), "processingVideo" in k && t(12, p = k.processingVideo), "currentTime" in k && t(1, y = k.currentTime), "duration" in k && t(2, v = k.duration), "paused" in k && t(3, _ = k.paused), "$$scope" in k && t(19, s = k.$$scope); }, n.$$.update = () => { if (n.$$.dirty & /*src, latest_src*/ - 81920) { - t(11, v = r), t(16, E = r); - const I = r; - dI(I).then((R) => { - E === I && t(11, v = R); + 327680) { + t(13, E = r), t(18, x = r); + const k = r; + OI(k).then((q) => { + x === k && t(13, E = q); }); } n.$$.dirty & /*src*/ - 16384 && (_ = !1), n.$$.dirty & /*node, src, is_stream*/ - 49153 && g && r && p && A(r, p, g); - }, e = R0(e), [ - g, - d, - f, + 65536 && (T = !1), n.$$.dirty & /*node, src, is_stream*/ + 196609 && m && r && g && D(r, g, m); + }, e = W0(e), [ m, + y, + v, + _, a, o, u, l, c, h, - y, - v, - T, - e, - r, + d, + f, p, E, - s, - i, S, - D, + e, + r, + g, x, - w + s, + i, + A, + w, + I, + M ]; } -class MF extends mF { +class rP extends $F { constructor(e) { - super(), AF(this, e, OF, PF, LF, { - src: 14, + super(), zF(this, e, sP, nP, QF, { + src: 16, muted: 4, playsinline: 5, preload: 6, autoplay: 7, controls: 8, loop: 9, + fullscreen: 10, + small: 11, + node: 0, + is_stream: 17, + processingVideo: 12, currentTime: 1, duration: 2, - paused: 3, - node: 0, - is_stream: 15, - processingVideo: 10 + paused: 3 }); } get src() { - return this.$$.ctx[14]; + return this.$$.ctx[16]; } set src(e) { - this.$$set({ src: e }), Bt(); + this.$$set({ src: e }), Dt(); } get muted() { return this.$$.ctx[4]; } set muted(e) { - this.$$set({ muted: e }), Bt(); + this.$$set({ muted: e }), Dt(); } get playsinline() { return this.$$.ctx[5]; } set playsinline(e) { - this.$$set({ playsinline: e }), Bt(); + this.$$set({ playsinline: e }), Dt(); } get preload() { return this.$$.ctx[6]; } set preload(e) { - this.$$set({ preload: e }), Bt(); + this.$$set({ preload: e }), Dt(); } get autoplay() { return this.$$.ctx[7]; } set autoplay(e) { - this.$$set({ autoplay: e }), Bt(); + this.$$set({ autoplay: e }), Dt(); } get controls() { return this.$$.ctx[8]; } set controls(e) { - this.$$set({ controls: e }), Bt(); + this.$$set({ controls: e }), Dt(); } get loop() { return this.$$.ctx[9]; } set loop(e) { - this.$$set({ loop: e }), Bt(); - } - get currentTime() { - return this.$$.ctx[1]; + this.$$set({ loop: e }), Dt(); } - set currentTime(e) { - this.$$set({ currentTime: e }), Bt(); - } - get duration() { - return this.$$.ctx[2]; + get fullscreen() { + return this.$$.ctx[10]; } - set duration(e) { - this.$$set({ duration: e }), Bt(); + set fullscreen(e) { + this.$$set({ fullscreen: e }), Dt(); } - get paused() { - return this.$$.ctx[3]; + get small() { + return this.$$.ctx[11]; } - set paused(e) { - this.$$set({ paused: e }), Bt(); + set small(e) { + this.$$set({ small: e }), Dt(); } get node() { return this.$$.ctx[0]; } set node(e) { - this.$$set({ node: e }), Bt(); + this.$$set({ node: e }), Dt(); } get is_stream() { - return this.$$.ctx[15]; + return this.$$.ctx[17]; } set is_stream(e) { - this.$$set({ is_stream: e }), Bt(); + this.$$set({ is_stream: e }), Dt(); } get processingVideo() { - return this.$$.ctx[10]; + return this.$$.ctx[12]; } set processingVideo(e) { - this.$$set({ processingVideo: e }), Bt(); + this.$$set({ processingVideo: e }), Dt(); + } + get currentTime() { + return this.$$.ctx[1]; + } + set currentTime(e) { + this.$$set({ currentTime: e }), Dt(); + } + get duration() { + return this.$$.ctx[2]; + } + set duration(e) { + this.$$set({ duration: e }), Dt(); + } + get paused() { + return this.$$.ctx[3]; + } + set paused(e) { + this.$$set({ paused: e }), Dt(); } } const { - SvelteComponent: $F, - append_hydration: Js, - attr: St, - children: pa, - claim_element: _s, - claim_space: gh, - destroy_block: BF, - detach: Dn, - element: vs, - ensure_array_like: P0, - get_svelte_dataset: NF, - init: UF, - insert_hydration: pu, - listen: er, - noop: Sd, - run_all: GF, - safe_not_equal: HF, - set_style: Bn, - space: ph, - src_url_equal: O0, - update_keyed_each: VF -} = window.__gradio__svelte__internal, { onMount: qF, onDestroy: KF } = window.__gradio__svelte__internal; -function M0(n, e, t) { + SvelteComponent: aP, + append_hydration: hr, + attr: It, + children: wa, + claim_element: Ts, + claim_space: Oh, + destroy_block: oP, + detach: In, + element: Ss, + ensure_array_like: X0, + get_svelte_dataset: lP, + init: uP, + insert_hydration: $u, + listen: dr, + noop: qd, + run_all: cP, + safe_not_equal: hP, + set_style: jn, + space: Mh, + src_url_equal: Q0, + update_keyed_each: dP +} = window.__gradio__svelte__internal, { onMount: fP, onDestroy: mP } = window.__gradio__svelte__internal; +function Z0(n, e, t) { const i = n.slice(); return i[19] = e[t], i[21] = t, i; } -function jF(n) { - let e, t, i, s, r, a = [], o = /* @__PURE__ */ new Map(), u, l, c, h, d = P0( +function gP(n) { + let e, t, i, s, r, a = [], o = /* @__PURE__ */ new Map(), u, l, c, h, d = X0( /*thumbnails*/ n[1] ); @@ -33460,87 +33563,87 @@ function jF(n) { m[21] ); for (let m = 0; m < d.length; m += 1) { - let g = M0(n, d, m), p = f(g); - o.set(p, a[m] = $0(p, g)); + let g = Z0(n, d, m), p = f(g); + o.set(p, a[m] = J0(p, g)); } return { c() { - e = vs("div"), t = vs("button"), i = ph(), s = vs("div"), r = ph(); + e = Ss("div"), t = Ss("button"), i = Mh(), s = Ss("div"), r = Mh(); for (let m = 0; m < a.length; m += 1) a[m].c(); - u = ph(), l = vs("button"), this.h(); + u = Mh(), l = Ss("button"), this.h(); }, l(m) { - e = _s(m, "DIV", { id: !0, class: !0 }); - var g = pa(e); - t = _s(g, "BUTTON", { + e = Ts(m, "DIV", { id: !0, class: !0 }); + var g = wa(e); + t = Ts(g, "BUTTON", { "aria-label": !0, class: !0, style: !0 - }), pa(t).forEach(Dn), i = gh(g), s = _s(g, "DIV", { class: !0, style: !0 }), pa(s).forEach(Dn), r = gh(g); + }), wa(t).forEach(In), i = Oh(g), s = Ts(g, "DIV", { class: !0, style: !0 }), wa(s).forEach(In), r = Oh(g); for (let p = 0; p < a.length; p += 1) a[p].l(g); - u = gh(g), l = _s(g, "BUTTON", { + u = Oh(g), l = Ts(g, "BUTTON", { "aria-label": !0, class: !0, style: !0 - }), pa(l).forEach(Dn), g.forEach(Dn), this.h(); + }), wa(l).forEach(In), g.forEach(In), this.h(); }, h() { - St(t, "aria-label", "start drag handle for trimming video"), St(t, "class", "handle left svelte-kn3uji"), Bn( + It(t, "aria-label", "start drag handle for trimming video"), It(t, "class", "handle left svelte-kn3uji"), jn( t, "left", /*leftHandlePosition*/ n[2] + "%" - ), St(s, "class", "opaque-layer svelte-kn3uji"), Bn( + ), It(s, "class", "opaque-layer svelte-kn3uji"), jn( s, "left", /*leftHandlePosition*/ n[2] + "%" - ), Bn(s, "right", 100 - /*rightHandlePosition*/ - n[3] + "%"), St(l, "aria-label", "end drag handle for trimming video"), St(l, "class", "handle right svelte-kn3uji"), Bn( + ), jn(s, "right", 100 - /*rightHandlePosition*/ + n[3] + "%"), It(l, "aria-label", "end drag handle for trimming video"), It(l, "class", "handle right svelte-kn3uji"), jn( l, "left", /*rightHandlePosition*/ n[3] + "%" - ), St(e, "id", "timeline"), St(e, "class", "thumbnail-wrapper svelte-kn3uji"); + ), It(e, "id", "timeline"), It(e, "class", "thumbnail-wrapper svelte-kn3uji"); }, m(m, g) { - pu(m, e, g), Js(e, t), Js(e, i), Js(e, s), Js(e, r); + $u(m, e, g), hr(e, t), hr(e, i), hr(e, s), hr(e, r); for (let p = 0; p < a.length; p += 1) a[p] && a[p].m(e, null); - Js(e, u), Js(e, l), c || (h = [ - er( + hr(e, u), hr(e, l), c || (h = [ + dr( t, "mousedown", /*mousedown_handler*/ n[10] ), - er( + dr( t, "blur", /*stopDragging*/ n[5] ), - er( + dr( t, "keydown", /*keydown_handler*/ n[11] ), - er( + dr( l, "mousedown", /*mousedown_handler_1*/ n[12] ), - er( + dr( l, "blur", /*stopDragging*/ n[5] ), - er( + dr( l, "keydown", /*keydown_handler_1*/ @@ -33550,25 +33653,25 @@ function jF(n) { }, p(m, g) { g & /*leftHandlePosition*/ - 4 && Bn( + 4 && jn( t, "left", /*leftHandlePosition*/ m[2] + "%" ), g & /*leftHandlePosition*/ - 4 && Bn( + 4 && jn( s, "left", /*leftHandlePosition*/ m[2] + "%" ), g & /*rightHandlePosition*/ - 8 && Bn(s, "right", 100 - /*rightHandlePosition*/ + 8 && jn(s, "right", 100 - /*rightHandlePosition*/ m[3] + "%"), g & /*thumbnails*/ - 2 && (d = P0( + 2 && (d = X0( /*thumbnails*/ m[1] - ), a = VF(a, g, f, 1, m, d, o, e, BF, $0, u, M0)), g & /*rightHandlePosition*/ - 8 && Bn( + ), a = dP(a, g, f, 1, m, d, o, e, oP, J0, u, Z0)), g & /*rightHandlePosition*/ + 8 && jn( l, "left", /*rightHandlePosition*/ @@ -33576,44 +33679,44 @@ function jF(n) { ); }, d(m) { - m && Dn(e); + m && In(e); for (let g = 0; g < a.length; g += 1) a[g].d(); - c = !1, GF(h); + c = !1, cP(h); } }; } -function zF(n) { +function pP(n) { let e, t = ''; return { c() { - e = vs("div"), e.innerHTML = t, this.h(); + e = Ss("div"), e.innerHTML = t, this.h(); }, l(i) { - e = _s(i, "DIV", { class: !0, "data-svelte-h": !0 }), NF(e) !== "svelte-13yzice" && (e.innerHTML = t), this.h(); + e = Ts(i, "DIV", { class: !0, "data-svelte-h": !0 }), lP(e) !== "svelte-13yzice" && (e.innerHTML = t), this.h(); }, h() { - St(e, "class", "load-wrap svelte-kn3uji"); + It(e, "class", "load-wrap svelte-kn3uji"); }, m(i, s) { - pu(i, e, s); + $u(i, e, s); }, - p: Sd, + p: qd, d(i) { - i && Dn(e); + i && In(e); } }; } -function $0(n, e) { +function J0(n, e) { let t, i, s; return { key: n, first: null, c() { - t = vs("img"), this.h(); + t = Ss("img"), this.h(); }, l(r) { - t = _s(r, "IMG", { + t = Ts(r, "IMG", { src: !0, alt: !0, draggable: !0, @@ -33621,120 +33724,120 @@ function $0(n, e) { }), this.h(); }, h() { - O0(t.src, i = /*thumbnail*/ - e[19]) || St(t, "src", i), St(t, "alt", s = `frame-${/*i*/ - e[21]}`), St(t, "draggable", "false"), St(t, "class", "svelte-kn3uji"), this.first = t; + Q0(t.src, i = /*thumbnail*/ + e[19]) || It(t, "src", i), It(t, "alt", s = `frame-${/*i*/ + e[21]}`), It(t, "draggable", "false"), It(t, "class", "svelte-kn3uji"), this.first = t; }, m(r, a) { - pu(r, t, a); + $u(r, t, a); }, p(r, a) { e = r, a & /*thumbnails*/ - 2 && !O0(t.src, i = /*thumbnail*/ - e[19]) && St(t, "src", i), a & /*thumbnails*/ + 2 && !Q0(t.src, i = /*thumbnail*/ + e[19]) && It(t, "src", i), a & /*thumbnails*/ 2 && s !== (s = `frame-${/*i*/ - e[21]}`) && St(t, "alt", s); + e[21]}`) && It(t, "alt", s); }, d(r) { - r && Dn(t); + r && In(t); } }; } -function WF(n) { +function _P(n) { let e; function t(r, a) { return ( /*loadingTimeline*/ - r[0] ? zF : jF + r[0] ? pP : gP ); } let i = t(n), s = i(n); return { c() { - e = vs("div"), s.c(), this.h(); + e = Ss("div"), s.c(), this.h(); }, l(r) { - e = _s(r, "DIV", { class: !0 }); - var a = pa(e); - s.l(a), a.forEach(Dn), this.h(); + e = Ts(r, "DIV", { class: !0 }); + var a = wa(e); + s.l(a), a.forEach(In), this.h(); }, h() { - St(e, "class", "container svelte-kn3uji"); + It(e, "class", "container svelte-kn3uji"); }, m(r, a) { - pu(r, e, a), s.m(e, null); + $u(r, e, a), s.m(e, null); }, p(r, [a]) { i === (i = t(r)) && s ? s.p(r, a) : (s.d(1), s = i(r), s && (s.c(), s.m(e, null))); }, - i: Sd, - o: Sd, + i: qd, + o: qd, d(r) { - r && Dn(e), s.d(); + r && In(e), s.d(); } }; } -let _h = 10; -function YF(n, e, t) { +let $h = 10; +function vP(n, e, t) { let { videoElement: i } = e, { trimmedDuration: s } = e, { dragStart: r } = e, { dragEnd: a } = e, { loadingTimeline: o } = e, u = [], l, c = 0, h = 100, d = null; - const f = (A) => { - d = A; + const f = (x) => { + d = x; }, m = () => { d = null; - }, g = (A, S) => { + }, g = (x, S) => { if (d) { const D = document.getElementById("timeline"); if (!D) return; - const x = D.getBoundingClientRect(); + const A = D.getBoundingClientRect(); let w; - if (S ? w = d === "left" ? c + S : h + S : w = (A.clientX - x.left) / x.width * 100, w = Math.max(0, Math.min(w, 100)), d === "left") { + if (S ? w = d === "left" ? c + S : h + S : w = (x.clientX - A.left) / A.width * 100, w = Math.max(0, Math.min(w, 100)), d === "left") { t(2, c = Math.min(w, h)); - const M = c / 100 * l; - t(6, i.currentTime = M, i), t(8, r = M); + const k = c / 100 * l; + t(6, i.currentTime = k, i), t(8, r = k); } else if (d === "right") { t(3, h = Math.max(w, c)); - const M = h / 100 * l; - t(6, i.currentTime = M, i), t(9, a = M); + const k = h / 100 * l; + t(6, i.currentTime = k, i), t(9, a = k); } - const I = c / 100 * l, R = h / 100 * l; - t(7, s = R - I); + const I = c / 100 * l, M = h / 100 * l; + t(7, s = M - I); } - }, p = (A) => { + }, p = (x) => { if (d) { const S = 1 / l * 100; - A.key === "ArrowLeft" ? g({ clientX: 0 }, -S) : A.key === "ArrowRight" && g({ clientX: 0 }, S); + x.key === "ArrowLeft" ? g({ clientX: 0 }, -S) : x.key === "ArrowRight" && g({ clientX: 0 }, S); } }, y = () => { - const A = document.createElement("canvas"), S = A.getContext("2d"); + const x = document.createElement("canvas"), S = x.getContext("2d"); if (!S) return; - A.width = i.videoWidth, A.height = i.videoHeight, S.drawImage(i, 0, 0, A.width, A.height); - const D = A.toDataURL("image/jpeg", 0.7); + x.width = i.videoWidth, x.height = i.videoHeight, S.drawImage(i, 0, 0, x.width, x.height); + const D = x.toDataURL("image/jpeg", 0.7); t(1, u = [...u, D]); }; - qF(() => { - const A = () => { + fP(() => { + const x = () => { l = i.duration, t(9, a = l); - const S = l / _h; + const S = l / $h; let D = 0; - const x = () => { - y(), D++, D < _h ? t(6, i.currentTime += S, i) : i.removeEventListener("seeked", x); + const A = () => { + y(), D++, D < $h ? t(6, i.currentTime += S, i) : i.removeEventListener("seeked", A); }; - i.addEventListener("seeked", x), t(6, i.currentTime = 0, i); + i.addEventListener("seeked", A), t(6, i.currentTime = 0, i); }; - i.readyState >= 1 ? A() : i.addEventListener("loadedmetadata", A), window.addEventListener("mousemove", g), window.addEventListener("mouseup", m), window.addEventListener("keydown", p); - }), KF(() => { + i.readyState >= 1 ? x() : i.addEventListener("loadedmetadata", x), window.addEventListener("mousemove", g), window.addEventListener("mouseup", m), window.addEventListener("keydown", p); + }), mP(() => { window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", m), window.removeEventListener("keydown", p); }); - const v = () => f("left"), _ = (A) => { - (A.key === "ArrowLeft" || A.key == "ArrowRight") && f("left"); - }, E = () => f("right"), T = (A) => { - (A.key === "ArrowLeft" || A.key == "ArrowRight") && f("right"); + const v = () => f("left"), _ = (x) => { + (x.key === "ArrowLeft" || x.key == "ArrowRight") && f("left"); + }, E = () => f("right"), T = (x) => { + (x.key === "ArrowLeft" || x.key == "ArrowRight") && f("right"); }; - return n.$$set = (A) => { - "videoElement" in A && t(6, i = A.videoElement), "trimmedDuration" in A && t(7, s = A.trimmedDuration), "dragStart" in A && t(8, r = A.dragStart), "dragEnd" in A && t(9, a = A.dragEnd), "loadingTimeline" in A && t(0, o = A.loadingTimeline); + return n.$$set = (x) => { + "videoElement" in x && t(6, i = x.videoElement), "trimmedDuration" in x && t(7, s = x.trimmedDuration), "dragStart" in x && t(8, r = x.dragStart), "dragEnd" in x && t(9, a = x.dragEnd), "loadingTimeline" in x && t(0, o = x.loadingTimeline); }, n.$$.update = () => { n.$$.dirty & /*thumbnails*/ - 2 && t(0, o = u.length !== _h); + 2 && t(0, o = u.length !== $h); }, [ o, u, @@ -33752,9 +33855,9 @@ function YF(n, e, t) { T ]; } -class XF extends $F { +class yP extends aP { constructor(e) { - super(), UF(this, e, YF, WF, HF, { + super(), uP(this, e, vP, _P, hP, { videoElement: 6, trimmedDuration: 7, dragStart: 8, @@ -33764,9 +33867,9 @@ class XF extends $F { } } new Intl.Collator(0, { numeric: 1 }).compare; -async function If(n, e) { +async function Xf(n, e) { return n.map( - (t) => new QF({ + (t) => new EP({ path: t.name, orig_name: t.name, blob: t, @@ -33776,7 +33879,7 @@ async function If(n, e) { }) ); } -class QF { +class EP { constructor({ path: e, url: t, @@ -33792,13 +33895,13 @@ class QF { } } typeof process < "u" && process.versions && process.versions.node; -var xn; -class Dj extends TransformStream { +var Ln; +class Bj extends TransformStream { /** Constructs a new instance. */ constructor(t = { allowCR: !1 }) { super({ transform: (i, s) => { - for (i = ue(this, xn) + i; ; ) { + for (i = ce(this, Ln) + i; ; ) { const r = i.indexOf(` `), a = t.allowCR ? i.indexOf("\r") : -1; if (a !== -1 && a !== i.length - 1 && (r === -1 || r - 1 > a)) { @@ -33810,115 +33913,115 @@ class Dj extends TransformStream { const o = i[r - 1] === "\r" ? r - 1 : r; s.enqueue(i.slice(0, o)), i = i.slice(r + 1); } - $s(this, xn, i); + Ws(this, Ln, i); }, flush: (i) => { - if (ue(this, xn) === "") + if (ce(this, Ln) === "") return; - const s = t.allowCR && ue(this, xn).endsWith("\r") ? ue(this, xn).slice(0, -1) : ue(this, xn); + const s = t.allowCR && ce(this, Ln).endsWith("\r") ? ce(this, Ln).slice(0, -1) : ce(this, Ln); i.enqueue(s); } }); - Mi(this, xn, ""); + Gi(this, Ln, ""); } } -xn = new WeakMap(); -function ZF(n) { - return JF(n) && !eP(n); +Ln = new WeakMap(); +function bP(n) { + return TP(n) && !SP(n); } -function JF(n) { +function TP(n) { return !!n && typeof n == "object"; } -function eP(n) { +function SP(n) { var e = Object.prototype.toString.call(n); - return e === "[object RegExp]" || e === "[object Date]" || nP(n); + return e === "[object RegExp]" || e === "[object Date]" || DP(n); } -var tP = typeof Symbol == "function" && Symbol.for, iP = tP ? Symbol.for("react.element") : 60103; -function nP(n) { - return n.$$typeof === iP; +var AP = typeof Symbol == "function" && Symbol.for, xP = AP ? Symbol.for("react.element") : 60103; +function DP(n) { + return n.$$typeof === xP; } -var sP = ZF; -function rP(n) { +var wP = bP; +function LP(n) { return Array.isArray(n) ? [] : {}; } -function Ha(n, e) { - return e.clone !== !1 && e.isMergeableObject(n) ? xr(rP(n), n, e) : n; +function eo(n, e) { + return e.clone !== !1 && e.isMergeableObject(n) ? Pr(LP(n), n, e) : n; } -function aP(n, e, t) { +function IP(n, e, t) { return n.concat(e).map(function(i) { - return Ha(i, t); + return eo(i, t); }); } -function oP(n, e) { +function kP(n, e) { if (!e.customMerge) - return xr; + return Pr; var t = e.customMerge(n); - return typeof t == "function" ? t : xr; + return typeof t == "function" ? t : Pr; } -function lP(n) { +function RP(n) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(n).filter(function(e) { return Object.propertyIsEnumerable.call(n, e); }) : []; } -function B0(n) { - return Object.keys(n).concat(lP(n)); +function e_(n) { + return Object.keys(n).concat(RP(n)); } -function xE(n, e) { +function GE(n, e) { try { return e in n; } catch { return !1; } } -function uP(n, e) { - return xE(n, e) && !(Object.hasOwnProperty.call(n, e) && Object.propertyIsEnumerable.call(n, e)); +function CP(n, e) { + return GE(n, e) && !(Object.hasOwnProperty.call(n, e) && Object.propertyIsEnumerable.call(n, e)); } -function cP(n, e, t) { +function FP(n, e, t) { var i = {}; - return t.isMergeableObject(n) && B0(n).forEach(function(s) { - i[s] = Ha(n[s], t); - }), B0(e).forEach(function(s) { - uP(n, s) || (xE(n, s) && t.isMergeableObject(e[s]) ? i[s] = oP(s, t)(n[s], e[s], t) : i[s] = Ha(e[s], t)); + return t.isMergeableObject(n) && e_(n).forEach(function(s) { + i[s] = eo(n[s], t); + }), e_(e).forEach(function(s) { + CP(n, s) || (GE(n, s) && t.isMergeableObject(e[s]) ? i[s] = kP(s, t)(n[s], e[s], t) : i[s] = eo(e[s], t)); }), i; } -function xr(n, e, t) { - t = t || {}, t.arrayMerge = t.arrayMerge || aP, t.isMergeableObject = t.isMergeableObject || sP, t.cloneUnlessOtherwiseSpecified = Ha; +function Pr(n, e, t) { + t = t || {}, t.arrayMerge = t.arrayMerge || IP, t.isMergeableObject = t.isMergeableObject || wP, t.cloneUnlessOtherwiseSpecified = eo; var i = Array.isArray(e), s = Array.isArray(n), r = i === s; - return r ? i ? t.arrayMerge(n, e, t) : cP(n, e, t) : Ha(e, t); + return r ? i ? t.arrayMerge(n, e, t) : FP(n, e, t) : eo(e, t); } -xr.all = function(e, t) { +Pr.all = function(e, t) { if (!Array.isArray(e)) throw new Error("first argument should be an array"); return e.reduce(function(i, s) { - return xr(i, s, t); + return Pr(i, s, t); }, {}); }; -var Ad = function(n, e) { - return Ad = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { +var Kd = function(n, e) { + return Kd = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) { t.__proto__ = i; } || function(t, i) { for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (t[s] = i[s]); - }, Ad(n, e); + }, Kd(n, e); }; -function _u(n, e) { +function Bu(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); - Ad(n, e); + Kd(n, e); function t() { this.constructor = n; } n.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); } -var Te = function() { - return Te = Object.assign || function(e) { +var Ae = function() { + return Ae = Object.assign || function(e) { for (var t, i = 1, s = arguments.length; i < s; i++) { t = arguments[i]; for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]); } return e; - }, Te.apply(this, arguments); + }, Ae.apply(this, arguments); }; -function vh(n, e, t) { +function Bh(n, e, t) { if (t || arguments.length === 2) for (var i = 0, s = e.length, r; i < s; i++) (r || !(i in e)) && (r || (r = Array.prototype.slice.call(e, 0, i)), r[i] = e[i]); return n.concat(r || Array.prototype.slice.call(e)); @@ -33927,51 +34030,51 @@ var pe; (function(n) { n[n.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", n[n.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", n[n.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", n[n.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", n[n.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", n[n.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", n[n.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", n[n.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", n[n.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", n[n.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", n[n.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", n[n.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", n[n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", n[n.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", n[n.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", n[n.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", n[n.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", n[n.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", n[n.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", n[n.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", n[n.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", n[n.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", n[n.INVALID_TAG = 23] = "INVALID_TAG", n[n.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", n[n.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", n[n.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; })(pe || (pe = {})); -var $e; +var Ne; (function(n) { n[n.literal = 0] = "literal", n[n.argument = 1] = "argument", n[n.number = 2] = "number", n[n.date = 3] = "date", n[n.time = 4] = "time", n[n.select = 5] = "select", n[n.plural = 6] = "plural", n[n.pound = 7] = "pound", n[n.tag = 8] = "tag"; -})($e || ($e = {})); -var Dr; +})(Ne || (Ne = {})); +var Or; (function(n) { n[n.number = 0] = "number", n[n.dateTime = 1] = "dateTime"; -})(Dr || (Dr = {})); -function N0(n) { - return n.type === $e.literal; +})(Or || (Or = {})); +function t_(n) { + return n.type === Ne.literal; } -function hP(n) { - return n.type === $e.argument; +function PP(n) { + return n.type === Ne.argument; } -function DE(n) { - return n.type === $e.number; +function HE(n) { + return n.type === Ne.number; } -function wE(n) { - return n.type === $e.date; +function VE(n) { + return n.type === Ne.date; } -function LE(n) { - return n.type === $e.time; +function qE(n) { + return n.type === Ne.time; } -function IE(n) { - return n.type === $e.select; +function KE(n) { + return n.type === Ne.select; } -function kE(n) { - return n.type === $e.plural; +function jE(n) { + return n.type === Ne.plural; } -function dP(n) { - return n.type === $e.pound; +function OP(n) { + return n.type === Ne.pound; } -function RE(n) { - return n.type === $e.tag; +function zE(n) { + return n.type === Ne.tag; } -function CE(n) { - return !!(n && typeof n == "object" && n.type === Dr.number); +function WE(n) { + return !!(n && typeof n == "object" && n.type === Or.number); } -function xd(n) { - return !!(n && typeof n == "object" && n.type === Dr.dateTime); +function jd(n) { + return !!(n && typeof n == "object" && n.type === Or.dateTime); } -var FE = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, fP = /(?:[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 mP(n) { +var YE = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, MP = /(?:[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 $P(n) { var e = {}; - return n.replace(fP, function(t) { + return n.replace(MP, function(t) { var i = t.length; switch (t[0]) { case "G": @@ -34060,11 +34163,11 @@ function mP(n) { return ""; }), e; } -var gP = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; -function pP(n) { +var BP = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; +function NP(n) { if (n.length === 0) throw new Error("Number skeleton cannot be empty"); - for (var e = n.split(gP).filter(function(d) { + for (var e = n.split(BP).filter(function(d) { return d.length > 0; }), t = [], i = 0, s = e; i < s.length; i++) { var r = s[i], a = r.split("/"); @@ -34079,17 +34182,17 @@ function pP(n) { } return t; } -function _P(n) { +function UP(n) { return n.replace(/^(.*?)-/, ""); } -var U0 = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, PE = /^(@+)?(\+|#+)?[rs]?$/g, vP = /(\*)(0+)|(#+)(0+)|(0+)/g, OE = /^(0+)$/; -function G0(n) { +var i_ = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, XE = /^(@+)?(\+|#+)?[rs]?$/g, GP = /(\*)(0+)|(#+)(0+)|(0+)/g, QE = /^(0+)$/; +function n_(n) { var e = {}; - return n[n.length - 1] === "r" ? e.roundingPriority = "morePrecision" : n[n.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), n.replace(PE, function(t, i, s) { + return n[n.length - 1] === "r" ? e.roundingPriority = "morePrecision" : n[n.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), n.replace(XE, function(t, i, s) { return typeof s != "string" ? (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length) : s === "+" ? e.minimumSignificantDigits = i.length : i[0] === "#" ? e.maximumSignificantDigits = i.length : (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length + (typeof s == "string" ? s.length : 0)), ""; }), e; } -function ME(n) { +function ZE(n) { switch (n) { case "sign-auto": return { @@ -34129,7 +34232,7 @@ function ME(n) { }; } } -function yP(n) { +function HP(n) { var e; if (n[0] === "E" && n[1] === "E" ? (e = { notation: "engineering" @@ -34137,17 +34240,17 @@ function yP(n) { notation: "scientific" }, n = n.slice(1)), e) { var t = n.slice(0, 2); - if (t === "+!" ? (e.signDisplay = "always", n = n.slice(2)) : t === "+?" && (e.signDisplay = "exceptZero", n = n.slice(2)), !OE.test(n)) + if (t === "+!" ? (e.signDisplay = "always", n = n.slice(2)) : t === "+?" && (e.signDisplay = "exceptZero", n = n.slice(2)), !QE.test(n)) throw new Error("Malformed concise eng/scientific notation"); e.minimumIntegerDigits = n.length; } return e; } -function H0(n) { - var e = {}, t = ME(n); +function s_(n) { + var e = {}, t = ZE(n); return t || e; } -function EP(n) { +function VP(n) { for (var e = {}, t = 0, i = n; t < i.length; t++) { var s = i[t]; switch (s.stem) { @@ -34171,7 +34274,7 @@ function EP(n) { continue; case "measure-unit": case "unit": - e.style = "unit", e.unit = _P(s.options[0]); + e.style = "unit", e.unit = UP(s.options[0]); continue; case "compact-short": case "K": @@ -34182,13 +34285,13 @@ function EP(n) { e.notation = "compact", e.compactDisplay = "long"; continue; case "scientific": - e = Te(Te(Te({}, e), { notation: "scientific" }), s.options.reduce(function(u, l) { - return Te(Te({}, u), H0(l)); + e = Ae(Ae(Ae({}, e), { notation: "scientific" }), s.options.reduce(function(u, l) { + return Ae(Ae({}, u), s_(l)); }, {})); continue; case "engineering": - e = Te(Te(Te({}, e), { notation: "engineering" }), s.options.reduce(function(u, l) { - return Te(Te({}, u), H0(l)); + e = Ae(Ae(Ae({}, e), { notation: "engineering" }), s.options.reduce(function(u, l) { + return Ae(Ae({}, u), s_(l)); }, {})); continue; case "notation-simple": @@ -34212,7 +34315,7 @@ function EP(n) { case "integer-width": if (s.options.length > 1) throw new RangeError("integer-width stems only accept a single optional option"); - s.options[0].replace(vP, function(u, l, c, h, d, f) { + s.options[0].replace(GP, function(u, l, c, h, d, f) { if (l) e.minimumIntegerDigits = c.length; else { @@ -34225,32 +34328,32 @@ function EP(n) { }); continue; } - if (OE.test(s.stem)) { + if (QE.test(s.stem)) { e.minimumIntegerDigits = s.stem.length; continue; } - if (U0.test(s.stem)) { + if (i_.test(s.stem)) { if (s.options.length > 1) throw new RangeError("Fraction-precision stems only accept a single optional option"); - s.stem.replace(U0, function(u, l, c, h, d, f) { + s.stem.replace(i_, function(u, l, c, h, d, f) { return c === "*" ? e.minimumFractionDigits = l.length : h && h[0] === "#" ? e.maximumFractionDigits = h.length : d && f ? (e.minimumFractionDigits = d.length, e.maximumFractionDigits = d.length + f.length) : (e.minimumFractionDigits = l.length, e.maximumFractionDigits = l.length), ""; }); var r = s.options[0]; - r === "w" ? e = Te(Te({}, e), { trailingZeroDisplay: "stripIfInteger" }) : r && (e = Te(Te({}, e), G0(r))); + r === "w" ? e = Ae(Ae({}, e), { trailingZeroDisplay: "stripIfInteger" }) : r && (e = Ae(Ae({}, e), n_(r))); continue; } - if (PE.test(s.stem)) { - e = Te(Te({}, e), G0(s.stem)); + if (XE.test(s.stem)) { + e = Ae(Ae({}, e), n_(s.stem)); continue; } - var a = ME(s.stem); - a && (e = Te(Te({}, e), a)); - var o = yP(s.stem); - o && (e = Te(Te({}, e), o)); + var a = ZE(s.stem); + a && (e = Ae(Ae({}, e), a)); + var o = HP(s.stem); + o && (e = Ae(Ae({}, e), o)); } return e; } -var Jo = { +var vl = { AX: [ "H" ], @@ -35587,13 +35690,13 @@ var Jo = { "h" ] }; -function bP(n, e) { +function qP(n, e) { for (var t = "", i = 0; i < n.length; i++) { var s = n.charAt(i); if (s === "j") { for (var r = 0; i + 1 < n.length && n.charAt(i + 1) === s; ) r++, i++; - var a = 1 + (r & 1), o = r < 2 ? 1 : 3 + (r >> 1), u = "a", l = TP(e); + var a = 1 + (r & 1), o = r < 2 ? 1 : 3 + (r >> 1), u = "a", l = KP(e); for ((l == "H" || l == "k") && (o = 0); o-- > 0; ) t += u; for (; a-- > 0; ) @@ -35602,7 +35705,7 @@ function bP(n, e) { } return t; } -function TP(n) { +function KP(n) { var e = n.hourCycle; if (e === void 0 && // @ts-ignore hourCycle(s) is not identified yet n.hourCycles && // @ts-ignore @@ -35621,23 +35724,23 @@ function TP(n) { } var t = n.language, i; t !== "root" && (i = n.maximize().region); - var s = Jo[i || ""] || Jo[t || ""] || Jo["".concat(t, "-001")] || Jo["001"]; + var s = vl[i || ""] || vl[t || ""] || vl["".concat(t, "-001")] || vl["001"]; return s[0]; } -var yh, SP = new RegExp("^".concat(FE.source, "*")), AP = new RegExp("".concat(FE.source, "*$")); +var Nh, jP = new RegExp("^".concat(YE.source, "*")), zP = new RegExp("".concat(YE.source, "*$")); function _e(n, e) { return { start: n, end: e }; } -var xP = !!String.prototype.startsWith, DP = !!String.fromCodePoint, wP = !!Object.fromEntries, LP = !!String.prototype.codePointAt, IP = !!String.prototype.trimStart, kP = !!String.prototype.trimEnd, RP = !!Number.isSafeInteger, CP = RP ? Number.isSafeInteger : function(n) { +var WP = !!String.prototype.startsWith, YP = !!String.fromCodePoint, XP = !!Object.fromEntries, QP = !!String.prototype.codePointAt, ZP = !!String.prototype.trimStart, JP = !!String.prototype.trimEnd, eO = !!Number.isSafeInteger, tO = eO ? Number.isSafeInteger : function(n) { return typeof n == "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991; -}, Dd = !0; +}, zd = !0; try { - var FP = BE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - Dd = ((yh = FP.exec("a")) === null || yh === void 0 ? void 0 : yh[0]) === "a"; + var iO = e1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + zd = ((Nh = iO.exec("a")) === null || Nh === void 0 ? void 0 : Nh[0]) === "a"; } catch { - Dd = !1; + zd = !1; } -var V0 = xP ? ( +var r_ = WP ? ( // Native function(e, t, i) { return e.startsWith(t, i); @@ -35647,7 +35750,7 @@ var V0 = xP ? ( function(e, t, i) { return e.slice(i, i + t.length) === t; } -), wd = DP ? String.fromCodePoint : ( +), Wd = YP ? String.fromCodePoint : ( // IE11 function() { for (var e = [], t = 0; t < arguments.length; t++) @@ -35659,9 +35762,9 @@ var V0 = xP ? ( } return i; } -), q0 = ( +), a_ = ( // native - wP ? Object.fromEntries : ( + XP ? Object.fromEntries : ( // Ponyfill function(e) { for (var t = {}, i = 0, s = e; i < s.length; i++) { @@ -35671,7 +35774,7 @@ var V0 = xP ? ( return t; } ) -), $E = LP ? ( +), JE = QP ? ( // Native function(e, t) { return e.codePointAt(t); @@ -35685,7 +35788,7 @@ var V0 = xP ? ( return s < 55296 || s > 56319 || t + 1 === i || (r = e.charCodeAt(t + 1)) < 56320 || r > 57343 ? s : (s - 55296 << 10) + (r - 56320) + 65536; } } -), PP = IP ? ( +), nO = ZP ? ( // Native function(e) { return e.trimStart(); @@ -35693,9 +35796,9 @@ var V0 = xP ? ( ) : ( // Ponyfill function(e) { - return e.replace(SP, ""); + return e.replace(jP, ""); } -), OP = kP ? ( +), sO = JP ? ( // Native function(e) { return e.trimEnd(); @@ -35703,32 +35806,32 @@ var V0 = xP ? ( ) : ( // Ponyfill function(e) { - return e.replace(AP, ""); + return e.replace(zP, ""); } ); -function BE(n, e) { +function e1(n, e) { return new RegExp(n, e); } -var Ld; -if (Dd) { - var K0 = BE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - Ld = function(e, t) { +var Yd; +if (zd) { + var o_ = e1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + Yd = function(e, t) { var i; - K0.lastIndex = t; - var s = K0.exec(e); + o_.lastIndex = t; + var s = o_.exec(e); return (i = s[1]) !== null && i !== void 0 ? i : ""; }; } else - Ld = function(e, t) { + Yd = function(e, t) { for (var i = []; ; ) { - var s = $E(e, t); - if (s === void 0 || NE(s) || NP(s)) + var s = JE(e, t); + if (s === void 0 || t1(s) || lO(s)) break; i.push(s), t += s >= 65536 ? 2 : 1; } - return wd.apply(void 0, i); + return Wd.apply(void 0, i); }; -var MP = ( +var rO = ( /** @class */ function() { function n(e, t) { @@ -35752,14 +35855,14 @@ var MP = ( if (r === 35 && (t === "plural" || t === "selectordinal")) { var o = this.clonePosition(); this.bump(), s.push({ - type: $e.pound, + type: Ne.pound, location: _e(o, this.clonePosition()) }); } else if (r === 60 && !this.ignoreTag && this.peek() === 47) { if (i) break; return this.error(pe.UNMATCHED_CLOSING_TAG, _e(this.clonePosition(), this.clonePosition())); - } else if (r === 60 && !this.ignoreTag && Id(this.peek() || 0)) { + } else if (r === 60 && !this.ignoreTag && Xd(this.peek() || 0)) { var a = this.parseTag(e, t); if (a.err) return a; @@ -35780,7 +35883,7 @@ var MP = ( if (this.bumpSpace(), this.bumpIf("/>")) return { val: { - type: $e.literal, + type: Ne.literal, value: "<".concat(s, "/>"), location: _e(i, this.clonePosition()) }, @@ -35792,12 +35895,12 @@ var MP = ( return r; var a = r.val, o = this.clonePosition(); if (this.bumpIf("")) { - if (this.isEOF() || !Id(this.char())) + if (this.isEOF() || !Xd(this.char())) return this.error(pe.INVALID_TAG, _e(o, this.clonePosition())); var u = this.clonePosition(), l = this.parseTagName(); return s !== l ? this.error(pe.UNMATCHED_CLOSING_TAG, _e(u, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { val: { - type: $e.tag, + type: Ne.tag, value: s, children: a, location: _e(i, this.clonePosition()) @@ -35810,7 +35913,7 @@ var MP = ( return this.error(pe.INVALID_TAG, _e(i, this.clonePosition())); }, n.prototype.parseTagName = function() { var e = this.offset(); - for (this.bump(); !this.isEOF() && BP(this.char()); ) + for (this.bump(); !this.isEOF() && oO(this.char()); ) this.bump(); return this.message.slice(e, this.offset()); }, n.prototype.parseLiteral = function(e, t) { @@ -35834,12 +35937,12 @@ var MP = ( } var u = _e(i, this.clonePosition()); return { - val: { type: $e.literal, value: s, location: u }, + val: { type: Ne.literal, value: s, location: u }, err: null }; }, n.prototype.tryParseLeftAngleBracket = function() { return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail. - !$P(this.peek() || 0)) ? (this.bump(), "<") : null; + !aO(this.peek() || 0)) ? (this.bump(), "<") : null; }, n.prototype.tryParseQuote = function(e) { if (this.isEOF() || this.char() !== 39) return null; @@ -35873,12 +35976,12 @@ var MP = ( t.push(i); this.bump(); } - return wd.apply(void 0, t); + return Wd.apply(void 0, t); }, n.prototype.tryParseUnquoted = function(e, t) { if (this.isEOF()) return null; var i = this.char(); - return i === 60 || i === 123 || i === 35 && (t === "plural" || t === "selectordinal") || i === 125 && e > 0 ? null : (this.bump(), wd(i)); + return i === 60 || i === 123 || i === 35 && (t === "plural" || t === "selectordinal") || i === 125 && e > 0 ? null : (this.bump(), Wd(i)); }, n.prototype.parseArgument = function(e, t) { var i = this.clonePosition(); if (this.bump(), this.bumpSpace(), this.isEOF()) @@ -35894,7 +35997,7 @@ var MP = ( case 125: return this.bump(), { val: { - type: $e.argument, + type: Ne.argument, // value does not include the opening and closing braces. value: s, location: _e(i, this.clonePosition()) @@ -35907,7 +36010,7 @@ var MP = ( return this.error(pe.MALFORMED_ARGUMENT, _e(i, this.clonePosition())); } }, n.prototype.parseIdentifierIfPossible = function() { - var e = this.clonePosition(), t = this.offset(), i = Ld(this.message, t), s = t + i.length; + var e = this.clonePosition(), t = this.offset(), i = Yd(this.message, t), s = t + i.length; this.bumpTo(s); var r = this.clonePosition(), a = _e(e, r); return { value: i, location: a }; @@ -35926,7 +36029,7 @@ var MP = ( var c = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible(); if (h.err) return h; - var d = OP(h.val); + var d = sO(h.val); if (d.length === 0) return this.error(pe.EXPECT_ARGUMENT_STYLE, _e(this.clonePosition(), this.clonePosition())); var f = _e(c, this.clonePosition()); @@ -35936,25 +36039,25 @@ var MP = ( if (m.err) return m; var g = _e(s, this.clonePosition()); - if (l && V0(l == null ? void 0 : l.style, "::", 0)) { - var p = PP(l.style.slice(2)); + if (l && r_(l == null ? void 0 : l.style, "::", 0)) { + var p = nO(l.style.slice(2)); if (o === "number") { var h = this.parseNumberSkeletonFromString(p, l.styleLocation); return h.err ? h : { - val: { type: $e.number, value: i, location: g, style: h.val }, + val: { type: Ne.number, value: i, location: g, style: h.val }, err: null }; } else { if (p.length === 0) return this.error(pe.EXPECT_DATE_TIME_SKELETON, g); var y = p; - this.locale && (y = bP(p, this.locale)); + this.locale && (y = qP(p, this.locale)); var d = { - type: Dr.dateTime, + type: Or.dateTime, pattern: y, location: l.styleLocation, - parsedOptions: this.shouldParseSkeletons ? mP(y) : {} - }, v = o === "date" ? $e.date : $e.time; + parsedOptions: this.shouldParseSkeletons ? $P(y) : {} + }, v = o === "date" ? Ne.date : Ne.time; return { val: { type: v, value: i, location: g, style: d }, err: null @@ -35963,7 +36066,7 @@ var MP = ( } return { val: { - type: o === "number" ? $e.number : o === "date" ? $e.date : $e.time, + type: o === "number" ? Ne.number : o === "date" ? Ne.date : Ne.time, value: i, location: g, style: (r = l == null ? void 0 : l.style) !== null && r !== void 0 ? r : null @@ -35976,7 +36079,7 @@ var MP = ( case "select": { var _ = this.clonePosition(); if (this.bumpSpace(), !this.bumpIf(",")) - return this.error(pe.EXPECT_SELECT_ARGUMENT_OPTIONS, _e(_, Te({}, _))); + return this.error(pe.EXPECT_SELECT_ARGUMENT_OPTIONS, _e(_, Ae({}, _))); this.bumpSpace(); var E = this.parseIdentifierIfPossible(), T = 0; if (o !== "select" && E.value === "offset") { @@ -35988,26 +36091,26 @@ var MP = ( return h; this.bumpSpace(), E = this.parseIdentifierIfPossible(), T = h.val; } - var A = this.tryParsePluralOrSelectOptions(e, o, t, E); - if (A.err) - return A; + var x = this.tryParsePluralOrSelectOptions(e, o, t, E); + if (x.err) + return x; var m = this.tryParseArgumentClose(s); if (m.err) return m; var S = _e(s, this.clonePosition()); return o === "select" ? { val: { - type: $e.select, + type: Ne.select, value: i, - options: q0(A.val), + options: a_(x.val), location: S }, err: null } : { val: { - type: $e.plural, + type: Ne.plural, value: i, - options: q0(A.val), + options: a_(x.val), offset: T, pluralType: o === "plural" ? "cardinal" : "ordinal", location: S @@ -36058,16 +36161,16 @@ var MP = ( }, n.prototype.parseNumberSkeletonFromString = function(e, t) { var i = []; try { - i = pP(e); + i = NP(e); } catch { return this.error(pe.INVALID_NUMBER_SKELETON, t); } return { val: { - type: Dr.number, + type: Or.number, tokens: i, location: t, - parsedOptions: this.shouldParseSkeletons ? EP(i) : {} + parsedOptions: this.shouldParseSkeletons ? VP(i) : {} }, err: null }; @@ -36115,7 +36218,7 @@ var MP = ( break; } var u = _e(s, this.clonePosition()); - return r ? (a *= i, CP(a) ? { val: a, err: null } : this.error(t, u)) : this.error(e, u); + return r ? (a *= i, tO(a) ? { val: a, err: null } : this.error(t, u)) : this.error(e, u); }, n.prototype.offset = function() { return this.position.offset; }, n.prototype.isEOF = function() { @@ -36130,7 +36233,7 @@ var MP = ( var e = this.position.offset; if (e >= this.message.length) throw Error("out of bound"); - var t = $E(this.message, e); + var t = JE(this.message, e); if (t === void 0) throw Error("Offset ".concat(e, " is at invalid UTF-16 code unit boundary")); return t; @@ -36149,7 +36252,7 @@ var MP = ( e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2); } }, n.prototype.bumpIf = function(e) { - if (V0(this.message, e, this.offset())) { + if (r_(this.message, e, this.offset())) { for (var t = 0; t < e.length; t++) this.bump(); return !0; @@ -36171,7 +36274,7 @@ var MP = ( break; } }, n.prototype.bumpSpace = function() { - for (; !this.isEOF() && NE(this.char()); ) + for (; !this.isEOF() && t1(this.char()); ) this.bump(); }, n.prototype.peek = function() { if (this.isEOF()) @@ -36181,92 +36284,92 @@ var MP = ( }, n; }() ); -function Id(n) { +function Xd(n) { return n >= 97 && n <= 122 || n >= 65 && n <= 90; } -function $P(n) { - return Id(n) || n === 47; +function aO(n) { + return Xd(n) || n === 47; } -function BP(n) { +function oO(n) { return n === 45 || n === 46 || n >= 48 && n <= 57 || n === 95 || n >= 97 && n <= 122 || n >= 65 && n <= 90 || n == 183 || n >= 192 && n <= 214 || n >= 216 && n <= 246 || n >= 248 && n <= 893 || n >= 895 && n <= 8191 || n >= 8204 && n <= 8205 || n >= 8255 && n <= 8256 || n >= 8304 && n <= 8591 || n >= 11264 && n <= 12271 || n >= 12289 && n <= 55295 || n >= 63744 && n <= 64975 || n >= 65008 && n <= 65533 || n >= 65536 && n <= 983039; } -function NE(n) { +function t1(n) { return n >= 9 && n <= 13 || n === 32 || n === 133 || n >= 8206 && n <= 8207 || n === 8232 || n === 8233; } -function NP(n) { +function lO(n) { return n >= 33 && n <= 35 || n === 36 || n >= 37 && n <= 39 || n === 40 || n === 41 || n === 42 || n === 43 || n === 44 || n === 45 || n >= 46 && n <= 47 || n >= 58 && n <= 59 || n >= 60 && n <= 62 || n >= 63 && n <= 64 || n === 91 || n === 92 || n === 93 || n === 94 || n === 96 || n === 123 || n === 124 || n === 125 || n === 126 || n === 161 || n >= 162 && n <= 165 || n === 166 || n === 167 || n === 169 || n === 171 || n === 172 || n === 174 || n === 176 || n === 177 || n === 182 || n === 187 || n === 191 || n === 215 || n === 247 || n >= 8208 && n <= 8213 || n >= 8214 && n <= 8215 || n === 8216 || n === 8217 || n === 8218 || n >= 8219 && n <= 8220 || n === 8221 || n === 8222 || n === 8223 || n >= 8224 && n <= 8231 || n >= 8240 && n <= 8248 || n === 8249 || n === 8250 || n >= 8251 && n <= 8254 || n >= 8257 && n <= 8259 || n === 8260 || n === 8261 || n === 8262 || n >= 8263 && n <= 8273 || n === 8274 || n === 8275 || n >= 8277 && n <= 8286 || n >= 8592 && n <= 8596 || n >= 8597 && n <= 8601 || n >= 8602 && n <= 8603 || n >= 8604 && n <= 8607 || n === 8608 || n >= 8609 && n <= 8610 || n === 8611 || n >= 8612 && n <= 8613 || n === 8614 || n >= 8615 && n <= 8621 || n === 8622 || n >= 8623 && n <= 8653 || n >= 8654 && n <= 8655 || n >= 8656 && n <= 8657 || n === 8658 || n === 8659 || n === 8660 || n >= 8661 && n <= 8691 || n >= 8692 && n <= 8959 || n >= 8960 && n <= 8967 || n === 8968 || n === 8969 || n === 8970 || n === 8971 || n >= 8972 && n <= 8991 || n >= 8992 && n <= 8993 || n >= 8994 && n <= 9e3 || n === 9001 || n === 9002 || n >= 9003 && n <= 9083 || n === 9084 || n >= 9085 && n <= 9114 || n >= 9115 && n <= 9139 || n >= 9140 && n <= 9179 || n >= 9180 && n <= 9185 || n >= 9186 && n <= 9254 || n >= 9255 && n <= 9279 || n >= 9280 && n <= 9290 || n >= 9291 && n <= 9311 || n >= 9472 && n <= 9654 || n === 9655 || n >= 9656 && n <= 9664 || n === 9665 || n >= 9666 && n <= 9719 || n >= 9720 && n <= 9727 || n >= 9728 && n <= 9838 || n === 9839 || n >= 9840 && n <= 10087 || n === 10088 || n === 10089 || n === 10090 || n === 10091 || n === 10092 || n === 10093 || n === 10094 || n === 10095 || n === 10096 || n === 10097 || n === 10098 || n === 10099 || n === 10100 || n === 10101 || n >= 10132 && n <= 10175 || n >= 10176 && n <= 10180 || n === 10181 || n === 10182 || n >= 10183 && n <= 10213 || n === 10214 || n === 10215 || n === 10216 || n === 10217 || n === 10218 || n === 10219 || n === 10220 || n === 10221 || n === 10222 || n === 10223 || n >= 10224 && n <= 10239 || n >= 10240 && n <= 10495 || n >= 10496 && n <= 10626 || n === 10627 || n === 10628 || n === 10629 || n === 10630 || n === 10631 || n === 10632 || n === 10633 || n === 10634 || n === 10635 || n === 10636 || n === 10637 || n === 10638 || n === 10639 || n === 10640 || n === 10641 || n === 10642 || n === 10643 || n === 10644 || n === 10645 || n === 10646 || n === 10647 || n === 10648 || n >= 10649 && n <= 10711 || n === 10712 || n === 10713 || n === 10714 || n === 10715 || n >= 10716 && n <= 10747 || n === 10748 || n === 10749 || n >= 10750 && n <= 11007 || n >= 11008 && n <= 11055 || n >= 11056 && n <= 11076 || n >= 11077 && n <= 11078 || n >= 11079 && n <= 11084 || n >= 11085 && n <= 11123 || n >= 11124 && n <= 11125 || n >= 11126 && n <= 11157 || n === 11158 || n >= 11159 && n <= 11263 || n >= 11776 && n <= 11777 || n === 11778 || n === 11779 || n === 11780 || n === 11781 || n >= 11782 && n <= 11784 || n === 11785 || n === 11786 || n === 11787 || n === 11788 || n === 11789 || n >= 11790 && n <= 11798 || n === 11799 || n >= 11800 && n <= 11801 || n === 11802 || n === 11803 || n === 11804 || n === 11805 || n >= 11806 && n <= 11807 || n === 11808 || n === 11809 || n === 11810 || n === 11811 || n === 11812 || n === 11813 || n === 11814 || n === 11815 || n === 11816 || n === 11817 || n >= 11818 && n <= 11822 || n === 11823 || n >= 11824 && n <= 11833 || n >= 11834 && n <= 11835 || n >= 11836 && n <= 11839 || n === 11840 || n === 11841 || n === 11842 || n >= 11843 && n <= 11855 || n >= 11856 && n <= 11857 || n === 11858 || n >= 11859 && n <= 11903 || n >= 12289 && n <= 12291 || n === 12296 || n === 12297 || n === 12298 || n === 12299 || n === 12300 || n === 12301 || n === 12302 || n === 12303 || n === 12304 || n === 12305 || n >= 12306 && n <= 12307 || n === 12308 || n === 12309 || n === 12310 || n === 12311 || n === 12312 || n === 12313 || n === 12314 || n === 12315 || n === 12316 || n === 12317 || n >= 12318 && n <= 12319 || n === 12320 || n === 12336 || n === 64830 || n === 64831 || n >= 65093 && n <= 65094; } -function kd(n) { +function Qd(n) { n.forEach(function(e) { - if (delete e.location, IE(e) || kE(e)) + if (delete e.location, KE(e) || jE(e)) for (var t in e.options) - delete e.options[t].location, kd(e.options[t].value); - else DE(e) && CE(e.style) || (wE(e) || LE(e)) && xd(e.style) ? delete e.style.location : RE(e) && kd(e.children); + delete e.options[t].location, Qd(e.options[t].value); + else HE(e) && WE(e.style) || (VE(e) || qE(e)) && jd(e.style) ? delete e.style.location : zE(e) && Qd(e.children); }); } -function UP(n, e) { - e === void 0 && (e = {}), e = Te({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, e); - var t = new MP(n, e).parse(); +function uO(n, e) { + e === void 0 && (e = {}), e = Ae({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, e); + var t = new rO(n, e).parse(); if (t.err) { var i = SyntaxError(pe[t.err.kind]); throw i.location = t.err.location, i.originalMessage = t.err.message, i; } - return e != null && e.captureLocation || kd(t.val), t.val; + return e != null && e.captureLocation || Qd(t.val), t.val; } -function Eh(n, e) { - var t = e && e.cache ? e.cache : jP, i = e && e.serializer ? e.serializer : KP, s = e && e.strategy ? e.strategy : VP; +function Uh(n, e) { + var t = e && e.cache ? e.cache : gO, i = e && e.serializer ? e.serializer : mO, s = e && e.strategy ? e.strategy : dO; return s(n, { cache: t, serializer: i }); } -function GP(n) { +function cO(n) { return n == null || typeof n == "number" || typeof n == "boolean"; } -function HP(n, e, t, i) { - var s = GP(i) ? i : t(i), r = e.get(s); +function hO(n, e, t, i) { + var s = cO(i) ? i : t(i), r = e.get(s); return typeof r > "u" && (r = n.call(this, i), e.set(s, r)), r; } -function UE(n, e, t) { +function i1(n, e, t) { var i = Array.prototype.slice.call(arguments, 3), s = t(i), r = e.get(s); return typeof r > "u" && (r = n.apply(this, i), e.set(s, r)), r; } -function GE(n, e, t, i, s) { +function n1(n, e, t, i, s) { return t.bind(e, n, i, s); } -function VP(n, e) { - var t = n.length === 1 ? HP : UE; - return GE(n, this, t, e.cache.create(), e.serializer); +function dO(n, e) { + var t = n.length === 1 ? hO : i1; + return n1(n, this, t, e.cache.create(), e.serializer); } -function qP(n, e) { - return GE(n, this, UE, e.cache.create(), e.serializer); +function fO(n, e) { + return n1(n, this, i1, e.cache.create(), e.serializer); } -var KP = function() { +var mO = function() { return JSON.stringify(arguments); }; -function kf() { +function Qf() { this.cache = /* @__PURE__ */ Object.create(null); } -kf.prototype.get = function(n) { +Qf.prototype.get = function(n) { return this.cache[n]; }; -kf.prototype.set = function(n, e) { +Qf.prototype.set = function(n, e) { this.cache[n] = e; }; -var jP = { +var gO = { create: function() { - return new kf(); + return new Qf(); } -}, bh = { - variadic: qP -}, wr; +}, Gh = { + variadic: fO +}, Mr; (function(n) { n.MISSING_VALUE = "MISSING_VALUE", n.INVALID_VALUE = "INVALID_VALUE", n.MISSING_INTL_API = "MISSING_INTL_API"; -})(wr || (wr = {})); -var vu = ( +})(Mr || (Mr = {})); +var Nu = ( /** @class */ function(n) { - _u(e, n); + Bu(e, n); function e(t, i, s) { var r = n.call(this, t) || this; return r.code = i, r.originalMessage = s, r; @@ -36275,155 +36378,155 @@ var vu = ( return "[formatjs Error: ".concat(this.code, "] ").concat(this.message); }, e; }(Error) -), j0 = ( +), l_ = ( /** @class */ function(n) { - _u(e, n); + Bu(e, n); function e(t, i, s, r) { - return n.call(this, 'Invalid values for "'.concat(t, '": "').concat(i, '". Options are "').concat(Object.keys(s).join('", "'), '"'), wr.INVALID_VALUE, r) || this; + return n.call(this, 'Invalid values for "'.concat(t, '": "').concat(i, '". Options are "').concat(Object.keys(s).join('", "'), '"'), Mr.INVALID_VALUE, r) || this; } return e; - }(vu) -), zP = ( + }(Nu) +), pO = ( /** @class */ function(n) { - _u(e, n); + Bu(e, n); function e(t, i, s) { - return n.call(this, 'Value for "'.concat(t, '" must be of type ').concat(i), wr.INVALID_VALUE, s) || this; + return n.call(this, 'Value for "'.concat(t, '" must be of type ').concat(i), Mr.INVALID_VALUE, s) || this; } return e; - }(vu) -), WP = ( + }(Nu) +), _O = ( /** @class */ function(n) { - _u(e, n); + Bu(e, n); function e(t, i) { - return n.call(this, 'The intl string context variable "'.concat(t, '" was not provided to the string "').concat(i, '"'), wr.MISSING_VALUE, i) || this; + return n.call(this, 'The intl string context variable "'.concat(t, '" was not provided to the string "').concat(i, '"'), Mr.MISSING_VALUE, i) || this; } return e; - }(vu) -), Tt; + }(Nu) +), Lt; (function(n) { n[n.literal = 0] = "literal", n[n.object = 1] = "object"; -})(Tt || (Tt = {})); -function YP(n) { +})(Lt || (Lt = {})); +function vO(n) { return n.length < 2 ? n : n.reduce(function(e, t) { var i = e[e.length - 1]; - return !i || i.type !== Tt.literal || t.type !== Tt.literal ? e.push(t) : i.value += t.value, e; + return !i || i.type !== Lt.literal || t.type !== Lt.literal ? e.push(t) : i.value += t.value, e; }, []); } -function XP(n) { +function yO(n) { return typeof n == "function"; } -function Sl(n, e, t, i, s, r, a) { - if (n.length === 1 && N0(n[0])) +function Hl(n, e, t, i, s, r, a) { + if (n.length === 1 && t_(n[0])) return [ { - type: Tt.literal, + type: Lt.literal, value: n[0].value } ]; for (var o = [], u = 0, l = n; u < l.length; u++) { var c = l[u]; - if (N0(c)) { + if (t_(c)) { o.push({ - type: Tt.literal, + type: Lt.literal, value: c.value }); continue; } - if (dP(c)) { + if (OP(c)) { typeof r == "number" && o.push({ - type: Tt.literal, + type: Lt.literal, value: t.getNumberFormat(e).format(r) }); continue; } var h = c.value; if (!(s && h in s)) - throw new WP(h, a); + throw new _O(h, a); var d = s[h]; - if (hP(c)) { + if (PP(c)) { (!d || typeof d == "string" || typeof d == "number") && (d = typeof d == "string" || typeof d == "number" ? String(d) : ""), o.push({ - type: typeof d == "string" ? Tt.literal : Tt.object, + type: typeof d == "string" ? Lt.literal : Lt.object, value: d }); continue; } - if (wE(c)) { - var f = typeof c.style == "string" ? i.date[c.style] : xd(c.style) ? c.style.parsedOptions : void 0; + if (VE(c)) { + var f = typeof c.style == "string" ? i.date[c.style] : jd(c.style) ? c.style.parsedOptions : void 0; o.push({ - type: Tt.literal, + type: Lt.literal, value: t.getDateTimeFormat(e, f).format(d) }); continue; } - if (LE(c)) { - var f = typeof c.style == "string" ? i.time[c.style] : xd(c.style) ? c.style.parsedOptions : i.time.medium; + if (qE(c)) { + var f = typeof c.style == "string" ? i.time[c.style] : jd(c.style) ? c.style.parsedOptions : i.time.medium; o.push({ - type: Tt.literal, + type: Lt.literal, value: t.getDateTimeFormat(e, f).format(d) }); continue; } - if (DE(c)) { - var f = typeof c.style == "string" ? i.number[c.style] : CE(c.style) ? c.style.parsedOptions : void 0; + if (HE(c)) { + var f = typeof c.style == "string" ? i.number[c.style] : WE(c.style) ? c.style.parsedOptions : void 0; f && f.scale && (d = d * (f.scale || 1)), o.push({ - type: Tt.literal, + type: Lt.literal, value: t.getNumberFormat(e, f).format(d) }); continue; } - if (RE(c)) { + if (zE(c)) { var m = c.children, g = c.value, p = s[g]; - if (!XP(p)) - throw new zP(g, "function", a); - var y = Sl(m, e, t, i, s, r), v = p(y.map(function(T) { + if (!yO(p)) + throw new pO(g, "function", a); + var y = Hl(m, e, t, i, s, r), v = p(y.map(function(T) { return T.value; })); Array.isArray(v) || (v = [v]), o.push.apply(o, v.map(function(T) { return { - type: typeof T == "string" ? Tt.literal : Tt.object, + type: typeof T == "string" ? Lt.literal : Lt.object, value: T }; })); } - if (IE(c)) { + if (KE(c)) { var _ = c.options[d] || c.options.other; if (!_) - throw new j0(c.value, d, Object.keys(c.options), a); - o.push.apply(o, Sl(_.value, e, t, i, s)); + throw new l_(c.value, d, Object.keys(c.options), a); + o.push.apply(o, Hl(_.value, e, t, i, s)); continue; } - if (kE(c)) { + if (jE(c)) { var _ = c.options["=".concat(d)]; if (!_) { if (!Intl.PluralRules) - throw new vu(`Intl.PluralRules is not available in this environment. + throw new Nu(`Intl.PluralRules is not available in this environment. Try polyfilling it using "@formatjs/intl-pluralrules" -`, wr.MISSING_INTL_API, a); +`, Mr.MISSING_INTL_API, a); var E = t.getPluralRules(e, { type: c.pluralType }).select(d - (c.offset || 0)); _ = c.options[E] || c.options.other; } if (!_) - throw new j0(c.value, d, Object.keys(c.options), a); - o.push.apply(o, Sl(_.value, e, t, i, s, d - (c.offset || 0))); + throw new l_(c.value, d, Object.keys(c.options), a); + o.push.apply(o, Hl(_.value, e, t, i, s, d - (c.offset || 0))); continue; } } - return YP(o); + return vO(o); } -function QP(n, e) { - return e ? Te(Te(Te({}, n || {}), e || {}), Object.keys(n).reduce(function(t, i) { - return t[i] = Te(Te({}, n[i]), e[i] || {}), t; +function EO(n, e) { + return e ? Ae(Ae(Ae({}, n || {}), e || {}), Object.keys(n).reduce(function(t, i) { + return t[i] = Ae(Ae({}, n[i]), e[i] || {}), t; }, {})) : n; } -function ZP(n, e) { +function bO(n, e) { return e ? Object.keys(n).reduce(function(t, i) { - return t[i] = QP(n[i], e[i]), t; - }, Te({}, n)) : n; + return t[i] = EO(n[i], e[i]), t; + }, Ae({}, n)) : n; } -function Th(n) { +function Hh(n) { return { create: function() { return { @@ -36437,39 +36540,39 @@ function Th(n) { } }; } -function JP(n) { +function TO(n) { return n === void 0 && (n = { number: {}, dateTime: {}, pluralRules: {} }), { - getNumberFormat: Eh(function() { + getNumberFormat: Uh(function() { for (var e, t = [], i = 0; i < arguments.length; i++) t[i] = arguments[i]; - return new ((e = Intl.NumberFormat).bind.apply(e, vh([void 0], t, !1)))(); + return new ((e = Intl.NumberFormat).bind.apply(e, Bh([void 0], t, !1)))(); }, { - cache: Th(n.number), - strategy: bh.variadic + cache: Hh(n.number), + strategy: Gh.variadic }), - getDateTimeFormat: Eh(function() { + getDateTimeFormat: Uh(function() { for (var e, t = [], i = 0; i < arguments.length; i++) t[i] = arguments[i]; - return new ((e = Intl.DateTimeFormat).bind.apply(e, vh([void 0], t, !1)))(); + return new ((e = Intl.DateTimeFormat).bind.apply(e, Bh([void 0], t, !1)))(); }, { - cache: Th(n.dateTime), - strategy: bh.variadic + cache: Hh(n.dateTime), + strategy: Gh.variadic }), - getPluralRules: Eh(function() { + getPluralRules: Uh(function() { for (var e, t = [], i = 0; i < arguments.length; i++) t[i] = arguments[i]; - return new ((e = Intl.PluralRules).bind.apply(e, vh([void 0], t, !1)))(); + return new ((e = Intl.PluralRules).bind.apply(e, Bh([void 0], t, !1)))(); }, { - cache: Th(n.pluralRules), - strategy: bh.variadic + cache: Hh(n.pluralRules), + strategy: Gh.variadic }) }; } -var eO = ( +var SO = ( /** @class */ function() { function n(e, t, i, s) { @@ -36483,11 +36586,11 @@ var eO = ( if (o.length === 1) return o[0].value; var u = o.reduce(function(l, c) { - return !l.length || c.type !== Tt.literal || typeof l[l.length - 1] != "string" ? l.push(c.value) : l[l.length - 1] += c.value, l; + return !l.length || c.type !== Lt.literal || typeof l[l.length - 1] != "string" ? l.push(c.value) : l[l.length - 1] += c.value, l; }, []); return u.length <= 1 ? u[0] || "" : u; }, this.formatToParts = function(a) { - return Sl(r.ast, r.locales, r.formatters, r.formats, a, void 0, r.message); + return Hl(r.ast, r.locales, r.formatters, r.formats, a, void 0, r.message); }, this.resolvedOptions = function() { return { locale: r.resolvedLocale.toString() @@ -36505,7 +36608,7 @@ var eO = ( this.ast = e; if (!Array.isArray(this.ast)) throw new TypeError("A message must be provided as a String or AST."); - this.formats = ZP(n.formats, i), this.formatters = s && s.formatters || JP(this.formatterCache); + this.formats = bO(n.formats, i), this.formatters = s && s.formatters || TO(this.formatterCache); } return Object.defineProperty(n, "defaultLocale", { get: function() { @@ -36516,7 +36619,7 @@ var eO = ( }), n.memoizedDefaultLocale = null, n.resolveLocale = function(e) { var t = Intl.NumberFormat.supportedLocalesOf(e); return t.length > 0 ? new Intl.Locale(t[0]) : new Intl.Locale(typeof e == "string" ? e : e[0]); - }, n.__parse = UP, n.formats = { + }, n.__parse = uO, n.formats = { number: { integer: { maximumFractionDigits: 0 @@ -36577,7 +36680,7 @@ var eO = ( }, n; }() ); -function tO(n, e) { +function AO(n, e) { if (e == null) return; if (e in n) @@ -36598,92 +36701,92 @@ function tO(n, e) { i = void 0; return i; } -const jn = {}, iO = (n, e, t) => t && (e in jn || (jn[e] = {}), n in jn[e] || (jn[e][n] = t), t), HE = (n, e) => { +const Zn = {}, xO = (n, e, t) => t && (e in Zn || (Zn[e] = {}), n in Zn[e] || (Zn[e][n] = t), t), s1 = (n, e) => { if (e == null) return; - if (e in jn && n in jn[e]) - return jn[e][n]; - const t = yu(e); + if (e in Zn && n in Zn[e]) + return Zn[e][n]; + const t = Uu(e); for (let i = 0; i < t.length; i++) { - const s = t[i], r = sO(s, n); + const s = t[i], r = wO(s, n); if (r) - return iO(n, e, r); + return xO(n, e, r); } }; -let Rf; -const no = io({}); -function nO(n) { - return Rf[n] || null; +let Zf; +const vo = _o({}); +function DO(n) { + return Zf[n] || null; } -function VE(n) { - return n in Rf; +function r1(n) { + return n in Zf; } -function sO(n, e) { - if (!VE(n)) +function wO(n, e) { + if (!r1(n)) return null; - const t = nO(n); - return tO(t, e); + const t = DO(n); + return AO(t, e); } -function rO(n) { +function LO(n) { if (n == null) return; - const e = yu(n); + const e = Uu(n); for (let t = 0; t < e.length; t++) { const i = e[t]; - if (VE(i)) + if (r1(i)) return i; } } -function aO(n, ...e) { - delete jn[n], no.update((t) => (t[n] = xr.all([t[n] || {}, ...e]), t)); +function IO(n, ...e) { + delete Zn[n], vo.update((t) => (t[n] = Pr.all([t[n] || {}, ...e]), t)); } -Gr( - [no], +Wr( + [vo], ([n]) => Object.keys(n) ); -no.subscribe((n) => Rf = n); -const Al = {}; -function oO(n, e) { - Al[n].delete(e), Al[n].size === 0 && delete Al[n]; +vo.subscribe((n) => Zf = n); +const Vl = {}; +function kO(n, e) { + Vl[n].delete(e), Vl[n].size === 0 && delete Vl[n]; } -function qE(n) { - return Al[n]; +function a1(n) { + return Vl[n]; } -function lO(n) { - return yu(n).map((e) => { - const t = qE(e); +function RO(n) { + return Uu(n).map((e) => { + const t = a1(e); return [e, t ? [...t] : []]; }).filter(([, e]) => e.length > 0); } -function Rd(n) { - return n == null ? !1 : yu(n).some( +function Zd(n) { + return n == null ? !1 : Uu(n).some( (e) => { var t; - return (t = qE(e)) == null ? void 0 : t.size; + return (t = a1(e)) == null ? void 0 : t.size; } ); } -function uO(n, e) { +function CO(n, e) { return Promise.all( - e.map((i) => (oO(n, i), i().then((s) => s.default || s))) - ).then((i) => aO(n, ...i)); -} -const ca = {}; -function KE(n) { - if (!Rd(n)) - return n in ca ? ca[n] : Promise.resolve(); - const e = lO(n); - return ca[n] = Promise.all( + e.map((i) => (kO(n, i), i().then((s) => s.default || s))) + ).then((i) => IO(n, ...i)); +} +const ba = {}; +function o1(n) { + if (!Zd(n)) + return n in ba ? ba[n] : Promise.resolve(); + const e = RO(n); + return ba[n] = Promise.all( e.map( - ([t, i]) => uO(t, i) + ([t, i]) => CO(t, i) ) ).then(() => { - if (Rd(n)) - return KE(n); - delete ca[n]; - }), ca[n]; + if (Zd(n)) + return o1(n); + delete ba[n]; + }), ba[n]; } -const cO = { +const FO = { number: { scientific: { notation: "scientific" }, engineering: { notation: "engineering" }, @@ -36712,150 +36815,150 @@ const cO = { timeZoneName: "short" } } -}, hO = { +}, PO = { fallbackLocale: null, loadingDelay: 200, - formats: cO, + formats: FO, warnOnMissingMessages: !0, handleMissingMessage: void 0, ignoreTag: !0 -}, dO = hO; -function Lr() { - return dO; +}, OO = PO; +function $r() { + return OO; } -const Sh = io(!1); -var fO = Object.defineProperty, mO = Object.defineProperties, gO = Object.getOwnPropertyDescriptors, z0 = Object.getOwnPropertySymbols, pO = Object.prototype.hasOwnProperty, _O = Object.prototype.propertyIsEnumerable, W0 = (n, e, t) => e in n ? fO(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, vO = (n, e) => { +const Vh = _o(!1); +var MO = Object.defineProperty, $O = Object.defineProperties, BO = Object.getOwnPropertyDescriptors, u_ = Object.getOwnPropertySymbols, NO = Object.prototype.hasOwnProperty, UO = Object.prototype.propertyIsEnumerable, c_ = (n, e, t) => e in n ? MO(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, GO = (n, e) => { for (var t in e || (e = {})) - pO.call(e, t) && W0(n, t, e[t]); - if (z0) - for (var t of z0(e)) - _O.call(e, t) && W0(n, t, e[t]); + NO.call(e, t) && c_(n, t, e[t]); + if (u_) + for (var t of u_(e)) + UO.call(e, t) && c_(n, t, e[t]); return n; -}, yO = (n, e) => mO(n, gO(e)); -let Cd; -const zl = io(null); -function Y0(n) { +}, HO = (n, e) => $O(n, BO(e)); +let Jd; +const hu = _o(null); +function h_(n) { return n.split("-").map((e, t, i) => i.slice(0, t + 1).join("-")).reverse(); } -function yu(n, e = Lr().fallbackLocale) { - const t = Y0(n); - return e ? [.../* @__PURE__ */ new Set([...t, ...Y0(e)])] : t; +function Uu(n, e = $r().fallbackLocale) { + const t = h_(n); + return e ? [.../* @__PURE__ */ new Set([...t, ...h_(e)])] : t; } -function Rs() { - return Cd ?? void 0; +function Hs() { + return Jd ?? void 0; } -zl.subscribe((n) => { - Cd = n ?? void 0, typeof window < "u" && n != null && document.documentElement.setAttribute("lang", n); +hu.subscribe((n) => { + Jd = n ?? void 0, typeof window < "u" && n != null && document.documentElement.setAttribute("lang", n); }); -const EO = (n) => { - if (n && rO(n) && Rd(n)) { - const { loadingDelay: e } = Lr(); +const VO = (n) => { + if (n && LO(n) && Zd(n)) { + const { loadingDelay: e } = $r(); let t; - return typeof window < "u" && Rs() != null && e ? t = window.setTimeout( - () => Sh.set(!0), + return typeof window < "u" && Hs() != null && e ? t = window.setTimeout( + () => Vh.set(!0), e - ) : Sh.set(!0), KE(n).then(() => { - zl.set(n); + ) : Vh.set(!0), o1(n).then(() => { + hu.set(n); }).finally(() => { - clearTimeout(t), Sh.set(!1); + clearTimeout(t), Vh.set(!1); }); } - return zl.set(n); -}, so = yO(vO({}, zl), { - set: EO -}), Eu = (n) => { + return hu.set(n); +}, yo = HO(GO({}, hu), { + set: VO +}), Gu = (n) => { const e = /* @__PURE__ */ Object.create(null); return (i) => { const s = JSON.stringify(i); return s in e ? e[s] : e[s] = n(i); }; }; -var bO = Object.defineProperty, Wl = Object.getOwnPropertySymbols, jE = Object.prototype.hasOwnProperty, zE = Object.prototype.propertyIsEnumerable, X0 = (n, e, t) => e in n ? bO(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Cf = (n, e) => { +var qO = Object.defineProperty, du = Object.getOwnPropertySymbols, l1 = Object.prototype.hasOwnProperty, u1 = Object.prototype.propertyIsEnumerable, d_ = (n, e, t) => e in n ? qO(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Jf = (n, e) => { for (var t in e || (e = {})) - jE.call(e, t) && X0(n, t, e[t]); - if (Wl) - for (var t of Wl(e)) - zE.call(e, t) && X0(n, t, e[t]); + l1.call(e, t) && d_(n, t, e[t]); + if (du) + for (var t of du(e)) + u1.call(e, t) && d_(n, t, e[t]); return n; -}, Hr = (n, e) => { +}, Yr = (n, e) => { var t = {}; for (var i in n) - jE.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]); - if (n != null && Wl) - for (var i of Wl(n)) - e.indexOf(i) < 0 && zE.call(n, i) && (t[i] = n[i]); + l1.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]); + if (n != null && du) + for (var i of du(n)) + e.indexOf(i) < 0 && u1.call(n, i) && (t[i] = n[i]); return t; }; -const Va = (n, e) => { - const { formats: t } = Lr(); +const to = (n, e) => { + const { formats: t } = $r(); if (n in t && e in t[n]) return t[n][e]; throw new Error(`[svelte-i18n] Unknown "${e}" ${n} format.`); -}, TO = Eu( +}, KO = Gu( (n) => { - var e = n, { locale: t, format: i } = e, s = Hr(e, ["locale", "format"]); + var e = n, { locale: t, format: i } = e, s = Yr(e, ["locale", "format"]); if (t == null) throw new Error('[svelte-i18n] A "locale" must be set to format numbers'); - return i && (s = Va("number", i)), new Intl.NumberFormat(t, s); + return i && (s = to("number", i)), new Intl.NumberFormat(t, s); } -), SO = Eu( +), jO = Gu( (n) => { - var e = n, { locale: t, format: i } = e, s = Hr(e, ["locale", "format"]); + var e = n, { locale: t, format: i } = e, s = Yr(e, ["locale", "format"]); if (t == null) throw new Error('[svelte-i18n] A "locale" must be set to format dates'); - return i ? s = Va("date", i) : Object.keys(s).length === 0 && (s = Va("date", "short")), new Intl.DateTimeFormat(t, s); + return i ? s = to("date", i) : Object.keys(s).length === 0 && (s = to("date", "short")), new Intl.DateTimeFormat(t, s); } -), AO = Eu( +), zO = Gu( (n) => { - var e = n, { locale: t, format: i } = e, s = Hr(e, ["locale", "format"]); + var e = n, { locale: t, format: i } = e, s = Yr(e, ["locale", "format"]); if (t == null) throw new Error( '[svelte-i18n] A "locale" must be set to format time values' ); - return i ? s = Va("time", i) : Object.keys(s).length === 0 && (s = Va("time", "short")), new Intl.DateTimeFormat(t, s); + return i ? s = to("time", i) : Object.keys(s).length === 0 && (s = to("time", "short")), new Intl.DateTimeFormat(t, s); } -), xO = (n = {}) => { +), WO = (n = {}) => { var e = n, { - locale: t = Rs() - } = e, i = Hr(e, [ + locale: t = Hs() + } = e, i = Yr(e, [ "locale" ]); - return TO(Cf({ locale: t }, i)); -}, DO = (n = {}) => { + return KO(Jf({ locale: t }, i)); +}, YO = (n = {}) => { var e = n, { - locale: t = Rs() - } = e, i = Hr(e, [ + locale: t = Hs() + } = e, i = Yr(e, [ "locale" ]); - return SO(Cf({ locale: t }, i)); -}, wO = (n = {}) => { + return jO(Jf({ locale: t }, i)); +}, XO = (n = {}) => { var e = n, { - locale: t = Rs() - } = e, i = Hr(e, [ + locale: t = Hs() + } = e, i = Yr(e, [ "locale" ]); - return AO(Cf({ locale: t }, i)); -}, LO = Eu( + return zO(Jf({ locale: t }, i)); +}, QO = Gu( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - (n, e = Rs()) => new eO(n, e, Lr().formats, { - ignoreTag: Lr().ignoreTag + (n, e = Hs()) => new SO(n, e, $r().formats, { + ignoreTag: $r().ignoreTag }) -), IO = (n, e = {}) => { +), ZO = (n, e = {}) => { var t, i, s, r; let a = e; typeof n == "object" && (a = n, n = a.id); const { values: o, - locale: u = Rs(), + locale: u = Hs(), default: l } = a; if (u == null) throw new Error( "[svelte-i18n] Cannot format a message without first setting the initial locale." ); - let c = HE(n, u); + let c = s1(n, u); if (!c) - c = (r = (s = (i = (t = Lr()).handleMissingMessage) == null ? void 0 : i.call(t, { locale: u, id: n, defaultValue: l })) != null ? s : l) != null ? r : n; + c = (r = (s = (i = (t = $r()).handleMissingMessage) == null ? void 0 : i.call(t, { locale: u, id: n, defaultValue: l })) != null ? s : l) != null ? r : n; else if (typeof c != "string") return console.warn( `[svelte-i18n] Message with id "${n}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.` @@ -36864,7 +36967,7 @@ const Va = (n, e) => { return c; let h = c; try { - h = LO(c, u).format(o); + h = QO(c, u).format(o); } catch (d) { d instanceof Error && console.warn( `[svelte-i18n] Message "${n}" has syntax error:`, @@ -36872,34 +36975,34 @@ const Va = (n, e) => { ); } return h; -}, kO = (n, e) => wO(e).format(n), RO = (n, e) => DO(e).format(n), CO = (n, e) => xO(e).format(n), FO = (n, e = Rs()) => HE(n, e); -Gr([so, no], () => IO); -Gr([so], () => kO); -Gr([so], () => RO); -Gr([so], () => CO); -Gr([so, no], () => FO); +}, JO = (n, e) => XO(e).format(n), eM = (n, e) => YO(e).format(n), tM = (n, e) => WO(e).format(n), iM = (n, e = Hs()) => s1(n, e); +Wr([yo, vo], () => ZO); +Wr([yo], () => JO); +Wr([yo], () => eM); +Wr([yo], () => tM); +Wr([yo, vo], () => iM); const { - SvelteComponent: PO, - append_hydration: Pt, - attr: hs, - children: ds, - claim_element: fs, - claim_space: Fd, - claim_text: or, - detach: Sn, - element: ms, - init: OO, - insert_hydration: WE, - noop: Q0, - safe_not_equal: MO, - set_data: Yl, - set_style: Ah, - space: Pd, - text: lr, - toggle_class: Z0 -} = window.__gradio__svelte__internal, { onMount: $O, createEventDispatcher: BO, onDestroy: NO } = window.__gradio__svelte__internal; -function J0(n) { - let e, t, i, s, r = _a( + SvelteComponent: nM, + append_hydration: Bt, + attr: ps, + children: _s, + claim_element: vs, + claim_space: ef, + claim_text: yr, + detach: Dn, + element: ys, + init: sM, + insert_hydration: c1, + noop: f_, + safe_not_equal: rM, + set_data: fu, + set_style: qh, + space: tf, + text: Er, + toggle_class: m_ +} = window.__gradio__svelte__internal, { onMount: aM, createEventDispatcher: oM, onDestroy: lM } = window.__gradio__svelte__internal; +function g_(n) { + let e, t, i, s, r = La( /*file_to_display*/ n[2] ) + "", a, o, u, l, c = ( @@ -36908,49 +37011,49 @@ function J0(n) { ), h; return { c() { - e = ms("div"), t = ms("span"), i = ms("div"), s = ms("progress"), a = lr(r), u = Pd(), l = ms("span"), h = lr(c), this.h(); + e = ys("div"), t = ys("span"), i = ys("div"), s = ys("progress"), a = Er(r), u = tf(), l = ys("span"), h = Er(c), this.h(); }, l(d) { - e = fs(d, "DIV", { class: !0 }); - var f = ds(e); - t = fs(f, "SPAN", {}); - var m = ds(t); - i = fs(m, "DIV", { class: !0 }); - var g = ds(i); - s = fs(g, "PROGRESS", { style: !0, max: !0, class: !0 }); - var p = ds(s); - a = or(p, r), p.forEach(Sn), g.forEach(Sn), m.forEach(Sn), u = Fd(f), l = fs(f, "SPAN", { class: !0 }); - var y = ds(l); - h = or(y, c), y.forEach(Sn), f.forEach(Sn), this.h(); + e = vs(d, "DIV", { class: !0 }); + var f = _s(e); + t = vs(f, "SPAN", {}); + var m = _s(t); + i = vs(m, "DIV", { class: !0 }); + var g = _s(i); + s = vs(g, "PROGRESS", { style: !0, max: !0, class: !0 }); + var p = _s(s); + a = yr(p, r), p.forEach(Dn), g.forEach(Dn), m.forEach(Dn), u = ef(f), l = vs(f, "SPAN", { class: !0 }); + var y = _s(l); + h = yr(y, c), y.forEach(Dn), f.forEach(Dn), this.h(); }, h() { - Ah(s, "visibility", "hidden"), Ah(s, "height", "0"), Ah(s, "width", "0"), s.value = o = _a( + qh(s, "visibility", "hidden"), qh(s, "height", "0"), qh(s, "width", "0"), s.value = o = La( /*file_to_display*/ n[2] - ), hs(s, "max", "100"), hs(s, "class", "svelte-cr2edf"), hs(i, "class", "progress-bar svelte-cr2edf"), hs(l, "class", "file-name svelte-cr2edf"), hs(e, "class", "file svelte-cr2edf"); + ), ps(s, "max", "100"), ps(s, "class", "svelte-cr2edf"), ps(i, "class", "progress-bar svelte-cr2edf"), ps(l, "class", "file-name svelte-cr2edf"), ps(e, "class", "file svelte-cr2edf"); }, m(d, f) { - WE(d, e, f), Pt(e, t), Pt(t, i), Pt(i, s), Pt(s, a), Pt(e, u), Pt(e, l), Pt(l, h); + c1(d, e, f), Bt(e, t), Bt(t, i), Bt(i, s), Bt(s, a), Bt(e, u), Bt(e, l), Bt(l, h); }, p(d, f) { f & /*file_to_display*/ - 4 && r !== (r = _a( + 4 && r !== (r = La( /*file_to_display*/ d[2] - ) + "") && Yl(a, r), f & /*file_to_display*/ - 4 && o !== (o = _a( + ) + "") && fu(a, r), f & /*file_to_display*/ + 4 && o !== (o = La( /*file_to_display*/ d[2] )) && (s.value = o), f & /*file_to_display*/ 4 && c !== (c = /*file_to_display*/ - d[2].orig_name + "") && Yl(h, c); + d[2].orig_name + "") && fu(h, c); }, d(d) { - d && Sn(e); + d && Dn(e); } }; } -function UO(n) { +function uM(n) { let e, t, i, s = ( /*files_with_progress*/ n[0].length + "" @@ -36959,21 +37062,21 @@ function UO(n) { n[0].length > 1 ? "files" : "file" ), u, l, c, h = ( /*file_to_display*/ - n[2] && J0(n) + n[2] && g_(n) ); return { c() { - e = ms("div"), t = ms("span"), i = lr("Uploading "), r = lr(s), a = Pd(), u = lr(o), l = lr("..."), c = Pd(), h && h.c(), this.h(); + e = ys("div"), t = ys("span"), i = Er("Uploading "), r = Er(s), a = tf(), u = Er(o), l = Er("..."), c = tf(), h && h.c(), this.h(); }, l(d) { - e = fs(d, "DIV", { class: !0 }); - var f = ds(e); - t = fs(f, "SPAN", { class: !0 }); - var m = ds(t); - i = or(m, "Uploading "), r = or(m, s), a = Fd(m), u = or(m, o), l = or(m, "..."), m.forEach(Sn), c = Fd(f), h && h.l(f), f.forEach(Sn), this.h(); + e = vs(d, "DIV", { class: !0 }); + var f = _s(e); + t = vs(f, "SPAN", { class: !0 }); + var m = _s(t); + i = yr(m, "Uploading "), r = yr(m, s), a = ef(m), u = yr(m, o), l = yr(m, "..."), m.forEach(Dn), c = ef(f), h && h.l(f), f.forEach(Dn), this.h(); }, h() { - hs(t, "class", "uploading svelte-cr2edf"), hs(e, "class", "wrap svelte-cr2edf"), Z0( + ps(t, "class", "uploading svelte-cr2edf"), ps(e, "class", "wrap svelte-cr2edf"), m_( e, "progress", /*progress*/ @@ -36981,39 +37084,39 @@ function UO(n) { ); }, m(d, f) { - WE(d, e, f), Pt(e, t), Pt(t, i), Pt(t, r), Pt(t, a), Pt(t, u), Pt(t, l), Pt(e, c), h && h.m(e, null); + c1(d, e, f), Bt(e, t), Bt(t, i), Bt(t, r), Bt(t, a), Bt(t, u), Bt(t, l), Bt(e, c), h && h.m(e, null); }, p(d, [f]) { f & /*files_with_progress*/ 1 && s !== (s = /*files_with_progress*/ - d[0].length + "") && Yl(r, s), f & /*files_with_progress*/ + d[0].length + "") && fu(r, s), f & /*files_with_progress*/ 1 && o !== (o = /*files_with_progress*/ - d[0].length > 1 ? "files" : "file") && Yl(u, o), /*file_to_display*/ - d[2] ? h ? h.p(d, f) : (h = J0(d), h.c(), h.m(e, null)) : h && (h.d(1), h = null), f & /*progress*/ - 2 && Z0( + d[0].length > 1 ? "files" : "file") && fu(u, o), /*file_to_display*/ + d[2] ? h ? h.p(d, f) : (h = g_(d), h.c(), h.m(e, null)) : h && (h.d(1), h = null), f & /*progress*/ + 2 && m_( e, "progress", /*progress*/ d[1] ); }, - i: Q0, - o: Q0, + i: f_, + o: f_, d(d) { - d && Sn(e), h && h.d(); + d && Dn(e), h && h.d(); } }; } -function _a(n) { +function La(n) { return n.progress * 100 / (n.size || 0) || 0; } -function GO(n) { +function cM(n) { let e = 0; return n.forEach((t) => { - e += _a(t); + e += La(t); }), document.documentElement.style.setProperty("--upload-progress-width", (e / n.length).toFixed(2) + "%"), e / n.length; } -function HO(n, e, t) { +function hM(n, e, t) { var i = this && this.__awaiter || function(g, p, y, v) { function _(E) { return E instanceof y ? E : new y(function(T) { @@ -37021,32 +37124,32 @@ function HO(n, e, t) { }); } return new (y || (y = Promise))(function(E, T) { - function A(x) { + function x(A) { try { - D(v.next(x)); + D(v.next(A)); } catch (w) { T(w); } } - function S(x) { + function S(A) { try { - D(v.throw(x)); + D(v.throw(A)); } catch (w) { T(w); } } - function D(x) { - x.done ? E(x.value) : _(x.value).then(A, S); + function D(A) { + A.done ? E(A.value) : _(A.value).then(x, S); } D((v = v.apply(g, p || [])).next()); }); }; let { upload_id: s } = e, { root: r } = e, { files: a } = e, { stream_handler: o } = e, u, l = !1, c, h, d = a.map((g) => Object.assign(Object.assign({}, g), { progress: 0 })); - const f = BO(); + const f = oM(); function m(g, p) { t(0, d = d.map((y) => (y.orig_name === g && (y.progress += p), y))); } - return $O(() => i(void 0, void 0, void 0, function* () { + return aM(() => i(void 0, void 0, void 0, function* () { if (u = yield o(new URL(`${r}/gradio_api/upload_progress?upload_id=${s}`)), u == null) throw new Error("Event source is not defined"); u.onmessage = function(g) { @@ -37055,13 +37158,13 @@ function HO(n, e, t) { l || t(1, l = !0), p.msg === "done" ? (u == null || u.close(), f("done")) : (t(7, c = p), m(p.orig_name, p.chunk_size)); }); }; - })), NO(() => { + })), lM(() => { (u != null || u != null) && u.close(); }), n.$$set = (g) => { "upload_id" in g && t(3, s = g.upload_id), "root" in g && t(4, r = g.root), "files" in g && t(5, a = g.files), "stream_handler" in g && t(6, o = g.stream_handler); }, n.$$.update = () => { n.$$.dirty & /*files_with_progress*/ - 1 && GO(d), n.$$.dirty & /*current_file_upload, files_with_progress*/ + 1 && cM(d), n.$$.dirty & /*current_file_upload, files_with_progress*/ 129 && t(2, h = c || d[0]); }, [ d, @@ -37074,9 +37177,9 @@ function HO(n, e, t) { c ]; } -class VO extends PO { +class dM extends nM { constructor(e) { - super(), OO(this, e, HO, UO, MO, { + super(), sM(this, e, hM, uM, rM, { upload_id: 3, root: 4, files: 5, @@ -37084,7 +37187,7 @@ class VO extends PO { }); } } -function qO() { +function fM() { let n, e; return { drag(t, i = {}) { @@ -37137,40 +37240,40 @@ function qO() { }; } const { - SvelteComponent: KO, - action_destroyer: jO, - attr: Ti, - check_outros: YE, - children: XE, - claim_component: zO, - claim_element: QE, - create_component: WO, - create_slot: ZE, - destroy_component: YO, - detach: Ir, - element: JE, - empty: Xl, - get_all_dirty_from_scope: e1, - get_slot_changes: t1, - group_outros: i1, - init: XO, - insert_hydration: bu, - is_function: QO, - listen: ZO, - mount_component: JO, - safe_not_equal: eM, - set_style: Ql, - toggle_class: He, - transition_in: Yn, - transition_out: Ls, - update_slot_base: n1 -} = window.__gradio__svelte__internal, { createEventDispatcher: tM, tick: iM, getContext: wj } = window.__gradio__svelte__internal; -function nM(n) { + SvelteComponent: mM, + action_destroyer: gM, + attr: Ci, + check_outros: h1, + children: d1, + claim_component: pM, + claim_element: f1, + create_component: _M, + create_slot: m1, + destroy_component: vM, + detach: Br, + element: g1, + empty: mu, + get_all_dirty_from_scope: p1, + get_slot_changes: _1, + group_outros: v1, + init: yM, + insert_hydration: Hu, + is_function: EM, + listen: bM, + mount_component: TM, + safe_not_equal: SM, + set_style: gu, + toggle_class: Ke, + transition_in: ts, + transition_out: Ns, + update_slot_base: y1 +} = window.__gradio__svelte__internal, { createEventDispatcher: AM, tick: xM, getContext: Nj } = window.__gradio__svelte__internal; +function DM(n) { let e, t, i, s, r, a, o; const u = ( /*#slots*/ n[30].default - ), l = ZE( + ), l = m1( u, n, /*$$scope*/ @@ -37179,52 +37282,52 @@ function nM(n) { ); return { c() { - e = JE("button"), l && l.c(), this.h(); + e = g1("button"), l && l.c(), this.h(); }, l(c) { - e = QE(c, "BUTTON", { + e = f1(c, "BUTTON", { tabindex: !0, "aria-label": !0, "aria-dropeffect": !0, class: !0 }); - var h = XE(e); - l && l.l(h), h.forEach(Ir), this.h(); + var h = d1(e); + l && l.l(h), h.forEach(Br), this.h(); }, h() { - Ti(e, "tabindex", t = /*hidden*/ - n[9] ? -1 : 0), Ti(e, "aria-label", i = /*aria_label*/ - n[14] || "Click to upload or drop files"), Ti(e, "aria-dropeffect", "copy"), Ti(e, "class", "svelte-1o7nwih"), He( + Ci(e, "tabindex", t = /*hidden*/ + n[9] ? -1 : 0), Ci(e, "aria-label", i = /*aria_label*/ + n[14] || "Click to upload or drop files"), Ci(e, "aria-dropeffect", "copy"), Ci(e, "class", "svelte-1o7nwih"), Ke( e, "hidden", /*hidden*/ n[9] - ), He( + ), Ke( e, "center", /*center*/ n[4] - ), He( + ), Ke( e, "boundedheight", /*boundedheight*/ n[3] - ), He( + ), Ke( e, "flex", /*flex*/ n[5] - ), He( + ), Ke( e, "disable_click", /*disable_click*/ n[7] - ), He( + ), Ke( e, "icon-mode", /*icon_upload*/ n[12] - ), Ql( + ), gu( e, "height", /*icon_upload*/ @@ -37242,9 +37345,9 @@ function nM(n) { ); }, m(c, h) { - bu(c, e, h), l && l.m(e, null), r = !0, a || (o = jO(s = /*drag*/ + Hu(c, e, h), l && l.m(e, null), r = !0, a || (o = gM(s = /*drag*/ n[19].call(null, e, { - on_drag_change: t_, + on_drag_change: __, on_files: ( /*drag_function_1*/ n[31] @@ -37265,30 +37368,30 @@ function nM(n) { }, p(c, h) { l && l.p && (!r || h[0] & /*$$scope*/ - 536870912) && n1( + 536870912) && y1( l, u, c, /*$$scope*/ c[29], - r ? t1( + r ? _1( u, /*$$scope*/ c[29], h, null - ) : e1( + ) : p1( /*$$scope*/ c[29] ), null ), (!r || h[0] & /*hidden*/ 512 && t !== (t = /*hidden*/ - c[9] ? -1 : 0)) && Ti(e, "tabindex", t), (!r || h[0] & /*aria_label*/ + c[9] ? -1 : 0)) && Ci(e, "tabindex", t), (!r || h[0] & /*aria_label*/ 16384 && i !== (i = /*aria_label*/ - c[14] || "Click to upload or drop files")) && Ti(e, "aria-label", i), s && QO(s.update) && h[0] & /*accept_file_types, file_count, disable_click*/ + c[14] || "Click to upload or drop files")) && Ci(e, "aria-label", i), s && EM(s.update) && h[0] & /*accept_file_types, file_count, disable_click*/ 262336 && s.update.call(null, { - on_drag_change: t_, + on_drag_change: __, on_files: ( /*drag_function_1*/ c[31] @@ -37306,43 +37409,43 @@ function nM(n) { c[7] ) }), (!r || h[0] & /*hidden*/ - 512) && He( + 512) && Ke( e, "hidden", /*hidden*/ c[9] ), (!r || h[0] & /*center*/ - 16) && He( + 16) && Ke( e, "center", /*center*/ c[4] ), (!r || h[0] & /*boundedheight*/ - 8) && He( + 8) && Ke( e, "boundedheight", /*boundedheight*/ c[3] ), (!r || h[0] & /*flex*/ - 32) && He( + 32) && Ke( e, "flex", /*flex*/ c[5] ), (!r || h[0] & /*disable_click*/ - 128) && He( + 128) && Ke( e, "disable_click", /*disable_click*/ c[7] ), (!r || h[0] & /*icon_upload*/ - 4096) && He( + 4096) && Ke( e, "icon-mode", /*icon_upload*/ c[12] ), h[0] & /*icon_upload, height*/ - 12288 && Ql( + 12288 && gu( e, "height", /*icon_upload*/ @@ -37360,53 +37463,53 @@ function nM(n) { ); }, i(c) { - r || (Yn(l, c), r = !0); + r || (ts(l, c), r = !0); }, o(c) { - Ls(l, c), r = !1; + Ns(l, c), r = !1; }, d(c) { - c && Ir(e), l && l.d(c), a = !1, o(); + c && Br(e), l && l.d(c), a = !1, o(); } }; } -function sM(n) { +function wM(n) { let e, t, i = !/*hidden*/ - n[9] && e_(n); + n[9] && p_(n); return { c() { - i && i.c(), e = Xl(); + i && i.c(), e = mu(); }, l(s) { - i && i.l(s), e = Xl(); + i && i.l(s), e = mu(); }, m(s, r) { - i && i.m(s, r), bu(s, e, r), t = !0; + i && i.m(s, r), Hu(s, e, r), t = !0; }, p(s, r) { /*hidden*/ - s[9] ? i && (i1(), Ls(i, 1, 1, () => { + s[9] ? i && (v1(), Ns(i, 1, 1, () => { i = null; - }), YE()) : i ? (i.p(s, r), r[0] & /*hidden*/ - 512 && Yn(i, 1)) : (i = e_(s), i.c(), Yn(i, 1), i.m(e.parentNode, e)); + }), h1()) : i ? (i.p(s, r), r[0] & /*hidden*/ + 512 && ts(i, 1)) : (i = p_(s), i.c(), ts(i, 1), i.m(e.parentNode, e)); }, i(s) { - t || (Yn(i), t = !0); + t || (ts(i), t = !0); }, o(s) { - Ls(i), t = !1; + Ns(i), t = !1; }, d(s) { - s && Ir(e), i && i.d(s); + s && Br(e), i && i.d(s); } }; } -function rM(n) { +function LM(n) { let e, t, i, s, r, a; const o = ( /*#slots*/ n[30].default - ), u = ZE( + ), u = m1( o, n, /*$$scope*/ @@ -37415,46 +37518,46 @@ function rM(n) { ); return { c() { - e = JE("button"), u && u.c(), this.h(); + e = g1("button"), u && u.c(), this.h(); }, l(l) { - e = QE(l, "BUTTON", { + e = f1(l, "BUTTON", { tabindex: !0, "aria-label": !0, class: !0 }); - var c = XE(e); - u && u.l(c), c.forEach(Ir), this.h(); + var c = d1(e); + u && u.l(c), c.forEach(Br), this.h(); }, h() { - Ti(e, "tabindex", t = /*hidden*/ - n[9] ? -1 : 0), Ti(e, "aria-label", i = /*aria_label*/ - n[14] || "Paste from clipboard"), Ti(e, "class", "svelte-1o7nwih"), He( + Ci(e, "tabindex", t = /*hidden*/ + n[9] ? -1 : 0), Ci(e, "aria-label", i = /*aria_label*/ + n[14] || "Paste from clipboard"), Ci(e, "class", "svelte-1o7nwih"), Ke( e, "hidden", /*hidden*/ n[9] - ), He( + ), Ke( e, "center", /*center*/ n[4] - ), He( + ), Ke( e, "boundedheight", /*boundedheight*/ n[3] - ), He( + ), Ke( e, "flex", /*flex*/ n[5] - ), He( + ), Ke( e, "icon-mode", /*icon_upload*/ n[12] - ), Ql( + ), gu( e, "height", /*icon_upload*/ @@ -37472,7 +37575,7 @@ function rM(n) { ); }, m(l, c) { - bu(l, e, c), u && u.m(e, null), s = !0, r || (a = ZO( + Hu(l, e, c), u && u.m(e, null), s = !0, r || (a = bM( e, "click", /*paste_clipboard*/ @@ -37481,59 +37584,59 @@ function rM(n) { }, p(l, c) { u && u.p && (!s || c[0] & /*$$scope*/ - 536870912) && n1( + 536870912) && y1( u, o, l, /*$$scope*/ l[29], - s ? t1( + s ? _1( o, /*$$scope*/ l[29], c, null - ) : e1( + ) : p1( /*$$scope*/ l[29] ), null ), (!s || c[0] & /*hidden*/ 512 && t !== (t = /*hidden*/ - l[9] ? -1 : 0)) && Ti(e, "tabindex", t), (!s || c[0] & /*aria_label*/ + l[9] ? -1 : 0)) && Ci(e, "tabindex", t), (!s || c[0] & /*aria_label*/ 16384 && i !== (i = /*aria_label*/ - l[14] || "Paste from clipboard")) && Ti(e, "aria-label", i), (!s || c[0] & /*hidden*/ - 512) && He( + l[14] || "Paste from clipboard")) && Ci(e, "aria-label", i), (!s || c[0] & /*hidden*/ + 512) && Ke( e, "hidden", /*hidden*/ l[9] ), (!s || c[0] & /*center*/ - 16) && He( + 16) && Ke( e, "center", /*center*/ l[4] ), (!s || c[0] & /*boundedheight*/ - 8) && He( + 8) && Ke( e, "boundedheight", /*boundedheight*/ l[3] ), (!s || c[0] & /*flex*/ - 32) && He( + 32) && Ke( e, "flex", /*flex*/ l[5] ), (!s || c[0] & /*icon_upload*/ - 4096) && He( + 4096) && Ke( e, "icon-mode", /*icon_upload*/ l[12] ), c[0] & /*icon_upload, height*/ - 12288 && Ql( + 12288 && gu( e, "height", /*icon_upload*/ @@ -37551,19 +37654,19 @@ function rM(n) { ); }, i(l) { - s || (Yn(u, l), s = !0); + s || (ts(u, l), s = !0); }, o(l) { - Ls(u, l), s = !1; + Ns(u, l), s = !1; }, d(l) { - l && Ir(e), u && u.d(l), r = !1, a(); + l && Br(e), u && u.d(l), r = !1, a(); } }; } -function e_(n) { +function p_(n) { let e, t; - return e = new VO({ + return e = new dM({ props: { root: ( /*root*/ @@ -37584,13 +37687,13 @@ function e_(n) { } }), { c() { - WO(e.$$.fragment); + _M(e.$$.fragment); }, l(i) { - zO(e.$$.fragment, i); + pM(e.$$.fragment, i); }, m(i, s) { - JO(e, i, s), t = !0; + TM(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -37605,19 +37708,19 @@ function e_(n) { i[11]), e.$set(r); }, i(i) { - t || (Yn(e.$$.fragment, i), t = !0); + t || (ts(e.$$.fragment, i), t = !0); }, o(i) { - Ls(e.$$.fragment, i), t = !1; + Ns(e.$$.fragment, i), t = !1; }, d(i) { - YO(e, i); + vM(e, i); } }; } -function aM(n) { +function IM(n) { let e, t, i, s; - const r = [rM, sM, nM], a = []; + const r = [LM, wM, DM], a = []; function o(u, l) { return ( /*filetype*/ @@ -37630,32 +37733,32 @@ function aM(n) { } return e = o(n), t = a[e] = r[e](n), { c() { - t.c(), i = Xl(); + t.c(), i = mu(); }, l(u) { - t.l(u), i = Xl(); + t.l(u), i = mu(); }, m(u, l) { - a[e].m(u, l), bu(u, i, l), s = !0; + a[e].m(u, l), Hu(u, i, l), s = !0; }, p(u, l) { let c = e; - e = o(u), e === c ? a[e].p(u, l) : (i1(), Ls(a[c], 1, 1, () => { + e = o(u), e === c ? a[e].p(u, l) : (v1(), Ns(a[c], 1, 1, () => { a[c] = null; - }), YE(), t = a[e], t ? t.p(u, l) : (t = a[e] = r[e](u), t.c()), Yn(t, 1), t.m(i.parentNode, i)); + }), h1(), t = a[e], t ? t.p(u, l) : (t = a[e] = r[e](u), t.c()), ts(t, 1), t.m(i.parentNode, i)); }, i(u) { - s || (Yn(t), s = !0); + s || (ts(t), s = !0); }, o(u) { - Ls(t), s = !1; + Ns(t), s = !1; }, d(u) { - u && Ir(i), a[e].d(u); + u && Br(i), a[e].d(u); } }; } -function oM(n, e, t) { +function kM(n, e, t) { if (!n || n === "*" || n === "file/*" || Array.isArray(n) && n.some((s) => s === "*" || s === "file/*")) return !0; let i; @@ -37670,57 +37773,57 @@ function oM(n, e, t) { return s.endsWith("/*") && t.startsWith(r + "/"); }); } -const t_ = (n) => n = n; -function lM(n, e, t) { +const __ = (n) => n = n; +function RM(n, e, t) { let i, { $$slots: s = {}, $$scope: r } = e; - var a = this && this.__awaiter || function(G, Y, ee, se) { - function ye(Pe) { - return Pe instanceof ee ? Pe : new ee(function(Ke) { - Ke(Pe); + var a = this && this.__awaiter || function(G, Z, U, re) { + function j(Ee) { + return Ee instanceof U ? Ee : new U(function(Oe) { + Oe(Ee); }); } - return new (ee || (ee = Promise))(function(Pe, Ke) { - function jt(Se) { + return new (U || (U = Promise))(function(Ee, Oe) { + function je(Fe) { try { - he(se.next(Se)); - } catch (dt) { - Ke(dt); + ve(re.next(Fe)); + } catch (Ye) { + Oe(Ye); } } - function ae(Se) { + function se(Fe) { try { - he(se.throw(Se)); - } catch (dt) { - Ke(dt); + ve(re.throw(Fe)); + } catch (Ye) { + Oe(Ye); } } - function he(Se) { - Se.done ? Pe(Se.value) : ye(Se.value).then(jt, ae); + function ve(Fe) { + Fe.done ? Ee(Fe.value) : j(Fe.value).then(je, se); } - he((se = se.apply(G, Y || [])).next()); + ve((re = re.apply(G, Z || [])).next()); }); }; - const { drag: o, open_file_upload: u } = qO(); - let { filetype: l = null } = e, { dragging: c = !1 } = e, { boundedheight: h = !0 } = e, { center: d = !0 } = e, { flex: f = !0 } = e, { file_count: m = "single" } = e, { disable_click: g = !1 } = e, { root: p } = e, { hidden: y = !1 } = e, { format: v = "file" } = e, { uploading: _ = !1 } = e, { show_progress: E = !0 } = e, { max_file_size: T = null } = e, { upload: A } = e, { stream_handler: S } = e, { icon_upload: D = !1 } = e, { height: x = void 0 } = e, { aria_label: w = void 0 } = e; + const { drag: o, open_file_upload: u } = fM(); + let { filetype: l = null } = e, { dragging: c = !1 } = e, { boundedheight: h = !0 } = e, { center: d = !0 } = e, { flex: f = !0 } = e, { file_count: m = "single" } = e, { disable_click: g = !1 } = e, { root: p } = e, { hidden: y = !1 } = e, { format: v = "file" } = e, { uploading: _ = !1 } = e, { show_progress: E = !0 } = e, { max_file_size: T = null } = e, { upload: x } = e, { stream_handler: S } = e, { icon_upload: D = !1 } = e, { height: A = void 0 } = e, { aria_label: w = void 0 } = e; function I() { u(); } - let R, M, P, K = null; - const q = () => { + let M, k, q, K = null; + const H = () => { if (typeof navigator < "u") { const G = navigator.userAgent.toLowerCase(); return G.indexOf("iphone") > -1 || G.indexOf("ipad") > -1; } return !1; - }, W = tM(), U = ["image", "video", "audio", "text", "file"], j = (G) => i && G.startsWith(".") ? (K = !0, G) : i && G.includes("file/*") ? "*" : G.startsWith(".") || G.endsWith("/*") ? G : U.includes(G) ? G + "/*" : "." + G; - function $() { + }, Y = AM(), B = ["image", "video", "audio", "text", "file"], z = (G) => i && G.startsWith(".") ? (K = !0, G) : i && G.includes("file/*") ? "*" : G.startsWith(".") || G.endsWith("/*") ? G : B.includes(G) ? G + "/*" : "." + G; + function W() { navigator.clipboard.read().then((G) => a(this, void 0, void 0, function* () { - for (let Y = 0; Y < G.length; Y++) { - const ee = G[Y].types.find((se) => se.startsWith("image/")); - if (ee) { - G[Y].getType(ee).then((se) => a(this, void 0, void 0, function* () { - const ye = new File([se], `clipboard.${ee.replace("image/", "")}`); - yield Q([ye]); + for (let Z = 0; Z < G.length; Z++) { + const U = G[Z].types.find((re) => re.startsWith("image/")); + if (U) { + G[Z].getType(U).then((re) => a(this, void 0, void 0, function* () { + const j = new File([re], `clipboard.${U.replace("image/", "")}`); + yield Q([j]); })); break; } @@ -37730,14 +37833,14 @@ function lM(n, e, t) { function L() { u(); } - function H(G) { + function $(G) { return a(this, void 0, void 0, function* () { - yield iM(), t(16, R = Math.random().toString(36).substring(2, 15)), t(2, _ = !0); + yield xM(), t(16, M = Math.random().toString(36).substring(2, 15)), t(2, _ = !0); try { - const Y = yield A(G, p, R, T ?? 1 / 0); - return W("load", m === "single" ? Y == null ? void 0 : Y[0] : Y), t(2, _ = !1), Y || []; - } catch (Y) { - return W("error", Y.message), t(2, _ = !1), []; + const Z = yield x(G, p, M, T ?? 1 / 0); + return Y("load", m === "single" ? Z == null ? void 0 : Z[0] : Z), t(2, _ = !1), Z || []; + } catch (Z) { + return Y("error", Z.message), t(2, _ = !1), []; } }); } @@ -37745,64 +37848,64 @@ function lM(n, e, t) { return a(this, void 0, void 0, function* () { if (!G.length) return; - let Y = G.map((ee) => new File([ee], ee instanceof File ? ee.name : "file", { type: ee.type })); - return i && K && (Y = Y.filter((ee) => X(ee) ? !0 : (W("error", `Invalid file type: ${ee.name}. Only ${l} allowed.`), !1)), Y.length === 0) ? [] : (t(17, M = yield If(Y)), yield H(M)); + let Z = G.map((U) => new File([U], U instanceof File ? U.name : "file", { type: U.type })); + return i && K && (Z = Z.filter((U) => C(U) ? !0 : (Y("error", `Invalid file type: ${U.name}. Only ${l} allowed.`), !1)), Z.length === 0) ? [] : (t(17, k = yield Xf(Z)), yield $(k)); }); } - function X(G) { - return l ? (Array.isArray(l) ? l : [l]).some((ee) => { - const se = j(ee); - if (se.startsWith(".")) - return G.name.toLowerCase().endsWith(se.toLowerCase()); - if (se === "*") + function C(G) { + return l ? (Array.isArray(l) ? l : [l]).some((U) => { + const re = z(U); + if (re.startsWith(".")) + return G.name.toLowerCase().endsWith(re.toLowerCase()); + if (re === "*") return !0; - if (se.endsWith("/*")) { - const [ye] = se.split("/"); - return G.type.startsWith(ye + "/"); + if (re.endsWith("/*")) { + const [j] = re.split("/"); + return G.type.startsWith(j + "/"); } - return G.type === se; + return G.type === re; }) : !0; } - function C(G) { + function O(G) { return a(this, void 0, void 0, function* () { - const Y = G.filter((ee) => { - const se = "." + ee.name.split(".").pop(); - return se && oM(P, se, ee.type) || (se && Array.isArray(l) ? l.includes(se) : se === l) ? !0 : (W("error", `Invalid file type only ${l} allowed.`), !1); + const Z = G.filter((U) => { + const re = "." + U.name.split(".").pop(); + return re && kM(q, re, U.type) || (re && Array.isArray(l) ? l.includes(re) : re === l) ? !0 : (Y("error", `Invalid file type only ${l} allowed.`), !1); }); if (v != "blob") - yield Q(Y); + yield Q(Z); else { if (m === "single") { - W("load", Y[0]); + Y("load", Z[0]); return; } - W("load", Y); + Y("load", Z); } }); } - function B(G) { + function N(G) { return a(this, void 0, void 0, function* () { - var Y; - if (t(1, c = !1), !(!((Y = G.dataTransfer) === null || Y === void 0) && Y.files)) return; - const ee = Array.from(G.dataTransfer.files).filter(X); + var Z; + if (t(1, c = !1), !(!((Z = G.dataTransfer) === null || Z === void 0) && Z.files)) return; + const U = Array.from(G.dataTransfer.files).filter(C); if (v != "blob") - yield Q(ee); + yield Q(U); else { if (m === "single") { - W("load", ee[0]); + Y("load", U[0]); return; } - W("load", ee); + Y("load", U); } }); } - const N = (G) => C(G); + const ee = (G) => O(G); return n.$$set = (G) => { - "filetype" in G && t(0, l = G.filetype), "dragging" in G && t(1, c = G.dragging), "boundedheight" in G && t(3, h = G.boundedheight), "center" in G && t(4, d = G.center), "flex" in G && t(5, f = G.flex), "file_count" in G && t(6, m = G.file_count), "disable_click" in G && t(7, g = G.disable_click), "root" in G && t(8, p = G.root), "hidden" in G && t(9, y = G.hidden), "format" in G && t(21, v = G.format), "uploading" in G && t(2, _ = G.uploading), "show_progress" in G && t(10, E = G.show_progress), "max_file_size" in G && t(22, T = G.max_file_size), "upload" in G && t(23, A = G.upload), "stream_handler" in G && t(11, S = G.stream_handler), "icon_upload" in G && t(12, D = G.icon_upload), "height" in G && t(13, x = G.height), "aria_label" in G && t(14, w = G.aria_label), "$$scope" in G && t(29, r = G.$$scope); + "filetype" in G && t(0, l = G.filetype), "dragging" in G && t(1, c = G.dragging), "boundedheight" in G && t(3, h = G.boundedheight), "center" in G && t(4, d = G.center), "flex" in G && t(5, f = G.flex), "file_count" in G && t(6, m = G.file_count), "disable_click" in G && t(7, g = G.disable_click), "root" in G && t(8, p = G.root), "hidden" in G && t(9, y = G.hidden), "format" in G && t(21, v = G.format), "uploading" in G && t(2, _ = G.uploading), "show_progress" in G && t(10, E = G.show_progress), "max_file_size" in G && t(22, T = G.max_file_size), "upload" in G && t(23, x = G.upload), "stream_handler" in G && t(11, S = G.stream_handler), "icon_upload" in G && t(12, D = G.icon_upload), "height" in G && t(13, A = G.height), "aria_label" in G && t(14, w = G.aria_label), "$$scope" in G && t(29, r = G.$$scope); }, n.$$.update = () => { n.$$.dirty[0] & /*filetype, ios*/ - 268435457 && (l == null ? t(18, P = null) : typeof l == "string" ? t(18, P = j(l)) : i && l.includes("file/*") ? t(18, P = "*") : (t(0, l = l.map(j)), t(18, P = l.join(", ")))); - }, t(28, i = q()), [ + 268435457 && (l == null ? t(18, q = null) : typeof l == "string" ? t(18, q = z(l)) : i && l.includes("file/*") ? t(18, q = "*") : (t(0, l = l.map(z)), t(18, q = l.join(", ")))); + }, t(28, i = H()), [ l, c, _, @@ -37816,35 +37919,35 @@ function lM(n, e, t) { E, S, D, - x, + A, w, - $, - R, + W, M, - P, + k, + q, o, - C, + O, v, T, - A, + x, I, L, Q, - B, + N, i, r, s, - N + ee ]; } -class uM extends KO { +class CM extends mM { constructor(e) { - super(), XO( + super(), yM( this, e, - lM, - aM, - eM, + RM, + IM, + SM, { filetype: 0, dragging: 1, @@ -37891,31 +37994,31 @@ class uM extends KO { } } const { - SvelteComponent: cM, - check_outros: xh, - claim_component: Vr, - claim_space: el, - create_component: qr, - create_slot: hM, - destroy_component: Kr, - detach: tl, - get_all_dirty_from_scope: dM, - get_slot_changes: fM, - group_outros: Dh, - init: mM, - insert_hydration: il, - mount_component: jr, - safe_not_equal: gM, - space: nl, - transition_in: vt, - transition_out: Ut, - update_slot_base: pM -} = window.__gradio__svelte__internal, { createEventDispatcher: _M } = window.__gradio__svelte__internal; -function i_(n) { + SvelteComponent: FM, + check_outros: Kh, + claim_component: Xr, + claim_space: yl, + create_component: Qr, + create_slot: PM, + destroy_component: Zr, + detach: El, + get_all_dirty_from_scope: OM, + get_slot_changes: MM, + group_outros: jh, + init: $M, + insert_hydration: bl, + mount_component: Jr, + safe_not_equal: BM, + space: Tl, + transition_in: St, + transition_out: jt, + update_slot_base: NM +} = window.__gradio__svelte__internal, { createEventDispatcher: UM } = window.__gradio__svelte__internal; +function v_(n) { let e, t; - return e = new Ci({ + return e = new vi({ props: { - Icon: nS, + Icon: yS, label: ( /*i18n*/ n[3]("common.edit") @@ -37927,13 +38030,13 @@ function i_(n) { n[6] ), { c() { - qr(e.$$.fragment); + Qr(e.$$.fragment); }, l(i) { - Vr(e.$$.fragment, i); + Xr(e.$$.fragment, i); }, m(i, s) { - jr(e, i, s), t = !0; + Jr(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -37942,21 +38045,21 @@ function i_(n) { i[3]("common.edit")), e.$set(r); }, i(i) { - t || (vt(e.$$.fragment, i), t = !0); + t || (St(e.$$.fragment, i), t = !0); }, o(i) { - Ut(e.$$.fragment, i), t = !1; + jt(e.$$.fragment, i), t = !1; }, d(i) { - Kr(e, i); + Zr(e, i); } }; } -function n_(n) { +function y_(n) { let e, t; - return e = new Ci({ + return e = new vi({ props: { - Icon: ef, + Icon: Tf, label: ( /*i18n*/ n[3]("common.undo") @@ -37968,13 +38071,13 @@ function n_(n) { n[7] ), { c() { - qr(e.$$.fragment); + Qr(e.$$.fragment); }, l(i) { - Vr(e.$$.fragment, i); + Xr(e.$$.fragment, i); }, m(i, s) { - jr(e, i, s), t = !0; + Jr(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -37983,37 +38086,37 @@ function n_(n) { i[3]("common.undo")), e.$set(r); }, i(i) { - t || (vt(e.$$.fragment, i), t = !0); + t || (St(e.$$.fragment, i), t = !0); }, o(i) { - Ut(e.$$.fragment, i), t = !1; + jt(e.$$.fragment, i), t = !1; }, d(i) { - Kr(e, i); + Zr(e, i); } }; } -function s_(n) { +function E_(n) { let e, t; - return e = new sy({ + return e = new Ey({ props: { href: ( /*download*/ n[2] ), download: !0, - $$slots: { default: [vM] }, + $$slots: { default: [GM] }, $$scope: { ctx: n } } }), { c() { - qr(e.$$.fragment); + Qr(e.$$.fragment); }, l(i) { - Vr(e.$$.fragment, i); + Xr(e.$$.fragment, i); }, m(i, s) { - jr(e, i, s), t = !0; + Jr(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -38023,21 +38126,21 @@ function s_(n) { 520 && (r.$$scope = { dirty: s, ctx: i }), e.$set(r); }, i(i) { - t || (vt(e.$$.fragment, i), t = !0); + t || (St(e.$$.fragment, i), t = !0); }, o(i) { - Ut(e.$$.fragment, i), t = !1; + jt(e.$$.fragment, i), t = !1; }, d(i) { - Kr(e, i); + Zr(e, i); } }; } -function vM(n) { +function GM(n) { let e, t; - return e = new Ci({ + return e = new vi({ props: { - Icon: ov, + Icon: Sv, label: ( /*i18n*/ n[3]("common.download") @@ -38045,13 +38148,13 @@ function vM(n) { } }), { c() { - qr(e.$$.fragment); + Qr(e.$$.fragment); }, l(i) { - Vr(e.$$.fragment, i); + Xr(e.$$.fragment, i); }, m(i, s) { - jr(e, i, s), t = !0; + Jr(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -38060,40 +38163,40 @@ function vM(n) { i[3]("common.download")), e.$set(r); }, i(i) { - t || (vt(e.$$.fragment, i), t = !0); + t || (St(e.$$.fragment, i), t = !0); }, o(i) { - Ut(e.$$.fragment, i), t = !1; + jt(e.$$.fragment, i), t = !1; }, d(i) { - Kr(e, i); + Zr(e, i); } }; } -function yM(n) { +function HM(n) { let e, t, i, s, r, a, o = ( /*editable*/ - n[0] && i_(n) + n[0] && v_(n) ), u = ( /*undoable*/ - n[1] && n_(n) + n[1] && y_(n) ), l = ( /*download*/ - n[2] && s_(n) + n[2] && E_(n) ); const c = ( /*#slots*/ n[5].default - ), h = hM( + ), h = PM( c, n, /*$$scope*/ n[9], null ); - return r = new Ci({ + return r = new vi({ props: { - Icon: Jd, + Icon: bf, label: ( /*i18n*/ n[3]("common.clear") @@ -38105,41 +38208,41 @@ function yM(n) { n[8] ), { c() { - o && o.c(), e = nl(), u && u.c(), t = nl(), l && l.c(), i = nl(), h && h.c(), s = nl(), qr(r.$$.fragment); + o && o.c(), e = Tl(), u && u.c(), t = Tl(), l && l.c(), i = Tl(), h && h.c(), s = Tl(), Qr(r.$$.fragment); }, l(d) { - o && o.l(d), e = el(d), u && u.l(d), t = el(d), l && l.l(d), i = el(d), h && h.l(d), s = el(d), Vr(r.$$.fragment, d); + o && o.l(d), e = yl(d), u && u.l(d), t = yl(d), l && l.l(d), i = yl(d), h && h.l(d), s = yl(d), Xr(r.$$.fragment, d); }, m(d, f) { - o && o.m(d, f), il(d, e, f), u && u.m(d, f), il(d, t, f), l && l.m(d, f), il(d, i, f), h && h.m(d, f), il(d, s, f), jr(r, d, f), a = !0; + o && o.m(d, f), bl(d, e, f), u && u.m(d, f), bl(d, t, f), l && l.m(d, f), bl(d, i, f), h && h.m(d, f), bl(d, s, f), Jr(r, d, f), a = !0; }, p(d, f) { /*editable*/ d[0] ? o ? (o.p(d, f), f & /*editable*/ - 1 && vt(o, 1)) : (o = i_(d), o.c(), vt(o, 1), o.m(e.parentNode, e)) : o && (Dh(), Ut(o, 1, 1, () => { + 1 && St(o, 1)) : (o = v_(d), o.c(), St(o, 1), o.m(e.parentNode, e)) : o && (jh(), jt(o, 1, 1, () => { o = null; - }), xh()), /*undoable*/ + }), Kh()), /*undoable*/ d[1] ? u ? (u.p(d, f), f & /*undoable*/ - 2 && vt(u, 1)) : (u = n_(d), u.c(), vt(u, 1), u.m(t.parentNode, t)) : u && (Dh(), Ut(u, 1, 1, () => { + 2 && St(u, 1)) : (u = y_(d), u.c(), St(u, 1), u.m(t.parentNode, t)) : u && (jh(), jt(u, 1, 1, () => { u = null; - }), xh()), /*download*/ + }), Kh()), /*download*/ d[2] ? l ? (l.p(d, f), f & /*download*/ - 4 && vt(l, 1)) : (l = s_(d), l.c(), vt(l, 1), l.m(i.parentNode, i)) : l && (Dh(), Ut(l, 1, 1, () => { + 4 && St(l, 1)) : (l = E_(d), l.c(), St(l, 1), l.m(i.parentNode, i)) : l && (jh(), jt(l, 1, 1, () => { l = null; - }), xh()), h && h.p && (!a || f & /*$$scope*/ - 512) && pM( + }), Kh()), h && h.p && (!a || f & /*$$scope*/ + 512) && NM( h, c, d, /*$$scope*/ d[9], - a ? fM( + a ? MM( c, /*$$scope*/ d[9], f, null - ) : dM( + ) : OM( /*$$scope*/ d[9] ), @@ -38151,32 +38254,32 @@ function yM(n) { d[3]("common.clear")), r.$set(m); }, i(d) { - a || (vt(o), vt(u), vt(l), vt(h, d), vt(r.$$.fragment, d), a = !0); + a || (St(o), St(u), St(l), St(h, d), St(r.$$.fragment, d), a = !0); }, o(d) { - Ut(o), Ut(u), Ut(l), Ut(h, d), Ut(r.$$.fragment, d), a = !1; + jt(o), jt(u), jt(l), jt(h, d), jt(r.$$.fragment, d), a = !1; }, d(d) { - d && (tl(e), tl(t), tl(i), tl(s)), o && o.d(d), u && u.d(d), l && l.d(d), h && h.d(d), Kr(r, d); + d && (El(e), El(t), El(i), El(s)), o && o.d(d), u && u.d(d), l && l.d(d), h && h.d(d), Zr(r, d); } }; } -function EM(n) { +function VM(n) { let e, t; - return e = new cv({ + return e = new Dv({ props: { - $$slots: { default: [yM] }, + $$slots: { default: [HM] }, $$scope: { ctx: n } } }), { c() { - qr(e.$$.fragment); + Qr(e.$$.fragment); }, l(i) { - Vr(e.$$.fragment, i); + Xr(e.$$.fragment, i); }, m(i, s) { - jr(e, i, s), t = !0; + Jr(e, i, s), t = !0; }, p(i, [s]) { const r = {}; @@ -38184,19 +38287,19 @@ function EM(n) { 527 && (r.$$scope = { dirty: s, ctx: i }), e.$set(r); }, i(i) { - t || (vt(e.$$.fragment, i), t = !0); + t || (St(e.$$.fragment, i), t = !0); }, o(i) { - Ut(e.$$.fragment, i), t = !1; + jt(e.$$.fragment, i), t = !1; }, d(i) { - Kr(e, i); + Zr(e, i); } }; } -function bM(n, e, t) { +function qM(n, e, t) { let { $$slots: i = {}, $$scope: s } = e, { editable: r = !1 } = e, { undoable: a = !1 } = e, { download: o = null } = e, { i18n: u } = e; - const l = _M(), c = () => l("edit"), h = () => l("undo"), d = (f) => { + const l = UM(), c = () => l("edit"), h = () => l("undo"), d = (f) => { l("clear"), f.stopPropagation(); }; return n.$$set = (f) => { @@ -38214,9 +38317,9 @@ function bM(n, e, t) { s ]; } -class TM extends cM { +class KM extends FM { constructor(e) { - super(), mM(this, e, bM, EM, gM, { + super(), $M(this, e, qM, VM, BM, { editable: 0, undoable: 1, download: 2, @@ -38225,40 +38328,40 @@ class TM extends cM { } } const { - SvelteComponent: SM, - add_flush_callback: sl, - append_hydration: ur, - attr: ji, - bind: rl, - binding_callbacks: al, - check_outros: Od, - children: kr, - claim_component: Tu, - claim_element: zn, - claim_space: qa, - claim_text: AM, - create_component: Su, - destroy_component: Au, - detach: At, - element: Wn, - empty: r_, - get_svelte_dataset: a_, - group_outros: Md, - init: xM, - insert_hydration: wn, - listen: o_, - mount_component: xu, - noop: DM, - run_all: wM, - safe_not_equal: LM, - set_data: IM, - space: Ka, - text: kM, - toggle_class: Vn, - transition_in: qt, - transition_out: sn -} = window.__gradio__svelte__internal, { onMount: RM } = window.__gradio__svelte__internal; -function l_(n) { + SvelteComponent: jM, + add_flush_callback: Sl, + append_hydration: br, + attr: Xi, + bind: Al, + binding_callbacks: xl, + check_outros: nf, + children: Nr, + claim_component: Vu, + claim_element: Jn, + claim_space: io, + claim_text: zM, + create_component: qu, + destroy_component: Ku, + detach: kt, + element: es, + empty: b_, + get_svelte_dataset: T_, + group_outros: sf, + init: WM, + insert_hydration: Rn, + listen: S_, + mount_component: ju, + noop: YM, + run_all: XM, + safe_not_equal: QM, + set_data: ZM, + space: no, + text: JM, + toggle_class: Yn, + transition_in: Xt, + transition_out: on +} = window.__gradio__svelte__internal, { onMount: e$ } = window.__gradio__svelte__internal; +function A_(n) { let e, t, i, s, r, a, o; function u(f) { n[18](f); @@ -38285,20 +38388,20 @@ function l_(n) { n[12] !== void 0 && (d.trimmedDuration = /*trimmedDuration*/ n[12]), /*loadingTimeline*/ n[16] !== void 0 && (d.loadingTimeline = /*loadingTimeline*/ - n[16]), t = new XF({ props: d }), al.push(() => rl(t, "dragStart", u)), al.push(() => rl(t, "dragEnd", l)), al.push(() => rl(t, "trimmedDuration", c)), al.push(() => rl(t, "loadingTimeline", h)), { + n[16]), t = new yP({ props: d }), xl.push(() => Al(t, "dragStart", u)), xl.push(() => Al(t, "dragEnd", l)), xl.push(() => Al(t, "trimmedDuration", c)), xl.push(() => Al(t, "loadingTimeline", h)), { c() { - e = Wn("div"), Su(t.$$.fragment), this.h(); + e = es("div"), qu(t.$$.fragment), this.h(); }, l(f) { - e = zn(f, "DIV", { class: !0 }); - var m = kr(e); - Tu(t.$$.fragment, m), m.forEach(At), this.h(); + e = Jn(f, "DIV", { class: !0 }); + var m = Nr(e); + Vu(t.$$.fragment, m), m.forEach(kt), this.h(); }, h() { - ji(e, "class", "timeline-wrapper svelte-uu53fr"); + Xi(e, "class", "timeline-wrapper svelte-uu53fr"); }, m(f, m) { - wn(f, e, m), xu(t, e, null), o = !0; + Rn(f, e, m), ju(t, e, null), o = !0; }, p(f, m) { const g = {}; @@ -38306,90 +38409,90 @@ function l_(n) { 4 && (g.videoElement = /*videoElement*/ f[2]), !i && m & /*dragStart*/ 16384 && (i = !0, g.dragStart = /*dragStart*/ - f[14], sl(() => i = !1)), !s && m & /*dragEnd*/ + f[14], Sl(() => i = !1)), !s && m & /*dragEnd*/ 32768 && (s = !0, g.dragEnd = /*dragEnd*/ - f[15], sl(() => s = !1)), !r && m & /*trimmedDuration*/ + f[15], Sl(() => s = !1)), !r && m & /*trimmedDuration*/ 4096 && (r = !0, g.trimmedDuration = /*trimmedDuration*/ - f[12], sl(() => r = !1)), !a && m & /*loadingTimeline*/ + f[12], Sl(() => r = !1)), !a && m & /*loadingTimeline*/ 65536 && (a = !0, g.loadingTimeline = /*loadingTimeline*/ - f[16], sl(() => a = !1)), t.$set(g); + f[16], Sl(() => a = !1)), t.$set(g); }, i(f) { - o || (qt(t.$$.fragment, f), o = !0); + o || (Xt(t.$$.fragment, f), o = !0); }, o(f) { - sn(t.$$.fragment, f), o = !1; + on(t.$$.fragment, f), o = !1; }, d(f) { - f && At(e), Au(t); + f && kt(e), Ku(t); } } ); } -function CM(n) { +function t$(n) { let e; return { c() { - e = Wn("div"), this.h(); + e = es("div"), this.h(); }, l(t) { - e = zn(t, "DIV", { class: !0 }), kr(e).forEach(At), this.h(); + e = Jn(t, "DIV", { class: !0 }), Nr(e).forEach(kt), this.h(); }, h() { - ji(e, "class", "svelte-uu53fr"); + Xi(e, "class", "svelte-uu53fr"); }, m(t, i) { - wn(t, e, i); + Rn(t, e, i); }, - p: DM, + p: YM, d(t) { - t && At(e); + t && kt(e); } }; } -function FM(n) { - let e, t = sr( +function i$(n) { + let e, t = pr( /*trimmedDuration*/ n[12] ) + "", i, s, r, a, o = "Trim", u, l, c = "Cancel", h, d; return { c() { - e = Wn("time"), i = kM(t), s = Ka(), r = Wn("div"), a = Wn("button"), a.textContent = o, u = Ka(), l = Wn("button"), l.textContent = c, this.h(); + e = es("time"), i = JM(t), s = no(), r = es("div"), a = es("button"), a.textContent = o, u = no(), l = es("button"), l.textContent = c, this.h(); }, l(f) { - e = zn(f, "TIME", { "aria-label": !0, class: !0 }); - var m = kr(e); - i = AM(m, t), m.forEach(At), s = qa(f), r = zn(f, "DIV", { class: !0 }); - var g = kr(r); - a = zn(g, "BUTTON", { class: !0, "data-svelte-h": !0 }), a_(a) !== "svelte-18nzick" && (a.textContent = o), u = qa(g), l = zn(g, "BUTTON", { class: !0, "data-svelte-h": !0 }), a_(l) !== "svelte-1mj98i4" && (l.textContent = c), g.forEach(At), this.h(); + e = Jn(f, "TIME", { "aria-label": !0, class: !0 }); + var m = Nr(e); + i = zM(m, t), m.forEach(kt), s = io(f), r = Jn(f, "DIV", { class: !0 }); + var g = Nr(r); + a = Jn(g, "BUTTON", { class: !0, "data-svelte-h": !0 }), T_(a) !== "svelte-18nzick" && (a.textContent = o), u = io(g), l = Jn(g, "BUTTON", { class: !0, "data-svelte-h": !0 }), T_(l) !== "svelte-1mj98i4" && (l.textContent = c), g.forEach(kt), this.h(); }, h() { - ji(e, "aria-label", "duration of selected region in seconds"), ji(e, "class", "svelte-uu53fr"), Vn( + Xi(e, "aria-label", "duration of selected region in seconds"), Xi(e, "class", "svelte-uu53fr"), Yn( e, "hidden", /*loadingTimeline*/ n[16] - ), ji(a, "class", "text-button svelte-uu53fr"), Vn( + ), Xi(a, "class", "text-button svelte-uu53fr"), Yn( a, "hidden", /*loadingTimeline*/ n[16] - ), ji(l, "class", "text-button svelte-uu53fr"), Vn( + ), Xi(l, "class", "text-button svelte-uu53fr"), Yn( l, "hidden", /*loadingTimeline*/ n[16] - ), ji(r, "class", "edit-buttons svelte-uu53fr"); + ), Xi(r, "class", "edit-buttons svelte-uu53fr"); }, m(f, m) { - wn(f, e, m), ur(e, i), wn(f, s, m), wn(f, r, m), ur(r, a), ur(r, u), ur(r, l), h || (d = [ - o_( + Rn(f, e, m), br(e, i), Rn(f, s, m), Rn(f, r, m), br(r, a), br(r, u), br(r, l), h || (d = [ + S_( a, "click", /*click_handler*/ n[22] ), - o_( + S_( l, "click", /*toggleTrimmingMode*/ @@ -38399,23 +38502,23 @@ function FM(n) { }, p(f, m) { m & /*trimmedDuration*/ - 4096 && t !== (t = sr( + 4096 && t !== (t = pr( /*trimmedDuration*/ f[12] - ) + "") && IM(i, t), m & /*loadingTimeline*/ - 65536 && Vn( + ) + "") && ZM(i, t), m & /*loadingTimeline*/ + 65536 && Yn( e, "hidden", /*loadingTimeline*/ f[16] ), m & /*loadingTimeline*/ - 65536 && Vn( + 65536 && Yn( a, "hidden", /*loadingTimeline*/ f[16] ), m & /*loadingTimeline*/ - 65536 && Vn( + 65536 && Yn( l, "hidden", /*loadingTimeline*/ @@ -38423,15 +38526,15 @@ function FM(n) { ); }, d(f) { - f && (At(e), At(s), At(r)), h = !1, wM(d); + f && (kt(e), kt(s), kt(r)), h = !1, XM(d); } }; } -function u_(n) { +function x_(n) { let e, t; - return e = new Ci({ + return e = new vi({ props: { - Icon: ef, + Icon: Tf, label: "Reset video to initial value", disabled: ( /*processingVideo*/ @@ -38445,13 +38548,13 @@ function u_(n) { n[23] ), { c() { - Su(e.$$.fragment); + qu(e.$$.fragment); }, l(i) { - Tu(e.$$.fragment, i); + Vu(e.$$.fragment, i); }, m(i, s) { - xu(e, i, s), t = !0; + ju(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -38461,21 +38564,21 @@ function u_(n) { i[11]), e.$set(r); }, i(i) { - t || (qt(e.$$.fragment, i), t = !0); + t || (Xt(e.$$.fragment, i), t = !0); }, o(i) { - sn(e.$$.fragment, i), t = !1; + on(e.$$.fragment, i), t = !1; }, d(i) { - Au(e, i); + Ku(e, i); } }; } -function c_(n) { +function D_(n) { let e, t; - return e = new Ci({ + return e = new vi({ props: { - Icon: cA, + Icon: yA, label: "Trim video to selection", disabled: ( /*processingVideo*/ @@ -38488,13 +38591,13 @@ function c_(n) { n[17] ), { c() { - Su(e.$$.fragment); + qu(e.$$.fragment); }, l(i) { - Tu(e.$$.fragment, i); + Vu(e.$$.fragment, i); }, m(i, s) { - xu(e, i, s), t = !0; + ju(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -38503,75 +38606,75 @@ function c_(n) { i[1]), e.$set(r); }, i(i) { - t || (qt(e.$$.fragment, i), t = !0); + t || (Xt(e.$$.fragment, i), t = !0); }, o(i) { - sn(e.$$.fragment, i), t = !1; + on(e.$$.fragment, i), t = !1; }, d(i) { - Au(e, i); + Ku(e, i); } }; } -function PM(n) { +function n$(n) { let e, t, i, s = ( /*showRedo*/ n[3] && /*mode*/ - n[0] === "" && u_(n) + n[0] === "" && x_(n) ), r = ( /*interactive*/ n[4] && /*mode*/ - n[0] === "" && c_(n) + n[0] === "" && D_(n) ); return { c() { - s && s.c(), e = Ka(), r && r.c(), t = r_(); + s && s.c(), e = no(), r && r.c(), t = b_(); }, l(a) { - s && s.l(a), e = qa(a), r && r.l(a), t = r_(); + s && s.l(a), e = io(a), r && r.l(a), t = b_(); }, m(a, o) { - s && s.m(a, o), wn(a, e, o), r && r.m(a, o), wn(a, t, o), i = !0; + s && s.m(a, o), Rn(a, e, o), r && r.m(a, o), Rn(a, t, o), i = !0; }, p(a, o) { /*showRedo*/ a[3] && /*mode*/ a[0] === "" ? s ? (s.p(a, o), o & /*showRedo, mode*/ - 9 && qt(s, 1)) : (s = u_(a), s.c(), qt(s, 1), s.m(e.parentNode, e)) : s && (Md(), sn(s, 1, 1, () => { + 9 && Xt(s, 1)) : (s = x_(a), s.c(), Xt(s, 1), s.m(e.parentNode, e)) : s && (sf(), on(s, 1, 1, () => { s = null; - }), Od()), /*interactive*/ + }), nf()), /*interactive*/ a[4] && /*mode*/ a[0] === "" ? r ? (r.p(a, o), o & /*interactive, mode*/ - 17 && qt(r, 1)) : (r = c_(a), r.c(), qt(r, 1), r.m(t.parentNode, t)) : r && (Md(), sn(r, 1, 1, () => { + 17 && Xt(r, 1)) : (r = D_(a), r.c(), Xt(r, 1), r.m(t.parentNode, t)) : r && (sf(), on(r, 1, 1, () => { r = null; - }), Od()); + }), nf()); }, i(a) { - i || (qt(s), qt(r), i = !0); + i || (Xt(s), Xt(r), i = !0); }, o(a) { - sn(s), sn(r), i = !1; + on(s), on(r), i = !1; }, d(a) { - a && (At(e), At(t)), s && s.d(a), r && r.d(a); + a && (kt(e), kt(t)), s && s.d(a), r && r.d(a); } }; } -function OM(n) { +function s$(n) { var h; let e, t, i, s, r, a, o = ( /*mode*/ - n[0] === "edit" && l_(n) + n[0] === "edit" && A_(n) ); function u(d, f) { return ( /*mode*/ d[0] === "edit" && /*trimmedDuration*/ - d[12] !== null ? FM : CM + d[12] !== null ? i$ : t$ ); } let l = u(n), c = l(n); - return r = new TM({ + return r = new KM({ props: { i18n: ( /*i18n*/ @@ -38584,7 +38687,7 @@ function OM(n) { (h = n[8]) == null ? void 0 : h.url ) : null ), - $$slots: { default: [PM] }, + $$slots: { default: [n$] }, $$scope: { ctx: n } } }), r.$on( @@ -38593,17 +38696,17 @@ function OM(n) { n[24] ), { c() { - e = Wn("div"), o && o.c(), t = Ka(), i = Wn("div"), c.c(), s = Ka(), Su(r.$$.fragment), this.h(); + e = es("div"), o && o.c(), t = no(), i = es("div"), c.c(), s = no(), qu(r.$$.fragment), this.h(); }, l(d) { - e = zn(d, "DIV", { class: !0 }); - var f = kr(e); - o && o.l(f), t = qa(f), i = zn(f, "DIV", { class: !0, "data-testid": !0 }); - var m = kr(i); - c.l(m), m.forEach(At), f.forEach(At), s = qa(d), Tu(r.$$.fragment, d), this.h(); + e = Jn(d, "DIV", { class: !0 }); + var f = Nr(e); + o && o.l(f), t = io(f), i = Jn(f, "DIV", { class: !0, "data-testid": !0 }); + var m = Nr(i); + c.l(m), m.forEach(kt), f.forEach(kt), s = io(d), Vu(r.$$.fragment, d), this.h(); }, h() { - ji(i, "class", "controls svelte-uu53fr"), ji(i, "data-testid", "waveform-controls"), ji(e, "class", "container svelte-uu53fr"), Vn( + Xi(i, "class", "controls svelte-uu53fr"), Xi(i, "data-testid", "waveform-controls"), Xi(e, "class", "container svelte-uu53fr"), Yn( e, "hidden", /*mode*/ @@ -38611,16 +38714,16 @@ function OM(n) { ); }, m(d, f) { - wn(d, e, f), o && o.m(e, null), ur(e, t), ur(e, i), c.m(i, null), wn(d, s, f), xu(r, d, f), a = !0; + Rn(d, e, f), o && o.m(e, null), br(e, t), br(e, i), c.m(i, null), Rn(d, s, f), ju(r, d, f), a = !0; }, p(d, [f]) { var g; /*mode*/ d[0] === "edit" ? o ? (o.p(d, f), f & /*mode*/ - 1 && qt(o, 1)) : (o = l_(d), o.c(), qt(o, 1), o.m(e, t)) : o && (Md(), sn(o, 1, 1, () => { + 1 && Xt(o, 1)) : (o = A_(d), o.c(), Xt(o, 1), o.m(e, t)) : o && (sf(), on(o, 1, 1, () => { o = null; - }), Od()), l === (l = u(d)) && c ? c.p(d, f) : (c.d(1), c = l(d), c && (c.c(), c.m(i, null))), (!a || f & /*mode*/ - 1) && Vn( + }), nf()), l === (l = u(d)) && c ? c.p(d, f) : (c.d(1), c = l(d), c && (c.c(), c.m(i, null))), (!a || f & /*mode*/ + 1) && Yn( e, "hidden", /*mode*/ @@ -38638,75 +38741,75 @@ function OM(n) { 67110971 && (m.$$scope = { dirty: f, ctx: d }), r.$set(m); }, i(d) { - a || (qt(o), qt(r.$$.fragment, d), a = !0); + a || (Xt(o), Xt(r.$$.fragment, d), a = !0); }, o(d) { - sn(o), sn(r.$$.fragment, d), a = !1; + on(o), on(r.$$.fragment, d), a = !1; }, d(d) { - d && (At(e), At(s)), o && o.d(), c.d(), Au(r, d); + d && (kt(e), kt(s)), o && o.d(), c.d(), Ku(r, d); } }; } -function MM(n, e, t) { - var i = this && this.__awaiter || function(M, P, K, q) { - function W(U) { - return U instanceof K ? U : new K(function(j) { - j(U); +function r$(n, e, t) { + var i = this && this.__awaiter || function(k, q, K, H) { + function Y(B) { + return B instanceof K ? B : new K(function(z) { + z(B); }); } - return new (K || (K = Promise))(function(U, j) { - function $(Q) { + return new (K || (K = Promise))(function(B, z) { + function W(Q) { try { - H(q.next(Q)); - } catch (X) { - j(X); + $(H.next(Q)); + } catch (C) { + z(C); } } function L(Q) { try { - H(q.throw(Q)); - } catch (X) { - j(X); + $(H.throw(Q)); + } catch (C) { + z(C); } } - function H(Q) { - Q.done ? U(Q.value) : W(Q.value).then($, L); + function $(Q) { + Q.done ? B(Q.value) : Y(Q.value).then(W, L); } - H((q = q.apply(M, P || [])).next()); + $((H = H.apply(k, q || [])).next()); }); }; let { videoElement: s } = e, { showRedo: r = !1 } = e, { interactive: a = !0 } = e, { mode: o = "" } = e, { handle_reset_value: u } = e, { handle_trim_video: l } = e, { processingVideo: c = !1 } = e, { i18n: h } = e, { value: d = null } = e, { show_download_button: f = !1 } = e, { handle_clear: m = () => { } } = e, { has_change_history: g = !1 } = e, p, y = null, v = 0, _ = 0, E = !1; - RM(() => i(void 0, void 0, void 0, function* () { - t(13, p = yield rI()); + e$(() => i(void 0, void 0, void 0, function* () { + t(13, p = yield LI()); })); const T = () => { o === "edit" ? (t(0, o = ""), t(12, y = s.duration)) : t(0, o = "edit"); }; - function A(M) { - v = M, t(14, v); + function x(k) { + v = k, t(14, v); } - function S(M) { - _ = M, t(15, _); + function S(k) { + _ = k, t(15, _); } - function D(M) { - y = M, t(12, y), t(0, o), t(2, s); + function D(k) { + y = k, t(12, y), t(0, o), t(2, s); } - function x(M) { - E = M, t(16, E); + function A(k) { + E = k, t(16, E); } const w = () => { - t(0, o = ""), t(1, c = !0), aI(p, v, _, s).then((M) => { - l(M); + t(0, o = ""), t(1, c = !0), II(p, v, _, s).then((k) => { + l(k); }).then(() => { t(1, c = !1); }); }, I = () => { u(), t(0, o = ""); - }, R = () => m(); - return n.$$set = (M) => { - "videoElement" in M && t(2, s = M.videoElement), "showRedo" in M && t(3, r = M.showRedo), "interactive" in M && t(4, a = M.interactive), "mode" in M && t(0, o = M.mode), "handle_reset_value" in M && t(5, u = M.handle_reset_value), "handle_trim_video" in M && t(6, l = M.handle_trim_video), "processingVideo" in M && t(1, c = M.processingVideo), "i18n" in M && t(7, h = M.i18n), "value" in M && t(8, d = M.value), "show_download_button" in M && t(9, f = M.show_download_button), "handle_clear" in M && t(10, m = M.handle_clear), "has_change_history" in M && t(11, g = M.has_change_history); + }, M = () => m(); + return n.$$set = (k) => { + "videoElement" in k && t(2, s = k.videoElement), "showRedo" in k && t(3, r = k.showRedo), "interactive" in k && t(4, a = k.interactive), "mode" in k && t(0, o = k.mode), "handle_reset_value" in k && t(5, u = k.handle_reset_value), "handle_trim_video" in k && t(6, l = k.handle_trim_video), "processingVideo" in k && t(1, c = k.processingVideo), "i18n" in k && t(7, h = k.i18n), "value" in k && t(8, d = k.value), "show_download_button" in k && t(9, f = k.show_download_button), "handle_clear" in k && t(10, m = k.handle_clear), "has_change_history" in k && t(11, g = k.has_change_history); }, n.$$.update = () => { n.$$.dirty & /*mode, trimmedDuration, videoElement*/ 4101 && o === "edit" && y === null && s && t(12, y = s.duration); @@ -38729,18 +38832,18 @@ function MM(n, e, t) { _, E, T, - A, + x, S, D, - x, + A, w, I, - R + M ]; } -class $M extends SM { +class a$ extends jM { constructor(e) { - super(), xM(this, e, MM, OM, LM, { + super(), WM(this, e, r$, s$, QM, { videoElement: 2, showRedo: 3, interactive: 4, @@ -38757,150 +38860,168 @@ class $M extends SM { } } const { - SvelteComponent: BM, - add_flush_callback: va, - append_hydration: Ct, - attr: ct, - bind: ya, - binding_callbacks: Ea, - bubble: NM, - check_outros: h_, - children: Nn, - claim_component: Rr, - claim_element: yn, - claim_space: ha, - claim_text: wh, - create_component: Cr, - destroy_component: Fr, - detach: Xt, - element: En, - empty: d_, - group_outros: f_, - init: UM, - insert_hydration: xl, - listen: ls, - mount_component: Pr, - prevent_default: m_, - run_all: GM, - safe_not_equal: HM, - set_data: g_, - space: da, - src_url_equal: p_, - stop_propagation: VM, - text: Lh, - toggle_class: __, - transition_in: bi, - transition_out: Ki -} = window.__gradio__svelte__internal, { createEventDispatcher: qM } = window.__gradio__svelte__internal; -function KM(n) { + SvelteComponent: o$, + add_flush_callback: Ia, + append_hydration: qt, + attr: tt, + bind: ka, + binding_callbacks: Ra, + check_outros: w_, + children: fr, + claim_component: Eo, + claim_element: An, + claim_space: Ta, + claim_text: zh, + create_component: bo, + destroy_component: To, + detach: ki, + element: xn, + empty: L_, + get_svelte_dataset: l$, + group_outros: I_, + init: u$, + insert_hydration: Na, + listen: Dl, + mount_component: So, + run_all: c$, + safe_not_equal: h$, + set_data: k_, + space: Sa, + src_url_equal: R_, + text: Wh, + toggle_class: C_, + transition_in: Yi, + transition_out: kn +} = window.__gradio__svelte__internal, { createEventDispatcher: d$, onMount: f$, tick: m$ } = window.__gradio__svelte__internal; +function F_(n) { + let e, t = "Loading video..."; + return { + c() { + e = xn("div"), e.textContent = t, this.h(); + }, + l(i) { + e = An(i, "DIV", { class: !0, "data-svelte-h": !0 }), l$(e) !== "svelte-d8rgjs" && (e.textContent = t), this.h(); + }, + h() { + tt(e, "class", "loading-spinner svelte-bmp2ea"); + }, + m(i, s) { + Na(i, e, s); + }, + d(i) { + i && ki(e); + } + }; +} +function g$(n) { let e, t; return { c() { - e = En("track"), this.h(); + e = xn("track"), this.h(); }, l(i) { - e = yn(i, "TRACK", { kind: !0, src: !0 }), this.h(); + e = An(i, "TRACK", { kind: !0, src: !0 }), this.h(); }, h() { - ct(e, "kind", "captions"), p_(e.src, t = /*subtitle*/ - n[1]) || ct(e, "src", t), e.default = !0; + tt(e, "kind", "captions"), R_(e.src, t = /*subtitle*/ + n[1]) || tt(e, "src", t), e.default = !0; }, m(i, s) { - xl(i, e, s); + Na(i, e, s); }, p(i, s) { s[0] & /*subtitle*/ - 2 && !p_(e.src, t = /*subtitle*/ - i[1]) && ct(e, "src", t); + 2 && !R_(e.src, t = /*subtitle*/ + i[1]) && tt(e, "src", t); }, d(i) { - i && Xt(e); + i && ki(e); } }; } -function jM(n) { +function p$(n) { let e, t; - return e = new VS({}), { + return e = new ZS({}), { c() { - Cr(e.$$.fragment); + bo(e.$$.fragment); }, l(i) { - Rr(e.$$.fragment, i); + Eo(e.$$.fragment, i); }, m(i, s) { - Pr(e, i, s), t = !0; + So(e, i, s), t = !0; }, i(i) { - t || (bi(e.$$.fragment, i), t = !0); + t || (Yi(e.$$.fragment, i), t = !0); }, o(i) { - Ki(e.$$.fragment, i), t = !1; + kn(e.$$.fragment, i), t = !1; }, d(i) { - Fr(e, i); + To(e, i); } }; } -function zM(n) { +function _$(n) { let e, t; - return e = new XS({}), { + return e = new rA({}), { c() { - Cr(e.$$.fragment); + bo(e.$$.fragment); }, l(i) { - Rr(e.$$.fragment, i); + Eo(e.$$.fragment, i); }, m(i, s) { - Pr(e, i, s), t = !0; + So(e, i, s), t = !0; }, i(i) { - t || (bi(e.$$.fragment, i), t = !0); + t || (Yi(e.$$.fragment, i), t = !0); }, o(i) { - Ki(e.$$.fragment, i), t = !1; + kn(e.$$.fragment, i), t = !1; }, d(i) { - Fr(e, i); + To(e, i); } }; } -function WM(n) { +function v$(n) { let e, t; - return e = new ef({}), { + return e = new Tf({}), { c() { - Cr(e.$$.fragment); + bo(e.$$.fragment); }, l(i) { - Rr(e.$$.fragment, i); + Eo(e.$$.fragment, i); }, m(i, s) { - Pr(e, i, s), t = !0; + So(e, i, s), t = !0; }, i(i) { - t || (bi(e.$$.fragment, i), t = !0); + t || (Yi(e.$$.fragment, i), t = !0); }, o(i) { - Ki(e.$$.fragment, i), t = !1; + kn(e.$$.fragment, i), t = !1; }, d(i) { - Fr(e, i); + To(e, i); } }; } -function v_(n) { +function P_(n) { let e, t, i; function s(a) { - n[38](a); + n[41](a); } let r = { videoElement: ( /*video*/ - n[16] + n[17] ), showRedo: !0, handle_trim_video: ( /*handle_trim_video*/ - n[24] + n[26] ), handle_reset_value: ( /*handle_reset_value*/ @@ -38929,22 +39050,22 @@ function v_(n) { }; return ( /*processingVideo*/ - n[18] !== void 0 && (r.processingVideo = /*processingVideo*/ - n[18]), e = new $M({ props: r }), Ea.push(() => ya(e, "processingVideo", s)), { + n[19] !== void 0 && (r.processingVideo = /*processingVideo*/ + n[19]), e = new a$({ props: r }), Ra.push(() => ka(e, "processingVideo", s)), { c() { - Cr(e.$$.fragment); + bo(e.$$.fragment); }, l(a) { - Rr(e.$$.fragment, a); + Eo(e.$$.fragment, a); }, m(a, o) { - Pr(e, a, o), i = !0; + So(e, a, o), i = !0; }, p(a, o) { const u = {}; o[0] & /*video*/ - 65536 && (u.videoElement = /*video*/ - a[16]), o[0] & /*handle_reset_value*/ + 131072 && (u.videoElement = /*video*/ + a[17]), o[0] & /*handle_reset_value*/ 128 && (u.handle_reset_value = /*handle_reset_value*/ a[7]), o[0] & /*value*/ 2048 && (u.value = /*value*/ @@ -38957,42 +39078,44 @@ function v_(n) { a[12]), o[0] & /*has_change_history*/ 8192 && (u.has_change_history = /*has_change_history*/ a[13]), !t && o[0] & /*processingVideo*/ - 262144 && (t = !0, u.processingVideo = /*processingVideo*/ - a[18], va(() => t = !1)), e.$set(u); + 524288 && (t = !0, u.processingVideo = /*processingVideo*/ + a[19], Ia(() => t = !1)), e.$set(u); }, i(a) { - i || (bi(e.$$.fragment, a), i = !0); + i || (Yi(e.$$.fragment, a), i = !0); }, o(a) { - Ki(e.$$.fragment, a), i = !1; + kn(e.$$.fragment, a), i = !1; }, d(a) { - Fr(e, a); + To(e, a); } } ); } -function YM(n) { - let e, t, i, s, r, a, o, u, l, c, h, d, f, m, g, p = sr( +function y$(n) { + var Q; + let e, t, i, s, r, a, o, u, l, c, h, d, f, m, g, p, y = pr( /*time*/ - n[14] - ) + "", y, v, _ = sr( - /*duration*/ n[15] - ) + "", E, T, A, S, D, x, w, I, R, M, P, K; + ) + "", v, _, E = pr( + /*duration*/ + n[16] + ) + "", T, x, S, D, A, w, I, M, k = !/*video*/ + ((Q = n[17]) != null && Q.videoWidth) && F_(); function q(C) { - n[30](C); - } - function W(C) { n[31](C); } - function U(C) { + function K(C) { n[32](C); } - function j(C) { + function H(C) { n[33](C); } - let $ = { + function Y(C) { + n[34](C); + } + let B = { src: ( /*src*/ n[0] @@ -39014,349 +39137,369 @@ function YM(n) { n[5]}-player`, processingVideo: ( /*processingVideo*/ - n[18] + n[19] + ), + fullscreen: ( + /*fullscreen*/ + n[14] ), - $$slots: { default: [KM] }, + $$slots: { default: [g$] }, $$scope: { ctx: n } }; /*time*/ - n[14] !== void 0 && ($.currentTime = /*time*/ - n[14]), /*duration*/ - n[15] !== void 0 && ($.duration = /*duration*/ - n[15]), /*paused*/ - n[17] !== void 0 && ($.paused = /*paused*/ - n[17]), /*video*/ - n[16] !== void 0 && ($.node = /*video*/ - n[16]), i = new MF({ props: $ }), Ea.push(() => ya(i, "currentTime", q)), Ea.push(() => ya(i, "duration", W)), Ea.push(() => ya(i, "paused", U)), Ea.push(() => ya(i, "node", j)), i.$on( + n[15] !== void 0 && (B.currentTime = /*time*/ + n[15]), /*duration*/ + n[16] !== void 0 && (B.duration = /*duration*/ + n[16]), /*paused*/ + n[18] !== void 0 && (B.paused = /*paused*/ + n[18]), /*video*/ + n[17] !== void 0 && (B.node = /*video*/ + n[17]), s = new rP({ props: B }), Ra.push(() => ka(s, "currentTime", q)), Ra.push(() => ka(s, "duration", K)), Ra.push(() => ka(s, "paused", H)), Ra.push(() => ka(s, "node", Y)), s.$on( "click", /*play_pause*/ - n[21] - ), i.$on( + n[24] + ), s.$on( "play", /*play_handler*/ - n[34] - ), i.$on( + n[35] + ), s.$on( "pause", /*pause_handler*/ - n[35] - ), i.$on( + n[36] + ), s.$on( "loadeddata", /*loadeddata_handler*/ - n[36] - ), i.$on( + n[37] + ), s.$on( + "loadedmetadata", + /*loadedmetadata_handler*/ + n[38] + ), s.$on( "error", /*error_handler*/ - n[37] - ), i.$on( + n[39] + ), s.$on( "ended", /*handle_end*/ - n[23] + n[25] ); - const L = [WM, zM, jM], H = []; - function Q(C, B) { + const z = [v$, _$, p$], W = []; + function L(C, O) { return ( /*time*/ - C[14] === /*duration*/ - C[15] ? 0 : ( + C[15] === /*duration*/ + C[16] ? 0 : ( /*paused*/ - C[17] ? 1 : 2 + C[18] ? 1 : 2 ) ); } - d = Q(n), f = H[d] = L[d](n), w = new AS({}); - let X = ( + f = L(n), m = W[f] = z[f](n); + let $ = ( /*interactive*/ - n[6] && v_(n) + n[6] && P_(n) ); return { c() { - e = En("div"), t = En("div"), Cr(i.$$.fragment), u = da(), l = En("div"), c = En("div"), h = En("span"), f.c(), m = da(), g = En("span"), y = Lh(p), v = Lh(" / "), E = Lh(_), T = da(), A = En("progress"), D = da(), x = En("div"), Cr(w.$$.fragment), I = da(), X && X.c(), R = d_(), this.h(); + e = xn("div"), k && k.c(), t = Sa(), i = xn("div"), bo(s.$$.fragment), l = Sa(), c = xn("div"), h = xn("div"), d = xn("span"), m.c(), g = Sa(), p = xn("span"), v = Wh(y), _ = Wh(" / "), T = Wh(E), x = Sa(), S = xn("input"), D = Sa(), $ && $.c(), A = L_(), this.h(); }, l(C) { - e = yn(C, "DIV", { class: !0 }); - var B = Nn(e); - t = yn(B, "DIV", { class: !0 }); - var N = Nn(t); - Rr(i.$$.fragment, N), N.forEach(Xt), u = ha(B), l = yn(B, "DIV", { class: !0 }); - var G = Nn(l); - c = yn(G, "DIV", { class: !0 }); - var Y = Nn(c); - h = yn(Y, "SPAN", { + e = An(C, "DIV", { class: !0 }); + var O = fr(e); + k && k.l(O), t = Ta(O), i = An(O, "DIV", { class: !0 }); + var N = fr(i); + Eo(s.$$.fragment, N), N.forEach(ki), l = Ta(O), c = An(O, "DIV", { class: !0 }); + var ee = fr(c); + h = An(ee, "DIV", { class: !0 }); + var G = fr(h); + d = An(G, "SPAN", { role: !0, tabindex: !0, class: !0, "aria-label": !0 }); - var ee = Nn(h); - f.l(ee), ee.forEach(Xt), m = ha(Y), g = yn(Y, "SPAN", { class: !0 }); - var se = Nn(g); - y = wh(se, p), v = wh(se, " / "), E = wh(se, _), se.forEach(Xt), T = ha(Y), A = yn(Y, "PROGRESS", { class: !0 }), Nn(A).forEach(Xt), D = ha(Y), x = yn(Y, "DIV", { - role: !0, - tabindex: !0, - class: !0, - "aria-label": !0 - }); - var ye = Nn(x); - Rr(w.$$.fragment, ye), ye.forEach(Xt), Y.forEach(Xt), G.forEach(Xt), B.forEach(Xt), I = ha(C), X && X.l(C), R = d_(), this.h(); + var Z = fr(d); + m.l(Z), Z.forEach(ki), g = Ta(G), p = An(G, "SPAN", { class: !0 }); + var U = fr(p); + v = zh(U, y), _ = zh(U, " / "), T = zh(U, E), U.forEach(ki), x = Ta(G), S = An(G, "INPUT", { + type: !0, + min: !0, + max: !0, + step: !0, + "aria-label": !0, + class: !0 + }), G.forEach(ki), ee.forEach(ki), O.forEach(ki), D = Ta(C), $ && $.l(C), A = L_(), this.h(); }, h() { - ct(t, "class", "mirror-wrap svelte-yzke89"), __( - t, + tt(i, "class", "mirror-wrap svelte-bmp2ea"), C_( + i, "mirror", /*mirror*/ n[2] - ), ct(h, "role", "button"), ct(h, "tabindex", "0"), ct(h, "class", "icon svelte-yzke89"), ct(h, "aria-label", "play-pause-replay-button"), ct(g, "class", "time svelte-yzke89"), A.value = S = /*time*/ - n[14] / /*duration*/ - n[15] || 0, ct(A, "class", "svelte-yzke89"), ct(x, "role", "button"), ct(x, "tabindex", "0"), ct(x, "class", "icon svelte-yzke89"), ct(x, "aria-label", "full-screen"), ct(c, "class", "inner svelte-yzke89"), ct(l, "class", "controls svelte-yzke89"), ct(e, "class", "wrap svelte-yzke89"); + ), tt(d, "role", "button"), tt(d, "tabindex", "0"), tt(d, "class", "icon svelte-bmp2ea"), tt(d, "aria-label", "play-pause-replay-button"), tt(p, "class", "time svelte-bmp2ea"), tt(S, "type", "range"), tt(S, "min", "0"), tt(S, "max", "100"), tt(S, "step", "0.1"), S.value = /*progressValue*/ + n[20], tt(S, "aria-label", "Video progress"), tt(S, "class", "svelte-bmp2ea"), tt(h, "class", "inner svelte-bmp2ea"), tt(c, "class", "controls svelte-bmp2ea"), tt(e, "class", "wrap svelte-bmp2ea"); }, - m(C, B) { - xl(C, e, B), Ct(e, t), Pr(i, t, null), Ct(e, u), Ct(e, l), Ct(l, c), Ct(c, h), H[d].m(h, null), Ct(c, m), Ct(c, g), Ct(g, y), Ct(g, v), Ct(g, E), Ct(c, T), Ct(c, A), Ct(c, D), Ct(c, x), Pr(w, x, null), xl(C, I, B), X && X.m(C, B), xl(C, R, B), M = !0, P || (K = [ - ls( - h, + m(C, O) { + Na(C, e, O), k && k.m(e, null), qt(e, t), qt(e, i), So(s, i, null), qt(e, l), qt(e, c), qt(c, h), qt(h, d), W[f].m(d, null), qt(h, g), qt(h, p), qt(p, v), qt(p, _), qt(p, T), qt(h, x), qt(h, S), Na(C, D, O), $ && $.m(C, O), Na(C, A, O), w = !0, I || (M = [ + Dl( + d, "click", /*play_pause*/ - n[21] + n[24] ), - ls( - h, + Dl( + d, "keydown", - /*play_pause*/ - n[21] - ), - ls( - A, - "mousemove", - /*handleMove*/ - n[20] + /*keydown_handler*/ + n[40] ), - ls(A, "touchmove", m_( + Dl( + S, + "input", /*handleMove*/ - n[20] - )), - ls(A, "click", VM(m_( - /*handle_click*/ n[22] - ))), - ls( - x, - "click", - /*open_full_screen*/ - n[25] ), - ls( - x, - "keypress", - /*open_full_screen*/ - n[25] + Dl( + S, + "keydown", + /*handleKeydown*/ + n[23] ) - ], P = !0); + ], I = !0); }, - p(C, B) { + p(C, O) { + var G; + /*video*/ + (G = C[17]) != null && G.videoWidth ? k && (k.d(1), k = null) : k || (k = F_(), k.c(), k.m(e, t)); const N = {}; - B[0] & /*src*/ + O[0] & /*src*/ 1 && (N.src = /*src*/ - C[0]), B[0] & /*loop*/ + C[0]), O[0] & /*loop*/ 8 && (N.loop = /*loop*/ - C[3]), B[0] & /*muted*/ + C[3]), O[0] & /*muted*/ 16 && (N.muted = /*muted*/ - C[4]), B[0] & /*is_stream*/ + C[4]), O[0] & /*is_stream*/ 256 && (N.is_stream = /*is_stream*/ - C[8]), B[0] & /*label*/ + C[8]), O[0] & /*label*/ 32 && (N["data-testid"] = `${/*label*/ - C[5]}-player`), B[0] & /*processingVideo*/ - 262144 && (N.processingVideo = /*processingVideo*/ - C[18]), B[0] & /*subtitle*/ - 2 | B[1] & /*$$scope*/ - 512 && (N.$$scope = { dirty: B, ctx: C }), !s && B[0] & /*time*/ - 16384 && (s = !0, N.currentTime = /*time*/ - C[14], va(() => s = !1)), !r && B[0] & /*duration*/ - 32768 && (r = !0, N.duration = /*duration*/ - C[15], va(() => r = !1)), !a && B[0] & /*paused*/ - 131072 && (a = !0, N.paused = /*paused*/ - C[17], va(() => a = !1)), !o && B[0] & /*video*/ - 65536 && (o = !0, N.node = /*video*/ - C[16], va(() => o = !1)), i.$set(N), (!M || B[0] & /*mirror*/ - 4) && __( - t, + C[5]}-player`), O[0] & /*processingVideo*/ + 524288 && (N.processingVideo = /*processingVideo*/ + C[19]), O[0] & /*fullscreen*/ + 16384 && (N.fullscreen = /*fullscreen*/ + C[14]), O[0] & /*subtitle*/ + 2 | O[1] & /*$$scope*/ + 4096 && (N.$$scope = { dirty: O, ctx: C }), !r && O[0] & /*time*/ + 32768 && (r = !0, N.currentTime = /*time*/ + C[15], Ia(() => r = !1)), !a && O[0] & /*duration*/ + 65536 && (a = !0, N.duration = /*duration*/ + C[16], Ia(() => a = !1)), !o && O[0] & /*paused*/ + 262144 && (o = !0, N.paused = /*paused*/ + C[18], Ia(() => o = !1)), !u && O[0] & /*video*/ + 131072 && (u = !0, N.node = /*video*/ + C[17], Ia(() => u = !1)), s.$set(N), (!w || O[0] & /*mirror*/ + 4) && C_( + i, "mirror", /*mirror*/ C[2] ); - let G = d; - d = Q(C), d !== G && (f_(), Ki(H[G], 1, 1, () => { - H[G] = null; - }), h_(), f = H[d], f || (f = H[d] = L[d](C), f.c()), bi(f, 1), f.m(h, null)), (!M || B[0] & /*time*/ - 16384) && p !== (p = sr( + let ee = f; + f = L(C), f !== ee && (I_(), kn(W[ee], 1, 1, () => { + W[ee] = null; + }), w_(), m = W[f], m || (m = W[f] = z[f](C), m.c()), Yi(m, 1), m.m(d, null)), (!w || O[0] & /*time*/ + 32768) && y !== (y = pr( /*time*/ - C[14] - ) + "") && g_(y, p), (!M || B[0] & /*duration*/ - 32768) && _ !== (_ = sr( - /*duration*/ C[15] - ) + "") && g_(E, _), (!M || B[0] & /*time, duration*/ - 49152 && S !== (S = /*time*/ - C[14] / /*duration*/ - C[15] || 0)) && (A.value = S), /*interactive*/ - C[6] ? X ? (X.p(C, B), B[0] & /*interactive*/ - 64 && bi(X, 1)) : (X = v_(C), X.c(), bi(X, 1), X.m(R.parentNode, R)) : X && (f_(), Ki(X, 1, 1, () => { - X = null; - }), h_()); + ) + "") && k_(v, y), (!w || O[0] & /*duration*/ + 65536) && E !== (E = pr( + /*duration*/ + C[16] + ) + "") && k_(T, E), (!w || O[0] & /*progressValue*/ + 1048576) && (S.value = /*progressValue*/ + C[20]), /*interactive*/ + C[6] ? $ ? ($.p(C, O), O[0] & /*interactive*/ + 64 && Yi($, 1)) : ($ = P_(C), $.c(), Yi($, 1), $.m(A.parentNode, A)) : $ && (I_(), kn($, 1, 1, () => { + $ = null; + }), w_()); }, i(C) { - M || (bi(i.$$.fragment, C), bi(f), bi(w.$$.fragment, C), bi(X), M = !0); + w || (Yi(s.$$.fragment, C), Yi(m), Yi($), w = !0); }, o(C) { - Ki(i.$$.fragment, C), Ki(f), Ki(w.$$.fragment, C), Ki(X), M = !1; + kn(s.$$.fragment, C), kn(m), kn($), w = !1; }, d(C) { - C && (Xt(e), Xt(I), Xt(R)), Fr(i), H[d].d(), Fr(w), X && X.d(C), P = !1, GM(K); + C && (ki(e), ki(D), ki(A)), k && k.d(), To(s), W[f].d(), $ && $.d(C), I = !1, c$(M); } }; } -function XM(n, e, t) { - var i = this && this.__awaiter || function(N, G, Y, ee) { - function se(ye) { - return ye instanceof Y ? ye : new Y(function(Pe) { - Pe(ye); +function wl(n) { + var e, t; + if (!n) { + const r = ((e = n == null ? void 0 : n.parentElement) === null || e === void 0 ? void 0 : e.getBoundingClientRect()) || { width: 640, height: 360 }; + return { + top: 0, + left: 0, + width: r.width, + height: r.height + }; + } + const i = n.getBoundingClientRect(), s = ((t = n.parentElement) === null || t === void 0 ? void 0 : t.getBoundingClientRect()) || i; + return { + top: i.top - s.top, + left: i.left - s.left, + width: i.width, + height: i.height + }; +} +function E$(n, e, t) { + let i; + var s = this && this.__awaiter || function(U, re, j, Ee) { + function Oe(je) { + return je instanceof j ? je : new j(function(se) { + se(je); }); } - return new (Y || (Y = Promise))(function(ye, Pe) { - function Ke(he) { + return new (j || (j = Promise))(function(je, se) { + function ve(Ve) { try { - ae(ee.next(he)); - } catch (Se) { - Pe(Se); + Ye(Ee.next(Ve)); + } catch (Gt) { + se(Gt); } } - function jt(he) { + function Fe(Ve) { try { - ae(ee.throw(he)); - } catch (Se) { - Pe(Se); + Ye(Ee.throw(Ve)); + } catch (Gt) { + se(Gt); } } - function ae(he) { - he.done ? ye(he.value) : se(he.value).then(Ke, jt); + function Ye(Ve) { + Ve.done ? je(Ve.value) : Oe(Ve.value).then(ve, Fe); } - ae((ee = ee.apply(N, G || [])).next()); + Ye((Ee = Ee.apply(U, re || [])).next()); }); }; - let { root: s = "" } = e, { src: r } = e, { subtitle: a = null } = e, { mirror: o } = e, { loop: u } = e, { muted: l = !1 } = e, { label: c = "test" } = e, { interactive: h = !1 } = e, { handle_change: d = () => { - } } = e, { handle_reset_value: f = () => { - } } = e, { upload: m } = e, { is_stream: g } = e, { i18n: p } = e, { show_download_button: y = !1 } = e, { value: v = null } = e, { handle_clear: _ = () => { - } } = e, { has_change_history: E = !1 } = e; - const T = qM(); - let A = 0, S, D = !0, x, { video_el: w } = e, I = !1; - function R(N) { - if (!S) return; - if (N.type === "click") { - P(N); - return; - } - if (N.type !== "touchmove" && !(N.buttons & 1)) return; - const G = N.type === "touchmove" ? N.touches[0].clientX : N.clientX, { left: Y, right: ee } = N.currentTarget.getBoundingClientRect(); - t(14, A = S * (G - Y) / (ee - Y)); - } - function M() { - return i(this, void 0, void 0, function* () { - document.fullscreenElement != x && (x.currentTime > 0 && !x.paused && !x.ended && x.readyState > x.HAVE_CURRENT_DATA ? x.pause() : yield x.play()); + let { root: r = "" } = e, { src: a } = e, { subtitle: o = null } = e, { mirror: u } = e, { loop: l } = e, { muted: c = !1 } = e, { label: h = "test" } = e, { interactive: d = !1 } = e, { handle_change: f = () => { + } } = e, { handle_reset_value: m = () => { + } } = e, { upload: g } = e, { is_stream: p } = e, { i18n: y } = e, { show_download_button: v = !1 } = e, { value: _ = null } = e, { handle_clear: E = () => { + } } = e, { has_change_history: T = !1 } = e, { fullscreen: x = !1 } = e; + const S = d$(); + let D = 0, A, w = !0, I, { video_el: M } = e, k = !1; + function q(U) { + if (!A) return; + const re = U.currentTarget; + t(15, D = A * (parseFloat(re.value) / 100)); + } + function K(U) { + A && (U.key === "ArrowLeft" ? t(15, D = Math.max(0, D - 5)) : U.key === "ArrowRight" && t(15, D = Math.min(A, D + 5))); + } + function H() { + return s(this, void 0, void 0, function* () { + I.currentTime > 0 && !I.paused && !I.ended && I.readyState > I.HAVE_CURRENT_DATA ? I.pause() : yield I.play(); }); } - function P(N) { - const { left: G, right: Y } = N.currentTarget.getBoundingClientRect(); - t(14, A = S * (N.clientX - G) / (Y - G)); - } - function K() { - T("stop"), T("end"); + function Y() { + S("stop"), S("end"); } - const q = (N) => i(void 0, void 0, void 0, function* () { - var G; - let Y = new File([N], "video.mp4"); - const ee = yield If([Y]); - let se = ((G = yield m(ee, s)) === null || G === void 0 ? void 0 : G.filter(Boolean))[0]; - d(se); + const B = (U) => s(void 0, void 0, void 0, function* () { + var re; + let j = new File([U], "video.mp4"); + const Ee = yield Xf([j]); + let Oe = ((re = yield g(Ee, r)) === null || re === void 0 ? void 0 : re.filter(Boolean))[0]; + f(Oe); }); - function W() { - x.requestFullscreen(); - } - function U(N) { - A = N, t(14, A); - } - function j(N) { - S = N, t(15, S); + f$(() => { + const U = new ResizeObserver(() => s(void 0, void 0, void 0, function* () { + yield m$(), S("load", wl(I)); + })); + return I && U.observe(I), () => { + U.disconnect(); + }; + }); + function z(U) { + D = U, t(15, D); } - function $(N) { - D = N, t(17, D); + function W(U) { + A = U, t(16, A); } - function L(N) { - x = N, t(16, x); + function L(U) { + w = U, t(18, w); } - const H = () => T("play"), Q = () => T("pause"), X = () => T("loadeddata"); - function C(N) { - NM.call(this, n, N); + function $(U) { + I = U, t(17, I); } - function B(N) { - I = N, t(18, I); + const Q = () => S("play"), C = () => S("pause"), O = () => S("load", wl(I)), N = () => S("load", wl(I)), ee = (U) => S("error", U), G = (U) => { + (U.key === "Enter" || U.key === " ") && H(); + }; + function Z(U) { + k = U, t(19, k); } - return n.$$set = (N) => { - "root" in N && t(27, s = N.root), "src" in N && t(0, r = N.src), "subtitle" in N && t(1, a = N.subtitle), "mirror" in N && t(2, o = N.mirror), "loop" in N && t(3, u = N.loop), "muted" in N && t(4, l = N.muted), "label" in N && t(5, c = N.label), "interactive" in N && t(6, h = N.interactive), "handle_change" in N && t(28, d = N.handle_change), "handle_reset_value" in N && t(7, f = N.handle_reset_value), "upload" in N && t(29, m = N.upload), "is_stream" in N && t(8, g = N.is_stream), "i18n" in N && t(9, p = N.i18n), "show_download_button" in N && t(10, y = N.show_download_button), "value" in N && t(11, v = N.value), "handle_clear" in N && t(12, _ = N.handle_clear), "has_change_history" in N && t(13, E = N.has_change_history), "video_el" in N && t(26, w = N.video_el); + return n.$$set = (U) => { + "root" in U && t(28, r = U.root), "src" in U && t(0, a = U.src), "subtitle" in U && t(1, o = U.subtitle), "mirror" in U && t(2, u = U.mirror), "loop" in U && t(3, l = U.loop), "muted" in U && t(4, c = U.muted), "label" in U && t(5, h = U.label), "interactive" in U && t(6, d = U.interactive), "handle_change" in U && t(29, f = U.handle_change), "handle_reset_value" in U && t(7, m = U.handle_reset_value), "upload" in U && t(30, g = U.upload), "is_stream" in U && t(8, p = U.is_stream), "i18n" in U && t(9, y = U.i18n), "show_download_button" in U && t(10, v = U.show_download_button), "value" in U && t(11, _ = U.value), "handle_clear" in U && t(12, E = U.handle_clear), "has_change_history" in U && t(13, T = U.has_change_history), "fullscreen" in U && t(14, x = U.fullscreen), "video_el" in U && t(27, M = U.video_el); }, n.$$.update = () => { n.$$.dirty[0] & /*time*/ - 16384 && t(14, A = A || 0), n.$$.dirty[0] & /*duration*/ - 32768 && t(15, S = S || 0), n.$$.dirty[0] & /*video*/ - 65536 && t(26, w = x); + 32768 && t(15, D = D || 0), n.$$.dirty[0] & /*duration*/ + 65536 && t(16, A = A || 0), n.$$.dirty[0] & /*video*/ + 131072 && t(27, M = I), n.$$.dirty[0] & /*duration, time*/ + 98304 && t(20, i = A ? D / A * 100 : 0), n.$$.dirty[0] & /*video*/ + 131072 && I && S("load", wl(I)); }, [ - r, a, o, u, l, c, h, - f, - g, + d, + m, p, y, v, _, E, - A, - S, + T, x, D, + A, I, - T, - R, - M, - P, - K, + w, + k, + i, + S, q, + K, + H, + Y, + B, + M, + r, + f, + g, + z, W, - w, - s, - d, - m, - U, - j, - $, L, - H, + $, Q, - X, C, - B + O, + N, + ee, + G, + Z ]; } -class Ff extends BM { +class em extends o$ { constructor(e) { - super(), UM( + super(), u$( this, e, - XM, - YM, - HM, + E$, + y$, + h$, { - root: 27, + root: 28, src: 0, subtitle: 1, mirror: 2, @@ -39364,16 +39507,17 @@ class Ff extends BM { muted: 4, label: 5, interactive: 6, - handle_change: 28, + handle_change: 29, handle_reset_value: 7, - upload: 29, + upload: 30, is_stream: 8, i18n: 9, show_download_button: 10, value: 11, handle_clear: 12, has_change_history: 13, - video_el: 26 + fullscreen: 14, + video_el: 27 }, null, [-1, -1] @@ -39381,379 +39525,483 @@ class Ff extends BM { } } const { - SvelteComponent: QM, - add_flush_callback: Pf, - append_hydration: tr, - attr: Un, - bind: Of, - binding_callbacks: Mf, - bubble: ZM, - check_outros: pr, - children: ol, - claim_component: Li, - claim_element: ll, - claim_space: _r, - create_component: Ii, - destroy_component: ki, - detach: zi, - element: ul, - empty: Zl, - group_outros: vr, - init: JM, - insert_hydration: yr, - listen: y_, - mount_component: Ri, - noop: e$, - run_all: t$, - safe_not_equal: i$, - space: Er, - transition_in: Ie, - transition_out: Ne -} = window.__gradio__svelte__internal, { createEventDispatcher: n$ } = window.__gradio__svelte__internal; -function s$(n) { - let e, t, i, s, r, a, o, u, l, c, h, d, f; - t = new cv({ + SvelteComponent: b$, + add_flush_callback: so, + append_hydration: Yh, + attr: Ut, + bind: ro, + binding_callbacks: Ur, + bubble: Ll, + check_outros: As, + children: ks, + claim_component: mi, + claim_element: Rs, + claim_space: Lr, + create_component: gi, + destroy_component: pi, + detach: st, + element: Cs, + empty: pu, + group_outros: xs, + init: T$, + insert_hydration: ai, + listen: Fs, + mount_component: _i, + noop: S$, + run_all: tm, + safe_not_equal: A$, + space: Ir, + stop_propagation: Gr, + transition_in: be, + transition_out: Me +} = window.__gradio__svelte__internal, { createEventDispatcher: x$, onMount: D$, onDestroy: Uj, tick: Gj } = window.__gradio__svelte__internal; +function w$(n) { + let e, t, i, s, r, a, o, u, l, c, h; + i = new Dv({ props: { - $$slots: { default: [o$] }, + $$slots: { default: [k$] }, $$scope: { ctx: n } } }); - let m = ( - /*value*/ - n[1][0] && S_(n) - ), g = ( - /*value*/ - n[1][1] && A_(n) - ); - function p(v) { - n[25](v); + function d(g) { + n[38](g); } - let y = { slider_color: ( - /*slider_color*/ - n[6] - ) }; + function f(g) { + n[39](g); + } + let m = { + slider_color: ( + /*slider_color*/ + n[7] + ), + image_size: ( + /*image_size*/ + n[16] + ), + disabled: ( + /*isInteractingWithButtons*/ + n[18] + ), + $$slots: { default: [R$] }, + $$scope: { ctx: n } + }; return ( /*position*/ - n[0] !== void 0 && (y.position = /*position*/ - n[0]), l = new zL({ props: y }), Mf.push(() => Of(l, "position", p)), { + n[0] !== void 0 && (m.position = /*position*/ + n[0]), /*main_wrapper_el*/ + n[15] !== void 0 && (m.parent_el = /*main_wrapper_el*/ + n[15]), a = new pI({ props: m }), Ur.push(() => ro(a, "position", d)), Ur.push(() => ro(a, "parent_el", f)), { c() { - e = ul("div"), Ii(t.$$.fragment), i = Er(), s = ul("div"), r = ul("div"), m && m.c(), a = Er(), o = ul("div"), g && g.c(), u = Er(), Ii(l.$$.fragment), this.h(); + e = Cs("div"), t = Cs("div"), gi(i.$$.fragment), s = Ir(), r = Cs("div"), gi(a.$$.fragment), this.h(); }, - l(v) { - e = ll(v, "DIV", { class: !0 }); - var _ = ol(e); - Li(t.$$.fragment, _), i = _r(_), s = ll(_, "DIV", { class: !0, role: !0, tabindex: !0 }); - var E = ol(s); - r = ll(E, "DIV", { class: !0 }); - var T = ol(r); - m && m.l(T), T.forEach(zi), a = _r(E), o = ll(E, "DIV", { class: !0, style: !0 }); - var A = ol(o); - g && g.l(A), A.forEach(zi), u = _r(E), Li(l.$$.fragment, E), E.forEach(zi), _.forEach(zi), this.h(); + l(g) { + e = Rs(g, "DIV", { class: !0 }); + var p = ks(e); + t = Rs(p, "DIV", { class: !0, role: !0 }); + var y = ks(t); + mi(i.$$.fragment, y), y.forEach(st), s = Lr(p), r = Rs(p, "DIV", { class: !0, role: !0, tabindex: !0 }); + var v = ks(r); + mi(a.$$.fragment, v), v.forEach(st), p.forEach(st), this.h(); }, h() { - Un(r, "class", "player-wrapper svelte-4wejaf"), Un(o, "class", "player-wrapper fixed svelte-4wejaf"), Un( - o, - "style", - /*style*/ - n[14] - ), Un(s, "class", "main-wrapper svelte-4wejaf"), Un(s, "role", "button"), Un(s, "tabindex", "0"), Un(e, "class", "video-container svelte-4wejaf"); + Ut(t, "class", "icon-button-wrapper svelte-40zsic"), Ut(t, "role", "group"), Ut(r, "class", "main-wrapper svelte-40zsic"), Ut(r, "role", "button"), Ut(r, "tabindex", "0"), Ut(e, "class", "video-container svelte-40zsic"); }, - m(v, _) { - yr(v, e, _), Ri(t, e, null), tr(e, i), tr(e, s), tr(s, r), m && m.m(r, null), tr(s, a), tr(s, o), g && g.m(o, null), tr(s, u), Ri(l, s, null), h = !0, d || (f = [ - y_( - s, - "click", + m(g, p) { + ai(g, e, p), Yh(e, t), _i(i, t, null), Yh(e, s), Yh(e, r), _i(a, r, null), n[40](r), l = !0, c || (h = [ + Fs(r, "mousedown", Gr( /*toggle_playback*/ - n[17] - ), - y_( - s, + n[22] + )), + Fs(r, "touchstart", Gr( + /*toggle_playback*/ + n[22] + )), + Fs( + r, "keydown", - /*keydown_handler*/ - n[26] + /*keydown_handler_2*/ + n[41] ) - ], d = !0); + ], c = !0); }, - p(v, _) { - const E = {}; - _ & /*$$scope, value, interactive, i18n, show_download_button, fullscreen, show_fullscreen_button*/ - 134218666 && (E.$$scope = { dirty: _, ctx: v }), t.$set(E), /*value*/ - v[1][0] ? m ? (m.p(v, _), _ & /*value*/ - 2 && Ie(m, 1)) : (m = S_(v), m.c(), Ie(m, 1), m.m(r, null)) : m && (vr(), Ne(m, 1, 1, () => { - m = null; - }), pr()), /*value*/ - v[1][1] ? g ? (g.p(v, _), _ & /*value*/ - 2 && Ie(g, 1)) : (g = A_(v), g.c(), Ie(g, 1), g.m(o, null)) : g && (vr(), Ne(g, 1, 1, () => { - g = null; - }), pr()), (!h || _ & /*style*/ - 16384) && Un( - o, - "style", - /*style*/ - v[14] - ); - const T = {}; - _ & /*slider_color*/ - 64 && (T.slider_color = /*slider_color*/ - v[6]), !c && _ & /*position*/ - 1 && (c = !0, T.position = /*position*/ - v[0], Pf(() => c = !1)), l.$set(T); + p(g, p) { + const y = {}; + p[0] & /*interactive, isMuted, i18n, show_mute_button, value, show_download_button, fullscreen, show_fullscreen_button*/ + 132950 | p[1] & /*$$scope*/ + 16384 && (y.$$scope = { dirty: p, ctx: g }), i.$set(y); + const v = {}; + p[0] & /*slider_color*/ + 128 && (v.slider_color = /*slider_color*/ + g[7]), p[0] & /*image_size*/ + 65536 && (v.image_size = /*image_size*/ + g[16]), p[0] & /*isInteractingWithButtons*/ + 262144 && (v.disabled = /*isInteractingWithButtons*/ + g[18]), p[0] & /*style, value, loop, isMuted, i18n, upload, fullscreen, video2_el, video1_el*/ + 686150 | p[1] & /*$$scope*/ + 16384 && (v.$$scope = { dirty: p, ctx: g }), !o && p[0] & /*position*/ + 1 && (o = !0, v.position = /*position*/ + g[0], so(() => o = !1)), !u && p[0] & /*main_wrapper_el*/ + 32768 && (u = !0, v.parent_el = /*main_wrapper_el*/ + g[15], so(() => u = !1)), a.$set(v); }, - i(v) { - h || (Ie(t.$$.fragment, v), Ie(m), Ie(g), Ie(l.$$.fragment, v), h = !0); + i(g) { + l || (be(i.$$.fragment, g), be(a.$$.fragment, g), l = !0); }, - o(v) { - Ne(t.$$.fragment, v), Ne(m), Ne(g), Ne(l.$$.fragment, v), h = !1; + o(g) { + Me(i.$$.fragment, g), Me(a.$$.fragment, g), l = !1; }, - d(v) { - v && zi(e), ki(t), m && m.d(), g && g.d(), ki(l), d = !1, t$(f); + d(g) { + g && st(e), pi(i), pi(a), n[40](null), c = !1, tm(h); } } ); } -function r$(n) { +function L$(n) { let e, t; - return e = new ET({ + return e = new MT({ props: { unpadded_box: !0, size: "large", - $$slots: { default: [l$] }, + $$slots: { default: [C$] }, $$scope: { ctx: n } } }), { c() { - Ii(e.$$.fragment); + gi(e.$$.fragment); }, l(i) { - Li(e.$$.fragment, i); + mi(e.$$.fragment, i); }, m(i, s) { - Ri(e, i, s), t = !0; + _i(e, i, s), t = !0; }, p(i, s) { const r = {}; - s & /*$$scope*/ - 134217728 && (r.$$scope = { dirty: s, ctx: i }), e.$set(r); + s[1] & /*$$scope*/ + 16384 && (r.$$scope = { dirty: s, ctx: i }), e.$set(r); }, i(i) { - t || (Ie(e.$$.fragment, i), t = !0); + t || (be(e.$$.fragment, i), t = !0); }, o(i) { - Ne(e.$$.fragment, i), t = !1; + Me(e.$$.fragment, i), t = !1; }, d(i) { - ki(e, i); + pi(e, i); } }; } -function E_(n) { - let e, t; - return e = new vx({ - props: { fullscreen: ( - /*fullscreen*/ - n[8] - ) } - }), e.$on( - "fullscreen", - /*fullscreen_handler*/ - n[21] - ), { - c() { - Ii(e.$$.fragment); - }, - l(i) { - Li(e.$$.fragment, i); - }, - m(i, s) { - Ri(e, i, s), t = !0; - }, - p(i, s) { - const r = {}; - s & /*fullscreen*/ - 256 && (r.fullscreen = /*fullscreen*/ - i[8]), e.$set(r); - }, - i(i) { - t || (Ie(e.$$.fragment, i), t = !0); - }, - o(i) { - Ne(e.$$.fragment, i), t = !1; - }, - d(i) { - ki(e, i); +function O_(n) { + let e, t, i; + function s(a) { + n[33](a); + } + let r = {}; + return ( + /*fullscreen*/ + n[2] !== void 0 && (r.fullscreen = /*fullscreen*/ + n[2]), e = new Gx({ props: r }), Ur.push(() => ro(e, "fullscreen", s)), e.$on( + "fullscreen", + /*handle_fullscreen_toggle*/ + n[23] + ), { + c() { + gi(e.$$.fragment); + }, + l(a) { + mi(e.$$.fragment, a); + }, + m(a, o) { + _i(e, a, o), i = !0; + }, + p(a, o) { + const u = {}; + !t && o[0] & /*fullscreen*/ + 4 && (t = !0, u.fullscreen = /*fullscreen*/ + a[2], so(() => t = !1)), e.$set(u); + }, + i(a) { + i || (be(e.$$.fragment, a), i = !0); + }, + o(a) { + Me(e.$$.fragment, a), i = !1; + }, + d(a) { + pi(e, a); + } } - }; + ); } -function b_(n) { - var i; +function M_(n) { + var i, s; let e, t; - return e = new sy({ + return e = new Ey({ props: { href: ( /*value*/ - ((i = n[1][1].meta) == null ? void 0 : i._base64) || /*value*/ - n[1][1].url + (i = n[1][1]) == null ? void 0 : i.url ), download: ( /*value*/ - n[1][1].orig_name || "video" + ((s = n[1][1]) == null ? void 0 : s.orig_name) || "video" ), - $$slots: { default: [a$] }, + $$slots: { default: [I$] }, $$scope: { ctx: n } } }), { c() { - Ii(e.$$.fragment); + gi(e.$$.fragment); }, - l(s) { - Li(e.$$.fragment, s); + l(r) { + mi(e.$$.fragment, r); }, - m(s, r) { - Ri(e, s, r), t = !0; + m(r, a) { + _i(e, r, a), t = !0; }, - p(s, r) { - var o; - const a = {}; - r & /*value*/ - 2 && (a.href = /*value*/ - ((o = s[1][1].meta) == null ? void 0 : o._base64) || /*value*/ - s[1][1].url), r & /*value*/ - 2 && (a.download = /*value*/ - s[1][1].orig_name || "video"), r & /*$$scope, i18n*/ - 134217760 && (a.$$scope = { dirty: r, ctx: s }), e.$set(a); + p(r, a) { + var u, l; + const o = {}; + a[0] & /*value*/ + 2 && (o.href = /*value*/ + (u = r[1][1]) == null ? void 0 : u.url), a[0] & /*value*/ + 2 && (o.download = /*value*/ + ((l = r[1][1]) == null ? void 0 : l.orig_name) || "video"), a[0] & /*i18n*/ + 64 | a[1] & /*$$scope*/ + 16384 && (o.$$scope = { dirty: a, ctx: r }), e.$set(o); }, - i(s) { - t || (Ie(e.$$.fragment, s), t = !0); + i(r) { + t || (be(e.$$.fragment, r), t = !0); }, - o(s) { - Ne(e.$$.fragment, s), t = !1; + o(r) { + Me(e.$$.fragment, r), t = !1; }, - d(s) { - ki(e, s); + d(r) { + pi(e, r); } }; } -function a$(n) { +function I$(n) { let e, t; - return e = new Ci({ + return e = new vi({ props: { - Icon: ov, + Icon: Sv, label: ( /*i18n*/ - n[5]("common.download") + n[6]("common.download") ) } }), { c() { - Ii(e.$$.fragment); + gi(e.$$.fragment); }, l(i) { - Li(e.$$.fragment, i); + mi(e.$$.fragment, i); }, m(i, s) { - Ri(e, i, s), t = !0; + _i(e, i, s), t = !0; }, p(i, s) { const r = {}; - s & /*i18n*/ - 32 && (r.label = /*i18n*/ - i[5]("common.download")), e.$set(r); + s[0] & /*i18n*/ + 64 && (r.label = /*i18n*/ + i[6]("common.download")), e.$set(r); }, i(i) { - t || (Ie(e.$$.fragment, i), t = !0); + t || (be(e.$$.fragment, i), t = !0); }, o(i) { - Ne(e.$$.fragment, i), t = !1; + Me(e.$$.fragment, i), t = !1; }, d(i) { - ki(e, i); + pi(e, i); } }; } -function T_(n) { - let e, t; - return e = new Ci({ - props: { Icon: Jd, label: "Remove Videos" } - }), e.$on( +function $_(n) { + let e, t, i, s, r; + return t = new vi({ + props: { + Icon: ( + /*isMuted*/ + n[17] ? Sg : Tg + ), + label: ( + /*isMuted*/ + n[17] ? ( + /*i18n*/ + n[6]("common.unmute") + ) : ( + /*i18n*/ + n[6]("common.mute") + ) + ) + } + }), t.$on( "click", - /*click_handler*/ - n[22] + /*toggleMute*/ + n[20] + ), t.$on( + "keydown", + /*keydown_handler*/ + n[34] ), { c() { - Ii(e.$$.fragment); + e = Cs("div"), gi(t.$$.fragment), this.h(); }, - l(i) { - Li(e.$$.fragment, i); + l(a) { + e = Rs(a, "DIV", { role: !0, tabindex: !0 }); + var o = ks(e); + mi(t.$$.fragment, o), o.forEach(st), this.h(); }, - m(i, s) { - Ri(e, i, s), t = !0; + h() { + Ut(e, "role", "button"), Ut(e, "tabindex", "0"); }, - p: e$, - i(i) { - t || (Ie(e.$$.fragment, i), t = !0); + m(a, o) { + ai(a, e, o), _i(t, e, null), i = !0, s || (r = [ + Fs(e, "mousedown", Gr( + /*mousedown_handler*/ + n[31] + )), + Fs(e, "touchstart", Gr( + /*touchstart_handler*/ + n[32] + )) + ], s = !0); }, - o(i) { - Ne(e.$$.fragment, i), t = !1; + p(a, o) { + const u = {}; + o[0] & /*isMuted*/ + 131072 && (u.Icon = /*isMuted*/ + a[17] ? Sg : Tg), o[0] & /*isMuted, i18n*/ + 131136 && (u.label = /*isMuted*/ + a[17] ? ( + /*i18n*/ + a[6]("common.unmute") + ) : ( + /*i18n*/ + a[6]("common.mute") + )), t.$set(u); }, - d(i) { - ki(e, i); + i(a) { + i || (be(t.$$.fragment, a), i = !0); + }, + o(a) { + Me(t.$$.fragment, a), i = !1; + }, + d(a) { + a && st(e), pi(t), s = !1, tm(r); } }; } -function o$(n) { - let e, t, i, s, r = ( +function B_(n) { + let e, t, i, s, r; + return t = new vi({ + props: { Icon: bf, label: "Remove Videos" } + }), t.$on( + "click", + /*removeVideos*/ + n[21] + ), t.$on( + "keydown", + /*keydown_handler_1*/ + n[35] + ), { + c() { + e = Cs("div"), gi(t.$$.fragment), this.h(); + }, + l(a) { + e = Rs(a, "DIV", { role: !0, tabindex: !0 }); + var o = ks(e); + mi(t.$$.fragment, o), o.forEach(st), this.h(); + }, + h() { + Ut(e, "role", "button"), Ut(e, "tabindex", "0"); + }, + m(a, o) { + ai(a, e, o), _i(t, e, null), i = !0, s || (r = [ + Fs(e, "mousedown", Gr( + /*mousedown_handler_1*/ + n[29] + )), + Fs(e, "touchstart", Gr( + /*touchstart_handler_1*/ + n[30] + )) + ], s = !0); + }, + p: S$, + i(a) { + i || (be(t.$$.fragment, a), i = !0); + }, + o(a) { + Me(t.$$.fragment, a), i = !1; + }, + d(a) { + a && st(e), pi(t), s = !1, tm(r); + } + }; +} +function k$(n) { + let e, t, i, s, r, a = ( /*show_fullscreen_button*/ - n[7] && E_(n) - ), a = ( - /*show_download_button*/ - n[3] && /*value*/ - n[1][1] && b_(n) + n[8] && O_(n) ), o = ( + /*show_download_button*/ + n[4] && /*value*/ + n[1][1] && M_(n) + ), u = ( + /*show_mute_button*/ + n[9] && $_(n) + ), l = ( /*interactive*/ - n[9] && T_(n) + n[10] && B_(n) ); return { c() { - r && r.c(), e = Er(), a && a.c(), t = Er(), o && o.c(), i = Zl(); + a && a.c(), e = Ir(), o && o.c(), t = Ir(), u && u.c(), i = Ir(), l && l.c(), s = pu(); }, - l(u) { - r && r.l(u), e = _r(u), a && a.l(u), t = _r(u), o && o.l(u), i = Zl(); + l(c) { + a && a.l(c), e = Lr(c), o && o.l(c), t = Lr(c), u && u.l(c), i = Lr(c), l && l.l(c), s = pu(); }, - m(u, l) { - r && r.m(u, l), yr(u, e, l), a && a.m(u, l), yr(u, t, l), o && o.m(u, l), yr(u, i, l), s = !0; + m(c, h) { + a && a.m(c, h), ai(c, e, h), o && o.m(c, h), ai(c, t, h), u && u.m(c, h), ai(c, i, h), l && l.m(c, h), ai(c, s, h), r = !0; }, - p(u, l) { + p(c, h) { /*show_fullscreen_button*/ - u[7] ? r ? (r.p(u, l), l & /*show_fullscreen_button*/ - 128 && Ie(r, 1)) : (r = E_(u), r.c(), Ie(r, 1), r.m(e.parentNode, e)) : r && (vr(), Ne(r, 1, 1, () => { - r = null; - }), pr()), /*show_download_button*/ - u[3] && /*value*/ - u[1][1] ? a ? (a.p(u, l), l & /*show_download_button, value*/ - 10 && Ie(a, 1)) : (a = b_(u), a.c(), Ie(a, 1), a.m(t.parentNode, t)) : a && (vr(), Ne(a, 1, 1, () => { + c[8] ? a ? (a.p(c, h), h[0] & /*show_fullscreen_button*/ + 256 && be(a, 1)) : (a = O_(c), a.c(), be(a, 1), a.m(e.parentNode, e)) : a && (xs(), Me(a, 1, 1, () => { a = null; - }), pr()), /*interactive*/ - u[9] ? o ? (o.p(u, l), l & /*interactive*/ - 512 && Ie(o, 1)) : (o = T_(u), o.c(), Ie(o, 1), o.m(i.parentNode, i)) : o && (vr(), Ne(o, 1, 1, () => { + }), As()), /*show_download_button*/ + c[4] && /*value*/ + c[1][1] ? o ? (o.p(c, h), h[0] & /*show_download_button, value*/ + 18 && be(o, 1)) : (o = M_(c), o.c(), be(o, 1), o.m(t.parentNode, t)) : o && (xs(), Me(o, 1, 1, () => { o = null; - }), pr()); + }), As()), /*show_mute_button*/ + c[9] ? u ? (u.p(c, h), h[0] & /*show_mute_button*/ + 512 && be(u, 1)) : (u = $_(c), u.c(), be(u, 1), u.m(i.parentNode, i)) : u && (xs(), Me(u, 1, 1, () => { + u = null; + }), As()), /*interactive*/ + c[10] ? l ? (l.p(c, h), h[0] & /*interactive*/ + 1024 && be(l, 1)) : (l = B_(c), l.c(), be(l, 1), l.m(s.parentNode, s)) : l && (xs(), Me(l, 1, 1, () => { + l = null; + }), As()); }, - i(u) { - s || (Ie(r), Ie(a), Ie(o), s = !0); + i(c) { + r || (be(a), be(o), be(u), be(l), r = !0); }, - o(u) { - Ne(r), Ne(a), Ne(o), s = !1; + o(c) { + Me(a), Me(o), Me(u), Me(l), r = !1; }, - d(u) { - u && (zi(e), zi(t), zi(i)), r && r.d(u), a && a.d(u), o && o.d(u); + d(c) { + c && (st(e), st(t), st(i), st(s)), a && a.d(c), o && o.d(c), u && u.d(c), l && l.d(c); } }; } -function S_(n) { +function N_(n) { var a; let e, t, i; function s(o) { - n[23](o); + n[36](o); } let r = { src: ( @@ -39763,76 +40011,87 @@ function S_(n) { ), loop: ( /*loop*/ - n[10] + n[11] + ), + muted: ( + /*isMuted*/ + n[17] ), - muted: !0, i18n: ( /*i18n*/ - n[5] + n[6] ), upload: ( /*upload*/ - n[11] + n[12] ), mirror: !1, is_stream: ( /*value*/ n[1][0].is_stream ), - interactive: !1 + interactive: !1, + fullscreen: ( + /*fullscreen*/ + n[2] + ) }; return ( /*video1_el*/ - n[12] !== void 0 && (r.video_el = /*video1_el*/ - n[12]), e = new Ff({ props: r }), Mf.push(() => Of(e, "video_el", s)), e.$on( - "loadeddata", - /*handle_video_ready*/ - n[16] + n[13] !== void 0 && (r.video_el = /*video1_el*/ + n[13]), e = new em({ props: r }), Ur.push(() => ro(e, "video_el", s)), e.$on( + "load", + /*handle_video_load*/ + n[24] ), { c() { - Ii(e.$$.fragment); + gi(e.$$.fragment); }, l(o) { - Li(e.$$.fragment, o); + mi(e.$$.fragment, o); }, m(o, u) { - Ri(e, o, u), i = !0; + _i(e, o, u), i = !0; }, p(o, u) { var c; const l = {}; - u & /*value*/ + u[0] & /*value*/ 2 && (l.src = /*value*/ ((c = o[1][0].meta) == null ? void 0 : c._base64) || /*value*/ - o[1][0].url), u & /*loop*/ - 1024 && (l.loop = /*loop*/ - o[10]), u & /*i18n*/ - 32 && (l.i18n = /*i18n*/ - o[5]), u & /*upload*/ - 2048 && (l.upload = /*upload*/ - o[11]), u & /*value*/ + o[1][0].url), u[0] & /*loop*/ + 2048 && (l.loop = /*loop*/ + o[11]), u[0] & /*isMuted*/ + 131072 && (l.muted = /*isMuted*/ + o[17]), u[0] & /*i18n*/ + 64 && (l.i18n = /*i18n*/ + o[6]), u[0] & /*upload*/ + 4096 && (l.upload = /*upload*/ + o[12]), u[0] & /*value*/ 2 && (l.is_stream = /*value*/ - o[1][0].is_stream), !t && u & /*video1_el*/ - 4096 && (t = !0, l.video_el = /*video1_el*/ - o[12], Pf(() => t = !1)), e.$set(l); + o[1][0].is_stream), u[0] & /*fullscreen*/ + 4 && (l.fullscreen = /*fullscreen*/ + o[2]), !t && u[0] & /*video1_el*/ + 8192 && (t = !0, l.video_el = /*video1_el*/ + o[13], so(() => t = !1)), e.$set(l); }, i(o) { - i || (Ie(e.$$.fragment, o), i = !0); + i || (be(e.$$.fragment, o), i = !0); }, o(o) { - Ne(e.$$.fragment, o), i = !1; + Me(e.$$.fragment, o), i = !1; }, d(o) { - ki(e, o); + pi(e, o); } } ); } -function A_(n) { +function U_(n) { var a; let e, t, i; function s(o) { - n[24](o); + n[37](o); } let r = { src: ( @@ -39842,106 +40101,175 @@ function A_(n) { ), loop: ( /*loop*/ - n[10] + n[11] + ), + muted: ( + /*isMuted*/ + n[17] ), - muted: !0, i18n: ( /*i18n*/ - n[5] + n[6] ), upload: ( /*upload*/ - n[11] + n[12] ), mirror: !1, is_stream: ( /*value*/ n[1][1].is_stream ), - interactive: !1 + interactive: !1, + fullscreen: ( + /*fullscreen*/ + n[2] + ) }; return ( /*video2_el*/ - n[13] !== void 0 && (r.video_el = /*video2_el*/ - n[13]), e = new Ff({ props: r }), Mf.push(() => Of(e, "video_el", s)), { + n[14] !== void 0 && (r.video_el = /*video2_el*/ + n[14]), e = new em({ props: r }), Ur.push(() => ro(e, "video_el", s)), { c() { - Ii(e.$$.fragment); + gi(e.$$.fragment); }, l(o) { - Li(e.$$.fragment, o); + mi(e.$$.fragment, o); }, m(o, u) { - Ri(e, o, u), i = !0; + _i(e, o, u), i = !0; }, p(o, u) { var c; const l = {}; - u & /*value*/ + u[0] & /*value*/ 2 && (l.src = /*value*/ ((c = o[1][1].meta) == null ? void 0 : c._base64) || /*value*/ - o[1][1].url), u & /*loop*/ - 1024 && (l.loop = /*loop*/ - o[10]), u & /*i18n*/ - 32 && (l.i18n = /*i18n*/ - o[5]), u & /*upload*/ - 2048 && (l.upload = /*upload*/ - o[11]), u & /*value*/ + o[1][1].url), u[0] & /*loop*/ + 2048 && (l.loop = /*loop*/ + o[11]), u[0] & /*isMuted*/ + 131072 && (l.muted = /*isMuted*/ + o[17]), u[0] & /*i18n*/ + 64 && (l.i18n = /*i18n*/ + o[6]), u[0] & /*upload*/ + 4096 && (l.upload = /*upload*/ + o[12]), u[0] & /*value*/ 2 && (l.is_stream = /*value*/ - o[1][1].is_stream), !t && u & /*video2_el*/ - 8192 && (t = !0, l.video_el = /*video2_el*/ - o[13], Pf(() => t = !1)), e.$set(l); + o[1][1].is_stream), u[0] & /*fullscreen*/ + 4 && (l.fullscreen = /*fullscreen*/ + o[2]), !t && u[0] & /*video2_el*/ + 16384 && (t = !0, l.video_el = /*video2_el*/ + o[14], so(() => t = !1)), e.$set(l); }, i(o) { - i || (Ie(e.$$.fragment, o), i = !0); + i || (be(e.$$.fragment, o), i = !0); }, o(o) { - Ne(e.$$.fragment, o), i = !1; + Me(e.$$.fragment, o), i = !1; }, d(o) { - ki(e, o); + pi(e, o); } } ); } -function l$(n) { +function R$(n) { + let e, t, i, s, r = ( + /*value*/ + n[1][0] && N_(n) + ), a = ( + /*value*/ + n[1][1] && U_(n) + ); + return { + c() { + e = Cs("div"), r && r.c(), t = Ir(), i = Cs("div"), a && a.c(), this.h(); + }, + l(o) { + e = Rs(o, "DIV", { class: !0 }); + var u = ks(e); + r && r.l(u), u.forEach(st), t = Lr(o), i = Rs(o, "DIV", { class: !0, style: !0 }); + var l = ks(i); + a && a.l(l), l.forEach(st), this.h(); + }, + h() { + Ut(e, "class", "player-wrapper svelte-40zsic"), Ut(i, "class", "player-wrapper fixed svelte-40zsic"), Ut( + i, + "style", + /*style*/ + n[19] + ); + }, + m(o, u) { + ai(o, e, u), r && r.m(e, null), ai(o, t, u), ai(o, i, u), a && a.m(i, null), s = !0; + }, + p(o, u) { + /*value*/ + o[1][0] ? r ? (r.p(o, u), u[0] & /*value*/ + 2 && be(r, 1)) : (r = N_(o), r.c(), be(r, 1), r.m(e, null)) : r && (xs(), Me(r, 1, 1, () => { + r = null; + }), As()), /*value*/ + o[1][1] ? a ? (a.p(o, u), u[0] & /*value*/ + 2 && be(a, 1)) : (a = U_(o), a.c(), be(a, 1), a.m(i, null)) : a && (xs(), Me(a, 1, 1, () => { + a = null; + }), As()), (!s || u[0] & /*style*/ + 524288) && Ut( + i, + "style", + /*style*/ + o[19] + ); + }, + i(o) { + s || (be(r), be(a), s = !0); + }, + o(o) { + Me(r), Me(a), s = !1; + }, + d(o) { + o && (st(e), st(t), st(i)), r && r.d(), a && a.d(); + } + }; +} +function C$(n) { let e, t; - return e = new au({}), { + return e = new wu({}), { c() { - Ii(e.$$.fragment); + gi(e.$$.fragment); }, l(i) { - Li(e.$$.fragment, i); + mi(e.$$.fragment, i); }, m(i, s) { - Ri(e, i, s), t = !0; + _i(e, i, s), t = !0; }, i(i) { - t || (Ie(e.$$.fragment, i), t = !0); + t || (be(e.$$.fragment, i), t = !0); }, o(i) { - Ne(e.$$.fragment, i), t = !1; + Me(e.$$.fragment, i), t = !1; }, d(i) { - ki(e, i); + pi(e, i); } }; } -function u$(n) { +function F$(n) { let e, t, i, s, r, a; - e = new Zd({ + e = new Ef({ props: { show_label: ( /*show_label*/ - n[4] + n[5] ), - Icon: au, + Icon: wu, label: ( /*label*/ - n[2] || "Video Slider" + n[3] || "Video Slider" ) } }); - const o = [r$, s$], u = []; + const o = [L$, w$], u = []; function l(c, h) { return ( /*value*/ @@ -39952,249 +40280,332 @@ function u$(n) { } return i = l(n), s = u[i] = o[i](n), { c() { - Ii(e.$$.fragment), t = Er(), s.c(), r = Zl(); + gi(e.$$.fragment), t = Ir(), s.c(), r = pu(); }, l(c) { - Li(e.$$.fragment, c), t = _r(c), s.l(c), r = Zl(); + mi(e.$$.fragment, c), t = Lr(c), s.l(c), r = pu(); }, m(c, h) { - Ri(e, c, h), yr(c, t, h), u[i].m(c, h), yr(c, r, h), a = !0; + _i(e, c, h), ai(c, t, h), u[i].m(c, h), ai(c, r, h), a = !0; }, - p(c, [h]) { + p(c, h) { const d = {}; - h & /*show_label*/ - 16 && (d.show_label = /*show_label*/ - c[4]), h & /*label*/ - 4 && (d.label = /*label*/ - c[2] || "Video Slider"), e.$set(d); + h[0] & /*show_label*/ + 32 && (d.show_label = /*show_label*/ + c[5]), h[0] & /*label*/ + 8 && (d.label = /*label*/ + c[3] || "Video Slider"), e.$set(d); let f = i; - i = l(c), i === f ? u[i].p(c, h) : (vr(), Ne(u[f], 1, 1, () => { + i = l(c), i === f ? u[i].p(c, h) : (xs(), Me(u[f], 1, 1, () => { u[f] = null; - }), pr(), s = u[i], s ? s.p(c, h) : (s = u[i] = o[i](c), s.c()), Ie(s, 1), s.m(r.parentNode, r)); + }), As(), s = u[i], s ? s.p(c, h) : (s = u[i] = o[i](c), s.c()), be(s, 1), s.m(r.parentNode, r)); }, i(c) { - a || (Ie(e.$$.fragment, c), Ie(s), a = !0); + a || (be(e.$$.fragment, c), be(s), a = !0); }, o(c) { - Ne(e.$$.fragment, c), Ne(s), a = !1; + Me(e.$$.fragment, c), Me(s), a = !1; }, d(c) { - c && (zi(t), zi(r)), ki(e, c), u[i].d(c); + c && (st(t), st(r)), pi(e, c), u[i].d(c); } }; } -function c$(n, e, t) { - let i, { value: s = [null, null] } = e, { label: r = void 0 } = e, { show_download_button: a = !0 } = e, { show_label: o } = e, { i18n: u } = e, { position: l } = e, { slider_color: c } = e, { show_fullscreen_button: h = !0 } = e, { fullscreen: d = !1 } = e, { interactive: f = !0 } = e, { autoplay: m = !1 } = e, { loop: g = !1 } = e, { upload: p } = e; - const y = n$(); - let v, _, E = !1, T = !1; - function A() { - t(19, E = !0); +function P$(n, e, t) { + return Math.min(Math.max(n, e), t); +} +function O$(n, e, t, i) { + const a = (n * t + i) / e; + return P$(a, 0, 1); +} +function M$(n, e, t) { + let i, s, { value: r = [null, null] } = e, { label: a = void 0 } = e, { show_download_button: o = !0 } = e, { show_label: u } = e, { i18n: l } = e, { position: c = 0.5 } = e, { slider_color: h } = e, { show_fullscreen_button: d = !0 } = e, { show_mute_button: f = !0 } = e, { fullscreen: m = !1 } = e, { interactive: g = !0 } = e, { autoplay: p = !1 } = e, { loop: y = !1 } = e, { upload: v } = e; + const _ = x$(); + let E, T, x, S = { top: 0, left: 0, width: 0, height: 0 }, D = 0, A, w = !0, I = !1, M = !1; + function k(j) { + j.stopPropagation(), t(18, I = !0), E && T && (t(17, w = !w), t(13, E.muted = w, E), t(14, T.muted = w, T)), setTimeout(() => t(18, I = !1), 0); + } + function q(j) { + j.stopPropagation(), t(18, I = !0), t(1, r = [null, null]), t(0, c = 0.5), _("clear"), setTimeout(() => t(18, I = !1), 0); + } + function K(j) { + if (j.stopPropagation(), !E || !T) return; + E.paused ? (E.play().catch(() => { + }), T.play().catch(() => { + })) : (E.pause(), T.pause()); + } + function H(j) { + t(0, c = 0.5), _("fullscreen", j.detail); + } + function Y(j) { + t(16, S = j.detail), x && t(26, D = x.getBoundingClientRect().width), t(0, c = 0.5), _("load", S); + } + function B(j, Ee) { + if (!j || !Ee) return; + A == null || A.disconnect(); + const Oe = () => { + const je = j.getBoundingClientRect(), se = Ee.getBoundingClientRect(); + t(16, S = { + top: je.top - se.top, + left: je.left - se.left, + width: je.width || se.width, + height: je.height || se.height + }), t(26, D = se.width), _("load", S); + }; + A = new ResizeObserver(() => { + Oe(), t(0, c = 0.5); + }), j.addEventListener("loadedmetadata", Oe), A.observe(Ee), A.observe(j), Oe(); } - function S() { - if (!v || !_) - return; - v.paused ? (v.play().catch(() => { - }), _.play().catch(() => { - })) : (v.pause(), _.pause()); + D$(() => (t(0, c = 0.5), E && t(13, E.muted = !0, E), T && t(14, T.muted = !0, T), () => { + A == null || A.disconnect(); + })); + function z(j) { + Ll.call(this, n, j); + } + function W(j) { + Ll.call(this, n, j); + } + function L(j) { + Ll.call(this, n, j); + } + function $(j) { + Ll.call(this, n, j); } - function D(P) { - ZM.call(this, n, P); + function Q(j) { + m = j, t(2, m); } - const x = (P) => { - t(1, s = [null, null]), y("clear"), P.stopPropagation(); + const C = (j) => { + (j.key === "Enter" || j.key === " ") && k(j); + }, O = (j) => { + (j.key === "Enter" || j.key === " ") && q(j); }; - function w(P) { - v = P, t(12, v); + function N(j) { + E = j, t(13, E); } - function I(P) { - _ = P, t(13, _), t(12, v), t(19, E), t(18, m), t(20, T); + function ee(j) { + T = j, t(14, T), t(13, E), t(25, p); } - function R(P) { - l = P, t(0, l); + function G(j) { + c = j, t(0, c); } - const M = (P) => { - (P.key === "Enter" || P.key === " ") && S(); + function Z(j) { + x = j, t(15, x); + } + function U(j) { + Ur[j ? "unshift" : "push"](() => { + x = j, t(15, x); + }); + } + const re = (j) => { + (j.key === "Enter" || j.key === " ") && K(j); }; - return n.$$set = (P) => { - "value" in P && t(1, s = P.value), "label" in P && t(2, r = P.label), "show_download_button" in P && t(3, a = P.show_download_button), "show_label" in P && t(4, o = P.show_label), "i18n" in P && t(5, u = P.i18n), "position" in P && t(0, l = P.position), "slider_color" in P && t(6, c = P.slider_color), "show_fullscreen_button" in P && t(7, h = P.show_fullscreen_button), "fullscreen" in P && t(8, d = P.fullscreen), "interactive" in P && t(9, f = P.interactive), "autoplay" in P && t(18, m = P.autoplay), "loop" in P && t(10, g = P.loop), "upload" in P && t(11, p = P.upload); + return n.$$set = (j) => { + "value" in j && t(1, r = j.value), "label" in j && t(3, a = j.label), "show_download_button" in j && t(4, o = j.show_download_button), "show_label" in j && t(5, u = j.show_label), "i18n" in j && t(6, l = j.i18n), "position" in j && t(0, c = j.position), "slider_color" in j && t(7, h = j.slider_color), "show_fullscreen_button" in j && t(8, d = j.show_fullscreen_button), "show_mute_button" in j && t(9, f = j.show_mute_button), "fullscreen" in j && t(2, m = j.fullscreen), "interactive" in j && t(10, g = j.interactive), "autoplay" in j && t(25, p = j.autoplay), "loop" in j && t(11, y = j.loop), "upload" in j && t(12, v = j.upload); }, n.$$.update = () => { - n.$$.dirty & /*position*/ - 1 && t(14, i = `clip-path: inset(0 0 0 ${l * 100}%)`), n.$$.dirty & /*video1_el, video_is_ready, autoplay, initial_autoplay_done, video2_el*/ - 1847296 && (v && E && m && !T && (v.play().catch(() => { - }), t(20, T = !0)), v && _ && (Math.abs(v.currentTime - _.currentTime) > 0.1 && t(13, _.currentTime = v.currentTime, _), v.paused !== _.paused && (v.paused ? _.pause() : _.play().catch(() => { + n.$$.dirty[0] & /*position, viewport_width, image_size*/ + 67174401 && t(28, i = O$(c, D || 640, S.width || D || 640, S.left || 0)), n.$$.dirty[0] & /*coords_at_viewport*/ + 268435456 && t(19, s = `clip-path: inset(0 0 0 ${i * 100}%)`), n.$$.dirty[0] & /*main_wrapper_el, video1_el, is_initialized*/ + 134258688 && x && E && !M && (B(E, x), t(27, M = !0)), n.$$.dirty[0] & /*video1_el, autoplay, video2_el*/ + 33579008 && (E && p && !E.played.length && E.play().catch(() => { + }), E && T && (Math.abs(E.currentTime - T.currentTime) > 0.1 && t(14, T.currentTime = E.currentTime, T), E.paused !== T.paused && (E.paused ? T.pause() : T.play().catch(() => { })))); }, [ - l, - s, + c, r, + m, a, o, u, - c, + l, h, d, f, g, - p, - v, - _, - i, y, - A, - S, - m, + v, E, T, - D, x, + S, w, I, - R, - M + s, + k, + q, + K, + H, + Y, + p, + D, + M, + i, + z, + W, + L, + $, + Q, + C, + O, + N, + ee, + G, + Z, + U, + re ]; } -class h$ extends QM { +class $$ extends b$ { constructor(e) { - super(), JM(this, e, c$, u$, i$, { - value: 1, - label: 2, - show_download_button: 3, - show_label: 4, - i18n: 5, - position: 0, - slider_color: 6, - show_fullscreen_button: 7, - fullscreen: 8, - interactive: 9, - autoplay: 18, - loop: 10, - upload: 11 - }); + super(), T$( + this, + e, + M$, + F$, + A$, + { + value: 1, + label: 3, + show_download_button: 4, + show_label: 5, + i18n: 6, + position: 0, + slider_color: 7, + show_fullscreen_button: 8, + show_mute_button: 9, + fullscreen: 2, + interactive: 10, + autoplay: 25, + loop: 11, + upload: 12 + }, + null, + [-1, -1] + ); } } const { - SvelteComponent: Lj, - assign: Ij, - bubble: kj, - claim_element: Rj, - compute_rest_props: Cj, - detach: Fj, - element: Pj, - exclude_internal_props: Oj, - get_spread_update: Mj, - init: $j, - insert_hydration: Bj, - listen: Nj, - noop: Uj, - safe_not_equal: Gj, - set_attributes: Hj, - src_url_equal: Vj, - toggle_class: qj + SvelteComponent: Hj, + assign: Vj, + bubble: qj, + claim_element: Kj, + compute_rest_props: jj, + detach: zj, + element: Wj, + exclude_internal_props: Yj, + get_spread_update: Xj, + init: Qj, + insert_hydration: Zj, + listen: Jj, + noop: ez, + safe_not_equal: tz, + set_attributes: iz, + src_url_equal: nz, + toggle_class: sz } = window.__gradio__svelte__internal, { - SvelteComponent: Kj, - append_hydration: jj, - attr: zj, - binding_callbacks: Wj, - bubble: Yj, - check_outros: Xj, - children: Qj, - claim_component: Zj, - claim_element: Jj, - claim_space: ez, - create_component: tz, - destroy_component: iz, - detach: nz, - element: sz, - empty: rz, - group_outros: az, - init: oz, - insert_hydration: lz, - listen: uz, - mount_component: cz, - safe_not_equal: hz, - space: dz, - toggle_class: fz, - transition_in: mz, - transition_out: gz -} = window.__gradio__svelte__internal, { createEventDispatcher: pz, onMount: _z } = window.__gradio__svelte__internal, { - SvelteComponent: d$, - append_hydration: cl, - attr: Ih, - children: kh, - claim_component: f$, - claim_element: Rh, - claim_space: m$, - claim_text: g$, - create_component: p$, - destroy_component: _$, - detach: hl, - element: Ch, - init: v$, - insert_hydration: y$, - listen: E$, - mount_component: b$, - noop: T$, - safe_not_equal: S$, - set_style: A$, - space: x$, - text: D$, - transition_in: w$, - transition_out: L$ -} = window.__gradio__svelte__internal, { createEventDispatcher: I$ } = window.__gradio__svelte__internal; -function k$(n) { + SvelteComponent: rz, + append_hydration: az, + attr: oz, + binding_callbacks: lz, + bubble: uz, + check_outros: cz, + children: hz, + claim_component: dz, + claim_element: fz, + claim_space: mz, + create_component: gz, + destroy_component: pz, + detach: _z, + element: vz, + empty: yz, + group_outros: Ez, + init: bz, + insert_hydration: Tz, + listen: Sz, + mount_component: Az, + safe_not_equal: xz, + space: Dz, + toggle_class: wz, + transition_in: Lz, + transition_out: Iz +} = window.__gradio__svelte__internal, { createEventDispatcher: kz, onMount: Rz } = window.__gradio__svelte__internal, { + SvelteComponent: B$, + append_hydration: Il, + attr: Xh, + children: Qh, + claim_component: N$, + claim_element: Zh, + claim_space: U$, + claim_text: G$, + create_component: H$, + destroy_component: V$, + detach: kl, + element: Jh, + init: q$, + insert_hydration: K$, + listen: j$, + mount_component: z$, + noop: W$, + safe_not_equal: Y$, + set_style: X$, + space: Q$, + text: Z$, + transition_in: J$, + transition_out: eB +} = window.__gradio__svelte__internal, { createEventDispatcher: tB } = window.__gradio__svelte__internal; +function iB(n) { let e, t, i, s, r, a = "Click to Access Webcam", o, u, l, c; - return s = new uv({}), { + return s = new xv({}), { c() { - e = Ch("button"), t = Ch("div"), i = Ch("span"), p$(s.$$.fragment), r = x$(), o = D$(a), this.h(); + e = Jh("button"), t = Jh("div"), i = Jh("span"), H$(s.$$.fragment), r = Q$(), o = Z$(a), this.h(); }, l(h) { - e = Rh(h, "BUTTON", { class: !0 }); - var d = kh(e); - t = Rh(d, "DIV", { class: !0 }); - var f = kh(t); - i = Rh(f, "SPAN", { class: !0 }); - var m = kh(i); - f$(s.$$.fragment, m), m.forEach(hl), r = m$(f), o = g$(f, a), f.forEach(hl), d.forEach(hl), this.h(); + e = Zh(h, "BUTTON", { class: !0 }); + var d = Qh(e); + t = Zh(d, "DIV", { class: !0 }); + var f = Qh(t); + i = Zh(f, "SPAN", { class: !0 }); + var m = Qh(i); + N$(s.$$.fragment, m), m.forEach(kl), r = U$(f), o = G$(f, a), f.forEach(kl), d.forEach(kl), this.h(); }, h() { - Ih(i, "class", "icon-wrap svelte-fjcd9c"), Ih(t, "class", "wrap svelte-fjcd9c"), Ih(e, "class", "svelte-fjcd9c"), A$(e, "height", "100%"); + Xh(i, "class", "icon-wrap svelte-fjcd9c"), Xh(t, "class", "wrap svelte-fjcd9c"), Xh(e, "class", "svelte-fjcd9c"), X$(e, "height", "100%"); }, m(h, d) { - y$(h, e, d), cl(e, t), cl(t, i), b$(s, i, null), cl(t, r), cl(t, o), u = !0, l || (c = E$( + K$(h, e, d), Il(e, t), Il(t, i), z$(s, i, null), Il(t, r), Il(t, o), u = !0, l || (c = j$( e, "click", /*click_handler*/ n[1] ), l = !0); }, - p: T$, + p: W$, i(h) { - u || (w$(s.$$.fragment, h), u = !0); + u || (J$(s.$$.fragment, h), u = !0); }, o(h) { - L$(s.$$.fragment, h), u = !1; + eB(s.$$.fragment, h), u = !1; }, d(h) { - h && hl(e), _$(s), l = !1, c(); + h && kl(e), V$(s), l = !1, c(); } }; } -function R$(n) { - const e = I$(); +function nB(n) { + const e = tB(); return [e, () => e("click")]; } -class C$ extends d$ { +class sB extends B$ { constructor(e) { - super(), v$(this, e, R$, k$, S$, {}); + super(), q$(this, e, nB, iB, Y$, {}); } } -function F$() { +function rB() { return navigator.mediaDevices.enumerateDevices(); } -function P$(n, e) { +function aB(n, e) { e.srcObject = n, e.muted = !0, e.play(); } -async function x_(n, e, t, i) { +async function G_(n, e, t, i) { const s = { video: i ? { deviceId: { exact: i }, ...t == null ? void 0 : t.video } : (t == null ? void 0 : t.video) || { width: { ideal: 1920 }, @@ -40203,60 +40614,60 @@ async function x_(n, e, t, i) { audio: n && ((t == null ? void 0 : t.audio) ?? !0) // Defaults to true if not specified }; - return navigator.mediaDevices.getUserMedia(s).then((r) => (P$(r, e), r)); + return navigator.mediaDevices.getUserMedia(s).then((r) => (aB(r, e), r)); } -function O$(n) { +function oB(n) { return n.filter( (t) => t.kind === "videoinput" ); } const { - SvelteComponent: M$, - action_destroyer: $$, - add_render_callback: B$, - append_hydration: qe, + SvelteComponent: lB, + action_destroyer: uB, + add_render_callback: cB, + append_hydration: We, attr: Re, - binding_callbacks: N$, - check_outros: La, - children: ht, - claim_component: ts, - claim_element: at, - claim_space: rn, - claim_text: ro, - create_component: is, - create_in_transition: U$, - destroy_component: ns, - destroy_each: G$, - detach: be, - element: ot, - empty: Or, - ensure_array_like: D_, - group_outros: Ia, - init: H$, - insert_hydration: xt, - listen: Jl, - mount_component: ss, - noop: $f, - run_all: V$, - safe_not_equal: q$, - set_data: ao, - set_input_value: $d, - set_style: s1, - space: an, - src_url_equal: w_, - stop_propagation: K$, - text: oo, - toggle_class: ir, - transition_in: We, - transition_out: rt -} = window.__gradio__svelte__internal, { createEventDispatcher: j$, onDestroy: z$, onMount: W$ } = window.__gradio__svelte__internal; -function L_(n, e, t) { + binding_callbacks: hB, + check_outros: Ua, + children: _t, + claim_component: os, + claim_element: ft, + claim_space: ln, + claim_text: Ao, + create_component: ls, + create_in_transition: dB, + destroy_component: us, + destroy_each: fB, + detach: Se, + element: mt, + empty: Hr, + ensure_array_like: H_, + group_outros: Ga, + init: mB, + insert_hydration: Rt, + listen: _u, + mount_component: cs, + noop: im, + run_all: gB, + safe_not_equal: pB, + set_data: xo, + set_input_value: rf, + set_style: E1, + space: un, + src_url_equal: V_, + stop_propagation: _B, + text: Do, + toggle_class: mr, + transition_in: Qe, + transition_out: dt +} = window.__gradio__svelte__internal, { createEventDispatcher: vB, onDestroy: yB, onMount: EB } = window.__gradio__svelte__internal; +function q_(n, e, t) { const i = n.slice(); return i[40] = e[t], i; } -function Y$(n) { +function bB(n) { let e, t, i, s, r, a, o, u, l, c, h; - const d = [Z$, Q$], f = []; + const d = [AB, SB], f = []; function m(y, v) { return ( /*mode*/ @@ -40266,28 +40677,28 @@ function Y$(n) { } i = m(n), s = f[i] = d[i](n); let g = !/*recording*/ - n[11] && I_(n), p = ( + n[11] && K_(n), p = ( /*options_open*/ n[13] && /*selected_device*/ - n[8] && k_(n) + n[8] && j_(n) ); return { c() { - e = ot("div"), t = ot("button"), s.c(), a = an(), g && g.c(), o = an(), p && p.c(), u = Or(), this.h(); + e = mt("div"), t = mt("button"), s.c(), a = un(), g && g.c(), o = un(), p && p.c(), u = Hr(), this.h(); }, l(y) { - e = at(y, "DIV", { class: !0 }); - var v = ht(e); - t = at(v, "BUTTON", { "aria-label": !0, class: !0 }); - var _ = ht(t); - s.l(_), _.forEach(be), a = rn(v), g && g.l(v), v.forEach(be), o = rn(y), p && p.l(y), u = Or(), this.h(); + e = ft(y, "DIV", { class: !0 }); + var v = _t(e); + t = ft(v, "BUTTON", { "aria-label": !0, class: !0 }); + var _ = _t(t); + s.l(_), _.forEach(Se), a = ln(v), g && g.l(v), v.forEach(Se), o = ln(y), p && p.l(y), u = Hr(), this.h(); }, h() { Re(t, "aria-label", r = /*mode*/ n[2] === "image" ? "capture photo" : "start recording"), Re(t, "class", "svelte-1tdan5a"), Re(e, "class", "button-wrap svelte-1tdan5a"); }, m(y, v) { - xt(y, e, v), qe(e, t), f[i].m(t, null), qe(e, a), g && g.m(e, null), xt(y, o, v), p && p.m(y, v), xt(y, u, v), l = !0, c || (h = Jl( + Rt(y, e, v), We(e, t), f[i].m(t, null), We(e, a), g && g.m(e, null), Rt(y, o, v), p && p.m(y, v), Rt(y, u, v), l = !0, c || (h = _u( t, "click", /*click_handler_1*/ @@ -40296,99 +40707,99 @@ function Y$(n) { }, p(y, v) { let _ = i; - i = m(y), i === _ ? f[i].p(y, v) : (Ia(), rt(f[_], 1, 1, () => { + i = m(y), i === _ ? f[i].p(y, v) : (Ga(), dt(f[_], 1, 1, () => { f[_] = null; - }), La(), s = f[i], s ? s.p(y, v) : (s = f[i] = d[i](y), s.c()), We(s, 1), s.m(t, null)), (!l || v[0] & /*mode*/ + }), Ua(), s = f[i], s ? s.p(y, v) : (s = f[i] = d[i](y), s.c()), Qe(s, 1), s.m(t, null)), (!l || v[0] & /*mode*/ 4 && r !== (r = /*mode*/ y[2] === "image" ? "capture photo" : "start recording")) && Re(t, "aria-label", r), /*recording*/ - y[11] ? g && (Ia(), rt(g, 1, 1, () => { + y[11] ? g && (Ga(), dt(g, 1, 1, () => { g = null; - }), La()) : g ? (g.p(y, v), v[0] & /*recording*/ - 2048 && We(g, 1)) : (g = I_(y), g.c(), We(g, 1), g.m(e, null)), /*options_open*/ + }), Ua()) : g ? (g.p(y, v), v[0] & /*recording*/ + 2048 && Qe(g, 1)) : (g = K_(y), g.c(), Qe(g, 1), g.m(e, null)), /*options_open*/ y[13] && /*selected_device*/ y[8] ? p ? (p.p(y, v), v[0] & /*options_open, selected_device*/ - 8448 && We(p, 1)) : (p = k_(y), p.c(), We(p, 1), p.m(u.parentNode, u)) : p && (Ia(), rt(p, 1, 1, () => { + 8448 && Qe(p, 1)) : (p = j_(y), p.c(), Qe(p, 1), p.m(u.parentNode, u)) : p && (Ga(), dt(p, 1, 1, () => { p = null; - }), La()); + }), Ua()); }, i(y) { - l || (We(s), We(g), We(p), l = !0); + l || (Qe(s), Qe(g), Qe(p), l = !0); }, o(y) { - rt(s), rt(g), rt(p), l = !1; + dt(s), dt(g), dt(p), l = !1; }, d(y) { - y && (be(e), be(o), be(u)), f[i].d(), g && g.d(), p && p.d(y), c = !1, h(); + y && (Se(e), Se(o), Se(u)), f[i].d(), g && g.d(), p && p.d(y), c = !1, h(); } }; } -function X$(n) { +function TB(n) { let e, t, i, s; - return t = new C$({}), t.$on( + return t = new sB({}), t.$on( "click", /*click_handler*/ n[27] ), { c() { - e = ot("div"), is(t.$$.fragment), this.h(); + e = mt("div"), ls(t.$$.fragment), this.h(); }, l(r) { - e = at(r, "DIV", { title: !0, style: !0 }); - var a = ht(e); - ts(t.$$.fragment, a), a.forEach(be), this.h(); + e = ft(r, "DIV", { title: !0, style: !0 }); + var a = _t(e); + os(t.$$.fragment, a), a.forEach(Se), this.h(); }, h() { - Re(e, "title", "grant webcam access"), s1(e, "height", "100%"); + Re(e, "title", "grant webcam access"), E1(e, "height", "100%"); }, m(r, a) { - xt(r, e, a), ss(t, e, null), s = !0; + Rt(r, e, a), cs(t, e, null), s = !0; }, - p: $f, + p: im, i(r) { - s || (We(t.$$.fragment, r), r && (i || B$(() => { - i = U$(e, Ax, { delay: 100, duration: 200 }), i.start(); + s || (Qe(t.$$.fragment, r), r && (i || cB(() => { + i = dB(e, zx, { delay: 100, duration: 200 }), i.start(); })), s = !0); }, o(r) { - rt(t.$$.fragment, r), s = !1; + dt(t.$$.fragment, r), s = !1; }, d(r) { - r && be(e), ns(t); + r && Se(e), us(t); } }; } -function Q$(n) { +function SB(n) { let e, t, i; - return t = new DT({}), { + return t = new HT({}), { c() { - e = ot("div"), is(t.$$.fragment), this.h(); + e = mt("div"), ls(t.$$.fragment), this.h(); }, l(s) { - e = at(s, "DIV", { class: !0, title: !0 }); - var r = ht(e); - ts(t.$$.fragment, r), r.forEach(be), this.h(); + e = ft(s, "DIV", { class: !0, title: !0 }); + var r = _t(e); + os(t.$$.fragment, r), r.forEach(Se), this.h(); }, h() { Re(e, "class", "icon svelte-1tdan5a"), Re(e, "title", "capture photo"); }, m(s, r) { - xt(s, e, r), ss(t, e, null), i = !0; + Rt(s, e, r), cs(t, e, null), i = !0; }, - p: $f, + p: im, i(s) { - i || (We(t.$$.fragment, s), i = !0); + i || (Qe(t.$$.fragment, s), i = !0); }, o(s) { - rt(t.$$.fragment, s), i = !1; + dt(t.$$.fragment, s), i = !1; }, d(s) { - s && be(e), ns(t); + s && Se(e), us(t); } }; } -function Z$(n) { +function AB(n) { let e, t, i, s; - const r = [tB, eB, J$], a = []; + const r = [wB, DB, xB], a = []; function o(u, l) { return ( /*streaming*/ @@ -40404,216 +40815,216 @@ function Z$(n) { } return e = o(n), t = a[e] = r[e](n), { c() { - t.c(), i = Or(); + t.c(), i = Hr(); }, l(u) { - t.l(u), i = Or(); + t.l(u), i = Hr(); }, m(u, l) { - a[e].m(u, l), xt(u, i, l), s = !0; + a[e].m(u, l), Rt(u, i, l), s = !0; }, p(u, l) { let c = e; - e = o(u), e === c ? a[e].p(u, l) : (Ia(), rt(a[c], 1, 1, () => { + e = o(u), e === c ? a[e].p(u, l) : (Ga(), dt(a[c], 1, 1, () => { a[c] = null; - }), La(), t = a[e], t ? t.p(u, l) : (t = a[e] = r[e](u), t.c()), We(t, 1), t.m(i.parentNode, i)); + }), Ua(), t = a[e], t ? t.p(u, l) : (t = a[e] = r[e](u), t.c()), Qe(t, 1), t.m(i.parentNode, i)); }, i(u) { - s || (We(t), s = !0); + s || (Qe(t), s = !0); }, o(u) { - rt(t), s = !1; + dt(t), s = !1; }, d(u) { - u && be(i), a[e].d(u); + u && Se(i), a[e].d(u); } }; } -function J$(n) { +function xB(n) { let e, t, i, s, r = ( /*i18n*/ n[4]("audio.record") + "" ), a, o; - return i = new FT({}), { + return i = new YT({}), { c() { - e = ot("div"), t = ot("div"), is(i.$$.fragment), s = an(), a = oo(r), this.h(); + e = mt("div"), t = mt("div"), ls(i.$$.fragment), s = un(), a = Do(r), this.h(); }, l(u) { - e = at(u, "DIV", { class: !0 }); - var l = ht(e); - t = at(l, "DIV", { class: !0, title: !0 }); - var c = ht(t); - ts(i.$$.fragment, c), c.forEach(be), s = rn(l), a = ro(l, r), l.forEach(be), this.h(); + e = ft(u, "DIV", { class: !0 }); + var l = _t(e); + t = ft(l, "DIV", { class: !0, title: !0 }); + var c = _t(t); + os(i.$$.fragment, c), c.forEach(Se), s = ln(l), a = Ao(l, r), l.forEach(Se), this.h(); }, h() { Re(t, "class", "icon color-primary svelte-1tdan5a"), Re(t, "title", "start recording"), Re(e, "class", "icon-with-text svelte-1tdan5a"); }, m(u, l) { - xt(u, e, l), qe(e, t), ss(i, t, null), qe(e, s), qe(e, a), o = !0; + Rt(u, e, l), We(e, t), cs(i, t, null), We(e, s), We(e, a), o = !0; }, p(u, l) { (!o || l[0] & /*i18n*/ 16) && r !== (r = /*i18n*/ - u[4]("audio.record") + "") && ao(a, r); + u[4]("audio.record") + "") && xo(a, r); }, i(u) { - o || (We(i.$$.fragment, u), o = !0); + o || (Qe(i.$$.fragment, u), o = !0); }, o(u) { - rt(i.$$.fragment, u), o = !1; + dt(i.$$.fragment, u), o = !1; }, d(u) { - u && be(e), ns(i); + u && Se(e), us(i); } }; } -function eB(n) { +function DB(n) { let e, t, i, s, r = ( /*i18n*/ n[4]("audio.stop") + "" ), a, o; - return i = new sA({}), { + return i = new fA({}), { c() { - e = ot("div"), t = ot("div"), is(i.$$.fragment), s = an(), a = oo(r), this.h(); + e = mt("div"), t = mt("div"), ls(i.$$.fragment), s = un(), a = Do(r), this.h(); }, l(u) { - e = at(u, "DIV", { class: !0 }); - var l = ht(e); - t = at(l, "DIV", { class: !0, title: !0 }); - var c = ht(t); - ts(i.$$.fragment, c), c.forEach(be), s = rn(l), a = ro(l, r), l.forEach(be), this.h(); + e = ft(u, "DIV", { class: !0 }); + var l = _t(e); + t = ft(l, "DIV", { class: !0, title: !0 }); + var c = _t(t); + os(i.$$.fragment, c), c.forEach(Se), s = ln(l), a = Ao(l, r), l.forEach(Se), this.h(); }, h() { Re(t, "class", "icon color-primary svelte-1tdan5a"), Re(t, "title", "stop recording"), Re(e, "class", "icon-with-text svelte-1tdan5a"); }, m(u, l) { - xt(u, e, l), qe(e, t), ss(i, t, null), qe(e, s), qe(e, a), o = !0; + Rt(u, e, l), We(e, t), cs(i, t, null), We(e, s), We(e, a), o = !0; }, p(u, l) { (!o || l[0] & /*i18n*/ 16) && r !== (r = /*i18n*/ - u[4]("audio.stop") + "") && ao(a, r); + u[4]("audio.stop") + "") && xo(a, r); }, i(u) { - o || (We(i.$$.fragment, u), o = !0); + o || (Qe(i.$$.fragment, u), o = !0); }, o(u) { - rt(i.$$.fragment, u), o = !1; + dt(i.$$.fragment, u), o = !1; }, d(u) { - u && be(e), ns(i); + u && Se(e), us(i); } }; } -function tB(n) { +function wB(n) { let e, t, i, s, r = ( /*i18n*/ n[4]("audio.waiting") + "" ), a, o; - return i = new $A({}), { + return i = new ax({}), { c() { - e = ot("div"), t = ot("div"), is(i.$$.fragment), s = an(), a = oo(r), this.h(); + e = mt("div"), t = mt("div"), ls(i.$$.fragment), s = un(), a = Do(r), this.h(); }, l(u) { - e = at(u, "DIV", { class: !0, style: !0 }); - var l = ht(e); - t = at(l, "DIV", { class: !0, title: !0 }); - var c = ht(t); - ts(i.$$.fragment, c), c.forEach(be), s = rn(l), a = ro(l, r), l.forEach(be), this.h(); + e = ft(u, "DIV", { class: !0, style: !0 }); + var l = _t(e); + t = ft(l, "DIV", { class: !0, title: !0 }); + var c = _t(t); + os(i.$$.fragment, c), c.forEach(Se), s = ln(l), a = Ao(l, r), l.forEach(Se), this.h(); }, h() { - Re(t, "class", "icon color-primary svelte-1tdan5a"), Re(t, "title", "spinner"), Re(e, "class", "icon-with-text svelte-1tdan5a"), s1(e, "width", "var(--size-24)"); + Re(t, "class", "icon color-primary svelte-1tdan5a"), Re(t, "title", "spinner"), Re(e, "class", "icon-with-text svelte-1tdan5a"), E1(e, "width", "var(--size-24)"); }, m(u, l) { - xt(u, e, l), qe(e, t), ss(i, t, null), qe(e, s), qe(e, a), o = !0; + Rt(u, e, l), We(e, t), cs(i, t, null), We(e, s), We(e, a), o = !0; }, p(u, l) { (!o || l[0] & /*i18n*/ 16) && r !== (r = /*i18n*/ - u[4]("audio.waiting") + "") && ao(a, r); + u[4]("audio.waiting") + "") && xo(a, r); }, i(u) { - o || (We(i.$$.fragment, u), o = !0); + o || (Qe(i.$$.fragment, u), o = !0); }, o(u) { - rt(i.$$.fragment, u), o = !1; + dt(i.$$.fragment, u), o = !1; }, d(u) { - u && be(e), ns(i); + u && Se(e), us(i); } }; } -function I_(n) { +function K_(n) { let e, t, i, s, r; - return t = new lv({}), { + return t = new Av({}), { c() { - e = ot("button"), is(t.$$.fragment), this.h(); + e = mt("button"), ls(t.$$.fragment), this.h(); }, l(a) { - e = at(a, "BUTTON", { class: !0, "aria-label": !0 }); - var o = ht(e); - ts(t.$$.fragment, o), o.forEach(be), this.h(); + e = ft(a, "BUTTON", { class: !0, "aria-label": !0 }); + var o = _t(e); + os(t.$$.fragment, o), o.forEach(Se), this.h(); }, h() { Re(e, "class", "icon svelte-1tdan5a"), Re(e, "aria-label", "select input source"); }, m(a, o) { - xt(a, e, o), ss(t, e, null), i = !0, s || (r = Jl( + Rt(a, e, o), cs(t, e, null), i = !0, s || (r = _u( e, "click", /*click_handler_2*/ n[29] ), s = !0); }, - p: $f, + p: im, i(a) { - i || (We(t.$$.fragment, a), i = !0); + i || (Qe(t.$$.fragment, a), i = !0); }, o(a) { - rt(t.$$.fragment, a), i = !1; + dt(t.$$.fragment, a), i = !1; }, d(a) { - a && be(e), ns(t), s = !1, r(); + a && Se(e), us(t), s = !1, r(); } }; } -function k_(n) { +function j_(n) { let e, t, i, s, r, a, o; - i = new lv({}); + i = new Av({}); function u(h, d) { return ( /*available_video_devices*/ - h[7].length === 0 ? nB : iB + h[7].length === 0 ? IB : LB ); } let l = u(n), c = l(n); return { c() { - e = ot("select"), t = ot("button"), is(i.$$.fragment), s = an(), c.c(), this.h(); + e = mt("select"), t = mt("button"), ls(i.$$.fragment), s = un(), c.c(), this.h(); }, l(h) { - e = at(h, "SELECT", { class: !0, "aria-label": !0 }); - var d = ht(e); - t = at(d, "BUTTON", { class: !0 }); - var f = ht(t); - ts(i.$$.fragment, f), s = rn(f), f.forEach(be), c.l(d), d.forEach(be), this.h(); + e = ft(h, "SELECT", { class: !0, "aria-label": !0 }); + var d = _t(e); + t = ft(d, "BUTTON", { class: !0 }); + var f = _t(t); + os(i.$$.fragment, f), s = ln(f), f.forEach(Se), c.l(d), d.forEach(Se), this.h(); }, h() { Re(t, "class", "inset-icon svelte-1tdan5a"), Re(e, "class", "select-wrap svelte-1tdan5a"), Re(e, "aria-label", "select source"); }, m(h, d) { - xt(h, e, d), qe(e, t), ss(i, t, null), qe(t, s), c.m(e, null), r = !0, a || (o = [ - Jl(t, "click", K$( + Rt(h, e, d), We(e, t), cs(i, t, null), We(t, s), c.m(e, null), r = !0, a || (o = [ + _u(t, "click", _B( /*click_handler_3*/ n[30] )), - $$(Bf.call( + uB(nm.call( null, e, /*handle_click_outside*/ n[17] )), - Jl( + _u( e, "change", /*handle_device_change*/ @@ -40625,50 +41036,50 @@ function k_(n) { l === (l = u(h)) && c ? c.p(h, d) : (c.d(1), c = l(h), c && (c.c(), c.m(e, null))); }, i(h) { - r || (We(i.$$.fragment, h), r = !0); + r || (Qe(i.$$.fragment, h), r = !0); }, o(h) { - rt(i.$$.fragment, h), r = !1; + dt(i.$$.fragment, h), r = !1; }, d(h) { - h && be(e), ns(i), c.d(), a = !1, V$(o); + h && Se(e), us(i), c.d(), a = !1, gB(o); } }; } -function iB(n) { - let e, t = D_( +function LB(n) { + let e, t = H_( /*available_video_devices*/ n[7] ), i = []; for (let s = 0; s < t.length; s += 1) - i[s] = R_(L_(n, t, s)); + i[s] = z_(q_(n, t, s)); return { c() { for (let s = 0; s < i.length; s += 1) i[s].c(); - e = Or(); + e = Hr(); }, l(s) { for (let r = 0; r < i.length; r += 1) i[r].l(s); - e = Or(); + e = Hr(); }, m(s, r) { for (let a = 0; a < i.length; a += 1) i[a] && i[a].m(s, r); - xt(s, e, r); + Rt(s, e, r); }, p(s, r) { if (r[0] & /*available_video_devices, selected_device*/ 384) { - t = D_( + t = H_( /*available_video_devices*/ s[7] ); let a; for (a = 0; a < t.length; a += 1) { - const o = L_(s, t, a); - i[a] ? i[a].p(o, r) : (i[a] = R_(o), i[a].c(), i[a].m(e.parentNode, e)); + const o = q_(s, t, a); + i[a] ? i[a].p(o, r) : (i[a] = z_(o), i[a].c(), i[a].m(e.parentNode, e)); } for (; a < i.length; a += 1) i[a].d(1); @@ -40676,87 +41087,87 @@ function iB(n) { } }, d(s) { - s && be(e), G$(i, s); + s && Se(e), fB(i, s); } }; } -function nB(n) { +function IB(n) { let e, t = ( /*i18n*/ n[4]("common.no_devices") + "" ), i; return { c() { - e = ot("option"), i = oo(t), this.h(); + e = mt("option"), i = Do(t), this.h(); }, l(s) { - e = at(s, "OPTION", { class: !0 }); - var r = ht(e); - i = ro(r, t), r.forEach(be), this.h(); + e = ft(s, "OPTION", { class: !0 }); + var r = _t(e); + i = Ao(r, t), r.forEach(Se), this.h(); }, h() { - e.__value = "", $d(e, e.__value), Re(e, "class", "svelte-1tdan5a"); + e.__value = "", rf(e, e.__value), Re(e, "class", "svelte-1tdan5a"); }, m(s, r) { - xt(s, e, r), qe(e, i); + Rt(s, e, r), We(e, i); }, p(s, r) { r[0] & /*i18n*/ 16 && t !== (t = /*i18n*/ - s[4]("common.no_devices") + "") && ao(i, t); + s[4]("common.no_devices") + "") && xo(i, t); }, d(s) { - s && be(e); + s && Se(e); } }; } -function R_(n) { +function z_(n) { let e, t = ( /*device*/ n[40].label + "" ), i, s, r, a; return { c() { - e = ot("option"), i = oo(t), s = an(), this.h(); + e = mt("option"), i = Do(t), s = un(), this.h(); }, l(o) { - e = at(o, "OPTION", { class: !0 }); - var u = ht(e); - i = ro(u, t), s = rn(u), u.forEach(be), this.h(); + e = ft(o, "OPTION", { class: !0 }); + var u = _t(e); + i = Ao(u, t), s = ln(u), u.forEach(Se), this.h(); }, h() { e.__value = r = /*device*/ - n[40].deviceId, $d(e, e.__value), e.selected = a = /*selected_device*/ + n[40].deviceId, rf(e, e.__value), e.selected = a = /*selected_device*/ n[8].deviceId === /*device*/ n[40].deviceId, Re(e, "class", "svelte-1tdan5a"); }, m(o, u) { - xt(o, e, u), qe(e, i), qe(e, s); + Rt(o, e, u), We(e, i), We(e, s); }, p(o, u) { u[0] & /*available_video_devices*/ 128 && t !== (t = /*device*/ - o[40].label + "") && ao(i, t), u[0] & /*available_video_devices*/ + o[40].label + "") && xo(i, t), u[0] & /*available_video_devices*/ 128 && r !== (r = /*device*/ - o[40].deviceId) && (e.__value = r, $d(e, e.__value)), u[0] & /*selected_device, available_video_devices*/ + o[40].deviceId) && (e.__value = r, rf(e, e.__value)), u[0] & /*selected_device, available_video_devices*/ 384 && a !== (a = /*selected_device*/ o[8].deviceId === /*device*/ o[40].deviceId) && (e.selected = a); }, d(o) { - o && be(e); + o && Se(e); } }; } -function sB(n) { +function kB(n) { let e, t, i, s, r, a, o, u, l, c, h; - t = new OD({ + t = new sw({ props: { time_limit: ( /*time_limit*/ n[9] ) } }); - const d = [X$, Y$], f = []; + const d = [TB, bB], f = []; function m(g, p) { return ( /*webcam_accessed*/ @@ -40765,31 +41176,31 @@ function sB(n) { } return l = m(n), c = f[l] = d[l](n), { c() { - e = ot("div"), is(t.$$.fragment), i = an(), s = ot("video"), r = an(), a = ot("img"), u = an(), c.c(), this.h(); + e = mt("div"), ls(t.$$.fragment), i = un(), s = mt("video"), r = un(), a = mt("img"), u = un(), c.c(), this.h(); }, l(g) { - e = at(g, "DIV", { class: !0 }); - var p = ht(e); - ts(t.$$.fragment, p), i = rn(p), s = at(p, "VIDEO", { class: !0 }), ht(s).forEach(be), r = rn(p), a = at(p, "IMG", { src: !0, class: !0 }), u = rn(p), c.l(p), p.forEach(be), this.h(); + e = ft(g, "DIV", { class: !0 }); + var p = _t(e); + os(t.$$.fragment, p), i = ln(p), s = ft(p, "VIDEO", { class: !0 }), _t(s).forEach(Se), r = ln(p), a = ft(p, "IMG", { src: !0, class: !0 }), u = ln(p), c.l(p), p.forEach(Se), this.h(); }, h() { var g; - Re(s, "class", "svelte-1tdan5a"), ir( + Re(s, "class", "svelte-1tdan5a"), mr( s, "flip", /*mirror_webcam*/ n[3] - ), ir(s, "hide", !/*webcam_accessed*/ + ), mr(s, "hide", !/*webcam_accessed*/ n[12] || /*webcam_accessed*/ n[12] && !!/*value*/ - n[0]), w_(a.src, o = /*value*/ - (g = n[0]) == null ? void 0 : g.url) || Re(a, "src", o), Re(a, "class", "svelte-1tdan5a"), ir(a, "hide", !/*webcam_accessed*/ + n[0]), V_(a.src, o = /*value*/ + (g = n[0]) == null ? void 0 : g.url) || Re(a, "src", o), Re(a, "class", "svelte-1tdan5a"), mr(a, "hide", !/*webcam_accessed*/ n[12] || /*webcam_accessed*/ n[12] && !/*value*/ n[0]), Re(e, "class", "wrap svelte-1tdan5a"); }, m(g, p) { - xt(g, e, p), ss(t, e, null), qe(e, i), qe(e, s), n[26](s), qe(e, r), qe(e, a), qe(e, u), f[l].m(e, null), h = !0; + Rt(g, e, p), cs(t, e, null), We(e, i), We(e, s), n[26](s), We(e, r), We(e, a), We(e, u), f[l].m(e, null), h = !0; }, p(g, p) { var _; @@ -40797,39 +41208,39 @@ function sB(n) { p[0] & /*time_limit*/ 512 && (y.time_limit = /*time_limit*/ g[9]), t.$set(y), (!h || p[0] & /*mirror_webcam*/ - 8) && ir( + 8) && mr( s, "flip", /*mirror_webcam*/ g[3] ), (!h || p[0] & /*webcam_accessed, value*/ - 4097) && ir(s, "hide", !/*webcam_accessed*/ + 4097) && mr(s, "hide", !/*webcam_accessed*/ g[12] || /*webcam_accessed*/ g[12] && !!/*value*/ g[0]), (!h || p[0] & /*value*/ - 1 && !w_(a.src, o = /*value*/ + 1 && !V_(a.src, o = /*value*/ (_ = g[0]) == null ? void 0 : _.url)) && Re(a, "src", o), (!h || p[0] & /*webcam_accessed, value*/ - 4097) && ir(a, "hide", !/*webcam_accessed*/ + 4097) && mr(a, "hide", !/*webcam_accessed*/ g[12] || /*webcam_accessed*/ g[12] && !/*value*/ g[0]); let v = l; - l = m(g), l === v ? f[l].p(g, p) : (Ia(), rt(f[v], 1, 1, () => { + l = m(g), l === v ? f[l].p(g, p) : (Ga(), dt(f[v], 1, 1, () => { f[v] = null; - }), La(), c = f[l], c ? c.p(g, p) : (c = f[l] = d[l](g), c.c()), We(c, 1), c.m(e, null)); + }), Ua(), c = f[l], c ? c.p(g, p) : (c = f[l] = d[l](g), c.c()), Qe(c, 1), c.m(e, null)); }, i(g) { - h || (We(t.$$.fragment, g), We(c), h = !0); + h || (Qe(t.$$.fragment, g), Qe(c), h = !0); }, o(g) { - rt(t.$$.fragment, g), rt(c), h = !1; + dt(t.$$.fragment, g), dt(c), h = !1; }, d(g) { - g && be(e), ns(t), n[26](null), f[l].d(); + g && Se(e), us(t), n[26](null), f[l].d(); } }; } -function Bf(n, e) { +function nm(n, e) { const t = (i) => { n && !n.contains(i.target) && !i.defaultPrevented && e(i); }; @@ -40839,43 +41250,43 @@ function Bf(n, e) { } }; } -function rB(n, e, t) { - var i = this && this.__awaiter || function(B, N, G, Y) { - function ee(se) { - return se instanceof G ? se : new G(function(ye) { - ye(se); +function RB(n, e, t) { + var i = this && this.__awaiter || function(N, ee, G, Z) { + function U(re) { + return re instanceof G ? re : new G(function(j) { + j(re); }); } - return new (G || (G = Promise))(function(se, ye) { - function Pe(ae) { + return new (G || (G = Promise))(function(re, j) { + function Ee(se) { try { - jt(Y.next(ae)); - } catch (he) { - ye(he); + je(Z.next(se)); + } catch (ve) { + j(ve); } } - function Ke(ae) { + function Oe(se) { try { - jt(Y.throw(ae)); - } catch (he) { - ye(he); + je(Z.throw(se)); + } catch (ve) { + j(ve); } } - function jt(ae) { - ae.done ? se(ae.value) : ee(ae.value).then(Pe, Ke); + function je(se) { + se.done ? re(se.value) : U(se.value).then(Ee, Oe); } - jt((Y = Y.apply(B, N || [])).next()); + je((Z = Z.apply(N, ee || [])).next()); }); }; let s, r = [], a = null, o = null, u = "closed"; - const l = (B) => { - B === "closed" ? (t(9, o = null), t(10, u = "closed"), t(0, A = null)) : B === "waiting" ? t(10, u = "waiting") : t(10, u = "open"); - }, c = (B) => { - I && t(9, o = B); + const l = (N) => { + N === "closed" ? (t(9, o = null), t(10, u = "closed"), t(0, x = null)) : N === "waiting" ? t(10, u = "waiting") : t(10, u = "open"); + }, c = (N) => { + I && t(9, o = N); }; - let h, { streaming: d = !1 } = e, { pending: f = !1 } = e, { root: m = "" } = e, { stream_every: g = 1 } = e, { mode: p = "image" } = e, { mirror_webcam: y } = e, { include_audio: v } = e, { webcam_constraints: _ = null } = e, { i18n: E } = e, { upload: T } = e, { value: A = null } = e; - const S = j$(); - W$(() => { + let h, { streaming: d = !1 } = e, { pending: f = !1 } = e, { root: m = "" } = e, { stream_every: g = 1 } = e, { mode: p = "image" } = e, { mirror_webcam: y } = e, { include_audio: v } = e, { webcam_constraints: _ = null } = e, { i18n: E } = e, { upload: T } = e, { value: x = null } = e; + const S = vB(); + EB(() => { h = document.createElement("canvas"), d && p === "image" && window.setInterval( () => { s && !f && w(); @@ -40883,129 +41294,129 @@ function rB(n, e, t) { g * 1e3 ); }); - const D = (B) => i(void 0, void 0, void 0, function* () { - const G = B.target.value; - yield x_(v, s, _, G).then((Y) => i(void 0, void 0, void 0, function* () { - M = Y, t(8, a = r.find((ee) => ee.deviceId === G) || null), t(13, j = !1); + const D = (N) => i(void 0, void 0, void 0, function* () { + const G = N.target.value; + yield G_(v, s, _, G).then((Z) => i(void 0, void 0, void 0, function* () { + k = Z, t(8, a = r.find((U) => U.deviceId === G) || null), t(13, z = !1); })); }); - function x() { + function A() { return i(this, void 0, void 0, function* () { try { - x_(v, s, _).then((B) => i(this, void 0, void 0, function* () { - t(12, W = !0), t(7, r = yield F$()), M = B; - })).then(() => O$(r)).then((B) => { - t(7, r = B); - const N = M.getTracks().map((G) => { - var Y; - return (Y = G.getSettings()) === null || Y === void 0 ? void 0 : Y.deviceId; + G_(v, s, _).then((N) => i(this, void 0, void 0, function* () { + t(12, Y = !0), t(7, r = yield rB()), k = N; + })).then(() => oB(r)).then((N) => { + t(7, r = N); + const ee = k.getTracks().map((G) => { + var Z; + return (Z = G.getSettings()) === null || Z === void 0 ? void 0 : Z.deviceId; })[0]; - t(8, a = N && B.find((G) => G.deviceId === N) || r[0]); + t(8, a = ee && N.find((G) => G.deviceId === ee) || r[0]); }), (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) && S("error", E("image.no_webcam_support")); - } catch (B) { - if (B instanceof DOMException && B.name == "NotAllowedError") + } catch (N) { + if (N instanceof DOMException && N.name == "NotAllowedError") S("error", E("image.allow_webcam_access")); else - throw B; + throw N; } }); } function w() { - var B = h.getContext("2d"); + var N = h.getContext("2d"); if ((!d || d && I) && s.videoWidth && s.videoHeight) { - if (h.width = s.videoWidth, h.height = s.videoHeight, B.drawImage(s, 0, 0, s.videoWidth, s.videoHeight), y && (B.scale(-1, 1), B.drawImage(s, -s.videoWidth, 0)), d && (!I || u === "waiting")) + if (h.width = s.videoWidth, h.height = s.videoHeight, N.drawImage(s, 0, 0, s.videoWidth, s.videoHeight), y && (N.scale(-1, 1), N.drawImage(s, -s.videoWidth, 0)), d && (!I || u === "waiting")) return; if (d) { - const N = h.toDataURL("image/jpeg"); - S("stream", N); + const ee = h.toDataURL("image/jpeg"); + S("stream", ee); return; } h.toBlob( - (N) => { - S(d ? "stream" : "capture", N); + (ee) => { + S(d ? "stream" : "capture", ee); }, `image/${d ? "jpeg" : "png"}`, 0.8 ); } } - let I = !1, R = [], M, P, K; - function q() { + let I = !1, M = [], k, q, K; + function H() { if (I) { K.stop(); - let B = new Blob(R, { type: P }), N = new FileReader(); - N.onload = function(G) { + let N = new Blob(M, { type: q }), ee = new FileReader(); + ee.onload = function(G) { return i(this, void 0, void 0, function* () { - var Y; + var Z; if (G.target) { - let ee = new File([B], "sample." + P.substring(6)); - const se = yield If([ee]); - let ye = ((Y = yield T(se, m)) === null || Y === void 0 ? void 0 : Y.filter(Boolean))[0]; - S("capture", ye), S("stop_recording"); + let U = new File([N], "sample." + q.substring(6)); + const re = yield Xf([U]); + let j = ((Z = yield T(re, m)) === null || Z === void 0 ? void 0 : Z.filter(Boolean))[0]; + S("capture", j), S("stop_recording"); } }); - }, N.readAsDataURL(B); + }, ee.readAsDataURL(N); } else if (typeof MediaRecorder < "u") { - S("start_recording"), R = []; - let B = ["video/webm", "video/mp4"]; - for (let N of B) - if (MediaRecorder.isTypeSupported(N)) { - P = N; + S("start_recording"), M = []; + let N = ["video/webm", "video/mp4"]; + for (let ee of N) + if (MediaRecorder.isTypeSupported(ee)) { + q = ee; break; } - if (P === null) { + if (q === null) { console.error("No supported MediaRecorder mimeType"); return; } - K = new MediaRecorder(M, { mimeType: P }), K.addEventListener("dataavailable", function(N) { - R.push(N.data); + K = new MediaRecorder(k, { mimeType: q }), K.addEventListener("dataavailable", function(ee) { + M.push(ee.data); }), K.start(200); } t(11, I = !I); } - let W = !1; - function U({ destroy: B } = {}) { - p === "image" && d && t(11, I = !I), B || (p === "image" ? w() : q()), !I && M && (S("close_stream"), M.getTracks().forEach((N) => N.stop()), t(6, s.srcObject = null, s), t(12, W = !1), window.setTimeout( + let Y = !1; + function B({ destroy: N } = {}) { + p === "image" && d && t(11, I = !I), N || (p === "image" ? w() : H()), !I && k && (S("close_stream"), k.getTracks().forEach((ee) => ee.stop()), t(6, s.srcObject = null, s), t(12, Y = !1), window.setTimeout( () => { - t(0, A = null); + t(0, x = null); }, 500 - ), t(0, A = null)); + ), t(0, x = null)); } - let j = !1; - function $(B) { - B.preventDefault(), B.stopPropagation(), t(13, j = !1); + let z = !1; + function W(N) { + N.preventDefault(), N.stopPropagation(), t(13, z = !1); } - z$(() => { - typeof window > "u" || (U({ destroy: !0 }), M == null || M.getTracks().forEach((B) => B.stop())); + yB(() => { + typeof window > "u" || (B({ destroy: !0 }), k == null || k.getTracks().forEach((N) => N.stop())); }); - function L(B) { - N$[B ? "unshift" : "push"](() => { - s = B, t(6, s); + function L(N) { + hB[N ? "unshift" : "push"](() => { + s = N, t(6, s); }); } - const H = async () => x(), Q = () => U(), X = () => t(13, j = !0), C = () => t(13, j = !1); - return n.$$set = (B) => { - "streaming" in B && t(1, d = B.streaming), "pending" in B && t(20, f = B.pending), "root" in B && t(21, m = B.root), "stream_every" in B && t(22, g = B.stream_every), "mode" in B && t(2, p = B.mode), "mirror_webcam" in B && t(3, y = B.mirror_webcam), "include_audio" in B && t(23, v = B.include_audio), "webcam_constraints" in B && t(24, _ = B.webcam_constraints), "i18n" in B && t(4, E = B.i18n), "upload" in B && t(25, T = B.upload), "value" in B && t(0, A = B.value); + const $ = async () => A(), Q = () => B(), C = () => t(13, z = !0), O = () => t(13, z = !1); + return n.$$set = (N) => { + "streaming" in N && t(1, d = N.streaming), "pending" in N && t(20, f = N.pending), "root" in N && t(21, m = N.root), "stream_every" in N && t(22, g = N.stream_every), "mode" in N && t(2, p = N.mode), "mirror_webcam" in N && t(3, y = N.mirror_webcam), "include_audio" in N && t(23, v = N.include_audio), "webcam_constraints" in N && t(24, _ = N.webcam_constraints), "i18n" in N && t(4, E = N.i18n), "upload" in N && t(25, T = N.upload), "value" in N && t(0, x = N.value); }, [ - A, + x, d, p, y, E, - Bf, + nm, s, r, a, o, u, I, - W, - j, + Y, + z, D, - x, - U, - $, + A, + B, + W, l, c, f, @@ -41015,20 +41426,20 @@ function rB(n, e, t) { _, T, L, - H, + $, Q, - X, - C + C, + O ]; } -class aB extends M$ { +class CB extends lB { constructor(e) { - super(), H$( + super(), mB( this, e, - rB, - sB, - q$, + RB, + kB, + pB, { modify_stream: 18, set_time_limit: 19, @@ -41056,200 +41467,200 @@ class aB extends M$ { return this.$$.ctx[19]; } get click_outside() { - return Bf; + return nm; } } const { - SvelteComponent: vz, - add_flush_callback: yz, - append_hydration: Ez, - attr: bz, - bind: Tz, - binding_callbacks: Sz, - bubble: Az, - check_outros: xz, - children: Dz, - claim_component: wz, - claim_element: Lz, - claim_space: Iz, - create_component: kz, - create_slot: Rz, - destroy_component: Cz, - detach: Fz, - element: Pz, - empty: Oz, - get_all_dirty_from_scope: Mz, - get_slot_changes: $z, - group_outros: Bz, - init: Nz, - insert_hydration: Uz, - listen: Gz, - mount_component: Hz, - run_all: Vz, - safe_not_equal: qz, - set_style: Kz, - space: jz, - toggle_class: zz, - transition_in: Wz, - transition_out: Yz, - update_slot_base: Xz -} = window.__gradio__svelte__internal, { createEventDispatcher: Qz, tick: Zz } = window.__gradio__svelte__internal, { - SvelteComponent: Jz, - attr: eW, - check_outros: tW, - children: iW, - claim_component: nW, - claim_element: sW, - create_component: rW, - destroy_component: aW, - detach: oW, - element: lW, - group_outros: uW, - init: cW, - insert_hydration: hW, - mount_component: dW, - safe_not_equal: fW, - toggle_class: mW, - transition_in: gW, - transition_out: pW + SvelteComponent: Cz, + add_flush_callback: Fz, + append_hydration: Pz, + attr: Oz, + bind: Mz, + binding_callbacks: $z, + bubble: Bz, + check_outros: Nz, + children: Uz, + claim_component: Gz, + claim_element: Hz, + claim_space: Vz, + create_component: qz, + create_slot: Kz, + destroy_component: jz, + detach: zz, + element: Wz, + empty: Yz, + get_all_dirty_from_scope: Xz, + get_slot_changes: Qz, + group_outros: Zz, + init: Jz, + insert_hydration: eW, + listen: tW, + mount_component: iW, + run_all: nW, + safe_not_equal: sW, + set_style: rW, + space: aW, + toggle_class: oW, + transition_in: lW, + transition_out: uW, + update_slot_base: cW +} = window.__gradio__svelte__internal, { createEventDispatcher: hW, tick: dW } = window.__gradio__svelte__internal, { + SvelteComponent: fW, + attr: mW, + check_outros: gW, + children: pW, + claim_component: _W, + claim_element: vW, + create_component: yW, + destroy_component: EW, + detach: bW, + element: TW, + group_outros: SW, + init: AW, + insert_hydration: xW, + mount_component: DW, + safe_not_equal: wW, + toggle_class: LW, + transition_in: IW, + transition_out: kW } = window.__gradio__svelte__internal, { - SvelteComponent: _W, - add_flush_callback: vW, - assign: yW, - bind: EW, - binding_callbacks: bW, - check_outros: TW, - claim_component: SW, - claim_space: AW, - create_component: xW, - destroy_component: DW, - detach: wW, - empty: LW, - flush: IW, - get_spread_object: kW, - get_spread_update: RW, - group_outros: CW, - init: FW, - insert_hydration: PW, - mount_component: OW, - safe_not_equal: MW, - space: $W, - transition_in: BW, - transition_out: NW -} = window.__gradio__svelte__internal, { afterUpdate: UW } = window.__gradio__svelte__internal, { - SvelteComponent: oB, - add_flush_callback: Bd, - append_hydration: Nd, - attr: ja, - bind: Ud, - binding_callbacks: Gd, - bubble: Fh, - check_outros: Nf, - children: eu, - claim_component: za, - claim_element: tu, - claim_space: Hd, - claim_text: C_, - create_component: Wa, - create_slot: lB, - destroy_component: Ya, - detach: Ai, - element: iu, - empty: F_, - get_all_dirty_from_scope: uB, - get_slot_changes: cB, - group_outros: Uf, - init: hB, - insert_hydration: Ss, - mount_component: Xa, - noop: Vd, - safe_not_equal: r1, - set_data: P_, - space: qd, - text: O_, - transition_in: ii, - transition_out: ni, - update_slot_base: dB -} = window.__gradio__svelte__internal, { createEventDispatcher: fB } = window.__gradio__svelte__internal; -function mB(n) { + SvelteComponent: RW, + add_flush_callback: CW, + assign: FW, + bind: PW, + binding_callbacks: OW, + check_outros: MW, + claim_component: $W, + claim_space: BW, + create_component: NW, + destroy_component: UW, + detach: GW, + empty: HW, + flush: VW, + get_spread_object: qW, + get_spread_update: KW, + group_outros: jW, + init: zW, + insert_hydration: WW, + mount_component: YW, + safe_not_equal: XW, + space: QW, + transition_in: ZW, + transition_out: JW +} = window.__gradio__svelte__internal, { afterUpdate: eY } = window.__gradio__svelte__internal, { + SvelteComponent: FB, + add_flush_callback: af, + append_hydration: of, + attr: ao, + bind: lf, + binding_callbacks: uf, + bubble: ed, + check_outros: sm, + children: vu, + claim_component: oo, + claim_element: yu, + claim_space: cf, + claim_text: W_, + create_component: lo, + create_slot: PB, + destroy_component: uo, + detach: Pi, + element: Eu, + empty: Y_, + get_all_dirty_from_scope: OB, + get_slot_changes: MB, + group_outros: rm, + init: $B, + insert_hydration: Ps, + mount_component: co, + noop: hf, + safe_not_equal: b1, + set_data: X_, + space: df, + text: Q_, + transition_in: oi, + transition_out: li, + update_slot_base: BB +} = window.__gradio__svelte__internal, { createEventDispatcher: NB } = window.__gradio__svelte__internal; +function UB(n) { let e, t = ( /*value*/ (n[0].orig_name || /*value*/ n[0].url) + "" - ), i, s, r, a = up( + ), i, s, r, a = Dp( /*value*/ n[0].size ) + "", o; return { c() { - e = iu("div"), i = O_(t), s = qd(), r = iu("div"), o = O_(a), this.h(); + e = Eu("div"), i = Q_(t), s = df(), r = Eu("div"), o = Q_(a), this.h(); }, l(u) { - e = tu(u, "DIV", { class: !0 }); - var l = eu(e); - i = C_(l, t), l.forEach(Ai), s = Hd(u), r = tu(u, "DIV", { class: !0 }); - var c = eu(r); - o = C_(c, a), c.forEach(Ai), this.h(); + e = yu(u, "DIV", { class: !0 }); + var l = vu(e); + i = W_(l, t), l.forEach(Pi), s = cf(u), r = yu(u, "DIV", { class: !0 }); + var c = vu(r); + o = W_(c, a), c.forEach(Pi), this.h(); }, h() { - ja(e, "class", "file-name svelte-1kyjvp4"), ja(r, "class", "file-size svelte-1kyjvp4"); + ao(e, "class", "file-name svelte-1kyjvp4"), ao(r, "class", "file-size svelte-1kyjvp4"); }, m(u, l) { - Ss(u, e, l), Nd(e, i), Ss(u, s, l), Ss(u, r, l), Nd(r, o); + Ps(u, e, l), of(e, i), Ps(u, s, l), Ps(u, r, l), of(r, o); }, p(u, l) { l[0] & /*value*/ 1 && t !== (t = /*value*/ (u[0].orig_name || /*value*/ - u[0].url) + "") && P_(i, t), l[0] & /*value*/ - 1 && a !== (a = up( + u[0].url) + "") && X_(i, t), l[0] & /*value*/ + 1 && a !== (a = Dp( /*value*/ u[0].size - ) + "") && P_(o, a); + ) + "") && X_(o, a); }, - i: Vd, - o: Vd, + i: hf, + o: hf, d(u) { - u && (Ai(e), Ai(s), Ai(r)); + u && (Pi(e), Pi(s), Pi(r)); } }; } -function gB(n) { +function GB(n) { var r; let e = ( /*value*/ (r = n[0]) == null ? void 0 : r.url - ), t, i, s = M_(n); + ), t, i, s = Z_(n); return { c() { - s.c(), t = F_(); + s.c(), t = Y_(); }, l(a) { - s.l(a), t = F_(); + s.l(a), t = Y_(); }, m(a, o) { - s.m(a, o), Ss(a, t, o), i = !0; + s.m(a, o), Ps(a, t, o), i = !0; }, p(a, o) { var u; o[0] & /*value*/ - 1 && r1(e, e = /*value*/ - (u = a[0]) == null ? void 0 : u.url) ? (Uf(), ni(s, 1, 1, Vd), Nf(), s = M_(a), s.c(), ii(s, 1), s.m(t.parentNode, t)) : s.p(a, o); + 1 && b1(e, e = /*value*/ + (u = a[0]) == null ? void 0 : u.url) ? (rm(), li(s, 1, 1, hf), sm(), s = Z_(a), s.c(), oi(s, 1), s.m(t.parentNode, t)) : s.p(a, o); }, i(a) { - i || (ii(s), i = !0); + i || (oi(s), i = !0); }, o(a) { - ni(s), i = !1; + li(s), i = !1; }, d(a) { - a && Ai(t), s.d(a); + a && Pi(t), s.d(a); } }; } -function pB(n) { +function HB(n) { let e, t, i, s; - const r = [vB, _B], a = []; + const r = [qB, VB], a = []; function o(u, l) { return ( /*active_source*/ @@ -41261,40 +41672,40 @@ function pB(n) { } return ~(t = o(n)) && (i = a[t] = r[t](n)), { c() { - e = iu("div"), i && i.c(), this.h(); + e = Eu("div"), i && i.c(), this.h(); }, l(u) { - e = tu(u, "DIV", { class: !0 }); - var l = eu(e); - i && i.l(l), l.forEach(Ai), this.h(); + e = yu(u, "DIV", { class: !0 }); + var l = vu(e); + i && i.l(l), l.forEach(Pi), this.h(); }, h() { - ja(e, "class", "upload-container svelte-1kyjvp4"); + ao(e, "class", "upload-container svelte-1kyjvp4"); }, m(u, l) { - Ss(u, e, l), ~t && a[t].m(e, null), s = !0; + Ps(u, e, l), ~t && a[t].m(e, null), s = !0; }, p(u, l) { let c = t; - t = o(u), t === c ? ~t && a[t].p(u, l) : (i && (Uf(), ni(a[c], 1, 1, () => { + t = o(u), t === c ? ~t && a[t].p(u, l) : (i && (rm(), li(a[c], 1, 1, () => { a[c] = null; - }), Nf()), ~t ? (i = a[t], i ? i.p(u, l) : (i = a[t] = r[t](u), i.c()), ii(i, 1), i.m(e, null)) : i = null); + }), sm()), ~t ? (i = a[t], i ? i.p(u, l) : (i = a[t] = r[t](u), i.c()), oi(i, 1), i.m(e, null)) : i = null); }, i(u) { - s || (ii(i), s = !0); + s || (oi(i), s = !0); }, o(u) { - ni(i), s = !1; + li(i), s = !1; }, d(u) { - u && Ai(e), ~t && a[t].d(); + u && Pi(e), ~t && a[t].d(); } }; } -function M_(n) { +function Z_(n) { var i; let e, t; - return e = new Ff({ + return e = new em({ props: { upload: ( /*upload*/ @@ -41358,13 +41769,13 @@ function M_(n) { } }), { c() { - Wa(e.$$.fragment); + lo(e.$$.fragment); }, l(s) { - za(e.$$.fragment, s); + oo(e.$$.fragment, s); }, m(s, r) { - Xa(e, s, r), t = !0; + co(e, s, r), t = !0; }, p(s, r) { var o; @@ -41397,19 +41808,19 @@ function M_(n) { s[18]), e.$set(a); }, i(s) { - t || (ii(e.$$.fragment, s), t = !0); + t || (oi(e.$$.fragment, s), t = !0); }, o(s) { - ni(e.$$.fragment, s), t = !1; + li(e.$$.fragment, s), t = !1; }, d(s) { - Ya(e, s); + uo(e, s); } }; } -function _B(n) { +function VB(n) { let e, t; - return e = new aB({ + return e = new CB({ props: { root: ( /*root*/ @@ -41456,13 +41867,13 @@ function _B(n) { n[31] ), { c() { - Wa(e.$$.fragment); + lo(e.$$.fragment); }, l(i) { - za(e.$$.fragment, i); + oo(e.$$.fragment, i); }, m(i, s) { - Xa(e, i, s), t = !0; + co(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -41481,17 +41892,17 @@ function _B(n) { i[14]), e.$set(r); }, i(i) { - t || (ii(e.$$.fragment, i), t = !0); + t || (oi(e.$$.fragment, i), t = !0); }, o(i) { - ni(e.$$.fragment, i), t = !1; + li(e.$$.fragment, i), t = !1; }, d(i) { - Ya(e, i); + uo(e, i); } }; } -function vB(n) { +function qB(n) { let e, t, i, s; function r(u) { n[26](u); @@ -41521,7 +41932,7 @@ function vB(n) { /*i18n*/ n[11]("video.drop_to_upload") ), - $$slots: { default: [yB] }, + $$slots: { default: [KB] }, $$scope: { ctx: n } }; return ( @@ -41529,7 +41940,7 @@ function vB(n) { n[17] !== void 0 && (o.dragging = /*dragging*/ n[17]), /*uploading*/ n[2] !== void 0 && (o.uploading = /*uploading*/ - n[2]), e = new uM({ props: o }), Gd.push(() => Ud(e, "dragging", r)), Gd.push(() => Ud(e, "uploading", a)), e.$on( + n[2]), e = new CM({ props: o }), uf.push(() => lf(e, "dragging", r)), uf.push(() => lf(e, "uploading", a)), e.$on( "load", /*handle_load*/ n[20] @@ -41539,13 +41950,13 @@ function vB(n) { n[28] ), { c() { - Wa(e.$$.fragment); + lo(e.$$.fragment); }, l(u) { - za(e.$$.fragment, u); + oo(e.$$.fragment, u); }, m(u, l) { - Xa(e, u, l), s = !0; + co(e, u, l), s = !0; }, p(u, l) { const c = {}; @@ -41562,28 +41973,28 @@ function vB(n) { u[11]("video.drop_to_upload")), l[1] & /*$$scope*/ 4 && (c.$$scope = { dirty: l, ctx: u }), !t && l[0] & /*dragging*/ 131072 && (t = !0, c.dragging = /*dragging*/ - u[17], Bd(() => t = !1)), !i && l[0] & /*uploading*/ + u[17], af(() => t = !1)), !i && l[0] & /*uploading*/ 4 && (i = !0, c.uploading = /*uploading*/ - u[2], Bd(() => i = !1)), e.$set(c); + u[2], af(() => i = !1)), e.$set(c); }, i(u) { - s || (ii(e.$$.fragment, u), s = !0); + s || (oi(e.$$.fragment, u), s = !0); }, o(u) { - ni(e.$$.fragment, u), s = !1; + li(e.$$.fragment, u), s = !1; }, d(u) { - Ya(e, u); + uo(e, u); } } ); } -function yB(n) { +function KB(n) { let e; const t = ( /*#slots*/ n[25].default - ), i = lB( + ), i = PB( t, n, /*$$scope*/ @@ -41602,19 +42013,19 @@ function yB(n) { }, p(s, r) { i && i.p && (!e || r[1] & /*$$scope*/ - 4) && dB( + 4) && BB( i, t, s, /*$$scope*/ s[33], - e ? cB( + e ? MB( t, /*$$scope*/ s[33], r, null - ) : uB( + ) : OB( /*$$scope*/ s[33] ), @@ -41622,32 +42033,32 @@ function yB(n) { ); }, i(s) { - e || (ii(i, s), e = !0); + e || (oi(i, s), e = !0); }, o(s) { - ni(i, s), e = !1; + li(i, s), e = !1; }, d(s) { i && i.d(s); } }; } -function EB(n) { +function jB(n) { let e, t, i, s, r, a, o, u, l; - e = new Zd({ + e = new Ef({ props: { show_label: ( /*show_label*/ n[7] ), - Icon: au, + Icon: wu, label: ( /*label*/ n[5] || "Video" ) } }); - const c = [pB, gB, mB], h = []; + const c = [HB, GB, UB], h = []; function d(g, p) { var y; return ( @@ -41679,20 +42090,20 @@ function EB(n) { return ( /*active_source*/ n[1] !== void 0 && (m.active_source = /*active_source*/ - n[1]), o = new qA({ props: m }), Gd.push(() => Ud(o, "active_source", f)), { + n[1]), o = new fx({ props: m }), uf.push(() => lf(o, "active_source", f)), { c() { - Wa(e.$$.fragment), t = qd(), i = iu("div"), r && r.c(), a = qd(), Wa(o.$$.fragment), this.h(); + lo(e.$$.fragment), t = df(), i = Eu("div"), r && r.c(), a = df(), lo(o.$$.fragment), this.h(); }, l(g) { - za(e.$$.fragment, g), t = Hd(g), i = tu(g, "DIV", { "data-testid": !0, class: !0 }); - var p = eu(i); - r && r.l(p), a = Hd(p), za(o.$$.fragment, p), p.forEach(Ai), this.h(); + oo(e.$$.fragment, g), t = cf(g), i = yu(g, "DIV", { "data-testid": !0, class: !0 }); + var p = vu(i); + r && r.l(p), a = cf(p), oo(o.$$.fragment, p), p.forEach(Pi), this.h(); }, h() { - ja(i, "data-testid", "video"), ja(i, "class", "video-container svelte-1kyjvp4"); + ao(i, "data-testid", "video"), ao(i, "class", "video-container svelte-1kyjvp4"); }, m(g, p) { - Xa(e, g, p), Ss(g, t, p), Ss(g, i, p), ~s && h[s].m(i, null), Nd(i, a), Xa(o, i, null), l = !0; + co(e, g, p), Ps(g, t, p), Ps(g, i, p), ~s && h[s].m(i, null), of(i, a), co(o, i, null), l = !0; }, p(g, p) { const y = {}; @@ -41702,72 +42113,74 @@ function EB(n) { 32 && (y.label = /*label*/ g[5] || "Video"), e.$set(y); let v = s; - s = d(g), s === v ? ~s && h[s].p(g, p) : (r && (Uf(), ni(h[v], 1, 1, () => { + s = d(g), s === v ? ~s && h[s].p(g, p) : (r && (rm(), li(h[v], 1, 1, () => { h[v] = null; - }), Nf()), ~s ? (r = h[s], r ? r.p(g, p) : (r = h[s] = c[s](g), r.c()), ii(r, 1), r.m(i, a)) : r = null); + }), sm()), ~s ? (r = h[s], r ? r.p(g, p) : (r = h[s] = c[s](g), r.c()), oi(r, 1), r.m(i, a)) : r = null); const _ = {}; p[0] & /*sources*/ 16 && (_.sources = /*sources*/ g[4]), !u && p[0] & /*active_source*/ 2 && (u = !0, _.active_source = /*active_source*/ - g[1], Bd(() => u = !1)), o.$set(_); + g[1], af(() => u = !1)), o.$set(_); }, i(g) { - l || (ii(e.$$.fragment, g), ii(r), ii(o.$$.fragment, g), l = !0); + l || (oi(e.$$.fragment, g), oi(r), oi(o.$$.fragment, g), l = !0); }, o(g) { - ni(e.$$.fragment, g), ni(r), ni(o.$$.fragment, g), l = !1; + li(e.$$.fragment, g), li(r), li(o.$$.fragment, g), l = !1; }, d(g) { - g && (Ai(t), Ai(i)), Ya(e, g), ~s && h[s].d(), Ya(o); + g && (Pi(t), Pi(i)), uo(e, g), ~s && h[s].d(), uo(o); } } ); } -function bB(n, e, t) { - let { $$slots: i = {}, $$scope: s } = e, { value: r = null } = e, { subtitle: a = null } = e, { sources: o = ["webcam", "upload"] } = e, { label: u = void 0 } = e, { show_download_button: l = !1 } = e, { show_label: c = !0 } = e, { webcam_options: h } = e, { include_audio: d } = e, { autoplay: f } = e, { root: m } = e, { i18n: g } = e, { active_source: p = "webcam" } = e, { handle_reset_value: y = () => { - } } = e, { max_file_size: v = null } = e, { upload: _ } = e, { stream_handler: E } = e, { loop: T } = e, { uploading: A = !1 } = e, S = !1, D = !1; - const x = fB(); +function zB(n, e, t) { + let { $$slots: i = {}, $$scope: s } = e, { value: r = null } = e, { subtitle: a = null } = e, { sources: o = ["webcam", "upload"] } = e, { label: u = void 0 } = e, { show_download_button: l = !1 } = e, { show_label: c = !0 } = e, { webcam_options: h } = e, { include_audio: d } = e; + const f = void 0; + let { root: m } = e, { i18n: g } = e, { active_source: p = "webcam" } = e, { handle_reset_value: y = () => { + } } = e, { max_file_size: v = null } = e, { upload: _ } = e, { stream_handler: E } = e, { loop: T } = e, { uploading: x = !1 } = e, S = !1, D = !1; + const A = NB(); function w({ detail: L }) { - t(0, r = L), x("change", L), x("upload", L); + t(0, r = L), A("change", L), A("upload", L); } function I() { - t(0, r = null), x("change", null); + t(0, r = null), A("change", null); } - function R(L) { - t(18, S = !0), x("change", L); + function M(L) { + t(18, S = !0), A("change", L); } - function M({ detail: L }) { - x("change", L); + function k({ detail: L }) { + A("change", L); } - function P(L) { + function q(L) { D = L, t(17, D); } function K(L) { - A = L, t(2, A); + x = L, t(2, x); } - const q = ({ detail: L }) => x("error", L); - function W(L) { - Fh.call(this, n, L); + const H = ({ detail: L }) => A("error", L); + function Y(L) { + ed.call(this, n, L); } - function U(L) { - Fh.call(this, n, L); + function B(L) { + ed.call(this, n, L); } - function j(L) { - Fh.call(this, n, L); + function z(L) { + ed.call(this, n, L); } - function $(L) { + function W(L) { p = L, t(1, p); } return n.$$set = (L) => { - "value" in L && t(0, r = L.value), "subtitle" in L && t(3, a = L.subtitle), "sources" in L && t(4, o = L.sources), "label" in L && t(5, u = L.label), "show_download_button" in L && t(6, l = L.show_download_button), "show_label" in L && t(7, c = L.show_label), "webcam_options" in L && t(8, h = L.webcam_options), "include_audio" in L && t(9, d = L.include_audio), "autoplay" in L && t(24, f = L.autoplay), "root" in L && t(10, m = L.root), "i18n" in L && t(11, g = L.i18n), "active_source" in L && t(1, p = L.active_source), "handle_reset_value" in L && t(12, y = L.handle_reset_value), "max_file_size" in L && t(13, v = L.max_file_size), "upload" in L && t(14, _ = L.upload), "stream_handler" in L && t(15, E = L.stream_handler), "loop" in L && t(16, T = L.loop), "uploading" in L && t(2, A = L.uploading), "$$scope" in L && t(33, s = L.$$scope); + "value" in L && t(0, r = L.value), "subtitle" in L && t(3, a = L.subtitle), "sources" in L && t(4, o = L.sources), "label" in L && t(5, u = L.label), "show_download_button" in L && t(6, l = L.show_download_button), "show_label" in L && t(7, c = L.show_label), "webcam_options" in L && t(8, h = L.webcam_options), "include_audio" in L && t(9, d = L.include_audio), "root" in L && t(10, m = L.root), "i18n" in L && t(11, g = L.i18n), "active_source" in L && t(1, p = L.active_source), "handle_reset_value" in L && t(12, y = L.handle_reset_value), "max_file_size" in L && t(13, v = L.max_file_size), "upload" in L && t(14, _ = L.upload), "stream_handler" in L && t(15, E = L.stream_handler), "loop" in L && t(16, T = L.loop), "uploading" in L && t(2, x = L.uploading), "$$scope" in L && t(33, s = L.$$scope); }, n.$$.update = () => { n.$$.dirty[0] & /*dragging*/ - 131072 && x("drag", D); + 131072 && A("drag", D); }, [ r, p, - A, + x, a, o, u, @@ -41784,31 +42197,31 @@ function bB(n, e, t) { T, D, S, - x, + A, w, I, - R, M, + k, f, i, - P, - K, q, + K, + H, + Y, + B, + z, W, - U, - j, - $, s ]; } -class $_ extends oB { +class J_ extends FB { constructor(e) { - super(), hB( + super(), $B( this, e, - bB, - EB, - r1, + zB, + jB, + b1, { value: 0, subtitle: 3, @@ -41833,86 +42246,89 @@ class $_ extends oB { [-1, -1] ); } + get autoplay() { + return this.$$.ctx[24]; + } } const { - SvelteComponent: TB, - append_hydration: Ph, - attr: cr, - children: Oh, - claim_component: Mh, - claim_element: ka, - claim_space: B_, - create_component: $h, - destroy_component: Bh, - detach: gs, - element: Ra, - get_svelte_dataset: a1, - init: SB, - insert_hydration: nu, - mount_component: Nh, - noop: o1, - safe_not_equal: AB, - space: N_, - transition_in: Uh, - transition_out: Gh -} = window.__gradio__svelte__internal, { createEventDispatcher: xB } = window.__gradio__svelte__internal; -function DB(n) { + SvelteComponent: WB, + append_hydration: td, + attr: Tr, + children: id, + claim_component: nd, + claim_element: Ha, + claim_space: ev, + create_component: sd, + destroy_component: rd, + detach: Es, + element: Va, + get_svelte_dataset: T1, + init: YB, + insert_hydration: bu, + mount_component: ad, + noop: S1, + safe_not_equal: XB, + space: tv, + transition_in: od, + transition_out: ld +} = window.__gradio__svelte__internal, { createEventDispatcher: QB } = window.__gradio__svelte__internal; +function ZB(n) { let e, t = "Upload Video 1"; return { c() { - e = Ra("p"), e.textContent = t, this.h(); + e = Va("p"), e.textContent = t, this.h(); }, l(i) { - e = ka(i, "P", { class: !0, "data-svelte-h": !0 }), a1(e) !== "svelte-u1h0lb" && (e.textContent = t), this.h(); + e = Ha(i, "P", { class: !0, "data-svelte-h": !0 }), T1(e) !== "svelte-u1h0lb" && (e.textContent = t), this.h(); }, h() { - cr(e, "class", "upload-text"); + Tr(e, "class", "upload-text"); }, m(i, s) { - nu(i, e, s); + bu(i, e, s); }, - p: o1, + p: S1, d(i) { - i && gs(e); + i && Es(e); } }; } -function wB(n) { +function JB(n) { let e, t = "Upload Video 2"; return { c() { - e = Ra("p"), e.textContent = t, this.h(); + e = Va("p"), e.textContent = t, this.h(); }, l(i) { - e = ka(i, "P", { class: !0, "data-svelte-h": !0 }), a1(e) !== "svelte-1pqcvhk" && (e.textContent = t), this.h(); + e = Ha(i, "P", { class: !0, "data-svelte-h": !0 }), T1(e) !== "svelte-1pqcvhk" && (e.textContent = t), this.h(); }, h() { - cr(e, "class", "upload-text"); + Tr(e, "class", "upload-text"); }, m(i, s) { - nu(i, e, s); + bu(i, e, s); }, - p: o1, + p: S1, d(i) { - i && gs(e); + i && Es(e); } }; } -function LB(n) { +function eN(n) { let e, t, i, s, r, a, o, u, l; - return e = new Zd({ + return e = new Ef({ props: { show_label: ( /*show_label*/ n[2] ), - Icon: au, + Icon: wu, label: ( /*label*/ n[1] || "Video Slider" ) } - }), r = new $_({ + }), r = new J_({ props: { value: ( /*value*/ @@ -41954,14 +42370,14 @@ function LB(n) { n[9] ), include_audio: !0, - $$slots: { default: [DB] }, + $$slots: { default: [ZB] }, $$scope: { ctx: n } } }), r.$on( "change", /*change_handler*/ n[12] - ), u = new $_({ + ), u = new J_({ props: { value: ( /*value*/ @@ -42003,7 +42419,7 @@ function LB(n) { n[9] ), include_audio: !0, - $$slots: { default: [wB] }, + $$slots: { default: [JB] }, $$scope: { ctx: n } } }), u.$on( @@ -42012,22 +42428,22 @@ function LB(n) { n[13] ), { c() { - $h(e.$$.fragment), t = N_(), i = Ra("div"), s = Ra("div"), $h(r.$$.fragment), a = N_(), o = Ra("div"), $h(u.$$.fragment), this.h(); + sd(e.$$.fragment), t = tv(), i = Va("div"), s = Va("div"), sd(r.$$.fragment), a = tv(), o = Va("div"), sd(u.$$.fragment), this.h(); }, l(c) { - Mh(e.$$.fragment, c), t = B_(c), i = ka(c, "DIV", { class: !0, "data-testid": !0 }); - var h = Oh(i); - s = ka(h, "DIV", { class: !0 }); - var d = Oh(s); - Mh(r.$$.fragment, d), d.forEach(gs), a = B_(h), o = ka(h, "DIV", { class: !0 }); - var f = Oh(o); - Mh(u.$$.fragment, f), f.forEach(gs), h.forEach(gs), this.h(); + nd(e.$$.fragment, c), t = ev(c), i = Ha(c, "DIV", { class: !0, "data-testid": !0 }); + var h = id(i); + s = Ha(h, "DIV", { class: !0 }); + var d = id(s); + nd(r.$$.fragment, d), d.forEach(Es), a = ev(h), o = Ha(h, "DIV", { class: !0 }); + var f = id(o); + nd(u.$$.fragment, f), f.forEach(Es), h.forEach(Es), this.h(); }, h() { - cr(s, "class", "video-slot svelte-9k2sta"), cr(o, "class", "video-slot svelte-9k2sta"), cr(i, "class", "container svelte-9k2sta"), cr(i, "data-testid", "video-slider-input"); + Tr(s, "class", "video-slot svelte-9k2sta"), Tr(o, "class", "video-slot svelte-9k2sta"), Tr(i, "class", "container svelte-9k2sta"), Tr(i, "data-testid", "video-slider-input"); }, m(c, h) { - Nh(e, c, h), nu(c, t, h), nu(c, i, h), Ph(i, s), Nh(r, s, null), Ph(i, a), Ph(i, o), Nh(u, o, null), l = !0; + ad(e, c, h), bu(c, t, h), bu(c, i, h), td(i, s), ad(r, s, null), td(i, a), td(i, o), ad(u, o, null), l = !0; }, p(c, [h]) { const d = {}; @@ -42076,19 +42492,19 @@ function LB(n) { 32768 && (m.$$scope = { dirty: h, ctx: c }), u.$set(m); }, i(c) { - l || (Uh(e.$$.fragment, c), Uh(r.$$.fragment, c), Uh(u.$$.fragment, c), l = !0); + l || (od(e.$$.fragment, c), od(r.$$.fragment, c), od(u.$$.fragment, c), l = !0); }, o(c) { - Gh(e.$$.fragment, c), Gh(r.$$.fragment, c), Gh(u.$$.fragment, c), l = !1; + ld(e.$$.fragment, c), ld(r.$$.fragment, c), ld(u.$$.fragment, c), l = !1; }, d(c) { - c && (gs(t), gs(i)), Bh(e, c), Bh(r), Bh(u); + c && (Es(t), Es(i)), rd(e, c), rd(r), rd(u); } }; } -function IB(n, e, t) { +function tN(n, e, t) { let { value: i = [null, null] } = e, { label: s = void 0 } = e, { show_label: r } = e, { root: a } = e, { i18n: o } = e, { max_file_size: u = null } = e, { upload: l } = e, { stream_handler: c } = e, { autoplay: h } = e, { loop: d } = e; - const f = xB(), m = { mirror: !0, constraints: {} }; + const f = QB(), m = { mirror: !0, constraints: {} }; function g(v, _) { const E = [...i]; E[_] = v, t(0, i = E), i[0] === null && i[1] === null ? f("clear") : f("upload", E); @@ -42113,9 +42529,9 @@ function IB(n, e, t) { y ]; } -class kB extends TB { +class iN extends WB { constructor(e) { - super(), SB(this, e, IB, LB, AB, { + super(), YB(this, e, tN, eN, XB, { value: 0, label: 1, show_label: 2, @@ -42130,33 +42546,33 @@ class kB extends TB { } } const { - SvelteComponent: RB, - add_flush_callback: Gf, - assign: l1, - bind: Hf, - binding_callbacks: Vf, - check_outros: CB, - claim_component: Mr, - claim_space: u1, - create_component: $r, - destroy_component: Br, - detach: qf, - empty: U_, - flush: ze, - get_spread_object: c1, - get_spread_update: h1, - group_outros: FB, - init: PB, - insert_hydration: Kf, - mount_component: Nr, - safe_not_equal: OB, - space: d1, - transition_in: Jn, - transition_out: es -} = window.__gradio__svelte__internal; -function MB(n) { + SvelteComponent: nN, + add_flush_callback: Tu, + assign: A1, + bind: Su, + binding_callbacks: Au, + check_outros: sN, + claim_component: Vr, + claim_space: x1, + create_component: qr, + destroy_component: Kr, + detach: am, + empty: iv, + flush: qe, + get_spread_object: D1, + get_spread_update: w1, + group_outros: rN, + init: aN, + insert_hydration: om, + mount_component: jr, + safe_not_equal: oN, + space: L1, + transition_in: rs, + transition_out: as +} = window.__gradio__svelte__internal, { tick: lN } = window.__gradio__svelte__internal; +function uN(n) { let e, t; - return e = new z_({ + return e = new uv({ props: { visible: ( /*visible*/ @@ -42194,18 +42610,18 @@ function MB(n) { n[11] ), allow_overflow: !1, - $$slots: { default: [BB] }, + $$slots: { default: [hN] }, $$scope: { ctx: n } } }), { c() { - $r(e.$$.fragment); + qr(e.$$.fragment); }, l(i) { - Mr(e.$$.fragment, i); + Vr(e.$$.fragment, i); }, m(i, s) { - Nr(e, i, s), t = !0; + jr(e, i, s), t = !0; }, p(i, s) { const r = {}; @@ -42226,24 +42642,24 @@ function MB(n) { i[10]), s[0] & /*min_width*/ 2048 && (r.min_width = /*min_width*/ i[11]), s[0] & /*root, label, show_label, gradio, autoplay, loop, value, loading_status*/ - 462961 | s[1] & /*$$scope*/ - 4 && (r.$$scope = { dirty: s, ctx: i }), e.$set(r); + 1839217 | s[1] & /*$$scope*/ + 64 && (r.$$scope = { dirty: s, ctx: i }), e.$set(r); }, i(i) { - t || (Jn(e.$$.fragment, i), t = !0); + t || (rs(e.$$.fragment, i), t = !0); }, o(i) { - es(e.$$.fragment, i), t = !1; + as(e.$$.fragment, i), t = !1; }, d(i) { - Br(e, i); + Kr(e, i); } }; } -function $B(n) { +function cN(n) { let e, t, i; function s(a) { - n[27](a); + n[31](a); } let r = { visible: ( @@ -42251,6 +42667,7 @@ function $B(n) { n[3] ), variant: "solid", + border_mode: "base", padding: !1, elem_id: ( /*elem_id*/ @@ -42281,21 +42698,21 @@ function $B(n) { n[11] ), allow_overflow: !1, - $$slots: { default: [NB] }, + $$slots: { default: [dN] }, $$scope: { ctx: n } }; return ( /*fullscreen*/ - n[19] !== void 0 && (r.fullscreen = /*fullscreen*/ - n[19]), e = new z_({ props: r }), Vf.push(() => Hf(e, "fullscreen", s)), { + n[21] !== void 0 && (r.fullscreen = /*fullscreen*/ + n[21]), e = new uv({ props: r }), Au.push(() => Su(e, "fullscreen", s)), { c() { - $r(e.$$.fragment); + qr(e.$$.fragment); }, l(a) { - Mr(e.$$.fragment, a); + Vr(e.$$.fragment, a); }, m(a, o) { - Nr(e, a, o), i = !0; + jr(e, a, o), i = !0; }, p(a, o) { const u = {}; @@ -42315,47 +42732,47 @@ function $B(n) { 1024 && (u.scale = /*scale*/ a[10]), o[0] & /*min_width*/ 2048 && (u.min_width = /*min_width*/ - a[11]), o[0] & /*interactive, label, show_label, show_download_button, show_fullscreen_button, gradio, normalised_slider_position, autoplay, loop, value, fullscreen, loading_status*/ - 2093105 | o[1] & /*$$scope*/ - 4 && (u.$$scope = { dirty: o, ctx: a }), !t && o[0] & /*fullscreen*/ - 524288 && (t = !0, u.fullscreen = /*fullscreen*/ - a[19], Gf(() => t = !1)), e.$set(u); + a[11]), o[0] & /*interactive, fullscreen, label, show_label, show_download_button, show_fullscreen_button, show_mute_button, gradio, autoplay, loop, value, normalised_slider_position, loading_status*/ + 8253489 | o[1] & /*$$scope*/ + 64 && (u.$$scope = { dirty: o, ctx: a }), !t && o[0] & /*fullscreen*/ + 2097152 && (t = !0, u.fullscreen = /*fullscreen*/ + a[21], Tu(() => t = !1)), e.$set(u); }, i(a) { - i || (Jn(e.$$.fragment, a), i = !0); + i || (rs(e.$$.fragment, a), i = !0); }, o(a) { - es(e.$$.fragment, a), i = !1; + as(e.$$.fragment, a), i = !1; }, d(a) { - Br(e, a); + Kr(e, a); } } ); } -function BB(n) { +function hN(n) { var c; let e, t, i, s, r; const a = [ { autoscroll: ( /*gradio*/ - n[18].autoscroll + n[20].autoscroll ) }, { i18n: ( /*gradio*/ - n[18].i18n + n[20].i18n ) }, /*loading_status*/ n[12] ]; let o = {}; for (let h = 0; h < a.length; h += 1) - o = l1(o, a[h]); - e = new Iv({ props: o }); + o = A1(o, a[h]); + e = new Kv({ props: o }); function u(h) { - n[29](h); + n[33](h); } let l = { root: ( @@ -42372,72 +42789,72 @@ function BB(n) { ), max_file_size: ( /*gradio*/ - n[18].max_file_size + n[20].max_file_size ), i18n: ( /*gradio*/ - n[18].i18n + n[20].i18n ), upload: ( /*func_1*/ - n[28] + n[32] ), stream_handler: ( /*gradio*/ - (c = n[18].client) == null ? void 0 : c.stream + (c = n[20].client) == null ? void 0 : c.stream ), autoplay: ( /*autoplay*/ - n[16] + n[18] ), loop: ( /*loop*/ - n[17] + n[19] ) }; return ( /*value*/ n[0] !== void 0 && (l.value = /*value*/ - n[0]), i = new kB({ props: l }), Vf.push(() => Hf(i, "value", u)), i.$on( + n[0]), i = new iN({ props: l }), Au.push(() => Su(i, "value", u)), i.$on( "upload", /*upload_handler*/ - n[30] + n[34] ), i.$on( "clear", /*clear_handler_1*/ - n[31] + n[35] ), i.$on( "error", /*error_handler*/ - n[32] + n[36] ), { c() { - $r(e.$$.fragment), t = d1(), $r(i.$$.fragment); + qr(e.$$.fragment), t = L1(), qr(i.$$.fragment); }, l(h) { - Mr(e.$$.fragment, h), t = u1(h), Mr(i.$$.fragment, h); + Vr(e.$$.fragment, h), t = x1(h), Vr(i.$$.fragment, h); }, m(h, d) { - Nr(e, h, d), Kf(h, t, d), Nr(i, h, d), r = !0; + jr(e, h, d), om(h, t, d), jr(i, h, d), r = !0; }, p(h, d) { var g; const f = d[0] & /*gradio, loading_status*/ - 266240 ? h1(a, [ + 1052672 ? w1(a, [ d[0] & /*gradio*/ - 262144 && { + 1048576 && { autoscroll: ( /*gradio*/ - h[18].autoscroll + h[20].autoscroll ) }, d[0] & /*gradio*/ - 262144 && { i18n: ( + 1048576 && { i18n: ( /*gradio*/ - h[18].i18n + h[20].i18n ) }, d[0] & /*loading_status*/ - 4096 && c1( + 4096 && D1( /*loading_status*/ h[12] ) @@ -42451,61 +42868,68 @@ function BB(n) { h[4]), d[0] & /*show_label*/ 32 && (m.show_label = /*show_label*/ h[5]), d[0] & /*gradio*/ - 262144 && (m.max_file_size = /*gradio*/ - h[18].max_file_size), d[0] & /*gradio*/ - 262144 && (m.i18n = /*gradio*/ - h[18].i18n), d[0] & /*gradio*/ - 262144 && (m.upload = /*func_1*/ - h[28]), d[0] & /*gradio*/ - 262144 && (m.stream_handler = /*gradio*/ - (g = h[18].client) == null ? void 0 : g.stream), d[0] & /*autoplay*/ - 65536 && (m.autoplay = /*autoplay*/ - h[16]), d[0] & /*loop*/ - 131072 && (m.loop = /*loop*/ - h[17]), !s && d[0] & /*value*/ + 1048576 && (m.max_file_size = /*gradio*/ + h[20].max_file_size), d[0] & /*gradio*/ + 1048576 && (m.i18n = /*gradio*/ + h[20].i18n), d[0] & /*gradio*/ + 1048576 && (m.upload = /*func_1*/ + h[32]), d[0] & /*gradio*/ + 1048576 && (m.stream_handler = /*gradio*/ + (g = h[20].client) == null ? void 0 : g.stream), d[0] & /*autoplay*/ + 262144 && (m.autoplay = /*autoplay*/ + h[18]), d[0] & /*loop*/ + 524288 && (m.loop = /*loop*/ + h[19]), !s && d[0] & /*value*/ 1 && (s = !0, m.value = /*value*/ - h[0], Gf(() => s = !1)), i.$set(m); + h[0], Tu(() => s = !1)), i.$set(m); }, i(h) { - r || (Jn(e.$$.fragment, h), Jn(i.$$.fragment, h), r = !0); + r || (rs(e.$$.fragment, h), rs(i.$$.fragment, h), r = !0); }, o(h) { - es(e.$$.fragment, h), es(i.$$.fragment, h), r = !1; + as(e.$$.fragment, h), as(i.$$.fragment, h), r = !1; }, d(h) { - h && qf(t), Br(e, h), Br(i, h); + h && am(t), Kr(e, h), Kr(i, h); } } ); } -function NB(n) { - let e, t, i, s, r; - const a = [ +function dN(n) { + let e, t, i, s, r, a; + const o = [ { autoscroll: ( /*gradio*/ - n[18].autoscroll + n[20].autoscroll ) }, { i18n: ( /*gradio*/ - n[18].i18n + n[20].i18n ) }, /*loading_status*/ n[12] ]; - let o = {}; - for (let c = 0; c < a.length; c += 1) - o = l1(o, a[c]); - e = new Iv({ props: o }); - function u(c) { - n[24](c); + let u = {}; + for (let d = 0; d < o.length; d += 1) + u = A1(u, o[d]); + e = new Kv({ props: u }); + function l(d) { + n[27](d); } - let l = { + function c(d) { + n[28](d); + } + let h = { interactive: ( /*interactive*/ n[13] ), + fullscreen: ( + /*fullscreen*/ + n[21] + ), label: ( /*label*/ n[4] @@ -42522,167 +42946,177 @@ function NB(n) { /*show_fullscreen_button*/ n[15] ), + show_mute_button: ( + /*show_mute_button*/ + n[16] + ), i18n: ( /*gradio*/ - n[18].i18n - ), - position: ( - /*normalised_slider_position*/ - n[20] + n[20].i18n ), slider_color: "var(--border-color-primary)", autoplay: ( /*autoplay*/ - n[16] + n[18] ), loop: ( /*loop*/ - n[17] + n[19] ), upload: ( /*func*/ - n[23] + n[26] ) }; return ( /*value*/ - n[0] !== void 0 && (l.value = /*value*/ - n[0]), i = new h$({ props: l }), Vf.push(() => Hf(i, "value", u)), i.$on( + n[0] !== void 0 && (h.value = /*value*/ + n[0]), /*normalised_slider_position*/ + n[22] !== void 0 && (h.position = /*normalised_slider_position*/ + n[22]), i = new $$({ props: h }), Au.push(() => Su(i, "value", l)), Au.push(() => Su(i, "position", c)), i.$on( "clear", /*clear_handler*/ - n[25] + n[29] ), i.$on( "fullscreen", /*fullscreen_handler*/ - n[26] + n[30] ), { c() { - $r(e.$$.fragment), t = d1(), $r(i.$$.fragment); + qr(e.$$.fragment), t = L1(), qr(i.$$.fragment); }, - l(c) { - Mr(e.$$.fragment, c), t = u1(c), Mr(i.$$.fragment, c); + l(d) { + Vr(e.$$.fragment, d), t = x1(d), Vr(i.$$.fragment, d); }, - m(c, h) { - Nr(e, c, h), Kf(c, t, h), Nr(i, c, h), r = !0; + m(d, f) { + jr(e, d, f), om(d, t, f), jr(i, d, f), a = !0; }, - p(c, h) { - const d = h[0] & /*gradio, loading_status*/ - 266240 ? h1(a, [ - h[0] & /*gradio*/ - 262144 && { + p(d, f) { + const m = f[0] & /*gradio, loading_status*/ + 1052672 ? w1(o, [ + f[0] & /*gradio*/ + 1048576 && { autoscroll: ( /*gradio*/ - c[18].autoscroll + d[20].autoscroll ) }, - h[0] & /*gradio*/ - 262144 && { i18n: ( + f[0] & /*gradio*/ + 1048576 && { i18n: ( /*gradio*/ - c[18].i18n + d[20].i18n ) }, - h[0] & /*loading_status*/ - 4096 && c1( + f[0] & /*loading_status*/ + 4096 && D1( /*loading_status*/ - c[12] + d[12] ) ]) : {}; - e.$set(d); - const f = {}; - h[0] & /*interactive*/ - 8192 && (f.interactive = /*interactive*/ - c[13]), h[0] & /*label*/ - 16 && (f.label = /*label*/ - c[4]), h[0] & /*show_label*/ - 32 && (f.show_label = /*show_label*/ - c[5]), h[0] & /*show_download_button*/ - 16384 && (f.show_download_button = /*show_download_button*/ - c[14]), h[0] & /*show_fullscreen_button*/ - 32768 && (f.show_fullscreen_button = /*show_fullscreen_button*/ - c[15]), h[0] & /*gradio*/ - 262144 && (f.i18n = /*gradio*/ - c[18].i18n), h[0] & /*normalised_slider_position*/ - 1048576 && (f.position = /*normalised_slider_position*/ - c[20]), h[0] & /*autoplay*/ - 65536 && (f.autoplay = /*autoplay*/ - c[16]), h[0] & /*loop*/ - 131072 && (f.loop = /*loop*/ - c[17]), h[0] & /*gradio*/ - 262144 && (f.upload = /*func*/ - c[23]), !s && h[0] & /*value*/ - 1 && (s = !0, f.value = /*value*/ - c[0], Gf(() => s = !1)), i.$set(f); + e.$set(m); + const g = {}; + f[0] & /*interactive*/ + 8192 && (g.interactive = /*interactive*/ + d[13]), f[0] & /*fullscreen*/ + 2097152 && (g.fullscreen = /*fullscreen*/ + d[21]), f[0] & /*label*/ + 16 && (g.label = /*label*/ + d[4]), f[0] & /*show_label*/ + 32 && (g.show_label = /*show_label*/ + d[5]), f[0] & /*show_download_button*/ + 16384 && (g.show_download_button = /*show_download_button*/ + d[14]), f[0] & /*show_fullscreen_button*/ + 32768 && (g.show_fullscreen_button = /*show_fullscreen_button*/ + d[15]), f[0] & /*show_mute_button*/ + 65536 && (g.show_mute_button = /*show_mute_button*/ + d[16]), f[0] & /*gradio*/ + 1048576 && (g.i18n = /*gradio*/ + d[20].i18n), f[0] & /*autoplay*/ + 262144 && (g.autoplay = /*autoplay*/ + d[18]), f[0] & /*loop*/ + 524288 && (g.loop = /*loop*/ + d[19]), f[0] & /*gradio*/ + 1048576 && (g.upload = /*func*/ + d[26]), !s && f[0] & /*value*/ + 1 && (s = !0, g.value = /*value*/ + d[0], Tu(() => s = !1)), !r && f[0] & /*normalised_slider_position*/ + 4194304 && (r = !0, g.position = /*normalised_slider_position*/ + d[22], Tu(() => r = !1)), i.$set(g); }, - i(c) { - r || (Jn(e.$$.fragment, c), Jn(i.$$.fragment, c), r = !0); + i(d) { + a || (rs(e.$$.fragment, d), rs(i.$$.fragment, d), a = !0); }, - o(c) { - es(e.$$.fragment, c), es(i.$$.fragment, c), r = !1; + o(d) { + as(e.$$.fragment, d), as(i.$$.fragment, d), a = !1; }, - d(c) { - c && qf(t), Br(e, c), Br(i, c); + d(d) { + d && am(t), Kr(e, d), Kr(i, d); } } ); } -function UB(n) { +function fN(n) { let e, t, i, s; - const r = [$B, MB], a = []; + const r = [cN, uN], a = []; function o(u, l) { return ( - /*interactive*/ - u[13] ? 1 : 0 + /*video_mode*/ + u[17] == "preview" ? 0 : 1 ); } return e = o(n), t = a[e] = r[e](n), { c() { - t.c(), i = U_(); + t.c(), i = iv(); }, l(u) { - t.l(u), i = U_(); + t.l(u), i = iv(); }, m(u, l) { - a[e].m(u, l), Kf(u, i, l), s = !0; + a[e].m(u, l), om(u, i, l), s = !0; }, p(u, l) { let c = e; - e = o(u), e === c ? a[e].p(u, l) : (FB(), es(a[c], 1, 1, () => { + e = o(u), e === c ? a[e].p(u, l) : (rN(), as(a[c], 1, 1, () => { a[c] = null; - }), CB(), t = a[e], t ? t.p(u, l) : (t = a[e] = r[e](u), t.c()), Jn(t, 1), t.m(i.parentNode, i)); + }), sN(), t = a[e], t ? t.p(u, l) : (t = a[e] = r[e](u), t.c()), rs(t, 1), t.m(i.parentNode, i)); }, i(u) { - s || (Jn(t), s = !0); + s || (rs(t), s = !0); }, o(u) { - es(t), s = !1; + as(t), s = !1; }, d(u) { - u && qf(i), a[e].d(u); + u && am(i), a[e].d(u); } }; } -function GB(n, e, t) { - let i, { elem_id: s = "" } = e, { elem_classes: r = [] } = e, { visible: a = !0 } = e, { value: o = [null, null] } = e, { label: u } = e, { show_label: l } = e, { root: c } = e, { height: h } = e, { width: d } = e, { container: f = !0 } = e, { scale: m = null } = e, { min_width: g = void 0 } = e, { loading_status: p } = e, { interactive: y } = e, { show_download_button: v } = e, { show_fullscreen_button: _ } = e, { position: E } = e, { autoplay: T } = e, { loop: A } = e, { gradio: S } = e, D = !1, x = [null, null]; - const w = (...$) => S.client.upload(...$); - function I($) { - o = $, t(0, o); +function mN(n, e, t) { + let i, { elem_id: s = "" } = e, { elem_classes: r = [] } = e, { visible: a = !0 } = e, { value: o = [null, null] } = e, { label: u } = e, { show_label: l } = e, { root: c } = e, { height: h } = e, { width: d } = e, { container: f = !0 } = e, { scale: m = null } = e, { min_width: g = void 0 } = e, { loading_status: p } = e, { interactive: y } = e, { show_download_button: v } = e, { show_fullscreen_button: _ } = e, { show_mute_button: E } = e, { video_mode: T = "preview" } = e, { position: x } = e, { autoplay: S } = e, { loop: D } = e, { gradio: A } = e, w = !1, I = [null, null]; + function M(C) { + t(21, w = C), t(24, x = 50), lN().then(() => A.dispatch("change")); } - const R = () => S.dispatch("clear"), M = ({ detail: $ }) => { - t(19, D = $); - }; - function P($) { - D = $, t(19, D); + const k = (...C) => A.client.upload(...C); + function q(C) { + o = C, t(0, o); } - const K = (...$) => S.client.upload(...$); - function q($) { - o = $, t(0, o); + function K(C) { + i = C, t(22, i), t(24, x); } - const W = () => S.dispatch("upload"), U = () => S.dispatch("clear"), j = ({ detail: $ }) => S.dispatch("error", $); - return n.$$set = ($) => { - "elem_id" in $ && t(1, s = $.elem_id), "elem_classes" in $ && t(2, r = $.elem_classes), "visible" in $ && t(3, a = $.visible), "value" in $ && t(0, o = $.value), "label" in $ && t(4, u = $.label), "show_label" in $ && t(5, l = $.show_label), "root" in $ && t(6, c = $.root), "height" in $ && t(7, h = $.height), "width" in $ && t(8, d = $.width), "container" in $ && t(9, f = $.container), "scale" in $ && t(10, m = $.scale), "min_width" in $ && t(11, g = $.min_width), "loading_status" in $ && t(12, p = $.loading_status), "interactive" in $ && t(13, y = $.interactive), "show_download_button" in $ && t(14, v = $.show_download_button), "show_fullscreen_button" in $ && t(15, _ = $.show_fullscreen_button), "position" in $ && t(21, E = $.position), "autoplay" in $ && t(16, T = $.autoplay), "loop" in $ && t(17, A = $.loop), "gradio" in $ && t(18, S = $.gradio); + const H = () => A.dispatch("clear"), Y = ({ detail: C }) => M(C); + function B(C) { + w = C, t(21, w); + } + const z = (...C) => A.client.upload(...C); + function W(C) { + o = C, t(0, o); + } + const L = () => A.dispatch("upload"), $ = () => A.dispatch("clear"), Q = ({ detail: C }) => A.dispatch("error", C); + return n.$$set = (C) => { + "elem_id" in C && t(1, s = C.elem_id), "elem_classes" in C && t(2, r = C.elem_classes), "visible" in C && t(3, a = C.visible), "value" in C && t(0, o = C.value), "label" in C && t(4, u = C.label), "show_label" in C && t(5, l = C.show_label), "root" in C && t(6, c = C.root), "height" in C && t(7, h = C.height), "width" in C && t(8, d = C.width), "container" in C && t(9, f = C.container), "scale" in C && t(10, m = C.scale), "min_width" in C && t(11, g = C.min_width), "loading_status" in C && t(12, p = C.loading_status), "interactive" in C && t(13, y = C.interactive), "show_download_button" in C && t(14, v = C.show_download_button), "show_fullscreen_button" in C && t(15, _ = C.show_fullscreen_button), "show_mute_button" in C && t(16, E = C.show_mute_button), "video_mode" in C && t(17, T = C.video_mode), "position" in C && t(24, x = C.position), "autoplay" in C && t(18, S = C.autoplay), "loop" in C && t(19, D = C.loop), "gradio" in C && t(20, A = C.gradio); }, n.$$.update = () => { n.$$.dirty[0] & /*position*/ - 2097152 && t(20, i = Math.max(0, Math.min(100, E)) / 100), n.$$.dirty[0] & /*value, old_value, gradio*/ - 4456449 && JSON.stringify(o) !== JSON.stringify(x) && (t(22, x = o), S.dispatch("change")); + 16777216 && t(22, i = Math.max(0, Math.min(100, x)) / 100), n.$$.dirty[0] & /*value, old_value, gradio*/ + 34603009 && JSON.stringify(o) !== JSON.stringify(I) && (t(25, I = o), A.dispatch("change")); }, [ o, s, @@ -42700,33 +43134,37 @@ function GB(n, e, t) { y, v, _, + E, T, - A, S, D, + A, + w, i, - E, + M, x, - w, I, - R, - M, - P, - K, + k, q, + K, + H, + Y, + B, + z, W, - U, - j + L, + $, + Q ]; } -class GW extends RB { +class tY extends nN { constructor(e) { - super(), PB( + super(), aN( this, e, - GB, - UB, - OB, + mN, + fN, + oN, { elem_id: 1, elem_classes: 2, @@ -42744,10 +43182,12 @@ class GW extends RB { interactive: 13, show_download_button: 14, show_fullscreen_button: 15, - position: 21, - autoplay: 16, - loop: 17, - gradio: 18 + show_mute_button: 16, + video_mode: 17, + position: 24, + autoplay: 18, + loop: 19, + gradio: 20 }, null, [-1, -1] @@ -42757,123 +43197,135 @@ class GW extends RB { return this.$$.ctx[1]; } set elem_id(e) { - this.$$set({ elem_id: e }), ze(); + this.$$set({ elem_id: e }), qe(); } get elem_classes() { return this.$$.ctx[2]; } set elem_classes(e) { - this.$$set({ elem_classes: e }), ze(); + this.$$set({ elem_classes: e }), qe(); } get visible() { return this.$$.ctx[3]; } set visible(e) { - this.$$set({ visible: e }), ze(); + this.$$set({ visible: e }), qe(); } get value() { return this.$$.ctx[0]; } set value(e) { - this.$$set({ value: e }), ze(); + this.$$set({ value: e }), qe(); } get label() { return this.$$.ctx[4]; } set label(e) { - this.$$set({ label: e }), ze(); + this.$$set({ label: e }), qe(); } get show_label() { return this.$$.ctx[5]; } set show_label(e) { - this.$$set({ show_label: e }), ze(); + this.$$set({ show_label: e }), qe(); } get root() { return this.$$.ctx[6]; } set root(e) { - this.$$set({ root: e }), ze(); + this.$$set({ root: e }), qe(); } get height() { return this.$$.ctx[7]; } set height(e) { - this.$$set({ height: e }), ze(); + this.$$set({ height: e }), qe(); } get width() { return this.$$.ctx[8]; } set width(e) { - this.$$set({ width: e }), ze(); + this.$$set({ width: e }), qe(); } get container() { return this.$$.ctx[9]; } set container(e) { - this.$$set({ container: e }), ze(); + this.$$set({ container: e }), qe(); } get scale() { return this.$$.ctx[10]; } set scale(e) { - this.$$set({ scale: e }), ze(); + this.$$set({ scale: e }), qe(); } get min_width() { return this.$$.ctx[11]; } set min_width(e) { - this.$$set({ min_width: e }), ze(); + this.$$set({ min_width: e }), qe(); } get loading_status() { return this.$$.ctx[12]; } set loading_status(e) { - this.$$set({ loading_status: e }), ze(); + this.$$set({ loading_status: e }), qe(); } get interactive() { return this.$$.ctx[13]; } set interactive(e) { - this.$$set({ interactive: e }), ze(); + this.$$set({ interactive: e }), qe(); } get show_download_button() { return this.$$.ctx[14]; } set show_download_button(e) { - this.$$set({ show_download_button: e }), ze(); + this.$$set({ show_download_button: e }), qe(); } get show_fullscreen_button() { return this.$$.ctx[15]; } set show_fullscreen_button(e) { - this.$$set({ show_fullscreen_button: e }), ze(); + this.$$set({ show_fullscreen_button: e }), qe(); + } + get show_mute_button() { + return this.$$.ctx[16]; + } + set show_mute_button(e) { + this.$$set({ show_mute_button: e }), qe(); + } + get video_mode() { + return this.$$.ctx[17]; + } + set video_mode(e) { + this.$$set({ video_mode: e }), qe(); } get position() { - return this.$$.ctx[21]; + return this.$$.ctx[24]; } set position(e) { - this.$$set({ position: e }), ze(); + this.$$set({ position: e }), qe(); } get autoplay() { - return this.$$.ctx[16]; + return this.$$.ctx[18]; } set autoplay(e) { - this.$$set({ autoplay: e }), ze(); + this.$$set({ autoplay: e }), qe(); } get loop() { - return this.$$.ctx[17]; + return this.$$.ctx[19]; } set loop(e) { - this.$$set({ loop: e }), ze(); + this.$$set({ loop: e }), qe(); } get gradio() { - return this.$$.ctx[18]; + return this.$$.ctx[20]; } set gradio(e) { - this.$$set({ gradio: e }), ze(); + this.$$set({ gradio: e }), qe(); } } export { - GW as default + tY as default };