CRAVITY (DRM)

CRAVITY

Train Station

Shaka Player with Widevine Clear Key

/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ (function() { var innerGlobal = typeof window != "undefined" ? window : global; var exportTo = {}; (function(window, global, module) { /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var r; function aa(a) { var b = 0; return function() { return b < a.length ? { done: !1, value: a[b++] } : { done: !0 } } } var ba = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) { if (a == Array.prototype || a == Object.prototype) return a; a[b] = c.value; return a } ; function da(a) { a = ["object" == typeof globalThis && globalThis, a, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global]; for (var b = 0; b < a.length; ++b) { var c = a[b]; if (c && c.Math == Math) return c } throw Error("Cannot find global object"); } var ea = da(this); function fa(a, b) { if (b) a: { for (var c = ea, d = a.split("."), e = 0; e < d.length - 1; e++) { var f = d[e]; if (!(f in c)) break a; c = c[f] } d = d[d.length - 1]; e = c[d]; f = b(e); f != e && null != f && ba(c, d, { configurable: !0, writable: !0, value: f }) } } fa("Symbol", function(a) { function b(f) { if (this instanceof b) throw new TypeError("Symbol is not a constructor"); return new c(d + (f || "") + "_" + e++,f) } function c(f, g) { this.g = f; ba(this, "description", { configurable: !0, writable: !0, value: g }) } if (a) return a; c.prototype.toString = function() { return this.g } ; var d = "jscomp_symbol_" + (1E9 * Math.random() >>> 0) + "_" , e = 0; return b }); fa("Symbol.iterator", function(a) { if (a) return a; a = Symbol("Symbol.iterator"); for (var b = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), c = 0; c < b.length; c++) { var d = ea[b[c]]; "function" === typeof d && "function" != typeof d.prototype[a] && ba(d.prototype, a, { configurable: !0, writable: !0, value: function() { return ha(aa(this)) } }) } return a }); function ha(a) { a = { next: a }; a[Symbol.iterator] = function() { return this } ; return a } function t(a) { var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator]; return b ? b.call(a) : { next: aa(a) } } function ia(a) { if (!(a instanceof Array)) { a = t(a); for (var b, c = []; !(b = a.next()).done; ) c.push(b.value); a = c } return a } var ja = "function" == typeof Object.create ? Object.create : function(a) { function b() {} b.prototype = a; return new b } , ka; if ("function" == typeof Object.setPrototypeOf) ka = Object.setPrototypeOf; else { var la; a: { var ma = { a: !0 } , na = {}; try { na.__proto__ = ma; la = na.a; break a } catch (a) {} la = !1 } ka = la ? function(a, b) { a.__proto__ = b; if (a.__proto__ !== b) throw new TypeError(a + " is not extensible"); return a } : null } var oa = ka; function pa(a, b) { a.prototype = ja(b.prototype); a.prototype.constructor = a; if (oa) oa(a, b); else for (var c in b) if ("prototype" != c) if (Object.defineProperties) { var d = Object.getOwnPropertyDescriptor(b, c); d && Object.defineProperty(a, c, d) } else a[c] = b[c]; a.$g = b.prototype } function qa() { this.o = !1; this.l = null; this.h = void 0; this.g = 1; this.j = this.m = 0; this.u = this.i = null } function sa(a) { if (a.o) throw new TypeError("Generator is already running"); a.o = !0 } qa.prototype.s = function(a) { this.h = a } ; function ta(a, b) { a.i = { pe: b, we: !0 }; a.g = a.m || a.j } qa.prototype["return"] = function(a) { this.i = { "return": a }; this.g = this.j } ; function u(a, b, c) { a.g = c; return { value: b } } qa.prototype.A = function(a) { this.g = a } ; function z(a) { a.g = 0 } function B(a, b, c) { a.m = b; void 0 != c && (a.j = c) } function ua(a) { a.m = 0; a.j = 2 } function va(a, b) { a.g = b; a.m = 0 } function F(a) { a.m = 0; var b = a.i.pe; a.i = null; return b } function wa(a) { a.u = [a.i]; a.m = 0; a.j = 0 } function xa(a, b) { var c = a.u.splice(0)[0]; (c = a.i = a.i || c) ? c.we ? a.g = a.m || a.j : void 0 != c.A && a.j < c.A ? (a.g = c.A, a.i = null) : a.g = a.j : a.g = b } function ya(a) { this.g = new qa; this.h = a } function Aa(a, b) { sa(a.g); var c = a.g.l; if (c) return Ca(a, "return"in c ? c["return"] : function(d) { return { value: d, done: !0 } } , b, a.g["return"]); a.g["return"](b); return Da(a) } function Ca(a, b, c, d) { try { var e = b.call(a.g.l, c); if (!(e instanceof Object)) throw new TypeError("Iterator result " + e + " is not an object"); if (!e.done) return a.g.o = !1, e; var f = e.value } catch (g) { return a.g.l = null, ta(a.g, g), Da(a) } a.g.l = null; d.call(a.g, f); return Da(a) } function Da(a) { for (; a.g.g; ) try { var b = a.h(a.g); if (b) return a.g.o = !1, { value: b.value, done: !1 } } catch (c) { a.g.h = void 0, ta(a.g, c) } a.g.o = !1; if (a.g.i) { b = a.g.i; a.g.i = null; if (b.we) throw b.pe; return { value: b["return"], done: !0 } } return { value: void 0, done: !0 } } function Fa(a) { this.next = function(b) { sa(a.g); a.g.l ? b = Ca(a, a.g.l.next, b, a.g.s) : (a.g.s(b), b = Da(a)); return b } ; this["throw"] = function(b) { sa(a.g); a.g.l ? b = Ca(a, a.g.l["throw"], b, a.g.s) : (ta(a.g, b), b = Da(a)); return b } ; this["return"] = function(b) { return Aa(a, b) } ; this[Symbol.iterator] = function() { return this } } function Ga(a) { function b(d) { return a.next(d) } function c(d) { return a["throw"](d) } return new Promise(function(d, e) { function f(g) { g.done ? d(g.value) : Promise.resolve(g.value).then(b, c).then(f, e) } f(a.next()) } ) } function L(a) { return Ga(new Fa(new ya(a))) } function Ha() { for (var a = Number(this), b = [], c = a; c < arguments.length; c++) b[c - a] = arguments[c]; return b } fa("Promise", function(a) { function b(g) { this.h = 0; this.i = void 0; this.g = []; this.o = !1; var h = this.j(); try { g(h.resolve, h.reject) } catch (k) { h.reject(k) } } function c() { this.g = null } function d(g) { return g instanceof b ? g : new b(function(h) { h(g) } ) } if (a) return a; c.prototype.h = function(g) { if (null == this.g) { this.g = []; var h = this; this.i(function() { h.l() }) } this.g.push(g) } ; var e = ea.setTimeout; c.prototype.i = function(g) { e(g, 0) } ; c.prototype.l = function() { for (; this.g && this.g.length; ) { var g = this.g; this.g = []; for (var h = 0; h < g.length; ++h) { var k = g[h]; g[h] = null; try { k() } catch (l) { this.j(l) } } } this.g = null } ; c.prototype.j = function(g) { this.i(function() { throw g; }) } ; b.prototype.j = function() { function g(l) { return function(m) { k || (k = !0, l.call(h, m)) } } var h = this , k = !1; return { resolve: g(this.F), reject: g(this.l) } } ; b.prototype.F = function(g) { if (g === this) this.l(new TypeError("A Promise cannot resolve to itself")); else if (g instanceof b) this.I(g); else { a: switch (typeof g) { case "object": var h = null != g; break a; case "function": h = !0; break a; default: h = !1 } h ? this.D(g) : this.m(g) } } ; b.prototype.D = function(g) { var h = void 0; try { h = g.then } catch (k) { this.l(k); return } "function" == typeof h ? this.L(h, g) : this.m(g) } ; b.prototype.l = function(g) { this.s(2, g) } ; b.prototype.m = function(g) { this.s(1, g) } ; b.prototype.s = function(g, h) { if (0 != this.h) throw Error("Cannot settle(" + g + ", " + h + "): Promise already settled in state" + this.h); this.h = g; this.i = h; 2 === this.h && this.G(); this.u() } ; b.prototype.G = function() { var g = this; e(function() { if (g.C()) { var h = ea.console; "undefined" !== typeof h && h.error(g.i) } }, 1) } ; b.prototype.C = function() { if (this.o) return !1; var g = ea.CustomEvent , h = ea.Event , k = ea.dispatchEvent; if ("undefined" === typeof k) return !0; "function" === typeof g ? g = new g("unhandledrejection",{ cancelable: !0 }) : "function" === typeof h ? g = new h("unhandledrejection",{ cancelable: !0 }) : (g = ea.document.createEvent("CustomEvent"), g.initCustomEvent("unhandledrejection", !1, !0, g)); g.promise = this; g.reason = this.i; return k(g) } ; b.prototype.u = function() { if (null != this.g) { for (var g = 0; g < this.g.length; ++g) f.h(this.g[g]); this.g = null } } ; var f = new c; b.prototype.I = function(g) { var h = this.j(); g.Dc(h.resolve, h.reject) } ; b.prototype.L = function(g, h) { var k = this.j(); try { g.call(h, k.resolve, k.reject) } catch (l) { k.reject(l) } } ; b.prototype.then = function(g, h) { function k(p, q) { return "function" == typeof p ? function(x) { try { l(p(x)) } catch (y) { m(y) } } : q } var l, m, n = new b(function(p, q) { l = p; m = q } ); this.Dc(k(g, l), k(h, m)); return n } ; b.prototype["catch"] = function(g) { return this.then(void 0, g) } ; b.prototype.Dc = function(g, h) { function k() { switch (l.h) { case 1: g(l.i); break; case 2: h(l.i); break; default: throw Error("Unexpected state: " + l.h); } } var l = this; null == this.g ? f.h(k) : this.g.push(k); this.o = !0 } ; b.resolve = d; b.reject = function(g) { return new b(function(h, k) { k(g) } ) } ; b.race = function(g) { return new b(function(h, k) { for (var l = t(g), m = l.next(); !m.done; m = l.next()) d(m.value).Dc(h, k) } ) } ; b.all = function(g) { var h = t(g) , k = h.next(); return k.done ? d([]) : new b(function(l, m) { function n(x) { return function(y) { p[x] = y; q--; 0 == q && l(p) } } var p = [] , q = 0; do p.push(void 0), q++, d(k.value).Dc(n(p.length - 1), m), k = h.next(); while (!k.done) } ) } ; return b }); function Ia(a, b) { return Object.prototype.hasOwnProperty.call(a, b) } fa("WeakMap", function(a) { function b(k) { this.g = (h += Math.random() + 1).toString(); if (k) { k = t(k); for (var l; !(l = k.next()).done; ) l = l.value, this.set(l[0], l[1]) } } function c() {} function d(k) { var l = typeof k; return "object" === l && null !== k || "function" === l } function e(k) { if (!Ia(k, g)) { var l = new c; ba(k, g, { value: l }) } } function f(k) { var l = Object[k]; l && (Object[k] = function(m) { if (m instanceof c) return m; Object.isExtensible(m) && e(m); return l(m) } ) } if (function() { if (!a || !Object.seal) return !1; try { var k = Object.seal({}) , l = Object.seal({}) , m = new a([[k, 2], [l, 3]]); if (2 != m.get(k) || 3 != m.get(l)) return !1; m["delete"](k); m.set(l, 4); return !m.has(k) && 4 == m.get(l) } catch (n) { return !1 } }()) return a; var g = "$jscomp_hidden_" + Math.random(); f("freeze"); f("preventExtensions"); f("seal"); var h = 0; b.prototype.set = function(k, l) { if (!d(k)) throw Error("Invalid WeakMap key"); e(k); if (!Ia(k, g)) throw Error("WeakMap key fail: " + k); k[g][this.g] = l; return this } ; b.prototype.get = function(k) { return d(k) && Ia(k, g) ? k[g][this.g] : void 0 } ; b.prototype.has = function(k) { return d(k) && Ia(k, g) && Ia(k[g], this.g) } ; b.prototype["delete"] = function(k) { return d(k) && Ia(k, g) && Ia(k[g], this.g) ? delete k[g][this.g] : !1 } ; return b }); fa("Map", function(a) { function b() { var h = {}; return h.Ra = h.next = h.head = h } function c(h, k) { var l = h.g; return ha(function() { if (l) { for (; l.head != h.g; ) l = l.Ra; for (; l.next != l.head; ) return l = l.next, { done: !1, value: k(l) }; l = null } return { done: !0, value: void 0 } }) } function d(h, k) { var l = k && typeof k; "object" == l || "function" == l ? f.has(k) ? l = f.get(k) : (l = "" + ++g, f.set(k, l)) : l = "p_" + k; var m = h.h[l]; if (m && Ia(h.h, l)) for (var n = 0; n < m.length; n++) { var p = m[n]; if (k !== k && p.key !== p.key || k === p.key) return { id: l, list: m, index: n, fa: p } } return { id: l, list: m, index: -1, fa: void 0 } } function e(h) { this.h = {}; this.g = b(); this.size = 0; if (h) { h = t(h); for (var k; !(k = h.next()).done; ) k = k.value, this.set(k[0], k[1]) } } if (function() { if (!a || "function" != typeof a || !a.prototype.entries || "function" != typeof Object.seal) return !1; try { var h = Object.seal({ x: 4 }) , k = new a(t([[h, "s"]])); if ("s" != k.get(h) || 1 != k.size || k.get({ x: 4 }) || k.set({ x: 4 }, "t") != k || 2 != k.size) return !1; var l = k.entries() , m = l.next(); if (m.done || m.value[0] != h || "s" != m.value[1]) return !1; m = l.next(); return m.done || 4 != m.value[0].x || "t" != m.value[1] || !l.next().done ? !1 : !0 } catch (n) { return !1 } }()) return a; var f = new WeakMap; e.prototype.set = function(h, k) { h = 0 === h ? 0 : h; var l = d(this, h); l.list || (l.list = this.h[l.id] = []); l.fa ? l.fa.value = k : (l.fa = { next: this.g, Ra: this.g.Ra, head: this.g, key: h, value: k }, l.list.push(l.fa), this.g.Ra.next = l.fa, this.g.Ra = l.fa, this.size++); return this } ; e.prototype["delete"] = function(h) { h = d(this, h); return h.fa && h.list ? (h.list.splice(h.index, 1), h.list.length || delete this.h[h.id], h.fa.Ra.next = h.fa.next, h.fa.next.Ra = h.fa.Ra, h.fa.head = null, this.size--, !0) : !1 } ; e.prototype.clear = function() { this.h = {}; this.g = this.g.Ra = b(); this.size = 0 } ; e.prototype.has = function(h) { return !!d(this, h).fa } ; e.prototype.get = function(h) { return (h = d(this, h).fa) && h.value } ; e.prototype.entries = function() { return c(this, function(h) { return [h.key, h.value] }) } ; e.prototype.keys = function() { return c(this, function(h) { return h.key }) } ; e.prototype.values = function() { return c(this, function(h) { return h.value }) } ; e.prototype.forEach = function(h, k) { for (var l = this.entries(), m; !(m = l.next()).done; ) m = m.value, h.call(k, m[1], m[0], this) } ; e.prototype[Symbol.iterator] = e.prototype.entries; var g = 0; return e }); fa("Set", function(a) { function b(c) { this.g = new Map; if (c) { c = t(c); for (var d; !(d = c.next()).done; ) this.add(d.value) } this.size = this.g.size } if (function() { if (!a || "function" != typeof a || !a.prototype.entries || "function" != typeof Object.seal) return !1; try { var c = Object.seal({ x: 4 }) , d = new a(t([c])); if (!d.has(c) || 1 != d.size || d.add(c) != d || 1 != d.size || d.add({ x: 4 }) != d || 2 != d.size) return !1; var e = d.entries() , f = e.next(); if (f.done || f.value[0] != c || f.value[1] != c) return !1; f = e.next(); return f.done || f.value[0] == c || 4 != f.value[0].x || f.value[1] != f.value[0] ? !1 : e.next().done } catch (g) { return !1 } }()) return a; b.prototype.add = function(c) { c = 0 === c ? 0 : c; this.g.set(c, c); this.size = this.g.size; return this } ; b.prototype["delete"] = function(c) { c = this.g["delete"](c); this.size = this.g.size; return c } ; b.prototype.clear = function() { this.g.clear(); this.size = 0 } ; b.prototype.has = function(c) { return this.g.has(c) } ; b.prototype.entries = function() { return this.g.entries() } ; b.prototype.values = function() { return this.g.values() } ; b.prototype.keys = b.prototype.values; b.prototype[Symbol.iterator] = b.prototype.values; b.prototype.forEach = function(c, d) { var e = this; this.g.forEach(function(f) { return c.call(d, f, f, e) }) } ; return b }); function Ka(a, b, c) { a instanceof String && (a = String(a)); for (var d = a.length, e = 0; e < d; e++) { var f = a[e]; if (b.call(c, f, e, a)) return { ue: e, v: f } } return { ue: -1, v: void 0 } } fa("Array.prototype.findIndex", function(a) { return a ? a : function(b, c) { return Ka(this, b, c).ue } }); fa("Object.is", function(a) { return a ? a : function(b, c) { return b === c ? 0 !== b || 1 / b === 1 / c : b !== b && c !== c } }); fa("Array.prototype.includes", function(a) { return a ? a : function(b, c) { var d = this; d instanceof String && (d = String(d)); var e = d.length , f = c || 0; for (0 > f && (f = Math.max(f + e, 0)); f < e; f++) { var g = d[f]; if (g === b || Object.is(g, b)) return !0 } return !1 } }); function La(a, b, c) { if (null == a) throw new TypeError("The 'this' value for String.prototype." + c + " must not be null or undefined"); if (b instanceof RegExp) throw new TypeError("First argument to String.prototype." + c + " must not be a regular expression"); return a + "" } fa("String.prototype.includes", function(a) { return a ? a : function(b, c) { return -1 !== La(this, b, "includes").indexOf(b, c || 0) } }); fa("Array.prototype.find", function(a) { return a ? a : function(b, c) { return Ka(this, b, c).v } }); fa("String.prototype.startsWith", function(a) { return a ? a : function(b, c) { for (var d = La(this, b, "startsWith"), e = d.length, f = b.length, g = Math.max(0, Math.min(c | 0, d.length)), h = 0; h < f && g < e; ) if (d[g++] != b[h++]) return !1; return h >= f } }); function Ma(a, b) { a instanceof String && (a += ""); var c = 0 , d = !1 , e = { next: function() { if (!d && c < a.length) { var f = c++; return { value: b(f, a[f]), done: !1 } } d = !0; return { done: !0, value: void 0 } } }; e[Symbol.iterator] = function() { return e } ; return e } fa("Array.prototype.keys", function(a) { return a ? a : function() { return Ma(this, function(b) { return b }) } }); var Na = "function" == typeof Object.assign ? Object.assign : function(a, b) { for (var c = 1; c < arguments.length; c++) { var d = arguments[c]; if (d) for (var e in d) Ia(d, e) && (a[e] = d[e]) } return a } ; fa("Object.assign", function(a) { return a || Na }); fa("Array.from", function(a) { return a ? a : function(b, c, d) { c = null != c ? c : function(h) { return h } ; var e = [] , f = "undefined" != typeof Symbol && Symbol.iterator && b[Symbol.iterator]; if ("function" == typeof f) { b = f.call(b); for (var g = 0; !(f = b.next()).done; ) e.push(c.call(d, f.value, g++)) } else for (f = b.length, g = 0; g < f; g++) e.push(c.call(d, b[g], g)); return e } }); fa("Array.prototype.values", function(a) { return a ? a : function() { return Ma(this, function(b, c) { return c }) } }); fa("Promise.prototype.finally", function(a) { return a ? a : function(b) { return this.then(function(c) { return Promise.resolve(b()).then(function() { return c }) }, function(c) { return Promise.resolve(b()).then(function() { throw c; }) }) } }); fa("Array.prototype.entries", function(a) { return a ? a : function() { return Ma(this, function(b, c) { return [b, c] }) } }); fa("String.prototype.repeat", function(a) { return a ? a : function(b) { var c = La(this, null, "repeat"); if (0 > b || 1342177279 < b) throw new RangeError("Invalid count value"); b |= 0; for (var d = ""; b; ) if (b & 1 && (d += c), b >>>= 1) c += c; return d } }); fa("Number.isNaN", function(a) { return a ? a : function(b) { return "number" === typeof b && isNaN(b) } }); fa("Object.values", function(a) { return a ? a : function(b) { var c = [], d; for (d in b) Ia(b, d) && c.push(b[d]); return c } }); fa("Math.log2", function(a) { return a ? a : function(b) { return Math.log(b) / Math.LN2 } }); fa("Math.trunc", function(a) { return a ? a : function(b) { b = Number(b); if (isNaN(b) || Infinity === b || -Infinity === b || 0 === b) return b; var c = Math.floor(Math.abs(b)); return 0 > b ? -c : c } }); fa("Object.entries", function(a) { return a ? a : function(b) { var c = [], d; for (d in b) Ia(b, d) && c.push([d, b[d]]); return c } }); var Oa = this || self; function M(a, b) { var c = a.split(".") , d = Oa; c[0]in d || "undefined" == typeof d.execScript || d.execScript("var " + c[0]); for (var e; c.length && (e = c.shift()); ) c.length || void 0 === b ? d[e] && d[e] !== Object.prototype[e] ? d = d[e] : d = d[e] = {} : d[e] = b } ;/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ function Pa(a) { this.g = Math.exp(Math.log(.5) / a); this.i = this.h = 0 } Pa.prototype.sample = function(a, b) { var c = Math.pow(this.g, a); c = b * (1 - c) + c * this.h; isNaN(c) || (this.h = c, this.i += a) } ; function Qa(a) { return a.h / (1 - Math.pow(a.g, a.i)) } ;function Sa() { this.h = new Pa(2); this.j = new Pa(5); this.g = 0; this.i = 128E3; this.l = 16E3 } Sa.prototype.configure = function(a) { this.i = a.minTotalBytes; this.l = a.minBytes; this.h.g = Math.exp(Math.log(.5) / a.fastHalfLife); this.j.g = Math.exp(Math.log(.5) / a.slowHalfLife) } ; Sa.prototype.sample = function(a, b) { if (!(b < this.l)) { var c = 8E3 * b / a , d = a / 1E3; this.g += b; this.h.sample(d, c); this.j.sample(d, c) } } ; Sa.prototype.getBandwidthEstimate = function(a) { return this.g < this.i ? a : Math.min(Qa(this.h), Qa(this.j)) } ; function Ta() {} function Ua() {} function Va() {} function Wa(a) { var b = Ha.apply(1, arguments); Xa.has(a) || (Xa.add(a), Va.apply(Ta, ia(b))) } function Ya() {} function Za() {} function $a() {} function ab() {} var Xa = new Set; if (window.console && window.console.log.bind) { var bb = {} , cb = (bb[1] = console.error.bind(console), bb[2] = console.warn.bind(console), bb[3] = console.info.bind(console), bb[4] = console.log.bind(console), bb[5] = console.debug.bind(console), bb[6] = console.debug.bind(console), bb); Va = cb[2]; Ua = cb[1] } ;function db(a, b) { return "number" === typeof a && "number" === typeof b && isNaN(a) && isNaN(b) ? !0 : a === b } function eb(a, b) { var c = a.indexOf(b); -1 < c && a.splice(c, 1) } function fb(a, b, c) { c || (c = db); if (a.length != b.length) return !1; b = b.slice(); var d = {}; a = t(a); for (var e = a.next(); !e.done; d = { gd: d.gd }, e = a.next()) { d.gd = e.value; e = b.findIndex(function(f) { return function(g) { return c(f.gd, g) } }(d)); if (-1 == e) return !1; b[e] = b[b.length - 1]; b.pop() } return 0 == b.length } function gb(a, b, c) { c || (c = db); if (a.length != b.length) return !1; for (var d = 0; d < a.length; d++) if (!c(a[d], b[d])) return !1; return !0 } ;function ib(a, b, c) { this.startTime = a; this.direction = jb; this.endTime = b; this.payload = c; this.region = new kb; this.position = null; this.positionAlign = lb; this.size = 0; this.textAlign = mb; this.writingMode = nb; this.lineInterpretation = ob; this.line = null; this.lineHeight = ""; this.lineAlign = pb; this.displayAlign = qb; this.fontSize = this.textStrokeWidth = this.textStrokeColor = this.textShadow = this.border = this.backgroundImage = this.backgroundColor = this.color = ""; this.fontWeight = rb; this.fontStyle = sb; this.linePadding = this.letterSpacing = this.fontFamily = ""; this.opacity = 1; this.textDecoration = []; this.wrapLine = !0; this.id = ""; this.nestedCues = []; this.lineBreak = this.isContainer = !1; this.cellResolution = { columns: 32, rows: 15 } } ib.prototype.clone = function() { var a = new ib(0,0,""), b; for (b in this) a[b] = this[b], a[b] && a[b].constructor == Array && (a[b] = a[b].slice()); return a } ; function tb(a, b) { if (a.startTime != b.startTime || a.endTime != b.endTime || a.payload != b.payload) return !1; for (var c in a) if ("startTime" != c && "endTime" != c && "payload" != c) if ("nestedCues" == c) { if (!gb(a.nestedCues, b.nestedCues, tb)) return !1 } else if ("region" == c || "cellResolution" == c) for (var d in a[c]) { if (a[c][d] != b[c][d]) return !1 } else if (Array.isArray(a[c])) { if (!gb(a[c], b[c])) return !1 } else if (a[c] != b[c]) return !1; return !0 } M("shaka.text.Cue", ib); var lb = "auto"; ib.positionAlign = { LEFT: "line-left", RIGHT: "line-right", CENTER: "center", AUTO: lb }; var mb = "center" , ub = { LEFT: "left", RIGHT: "right", CENTER: mb, START: "start", END: "end" }; ib.textAlign = ub; var qb = "after" , vb = { BEFORE: "before", CENTER: "center", AFTER: qb }; ib.displayAlign = vb; var jb = "ltr"; ib.direction = { HORIZONTAL_LEFT_TO_RIGHT: jb, HORIZONTAL_RIGHT_TO_LEFT: "rtl" }; var nb = "horizontal-tb"; ib.writingMode = { HORIZONTAL_TOP_TO_BOTTOM: nb, VERTICAL_LEFT_TO_RIGHT: "vertical-lr", VERTICAL_RIGHT_TO_LEFT: "vertical-rl" }; var ob = 0; ib.lineInterpretation = { LINE_NUMBER: ob, PERCENTAGE: 1 }; var pb = "start" , wb = { CENTER: "center", START: pb, END: "end" }; ib.lineAlign = wb; var xb = { white: "#FFF", lime: "#0F0", cyan: "#0FF", red: "#F00", yellow: "#FF0", magenta: "#F0F", blue: "#00F", black: "#000" }; ib.defaultTextColor = xb; var yb = { bg_white: "#FFF", bg_lime: "#0F0", bg_cyan: "#0FF", bg_red: "#F00", bg_yellow: "#FF0", bg_magenta: "#F0F", bg_blue: "#00F", bg_black: "#000" }; ib.defaultTextBackgroundColor = yb; var rb = 400; ib.fontWeight = { NORMAL: rb, BOLD: 700 }; var sb = "normal" , zb = { NORMAL: sb, ITALIC: "italic", OBLIQUE: "oblique" }; ib.fontStyle = zb; ib.textDecoration = { UNDERLINE: "underline", LINE_THROUGH: "lineThrough", OVERLINE: "overline" }; function kb() { this.id = ""; this.regionAnchorY = this.regionAnchorX = this.viewportAnchorY = this.viewportAnchorX = 0; this.height = this.width = 100; this.viewportAnchorUnits = this.widthUnits = this.heightUnits = Ab; this.scroll = Bb } M("shaka.text.CueRegion", kb); var Ab = 1; kb.units = { PX: 0, PERCENTAGE: Ab, LINES: 2 }; var Bb = ""; kb.scrollMode = { NONE: Bb, UP: "up" }; function Cb() {} function Db(a, b) { if (!a && !b) return !0; if (!a || !b || a.byteLength != b.byteLength) return !1; if (Eb(a) == Eb(b) && (a.byteOffset || 0) == (b.byteOffset || 0)) return !0; for (var c = Fb(a), d = Fb(b), e = 0; e < a.byteLength; e++) if (c[e] != d[e]) return !1; return !0 } function Eb(a) { return a instanceof ArrayBuffer ? a : a.buffer } function Gb(a) { return a instanceof ArrayBuffer ? a : 0 == a.byteOffset && a.byteLength == a.buffer.byteLength ? a.buffer : (new Uint8Array(a)).buffer } function Fb(a, b, c) { c = void 0 === c ? Infinity : c; return Hb(a, void 0 === b ? 0 : b, c, Uint8Array) } function Ib(a, b, c) { c = void 0 === c ? Infinity : c; return Hb(a, void 0 === b ? 0 : b, c, DataView) } function Hb(a, b, c, d) { var e = (a.byteOffset || 0) + a.byteLength; b = Math.max(0, Math.min((a.byteOffset || 0) + b, e)); return new d(Eb(a),b,Math.min(b + Math.max(c, 0), e) - b) } M("shaka.util.BufferUtils", Cb); Cb.toDataView = Ib; Cb.toUint8 = Fb; Cb.toArrayBuffer = Gb; Cb.equal = Db; function Jb() {} M("shaka.dependencies", Jb); Jb.has = function(a) { return Kb.has(a) } ; Jb.add = function(a, b) { if (!Lb[a]) throw Error(a + " is not supported"); Kb.set(a, function() { return b }) } ; var Lb = { muxjs: "muxjs" }; Jb.Allowed = Lb; var Kb = new Map([["muxjs", function() { return window.muxjs } ]]); function N(a, b, c) { var d = Ha.apply(3, arguments); this.severity = a; this.category = b; this.code = c; this.data = d; this.handled = !1 } N.prototype.toString = function() { return "shaka.util.Error " + JSON.stringify(this, null, " ") } ; M("shaka.util.Error", N); N.Severity = { RECOVERABLE: 1, CRITICAL: 2 }; N.Category = { NETWORK: 1, TEXT: 2, MEDIA: 3, MANIFEST: 4, STREAMING: 5, DRM: 6, PLAYER: 7, CAST: 8, STORAGE: 9, ADS: 10 }; N.Code = { UNSUPPORTED_SCHEME: 1E3, BAD_HTTP_STATUS: 1001, HTTP_ERROR: 1002, TIMEOUT: 1003, MALFORMED_DATA_URI: 1004, REQUEST_FILTER_ERROR: 1006, RESPONSE_FILTER_ERROR: 1007, MALFORMED_TEST_URI: 1008, UNEXPECTED_TEST_REQUEST: 1009, ATTEMPTS_EXHAUSTED: 1010, SEGMENT_MISSING: 1011, INVALID_TEXT_HEADER: 2E3, INVALID_TEXT_CUE: 2001, UNABLE_TO_DETECT_ENCODING: 2003, BAD_ENCODING: 2004, INVALID_XML: 2005, INVALID_MP4_TTML: 2007, INVALID_MP4_VTT: 2008, UNABLE_TO_EXTRACT_CUE_START_TIME: 2009, INVALID_MP4_CEA: 2010, TEXT_COULD_NOT_GUESS_MIME_TYPE: 2011, CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS: 2012, TEXT_ONLY_WEBVTT_SRC_EQUALS: 2013, MISSING_TEXT_PLUGIN: 2014, CHAPTERS_TRACK_FAILED: 2015, BUFFER_READ_OUT_OF_BOUNDS: 3E3, JS_INTEGER_OVERFLOW: 3001, EBML_OVERFLOW: 3002, EBML_BAD_FLOATING_POINT_SIZE: 3003, MP4_SIDX_WRONG_BOX_TYPE: 3004, MP4_SIDX_INVALID_TIMESCALE: 3005, MP4_SIDX_TYPE_NOT_SUPPORTED: 3006, WEBM_CUES_ELEMENT_MISSING: 3007, WEBM_EBML_HEADER_ELEMENT_MISSING: 3008, WEBM_SEGMENT_ELEMENT_MISSING: 3009, WEBM_INFO_ELEMENT_MISSING: 3010, WEBM_DURATION_ELEMENT_MISSING: 3011, WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING: 3012, WEBM_CUE_TIME_ELEMENT_MISSING: 3013, MEDIA_SOURCE_OPERATION_FAILED: 3014, MEDIA_SOURCE_OPERATION_THREW: 3015, VIDEO_ERROR: 3016, QUOTA_EXCEEDED_ERROR: 3017, TRANSMUXING_FAILED: 3018, CONTENT_TRANSFORMATION_FAILED: 3019, UNABLE_TO_GUESS_MANIFEST_TYPE: 4E3, DASH_INVALID_XML: 4001, DASH_NO_SEGMENT_INFO: 4002, DASH_EMPTY_ADAPTATION_SET: 4003, DASH_EMPTY_PERIOD: 4004, DASH_WEBM_MISSING_INIT: 4005, DASH_UNSUPPORTED_CONTAINER: 4006, DASH_PSSH_BAD_ENCODING: 4007, DASH_NO_COMMON_KEY_SYSTEM: 4008, DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED: 4009, DASH_CONFLICTING_KEY_IDS: 4010, RESTRICTIONS_CANNOT_BE_MET: 4012, HLS_PLAYLIST_HEADER_MISSING: 4015, INVALID_HLS_TAG: 4016, HLS_INVALID_PLAYLIST_HIERARCHY: 4017, DASH_DUPLICATE_REPRESENTATION_ID: 4018, HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND: 4020, HLS_REQUIRED_ATTRIBUTE_MISSING: 4023, HLS_REQUIRED_TAG_MISSING: 4024, HLS_COULD_NOT_GUESS_CODECS: 4025, HLS_KEYFORMATS_NOT_SUPPORTED: 4026, DASH_UNSUPPORTED_XLINK_ACTUATE: 4027, DASH_XLINK_DEPTH_LIMIT: 4028, CONTENT_UNSUPPORTED_BY_BROWSER: 4032, CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM: 4033, HLS_AES_128_ENCRYPTION_NOT_SUPPORTED: 4034, HLS_INTERNAL_SKIP_STREAM: 4035, NO_VARIANTS: 4036, PERIOD_FLATTENING_FAILED: 4037, INCONSISTENT_DRM_ACROSS_PERIODS: 4038, HLS_VARIABLE_NOT_FOUND: 4039, HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED: 4040, STREAMING_ENGINE_STARTUP_INVALID_STATE: 5006, NO_RECOGNIZED_KEY_SYSTEMS: 6E3, REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE: 6001, FAILED_TO_CREATE_CDM: 6002, FAILED_TO_ATTACH_TO_VIDEO: 6003, INVALID_SERVER_CERTIFICATE: 6004, FAILED_TO_CREATE_SESSION: 6005, FAILED_TO_GENERATE_LICENSE_REQUEST: 6006, LICENSE_REQUEST_FAILED: 6007, LICENSE_RESPONSE_REJECTED: 6008, ENCRYPTED_CONTENT_WITHOUT_DRM_INFO: 6010, NO_LICENSE_SERVER_GIVEN: 6012, OFFLINE_SESSION_REMOVED: 6013, EXPIRED: 6014, SERVER_CERTIFICATE_REQUIRED: 6015, INIT_DATA_TRANSFORM_ERROR: 6016, SERVER_CERTIFICATE_REQUEST_FAILED: 6017, LOAD_INTERRUPTED: 7E3, OPERATION_ABORTED: 7001, NO_VIDEO_ELEMENT: 7002, OBJECT_DESTROYED: 7003, CONTENT_NOT_LOADED: 7004, CAST_API_UNAVAILABLE: 8E3, NO_CAST_RECEIVERS: 8001, ALREADY_CASTING: 8002, UNEXPECTED_CAST_ERROR: 8003, CAST_CANCELED_BY_USER: 8004, CAST_CONNECTION_TIMED_OUT: 8005, CAST_RECEIVER_APP_UNAVAILABLE: 8006, STORAGE_NOT_SUPPORTED: 9E3, INDEXED_DB_ERROR: 9001, DEPRECATED_OPERATION_ABORTED: 9002, REQUESTED_ITEM_NOT_FOUND: 9003, MALFORMED_OFFLINE_URI: 9004, CANNOT_STORE_LIVE_OFFLINE: 9005, NO_INIT_DATA_FOR_OFFLINE: 9007, LOCAL_PLAYER_INSTANCE_REQUIRED: 9008, NEW_KEY_OPERATION_NOT_SUPPORTED: 9011, KEY_NOT_FOUND: 9012, MISSING_STORAGE_CELL: 9013, STORAGE_LIMIT_REACHED: 9014, DOWNLOAD_SIZE_CALLBACK_ERROR: 9015, MODIFY_OPERATION_NOT_SUPPORTED: 9016, CS_IMA_SDK_MISSING: 1E4, CS_AD_MANAGER_NOT_INITIALIZED: 10001, SS_IMA_SDK_MISSING: 10002, SS_AD_MANAGER_NOT_INITIALIZED: 10003, CURRENT_DAI_REQUEST_NOT_FINISHED: 10004 }; /* @license Copyright 2008 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ var Mb = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"); /* @license Copyright 2006 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ function Nb(a) { var b; a instanceof Nb ? (Ob(this, a.Ea), this.nb = a.nb, this.Fa = a.Fa, Pb(this, a.Gb), this.ta = a.ta, Qb(this, a.g.clone()), this.fb = a.fb) : a && (b = String(a).match(Mb)) ? (Ob(this, b[1] || "", !0), this.nb = Rb(b[2] || ""), this.Fa = Rb(b[3] || "", !0), Pb(this, b[4]), this.ta = Rb(b[5] || "", !0), Qb(this, b[6] || "", !0), this.fb = Rb(b[7] || "")) : this.g = new Sb(null) } r = Nb.prototype; r.Ea = ""; r.nb = ""; r.Fa = ""; r.Gb = null; r.ta = ""; r.fb = ""; r.toString = function() { var a = [] , b = this.Ea; b && a.push(Tb(b, Ub, !0), ":"); if (b = this.Fa) { a.push("//"); var c = this.nb; c && a.push(Tb(c, Ub, !0), "@"); a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g, "%$1")); b = this.Gb; null != b && a.push(":", String(b)) } if (b = this.ta) this.Fa && "/" != b.charAt(0) && a.push("/"), a.push(Tb(b, "/" == b.charAt(0) ? Vb : Wb, !0)); (b = this.g.toString()) && a.push("?", b); (b = this.fb) && a.push("#", Tb(b, Xb)); return a.join("") } ; r.resolve = function(a) { var b = this.clone(); "data" === b.Ea && (b = new Nb); var c = !!a.Ea; c ? Ob(b, a.Ea) : c = !!a.nb; c ? b.nb = a.nb : c = !!a.Fa; c ? b.Fa = a.Fa : c = null != a.Gb; var d = a.ta; if (c) Pb(b, a.Gb); else if (c = !!a.ta) { if ("/" != d.charAt(0)) if (this.Fa && !this.ta) d = "/" + d; else { var e = b.ta.lastIndexOf("/"); -1 != e && (d = b.ta.substr(0, e + 1) + d) } if (".." == d || "." == d) d = ""; else if (-1 != d.indexOf("./") || -1 != d.indexOf("/.")) { e = 0 == d.lastIndexOf("/", 0); d = d.split("/"); for (var f = [], g = 0; g < d.length; ) { var h = d[g++]; "." == h ? e && g == d.length && f.push("") : ".." == h ? ((1 < f.length || 1 == f.length && "" != f[0]) && f.pop(), e && g == d.length && f.push("")) : (f.push(h), e = !0) } d = f.join("/") } } c ? b.ta = d : c = "" !== a.g.toString(); c ? Qb(b, a.g.clone()) : c = !!a.fb; c && (b.fb = a.fb); return b } ; r.clone = function() { return new Nb(this) } ; function Ob(a, b, c) { a.Ea = c ? Rb(b, !0) : b; a.Ea && (a.Ea = a.Ea.replace(/:$/, "")) } function Pb(a, b) { if (b) { b = Number(b); if (isNaN(b) || 0 > b) throw Error("Bad port number " + b); a.Gb = b } else a.Gb = null } function Qb(a, b, c) { b instanceof Sb ? a.g = b : (c || (b = Tb(b, Yb)), a.g = new Sb(b)) } function Rb(a, b) { return a ? b ? decodeURI(a) : decodeURIComponent(a) : "" } function Tb(a, b, c) { return null != a ? (a = encodeURI(a).replace(b, Zb), c && (a = a.replace(/%25([0-9a-fA-F]{2})/g, "%$1")), a) : null } function Zb(a) { a = a.charCodeAt(0); return "%" + (a >> 4 & 15).toString(16) + (a & 15).toString(16) } var Ub = /[#\/\?@]/g , Wb = /[#\?:]/g , Vb = /[#\?]/g , Yb = /[#\?@]/g , Xb = /#/g; function Sb(a) { this.g = a || null } function $b(a) { if (!a.na && (a.na = {}, a.Fc = 0, a.g)) for (var b = a.g.split("&"), c = 0; c < b.length; c++) { var d = b[c].indexOf("=") , e = null; if (0 <= d) { var f = b[c].substring(0, d); e = b[c].substring(d + 1) } else f = b[c]; f = decodeURIComponent(f.replace(/\+/g, " ")); e = e || ""; a.add(f, decodeURIComponent(e.replace(/\+/g, " "))) } } r = Sb.prototype; r.na = null; r.Fc = null; r.add = function(a, b) { $b(this); this.g = null; var c = this.na.hasOwnProperty(a) && this.na[a]; c || (this.na[a] = c = []); c.push(b); this.Fc++; return this } ; r.set = function(a, b) { $b(this); this.g = null; this.na.hasOwnProperty(a) ? this.na[a] = [b] : this.add(a, b); return this } ; r.toString = function() { if (this.g) return this.g; if (!this.na) return ""; var a = [], b; for (b in this.na) for (var c = encodeURIComponent(b), d = this.na[b], e = 0; e < d.length; e++) { var f = c; "" !== d[e] && (f += "=" + encodeURIComponent(d[e])); a.push(f) } return this.g = a.join("&") } ; r.clone = function() { var a = new Sb; a.g = this.g; if (this.na) { var b = {}, c; for (c in this.na) b[c] = this.na[c].concat(); a.na = b; a.Fc = this.Fc } return a } ; function ac(a, b) { return a.concat(b) } function bc() {} function cc(a) { return null != a } ;function gc(a, b) { if (0 == b.length) return a; var c = b.map(function(d) { return new Nb(d) }); return a.map(function(d) { return new Nb(d) }).map(function(d) { return c.map(function(e) { return d.resolve(e) }) }).reduce(ac, []).map(function(d) { return d.toString() }) } function hc(a, b) { return { keySystem: a, licenseServerUri: "", distinctiveIdentifierRequired: !1, persistentStateRequired: !1, audioRobustness: "", videoRobustness: "", serverCertificate: null, serverCertificateUri: "", sessionType: "", initData: b || [], keyIds: new Set } } function ic(a, b) { if (1 == b.length) return b[0]; var c = jc(a, b); if (null != c) return c; throw new N(2,4,4025,b); } function jc(a, b) { for (var c = t(kc[a]), d = c.next(); !d.done; d = c.next()) { d = d.value; for (var e = t(b), f = e.next(); !f.done; f = e.next()) if (f = f.value, d.test(f.trim())) return f.trim() } return a == lc ? "" : null } var lc = "text" , mc = { va: "video", cb: "audio", X: lc, Sb: "image", mg: "application" } , kc = { audio: [/^vorbis$/, /^opus$/, /^flac$/, /^mp4a/, /^[ae]c-3$/], video: [/^avc/, /^hev/, /^hvc/, /^vp0?[89]/, /^av01/], text: [/^vtt$/, /^wvtt/, /^stpp/] }; function nc() { var a, b, c = new Promise(function(d, e) { a = d; b = e } ); c.resolve = a; c.reject = b; return c } nc.prototype.resolve = function() {} ; nc.prototype.reject = function() {} ; function oc(a) { this.h = a; this.g = void 0 } oc.prototype.value = function() { void 0 == this.g && (this.g = this.h()); return this.g } ; function pc() {} function qc(a) { if (!a) return ""; a = Fb(a); 239 == a[0] && 187 == a[1] && 191 == a[2] && (a = a.subarray(3)); a = (new TextDecoder).decode(a); a.includes("\ufffd") && Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'); return a } function rc(a, b, c) { if (!a) return ""; if (!c && 0 != a.byteLength % 2) throw new N(2,2,2004); c = Math.floor(a.byteLength / 2); var d = new Uint16Array(c); a = Ib(a); for (var e = 0; e < c; e++) d[e] = a.getUint16(2 * e, b); return sc.value()(d) } function tc(a) { function b(d) { return c.byteLength <= d || 32 <= c[d] && 126 >= c[d] } if (!a) return ""; var c = Fb(a); if (239 == c[0] && 187 == c[1] && 191 == c[2]) return qc(c); if (254 == c[0] && 255 == c[1]) return rc(c.subarray(2), !1); if (255 == c[0] && 254 == c[1]) return rc(c.subarray(2), !0); if (0 == c[0] && 0 == c[2]) return rc(a, !1); if (0 == c[1] && 0 == c[3]) return rc(a, !0); if (b(0) && b(1) && b(2) && b(3)) return qc(a); throw new N(2,2,2003); } function uc(a) { var b = new TextEncoder; return Gb(b.encode(a)) } function vc(a, b) { for (var c = new ArrayBuffer(2 * a.length), d = new DataView(c), e = 0; e < a.length; ++e) d.setUint16(2 * e, a.charCodeAt(e), b); return c } M("shaka.util.StringUtils", pc); pc.resetFromCharCode = function() { sc.g = void 0 } ; pc.toUTF16 = vc; pc.toUTF8 = uc; pc.fromBytesAutoDetect = tc; pc.fromUTF16 = rc; pc.fromUTF8 = qc; var sc = new oc(function() { function a(c) { try { var d = new Uint8Array(c); return 0 < String.fromCharCode.apply(null, d).length } catch (e) { return !1 } } for (var b = { Va: 65536 }; 0 < b.Va; b = { Va: b.Va }, b.Va /= 2) if (a(b.Va)) return function(c) { return function(d) { for (var e = "", f = 0; f < d.length; f += c.Va) e += String.fromCharCode.apply(null, d.subarray(f, f + c.Va)); return e } }(b); return null } ); function wc() {} function xc(a) { a = Fb(a); a = sc.value()(a); return btoa(a) } function yc(a, b) { b = void 0 == b ? !0 : b; var c = xc(a).replace(/\+/g, "-").replace(/\//g, "_"); return b ? c : c.replace(/[=]*$/, "") } function zc(a) { a = window.atob(a.replace(/-/g, "+").replace(/_/g, "/")); for (var b = new Uint8Array(a.length), c = 0; c < a.length; ++c) b[c] = a.charCodeAt(c); return b } function Ac(a) { for (var b = a.length / 2, c = new Uint8Array(b), d = 0; d < b; d++) c[d] = window.parseInt(a.substr(2 * d, 2), 16); return c } function Bc(a) { var b = Fb(a); a = ""; b = t(b); for (var c = b.next(); !c.done; c = b.next()) c = c.value, c = c.toString(16), 1 == c.length && (c = "0" + c), a += c; return a } function Cc() { for (var a = Ha.apply(0, arguments), b = 0, c = t(a), d = c.next(); !d.done; d = c.next()) b += d.value.byteLength; b = new Uint8Array(b); c = 0; a = t(a); for (d = a.next(); !d.done; d = a.next()) d = d.value, b.set(Fb(d), c), c += d.byteLength; return b } M("shaka.util.Uint8ArrayUtils", wc); wc.concat = Cc; wc.toHex = Bc; wc.fromHex = Ac; wc.fromBase64 = zc; wc.toBase64 = yc; wc.toStandardBase64 = xc; function Ec() { var a = this; this.o = Kb.get("muxjs")(); this.g = new this.o.mp4.Transmuxer({ keepOriginalTimestamps: !0 }); this.h = null; this.m = []; this.j = []; this.i = []; this.l = !1; this.g.on("data", function(b) { a.j = b.captions; a.i = b.metadata; a.m.push(Cc(b.initSegment, b.data)) }); this.g.on("done", function() { var b = { data: Cc.apply(wc, ia(a.m)), captions: a.j, metadata: a.i }; a.h.resolve(b); a.l = !1 }) } Ec.prototype.destroy = function() { this.g.dispose(); this.g = null; return Promise.resolve() } ; function Fc(a, b) { if (!Kb.get("muxjs")() || !Gc(a)) return !1; if (b) return MediaSource.isTypeSupported(Hc(b, a)); var c = Hc("audio", a) , d = Hc("video", a); return MediaSource.isTypeSupported(c) || MediaSource.isTypeSupported(d) } function Gc(a) { return "mp2t" == a.toLowerCase().split(";")[0].split("/")[1] } function Hc(a, b) { var c = b.replace(/mp2t/i, "mp4"); "audio" == a && (c = c.replace("video", "audio")); var d = /avc1\.(66|77|100)\.(\d+)/.exec(c); if (d) { var e = "avc1." , f = d[1] , g = Number(d[2]); e = ("66" == f ? e + "4200" : "77" == f ? e + "4d00" : e + "6400") + (g >> 4).toString(16); e += (g & 15).toString(16); c = c.replace(d[0], e) } return c } function Ic(a, b) { a.l = !0; a.h = new nc; a.m = []; a.j = []; a.i = []; var c = Fb(b); a.g.push(c); a.g.flush(); a.l && a.h.reject(new N(2,3,3018)); return a.h } ;function Jc() {} function Kc(a, b) { var c = a; b && (c += '; codecs="' + b + '"'); return c } function Lc(a, b, c) { a = Kc(a, b); if (Gc(a)) { if (Kb.get("muxjs")()) return Hc(c, a) } else if ("audio" == c) return a.replace("video", "audio"); return a } function Mc(a) { var b = Nc(a); a = b[0]; b = b[1].toLowerCase(); switch (!0) { case "mp4a" === a && "69" === b: case "mp4a" === a && "6b" === b: return "mp3"; case "mp4a" === a && "66" === b: case "mp4a" === a && "67" === b: case "mp4a" === a && "68" === b: case "mp4a" === a && "40.2" === b: case "mp4a" === a && "40.02" === b: case "mp4a" === a && "40.5" === b: case "mp4a" === a && "40.05" === b: case "mp4a" === a && "40.29" === b: case "mp4a" === a && "40.42" === b: return "aac"; case "mp4a" === a && "a5" === b: return "ac-3"; case "mp4a" === a && "a6" === b: return "ec-3"; case "mp4a" === a && "b2" === b: return "dtsx"; case "mp4a" === a && "a9" === b: return "dtsc"; case "avc1" === a: case "avc3" === a: return "avc"; case "hvc1" === a: case "hev1" === a: return "hevc"; case "dvh1" === a: case "dvhe" === a: return "dovi" } return a } function Oc(a) { a = a.split(/ *; */); a.shift(); return (a = a.find(function(b) { return b.startsWith("codecs=") })) ? a.split("=")[1].replace(/^"|"$/g, "") : "" } function Nc(a) { a = a.split("."); var b = a[0]; a.shift(); return [b, a.join(".")] } M("shaka.util.MimeUtils", Jc); Jc.getFullType = Kc; (new Map).set("codecs", "codecs").set("frameRate", "framerate").set("bandwidth", "bitrate").set("width", "width").set("height", "height").set("channelsCount", "channels"); function Pc(a) { this.j = null; this.i = a; this.u = !1; this.l = this.s = 0; this.m = Infinity; this.h = this.g = null; this.C = ""; this.o = new Map } function Qc(a) { return Rc[a] || "application/cea-608" == a || "application/cea-708" == a ? !0 : !1 } Pc.prototype.destroy = function() { this.i = this.j = null; this.o.clear(); return Promise.resolve() } ; function Sc(a, b, c, d) { var e, f, g, h; return L(function(k) { if (1 == k.g) return u(k, Promise.resolve(), 2); if (!a.j || !a.i) return k["return"](); if (null == c || null == d) return a.j.parseInit(Fb(b)), k["return"](); e = a.u ? c : a.s; f = { periodStart: a.s, segmentStart: c, segmentEnd: d, vttOffset: e }; g = a.j.parseMedia(Fb(b), f); h = g.filter(function(l) { return l.startTime >= a.l && l.startTime < a.m }); a.i.append(h); null == a.g && (a.g = Math.max(c, a.l)); a.h = Math.min(d, a.m); z(k) }) } Pc.prototype.remove = function(a, b) { var c = this; return L(function(d) { if (1 == d.g) return u(d, Promise.resolve(), 2); !c.i || !c.i.remove(a, b) || null == c.g || b <= c.g || a >= c.h || (a <= c.g && b >= c.h ? c.g = c.h = null : a <= c.g && b < c.h ? c.g = b : a > c.g && b >= c.h && (c.h = a)); z(d) }) } ; function Tc(a, b, c) { a.l = b; a.m = c } function Uc(a, b, c) { a.C = b; if (b = a.o.get(b)) for (var d = t(b.keys()), e = d.next(); !e.done; e = d.next()) (e = b.get(e.value).filter(function(f) { return f.endTime <= c })) && a.i.append(e) } function Vc(a) { var b = []; a = t(a); for (var c = a.next(); !c.done; c = a.next()) c = c.value, b.push({ stream: c.stream, cue: new ib(c.startTime,c.endTime,c.text) }); return b } function Wc(a, b, c) { b.startTime += c; b.endTime += c; b = t(b.nestedCues); for (var d = b.next(); !d.done; d = b.next()) Wc(a, d.value, c) } function Xc(a, b, c, d, e) { var f = c + " " + d , g = new Map; b = t(b); for (var h = b.next(); !h.done; h = b.next()) { var k = h.value; h = k.stream; k = k.cue; g.has(h) || g.set(h, new Map); g.get(h).has(f) || g.get(h).set(f, []); Wc(a, k, e); k.startTime >= a.l && k.startTime < a.m && (g.get(h).get(f).push(k), h == a.C && a.i.append([k])) } e = t(g.keys()); for (f = e.next(); !f.done; f = e.next()) for (f = f.value, a.o.has(f) || a.o.set(f, new Map), b = t(g.get(f).keys()), h = b.next(); !h.done; h = b.next()) h = h.value, k = g.get(f).get(h), a.o.get(f).set(h, k); a.g = null == a.g ? Math.max(c, a.l) : Math.min(a.g, Math.max(c, a.l)); a.h = Math.max(a.h, Math.min(d, a.m)) } M("shaka.text.TextEngine", Pc); Pc.prototype.destroy = Pc.prototype.destroy; Pc.findParser = function(a) { return Rc[a] } ; Pc.unregisterParser = function(a) { delete Rc[a] } ; Pc.registerParser = function(a, b) { Rc[a] = b } ; var Rc = {}; function Yc() {} function Zc(a, b) { a = O(a); b = O(b); return a.split("-")[0] == b.split("-")[0] } function $c(a, b) { a = O(a); b = O(b); var c = a.split("-") , d = b.split("-"); return c[0] == d[0] && 1 == c.length && 2 == d.length } function ad(a, b) { a = O(a); b = O(b); var c = a.split("-") , d = b.split("-"); return 2 == c.length && 2 == d.length && c[0] == d[0] } function O(a) { var b = a.split("-"); a = b[0] || ""; b = b[1] || ""; a = a.toLowerCase(); a = bd.get(a) || a; return (b = b.toUpperCase()) ? a + "-" + b : a } function cd(a, b) { a = O(a); b = O(b); return b == a ? 4 : $c(b, a) ? 3 : ad(b, a) ? 2 : $c(a, b) ? 1 : 0 } function dd(a) { var b = a.indexOf("-"); a = 0 <= b ? a.substring(0, b) : a; a = a.toLowerCase(); return a = bd.get(a) || a } function ed(a) { return a.language ? O(a.language) : a.audio && a.audio.language ? O(a.audio.language) : a.video && a.video.language ? O(a.video.language) : "und" } function fd(a, b) { for (var c = O(a), d = new Set, e = t(b), f = e.next(); !f.done; f = e.next()) d.add(O(f.value)); e = t(d); for (f = e.next(); !f.done; f = e.next()) if (f = f.value, f == c) return f; e = t(d); for (f = e.next(); !f.done; f = e.next()) if (f = f.value, $c(f, c)) return f; e = t(d); for (f = e.next(); !f.done; f = e.next()) if (f = f.value, ad(f, c)) return f; d = t(d); for (f = d.next(); !f.done; f = d.next()) if (f = f.value, $c(c, f)) return f; return null } M("shaka.util.LanguageUtils", Yc); Yc.findClosestLocale = fd; Yc.getLocaleForVariant = ed; Yc.getLocaleForText = function(a) { return O(a.language || "und") } ; Yc.getBase = dd; Yc.relatedness = cd; Yc.areSiblings = function(a, b) { var c = dd(a) , d = dd(b); return a != c && b != d && c == d } ; Yc.normalize = O; Yc.isSiblingOf = ad; Yc.isParentOf = $c; Yc.areLanguageCompatible = Zc; Yc.areLocaleCompatible = function(a, b) { a = O(a); b = O(b); return a == b } ; var bd = new Map([["aar", "aa"], ["abk", "ab"], ["afr", "af"], ["aka", "ak"], ["alb", "sq"], ["amh", "am"], ["ara", "ar"], ["arg", "an"], ["arm", "hy"], ["asm", "as"], ["ava", "av"], ["ave", "ae"], ["aym", "ay"], ["aze", "az"], ["bak", "ba"], ["bam", "bm"], ["baq", "eu"], ["bel", "be"], ["ben", "bn"], ["bih", "bh"], ["bis", "bi"], ["bod", "bo"], ["bos", "bs"], ["bre", "br"], ["bul", "bg"], ["bur", "my"], ["cat", "ca"], ["ces", "cs"], ["cha", "ch"], ["che", "ce"], ["chi", "zh"], ["chu", "cu"], ["chv", "cv"], ["cor", "kw"], ["cos", "co"], ["cre", "cr"], ["cym", "cy"], ["cze", "cs"], ["dan", "da"], ["deu", "de"], ["div", "dv"], ["dut", "nl"], ["dzo", "dz"], ["ell", "el"], ["eng", "en"], ["epo", "eo"], ["est", "et"], ["eus", "eu"], ["ewe", "ee"], ["fao", "fo"], ["fas", "fa"], ["fij", "fj"], ["fin", "fi"], ["fra", "fr"], ["fre", "fr"], ["fry", "fy"], ["ful", "ff"], ["geo", "ka"], ["ger", "de"], ["gla", "gd"], ["gle", "ga"], ["glg", "gl"], ["glv", "gv"], ["gre", "el"], ["grn", "gn"], ["guj", "gu"], ["hat", "ht"], ["hau", "ha"], ["heb", "he"], ["her", "hz"], ["hin", "hi"], ["hmo", "ho"], ["hrv", "hr"], ["hun", "hu"], ["hye", "hy"], ["ibo", "ig"], ["ice", "is"], ["ido", "io"], ["iii", "ii"], ["iku", "iu"], ["ile", "ie"], ["ina", "ia"], ["ind", "id"], ["ipk", "ik"], ["isl", "is"], ["ita", "it"], ["jav", "jv"], ["jpn", "ja"], ["kal", "kl"], ["kan", "kn"], ["kas", "ks"], ["kat", "ka"], ["kau", "kr"], ["kaz", "kk"], ["khm", "km"], ["kik", "ki"], ["kin", "rw"], ["kir", "ky"], ["kom", "kv"], ["kon", "kg"], ["kor", "ko"], ["kua", "kj"], ["kur", "ku"], ["lao", "lo"], ["lat", "la"], ["lav", "lv"], ["lim", "li"], ["lin", "ln"], ["lit", "lt"], ["ltz", "lb"], ["lub", "lu"], ["lug", "lg"], ["mac", "mk"], ["mah", "mh"], ["mal", "ml"], ["mao", "mi"], ["mar", "mr"], ["may", "ms"], ["mkd", "mk"], ["mlg", "mg"], ["mlt", "mt"], ["mon", "mn"], ["mri", "mi"], ["msa", "ms"], ["mya", "my"], ["nau", "na"], ["nav", "nv"], ["nbl", "nr"], ["nde", "nd"], ["ndo", "ng"], ["nep", "ne"], ["nld", "nl"], ["nno", "nn"], ["nob", "nb"], ["nor", "no"], ["nya", "ny"], ["oci", "oc"], ["oji", "oj"], ["ori", "or"], ["orm", "om"], ["oss", "os"], ["pan", "pa"], ["per", "fa"], ["pli", "pi"], ["pol", "pl"], ["por", "pt"], ["pus", "ps"], ["que", "qu"], ["roh", "rm"], ["ron", "ro"], ["rum", "ro"], ["run", "rn"], ["rus", "ru"], ["sag", "sg"], ["san", "sa"], ["sin", "si"], ["slk", "sk"], ["slo", "sk"], ["slv", "sl"], ["sme", "se"], ["smo", "sm"], ["sna", "sn"], ["snd", "sd"], ["som", "so"], ["sot", "st"], ["spa", "es"], ["sqi", "sq"], ["srd", "sc"], ["srp", "sr"], ["ssw", "ss"], ["sun", "su"], ["swa", "sw"], ["swe", "sv"], ["tah", "ty"], ["tam", "ta"], ["tat", "tt"], ["tel", "te"], ["tgk", "tg"], ["tgl", "tl"], ["tha", "th"], ["tib", "bo"], ["tir", "ti"], ["ton", "to"], ["tsn", "tn"], ["tso", "ts"], ["tuk", "tk"], ["tur", "tr"], ["twi", "tw"], ["uig", "ug"], ["ukr", "uk"], ["urd", "ur"], ["uzb", "uz"], ["ven", "ve"], ["vie", "vi"], ["vol", "vo"], ["wel", "cy"], ["wln", "wa"], ["wol", "wo"], ["xho", "xh"], ["yid", "yi"], ["yor", "yo"], ["zha", "za"], ["zho", "zh"], ["zul", "zu"]]); function gd() { this.g = {} } r = gd.prototype; r.push = function(a, b) { this.g.hasOwnProperty(a) ? this.g[a].push(b) : this.g[a] = [b] } ; r.get = function(a) { return (a = this.g[a]) ? a.slice() : null } ; r.remove = function(a, b) { a in this.g && (this.g[a] = this.g[a].filter(function(c) { return c != b }), 0 == this.g[a].length && delete this.g[a]) } ; function hd(a, b) { for (var c in a.g) b(c, a.g[c]) } r.size = function() { return Object.keys(this.g).length } ; r.keys = function() { return Object.keys(this.g) } ; function id(a) { this.h = a; this.g = null } id.prototype.S = function(a) { var b = this; this.stop(); var c = !0 , d = null; this.g = function() { window.clearTimeout(d); c = !1 } ; d = window.setTimeout(function() { c && b.h() }, 1E3 * a); return this } ; id.prototype.stop = function() { this.g && (this.g(), this.g = null) } ; function Q(a) { this.h = a; this.g = null } Q.prototype.Jb = function() { this.stop(); this.h(); return this } ; Q.prototype.S = function(a) { var b = this; this.stop(); this.g = (new id(function() { b.h() } )).S(a); return this } ; Q.prototype.Ca = function(a) { var b = this; this.stop(); this.g = (new id(function() { b.g.S(a); b.h() } )).S(a); return this } ; Q.prototype.stop = function() { this.g && (this.g.stop(), this.g = null) } ; M("shaka.util.Timer", Q); Q.prototype.stop = Q.prototype.stop; Q.prototype.tickEvery = Q.prototype.Ca; Q.prototype.tickAfter = Q.prototype.S; Q.prototype.tickNow = Q.prototype.Jb; function jd() { return window.MediaSource && MediaSource.isTypeSupported ? !0 : !1 } function nd(a) { return "" != od().canPlayType(a) } function pd() { return qd("Xbox One") } function rd() { return qd("Tizen") } function sd() { return qd("CrKey") } function td() { return !!navigator.vendor && navigator.vendor.includes("Apple") && !rd() } function ud() { if (!td()) return null; var a = navigator.userAgent.match(/Version\/(\d+)/); return a ? parseInt(a[1], 10) : (a = navigator.userAgent.match(/OS (\d+)(?:_\d+)?/)) ? parseInt(a[1], 10) : null } function qd(a) { return (navigator.userAgent || "").includes(a) } function od() { if (vd) return vd; wd || (wd = new Q(function() { vd = null } )); (vd = document.getElementsByTagName("video")[0] || document.getElementsByTagName("audio")[0]) || (vd = document.createElement("video")); wd.S(1); return vd } var wd = null , vd = null; function xd(a, b, c, d, e) { var f = a.variants; if (b.length || c.length) f = yd(f, b, c); f = zd(f, d); b = Ad(f); b = Bd(b); var g = Cd(b, e); a.variants = a.variants.filter(function(h) { return Dd(h) == g ? !0 : !1 }) } function Ad(a) { var b = new gd; a = t(a); for (var c = a.next(); !c.done; c = a.next()) { c = c.value; var d = Dd(c); b.push(d, c) } return b } function Bd(a) { var b = 0 , c = new Map , d = a.size(); hd(a, function(e, f) { for (var g = t(f), h = g.next(); !h.done; h = g.next()) { h = h.value; var k = h.video; if (k && k.width && k.height) { k = k.width * k.height * (k.frameRate || 1); c.has(k) || c.set(k, new gd); var l = c.get(k); l.push(e, h); l.size() === d && (b = Math.max(b, k)) } } }); return b ? c.get(b) : a } function yd(a, b, c) { var d = {}; b = t(b); for (var e = b.next(); !e.done; d = { sd: d.sd }, e = b.next()) if (d.sd = e.value, e = a.filter(function(f) { return function(g) { return g.video && g.video.codecs.startsWith(f.sd) } }(d)), e.length) { a = e; break } d = {}; c = t(c); for (b = c.next(); !b.done; d = { dd: d.dd }, b = c.next()) if (d.dd = b.value, b = a.filter(function(f) { return function(g) { return g.audio && g.audio.codecs.startsWith(f.dd) } }(d)), b.length) { a = b; break } return a } function Cd(a, b) { for (var c = t(b), d = c.next(); !d.done; d = c.next()) if (d = d.value, d == Ed || d == Fd) { if (a = Gd(a, d), 1 == a.size()) return a.keys()[0] } else if (d == Hd) break; return Id(a) } function Gd(a, b) { var c = 0 , d = new gd; hd(a, function(e, f) { for (var g = 0, h = 0, k = t(f), l = k.next(); !l.done; l = k.next()) l = l.value, l.decodingInfos.length && (g += l.decodingInfos[0][b] ? 1 : 0, h++); g /= h; g > c ? (d.g = {}, d.push(e, f), c = g) : g == c && d.push(e, f) }); return d } function Id(a) { var b = "" , c = Infinity; hd(a, function(d, e) { for (var f = 0, g = 0, h = t(e), k = h.next(); !k.done; k = h.next()) f += k.value.bandwidth || 0, ++g; f /= g; f < c && (b = d, c = f) }); return b } function Dd(a) { var b = ""; a.video && (b = Mc(a.video.codecs)); var c = ""; a.audio && (c = Mc(a.audio.codecs)); return b + "-" + c } function Jd(a, b, c) { a.variants = a.variants.filter(function(d) { return Kd(d, b, c) }) } function Kd(a, b, c) { function d(f, g, h) { return f >= g && f <= h } var e = a.video; if (0 != a.disabledUntilTime) { if (a.disabledUntilTime > Date.now() / 1E3) return !1; a.disabledUntilTime = 0 } return e && e.width && e.height && (!d(e.width, b.minWidth, Math.min(b.maxWidth, c.width)) || !d(e.height, b.minHeight, Math.min(b.maxHeight, c.height)) || !d(e.width * e.height, b.minPixels, b.maxPixels)) || a && a.video && a.video.frameRate && !d(a.video.frameRate, b.minFrameRate, b.maxFrameRate) || !d(a.bandwidth, b.minBandwidth, b.maxBandwidth) ? !1 : !0 } function Ld(a, b, c) { var d = !1; a = t(a); for (var e = a.next(); !e.done; e = a.next()) { e = e.value; var f = e.allowedByApplication; e.allowedByApplication = Kd(e, b, c); f != e.allowedByApplication && (d = !0) } return d } function Md(a, b) { return L(function(c) { if (1 == c.g) return u(c, Nd(b, 0 < b.offlineSessionIds.length), 2); Od(a, b); Pd(b); return u(c, Qd(b), 0) }) } function Nd(a, b) { return L(function(c) { if (1 == c.g) return u(c, Rd(a.variants, b, !1), 2); a.variants = a.variants.filter(function(d) { var e = d.video; if (e) { var f = Sd(e.codecs); if (e.codecs.includes(",")) { var g = e.codecs.split(","); f = ic("video", g); g = ic("audio", g); g = Lc(e.mimeType, g, "audio"); if (!MediaSource.isTypeSupported(g)) return !1 } f = Lc(e.mimeType, f, "video"); if (!MediaSource.isTypeSupported(f)) return !1 } if (f = d.audio) if (g = Td(f.codecs), f = Lc(f.mimeType, g, "audio"), !MediaSource.isTypeSupported(f)) return !1; if (pd() && e && (e.width && 1920 < e.width || e.height && 1080 < e.height) && e.codecs.includes("avc1.")) return Za(Ud(d)), !1; (e = d.decodingInfos.some(function(h) { return h.supported })) || Za(Ud(d)); return e }); z(c) }) } function Rd(a, b, c) { var d, e, f, g, h, k, l, m, n, p, q; return L(function(x) { if (d = a.some(function(y) { return y.decodingInfos.length })) return x["return"](); e = navigator.mediaCapabilities; f = []; g = function(y, w) { var v; return L(function(D) { if (1 == D.g) return B(D, 2), u(D, e.decodingInfo(w), 4); if (2 != D.g) return v = D.h, y.decodingInfos.push(v), va(D, 0); F(D); JSON.stringify(w); z(D) }) } ; h = t(a); for (k = h.next(); !k.done; k = h.next()) for (l = k.value, m = Vd(l, b, c), n = t(m), p = n.next(); !p.done; p = n.next()) q = p.value, f.push(g(l, q)); return u(x, Promise.all(f), 0) }) } function Vd(a, b, c) { var d = a.audio , e = a.video; c = { type: c ? "file" : "media-source" }; if (e) { var f = e.codecs; if (e.codecs.includes(",")) { var g = e.codecs.split(","); f = ic("video", g); f = Sd(f); g = ic("audio", g); g = Lc(e.mimeType, g, "audio"); c.audio = { contentType: g, channels: 2, bitrate: a.bandwidth || 1, samplerate: 1, spatialRendering: !1 } } f = Sd(f); f = Lc(e.mimeType, f, "video"); c.video = { contentType: f, width: e.width || 1, height: e.height || 1, bitrate: e.bandwidth || a.bandwidth || 1, framerate: e.frameRate || 1 }; if (e.hdr) switch (e.hdr) { case "SDR": c.video.transferFunction = "srgb"; break; case "PQ": c.video.transferFunction = "pq"; break; case "HLG": c.video.transferFunction = "hlg" } } d && (f = Td(d.codecs), f = Lc(d.mimeType, f, "audio"), c.audio = { contentType: f, channels: d.channelsCount || 2, bitrate: d.bandwidth || a.bandwidth || 1, samplerate: d.audioSamplingRate || 1, spatialRendering: d.spatialAudio }); g = (a.video ? a.video.drmInfos : []).concat(a.audio ? a.audio.drmInfos : []); if (!g.length) return [c]; a = []; f = new Map; g = t(g); for (var h = g.next(); !h.done; h = g.next()) { var k = h.value; f.get(k.keySystem) || f.set(k.keySystem, []); f.get(k.keySystem).push(k) } g = b ? "required" : "optional"; b = b ? ["persistent-license"] : ["temporary"]; k = t(f.keys()); for (var l = k.next(); !l.done; l = k.next()) { var m = l.value; l = Object.assign({}, c); var n = f.get(m); m = { keySystem: m, initDataType: "cenc", persistentState: g, distinctiveIdentifier: "optional", sessionTypes: b }; n = t(n); for (h = n.next(); !h.done; h = n.next()) { h = h.value; if (h.initData && h.initData.length) { for (var p = new Set, q = t(h.initData), x = q.next(); !x.done; x = q.next()) p.add(x.value.initDataType); m.initDataType = h.initData[0].initDataType } h.distinctiveIdentifierRequired && (m.distinctiveIdentifier = "required"); h.persistentStateRequired && (m.persistentState = "required"); h.sessionType && (m.sessionTypes = [h.sessionType]); d && (m.audio ? m.audio.robustness = m.audio.robustness || h.audioRobustness : m.audio = { robustness: h.audioRobustness }); e && (m.video ? m.video.robustness = m.video.robustness || h.videoRobustness : m.video = { robustness: h.videoRobustness }) } l.keySystemConfiguration = m; a.push(l) } return a } function Td(a) { return rd() ? "ac-3" == a.toLowerCase() ? "ec-3" : a : a } function Sd(a) { return "vp9" == a ? "vp09.00.10.08" : a } function Od(a, b) { b.variants = b.variants.filter(function(c) { var d = c.audio; c = c.video; return d && a && a.audio && !Wd(d, a.audio) || c && a && a.video && !Wd(c, a.video) ? !1 : !0 }) } function Pd(a) { a.textStreams = a.textStreams.filter(function(b) { return Qc(Kc(b.mimeType, b.codecs)) }) } function Qd(a) { var b, c, d, e, f, g, h, k; return L(function(l) { switch (l.g) { case 1: b = [], c = t(a.imageStreams), d = c.next(); case 2: if (d.done) { l.A(4); break } e = d.value; f = e.mimeType; if (Xd.has(f)) { l.A(5); break } g = Yd.get(f); if (!g) { Xd.set(f, !1); l.A(5); break } return u(l, Zd(g), 7); case 7: h = l.h, Xd.set(f, h); case 5: (k = Xd.get(f)) && b.push(e); d = c.next(); l.A(2); break; case 4: a.imageStreams = b, z(l) } }) } function Zd(a) { return new Promise(function(b) { var c = new Image; c.src = a; "decode"in c ? c.decode().then(function() { b(!0) })["catch"](function() { b(!1) }) : c.onload = c.onerror = function() { b(2 === c.height) } } ) } function Wd(a, b) { return a.mimeType != b.mimeType || a.codecs.split(".")[0] != b.codecs.split(".")[0] ? !1 : !0 } function $d(a) { var b = a.audio , c = a.video , d = b ? b.mimeType : null , e = c ? c.mimeType : null , f = b ? b.codecs : null , g = c ? c.codecs : null , h = []; g && h.push(g); f && h.push(f); var k = []; c && k.push(c.mimeType); b && k.push(b.mimeType); k = k[0] || null; var l = []; b && l.push(b.kind); c && l.push(c.kind); l = l[0] || null; var m = new Set; if (b) for (var n = t(b.roles), p = n.next(); !p.done; p = n.next()) m.add(p.value); if (c) for (n = t(c.roles), p = n.next(); !p.done; p = n.next()) m.add(p.value); a = { id: a.id, active: !1, type: "variant", bandwidth: a.bandwidth, language: a.language, label: null, kind: l, width: null, height: null, frameRate: null, pixelAspectRatio: null, hdr: null, mimeType: k, audioMimeType: d, videoMimeType: e, codecs: h.join(", "), audioCodec: f, videoCodec: g, primary: a.primary, roles: Array.from(m), audioRoles: null, forced: !1, videoId: null, audioId: null, channelsCount: null, audioSamplingRate: null, spatialAudio: !1, tilesLayout: null, audioBandwidth: null, videoBandwidth: null, originalVideoId: null, originalAudioId: null, originalTextId: null, originalImageId: null }; c && (a.videoId = c.id, a.originalVideoId = c.originalId, a.width = c.width || null, a.height = c.height || null, a.frameRate = c.frameRate || null, a.pixelAspectRatio = c.pixelAspectRatio || null, a.videoBandwidth = c.bandwidth || null); b && (a.audioId = b.id, a.originalAudioId = b.originalId, a.channelsCount = b.channelsCount, a.audioSamplingRate = b.audioSamplingRate, a.audioBandwidth = b.bandwidth || null, a.spatialAudio = b.spatialAudio, a.label = b.label, a.audioRoles = b.roles); return a } function ae(a) { return { id: a.id, active: !1, type: lc, bandwidth: 0, language: a.language, label: a.label, kind: a.kind || null, width: null, height: null, frameRate: null, pixelAspectRatio: null, hdr: null, mimeType: a.mimeType, audioMimeType: null, videoMimeType: null, codecs: a.codecs || null, audioCodec: null, videoCodec: null, primary: a.primary, roles: a.roles, audioRoles: null, forced: a.forced, videoId: null, audioId: null, channelsCount: null, audioSamplingRate: null, spatialAudio: !1, tilesLayout: null, audioBandwidth: null, videoBandwidth: null, originalVideoId: null, originalAudioId: null, originalTextId: a.originalId, originalImageId: null } } function be(a) { var b = a.width || null , c = a.height || null , d = null; a.segmentIndex && (d = a.segmentIndex.get(0)); var e = a.tilesLayout; d && (e = d.tilesLayout || e); e && null != b && (b /= Number(e.split("x")[0])); e && null != c && (c /= Number(e.split("x")[1])); return { id: a.id, active: !1, type: "image", bandwidth: a.bandwidth || 0, language: "", label: null, kind: null, width: b, height: c, frameRate: null, pixelAspectRatio: null, hdr: null, mimeType: a.mimeType, audioMimeType: null, videoMimeType: null, codecs: null, audioCodec: null, videoCodec: null, primary: !1, roles: [], audioRoles: null, forced: !1, videoId: null, audioId: null, channelsCount: null, audioSamplingRate: null, spatialAudio: !1, tilesLayout: e || null, audioBandwidth: null, videoBandwidth: null, originalVideoId: null, originalAudioId: null, originalTextId: null, originalImageId: a.originalId } } function ce(a) { a.__shaka_id || (a.__shaka_id = de++); return a.__shaka_id } function ee(a) { var b = fe(a); b.active = "disabled" != a.mode; b.type = "text"; b.originalTextId = a.id; "captions" == a.kind && (b.mimeType = "application/cea-608"); a.kind && (b.roles = [a.kind]); "forced" == a.kind && (b.forced = !0); return b } function he(a) { var b = fe(a); b.active = a.enabled; b.type = "variant"; b.originalAudioId = a.id; "main" == a.kind && (b.primary = !0); a.kind && (b.roles = [a.kind], b.audioRoles = [a.kind], b.label = a.label); return b } function fe(a) { return { id: ce(a), active: !1, type: "", bandwidth: 0, language: O(a.language), label: a.label, kind: a.kind, width: null, height: null, frameRate: null, pixelAspectRatio: null, hdr: null, mimeType: null, audioMimeType: null, videoMimeType: null, codecs: null, audioCodec: null, videoCodec: null, primary: !1, roles: [], forced: !1, audioRoles: null, videoId: null, audioId: null, channelsCount: null, audioSamplingRate: null, spatialAudio: !1, tilesLayout: null, audioBandwidth: null, videoBandwidth: null, originalVideoId: null, originalAudioId: null, originalTextId: null, originalImageId: null } } function ie(a) { return a.allowedByApplication && a.allowedByKeySystem } function je(a) { return a.filter(function(b) { return ie(b) }) } function zd(a, b) { var c = a.filter(function(g) { return g.audio && g.audio.channelsCount }) , d = new Map; c = t(c); for (var e = c.next(); !e.done; e = c.next()) { e = e.value; var f = e.audio.channelsCount; d.has(f) || d.set(f, []); d.get(f).push(e) } c = Array.from(d.keys()); if (0 == c.length) return a; e = c.filter(function(g) { return g <= b }); return e.length ? d.get(Math.max.apply(Math, ia(e))) : d.get(Math.min.apply(Math, ia(c))) } function ke(a, b, c, d) { var e = a , f = a.filter(function(k) { return k.primary }); f.length && (e = f); var g = e.length ? e[0].language : ""; e = e.filter(function(k) { return k.language == g }); if (b) { var h = fd(O(b), a.map(function(k) { return k.language })); h && (e = a.filter(function(k) { return O(k.language) == h })) } e = e.filter(function(k) { return k.forced == d }); if (c) { if (a = le(e, c), a.length) return a } else if (a = e.filter(function(k) { return 0 == k.roles.length }), a.length) return a; a = e.map(function(k) { return k.roles }).reduce(ac, []); return a.length ? le(e, a[0]) : e } function le(a, b) { return a.filter(function(c) { return c.roles.includes(b) }) } function Ud(a) { var b = []; a.audio && b.push(me(a.audio)); a.video && b.push(me(a.video)); return b.join(", ") } function me(a) { return "audio" == a.type ? "type=audio codecs=" + a.codecs + " bandwidth=" + a.bandwidth + " channelsCount=" + a.channelsCount + " audioSamplingRate=" + a.audioSamplingRate : "video" == a.type ? "type=video codecs=" + a.codecs + " bandwidth=" + a.bandwidth + " frameRate=" + a.frameRate + " width=" + a.width + " height=" + a.height : "unexpected stream type" } var de = 0 , Ed = "smooth" , Fd = "powerEfficient" , Hd = "bandwidth" , Xd = (new Map).set("image/svg+xml", !0).set("image/png", !0).set("image/jpeg", !0).set("image/jpg", !0) , Yd = (new Map).set("image/webp", "data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif", "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="); function ne() { var a = this; this.l = null; this.j = !1; this.h = new Sa; navigator.connection && navigator.connection.addEventListener("change", function() { if (a.g.useNetworkInformation && a.j) { a.h = new Sa; a.g && a.h.configure(a.g.advanced); var b = a.chooseVariant(); b && a.l(b) } }); this.i = []; this.o = 1; this.s = !1; this.g = this.m = null } r = ne.prototype; r.stop = function() { this.l = null; this.j = !1; this.i = []; this.o = 1; this.m = null } ; r.init = function(a) { this.l = a } ; r.chooseVariant = function() { var a = oe(this.g.restrictions, this.i) , b = this.h.getBandwidthEstimate(pe(this)); this.i.length && !a.length && (a = oe(null, this.i), a = [a[0]]); for (var c = a[0] || null, d = 0; d < a.length; d++) { for (var e = a[d], f = isNaN(this.o) ? 1 : Math.abs(this.o), g = f * e.bandwidth / this.g.bandwidthDowngradeTarget, h = { bandwidth: Infinity }, k = d + 1; k < a.length; k++) if (e.bandwidth != a[k].bandwidth) { h = a[k]; break } f = f * h.bandwidth / this.g.bandwidthUpgradeTarget; b >= g && b <= f && c.bandwidth != e.bandwidth && (c = e) } this.m = Date.now(); return c } ; r.enable = function() { this.j = !0 } ; r.disable = function() { this.j = !1 } ; r.segmentDownloaded = function(a, b) { this.h.sample(a, b); if (null != this.m && this.j) a: { if (!this.s) { var c = this.h; if (!(c.g >= c.i)) break a; this.s = !0 } else if (Date.now() - this.m < 1E3 * this.g.switchInterval) break a; c = this.chooseVariant(); this.h.getBandwidthEstimate(pe(this)); c && this.l(c) } } ; r.getBandwidthEstimate = function() { return this.h.getBandwidthEstimate(pe(this)) } ; r.setVariants = function(a) { this.i = a } ; r.playbackRateChanged = function(a) { this.o = a } ; r.configure = function(a) { this.g = a; this.h && this.g && this.h.configure(this.g.advanced) } ; function pe(a) { var b = a.g.defaultBandwidthEstimate; navigator.connection && navigator.connection.downlink && a.g.useNetworkInformation && (b = 1E6 * navigator.connection.downlink); return b } function oe(a, b) { a && (b = b.filter(function(c) { return Kd(c, a, { width: Infinity, height: Infinity }) })); return b.sort(function(c, d) { return c.bandwidth - d.bandwidth }) } M("shaka.abr.SimpleAbrManager", ne); ne.prototype.configure = ne.prototype.configure; ne.prototype.playbackRateChanged = ne.prototype.playbackRateChanged; ne.prototype.setVariants = ne.prototype.setVariants; ne.prototype.getBandwidthEstimate = ne.prototype.getBandwidthEstimate; ne.prototype.segmentDownloaded = ne.prototype.segmentDownloaded; ne.prototype.disable = ne.prototype.disable; ne.prototype.enable = ne.prototype.enable; ne.prototype.chooseVariant = ne.prototype.chooseVariant; ne.prototype.init = ne.prototype.init; ne.prototype.stop = ne.prototype.stop; function qe(a, b) { this.h = a; this.g = new Set([a]); b = b || []; for (var c = t(b), d = c.next(); !d.done; d = c.next()) this.add(d.value) } qe.prototype.add = function(a) { return re(this.h, a) ? (this.g.add(a), !0) : !1 } ; function re(a, b) { var c; if (!(c = !!a.audio != !!b.audio || !!a.video != !!b.video || a.language != b.language) && (c = a.audio && b.audio)) { c = a.audio; var d = b.audio; c = !((!(!c.channelsCount || !d.channelsCount || 2 < c.channelsCount || 2 < d.channelsCount) || c.channelsCount == d.channelsCount) && se(c, d) && te(c.roles, d.roles)) } !c && (c = a.video && b.video) && (c = a.video, d = b.video, c = !(se(c, d) && te(c.roles, d.roles))); return c ? !1 : !0 } qe.prototype.values = function() { return this.g.values() } ; function se(a, b) { if (a.mimeType != b.mimeType) return !1; var c = a.codecs.split(",").map(function(f) { return Nc(f)[0] }) , d = b.codecs.split(",").map(function(f) { return Nc(f)[0] }); if (c.length != d.length) return !1; c.sort(); d.sort(); for (var e = 0; e < c.length; e++) if (c[e] != d[e]) return !1; return !0 } function te(a, b) { var c = new Set(a) , d = new Set(b); c["delete"]("main"); d["delete"]("main"); if (c.size != d.size) return !1; c = t(c); for (var e = c.next(); !e.done; e = c.next()) if (!d.has(e.value)) return !1; return !0 } ;function ue(a) { this.g = a; this.h = new ve(a.language,"",a.audio && a.audio.channelsCount ? a.audio.channelsCount : 0,"") } ue.prototype.create = function(a) { var b = this , c = a.filter(function(d) { return re(b.g, d) }); return c.length ? new qe(c[0],c) : this.h.create(a) } ; function ve(a, b, c, d) { this.i = a; this.j = b; this.g = c; this.h = void 0 === d ? "" : d } ve.prototype.create = function(a) { var b = []; b = we(a, this.i); var c = a.filter(function(d) { return d.primary }); b = b.length ? b : c.length ? c : a; a = xe(b, this.j); a.length && (b = a); this.g && (a = zd(b, this.g), a.length && (b = a)); this.h && (a = ye(b, this.h), a.length && (b = a)); a = new qe(b[0]); b = t(b); for (c = b.next(); !c.done; c = b.next()) c = c.value, re(a.h, c) && a.add(c); return a } ; function we(a, b) { var c = O(b) , d = fd(c, a.map(function(e) { return ed(e) })); return d ? a.filter(function(e) { return d == ed(e) }) : [] } function xe(a, b) { return a.filter(function(c) { return c.audio ? b ? c.audio.roles.includes(b) : 0 == c.audio.roles.length : !1 }) } function ye(a, b) { return a.filter(function(c) { return c.audio ? c.audio.label.toLowerCase() == b.toLowerCase() : !1 }) } ;function ze() { this.g = Ae; this.h = (new Map).set(Ae, 2).set(Be, 1) } function Ce(a, b, c) { a.h.set(Ae, c).set(Be, b) } var Be = 0 , Ae = 1; function De(a, b) { var c = Ee(); this.l = null == a.maxAttempts ? c.maxAttempts : a.maxAttempts; this.j = null == a.baseDelay ? c.baseDelay : a.baseDelay; this.o = null == a.fuzzFactor ? c.fuzzFactor : a.fuzzFactor; this.m = null == a.backoffFactor ? c.backoffFactor : a.backoffFactor; this.g = 0; this.h = this.j; if (this.i = void 0 === b ? !1 : b) this.g = 1 } function Fe(a) { var b, c; return L(function(d) { if (1 == d.g) { if (a.g >= a.l) if (a.i) a.g = 1, a.h = a.j; else throw new N(2,7,1010); b = a.g; a.g++; if (0 == b) return d["return"](); c = a.h * (1 + (2 * Math.random() - 1) * a.o); return u(d, new Promise(function(e) { (new Q(e)).S(c / 1E3) } ), 2) } a.h *= a.m; z(d) }) } function Ee() { return { maxAttempts: 2, baseDelay: 1E3, backoffFactor: 2, fuzzFactor: .5, timeout: 3E4, stallTimeout: 5E3, connectionTimeout: 1E4 } } ;function Ge(a, b) { this.promise = a; this.i = b; this.g = !1 } function He(a) { return new Ge(Promise.reject(a),function() { return Promise.resolve() } ) } function Ie() { var a = Promise.reject(new N(2,7,7001)); a["catch"](function() {}); return new Ge(a,function() { return Promise.resolve() } ) } function Je(a) { return new Ge(Promise.resolve(a),function() { return Promise.resolve() } ) } function Ke(a) { return new Ge(a,function() { return a["catch"](function() {}) } ) } Ge.prototype.abort = function() { this.g = !0; return this.i() } ; function Le(a) { return new Ge(Promise.all(a.map(function(b) { return b.promise })),function() { return Promise.all(a.map(function(b) { return b.abort() })) } ) } Ge.prototype["finally"] = function(a) { this.promise.then(function() { return a(!0) }, function() { return a(!1) }); return this } ; Ge.prototype.Z = function(a, b) { function c(h) { return function(k) { if (e.g && h) f.reject(g); else { var l = h ? a : b; l ? d = Me(l, k, f) : (h ? f.resolve : f.reject)(k) } } } function d() { f.reject(g); return e.abort() } var e = this , f = new nc , g = new N(2,7,7001); this.promise.then(c(!0), c(!1)); return new Ge(f,function() { return d() } ) } ; function Me(a, b, c) { try { var d = a(b); if (d && d.promise && d.abort) return c.resolve(d.promise), function() { return d.abort() } ; c.resolve(d); return function() { return Promise.resolve(d).then(function() {}, function() {}) } } catch (e) { return c.reject(e), function() { return Promise.resolve() } } } M("shaka.util.AbortableOperation", Ge); Ge.prototype.chain = Ge.prototype.Z; Ge.prototype["finally"] = Ge.prototype["finally"]; Ge.all = Le; Ge.prototype.abort = Ge.prototype.abort; Ge.notAbortable = Ke; Ge.completed = Je; Ge.aborted = Ie; Ge.failed = He; function R(a, b) { if (b) if (b instanceof Map) for (var c = t(b.keys()), d = c.next(); !d.done; d = c.next()) d = d.value, Object.defineProperty(this, d, { value: b.get(d), writable: !0, enumerable: !0 }); else for (c in b) Object.defineProperty(this, c, { value: b[c], writable: !0, enumerable: !0 }); this.defaultPrevented = this.cancelable = this.bubbles = !1; this.timeStamp = window.performance && window.performance.now ? window.performance.now() : Date.now(); this.type = a; this.isTrusted = !1; this.target = this.currentTarget = null; this.g = !1 } function Ne(a) { var b = new R(a.type), c; for (c in a) Object.defineProperty(b, c, { value: a[c], writable: !0, enumerable: !0 }); return b } R.prototype.preventDefault = function() { this.cancelable && (this.defaultPrevented = !0) } ; R.prototype.stopImmediatePropagation = function() { this.g = !0 } ; R.prototype.stopPropagation = function() {} ; M("shaka.util.FakeEvent", R); var Oe = { og: "abrstatuschanged", pg: "adaptation", qg: "buffering", sg: "downloadfailed", tg: "downloadheadersreceived", ug: "drmsessionupdate", wg: "emsg", Error: "error", xg: "expirationupdated", yg: "gapjumped", Ag: "loaded", Bg: "loading", Dg: "manifestparsed", Eg: "mediaqualitychanged", Metadata: "metadata", Gg: "onstatechange", Hg: "onstateidle", Ig: "ratechange", Kg: "sessiondata", Lg: "stalldetected", Mg: "streaming", Ng: "textchanged", Og: "texttrackvisibility", Pg: "timelineregionadded", Qg: "timelineregionenter", Rg: "timelineregionexit", Sg: "trackschanged", Ug: "unloading", Vg: "variantchanged" }; function Pe() { this.da = new gd; this.Ic = this } Pe.prototype.addEventListener = function(a, b) { this.da && this.da.push(a, b) } ; Pe.prototype.removeEventListener = function(a, b) { this.da && this.da.remove(a, b) } ; Pe.prototype.dispatchEvent = function(a) { if (!this.da) return !0; var b = this.da.get(a.type) || [] , c = this.da.get("All"); c && (b = b.concat(c)); b = t(b); for (c = b.next(); !c.done; c = b.next()) { c = c.value; a.target = this.Ic; a.currentTarget = this.Ic; try { c.handleEvent ? c.handleEvent(a) : c.call(this, a) } catch (d) {} if (a.g) break } return a.defaultPrevented } ; Pe.prototype.release = function() { this.da = null } ; function Qe(a) { function b(d) { switch (typeof d) { case "undefined": case "boolean": case "number": case "string": case "symbol": case "function": return d; default: if (!d || d.buffer && d.buffer.constructor == ArrayBuffer) return d; if (c.has(d)) return null; var e = d.constructor == Array; if (d.constructor != Object && !e) return null; c.add(d); var f = e ? [] : {}, g; for (g in d) f[g] = b(d[g]); e && (f.length = d.length); return f } } var c = new Set; return b(a) } function Re(a) { var b = {}, c; for (c in a) b[c] = a[c]; return b } ;function Se() { this.g = [] } function Te(a, b) { a.g.push(b["finally"](function() { eb(a.g, b) })) } Se.prototype.destroy = function() { for (var a = [], b = t(this.g), c = b.next(); !c.done; c = b.next()) c = c.value, c.promise["catch"](function() {}), a.push(c.abort()); this.g = []; return Promise.all(a) } ; function Ue(a, b, c) { Pe.call(this); this.i = !1; this.m = new Se; this.g = new Set; this.h = new Set; this.l = a || null; this.j = b || null; this.s = c || null; this.o = !1 } pa(Ue, Pe); r = Ue.prototype; r.Xd = function(a) { this.o = a } ; function Ve(a, b, c, d) { c = c || We; var e = Xe[a]; if (!e || c >= e.priority) Xe[a] = { priority: c, Pf: b, Qf: void 0 === d ? !1 : d } } r.Rf = function(a) { this.g.add(a) } ; r.hg = function(a) { this.g["delete"](a) } ; r.Ze = function() { this.g.clear() } ; r.Sf = function(a) { this.h.add(a) } ; r.ig = function(a) { this.h["delete"](a) } ; r.$e = function() { this.h.clear() } ; function Ye(a, b, c) { return { uris: a, method: "GET", body: null, headers: {}, allowCrossSiteCredentials: !1, retryParameters: b, licenseRequestType: null, sessionId: null, drmInfo: null, initData: null, initDataType: null, streamDataCallback: void 0 === c ? null : c } } r.destroy = function() { this.i = !0; this.g.clear(); this.h.clear(); Pe.prototype.release.call(this); return this.m.destroy() } ; r.request = function(a, b) { var c = this , d = new Ze; if (this.i) { var e = Promise.reject(new N(2,7,7001)); e["catch"](function() {}); return new $e(e,function() { return Promise.resolve() } ,d) } b.method = b.method || "GET"; b.headers = b.headers || {}; b.retryParameters = b.retryParameters ? Qe(b.retryParameters) : Ee(); b.uris = Qe(b.uris); e = af(this, a, b); var f = e.Z(function() { return bf(c, a, b, new De(b.retryParameters,!1), 0, null, d) }) , g = f.Z(function(n) { return cf(c, a, n) }) , h = Date.now() , k = 0; e.promise.then(function() { k = Date.now() - h }, function() {}); var l = 0; f.promise.then(function() { l = Date.now() }, function() {}); var m = g.Z(function(n) { var p = Date.now() - l , q = n.response; q.timeMs += k; q.timeMs += p; n.Ef || !c.l || q.fromCache || a != df || c.l(q.timeMs, q.data.byteLength); return q }, function(n) { n && (n.severity = 2); throw n; }); e = new $e(m.promise,function() { return m.abort() } ,d); Te(this.m, e); return e } ; function af(a, b, c) { var d = Je(void 0) , e = {}; a = t(a.g); for (var f = a.next(); !f.done; e = { nd: e.nd }, f = a.next()) e.nd = f.value, d = d.Z(function(g) { return function() { c.body && (c.body = Gb(c.body)); return g.nd(b, c) } }(e)); return d.Z(void 0, function(g) { if (g instanceof N && 7001 == g.code) throw g; throw new N(2,1,1006,g); }) } function bf(a, b, c, d, e, f, g) { a.o && (c.uris[e] = c.uris[e].replace("http://", "https://")); var h = new Nb(c.uris[e]) , k = h.Ea , l = !1; k || (k = location.protocol, k = k.slice(0, -1), Ob(h, k), c.uris[e] = h.toString()); k = k.toLowerCase(); var m = (k = Xe[k]) ? k.Pf : null; if (!m) return He(new N(2,1,1E3,h)); var n = k.Qf, p = null, q = null, x = !1, y = !1, w; return Ke(Fe(d)).Z(function() { if (a.i) return Ie(); w = Date.now(); var v = m(c.uris[e], c, b, function(A, G, E) { p && p.stop(); q && q.S(C / 1E3); a.l && b == df && (a.l(A, G), l = !0, g.g = E) }, function(A) { a.j && a.j(A, c, b); y = !0 }); if (!n) return v; var D = c.retryParameters.connectionTimeout; D && (p = new Q(function() { x = !0; v.abort() } ), p.S(D / 1E3)); var C = c.retryParameters.stallTimeout; C && (q = new Q(function() { x = !0; v.abort() } )); return v }).Z(function(v) { p && p.stop(); q && q.stop(); void 0 == v.timeMs && (v.timeMs = Date.now() - w); var D = { response: v, Ef: l }; !y && a.j && a.j(v.headers, c, b); return D }, function(v) { p && p.stop(); q && q.stop(); if (a.s) { var D = null , C = 0; v instanceof N && (D = v, 1001 == v.code && (C = v.data[1])); a.s(c, D, C, x) } if (a.i) return Ie(); x && (v = new N(1,1,1003,c.uris[e],b)); if (v instanceof N) { if (7001 == v.code) throw v; if (1010 == v.code) throw f; if (1 == v.severity) return D = (new Map).set("error", v), D = new R("retry",D), a.dispatchEvent(D), e = (e + 1) % c.uris.length, bf(a, b, c, d, e, v, g) } throw v; }) } function cf(a, b, c) { var d = Je(void 0) , e = {}; a = t(a.h); for (var f = a.next(); !f.done; e = { od: e.od }, f = a.next()) e.od = f.value, d = d.Z(function(g) { return function() { var h = c.response; h.data && (h.data = Gb(h.data)); return g.od(b, h) } }(e)); return d.Z(function() { return c }, function(g) { var h = 2; if (g instanceof N) { if (7001 == g.code) throw g; h = g.severity } throw new N(h,1,1007,g); }) } M("shaka.net.NetworkingEngine", Ue); Ue.prototype.request = Ue.prototype.request; Ue.prototype.destroy = Ue.prototype.destroy; Ue.makeRequest = Ye; Ue.defaultRetryParameters = function() { return Ee() } ; Ue.prototype.clearAllResponseFilters = Ue.prototype.$e; Ue.prototype.unregisterResponseFilter = Ue.prototype.ig; Ue.prototype.registerResponseFilter = Ue.prototype.Sf; Ue.prototype.clearAllRequestFilters = Ue.prototype.Ze; Ue.prototype.unregisterRequestFilter = Ue.prototype.hg; Ue.prototype.registerRequestFilter = Ue.prototype.Rf; Ue.unregisterScheme = function(a) { delete Xe[a] } ; Ue.registerScheme = Ve; Ue.prototype.setForceHTTPS = Ue.prototype.Xd; function Ze() { this.g = 0 } Ue.NumBytesRemainingClass = Ze; function $e(a, b, c) { Ge.call(this, a, b); this.h = c } pa($e, Ge); Ue.PendingRequest = $e; var df = 1; Ue.RequestType = { MANIFEST: 0, SEGMENT: df, LICENSE: 2, APP: 3, TIMING: 4, SERVER_CERTIFICATE: 5 }; var We = 3; Ue.PluginPriority = { FALLBACK: 1, PREFERRED: 2, APPLICATION: We }; var Xe = {}; function ef(a) { this.g = !1; this.h = new nc; this.i = a } ef.prototype.destroy = function() { var a = this; if (this.g) return this.h; this.g = !0; return this.i().then(function() { a.h.resolve() }, function() { a.h.resolve() }) } ; function ff(a, b) { if (a.g) { if (b instanceof N && 7003 == b.code) throw b; throw new N(2,7,7003,b); } } ;function gf() { this.g = new gd } r = gf.prototype; r.release = function() { this.oc(); this.g = null } ; r.B = function(a, b, c, d) { this.g && (a = new hf(a,b,c,d), this.g.push(b, a)) } ; r.oa = function(a, b, c, d) { function e(g) { f.uc(a, b, e); c(g) } var f = this; this.B(a, b, e, d) } ; r.uc = function(a, b, c) { if (this.g) { var d = this.g.get(b) || []; d = t(d); for (var e = d.next(); !e.done; e = d.next()) e = e.value, e.target != a || c != e.listener && c || (e.uc(), this.g.remove(b, e)) } } ; r.oc = function() { if (this.g) { var a = this.g, b = [], c; for (c in a.g) b.push.apply(b, ia(a.g[c])); a = t(b); for (b = a.next(); !b.done; b = a.next()) b.value.uc(); this.g.g = {} } } ; M("shaka.util.EventManager", gf); gf.prototype.removeAll = gf.prototype.oc; gf.prototype.unlisten = gf.prototype.uc; gf.prototype.listenOnce = gf.prototype.oa; gf.prototype.listen = gf.prototype.B; gf.prototype.release = gf.prototype.release; function hf(a, b, c, d) { this.target = a; this.type = b; this.listener = c; this.g = jf(a, d); this.target.addEventListener(b, c, this.g) } hf.prototype.uc = function() { this.target.removeEventListener(this.type, this.listener, this.g); this.listener = this.target = null; this.g = !1 } ; function jf(a, b) { if (void 0 == b) return !1; if ("boolean" == typeof b) return b; var c = new Set(["passive", "capture"]); Object.keys(b).filter(function(d) { return !c.has(d) }); return kf(a) ? b : b.capture || !1 } function kf(a) { var b = lf; if (void 0 == b) { b = !1; try { var c = {} , d = { get: function() { b = !0; return !1 } }; Object.defineProperty(c, "passive", d); Object.defineProperty(c, "capture", d); d = function() {} ; a.addEventListener("test", d, c); a.removeEventListener("test", d, c) } catch (e) { b = !1 } lf = b } return b || !1 } var lf = void 0; function mf(a, b) { for (var c = [], d = t(a), e = d.next(); !e.done; e = d.next()) c.push(b(e.value)); return c } function nf(a, b) { for (var c = t(a), d = c.next(); !d.done; d = c.next()) if (!b(d.value)) return !1; return !0 } ;function of(a) { for (var b = new Map, c = t(Object.keys(a)), d = c.next(); !d.done; d = c.next()) d = d.value, b.set(d, a[d]); return b } function pf(a) { var b = {}; a.forEach(function(c, d) { b[d] = c }); return b } function qf(a, b) { if (a || b) { if (a && !b || b && !a) return !1 } else return !0; if (a.size != b.size) return !1; for (var c = t(a), d = c.next(); !d.done; d = c.next()) { var e = t(d.value); d = e.next().value; e = e.next().value; if (!b.has(d)) return !1; d = b.get(d); if (d != e || void 0 == d) return !1 } return !0 } ;function rf(a, b) { var c = this; b = void 0 === b ? 1 : b; this.D = a; this.G = new Set; this.l = this.s = null; this.ha = this.ca = !1; this.I = 0; this.g = null; this.o = new gf; this.i = new Map; this.C = []; this.u = new nc; this.h = null; this.m = function(d) { c.u.reject(d); a.onError(d) } ; this.ia = new Map; this.da = new Map; this.T = new Q(function() { return sf(c) } ); this.M = !1; this.L = []; this.O = !1; this.ea = (new Q(function() { tf(c) } )).Ca(b); this.u["catch"](function() {}); this.j = new ef(function() { return uf(c) } ); this.Y = !1; this.F = null } r = rf.prototype; r.destroy = function() { return this.j.destroy() } ; function uf(a) { return L(function(b) { switch (b.g) { case 1: return a.o.release(), a.o = null, a.u.reject(), a.ea.stop(), a.ea = null, a.T.stop(), a.T = null, u(b, vf(a), 2); case 2: if (!a.l) { b.A(3); break } B(b, 4); return u(b, a.l.setMediaKeys(null), 6); case 6: va(b, 5); break; case 4: F(b); case 5: a.l = null; case 3: a.g = null, a.G.clear(), a.s = null, a.C = [], a.h = null, a.m = function() {} , a.D = null, a.Y = !1, a.F = null, z(b) } }) } r.configure = function(a) { this.h = a } ; function wf(a, b, c) { a.ha = !0; a.C = []; a.M = c; return xf(a, b) } function yf(a, b, c) { a.C = c; a.M = 0 < c.length; return xf(a, b) } function zf(a, b, c, d, e, f) { var g = new Map; e = { audioCapabilities: e, videoCapabilities: f, distinctiveIdentifier: "optional", persistentState: "required", sessionTypes: ["persistent-license"], label: b }; e.drmInfos = [{ keySystem: b, licenseServerUri: c, distinctiveIdentifierRequired: !1, persistentStateRequired: !0, audioRobustness: "", videoRobustness: "", serverCertificate: d, serverCertificateUri: "", initData: null, keyIds: null }]; g.set(b, e); return Af(a, g, []) } function xf(a, b) { var c, d, e, f, g, h, k, l, m, n, p, q, x, y; return L(function(w) { if (1 == w.g) { if (c = Bf(a)) for (d = t(b), e = d.next(); !e.done; e = d.next()) f = e.value, f.video && (f.video.drmInfos = [c]), f.audio && (f.audio.drmInfos = [c]); g = b.some(function(v) { return v.video && v.video.drmInfos.length || v.audio && v.audio.drmInfos.length ? !0 : !1 }); g || (h = of(a.h.servers), Cf(b, h)); k = t(b); for (e = k.next(); !e.done; e = k.next()) for (l = e.value, m = Ff(l), n = t(m), p = n.next(); !p.done; p = n.next()) q = p.value, Gf(q, of(a.h.servers), of(a.h.advanced || {}), a.h.keySystemsMapping); return u(w, Rd(b, a.M, a.Y), 2) } x = g || Object.keys(a.h.servers).length; if (!x) return a.ca = !0, w["return"](Promise.resolve()); y = Af(a, void 0, b); return w["return"](g ? y : y["catch"](function() {})) }) } function Hf(a) { var b; return L(function(c) { switch (c.g) { case 1: if (a.l.mediaKeys) return c["return"](); if (!a.F) { c.A(2); break } return u(c, a.F, 3); case 3: return c["return"](); case 2: return B(c, 4), a.F = a.l.setMediaKeys(a.s), u(c, a.F, 6); case 6: va(c, 5); break; case 4: b = F(c), a.m(new N(2,6,6003,b.message)); case 5: ff(a.j), z(c) } }) } function If(a, b) { return L(function(c) { if (1 == c.g) return u(c, Hf(a), 2); Jf(a, b.initDataType, Fb(b.initData)); z(c) }) } r.Wb = function(a) { var b = this, c; return L(function(d) { if (1 == d.g) { if (!b.s) return b.o.oa(a, "encrypted", function() { b.m(new N(2,6,6010)) }), d["return"](); b.l = a; b.o.oa(b.l, "play", function() { for (var e = t(b.L), f = e.next(); !f.done; f = e.next()) Kf(b, f.value); b.O = !0; b.L = [] }); "webkitCurrentPlaybackTargetIsWireless"in b.l && b.o.B(b.l, "webkitcurrentplaybacktargetiswirelesschanged", function() { return vf(b) }); return (c = b.g.initData.find(function(e) { return 0 < e.initData.length })) || window.shakaMediaKeysPolyfill || b.C.length ? u(d, Hf(b), 2) : d.A(2) } Lf(b); c || b.C.length || b.o.B(b.l, "encrypted", function(e) { return If(b, e) }); z(d) }) } ; function Mf(a) { var b, c, d, e, f; return L(function(g) { switch (g.g) { case 1: if (!a.s || !a.g) return g["return"](); if (!a.g.serverCertificateUri || a.g.serverCertificate && a.g.serverCertificate.length) { g.A(2); break } b = Ye([a.g.serverCertificateUri], a.h.retryParameters); B(g, 3); c = a.D.kb.request(5, b); return u(g, c.promise, 5); case 5: d = g.h; a.g.serverCertificate = Fb(d.data); va(g, 4); break; case 3: throw e = F(g), new N(2,6,6017,e); case 4: if (a.j.g) return g["return"](); case 2: if (!a.g.serverCertificate || !a.g.serverCertificate.length) return g["return"](); B(g, 6); return u(g, a.s.setServerCertificate(a.g.serverCertificate), 8); case 8: va(g, 0); break; case 6: throw f = F(g), new N(2,6,6004,f.message); } }) } function Nf(a, b) { var c, d, e; return L(function(f) { if (1 == f.g) return u(f, Of(a, b), 2); if (3 != f.g) { c = f.h; if (!c) return f["return"](); d = []; if (e = a.i.get(c)) e.Ja = new nc, d.push(e.Ja); d.push(c.remove()); return u(f, Promise.all(d), 3) } a.i["delete"](c); z(f) }) } function Lf(a) { for (var b = (a.g ? a.g.initData : []) || [], c = t(b), d = c.next(); !d.done; d = c.next()) d = d.value, Jf(a, d.initDataType, d.initData); c = t(a.C); for (d = c.next(); !d.done; d = c.next()) Of(a, d.value); b.length || a.C.length || a.u.resolve(); return a.u } function Jf(a, b, c) { if (c.length) { var d = a.i.values(); d = t(d); for (var e = d.next(); !e.done; e = d.next()) if (Db(c, e.value.initData) && !qd("Tizen 2")) return; Pf(a, b, c, a.g.sessionType) } } function Qf(a) { return a ? !!a.match(/^com\.(microsoft|chromecast)\.playready/) : !1 } function Rf(a) { a = a.i.keys(); a = mf(a, function(b) { return b.sessionId }); return Array.from(a) } r.cc = function() { var a = Infinity , b = this.i.keys(); b = t(b); for (var c = b.next(); !c.done; c = b.next()) c = c.value, isNaN(c.expiration) || (a = Math.min(a, c.expiration)); return a } ; r.Kc = function() { return pf(this.da) } ; function Af(a, b, c) { var d, e, f, g, h, k, l, m, n, p, q, x, y; return L(function(w) { switch (w.g) { case 1: d = new Map; if (c.length) { e = Sf(a, c, d); w.A(2); break } return u(w, Tf(a, b), 3); case 3: e = w.h; case 2: f = e; if (!f) throw new N(2,6,6001); ff(a.j); B(w, 4); a.G.clear(); g = f.getConfiguration(); h = g.audioCapabilities || []; k = g.videoCapabilities || []; l = t(h); for (m = l.next(); !m.done; m = l.next()) n = m.value, a.G.add(n.contentType.toLowerCase()); p = t(k); for (m = p.next(); !m.done; m = p.next()) q = m.value, a.G.add(q.contentType.toLowerCase()); if (c.length) { var v = f.keySystem; var D = d.get(f.keySystem); var C = [] , A = [] , G = [] , E = [] , H = new Set; Uf(D, C, G, A, E, H); var J = a.M ? "persistent-license" : "temporary"; v = { keySystem: v, licenseServerUri: C[0], distinctiveIdentifierRequired: D[0].distinctiveIdentifierRequired, persistentStateRequired: D[0].persistentStateRequired, sessionType: D[0].sessionType || J, audioRobustness: D[0].audioRobustness || "", videoRobustness: D[0].videoRobustness || "", serverCertificate: G[0], serverCertificateUri: A[0], initData: E, keyIds: H }; D = t(D); for (C = D.next(); !C.done; C = D.next()) C = C.value, C.distinctiveIdentifierRequired && (v.distinctiveIdentifierRequired = C.distinctiveIdentifierRequired), C.persistentStateRequired && (v.persistentStateRequired = C.persistentStateRequired); D = v } else D = f.keySystem, v = b.get(f.keySystem), C = [], A = [], G = [], E = [], H = new Set, Uf(v.drmInfos, C, G, A, E, H), D = { keySystem: D, licenseServerUri: C[0], distinctiveIdentifierRequired: "required" == v.distinctiveIdentifier, persistentStateRequired: "required" == v.persistentState, sessionType: v.sessionTypes[0] || "temporary", audioRobustness: (v.audioCapabilities ? v.audioCapabilities[0].robustness : "") || "", videoRobustness: (v.videoCapabilities ? v.videoCapabilities[0].robustness : "") || "", serverCertificate: G[0], serverCertificateUri: A[0], initData: E, keyIds: H }; a.g = D; if (!a.g.licenseServerUri) throw new N(2,6,6012,a.g.keySystem); return u(w, f.createMediaKeys(), 6); case 6: return x = w.h, ff(a.j), a.s = x, a.ca = !0, u(w, Mf(a), 7); case 7: ff(a.j); va(w, 0); break; case 4: y = F(w); ff(a.j, y); a.g = null; a.G.clear(); if (y instanceof N) throw y; throw new N(2,6,6002,y.message); } }) } function Sf(a, b, c) { for (var d = t(b), e = d.next(); !e.done; e = d.next()) { var f = t(Ff(e.value)); for (e = f.next(); !e.done; e = f.next()) e = e.value, c.has(e.keySystem) || c.set(e.keySystem, []), c.get(e.keySystem).push(e) } if (1 == c.size && c.has("")) throw new N(2,6,6E3); d = {}; a = t(a.h.preferredKeySystems); for (e = a.next(); !e.done; d = { ld: d.ld }, e = a.next()) for (d.ld = e.value, f = t(b), e = f.next(); !e.done; e = f.next()) if (e = e.value.decodingInfos.find(function(l) { return function(m) { return m.supported && null != m.keySystemAccess && m.keySystemAccess.keySystem == l.ld } }(d))) return e.keySystemAccess; a = t([!0, !1]); for (e = a.next(); !e.done; e = a.next()) for (d = e.value, f = t(b), e = f.next(); !e.done; e = f.next()) { var g = t(e.value.decodingInfos); for (e = g.next(); !e.done; e = g.next()) { var h = e.value; if (h.supported && h.keySystemAccess) { e = c.get(h.keySystemAccess.keySystem); var k = t(e); for (e = k.next(); !e.done; e = k.next()) if (!!e.value.licenseServerUri == d) return h.keySystemAccess } } } return null } function Tf(a, b) { var c, d, e, f, g, h, k, l, m, n, p, q, x, y, w; return L(function(v) { switch (v.g) { case 1: if (1 == b.size && b.has("")) throw new N(2,6,6E3); d = t(b.values()); for (e = d.next(); !e.done; e = d.next()) f = e.value, 0 == f.audioCapabilities.length && delete f.audioCapabilities, 0 == f.videoCapabilities.length && delete f.videoCapabilities; g = t(a.h.preferredKeySystems); h = g.next(); case 2: if (h.done) { v.A(4); break } k = h.value; if (!b.has(k)) { v.A(3); break } l = b.get(k); B(v, 6); return u(v, navigator.requestMediaKeySystemAccess(k, [l]), 8); case 8: return c = v.h, v["return"](c); case 6: F(v); case 7: ff(a.j); case 3: h = g.next(); v.A(2); break; case 4: m = t([!0, !1]), n = m.next(); case 9: if (n.done) { v.A(11); break } p = n.value; q = t(b.keys()); h = q.next(); case 12: if (h.done) { n = m.next(); v.A(9); break } x = h.value; y = b.get(x); w = y.drmInfos.some(function(D) { return !!D.licenseServerUri }); if (w != p) { v.A(13); break } B(v, 15); return u(v, navigator.requestMediaKeySystemAccess(x, [y]), 17); case 17: return c = v.h, v["return"](c); case 15: F(v); case 16: ff(a.j); case 13: h = q.next(); v.A(12); break; case 11: return v["return"](c) } }) } function Bf(a) { a = of(a.h.clearKeys); if (0 == a.size) return null; var b = [] , c = []; a.forEach(function(e, f) { var g = Ac(f) , h = Ac(e); g = { kty: "oct", kid: yc(g, !1), k: yc(h, !1) }; b.push(g); c.push(g.kid) }); a = JSON.stringify({ keys: b }); var d = JSON.stringify({ kids: c }); d = [{ initData: Fb(uc(d)), initDataType: "keyids" }]; return { keySystem: "org.w3.clearkey", licenseServerUri: "data:application/json;base64," + window.btoa(a), distinctiveIdentifierRequired: !1, persistentStateRequired: !1, audioRobustness: "", videoRobustness: "", serverCertificate: null, serverCertificateUri: "", sessionType: "", initData: d, keyIds: new Set(c) } } function Of(a, b) { var c, d, e, f, g; return L(function(h) { switch (h.g) { case 1: try { c = a.s.createSession("persistent-license") } catch (k) { return d = new N(2,6,6005,k.message), a.m(d), h["return"](Promise.reject(d)) } a.o.B(c, "message", function(k) { a.l && a.h.delayLicenseRequestUntilPlayed && a.l.paused && !a.O ? a.L.push(k) : Kf(a, k) }); a.o.B(c, "keystatuseschange", function(k) { return Vf(a, k) }); e = { initData: null, initDataType: null, loaded: !1, Ld: Infinity, Ja: null, type: "persistent-license" }; a.i.set(c, e); B(h, 2); return u(h, c.load(b), 4); case 4: f = h.h; ff(a.j); if (!f) return a.i["delete"](c), a.m(new N(2,6,6013)), h["return"](Promise.resolve()); e.loaded = !0; Wf(a) && a.u.resolve(); return h["return"](c); case 2: g = F(h), ff(a.j, g), a.i["delete"](c), a.m(new N(2,6,6005,g.message)); case 3: return h["return"](Promise.resolve()) } }) } function Pf(a, b, c, d) { try { var e = a.s.createSession(d) } catch (f) { a.m(new N(2,6,6005,f.message)); return } a.o.B(e, "message", function(f) { a.l && a.h.delayLicenseRequestUntilPlayed && a.l.paused && !a.O ? a.L.push(f) : Kf(a, f) }); a.o.B(e, "keystatuseschange", function(f) { return Vf(a, f) }); a.i.set(e, { initData: c, initDataType: b, loaded: !1, Ld: Infinity, Ja: null, type: d }); try { c = a.h.initDataTransform(c, b, a.g) } catch (f) { b = f; f instanceof N || (b = new N(2,6,6016,f)); a.m(b); return } a.h.logLicenseExchange && yc(c); e.generateRequest(b, c)["catch"](function(f) { if (!a.j.g) { a.i["delete"](e); var g = f.errorCode; if (g && g.systemCode) { var h = g.systemCode; 0 > h && (h += Math.pow(2, 32)); h = "0x" + h.toString(16) } a.m(new N(2,6,6006,f.message,f,h)) } }) } function Kf(a, b) { var c, d, e, f, g, h, k, l, m, n, p, q, x, y; L(function(w) { switch (w.g) { case 1: return c = b.target, a.h.logLicenseExchange && yc(b.message), d = a.i.get(c), e = a.g.licenseServerUri, f = a.h.advanced[a.g.keySystem], "individualization-request" == b.messageType && f && f.individualizationServer && (e = f.individualizationServer), g = Ye([e], a.h.retryParameters), g.body = b.message, g.method = "POST", g.licenseRequestType = b.messageType, g.sessionId = c.sessionId, g.drmInfo = a.g, d && (g.initData = d.initData, g.initDataType = d.initDataType), Qf(a.g.keySystem) && Xf(g), h = Date.now(), B(w, 2), l = a.D.kb.request(2, g), u(w, l.promise, 4); case 4: k = w.h; va(w, 3); break; case 2: return m = F(w), n = new N(2,6,6007,m), a.m(n), d && d.Ja && d.Ja.reject(n), w["return"](); case 3: if (a.j.g) return w["return"](); a.I += (Date.now() - h) / 1E3; a.h.logLicenseExchange && yc(k.data); B(w, 5); return u(w, c.update(k.data), 7); case 7: va(w, 6); break; case 5: return p = F(w), q = new N(2,6,6008,p.message), a.m(q), d && d.Ja && d.Ja.reject(q), w["return"](); case 6: if (a.j.g) return w["return"](); x = new R("drmsessionupdate"); a.D.onEvent(x); d && (d.Ja && d.Ja.resolve(), y = new Q(function() { d.loaded = !0; Wf(a) && a.u.resolve() } ), y.S(Yf)); z(w) } }) } function Xf(a) { var b = rc(a.body, !0, !0); if (b.includes("PlayReadyKeyMessage")) { b = (new DOMParser).parseFromString(b, "application/xml"); for (var c = t(b.getElementsByTagName("HttpHeader")), d = c.next(); !d.done; d = c.next()) d = d.value, a.headers[d.getElementsByTagName("name")[0].textContent] = d.getElementsByTagName("value")[0].textContent; a.body = zc(b.getElementsByTagName("Challenge")[0].textContent) } else a.headers["Content-Type"] = "text/xml; charset=utf-8" } function Vf(a, b) { var c = b.target , d = a.i.get(c) , e = !1; c.keyStatuses.forEach(function(g, h) { if ("string" == typeof h) { var k = h; h = g; g = k } if (Qf(a.g.keySystem) && 16 == h.byteLength && navigator.userAgent.match(/Edge?\//)) { k = Ib(h); var l = k.getUint32(0, !0) , m = k.getUint16(4, !0) , n = k.getUint16(6, !0); k.setUint32(0, l, !1); k.setUint16(4, m, !1); k.setUint16(6, n, !1) } "status-pending" != g && (d.loaded = !0); "expired" == g && (e = !0); k = Bc(h); a.ia.set(k, g) }); var f = c.expiration - Date.now(); (0 > f || e && 1E3 > f) && d && !d.Ja && (a.i["delete"](c), c.close()["catch"](function() {})); Wf(a) && (a.u.resolve(), a.T.S(Zf)) } function sf(a) { var b = a.ia , c = a.da; c.clear(); b.forEach(function(d, e) { return c.set(e, d) }); b = Array.from(c.values()); b.length && b.every(function(d) { return "expired" == d }) && a.m(new N(2,6,6014)); a.D.Vc(pf(c)) } function $f() { var a, b, c, d, e, f, g, h; return L(function(k) { return 1 == k.g ? (a = "org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "), b = [{ contentType: 'video/mp4; codecs="avc1.42E01E"' }, { contentType: 'video/webm; codecs="vp8"' }], c = { initDataTypes: ["cenc"], videoCapabilities: b }, d = { videoCapabilities: b, persistentState: "required", sessionTypes: ["persistent-license"] }, e = [d, c], f = new Map, g = function(l) { var m, n, p; return L(function(q) { switch (q.g) { case 1: B(q, 2); if ("org.w3.clearkey" === l && ud()) throw Error("Unsupported keySystem"); return u(q, navigator.requestMediaKeySystemAccess(l, e), 4); case 4: return m = q.h, p = (n = m.getConfiguration().sessionTypes) ? n.includes("persistent-license") : !1, qd("Tizen 3") && (p = !1), f.set(l, { persistentState: p }), u(q, m.createMediaKeys(), 5); case 5: va(q, 0); break; case 2: F(q), f.set(l, null), z(q) } }) } , h = a.map(function(l) { return g(l) }), u(k, Promise.all(h), 2)) : k["return"](pf(f)) }) } function ag(a) { var b; return L(function(c) { if (1 == c.g) return b = new Promise(function(d, e) { (new Q(e)).S(bg) } ), B(c, 2), u(c, Promise.race([Promise.all([a.close(), a.closed]), b]), 4); if (2 != c.g) return va(c, 0); F(c); z(c) }) } function vf(a) { var b; return L(function(c) { b = Array.from(a.i.entries()); a.i.clear(); return u(c, Promise.all(b.map(function(d) { d = t(d); var e = d.next().value , f = d.next().value; return L(function(g) { if (1 == g.g) return B(g, 2), a.ha || a.C.includes(e.sessionId) || "persistent-license" !== f.type ? u(g, ag(e), 5) : u(g, e.remove(), 5); if (2 != g.g) return va(g, 0); F(g); z(g) }) })), 0) }) } function cg(a, b) { if (!a.length) return b; if (!b.length) return a; for (var c = [], d = t(a), e = d.next(); !e.done; e = d.next()) { e = e.value; for (var f = {}, g = t(b), h = g.next(); !h.done; f = { Da: f.Da }, h = g.next()) if (h = h.value, e.keySystem == h.keySystem) { f.Da = []; f.Da = f.Da.concat(e.initData || []); f.Da = f.Da.concat(h.initData || []); f.Da = f.Da.filter(function(k) { return function(l, m) { return void 0 === l.keyId || m === k.Da.findIndex(function(n) { return n.keyId === l.keyId }) } }(f)); g = e.keyIds && h.keyIds ? new Set([].concat(ia(e.keyIds), ia(h.keyIds))) : e.keyIds || h.keyIds; c.push({ keySystem: e.keySystem, licenseServerUri: e.licenseServerUri || h.licenseServerUri, distinctiveIdentifierRequired: e.distinctiveIdentifierRequired || h.distinctiveIdentifierRequired, persistentStateRequired: e.persistentStateRequired || h.persistentStateRequired, videoRobustness: e.videoRobustness || h.videoRobustness, audioRobustness: e.audioRobustness || h.audioRobustness, serverCertificate: e.serverCertificate || h.serverCertificate, serverCertificateUri: e.serverCertificateUri || h.serverCertificateUri, initData: f.Da, keyIds: g }); break } } return c } function Ff(a) { return (a.video ? a.video.drmInfos : []).concat(a.audio ? a.audio.drmInfos : []) } function tf(a) { a.i.forEach(function(b, c) { var d = b.Ld , e = c.expiration; isNaN(e) && (e = Infinity); e != d && (a.D.onExpirationUpdated(c.sessionId, e), b.Ld = e) }) } function Wf(a) { a = a.i.values(); return nf(a, function(b) { return b.loaded }) } function Cf(a, b) { var c = []; b.forEach(function(f, g) { c.push({ keySystem: g, licenseServerUri: f, distinctiveIdentifierRequired: !1, persistentStateRequired: !1, audioRobustness: "", videoRobustness: "", serverCertificate: null, serverCertificateUri: "", initData: [], keyIds: new Set }) }); for (var d = t(a), e = d.next(); !e.done; e = d.next()) e = e.value, e.video && (e.video.drmInfos = c), e.audio && (e.audio.drmInfos = c) } function Uf(a, b, c, d, e, f) { var g = {}; a = t(a); for (var h = a.next(); !h.done; g = { qa: g.qa }, h = a.next()) { g.qa = h.value; b.includes(g.qa.licenseServerUri) || b.push(g.qa.licenseServerUri); d.includes(g.qa.serverCertificateUri) || d.push(g.qa.serverCertificateUri); g.qa.serverCertificate && (c.some(function(m) { return function(n) { return Db(n, m.qa.serverCertificate) } }(g)) || c.push(g.qa.serverCertificate)); if (g.qa.initData) { h = {}; for (var k = t(g.qa.initData), l = k.next(); !l.done; h = { xc: h.xc }, l = k.next()) h.xc = l.value, e.some(function(m) { return function(n) { var p = m.xc; return n.keyId && n.keyId == p.keyId ? !0 : n.initDataType == p.initDataType && Db(n.initData, p.initData) } }(h)) || e.push(h.xc) } if (g.qa.keyIds) for (h = t(g.qa.keyIds), k = h.next(); !k.done; k = h.next()) f.add(k.value) } } function Gf(a, b, c, d) { var e = a.keySystem; if (e && ("org.w3.clearkey" != e || !a.licenseServerUri)) { b.size && (b = b.get(e) || "", a.licenseServerUri = b); a.keyIds || (a.keyIds = new Set); if (c = c.get(e)) a.distinctiveIdentifierRequired || (a.distinctiveIdentifierRequired = c.distinctiveIdentifierRequired), a.persistentStateRequired || (a.persistentStateRequired = c.persistentStateRequired), a.videoRobustness || (a.videoRobustness = c.videoRobustness), a.audioRobustness || (a.audioRobustness = c.audioRobustness), a.serverCertificate || (a.serverCertificate = c.serverCertificate), c.sessionType && (a.sessionType = c.sessionType), a.serverCertificateUri || (a.serverCertificateUri = c.serverCertificateUri); d[e] && (a.keySystem = d[e]); window.cast && window.cast.__platform__ && "com.microsoft.playready" == e && (a.keySystem = "com.chromecast.playready") } } var bg = 1 , Yf = 5 , Zf = .5 , dg = new oc(function() { return Gb(new Uint8Array([0])) } ); function eg() {} function fg(a, b, c, d) { var e, f, g, h; return L(function(k) { if (1 == k.g) { if (d && (e = gg[d.toLowerCase()])) return k["return"](e); if (f = hg(a)) if (g = ig[f]) return k["return"](g); return d ? k.A(2) : u(k, jg(a, b, c), 3) } if (2 != k.g && (d = k.h) && (h = gg[d])) return k["return"](h); throw new N(2,4,4E3,a); }) } function jg(a, b, c) { var d, e, f; return L(function(g) { if (1 == g.g) return d = Ye([a], c), d.method = "HEAD", u(g, b.request(0, d).promise, 2); e = g.h; f = e.headers["content-type"]; return g["return"](f ? f.toLowerCase().split(";").shift() : "") }) } function hg(a) { a = (new Nb(a)).ta.split("/").pop().split("."); return 1 == a.length ? "" : a.pop().toLowerCase() } M("shaka.media.ManifestParser", eg); eg.unregisterParserByMime = function(a) { delete gg[a] } ; eg.registerParserByMime = function(a, b) { gg[a] = b } ; eg.registerParserByExtension = function(a, b) { ig[a] = b } ; var gg = {} , ig = {}; function kg(a, b) { this.R = Ib(a); this.h = b == lg; this.g = 0 } r = kg.prototype; r.ma = function() { return this.g < this.R.byteLength } ; r.$ = function() { return this.g } ; r.lf = function() { return this.R.byteLength } ; r.Sa = function() { try { var a = this.R.getUint8(this.g); this.g += 1; return a } catch (b) { throw mg(); } } ; r.Od = function() { try { var a = this.R.getUint16(this.g, this.h); this.g += 2; return a } catch (b) { throw mg(); } } ; r.N = function() { try { var a = this.R.getUint32(this.g, this.h); this.g += 4; return a } catch (b) { throw mg(); } } ; r.De = function() { try { var a = this.R.getInt32(this.g, this.h); this.g += 4; return a } catch (b) { throw mg(); } } ; r.Hb = function() { try { if (this.h) { var a = this.R.getUint32(this.g, !0); var b = this.R.getUint32(this.g + 4, !0) } else b = this.R.getUint32(this.g, !1), a = this.R.getUint32(this.g + 4, !1) } catch (c) { throw mg(); } if (2097151 < b) throw new N(2,3,3001); this.g += 8; return b * Math.pow(2, 32) + a } ; r.$a = function(a) { if (this.g + a > this.R.byteLength) throw mg(); var b = Fb(this.R, this.g, a); this.g += a; return b } ; r.skip = function(a) { if (this.g + a > this.R.byteLength) throw mg(); this.g += a } ; r.Yf = function(a) { if (this.g < a) throw mg(); this.g -= a } ; r.seek = function(a) { if (0 > a || a > this.R.byteLength) throw mg(); this.g = a } ; r.nc = function() { for (var a = this.g; this.ma() && 0 != this.R.getUint8(this.g); ) this.g += 1; a = Fb(this.R, a, this.g - a); this.g += 1; return qc(a) } ; function mg() { return new N(2,3,3E3) } M("shaka.util.DataViewReader", kg); kg.prototype.readTerminatedString = kg.prototype.nc; kg.prototype.seek = kg.prototype.seek; kg.prototype.rewind = kg.prototype.Yf; kg.prototype.skip = kg.prototype.skip; kg.prototype.readBytes = kg.prototype.$a; kg.prototype.readUint64 = kg.prototype.Hb; kg.prototype.readInt32 = kg.prototype.De; kg.prototype.readUint32 = kg.prototype.N; kg.prototype.readUint16 = kg.prototype.Od; kg.prototype.readUint8 = kg.prototype.Sa; kg.prototype.getLength = kg.prototype.lf; kg.prototype.getPosition = kg.prototype.$; kg.prototype.hasMoreData = kg.prototype.ma; var lg = 1; kg.Endianness = { BIG_ENDIAN: 0, LITTLE_ENDIAN: lg }; function ng() { this.i = []; this.h = []; this.g = !1 } r = ng.prototype; r.box = function(a, b) { var c = og(a); this.i[c] = pg; this.h[c] = b; return this } ; r.U = function(a, b) { var c = og(a); this.i[c] = qg; this.h[c] = b; return this } ; r.stop = function() { this.g = !0 } ; r.parse = function(a, b, c) { a = new kg(a,0); for (this.g = !1; a.ma() && !this.g; ) this.Xc(0, a, b, c) } ; r.Xc = function(a, b, c, d) { var e = b.$(); if (d && e + 8 > b.R.byteLength) this.g = !0; else { var f = b.N() , g = b.N() , h = !1; switch (f) { case 0: f = b.R.byteLength - e; break; case 1: if (d && b.$() + 8 > b.R.byteLength) { this.g = !0; return } f = b.Hb(); h = !0 } var k = this.h[g]; if (k) { var l = null , m = null; if (this.i[g] == qg) { if (d && b.$() + 4 > b.R.byteLength) { this.g = !0; return } m = b.N(); l = m >>> 24; m &= 16777215 } g = e + f; c && g > b.R.byteLength && (g = b.R.byteLength); d && g > b.R.byteLength ? this.g = !0 : (d = g - b.$(), b = 0 < d ? b.$a(d) : new Uint8Array(0), b = new kg(b,0), k({ parser: this, partialOkay: c || !1, version: l, flags: m, reader: b, size: f, start: e + a, has64BitSize: h })) } else b.skip(Math.min(e + f - b.$(), b.R.byteLength - b.$())) } } ; function rg(a) { for (var b = sg(a); a.reader.ma() && !a.parser.g; ) a.parser.Xc(a.start + b, a.reader, a.partialOkay) } function tg(a) { for (var b = sg(a), c = a.reader.N(), d = 0; d < c && (a.parser.Xc(a.start + b, a.reader, a.partialOkay), !a.parser.g); d++) ; } function ug(a) { return function(b) { a(b.reader.$a(b.reader.R.byteLength - b.reader.$())) } } function og(a) { var b = 0; a = t(a); for (var c = a.next(); !c.done; c = a.next()) b = b << 8 | c.value.charCodeAt(0); return b } function vg(a) { return String.fromCharCode(a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255) } function sg(a) { return 8 + (a.has64BitSize ? 8 : 0) + (null != a.flags ? 4 : 0) } M("shaka.util.Mp4Parser", ng); ng.headerSize = sg; ng.typeToString = vg; ng.allData = ug; ng.sampleDescription = tg; ng.children = rg; ng.prototype.parseNext = ng.prototype.Xc; ng.prototype.parse = ng.prototype.parse; ng.prototype.stop = ng.prototype.stop; ng.prototype.fullBox = ng.prototype.U; ng.prototype.box = ng.prototype.box; var pg = 0 , qg = 1; function wg(a) { function b() { d = !0 } function c(l) { f.push(l); rg(l) } a = Fb(a); var d = !1, e, f = [], g = []; (new ng).box("moov", c).box("trak", c).box("mdia", c).box("minf", c).box("stbl", c).U("stsd", function(l) { e = l; f.push(l); tg(l) }).U("encv", b).U("enca", b).U("avc1", function(l) { g.push({ box: l, lc: 1701733238 }) }).U("avc3", function(l) { g.push({ box: l, lc: 1701733238 }) }).U("ac-3", function(l) { g.push({ box: l, lc: 1701733217 }) }).U("ec-3", function(l) { g.push({ box: l, lc: 1701733217 }) }).U("mp4a", function(l) { g.push({ box: l, lc: 1701733217 }) }).parse(a); if (d) return a; if (0 == g.length || !e) throw ab(Bc(a)), new N(2,3,3019); g.reverse(); for (var h = t(g), k = h.next(); !k.done; k = h.next()) k = k.value, a = xg(a, e, k.box, f, k.lc); return a } function xg(a, b, c, d, e) { var f = yg.value() , g = a.subarray(c.start, c.start + c.size) , h = Ib(g) , k = new Uint8Array(c.size + f.byteLength); k.set(g, 0); g = Ib(k); g.setUint32(4, e); k.set(f, c.size); e = h.getUint32(4); g.setUint32(c.size + 16, e); zg(k, 0, k.byteLength); e = new Uint8Array(a.byteLength + k.byteLength); c = pd() ? c.start : c.start + c.size; f = a.subarray(c); e.set(a.subarray(0, c)); e.set(k, c); e.set(f, c + k.byteLength); a = t(d); for (d = a.next(); !d.done; d = a.next()) d = d.value, zg(e, d.start, d.size + k.byteLength); k = Ib(e, b.start); b = sg(b); a = k.getUint32(b); k.setUint32(b, a + 1); return e } function zg(a, b, c) { a = Ib(a, b); b = a.getUint32(0); 0 != b && (1 == b ? (a.setUint32(8, c >> 32), a.setUint32(12, c & 4294967295)) : a.setUint32(0, c)) } var yg = new oc(function() { return new Uint8Array([0, 0, 0, 80, 115, 105, 110, 102, 0, 0, 0, 12, 102, 114, 109, 97, 0, 0, 0, 0, 0, 0, 0, 20, 115, 99, 104, 109, 0, 0, 0, 0, 99, 101, 110, 99, 0, 1, 0, 0, 0, 0, 0, 40, 115, 99, 104, 105, 0, 0, 0, 32, 116, 101, 110, 99, 0, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) } ); function Ag(a, b, c, d, e) { if (d >= e) return null; for (var f = -1, g = -1, h = 0; h < c.length; h++) if (c[h].some(function(A) { return null != A && "" != A.g.trim() })) { f = h; break } for (h = c.length - 1; 0 <= h; h--) if (c[h].some(function(A) { return null != A && "" != A.g.trim() })) { g = h; break } if (-1 === f || -1 === g) return null; for (var k = h = !1, l = "white", m = "black", n = Bg(d, e, h, k, l, m); f <= g; f++) { for (var p = c[f], q = -1, x = -1, y = 0; y < p.length; y++) if (null != p[y] && "" !== p[y].g.trim()) { q = y; break } for (y = p.length - 1; 0 <= y; y--) if (null != p[y] && "" !== p[y].g.trim()) { x = y; break } if (-1 === q || -1 === x) p = Cg(d, e), a.nestedCues.push(p); else { for (; q <= x; q++) if (y = p[q]) { var w = y.l , v = y.i , D = y.j , C = y.h; if (w != h || v != k || D != l || C != m) n.payload && a.nestedCues.push(n), n = Bg(d, e, w, v, D, C), h = w, k = v, l = D, m = C; n.payload += y.g } else n.payload += " "; n.payload && a.nestedCues.push(n); f !== g && (n = Cg(d, e), a.nestedCues.push(n)); n = Bg(d, e, h, k, l, m) } } return a.nestedCues.length ? { cue: a, stream: b } : null } function Bg(a, b, c, d, e, f) { a = new ib(a,b,""); c && a.textDecoration.push("underline"); d && (a.fontStyle = "italic"); a.color = e; a.backgroundColor = f; return a } function Cg(a, b) { var c = new ib(a,b,""); c.lineBreak = !0; return c } function Dg(a, b, c, d, e) { this.g = a; this.l = b; this.i = c; this.h = d; this.j = e } ;function Eg(a, b) { this.i = []; this.g = 1; this.h = 0; this.u = a; this.s = b; this.j = this.m = !1; this.l = "white"; this.o = "black"; Fg(this) } function Gg(a, b, c) { return Ag(new ib(b,c,""), "CC" + (a.u << 1 | a.s + 1), a.i, b, c) } function Fg(a) { Hg(a, 0, 15); a.g = 1 } function Ig(a, b, c) { if (!(32 > c || 127 < c)) { var d = ""; switch (b) { case Jg: d = Kg.has(c) ? Kg.get(c) : String.fromCharCode(c); break; case Lg: d = Mg.get(c); break; case Ng: a.i[a.g].pop(); d = Og.get(c); break; case Pg: a.i[a.g].pop(), d = Qg.get(c) } d && a.i[a.g].push(new Dg(d,a.m,a.j,a.o,a.l)) } } function Rg(a, b, c, d) { if (b >= c) for (--d; 0 <= d; d--) a.i[b + d] = a.i[c + d].map(function(f) { return f }); else for (var e = 0; e < d; e++) a.i[b + e] = a.i[c + e].map(function(f) { return f }) } function Hg(a, b, c) { for (var d = 0; d <= c; d++) a.i[b + d] = [] } var Jg = 0 , Lg = 1 , Ng = 2 , Pg = 3 , Kg = new Map([[39, "\u2019"], [42, "\u00e1"], [92, "\u00e9"], [92, "\u00e9"], [94, "\u00ed"], [95, "\u00f3"], [96, "\u00fa"], [123, "\u00e7"], [124, "\u00f7"], [125, "\u00d1"], [126, "\u00f1"], [127, "\u2588"]]) , Mg = new Map([[48, "\u00ae"], [49, "\u00b0"], [50, "\u00bd"], [51, "\u00bf"], [52, "\u2122"], [53, "\u00a2"], [54, "\u00a3"], [55, "\u266a"], [56, "\u00e0"], [57, "\u2800"], [58, "\u00e8"], [59, "\u00e2"], [60, "\u00ea"], [61, "\u00ee"], [62, "\u00f4"], [63, "\u00fb"]]) , Og = new Map([[32, "\u00c1"], [33, "\u00c9"], [34, "\u00d3"], [35, "\u00da"], [36, "\u00dc"], [37, "\u00fc"], [38, "\u2018"], [39, "\u00a1"], [40, "*"], [41, "'"], [42, "\u2500"], [43, "\u00a9"], [44, "\u2120"], [45, "\u00b7"], [46, "\u201c"], [47, "\u201d"], [48, "\u00c0"], [49, "\u00c2"], [50, "\u00c7"], [51, "\u00c8"], [52, "\u00ca"], [53, "\u00cb"], [54, "\u00eb"], [55, "\u00ce"], [56, "\u00cf"], [57, "\u00ef"], [58, "\u00d4"], [59, "\u00d9"], [60, "\u00f9"], [61, "\u00db"], [62, "\u00ab"], [63, "\u00bb"]]) , Qg = new Map([[32, "\u00c3"], [33, "\u00e3"], [34, "\u00cd"], [35, "\u00cc"], [36, "\u00ec"], [37, "\u00d2"], [38, "\u00f2"], [39, "\u00d5"], [40, "\u00f5"], [41, "{"], [42, "}"], [43, "\\"], [44, "^"], [45, "_"], [46, "|"], [47, "~"], [48, "\u00c4"], [49, "\u00e4"], [50, "\u00d6"], [51, "\u00f6"], [52, "\u00df"], [53, "\u00a5"], [54, "\u00a4"], [55, "\u2502"], [56, "\u00c5"], [57, "\u00e5"], [58, "\u00d8"], [59, "\u00f8"], [60, "\u250c"], [61, "\u2510"], [62, "\u2514"], [63, "\u2518"]]); function Sg(a, b) { this.h = Tg; this.o = new Eg(a,b); this.i = new Eg(a,b); this.l = new Eg(a,b); this.g = this.i; this.j = 0; this.m = null } function Ug(a, b, c) { a.g = a.i; var d = a.g , e = null; a.h !== Vg && a.h !== Wg && (e = Gg(d, a.j, c), c = a.i, c.g = 0 < c.h ? c.h : 0, Hg(c, 0, 15), c = a.l, c.g = 0 < c.h ? c.h : 0, Hg(c, 0, 15), d.g = 15); a.h = Vg; d.h = b; return e } function Xg(a) { a.h = Yg; a.g = a.l; a.g.h = 0 } function Zg(a) { Wa("Cea608DataChannel", "CEA-608 text mode entered, but is unsupported"); a.g = a.o; a.h = Wg } var Tg = 0 , Yg = 1 , Vg = 3 , Wg = 4 , $g = "black green blue cyan red yellow magenta black".split(" ") , ah = "white green blue cyan red yellow magenta white_italics".split(" "); function bh() { this.l = !1; this.C = this.F = 0; this.D = ch; this.i = []; this.g = this.h = this.j = 0; this.u = this.o = !1; this.s = "white"; this.m = "black"; dh(this) } function dh(a) { a.i = []; for (var b = 0; 15 > b; b++) a.i.push(eh()) } function eh() { for (var a = [], b = 0; 42 > b; b++) a.push(null); return a } function fh(a, b) { gh(a) && (a.i[a.h][a.g] = new Dg(b,a.u,a.o,a.m,a.s), a.g++) } function gh(a) { var b = a.g < a.C && 0 <= a.g; return a.h < a.F && 0 <= a.h && b } bh.prototype.isVisible = function() { return this.l } ; function hh(a, b, c) { var d = new ib(a.j,b,""); d.textAlign = a.D === ih ? "left" : a.D === jh ? "right" : mb; if (c = Ag(d, "svc" + c, a.i, a.j, b)) a.j = b; return c } var ih = 0 , jh = 1 , ch = 2; function kh() { this.i = []; this.h = null; this.g = 0 } function lh(a, b) { 3 === b.type ? (a.g = 2 * (b.value & 63) - 1, a.h = []) : a.h && (0 < a.g && (a.h.push(b), a.g--), 0 === a.g && (a.i.push(new mh(a.h)), a.h = null, a.g = 0)) } function mh(a) { this.g = 0; this.h = a } mh.prototype.ma = function() { return this.g < this.h.length } ; mh.prototype.$ = function() { return this.g } ; function nh(a) { if (!a.ma()) throw new N(2,2,3E3); return a.h[a.g++] } mh.prototype.skip = function(a) { if (this.g + a > this.h.length) throw new N(2,2,3E3); this.g += a } ; function oh(a) { this.i = a; this.h = [null, null, null, null, null, null, null, null]; this.g = null } function ph(a, b, c, d) { if (128 <= c && 135 >= c) d = c & 7, a.h[d] && (a.g = a.h[d]); else { if (136 === c) { c = nh(b).value; b = null; c = t(qh(a, c)); for (var e = c.next(); !e.done; e = c.next()) e = a.h[e.value], e.isVisible() && (b = hh(e, d, a.i)), dh(e); return b } if (137 === c) for (b = nh(b).value, b = t(qh(a, b)), c = b.next(); !c.done; c = b.next()) c = a.h[c.value], c.isVisible() || (c.j = d), c.l = !0; else { if (138 === c) { c = nh(b).value; b = null; c = t(qh(a, c)); for (e = c.next(); !e.done; e = c.next()) e = a.h[e.value], e.isVisible() && (b = hh(e, d, a.i)), e.l = !1; return b } if (139 === c) { c = nh(b).value; b = null; c = t(qh(a, c)); for (e = c.next(); !e.done; e = c.next()) e = a.h[e.value], e.isVisible() ? b = hh(e, d, a.i) : e.j = d, e.l = !e.l; return b } if (140 === c) return b = nh(b).value, rh(a, b, d); if (143 === c) return d = rh(a, 255, d), sh(a), d; if (144 === c) b.skip(1), d = nh(b).value, a.g && (a.g.o = 0 < (d & 128), a.g.u = 0 < (d & 64)); else if (145 === c) d = nh(b).value, c = nh(b).value, b.skip(1), a.g && (b = th((c & 48) >> 4, (c & 12) >> 2, c & 3), a.g.s = th((d & 48) >> 4, (d & 12) >> 2, d & 3), a.g.m = b); else if (146 === c) d = nh(b).value, b = nh(b).value, a.g && (a = a.g, a.h = d & 15, a.g = b & 63); else if (151 === c) b.skip(1), b.skip(1), d = nh(b).value, b.skip(1), a.g && (a.g.D = d & 3); else if (152 <= c && 159 >= c) { c = (c & 15) - 8; e = null !== a.h[c]; if (!e) { var f = new bh; f.j = d; a.h[c] = f } d = nh(b).value; nh(b); nh(b); f = nh(b).value; var g = nh(b).value; b = nh(b).value; e && 0 === (b & 7) || (b = a.h[c], b.h = 0, b.g = 0, b.u = !1, b.o = !1, b.s = "white", b.m = "black"); b = a.h[c]; b.l = 0 < (d & 32); b.F = (f & 15) + 1; b.C = (g & 63) + 1; a.g = a.h[c] } } } return null } function qh(a, b) { for (var c = [], d = 0; 8 > d; d++) 1 === (b & 1) && a.h[d] && c.push(d), b >>= 1; return c } function rh(a, b, c) { var d = null; b = t(qh(a, b)); for (var e = b.next(); !e.done; e = b.next()) { e = e.value; var f = a.h[e]; f.isVisible() && (d = hh(f, c, a.i)); a.h[e] = null } return d } function sh(a) { a.g = null; a.h = [null, null, null, null, null, null, null, null] } function th(a, b, c) { var d = { 0: 0, 1: 0, 2: 1, 3: 1 }; a = d[a]; b = d[b]; c = d[c]; return uh[a << 2 | b << 1 | c] } var vh = new Map([[32, " "], [33, "\u00a0"], [37, "\u2026"], [42, "\u0160"], [44, "\u0152"], [48, "\u2588"], [49, "\u2018"], [50, "\u2019"], [51, "\u201c"], [52, "\u201d"], [53, "\u2022"], [57, "\u2122"], [58, "\u0161"], [60, "\u0153"], [61, "\u2120"], [63, "\u0178"], [118, "\u215b"], [119, "\u215c"], [120, "\u215d"], [121, "\u215e"], [122, "\u2502"], [123, "\u2510"], [124, "\u2514"], [125, "\u2500"], [126, "\u2518"], [127, "\u250c"]]) , uh = "black blue green cyan red magenta yellow white".split(" "); function wh() { this.h = []; this.g = []; this.i = new kh; this.l = 0; this.s = new Map([["CC1", new Sg(0,0)], ["CC2", new Sg(0,1)], ["CC3", new Sg(1,0)], ["CC4", new Sg(1,1)]]); this.o = this.m = 0; this.j = new Map; xh(this) } function xh(a) { a.m = 0; a.o = 0; a = t(a.s.values()); for (var b = a.next(); !b.done; b = a.next()) b = b.value, b.h = 2, b.g = b.i, b.m = null, Fg(b.i), Fg(b.l), Fg(b.o) } function yh(a) { function b(f, g) { return f.pts - g.pts || f.order - g.order } var c = []; a.h.sort(b); a.g.sort(b); for (var d = t(a.h), e = d.next(); !e.done; e = d.next()) (e = zh(a, e.value)) && c.push(e); d = t(a.g); for (e = d.next(); !e.done; e = d.next()) lh(a.i, e.value); d = t(a.i.i); for (e = d.next(); !e.done; e = d.next()) e = Ah(a, e.value), c.push.apply(c, ia(e)); a.i.i = []; a.h = []; a.g = []; return c } function zh(a, b) { var c = b.type; if (16 === (b.xa & 112)) { var d = b.xa >> 3 & 1; 0 === c ? a.m = d : a.o = d } c = a.s.get("CC" + (c << 1 | (c ? a.o : a.m) + 1)); if (255 === b.xa && 255 === b.Na || !b.xa && !b.Na || !Bh(b.xa) || !Bh(b.Na)) return 45 <= ++a.l && xh(a), null; a.l = 0; b.xa &= 127; b.Na &= 127; if (!b.xa && !b.Na) return null; d = null; if (16 === (b.xa & 112)) a: { var e = b.xa; d = b.Na; if (c.m === (e << 8 | d)) c.m = null; else if (c.m = e << 8 | d, 16 === (e & 240) && 64 === (d & 192)) { e = [11, 11, 1, 2, 3, 4, 12, 13, 14, 15, 5, 6, 7, 8, 9, 10][(e & 7) << 1 | d >> 5 & 1]; var f = (d & 30) >> 1 , g = "white" , h = !1; 7 > f ? g = ah[f] : 7 === f && (h = !0); d = 1 === (d & 1); if (c.h !== Wg) { f = c.g; if (c.h === Vg && e !== f.g) { var k = 1 + e - f.h; Rg(f, k, 1 + f.g - f.h, f.h); Hg(f, 0, k - 1); Hg(f, e + 1, 15 - e) } f.g = e; c.g.m = d; c.g.j = h; c.g.l = g; c.g.o = "black" } } else if (17 === (e & 247) && 32 === (d & 240)) c.g.m = !1, c.g.j = !1, c.g.l = "white", Ig(c.g, Jg, 32), g = !1, e = ah[(d & 14) >> 1], "white_italics" === e && (e = "white", g = !0), c.g.m = 1 === (d & 1), c.g.j = g, c.g.l = e; else if (16 === (e & 247) && 32 === (d & 240) || 23 === (e & 247) && 45 === (d & 255)) g = "black", 0 === (e & 7) && (g = $g[(d & 14) >> 1]), c.g.o = g; else if (17 === (e & 247) && 48 === (d & 240)) Ig(c.g, Lg, d); else if (18 === (e & 246) && 32 === (d & 224)) Ig(c.g, e & 1 ? Pg : Ng, d); else if (20 === (e & 246) && 32 === (d & 240)) { d = b.pts; e = null; switch (b.Na) { case 32: Xg(c); break; case 33: c = c.g; c.i[c.g].pop(); break; case 37: e = Ug(c, 2, d); break; case 38: e = Ug(c, 3, d); break; case 39: e = Ug(c, 4, d); break; case 40: Ig(c.g, Jg, 32); break; case 41: c.h = 2; c.g = c.i; c.g.h = 0; c.j = d; break; case 42: Fg(c.o); Zg(c); break; case 43: Zg(c); break; case 44: e = c.i; g = null; c.h !== Wg && (g = Gg(e, c.j, d)); Hg(e, 0, 15); e = g; break; case 45: e = c.g; c.h !== Vg ? e = null : (g = Gg(e, c.j, d), h = e.g - e.h + 1, Rg(e, h - 1, h, e.h), Hg(e, 0, h - 1), Hg(e, e.g, 15 - e.g), c.j = d, e = g); break; case 46: Hg(c.l, 0, 15); break; case 47: e = null, c.h !== Wg && (e = Gg(c.i, c.j, d)), g = c.l, c.l = c.i, c.i = g, Xg(c), c.j = d } d = e; break a } d = null } else e = b.Na, Ig(c.g, Jg, b.xa), Ig(c.g, Jg, e); return d } function Ah(a, b) { var c = []; try { for (; b.ma(); ) { var d = nh(b).value , e = (d & 224) >> 5 , f = d & 31; 7 === e && 0 != f && (e = nh(b).value & 63); if (0 != e) { a.j.has(e) || a.j.set(e, new oh(e)); for (var g = a.j.get(e), h = b.$(); b.$() - h < f; ) { e = b; var k = nh(e) , l = k.value , m = k.pts; if (16 === l) { var n = nh(e); l = l << 16 | n.value } if (0 <= l && 31 >= l) { var p = m; if (g.g) { var q = g.g; e = null; switch (l) { case 8: !gh(q) || 0 >= q.g && 0 >= q.h || (0 >= q.g ? (q.g = q.C - 1, q.h--) : q.g--, q.i[q.h][q.g] = null); break; case 13: q.isVisible() && (e = hh(q, p, g.i)); if (q.h + 1 >= q.F) { p = q; for (var x = 0, y = 1; 15 > y; y++, x++) p.i[x] = p.i[y]; for (y = 0; 1 > y; y++, x++) p.i[x] = eh() } else q.h++; q.g = 0; break; case 14: q.isVisible() && (e = hh(q, p, g.i)); q.i[q.h] = eh(); q.g = 0; break; case 12: q.isVisible() && (e = hh(q, p, g.i)), dh(q), p = q, p.h = 0, p.g = 0 } var w = e } else w = null } else if (128 <= l && 159 >= l) w = ph(g, e, l, m); else { if (4096 <= l && 4127 >= l) p = l & 255, 8 <= p && 15 >= p ? e.skip(1) : 16 <= p && 23 >= p ? e.skip(2) : 24 <= p && 31 >= p && e.skip(3); else if (4224 <= l && 4255 >= l) p = l & 255, 128 <= p && 135 >= p ? e.skip(4) : 136 <= p && 143 >= p && e.skip(5); else if (32 <= l && 127 >= l) e = l, g.g && (127 === e ? fh(g.g, "\u266a") : fh(g.g, String.fromCharCode(e))); else if (160 <= l && 255 >= l) g.g && fh(g.g, String.fromCharCode(l)); else if (4128 <= l && 4223 >= l) { if (e = l & 255, g.g) if (vh.has(e)) { var v = vh.get(e); fh(g.g, v) } else fh(g.g, "_") } else 4256 <= l && 4351 >= l && g.g && (160 != (l & 255) ? fh(g.g, "_") : fh(g.g, "[CC]")); w = null } (e = w) && c.push(e) } } } } catch (D) { if (D instanceof N && 3E3 === D.code) Wa("CEA708_INVALID_DATA", "Buffer read out of bounds / invalid CEA-708 Data."); else throw D; } return c } function Bh(a) { for (var b = 0; a; ) b ^= a & 1, a >>= 1; return 1 === b } ;function Ch(a, b) { var c = null , d = null , e = a.N(); b & 1 && a.skip(8); b & 2 && a.skip(4); b & 8 && (c = a.N()); b & 16 && (d = a.N()); return { trackId: e, ne: c, bf: d } } function Dh(a, b) { return { he: 1 == b ? a.Hb() : a.N() } } function Eh(a, b) { 1 == b ? (a.skip(8), a.skip(8)) : (a.skip(4), a.skip(4)); return { timescale: a.N() } } function Fh(a, b, c) { var d = a.N() , e = []; c & 1 && a.skip(4); c & 4 && a.skip(4); for (var f = 0; f < d; f++) { var g = { Sd: null, sampleSize: null, Zc: null }; c & 256 && (g.Sd = a.N()); c & 512 && (g.sampleSize = a.N()); c & 1024 && a.skip(4); c & 2048 && (g.Zc = 0 == b ? a.N() : a.De()); e.push(g) } return { Zg: d, Fe: e } } ;function Gh() { this.i = new Map; this.h = this.g = 0 } Gh.prototype.init = function(a) { var b = this , c = [] , d = []; (new ng).box("moov", rg).box("mvex", rg).U("trex", function(e) { var f = e.reader; f.skip(4); f.skip(4); e = f.N(); f = f.N(); b.g = e; b.h = f }).box("trak", rg).U("tkhd", function(e) { var f = e.reader; 1 == e.version ? (f.skip(8), f.skip(8)) : (f.skip(4), f.skip(4)); e = f.N(); c.push(e) }).box("mdia", rg).U("mdhd", function(e) { e = Eh(e.reader, e.version); d.push(e.timescale) }).parse(a, !0); if (!c.length || !d.length || c.length != d.length) throw new N(2,2,2010); c.forEach(function(e, f) { b.i.set(e, d[f]) }) } ; Gh.prototype.parse = function(a) { var b = this , c = [] , d = this.g , e = this.h , f = [] , g = null , h = 9E4; (new ng).box("moof", rg).box("traf", rg).U("trun", function(k) { f = Fh(k.reader, k.version, k.flags).Fe }).U("tfhd", function(k) { k = Ch(k.reader, k.flags); d = k.ne || b.g; e = k.bf || b.h; k = k.trackId; b.i.has(k) && (h = b.i.get(k)) }).U("tfdt", function(k) { g = Dh(k.reader, k.version).he }).box("mdat", function(k) { if (null === g) throw new N(2,2,2010); k = k.reader; var l = g , m = h , n = d , p = e , q = f , x = 0 , y = p; for (q.length && (y = q[0].sampleSize || p); k.ma(); ) { var w = k.N(); if (6 == (k.Sa() & 31)) { var v = 0; q.length > x && (v = q[x].Zc || 0); v = (l + v) / m; for (var D = [], C, A = k.$a(w - 1), G = C = 0; G < A.length; ) 2 == C && 3 == A[G] ? (C = 0, A = [].concat(ia(A)), A.splice(G, 1), A = new Uint8Array(A)) : 0 == A[G] ? C++ : C = 0, G++; C = A; for (G = 0; G < C.length; ) { for (A = 0; 255 == C[G]; ) A += 255, G++; A += C[G++]; for (var E = 0; 255 == C[G]; ) E += 255, G++; E += C[G++]; 4 == A && D.push(C.subarray(G, G + E)); G += E } D = t(D); for (C = D.next(); !C.done; C = D.next()) c.push({ Of: C.value, pts: v }) } else try { k.skip(w - 1) } catch (H) { break } y -= w + 4; 0 == y && (l = q.length > x ? l + (q[x].Sd || n) : l + n, x++, y = q.length > x ? q[x].sampleSize || p : p) } }).parse(a, !1); return c } ; function Hh() { this.h = new Gh; this.g = new wh } Hh.prototype.init = function(a) { this.h.init(a) } ; function Ih(a, b) { var c = a.h.parse(b); c = t(c); for (var d = c.next(); !d.done; d = c.next()) { var e = d.value , f = Fb(e.Of); if (0 < f.length && (d = a.g, e = e.pts, f = new kg(f,0), 181 === f.Sa() && 49 === f.Od() && 1195456820 === f.N() && 3 === f.Sa())) { var g = f.Sa(); if (0 !== (g & 64)) { g &= 31; f.skip(1); for (var h = 0; h < g; h++) { var k = f.Sa() , l = (k & 4) >> 2 , m = f.Sa() , n = f.Sa(); l && (k &= 3, 0 === k || 1 === k ? d.h.push({ pts: e, type: k, xa: m, Na: n, order: d.h.length }) : (d.g.push({ pts: e, type: k, value: m, order: d.g.length }), d.g.push({ pts: e, type: 2, value: n, order: d.g.length }))) } } } } return yh(a.g) } ;function Jh(a) { return !a || 1 == a.length && 1E-6 > a.end(0) - a.start(0) ? null : 1 == a.length && 0 > a.start(0) ? 0 : a.length ? a.start(0) : null } function Kh(a) { return !a || 1 == a.length && 1E-6 > a.end(0) - a.start(0) ? null : a.length ? a.end(a.length - 1) : null } function Lh(a, b) { return !a || !a.length || 1 == a.length && 1E-6 > a.end(0) - a.start(0) || b > a.end(a.length - 1) ? !1 : b >= a.start(0) } function Mh(a, b) { if (!a || !a.length || 1 == a.length && 1E-6 > a.end(0) - a.start(0)) return 0; for (var c = 0, d = t(Nh(a)), e = d.next(); !e.done; e = d.next()) { var f = e.value; e = f.start; f = f.end; f > b && (c += f - Math.max(e, b)) } return c } function Oh(a, b, c) { if (!a || !a.length || 1 == a.length && 1E-6 > a.end(0) - a.start(0)) return null; a = Nh(a).findIndex(function(d, e, f) { return d.start > b && (0 == e || f[e - 1].end - b <= c) }); return 0 <= a ? a : null } function Nh(a) { if (!a) return []; for (var b = [], c = 0; c < a.length; c++) b.push({ start: a.start(c), end: a.end(c) }); return b } ;function Ph(a, b, c, d) { var e = this; this.j = a; this.m = c; this.h = {}; this.M = {}; this.L = {}; this.g = null; this.F = !1; this.T = d || function() {} ; this.i = {}; this.o = new gf; this.u = {}; this.C = b; this.G = new nc; this.l = Qh(this, this.G); this.D = new ef(function() { return Rh(e) } ); this.I = ""; this.s = !1; this.O = new nc } function Qh(a, b) { var c = new MediaSource; a.o.oa(c, "sourceopen", function() { URL.revokeObjectURL(a.I); b.resolve() }); a.I = Sh(c); a.j.src = a.I; return c } r = Ph.prototype; r.destroy = function() { return this.D.destroy() } ; function Rh(a) { var b, c, d, e, f, g, h, k; return L(function(l) { if (1 == l.g) { b = []; for (c in a.i) for (d = a.i[c], e = d[0], a.i[c] = d.slice(0, 1), e && b.push(e.p["catch"](bc)), f = t(d.slice(1)), g = f.next(); !g.done; g = f.next()) h = g.value, h.p.reject(new N(2,7,7003,void 0)); a.g && b.push(a.g.destroy()); a.m && b.push(a.m.destroy()); for (k in a.u) b.push(a.u[k].destroy()); return u(l, Promise.all(b), 2) } a.o && (a.o.release(), a.o = null); a.j && (a.j.removeAttribute("src"), a.j.load(), a.j = null); a.l = null; a.g = null; a.m = null; a.h = {}; a.u = {}; a.C = null; a.i = {}; z(l) }) } r.init = function(a, b, c) { c = void 0 === c ? !1 : c; var d = this, e, f, g, h, k, l, m; return L(function(n) { if (1 == n.g) return e = mc, u(n, d.G, 2); d.s = c; f = {}; g = t(a.keys()); for (h = g.next(); !h.done; f = { pa: f.pa }, h = g.next()) f.pa = h.value, k = a.get(f.pa), l = Kc(k.mimeType, k.codecs), f.pa == e.X ? Th(d, l, c) : (!b && MediaSource.isTypeSupported(l) || !Fc(l, f.pa) || (d.u[f.pa] = new Ec, l = Hc(f.pa, l)), m = d.l.addSourceBuffer(l), d.o.B(m, "error", function(p) { return function() { d.i[p.pa][0].p.reject(new N(2,3,3014,d.j.error ? d.j.error.code : 0)) } }(f)), d.o.B(m, "updateend", function(p) { return function() { return Uh(d, p.pa) } }(f)), d.h[f.pa] = m, d.M[f.pa] = l, d.i[f.pa] = [], d.L[f.pa] = !!k.drmInfos.length); z(n) }) } ; function Th(a, b, c) { a.g || (a.g = new Pc(a.m)); var d = a.g; a = a.F; "application/cea-608" != b && "application/cea-708" != b && (d.j = (0, Rc[b])(), d.j.setSequenceMode ? d.j.setSequenceMode(c) : Va('Text parsers should have a "setSequenceMode" method!'), d.u = a) } function Vh(a) { return a.l ? "ended" == a.l.readyState : !0 } function Wh(a, b) { return b == lc ? a.g.g : Jh(Xh(a, b)) } function Yh(a, b) { return b == lc ? a.g.h : Kh(Xh(a, b)) } function Zh(a, b, c) { if (b == lc) return a = a.g, null == a.h || a.h < c ? 0 : a.h - Math.max(c, a.g); a = Xh(a, b); return Mh(a, c) } r.Oa = function() { var a = { total: Nh(this.j.buffered), audio: Nh(Xh(this, "audio")), video: Nh(Xh(this, "video")), text: [] }; if (this.g) { var b = this.g.g , c = this.g.h; null != b && null != c && a.text.push({ start: b, end: c }) } return a } ; function Xh(a, b) { try { return a.h[b].buffered } catch (c) { return null } } function $h(a, b, c, d, e, f, g) { var h, k, l, m, n, p, q, x, y, w, v, D, C, A, G, E; return L(function(H) { switch (H.g) { case 1: h = mc; if (b != h.X) { H.A(2); break } if (!a.s) { H.A(3); break } return u(H, a.O, 4); case 4: k = H.h, a.g.s = k; case 3: return u(H, Sc(a.g, c, d, e), 5); case 5: return H["return"](); case 2: if (!a.u[b]) { f && (a.g || Th(a, "text/vtt", a.s), null == d && null == e ? a.C.init(c) : (l = Ih(a.C, c), l.length && (m = a.h[h.va].timestampOffset, Xc(a.g, l, d, e, m)))); H.A(6); break } return u(H, Ic(a.u[b], c), 7); case 7: n = H.h, a.g || Th(a, "text/vtt", a.s), n.metadata && (p = a.h[b].timestampOffset, a.T(n.metadata, p, e)), n.captions && n.captions.length && (q = a.h[h.va].timestampOffset, x = Vc(n.captions), Xc(a.g, x, d, e, q)), c = n.data; case 6: c = ai(a, c, d, b); y = a.h[b]; w = bi; if (!a.s || y.mode == w || null == d) { H.A(8); break } v = b == h.va || !(h.va in a.h); if (!v) { H.A(9); break } D = [y.appendWindowStart, y.appendWindowEnd]; y.appendWindowStart = 0; y.appendWindowEnd = Infinity; C = y.timestampOffset; y.timestampOffset = 0; return u(H, ci(a, b, function() { a.h[b].appendBuffer(c) }), 10); case 10: return y.timestampOffset = C, y.appendWindowStart = D[0], y.appendWindowEnd = D[1], A = Jh(Xh(a, b)), G = (d || 0) - (A || 0), a.O.resolve(G), u(H, ci(a, b, function() { return di(a, b, 0, a.l.duration) }), 9); case 9: y.mode = w; case 8: return null != d && a.s && b != h.X && g && (E = d, ci(a, b, function() { var J = E; 0 > J && (J += .001); a.h[b].timestampOffset = J; Uh(a, b) })), u(H, ci(a, b, function() { a.h[b].appendBuffer(c) }), 0) } }) } function ei(a, b) { var c = Yh(a, "video") || 0; Uc(a.g, b, c) } function fi(a) { a.g && Uc(a.g, "", 0) } r.remove = function(a, b, c) { var d = this, e; return L(function(f) { e = mc; return a == e.X ? u(f, d.g.remove(b, c), 0) : u(f, ci(d, a, function() { return di(d, a, b, c) }), 0) }) } ; function gi(a, b) { var c; return L(function(d) { c = mc; return b == c.X ? a.g ? u(d, a.g.remove(0, Infinity), 0) : d["return"]() : u(d, ci(a, b, function() { return di(a, b, 0, a.l.duration) }), 0) }) } r.flush = function(a) { var b = this, c; return L(function(d) { c = mc; return a == c.X ? d["return"]() : u(d, ci(b, a, function() { b.j.currentTime -= .001; Uh(b, a) }), 0) }) } ; function hi(a, b, c, d, e, f) { var g; return L(function(h) { g = mc; return b == g.X ? (f || (a.g.s = c), Tc(a.g, d, e), h["return"]()) : u(h, Promise.all([ci(a, b, function() { var k = a.h[b].appendWindowStart , l = a.h[b].appendWindowEnd; a.h[b].abort(); a.h[b].appendWindowStart = k; a.h[b].appendWindowEnd = l; Uh(a, b) }), f ? Promise.resolve() : ci(a, b, function() { var k = c; 0 > k && (k += .001); a.h[b].timestampOffset = k; Uh(a, b) }), ci(a, b, function() { a.h[b].appendWindowStart = 0; a.h[b].appendWindowEnd = e; a.h[b].appendWindowStart = d; Uh(a, b) })]), 0) }) } r.endOfStream = function(a) { var b = this; return L(function(c) { return u(c, ii(b, function() { Vh(b) || (a ? b.l.endOfStream(a) : b.l.endOfStream()) }), 0) }) } ; r.Ia = function(a) { var b = this; return L(function(c) { return u(c, ii(b, function() { b.l.duration = a }), 0) }) } ; r.getDuration = function() { return this.l.duration } ; function di(a, b, c, d) { d <= c ? Uh(a, b) : a.h[b].remove(c, d) } function Uh(a, b) { var c = a.i[b][0]; c && (c.p.resolve(), ji(a, b)) } function ci(a, b, c) { ff(a.D); c = { start: c, p: new nc }; a.i[b].push(c); 1 == a.i[b].length && ki(a, b); return c.p } function ii(a, b) { var c, d, e, f, g, h; return L(function(k) { switch (k.g) { case 1: ff(a.D); c = []; d = {}; for (e in a.h) d.Qb = new nc, f = { start: function(l) { return function() { return l.Qb.resolve() } }(d), p: d.Qb }, a.i[e].push(f), c.push(d.Qb), 1 == a.i[e].length && f.start(), d = { Qb: d.Qb }; B(k, 2); return u(k, Promise.all(c), 4); case 4: va(k, 3); break; case 2: throw g = F(k), g; case 3: try { b() } catch (l) { throw new N(2,3,3015,l); } finally { for (h in a.h) ji(a, h) } z(k) } }) } function ji(a, b) { a.i[b].shift(); ki(a, b) } function ki(a, b) { var c = a.i[b][0]; if (c) try { c.start() } catch (d) { "QuotaExceededError" == d.name ? c.p.reject(new N(2,3,3017,b)) : c.p.reject(new N(2,3,3015,d)), ji(a, b) } } function ai(a, b, c, d) { var e = a.L[d]; null == c && e && (rd() || pd()) && "mp4" == a.M[d].split(";")[0].split("/")[1] && (b = wg(b)); return b } var Sh = window.URL.createObjectURL , bi = "sequence" , li = ["audio/aac", "audio/ac3", "audio/ec3", "audio/mpeg"]; function mi(a, b, c, d) { this.ya = a; this.Ba = b; this.la = c; this.Fd = void 0 === d ? null : d } mi.prototype.fc = function() { return this.Ba } ; mi.prototype.bc = function() { return this.la } ; function ni(a, b) { return a && b ? a.fc() == b.fc() && a.bc() == b.bc() && gb(a.ya(), b.ya()) : a == b } M("shaka.media.InitSegmentReference", mi); mi.prototype.getEndByte = mi.prototype.bc; mi.prototype.getStartByte = mi.prototype.fc; function oi(a, b, c, d, e, f, g, h, k, l, m, n, p, q) { l = void 0 === l ? [] : l; q = void 0 === q ? pi : q; this.startTime = a; this.j = this.endTime = b; this.m = c; this.Ba = d; this.la = e; this.i = f; this.timestampOffset = g; this.appendWindowStart = h; this.appendWindowEnd = k; this.h = l; this.tilesLayout = void 0 === m ? "" : m; this.l = void 0 === n ? null : n; this.g = void 0 === p ? null : p; this.status = q } r = oi.prototype; r.ya = function() { return this.m() } ; r.getStartTime = function() { return this.startTime } ; r.jf = function() { return this.endTime } ; r.fc = function() { return this.Ba } ; r.bc = function() { return this.la } ; r.Bf = function() { return this.tilesLayout } ; r.Af = function() { return this.l } ; r.Oc = function() { return this.status } ; r.If = function() { this.status = qi } ; M("shaka.media.SegmentReference", oi); oi.prototype.markAsUnavailable = oi.prototype.If; oi.prototype.getStatus = oi.prototype.Oc; oi.prototype.getTileDuration = oi.prototype.Af; oi.prototype.getTilesLayout = oi.prototype.Bf; oi.prototype.getEndByte = oi.prototype.bc; oi.prototype.getStartByte = oi.prototype.fc; oi.prototype.getEndTime = oi.prototype.jf; oi.prototype.getStartTime = oi.prototype.getStartTime; oi.prototype.getUris = oi.prototype.ya; var pi = 0 , qi = 1; oi.Status = { ng: pi, Tg: qi, Cg: 2 }; function T(a, b, c) { this.l = a; this.Yc = b; this.m = this.i = Infinity; this.g = 1; this.h = this.j = null; this.o = 0; this.s = !0; this.u = 0; this.C = void 0 === c ? !0 : c; this.D = 0 } r = T.prototype; r.getDuration = function() { return this.i } ; r.qf = function() { return this.g } ; r.Ia = function(a) { this.i = a } ; r.wf = function() { return this.l } ; r.Je = function(a) { this.o = a } ; r.tc = function(a) { this.s = a } ; r.$d = function(a) { this.m = a } ; r.dg = function(a) { this.Yc = a } ; r.hf = function() { return this.Yc } ; r.Eb = function(a) { if (0 != a.length) { var b = a[a.length - 1].endTime; this.Jd(a[0].startTime); this.g = a.reduce(function(c, d) { return Math.max(c, d.endTime - d.startTime) }, this.g); this.h = Math.max(this.h, b); null != this.l && this.C && (this.l = (Date.now() + this.o) / 1E3 - this.h - this.g) } } ; r.Jd = function(a) { this.j = null == this.j ? a : Math.min(this.j, a) } ; r.Id = function(a) { this.g = Math.max(this.g, a) } ; r.offset = function(a) { null != this.j && (this.j += a); null != this.h && (this.h += a) } ; r.V = function() { return Infinity == this.i && !this.s } ; r.jb = function() { return Infinity != this.i && !this.s } ; r.Qa = function() { return Math.max(this.u, this.gb() - this.m) } ; r.Ke = function(a) { this.u = a } ; r.gb = function() { return this.V() || this.jb() ? Math.min(Math.max(0, (Date.now() + this.o) / 1E3 - this.g - this.l) + this.D, this.i) : this.h ? Math.min(this.h, this.i) : this.i } ; r.ec = function(a) { var b = Math.max(this.j, this.u); return Infinity == this.m ? Math.ceil(1E3 * b) / 1E3 : Math.max(b, Math.min(this.gb() - this.m + a, this.Pa())) } ; r.Ab = function() { return this.ec(0) } ; r.Pa = function() { return Math.max(0, this.gb() - (this.V() || this.jb() ? this.Yc : 0)) } ; r.Ne = function() { return null == this.l || null != this.h && this.C ? !1 : !0 } ; r.Ie = function(a) { this.D = a } ; M("shaka.media.PresentationTimeline", T); T.prototype.setAvailabilityTimeOffset = T.prototype.Ie; T.prototype.usingPresentationStartTime = T.prototype.Ne; T.prototype.getSeekRangeEnd = T.prototype.Pa; T.prototype.getSeekRangeStart = T.prototype.Ab; T.prototype.getSafeSeekRangeStart = T.prototype.ec; T.prototype.getSegmentAvailabilityEnd = T.prototype.gb; T.prototype.setUserSeekStart = T.prototype.Ke; T.prototype.getSegmentAvailabilityStart = T.prototype.Qa; T.prototype.isInProgress = T.prototype.jb; T.prototype.isLive = T.prototype.V; T.prototype.offset = T.prototype.offset; T.prototype.notifyMaxSegmentDuration = T.prototype.Id; T.prototype.notifyMinSegmentStartTime = T.prototype.Jd; T.prototype.notifySegments = T.prototype.Eb; T.prototype.getDelay = T.prototype.hf; T.prototype.setDelay = T.prototype.dg; T.prototype.setSegmentAvailabilityDuration = T.prototype.$d; T.prototype.setStatic = T.prototype.tc; T.prototype.setClockOffset = T.prototype.Je; T.prototype.getPresentationStartTime = T.prototype.wf; T.prototype.setDuration = T.prototype.Ia; T.prototype.getMaxSegmentDuration = T.prototype.qf; T.prototype.getDuration = T.prototype.getDuration; function ri(a, b, c) { this.l = c; this.j = a; this.s = si(a); this.g = a.g.currentTime; this.m = Date.now() / 1E3; this.h = !1; this.o = 0; this.u = b; this.i = function() {} } ri.prototype.release = function() { this.l = this.j = null; this.i = function() {} } ; function ti(a, b) { a.i = b } function ui(a) { this.g = a } function si(a) { if (a.g.paused || 0 == a.g.playbackRate || 0 == a.g.buffered.length) var b = !1; else a: { b = a.g.currentTime; a = t(Nh(a.g.buffered)); for (var c = a.next(); !c.done; c = a.next()) if (c = c.value, !(b < c.start - .1 || b > c.end - .5)) { b = !0; break a } b = !1 } return b } ;function vi(a, b, c, d, e) { var f = this; this.o = e; this.g = a; this.s = b; this.D = c; this.i = new gf; this.m = !1; this.C = a.readyState; this.u = 0; this.h = d; this.l = !1; this.i.B(a, "waiting", function() { return wi(f) }); this.j = (new Q(function() { wi(f) } )).Ca(.25) } vi.prototype.release = function() { this.i && (this.i.release(), this.i = null); null != this.j && (this.j.stop(), this.j = null); this.h && (this.h.release(), this.h = null); this.g = this.s = this.o = null } ; vi.prototype.Md = function() { this.l = !0; wi(this) } ; function wi(a) { if (0 != a.g.readyState) { if (a.g.seeking) { if (!a.m) return } else a.m = !1; if (!a.g.paused || 0 == a.g.currentTime && (a.g.autoplay || 0 != a.g.currentTime)) { a.g.readyState != a.C && (a.C = a.g.readyState); var b; if (!(b = !a.h)) { b = a.h; var c = b.j , d = si(c) , e = c.g.currentTime , f = Date.now() / 1E3; if (b.g != e || b.s != d) b.m = f, b.g = e, b.s = d, b.h = !1; e = f - b.m; if (d = e >= b.u && d && !b.h) b.i(b.g, e), b.h = !0, b.g = c.g.currentTime, b.o++, b.l(new R("stalldetected")); b = !d } b && (b = a.g.currentTime, c = a.g.buffered, d = Oh(c, b, a.D.gapDetectionThreshold), null == d || 0 == d && !a.l || (e = c.start(d), e >= a.s.Pa() || .001 > e - b || (0 != d && c.end(d - 1), a.g.currentTime = e, a.u++, a.o(new R("gapjumped"))))) } } } ;function xi(a, b, c, d) { b == HTMLMediaElement.HAVE_NOTHING || a.readyState >= b ? d() : (b = yi.value().get(b), c.oa(a, b, d)) } var yi = new oc(function() { return new Map([[HTMLMediaElement.HAVE_METADATA, "loadedmetadata"], [HTMLMediaElement.HAVE_CURRENT_DATA, "loadeddata"], [HTMLMediaElement.HAVE_FUTURE_DATA, "canplay"], [HTMLMediaElement.HAVE_ENOUGH_DATA, "canplaythrough"]]) } ); function zi(a, b, c) { var d = this; this.g = a; this.l = b; this.j = c; this.m = !1; this.h = new gf; this.i = new Ai(a); xi(this.g, HTMLMediaElement.HAVE_METADATA, this.h, function() { Bi(d, d.j) }) } zi.prototype.release = function() { this.h && (this.h.release(), this.h = null); null != this.i && (this.i.release(), this.i = null); this.l = function() {} ; this.g = null } ; function Ci(a) { return a.m ? a.g.currentTime : a.j } function Di(a, b) { 0 < a.g.readyState ? Ei(a.i, b) : xi(a.g, HTMLMediaElement.HAVE_METADATA, a.h, function() { Bi(a, a.j) }) } function Bi(a, b) { .001 > Math.abs(a.g.currentTime - b) ? Fi(a) : (a.h.oa(a.g, "seeking", function() { Fi(a) }), Ei(a.i, 0 == a.g.currentTime ? b : a.g.currentTime)) } function Fi(a) { a.m = !0; a.h.B(a.g, "seeking", function() { return a.l() }) } function Ai(a) { var b = this; this.h = a; this.m = 10; this.l = this.j = this.i = 0; this.g = new Q(function() { 0 >= b.i ? b.g.stop() : b.h.currentTime != b.j ? b.g.stop() : (b.h.currentTime = b.l, b.i--) } ) } Ai.prototype.release = function() { this.g && (this.g.stop(), this.g = null); this.h = null } ; function Ei(a, b) { a.j = a.h.currentTime; a.l = b; a.i = a.m; a.h.currentTime = b; a.g.Ca(.1) } ;function Gi(a) { function b() { null == c.h || 0 == c.h ? c.j = !0 : (c.i.oa(c.g, "seeking", function() { c.j = !0 }), c.g.currentTime = Math.max(0, c.g.currentTime + c.h)) } var c = this; this.g = a; this.j = !1; this.h = null; this.i = new gf; xi(this.g, HTMLMediaElement.HAVE_CURRENT_DATA, this.i, function() { b() }) } r = Gi.prototype; r.release = function() { this.i && (this.i.release(), this.i = null); this.g = null } ; r.td = function(a) { this.h = this.j ? this.h : a } ; r.Bc = function() { return (this.j ? this.g.currentTime : this.h) || 0 } ; r.ge = function() { return 0 } ; r.fe = function() { return 0 } ; r.ze = function() {} ; function Hi(a, b, c, d, e, f) { var g = this; this.i = a; this.g = b.presentationTimeline; this.C = b.minBufferTime || 0; this.l = c; this.s = e; this.o = null; this.u = Ii(a, c, f); this.j = new vi(a,b.presentationTimeline,c,this.u,f); this.h = new zi(a,function() { a: { var h = g.j; h.m = !0; h.l = !1; var k = Ci(g.h); h = Ji(g, k); if (.001 < Math.abs(h - k) && (k = Date.now() / 1E3, !g.o || g.o < k - 1)) { g.o = k; Di(g.h, h); h = void 0; break a } g.s(); h = void 0 } return h } ,Ki(this, d)); this.m = (new Q(function() { if (0 != g.i.readyState && !g.i.paused) { var h = Ci(g.h) , k = g.g.Ab() , l = g.g.Pa(); 3 > l - k && (k = l - 3); h < k && (h = Ji(g, h), g.i.currentTime = h) } } )).Ca(.25) } r = Hi.prototype; r.release = function() { this.h && (this.h.release(), this.h = null); this.j && (this.j.release(), this.j = null); this.m && (this.m.stop(), this.m = null); this.i = this.h = this.g = this.l = null; this.s = function() {} } ; r.td = function(a) { Di(this.h, a) } ; r.Bc = function() { var a = Ci(this.h); return 0 < this.i.readyState && !this.i.paused ? Li(this, a) : a } ; r.ge = function() { return this.u.o } ; r.fe = function() { return this.j.u } ; function Ki(a, b) { null == b ? b = Infinity > a.g.getDuration() ? a.g.Ab() : a.g.Pa() : 0 > b && (b = a.g.Pa() + b); return Mi(a, Li(a, b)) } r.ze = function() { this.j.Md() } ; function Mi(a, b) { var c = a.g.getDuration(); return b >= c ? c - a.l.durationBackoff : b } function Ji(a, b) { var c = Math.max(a.C, a.l.rebufferingGoal) , d = a.l.safeSeekOffset , e = a.g.Ab() , f = a.g.Pa() , g = a.g.getDuration(); 3 > f - e && (e = f - 3); var h = a.g.ec(c) , k = a.g.ec(d); c = a.g.ec(c + d); return b >= g ? Mi(a, b) : b > f ? f : b < e ? Lh(a.i.buffered, k) ? k : c : b >= h || Lh(a.i.buffered, b) ? b : c } function Li(a, b) { var c = a.g.Ab(); if (b < c) return c; c = a.g.Pa(); return b > c ? c : b } function Ii(a, b, c) { if (!b.stallEnabled) return null; var d = b.stallSkip; b = new ri(new ui(a),b.stallThreshold,c); ti(b, function() { d ? a.currentTime += d : (a.pause(), a.play()) }); return b } ;function Ni(a) { this.J = a; this.g = null; this.h = 0; this.i = !1 } r = Ni.prototype; r.release = function() { this.i || (this.J = [], this.g && this.g.stop(), this.g = null) } ; r.Jf = function() { this.i = !0 } ; r.find = function(a) { for (var b = this.J.length - 1, c = b; 0 <= c; --c) { var d = this.J[c] , e = c < b ? this.J[c + 1].startTime : d.endTime; if (a >= d.startTime && a < e) return c + this.h } return this.J.length && a < this.J[0].startTime ? this.h : null } ; r.get = function(a) { if (0 == this.J.length) return null; a -= this.h; return 0 > a || a >= this.J.length ? null : this.J[a] } ; r.offset = function(a) { if (!this.i) for (var b = t(this.J), c = b.next(); !c.done; c = b.next()) { c = c.value; c.startTime += a; c.endTime += a; c.j += a; c = t(c.h); for (var d = c.next(); !d.done; d = c.next()) d = d.value, d.startTime += a, d.endTime += a, d.j += a } } ; r.kc = function(a) { !this.i && a.length && (this.J = this.J.filter(function(b) { return b.startTime < a[0].startTime }), this.J.push.apply(this.J, ia(a))) } ; r.Db = function(a, b) { var c = this; a = a.filter(function(d) { return d.endTime > b && (0 == c.J.length || d.endTime > c.J[0].startTime) }); this.kc(a); this.eb(b) } ; r.eb = function(a) { if (!this.i) { var b = this.J.length; this.J = this.J.filter(function(c) { return c.endTime > a }); this.h += b - this.J.length } } ; r.Ya = function(a, b, c) { c = void 0 === c ? !1 : c; if (!this.i) { for (; this.J.length; ) if (this.J[this.J.length - 1].startTime >= b) this.J.pop(); else break; for (; this.J.length; ) if (this.J[0].endTime <= a) this.J.shift(), c || this.h++; else break; 0 != this.J.length && (a = this.J[this.J.length - 1], this.J[this.J.length - 1] = new oi(a.startTime,b,a.m,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g)) } } ; r.$c = function(a, b) { var c = this; this.i || (this.g && this.g.stop(), this.g = new Q(function() { var d = b(); d ? c.J.push.apply(c.J, ia(d)) : (c.g.stop(), c.g = null) } ), this.g.Ca(a)) } ; Ni.prototype[Symbol.iterator] = function() { return this.zb(0) } ; Ni.prototype.zb = function(a) { var b = this.find(a); if (null == b) return null; b--; var c = this.get(b + 1) , d = -1; if (c && 0 < c.h.length) for (var e = c.h.length - 1; 0 <= e; --e) { var f = c.h[e]; if (a >= f.startTime && a < f.endTime) { b++; d = e - 1; break } } return new Oi(this,b,d) } ; function Pi(a, b, c) { return new Ni([new oi(a,a + b,function() { return c } ,0,null,null,a,a,a + b)]) } M("shaka.media.SegmentIndex", Ni); Ni.forSingleSegment = Pi; Ni.prototype.getIteratorForTime = Ni.prototype.zb; Ni.prototype.updateEvery = Ni.prototype.$c; Ni.prototype.fit = Ni.prototype.Ya; Ni.prototype.evict = Ni.prototype.eb; Ni.prototype.mergeAndEvict = Ni.prototype.Db; Ni.prototype.offset = Ni.prototype.offset; Ni.prototype.get = Ni.prototype.get; Ni.prototype.find = Ni.prototype.find; Ni.prototype.markImmutable = Ni.prototype.Jf; Ni.prototype.release = Ni.prototype.release; function Oi(a, b, c) { this.i = a; this.h = b; this.g = c } Oi.prototype.current = function() { var a = this.i.get(this.h); a && 0 < a.h.length && a.ya().length && this.g >= a.h.length && (this.h++, this.g = 0, a = this.i.get(this.h)); return a && 0 < a.h.length ? a.h[this.g] : a } ; Oi.prototype.next = function() { var a = this.i.get(this.h); a && 0 < a.h.length ? (this.g++, a.ya().length && this.g == a.h.length && (this.h++, this.g = 0)) : (this.h++, this.g = 0); a = this.current(); return { value: a, done: !a } } ; M("shaka.media.SegmentIterator", Oi); Oi.prototype.next = Oi.prototype.next; Oi.prototype.current = Oi.prototype.current; function Qi() { Ni.call(this, []); this.j = [] } pa(Qi, Ni); r = Qi.prototype; r.clone = function() { var a = new Qi; a.j = this.j.slice(); return a } ; r.release = function() { for (var a = t(this.j), b = a.next(); !b.done; b = a.next()) b.value.release(); this.j = [] } ; r.find = function(a) { for (var b = 0, c = t(this.j), d = c.next(); !d.done; d = c.next()) { d = d.value; var e = d.find(a); if (null != e) return e + b; b += d.h + d.J.length } return null } ; r.get = function(a) { for (var b = 0, c = t(this.j), d = c.next(); !d.done; d = c.next()) { d = d.value; var e = d.get(a - b); if (e) return e; b += d.h + d.J.length } return null } ; r.offset = function() {} ; r.kc = function() {} ; r.eb = function() {} ; r.Db = function() {} ; r.Ya = function() {} ; r.$c = function() {} ; M("shaka.media.MetaSegmentIndex", Qi); Qi.prototype.updateEvery = Qi.prototype.$c; Qi.prototype.fit = Qi.prototype.Ya; Qi.prototype.mergeAndEvict = Qi.prototype.Db; Qi.prototype.evict = Qi.prototype.eb; Qi.prototype.merge = Qi.prototype.kc; Qi.prototype.offset = Qi.prototype.offset; Qi.prototype.get = Qi.prototype.get; Qi.prototype.find = Qi.prototype.find; Qi.prototype.release = Qi.prototype.release; function Ri(a) { var b = this; this.g = a; this.j = !1; this.i = this.g.Nc(); this.h = new Q(function() { b.g.ye(.25 * b.i) } ) } Ri.prototype.release = function() { this.h && (this.h.stop(), this.h = null); this.g = null } ; Ri.prototype.set = function(a) { this.i = a; Si(this) } ; Ri.prototype.Jc = function() { return this.g.Jc() } ; function Si(a) { a.h.stop(); var b = a.j ? 0 : a.i; if (0 <= b) try { a.g.Nc() != b && a.g.Zd(b); return } catch (c) {} a.h.Ca(.25); 0 != a.g.Nc() && a.g.Zd(0) } ;function Ti(a) { var b = this; this.h = a; this.g = new Set; this.i = (new Q(function() { Ui(b, !1) } )).Ca(.25) } Ti.prototype.release = function() { this.i.stop(); for (var a = t(this.g), b = a.next(); !b.done; b = a.next()) b.value.release(); this.g.clear() } ; function Ui(a, b) { for (var c = t(a.g), d = c.next(); !d.done; d = c.next()) d.value.j(a.h.currentTime, b) } ;function Vi(a) { Pe.call(this); this.g = new Map; this.h = a } pa(Vi, Pe); Vi.prototype.release = function() { this.g.clear(); Pe.prototype.release.call(this) } ; function Wi(a, b) { var c = a.g.get(b); c || (c = { mc: [], le: null, contentType: b }, a.g.set(b, c)); return c } function Xi(a, b, c) { var d = Wi(a, b.contentType); Yi(a, d); a = { Fd: b, position: c }; d = d.mc; b = d.findIndex(function(e) { return e.position >= c }); 0 <= b ? d.splice(b, d[b].position == c ? 1 : 0, a) : d.push(a) } Vi.prototype.j = function(a) { for (var b = t(this.g.values()), c = b.next(); !c.done; c = b.next()) { c = c.value; a: { var d = c.mc; for (var e = d.length - 1; 0 <= e; e--) { var f = d[e]; if (f.position <= a) { d = f.Fd; break a } } d = null } if (e = d) e = c.le, e = !(e === d || e && d && e.bandwidth == d.bandwidth && e.audioSamplingRate == d.audioSamplingRate && e.codecs == d.codecs && e.contentType == d.contentType && e.frameRate == d.frameRate && e.height == d.height && e.mimeType == d.mimeType && e.channelsCount == d.channelsCount && e.pixelAspectRatio == d.pixelAspectRatio && e.width == d.width); if (e) a: { e = a; f = d.contentType; if ((f = this.h()[f]) && 0 < f.length) { var g = f[f.length - 1].end; if (e >= f[0].start && e < g) { e = !0; break a } } e = !1 } e && (c.le = d, JSON.stringify(d), c = new R("qualitychange",new Map([["quality", d], ["position", a]])), this.dispatchEvent(c)) } } ; function Yi(a, b) { var c = a.h()[b.contentType]; if (c && 0 < c.length) { var d = c[0].start , e = c[c.length - 1].end , f = b.mc; b.mc = f.filter(function(g, h) { return g.position <= d && h + 1 < f.length && f[h + 1].position <= d || g.position >= e ? !1 : !0 }) } else b.mc = [] } ;function Zi(a) { Pe.call(this); var b = this; this.g = new Set; this.i = a; this.h = (new Q(function() { for (var c = b.i(), d = t(b.g), e = d.next(); !e.done; e = d.next()) e = e.value, e.endTime < c.start && (b.g["delete"](e), e = new R("regionremove",new Map([["region", e]])), b.dispatchEvent(e)) } )).Ca(2) } pa(Zi, Pe); Zi.prototype.release = function() { this.g.clear(); this.h.stop(); Pe.prototype.release.call(this) } ; function $i(a) { Pe.call(this); var b = this; this.i = a; this.g = new Map; this.l = [{ qb: null, pb: aj, ib: function(c, d) { return bj(b, "enter", c, d) } }, { qb: cj, pb: aj, ib: function(c, d) { return bj(b, "enter", c, d) } }, { qb: dj, pb: aj, ib: function(c, d) { return bj(b, "enter", c, d) } }, { qb: aj, pb: cj, ib: function(c, d) { return bj(b, "exit", c, d) } }, { qb: aj, pb: dj, ib: function(c, d) { return bj(b, "exit", c, d) } }, { qb: cj, pb: dj, ib: function(c, d) { return bj(b, "skip", c, d) } }, { qb: dj, pb: cj, ib: function(c, d) { return bj(b, "skip", c, d) } }]; this.h = new gf; this.h.B(this.i, "regionremove", function(c) { b.g["delete"](c.region) }) } pa($i, Pe); $i.prototype.release = function() { this.i = null; this.g.clear(); this.h.release(); this.h = null; Pe.prototype.release.call(this) } ; $i.prototype.j = function(a, b) { for (var c = t(this.i.g), d = c.next(); !d.done; d = c.next()) { d = d.value; var e = this.g.get(d) , f = a < d.startTime ? cj : a > d.endTime ? dj : aj; this.g.set(d, f); for (var g = t(this.l), h = g.next(); !h.done; h = g.next()) h = h.value, h.qb == e && h.pb == f && h.ib(d, b) } } ; function bj(a, b, c, d) { b = new R(b,new Map([["region", c], ["seeking", d]])); a.dispatchEvent(b) } var cj = 1 , aj = 2 , dj = 3; function ej(a, b, c, d, e) { a = Ye(a, d, e); if (0 != b || null != c) a.headers.Range = c ? "bytes=" + b + "-" + c : "bytes=" + b + "-"; return a } ;function fj(a, b) { var c = this; this.g = b; this.m = a; this.i = null; this.u = 1; this.o = this.l = null; this.h = new Map; this.C = !1; this.D = null; this.s = !1; this.j = new ef(function() { return gj(c) } ) } fj.prototype.destroy = function() { return this.j.destroy() } ; function gj(a) { var b, c, d, e; return L(function(f) { if (1 == f.g) { b = []; c = t(a.h.values()); for (d = c.next(); !d.done; d = c.next()) e = d.value, hj(e), b.push(ij(e)); return u(f, Promise.all(b), 2) } a.h.clear(); a.g = null; a.m = null; a.i = null; z(f) }) } fj.prototype.configure = function(a) { this.i = a; this.D = new De({ maxAttempts: Math.max(a.retryParameters.maxAttempts, 2), baseDelay: a.retryParameters.baseDelay, backoffFactor: a.retryParameters.backoffFactor, fuzzFactor: a.retryParameters.fuzzFactor, timeout: 0, stallTimeout: 0, connectionTimeout: 0 },!0) } ; fj.prototype.start = function() { var a = this; return L(function(b) { if (1 == b.g) return u(b, jj(a), 2); ff(a.j); a.C = !0; z(b) }) } ; function kj(a, b) { var c, d, e, f, g, h; L(function(k) { switch (k.g) { case 1: return c = mc, B(k, 2), u(k, gi(a.g.P, c.X), 4); case 4: va(k, 3); break; case 2: if (d = F(k), a.g) a.g.onError(d); case 3: e = Kc(b.mimeType, b.codecs); Th(a.g.P, e, a.m.sequenceMode); f = a.g.P.m; if (g = f.isTextVisible() || a.i.alwaysStreamText) h = lj(b), a.h.set(c.X, h), mj(a, h, 0); z(k) } }) } function nj(a) { var b = a.h.get(lc); b && (hj(b), ij(b)["catch"](function() {}), a.h["delete"](lc)); a.o = null } function oj(a, b) { var c = a.h.get("video"); if (c) { var d = c.stream; if (d) if (b) { var e = d.trickModeVideo; e && !c.mb && (pj(a, e, !1, 0, !1), c.mb = d) } else if (d = c.mb) c.mb = null, pj(a, d, !0, 0, !1) } } function qj(a, b, c, d, e) { c = void 0 === c ? !1 : c; d = void 0 === d ? 0 : d; e = void 0 === e ? !1 : e; a.l = b; a.C && (b.video && pj(a, b.video, c, d, e), b.audio && pj(a, b.audio, c, d, e)) } function rj(a, b) { a.o = b; a.C && pj(a, b, !0, 0, !1) } function pj(a, b, c, d, e) { var f = a.h.get(b.type); f || b.type != lc ? f && (f.mb && (b.trickModeVideo ? (f.mb = b, b = b.trickModeVideo) : f.mb = null), f.stream != b || e) && (b.type == lc && Th(a.g.P, Kc(b.mimeType, b.codecs), a.m.sequenceMode), f.stream.closeSegmentIndex && f.stream.closeSegmentIndex(), f.stream = b, f.ba = null, c && (f.Zb ? f.cd = !0 : f.Ha ? (f.ob = !0, f.Ec = d, f.cd = !0) : (hj(f), sj(a, f, !0, d)["catch"](function(g) { if (a.g) a.g.onError(g) }))), tj(a, f)["catch"](function(g) { if (a.g) a.g.onError(g) })) : kj(a, b) } function tj(a, b) { var c, d; return L(function(e) { if (1 == e.g) { if (!b.sa) return e["return"](); c = b.stream; d = b.sa; return c.segmentIndex ? e.A(2) : u(e, c.createSegmentIndex(), 2) } if (b.sa != d || b.stream != c) return e["return"](); var f = a.g.Mc(); var g = Yh(a.g.P, b.type) , h = b.stream.segmentIndex.find(b.za ? b.za.endTime : f) , k = null == h ? null : b.stream.segmentIndex.get(h); h = k ? k.la ? k.la - k.Ba : null : null; k && !h && (h = (k.endTime - k.getStartTime()) * (b.stream.bandwidth || 0) / 8); h ? ((k = k.i) && (h += (k.la ? k.la - k.Ba : null) || 0), k = a.g.getBandwidthEstimate(), f = 8 * h / k < (g || 0) - f - Math.max(a.m.minBufferTime || 0, a.i.rebufferingGoal) || b.sa.h.g > h ? !0 : !1) : f = !1; f && b.sa.abort(); z(e) }) } fj.prototype.qc = function() { for (var a = this.g.Mc(), b = t(this.h.keys()), c = b.next(); !c.done; c = b.next()) { var d = c.value; c = this.h.get(d); c.ba = null; var e = this.g.P; d == lc ? (e = e.g, e = null == e.g || null == e.h ? !1 : a >= e.g && a < e.h) : (e = Xh(e, d), e = Lh(e, a)); if (!e) { (null != Yh(this.g.P, d) || c.Ha) && uj(this, c); c.sa && (c.sa.abort(), c.sa = null); if (d === lc) for (d = this.g.P.C.g, d.l = 0, d.h = [], d.g = [], e = d.i, e.i = [], e.h = [], e.g = 0, xh(d), d = t(d.j.values()), e = d.next(); !e.done; e = d.next()) sh(e.value); c.qc = !0 } } } ; function uj(a, b) { b.Zb || b.ob || (b.Ha ? (b.ob = !0, b.Ec = 0) : null == Wh(a.g.P, b.type) ? null == b.Ka && mj(a, b, 0) : (hj(b), sj(a, b, !1, 0)["catch"](function(c) { if (a.g) a.g.onError(c) }))) } function jj(a) { var b, c, d, e, f, g, h, k, l, m; return L(function(n) { if (1 == n.g) { b = mc; if (!a.l) throw new N(2,5,5006); c = new Map; d = new Set; a.l.audio && (c.set(b.cb, a.l.audio), d.add(a.l.audio)); a.l.video && (c.set(b.va, a.l.video), d.add(a.l.video)); a.o && (c.set(b.X, a.o), d.add(a.o)); e = a.g.P; f = a.i.forceTransmuxTS; return u(n, e.init(c, f, a.m.sequenceMode), 2) } ff(a.j); var p = a.m.presentationTimeline.getDuration(); Infinity > p ? a.g.P.Ia(p) : a.g.P.Ia(Math.pow(2, 32)); g = t(c.keys()); for (h = g.next(); !h.done; h = g.next()) k = h.value, l = c.get(k), a.h.has(k) || (m = lj(l), a.h.set(k, m), mj(a, m, 0)); z(n) }) } function lj(a) { return { stream: a, type: a.type, ba: null, za: null, Sc: null, Cd: null, Bd: null, zd: null, mb: null, endOfStream: !1, Ha: !1, Ka: null, ob: !1, Ec: 0, cd: !1, Zb: !1, qc: !0, Qd: !1, hc: !1, sa: null } } function vj(a, b) { var c, d, e, f, g; return L(function(h) { switch (h.g) { case 1: ff(a.j); if (b.Ha || null == b.Ka || b.Zb) return h["return"](); b.Ka = null; if (!b.ob) { h.A(2); break } return u(h, sj(a, b, b.cd, b.Ec), 3); case 3: return h["return"](); case 2: if (b.stream.segmentIndex) { h.A(4); break } c = b.stream; return u(h, b.stream.createSegmentIndex(), 5); case 5: if (c != b.stream) return c.closeSegmentIndex && c.closeSegmentIndex(), null == b.Ka && mj(a, b, 0), h["return"](); case 4: B(h, 6); d = wj(a, b); null != d && (mj(a, b, d), b.hc = !1); va(h, 7); break; case 6: return e = F(h), u(h, xj(a, e), 8); case 8: return h["return"](); case 7: f = Array.from(a.h.values()); if (!a.C || !f.every(function(k) { return k.endOfStream })) { h.A(0); break } return u(h, a.g.P.endOfStream(), 10); case 10: ff(a.j), g = a.g.P.getDuration(), 0 != g && g < a.m.presentationTimeline.getDuration() && a.m.presentationTimeline.Ia(g), z(h) } }) } function wj(a, b) { if (yj(b)) return ei(a.g.P, b.stream.originalId || ""), null; b.type == lc && fi(a.g.P); var c = a.g.Mc() , d = b.za ? b.za.endTime : c , e = Zh(a.g.P, b.type, c) , f = Math.max(a.m.minBufferTime || 0, a.i.rebufferingGoal, a.i.bufferingGoal) * a.u; if (1E-6 > a.m.presentationTimeline.getDuration() - d) return b.endOfStream = !0, "video" == b.type && (c = a.h.get(lc)) && yj(c) && (c.endOfStream = !0), null; b.endOfStream = !1; if (e >= f) return a.i.updateIntervalSeconds / 2; e = Yh(a.g.P, b.type); e = zj(a, b, c, e); if (!e) return a.i.updateIntervalSeconds; f = Infinity; var g = Array.from(a.h.values()); g = t(g); for (var h = g.next(); !h.done; h = g.next()) h = h.value, yj(h) || h.ba && !h.ba.current() || (f = Math.min(f, h.za ? h.za.endTime : c)); if (d >= f + a.m.presentationTimeline.g) return a.i.updateIntervalSeconds; Aj(a, b, c, e)["catch"](function() {}); return null } function zj(a, b, c, d) { if (b.ba) return b.ba.current(); if (b.za || d) return b.ba = b.stream.segmentIndex.zb(b.za ? b.za.endTime : d), b.ba && b.ba.next().value; a = a.i.inaccurateManifestTolerance; d = Math.max(c - a, 0); var e = null; a && (b.ba = b.stream.segmentIndex.zb(d), e = b.ba && b.ba.next().value); e || (b.ba = b.stream.segmentIndex.zb(c), e = b.ba && b.ba.next().value); return e } function Aj(a, b, c, d) { var e, f, g, h, k, l, m, n, p, q, x, y; return L(function(w) { switch (w.g) { case 1: e = mc; f = b.stream; g = b.ba; b.Ha = !0; B(w, 2); if (2 == d.Oc()) throw new N(1,1,1011); return u(w, Bj(a, b, d), 4); case 4: ff(a.j); if (a.s) return w["return"](); h = "video/mp4" == f.mimeType || "audio/mp4" == f.mimeType; k = window.ReadableStream; if (a.i.lowLatencyMode && k && h) return n = new Uint8Array(0), p = function(v) { var D, C, A; return L(function(G) { ff(a.j); if (a.s) return G["return"](); n = Cj(n, v); D = !1; C = 0; (new ng).box("mdat", function(E) { C = E.size + E.start; D = !0 }).parse(n, !1, !0); if (!D) return G.A(0); A = n.subarray(0, C); n = n.subarray(C); return u(G, Dj(a, b, c, f, d, A), 0) }) } , u(w, Ej(a, b, d, p), 6); l = Ej(a, b, d); return u(w, l, 7); case 7: return m = w.h, ff(a.j), a.s ? w["return"]() : b.ob ? (b.Ha = !1, mj(a, b, 0), w["return"]()) : u(w, Dj(a, b, c, f, d, m), 6); case 6: ff(a.j); if (a.s) return w["return"](); b.za = d; g.next(); b.Ha = !1; b.Qd = !1; q = a.g.P.Oa(); x = q[b.type]; $a(JSON.stringify(x)); b.ob || a.g.Md(); mj(a, b, 0); va(w, 0); break; case 2: y = F(w); ff(a.j, y); if (a.s) return w["return"](); b.Ha = !1; if (7001 == y.code) b.Ha = !1, b.Ka = null, mj(a, b, 0), w.A(0); else if (b.type == e.X && a.i.ignoreTextStreamFailures) a.h["delete"](e.X), w.A(0); else if (3017 == y.code) Fj(a, b, y), w.A(0); else if (1001 == y.code && y.data && 404 == y.data[1]) b.Ha = !1, b.Ka = null, mj(a, b, 1), w.A(0); else return b.hc = !0, y.severity = 2, u(w, xj(a, y), 0) } }) } function Cj(a, b) { var c = new Uint8Array(a.length + b.length); c.set(a); c.set(b, a.length); return c } function Fj(a, b, c) { if (!Array.from(a.h.values()).some(function(e) { return e != b && e.Qd })) { var d = Math.round(100 * a.u); if (20 < d) a.u -= .2; else if (4 < d) a.u -= .04; else { b.hc = !0; a.s = !0; a.g.onError(c); return } b.Qd = !0 } mj(a, b, 4) } function Bj(a, b, c) { var d, e, f, g, h, k, l; return L(function(m) { d = []; e = Math.max(0, c.appendWindowStart - .1); f = c.appendWindowEnd + .01; g = c.timestampOffset; if (g != b.Cd || e != b.Bd || f != b.zd) h = function() { var n; return L(function(p) { if (1 == p.g) return B(p, 2), b.Bd = e, b.zd = f, b.Cd = g, u(p, hi(a.g.P, b.type, g, e, f, a.m.sequenceMode), 4); if (2 != p.g) return va(p, 0); n = F(p); b.Bd = null; b.zd = null; b.Cd = null; throw n; }) } , d.push(h()); !ni(c.i, b.Sc) && (b.Sc = c.i) && (k = Ej(a, b, c.i), l = function() { var n, p, q; return L(function(x) { switch (x.g) { case 1: return B(x, 2), u(x, k, 4); case 4: return n = x.h, ff(a.j), p = b.stream.closedCaptions && 0 < b.stream.closedCaptions.size, u(x, $h(a.g.P, b.type, n, null, null, p), 5); case 5: va(x, 0); break; case 2: throw q = F(x), b.Sc = null, q; } }) } , a.g.Mf(c.startTime, c.i), d.push(l())); return u(m, Promise.all(d), 0) }) } function Dj(a, b, c, d, e, f) { var g, h; return L(function(k) { if (1 == k.g) return g = d.closedCaptions && 0 < d.closedCaptions.size, (null != d.emsgSchemeIdUris && 0 < d.emsgSchemeIdUris.length || a.i.dispatchAllEmsgBoxes) && (new ng).U("emsg", function(l) { var m = d.emsgSchemeIdUris; if (0 === l.version) { var n = l.reader.nc(); var p = l.reader.nc(); var q = l.reader.N(); var x = l.reader.N(); var y = l.reader.N(); var w = l.reader.N(); var v = e.startTime + x / q } else q = l.reader.N(), v = l.reader.Hb() / q + e.timestampOffset, x = v - e.startTime, y = l.reader.N(), w = l.reader.N(), n = l.reader.nc(), p = l.reader.nc(); l = l.reader.$a(l.reader.R.byteLength - l.reader.$()); if (m && m.includes(n) || a.i.dispatchAllEmsgBoxes) "urn:mpeg:dash:event:2012" == n ? a.g.Nf() : (m = (new Map).set("detail", { startTime: v, endTime: v + y / q, schemeIdUri: n, value: p, timescale: q, presentationTimeDelta: x, eventDuration: y, id: w, messageData: l }), m = new R("emsg",m), a.g.onEvent(m)) }).parse(f), u(k, Gj(a, b, c), 2); if (3 != k.g) return ff(a.j), h = b.qc, b.qc = !1, u(k, $h(a.g.P, b.type, f, e.startTime, e.endTime, g, h), 3); ff(a.j); z(k) }) } function Gj(a, b, c) { var d, e, f, g; return L(function(h) { if (1 == h.g) { d = Math.max(a.i.bufferBehind, a.m.presentationTimeline.g); e = Wh(a.g.P, b.type); if (null == e) return h["return"](); f = c - e; g = f - d; return .01 >= g ? h["return"]() : u(h, a.g.P.remove(b.type, e, e + g), 2) } ff(a.j); z(h) }) } function yj(a) { return a && a.type == lc && ("application/cea-608" == a.stream.mimeType || "application/cea-708" == a.stream.mimeType) } function Ej(a, b, c, d) { var e, f, g, h, k; return L(function(l) { if (1 == l.g) return e = df, f = ej(c.ya(), c.Ba, c.la, a.i.retryParameters, d), g = b.stream, a.g.modifySegmentRequest(f, { type: g.type, init: c instanceof mi, duration: c.endTime - c.startTime, mimeType: g.mimeType, codecs: g.codecs, bandwidth: g.bandwidth }), h = a.g.kb.request(e, f), b.sa = h, u(l, h.promise, 2); k = l.h; b.sa = null; return l["return"](k.data) }) } function sj(a, b, c, d) { var e, f; return L(function(g) { if (1 == g.g) return b.ob = !1, b.cd = !1, b.Ec = 0, b.Zb = !0, b.za = null, b.Sc = null, b.ba = null, d ? (e = a.g.Mc(), f = a.g.P.getDuration(), u(g, a.g.P.remove(b.type, e + d, f), 3)) : u(g, gi(a.g.P, b.type), 4); if (3 != g.g) return ff(a.j), c ? u(g, a.g.P.flush(b.type), 3) : g.A(3); ff(a.j); b.Zb = !1; b.endOfStream = !1; mj(a, b, 0); z(g) }) } function mj(a, b, c) { var d = b.type; if (d != lc || a.h.has(d)) b.Ka = (new id(function() { var e; return L(function(f) { if (1 == f.g) return B(f, 2), u(f, vj(a, b), 4); if (2 != f.g) return va(f, 0); e = F(f); if (a.g) a.g.onError(e); z(f) }) } )).S(c) } function hj(a) { null != a.Ka && (a.Ka.stop(), a.Ka = null) } function ij(a) { return L(function(b) { return a.sa ? u(b, a.sa.abort(), 0) : b.A(0) }) } function xj(a, b) { return L(function(c) { if (1 == c.g) return u(c, Fe(a.D), 2); ff(a.j); a.g.onError(b); b.handled || a.i.failureCallback(b); z(c) }) } ;function Hj(a, b) { var c = Ij() , d = this; this.j = b; this.i = a; this.l = c; this.o = null; this.m = []; this.h = this.g = null; this.u = Promise.resolve().then(function() { return Jj(d) }); this.s = new ef(function() { return Kj(d) } ) } Hj.prototype.destroy = function() { return this.s.destroy() } ; function Kj(a) { var b, c, d; return L(function(e) { if (1 == e.g) return a.h && a.h.abort(), Lj(a), u(e, a.u, 2); a.g && a.g.Ga.lb(); b = t(a.m); for (c = b.next(); !c.done; c = b.next()) d = c.value, d.Ga.lb(); a.g = null; a.m = []; a.j = null; z(e) }) } function Mj(a, b) { var c = { Fb: function() {}, Uc: function() {}, lb: function() {}, onError: function() {}, Wc: function() {}, Yg: function() {} }; a.m.push({ create: b, Ga: c }); a.h && a.h.abort(); Lj(a); return c } function Jj(a) { return L(function(b) { if (a.s.g) b = b.A(0); else { if (0 == a.m.length || a.g && !a.g.hb) var c = !1; else { a.g && (a.g.Ga.lb(), a.g = null); c = a.m.shift(); var d = c.create(a.l); d ? (c.Ga.Fb(), a.g = { node: d.node, payload: d.payload, hb: d.hb, Ga: c.Ga }) : c.Ga.Wc(); c = !0 } c ? c = Promise.resolve() : a.g ? c = Nj(a) : (a.j.Lf(a.i), a.o = new nc, c = a.o); b = u(b, c, 1) } return b }) } function Nj(a) { var b, c; return L(function(d) { switch (d.g) { case 1: return a.i = a.j.tf(a.i, a.l, a.g.node, a.g.payload), B(d, 2), a.h = a.j.cf(a.i, a.l, a.g.payload), u(d, a.h.promise, 4); case 4: a.h = null; a.i == a.g.node && (a.g.Ga.Uc(), a.g = null); va(d, 0); break; case 2: b = F(d); if (7001 == b.code) a.g.Ga.lb(); else a.g.Ga.onError(b); a.g = null; a.h = null; c = a; return u(d, a.j.handleError(a.l, b), 5); case 5: c.i = d.h, z(d) } }) } function Lj(a) { a.o && (a.o.resolve(), a.o = null) } ;function Oj(a) { this.g = null; for (var b = t(Array.from(a.textTracks)), c = b.next(); !c.done; c = b.next()) c = c.value, c.mode = "disabled", "Shaka Player TextTrack" == c.label && (this.g = c); this.g || (this.g = a.addTextTrack("subtitles", "Shaka Player TextTrack")); this.g.mode = "hidden" } r = Oj.prototype; r.remove = function(a, b) { if (!this.g) return !1; Pj(this.g, function(c) { return c.startTime < b && c.endTime > a }); return !0 } ; r.append = function(a) { function b(g) { var h = [] , k = 700 <= g.fontWeight , l = "italic" == g.fontStyle , m = g.textDecoration.includes("underline"); k && h.push("b"); l && h.push("i"); m && h.push("u"); k = h.reduce(function(n, p) { return n + "<" + p + ">" }, ""); h = h.reduceRight(function(n, p) { return n + "" }, ""); return g.lineBreak ? "\n" : g.nestedCues.length ? g.nestedCues.map(b).join("") : k + g.payload + h } var c = a.map(function(g) { if (g.nestedCues.length) { var h = g.clone(); h.nestedCues = []; h.payload = b(g); return h } return g }) , d = []; a = this.g.cues ? Array.from(this.g.cues) : []; var e = {}; c = t(c); for (var f = c.next(); !f.done; e = { rb: e.rb }, f = c.next()) e.rb = f.value, a.some(function(g) { return function(h) { return h.startTime == g.rb.startTime && h.endTime == g.rb.endTime && h.text == g.rb.payload ? !0 : !1 } }(e)) || (f = Qj(e.rb)) && d.push(f); a = d.slice().sort(function(g, h) { return g.startTime != h.startTime ? g.startTime - h.startTime : g.endTime != h.endTime ? g.endTime - h.startTime : "line"in VTTCue.prototype ? d.indexOf(h) - d.indexOf(g) : d.indexOf(g) - d.indexOf(h) }); a = t(a); for (e = a.next(); !e.done; e = a.next()) this.g.addCue(e.value) } ; r.destroy = function() { this.g && (Pj(this.g, function() { return !0 }), this.g.mode = "disabled"); this.g = null; return Promise.resolve() } ; r.isTextVisible = function() { return "showing" == this.g.mode } ; r.setTextVisibility = function(a) { this.g.mode = a ? "showing" : "hidden" } ; function Qj(a) { if (a.startTime >= a.endTime) return null; var b = new VTTCue(a.startTime,a.endTime,a.payload); b.lineAlign = a.lineAlign; b.positionAlign = a.positionAlign; a.size && (b.size = a.size); try { b.align = a.textAlign } catch (c) {} "center" == a.textAlign && "center" != b.align && (b.align = "middle"); "vertical-lr" == a.writingMode ? b.vertical = "lr" : "vertical-rl" == a.writingMode && (b.vertical = "rl"); 1 == a.lineInterpretation && (b.snapToLines = !1); null != a.line && (b.line = a.line); null != a.position && (b.position = a.position); return b } function Pj(a, b) { var c = a.mode; a.mode = "showing" == c ? "showing" : "hidden"; for (var d = t(Array.from(a.cues)), e = d.next(); !e.done; e = d.next()) (e = e.value) && b(e) && a.removeCue(e); a.mode = c } M("shaka.text.SimpleTextDisplayer", Oj); Oj.prototype.setTextVisibility = Oj.prototype.setTextVisibility; Oj.prototype.isTextVisible = Oj.prototype.isTextVisible; Oj.prototype.destroy = Oj.prototype.destroy; Oj.prototype.append = Oj.prototype.append; Oj.prototype.remove = Oj.prototype.remove; function Rj() {} function Sj(a) { for (; a.firstChild; ) a.removeChild(a.firstChild) } M("shaka.util.Dom", Rj); Rj.removeAllChildren = Sj; function Tj(a, b) { var c = this; this.j = !1; this.i = []; this.u = a; this.m = b; this.g = document.createElement("div"); this.g.classList.add("shaka-text-container"); this.g.style.textAlign = "center"; this.g.style.display = "flex"; this.g.style.flexDirection = "column"; this.g.style.alignItems = "center"; this.g.style.justifyContent = "flex-end"; this.m.appendChild(this.g); this.s = (new Q(function() { Uj(c) } )).Ca(.25); this.h = new Map; this.o = new gf; this.o.B(document, "fullscreenchange", function() { Uj(c, !0) }); this.l = null; "ResizeObserver"in window && (this.l = new ResizeObserver(function() { Uj(c, !0) } ), this.l.observe(this.g)) } r = Tj.prototype; r.append = function(a) { var b = [].concat(ia(this.i)) , c = {}; a = t(a); for (var d = a.next(); !d.done; c = { wc: c.wc }, d = a.next()) c.wc = d.value, b.some(function(e) { return function(f) { return tb(f, e.wc) } }(c)) || this.i.push(c.wc); Uj(this) } ; r.destroy = function() { this.m.removeChild(this.g); this.g = null; this.j = !1; this.i = []; this.s && this.s.stop(); this.h.clear(); this.o && (this.o.release(), this.o = null); this.l && (this.l.disconnect(), this.l = null) } ; r.remove = function(a, b) { if (!this.g) return !1; var c = this.i.length; this.i = this.i.filter(function(d) { return d.startTime < a || d.endTime >= b }); Uj(this, c > this.i.length); return !0 } ; r.isTextVisible = function() { return this.j } ; r.setTextVisibility = function(a) { this.j = a } ; function Vj(a, b, c, d, e) { var f = !1 , g = [] , h = []; b = t(b); for (var k = b.next(); !k.done; k = b.next()) { k = k.value; e.push(k); var l = a.h.get(k) , m = k.startTime <= d && k.endTime > d , n = l ? l.Oe : null; l && (g.push(l.ke), m || (f = !0, a.h["delete"](k), l = null)); m && (h.push(k), l || (Wj(a, k, e), l = a.h.get(k), n = l.Oe, f = !0)); 0 < k.nestedCues.length && n && Vj(a, k.nestedCues, n, d, e); e.pop() } if (f) { d = t(g); for (e = d.next(); !e.done; e = d.next()) c.removeChild(e.value); h.sort(function(p, q) { return p.startTime != q.startTime ? p.startTime - q.startTime : p.endTime - q.endTime }); h = t(h); for (k = h.next(); !k.done; k = h.next()) d = a.h.get(k.value), c.appendChild(d.ke) } } function Uj(a, b) { if (a.g) { var c = a.u.currentTime; (!a.j || (void 0 === b ? 0 : b)) && 0 < a.h.size && (Sj(a.g), a.h.clear()); if (a.j) { for (var d = new Map, e = t(a.h.keys()), f = e.next(); !f.done; f = e.next()) f = f.value, d.set(f, a.h.get(f)); Vj(a, a.i, a.g, c, []) } } } function Wj(a, b, c) { var d = 1 < c.length , e = d ? "span" : "div"; b.lineBreak && (e = "br"); d = !d && 0 < b.nestedCues.length; var f = document.createElement(e); "br" != e && Xj(a, f, b, c, d); c = f; d && (c = document.createElement("span"), c.classList.add("shaka-text-wrapper"), c.style.backgroundColor = b.backgroundColor, f.appendChild(c)); a.h.set(b, { ke: f, Oe: c }) } function Xj(a, b, c, d, e) { var f = b.style , g = 0 == c.nestedCues.length , h = 1 < d.length; f.whiteSpace = "pre-wrap"; var k = c.payload.replace(/\s+$/g, function(m) { return "\u00a0".repeat(m.length) }); f.webkitTextStrokeColor = c.textStrokeColor; f.webkitTextStrokeWidth = c.textStrokeWidth; f.color = c.color; f.direction = c.direction; f.opacity = c.opacity; f.paddingLeft = Yj(c.linePadding, c, a.m); f.paddingRight = Yj(c.linePadding, c, a.m); f.textShadow = c.textShadow; if (c.backgroundImage) f.backgroundImage = "url('" + c.backgroundImage + "')", f.backgroundRepeat = "no-repeat", f.backgroundSize = "contain", f.backgroundPosition = "center"; else { if (c.nestedCues.length) var l = b; else l = document.createElement("span"), b.appendChild(l); c.border && (l.style.border = c.border); e || ((b = Zj(d, function(m) { return m.backgroundColor })) ? l.style.backgroundColor = b : k && (l.style.backgroundColor = "rgba(0, 0, 0, 0.8)")); k && (l.textContent = k) } h && !d[d.length - 1].isContainer ? f.display = "inline" : (f.display = "flex", f.flexDirection = "column", f.alignItems = "center", f.justifyContent = "before" == c.displayAlign ? "flex-start" : "center" == c.displayAlign ? "center" : "flex-end"); g || (f.margin = "0"); f.fontFamily = c.fontFamily; f.fontWeight = c.fontWeight.toString(); f.fontStyle = c.fontStyle; f.letterSpacing = c.letterSpacing; f.fontSize = Yj(c.fontSize, c, a.m); c.line ? 1 == c.lineInterpretation && (f.position = "absolute", f.left = "0", f.top = "0", c.writingMode == nb ? (f.width = "100%", c.lineAlign == pb ? f.top = c.line + "%" : "end" == c.lineAlign && (f.bottom = c.line + "%")) : "vertical-lr" == c.writingMode ? (f.height = "100%", c.lineAlign == pb ? f.left = c.line + "%" : "end" == c.lineAlign && (f.right = c.line + "%")) : (f.height = "100%", c.lineAlign == pb ? f.right = c.line + "%" : "end" == c.lineAlign && (f.left = c.line + "%"))) : c.region && c.region.id && (a = c.region.widthUnits == Ab ? "%" : "px", d = c.region.viewportAnchorUnits == Ab ? "%" : "px", f.height = c.region.height + (c.region.heightUnits == Ab ? "%" : "px"), f.width = c.region.width + a, f.position = "absolute", f.top = c.region.viewportAnchorY + d, f.left = c.region.viewportAnchorX + d); f.lineHeight = c.lineHeight; c.position && (c.writingMode == nb ? f.paddingLeft = c.position : f.paddingTop = c.position); "line-left" == c.positionAlign ? f.cssFloat = "left" : "line-right" == c.positionAlign && (f.cssFloat = "right"); f.textAlign = c.textAlign; f.textDecoration = c.textDecoration.join(" "); f.writingMode = c.writingMode; "writingMode"in document.documentElement.style && f.writingMode == c.writingMode || (f.webkitWritingMode = c.writingMode); c.size && (c.writingMode == nb ? f.width = c.size + "%" : f.height = c.size + "%") } function Yj(a, b, c) { var d = (d = (new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a)) ? { value: Number(d[1]), unit: d[2] } : null; if (!d) return a; var e = d.value; switch (d.unit) { case "%": return e / 100 * c.clientHeight / b.cellResolution.rows + "px"; case "c": return c.clientHeight * e / b.cellResolution.rows + "px"; default: return a } } function Zj(a, b) { for (var c = a.length - 1; 0 <= c; c--) { var d = b(a[c]); if (d || 0 === d) return d } return null } M("shaka.text.UITextDisplayer", Tj); Tj.prototype.setTextVisibility = Tj.prototype.setTextVisibility; Tj.prototype.isTextVisible = Tj.prototype.isTextVisible; Tj.prototype.remove = Tj.prototype.remove; Tj.prototype.destroy = Tj.prototype.destroy; Tj.prototype.append = Tj.prototype.append; function ak(a, b) { function c(h) { for (var k = h, l = t(b), m = l.next(); !m.done; m = l.next()) m = m.value, m.end && m.start < h && (k += m.end - m.start); h = Math.floor(k / 3600); l = Math.floor(k / 60 % 60); m = Math.floor(k % 60); k = Math.floor(1E3 * k % 1E3); return (10 > h ? "0" : "") + h + ":" + (10 > l ? "0" : "") + l + ":" + (10 > m ? "0" : "") + m + "." + (100 > k ? 10 > k ? "00" : "0" : "") + k } function d(h) { var k = [] , l = 700 <= h.fontWeight , m = "italic" == h.fontStyle , n = h.textDecoration.includes("underline"); l && k.push("b"); m && k.push("i"); n && k.push("u"); l = k.reduce(function(p, q) { return p + "<" + q + ">" }, ""); k = k.reduceRight(function(p, q) { return p + "" }, ""); return h.lineBreak ? "\n" : h.nestedCues.length ? h.nestedCues.map(d).join("") : l + h.payload + k } var e = a.map(function(h) { if (h.nestedCues.length) { var k = h.clone(); k.nestedCues = []; k.payload = d(h); return k } return h }) , f = "WEBVTT\n\n"; e = t(e); for (var g = e.next(); !g.done; g = e.next()) g = g.value, f += c(g.startTime) + " --\x3e " + c(g.endTime) + function(h) { var k = []; switch (h.textAlign) { case "left": k.push("align:left"); break; case "right": k.push("align:right"); break; case mb: k.push("align:middle"); break; case "start": k.push("align:start"); break; case "end": k.push("align:end") } switch (h.writingMode) { case "vertical-lr": k.push("vertical:lr"); break; case "vertical-rl": k.push("vertical:rl") } return k.length ? " " + k.join(" ") : "" }(g) + "\n", f += g.payload + "\n\n"; return f } M("shaka.text.WebVttGenerator", function() {}); function bk(a, b) { this.h = a; this.g = b; this.j = ""; this.o = void 0; this.i = !1; this.m = !0; this.l = !1 } function ck(a, b, c) { try { if (a.g.enabled) { var d = { d: 1E3 * c.duration, st: a.h.V() ? dk : ek }; d.ot = fk(c); var e = d.ot === gk || d.ot === hk || d.ot === ik || d.ot === jk; e && (d.bl = kk(a, c.type)); c.bandwidth && (d.br = c.bandwidth / 1E3); e && d.ot !== jk && (d.tb = lk(a, d.ot) / 1E3); mk(a, b, d) } } catch (f) { Wa("CMCD_SEGMENT_ERROR", "Could not generate segment CMCD data.", f) } } function nk(a, b, c) { try { if (!a.g.enabled) return b; var d = ok(a); a: { switch (c) { case "video/webm": case "video/mp4": var e = ik; break a; case "application/x-mpegurl": e = pk; break a } e = void 0 } d.ot = e; d.su = !0; var f = qk(d); return rk(b, f) } catch (g) { return Wa("CMCD_SRC_ERROR", "Could not generate src CMCD data.", g), b } } function ok(a) { a.j || (a.j = a.g.sessionId || window.crypto.randomUUID()); return { v: 1, sf: a.o, sid: a.j, cid: a.g.contentId, mtp: a.h.getBandwidthEstimate() / 1E3 } } function mk(a, b, c) { c = void 0 === c ? {} : c; var d = void 0 === d ? a.g.useHeaders : d; if (a.g.enabled) { Object.assign(c, ok(a)); c.pr = a.h.Lc(); var e = c.ot === gk || c.ot === ik; a.l && e && (c.bs = !0, c.su = !0, a.l = !1); null == c.su && (c.su = a.m); if (d) a = sk(c), Object.keys(a).length && Object.assign(b.headers, a); else { var f = qk(c); f && (b.uris = b.uris.map(function(g) { return rk(g, f) })) } } } function fk(a) { var b = a.type; if (a.init) return tk; if ("video" == b) return a.codecs.includes(",") ? ik : gk; if ("audio" == b) return hk; if ("text" == b) return "application/mp4" === a.mimeType ? jk : uk } function kk(a, b) { var c = a.h.Oa()[b]; if (!c.length) return NaN; var d = a.h.getCurrentTime(); return (c = c.find(function(e) { return e.start <= d && e.end >= d })) ? 1E3 * (c.end - d) : NaN } function lk(a, b) { var c = a.h.Za(); if (!c.length) return NaN; var d = c[0]; c = t(c); for (var e = c.next(); !e.done; e = c.next()) e = e.value, "variant" === e.type && e.bandwidth > d.bandwidth && (d = e); switch (b) { case gk: return d.videoBandwidth || NaN; case hk: return d.audioBandwidth || NaN; default: return d.bandwidth } } function qk(a) { function b(n) { return 100 * c(n / 100) } function c(n) { return Math.round(n) } function d(n) { return !Number.isNaN(n) && null != n && "" !== n && !1 !== n } var e = [] , f = { br: c, d: c, bl: b, dl: b, mtp: b, nor: function(n) { return encodeURIComponent(n) }, rtp: b, tb: c } , g = Object.keys(a || {}).sort(); g = t(g); for (var h = g.next(); !h.done; h = g.next()) { h = h.value; var k = a[h]; if (d(k) && ("v" !== h || 1 !== k) && ("pr" != h || 1 !== k)) { var l = f[h]; l && (k = l(k)); l = typeof k; var m = void 0; m = "string" === l && "ot" !== h && "sf" !== h && "st" !== h ? h + "=" + JSON.stringify(k) : "boolean" === l ? h : "symbol" === l ? h + "=" + k.description : h + "=" + k; e.push(m) } } return e.join(",") } function sk(a) { var b = Object.keys(a) , c = {} , d = ["Object", "Request", "Session", "Status"] , e = [{}, {}, {}, {}] , f = { br: 0, d: 0, ot: 0, tb: 0, bl: 1, dl: 1, mtp: 1, nor: 1, nrr: 1, su: 1, cid: 2, pr: 2, sf: 2, sid: 2, st: 2, v: 2, bs: 3, rtp: 3 }; b = t(b); for (var g = b.next(); !g.done; g = b.next()) g = g.value, e[null != f[g] ? f[g] : 1][g] = a[g]; for (a = 0; a < e.length; a++) (f = qk(e[a])) && (c["CMCD-" + d[a]] = f); return c } function rk(a, b) { if (!b || a.includes("offline:")) return a; var c = new Nb(a); c.g.set("CMCD", b); return c.toString() } var pk = "m" , hk = "a" , gk = "v" , ik = "av" , tk = "i" , uk = "c" , jk = "tt" , ek = "v" , dk = "l"; M("shaka.util.CmcdManager.StreamingFormat", { rg: "d", zg: "h", Jg: "s", Fg: "o" }); function vk() {} function wk(a, b, c, d, e) { var f = e in d, g = !0, h; for (h in b) { var k = e + "." + h , l = f ? d[e] : c[h]; f || h in c ? void 0 === b[h] ? void 0 === l || f ? delete a[h] : a[h] = Qe(l) : l.constructor == Object && b[h] && b[h].constructor == Object ? (a[h] || (a[h] = Qe(l)), k = wk(a[h], b[h], l, d, k), g = g && k) : typeof b[h] != typeof l || null == b[h] || "function" != typeof b[h] && b[h].constructor != l.constructor ? (Ua("Invalid config, wrong type for " + k), g = !1) : ("function" == typeof c[h] && c[h].length != b[h].length && Va("Unexpected number of arguments for " + k), a[h] = b[h]) : (Ua("Invalid config, unrecognized key " + k), g = !1) } return g } function xk(a, b) { for (var c = {}, d = c, e = 0, f = 0; ; ) { e = a.indexOf(".", e); if (0 > e) break; if (0 == e || "\\" != a[e - 1]) f = a.substring(f, e).replace(/\\\./g, "."), d[f] = {}, d = d[f], f = e + 1; e += 1 } d[a.substring(f).replace(/\\\./g, ".")] = b; return c } function yk(a, b) { return a && b } M("shaka.util.ConfigUtils", vk); vk.convertToConfigObject = xk; vk.mergeConfigObjects = wk; function zk() {} function Ak() { var a = Infinity; navigator.connection && navigator.connection.saveData && (a = 360); var b = { retryParameters: Ee(), servers: {}, clearKeys: {}, advanced: {}, delayLicenseRequestUntilPlayed: !1, initDataTransform: function(g, h, k) { return yk([g, h, k], g) }, logLicenseExchange: !1, updateExpirationTime: 1, preferredKeySystems: [], keySystemsMapping: {} } , c = { retryParameters: Ee(), availabilityWindowOverride: NaN, disableAudio: !1, disableVideo: !1, disableText: !1, disableThumbnails: !1, defaultPresentationDelay: 0, segmentRelativeVttTiming: !1, dash: { clockSyncUri: "", ignoreDrmInfo: !1, disableXlinkProcessing: !1, xlinkFailGracefully: !1, ignoreMinBufferTime: !1, autoCorrectDrift: !0, initialSegmentLimit: 1E3, ignoreSuggestedPresentationDelay: !1, ignoreEmptyAdaptationSet: !1, ignoreMaxSegmentDuration: !1, keySystemsByURI: { "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey", "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e": "org.w3.clearkey", "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha", "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready", "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready", "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb": "com.adobe.primetime" }, manifestPreprocessor: function(g) { return yk([g], g) } }, hls: { ignoreTextStreamFailures: !1, ignoreImageStreamFailures: !1, defaultAudioCodec: "mp4a.40.2", defaultVideoCodec: "avc1.42E01E", ignoreManifestProgramDateTime: !1, mediaPlaylistFullMimeType: 'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"' } } , d = { retryParameters: Ee(), failureCallback: function(g) { return yk([g], void 0) }, rebufferingGoal: 2, bufferingGoal: 10, bufferBehind: 30, ignoreTextStreamFailures: !1, alwaysStreamText: !1, startAtSegmentBoundary: !1, gapDetectionThreshold: .1, durationBackoff: 1, forceTransmuxTS: !1, safeSeekOffset: 5, stallEnabled: !0, stallThreshold: 1, stallSkip: .1, useNativeHlsOnSafari: !0, inaccurateManifestTolerance: 2, lowLatencyMode: !1, autoLowLatencyMode: !1, forceHTTPS: !1, preferNativeHls: !1, updateIntervalSeconds: 1, dispatchAllEmsgBoxes: !1, observeQualityChanges: !1, maxDisabledTime: 30 }; if (navigator.userAgent.match(/Edge\//) || rd() || sd()) d.gapDetectionThreshold = .5; if (qd("Web0S") || rd() || sd()) d.stallSkip = 0; var e = { trackSelectionCallback: function(g) { return L(function(h) { return h["return"](g) }) }, downloadSizeCallback: function(g) { var h; return L(function(k) { if (1 == k.g) return navigator.storage && navigator.storage.estimate ? u(k, navigator.storage.estimate(), 3) : k["return"](!0); h = k.h; return k["return"](h.usage + g < .95 * h.quota) }) }, progressCallback: function(g, h) { return yk([g, h], void 0) }, usePersistentLicense: !0, numberOfParallelDownloads: 5 } , f = { drm: b, manifest: c, streaming: d, offline: e, abrFactory: function() { return new ne }, abr: { enabled: !0, useNetworkInformation: !0, defaultBandwidthEstimate: 1E6, switchInterval: 8, bandwidthUpgradeTarget: .85, bandwidthDowngradeTarget: .95, restrictions: { minWidth: 0, maxWidth: Infinity, minHeight: 0, maxHeight: a, minPixels: 0, maxPixels: Infinity, minFrameRate: 0, maxFrameRate: Infinity, minBandwidth: 0, maxBandwidth: Infinity }, advanced: { minTotalBytes: 128E3, minBytes: 16E3, fastHalfLife: 2, slowHalfLife: 5 } }, preferredAudioLanguage: "", preferredTextLanguage: "", preferredVariantRole: "", preferredTextRole: "", preferredAudioChannelCount: 2, preferredVideoCodecs: [], preferredAudioCodecs: [], preferForcedSubs: !1, preferredDecodingAttributes: [], restrictions: { minWidth: 0, maxWidth: Infinity, minHeight: 0, maxHeight: Infinity, minPixels: 0, maxPixels: Infinity, minFrameRate: 0, maxFrameRate: Infinity, minBandwidth: 0, maxBandwidth: Infinity }, playRangeStart: 0, playRangeEnd: Infinity, textDisplayFactory: function() { return null }, cmcd: { enabled: !1, sessionId: "", contentId: "", useHeaders: !1 } }; e.trackSelectionCallback = function(g) { return L(function(h) { return h["return"](Bk(g, f.preferredAudioLanguage)) }) } ; return f } function Ck(a, b, c) { var d = { ".drm.servers": "", ".drm.clearKeys": "", ".drm.advanced": { distinctiveIdentifierRequired: !1, persistentStateRequired: !1, videoRobustness: "", audioRobustness: "", sessionType: "", serverCertificate: new Uint8Array(0), serverCertificateUri: "", individualizationServer: "" } }; return wk(a, b, c || Ak(), d, "") } function Bk(a, b) { var c = a.filter(function(h) { return "variant" == h.type }) , d = [] , e = fd(b, c.map(function(h) { return h.language })); e && (d = c.filter(function(h) { return O(h.language) == e })); 0 == d.length && (d = c.filter(function(h) { return h.primary })); 0 == d.length && (c.map(function(h) { return h.language }), d = c); var f = d.filter(function(h) { return h.height && 480 >= h.height }); f.length && (f.sort(function(h, k) { return k.height - h.height }), d = f.filter(function(h) { return h.height == f[0].height })); c = []; if (d.length) { var g = Math.floor(d.length / 2); d.sort(function(h, k) { return h.bandwidth - k.bandwidth }); c.push(d[g]) } d = t(a); for (g = d.next(); !g.done; g = d.next()) g = g.value, g.type != lc && "image" != g.type || c.push(g); return c } M("shaka.util.PlayerConfiguration", zk); zk.mergeConfigObjects = Ck; zk.createDefault = Ak; function Dk() { this.g = null; this.h = [] } function Ek(a, b) { if (null == a.g) a.g = { timestamp: Date.now() / 1E3, state: b, duration: 0 }; else { var c = Date.now() / 1E3; a.g.duration = c - a.g.timestamp; a.g.state != b && (a.h.push(a.g), a.g = { timestamp: c, state: b, duration: 0 }) } } function Fk(a, b) { var c = 0; a.g && a.g.state == b && (c += a.g.duration); for (var d = t(a.h), e = d.next(); !e.done; e = d.next()) e = e.value, c += e.state == b ? e.duration : 0; return c } function Gk(a) { function b(f) { return { timestamp: f.timestamp, state: f.state, duration: f.duration } } for (var c = [], d = t(a.h), e = d.next(); !e.done; e = d.next()) c.push(b(e.value)); a.g && c.push(b(a.g)); return c } ;function Hk() { this.i = this.h = null; this.g = [] } function Ik(a, b, c) { a.i != b && (a.i = b, a.g.push({ timestamp: Date.now() / 1E3, id: b.id, type: "text", fromAdaptation: c, bandwidth: null })) } ;function Jk() { this.o = this.s = this.F = this.C = this.m = this.j = this.D = this.l = this.i = this.M = this.O = this.G = this.I = this.L = this.u = this.T = NaN; this.g = new Dk; this.h = new Hk } ;function U(a, b) { Pe.call(this); var c = this; this.l = Kk; this.Gc = this.g = null; this.ha = !1; this.Pc = new gf; this.Ub = new gf; this.o = new gf; this.xd = this.u = this.Tb = this.i = this.Qc = this.I = this.j = this.ia = this.T = this.Rc = this.M = this.Hc = this.G = this.ub = this.C = this.L = this.m = this.F = null; this.Ce = 1E9; this.h = Lk(this); this.Yb = { width: Infinity, height: Infinity }; this.s = null; this.La = new ve(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount); this.Ma = this.h.preferredTextLanguage; this.Xb = this.h.preferredTextRole; this.Vb = this.h.preferForcedSubs; this.Kb = []; this.ac = null; b && b(this); this.F = Mk(this); this.F.Xd(this.h.streaming.forceHTTPS); this.D = null; Nk && (this.D = Nk()); this.Pc.B(window, "online", function() { c.Rd() }); this.O = { name: "detach" }; this.Y = { name: "attach" }; this.ea = { name: "unload" }; this.Kd = { name: "manifest-parser" }; this.Hd = { name: "manifest" }; this.sb = { name: "media-source" }; this.yd = { name: "drm-engine" }; this.ca = { name: "load" }; this.Nd = { name: "src-equals-drm-engine" }; this.vb = { name: "src-equals" }; var d = new Map; d.set(this.Y, function(e, f) { return Ke(Ok(c, e, f)) }); d.set(this.O, function(e) { e.K && (c.Ub.oc(), e.K = null); c.D && c.D.release(); c.g = null; e = Promise.resolve(); return Ke(e) }); d.set(this.ea, function(e) { return Ke(Pk(c, e)) }); d.set(this.sb, function(e) { e = Qk(c, e); return Ke(e) }); d.set(this.Kd, function(e, f) { var g = Rk(c, e, f); return Ke(g) }); d.set(this.Hd, function(e) { return Sk(c, e) }); d.set(this.yd, function(e) { e = Tk(c, e); return Ke(e) }); d.set(this.ca, function(e, f) { return Ke(Uk(c, e, f)) }); d.set(this.Nd, function(e, f) { var g = Vk(c, e, f); return Ke(g) }); d.set(this.vb, function(e, f) { return Wk(c, e, f) }); this.ua = new Hj(this.O,{ tf: function(e, f, g, h) { var k = null; e == c.O && (k = g == c.O ? c.O : c.Y); e == c.Y && (k = g == c.O || f.K != h.K ? c.O : g == c.Y ? c.Y : g == c.sb || g == c.ca ? c.sb : g == c.vb ? c.Nd : null); e == c.sb && (k = g == c.ca && f.K == h.K ? c.Kd : c.ea); e == c.Kd && (k = Xk(c.ca, c.Hd, c.ea, g, f, h)); e == c.Hd && (k = Xk(c.ca, c.yd, c.ea, g, f, h)); e == c.yd && (k = Xk(c.ca, c.ca, c.ea, g, f, h)); e == c.Nd && (k = g == c.vb && f.K == h.K ? c.vb : c.ea); if (e == c.ca || e == c.vb) k = c.ea; e == c.ea && (k = h.K && f.K == h.K ? c.Y : c.O); return k }, cf: function(e, f, g) { c.dispatchEvent(Yk("onstatechange", (new Map).set("state", e.name))); return d.get(e)(f, g) }, handleError: function(e) { return L(function(f) { return 1 == f.g ? u(f, Pk(c, e), 2) : f["return"](e.K ? c.Y : c.O) }) }, Lf: function(e) { c.dispatchEvent(Yk("onstateidle", (new Map).set("state", e.name))) } }); this.Be = new Q(function() { Ld(c.i.variants, c.h.restrictions, c.Yb) && Zk(c) } ); a && this.Wb(a, !0) } pa(U, Pe); function Yk(a, b) { return new R(a,b) } r = U.prototype; r.destroy = function() { var a = this, b; return L(function(c) { switch (c.g) { case 1: if (a.l == $k) return c["return"](); a.l = $k; b = Mj(a.ua, function() { return { node: a.O, payload: Ij(), hb: !1 } }); return u(c, new Promise(function(d) { b.Fb = function() {} ; b.Uc = function() { d() } ; b.lb = function() { d() } ; b.onError = function() { d() } ; b.Wc = function() { d() } } ), 2); case 2: return u(c, a.ua.destroy(), 3); case 3: a.Pc && (a.Pc.release(), a.Pc = null); a.Ub && (a.Ub.release(), a.Ub = null); a.o && (a.o.release(), a.o = null); a.xd = null; a.u = null; a.h = null; a.s = null; a.Gc = null; a.T = null; if (!a.F) { c.A(4); break } return u(c, a.F.destroy(), 5); case 5: a.F = null; case 4: Pe.prototype.release.call(a), z(c) } }) } ; r.Wb = function(a, b) { b = void 0 === b ? !0 : b; if (this.l == $k) return Promise.reject(al()); var c = Ij(); c.K = a; jd() || (b = !1); var d = b ? this.sb : this.Y , e = Mj(this.ua, function() { return { node: d, payload: c, hb: !1 } }); e.Fb = function() {} ; return bl(e) } ; r.detach = function() { var a = this; if (this.l == $k) return Promise.reject(al()); var b = Mj(this.ua, function() { return { node: a.O, payload: Ij(), hb: !1 } }); b.Fb = function() {} ; return bl(b) } ; r.de = function(a) { var b = this; a = void 0 === a ? !0 : a; if (this.l == $k) return Promise.reject(al()); jd() || (a = !1); var c = Ij() , d = Mj(this.ua, function(e) { var f = e.K && a ? b.sb : e.K ? b.Y : b.O; c.K = e.K; return { node: f, payload: c, hb: !1 } }); d.Fb = function() {} ; return bl(d) } ; r.lg = function(a) { this.ac = a } ; r.load = function(a, b, c) { var d = this; this.ac = null; if (this.l == $k) return Promise.reject(al()); this.dispatchEvent(Yk("loading")); var e = Ij(); e.uri = a; e.ae = Date.now() / 1E3; c && (e.mimeType = c); void 0 !== b && (e.startTime = b); var f = cl(this, e) ? this.vb : this.ca , g = Mj(this.ua, function(h) { if (null == h.K) return null; e.K = h.K; return { node: f, payload: e, hb: !0 } }); this.s = new Jk; this.T = dl(this); g.Fb = function() {} ; return new Promise(function(h, k) { g.Wc = function() { return k(new N(2,7,7002)) } ; g.Uc = function() { h(); d.dispatchEvent(Yk("loaded")) } ; g.lb = function() { return k(al()) } ; g.onError = function(l) { return k(l) } } ) } ; function cl(a, b) { if (!jd()) return !0; var c = b.mimeType , d = b.uri || ""; c || (c = hg(d), c = el[c]); if (c) { if ("" == (b.K || od()).canPlayType(c)) return !1; if (!jd() || !(c in gg || hg(d)in ig) || a.h.streaming.preferNativeHls) return !0; if (td()) return a.h.streaming.useNativeHlsOnSafari } return !1 } function Ok(a, b, c) { null == b.K && (b.K = c.K, a.Ub.B(b.K, "error", function() { var d = fl(a); d && gl(a, d) })); a.g = b.K; return Promise.resolve() } function Pk(a, b) { var c, d, e, f, g, h, k, l, m; return L(function(n) { switch (n.g) { case 1: return a.l != $k && (a.l = Kk), c = a.Kb.map(function(p) { return p() }), a.Kb = [], u(n, Promise.all(c), 2); case 2: a.dispatchEvent(Yk("unloading")); b.mimeType = null; b.startTime = null; b.uri = null; b.K && a.o.oc(); a.Be.stop(); a.ub && (a.ub.release(), a.ub = null); a.Hc && (a.Hc.stop(), a.Hc = null); if (!a.I) { n.A(3); break } return u(n, a.I.stop(), 4); case 4: a.I = null, a.Qc = null; case 3: if (!a.u) { n.A(5); break } return u(n, a.u.stop(), 5); case 5: if (!a.j) { n.A(7); break } return u(n, a.j.destroy(), 8); case 8: a.j = null; case 7: a.G && (a.G.release(), a.G = null); a.C && (a.C.release(), a.C = null); if (!a.L) { n.A(9); break } return u(n, a.L.destroy(), 10); case 10: a.L = null; case 9: if (a.D) a.D.onAssetUnload(); if (!b.K || !b.K.src) { n.A(11); break } return u(n, new Promise(function(p) { return (new Q(p)).S(.1) } ), 12); case 12: for (b.K.removeAttribute("src"), b.K.load(); b.K.lastChild; ) b.K.removeChild(b.K.firstChild); case 11: if (!a.m) { n.A(13); break } return u(n, a.m.destroy(), 14); case 14: a.m = null; case 13: a.Tb = null; a.M = null; if (a.i) { d = t(a.i.variants); for (e = d.next(); !e.done; e = d.next()) for (f = e.value, g = t([f.audio, f.video]), h = g.next(); !h.done; h = g.next()) (k = h.value) && k.segmentIndex && k.segmentIndex.release(); l = t(a.i.textStreams); for (h = l.next(); !h.done; h = l.next()) m = h.value, m.segmentIndex && m.segmentIndex.release() } a.i = null; a.s = new Jk; a.Dd = null; hl(a); z(n) } }) } function Qk(a, b) { var c, d, e, f, g, h; return L(function(k) { if (1 == k.g) return c = new Hh, d = a.h.textDisplayFactory, e = d(), a.Dd = d, f = il(b.K, c, e, function(l, m, n) { l = t(l); for (var p = l.next(); !p.done; p = l.next()) if (p = p.value, p.data && p.cueTime && p.frames) { for (var q = p.cueTime + m, x = n, y = t(p.frames), w = y.next(); !w.done; w = y.next()) jl(a, q, x, "ID3", w.value); if (a.D) a.D.onHlsTimedMetadata(p, q) } }), g = a.h.manifest, h = g.segmentRelativeVttTiming, f.F = h, u(k, f.G, 2); a.L = f; z(k) }) } function Rk(a, b, c) { var d, e, f, g; return L(function(h) { if (1 == h.g) return b.mimeType = c.mimeType, b.uri = c.uri, d = b.uri, e = a.F, a.Tb = d, f = a, u(h, fg(d, e, a.h.manifest.retryParameters, b.mimeType), 2); f.Qc = h.h; a.I = a.Qc(); g = Qe(a.h.manifest); c.K && "AUDIO" === c.K.nodeName && (g.disableVideo = !0); a.I.configure(g); z(h) }) } function Sk(a, b) { var c = b.uri , d = a.F; a.Rc = new Zi(function() { return a.pc() } ); a.Rc.addEventListener("regionadd", function(g) { g = g.region; kl(a, "timelineregionadded", g); if (a.D) a.D.onDashTimedMetadata(g) }); a.ia = null; a.h.streaming.observeQualityChanges && (a.ia = new Vi(function() { return a.Oa() } ), a.ia.addEventListener("qualitychange", function(g) { var h = g.quality; g = g.position; h = (new Map).set("mediaQuality", { bandwidth: h.bandwidth, audioSamplingRate: h.audioSamplingRate, codecs: h.codecs, contentType: h.contentType, frameRate: h.frameRate, height: h.height, mimeType: h.mimeType, channelsCount: h.channelsCount, pixelAspectRatio: h.pixelAspectRatio, width: h.width }).set("position", g); a.dispatchEvent(Yk("mediaqualitychanged", h)) })); var e = { networkingEngine: d, modifyManifestRequest: function(g, h) { var k = a.T; try { k.g.enabled && (k.o = h.format, mk(k, g, { ot: pk, su: !k.i })) } catch (l) { Wa("CMCD_MANIFEST_ERROR", "Could not generate manifest CMCD data.", l) } }, modifySegmentRequest: function(g, h) { ck(a.T, g, h) }, filter: function(g) { return ll(a, g) }, makeTextStreamsForClosedCaptions: function(g) { return ml(a, g) }, onTimelineRegionAdded: function(g) { var h = a.Rc; a: { var k = t(h.g); for (var l = k.next(); !l.done; l = k.next()) if (l = l.value, l.schemeIdUri == g.schemeIdUri && l.id == g.id && l.startTime == g.startTime && l.endTime == g.endTime) { k = l; break a } k = null } null == k && (h.g.add(g), g = new R("regionadd",new Map([["region", g]])), h.dispatchEvent(g)) }, onEvent: function(g) { return a.dispatchEvent(g) }, onError: function(g) { return gl(a, g) }, isLowLatencyMode: function() { return a.h.streaming.lowLatencyMode }, isAutoLowLatencyMode: function() { return a.h.streaming.autoLowLatencyMode }, enableLowLatencyMode: function() { a.configure("streaming.lowLatencyMode", !0) } } , f = Date.now() / 1E3; return new Ge(function() { var g, h, k, l; return L(function(m) { if (1 == m.g) return g = a, u(m, a.I.start(c, e), 2); g.i = m.h; h = Yk("manifestparsed"); a.dispatchEvent(h); if (0 == a.i.variants.length) throw new N(2,4,4036); nl(a.i); k = Date.now() / 1E3; l = k - f; a.s.D = l; z(m) }) }(),function() { return a.I.stop() } ) } function Tk(a, b) { var c, d; return L(function(e) { return 1 == e.g ? (c = Date.now() / 1E3, d = !0, a.m = ol(a, { kb: a.F, onError: function(f) { gl(a, f) }, Vc: function(f) { pl(a, f) }, onExpirationUpdated: function(f, g) { ql(a, f, g) }, onEvent: function(f) { a.dispatchEvent(f); "drmsessionupdate" == f.type && d && (d = !1, a.s.j = Date.now() / 1E3 - c) } }), a.m.configure(a.h.drm), u(e, yf(a.m, a.i.variants, a.i.offlineSessionIds), 2)) : 3 != e.g ? u(e, a.m.Wb(b.K), 3) : u(e, ll(a, a.i), 0) }) } function Uk(a, b, c) { var d, e, f, g, h, k, l, m, n, p, q, x; return L(function(y) { switch (y.g) { case 1: b.startTime = c.startTime; null != a.ac && (b.startTime = a.ac, a.ac = null); d = b.K; e = b.uri; a.Tb = e; a.G = new Ri({ Nc: function() { return d.playbackRate }, Jc: function() { return d.defaultPlaybackRate }, Zd: function(w) { d.playbackRate = w }, ye: function(w) { d.currentTime += w } }); f = function() { return rl(a) } ; g = function() { return sl(a) } ; a.o.B(d, "playing", f); a.o.B(d, "pause", f); a.o.B(d, "ended", f); a.o.B(d, "ratechange", g); h = a.h.abrFactory; a.u && a.xd == h || (a.xd = h, a.u = h(), a.u.configure(a.h.abr)); a.La = new ve(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount); a.Ma = a.h.preferredTextLanguage; a.Xb = a.h.preferredTextRole; a.Vb = a.h.preferForcedSubs; tl(a.i.presentationTimeline, a.h.playRangeStart, a.h.playRangeEnd); a.u.init(function(w, v, D) { a.j && w != a.j.l && ul(a, w, !0, void 0 === v ? !1 : v, void 0 === D ? 0 : D) }); a.C = vl(a, b.startTime); a.ub = wl(a); k = Math.max(a.i.minBufferTime, a.h.streaming.rebufferingGoal); xl(a, k); xd(a.i, a.h.preferredVideoCodecs, a.h.preferredAudioCodecs, a.h.preferredAudioChannelCount, a.h.preferredDecodingAttributes); a.j = yl(a); a.j.configure(a.h.streaming); a.l = zl; d.textTracks && a.o.B(d.textTracks, "addtrack", function(w) { if (w.track) switch (w = w.track, w.kind) { case "chapters": Al(a, w) } }); a.dispatchEvent(Yk("streaming")); l = null; if (m = a.Za().find(function(w) { return w.active })) { y.A(2); break } l = Zk(a); ul(a, l, !0, !1, 0); if (!a.h.streaming.startAtSegmentBoundary) { y.A(3); break } n = a.C.Bc(); return u(y, Bl(l, n), 4); case 4: p = y.h, a.C.td(p); case 3: Cl(a, null, $d(l)); case 2: return q = a.Bb().find(function(w) { return w.active }), q || ((x = ke(a.i.textStreams, a.Ma, a.Xb, a.Vb)[0] || null) && Ik(a.s.h, x, !0), l && (x ? (l.audio && Dl(a, l.audio, x) && (a.ha = !0), a.ha && a.L.m.setTextVisibility(!0), El(a)) : a.ha = !1), x && (a.h.streaming.alwaysStreamText || a.wd()) && rj(a.j, x)), u(y, a.j.start(), 5); case 5: a.h.abr.enabled && (a.u.enable(), Fl(a)), Od(a.j ? a.j.l : null, a.i), Gl(a.i), Hl(a), Il(a), a.i.variants.some(function(w) { return w.primary }), a.o.oa(d, "loadedmetadata", function() { a.s.l = Date.now() / 1E3 - c.ae }), z(y) } }) } function Vk(a, b, c) { var d, e, f, g, h, k, l; return L(function(m) { return 1 == m.g ? (d = mc, e = Date.now() / 1E3, f = !0, a.m = ol(a, { kb: a.F, onError: function(n) { gl(a, n) }, Vc: function(n) { pl(a, n) }, onExpirationUpdated: function(n, p) { ql(a, n, p) }, onEvent: function(n) { a.dispatchEvent(n); "drmsessionupdate" == n.type && f && (f = !1, a.s.j = Date.now() / 1E3 - e) } }), a.m.configure(a.h.drm), g = c.uri || "", h = hg(g), k = el[h], "application/x-mpegurl" == k && td() && (k = "application/vnd.apple.mpegurl"), k || (k = "video/mp4"), l = { id: 0, language: "und", disabledUntilTime: 0, primary: !1, audio: null, video: { id: 0, originalId: null, createSegmentIndex: function() { return Promise.resolve() }, segmentIndex: null, mimeType: c.mimeType ? c.mimeType.split(";")[0] : k, codecs: c.mimeType ? Oc(c.mimeType) : "", encrypted: !0, drmInfos: [], keyIds: new Set, language: "und", label: null, type: d.va, primary: !1, trickModeVideo: null, emsgSchemeIdUris: null, roles: [], forced: !1, channelsCount: null, audioSamplingRate: null, spatialAudio: !1, closedCaptions: null }, bandwidth: 100, allowedByApplication: !0, allowedByKeySystem: !0, decodingInfos: [] }, a.m.Y = !0, u(m, yf(a.m, [l], []), 2)) : u(m, a.m.Wb(b.K), 0) }) } function Wk(a, b, c) { function d() { return rl(a) } b.uri = c.uri; b.startTime = c.startTime; a.Tb = b.uri; var e = b.K; a.C = new Gi(e); var f = !1; a.Kb.push(function() { f = !0 }); null != b.startTime && a.C.td(b.startTime); a.G = new Ri({ Nc: function() { return e.playbackRate }, Jc: function() { return e.defaultPlaybackRate }, Zd: function(k) { e.playbackRate = k }, ye: function(k) { e.currentTime += k } }); xl(a, a.h.streaming.rebufferingGoal); a.o.B(e, "playing", d); a.o.B(e, "pause", d); a.o.B(e, "ended", d); a.o.B(e, "ratechange", function() { return sl(a) }); "none" != e.preload && a.o.oa(e, "loadedmetadata", function() { a.s.l = Date.now() / 1E3 - c.ae }); e.audioTracks && (a.o.B(e.audioTracks, "addtrack", function() { return Hl(a) }), a.o.B(e.audioTracks, "removetrack", function() { return Hl(a) }), a.o.B(e.audioTracks, "change", function() { return Hl(a) })); e.textTracks && (a.o.B(e.textTracks, "addtrack", function(k) { if (k.track) switch (k = k.track, k.kind) { case "metadata": Jl(a, k); break; case "chapters": Al(a, k); break; default: Hl(a) } }), a.o.B(e.textTracks, "removetrack", function() { return Hl(a) }), a.o.B(e.textTracks, "change", function() { return Hl(a) })); var g = hg(b.uri); e.src = nk(a.T, b.uri, el[g]); (rd() || qd("Web0S")) && e.load(); a.l = Kl; a.dispatchEvent(Yk("streaming")); var h = new nc; xi(e, HTMLMediaElement.HAVE_METADATA, a.o, function() { h.resolve() }); xi(e, HTMLMediaElement.HAVE_CURRENT_DATA, a.o, function() { var k; return L(function(l) { if (1 == l.g) return Ll(a), k = Ml(a), k.find(function(m) { return "disabled" != m.mode }) ? l.A(2) : u(l, new Promise(function(m) { a.o.oa(e.textTracks, "change", m); (new Q(m)).S(1) } ), 2); if (f) return l["return"](); Nl(a); z(l) }) }); e.error ? h.reject(fl(a)) : "none" == e.preload && (Va('With