/*
 @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 p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ca=typeof Object.defineProperties=="function"?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:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ca(c,a,{configurable:!0,writable:!0,value:b})}}var ha;
if(typeof Object.setPrototypeOf=="function")ha=Object.setPrototypeOf;else{var ia;a:{var ja={a:!0},ka={};try{ka.__proto__=ja;ia=ka.a;break a}catch(a){}ia=!1}ha=ia?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=ha;
function ma(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(la)la(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Vn=b.prototype}function na(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:na(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
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;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>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]];typeof d==="function"&&typeof d.prototype[a]!="function"&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return oa(na(this))}})}return a});function oa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function pa(){this.u=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function qa(a){if(a.u)throw new TypeError("Generator is already running");a.u=!0}pa.prototype.A=function(a){this.h=a};function ra(a,b){a.i={Ti:b,gj:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}pa.prototype.B=function(a){this.g=a};function I(a){a.g=0}function sa(a,b,c){a.m=b;c!=void 0&&(a.j=c)}function ta(a,b){a.m=0;a.j=b||0}
function ua(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Ti;a.i=null;return b}function ya(a){a.C=[a.i];a.m=0;a.j=0}function za(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.gj?a.g=a.m||a.j:c.B!=void 0&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new pa;this.h=a}function Da(a,b){qa(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
function Ea(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.u=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}function Ga(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.u=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.u=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.gj)throw b.Ti;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ja(a){this.next=function(b){qa(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.A):(a.g.A(b),b=Ga(a));return b};this.throw=function(b){qa(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.A):(ra(a.g,b),b=Ga(a));return b};this.return=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ka(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 P(a){return Ka(new Ja(new Aa(a)))}function Na(){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.u=!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(this.g==null){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.G),reject:g(this.l)}};b.prototype.G=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=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.F(g):this.m(g)}};
b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.A(2,g)};b.prototype.m=function(g){this.A(1,g)};b.prototype.A=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.C()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=ea.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.D=
function(){if(this.u)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?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.C=function(){if(this.g!=null){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.lf(h.resolve,h.reject)};b.prototype.J=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(q,r){return typeof q=="function"?function(u){try{l(q(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.lf(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.lf=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;this.g==null?f.h(k):this.g.push(k);this.u=!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).lf(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){q[u]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).lf(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function Pa(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 l==="object"&&k!==null||l==="function"}function e(k){if(!Pa(k,g)){var l=new c;ca(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(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}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(!Pa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Pa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Pa(k,
g)&&Pa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Pa(k,g)&&Pa(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.Gc=h.next=h.head=h}function c(h,k){var l=h[1];return oa(function(){if(l){for(;l.head!=h[1];)l=l.Gc;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;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Pa(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=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||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Gc:this[1].Gc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Gc.next=l.entry,this[1].Gc=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Gc.next=
h.entry.next,h.entry.next.Gc=h.entry.Gc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Gc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&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});function Qa(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 Qa(this,function(b){return b})}});
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||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)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||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?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});fa("Array.prototype.values",function(a){return a?a:function(){return Qa(this,function(b,c){return c})}});
fa("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){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("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||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;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ra(a,b,c){if(a==null)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 Ra(this,b,"includes").indexOf(b,c||0)!==-1}});fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
function Sa(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{cj:e,v:f}}return{cj:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Sa(this,b,c).cj}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Sa(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push([d,b[d]]);return c}});
var Ua=typeof Object.assign=="function"?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Pa(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ua});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 Qa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ra(this,null,"repeat");if(b<0||b>1342177279)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.EPSILON",function(){return 2.220446049250313E-16});
fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(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("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0)return b;var c=Math.floor(Math.abs(b));return b<0?-c:c}});function Va(a){a=Math.trunc(a)||0;a<0&&(a+=this.length);if(!(a<0||a>=this.length))return this[a]}
fa("Array.prototype.at",function(a){return a?a:Va});function Wa(a){return a?a:Va}fa("Int8Array.prototype.at",Wa);fa("Uint8Array.prototype.at",Wa);fa("Uint8ClampedArray.prototype.at",Wa);fa("Int16Array.prototype.at",Wa);fa("Uint16Array.prototype.at",Wa);fa("Int32Array.prototype.at",Wa);fa("Uint32Array.prototype.at",Wa);fa("Float32Array.prototype.at",Wa);fa("Float64Array.prototype.at",Wa);fa("String.prototype.at",function(a){return a?a:Va});var Xa=this||self;
function S(a,b){a=a.split(".");var c=Xa;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function T(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 Ya(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",T);
var Za={Hm:"abrstatuschanged",Im:"adaptation",Jm:"audiotrackchanged",Km:"audiotrackschanged",Lm:"boundarycrossed",Mm:"buffering",Nm:"canupdatestarttime",Om:"complete",Pm:"currentitemchanged",Qm:"downloadcompleted",Rm:"downloadfailed",Sm:"downloadheadersreceived",Tm:"drmsessionupdate",Um:"emsg",$m:"itemsinserted",an:"itemsremoved",un:"prft",Error:"error",Vm:"expirationupdated",Wm:"firstquartile",Xm:"gapjumped",cn:"keystatuschanged",gn:"loaded",hn:"loading",ln:"manifestparsed",mn:"manifestupdated",
nn:"mediaqualitychanged",on:"mediasourcerecovered",pn:"metadataadded",Metadata:"metadata",qn:"midpoint",rn:"nospatialvideoinfo",tn:"onstatechange",vn:"ratechange",yn:"segmentappended",zn:"sessiondata",An:"spatialvideoinfo",Bn:"stalldetected",Cn:"started",Dn:"statechanged",En:"streaming",Fn:"textchanged",Gn:"texttrackvisibility",Hn:"thirdquartile",In:"timelineregionadded",Jn:"timelineregionenter",Kn:"timelineregionexit",Ln:"trackschanged",Nn:"unloading",Pn:"variantchanged"};function $a(){}function ab(){}function bb(){}function cb(a){var b=Na.apply(1,arguments);db.has(a)||(db.add(a),bb.apply($a,x(b)))}function fb(){}function gb(){}function ib(){}var db=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Na.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Na.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Na.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Na.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Na.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Na.apply(0,arguments)))}),
bb=function(){return console.warn.apply(console,x(Na.apply(0,arguments)))},ab=function(){console.error.apply(console,x(Na.apply(0,arguments)))});function jb(){this.g=new Map}p=jb.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function kb(){this.hb=new jb;this.Ye=this}kb.prototype.addEventListener=function(a,b){this.hb&&this.hb.push(a,b)};kb.prototype.removeEventListener=function(a,b){this.hb&&this.hb.remove(a,b)};kb.prototype.dispatchEvent=function(a){if(!this.hb)return!0;var b=this.hb.get(a.type)||[],c=this.hb.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.Ye;a.currentTarget=this.Ye;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
kb.prototype.release=function(){this.hb=null};function lb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function mb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function nb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function pb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var qb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function rb(a){var b;a instanceof rb?(sb(this,a.lc),this.xd=a.xd,tb(this,a.Ib),ub(this,a.Sd),this.Tb=a.Tb,vb(this,a.g.clone()),this.fd=a.fd):a&&(b=String(a).match(qb))?(sb(this,b[1]||"",!0),this.xd=wb(b[2]||""),tb(this,b[3]||"",!0),ub(this,b[4]),this.Tb=wb(b[5]||"",!0),vb(this,b[6]||"",!0),this.fd=wb(b[7]||"")):this.g=new xb(null)}p=rb.prototype;p.lc="";p.xd="";p.Ib="";p.Sd=null;p.Tb="";p.fd="";
p.toString=function(){var a=[],b=this.lc;b&&a.push(yb(b,zb,!0),":");if(b=this.Ib){a.push("//");var c=this.xd;c&&a.push(yb(c,zb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Sd;b!=null&&a.push(":",String(b))}if(b=this.Tb)this.Ib&&b.charAt(0)!="/"&&a.push("/"),a.push(yb(b,b.charAt(0)=="/"?Ab:Bb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fd)&&a.push("#",yb(b,Cb));return a.join("")};
p.resolve=function(a){var b=this.clone();b.lc==="data"&&(b=new rb);var c=!!a.lc;c?sb(b,a.lc):c=!!a.xd;c?b.xd=a.xd:c=!!a.Ib;c?tb(b,a.Ib):c=a.Sd!=null;var d=a.Tb;if(c)ub(b,a.Sd);else if(c=!!a.Tb){if(d.charAt(0)!="/")if(this.Ib&&!this.Tb)d="/"+d;else{var e=b.Tb.lastIndexOf("/");e!=-1&&(d=b.Tb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h==
".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Tb=d:c=a.g.toString()!=="";c?vb(b,a.g.clone()):c=!!a.fd;c&&(b.fd=a.fd);return b};p.clone=function(){return new rb(this)};function sb(a,b,c){a.lc=c?wb(b,!0):b;a.lc&&(a.lc=a.lc.replace(/:$/,""))}function tb(a,b,c){a.Ib=c?wb(b,!0):b}function ub(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Sd=b}else a.Sd=null}
function vb(a,b,c){b instanceof xb?a.g=b:(c||(b=yb(b,Db)),a.g=new xb(b))}function wb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Eb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Eb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var zb=/[#\/\?@]/g,Bb=/[#\?:]/g,Ab=/[#\?]/g,Db=/[#\?@]/g,Cb=/#/g;function xb(a){this.g=a||null}
function Fb(a){if(!a.ob&&(a.ob=new Map,a.ke=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=xb.prototype;p.ob=null;p.ke=null;function Gb(a){Fb(a);return a.ke}p.add=function(a,b){Fb(this);this.g=null;var c=this.ob.has(a)?this.ob.get(a):null;c||this.ob.set(a,c=[]);c.push(b);this.ke++;return this};
p.set=function(a,b){Fb(this);this.g=null;this.ob.has(a)?this.ob.set(a,[b]):this.add(a,b);return this};p.get=function(a){Fb(this);return this.ob.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.ob||!this.ob.size)return"";for(var a=[],b=t(this.ob.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.ob.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
p.clone=function(){var a=new xb;a.g=this.g;if(this.ob){for(var b=new Map,c=t(this.ob),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.ob=b;a.ke=this.ke}return a};function Hb(){}function Ib(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Jb(a);b=Jb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Kb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Jb(a,b,c){c=c===void 0?Infinity:c;return Lb(a,b===void 0?0:b,c,Uint8Array)}function Mb(a,b,c){c=c===void 0?Infinity:c;return Lb(a,b===void 0?0:b,c,Uint16Array)}function Nb(a,b,c){c=c===void 0?Infinity:c;return Lb(a,b===void 0?0:b,c,DataView)}
function Lb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Hb);Hb.toDataView=Nb;Hb.toUint16=Mb;Hb.toUint8=Jb;Hb.toArrayBuffer=Kb;Hb.equal=Ib;function U(a,b,c){var d=Na.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ob)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};S("shaka.util.Error",U);var Ob=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
U.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,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,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,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,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,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,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,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,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,INDEXED_DB_INIT_TIMED_OUT:9017,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,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Pb(a){this.h=a;this.g=void 0}Pb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/*
 @license
 Shaka Player
 Copyright 2025 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Qb(){return Rb.value()}var Sb=null,Tb=null,Rb=new Pb(function(){var a=void 0;Sb&&(a=Sb());!a&&Tb&&(a=Tb());return a});function Ub(){}
function Vb(a){if(!a)return"";a=Jb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!Qb().ji())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&ab('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&
(a[c+2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
function Wb(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Nb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return Xb(d)}
function Yb(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=Jb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return Vb(c);if(c[0]==254&&c[1]==255)return Wb(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return Wb(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return Wb(a,!1);if(c[1]==0&&c[3]==0)return Wb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Vb(a);throw new U(2,2,2003);}
function Zb(a){if(window.TextEncoder&&!Qb().ji()){var b=new TextEncoder;return Kb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Kb(b)}function $b(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}function Xb(a){return ac.value()(a)}
function bc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return e[1]=="#"?(e=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Ub);Ub.resetFromCharCode=function(){ac.g=void 0};
Ub.toUTF16=$b;Ub.toUTF8=Zb;Ub.fromBytesAutoDetect=Yb;Ub.fromUTF16=Wb;Ub.fromUTF8=Vb;var ac=new Pb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={$c:65536};b.$c>0;b={$c:b.$c},b.$c/=2)if(a(b.$c))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.$c)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.$c));return e}}(b);return null});function cc(){}function dc(a){a=Xb(Jb(a));return btoa(a)}function ec(a,b){b=b==void 0?!0:b;a=dc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function fc(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 hc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}
function jc(a){var b=Jb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}function lc(){for(var a=Na.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(Jb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",cc);cc.concat=lc;cc.toHex=jc;cc.fromHex=hc;cc.fromBase64=fc;cc.toBase64=ec;
cc.toStandardBase64=dc;function mc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new rb(a[0]);b=new rb(b[0]);b=d.resolve(b);c&&vb(b,c);return[b.toString()]}b=b.map(function(h){return new rb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new rb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&vb(g,c),d.push(g.toString())}return d}
function nc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
function oc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=ec(hc(h),!1));var l=g;l.length!=22&&(l=ec(hc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Jb(Zb(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function pc(a,b){if(b.length==1)return b[0];a=qc(a,b);if(a!=null)return a;throw new U(2,4,4025,b);}function qc(a,b){var c=rc.get(a);c=t(c);for(var 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==sc?"":null}
function tc(a,b){var c=[];a=rc.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var sc="text",uc={Ha:"video",na:"audio",Va:sc,yg:"image",Fm:"application"},vc=1/15,rc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function wc(){}function xc(a,b){a=yc(a);b=yc(b);return a.split("-")[0]==b.split("-")[0]}function zc(a,b){a=yc(a);b=yc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function Ac(a,b){a=yc(a);b=yc(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function yc(a){a=t(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=t(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Bc.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Cc(a,b){var c=Dc(a),d=Dc(b);return a!=c&&b!=d&&c==d}function Fc(a,b){a=yc(a);b=yc(b);return b==a?4:zc(b,a)?3:Ac(b,a)?2:zc(a,b)?1:0}
function Dc(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=Bc.get(a)||a}function Gc(a){return a.language?yc(a.language):a.audio&&a.audio.language?yc(a.audio.language):a.video&&a.video.language?yc(a.video.language):"und"}
function Hc(a,b){a=yc(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(yc(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,zc(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Ac(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,zc(a,b))return b;return null}S("shaka.util.LanguageUtils",wc);wc.findClosestLocale=Hc;wc.getLocaleForVariant=Gc;
wc.getLocaleForText=function(a){return yc(a.language||"und")};wc.getBase=Dc;wc.relatedness=Fc;wc.areSiblings=Cc;wc.normalize=yc;wc.isSiblingOf=Ac;wc.isParentOf=zc;wc.areLanguageCompatible=xc;wc.areLocaleCompatible=function(a,b){a=yc(a);b=yc(b);return a==b};
var Bc=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 Ic(a){kb.call(this);this.j=yc(a);this.i=new Map;this.g=new Set;this.h=new Map}ma(Ic,kb);p=Ic.prototype;p.release=function(){kb.prototype.release.call(this)};
p.Ki=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(yc(c.value));Jc(this);a=pb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("unknown-locales",(new Map).set("locales",a)));a=pb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new T("locale-changed",a))};
p.Xa=function(a,b,c){a=yc(a);c===void 0&&(c=Kc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Kc||d.set(f,e)});this.h.set(a,d);Jc(this);this.dispatchEvent(new T("locale-updated"));return this};p.im=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new T("unknown-localization",a));return""};
p.Kk=function(){return this.g};
function Jc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=t(d),g=f.next(),h={};!g.done;h={ze:void 0},g=f.next()){h.ze=g.value;e.add(h.ze);e.add(Dc(h.ze));g=pb(b.keys(),function(l){return function(m){return Cc(m,l.ze)}}(h));g.sort();g=t(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=pb(b.keys(),function(l){return function(m){return Dc(m)==l.ze}}(h));h.sort();h=t(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=t(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
c.reverse();a.i.clear();b=t(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,Lc(f,b,e);e.size>0&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function Lc(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}S("shaka.ui.Localization",Ic);Ic.prototype.getCurrentLocales=Ic.prototype.Kk;
Ic.prototype.resolve=Ic.prototype.resolve;Ic.prototype.resolveDictionary=Ic.prototype.im;Ic.prototype.insert=Ic.prototype.Xa;Ic.prototype.changeLocale=Ic.prototype.Ki;Ic.prototype.release=Ic.prototype.release;var Kc=1;Ic.ConflictResolution={USE_OLD:0,USE_NEW:Kc};Ic.UNKNOWN_LOCALES="unknown-locales";Ic.UNKNOWN_LOCALIZATION="unknown-localization";Ic.MISSING_LOCALIZATIONS="missing-localizations";Ic.LOCALE_CHANGED="locale-changed";Ic.LOCALE_UPDATED="locale-updated";function Mc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Mc.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Nc(a){return a.h/(1-Math.pow(a.g,a.i))};function Oc(){this.h=new Mc(2);this.j=new Mc(5);this.g=0;this.i=128E3;this.l=16E3}Oc.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)};Oc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Oc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Nc(this.h),Nc(this.j))};function Pc(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function Qc(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function Rc(a,b,c){c||(c=Pc);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={hj:void 0},d=a.next()){e.hj=d.value;d=b.findIndex(function(f){return function(g){return c(f.hj,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function Sc(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Pc);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 Tc(){this.g=new jb}p=Tc.prototype;p.release=function(){this.Sa();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Uc(a,b,c,d),this.g.push(b,a))};p.ua=function(a,b,c,d){function e(g){f.Fa(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.Fa=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.Fa(),this.g.remove(b,e))}};
p.Sa=function(){if(this.g){for(var a=[],b=t(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.Fa();this.g.g.clear()}};S("shaka.util.EventManager",Tc);Tc.prototype.removeAll=Tc.prototype.Sa;Tc.prototype.unlisten=Tc.prototype.Fa;Tc.prototype.listenOnce=Tc.prototype.ua;Tc.prototype.listen=Tc.prototype.o;Tc.prototype.release=Tc.prototype.release;
function Uc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Vc(a,d);this.target.addEventListener(b,c,this.g)}Uc.prototype.Fa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Vc(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Wc(a)?b:b.capture||!1}
function Wc(a){var b=Xc;if(b==void 0){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}Xc=b}return b||!1}var Xc=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Yc(a,b){this.g=a;this.h=b}Yc.prototype.toString=function(){return"v"+this.g+"."+this.h};function Zc(a,b){var c=new Yc(5,0),d=$c,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function ad(a,b,c,d){bb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function bd(a,b,c,d){ab([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var $c=null;function cd(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.u=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&bb("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,Zc("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{bb("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(bb("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||bb(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function dd(a,b,c,d){d.type!=="video"||a.u&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.u)}function ed(a){a.g&&a.i.classList.add("shaka-hidden")}cd.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function fd(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}S("shaka.lcevc.Dec",cd);cd.prototype.release=cd.prototype.release;function gd(a){if(hd.has(a))return hd.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),hd.set(a,b),b):!1}function id(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function kd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var hd=new Map;function ld(){}ld.prototype.extract=function(){};ld.prototype.decode=function(){return[]};ld.prototype.clear=function(){};ld.prototype.getStreams=function(){return[]};function md(){}md.prototype.init=function(){};md.prototype.parse=function(){return[]};function nd(){}p=nd.prototype;p.init=function(){};p.Uf=function(){};p.fe=function(){};p.remove=function(){};p.zg=function(){};S("shaka.media.IClosedCaptionParser",nd);function od(a){this.h=new Map;this.i=0;this.j=new md;if(a=pd(a.toLowerCase()))this.j=a();this.g=new ld;if(a=qd)this.g=a(),this.h.set(this.i,this.g)}p=od.prototype;
p.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=qd)this.g=d();this.h.set(b,this.g)}}else b||this.fe();this.j.init(a);c!=-1&&(this.i=c)};p.Uf=function(a){a=this.j.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Jb(b.packet);c.length>0&&this.g.extract(c,b.pts)}return this.g.decode()};p.fe=function(){this.g.clear()};
p.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};p.zg=function(){return this.g.getStreams()};function sd(a,b){td.set(a,b)}function pd(a){return td.get(a)}S("shaka.media.ClosedCaptionParser",od);od.findDecoder=function(){return qd};od.unregisterDecoder=function(){qd=null};od.registerDecoder=function(a){qd=a};od.findParser=pd;od.unregisterParser=function(a){td.delete(a)};
od.registerParser=sd;var td=new Map,qd=null;function ud(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=vd;this.scroll=wd}S("shaka.text.CueRegion",ud);var vd=1;ud.units={PX:0,PERCENTAGE:vd,LINES:2};var wd="";ud.scrollMode={NONE:wd,UP:"up"};function xd(a){this.h=a||"";this.g=0}function yd(a){zd(a,/[ \t]+/gm)}function zd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function Ad(a){return a.g==a.h.length?null:(a=zd(a,/[^ \t\n]*/gm))?a[0]:null}
function Bd(a){a=zd(a,Cd);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}function Ed(a){return a?Bd(new xd(a)):null}var Cd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Gd(){}function Hd(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=Array.isArray(d);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 WeakSet;return b(a)}function Id(a){var b={},c;for(c in a)b[c]=a[c];return b}
function Jd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=Jd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=Jd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}S("shaka.util.ObjectUtils",Gd);Gd.alphabeticalKeyOrderStringify=Jd;
Gd.shallowCloneObject=Id;Gd.cloneObject=Hd;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function Kd(a,b){var c=c===void 0?!1:c;a=Yb(a);return Ld(a,b,c)}function Ld(a,b,c){a=Md(a,c===void 0?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function Nd(a){return Od.has(a)?Od.get(a):""}
function Md(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var r=a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&&
r<123)&&r!==62;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(r===39||r===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){r=u;var v=q.split(":")[1];Od.set(r,v);Pd.set(v,r)}m==="tt"&&q==="xml:space"&&u==="preserve"&&(l=!0);n[q]=u}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;
for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=a.slice(k,e+1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function Qd(a){return typeof a==="string"}function Rd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function Sd(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function Td(a){if(typeof a==="string")return bc(a);a=a.children.reduce(function(b,c){return typeof c==="string"?b+c:b},"");return a===""?null:bc(a)}
function Ud(a){if(!Array.from(a.children).every(function(b){return typeof b==="string"}))return null;(a=Td(a))&&(a=a.trim());return a}function Vd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())Vd(d.value,b,c)}return c}function Wd(a,b){a=Sd(a,b);return a.length!=1?null:a[0]}function Xd(a,b,c){a=Yd(a,b,c);return a.length!=1?null:a[0]}
function Zd(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a!=null&&(e=c(a));return e==null?d:e}function $d(a,b,c){b=Nd(b);return a.attributes[b+":"+c]||null}function Yd(a,b,c){var d=Nd(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function ae(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=$d(a,d.value,c))return d;return null}
function be(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function ce(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
function de(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function ee(a){a=Number(a);return a%1===0?a:null}function fe(a){a=Number(a);return a%1===0&&a>0?a:null}function ge(a){a=Number(a);return a%1===0&&a>=0?a:null}function he(a){a=Number(a);return isNaN(a)?null:a}function ie(a){return a?a.toLowerCase()==="true":!1}
function je(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function ke(a){var b=[];a=bc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Mc:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Mc=c.slice(1))}return b}
function me(a,b){var c=ke(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=ne(a,"t",d.t)),d.n!==null&&(c=ne(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Mc)&&a[c]?oe(a[c],e,d,Ud(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(x(b.children))))}}
function ne(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function oe(a,b,c,d){if(b==="remove")delete a.attributes[c];else if(b==="add"||b==="replace")a.attributes[c]=d}
function pe(a){var b="",c=a.tagName.split(":");c.length>0&&(b=c[0],b=Pd.has(b)?Pd.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,typeof d=="string"?c=new Text(d):c=pe(d),b.appendChild(c);return b}
function qe(a){if(!a)return null;var b={tagName:a.tagName,attributes:Id(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"?b.children.push(c):(c=qe(c),c.parent=b,b.children.push(c));return b}var Od=new Map,Pd=new Map;function re(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new ud;this.position=null;this.positionAlign=se;this.size=0;this.textAlign=te;this.direction=ue;this.writingMode=ve;this.lineInterpretation=we;this.line=null;this.lineHeight="";this.lineAlign=xe;this.displayAlign=ye;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ze;this.fontStyle=Ae;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={columns:32,rows:15}}function Be(a,b){a=new re(a,b,"");a.lineBreak=!0;return a}re.prototype.clone=function(){var a=new re(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function Ce(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!Sc(a.nestedCues,b.nestedCues,Ce))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Sc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function De(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&Ee(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(Fe)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Ge(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=Ld(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())He(c.value,a,b);else a.payload=bc(c);else a.payload=bc(c)}else a.payload=bc(c)}function Ee(a){for(var b=t(Object.entries(Ie)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new re(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Je));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new re(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Ge(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
function He(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new ud;d.position=null;d.size=0;d.textAlign=te;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=Le(g.backgroundColor,h.backgroundColor),h.color=Le(g.color,h.color),h.fontFamily=Le(g.fontFamily,h.fontFamily),
h.fontSize=Le(g.fontSize,h.fontSize),h.textShadow=Le(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Be(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Oe;break;case "i":d.fontStyle=Pe;break;case "u":d.textDecoration.push(Qe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=Ed(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Qd(a)||e.length==1&&Qd(e[0]))for(c=Td(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Be(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=bc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())He(a.value,d,c)}function Le(a,b){return a&&a.length>0?a:b}S("shaka.text.Cue",re);re.parseCuePayload=De;re.equal=Ce;
re.prototype.clone=re.prototype.clone;var se="auto";re.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:se};var te="center",Re={LEFT:"left",RIGHT:"right",CENTER:te,START:"start",END:"end"};re.textAlign=Re;var ye="after",Se={BEFORE:"before",CENTER:"center",AFTER:ye};re.displayAlign=Se;var ue="ltr";re.direction={HORIZONTAL_LEFT_TO_RIGHT:ue,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ve="horizontal-tb";re.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ve,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var we=0;re.lineInterpretation={LINE_NUMBER:we,PERCENTAGE:1};var xe="start",Te={CENTER:"center",START:xe,END:"end"};re.lineAlign=Te;var Ie={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};re.defaultTextColor=Ie;var Je={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};re.defaultTextBackgroundColor=Je;var ze=400,Oe=700;re.fontWeight={NORMAL:ze,BOLD:Oe};
var Ae="normal",Pe="italic",Ue={NORMAL:Ae,ITALIC:Pe,OBLIQUE:"oblique"};re.fontStyle=Ue;var Qe="underline";re.textDecoration={UNDERLINE:Qe,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Fe=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Ve(){}Ve.prototype.destroy=function(){};function We(a,b,c){Xe.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,Vf:b})}function Ye(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Ze,$e,af,bf]),e=d.next();!e.done;e=d.next())if(e=Xe.get(c+"-"+e.value)){var f=e.Vf(),g=f.isSupported(a,b);f.destroy();if(g)return e.Vf}return null}S("shaka.transmuxer.TransmuxerEngine",Ve);Ve.findTransmuxer=Ye;Ve.unregisterTransmuxer=function(a,b){Xe.delete(a.toLowerCase().split(";")[0]+"-"+b)};
Ve.registerTransmuxer=We;Ve.prototype.destroy=Ve.prototype.destroy;var Xe=new Map,bf=1,af=2,$e=3,Ze=4;Ve.PluginPriority={FALLBACK:bf,PREFERRED_SECONDARY:af,PREFERRED:$e,APPLICATION:Ze};function cf(){}function df(a,b){var c=a;b&&!ef.includes(a)&&(c+='; codecs="'+b+'"');return c}function ff(a,b){b&&(a+='; codecs="'+b+'"');return a}function gf(a,b,c){var d=df(a,b);b=ff(a,b);Ye(b)?(a=Ye(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function hf(a){return a.split(";")[0].split("/")[1]}
function jf(a){var b=kf(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
case a==="dvc1":case a==="dvi1":return"dovi-vvc"}return a}function lf(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=kf(c.value),b.push(c[0]);return b.sort().join(",")}function mf(a){return a.split(";")[0]}function nf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function of(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"}
function kf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",cf);cf.getFullTypeWithAllCodecs=ff;cf.getFullType=df;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var ef=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function pf(a){this.i=null;this.l=a;this.D=!1;this.m=this.A=0;this.u=Infinity;this.h=this.g=null;this.F="";this.C=function(){};this.j=new Map}function qf(a,b){rf.set(a,b)}function sf(a){return rf.get(a)}function tf(a){return rf.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!qd:!1}pf.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
function uf(a,b,c,d,e){var f,g,h,k,l,m,n;return P(function(q){if(q.g==1)return G(q,Promise.resolve(),2);if(!a.i||!a.l)return q.return();if(c==null||d==null)return a.i.parseInit(Jb(b)),q.return();f=a.D?c:a.A;g={periodStart:a.A,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Jb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.C(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.m&&r.startTime<a.u});a.l.append(n);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,a.u);I(q)})}
pf.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return P(function(e){if(e.g==1)return G(e,Promise.resolve(),2);if(a>=b)return e.return();c&&vf(d,a,b);d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),wf(d));I(e)})};function yf(a,b,c){a.m=b;a.u=c}function zf(a,b,c){a.F=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function Af(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Af(a,d.value,c)}
function Bf(a,b,c){var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);Af(a,f,c);f.startTime>=a.m&&f.startTime<a.u&&(d.get(e).push(f),e==a.F&&a.l.append([f]))}c=t(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=t(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);wf(a)}
function vf(a,b,c){for(var d=t(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
function wf(a){for(var b=Infinity,c=-Infinity,d=t(a.j.values()),e=d.next();!e.done;e=d.next()){e=t(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.u)))}S("shaka.text.TextEngine",pf);pf.prototype.destroy=pf.prototype.destroy;pf.findParser=sf;pf.unregisterParser=function(a){rf.delete(a)};pf.registerParser=qf;var rf=new Map;function Cf(a){this.h=a;this.g=null}Cf.prototype.Y=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()},a*1E3);return this};Cf.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Df(a){this.h=a;this.g=null}Df.prototype.Ka=function(){this.stop();this.h();return this};Df.prototype.Y=function(a){var b=this;this.stop();this.g=(new Cf(function(){b.h()})).Y(a);return this};Df.prototype.xa=function(a){var b=this;this.stop();this.g=(new Cf(function(){b.g.Y(a);b.h()})).Y(a);return this};Df.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Df);Df.prototype.stop=Df.prototype.stop;Df.prototype.tickEvery=Df.prototype.xa;
Df.prototype.tickAfter=Df.prototype.Y;Df.prototype.tickNow=Df.prototype.Ka;function Ef(a,b){return a.concat(b)}function Ff(){}function Gf(a){return a!=null}function Hf(a,b){return Promise.race([b,new Promise(function(c,d){(new Df(d)).Y(a)})])};function If(){}
function Jf(a,b,c,d,e){function f(z){var y=String(z.width||"")+String(z.height||"")+String(Math.round(z.frameRate||0))+(z.hdr||"")+z.fastSwitching;z.dependencyStream&&(y+=z.dependencyStream.baseOriginalId||"");z.roles&&(y+=z.roles.sort().join("_"));return y}function g(z){var y=z.language+(z.channelsCount||0)+(z.audioSamplingRate||0)+z.roles.join(",")+z.label+z.groupId+z.fastSwitching;z.dependencyStream&&(y+=z.dependencyStream.baseOriginalId||"");return y}if(e.length){var h=a.textStreams;e=t(e);for(var k=
e.next(),l={};!k.done;l={ri:void 0},k=e.next())if(l.ri=k.value,k=h.filter(function(z){return function(y){return y.codecs.startsWith(z.ri)||y.mimeType.startsWith(z.ri)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=Kf(h,b,c);if(d.length){b=new jb;c=t(h);for(h=c.next();!h.done;h=c.next())h=h.value,b.push(String(h.video.width||0),h);var m=[];b.forEach(function(z,y){z=0;var B=[];y=t(y);for(var C=y.next(),E={};!C.done;E={xg:void 0},C=y.next())E.xg=C.value,C=d.filter(function(D){return function(A){return D.xg.decodingInfos[0][A]}}(E)).length,
C>z?(z=C,B=[E.xg]):C==z&&B.push(E.xg);m.push.apply(m,x(B))});h=m}c=new Set;b=new Set;h=t(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(z,y){return z.bandwidth-y.bandwidth});var n=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],r=jf(q.codecs),u=jf(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e),
n.push(e.id);c.set(k,l)}var v={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(z,y){if(!z.bandwidth||!y.bandwidth||z.bandwidth==y.bandwidth){if(z.codecs&&y.codecs&&z.codecs!=y.codecs&&z.width==y.width){var B=jf(z.codecs),C=jf(y.codecs);if(B!=C)return(v[B]||1)-(v[C]||1)}return z.width-y.width}return z.bandwidth-y.bandwidth});b=id();var w=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e);
l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(r=jf(q.codecs),u=jf(e.codecs),r!==u))continue;r=jf(q.codecs);u=jf(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),w.push(e.id))}else l.push(e),w.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(z){var y=z.audio;z=z.video;return y&&!n.includes(y.id)||z&&!w.includes(z.id)?!1:!0})}
function Kf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={videoCodec:void 0},d=b.next())if(e.videoCodec=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.videoCodec)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={audioCodec:void 0},b=c.next())if(d.audioCodec=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.audioCodec)}}(d)),b.length){a=b;break}return a}
function Lf(a,b,c){a.variants=a.variants.filter(function(d){return Mf(d,b,c)})}
function Mf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Nf(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return P(function(e){if(e.g==1)return G(e,Of(a,b,b.offlineSessionIds.length>0,c,d),2);Pf(b);return G(e,Qf(b),0)})}
function Of(a,b,c,d,e){var f,g;return P(function(h){if(h.g==1)return Qb().Qj()&&Rf(b.variants),G(h,Sf(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Tf(k,f,e);if(!l){var m=[];k.audio&&m.push(Uf(k.audio));k.video&&m.push(Uf(k.video))}return l});I(h)})}
function Rf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function Tf(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=Qb(),e=d.Ub()==="Xbox";d=d.Oa()==="MOBILE"&&d.Ja()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!fd(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function Vf(a,b){var c,d,e,f,g,h,k;return P(function(l){if(l.g==1){c=function(m,n){if(m){var q=Id(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,kf:void 0},g=f.next())k=g.value,h.kf=Jd(k),h.cache=Wf,h.cache.has(h.kf)?d=c(d,h.cache.get(h.kf)):e.push(Xf(k).then(function(m){return function(n){var q=
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.kf,q),d=c(d,q))}}(h)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);I(l)})}
function Xf(a){var b=[""];a.video&&(b=nf(a.video.contentType).split(","));var c=[""];a.audio&&(c=nf(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={ed:void 0},g=f.next())g=g.value,h.ed=Hd(a),a.video&&(h.ed.video.contentType=df(mf(h.ed.video.contentType),e)),a.audio&&(h.ed.audio.contentType=df(mf(h.ed.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(Qb().Oa()=="MOBILE"?Hf(5,navigator.mediaCapabilities.decodingInfo(k.ed)):
navigator.mediaCapabilities.decodingInfo(k.ed)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function Sf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D;return P(function(A){switch(A.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.B(4);break}h.vj=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.B(7);break}n=m.value;q=Yf(n,b,c).filter(function(F){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.vj}}(h));r=t(q);u=r.next();case 8:if(u.done){A.B(10);break}v=u.value;
return G(A,Vf(n,v),9);case 9:u=r.next();A.B(8);break;case 10:n.decodingInfos.some(function(F){return F.supported})&&(k=!0);m=l.next();A.B(5);break;case 7:if(k)return A.return();h={vj:void 0};g=f.next();A.B(2);break;case 4:w=t(a),z=w.next();case 12:if(z.done){A.B(0);break}y=z.value;B=Yf(y,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});C=t(B);E=C.next();case 15:if(E.done){z=w.next();A.B(12);break}D=E.value;return G(A,Vf(y,D),
16);case 16:E=C.next(),A.B(15)}})}
function Yf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=nf(k);if(l.includes(",")&&!d){var m=l.split(","),n=mf(k);l=pc("video",m);m=pc("audio",m);m=Zf(m,n);n=gf(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=$f(l);k={contentType:gf(mf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=mf(l),l=Zf(nf(l),k),k=gf(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),n=l.next();!n.done;n=
l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=t(n);for(m=n.next();!m.done;m=n.next()){m=
m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=t(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=t(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var z=new Set,y=t(w.initData),B=y.next();!B.done;B=y.next())z.add(B.value.initDataType);
u.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");w.persistentStateRequired&&(u.persistentState="required");w.sessionType&&(u.sessionTypes=[w.sessionType]);d&&(u.audio?(w.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||w.encryptionScheme),u.audio.robustness=u.audio.robustness||w.audioRobustness):(u.audio={robustness:w.audioRobustness},w.encryptionScheme&&(u.audio.encryptionScheme=w.encryptionScheme)),u.audio.robustness==
""&&delete u.audio.robustness);e&&(u.video?(w.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||w.encryptionScheme),u.video.robustness=u.video.robustness||w.videoRobustness):(u.video={robustness:w.videoRobustness},w.encryptionScheme&&(u.video.encryptionScheme=w.encryptionScheme)),u.video.robustness==""&&delete u.video.robustness)}r.keySystemConfiguration=u;m.push(r)}a.push(m)}}return a}
function Zf(a,b){var c=Qb();return a.toLowerCase()=="flac"?c.Ja()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.Ja()!="WEBKIT"?"opus":hf(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.He()?"ec-3":a}function $f(a){if(a.includes("avc1")){var b=a.split(".");if(b.length==3)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if(a=="vp9")return"vp09.00.41.08";return a}
function Pf(a){a.textStreams=a.textStreams.filter(function(b){b=df(b.mimeType,b.codecs);return tf(b)})}
function Qf(a){var b,c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(ag.has(f)){l.B(5);break}g=bg.get(f);if(!g){ag.set(f,!1);l.B(5);break}return G(l,cg(g),7);case 7:h=l.h,ag.set(f,h);case 5:(k=ag.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,I(l)}})}
function cg(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(c.height===2)}})}
function dg(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=b?b.groupId:null,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),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,videoLabel:null,
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,
accessibilityPurpose:null,originalLanguage:null};if(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;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.videoBandwidth&&
d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=pc("video",e),a.audioCodec=pc("audio",e)}catch(r){}}}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,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);
a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function eg(a){return{id:a.id,active:!1,type:sc,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
function fg(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=gg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function hg(a){a.__shaka_id||(a.__shaka_id=ig++);return a.__shaka_id}
function jg(a){var b={id:hg(a),active:a.mode!="disabled",type:sc,bandwidth:0,language:yc(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function kg(a,b){var c=a?a.language:null;c={id:hg(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:yc(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function lg(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function mg(a){return a.filter(function(b){return lg(b)})}
function ng(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=Hc(yc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return yc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=og(e,c),a.length)return a}else if(a=e.filter(function(k){return k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Ef,[]);return a.length?
og(e,a[0]):e}function og(a,b){return a.filter(function(c){return c.roles.includes(b)})}function pg(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function qg(a,b){b.length&&(b=b.filter(function(c){return jf(a.codecs)==jf(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function Uf(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function rg(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=yc(c.preferredTextLanguage);b=yc(b.language);if(c.autoShowText==2)return xc(b,d);if(c.autoShowText==3){if(!a)return!1;a=yc(a.language);return xc(b,d)&&!xc(a,b)}bb("Invalid autoShowText setting!");return!1}
function sg(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?mf(c):"",codecs:c?nf(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(df(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}S("shaka.util.StreamUtils",If);If.meetsRestrictions=Mf;
var Wf=new Map,ig=0,ag=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),bg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function tg(){var a=this;this.H=null;this.m=!1;this.C=new Oc;this.j=new Tc;navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){if(a.m&&a.g.useNetworkInformation){a.C=new Oc;a.g&&a.C.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.A=[];this.I=1;this.J=!1;this.h=this.u=this.g=this.D=null;this.l=new Df(function(){if(a.m&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.F=window;"documentPictureInPicture"in window&&this.j.o(window.documentPictureInPicture,"enter",function(){a.F=window.documentPictureInPicture.window;a.l&&a.l.Ka();a.j.ua(a.F,"pagehide",function(){a.F=window;a.l&&a.l.Ka()})});this.G=this.i=null}p=tg.prototype;p.stop=function(){this.H=null;this.m=!1;this.A=[];this.I=1;this.u=this.D=null;this.h&&(this.h.disconnect(),this.h=null);this.l&&this.l.stop();this.G=this.i=null};
p.release=function(){this.stop();this.j.release();this.l=null};p.init=function(a){this.H=a};
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,b=this.F.screen.height*c,c*=this.F.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,e=this.u.clientHeight,f=this.u.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.u&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.A.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.A);d=e;a&&e.length!=this.A.length&&(d=this.A.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=ug(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=vg(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=ug(this,this.g.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=ug(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.I)?1:Math.abs(this.I);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
e.video.height))&&(c=e)}this.D=Date.now();return c};p.enable=function(){this.m=!0};p.disable=function(){this.m=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.C.sample(e,b);c&&this.D!=null&&this.m&&wg(this)};p.trySuggestStreams=function(){this.m&&(this.D=Date.now(),wg(this,!0))};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.C.getBandwidthEstimate(a);return this.G?this.G.getBandwidthEstimate(a):a};p.setVariants=function(a){if(Rc(a,this.A))return!1;this.A=a;return!0};
p.playbackRateChanged=function(a){this.I=a};p.setMediaElement=function(a){function b(){c.l.Y(xg)}var c=this;this.u=a;this.h&&(this.h.disconnect(),this.h=null);this.u&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.u));this.j.o(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.o(c.i,"resize",b))});this.j.o(a,"leavepictureinpicture",function(){c.i&&c.j.Fa(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.G=a};
p.configure=function(a){this.g=a;this.C&&this.g&&this.C.configure(this.g.advanced)};function wg(a,b){if(b===void 0||!b){if(!a.J){b=a.C;if(!(b.g>=b.i))return;a.J=!0;a.D-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.D<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
function ug(a,b,c,d,e){if(a.G){var f=a.G.Xi();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Mf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function vg(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",tg);tg.prototype.configure=tg.prototype.configure;
tg.prototype.setCmsdManager=tg.prototype.setCmsdManager;tg.prototype.setMediaElement=tg.prototype.setMediaElement;tg.prototype.playbackRateChanged=tg.prototype.playbackRateChanged;tg.prototype.setVariants=tg.prototype.setVariants;tg.prototype.getBandwidthEstimate=tg.prototype.getBandwidthEstimate;tg.prototype.trySuggestStreams=tg.prototype.trySuggestStreams;tg.prototype.segmentDownloaded=tg.prototype.segmentDownloaded;tg.prototype.disable=tg.prototype.disable;tg.prototype.enable=tg.prototype.enable;
tg.prototype.chooseVariant=tg.prototype.chooseVariant;tg.prototype.init=tg.prototype.init;tg.prototype.release=tg.prototype.release;tg.prototype.stop=tg.prototype.stop;var xg=1;function yg(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(zg(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||zg(e))return!0}return!1}
function Ag(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}else zg(d)?c.push(d):zg(f)&&c.push(f)}return c}
function Dg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Eg(a){return a?!!a.match(/^com\.apple\.fps/):!1}function zg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var Fg=new Pb(function(){return Kb(new Uint8Array([0]))}),Gg=new Map;function Hg(a,b){var c=Ig();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.u=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function Ng(a){var b,c;return P(function(d){if(d.g==1){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new U(2,7,1010);b=a.g;a.g++;if(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.u);return G(d,new Promise(function(e){(new Df(e)).Y(c/1E3)}),2)}a.h*=a.m;I(d)})}function Ig(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Og(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Og.prototype.resolve=function(){};Og.prototype.reject=function(){};function Pg(a,b){this.promise=a;this.i=b;this.g=null}function Qg(a){return new Pg(Promise.reject(a),function(){return Promise.resolve()})}function Rg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new Pg(a,function(){return Promise.resolve()})}function Sg(a){return new Pg(Promise.resolve(a),function(){return Promise.resolve()})}function Tg(a){return new Pg(a,function(){return a.catch(function(){})})}Pg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function Ug(a){return new Pg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Pg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
Pg.prototype.bb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Vg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Og;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new Pg(f,function(){return d()})};
function Vg(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()}}}ea.Object.defineProperties(Pg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});S("shaka.util.AbortableOperation",Pg);Pg.prototype.chain=Pg.prototype.bb;Pg.prototype["finally"]=Pg.prototype.finally;
Pg.all=Ug;Pg.prototype.abort=Pg.prototype.abort;Pg.notAbortable=Tg;Pg.completed=Sg;Pg.aborted=Rg;Pg.failed=Qg;function Wg(){this.g=[]}function Xg(a,b){a.g.push(b.finally(function(){Qc(a.g,b)}))}Wg.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 Yg(a,b,c,d,e,f,g){kb.call(this);this.i=null;this.j=!1;this.A=new Wg;this.g=new Set;this.h=new Set;this.u=a||null;this.m=b||null;this.C=c||null;this.D=d||null;this.F=e||null;this.H=f||null;this.G=g||null;this.l=new Map}ma(Yg,kb);p=Yg.prototype;p.configure=function(a){this.i=a};function Zg(a,b,c,d){d=d===void 0?!1:d;c=c||$g;var e=ah.get(a);(!e||c>=e.priority)&&ah.set(a,{priority:c,Vf:b,Xl:d})}
function bh(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.$l=function(a){this.g.add(a)};p.Am=function(a){this.g.delete(a)};p.pk=function(){this.g.clear()};p.am=function(a){this.h.add(a)};p.Bm=function(a){this.h.delete(a)};p.qk=function(){this.h.clear()};p.Mi=function(){this.l.clear()};
function ch(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:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();kb.prototype.release.call(this);return this.A.destroy()};
p.request=function(a,b,c){var d=this,e=new dh;if(this.j){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new eh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Hd(b.retryParameters):Ig();b.uris=Hd(b.uris);f=fh(this,a,b,c);var g=f.bb(function(){return gh(d,a,b,c,new Hg(b.retryParameters,!1),0,null,e)}),h=g.bb(function(q){return hh(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.bb(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.Al||!d.u||u.fromCache||b.method=="HEAD"||a!=ih||d.u(u.timeMs,u.data.byteLength,jh(c),b,c);d.G&&d.G(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new eh(n.promise,function(){return n.abort()},e);Xg(this.A,f);return f};
function fh(a,b,c,d){function e(h){f=f.bb(function(){c.body&&(c.body=Kb(c.body));return h(b,c,d)})}var f=Sg(void 0);a.F&&e(a.F);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.bb(void 0,function(h){if(h instanceof U&&h.code==7001)throw h;throw new U(2,1,1006,h);})}
function gh(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new rb(c.uris[f]),l=k.lc,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=ah.get(l))?l.Vf:null;if(!n)return Qg(new U(2,1,1E3,k));var q=l.Xl;(k=a.l.get(k.Ib))&&(c.headers["common-access-token"]=k);var r=null,u=null,v=!1,w=!1,z;return Tg(Ng(e)).bb(function(){if(a.j)return Rg();
z=Date.now();var y=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(D,A,F){r&&r.stop();u&&u.Y(E/1E3);a.u&&b==ih&&(y++,c.packetNumber=y,a.u(D,A,jh(d),c,d),m=!0,h.g=F)},function(D){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(D,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return B;var C=c.retryParameters.connectionTimeout;C&&(r=new Df(function(){v=!0;B.abort()}),r.Y(C/1E3));var E=c.retryParameters.stallTimeout;E&&(u=new Df(function(){v=!0;B.abort()}));
return B}).bb(function(y){r&&r.stop();u&&u.stop();y.timeMs==void 0&&(y.timeMs=Date.now()-z);var B=y.headers["common-access-token"];if(B){var C=new rb(y.uri);a.l.set(C.Ib,B)}B={response:y,Al:m};!w&&a.m&&a.m(y.headers,c,b);a.C&&a.C(c,y);return B},function(y){r&&r.stop();u&&u.stop();if(a.D){var B=null,C=0;y instanceof U&&(B=y,y.code==1001&&(C=y.data[1]));a.D(c,B,C,v)}if(a.j)return Rg();v&&(y=new U(1,1,1003,c.uris[f],b));if(y instanceof U){if(y.code==7001)throw y;if(y.code==1010)throw g;if(y.severity==
1){B=(new Map).set("error",y);B=new T("retry",B);B.cancelable=!0;a.dispatchEvent(B);if(B.defaultPrevented)throw y;f=(f+1)%c.uris.length;return gh(a,b,c,d,e,f,y,h)}}throw y;})}
function hh(a,b,c,d){var e=Sg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Cj:void 0},f=a.next())g.Cj=f.value,e=e.bb(function(h){return function(){var k=c.response;k.data&&(k.data=Kb(k.data));return(0,h.Cj)(b,k,d)}}(g));return e.bb(function(){return c},function(h){var k=2;if(h instanceof U){if(h.code==7001)throw h;k=h.severity}throw new U(k,1,1007,h);})}function jh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.nd)return!1}return!0}S("shaka.net.NetworkingEngine",Yg);
Yg.prototype.request=Yg.prototype.request;Yg.prototype.destroy=Yg.prototype.destroy;Yg.makeRequest=ch;Yg.defaultRetryParameters=function(){return Ig()};Yg.prototype.clearCommonAccessTokenMap=Yg.prototype.Mi;Yg.prototype.clearAllResponseFilters=Yg.prototype.qk;Yg.prototype.unregisterResponseFilter=Yg.prototype.Bm;Yg.prototype.registerResponseFilter=Yg.prototype.am;Yg.prototype.clearAllRequestFilters=Yg.prototype.pk;Yg.prototype.unregisterRequestFilter=Yg.prototype.Am;
Yg.prototype.registerRequestFilter=Yg.prototype.$l;Yg.unregisterScheme=function(a){ah.delete(a)};Yg.registerScheme=Zg;Yg.prototype.configure=Yg.prototype.configure;function dh(){this.g=0}Yg.NumBytesRemainingClass=dh;function eh(a,b,c){Pg.call(this,a,b);this.h=c}ma(eh,Pg);Yg.PendingRequest=eh;var ih=1;Yg.RequestType={MANIFEST:0,SEGMENT:ih,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
Yg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var $g=3;Yg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:$g};var ah=new Map;function kh(a){this.g=!1;this.h=new Og;this.i=a}kh.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 lh(a,b){if(a.g){if(b instanceof U&&b.code==7003)throw b;throw new U(2,7,7003,b);}};function mh(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 nh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function oh(a,b){this.h=Nb(a);this.i=b==ph;this.g=0}p=oh.prototype;p.Pa=function(){return this.g<this.h.byteLength};p.Wa=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.ba=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw qh();}};p.Ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw qh();}};p.$=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw qh();}};
p.Rh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw qh();}};p.Td=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw qh();}if(b>2097151)throw new U(2,3,3001);this.g+=8;return b*4294967296+a};p.ac=function(a,b){if(this.g+a>this.h.byteLength)throw qh();var c=Jb(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw qh();this.g+=a};p.Dj=function(a){if(this.g<a)throw qh();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw qh();this.g=a};p.od=function(){for(var a=this.g;this.Pa()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=Jb(this.h,a,this.g-a);this.g+=1;return Vb(a)};function qh(){return new U(2,3,3E3)}S("shaka.util.DataViewReader",oh);oh.prototype.readTerminatedString=oh.prototype.od;oh.prototype.seek=oh.prototype.seek;oh.prototype.rewind=oh.prototype.Dj;
oh.prototype.skip=oh.prototype.skip;oh.prototype.readBytes=oh.prototype.ac;oh.prototype.readUint64=oh.prototype.Td;oh.prototype.readInt32=oh.prototype.Rh;oh.prototype.readUint32=oh.prototype.$;oh.prototype.readUint16=oh.prototype.Ia;oh.prototype.readUint8=oh.prototype.ba;oh.prototype.getLength=oh.prototype.getLength;oh.prototype.getPosition=oh.prototype.Wa;oh.prototype.hasMoreData=oh.prototype.Pa;var ph=1;oh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ph};function rh(){this.i=new Map;this.h=new Map;this.g=!1}p=rh.prototype;p.box=function(a,b){a=sh(a);this.i.set(a,th);this.h.set(a,b);return this};p.X=function(a,b){a=sh(a);this.i.set(a,uh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new oh(a,0);for(this.g=!1;a.Pa()&&!this.g;)this.Qd(0,a,b,c)};
p.Qd=function(a,b,c,d){var e=b.Wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.$(),g=b.$(),h=vh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Wa()+8>b.getLength()){this.g=!0;return}f=b.Td();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==uh){if(d&&b.Wa()+4>b.getLength()){this.g=!0;return}n=b.$();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Wa(),b=g>0?b.ac(g,!1):new Uint8Array(0),b=new oh(b,0),l({name:h,
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Wa(),b.getLength()-b.Wa()))}};function wh(a){for(var b=xh(a);a.reader.Pa()&&!a.parser.g;)a.parser.Qd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function yh(a){for(var b=xh(a),c=a.reader.$(),d=0;d<c&&(a.parser.Qd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
function zh(a){var b=xh(a);for(a.reader.skip(78);a.reader.Pa()&&!a.parser.g;)a.parser.Qd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Ah(a){var b=xh(a);a.reader.skip(8);var c=a.reader.Ia();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Pa()&&!a.parser.g;)a.parser.Qd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Bh(a,b){return function(c){a(c.reader.ac(c.reader.getLength()-c.reader.Wa(),b))}}
function sh(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 vh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function xh(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}S("shaka.util.Mp4Parser",rh);rh.headerSize=xh;rh.typeToString=vh;rh.allData=Bh;rh.audioSampleEntry=Ah;rh.visualSampleEntry=zh;rh.sampleDescription=yh;rh.children=wh;rh.prototype.parseNext=rh.prototype.Qd;rh.prototype.parse=rh.prototype.parse;
rh.prototype.stop=rh.prototype.stop;rh.prototype.fullBox=rh.prototype.X;rh.prototype.box=rh.prototype.box;var th=0,uh=1;function Ch(a){var b=this;this.g=[];this.h=[];this.data=[];(new rh).box("moov",wh).box("moof",wh).X("pssh",function(c){if(!(c.version>1)){var d=Jb(c.reader.h,-12,c.size);b.data.push(d);d=c.reader.ac(16,!1);b.g.push(jc(d));if(c.version>0){d=c.reader.$();for(var e=0;e<d;e++){var f=c.reader.ac(16,!1);f=jc(f);b.h.push(f)}}}}).parse(a)}
function Dh(a,b,c,d){var e=a.length,f=12+b.length+4+e;d>0&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Nb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;d<1?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(d>0)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=hc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Eh(a){var b=this;this.F=a;this.j=this.C=null;this.ha=this.R=!1;this.J=0;this.g=null;this.u=new Tc;this.i=new Map;this.V=[];this.D=new Map;this.K=!1;this.m=new Og;this.h=null;this.A=function(c){c.severity==2&&b.m.reject(c);a.onError(c)};this.Z=new Map;this.aa=new Map;this.L=new Df(function(){return Fh(b)});this.P=!1;this.M=[];this.W=!1;this.G=new Df(function(){Gh(b)});this.m.catch(function(){});this.l=new kh(function(){return Hh(b)});this.O=!1;this.H=this.I=null;this.T=function(){return!1}}
p=Eh.prototype;p.destroy=function(){return this.l.destroy()};function Hh(a){return P(function(b){switch(b.g){case 1:return a.u.release(),a.u=null,a.m.reject(),a.G.stop(),a.G=null,a.L.stop(),a.L=null,G(b,Ih(a),2);case 2:if(!a.j){b.B(3);break}sa(b,4);return G(b,a.j.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.j=null;case 3:a.g=null,a.C=null,a.D=new Map,a.h=null,a.A=function(){},a.F=null,a.O=!1,a.I=null,I(b)}})}
p.configure=function(a,b){this.h=a;b&&(this.T=b);this.G&&this.R&&this.g&&this.G.xa(this.h.updateExpirationTime)};function Jh(a,b,c){a.ha=!0;a.D=new Map;a.P=c;return Kh(a,b,!1)}
function Lh(a,b,c,d){d=d===void 0?!0:d;a.D=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.D.set(e.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.D.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.P=a.D.size>0;return Kh(a,b,d)}
function Mh(a,b,c,d,e,f){var g,h,k,l,m;return P(function(n){if(n.g==1)return g=[],f.length&&g.push(f[0].contentType),e.length&&g.push(e[0].contentType),h=function(q){q=nc(b,q,null);q.licenseServerUri=c;q.serverCertificate=d;q.persistentStateRequired=!0;q.sessionType="persistent-license";return q},k=sg(g),k.video&&(l=h(f[0].encryptionScheme||""),k.video.drmInfos.push(l)),k.audio&&(m=h(e[0].encryptionScheme||""),k.audio.drmInfos.push(m)),G(n,Sf([k],!0,a.O,[]),2);lh(a.l);return n.return(Nh(a,[k]))})}
function Kh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C;return P(function(E){if(E.g==1){Oh(a.h.clearKeys,b);d=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});e=mh(a.h.servers);f=mh(a.h.advanced||{});!d&&c&&Ph(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Qh(l),n=t(m),q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),Rh(r,e,f,a.h.keySystemsMapping));u=function(D,A){var F=[];D=t(D);for(var J=D.next();!J.done;J=
D.next()){J=J.value;var H=J[A]||f.has(J.keySystem)&&f.get(J.keySystem)[A]||"",K;if(K=H=="")K=(K=J.keySystem)?!!K.match(/^com\.widevine\.alpha/):!1;K&&(A=="audioRobustness"?H=[a.h.defaultAudioRobustnessForWidevine]:A=="videoRobustness"&&(H=[a.h.defaultVideoRobustnessForWidevine]));if(typeof H==="string")F.push(J);else if(Array.isArray(H))for(H.length===0&&(H=[""]),H=t(H),K=H.next();!K.done;K=H.next()){var L={};F.push(Object.assign({},J,(L[A]=K.value,L)))}}return F};v=new WeakSet;w=t(b);for(z=w.next();!z.done;z=
w.next())y=z.value,y.video&&!v.has(y.video)&&(y.video.drmInfos=u(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=u(y.video.drmInfos,"audioRobustness"),v.add(y.video)),y.audio&&!v.has(y.audio)&&(y.audio.drmInfos=u(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=u(y.audio.drmInfos,"audioRobustness"),v.add(y.audio));return G(E,Sf(b,a.P,a.O,a.h.preferredKeySystems),2)}lh(a.l);B=d||e.size>0;if(!B)return a.R=!0,E.return(Promise.resolve());C=Nh(a,b);return E.return(d?C:C.catch(function(){}))})}
function Sh(a){var b;return P(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c.return();if(!a.I){c.B(2);break}return G(c,a.I,3);case 3:return lh(a.l),c.return();case 2:return sa(c,4),a.I=a.j.setMediaKeys(a.C),G(c,a.I,6);case 6:ua(c,5);break;case 4:b=va(c),a.A(new U(2,6,6003,b.message));case 5:lh(a.l),I(c)}})}function Th(a,b){return P(function(c){if(c.g==1)return G(c,Sh(a),2);Uh(a,b.initDataType,Jb(b.initData));I(c)})}
p.cc=function(a){var b=this,c,d;return P(function(e){if(e.g==1){if(b.j===a)return e.return();if(!b.C)return b.u.ua(a,"encrypted",function(){b.A(new U(2,6,6010))}),e.return();b.j=a;b.h.delayLicenseRequestUntilPlayed&&b.u.ua(b.j,"play",function(){for(var f=t(b.M),g=f.next();!g.done;g=f.next())Vh(b,g.value);b.W=!0;b.M=[]});b.j.remote?(b.u.o(b.j.remote,"connect",function(){return Ih(b)}),b.u.o(b.j.remote,"connecting",function(){return Ih(b)}),b.u.o(b.j.remote,"disconnect",function(){return Ih(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.j&&b.u.o(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ih(b)});b.H=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=Qb().Jh(c))||!b.H&&b.g.keySystem==="com.apple.fps"&&!b.D.size?e.B(2):G(e,Sh(b),2)}Wh(b).catch(function(){});!d&&(b.H||b.D.size||b.h.parseInbandPsshEnabled)||b.u.o(b.j,"encrypted",function(f){return Th(b,f)});I(e)})};
function Xh(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=ch([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.F.Dc.request(5,b,{isPreload:a.T()});return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Jb(d.data);ua(g,4);break;case 3:throw e=va(g),new U(2,6,6017,e);case 4:if(a.l.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
sa(g,6);return G(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new U(2,6,6004,f.message);}})}function Yh(a,b){var c,d,e;return P(function(f){if(f.g==1)return G(f,Zh(a,b,{initData:null,initDataType:null}),2);if(f.g!=3){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Qb=new Og,d.push(e.Qb);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
function Wh(a){var b,c,d,e,f;return P(function(g){if(g.g==1){if(!a.D.size)return g.B(2);a.D.forEach(function(h,k){Zh(a,k,h)});return G(g,a.m,3)}if(g.g!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&$h(a))return g.return(a.m);a.K=!1;a.m=new Og;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Uh(a,f.initDataType,f.initData);ai(a)&&a.m.resolve();return g.return(a.m)})}
function Uh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Ib(c,e.value.initData))return;var f=!1;a.D.forEach(function(g){!f&&Ib(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;a.i.size>0&&ai(a)&&(a.m.resolve(),a.K=!1,a.m=new Og,a.m.catch(function(){}));bi(a,b,c,a.g.sessionType)}}function ci(a){a=a.i.keys();a=lb(a,function(b){return b.sessionId});return Array.from(a)}
p.nh=function(){var a=this,b=this.i.keys();b=lb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.pe=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};function di(a){return a.J?a.J:NaN}p.vf=function(){return nh(this.aa)};
function Nh(a,b){var c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:c=new Map;d=ei(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new U(2,6,6020);throw new U(2,6,6001);}lh(a.l);sa(l,2);d.getConfiguration();var m=e=a.h.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],r=[],u=[],v=[],w=[],z=new Set,y=new Set;fi(n,q,r,v,u,w,z,y);var B=a.P?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:r[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||B,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:u[0],initData:w,keyIds:z};y.size>0&&(m.keySystemUris=y);n=t(n);for(y=n.next();!y.done;y=n.next())y=y.value,y.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=y.distinctiveIdentifierRequired),y.persistentStateRequired&&(m.persistentStateRequired=y.persistentStateRequired);a.g=
m;if(!a.g.licenseServerUri)throw new U(2,6,6012,a.g.keySystem);return G(l,d.createMediaKeys(),4);case 4:f=l.h;lh(a.l);a.C=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.C)){l.B(5);break}sa(l,6);return G(l,a.C.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),8);case 8:g=l.h;if(g!="usable")throw new U(2,6,6018);lh(a.l);ua(l,5,2);break;case 6:h=va(l,2);if(h instanceof U)throw h;throw new U(2,6,6019,h.message);case 5:return a.R=!0,a.G.xa(a.h.updateExpirationTime),G(l,Xh(a),9);case 9:lh(a.l);
ua(l,0);break;case 2:k=va(l);lh(a.l,k);a.g=null;if(k instanceof U)throw k;throw new U(2,6,6002,k.message);}})}
function ei(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Qh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new U(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=mh(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={wj:void 0},g=e.next()){f.wj=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.wj}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.h.keySystemsMapping[l]&&(m=c.get(a.h.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function gi(a){ai(a)&&a.m.resolve()}function ii(a,b){(new Df(function(){b.loaded=!0;gi(a)})).Y(ji)}
function Zh(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:try{d=a.C.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.A(e),m.return(Promise.reject(e))}a.u.o(d,"message",function(n){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.M.push(n):Vh(a,n)});a.u.o(d,"keystatuseschange",function(n){return ki(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Mh:Infinity,Qb:null,type:"persistent-license"};a.i.set(d,f);sa(m,2);return G(m,
d.load(b),4);case 4:return g=m.h,lh(a.l),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.A(new U(h,6,6013)),f.loaded=!0),ii(a,f),gi(a),m.return(d);case 2:k=va(m),lh(a.l,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.A(new U(l,6,6005,k.message)),f.loaded=!0,gi(a);case 3:return m.return(Promise.resolve())}})}
function bi(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.A(new U(2,6,6005,f.message));return}a.u.o(e,"message",function(f){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.M.push(f):Vh(a,f)});a.u.o(e,"keystatuseschange",function(f){return ki(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Mh:Infinity,Qb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.A(b);return}a.h.logLicenseExchange&&ec(c);e.generateRequest(b,c).catch(function(f){if(!a.l.g){a.i.delete(e);
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.A(new U(2,6,6006,f.message,f,h))}})}function li(a){return P(function(b){return b.g==1?a.K?G(b,a.m,3):b.B(0):G(b,Promise.all(a.V.map(function(c){return c.promise})),0)})}
function Vh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z;P(function(y){switch(y.g){case 1:c=b.target;a.h.logLicenseExchange&&ec(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=ch([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);if(f&&
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(a.g.keySystem==="org.w3.clearkey"){var B=g,C=a.g;try{var E=Yb(B.body);if(E){var D=JSON.parse(E);D.type||(D.type=C.sessionType,B.body=Zb(JSON.stringify(D)))}}catch(A){}}if(Dg(a.g.keySystem))if(B=Wb(g.body,!0,!0),B.includes("PlayReadyKeyMessage")){B=Ld(B,"PlayReadyKeyMessage");C=Vd(B,"HttpHeader");C=t(C);for(E=C.next();!E.done;E=C.next())D=E.value,E=Vd(D,"name")[0],D=Vd(D,"value")[0],g.headers[Td(E)]=Td(D);B=Vd(B,"Challenge")[0];g.body=fc(Td(B))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();sa(y,2);m=a.F.Dc.request(2,g,{isPreload:a.T()});a.V.push(m);return G(y,m.promise,4);case 4:l=y.h;Qc(a.V,m);ua(y,3);break;case 2:n=va(y);if(a.l.g)return y.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new U(2,6,6007,n,q);a.i.size==1?(a.A(r),d&&d.Qb&&d.Qb.reject(r)):(d&&d.Qb&&d.Qb.reject(r),a.i.delete(c),ai(a)&&(a.m.resolve(),a.L.Y(.1)));return y.return();case 3:if(a.l.g)return y.return();a.J+=(Date.now()-
k)/1E3;a.h.logLicenseExchange&&ec(l.data);sa(y,5);return G(y,c.update(l.data),7);case 7:ua(y,6);break;case 5:return v=(u=va(y))&&u.message||String(u),w=new U(2,6,6008,v),a.A(w),d&&d.Qb&&d.Qb.reject(w),y.return();case 6:if(a.l.g)return y.return();z=new T("drmsessionupdate");a.F.onEvent(z);d&&(d.Qb&&d.Qb.resolve(),ii(a,d));I(y)}})}
function ki(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=Qb();if(Dg(a.g.keySystem)&&g.byteLength==16&&h.Xh()){h=Nb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=jc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Qb&&(a.i.delete(b),mi(b));ai(a)&&(a.m.resolve(),
a.L.Y(ni))}function Fh(a){var b=a.Z,c=a.aa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.A(new U(2,6,6014));a.F.Sf(nh(c))}
function oi(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N;return P(function(M){if(M.g==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&
window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return M.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];r=new Map;u=Qb();v=function(R,V,xa){var ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb,ob;return P(function(Ta){switch(Ta.g){case 1:return sa(Ta,2),G(Ta,V.createMediaKeys(),5);case 5:ba=Ta.h;case 4:ua(Ta,3);break;case 2:return va(Ta),Ta.return();case 3:Ha=(Oa=V.getConfiguration().sessionTypes)?
Oa.includes("persistent-license"):!1;u.oj()&&(Ha=!1);Ia=V.getConfiguration().videoCapabilities;Fa=V.getConfiguration().audioCapabilities;wa={persistentState:Ha,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.get(R)?wa=r.get(R):r.set(R,wa);(Ca=Ia[0].encryptionScheme)&&!wa.encryptionSchemes.includes(Ca)&&wa.encryptionSchemes.push(Ca);(Ma=Ia[0].robustness)&&!wa.videoRobustnessLevels.includes(Ma)&&wa.videoRobustnessLevels.push(Ma);(La=Fa[0].robustness)&&!wa.audioRobustnessLevels.includes(La)&&
wa.audioRobustnessLevels.push(La);if(!(xa&&"getStatusForPolicy"in ba)){Ta.B(0);break}Ba=t(f);eb=Ba.next();case 7:if(eb.done){Ta.B(0);break}hb=eb.value;if(wa.minHdcpVersions.includes(hb)){Ta.B(8);break}return G(Ta,ba.getStatusForPolicy({minHdcpVersion:hb}),10);case 10:if(ob=Ta.h,ob=="usable")wa.minHdcpVersions.includes(hb)||wa.minHdcpVersions.push(hb);else{Ta.B(0);break}case 8:eb=Ba.next(),Ta.B(7)}})};w=function(R,V,xa,ba,Oa){Oa=Oa===void 0?!1:Oa;var Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb,ob;return P(function(Ta){switch(Ta.g){case 1:sa(Ta,
2);Ha=Hd(n);Ia=t(Ha.videoCapabilities);for(Fa=Ia.next();!Fa.done;Fa=Ia.next())wa=Fa.value,wa.encryptionScheme=V,wa.robustness=xa;Ca=t(Ha.audioCapabilities);for(Ma=Ca.next();!Ma.done;Ma=Ca.next())La=Ma.value,La.encryptionScheme=V,La.robustness=ba;Ba=Hd(Ha);Ba.persistentState="required";Ba.sessionTypes=["persistent-license"];eb=[Ba,Ha];ob=Qb();return ob.Oa()=="MOBILE"?G(Ta,Hf(5,navigator.requestMediaKeySystemAccess(R,eb)),7):G(Ta,navigator.requestMediaKeySystemAccess(R,eb),6);case 6:hb=Ta.h;Ta.B(5);
break;case 7:hb=Ta.h;case 5:return G(Ta,v(R,hb,Oa),8);case 8:ua(Ta,0);break;case 2:va(Ta),I(Ta)}})};z=t(a);for(y=z.next();!y.done;y=z.next())B=y.value,r.set(B,null);C=function(R){return Qb().Ja()==="WEBKIT"&&R==="org.w3.clearkey"?!1:!0};E=[];D=t(a);for(A=D.next();!A.done;A=D.next())if(F=A.value,C(F)){J=!0;H=t(q);for(K=H.next();!K.done;K=H.next())L=K.value,E.push(w(F,L,"","",J)),J=!1;O=t(k[F]||[]);for(Q=O.next();!Q.done;Q=O.next())N=Q.value,E.push(w(F,null,N,"")),E.push(w(F,null,"",N))}return G(M,
Promise.all(E),2)}return M.return(nh(r))})}function mi(a){return P(function(b){if(b.g==1)return sa(b,2),G(b,Hf(pi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.g!=2)return ua(b,0);va(b);I(b)})}
function Ih(a){var b;return P(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value;var f=d.next().value;return P(function(g){if(g.g==1)return sa(g,2),a.ha||a.D.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?G(g,mi(e),5):G(g,e.remove(),5);if(g.g!=2)return ua(g,0);va(g);I(g)})})),0)})}function Qh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Gh(a){a.i.forEach(function(b,c){var d=b.Mh,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.Mh=e)})}function ai(a){a=a.i.values();return mb(a,function(b){return b.loaded})}function $h(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.Z.get(c.value)!=="usable")return!1;return!0}
function Ph(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
function fi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ta:void 0},l=a.next()){m.Ta=l.value;b.includes(m.Ta.encryptionScheme)||b.push(m.Ta.encryptionScheme);m.Ta.keySystem=="org.w3.clearkey"&&m.Ta.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ta.licenseServerUri)||k.push(m.Ta.licenseServerUri):c.includes(m.Ta.licenseServerUri)||c.push(m.Ta.licenseServerUri);e.includes(m.Ta.serverCertificateUri)||e.push(m.Ta.serverCertificateUri);m.Ta.serverCertificate&&
(d.some(function(r){return function(u){return Ib(u,r.Ta.serverCertificate)}}(m))||d.push(m.Ta.serverCertificate));if(m.Ta.initData){l=t(m.Ta.initData);for(var n=l.next(),q={};!n.done;q={Ch:void 0},n=l.next())q.Ch=n.value,f.some(function(r){return function(u){var v=r.Ch;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Ib(u.initData,v.initData)}}(q))||f.push(q.Ch)}if(m.Ta.keyIds)for(l=t(m.Ta.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ta.keySystemUris&&h)for(m=t(m.Ta.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==1)c.push(k[0]);else if(k.length>0){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function Rh(a,b,c,d){var e=a.keySystem;if(e&&(e!="org.w3.clearkey"||!a.licenseServerUri)){b.size&&b.get(e)&&(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.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__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function Oh(a,b){a=mh(a);if(a.size!=0){a=oc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var pi=1,ji=5,ni=.5;function qi(){this.g=ri;this.i=(new Map).set(ri,2).set(si,1);this.h=0}function wi(a,b){var c=a.g!==b;a.g=b;c&&b===ri&&(a.h=Date.now());return c}var si=0,ri=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function xi(a,b,c){this.g=a;this.i=b;this.h=c}function yi(a,b){return P(function(c){if(c.g==1)return G(c,Nf(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||Jf(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(lg))throw new U(2,4,4032);return c.return(zi(a,b))})}
function Ai(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Mf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function zi(a,b){var c=Ai(a,b);if(b){var d=a.h?a.h.g:null;if(d&&a.h.C){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())Bi(a,d.keySystem,f.value)}Ci(a,b)}return c}function Bi(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Uh(a.h,e.initDataType,e.initData)}}
function Ci(a,b){a=a.h?a.h.vf():{};var c=Object.keys(a);c=c.length&&c[0]=="00";var d=!1,e=!1,f=new Set,g=new Set,h=new Set;b=t(b.variants);for(var k=b.next();!k.done;k=b.next())k=k.value,k.audio&&h.add(k.audio),k.video&&h.add(k.video),k.allowedByApplication?k.allowedByKeySystem&&(d=!0):e=!0;h=t(h);for(b=h.next();!b.done;b=h.next())if(b=b.value,b.keyIds.size)for(b=t(b.keyIds),k=b.next();!k.done;k=b.next()){k=k.value;var l=a[c?"00":k];l?Di.includes(l)&&g.add(l):f.add(k)}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var Di=["output-restricted","internal-error"];function Ei(){}function Fi(a,b){Gi.set(a,b)}function Hi(){var a={};Qb();if(Ii())for(var b=t(Gi.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Ii()?Gi.has(c):Ji().canPlayType(c)!="";return a}function Ki(a,b){if(b){var c=Gi.get(b.toLowerCase());if(c)return c}throw new U(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Ei);
Ei.unregisterParserByMime=function(a){Gi.delete(a)};Ei.registerParserByMime=Fi;Ei.registerParserByExtension=function(){Zc("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ei.AccessibilityPurpose={On:"visually impaired",Ym:"hard of hearing",xn:"spoken subtitles"};var Gi=new Map;S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Li(a,b){var c=null,d=null,e=null,f=null,g=a.$();b&1&&(e=a.Td());b&2&&(f=a.$());b&8&&(c=a.$());b&16&&(d=a.$());return{trackId:g,le:c,me:d,lk:e,Ej:f}}function Mi(a,b){return b==1?(b=a.$(),a=a.$(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.$()}}function Ni(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.$();a.skip(4);a=a.Ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function Oi(a,b,c){var d=a.$(),e=[],f=null;c&1&&(f=a.Rh());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Zh:null,sampleSize:null,cg:null};c&256&&(h.Zh=a.$());c&512&&(h.sampleSize=a.$());c&1024&&a.skip(4);c&2048&&(h.cg=b==0?a.$():a.Rh());e.push(h)}return{Un:d,Yh:e,Tg:f}}function Pi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Ia();a.skip(2);a.skip(2);a.skip(2);a=a.Ia()+a.Ia()/65536;return{channelCount:b,sampleRate:a}}function Qi(a){a=a.$();return{codec:vh(a)}}
function Ri(a){var b=null,c=null,d=a.ac(4,!1);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if(e==="nclx"){switch(a.Ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Ia();a.Ia();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,Oe:c}}
function Si(a,b){b=b===void 0?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ti(a){return(a<10?"0":"")+a};function Ui(a){this.g=a}
function Vi(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Wi;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;g.type=="audio"&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Xi+1));m=Math.floor(m%(Xi+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Yi(h,4)),[0,0,0,0],x(Yi(n,4)),x(Yi(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Yi(k,2)),[0,0],x(Yi(l,
2)),[0,0]));h=Wi("tkhd",h);k=Wi;n=g.duration*g.timescale;l=Math.floor(n/(Xi+1));n=Math.floor(n%(Xi+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Yi(g.timescale,4)),x(Yi(l,4)),x(Yi(n,4)),x(Yi(m,2)),[0,0]));l=Wi("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Zi.value();break;case "audio":m=$i.value()}n=Wi("hdlr",m);a:{switch(g.type){case "video":g=Wi("minf",Wi("vmhd",aj.value()),
bj.value(),cj(g));break a;case "audio":g=Wi("minf",Wi("smhd",dj.value()),bj.value(),cj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=lc.apply(cc,x(b));f=a.g[0];c=Wi;d=f.duration*f.timescale;e=Math.floor(d/(Xi+1));d=Math.floor(d%(Xi+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Yi(f.timescale,4)),x(Yi(e,4)),x(Yi(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));e=Wi("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Yi(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Wi("trex",k),h.call(g,k);a=lc.apply(cc,x(d));a=Wi("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=lc.apply(cc,x(d))}else f=new Uint8Array([]);
a=c("moov",e,b,a,f);b=ej.value();c=new Uint8Array(b.byteLength+a.byteLength);c.set(b);c.set(a,b.byteLength);return c}
function cj(a){var b=Wi,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=Qb().He()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(a.Ya.byteLength>0)var e=Wi("avcC",a.Ya);else{e=Wi;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Gb.length;n++){var q=fj(a.Gb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
f+=q.length+2}}g.length>0&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Yi(c,2)),x(Yi(d,2)),[0,72,0,0,0,72,
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=gj(a);g=new Uint8Array([]);a.encrypted&&(g=hj(a.stream,a.codecs),d="encv");d=Wi(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),a.Ya.byteLength>0&&(c=Wi("hvcC",a.Ya)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Yi(d,2)),x(Yi(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,
100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=gj(a),g=new Uint8Array([]),a.encrypted&&(g=hj(a.stream,a.codecs),e="encv"),d=Wi(e,d,c,h,g));break;case "audio":if(c=="mp3")a=Wi(".mp3",ij(a));else if(c=="ac-3")c=Wi("dac3",a.Ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=hj(a.stream,a.codecs),d="enca"),a=Wi(d,ij(a),c,e);else if(c=="ec-3")c=Wi("dec3",a.Ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=hj(a.stream,a.codecs),d="enca"),
a=Wi(d,ij(a),c,e);else if(c=="opus")c=Wi("dOps",a.Ma),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=hj(a.stream,a.codecs),d="enca"),a=Wi(d,ij(a),c,e);else{if(a.Ma.byteLength>0)c=Wi("esds",a.Ma);else{c=Wi;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=pc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if(k==="mp4a.40.5"||k==="mp4a.40.29")h=l[g*2];g=parseInt(k.split(".").pop(),10);d=
new Uint8Array([0,0,0,0,3,25].concat(x(Yi(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=hj(a.stream,a.codecs),d="enca");a=Wi(d,ij(a),c,e)}d=a}a=Wi("stsd",jj.value(),d);return b("stbl",a,Wi("stts",kj.value()),Wi("stsc",lj.value()),Wi("stsz",mj.value()),Wi("stco",nj.value()))}
function gj(a){if(!a.eb&&!a.gb)return new Uint8Array([]);var b=a.gb;a=new Uint8Array([].concat(x(Yi(a.eb,4)),x(Yi(b,4))));return Wi("pasp",a)}function ij(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Yi(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function hj(a,b){var c=Wi;b=new Uint8Array([].concat(x(Yi(oj(b.split(".")[0]),4))));b=Wi("frma",b);var d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(Yi(oj(d),4)),[0,1,0,0]));d=Wi("schm",d);e=Wi;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=fj(h.value)}a=new Uint8Array([0,0,0,0,
0,0,1,8]);f=Wi("tenc",a,f);return c("sinf",b,d,e("schi",f))}
function pj(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Wi;var g=new Uint8Array([0,0,0,0].concat(x(Yi(c.data?c.data.sequenceNumber:0,4))));g=Wi("mfhd",g);var h;var k=c.data?c.data.Eb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.rb<<4|m.ub<<2|m.sb}k=Wi("sdtp",l);var n=k.length+32+20+8+16+8+8;l=Wi;h=new Uint8Array([0,0,0,58].concat(x(Yi(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Wi("tfhd",h);m=c.data?
c.data.baseMediaDecodeTime:0;var q=Math.floor(m%(Xi+1));m=new Uint8Array([1,0,0,0].concat(x(Yi(Math.floor(m/(Xi+1)),4)),x(Yi(q,4))));m=Wi("tfdt",m);var r=n;n=c.data?c.data.Eb:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);r+=8+u;v.set([c.type==="video"?1:0,0,15,1].concat(x(Yi(q,4)),x(Yi(r,4))),0);for(r=0;r<q;r++){var w=n[r];u=Yi(w.duration,4);var z=Yi(w.size,4),y=w.flags;w=Yi(w.Ab,4);v.set([].concat(x(u),x(z),[y.Cb<<2|y.rb,y.ub<<6|y.sb<<4|y.Db,y.qb&61440,y.qb&15],x(w)),12+16*r)}n=Wi("trun",v);k=
l("traf",h,m,n,k);f=f("moof",g,k);e.call(d,b,[f,qj(c)])}return lc.apply(cc,x(b))}function qj(a){a=(a.data?a.data.Eb:[]).map(function(b){return b.data});a=lc.apply(cc,x(a));return Wi("mdat",a)}function Yi(a,b){var c=[];for(--b;b>=0;b--)c.push(a>>8*b&255);return c}function fj(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[c*2]+a[c*2+1]),16);return b}function oj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function Wi(a){var b=Na.apply(1,arguments),c=rj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],rj.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
var Xi=4294967295,rj=new Map,Zi=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])}),$i=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),kj=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),lj=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),nj=new Pb(function(){return new Uint8Array([0,
0,0,0,0,0,0,0])}),mj=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),aj=new Pb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),dj=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),jj=new Pb(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),ej=new Pb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return Wi("ftyp",a,c,a,b)}),bj=new Pb(function(){var a=new Uint8Array([0,0,0,0,0,0,0,1,0,
0,0,12,117,114,108,32,0,0,0,1]);a=Wi("dref",a);return Wi("dinf",a)});function sj(a){a=Jb(a);var b=null;(new rh).box("moov",wh).box("trak",wh).box("mdia",wh).box("minf",wh).box("stbl",wh).X("stsd",yh).box("enca",function(c){b=c.reader.h;return Ah(c)}).box("sinf",wh).box("frma",function(c){c.parser.stop();Qi(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function tj(a,b,c){function d(r){n.push({box:r,qj:1701733217})}function e(r){n.push({box:r,qj:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);wh(r)}var h=b=Jb(b),k=!1,l,m=[],n=[];(new rh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).X("stsd",function(r){l=r;m.push(r);yh(r)}).X("encv",f).X("enca",f).X("dvav",e).X("dva1",e).X("dvh1",e).X("dvhe",e).X("dvc1",e).X("dvi1",e).X("hev1",e).X("hvc1",e).X("avc1",e).X("avc3",e).X("ac-3",d).X("ec-3",d).X("ac-4",
d).X("Opus",d).X("fLaC",d).X("mp4a",d).parse(b);if(k)return b;if(n.length==0||!l)throw ib(jc(b)),new U(2,3,3019,c);n.reverse();c=t(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=uj(a,h,l,q.box,m,q.qj);return Qb().zj()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function vj(a){a=Jb(a);var b=[];(new rh).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(wj(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return lc.apply(cc,x(c))}
function wj(a){function b(n){g.push(n);wh(n)}var c,d,e,f,g=[];(new rh).box("moof",b).box("traf",b).X("tfhd",function(n){c=n;e=Li(n.reader,n.flags)}).X("trun",function(n){d=n;f=Oi(n.reader,n.version,n.flags)}).parse(a);if(e&&e.Ej!==2){var h=c.start+xh(c)+4+(e.lk!==null?8:0),k=Nb(a);if(e.Ej!==null)k.setUint32(h,2);else{xj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&f.Tg!==null&&k.setInt32(d.start+xh(d)+4,f.Tg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;m>=0;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=t(g);for(k=h.next();!k.done;k=h.next())k=k.value,xj(a,k.start,k.size+4)}}return a}
function uj(a,b,c,d,e,f){var g=hj(a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Nb(a).setUint32(4,f);a.set(g,d.size);xj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=Qb().Cf()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,xj(f,e.start,e.size+a.byteLength);a=Nb(f,c.start);c=xh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function xj(a,b,c){a=Nb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function yj(a){function b(e){d.push({start:e.start,size:e.size});wh(e)}var c=Jb(a),d=[];(new rh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Nb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);h==1633889587?f.setUint32(g,1700998451):h==1684103987&&f.setUint32(g,1684366131)}}).parse(c);return c};function zj(a,b,c,d,e,f,g,h){this.S=a;this.startByte=b;this.endByte=c;this.Od=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}zj.prototype.Sc=function(){return this.startByte};zj.prototype.Qc=function(){return this.endByte};zj.prototype.Je=function(a){this.h=a};zj.prototype.hc=function(){return this.h};
function Aj(a,b){return a===b?!0:a&&b?a.Sc()==b.Sc()&&a.Qc()==b.Qc()&&Sc(a.S().sort(),b.S().sort())&&Ib(a.hc(),b.hc()):a==b}S("shaka.media.InitSegmentReference",zj);zj.prototype.getEndByte=zj.prototype.Qc;zj.prototype.getStartByte=zj.prototype.Sc;
function Bj(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=l===void 0?[]:l;r=r===void 0?Cj:r;this.startTime=a;this.j=this.endTime=b;this.D=c;this.startByte=d;this.endByte=e;this.ia=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.h=q===void 0?null:q;this.status=r;this.preload=!1;this.l=!0;this.u=!1;this.aesKey=u===void 0?null:u;this.thumbnailSprite=null;this.i=-1;this.m=v===void 0?!1:v;this.ye=this.nd=!1;a=t(this.g);
for(b=a.next();!b.done;b=a.next())b.value.mj();this.m&&this.g.length&&this.g[this.g.length-1].lj();this.A=this.bandwidth=this.mimeType=this.codecs=null;this.F=!1}p=Bj.prototype;p.S=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.Mk=function(){return this.endTime};p.Sc=function(){return this.startByte};p.Qc=function(){return this.endByte};
function Dj(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.m)for(a=t(a.g),a=a.next();!a.done;a=a.next()){Dj(a.value);break}return null}p.rl=function(){return this.tilesLayout};p.ql=function(){return this.C};p.Tc=function(){return this.status};p.Pl=function(){this.status=Ej};p.Ih=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.Nd=function(){this.l=!1};p.Fl=function(){return this.l};
p.mj=function(){this.nd=!0};p.Hl=function(){return this.nd};p.lj=function(){this.ye=!0};p.Gl=function(){return this.ye};p.kj=function(){this.u=!0};p.Bl=function(){return this.u};p.jg=function(a){this.thumbnailSprite=a};p.ol=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
p.oi=function(a){this.h==null?ab("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.Je=function(a,b){this.A=a;this.F=b===void 0?!1:b};p.hc=function(a){var b=this.A;(a===void 0||a)&&this.F&&(this.A=null);return b};function Fj(a,b){a.ia=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Fj(c.value,b)}S("shaka.media.SegmentReference",Bj);Bj.prototype.getSegmentData=Bj.prototype.hc;Bj.prototype.setSegmentData=Bj.prototype.Je;Bj.prototype.syncAgainst=Bj.prototype.oi;
Bj.prototype.offset=Bj.prototype.offset;Bj.prototype.getThumbnailSprite=Bj.prototype.ol;Bj.prototype.setThumbnailSprite=Bj.prototype.jg;Bj.prototype.hasByterangeOptimization=Bj.prototype.Bl;Bj.prototype.markAsByterangeOptimization=Bj.prototype.kj;Bj.prototype.isLastPartial=Bj.prototype.Gl;Bj.prototype.markAsLastPartial=Bj.prototype.lj;Bj.prototype.isPartial=Bj.prototype.Hl;Bj.prototype.markAsPartial=Bj.prototype.mj;Bj.prototype.isIndependent=Bj.prototype.Fl;Bj.prototype.markAsNonIndependent=Bj.prototype.Nd;
Bj.prototype.isPreload=Bj.prototype.isPreload;Bj.prototype.markAsPreload=Bj.prototype.Ih;Bj.prototype.markAsUnavailable=Bj.prototype.Pl;Bj.prototype.getStatus=Bj.prototype.Tc;Bj.prototype.getTileDuration=Bj.prototype.ql;Bj.prototype.getTilesLayout=Bj.prototype.rl;Bj.prototype.getEndByte=Bj.prototype.Qc;Bj.prototype.getStartByte=Bj.prototype.Sc;Bj.prototype.getEndTime=Bj.prototype.Mk;Bj.prototype.getStartTime=Bj.prototype.getStartTime;Bj.prototype.getUris=Bj.prototype.S;var Cj=0,Ej=1;
Bj.Status={Gm:Cj,Mn:Ej,jn:2};function Gj(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Hj(a){return!a||Gj(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Ij(a){return!a||Gj(a)?null:a.length?a.end(a.length-1):null}function Jj(a,b){return!a||!a.length||Gj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Kj(a,b){if(!a||!a.length||Gj(a))return 0;var c=0;a=t(Lj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
function Mj(a,b,c){if(!a||!a.length||Gj(a))return null;a=Lj(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function Lj(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 Nj(){}function W(a){return document.createElement(a)}function Oj(a){return document.createElementNS("http://www.w3.org/2000/svg",a)}function Pj(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Qj(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function Rj(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}
function Sj(a){a=a.getElementsByClassName("shaka-overflow-quality-mark");return a.length?a[0]:null}function Tj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function Ji(){if(Uj)return Uj;Vj||(Vj=new Df(function(){Uj=null}));(Uj=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Uj=document.createElement("video"));Vj.Y(1);return Uj}
function Wj(a,b){var c,d,e,f,g;return P(function(h){if(h.g==1)return"fonts"in document&&"FontFace"in window?G(h,document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);I(h)})}
S("shaka.util.Dom",Nj);Nj.removeAllChildren=Tj;Nj.clearSourceFromVideo=Rj;var Vj=null,Uj=null;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Xj(){}function Yj(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function Zj(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function ak(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
function bk(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=Vb(Jb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=Vb(Jb(a.data,3+c,f)),h;d==="--\x3e"?h=Vb(Jb(a.data,4+c+f)):h=Kb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==
3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=Vb(Jb(a.data,1,d));a=Vb(Jb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=Vb(Jb(a.data,1,d));a=Vb(Jb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=Vb(Jb(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Kb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=Vb(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=Vb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Kb(a.data),b):null}
function ck(a){for(var b=0,c=[];Yj(a,b);){var d=ak(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=ak(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=bk(e))&&c.push(f);b+=e.size+10}Zj(a,b)&&(b+=10)}return c}function dk(a,b){for(var c=b=b===void 0?0:b,d=0;Yj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=ak(a,b+6),Zj(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Xj);Xj.getID3Data=dk;
Xj.getID3Frames=ck;function ek(a){return(new Date(Date.UTC(1900,0,1,0,0,0,0)+a)).getTime()};/*

 Copyright Brightcove, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/
function fk(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=Jb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function gk(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);d!==0&&(c.set(a.j.subarray(b,b+d)),a.h=(new oh(c,0)).$(),a.g=d*8,a.i-=d)}function hk(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;gk(a)}a.h<<=b;a.g-=b}
function ik(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&gk(a);c=b-c;return c>0?d<<c|ik(a,c):d}function jk(a){var b;for(b=0;b<a.g;++b)if((a.h&2147483648>>>b)!==0)return a.h<<=b,a.g-=b,b;gk(a);return b+jk(a)}function kk(a){hk(a,1+jk(a))}function lk(a){var b=jk(a);return ik(a,b+1)-1}function mk(a){a=lk(a);return 1&a?1+a>>>1:-1*(a>>>1)}function nk(a){return ik(a,1)===1}function ok(a){return ik(a,8)}
function pk(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=mk(a),d=(c+d+256)%256),c=d===0?c:d}function qk(a){ok(a);lk(a);return lk(a)}S("shaka.util.ExpGolomb",fk);function rk(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.D=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.C=this.H=this.u=this.A=null}p=rk.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.gg=function(a){this.C!=null&&this.C!=a&&(this.u=this.A=null);this.C=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,sk(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Af:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(m>0)for(var n=h+5,q=m;q>2;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Xb(f.subarray(n+2,n+r));g.audio==-1&&u==="Opus"?(g.audio=l,g.audioCodec="opus"):g.video==-1&&u==="AV01"&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 127:g.audioCodec=="opus"&&(u=
null,f[n+2]===128&&(u=f[n+3]),u!=null&&(this.H={channelCount:(u&15)===0?2:u&15,nk:u,sampleRate:48E3}))}n+=r;q-=r}break;case 15:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.Af==-1&&(g.Af=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");
break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.K=f.video,this.m=f.videoCodec);f.audio!=-1&&(this.F=f.audio,this.D=f.audioCodec);f.Af!=-1&&(this.G=f.Af);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.F:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
function tk(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.A==null&&(a.A=e);c.pts=uk(e,a.A);a.A=c.pts;c.dts=c.pts;d&64&&(d=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.u==null&&(a.u=d),c.dts=c.pts!=
e?uk(d,a.u):d);a.u=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Wl=function(a){Zc("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Oh(a,{Be:null,state:null})};
p.Oh=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.m=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;f==-1&&(l=0,m=this.m=="hvc"?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(f===1)f=n?0:2;else if(n)if(n==1){n=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Be)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
g)),n>0&&(n=a.subarray(0,n),f.data=lc(f.data,n),f.fullData=lc(f.fullData,n),f.state=0);h<d?(m=this.m=="hvc"?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Be&&(c=k.length?k[k.length-1]:b.Be)&&(c.data=lc(c.data,a),c.fullData=lc(c.fullData,a));b.state=f;return k};
p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=lc.apply(cc,x(c.value)),(c=tk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:ck(c.data),dts:c.dts,pts:c.pts});return a};
p.Bb=function(){if(this.i.length&&!this.h.length)for(var a=t(this.i),b=a.next();!b.done;b=a.next()){var c=lc.apply(cc,x(b.value)),d=tk(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=lc(b.data,c),this.h.push(b))}return this.h};
p.Jd=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=t(this.j),c=b.next();!c.done;c=b.next()){var d=lc.apply(cc,x(c.value)),e=tk(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&e.pts!=null&&e.dts!=null&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=lc(c.data,d),this.g.push(c))}if(a){b={Be:null,state:null};c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Oh(e,b),e.nalus.length&&(c.push(e),
b.Be=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.Bb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Jd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.oe=function(){return{audio:this.D,video:this.m}};p.zf=function(){for(var a=[],b=t(this.Jd()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};
p.yl=function(){Zc("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.wh();return{height:a.height,width:a.width}};p.wh=function(){return this.m=="hvc"?vk(this):wk(this)};function xk(a){var b=a.Jd();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function wk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.zf();if(!c.length)return b;c=c.find(function(r){return r.type==7});if(!c)return b;c=new fk(c.data);var d=ok(c),e=ok(c),f=ok(c);kk(c);if(yk.includes(d)){var g=lk(c);g===3&&hk(c,1);kk(c);kk(c);hk(c,1);if(nk(c)){g=g!==3?8:12;for(var h=0;h<g;h++)nk(c)&&(h<6?pk(c,16):pk(c,64))}}kk(c);g=lk(c);if(g===0)lk(c);else if(g===1)for(hk(c,1),kk(c),kk(c),g=lk(c),h=0;h<g;h++)kk(c);kk(c);hk(c,1);g=lk(c);h=lk(c);var k=ik(c,1);k===0&&hk(c,1);
hk(c,1);var l=0,m=0,n=0,q=0;nk(c)&&(l=lk(c),m=lk(c),n=lk(c),q=lk(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=xk(a);return b}
function vk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.zf();if(!c.length)return b;c=c.find(function(E){return E.type==33});if(!c)return b;var d=new fk(c.fullData,!0);ok(d);ok(d);ik(d,4);var e=ik(d,3);nk(d);var f=ik(d,2),g=ik(d,1),h=ik(d,5),k=ik(d,32);c=ok(d);for(var l=ok(d),m=ok(d),n=ok(d),q=ok(d),r=ok(d),u=ok(d),v=[],w=[],z=0;z<e;z++)v.push(nk(d)),w.push(nk(d));if(e>0)for(z=e;z<8;z++)ik(d,2);for(z=0;z<e;z++)v[z]&&ik(d,88),w[z]&&ok(d);lk(d);e=lk(d);e==3&&ik(d,1);v=lk(d);w=lk(d);
var y=z=0,B=0,C=0;nk(d)&&(z+=lk(d),y+=lk(d),B+=lk(d),C+=lk(d));b.width=String(v-(z+y)*(e===1||e===2?2:1));b.height=String(w-(B+C)*(e===1?2:1));d=function(E){for(var D=0,A=0;A<32;A++)D|=(E>>A&1)<<31-A;return D>>>0}(k);g=g==1?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=xk(a);return b}function uk(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function zk(a){return sk(a)<0?!1:!0}function sk(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;c++}return-1}S("shaka.util.TsParser",rk);rk.syncOffset=sk;rk.probe=zk;rk.prototype.getVideoInfo=rk.prototype.wh;rk.prototype.getVideoResolution=rk.prototype.yl;
rk.prototype.getVideoNalus=rk.prototype.zf;rk.prototype.getCodecs=rk.prototype.oe;rk.prototype.getStartTime=rk.prototype.getStartTime;rk.prototype.getVideoData=rk.prototype.Jd;rk.prototype.getAudioData=rk.prototype.Bb;rk.prototype.getMetadata=rk.prototype.getMetadata;rk.prototype.parseNalus=rk.prototype.Oh;rk.prototype.parseAvcNalus=rk.prototype.Wl;rk.prototype.parse=rk.prototype.parse;rk.prototype.setDiscontinuitySequence=rk.prototype.gg;rk.prototype.clearData=rk.prototype.clearData;
rk.Timescale=9E4;var yk=[100,110,122,244,44,83,86,118,128,138,139,134];function Ak(a,b,c,d,e){var f=this;this.g=a;this.O=c;this.C=d;this.Z=b;this.l=new Map;this.F=new Map;this.La=new Map;this.h=null;this.Ca=!1;this.H=e||null;this.u=new Map;this.A=new Tc;this.j=new Map;this.J=null;this.L=new Og;this.ya="";this.jb=!1;this.sa=!0;this.M=!1;this.D=this.P=null;this.i=Bk(this,this.L);this.hb=this.G=!1;this.K=new kh(function(){return Ck(f)});this.I=!1;this.V="UNKNOWN";this.fb=this.ib=!1;this.Na=new Og;this.m=!1;this.ra=null;this.W=new Map;this.ha=this.R=this.oa=this.T=null;
this.aa=new Og;this.g.remote&&(this.M=this.g.remote.state!="disconnected",this.A.o(this.g.remote,"connect",function(){f.M=f.g.remote.state!="disconnected"}),this.A.o(this.g.remote,"connecting",function(){f.M=f.g.remote.state!="disconnected"}),this.A.o(this.g.remote,"disconnect",function(){f.M=f.g.remote.state!="disconnected"}))}
function Bk(a,b){a.sa=!0;if(window.ManagedMediaSource){a.D||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.A.o(c,"startstreaming",function(){a.sa=!0});a.A.o(c,"endstreaming",function(){a.sa=!1})}else c=new MediaSource;a.A.ua(c,"sourceopen",function(){URL.revokeObjectURL(a.ya);b.resolve()});a.A.ua(a.g,"playing",function(){a.jb=!0});a.ya=Dk(c);a.C.useSourceElements?(a.g.removeAttribute("src"),a.P&&a.g.removeChild(a.P),a.D&&a.g.removeChild(a.D),a.P=Qj(a.ya),a.g.appendChild(a.P),a.D&&a.g.appendChild(a.D),
a.g.load()):a.g.src=a.ya;return c}function Ek(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.C.useSourceElements&&(a.D&&a.g.removeChild(a.D),a.D=Qj(b,c),a.g.appendChild(a.D),a.g.disableRemotePlayback=!1)}
function Fk(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(ef)),b=
{};Qb();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(tf(c))b[c]=!0;else if(Ii()){var d=mf(c),e=Zf(nf(c),d);d=df(d,e);b[c]=gd(d)||(Ye(d)?!0:!1)}else b[c]=Ji().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=Ak.prototype;p.destroy=function(){return this.K.destroy()};
function Ck(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v;return P(function(w){if(w.g==1){b=[];c=t(a.u);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.u.set(l,h.slice(0,1)),k&&b.push(k.p.catch(Ff)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new U(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return G(w,Promise.all(b),2)}r=t(a.j.values());for(u=r.next();!u.done;u=r.next())v=u.value,v.destroy();a.A&&(a.A.release(),a.A=null);a.g&&a.D&&
a.g.removeChild(a.D);a.g&&a.P&&(a.g.removeChild(a.P),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.P=null;a.D=null;a.C=null;a.i=null;a.h=null;a.Z=null;a.l.clear();a.La.clear();a.j.clear();a.J=null;a.u.clear();a.H=null;a.W.clear();a.O=null;I(w)})}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return P(function(n){if(n.g==1)return f=uc,G(n,e.L,2);if(n.g!=3){if(!Gk(e)&&!Hk(e))return n.B(3);ab("Expected MediaSource to be open during init(); reopening the media source.");e.L=new Og;e.i=Bk(e,e.L);return G(n,e.L,3)}e.I=b;e.V=c;e.ib=d;e.fb=!e.I&&e.V=="HLS"&&!e.ib;e.W.clear();e.T=null;e.oa=null;e.R=null;e.ha=null;e.aa=new Og;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),
Ik(e,k,l,l.codecs),e.m?(e.u.set(f.na,[]),e.u.set(f.Ha,[])):e.u.set(k,[]);(m=a.get(f.na))&&m.isAudioMuxedInVideo&&(e.m=!0);I(n)})};
function Ik(a,b,c,d){b=="audio"&&d&&(d=Zf(d,c.mimeType));var e=df(c.mimeType,d);if(b==sc)Jk(a,e,a.I,c.external);else{var f=a.C.forceTransmux;if(!gd(e)||!a.I&&ef.includes(e))f=!0;var g=ff(c.mimeType,d);if(f){f=qc("audio",(d||"").split(","));d=qc("video",(d||"").split(","));if(f&&d){a.m=!0;Ik(a,"audio",c,f);Ik(a,"video",c,d);return}if(d=Ye(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.C.addExtraFeaturesToSourceBuffer(e);lh(a.K);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new U(2,3,3015,k,"The mediaSource_ status was "+
a.i.readyState+" expected 'open'",null);}a.I&&(h.mode=Kk);a.A.o(h,"error",function(){var k=a.u.get(b)[0];k.p.reject(new U(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.A.o(h,"updateend",function(){return Lk(a,b)});a.l.set(b,h);a.F.set(b,e);a.La.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.C=a;this.h&&(this.h.C=a.modifyCueCallback)};function Nk(a){return a.sa&&!a.M&&!a.G}
function Jk(a,b,c,d){a.h||(a.h=new pf(a.Z),a.h&&(a.h.C=a.C.modifyCueCallback));var e=a.h;d=d||a.Ca;a=a.V;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=rf.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):Zc("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Zc("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.D=d)}
function Gk(a){return a.G?!1:a.i?a.i.readyState=="ended":!0}function Hk(a){return a.G?!1:a.i?a.i.readyState=="closed":!0}function Ok(a,b){return a.l.size?b==sc?a.h.g:Hj(Pk(a,b)):null}function Qk(a,b){return a.l.size?b==sc?a.h.h:Ij(Pk(a,b)):null}function Rk(a,b,c){if(b==sc)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=Pk(a,b);return Kj(a,c)}
p.Pc=function(){var a={total:this.G?[]:Lj(this.g.buffered),audio:Lj(Pk(this,"audio")),video:Lj(Pk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function Pk(a,b){if(a.G||a.M)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function Sk(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=Jb(c);if(ef.includes(f))c=ck(l),c.length&&d&&((g=c.find(function(u){return u.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.O.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.ia){l=new rh;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.C.dispatchAllEmsgBoxes;m&&l.X("emsg",
function(u){var v=e.emsgSchemeIdUris;if(u.version===0){var w=u.reader.od();var z=u.reader.od();var y=u.reader.$();var B=u.reader.$();var C=u.reader.$();var E=u.reader.$();var D=d.startTime+B/y}else y=u.reader.$(),D=u.reader.Td()/y+d.timestampOffset,B=D-d.startTime,C=u.reader.$(),E=u.reader.$(),w=u.reader.od(),z=u.reader.od();u=u.reader.ac(u.reader.getLength()-u.reader.Wa(),!0);if(v&&v.includes(w)||a.C.dispatchAllEmsgBoxes)if(w=="urn:mpeg:dash:event:2012")a.O.Vl();else if(v=D+C/y,a.O.Tl({startTime:D,
endTime:v,schemeIdUri:w,value:z,timescale:y,presentationTimeDelta:B,eventDuration:C,id:E,messageData:u}),w=="https://aomedia.org/emsg/ID3"||w=="https://developer.apple.com/streaming/emsg-id3")if(y=ck(u),y.length)a.O.onMetadata([{cueTime:D,data:u,frames:y,dts:D,pts:D}],0,v)});var n=d.ia.timescale;b=n&&!isNaN(n);var q=0,r=!1;b&&l.X("prft",function(u){var v=u.reader,w=u.version;v.$();u=v.$();var z=v.$();u=u*1E3+z/4294967296*1E3;w===0?v=v.$():(w=v.$(),v=v.$(),v=w*4294967296+v);u=ek(u);v=(new Map).set("detail",
{wallClockTime:u,programStartDate:new Date(u-v/n*1E3)});v=new T("prft",v);a.O.onEvent(v)}).box("moof",wh).box("traf",wh).X("tfdt",function(u){r||(q=Mi(u.reader,u.version).baseMediaDecodeTime/n,r=!0,m||u.parser.stop())});(m||b)&&l.parse(c,!1,g);r&&d.timestampOffset==0&&(h=q)}else f.includes("/mp4")||f.includes("/webm")||!zk(l)||(a.W.has(b)||a.W.set(b,new rk),k=a.W.get(b),k.clearData(),k.gg(d.i),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function Tk(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N;return P(function(M){switch(M.g){case 1:n=uc;if(b!=n.Va){M.B(2);break}if(a.V!="HLS"){M.B(3);break}return G(M,a.Na,4);case 4:q=M.h,a.h.A=q;case 3:return G(M,uf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null),5);case 5:return M.return();case 2:if(l||!a.m){M.B(6);break}return G(M,Tk(a,n.na,c,d,e,f,g,h,k,!0),7);case 7:return G(M,Tk(a,n.Ha,
c,d,e,f,g,h,k,!0),8);case 8:return M.return();case 6:if(!a.l.has(b))return M.return();r=a.l.get(b).timestampOffset;u=a.F.get(b);a.j.has(b)&&(u=a.j.get(b).getOriginalMimeType());if(d&&(v=Sk(a,b,c,d,e,u,k),w=v.timestamp,z=v.metadata,w!=null&&(a.T==null&&b==n.Ha&&(a.T=w,a.oa=d.startTime,a.R!=null&&(y=0,a.oa==a.ha&&(y=a.T-a.R),a.aa.resolve(y))),a.R==null&&b==n.na&&(a.R=w,a.ha=d.startTime,a.T!=null&&(B=0,a.oa==a.ha&&(B=a.T-a.R),a.aa.resolve(B))),C=w,E=ef,!a.I&&E.includes(a.F.get(b))&&(C=0),D=d.startTime-
C,A=Math.abs(r-D),(A>=.001||g||h)&&(!k||D>0||!r)&&(r=D,a.fb&&(Uk(a,b,function(){return Vk(a,b)},null),Uk(a,b,function(){return Wk(a,b,r)},null))),(F=b==n.Ha||!a.l.has(n.Ha))&&a.Na.resolve(r)),z.length))a.O.onMetadata(z,r,d?d.endTime:null);f&&b==n.Ha&&(a.h||Jk(a,"application/cea-608",a.I,!1),a.J||(J=u.split(";",1)[0],a.J=new od(J)),d?(H=a.J.Uf(c),H.length&&Bf(a.h,H,r)):a.J.init(c,h,m));if(!a.j.has(b)){M.B(9);break}return G(M,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:K=M.h,ArrayBuffer.isView(K)?
c=K:(L=K,L.init!=null&&(O=L.init,Uk(a,b,function(){a.H&&dd(a.H,O,r,e);a.l.get(b).appendBuffer(O)},d?d.S()[0]:null)),c=L.data);case 9:c=Xk(a,e,c,d,b);if(!d||!a.I||b==n.Va){M.B(11);break}if(!g&&!h){M.B(11);break}Q=d.startTime;if(a.V!="HLS"||a.m||b!=n.na||!a.l.has(n.Ha)){M.B(13);break}return G(M,a.aa,14);case 14:N=M.h,Math.abs(N)>.15&&(Q-=N);case 13:Uk(a,b,function(){return Vk(a,b)},null),Uk(a,b,function(){return Wk(a,b,Q)},null);case 11:return G(M,Uk(a,b,function(){var R=c;a.H&&dd(a.H,R,r,e);a.l.get(b).appendBuffer(R)},
d?d.S()[0]:null),15);case 15:I(M)}})}function Yk(a,b){var c=Qk(a,"video")||0;zf(a.h,b,c)}function Zk(a){a.h&&zf(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return P(function(h){return h.g==1?(f=uc,a==f.Ha&&e.J&&(e.J.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Va?G(h,e.h.remove(b,c),0):c>b?G(h,Uk(e,a,function(){return $k(e,a,b,c)},null),5):h.B(0)):e.m?G(h,Uk(e,f.na,function(){return $k(e,f.na,b,c)},null),0):h.B(0)})};
function al(a,b){var c;return P(function(d){return d.g==1?(c=uc,b==c.Va?a.h?G(d,a.h.remove(0,Infinity),0):d.return():b===c.Ha&&a.J&&a.h?G(d,a.h.remove(0,Infinity,!0),4):d.B(4)):d.g!=6?G(d,Uk(a,b,function(){return $k(a,b,0,a.i.duration)},null),6):a.m?G(d,Uk(a,c.na,function(){return $k(a,c.na,0,a.i.duration)},null),0):d.B(0)})}
p.flush=function(a){var b=this,c;return P(function(d){return d.g==1?(c=uc,a==c.Va?d.return():G(d,Uk(b,a,function(){b.g.currentTime-=.001;Lk(b,a)},null),2)):b.m?G(d,Uk(b,c.na,function(){var e=c.na;b.g.currentTime-=.001;Lk(b,e)},null),0):d.B(0)})};
function bl(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(q){if(q.g==1){l=uc;if(b==l.Va)return f||(a.h.A=c),yf(a.h,d,e),q.return();m=[];return G(q,cl(a,b,g,h,k),2)}n=q.h;n||(m.push(Uk(a,b,function(){return Vk(a,b)},null)),a.m&&m.push(Uk(a,l.na,function(){return Vk(a,l.na)},null)));f||(m.push(Uk(a,b,function(){return Wk(a,b,c)},null)),a.m&&m.push(Uk(a,l.na,function(){return Wk(a,l.na,c)},null)));if(d!=0||e!=Infinity)m.push(Uk(a,b,function(){return dl(a,b,d,e)},null)),a.m&&m.push(Uk(a,l.na,function(){return dl(a,
l.na,d,e)},null));return m.length?G(q,Promise.all(m),0):q.B(0)})}function el(a,b,c){var d,e;return P(function(f){if(f.g==1){d=uc;if(b==d.Va)return f.return();b==d.Ha&&(a.Na=new Og);if(!a.I||(e=Qk(a,b))&&Math.abs(e-c)<.15)return f.return();Uk(a,b,function(){return Vk(a,b)},null);a.m&&Uk(a,d.na,function(){return Vk(a,d.na)},null);return G(f,Uk(a,b,function(){return Wk(a,b,c)},null),2)}return a.m?G(f,Uk(a,d.na,function(){return Wk(a,d.na,c)},null),0):f.B(0)})}
p.endOfStream=function(a){var b=this;return P(function(c){return G(c,fl(b,function(){Gk(b)||Hk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.Fb=function(a){var b=this;return P(function(c){return G(c,fl(b,function(){if(b.C.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new Og,uri:null};b.u.get(e).unshift(f)}b.i.duration=a;b.ra=a}),0)})};p.getDuration=function(){return this.i.duration};
function gl(a,b,c){P(function(d){return a.K.g||a.g.error||a.M||a.G||Gk(a)||Hk(a)?d.return():G(d,fl(a,function(){Gk(a)||Hk(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function hl(a){P(function(b){return a.K.g||a.g.error||a.M||a.G||Gk(a)||Hk(a)?b.return():G(b,fl(a,function(){Gk(a)||Hk(a)||a.i.clearLiveSeekableRange()}),0)})}function $k(a,b,c,d){d<=c?Lk(a,b):a.l.get(b).remove(c,d)}
function Vk(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Lk(a,b)}function Wk(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;Lk(a,b)}function dl(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;Lk(a,b)}
function Lk(a,b){if(a.G||a.K.g){var c=a.u.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.u.set(b,[]))}else if(c=a.u.get(b)[0])c.p.resolve(),il(a,b)}function Uk(a,b,c,d){lh(a.K);c={start:c,p:new Og,uri:d};a.u.get(b).push(c);a.u.get(b).length==1&&jl(a,b);return c.p}
function fl(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u;return P(function(v){switch(v.g){case 1:lh(a.K);c=[];d=Array.from(a.l.keys());e=t(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new Og,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},l=a.u.get(h),l.push(k),c.push(g.ready),l.length==1&&k.start();sa(v,2);return G(v,Promise.all(c),4);case 4:ua(v,3);break;case 2:throw m=va(v),m;case 3:return sa(v,5,6),G(v,b(),6);case 6:ya(v);n=t(d);for(q=
n.next();!q.done;q=n.next())r=q.value,il(a,r);za(v,0);break;case 5:throw u=va(v),new U(2,3,3015,u,a.g.error||"No error in the media element",null);}})}function il(a,b){a.u.get(b).shift();jl(a,b)}function jl(a,b){var c=a.u.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new U(2,3,3017,b)):Nk(a)?c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new U(2,3,3024,b)),il(a,b)}}function kl(a,b){a.Z=b;a.h&&(a.h.l=b)}
function Xk(a,b,c,d,e){if(hf(a.F.get(e))!="mp4")return c;var f=d===null,g=a.La.get(e),h=a.O.Qk(),k=!1;d&&d.ia&&(k=d.ia.encrypted);d=d?d.S()[0]:null;var l=Qb();a.C.correctEc3Enca&&f&&e==="audio"&&(c=sj(c));a.C.insertFakeEncryptionInInit&&g&&l.Ud(h,e)&&(f?c=tj(b,c,d):!k&&l.Aj(e)&&(c=vj(c)));f&&l.He()&&(c=yj(c));return c}
function ll(a,b,c,d){return Uk(a,b,function(){if(b!==sc){a.F.get(b);if(id()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.C.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.F.set(b,c)}Lk(a,b)}},null)}
function ml(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E;return P(function(D){if(D.g==1){if(a.G||a.M)return D.return();c=uc;a.G=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.hb=!0);a.jb&&(a.g.autoplay=!1);ta(D,2);a.A.Sa();f=t(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(A){}}a.j.clear();a.l.clear();n=a.i.duration;a.L=new Og;a.i=Bk(a,a.L);return G(D,a.L,4)}if(D.g!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.ra)&&a.ra&&(a.i.duration=a.ra);q=new Og;r=a.i.sourceBuffers;u=b.size;v=0;w=function(){v++;v===u&&(q.resolve(),a.A.Fa(r,"addsourcebuffer",w))};a.A.o(r,"addsourcebuffer",w);z=t(b.keys());for(y=z.next();!y.done;y=z.next())B=y.value,C=b.get(B),Ik(a,B,C,C.codecs);(E=b.get(c.na))&&E.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.u.has(c.na)&&a.u.set(c.na,[]);a.g.currentTime=d;return G(D,q,2)}ya(D);a.G=!1;lh(a.K);a.A.ua(a.g,"canplaythrough",function(){a.K.g||(a.g.autoplay=
e,a.hb&&(a.hb=!1,a.g.play()))});return za(D,0)})}function nl(a,b){return fl(a,function(){return ml(a,b)})}function ol(a,b,c,d){var e=!1,f=qc("audio",(d||"").split(",")),g=qc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);d=df(c,h);var k=mf(a.F.get(b)),l=a.C.forceTransmux;!gd(d)||!a.I&&ef.includes(d)?l=!0:l||c==k||(l=!Qb().lg()&&ef.includes(c));if(l&&(a=ff(c,h),c=Ye(a))){var m=c();f&&g&&(e=!0);d=m.convertCodecs(b,a)}b=jf(nf(d));return{qc:m,zm:e,Hi:mf(d),codec:b,mimeType:d}}
function pl(a,b,c,d,e){if(b==sc)return{type:ql,Pf:c,qc:null};var f=jf(nf(a.F.get(b))),g=mf(a.F.get(b)),h=ol(a,b,c,d),k=h.qc,l=h.zm,m=h.Hi,n=h.codec;h=h.mimeType;var q=!0;l&&a.F.has("audio")&&(c=ol(a,"audio",c,d),d=jf(nf(a.F.get("audio"))),q=mf(a.F.get("audio")),q=d==c.codec&&q==c.Hi,c.qc&&c.qc.destroy());if(f===n&&g===m&&q)return{type:ql,Pf:h,qc:k};f=!0;if(a.m&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;if(f&&a.C.codecSwitchingStrategy==="smooth"&&id())return{type:rl,Pf:h,qc:k};k&&k.destroy();return{type:sl,
Pf:h,qc:null}}function cl(a,b,c,d,e){var f,g,h,k,l,m;return P(function(n){if(n.g==1){f=uc;g=pl(a,b,c,d,e);h=g.type;k=g.qc;l=g.Pf;if(m=e.get(f.na))a.m=m.isAudioMuxedInVideo;if(h==ql)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==rl)return G(n,ll(a,b,l,k),3);if(h!=sl)return n.B(3);k&&k.destroy();return G(n,nl(a,e),3)}return n.return(!0)})}
function tl(a,b,c,d,e){a=pl(a,b,c,d,e);a.qc&&a.qc.destroy();return a.type==sl}var Dk=window.URL.createObjectURL,Kk="sequence",ql="none",sl="reset",rl="changeType";function Cl(a,b,c){this.i=a;this.F=b;this.A=this.l=Infinity;this.h=1;this.g=this.j=null;this.C=0;this.D=!0;this.J=!1;this.I=0;this.G=c===void 0?!0:c;this.H=0;this.u=!1;this.m=a}p=Cl.prototype;p.getDuration=function(){return this.l};p.Wk=function(){return this.h};p.Nj=function(a){this.i=a};p.Fb=function(a){this.l=a};p.cl=function(){return this.i};p.Kj=function(a){this.C=a};p.sd=function(a){a&&!this.D&&(this.J=!0);this.D=a};p.hg=function(a){this.A=a};p.yf=function(){return this.A};
p.bi=function(a){this.F=a};p.Lk=function(){return this.F};p.tj=function(a,b){if(a.length!=0){var c=(Date.now()+this.C)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.Qf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.G&&!this.u&&(this.i=c-this.g-this.h)}}};
p.Ce=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.C)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.Qf(b);this.g=Math.max(this.g,c);this.i!=null&&this.G&&!this.u&&(this.i=d-this.g-this.h)}};p.sj=function(a,b){this.Qf(a);b==Infinity||this.U()||(this.g=Math.max(this.g,b))};p.Xk=function(){return this.g};p.Kf=function(){this.u=!0};
p.Jl=function(){return this.u};p.di=function(a){this.m=a};p.Pk=function(){return this.m};p.Qf=function(a){this.j==null?this.j=a:this.J||(this.j=Math.min(this.j,a))};p.Kh=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.U=function(){return this.l==Infinity&&!this.D};p.ld=function(){return this.l!=Infinity&&!this.D};p.Mb=function(){return Math.max(this.I,this.Rc()-this.A)};p.Pj=function(a){this.I=a};
p.Rc=function(){return this.U()||this.ld()?Math.min(Math.max(0,(Date.now()+this.C)/1E3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l};p.qe=function(a){var b=Math.max(this.j,this.I);return this.A==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.Rc()-this.A+a,this.Lb()))};p.fc=function(){return this.qe(0)};p.Lb=function(){return Math.max(0,this.Rc()-(this.U()||this.ld()?this.F:0))};p.dk=function(){return this.i==null||this.g!=null&&this.G?!1:!0};
p.Jj=function(a){this.H=a};p.Bk=function(){return this.H};S("shaka.media.PresentationTimeline",Cl);Cl.prototype.getAvailabilityTimeOffset=Cl.prototype.Bk;Cl.prototype.setAvailabilityTimeOffset=Cl.prototype.Jj;Cl.prototype.usingPresentationStartTime=Cl.prototype.dk;Cl.prototype.getSeekRangeEnd=Cl.prototype.Lb;Cl.prototype.getSeekRangeStart=Cl.prototype.fc;Cl.prototype.getSafeSeekRangeStart=Cl.prototype.qe;Cl.prototype.getSegmentAvailabilityEnd=Cl.prototype.Rc;Cl.prototype.setUserSeekStart=Cl.prototype.Pj;
Cl.prototype.getSegmentAvailabilityStart=Cl.prototype.Mb;Cl.prototype.isInProgress=Cl.prototype.ld;Cl.prototype.isLive=Cl.prototype.U;Cl.prototype.offset=Cl.prototype.offset;Cl.prototype.notifyMaxSegmentDuration=Cl.prototype.Kh;Cl.prototype.notifyMinSegmentStartTime=Cl.prototype.Qf;Cl.prototype.getInitialProgramDateTime=Cl.prototype.Pk;Cl.prototype.setInitialProgramDateTime=Cl.prototype.di;Cl.prototype.isStartTimeLocked=Cl.prototype.Jl;Cl.prototype.lockStartTime=Cl.prototype.Kf;
Cl.prototype.getMaxSegmentEndTime=Cl.prototype.Xk;Cl.prototype.notifyPeriodDuration=Cl.prototype.sj;Cl.prototype.notifySegments=Cl.prototype.Ce;Cl.prototype.notifyTimeRange=Cl.prototype.tj;Cl.prototype.getDelay=Cl.prototype.Lk;Cl.prototype.setDelay=Cl.prototype.bi;Cl.prototype.getSegmentAvailabilityDuration=Cl.prototype.yf;Cl.prototype.setSegmentAvailabilityDuration=Cl.prototype.hg;Cl.prototype.setStatic=Cl.prototype.sd;Cl.prototype.setClockOffset=Cl.prototype.Kj;
Cl.prototype.getPresentationStartTime=Cl.prototype.cl;Cl.prototype.setDuration=Cl.prototype.Fb;Cl.prototype.setPresentationStartTime=Cl.prototype.Nj;Cl.prototype.getMaxSegmentDuration=Cl.prototype.Wk;Cl.prototype.getDuration=Cl.prototype.getDuration;function Dl(a,b,c,d){var e=this;this.A=d;this.g=a;this.F=b;this.h=c;this.j=new Tc;this.m=!1;this.l=0;this.D=!1;this.H=this.G=0;this.u=El(this);this.C=!1;this.j.o(a,"waiting",function(){return Fl(e)});this.i=(new Df(function(){Fl(e)})).xa(this.h.gapJumpTimerTime)}Dl.prototype.release=function(){this.j&&(this.j.release(),this.j=null);this.i!=null&&(this.i.stop(),this.i=null);this.u&&(this.u.release(),this.u=null);this.g=this.F=this.A=null};
Dl.prototype.Tf=function(){this.C=!0;this.i&&this.i.xa(this.h.gapJumpTimerTime);Fl(this)};
function Fl(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||a.g.currentTime==a.l&&(a.g.autoplay||a.g.currentTime!=a.l)){var b;if(!(b=!a.u)){b=a.u;var c=b.h,d=Gl(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.i=!1;e=f-b.l;if(d=e>=b.u&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Mj(c,b,a.h.gapDetectionThreshold),d==null||d==0&&!a.C||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*
100)/100),e>=a.F.Lb()||e-b<.001||(d!=0&&c.end(d-1),Hl(a,e),b==a.l&&(a.l=e),a.G++,a.A(new T("gapjumped")))))}}}function Hl(a,b){a.D=!0;a.j.ua(a.g,"seeked",function(){a.D=!1});a.g.currentTime=b}
function El(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new Il(new Jl(a.g),b,function(){var d;return P(function(e){if(e.g==1)return d=Lj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.B(2)):G(e,a.g.play(),3):e.return();if(e.g!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.H++;a.A(new T("stalldetected"));I(e)})})}function Il(a,b,c){this.h=a;this.m=Gl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.u=b;this.j=c}
Il.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function Jl(a){var b=this;this.g=a;this.h=new Tc;this.i=!1;this.h.o(this.g,"audiofocuspaused",function(){b.i=!0});this.h.o(this.g,"audiofocusgranted",function(){b.i=!1});this.h.o(this.g,"audiofocuslost",function(){b.i=!0})}
function Gl(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=t(Lj(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}Jl.prototype.release=function(){this.h&&this.h.release();this.h=null};function Kl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ll.value().get(b),c.ua(a,b,d))}var Ll=new Pb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ml(a,b,c,d){var e=this;this.g=a;this.m=b;this.A=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.u=!1;this.h=new Tc;this.i=new Nl(a);Kl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ol(e,e.j())})}Ml.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Pl(a){return a.u?a.g.currentTime:a.j()}
function Ql(a,b){a.g.readyState>0?Rl(a.i,b):Kl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ol(a,a.j())})}function Ol(a,b){Math.abs(a.g.currentTime-b)<.001?Sl(a):(a.h.ua(a.g,"seeking",function(){Sl(a)}),Rl(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function Sl(a){a.u=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.A(a.g.currentTime)}
function Nl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Df(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Nl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Rl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.xa(.1)};function Tl(a){this.g=a;this.i=!1;this.h=null;this.j=new Tc}p=Tl.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=Ul(b);e!==null&&(d=b.h.getTime()/1E3-e,d=Vl(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.ua(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;Kl(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.Ag=function(a){this.h=this.i?this.h:a};p.$e=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Ul(this)||0),a=Vl(this,a));return a||0};p.Bi=function(){return 0};p.zi=function(){return 0};p.Ai=function(){return!1};p.rj=function(){};p.fj=function(){var a=Ij(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function Ul(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function Vl(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function Wl(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.A=e;this.u=null;this.i=new Dl(a,b.presentationTimeline,c,f);this.j=new Ml(a,function(){a:{var h=g.i;h.m=!0;h.C=!1;h.i&&h.i.xa(h.h.gapJumpTimerTime);Fl(h);var k=Pl(g.j);h=Xl(g,k);if(!kd()&&Math.abs(h-k)>.001){k=!1;var l=Qb().Fj();if(l){var m=Date.now()/1E3;if(!g.u||g.u<m-l)g.u=m,k=!0}else k=!0;if(k){Ql(g.j,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.m&&(k.m=!0,k.l=h);k.i&&
k.i.xa(k.h.gapJumpTimerTime);Fl(k)},function(){return Yl(g,d)});this.m=new Df(function(){if(g.h.readyState!=0&&!g.h.paused){var h=Pl(g.j),k=g.g.fc(),l=g.g.Lb();l-k<3&&(k=l-3);h<k&&(h=Xl(g,h),g.h.currentTime=h)}})}p=Wl.prototype;p.ready=function(){this.m.xa(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.A=function(){}};p.Ag=function(a){Ql(this.j,Yl(this,a))};
p.$e=function(){var a=Pl(this.j);return this.h.readyState>0&&!this.h.paused?Zl(this,a):a};p.Bi=function(){return this.i.H};p.zi=function(){return this.i.G};p.Ai=function(){return this.i.D};function Yl(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.fc():a.g.Lb():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.Lb()+b);return $l(a,Zl(a,b))}p.rj=function(){this.i.Tf()};p.fj=function(){if(this.g.U()){var a=this.g.Rc(),b=Ij(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function $l(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Xl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.fc(),f=a.g.Lb(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.qe(c),k=a.g.qe(d);c=a.g.qe(c+d);return b>=g?$l(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.U()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Jj(a.h.buffered,k)?k:c:b>=h||Jj(a.h.buffered,b)?b:c}function Zl(a,b){var c=a.g.fc();if(b<c)return c;a=a.g.Lb();return b>a?a:b};function am(a){this.g=a;this.m=null;this.i=0;this.u=!1}p=am.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.u||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Ql=function(){this.u=!0};p.Kb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function gg(a){return a.g[0]||null}
p.find=function(a){for(var b=this.g.length-1,c=b;c>=0;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.u)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.Mf=function(a){if(!this.u&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3;this.g=this.g.filter(function(c){return Math.round(c.startTime*1E3)/1E3<b});this.g.push.apply(this.g,x(a))}};p.Ae=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(c.g.length==0||d.endTime>c.g[0].startTime)});this.Mf(a);this.cb(b)};p.cb=function(a){if(!this.u){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
p.Gd=function(a,b,c){c=c===void 0?!1:c;if(!this.u){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;this.g.length!=0&&(a=this.g[this.g.length-1],b=new Bj(a.startTime,b,a.D,a.startByte,a.endByte,a.ia,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
p.qg=function(a,b){var c=this;this.u||(this.m&&this.m.stop(),this.m=new Df(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};am.prototype[Symbol.iterator]=function(){return this.ec(0)};
am.prototype.ec=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return ab("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new bm(this,d,f,c)};am.prototype.pf=function(){return-1};
function cm(a,b,c){a=new Bj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new am([a])}S("shaka.media.SegmentIndex",am);am.forSingleSegment=cm;am.prototype.getIteratorForTime=am.prototype.ec;am.prototype.updateEvery=am.prototype.qg;am.prototype.fit=am.prototype.Gd;am.prototype.evict=am.prototype.cb;am.prototype.mergeAndEvict=am.prototype.Ae;am.prototype.offset=am.prototype.offset;am.prototype.get=am.prototype.get;am.prototype.find=am.prototype.find;am.prototype.markImmutable=am.prototype.Ql;
am.prototype.release=am.prototype.release;am.prototype.getNumEvicted=am.prototype.getNumEvicted;am.prototype.getNumReferences=am.prototype.getNumReferences;function bm(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=bm.prototype;p.Yd=function(a){this.reverse=a};p.wk=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.m&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.m&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.Vh=function(){var a=this.current();if(a&&a.nd&&!a.l&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.l&&!(this.g<=0);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",bm);bm.prototype.resetToLastIndependent=bm.prototype.Vh;bm.prototype.next=bm.prototype.next;bm.prototype.current=bm.prototype.current;bm.prototype.currentPosition=bm.prototype.wk;bm.prototype.setReverse=bm.prototype.Yd;function dm(){am.call(this,[]);this.h=[]}ma(dm,am);p=dm.prototype;p.clone=function(){var a=new dm;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Kb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Kb(a)};
function em(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function fm(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.find(b)!=null)return c.pf();return-1}
p.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.Mf=function(){};p.cb=function(a){if(this.h.length){var b=this.h[0];b.cb(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.cb(a))}};p.Ae=function(){};p.Gd=function(){};p.qg=function(){};S("shaka.media.MetaSegmentIndex",dm);dm.prototype.updateEvery=dm.prototype.qg;
dm.prototype.fit=dm.prototype.Gd;dm.prototype.mergeAndEvict=dm.prototype.Ae;dm.prototype.evict=dm.prototype.cb;dm.prototype.merge=dm.prototype.Mf;dm.prototype.offset=dm.prototype.offset;dm.prototype.get=dm.prototype.get;dm.prototype.find=dm.prototype.find;dm.prototype.forEachTopLevelReference=dm.prototype.Kb;dm.prototype.release=dm.prototype.release;function gm(a){var b=this;this.g=a;this.j=!1;this.i=this.g.xf();this.h=new Df(function(){b.g.pj(b.i*.25)})}gm.prototype.release=function(){this.set(this.jd());this.h&&(this.h.stop(),this.h=null);this.g=null};gm.prototype.set=function(a){this.i=a;hm(this)};gm.prototype.jd=function(){return this.g.jd()};function hm(a){a.h.stop();var b=a.j?0:a.i;if(b>=0)try{a.g.xf()!=b&&a.g.ei(b);return}catch(c){}a.h.xa(.25);a.g.xf()!=0&&a.g.ei(0)};function im(a){var b=this;this.j=a;this.h=new Tc;this.g=new Set;this.i=(new Df(function(){jm(b,!1)})).Ka();a.paused||this.i.xa(.25);this.h.o(a,"playing",function(){b.i.Ka().xa(.25)});this.h.o(a,"pause",function(){b.i.stop()})}im.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function jm(a,b){var c=a.j.currentTime;a=t(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function km(a){kb.call(this);this.g=new Map;this.h=a}ma(km,kb);km.prototype.release=function(){this.g.clear();kb.prototype.release.call(this)};function lm(a,b){var c=a.g.get(b);c||(c={Ge:[],Sg:null,contentType:b},a.g.set(b,c));return c}function mm(a,b,c){var d=lm(a,b.contentType);nm(a,d);a={Od:b,position:c};d=d.Ge;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
km.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Sg;a:{var e=c.Ge;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Od;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Sc(d.roles,e.roles);(g||h||d)&&om(this,a,e.contentType)&&(c.Sg=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&om(this,a,e.contentType)&&(c.Sg=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function om(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function nm(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.Ge;b.Ge=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Ge=[]}
function pm(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};a.type=="video"&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);a.type=="audio"&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function qm(a){kb.call(this);this.h=new Map;this.i=a;this.g=null}ma(qm,kb);qm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);kb.prototype.release.call(this)};function rm(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new T("regionadd",new Map([["region",b]])),a.dispatchEvent(b),sm(a))}
function sm(a){a.g||(a.g=(new Df(function(){for(var b=a.i(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new T("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).xa(2))};function tm(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.nd&&g.ye?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.u=d;this.A=e||f}function um(a,b){a.l=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function vm(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.ec(b,!0,a.u));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.Tc()==2&&(d=!1);c.hc(!1)&&(d=!1);d&&c.ia&&b.push(wm(a,c.ia));d&&!a.g.has(c)&&(d=new xm(a.l),b.push(ym(d,c,a.i)),a.g.set(c,d));if(!a.A(c,a.i))break}zm(a);return Promise.all(b)}
function wm(a,b){if(!a.i.segmentIndex||b.hc()||Array.from(a.j.keys()).some(function(e){return Aj(e,b)}))return Promise.resolve();var c=new xm(a.l),d=ym(c,b,a.i);a.j.set(b,c);return d}function Am(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Bm(a,c)}function Cm(a){Am(a,a.g);Am(a,a.j);a.h=null}tm.prototype.cb=function(a,b){b=b===void 0?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Bm(this,d);b&&zm(this)};
tm.prototype.Yd=function(a){this.u=a;this.h&&this.h.Yd(a)};function zm(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Dh:void 0},d=c.next())e.Dh=d.value,b.some(function(f){return function(g){return Aj(g.ia,f.Dh)}}(e))||Bm(a,e.Dh)}function Dm(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Bm(a,d)}zm(a)}function Em(a,b){b&&b!==a.i&&(Cm(a),a.i=b)}
function Bm(a,b){var c=a.g;b instanceof zj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function xm(a){this.g=a;this.De=this.mi=null}function ym(a,b,c){var d=new Uint8Array(0);a.De=a.g(b,c,function(e){return P(function(f){if(f.g==1)return d.byteLength>0?d=lc(d,e):d=e,a.mi?G(f,a.mi(d),3):f.B(0);d=new Uint8Array(0);I(f)})});return a.De.promise.catch(function(e){return e instanceof U&&e.code==7001?Promise.resolve():Promise.reject(e)})}xm.prototype.abort=function(){this.De&&this.De.abort()};S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function Fm(a){var b=mf(a),c=b.split("/")[0];a=nf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Oe:null,colorGamut:null,frameRate:null}}
function Gm(a,b,c){function d(A){z=A.name;var F=A.reader;F.skip(24);var J=F.Ia(),H=F.Ia();F.skip(50);q=String(J);n=String(H);A.reader.Pa()&&wh(A)}function e(A){var F=Pi(A.reader);r=F.channelCount;u=F.sampleRate;f(A.name)}function f(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":h.push(A+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(A+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(A+".05.04");l=!0;break;case "vp09":h.push(A+".00.10.08");l=!0;break;case "av01":h.push(A+".0.01M.08");
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(A);k=!0;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,u=null,v=null,w=null,z;(new rh).box("moov",wh).box("trak",wh).box("mdia",wh).X("mdhd",function(A){m=Ni(A.reader,A.version).language}).box("minf",wh).box("stbl",wh).X("stsd",yh).box("mp4a",function(A){var F=Pi(A.reader);r=F.channelCount;u=F.sampleRate;A.reader.Pa()?wh(A):f(A.name)}).box("esds",
function(A){A=A.reader;for(var F="mp4a",J,H;A.Pa();){J=A.ba();for(var K=A.ba();K&128;)K=A.ba();if(J==3)A.Ia(),K=A.ba(),K&128&&A.Ia(),K&64&&A.skip(A.ba()),K&32&&A.Ia();else if(J==4)H=A.ba(),A.skip(12);else if(J==5)break}H&&(F+="."+Si(H),J==5&&A.Pa()&&(J=A.ba(),H=(J&248)>>3,H===31&&A.Pa()&&(H=32+((J&7)<<3)+((A.ba()&224)>>5)),F+="."+H));g.push(F);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",
d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(A){var F=z||"";switch(z){case "dvav":F="avc3";break;case "dva1":F="avc1"}A=A.reader;A.skip(1);A=F+"."+Si(A.ba())+Si(A.ba())+Si(A.ba());h.push(A);l=!0}).box("hvcC",function(A){var F=z||"";switch(z){case "dvh1":F="hvc1";break;case "dvhe":F="hev1"}var J=A.reader;J.skip(1);A=J.ba();var H=["","A","B","C"][A>>6],K=A&31,L=J.$(),O=(A&32)>>5?"H":"L";A=[J.ba(),J.ba(),J.ba(),J.ba(),J.ba(),J.ba()];J=J.ba();for(var Q=
0,N=0;N<32;N++){Q|=L&1;if(N==31)break;Q<<=1;L>>=1}F=F+("."+H+K)+("."+Si(Q,!0));F+="."+O+J;H="";for(K=A.length;K--;)if((O=A[K])||H)H="."+O.toString(16).toUpperCase()+H;F+=H;h.push(F);l=!0}).box("dvcC",function(A){var F=z||"";switch(z){case "hvc1":F="dvh1";break;case "hev1":F="dvhe";break;case "avc1":F="dva1";break;case "avc3":F="dvav";break;case "av01":F="dav1"}var J=A.reader;J.skip(2);A=J.ba();J=J.ba();h.push(F+"."+Ti(A>>1&127)+"."+Ti(A<<5&32|J>>3&31));l=!0}).box("dvvC",function(A){var F=z||"";switch(z){case "hvc1":F=
"dvh1";break;case "hev1":F="dvhe";break;case "avc1":F="dva1";break;case "avc3":F="dvav";break;case "av01":F="dav1"}var J=A.reader;J.skip(2);A=J.ba();J=J.ba();h.push(F+"."+Ti(A>>1&127)+"."+Ti(A<<5&32|J>>3&31));l=!0}).X("vpcC",function(A){var F=z||"",J=A.reader;A=J.ba();var H=J.ba();J=J.ba()>>4&15;h.push(F+"."+Ti(A)+"."+Ti(H)+"."+Ti(J));l=!0}).box("av1C",function(A){var F=z||"";switch(z){case "dav1":F="av01"}var J=A.reader;J.skip(1);A=J.ba();J=J.ba();var H=A>>>5,K=(J&64)>>6;h.push(F+"."+H+"."+Ti(A&
31)+(J>>>7?"H":"M")+"."+Ti(H===2&&K?(J&32)>>5?12:10:K?10:8)+"."+((J&16)>>4)+"."+((J&8)>>3)+((J&4)>>2)+(J&3)+"."+Ti(1)+"."+Ti(1)+"."+Ti(1)+".0");l=!0}).box("enca",Ah).box("encv",zh).box("sinf",wh).box("frma",function(A){A=Qi(A.reader).codec;f(A)}).box("colr",function(A){h=h.map(function(H){if(H.startsWith("av01.")){var K=A.reader,L=K.Wa(),O=K.ac(4,!1);var Q=String.fromCharCode(O[0]);Q+=String.fromCharCode(O[1]);Q+=String.fromCharCode(O[2]);Q+=String.fromCharCode(O[3]);if(Q==="nclx"){O=K.Ia();Q=K.Ia();
var N=K.Ia(),M=K.ba()>>7,R=H.split(".");R.length==10&&(R[6]=Ti(O),R[7]=Ti(Q),R[8]=Ti(N),R[9]=String(M),H=R.join("."))}K.seek(L)}return H});var F=Ri(A.reader),J=F.colorGamut;v=F.Oe;w=J}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var y=k&&!l,B=new Map;if(l&&!c){c=new od("video/mp4");a&&c.init(a);try{c.Uf(b);for(var C=t(c.zg()),E=C.next();!E.done;E=C.next()){var D=E.value;B.set(D,D)}}catch(A){}c.fe()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Hm(g.concat(h)).join(", "),
language:m,height:n,width:q,channelCount:r,sampleRate:u,closedCaptions:B,Oe:v,colorGamut:w,frameRate:null}}function Hm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=lf(d);b.has(e)||(c.push(d),b.add(e))}b=tc("audio",c);d=tc("video",c);a=tc(sc,c);d=Im(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Im(a){if(a.length<=1)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?gd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Jm(a){var b=null;(new rh).box("moov",wh).box("trak",wh).box("mdia",wh).box("minf",wh).box("stbl",wh).X("stsd",yh).box("encv",zh).box("enca",Ah).box("sinf",wh).box("schi",wh).X("tenc",function(c){c=c.reader;c.ba();c.ba();c.ba();c.ba();c=c.ac(16,!1);b=jc(c)}).parse(a,!0);return b}
function Km(a,b,c){var d,e,f,g,h;return P(function(k){if(k.g==1)return d=b,d.cryptoKey?k.B(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Jb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Lm(a,b,c,d,e){a=ch(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Mm(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.L=new Map;this.D=1;this.C=this.u=null;this.T=0;this.h=new Map;this.M=!1;this.V=null;this.F=!1;this.l=new kh(function(){return Nm(c)});this.P=Date.now()/1E3;this.m=new Map;this.R={projection:null,hfov:null};this.Z=0;this.W=Infinity;this.H=null;this.O=[];this.A=new Df(function(){if(c.j&&c.g)if(c.j.presentationTimeline.U()){var d=c.j.presentationTimeline.fc(),e=c.j.presentationTimeline.Lb();e-d>1?gl(c.g.ea,d,e):hl(c.g.ea)}else hl(c.g.ea),
c.A&&c.A.stop();else c.A&&c.A.stop()});this.I=null;this.J=!1;this.K=new Df(function(){var d=c.g.video;!d.ended&&c.I&&(c.J=!0,d.currentTime=c.I,c.I=null)});this.G=new Tc}p=Mm.prototype;p.destroy=function(){return this.l.destroy()};
function Nm(a){var b,c,d,e,f,g,h;return P(function(k){if(k.g==1){a.A&&a.A.stop();a.A=null;a.K&&a.K.stop();a.K=null;a.G&&(a.G.release(),a.G=null);b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Om(e),b.push(Pm(e)),e.ma&&(Cm(e.ma),e.ma=null);f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,Cm(h);return G(k,Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;I(k)})}
p.configure=function(a){this.i=a;this.V=new Hg({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);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.ma&&(Cm(b.ma),b.ma=null);b=t(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Cm(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(sc))&&
b.ma&&(Cm(b.ma),b.ma=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.ma&&(Cm(b.ma),b.ma=null);b=t(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.ma?(Dm(c.ma,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Cm(c.ma),c.ma=null)):a.segmentPrefetchLimit>0&&(c.ma=Qm(this,c.stream));a.disableAudioPrefetch||Rm(this)};function Sm(a,b,c){a.j.presentationTimeline.U()||(a.Z=b,a.W=c)}
p.start=function(a){var b=this;return P(function(c){if(c.g==1)return G(c,Tm(b,a||new Map),2);lh(b.l);b.M=!0;I(c)})};function Um(a,b){var c,d,e,f,g,h,k;P(function(l){switch(l.g){case 1:return c=uc,a.T++,d=a.T,sa(l,2),G(l,al(a.g.ea,c.Va),4);case 4:ua(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=df(b.mimeType,b.codecs),Jk(a.g.ea,f,a.j.sequenceMode,b.external),g=a.g.ea.Z,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.T==d&&(k=Vm(a,b),a.h.set(c.Va,k),Wm(a,k,0)),I(l)}})}
function Xm(a){var b=a.h.get(sc);b&&(Om(b),Pm(b).catch(function(){}),a.H=a.h.get(sc),a.h.delete(sc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.C=null}
function Ym(a,b){for(var c=a.g.Za()<0,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.Ba&&e.Ba.Yd(c),e.ma&&e.ma.Yd(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Yd(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Yc&&(Zm(a,b,!1,0,!1),c.Yc=d);else if(b=c.Yc)c.Yc=null,Zm(a,b,!0,0,!1)}
function $m(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.u=b;a.M&&(b.video&&Zm(a,b.video,c,d,e,f),b.audio&&Zm(a,b.audio,c,d,e,f))}function an(a,b){P(function(c){if(c.g==1)return a.H=null,a.C=b,a.M?b.segmentIndex?c.B(2):G(c,b.createSegmentIndex(),2):c.return();Zm(a,b,!0,0,!1);I(c)})}function bn(a){var b=a.h.get(sc);b&&Zm(a,b.stream,!0,0,!0)}
function cn(a,b){for(var c=t(a.L.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.L.delete(d))}}
function Zm(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=sc?g&&(g.Yc&&(b.trickModeVideo?(g.Yc=b,b=b.trickModeVideo):g.Yc=null),g.stream!=b||e)&&(a.m.has(b)?g.ma=a.m.get(b):g.ma&&Em(g.ma,b),b.type==sc&&g.stream!=b&&(e=df(b.mimeType,b.codecs),Jk(a.g.ea,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ra?(e="("+g.type+":"+g.stream.id+")",a.L.has(e)||a.L.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.Ba=null,g.Gg=!!f,b.dependencyStream?g.Oc=Vm(a,b.dependencyStream):g.Oc=null,dn(a),e&&(g.xb=null,g.Bc=null,g.Ac=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(Pm(b).catch(function(){}),b.xb=null,b.Bc=null,b.Ac=null,en(a,b),fn(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.dc?g.be=!0:g.Ra?(g.uc=!0,g.Cd=d,g.be=!0):(Om(g),gn(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ra||g.yb||Wm(a,g,0),fn(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
Um(a,b)}
function fn(a,b){var c,d,e;return P(function(f){if(f.g==1){if(!b.$a)return f.return();c=b.stream;d=b.$a;return c.segmentIndex?f.B(2):G(f,c.createSegmentIndex(),2)}if(f.g!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.B(4):G(f,e.createSegmentIndex(),4);if(b.$a!=d||b.stream!=c)return f.return();var g=a.g.yc();var h=Qk(a.g.ea,b.type),k=b.stream.segmentIndex.find(b.Ua?b.Ua.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Dj(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.u.bandwidth)/
8);k?((l=l.ia)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.$a.h.g>k?!0:!1):g=!0;g&&b.$a.abort();I(f)})}
p.rd=function(){if(this.g){for(var a=this.g.yc(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.J)e=this.g.ea,d==sc?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=Pk(e,d),e=Jj(e,a)),e=!e;if(e){this.P=0;c.ma&&(c.ma.h=null);if(c.type==="audio"){e=t(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.Ba=null;(Qk(this.g.ea,d)!=null||c.Ra)&&en(this,c);c.$a&&(c.$a.abort(),c.$a=null);d===sc&&(d=this.g.ea,d.J&&d.J.fe());c.rd=!0}!this.J||
c.dc||c.Ra||c.yb||Wm(this,c,0)}hn(this)&&jn(this)}};function en(a,b){b.dc||b.uc||(b.Ra?(b.uc=!0,b.Cd=0):Ok(a.g.ea,b.type)==null?b.yb==null&&Wm(a,b,0):(Om(b),gn(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function Tm(a,b){var c,d,e,f,g,h,k,l;return P(function(m){if(m.g==1){if(!a.u)throw new U(2,5,5006);c=kn(a,!0);d=a.g.ea;return G(m,d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}lh(a.l);a.updateDuration();e=t(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=Vm(a,h),b.has(h.id)&&(l=b.get(h.id),um(l,function(n,q,r){return ln(n,q,r||null,a.i.retryParameters,a.g.Dc)}),k.ma=l),a.h.set(g,k),Wm(a,k,0));dn(a);I(m)})}
function Vm(a,b){var c={stream:b,type:b.type,Ba:null,ma:Qm(a,b),Ua:null,xb:null,Jf:null,Bc:null,Ac:null,Hf:null,If:null,Yc:null,endOfStream:!1,Ra:!1,yb:null,uc:!1,Cd:0,be:!1,dc:!1,rd:!0,Gg:!1,Sh:!1,se:!1,$a:null,Oc:null};b.dependencyStream&&(c.Oc=Vm(a,b.dependencyStream));return c}
function Qm(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===sc&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===sc&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.ma)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new tm(a.i.segmentPrefetchLimit,b,function(d,e,f){return ln(d,e,f||null,a.i.retryParameters,a.g.Dc)},a.g.Za()<0,a.g.xm):null}
function Rm(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Sb:void 0},e=d.next())if(f.Sb=e.value,f.Sb.audio)if(a.m.has(f.Sb.audio)){if(e=a.m.get(f.Sb.audio),Dm(e,b),!(b>0&&c.some(function(h){return function(k){return xc(h.Sb.audio.language,k)}}(f)))){var g=a.h.get(f.Sb.audio.type);e!==(g&&g.ma)&&Cm(e);a.m.delete(f.Sb.audio)}}else b<=0||!c.some(function(h){return function(k){return xc(h.Sb.audio.language,k)}}(f))||!(e=Qm(a,f.Sb.audio))||
(f.Sb.audio.segmentIndex||f.Sb.audio.createSegmentIndex(),a.m.set(f.Sb.audio,e))}p.updateDuration=function(){var a=kd(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.A&&this.A.stop(),hl(this.g.ea)),this.g.ea.Fb(b)):a?(this.A&&this.A.xa(.5),this.g.ea.Fb(Infinity)):this.g.ea.Fb(4294967296)};
function mn(a,b){var c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:lh(a.l);c=uc;if(b.Ra||b.yb==null||b.dc)return n.return();b.yb=null;if(!b.uc){n.B(2);break}return G(n,gn(a,b,b.be,b.Cd),3);case 3:return n.return();case 2:cn(a,b);if(b.stream.segmentIndex){n.B(4);break}d=b.stream;sa(n,5);return G(n,b.stream.createSegmentIndex(),7);case 7:ua(n,6);break;case 5:return e=va(n),G(n,nn(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Ra||
b.yb||Wm(a,b,0),n.return();case 4:if(!b.Oc){n.B(9);break}if(b.Oc.stream.segmentIndex){n.B(9);break}sa(n,11);return G(n,b.Oc.stream.createSegmentIndex(),13);case 13:ua(n,9);break;case 11:va(n);case 9:sa(n,14);f=on(a,b);f!=null&&(Wm(a,b,f),b.se=!1);ua(n,15);break;case 14:return g=va(n),G(n,nn(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Va)return n.return();h=[b];k=b.type===c.na?c.Ha:c.na;(l=a.h.get(k))&&h.push(l);if(!a.M||!h.every(function(q){return q.endOfStream})){n.B(0);break}return G(n,
a.g.ea.endOfStream(),18);case 18:lh(a.l),m=a.g.ea.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Fb(m),I(n)}})}
function on(a,b){if(pn(b))return Yk(a.g.ea,b.stream.originalId||""),null;b.type==sc&&Zk(a.g.ea);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=sc&&Hk(a.g.ea))return qn(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.Za()));if(!Nk(a.g.ea)&&b.type!=sc)return c/2;var d=a.g.yc();if(b.type==="audio")for(var e=t(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.cb(d,!0),vm(f,d);e=b.Ua?b.Ua.endTime:d;var g=Rk(a.g.ea,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.D);var h=a.j.presentationTimeline.getDuration()-e,k=Qk(a.g.ea,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&(a=a.h.get(sc))&&pn(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.Ba;k=rn(a,b,d,k);if(!k)return c;g=b.xb;var l=k.ia;g&&l&&Aj(l,g)&&(g.g=l.g);g=!1;h&&b.Gg&&(g=!0,b.Gg=!1);h=Infinity;l=Array.from(a.h.values());l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,pn(m)||m.Ba&&!m.Ba.current()||(h=Math.min(h,m.Ua?m.Ua.endTime:d));if(e>=
h+a.j.presentationTimeline.h)return c;b.ma&&b.Ba&&!a.m.has(b.stream)&&(b.ma.cb(k.startTime+.001),vm(b.ma,k.startTime).catch(function(){}));if(hn(a)&&sn(a,b,k))return null;tn(a,b,d,k,g).catch(function(){});b.Oc&&un(a,b.Oc,d,f);return null}
function rn(a,b,c,d){if(b.Ba)return(c=b.Ba.current())&&b.Ua&&Math.abs(b.Ua.startTime-c.startTime)<.001&&(c=b.Ba.next().value),c;if(b.Ua||d)return c=b.Ua?b.Ua.endTime:d,a=a.g.Za()<0,b.stream.segmentIndex&&(b.Ba=b.stream.segmentIndex.ec(c,!1,a)),b.Ba&&b.Ba.next().value;d=a.j.sequenceMode||hn(a)?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=a.g.Za()<0;var f=null;d&&(b.stream.segmentIndex&&(b.Ba=b.stream.segmentIndex.ec(e,!1,a)),f=b.Ba&&b.Ba.next().value);f||(b.stream.segmentIndex&&(b.Ba=
b.stream.segmentIndex.ec(c,!1,a)),f=b.Ba&&b.Ba.next().value);return f}
function tn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D;return P(function(A){switch(A.g){case 1:f=uc;g=b.stream;h=b.Ba;b.Ra=!0;sa(A,2);if(d.Tc()==2)throw new U(1,1,1011);return G(A,vn(a,b,d,e),4);case 4:lh(a.l);if(a.F)return A.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.u))return r=new Uint8Array(0),v=u=!1,z=function(F){var J,H,K,L;return P(function(O){switch(O.g){case 1:if(u)return O.return();
v=!0;lh(a.l);if(a.F)return O.return();sa(O,2);r=lc(r,F);J=!1;H=0;(new rh).box("mdat",function(Q){H=Q.size+Q.start;J=!0}).parse(r,!1,!0);if(!J){O.B(4);break}K=r.subarray(0,H);r=r.subarray(H);return G(O,wn(a,b,c,g,d,K,!0,e),5);case 5:b.ma&&b.Ba&&vm(b.ma,d.startTime,!0);case 4:ua(O,0);break;case 2:w=L=va(O),I(O)}})},G(A,xn(a,b,d,z),9);n=xn(a,b,d);return G(A,n,7);case 7:q=A.h;lh(a.l);if(a.F)return A.return();lh(a.l);return b.uc?(b.Ra=!1,Wm(a,b,0),A.return()):G(A,wn(a,b,c,g,d,q,!1,e),6);case 9:y=A.h;if(w)throw w;
if(v){A.B(10);break}u=!0;lh(a.l);return a.F?A.return():b.uc?(b.Ra=!1,Wm(a,b,0),A.return()):G(A,wn(a,b,c,g,d,y,!1,e),10);case 10:b.ma&&b.Ba&&vm(b.ma,d.startTime,!0);case 6:lh(a.l);if(a.F)return A.return();b.Ua=d;h.next();b.Ra=!1;b.Sh=!1;B=a.g.ea.Pc();C=B[b.type];gb(JSON.stringify(C));b.uc||(E=null,b.type===f.Ha?E=a.h.get(f.na):b.type===f.na&&(E=a.h.get(f.Ha)),E&&E.type==f.na?a.g.Tf(d,b.stream,E.stream.isAudioMuxedInVideo):a.g.Tf(d,b.stream,b.stream.codecs.includes(",")));Om(b);Wm(a,b,0);ua(A,0);break;
case 2:D=va(A);lh(a.l,D);if(a.F)return A.return();b.Ra=!1;if(D.code==7001)b.Ra=!1,Om(b),Wm(a,b,0),A.B(0);else if(b.type==f.Va&&a.i.ignoreTextStreamFailures)a.h.delete(f.Va),A.B(0);else{if(D.code==3017)return G(A,yn(a,b,D),0);b.se=!0;D.category==1&&b.ma&&Bm(b.ma,d);D.severity=2;return G(A,nn(a,b,D),0)}}})}
function un(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return P(function(v){switch(v.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.ec(c))&&g.next().value;h&&a.O.includes(h.startTime);)h=g&&g.next().value;if(!h){v.B(0);break}k=h.ia;if(!k||Aj(k,b.xb)){v.B(3);break}b.xb=k;sa(v,4);return G(v,xn(a,b,k),6);case 6:l=v.h;var w=a.g.ea;w.H&&dd(w.H,l,0,e);a.O=[];ua(v,3);break;case 4:throw m=va(v),b.xb=null,m;case 3:if(b.Ua&&b.Ua==h){v.B(0);break}b.Ua=h;sa(v,8);return G(v,xn(a,b,h),10);case 10:n=v.h;w=a.g.ea;w.H&&
dd(w.H,n,0,e);a.O.push(h.startTime);ua(v,9);break;case 8:throw q=va(v),b.Ua=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.O)));u=a.g.yc();if(u+d>r)return G(v,un(a,b,h.startTime,d),0);v.B(0)}})}
function yn(a,b,c){var d,e,f,g,h,k,l,m,n;return P(function(q){switch(q.g){case 1:d=Array.from(a.h.values());if(e=d.some(function(r){return r!=b&&r.Sh})){q.B(2);break}if(a.i.avoidEvictionOnQuotaExceededError){f=zn(a,c);if(g=a.g.disableStream(b.stream,f))return q.return();Wm(a,b,4);return q.return()}h=Math.round(100*a.D);if(h>20){a.D-=.2;q.B(3);break}if(h>4){a.D-=.04;q.B(3);break}k=zn(a,c);l=a.g.disableStream(b.stream,k);if(!l){b.se=!0;a.F=!0;a.g.onError(c);q.B(5);break}a.D=1;m=a.g.yc();return G(q,
An(a,b,m),5);case 5:return q.return();case 3:return b.Sh=!0,n=a.g.yc(),G(q,An(a,b,n),2);case 2:Wm(a,b,4),I(q)}})}
function vn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B;return P(function(C){switch(C.g){case 1:e=uc;f=b.Ua==null;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.Z)-.1);k=Math.min(c.appendWindowEnd,a.W)+.1;l=c.codecs||b.stream.codecs;m=lf(l);n=mf(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.Jf&&h==b.Bc&&k==b.Ac&&m==b.Hf&&n==b.If){C.B(2);break}r=b.Hf&&b.If&&tl(a.g.ea,b.type,n,l,kn(a));if(!r){C.B(3);break}u=null;b.type===e.Ha?u=a.h.get(e.na):b.type===e.na&&(u=a.h.get(e.Ha));if(!u){C.B(3);
break}return G(C,Pm(u).catch(function(){}),5);case 5:u.xb=null,u.Bc=null,u.Ac=null,en(a,u);case 3:return G(C,Bn(a,b,q,h,k,c,m,n),2);case 2:return Aj(c.ia,b.xb)||(b.xb=c.ia,c.l&&c.ia&&(v=xn(a,b,c.ia),w=function(){var E,D,A,F,J,H,K,L,O,Q,N;return P(function(M){switch(M.g){case 1:return sa(M,2),G(M,v,4);case 4:return E=M.h,lh(a.l),D=null,A=new Map,F={projection:null,hfov:null},b.stream&&(J=b.stream.videoLayout)&&(H=J.split("/"),H.includes("PROJ-RECT")?F.projection="rect":H.includes("PROJ-EQUI")?F.projection=
"equi":H.includes("PROJ-HEQU")?F.projection="hequ":H.includes("PROJ-PRIM")?F.projection="prim":H.includes("PROJ-AIV")&&(F.projection="hequ")),K=new rh,K.box("moov",wh).box("trak",wh).box("mdia",wh).X("mdhd",function(R){D=Ni(R.reader,R.version).timescale}).box("hdlr",function(R){R=R.reader;R.skip(8);switch(R.od()){case "soun":A.set(e.na,D);break;case "vide":A.set(e.Ha,D)}D=null}),b.type!==e.Ha||F.projection||K.box("minf",wh).box("stbl",wh).X("stsd",yh).box("encv",zh).box("avc1",zh).box("avc3",zh).box("hev1",
zh).box("hvc1",zh).box("dvav",zh).box("dva1",zh).box("dvh1",zh).box("dvhe",zh).box("dvc1",zh).box("dvi1",zh).box("vexu",wh).box("proj",wh).X("prji",function(R){R=R.reader.od();F.projection=R}).box("hfov",function(R){R=R.reader.$()/1E3;F.hfov=R}),K.parse(E,!0,!0),b.type===e.Ha&&Cn(a,F),A.has(b.type)?c.ia.timescale=A.get(b.type):D!=null&&(c.ia.timescale=D),L=b.stream.segmentIndex,L instanceof dm&&(O=fm(L,c.startTime)),Q=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,G(M,a.g.Ii(b.type,E),5);
case 5:return G(M,Tk(a.g.ea,b.type,E,null,b.stream,Q,b.rd,d,!1,!1,O),6);case 6:ua(M,0);break;case 2:throw N=va(M),b.xb=null,N;}})},z=c.startTime,f&&(y=Qk(a.g.ea,b.type),y!=null&&(z=y)),a.g.Ul(z,c.ia),g.push(w()))),B=b.Ua?b.Ua.i:-1,c.i!=B&&g.push(el(a.g.ea,b.type,c.startTime)),G(C,Promise.all(g),0)}})}
function Bn(a,b,c,d,e,f,g,h){var k,l,m,n,q;return P(function(r){switch(r.g){case 1:k=uc;l=kn(a);sa(r,2);b.Bc=d;b.Ac=e;g&&(b.Hf=g);h&&(b.If=h);b.Jf=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.Ha?n=a.h.get(k.na):b.type===k.na&&(n=a.h.get(k.Ha));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.B(4);break}return G(r,bl(a.g.ea,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return G(r,bl(a.g.ea,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:ua(r,
0);break;case 2:throw q=va(r),b.Bc=null,b.Ac=null,b.Hf=null,b.If=null,b.Jf=null,q;}})}
function wn(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return P(function(r){switch(r.g){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.ia&&(m=e.ia.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new rh).box("moof",wh).box("traf",wh).X("tfdt",function(u){var v,w,z,y,B,C;return P(function(E){v=Mi(u.reader,u.version);w=v.baseMediaDecodeTime;if(!w)return E.return();z=
-w/m;y=Number(b.Jf)||0;if(!(y<z))return E.B(0);B=b.Bc;C=b.Ac;return G(E,Bn(a,b,z,B,C,e),0)})}).parse(f,!1,g)),G(r,An(a,b,c),2);case 2:return lh(a.l),q=b.rd,b.rd=!1,G(r,a.g.Ii(b.type,f),3);case 3:return G(r,Tk(a.g.ea,b.type,f,e,d,k,q,h,g),4);case 4:lh(a.l),I(r)}})}
function An(a,b,c){var d,e,f,g,h,k,l,m,n;return P(function(q){if(q.g==1){d=b.stream.segmentIndex;d instanceof dm&&(d.cb(a.j.presentationTimeline.Mb()),e=[],em(d,function(r){e.push(r.pf())}));f=Math.max(a.i.bufferBehind*a.D,a.j.presentationTimeline.h);g=Ok(a.g.ea,b.type);if(g==null)return a.H==b&&(a.H=null),q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.fc();m=a.j.presentationTimeline.Lb();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():G(q,a.g.ea.remove(b.type,g,g+n,e),
2)}if(q.g!=4)return lh(a.l),a.H?G(q,An(a,a.H,c),4):q.B(0);lh(a.l);I(q)})}function pn(a){return a&&a.type==sc&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function xn(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.hc())return l.return(e);f=null;if(b.ma){var m=b.ma,n=m.g;c instanceof zj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.mi=d),f=m.De):f=null}f||(f=ln(c,b.stream,d||null,a.i.retryParameters,a.g.Dc));g=0;b.Ba&&(g=b.Ba.h);b.$a=f;return G(l,f.promise,2);case 2:h=l.h;b.$a=null;k=h.data;if(!c.aesKey){l.B(3);break}return G(l,Km(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function ln(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof Bj?a:void 0,h=g?1:0;a=Lm(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(ih,a,{type:h,stream:b,segment:g,isPreload:f})}
function gn(a,b,c,d){var e,f;return P(function(g){if(g.g==1)return b.uc=!1,b.be=!1,b.Cd=0,b.dc=!0,b.Ua=null,b.Ba=null,b.ma&&!a.m.has(b.stream)&&Cm(b.ma),d?(e=a.g.yc(),f=a.g.ea.getDuration(),G(g,a.g.ea.remove(b.type,e+d,f),3)):G(g,al(a.g.ea,b.type),4);if(g.g!=3)return lh(a.l),c?G(g,a.g.ea.flush(b.type),3):g.B(3);lh(a.l);b.dc=!1;b.endOfStream=!1;b.Ra||b.yb||Wm(a,b,0);I(g)})}
function Wm(a,b,c){var d=b.type;if(d!=sc||a.h.has(d))b.yb=(new Cf(function(){var e;return P(function(f){if(f.g==1)return sa(f,2),G(f,mn(a,b),4);if(f.g!=2)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);I(f)})})).Y(c)}function Om(a){a.yb!=null&&(a.yb.stop(),a.yb=null)}function Pm(a){return P(function(b){return a.$a?G(b,a.$a.abort(),0):b.B(0)})}
function nn(a,b,c){var d;return P(function(e){if(e.g==1)return c.code==3024?(b.Ra=!1,Om(b),Wm(a,b,0),e.return()):G(e,Ng(a.V),2);lh(a.l);if(c.category===1&&c.code!=1003){if(b.Yc)return Ym(a,!1),e.return();d=zn(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);I(e)})}function zn(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function qn(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return P(function(k){if(k.g==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||c-a.P<d)return k.return(!1);a.P=c}e=uc;if(f=a.h.get(e.na))Om(f),f.$a&&(f.$a.abort(),f.$a=null),f.xb=null,f.Bc=null,f.Ac=null,f.Ra=!1,f.uc=!1,f.Cd=0,f.be=!1,f.dc=!1,f.Ba&&f.Ba.Vh();if(g=a.h.get(e.Ha))Om(g),g.$a&&(g.$a.abort(),g.$a=null),g.xb=null,g.Bc=null,g.Ac=null,g.Ra=!1,g.uc=!1,g.Cd=0,g.be=!1,g.dc=!1,g.Ba&&g.Ba.Vh();h=a.g.video.paused;
return G(k,nl(a.g.ea,kn(a)),2)}!g||g.dc||g.Ra||g.yb||Wm(a,g,0);!f||f.dc||f.Ra||f.yb||Wm(a,f,0);h||a.g.video.play();return k.return(!0)})}function Cn(a,b){if(a.R.projection!=b.projection||a.R.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.R=b}}
function hn(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=Qb();if(!id()||!b.bd()){b=t(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==uc.Va&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.lg())for(b=t(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==uc.Va&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=t(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(hf(c.value));return a.size>
1}return!1}function dn(a){a.G.Sa();hn(a)&&(a.G.o(a.g.video,"waiting",function(){return jn(a)}),a.G.o(a.g.video,"timeupdate",function(){return jn(a)}))}function jn(a){if(hn(a)){a.K.stop();var b=a.g.yc(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.xb)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.K.Y(b)))}}
function sn(a,b,c){if(b.type===sc)return!1;var d=b.xb;if(!d)return!1;var e=c.ia;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=jf(nf(d.mimeType)),g=jf(nf(d.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}c&&(a.J||b.rd)&&(a.J=!1,qn(a,!0).then(function(){var h=
(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new T("boundarycrossed",h))}));return c}function kn(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=Qk(a.g.ea,g.type),k=a.g.yc();(g=rn(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.u.audio;e&&(c(e),d.set("audio",e));if(e=a.u.video)c(e),d.set("video",e);b&&a.C&&d.set(sc,a.C);return d};function Dn(){}
function En(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?b[l]===void 0?n===void 0||h?delete a[l]:a[l]=Hd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Hd(n)),m=En(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||b[l]==null||typeof b[l]!="function"&&b[l].constructor!=n.constructor?(ab("Invalid config, wrong type for "+m),
k=!1):typeof c[l]=="function"&&c[l].length!=b[l].length?(bb("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(ab("Invalid config, unrecognized key "+m),k=!1)}return k}function Fn(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||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 Gn(a,b){return a&&b}
function Hn(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?Rc(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Dn);Dn.getDifferenceFromConfigObjects=Hn;Dn.convertToConfigObject=Fn;Dn.mergeConfigObjects=En;S("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function In(){}function Jn(a){a=Yb(a);return(new rb(a)).Ib}function Kn(a,b,c){function d(h){Nb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Jb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new U(2,6,6015);var e;typeof b=="string"?e=$b(b,!0):e=b;a=Yb(a);a=$b(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Ln(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Yb(a).split("skd://").pop();return Kn(a,c,b)}
function Mn(a,b){a===2&&(a=b.drmInfo)&&Eg(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",In);
In.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&Eg(a.keySystem)){try{var c=Vb(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Kb(fc(c)))}};In.muxFairPlayRequest=function(a,b){Mn(a,b)};
In.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&Eg(c.keySystem)&&Mn(a,b)}};In.conaxFairPlayRequest=function(a,b){Mn(a,b)};In.ezdrmFairPlayRequest=function(a,b){Mn(a,b)};In.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&Eg(a.keySystem)&&(a=Jb(b.body),a=ec(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Zb("spc="+a))};In.muxInitDataTransform=function(a,b,c){return Ln(a,b,c)};
In.expressplayInitDataTransform=function(a,b,c){return Ln(a,b,c)};In.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Yb(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Mb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Kn(a,d,b)};In.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Yb(a).split(";").pop();return Kn(a,c,b)};
In.verimatrixInitDataTransform=function(a,b,c){return Ln(a,b,c)};In.initDataTransform=Kn;In.defaultGetContentId=Jn;In.isFairPlaySupported=function(){var a;return P(function(b){if(b.g==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},sa(b,2),G(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.g!=2)return b.return(!0);va(b);return b.return(!1)})};function Nn(a,b,c){c=c===void 0?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
Nn.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!On(d,e))&&Pn(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||On(c,d))&&Pn(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Nn.prototype.values=function(){return this.g.values()};function On(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return lf(d)});b=b.codecs.split(",").map(function(d){return lf(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}
function Pn(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}S("shaka.media.AdaptationSet",Nn);function Qn(){this.h=this.g=null}Qn.prototype.configure=function(a){this.g=a};Qn.prototype.getConfiguration=function(){return this.g};
Qn.prototype.create=function(a){var b;if(this.g.language){var c=Rn(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=Sn(b,this.g.role);a.length&&(b=a);a=Tn(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=Un(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=Vn(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=t(a),
c=a.next();!c.done;c=a.next())if(c=Wn(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=Xn(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=Yn(b,this.g.videoLabel),a.length&&(b=a));a=Zn(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(x(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=t(a),c=a.next();!c.done;c=a.next())if(c=$n(b,c.value),c.length){b=c;break}return this.h=new Nn(b[0],b,
!(this.g.codecSwitchingStrategy=="smooth"&&id()))};Qn.prototype.getLastAdaptationSet=function(){return this.h};function Rn(a,b){b=yc(b);var c=Hc(b,a.map(function(d){return Gc(d)}));return c?a.filter(function(d){return c==Gc(d)}):[]}function Sn(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function Tn(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function Xn(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Yn(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Wn(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}
function Vn(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=Qb().Id(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function Un(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Zn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function $n(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function ao(){}
function bo(){var a=Infinity,b=Qb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Ig(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Jn(h),h=Kn(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload";id()&&b.bd()&&(d="smooth");var e={retryParameters:Ig(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,
ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,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:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:co,manifestPreprocessorTXml:eo,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.vd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:co,manifestPreprocessorTXml:eo,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
f={trackSelectionCallback:function(h){return P(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return P(function(l){if(l.g==1)return navigator.storage&&navigator.storage.estimate?G(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return Gn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Ig(),failureCallback:function(h){return Gn([h])},rebufferingGoal:0,
bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],
disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,
loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return Gn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return Gn([h,k])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,
durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new tg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Qn,[null].concat(x(Na.apply(0,arguments)))))},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,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,
playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,
disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return P(function(k){return k.return(fo(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.ab(g)}
function go(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}
function ho(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return En(a,b,c||bo(),d,"")}
function fo(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=Qb().Id(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Hc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return yc(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=sc&&c.type!="image"||b.push(c);return b}function co(a){return Gn([a],a)}function eo(a){return Gn([a],a)}S("shaka.util.PlayerConfiguration",ao);ao.mergeConfigObjects=ho;ao.createDefaultForLL=go;ao.createDefault=bo;function io(){this.g=null;this.h=[]}function jo(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function ko(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 lo(){this.i=this.h=null;this.g=[]}function mo(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 no(){this.D=this.V=NaN;this.l="";this.j=this.jj=this.A=this.C=this.K=this.F=this.u=this.m=this.J=this.G=this.i=this.R=this.T=this.M=this.O=this.P=NaN;this.L=0;this.H=this.I=NaN;this.g=new io;this.h=new lo}function oo(a,b,c){a.P=b;a.O=c}function po(a,b,c){a.V=b;a.D=c}function qo(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function ro(a,b){a.j=isNaN(a.j)?b:a.j+b}
function so(a){var b=a.V,c=a.D,d=a.l,e=a.C,f=a.O,g=a.P,h=a.M,k=a.T,l=a.R,m=a.A,n=a.i,q=a.G,r=a.J,u=a.m,v=jo(a.g,"playing"),w=jo(a.g,"paused"),z=jo(a.g,"buffering"),y=a.u,B=a.F,C=a.K,E=a.jj,D=a.j,A=a.L,F=a.I,J=a.H,H=ko(a.g),K=[];a=t(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,K.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:u,playTime:v,pauseTime:w,bufferingTime:z,licenseTime:y,liveLatency:B,maxSegmentDuration:C,manifestSizeBytes:E,bytesDownloaded:D,nonFatalErrorCount:A,manifestPeriodCount:F,manifestGapCount:J,stateHistory:H,switchHistory:K}};function to(a,b,c,d){kb.call(this);this.M=a;this.T=b;this.ya=d.networkingEngine;this.m=c;this.D=null;this.sa=0;this.La=d.Dd;this.G=d.Nl;this.Na=d.Ol;this.g=d.config;this.l=this.H=this.h=null;this.ha=!1;this.I=d.Zl;this.oa=!1;this.i=null;this.Z=!1;this.A=null;this.L=new Map;this.ra=!1;this.Ca=d.Yl;this.V=new no;this.aa=new Og;this.C=new Og;this.O=null;this.j=!1;this.W=d.kk;this.R=this.u=null;this.P=!1;this.K=[];this.J=[];this.F=!0}ma(to,kb);function uo(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
function vo(a){if(a.J)for(var b=t(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function wo(a,b){a.O=b;a.P=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=to.prototype;p.getStartTime=function(){return this.m};p.hd=function(){return this.M};p.rh=function(){return this.h};function xo(a){a.oa=!0;return a.I}p.getStats=function(){return this.V};function yo(a){a.Z=!0;return a.i}p.al=function(){return this.u?dg(this.u):null};
p.$k=function(){return this.R?eg(this.R):null};function zo(a){a.ra=!0;return a.L}
p.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return sa(c,3),G(c,Ao(a),5);case 5:Bo(a);if("webkit"===window.shakaMediaKeysPolyfill){c.B(6);break}return G(c,Co(a),7);case 7:Bo(a);case 6:if(!a.W){c.B(8);break}return G(c,Do(a),9);case 9:Bo(a);case 8:if(!a.W||!a.i){c.B(10);break}return G(c,li(a.i),11);case 11:Bo(a);case 10:a.C.resolve();ua(c,0);break;case 3:b=va(c),b instanceof U&&(b.code==7001||b.code==7003)||a.C.reject(b),
I(c)}})})()};p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):kb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.C.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Bo(a){if(a.j)throw new U(2,7,7003);}function Eo(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
function Ao(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:Eo(a,"manifest-parser");a.l||(a.H=Ki(a.M,a.T),a.l=a.H(),a.l.configure(a.g.manifest,function(){return a.F}));b=Date.now()/1E3;Eo(a,"manifest");if(a.h){h.B(2);break}return G(h,a.l.start(a.M,a.Na),3);case 3:return a.h=h.h,Fo(a.h),G(h,Go(a),2);case 2:return a.aa.resolve(),c=new T("manifestparsed",void 0),G(h,Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new U(2,4,4036);Fo(a.h);d=Ai(a.G,a.h);if(!d){h.B(6);
break}e=new T("trackschanged",void 0);return G(h,Promise.resolve(),7);case 7:Bo(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,a.V.J=g,I(h)}})}
function Co(a,b){var c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.h||a.i)return g.return();Eo(a,"drm-engine");a.sa=Date.now()/1E3;a.i=a.La();a.G.h=a.i;a.i.configure(a.g.drm,function(){return a.F});c=mg(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.U());return G(g,Lh(a.i,c,a.h.offlineSessionIds,d),2);case 2:Bo(a);if(!b){g.B(3);break}return G(g,a.i.cc(b),4);case 4:Bo(a);case 3:return G(g,yi(a.G,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new T("trackschanged",
void 0);return G(g,Promise.resolve(),7);case 7:a.dispatchEvent(f),I(g)}})}p.configure=function(a,b){a=Fn(a,b);ho(this.g,a)};p.getConfiguration=function(){return Hd(this.g)};
function Go(a){var b,c,d,e,f;return P(function(g){a.D||(a.D=a.g.adaptationSetCriteriaFactory(),a.D.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:a.g.preferredAudioChannelCount,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",
activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.h.variants.length!=1&&a.h.type!="HLS")return g.B(0);b=Ho(a);if(!b)return g.B(0);c=[];d=t([b.video,b.audio]);for(e=d.next();!e.done;e=d.next())(f=e.value)&&!f.segmentIndex&&c.push(f.createSegmentIndex());return c.length>0?G(g,Promise.all(c),0):g.B(0)})}
function Do(a){var b,c,d,e,f;return P(function(g){!a.u&&(b=Ho(a))&&(a.u=b);if(!a.u)return g.B(0);c=a.h.presentationTimeline.U();d=[];e=a.u;e.video&&d.push(Io(a,e.video,c));e.audio&&d.push(Io(a,e.audio,c));(f=ng(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&rg(e.audio,f,a.g)&&(d.push(Io(a,f,c)),a.R=f);return G(g,Promise.all(d),0)})}
function Ho(a){if(!a.A){var b=a.g.abrFactory;a.A=b();a.A.configure(a.g.abr)}b=mg(a.h.variants);b=a.D.create(b);a.A.setVariants(Array.from(b.values()));return a.A.chooseVariant(!0)}
function Io(a,b,c){var d,e,f,g,h;return P(function(k){if(k.g==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new tm(d,b,function(l,m,n){return ln(l,m,n||null,a.g.streaming.retryParameters,a.ya,a.F)},!1),a.L.set(b.id,e),b.segmentIndex?k.B(2):G(k,b.createSegmentIndex(),2);f=typeof a.m==="number"?a.m:0;g=b.segmentIndex.ec(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=gg(b.segmentIndex));return h?c?h.ia?G(k,wm(e,h.ia),0):k.B(0):G(k,vm(e,h.startTime),0):k.B(0)})}p.Em=function(){return this.C};
p.destroy=function(){var a=this,b,c,d;return P(function(e){if(e.g==1)return a.j=!0,!a.l||a.ha?e.B(2):G(e,a.l.stop(),2);if(e.g!=4)return a.A&&a.A.release(),a.I&&!a.oa&&a.I.release(),!a.i||a.Z?e.B(4):G(e,a.i.destroy(),4);if(a.L.size>0&&!a.ra)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Cm(d);I(e)})};function Fo(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",to);
to.prototype.destroy=to.prototype.destroy;to.prototype.waitForFinish=to.prototype.Em;to.prototype.getPrefetchedTextTrack=to.prototype.$k;to.prototype.getPrefetchedVariantTrack=to.prototype.al;function Jo(a,b){kb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{zd:null,yd:Ko,kd:function(d,e){return Lo(c,"enter",d,e)}},{zd:Mo,yd:Ko,kd:function(d,e){return Lo(c,"enter",d,e)}},{zd:No,yd:Ko,kd:function(d,e){return Lo(c,"enter",d,e)}},{zd:Ko,yd:Mo,kd:function(d,e){return Lo(c,"exit",d,e)}},{zd:Ko,yd:No,kd:function(d,e){return Lo(c,"exit",d,e)}},{zd:Mo,yd:No,kd:function(d,e){e?Lo(c,"skip",d,e):(Lo(c,"enter",d,e),Lo(c,"exit",d,e))}},{zd:No,yd:Mo,kd:function(d,e){return Lo(c,"skip",
d,e)}}];this.h=new Tc;this.h.o(this.i,"regionremove",function(d){c.g.delete(d.region)})}ma(Jo,kb);Jo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;kb.prototype.release.call(this)};
Jo.prototype.j=function(a,b){if(!this.l||a!=0){this.l=!1;for(var c=t(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Mo:a>d.endTime?No:Ko;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.zd==e&&h.yd==f&&h.kd(d,b)}}};function Lo(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Mo=1,Ko=2,No=3;function Oo(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=Po(a);if(e=Qo.get(d))return m.return(e);f=0;g=ch([a],c);sa(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ua(m,3);break;case 2:k=va(m);if(!k||k.code!=1002&&k.code!=1001){m.B(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})}
function Po(a){a=(new rb(a)).Tb.split("/").pop().split(".");return a.length==1?"":a.pop().toLowerCase()}
var Qo=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");/*
 @license
 Copyright 2013 Ali Al Dallal

 Licensed under the MIT license.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
*/
for(var Ro={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili",
"be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",
cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)",
"en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)",
"es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",
gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",
id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",
ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)",
"nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
"ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili",
"sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",
tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",
zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},So=t(Object.keys(Ro)),To=So.next();!To.done;To=So.next()){var Uo=To.value;Ro[Uo.toLowerCase()]=Ro[Uo]};function Vo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Vo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Oe,e=a.fontStyle==Pe,f=a.textDecoration.includes(Qe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=Wo(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=Wo(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function Wo(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&a.length>7&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Xo(a,b){var c=[];a=t(Yo(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Xo(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Vo(d,b);c.push(e)}return c}
function Yo(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Pg:void 0},c=a.next())d.Pg=c.value,b.some(function(e){return function(f){return Ce(e.Pg,f)}}(d))||b.push(d.Pg);return b}
function Zo(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
function $o(a,b){var c=Xo(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={Kd:void 0},e=c.next())f.Kd=e.value,!b.some(function(g){return function(h){return h.startTime==g.Kd.startTime&&h.endTime==g.Kd.endTime&&h.text==g.Kd.payload?!0:!1}}(f))&&f.Kd.payload&&(e=Zo(f.Kd))&&d.push(e);b=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)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function ap(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function bp(a){var b=this;this.i=a;this.l=new Tc;this.j=null;this.h=new Map;this.g=-1;this.A=!1;this.u=null;this.D=function(){b.l.Fa(b.i,"textchanged",b.m);b.l.Fa(b.j.textTracks,"change",b.C);for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.i.zc();d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||(f.track.mode="disabled");b.h.delete(e.id)}else{f=
b.j.ownerDocument.createElement("track");f.kind=cp(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in Ro)h=Ro[e.language];else{var k=Dc(e.language);k in Ro&&(h=Ro[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in Ro&&(f.srclang=e.language);f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=t(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();
b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.A?"showing":"hidden")):b.g=-1);b.h=c};this.C=function(){if(!b.u){var c=b.j;b.u=(new Df(function(){b.u=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=t(b.h),f=e.next();!f.done;f=e.next()){var g=t(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=t(b.h);
for(f=e.next();!f.done;f=e.next())g=t(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.fg({id:d}));b.i.Zd(d>-1&&b.h.get(d).track.mode==="showing")}})).Y(0)}};this.l.o(a,"loaded",function(){return b.enableTextDisplayer()});this.enableTextDisplayer()}p=bp.prototype;p.configure=function(){};
p.remove=function(a,b){if(this.i)this.h.has(this.g)&&ap(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&$o(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.D(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.A};
p.setTextVisibility=function(a){this.A=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.l===3)if(b=Array.from(this.i.h.textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=t(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.l===2&&(this.j=this.i.h,this.l.ua(this.i,"unloading",this.D),this.l.o(this.i,"textchanged",this.m),this.l.o(this.j.textTracks,"change",this.C),this.m())};
function cp(a){var b=Qb();return a.forced&&b.Ja()==="WEBKIT"?"forced":a.kind==="caption"||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}S("shaka.text.NativeTextDisplayer",bp);bp.prototype.enableTextDisplayer=bp.prototype.enableTextDisplayer;bp.prototype.setTextLanguage=bp.prototype.setTextLanguage;bp.prototype.setTextVisibility=bp.prototype.setTextVisibility;
bp.prototype.isTextVisible=bp.prototype.isTextVisible;bp.prototype.destroy=bp.prototype.destroy;bp.prototype.append=bp.prototype.append;bp.prototype.remove=bp.prototype.remove;bp.prototype.configure=bp.prototype.configure;function dp(a,b){Zc("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=t(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=dp.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;ap(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&$o(this.g,a)};p.destroy=function(){this.g&&(ap(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&ep(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){ep(this)};function ep(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
S("shaka.text.SimpleTextDisplayer",dp);dp.prototype.enableTextDisplayer=dp.prototype.enableTextDisplayer;dp.prototype.setTextLanguage=dp.prototype.setTextLanguage;dp.prototype.setTextVisibility=dp.prototype.setTextVisibility;dp.prototype.isTextVisible=dp.prototype.isTextVisible;dp.prototype.destroy=dp.prototype.destroy;dp.prototype.append=dp.prototype.append;dp.prototype.remove=dp.prototype.remove;dp.prototype.configure=dp.prototype.configure;function fp(){}p=fp.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",fp);fp.prototype.enableTextDisplayer=fp.prototype.enableTextDisplayer;fp.prototype.setTextLanguage=fp.prototype.setTextLanguage;fp.prototype.setTextVisibility=fp.prototype.setTextVisibility;
fp.prototype.isTextVisible=fp.prototype.isTextVisible;fp.prototype.destroy=fp.prototype.destroy;fp.prototype.append=fp.prototype.append;fp.prototype.remove=fp.prototype.remove;fp.prototype.configure=fp.prototype.configure;function gp(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.u=b;this.D=this.A=null;this.g=W("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.C=new Df(function(){c.j.paused||hp(c)});ip(this);this.l=new Map;this.i=new Tc;this.i.o(document,"fullscreenchange",function(){hp(c,!0)});this.i.o(this.j,"seeking",function(){hp(c,!0)});
this.i.o(this.j,"ratechange",function(){ip(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.A=e/d:c.A=null});this.F=null;"ResizeObserver"in window&&(this.F=new ResizeObserver(function(){hp(c,!0)}),this.F.observe(this.g));this.G=new Map}p=gp.prototype;p.configure=function(a){this.D=a;ip(this);hp(this,!0)};
p.append=function(a){var b=[].concat(x(this.h));a=t(Yo(a));for(var c=a.next(),d={};!c.done;d={Qg:void 0},c=a.next())d.Qg=c.value,b.some(function(e){return function(f){return Ce(f,e.Qg)}}(d))||this.h.push(d.Qg);this.h.length&&ip(this);hp(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&(this.C.stop(),this.C=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.F&&(this.F.disconnect(),this.F=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});hp(this,c>this.h.length);this.h.length||ip(this);return!0};
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.u.appendChild(this.g),hp(this,!0)):this.g.parentElement&&this.u.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function ip(a){a.C&&(a.h.length?a.C.xa((a.D?a.D.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.C.stop())}
function jp(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function kp(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.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.hk:null;l&&(g.push(l.Rg),l.qd&&g.push(l.qd),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?jp(a,n)||(f=!0):(lp(a,k,e),l=a.l.get(k),n=l.hk,f=!0));k.nestedCues.length>0&&n&&kp(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,r){return q.startTime!=
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.qd?(d.qd.contains(c)&&d.qd.removeChild(c),c.appendChild(d.qd),d.qd.appendChild(d.Rg)):c.appendChild(d.Rg)}}function hp(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(b===void 0?0:b)){b=t(a.G.values());for(var d=b.next();!d.done;d=b.next())Tj(d.value);Tj(a.g);a.l.clear();a.G.clear()}a.m&&kp(a,a.h,a.g,c,[])}}
function lp(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=W(e);e!="br"&&mp(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.A===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==vd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==vd?"%":"px");if(a.G.has(c))c=a.G.get(c);else{e=W("span");var k=g.heightUnits==vd?"%":"px",l=g.widthUnits==vd?"%":"px",m=g.viewportAnchorUnits==
vd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.A===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=
g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=b.displayAlign=="before"?"flex-start":
b.displayAlign=="center"?"center":"flex-end";a.G.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{Rg:f,hk:e,qd:c})}function np(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==se?c:a==="left"||a==="start"&&b===ue||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===ue?"line-right":"center"}
function mp(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;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=op(c.linePadding,c,a.u);f.paddingRight=op(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=pp(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=k)}if(h&&
!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
d=a.D?a.D.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=op(c.fontSize||"1em",c,a.u,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==we&&(g=1,h=16,a.A&&a.A<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==ve?(f.width="100%",c.lineAlign==xe?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==xe?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==xe?f.right=d+"%":c.lineAlign==
"end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=np(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==ve?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==ve?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==ve?(f.left=c.position+"%",f.width="auto"):f.top=
c.position+"%",c.size&&(f.transform="translateX(-50%)"));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==ve?f.width=c.size+"%":f.height=c.size+"%")}
function op(a,b,c,d){d=d===void 0?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function pp(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}S("shaka.text.UITextDisplayer",gp);gp.prototype.enableTextDisplayer=gp.prototype.enableTextDisplayer;
gp.prototype.setTextLanguage=gp.prototype.setTextLanguage;gp.prototype.setTextVisibility=gp.prototype.setTextVisibility;gp.prototype.isTextVisible=gp.prototype.isTextVisible;gp.prototype.remove=gp.prototype.remove;gp.prototype.destroy=gp.prototype.destroy;gp.prototype.append=gp.prototype.append;gp.prototype.configure=gp.prototype.configure;function qp(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=Xo(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
break;case "right":g.push("align:right");break;case te:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function rp(a,b){this.g=b;this.j=a;this.F=new Map;this.l=void 0;this.D=!1;this.J=!0;this.u=this.I=!1;this.C=this.A=void 0;this.H=0;this.K={request:!1,response:!1,event:!1};this.m={};this.i=new Tc;this.G=[];this.h=null}rp.prototype.setMediaElement=function(a){this.h=a;sp(this)};rp.prototype.configure=function(a){this.g=a;tp(this)};function up(a){a.F.clear();a.D=!1;a.J=!0;a.I=!1;a.u=!1;a.A=0;a.C=0;a.H=0;a.K={request:!1,response:!1,event:!1};vp(a);a.m={};a.h=null;a.i.Sa()}
function wp(a,b){a.u=b;a.u?a.l==xp?a.l=yp:a.l==zp&&(a.l=Ap):a.l==yp?a.l=xp:a.l==Ap&&(a.l=zp)}function Bp(a,b){if(a.g&&a.g.enabled&&(Cp(a,"ps",{td:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.H=b}).catch(function(){a.H=0})}}
function Dp(a,b,c){try{if(!a.g.enabled)return b;var d=Ep(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=Fp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Gp;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=Hp;break a}e=void 0}d.ot=e;d.su=
!0;var f=Ip(d);return Jp(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function sp(a){a.i.o(a.h,"playing",function(){a.C||(a.C=Date.now());Cp(a,"ps",{td:"p"})});a.i.o(a.h,"volumechange",function(){Cp(a,a.h.muted?"m":"um")});a.i.o(a.h,"play",function(){a.A||(a.A=Date.now(),Cp(a,"ps",{td:"s"}))});a.i.o(a.h,"pause",function(){Cp(a,"ps",{td:"a"})});a.i.o(a.j,"buffering",function(){Cp(a,"ps",{td:"w"})});a.i.o(a.h,"seeking",function(){return Cp(a,"ps",{td:"k"})});a.i.o(document,"fullscreenchange",function(){Cp(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.o(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?Cp(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&Cp(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.o(a.h,"enterpictureinpicture",function(){Cp(a,"pe")});a.i.o(a.h,"leavepictureinpicture",function(){Cp(a,"pc")});"documentPictureInPicture"in window&&a.i.o(window.documentPictureInPicture,"enter",function(c){Cp(a,"pe");a.i.ua(c.window,"pagehide",function(){Cp(a,"pc")})});
a.i.o(document,"visibilitychange",function(){document.hidden?Cp(a,"b",{bg:!0}):Cp(a,"b")});a.i.o(a.j,"complete",function(){Cp(a,"ps",{td:"e"})})}function tp(a){vp(a);var b=Kp(a);b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=Lp),c>=1){var d=new Df(function(){return Cp(a,Mp)});d.xa(c);a.G.push(d)}}function vp(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.stop();a.G=[]}
function Kp(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Np&&b.enabled}):[]}function Op(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Pp&&b.enabled===!0}):[]}function Ep(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function Cp(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=Qp(a,b,Np);c=a.g.targets;if(!(a.g.version<Rp)&&c){var d=Kp(a);c=Array.from(new Set([].concat(x(Sp),x(Tp))));d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Up(e.includeKeys||[],c);f.includes(Vp)||f.push(Vp);f=Wp(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!Xp.includes(h)||!(h!=="ps"||k&&Yp.includes(k))||g&&g.length>0&&!g.includes(h))||mq(a,f,e)}}}
function nq(a,b,c){if(a.g.enabled){c=Qp(a,c,oq);var d=pq({mode:oq,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.m[d]||(a.m[d]={request:1,response:1});c.sn=a.m[d].request++;d=a.g.includeKeys||[];var e=a.g.version==Rp?Array.from(new Set([].concat(x(Sp),x(qq)))):rq;d=Up(d,e);c=Wp(c,d);sq(c,b,a.g.useHeaders)}}
function mq(a,b,c,d){var e=Ig(),f=c.url;if(c.useHeaders){b=tq(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=ch([f],e);Object.assign(d.headers,b)}else{b=Ip(b);if(!b)return;f=Jp(f,b);d&&(d.uri=f);d=ch([f],e)}a.j.Vb().request(9,d)}function sq(a,b,c){if(c)a=tq(a),Object.keys(a).length&&Object.assign(b.headers,a);else{var d=Ip(a);d&&(b.uris=b.uris.map(function(e){return Jp(e,d)}))}}
function Up(a,b){if(!a||a.length===0)return b;for(var c=t(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function Wp(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function uq(a){if(a.type===0)return vq;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?Gp:wq;if(b=="audio")return Fp;if(b=="text")return a.mimeType==="application/mp4"?xq:yq}}
function pq(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function zq(a,b){b=a.j.Pc()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Aq(a,b){b=a.j.Pc()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Bq(a,b){var c=a.j.Nb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case wq:return a.videoBandwidth||NaN;case Fp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Cq(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.U()?Dq:Eq};e.ot=uq(b);var f=e.ot===wq||e.ot===Fp||e.ot===Gp||e.ot===xq;if(b=b.stream){var g=a.j.Za();if(f&&(e.bl=zq(a,b.type),e.ot!==xq)){var h=Aq(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.ec(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!Sc(d.S(),g.S())){var k=g.S()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.Za()||1;c=Aq(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==xq&&(e.tb=Bq(a,e.ot)/1E3);return e}
function Qp(a,b,c){Object.assign(b,Ep(a));b.pr=a.j.Za();var d=b.ot===wq||b.ot===Gp;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.J);a.j.U()&&(d=Fq(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.C&&a.A?a.C-(a.H||a.A):void 0;d==void 0||a.K[c]||(b.msd=d,a.K[c]=!0);return b}
function Ip(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb: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)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function tq(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Ip(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function Jp(a,b){if(!b||a.includes("offline:"))return a;a=new rb(a);a.g.set("CMCD",b);return a.toString()}var Hp="m",Fp="a",wq="v",Gp="av",vq="i",yq="c",xq="tt",Rp=2,Eq="v",Dq="l",xp="d",yp="ld",zp="h",Ap="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:xp,dn:yp,HLS:zp,fn:Ap,wn:"s",OTHER:"o"});
var rq="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),Sp="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),qq="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Gq="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),Tp=["e","sta"],Xp="ps e t c b m um pe pc".split(" "),Yp="spawkrfeqd".split(""),Lp=10,Vp="ts",Mp="t",oq="request",Pp="response",Np="event";function Hq(a){this.h=a;this.g=null}p=Hq.prototype;p.configure=function(a){this.h=a};p.Xi=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Iq)?this.g.get(Iq)*1E3:null};p.Wi=function(){return this.h.enabled&&this.g&&this.g.has(Jq)?this.g.get(Jq)*1E3:null};p.fl=function(){return this.h.enabled&&this.g&&this.g.has(Kq)?this.g.get(Kq):null};p.hl=function(){return this.h.enabled&&this.g&&this.g.has(Lq)?this.g.get(Lq):null};
p.getBandwidthEstimate=function(a){var b=this.Wi();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function Mq(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Hq);Hq.prototype.getBandwidthEstimate=Hq.prototype.getBandwidthEstimate;Hq.prototype.getRoundTripTime=Hq.prototype.hl;Hq.prototype.getResponseDelay=Hq.prototype.fl;Hq.prototype.getEstimatedThroughput=Hq.prototype.Wi;
Hq.prototype.getMaxBitrate=Hq.prototype.Xi;var Jq="etp",Iq="mb",Kq="rd",Lq="rtt";function Nq(){this.g=null;this.h=[]}function Oq(a,b){return P(function(c){if(c.g==1)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;I(c)})}Nq.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function X(a,b,c){b=b===void 0?null:b;kb.call(this);var d=this;this.l=Pq;this.h=null;this.Qe=b;this.W=!1;this.bf=new Tc;this.Re=new Tc;this.j=new Tc;this.kc=new Tc;this.Ic=new Tc;this.G=this.H=this.F=this.J=null;this.cf=0;this.ha=new Nq;this.O=this.Z=this.V=this.i=this.Hc=this.I=this.m=this.Ne=this.R=this.Di=this.ra=this.L=this.fb=this.Ca=this.Pe=this.P=this.La=this.M=this.jb=null;this.aa=!1;this.Ve=this.u=null;this.Ue=1E9;this.Ze=[];this.Ec=new Map;this.ib=[];this.Bg=-1;this.g=Qq(this);this.Dg=go();
this.T=null;this.df=-1;this.Ob=null;this.sa={width:Infinity,height:Infinity};this.Te=new xi(this.g,this.sa,null);this.Xe=[];this.C=null;this.K=this.g.adaptationSetCriteriaFactory();this.K.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Vd=this.g.preferredTextLanguage;this.ee=this.g.preferredTextRole;this.ce=this.g.preferForcedSubs;this.Se=[];c&&c(this);this.L=new rp(this,this.g.cmcd);this.ra=new Hq(this.g.cmsd);this.J=Rq(this);this.ae=this.oa=this.ya=this.D=null;this.Fg=!1;this.Cg=[];this.Eg=
new Df(function(){return P(function(e){if(e.g==1)return d.oa?G(e,d.cc(d.ae,!0),3):e.B(0);if(e.g!=4)return G(e,d.load(d.oa),4);d.Fg?d.ae.pause():d.ae.play();d.oa=null;d.Fg=!1;I(e)})});Sq&&(this.D=Sq(),this.D.configure(this.g.ads),this.Ic.o(this.D,"ad-content-pause-requested",function(e){var f;return P(function(g){if(g.g==1){d.Eg.stop();if(d.oa)return g.B(0);d.ae=d.h;d.Fg=d.isEnded();f=e.saveLivePosition||!1;return G(g,d.Ri(!0,f),3)}d.oa=g.h;I(g)})}),this.Ic.o(this.D,"ad-content-resume-requested",function(e){e=
e.offset||0;if(d.oa){var f=d.oa;f.m&&e&&(typeof f.m==="number"?f.m+=e:f.m.setTime(f.m.getTime()+e*1E3))}d.Eg.Y(.1)}),this.Ic.o(this.D,"ad-content-attach-requested",function(){return P(function(e){return d.h||!d.ae?e.B(0):G(e,d.cc(d.ae,!0),0)})}));Tq&&(this.ya=Tq(this),this.ya.configure(this.g.queue));this.bf.o(window,"online",function(){Uq(d);d.Wh()});this.We=new Df(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,k.disabledUntilTime>0&&k.disabledUntilTime<=
e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.We.stop();f&&Vq(d,!1,void 0,!1,!1)});this.Na=null;a&&(Zc("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.cc(a,!0));this.A=null}ma(X,kb);function Wq(a){a.R!=null&&(ed(a.R),a.R.release(),a.R=null)}function Xq(a,b,c){c||b.lcevc.enabled?(Wq(a),a.R==null&&(a.R=new cd(a.h,a.Di,b.lcevc,c),a.H&&(a.H.H=a.R))):Wq(a)}function Yq(a,b){return new T(a,b)}p=X.prototype;
p.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.l==Zq)return c.return();Wq(a);b=a.detach();a.l=Zq;return G(c,b,2);case 2:return G(c,a.Ug(),3);case 3:a.bf&&(a.bf.release(),a.bf=null);a.Re&&(a.Re.release(),a.Re=null);a.j&&(a.j.release(),a.j=null);a.kc&&(a.kc.release(),a.kc=null);a.Ic&&(a.Ic.release(),a.Ic=null);a.Ve=null;a.g=null;a.C=null;a.Qe=null;a.L=null;a.ra=null;if(!a.J){c.B(4);break}return G(c,a.J.destroy(),5);case 5:a.J=null;case 4:a.u&&(a.u.release(),a.u=null),
a.ya&&(a.ya.destroy(),a.ya=null),kb.prototype.release.call(a),I(c)}})};function $q(a,b){ar.set(a,b)}function br(){window.Promise||bb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;Qb();return Ii()?!0:Ji().canPlayType("application/x-mpegurl")!=""}function cr(a,b){a.dispatchEvent(Yq("onstatechange",(new Map).set("state",b)))}
p.cc=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.l==Zq)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return G(g,c.detach(),2);case 2:return G(g,dr(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(cr(c,"attach"),e=function(){var h=er(c,!1);h&&fr(c,h)},c.Re.o(a,"error",e),c.h=a,c.L&&c.L.setMediaElement(a));Qb();if(!b||!Ii()||c.H){g.B(6);break}return G(g,gr(c),6);case 6:ya(g);c.ha.release();za(g,0);break;case 5:return f=
va(g),G(g,c.detach(),10);case 10:throw f;}})};p.Fi=function(a){this.Di=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return P(function(c){if(c.g==1){if(b.l==Zq)throw new U(2,7,7E3);return G(c,b.tc(!1,a),2)}if(c.g!=3)return G(c,dr(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Re.Sa(),b.h=null),cr(b,"detach"),b.D&&!a&&b.D.release()}finally{b.ha.release()}I(c)})};
function dr(a,b){var c;return P(function(d){return d.g==1?(c=++a.cf,G(d,Oq(a.ha,b),2)):c!=a.cf?(a.ha.release(),d.return(!0)):d.return(!1)})}
p.tc=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:return c.l!=Zq&&(c.l=Pq),G(B,dr(c,"unload"),2);case 2:if(B.h)return B.return();ta(B,3);c.aa=!1;cr(c,"unload");Wq(c);d=c.Se.map(function(C){return C()});c.Se=[];return G(B,Promise.all(d),5);case 5:c.dispatchEvent(Yq("unloading"));c.Pe&&(c.Pe.release(),c.Pe=null);c.Ca&&(c.Ca.release(),c.Ca=null);c.fb&&(c.fb.release(),c.fb=null);c.h&&(c.j.Sa(),c.kc.Sa());c.We.stop();
c.jb&&(c.jb.release(),c.jb=null);c.La&&(c.La.stop(),c.La=null);if(!c.I){B.B(6);break}return G(B,c.I.stop(),7);case 7:c.I=null,c.Hc=null;case 6:c.u&&c.u.stop();if(!c.m){B.B(8);break}return G(B,c.m.destroy(),9);case 9:c.m=null;case 8:c.M&&(c.M.release(),c.M=null);c.G&&(c.G.release(),c.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.F){B.B(10);break}return G(B,c.F.destroy(),11);case 11:c.F=null;case 10:if(!c.H){B.B(12);break}return G(B,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.D&&!b)c.D.onAssetUnload();
c.oa&&!b&&(c.oa.destroy(),c.oa=null);b||c.Eg.stop();c.L&&up(c.L);c.ra&&(c.ra.g=null);if(!c.A){B.B(14);break}return G(B,c.A.destroy(),15);case 15:c.A=null;case 14:c.W=!1;if(c.h){e=t(c.Cg);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Cg=[];Rj(c.h)&&c.h.load()}if(!c.F){B.B(16);break}return G(B,c.F.destroy(),17);case 17:c.F=null;case 16:c.Na&&c.V!=c.Na.hd()&&(c.Na.j||c.Na.destroy(),c.Na=null);c.V=null;c.Z=null;c.P=null;if(c.i){h=t(c.i.variants);
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=t([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=t(c.i.textStreams);for(u=r.next();!u.done;u=r.next())v=u.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Wf.clear(),Gg.clear());c.i=null;c.C=new no;c.Ci=null;c.Ob=null;c.T=null;c.df=-1;c.Ze=[];w=t(c.Ec.values());for(z=w.next();!z.done;z=w.next())y=z.value,y.stop();c.Ec.clear();c.ib=[];c.Bg=-1;c.J&&c.J.Mi();
hr(c);case 3:ya(B);c.ha.release();za(B,4);break;case 4:Qb();if(a&&Ii()&&!c.H&&c.h)return G(B,gr(c),0);B.B(0)}})};p.Dm=function(a){this.O=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,z;return P(function(y){switch(y.g){case 1:if(d.l==Zq)throw new U(2,7,7E3);e=null;f="";if(a instanceof to){if(a.j)throw new U(2,7,7006);e=a;f=e.hd()||""}else f=a||"";return G(y,Oq(d.ha,"load"),2);case 2:d.ha.release();if(!d.h)throw new U(2,7,7002);if(!d.V){y.B(3);break}d.V=f;return G(y,d.tc(!1),3);case 3:g=++d.cf;h=function(){return P(function(B){if(B.g==1)return d.cf==g?B.B(0):e?G(B,e.destroy(),3):B.B(3);throw new U(2,
7,7E3);})};k=function(B,C){return P(function(E){switch(E.g){case 1:return ta(E,2),G(E,Oq(d.ha,C),4);case 4:return G(E,h(),5);case 5:return G(E,B(),6);case 6:return G(E,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:ya(E),d.ha.release(),za(E,0)}})};sa(y,5,6);b==null&&e&&(b=e.getStartTime());d.O=b;d.aa=!1;d.dispatchEvent(Yq("loading"));if(e){c=e.T;y.B(8);break}if(c){y.B(8);break}return G(y,k(function(){return P(function(B){if(B.g==1)return G(B,ir(d,f),2);c=B.h;I(B)})},"guessMimeType_"),8);case 8:l=!!e;if(e){wo(e,
d);d.C=e.getStats();y.B(11);break}return G(y,jr(d,f,b,c,!0,d.g),12);case 12:(e=y.h)?(e.F=!1,wo(e,d),d.C=e.getStats(),e.start(),e.C.catch(function(){})):d.C=new no;case 11:m=!e;n=Date.now()/1E3;d.C=e?e.getStats():new no;d.V=f;d.Z=c||null;hr(d);q=function(){var B=d.h?d.h.buffered:null;return{start:Hj(B)||0,end:Ij(B)||0}};d.Ca=new qm(q);d.Ca.addEventListener("regionadd",function(B){kr(d,B.region,"metadataadded")});if(m)return G(y,k(function(){return P(function(B){return G(B,lr(d,c),0)})},"initializeSrcEqualsDrmInner_"),
23);d.fb=new qm(q);return G(y,k(function(){return P(function(B){if(B.g==1)return G(B,Promise.race([e.aa,e.C]),2);d.Hc=e.H;var C=e;C.ha=!0;d.I=C.l;d.i=e.rh();I(B)})},"waitForFinish"),15);case 15:if(d.H){y.B(16);break}return G(y,k(function(){return P(function(B){return G(B,gr(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.A.enableTextDisplayer?d.A.enableTextDisplayer():Zc("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),
G(y,k(function(){return P(function(B){return G(B,e.C,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Te=e.G;d.I&&d.I.setMediaElement&&d.h&&d.I.setMediaElement(d.h);d.Pe=xo(e);d.Ne=e.Ca;if(r=e.D)d.K=r;l&&d.h&&d.h.nodeName==="AUDIO"&&(mr(d),d.configure("manifest.disableVideo",!0));if(e.i){y.B(19);break}return G(y,k(function(){return P(function(B){return G(B,Co(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.F=yo(e),G(y,k(function(){return P(function(B){return G(B,d.F.cc(d.h),0)})},
"drmEngine_.attach"),21);case 21:return u=d.g.abrFactory,d.u&&d.Ve==u||(d.Ve=u,d.u&&d.u.release(),d.u=u(),typeof d.u.setMediaElement!="function"&&(Zc("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.u.setMediaElement=function(){}),typeof d.u.setCmsdManager!="function"&&(Zc("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.u.setCmsdManager=function(){}),typeof d.u.trySuggestStreams!="function"&&(Zc("AbrManager w/o trySuggestStreams",
"Please use an AbrManager with trySuggestStreams function."),d.u.trySuggestStreams=function(){}),d.u.configure(d.g.abr)),v=zo(e),w=e.u,G(y,k(function(){return P(function(B){return G(B,nr(d,n,w,v),0)})},"loadInner_"),22);case 22:vo(e);d.Z&&Qb().kg()&&of(d.Z)&&Ek(d.H,d.V,d.Z);y.B(14);break;case 23:return G(y,k(function(){return P(function(B){return G(B,or(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Yq("loaded"));case 6:ya(y);if(!e){y.B(25);break}return G(y,e.destroy(),25);case 25:d.Na=
null;za(y,0);break;case 5:z=va(y);if(!z||z.code==7E3){y.B(27);break}return G(y,d.tc(!1),27);case 27:throw z;}})};function mr(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
p.ck=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d;return P(function(e){return e.g==1?G(e,pr(c),2):e.g!=3?(d=e.h,G(e,c.tc(a,b),3)):e.return(d)})};p.Ri=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return P(function(e){return e.g==1?G(e,pr(c,b),2):e.g!=3?(d=e.h,G(e,c.detach(a),3)):e.return(d)})};
function pr(a,b){b=b===void 0?!1:b;var c,d,e;return P(function(f){if(f.g==1){c=null;if(!(a.i&&a.I&&a.Hc&&a.V&&a.g))return f.B(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return G(f,qr(a,a.V,d,a.Z,a.g,!0,!1),3)}if(f.g!=2){c=f.h;a.Xe.push(c);a.I&&a.I.setMediaElement&&a.I.setMediaElement(null);if(e=a.m?a.m.u:null)c.u=e;var g=c,h=a.I,k=a.Hc;g.h=a.i;g.l=h;g.H=k;c.D=a.K;c.start();a.i=null;a.I=null;a.Hc=null;a.u=null;a.Ve=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g;return P(function(h){if(h.g==1)return f=Qq(e),ho(f,d||e.g,Qq(e)),G(h,jr(e,a,b,c,!1,f),2);(g=h.h)?g.start():fr(e,new U(2,7,7005));return h.return(g)})};p.Ug=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=t(a.Xe);for(d=c.next();!d.done;d=c.next())e=d.value,e.j||b.push(e.destroy());a.Xe=[];return G(f,Promise.all(b),0)})};
function jr(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return P(function(m){if(m.g==1)return d?m.B(2):G(m,ir(a,b),3);m.g!=2&&(d=m.h);if(g=rr(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=qr(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.F=!1;return n}):l.then(function(n){a.Xe.push(n);return n});return m.return(l)})}
function qr(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,r,u,v,w,z,y,B,C,E;return P(function(D){if(D.g==1){h=null;k=Hd(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.P&&h.j?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.sa.width!=Infinity||a.sa.height!=Infinity||a.g.ignoreHardwareResolution)return D.B(2);n=Qb();return G(D,n.wc(),3)}D.g!=2&&(q=D.h,a.sa.width=q.width,a.sa.height=q.height);r=new xi(k,a.sa,null);u={networkingEngine:a.J,filter:function(A){var F,
J;return P(function(H){if(H.g==1)return G(H,yi(r,A),2);if(H.g!=4){F=H.h;if(!F)return H.B(0);J=Yq("trackschanged");return G(H,Promise.resolve(),4)}h.dispatchEvent(J);I(H)})},makeTextStreamsForClosedCaptions:function(A){return sr(a,A)},onTimelineRegionAdded:function(A){rm(h.I,A)},onEvent:function(A){return h.dispatchEvent(A)},onError:function(A){return h.onError(A)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.m&&h.P&&a.m.updateDuration()},newDrmInfo:function(A){var F=
h.i,J=F?F.g:null;J&&F.C&&Bi(r,J.keySystem,A)},onManifestUpdated:function(){var A=(new Map).set("isLive",a.U());h.dispatchEvent(Yq("manifestupdated",A));uo(h,!1,function(){if(a.D)a.D.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},onMetadata:function(A,F,J,H){var K=A;if(A=="com.apple.hls.interstitial"||A=="com.apple.hls.overlay")if(K="com.apple.quicktime.HLS",A={startTime:F,endTime:J,values:H},a.D)a.D.onHLSInterstitialMetadata(a,a.h,A);H=t(H);A=H.next();
for(var L={};!A.done;L={Qh:void 0},A=H.next())L.Qh=A.value,L.Qh.name!="ID"&&uo(h,!1,function(O){return function(){tr(a,F,J,K,O.Qh)}}(L))},disableStream:function(A){return a.disableStream(A,a.g.streaming.maxDisabledTime)},addFont:function(A,F){return a.addFont(A,F)}};v=new qm(function(){return a.wa()});v.addEventListener("regionadd",function(A){var F=A.region;ur(a,"timelineregionadded",F,h);uo(h,!1,function(){a.D&&(a.D.onDashTimedMetadata(F),a.D.onDASHInterstitialMetadata(a,a.h,F))})});w=null;k.streaming.observeQualityChanges&&
(w=new km(function(){return a.Pc()}),w.addEventListener("qualitychange",function(A){vr(a,A.quality,A.position)}),w.addEventListener("audiotrackchange",function(A){vr(a,A.quality,A.position,!0)}));z=!0;y={Dc:a.J,onError:function(A){return h.onError(A)},Sf:function(A){uo(h,!0,function(){a.F&&wr(a,A)})},onExpirationUpdated:function(A,F){var J=Yq("expirationupdated");h.dispatchEvent(J);if((J=h.l)&&J.onExpirationUpdated)J.onExpirationUpdated(A,F)},onEvent:function(A){h.dispatchEvent(A);A.type=="drmsessionupdate"&&
z&&(z=!1,A=Date.now()/1E3-h.sa,(a.C||h.getStats()).m=A,a.R&&ed(a.R))}};B=Rq(a,l);bh(a.J,B);C=function(){return a.Dd(y)};E={config:k,Ol:u,Zl:v,Yl:w,Dd:C,Nl:r,networkingEngine:B,kk:f};h=new to(b,d,c,E);return D.return(h)})}
function ir(a,b){var c,d,e,f;return P(function(g){if(g.g==1)return c=a.g.manifest.retryParameters,G(g,Oo(b,a.J,c),2);d=g.h;d=="application/x-mpegurl"&&(e=Qb(),e.Ja()==="WEBKIT"&&(d="application/vnd.apple.mpegurl"));d=="video/quicktime"&&(f=Qb(),f.Ja()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function rr(a,b){if(!Ii(Qb()))return!0;if(b){if((a.h||Ji()).canPlayType(b)=="")return!1;if(!Ii(Qb())||!Gi.has(b))return!0;if(of(b))return Qb().Ja()==="WEBKIT"&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function xr(a,b){var c=a.g.textDisplayFactory;a.Ci!==c||(b===void 0?0:b)?(b=a.A,a.A=c(),a.A.configure?a.A.configure(a.g.textDisplayer):Zc("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.A.setTextLanguage||Zc("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.A.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.A.setTextVisibility(a.W),a.H&&kl(a.H,a.A),a.Ci=c,a.m&&bn(a.m)):a.A&&a.A.configure&&a.A.configure(a.g.textDisplayer)}
function gr(a){var b,c,d;return P(function(e){if(e.g==1)return Qb(),cr(a,"media-source"),a.g.mediaSource.useSourceElements&&Rj(a.h),xr(a),b=yr(a.h,a.A,{Qk:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),q=n.next();!q.done;q=n.next())tr(a,l,m,"org.id3",q.value);if(a.D)a.D.onHlsTimedMetadata(k,l)}},Tl:function(f){a.fb&&rm(a.fb,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Vl:function(){a.I&&a.I.update&&a.I.update()}},a.R,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ca=d,G(e,b.L,2);a.H=b;I(e)})}
function zr(a,b,c){function d(){return Ar(a)}a.j.o(b,"playing",d);a.j.o(b,"pause",d);a.j.o(b,"ended",d);a.j.o(b,"ratechange",function(){var f=a.h.playbackRate;f!=0&&(a.M&&(a.M.set(f),a.l==Br&&a.u.playbackRateChanged(f),Cr(a,f)),f=Yq("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.o(b.remote,"connect",function(){a.m&&b.remote.state=="connected"&&Dr(a);Er(a)}),a.j.o(b.remote,"connecting",function(){return Er(a)}),a.j.o(b.remote,"disconnect",function(){return P(function(f){if(f.g==1)return a.m&&b.remote.state==
"disconnected"?G(f,qn(a.m),3):f.B(2);f.g!=2&&Dr(a);Er(a);I(f)})}));b.audioTracks&&(a.j.o(b.audioTracks,"addtrack",function(){return Er(a)}),a.j.o(b.audioTracks,"removetrack",function(){return Er(a)}),a.j.o(b.audioTracks,"change",function(){return Er(a)}));b.videoTracks&&(a.j.o(b.videoTracks,"addtrack",function(){return Er(a)}),a.j.o(b.videoTracks,"removetrack",function(){return Er(a)}),a.j.o(b.videoTracks,"change",function(){return Er(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&
a.j.o(b,"webkitpresentationmodechanged",function(){a.Qe&&xr(a,!0)});if(b.textTracks){var e=function(){a.l===Fr&&a.A instanceof bp&&Dr(a);Er(a)};a.j.o(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Gr(a,f);break;case "chapters":Hr(a,f);break;default:e()}});a.j.o(b.textTracks,"removetrack",e);a.j.o(b.textTracks,"change",e)}b.preload!="none"&&a.j.ua(b,"loadedmetadata",function(){a.C.G=Date.now()/1E3-c})}
function nr(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N;return P(function(M){switch(M.g){case 1:cr(a,"load");e=a.h;a.M=new gm({xf:function(){return e.playbackRate},jd:function(){return e.defaultPlaybackRate},ei:function(R){e.playbackRate=R},pj:function(R){e.currentTime+=R}});zr(a,e,b);"onchange"in window.screen&&a.j.o(window.screen,"change",function(){if(a.K.getConfiguration){var R=a.K.getConfiguration();R.hdrLevel=="AUTO"?Ir(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&
(R.hdrLevel="AUTO",a.K.configure(R),Ir(a))}});f=!1;g=t(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=fd(l));Xq(a,a.g,f);a.Vd=a.g.preferredTextLanguage;a.ee=a.g.preferredTextRole;a.ce=a.g.preferForcedSubs;Jr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(R,V,xa){a.i&&a.m&&R!=a.m.u&&Kr(a,R,!0,V===void 0?!1:V,xa===void 0?0:xa)});a.u.setMediaElement(e);a.u.setCmsdManager(a.ra);a.m=Lr(a);a.m.configure(a.g.streaming);
a.l=Br;a.dispatchEvent(Yq("streaming"));m=c;case 2:(q=a.m.u)||m||(m=Mr(a,!0));r=[];n=q||m;u=t([n.video,n.audio]);for(v=u.next();!v.done;v=u.next())(w=v.value)&&!w.segmentIndex&&(r.push(w.createSegmentIndex()),w.dependencyStream&&r.push(w.dependencyStream.createSegmentIndex()));if(!(r.length>0)){M.B(4);break}return G(M,Promise.all(r),4);case 4:if(!n||n.disabledUntilTime!=0){M.B(2);break}if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
a.configure(a.Dg):bb("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));a.L&&(wp(a.L,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),Bp(a.L,b*1E3));Jr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Sm(a.m,a.g.playRangeStart,a.g.playRangeEnd);a.aa=!0;a.dispatchEvent(Yq("canupdatestarttime"));z=function(R){a.G=Nr(a,R);a.jb=Or(a,R);Pr(a,e,!1)};
a.g.streaming.startAtSegmentBoundary||(y=a.O,y==null&&a.i.startTime&&(y=a.i.startTime),z(y));if(q){M.B(7);break}if(!a.g.streaming.startAtSegmentBoundary){M.B(8);break}B=a.i.presentationTimeline;a.O instanceof Date&&(E=B.m||B.i,D=a.O.getTime()/1E3-E,D!=null&&(C=D));C==null&&(C=typeof a.O==="number"?a.O:a.h.currentTime);a.O==null&&a.i.startTime&&(C=a.i.startTime);A=B.fc();F=B.Lb();C<A?C=A:C>F&&(C=F);return G(M,Qr(m,C),9);case 9:J=M.h,z(J);case 8:Kr(a,m,!0,!1,0);case 7:return a.G.ready(),H=a.zc().find(function(R){return R.active}),
H||((K=ng(a.i.textStreams,a.Vd,a.ee,a.ce)[0]||null)&&mo(a.C.h,K,!0),m&&(K?(rg(m.audio,K,a.g)&&(a.W=!0),a.W&&a.A.setTextVisibility(!0)):(a.W=!1,a.A.setTextVisibility(!1)),Rr(a)),K&&(a.g.streaming.alwaysStreamText||a.Wc())&&(an(a.m,K),Sr(a))),G(M,a.m.start(d),10);case 10:a.g.abr.enabled&&(a.u.enable(),Tr(a));Er(a);a.i.variants.some(function(R){return R.primary});if((L=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)O=
function(){return Ur(a)},a.j.o(e,"timeupdate",O);L||(Q=function(){return Vr(a)},a.j.o(e,"timeupdate",Q),Vr(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>0&&(N=function(){var R;return P(function(V){if(V.g==1){R=a.wa().end-a.h.currentTime;if(isNaN(R)||!(R<=a.g.streaming.preloadNextUrlWindow))return V.B(0);a.j.Fa(e,"timeupdate",N);return G(V,a.preload(a.i.nextUrl),4)}a.Na=V.h;I(V)})},a.j.o(e,"timeupdate",N)),a.j.o(e,"ended",function(){a.load(a.Na||a.i.nextUrl)})));if(a.D)a.D.onManifestUpdated(L);
I(M)}})}function lr(a,b){var c,d,e;return P(function(f){return f.g==1?(c=Date.now()/1E3,d=!0,a.F=a.Dd({Dc:a.J,onError:function(g){fr(a,g)},Sf:function(){},onExpirationUpdated:function(){var g=Yq("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);g.type=="drmsessionupdate"&&d&&(d=!1,a.C.m=Date.now()/1E3-c)}}),a.F.configure(a.g.drm),e=sg([b]),a.F.O=!0,G(f,Lh(a.F,[e],[]),2)):G(f,a.F.cc(a.h),0)})}
function or(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return P(function(v){switch(v.g){case 1:cr(a,"src-equals");d=a.h;a.G=new Tl(d);e=!1;a.Se.push(function(){e=!0});a.dispatchEvent(Yq("canupdatestarttime"));a.O!=null&&a.G.Ag(a.O);a.jb=Wr(a,a.O||0);a.M=new gm({xf:function(){return d.playbackRate},jd:function(){return d.defaultPlaybackRate},ei:function(w){d.playbackRate=w},pj:function(w){d.currentTime+=w}});Pr(a,d,!0);d.textTracks&&(xr(a),f=function(w){if(!(a.A instanceof bp)){var z=Xr(a).find(function(y){return y.mode!==
"disabled"});z&&(z.mode=w?"showing":"hidden");a.A instanceof dp&&(z=Yr(a))&&(z.mode=!w&&a.A.isTextVisible()?"showing":"hidden")}},a.j.o(d,"enterpictureinpicture",function(){return f(!0)}),a.j.o(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.o(d.remote,"connect",function(){return f(!1)}),a.j.o(d.remote,"connecting",function(){return f(!1)}),a.j.o(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.o(d,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.o(g,"webkitpresentationmodechanged",function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));zr(a,d,b);h=Dp(a.L,a.V,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.H){v.B(2);break}return G(v,
a.H.destroy(),3);case 3:a.H=null;case 2:return Rj(d),d.src=h,k=Qb(),k.Oa()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&of(c)&&k.Ja()==="WEBKIT"&&d.load(),a.l=Fr,a.dispatchEvent(Yq("streaming")),l=new Og,Kl(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){a.G.ready();a.Z&&of(a.Z)||l.resolve()}),m=function(){return new Promise(function(w){var z=new Df(w);a.j.o(d.textTracks,"change",function(){return z.Y(.5)});z.Y(.5)})},Kl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,z,y,B,C;return P(function(E){if(E.g==
1)return G(E,m(),2);if(e)return E.return();Zr(a);w=Xr(a);w.some(function(D){return D.mode==="showing"})&&(a.W=!0,a.A.setTextVisibility(!0));if(!(a.A instanceof bp))for(w.length&&(a.A.enableTextDisplayer?a.A.enableTextDisplayer():Zc("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),z=!1,y=t(w),B=y.next();!B.done;B=y.next())C=B.value,C.mode!=="disabled"&&(z?(C.mode="disabled",bb("Found more than one enabled text track, disabling it",C)):($r(a,C),z=
!0));as(a);a.Z&&of(a.Z)&&l.resolve();I(E)})}),d.error?l.reject(er(a)):d.preload=="none"&&(bb('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),l.resolve()),a.j.ua(d,"error",function(){l.reject(er(a))}),G(v,Hf(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||
a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Ur(a)},a.j.o(d,"timeupdate",q);n||(r=function(){return Vr(a)},a.j.o(d,"timeupdate",r),Vr(a));a.D&&(a.D.onManifestUpdated(n),n&&(u=a.wa().end,a.j.o(d,"progress",function(){var w=a.wa().end;u!=w&&(a.D.onManifestUpdated(a.U()),u=w)})));a.aa=!0;I(v)}})}function Zr(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Gj(b,a.g.preferredAudioRole)}
function as(a){var b=a.g.preferredTextLanguage;b!=""&&a.$h(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Gr(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,tr(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Nc:void 0},f=e.next())g.Nc=f.value,g.Nc.type=="com.apple.quicktime.HLS"&&g.Nc.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Nc.startTime&&k.endTime==h.Nc.endTime}}(g)),
f||(f={startTime:g.Nc.startTime,endTime:g.Nc.endTime,values:[]},d.push(f)),f.values.push(g.Nc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.D&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.D.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Df(function(){var d=bs(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ka().Y(.5);
a.Se.push(function(){c.stop()})}}function kr(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(Yq(c,b))}function tr(a,b,c,d,e){a.Ca&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),rm(a.Ca,b))}function Hr(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Df(function(){b.mode="hidden"})).Ka().Y(.5);a.Se.push(function(){c.stop()})}}
p.dm=function(){for(var a=this.ha;a.g;)a.release()};p.Dd=function(a){return new Eh(a)};
function Rq(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?uo(b(),!0,f):f()}b||(b=function(){return null});var e=new Yg(function(f,g,h,k,l){d(function(){a.u&&a.u.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(Yq("downloadheadersreceived",g));d(function(){if(a.ra){var k=a.ra;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
m.set(q[0],Mq(q[1]))}}catch(z){}if(m=f["cmsd-dynamic"]){a:{try{var r=new Map,u=m.split(";");for(m=1;m<u.length;m++){var v=u[m].split("=");r.set(v[0],Mq(v[1]))}var w=r;break a}catch(z){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(Yq("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(Yq("downloadfailed",f))},function(f,g,h){d(function(){if(a.L){var k=a.L,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")nq(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.u?yp:xp;break a;case 3:case 2:m=k.u?Ap:zp;break a;case 5:m="s";break a}m=void 0}k.l=m}nq(k,g,{ot:Hp,su:!k.D})}}catch(q){cb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case ih:try{if(k.g.enabled){var n=Cq(k,l,g.uris[0]);n.ts=Date.now();k.F.set(g,n.ts);nq(k,g,n)}}catch(q){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:nq(k,g,{ot:"k"});break;case 4:nq(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().l:a.I)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.C;l&&(ro(l,k),f===0&&(l.jj=k));k=a.L;h=h===void 0?{}:h;if(Op(k).length!==0)switch(f){case ih:try{var m=Cq(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var r=q.toString()}catch(A){r=n}else r=n;m.url=r;k.F.has(g.originalRequest)?(m.ts=k.F.get(g.originalRequest),k.F.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var u=Op(k);if(u.length!==0){var v=k.g.version==Rp?Array.from(new Set([].concat(x(Sp),x(Gq)))):rq;m.rc=g.status||0;var w=Qp(k,m,Pp);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var z=t(u),y=z.next();!y.done;y=z.next()){var B=y.value,C=Up(B.includeKeys||[],v),E=pq(B);k.m[E]||(k.m[E]={request:1,response:1});w.sn=k.m[E].response++;var D=Wp(w,C);mq(k,D,B,g)}}}catch(A){cb("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",A)}}}});e.configure(a.g.networking);return e}
function Nr(a,b){return new Wl(a.h,a.i,a.g.streaming,b,function(){a.jb&&jm(a.jb,!a.G.Ai());a.m&&a.m.rd();a.P&&cs(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function Or(a,b){var c=a.U()||typeof b==="number"&&b>0;b=new Jo(a.Pe,c);b.addEventListener("enter",function(f){ur(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){ur(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(ur(a,"timelineregionenter",g),ur(a,"timelineregionexit",g))});var d=new Jo(a.Ca,c);d.addEventListener("enter",function(f){kr(a,f.region,"metadata")});c=new Jo(a.fb,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(Yq("emsg",f))});var e=new im(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.Ne&&e.g.add(a.Ne);return e}function Wr(a,b){b=new Jo(a.Ca,b instanceof Date||b>0);b.addEventListener("enter",function(d){kr(a,d.region,"metadata")});var c=new im(a.h);c.g.add(b);return c}
function Pr(a,b,c){a.P=new qi;wi(a.P,si);ds(a);hr(a);a.La=new Df(function(){cs(a)});a.g.streaming.rebufferingGoal&&a.La.xa(.25);a.j.o(b,"waiting",function(){return cs(a,"waiting")});a.j.o(b,"canplaythrough",function(){return cs(a,"canplaythrough")});a.j.o(b,"playing",function(){return cs(a,"playing")});a.j.o(b,"seeked",function(){return cs(a,"seeked")});c&&(a.j.o(b,"stalled",function(){return cs(a,"stalled")}),a.j.o(b,"progress",function(){return cs(a,"progress")}),a.j.o(b,"timeupdate",function(){return cs(a,
"timeupdate")}))}function ds(a){var b=a.g.streaming.rebufferingGoal;a.P.i.set(ri,Math.min(.5,b/2)).set(si,b)}function cs(a,b){if(a.g.streaming.rebufferingGoal){b=a.H?Gk(a.H):!1;b=a.isEnded()||b||a.G.fj();var c=Kj(a.h.buffered,a.h.currentTime),d=a.P,e=d.i.get(d.g);wi(d,b||c>=e&&c>0?ri:si)&&hr(a)}else if(b){c=void 0;switch(b){case "seeking":case "waiting":c=si;break;case "canplaythrough":case "playing":case "seeked":c=ri}c!==void 0&&wi(a.P,c)&&hr(a)}}
function yr(a,b,c,d,e){return new Ak(a,b,c,e,d)}
function Lr(a){return new Mm(a.i,{yc:function(){return a.G?a.G.$e():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Za:function(){return a.Za()},video:a.h,ea:a.H,Dc:a.J,onError:function(b){return fr(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Tf:function(b,c,d){var e=b.startTime,f=b.endTime,g=c.type;if(g!=sc){if(a.G){a.G.rj();var h=Ok(a.H,g);!a.U()&&a.h.paused&&!a.h.seeking&&h!=null&&h>0&&a.G.$e()<h&&a.G.Ag(h)}cs(a)}d=(new Map).set("start",e).set("end",f).set("contentType",
g).set("isMuxed",d);a.dispatchEvent(Yq("segmentappended",d));a.u&&c.fastSwitching&&b.nd&&b.ye&&a.u.trySuggestStreams()},Ul:function(b,c){(c=c.Od)&&a.Ne&&mm(a.Ne,c,b)},Ii:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Ch(Jb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Uh(d,"cenc",c);
d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},xm:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.nd&&b.ye?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Fn(a,b));"preferredVariantRole"in a&&(Zc("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(Zc("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Zc("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){Zc("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=Qb();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.Ja()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(Zc("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(Zc("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(Zc("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(Zc("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(Zc("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),
a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(Zc("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in
a.streaming&&(Zc("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);a.streaming&&"liveSyncPanicMode"in a.streaming&&(Zc("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,
delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(Zc("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){Zc("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(Zc("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(Zc("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(Zc("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(Zc("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(Zc("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(Zc("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),
a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(Zc("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&
(Zc("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(Zc("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(Zc("manifest.dash.ignoreDrmInfo configuration",
"Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=
[h],d=!0)}d&&Zc("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(Zc("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(Zc("streaming.forceHTTPS configuration",
"Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(Zc("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=ho(this.g,a,Qq(this));
es(this,c);return g};p.vk=function(a){this.Dg=a};
function es(a,b){a.Te=new xi(a.g,a.sa,a.F);if(a.I){var c=Hd(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.F&&a.F.configure(a.g.drm);if(a.m){a.m.configure(a.g.streaming);try{a.l!=Zq&&zi(a.Te,a.i)&&Er(a)}catch(e){fr(a,e)}a.u&&Ir(a);c=a.m.u;!c||c.allowedByApplication&&c.allowedByKeySystem||Vq(a)}a.J&&a.J.configure(a.g.networking);a.H&&(a.H.configure(a.g.mediaSource),a.H.Ca=a.g.manifest.segmentRelativeVttTiming);a.A&&xr(a);a.u&&(a.u.configure(a.g.abr),a.g.abr.enabled?
a.u.enable():a.u.disable(),Tr(a));a.P&&ds(a);a.La&&(a.g.streaming.rebufferingGoal?a.La.xa(.25):a.La.stop());a.i&&Jr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.D&&a.D.configure(a.g.ads);a.L&&a.L.configure(a.g.cmcd);a.ra&&a.ra.configure(a.g.cmsd);a.ya&&a.ya.configure(a.g.queue);if(a.l==Br&&a.K.getConfiguration){c=a.K.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.K.configure(c),Vq(a))}}p.getConfiguration=function(){var a=Qq(this);ho(a,this.g,Qq(this));return a};
p.Hk=function(){return this.Dg};p.Yi=function(){var a=Qq(this);ho(a,this.g,Qq(this));return Hn(this.g,Qq(this))};p.Vi=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.wa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Bj=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];ho(this.g,Qq(this),Qq(this));es(this,a)};p.Rk=function(){return this.l};p.sh=function(){return this.i?this.i.type:null};p.Yk=function(){return this.h};p.Vb=function(){return this.J};p.hd=function(){return this.V};p.uf=function(){return this.D?this.D:null};p.wf=function(){return this.ya?this.ya:null};
p.U=function(){return this.i&&!this.Ea()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.Ea())?this.h.duration==Infinity:!1};p.ld=function(){return this.i?this.i.presentationTimeline.ld():!1};p.Ld=function(){if(this.i&&!this.Ea()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.Ea())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.Gh=function(){if(this.i&&!this.Ea()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.Ea())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
p.wa=function(){if(this.i&&!this.Ea()){if(!this.aa&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.fc(),end:a.Lb()}}if(this.h&&(this.h.src||this.Ea())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.zl=function(){this.U()&&(this.h.currentTime=this.wa().end)};p.Dl=function(){return this.aa};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.F?this.F.g:null};p.pe=function(){return this.F?this.F.pe():Infinity};p.nh=function(){return this.F?this.F.nh():[]};p.vf=function(){return this.F?this.F.vf():{}};p.Df=function(){return this.P?this.P.g==si:!!this.V};p.Za=function(){return this.h?this.M?this.M.i:1:0};p.xi=function(a){this.l==Br&&this.m&&Ym(this.m,a)};
p.sc=function(a,b){b=b===void 0?!0:b;a==0?bb("A trick play rate of 0 is unsupported!"):(this.M.set(a),this.l==Br&&(this.u.playbackRateChanged(a),this.xi(b&&a!=1)),Cr(this,a))};p.Bd=function(){var a=this.M.jd();this.l==Fr&&this.M.set(a);this.l==Br&&(this.M.set(a),this.u.playbackRateChanged(a),this.xi(!1));this.kc.Sa()};
p.Nb=function(){if(this.i&&!this.Ea()){for(var a=this.m?this.m.u:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,lg(e)){var f=dg(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=fs(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return kg(h,g)}):g?[kg(null,g)]:[]}return[]};
p.zc=function(){if(this.i){if(this.Ea())return[];for(var a=this.m?this.m.C:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=eg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Xr(this).map(function(f){return jg(f)}):[]};p.qh=function(){var a=this.Ze;this.i&&(a=this.i.imageStreams);return a.map(function(b){return fg(b)})};
p.yk=function(a){var b=this,c,d;return P(function(e){if(e.g==1)return G(e,gs(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Kb(function(f){var g=hs(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=f.j-f.startTime,l=0;l<h;l++){var m=is(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function hs(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.$i=function(a,b){var c=this,d,e,f,g,h,k;return P(function(l){if(l.g==1)return G(l,gs(c,a),2);d=l.h;if(!d)return l.return(null);d.closeSegmentIndex&&(c.Ec.has(d)||(e=new Df(function(){d.closeSegmentIndex();c.Ec.delete(d)}),c.Ec.set(d,e)),f=c.Ec.get(d),f.Y(5));g=d.segmentIndex.find(b);if(g==null)return l.return(null);h=d.segmentIndex.get(g);return(k=hs(h.tilesLayout||d.tilesLayout))?l.return(is(h,d,b,k)):l.return(null)})};
function gs(a,b){var c,d;return P(function(e){if(e.g==1){if(a.l!=Br&&a.l!=Fr)return e.return(null);c=a.Ze;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);b!=null&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.B(2):G(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function is(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.j-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.S(),startByte:a.Sc(),endByte:a.Qc(),width:g,sprite:d,mimeType:a.mimeType||
b.mimeType,codecs:a.codecs||b.codecs}}
p.fg=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.m.C&&(mo(c.C.h,d,!1),an(c.m,d),Dr(c),Sr(c),c.Vd=d.language)}var c=this;if(this.i&&this.G&&(b(),!this.Ea()))return;(function(){if(c.h&&c.h.textTracks){var d=Xr(c),e=d.find(function(h){return hg(h)===a.id});if(e){if(c.A instanceof bp){d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.W?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.Fa(d,"cuechange"),c.A.remove(0,Infinity)),e&&$r(c,e));Dr(c);Sr(c)}}})()};
function $r(a,b){a.j.o(b,"cuechange",function(){a.A.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new re(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
we:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=vd,g.region.width=f.region.width,g.region.widthUnits=vd);De(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.A.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.Ie=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&lg(f)){var g=e.m.u;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&bb("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.Ea()?Kr(e,f,!1,!1,0):Kr(e,f,!1,b||!1,c||0);e.K.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Ir(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.Ea()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=t(f);for(var g=f.next();!g.done;g=
f.next())if(g=g.value,hg(g)==a.id){js(e,g);break}}})()};
p.Hj=function(a,b){function c(){var e=d.K.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;d.K.configure(e);Vq(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.G&&(c(),!this.Ea()))return;(function(){if(d.h&&d.h.audioTracks){var e=yc(a.language),f=Array.from(d.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==
a.label&&yc(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&js(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.Ea()){var a=this.Nb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.l!=Br||this.Ea()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||ef.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalAudioId;e||d.audioId==null||(e=String(d.audioId));!e&&d.codecs.includes(",")&&d.audioCodec&&(e="muxed-in-video");
e&&(e+=[d.language,d.label,d.channelsCount,d.spatialAudio].join("_"),a.set(e,{active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage}))}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:yc(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&g.roles.push(f.kind);f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&(g.channelsCount=f.configuration.numberOfChannels));return g}):
[]};
p.Ij=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Nb();if(d.length){var e=d.find(function(f){return f.active});e&&(d=d.find(function(f){return f.audioId===e.audioId&&(f.videoBandwidth||f.bandwidth)==a.bandwidth&&f.width==a.width&&f.height==a.height&&f.frameRate==a.frameRate&&f.pixelAspectRatio==a.pixelAspectRatio&&f.hdr==a.hdr&&f.colorGamut==a.colorGamut&&f.videoLayout==a.videoLayout&&f.videoMimeType==a.mimeType&&f.videoCodec==a.codecs&&Sc(f.videoRoles,a.roles)&&f.videoLabel==a.label}))&&
!d.active&&this.Ie(d,b,c)}};
p.getVideoTracks=function(){if(this.l==Fr||this.Ea())return[];var a=this.Nb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a.filter(function(f){return f.originalAudioId===b.originalAudioId&&f.audioId===b.audioId&&f.audioGroupId===b.audioGroupId&&f.videoCodec});if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||
d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};p.Ak=function(){return ks(this.Nb())};p.ll=function(){return ks(this.zc())};p.zk=function(){return Array.from(ls(this.Nb()))};p.kl=function(){return Array.from(ls(this.zc()))};
p.Gj=function(a,b,c,d,e,f,g){function h(){function l(u,v){return u.video||v.video?u.video&&v.video?Math.abs((u.video.height||0)-(v.video.height||0))+Math.abs((u.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.m.u;k.K=k.g.adaptationSetCriteriaFactory();k.K.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.K.create(k.i.variants),q=null;n=t(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,lg(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=dg(q),k.Ie(m,!0,d||0)):Vq(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.G&&(h(),!this.Ea()))return;(function(){if(k.h&&k.h.audioTracks){var l=ng(k.Nb(),a,b||"",!1)[0];l&&k.Ie(l)}})()};p.$h=function(a,b,c){function d(){e.Vd=a;e.ee=b||"";e.ce=c||!1;var f=ng(e.i.textStreams,e.Vd,e.ee,e.ce)[0]||null;f&&f!=e.m.C&&(mo(e.C.h,f,!1),e.g.streaming.alwaysStreamText||e.Wc())&&(an(e.m,f),Dr(e),Sr(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.G&&(d(),!this.Ea()))return;(function(){var f=ng(e.zc(),a,b||"",c||!1)[0];f&&e.fg(f)})()};
p.pm=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}f!=null&&(e.K=e.g.adaptationSetCriteriaFactory(),e.K.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
Vq(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.Ea()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&js(e,g)}})()};p.Wc=function(){var a=this.W;return this.A?this.A.isTextVisible():a};p.Ek=function(){return this.ib.map(function(a){return eg(a)})};
p.Dk=function(a){Zc("getChapters","Please use an getChaptersAsync.");if(!this.ib.length)return[];var b=yc(a);a=this.ib.filter(function(f){return yc(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Kb(function(f){var g=f.S()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
p.oh=function(a){var b=this,c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(!b.ib.length)return l.return([]);c=yc(a);d=b.ib.filter(function(m){return yc(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.B(4);break}k=h.value;if(k.segmentIndex){l.B(5);break}return G(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Kb(function(m){var n=m.S()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.B(2);break;case 4:return l.return(e)}})};function Xr(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function Yr(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function bs(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.Zd=function(a){a=!!a;this.W!=a&&(this.W=a,this.l==Br?(this.A.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.m.C||(a=ng(this.i.textStreams,this.Vd,this.ee,this.ce),a.length>0&&(an(this.m,a[0]),Dr(this),Sr(this))):Xm(this.m))):this.h&&this.h.src&&this.h.textTracks&&this.A.setTextVisibility(a),Rr(this))};
p.Zk=function(){if(this.G)var a=this.G.$e();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;a=this.O}if(this.i&&!this.Ea()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+a*1E3)):null};
p.Zi=function(){if(this.i&&!this.Ea()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.yf=function(){return this.U()?this.i?this.i.presentationTimeline.yf():null:null};p.Pc=function(){if(this.l==Br)return this.H.Pc();var a={total:[],audio:[],video:[],text:[]};this.l==Fr&&(a.total=Lj(this.h.buffered));return a};
function Fq(a){if(!a.h||!a.h.currentTime)return null;var b=a.Zi();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.u?this.u.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.l!=Br&&this.l!=Fr)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
switchHistory:[],stateHistory:[]};Ar(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.U()||qo(this.C,Math.round(100*b));this.G&&(this.C.R=this.G.zi(),this.C.T=this.G.Bi());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),oo(this.C,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.C.M=Number(b.corruptedVideoFrames));this.C.u=this.F?di(this.F):NaN;po(this.C,a.videoWidth||NaN,a.videoHeight||NaN);this.C.l="";this.U()&&(a=Fq(this),a!=null&&(this.C.F=a/1E3));b=this.Nb().find(function(e){return e.active});
a=this.zc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.M?this.M.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.C.C=d}b.width&&b.height&&po(this.C,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.C.l=b)}this.l!=Br||this.Ea()||(this.i&&(this.C.I=this.i.periodCount,this.C.H=this.i.gapCount,this.i.presentationTimeline&&(this.C.K=this.i.presentationTimeline.h)),a=this.u.getBandwidthEstimate(),this.C.A=a);this.l==Fr&&ro(this.C,NaN);
return so(this.C)};
p.ge=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,r,u,v,w,z,y,B;return P(function(C){switch(C.g){case 1:if(h.l!=Br&&h.l!=Fr)throw new U(1,7,7004);c!="subtitles"&&c!="captions"&&bb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){C.B(2);break}return G(C,ms(h,a),3);case 3:d=C.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=Fr){C.B(4);break}l=Qb();g&&l.Ja()==="WEBKIT"&&(c="forced");return G(C,ns(h,a,b,c,d,f||"",k),5);case 5:m=C.h;if(m.track)return Er(h),
Dr(h),C.return(jg(m.track));throw new U(1,2,2012);case 4:n=uc;q=h.wa();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(r==Infinity)throw new U(1,4,4033);if(!k.length){C.B(6);break}return G(C,os(h,a,h.J,h.g.streaming.retryParameters),7);case 7:u=C.h,v=ps(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Dk(w),d="text/vtt";case 6:z={id:h.Ue++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:cm(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,
encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([df(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};y=df(z.mimeType,z.codecs);B=tf(y);if(!B)throw new U(2,2,2014,d);h.i.textStreams.push(z);Er(h);
Dr(h);return C.return(eg(z))}})};
p.gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:if(c.l!=Br&&c.l!=Fr)throw new U(1,7,7004);if(b){E.B(2);break}return G(E,ms(c,a),3);case 3:b=E.h;case 2:if(b!="text/vtt")throw new U(1,2,2017,a);d=uc;e=c.wa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new U(1,4,4045);return G(E,os(c,a,c.J,c.g.streaming.retryParameters),4);case 4:g=E.h;h=sf(b);if(!h)throw new U(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
segmentEnd:f,vttOffset:0};m=Jb(g);n=k.parseMedia(m,l,a,[]);q=[];r=t(n);u=r.next();for(v={};!u.done;v={wg:void 0,Ed:void 0},u=r.next())v.Ed=u.value,v.wg=null,w=function(D){return function(){D.wg==null&&(D.wg=mc([a],[D.Ed.payload]));return D.wg||[]}}(v),z=new Bj(v.Ed.startTime,v.Ed.endTime,w,0,null,null,0,0,Infinity),v.Ed.payload.includes("#xywh")&&(y=v.Ed.payload.split("#xywh=")[1].split(","),y.length===4&&z.jg({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
10)})),q.push(z);B=b;if(!q.length){E.B(5);break}return G(E,Oo(q[0].S()[0],c.J,c.g.manifest.retryParameters),6);case 6:B=E.h;case 5:return C={id:c.Ue++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new am(q),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.yg,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([df(B||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.l==Fr?c.Ze.push(C):c.i.imageStreams.push(C),Er(c),E.return(fg(C))}})};
p.ef=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:if(d.l!=Br&&d.l!=Fr)throw new U(1,7,7004);if(c){B.B(2);break}return G(B,ms(d,a),3);case 3:c=B.h;case 2:e=uc;f=d.wa();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new U(1,4,4055);return G(B,os(d,a,d.J,d.g.streaming.retryParameters),4);case 4:h=B.h;k=sf(c);if(!k)throw new U(2,2,2014,c);l=k();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Jb(h);q=
l.parseMedia(n,m,a,[]);r=[];u=t(q);v=u.next();for(w={};!v.done;w={qf:void 0},v=u.next())w.qf=v.value,z=new Bj(w.qf.startTime,w.qf.endTime,function(C){return function(){return[C.qf.payload]}}(w),0,null,null,0,0,Infinity),r.push(z);y={id:d.Ue++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new am(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Va,primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([df("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.ib.push(y);Er(d);return B.return(eg(y))}})};
function ms(a,b){var c;return P(function(d){switch(d.g){case 1:return sa(d,2),G(d,Oo(b,a.J,a.g.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
function ns(a,b,c,d,e,f,g){var h,k,l,m;return P(function(n){if(n.g==1)return e!="text/vtt"||g.length?G(n,os(a,b,a.J,a.g.streaming.retryParameters),3):n.B(2);n.g!=2&&(h=n.h,k=ps(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Dk(l),e="text/vtt");m=document.createElement("track");a:{var q=a.L,r=b;try{if(!q.g.enabled){var u=r;break a}var v=Ep(q);v.ot=yq;v.su=!0;var w=Ip(v);u=Jp(r,w);break a}catch(z){cb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z);u=r;break a}u=void 0}m.src=u;m.label=
f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Cg.push(m);return n.return(m)})}function os(a,b,c,d){var e,f,g;return P(function(h){if(h.g==1){e=ih;f=ch([b],d);f.method="GET";var k=a.L;try{k.g.enabled&&nq(k,f,{ot:yq,su:!0})}catch(l){cb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return G(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function ps(a,b,c,d){var e=sf(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Jb(b),b=c.parseMedia(b,a,null,[]),qp(b,d);throw new U(2,2,2014,c);}p.vm=function(a,b){this.sa.width=a;this.sa.height=b};p.Wh=function(a){if(this.l==Br){var b=this.m;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.F)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.se||d.Ra||d.yb||(d.se=!1,Wm(b,d,a));b=!0}}else b=!1;return b};
p.rh=function(){bb("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Vk=function(){return this.Hc};
p.Nk=function(){var a={video:null,audio:null,text:null};if(this.l!=Br)return a;var b=this.m.u,c=this.h.currentTime;b=t([b.video,b.audio,this.m.C]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==sc&&(a.text=e)}return a};
function Qq(a){var b=bo();b.streaming.failureCallback=function(c){if(a.U()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.Wh(d))}};b.textDisplayFactory=function(){if(a.Qe){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new gp(a.h,a.Qe):"track"in document.createElement("track")?new bp(a):new fp};return b}p.ii=function(a){this.Qe=a};
function sr(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new dm,l=e.closedCaptions.get(g);h={id:a.Ue++,originalId:g,groupId:null,
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:sc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([df(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Qr(a,b){var c,d,e,f,g;return P(function(h){if(h.g==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return P(function(r){if(r.g==1)return k?k.segmentIndex?r.B(2):G(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.ec(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},G(h,e(c,b),2);if(h.g!=3)return f=h.h,G(h,e(d,b),3);g=h.h;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
function hr(a){var b=a.Df();if(a.C&&a.P&&a.G){if(a.g.streaming.rebufferingGoal==0){var c=a.M;c.j=!1;hm(c)}else c=a.M,c.j=b,hm(c);a.L&&(c=a.L,b||c.D||(c.D=!0),c.D&&b&&(c.I=!0,Cp(c,"ps",{td:"r"})),c.J=b);Ar(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.df<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.T&&(a.T=Math.min(a.T+ ++a.df*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(Yq("buffering",b))}function Cr(a,b){a.kc.Sa();a.kc.o(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.wa(),e=a.U(),f=e?a.g.streaming.safeSeekOffset:0;b>0?(!e||b>=1)&&Math.floor(c)>=Math.floor(d.end)&&a.Bd():Math.floor(c)<=Math.floor(d.start+f)&&a.Bd()})}
function Ar(a){if(a.C&&a.P){var b=a.C.g,c="playing";a.P.g==si?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Yq("statechanged",c)))}}
function Ur(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Vi();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sc(d,!1):e==1&&b!==a.M.jd()&&a.Bd()}if(c&&(c=a.wa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.T||typeof g!=="number"||(a.T=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ob&&a.T!==null&&typeof g==="number"&&a.df<n&&Date.now()-a.Ob>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.T=Math.max(a.T-(g-f)/2,f+d),a.Ob=Date.now());e&&a.T!==null&&(h=a.T+d,k=a.T-d);g=c.end-a.h.currentTime;d=0;a.l==Fr&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.P.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.sc(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.sc(l,!1),a.Ob=null):k!=void 0&&m&&g-d<k?(b!=m&&a.sc(m,!1),a.Ob=null):b!==a.M.jd()&&(a.Bd(),a.Ob=Date.now())}}
function Vr(a){if(a.h){var b=function(e,f){var g=g===void 0?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.Bg<e?(a.Bg=e,!0):!1},c=a.wa();c=c.end-c.start;c=c>0?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Yq("started");else if(b(25,c))d=Yq("firstquartile");else if(b(50,c))d=Yq("midpoint");else if(b(75,c))d=Yq("thirdquartile");else{if(b(100,c)||c>100)d=Yq("complete");a.g&&a.g.playRangeEnd!=Infinity&&
a.isEnded()&&a.h.pause()}d&&a.dispatchEvent(d)}}}function Ir(a){try{Ci(a.Te,a.i)}catch(c){return fr(a,c),!1}var b=mg(a.i.variants);b=a.K.create(b);a=a.u.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function Mr(a,b){b=b===void 0?!1:b;if(Ir(a)){if(!a.g.abr.enabled){var c=a.K;typeof c.getLastAdaptationSet!="function"&&(Zc("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.m.u;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.u.chooseVariant(b)}return null}
function Vq(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=Mr(a);f&&Kr(a,f,e,b,c,d)}
function Kr(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.m.u;if(b==g)d&&$m(a.m,b,d,e,!0);else{var h=a.C.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));$m(a.m,b,d,e,f,c);d=null;g&&(d=dg(g));g=dg(b);g.active=!0;if(a.R&&(e=a.R,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.sh()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=Yq("adaptation",c),qs(a,c)):rs(a,d,g);ss(a,d,g)}}function js(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=fs(a);c=kg(c,d);b=kg(b,d);rs(a,c,b);ss(a,c,b)}}function fs(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function Er(a){var b=Yq("trackschanged");qs(a,b);ts(a)}function rs(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Yq("variantchanged",b);qs(a,b)}function ss(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&ts(a)}function ts(a){var b=Yq("audiotrackschanged");qs(a,b)}function Dr(a){var b=Yq("textchanged");qs(a,b)}function Rr(a){var b=Yq("texttrackvisibility");qs(a,b)}
function Tr(a){a.g.abr.enabled||Uq(a);var b=(new Map).set("newStatus",a.g.abr.enabled);qs(a,Yq("abrstatuschanged",b))}function Sr(a){var b=a.zc().find(function(c){return c.active});b&&a.A&&a.A.setTextLanguage&&a.A.setTextLanguage(b.language)}function Uq(a,b){b=b===void 0?!0:b;if(a.l==Br){a.We.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Ir(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===Zq||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.We.xa(1);b=this.Pc().video.reduce(function(h,
k){return h+k.end-k.start},0);Vq(this,!1,b,!0,!1);return!0}return!1};
function fr(a,b){var c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(a.l==Zq)return h.return();b.severity===1&&a.C.L++;c=!0;if(!(a.aa&&a.i&&a.m)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.B(2);break}d=Qb();if(d.Ja()==="WEBKIT"&&b.code==3016)return h.return();sa(h,3);return G(h,qn(a.m),5);case 5:e=h.h;c=!e;e&&(f=Yq("mediasourcerecovered"),a.dispatchEvent(f));ua(h,2);break;case 3:va(h),c=!0;case 2:if(!c)return h.return();b.severity===2&&Uq(a,!1);g=Yq("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);I(h)}})}p.addFont=function(a,b){return Wj(a,b)};function ur(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Yq(b,a))}
function vr(a,b,c,d){d=d===void 0?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(Yq(d?"audiotrackchanged":"mediaqualitychanged",b))}
function er(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new U(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}
function wr(a,b){var c=Yq("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=mh(a.g.drm.clearKeys),g=function(u,v){u.allowedByKeySystem=!0;v=t(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.F.H)u.allowedByKeySystem=u.allowedByKeySystem&&!!w&&!Di.includes(w)},h=t(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=pg(k);l=t(l);for(var m=
l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=t(m.drmInfos),r=q.next();!r.done;r=q.next())r=r.value,r.keySystem==d&&(r.keyIds.size?g(k,r.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}if(c&&(Er(a),!Ir(a)))return;(c=a.m.u)&&!c.allowedByKeySystem&&Vq(a)}function Jr(a,b,c){b>0&&(a.U()||a.Pj(b));b=a.getDuration();c<b&&(a.U()||a.Fb(c))}
function qs(a,b){P(function(c){if(c.g==1)return G(c,Promise.resolve(),2);a.l!=Zq&&a.dispatchEvent(b);I(c)})}function ls(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(yc(c.language)):b.add("und");return b}
function ks(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=yc(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=t(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
role:n,label:q})}});return k}p.Ea=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.isEnded=function(){return!this.h||this.h.ended?!0:this.aa&&!this.U()&&this.h.currentTime>=this.wa().end};S("shaka.Player",X);X.prototype.isEnded=X.prototype.isEnded;X.prototype.isRemotePlayback=X.prototype.Ea;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.ii;X.prototype.getFetchedPlaybackInfo=X.prototype.Nk;X.prototype.getManifestParserFactory=X.prototype.Vk;
X.prototype.getManifest=X.prototype.rh;X.prototype.retryStreaming=X.prototype.Wh;X.prototype.setMaxHardwareResolution=X.prototype.vm;X.prototype.addChaptersTrack=X.prototype.ef;X.prototype.addThumbnailsTrack=X.prototype.gf;X.prototype.addTextTrackAsync=X.prototype.ge;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Pc;X.prototype.getSegmentAvailabilityDuration=X.prototype.yf;X.prototype.getPresentationStartTimeAsDate=X.prototype.Zi;
X.prototype.getPlayheadTimeAsDate=X.prototype.Zk;X.prototype.setTextTrackVisibility=X.prototype.Zd;X.prototype.getChaptersAsync=X.prototype.oh;X.prototype.getChapters=X.prototype.Dk;X.prototype.getChaptersTracks=X.prototype.Ek;X.prototype.isTextTrackVisible=X.prototype.Wc;X.prototype.selectVariantsByLabel=X.prototype.pm;X.prototype.selectTextLanguage=X.prototype.$h;X.prototype.selectAudioLanguage=X.prototype.Gj;X.prototype.getTextLanguages=X.prototype.kl;X.prototype.getAudioLanguages=X.prototype.zk;
X.prototype.getTextLanguagesAndRoles=X.prototype.ll;X.prototype.getAudioLanguagesAndRoles=X.prototype.Ak;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.Ij;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.Hj;X.prototype.selectVariantTrack=X.prototype.Ie;X.prototype.selectTextTrack=X.prototype.fg;X.prototype.getThumbnails=X.prototype.$i;X.prototype.getAllThumbnails=X.prototype.yk;
X.prototype.getImageTracks=X.prototype.qh;X.prototype.getTextTracks=X.prototype.zc;X.prototype.getVariantTracks=X.prototype.Nb;X.prototype.cancelTrickPlay=X.prototype.Bd;X.prototype.trickPlay=X.prototype.sc;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.xi;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Df;X.prototype.getKeyStatuses=X.prototype.vf;X.prototype.getActiveSessionsMetadata=X.prototype.nh;X.prototype.getExpiration=X.prototype.pe;
X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.Dl;X.prototype.goToLive=X.prototype.zl;X.prototype.seekRange=X.prototype.wa;X.prototype.isVideoOnly=X.prototype.Gh;X.prototype.isAudioOnly=X.prototype.Ld;X.prototype.isInProgress=X.prototype.ld;X.prototype.isLive=X.prototype.U;X.prototype.getQueueManager=X.prototype.wf;X.prototype.getAdManager=X.prototype.uf;X.prototype.getAssetUri=X.prototype.hd;
X.prototype.getNetworkingEngine=X.prototype.Vb;X.prototype.getMediaElement=X.prototype.Yk;X.prototype.getManifestType=X.prototype.sh;X.prototype.getLoadMode=X.prototype.Rk;X.prototype.resetConfiguration=X.prototype.Bj;X.prototype.getBufferFullness=X.prototype.Vi;X.prototype.getNonDefaultConfiguration=X.prototype.Yi;X.prototype.getConfigurationForLowLatency=X.prototype.Hk;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.vk;
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.dm;X.prototype.destroyAllPreloads=X.prototype.Ug;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Ri;X.prototype.unloadAndSavePreload=X.prototype.ck;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Dm;X.prototype.unload=X.prototype.tc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Fi;X.prototype.attach=X.prototype.cc;
X.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return G(k,oi(),3);case 3:b=k.h;case 2:return c=Hi(),d=Fk(),e=Qb(),G(k,e.wc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=ar,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};X.isBrowserSupported=br;X.setQueueManagerFactory=function(a){Tq=a};X.setAdManagerFactory=function(a){Sq=a};X.registerSupportPlugin=$q;X.prototype.destroy=X.prototype.destroy;
var Zq=0,Pq=1,Br=2,Fr=3;X.LoadMode={DESTROYED:Zq,NOT_LOADED:Pq,MEDIA_SOURCE:Br,SRC_EQUALS:Fr};X.version="v4.16.3";var us=["4","16"];$c=new function(a){this.g=a;this.i=ad;this.h=bd}(new Yc(Number(us[0]),Number(us[1])));var ar=new Map,Sq=null,Tq=null;function vs(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function ws(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function xs(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new Tc;this.l.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=xs.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};
p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return this.h.getVolume()==0};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};
p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",xs);xs.prototype.release=xs.prototype.release;xs.prototype.getPodIndex=xs.prototype.getPodIndex;
xs.prototype.getTimeOffset=xs.prototype.getTimeOffset;xs.prototype.getMediaUrl=xs.prototype.getMediaUrl;xs.prototype.getAdvertiserName=xs.prototype.getAdvertiserName;xs.prototype.getCreativeAdId=xs.prototype.getCreativeAdId;xs.prototype.getAdId=xs.prototype.getAdId;xs.prototype.getVastAdId=xs.prototype.getVastAdId;xs.prototype.getVastMediaWidth=xs.prototype.getVastMediaWidth;xs.prototype.getVastMediaHeight=xs.prototype.getVastMediaHeight;xs.prototype.getVastMediaBitrate=xs.prototype.getVastMediaBitrate;
xs.prototype.getDescription=xs.prototype.getDescription;xs.prototype.getTitle=xs.prototype.getTitle;xs.prototype.getPositionInSequence=xs.prototype.getPositionInSequence;xs.prototype.getSequenceLength=xs.prototype.getSequenceLength;xs.prototype.setMuted=xs.prototype.setMuted;xs.prototype.resize=xs.prototype.resize;xs.prototype.isLinear=xs.prototype.isLinear;xs.prototype.isMuted=xs.prototype.isMuted;xs.prototype.setVolume=xs.prototype.setVolume;xs.prototype.getVolume=xs.prototype.getVolume;
xs.prototype.play=xs.prototype.play;xs.prototype.pause=xs.prototype.pause;xs.prototype.skip=xs.prototype.skip;xs.prototype.canSkipNow=xs.prototype.canSkipNow;xs.prototype.getTimeUntilSkippable=xs.prototype.getTimeUntilSkippable;xs.prototype.isSkippable=xs.prototype.isSkippable;xs.prototype.isPaused=xs.prototype.isPaused;xs.prototype.getRemainingTime=xs.prototype.getRemainingTime;xs.prototype.getMinSuggestedDuration=xs.prototype.getMinSuggestedDuration;xs.prototype.getDuration=xs.prototype.getDuration;
xs.prototype.isUsingAnotherMediaElement=xs.prototype.isUsingAnotherMediaElement;xs.prototype.hasCustomClick=xs.prototype.hasCustomClick;xs.prototype.isClientRendering=xs.prototype.isClientRendering;xs.prototype.needsSkipUI=xs.prototype.needsSkipUI;function ys(){}
function zs(a,b){var c=[];a=t(Sd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Wd(d.value,"InLine"))if(d=Wd(d,"Creatives")){d=t(Sd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Wd(e,"Linear");f&&As(c,b,f);if(e=Wd(e,"NonLinearAds")){e=Sd(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Wd(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Wd(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=Ud(l)){g==="text/html"&&(l="data:text/html;charset=UTF-8,"+
encodeURIComponent(l));var m=Zd(k,"width",ee)||Zd(k,"expandedWidth",ee),n=Zd(k,"height",ee)||Zd(k,"expandedHeight",ee);if(m||n){var q=null,r=Wd(k,"NonLinearClickThrough");r&&(r=Ud(r))&&(q=r);r=null;(k=k.attributes.minSuggestedDuration)&&(r=Ed(k));k=0;h!=null&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:r,once:!0,pre:h==null,post:h==Infinity,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,
y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:q})}}}}}}return c}
function As(a,b,c){var d=0;b!=null&&(d=b);var e=null;c.attributes.skipoffset&&(e=Ed(c.attributes.skipoffset),isNaN(e)&&(e=null));var f=Wd(c,"MediaFiles");if(f){var g=null;(c=Wd(c,"VideoClicks"))&&(c=Wd(c,"ClickThrough"))&&(c=Ud(c))&&(g=c);f=c=Sd(f,"MediaFile");c=c.filter(function(k){return k.attributes.delivery=="streaming"});c.length&&(f=c);f=f.sort(function(k,l){return(parseInt(l.attributes.height,10)||0)-(parseInt(k.attributes.height,10)||0)});f=t(f);for(c=f.next();!c.done;c=f.next())if(c=c.value,
!c.attributes.apiFramework){var h=Ud(c);if(h){a.push({id:null,groupId:null,startTime:d,endTime:null,uri:h,mimeType:c.attributes.type||null,isSkippable:e!=null,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:b==null,post:b==Infinity,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:g});break}}}}
function Bs(a){var b=[];a=t(Sd(a,"vmap:AdBreak"));for(var c=a.next();!c.done;c=a.next()){var d=c.value,e=d.attributes.timeOffset;e&&(c=null,e=="start"?c=null:e=="end"?c=Infinity:c=Ed(e),(d=Wd(d,"vmap:AdSource"))&&(d=Wd(d,"vmap:AdTagURI"))&&(d=Td(d))&&b.push({time:c,uri:d}))}return b}S("shaka.ads.Utils",ys);ys.ADS_LOADED="ads-loaded";ys.AD_STARTED="ad-started";ys.AD_FIRST_QUARTILE="ad-first-quartile";ys.AD_MIDPOINT="ad-midpoint";ys.AD_THIRD_QUARTILE="ad-third-quartile";ys.AD_COMPLETE="ad-complete";
ys.AD_STOPPED="ad-stopped";ys.AD_SKIPPED="ad-skipped";ys.AD_VOLUME_CHANGED="ad-volume-changed";ys.AD_MUTED="ad-muted";ys.AD_PAUSED="ad-paused";ys.AD_RESUMED="ad-resumed";ys.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";ys.CUEPOINTS_CHANGED="ad-cue-points-changed";ys.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";ys.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";ys.AD_CLICKED="ad-clicked";ys.AD_PROGRESS="ad-progress";ys.AD_BUFFERING="ad-buffering";ys.AD_IMPRESSION="ad-impression";
ys.AD_DURATION_CHANGED="ad-duration-changed";ys.AD_CLOSED="ad-closed";ys.AD_LOADED="ad-loaded";ys.ALL_ADS_COMPLETED="all-ads-completed";ys.AD_LINEAR_CHANGED="ad-linear-changed";ys.AD_METADATA="ad-metadata";ys.AD_RECOVERABLE_ERROR="ad-recoverable-error";ys.AD_ERROR="ad-error";ys.AD_BREAK_READY="ad-break-ready";ys.AD_INTERACTION="ad-interaction";ys.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";ys.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";ys.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Cs(a,b,c,d,e){var f=this;this.A=a;this.i=b;this.G=!1;this.C=this.u=null;this.H=NaN;this.l=e;this.j=null;this.h=new Tc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.F=new google.ima.AdDisplayContainer(this.A,this.i);this.F.initialize();this.m=new google.ima.AdsLoader(this.F);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.16.3");this.g=null;this.D=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Ds(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Es(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.ua(this.i,"play",function(){f.G=!0})}Cs.prototype.configure=function(a){this.u=a};Cs.prototype.stop=function(){this.g&&this.g.stop();this.A&&Tj(this.A)};
Cs.prototype.release=function(){this.stop();this.C&&this.C.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.F.destroy()};function Es(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));Fs(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function Ds(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.D);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.D);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Gs(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.C=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.C.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,
a.i.offsetHeight)}),a.G||a.u.skipPlayDetection?a.g.start():a.h.ua(a.i,"play",function(){a.G=!0;a.g.start()})}catch(f){Fs(a,null)}}
function Gs(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Es(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Hs(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Hs(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Fs(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Fs(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
function Hs(a,b){var c=b.getAd();c?(a.j=new xs(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.u.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.u.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function Fs(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.u.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Is(a,b,c,d,e,f){this.g=a;this.h=b;this.j=(this.i=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.C=c;this.u=d;this.m=e;this.A=f;this.D=b.overlay}p=Is.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.h.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return this.A};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()};
p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.i&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i};p.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};
p.canSkipNow=function(){return this.i&&this.getTimeUntilSkippable()==0};p.skip=function(){this.canSkipNow()&&this.C()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.D==null};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.u};
p.getPositionInSequence=function(){return this.m};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.h.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.h.uri};
p.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Is);Is.prototype.release=Is.prototype.release;Is.prototype.getPodIndex=Is.prototype.getPodIndex;Is.prototype.getTimeOffset=Is.prototype.getTimeOffset;Is.prototype.getMediaUrl=Is.prototype.getMediaUrl;Is.prototype.getAdvertiserName=Is.prototype.getAdvertiserName;Is.prototype.getCreativeAdId=Is.prototype.getCreativeAdId;
Is.prototype.getAdId=Is.prototype.getAdId;Is.prototype.getVastAdId=Is.prototype.getVastAdId;Is.prototype.getVastMediaWidth=Is.prototype.getVastMediaWidth;Is.prototype.getVastMediaHeight=Is.prototype.getVastMediaHeight;Is.prototype.getVastMediaBitrate=Is.prototype.getVastMediaBitrate;Is.prototype.getDescription=Is.prototype.getDescription;Is.prototype.getTitle=Is.prototype.getTitle;Is.prototype.getPositionInSequence=Is.prototype.getPositionInSequence;Is.prototype.getSequenceLength=Is.prototype.getSequenceLength;
Is.prototype.setMuted=Is.prototype.setMuted;Is.prototype.resize=Is.prototype.resize;Is.prototype.isLinear=Is.prototype.isLinear;Is.prototype.isMuted=Is.prototype.isMuted;Is.prototype.setVolume=Is.prototype.setVolume;Is.prototype.getVolume=Is.prototype.getVolume;Is.prototype.play=Is.prototype.play;Is.prototype.pause=Is.prototype.pause;Is.prototype.skip=Is.prototype.skip;Is.prototype.canSkipNow=Is.prototype.canSkipNow;Is.prototype.getTimeUntilSkippable=Is.prototype.getTimeUntilSkippable;
Is.prototype.isSkippable=Is.prototype.isSkippable;Is.prototype.isPaused=Is.prototype.isPaused;Is.prototype.getRemainingTime=Is.prototype.getRemainingTime;Is.prototype.getMinSuggestedDuration=Is.prototype.getMinSuggestedDuration;Is.prototype.getDuration=Is.prototype.getDuration;Is.prototype.isUsingAnotherMediaElement=Is.prototype.isUsingAnotherMediaElement;Is.prototype.hasCustomClick=Is.prototype.hasCustomClick;Is.prototype.isClientRendering=Is.prototype.isClientRendering;
Is.prototype.needsSkipUI=Is.prototype.needsSkipUI;function Js(a,b,c){this.g=a;this.j=b;this.h=c;this.i=a.overlay==null}p=Js.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.g.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return-1};p.isPaused=function(){return!1};p.isSkippable=function(){return!1};
p.getTimeUntilSkippable=function(){return 0};p.canSkipNow=function(){return!1};p.skip=function(){};p.pause=function(){};p.play=function(){};p.getVolume=function(){return 1};p.setVolume=function(){};p.isMuted=function(){return!1};p.isLinear=function(){return this.i};p.resize=function(){};p.setMuted=function(){};p.getSequenceLength=function(){return this.j};p.getPositionInSequence=function(){return this.h};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};
p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.g.uri};p.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime};p.getPodIndex=function(){return 0};p.release=function(){};S("shaka.ads.InterstitialStaticAd",Js);Js.prototype.release=Js.prototype.release;
Js.prototype.getPodIndex=Js.prototype.getPodIndex;Js.prototype.getTimeOffset=Js.prototype.getTimeOffset;Js.prototype.getMediaUrl=Js.prototype.getMediaUrl;Js.prototype.getAdvertiserName=Js.prototype.getAdvertiserName;Js.prototype.getCreativeAdId=Js.prototype.getCreativeAdId;Js.prototype.getAdId=Js.prototype.getAdId;Js.prototype.getVastAdId=Js.prototype.getVastAdId;Js.prototype.getVastMediaWidth=Js.prototype.getVastMediaWidth;Js.prototype.getVastMediaHeight=Js.prototype.getVastMediaHeight;
Js.prototype.getVastMediaBitrate=Js.prototype.getVastMediaBitrate;Js.prototype.getDescription=Js.prototype.getDescription;Js.prototype.getTitle=Js.prototype.getTitle;Js.prototype.getPositionInSequence=Js.prototype.getPositionInSequence;Js.prototype.getSequenceLength=Js.prototype.getSequenceLength;Js.prototype.setMuted=Js.prototype.setMuted;Js.prototype.resize=Js.prototype.resize;Js.prototype.isLinear=Js.prototype.isLinear;Js.prototype.isMuted=Js.prototype.isMuted;Js.prototype.setVolume=Js.prototype.setVolume;
Js.prototype.getVolume=Js.prototype.getVolume;Js.prototype.play=Js.prototype.play;Js.prototype.pause=Js.prototype.pause;Js.prototype.skip=Js.prototype.skip;Js.prototype.canSkipNow=Js.prototype.canSkipNow;Js.prototype.getTimeUntilSkippable=Js.prototype.getTimeUntilSkippable;Js.prototype.isSkippable=Js.prototype.isSkippable;Js.prototype.isPaused=Js.prototype.isPaused;Js.prototype.getRemainingTime=Js.prototype.getRemainingTime;Js.prototype.getMinSuggestedDuration=Js.prototype.getMinSuggestedDuration;
Js.prototype.getDuration=Js.prototype.getDuration;Js.prototype.isUsingAnotherMediaElement=Js.prototype.isUsingAnotherMediaElement;Js.prototype.hasCustomClick=Js.prototype.hasCustomClick;Js.prototype.isClientRendering=Js.prototype.isClientRendering;Js.prototype.needsSkipUI=Js.prototype.needsSkipUI;function Ks(a,b,c,d){var e=this;this.L=null;this.m=a;this.D=b;this.g=c;this.G=null;this.A=!0;this.h=this.g;this.ha=d;this.R=new Set;this.H=new Set;this.F=new Map;this.K=new Map;this.i=new X;Ls(this);this.I=new Tc;this.j=new Tc;this.J=!1;this.W=this.u=this.C=this.l=null;this.Z=!1;this.O=-1;this.V=function(){if(!e.J&&e.l&&!e.D.Ea()){e.l=e.g.currentTime;var f=Ms(e);f&&Ns(e,f,1,1,Date.now())}};this.T=function(){if(!(e.J||e.l||e.D.Ea())){e.l=e.g.currentTime;var f=Ms(e,!0);f||(f=Ms(e));f&&Ns(e,f,1,1,Date.now())}};
this.aa=function(){if(!e.J&&e.l&&!e.D.Ea()){var f=e.g.currentTime;e.C&&!e.C.pre&&!e.C.post&&f<(e.C.endTime||e.C.startTime)&&(e.C=null)}};this.P=new Df(this.V);this.M=new Df(function(){var f,g,h,k,l,m,n,q,r,u,v;return P(function(w){switch(w.g){case 1:if(!e.H.size||e.l==null){w.B(0);break}f=e.D.l;if(f==Zq||f==Pq)return w.return();g=!1;h=Array.from(e.H);k=e.D.wa();l=t(h);m=l.next();case 3:if(m.done){w.B(5);break}n=m.value;if(n==e.C){w.B(4);break}q=n.endTime||n.startTime;if(!(k.start-q>=1)){r=n.startTime-
e.l;r>0&&r<=10&&(!e.F.has(n)&&Os(n)&&e.F.set(n,e.i.preload(n.uri,null,n.mimeType||void 0)),Ps(e,n));w.B(4);break}if(!e.F.has(n)){w.B(7);break}return G(w,e.F.get(n),8);case 8:(u=w.h)&&u.destroy(),e.F.delete(n);case 7:Qs(e,n),v=JSON.stringify(n),e.R.has(v)&&e.R.delete(v),e.H.delete(n),Rs(e),n.overlay||(g=!0);case 4:m=l.next();w.B(3);break;case 5:g&&Ss(e),I(w)}})});this.configure(this.D.getConfiguration().ads)}p=Ks.prototype;p.configure=function(a){this.L=a;Ts(this)};
function Us(a){if(!a.Z&&a.H.size){a.I.o(a.g,"playing",a.T);a.I.o(a.g,"timeupdate",a.T);a.I.o(a.g,"seeked",a.aa);a.I.o(a.g,"ended",a.V);if("requestVideoFrameCallback"in a.g&&!Vs()){var b=a.g,c=function(){a.O!=-1&&(a.V(),a.O!=-1&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.xa(.025);a.M&&a.M.xa(1);a.Z=!0}}
function Rs(a){a.Z&&!a.H.size&&(a.I.Fa(a.g,"playing",a.T),a.I.Fa(a.g,"timeupdate",a.T),a.I.Fa(a.g,"seeked",a.aa),a.I.Fa(a.g,"ended",a.V),a.O!=-1&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.M&&a.M.stop(),a.Z=!1)}
function Ts(a){if(a.m&&a.L&&!a.J){var b=a.L.supportsMultipleMediaElements,c=a.g;c.webkitPresentationMode&&c.webkitPresentationMode!=="inline"?b=!1:c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.h=a.g,a.G&&(a.G.parentElement&&a.m.removeChild(a.G),a.G=null)):(a.G||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.G=b),a.h=a.G))}else a.A=
!0}
p.stop=function(){this.j&&this.j.Sa();this.R.clear();this.H.clear();this.i.Ug();if(this.F.size){var a=Array.from(this.F.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.F.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=t(a),b=a.next();!b.done;b=a.next())Qs(this,b.value);this.K.clear();this.i.detach();this.J=!1;this.C=this.l=null;this.A=!0;this.h=this.g;this.G=null;Ws(this);Rs(this);this.m&&Tj(this.m);this.u&&(this.u.stop(),this.u=null)};
p.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.P&&(this.P.stop(),this.P=null);this.M&&(this.M.stop(),this.M=null);this.i.destroy()};p.Wb=function(){return this.i};function Xs(a,b){var c;P(function(d){if(d.g==1)return Ls(a),c=[],b&&b.values.find(function(e){return e.key=="X-OVERLAY-ID"})?(c=Ys(b),d.B(2)):G(d,Zs(a,b),3);d.g!=2&&(c=d.h);c.length?$s(a,c):bb("Unsupported HLS interstitial",b);I(d)})}
function at(a,b){var c=Wd(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f=c.attributes.loop=="true",g=Zd(c,"z",ee);if(d&&g!=0){var h=null,k=Wd(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=Ud(k)}k=1920;l=1080;var m=Wd(c,"Viewport");if(m){k=Zd(m,"x",ee);if(k==null)return;l=Zd(m,"y",ee);if(l==null)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=Wd(c,"Overlay");if(m&&q){var r=Wd(q,"TopLeft"),u=Wd(q,"Size");if(r&&
u){q=Zd(r,"x",ee);if(q==null)return;r=Zd(r,"y",ee);if(r==null)return;var v=Zd(u,"x",ee);if(v==null)return;u=Zd(u,"y",ee);if(u==null)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=v;n.size.y=u}}q=null;c=Wd(c,"Squeeze");if(m&&c&&(u=Wd(c,"TopLeft"),c=Wd(c,"Size"),u&&c)){m=Zd(u,"x",ee);if(m==null)return;q=Zd(u,"y",ee);if(q==null)return;u=Zd(c,"x",ee);if(u==null)return;c=Zd(c,"y",ee);if(c==null)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:u,y:c}}}$s(a,[{id:b.id,groupId:null,startTime:b.startTime,
endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:g==-1,currentVideo:q,background:h,clickThroughUrl:null}])}}
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){if(n.g==1)return c={type:12},G(n,bt(b,a,c),2);if(n.g!=3){d=n.h;e=Kd(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if(e.tagName=="VAST")return f=zs(e,b.l),n.B(3);if(e.tagName!="vmap:VMAP")return n.B(3);g=function(q){var r,u;return P(function(v){if(v.g==1)return G(v,bt(b,q.uri,c),2);r=v.h;u=Kd(r,"VAST");if(!u)throw new U(2,10,10007);f.push.apply(f,x(zs(u,q.time)));I(v)})};h=[];k=t(Bs(e));for(l=k.next();!l.done;l=
k.next())m=l.value,h.push(g(m));return h.length?G(n,Promise.all(h),3):n.B(3)}$s(b,f);I(n)})};
function $s(a,b){var c,d,e,f,g,h,k,l;P(function(m){switch(m.g){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.B(4);break}f=e.value;if(!f.uri){bb("Missing URL in interstitial",f);m.B(3);break}if(f.mimeType){m.B(5);break}sa(m,6);g=a.i.Vb();return G(m,Oo(f.uri,g,a.D.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;ua(m,5);break;case 6:va(m);case 5:h=f.id||JSON.stringify(f);if(a.R.has(h)){m.B(3);break}f.loop&&!f.overlay&&bb("Loop is only supported in overlay interstitials",f);
f.overlay||(c=!0);a.R.add(h);a.H.add(f);k=!1;f.pre&&a.l==null?k=!0:f.startTime!=0||f.canJump?a.l!=null&&(l=f.startTime-a.l,l>0&&l<=10&&(k=!0)):k=!0;k&&(!a.F.has(f)&&Os(f)&&a.F.set(f,a.i.preload(f.uri,null,f.mimeType||void 0)),Ps(a,f));case 3:e=d.next();m.B(2);break;case 4:c&&Ss(a),Us(a),I(m)}})}
function Ms(a,b,c){b=b===void 0?!1:b;c=c===void 0?null:c;var d=0,e=null;if(a.H.size&&a.l!=null){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.l-Math.round(h.startTime*1E3)/1E3,m=1;a.L.allowStartInMiddleOfInterstitial&&
h.endTime&&h.endTime!=Infinity&&(m=h.endTime-h.startTime);(l>0||l==0&&a.l==0)&&(l<=m||!h.canJump)&&(k=c==null&&a.C&&!a.C.pre&&!a.C.post&&a.C.startTime>=h.startTime?!1:!0)}k&&(!a.C||h.startTime>=a.C.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&Math.round(h.startTime*1E3)/1E3-Math.round(e.startTime*1E3)/1E3>.001&&(e=h,d=0),d++)}}return e}
function Ns(a,b,c,d,e,f){f=f===void 0?0:f;a.C=b;Ts(a);a.A||!a.m||a.h.parentElement||a.m.appendChild(a.h);d==1&&c==1&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:Math.abs(g.startTime-b.startTime)<.001}).length);b.once&&(f++,a.H.delete(b),Rs(a),b.overlay||Ss(a));b.mimeType&&(b.mimeType.startsWith("image/")||b.mimeType==="text/html")?b.overlay?ct(a,b,c,d,f):bb("Unsupported interstitial",b):a.A&&b.overlay?bb("Unsupported interstitial",b):dt(a,b,c,d,e,f)}
function ct(a,b,c,d,e){function f(){a.u&&(a.u.stop(),a.u=null);a.m.removeChild(k);Ws(a,b);et(a,"ad-stopped");a.j.Sa();var q=Ms(a,b.pre,d-e);q?Ns(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h=b.mimeType=="text/html"?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";ft(a,b);var l=new Js(b,c,d);et(a,"ad-impression");et(a,"ad-started",(new Map).set("ad",l));h=="iframe"?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){et(a,
"ad-error",(new Map).set("originalEvent",q));f()});l=g.viewport;var m=g.topLeft;g=g.size;l.x==0&&l.y==0?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||h!="iframe"||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.m.appendChild(k);var n=Date.now();a.u&&a.u.stop();a.u=new Df(function(){b.playoutLimit&&(Date.now()-
n)/1E3>b.playoutLimit?(et(a,"ad-complete"),f()):b.endTime&&a.g.currentTime>b.endTime?(et(a,"ad-complete"),f()):a.g.currentTime<b.startTime&&(et(a,"ad-skipped"),f())});b.playoutLimit&&!b.endTime?a.u.Y(b.playoutLimit):b.endTime&&a.u.xa(.025);a.j.o(a.g,"seeked",function(){var q=a.g.currentTime;if(q<b.startTime||b.endTime&&q>b.endTime)a.u&&a.u.stop(),et(a,"ad-skipped"),f()});b.clickThroughUrl&&a.j.o(k,"click",function(){b.clickThroughUrl&&window.open(b.clickThroughUrl,"_blank")})}
function dt(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H;P(function(K){switch(K.g){case 1:g=Date.now();a.J=!0;h=!1;k=function(){if(!a.A&&!b.overlay&&b.resumeOffset==null)if(b.timelineRange&&b.endTime&&b.endTime!=Infinity)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var L=Date.now();a.g.currentTime+=(L-e)/1E3;e=L}};l=function(L){var O,Q;return P(function(N){if(N.g==1){k();O=Ms(a,b.pre,d-f);if(L&&b.groupId)for(;O&&O.groupId==b.groupId;)d++,O=Ms(a,b.pre,d-f);a.u&&(!b.groupId||
O&&O.groupId!=b.groupId)&&(a.u.stop(),a.u=null);Ws(a,b);if(O&&!O.overlay)return N.B(2);b.post&&(a.l=null,a.C=null);return a.A?G(N,a.i.detach(),4):G(N,a.i.tc(),4)}N.g!=2&&(a.A&&(Q=b.resumeOffset,Q==null&&(Q=b.timelineRange&&b.endTime&&b.endTime!=Infinity?b.endTime-(a.l||0):(Date.now()-e)/1E3),et(a,"ad-content-resume-requested",(new Map).set("offset",Q))),et(a,"ad-stopped"),a.j.Sa(),a.J=!1,a.A?Ss(a):(a.h.style.display="none",k(),a.g.ended||a.g.play()));Ts(a);O&&(et(a,"ad-stopped"),a.j.Sa(),Ns(a,O,c,
++d,e,f));I(N)})};m=function(L){return P(function(O){if(h)return O.return();h=!0;et(a,"ad-error",(new Map).set("originalEvent",L));return G(O,l(!1),0)})};n=function(){return P(function(L){if(L.g==1){if(h)return L.return();h=!0;return G(L,l(!1),2)}et(a,"ad-complete");I(L)})};a.W=function(){return P(function(L){if(h)return L.return();h=!0;et(a,"ad-skipped");return G(L,l(!0),0)})};q=new Is(a.h,b,a.W,c,d,!a.A);a.A||(q.setMuted(a.g.muted),q.setVolume(a.g.volume));et(a,"ad-started",(new Map).set("ad",q));
(r=q.canSkipNow())&&et(a,"ad-skip-state-changed");a.j.ua(a.i,"error",m);a.j.o(a.h,"timeupdate",function(){if(a.h.duration){var L=q.canSkipNow();r!=L&&q.getRemainingTime()>0&&q.getDuration()>0&&et(a,"ad-skip-state-changed");r=L;!a.A&&!b.overlay&&b.resumeOffset==null&&b.timelineRange&&b.endTime&&b.endTime!=Infinity&&a.g.currentTime!=b.endTime&&a.D.wa().end>=b.endTime&&(a.g.currentTime=b.endTime)}});a.j.ua(a.i,"firstquartile",function(){k();et(a,"ad-first-quartile")});a.j.ua(a.i,"midpoint",function(){k();
et(a,"ad-midpoint")});a.j.ua(a.i,"thirdquartile",function(){k();et(a,"ad-third-quartile")});a.j.ua(a.i,"complete",n);a.j.o(a.h,"play",function(){et(a,"ad-resumed")});a.j.o(a.h,"pause",function(){var L=a.i.getConfiguration();a.h.currentTime>=L.playRangeEnd?n():et(a,"ad-paused")});a.j.o(a.h,"volumechange",function(){a.h.muted?et(a,"ad-muted"):et(a,"ad-volume-changed")});b.clickThroughUrl&&(u=a.m||a.h,a.j.o(u,"click",function(){b.clickThroughUrl&&(q.isPaused()||q.pause(),window.open(b.clickThroughUrl,
"_blank"))}));if(!a.A||d!=1){K.B(2);break}et(a,"ad-content-pause-requested",(new Map).set("saveLivePosition",!0));v=new Og;w=function(L){return P(function(O){if(O.g==1)return L.state!="detach"?O.B(0):Vs()?G(O,new Promise(function(Q){return(new Df(Q)).Y(.1)}),3):O.B(3);v.resolve();a.j.Fa(a.D,"onstatechange",w);I(O)})};a.j.o(a.D,"onstatechange",w);return G(K,v,2);case 2:return ft(a,b),a.A||(a.h.style.display="",b.overlay?(a.h.loop=b.loop,z=b.overlay.viewport,y=b.overlay.topLeft,B=b.overlay.size,a.h.style.height=
B.y/z.y*100+"%",a.h.style.left=y.x/z.x*100+"%",a.h.style.top=y.y/z.y*100+"%",a.h.style.width=B.x/z.x*100+"%"):(a.g.pause(),b.resumeOffset!=null&&b.resumeOffset!=0&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),sa(K,4),Ls(a),b.startTime&&b.endTime&&b.endTime!=Infinity&&b.startTime!=b.endTime&&(C=b.endTime-b.startTime,C>0&&a.i.configure("playRangeEnd",C)),b.playoutLimit&&!a.u&&(a.u=(new Df(function(){a.W()})).Y(b.playoutLimit),
a.i.configure("playRangeEnd",b.playoutLimit)),G(K,a.i.cc(a.h),6);case 6:return E=null,a.L.allowStartInMiddleOfInterstitial&&a.l!=null&&(D=a.l-b.startTime,Math.abs(D)>.25&&(E=D)),a.F.has(b)?G(K,a.F.get(b),10):G(K,a.i.load(b.uri,E,b.mimeType||void 0),8);case 10:return A=K.h,a.F.delete(b),A?G(K,a.i.load(A),8):G(K,a.i.load(b.uri,E,b.mimeType||void 0),8);case 8:b.overlay&&a.g.paused?a.h.pause():a.h.play();F=(Date.now()-g)/1E3;et(a,"ads-loaded",(new Map).set("loadTime",F));a.A&&a.g.play();b.overlay&&(b.pre||
b.post||a.D.U()&&!(b.startTime>0)||(J=function(){var L=a.g.currentTime-b.startTime;Math.abs(L-a.h.currentTime)>.1&&(a.h.currentTime=L)},a.j.ua(a.h,"playing",J),a.j.o(a.g,"seeking",J)),a.j.o(a.g,"seeked",function(){var L=a.g.currentTime;(L<b.startTime||b.endTime&&L>b.endTime)&&a.W()}));ua(K,0);break;case 4:H=va(K);if(!a.J)return K.return();m(H);I(K)}})}
function ft(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(b.currentVideo!=null){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;f>0&&f<=100&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;f>0&&f<=100&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;f<1&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;f<1&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.m&&
(b.clickThroughUrl?(a.m.setAttribute("ad-active","true"),a.m.style.pointerEvents=""):a.m.style.pointerEvents="none",b.background&&(a.m.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}
function Ws(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&b.currentVideo==null||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.m&&(a.m.removeAttribute("ad-active"),a.m.style.pointerEvents="",!b||b.background)&&(a.m.style.background="");a.G&&(a.G.style.background="")}
function Zs(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma;return P(function(La){switch(La.g){case 1:c=[];if(!b)return La.return(c);d=b.values.find(function(Ba){return Ba.key=="X-ASSET-URI"});e=b.values.find(function(Ba){return Ba.key=="X-ASSET-LIST"});if(!d&&!e)return La.return(c);f=null;if(g=b.values.find(function(Ba){return Ba.key=="ID"}))f=g.data;h=f==null?Math.floor(b.startTime*10)/10:b.startTime;(k=b.endTime)&&b.endTime!=Infinity&&typeof b.endTime==
"number"&&(k=f==null?Math.floor(b.endTime*10)/10:b.endTime);l=b.values.find(function(Ba){return Ba.key=="X-RESTRICT"});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(u=b.values.find(function(Ba){return Ba.key=="X-ENABLE-SKIP-AFTER"}))v=u.data,r=parseFloat(v),isNaN(r)&&(r=m?0:null);w=null;if(z=b.values.find(function(Ba){return Ba.key=="X-ENABLE-SKIP-FOR"}))y=z.data,w=parseFloat(y),isNaN(r)&&(w=null);B=null;if(C=b.values.find(function(Ba){return Ba.key=="X-RESUME-OFFSET"}))E=
C.data,B=parseFloat(E),isNaN(B)&&(B=null);D=null;if(A=b.values.find(function(Ba){return Ba.key=="X-PLAYOUT-LIMIT"}))F=A.data,D=parseFloat(F),isNaN(D)&&(D=null);K=H=J=!1;if(L=b.values.find(function(Ba){return Ba.key=="CUE"}))O=L.data,J=O.includes("ONCE"),H=O.includes("PRE"),K=O.includes("POST");Q=!1;(N=b.values.find(function(Ba){return Ba.key=="X-TIMELINE-OCCUPIES"}))?(M=N.data,Q=M.includes("RANGE")):!C&&a.D.U()&&(Q=!H&&!K);if(d){R=d.data;if(!R)return La.return(c);c.push({id:f,groupId:null,startTime:h,
endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:B,playoutLimit:D,once:J,pre:H,post:K,timelineRange:Q,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});La.B(2);break}if(!e){La.B(2);break}V=e.data;if(!V)return La.return(c);sa(La,4);xa={type:11};return G(La,bt(a,V,xa),6);case 6:ba=La.h;Oa=Vb(ba);Ha=JSON.parse(Oa);if(Ia=Ha["SKIP-CONTROL"])Fa=Ia["ENABLE-SKIP-AFTER"],typeof Fa=="number"&&(r=parseFloat(Fa),isNaN(Fa)&&
(r=m?0:null)),wa=Ia["ENABLE-SKIP-FOR"],typeof wa=="number"&&(w=parseFloat(wa),isNaN(wa)&&(w=null));for(Ca=0;Ca<Ha.ASSETS.length;Ca++)Ma=Ha.ASSETS[Ca],Ma.URI&&c.push({id:f+"_shaka_asset_"+Ca,groupId:f,startTime:h,endTime:k,uri:Ma.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:B,playoutLimit:D,once:J,pre:H,post:K,timelineRange:Q,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});ua(La,2);break;case 4:va(La);case 2:return La.return(c)}})}
function Ys(a){var b=[];if(!a)return b;var c=a.values.find(function(w){return w.key=="X-ASSET-URI"});if(!c)return b;c=c.data;if(!c)return b;var d=null,e=a.values.find(function(w){return w.key=="X-OVERLAY-ID"});e&&(d=e.data);e=d==null?Math.floor(a.startTime*10)/10:a.startTime;var f=a.endTime;a.endTime&&a.endTime!=Infinity&&typeof a.endTime=="number"&&(f=d==null?Math.floor(a.endTime*10)/10:a.endTime);var g=!1,h=!1,k=!1,l=a.values.find(function(w){return w.key=="CUE"});l&&(k=l.data,g=k.includes("ONCE"),
h=k.includes("PRE"),k=k.includes("POST"));l=null;var m=a.values.find(function(w){return w.key=="X-ASSET-MIMETYPE"});m&&(l=m.data);m=!1;var n=a.values.find(function(w){return w.key=="X-LOOP"});n&&(m=n.data=="YES");n=1;var q=a.values.find(function(w){return w.key=="X-DEPTH"});q&&(n=parseFloat(q.data),isNaN(n)&&(n=1));q=null;var r=a.values.find(function(w){return w.key=="X-BACKGROUND"});r&&(q=r.data);r=1920;var u=1080,v=a.values.find(function(w){return w.key=="X-VIEWPORT"});if(v){u=v.data.split("x");
if(u.length!=2)return b;r=parseFloat(u[0]);u=parseFloat(u[1])}r={viewport:{x:r,y:u},topLeft:{x:0,y:0},size:{x:r,y:u}};if(u=a.values.find(function(w){return w.key=="X-OVERLAY-POSITION"})){u=u.data.split("x");if(u.length!=2)return b;r.topLeft.x=parseFloat(u[0]);r.topLeft.y=parseFloat(u[1])}if(u=a.values.find(function(w){return w.key=="X-OVERLAY-SIZE"})){u=u.data.split("x");if(u.length!=2)return b;r.size.x=parseFloat(u[0]);r.size.y=parseFloat(u[1])}u=null;if(v=a.values.find(function(w){return w.key==
"X-SQUEEZECURRENT"}))if(u=parseFloat(v.data),isNaN(u)&&(u=1),u={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*u,y:1080*u}},a=a.values.find(function(w){return w.key=="X-SQUEEZECURRENT-POSITION"})){a=a.data.split("x");if(a.length!=2)return b;u.topLeft.x=parseFloat(a[0]);u.topLeft.y=parseFloat(a[1])}b.push({id:d,groupId:null,startTime:e,endTime:f,uri:c,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:g,pre:h,post:k,timelineRange:!0,
loop:m,overlay:r,displayOnBackground:n==-1,currentVideo:u,background:q,clickThroughUrl:null});return b}
function Ss(a){for(var b=[],c=t(a.H),d=c.next(),e={};!d.done;e={Kc:void 0},d=c.next())d=d.value,d.overlay||(e.Kc={start:d.startTime,end:null},d.pre?(e.Kc.start=0,e.Kc.end=null):d.post?(e.Kc.start=-1,e.Kc.end=null):d.timelineRange&&(e.Kc.end=d.endTime),b.find(function(f){return function(g){return f.Kc.start==g.start&&f.Kc.end==g.end}}(e))||b.push(e.Kc));et(a,"ad-cue-points-changed",(new Map).set("cuepoints",b))}
function Ls(a){a.i.configure(a.D.Yi());a.i.configure("ads.disableHLSInterstitial",!0);a.i.configure("ads.disableDASHInterstitial",!0);a.i.configure("playRangeEnd",Infinity);bh(a.D.Vb(),a.i.Vb())}function bt(a,b,c){var d,e,f;return P(function(g){if(g.g==1)return d=ch([b],Ig()),e=a.D.Vb().request(7,d,c),G(g,e.promise,2);f=g.h;return g.return(f.data)})}function Os(a){return(a=a.mimeType)?!a.startsWith("image/")&&a!=="text/html":!0}
function Vs(){var a=Qb().Oa();return a=="TV"||a=="CONSOLE"||a=="CAST"?!0:!1}function Ps(a,b){if(!(a.K.has(b)||a.L&&!a.L.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType&&b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.K.set(b,d)}}
function Qs(a,b){if(a.K.has(b)){var c=a.K.get(b);c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.K.delete(b)}}function et(a,b,c){a.ha(new T(b,c))};function gt(a,b,c,d,e){this.h=a;this.j=Ed(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.u=d;this.m=!1}p=gt.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.h.durationInSeconds};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return typeof this.j=="number"?!0:!1};p.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};
p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.u};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.l?this.l:1};p.getPositionInSequence=function(){return this.i?this.i:1};p.getTitle=function(){return this.h.adTitle};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};
p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return this.h.vastAdId||""};p.getAdId=function(){return this.h.adId};p.getCreativeAdId=function(){return this.h.creativeId};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",gt);gt.prototype.release=gt.prototype.release;gt.prototype.getPodIndex=gt.prototype.getPodIndex;
gt.prototype.getTimeOffset=gt.prototype.getTimeOffset;gt.prototype.getMediaUrl=gt.prototype.getMediaUrl;gt.prototype.getAdvertiserName=gt.prototype.getAdvertiserName;gt.prototype.getCreativeAdId=gt.prototype.getCreativeAdId;gt.prototype.getAdId=gt.prototype.getAdId;gt.prototype.getVastAdId=gt.prototype.getVastAdId;gt.prototype.getVastMediaWidth=gt.prototype.getVastMediaWidth;gt.prototype.getVastMediaHeight=gt.prototype.getVastMediaHeight;gt.prototype.getVastMediaBitrate=gt.prototype.getVastMediaBitrate;
gt.prototype.getDescription=gt.prototype.getDescription;gt.prototype.getTitle=gt.prototype.getTitle;gt.prototype.getPositionInSequence=gt.prototype.getPositionInSequence;gt.prototype.getSequenceLength=gt.prototype.getSequenceLength;gt.prototype.setMuted=gt.prototype.setMuted;gt.prototype.resize=gt.prototype.resize;gt.prototype.isLinear=gt.prototype.isLinear;gt.prototype.isMuted=gt.prototype.isMuted;gt.prototype.setVolume=gt.prototype.setVolume;gt.prototype.getVolume=gt.prototype.getVolume;
gt.prototype.play=gt.prototype.play;gt.prototype.pause=gt.prototype.pause;gt.prototype.skip=gt.prototype.skip;gt.prototype.canSkipNow=gt.prototype.canSkipNow;gt.prototype.getTimeUntilSkippable=gt.prototype.getTimeUntilSkippable;gt.prototype.isSkippable=gt.prototype.isSkippable;gt.prototype.isPaused=gt.prototype.isPaused;gt.prototype.getRemainingTime=gt.prototype.getRemainingTime;gt.prototype.getMinSuggestedDuration=gt.prototype.getMinSuggestedDuration;gt.prototype.getDuration=gt.prototype.getDuration;
gt.prototype.isUsingAnotherMediaElement=gt.prototype.isUsingAnotherMediaElement;gt.prototype.hasCustomClick=gt.prototype.hasCustomClick;gt.prototype.isClientRendering=gt.prototype.isClientRendering;gt.prototype.needsSkipUI=gt.prototype.needsSkipUI;function ht(a,b,c,d){this.D=a;this.K=b;this.h=c;this.l=null;this.P=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.F=this.g=null;this.G=new Map;this.m=[];this.A=[];this.H="";this.O=!0;this.I="";this.u=new Tc}ht.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.u.Fa(b.target,b.type,b.listener);it(this);this.m=[];this.A=[];this.H="";this.O=!0;this.I="";this.C=null;this.j=[];this.M=[];this.G.clear()};
ht.prototype.release=function(){this.stop();this.u&&this.u.release()};ht.prototype.onManifestUpdated=function(a){this.J=a;this.H!=""&&(jt(this,this.H,this.O),this.O=!1)};ht.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
function kt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;P(function(v){if(v.g==1)return d={type:7},e=ch([b],Ig()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Zb(f)),g=a.K.request(7,e,d),sa(v,2),G(v,g.promise,4);if(v.g!=2){h=v.h;k=Vb(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new rb(b),n=new rb(l.trackingUrl),a.H=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.P,a.i(new T("ads-loaded",(new Map).set("loadTime",r))),u=new rb(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return ua(v,0)}va(v);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.I);a.l=null;I(v)})}
function jt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y;P(function(B){if(B.g==1)return d={type:8},e=ch([b],Ig()),f=a.K.request(7,e,d),sa(B,2),G(B,f.promise,4);if(B.g!=2){g=B.h;h=[];k=Vb(g.data);l=JSON.parse(k);if(l.avails.length>0){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(q=n.value,r=t(q.nonLinearAdsList),u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v.nonLinearAdList),z=w.next();!z.done;z=w.next())y=z.value,lt(a,y);h=a.getCuePoints();
a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h))),it(a),a.j=[];c&&(a.J||h.length>0)&&mt(a);return ua(B,0)}va(B);I(B)})}
function lt(a,b){var c,d,e,f,g,h,k,l,m;P(function(n){if(n.g==1){if(!b.staticResource)return n.return();c=nt(b);if(d=a.G.get(c))return n.return();e={type:9};f=ch([b.staticResource],Ig());g=a.K.request(7,f,e);sa(n,2);a.G.set(c,[]);return G(n,g.promise,4)}if(n.g!=2)return h=n.h,k=Vb(h.data),l=JSON.parse(k),m=l.apps,a.G.set(c,m),ua(n,0);va(n);a.G.delete(c);I(n)})}
function nt(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function mt(a){ot(a);a.J||(pt(a),a.u.o(a.h,"seeked",function(){pt(a)}),a.u.o(a.h,"ended",function(){it(a)}));a.u.o(a.h,"timeupdate",function(){ot(a)})}
function pt(a){var b=a.h.currentTime;if(b!=0&&a.C==null){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.C=b,a.h.currentTime=c.startTimeInSeconds)}}
function ot(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.F,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.A.includes("firstQuartile")?(a.A.push("firstQuartile"),qt(a,"firstQuartile")):b>=e&&!a.A.includes("midpoint")?(a.A.push("midpoint"),qt(a,"midpoint")):b>=f&&!a.A.includes("thirdQuartile")&&(a.A.push("thirdQuartile"),qt(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&d>0&&e>0&&qt(a,"skipStateChanged");e>0&&(d<=0||d>e)&&it(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}it(a);a.L=e;a.g=new gt(g,f+1,e.ads.length,!0,a.h);a.F=g;f===0&&qt(a,"breakStart");rt(a);break}}}if(!a.g)for(d=
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.G.get(nt(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){it(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.D.appendChild(m)}a.L=e;a.g=new gt(g,f+1,e.ads.length,!1,a.h);a.F=g;f===0&&qt(a,"breakStart");rt(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.C&&a.C>b&&(a.h.currentTime=a.C),a.C=null)}}}
function it(a){if(a.g){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.F.adId);var b=a.g.m;(b===void 0?0:b)?qt(a,"skip"):qt(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.u.Fa(c.target,c.type,c.listener);a.m=[];a.A=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&qt(a,"breakEnd");a.g=null;a.F=null;a.L=null}}
function rt(a){var b=!1;a.h.paused?b=!0:(qt(a,"impression"),qt(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&qt(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||qt(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(qt(a,"impression"),qt(a,"start"),b=!1):qt(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){qt(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.u.o(d.target,
d.type,d.listener)}
function qt(a,b){var c=a.F.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&e!=""&&(e=ch([e],Ig()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.D.setAttribute("ad-active","true");break;case "breakEnd":a.D.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function st(a,b){this.g=a;this.i=null;this.h=b}p=st.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()};
p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){};
p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",st);
st.prototype.release=st.prototype.release;st.prototype.getPodIndex=st.prototype.getPodIndex;st.prototype.getTimeOffset=st.prototype.getTimeOffset;st.prototype.getMediaUrl=st.prototype.getMediaUrl;st.prototype.getAdvertiserName=st.prototype.getAdvertiserName;st.prototype.getCreativeAdId=st.prototype.getCreativeAdId;st.prototype.getAdId=st.prototype.getAdId;st.prototype.getVastAdId=st.prototype.getVastAdId;st.prototype.getVastMediaWidth=st.prototype.getVastMediaWidth;
st.prototype.getVastMediaHeight=st.prototype.getVastMediaHeight;st.prototype.getVastMediaBitrate=st.prototype.getVastMediaBitrate;st.prototype.getDescription=st.prototype.getDescription;st.prototype.getTitle=st.prototype.getTitle;st.prototype.getPositionInSequence=st.prototype.getPositionInSequence;st.prototype.getSequenceLength=st.prototype.getSequenceLength;st.prototype.setMuted=st.prototype.setMuted;st.prototype.resize=st.prototype.resize;st.prototype.isLinear=st.prototype.isLinear;
st.prototype.isMuted=st.prototype.isMuted;st.prototype.setVolume=st.prototype.setVolume;st.prototype.getVolume=st.prototype.getVolume;st.prototype.play=st.prototype.play;st.prototype.pause=st.prototype.pause;st.prototype.skip=st.prototype.skip;st.prototype.canSkipNow=st.prototype.canSkipNow;st.prototype.getTimeUntilSkippable=st.prototype.getTimeUntilSkippable;st.prototype.isSkippable=st.prototype.isSkippable;st.prototype.isPaused=st.prototype.isPaused;st.prototype.getRemainingTime=st.prototype.getRemainingTime;
st.prototype.getMinSuggestedDuration=st.prototype.getMinSuggestedDuration;st.prototype.getDuration=st.prototype.getDuration;st.prototype.isUsingAnotherMediaElement=st.prototype.isUsingAnotherMediaElement;st.prototype.hasCustomClick=st.prototype.hasCustomClick;st.prototype.isClientRendering=st.prototype.isClientRendering;st.prototype.needsSkipUI=st.prototype.needsSkipUI;function tt(a,b,c,d){var e=this;this.A=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.H=!1;this.C=this.m=this.u=null;this.D="";this.F=[];this.h=new Tc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.A,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){ut(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.D.length?
e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new st(f,e.l);e.C&&(e.m.i=e.C);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.A.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.A.removeAttribute("ad-active");
var f=e.l.currentTime;e.u&&e.u>f&&(e.l.currentTime=e.u,e.u=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.i=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.A.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.F=
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=tt.prototype;p.configure=function(){};p.stop=function(){this.D="";this.u=null;this.F=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.F};
function ut(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(c!=0){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.u=c,a.l.currentTime=d.start)}})};function Y(){kb.call(this);this.h=this.i=this.j=this.g=null;this.m=new vs;this.u=navigator.language;this.l=null}ma(Y,kb);p=Y.prototype;p.setLocale=function(a){this.u=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Ks(a,b,c,function(e){return vt(d,e)});this.g.configure(this.l)};
p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.j&&this.j.release();this.j=new Cs(a,b,this.u,c,function(e){return vt(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);kb.prototype.release.call(this)};
p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new vs};p.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.H=Date.now()/1E3;b.m.requestAds(a)};
p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.D=a;b.g&&b.g.updateAdsRenderingSettings(b.D)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new ht(a,b,c,function(e){return vt(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=c===void 0?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new Og,kt(d,a,b),d.I=c||"",d.P=Date.now()/1E3,a=d.l);return a};
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.H=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.h&&this.h.release();this.h=new tt(a,b,this.u,function(d){return vt(c,d)});this.h.configure(this.l)};
p.requestServerSideStream=function(a,b){b=b===void 0?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.16.3";c=this.h;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.H=!0),c.j=new Og,c.g.requestStream(a),c.D=b||"",c.G=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&bb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.16.3";this.h.g.replaceAdTagParameters(a)};
p.getServerSideCuePoints=function(){Zc("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:ws(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
p.onDashTimedMetadata=function(a){this.h&&a.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Xs(this.g,c))};
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if(d=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||d=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",d=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=t(c.eventNode.children),m=l.next();!m.done;m=
l.next())if(m=m.value,m.tagName=="AlternativeMPD"){if(m=m.attributes.uri){k=m;break}}else if(m.tagName=="InsertPresentation"||m.tagName=="ReplacePresentation"){var n=m.attributes.url;if(n){k=bc(n);(l=Zd(m,"maxDuration",ee))&&(g=l/c.timescale);(l=Zd(m,"returnOffset",ee))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&$s(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&&
!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else(d=="urn:mpeg:dash:event:2012"||d=="urn:scte:dash:scte214-events")&&c.eventNode&&Wd(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&at(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);$s(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)};
p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.Wb()};function vt(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.getInterstitialPlayer=Y.prototype.getInterstitialPlayer;Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial;
Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial;Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata;Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata;Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.initInterstitial=Y.prototype.initInterstitial;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;
Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
Y.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Y.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Y.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Sq=function(){return new Y};function wt(a){return JSON.stringify(a,function(b,c){if(typeof c!="function"){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&typeof b=="object"?e=="detail"&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Lj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&c.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(c)}:typeof c=="number"?isNaN(c)?"NaN":isFinite(c)?c:c<0?"-Infinity":"Infinity":c;return c}})}
function xt(a){return JSON.parse(a,function(b,c){if(c=="NaN")var d=NaN;else if(c=="-Infinity")d=-Infinity;else if(c=="Infinity")d=Infinity;else if(c&&typeof c=="object"&&c.__type__=="TimeRanges")d=yt(c);else if(c&&typeof c=="object"&&c.__type__=="Uint8Array")d=new Uint8Array(c.entries);else if(c&&typeof c=="object"&&c.__type__=="Error"){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
function yt(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var zt="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),At="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Bt=["loop","playbackRate"],Ct=["pause","play"],Dt=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1),Et=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",
2).set("getTextTracks",2).set("getVariantTracks",2),Ft=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Gt=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Ht=[["isTextTrackVisible","setTextTrackVisibility"]],It="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),
Jt="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Kt(a,b,c,d,e,f,g){var h=this;this.H=a;this.K=g;this.l=new Df(b);this.L=c;this.A=!1;this.C=d;this.G=e;this.M=f;this.i=this.m=!1;this.J="";this.u=null;this.D=function(){return Lt(h)};this.F=function(k,l){k=xt(l);switch(k.type){case "event":var m=k.targetName,n=Ya(k.event);h.C(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.A&&(h.L(),h.A=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new U(n.severity,
n.category,n.code);for(m in n)q[m]=n[m];k.reject(q)}else k.resolve(l)}};this.g={video:{},player:{}};this.I=0;this.h=new Map;this.j=null;Mt.add(this)}p=Kt.prototype;p.destroy=function(){Mt.delete(this);Nt(this);Ot&&Pt(this);this.l&&(this.l.stop(),this.l=null);this.G=this.C=null;this.i=this.m=!1;this.F=this.D=this.j=this.h=this.g=this.u=null;return Promise.resolve()};p.Qa=function(){return this.i};p.Yf=function(){return this.J};
p.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ka();var a=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Mt),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Og;d.A=!0;Qt(d,e)}},function(b){for(var c=t(Mt),d=c.next();!d.done;d=c.next())d=d.value,Rt=b=="available",d.l.Ka()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Rt&&this.l.Y(St);(a=Ot)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Og,this.A=!0,Qt(this,a)):Ot=null}else window.__onGCastApiAvailable!==Tt&&(Ut=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Tt)};p.ai=function(a){this.u=a;this.i&&Vt(this,{type:"appData",appData:this.u})};
p.cast=function(){var a=this;return P(function(b){if(!a.m)throw new U(1,8,8E3);if(!Rt)throw new U(1,8,8001);if(a.i)throw new U(1,8,8002);a.j=new Og;chrome.cast.requestSession(function(c){return Qt(a,c)},function(c){return Wt(a,c)});return G(b,a.j,0)})};function Xt(a){a.i&&chrome.cast.requestSession(function(b){return Qt(a,b)},function(b){return Wt(a,b)})}p.Hd=function(){if(this.i){Nt(this);if(Ot){Pt(this);try{Ot.stop(function(){},function(){})}catch(a){}Ot=null}Lt(this)}};
p.get=function(a,b){var c=this;if(a=="video"){if(Ct.includes(b))return function(){return c.yj.apply(c,[a,b].concat(x(Na.apply(0,arguments))))}}else if(a=="player"){if(Ft.has(b)&&!this.get("player","isLive")())return function(){};if(It.includes(b))return function(){return c.yj.apply(c,[a,b].concat(x(Na.apply(0,arguments))))};if(Jt.includes(b))return function(){return c.fm.apply(c,[a,b].concat(x(Na.apply(0,arguments))))};if(Dt.has(b)||Et.has(b))return function(){return c.g[a][b]}}return this.g[a][b]};
p.set=function(a,b,c){this.g[a][b]=c;Vt(this,{type:"set",targetName:a,property:b,value:c})};function Qt(a,b){var c=a.M();Ot=b;b.addUpdateListener(a.D);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);Lt(a);Vt(a,{type:"init",initState:c,appData:a.u});a.j.resolve()}function Wt(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))}
p.yj=function(a,b){Vt(this,{type:"call",targetName:a,methodName:b,args:Na.apply(2,arguments)})};p.fm=function(a,b){var c=Na.apply(2,arguments),d=new Og,e=this.I.toString();this.I++;this.h.set(e,d);try{Vt(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Pt(a){var b=Ot;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
function Lt(a){var b=Ot?Ot.status=="connected":!1;if(a.i&&!b){a.G();for(var c in a.g)a.g[c]={};Nt(a)}a.i=b;a.J=b?Ot.receiver.friendlyName:"";a.l.Ka()}function Nt(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new U(1,7,7E3))}}
function Vt(a,b){b=wt(b);var c=Ot;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},fb)}catch(d){throw b=new U(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.C("player",c),a.Hd(),b;}}var St=.02,Rt=!1,Ot=null,Ut=null,Mt=new Set;function Tt(a){Ut?window.__onGCastApiAvailable=Ut:delete window.__onGCastApiAvailable;Ut=null;if(a)for(var b=t(Mt),c=b.next();!c.done;c=b.next())c.value.init();typeof window.__onGCastApiAvailable==="function"&&window.__onGCastApiAvailable(a)};function Yt(a,b,c,d){d=d===void 0?!1:d;kb.call(this);var e=this;this.i=a;this.h=b;this.l=this.u=this.m=this.A=this.j=null;this.I=c;this.H=d;this.F=[];this.D=[];this.C=[];this.G=new Map;this.g=null;window.chrome?(this.g=new Kt(c,function(){return Zt(e)},function(){return $t(e)},function(f,g){return au(e,f,g)},function(){return bu(e)},function(){return cu(e)},d),du(this)):(this.j=this.i,this.A=this.h)}ma(Yt,kb);p=Yt.prototype;
p.destroy=function(a){this.g&&(a===void 0?0:a)&&this.g.Hd();this.l&&(this.l.release(),this.l=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.A=this.j=this.i=null;kb.prototype.release.call(this);return Promise.all(a)};p.Uc=function(){return this.j};p.Wb=function(){return this.A};p.Kg=function(){return this.g?this.g.m&&Rt:!1};p.Qa=function(){return this.g?this.g.Qa():!1};p.Yf=function(){return this.g?this.g.Yf():""};
p.cast=function(){var a=this;return P(function(b){return b.g==1?a.g?G(b,a.g.cast(),2):b.return():a.h?G(b,a.h.tc(),0):b.return()})};p.ai=function(a){this.g&&this.g.ai(a)};p.Vj=function(){this.g&&Xt(this.g)};p.Hd=function(){this.g&&this.g.Hd()};
p.Li=function(a,b){b=b===void 0?!1:b;var c=this;return P(function(d){if(d.g==1){if(a==c.I&&b==c.H)return d.return();c.I=a;c.H=b;if(!c.g)return d.return();c.g.Hd();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Kt(a,function(){return Zt(c)},function(){return $t(c)},function(e,f){return au(c,e,f)},function(){return bu(c)},function(){return cu(c)},b);c.g.init();I(d)})};
function du(a){a.g.init();a.l=new Tc;for(var b=t(zt),c=b.next();!c.done;c=b.next())a.l.o(a.i,c.value,function(f){a.g.Qa()||(f=Ya(f),a.m.dispatchEvent(f))});for(var d in Za)a.l.o(a.h,Za[d],function(f){a.g.Qa()||a.u.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={xe:b.xe},b.xe=e,Object.defineProperty(a.j,b.xe,{configurable:!1,enumerable:!0,get:function(f){return function(){return eu(a,f.xe)}}(b),set:function(f){return function(g){var h=f.xe;a.g.Qa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.A={};fu(a,
function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return gu(a,f)}})});hu(a);a.m=new kb;a.m.Ye=a.j;a.u=new kb;a.u.Ye=a.A;a.l.o(a.h,"unloading",function(){a.g&&a.g.Qa()||iu(a)})}function hu(a){var b=new Map;fu(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.G.set(c,d):a.G.set(d,c)):b.set(d,c)})}
function fu(a,b){function c(k){return k=="constructor"||typeof d[k]!="function"?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
function cu(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.hd(),startTime:null,addThumbnailsTrackCalls:a.F,addTextTrackAsyncCalls:a.D,addChaptersTrackCalls:a.C};a.i.pause();for(var c=t(Bt),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Gt);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Ht);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}
function Zt(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}function $t(a){var b=new T(a.j.paused?"pause":"play");a.m.dispatchEvent(b)}
function bu(a){for(var b=t(Gt),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.F,f=a.D,g=a.C;iu(a);var h=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var k=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var l;(d=a.g.get("player","getTextTracks")())&&d.length&&(l=d.find(function(q){return q.active}));var m=a.g.get("player","isTextTrackVisible")();h&&(a.i.autoplay=!1,b=a.h.load(h,c));var n={};c=t(Bt);for(d=
c.next();!d.done;d=c.next())d=d.value,n[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var q=t(e),r=q.next();!r.done;r=q.next()){r=r.value;var u;(u=a.Wb()).gf.apply(u,x(r))}q=t(f);for(u=q.next();!u.done;u=q.next()){u=u.value;var v;(v=a.Wb()).ge.apply(v,x(u))}v=t(g);for(q=v.next();!q.done;q=v.next()){q=q.value;var w;(w=a.Wb()).ef.apply(w,x(q))}w=t(Bt);for(v=w.next();!v.done;v=w.next())v=v.value,a.i[v]=n[v];w=t(Ht);for(v=w.next();!v.done;v=w.next())q=v.value,v=q[1],q=a.g.get("player",q[0])(),a.h[v](q);
a.h.Zd(m);l&&a.h.$h(l.language,l.roles,l.forced);a.i.autoplay=k;h&&a.i.play()}},function(q){q=(new Map).set("detail",q);q=new T("error",q);a.h.dispatchEvent(q)})}
function eu(a,b){if(b=="addEventListener")return function(d,e,f){return a.m.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.m.removeEventListener(d,e,f)};if(a.g.Qa()&&Object.keys(a.g.g.video).length==0){var c=a.i[b];if(typeof c!="function")return c}return a.g.Qa()?a.g.get("video",b):(b=a.i[b],typeof b=="function"&&(b=b.bind(a.i)),b)}
function gu(a,b,c){c=c===void 0?!1:c;a.G.has(b)&&(b=a.G.get(b));if(b=="addEventListener")return function(d,e,f){return a.u.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.u.removeEventListener(d,e,f)};if(b=="getMediaElement")return function(){return a.j};if(b=="getSharedConfiguration")return a.g.get("player","getConfiguration");if(b=="getNetworkingEngine")return function(){return a.h.Vb()};if(b=="getDrmEngine")return function(){return a.h.F};if(b=="getAdManager")return function(){return a.h.uf()};
if(b=="getQueueManager")return function(){return a.h.wf()};if(b=="setVideoContainer")return function(d){return a.h.ii(d)};if(!c){if(b=="addThumbnailsTrack")return function(){var d=Na.apply(0,arguments);a.F.push(d);return gu(a,b,!0).apply(null,x(d))};if(b=="addTextTrackAsync")return function(){var d=Na.apply(0,arguments);a.D.push(d);return gu(a,b,!0).apply(null,x(d))};if(b=="addChaptersTrack")return function(){var d=Na.apply(0,arguments);a.C.push(d);return gu(a,b,!0).apply(null,x(d))}}if(a.g.Qa()){if(b==
"getManifest"||b=="drmInfo")return function(){bb(b+"() does not work while casting!");return null};if(b=="attach"||b=="detach")return function(){bb(b+"() does not work while casting!");return Promise.resolve()};if(b=="getChapters")return function(){bb(b+"() does not work while casting!");return[]}}return a.g.Qa()&&Object.keys(a.g.g.video).length==0&&(Dt.has(b)||Et.has(b))||!a.g.Qa()?a.h[b].bind(a.h):a.g.get("player",b)}
function au(a,b,c){a.g.Qa()&&(b=="video"?a.m.dispatchEvent(c):b=="player"&&(c.type=="unloading"&&iu(a),a.u.dispatchEvent(c)))}function iu(a){a.F=[];a.D=[];a.C=[]}S("shaka.cast.CastProxy",Yt);Yt.prototype.changeReceiverId=Yt.prototype.Li;Yt.prototype.forceDisconnect=Yt.prototype.Hd;Yt.prototype.suggestDisconnect=Yt.prototype.Vj;Yt.prototype.setAppData=Yt.prototype.ai;Yt.prototype.cast=Yt.prototype.cast;Yt.prototype.receiverName=Yt.prototype.Yf;Yt.prototype.isCasting=Yt.prototype.Qa;
Yt.prototype.canCast=Yt.prototype.Kg;Yt.prototype.getPlayer=Yt.prototype.Wb;Yt.prototype.getVideo=Yt.prototype.Uc;Yt.prototype.destroy=Yt.prototype.destroy;function ju(a,b,c,d){kb.call(this);var e=this;this.h=a;this.g=b;this.j=new Tc;this.I={video:a,player:b};this.G=c||function(){};this.J=d||function(f){return f};this.i=null;this.H=!1;this.u=!0;this.m=0;this.D=!1;this.C=!0;this.A=this.l=null;this.F=new Df(function(){ku(e)});lu(this)}ma(ju,kb);p=ju.prototype;p.isConnected=function(){return this.H};p.El=function(){return this.u};p.sm=function(a){this.i=a};p.rk=function(){this.i=null};
p.tm=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.rm=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.qm=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
p.destroy=function(){var a=this,b,c;return P(function(d){if(d.g==1)return a.j&&(a.j.release(),a.j=null),b=[],a.g&&(b.push(a.g.destroy()),a.g=null),a.F&&(a.F.stop(),a.F=null),a.h=null,a.I=null,a.G=null,a.H=!1,a.u=!0,a.l=null,a.A=null,kb.prototype.release.call(a),G(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
function lu(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mu(a)};b.onSenderDisconnected=function(){return mu(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&nu(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);nu(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.A=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.A.onMessage=function(e){return ou(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return pu(a,e)};b.start();b=t(zt);for(var c=b.next();!c.done;c=b.next())a.j.o(a.h,c.value,function(e){return qu(a,"video",e)});for(var d in Za)a.j.o(a.g,Za[d],function(e){return qu(a,"player",e)});a.j.o(a.h,"loadeddata",function(){a.D=!0});a.j.o(a.g,"loading",function(){a.u=!1;ru(a)});a.j.o(a.h,"playing",function(){a.u=!1;ru(a)});a.j.o(a.h,"pause",function(){ru(a)});a.j.o(a.g,"unloading",function(){a.u=!0;ru(a)});
a.j.o(a.h,"ended",function(){(new Df(function(){a.h&&a.h.ended&&(a.u=!0,ru(a))})).Y(su)})}function mu(a){a.m=0;a.C=!0;a.H=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0;ru(a)}function ru(a){var b;P(function(c){if(c.g==1)return G(c,Promise.resolve(),2);if(!a.g)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);tu(a)||uu(a);I(c)})}
function vu(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E;P(function(D){switch(D.g){case 1:for(d in b.player)e=b.player[d],a.g[d](e);a.G(c);f=a.h.autoplay;return b.manifest?(a.h.autoplay=!1,sa(D,5),G(D,a.g.load(b.manifest,b.startTime),7)):G(D,Promise.resolve(),3);case 7:if(b.addThumbnailsTrackCalls)for(g=t(b.addThumbnailsTrackCalls),h=g.next();!h.done;h=g.next())k=h.value,a.g.gf.apply(a.g,x(k));if(b.addTextTrackAsyncCalls)for(l=t(b.addTextTrackAsyncCalls),m=l.next();!m.done;m=l.next())n=m.value,
a.g.ge.apply(a.g,x(n));if(b.addChaptersTrackCalls)for(q=t(b.addChaptersTrackCalls),r=q.next();!r.done;r=q.next())u=r.value,a.g.ef.apply(a.g,x(u));ua(D,3);break;case 5:return v=va(D),w=(new Map).set("detail",v),z=new T("error",w),a.g&&a.g.dispatchEvent(z),D.return();case 3:if(!a.g)return D.return();for(y in b.video)B=b.video[y],a.h[y]=B;for(C in b.playerAfterLoad)E=b.playerAfterLoad[C],a.g[C](E);a.h.autoplay=f;b.manifest&&(a.h.play(),uu(a));I(D)}})}
function qu(a,b,c){a.g&&(ku(a),nu(a,{type:"event",targetName:b,event:c},a.l))}
function ku(a){a.F.Y(wu);for(var b={video:{},player:{}},c=t(At),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.h[d];a.g.U()&&Ft.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});Dt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;nu(a,{type:"update",update:b},a.l);Et.forEach(function(e,f){a.m%e==0&&(e={player:{}},e.player[f]=a.g[f](),nu(a,{type:"update",update:e},
a.l))});a.D&&(a.m+=1);tu(a)}function tu(a){return a.C&&(a.h.duration||a.g.U())?(xu(a),a.C=!1,!0):!1}function xu(a,b){var c={contentId:a.g.hd(),streamType:a.g.U()?"LIVE":"BUFFERED",contentType:""};a.g.U()||(c.duration=a.h.duration);a.i&&(c.metadata=a.i);uu(a,b===void 0?0:b,c)}
function pu(a,b){var c=xt(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0;vu(a,c.initState,c.appData);ku(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if(d=="video")if(b=cast.receiver.CastReceiverManager.getInstance(),e=="volume"){b.setSystemVolumeLevel(c);break}else if(e=="muted"){b.setSystemVolumeMuted(c);break}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
d=="player"&&e=="load"&&(a.m=0,a.D=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);d=="player"&&e=="load"&&(c=c.then(function(){a.C=!0}));c.then(function(h){return yu(a,g,f,null,h)},function(h){return yu(a,g,f,h,null)})}}
function ou(a,b){var c=xt(b.data);switch(c.type){case "PLAY":a.h.play();uu(a);break;case "PAUSE":a.h.pause();uu(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;b!=null&&(a.h.currentTime=Number(b));d&&d=="PLAYBACK_START"?(a.h.play(),uu(a)):d&&d=="PLAYBACK_PAUSE"&&(a.h.pause(),uu(a));break;case "STOP":a.g.tc().then(function(){a.g&&uu(a)});break;case "GET_STATUS":xu(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.h.volume,f=a.h.muted;b!=null&&(a.h.volume=Number(b));
d!=null&&(a.h.muted=d);e==a.h.volume&&f==a.h.muted||uu(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.h.autoplay=!0);a.g.load(e,d).then(function(){a.g&&xu(a)}).catch(function(g){var h="LOAD_FAILED";g.category==7&&g.code==7E3&&(h="LOAD_CANCELLED");nu(a,{requestId:Number(c.requestId),type:h},a.A)});break;default:nu(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.A)}}
function yu(a,b,c,d,e){a.g&&nu(a,{type:"asyncComplete",id:c,error:d,res:e},a.l,b)}function nu(a,b,c,d){a.H&&(a=wt(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function uu(a,b,c){c=c===void 0?null:c;var d={mediaSessionId:0,playbackRate:a.h.playbackRate,playerState:a.u?zu:a.g.Df()?Au:a.h.paused?Bu:Cu,currentTime:a.h.currentTime,supportedMediaCommands:63,volume:{level:a.h.volume,muted:a.h.muted}};c&&(d.media=c);nu(a,{requestId:b===void 0?0:b,type:"MEDIA_STATUS",status:[d]},a.A)}
S("shaka.cast.CastReceiver",ju);ju.prototype.destroy=ju.prototype.destroy;ju.prototype.setContentArtist=ju.prototype.qm;ju.prototype.setContentImage=ju.prototype.rm;ju.prototype.setContentTitle=ju.prototype.tm;ju.prototype.clearContentMetadata=ju.prototype.rk;ju.prototype.setContentMetadata=ju.prototype.sm;ju.prototype.isIdle=ju.prototype.El;ju.prototype.isConnected=ju.prototype.isConnected;var wu=.5,su=5,zu="IDLE",Cu="PLAYING",Au="BUFFERING",Bu="PAUSED";function Du(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(C){return C!=null&&C.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(C){return C!=null&&C.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=Eu(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){r=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){u=v;break}if(r===
-1||u===-1)q=Fu(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(v=q[r]){var w=v.l,z=v.i,y=v.j,B=v.h;if(w!=h||z!=k||y!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Eu(d,e,w,z,y,B),h=w,k=z,l=y,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Fu(d,e),a.nestedCues.push(n));n=Eu(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Eu(a,b,c,d,e,f){a=new re(a,b,"");c&&a.textDecoration.push(Qe);d&&(a.fontStyle=Pe);a.color=e;a.backgroundColor=f;return a}
function Fu(a,b){a=new re(a,b,"");a.lineBreak=!0;return a}function Gu(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Hu(a,b){this.i=[];this.g=1;this.h=0;this.F=a;this.D=b;this.j=this.m=!1;this.l="white";this.u="black";this.A=this.C=null;Iu(this)}function Ju(a,b,c){var d="CC"+((a.F<<1|a.D)+1),e=new re(b,c,"");e.lineInterpretation=1;var f=Ku.get(a.g);f&&(e.line=f);a.A!=null&&a.C!=null&&(e.position=10+Math.min(70,a.A*10)+a.C*2.5);(b=Du(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=Ku.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Iu(a){Lu(a,0,15);a.g=1}
function Mu(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=Nu.has(c)?Nu.get(c):String.fromCharCode(c);break;case 1:d=Ou.get(c);break;case 2:a.i[a.g].pop();d=Pu.get(c);break;case 3:a.i[a.g].pop(),d=Qu.get(c)}d&&a.i[a.g].push(new Gu(d,a.m,a.j,a.u,a.l))}}function Ru(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;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 Lu(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var Nu=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"]]),Ou=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Pu=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"]]),Qu=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"]]),Ku=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Su(a,b){this.h=0;this.u=new Hu(a,b);this.i=new Hu(a,b);this.g=this.j=new Hu(a,b);this.l=0;this.m=null}function Tu(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=Ju(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,Lu(c,0,15),c=a.j,c.g=c.h>0?c.h:0,Lu(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Uu(a){a.h=1;a.g=a.j;a.g.h=0}function Vu(a){cb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.u;a.h=4}var Wu="black green blue cyan red yellow magenta black".split(" "),Xu="white green blue cyan red yellow magenta white_italics".split(" ");function Yu(a,b){this.J=b;this.M=a;this.K=this.l=!1;this.m=this.u=this.H=this.L=this.I=0;this.G=2;this.i=[];this.g=this.h=this.j=0;this.F=this.C=!1;this.D="white";this.A="black";Zu(this)}function Zu(a){a.i=[];for(var b=0;b<16;b++)a.i.push($u())}function $u(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function av(a,b){bv(a)&&(a.i[a.h][a.g]=new Gu(b,a.F,a.C,a.A,a.D),a.g++)}function bv(a){var b=a.g<a.m&&a.g>=0;return a.h<a.u&&a.h>=0&&b}Yu.prototype.isVisible=function(){return this.l};
function cv(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=$u()}
function dv(a,b,c){var d=new re(a.j,b,"");d.textAlign=a.G===0?"left":a.G===1?"right":te;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.M;e.height=a.u;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?vd:2;switch(a.H){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Du(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Yu.prototype.display=function(){this.l=!0};function ev(){this.i=[];this.h=null;this.g=0}function fv(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new gv(a.h)),a.h=null,a.g=0))}function gv(a){this.g=0;this.h=a}gv.prototype.Pa=function(){return this.g<this.h.length};gv.prototype.Wa=function(){return this.g};function hv(a){if(!a.Pa())throw new U(2,2,3E3);return a.h[a.g++]}gv.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};
gv.prototype.Dj=function(a){if(this.g-a<0)throw new U(2,2,3E3);this.g-=a};function iv(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function jv(a,b,c,d){if(!a.g)return[];if(c==24)return c=hv(b).value,d=hv(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),av(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!bv(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=dv(b,d,a.i));b.h+1>=b.u?cv(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=dv(b,d,a.i));b.i[b.h]=$u();b.g=0;break;case 12:b.isVisible()&&
(e=dv(b,d,a.i)),Zu(b),b.h=0,b.g=0}return e?[e]:[]}
function kv(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=hv(b).value;b=[];c=t(lv(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=dv(e,d,a.i);f&&b.push(f)}Zu(e)}return b}if(c===137)for(b=hv(b).value,b=t(lv(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=hv(b).value;b=null;c=t(lv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=dv(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(c===139){c=hv(b).value;b=null;c=t(lv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=dv(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=hv(b).value,mv(a,b,d);if(c===143)return d=mv(a,255,d),nv(a),d;if(c===144)b.skip(1),d=hv(b).value,a.g&&(a.g.C=(d&128)>0,a.g.F=(d&64)>0);else if(c===145)d=hv(b).value,c=hv(b).value,b.skip(1),a.g&&(b=ov((c&48)>>4,(c&12)>>2,c&3),a.g.D=ov((d&48)>>4,(d&12)>>2,d&3),a.g.A=b);else if(c===146)d=hv(b).value,b=hv(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=hv(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new Yu(c,a.i),f.j=d,a.h[c]=f);d=hv(b).value;f=hv(b).value;var g=hv(b).value,h=hv(b).value,k=hv(b).value;b=hv(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.F=!1,b.C=!1,b.D="white",b.A="black");b=a.h[c];b.l=(d&32)>0;b.L=f&127;b.I=g;b.H=(h&240)>>4;b.K=(f&128)>0;b.u=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function lv(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function mv(a,b,c){var d=[];b=t(lv(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=dv(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function nv(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ov(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return pv[a<<2|b<<1|c]}
var qv=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"]]),pv="black blue green cyan red magenta yellow white".split(" ");function rv(){this.h=[];this.g=[];this.i=new ev;this.l=0;this.m=new Map([["CC1",new Su(0,0)],["CC2",new Su(0,1)],["CC3",new Su(1,0)],["CC4",new Su(1,1)]]);this.A=this.u=0;this.j=new Map;this.D=!0;this.C=new Set;sv(this)}rv.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;sv(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())nv(b.value)};
function sv(a){a.u=0;a.A=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Iu(c.i),Iu(c.j),Iu(c.u);a.D=!0}
rv.prototype.extract=function(a,b){if(this.D){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.D=!1}a=new oh(a,0);if(!(a.getLength()<8)&&a.ba()===181&&a.Ia()===49&&a.$()===1195456820&&a.ba()===3&&(c=a.ba(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ba(),f=(e&4)>>2,g=a.ba(),h=a.ba();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,Hb:g,vc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
rv.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=tv(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())fv(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=uv(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
function tv(a,b){var c=b.type;if((b.Hb&112)===16){var d=b.Hb>>3&1;c===0?a.u=d:a.A=d}d="CC"+((c<<1|(c?a.A:a.u))+1);c=a.m.get(d);if(b.Hb===255&&b.vc===255||!b.Hb&&!b.vc||!vv(b.Hb)||!vv(b.vc))return++a.l>=45&&sv(a),null;a.l=0;b.Hb&=127;b.vc&=127;var e=b.Hb;if(e>=1&&e<=15||!b.Hb&&!b.vc)return null;e=null;if((b.Hb&112)===16)a:{a.C.add(d),d=b.Hb;a=b.vc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
null;var g=a>95?a-96:a-64;g<=13?d=Xu[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,Ru(g,c,1+g.g-g.h,g.h),Lu(g,0,c-1),Lu(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.A=f,g.u="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",Mu(c.g,0,32),d=!1,b=Xu[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=Wu[(a&
14)>>1]),c.g.u=b;else if((d&247)===17&&(a&240)===48)Mu(c.g,1,a);else if((d&246)===18&&(a&224)===32)Mu(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.vc){case 32:Uu(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Tu(c,2,a);break;case 38:d=Tu(c,3,a);break;case 39:d=Tu(c,4,a);break;case 40:Mu(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Iu(c.u);Vu(c);break;case 43:Vu(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=Ju(b,c.l,a));Lu(b,0,15);break;case 45:b=
c.g;c.h!==3?d=null:(d=Ju(b,c.l,a),e=b.g-b.h+1,Ru(b,e-1,e,b.h),Lu(b,0,e-1),Lu(b,b.g,15-b.g),c.l=a);break;case 46:Lu(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=Ju(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Uu(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.C=a-32)}e=null}else a=b.vc,Mu(c.g,0,b.Hb),Mu(c.g,0,a);return e}
function uv(a,b){var c=[];try{for(;b.Pa();){var d=hv(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=hv(b).value&63);if(e!=0){a.C.add("svc"+e);a.j.has(e)||a.j.set(e,new iv(e));for(var g=a.j.get(e),h=b.Wa();b.Wa()-h<f;){e=g;var k=b,l=hv(k),m=l.value,n=l.pts;if(m===16){var q=hv(k);m=m<<16|q.value}if(m>=0&&m<=31)var r=jv(e,k,m,n);else if(m>=128&&m<=159)r=kv(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?av(e.g,"\u266a"):av(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&av(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(qv.has(k)){var u=qv.get(k);av(e.g,u)}else av(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?av(e.g,"_"):av(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(v){if(v instanceof U&&v.code===3E3)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function vv(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}rv.prototype.getStreams=function(){return Array.from(this.C)};S("shaka.cea.CeaDecoder",rv);qd=function(){return new rv};function wv(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function xv(){this.j=new Map;this.i=this.h=0;this.g=yv}
xv.prototype.init=function(a){function b(f){f=f.name;zv.has(f)&&(c.g=zv.get(f))}var c=this,d=[],e=[];(new rh).box("moov",wh).box("mvex",wh).X("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.$();g=g.$();c.h=f;c.i=g}).box("trak",wh).X("tkhd",function(f){var g=f.reader;f=f.version;f==1?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.$();f==1?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Ia();g.Ia();g.Ia();g.Ia();d.push(h)}).box("mdia",wh).X("mdhd",
function(f){f=Ni(f.reader,f.version);e.push(f.timescale)}).box("minf",wh).box("stbl",wh).X("stsd",yh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",zh).box("sinf",wh).box("frma",function(f){f=Qi(f.reader).codec;zv.has(f)&&(c.g=zv.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==yv&&bb("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
xv.prototype.parse=function(a){var b=this;if(this.g==yv)return[];var c=[],d=0,e=[];(new rh).box("moof",function(f){d=f.start;e=[];wh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,le:b.h,me:b.i,uj:[],timescale:9E4});wh(f)}).X("trun",function(f){var g=e[e.length-1];f=Oi(f.reader,f.version,f.flags);g.uj.push(f)}).X("tfhd",function(f){var g=e[e.length-1];f=Li(f.reader,f.flags);g.le=f.le||b.h;g.me=f.me||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).X("tfdt",function(f){var g=e[e.length-
1];f=Mi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Wa(),k=t(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?bb("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),Av(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.le,l.me,g,l.uj,c))}).parse(a,!1,!0);return c};
function Av(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Yh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Tg);b.Pa();){g=b.$();var q=b.ba(),r=null;r=!1;h=1;switch(a.g){case Bv:r=q&31;r=r==6;break;case Cv:h=2;b.skip(1);r=q>>1&63;r=r==39||r==40;break;case Dv:h=2;b.skip(1);r=q>>1&63;r=r==23||r==24;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].cg||0),q=(c+q)/d,h=b.ac(g-h,!1),h=t(wv(h)),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});
else try{b.skip(g-h)}catch(u){break}m-=g+4;m==0&&(c=l<n.length?c+(n[l].Zh||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",xv);var yv=0,Bv=1,Cv=2,Dv=3,zv=(new Map).set("avc1",Bv).set("avc3",Bv).set("dvav",Bv).set("dva1",Bv).set("hev1",Cv).set("hvc1",Cv).set("dvh1",Cv).set("dvhe",Cv).set("vvc1",Dv).set("vvi1",Dv).set("dvc1",Dv).set("dvi1",Dv);sd("video/mp4",function(){return new xv});function Ev(){this.g=null}Ev.prototype.init=function(){};Ev.prototype.parse=function(a){this.g?this.g.clearData():this.g=new rk;var b=[];a=Jb(a);if(!zk(a))return b;a=this.g.parse(a);var c=a.oe(),d=a.zf();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&d.time!=null)for(var e=t(wv(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Ev);sd("video/mp2t",function(){return new Ev});function Fv(a){var b=0,c=Nb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=Jb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Gv(a){a=fc(Td(a));a=Fv(a).filter(function(b){return b.type===Hv})[0];if(!a)return null;a=Wb(a.value,!0);return(a=Ld(a,"WRMHEADER"))?a:null}
function Iv(a){try{var b=Gv(a);if(b)a:{for(var c=t(Vd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if(h.tagName=="LA_URL"){var k=Td(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Hv=1;function Jv(){this.g=new Map}Jv.prototype.release=function(){this.g.clear()};
function Kv(a,b,c,d){var e=Lv(a,b),f=null;a=[];var g=[];b=null;var h=new Set(e.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(h.size>1)throw new U(2,4,4010);if(!c){g=e.filter(function(l){return l.Wd=="urn:mpeg:dash:sea:2012"});if(g.length>1)throw new U(2,4,4050);g.length&&(b=Mv(g[0]));(g=e.find(function(l){return l.Wd=="urn:mpeg:dash:mp4protection:2011"}))&&g.encryptionScheme&&(k=g.encryptionScheme);g=e.filter(function(l){return l.Wd=="urn:mpeg:dash:mp4protection:2011"?(f=l.init||
f,!1):l.Wd!="urn:mpeg:dash:sea:2012"});g.length&&(a=Nv(f,k,g,d,h),a.length==0&&(a=[nc("",k,f)]))}if(e.length&&!b&&(c||!g.length))for(a=[],c=t(Object.values(d)),d=c.next();!d.done;d=c.next())d=d.value,d!="org.w3.clearkey"&&a.push(nc(d,k,f));if(h=Array.from(h)[0]||null)for(k=t(a),c=k.next();!c.done;c=k.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Pi:h,Rn:f,drmInfos:a,Hg:b,Ui:!0}}
function Ov(a,b,c,d,e){var f=Kv(a,b,d,e);if(c.Ui){a=c.drmInfos.length==1&&!c.drmInfos[0].keySystem;b=f.drmInfos.length==0;if(c.drmInfos.length==0||a&&!b)c.drmInfos=f.drmInfos;c.Ui=!1}else if(f.drmInfos.length>0&&(c.drmInfos=c.drmInfos.filter(function(g){return f.drmInfos.some(function(h){return h.keySystem==g.keySystem})}),c.drmInfos.length==0))throw new U(2,4,4008);return f.Pi||c.Pi}
function Pv(a){var b=Xd(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Td(b)))return b;if((b=Xd(a.node,"urn:microsoft:playready","pro"))&&Td(b))return Iv(b);if(a=Xd(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=Td(a)){b=fc(a);a=8;b=Nb(b);var c=b.getUint8(a);a+=20;c>0&&(a+=4+16*b.getUint32(a));a=Jb(b,a+4);a=dc(a);a=Ld("<pro>"+a+"</pro>");return Iv(a)}return""}
function Nv(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Wd];if(h){var k;if((k=Xd(g.node,"urn:microsoft:playready","pro"))&&Td(k)){k=Td(k);k=fc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Dh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if(g.Wd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=g;var m=e;if(m.size==0)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Dh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=nc(h,b,g.init||a||k||l);if(h=Qv.get(h))k.licenseServerUri=h(g);a:{if(g=Xd(g.node,"https://dashif.org/CPS","Certurl"))if(g=Td(g))break a;g=""}k.serverCertificateUri=g;f.push(k)}}return f}function Lv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())(d=Rv(a,d.value))&&c.push(d);return c}
function Rv(a,b){var c=b.attributes.schemeIdUri,d=$d(b,"urn:mpeg:cenc:2013","default_KID"),e=Yd(b,"urn:mpeg:cenc:2013","pssh").map(Ud),f=b.attributes.value;if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new U(2,4,4009);var g=[];try{g=e.map(function(h){if(!a.g.has(h)){var k=fc(h);a.g.set(h,k)}return{initDataType:"cenc",initData:a.g.get(h),keyId:null}})}catch(h){throw new U(2,4,4007);}return{node:b,Wd:c,keyId:d,init:g.length>0?g:null,encryptionScheme:f}}
function Mv(a){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=Xd(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if(b.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new U(2,4,4051);b=Xd(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=bc(b.attributes.keyUriTemplate);
if(!a||!b)throw new U(2,4,4051);a=hc(a.substr(2));if(a.byteLength!=16)throw new U(2,4,4048);return{Kl:b,iv:a}}
var Qv=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4054);if(a=Xd(a.node,"https://dashif.org/CPS","Laurl"))if(a=Td(a))return a;return""}).set("com.widevine.alpha",function(a){var b=Xd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Td(b))?b:(a=Xd(a.node,"urn:microsoft","laurl"))?bc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Pv).set("com.microsoft.playready.recommendation",Pv).set("com.microsoft.playready.software",
Pv).set("com.microsoft.playready.hardware",Pv).set("org.w3.clearkey",function(a){var b=Xd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Td(b))?b:(a=Xd(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&a.attributes.Lic_type==="EME-1.0"&&a&&(a=Td(a))?a:""});function Sv(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if(h=="$$")return"$";var n=g.get(k);if(n==null)return h;k=="RepresentationID"&&l&&(l=void 0);k=="Time"&&typeof n!="bigint"&&(Math.abs(n-Math.round(n))>=.2&&bb("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=
n.toString();break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
function Tv(a,b){var c=Uv(a,b,"timescale"),d=1;c&&(d=fe(c)||1);c=Uv(a,b,"duration");var e=(c=fe(c||""))?c/d:null,f=Uv(a,b,"startNumber"),g=Number(Uv(a,b,"presentationTimeOffset"))||0,h=ge(f||"");if(f==null||h==null)h=1;f=null;if(b=Vv(a,b,"SegmentTimeline")){b=Sd(b,"S");f=d;a=a.qa.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],u=Zd(q,"t",ge),v=Zd(q,"d",ge),w=Zd(q,"r",ee);q=Zd(q,"k",ee)||0;u!=null&&(u-=g);if(v){u=u!=null?u:m;w=w||0;if(w<0)if(r){r=Zd(r,"t",ge);if(r==
null)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(a==Infinity)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}l.length>0&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,end:m/f,wi:u,Fc:q,om:l.length+k}),u=m}}f=l}return{timescale:d,pg:c,pb:e,Ke:h,Pb:g/d||0,wd:g,timeline:f}}function Wv(a,b){return[b(a.N),b(a.va),b(a.Aa)].filter(Gf)}function Uv(a,b,c){b=Wv(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
function Vv(a,b,c){b=Wv(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Wd(d.value,c));d=b.next());return a}
function Xv(a,b,c,d,e,f){for(var g=$d(a,"http://www.w3.org/1999/xlink","href"),h=$d(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Nd("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(f>=5)return Qg(new U(2,4,4028));if(h!="onLoad")return Qg(new U(2,4,4027));var q=mc([d],[g]);return e.request(0,ch(q,b)).bb(function(r){r=Kd(r.data,a.tagName);if(!r)return Qg(new U(2,4,4001,g));for(a.children=
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Yv(a,b,c,q[0],e,f+1)})}
function Yv(a,b,c,d,e,f){f=f===void 0?0:f;if($d(a,"http://www.w3.org/1999/xlink","href")){var g=Xv(a,b,c,d,e,f);c&&(g=g.bb(void 0,function(){return Yv(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Rd(a)),k=h.next(),l={};!k.done;l={ie:void 0},k=h.next())l.ie=k.value,$d(l.ie,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?a.children=a.children.filter(function(m){return function(n){return n!==m.ie}}(l)):l.ie.tagName!="SegmentTimeline"&&g.push(Yv(l.ie,b,c,d,e,f));return Ug(g).bb(function(){return a})}
;function Zv(a,b,c,d,e,f,g){var h,k=(new rh).X("sidx",function(l){h=$v(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
function $v(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.$();if(k==0)throw new U(2,3,3005);if(g.version==0){var l=g.reader.$();var m=g.reader.$()}else l=g.reader.Td(),m=g.reader.Td();g.reader.skip(2);var n=g.reader.Ia();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.$(),r=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.$();g.reader.skip(4);if(r==1)throw new U(2,3,3006);h.push(new Bj(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function aw(a){this.h=Nb(a);this.g=new oh(this.h,0)}aw.prototype.Pa=function(){return this.g.Pa()};
function bw(a){var b=cw(a);if(b.length>7)throw new U(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=cw(a);a:{d=t(dw);for(var e=d.next();!e.done;e=d.next())if(Ib(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Wa();else{if(b.length==8&&b[1]&224)throw new U(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=e==0?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Wa();d=Nb(a.h,a.g.Wa(),b);a.g.skip(b);return new ew(c,
d)}function cw(a){var b=a.g.Wa(),c=a.g.ba();if(c==0)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Jb(a.h,b,c)}var dw=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function ew(a,b){this.id=a;this.g=b}
function fw(a){if(a.g.byteLength>8)throw new U(2,3,3002);if(a.g.byteLength==8&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function gw(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new aw(a.g);for(var n=null,q=null;a.Pa();){var r=bw(a);if(r.id==187){var u=hw(r);u&&(r=c*u.Cm,u=b+u.bm,n!=null&&m.push(new Bj(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}n!=null&&m.push(new Bj(n+g,d+g,l,q,null,f,g,h,k));return m}
function hw(a){var b=new aw(a.g);a=bw(b);if(a.id!=179)throw new U(2,3,3013);a=fw(a);b=bw(b);if(b.id!=183)throw new U(2,3,3012);b=new aw(b.g);for(var c=0;b.Pa();){var d=bw(b);if(d.id==241){c=fw(d);break}}return{Cm:a,bm:c}};function iw(a,b,c){b=Vv(a,b,"Initialization");if(!b)return null;var d=a.N.mb(),e=b.attributes.sourceURL;e&&(d=mc(d,[bc(e)],a.Rb()));e=0;var f=null;if(b=Zd(b,"range",de))e=b.start,f=b.end;c=new zj(function(){return d},e,f,jw(a),null,null,c,a.va.encrypted);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;a.qa&&!a.qa.Ef&&(c.g=a.qa.start+a.qa.duration);return c}
function kw(a,b,c){var d=Number(Uv(a,lw,"presentationTimeOffset"))||0,e=Uv(a,lw,"timescale"),f=1;e&&(f=fe(e)||1);var g=d/f||0,h=iw(a,lw,c);mw(a,h);var k=Id(a);return{endTime:-1,timeline:-1,gd:function(){var l=Vv(k,lw,"RepresentationIndex");var m=k.N.mb();l&&(l=bc(l.attributes.sourceURL))&&(m=mc(m,[l],k.Rb()));l=nw(k);return ow(k,b,h,m,l.start,l.end,g)},timescale:f}}
function ow(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F;return P(function(J){if(J.g==1)return h=a.presentationTimeline,k=!a.Jb||!a.qa.Ef,l=a.qa.start,m=a.qa.duration,n=a.N.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),n=="webm"?q(c.S(),c.startByte,c.endByte,!0):null],q=null,G(J,Promise.all(u),2);v=J.h;w=v[0];z=v[1]||null;y=null;B=l-g;C=l;E=m?l+m:Infinity;if(n=="mp4")var H=Zv(w,e,d,c,B,C,E);else{H=w;var K=new aw(z);if(bw(K).id!=440786851)throw new U(2,3,3008);var L=bw(K);if(L.id!=408125543)throw new U(2,
3,3009);K=L.g.byteOffset;L=new aw(L.g);for(var O=null;L.Pa();){var Q=bw(L);if(Q.id==357149030){O=Q;break}}if(!O)throw new U(2,3,3010);O=new aw(O.g);Q=1E6;for(L=null;O.Pa();){var N=bw(O);if(N.id==2807729)Q=fw(N);else if(N.id==17545)if(N.g.byteLength==4)L=N.g.getFloat32(0);else if(N.g.byteLength==8)L=N.g.getFloat64(0);else throw new U(2,3,3003);}if(L==null)throw new U(2,3,3011);O=Q/1E9;L*=O;H=bw(new aw(H));if(H.id!=475249515)throw new U(2,3,3007);H=gw(H,K,O,L,d,c,B,C,E)}y=H;D=t(y);for(A=D.next();!A.done;A=
D.next())F=A.value,F.codecs=a.N.codecs,F.mimeType=a.N.mimeType,F.bandwidth=a.bandwidth;h.Ce(y);r=new am(y);k&&r.Gd(C,E,!0);return J.return(r)})}function lw(a){return a.Xd}function nw(a){var b=Vv(a,lw,"RepresentationIndex");a=Uv(a,lw,"indexRange");a=de(a||"");b&&(a=Zd(b,"range",de,a));return a}function mw(a,b){pw(a,b);if(!nw(a))throw new U(2,4,4002);}
function pw(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=sc&&c!="mp4"&&c!="webm")throw new U(2,4,4006);if(c=="webm"&&!b)throw new U(2,4,4005);}
function jw(a){var b=a.N;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Rf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.va.label||null,roles:a.roles||null,language:a.va.language||null}};function qw(a,b,c){var d=iw(a,rw,c),e=sw(a);if(!e.pb&&!e.timeline&&e.Pd.length>1)throw new U(2,4,4002);if(!e.pb&&!a.qa.duration&&!e.timeline&&e.Pd.length==1)throw new U(2,4,4002);if(e.timeline&&e.timeline.length==0)throw new U(2,4,4002);var f=null,g=null;a.Aa.id&&a.N.id&&(g=b.get(a.Aa.id+","+a.N.id))&&(f=g.segmentIndex);var h=tw(a.qa.start,a.qa.duration,a.N.mb,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Rb);b=!f;f?f.Ae(h,a.presentationTimeline.Mb()):f=new am(h);a.presentationTimeline.Ce(h);a.Jb&&
a.qa.Ef||f.Gd(a.qa.start,a.qa.duration?a.qa.start+a.qa.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,gd:function(){f&&f.getNumReferences()!=0||f.Mf(h);return Promise.resolve(f)},timescale:e.timescale}}function rw(a){return a.Jc}function sw(a){var b=uw(a);a=Tv(a,rw);var c=a.Ke;c==0&&(c=1);var d=0;a.pb?d=a.pb*(c-1):a.timeline&&a.timeline.length>0&&(d=a.timeline[0].start);return{pb:a.pb,startTime:d,Ke:c,Pb:a.Pb,timescale:a.timescale,timeline:a.timeline,Pd:b}}
function tw(a,b,c,d,e,f,g,h,k,l){var m=d.Pd.length;d.timeline&&d.timeline.length!=d.Pd.length&&(m=Math.min(d.timeline.length,d.Pd.length));for(var n=a-d.Pb,q=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={rg:void 0,dg:void 0},w++){v.dg=d.Pd[w];var z=u;u=void 0;u=d.pb!=null?z+d.pb:d.timeline?d.timeline[w].end:z+b;v.rg=null;v=new Bj(a+z,a+u,function(y){return function(){y.rg==null&&(y.rg=mc(c(),[y.dg.Rl],l()));return y.rg}}(v),v.dg.start,v.dg.end,e,n,a,q,[],"",null,null,Cj,f);v.codecs=h;v.mimeType=
g;v.bandwidth=k;r.push(v)}return r}function uw(a){return[a.N.Jc,a.va.Jc,a.Aa.Jc].filter(Gf).map(function(b){return Sd(b,"SegmentURL")}).reduce(function(b,c){return b.length>0?b:c}).map(function(b){b.attributes.indexRange&&!a.Bh&&(a.Bh=!0);var c=bc(b.attributes.media);b=Zd(b,"mediaRange",de,{start:0,end:null});return{Rl:c,start:b.start,end:b.end}})};function vw(a,b,c,d,e,f,g,h,k,l){k||a.N.Bf||(a.N.Bf=Uv(a,ww,"initialization"));var m=a.N.Bf?xw(a,g):null,n=yw(a);zw(n);var q=Id(a);if(n.ve)return pw(a,m),{endTime:-1,timeline:-1,gd:function(){var z=Sv(n.ve,q.N.originalId,null,null,q.bandwidth||null,null);z=mc(q.N.mb(),[z]);return ow(q,b,m,z,0,null,n.Pb)},timescale:n.timescale};if(n.pb)return d||a.va.contentType==="image"||a.va.contentType==="text"||(d=a.qa.start,l=a.Aa.id,c=a.qa.duration,l=(l=l!=null&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.Kh(n.pb),
a.presentationTimeline.sj(d,l)),{endTime:-1,timeline:-1,gd:function(){return Aw(q,n,e,m,f,g,h,a.N.eg)},timescale:n.timescale};var r=null;d=d=null;a.Aa.id&&a.N.id&&(d=a.Aa.id+","+a.N.id,d=c.get(d))&&(r=d.segmentIndex);var u=a.qa.start,v=a.qa.duration?u+a.qa.duration:Infinity;if(r)l=r,Bw(l,n,u,v,m,a.Jb),l.cb(a.presentationTimeline.Mb());else{c=0;k=-1;if(a.Aa.id!=null&&a.N.id!=null){var w=l.get(a.Aa.id);if(w)k=w.timeline;else for(l=t(l.values()),w=l.next();!w.done;w=l.next())if(w=w.value,Math.abs(n.Pb-
w.endTime)<=vc&&w.Th.includes(a.N.id)){k=w.timeline;break}else w.timeline>=c&&(c=w.timeline+1)}k==-1&&(k=c);r=new Cw(a.Jb,n,a.N.originalId,a.bandwidth,a.N.mb,a.Rb,u,v,m,g,a.N.eg,k)}n.timeline&&a.va.contentType!=="image"&&a.va.contentType!=="text"&&a.presentationTimeline.tj(r.h?r.h.timeline:[],u);d&&a.Jb&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.Pb:-1;l=-1;r instanceof Cw&&(l=r.pf());return{endTime:d,timeline:l,gd:function(){r instanceof Cw&&r.getNumReferences()==0&&Bw(r,n,u,
v,m,a.Jb);return Promise.resolve(r)},timescale:n.timescale}}function ww(a){return a.Zc}function yw(a){var b=Tv(a,ww),c=Uv(a,ww,"media"),d=Uv(a,ww,"index"),e=Uv(a,ww,"k"),f=0;e&&(f=parseInt(e,10));return{pg:b.pg,pb:b.pb,timescale:b.timescale,Ke:b.Ke,Pb:b.Pb,wd:b.wd,timeline:b.timeline,jc:c&&bc(c),ve:d,mimeType:a.N.mimeType,codecs:a.N.codecs,bandwidth:a.bandwidth,Sl:f}}
function zw(a){var b=a.ve?1:0;b+=a.timeline?1:0;b+=a.pb?1:0;if(b==0)throw new U(2,4,4002);b!=1&&(a.ve&&(a.timeline=null),a.pg=null,a.pb=null);if(!a.ve&&!a.jc)throw new U(2,4,4002);}
function Aw(a,b,c,d,e,f,g,h){function k(L){var O=L-w,Q=O*v,N=b.pg,M=O*N;"BigInt"in window&&M>Number.MAX_SAFE_INTEGER&&(M=BigInt(O)*BigInt(N));Q+=q;O=Q+v;N=Math.min(O,m());var R=[],V=b.Sl;if(V)for(var xa=(N-Q)/V,ba={},Oa=0;Oa<V;ba={Tj:void 0},Oa++){var Ha=Q+xa*Oa,Ia=Ha+xa;ba.Tj=Oa;ba=new Bj(Ha,Ia,function(Fa){return function(){var wa=Sv(z,B,L,Fa.Tj,y,M);return mc(C(),[wa],E())}}(ba),0,null,d,D,q,m(),[],"",null,null,Cj,f);ba.codecs=a.N.codecs;ba.mimeType=a.N.mimeType;h==0?Oa>0&&ba.Nd():Oa%h!=0&&ba.Nd();
R.push(ba)}Q=new Bj(Q,N,function(){if(V)return[];var Fa=Sv(z,B,L,null,y,M);return mc(C(),[Fa],E())},0,null,d,D,q,m(),R,"",null,null,Cj,f,R.length>0);Q.codecs=a.N.codecs;Q.mimeType=a.N.mimeType;Q.bandwidth=a.bandwidth;Q.j=O;return Q}function l(){var L=[Math.max(n.Mb(),q),Math.min(n.Rc(),m())].map(function(O){return O-q});L=[Math.ceil(L[0]/v),Math.ceil(L[1]/v)-1];a.N.zb&&L[1]++;return L.map(function(O){return O+w})}function m(){var L=r!=null&&e.get(r)||u;return L?q+L:Infinity}var n=a.presentationTimeline,
q=a.qa.start,r=a.Aa.id,u=a.qa.duration,v=b.pb,w=b.Ke,z=b.jc,y=a.bandwidth||null,B=a.N.originalId,C=a.N.mb,E=a.Rb,D=q-b.Pb,A=l();c=a.Jb?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var F=c;F<=g;++F){var J=k(F);A.push(J)}var H=new am(A);A=n.Rc()<m();F=n.U();if(A||F){var K=Math.max(c,g+1);c=v;a.N.zb&&(c=.1);H.qg(c,function(){var L=n.Mb();H.cb(L);var O=t(l());O.next();O=O.next().value;for(var Q=[];K<=O;){var N=k(K);Q.push(N);K++}return L>m()&&!Q.length?null:Q})}return Promise.resolve(H)}
function xw(a,b){var c=a.N.Bf;c||(c=Uv(a,ww,"initialization"));if(!c)return null;c=bc(c);var d=a.N.originalId,e=a.bandwidth||null,f=a.N.mb,g=a.Rb;b=new zj(function(){var h=Sv(c,d,null,null,e,null);return mc(f(),[h],g())},0,null,jw(a),null,null,b,a.va.encrypted);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;a.qa&&!a.qa.Ef&&(b.g=a.qa.start+a.qa.duration);return b}
function Cw(a,b,c,d,e,f,g,h,k,l,m,n){am.call(this,[]);this.F=a;this.h=b;this.H=c;this.D=d;this.G=e;this.J=f;this.j=g;this.l=h;this.A=k;this.C=l;this.I=m;this.K=n;Dw(this)}ma(Cw,am);p=Cw.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){am.prototype.release.call(this);this.h=null};
p.cb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;b>0&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,this.getNumReferences()===0&&this.release())}};
function Bw(a,b,c,d,e,f){Ew(a,e);a.F=f;if(a.h){a.h.wd!==b.wd&&(a.h.timeline=b.timeline,a.h.wd=b.wd,a.h.Pb=b.Pb);a.h.jc!==b.jc&&(a.h.jc=b.jc);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();b.length>0&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Dw(a)}function Ew(a,b){if(a.A!==b){a.A=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Fj(c,b)}}
function Dw(a){if(a.h&&!a.u){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||d.end<=0||b.push(d);a.h.timeline=b;a.cb(a.j)}}
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:this.l===Infinity?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
p.get=function(a){var b=this;a-=this.i;if(a<0||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.om,e=c.wi+this.h.wd,f=this.j-this.h.Pb,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&this.l!==Infinity&&(h=this.F&&Math.abs(h-this.l)>.1?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.Fc&&this.h&&this.h.jc&&(q=this.h.jc.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.Fc;for(var r={},u=0;u<c.Fc;r={sg:void 0,
Uj:void 0},u++){var v=c.start+q*u,w=v+q;r.Uj=u;r.sg=null;r=new Bj(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];z.sg==null&&(z.sg=Fw(b.h.jc,b.H,d,b.D,e,z.Uj,b.G,b.J));return z.sg}}(r),0,null,this.A,f,this.j,this.l,[],"",null,null,Cj,this.C);r.codecs=k;r.mimeType=l;r.bandwidth=m;this.I==0?u>0&&r.Nd():u%this.I!=0&&r.Nd();n.push(r)}}c=new Bj(this.j+c.start,h,function(){return n.length>0||!b.h?[]:Fw(b.h.jc,b.H,d,b.D,e,null,b.G,b.J)},0,null,this.A,f,this.j,this.l,n,"",null,null,Cj,this.C,
n.length>0);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};p.Kb=function(a){Dw(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Fw(a,b,c,d,e,f,g,h){a=Sv(a,b,c,f,d||null,e);return mc(g(),[a],h()).map(function(k){return k.toString()})}p.pf=function(){return this.K};function Gw(a){this.u=null;this.C=a;this.H=new Wg;this.i=[];this.h=null;this.m=[];this.D=null;this.G=[];this.F=300;this.l=new Map;this.j=new Map;this.g=null;this.A="UNKNOWN"}Gw.prototype.configure=function(a){this.u=a};Gw.prototype.destroy=function(){this.C=this.u=null;this.i=[];this.h=null;this.m=[];this.G=[];this.l.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.H.destroy()};Gw.prototype.setManifestType=function(a){this.A=a};
function Hw(a,b){var c,d,e,f,g,h,k;return P(function(l){if(l.g==1)return c=mc(a.i,[Iw(a,b)]),d=ch(c,a.u.retryParameters),e=a.C.networkingEngine.request(8,d),Xg(a.H,e),sa(l,2),G(l,e.promise,4);if(l.g!=2)return f=l.h,g=Vb(f.data),h=JSON.parse(g),h.VERSION==1&&Jw(a,h,f.uri),ua(l,0);if((k=va(l))&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new Df(function(){Hw(a,b)});a.g.Y(a.F);I(l)})}
function Iw(a,b){if(!a.m.length)return b;b=new rb(b);var c=a.D||a.m[0],d=Math.round(a.C.getBandwidthEstimate()),e=b.g;a.A=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.A=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Gb(e)&&vb(b,e);return b.toString()}function Jw(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Df(function(){Hw(a,d)});if(c=b.TTL)a.F=c;a.g.Y(a.F);a.m=b["PATHWAY-PRIORITY"]||[];a.G=b["PATHWAY-CLONES"]||[]}
function Kw(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Gw.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function Lw(a,b,c){c=c===void 0?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Rd:void 0},f=e.next())if(g.Rd=f.value,f=b.get(g.Rd))d.push({Ph:g.Rd,location:f});else if(f=a.G.find(function(k){return function(l){return l.Zm==k.Rd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].ik?(h=new rb(h),tb(h,f["URI-REPLACEMENT"].ik),d.push({Ph:g.Rd,location:h.toString()})):d.push({Ph:g.Rd,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rb(k.location)).Ib))return!1;return!0});d.length&&(a.D=d[0].Ph);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.D=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:mc(a.i,d)};function Mw(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=!1;this.m=new Set}p=Mw.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=!1;this.m.clear()};p.wl=function(){return this.l};p.uh=function(){return this.j.slice()};p.Ok=function(){return this.i};
p.Qi=function(a,b){if(a){if(a.type=="audio")for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="video")for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
a}));else if(a.type==sc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="image")for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
function Nw(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Ow(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Pw(n),n]})),l=new Map(h.textStreams.map(function(n){return[Qw(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Rw(n),n]}));if(b){var m=Sw(sc);l.set(Qw(m),m);m=Sw("image");h.set(Rw(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Gi:c,fk:d,Zj:e,ej:f}}
p.Og=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa;return P(function(ba){if(ba.g==1){e=uc;if(!b&&a.length==1)return f=Nw(a,!1),g=f.Gi,h=f.fk,k=f.Zj,l=f.ej,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ba.B(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),n==-1&&(n=q));if(n==-1)return ba.return();u=Nw(a,!0);v=u.Gi;w=u.fk;z=u.Zj;
y=u.ej;return G(ba,Promise.all([Tw(d,d.h,v,n,Uw,Vw,m),Tw(d,d.g,w,n,Uw,Vw,m),Tw(d,d.j,z,n,Uw,Vw,m),Tw(d,d.i,y,n,Uw,Vw,m)]),2)}B=0;C=[];if(d.g.length&&d.h.length)for(K=t(d.h),L=K.next();!L.done;L=K.next())for(O=L.value,Q=t(d.g),N=Q.next();!N.done;N=Q.next())M=N.value,R=Ag(O.drmInfos,M.drmInfos),O.drmInfos.length&&M.drmInfos.length&&!R.length||(V=(O.bandwidth||0)+(M.bandwidth||0),O.dependencyStream&&(V+=O.dependencyStream.bandwidth||0),M.dependencyStream&&(V+=M.dependencyStream.bandwidth||0),xa=B++,
C.push({id:xa,language:O.language,disabledUntilTime:0,primary:O.primary,audio:O,video:M,bandwidth:V,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(E=d.g.length?d.g:d.h,D=t(E),A=D.next();!A.done;A=D.next())F=A.value,J=B++,H=F.bandwidth||0,F.dependencyStream&&(H+=F.dependencyStream.bandwidth||0),C.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.na?F:null,video:F.type==e.Ha?F:null,bandwidth:H,drmInfos:F.drmInfos,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]});d.l=C;I(ba)})};
function Ww(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q;return P(function(N){switch(N.g){case 1:b=uc;if(a.length==1)return N.return(a[0]);c=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.na}).map(function(R){return[Ow(R),R]}))});d=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Ha}).map(function(R){return[Pw(R),R]}))});e=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Va}).map(function(R){return[Qw(R),
R]}))});f=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.yg}).map(function(R){return[Rw(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Xw(b.Va),k.set(Qw(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=Xw(b.yg),q.set(Rw(r),r);u=new Mw;return G(N,Tw(u,[],c,0,Yw,Zw,0),2);case 2:return v=N.h,G(N,Tw(u,[],d,0,Yw,Zw,0),3);case 3:return w=N.h,G(N,Tw(u,[],e,0,Yw,Zw,0),4);case 4:return z=N.h,G(N,Tw(u,[],f,0,Yw,Zw,0),5);case 5:y=N.h;B=0;if(w.length&&v.length)for(F=
t(v),J=F.next();!J.done;J=F.next())for(H=J.value,K=t(w),L=K.next();!L.done;L=K.next())O=L.value,Q=B++,O.variantIds.push(Q),H.variantIds.push(Q);else for(C=w.concat(v),E=t(C),D=E.next();!D.done;D=E.next())A=D.value,A.variantIds=[B++];return N.return(w.concat(v).concat(z).concat(y))}})}
function Tw(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H;return P(function(K){switch(K.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){K.B(4);break}n=m.value;return G(K,$w(a,n,c,d,f,h,g),5);case 5:q=K.h;if(!q)throw new U(2,4,4037);m=l.next();K.B(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),z=w.next();!z.done;z=w.next())y=z.value,(B=ax(a,b,y,c,e,f,h))&&b.push(B);C=t(h);for(E=
C.next();!E.done;E=C.next())for(D=E.value,A=t(D),F=A.next(),J={};!F.done;J={ki:void 0},F=A.next())if(J.ki=F.value,!bx(J.ki)&&(H=b.some(function(L){return function(O){return cx(L.ki,O)}}(J))))throw new U(2,4,4037);return K.return(b)}})}function $w(a,b,c,d,e,f,g){return P(function(h){if(h.g==1)return dx(a,c,b,g>0),b.matchedStreams?b.segmentIndex?G(h,ex(b,d+g),2):h.B(2):h.return(!1);fx(b,d,e,f,g);return h.return(!0)})}
function ex(a,b){var c,d,e,f,g,h;return P(function(k){if(k.g==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return G(k,Promise.all(c),2)}if(a.segmentIndex instanceof dm)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);I(k)})}
function ax(a,b,c,d,e,f,g){if(bx(c))return null;var h=e(c);dx(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return P(function(k){if(h.segmentIndex)return k.B(0);h.segmentIndex=new dm;return G(k,ex(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=t(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=t(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;fx(h,0,f,g,0);return h}
function fx(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;a.type=="audio"&&Fc(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function Uw(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;b.trickModeVideo=null;b.dependencyStream=null;return b}
function Yw(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set(a.keyIds);b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
function Vw(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Ag(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new U(2,
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Uw(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new dm,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Vw(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Vw(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Uw(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new dm,h=t(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),Vw(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Vw(a.dependencyStream,b))}
function Zw(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
function dx(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=gx(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function gx(a,b,c){var d={audio:Ow,video:Pw,text:Qw,image:Rw}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return cx(l,m)},video:function(l,m){return cx(l,m)},text:hx,image:ix}[c.type];for(var g={audio:jx,video:kx,text:lx,image:mx}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!bx(e)&&b.delete(d(e));return e}
function nx(a,b){return a.mimeType!=b.mimeType?!1:ox(a.codecs)===ox(b.codecs)}p.Oj=function(a){this.u=a};function cx(a,b){return a.drmInfos&&!yg(a.drmInfos,b.drmInfos)?!1:!0}function hx(a,b){return b.language?a.forced!==b.forced||Fc(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function ix(){return!0}
function jx(a,b,c){var d=px(a,b,c);if(d===qx)return!0;if(d===rx)return!1;d=Fc(a.language,b.language);var e=Fc(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<b.roles.length}else{if(!c.roles.length&&
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=sx(a.channelsCount,b.channelsCount,c.channelsCount);if(d==qx)return!0;if(d==rx)return!1;d=sx(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==qx?!0:d==rx?!1:a.bandwidth&&tx(a.bandwidth,b.bandwidth,c.bandwidth)==qx?!0:!1}
function kx(a,b,c){var d=px(a,b,c);if(d===qx)return!0;if(d===rx)return!1;d=sx(a.width*a.height,b.width*b.height,c.width*c.height);if(d==qx)return!0;if(d==rx)return!1;if(a.frameRate){d=sx(a.frameRate,b.frameRate,c.frameRate);if(d==qx)return!0;if(d==rx)return!1}return a.bandwidth&&tx(a.bandwidth,b.bandwidth,c.bandwidth)==qx?!0:!1}
function lx(a,b,c){var d=Fc(a.language,b.language),e=Fc(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function mx(a,b,c){return sx(a.width*a.height,b.width*b.height,c.width*c.height)==qx?!0:!1}
function Xw(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}
function Sw(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new am([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null}}function sx(a,b,c){if(b==a&&a!=c)return rx;if(c==a&&a!=b)return qx;if(b>a){if(c<=a||c-a<b-a)return qx;if(c-a>b-a)return rx}else{if(c>a)return rx;if(a-c<a-b)return qx;if(a-c>a-b)return rx}return ux}function px(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return rx;if(!d&&e)return qx;b=nx(a,b);a=nx(a,c);return b&&!a?rx:!b&&a?qx:ux}function tx(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?qx:b<a?rx:ux}
function bx(a){switch(a.type){case sc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function Pw(a){return vx([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function Ow(a){return vx([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Qw(a){return vx([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Rw(a){return vx([a.width,a.codecs,a.mimeType])}function vx(a){return JSON.stringify(a)}function ox(a){if(!wx.has(a)){var b=jf(a);wx.set(a,b)}return wx.get(a)}
S("shaka.util.PeriodCombiner",Mw);Mw.prototype.setUseStreamOnce=Mw.prototype.Oj;Mw.prototype.combinePeriods=Mw.prototype.Og;Mw.prototype.deleteStream=Mw.prototype.Qi;Mw.prototype.getImageStreams=Mw.prototype.Ok;Mw.prototype.getTextStreams=Mw.prototype.uh;Mw.prototype.getVariants=Mw.prototype.wl;var qx=1,ux=0,rx=-1,wx=new Map;function xx(a,b){var c=new DOMParser,d=yx.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function zx(a,b){try{var c=Yb(a);return xx(c,b)}catch(d){return null}}
var yx=new Pb(function(){if(typeof trustedTypes!=="undefined"){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Ax(){var a=this;this.j=this.g=null;this.C=[];this.h=null;this.Ca=1;this.H=[];this.l={Of:"",type:"",profiles:[],Cc:null,zb:0,mb:null,Fe:0};this.A=new Map;this.D=new Map;this.u=new Map;this.F=new Map;this.sa=new Map;this.m=new Mw;this.K=0;this.ya=new Mc(5);this.L=new Df(function(){if(a.J&&!a.g.continueLoadingWhenPaused&&(a.I.Fa(a.J,"timeupdate"),a.J.paused)){a.I.ua(a.J,"timeupdate",function(){return Bx(a)});return}Bx(a)});this.P=new Wg;this.O=null;this.G=[];this.Z=Infinity;this.oa=!1;this.i=
null;this.M=0;this.R=!1;this.I=new Tc;this.J=null;this.T=!1;this.W="";this.ha=function(){return!1};this.V=[];this.aa=new Set;this.ra=new Jv}p=Ax.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.ha=b);c&&this.h&&this.h.presentationTimeline.U()&&this.L.Ka();this.i&&this.i.configure(this.g);this.m&&this.m.Oj(this.g.dash.useStreamOnceInPeriodFlattening)};
p.start=function(a,b){var c=this,d;return P(function(e){if(e.g==1)return c.oa=b.isLowLatencyMode(),c.C=[a],c.j=b,G(e,Cx(c),2);d=e.h;c.j&&Dx(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.h)})};
p.stop=function(){for(var a=t(this.u.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.C=[];this.h=null;this.u.clear();this.F.clear();this.A.clear();this.D.clear();this.l={Of:"",type:"",profiles:[],Cc:null,zb:0,mb:null,Fe:0};this.m=null;this.L!=null&&(this.L.stop(),this.L=null);this.i&&this.i.destroy();this.I&&(this.I.release(),this.I=null);this.aa.clear();this.ra.release();return this.P.destroy()};
p.update=function(){var a=this,b;return P(function(c){if(c.g==1)return sa(c,2),G(c,Cx(a),4);if(c.g!=2)return ua(c,0);b=va(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.h&&this.h.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.h.presentationTimeline.Rc();var c=b.segmentIndex.find(a);c!=null&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Dx(this,0))}}};
p.banLocation=function(a){this.i&&this.i.banLocation(a)};p.setMediaElement=function(a){this.J=a};
function Cx(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(q){if(q.g==1)return b=4,c="MPD",d=Ex(a),e=a.C,d.length?(e=d,c="Patch",b=6):a.C.length>1&&a.i&&(f=Lw(a.i,"Location",!0),f.length&&(e=f)),g=ch(e,a.g.retryParameters),h=Date.now(),G(q,Fx(a,g,0,{type:b}),2);if(q.g!=3){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.C.includes(k.uri)&&a.C.unshift(k.uri);l=new rb(k.uri);a.W=l.g.toString();return G(q,Gx(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ya.sample(1,n);a.aa.clear();
return q.return(n)})}
function Gx(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return P(function(v){if(v.g==1){e=b;f=a.g.dash.manifestPreprocessor;g=co;if(f!=g){Zc("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=zx(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Zb(h.outerHTML)}k=Kd(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=eo;l!=m&&l(k);if(d==="Patch")return v.return(Hx(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Ix(a,k,c));
q=a.g.dash.xlinkFailGracefully;r=Yv(k,a.g.retryParameters,q,c,a.j.networkingEngine);Xg(a.P,r);return G(v,r.promise,2)}u=v.h;return v.return(Ix(a,u,c))})}
function Ix(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb,ob,Ta,Ec,ic,Bg,rd,Ke,Dd,Cg,Mk,hi;return P(function(jd){switch(jd.g){case 1:a.i&&a.i.l.clear();d=[c];e=[];f=new Map;g=Sd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Ud(l))q=mc(d,[n])[0],m&&(a.i?Kw(a.i,"Location",m,q):f.set(m,q)),e.push(q);a.i?(r=Lw(a.i,"Location",!0),r.length>0&&(d=a.C=r)):e.length&&(d=a.C=e);a.l.Of=b.attributes.id||
"";a.l.Fe=Zd(b,"publishTime",be)||0;a.H=Sd(b,"PatchLocation");u=Promise.resolve();if((v=Wd(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.i)a.i.i=d,a.i.h=w;else if(a.i=new Gw(a.j),a.i.configure(a.g),a.i.setManifestType("DASH"),a.i.i=d,a.i.h=w,z=Ud(v))(y=Zd(v,"queryBeforeStart",ie,!1))?u=Hw(a.i,z):Hw(a.i,z);B=t(f.keys());for(C=B.next();!C.done;C=B.next())E=C.value,D=f.get(E),Kw(a.i,"Location",E,D)}A=Sd(b,"BaseURL");F=!1;if(a.i)for(J=t(A),H=J.next();!H.done;H=J.next())K=H.value,
L=K.attributes.serviceLocation,O=Ud(K),L&&O&&(Kw(a.i,"BaseURL",L,O),F=!0);a.V.splice(0);F&&a.i||(Q=A.map(Ud),a.V.push.apply(a.V,x(mc(d,Q))));N=a.i;M=a.V;R=function(){return N&&F?Lw(N,"BaseURL"):M.slice()};a.l.mb=R;V=0;A&&A.length&&(V=Zd(A[0],"availabilityTimeOffset",he)||0);a.l.zb=V;a.K=Zd(b,"minimumUpdatePeriod",ce,-1);xa=Zd(b,"availabilityStartTime",be);ba=Zd(b,"timeShiftBufferDepth",ce);Oa=a.g.dash.ignoreSuggestedPresentationDelay;Ha=null;Oa||(Ha=Zd(b,"suggestedPresentationDelay",ce));Ia=a.g.dash.ignoreMaxSegmentDuration;
Fa=null;Ia||(Fa=Zd(b,"maxSegmentDuration",ce));wa=b.attributes.type||"static";a.h&&a.h.presentationTimeline&&(a.T=a.h.presentationTimeline.U()&&wa=="static");a.l.type=wa;if(a.h)for(Ca=a.h.presentationTimeline,Ma=Ca.Mb(),La=t(a.u.values()),Ba=La.next();!Ba.done;Ba=La.next())eb=Ba.value,eb.segmentIndex&&eb.segmentIndex.cb(Ma);else hb=a.g.dash.ignoreMinBufferTime,ob=0,hb||(ob=Zd(b,"minBufferTime",ce)||0),Ta=0,Ta=Ha!=null?Math.min(Ha,ba||Infinity):a.g.defaultPresentationDelay>0?a.g.defaultPresentationDelay:
Math.min(ob*1.5,ba||Infinity),Ca=new Cl(xa,Ta,a.g.dash.autoCorrectDrift);Ca.sd(wa=="static");(Ec=Ca.U())&&!isNaN(a.g.availabilityWindowOverride)&&(ba=a.g.availabilityWindowOverride);ba==null&&(ba=Infinity);Ca.hg(ba);ic=b.attributes.profiles||"";a.l.profiles=ic.split(",");Bg={Jb:wa!="static",presentationTimeline:Ca,Aa:null,qa:null,va:null,N:null,bandwidth:0,Bh:!1,zb:V,Cc:null,profiles:ic.split(","),roles:null,Rb:function(){return""}};return G(jd,u,2);case 2:a.M=0;rd=Jx(a,Bg,R,b,!1);Ke=rd.duration;
Dd=rd.periods;(wa!="static"||a.T)&&rd.Si||Ca.Fb(Ke||Infinity);a.R&&a.oa&&Ca.Jj(a.Z);Ca.Kh(Fa||1);a.R&&a.oa&&(Cg=Ha!=null?Ha:a.g.defaultPresentationDelay,Ca.bi(Cg));if(!a.h)return G(jd,a.m.Og(Dd,Bg.Jb),6);a.h.periodCount=Dd.length;a.h.gapCount=a.M;return G(jd,Kx(a,Dd,!1),4);case 6:a.h={presentationTimeline:Ca,variants:a.m.l,textStreams:a.m.uh(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Lx(b),nextUrl:Mx(b),
periodCount:Dd.length,gapCount:a.M,isLowLatency:a.R,startTime:null};if(!Ca.dk()){jd.B(7);break}Mk=Sd(b,"UTCTiming");return G(jd,Nx(a,R,Mk),8);case 8:hi=jd.h;if(!a.j)return jd.return();Ca.Kj(hi);case 7:Ca.Kf(),a.m&&!a.h.presentationTimeline.U()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.h),Ox(a),Px(a,Dd),I(jd)}})}
function Kx(a,b,c){var d;return P(function(e){if(e.g==1)return G(e,a.m.Og(b,!0,c),2);a.h.variants=a.m.l;d=a.m.uh();d.length>0&&(a.h.textStreams=d);a.h.imageStreams=a.m.i;a.j.filter(a.h);I(e)})}
function Hx(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L;return P(function(O){if(O.g==1){c=b.attributes.mpdId;d=Zd(b,"originalPublishTime",be);if(!c||c!==a.l.Of||d!==a.l.Fe)throw a.H=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(Rd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=ke(l.attributes.sel||""),n=m[m.length-1],q=Ud(l)||"",n.name==="MPD")if(n.Mc==="mediaPresentationDuration"){r=Ud(l)||"";var Q=ce(r);if(Q!=null){a.l.Cc=Q;for(var N=t(a.A.values()),M=N.next();!M.done;M=N.next())M.value.Cc=
Q}}else if(n.Mc==="type"){a.h.presentationTimeline.sd(q=="static");a.l.type=q;Q=t(a.A.values());for(N=Q.next();!N.done;N=Q.next())N.value.Jb=q=="dynamic";q=="static"&&(a.K=-1)}else n.Mc==="publishTime"?a.l.Fe=be(q)||0:n.Mc===null&&l.tagName==="add"&&f.push(l);else if(n.name==="PatchLocation")me(a.H,l);else if(n.name==="Period")l.tagName==="add"?f.push(l):l.tagName==="remove"&&n.id&&Qx(a,n.id);else if(n.name==="SegmentTemplate"){N=ke(l.attributes.sel||"");Q=N[N.length-1];if(Q.Mc){N=Rx(a,N);M=Ud(l)||
"";for(var R=t(N),V=R.next();!V.done;V=R.next())V=a.A.get(V.value),oe(V.N.Zc,l.tagName,Q.Mc,M);Q=N}else Q=[];u=Q;v=t(u);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if(n.name==="SegmentTimeline"||n.name==="S"){Q=ke(l.attributes.sel||"");Q=Rx(a,Q);N=t(Q);for(M=N.next();!M.done;M=N.next())M=a.A.get(M.value),M=Vv(M,ww,"SegmentTimeline"),R=Sd(M,"S"),me(R,l),M.children=R;y=Q;B=t(y);for(C=B.next();!C.done;C=B.next())E=C.value,g.add(E)}D=t(g);for(A=D.next();!A.done;A=D.next())F=A.value,Sx(a,
F);J=t(f);for(H=J.next();!H.done;H=J.next())K=H.value,e.push.apply(e,x(Tx(a,K)));if(!e.length)return O.B(2);a.h.periodCount+=e.length;a.h.gapCount=a.M;return G(O,Kx(a,e,!0),2)}a.l.type=="static"&&(L=a.l.Cc,a.h.presentationTimeline.Fb(L||Infinity));I(O)})}
function Tx(a,b){return Jx(a,{Jb:a.l.type=="dynamic",presentationTimeline:a.h.presentationTimeline,Aa:null,qa:null,va:null,N:null,bandwidth:0,Bh:!1,zb:a.l.zb,profiles:a.l.profiles,Cc:a.l.Cc,roles:null,Rb:function(){return""}},a.l.mb,b,!0).periods}function Qx(a,b){a.h.periodCount--;for(var c=t(a.A.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.A.get(d);Vv(e,ww,"SegmentTimeline").children=[];Sx(a,d);a.A.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
function Rx(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,g.name==="Period"?c=g.id:g.name==="AdaptationSet"?(d=g.id,g.position!==null&&(e=g.position)):g.name==="Representation"&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.A.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Aa.id===c&&a.va.id===d&&a.N.id&&b.push(c+","+a.N.id);else if(e>-1)for(d=t(a.A.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Aa.id===c&&a.va.position===e&&a.N.id&&b.push(c+
","+a.N.id);return b}function Sx(a,b){var c=a.A.get(b),d=a.u.get(b);d.segmentIndex&&d.segmentIndex.cb(a.h.presentationTimeline.Mb());try{var e=vw(c,function(f,g,h,k){return Ux(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.sa,c.N.aesKey,null,!0,a.D);d.createSegmentIndex=function(){return P(function(f){if(f.g==1)return d.segmentIndex?f.B(0):G(f,e.gd(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.N.contentType,b!=sc&&b!="application"&&b!="image"||f.code!=4002)throw f;}}
function Lx(a){var b=Wd(a,"ServiceDescription");if(!b)return null;a=Wd(b,"Latency");b=Wd(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
return c}function Mx(a){a=Sd(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return b.attributes.value;return null}
function Jx(a,b,c,d,e){var f=b.Cc;f||(f=Zd(d,"mediaPresentationDuration",ce),a.l.Cc=f);var g=0;a.h&&a.h.presentationTimeline&&a.T&&(g=a.h.presentationTimeline.fc());var h=[],k=g;d=Sd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=Zd(m,"start",ce,k),r=m.attributes.id,u=Zd(m,"duration",ce);q=l==0&&q==0&&a.T?g:q;var v=null;if(n){var w=Zd(n,"start",ce);w!=null&&(v=w-q+g)}else f!=null&&(v=f-q+g);w=vc;v&&u&&Math.abs(v-u)>w&&v>u&&a.M++;v==null&&(v=u);if(!(a.O!==null&&r!==null&&q!==null&&q<
a.O)||a.G.includes(r)||l+1==d.length){q!==null&&(a.O===null||q>a.O)&&(a.O=q);k=Vx(a,b,c,{start:q,duration:v,node:m,Ef:v==null||!n});h.push(k);b.Aa.id&&v&&a.sa.set(b.Aa.id,v);if(v==null){k=null;break}k=q+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return f!=null?{periods:h,duration:f+g,Si:!1}:{periods:h,duration:k,Si:!0}}
function Ox(a){var b=Array.from(a.F.keys()).filter(function(h){return!a.G.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.F.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.u.get(f);g&&(g.segmentIndex&&g.segmentIndex.getNumReferences()!=0?d=!1:(a.m&&a.m.Qi(g,c),a.u.delete(f)))}d&&a.F.delete(c)}}function Px(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.D.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.D.delete(d)}
function Vx(a,b,c,d){b.Aa=Wx(a,d.node,null,c);b.qa=d;b.Aa.zb=b.zb;b.Aa.id||(b.Aa.id="__shaka_period_"+d.start);var e=Sd(d.node,"EventStream");c=b.presentationTimeline.Mb();e=t(e);for(var f=e.next();!f.done;f=e.next())Xx(a,d.start,d.duration,f.value,c);c=Sd(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(e=Yx(a,e)))b.Rb=e;c=Sd(d.node,"AdaptationSet").map(function(r,u){return Zx(a,b,u,r)}).filter(Gf);if(b.Jb){e=
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.hm);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new U(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.xk),h=g.next();!h.done;h=g.next()){var k=t(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=t(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=t(h.streams),m=l.next(),n={};!m.done;n={li:void 0},m=l.next())if(n.li=m.value,e.has(n.li.originalId)){f||
(f=Sd(d.node,"AdaptationSet").map(function(r,u){return Zx(a,b,u,r)}).filter(Gf));m=t(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(u){return u.originalId==r.li.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,x(k))}d=c.filter(function(r){return!r.ti});c=c.filter(function(r){return r.ti});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=
e.value,f=e.ti.split(" "),g=t(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=t(h.streams),k=h.next();!k.done;k=h.next())qg(k.value,e.streams);c=$x(a.g.disableAudio,d,"audio");e=$x(a.g.disableVideo,d,"video");f=$x(a.g.disableText,d,sc);d=$x(a.g.disableThumbnails,d,"image");if(e.length===0&&c.length===0)throw new U(2,4,4004);return{id:b.Aa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function $x(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
function Zx(a,b,c,d){function e(L){var O=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];O&&L&&(L=mc(b.va.mb(),[L],b.Rb()),a.j.addFont(O,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=Wx(a,d,b.Aa,null);b.va.position=c;var h=!1;c=Sd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Gf),
l=void 0,m=b.va.contentType==sc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(q==null||q=="urn:mpeg:dash:role:2011")switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Sd(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if(w=="http://dashif.org/guidelines/trickmode")c=v.attributes.value;else if(w=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var z=
g(parseInt(v.attributes.value,10));else if(w=="urn:mpeg:mpegB:cicp:ColourPrimaries")var y=f(parseInt(v.attributes.value,10));else w!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(w=="urn:mpeg:dash:ssr:2023"&&a.g.dash.enableFastSwitching?u=!0:w=="urn:dvb:dash:fontdownload:2014"?e(v):w=="urn:mpeg:dash:urlparam:2014"?(n=Yx(a,v))||(q=!0):q=!0)}if(q)return null;var B=null;q=Sd(d,"SupplementalProperty");q=t(q);for(r=q.next();!r.done;r=q.next())r=r.value,v=r.attributes.schemeIdUri,v=="http://dashif.org/guidelines/last-segment-number"?
B=parseInt(r.attributes.value,10)-1:v=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?z=g(parseInt(r.attributes.value,10)):v=="urn:mpeg:mpegB:cicp:ColourPrimaries"?y=f(parseInt(r.attributes.value,10)):v=="urn:dvb:dash:fontdownload:2014"?e(r):v=="urn:mpeg:dash:urlparam:2014"&&(n=Yx(a,r));n&&(b.Rb=n);n=Sd(d,"Accessibility");var C=new Map,E;n=t(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,q!="urn:scte:dash:cc:cea-608:2015"||a.g.disableText)if(q!="urn:scte:dash:cc:cea-708:2015"||
a.g.disableText)q=="urn:mpeg:dash:role:2011"?r!=null&&(k.push(r),r=="captions"&&(l="caption")):q=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(r=="1"?E="visually impaired":r=="2"?E="hard of hearing":r=="9"&&(E="spoken subtitles"));else if(q=1,r!=null)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var D=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],D=w[1].split(",")[0].split(":").pop()):(v="svc"+q,q++,D=w);C.set(v,yc(D))}else C.set("svc1","und");else if(q=1,r!=null)for(r=r.split(";"),
v=t(r),w=v.next();!w.done;w=v.next()){D=w.value;var A=w=void 0;D.includes("=")?(D=D.split("="),w=D[0].startsWith("CC")?D[0]:"CC"+D[0],A=D[1]||"und"):(w="CC"+q,r.length==2?q+=2:q++,A=D);C.set(w,yc(A))}else C.set("CC1","und");n=Sd(d,"ContentProtection");var F=Kv(a.ra,n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.va.encrypted=n.length>0;var J=yc(b.va.language||"und"),H=b.va.label,K=new Map;d=Sd(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=t(d);for(r=q.next();!r.done;r=q.next())if(v=
r.value,r=$d(v,"urn:scte:dash:scte214-extensions","supplementalCodecs"))v=Hd(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,x(n))}n=d.map(function(L){var O=ay(a,b,F,l,J,H,h,k,C,L,E,B);return O&&(O.hdr=O.hdr||z,O.colorGamut=O.colorGamut||y,O.fastSwitching=u,L=L.attributes.dependencyId)?(O.baseOriginalId=L,K.set(L,O),null):O}).filter(function(L){return!!L});if(n.length==0&&K.size==0){c=b.va.contentType==
"image";if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new U(2,4,4003);}if(!b.va.contentType||b.va.contentType=="application")for(b.va.contentType=by(n[0].mimeType,n[0].codecs),m=t(n),q=m.next();!q.done;q=m.next())q.value.type=b.va.contentType;m=b.va.id||"__fake__"+a.Ca++;q=t(n);for(r=q.next();!r.done;r=q.next()){r=r.value;v=t(F.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(x(w.keyIds),x(r.keyIds))):w.keyIds||r.keyIds;a.g.enableAudioGroups&&
(r.groupId=m)}d=d.map(function(L){return L.attributes.supplementalId||L.attributes.id}).filter(Gf);return{id:m,contentType:b.va.contentType,language:J,Sn:h,streams:n,drmInfos:F.drmInfos,ti:c,hm:d,xk:K}}
function Yx(a,b){if((b=Xd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Zd(b,"useMPDUrlQuery",ie,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return c=="$querypart$"?a.W:c.split("&").map(function(d){if(d=="$querypart$")return a.W;var e=/\$query:(.*?)\$/g.exec(d);if(e&&e.length==2){e=e[1];var f=(new xb(a.W)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function ay(a,b,c,d,e,f,g,h,k,l,m,n){b.N=Wx(a,l,b.va,null);var q=b.N.id;a.Z=Math.min(a.Z,b.N.zb);a.R=a.Z>0;if(!cy(b.N))return null;var r=b.qa.start;b.bandwidth=Zd(l,"bandwidth",fe)||0;b.roles=h;var u=Sd(l,"SupplementalProperty"),v=Sd(l,"EssentialProperty"),w=Sd(l,"ContentProtection");l=null;var z=v.find(function(N){return N.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});z?l=Yx(a,z):(z=u.find(function(N){return N.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"}))&&(l=Yx(a,z));l&&(b.Rb=
l);z=b.N.contentType;l=z==sc||z=="application";z=z=="image";w.length&&(b.va.encrypted=!0);try{var y=void 0;if(c.Hg){var B=b.N.mb,C=b.Rb,E=mc(B(),[c.Hg.Kl],C()),D=ch(E,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Hg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,M,R;return P(function(V){if(V.g==1)return G(V,Fx(a,D,6),2);if(V.g!=3){N=V.h;if(!N.data||N.data.byteLength!=16)throw new U(2,4,4049);M={name:"AES-CBC"};R=y;return G(V,window.crypto.subtle.importKey("raw",N.data,M,
!0,["decrypt"]),3)}R.cryptoKey=V.h;y.fetchKey=void 0;I(V)})}}}b.N.aesKey=y;B=function(N,M,R,V){return Ux(a,N,M,R,V)};if(b.N.Xd)var A=kw(b,B,y);else if(b.N.Jc)A=qw(b,a.u,y);else if(b.N.Zc)A=vw(b,B,a.u,!!a.h,a.g.dash.initialSegmentLimit,a.sa,y,n,!1,a.D);else{var F=b.qa.duration||0,J=b.N.mb,H=b.N.mimeType,K=b.N.codecs;A={endTime:-1,timeline:-1,gd:function(){var N=cm(r,F,J());N.Kb(function(M){M.mimeType=H;M.codecs=K});return Promise.resolve(N)},timescale:1}}}catch(N){if((l||z)&&N.code==4002)return null;
throw N;}n=Ov(a.ra,w,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;u.some(function(N){return N.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&N.attributes.value=="JOC"})&&(w=!0);u=!1;l&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(z&&((v=v.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(L=v.attributes.value),!L))return null;
var O;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(O="PQ");v=b.N.id?b.Aa.id+","+b.N.id:"";a.H.length&&q&&a.A.set(b.Aa.id+","+q,dy(b));b.N.Wf&&ey(a,b.N.Wf,A,b.presentationTimeline);A.endTime!=-1&&b.Aa.id!=null&&b.N.id!=null&&((q=a.D.get(b.Aa.id))?(q.endTime=A.endTime,q.Th.includes(b.N.id)||q.Th.push(b.N.id),a.D.set(b.Aa.id,q)):a.D.set(b.Aa.id,{endTime:A.endTime,timeline:A.timeline,Th:[b.N.id]}));
var Q=v&&a.u.has(v)?a.u.get(v):{id:a.Ca++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){Q.segmentIndex&&(Q.segmentIndex.release(),Q.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:c.drmInfos.length>0,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.va.language,label:f,
type:b.va.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.N.Rf,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:O,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([df(b.N.mimeType,b.N.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};Q.createSegmentIndex=function(){var N;return P(function(M){if(M.g==1){if(Q.segmentIndex)return M.B(0);
N=Q;return G(M,A.gd(),3)}N.segmentIndex=M.h;I(M)})};v&&b.Jb&&!a.u.has(v)&&(b=b.Aa.id||"",a.F.has(b)||a.F.set(b,[]),a.u.set(v,Q),a.F.get(b).push(v));return Q}
function ey(a,b,c,d){if(!a.aa.has(b)){a.aa.add(b);var e=Zd(b,"presentationTime",ge)||0,f=Wd(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!(f==="urn:mpeg:dash:utc:http-ntp:2014"||f==="urn:mpeg:dash:utc:ntp:2014"||f==="urn:mpeg:dash:utc:sntp:2014");g?b=(Zd(b,"wallClockTime",be)||0)*1E3:(b=Zd(b,"wallClockTime",ge)||0,b=ek(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.u||d.di(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new T("prft",
d),a.j.onEvent(d))}}function dy(a){function b(c){if(!c)return null;c=Id(c);c.Xd=null;c.Jc=null;c.Zc=qe(c.Zc);c.Wf=null;return c}a=Id(a);a.Aa=b(a.Aa);a.va=b(a.va);a.N=b(a.N);a.qa&&(a.qa=Id(a.qa),a.qa.node=null);return a}
function Bx(a){var b,c;return P(function(d){switch(d.g){case 1:return b=0,sa(d,2),G(d,Cx(a),4);case 4:b=d.h;ua(d,3);break;case 2:if(c=va(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Dx(a,b);I(d)}})}function Dx(a,b){if(!(a.K<0)){var c=a.K;a.g.updatePeriod>=0&&(c=a.g.updatePeriod);a.L.Y(Math.max(c-b,Nc(a.ya)))}}
function Wx(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Rf:null,audioSamplingRate:null,zb:0,eg:1,encrypted:!1};d=d||c.mb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Sd(b,"BaseURL"),h,k=!1;if(a.i)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=Ud(n);m&&n&&(Kw(a.i,e,m,n),k=!0)}k&&a.i||(h=g.map(Ud));var q=a.i;a=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;
m=Hm([b.attributes.codecs||c.codecs]).join(",");n=Zd(b,"frameRate",je)||c.frameRate;var r=b.attributes.sar||c.pixelAspectRatio,u=fy(Sd(b,"InbandEventStream"),c.emsgSchemeIdUris),v=Sd(b,"AudioChannelConfiguration");v=gy(v)||c.Rf;var w=Zd(b,"audioSamplingRate",ge)||c.audioSamplingRate;a||(a=by(l,m));var z=Wd(b,"SegmentBase"),y=Wd(b,"SegmentTemplate"),B=z?Zd(z,"availabilityTimeOffset",he)||0:0,C=y?Zd(y,"availabilityTimeOffset",he)||0:0,E=g&&g.length?Zd(g[0],"availabilityTimeOffset",he)||0:0;B=c.zb+E+
B+C;C=null;(E=Wd(b,"SegmentSequenceProperties"))&&(E=Zd(E,"cadence",fe))&&(C=E);E=b.attributes.label;var D=Sd(b,"Label");D&&D.length&&(D=D[0],Td(D)&&(E=Td(D)));return{mb:function(){return mc(d(),g.length?q&&k?Lw(q,e):h?h:[]:[])},Xd:z||c.Xd,Jc:Wd(b,"SegmentList")||c.Jc,Zc:y||c.Zc,Wf:Wd(b,"ProducerReferenceTime")||c.Wf,width:Zd(b,"width",ge)||c.width,height:Zd(b,"height",ge)||c.height,contentType:a,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e,language:b.attributes.lang,
Rf:v,audioSamplingRate:w,zb:B,Bf:null,eg:C||c.eg,label:E||null,encrypted:!1}}function fy(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
function gy(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&b>0&&b<c.length)return c[b]}}return null}
function cy(a){var b=a.Xd?1:0;b+=a.Jc?1:0;b+=a.Zc?1:0;if(b==0)return a.contentType==sc||a.contentType=="application"?!0:!1;b!=1&&(a.Xd&&(a.Jc=null),a.Zc=null);return!0}
function hy(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(n.g==1)return e=[bc(c)],f=mc(b(),e),g=ch(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ha()}),Xg(a.P,h),G(n,h.promise,2);k=n.h;if(d=="HEAD"){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Vb(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Nx(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;sa(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":bb("NTP UTCTiming scheme is not supported");break;default:bb("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return G(n,hy(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,hy(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ua(n,
3);break;case 5:va(n);case 3:g=f.next();n.B(2);break;case 4:return bb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function Xx(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=Zd(d,"timescale",ge)||1,k=Zd(d,"presentationTimeOffset",ge)||0;d=t(Sd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=Zd(l,"presentationTime",ge)||0,n=Zd(l,"duration",ge)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;c!=null&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:pe(l),eventNode:qe(l)},a.j.onTimelineRegionAdded(l))}}
function Ux(a,b,c,d,e){var f,g,h,k;return P(function(l){if(l.g==1)return f=ih,g=e?0:1,h=Lm(b,c,d,a.g.retryParameters),G(l,Fx(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function by(a,b){b=df(a,b);return tf(b)?sc:a.split("/")[0]}function Fx(a,b,c,d){d||(d={});d.isPreload=a.ha();b=a.j.networkingEngine.request(c,b,d);Xg(a.P,b);return b.promise}
function Ex(a){var b=a.l.Fe;if(!a.l.Of||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=ge(e.attributes.ttl);return!e||b+e>c}).map(Ud).filter(Gf);return d.length?mc(a.C,d):[]}S("shaka.dash.DashParser",Ax);Fi("application/dash+xml",function(){return new Ax});Fi("video/vnd.mpeg.dash.mpd",function(){return new Ax});function iy(){}S("shaka.dependencies",iy);iy.has=function(a){return jy.has(a)};iy.add=function(a,b){if(!ky[a])throw Error(a+" is not supported");a==ly?Zc("mux.js","mux.js is no longer used in Shaka Player."):jy.set(a,function(){return b})};var ly="muxjs",ky={Tn:ly,ISOBoxer:"ISOBoxer"};iy.Allowed=ky;var jy=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function my(){this.j=new Pb(function(){return["Oculus","Quest"].some(function(a){return navigator.userAgent.includes(a.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?
"MOBILE":"DESKTOP"});this.l=new Pb(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Ii(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=my.prototype;p.mc=function(){return!!navigator.mediaCapabilities};
p.Oa=function(){return this.j.value()};p.Ja=function(){return this.l.value()};p.Ud=function(){return!1};p.zj=function(){return!1};p.Cf=function(){return!1};p.Aj=function(){return!1};p.He=function(){return!1};p.vd=function(){return!0};p.bd=function(){return!0};p.Le=function(){return!0};p.Fj=function(){return 0};p.wc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Qj=function(){return!1};p.ji=function(){return!1};
p.ab=function(a){var b=this.Oa();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.ni=function(){return!!window.indexedDB};p.xj=function(){return[]};p.Id=function(a){return window.matchMedia!==void 0&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"};p.kg=function(){return!1};p.nj=function(){return!1};p.Xh=function(){return!1};p.mg=function(){return!0};p.oj=function(){return!1};
p.Yj=function(){return!0};p.ud=function(){return!1};p.Jh=function(a){return a==="com.apple.fps"};p.lg=function(){return!0};p.toString=function(){return"Device: "+this.Ub()+" v"+this.Ga()+"; Type: "+this.Oa()};function ny(){my.call(this);this.g=new Pb(function(){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});this.h=new Pb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}ma(ny,my);p=ny.prototype;p.Ga=function(){return this.g.value()};p.Ub=function(){return"Apple Browser"};p.Oa=function(){return this.h.value()};
p.Ja=function(){return"WEBKIT"};p.mc=function(){return!1};p.Ud=function(a,b){return b==="audio"};p.Cf=function(){return!0};p.Aj=function(a){return a==="audio"};p.ab=function(a){my.prototype.ab.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.kg=function(){return!0};p.lg=function(){return!1};
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Sb=function(){return new ny});function oy(){if(!py())throw Error("Not a Chromecast device!");my.call(this);this.h=new Pb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new Pb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?qy:a.includes("fuchsia")?ry:sy})}ma(oy,my);p=oy.prototype;p.Ga=function(){return this.h.value()};p.Ub=function(){return"Chromecast with "+this.g.value()};
p.Oa=function(){return"CAST"};p.Ja=function(){return"CHROMIUM"};p.mc=function(){return my.prototype.mc.call(this)&&this.g.value()!==sy};p.bd=function(){return this.g.value()!==sy};p.Fj=function(){switch(this.g.value()){case qy:return 0;case ry:return 3;default:return 1}};
p.wc=function(){var a,b,c,d,e;return P(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};sa(f,2);if(!(c=a)){f.B(4);break}return G(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.h;case 4:if(c){b.width=3840;b.height=2160;f.B(6);break}if(!(d=a)){f.B(7);break}return G(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.h;case 7:d&&(b.width=1920,b.height=1080);case 6:ua(f,3);break;case 2:e=va(f),ab("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.ab=function(a){my.prototype.ab.call(this,a);a.streaming.stallSkip=0;return a};p.ni=function(){return!1};p.ud=function(){return!0};function py(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var qy="Android",ry="Fuchsia",sy="Linux";py()&&(Sb=function(){return new oy});function ty(){my.call(this);var a=this;this.i=new Pb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new Pb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new Pb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.A=new Pb(function(){return navigator.userAgent.match(/Edge?\//)?!a.h.value():!0});this.u=new Pb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new Pb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}ma(ty,my);p=ty.prototype;p.Ga=function(){return this.i.value()};p.Ub=function(){return this.g.value()};
p.Ud=function(a){return Dg(a)?this.g.value()==="Edge"&&this.h.value():!1};p.zj=function(){return this.g.value()==="Edge"&&this.h.value()};p.Cf=function(){return this.g.value()==="Edge"&&this.h.value()};p.bd=function(){return this.A.value()};
p.ab=function(a){my.prototype.ab.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.Xh=function(){return this.g.value()==="Edge"||this.u.value()};p.ud=function(){if(this.Ja()==="GECKO"){var a=this.Ga();return a!==null?a>=100:my.prototype.ud.call(this)}return my.prototype.ud.call(this)};p.Jh=function(a){return this.Ja()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):my.prototype.Jh.call(this,a)};Tb=function(){return new ty};function uy(){my.apply(this,arguments)}ma(uy,my);p=uy.prototype;p.Ga=function(){return null};p.Ub=function(){return"Hisense"};p.Oa=function(){return"TV"};p.mc=function(){return!1};p.wc=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.ab=function(a){my.prototype.ab.call(this,a);a.streaming.stallSkip=0;return a};
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))Sb=function(){return new uy};function vy(){my.call(this);this.g=new Pb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}ma(vy,my);p=vy.prototype;p.Ub=function(){return"PlayStation"};p.Oa=function(){return"CONSOLE"};p.Ja=function(){return"WEBKIT"};p.Ga=function(){return this.g.value()};p.mc=function(){return!1};p.vd=function(){return!1};p.bd=function(){return!1};p.ji=function(){return this.Ga()===4};
p.wc=function(){var a,b,c,d,e;return P(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,sa(f,2),G(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b=c.resolution==="4K";ua(f,3);break;case 2:return va(f),sa(f,5),G(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b=d.resolution==="4K";ua(f,3);break;case 5:e=va(f),bb("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.ab=function(a){my.prototype.ab.call(this,a);this.Ga()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.Xh=function(){return this.Ga()===4};p.mg=function(){return this.Ga()!==4};navigator.userAgent.includes("PlayStation")&&(Sb=function(){return new vy});function wy(){my.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}ma(wy,my);p=wy.prototype;p.Ga=function(){return this.g};p.Ub=function(){return"Tizen"};p.Ja=function(){return"CHROMIUM"};p.Oa=function(){return"TV"};p.Ud=function(){return!0};p.He=function(){return this.Ga()===3};p.mc=function(){return!1};p.vd=function(){var a=this.Ga();return a!==null?a>=4:my.prototype.vd.call(this)};p.bd=function(){return!1};
p.Le=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:my.prototype.Le.call(this)};
p.wc=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
a.height=2160)}catch(c){bb("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.ab=function(a){my.prototype.ab.call(this,a);a.drm.ignoreDuplicateInitData=this.Ga()!==2;this.Ga()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.xj=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Id=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return my.prototype.Id.call(this,a)}return"SDR"};p.nj=function(){return!0};p.oj=function(){return this.Ga()===3};navigator.userAgent.includes("Tizen")&&(Sb=function(){return new wy});function xy(){my.apply(this,arguments)}ma(xy,my);xy.prototype.Ga=function(){return null};xy.prototype.Ub=function(){return"Vizio"};xy.prototype.Oa=function(){return"TV"};xy.prototype.mc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(Sb=function(){return new xy});function yy(){my.call(this);this.i=new Pb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new Pb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new Pb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;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})}ma(yy,my);p=yy.prototype;p.Ga=function(){return this.g.value()};
p.Ub=function(){return"WebKit STB"};p.Oa=function(){return"TV"};p.Ja=function(){return"WEBKIT"};p.mc=function(){return!1};p.vd=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Ud=function(){return this.h.value()};p.wc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.mg=function(){return!this.i.value()};p.lg=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))Sb=function(){return new yy};function zy(){my.call(this);var a=this;this.h=Ay();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);a.g=c.tk["tv.model.supportHDR"]||c.tk["tv.config.supportDolbyHDRContents"]||!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({Qn:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){bb("WebOS: getConfigs call failed",c)}}ma(zy,my);p=zy.prototype;p.Ga=function(){return this.h};p.Ub=function(){return"WebOS"};p.Oa=function(){return"TV"};
p.Ja=function(){return"CHROMIUM"};p.mc=function(){return!1};p.vd=function(){var a=this.Ga();return a!==null?a>3:my.prototype.vd.call(this)};p.bd=function(){var a=this.Ga();return a!==null?a>6:my.prototype.bd.call(this)};p.Le=function(){var a=this.Ga();return a!==null?a>3:my.prototype.Le.call(this)};p.wc=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){bb("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.ab=function(a){my.prototype.ab.call(this,a);this.Ga()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};p.Id=function(a){return this.g==null?(bb("WebOS: getConfigs call haven't finished"),my.prototype.Id.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};
function Ay(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.Yj=function(){return!1};p.ud=function(){var a=this.Ga();return a!==null?a>=6:my.prototype.ud.call(this)};if(navigator.userAgent.includes("Web0S")){var By=new zy;Sb=function(){return By}};function Cy(){my.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}ma(Cy,my);p=Cy.prototype;p.Ga=function(){return this.h};p.Ub=function(){return"Xbox"};p.Oa=function(){return"CONSOLE"};p.Ja=function(){return this.g?"EDGE":"CHROMIUM"};p.Ud=function(){return!0};p.Cf=function(){return!0};p.Qj=function(){return this.g};
p.wc=function(){var a={width:1920,height:1080},b=Dy();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){bb("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.ab=function(a){my.prototype.ab.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.ni=function(){return!1};function Dy(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Dy()!==null)Sb=function(){return new Cy};function Ey(a,b,c){this.type=a;this.ka=b;this.segments=c||null}function Fy(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}Fy.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);d.length>0&&(c+=":"+d.join(","));return c};
function Gy(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Hy(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Iy(a,b,c){return(a=Hy(a,b))?a.value:c||null}function Jy(a,b){a=Hy(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function Ky(a,b,c){c=c===void 0?[]:c;this.ka=b;this.g=a;this.Fc=c}function Ly(a,b){this.name=a;this.value=b};function My(a,b){return a.filter(function(c){return c.name==b})}function Ny(a,b){return a.filter(function(c){return Jy(c,"TYPE")==b})}function Oy(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Py(a,b,c){c=c===void 0?0:c;return(a=Oy(a,b))?Number(a.value):c}function Qy(a,b,c){return b?Ry(a,[b],c):[]}function Ry(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return Sy(e,c)}));return mc(a,d)}
function Sy(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new U(2,4,4039,e);}}return a};function Ty(){this.g=0}
function Uy(a,b){b=Vb(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!Vy.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!1,e=[],f=!0,g=0;g<c.length;g++){var h=c[g],k=c[g+1];if(h.startsWith("#")&&!h.startsWith("#EXT")||f)f=!1;else{h=Wy(a,h);d||(Xy.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:Yy.has(h.name)&&(b=1,d=!0));if(Yy.has(h.name)){if(b!=1)throw new U(2,4,4017);f=a;a=Array(Math.max(100,Math.floor((c.length-g)/2)));d=0;h=[];var l=[];
for(k=null;g<c.length;g++){var m=c[g];if(m.startsWith("#EXT"))m=Wy(f,m),Xy.has(m.name)?e.push(m):m.name=="EXT-X-MAP"?k=m:m.name=="EXT-X-PART"?l.push(m):m.name=="EXT-X-PRELOAD-HINT"?Iy(m,"TYPE")=="PART"?l.push(m):Iy(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",k=m):h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new Ky(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new Ky("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new Ey(b,e,d<
a.length?a.slice(0,d):a)}e.push(h);h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new Ly("URI",k)),f=!0)}}return new Ey(b,e)}function Wy(a,b){a=a.g++;var c=b.match(Zy);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new xd(d);var f;$y.lastIndex=0;(f=zd(d,$y))&&(e=f[1]);az.lastIndex=0;for(f=zd(d,az);f;)c.push(new Ly(f[1],f[2]||f[3])),yd(d),f=zd(d,az)}return new Fy(a,b,c,e)}
var Zy=/^#(EXT[^:]*)(?::(.*))?$/,Vy=/^#EXTM3U($|[ \t\n])/m,$y=/^([^,=]+)(?:,|$)/g,az=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,Xy=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),Yy=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function bz(){}function cz(a,b){try{var c=dz(a);return Sg({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Qg(d)}}
function dz(a){var b=a.split(":");if(b.length<2||b[0]!="data")throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(b.length<2)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;b.length>1&&b[b.length-1]=="base64"&&(d=!0,b.pop());var e;d?e=fc(a):e=Zb(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",bz);bz.parse=cz;Zg("data",cz);function ez(){var a=this;this.g=this.h=null;this.G=1;this.C=new Map;this.L=new Map;this.D=new Map;this.D.set("video",new Map);this.D.set("audio",new Map);this.D.set(sc,new Map);this.D.set("image",new Map);this.Ec=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return fz(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=Jy(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Jy(b,"URI");c=dz(e.split("?")[0]);
e=e.split("?")[0];a.I.has(e)||(c=Jb(c.data),a.I.set(e,c));d=nc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a.I.get(e)}]);(b=Iy(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=Jy(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");b=Jy(b,"URI");b=dz(b.split("?")[0]);b=Jb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,
146,230,91,224,136,95,149]);c=Dh(b,c,new Set,0);d=nc("com.microsoft.playready",d,[{initDataType:"cenc",initData:c}]);if(b=Ld(["<PLAYREADY>",ec(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Iv(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Jy(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Jy(b,"URI");c=dz(e.split("?")[0]);e=e.split("?")[0];a.I.has(e)||
(c=Jb(c.data),a.I.set(e,c));d=nc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:a.I.get(e)}]);(b=Iy(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.jb=new Set;this.i=new Map;this.l=null;this.H="";this.Na=new Ty;this.M=-1;this.aa=Infinity;this.Z=this.Ic=this.ib=!1;this.F=new Df(function(){if(a.V&&!a.g.continueLoadingWhenPaused&&(a.T.Fa(a.V,"timeupdate"),a.V.paused)){a.T.ua(a.V,"timeupdate",function(){return gz(a)});return}gz(a)});
this.Ca=hz;this.m=null;this.fb=0;this.u=Infinity;this.hb=this.La=this.R=0;this.W=new Wg;this.J=new Map;this.K=new Map;this.ya=new Map;this.oa=new Map;this.O=new Map;this.ra=new Map;this.sa=new Map;this.Hc=this.ha=!1;this.Ob=new Mc(5);this.j=null;this.P=!0;this.T=new Tc;this.A=this.V=null;this.kc=function(){return!1};this.I=new Map}p=ez.prototype;
p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.kc=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.U()&&this.F.Ka()};p.start=function(a,b){var c=this,d;return P(function(e){return e.g==1?(c.h=b,c.ha=b.isLowLatencyMode(),G(e,iz(c,[a]).promise,2)):e.g!=3?(d=e.h,c.H=d.uri,G(e,jz(c,d.data),3)):e.return(c.m)})};
p.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.jb.clear();this.m=null;this.i.clear();this.L.clear();this.K.clear();this.C.clear();this.ya.clear();this.oa.clear();this.O.clear();this.ra.clear();this.sa.clear();this.I.clear();this.j&&this.j.destroy();this.T&&(this.T.release(),this.T=null);return Promise.all(a)};
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return P(function(n){if(n.g==1){if(!kz(a))return n.return();b=[];c=Array.from(a.i.values());a.u=Infinity;a.m.gapCount=0;d=c.filter(function(q){return q.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(lz(a,g));return G(n,Promise.all(b),2)}mz(a,d.map(function(q){return q.stream}));h=d.some(function(q){return q.re==0});d.length&&!h&&nz(a,hz);h&&oz(a);k=t(d);for(l=k.next();!l.done;l=k.next())m=l.value,m.stream.isAudioMuxedInVideo||
!m.stream.segmentIndex||gg(m.stream.segmentIndex)||a.h.disableStream(m.stream);I(n)})};function pz(a,b){return kz(a)?a.D.get(b.type):b.Lf}
function lz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha;return P(function(Ia){switch(Ia.g){case 1:if(b.stream.isAudioMuxedInVideo)return Ia.return();c=[];d=t(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rb(f),h=g.g,b.mf&&(b.Zb>=0&&h.add("_HLS_msn",String(b.Zb)),b.$b>=0&&h.add("_HLS_part",String(b.$b))),b.nf&&h.add("_HLS_skip","YES"),Gb(h)&&vb(g,wb(h.toString())),c.push(g.toString());sa(Ia,2);return G(Ia,iz(a,c,!0).promise,4);case 4:k=Ia.h;ua(Ia,
3);break;case 2:throw l=va(Ia),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Ia.return();m=Uy(a.Na,k.data);if(m.type!=1)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.Zf.push(n);q=My(m.ka,"EXT-X-DEFINE");r=qz(a,q,n);u=b.stream;v=pz(a,b);return G(Ia,rz(a,m,u.mimeType,b.S,r),5);case 5:w=Ia.h;z=w.keyIds;y=w.drmInfos;B=w.encrypted;C=w.Ei;u.encrypted||!B||C||(u.encrypted=!0);E=function(Fa,wa){return Fa.size===wa.size&&[].concat(x(Fa)).every(function(Ca){return wa.has(Ca)})};
E(u.keyIds,z)||(u.keyIds=z,u.drmInfos=y,a.h.newDrmInfo(u));D=sz(a,m,v,r,b.S,b.type);A=D.segments;if(F=D.bandwidth)u.bandwidth=F;J=pm(u);H=t(A);for(K=H.next();!K.done;K=H.next())L=K.value,L.ia&&(L.ia.Od=J);u.segmentIndex.Ae(A,a.l.Mb());A.length&&(O=Py(m.ka,"EXT-X-MEDIA-SEQUENCE",0),N=(Q=Oy(m.ka,"EXT-X-SKIP"))?Number(Iy(Q,"SKIPPED-SEGMENTS")):0,M=tz(O,A),R=M.Zb,V=M.$b,b.Zb=R+N,b.$b=V,xa=v.get(O),u.segmentIndex.cb(xa));if(ba=gg(u.segmentIndex))b.md=ba.startTime,Oa=A[A.length-1],b.Xc=Oa.endTime;if(Ha=
Oy(m.ka,"EXT-X-ENDLIST"))b.re=!0;uz(a,m);vz(a,m.ka,u.type,r,b.S);I(Ia)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.V=a};
function wz(a,b,c){c=c===void 0?!1:c;for(var d=a.M==-1,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=pz(a,f);if(g=gg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.M=Math.max(a.M,l));f.Vg=l;break}}}}if(!(a.M<0))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,xz(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.M-d.Vg,f>0&&(e.g.splice(0,f),e=gg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
yz(a,d,e)}
function zz(a,b){if(a.aa==Infinity){b=t(b);for(var c=b.next();!c.done;c=b.next())c=gg(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(b!=Infinity){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!xz(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=gg(e);if(f)if(f.h==null)ab("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(yz(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.oi(b)}}}}
function yz(a,b,c){if(!(Math.abs(c)<.001)){b.md+=c;b.Xc+=c;a=pz(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}}
function jz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La;return P(function(Ba){switch(Ba.g){case 1:c=uc;d=Uy(a.Na,b);e=My(d.ka,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Cl(null,0);a.l.sd(!0);k=function(){return[a.H]};l=null;m=new Map;if(d.type==1)return a.P=!1,R=My(d.ka,"EXT-X-DEFINE"),m=qz(a,R,a.H),l=c.Ha,V="",xa=new Map,G(Ba,Az(a,a.G++,m,d,k,"",l,V,!0,"Media Playlist",null,xa,null,!1,null,!1),7);Bz(a,e);n=My(d.ka,"EXT-X-MEDIA");q=My(d.ka,
"EXT-X-STREAM-INF");r=My(d.ka,"EXT-X-IMAGE-STREAM-INF");u=My(d.ka,"EXT-X-I-FRAME-STREAM-INF");v=My(d.ka,"EXT-X-SESSION-KEY");w=My(d.ka,"EXT-X-SESSION-DATA");z=My(d.ka,"EXT-X-CONTENT-STEERING");Cz(a,w);return G(Ba,Dz(a,z),4);case 4:if(!a.g.ignoreSupplementalCodecs){y=[];B=t(q);C=B.next();for(E={};!C.done;E={Wj:void 0},C=B.next())if(D=C.value,A=Iy(D,"SUPPLEMENTAL-CODECS"))E.Wj=A.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),F=D.attributes.map(function(eb){return function(hb){var ob=hb.name,
Ta=hb.value;ob=="CODECS"&&(Ta=eb.Wj.join(","),hb=hb.value.split(","),hb.length>1&&(hb=qc("audio",hb))&&(Ta+=","+hb));return new Ly(ob,Ta)}}(E)),y.push(new Fy(D.id,D.name,F,null));q.push.apply(q,x(y));J=[];H=t(u);K=H.next();for(L={};!K.done;L={Xj:void 0},K=H.next())if(O=K.value,Q=Iy(O,"SUPPLEMENTAL-CODECS"))L.Xj=Q.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),N=O.attributes.map(function(eb){return function(hb){var ob=hb.name;hb=hb.value;ob=="CODECS"&&(hb=eb.Xj.join(","));return new Ly(ob,
hb)}}(L)),J.push(new Fy(O.id,O.name,N,null));u.push.apply(u,x(J))}Ez(a,q);Fz(a,n);M=Gz(a,u);return G(Ba,Hz(a,q,v,n,k,a.C,M),5);case 5:return f=Ba.h,g=Iz(a,n),G(Ba,Jz(a,r,u),6);case 6:h=Ba.h;Ba.B(3);break;case 7:ba=Ba.h,a.i.set(a.H,ba),ba.stream&&(Oa=pm(ba.stream),ba.stream.segmentIndex.Kb(function(eb){eb.ia&&(eb.ia.Od=Oa)})),l=ba.stream.type,Ha=!0,a.g.disableAudio&&ba.type=="audio"?Ha=!1:a.g.disableVideo&&ba.type=="video"&&!ba.stream.codecs.includes(",")&&(Ha=!1),Ha&&f.push({id:0,language:yc(V||"und"),
disabledUntilTime:0,primary:!0,audio:ba.type=="audio"?ba.stream:null,video:ba.type=="video"?ba.stream:null,bandwidth:ba.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);Kz(a,d);d.type==1&&(kz(a)&&(Lz(a,d),Ia=a.u,a.F.Y(Ia)),Fa=Array.from(a.i.values()),Mz(a,Fa),oz(a),vz(a,d.ka,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.A};if(a.Z||!a.g.hls.disableCodecGuessing){Ba.B(8);break}wa=[];Ca=t(a.m.variants);for(Ma=Ca.next();!Ma.done;Ma=Ca.next())La=Ma.value,La.audio&&La.audio.codecs===""&&wa.push(La.audio.createSegmentIndex()),La.video&&La.video.codecs===""&&wa.push(La.video.createSegmentIndex());return G(Ba,Promise.all(wa),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),I(Ba)}})}
function Nz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z;return P(function(y){if(y.g==1){c=Fm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return y.return(c);d=Oz(a,b);e=d.segment;f=d.segmentIndex;g=e.S();if(h=Po(g[0]))if(k=Pz.get(h))return y.return(Fm(k));return G(y,Promise.all([Qz(a,e.ia,0),Qz(a,e,f)]),2)}l=y.h;m=l[1].mimeType;n=l[0].data;q=l[1].data;r="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");u=["audio/mp4","video/mp4","video/iso.segment"];v=e.ia||u.includes(m);if(!v&&zk(Jb(q))){var B=
q,C=a.g.disableAudio,E=a.g.disableVideo,D=a.g.disableText;var A=Jb(B);var F=(new rk).parse(A),J=F.oe();A=F.wh();var H=[],K=!1,L=!1;if(!C)switch(J.audio){case "aac":case "aac-loas":F.Bb().length&&(H.push("mp4a.40.2"),K=!0);break;case "mp3":F.Bb().length&&(H.push("mp4a.40.34"),K=!0);break;case "ac3":F.Bb().length&&(H.push("ac-3"),K=!0);break;case "ec3":F.Bb().length&&(H.push("ec-3"),K=!0);break;case "opus":F.Bb().length&&(H.push("opus"),K=!0)}if(!E)switch(J.video){case "avc":A.codec?H.push(A.codec):
H.push("avc1.42E01E");L=!0;break;case "hvc":A.codec?H.push(A.codec):H.push("hvc1.1.6.L93.90");L=!0;break;case "av1":H.push("av01.0.01M.08"),L=!0}if(H.length){C=K&&!L;E=new Map;if(L&&!D){D=new od("video/mp2t");D.Uf(B);B=t(D.zg());for(L=B.next();!L.done;L=B.next())L=L.value,E.set(L,L);D.fe()}A={type:C?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:A.height,width:A.width,channelCount:null,sampleRate:null,closedCaptions:E,Oe:null,colorGamut:null,frameRate:A.frameRate}}else A=
null;if(w=A)return y.return(w)}else if(v||r.includes(h))if(z=Gm(n,q,a.g.disableText))return y.return(z);return m?y.return(Fm(m)):y.return(c)})}
function Qz(a,b,c){var d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=ih;e=Lm(b.S(),b.Sc(),b.Qc(),a.g.retryParameters);f=b instanceof Bj?1:0;return G(l,Rz(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.B(3);break}return G(l,Km(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof Bj?b.Je(h,!0):b.Je(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function oz(a){if(kz(a)){if(a.Ca==Sz){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&e.stream.type!="text"&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.Xc),c=Math.min(c,e.md));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.hg(b)}}else a.l.Fb(Tz(a));if(!a.l.u)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=gg(c.stream.segmentIndex))&&
c.h&&a.l.di(c.h);a.l.Kf()}function Bz(a,b){var c=(new rb(a.H)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Iy(e,"NAME");var f=Iy(e,"VALUE");e=Iy(e,"QUERYPARAM");d&&f&&(a.C.has(d)||a.C.set(d,f));e&&(d=c.get(e)[0])&&!a.C.has(d)&&a.C.set(e,d)}}
function qz(a,b,c){c=(new rb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Iy(f,"NAME"),h=Iy(f,"VALUE");e=Iy(f,"QUERYPARAM");f=Iy(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.C.get(f))&&d.set(f,e)}return d}
function Ez(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Iy(d,"AUDIO");c=Iy(d,"VIDEO");var f=Iy(d,"SUBTITLES");d=Uz(a,d);if(f){var g=qc(sc,d);a.K.set(f,g);Qc(d,g)}e&&(f=qc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.K.set(e,f));c&&(e=qc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.K.set(c,e))}}
function Cz(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Iy(d,"DATA-ID");c=Iy(d,"URI");var f=Iy(d,"LANGUAGE");d=Iy(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Qy([a.H],c,a.C)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function Dz(a,b){var c,d,e,f,g,h;return P(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Iy(f,"PATHWAY-ID"),h=Iy(f,"SERVER-URI"),g&&h){a.j=new Gw(a.h);a.j.configure(a.g);a.j.i=[a.H];a.j.setManifestType("HLS");a.j.h=g;c=Hw(a.j,h);break}return G(k,c,0)})}
function Iz(a,b){var c=Ny(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Vz(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Jy(d.value,"GROUP-ID");if(d=a.K.get(e))if(e=a.L.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Wz(sc,d)||Xz(sc),Yz(f.stream)}}return b.filter(function(g){return g})}
function Yz(a){var b=new Set([df(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Kb(function(c){c.mimeType&&b.add(df(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function Jz(a,b,c){var d,e;return P(function(f){if(f.g==1)return d=b.map(function(g){var h,k,l;return P(function(m){if(m.g==1){if(h=a.g.disableThumbnails)return m.return(null);sa(m,2);return G(m,Zz(a,g),4)}if(m.g!=2)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=$z(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function aA(a,b,c){b=b.filter(function(h){var k=Iy(h,"URI")||"";h=Iy(h,"TYPE");return h!="SUBTITLES"&&(k!=""||h=="AUDIO")});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Gy(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Vz(a,d[g],c,!1)}function Gz(a,b){return b.map(function(c){c=$z(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function Hz(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca;return P(function(Ma){switch(Ma.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(c.length>0)){Ma.B(2);break}l=t(c);m=l.next();case 3:if(m.done){Ma.B(2);break}n=m.value;q=Jy(n,"METHOD");r=Iy(n,"KEYFORMAT")||"identity";u=null;if(q=="NONE"){Ma.B(4);break}if(bA(q)){v=Qy(e(),Jy(n,"URI"),f);w=v.sort().join("");a.O.has(w)||(z=ch(v,a.g.retryParameters),y=Rz(a,z,6).promise,a.O.set(w,y));Ma.B(4);break}if(r==
"identity")return G(Ma,cA(a,n,"",e,null,f),12);B=a.Ec.get(r);if(!B){C=null;Ma.B(10);break}return G(Ma,B(n,"",null),11);case 11:C=Ma.h;case 10:u=C;Ma.B(6);break;case 12:u=Ma.h;case 6:if(u){if(u.keyIds)for(E=t(u.keyIds),D=E.next();!D.done;D=E.next())A=D.value,k.add(A);h.push(u)}case 4:m=l.next();Ma.B(3);break;case 2:F={};J=t(b);for(H=J.next();!H.done;H=J.next())K=H.value,L=Gy(K,!a.j),F[L]?F[L].push(K):F[L]=[K];O=[];for(Q in F)N=F[Q],M=N[0],R=Iy(M,"FRAME-RATE"),V=Number(Iy(M,"AVERAGE-BANDWIDTH"))||Number(Jy(M,
"BANDWIDTH")),xa=Iy(M,"RESOLUTION"),ba=t(xa?xa.split("x"):[null,null]),Oa=ba.next().value,Ha=ba.next().value,Ia=Iy(M,"VIDEO-RANGE"),(Fa=Iy(M,"REQ-VIDEO-LAYOUT"))&&Fa.includes(",")&&(wa=Fa.split(",").filter(function(La){return La=="CH-STEREO"||La=="CH-MONO"}),Fa=wa[0]),Fa=Fa||"CH-MONO",Ca=dA(a,N,d),O.push.apply(O,x(eA(a,Ca.audio,Ca.video,V,Oa,Ha,R,Ia,Fa,h,k,g)));return Ma.return(O.filter(function(La){return La!=null}))}})}
function dA(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Iy(m,"AUDIO");var n=Iy(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Iy(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(u){return f.includes(Jy(u,"GROUP-ID"))}),aA(a,c,e));c=(e=f.sort().join(","))&&a.L.has(e)?a.L.get(e):[];g?d.audio.push.apply(d.audio,x(c)):h&&d.video.push.apply(d.video,x(c));h=!1;var r=b.map(function(u){return Jy(u,
"URI")});g=d.audio.find(function(u){return u&&u.S().find(function(v){return r.includes(v)})});c=Uz(a,b[0]);k=qc("video",c);(l=qc("audio",c))&&!k?(g="audio",h=d.audio.length>0&&!d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&l&&k?(g="video",c=[[k,l].join()]):d.audio.length&&g?(g="audio",h=!0):g=d.video.length&&!d.audio.length?"audio":"video";h||(b=fA(a,b,c,g),e&&a.g.enableAudioGroups&&(b.stream.groupId=e),b.stream.type=="audio"&&g==="audio"&&d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})&&
(a=d.audio[0].stream,b.stream.language=a.language,b.stream.channelsCount=a.channelsCount,b.stream.label=a.label,b.stream.audioSamplingRate=a.audioSamplingRate,b.stream.originalId=a.originalId,b.stream.originalLanguage=a.originalLanguage),d[b.stream.type]=[b]);return d}
function Uz(a,b){b=Iy(b,"CODECS")||"";a.Z=b.length>0;a.Z||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return Hm(b.split(/\s*,\s*/))}function tA(a){return(a=Iy(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function uA(a){return(a=Iy(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function vA(a){a=Iy(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")}function wA(a){a=Jy(a,"TYPE").toLowerCase();a=="subtitles"&&(a=sc);return a}
function eA(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=t(c),r=q.next();!r.done;r=q.next())xA(r.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(z){return!z.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||qg(k,n);k&&
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:null;r=u?u.stream.drmInfos:null;u=u?u.S().sort().join(","):"";var v=f?f.S().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);u=[u,v,w.sort()].join("-");h&&k&&!yg(q,r)||a.jb.has(u)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.jb.add(u))}return e}
function Fz(a,b){b=Ny(b,"CLOSED-CAPTIONS");a.P=b.length==0;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Iy(d,"LANGUAGE");c=yc(e||"und");e||(e=Iy(d,"NAME"))&&(c=e);e=Jy(d,"GROUP-ID");d=Jy(d,"INSTREAM-ID").replace("SERVICE","svc");a.J.get(e)||a.J.set(e,new Map);a.J.get(e).set(d,c)}}
function Vz(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next(),l={};!k.done;l={dj:void 0},k=h.next())k=k.value,l.dj=++a.G,l=function(v){return function(){return"shaka://hls-muxed"+v.dj}}(l),l=d?Jy(k,"URI"):Iy(k,"URI")||l(),k=Jy(k,"GROUP-ID"),e.push(l),f.push(k),g.set(k,l);d=f.sort().join(",");k=b[0];b="";h=wA(k);if(h==sc)b=Iy(k,"CODECS")||"";else for(f=t(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.K.has(l)){b=a.K.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);
l=a.G++;if(a.j){g=t(g);for(var m=g.next();!m.done;m=g.next()){var n=t(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Kw(a.j,l,m,n)}}c=Iy(k,"LANGUAGE");g=Iy(k,"NAME");m=Iy(k,"DEFAULT")=="YES";n=h=="audio"?tA(k):null;var q=h=="audio"?vA(k):!1,r=Iy(k,"CHARACTERISTICS"),u=Iy(k,"FORCED")=="YES";k=h=="audio"?uA(k):null;e=yA(a,l,e,b,h,c,m,g,n,null,r,u,k,q);e.stream&&a.g.enableAudioGroups&&(e.stream.groupId=d);a.L.has(d)?a.L.get(d).push(e):a.L.set(d,[e]);a.i.set(f,e);return e}
function Zz(a,b){var c,d,e,f,g,h,k,l,m,n;return P(function(q){if(q.g==1){c=Jy(b,"URI");d=Iy(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Iy(b,"LANGUAGE");f=Iy(b,"NAME");g=Iy(b,"CHARACTERISTICS");h=yA(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Iy(b,"RESOLUTION"))?G(q,h.stream.createSegmentIndex(),3):q.B(2)}if(q.g!=2){l=gg(h.stream.segmentIndex);if(m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
Number(m.split("x")[1]);h.stream.closeSegmentIndex()}if(n=Iy(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
function $z(a,b){var c="video",d=Jy(b,"URI"),e=Iy(b,"CODECS")||"";e=="mjpg"&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Iy(b,"LANGUAGE"),g=Iy(b,"NAME"),h=Iy(b,"CHARACTERISTICS");c=yA(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Iy(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Iy(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function fA(a,b,c,d){for(var e=a.G++,f=[],g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Jy(k,"URI");k=Iy(k,"PATHWAY-ID");a.j&&k&&Kw(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);h=f.join(",");a:{b=Iy(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.g.disableText){a.P=!1;b=null;break a}if(b){if(b!="NONE"){b=a.J.get(b);break a}a.P=!1}else if(!b&&a.J.size)for(b=t(a.J.keys()),b=b.next();!b.done;b=b.next()){b=a.J.get(b.value);break a}}b=null}c=pc(d,c);
d=yA(a,e,f,c,d,null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function yA(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function u(C){var E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha,Ia,Fa;return P(function(wa){switch(wa.g){case 1:return E=uc,sa(wa,2),G(wa,C.promise,4);case 4:D=wa.h;if(C.aborted)return wa.return();A=D.uri;A!=D.originalUri&&(F=z.S(),F.includes(A)||z.Zf.push(A));J=Uy(a.Na,D.data);if(J.type!=1)throw new U(2,4,4017);H=My(J.ka,"EXT-X-DEFINE");K=qz(a,H,A);L=!1;(!a.Z&&a.g.hls.disableCodecGuessing||a.P&&e==E.Ha&&!a.g.hls.disableClosedCaptionsDetection)&&J.segments.length>
0&&(a.P=!1,L=!0);O=!a.Z&&a.g.hls.disableCodecGuessing;Q=kz(a);return G(wa,Az(a,0,K,J,v,d,e,f,g,h,k,l,m,n,q,r,void 0,L,O),5);case 5:N=wa.h;if(C.aborted)return wa.return();M=N.stream;Kz(a,J);kz(a)&&!Q&&Lz(a,J);z.md=N.md;z.Xc=N.Xc;z.nf=N.nf;z.mf=N.mf;z.re=N.re;z.Lf=N.Lf;z.Zb=N.Zb;z.$b=N.$b;w.segmentIndex=M.segmentIndex;w.encrypted=M.encrypted;w.drmInfos=M.drmInfos;w.keyIds=M.keyIds;w.mimeType=M.mimeType;w.bandwidth=w.bandwidth||M.bandwidth;w.codecs=w.codecs||M.codecs;w.closedCaptions=w.closedCaptions||
M.closedCaptions;w.width=w.width||M.width;w.height=w.height||M.height;w.hdr=w.hdr||M.hdr;w.colorGamut=w.colorGamut||M.colorGamut;w.frameRate=w.frameRate||M.frameRate;w.language=="und"&&M.language!="und"&&(w.language=M.language);w.language=w.language||M.language;w.channelsCount=w.channelsCount||M.channelsCount;w.audioSamplingRate=w.audioSamplingRate||M.audioSamplingRate;Yz(w);w.drmInfos.length&&a.h.newDrmInfo(w);R=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)R=!0;
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);e==E.Va&&(V=gg(M.segmentIndex))&&V.ia&&(w.mimeType="application/mp4",Yz(w));xa=pm(w);w.segmentIndex.Kb(function(Ca){Ca.ia&&(Ca.ia.Od=xa)});zA(a)&&(a.Ic?Mz(a,[z]):(a.Ic=!0,ba=Array.from(a.i.values()),Oa=ba.filter(function(Ca){return Ca.stream.segmentIndex}),Mz(a,Oa),oz(a),Ha=a.u,Ha>0&&a.F.Y(Ha)));vz(a,J.ka,w.type,K,v);a.m&&(a.m.startTime=a.A);ua(wa,0);break;case 2:Ia=va(wa);w.closeSegmentIndex();if(Ia.code===7001)return wa.return();Fa=a.h.disableStream(w);
if(!Fa)throw Ia;I(wa)}})}function v(){return a.j&&c.length>1?Lw(a.j,b):z.Zf.concat(Ry([a.H],c,a.C))}var w=AA(a,d,e,f,g,h,k,l,m,n,q,r);c.some(function(C){return C.startsWith("shaka://hls-muxed")})&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",Yz(w));var z={stream:w,type:e,Zf:[],md:0,Xc:0,Lf:new Map,nf:!1,mf:!1,re:!1,Vg:-1,Zb:-1,$b:-1,S:v},y=null,B;w.createSegmentIndex=function(){if(y)return y;if(w.isAudioMuxedInVideo)return w.segmentIndex=new am([]),Promise.resolve();B=iz(a,z.S(),!0);return y=
new Promise(function(C){C(u(B))})};w.closeSegmentIndex=function(){y&&!w.segmentIndex&&B.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);y=null};return z}function Tz(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&c.stream.type!="text"&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.Xc));return b}
function mz(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Kb(function(e){c.push(e)});a.l.Ce(c)}
function Mz(a,b){if(!kz(a))for(var c=Tz(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Gd(0,c);mz(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return f.stream.type=="audio"});e=d.some(function(f){return f.stream.type=="video"});d=kz(a)&&!a.ib;c=!kz(a)&&a.ib&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?wz(a,b,d):(zz(a,b),a.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&wz(a,
b))}function xz(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function zA(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return b.length>0&&!b.some(function(e){return e.segmentIndex})||c.length>0&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function Az(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y){z=z===void 0?!0:z;y=y===void 0?!0:y;var B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb;return P(function(ob){switch(ob.g){case 1:B=d.segments||[];C=B.every(function(Ta){return Oy(Ta.ka,"EXT-X-GAP")?!0:!1});if(!B.length||C)throw new U(2,4,4053);BA(a,d);kz(a)&&uz(a,d);E=kz(a)?a.D.get(g):new Map;D=sz(a,d,E,c,e,g);A=D.segments;F=D.bandwidth;O=L=K=H=J=null;if(!(A.length>0&&z)){ob.B(2);break}return G(ob,Nz(a,A),3);case 3:Q=ob.h,
g!=Q.type&&kz(a)&&(a.D.set(Q.type,a.D.get(g)),a.D.set(g,new Map)),g=Q.type,h=Q.language,m=Q.channelCount,u=Q.sampleRate,a.g.disableText||(n=Q.closedCaptions),H=Q.height,J=Q.width,K=Q.Oe,L=Q.colorGamut,O=Q.frameRate,y&&(w=Q.mimeType,f=Q.codecs);case 2:if(w){ob.B(4);break}return G(ob,CA(a,g,f,A),5);case 5:w=ob.h,g!=sc||f||w!="application/mp4"||!A[0]||A[0].ia||(w="text/vtt");case 4:return G(ob,rz(a,d,w,e,c),6);case 6:N=ob.h;M=N.drmInfos;R=N.keyIds;V=N.encrypted;xa=N.Ei;if(V&&!M.length&&!xa)throw new U(2,
4,4026);ba=AA(a,f,g,h,k,l,m,n,q,r,u,v);ba.encrypted=V&&!xa;ba.drmInfos=M;ba.keyIds=R;ba.mimeType=w;F&&(ba.bandwidth=F);Yz(ba);g=="video"&&(J||H||K||L)&&xA(ba,J,H,O,K,null,L);kz(a)&&uz(a,d);Oa=A[0].startTime;Ha=A[A.length-1];Ia=Ha.endTime;Fa=new am(A);ba.segmentIndex=Fa;Ca=(wa=Oy(d.ka,"EXT-X-SERVER-CONTROL"))?Hy(wa,"CAN-SKIP-UNTIL")!=null:!1;Ma=wa?Hy(wa,"CAN-BLOCK-RELOAD")!=null:!1;La=Py(d.ka,"EXT-X-MEDIA-SEQUENCE",0);Ba=tz(La,A);eb=Ba.Zb;hb=Ba.$b;return ob.return({stream:ba,type:g,Zf:[],S:e,md:Oa,
Xc:Ia,nf:Ca,mf:Ma,re:!1,Vg:-1,Zb:eb,$b:hb,Lf:E})}})}function tz(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Zb:a,$b:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.u&&(c=0),{Zb:a,$b:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Zb:a,$b:c}}
function AA(a,b,c,d,e,f,g,h,k,l,m,n){var q=Wz(c,b)||Xz(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==sc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||k!=="subtitle"||r.push("subtitle");a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,kind:c==sc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:yc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};Yz(a);return a}
function rz(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R;return P(function(V){switch(V.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=My(k.ka,"EXT-X-KEY"),m=null,l.length)for(m=DA(a,b,k.ka,d,e),n=t(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);v=u=!1;w=[];z=new Set;y=t(f);B=y.next();case 2:if(B.done){V.B(4);break}C=B.value;E=t(C);D=E.next().value;A=E.next().value;F=D;J=A;H=Jy(F,"METHOD");if(H==
"NONE"){V.B(3);break}u=!0;K=Iy(F,"KEYFORMAT")||"identity";L=null;if(bA(H)){v=!0;V.B(3);break}if(K=="identity")return G(V,cA(a,F,c,d,J,e),11);O=a.Ec.get(K);if(!O){Q=null;V.B(9);break}return G(V,O(F,c,J),10);case 10:Q=V.h;case 9:L=Q;V.B(6);break;case 11:L=V.h;case 6:if(L){if(L.keyIds)for(N=t(L.keyIds),M=N.next();!M.done;M=N.next())R=M.value,z.add(R);w.push(L)}case 3:B=y.next();V.B(2);break;case 4:return V.return({drmInfos:w,keyIds:z,encrypted:u,Ei:v})}})}
function EA(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=Iy(b,"IV","");if(g){var h=hc(g.substr(2));if(h.byteLength!=16)throw new U(2,4,4048);}else f=Py(c.ka,"EXT-X-MEDIA-SEQUENCE",0);var k=Qy(d(),Jy(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.oa.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Jy(b,
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,r,u;return P(function(v){if(v.g==1)return a.O.has(l)||(n=ch(k,a.g.retryParameters),q=Rz(a,n,6).promise,a.O.set(l,q)),G(v,a.O.get(l),2);if(v.g!=3){r=v.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new U(2,4,4049);u={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey};return G(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}m.cryptoKey=
v.h;m.fetchKey=void 0;I(v)})};a.oa.set(c,m)}return a.oa.get(c)}function Kz(a,b){a.A==null&&(b=Oy(b.ka,"EXT-X-START"))&&(a.A=Number(Jy(b,"TIME-OFFSET")))}function BA(a,b){var c=Oy(b.ka,"EXT-X-PLAYLIST-TYPE");b=Oy(b.ka,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?nz(a,hz):c?nz(a,Sz):nz(a,FA)}
function uz(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=Oy(d[e].ka,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Oy(b.ka,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Oy(b.ka,"EXT-X-PART-INF"))a.R=Number(Jy(e,"PART-TARGET"));b=Oy(b.ka,"EXT-X-SERVER-CONTROL");a.ha&&a.R?(a.u=a.Hc?a.R*5<=c?Math.min(a.R,a.u):Math.min(c,a.u):Math.min(a.R,a.u),a.hb=b?Number(Jy(b,"PART-HOLD-BACK")):0):(a.u=Math.min(c,a.u),
c=b?Hy(b,"HOLD-BACK"):null,a.La=c?Number(c.value):0);a.fb=Math.max(d,a.fb)}function Lz(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.hb)c=a.hb;else if(a.La)c=a.La;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=Oy(b.segments[e].ka,"EXTINF");c=f?c+Number(f.value.split(",")[0]):c+a.fb}a.A&&a.A<0&&(c=Math.min(-a.A,c),a.A+=c);a.l.Nj(0);a.l.bi(c);a.l.sd(!1)}
function DA(a,b,c,d,e){var f=Oy(c,"EXT-X-MAP");if(!f)return null;var g=Jy(f,"URI"),h=Qy(d(),g,e);g=[h.toString(),Iy(f,"BYTERANGE","")].join("-");if(!a.ya.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,n.name=="EXT-X-KEY"?(m=Jy(n,"METHOD"),bA(m)&&n.id<f.id?(m=!1,k=EA(a,n,b,d,e)):m=m!="NONE"):n.name=="EXT-X-BYTERANGE"&&n.id<f.id&&(l=n);b=GA(h,f,l,k,m);a.ya.set(g,b)}return a.ya.get(g)}
function GA(a,b,c,d,e){var f=0,g=null;b=Iy(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new zj(function(){return a},f,g,null,null,null,d,e)}
function HA(a,b,c,d,e,f,g,h,k,l){var m=d.ka,n=Oy(m,"EXTINF"),q=0,r=0,u=null;d.Fc.length&&(a.m.isLowLatency=!0);var v=null;if(c&&c.h)v=c.h+c.endTime-c.startTime;else if(!a.g.hls.ignoreManifestProgramDateTime){var w=Oy(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=be(w.value),a.ib=!0)}var z=Cj;Oy(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(d.Fc.length==0)throw new U(2,4,4024,"EXTINF");if(!a.ha)return null}var y=[];w=!1;var B=null,C=!1,E=!1;if(a.ha&&d.Fc.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;
for(var D=v,A={},F=0;F<d.Fc.length;A={ug:void 0,Ee:void 0},F++){var J=d.Fc[F],H=F==0?c:y[y.length-1],K=F==0?e:H.endTime,L=Number(Iy(J,"DURATION"))||a.R;if(L){var O=K+L,Q=0,N=null;J.name=="EXT-X-PRELOAD-HINT"?(Q=(Q=Iy(J,"BYTERANGE-START"))?Number(Q):0,(H=Iy(J,"BYTERANGE-LENGTH"))?N=Q+Number(H)-1:Q&&(N=Number.MAX_SAFE_INTEGER)):(Q=Iy(J,"BYTERANGE"),N=t(IA(H,Q)),Q=N.next().value,N=N.next().value);A.Ee=Iy(J,"URI");if(A.Ee){H=Cj;Iy(J,"GAP")=="YES"&&(a.m.gapCount++,H=2,C=!0);A.ug=null;var M=function(V){return function(){V.ug==
null&&(V.ug=Qy(h(),V.Ee,f));return V.ug}}(A);q&&Q>=0&&N!=null&&(B=M,w=!0);K=new Bj(K,O,M,Q,N,b,0,0,Infinity,[],"",null,D,H,l);J.name=="EXT-X-PRELOAD-HINT"&&(K.Ih(),E=!0);Iy(J,"INDEPENDENT")!="YES"&&F>0&&K.Nd();J=k;J||(y.length&&y[0].mimeType?J=y[0].mimeType:A.Ee&&(A=Po(A.Ee),J=JA.get(g).get(A)||null));J&&(K.mimeType=J,KA.has(J)&&(K.ia=null));y.push(K);D&&(D+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(n==0)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(C||y[0].startByte!=
0?(w=!1,B=null):y=[]);(n=Oy(m,"EXT-X-BYTERANGE"))?(u=t(IA(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].startByte,u=y[y.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=Oy(m,"EXT-X-TILES"))&&(c=Jy(g,"LAYOUT"),(g=Iy(g,"DURATION"))&&(n=Number(g)));var R=null;b=new Bj(e,q,function(){if(B)return B();R==null&&(R=Qy(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,y,c,n,v,z,l,y.length>0&&!!d.g);k&&(b.mimeType=k,KA.has(k)&&(b.ia=null));w&&(a.Hc=!0,b.kj(),E&&b.Ih());return b}
function IA(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.endByte+1,d=c+b-1);return[c,d]}
function vz(a,b,c,d,e){if(c=="video"||c=="audio"){var f=a.l.m;if(f&&!xz(a,c))for(b=My(b,"EXT-X-DATERANGE"),b=b.filter(function(H){return Hy(H,"START-DATE")!=null}).sort(function(H,K){H=Jy(H,"START-DATE");K=Jy(K,"START-DATE");return H<K?-1:H>K?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Jy(g,"START-DATE"),k=be(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=Iy(g,"END-DATE");if(n){var q=be(n);if(!isNaN(q)&&(m=q-f,m<0))continue}if(m==null){var r=Iy(g,"DURATION")||Iy(g,"PLANNED-DURATION");if(r){var u=
parseFloat(r);isNaN(u)||(m=l+u);if(k-f+u<0)continue}}var v=Iy(g,"CLASS")||"com.apple.quicktime.HLS",w=Iy(g,"END-ON-NEXT")=="YES";if(m==null&&w){for(var z=c+1;z<b.length;z++){var y=Iy(b[z],"CLASS")||"com.apple.quicktime.HLS";if(v==y){var B=Jy(b[z],"START-DATE"),C=be(B);if(!isNaN(C)&&C&&C>k){m=Math.max(0,C-f);break}}}if(m==null)continue}z=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var E=[],D=t(g.attributes),A=D.next();!A.done;A=D.next()){var F=A.value;if(!z.includes(F.name)){var J=
Sy(F.value,d);if(F.name=="X-ASSET-URI"||F.name=="X-ASSET-LIST")J=Qy(e(),F.value,d)[0];E.push({key:F.name,description:"",data:J,mimeType:null,pictureType:null})}}if(E.length>1)a.h.onMetadata(v,l,m,E)}}catch(H){}}}}
function sz(a,b,c,d,e,f){function g(H){H=Po(H);if(!H)return null;var K=JA.get(f).get(H);K||(K=Pz.get(H));return K}var h=b.segments,k=null,l=null,m=null,n=null,q=void 0,r=Py(b.ka,"EXT-X-DISCONTINUITY-SEQUENCE",-1),u=Py(b.ka,"EXT-X-MEDIA-SEQUENCE",0),v=Oy(b.ka,"EXT-X-SKIP"),w=v?Number(Iy(v,"SKIPPED-SEGMENTS")):0,z=u+w,y=0;kz(a)&&c.has(z)&&(y=c.get(z));y===0&&a.Ca==Sz&&c.size>0&&!c.has(z)&&a.l.i!=null&&(y=a.l.Mb());var B=[],C=null;v=[];for(var E=0;E<h.length;E++){var D=h[E];(z=Oy(D.ka,"EXT-X-MAP"))&&
z.id!==l&&(k=DA(a,b,D.ka,e,d),l=z.id);z=D.g;var A="";z&&(A=Po(z));A!==n&&(m=g(z),n=A);A=E==0?y:C.endTime;z=u+w+E;Oy(D.ka,"EXT-X-DISCONTINUITY")&&(r++,C&&C.ia&&(C.ia.g=A));for(var F=t(D.ka),J=F.next();!J.done;J=F.next())J=J.value,J.name=="EXT-X-KEY"&&(bA(Jy(J,"METHOD"))?q=EA(a,J,b,e,d):q=void 0);c.set(z,A);if(A=HA(a,k,C,D,A,d,f,e,m,q)){if(C=Py(D.ka,"EXT-X-BITRATE"))v.push({bitrate:C,duration:A.endTime-A.startTime}),A.bandwidth=C;else if(A.endByte){if(D=Dj(A))C=A.endTime-A.startTime,D=D*8/C/1E3,v.push({bitrate:D,
duration:C}),A.bandwidth=D}else v.length&&(C=v.pop(),C.duration+=A.endTime-A.startTime,v.push(C),A.bandwidth=C.bitrate);if(A.bandwidth)for(C=t(A.g),D=C.next();!D.done;D=C.next())D.value.bandwidth=A.bandwidth;C=A;A.i=r;xz(a,f)&&a.M!=null&&z<a.M||B.push(A)}}b=void 0;v.length&&(b=v.reduce(function(H,K){return H+K.duration},0),b=Math.round(v.reduce(function(H,K){return H+K.bitrate*K.duration},0)/b*1E3));if(v=B.some(function(H){return H.h!=null}))for(c={},d=0;d<B.length;c={tf:void 0,rf:void 0,jf:void 0,
pd:void 0,hf:void 0},d++)if(c.pd=B[d],c.pd.h==null)for(c.rf=0,c.tf=d,e=function(H){return function(){var K=B[H.tf];if(K){if(K.h!=null)return K.h+H.rf;H.rf-=K.endTime-K.startTime;H.tf+=1}return null}}(c),c.hf=0,c.jf=d,h=function(H){return function(){var K=B[H.jf];if(K){K!=H.pd&&(H.hf+=K.endTime-K.startTime);if(K.h!=null)return K.h+H.hf;--H.jf}return null}}(c);c.pd.h==null;)c.pd.h=h(),c.pd.h==null&&(c.pd.h=e());if(v)for(c=t(B),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),h=e.next();!h.done;h=
e.next())h=h.value,h.h=d,d+=h.endTime-h.startTime;c=a.aa;if(v&&c!=Infinity&&!xz(a,f))for(a=t(B),v=a.next();!v.done;v=a.next())v.value.oi(c);return{segments:B,bandwidth:b}}function Wz(a,b){if(a==sc){if(b=="vtt"||b=="wvtt")return"text/vtt";if(b&&b!=="")return"application/mp4"}return a!="image"||b&&b!="jpeg"?a=="audio"&&b=="mp4a.40.34"?"audio/mpeg":b=="mjpg"?"application/mp4":null:"image/jpeg"}function Xz(a){return a==sc?"text/vtt":JA.get(a).get("mp4")}
function Oz(a,b){a=kz(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.Tc()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function CA(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w;return P(function(z){switch(z.g){case 1:e=ih;f=Oz(a,d);g=f.segment;if(g.status==2)return z.return(Xz(b));k=g.S();if(l=Po(k[0]))if(m=JA.get(b),(n=m.get(l))||(n=Pz.get(l)))return z.return(n);if(h=Wz(b,c))return z.return(h);r=1;u=ch(k,a.g.retryParameters);sa(z,2);u.method="HEAD";return G(z,Rz(a,u,e,{type:r}).promise,4);case 4:v=z.h;q=v.headers["content-type"];ua(z,3);break;case 2:w=va(z);if(!w||w.code!=1002&&w.code!=1001){z.B(3);break}u.method="GET";
a.g.hls.allowRangeRequestsToGuessMimeType&&(u.headers.Range="bytes=0-0");return G(z,Rz(a,u,e,{type:r}).promise,6);case 6:v=z.h,q=v.headers["content-type"];case 3:if(!q){z.B(7);break}h=q.toLowerCase().split(";")[0];if(h!="application/octet-stream"){z.B(8);break}if(v.data.byteLength){z.B(9);break}u.method="GET";return G(z,Rz(a,u,e,{type:r}).promise,10);case 10:v=z.h;case 9:zk(Jb(v.data))&&(h="video/mp2t");case 8:if(h!="application/octet-stream")return z.return(h);case 7:return z.return(Xz(b))}})}
function xA(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function iz(a,b,c){return Rz(a,ch(b,a.g.retryParameters),0,{type:c?2:3})}
function gz(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();kz(a)&&(d=(c-b)/1E3,a.Ob.sample(1,d),e=a.g.updatePeriod>0?a.g.updatePeriod:a.u,f=Math.max(0,e-Nc(a.Ob)),a.F.Y(f));ua(h,3);break;case 2:g=va(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.F.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
I(h)}})}function kz(a){return a.Ca!=hz}function nz(a,b){a.Ca=b;a.l&&a.l.sd(!kz(a));kz(a)||a.F.stop()}function Rz(a,b,c,d){if(!a.W)throw new U(2,7,7001);d||(d={});d.isPreload=a.kc();b=a.h.networkingEngine.request(c,b,d);Xg(a.W,b);return b}function bA(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"}
function fz(a,b,c,d){var e,f,g,h,k,l;return P(function(m){if(m.g==1){if(c=="video/mp2t")throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);e=Jy(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=Jy(b,"URI");k=nc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new rb(h)).Ib.replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?
n:null)||!d?m.B(2):G(m,LA(a,d),3)}m.g!=2&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
function cA(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,z;return P(function(y){switch(y.g){case 1:if(c=="video/mp2t")throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);g=Jy(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return y.return(null);k=Qy(d(),Jy(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=jc(fc(k[0].split("data:text/plain;base64,").pop()));y.B(2);break}m=k.sort().join("");a.ra.has(m)||(n=ch(k,a.g.retryParameters),q=Rz(a,n,6).promise,
a.ra.set(m,q));return G(y,a.ra.get(m),3);case 3:r=y.h,l=jc(r.data);case 2:u="00000000000000000000000000000000";if(!e){y.B(4);break}return G(y,LA(a,e),5);case 5:(v=y.h)&&(u=v);case 4:return w=new Map,w.set(u,l),z="cenc",g=="SAMPLE-AES"&&(z="cbcs"),y.return(oc(w,z))}})}
function LA(a,b){var c,d,e,f;return P(function(g){if(g.g==1){c=null;if(a.sa.has(b))return c=a.sa.get(b),g.B(2);d=Lm(b.S(),b.Sc(),b.Qc(),a.g.retryParameters);e=ih;return G(g,Rz(a,d,e,{type:0}).promise,3)}g.g!=2&&(f=g.h,b.Je(f.data),c=Jm(f.data),a.sa.set(b,c));return g.return(c)})}S("shaka.hls.HlsParser",ez);
var Pz=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),MA=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),NA=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
"video/mp2t").set("tsv","video/mp2t"),OA=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),PA=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),JA=(new Map).set("audio",MA).set("video",NA).set("text",OA).set("image",PA),KA=new Set(["video/mp2t"].concat(x(ef))),
hz="VOD",FA="EVENT",Sz="LIVE";Fi("application/x-mpegurl",function(){return new ez});Fi("application/vnd.apple.mpegurl",function(){return new ez});function QA(a){return Iv(a)}var RA=(new Map).set("com.microsoft.playready",QA).set("com.microsoft.playready.recommendation",QA).set("com.microsoft.playready.software",QA).set("com.microsoft.playready.hardware",QA);function SA(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.A=1;this.i=null;this.F=new Mc(5);this.u=new Df(function(){TA(a)});this.D=new Wg;this.m=new Map;this.C=function(){return!1}}p=SA.prototype;p.configure=function(a,b){this.g=a;b&&(this.C=b)};p.start=function(a,b){var c=this;return P(function(d){if(d.g==1)return c.l=[a],c.h=b,G(d,UA(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})};
function TA(a){var b;P(function(c){switch(c.g){case 1:return sa(c,2),G(c,UA(a),4);case 4:ua(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;this.u!=null&&(this.u.stop(),this.u=null);this.m.clear();return this.D.destroy()};
p.update=function(){var a=this,b;return P(function(c){if(c.g==1)return sa(c,2),G(c,UA(a),4);if(c.g!=2)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};
function UA(a){var b,c,d,e,f,g,h;return P(function(k){if(k.g==1)return b=ch(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.C()}),Xg(a.D,e),G(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=co){Zc("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=zx(m,"SmoothStreamingMedia");if(!m)throw new U(2,
4,4046,l);n(m);m=Zb(m.outerHTML)}var q=Kd(m,"SmoothStreamingMedia");if(!q)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=eo&&l(q);a.i||(a.i=new Cl(null,0));if(l=Zd(q,"IsLive",ie,!1))throw new U(2,4,4047);a.i.sd(!l);n=Zd(q,"TimeScale",ge,1E7);m=Zd(q,"DVRWindowLength",ge);l&&(m===0||isNaN(m))&&(m=Infinity);var r=Zd(q,"CanSeek",ie,!1);m===0&&r&&(m=Infinity);r=null;m&&m>0&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);r==null&&(r=Infinity);a.i.hg(r);
m=Zd(q,"Duration",ge,Infinity);l||a.i.Fb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=Sd(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(Sd(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),z=n[w];if(z){var y;a:{if(y=Gv(v)){y=t(Vd(y,"DATA"));for(var B=y.next();!B.done;B=y.next())if(B=Wd(B.value,"KID")){y=fc(Td(B));y=new Uint8Array([y[3],y[2],y[1],y[0],
y[5],y[4],y[7],y[6]].concat(x(y.slice(8))));y=jc(y);break a}}y=null}B=fc(Td(v));w=hc(w.replace(/-/g,""));w=[{initData:Dh(B,w,new Set,0),initDataType:"cenc",keyId:y}];w=nc(z,"cenc",w);y&&w.keyIds.add(y);if(z=RA.get(z))w.licenseServerUri=z(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];q=Sd(q,"StreamIndex");q=t(q);for(v=q.next();!v.done;v=q.next()){v=v.value;z=Sd(v,"QualityLevel");w=l.timescale;y=l.duration;B=Sd(v,"c");for(var C=[],E=0,D=0;D<B.length;++D){var A=B[D],F=B[D+1],J=Zd(A,"t",ge),H=Zd(A,"d",
ge);A=Zd(A,"r",ee);if(!H)break;J=J!=null?J:E;(A=A||0)&&A--;if(A<0)if(F){F=Zd(F,"t",ge);if(F==null)break;else if(J>=F)break;A=Math.ceil((F-J)/H)-1}else{if(y==Infinity)break;else if(J/w>=y)break;A=Math.ceil((y*w-J)/H)-1}for(F=0;F<=A;++F)E=J+H,C.push({start:J/w,end:E/w,wi:J}),J=E}w=C;z=t(z);for(y=z.next();!y.done;y=z.next())(y=VA(a,v,y.value,w,u,l))&&(y.type!="audio"||a.g.disableAudio?y.type!="video"||a.g.disableVideo?y.type!=sc||a.g.disableText||m.push(y):n.push(y):r.push(y))}q=[];r=t(r.length>0?r:
[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(n.length>0?n:[null]),C=v.next();!C.done;C=v.next())z=q,w=z.push,y=a,B=u,C=C.value,D=0,B&&B.bandwidth&&B.bandwidth>0&&(D+=B.bandwidth),C&&C.bandwidth&&C.bandwidth>0&&(D+=C.bandwidth),y={id:y.A++,language:B?B.language:"und",disabledUntilTime:0,primary:!!B&&B.primary||!!C&&C.primary,audio:B,video:C,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,y);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.Kf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);I(k)})}
function VA(a,b,c,d,e,f){var g=b.attributes.Type;if(g!=="audio"&&g!=="video"&&g!=="text")return bb("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.A++,l=Zd(c,"Bitrate",fe),m=Zd(c,"MaxWidth",fe),n=Zd(c,"MaxHeight",fe),q=Zd(c,"Channels",fe),r=Zd(c,"SamplingRate",fe),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Fb(Math.min(u,v));(v=b.attributes.Name)&&(v+=c.attributes.Index);v||(v=String(k));var w={id:k,originalId:v,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:e.length>0,drmInfos:e,keyIds:new Set,language:yc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,
tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=WA.get(e))&&w.roles.push(e),e==="main"&&(w.primary=!0);e=c.attributes.FourCC;if(e===null||e==="")e=b.attributes.FourCC;if(!e)if(g==="audio")e="AAC";else if(g==="video")return bb('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
null;if(!XA.includes(e.toUpperCase()))return bb("Codec not supported:",e),null;c=YA(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=ZA(e,c);break;case "video":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=$A(c);break;case "text":if(w.type=sc,w.mimeType="application/mp4",e==="TTML"||
e==="DFXP")w.codecs="stpp"}w.fullMimeTypes.add(df(w.mimeType,w.codecs));w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var z=a.m.get(w.id);else z=[],w.type=="video"&&(z=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Gb:z,Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:null,stream:w},z=Vi(new Ui([z])),
a.m.set(w.id,z);z=aB(a,new zj(function(){return[]},0,null,pm(w),w.mssPrivateData.timescale,z,null,w.encrypted),w,b,d);w.segmentIndex=new am(z);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
function YA(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if(b!=="audio")return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if(c==="AACH")return c=new Uint8Array(4),a=e[a*2],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function ZA(a,b){var c=0;a==="AACH"&&(c=5);b?c===0&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,a==="AACH"&&(c=5));return"mp4a.40."+c}function $A(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function aB(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={ng:void 0},g=e.next())h.ng=g.value,d.push(new Bj(h.ng.start,h.ng.end,function(k){return function(){return mc(a.l,[f.replace("{start time}",String(k.ng.wi))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",SA);
var XA="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),WA=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Fi("application/vnd.ms-sstr+xml",function(){return new SA});function bB(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Yb(b)}catch(h){}throw new U(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function cB(){}
function dB(a,b,c,d,e,f){var g=new eB;try{mh(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return Qg(new U(1,1,1002,a,m,c))}var h=new fB,k={Ji:!1,bk:!1};a=gB(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Pg(a,function(){k.Ji=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Df(function(){k.bk=!0;h.abort()});l.Y(b/
1E3);a.finally(function(){l.stop()})}return a}
function gB(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,w,z,y,B,C,E,D,A;return P(function(F){switch(F.g){case 1:return l=hB,m=iB,q=new ArrayBuffer(0),u=r=0,v={},w=Date.now(),sa(F,2),G(F,l(a,d),4);case 4:n=F.h;v=jB(n.headers);g(v);if(d.method=="HEAD"){F.B(5);break}y=(z=n.headers.get("Content-Length"))?parseInt(z,10):0;if(!n.body)return G(F,n.arrayBuffer(),9);B=n.clone().body.getReader();C=function(J){function H(){var K,L,O,Q;return P(function(N){switch(N.g){case 1:return sa(N,2),G(N,B.read(),4);case 4:K=
N.h;ua(N,3);break;case 2:return va(N),N.return();case 3:if(K.done){N.B(5);break}r+=K.value.byteLength;if(!h){N.B(5);break}return G(N,h(K.value),5);case 5:L=Date.now();O=r-u;if(L-w>100&&O>=k||K.done)Q=K.done?0:y-r,f(L-w,O,Q),u=r,w=L;K.done?J.close():(J.enqueue(K.value),H());I(N)}})}H()};new m({start:C});return G(F,n.arrayBuffer(),8);case 8:q=F.h;F.B(5);break;case 9:q=F.h,E=Date.now(),f(E-w,q.byteLength,0);case 5:b.headers.Range&&(D=b.headers.Range.replace("bytes=","").split("-").filter(function(J){return J}).map(function(J){return parseInt(J,
10)}),D.length==2&&q.byteLength!=D[1]-D[0]+1&&bb("Payload length does not match range requested bytes",b,n));ua(F,3);break;case 2:A=va(F);if(e.Ji)throw new U(1,1,7001,a,c);if(e.bk)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,A,c);case 3:return F.return(bB(v,q,n.status,a,n.url,b,c))}})}function jB(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function kB(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",cB);cB.isSupported=kB;cB.parse=dB;var hB=window.fetch,fB=window.AbortController,iB=window.ReadableStream,eB=window.Headers;kB()&&(Zg("http",dB,2,!0),Zg("https",dB,2,!0),Zg("blob",dB,2,!0));function lB(){}
function mB(a,b,c,d,e,f){var g=new nB,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new U(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),v={};u=t(u);for(var w=u.next();!w.done;w=u.next())w=w.value.split(": "),v[w[0].toLowerCase()]=w.slice(1).join(": ");
q=v;e(q)}};g.onload=function(u){var v=g.response;try{d(Date.now()-h,u.loaded-k,0);var w=bB(q,v,g.status,a,g.responseURL,b,c);m(w)}catch(z){n(z)}};g.onerror=function(u){n(new U(1,1,1002,a,u,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,z=u.loaded-k;if(v-h>100&&z>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,z,g.readyState==4?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)try{g.setRequestHeader(r.toLowerCase(),
b.headers[r])}catch(u){throw new U(1,1,1002,a,u,c);}g.send(b.body)});return new Pg(l,function(){g.abort();return Promise.resolve()})}S("shaka.net.HttpXHRPlugin",lB);lB.parse=mB;var nB=window.XMLHttpRequest;Zg("http",mB,1,!0);Zg("https",mB,1,!0);Zg("blob",mB,1,!0);function oB(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function pB(a){var b=a.hc(!1);return b?ec(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function qB(a,b){return Lm(a.g.S(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function rB(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function sB(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}rB.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function tB(a){return a.i==0?0:a.j/a.i};function uB(a){var b=this;this.A=a;this.i=new Map;this.h=new kh(function(){return vB(b).catch(function(){})});this.j=[];this.u=function(){};this.m=function(){};this.g=new rB;this.l=!1}uB.prototype.destroy=function(){return this.h.destroy()};function wB(a,b,c){a.u=b;a.m=c}function vB(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
uB.prototype.queue=function(a,b,c,d,e){var f=this;lh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return P(function(u){if(u.g==1)return G(u,xB(f,b),2);h=u.h;if(f.h.g)throw new U(2,9,7001);if(d)for(m in k=Jb(h),l=new Ch(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.u(tB(f.g),f.g.g);return u.return(e(h))})});this.i.set(a,g);return g};
function yB(a,b,c,d,e,f){lh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Jb(c);h=new Ch(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.u(tB(a.g),a.g.g);return f(c)});a.i.set(b,g)}function zB(a){return P(function(b){return b.g==1?G(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
function xB(a,b){var c,d,e,f;return P(function(g){if(g.g==1)return c=ih,d=a.A.request(c,b),e=function(){return d.abort()},a.j.push(e),G(g,d.promise,2);f=g.h;Qc(a.j,e);return g.return(f.data)})};function AB(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Og;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}AB.prototype.abort=function(){var a=this;return P(function(b){if(b.g==1){try{a.i.abort()}catch(c){}sa(b,2);return G(b,a.g,4)}if(b.g!=2)return ua(b,0);va(b);I(b)})};
function BB(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return P(function(g){if(g.g==1){if(e.result==null)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}AB.prototype.store=function(){return this.h};AB.prototype.promise=function(){return this.g};function CB(a){this.h=a;this.g=[]}CB.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function DB(a,b){return EB(a,b,"readwrite")}function EB(a,b,c){c=a.h.transaction([b],c);var d=new AB(c,b);a.g.push(d);d.promise().then(function(){Qc(a.g,d)},function(){Qc(a.g,d)});return d};function FB(a,b,c){this.h=new CB(a);this.i=b;this.g=c}p=FB.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return GB(this.i)};p.removeSegments=function(a,b){return HB(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return P(function(d){if(d.g==1)return G(d,IB(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Oi(e)}))})};p.addManifests=function(){return GB(this.g)};
p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function JB(a,b,c){a=DB(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=DB(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return HB(this,this.g,a,b)};
p.getManifests=function(a){var b=this,c;return P(function(d){if(d.g==1)return G(d,IB(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.je(e)})))})};p.getAllManifests=function(){var a=this,b,c;return P(function(d){return d.g==1?(b=EB(a.h,a.g,"readonly"),c=new Map,G(d,BB(b,function(e,f){var g;return P(function(h){if(h.g==1)return G(h,a.je(f),2);g=h.h;c.set(e,g);I(h)})}),2)):d.g!=3?G(d,b.promise(),3):d.return(c)})};p.Oi=function(a){return a};p.je=function(a){return Promise.resolve(a)};
function GB(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){if(m.g==1){d=DB(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Uh:void 0},h=g.next())l=h.value,k.Uh=e.add(l),k.Uh.onsuccess=function(n){return function(){f.push(n.Uh.result)}}(k);return G(m,d.promise(),2)}return m.return(f)})};
function HB(a,b,c,d){a=DB(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Hh:void 0},e=c.next())f.Hh=e.value,b.delete(f.Hh).onsuccess=function(g){return function(){return d(g.Hh)}}(f);return a.promise()}
function IB(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(m.g==1){d=EB(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={ag:void 0,Gf:void 0},k=h.next())l.Gf=k.value,l.ag=e.get(l.Gf),l.ag.onsuccess=function(n){return function(){n.ag.result==void 0&&g.push(n.Gf);f[n.Gf]=n.ag.result}}(l);return G(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function KB(a){this.g=new CB(a)}KB.prototype.destroy=function(){return this.g.destroy()};KB.prototype.getAll=function(){var a=this,b,c;return P(function(d){return d.g==1?(b=EB(a.g,"session-ids","readonly"),c=[],G(d,BB(b,function(e,f){c.push(f)}),2)):d.g!=3?G(d,b.promise(),3):d.return(c)})};KB.prototype.add=function(a){var b=DB(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
KB.prototype.remove=function(a){var b=this,c;return P(function(d){return d.g==1?(c=DB(b.g,"session-ids"),G(d,BB(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function LB(){this.g=new Map}LB.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};LB.prototype.init=function(){var a=this;MB.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
function NB(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Yb:d,kb:f},kb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function OB(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Yb:d,kb:f},e)})})}
function PB(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function QB(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function RB(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
function SB(a){var b,c,d;return P(function(e){return e.g==1?(b=Array.from(a.g.values()),c=b.length>0,c||(d=MB,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function TB(a,b){MB.set(a,b)}S("shaka.offline.StorageMuxer",LB);LB.unregister=function(a){MB.delete(a)};LB.register=TB;LB.prototype.destroy=LB.prototype.destroy;var MB=new Map;function UB(){FB.apply(this,arguments)}ma(UB,FB);UB.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return P(function(g){d=DB(c.h,c.g);e=d.store();f=new Og;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return G(g,Promise.all([d.promise(),f]),0)})};
UB.prototype.je=function(a){var b,c,d,e,f,g;return P(function(h){if(h.g==1){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=VB(a.periods[c],e),b.push(f);return G(h,Ww(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:a.expiration==null?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
function VB(a,b){WB(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return XB(e,a.startTime,b)})}
function XB(a,b,c){var d=a.initSegmentUri?YB(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
YB(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}UB.prototype.Oi=function(a){return{data:a.data}};
function YB(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new U(2,9,9004,"Could not parse uri "+a);}
function WB(a){var b=a.streams.filter(function(h){return h.contentType=="audio"});a=a.streams.filter(function(h){return h.contentType=="video"});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=
c++,e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ZB(){FB.apply(this,arguments)}ma(ZB,FB);
ZB.prototype.je=function(a){var b,c,d,e,f,g;return P(function(h){if(h.g==1){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,n.variantIds.length!=0&&l.push($B(n,k.startTime,k.startTime+e));f=l;b.push(f)}return G(h,Ww(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:a.expiration==
null?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
function $B(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function aC(){FB.apply(this,arguments)}ma(aC,FB);p=aC.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return JB(this,a,b)};p.je=function(a){a.expiration==null&&(a.expiration=Infinity);return Promise.resolve(a)};function bC(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=bC.prototype;
p.init=function(){var a=this,b=new Og,c=!1,d=new Df(function(){c=!0;b.reject(new U(2,9,9017))});typeof cC==="number"&&cC>0&&d.Y(cC);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){d.stop();var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new UB(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ZB(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;
g=g.contains("manifest-v3")&&g.contains("segment-v3")?new ZB(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new aC(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new KB(f):null;a.m=f;b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};
e.onerror=function(f){c||(d.stop(),b.reject(new U(2,9,9001,e.error)),f.preventDefault())};return b};p.destroy=function(){var a=this;return P(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return G(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return G(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),I(b)}})};
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m};
p.erase=function(){var a=this;return P(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return G(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),G(b,dC(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,G(b,a.init(),0)}})};
function dC(){var a=new Og,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}var cC=5;S("shaka.offline.indexeddb.StorageMechanismOpenTimeout",cC);TB("idb",function(){return Qb().ni()?new bC:null});function eC(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}eC.prototype.Yb=function(){return this.i};eC.prototype.kb=function(){return this.h};eC.prototype.key=function(){return this.l};eC.prototype.toString=function(){return this.j};
function fC(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(a==null)return null;var b=a[1];if(b!="manifest"&&b!="segment")return null;var c=a[2];if(!c)return null;var d=a[3];return d&&b!=null?new eC(b,c,d,Number(a[4])):null};function gC(a,b){this.h=a;this.g=b}
function hC(a,b){var c=new Cl(null,0);c.Fb(b.duration);var d=b.streams.filter(function(l){return l.type=="audio"}),e=b.streams.filter(function(l){return l.type=="video"});d=iC(a,d,e,c);e=b.streams.filter(function(l){return l.type==sc}).map(function(l){return jC(a,l,c)});var f=b.streams.filter(function(l){return l.type=="image"}).map(function(l){return jC(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
function iC(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
b.next())for(g=e.value,e=jC(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=jC(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
function jC(a,b,c){var d=b.segments.map(function(e){return kC(a,e,b)});c.Ce(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new am(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([df(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}
function kC(a,b,c){var d=new eC("segment",a.h,a.g,b.dataKey);a=new Bj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,b.initSegmentKey!=null?lC(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.jg(b.thumbnailSprite);return a}function lC(a,b){var c=new eC("segment",a.h,a.g,b);return new zj(function(){return[c.toString()]},0,null)};function mC(){this.g=null}p=mC.prototype;p.configure=function(){};
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=fC(a);c.g=d;if(d==null||d.g!="manifest")throw new U(2,1,9004,a);e=new LB;ta(m,2);return G(m,e.init(),4);case 4:return G(m,PB(e,d.Yb(),d.kb()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new gC(d.Yb(),d.kb()),l=hC(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return ya(m),G(m,e.destroy(),7);case 7:za(m,0)}})};p.stop=function(){return Promise.resolve()};
p.update=function(){};
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new LB,sa(m,2,3),G(m,e.init(),5);case 5:return G(m,PB(e,d.Yb(),d.kb()),6);case 6:return f=m.h,G(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=h.expiration==void 0||h.expiration>b;if(!k||!l){m.B(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),G(m,e.destroy(),10);case 10:za(m,0);break;case 2:va(m),m.B(3)}})};
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Fi("application/x-offline-manifest",function(){return new mC});function nC(){}function oC(a,b){var c=fC(a);c&&c.g=="manifest"?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Sg(a)):a=c&&c.g=="segment"?pC(c.key(),c,b):Qg(new U(2,1,9004,a));return a}
function pC(a,b,c){var d=new LB;return Sg(void 0).bb(function(){return d.init()}).bb(function(){return PB(d,b.Yb(),b.kb())}).bb(function(e){return e.getSegments([b.key()])}).bb(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",nC);nC.plugin=oC;Zg("offline",oC);function qC(a,b,c){var d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,rC(v.info,q)){v.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=sC(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
function sC(a,b,c){var d,e;return P(function(f){switch(f.g){case 1:return d=new Eh({Dc:b,onError:function(){},Sf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),G(f,Mh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return P(function(h){if(h.g==
1)return sa(h,2),G(h,Yh(d,g),4);if(h.g!=2)return e.push(g),ua(h,0);va(h);I(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function rC(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Rc(a.audioCapabilities,b.audioCapabilities,c)&&Rc(a.videoCapabilities,b.videoCapabilities,c)};function tC(a,b,c){var d=b.presentationTimeline.getDuration();b=uC(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function vC(a,b){var c=hC(new gC(a.Yb(),a.kb()),b),d=b.appMetadata||{};c=uC(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
function uC(a){var b=[],c=mg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(dg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(eg(c.value));return b};function wC(){this.g=new Map}function xC(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;f<=0&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function yC(a,b){a.g.set(b.id,b.bandwidth||2048)}function zC(a,b){a=a.g.get(b);a==null&&(a=0);return a};function AC(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Vb()):(this.h=bo(),this.g=new Yg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new kh(function(){var d,e,f,g,h;return P(function(k){switch(k.g){case 1:return G(k,Promise.all(b.l.map(function(l){return vB(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.B(4);
break}return G(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,I(k)}})});this.m=1E9}function BC(){if(Ii(Qb()))a:{var a=t(MB.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=AC.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Fn(a,b));return ho(this.h,a)};p.getConfiguration=function(){var a=bo();ho(a,this.h,bo());return a};p.Vb=function(){return this.g};
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new uB(this.g);this.l.push(h);b=CC(this,a,b||{},d||[],e||[],function(){var k;return P(function(l){if(l.g==1)return c?l.B(2):G(l,Oo(a,f.g,g.manifest.retryParameters),3);l.g!=2&&(c=l.h);k=Ki(a,c||null);return l.return(k())})},g,h);b=new Pg(b,function(){return vB(h)});b.finally(function(){Qc(f.l,h)});return DC(this,b)};
function CC(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N;return P(function(M){switch(M.g){case 1:return EC(),l=k=null,m=new LB,r=q=n=null,sa(M,2,3),G(M,f(),5);case 5:return k=M.h,G(M,FC(a,b,k,g),6);case 6:u=M.h;GC(a);v=!u.presentationTimeline.U()&&!u.presentationTimeline.ld();if(!v)throw new U(2,9,9005,b);w=t(d);z=w.next();case 7:if(z.done){M.B(9);break}y=z.value;return G(M,HC(a,y,u),10);case 10:B=M.h;u.imageStreams.push(B);GC(a);z=w.next();M.B(7);break;case 9:C=t(e),E=C.next();
case 11:if(E.done)return Oh(g.drm.clearKeys,u.variants),F=u.variants.some(function(R){if(R.audio)for(var V=t(R.audio.drmInfos),xa=V.next();!xa.done;xa=V.next())if(xa.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),V=R.next();!V.done;V=R.next())if(V.value.licenseServerUri.startsWith("data:"))return!0;return!1}),J=g.offline.usePersistentLicense,F&&(J=!1),G(M,a.Dd(u,function(R){r=r||R},g,J),15);D=E.value;return G(M,IC(a,u,D.uri,D.language,D.kind,D.mime,D.codecs),
14);case 14:A=M.h;u.textStreams.push(A);GC(a);E=C.next();M.B(11);break;case 15:l=M.h;GC(a);if(r)throw r;return G(M,JC(u,l,g,J),16);case 16:return G(M,m.init(),17);case 17:return GC(a),G(M,NB(m),18);case 18:return n=M.h,GC(a),H=KC(l,u,b,c,g,h,J),K=H.Ml,L=H.si,G(M,n.kb.addManifests([K]),19);case 19:O=M.h;GC(a);q=O[0];GC(a);if(r)throw r;return G(M,LC(a,L,q,K,h,g,n.kb,u,l,J),20);case 20:return GC(a),MC(u,K,l,J),G(M,n.kb.updateManifest(q,K),21);case 21:return GC(a),Q=new eC("manifest",n.path.Yb,n.path.kb,
q),M.return(vC(Q,K));case 3:return ya(M),G(M,m.destroy(),22);case 22:if(!k){M.B(23);break}return G(M,k.stop(),23);case 23:if(!l){M.B(25);break}return G(M,l.destroy(),25);case 25:za(M,0);break;case 2:N=va(M);if(q==null){M.B(27);break}return G(M,NC(q),27);case 27:throw r||N;}})}
function LC(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(D,A){var F,J,H,K,L,O,Q,N,M;return P(function(R){if(R.g==1){F=t(D);J=F.next();for(H={};!J.done;H={xc:void 0},J=F.next())H.xc=J.value,q(),K=qB(H.xc,f),L=H.xc.i,O=H.xc.h,Q=function(V){return function(xa){var ba,Oa,Ha,Ia;return P(function(Fa){switch(Fa.g){case 1:ba=V.xc.g;Oa=ba.hc(!1);if(!ba.aesKey||Oa){Fa.B(2);break}return G(Fa,Km(xa,
ba.aesKey,V.xc.j),3);case 3:xa=Fa.h;case 2:return Ha=pB(ba),G(Fa,g.addSegments([{data:xa}]),4);case 4:Ia=Fa.h,q(),m[Ha]=Ia[0],n+=xa.byteLength,I(Fa)}})}}(H),N=H.xc.g,(M=N.hc(!1))?yB(e,H.xc.groupId,M,L,O,Q):e.queue(H.xc.groupId,K,L,O,Q);return G(R,zB(e),2)}q();if(!A||e.l)return R.B(0);MC(h,d,k,l);return G(R,g.updateManifest(c,d),0)})};u=!1;sa(E,2);if(!OC(h)||!u||PC(h)){E.B(4);break}return G(E,r(b.filter(function(D){return D.h}),!0),5);case 5:return q(),b=b.filter(function(D){return!D.h}),v=m,w=n,m=
{},n=0,G(E,QC(g,c,d,v,w,function(){return GC(a)}),6);case 6:q();case 4:if(u){E.B(7);break}return G(E,r(b,!1),8);case 8:return q(),z=m,y=n,m={},n=0,G(E,QC(g,c,d,z,y,function(){return q()}),9);case 9:q();case 7:ua(E,0);break;case 2:return B=va(E),C=Object.values(m),G(E,g.removeSegments(C,function(){}),10);case 10:throw B;}})}
function NC(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:return b=new LB,G(f,b.init(),2);case 2:return G(f,NB(b),3);case 3:return c=f.h,d=new eC("manifest",c.path.Yb,c.path.kb,a),G(f,b.destroy(),4);case 4:return e=new AC,G(f,e.remove(d.toString()),0)}})}
function QC(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w;return P(function(z){switch(z.g){case 1:g=!1;sa(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())r=q.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,u!=null&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,u!=null&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return G(z,a.updateManifest(b,c),4);case 4:g=!0;f();ua(z,0);break;case 2:return v=va(z),G(z,NC(b),5);case 5:if(g){z.B(6);break}w=Object.values(d);return G(z,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
function JC(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E,D,A,F,J,H,K,L,O,Q,N,M,R;return P(function(V){switch(V.g){case 1:return e={width:Infinity,height:Infinity},Lf(a,c.restrictions,e),G(V,Of(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;Jf(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(dg(q));r=t(a.textStreams);for(u=r.next();!u.done;u=
r.next())v=u.value,f.push(eg(v));w=t(a.imageStreams);for(z=w.next();!z.done;z=w.next())y=z.value,f.push(fg(y));return G(V,c.offline.trackSelectionCallback(f),3);case 3:B=V.h;C=a.presentationTimeline.getDuration();E=0;D=t(B);for(A=D.next();!A.done;A=D.next())F=A.value,J=F.bandwidth*C/8,E+=J;sa(V,4);return G(V,c.offline.downloadSizeCallback(E),6);case 6:H=V.h;if(!H)throw new U(2,9,9014);ua(V,5);break;case 4:K=va(V);if(K instanceof U)throw K;throw new U(2,9,9015);case 5:L=new Set;O=new Set;Q=new Set;
N=t(B);for(M=N.next();!M.done;M=N.next())R=M.value,R.type=="variant"&&L.add(R.id),R.type=="text"&&O.add(R.id),R.type=="image"&&Q.add(R.id);a.variants=a.variants.filter(function(xa){return L.has(xa.id)});a.textStreams=a.textStreams.filter(function(xa){return O.has(xa.id)});a.imageStreams=a.imageStreams.filter(function(xa){return Q.has(xa.id)});RC(a);I(V)}})}
function KC(a,b,c,d,e,f,g){var h=tC(c,b,d),k=e.offline.progressCallback;wB(f,function(u,v){h.size=v;k(h,u)},function(u,v){l&&g&&m==v&&Uh(a,"cenc",u)});var l=OC(b)&&!PC(b),m=null;l&&(m=SC.get(a.g.keySystem));for(var n=new wC,q=t(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=t(b.imageStreams);for(r=q.next();!r.done;r=q.next())yC(n,r.value);q=t(b.variants);for(r=q.next();!r.done;r=q.next())xC(n,r.value);f=TC(f,n,b,e);e=f.streams;f=f.si;(n=a.g)&&g&&(n.initData=[]);return{Ml:{creationTime:Date.now(),
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.pe(),streams:e,sessionIds:g?ci(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},si:f}}function OC(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function PC(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function MC(a,b,c,d){b.expiration=c.pe();c=ci(c);b.sessionIds=d?c:[];if(OC(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return UC(this,VC(this,a))};
function VC(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:EC();c=fC(b);if(c==null||c.g!="manifest")throw new U(2,9,9004,b);d=c;e=new LB;ta(k,2);return G(k,e.init(),4);case 4:return G(k,PB(e,d.Yb(),d.kb()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([WC(a,h,e),XC(f,d,h)]),2);case 2:return ya(k),G(k,e.destroy(),8);case 8:za(k,0)}})}
function YC(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&e.type=="video"?c.push({contentType:df(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||e.type!="audio"||c.push({contentType:df(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function WC(a,b,c){return P(function(d){return G(d,ZC(a.g,a.h.drm,c,b),0)})}
function XC(a,b,c){function d(){}var e=$C(c);vC(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.gm=function(){return UC(this,aD(this))};
function aD(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return EC(),b=a.g,c=a.h.drm,d=new LB,e=!1,ta(n,2),G(n,d.init(),4);case 4:f=[],QB(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,qC(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return ya(n),G(n,d.destroy(),11);case 11:za(n,3);break;case 3:return n.return(!e)}})}
p.list=function(){return UC(this,bD())};function bD(){var a,b,c;return P(function(d){switch(d.g){case 1:return EC(),a=[],b=new LB,ta(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),OB(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(h.g==1)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=vC(new eC("manifest",e.Yb,e.kb,l),k);a.push(k)});I(h)})})}),G(d,c,2);case 2:return ya(d),G(d,b.destroy(),6);case 6:za(d,3);break;case 3:return d.return(a)}})}
function FC(a,b,c,d){var e,f,g,h,k;return P(function(l){if(l.g==1)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
addFont:function(){}},c.configure(d.manifest),GC(a),G(l,c.start(b,g),2);if(l.g!=3)return h=l.h,GC(a),k=cD(h),G(l,Promise.all(lb(k,function(m){return m.createSegmentIndex()})),3);GC(a);if(e)throw e;return l.return(h)})}
function HC(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z;return P(function(y){switch(y.g){case 1:return G(y,dD(a,b),2);case 2:d=y.h;if(d!="text/vtt")throw new U(1,2,2017,b);return G(y,eD(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=sf(d);if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Jb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);q=n.next();for(r={};!q.done;r={vg:void 0,Fd:void 0},q=n.next())r.Fd=q.value,r.vg=null,
u=function(B){return function(){B.vg==null&&(B.vg=mc([b],[B.Fd.payload]));return B.vg||[]}}(r),v=new Bj(r.Fd.startTime,r.Fd.endTime,u,0,null,null,0,0,Infinity),r.Fd.payload.includes("#xywh")&&(w=r.Fd.payload.split("#xywh=")[1].split(","),w.length===4&&v.jg({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),m.push(v);z=d;if(!m.length){y.B(4);break}return G(y,Oo(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++,
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new am(m),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([df(z||
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
function IC(a,b,c,d,e,f,g){var h,k,l;return P(function(m){if(m.g==1)return f?m.B(2):G(m,dD(a,c),3);m.g!=2&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:cm(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:sc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([df(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=df(h.mimeType,h.codecs);l=tf(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})}
function dD(a,b){var c;return P(function(d){switch(d.g){case 1:return sa(d,2),G(d,Oo(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}function eD(a,b,c){var d,e,f;return P(function(g){if(g.g==1)return d=ih,e=ch([a],c),e.method="GET",G(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
p.Dd=function(a,b,c,d){var e=this,f;return P(function(g){return g.g==1?(f=new Eh({Dc:e.g,onError:b,Sf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),G(g,Jh(f,a.variants,d),2)):g.g!=3?G(g,Wh(f),3):g.return(f)})};
function TC(a,b,c,d){var e=new Map,f=cD(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=fD(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),si:Array.from(e.values())}}
function fD(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=h===0?d.id:0;gD(d,c.presentationTimeline.Mb(),function(l,m){var n=pB(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=zC(b,d.id)*r;r=sB(a.g,r);f.set(n,new oB(l,r,k,!1,m))}l.ia&&(q=pB(l.ia),f.has(q)||(r=zC(b,
d.id)*.5,r=sB(a.g,r),f.set(q,new oB(l.ia,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});h!==0&&(k=(k+1)%h)});return g}
function gD(a,b,c){b=a.segmentIndex.find(b);if(b!=null)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function GC(a){if(a.j.g)throw new U(2,9,7001);}function EC(){if(!BC())throw new U(2,9,9E3);}function UC(a,b){return P(function(c){if(c.g==1)return a.i.push(b),ta(c,2),G(c,b,4);if(c.g!=2)return c.return(c.h);ya(c);Qc(a.i,b);return za(c,0)})}function DC(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Qc(a.i,c)})}
function $C(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,d.initSegmentKey!=null&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
function ZC(a,b,c,d){var e,f,g;return P(function(h){if(h.g==1){if(!d.drmInfo)return h.return();e=RB(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:YC(d,!1),videoCapabilities:YC(d,!0)}});return G(h,qC(b,a,f),2)}return h.g!=3?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function cD(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
function RC(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",AC);AC.deleteAll=function(){var a;return P(function(b){return b.g==1?(a=new LB,ta(b,2),G(b,SB(a),2)):b.g!=5?(ya(b),G(b,a.destroy(),5)):za(b,0)})};
AC.prototype.list=AC.prototype.list;AC.prototype.removeEmeSessions=AC.prototype.gm;AC.prototype.remove=AC.prototype.remove;AC.prototype.store=AC.prototype.store;AC.prototype.getNetworkingEngine=AC.prototype.Vb;AC.prototype.getConfiguration=AC.prototype.getConfiguration;AC.prototype.configure=AC.prototype.configure;AC.prototype.destroy=AC.prototype.destroy;AC.support=BC;
var SC=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");
$q("offline",BC);function hD(){}function iD(){for(var a=t(jD),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){bb("Error installing polyfill!",c)}}}function kD(a,b){a={priority:b||0,callback:a};for(b=0;b<jD.length;b++)if(jD[b].priority<a.priority){jD.splice(b,0,a);return}jD.push(a)}S("shaka.polyfill",hD);hD.register=kD;hD.installAll=iD;var jD=[];function lD(){}function mD(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())nD(b.value)}function nD(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){c==null||c==void 0?this.removeAttribute(b):this.setAttribute(b,c)}})}hD.Aria=lD;lD.install=mD;kD(mD);function oD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}oD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};oD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function pD(a){if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("org.w3")||a.startsWith("com.huawei"))return"cenc";bb("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function qD(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function rD(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&Qb().ud()?!0:!1};function sD(){}var tD;function uD(){Qb().mg()&&!tD&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(tD=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=vD,navigator.emeEncryptionSchemePolyfilled=!0)}
function vD(a,b){var c=this,d,e;return P(function(f){if(f.g==1)return G(f,tD.call(c,a,b),2);d=f.h;if(e=qD(d))return navigator.requestMediaKeySystemAccess=tD,f.return(d);navigator.requestMediaKeySystemAccess=wD;return f.return(wD.call(c,a,b))})}
function wD(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u;return P(function(v){if(v.g==1){d=pD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=xD(h.videoCapabilities,d),l=xD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),n.name="NotSupportedError",
n.code=DOMException.NOT_SUPPORTED_ERR,n;return G(v,tD.call(c,a,e),2)}q=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new oD(q,r,u))})}function xD(a,b){return a?a.filter(function(c){return rD(c.encryptionScheme,b)}):a}hD.EmeEncryptionScheme=sD;sD.install=uD;kD(uD);function yD(){}
function zD(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",AD);document.addEventListener("webkitfullscreenerror",AD);document.addEventListener("mozfullscreenchange",AD);document.addEventListener("mozfullscreenerror",AD);document.addEventListener("MSFullscreenChange",AD);document.addEventListener("MSFullscreenError",AD)}}
function AD(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}hD.Fullscreen=yD;yD.install=zD;kD(zD);function BD(){}var CD;function DD(){Qb().mg()&&!CD&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(CD=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=ED,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function ED(a){var b=this,c,d,e;return P(function(f){switch(f.g){case 1:return G(f,CD.call(b,a),2);case 2:c=f.h;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=qD(d))return navigator.mediaCapabilities.decodingInfo=CD,f.return(c);navigator.mediaCapabilities.decodingInfo=FD;if(d){f.B(3);break}return G(f,GD(a),4);case 4:return c.keySystemAccess=f.h,f.return(c);case 3:return f.return(FD.call(b,a))}})}
function FD(a){var b=this,c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=pD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},rD(d,g)&&rD(c,g))?G(l,CD.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=new oD(k.keySystemAccess,c,d);l.B(3);break}if(!a.keySystemConfiguration){l.B(3);
break}return G(l,GD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function GD(a){var b,c;return P(function(d){if(d.g==1){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return G(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}hD.MCapEncryptionScheme=BD;BD.install=DD;kD(DD,-2);function HD(){}function ID(){Qb().mc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),HD.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=JD)}
function JD(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};Qb();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Ji().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Ji().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.B(2);break}if(!Ii())return q.return(b);if(!c){q.B(3);break}return G(q,KD(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=
Qb().Oa(),u=d.contentType;r==="CAST"&&d.spatialRendering&&(u+="; spatialRendering=true");l=gd(u);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return G(q,LD(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function KD(a){var b,c,d;return P(function(e){return e.g==1?(b=Qb(),c=b.Oa(),c!=="CAST"?e.B(2):G(e,MD(a),3)):e.g!=2?(d=e.h,e.return(d)):e.return(gd(a.contentType))})}
function LD(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return P(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Qb().nj()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));
h={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=mf(k)+";"+lf(k);n=mf(l)+";"+lf(l);q=c.keySystem;r=null;sa(u,2);if(Gg.has(m+"#"+n+"#"+q)){r=Gg.get(m+"#"+n+"#"+q)||null;u.B(4);break}return G(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Gg.set(m+"#"+n+"#"+q,r);case 4:ua(u,
3);break;case 2:va(u);case 3:return u.return(r)}})}
function MD(a){var b,c,d,e,f;return P(function(g){if(g.g==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(gd(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
default:return g.return(!1)}e=!1;f=ND;return f.has(b)?(e=f.get(b),g.B(2)):G(g,cast.__platform__.canDisplayType(b),3)}g.g!=2&&(e=g.h,f.set(b,e));return g.return(e)})}hD.MediaCapabilities=HD;HD.install=ID;HD.originalMcap=null;var ND=new Map;kD(ID,-1);function OD(){}function PD(){var a=Qb(),b=a.Ja()==="WEBKIT"?a.Ga():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(QD(),RD()):b<=15&&QD());a=t(a.xj());for(b=a.next();!b.done;b=a.next())SD(b.value);(window.MediaSource||window.ManagedMediaSource)&&TD();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&UD()}
function QD(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Na.apply(0,arguments));b.abort=function(){};return b}}function RD(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function TD(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return hf(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return hf(c)!="mp2t"&&b(c)}}}
function SD(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return lf(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return lf(d)!=a&&c(d)}}}
function UD(){var a=MediaSource.isTypeSupported;Qb().Yj()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}hD.MediaSource=OD;OD.install=PD;kD(PD);function VD(){}function WD(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=void 0?XD():window.orientation!=void 0&&YD())}function XD(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()});screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}
function YD(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new ZD;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}hD.Orientation=VD;VD.install=WD;function ZD(){kb.call(this);this.type="";this.angle=0}ma(ZD,kb);
ZD.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
ZD.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};kD(WD);function $D(){}var aE,bE,cE,dE,eE,fE;
function gE(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=hE){if(a===void 0?0:a)aE=!0,bE=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),cE=HTMLMediaElement.prototype.setMediaKeys,dE=window.MediaKeys,eE=window.MediaKeySystemAccess,fE=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=iE;window.MediaKeys=jE;window.MediaKeySystemAccess=
kE;navigator.requestMediaKeySystemAccess=lE;window.shakaMediaKeysPolyfill=hE;Wf.clear();Gg.clear()}}function lE(a,b){try{var c=new kE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function iE(a){var b=this.mediaKeys;b&&b!=a&&mE(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?mE(a,this):Promise.resolve()}
function nE(a){a=Jb(a.initData);if(Nb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Wb(a.subarray(4),!0);a=Zb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Kb(a);this.dispatchEvent(b)}hD.PatchedMediaKeysApple=$D;
$D.uninstall=function(){window.shakaMediaKeysPolyfill==hE&&aE&&(aE=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",bE),HTMLMediaElement.prototype.setMediaKeys=cE,window.MediaKeys=dE,window.MediaKeySystemAccess=eE,navigator.requestMediaKeySystemAccess=fE,bE=fE=cE=eE=dE=null,window.shakaMediaKeysPolyfill="",Wf.clear(),Gg.clear())};$D.install=gE;
function kE(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
kE.prototype.createMediaKeys=function(){var a=new jE(this.keySystem);return Promise.resolve(a)};kE.prototype.getConfiguration=function(){return this.g};function jE(a){this.h=new WebKitMediaKeys(a);this.g=new Tc}jE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new oE(this.h,a)};jE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function mE(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",nE);try{return Kl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}jE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function oE(a){kb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Tc;this.sessionId="";this.expiration=NaN;this.closed=new Og;this.keyStatuses=new pE;this.onkeystatuseschange=null}
ma(oE,kb);p=oE.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new Og;try{var d=this.l.createSession("video/mp4",Jb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.Tc()==void 0?"license-request":"license-renewal").set("message",Kb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(qE(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:qE(c,"output-not-allowed");break;default:qE(c,"internal-error")}});qE(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
p.update=function(a){this.g=new Og;try{this.i.update(Jb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function qE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function pE(){this.size=0;this.g=void 0}p=pE.prototype;p.Tc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Fg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Fg.value();return this.g&&Ib(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var hE="apple";
kD(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||gE())});function rE(){}function sE(){if(window.MediaKeys){var a=Qb();MediaKeys.prototype.setServerCertificate&&a.Le()||(MediaKeys.prototype.setServerCertificate=tE)}}function tE(){return Promise.resolve(!1)}hD.PatchedMediaKeysCert=rE;rE.install=sE;kD(sE);function uE(){}
function vE(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wE="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xE;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yE;window.MediaKeys=zE;window.MediaKeySystemAccess=AE;window.shakaMediaKeysPolyfill=BE}}
function CE(a){var b=wE;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function xE(a,b){try{var c=new AE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function yE(a){var b=this.mediaKeys;b&&b!=a&&DE(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&DE(a,this);return Promise.resolve()}hD.PatchedMediaKeysWebkit=uE;uE.install=vE;
function AE(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}AE.prototype.createMediaKeys=function(){var a=new zE(this.g);return Promise.resolve(a)};AE.prototype.getConfiguration=function(){return this.h};function zE(a){this.l=a;this.h=null;this.g=new Tc;this.i=[];this.j=new Map}
function DE(a,b){a.h=b;a.g.Sa();var c=wE;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Kb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=EE(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Tc()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=EE(a,d.sessionId))&&d.ready()}),
a.g.o(b,c+"keyerror",function(d){var e=EE(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(d.systemCode==45&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?FE(e,"output-restricted"):f==1?FE(e,"expired"):FE(e,"internal-error"))}}))}
zE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new GE(b,this.l,a);this.i.push(a);return a};zE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};zE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function EE(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function GE(a,b,c){kb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Og;this.keyStatuses=new HE;this.onkeystatuseschange=null}ma(GE,kb);p=GE.prototype;p.ready=function(){FE(this,"usable");this.g&&this.g.resolve();this.g=null};
function IE(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=Jb(Zb("LOAD_SESSION|"+c));else{var e=Zb("PERSISTENT|");d=lc(e,b)}else d=Jb(b)}catch(g){return Promise.reject(g)}a.h=new Og;var f=CE("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new Df(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h}
function JE(a,b,c){if(a.g)a.g.then(function(){return JE(a,b,c)}).catch(function(){return JE(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=Vb(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=fc(e.keys[0].k);e=fc(e.keys[0].kid)}else d=Jb(c),e=null;var f=CE("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function FE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return IE(this,b,null)};p.load=function(a){return this.l=="persistent-license"?IE(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Og;JE(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=CE("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function HE(){this.size=0;this.g=void 0}p=HE.prototype;p.Tc=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,Fg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Fg.value();return this.g&&Ib(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var wE="",BE="webkit";kD(vE);function KE(){}function LE(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ME,Object.defineProperty(a,"disablePictureInPicture",{get:NE,set:OE,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PE,document.addEventListener("webkitpresentationmodechanged",QE,!0))}}
function QE(a){a=a.target;if(a.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
function ME(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function PE(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function NE(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function OE(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}hD.PiPWebkit=KE;KE.install=LE;kD(LE);function RE(){}function SE(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=TE))}function TE(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}hD.RandomUUID=RE;RE.install=SE;kD(SE);function UE(){}function VE(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:WE})}function WE(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}hD.Symbol=UE;UE.install=VE;kD(VE);function XE(){}function YE(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=ZE),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=$E),b.prototype.includes||(b.prototype.includes=aF)}function ZE(a,b){return Array.prototype.indexOf.call(this,a,b)}function $E(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
function aF(a,b){return this.indexOf(a,b)!==-1}hD.TypedArray=XE;XE.install=YE;kD(YE);function bF(){}function cF(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}hD.VideoPlayPromise=bF;bF.install=cF;kD(cF);function dF(){}function eF(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Ji().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=fF)}}function fF(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}hD.VideoPlaybackQuality=dF;dF.install=eF;kD(eF);function gF(){}function hF(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=iF;else if(b==6)a=jF;else{try{var c=!!iF(1,2,"")}catch(d){c=!1}c&&(a=iF)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function iF(a,b,c){return new window.TextTrackCue(a,b,c)}function jF(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}hD.VTTCue=gF;gF.install=hF;kD(hF);function kF(a){kb.call(this);this.g=a;this.m=null;this.h=[];this.j=-1;this.i=this.l=null;this.u=new Tc}ma(kF,kb);p=kF.prototype;p.destroy=function(){var a=this;return P(function(b){if(b.g==1)return G(b,a.removeAllItems(),2);a.g=null;a.u&&(a.u.release(),a.u=null);kb.prototype.release.call(a);I(b)})};p.configure=function(a){this.m=a};p.getConfiguration=function(){return this.m};p.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null};
p.getCurrentItemIndex=function(){return this.j};p.getItems=function(){return this.h.slice()};p.insertItems=function(a){this.h.push.apply(this.h,x(a));this.dispatchEvent(new T("itemsinserted"))};
p.removeAllItems=function(){var a=this,b,c,d,e;return P(function(f){if(f.g==1)return a.u.Sa(),a.h.length&&a.j>=0?G(f,a.g.tc(),2):f.B(2);if(f.g!=4){b=[];a.i&&(a.i.preloadManager.j||b.push(a.i.preloadManager.destroy()),a.i=null);a.l&&(a.l.preloadManager.j||b.push(a.l.preloadManager.destroy()),a.l=null);c=t(a.h);for(d=c.next();!d.done;d=c.next())e=d.value,e.preloadManager&&!e.preloadManager.j&&b.push(e.preloadManager.destroy());return b.length?G(f,Promise.all(b),4):f.B(4)}a.h=[];a.j=-1;a.dispatchEvent(new T("itemsremoved"));
I(f)})};
p.playItem=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:b.u.Sa();if(!b.h.length||a>=b.h.length)throw new U(2,7,7007);c=b.getCurrentItem();d=b.h[a];b.j!=a&&(b.j=a,b.dispatchEvent(new T("currentitemchanged")));e=b.g.h;f=b.m?b.m.preloadNextUrlWindow:0;f>0&&(g=!1,b.u.o(e,"timeupdate",function(){var C,E,D,A;return P(function(F){switch(F.g){case 1:if(b.l||b.h.length<=1||g||b.g.U()||!e.duration)return F.return();C=b.g.wa().end-e.currentTime;if(isNaN(C)){F.B(0);break}if(!(C<=
f)){F.B(0);break}E=b.m&&b.m.repeatMode;D=null;b.j+1<b.h.length?D=b.h[b.j+1]:E==1&&(D=b.h[0]);if(!D||D.preloadManager&&!D.preloadManager.j){F.B(0);break}g=!0;A=null;sa(F,5);return G(F,b.g.preload(D.manifestUri,D.startTime,D.mimeType,D.config),7);case 7:A=F.h;ua(F,6);break;case 5:va(F),A=null;case 6:b.l={item:D,preloadManager:A},g=!1,I(F)}})}));b.u.o(b.g,"complete",function(){var C=b.m&&b.m.repeatMode,E=!1;if(C==2)E=!0;else{var D=b.j+1;D<b.h.length?b.playItem(D):C==1&&(b.h.length==1?E=!0:b.playItem(0))}E&&
(e.paused?(e.currentTime=b.g.wa().start,e.play()):b.u.o(e,"paused",function(){e.currentTime=b.g.wa().start;e.play()}))});h=d.manifestUri;d.preloadManager&&!d.preloadManager.j&&(h=d.preloadManager);k=!1;b.l&&b.l.item==d&&b.l.preloadManager?h=b.l.preloadManager:b.i&&b.i.item==d&&b.i.preloadManager&&(h=b.i.preloadManager,k=!0);if(!b.i){B.B(2);break}if(k||b.i.preloadManager.j){B.B(3);break}return G(B,b.i.preloadManager.destroy(),3);case 3:b.i=null;case 2:if(!(b.m&&b.m.preloadPrevItem&&c&&b.g.l===Br)){B.B(5);
break}l=null;sa(B,6);return G(B,b.g.ck(),8);case 8:l=B.h;ua(B,7);break;case 6:va(B),l=null;case 7:b.i={item:c,preloadManager:l};case 5:return d.config&&(b.g.Bj(),b.g.configure(d.config)),G(B,b.g.load(h,d.startTime,d.mimeType),9);case 9:b.l=null;if(d.extraText)for(m=t(d.extraText),n=m.next();!n.done;n=m.next())q=n.value,q.mime?b.g.ge(q.uri,q.language,q.kind,q.mime,q.codecs):b.g.ge(q.uri,q.language,q.kind);if(d.extraThumbnail)for(r=t(d.extraThumbnail),u=r.next();!u.done;u=r.next())v=u.value,b.g.gf(v);
if(d.extraChapter)for(w=t(d.extraChapter),z=w.next();!z.done;z=w.next())y=z.value,b.g.ef(y.uri,y.language,y.mime);I(B)}})};S("shaka.queue.QueueManager",kF);kF.prototype.playItem=kF.prototype.playItem;kF.prototype.removeAllItems=kF.prototype.removeAllItems;kF.prototype.insertItems=kF.prototype.insertItems;kF.prototype.getItems=kF.prototype.getItems;kF.prototype.getCurrentItemIndex=kF.prototype.getCurrentItemIndex;kF.prototype.getCurrentItem=kF.prototype.getCurrentItem;
kF.prototype.getConfiguration=kF.prototype.getConfiguration;kF.prototype.configure=kF.prototype.configure;kF.prototype.destroy=kF.prototype.destroy;Tq=function(a){return new kF(a)};function lF(){}lF.prototype.parseInit=function(){};lF.prototype.setSequenceMode=function(){};lF.prototype.setManifestType=function(){};lF.prototype.parseMedia=function(a,b){var c=null,d=[];a=Vb(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=mF.exec(e))){var f=nF.exec(e[1]);f=parseInt(f[1],10)*60+parseFloat(f[2].replace(",","."));e=new re(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
S("shaka.text.LrcTextParser",lF);lF.prototype.parseMedia=lF.prototype.parseMedia;lF.prototype.setManifestType=lF.prototype.setManifestType;lF.prototype.setSequenceMode=lF.prototype.setSequenceMode;lF.prototype.parseInit=lF.prototype.parseInit;var mF=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,nF=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;qf("application/x-subtitle-lrc",function(){return new lF});function oF(){this.g="UNKNOWN"}oF.prototype.parseInit=function(){};oF.prototype.setSequenceMode=function(){};oF.prototype.setManifestType=function(a){this.g=a};
oF.prototype.parseMedia=function(a,b,c,d){var e=Vb(a);a=[];if(e=="")return a;var f=Ld(e,"tt",!0);if(!f)throw new U(2,2,2005,"Failed to parse TTML.");e=Vd(f,"body")[0];if(!e)return[];var g=ae(f,pF,"frameRate"),h=ae(f,pF,"subFrameRate"),k=ae(f,pF,"frameRateMultiplier"),l=ae(f,pF,"tickRate"),m=ae(f,pF,"cellResolution"),n=f.attributes["xml:space"]||"default",q=ae(f,qF,"extent");if(n!="default"&&n!="preserve")throw new U(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new rF(g,h,k,l);m=sF(m);
h=Vd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=Vd(f,"style");f=Vd(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=tF(this,u.value,k,q))&&l.push(u);if(Sd(e,"p").length)throw new U(2,2,2001,"<p> can only be inside <div> in TTML");q=t(Sd(e,"div"));for(r=q.next();!r.done;r=q.next())if(Sd(r.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=uF(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
"transparent"),a.push(b);return a};
function uF(a,b,c,d,e,f,g,h,k,l,m,n,q,r){var u=m;if(Qd(b)){if(!n)return null;var v={tagName:"span",children:[Td(b)],attributes:{},parent:null}}else v=b;for(var w=null,z=t(vF),y=z.next();!y.done&&!(w=wF(v,"backgroundImage",e,"#",y.value)[0]);y=z.next());z=null;y=ae(v,vF,"backgroundImage");var B=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&B.test(y)){z=parseInt(y.split(":").pop(),10)-1;if(z>=r.length)return null;z=r[z]}else q&&y&&!y.startsWith("#")&&(B=new rb(q),y=new rb(y),(y=B.resolve(y).toString())&&
(z=y));if(b.tagName=="p"||w||z)n=!0;b=n;y=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";B=v.children.every(Qd);k=[];if(!B)for(var C=t(v.children),E=C.next();!E.done;E=C.next())(E=uF(a,E.value,c,d,e,f,g,h,y,l,v,n,q,r))&&k.push(E);e=m!=null;q=Td(v);q=v.children.length&&q&&/\S/.test(q);C=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(C||q||v.tagName=="br"||k.length!=0||e&&!y))return null;r=xF(v,d);q=r.start;for(r=r.end;u&&u.tagName&&u.tagName!="tt";)r=yF(u,d,q,r),q=r.start,
r=r.end,u=u.parent;q==null&&(q=0);q+=c.periodStart;r=r==null?Infinity:r+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),r=Math.min(r,c.segmentEnd));if(!C&&k.length>0)for(q=Infinity,r=0,c=t(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),r=Math.max(r,d.endTime);if(v.tagName=="br")return a=new re(q,r,""),a.lineBreak=!0,a;c="";B&&(c=bc(Td(v)||""),y&&(c=c.replace(/\s+/g," ")));c=new re(q,r,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=wF(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var D=l.attributes["xml:id"];c.region=h.filter(function(A){return A.id==D})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=wF(m,"region",g,"")[0]);zF(a,c,v,h,w,z,f,b,k.length==0);return c}
function tF(a,b,c,d){var e=new ud,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=AF.exec(d)||BF.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=CF(a,b,c,"extent");if(h){var k=(g=AF.exec(h))||BF.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?vd:0,e.heightUnits=g||f!=null?vd:0)}if(a=CF(a,b,c,"origin"))if(k=(g=AF.exec(a))||BF.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=vd,e.height=100-e.viewportAnchorY,e.heightUnits=vd):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?vd:0;return e}function DF(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function zF(a,b,c,d,e,f,g,h,k){h=h||k;EF(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=EF(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=ue);(k=EF(a,c,d,g,"textAlign",!0))?(b.positionAlign=FF.get(k),b.lineAlign=GF.get(k),b.textAlign=Re[k.toUpperCase()]):b.textAlign=te;if(k=EF(a,c,d,g,"displayAlign",!0))b.displayAlign=Se[k.toUpperCase()];if(k=EF(a,c,d,g,"color",h))b.color=DF(k);
if(k=EF(a,c,d,g,"backgroundColor",h))b.backgroundColor=DF(k);if(k=EF(a,c,d,g,"border",h))b.border=k;if(k=EF(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=EF(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=Oe);k=EF(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=EF(a,c,d,g,"lineHeight",h))&&k.match(HF)&&(b.lineHeight=k);(k=EF(a,c,d,g,"fontSize",h))&&(k.match(HF)||k.match(IF))&&(b.fontSize=k);if(k=EF(a,c,d,g,"fontStyle",h))b.fontStyle=Ue[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=Td(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=EF(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(HF)?b.textStrokeColor=b.color:(b.textStrokeColor=DF(e[0]),e.shift()),e[0]&&e[0].match(HF)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=EF(a,c,d,g,"letterSpacing",h))&&e.match(HF)&&(b.letterSpacing=e);(e=EF(a,c,d,g,"linePadding",h))&&e.match(HF)&&(b.linePadding=e);if(e=EF(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=CF(a,d,g,"textDecoration"))&&JF(b,e);(e=KF(a,c,
g,"textDecoration"))&&JF(b,e);if(e=EF(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(EF(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function JF(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(Qe)||a.textDecoration.push(Qe);break;case "noUnderline":a.textDecoration.includes(Qe)&&Qc(a.textDecoration,Qe);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Qc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Qc(a.textDecoration,"overline")}}function EF(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=KF(a,b,d,e))?b:f?CF(a,c,d,e):null}function CF(a,b,c,d){if(!b)return null;var e=ae(b,qF,d);return e?e:LF(a,b,c,d)}function KF(a,b,c,d){var e=ae(b,qF,d);return e?e:LF(a,b,c,d)}
function LF(a,b,c,d){b=wF(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=$d(b[f],"urn:ebu:tt:style",d);g||(g=ae(b[f],qF,d));g||(g=KF(a,b[f],c,d));g&&(e=g)}return e}function wF(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?$d(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
function yF(a,b,c,d){a=xF(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function xF(a,b){var c=MF(a.attributes.begin,b),d=MF(a.attributes.end,b);a=MF(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function MF(a,b){var c=null;if(NF.test(a)){a=NF.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+d*60+c*3600}else if(OF.test(a))c=PF(OF,a);else if(QF.test(a))c=PF(QF,a);else if(RF.test(a))a=RF.exec(a),c=Number(a[1])/b.frameRate;else if(SF.test(a))a=SF.exec(a),c=Number(a[1])/b.g;else if(TF.test(a))c=PF(TF,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
function PF(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function sF(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",oF);oF.prototype.parseMedia=oF.prototype.parseMedia;oF.prototype.setManifestType=oF.prototype.setManifestType;oF.prototype.setSequenceMode=oF.prototype.setSequenceMode;oF.prototype.parseInit=oF.prototype.parseInit;
function rF(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var AF=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,IF=/^(\d{1,4}(?:\.\d+)?|100)%$/,HF=/^(\d+px|\d+em|\d*\.?\d+c)$/,BF=/^(\d+)px (\d+)px$/,NF=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,OF=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,QF=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,RF=/^(\d*(?:\.\d*)?)f$/,SF=/^(\d*(?:\.\d*)?)t$/,TF=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),GF=(new Map).set("left",xe).set("center","center").set("right",
"end").set("start",xe).set("end","end"),FF=(new Map).set("left","line-left").set("center","center").set("right","line-right"),pF=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],qF=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],vF=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];qf("application/ttml+xml",function(){return new oF});function UF(){this.g=new oF}UF.prototype.parseInit=function(a){var b=!1;(new rh).box("moov",wh).box("trak",wh).box("mdia",wh).box("minf",wh).box("stbl",wh).X("stsd",yh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};UF.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};UF.prototype.setManifestType=function(a){this.g.setManifestType(a)};
UF.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new rh).box("moof",wh).box("traf",wh).X("tfhd",function(z){e=Li(z.reader,z.flags).me}).X("trun",function(z){z=Oi(z.reader,z.version,z.flags);z=t(z.Yh);for(var y=z.next();!y.done;y=z.next())h.push(y.value.sampleSize||e||0)}).X("subs",function(z){for(var y=z.reader,B=y.$(),C=-1,E=0;E<B;E++){var D=y.$();C+=D;D=y.Ia();for(var A=[],F=0;F<D;F++)z.version==1?A.push(y.$()):A.push(y.Ia()),y.ba(),y.ba(),y.$();g.set(C,A)}}).box("mdat",
Bh(function(z){f.push(z)},!1)).parse(a,!1);if(f.length==0)throw new U(2,2,2007);for(var k=lc.apply(cc,x(f)),l=0,m=0;m<h.length;m++){var n=Jb(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=Jb(n,0,q[0]);for(var r=[],u=q[0],v=1;v<q.length;v++){var w=Jb(a,u,q[v]);w=dc(w);r.push("data:image/png;base64,"+w);u+=q[v]}d=d.concat(this.g.parseMedia(n,b,c,r))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};S("shaka.text.Mp4TtmlParser",UF);UF.prototype.parseMedia=UF.prototype.parseMedia;
UF.prototype.setManifestType=UF.prototype.setManifestType;UF.prototype.setSequenceMode=UF.prototype.setSequenceMode;UF.prototype.parseInit=UF.prototype.parseInit;qf('application/mp4; codecs="stpp"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml.im1i"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml.im1t"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml.im2i"',function(){return new UF});
qf('application/mp4; codecs="stpp.ttml.im2t"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml.etd1"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new UF});qf('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new UF});qf('application/mp4; codecs="stpp.TTML.im1t"',function(){return new UF});function VF(){this.g="UNKNOWN"}VF.prototype.parseInit=function(){};VF.prototype.setSequenceMode=function(){};VF.prototype.setManifestType=function(a){this.g=a};
VF.prototype.parseMedia=function(a,b){a=Vb(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new U(2,2,2E3);a=b.vttOffset;if(this.g=="HLS")if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new U(2,2,2E3);a=Ed(a[1]);if(a==null)throw new U(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=95443.7176888889,
d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new xd(e);var f=new ud;Ad(e);yd(e);for(var g=Ad(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),
h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");yd(e);g=Ad(e)}b.push(f)}d=new Map;Ee(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),f[k].includes("}")&&
(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new re(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(parseInt(r,10)>=700||r=="bold")m=!0,l.fontWeight=Oe;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Ae;break;case "italic":m=!0;l.fontStyle=Pe;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine=r!="noWrap"}}}m&&d.set(g,
l)}}l=f;m=a;if(l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new xd(l[0]),g=Bd(h),n=zd(h,/[ \t]+--\x3e[ \t]+/g),k=Bd(h),g==null||n==null||k==null)bb("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new re(g,k,m);yd(h);for(g=Ad(h);g;)WF(l,g,b),yd(h),g=Ad(h);
De(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function WF(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],b=="middle"?a.textAlign=te:a.textAlign=Re[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||
b=="end"?"line-right":b=="center"||b=="middle"?"center":se);else if(d=/^region:(.*)$/.exec(b)){if(b=XF(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Te[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=we,a.line=Number(c[1]),c[2]&&(a.lineAlign=Te[c[2].toUpperCase()])}function XF(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
S("shaka.text.VttTextParser",VF);VF.prototype.parseMedia=VF.prototype.parseMedia;VF.prototype.setManifestType=VF.prototype.setManifestType;VF.prototype.setSequenceMode=VF.prototype.setSequenceMode;VF.prototype.parseInit=VF.prototype.parseInit;qf("text/vtt",function(){return new VF});qf('text/vtt; codecs="vtt"',function(){return new VF});qf('text/vtt; codecs="wvtt"',function(){return new VF});function YF(){this.g=null}YF.prototype.parseInit=function(a){var b=this,c=!1;(new rh).box("moov",wh).box("trak",wh).box("mdia",wh).X("mdhd",function(d){d=Ni(d.reader,d.version);b.g=d.timescale}).box("minf",wh).box("stbl",wh).X("stsd",yh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};YF.prototype.setSequenceMode=function(){};YF.prototype.setManifestType=function(){};
YF.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new rh).box("moof",wh).box("traf",wh).X("tfdt",function(B){g=!0;c=Mi(B.reader,B.version).baseMediaDecodeTime}).X("tfhd",function(B){l=Li(B.reader,B.flags).le}).X("trun",function(B){h=!0;d=Oi(B.reader,B.version,B.flags).Yh}).box("mdat",Bh(function(B){k=!0;e=B},!1)).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new oh(e,0),n=t(d),q=n.next();!q.done;q=
n.next()){q=q.value;var r=q.Zh||l,u=q.cg?c+q.cg:a;a=u+(r||0);var v=0;do{var w=m.$();v+=w;var z=m.$(),y=null;vh(z)=="vttc"?w>8&&(y=m.ac(w-8,!1)):m.skip(w-8);r&&y&&(w=ZF(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Gf)};function ZF(a,b,c){var d,e,f;(new rh).box("payl",Bh(function(g){d=Vb(g)},!1)).box("iden",Bh(function(g){e=Vb(g)},!1)).box("sttg",Bh(function(g){f=Vb(g)},!1)).parse(a);return d?$F(d,e,f,b,c):null}
function $F(a,b,c,d,e){a=new re(d,e,a);De(a);b&&(a.id=b);if(c)for(b=new xd(c),c=Ad(b);c;)WF(a,c,[]),yd(b),c=Ad(b);return a}S("shaka.text.Mp4VttParser",YF);YF.prototype.parseMedia=YF.prototype.parseMedia;YF.prototype.setManifestType=YF.prototype.setManifestType;YF.prototype.setSequenceMode=YF.prototype.setSequenceMode;YF.prototype.parseInit=YF.prototype.parseInit;qf('application/mp4; codecs="wvtt"',function(){return new YF});function aG(){}aG.prototype.parseInit=function(){};aG.prototype.setSequenceMode=function(){};aG.prototype.setManifestType=function(){};aG.prototype.parseMedia=function(a){var b=Vb(a).replace(/\r+/g,"");b=b.trim();a=[];if(b=="")return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new xd(c[0]),e=Bd(d),f=zd(d,/,/g);d=Bd(d);if(e==null||f==null||d==null)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new re(e,d,c.slice(1).join("\n").trim()))}return a};
S("shaka.text.SbvTextParser",aG);aG.prototype.parseMedia=aG.prototype.parseMedia;aG.prototype.setManifestType=aG.prototype.setManifestType;aG.prototype.setSequenceMode=aG.prototype.setSequenceMode;aG.prototype.parseInit=aG.prototype.parseInit;qf("text/x-subviewer",function(){return new aG});function bG(){this.g=new VF}bG.prototype.parseInit=function(){};bG.prototype.setSequenceMode=function(){};bG.prototype.setManifestType=function(){};bG.prototype.parseMedia=function(a,b,c){a=Vb(a);a=cG(a);a=Jb(Zb(a));return this.g.parseMedia(a,b,c,[])};
function cG(a){var b="WEBVTT\n\n";if(a=="")return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",bG);bG.srt2webvtt=cG;bG.prototype.parseMedia=bG.prototype.parseMedia;
bG.prototype.setManifestType=bG.prototype.setManifestType;bG.prototype.setSequenceMode=bG.prototype.setSequenceMode;bG.prototype.parseInit=bG.prototype.parseInit;qf("text/srt",function(){return new bG});function dG(){}dG.prototype.parseInit=function(){};dG.prototype.setSequenceMode=function(){};dG.prototype.setManifestType=function(){};
dG.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Vb(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=eG.exec(f))d=f[1],e=f[2];d=="V4 Styles"||d=="V4+ Styles"?(b=e,b=c?b+("\n"+e):e):d=="Events"&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=fG.exec(a)))if(a=f[1].trim(),f=f[2].trim(),a=="Format")e=f.split(gG);else if(a=="Style"){a=f.split(gG);f={};for(var g=0;g<e.length&&
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Sj:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=fG.exec(f)))if(f=g[1].trim(),g=g[2].trim(),f=="Format")b=g.split(gG);else if(f=="Dialogue"){g=g.split(gG);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=hG(f.Start);var k=hG(f.End);g=new re(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Sj=f.Style;(a=d.find(function(l){return function(m){return m.Name==
l.Sj}}(a)))&&iG(g,a);e.push(g)}return e};
function iG(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=jG(c))a.color=c;if(c=b.BackColour)if(c=jG(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=Oe);b.Italic&&(a.fontStyle=Pe);b.Underline&&a.textDecoration.push(Qe);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=ye;a.textAlign="start";break;case 2:a.displayAlign=ye;a.textAlign=te;break;case 3:a.displayAlign=ye;a.textAlign="end";break;case 5:a.displayAlign=
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=te;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=te;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function jG(a){a=parseInt(a.replace("&H",""),16);return a>=0?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
function hG(a){a=kG.exec(a);return(a[1]?parseInt(a[1].replace(":",""),10):0)*3600+parseInt(a[2],10)*60+parseFloat(a[3])}S("shaka.text.SsaTextParser",dG);dG.prototype.parseMedia=dG.prototype.parseMedia;dG.prototype.setManifestType=dG.prototype.setManifestType;dG.prototype.setSequenceMode=dG.prototype.setSequenceMode;dG.prototype.parseInit=dG.prototype.parseInit;var eG=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,fG=/^\s*([^:]+):\s*(.*)/,gG=/\s*,\s*/,kG=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
qf("text/x-ssa",function(){return new dG});function lG(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,a>0)?{ue:c,za:a}:null}function mG(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
function nG(a,b){if(b+1<a.length&&a[b]===255&&(a[b+1]&246)===240){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&a[b]===255&&(a[b+1]&246)===240}return!1}
function oG(a,b){switch(a){case "mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2||b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function pG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=pG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?gd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(nf(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Jb(a),f=dk(e),g=f.length;g<e.length&&!nG(e,g);g++);a=c.endTime*1E3;f=ck(f);f.length&&c&&(f=f.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=f.data);f=mG(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=lG(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));var l=k.ue+k.za;g+l<=e.length&&
h.push({data:e.subarray(g+k.ue,g+l),size:k.za,duration:1024,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Eb:h},stream:b};d=new Ui([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Vi(d),this.g.set(c,b));c=this.i!==b;d=pj(d);this.i=b;this.h++;
return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.AacTransmuxer",pG);pG.prototype.transmux=pG.prototype.transmux;pG.prototype.getOriginalMimeType=pG.prototype.getOriginalMimeType;pG.prototype.convertCodecs=pG.prototype.convertCodecs;pG.prototype.isSupported=pG.prototype.isSupported;pG.prototype.destroy=pG.prototype.destroy;We("audio/aac",function(){return new pG("audio/aac")},bf);function qG(a,b){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return null;var c=a[b+4]>>6;if(c>=3)return null;var d=a[b+4]&63,e=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][d*3+c]*2;if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;f===2?g+=2:(f&1&&f!==1&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Ma:a,za:e}}
function rG(a,b){if(a[b]===11&&a[b+1]===119){var c=0,d=5;b+=d;for(var e,f;d>0;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(c<16)return!0}return!1};function sG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=sG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?gd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?Qb().He()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Jb(a);for(var e=dk(a),f=e.length;f<a.length&&!rG(a,f);f++);var g=c.endTime*1E3;e=ck(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=qG(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ma;k.push({data:a.subarray(f,f+l.za),size:l.za,duration:1536,
Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});f+=l.za}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Gb:[],Ma:h,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Eb:k},stream:b};d=new Ui([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Vi(d),this.g.set(c,b));c=this.i!==b;d=pj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Ac3Transmuxer",sG);
sG.prototype.transmux=sG.prototype.transmux;sG.prototype.getOriginalMimeType=sG.prototype.getOriginalMimeType;sG.prototype.convertCodecs=sG.prototype.convertCodecs;sG.prototype.isSupported=sG.prototype.isSupported;sG.prototype.destroy=sG.prototype.destroy;We("audio/ac3",function(){return new sG("audio/ac3")},bf);function tG(a,b){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return null;var c=new fk(a.subarray(b+2));hk(c,2);hk(c,3);var d=ik(c,11)+1<<1,e=ik(c,2);if(e==3){e=ik(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ik(c,2);var g=ik(c,3),h=ik(c,1);c=ik(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/([1,2,3,6][f]*16));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Ma:a,za:d}};function uG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=uG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?gd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Jb(a);for(var e=dk(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);var g=c.endTime*1E3;e=ck(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=tG(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ma;k.push({data:a.subarray(f,f+l.za),
size:l.za,duration:1536,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});f+=l.za}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Gb:[],Ma:h,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Eb:k},stream:b};d=new Ui([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Vi(d),this.g.set(c,b));c=this.i!==b;d=pj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};
S("shaka.transmuxer.Ec3Transmuxer",uG);uG.prototype.transmux=uG.prototype.transmux;uG.prototype.getOriginalMimeType=uG.prototype.getOriginalMimeType;uG.prototype.convertCodecs=uG.prototype.convertCodecs;uG.prototype.isSupported=uG.prototype.isSupported;uG.prototype.destroy=uG.prototype.destroy;We("audio/ec3",function(){return new uG("audio/ec3")},bf);function vG(a){if(!a.length)return null;var b=a.find(function(v){return v.type==7});a=a.find(function(v){return v.type==8});if(!b||!a)return null;var c=new fk(b.data),d=ok(c);ok(c);ok(c);kk(c);if(wG.includes(d)&&(d=lk(c),d===3&&hk(c,1),kk(c),kk(c),hk(c,1),nk(c))){d=d!==3?8:12;for(var e=0;e<d;e++)nk(c)&&(e<6?pk(c,16):pk(c,64))}kk(c);d=lk(c);if(d===0)lk(c);else if(d===1)for(hk(c,1),kk(c),kk(c),d=lk(c),e=0;e<d;e++)kk(c);kk(c);hk(c,1);var f=lk(c),g=lk(c),h=ik(c,1);h===0&&hk(c,1);hk(c,1);var k=0,l=0,m=
0,n=0;nk(c)&&(k=lk(c),l=lk(c),m=lk(c),n=lk(c));e=d=1;if(nk(c)&&nk(c)){var q=ok(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];q>0&&q<=16?(d=r[q-1],e=u[q-1]):q===255&&(d=ik(c,16),e=ik(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,
k[3],k[4],k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ya:a,eb:d,gb:e}}
function xG(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=t(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var z=w.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;u.push(y);u.push(w.fullData)}e.data=lc.apply(cc,x(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);for(var m=
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var q=!1;n=!0;var r=m.data;l&&r.length>4&&(r=qk(new fk(r)),r===2||r===4||r===7||r===9)&&(q=!0);q&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=q;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
return d}var wG=[100,110,122,244,44,83,86,118,128,138,139,134];function yG(a){if(!a.length)return null;var b=a.find(function(g){return g.type==32}),c=a.find(function(g){return g.type==33}),d=a.find(function(g){return g.type==34});if(!b||!c||!d)return null;var e=zG(b.fullData);a=AG(c.fullData);var f=BG(d.fullData);b=CG(b.fullData,c.fullData,d.fullData,{Lh:e.Lh,pi:e.pi,kh:a.kh,mh:a.mh,eh:a.eh,jh:a.jh,fh:a.fh,gh:a.gh,hh:a.hh,ih:a.ih,Yg:a.Yg,Zg:a.Zg,$g:a.$g,ah:a.ah,bh:a.bh,dh:a.dh,Nf:a.Nf,Ng:a.Ng,Jg:a.Jg,Ig:a.Ig,Nh:f.Nh,Xg:a.Xg,Wg:a.Wg});return{height:a.height,width:a.width,
Ya:b,eb:a.nm,gb:a.lm}}function zG(a){var b=new fk(a,!0);ok(b);ok(b);ik(b,4);ik(b,2);ik(b,6);a=ik(b,3);b=nk(b);return{Lh:a+1,pi:b}}
function AG(a){a=new fk(a,!0);ok(a);ok(a);var b=0,c=0,d=0,e=0;ik(a,4);var f=ik(a,3);nk(a);for(var g=ik(a,2),h=ik(a,1),k=ik(a,5),l=ok(a),m=ok(a),n=ok(a),q=ok(a),r=ok(a),u=ok(a),v=ok(a),w=ok(a),z=ok(a),y=ok(a),B=ok(a),C=[],E=[],D=0;D<f;D++)C.push(nk(a)),E.push(nk(a));if(f>0)for(D=f;D<8;D++)ik(a,2);for(D=0;D<f;D++)C[D]&&ik(a,88),E[D]&&ok(a);lk(a);C=lk(a);C==3&&ik(a,1);E=lk(a);D=lk(a);nk(a)&&(b+=lk(a),c+=lk(a),d+=lk(a),e+=lk(a));var A=lk(a),F=lk(a),J=lk(a);if(nk(a))for(var H=0;H<=f;H++)lk(a),lk(a),lk(a);
else lk(a),lk(a),lk(a);lk(a);lk(a);lk(a);lk(a);lk(a);lk(a);if(nk(a)&&nk(a))for(H=0;H<4;H++)for(var K=0;K<(H===3?2:6);K++)if(nk(a)){var L=Math.min(64,1<<4+(H<<1));H>1&&mk(a);for(var O=0;O<L;O++)mk(a)}else lk(a);nk(a);nk(a);nk(a)&&(ok(a),lk(a),lk(a),nk(a));H=lk(a);for(L=K=0;L<H;L++)if(O=!1,L!==0&&(O=nk(a)),O){L===H&&lk(a);nk(a);lk(a);for(var Q=O=0;Q<=K;Q++){var N=nk(a),M=!1;N||(M=nk(a));(N||M)&&O++}K=O}else{Q=lk(a);O=lk(a);K=Q+O;for(N=0;N<Q;N++)lk(a),nk(a);for(Q=0;Q<O;Q++)lk(a),nk(a)}if(nk(a))for(H=
lk(a),K=0;K<H;K++){for(L=0;L<J+4;L++)ik(a,1);ik(a,1)}H=J=1;K=!0;L=1;Q=O=0;nk(a);nk(a);if(nk(a)){if(nk(a)){N=ok(a);M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var R=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];N>0&&N<=16?(J=M[N-1],H=R[N-1]):N===255&&(J=ik(a,16),H=ik(a,16))}nk(a)&&nk(a);nk(a)&&(ik(a,3),nk(a),nk(a)&&(ok(a),ok(a),ok(a)));nk(a)&&(lk(a),lk(a));nk(a);nk(a);nk(a);if(N=nk(a))kk(a),kk(a),kk(a),kk(a);if(nk(a)&&(L=ik(a,32),O=ik(a,32),nk(a)&&lk(a),nk(a))){R=!1;N=nk(a);M=nk(a);if(N||M){if(R=
nk(a))ok(a),ik(a,5),nk(a),ik(a,5);ik(a,4);ik(a,4);R&&ik(a,4);ik(a,5);ik(a,5);ik(a,5)}for(var V=0;V<=f;V++){K=nk(a);var xa=!0,ba=1;K||(xa=nk(a));var Oa=!1;xa?lk(a):Oa=nk(a);Oa||(ba=lk(a)+1);if(N){for(xa=0;xa<ba;xa++)lk(a),lk(a),R&&(lk(a),lk(a));nk(a)}if(M){for(xa=0;xa<ba;xa++)lk(a),lk(a),R&&(lk(a),lk(a));nk(a)}}}nk(a)&&(nk(a),nk(a),nk(a),Q=lk(a),lk(a),lk(a),lk(a),lk(a))}return{eh:B,kh:g,mh:h,jh:k,fh:l,gh:m,hh:n,ih:q,Yg:r,Zg:u,$g:v,ah:w,bh:z,dh:y,Nf:Q,Ng:C,Jg:A,Ig:F,width:E-(b+c)*(C===1||C===2?2:1),
height:D-(d+e)*(C===1?2:1),nm:J,lm:H,Xg:O/L,Wg:K}}function BG(a){var b=new fk(a,!0);ok(b);ok(b);lk(b);lk(b);nk(b);nk(b);ik(b,3);nk(b);nk(b);lk(b);lk(b);mk(b);nk(b);nk(b);nk(b)&&lk(b);mk(b);mk(b);nk(b);nk(b);nk(b);nk(b);a=nk(b);b=nk(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Nh:c}}
function CG(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.kh&3)<<6|(d.mh?1:0)<<5|d.jh&31;e[2]=d.fh;e[3]=d.gh;e[4]=d.hh;e[5]=d.ih;e[6]=d.Yg;e[7]=d.Zg;e[8]=d.$g;e[9]=d.ah;e[10]=d.bh;e[11]=d.dh;e[12]=d.eh;e[13]=240|(d.Nf&3840)>>8;e[14]=d.Nf&255;e[15]=252|d.Nh&3;e[16]=252|d.Ng&3;e[17]=248|d.Jg&7;e[18]=248|d.Ig&7;e[19]=0;e[20]=parseInt(d.Xg,10);e[21]=((d.Wg?1:0)&3)<<6|(d.Lh&7)<<3|(d.pi?1:0)<<2|3;e[22]=3;a=[a,b,c];b=23;c=a.length-1;for(d=0;d<a.length;d+=
1)e.set(new Uint8Array([32+d|(d===c?128:0),0,1]),b),b+=3,e.set(new Uint8Array([a[d].byteLength>>8,a[d].byteLength&255]),b),b+=2,e.set(a[d],b),b+=a[d].byteLength;return e};function DG(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(c!==1&&e!==0&&e!==15&&f!==3){var g=a[b+3]>>6;e=EG[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=FG[(c===3?0:c===2?1:2)*3+f];c=GG[c][d];var h=HG[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&l<=87&&d===2&&e>=224E3&&g===0&&(a[b+3]|=128);return{sampleRate:f,channelCount:g===3?1:2,za:k,jm:c*8*h}}return null}
function IG(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function JG(a,b){if(b+1<a.length&&IG(a,b)){var c=DG(a,b),d=4;c&&c.za&&(d=c.za);b+=d;return b===a.length||b+1<a.length&&IG(a,b)}return!1}
var EG=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],FG=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],GG=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],HG=[0,1,1,4];function KG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=KG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?gd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Jb(a),f=dk(e).length;f<e.length&&!JG(e,f);f++);var g;for(a=[];f<e.length;){var h=DG(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));g||(g=h);f+h.za<=e.length&&a.push({data:e.subarray(f,f+h.za),size:h.za,duration:1152,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});f+=h.za}if(!g)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));e=g.jm*9E4/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:g.sampleRate,
duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,Eb:a},stream:b};d=new Ui([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Vi(d),this.g.set(c,b));c=this.i!==b;d=pj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Mp3Transmuxer",KG);KG.prototype.transmux=KG.prototype.transmux;KG.prototype.getOriginalMimeType=KG.prototype.getOriginalMimeType;KG.prototype.convertCodecs=KG.prototype.convertCodecs;
KG.prototype.isSupported=KG.prototype.isSupported;KG.prototype.destroy=KG.prototype.destroy;We("audio/mpeg",function(){return new KG("audio/mpeg")},bf);function LG(a){this.h=a;this.g=null}p=LG.prototype;p.destroy=function(){};p.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=nf(a).split(","),c=qc("audio",b);b=qc("video",b);return!c||b||jf(c)!="mp3"?!1:gd(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new rk;this.g.gg(c.i);a=Jb(a);a=this.g.parse(a);if(a.oe().audio!="mp3"||e!="audio")return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));c=new Uint8Array([]);e=t(a.Bb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=DG(a,b))?(b+d.za<=a.length&&(c=lc(c,a.subarray(b,b+d.za))),b+=d.za):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",LG);LG.prototype.transmux=LG.prototype.transmux;
LG.prototype.getOriginalMimeType=LG.prototype.getOriginalMimeType;LG.prototype.convertCodecs=LG.prototype.convertCodecs;LG.prototype.isSupported=LG.prototype.isSupported;LG.prototype.destroy=LG.prototype.destroy;We("video/mp2t",function(){return new LG("video/mp2t")},af);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function MG(a){this.h=a;(this.g=jy.get("ISOBoxer")())&&NG(this)}
function NG(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;d<16;d++)this.usertype[d]!==OG[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=MG.prototype;p.destroy=function(){};
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return gd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return gd(b)||gd(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c){if(!c)return Promise.resolve(Jb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.S()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");g===null&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(n!==null){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(q===null){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");v!==null&&(v.offset[0]=PG(u,"traf")+PG(h,"senc")+16);var w=Jb(e.write());return Promise.resolve(w)}catch(z){return z instanceof U?Promise.reject(z):Promise.reject(new U(2,3,3022,c?c.S()[0]:null))}};function PG(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",MG);MG.prototype.transmux=MG.prototype.transmux;
MG.prototype.getOriginalMimeType=MG.prototype.getOriginalMimeType;MG.prototype.convertCodecs=MG.prototype.convertCodecs;MG.prototype.isSupported=MG.prototype.isSupported;MG.prototype.destroy=MG.prototype.destroy;var OG=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);We("mss/audio/mp4",function(){return new MG("mss/audio/mp4")},bf);We("mss/video/mp4",function(){return new MG("mss/video/mp4")},bf);function QG(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=QG.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
p.isSupported=function(a,b){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=nf(c).split(",");c=qc("audio",d);d=qc("video",d);if(c&&(c=jf(c),!RG.includes(c))||d&&(c=jf(d),!SG.includes(c)))return!1;if(b)return gd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return gd(b)||gd(a)};
p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?(b=nf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Zf(c,"audio/mp4")}).map($f).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
p.transmux=function(a,b,c,d,e){var f=Jb(a);if(e=="audio"&&!zk(f)){for(var g=dk(f),h=g.length;h<f.length;h++)if(JG(f,h))return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(nG(f,h))return this.i||(this.i=new pG("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.S()[0]:null))}this.h?this.h.clearData():this.h=new rk;this.h.gg(c.i);var k=this.h.parse(f),l=[],m=k.oe();try{var n=null;if(e=="video"){switch(m.video){case "avc":var q=[],r=null,
u=k.Jd(),v=xG(u);if(!v.length)throw new U(2,3,3023,c?c.S()[0]:null);for(var w=0;w<v.length;w++){var z=v[w];r==null&&(r=z.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(z.dts||0):v.length>1?(z.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;q.push({data:z.data,size:z.data.byteLength,duration:y,Ab:Math.round((z.pts||0)-(z.dts||0)),flags:{Cb:0,ub:0,sb:0,qb:0,rb:z.isKeyframe?2:1,Db:z.isKeyframe?0:1}})}for(var B=[],C=t(u),E=C.next();!E.done;E=C.next())B.push.apply(B,x(E.value.nalus));var D=vG(B);
if(!D||r==null)throw new U(2,3,3018,c?c.S()[0]:null);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:D.Ya,eb:D.eb,gb:D.gb,data:{sequenceNumber:this.g,baseMediaDecodeTime:r,Eb:q},stream:b};break;case "hvc":var A=[],F=null,J=[],H=k.Jd();if(!H.length)throw new U(2,3,3023,c?c.S()[0]:null);for(var K=0;K<H.length;K++){var L=H[K],O=L.nalus;J.push.apply(J,x(O));for(var Q=!1,N=[],M=!1,
R=t(O),V=R.next();!V.done;V=R.next()){var xa=V.value;switch(xa.type){case 1:case 0:var ba=M=!0;break;case 19:case 20:case 21:Q=ba=M=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:M=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(M&&ba){var Oa=xa.fullData.byteLength,Ha=new Uint8Array(4);Ha[0]=Oa>>24&255;Ha[1]=Oa>>16&255;Ha[2]=Oa>>8&255;Ha[3]=Oa&255;N.push(Ha);N.push(xa.fullData)}}var Ia=N.length?{data:lc.apply(cc,x(N)),isKeyframe:Q}:null;if(Ia){F==null&&L.dts!=
null&&(F=L.dts);var Fa=void 0;Fa=K+1<H.length?(H[K+1].dts||0)-(L.dts||0):H.length>1?(L.dts||0)-(H[K-1].dts||0):(c.endTime-c.startTime)*9E4;A.push({data:Ia.data,size:Ia.data.byteLength,duration:Fa,Ab:Math.round((L.pts||0)-(L.dts||0)),flags:{Cb:0,ub:0,sb:0,qb:0,rb:Ia.isKeyframe?2:1,Db:Ia.isKeyframe?0:1}})}}var wa=yG(J);if(!wa||F==null)throw new U(2,3,3018,c?c.S()[0]:null);b.height=wa.height;b.width=wa.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,
duration:d,Gb:[],Ma:new Uint8Array([]),Ya:wa.Ya,eb:wa.eb,gb:wa.gb,data:{sequenceNumber:this.g,baseMediaDecodeTime:F,Eb:A},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var Ca=[],Ma,La=null,Ba=null,eb=null,hb=t(k.Bb()),ob=hb.next();!ob.done;ob=hb.next()){var Ta=ob.value,Ec=Ta.data;if(Ec){var ic=0;if(Ba==-1&&eb)Ec=lc(eb,Ta.data),Ba=null;else if(Ba!=null&&eb){ic=Math.max(0,Ba);var Bg=lc(eb,Ec.subarray(0,ic));Ca.push({data:Bg,size:Bg.byteLength,duration:1024,Ab:0,flags:{Cb:0,
ub:0,sb:0,qb:0,rb:2,Db:0}});Ba=eb=null}Ma=mG(Ec,ic);if(!Ma)throw new U(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Ma.sampleRate;b.channelsCount=Ma.channelCount;La==null&&Ta.pts!==null&&(La=Ta.pts);for(;ic<Ec.length;){var rd=lG(Ec,ic);if(!rd){eb=Ec.subarray(ic,Ec.length);Ba=-1;break}var Ke=rd.ue+rd.za;Ba=Math.max(0,ic+Ke-Ec.length);Ba!=0?eb=Ec.subarray(ic+rd.ue,ic+Ke):ic+Ke<=Ec.length&&Ca.push({data:Ec.subarray(ic+rd.ue,ic+Ke),size:rd.za,duration:1024,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});
ic+=Ke}}}if(!Ma||La==null){La=c.startTime*9E4;var Dd=qc("audio",b.codecs.split(","));if(!Dd||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.S()[0]:null);Ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Dd};var Cg=oG(Dd,b.channelsCount);if(!Cg)throw new U(2,3,3018,c?c.S()[0]:null);for(var Mk=La+(c.endTime-c.startTime)*9E4,hi=La;hi<Mk;)Ca.push({data:Cg,size:Cg.byteLength,duration:1024,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),hi+=1024/Ma.sampleRate*9E4}var jd=
Ma.sampleRate,JK=La/9E4*jd;n={id:b.id,type:"audio",codecs:Ma.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:jd,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:JK,Eb:Ca},stream:b};break;case "ac3":for(var gA=[],ul=0,Zp=new Uint8Array([]),vl=null,hA=t(k.Bb()),$p=hA.next();!$p.done;$p=hA.next()){var aq=$p.value,bq=aq.data;vl==null&&aq.pts!==null&&(vl=aq.pts);for(var Jg=0;Jg<bq.length;){var Me=qG(bq,Jg);Me?(b.audioSamplingRate=
Me.sampleRate,b.channelsCount=Me.channelCount,ul=Me.sampleRate,Zp=Me.Ma,gA.push({data:bq.subarray(Jg,Jg+Me.za),size:Me.za,duration:1536,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),Jg+=Me.za):Jg++}}if(ul==0||Zp.byteLength==0||vl==null)throw new U(2,3,3018,c?c.S()[0]:null);var KK=vl/9E4*ul;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:ul,duration:d,Gb:[],Ma:Zp,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:KK,Eb:gA},stream:b};
break;case "ec3":for(var iA=[],wl=0,cq=new Uint8Array([]),xl=null,jA=t(k.Bb()),dq=jA.next();!dq.done;dq=jA.next()){var eq=dq.value,fq=eq.data;xl==null&&eq.pts!==null&&(xl=eq.pts);for(var Kg=0;Kg<fq.length;){var Ne=tG(fq,Kg);Ne?(b.audioSamplingRate=Ne.sampleRate,b.channelsCount=Ne.channelCount,wl=Ne.sampleRate,cq=Ne.Ma,iA.push({data:fq.subarray(Kg,Kg+Ne.za),size:Ne.za,duration:1536,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),Kg+=Ne.za):Kg++}}if(wl==0||cq.byteLength==0||xl==null)throw new U(2,3,3018,
c?c.S()[0]:null);var LK=xl/9E4*wl;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:wl,duration:d,Gb:[],Ma:cq,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:LK,Eb:iA},stream:b};break;case "mp3":for(var kA=[],yl,zl=null,lA=t(k.Bb()),gq=lA.next();!gq.done;gq=lA.next()){var hq=gq.value,ti=hq.data;if(ti){zl==null&&hq.pts!==null&&(zl=hq.pts);for(var xf=0;xf<ti.length;){var Lg=DG(ti,xf);Lg?(yl||(yl=Lg),xf+Lg.za<=ti.length&&kA.push({data:ti.subarray(xf,
xf+Lg.za),size:Lg.za,duration:1152,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),xf+=Lg.za):xf++}}}if(!yl||zl==null)throw new U(2,3,3018,c?c.S()[0]:null);var mA=yl.sampleRate,MK=zl/9E4*mA;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:mA,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:MK,Eb:kA},stream:b};break;case "opus":var nA=[],Al=null,Fd=k.H;if(!Fd)throw new U(2,3,3018,c?c.S()[0]:
null);var kc=[];switch(Fd.nk){case 1:case 2:kc=[0];break;case 0:kc=[255,1,1,0,1];break;case 128:kc=[255,2,0,0,1];break;case 3:kc=[1,2,1,0,2,1];break;case 4:kc=[1,2,2,0,1,2,3];break;case 5:kc=[1,3,2,0,4,1,2,3];break;case 6:kc=[1,4,2,0,4,1,2,3,5];break;case 7:kc=[1,4,2,0,4,1,2,3,5,6];break;case 8:kc=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:kc=[1,1,2,0,1];break;case 131:kc=[1,1,3,0,1,2];break;case 132:kc=[1,1,4,0,1,2,3];break;case 133:kc=[1,1,5,0,1,2,3,4];break;case 134:kc=[1,1,6,0,1,2,3,4,5];break;case 135:kc=
[1,1,7,0,1,2,3,4,5,6];break;case 136:kc=[1,1,8,0,1,2,3,4,5,6,7]}var oA=new Uint8Array([0,Fd.channelCount,0,0,Fd.sampleRate>>>24&255,Fd.sampleRate>>>17&255,Fd.sampleRate>>>8&255,Fd.sampleRate>>>0&255,0,0].concat(x(kc)));for(var pA=Fd.sampleRate,qA=t(k.Bb()),iq=qA.next();!iq.done;iq=qA.next()){var jq=iq.value,Mg=jq.data;Al==null&&jq.pts!==null&&(Al=jq.pts);for(var ui=0;ui<Mg.length;){for(var NK=(Mg[ui+1]&16)!==0,OK=(Mg[ui+1]&8)!==0,le=ui+2,Bl=0;Mg[le]===255;)Bl+=255,le+=1;Bl+=Mg[le];le+=1;le+=NK?2:
0;le+=OK?2:0;var rA=Mg.slice(le,le+Bl);nA.push({data:rA,size:rA.byteLength,duration:960,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});ui=le+Bl}}if(oA.byteLength==0||Al==null)throw new U(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Fd.sampleRate;b.channelsCount=Fd.channelCount;var PK=Al/9E4*pA;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:pA,duration:d,Gb:[],Ma:oA,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:PK,Eb:nA},
stream:b}}n&&(l.push(n),n=null)}}catch(kq){return kq&&kq.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(kq)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));var sA=new Ui(l),lq=b.id+"_"+c.i;if(this.j.has(lq))var vi=this.j.get(lq);else vi=Vi(sA),this.j.set(lq,vi);var QK=this.l!==vi,RK=pj(sA);this.l=vi;this.g++;return Promise.resolve({data:RK,init:QK?vi:null})};S("shaka.transmuxer.TsTransmuxer",QG);QG.prototype.transmux=QG.prototype.transmux;
QG.prototype.getOriginalMimeType=QG.prototype.getOriginalMimeType;QG.prototype.convertCodecs=QG.prototype.convertCodecs;QG.prototype.isSupported=QG.prototype.isSupported;QG.prototype.destroy=QG.prototype.destroy;var RG=["aac","ac-3","ec-3","mp3","opus"],SG=["avc","hevc"];We("video/mp2t",function(){return new QG("video/mp2t")},$e);function TG(){}ma(TG,In);S("shaka.util.FairPlayUtils",TG);function UG(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Tc;this.localization=this.controls.ya;this.player=this.controls.Wb();this.video=this.controls.Uc();this.adManager=this.player.uf();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
UG.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};S("shaka.ui.Element",UG);UG.prototype.release=UG.prototype.release;function VG(a,b){this.parent=a;this.g=Oj("svg");this.h=Oj("path");this.g.classList.add("material-svg-icon");this.g.setAttribute("viewBox","0 -960 960 960");b&&this.use(b);this.g.appendChild(this.h);this.parent&&a.appendChild(this.g)}VG.prototype.use=function(a){a&&typeof a=="string"&&this.h.setAttribute("d",a)};VG.prototype.jl=function(){return this.g};S("shaka.ui.MaterialSVGIcon",VG);VG.prototype.getSvgElement=VG.prototype.jl;VG.prototype.use=VG.prototype.use;function WG(a){return XG(a,"shaka-back-to-overflow-button")}function XG(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function YG(a){a&&(a=XG(a,"shaka-chosen-item"))&&a.parentElement.focus()}function ZG(){var a=(new VG(null,"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z")).g;a.classList.add("shaka-chosen-item");a.ariaHidden="true";return a}
function $G(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}function aH(a,b){var c=Math.floor(a/86400),d=Math.floor(a%86400/3600),e=Math.floor(a/60%60);a=Math.floor(a%60);a<10&&(a="0"+a);a=e+":"+a;b&&(e<10&&(a="0"+a),a=d+":"+a,c>0&&(d<10&&(a="0"+a),a=c+":"+a));return a};function bH(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-ad-info");this.g.disabled=!0;this.parent.appendChild(this.g);this.h=new Df(function(){if(c.ad.isLinear()){var d="",e=c.ad.getSequenceLength();e>1&&(d=c.ad.getPositionInSequence(),d=c.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(d)).replace("[NUM_ADS]",String(e)));var f=Math.round(c.ad.getRemainingTime()),g=c.ad.getDuration();f==-1||g==-1?(c.g.textContent=d,$G(c.g,d!="")):f>0?(f=aH(g-f,!1)+" / "+aH(g,
!1),d=e>1?d+("\u00a0\u00a0"+f):c.localization.resolve("AD_TIME").replace("[AD_TIME]",f),c.g.textContent=d,$G(c.g,d!="")):(c.h.stop(),c.g.textContent="")}});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.h.Ka();c.h.xa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.h.stop();c.g.textContent=""});this.ad&&(this.h.Ka(),this.h.xa(.5))}
ma(bH,UG);bH.prototype.release=function(){this.h.stop();this.h=null;UG.prototype.release.call(this)};S("shaka.ui.AdInfo",bH);function cH(a,b){UG.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.i;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";$G(c.g,!0)}else $G(c.g,
!1)});this.eventManager.o(window,"click",function(){$G(c.g,!1)});this.eventManager.o(this.g,"click",function(){$G(c.g,!1)});dH(this)}ma(cH,UG);cH.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];UG.prototype.release.call(this)};cH.prototype.Ni=function(){$G(this.g,!1)};function eH(a,b){fH.set(a,b)}
function dH(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=fH.get(c);d?a.i.push(d.create(a.g,a.controls)):bb("Unrecognized context menu element:",c)}}S("shaka.ui.ContextMenu",cH);cH.registerElement=eH;cH.prototype.closeMenu=cH.prototype.Ni;var fH=new Map;function gH(a,b){UG.call(this,a,b);var c=this;this.button=Pj();this.parent.appendChild(this.button);this.h=new VG(this.button);this.eventManager.o(this.localization,"locale-updated",function(){hH(c)});this.eventManager.o(this.localization,"locale-changed",function(){hH(c)});this.eventManager.o(this.video,"play",function(){hH(c);c.g()});this.eventManager.o(this.video,"pause",function(){hH(c);c.g()});this.eventManager.o(this.video,"seeking",function(){hH(c);c.g()});this.eventManager.o(this.player,"loaded",
function(){hH(c);c.g()});this.eventManager.o(this.adManager,"ad-paused",function(){hH(c);c.g()});this.eventManager.o(this.adManager,"ad-resumed",function(){hH(c);c.g()});this.eventManager.o(this.adManager,"ad-started",function(){hH(c);c.g()});this.eventManager.o(this.adManager,"ad-stopped",function(){hH(c);c.g()});this.eventManager.o(this.button,"click",function(){c.controls.Da()&&iH(c.controls)});hH(this);this.g()}ma(gH,UG);
gH.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.C.paused&&!a.V;return a};gH.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.player?this.player.isEnded():!0};function hH(a){if(a.isEnded()&&a.video.duration)a.button.ariaLabel=a.localization.resolve("REPLAY");else{var b=a.isPaused()?"PLAY":"PAUSE";a.button.ariaLabel=a.localization.resolve(b)}}
gH.prototype.g=function(){this.isEnded()&&this.video.duration?this.h.use("M480-80q-75 0-140.5-28.5t-114-77q-48.5-48.5-77-114T120-440q0-17 11.5-28.5T160-480q17 0 28.5 11.5T200-440q0 117 81.5 198.5T480-160q117 0 198.5-81.5T760-440q0-117-81.5-198.5T480-720h-6l34 34q12 12 11.5 28T508-630q-12 12-28.5 12.5T451-629L348-732q-12-12-12-28t12-28l103-103q12-12 28.5-11.5T508-890q11 12 11.5 28T508-834l-34 34h6q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-440q0 75-28.5 140.5t-77 114q-48.5 48.5-114 77T480-80Z"):this.h.use(this.isPaused()?
"M320-273v-414q0-17 12-28.5t28-11.5q5 0 10.5 1.5T381-721l326 207q9 6 13.5 15t4.5 19q0 10-4.5 19T707-446L381-239q-5 3-10.5 4.5T360-233q-16 0-28-11.5T320-273Z":"M640-200q-33 0-56.5-23.5T560-280v-400q0-33 23.5-56.5T640-760q33 0 56.5 23.5T720-680v400q0 33-23.5 56.5T640-200Zm-320 0q-33 0-56.5-23.5T240-280v-400q0-33 23.5-56.5T320-760q33 0 56.5 23.5T400-680v400q0 33-23.5 56.5T320-200Z")};S("shaka.ui.PlayButton",gH);function jH(a,b){gH.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation")}ma(jH,gH);jH.prototype.g=function(){this.isEnded()?this.button.setAttribute("icon","replay"):this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};S("shaka.ui.BigPlayButton",jH);function kH(a,b){UG.call(this,a,b);var c=this;this.m=null;this.i=this.D=!1;this.C=this.A=null;this.j=new Df(function(){parseInt(c.h.textContent,10)===0&&lH(c.controls,!0);var d=parseInt(c.h.textContent,10);d!==0&&(c.video.currentTime=c.controls.ph()+d);c.g.style.opacity="0";c.D=!1;c.h.textContent="0s"});this.g=W("div");this.g.classList.add("shaka-no-propagation");this.parent.appendChild(this.g);this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.u=new VG(this.g);this.u.g.classList.add("shaka-forward-rewind-container-icon");
this.l=!1;this.eventManager.o(this.g,"touchstart",function(d){d.touches.length>0&&(c.A=d.touches[0].clientX,c.C=d.touches[0].clientY);c.i=!1});this.eventManager.o(this.g,"touchmove",function(d){if(d.touches.length>0&&c.A!=null&&c.C!=null){var e=d.touches[0].clientX-c.A;d=d.touches[0].clientY-c.C;Math.sqrt(e*e+d*d)>10&&(c.i=!0)}});this.eventManager.o(this.g,"touchend",function(d){if(!c.i)if(c.controls.Lc())d.preventDefault(),c.controls.Vc();else if(c.controls.g.tapSeekDistance>0)if(d.preventDefault(),
d=c.controls.g.tapSeekDistance,!c.D)c.D=!0,c.m=Date.now(),c.j.Y(.5);else if(c.m+500>Date.now()){c.j.stop();c.m=Date.now();var e=parseInt(c.h.textContent,10);e=c.l?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.j.Y(.5)}})}ma(kH,UG);S("shaka.ui.HiddenSeekButton",kH);function mH(a,b){kH.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.u.use("M100-315v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T428-480q0 10-4.5 18.5T410-447L162-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Zm400 0v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T828-480q0 10-4.5 18.5T810-447L562-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z");this.l=!1}ma(mH,kH);S("shaka.ui.HiddenFastForwardButton",mH);function nH(a,b){kH.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.u.use("M798-281 550-447q-9-6-13.5-14.5T532-480q0-10 4.5-18.5T550-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Zm-400 0L150-447q-9-6-13.5-14.5T132-480q0-10 4.5-18.5T150-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z");this.l=!0}ma(nH,kH);S("shaka.ui.HiddenRewindButton",nH);function oH(a,b,c,d){UG.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.i=!1;this.bar=document.createElement("input");this.G=new Df(function(){e.onChangeEnd();e.i=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.bar.disabled=
!this.controls.Da();this.container.appendChild(this.bar);this.parent.appendChild(this.container);this.L=new Df(function(){e.bar.disabled=!1});this.eventManager.o(this.controls,"showingui",function(){e.L.Y(0)});this.eventManager.o(this.controls,"hidingui",function(){e.L.stop();e.bar.disabled=!0});this.eventManager.o(this.bar,"mousedown",function(f){e.bar.disabled||(e.i=!0,e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"touchstart",function(f){e.bar.disabled||(e.i=!0,pH(e,f),
e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.i&&(pH(e,f),e.onChange(),f.stopPropagation())});this.eventManager.o(this.bar,"touchend",function(f){e.i&&(e.i=!1,pH(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,pH(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"mouseup",function(f){e.i&&(e.i=!1,e.onChangeEnd(),
f.stopPropagation())});this.eventManager.o(this.bar,"blur",function(){e.i&&(e.i=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}ma(oH,UG);p=oH.prototype;p.release=function(){this.G&&(this.G.stop(),this.G=null);UG.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};
p.changeTo=function(a){this.i||(this.i=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.G.Y(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.i||(this.bar.value=a)};
function qH(a,b){var c=a.bar.getBoundingClientRect(),d=parseFloat(a.bar.min),e=parseFloat(a.bar.max);a=parseFloat(a.bar.step)||1;var f=c.left+6;c=c.right-6;b=d+(Math.max(f,Math.min(c,b))-f)/(c-f)*(e-d);b=Math.round((b-d)/a)*a+d;return b=Math.min(e,Math.max(d,b))}function pH(a,b){b.preventDefault();a.bar.value=qH(a,b.changedTouches[0].clientX)}S("shaka.ui.RangeElement",oH);oH.prototype.setValue=oH.prototype.setValue;oH.prototype.getValue=oH.prototype.getValue;oH.prototype.changeTo=oH.prototype.changeTo;
oH.prototype.onChangeEnd=oH.prototype.onChangeEnd;oH.prototype.onChange=oH.prototype.onChange;oH.prototype.onChangeStart=oH.prototype.onChangeStart;oH.prototype.setRange=oH.prototype.setRange;function rH(a,b){oH.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=W("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.I=this.controls.g;this.C=new Df(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.D=new Df(function(){sH(c)});this.M=!1;this.h=W("div");this.h.id="shaka-player-ui-thumbnail-container";
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.K=W("div");this.K.id="shaka-player-ui-thumbnail-time-container";this.H=W("div");this.H.id="shaka-player-ui-thumbnail-time";this.K.appendChild(this.H);this.h.appendChild(this.g);this.h.appendChild(this.K);this.container.appendChild(this.h);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.u=null;this.J=!1;this.A=new Df(function(){tH(c)});this.m=[];this.eventManager.o(this.bar,
"input",function(){c.controls.Vc()});this.eventManager.o(this.localization,"locale-updated",function(){return uH(c)});this.eventManager.o(this.localization,"locale-changed",function(){return uH(c)});this.eventManager.o(this.adManager,"ad-started",function(){vH(c)||$G(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){vH(c)&&$G(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.m=d.cuepoints;wH(c)});this.eventManager.o(this.player,"unloading",
function(){c.m=[];wH(c);c.l&&(c.l.abort(),c.l=null);c.u=null;tH(c);xH(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.controls.Lc())xH(c),tH(c);else{var e=qH(c,d.clientX),f=c.bar.getBoundingClientRect();d=Math.max(0,d.clientX-f.left);c.player.qh().length?(xH(c),yH(c,d,e)):(tH(c),zH(c,d,e))}});this.eventManager.o(this.container,"mouseleave",function(){xH(c);c.A.stop();c.A.Y(.25)});this.setValue(this.video.currentTime);this.update();uH(this);this.ad&&$G(this.container,!1)}ma(rH,oH);
p=rH.prototype;p.release=function(){this.C&&(this.C.stop(),this.C=null,this.D.stop(),this.D=null);oH.prototype.release.call(this)};p.onChangeStart=function(){this.M=!this.video.paused;this.controls.gi(!0);this.video.pause();this.A.stop();this.J=!0};
p.onChange=function(){if(this.video.duration)if(this.update(),this.C.Y(.125),this.player.qh().length&&!this.controls.Lc()){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());yH(this,(d-a)/((b-a)/c.width),d)}else tH(this)};p.onChangeEnd=function(){this.C.Ka();this.controls.gi(!1);this.M&&this.video.play();this.J&&(this.J=!1,this.A.stop(),this.A.Y(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
p.update=function(){var a=this.I.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0;c=this.player.wa();var f=c.end-c.start;this.setRange(c.start,c.end);vH(this)?($G(this.container,!0),d=(Math.max(d,c.start)-c.start)/f||0,e=(Math.min(e,c.end)-c.start)/f||0,b=(Math.min(Math.max(b,c.start),c.end)-c.start)/f||0,this.container.style.background="linear-gradient("+["to right",(this.I.showUnbufferedStart?a.base:a.played)+" "+
d*100+"%",a.played+" "+d*100+"%",a.played+" "+b*100+"%",a.buffered+" "+b*100+"%",a.buffered+" "+e*100+"%",a.base+" "+e*100+"%"].join()+")"):$G(this.container,!1)};
function sH(a){if(a.m.length){for(var b=a.player.wa(),c=b.end-b.start,d=["to right"],e=[],f=a.I.seekBarColors.adBreaks,g=!1,h=t(a.m),k=h.next();!k.done;k=h.next())if(k=k.value,k.start==-1&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||typeof k.end=="number"&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,q){return n.start-q.start});b=t(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
c.start*100+"%"),d.push(f+" "+c.start*100+"%"),d.push(f+" "+c.end*100+"%"),d.push("transparent "+c.end*100+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent",a.D.stop()}function wH(a){function b(){sH(a);var c=a.player.wa();c=c.end-c.start;a.player.U()&&c>5&&a.D.xa(.25)}a.player.aa?b():a.eventManager.ua(a.player,"loaded",b)}
function vH(a){var b=a.player.wa();b=b.end-b.start;return a.player.U()&&(b<5||!isFinite(b))?!1:a.ad==null||!a.ad.isLinear()}function uH(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
function zH(a,b,c){var d=a.j.clientWidth;a.j.style.width="auto";a.j.style.height="20px";a.j.style.top="-30px";a.j.style.left=Math.min(a.bar.offsetWidth-d,Math.max(0,b-d/2))+"px";a.j.style.right="";a.j.style.visibility="visible";b=a.player.wa();a.player.U()?(c=b.end-c,c<1?(a.j.textContent=a.localization.resolve("LIVE"),a.j.style.left="",a.j.style.right="0px"):a.j.textContent="-"+aH(c,c>=3600)):(c-=b.start,a.j.textContent=aH(c,c>=3600))}
function yH(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C;P(function(E){switch(E.g){case 1:c<0&&(c=0);d=!1;a.m.length&&(d=a.m.some(function(D){return D.end?c>=D.start&&c<=D.end:!1}));if(d)return tH(a),zH(a,b,c),E.return();e=a.player.wa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));a.player.U()?(g=e.end-c,a.H.textContent=g<1?a.localization.resolve("LIVE"):"-"+aH(g,g>=3600)):a.H.textContent=aH(c,c>=3600);return G(E,a.player.$i(null,f),2);case 2:h=E.h;if(!h||!h.uris||!h.uris.length)return tH(a),
zH(a,b,c),E.return();h.width<h.height?a.h.classList.add("portrait-thumbnail"):a.h.classList.remove("portrait-thumbnail");k=-10;l=a.h.clientWidth;m=Math.floor(l*9/16);a.h.style.height=m+"px";a.h.style.top=-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.h.style.left=n+"px";a.h.style.visibility="visible";q=h.uris[0].split("#xywh=")[0];if(a.u&&q===a.u.uris[0].split("#xywh=")[0]&&h.startByte==a.u.startByte&&h.endByte==a.u.endByte){E.B(3);break}a.u=h;a.l&&(a.l.abort(),a.l=null);if(h.codecs!=
"mjpg"&&!q.startsWith("offline:")){E.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';sa(E,5);r=ih;u=Lm(h.uris,h.startByte,h.endByte,a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Vb().request(r,u,{type:1});return G(E,a.l.promise,7);case 7:v=E.h;a.l=null;h.codecs=="mjpg"?(w=(new rh).box("mdat",Bh(function(D){q=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))},!0)),w.parse(v.data,!1)):(z=h.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),
q=URL.createObjectURL(y));ua(E,4);break;case 5:B=va(E);if(B.code==7001)return E.return();throw B;case 4:try{a.h.removeChild(a.g)}catch(D){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=q;a.g.onload=function(){q.startsWith("blob:")&&URL.revokeObjectURL(q)};a.h.insertBefore(a.g,a.h.firstChild);case 3:C=l/h.width,h.imageHeight?a.g.height=h.imageHeight:h.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),h.imageWidth?a.g.width=h.imageWidth:h.sprite||(a.g.style.width=
"100%",a.g.style.objectFit="contain"),a.g.style.left="-"+C*h.positionX+"px",a.g.style.top="-"+C*h.positionY+"px",a.g.style.transform="scale("+C+")",a.g.style.transformOrigin="left top",m=Math.floor(l*h.height/h.width),a.h.style.height=m+"px",a.h.style.top=-(m-k)+"px",I(E)}})}function tH(a){a.h.style.visibility="hidden"}function xH(a){a.j.style.visibility="hidden"}S("shaka.ui.SeekBar",rH);function AH(){}AH.prototype.create=function(a,b){return new rH(a,b)};rH.Factory=AH;function BH(a,b){UG.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");$G(this.h,!1);this.j.appendChild(this.h);this.g=Pj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;$G(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);CH(this);this.i=new Df(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable());
d>0?c.h.textContent=d:(c.i.stop(),$G(c.h,!1))}else DH(c)});this.eventManager.o(this.localization,"locale-updated",function(){CH(c)});this.eventManager.o(this.localization,"locale-changed",function(){CH(c)});this.eventManager.o(this.adManager,"ad-started",function(){EH(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.isSkippable()?c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),$G(c.h,!1)):DH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){DH(c)});this.eventManager.o(this.g,
"click",function(){c.ad.skip()});this.ad&&EH(this)}ma(BH,UG);BH.prototype.release=function(){this.i.stop();this.i=null;UG.prototype.release.call(this)};function CH(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function EH(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&($G(a.g,!0),$G(a.h,!0),a.h.textContent="",a.i.Ka(),a.i.xa(.5))}function DH(a){a.i.stop();a.g.disabled=!0;$G(a.g,!1);$G(a.h,!1)}S("shaka.ui.SkipAdButton",BH);/*
 @license
 glMatrix: https://github.com/toji/gl-matrix/
 Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
 SPDX-License-Identifier: MIT
*/
function FH(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function GH(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
function HH(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],q=b[9],r=b[10],u=b[11],v=b[12],w=b[13],z=b[14];b=b[15];var y=c[0],B=c[1],C=c[2],E=c[3];a[0]=y*d+B*h+C*n+E*v;a[1]=y*e+B*k+C*q+E*w;a[2]=y*f+B*l+C*r+E*z;a[3]=y*g+B*m+C*u+E*b;y=c[4];B=c[5];C=c[6];E=c[7];a[4]=y*d+B*h+C*n+E*v;a[5]=y*e+B*k+C*q+E*w;a[6]=y*f+B*l+C*r+E*z;a[7]=y*g+B*m+C*u+E*b;y=c[8];B=c[9];C=c[10];E=c[11];a[8]=y*d+B*h+C*n+E*v;a[9]=y*e+B*k+C*q+E*w;a[10]=y*f+B*l+C*r+E*z;a[11]=y*g+B*m+C*u+E*b;y=c[12];B=c[13];
C=c[14];E=c[15];a[12]=y*d+B*h+C*n+E*v;a[13]=y*e+B*k+C*q+E*w;a[14]=y*f+B*l+C*r+E*z;a[15]=y*g+B*m+C*u+E*b}
function IH(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;m>0?(b=Math.sqrt(m+1)*2,a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=Math.sqrt(1+g-h-b)*2,a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=Math.sqrt(1+h-g-b)*2,a[3]=(k-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=Math.sqrt(1+b-g-h)*2,a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function JH(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function KH(){var a=new Float32Array(4);a[3]=1;return a}function LH(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;f>0&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function MH(a){var b=[],c=[],d=[],e=Math.PI;a=(a===void 0?0:a)?e/2:e;for(var f=0;f<=100;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;k<=100;k++){var l=k*2*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;e<100;e++)for(a=0;a<100;a++)f=e*101+a,h=f+100+1,d.push(f,h,f+1),d.push(h,h+1,f+1);return{ek:b,$j:c,indices:d}};function NH(a,b,c,d,e){this.i=a;this.ra=b;this.u=c;this.g=d;this.A=new Tc;this.M=KH();this.h=KH();this.ha=this.oa=this.aa=this.l=null;this.F=FH();this.J=FH();this.O=FH();this.W=FH();this.D=null;this.P=!1;this.K=this.C=null;this.sa=this.ya=0;this.Z=this.R=this.T=this.L=null;this.I=this.H=0;this.j=75;this.V=0;this.m=e;this.G=-1;OH(this)}
NH.prototype.release=function(){this.G!=-1&&(this.i.cancelVideoFrameCallback(this.G),this.G=-1);this.A&&(this.A.release(),this.A=null);this.C&&(this.C.stop(),this.C=null);this.K&&(this.K.stop(),this.K=null)};NH.prototype.$d=function(){(this.P=!this.P)||this.g.viewport(0,0,this.u.width,this.u.height);PH(this,!1)};
function OH(a){QH(a);RH(a);SH(a);TH(a);UH(a);Kl(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&PH(a);if("requestVideoFrameCallback"in a.i){var b=function(){a.G!=-1&&(PH(a),a.G!=-1&&(a.G=a.i.requestVideoFrameCallback(b)))};a.G=a.i.requestVideoFrameCallback(b)}else{var c;a.A.o(a.i,"canplaythrough",function(){PH(a)});a.A.o(a.i,"playing",function(){a.C&&a.C.stop();if(!c){var d=a.ra.Nb();d=t(d);for(var e=d.next();!e.done;e=d.next())(e=e.value.frameRate)&&
(!c||c<e)&&(c=e)}c||(c=60);PH(a);a.C=(new Df(function(){PH(a)})).Ka().xa(1/c)});a.A.o(a.i,"pause",function(){a.C&&a.C.stop();a.C=null;PH(a)});a.A.o(a.i,"seeked",function(){PH(a)});a.A.o(document,"visibilitychange",function(){PH(a)})}})}
function QH(a){var b=a.F,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(Math.abs(f-m)<1E-6&&Math.abs(g-e)<1E-6&&Math.abs(c-n)<1E-6)for(f=0;f<16;f++)b[f]=f%5==0?1:0;else{d=f-m;e=g-e;m=c-n;var q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(q=Math.sqrt(k*k+r*r+u*u))?(q=1/q,k*=q,r*=q,u*=q):u=r=k=0;b[0]=n;b[1]=k;b[2]=
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}IH(a.M,a.F);a=b=a.W;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
function RH(a){VH(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
function SH(a){var b=WH(a,a.g.VERTEX_SHADER),c=WH(a,a.g.FRAGMENT_SHADER);a.l=a.g.createProgram();a.g.attachShader(a.l,b);a.g.attachShader(a.l,c);a.g.linkProgram(a.l);a.m=="cubemap"?(a.T=a.g.getAttribLocation(a.l,"aVertexPosition"),a.R=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.T=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.T),a.R=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.R))}
function WH(a,b){switch(b){case a.g.VERTEX_SHADER:var c=a.m=="cubemap"?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n  gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n  vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
break;case a.g.FRAGMENT_SHADER:c=a.m=="cubemap"?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n  highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n  gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n      (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n      texture2D(uSampler, tc);\n  gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
function TH(a){a.L=a.m=="cubemap"?{ek:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],$j:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}:a.m=="halfequirectangular"?MH(!0):
MH();a.aa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.L.ek),a.g.STATIC_DRAW);a.oa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.oa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.L.$j),a.g.STATIC_DRAW);a.ha=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.L.indices),a.g.STATIC_DRAW)}
function UH(a){a.Z=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.Z);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
function PH(a,b){b=b===void 0?!0:b;var c=a.ra.l==Br;if(!(!a.i||a.i.readyState<2||!c&&a.i.playbackRate==0)){GH(a.J,a.j*Math.PI/180,1.5625);a.m=="cubemap"?GH(a.J,a.j*Math.PI/180,2.5):GH(a.J,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);VH(a);b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.i));if(a.m=="equirectangular"||a.m==
"halfequirectangular")HH(a.O,a.F,a.W),HH(a.O,a.J,a.O);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.vertexAttribPointer(a.T,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.T);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.oa);a.g.vertexAttribPointer(a.R,2,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.R);a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha);a.m=="cubemap"?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.J),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,
a.O)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"u_VPMatrix"),!1,a.O);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.P&&a.g.viewport(0,0,a.u.width/2,a.u.height);a.g.drawElements(a.g.TRIANGLES,a.L.indices.length,a.g.UNSIGNED_SHORT,0);a.P&&(a.g.viewport(a.u.width/2,0,a.u.width/2,a.u.height),a.g.drawElements(a.g.TRIANGLES,a.L.indices.length,a.g.UNSIGNED_SHORT,0))}}
function VH(a){var b=a.i.videoWidth;b||(b=a.u.scrollWidth);var c=a.i.videoHeight;c||(c=a.u.scrollHeight);if(a.ya!==b||a.sa!==c){a.u.width=b;a.u.height=c;a.ya=b;a.sa=c;var d=b/c,e=a.J,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.J=e;a.g.viewport(0,0,b,c)}}
function XH(a,b,c,d){var e=Infinity,f=90*Math.PI/180;a.m=="halfequirectangular"&&(e=90*Math.PI/180,f/=2);var g=a.m=="cubemap"?a.O:a.F;a.H+=b;a.I+=c;if(a.H<e&&a.H>-e){e=Math.sin(b);b=Math.cos(b);var h=g[0],k=g[1],l=g[2],m=g[3],n=g[8],q=g[9],r=g[10],u=g[11];g!==g&&(g[4]=g[4],g[5]=g[5],g[6]=g[6],g[7]=g[7],g[12]=g[12],g[13]=g[13],g[14]=g[14],g[15]=g[15]);g[0]=h*b-n*e;g[1]=k*b-q*e;g[2]=l*b-r*e;g[3]=m*b-u*e;g[8]=h*e+n*b;g[9]=k*e+q*b;g[10]=l*e+r*b;g[11]=m*e+u*b}else a.H-=b;a.I<f&&a.I>-f?(f=FH(),e=FH(),b=
-1*c,c=Math.sin(b),b=Math.cos(b),h=e[4],k=e[5],l=e[6],m=e[7],n=e[8],q=e[9],r=e[10],u=e[11],e!==f&&(f[0]=e[0],f[1]=e[1],f[2]=e[2],f[3]=e[3],f[12]=e[12],f[13]=e[13],f[14]=e[14],f[15]=e[15]),f[4]=h*b+n*c,f[5]=k*b+q*c,f[6]=l*b+r*c,f[7]=m*b+u*c,f[8]=n*b-h*c,f[9]=q*b-k*c,f[10]=r*b-l*c,f[11]=u*b-m*c,HH(g,f,g)):a.I-=c;c=FH();f=FH();e=Math.sin(d);d=Math.cos(d);b=f[0];h=f[1];k=f[2];l=f[3];m=f[4];n=f[5];q=f[6];r=f[7];f!==c&&(c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=
f[15]);c[0]=b*d+m*e;c[1]=h*d+n*e;c[2]=k*d+q*e;c[3]=l*d+r*e;c[4]=m*d-b*e;c[5]=n*d-h*e;c[6]=q*d-k*e;c[7]=r*d-l*e;HH(g,c,g);PH(a,!1)}
function YH(a,b){if(b===void 0||b)IH(a.h,a.F),a.V=0,a.D=KH(),a.D[0]=(a.h[0]-a.M[0])/20,a.D[1]=(a.h[1]-a.M[1])/20,a.D[2]=(a.h[2]-a.M[2])/20,a.D[3]=(a.h[3]-a.M[3])/20;a.h[0]-=a.D[0];a.h[1]-=a.D[1];a.h[2]-=a.D[2];a.h[3]-=a.D[3];b=FH();LH(a.h,a.h);JH(b,a.h);a.F=b;a.K&&(a.K.stop(),a.K=null);a.V<20?a.K=(new Df(function(){YH(a,!1);a.H=0;a.I=0;a.V++;PH(a,!1)})).Y(.025):(JH(b,a.M),a.F=b)};function ZH(a,b,c,d,e){kb.call(this);var f=this;this.i=a;this.l=b;this.G=c;this.K=d;this.A=e;this.u=new Tc;this.h=new Tc;this.C=$H(this.l);this.g=null;this.m=!1;this.J=this.I=this.H=this.F=this.D=0;this.j=null;this.u.o(d,"loading",function(){f.g&&YH(f.g);aI(f)});this.u.o(d,"spatialvideoinfo",function(g){g=g.detail;switch(g.projection){case "rect":f.j=null;break;case "equi":f.j="equirectangular";break;case "hequ":switch(g.hfov){case 360:f.j="equirectangular";break;case 180:f.j="halfequirectangular";
break;default:g.hfov==null?f.j="halfequirectangular":f.j=null}break;case "fish":f.j="halfequirectangular";break;default:f.j=null}aI(f)});this.u.o(d,"nospatialvideoinfo",function(){f.j=null;aI(f)});this.u.o(d,"unloading",function(){f.j=null;aI(f)});aI(this)}ma(ZH,kb);p=ZH.prototype;p.release=function(){this.u&&(this.u.release(),this.u=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);kb.prototype.release.call(this)};p.configure=function(a){this.A=a;aI(this)};
p.Lg=function(){return this.l?!!this.C:!!$H(document.createElement("canvas"))};p.Xb=function(){return!!this.g};p.$d=function(){this.g?this.g.$d():bb("Not playing VR content")};p.Ah=function(a){this.g?XH(this.g,a*bI,0,0):bb("Not playing VR content")};p.xh=function(a){this.g?XH(this.g,0,a*bI,0):bb("Not playing VR content")};p.yh=function(a){this.g?XH(this.g,0,0,a*bI):bb("Not playing VR content")};
function aI(a){if(a.A.displayInVrMode||a.j){a.l||(a.l=document.createElement("canvas"),a.l.classList.add("shaka-vr-canvas-container"),a.G.parentElement.insertBefore(a.l,a.G.nextElementSibling),a.C=$H(a.l));var b=a.j||a.A.defaultVrProjectionMode;a.g?a.g.m!=b&&(a.h.Sa(),a.g.release(),cI(a,b)):(a.l.style.display="",cI(a,b),a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Xb()))))}else!a.A.displayInVrMode&&!a.j&&a.l&&a.g&&(a.l.style.display="none",a.h.Sa(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",
(new Map).set("newStatus",a.Xb()))))}function cI(a,b){a.C&&a.l&&(a.g=new NH(a.G,a.K,a.l,a.C,b),dI(a))}function $H(a){if(!a)return null;var b=Qb().Oa();if(b=="TV"||b=="CONSOLE"||b=="CAST")return null;b=t(["webgl2","webgl"]);for(var c=b.next();!c.done;c=b.next())if(c=a.getContext(c.value))return c;return null}
function dI(a){a.h.o(a.i,"mousedown",function(d){if(!a.m){var e=d.clientX;d=d.clientY;a.m=!0;a.D=e;a.F=d}});navigator.maxTouchPoints>0&&a.h.o(a.i,"touchstart",function(d){if(!a.m){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.m=!0;a.D=e;a.F=d}});a.h.o(a.i,"wheel",function(d){if(!a.m){var e=a.g,f=d.deltaY;f/=50;e.j>=20&&e.j<=100&&(e.j+=f);e.j<20?e.j=20:e.j>100&&(e.j=100);PH(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.m&&eI(a,d.clientX,d.clientY)});navigator.maxTouchPoints>
0&&a.h.o(a.i,"touchmove",function(d){a.m&&eI(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.m=!1});a.h.o(a.i,"mouseup",function(){a.m=!1});navigator.maxTouchPoints>0&&a.h.o(a.i,"touchend",function(){a.m=!1});var b=!1;if(window.DeviceOrientationEvent)if(typeof DeviceMotionEvent.requestPermission=="function"){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){d!=="granted"||b||(b=!0,fI(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Fa(a.i,
"click",c);a.h.Fa(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.Fa(a.i,"touchend",c);d!=="granted"?(a.h.ua(a.i,"click",c),a.h.ua(a.i,"mouseup",c),navigator.maxTouchPoints>0&&a.h.ua(a.i,"touchend",c)):(b=!0,fI(a))}).catch(function(){a.h.Fa(a.i,"click",c);a.h.Fa(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.Fa(a.i,"touchend",c);a.h.ua(a.i,"click",c);a.h.ua(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.ua(a.i,"touchend",c)})}else b=!0,fI(a)}
function fI(a){a.h.o(window,"deviceorientation",function(b){if(a.g){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(Math.abs(c)>10||Math.abs(d)>10||Math.abs(e)>5)d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;b==90||b==-90?XH(a.g,c*bI*-1,e*bI*-1,0):XH(a.g,c*bI*-1,d*bI,0)}})}function eI(a,b,c){var d=-.6*Math.PI/180;XH(a.g,(b-a.D)*d,(c-a.F)*-1*d,0);a.D=b;a.F=c}var bI=Math.PI/180;function Z(a,b,c,d,e){kb.call(this);var f=this;this.aa=!0;this.g=e;this.F=new Yt(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.sa=!0;this.C=this.F.Uc();this.u=c;this.m=this.F.Wb();this.ha=a;this.l=b;this.Ob=d;this.ra=this.m.uf();this.A=this.j=null;this.V=!1;this.K=[];this.fb=[];this.Na=!1;this.L=new Df(function(){f.l.classList.add("no-cursor");f.Na=!1;gI(f)});this.oa=new Df(function(){f.i.removeAttribute("shown");hI(f);iI(f);f.Z&&f.Z.Ni();f.P.Y(f.g.closeMenusDelay)});this.P=
new Df(function(){for(var g=t(f.K),h=g.next();!h.done;h=g.next())$G(h.value,!1);f.g.enableTooltips&&f.G.classList.add("shaka-tooltips-on")});this.Ca=new Df(function(){f.Da()&&jI(f)});this.R=null;this.I=[];this.ya=kI();this.h=new Tc;this.D=null;this.configure(this.g);lI(this);mI(this);this.W=new Set;nI(this);this.Ca.xa(this.g.refreshTickInSeconds);this.h.o(this.ya,"locale-changed",function(g){g=g.locales[0];f.ra.setLocale(g);f.l.setAttribute("lang",g)});this.ra.initInterstitial(this.H,this.ha,this.u);
this.h.o(this.m,"texttrackvisibility",function(){iI(f)});this.h.o(this.m,"unloading",function(){f.j||(f.wb()&&oI(f),f.Md()&&f.cd())})}ma(Z,kb);p=Z.prototype;
p.destroy=function(a){a=a===void 0?!1:a;var b=this;return P(function(c){switch(c.g){case 1:if(document.pictureInPictureElement!=b.u){c.B(2);break}return G(c,document.exitPictureInPicture(),2);case 2:b.h&&(b.h.release(),b.h=null);b.L&&(b.L.stop(),b.L=null);b.oa&&(b.oa.stop(),b.oa=null);b.P&&(b.P.stop(),b.P=null);b.Ca&&(b.Ca.stop(),b.Ca=null);b.D&&(b.D.release(),b.D=null);pI(b);b.i&&(b.l.removeChild(b.i),b.i=null);if(!b.F){c.B(4);break}return G(c,b.F.destroy(a),5);case 5:b.F=null;case 4:b.M&&(b.l.removeChild(b.M),
b.M=null);b.H&&(b.l.removeChild(b.H),b.H=null);b.J&&(b.l.removeChild(b.J),b.J=null);if(!b.ha){c.B(6);break}return G(c,b.ha.destroy(),7);case 7:b.ha=null;case 6:b.m=null,b.u=null,b.C=null,b.ya=null,b.W.clear(),qI(b),kb.prototype.release.call(b),I(c)}})};function pI(a){for(var b=t(a.I),c=b.next();!c.done;c=b.next())c.value.release();a.I=[]}function rI(a,b){sI.set(a,b)}p.jk=function(a){this.sa=a;nI(this)};p.Ll=function(){gI(this)};
p.configure=function(a){var b=this;this.g=a;this.F.Li(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.A&&(this.A=null);this.La&&(this.La=null);this.Z&&(this.Z=null);this.D&&this.D.configure(a);this.i?(Tj(this.i),pI(this)):(tI(this),uI(this),this.D=new ZH(this.i,this.Ob,this.u,this.m,this.g));this.l.classList.add("shaka-video-container");this.u.classList.add("shaka-video");vI(this);this.g.addBigPlayButton&&wI(this);this.g.customContextMenu&&(this.Z=new cH(this.G,this),this.I.push(this.Z));
this.M||xI(this);this.g.seekOnTaps&&(yI(this),zI(this));AI(this);this.K=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.K.push.apply(this.K,x(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));this.fb=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));gI(this);a=t(this.l.getElementsByClassName("shaka-no-propagation"));for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=function(e){return e.stopPropagation()};this.h.o(c,"click",d);
this.h.o(c,"dblclick",d);navigator.maxTouchPoints>0&&this.h.o(c,"touchend",function(e){b.Da()&&e.stopPropagation()})}};p.ci=function(a){(this.aa=a)?(this.l.setAttribute("shaka-controls","true"),this.u.tabIndex=-1,this.u.controls=!1):this.l.removeAttribute("shaka-controls");gI(this)};p.Lj=function(a){this.u.controls=a;this.u.tabIndex=a?0:-1;a&&this.ci(!1)};p.getAd=function(){return this.j};p.Ck=function(){return this.F};p.Uk=function(){return this.ya};p.xl=function(){return this.l};p.Uc=function(){return this.C};
p.Tk=function(){return this.u};p.Wb=function(){return this.m};p.Sk=function(){return this.ha};p.Jk=function(){return this.i};p.il=function(){return this.J};p.Fk=function(){return this.H};p.Gk=function(){return this.g};p.Il=function(){return this.V};p.gi=function(a){(this.V=a)?this.L.stop():this.L.Y(3)};p.Cl=function(){return this.sa};p.ph=function(){return this.A?this.A.getValue():this.C.currentTime};p.Mj=function(a){this.R=a};p.Lc=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
p.Vc=function(){this.P.Ka()};function BI(a){return!document.fullscreenEnabled||a.u.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&Qb().Oa()=="APPLE_VR"?!1:!0}function CI(a){return"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture}p.we=function(){return this.F.Qa()?!1:BI(this)||(!this.j||!this.j.isUsingAnotherMediaElement())&&this.u.webkitSupportsFullscreen?!0:!1};
p.wb=function(){if(BI(this))return!!document.fullscreenElement;var a=this.u;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
function DI(a){var b,c,d;return P(function(e){switch(e.g){case 1:sa(e,2);if(!BI(a)){b=a.u;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!a.Md()){e.B(5);break}return G(e,a.cd(),6);case 6:if(!CI(a)){e.B(5);break}return G(e,new Promise(function(f){(new Df(f)).Y(.05)}),5);case 5:return c=a.g.fullScreenElement,G(e,c.requestFullscreen({navigationUI:"hide"}),9);case 9:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}sa(e,11);return G(e,screen.orientation.lock("landscape"),
13);case 13:ua(e,4,2);break;case 11:va(e,2);case 4:ua(e,0);break;case 2:d=va(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),I(e)}})}function oI(a){var b;return P(function(c){if(!BI(a))return b=a.u,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return G(c,document.exitFullscreen(),0)})}p.og=function(){var a=this;return P(function(b){return a.wb()?G(b,oI(a),0):G(b,DI(a),0)})};
p.Ff=function(){return this.F.Qa()?!1:document.pictureInPictureEnabled||CI(this)?!this.u.disablePictureInPicture:!1};p.Md=function(){return!!(window.documentPictureInPicture&&window.documentPictureInPicture.window||document.pictureInPictureElement)};
p.cd=function(){var a=this,b,c;return P(function(d){switch(d.g){case 1:sa(d,2);if(CI(a)){if(!a.wb()){d.B(10);break}return G(d,oI(a),10)}return document.pictureInPictureElement?G(d,document.exitPictureInPicture(),5):(a.wb()&&oI(a),b=a.u,G(d,b.requestPictureInPicture(),5));case 10:return G(d,EI(a),5);case 5:ua(d,0);break;case 2:c=va(d),a.dispatchEvent(new T("error",(new Map).set("detail",c))),I(d)}})};
function EI(a){var b,c,d,e,f,g;return P(function(h){if(h.g==1){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return G(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;FI(d);e=b.parentNode||document.body;f=a.l.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n      width: 100% !important; max-height: 100%}");
d.document.head.append(g);d.document.body.append(b);a.h.ua(d,"pagehide",function(){f.replaceWith(b)});I(h)})}
function FI(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}
p.Rj=function(){$G(this.T,!0);$G(this.H,!0);$G(this.J,!0);this.j.hasCustomClick()?this.i.setAttribute("ad-active","true"):this.i.removeAttribute("ad-active")};p.aj=function(){$G(this.T,!1);$G(this.H,!1);$G(this.J,!1);this.i.removeAttribute("ad-active")};function iH(a){if(a.aa){if(a.j&&(a.j&&a.j.isPaused()?a.j.play():a.j&&a.j.pause(),a.j.isLinear()))return;a.C.duration&&(a.C.paused&&!a.V?(a.m.isEnded()&&(a.C.currentTime=a.m.wa().start),a.C.play()):a.C.pause())}}
function tI(a){a.i=W("div");a.i.classList.add("shaka-controls-container");a.l.appendChild(a.i);a.l.setAttribute("shaka-controls","true");a.h.o(a.i,"touchend",function(b){a.C.duration&&(a.Da()?(a.R=Date.now(),lH(a,!0)):GI(a,b),b.cancelable&&b.preventDefault())});a.h.o(a.i,"click",function(){lH(a)});a.h.o(a.i,"dblclick",function(){a.g.doubleClickForFullscreen&&a.we()&&a.og()})}
function wI(a){var b=W("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.La=new jH(b,a);a.I.push(a.La)}function vI(a){var b=W("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function HI(a){a.T=W("div");a.T.classList.add("shaka-ad-controls");var b=a.j!=null&&a.j.isLinear();$G(a.T,b);a.O.appendChild(a.T);b=new BH(a.T,a);a.I.push(b)}
function xI(a){a.M=W("div");a.M.classList.add("shaka-spinner-container");a.l.appendChild(a.M);var b=W("div");b.classList.add("shaka-spinner");a.M.appendChild(b);b.insertAdjacentHTML("beforeend",'<svg focusable="false" stroke="currentColor"\n         viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"\n         width="50px" height="50px" class="q-spinner text-grey-9">\n      <g transform="translate(1 1)" stroke-width="6" fill="none"\n        fill-rule="evenodd">\n        <circle stroke-opacity=".5" cx="18" cy="18" r="16"></circle>\n        <path d="M34 18c0-9.94-8.06-16-16-16">\n          <animateTransform attributeName="transform" type="rotate"\n            from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite">\n          </animateTransform>\n        </path>\n      </g>\n    </svg>')}
function yI(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.i.appendChild(b);a.ib=new mH(b,a);a.I.push(a.ib)}function zI(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.i.appendChild(b);a.jb=new nH(b,a);a.I.push(a.jb)}
function AI(a){a.O=W("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.o(a.O,"click",function(e){e.target.closest(".shaka-overflow-button")||a.Vc()});HI(a);II(a);a.G=W("div");a.G.classList.add("shaka-controls-button-panel");a.G.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.G.classList.add("shaka-tooltips-on");a.O.appendChild(a.G);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())if(c=c.value,
sI.get(c)){var d=sI.get(c).create(a.G,a);a.I.push(d);c=="time_and_duration"&&(c=new bH(a.G,a),a.I.push(c))}else bb("Unrecognized control panel element requested:",c)}function II(a){if(a.g.addSeekBar)a.A=JI.create(a.O,a),a.I.push(a.A);else{for(var b=t(a.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a=a.G;a.classList.contains("shaka-tooltips-on")&&a.classList.add("shaka-tooltips-low-position")}}
function uI(a){a.H=W("div");a.H.classList.add("shaka-client-side-ad-container");$G(a.H,!1);a.h.o(a.H,"click",function(){lH(a)});a.l.appendChild(a.H);a.J=W("div");a.J.classList.add("shaka-server-side-ad-container");$G(a.J,!1);a.h.o(a.J,"click",function(){lH(a)});a.l.appendChild(a.J)}
function lI(a){a.h.o(a.m,"buffering",function(){KI(a)});KI(a);a.h.o(window,"keydown",function(b){LI(a,b)});a.h.o(window,"click",function(){return a.Vc()});a.h.o(a,"submenuopen",function(){a.Vc()});a.h.o(a.C,"play",function(){gI(a)});a.h.o(a.C,"pause",function(){gI(a)});a.h.o(a.l,"mousemove",function(b){GI(a,b)});a.h.o(a.l,"touchmove",function(b){GI(a,b)},{passive:!0});a.h.o(a.l,"touchend",function(b){GI(a,b)},{passive:!0});a.h.o(a.l,"mouseleave",function(){a.R||a.L.Ka()});a.h.o(a.l,"wheel",function(b){GI(a,
b)},{passive:!0});a.h.o(a.F,"caststatuschanged",function(){nI(a)});a.h.o(a.D,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.h.o(a.l,"keydown",function(b){a.g.enableKeyboardPlaybackControlsInWindow||a.wb()||MI(a,b)});a.h.o(a.l,"keyup",function(b){a.g.enableKeyboardPlaybackControlsInWindow||a.wb()||a.W.delete(b.key)});a.h.o(window,"keydown",function(b){(a.g.enableKeyboardPlaybackControlsInWindow||a.wb())&&MI(a,b)});a.h.o(window,"keyup",function(b){(a.g.enableKeyboardPlaybackControlsInWindow||
a.wb())&&a.W.delete(b.key)});a.h.o(a.ra,"ad-started",function(b){a.j=b.ad;a.Rj();KI(a)});a.h.o(a.ra,"ad-stopped",function(){a.j=null;a.aj();KI(a)});screen.orientation&&a.h.o(screen.orientation,"change",function(){return P(function(b){return G(b,NI(a),0)})})}
function mI(a){if(a.g.setupMediaSession&&navigator.mediaSession){var b=function(f,g){try{navigator.mediaSession.setActionHandler(f,function(h){g(h)})}catch(h){}},c=function(){if(a.j&&a.j.isLinear())d();else{var f=a.m.wa(),g=f.end-f.start;f=parseFloat((a.C.currentTime-f.start).toFixed(2));a.m.U()&&Math.abs(g-f)<1&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.C.playbackRate,position:Math.max(0,f)})}catch(h){}}},d=function(){try{navigator.mediaSession.setPositionState()}catch(f){}},
e=function(f){var g=a.g.keyboardSeekDistance;switch(f.action){case "pause":iH(a);break;case "play":iH(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||OI(a,a.A.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||OI(a,a.A.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.j&&a.j.isLinear()||OI(a,a.m.wa().start+f.seekTime);break;case "stop":a.m.tc();
break;case "enterpictureinpicture":a.j&&a.j.isLinear()||a.cd()}};b("pause",e);b("play",e);b("seekbackward",e);b("seekforward",e);b("seekto",e);b("stop",e);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",e);b=function(){a.m.U()||a.m.wa().start!=0?(c(),a.h.o(a.C,"timeupdate",c)):d()};a.m.aa&&b();a.h.o(a.m,"loaded",b);a.h.o(a.m,"unloading",function(){a.h.Fa(a.C,"timeupdate",c)});a.h.o(a.m,"metadata",function(f){if(f=f.payload){var g;f.key=="TIT2"&&f.data&&
(g=f.data);var h;f.key=="APIC"&&f.mimeType=="--\x3e"&&(h=f.data);g&&(f={title:g,artwork:[]},navigator.mediaSession.metadata&&(f=navigator.mediaSession.metadata,f.title=g),navigator.mediaSession.metadata=new MediaMetadata(f));h&&(g=a.u,h!=g.poster&&(g.poster=h),g={title:"",artwork:[{src:h}]},navigator.mediaSession.metadata&&(g=navigator.mediaSession.metadata,g.artwork=[{src:h}]),navigator.mediaSession.metadata=new MediaMetadata(g))}})}}
function qI(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}}
function NI(a){return P(function(b){return a.C&&a.C.readyState!=0&&!a.F.Qa()&&a.g.enableFullscreenOnRotation&&a.we()?screen.orientation.type.includes("landscape")&&!a.wb()?G(b,DI(a),0):screen.orientation.type.includes("portrait")&&a.wb()?G(b,oI(a),0):b.B(0):b.return()})}
function GI(a,b){b.type=="mousemove"&&(a.i.classList.remove("shaka-keyboard-navigation"),gI(a));b.type=="touchstart"||b.type=="touchmove"||b.type=="touchend"||b.type=="keyup"?a.R=Date.now():a.R+1E3<Date.now()&&(a.R=null);a.R&&b.type=="mousemove"||(a.l.classList.remove("no-cursor"),a.Na=!0,a.P.stop(),a.Da()||(jI(a),gI(a)),a.L.stop(),b.type!="touchend"&&b.type!="wheel"&&b.type!="keyup"&&a.R||a.L.Y(3))}
function PI(a){return window.matchMedia("hover: hover").matches?a.fb.some(function(b){return b.matches(":hover")}):!1}function iI(a){var b=a.l.getElementsByClassName("shaka-text-container")[0];b&&(a.Da()?b.style.bottom=a.O.clientHeight+"px":b.style.bottom="0px")}
function gI(a){var b=a.j?a.j.isPaused():!1,c=a.C.paused&&!a.V,d=a.i.classList.contains("shaka-keyboard-navigation");b||(!a.j||!a.j.isLinear())&&c||a.Na||d||PI(a)?(jI(a),a.i.getAttribute("shown")==null&&(a.i.setAttribute("shown","true"),hI(a)),iI(a),a.oa.stop()):a.oa.Y(a.g.fadeDelay);a.Lc()&&a.G.classList.remove("shaka-tooltips-on")}function lH(a,b){b=b===void 0?!1:b;a.aa&&!a.Xb()&&(a.Lc()?a.P.Ka():a.g.singleClickForPlayAndPause?iH(a):b&&a.Da()&&a.bj())}
function nI(a){var b=a.F.Qa();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.getAttribute("casting")==null&&(a.i.setAttribute("casting","true"),hI(a)):a.i.getAttribute("casting")!=null&&(a.i.removeAttribute("casting"),hI(a))}
function MI(a,b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar"),f=a.wb();c=a.i.contains(c);f=f||a.g.enableKeyboardPlaybackControlsInWindow;c&&GI(a,b);if(a.g.enableKeyboardPlaybackControls&&a.m.hd()){var g=a.g.keyboardSeekDistance,h=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.A&&g>0&&(e||f)&&!d&&(b.preventDefault(),OI(a,a.A.getValue()-g));break;case "ArrowRight":a.A&&g>0&&(e||f)&&
!d&&(b.preventDefault(),OI(a,a.A.getValue()+g));break;case "PageDown":a.A&&h>0&&(e||f)&&(b.preventDefault(),OI(a,a.A.getValue()-h));break;case "PageUp":a.A&&h>0&&(e||f)&&(b.preventDefault(),OI(a,a.A.getValue()+h));break;case "Home":a.A&&OI(a,a.m.wa().start);break;case "End":a.A&&OI(a,a.m.wa().end);break;case "c":a.m.Zd(!a.m.Wc());break;case "f":a.we()&&a.og();break;case "m":a.j&&a.j.isLinear()?a.j.setMuted(!a.j.isMuted()):a.u.muted=!a.u.muted;break;case "p":a.Ff()&&a.cd();break;case ">":b=a.g.playbackRates.indexOf(a.m.Za());
b>-1&&b+1<a.g.playbackRates.length&&a.m.sc(a.g.playbackRates[b+1],!1);break;case "<":b=a.g.playbackRates.indexOf(a.m.Za());b>-1&&b-1>=0&&a.m.sc(a.g.playbackRates[b-1],!1);break;case " ":(e||f&&!c)&&iH(a)}}}function KI(a){a.aa&&(a.j&&a.j.isClientRendering()&&a.j.isLinear()?$G(a.M,!1):$G(a.M,a.m.Df()))}p.Da=function(){return this.aa?this.i.getAttribute("shown")!=null||this.i.getAttribute("casting")!=null:!1};
function hI(a){a.Da()?a.dispatchEvent(new T("showingui")):a.dispatchEvent(new T("hidingui"))}function OI(a,b){a.C.currentTime=b;jI(a)}
function jI(a){if(a.A)if(a.A.setValue(a.C.currentTime),a.A.update(),a.A.isShowing()){for(var b=t(a.K),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");b=a.G;b.classList.contains("shaka-tooltips-on")&&b.classList.remove("shaka-tooltips-low-position")}else{b=t(a.K);for(c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");b=a.G;b.classList.contains("shaka-tooltips-on")&&b.classList.add("shaka-tooltips-low-position")}a.dispatchEvent(new T("timeandseekrangeupdated"))}
function LI(a,b){a.W.add(b.key);var c=a.Lc();b.key=="Tab"&&(a.i.classList.add("shaka-keyboard-navigation"),gI(a),a.h.o(window,"mousedown",function(){a.h.Fa(window,"mousedown")}));b.key=="Escape"&&a.P.Ka();c&&a.W.has("Tab")&&QI(a,b)}
function QI(a,b){var c=a.K.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.W.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
p.ym=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});GI(this,a)};p.bj=function(){this.L.Ka()};p.Lg=function(){return this.D.Lg()};p.Xb=function(){return this.D.Xb()};
p.vl=function(){var a=this.D;if(a.g){a=a.g;IH(a.h,a.F);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=Math.acos(Math.cos(a)*Math.cos(g))*180/Math.PI}else bb("Not playing VR content"),a=null;return a};p.ul=function(){var a=this.D;a.g?a=a.g.j:(bb("Not playing VR content"),a=null);return a};
p.wm=function(a){var b=this.D;b.g?(a<0?(bb("Field of view should be greater than 0"),a=0):a>100&&(bb("Field of view should be less than 100"),a=100),b=b.g,b.j=a,PH(b,!1)):bb("Not playing VR content")};p.$d=function(){this.D.$d()};p.Ah=function(a){this.D.Ah(a)};p.xh=function(a){this.D.xh(a)};p.yh=function(a){this.D.yh(a)};
function kI(){var a=new Ic("en");a.Xa("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_STATISTICS","\u0625\u062d\u0635\u0627\u0621\u0627\u062a \u0627\u0644\u0625\u0639\u0644\u0627\u0646\u0627\u062a"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],
["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["CHAPTERS","\u0627\u0644\u0641\u0635\u0648\u0644"],["DOWNLOAD_VIDEO_FRAME","\u062d\u0641\u0638 \u0625\u0637\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648"],["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],
["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],
["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],
["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["PLAYBACK_RATE","\u0633\u0631\u0639\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["QUALITY","\u0627\u0644\u062c\u0648\u062f\u0629"],["RECENTER_VR","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u0633\u064a\u0637"],
["REPLAY","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["RESOLUTION","\u062f\u0631\u062c\u0629 \u0627\u0644\u062f\u0642\u0629"],["REWIND","\u062a\u0631\u062c\u064a\u0639"],["SEEK","\u0627\u0644\u0628\u062d\u062b \u0628\u0627\u0644\u062a\u0645\u0631\u064a\u0631"],["SKIP_AD","\u062a\u062e\u0637\u0651\u064a \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["SKIP_TO_LIVE","\u0627\u0644\u0627\u0646\u062a\u0642\u0627\u0644 \u0625\u0644\u0649 \u0628\u062b \u0645\u0628\u0627\u0634\u0631"],
["STATISTICS","\u0627\u0644\u0625\u062d\u0635\u0627\u0621\u0627\u062a"],["SUBTITLE_FORCED","\u0639\u0631\u0636 \u0625\u062c\u0628\u0627\u0631\u064a"],["SURROUND","\u0635\u0648\u062a \u0645\u062d\u064a\u0637\u064a"],["TOGGLE_STEREOSCOPIC","\u0625\u064a\u0642\u0627\u0641 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0645\u062c\u0633\u0651\u0645 \u0623\u0648 \u062a\u0641\u0639\u064a\u0644\u0647"],["UNDETERMINED_LANGUAGE","\u063a\u064a\u0631 \u0645\u062d\u062f\u062f"],["UNMUTE","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0635\u0648\u062a"],
["UNRECOGNIZED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641"],["VOLUME","\u0645\u0633\u062a\u0648\u0649 \u0627\u0644\u0635\u0648\u062a"]]));a.Xa("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung\u00a0[AD_ON] von\u00a0[NUM_ADS]"],["AD_STATISTICS","Anzeigenstatistiken"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Zur\u00fcck"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["CHAPTERS","Kapitel"],["DOWNLOAD_VIDEO_FRAME",
"Videoframe speichern"],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild im Bild aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild im Bild beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Schleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE",
"Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["QUALITY","Qualit\u00e4t"],["RECENTER_VR","Zentrieren"],["REPLAY","Noch einmal wiedergeben"],["RESOLUTION","Aufl\u00f6sung"],["REWIND","Zur\u00fcckspulen"],["SEEK","Suche"],["SKIP_AD","\u00dcberspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["STATISTICS","Statistiken"],["SUBTITLE_FORCED","Erzwungen"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Einstellung \u201estereoskopisch\u201c ein\u2011/ausschalten"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautst\u00e4rke"]]));a.Xa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS",
"Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE",
"Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recenter"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_NEXT","Next"],["SKIP_PREVIOUS","Previous"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]]));a.Xa("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE",
"Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],
["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recentre"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE",
"Unrecognised"],["VOLUME","volume"]]));a.Xa("es",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas del anuncio"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Enviar..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Reproducir en bucle el v\u00eddeo actual"],
["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el v\u00eddeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar r\u00e1pidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","M\u00e1s ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],
["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_NEXT","Siguiente"],["SKIP_PREVIOUS","Anterior"],["SKIP_TO_LIVE","Ir al v\u00eddeo en directo"],
["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC","Activar/Desactivar estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Xa("es-419",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas de anuncios"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY",
"AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetici\u00f3n indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],
["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","M\u00e1s opciones de configuraci\u00f3n"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR",
"Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisi\u00f3n en vivo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Sonido envolvente"],["TOGGLE_STEREOSCOPIC","Activar o desactivar el modo estereosc\u00f3pico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],
["VOLUME","Volumen"]]));a.Xa("fr",new Map([["AD_DURATION","Dur\u00e9e de l'annonce"],["AD_PROGRESS","Annonce\u00a0[AD_ON] sur\u00a0[NUM_ADS]"],["AD_STATISTICS","Statistiques sur les annonces"],["AD_TIME","Annonce\u00a0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster\u2026"],["CHAPTERS","Chapitres"],["DOWNLOAD_VIDEO_FRAME","T\u00e9l\u00e9charger l'image de la vid\u00e9o"],["ENTER_LOOP_MODE","Lire en boucle la vid\u00e9o en cours"],
["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein \u00e9cran"],["EXIT_LOOP_MODE","Arr\u00eater la lecture en boucle de la vid\u00e9o en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode\u00a0PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein \u00e9cran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","R\u00e9p\u00e9ter"],["MORE_SETTINGS","Plus de param\u00e8tres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],
["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","D\u00e9sactiv\u00e9e"],["ON","Activ\u00e9e"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualit\u00e9"],["RECENTER_VR","Recentrer"],["REPLAY","Revoir"],["RESOLUTION","R\u00e9solution"],["REWIND","Retour arri\u00e8re"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_NEXT","Suivante"],["SKIP_PREVIOUS","Pr\u00e9c\u00e9dente"],["SKIP_TO_LIVE",
"Acc\u00e9der \u00e0 la partie la plus r\u00e9cente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forc\u00e9"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Activer/D\u00e9sactiver le mode st\u00e9r\u00e9oscopique"],["UNDETERMINED_LANGUAGE","Langue ind\u00e9termin\u00e9e"],["UNMUTE","R\u00e9activer le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]]));a.Xa("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_STATISTICS",
"Statistiche sugli annunci"],["AD_TIME","Annuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["CHAPTERS","Capitoli"],["DOWNLOAD_VIDEO_FRAME","Salva fotogramma"],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE",
"Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES","Pi\u00f9 lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocit\u00e0 di riproduzione"],["QUALITY","Qualit\u00e0"],
["RECENTER_VR","Ricentra"],["REPLAY","Riproduci di nuovo"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["STATISTICS","Statistiche"],["SUBTITLE_FORCED","Forzata"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Pulsante di attivazione/disattivazione stereoscopico"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]]));
a.Xa("ja",new Map([["AD_DURATION","\u5e83\u544a\u518d\u751f\u6642\u9593"],["AD_PROGRESS","[AD_ON] \u756a\u76ee\u306e\u5e83\u544a\uff08\u5168 [NUM_ADS] \u500b\uff09"],["AD_STATISTICS","\u5e83\u544a\u306e\u7d71\u8a08\u60c5\u5831"],["AD_TIME","\u5e83\u544a: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u623b\u308b"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u30ad\u30e3\u30b9\u30c8..."],["CHAPTERS","\u7ae0"],["DOWNLOAD_VIDEO_FRAME","\u52d5\u753b\u30d5\u30ec\u30fc\u30e0\u3092\u4fdd\u5b58"],
["ENTER_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u3092\u30eb\u30fc\u30d7\u518d\u751f"],["ENTER_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb"],["EXIT_FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a\u3092\u7d42\u4e86"],["EXIT_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u306e\u30eb\u30fc\u30d7\u518d\u751f\u3092\u505c\u6b62"],["EXIT_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86"],
["FAST_FORWARD","\u65e9\u9001\u308a"],["FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a"],["LANGUAGE","\u8a00\u8a9e"],["LIVE","\u30e9\u30a4\u30d6"],["LOOP","\u30eb\u30fc\u30d7"],["MORE_SETTINGS","\u8a73\u7d30\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u8a00\u8a9e"],["MUTE","\u30df\u30e5\u30fc\u30c8"],["NOT_APPLICABLE","\u8a72\u5f53\u306a\u3057"],["OFF","\u30aa\u30d5"],["ON","\u30aa\u30f3"],["PAUSE","\u4e00\u6642\u505c\u6b62"],["PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],
["PLAY","\u518d\u751f"],["PLAYBACK_RATE","\u518d\u751f\u901f\u5ea6"],["QUALITY","\u54c1\u8cea"],["RECENTER_VR","\u4e2d\u5fc3\u3092\u518d\u8a2d\u5b9a"],["REPLAY","\u3082\u3046\u4e00\u5ea6\u518d\u751f"],["RESOLUTION","\u89e3\u50cf\u5ea6"],["REWIND","\u5dfb\u304d\u623b\u3057"],["SEEK","\u30b7\u30fc\u30af\u518d\u751f"],["SKIP_AD","\u5e83\u544a\u3092\u30b9\u30ad\u30c3\u30d7"],["SKIP_TO_LIVE","\u30e9\u30a4\u30d6\u914d\u4fe1\u307e\u3067\u30b9\u30ad\u30c3\u30d7"],["STATISTICS","\u7d71\u8a08\u60c5\u5831"],
["SUBTITLE_FORCED","\u5f37\u5236"],["SURROUND","\u30b5\u30e9\u30a6\u30f3\u30c9"],["TOGGLE_STEREOSCOPIC","\u7acb\u4f53\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u30df\u30e5\u30fc\u30c8\u3092\u89e3\u9664"],["UNRECOGNIZED_LANGUAGE","\u4e0d\u660e"],["VOLUME","\u97f3\u91cf"]]));a.Xa("ko",new Map([["AD_DURATION","\uad11\uace0 \uae30\uac04"],["AD_PROGRESS","\uad11\uace0 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\uad11\uace0 \ud1b5\uacc4"],["AD_TIME",
"\uad11\uace0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\uc790\ub3d9"],["BACK","\ub4a4\ub85c"],["CAPTIONS","\uc790\ub9c9"],["CAST","\uc804\uc1a1..."],["CHAPTERS","\uc7a5"],["DOWNLOAD_VIDEO_FRAME","\ub3d9\uc601\uc0c1 \ud504\ub808\uc784 \uc800\uc7a5"],["ENTER_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd"],["ENTER_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc2dc\uc791"],["EXIT_FULL_SCREEN","\uc804\uccb4\ud654\uba74 \ub2eb\uae30"],["EXIT_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd \uc911\uc9c0"],
["EXIT_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc885\ub8cc"],["FAST_FORWARD","\ube68\ub9ac \uac10\uae30"],["FULL_SCREEN","\uc804\uccb4\ud654\uba74"],["LANGUAGE","\uc5b8\uc5b4"],["LIVE","\uc2e4\uc2dc\uac04"],["LOOP","\ubc18\ubcf5 \uc7ac\uc0dd"],["MORE_SETTINGS","\uc124\uc815 \ub354\ubcf4\uae30"],["MULTIPLE_LANGUAGES","\uc5ec\ub7ec \uc5b8\uc5b4"],["MUTE","\uc74c\uc18c\uac70"],["NOT_APPLICABLE","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["OFF","\uc0ac\uc6a9 \uc548\ud568"],["ON","\uc0ac\uc6a9"],["PAUSE",
"\uc77c\uc2dc\uc911\uc9c0"],["PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc"],["PLAY","\uc7ac\uc0dd"],["PLAYBACK_RATE","\uc7ac\uc0dd \uc18d\ub3c4"],["QUALITY","\ud488\uc9c8"],["RECENTER_VR","\uc911\uc2ec \uc7ac\uc124\uc815"],["REPLAY","\ub2e4\uc2dc\ubcf4\uae30"],["RESOLUTION","\ud574\uc0c1\ub3c4"],["REWIND","\ub418\uac10\uae30"],["SEEK","\ucc3e\uae30"],["SKIP_AD","\uad11\uace0 \uac74\ub108\ub6f0\uae30"],["SKIP_TO_LIVE","\ub77c\uc774\ube0c \ub3d9\uc601\uc0c1\uc73c\ub85c \uac74\ub108\ub6f0\uae30"],["STATISTICS",
"\ud1b5\uacc4"],["SUBTITLE_FORCED","\uac15\uc81c"],["SURROUND","\uc11c\ub77c\uc6b4\ub4dc"],["TOGGLE_STEREOSCOPIC","\uc785\uccb4 \ubcf4\uae30 \uc804\ud658"],["UNDETERMINED_LANGUAGE","\ubbf8\uc815"],["UNMUTE","\uc74c\uc18c\uac70 \ud574\uc81c"],["UNRECOGNIZED_LANGUAGE","\uc54c \uc218 \uc5c6\uc74c"],["VOLUME","\ubcfc\ub968"]]));a.Xa("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_STATISTICS","Advertentiestatistieken"],["AD_TIME","Advertentie: [AD_TIME]"],
["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["CHAPTERS","Hoofdstukken"],["DOWNLOAD_VIDEO_FRAME","Videoframe opslaan"],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN",
"Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Geluid uitzetten"],["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["QUALITY","Kwaliteit"],["RECENTER_VR","Opnieuw centreren"],["REPLAY","Opnieuw afspelen"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],
["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["STATISTICS","Statistieken"],["SUBTITLE_FORCED","Afgedwongen"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Stereoscopisch aan-/uitzetten"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Geluid aanzetten"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]]));a.Xa("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama\u00a0[AD_ON] z\u00a0[NUM_ADS]"],["AD_STATISTICS","Statystyki reklam"],
["AD_TIME","Reklama: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesy\u0142aj..."],["CHAPTERS","Rozdzia\u0142y"],["DOWNLOAD_VIDEO_FRAME","Zapisz klatk\u0119 filmu"],["ENTER_LOOP_MODE","Odtwarzaj bie\u017c\u0105cy film w\u00a0p\u0119tli"],["ENTER_PICTURE_IN_PICTURE","W\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["EXIT_FULL_SCREEN","Zamknij pe\u0142ny ekran"],["EXIT_LOOP_MODE","Wy\u0142\u0105cz odtwarzanie bie\u017c\u0105cego filmu w\u00a0p\u0119tli"],
["EXIT_PICTURE_IN_PICTURE","Wy\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["FAST_FORWARD","Przewi\u0144 do przodu"],["FULL_SCREEN","Pe\u0142ny ekran"],["LANGUAGE","J\u0119zyk"],["LIVE","Na \u017cywo"],["LOOP","Odtwarzaj w\u00a0p\u0119tli"],["MORE_SETTINGS","Wi\u0119cej ustawie\u0144"],["MULTIPLE_LANGUAGES","Wiele j\u0119zyk\u00f3w"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wy\u0142\u0105czone"],["ON","W\u0142\u0105czone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w\u00a0obrazie"],
["PLAY","Odtw\u00f3rz"],["PLAYBACK_RATE","Szybko\u015b\u0107 odtwarzania"],["QUALITY","Jako\u015b\u0107"],["RECENTER_VR","Wy\u015brodkuj"],["REPLAY","Odtw\u00f3rz ponownie"],["RESOLUTION","Rozdzielczo\u015b\u0107"],["REWIND","Przewi\u0144 do ty\u0142u"],["SEEK","Szukaj"],["SKIP_AD","Pomi\u0144 reklam\u0119"],["SKIP_NEXT","Dalej"],["SKIP_PREVIOUS","Poprzedni"],["SKIP_TO_LIVE","Przejd\u017a do transmisji na \u017cywo"],["STATISTICS","Statystyki"],["SUBTITLE_FORCED","Wymuszone"],["SURROUND","Przestrzenny"],
["TOGGLE_STEREOSCOPIC","Prze\u0142\u0105cz tryb stereoskopowy"],["UNDETERMINED_LANGUAGE","Nie okre\u015blono"],["UNMUTE","Wy\u0142\u0105cz wyciszenie"],["UNRECOGNIZED_LANGUAGE","Nierozpoznany"],["VOLUME","G\u0142o\u015bno\u015b\u0107"]]));a.Xa("pt-BR",new Map([["AD_DURATION","Dura\u00e7\u00e3o do an\u00fancio"],["AD_PROGRESS","An\u00fancio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estat\u00edsticas de an\u00fancios"],["AD_TIME","An\u00fancio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tica"],
["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Salvar frame do v\u00eddeo"],["ENTER_LOOP_MODE","Repetir o v\u00eddeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repeti\u00e7\u00e3o do v\u00eddeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avan\u00e7ar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE",
"Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais defini\u00e7\u00f5es"],["MULTIPLE_LANGUAGES","V\u00e1rios idiomas"],["MUTE","Desativar som"],["NOT_APPLICABLE","N\u00e3o relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodu\u00e7\u00e3o"],["QUALITY","Qualidade"],["RECENTER_VR","Centralizar"],["REPLAY","Repetir"],["RESOLUTION","Resolu\u00e7\u00e3o"],["REWIND",
"Voltar"],["SEEK","Procurar"],["SKIP_AD","Pular an\u00fancio"],["SKIP_TO_LIVE","Pular para transmiss\u00e3o ao vivo"],["STATISTICS","Estat\u00edsticas"],["SUBTITLE_FORCED","Exibi\u00e7\u00e3o for\u00e7ada"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Alternar imagem estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","N\u00e3o reconhecido"],["VOLUME","Volume"]]));a.Xa("ru",new Map([["AD_DURATION","\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u044b"],
["AD_PROGRESS","\u0420\u0435\u043a\u043b\u0430\u043c\u0430 [AD_ON] \u0438\u0437 [NUM_ADS]"],["AD_STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439"],["AD_TIME","\u0420\u0435\u043a\u043b\u0430\u043c\u0430: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0410\u0432\u0442\u043e"],["BACK","\u041d\u0430\u0437\u0430\u0434"],["CAPTIONS","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["CAST","\u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c..."],
["CHAPTERS","\u042d\u043f\u0438\u0437\u043e\u0434\u044b"],["DOWNLOAD_VIDEO_FRAME","\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e"],["ENTER_LOOP_MODE","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0438\u0434\u0435\u043e"],["ENTER_PICTURE_IN_PICTURE",'\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["EXIT_FULL_SCREEN","\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["EXIT_LOOP_MODE","\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e"],["EXIT_PICTURE_IN_PICTURE",'\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["FAST_FORWARD","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u0432\u043f\u0435\u0440\u0435\u0434"],["FULL_SCREEN","\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["LANGUAGE","\u042f\u0437\u044b\u043a"],["LIVE","\u041f\u0440\u044f\u043c\u043e\u0439 \u044d\u0444\u0438\u0440"],["LOOP","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c"],["MORE_SETTINGS","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],
["MULTIPLE_LANGUAGES","\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432"],["MUTE","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["NOT_APPLICABLE","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["OFF","\u0412\u044b\u043a\u043b."],["ON","\u0412\u043a\u043b."],["PAUSE","\u041f\u0430\u0443\u0437\u0430"],["PICTURE_IN_PICTURE","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],
["PLAY","\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438"],["PLAYBACK_RATE","\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f"],["QUALITY","\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e"],["RECENTER_VR","\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e"],["REPLAY","\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"],
["RESOLUTION","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["REWIND","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["SEEK","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430"],["SKIP_AD","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"],["SKIP_TO_LIVE","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438"],
["STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430"],["SUBTITLE_FORCED","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e"],["SURROUND","\u041e\u0431\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0432\u0443\u043a"],["TOGGLE_STEREOSCOPIC","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u0440\u0435\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c"],
["UNDETERMINED_LANGUAGE","\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e"],["UNMUTE","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["UNRECOGNIZED_LANGUAGE","\u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043e"],["VOLUME","\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"]]));a.Xa("th",new Map([["AD_DURATION","\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_PROGRESS","\u0e42\u0e06\u0e29\u0e13\u0e32 [AD_ON] \u0e08\u0e32\u0e01 [NUM_ADS] \u0e23\u0e32\u0e22\u0e01\u0e32\u0e23"],
["AD_STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_TIME","\u0e42\u0e06\u0e29\u0e13\u0e32: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["BACK","\u0e01\u0e25\u0e31\u0e1a"],["CAPTIONS","\u0e04\u0e33\u0e1a\u0e23\u0e23\u0e22\u0e32\u0e22\u0e41\u0e17\u0e19\u0e40\u0e2a\u0e35\u0e22\u0e07"],["CAST","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["CHAPTERS","\u0e1a\u0e17"],["DOWNLOAD_VIDEO_FRAME","\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e40\u0e1f\u0e23\u0e21\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],
["ENTER_LOOP_MODE","\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["ENTER_PICTURE_IN_PICTURE","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["EXIT_FULL_SCREEN","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["EXIT_LOOP_MODE",
"\u0e2b\u0e22\u0e38\u0e14\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["EXIT_PICTURE_IN_PICTURE","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["FAST_FORWARD","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["FULL_SCREEN","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["LANGUAGE","\u0e20\u0e32\u0e29\u0e32"],
["LIVE","\u0e2a\u0e14"],["LOOP","\u0e25\u0e39\u0e1b"],["MORE_SETTINGS","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["MULTIPLE_LANGUAGES","\u0e2b\u0e25\u0e32\u0e22\u0e20\u0e32\u0e29\u0e32"],["MUTE","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["NOT_APPLICABLE","\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["OFF","\u0e1b\u0e34\u0e14"],["ON","\u0e40\u0e1b\u0e34\u0e14"],["PAUSE","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"],
["PICTURE_IN_PICTURE","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["PLAY","\u0e40\u0e25\u0e48\u0e19"],["PLAYBACK_RATE","\u0e04\u0e27\u0e32\u0e21\u0e40\u0e23\u0e47\u0e27\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e25\u0e48\u0e19"],["QUALITY","\u0e04\u0e38\u0e13\u0e20\u0e32\u0e1e"],["RECENTER_VR","\u0e08\u0e31\u0e14\u0e01\u0e36\u0e48\u0e07\u0e01\u0e25\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48"],["REPLAY","\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33"],
["RESOLUTION","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["REWIND","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["SEEK","\u0e04\u0e49\u0e19\u0e2b\u0e32"],["SKIP_AD","\u0e02\u0e49\u0e32\u0e21\u0e42\u0e06\u0e29\u0e13\u0e32"],["SKIP_TO_LIVE","\u0e02\u0e49\u0e32\u0e21\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e01\u0e32\u0e23\u0e16\u0e48\u0e32\u0e22\u0e17\u0e2d\u0e14\u0e2a\u0e14"],["STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34"],["SUBTITLE_FORCED","\u0e1a\u0e31\u0e07\u0e04\u0e31\u0e1a"],
["SURROUND","\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e23\u0e32\u0e27\u0e14\u0e4c"],["TOGGLE_STEREOSCOPIC","\u0e40\u0e1b\u0e34\u0e14/\u0e1b\u0e34\u0e14\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e2a\u0e32\u0e21\u0e21\u0e34\u0e15\u0e34"],["UNDETERMINED_LANGUAGE","\u0e44\u0e21\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14"],["UNMUTE","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["UNRECOGNIZED_LANGUAGE","\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01"],["VOLUME","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"]]));
a.Xa("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_STATISTICS","Reklam istatistikleri"],["AD_TIME","Reklam: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyaz\u0131lar"],["CAST","Yay\u0131nla..."],["CHAPTERS","B\u00f6l\u00fcmler"],["DOWNLOAD_VIDEO_FRAME","Video karesini kaydet"],["ENTER_LOOP_MODE","Mevcut videoyu d\u00f6ng\u00fcye al"],["ENTER_PICTURE_IN_PICTURE","Pencere i\u00e7inde Pencere moduna gir"],
["EXIT_FULL_SCREEN","Tam ekrandan \u00e7\u0131k"],["EXIT_LOOP_MODE","Mevcut videonun d\u00f6ng\u00fcs\u00fcn\u00fc durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencereden \u00c7\u0131k"],["FAST_FORWARD","\u0130leri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canl\u0131"],["LOOP","D\u00f6ng\u00fc"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden \u00e7ok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Ge\u00e7erli de\u011fil"],["OFF","Kapal\u0131"],
["ON","A\u00e7\u0131k"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","\u00c7alma h\u0131z\u0131"],["QUALITY","Kalite"],["RECENTER_VR","Ortala"],["REPLAY","Tekrar Oynat"],["RESOLUTION","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklam\u0131 Atla"],["SKIP_TO_LIVE","Canl\u0131 yay\u0131na atla"],["STATISTICS","\u0130statistikler"],["SUBTITLE_FORCED","Zorunlu"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC",
"Stereoskopik modu a\u00e7/kapat"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi a\u00e7"],["UNRECOGNIZED_LANGUAGE","Tan\u0131nmayan"],["VOLUME","Ses"]]));a.Xa("zh",new Map([["AD_DURATION","\u5e7f\u544a\u6301\u7eed\u65f6\u95f4"],["AD_PROGRESS","\u5e7f\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5e7f\u544a\u7edf\u8ba1\u4fe1\u606f"],["AD_TIME","\u5e7f\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52a8"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e\u2026"],
["CHAPTERS","\u7ae0\u8282"],["DOWNLOAD_VIDEO_FRAME","\u4fdd\u5b58\u89c6\u9891\u5e27"],["ENTER_LOOP_MODE","\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["ENTER_PICTURE_IN_PICTURE","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["EXIT_PICTURE_IN_PICTURE","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["FAST_FORWARD","\u5feb\u8fdb"],
["FULL_SCREEN","\u5168\u5c4f"],["LANGUAGE","\u8bed\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u73af\u64ad\u653e"],["MORE_SETTINGS","\u66f4\u591a\u8bbe\u7f6e"],["MULTIPLE_LANGUAGES","\u591a\u79cd\u8bed\u8a00"],["MUTE","\u9759\u97f3"],["NOT_APPLICABLE","\u4e0d\u9002\u7528"],["OFF","\u5173\u95ed"],["ON","\u5f00\u542f"],["PAUSE","\u6682\u505c"],["PICTURE_IN_PICTURE","\u753b\u4e2d\u753b"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u753b\u8d28"],["RECENTER_VR",
"\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u653e"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7edf\u8ba1\u4fe1\u606f"],["SUBTITLE_FORCED","\u5df2\u5f3a\u5236\u663e\u793a"],["SURROUND","\u73af\u7ed5\u58f0"],["TOGGLE_STEREOSCOPIC","\u5207\u6362\u7acb\u4f53\u58f0"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],
["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.Xa("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5ee3\u544a\u7d71\u8a08\u8cc7\u6599"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["CHAPTERS","\u7ae0\u7bc0"],["DOWNLOAD_VIDEO_FRAME","\u5132\u5b58\u5f71\u7247\u5f71\u683c"],
["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
"\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ki(navigator.languages||
[]);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.yh;Z.prototype.incrementPitch=Z.prototype.xh;Z.prototype.incrementYaw=Z.prototype.Ah;Z.prototype.toggleStereoscopicMode=Z.prototype.$d;Z.prototype.setVRFieldOfView=Z.prototype.wm;Z.prototype.getVRFieldOfView=Z.prototype.ul;Z.prototype.getVRNorth=Z.prototype.vl;Z.prototype.isPlayingVR=Z.prototype.Xb;Z.prototype.canPlayVR=Z.prototype.Lg;Z.prototype.hideUI=Z.prototype.bj;Z.prototype.showUI=Z.prototype.ym;
Z.prototype.isOpaque=Z.prototype.Da;Z.prototype.hideAdUI=Z.prototype.aj;Z.prototype.showAdUI=Z.prototype.Rj;Z.prototype.togglePiP=Z.prototype.cd;Z.prototype.isPiPEnabled=Z.prototype.Md;Z.prototype.isPiPAllowed=Z.prototype.Ff;Z.prototype.toggleFullScreen=Z.prototype.og;Z.prototype.isFullScreenEnabled=Z.prototype.wb;Z.prototype.isFullScreenSupported=Z.prototype.we;Z.prototype.hideSettingsMenus=Z.prototype.Vc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Lc;Z.prototype.setLastTouchEventTime=Z.prototype.Mj;
Z.prototype.getDisplayTime=Z.prototype.ph;Z.prototype.isCastAllowed=Z.prototype.Cl;Z.prototype.setSeeking=Z.prototype.gi;Z.prototype.isSeeking=Z.prototype.Il;Z.prototype.getConfig=Z.prototype.Gk;Z.prototype.getClientSideAdContainer=Z.prototype.Fk;Z.prototype.getServerSideAdContainer=Z.prototype.il;Z.prototype.getControlsContainer=Z.prototype.Jk;Z.prototype.getLocalPlayer=Z.prototype.Sk;Z.prototype.getPlayer=Z.prototype.Wb;Z.prototype.getLocalVideo=Z.prototype.Tk;Z.prototype.getVideo=Z.prototype.Uc;
Z.prototype.getVideoContainer=Z.prototype.xl;Z.prototype.getLocalization=Z.prototype.Uk;Z.prototype.getCastProxy=Z.prototype.Ck;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Lj;Z.prototype.setEnabledShakaControls=Z.prototype.ci;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ll;Z.prototype.allowCast=Z.prototype.jk;Z.registerSeekBar=function(a){JI=a};Z.registerElement=rI;Z.prototype.destroy=Z.prototype.destroy;
var sI=new Map,JI=new AH;function RI(a,b){function c(){return SI(d)}UG.call(this,a,b);var d=this;this.m=this.controls.g;this.l=this.controls.i;this.u=this.controls.l;this.j=[];TI(this);this.g=W("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");this.l.appendChild(this.g);UI(this);this.eventManager.o(this.localization,"locale-updated",function(){VI(d)});this.eventManager.o(this.localization,
"locale-changed",function(){VI(d)});this.eventManager.o(this.adManager,"ad-started",function(){d.ad&&d.ad.isLinear()&&$G(d.h,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){$G(d.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){$G(d.g,!1)});this.eventManager.o(this.g,"touchstart",function(e){d.controls.Mj(Date.now());e.stopPropagation()});this.eventManager.o(this.h,"click",function(){d.controls.Da()&&WI(d)});VI(this);this.ad&&this.ad.isLinear()&&$G(this.h,!1);this.i=
null;window.ResizeObserver?(this.i=new ResizeObserver(c),this.i.observe(this.controls.l)):this.eventManager.o(window,"resize",c)}ma(RI,UG);RI.prototype.release=function(){this.l=null;for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[];this.i&&(this.i.disconnect(),this.i=null);UG.prototype.release.call(this)};function XI(a,b){YI.set(a,b)}
function TI(a){a.h=Pj();a.h.classList.add("shaka-overflow-menu-button");a.h.classList.add("shaka-no-propagation");a.h.classList.add("shaka-tooltip");(new VG(a.h)).use("M433-80q-27 0-46.5-18T363-142l-9-66q-13-5-24.5-12T307-235l-62 26q-25 11-50 2t-39-32l-47-82q-14-23-8-49t27-43l53-40q-1-7-1-13.5v-27q0-6.5 1-13.5l-53-40q-21-17-27-43t8-49l47-82q14-23 39-32t50 2l62 26q11-8 23-15t24-12l9-66q4-26 23.5-44t46.5-18h94q27 0 46.5 18t23.5 44l9 66q13 5 24.5 12t22.5 15l62-26q25-11 50-2t39 32l47 82q14 23 8 49t-27 43l-53 40q1 7 1 13.5v27q0 6.5-2 13.5l53 40q21 17 27 43t-8 49l-48 82q-14 23-39 32t-50-2l-60-26q-11 8-23 15t-24 12l-9 66q-4 26-23.5 44T527-80h-94Zm49-260q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Z");
var b=W("span");b.classList.add("shaka-overflow-quality-mark");b.style.display="none";a.h.appendChild(b);a.parent.appendChild(a.h)}function UI(a){for(var b=t(a.m.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,YI.get(c)?(c=YI.get(c),a.j.push(c.create(a.g,a.controls))):bb("Unrecognized overflow menu element requested:",c)}
function WI(a){if(a.controls.Lc())a.controls.Vc();else{$G(a.g,!0);gI(a.controls);var b=function(c){return c.classList.contains("shaka-hidden")==0};nb(a.g.childNodes,b)&&pb(a.g.childNodes,b)[0].focus();SI(a)}}function VI(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}function SI(a){var b=a.g.getBoundingClientRect(),c=window.getComputedStyle(a.g),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.u.getBoundingClientRect();a.g.style.maxHeight=b.bottom-e.top-d-c+"px"}
S("shaka.ui.OverflowMenu",RI);RI.registerElement=XI;function ZI(){}ZI.prototype.create=function(a,b){return new RI(a,b)};rI("overflow_menu",new ZI);var YI=new Map;function $I(a,b){function c(e){return d.i[e]}UG.call(this,a,b);var d=this;this.h=Pj();this.h.classList.add("shaka-ad-statistics-button");this.u=new VG(this.h,"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.A=W("span");a.appendChild(this.A);this.l=W("span");this.l.classList.add("shaka-current-selection-span");a.appendChild(this.l);this.h.appendChild(a);this.parent.appendChild(this.h);this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");
this.controls.i.appendChild(this.g);this.D=[];this.i=this.adManager.getStats();$G(this.h,this.i.started>0);this.m=new Map;this.C=(new Map).set("loadTimes",function(e){var f=0;e=t(d.i[e]);for(var g=e.next();!g.done;g=e.next())f+=parseFloat(g.value);return f}).set("averageLoadTime",c).set("started",c).set("overlayAds",c).set("playedCompletely",c).set("skipped",c).set("errors",c);this.j=new Df(function(){d.i=d.adManager.getStats();for(var e=t(d.D),f=e.next();!f.done;f=e.next())f=f.value,d.m.get(f).textContent=
d.C.get(f)(f)});aJ(this);bJ(this);this.eventManager.o(this.localization,"locale-updated",function(){aJ(d)});this.eventManager.o(this.localization,"locale-changed",function(){aJ(d)});this.eventManager.o(this.h,"click",function(){d.controls.Da()&&(cJ(d),aJ(d))});this.eventManager.o(this.player,"loading",function(){$G(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){$G(d.h,!0)})}ma($I,UG);
function cJ(a){a.g.classList.contains("shaka-hidden")?(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-440q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),a.j.xa(.1),
$G(a.g,!0)):(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),
a.j.stop(),$G(a.g,!1))}function aJ(a){a.A.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.l.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}function dJ(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.C.get(b)(b);c.appendChild(d);a.m.set(b,d);return c}
function bJ(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=(new VG(b,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z")).g;c.classList.add("material-icons","notranslate");a.g.appendChild(b);a.eventManager.o(c,"click",function(){cJ(a)});b=t(a.controls.g.adStatisticsList);
for(c=b.next();!c.done;c=b.next())c=c.value,c in a.i?(a.g.appendChild(dJ(a,c)),a.D.push(c)):bb("Unrecognized ad statistic element:",c)}$I.prototype.release=function(){this.j.stop();this.j=null;UG.prototype.release.call(this)};S("shaka.ui.AdStatisticsButton",$I);function eJ(){}eJ.prototype.create=function(a,b){return new $I(a,b)};XI("ad_statistics",new eJ);eH("ad_statistics",new eJ);function fJ(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";(new VG(this.g)).use("M80-280v-480q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v480q0 33-23.5 56.5T800-200h-80q-17 0-28.5-11.5T680-240q0-17 11.5-28.5T720-280h80v-480H160v480h80q17 0 28.5 11.5T280-240q0 17-11.5 28.5T240-200h-80q-33 0-56.5-23.5T80-280Zm232 160q-14 0-22-9.5t-8-20.5q0-5 2-10.5t7-10.5l161-161q6-6 13-9t15-3q8 0 15 3t13 9l161 161q5 5 7 10.5t2 10.5q0 11-8 20.5t-22 9.5H312Zm168-360Z");
window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);gJ(this);hJ(this);this.eventManager.o(this.localization,"locale-updated",function(){gJ(c)});this.eventManager.o(this.localization,
"locale-changed",function(){gJ(c)});this.eventManager.o(this.g,"click",function(){c.controls.Da()&&c.controls.Uc().webkitShowPlaybackTargetPicker()});a=this.controls.Uc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=c.player.l==Fr;$G(c.g,d.availability=="available"&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){hJ(c)})}ma(fJ,UG);
function hJ(a){var b=a.controls.Uc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function gJ(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.i.textContent=a.localization.resolve("AIRPLAY")}S("shaka.ui.AirPlayButton",fJ);function iJ(){}iJ.prototype.create=function(a,b){return new fJ(a,b)};XI("airplay",new iJ);rI("airplay",new iJ);function jJ(a,b){UG.call(this,a,b);var c=this;this.g=document.createElement("canvas");this.g.style.position="absolute";this.g.style.top="0";this.g.style.left="0";this.g.style.pointerEvents="none";this.parent.appendChild(this.g);kJ(this);this.i=this.h=null;window.ResizeObserver?(this.i=new ResizeObserver(function(){return kJ(c)}),this.i.observe(this.parent)):window.addEventListener("resize",function(){return kJ(c)})}ma(jJ,UG);function lJ(a){return(a=a.g.getContext("2d"))?a:null}
function kJ(a){a.g.width=a.parent.offsetWidth;a.g.height=a.parent.offsetHeight}
jJ.prototype.ig=function(a,b){a={type:"static",text:a,position:"top-right",color:"rgba(255, 255, 255, 0.7)",size:20,alpha:.7,interval:2E3,skip:500,displayDuration:2E3,transitionDuration:.5};b=Object.assign({},a,b||a);if(b.type==="static"){if(a=lJ(this)){a.clearRect(0,0,this.g.width,this.g.height);a.globalAlpha=b.alpha;a.fillStyle=b.color;a.font=b.size+"px Arial";var c=a.measureText(b.text);switch(b.position){case "top-left":c=20;var d=b.size+20;break;case "top-right":c=this.g.width-c.width-20;d=b.size+
20;break;case "bottom-left":c=20;d=this.g.height-20;break;case "bottom-right":c=this.g.width-c.width-20;d=this.g.height-20;break;default:c=(this.g.width-c.width)/2,d=(this.g.height+b.size)/2}a.fillText(b.text,c,d)}}else b.type==="dynamic"&&mJ(this,b)};
function mJ(a,b){function c(){if(a.h){e.clearRect(0,0,a.g.width,a.g.height);switch(h){case "fadeIn":g=Math.min(b.alpha,g+l);g>=b.alpha&&(h="display");break;case "display":--k<=0&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),g<=0&&(h="transition",f=d(),k=Math.round(b.displayDuration*60),h="fadeIn")}g>0&&(e.globalAlpha=g,e.fillStyle=b.color,e.font=b.size+"px Arial",e.fillText(b.text,f.left,f.top));a.h&&(a.h=requestAnimationFrame(c))}}function d(){e.font=b.size+"px Arial";var n=e.measureText(b.text).width,
q=b.size;n=[{left:20,top:q+20},{left:a.g.width-n-20,top:q+20},{left:20,top:a.g.height-20},{left:a.g.width-n-20,top:a.g.height-20},{left:(a.g.width-n)/2,top:(a.g.height+q)/2}];q=n[m];m=(m+1)%n.length;return q}var e=a.g.getContext("2d"),f={left:0,top:0},g=0,h="fadeIn",k=Math.round(b.displayDuration*60),l=1/(Math.round(b.transitionDuration*60)/2),m=0;f=d();a.h=requestAnimationFrame(c)}
jJ.prototype.$f=function(){this.h&&(cancelAnimationFrame(this.h),this.h=null);var a=lJ(this);a&&a.clearRect(0,0,this.g.width,this.g.height)};jJ.prototype.release=function(){var a=this;this.g&&this.g.parentNode&&this.g.parentNode.removeChild(this.g);this.i?(this.i.disconnect(),this.i=null):window.removeEventListener("resize",function(){return kJ(a)});UG.prototype.release.call(this)};S("shaka.ui.Watermark",jJ);jJ.prototype.removeWatermark=jJ.prototype.$f;jJ.prototype.setTextWatermark=jJ.prototype.ig;function nJ(a,b,c,d){d=d===void 0?null:d;this.j=a;this.l=b;this.h=oJ(this);var e="",f=!1;b.dataset&&b.dataset.shakaPlayerCastReceiverId?(f=b.dataset,e=f.shakaPlayerCastReceiverId,f=f.shakaPlayerCastAndroidReceiverCompatible==="true"):c.dataset&&c.dataset.shakaPlayerCastReceiverId&&(f=c.dataset,e=f.shakaPlayerCastReceiverId,f=f.shakaPlayerCastAndroidReceiverCompatible==="true");e.length&&(this.h.castReceiverAppId=e,this.h.castAndroidReceiverCompatible=f);b.dataset.shakaPlayerContainer="";b.ui=this;
this.Eh()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);c.controls||a.ii(b);b.ui=this;c.ui=this;this.i=null}p=nJ.prototype;p.destroy=function(a){a=a===void 0?!1:a;var b=this;return P(function(c){if(c.g==1)return b.g?G(c,b.g.destroy(a),2):c.B(2);if(c.g!=4)return b.g=null,b.j?G(c,b.j.destroy(),4):c.B(4);b.j=null;b.i=null;I(c)})};p.Eh=function(){return Qb().Oa()=="MOBILE"};p.Fh=function(){return Qb().Oa()=="TV"};
p.getConfiguration=function(){var a=oJ(this);En(a,this.h,oJ(this),{},"");return a};
p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Fn(a,b));var c=Object.assign({},this.h);En(c,a,oJ(this),{},"");var d=Hn(c,this.h);if(Object.keys(d).length&&(this.h=c,this.g.configure(this.h),this.g.dispatchEvent(new T("uiupdated")),(c=this.h.castSenderUrl)&&this.h.castReceiverAppId&&window.chrome&&!chrome.cast&&!this.Fh())){d=!1;for(var e=t(document.getElementsByTagName("script")),f=e.next();!f.done;f=e.next())if(f.value.src===c){d=!0;break}d||(d=document.createElement("script"),
d.src=c,d.defer=!0,document.head.appendChild(d))}};p.Ik=function(){return this.g};p.um=function(a){this.g.ci(a)};p.ig=function(a,b){a&&!this.i&&this.l&&this.g&&(this.i=new jJ(this.l,this.g));this.i&&this.i.ig(a,b)};p.$f=function(){this.i&&this.i.$f()};
function oJ(a){var b="play_pause skip_previous skip_next mute volume time_and_duration spacer overflow_menu".split(" ");window.chrome&&b.push("cast");"remote"in HTMLMediaElement.prototype?b.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.push("airplay");b.push("fullscreen");b={controlPanelElements:b,overflowMenuButtons:"captions quality language chapter picture_in_picture playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height currentCodecs corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),
adStatisticsList:"loadTimes averageLoadTime started overlayAds playedCompletely skipped errors".split(" "),contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",
buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},qualityMarks:{720:"",1080:"HD",1440:"2K",2160:"4K",4320:"8K"},trackLabelFormat:pJ,textTrackLabelFormat:pJ,fadeDelay:0,closeMenusDelay:2,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!1,forceLandscapeOnFullscreen:!1,enableTooltips:!0,keyboardSeekDistance:5,
keyboardLargeSeekDistance:60,fullScreenElement:a.l,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!1,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular",setupMediaSession:!0,preferVideoFullScreenInVisionOS:!0,showAudioCodec:!0,showVideoCodec:!0,castSenderUrl:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",enableKeyboardPlaybackControlsInWindow:!1,alwaysShowVolumeBar:!1};if(a.Eh()){b.addBigPlayButton=!0;b.singleClickForPlayAndPause=
!1;b.seekOnTaps=!0;b.enableTooltips=!1;b.doubleClickForFullscreen=!1;a=Qb();b.enableFullscreenOnRotation=a.Ja()!=="WEBKIT";b.forceLandscapeOnFullscreen=!0;var c=["play_pause","skip_previous","skip_next","volume"];b.controlPanelElements=b.controlPanelElements.filter(function(e){return!c.includes(e)});b.overflowMenuButtons=b.overflowMenuButtons.filter(function(e){return!c.includes(e)});b.contextMenuElements=b.contextMenuElements.filter(function(e){return!c.includes(e)})}else if(a.Fh()){b.addBigPlayButton=
!0;b.singleClickForPlayAndPause=!1;b.enableTooltips=!1;b.doubleClickForFullscreen=!1;var d="play_pause cast remote airplay volume save_video_frame".split(" ");b.controlPanelElements=b.controlPanelElements.filter(function(e){return!d.includes(e)});b.overflowMenuButtons=b.overflowMenuButtons.filter(function(e){return!d.includes(e)});b.contextMenuElements=b.contextMenuElements.filter(function(e){return!d.includes(e)})}return b}
function qJ(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,y,B,C,E;return P(function(D){switch(D.g){case 1:iD();if(!br())return rJ("shaka-ui-load-failed",sJ),D.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){D.B(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=tJ(h,c,d),m=l.ij,n=l.gk,uJ(h,g,m,n));D.B(2);break}q=t(a);r=q.next();case 4:if(r.done){D.B(2);break}u=r.value;if(u.ui){D.B(5);break}v=null;w=t(b);for(z=w.next();!z.done;z=w.next())if(y=z.value,y.parentElement==u){v=y;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));B=tJ(u,c,d);C=B.ij;E=B.gk;sa(D,7);return G(D,uJ(u,v,C,E),9);case 9:ua(D,5);break;case 7:return va(D),
rJ("shaka-ui-load-failed",vJ),D.return();case 5:r=q.next();D.B(4);break;case 2:rJ("shaka-ui-loaded"),I(D)}})}function rJ(a,b){var c=null;b!=void 0&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
function uJ(a,b,c,d){var e,f,g,h,k,l,m,n,q,r;return P(function(u){switch(u.g){case 1:e=new X;f=new nJ(e,a,b,d?d:null);e.Fi(c);b.controls&&f.g.Lj(!0);g=[];if(h=b.getAttribute("src"))g.push(h),b.removeAttribute("src");k=t(b.getElementsByTagName("source"));for(l=k.next();!l.done;l=k.next())m=l.value,g.push(m.src),b.removeChild(m);return G(u,e.cc(b),2);case 2:n=t(g),q=n.next();case 3:if(q.done){u.B(0);break}r=q.value;sa(u,6);return G(u,f.g.Wb().load(r),8);case 8:u.B(0);break;case 6:va(u);case 4:q=n.next(),
u.B(3)}})}function tJ(a,b,c){var d=null;b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.parentElement==a){d=e;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));b=null;c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}return{ij:d,gk:b}}S("shaka.ui.Overlay",nJ);nJ.prototype.removeWatermark=nJ.prototype.$f;nJ.prototype.setTextWatermark=nJ.prototype.ig;nJ.prototype.setEnabled=nJ.prototype.um;
nJ.prototype.getControls=nJ.prototype.Ik;nJ.prototype.configure=nJ.prototype.configure;nJ.prototype.getConfiguration=nJ.prototype.getConfiguration;nJ.prototype.isSmartTV=nJ.prototype.Fh;nJ.prototype.isMobile=nJ.prototype.Eh;nJ.prototype.destroy=nJ.prototype.destroy;var pJ=0;nJ.TrackLabelFormat={LANGUAGE:pJ,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var sJ=0,vJ=1;nJ.FailReasonCode={NO_BROWSER_SUPPORT:sJ,PLAYER_FAILED_TO_LOAD:vJ};
document.readyState=="complete"?P(function(a){if(a.g==1)return G(a,Promise.resolve(),2);qJ();I(a)}):window.addEventListener("load",qJ);function wJ(a){function b(d){return{codecs:d.codecs,channelCount:d.channelCount,language:d.language,roles:d.roles,spatialAudio:d.spatialAudio}}var c=b(a[0]);return a.every(function(d){return JSON.stringify(b(d))===JSON.stringify(c)})}
function xJ(a,b,c,d,e,f,g,h){function k(H){var K="";H=="aac"?K="AAC":H==="ac-3"?K="Dolby":H==="ec-3"?K="DD+":H==="ac-4"?K="Dolby AC-4":H==="opus"?K="Opus":H==="flac"&&(K="fLaC");return K?" "+K:K}function l(H){var K="";H>=5&&(K=" "+e.resolve("SURROUND"));return K}function m(H,K,L,O,Q,N){K=[H,K,N];g&&O!=null&&K.push(O);h&&n(H)&&Q&&K.push(Q);L&&f==3&&K.push(L);return K.join(": ")}function n(H){return r.has(H)&&r.get(H).size>1}var q=a.find(function(H){return H.active==1});a.length>1&&a[0].label&&f!=3&&
wJ(a)&&(f=3);for(var r=new Map,u=t(a),v=u.next();!v.done;v=u.next())v=v.value,v.codecs&&(r.has(v.language)||r.set(v.language,new Set),r.get(v.language).add(jf(v.codecs)));u=WG(b);Tj(b);b.appendChild(u);u=new Set;q=q?m(q.language,q.roles.join(", "),q.label,q.channelsCount,q.codecs&&jf(q.codecs),q.spatialAudio):"";a=t(a);var w=a.next();for(v={};!w.done;v={bc:void 0},w=a.next()){v.bc=w.value;w=v.bc.language;var z=v.bc.roles.join(", "),y=v.bc.label,B=v.bc.channelsCount,C=v.bc.codecs&&jf(v.bc.codecs),
E=v.bc.spatialAudio,D=m(w,z,y,B,C,E);if(!u.has(D)){u.add(D);var A=Pj();A.addEventListener("click",function(H){return function(){c(H.bc)}}(v));var F=W("span");A.appendChild(F);F.textContent=yJ(w,e);var J="";h&&g&&E&&(C=="ec-3"||C=="ac-4")?J+=" Dolby Atmos":(h&&n(w)&&(J+=k(C)),g&&(J+=l(B)));switch(f){case pJ:F.textContent+=J;break;case 1:F.textContent+=J;z?F.textContent=z:(bb("Track #"+JSON.stringify(v.bc)+" does not have a role, but the UI is configured to only show role."),F.textContent="?");break;
case 2:F.textContent+=J;z&&(F.textContent+=": "+z);break;case 3:y?F.textContent=y:(bb("Track #"+JSON.stringify(v.bc)+" does not have a label, but the UI is configured to only show labels."),F.textContent="?")}D==q&&(A.appendChild(ZG()),F.classList.add("shaka-chosen-item"),A.ariaSelected="true",d.textContent=F.textContent);b.appendChild(A)}}}
function zJ(a,b,c,d,e,f,g){function h(B,C,E){B=[B,C];E&&g==3&&B.push(E);return B.join(": ")}var k=a.find(function(B){return B.active==1}),l=WG(b);Tj(b);b.appendChild(l);l=new Set;k=k?h(k.language,k.roles.join(", "),k.label):"";a=t(a);for(var m=a.next(),n={};!m.done;n={dd:void 0},m=a.next()){n.dd=m.value;m=n.dd.language;var q=n.dd.forced,r=f.resolve("SUBTITLE_FORCED"),u=n.dd.roles.join(", "),v=n.dd.label,w=h(m,u,v);if(!l.has(w)){l.add(w);var z=Pj();z.addEventListener("click",function(B){return function(){c(B.dd)}}(n));
var y=W("span");z.appendChild(y);y.textContent=yJ(m,f);switch(g){case pJ:q&&(y.textContent+=" ("+r+")");break;case 1:u?y.textContent=u:(bb("Track #"+n.dd.id+" does not have a role, but the UI is configured to only show role."),y.textContent="?");q&&(y.textContent+=" ("+r+")");break;case 2:u&&(y.textContent+=": "+u);q&&(y.textContent+=" ("+r+")");break;case 3:v?y.textContent=v:(bb("Track #"+n.dd.id+" does not have a label, but the UI is configured to only show labels."),y.textContent="?")}d&&w==k&&
(z.appendChild(ZG()),y.classList.add("shaka-chosen-item"),z.ariaSelected="true",e.textContent=y.textContent);b.appendChild(z)}}}function yJ(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Dc(a);return a in Ro?Ro[a]:c in Ro?Ro[c]+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function AJ(a,b,c){function d(){return BJ(e)}UG.call(this,a,b);var e=this;this.m=this.controls.l;CJ(this,c);DJ(this);EJ(this);this.eventManager.o(this.button,"click",function(){e.controls.Da()&&(e.menu.classList.contains("shaka-hidden")?(e.controls.dispatchEvent(new T("submenuopen")),$G(e.menu,!0),YG(e.menu),BJ(e)):$G(e.menu,!1))});this.j=null;window.ResizeObserver?(this.j=new ResizeObserver(d),this.j.observe(this.controls.l)):this.eventManager.o(window,"resize",d)}ma(AJ,UG);
AJ.prototype.release=function(){this.j&&(this.j.disconnect(),this.j=null);UG.prototype.release.call(this)};
function CJ(a,b){a.button=Pj();a.button.classList.add("shaka-overflow-button");a.icon=new VG(a.button,b);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");b.classList.add("shaka-overflow-button-label-inline");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
function DJ(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Pj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Vc()});a.u=new VG(a.backButton,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z");
a.backSpan=W("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
function EJ(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.u.use("m432-480 156 156q11 11 11 28t-11 28q-11 11-28 11t-28-11L348-452q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l184-184q11-11 28-11t28 11q11 11 11 28t-11 28L432-480Z"),a.eventManager.o(a.menu,"click",function(){function b(c){return c.classList.contains("shaka-hidden")==0}$G(a.menu,!1);$G(a.parent,!0);nb(a.parent.childNodes,b)&&pb(a.parent.childNodes,b)[0].focus();gI(a.controls);BJ(a)}))}
function BJ(a){var b=a.menu.getBoundingClientRect(),c=window.getComputedStyle(a.menu),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.m.getBoundingClientRect();a.menu.style.maxHeight=b.bottom-e.top-d-c+"px"}S("shaka.ui.SettingsMenu",AJ);function FJ(a,b){AJ.call(this,a,b,"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z");
var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){GJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){GJ(c)});this.eventManager.o(this.player,"loading",function(){HJ(c)});this.eventManager.o(this.player,"loaded",function(){HJ(c)});this.eventManager.o(this.player,"unloading",function(){HJ(c)});this.eventManager.o(this.player,
"audiotrackschanged",function(){HJ(c)});GJ(this);HJ(this)}ma(FJ,AJ);
function HJ(a){var b=a.player.getAudioTracks()||[];xJ(b,a.menu,function(c){a.player.Hj(c);var d={preferredAudioLanguage:c.language,preferSpatialAudio:c.spatialAudio};c.label&&(d.preferredAudioLabel=c.label);c.channelsCount&&(d.preferredAudioChannelCount=c.channelsCount);a.player.configure(d)},a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants,a.controls.g.showAudioCodec);YG(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));
a.button.setAttribute("shaka-status",a.currentSelection.innerText);$G(a.button,a.menu.getElementsByTagName("button").length>2)}function GJ(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}S("shaka.ui.AudioLanguageSelection",FJ);function IJ(){}IJ.prototype.create=function(a,b){return new FJ(a,b)};XI("language",new IJ);
rI("language",new IJ);function JJ(a,b){UG.call(this,a,b);var c=this;this.h=this.controls.F;this.g=Pj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.l=new VG(this.g,"M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);KJ(this);LJ(this);this.eventManager.o(this.localization,"locale-updated",function(){KJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){KJ(c)});
this.eventManager.o(this.g,"click",function(){c.controls.Da()&&MJ(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){LJ(c)})}ma(JJ,UG);function MJ(a){var b;P(function(c){if(c.g==1){if(a.h.Qa())return a.h.Vj(),c.B(0);sa(c,3);a.g.disabled=!0;return G(c,a.h.cast(),5)}if(c.g!=3)return a.g.disabled=!1,ua(c,0);b=va(c);a.g.disabled=!1;b.code!=8004&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));I(c)})}
function LJ(a){var b=a.h.Kg()&&a.controls.sa,c=a.h.Qa();$G(a.g,b);a.l.use(c?"M720-600v240q0 17-11.5 28.5T680-320h-87q-8 0-14.5-4.5T569-337q-29-81-81.5-147T364-596q-16-10-11.5-27t21.5-17h306q17 0 28.5 11.5T720-600ZM320-160q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125.5T518-201q2 17-9.5 29T480-160Zm-340 0q-25 0-42.5-17.5T80-220q0-25 17.5-42.5T140-280q25 0 42.5 17.5T200-220q0 25-17.5 42.5T140-160Zm740-560v480q0 33-23.5 56.5T800-160H638q-17 0-28.5-11.5T598-200q0-17 11.5-28.5T638-240h162v-480H160v6q0 17-11.5 28.5T120-674q-17 0-28.5-11.5T80-714v-6q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720Z":
"M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z");
b&&(a.g.ariaPressed=c?"true":"false");NJ(a)}function NJ(a){a.i.textContent=a.h.Qa()?a.h.Yf():a.localization.resolve("OFF")}function KJ(a){a.g.ariaLabel=a.localization.resolve("CAST");a.j.textContent=a.localization.resolve("CAST");NJ(a)}S("shaka.ui.CastButton",JJ);function OJ(){}OJ.prototype.create=function(a,b){return new JJ(a,b)};XI("cast",new OJ);rI("cast",new OJ);function PJ(a,b){AJ.call(this,a,b,"m400-200-182 91q-20 10-39-1.5T160-145v-495q0-33 23.5-56.5T240-720h320q33 0 56.5 23.5T640-640v495q0 23-19 34.5t-39 1.5l-182-91Zm360-40q-17 0-28.5-11.5T720-280v-520H320q-17 0-28.5-11.5T280-840q0-17 11.5-28.5T320-880h400q33 0 56.5 23.5T800-800v520q0 17-11.5 28.5T760-240Z");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,
"locale-updated",function(){QJ(c);RJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){QJ(c);RJ(c)});this.eventManager.o(this.player,"unloading",function(){SJ(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",function(){RJ(c)});QJ(this);RJ(this)}ma(PJ,AJ);
function QJ(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("CHAPTERS");a.nameSpan.textContent=a.localization.resolve("CHAPTERS");a.backSpan.textContent=a.localization.resolve("CHAPTERS")}function SJ(a){var b=WG(a.menu);Tj(a.menu);a.menu.appendChild(b);$G(a.button,!1)}
function RJ(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u;P(function(v){switch(v.g){case 1:b=function(w,z){return!w&&!z||w.id===z.id&&w.title===z.title&&w.startTime===z.startTime&&w.endTime===z.endTime},c="und",d=[],e=a.localization.g,f=t(Array.from(e)),g=f.next();case 2:if(g.done){v.B(4);break}c=h=g.value;if(!a.player){v.B(5);break}return G(v,a.player.oh(c),6);case 6:d=v.h||[];case 5:if(d.length){v.B(4);break}g=f.next();v.B(2);break;case 4:if(d.length){v.B(7);break}c="und";if(!a.player){v.B(7);break}return G(v,
a.player.oh(c),9);case 9:d=v.h||[];case 7:k=c!==a.h;l=a.g.length!==d.length||!a.g.some(function(w,z){z=d.at(z);return b(w,z)||d.some(function(y){return b(w,y)})});a.h=c;a.g=d;if(!d.length)SJ(a);else if(k||l){m=t(a.g);n=m.next();for(q={};!n.done;q={Mg:void 0},n=m.next())q.Mg=n.value,r=Pj(),u=W("span"),u.classList.add("shaka-chapter"),u.textContent=q.Mg.title,r.appendChild(u),a.eventManager.o(r,"click",function(w){return function(){a.controls.Da()&&(a.video.currentTime=w.Mg.startTime)}}(q)),a.menu.appendChild(r);
$G(a.button,!0);YG(a.menu)}I(v)}})}S("shaka.ui.ChapterSelection",PJ);function TJ(){}TJ.prototype.create=function(a,b){return new PJ(a,b)};XI("chapter",new TJ);rI("chapter",new TJ);function UJ(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");(new VG(this.g)).use("M100-315v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T428-480q0 10-4.5 18.5T410-447L162-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Zm400 0v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T828-480q0 10-4.5 18.5T810-447L562-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z");this.parent.appendChild(this.g);
VJ(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){VJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){VJ(c)});this.eventManager.o(this.g,"click",function(){if(c.controls.Da()&&c.video.duration){var d=c.h.indexOf(c.player.Za())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.sc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",
c.player.Za()+"x")})}ma(UJ,UG);function VJ(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",UJ);function WJ(){}WJ.prototype.create=function(a,b){return new UJ(a,b)};rI("fast_forward",new WJ);function XJ(a,b){UG.call(this,a,b);var c=this;this.h=this.controls.u;this.g=Pj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("shaka-tooltip");this.i=new VG(this.g,"M200-200h80q17 0 28.5 11.5T320-160q0 17-11.5 28.5T280-120H160q-17 0-28.5-11.5T120-160v-120q0-17 11.5-28.5T160-320q17 0 28.5 11.5T200-280v80Zm560 0v-80q0-17 11.5-28.5T800-320q17 0 28.5 11.5T840-280v120q0 17-11.5 28.5T800-120H680q-17 0-28.5-11.5T640-160q0-17 11.5-28.5T680-200h80ZM200-760v80q0 17-11.5 28.5T160-640q-17 0-28.5-11.5T120-680v-120q0-17 11.5-28.5T160-840h120q17 0 28.5 11.5T320-800q0 17-11.5 28.5T280-760h-80Zm560 0h-80q-17 0-28.5-11.5T640-800q0-17 11.5-28.5T680-840h120q17 0 28.5 11.5T840-800v120q0 17-11.5 28.5T800-640q-17 0-28.5-11.5T760-680v-80Z");
YJ(this);this.parent.appendChild(this.g);ZJ(this);this.eventManager.o(this.localization,"locale-updated",function(){ZJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZJ(c)});this.eventManager.o(this.g,"click",function(){return P(function(d){return c.controls.Da()?G(d,c.controls.og(),0):d.return()})});this.eventManager.o(document,"fullscreenchange",function(){c.i.use(c.controls.wb()?"M240-240h-80q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h120q17 0 28.5 11.5T320-280v120q0 17-11.5 28.5T280-120q-17 0-28.5-11.5T240-160v-80Zm480 0v80q0 17-11.5 28.5T680-120q-17 0-28.5-11.5T640-160v-120q0-17 11.5-28.5T680-320h120q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240h-80ZM240-720v-80q0-17 11.5-28.5T280-840q17 0 28.5 11.5T320-800v120q0 17-11.5 28.5T280-640H160q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h80Zm480 0h80q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H680q-17 0-28.5-11.5T640-680v-120q0-17 11.5-28.5T680-840q17 0 28.5 11.5T720-800v80Z":
"M200-200h80q17 0 28.5 11.5T320-160q0 17-11.5 28.5T280-120H160q-17 0-28.5-11.5T120-160v-120q0-17 11.5-28.5T160-320q17 0 28.5 11.5T200-280v80Zm560 0v-80q0-17 11.5-28.5T800-320q17 0 28.5 11.5T840-280v120q0 17-11.5 28.5T800-120H680q-17 0-28.5-11.5T640-160q0-17 11.5-28.5T680-200h80ZM200-760v80q0 17-11.5 28.5T160-640q-17 0-28.5-11.5T120-680v-120q0-17 11.5-28.5T160-840h120q17 0 28.5 11.5T320-800q0 17-11.5 28.5T280-760h-80Zm560 0h-80q-17 0-28.5-11.5T640-800q0-17 11.5-28.5T680-840h120q17 0 28.5 11.5T840-800v120q0 17-11.5 28.5T800-640q-17 0-28.5-11.5T760-680v-80Z");
ZJ(c)});this.eventManager.o(this.h,"loadedmetadata",function(){YJ(c)});this.eventManager.o(this.h,"loadeddata",function(){YJ(c)});this.eventManager.o(this.adManager,"ad-started",function(){YJ(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){YJ(c)})}ma(XJ,UG);function YJ(a){a.controls.we()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function ZJ(a){var b=a.controls.wb()?"EXIT_FULL_SCREEN":"FULL_SCREEN";a.g.ariaLabel=a.localization.resolve(b)}
S("shaka.ui.FullscreenButton",XJ);function $J(){}$J.prototype.create=function(a,b){return new XJ(a,b)};rI("fullscreen",new $J);function aK(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.m=new VG(this.g,"m274-200 34 34q12 12 11.5 28T308-110q-12 12-28.5 12.5T251-109L148-212q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l103-103q12-12 28.5-11.5T308-370q11 12 11.5 28T308-314l-34 34h406v-120q0-17 11.5-28.5T720-440q17 0 28.5 11.5T760-400v120q0 33-23.5 56.5T680-200H274Zm412-480H280v120q0 17-11.5 28.5T240-520q-17 0-28.5-11.5T200-560v-120q0-33 23.5-56.5T280-760h406l-34-34q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T709-851l103 103q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L709-589q-12 12-28.5 11.5T652-590q-11-12-11.5-28t11.5-28l34-34Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.j=W("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);bK(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){bK(c)});this.eventManager.o(this.localization,
"locale-changed",function(){bK(c)});this.eventManager.o(this.g,"click",function(){c.controls.Da()&&(c.video.loop=!c.video.loop,c.h.Ka(),c.h.xa(1))});this.l=this.video.loop;this.h=new Df(function(){c.l!=c.video.loop&&(bK(c),c.l=c.video.loop)});this.h.xa(1);this.eventManager.o(this.player,"unloading",function(){cK(c)});this.eventManager.o(this.player,"loaded",function(){cK(c)});this.eventManager.o(this.player,"manifestupdated",function(){cK(c)});this.eventManager.o(this.video,"durationchange",function(){cK(c)})}
ma(aK,UG);aK.prototype.release=function(){this.h.stop();this.h=null;UG.prototype.release.call(this)};
function bK(a){a.j.textContent=a.localization.resolve("LOOP");a.i.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.m.use(a.video.loop?"M120-40q-33 0-56.5-23.5T40-120v-720q0-33 23.5-56.5T120-920h720q33 0 56.5 23.5T920-840v720q0 33-23.5 56.5T840-40H120Zm154-160h406q33 0 56.5-23.5T760-280v-120q0-17-11.5-28.5T720-440q-17 0-28.5 11.5T680-400v120H274l34-34q12-12 11.5-28T308-370q-12-12-28.5-12.5T251-371L148-268q-6 6-8.5 13t-2.5 15q0 8 2.5 15t8.5 13l103 103q12 12 28.5 11.5T308-110q11-12 11.5-28T308-166l-34-34Zm412-480-34 34q-12 12-11.5 28t11.5 28q12 12 28.5 12.5T709-589l103-103q6-6 8.5-13t2.5-15q0-8-2.5-15t-8.5-13L709-851q-12-12-28.5-11.5T652-850q-11 12-11.5 28t11.5 28l34 34H280q-33 0-56.5 23.5T200-680v120q0 17 11.5 28.5T240-520q17 0 28.5-11.5T280-560v-120h406Z":"m274-200 34 34q12 12 11.5 28T308-110q-12 12-28.5 12.5T251-109L148-212q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l103-103q12-12 28.5-11.5T308-370q11 12 11.5 28T308-314l-34 34h406v-120q0-17 11.5-28.5T720-440q17 0 28.5 11.5T760-400v120q0 33-23.5 56.5T680-200H274Zm412-480H280v120q0 17-11.5 28.5T240-520q-17 0-28.5-11.5T200-560v-120q0-33 23.5-56.5T280-760h406l-34-34q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T709-851l103 103q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L709-589q-12 12-28.5 11.5T652-590q-11-12-11.5-28t11.5-28l34-34Z");
a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}function cK(a){$G(a.g,!a.player.U())}S("shaka.ui.LoopButton",aK);function dK(){}dK.prototype.create=function(a,b){return new aK(a,b)};XI("loop",new dK);rI("loop",new dK);eH("loop",new dK);function eK(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-mute-button");this.g.classList.add("shaka-tooltip");this.j=new VG(this.g,"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.h=W("span");this.h.textContent=this.localization.resolve("MUTE");a.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);fK(this);gK(this);this.eventManager.o(this.localization,"locale-updated",function(){fK(c)});this.eventManager.o(this.localization,"locale-changed",function(){fK(c)});
this.eventManager.o(this.g,"click",function(){c.controls.Da()&&(c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted||c.video.volume!=0?c.video.muted=!c.video.muted:c.video.volume=1)});this.eventManager.o(this.video,"volumechange",function(){fK(c);gK(c)});this.eventManager.o(this.player,"loading",function(){fK(c);gK(c)});this.eventManager.o(this.player,"loaded",function(){hK(c)});this.eventManager.o(this.player,"unloading",function(){hK(c)});this.eventManager.o(this.player,"trackschanged",
function(){hK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){fK(c);gK(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){fK(c);gK(c)});this.eventManager.o(this.adManager,"ad-muted",function(){fK(c);gK(c)});this.eventManager.o(this.adManager,"ad-started",function(){hK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;fK(c);gK(c);hK(c)});hK(this)}ma(eK,UG);
function fK(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted||a.video.volume==0?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b);a.h.textContent=a.localization.resolve(b)}
function gK(a){var b=a.ad?a.ad.isMuted()?"M671-177q-11 7-22 13t-23 11q-15 7-30.5 0T574-176q-6-15 1.5-29.5T598-227q4-2 7.5-4t7.5-4L480-368v111q0 27-24.5 37.5T412-228L280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h88L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28q-11 11-28 11t-28-11l-93-93Zm89-304q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131t58 197q0 33-6 65.5T817-353q-8 22-24.5 27.5t-30.5.5q-14-5-22.5-18t-.5-30q11-26 16-52.5t5-55.5ZM591-623q33 21 51 63t18 80v10q0 5-1 10-2 13-14 17t-22-6l-51-51q-6-6-9-13.5t-3-15.5v-77q0-12 10.5-17.5t20.5.5Zm-201-59q-6-6-6-14t6-14l22-22q19-19 43.5-8.5T480-703v63q0 14-12 19t-22-5l-56-56Z":"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z":
a.video.muted||a.video.volume==0?"M671-177q-11 7-22 13t-23 11q-15 7-30.5 0T574-176q-6-15 1.5-29.5T598-227q4-2 7.5-4t7.5-4L480-368v111q0 27-24.5 37.5T412-228L280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h88L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28q-11 11-28 11t-28-11l-93-93Zm89-304q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131t58 197q0 33-6 65.5T817-353q-8 22-24.5 27.5t-30.5.5q-14-5-22.5-18t-.5-30q11-26 16-52.5t5-55.5ZM591-623q33 21 51 63t18 80v10q0 5-1 10-2 13-14 17t-22-6l-51-51q-6-6-9-13.5t-3-15.5v-77q0-12 10.5-17.5t20.5.5Zm-201-59q-6-6-6-14t6-14l22-22q19-19 43.5-8.5T480-703v63q0 14-12 19t-22-5l-56-56Z":
"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z";a.j.use(b)}
function hK(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.Gh()&&(b=!1);$G(a.g,b)}S("shaka.ui.MuteButton",eK);function iK(){}iK.prototype.create=function(a,b){return new eK(a,b)};XI("mute",new iK);rI("mute",new iK);eH("mute",new iK);function jK(a,b){UG.call(this,a,b);var c=this;this.j=this.controls.u;this.g=Pj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.l=new VG(this.g,"M120-520q-17 0-28.5-11.5T80-560q0-17 11.5-28.5T120-600h104L80-743q-12-12-12-28.5T80-800q12-12 28.5-12t28.5 12l143 144v-104q0-17 11.5-28.5T320-800q17 0 28.5 11.5T360-760v200q0 17-11.5 28.5T320-520H120Zm40 360q-33 0-56.5-23.5T80-240v-160q0-17 11.5-28.5T120-440q17 0 28.5 11.5T160-400v160h280q17 0 28.5 11.5T480-200q0 17-11.5 28.5T440-160H160Zm680-280q-17 0-28.5-11.5T800-480v-240H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v240q0 17-11.5 28.5T840-440ZM600-160q-17 0-28.5-11.5T560-200v-120q0-17 11.5-28.5T600-360h240q17 0 28.5 11.5T880-320v120q0 17-11.5 28.5T840-160H600Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.i=W("span");this.i.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);kK(this);this.parent.appendChild(this.g);this.controls.Ff()||$G(this.g,!1);this.eventManager.o(this.localization,"locale-updated",
function(){kK(c)});this.eventManager.o(this.localization,"locale-changed",function(){kK(c)});this.eventManager.o(this.g,"click",function(){c.controls.Da()&&c.controls.cd()});this.eventManager.o(this.j,"enterpictureinpicture",function(){lK(c)});this.eventManager.o(this.j,"leavepictureinpicture",function(){mK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){nK(c)});this.eventManager.o(this.player,"trackschanged",function(){nK(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,
"enter",function(d){lK(c);c.eventManager.ua(d.window,"pagehide",function(){mK(c)})})}ma(jK,UG);
function lK(a){a.l.use("M160-160q-33 0-56.5-23.5T80-240v-240q0-17 11.5-28.5T120-520q17 0 28.5 11.5T160-480v240h640v-480H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm400-263 95 95q12 12 28 12t28-12q12-12 12-28.5T711-385l-95-95h64q17 0 28.5-11.5T720-520q0-17-11.5-28.5T680-560H520q-17 0-28.5 11.5T480-520v160q0 17 11.5 28.5T520-320q17 0 28.5-11.5T560-360v-63ZM120-600q-17 0-28.5-11.5T80-640v-120q0-17 11.5-28.5T120-800h200q17 0 28.5 11.5T360-760v120q0 17-11.5 28.5T320-600H120Zm360 120Z");a.g.ariaLabel=
a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}
function mK(a){a.l.use("M120-520q-17 0-28.5-11.5T80-560q0-17 11.5-28.5T120-600h104L80-743q-12-12-12-28.5T80-800q12-12 28.5-12t28.5 12l143 144v-104q0-17 11.5-28.5T320-800q17 0 28.5 11.5T360-760v200q0 17-11.5 28.5T320-520H120Zm40 360q-33 0-56.5-23.5T80-240v-160q0-17 11.5-28.5T120-440q17 0 28.5 11.5T160-400v160h280q17 0 28.5 11.5T480-200q0 17-11.5 28.5T440-160H160Zm680-280q-17 0-28.5-11.5T800-480v-240H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v240q0 17-11.5 28.5T840-440ZM600-160q-17 0-28.5-11.5T560-200v-120q0-17 11.5-28.5T600-360h240q17 0 28.5 11.5T880-320v120q0 17-11.5 28.5T840-160H600Z");a.g.ariaLabel=
a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}function kK(a){a.i.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Md();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}
function nK(a){P(function(b){if(!a.controls.Ff())return $G(a.g,!1),a.controls.Md()?G(b,a.controls.cd(),0):b.B(0);if(!a.player||!a.player.Ld())return $G(a.g,!0),b.B(0);$G(a.g,!1);return a.controls.Md()?G(b,a.controls.cd(),0):b.B(0)})}S("shaka.ui.PipButton",jK);function oK(){}oK.prototype.create=function(a,b){return new jK(a,b)};XI("picture_in_picture",new oK);rI("picture_in_picture",new oK);eH("picture_in_picture",new oK);function pK(a,b){AJ.call(this,a,b,"m426-330 195-125q14-9 14-25t-14-25L426-630q-15-10-30.5-1.5T380-605v250q0 18 15.5 26.5T426-330ZM121-440q17 0 30.5 11t18.5 28q6 23 14.5 43.5T204-317q9 15 7.5 32T198-256q-11 11-27 10t-25-14q-22-31-37-66.5T86-400q-3-16 7.5-28t27.5-12Zm77-264q12 12 13 29t-7 31q-11 20-19.5 41T170-559q-5 17-18.5 28T121-520q-17 0-27.5-12.5T87-561q8-38 23-73.5t36-66.5q9-13 25-13.5t27 10.5Zm56 505q12-13 29.5-14t32.5 8q20 11 40.5 20t42.5 15q17 5 28 18t11 30q0 17-12.5 27T397-88q-38-8-71.5-23T260-146q-14-9-15.5-25t9.5-28Zm186-639q0 17-10.5 30T402-790q-23 6-44 14.5T317-755q-15 9-32.5 7.5T255-761q-12-12-10.5-28.5T260-815q32-20 66.5-34.5T399-872q16-3 28.5 7t12.5 27Zm360 358q0-113-69.5-199.5T553-792q-15-4-24-17t-9-29q0-16 11-26.5t25-7.5q140 28 232 137t92 255q0 146-92 255T556-88q-14 3-25-7.5T520-122q0-16 9-29t24-17q108-26 177.5-112.5T800-480Z");
var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");Array.from(a.classList).includes("shaka-overflow-menu")||(this.g=W("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),this.button.appendChild(this.g));this.eventManager.o(this.localization,"locale-updated",function(){qK(c)});this.eventManager.o(this.localization,"locale-changed",function(){qK(c)});this.eventManager.o(this.player,
"loaded",function(){rK(c)});this.eventManager.o(this.player,"ratechange",function(){rK(c)});qK(this);sK(this);rK(this)}ma(pK,AJ);function qK(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
function rK(a){var b=a.player.Za(),c=XG(a.menu,"material-svg-icon shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");var e=d.getElementsByTagName("span")[0];e&&e.classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(f){return f.textContent==b+"x"}))d=c.parentElement,d.appendChild(ZG()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",
b+"x");a.g&&(a.g.textContent=b+"x")}function sK(a){for(var b=t(a.controls.g.playbackRates),c=b.next(),d={};!c.done;d={Xf:void 0},c=b.next()){d.Xf=c.value;c=Pj();var e=W("span");e.textContent=d.Xf+"x";c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){f.Xf==a.video.defaultPlaybackRate?a.player.Bd():a.player.sc(f.Xf,!1)}}(d));a.menu.appendChild(c)}YG(a.menu)}S("shaka.ui.PlaybackRateSelection",pK);function tK(){}tK.prototype.create=function(a,b){return new pK(a,b)};
XI("playback_rate",new tK);rI("playback_rate",new tK);function uK(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-current-time");vK(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.controls.Da()&&c.player.U()&&(c.video.currentTime=c.player.wa().end)});this.eventManager.o(this.player,"loading",function(){$G(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.V,e=c.controls.ph(),f=c.player.wa(),g=f.end-f.start;isFinite(g)?c.player.U()?(e=
Math.max(0,Math.floor(f.end-e)),g=g>=3600,e>=1||d?(vK(c,"- "+aH(e,g)),c.g.disabled=!1):(vK(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=g>=3600,e=aH(Math.max(0,e-f.start),d),g&&(e+=" / "+aH(g,d)),vK(c,e),c.g.disabled=!0):(vK(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){$G(c.g,!c.ad.isLinear())});
this.eventManager.o(this.adManager,"ad-stopped",function(){$G(c.g,!0)})}ma(uK,UG);function vK(a,b){b!=a.g.textContent&&(a.g.textContent=b)}S("shaka.ui.PresentationTimeTracker",uK);function wK(){}wK.prototype.create=function(a,b){return new uK(a,b)};rI("time_and_duration",new wK);function xK(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";new VG(this.g,"M479-359q-50 0-85-35t-35-85q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35Zm-57 222-85-85q-12-12-11.5-28.5T338-279q12-12 28.5-12t28.5 12l85 86 85-85q11-11 28-11t28 11q11 11 11 28t-11 28l-85 85q-12 12-27 18t-30 6q-15 0-30-6t-27-18ZM221-337l-85-85q-12-12-18-27t-6-30q0-15 6-30t18-27l85-85q12-12 28.5-12t28.5 12q12 12 12 28.5T278-564l-86 86 85 85q11 11 11 28t-11 28q-11 11-28 11t-28-11Zm116-401 85-85q12-12 27-18t30-6q15 0 30 6t27 18l85 85q12 12 12 28t-12 28q-12 12-28.5 12T564-682l-86-85-85 85q-11 11-28 11t-28-11q-11-11-11-28t11-28Zm344 343 85-85-85-85q-11-11-11-28t11-28q11-11 28-11t28 11l85 85q12 12 18 27t6 30q0 15-6 30t-18 27l-85 85q-12 12-28 11.5T681-338q-12-12-12-28.5t12-28.5Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);yK(this);this.eventManager.o(this.localization,"locale-updated",function(){yK(c)});this.eventManager.o(this.localization,"locale-changed",function(){yK(c)});var d=this.controls.D;this.eventManager.o(this.g,"click",
function(){c.controls.Da()&&(d.g?YH(d.g):bb("Not playing VR content"))});this.eventManager.o(d,"vrstatuschanged",function(){$G(c.g,c.controls.Xb())});$G(this.g,this.controls.Xb())}ma(xK,UG);function yK(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.i.textContent=a.localization.resolve("RECENTER_VR")}S("shaka.ui.RecenterVRButton",xK);function zK(){}zK.prototype.create=function(a,b){return new xK(a,b)};XI("recenter_vr",new zK);rI("recenter_vr",new zK);function AK(a,b){UG.call(this,a,b);var c=this;this.i=Qb().kg();this.g=Pj();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.l=new VG(this.g,this.i?"M80-280v-480q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v480q0 33-23.5 56.5T800-200h-80q-17 0-28.5-11.5T680-240q0-17 11.5-28.5T720-280h80v-480H160v480h80q17 0 28.5 11.5T280-240q0 17-11.5 28.5T240-200h-80q-33 0-56.5-23.5T80-280Zm232 160q-14 0-22-9.5t-8-20.5q0-5 2-10.5t7-10.5l161-161q6-6 13-9t15-3q8 0 15 3t13 9l161 161q5 5 7 10.5t2 10.5q0 11-8 20.5t-22 9.5H312Zm168-360Z":
"M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.m=W("span");a.appendChild(this.m);this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;BK(this);$G(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){BK(c)}),this.eventManager.o(this.localization,"locale-changed",function(){BK(c)}),this.eventManager.o(this.controls,
"caststatuschanged",function(){CK(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Da()&&c.video.remote.prompt().catch(function(){})}),this.eventManager.o(this.video.remote,"connect",function(){CK(c);DK(c)}),this.eventManager.o(this.video.remote,"connecting",function(){CK(c);DK(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){CK(c);DK(c)}),this.eventManager.o(this.player,"loaded",function(){CK(c)}),CK(this,!0),DK(this)):this.g.classList.add("shaka-hidden")}ma(AK,UG);
AK.prototype.release=function(){this.video.remote&&this.h!=-1&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});UG.prototype.release.call(this)};
function CK(a,b){b=b===void 0?!1:b;var c,d;P(function(e){switch(e.g){case 1:if(a.controls.F.Kg()&&a.controls.sa||!a.video.remote){$G(a.g,!1);a.h!=-1&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.B(0);break}if(a.video.remote.state=="disconnected"||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;Qb().kg()&&a.player.l==Br&&a.player.sh()!="HLS"&&(h=!1);$G(a.g,h&&f&&!g)}else $G(a.g,!1)};sa(e,7);if(a.h==-1){e.B(9);break}return G(e,a.video.remote.cancelWatchAvailability(a.h),
10)}$G(a.g,!0);if(a.h==-1){e.B(0);break}return G(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.B(0);break;case 10:a.h=-1;case 9:ua(e,8);break;case 7:va(e);case 8:return sa(e,11),G(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;ua(e,0);break;case 11:va(e),c(!0),I(e)}})}function BK(a){var b=a.i?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}
function DK(a){a.i||(a.video.remote.state=="disconnected"?a.l.use("M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z"):a.l.use("M720-600v240q0 17-11.5 28.5T680-320h-87q-8 0-14.5-4.5T569-337q-29-81-81.5-147T364-596q-16-10-11.5-27t21.5-17h306q17 0 28.5 11.5T720-600ZM320-160q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125.5T518-201q2 17-9.5 29T480-160Zm-340 0q-25 0-42.5-17.5T80-220q0-25 17.5-42.5T140-280q25 0 42.5 17.5T200-220q0 25-17.5 42.5T140-160Zm740-560v480q0 33-23.5 56.5T800-160H638q-17 0-28.5-11.5T598-200q0-17 11.5-28.5T638-240h162v-480H160v6q0 17-11.5 28.5T120-674q-17 0-28.5-11.5T80-714v-6q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720Z"))}
S("shaka.ui.RemoteButton",AK);function EK(){}EK.prototype.create=function(a,b){return new AK(a,b)};XI("remote",new EK);rI("remote",new EK);function FK(a,b){AJ.call(this,a,b,"M480-120q-17 0-28.5-11.5T440-160v-160q0-17 11.5-28.5T480-360q17 0 28.5 11.5T520-320v40h280q17 0 28.5 11.5T840-240q0 17-11.5 28.5T800-200H520v40q0 17-11.5 28.5T480-120Zm-320-80q-17 0-28.5-11.5T120-240q0-17 11.5-28.5T160-280h160q17 0 28.5 11.5T360-240q0 17-11.5 28.5T320-200H160Zm160-160q-17 0-28.5-11.5T280-400v-40H160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h120v-40q0-17 11.5-28.5T320-600q17 0 28.5 11.5T360-560v160q0 17-11.5 28.5T320-360Zm160-80q-17 0-28.5-11.5T440-480q0-17 11.5-28.5T480-520h320q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H480Zm160-160q-17 0-28.5-11.5T600-640v-160q0-17 11.5-28.5T640-840q17 0 28.5 11.5T680-800v40h120q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680H680v40q0 17-11.5 28.5T640-600Zm-480-80q-17 0-28.5-11.5T120-720q0-17 11.5-28.5T160-760h320q17 0 28.5 11.5T520-720q0 17-11.5 28.5T480-680H160Z");
var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.h=W("span");this.h.classList.add("shaka-current-auto-quality");this.h.style.display="none";this.i=W("sup");this.i.classList.add("shaka-current-quality-mark");this.i.style.display="none";Array.from(a.classList).includes("shaka-overflow-menu")?this.parent.parentElement&&(this.g=Sj(this.parent.parentElement)):(this.g=W("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),
this.button.appendChild(this.g));a=W("span");this.button.childNodes[1].appendChild(a);a.appendChild(this.currentSelection);a.appendChild(this.h);a.appendChild(this.i);this.eventManager.o(this.localization,"locale-updated",function(){GK(c)});this.eventManager.o(this.localization,"locale-changed",function(){GK(c)});this.eventManager.o(this.player,"loading",function(){HK(c);IK(c)});this.eventManager.o(this.player,"loaded",function(){HK(c);IK(c)});this.eventManager.o(this.player,"unloading",function(){HK(c);
IK(c)});this.eventManager.o(this.player,"variantchanged",function(){HK(c);IK(c)});this.eventManager.o(this.player,"trackschanged",function(){HK(c);IK(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){HK(c);IK(c)});this.eventManager.o(this.player,"adaptation",function(){HK(c);IK(c)});HK(this)}ma(FK,AJ);
function IK(a){var b=a.player.getConfiguration().abr.enabled;if(a.player.Ld()){a.i.textContent="";a.i.style.display="none";a.g&&(a.g.textContent="",a.g.style.display="none");var c=a.player.Nb()||[],d=c.find(function(e){return e.active});d&&(b?(a.h.textContent=d.bandwidth?SK(a,d,c):"Unknown",a.h.style.display=""):a.h.style.display="none")}else c=a.player.getVideoTracks()||[],(d=c.find(function(e){return e.active}))?(b?(a.h.textContent=d.height&&d.width?TK(a,d,c):d.bandwidth?UK(d.bandwidth):"Unknown",
a.h.style.display=""):a.h.style.display="none",b=VK(a,d.width,d.height),a.i.textContent=b,a.i.style.display=b!==""?"":"none",a.g&&(a.g.textContent=b,a.g.style.display=b!==""?"":"none")):a.g&&(b=a.player.getStats(),b=VK(a,b.width,b.height),a.g.textContent=b,a.g.style.display=b!==""?"":"none")}
function VK(a,b,c){if(!b||!c)return"";c>b&&(c=t([c,b]),b=c.next().value,c=c.next().value);b/c>16/9&&(c=Math.round(b*9/16));a=a.controls.g.qualityMarks;return c>=8640?c+"p":c>=4320?a["4320"]:c>=2160?a["2160"]:c>=1440?a["1440"]:c>=1080?a["1080"]:c>=720?a["720"]:""}
function HK(a){var b=WG(a.menu);Tj(a.menu);a.menu.appendChild(b);b=0;b=a.player.Ld()?WK(a):XK(a);var c=Pj();c.classList.add("shaka-enable-abr-button");a.eventManager.o(c,"click",function(){a.player.configure({abr:{enabled:!0}});HK(a)});a.l=W("span");a.l.textContent=a.localization.resolve("AUTO_QUALITY");c.appendChild(a.l);a.player.getConfiguration().abr.enabled&&(c.ariaSelected="true",c.appendChild(ZG()),a.l.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(c);YG(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));GK(a);$G(a.button,b>0)}
function WK(a){var b=[];a.player.l==Fr||a.player.Ea()||(b=a.player.Nb()||[]);var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(l==1||l==2)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||l==3&&k.label!=c.label||!k.bandwidth?!1:!0}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
k.bandwidth})==l});b.sort(function(k,l){return l.bandwidth-k.bandwidth});for(var d=a.player.getConfiguration().abr.enabled,e=t(b),f=e.next(),g={};!f.done;g={Me:void 0},f=e.next()){g.Me=f.value;f=Pj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Me;a.player.configure({abr:{enabled:!1}});a.player.Ie(l,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.Me.bandwidth?SK(a,g.Me,b):"Unknown";f.appendChild(h);d||g.Me!=
c||(f.ariaSelected="true",f.appendChild(ZG()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function XK(a){var b=a.player.getVideoTracks()||[],c=b.find(function(m){return m.active});b=b.filter(function(m,n){return b.findIndex(function(q){var r=q.height==m.height&&q.bandwidth==m.bandwidth&&q.frameRate==m.frameRate&&q.hdr==m.hdr&&q.videoLayout==m.videoLayout&&Sc(q.roles,m.roles);r&&a.controls.g.showVideoCodec&&q.codecs&&m.codecs&&(r=jf(q.codecs)==jf(m.codecs));return r})==n});b.sort(function(m,n){return n.height==m.height||m.height==null||n.height==null?n.bandwidth-m.bandwidth:n.height-m.height});
for(var d=a.player.getConfiguration().abr.enabled,e=t(b),f=e.next(),g={};!f.done;g={nc:void 0},f=e.next()){g.nc=f.value;f=Pj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(m){return function(){var n=m.nc;a.player.configure({abr:{enabled:!1}});a.player.Ij(n,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.nc.height&&g.nc.width?TK(a,g.nc,b):g.nc.bandwidth?UK(g.nc.bandwidth):"Unknown";f.appendChild(h);var k=VK(a,g.nc.width,g.nc.height);if(k!==
""){var l=W("sup");l.classList.add("shaka-quality-mark");l.textContent=k;f.appendChild(l)}d||g.nc!=c||(f.ariaSelected="true",f.appendChild(ZG()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function TK(a,b,c){function d(m,n){return m!=n&&m.height==n.height&&m.hdr==n.hdr&&e(m)==e(n)&&Math.round(m.frameRate||0)==Math.round(n.frameRate||0)}function e(m){return m.codecs?jf(m.codecs).startsWith("dovi-"):!1}var f=b.height||0,g=b.width||0;f>g&&(f=t([f,g]),g=f.next().value,f=f.next().value);var h=f;g/f>16/9&&(h=Math.round(g*9/16));g=h+"p";f=new Set;h=t(c);for(var k=h.next();!k.done;k=h.next())k=k.value,k.frameRate&&f.add(Math.round(k.frameRate));f.size>1&&(f=b.frameRate)&&(f>=50||f<=20)&&(g+=
Math.round(b.frameRate));if(b.hdr=="PQ"||b.hdr=="HLG")g=e(b)?g+" Dolby Vision":g+" HDR";(b.videoLayout||"").includes("CH-STEREO")&&(g+=" 3D");if(c.some(function(m){return d(b,m)})&&(c.some(function(m){return d(b,m)&&m.bandwidth==b.bandwidth})||(g+=" ("+UK(b.bandwidth)+")"),a.controls.g.showVideoCodec)){var l=function(m){var n="";m&&(n=jf(m).toUpperCase());return n?" "+n:n};c.some(function(m){return d(b,m)&&l(m.codecs)!=l(b.codecs)})&&(g+=l(b.codecs))}return g}
function SK(a,b,c){var d=UK(b.bandwidth);if(a.controls.g.showAudioCodec){var e=function(f){var g="";f&&(g=jf(f).toUpperCase());return g?" "+g:g};c.some(function(f){return e(f.codecs)!=e(b.codecs)})&&(d+=e(b.codecs))}return d}function UK(a){return a>=1E6?(a/1E6).toFixed(1).replace(".0","")+" Mbps":Math.floor(a/1E3)+" Kbps"}
function GK(a){var b=a.player.Ld()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.l.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",FK);function YK(){}
YK.prototype.create=function(a,b){return new FK(a,b)};XI("quality",new YK);rI("quality",new YK);function ZK(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));(new VG(this.g)).use("M798-281 550-447q-9-6-13.5-14.5T532-480q0-10 4.5-18.5T550-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Zm-400 0L150-447q-9-6-13.5-14.5T132-480q0-10 4.5-18.5T150-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z");
this.parent.appendChild(this.g);$K(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){$K(c)});this.eventManager.o(this.localization,"locale-changed",function(){$K(c)});this.eventManager.o(this.g,"click",function(){if(c.controls.Da()&&c.video.duration){var d=c.h.indexOf(c.player.Za())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.sc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",
function(){c.g.setAttribute("shaka-status",c.player.Za()+"x")})}ma(ZK,UG);function $K(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",ZK);function aL(){}aL.prototype.create=function(a,b){return new ZK(a,b)};rI("rewind",new aL);function bL(a,b){UG.call(this,a,b);var c=this;this.j=this.controls.F;this.g=Pj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");new VG(this.g,"M480-337q-8 0-15-2.5t-13-8.5L308-492q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T365-549l75 75v-286q0-17 11.5-28.5T480-800q17 0 28.5 11.5T520-760v286l75-75q12-12 28.5-11.5T652-548q11 12 11.5 28T652-492L508-348q-6 6-13 8.5t-15 2.5ZM240-160q-33 0-56.5-23.5T160-240v-80q0-17 11.5-28.5T200-360q17 0 28.5 11.5T240-320v80h480v-80q0-17 11.5-28.5T760-360q17 0 28.5 11.5T800-320v80q0 33-23.5 56.5T720-160H240Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.h=W("span");this.h.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);cL(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){cL(c)});this.eventManager.o(this.localization,"locale-changed",function(){cL(c)});
this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.u;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download="videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.D,"vrstatuschanged",function(){dL(c)});this.eventManager.o(this.adManager,"ad-started",function(){dL(c)});this.eventManager.o(this.adManager,
"ad-stopped",function(){dL(c)});this.eventManager.o(this.player,"unloading",function(){dL(c)});this.eventManager.o(this.player,"loaded",function(){dL(c)});this.eventManager.o(this.video,"play",function(){dL(c)});this.eventManager.o(this.video,"pause",function(){dL(c)});this.eventManager.o(this.video,"seeking",function(){dL(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){dL(c)});dL(this)}ma(bL,UG);
function dL(a){var b=!0;a.controls.Xb()&&(b=!1);b&&a.j.Qa()&&(b=!1);b&&(a.player.drmInfo()||a.player.Ld())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&a.video.remote.state!="disconnected"&&(b=!1);$G(a.g,b)}function cL(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.h.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",bL);function eL(){}eL.prototype.create=function(a,b){return new bL(a,b)};XI("save_video_frame",new eL);
eH("save_video_frame",new eL);function fL(a,b){UG.call(this,a,b);var c=this;if(this.g=this.player.wf())this.h=Pj(),this.h.classList.add("shaka-skip-next-button"),this.h.classList.add("shaka-tooltip"),(new VG(this.h)).use("M660-280v-400q0-17 11.5-28.5T700-720q17 0 28.5 11.5T740-680v400q0 17-11.5 28.5T700-240q-17 0-28.5-11.5T660-280Zm-440-35v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T548-480q0 10-4.5 18.5T530-447L282-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z"),this.parent.appendChild(this.h),gL(this),hL(this),this.eventManager.o(this.localization,
"locale-updated",function(){gL(c)}),this.eventManager.o(this.localization,"locale-changed",function(){gL(c)}),this.eventManager.o(this.h,"click",function(){c.controls.Da()&&c.g.playItem(c.g.getCurrentItemIndex()+1)}),this.eventManager.o(this.g,"currentitemchanged",function(){hL(c)}),this.eventManager.o(this.g,"itemsinserted",function(){hL(c)}),this.eventManager.o(this.g,"itemsremoved",function(){hL(c)}),this.eventManager.o(this.player,"loading",function(){hL(c)})}ma(fL,UG);
function gL(a){a.h.ariaLabel=a.localization.resolve("SKIP_NEXT")}function hL(a){var b=a.g.getItems().length;b=b>1&&a.g.getCurrentItemIndex()+1<b;$G(a.h,b)}S("shaka.ui.SkipNextButton",fL);function iL(){}iL.prototype.create=function(a,b){return new fL(a,b)};rI("skip_next",new iL);function jL(a,b){UG.call(this,a,b);var c=this;if(this.g=this.player.wf())this.h=Pj(),this.h.classList.add("shaka-skip-previous-button"),this.h.classList.add("shaka-tooltip"),(new VG(this.h)).use("M220-280v-400q0-17 11.5-28.5T260-720q17 0 28.5 11.5T300-680v400q0 17-11.5 28.5T260-240q-17 0-28.5-11.5T220-280Zm458-1L430-447q-9-6-13.5-14.5T412-480q0-10 4.5-18.5T430-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z"),this.parent.appendChild(this.h),kL(this),lL(this),this.eventManager.o(this.localization,
"locale-updated",function(){kL(c)}),this.eventManager.o(this.localization,"locale-changed",function(){kL(c)}),this.eventManager.o(this.h,"click",function(){c.controls.Da()&&c.g.playItem(c.g.getCurrentItemIndex()-1)}),this.eventManager.o(this.g,"currentitemchanged",function(){lL(c)}),this.eventManager.o(this.g,"itemsinserted",function(){lL(c)}),this.eventManager.o(this.g,"itemsremoved",function(){lL(c)}),this.eventManager.o(this.player,"loading",function(){lL(c)})}ma(jL,UG);
function kL(a){a.h.ariaLabel=a.localization.resolve("SKIP_PREVIOUS")}function lL(a){var b=a.g.getItems().length>1&&a.g.getCurrentItemIndex()>0;$G(a.h,b)}S("shaka.ui.SkipPreviousButton",jL);function mL(){}mL.prototype.create=function(a,b){return new jL(a,b)};rI("skip_previous",new mL);function nL(a,b){gH.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("shaka-tooltip")}ma(nL,gH);S("shaka.ui.SmallPlayButton",nL);function oL(){}oL.prototype.create=function(a,b){return new nL(a,b)};rI("play_pause",new oL);function pL(a,b){UG.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}ma(pL,UG);S("shaka.ui.Spacer",pL);function qL(){}qL.prototype.create=function(a,b){return new pL(a,b)};rI("spacer",new qL);function rL(a,b){function c(m){m=parseInt(l.g[m],10);return m>2E9?(m/1E9).toFixed(2)+"GB":m>1E6?(m/1E6).toFixed(2)+"MB":m>1E3?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return aH(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}UG.call(this,a,b);var l=this;this.i=Pj();this.i.classList.add("shaka-statistics-button");
this.u=new VG(this.i,"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.A=W("span");a.appendChild(this.A);this.l=W("span");this.l.classList.add("shaka-current-selection-span");a.appendChild(this.l);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");
this.controls.i.appendChild(this.h);this.D=[];this.F=["stateHistory","switchHistory"];this.g=this.player.getStats();this.m=new Map;this.C=(new Map).set("width",k).set("height",k).set("currentCodecs",function(m){return l.g[m]}).set("completionPercent",function(m){return l.g[m]+" (%)"}).set("bufferingTime",g).set("drmTimeSeconds",g).set("licenseTime",g).set("liveLatency",g).set("loadLatency",g).set("manifestTimeSeconds",g).set("estimatedBandwidth",f).set("streamBandwidth",f).set("maxSegmentDuration",
g).set("pauseTime",e).set("playTime",e).set("corruptedFrames",h).set("decodedFrames",h).set("droppedFrames",h).set("stallsDetected",function(m){return l.g[m]+" (stalls)"}).set("gapsJumped",d).set("manifestSizeBytes",c).set("bytesDownloaded",c).set("nonFatalErrorCount",function(m){return l.g[m]+" (errors)"}).set("manifestPeriodCount",function(m){return l.g[m]+" (periods)"}).set("manifestGapCount",d);this.j=new Df(function(){l.g=l.player.getStats();for(var m=t(l.D),n=m.next();!n.done;n=m.next()){var q=
n.value;n=l.m.get(q);n.textContent=l.C.get(q)(q);n&&n.parentElement&&(q=l.g[q],typeof q=="string"?$G(n.parentElement,q!=""):$G(n.parentElement,!isNaN(q)))}});sL(this);tL(this);this.eventManager.o(this.localization,"locale-updated",function(){sL(l)});this.eventManager.o(this.localization,"locale-changed",function(){sL(l)});this.eventManager.o(this.i,"click",function(){uL(l);sL(l)})}ma(rL,UG);
function uL(a){a.h.classList.contains("shaka-hidden")?(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-440q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),a.j.xa(.1),
$G(a.h,!0)):(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),
a.j.stop(),$G(a.h,!1))}function sL(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.l.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}function vL(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.C.get(b)(b);c.appendChild(d);a.m.set(b,d);return c}
function tL(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=(new VG(b,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z")).g;c.classList.add("material-icons","notranslate");a.h.appendChild(b);a.eventManager.o(c,"click",function(){uL(a)});b=t(a.controls.g.statisticsList);
for(c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.F.includes(c)){var d=vL(a,c);a.h.appendChild(d);a.D.push(c)}else bb("Unrecognized statistic element:",c)}rL.prototype.release=function(){this.j.stop();this.j=null;UG.prototype.release.call(this)};S("shaka.ui.StatisticsButton",rL);function wL(){}wL.prototype.create=function(a,b){return new rL(a,b)};XI("statistics",new wL);eH("statistics",new wL);function xL(a,b){AJ.call(this,a,b,"M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h560q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H200Zm80-200h120q17 0 28.5-11.5T440-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T400-600H280q-17 0-28.5 11.5T240-560v160q0 17 11.5 28.5T280-360Zm400-240H560q-17 0-28.5 11.5T520-560v160q0 17 11.5 28.5T560-360h120q17 0 28.5-11.5T720-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T680-600Z");
var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Wc()?this.button.ariaPressed="true":this.button.ariaPressed="false";yL(this);this.eventManager.o(this.localization,"locale-updated",function(){zL(c);AL(c)});this.eventManager.o(this.localization,"locale-changed",function(){zL(c);AL(c)});this.eventManager.o(this.player,"loading",function(){BL(c);AL(c)});this.eventManager.o(this.player,
"loaded",function(){BL(c);AL(c)});this.eventManager.o(this.player,"unloading",function(){BL(c);AL(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){BL(c);AL(c)});this.eventManager.o(this.player,"textchanged",function(){AL(c)});this.eventManager.o(this.player,"trackschanged",function(){AL(c)});BL(this);zL(this);AL(this)}ma(xL,AJ);function yL(a){var b=Pj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(ZG());a.g=W("span");b.appendChild(a.g)}
function BL(a){a.player.Wc()?(a.icon.use("M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h560q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H200Zm80-200h120q17 0 28.5-11.5T440-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T400-600H280q-17 0-28.5 11.5T240-560v160q0 17 11.5 28.5T280-360Zm400-240H560q-17 0-28.5 11.5T520-560v160q0 17 11.5 28.5T560-360h120q17 0 28.5-11.5T720-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T680-600Z"),
a.button.ariaPressed="true"):(a.icon.use("M791-57 687-160H200q-33 0-56.5-23.5T120-240v-487l-65-65q-12-12-12-28.5T55-849q12-12 28.5-12t28.5 12l736 736q12 12 12 28t-12 28q-12 12-28.5 12T791-57ZM280-360h120q17 0 28.5-11.5T440-400v-25q0-8-6-14t-14-6h-20q-8 0-14 6t-6 14v5h-80v-127l-45-45v1q-7 5-11 13t-4 18v160q0 17 11.5 28.5T280-360Zm560-360v388q0 27-24.5 37.5T772-303l-66-66q7-5 10.5-13.5T720-400v-20q0-8-6-14t-14-6h-20q-8 0-14 6t-6 14h-5l-75-75v-45h80v5q0 8 6 14t14 6h20q8 0 14-6t6-14v-25q0-17-11.5-28.5T680-600H560q-17 0-28.5 11.5T520-560v5L343-732q-19-19-8.5-43.5T372-800h388q33 0 56.5 23.5T840-720Z"),
a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
function AL(a){var b=a.player.zc()||[];zJ(b,a.menu,function(d){return CL(a,d)},a.player.Wc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat);var c=Pj();c.classList.add("shaka-turn-captions-off-button");a.eventManager.o(c,"click",function(){a.player.Zd(!1);AL(a)});c.appendChild(a.g);a.menu.appendChild(c);a.player.Wc()?a.g.classList.remove("shaka-chosen-item"):(c.ariaSelected="true",c.appendChild(ZG()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);YG(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"));$G(a.button,b.length>0)}function CL(a,b){return P(function(c){if(c.g==1)return a.player.fg(b),G(c,a.player.Zd(!0),2);a.player.configure({preferredTextLanguage:b.language,preferForcedSubs:b.forced});I(c)})}
function zL(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}S("shaka.ui.TextSelection",xL);function DL(){}DL.prototype.create=function(a,b){return new xL(a,b)};XI("captions",new DL);rI("captions",new DL);function EL(a,b){UG.call(this,a,b);var c=this;this.g=Pj();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";new VG(this.g,"M620-360H520q-8 0-14-6t-6-14v-200q0-8 6-14t14-6h100q17 0 28.5 11.5T660-560v160q0 17-11.5 28.5T620-360Zm-200 0h-90q-13 0-21.5-8.5T300-390q0-13 8.5-21.5T330-420h70v-40h-40q-8 0-14-6t-6-14q0-8 6-14t14-6h40v-40h-70q-13 0-21.5-8.5T300-570q0-13 8.5-21.5T330-600h90q17 0 28.5 11.5T460-560v160q0 17-11.5 28.5T420-360Zm140-60h40v-120h-40v120Zm280-20q-17 0-28.5-11.5T800-480q0-115-72.5-203T542-794l30 30q11 11 11 28t-11 28q-11 11-28 11t-28-11L387-837q-8-8-4.5-20t14.5-15q20-5 41-6.5t42-1.5q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 17-11.5 28.5T840-440ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-17 11.5-28.5T120-520q17 0 28.5 11.5T160-480q0 115 72.5 203T418-166l-30-30q-11-11-11-28t11-28q11-11 28-11t28 11l129 129q8 8 4.5 20T563-88q-20 5-41 6.5T480-80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);FL(this);this.eventManager.o(this.localization,"locale-updated",function(){FL(c)});this.eventManager.o(this.localization,"locale-changed",function(){FL(c)});var d=this.controls.D;this.eventManager.o(this.g,"click",
function(){c.controls.Da()&&d.$d()});this.eventManager.o(d,"vrstatuschanged",function(){$G(c.g,c.controls.Xb())});$G(this.g,this.controls.Xb())}ma(EL,UG);function FL(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.i.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}S("shaka.ui.ToggleStereoscopicButton",EL);function GL(){}GL.prototype.create=function(a,b){return new EL(a,b)};XI("toggle_stereoscopic",new GL);rI("toggle_stereoscopic",new GL);function HL(a,b){oH.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.g.alwaysShowVolumeBar||this.container.classList.add("shaka-volume-bar-container-allow-hiding");this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return IL(c)});this.eventManager.o(this.player,"loading",function(){return IL(c)});this.eventManager.o(this.player,"loaded",function(){return JL(c)});this.eventManager.o(this.player,"unloading",function(){return JL(c)});
this.eventManager.o(this.player,"trackschanged",function(){return JL(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){return IL(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return KL(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return KL(c)});this.eventManager.o(this.adManager,"ad-started",function(){return JL(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){JL(c);IL(c)});this.eventManager.o(this.localization,"locale-updated",
function(){return LL(c)});this.eventManager.o(this.localization,"locale-changed",function(){return LL(c)});IL(this);LL(this);if(this.ad)this.onChange();JL(this)}ma(HL,oH);HL.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.volume>0&&(this.video.muted=!1))};function IL(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume*100);ML(a)}function KL(a){var b=a.ad.getVolume();a.setValue(b*100);ML(a)}
function ML(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function LL(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}function JL(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.Gh()&&(b=!1);$G(a.container,b)}S("shaka.ui.VolumeBar",HL);function NL(){}NL.prototype.create=function(a,b){return new HL(a,b)};rI("volume",new NL);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();

//# sourceMappingURL=shaka-player.ui.map