Advanced_DRM_Player/libs/shaka-player.ui.js

2072 lines
904 KiB
JavaScript
Raw Normal View History

2025-06-19 04:02:44 +02:00
/*
@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;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{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&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function u(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=u(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Jn=b.prototype}function qa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.B=this.i=null}function ra(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}qa.prototype.u=function(a){this.h=a};
function sa(a,b){a.i={Li:b,Xi:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function H(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function wa(a,b,c){a.g=b;a.m=c||0}function xa(a,b){a.m=b||0;b=a.i.Li;a.i=null;return b}function ya(a){a.B=[a.i];a.m=0;a.j=0}
function Ba(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.Xi?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function Ca(a){this.g=new qa;this.h=a}function Da(a,b){ra(a.g);var c=a.g.l;if(c)return Fa(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 Fa(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.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(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.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Xi)throw b.Li;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ha(a){this.next=function(b){ra(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ga(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Ga(a));return b};this.return=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(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 Q(a){return Ia(new Ha(new Ca(a)))}function Ja(){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.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.B()};b.prototype.G=function(){var g=this;e(function(){if(g.C()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
function(){if(this.s)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.H=function(g){var h=this.j();g.cf(h.resolve,h.reject)};b.prototype.I=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"function"==typeof q?function(t){try{l(q(t))}catch(w){m(w)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.cf(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.cf=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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=u(g),m=l.next();!m.done;m=l.next())d(m.value).cf(h,k)})};b.all=function(g){var h=u(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(t){return function(w){q[t]=w;r--;0==r&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).cf(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function La(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=u(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!La(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!La(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&La(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&La(k,
g)&&La(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&La(k,g)&&La(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.wc=h.next=h.head=h}function c(h,k){var l=h[1];return ha(function(){if(l){for(;l.head!=h[1];)l=l.wc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&La(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=u(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(u([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],wc:this[1].wc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].wc.next=l.entry,this[1].wc=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.wc.next=
h.entry.next,h.entry.next.wc=h.entry.wc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].wc=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 Oa(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 Oa(this,function(b){return b})}});
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=u(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(u([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Array.prototype.values",function(a){return a?a:function(){return Oa(this,function(b,c){return c})}});
fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(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 Qa(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Qa(this,b,"includes").indexOf(b,c||0)}});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(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
function Ra(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{Ui:e,v:f}}return{Ui:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ra(this,b,c).Ui}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=u(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 Ra(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Qa(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)La(b,d)&&c.push([d,b[d]]);return c}});
var Sa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)La(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Sa});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 Oa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Qa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)});
fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(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=Qa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Ta(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]}
fa("Array.prototype.at",function(a){return a?a:Ta});function Va(a){return a?a:Ta}fa("Int8Array.prototype.at",Va);fa("Uint8Array.prototype.at",Va);fa("Uint8ClampedArray.prototype.at",Va);fa("Int16Array.prototype.at",Va);fa("Uint16Array.prototype.at",Va);fa("Int32Array.prototype.at",Va);fa("Uint32Array.prototype.at",Va);fa("Float32Array.prototype.at",Va);fa("Float64Array.prototype.at",Va);fa("String.prototype.at",function(a){return a?a:Ta});var Wa=this||self;
function S(a,b){a=a.split(".");var c=Wa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?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 U(a,b){if(b)if(b instanceof Map)for(var c=u(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 Xa(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
var Ya={vm:"abrstatuschanged",wm:"adaptation",xm:"audiotrackchanged",ym:"audiotrackschanged",zm:"boundarycrossed",Am:"buffering",Bm:"canupdatestarttime",Cm:"complete",Dm:"currentitemchanged",Em:"downloadcompleted",Fm:"downloadfailed",Gm:"downloadheadersreceived",Hm:"drmsessionupdate",Jm:"emsg",Pm:"itemsinserted",Qm:"itemsremoved",hn:"prft",Error:"error",Km:"expirationupdated",Lm:"firstquartile",Mm:"gapjumped",Rm:"keystatuschanged",Vm:"loaded",Wm:"loading",Ym:"manifestparsed",Zm:"manifestupdated",
$m:"mediaqualitychanged",an:"mediasourcerecovered",cn:"metadataadded",Metadata:"metadata",dn:"midpoint",fn:"nospatialvideoinfo",gn:"onstatechange",jn:"ratechange",nn:"segmentappended",on:"sessiondata",pn:"spatialvideoinfo",qn:"stalldetected",rn:"started",sn:"statechanged",tn:"streaming",un:"textchanged",vn:"texttrackvisibility",wn:"thirdquartile",xn:"timelineregionadded",yn:"timelineregionenter",zn:"timelineregionexit",An:"trackschanged",Cn:"unloading",En:"variantchanged"};function Za(){}function $a(){}function ab(){}function bb(a){var b=Ja.apply(1,arguments);cb.has(a)||(cb.add(a),ab.apply(Za,x(b)))}function db(){}function gb(){}function hb(){}var cb=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Ja.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Ja.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Ja.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Ja.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Ja.apply(0,arguments)))}),
ab=function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))},$a=function(){console.error.apply(console,x(Ja.apply(0,arguments)))});function ib(){this.g=new Map}p=ib.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 jb(){this.gb=new ib;this.Pe=this}jb.prototype.addEventListener=function(a,b){this.gb&&this.gb.push(a,b)};jb.prototype.removeEventListener=function(a,b){this.gb&&this.gb.remove(a,b)};jb.prototype.dispatchEvent=function(a){if(!this.gb)return!0;var b=this.gb.get(a.type)||[],c=this.gb.get("All");c&&(b=b.concat(c));b=u(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Pe;a.currentTarget=this.Pe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
jb.prototype.release=function(){this.gb=null};function kb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function lb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function nb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function ob(a,b){var c=[];a=u(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 pb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
@license
Copyright 2006 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/
function qb(a){var b;a instanceof qb?(rb(this,a.hc),this.nd=a.nd,tb(this,a.Fb),ub(this,a.Gd),this.ub=a.ub,vb(this,a.g.clone()),this.Sc=a.Sc):a&&(b=String(a).match(pb))?(rb(this,b[1]||"",!0),this.nd=wb(b[2]||""),tb(this,b[3]||"",!0),ub(this,b[4]),this.ub=wb(b[5]||"",!0),vb(this,b[6]||"",!0),this.Sc=wb(b[7]||"")):this.g=new yb(null)}p=qb.prototype;p.hc="";p.nd="";p.Fb="";p.Gd=null;p.ub="";p.Sc="";
p.toString=function(){var a=[],b=this.hc;b&&a.push(zb(b,Ab,!0),":");if(b=this.Fb){a.push("//");var c=this.nd;c&&a.push(zb(c,Ab,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Gd;null!=b&&a.push(":",String(b))}if(b=this.ub)this.Fb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zb(b,"/"==b.charAt(0)?Bb:Cb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Sc)&&a.push("#",zb(b,Db));return a.join("")};
p.resolve=function(a){var b=this.clone();"data"===b.hc&&(b=new qb);var c=!!a.hc;c?rb(b,a.hc):c=!!a.nd;c?b.nd=a.nd:c=!!a.Fb;c?tb(b,a.Fb):c=null!=a.Gd;var d=a.ub;if(c)ub(b,a.Gd);else if(c=!!a.ub){if("/"!=d.charAt(0))if(this.Fb&&!this.ub)d="/"+d;else{var e=b.ub.lastIndexOf("/");-1!=e&&(d=b.ub.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ub=d:c=""!==a.g.toString();c?vb(b,a.g.clone()):c=!!a.Sc;c&&(b.Sc=a.Sc);return b};p.clone=function(){return new qb(this)};function rb(a,b,c){a.hc=c?wb(b,!0):b;a.hc&&(a.hc=a.hc.replace(/:$/,""))}function tb(a,b,c){a.Fb=c?wb(b,!0):b}function ub(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Gd=b}else a.Gd=null}
function vb(a,b,c){b instanceof yb?a.g=b:(c||(b=zb(b,Eb)),a.g=new yb(b))}function wb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ab=/[#\/\?@]/g,Cb=/[#\?:]/g,Bb=/[#\?]/g,Eb=/[#\?@]/g,Db=/#/g;function yb(a){this.g=a||null}
function Gb(a){if(!a.mb&&(a.mb=new Map,a.Xd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}p=yb.prototype;p.mb=null;p.Xd=null;function Hb(a){Gb(a);return a.Xd}p.add=function(a,b){Gb(this);this.g=null;var c=this.mb.has(a)?this.mb.get(a):null;c||this.mb.set(a,c=[]);c.push(b);this.Xd++;return this};
p.set=function(a,b){Gb(this);this.g=null;this.mb.has(a)?this.mb.set(a,[b]):this.add(a,b);return this};p.get=function(a){Gb(this);return this.mb.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.mb||!this.mb.size)return"";for(var a=[],b=u(this.mb.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.mb.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 yb;a.g=this.g;if(this.mb){for(var b=new Map,c=u(this.mb),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.mb=b;a.Xd=this.Xd}return a};function Ib(){}function Jb(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=Kb(a);b=Kb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Lb(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Kb(a,b,c){c=void 0===c?Infinity:c;return Mb(a,void 0===b?0:b,c,Uint8Array)}function Nb(a,b,c){c=void 0===c?Infinity:c;return Mb(a,void 0===b?0:b,c,Uint16Array)}function Ob(a,b,c){c=void 0===c?Infinity:c;return Mb(a,void 0===b?0:b,c,DataView)}
function Mb(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",Ib);Ib.toDataView=Ob;Ib.toUint16=Nb;Ib.toUint8=Kb;Ib.toArrayBuffer=Lb;Ib.equal=Jb;function V(a,b,c){var d=Ja.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(Pb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}V.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",V);var Pb=!0;V.Severity={RECOVERABLE:1,CRITICAL:2};V.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
V.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:4054,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 Qb(a){this.h=a;this.g=void 0}Qb.prototype.value=function(){void 0===this.g&&(this.g=this.h());return this.g};/*
@license
Shaka Player
Copyright 2025 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function Rb(){return Sb.value()}var Tb=null,Ub=null,Sb=new Qb(function(){var a=void 0;Tb&&(a=Tb());!a&&Ub&&(a=Ub());return a});function Vb(){}
function Wb(a){if(!a)return"";a=Kb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Rb().Zh())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&$a('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;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&
128==(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)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 Xb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new V(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ob(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Yb(d)}
function Zb(a){function b(d){return c.byteLength<=d||9<=c[d]&&126>=c[d]}if(!a)return"";var c=Kb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Wb(c);if(254==c[0]&&255==c[1])return Xb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Xb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Xb(a,!1);if(0==c[1]&&0==c[3])return Xb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Wb(a);throw new V(2,2,2003);}
function $b(a){if(window.TextEncoder&&!Rb().Zh()){var b=new TextEncoder;return Lb(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 Lb(b)}function ac(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Yb(a){return bc.value()(a)}
function cc(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="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Vb);Vb.resetFromCharCode=function(){bc.g=void 0};
Vb.toUTF16=ac;Vb.toUTF8=$b;Vb.fromBytesAutoDetect=Zb;Vb.fromUTF16=Xb;Vb.fromUTF8=Wb;var bc=new Qb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Lc:65536};0<b.Lc;b={Lc:b.Lc},b.Lc/=2)if(a(b.Lc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Lc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Lc));return e}}(b);return null});function dc(){}function ec(a){a=Yb(Kb(a));return btoa(a)}function gc(a,b){b=void 0==b?!0:b;a=ec(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function hc(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 ic(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
function jc(a){var b=Kb(a);a="";b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function kc(){for(var a=Ja.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)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(Kb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",dc);dc.concat=kc;dc.toHex=jc;dc.fromHex=ic;dc.fromBase64=hc;dc.toBase64=gc;
dc.toStandardBase64=ec;function lc(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new qb(a[0]);b=new qb(b[0]);b=d.resolve(b);c&&vb(b,c);return[b.toString()]}b=b.map(function(h){return new qb(h)});d=[];a=u(a);for(var e=a.next();!e.done;e=a.next()){e=new qb(e.value);for(var f=u(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 mc(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 nc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=gc(ic(h),!1));var l=g;22!=l.length&&(l=gc(ic(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:Kb($b(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 oc(a,b){if(1==b.length)return b[0];a=pc(a,b);if(null!=a)return a;throw new V(2,4,4025,b);}function pc(a,b){var c=qc.get(a);c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==rc?"":null}
function sc(a,b){var c=[];a=qc.get(a);a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var rc="text",uc={Ea:"video",ba:"audio",Xa:rc,pg:"image",tm:"application"},vc=1/15,qc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).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]&&1==a.length&&2==b.length}function Ac(a,b){a=yc(a);b=yc(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
function yc(a){a=u(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=u(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":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 Ec(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=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Bc.get(a)||a}function Fc(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 Gc(a,b){a=yc(a);var c=new Set;b=u(b);for(var d=b.next();!d.done;d=b.next())c.add(yc(d.value));b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,zc(d,a))return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Ac(d,a))return d;c=u(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=Gc;wc.getLocaleForVariant=Fc;
wc.getLocaleForText=function(a){return yc(a.language||"und")};wc.getBase=Dc;wc.relatedness=Ec;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 Hc(a){jb.call(this);this.j=yc(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Hc,jb);p=Hc.prototype;p.release=function(){jb.prototype.release.call(this)};
p.Ci=function(a){var b=this;this.g.clear();a=u(a);for(var c=a.next();!c.done;c=a.next())this.g.add(yc(c.value));Ic(this);a=ob(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new U("unknown-locales",(new Map).set("locales",a)));a=ob(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new U("locale-changed",a))};
p.Va=function(a,b,c){a=yc(a);void 0===c&&(c=Jc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Jc||d.set(f,e)});this.h.set(a,d);Ic(this);this.dispatchEvent(new U("locale-updated"));return this};p.Yl=function(a){for(var b=u(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 U("unknown-localization",a));return""};
p.Ck=function(){return this.g};
function Ic(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=u(d),g=f.next(),h={};!g.done;h={oe:void 0},g=f.next()){h.oe=g.value;e.add(h.oe);e.add(Dc(h.oe));g=ob(b.keys(),function(l){return function(m){return Cc(m,l.oe)}}(h));g.sort();g=u(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=ob(b.keys(),function(l){return function(m){return Dc(m)==l.oe}}(h));h.sort();h=u(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=u(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
c.reverse();a.i.clear();b=u(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=u(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,Kc(f,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new U("missing-localizations",d)))}function Kc(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}S("shaka.ui.Localization",Hc);Hc.prototype.getCurrentLocales=Hc.prototype.Ck;
Hc.prototype.resolve=Hc.prototype.resolve;Hc.prototype.resolveDictionary=Hc.prototype.Yl;Hc.prototype.insert=Hc.prototype.Va;Hc.prototype.changeLocale=Hc.prototype.Ci;Hc.prototype.release=Hc.prototype.release;var Jc=1;Hc.ConflictResolution={USE_OLD:0,USE_NEW:Jc};Hc.UNKNOWN_LOCALES="unknown-locales";Hc.UNKNOWN_LOCALIZATION="unknown-localization";Hc.MISSING_LOCALIZATIONS="missing-localizations";Hc.LOCALE_CHANGED="locale-changed";Hc.LOCALE_UPDATED="locale-updated";function Lc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Lc.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 Mc(a){return a.h/(1-Math.pow(a.g,a.i))};function Nc(){this.h=new Lc(2);this.j=new Lc(5);this.g=0;this.i=128E3;this.l=16E3}Nc.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)};Nc.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)}};Nc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Mc(this.h),Mc(this.j))};function Oc(){this.g=new ib}p=Oc.prototype;p.release=function(){this.Sa();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Pc(a,b,c,d),this.g.push(b,a))};p.qa=function(a,b,c,d){function e(g){f.Ca(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.Ca=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ca(),this.g.remove(b,e))}};
p.Sa=function(){if(this.g){for(var a=[],b=u(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value));a=u(a);for(b=a.next();!b.done;b=a.next())b.value.Ca();this.g.g.clear()}};S("shaka.util.EventManager",Oc);Oc.prototype.removeAll=Oc.prototype.Sa;Oc.prototype.unlisten=Oc.prototype.Ca;Oc.prototype.listenOnce=Oc.prototype.qa;Oc.prototype.listen=Oc.prototype.o;Oc.prototype.release=Oc.prototype.release;
function Pc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Qc(a,d);this.target.addEventListener(b,c,this.g)}Pc.prototype.Ca=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Qc(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Rc(a)?b:b.capture||!1}
function Rc(a){var b=Sc;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Sc=b}return b||!1}var Sc=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Tc(a,b){this.g=a;this.h=b}Tc.prototype.toString=function(){return"v"+this.g+"."+this.h};function Uc(a,b){var c=new Tc(5,0),d=Vc,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Wc(a,b,c,d){ab([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Xc(a,b,c,d){$a([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Vc=null;function Yc(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.s=d;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Uc("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||ab(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&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 Zc(a,b,c,d){"video"!==d.type||a.s&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.s)}function $c(a){a.g&&a.i.classList.add("shaka-hidden")}Yc.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ad(a){return a&&"undefined"!==typeof LCEVCdec?"lvc1"==a.codecs:!1}S("shaka.lcevc.Dec",Yc);Yc.prototype.release=Yc.prototype.release;function bd(a){if(cd.has(a))return cd.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),cd.set(a,b),b):!1}function dd(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function ed(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var cd=new Map;function fd(){}fd.prototype.extract=function(){};fd.prototype.decode=function(){return[]};fd.prototype.clear=function(){};fd.prototype.getStreams=function(){return[]};function gd(){}gd.prototype.init=function(){};gd.prototype.parse=function(){return[]};function hd(){}p=hd.prototype;p.init=function(){};p.Nf=function(){};p.Rd=function(){};p.remove=function(){};p.qg=function(){};S("shaka.media.IClosedCaptionParser",hd);function id(a){this.h=new Map;this.i=0;this.j=new gd;if(a=jd(a.toLowerCase()))this.j=a();this.g=new fd;if(a=kd)this.g=a(),this.h.set(this.i,this.g)}p=id.prototype;
p.init=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?-1:c;if(-1!=c&&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=kd)this.g=d();this.h.set(b,this.g)}}else b||this.Rd();this.j.init(a);-1!=c&&(this.i=c)};p.Nf=function(a){a=this.j.parse(a);a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Kb(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};p.Rd=function(){this.g.clear()};
p.remove=function(a){a=void 0===a?[]:a;a=new Set(a);for(var b=u(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.qg=function(){return this.g.getStreams()};function ld(a,b){nd.set(a,b)}function jd(a){return nd.get(a)}S("shaka.media.ClosedCaptionParser",id);id.findDecoder=function(){return kd};id.unregisterDecoder=function(){kd=null};id.registerDecoder=function(a){kd=a};id.findParser=jd;id.unregisterParser=function(a){nd.delete(a)};
id.registerParser=ld;var nd=new Map,kd=null;function od(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=pd;this.scroll=qd}S("shaka.text.CueRegion",od);var pd=1;od.units={PX:0,PERCENTAGE:pd,LINES:2};var qd="";od.scrollMode={NONE:qd,UP:"up"};function rd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function sd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function td(a,b,c){c||(c=rd);if(a.length!=b.length)return!1;b=b.slice();a=u(a);for(var d=a.next(),e={};!d.done;e={Zi:void 0},d=a.next()){e.Zi=d.value;d=b.findIndex(function(f){return function(g){return c(f.Zi,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
function ud(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=rd);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 vd(a){this.h=a||"";this.g=0}function wd(a){yd(a,/[ \t]+/gm)}function yd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function zd(a){return a.g==a.h.length?null:(a=yd(a,/[^ \t\n]*/gm))?a[0]:null}
function Ad(a){a=yd(a,Bd);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function Cd(a){return a?Ad(new vd(a)):null}var Bd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Dd(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 Ed(a){var b={},c;for(c in a)b[c]=a[c];return b}
function Fd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];void 0!==e&&(e=Fd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if("function"==typeof a)a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=u(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],void 0!==e&&(e=Fd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a};/*
@license
tXml
Copyright 2015 Tobias Nickel
SPDX-License-Identifier: MIT
*/
function Gd(a,b){var c=void 0===c?!1:c;a=Zb(a);return Hd(a,b,c)}function Hd(a,b,c){a=Id(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function Jd(a){return Kd.has(a)?Kd.get(a):""}
function Id(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)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(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(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=[];62!==a.charCodeAt(e)&&a[e];){var q=a.charCodeAt(e);if(64<q&&91>q||96<q&&123>q){q=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
r)&&62!==r;)e++,r=a.charCodeAt(e);var t=e+1;e=a.indexOf(a[e],t);t=a.slice(t,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else t=null,e--;if(q.startsWith("xmlns:")){r=t;var w=q.split(":")[1];Kd.set(r,w);Ld.set(w,r)}"tt"===m&&"xml:space"===q&&"preserve"===t&&(l=!0);n[q]=t}e++}47!==a.charCodeAt(e-1)?(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],"string"!==typeof q?b&&(q.parent=l):n==m-1&&"\n"==q&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function Md(a){return"string"===typeof a}function Nd(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function Od(a,b){var c=[];if(!a.children)return[];a=u(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function Pd(a){if("string"===typeof a)return cc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:cc(a)}
function Qd(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=Pd(a))&&(a=a.trim());return a}function Rd(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())Rd(d.value,b,c)}return c}function Sd(a,b){a=Od(a,b);return 1!=a.length?null:a[0]}function Td(a,b,c){a=Ud(a,b,c);return 1!=a.length?null:a[0]}
function Vd(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function Wd(a,b,c){b=Jd(b);return a.attributes[b+":"+c]||null}function Ud(a,b,c){var d=Jd(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=u(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function Xd(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=Wd(a,d.value,c))return d;return null}
function Yd(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 Zd(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 $d(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 ae(a){a=Number(a);return 0===a%1?a:null}function be(a){a=Number(a);return 0===a%1&&0<a?a:null}function ce(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ee(a){a=Number(a);return isNaN(a)?null:a}function fe(a){return a?"true"===a.toLowerCase():!1}
function ge(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function he(a){var b=[];a=cc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=u(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,zc:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].zc=c.slice(1))}return b}
function ie(a,b){var c=he(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=je(a,"t",d.t)),null!==d.n&&(c=je(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.zc)&&a[c]?ke(a[c],e,d,Qd(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
function je(a,b,c){var d=0;a=u(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function ke(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
function le(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=Ld.has(b)?Ld.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=u(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=le(d),b.appendChild(c);return b}
function me(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ed(a.attributes),children:[],parent:null};a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=me(c),c.parent=b,b.children.push(c));return b}var Kd=new Map,Ld=new Map;function ne(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new od;this.position=null;this.positionAlign=oe;this.size=0;this.textAlign=pe;this.direction=qe;this.writingMode=se;this.lineInterpretation=te;this.line=null;this.lineHeight="";this.lineAlign=ue;this.displayAlign=ve;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=we;this.fontStyle=xe;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={Qc:32,rows:15}}function ye(a,b){a=new ne(a,b,"");a.lineBreak=!0;return a}ne.prototype.clone=function(){var a=new ne(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function Ae(a,b){if(a.payload!=b.payload||!(.001>Math.abs(a.startTime-b.startTime)&&.001>Math.abs(a.endTime-b.endTime)))return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!ud(a.nestedCues,b.nestedCues,Ae))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!ud(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function De(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&Ee(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(Fe)&&c.push(e),e=-1);c=u(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(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){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,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=u(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="";try{var m=Hd("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
m.length||m[0].tagName)for(m=u(m),c=m.next();!c.done;c=m.next())He(c.value,a,b);else a.payload=cc(c);else a.payload=cc(c)}else a.payload=cc(c)}function Ee(a){for(var b=u(Object.entries(Ie)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new ne(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(Je));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new ne(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 od;d.position=null;d.size=0;d.textAlign=pe;if(a.tagName)for(var e=u(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=Ke(g.backgroundColor,h.backgroundColor),h.color=Ke(g.color,h.color),h.fontFamily=Ke(g.fontFamily,h.fontFamily),
h.fontSize=Ke(g.fontSize,h.fontSize),h.textShadow=Ke(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=ye(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Le;break;case "i":d.fontStyle=Me;break;case "u":d.textDecoration.push(Ne);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=Cd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Md(a)||1==e.length&&Md(e[0]))for(c=Pd(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ye(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=cc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())He(a.value,d,c)}function Ke(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",ne);ne.parseCuePayload=De;ne.equal=Ae;
ne.prototype.clone=ne.prototype.clone;var oe="auto";ne.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:oe};var pe="center",Oe={LEFT:"left",RIGHT:"right",CENTER:pe,START:"start",END:"end"};ne.textAlign=Oe;var ve="after",Pe={BEFORE:"before",CENTER:"center",AFTER:ve};ne.displayAlign=Pe;var qe="ltr";ne.direction={HORIZONTAL_LEFT_TO_RIGHT:qe,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var se="horizontal-tb";ne.writingMode={HORIZONTAL_TOP_TO_BOTTOM:se,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var te=0;ne.lineInterpretation={LINE_NUMBER:te,PERCENTAGE:1};var ue="start",Qe={CENTER:"center",START:ue,END:"end"};ne.lineAlign=Qe;var Ie={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};ne.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"};ne.defaultTextBackgroundColor=Je;var we=400,Le=700;ne.fontWeight={NORMAL:we,BOLD:Le};
var xe="normal",Me="italic",Re={NORMAL:xe,ITALIC:Me,OBLIQUE:"oblique"};ne.fontStyle=Re;var Ne="underline";ne.textDecoration={UNDERLINE:Ne,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Fe=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Se(){}Se.prototype.destroy=function(){};function Te(a,b,c){Ue.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,Of:b})}function Ve(a,b){for(var c=a.toLowerCase().split(";")[0],d=u([We,Xe,Ye,Ze]),e=d.next();!e.done;e=d.next())if(e=Ue.get(c+"-"+e.value)){var f=e.Of(),g=f.isSupported(a,b);f.destroy();if(g)return e.Of}return null}S("shaka.transmuxer.TransmuxerEngine",Se);Se.findTransmuxer=Ve;Se.unregisterTransmuxer=function(a,b){Ue.delete(a.toLowerCase().split(";")[0]+"-"+b)};
Se.registerTransmuxer=Te;Se.prototype.destroy=Se.prototype.destroy;var Ue=new Map,Ze=1,Ye=2,Xe=3,We=4;Se.PluginPriority={FALLBACK:Ze,PREFERRED_SECONDARY:Ye,PREFERRED:Xe,APPLICATION:We};function $e(){}function af(a,b){var c=a;b&&!bf.includes(a)&&(c+='; codecs="'+b+'"');return c}function cf(a,b){b&&(a+='; codecs="'+b+'"');return a}function df(a,b,c){var d=af(a,b);b=cf(a,b);Ve(b)?(a=Ve(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}function ef(a){return a.split(";")[0].split("/")[1]}
function ff(a){var b=gf(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:case "ac3"===a:case "ac-3"===a:return"ac-3";
case "mp4a"===a&&"a6"===b:case "eac3"===a:case "ec-3"===a:return"ec-3";case "ac-4"===a:return"ac-4";case "mp4a"===a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:case "vp9"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";
case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}function hf(a){var b=[];a=u(a.split(","));for(var c=a.next();!c.done;c=a.next())c=gf(c.value),b.push(c[0]);return b.sort().join(",")}function jf(a){return a.split(";")[0]}function kf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function lf(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}
function gf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",$e);$e.getFullTypeWithAllCodecs=cf;$e.getFullType=af;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var bf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function mf(a){this.i=null;this.j=a;this.C=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.D="";this.B=function(){};this.s=new Map}function nf(a,b){of.set(a,b)}function pf(a){return of.get(a)}function qf(a){return of.has(a)?!0:"application/cea-608"==a||"application/cea-708"==a?!!kd:!1}mf.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
function sf(a,b,c,d,e){var f,g,h,k,l,m,n;return Q(function(q){if(1==q.g)return F(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Kb(b)),q.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Kb(b),g,e,[]);k=u(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.B(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(q)})}
mf.prototype.remove=function(a,b){var c=this;return Q(function(d){if(1==d.g)return F(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function tf(a,b,c){a.l=b;a.m=c}function uf(a,b,c){a.D=b;if(b=a.s.get(b))for(var d=u(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
function vf(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())vf(a,d.value,c)}
function wf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);vf(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.D&&a.j.append([k]))}e=u(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.set(f,new Map),b=u(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",mf);mf.prototype.destroy=mf.prototype.destroy;mf.findParser=pf;mf.unregisterParser=function(a){of.delete(a)};mf.registerParser=nf;var of=new Map;function xf(a){this.h=a;this.g=null}xf.prototype.X=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};xf.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function yf(a){this.h=a;this.g=null}yf.prototype.Ja=function(){this.stop();this.h();return this};yf.prototype.X=function(a){var b=this;this.stop();this.g=(new xf(function(){b.h()})).X(a);return this};yf.prototype.ya=function(a){var b=this;this.stop();this.g=(new xf(function(){b.g.X(a);b.h()})).X(a);return this};yf.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",yf);yf.prototype.stop=yf.prototype.stop;yf.prototype.tickEvery=yf.prototype.ya;
yf.prototype.tickAfter=yf.prototype.X;yf.prototype.tickNow=yf.prototype.Ja;function zf(a,b){return a.concat(b)}function Af(){}function Bf(a){return null!=a}function Cf(a,b){return Promise.race([b,new Promise(function(c,d){(new yf(d)).X(a)})])};function Df(){}
function Ef(a,b,c,d,e){function f(y){var z=String(y.width||"")+String(y.height||"")+String(Math.round(y.frameRate||0))+(y.hdr||"")+y.fastSwitching;y.dependencyStream&&(z+=y.dependencyStream.baseOriginalId||"");return z}function g(y){var z=y.language+(y.channelsCount||0)+(y.audioSamplingRate||0)+y.roles.join(",")+y.label+y.groupId+y.fastSwitching;y.dependencyStream&&(z+=y.dependencyStream.baseOriginalId||"");return z}if(e.length){var h=a.textStreams;e=u(e);for(var k=e.next(),l={};!k.done;l={ii:void 0},
k=e.next())if(l.ii=k.value,k=h.filter(function(y){return function(z){return z.codecs.startsWith(y.ii)||z.mimeType.startsWith(y.ii)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=Ff(h,b,c);if(d.length){b=new ib;c=u(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(y,z){y=0;var A=[];z=u(z);for(var B=z.next(),D={};!B.done;D={ng:void 0},B=z.next())D.ng=B.value,B=d.filter(function(G){return function(C){return G.ng.decodingInfos[0][C]}}(D)).length,
B>y?(y=B,A=[D.ng]):B==y&&A.push(D.ng);m.push.apply(m,x(A))});h=m}c=new Set;b=new Set;h=u(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(y,z){return y.bandwidth-z.bandwidth});var n=[];c=new Map;h=u(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=ff(q.codecs),t=ff(e.codecs);r!=t||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 w={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(y,z){if(!y.bandwidth||!z.bandwidth||y.bandwidth==z.bandwidth){if(y.codecs&&z.codecs&&y.codecs!=z.codecs&&y.width==z.width){var A=ff(y.codecs),B=ff(z.codecs);if(A!=B)return(w[A]||1)-(w[B]||1)}return y.width-z.width}return y.bandwidth-z.bandwidth});b=dd();var v=[];c=new Map;h=u(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=ff(q.codecs),t=ff(e.codecs),r!==t))continue;r=ff(q.codecs);t=ff(e.codecs);r!=t||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),v.push(e.id))}else l.push(e),v.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(y){var z=y.audio;y=y.video;return z&&!n.includes(z.id)||y&&!v.includes(y.id)?!1:!0})}
function Ff(a,b,c){b=u(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=u(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 Gf(a,b,c){a.variants=a.variants.filter(function(d){return Hf(d,b,c)})}
function Hf(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=u([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 If(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return Q(function(e){if(1==e.g)return F(e,Jf(a,b,0<b.offlineSessionIds.length,c,d),2);Kf(b);return F(e,Lf(b),0)})}
function Jf(a,b,c,d,e){var f,g;return Q(function(h){if(1==h.g)return Rb().Ij()&&Mf(b.variants),F(h,Nf(b.variants,c,!1,d),2);f=null;a&&(g=a.h)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Of(k,f,e);if(!l){var m=[];k.audio&&m.push(Pf(k.audio));k.video&&m.push(Pf(k.video))}return l});H(h)})}
function Mf(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=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=u(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=u(b);for(var e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function Of(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=Rb(),e="Xbox"===d.Qb();d="MOBILE"===d.Ia()&&"GECKO"===d.Na();var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(1920<g||1080<h)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!ad(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function Qf(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g){c=function(m,n){if(m){var q=Ed(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=u(b);g=f.next();for(h={};!g.done;h={cache:void 0,bf:void 0},g=f.next())k=g.value,h.bf=Fd(k),h.cache=Rf,h.cache.has(h.bf)?d=c(d,h.cache.get(h.bf)):e.push(Sf(k).then(function(m){return function(n){var q=
null;n=u(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.bf,q),d=c(d,q))}}(h)));return F(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
function Sf(a){var b=[""];a.video&&(b=kf(a.video.contentType).split(","));var c=[""];a.audio&&(c=kf(a.audio.contentType).split(","));var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=u(c),g=f.next(),h={};!g.done;h={Rc:void 0},g=f.next())g=g.value,h.Rc=Dd(a),a.video&&(h.Rc.video.contentType=af(jf(h.Rc.video.contentType),e)),a.audio&&(h.Rc.audio.contentType=af(jf(h.Rc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){("MOBILE"==Rb().Ia()?Cf(5,navigator.mediaCapabilities.decodingInfo(k.Rc)):
navigator.mediaCapabilities.decodingInfo(k.Rc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function Nf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G;return Q(function(C){switch(C.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return C.return();f=u(d);g=f.next();h={};case 2:if(g.done){C.A(4);break}h.mj=g.value;k=!1;l=u(a);m=l.next();case 5:if(m.done){C.A(7);break}n=m.value;q=Tf(n,b,c).filter(function(E){return function(I){I=I[0];return(I.keySystemConfiguration&&I.keySystemConfiguration.keySystem)===E.mj}}(h));r=u(q);t=r.next();case 8:if(t.done){C.A(10);break}w=t.value;
return F(C,Qf(n,w),9);case 9:t=r.next();C.A(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.A(5);break;case 7:if(k)return C.return();h={mj:void 0};g=f.next();C.A(2);break;case 4:v=u(a),y=v.next();case 12:if(y.done){C.A(0);break}z=y.value;A=Tf(z,b,c).filter(function(E){E=E[0];E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});B=u(A);D=B.next();case 15:if(D.done){y=v.next();C.A(12);break}G=D.value;return F(C,Qf(z,G),16);case 16:D=B.next(),C.A(15)}})}
function Tf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=u(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=kf(k);if(l.includes(",")&&!d){var m=l.split(","),n=jf(k);l=oc("video",m);m=oc("audio",m);m=Uf(m,n);n=df(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Vf(l);k={contentType:df(jf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=u(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=jf(l),l=Uf(kf(l),k),k=df(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=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=u(f);for(k=f.next();!k.done;k=f.next())for(k=
k.value,l=u(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=u(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=u(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;
n=u(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=u(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=u(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var t={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},w=u(n),v=w.next();!v.done;v=w.next()){v=v.value;if(v.initData&&v.initData.length){for(var y=new Set,z=u(v.initData),
A=z.next();!A.done;A=z.next())y.add(A.value.initDataType);t.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(t.distinctiveIdentifier="required");v.persistentStateRequired&&(t.persistentState="required");v.sessionType&&(t.sessionTypes=[v.sessionType]);d&&(t.audio?(v.encryptionScheme&&(t.audio.encryptionScheme=t.audio.encryptionScheme||v.encryptionScheme),t.audio.robustness=t.audio.robustness||v.audioRobustness):(t.audio={robustness:v.audioRobustness},v.encryptionScheme&&(t.audio.encryptionScheme=
v.encryptionScheme)),""==t.audio.robustness&&delete t.audio.robustness);e&&(t.video?(v.encryptionScheme&&(t.video.encryptionScheme=t.video.encryptionScheme||v.encryptionScheme),t.video.robustness=t.video.robustness||v.videoRobustness):(t.video={robustness:v.videoRobustness},v.encryptionScheme&&(t.video.encryptionScheme=v.encryptionScheme)),""==t.video.robustness&&delete t.video.robustness)}r.keySystemConfiguration=t;m.push(r)}a.push(m)}}return a}
function Uf(a,b){var c=Rb();return"flac"==a.toLowerCase()?"WEBKIT"!=c.Na()?"flac":"fLaC":"opus"===a.toLowerCase()?"WEBKIT"!=c.Na()?"opus":"mp4"==ef(b)?"Opus":"opus":"ac-3"==a.toLowerCase()&&c.we()?"ec-3":a}function Vf(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}
function Kf(a){a.textStreams=a.textStreams.filter(function(b){b=af(b.mimeType,b.codecs);return qf(b)})}
function Lf(a){var b,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:b=[],c=u(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(Wf.has(f)){l.A(5);break}g=Xf.get(f);if(!g){Wf.set(f,!1);l.A(5);break}return F(l,Yf(g),7);case 7:h=l.h,Wf.set(f,h);case 5:(k=Wf.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,H(l)}})}
function Yf(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
function Zf(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=u(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=u(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,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,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;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec;if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;
a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;c=g.split(",");try{a.videoCodec=oc("video",c),a.audioCodec=oc("audio",c)}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,b=b.dependencyStream)&&
(a.audioCodec=b.codecs||a.audioCodec);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function $f(a){return{id:a.id,active:!1,type:rc,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 ag(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=bg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function cg(a){a.__shaka_id||(a.__shaka_id=dg++);return a.__shaka_id}
function eg(a){var b={id:cg(a),active:"disabled"!=a.mode,type:rc,bandwidth:0,language:yc(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==a.kind,originalTextId:a.id,originalLanguage:a.language};"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function fg(a,b){var c=a?a.language:null;c={id:cg(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:yc(c||"und"),label:a?a.label: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?"main"==a.kind:!1,roles:[],forced:!1,audioRoles: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 gg(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function hg(a){return a.filter(function(b){return gg(b)})}
function ig(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=Gc(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=jg(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(zf,[]);return a.length?
jg(e,a[0]):e}function jg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function kg(a,b){b.length&&(b=b.filter(function(c){return ff(a.codecs)==ff(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],1<b.length&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function Pf(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function lg(a,b,c){if(0==c.autoShowText)return!1;if(1==c.autoShowText)return!0;var d=yc(c.preferredTextLanguage);b=yc(b.language);if(2==c.autoShowText)return xc(b,d);if(3==c.autoShowText){if(!a)return!1;a=yc(a.language);return xc(b,d)&&!xc(a,b)}ab("Invalid autoShowText setting!");return!1}S("shaka.util.StreamUtils",Df);Df.meetsRestrictions=Hf;
var Rf=new Map,dg=0,Wf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Xf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function mg(){var a=this;this.G=null;this.l=!1;this.s=new Nc;this.j=new Oc;navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){if(a.l&&a.g.useNetworkInformation){a.s=new Nc;a.g&&a.s.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.F=[];this.H=1;this.I=!1;this.h=this.m=this.g=this.u=null;this.B=new yf(function(){if(a.l&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.C=window;"documentPictureInPicture"in window&&this.j.o(window.documentPictureInPicture,"enter",function(){a.C=window.documentPictureInPicture.window;a.B&&a.B.Ja();a.j.qa(a.C,"pagehide",function(){a.C=window;a.B&&a.B.Ja()})});this.D=this.i=null}p=mg.prototype;p.stop=function(){this.G=null;this.l=!1;this.F=[];this.H=1;this.m=this.u=null;this.h&&(this.h.disconnect(),this.h=null);this.B.stop();this.D=this.i=null};
p.release=function(){this.j.release();this.B=null};p.init=function(a){this.G=a};
p.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;a=this.C.screen.height*c;b=this.C.screen.width*c}if(this.h&&this.g.restrictToElementSize){c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;var d=this.m.clientHeight,e=this.m.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.m&&(d=this.i.height,e=this.i.width);a=Math.min(a,d*c);b=Math.min(b,e*c)}c=this.F.filter(function(l){return l&&
!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.F);d=c;c.length!=this.F.length&&(d=this.F.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=ng(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=og(c);c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=ng(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&
!c.length&&(c=ng(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];for(var f=isNaN(this.H)?1:Math.abs(this.H),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.u=Date.now();return b};
p.enable=function(){this.l=!0};p.disable=function(){this.l=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&1===d.packetNumber&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e<this.g.cacheLoadThreshold||(this.s.sample(e,b),c&&null!=this.u&&this.l&&pg(this))};p.trySuggestStreams=function(){null!=this.u&&this.l&&pg(this)};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.s.getBandwidthEstimate(a);return this.D?this.D.getBandwidthEstimate(a):a};p.setVariants=function(a){this.F=a};p.playbackRateChanged=function(a){this.H=a};
p.setMediaElement=function(a){function b(){c.B.X(qg)}var c=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.m));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.Ca(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.D=a};
p.configure=function(a){this.g=a;this.s&&this.g&&this.s.configure(this.g.advanced)};function pg(a){if(!a.I){var b=a.s;if(!(b.g>=b.i))return;a.I=!0;a.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}
function ng(a,b,c,d,e){if(a.D){var f=a.D.Pi();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Hf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function og(a){var b=[];a=u(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",mg);mg.prototype.configure=mg.prototype.configure;
mg.prototype.setCmsdManager=mg.prototype.setCmsdManager;mg.prototype.setMediaElement=mg.prototype.setMediaElement;mg.prototype.playbackRateChanged=mg.prototype.playbackRateChanged;mg.prototype.setVariants=mg.prototype.setVariants;mg.prototype.getBandwidthEstimate=mg.prototype.getBandwidthEstimate;mg.prototype.trySuggestStreams=mg.prototype.trySuggestStreams;mg.prototype.segmentDownloaded=mg.prototype.segmentDownloaded;mg.prototype.disable=mg.prototype.disable;mg.prototype.enable=mg.prototype.enable;
mg.prototype.chooseVariant=mg.prototype.chooseVariant;mg.prototype.init=mg.prototype.init;mg.prototype.release=mg.prototype.release;mg.prototype.stop=mg.prototype.stop;var qg=1;S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function rg(a,b){if(a===b||!a.length||!b.length)return!0;a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(sg(c))return!0;for(var d=u(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||sg(e))return!0}return!1}
function vg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=u((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 sg(d)?c.push(d):sg(f)&&c.push(f)}return c}
function wg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function xg(a){return a?!!a.match(/^com\.apple\.fps/):!1}function sg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var yg=new Qb(function(){return Lb(new Uint8Array([0]))}),zg=new Map;function Eg(a,b){var c=Fg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
function Gg(a){var b,c;return Q(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new V(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return F(d,new Promise(function(e){(new yf(e)).X(c/1E3)}),2)}a.h*=a.m;H(d)})}function Fg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Hg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Hg.prototype.resolve=function(){};Hg.prototype.reject=function(){};function Ig(a,b){this.promise=a;this.i=b;this.g=null}function Jg(a){return new Ig(Promise.reject(a),function(){return Promise.resolve()})}function Kg(){var a=Promise.reject(new V(2,7,7001));a.catch(function(){});return new Ig(a,function(){return Promise.resolve()})}function Lg(a){return new Ig(Promise.resolve(a),function(){return Promise.resolve()})}function Mg(a){return new Ig(a,function(){return a.catch(function(){})})}Ig.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function Ng(a){return new Ig(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ig.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
Ig.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=Og(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Hg;f.catch(function(){});var g=new V(2,7,7001);this.promise.then(c(!0),c(!1));return new Ig(f,function(){return d()})};
function Og(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(Ig.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",Ig);Ig.prototype.chain=Ig.prototype.bb;Ig.prototype["finally"]=Ig.prototype.finally;
Ig.all=Ng;Ig.prototype.abort=Ig.prototype.abort;Ig.notAbortable=Mg;Ig.completed=Lg;Ig.aborted=Kg;Ig.failed=Jg;function Pg(){this.g=[]}function Qg(a,b){a.g.push(b.finally(function(){sd(a.g,b)}))}Pg.prototype.destroy=function(){for(var a=[],b=u(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 Rg(a,b,c,d,e,f,g){jb.call(this);this.i=null;this.j=!1;this.u=new Pg;this.g=new Set;this.h=new Set;this.s=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.G=f||null;this.F=g||null;this.l=new Map}pa(Rg,jb);p=Rg.prototype;p.configure=function(a){this.i=a};function Sg(a,b,c,d){d=void 0===d?!1:d;c=c||Tg;var e=Ug.get(a);(!e||c>=e.priority)&&Ug.set(a,{priority:c,Of:b,Ol:d})}
function Vg(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=u(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Rl=function(a){this.g.add(a)};p.om=function(a){this.g.delete(a)};p.gk=function(){this.g.clear()};p.Sl=function(a){this.h.add(a)};p.pm=function(a){this.h.delete(a)};p.hk=function(){this.h.clear()};p.Ei=function(){this.l.clear()};
function Wg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();jb.prototype.release.call(this);return this.u.destroy()};
p.request=function(a,b,c){var d=this,e=new Xg;if(this.j){var f=Promise.reject(new V(2,7,7001));f.catch(function(){});return new Yg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Dd(b.retryParameters):Fg();b.uris=Dd(b.uris);f=Zg(this,a,b,c);var g=f.bb(function(){return $g(d,a,b,c,new Eg(b.retryParameters,!1),0,null,e)}),h=g.bb(function(q){return ah(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,t=q.response;t.timeMs+=l;t.timeMs+=r;q.ol||!d.s||t.fromCache||"HEAD"==b.method||a!=bh||d.s(t.timeMs,t.data.byteLength,ch(c),b,c);d.F&&d.F(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new Yg(n.promise,function(){return n.abort()},e);Qg(this.u,f);return f};
function Zg(a,b,c,d){function e(h){f=f.bb(function(){c.body&&(c.body=Lb(c.body));return h(b,c,d)})}var f=Lg(void 0);a.D&&e(a.D);a=u(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 V&&7001==h.code)throw h;throw new V(2,1,1006,h);})}
function $g(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://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new qb(c.uris[f]),l=k.hc,m=!1;l||(l=location.protocol,l=l.slice(0,-1),rb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=Ug.get(l))?l.Of:null;if(!n)return Jg(new V(2,1,1E3,k));var q=l.Ol;(k=a.l.get(k.Fb))&&(c.headers["common-access-token"]=k);var r=null,t=null,w=!1,v=!1,y;return Mg(Gg(e)).bb(function(){if(a.j)return Kg();
y=Date.now();var z=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(G,C,E){r&&r.stop();t&&t.X(D/1E3);a.s&&b==bh&&(z++,c.packetNumber=z,a.s(G,C,ch(d),c,d),m=!0,h.g=E)},function(G){v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(G,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return A;var B=c.retryParameters.connectionTimeout;B&&(r=new yf(function(){w=!0;A.abort()}),r.X(B/1E3));var D=c.retryParameters.stallTimeout;D&&(t=new yf(function(){w=!0;A.abort()}));
return A}).bb(function(z){r&&r.stop();t&&t.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-y);var A=z.headers["common-access-token"];if(A){var B=new qb(z.uri);a.l.set(B.Fb,A)}A={response:z,ol:m};!v&&a.m&&a.m(z.headers,c,b);a.B&&a.B(c,z);return A},function(z){r&&r.stop();t&&t.stop();if(a.C){var A=null,B=0;z instanceof V&&(A=z,1001==z.code&&(B=z.data[1]));a.C(c,A,B,w)}if(a.j)return Kg();w&&(z=new V(1,1,1003,c.uris[f],b));if(z instanceof V){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity){A=
(new Map).set("error",z);A=new U("retry",A);A.cancelable=!0;a.dispatchEvent(A);if(A.defaultPrevented)throw z;f=(f+1)%c.uris.length;return $g(a,b,c,d,e,f,z,h)}}throw z;})}
function ah(a,b,c,d){var e=Lg(void 0);a=u(a.h);for(var f=a.next(),g={};!f.done;g={tj:void 0},f=a.next())g.tj=f.value,e=e.bb(function(h){return function(){var k=c.response;k.data&&(k.data=Lb(k.data));return(0,h.tj)(b,k,d)}}(g));return e.bb(function(){return c},function(h){var k=2;if(h instanceof V){if(7001==h.code)throw h;k=h.severity}throw new V(k,1,1007,h);})}function ch(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",Rg);
Rg.prototype.request=Rg.prototype.request;Rg.prototype.destroy=Rg.prototype.destroy;Rg.makeRequest=Wg;Rg.defaultRetryParameters=function(){return Fg()};Rg.prototype.clearCommonAccessTokenMap=Rg.prototype.Ei;Rg.prototype.clearAllResponseFilters=Rg.prototype.hk;Rg.prototype.unregisterResponseFilter=Rg.prototype.pm;Rg.prototype.registerResponseFilter=Rg.prototype.Sl;Rg.prototype.clearAllRequestFilters=Rg.prototype.gk;Rg.prototype.unregisterRequestFilter=Rg.prototype.om;
Rg.prototype.registerRequestFilter=Rg.prototype.Rl;Rg.unregisterScheme=function(a){Ug.delete(a)};Rg.registerScheme=Sg;Rg.prototype.configure=Rg.prototype.configure;function Xg(){this.g=0}Rg.NumBytesRemainingClass=Xg;function Yg(a,b,c){Ig.call(this,a,b);this.h=c}pa(Yg,Ig);Rg.PendingRequest=Yg;var bh=1;Rg.RequestType={MANIFEST:0,SEGMENT:bh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
Rg.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 Tg=3;Rg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Tg};var Ug=new Map;function dh(a){this.g=!1;this.h=new Hg;this.i=a}dh.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 eh(a,b){if(a.g){if(b instanceof V&&7003==b.code)throw b;throw new V(2,7,7003,b);}};function fh(a){for(var b=new Map,c=u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function gh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function hh(a,b){this.h=Ob(a);this.i=b==ih;this.g=0}p=hh.prototype;p.Oa=function(){return this.g<this.h.byteLength};p.Ua=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.aa=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw jh();}};p.Fa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw jh();}};p.W=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw jh();}};
p.Ih=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw jh();}};p.Jd=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 jh();}if(2097151<b)throw new V(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Xb=function(a){if(this.g+a>this.h.byteLength)throw jh();var b=Kb(this.h,this.g,a);this.g+=a;return b};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw jh();this.g+=a};p.uj=function(a){if(this.g<a)throw jh();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw jh();this.g=a};p.ed=function(){for(var a=this.g;this.Oa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Kb(this.h,a,this.g-a);this.g+=1;return Wb(a)};function jh(){return new V(2,3,3E3)}S("shaka.util.DataViewReader",hh);hh.prototype.readTerminatedString=hh.prototype.ed;hh.prototype.seek=hh.prototype.seek;hh.prototype.rewind=hh.prototype.uj;
hh.prototype.skip=hh.prototype.skip;hh.prototype.readBytes=hh.prototype.Xb;hh.prototype.readUint64=hh.prototype.Jd;hh.prototype.readInt32=hh.prototype.Ih;hh.prototype.readUint32=hh.prototype.W;hh.prototype.readUint16=hh.prototype.Fa;hh.prototype.readUint8=hh.prototype.aa;hh.prototype.getLength=hh.prototype.getLength;hh.prototype.getPosition=hh.prototype.Ua;hh.prototype.hasMoreData=hh.prototype.Oa;var ih=1;hh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ih};function kh(){this.i=new Map;this.h=new Map;this.g=!1}p=kh.prototype;p.box=function(a,b){a=lh(a);this.i.set(a,mh);this.h.set(a,b);return this};p.V=function(a,b){a=lh(a);this.i.set(a,nh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new hh(a,0);for(this.g=!1;a.Oa()&&!this.g;)this.Ed(0,a,b,c)};
p.Ed=function(a,b,c,d){var e=b.Ua();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.W(),g=b.W(),h=oh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ua()+8>b.getLength()){this.g=!0;return}f=b.Jd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==nh){if(d&&b.Ua()+4>b.getLength()){this.g=!0;return}n=b.W();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ua(),b=0<d?b.Xb(d):new Uint8Array(0),b=new hh(b,0),l({name:h,parser:this,
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ua(),b.getLength()-b.Ua()))}};function ph(a){for(var b=qh(a);a.reader.Oa()&&!a.parser.g;)a.parser.Ed(a.start+b,a.reader,a.partialOkay)}function rh(a){for(var b=qh(a),c=a.reader.W(),d=0;d<c&&(a.parser.Ed(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function sh(a){var b=qh(a);for(a.reader.skip(78);a.reader.Oa()&&!a.parser.g;)a.parser.Ed(a.start+b,a.reader,a.partialOkay)}
function th(a){var b=qh(a);a.reader.skip(8);var c=a.reader.Fa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Oa()&&!a.parser.g;)a.parser.Ed(a.start+b,a.reader,a.partialOkay)}function uh(a){return function(b){a(b.reader.Xb(b.reader.getLength()-b.reader.Ua()))}}function lh(a){var b=0;a=u(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function oh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
function qh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",kh);kh.headerSize=qh;kh.typeToString=oh;kh.allData=uh;kh.audioSampleEntry=th;kh.visualSampleEntry=sh;kh.sampleDescription=rh;kh.children=ph;kh.prototype.parseNext=kh.prototype.Ed;kh.prototype.parse=kh.prototype.parse;kh.prototype.stop=kh.prototype.stop;kh.prototype.fullBox=kh.prototype.V;kh.prototype.box=kh.prototype.box;var mh=0,nh=1;function vh(a){var b=this;this.g=[];this.h=[];this.data=[];(new kh).box("moov",ph).box("moof",ph).V("pssh",function(c){if(!(1<c.version)){var d=Kb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(jc(c.reader.Xb(16)));if(0<c.version){d=c.reader.W();for(var e=0;e<d;e++){var f=jc(c.reader.Xb(16));b.h.push(f)}}}}).parse(a)}
function wh(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ob(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=u(c),c=b.next();!c.done;c=b.next())c=ic(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function xh(a){var b=this;this.D=a;this.j=this.B=null;this.ea=this.Z=!1;this.H=0;this.h=null;this.s=new Oc;this.i=new Map;this.P=[];this.C=new Map;this.J=!1;this.m=new Hg;this.g=null;this.u=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.U=new Map;this.$=new Map;this.K=new yf(function(){return yh(b)});this.N=!1;this.L=[];this.R=!1;this.I=new yf(function(){zh(b)});this.m.catch(function(){});this.l=new dh(function(){return Ah(b)});this.Y=!1;this.F=this.G=null;this.O=function(){return!1}}
p=xh.prototype;p.destroy=function(){return this.l.destroy()};function Ah(a){return Q(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.m.reject(),a.I.stop(),a.I=null,a.K.stop(),a.K=null,F(b,Bh(a),2);case 2:if(!a.j){b.A(3);break}ta(b,4);return F(b,a.j.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:xa(b);case 5:a.j=null;case 3:a.h=null,a.B=null,a.C=new Map,a.g=null,a.u=function(){},a.D=null,a.Y=!1,a.G=null,H(b)}})}p.configure=function(a,b){this.g=a;b&&(this.O=b);this.I&&this.I.ya(this.g.updateExpirationTime)};
function Ch(a,b,c){a.ea=!0;a.C=new Map;a.N=c;return Dh(a,b,!1)}function Eh(a,b,c,d){d=void 0===d?!0:d;a.C=new Map;c=u(c);for(var e=c.next();!e.done;e=c.next())a.C.set(e.value,{initData:null,initDataType:null});c=u(a.g.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.C.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.N=0<a.C.size;return Dh(a,b,d)}
function Fh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Gh(a,g,[])}
function Dh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G;return Q(function(C){if(1==C.g){Hh(a.g.clearKeys,b);d=b.some(function(E){return E.video&&E.video.drmInfos.length||E.audio&&E.audio.drmInfos.length?!0:!1});!d&&c&&(e=fh(a.g.servers),Ih(b,e));f=new Set;g=u(b);for(h=g.next();!h.done;h=g.next())for(k=h.value,l=Jh(k),m=u(l),n=m.next();!n.done;n=m.next())q=n.value,f.add(q);r=u(f);for(t=r.next();!t.done;t=r.next())w=t.value,Kh(w,fh(a.g.servers),fh(a.g.advanced||{}),a.g.keySystemsMapping);v=function(E,
I){var K=[];E=u(E);for(var J=E.next();!J.done;J=E.next()){J=J.value;var L=J[I]||a.g.advanced&&a.g.advanced[J.keySystem]&&a.g.advanced[J.keySystem][I]||"",M;if(M=""==L)M=(M=J.keySystem)?!!M.match(/^com\.widevine\.alpha/):!1;M&&("audioRobustness"==I?L=[a.g.defaultAudioRobustnessForWidevine]:"videoRobustness"==I&&(L=[a.g.defaultVideoRobustnessForWidevine]));if("string"===typeof L)K.push(J);else if(Array.isArray(L))for(0===L.length&&(L=[""]),L=u(L),M=L.next();!M.done;M=L.next()){var O={};K.push(Object.assign({},
J,(O[I]=M.value,O)))}}return K};y=new Set;z=u(b);for(A=z.next();!A.done;A=z.next())B=A.value,B.video&&!y.has(B.video)&&(B.video.drmInfos=v(B.video.drmInfos,"videoRobustness"),B.video.drmInfos=v(B.video.drmInfos,"audioRobustness"),y.add(B.video)),B.audio&&!y.has(B.audio)&&(B.audio.drmInfos=v(B.audio.drmInfos,"videoRobustness"),B.audio.drmInfos=v(B.audio.drmInfos,"audioRobustness"),y.add(B.audio));y.clear();return F(C,Nf(b,a.N,a.Y,a.g.preferredKeySystems),2)}eh(a.l);D=d||Object.keys(a.g.servers).length;
if(!D)return a.Z=!0,C.return(Promise.resolve());G=Gh(a,void 0,b);return C.return(d?G:G.catch(function(){}))})}function Lh(a){var b;return Q(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c.return();if(!a.G){c.A(2);break}return F(c,a.G,3);case 3:return eh(a.l),c.return();case 2:return ta(c,4),a.G=a.j.setMediaKeys(a.B),F(c,a.G,6);case 6:wa(c,5);break;case 4:b=xa(c),a.u(new V(2,6,6003,b.message));case 5:eh(a.l),H(c)}})}
function Mh(a,b){return Q(function(c){if(1==c.g)return F(c,Lh(a),2);Nh(a,b.initDataType,Kb(b.initData));H(c)})}
p.$b=function(a){var b=this,c,d;return Q(function(e){if(1==e.g){if(b.j===a)return e.return();if(!b.B)return b.s.qa(a,"encrypted",function(){b.u(new V(2,6,6010))}),e.return();b.j=a;b.s.qa(b.j,"play",function(){for(var f=u(b.L),g=f.next();!g.done;g=f.next())Oh(b,g.value);b.R=!0;b.L=[]});b.j.remote?(b.s.o(b.j.remote,"connect",function(){return Bh(b)}),b.s.o(b.j.remote,"connecting",function(){return Bh(b)}),b.s.o(b.j.remote,"disconnect",function(){return Bh(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.j&&b.s.o(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Bh(b)});b.F=b.h?b.h.initData.find(function(f){return 0<f.initData.length})||null:null;c=b.h.keySystem;return(d=c.startsWith("com.microsoft.playready.recommendation")||"com.apple.fps"==c)||!(b.F||b.C.size||b.g.parseInbandPsshEnabled)?(b.s.o(b.j,"encrypted",function(f){return Mh(b,f)}),e.A(2)):F(e,Lh(b),2)}Ph(b).catch(function(){});H(e)})};
function Qh(a){var b,c,d,e,f;return Q(function(g){switch(g.g){case 1:if(!a.B||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.A(2);break}b=Wg([a.h.serverCertificateUri],a.g.retryParameters);ta(g,3);c=a.D.uc.request(5,b,{isPreload:a.O()});return F(g,c.promise,5);case 5:d=g.h;a.h.serverCertificate=Kb(d.data);wa(g,4);break;case 3:throw e=xa(g),new V(2,6,6017,e);case 4:if(a.l.g)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return();
ta(g,6);return F(g,a.B.setServerCertificate(a.h.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=xa(g),new V(2,6,6004,f.message);}})}function Rh(a,b){var c,d,e;return Q(function(f){if(1==f.g)return F(f,Sh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Mb=new Hg,d.push(e.Mb);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
function Ph(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){Sh(a,k,h)});return F(g,a.m,3)}if(2!=g.g){b=a.h&&a.h.keyIds||new Set([]);if(0<b.size&&Th(a))return g.return(a.m);a.J=!1;a.m=new Hg;a.m.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,Nh(a,f.initDataType,f.initData);Uh(a)&&a.m.resolve();return g.return(a.m)})}
function Nh(a,b,c){if(c.length){if(a.g.ignoreDuplicateInitData){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(Jb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Jb(c,g.initData)&&(f=!0)});if(f)return}a.J=!0;0<a.i.size&&Uh(a)&&(a.m.resolve(),a.J=!1,a.m=new Hg,a.m.catch(function(){}));Vh(a,b,c,a.h.sessionType)}}function Wh(a){a=a.i.keys();a=kb(a,function(b){return b.sessionId});return Array.from(a)}
p.dh=function(){var a=this,b=this.i.keys();b=kb(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.be=function(){var a=Infinity,b=this.i.keys();b=u(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 Xh(a){return a.H?a.H:NaN}p.nf=function(){return gh(this.$)};
function Gh(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=new Map;if(c.length){e=Yh(a,c,d);n.A(2);break}return F(n,Zh(a,b),3);case 3:e=n.h;case 2:f=e;if(!f){if(!navigator.requestMediaKeySystemAccess)throw new V(2,6,6020);throw new V(2,6,6001);}eh(a.l);ta(n,4);f.getConfiguration();g=a.g.keySystemsMapping[f.keySystem]||f.keySystem;if(c.length){var q=g;var r=d.get(g);var t=[],w=[],v=[],y=[],z=[],A=new Set,B=new Set;$h(r,t,w,y,v,z,A,B);var D=a.N?"persistent-license":"temporary";
q={keySystem:q,encryptionScheme:t[0],licenseServerUri:w[0],distinctiveIdentifierRequired:r[0].distinctiveIdentifierRequired,persistentStateRequired:r[0].persistentStateRequired,sessionType:r[0].sessionType||D,audioRobustness:r[0].audioRobustness||"",videoRobustness:r[0].videoRobustness||"",serverCertificate:y[0],serverCertificateUri:v[0],initData:z,keyIds:A};0<B.size&&(q.keySystemUris=B);r=u(r);for(B=r.next();!B.done;B=r.next())B=B.value,B.distinctiveIdentifierRequired&&(q.distinctiveIdentifierRequired=
B.distinctiveIdentifierRequired),B.persistentStateRequired&&(q.persistentStateRequired=B.persistentStateRequired);r=q}else r=g,B=b.get(g),q=[],t=[],w=[],v=[],y=[],z=new Set,$h(B.drmInfos,q,t,v,w,y,z),r={keySystem:r,encryptionScheme:q[0],licenseServerUri:t[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",
videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:v[0],serverCertificateUri:w[0],initData:y,keyIds:z};a.h=r;if(!a.h.licenseServerUri)throw new V(2,6,6012,a.h.keySystem);return F(n,f.createMediaKeys(),6);case 6:h=n.h;eh(a.l);a.B=h;if(!(""!=a.g.minHdcpVersion&&"getStatusForPolicy"in a.B)){n.A(7);break}ta(n,8);return F(n,a.B.getStatusForPolicy({minHdcpVersion:a.g.minHdcpVersion}),10);case 10:k=n.h;if("usable"!=k)throw new V(2,6,6018);eh(a.l);wa(n,7,4);break;
case 8:l=xa(n,4);if(l instanceof V)throw l;throw new V(2,6,6019,l.message);case 7:return a.Z=!0,F(n,Qh(a),11);case 11:eh(a.l);wa(n,0);break;case 4:m=xa(n);eh(a.l,m);a.h=null;if(m instanceof V)throw m;throw new V(2,6,6002,m.message);}})}
function Yh(a,b,c){for(var d=u(b),e=d.next();!e.done;e=d.next()){e=u(Jh(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(1==c.size&&c.has(""))throw new V(2,6,6E3);d=a.g.preferredKeySystems;d.length||(e=fh(a.g.servers),1==e.size&&(d=Array.from(e.keys())));e=u(d);var g=e.next();for(f={};!g.done;f={nj:void 0},g=e.next()){f.nj=g.value;g=u(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&&
null!=q.keySystemAccess&&q.keySystemAccess.keySystem==n.nj}}(f)))return h.keySystemAccess}e=u([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=u(b),h=g.next();!h.done;h=g.next()){h=u(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.g.keySystemsMapping[l]&&(m=c.get(a.g.keySystemsMapping[l]));l=u(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}
function Zh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y;return Q(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new V(2,6,6E3);d=u(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=u(a.g.preferredKeySystems);h=g.next();case 2:if(h.done){z.A(4);break}k=h.value;if(!b.has(k)){z.A(3);break}l=b.get(k);ta(z,6);return F(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
z.h,z.return(c);case 6:xa(z);case 7:eh(a.l);case 3:h=g.next();z.A(2);break;case 4:m=u([!0,!1]),n=m.next();case 9:if(n.done){z.A(11);break}q=n.value;r=u(b.keys());t=r.next();case 12:if(t.done){n=m.next();z.A(9);break}w=t.value;v=b.get(w);y=v.drmInfos.some(function(A){return!!A.licenseServerUri});if(y!=q){z.A(13);break}ta(z,15);return F(z,navigator.requestMediaKeySystemAccess(w,[v]),17);case 17:return c=z.h,z.return(c);case 15:xa(z);case 16:eh(a.l);case 13:t=r.next();z.A(12);break;case 11:return z.return(c)}})}
function ai(a){Uh(a)&&a.m.resolve()}function bi(a,b){(new yf(function(){b.loaded=!0;ai(a)})).X(ci)}
function Sh(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new V(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.s.o(d,"message",function(n){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.R?a.L.push(n):Oh(a,n)});a.s.o(d,"keystatuseschange",function(n){return di(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Dh:Infinity,Mb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return F(m,
d.load(b),4);case 4:return g=m.h,eh(a.l),g||(a.i.delete(d),h=a.g.persistentSessionOnlinePlayback?1:2,a.u(new V(h,6,6013)),f.loaded=!0),bi(a,f),ai(a),m.return(d);case 2:k=xa(m),eh(a.l,k),a.i.delete(d),l=a.g.persistentSessionOnlinePlayback?1:2,a.u(new V(l,6,6005,k.message)),f.loaded=!0,ai(a);case 3:return m.return(Promise.resolve())}})}
function Vh(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new V(2,6,6005,f.message));return}a.s.o(e,"message",function(f){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.R?a.L.push(f):Oh(a,f)});a.s.o(e,"keystatuseschange",function(f){return di(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Dh:Infinity,Mb:null,type:d});try{c=a.g.initDataTransform(c,b,a.h)}catch(f){b=f;f instanceof V||(b=new V(2,6,6016,f));a.u(b);return}a.g.logLicenseExchange&&gc(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;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new V(2,6,6006,f.message,f,h))}})}function ei(a){return Q(function(b){return 1==b.g?a.J?F(b,a.m,3):b.A(0):F(b,Promise.all(a.P.map(function(c){return c.promise})),0)})}
function Oh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w;Q(function(v){switch(v.g){case 1:c=b.target;a.g.logLicenseExchange&&gc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Wg([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;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("org.w3.clearkey"===a.h.keySystem){var y=g,z=a.h;try{var A=Zb(y.body);if(A){var B=JSON.parse(A);B.type||(B.type=z.sessionType,y.body=$b(JSON.stringify(B)))}}catch(D){}}if(wg(a.h.keySystem))if(y=Xb(g.body,!0,!0),y.includes("PlayReadyKeyMessage")){y=Hd(y,"PlayReadyKeyMessage");z=Rd(y,"HttpHeader");z=u(z);for(A=z.next();!A.done;A=z.next())B=A.value,A=Rd(B,"name")[0],B=Rd(B,"value")[0],g.headers[Pd(A)]=Pd(B);y=Rd(y,"Challenge")[0];g.body=hc(Pd(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8";
k=Date.now();ta(v,2);m=a.D.uc.request(2,g,{isPreload:a.O()});a.P.push(m);return F(v,m.promise,4);case 4:l=v.h;sd(a.P,m);wa(v,3);break;case 2:n=xa(v);if(a.l.g)return v.return();q=new V(2,6,6007,n);1==a.i.size?(a.u(q),d&&d.Mb&&d.Mb.reject(q)):(d&&d.Mb&&d.Mb.reject(q),a.i.delete(c),Uh(a)&&(a.m.resolve(),a.K.X(.1)));return v.return();case 3:if(a.l.g)return v.return();a.H+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&gc(l.data);ta(v,5);return F(v,c.update(l.data),7);case 7:wa(v,6);break;case 5:return r=
xa(v),t=new V(2,6,6008,r.message),a.u(t),d&&d.Mb&&d.Mb.reject(t),v.return();case 6:if(a.l.g)return v.return();w=new U("drmsessionupdate");a.D.onEvent(w);d&&(d.Mb&&d.Mb.resolve(),bi(a,d));H(v)}})}
function di(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}h=Rb();if(wg(a.h.keySystem)&&16==g.byteLength&&h.Oh()){h=Ob(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)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=jc(g).slice(0,32);a.U.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Mb&&(a.i.delete(b),fi(b));Uh(a)&&(a.m.resolve(),
a.K.X(ji))}function yh(a){var b=a.U,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.u(new V(2,6,6014));a.D.Kf(gh(c))}
function ki(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T;return Q(function(ca){if(1==ca.g){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=u(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return ca.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","cbcs-1-9"];r=new Map;t=Rb();w=function(Y,Ma){var Na,Ea,va,Ka,Pa,za,ia,Aa,eb,fb,mb,xb,sb;return Q(function(Ua){switch(Ua.g){case 1:return ta(Ua,2),F(Ua,Ma.createMediaKeys(),5);case 5:Na=Ua.h;case 4:wa(Ua,3);break;case 2:return xa(Ua),Ua.return();case 3:va=
(Ea=Ma.getConfiguration().sessionTypes)?Ea.includes("persistent-license"):!1;t.fj()&&(va=!1);Ka=Ma.getConfiguration().videoCapabilities;Pa=Ma.getConfiguration().audioCapabilities;za={persistentState:va,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(Y)&&r.get(Y)?za=r.get(Y):r.set(Y,za);(ia=Ka[0].encryptionScheme)&&!za.encryptionSchemes.includes(ia)&&za.encryptionSchemes.push(ia);(Aa=Ka[0].robustness)&&!za.videoRobustnessLevels.includes(Aa)&&za.videoRobustnessLevels.push(Aa);
(eb=Pa[0].robustness)&&!za.audioRobustnessLevels.includes(eb)&&za.audioRobustnessLevels.push(eb);if("getStatusForPolicy"in Na){fb=[];mb=u(f);xb=mb.next();for(sb={};!xb.done;sb={ge:void 0},xb=mb.next())sb.ge=xb.value,za.minHdcpVersions.includes(sb.ge)||fb.push(Na.getStatusForPolicy({minHdcpVersion:sb.ge}).then(function(re){return function(tc){"usable"!=tc||za.minHdcpVersions.includes(re.ge)||za.minHdcpVersions.push(re.ge)}}(sb)));return F(Ua,Promise.all(fb),0)}Ua.A(0)}})};v=function(Y,Ma,Na,Ea){var va,
Ka,Pa,za,ia,Aa,eb,fb,mb,xb,sb;return Q(function(Ua){switch(Ua.g){case 1:ta(Ua,2);va=Dd(n);Ka=u(va.videoCapabilities);for(Pa=Ka.next();!Pa.done;Pa=Ka.next())za=Pa.value,za.encryptionScheme=Ma,za.robustness=Na;ia=u(va.audioCapabilities);for(Aa=ia.next();!Aa.done;Aa=ia.next())eb=Aa.value,eb.encryptionScheme=Ma,eb.robustness=Ea;fb=Dd(va);fb.persistentState="required";fb.sessionTypes=["persistent-license"];mb=[fb,va];sb=Rb();return"MOBILE"==sb.Ia()?F(Ua,Cf(5,navigator.requestMediaKeySystemAccess(Y,mb)),
7):F(Ua,navigator.requestMediaKeySystemAccess(Y,mb),6);case 6:xb=Ua.h;Ua.A(5);break;case 7:xb=Ua.h;case 5:return F(Ua,w(Y,xb),8);case 8:wa(Ua,0);break;case 2:xa(Ua),H(Ua)}})};y=function(Y,Ma,Na,Ea){var va,Ka,Pa,za;return Q(function(ia){switch(ia.g){case 1:return ta(ia,2),va={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:Y,video:{encryptionScheme:Ma,
robustness:Na},audio:{encryptionScheme:Ma,robustness:Ea}}},Pa=Rb(),"MOBILE"==Pa.Ia()?F(ia,Cf(5,navigator.mediaCapabilities.decodingInfo(va)),7):F(ia,navigator.mediaCapabilities.decodingInfo(va),6);case 6:Ka=ia.h;ia.A(5);break;case 7:Ka=ia.h;case 5:return za=Ka.keySystemAccess,F(ia,w(Y,za),8);case 8:wa(ia,0);break;case 2:xa(ia),H(ia)}})};z=u(a);for(A=z.next();!A.done;A=z.next())B=A.value,r.set(B,null);D=function(Y){return"WEBKIT"===Rb().Na()&&"org.w3.clearkey"===Y?!1:!0};G=[];C=u(q);for(E=C.next();!E.done;E=
C.next())for(I=E.value,K=u(a),J=K.next();!J.done;J=K.next())L=J.value,D(L)&&(G.push(v(L,I,"","")),G.push(y(L,I,"","")));M=u(a);for(O=M.next();!O.done;O=M.next())for(N=O.value,P=u(k[N]||[]),R=P.next();!R.done;R=P.next())T=R.value,D(N)&&(G.push(v(N,null,T,"")),G.push(v(N,null,"",T)),G.push(y(N,null,T,"")),G.push(y(N,null,"",T)));return F(ca,Promise.all(G),2)}return ca.return(gh(r))})}
function fi(a){return Q(function(b){if(1==b.g)return ta(b,2),F(b,Cf(li,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return wa(b,0);xa(b);H(b)})}
function Bh(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return ta(g,2),a.ea||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?F(g,fi(e),5):F(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);H(g)})})),0)})}function Jh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function zh(a){a.i.forEach(function(b,c){var d=b.Dh,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Dh=e)})}function Uh(a){a=a.i.values();return lb(a,function(b){return b.loaded})}function Th(a){for(var b=u(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0}
function Ih(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=u(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 $h(a,b,c,d,e,f,g,h){var k=[];a=u(a);for(var l=a.next(),m={};!l.done;m={Qa:void 0},l=a.next()){m.Qa=l.value;b.includes(m.Qa.encryptionScheme)||b.push(m.Qa.encryptionScheme);"org.w3.clearkey"==m.Qa.keySystem&&m.Qa.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Qa.licenseServerUri)||k.push(m.Qa.licenseServerUri):c.includes(m.Qa.licenseServerUri)||c.push(m.Qa.licenseServerUri);e.includes(m.Qa.serverCertificateUri)||e.push(m.Qa.serverCertificateUri);m.Qa.serverCertificate&&
(d.some(function(r){return function(t){return Jb(t,r.Qa.serverCertificate)}}(m))||d.push(m.Qa.serverCertificate));if(m.Qa.initData){l=u(m.Qa.initData);for(var n=l.next(),q={};!n.done;q={rh:void 0},n=l.next())q.rh=n.value,f.some(function(r){return function(t){var w=r.rh;return t.keyId&&t.keyId==w.keyId?!0:t.initDataType==w.initDataType&&Jb(t.initData,w.initData)}}(q))||f.push(q.rh)}if(m.Qa.keyIds)for(l=u(m.Qa.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Qa.keySystemUris&&h)for(m=u(m.Qa.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=u(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 Kh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!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__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}function Hh(a,b){a=fh(a);if(0!=a.size){a=nc(a);b=u(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 li=1,ci=5,ji=.5;function mi(a,b,c){c=void 0===c?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=u(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
mi.prototype.add=function(a,b){var c=this.h;b=void 0===b?!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||2<d.channelsCount||2<e.channelsCount)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!ni(d,e))&&oi(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||ni(c,d))&&oi(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};mi.prototype.values=function(){return this.g.values()};function ni(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return hf(d)});b=b.codecs.split(",").map(function(d){return hf(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 oi(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}S("shaka.media.AdaptationSet",mi);S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function pi(){}pi.prototype.create=function(){};pi.prototype.configure=function(){};pi.prototype.getConfiguration=function(){};S("shaka.media.AdaptationSetCriteria",pi);function qi(){this.g=ri;this.i=(new Map).set(ri,2).set(si,1);this.h=0}var si=0,ri=1;/*
@license
Shaka Player
Copyright 2023 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function ti(a,b,c){this.g=a;this.i=b;this.h=c}function ui(a,b){return Q(function(c){if(1==c.g)return F(c,If(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||Ef(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(gg))throw new V(2,4,4032);return c.return(vi(a,b))})}
function wi(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=u(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Hf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function vi(a,b){var c=wi(a,b);if(b){var d=a.h?a.h.h:null;if(d&&a.h.B){for(var e=new Set,f=u(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=u(e);for(f=e.next();!f.done;f=e.next())xi(a,d.keySystem,f.value)}yi(a,b)}return c}function xi(a,b,c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Nh(a.h,e.initDataType,e.initData)}}
function yi(a,b){a=a.h?a.h.nf():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set,h=new Set;b=u(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=u(h);for(b=h.next();!b.done;b=h.next())if(b=b.value,b.keyIds.size)for(b=u(b.keyIds),k=b.next();!k.done;k=b.next()){k=k.value;var l=a[c?"00":k];l?zi.includes(l)&&g.add(l):f.add(k)}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new V(2,4,4012,a);}var zi=["output-restricted","internal-error"];function Ai(){}function Bi(a,b){Ci.set(a,b)}function Di(){var a={};Rb();if(Ei())for(var b=u(Ci.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=u(["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]=Ei()?Ci.has(c):""!=Fi().canPlayType(c);return a}function Gi(a,b){if(b){var c=Ci.get(b.toLowerCase());if(c)return c}throw new V(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Ai);
Ai.unregisterParserByMime=function(a){Ci.delete(a)};Ai.registerParserByMime=Bi;Ai.registerParserByExtension=function(){Uc("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ai.AccessibilityPurpose={Dn:"visually impaired",Nm:"hard of hearing",mn:"spoken subtitles"};var Ci=new Map;function Hi(a,b){var c=null,d=null,e=null,f=null,g=a.W();b&1&&(e=a.Jd());b&2&&(f=a.W());b&8&&(c=a.W());b&16&&(d=a.W());return{trackId:g,Yd:c,Zd:d,ek:e,vj:f}}function Ii(a,b){return 1==b?(b=a.W(),a=a.W(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.W()}}function Ji(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.W();a.skip(4);a=a.Fa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function Ki(a,b,c){var d=a.W(),e=[],f=null;c&1&&(f=a.Ih());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Qh:null,sampleSize:null,Wf:null};c&256&&(h.Qh=a.W());c&512&&(h.sampleSize=a.W());c&1024&&a.skip(4);c&2048&&(h.Wf=0==b?a.W():a.Ih());e.push(h)}return{In:d,Ph:e,Mg:f}}function Li(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Fa();a.skip(2);a.skip(2);a.skip(2);a=a.Fa()+a.Fa()/65536;return{channelCount:b,sampleRate:a}}function Mi(a){a=a.W();return{codec:oh(a)}}
function Ni(a){var b=null,c=null,d=a.Xb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.Fa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Fa();a.Fa();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,Fe:c}}
function Oi(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Pi(a){return(10>a?"0":"")+a};function Qi(a){if(!Ri){Ri=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Si=Ti("ftyp",b,d,b,c);b=Ti("dref",Ui);Vi=Ti("dinf",b)}this.g=a}
function Wi(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ti;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(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=Ti("tkhd",h);k=Ti;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=Ti("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Zi;break;case "audio":m=$i}n=Ti("hdlr",m);a:{switch(g.type){case "video":g=Ti("minf",Ti("vmhd",aj),Vi,bj(g));break a;
case "audio":g=Ti("minf",Ti("smhd",cj),Vi,bj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=kc.apply(dc,x(b));f=a.g[0];c=Ti;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=Ti("mvhd",e);d=[];a=u(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=Ti("trex",k),h.call(g,k);a=kc.apply(dc,x(d));a=Ti("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=kc.apply(dc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Si.byteLength+
a.byteLength);b.set(Si);b.set(a,Si.byteLength);return b}
function bj(a){var b=Ti,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=Rb().we()?"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(0<a.Wa.byteLength)var e=Ti("avcC",a.Wa);else{e=Ti;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Db.length;n++){var q=dj(a.Db[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
f+=q.length+2}}0<g.length&&(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=ej(a);g=new Uint8Array([]);a.encrypted&&(g=fj(0,a.stream,a.codecs),d="encv");d=Ti(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Wa.byteLength&&(c=Ti("hvcC",a.Wa)),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=ej(a),g=new Uint8Array([]),a.encrypted&&(g=fj(0,a.stream,a.codecs),e="encv"),d=Ti(e,d,c,h,g));break;case "audio":if("mp3"==c)a=Ti(".mp3",gj(a));else if("ac-3"==c)c=Ti("dac3",a.La),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=fj(0,a.stream,a.codecs),d="enca"),a=Ti(d,gj(a),c,e);else if("ec-3"==c)c=Ti("dec3",a.La),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=fj(0,a.stream,a.codecs),
d="enca"),a=Ti(d,gj(a),c,e);else if("opus"==c)c=Ti("dOps",a.La),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=fj(0,a.stream,a.codecs),d="enca"),a=Ti(d,gj(a),c,e);else{if(0<a.La.byteLength)c=Ti("esds",a.La);else{c=Ti;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=oc("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("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];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=fj(0,a.stream,a.codecs),d="enca");a=Ti(d,gj(a),c,e)}d=a}a=Ti("stsd",hj,d);return b("stbl",a,Ti("stts",ij),Ti("stsc",jj),Ti("stsz",kj),Ti("stco",lj))}function ej(a){if(!a.cb&&!a.fb)return new Uint8Array([]);var b=a.fb;a=new Uint8Array([].concat(x(Yi(a.cb,4)),x(Yi(b,4))));return Ti("pasp",a)}
function gj(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 fj(a,b,c){a=Ti;c=new Uint8Array([].concat(x(Yi(mj(c.split(".")[0]),4))));c=Ti("frma",c);var d="cenc";var e=b.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(Yi(mj(d),4)),[0,1,0,0]));d=Ti("schm",d);e=Ti;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=u(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=dj(h.value)}b=new Uint8Array([0,0,0,0,0,
0,1,8]);b=Ti("tenc",b,f);return a("sinf",c,d,e("schi",b))}
function nj(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ti;var g=new Uint8Array([0,0,0,0].concat(x(Yi(c.data?c.data.Yb:0,4))));g=Ti("mfhd",g);var h;var k=c.data?c.data.Bb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.qb<<4|m.sb<<2|m.rb}k=Ti("sdtp",l);var n=k.length+92;l=Ti;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=Ti("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=Ti("tfdt",m);var r=n;n=c.data?c.data.Bb:[];q=n.length;var t=12+16*q,w=new Uint8Array(t);r+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(x(Yi(q,4)),x(Yi(r,4))),0);for(r=0;r<q;r++){var v=n[r];t=Yi(v.duration,4);var y=Yi(v.size,4),z=v.flags;v=Yi(v.xb,4);w.set([].concat(x(t),x(y),[z.zb<<2|z.qb,z.sb<<6|z.rb<<4|z.Ab,z.pb&61440,z.pb&15],x(v)),12+16*r)}n=Ti("trun",w);k=l("traf",h,m,n,k);f=f("moof",
g,k);e.call(d,b,[f,oj(c)])}return kc.apply(dc,x(b))}function oj(a){a=(a.data?a.data.Bb:[]).map(function(b){return b.data});a=kc.apply(dc,x(a));return Ti("mdat",a)}function Yi(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function dj(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}function mj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<8*(a.length-c-1);return b}
function Ti(a){var b=Ja.apply(1,arguments),c=pj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],pj.set(a,c));for(var d=8,e=b.length-1;0<=e;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 Ri=!1,Xi=Math.pow(2,32)-1,pj=new Map,Zi=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 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]),ij=new Uint8Array([0,0,0,0,0,0,0,0]),jj=new Uint8Array([0,0,0,0,0,0,0,0]),lj=new Uint8Array([0,0,0,0,0,0,0,0]),kj=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),aj=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),cj=new Uint8Array([0,
0,0,0,0,0,0,0]),hj=new Uint8Array([0,0,0,0,0,0,0,1]),Si=new Uint8Array([]),Ui=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Vi=new Uint8Array([]);function qj(a){a=Kb(a);var b=null;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).box("minf",ph).box("stbl",ph).V("stsd",rh).box("enca",function(c){b=c.reader.h;return th(c)}).box("sinf",ph).box("frma",function(c){c.parser.stop();"ec-3"===Mi(c.reader).codec&&b&&2!==b.getUint16(16)&&b.setUint16(16,2)}).parse(a);return a}
function rj(a,b,c){function d(r){n.push({box:r,hj:1701733217})}function e(r){n.push({box:r,hj:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);ph(r)}var h=b=Kb(b),k=!1,l,m=[],n=[];(new kh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).V("stsd",function(r){l=r;m.push(r);rh(r)}).V("encv",f).V("enca",f).V("dvav",e).V("dva1",e).V("dvh1",e).V("dvhe",e).V("dvc1",e).V("dvi1",e).V("hev1",e).V("hvc1",e).V("avc1",e).V("avc3",e).V("ac-3",d).V("ec-3",d).V("ac-4",
d).V("Opus",d).V("fLaC",d).V("mp4a",d).parse(b);if(k)return b;if(0==n.length||!l)throw hb(jc(b)),new V(2,3,3019,c);n.reverse();c=u(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=sj(a,h,l,q.box,m,q.hj);return Rb().qj()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function tj(a){a=Kb(a);var b=[];(new kh).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(uj(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return kc.apply(dc,x(c))}
function uj(a){function b(n){g.push(n);ph(n)}var c,d,e,f,g=[];(new kh).box("moof",b).box("traf",b).V("tfhd",function(n){c=n;e=Hi(n.reader,n.flags)}).V("trun",function(n){d=n;f=Ki(n.reader,n.version,n.flags)}).parse(a);if(e&&2!==e.vj){var h=c.start+qh(c)+4+(null!==e.ek?8:0),k=Ob(a);if(null!==e.vj)k.setUint32(h,2);else{vj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&null!==f.Mg&&k.setInt32(d.start+qh(d)+4,f.Mg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;0<=m;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=u(g);for(k=h.next();!k.done;k=h.next())k=k.value,vj(a,k.start,k.size+4)}}return a}
function sj(a,b,c,d,e,f){var g=fj(new Qi([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Ob(a).setUint32(4,f);a.set(g,d.size);vj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=Rb().wf()?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=u(e);for(e=b.next();!e.done;e=b.next())e=e.value,vj(f,e.start,e.size+a.byteLength);a=Ob(f,c.start);c=qh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function vj(a,b,c){a=Ob(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function wj(a){function b(e){d.push({start:e.start,size:e.size});ph(e)}var c=Kb(a),d=[];(new kh).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=Ob(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);1633889587==h?f.setUint32(g,1700998451):1684103987==h&&f.setUint32(g,1684366131)}}).parse(c);return c};function xj(a,b,c,d,e,f,g,h){this.S=a;this.startByte=b;this.endByte=c;this.Cd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.h=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=void 0===h?!1:h}xj.prototype.Dc=function(){return this.startByte};xj.prototype.Bc=function(){return this.endByte};xj.prototype.ye=function(a){this.h=a};xj.prototype.cc=function(){return this.h};
function yj(a,b){return a===b?!0:a&&b?a.Dc()==b.Dc()&&a.Bc()==b.Bc()&&ud(a.S().sort(),b.S().sort())&&Jb(a.cc(),b.cc()):a==b}S("shaka.media.InitSegmentReference",xj);xj.prototype.getEndByte=xj.prototype.Bc;xj.prototype.getStartByte=xj.prototype.Dc;
function zj(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w){l=void 0===l?[]:l;r=void 0===r?Aj:r;this.startTime=a;this.j=this.endTime=b;this.D=c;this.startByte=d;this.endByte=e;this.ha=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.h=void 0===q?null:q;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.thumbnailSprite=null;this.i=-1;this.B=void 0===w?!1:w;this.F=this.s=!1;a=u(this.g);
for(b=a.next();!b.done;b=a.next())b.value.dj();this.B&&this.g.length&&this.g[this.g.length-1].cj();this.u=this.bandwidth=this.mimeType=this.codecs=null;this.G=!1}p=zj.prototype;p.S=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.Ek=function(){return this.endTime};p.Dc=function(){return this.startByte};p.Bc=function(){return this.endByte};p.cl=function(){return this.tilesLayout};p.al=function(){return this.C};p.Ec=function(){return this.status};
p.Gl=function(){this.status=Bj};p.Ah=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.Bd=function(){this.l=!1};p.wl=function(){return this.l};p.dj=function(){this.s=!0};p.yl=function(){return this.s};p.cj=function(){this.F=!0};p.xl=function(){return this.F};p.bj=function(){this.m=!0};p.ql=function(){return this.m};p.cg=function(a){this.thumbnailSprite=a};p.$k=function(){return this.thumbnailSprite};
p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};p.ei=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};p.ye=function(a,b){this.u=a;this.G=void 0===b?!1:b};p.cc=function(a){var b=this.u;(void 0===a||a)&&this.G&&(this.u=null);return b};
function Cj(a,b){a.ha=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())Cj(c.value,b)}S("shaka.media.SegmentReference",zj);zj.prototype.getSegmentData=zj.prototype.cc;zj.prototype.setSegmentData=zj.prototype.ye;zj.prototype.syncAgainst=zj.prototype.ei;zj.prototype.offset=zj.prototype.offset;zj.prototype.getThumbnailSprite=zj.prototype.$k;zj.prototype.setThumbnailSprite=zj.prototype.cg;zj.prototype.hasByterangeOptimization=zj.prototype.ql;zj.prototype.markAsByterangeOptimization=zj.prototype.bj;
zj.prototype.isLastPartial=zj.prototype.xl;zj.prototype.markAsLastPartial=zj.prototype.cj;zj.prototype.isPartial=zj.prototype.yl;zj.prototype.markAsPartial=zj.prototype.dj;zj.prototype.isIndependent=zj.prototype.wl;zj.prototype.markAsNonIndependent=zj.prototype.Bd;zj.prototype.isPreload=zj.prototype.isPreload;zj.prototype.markAsPreload=zj.prototype.Ah;zj.prototype.markAsUnavailable=zj.prototype.Gl;zj.prototype.getStatus=zj.prototype.Ec;zj.prototype.getTileDuration=zj.prototype.al;
zj.prototype.getTilesLayout=zj.prototype.cl;zj.prototype.getEndByte=zj.prototype.Bc;zj.prototype.getStartByte=zj.prototype.Dc;zj.prototype.getEndTime=zj.prototype.Ek;zj.prototype.getStartTime=zj.prototype.getStartTime;zj.prototype.getUris=zj.prototype.S;var Aj=0,Bj=1;zj.Status={um:Aj,Bn:Bj,Xm:2};function Dj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ej(a){return!a||Dj(a)?null:a.length?a.end(a.length-1):null}function Fj(a,b){return!a||!a.length||Dj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Gj(a,b){if(!a||!a.length||Dj(a))return 0;var c=0;a=u(Hj(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 Ij(a,b,c){if(!a||!a.length||Dj(a))return null;a=Hj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Hj(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 Jj(){}function W(a){return document.createElement(a)}function Kj(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Lj(a,b){var c=document.createElement("source");c.src=a;c.type=void 0===b?"":b;return c}function Mj(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;0<=d;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}
function Nj(a){a=a.getElementsByClassName("shaka-overflow-quality-mark");return a.length?a[0]:null}function Oj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function Fi(){if(Pj)return Pj;Qj||(Qj=new yf(function(){Pj=null}));(Pj=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Pj=document.createElement("video"));Qj.X(1);return Pj}
function Rj(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?F(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();!1===m.done;)l.push(m.value),m=k.next();return l};d=u(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&"swap"===f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);H(h)})}
S("shaka.util.Dom",Jj);Jj.removeAllChildren=Oj;Jj.clearSourceFromVideo=Mj;var Qj=null,Pj=null;/*
@license
Shaka Player
Copyright 2022 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function Sj(){}function Tj(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Uj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Vj(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 Wj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Wb(Kb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Wb(Kb(a.data,3+c,f)),h;"--\x3e"===d?h=Wb(Kb(a.data,4+c+f)):h=Lb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Wb(Kb(a.data,1,d));a=Wb(Kb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Wb(Kb(a.data,1,d));a=Wb(Kb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Wb(Kb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
c?(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=Lb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Wb(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Wb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Lb(a.data),b):null}
function Xj(a){for(var b=0,c=[];Tj(a,b);){var d=Vj(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=Vj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Wj(e))&&c.push(f);b+=e.size+10}Uj(a,b)&&(b+=10)}return c}function Yj(a,b){for(var c=b=void 0===b?0:b,d=0;Tj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Vj(a,b+6),Uj(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Sj);Sj.getID3Data=Yj;
Sj.getID3Frames=Xj;function Zj(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 ak(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Kb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function bk(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new hh(c,0)).W(),a.g=8*d,a.i-=d)}function ck(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;bk(a)}a.h<<=b;a.g-=b}
function dk(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&bk(a);c=b-c;return 0<c?d<<c|dk(a,c):d}function ek(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;bk(a);return b+ek(a)}function fk(a){ck(a,1+ek(a))}function gk(a){var b=ek(a);return dk(a,b+1)-1}function hk(a){a=gk(a);return 1&a?1+a>>>1:-1*(a>>>1)}function ik(a){return 1===dk(a,1)}function jk(a){return dk(a,8)}
function kk(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=hk(a),d=(c+d+256)%256),c=0===d?c:d}function lk(a){jk(a);gk(a);return gk(a)}S("shaka.util.ExpGolomb",ak);function mk(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.B=this.C=null;this.i=[];this.h=[];this.D=null;this.l=[];this.F=this.s=this.u=null}p=mk.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
p.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,nk(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){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.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,uf:-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(0<m)for(var n=h+5,q=m;2<q;){var r=f[n+1]+2;switch(f[n]){case 5:var t=Yb(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===t?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===t&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(t=
null,128===f[n+2]&&(t=f[n+3]),null!=t&&(this.F={channelCount:0===(t&15)?2:t&15,fk:t,sampleRate:48E3}))}n+=r;q-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.uf&&(g.uf=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.C=f.audio,this.B=f.audioCodec);-1!=f.uf&&(this.D=f.uf);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I: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.C: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.D: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 ok(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))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=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=pk(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=pk(d,
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Nl=function(a){Uc("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Fh(a,{qe:null,state:null})};
p.Fh=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)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.qe)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)),0<n&&(n=a.subarray(0,n),f.data=kc(f.data,n),f.fullData=kc(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.qe&&(c=k.length?k[k.length-1]:b.qe)&&(c.data=kc(c.data,a),c.fullData=kc(c.fullData,a));b.state=f;return k};
p.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=kc.apply(dc,x(c.value)),(c=ok(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Xj(c.data),dts:c.dts,pts:c.pts});return a};
p.yb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=kc.apply(dc,x(c.value)),e=ok(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=kc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
p.Wc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=kc.apply(dc,x(d.value)),f=ok(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=kc(d.data,e),this.g.push(d))}if(a){c={qe:null,state:null};d=[];e=u(this.g);for(f=e.next();!f.done;f=e.next())f=f.value,
f.nalus=this.Fh(f,c),f.nalus.length&&(d.push(f),c.qe=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.yb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Wc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.ae=function(){return{audio:this.B,video:this.m}};
p.tf=function(){for(var a=[],b=u(this.Wc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};p.kl=function(){Uc("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.mh();return{height:a.height,width:a.width}};p.mh=function(){return"hvc"==this.m?qk(this):rk(this)};function sk(a){var b=a.Wc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
function rk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.tf();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new ak(c.data);var d=jk(c),e=jk(c),f=jk(c);fk(c);if(tk.includes(d)){var g=gk(c);3===g&&ck(c,1);fk(c);fk(c);ck(c,1);if(ik(c)){g=3!==g?8:12;for(var h=0;h<g;h++)ik(c)&&(6>h?kk(c,16):kk(c,64))}}fk(c);g=gk(c);if(0===g)gk(c);else if(1===g)for(ck(c,1),fk(c),fk(c),g=gk(c),h=0;h<g;h++)fk(c);fk(c);ck(c,1);g=gk(c);h=gk(c);var k=dk(c,1);0===k&&ck(c,1);
ck(c,1);var l=0,m=0,n=0,q=0;ik(c)&&(l=gk(c),m=gk(c),n=gk(c),q=gk(c));b.height=String((2-k)*(h+1)*16-2*n-2*q);b.width=String(16*(g+1)-2*l-2*m);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=sk(a);return b}
function qk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.tf();if(!c.length)return b;c=c.find(function(D){return 33==D.type});if(!c)return b;var d=new ak(c.fullData,!0);jk(d);jk(d);dk(d,4);var e=dk(d,3);ik(d);var f=dk(d,2),g=dk(d,1),h=dk(d,5),k=dk(d,32);c=jk(d);for(var l=jk(d),m=jk(d),n=jk(d),q=jk(d),r=jk(d),t=jk(d),w=[],v=[],y=0;y<e;y++)w.push(ik(d)),v.push(ik(d));if(0<e)for(y=e;8>y;y++)dk(d,2);for(y=0;y<e;y++)w[y]&&dk(d,88),v[y]&&jk(d);gk(d);e=gk(d);3==e&&dk(d,1);w=gk(d);v=gk(d);
var z=y=0,A=0,B=0;ik(d)&&(y+=gk(d),z+=gk(d),A+=gk(d),B+=gk(d));b.width=String(w-(y+z)*(1===e||2===e?2:1));b.height=String(v-(A+B)*(1===e?2:1));d=function(D){for(var G=0,C=0;32>C;C++)G|=(D>>C&1)<<31-C;return G>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+t;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=sk(a);return b}function pk(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function uk(a){return 0>nk(a)?!1:!0}function nk(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",mk);mk.syncOffset=nk;mk.probe=uk;mk.prototype.getVideoInfo=mk.prototype.mh;mk.prototype.getVideoResolution=mk.prototype.kl;
mk.prototype.getVideoNalus=mk.prototype.tf;mk.prototype.getCodecs=mk.prototype.ae;mk.prototype.getStartTime=mk.prototype.getStartTime;mk.prototype.getVideoData=mk.prototype.Wc;mk.prototype.getAudioData=mk.prototype.yb;mk.prototype.getMetadata=mk.prototype.getMetadata;mk.prototype.parseNalus=mk.prototype.Fh;mk.prototype.parseAvcNalus=mk.prototype.Nl;mk.prototype.parse=mk.prototype.parse;mk.prototype.clearData=mk.prototype.clearData;mk.Timescale=9E4;
var tk=[100,110,122,244,44,83,86,118,128,138,139,134];function vk(a,b,c,d,e){var f=this;this.g=a;this.N=c;this.u=d;this.Z=b;this.l=new Map;this.C=new Map;this.gb=new Map;this.h=null;this.Ha=!1;this.L=e||null;this.s=new Map;this.B=new Oc;this.j=new Map;this.I=null;this.J=new Hg;this.sa="";this.eb=!1;this.ra=!0;this.K=!1;this.D=this.O=null;this.i=wk(this,this.J);this.Ka=this.G=!1;this.H=new dh(function(){return xk(f)});this.F=!1;this.P="UNKNOWN";this.Ta=this.Za=!1;this.Ma=new Hg;this.m=!1;this.oa=null;this.Y=new Map;this.ea=this.R=this.na=this.U=null;
this.$=new Hg;this.g.remote&&(this.K="disconnected"!=this.g.remote.state,this.B.o(this.g.remote,"connect",function(){f.K="disconnected"!=f.g.remote.state}),this.B.o(this.g.remote,"connecting",function(){f.K="disconnected"!=f.g.remote.state}),this.B.o(this.g.remote,"disconnect",function(){f.K="disconnected"!=f.g.remote.state}))}
function wk(a,b){a.ra=!0;if(window.ManagedMediaSource){a.D||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.B.o(c,"startstreaming",function(){a.ra=!0});a.B.o(c,"endstreaming",function(){a.ra=!1})}else c=new MediaSource;a.B.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.sa);b.resolve()});a.B.qa(a.g,"playing",function(){a.eb=!0});a.sa=yk(c);a.u.useSourceElements?(a.g.removeAttribute("src"),a.O&&a.g.removeChild(a.O),a.D&&a.g.removeChild(a.D),a.O=Lj(a.sa),a.g.appendChild(a.O),a.D&&a.g.appendChild(a.D),
a.g.load()):a.g.src=a.sa;return c}function zk(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.u.useSourceElements&&(a.D&&a.g.removeChild(a.D),a.D=Lj(b,c),a.g.appendChild(a.D),a.g.disableRemotePlayback=!1)}
function Ak(){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="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.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",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(bf)),b=
{};Rb();a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;qf(c)?b[c]=!0:b[c]=Ei()?bd(c)||(Ve(c)?!0:!1):""!=Fi().canPlayType(c);var d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=vk.prototype;p.destroy=function(){return this.H.destroy()};
function xk(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,w;return Q(function(v){if(1==v.g){b=[];c=u(a.s);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=u(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.s.set(l,h.slice(0,1)),k&&b.push(k.p.catch(Af)),m=u(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new V(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return F(v,Promise.all(b),2)}r=u(a.j.values());for(t=r.next();!t.done;t=r.next())w=t.value,w.destroy();a.B&&(a.B.release(),a.B=null);a.g&&a.D&&
a.g.removeChild(a.D);a.g&&a.O&&(a.g.removeChild(a.O),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.O=null;a.D=null;a.u=null;a.i=null;a.h=null;a.Z=null;a.l.clear();a.gb.clear();a.j.clear();a.I=null;a.s.clear();a.L=null;a.Y.clear();a.N=null;H(v)})}
p.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l,m;return Q(function(n){if(1==n.g)return f=uc,F(n,e.J,2);if(3!=n.g){if(!Bk(e)&&!Ck(e))return n.A(3);$a("Expected MediaSource to be open during init(); reopening the media source.");e.J=new Hg;e.i=wk(e,e.J);return F(n,e.J,3)}e.F=b;e.P=c;e.Za=d;e.Ta=!e.F&&"HLS"==e.P&&!e.Za;e.Y.clear();e.U=null;e.na=null;e.R=null;e.ea=null;e.$=new Hg;g=u(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),
Dk(e,k,l,l.codecs),e.m?(e.s.set(f.ba,[]),e.s.set(f.Ea,[])):e.s.set(k,[]);(m=a.get(f.ba))&&m.isAudioMuxedInVideo&&(e.m=!0);H(n)})};
function Dk(a,b,c,d){"audio"==b&&d&&(d=Uf(d,c.mimeType));var e=af(c.mimeType,d);if(b==rc)Ek(a,e,a.F,c.external);else{var f=a.u.forceTransmux;if(!bd(e)||!a.F&&bf.includes(e))f=!0;var g=cf(c.mimeType,d);if(f){f=pc("audio",(d||"").split(","));d=pc("video",(d||"").split(","));if(f&&d){a.m=!0;Dk(a,"audio",c,f);Dk(a,"video",c,d);return}if(d=Ve(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.u.addExtraFeaturesToSourceBuffer(e);eh(a.H);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new V(2,3,3015,k,"The mediaSource_ status was "+
a.i.readyState+" expected 'open'",null);}a.F&&(h.mode=Fk);a.B.o(h,"error",function(){var k=a.s.get(b)[0];k.p.reject(new V(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.B.o(h,"updateend",function(){return Gk(a,b)});a.l.set(b,h);a.C.set(b,e);a.gb.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.u=a;this.h&&(this.h.B=a.modifyCueCallback)};function Hk(a){return a.ra&&!a.K&&!a.G}
function Ek(a,b,c,d){a.h||(a.h=new mf(a.Z),a.h&&(a.h.B=a.u.modifyCueCallback));var e=a.h;d=d||a.Ha;a=a.P;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=of.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):Uc("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Uc("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
function Bk(a){return a.G?!1:a.i?"ended"==a.i.readyState:!0}function Ck(a){return a.G?!1:a.i?"closed"==a.i.readyState:!0}function Ik(a,b){a.l.size?b==rc?a=a.h.g:(a=Jk(a,b),a=!a||Dj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function Kk(a,b){return a.l.size?b==rc?a.h.h:Ej(Jk(a,b)):null}function Lk(a,b,c){if(b==rc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Jk(a,b);return Gj(a,c)}
p.Pb=function(){var a={total:this.G?[]:Hj(this.g.buffered),audio:Hj(Jk(this,"audio")),video:Hj(Jk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Jk(a,b){if(a.G||a.K)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function Mk(a,b,c,d,e,f){var g=null,h=[],k=Kb(c);if(bf.includes(f))b=Xj(k),b.length&&d&&((c=b.find(function(r){return"com.apple.streaming.transportStreamTimestamp"===r.description}))&&"number"==typeof c.data&&(g=Math.round(c.data)/1E3),a.N.onMetadata([{cueTime:d.startTime,data:k,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.ha&&d.ha.timescale){var l=d.ha.timescale;if(!isNaN(l)){var m=null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length||a.u.dispatchAllEmsgBoxes,
n=0,q=!1;k=new kh;m&&k.V("emsg",function(r){var t=e.emsgSchemeIdUris;if(0===r.version){var w=r.reader.ed();var v=r.reader.ed();var y=r.reader.W();var z=r.reader.W();var A=r.reader.W();var B=r.reader.W();var D=d.startTime+z/y}else y=r.reader.W(),D=r.reader.Jd()/y+d.timestampOffset,z=D-d.startTime,A=r.reader.W(),B=r.reader.W(),w=r.reader.ed(),v=r.reader.ed();r=r.reader.Xb(r.reader.getLength()-r.reader.Ua());if(t&&t.includes(w)||a.u.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==w)a.N.Ml();else if(t=
D+A/y,y={startTime:D,endTime:t,schemeIdUri:w,value:v,timescale:y,presentationTimeDelta:z,eventDuration:A,id:B,messageData:r},B=(new Map).set("detail",y),(new U("emsg",B)).cancelable=!0,a.N.Kl(y),"https://aomedia.org/emsg/ID3"==w||"https://developer.apple.com/streaming/emsg-id3"==w)if(w=Xj(r),w.length)a.N.onMetadata([{cueTime:D,data:r,frames:w,dts:D,pts:D}],0,t)});k.V("prft",function(r){var t=r.reader,w=r.version;t.W();r=t.W();var v=t.W();r=1E3*r+v/Math.pow(2,32)*1E3;0===w?t=t.W():(w=t.W(),t=t.W(),
t=w*Math.pow(2,32)+t);r=Zj(r);t=(new Map).set("detail",{wallClockTime:r,programStartDate:new Date(r-t/l*1E3)});t=new U("prft",t);a.N.onEvent(t)}).box("moof",ph).box("traf",ph).V("tfdt",function(r){q||(n=Ii(r.reader,r.version).baseMediaDecodeTime/l,q=!0,m||r.parser.stop())}).parse(c,!0);q&&0==d.timestampOffset&&(g=n)}}else f.includes("/mp4")||f.includes("/webm")||!uk(k)||(a.Y.has(b)?a.Y.get(b).clearData():a.Y.set(b,new mk),h=a.Y.get(b).parse(k),k=h.getStartTime(b),null!=k&&(g=k),h=h.getMetadata());
return{timestamp:g,metadata:h}}
function Nk(a,b,c,d,e,f,g,h,k,l,m){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L;return Q(function(M){switch(M.g){case 1:n=uc;if(b!=n.Xa){M.A(2);break}if("HLS"!=a.P){M.A(3);break}return F(M,a.Ma,4);case 4:q=M.h,a.h.u=q;case 3:return F(M,sf(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.A(6);break}return F(M,Nk(a,n.ba,c,d,e,f,g,h,k,!0),7);case 7:return F(M,Nk(a,n.Ea,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;t=a.C.get(b);a.j.has(b)&&(t=a.j.get(b).getOriginalMimeType());if(d&&(w=Mk(a,b,c,d,e,t),v=w.timestamp,y=w.metadata,null!=v&&(null==a.U&&b==n.Ea&&(a.U=v,a.na=d.startTime,null!=a.R&&(z=0,a.na==a.ea&&(z=a.U-a.R),a.$.resolve(z))),null==a.R&&b==n.ba&&(a.R=v,a.ea=d.startTime,null!=a.U&&(A=0,a.na==a.ea&&(A=a.U-a.R),a.$.resolve(A))),B=v,D=bf,!a.F&&D.includes(a.C.get(b))&&(B=0),G=d.startTime-B,C=Math.abs(r-
G),(.001<=C||g||h)&&(!k||0<G||!r)&&(r=G,a.Ta&&(Ok(a,b,function(){return Pk(a,b)},null),Ok(a,b,function(){return Qk(a,b,r)},null))),(E=b==n.Ea||!a.l.has(n.Ea))&&a.Ma.resolve(r)),y.length))a.N.onMetadata(y,r,d?d.endTime:null);f&&b==n.Ea&&(a.h||Ek(a,"application/cea-608",a.F,!1),a.I||(I=t.split(";",1)[0],a.I=new id(I)),d?(K=a.I.Nf(c),K.length&&wf(a.h,K,d.startTime,d.endTime,r)):a.I.init(c,h,m));if(!a.j.has(b)){M.A(9);break}return F(M,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:c=M.h;case 9:c=
Rk(a,e,c,d,b);if(!d||!a.F||b==n.Xa){M.A(11);break}if(!g&&!h){M.A(11);break}J=d.startTime;if("HLS"!=a.P||a.m||b!=n.ba||!a.l.has(n.Ea)){M.A(13);break}return F(M,a.$,14);case 14:L=M.h,.15<Math.abs(L)&&(J-=L);case 13:Ok(a,b,function(){return Pk(a,b)},null),Ok(a,b,function(){return Qk(a,b,J)},null);case 11:return F(M,Ok(a,b,function(){var O=c;a.L&&Zc(a.L,O,r,e);a.l.get(b).appendBuffer(O)},d?d.S()[0]:null),15);case 15:H(M)}})}function Sk(a,b){var c=Kk(a,"video")||0;uf(a.h,b,c)}
function Tk(a){a.h&&uf(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=uc,a==f.Ea&&e.I&&e.I.remove(d),a==f.Xa?F(g,e.h.remove(b,c),0):c>b?F(g,Ok(e,a,function(){return Uk(e,a,b,c)},null),5):g.A(0)):e.m?F(g,Ok(e,f.ba,function(){return Uk(e,f.ba,b,c)},null),0):g.A(0)})};
function Vk(a,b){var c;return Q(function(d){return 1==d.g?(c=uc,b==c.Xa?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,Ok(a,b,function(){return Uk(a,b,0,a.i.duration)},null),4)):a.m?F(d,Ok(a,c.ba,function(){return Uk(a,c.ba,0,a.i.duration)},null),0):d.A(0)})}p.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=uc,a==c.Xa?d.return():F(d,Ok(b,a,function(){b.g.currentTime-=.001;Gk(b,a)},null),2)):b.m?F(d,Ok(b,c.ba,function(){var e=c.ba;b.g.currentTime-=.001;Gk(b,e)},null),0):d.A(0)})};
function Wk(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(1==q.g){l=uc;if(b==l.Xa)return f||(a.h.u=c),tf(a.h,d,e),q.return();m=[];return F(q,Xk(a,b,g,h,k),2)}n=q.h;n||(m.push(Ok(a,b,function(){return Pk(a,b)},null)),a.m&&m.push(Ok(a,l.ba,function(){return Pk(a,l.ba)},null)));f||(m.push(Ok(a,b,function(){return Qk(a,b,c)},null)),a.m&&m.push(Ok(a,l.ba,function(){return Qk(a,l.ba,c)},null)));if(0!=d||Infinity!=e)m.push(Ok(a,b,function(){var r=a.l.get(b);r.appendWindowStart=0;r.appendWindowEnd=
e;r.appendWindowStart=d;Gk(a,b)},null)),a.m&&m.push(Ok(a,l.ba,function(){var r=l.ba,t=a.l.get(r);t.appendWindowStart=0;t.appendWindowEnd=e;t.appendWindowStart=d;Gk(a,r)},null));return m.length?F(q,Promise.all(m),0):q.A(0)})}
function Yk(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=uc;if(b==d.Xa)return f.return();b==d.Ea&&(a.Ma=new Hg);if(!a.F||(e=Kk(a,b))&&.1>Math.abs(e-c))return f.return();Ok(a,b,function(){return Pk(a,b)},null);a.m&&Ok(a,d.ba,function(){return Pk(a,d.ba)},null);return F(f,Ok(a,b,function(){return Qk(a,b,c)},null),2)}return a.m?F(f,Ok(a,d.ba,function(){return Qk(a,d.ba,c)},null),0):f.A(0)})}
p.endOfStream=function(a){var b=this;return Q(function(c){return F(c,Zk(b,function(){Bk(b)||Ck(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.vb=function(a){var b=this;return Q(function(c){return F(c,Zk(b,function(){if(b.u.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=u(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new Hg,uri:null};b.s.get(e).unshift(f)}b.i.duration=a;b.oa=a}),0)})};p.getDuration=function(){return this.i.duration};
function $k(a,b,c){Q(function(d){return a.H.g||a.g.error||a.K||a.G||Bk(a)||Ck(a)?d.return():F(d,Zk(a,function(){Bk(a)||Ck(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function al(a){Q(function(b){return a.H.g||a.g.error||a.K||a.G||Bk(a)||Ck(a)?b.return():F(b,Zk(a,function(){Bk(a)||Ck(a)||a.i.clearLiveSeekableRange()}),0)})}function Uk(a,b,c,d){d<=c?Gk(a,b):a.l.get(b).remove(c,d)}
function Pk(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Gk(a,b)}function Qk(a,b,c){0>c&&(c+=.001);var d=!0;"HLS"==a.P&&(d=Kk(a,b),d=!d||.15<Math.abs(d-c)?!0:!1);d&&(a.l.get(b).timestampOffset=c);Gk(a,b)}function Gk(a,b){if(a.G||a.H.g){var c=a.s.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.s.set(b,[]))}else if(c=a.s.get(b)[0])c.p.resolve(),bl(a,b)}
function Ok(a,b,c,d){eh(a.H);c={start:c,p:new Hg,uri:d};a.s.get(b).push(c);1==a.s.get(b).length&&kl(a,b);return c.p}
function Zk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(w){switch(w.g){case 1:eh(a.H);c=[];d=Array.from(a.l.keys());e=u(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new Hg,k={start:function(v){return function(){return v.ready.resolve()}}(g),p:g.ready,uri:null},l=a.s.get(h),l.push(k),c.push(g.ready),1==l.length&&k.start();ta(w,2);return F(w,Promise.all(c),4);case 4:wa(w,3);break;case 2:throw m=xa(w),m;case 3:return ta(w,5,6),F(w,b(),6);case 6:ya(w);n=u(d);for(q=
n.next();!q.done;q=n.next())r=q.value,bl(a,r);Ba(w,0);break;case 5:throw t=xa(w),new V(2,3,3015,t,a.g.error||"No error in the media element",null);}})}function bl(a,b){a.s.get(b).shift();kl(a,b)}function kl(a,b){var c=a.s.get(b)[0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new V(2,3,3017,b)):Hk(a)?c.p.reject(new V(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new V(2,3,3024,b)),bl(a,b)}}
function Rk(a,b,c,d,e){if("mp4"!=ef(a.C.get(e)))return c;var f=null===d,g=a.gb.get(e),h=a.N.Ik(),k=!1;d&&d.ha&&(k=d.ha.encrypted);d=d?d.S()[0]:null;var l=Rb();a.u.correctEc3Enca&&f&&"audio"===e&&(c=qj(c));a.u.insertFakeEncryptionInInit&&g&&l.xe(h,e)&&(f?c=rj(b,c,d):!k&&l.rj(e)&&(c=tj(c)));f&&l.we()&&(c=wj(c));return c}
function ll(a,b,c,d){return Ok(a,b,function(){if(b!==rc){a.C.get(b);if(dd()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.u.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.C.set(b,c)}Gk(a,b)}},null)}
function ml(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D;return Q(function(G){if(1==G.g){if(a.G||a.K)return G.return();c=uc;a.G=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Ka=!0);a.eb&&(a.g.autoplay=!1);ua(G,2);a.B.Sa();f=u(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=u(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(C){}}a.j.clear();a.l.clear();n=a.i.duration;a.J=new Hg;a.i=wk(a,a.J);return F(G,a.J,4)}if(2!=
G.g){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.oa)&&a.oa&&(a.i.duration=a.oa);q=new Hg;r=a.i.sourceBuffers;t=b.size;w=0;v=function(){w++;w===t&&(q.resolve(),a.B.Ca(r,"addsourcebuffer",v))};a.B.o(r,"addsourcebuffer",v);y=u(b.keys());for(z=y.next();!z.done;z=y.next())A=z.value,B=b.get(A),Dk(a,A,B,B.codecs);(D=b.get(c.ba))&&D.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.s.has(c.ba)&&a.s.set(c.ba,[]);a.g.currentTime=d;return F(G,q,2)}ya(G);a.G=!1;eh(a.H);a.B.qa(a.g,"canplaythrough",function(){a.H.g||(a.g.autoplay=
e,a.Ka&&(a.Ka=!1,a.g.play()))});return Ba(G,0)})}function nl(a,b){return Zk(a,function(){return ml(a,b)})}function ol(a,b,c,d){var e=!1,f=pc("audio",(d||"").split(",")),g=pc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=af(c,h);var k=a.u.forceTransmux;if(!bd(d)||!a.F&&bf.includes(d))k=!0;if(k&&(a=cf(c,h),c=Ve(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=ff(kf(d));return{ki:l,mm:e,zi:jf(d),codec:b,mimeType:d}}
function Xk(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,y,z;return Q(function(A){if(1==A.g){f=uc;if(b==f.Xa)return A.return(!1);g=ff(kf(a.C.get(b)));h=jf(a.C.get(b));k=ol(a,b,c,d);l=k.ki;m=k.mm;n=k.zi;q=k.codec;r=k.mimeType;t=!0;m&&a.C.has(f.ba)&&(w=ol(a,f.ba,c,d),v=ff(kf(a.C.get(f.ba))),y=jf(a.C.get(f.ba)),t=v==w.codec&&y==w.zi,w.ki&&w.ki.destroy());if(g===q&&h===n&&t)return a.j.has(b)&&!l?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&l?a.j.set(b,l):l&&(a.j.has(b)&&a.j.get(b).transmux!=l.transmux?
(a.j.get(b).destroy(),a.j.delete(b),a.j.set(b,l)):l.destroy()),A.return(!1);z=!0;if(a.m||m&&l&&!a.j.has(b))z=!1;if(z&&"smooth"===a.u.codecSwitchingStrategy&&dd())return F(A,ll(a,b,r,l),3);l&&l.destroy();return F(A,nl(a,e),3)}return A.return(!0)})}
function pl(a,b,c,d){if(b==rc)var e=!1;else{e=ff(kf(a.C.get(b)));var f=jf(a.C.get(b)),g=af(c,d),h=a.u.forceTransmux;if(!bd(g)||!a.F&&bf.includes(g))h=!0;c=cf(c,d);h&&(h=Ve(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ff(kf(g));g=jf(g);e=e!==b||f!==g}return e?"smooth"!==a.u.codecSwitchingStrategy||!dd()||a.m:!1}var yk=window.URL.createObjectURL,Fk="sequence";function ql(a,b,c){this.i=a;this.D=b;this.u=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}p=ql.prototype;p.getDuration=function(){return this.l};p.Ok=function(){return this.h};p.Fj=function(a){this.i=a};p.vb=function(a){this.l=a};p.Uk=function(){return this.i};p.Cj=function(a){this.B=a};p.jd=function(a){a&&!this.C&&(this.I=!0);this.C=a};p.$f=function(a){this.u=a};p.rf=function(){return this.u};
p.Th=function(a){this.D=a};p.Dk=function(){return this.D};p.kj=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.If(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);null!=this.i&&this.F&&!this.s&&(this.i=c-this.g-this.h)}}};
p.re=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=u(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.If(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};p.jj=function(a,b){this.If(a);Infinity==b||this.T()||(this.g=Math.max(this.g,b))};p.Pk=function(){return this.g};p.Df=function(){this.s=!0};
p.Al=function(){return this.s};p.Vh=function(a){this.m=a};p.Hk=function(){return this.m};p.If=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};p.Bh=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};p.T=function(){return Infinity==this.l&&!this.C};p.Zc=function(){return Infinity!=this.l&&!this.C};p.Jb=function(){return Math.max(this.H,this.Cc()-this.u)};p.Hj=function(a){this.H=a};
p.Cc=function(){return this.T()||this.Zc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};p.ce=function(a){var b=Math.max(this.j,this.H);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Cc()-this.u+a,this.Ib()))};p.bc=function(){return this.ce(0)};p.Ib=function(){return Math.max(0,this.Cc()-(this.T()||this.Zc()?this.D:0))};p.Uj=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
p.Bj=function(a){this.G=a};p.rk=function(){return this.G};S("shaka.media.PresentationTimeline",ql);ql.prototype.getAvailabilityTimeOffset=ql.prototype.rk;ql.prototype.setAvailabilityTimeOffset=ql.prototype.Bj;ql.prototype.usingPresentationStartTime=ql.prototype.Uj;ql.prototype.getSeekRangeEnd=ql.prototype.Ib;ql.prototype.getSeekRangeStart=ql.prototype.bc;ql.prototype.getSafeSeekRangeStart=ql.prototype.ce;ql.prototype.getSegmentAvailabilityEnd=ql.prototype.Cc;ql.prototype.setUserSeekStart=ql.prototype.Hj;
ql.prototype.getSegmentAvailabilityStart=ql.prototype.Jb;ql.prototype.isInProgress=ql.prototype.Zc;ql.prototype.isLive=ql.prototype.T;ql.prototype.offset=ql.prototype.offset;ql.prototype.notifyMaxSegmentDuration=ql.prototype.Bh;ql.prototype.notifyMinSegmentStartTime=ql.prototype.If;ql.prototype.getInitialProgramDateTime=ql.prototype.Hk;ql.prototype.setInitialProgramDateTime=ql.prototype.Vh;ql.prototype.isStartTimeLocked=ql.prototype.Al;ql.prototype.lockStartTime=ql.prototype.Df;
ql.prototype.getMaxSegmentEndTime=ql.prototype.Pk;ql.prototype.notifyPeriodDuration=ql.prototype.jj;ql.prototype.notifySegments=ql.prototype.re;ql.prototype.notifyTimeRange=ql.prototype.kj;ql.prototype.getDelay=ql.prototype.Dk;ql.prototype.setDelay=ql.prototype.Th;ql.prototype.getSegmentAvailabilityDuration=ql.prototype.rf;ql.prototype.setSegmentAvailabilityDuration=ql.prototype.$f;ql.prototype.setStatic=ql.prototype.jd;ql.prototype.setClockOffset=ql.prototype.Cj;
ql.prototype.getPresentationStartTime=ql.prototype.Uk;ql.prototype.setDuration=ql.prototype.vb;ql.prototype.setPresentationStartTime=ql.prototype.Fj;ql.prototype.getMaxSegmentDuration=ql.prototype.Ok;ql.prototype.getDuration=ql.prototype.getDuration;function rl(a,b,c,d){var e=this;this.u=d;this.g=a;this.C=b;this.h=c;this.s=new Oc;this.l=!1;this.F=a.readyState;this.G=this.D=this.j=0;this.m=sl(this);this.B=!1;this.s.o(a,"waiting",function(){return tl(e)});this.i=(new yf(function(){tl(e)})).ya(this.h.gapJumpTimerTime)}rl.prototype.release=function(){this.s&&(this.s.release(),this.s=null);null!=this.i&&(this.i.stop(),this.i=null);this.m&&(this.m.release(),this.m=null);this.g=this.C=this.u=null};
rl.prototype.Lf=function(){this.B=!0;this.i&&this.i.ya(this.h.gapJumpTimerTime);tl(this)};
function tl(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.j&&(a.g.autoplay||a.g.currentTime!=a.j)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.m)){b=a.m;var c=b.h,d=ul(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.s&&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=Ij(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.B||(e=c.start(d),
(f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.C.Ib()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.D++,a.u(new U("gapjumped")))))}}}
function sl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new vl(new wl(a.g),b,function(){var d;return Q(function(e){if(1==e.g)return d=Hj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.A(2)):F(e,a.g.play(),3):e.return();if(2!=e.g){if(!a.g)return e.return();a.g.pause();a.g.play()}a.G++;a.u(new U("stalldetected"));H(e)})})}function vl(a,b,c){this.h=a;this.m=ul(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.s=b;this.j=c}
vl.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function wl(a){var b=this;this.g=a;this.h=new Oc;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 ul(a){if(a.g.paused||0==a.g.playbackRate||a.i||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Hj(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}wl.prototype.release=function(){this.h&&this.h.release();this.h=null};function xl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yl.value().get(b),c.qa(a,b,d))}var yl=new Qb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new Oc;this.i=new Al(a);xl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bl(e,e.j())})}zl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Cl(a){return a.s?a.g.currentTime:a.j()}
function Dl(a,b){0<a.g.readyState?El(a.i,b):xl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Bl(a,a.j())})}function Bl(a,b){.001>Math.abs(a.g.currentTime-b)?Fl(a):(a.h.qa(a.g,"seeking",function(){Fl(a)}),El(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Fl(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
function Al(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new yf(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Al.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function El(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.ya(.1)};function Gl(a){this.g=a;this.i=!1;this.h=null;this.j=new Oc}p=Gl.prototype;p.ready=function(){function a(){if(null==b.h||0==b.h&&Infinity!=b.g.duration)b.i=!0;else{var c=b.g.currentTime,d=null;if("number"===typeof b.h)d=b.h;else if(b.h instanceof Date){var e=Hl(b);null!==e&&(d=b.h.getTime()/1E3-e,d=Il(b,d))}null==d?b.i=!0:(0>d&&(d=Math.max(0,c+d)),c!=d?(b.j.qa(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;xl(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.rg=function(a){this.h=this.i?this.h:a};p.Te=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Hl(this)||0),a=Il(this,a));return a||0};p.ri=function(){return 0};p.pi=function(){return 0};p.ij=function(){};p.Wi=function(){var a=Ej(this.g.buffered);return null!=a&&a>=this.g.duration-1};function Hl(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}
function Il(a,b){a=a.g.seekable;0<a.length&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function Jl(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.u=e;this.s=null;this.j=new rl(a,b.presentationTimeline,c,f);this.i=new zl(a,function(){a:{var h=g.j;h.l=!0;h.B=!1;h.i&&h.i.ya(h.h.gapJumpTimerTime);tl(h);var k=Cl(g.i);h=Kl(g,k);if(!ed()&&.001<Math.abs(h-k)){k=!1;var l=Rb().wj();if(l){var m=Date.now()/1E3;if(!g.s||g.s<m-l)g.s=m,k=!0}else k=!0;if(k){Dl(g.i,h);h=void 0;break a}}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.l&&(k.l=!0,k.j=h);k.i&&
k.i.ya(k.h.gapJumpTimerTime);tl(k)},function(){return Ll(g,d)});this.m=new yf(function(){if(0!=g.h.readyState&&!g.h.paused){var h=Cl(g.i),k=g.g.bc(),l=g.g.Ib();3>l-k&&(k=l-3);h<k&&(h=Kl(g,h),g.h.currentTime=h)}})}p=Jl.prototype;p.ready=function(){this.m.ya(.25)};p.release=function(){this.i&&(this.i.release(),this.i=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.h=this.i=this.g=this.l=null;this.u=function(){}};p.rg=function(a){Dl(this.i,Ll(this,a))};
p.Te=function(){var a=Cl(this.i);return 0<this.h.readyState&&!this.h.paused?Ml(this,a):a};p.ri=function(){return this.j.G};p.pi=function(){return this.j.D};function Ll(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.bc():a.g.Ib():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):0>b&&(b=a.g.Ib()+b);return Nl(a,Ml(a,b))}p.ij=function(){this.j.Lf()};p.Wi=function(){if(this.g.T()){var a=this.g.Cc(),b=Ej(this.h.buffered);if(null!=b&&b>=a)return!0}return!1};
function Nl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Kl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.Ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ce(c),k=a.g.ce(d);c=a.g.ce(c+d);return b>=g?Nl(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.T()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Fj(a.h.buffered,k)?k:c:b>=h||Fj(a.h.buffered,b)?b:c}function Ml(a,b){var c=a.g.bc();if(b<c)return c;a=a.g.Ib();return b>a?a:b};function Ol(a){this.g=a;this.m=null;this.i=0;this.s=!1}p=Ol.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Hl=function(){this.s=!0};p.Gb=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function bg(a){return a.g[0]||null}
p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--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(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.Ff=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};p.pe=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ff(a);this.hb(b)};p.hb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
p.vd=function(a,b,c){c=void 0===c?!1:c;if(!this.s){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;0!=this.g.length&&(a=this.g[this.g.length-1],b=new zj(a.startTime,b,a.D,a.startByte,a.endByte,a.ha,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.hg=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new yf(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.ya(a))};Ol.prototype[Symbol.iterator]=function(){return this.ac(0)};
Ol.prototype.ac=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--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 $a("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Pl(this,d,f,c)};Ol.prototype.hf=function(){return-1};
function Ql(a,b,c){a=new zj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ol([a])}S("shaka.media.SegmentIndex",Ol);Ol.forSingleSegment=Ql;Ol.prototype.getIteratorForTime=Ol.prototype.ac;Ol.prototype.updateEvery=Ol.prototype.hg;Ol.prototype.fit=Ol.prototype.vd;Ol.prototype.evict=Ol.prototype.hb;Ol.prototype.mergeAndEvict=Ol.prototype.pe;Ol.prototype.offset=Ol.prototype.offset;Ol.prototype.get=Ol.prototype.get;Ol.prototype.find=Ol.prototype.find;Ol.prototype.markImmutable=Ol.prototype.Hl;
Ol.prototype.release=Ol.prototype.release;Ol.prototype.getNumEvicted=Ol.prototype.getNumEvicted;Ol.prototype.getNumReferences=Ol.prototype.getNumReferences;function Pl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=Pl.prototype;p.Od=function(a){this.reverse=a};p.kk=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.B&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.B&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.Mh=function(){var a=this.current();if(a.s&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",Pl);Pl.prototype.resetToLastIndependent=Pl.prototype.Mh;Pl.prototype.next=Pl.prototype.next;Pl.prototype.current=Pl.prototype.current;Pl.prototype.currentPosition=Pl.prototype.kk;Pl.prototype.setReverse=Pl.prototype.Od;function Rl(){Ol.call(this,[]);this.h=[]}pa(Rl,Ol);p=Rl.prototype;p.clone=function(){var a=new Rl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
p.Gb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Gb(a)};function Sl(a,b){a=u(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=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function Tl(a,b){a=u(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,null!=c.find(b))return c.hf();return-1}
p.get=function(a){for(var b=this.i,c=u(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.Ff=function(){};p.hb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.hb(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};p.pe=function(){};p.vd=function(){};p.hg=function(){};S("shaka.media.MetaSegmentIndex",Rl);
Rl.prototype.updateEvery=Rl.prototype.hg;Rl.prototype.fit=Rl.prototype.vd;Rl.prototype.mergeAndEvict=Rl.prototype.pe;Rl.prototype.evict=Rl.prototype.hb;Rl.prototype.merge=Rl.prototype.Ff;Rl.prototype.offset=Rl.prototype.offset;Rl.prototype.get=Rl.prototype.get;Rl.prototype.find=Rl.prototype.find;Rl.prototype.forEachTopLevelReference=Rl.prototype.Gb;Rl.prototype.release=Rl.prototype.release;function Ul(a){var b=this;this.g=a;this.j=!1;this.i=this.g.qf();this.h=new yf(function(){b.g.gj(.25*b.i)})}Ul.prototype.release=function(){this.set(this.Uc());this.h&&(this.h.stop(),this.h=null);this.g=null};Ul.prototype.set=function(a){this.i=a;Vl(this)};Ul.prototype.Uc=function(){return this.g.Uc()};function Vl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.qf()!=b&&a.g.Wh(b);return}catch(c){}a.h.ya(.25);0!=a.g.qf()&&a.g.Wh(0)};function Wl(a){var b=this;this.j=a;this.h=new Oc;this.g=new Set;this.i=(new yf(function(){Xl(b,!1)})).Ja();a.paused||this.i.ya(.25);this.h.o(a,"playing",function(){b.i.Ja().ya(.25)});this.h.o(a,"pause",function(){b.i.stop()})}Wl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Xl(a,b){var c=a.j.currentTime;a=u(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function Yl(a){jb.call(this);this.g=new Map;this.h=a}pa(Yl,jb);Yl.prototype.release=function(){this.g.clear();jb.prototype.release.call(this)};function Zl(a,b){var c=a.g.get(b);c||(c={ve:[],Lg:null,contentType:b},a.g.set(b,c));return c}function $l(a,b,c){var d=Zl(a,b.contentType);am(a,d);a={Cd:b,position:c};d=d.ve;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
Yl.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Lg;a:{var e=c.ve;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Cd;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&&!ud(d.roles,e.roles);(g||h||d)&&bm(this,a,e.contentType)&&(c.Lg=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&bm(this,a,e.contentType)&&(c.Lg=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function bm(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function am(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ve;b.ve=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.ve=[]}
function cm(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};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function dm(a){jb.call(this);this.h=new Map;this.i=a;this.g=null}pa(dm,jb);dm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);jb.prototype.release.call(this)};function em(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 U("regionadd",new Map([["region",b]])),a.dispatchEvent(b),fm(a))}
function fm(a){a.g||(a.g=(new yf(function(){for(var b=a.i(),c=u(a.h),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new U("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).ya(2))};function gm(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function hm(a,b){a.l=b;a=u(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function im(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.ac(b,!0,a.s));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.endByte&&(d=!1);2==c.Ec()&&(d=!1);c.cc(!1)&&(d=!1);d&&c.ha&&b.push(jm(a,c.ha));d&&!a.h.has(c)&&(d=new km(a.l),b.push(lm(d,c,a.i)),a.h.set(c,d))}mm(a);return Promise.all(b)}
function jm(a,b){if(!a.i.segmentIndex||b.cc()||Array.from(a.j.keys()).some(function(e){return yj(e,b)}))return Promise.resolve();var c=new km(a.l),d=lm(c,b,a.i);a.j.set(b,c);return d}function nm(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&om(a,c)}function pm(a){nm(a,a.h);nm(a,a.j);a.g=null}gm.prototype.hb=function(a,b){b=void 0===b?!1:b;for(var c=u(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&om(this,d);b&&mm(this)};
gm.prototype.Od=function(a){this.s=a;this.g&&this.g.Od(a)};function mm(a){for(var b=Array.from(a.h.keys()),c=u(a.j.keys()),d=c.next(),e={};!d.done;e={sh:void 0},d=c.next())e.sh=d.value,b.some(function(f){return function(g){return yj(g.ha,f.sh)}}(e))||om(a,e.sh)}function qm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&om(a,d)}mm(a)}function rm(a,b){b&&b!==a.i&&(pm(a),a.i=b)}function om(a,b){var c=a.h;b instanceof xj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}
function km(a){this.g=a;this.se=this.bi=null}function lm(a,b,c){var d=new Uint8Array(0);a.se=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0<d.byteLength?d=kc(d,e):d=e,a.bi?F(f,a.bi(d),3):f.A(0);d=new Uint8Array(0);H(f)})});return a.se.promise.catch(function(e){return e instanceof V&&7001==e.code?Promise.resolve():Promise.reject(e)})}km.prototype.abort=function(){this.se&&this.se.abort()};function sm(a){var b=jf(a),c=b.split("/")[0];a=kf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Fe:null,colorGamut:null,frameRate:null}}
function tm(a,b,c){function d(C){y=C.name;var E=C.reader;E.skip(24);var I=E.Fa(),K=E.Fa();E.skip(50);q=String(I);n=String(K);C.reader.Oa()&&ph(C)}function e(C){var E=Li(C.reader);r=E.channelCount;t=E.sampleRate;f(C.name)}function f(C){C=C.toLowerCase();switch(C){case "avc1":case "avc3":h.push(C+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(C+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(C+".05.04");l=!0;break;case "vp09":h.push(C+".00.10.08");l=!0;break;case "av01":h.push(C+".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(C),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,t=null,w=null,v=null,y;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).V("mdhd",function(C){m=Ji(C.reader,C.version).language}).box("minf",ph).box("stbl",ph).V("stsd",rh).box("mp4a",function(C){var E=Li(C.reader);r=E.channelCount;t=E.sampleRate;C.reader.Oa()?ph(C):f(C.name)}).box("esds",function(C){C=C.reader;for(var E=
"mp4a",I,K;C.Oa();){I=C.aa();for(var J=C.aa();J&128;)J=C.aa();if(3==I)C.Fa(),J=C.aa(),J&128&&C.Fa(),J&64&&C.skip(C.aa()),J&32&&C.Fa();else if(4==I)K=C.aa(),C.skip(12);else if(5==I)break}K&&(E+="."+Oi(K),5==I&&C.Oa()&&(I=C.aa(),K=(I&248)>>3,31===K&&C.Oa()&&(K=32+((I&7)<<3)+((C.aa()&224)>>5)),E+="."+K));g.push(E);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",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(C){var E=y||"";switch(y){case "dvav":E="avc3";break;case "dva1":E="avc1"}C=C.reader;C.skip(1);C=E+"."+Oi(C.aa())+Oi(C.aa())+Oi(C.aa());h.push(C);l=!0}).box("hvcC",function(C){var E=y||"";switch(y){case "dvh1":E="hvc1";break;case "dvhe":E="hev1"}var I=C.reader;I.skip(1);C=I.aa();var K=["","A","B","C"][C>>6],J=C&31,L=I.W(),M=(C&32)>>5?"H":"L";C=[I.aa(),I.aa(),I.aa(),I.aa(),I.aa(),I.aa()];I=I.aa();for(var O=0,N=0;32>N;N++){O|=L&1;if(31==N)break;O<<=1;L>>=1}E=E+("."+
K+J)+("."+Oi(O,!0));E+="."+M+I;K="";for(J=C.length;J--;)if((M=C[J])||K)K="."+M.toString(16).toUpperCase()+K;E+=K;h.push(E);l=!0}).box("dvcC",function(C){var E=y||"";switch(y){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var I=C.reader;I.skip(2);C=I.aa();I=I.aa();h.push(E+"."+Pi(C>>1&127)+"."+Pi(C<<5&32|I>>3&31));l=!0}).box("dvvC",function(C){var E=y||"";switch(y){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;
case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var I=C.reader;I.skip(2);C=I.aa();I=I.aa();h.push(E+"."+Pi(C>>1&127)+"."+Pi(C<<5&32|I>>3&31));l=!0}).V("vpcC",function(C){var E=y||"",I=C.reader;C=I.aa();var K=I.aa();I=I.aa()>>4&15;h.push(E+"."+Pi(C)+"."+Pi(K)+"."+Pi(I));l=!0}).box("av1C",function(C){var E=y||"";switch(y){case "dav1":E="av01"}var I=C.reader;I.skip(1);C=I.aa();I=I.aa();var K=C>>>5,J=(I&64)>>6;h.push(E+"."+K+"."+Pi(C&31)+(I>>>7?"H":"M")+"."+Pi(2===K&&J?(I&32)>>
5?12:10:J?10:8)+"."+((I&16)>>4)+"."+((I&8)>>3)+((I&4)>>2)+(I&3)+"."+Pi(1)+"."+Pi(1)+"."+Pi(1)+".0");l=!0}).box("enca",th).box("encv",sh).box("sinf",ph).box("frma",function(C){C=Mi(C.reader).codec;f(C)}).box("colr",function(C){h=h.map(function(K){if(K.startsWith("av01.")){var J=C.reader,L=J.Ua(),M=J.Xb(4);var O=String.fromCharCode(M[0]);O+=String.fromCharCode(M[1]);O+=String.fromCharCode(M[2]);O+=String.fromCharCode(M[3]);if("nclx"===O){M=J.Fa();O=J.Fa();var N=J.Fa(),P=J.aa()>>7,R=K.split(".");10==
R.length&&(R[6]=Pi(M),R[7]=Pi(O),R[8]=Pi(N),R[9]=String(P),K=R.join("."))}J.seek(L)}return K});var E=Ni(C.reader),I=E.colorGamut;w=E.Fe;v=I}).parse(a||b,!0);if(!g.length&&!h.length)return null;var z=k&&!l,A=new Map;if(l&&!c){c=new id("video/mp4");a&&c.init(a);try{c.Nf(b);for(var B=u(c.qg()),D=B.next();!D.done;D=B.next()){var G=D.value;A.set(G,G)}}catch(C){}c.Rd()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:um(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r,
sampleRate:t,closedCaptions:A,Fe:w,colorGamut:v,frameRate:null}}function um(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=hf(d);b.has(e)||(c.push(d),b.add(e))}b=sc("audio",c);d=sc("video",c);a=sc(rc,c);d=vm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function vm(a){if(1>=a.length)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?bd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function wm(a){var b=null;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).box("minf",ph).box("stbl",ph).V("stsd",rh).box("encv",sh).box("enca",th).box("sinf",ph).box("schi",ph).V("tenc",function(c){c=c.reader;c.aa();c.aa();c.aa();c.aa();b=jc(c.Xb(16))}).parse(a,!0);return b}
function xm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.A(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Kb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?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 ym(a,b,c,d,e){a=Wg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function zm(a,b){var c=this;this.g=b;this.j=a;this.h=null;this.J=new Map;this.D=1;this.B=this.l=null;this.O=0;this.i=new Map;this.I=!1;this.P=null;this.C=!1;this.m=new dh(function(){return Am(c)});this.L=Date.now()/1E3;this.s=new Map;this.N={projection:null,hfov:null};this.U=0;this.R=Infinity;this.F=null;this.K=[];this.u=new yf(function(){if(c.j&&c.g)if(c.j.presentationTimeline.T()){var d=c.j.presentationTimeline.bc(),e=c.j.presentationTimeline.Ib();1<e-d?$k(c.g.ia,d,e):al(c.g.ia)}else al(c.g.ia),
c.u&&c.u.stop();else c.u&&c.u.stop()});this.G=null;this.H=new yf(function(){var d=c.g.video;!d.ended&&c.G&&(d.currentTime=c.G,c.G=null)})}p=zm.prototype;p.destroy=function(){return this.m.destroy()};
function Am(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g){a.u&&a.u.stop();a.u=null;a.H&&a.H.stop();a.H=null;b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Bm(e),b.push(Cm(e)),e.ka&&(pm(e.ka),e.ka=null);f=u(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,pm(h);return F(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.j=null;a.h=null;a.G=null;H(k)})}
p.configure=function(a){this.h=a;this.P=new Eg({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.i.get("audio");b&&b.ka&&(pm(b.ka),b.ka=null);b=u(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,pm(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(rc))&&
b.ka&&(pm(b.ka),b.ka=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ka&&(pm(b.ka),b.ka=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ka?(qm(c.ka,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(pm(c.ka),c.ka=null)):0<a.segmentPrefetchLimit&&(c.ka=Dm(this,c.stream));a.disableAudioPrefetch||Em(this)};function Fm(a,b,c){a.j.presentationTimeline.T()||(a.U=b,a.R=c)}
p.start=function(a){var b=this;return Q(function(c){if(1==c.g)return F(c,Gm(b,a||new Map),2);eh(b.m);b.I=!0;H(c)})};function Hm(a,b){var c,d,e,f,g,h,k;Q(function(l){switch(l.g){case 1:return c=uc,a.O++,d=a.O,ta(l,2),F(l,Vk(a.g.ia,c.Xa),4);case 4:wa(l,3);break;case 2:if(e=xa(l),a.g)a.g.onError(e);case 3:f=af(b.mimeType,b.codecs),Ek(a.g.ia,f,a.j.sequenceMode,b.external),g=a.g.ia.Z,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.O==d&&(k=Im(a,b),a.i.set(c.Xa,k),Jm(a,k,0)),H(l)}})}
function Km(a){var b=a.i.get(rc);b&&(Bm(b),Cm(b).catch(function(){}),a.F=a.i.get(rc),a.i.delete(rc));a.B=null}function Lm(a,b){for(var c=0>a.g.Ya(),d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.Aa&&e.Aa.Od(c),e.ka&&e.ka.Od(c);d=u(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.Od(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Jc&&(Mm(a,b,!1,0,!1),c.Jc=d);else if(b=c.Jc)c.Jc=null,Mm(a,b,!0,0,!1)}
function Nm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.I&&(b.video&&Mm(a,b.video,c,d,e,f),b.audio&&Mm(a,b.audio,c,d,e,f))}function Om(a,b){Q(function(c){if(1==c.g)return a.F=null,a.B=b,a.I?b.segmentIndex?c.A(2):F(c,b.createSegmentIndex(),2):c.return();Mm(a,b,!0,0,!1);H(c)})}function Pm(a,b){for(var c=u(a.J.entries()),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.J.delete(d))}}
function Mm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=rc?g&&(g.Jc&&(b.trickModeVideo?(g.Jc=b,b=b.trickModeVideo):g.Jc=null),g.stream!=b||e)&&(a.s.has(b)?g.ka=a.s.get(b):g.ka&&rm(g.ka,b),b.type==rc&&(e=af(b.mimeType,b.codecs),Ek(a.g.ia,e,a.j.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.$a?(e="("+g.type+":"+g.stream.id+")",a.J.has(e)||a.J.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream=
b,g.Aa=null,g.yg=!!f,b.dependencyStream?g.$d=Im(a,b.dependencyStream):g.$d=null,e?Qm(a,!0,!1):(c?g.Pc?g.og=!0:g.$a?(g.Oc=!0,g.gf=d,g.og=!0):(Bm(g),Rm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.$a||g.Cb||Jm(a,g,0),Sm(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):Hm(a,b)}
function Sm(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.Lb)return e.return();c=b.stream;d=b.Lb;return c.segmentIndex?e.A(2):F(e,c.createSegmentIndex(),2)}if(b.Lb!=d||b.stream!=c)return e.return();var f=a.g.Vc();var g=Kk(a.g.ia,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.endByte?k.endByte-k.startByte:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ha)&&(h+=(k.endByte?k.endByte-k.startByte:null)||
0),k=a.g.getBandwidthEstimate(),f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.Lb.h.g>h?!0:!1):f=!1;f&&b.Lb.abort();H(e)})}
p.hd=function(){if(this.g){for(var a=this.g.Vc(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ia;d==rc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Jk(e,d),e=Fj(e,a));if(!e){this.L=0;c.ka&&(c.ka.g=null);if("audio"===c.type){e=u(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.Aa=null;(null!=Kk(this.g.ia,d)||c.$a)&&Tm(this,c);c.Lb&&(c.Lb.abort(),c.Lb=null);d===rc&&(d=this.g.ia,d.I&&d.I.Rd());c.hd=!0}}"keep"!==this.h.crossBoundaryStrategy&&
Um(this)}};function Tm(a,b){b.Pc||b.Oc||(b.$a?(b.Oc=!0,b.gf=0):null==Ik(a.g.ia,b.type)?null==b.Cb&&Jm(a,b,0):(Bm(b),Rm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function Gm(a,b){var c,d,e,f,g,h,k,l,m;return Q(function(n){if(1==n.g){c=uc;if(!a.l)throw new V(2,5,5006);d=new Map;a.l.audio&&d.set(c.ba,a.l.audio);a.l.video&&d.set(c.Ea,a.l.video);a.B&&d.set(c.Xa,a.B);e=a.g.ia;return F(n,e.init(d,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}eh(a.m);a.updateDuration();f=u(d.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=d.get(h),a.i.has(h)||(l=Im(a,k),b.has(k.id)&&(m=b.get(k.id),hm(m,function(q,r,t){return Vm(q,r,t||null,a.h.retryParameters,
a.g.uc)}),l.ka=m),a.i.set(h,l),Jm(a,l,0));H(n)})}function Im(a,b){var c={stream:b,type:b.type,Aa:null,ka:Dm(a,b),Ra:null,Tb:null,Cf:null,cd:null,bd:null,Af:null,Bf:null,Jc:null,endOfStream:!1,$a:!1,Cb:null,Oc:!1,gf:0,og:!1,Pc:!1,hd:!0,yg:!1,Jh:!1,fe:!1,Lb:null,$d:null};b.dependencyStream&&(c.$d=Im(a,b.dependencyStream));return c}
function Dm(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===rc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===rc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ka)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new gm(a.h.segmentPrefetchLimit,b,function(d,e,f){return Vm(d,e,f||null,a.h.retryParameters,a.g.uc)},0>a.g.Ya()):null}
function Em(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=u(a.j.variants),e=d.next(),f={};!e.done;f={Ob:void 0},e=d.next())if(f.Ob=e.value,f.Ob.audio)if(a.s.has(f.Ob.audio)){if(e=a.s.get(f.Ob.audio),qm(e,b),!(0<b&&c.some(function(h){return function(k){return xc(h.Ob.audio.language,k)}}(f)))){var g=a.i.get(f.Ob.audio.type);e!==(g&&g.ka)&&pm(e);a.s.delete(f.Ob.audio)}}else 0>=b||!c.some(function(h){return function(k){return xc(h.Ob.audio.language,k)}}(f))||!(e=Dm(a,f.Ob.audio))||
(f.Ob.audio.segmentIndex||f.Ob.audio.createSegmentIndex(),a.s.set(f.Ob.audio,e))}p.updateDuration=function(){var a=ed(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.u&&this.u.stop(),al(this.g.ia)),this.g.ia.vb(b)):a?(this.u&&this.u.ya(.5),this.g.ia.vb(Infinity)):this.g.ia.vb(Math.pow(2,32))};
function Wm(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:eh(a.m);if(b.$a||null==b.Cb||b.Pc)return k.return();b.Cb=null;if(!b.Oc){k.A(2);break}return F(k,Rm(a,b,b.og,b.gf),3);case 3:return k.return();case 2:Pm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=xa(k),F(k,Xm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.$a||b.Cb||
Jm(a,b,0),k.return();case 4:ta(k,9);e=Ym(a,b);null!=e&&(Jm(a,b,e),b.fe=!1);wa(k,10);break;case 9:return f=xa(k),F(k,Xm(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.I||!g.every(function(l){return l.endOfStream})){k.A(0);break}return F(k,a.g.ia.endOfStream(),13);case 13:eh(a.m),h=a.g.ia.getDuration(),0!=h&&h<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.vb(h),H(k)}})}
function Ym(a,b){if(Zm(b))return Sk(a.g.ia,b.stream.originalId||""),null;b.type==rc&&Tk(a.g.ia);if(b.stream.isAudioMuxedInVideo)return null;var c=a.h.updateIntervalSeconds/Math.max(1,Math.abs(a.g.Ya()));if(!Hk(a.g.ia)&&b.type!=rc)return c/2;var d=a.g.Vc();if("audio"===b.type)for(var e=u(a.s.keys()),f=e.next();!f.done;f=e.next())f=a.s.get(f.value),f.hb(d,!0),im(f,d);e=b.Ra?b.Ra.endTime:d;var g=Lk(a.g.ia,b.type,d);f=Math.max(1,Math.max(a.h.rebufferingGoal,a.h.bufferingGoal)*a.D);var h=a.j.presentationTimeline.getDuration()-
e,k=Kk(a.g.ia,b.type);if(1E-6>h&&k)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(rc))&&Zm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.Aa;k=$m(a,b,d,k);if(!k)return c;g=!1;h&&b.yg&&(g=!0,b.yg=!1);h=Infinity;var l=Array.from(a.i.values());l=u(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Zm(m)||m.Aa&&!m.Aa.current()||(h=Math.min(h,m.Ra?m.Ra.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.h.crossBoundaryStrategy&&an(a,b,k))return null;b.ka&&b.Aa&&
!a.s.has(b.stream)&&(b.ka.hb(k.startTime+.001),im(b.ka,k.startTime).catch(function(){}));bn(a,b,d,k,g).catch(function(){});b.$d&&cn(a,b.$d,d,f);return null}
function $m(a,b,c,d){if(b.Aa)return(c=b.Aa.current())&&b.Ra&&.001>Math.abs(b.Ra.startTime-c.startTime)&&(c=b.Aa.next().value),c;if(b.Ra||d)return c=b.Ra?b.Ra.endTime:d,a=0>a.g.Ya(),b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(c,!1,a)),b.Aa&&b.Aa.next().value;d=a.j.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ya();var f=null;d&&(b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(e,!1,a)),f=b.Aa&&b.Aa.next().value);f||(b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(c,
!1,a)),f=b.Aa&&b.Aa.next().value);return f}
function bn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G;return Q(function(C){switch(C.g){case 1:f=uc;g=b.stream;h=b.Aa;b.$a=!0;ta(C,2);if(2==d.Ec())throw new V(1,1,1011);return F(C,dn(a,b,d,e),4);case 4:eh(a.m);if(a.C)return C.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&("HLS"!=a.j.type||d.m))return r=new Uint8Array(0),w=t=!1,y=function(E){var I,K,J,L;return Q(function(M){switch(M.g){case 1:if(t)return M.return();w=
!0;eh(a.m);if(a.C)return M.return();ta(M,2);r=en(r,E);I=!1;K=0;(new kh).box("mdat",function(O){K=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){M.A(4);break}J=r.subarray(0,K);r=r.subarray(K);return F(M,fn(a,b,c,g,d,J,!0,e),5);case 5:b.ka&&b.Aa&&im(b.ka,d.startTime,!0);case 4:wa(M,0);break;case 2:v=L=xa(M),H(M)}})},F(C,gn(a,b,d,y),9);n=gn(a,b,d);return F(C,n,7);case 7:q=C.h;eh(a.m);if(a.C)return C.return();eh(a.m);return b.Oc?(b.$a=!1,Jm(a,b,0),C.return()):F(C,fn(a,b,c,g,d,q,!1,e),6);case 9:z=C.h;if(v)throw v;
if(w){C.A(10);break}t=!0;eh(a.m);return a.C?C.return():b.Oc?(b.$a=!1,Jm(a,b,0),C.return()):F(C,fn(a,b,c,g,d,z,!1,e),10);case 10:b.ka&&b.Aa&&im(b.ka,d.startTime,!0);case 6:eh(a.m);if(a.C)return C.return();b.Ra=d;h.next();b.$a=!1;b.Jh=!1;A=a.g.ia.Pb();B=A[b.type];gb(JSON.stringify(B));b.Oc||(D=null,b.type===f.Ea?D=a.i.get(f.ba):b.type===f.ba&&(D=a.i.get(f.Ea)),D&&D.type==f.ba?a.g.Lf(d,b.stream,D.stream.isAudioMuxedInVideo):a.g.Lf(d,b.stream,b.stream.codecs.includes(",")));Jm(a,b,0);wa(C,0);break;case 2:G=
xa(C);eh(a.m,G);if(a.C)return C.return();b.$a=!1;if(7001==G.code)b.$a=!1,Bm(b),Jm(a,b,0),C.A(0);else if(b.type==f.Xa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Xa),C.A(0);else{if(3017==G.code)return F(C,hn(a,b,G),0);b.fe=!0;1==G.category&&b.ka&&om(b.ka,d);G.severity=2;return F(C,Xm(a,b,G),0)}}})}
function cn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return Q(function(w){switch(w.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.ac(c))&&g.next().value;h&&a.K.includes(h.startTime);)h=g&&g.next().value;if(!h){w.A(0);break}k=h.ha;if(!k||yj(k,b.Tb)){w.A(3);break}b.Tb=k;ta(w,4);return F(w,gn(a,b,k),6);case 6:l=w.h;var v=a.g.ia;v.L&&Zc(v.L,l,0,e);a.K=[];wa(w,3);break;case 4:throw m=xa(w),b.Tb=null,m;case 3:if(b.Ra&&b.Ra==h){w.A(0);break}b.Ra=h;ta(w,8);return F(w,gn(a,b,h),10);case 10:n=w.h;v=a.g.ia;v.L&&
Zc(v.L,n,0,e);a.K.push(h.startTime);wa(w,9);break;case 8:throw q=xa(w),b.Ra=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.K)));t=a.g.Vc();if(t+d>r)return F(w,cn(a,b,h.startTime,d),0);w.A(0)}})}function en(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
function hn(a,b,c){var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Jh}))return l.A(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();if(a.h.avoidEvictionOnQuotaExceededError)return Jm(a,b,4),l.return();h=Math.round(100*a.D);if(20<h)a.D-=.2;else if(4<h)a.D-=.04;else return b.fe=!0,a.C=!0,a.g.onError(c),l.return();b.Jh=!0;k=a.g.Vc();return F(l,jn(a,b,k),2)}Jm(a,b,4);
H(l)})}
function dn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A;return Q(function(B){switch(B.g){case 1:e=uc;f=null==b.Ra;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.U)-.1);k=Math.min(c.appendWindowEnd,a.R)+.01;l=c.codecs||b.stream.codecs;m=hf(l);n=jf(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.Cf&&h==b.cd&&k==b.bd&&m==b.Af&&n==b.Bf){B.A(2);break}r=b.Af&&b.Bf&&pl(a.g.ia,b.type,n,l);if(!r){B.A(3);break}t=null;b.type===e.Ea?t=a.i.get(e.ba):b.type===e.ba&&(t=a.i.get(e.Ea));if(!t){B.A(3);break}return F(B,
Cm(t).catch(function(){}),5);case 5:t.Tb=null,t.cd=null,t.bd=null,Tm(a,t);case 3:return F(B,kn(a,b,q,h,k,c,m,n),2);case 2:return yj(c.ha,b.Tb)||(b.Tb=c.ha,c.l&&c.ha&&(w=gn(a,b,c.ha),v=function(){var D,G,C,E,I,K,J,L,M;return Q(function(O){switch(O.g){case 1:return ta(O,2),F(O,w,4);case 4:return D=O.h,eh(a.m),G=null,C=new Map,E={projection:null,hfov:null},I=new kh,I.box("moov",ph).box("trak",ph).box("mdia",ph).V("mdhd",function(N){G=Ji(N.reader,N.version).timescale}).box("hdlr",function(N){N=N.reader;
N.skip(8);switch(N.ed()){case "soun":C.set(e.ba,G);break;case "vide":C.set(e.Ea,G)}G=null}).box("minf",ph).box("stbl",ph).V("stsd",rh).box("encv",sh).box("avc1",sh).box("avc3",sh).box("hev1",sh).box("hvc1",sh).box("dvav",sh).box("dva1",sh).box("dvh1",sh).box("dvhe",sh).box("dvc1",sh).box("dvi1",sh).box("vexu",ph).box("proj",ph).V("prji",function(N){N=N.reader.ed();E.projection=N}).box("hfov",function(N){N=N.reader.W()/1E3;E.hfov=N}).parse(D),b.type===e.Ea&&ln(a,E),C.has(b.type)?c.ha.timescale=C.get(b.type):
null!=G&&(c.ha.timescale=G),K=b.stream.segmentIndex,K instanceof Rl&&(J=Tl(K,c.startTime)),L=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,F(O,a.g.Ai(b.type,D),5);case 5:return F(O,Nk(a.g.ia,b.type,D,null,b.stream,L,b.hd,d,!1,!1,J),6);case 6:wa(O,0);break;case 2:throw M=xa(O),b.Tb=null,M;}})},y=c.startTime,f&&(z=Kk(a.g.ia,b.type),null!=z&&(y=z)),a.g.Ll(y,c.ha),g.push(v()))),A=b.Ra?b.Ra.i:-1,c.i!=A&&g.push(Yk(a.g.ia,b.type,c.startTime)),F(B,Promise.all(g),0)}})}
function kn(a,b,c,d,e,f,g,h){var k,l,m,n;return Q(function(q){if(1==q.g)return k=uc,l=new Map,a.l.audio&&l.set(k.ba,a.l.audio),a.l.video&&l.set(k.Ea,a.l.video),ta(q,2),b.cd=d,b.bd=e,g&&(b.Af=g),h&&(b.Bf=h),b.Cf=c,m=a.j.sequenceMode||"HLS"==a.j.type,F(q,Wk(a.g.ia,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=q.g)return wa(q,0);n=xa(q);b.cd=null;b.bd=null;b.Af=null;b.Bf=null;b.Cf=null;throw n;})}
function fn(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,q,r;return Q(function(t){switch(t.g){case 1:return k=d.closedCaptions&&0<d.closedCaptions.size,a.h.shouldFixTimestampOffset&&(m="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType,n=null,e.ha&&(n=e.ha.timescale),(q=m&&n&&"video"===d.type&&"DASH"==a.j.type)&&(l=new kh),q&&l.box("moof",ph).box("traf",ph).V("tfdt",function(w){var v,y,z,A,B,D;return Q(function(G){v=Ii(w.reader,w.version);y=v.baseMediaDecodeTime;if(!y)return G.return();
z=-y/n;A=Number(b.Cf)||0;if(!(A<z))return G.A(0);B=b.cd;D=b.bd;return F(G,kn(a,b,z,B,D,e),0)})}),q&&l.parse(f,!1,g)),F(t,jn(a,b,c),2);case 2:return eh(a.m),r=b.hd,b.hd=!1,F(t,a.g.Ai(b.type,f),3);case 3:return F(t,Nk(a.g.ia,b.type,f,e,d,k,r,h,g),4);case 4:eh(a.m),H(t)}})}
function jn(a,b,c){var d,e,f,g,h,k,l,m,n;return Q(function(q){if(1==q.g){d=b.stream.segmentIndex;d instanceof Rl&&(d.hb(a.j.presentationTimeline.Jb()),e=[],Sl(d,function(r){e.push(r.hf())}));f=Math.max(a.h.bufferBehind*a.D,a.j.presentationTimeline.h);g=Ik(a.g.ia,b.type);if(null==g)return a.F==b&&(a.F=null),q.return();h=c-g;k=a.h.evictionGoal;l=a.j.presentationTimeline.bc();m=a.j.presentationTimeline.Ib();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():F(q,a.g.ia.remove(b.type,g,g+n,e),
2)}if(4!=q.g)return eh(a.m),a.F?F(q,jn(a,a.F,c),4):q.A(0);eh(a.m);H(q)})}function Zm(a){return a&&a.type==rc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
function gn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.cc())return l.return(e);f=null;if(b.ka){var m=b.ka,n=m.h;c instanceof xj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.bi=d),f=m.se):f=null}f||(f=Vm(c,b.stream,d||null,a.h.retryParameters,a.g.uc));g=0;b.Aa&&(g=b.Aa.h);b.Lb=f;return F(l,f.promise,2);case 2:h=l.h;b.Lb=null;k=h.data;if(!c.aesKey){l.A(3);break}return F(l,xm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function Vm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof zj?a:void 0,h=g?1:0;a=ym(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(bh,a,{type:h,stream:b,segment:g,isPreload:f})}
function Rm(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Oc=!1,b.og=!1,b.gf=0,b.Pc=!0,b.Ra=null,b.Aa=null,b.ka&&!a.s.has(b.stream)&&pm(b.ka),d?(e=a.g.Vc(),f=a.g.ia.getDuration(),F(g,a.g.ia.remove(b.type,e+d,f),3)):F(g,Vk(a.g.ia,b.type),4);if(3!=g.g)return eh(a.m),c?F(g,a.g.ia.flush(b.type),3):g.A(3);eh(a.m);b.Pc=!1;b.endOfStream=!1;b.$a||b.Cb||Jm(a,b,0);H(g)})}
function Jm(a,b,c){var d=b.type;if(d!=rc||a.i.has(d))b.Cb=(new xf(function(){var e;return Q(function(f){if(1==f.g)return ta(f,2),F(f,Wm(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function Bm(a){null!=a.Cb&&(a.Cb.stop(),a.Cb=null)}function Cm(a){return Q(function(b){return a.Lb?F(b,a.Lb.abort(),0):b.A(0)})}
function Xm(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.$a=!1,Bm(b),Jm(a,b,0),e.return()):F(e,Gg(a.P),2);eh(a.m);if(1===c.category&&1003!=c.code){if(b.Jc)return Lm(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
function Qm(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Date.now()/1E3;e=a.h.minTimeBetweenRecoveries;if(!b){if(!a.h.allowMediaSourceRecoveries||d-a.L<e)return l.return(!1);a.L=d}f=uc;if(g=a.i.get(f.ba))g.Tb=null,g.cd=null,g.bd=null,c&&Tm(a,g),Cm(g).catch(function(){}),g.Aa&&g.Aa.Mh();if(h=a.i.get(f.Ea))h.Tb=null,h.cd=null,h.bd=null,c&&Tm(a,h),Cm(h).catch(function(){}),h.Aa&&h.Aa.Mh();k=new Map;a.l.audio&&k.set(f.ba,a.l.audio);a.l.video&&k.set(f.Ea,
a.l.video);return F(l,nl(a.g.ia,k),2)}!h||h.Pc||h.$a||h.Cb||Jm(a,h,0);!g||g.Pc||g.$a||g.Cb||Jm(a,g,0);return l.return(!0)})}function ln(a,b){if(a.N.projection!=b.projection||a.N.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.N=b}}
function Um(a){if("keep"!==a.h.crossBoundaryStrategy){a.H.stop();var b=a.g.Vc(),c=a.i.get("video")||a.i.get("audio");c&&(c=c.Tb)&&null!==c.g&&(b=c.g-b,0>b||1<b||(a.G=c.g+.01,a.H.X(b)))}}
function an(a,b,c){if(b.type===rc)return!1;var d=b.Tb;if(!d)return!1;var e=c.ha;c=d.g!==e.g;"reset_to_encrypted"===a.h.crossBoundaryStrategy&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.h.crossBoundaryStrategy="keep"));"RESET_ON_ENCRYPTION_CHANGE"===a.h.crossBoundaryStrategy&&d.encrypted==e.encrypted&&(c=!1);if(c&&b.hd){var f=a.g.video,g=f.paused;Qm(a,!0).then(function(){var h=(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new U("boundarycrossed",h));g||
f.play()})}return c};function mn(){}
function nn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;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?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Dd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Dd(n)),m=nn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?($a("Invalid config, wrong type for "+m),
k=!1):"function"==typeof c[l]&&c[l].length!=b[l].length?(ab("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:($a("Invalid config, unrecognized key "+m),k=!1)}return k}function on(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function pn(a,b){return a&&b}
function qn(a,b){function c(f){for(var g=u(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&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]),0<Object.keys(l).length||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?td(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&&"object"===typeof f&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",mn);mn.getDifferenceFromConfigObjects=qn;mn.convertToConfigObject=on;mn.mergeConfigObjects=nn;S("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function rn(){}function sn(a){a=Zb(a);return(new qb(a)).Fb}function tn(a,b,c){function d(h){Ob(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Kb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new V(2,6,6015);var e;"string"==typeof b?e=ac(b,!0):e=b;a=Zb(a);a=ac(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function un(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Zb(a).split("skd://").pop();return tn(a,c,b)}
function vn(a,b){2===a&&(a=b.drmInfo)&&xg(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",rn);
rn.commonFairPlayResponse=function(a,b){if(2===a&&(a=b.originalRequest.drmInfo)&&xg(a.keySystem)){try{var c=Wb(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(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=Lb(hc(c)))}};rn.muxFairPlayRequest=function(a,b){vn(a,b)};
rn.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&xg(c.keySystem)&&vn(a,b)}};rn.conaxFairPlayRequest=function(a,b){vn(a,b)};rn.ezdrmFairPlayRequest=function(a,b){vn(a,b)};rn.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&xg(a.keySystem)&&(a=Kb(b.body),a=gc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=$b("spc="+a))};rn.muxInitDataTransform=function(a,b,c){return un(a,b,c)};
rn.expressplayInitDataTransform=function(a,b,c){return un(a,b,c)};rn.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Zb(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Nb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return tn(a,d,b)};rn.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Zb(a).split(";").pop();return tn(a,c,b)};
rn.verimatrixInitDataTransform=function(a,b,c){return un(a,b,c)};rn.initDataTransform=tn;rn.defaultGetContentId=sn;rn.isFairPlaySupported=function(){var a;return Q(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ta(b,2),F(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);xa(b);return b.return(!1)})};function wn(){this.g=null}wn.prototype.configure=function(a){this.g=a};wn.prototype.getConfiguration=function(){return this.g};
wn.prototype.create=function(a){var b;if(this.g.language){var c=xn(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=yn(b,this.g.role);a.length&&(b=a);this.g.videoLayout&&(a=zn(b,this.g.videoLayout),a.length&&(b=a));this.g.Gc&&(a=An(b,this.g.Gc),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=u(a),c=a.next();!c.done;c=a.next())if(c=Bn(b,c.value),c.length){b=
c;break}this.g.qd&&(a=Cn(b,this.g.qd),a.length&&(b=a));this.g.Qd&&(a=Dn(b,this.g.Qd),a.length&&(b=a));a=En(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.Sd].concat(x(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=u(a),c=a.next();!c.done;c=a.next())if(c=Fn(b,c.value),c.length){b=c;break}return new mi(b[0],b,!("smooth"==this.g.codecSwitchingStrategy&&dd()))};
function xn(a,b){b=yc(b);var c=Gc(b,a.map(function(d){return Fc(d)}));return c?a.filter(function(d){return c==Fc(d)}):[]}function yn(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Cn(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Dn(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
function Bn(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 An(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=Gn(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}
function zn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function En(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Fn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Hn(){}
function In(){var a=Infinity,b=Rb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Fg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=sn(h),h=tn(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",e=!1;dd()&&b.ld()&&(d="smooth",e=!0);e={retryParameters:Fg(),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,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:Jn,manifestPreprocessorTXml:Kn,sequenceMode:!1,multiTypeVariantsAllowed:e,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.kd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Jn,manifestPreprocessorTXml:Kn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};
var f={trackSelectionCallback:function(h){return Q(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return Q(function(l){if(1==l.g)return navigator.storage&&navigator.storage.estimate?F(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<.95*k.quota)})},progressCallback:function(h,k){return pn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Fg(),failureCallback:function(h){return pn([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:!1,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 pn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return pn([h,k])},dispatchAllEmsgBoxes:!1,
useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new mg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(wn,[null].concat(x(Ja.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:20,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",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},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:30,repeatMode:0}};f.trackSelectionCallback=function(h){return Q(function(k){return k.return(Ln(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.ab(g)}
function Mn(){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 Nn(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 nn(a,b,c||In(),d,"")}
function Ln(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=Gn(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Gc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return yc(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});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=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=rc&&"image"!=c.type||b.push(c);return b}function Jn(a){return pn([a],a)}function Kn(a){return pn([a],a)}S("shaka.util.PlayerConfiguration",Hn);Hn.mergeConfigObjects=Nn;Hn.createDefaultForLL=Mn;Hn.createDefault=In;function On(){this.g=null;this.h=[]}function Pn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(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 Qn(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(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 Rn(){this.i=this.h=null;this.g=[]}function Sn(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 Tn(){this.C=this.U=NaN;this.l="";this.j=this.aj=this.u=this.B=this.J=this.D=this.s=this.m=this.I=this.F=this.i=this.P=this.R=this.L=this.N=this.O=NaN;this.K=0;this.G=this.H=NaN;this.g=new On;this.h=new Rn}function Un(a,b,c){a.O=b;a.N=c}function Vn(a,b,c){a.U=b;a.C=c}function Wn(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Xn(a,b){a.j=isNaN(a.j)?b:a.j+b}
function Yn(a){var b=a.U,c=a.C,d=a.l,e=a.B,f=a.N,g=a.O,h=a.L,k=a.R,l=a.P,m=a.u,n=a.i,q=a.F,r=a.I,t=a.m,w=Pn(a.g,"playing"),v=Pn(a.g,"paused"),y=Pn(a.g,"buffering"),z=a.s,A=a.D,B=a.J,D=a.aj,G=a.j,C=a.K,E=a.H,I=a.G,K=Qn(a.g),J=[];a=u(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,J.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:t,playTime:w,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:A,maxSegmentDuration:B,manifestSizeBytes:D,bytesDownloaded:G,nonFatalErrorCount:C,manifestPeriodCount:E,manifestGapCount:I,stateHistory:K,switchHistory:J}};function Zn(a,b,c,d){jb.call(this);this.N=a;this.U=b;this.Ka=d.networkingEngine;this.m=c;this.B=null;this.Ha=0;this.Za=d.sd;this.F=d.El;this.eb=d.Fl;this.g=d.config;this.l=this.G=this.h=null;this.oa=!1;this.H=d.Ql;this.ra=!1;this.i=null;this.ea=!1;this.j=this.D=null;this.Z=!1;this.L=new Map;this.sa=!1;this.Ma=d.Pl;this.Y=new Tn;this.na=new Hg;this.u=new Hg;this.O=null;this.s=!1;this.$=d.dk;this.R=this.J=null;this.Ta=d.ck;this.P=!1;this.K=[];this.I=[];this.C=!0}pa(Zn,jb);
function $n(a,b,c){(a=b?a.I:a.K)?a.push(c):c()}function ao(a){if(a.I)for(var b=u(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function bo(a,b){a.O=b;a.P=!0;if(a.K){b=u(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=Zn.prototype;p.getStartTime=function(){return this.m};p.xd=function(){return this.N};p.hh=function(){return this.h};function co(a){a.Z=!0;return a.j}function eo(a){a.ra=!0;return a.H}p.getStats=function(){return this.Y};
function fo(a){a.ea=!0;return a.i}p.Tk=function(){return this.J?Zf(this.J):null};p.Sk=function(){return this.R?$f(this.R):null};function go(a){a.sa=!0;return a.L}
p.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ta(c,3),F(c,ho(a),5);case 5:io(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return F(c,jo(a),7);case 7:io(a);case 6:return F(c,ko(a),8);case 8:io(a);if(!a.$||!a.i){c.A(9);break}return F(c,ei(a.i),10);case 10:io(a);case 9:a.u.resolve();wa(c,0);break;case 3:b=xa(c),b instanceof V&&(7001==b.code||7003==b.code)||a.u.reject(b),H(c)}})})()};
p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):jb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.u.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function io(a){if(a.s)throw new V(2,7,7003);}function lo(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
function ho(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:lo(a,"manifest-parser");a.l||(a.G=Gi(a.N,a.U),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.C}));b=Date.now()/1E3;lo(a,"manifest");if(a.h){m.A(2);break}return F(m,a.l.start(a.N,a.eb),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.A(2);break}c=[];d=a.h.variants[0];e=u([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0<c.length)){m.A(2);break}return F(m,
Promise.all(c),2);case 2:return a.na.resolve(),h=new U("manifestparsed",void 0),F(m,Promise.resolve(),7);case 7:a.dispatchEvent(h);if(0==a.h.variants.length)throw new V(2,4,4036);mo(a.h);k=Date.now()/1E3;l=k-b;a.Y.I=l;H(m)}})}
function jo(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:if(!a.h||a.i)return k.return();lo(a,"drm-engine");a.Ha=Date.now()/1E3;a.i=a.Za();a.F.h=a.i;a.i.configure(a.g.drm,function(){return a.C});c=wi(a.F,a.h);if(!c){k.A(2);break}d=new U("trackschanged",void 0);return F(k,Promise.resolve(),3);case 3:io(a),a.dispatchEvent(d);case 2:return e=hg(a.h.variants),f=!0,a.h&&a.h.presentationTimeline&&"HLS"!=a.h.type&&(f=a.h.presentationTimeline.T()),F(k,Eh(a.i,e,a.h.offlineSessionIds,f),4);case 4:io(a);
if(!b){k.A(5);break}return F(k,a.i.$b(b),6);case 6:io(a);case 5:return F(k,ui(a.F,a.h),7);case 7:g=k.h;if(!g){k.A(0);break}h=new U("trackschanged",void 0);return F(k,Promise.resolve(),9);case 9:a.dispatchEvent(h),H(k)}})}p.configure=function(a,b){a=on(a,b);Nn(this.g,a)};p.getConfiguration=function(){return Dd(this.g)};
function ko(a){var b,c,d,e,f,g,h;return Q(function(k){a.B||(a.B=a.g.adaptationSetCriteriaFactory(),a.B.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredVariantRole,channelCount:a.g.preferredAudioChannelCount,Gc:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,qd:a.g.preferredAudioLabel,Qd:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Sd:"",We:0,preferredAudioCodecs:a.g.preferredAudioCodecs,
preferredAudioChannelCount:a.g.preferredAudioChannelCount}));a.Ta&&(b=a.g.abrFactory,a.D=b,a.j=b(),a.j.configure(a.g.abr));if(!a.$)return k.A(0);c=a.h.presentationTimeline.T();d=hg(a.h.variants);e=a.B.create(d);a.j.configure(a.g.abr);a.j.setVariants(Array.from(e.values()));f=a.j.chooseVariant();if(!f)return k.A(0);g=[];a.J=f;f.video&&g.push(no(a,f.video,c));f.audio&&g.push(no(a,f.audio,c));(h=ig(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&lg(f.audio,
h,a.g)&&(g.push(no(a,h,c)),a.R=h);return F(k,Promise.all(g),0)})}
function no(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new gm(d,b,function(l,m,n){return Vm(l,m,n||null,a.g.streaming.retryParameters,a.Ka,a.C)},!1),a.L.set(b.id,e),b.segmentIndex?k.A(2):F(k,b.createSegmentIndex(),2);f="number"===typeof a.m?a.m:0;g=b.segmentIndex.ac(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=bg(b.segmentIndex));return h?c?h.ha?F(k,jm(e,h.ha),0):k.A(0):F(k,im(e,h.startTime),0):k.A(0)})}p.sm=function(){return this.u};
p.destroy=function(){var a=this,b,c,d;return Q(function(e){switch(e.g){case 1:a.s=!0;if(!a.l||a.oa){e.A(2);break}return F(e,a.l.stop(),2);case 2:if(!a.j||a.Z){e.A(4);break}return F(e,a.j.stop(),4);case 4:a.H&&!a.ra&&a.H.release();if(!a.i||a.ea){e.A(6);break}return F(e,a.i.destroy(),6);case 6:if(0<a.L.size&&!a.sa)for(b=u(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,pm(d);H(e)}})};
function mo(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",Zn);Zn.prototype.destroy=Zn.prototype.destroy;Zn.prototype.waitForFinish=Zn.prototype.sm;Zn.prototype.getPrefetchedTextTrack=Zn.prototype.Sk;Zn.prototype.getPrefetchedVariantTrack=Zn.prototype.Tk;function oo(a,b){jb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{pd:null,od:po,Yc:function(d,e){return qo(c,"enter",d,e)}},{pd:ro,od:po,Yc:function(d,e){return qo(c,"enter",d,e)}},{pd:so,od:po,Yc:function(d,e){return qo(c,"enter",d,e)}},{pd:po,od:ro,Yc:function(d,e){return qo(c,"exit",d,e)}},{pd:po,od:so,Yc:function(d,e){return qo(c,"exit",d,e)}},{pd:ro,od:so,Yc:function(d,e){e?qo(c,"skip",d,e):(qo(c,"enter",d,e),qo(c,"exit",d,e))}},{pd:so,od:ro,Yc:function(d,e){return qo(c,"skip",
d,e)}}];this.h=new Oc;this.h.o(this.i,"regionremove",function(d){c.g.delete(d.region)})}pa(oo,jb);oo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jb.prototype.release.call(this)};
oo.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(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?ro:a>d.endTime?so:po;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.pd==e&&h.od==f&&h.Yc(d,b)}}};function qo(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ro=1,po=2,so=3;function to(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new qb(a)).ub.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=uo.get(d))return m.return(e);f=0;g=Wg([a],c);ta(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.A(3);break}g.method="GET";return F(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():"")}})}
var uo=(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 vo={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"},wo=u(Object.keys(vo)),xo=wo.next();!xo.done;xo=wo.next()){var yo=xo.value;vo[yo.toLowerCase()]=vo[yo]};function zo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return zo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Le,e=a.fontStyle==Me,f=a.textDecoration.includes(Ne);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Ao(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ao(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
function Ao(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("#")&&7<a.length&&(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 Bo(a,b){var c=[];a=u(Co(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Bo(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=zo(d,b);c.push(e)}return c}
function Co(a){var b=[];a=u(a);for(var c=a.next(),d={};!c.done;d={Ig:void 0},c=a.next())d.Ig=c.value,b.some(function(e){return function(f){return Ae(e.Ig,f)}}(d))||b.push(d.Ig);return b}
function Do(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^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){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c}
function Eo(a,b){var c=Bo(b),d=[];b=a.cues?Array.from(a.cues):[];c=u(c);for(var e=c.next(),f={};!e.done;f={yd:void 0},e=c.next())f.yd=e.value,!b.some(function(g){return function(h){return h.startTime==g.yd.startTime&&h.endTime==g.yd.endTime&&h.text==g.yd.payload?!0:!1}}(f))&&f.yd.payload&&(e=Do(f.yd))&&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=u(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function Fo(a,b){var c=!1;"disabled"===a.mode&&(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 Go(a){var b=this;this.h=a;this.l=new Oc;this.j=null;this.i=new Map;this.g=-1;this.u=!1;this.s=null;this.C=function(){b.l.Ca(b.h,"textchanged",b.m);b.l.Ca(b.j.textTracks,"change",b.B);for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.i.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.h.qc();d=u(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.i.has(e.id)){var f=b.i.get(e.id);e.active||"disabled"===f.track.mode||(f.track.mode="disabled");b.i.delete(e.id)}else{f=
b.j.ownerDocument.createElement("track");f.kind=Ho(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in vo)h=vo[e.language];else{var k=Dc(e.language);k in vo&&(h=vo[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in vo&&(f.srclang=e.language);"CHROMIUM"===Rb().Na()&&(f.src="data:,WEBVTT");f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=u(b.i.values());for(e=
d.next();!e.done;e=d.next())e.value.remove();-1<b.g&&(c.has(b.g)?(d=c.get(b.g).track,"disabled"===d.mode&&(d.mode=b.u?"showing":"hidden")):b.g=-1);b.i=c};this.B=function(){if(!b.s){var c=b.j;b.s=(new yf(function(){b.s=null;if(b.j===c){var d=-1,e=!1;if(-1<b.g){var f=b.i.get(b.g);"showing"===f.track.mode?(d=b.g,e=!0):"hidden"===f.track.mode&&(d=b.g)}if(!e)for(e=u(b.i),f=e.next();!f.done;f=e.next()){var g=u(f.value);f=g.next().value;g=g.next().value;if("showing"===g.track.mode){d=f;break}else 0>d&&"hidden"===
g.track.mode&&(d=f)}e=u(b.i);for(f=e.next();!f.done;f=e.next())g=u(f.value),f=g.next().value,g=g.next().value,f!==d&&"disabled"!==g.track.mode&&(g.track.mode="disabled");b.g!==d&&(b.g=d,-1<d&&b.h.Zf({id:d}));b.h.ze(-1<d&&"showing"===b.i.get(d).track.mode)}})).X(0)}};this.l.o(a,"loaded",function(){return b.enableTextDisplayer()})}p=Go.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.j||0>this.g)return!1;Fo(this.i.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){!this.j||0>this.g||Eo(this.i.get(this.g).track,a)};p.destroy=function(){this.h&&(this.j&&this.C(),this.h=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.u};
p.setTextVisibility=function(a){this.u=a;if(-1<this.g){var b=this.i.get(this.g).track;"disabled"!==b.mode&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.h&&3===this.h.m)if(b=Array.from(this.h.h.textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=u(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"showing"===c.mode){a=null;break}else a||"hidden"!==c.mode||(a=c);a&&(a.mode="showing")}else for(a=u(b),b=a.next();!b.done;b=a.next())b=
b.value,"showing"===b.mode&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.h&&2===this.h.m&&(this.j=this.h.h,this.l.qa(this.h,"unloading",this.C),this.l.o(this.h,"textchanged",this.m),this.l.o(this.j.textTracks,"change",this.B),this.m())};
function Ho(a){var b=Rb();return a.forced&&"WEBKIT"===b.Na()?"forced":"caption"===a.kind||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",Go);Go.prototype.enableTextDisplayer=Go.prototype.enableTextDisplayer;Go.prototype.setTextLanguage=Go.prototype.setTextLanguage;Go.prototype.setTextVisibility=Go.prototype.setTextVisibility;
Go.prototype.isTextVisible=Go.prototype.isTextVisible;Go.prototype.destroy=Go.prototype.destroy;Go.prototype.append=Go.prototype.append;Go.prototype.remove=Go.prototype.remove;Go.prototype.configure=Go.prototype.configure;function Io(a,b){Uc("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=u(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,"metadata"!==b.kind&&"chapters"!==b.kind&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=Io.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;Fo(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&Eo(this.g,a)};p.destroy=function(){this.g&&(Fo(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};p.setTextVisibility=function(a){a&&!this.g&&Jo(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Jo(this)};function Jo(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
S("shaka.text.SimpleTextDisplayer",Io);Io.prototype.enableTextDisplayer=Io.prototype.enableTextDisplayer;Io.prototype.setTextLanguage=Io.prototype.setTextLanguage;Io.prototype.setTextVisibility=Io.prototype.setTextVisibility;Io.prototype.isTextVisible=Io.prototype.isTextVisible;Io.prototype.destroy=Io.prototype.destroy;Io.prototype.append=Io.prototype.append;Io.prototype.remove=Io.prototype.remove;Io.prototype.configure=Io.prototype.configure;function Ko(){}p=Ko.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",Ko);Ko.prototype.enableTextDisplayer=Ko.prototype.enableTextDisplayer;Ko.prototype.setTextLanguage=Ko.prototype.setTextLanguage;Ko.prototype.setTextVisibility=Ko.prototype.setTextVisibility;
Ko.prototype.isTextVisible=Ko.prototype.isTextVisible;Ko.prototype.destroy=Ko.prototype.destroy;Ko.prototype.append=Ko.prototype.append;Ko.prototype.remove=Ko.prototype.remove;Ko.prototype.configure=Ko.prototype.configure;function Lo(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.s=b;this.C=this.u=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.B=new yf(function(){c.j.paused||Mo(c)});No(this);this.l=new Map;this.i=new Oc;this.i.o(document,"fullscreenchange",function(){Mo(c,!0)});this.i.o(this.j,"seeking",function(){Mo(c,!0)});
this.i.o(this.j,"ratechange",function(){No(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.u=e/d:c.u=null});this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){Mo(c,!0)}),this.D.observe(this.g));this.F=new Map}p=Lo.prototype;p.configure=function(a){this.C=a;No(this);Mo(this,!0)};
p.append=function(a){var b=[].concat(x(this.h));a=u(Co(a));for(var c=a.next(),d={};!c.done;d={Jg:void 0},c=a.next())d.Jg=c.value,b.some(function(e){return function(f){return Ae(f,e.Jg)}}(d))||this.h.push(d.Jg);this.h.length&&No(this);Mo(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=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});Mo(this,c>this.h.length);this.h.length||No(this);return!0};
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.s.appendChild(this.g),Mo(this,!0)):this.g.parentElement&&this.s.removeChild(this.g)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function No(a){a.B&&(a.h.length?a.B.ya((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.B.stop())}
function Oo(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
function Po(a,b,c,d,e){var f=!1,g=[],h=[];b=u(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.Yj:null;l&&(g.push(l.Kg),l.gd&&g.push(l.gd),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Oo(a,n)||(f=!0):(Qo(a,k,e),l=a.l.get(k),n=l.Yj,f=!0));0<k.nestedCues.length&&n&&Po(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(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=u(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.gd?(d.gd.contains(c)&&d.gd.removeChild(c),c.appendChild(d.gd),d.gd.appendChild(d.Kg)):c.appendChild(d.Kg)}}function Mo(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.F.values());for(var d=b.next();!d.done;d=b.next())Oj(d.value);Oj(a.g);a.l.clear();a.F.clear()}a.m&&Po(a,a.h,a.g,c,[])}}
function Qo(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=W(e);"br"!=e&&Ro(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.u===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==pd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==pd?"%":"px");if(a.F.has(c))c=a.F.get(c);else{e=W("span");var k=g.heightUnits==pd?"%":"px",l=g.widthUnits==pd?"%":"px",m=g.viewportAnchorUnits==
pd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.u===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);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(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="before"==b.displayAlign?"flex-start":
"center"==b.displayAlign?"center":"flex-end";a.F.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,{Kg:f,Yj:e,gd:c})}function So(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==oe?c:"left"===a||"start"===a&&b===qe||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===qe?"line-right":"center"}
function Ro(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=To(c.linePadding,c,a.s);f.paddingRight=To(c.linePadding,c,a.s);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=Uo(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("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
f.fontSize=To(c.fontSize,c,a.s,a.C?a.C.fontScaleFactor:1);d=c.line;null!=d&&(g=c.lineInterpretation,g==te&&(g=1,h=16,a.u&&1>a.u&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==se?(f.width="100%",c.lineAlign==ue?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ue?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==ue?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));
f.lineHeight=c.lineHeight;a=So(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==se?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");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==se?f.width=c.size+"%":f.height=c.size+"%")}
function To(a,b,c,d){d=void 0===d?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 Uo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",Lo);Lo.prototype.enableTextDisplayer=Lo.prototype.enableTextDisplayer;
Lo.prototype.setTextLanguage=Lo.prototype.setTextLanguage;Lo.prototype.setTextVisibility=Lo.prototype.setTextVisibility;Lo.prototype.isTextVisible=Lo.prototype.isTextVisible;Lo.prototype.remove=Lo.prototype.remove;Lo.prototype.destroy=Lo.prototype.destroy;Lo.prototype.append=Lo.prototype.append;Lo.prototype.configure=Lo.prototype.configure;function Vo(a,b){function c(f){for(var g=f,h=u(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(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Bo(a);a="WEBVTT\n\n";d=u(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 pe: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 Wo(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.F=!0;this.l=this.C=!1;this.s=this.m=void 0;this.B=0;this.G=!1;this.D=new Oc;this.j=null}Wo.prototype.setMediaElement=function(a){this.j=a;Xo(this)};Wo.prototype.configure=function(a){this.g=a};function Yo(a){a.u=!1;a.F=!0;a.C=!1;a.l=!1;a.m=0;a.s=0;a.B=0;a.G=!1;a.j=null;a.D.Sa()}function Zo(a,b){a.l=b;a.l?a.i==$o?a.i=ap:a.i==bp&&(a.i=cp):a.i==ap?a.i=$o:a.i==cp&&(a.i=bp)}
function dp(a,b){if(a.g&&a.g.enabled&&a.g.version==ep&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.B=b}).catch(function(){a.B=0})}}
function fp(a,b,c){try{if(!a.g.enabled)return b;var d=gp(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=hp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=ip;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=jp;break a}e=void 0}d.ot=e;d.su=
!0;var f=kp(d);return lp(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Xo(a){a.D.qa(a.j,"play",function(){a.m||(a.m=Date.now())});a.D.qa(a.j,"playing",function(){a.s||(a.s=Date.now())})}function gp(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
function mp(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled)if(a=np(a,c),d)d=op(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var e=kp(a);e&&(b.uris=b.uris.map(function(f){return lp(f,e)}))}}function pp(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
function qp(a){if(0===a.type)return rp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?ip:sp;if("audio"==b)return hp;if("text"==b)return"application/mp4"===a.mimeType?tp:up}}function vp(a,b){b=a.h.Pb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
function wp(a,b){b=a.h.Pb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function xp(a,b){var c=a.h.kb();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case sp:return a.videoBandwidth||NaN;case hp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function np(a,b){b=void 0===b?{}:b;Object.assign(b,gp(a));b.pr=a.h.Ya();var c=b.ot===sp||b.ot===ip;a.C&&c&&(b.bs=!0,b.su=!0,a.C=!1);null==b.su&&(b.su=a.F);b.v===ep&&(a.h.T()&&(b.ltc=a.h.pf()),c=!a.G&&a.s&&a.m?a.s-(a.B||a.m):void 0,void 0!=c&&(b.msd=c,a.G=!0));return pp(a,b)}
function kp(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function op(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=kp(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function lp(a,b){if(!b||a.includes("offline:"))return a;a=new qb(a);a.g.set("CMCD",b);return a.toString()}var jp="m",hp="a",sp="v",ip="av",rp="i",up="c",tp="tt",ep=2,$o="d",ap="ld",bp="h",cp="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:$o,Tm:ap,HLS:bp,Um:cp,ln:"s",OTHER:"o"});function yp(a){this.h=a;this.g=null}p=yp.prototype;p.configure=function(a){this.h=a};p.Pi=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(zp)?1E3*this.g.get(zp):null};p.Oi=function(){return this.h.enabled&&this.g&&this.g.has(Ap)?1E3*this.g.get(Ap):null};p.Vk=function(){return this.h.enabled&&this.g&&this.g.has(Bp)?this.g.get(Bp):null};p.Wk=function(){return this.h.enabled&&this.g&&this.g.has(Qp)?this.g.get(Qp):null};
p.getBandwidthEstimate=function(a){var b=this.Oi();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Rp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",yp);yp.prototype.getBandwidthEstimate=yp.prototype.getBandwidthEstimate;yp.prototype.getRoundTripTime=yp.prototype.Wk;yp.prototype.getResponseDelay=yp.prototype.Vk;yp.prototype.getEstimatedThroughput=yp.prototype.Oi;
yp.prototype.getMaxBitrate=yp.prototype.Pi;var Ap="etp",zp="mb",Bp="rd",Qp="rtt";function Sp(){this.g=null;this.h=[]}function Tp(a,b){return Q(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;H(c)})}Sp.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b,c){b=void 0===b?null:b;jb.call(this);var d=this;this.m=Up;this.h=null;this.Me=b;this.na=!1;this.Re=new Oc;this.Ge=new Oc;this.j=new Oc;this.dc=new Oc;this.Hd=new Oc;this.F=this.I=this.D=this.H=null;this.Ue=0;this.Z=new Sp;this.L=this.tc=this.U=this.i=this.vc=this.G=this.l=this.De=this.P=this.si=this.ea=this.K=this.Ta=this.sa=this.Ee=this.O=this.Ha=this.J=this.eb=null;this.Y=!1;this.Ma=this.u=null;this.Le=1E9;this.Qe=[];this.Za=[];this.sg=-1;this.g=Vp(this);this.vg=Mn();this.R=null;
this.Ve=-1;this.Kb=null;this.oa={width:Infinity,height:Infinity};this.Ke=new ti(this.g,this.oa,null);this.Oe=[];this.B=null;this.N=this.g.adaptationSetCriteriaFactory();this.N.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Gc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,qd:this.g.preferredAudioLabel,Qd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,
audioCodec:"",Sd:"",We:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Id=this.g.preferredTextLanguage;this.Je=this.g.preferredTextRole;this.Ie=this.g.preferForcedSubs;this.He=[];c&&c(this);this.K=Wp(this);this.ea=new yp(this.g.cmsd);this.H=Xp(this);this.Kd=this.$=this.ra=this.C=null;this.xg=!1;this.ug=[];this.wg=new yf(function(){return Q(function(e){if(1==e.g)return d.$?F(e,d.$b(d.Kd,!0),3):e.A(0);if(4!=e.g)return F(e,d.load(d.$),
4);d.xg?d.Kd.pause():d.Kd.play();d.$=null;d.xg=!1;H(e)})});Yp&&(this.C=Yp(),this.C.configure(this.g.ads),this.Hd.o(this.C,"ad-content-pause-requested",function(e){var f;return Q(function(g){if(1==g.g){d.wg.stop();if(d.$)return g.A(0);d.Kd=d.h;d.xg=d.isEnded();f=e.saveLivePosition||!1;return F(g,d.Ji(!0,f),3)}d.$=g.h;H(g)})}),this.Hd.o(this.C,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.$){var f=d.$;f.m&&e&&("number"===typeof f.m?f.m+=e:f.m.setTime(f.m.getTime()+1E3*e))}d.wg.X(.1)}),
this.Hd.o(this.C,"ad-content-attach-requested",function(){return Q(function(e){return d.h||!d.Kd?e.A(0):F(e,d.$b(d.Kd,!0),0)})}));Zp&&(this.ra=Zp(this),this.ra.configure(this.g.queue));this.Re.o(window,"online",function(){$p(d);d.Nh()});this.Ne=new yf(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=u(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.Ne.stop();f&&aq(d,!1,void 0,!1,!1)});
this.Ka=null;a&&(Uc("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.$b(a,!0));this.s=null}pa(X,jb);function bq(a){null!=a.P&&($c(a.P),a.P.release(),a.P=null)}function cq(a,b,c){c||b.lcevc.enabled?(bq(a),null==a.P&&(a.P=new Yc(a.h,a.si,b.lcevc,c),a.I&&(a.I.L=a.P))):bq(a)}function dq(a,b){return new U(a,b)}p=X.prototype;
p.destroy=function(){var a=this,b;return Q(function(c){switch(c.g){case 1:if(a.m==eq)return c.return();bq(a);b=a.detach();a.m=eq;return F(c,b,2);case 2:return F(c,a.Ng(),3);case 3:a.Re&&(a.Re.release(),a.Re=null);a.Ge&&(a.Ge.release(),a.Ge=null);a.j&&(a.j.release(),a.j=null);a.dc&&(a.dc.release(),a.dc=null);a.Hd&&(a.Hd.release(),a.Hd=null);a.Ma=null;a.g=null;a.B=null;a.Me=null;a.K=null;a.ea=null;if(!a.H){c.A(4);break}return F(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.u&&(a.u.release(),a.u=null),
a.ra&&(a.ra.destroy(),a.ra=null),jb.prototype.release.call(a),H(c)}})};function fq(a,b){gq.set(a,b)}function hq(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;Rb();return Ei()?!0:""!=Fi().canPlayType("application/x-mpegurl")}function iq(a,b){a.dispatchEvent(dq("onstatechange",(new Map).set("state",b)))}
p.$b=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return Q(function(g){switch(g.g){case 1:if(c.m==eq)throw new V(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return F(g,c.detach(),2);case 2:return F(g,jq(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(iq(c,"attach"),e=function(){var h=kq(c,!1);h&&lq(c,h)},c.Ge.o(a,"error",e),c.h=a,c.K&&c.K.setMediaElement(a));Rb();if(!b||!Ei()||c.I){g.A(6);break}return F(g,mq(c),6);case 6:ya(g);c.Z.release();Ba(g,0);break;case 5:return f=
xa(g),F(g,c.detach(),10);case 10:throw f;}})};p.wi=function(a){this.si=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return Q(function(c){if(1==c.g){if(b.m==eq)throw new V(2,7,7E3);return F(c,b.kc(!1,a),2)}if(3!=c.g)return F(c,jq(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Ge.Sa(),b.h=null),iq(b,"detach"),b.C&&!a&&b.C.release()}finally{b.Z.release()}H(c)})};
function jq(a,b){var c;return Q(function(d){return 1==d.g?(c=++a.Ue,F(d,Tp(a.Z,b),2)):c!=a.Ue?(a.Z.release(),d.return(!0)):d.return(!1)})}
p.kc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,t,w;return Q(function(v){switch(v.g){case 1:return c.m!=eq&&(c.m=Up),F(v,jq(c,"unload"),2);case 2:if(v.h)return v.return();ua(v,3);c.Y=!1;iq(c,"unload");bq(c);d=c.He.map(function(y){return y()});c.He=[];return F(v,Promise.all(d),5);case 5:c.dispatchEvent(dq("unloading"));c.Ee&&(c.Ee.release(),c.Ee=null);c.sa&&(c.sa.release(),c.sa=null);c.Ta&&(c.Ta.release(),c.Ta=null);c.h&&(c.j.Sa(),c.dc.Sa());c.Ne.stop();c.eb&&
(c.eb.release(),c.eb=null);c.Ha&&(c.Ha.stop(),c.Ha=null);if(!c.G){v.A(6);break}return F(v,c.G.stop(),7);case 7:c.G=null,c.vc=null;case 6:if(!c.u){v.A(8);break}return F(v,c.u.stop(),8);case 8:if(!c.l){v.A(10);break}return F(v,c.l.destroy(),11);case 11:c.l=null;case 10:c.J&&(c.J.release(),c.J=null);c.F&&(c.F.release(),c.F=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.D){v.A(12);break}return F(v,c.D.destroy(),13);case 13:c.D=null;case 12:if(!c.I){v.A(14);break}return F(v,c.I.destroy(),15);case 15:c.I=
null;case 14:if(c.C&&!b)c.C.onAssetUnload();c.$&&!b&&(c.$.destroy(),c.$=null);b||c.wg.stop();c.K&&Yo(c.K);c.ea&&(c.ea.g=null);if(!c.s){v.A(16);break}return F(v,c.s.destroy(),17);case 17:c.s=null;case 16:if(c.h){e=u(c.ug);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.ug=[];Mj(c.h)&&c.h.load()}if(!c.D){v.A(18);break}return F(v,c.D.destroy(),19);case 19:c.D=null;case 18:c.Ka&&c.U!=c.Ka.xd()&&(c.Ka.s||c.Ka.destroy(),c.Ka=null);c.U=null;
c.tc=null;c.O=null;if(c.i){h=u(c.i.variants);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=u([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=u(c.i.textStreams);for(t=r.next();!t.done;t=r.next())w=t.value,w.segmentIndex&&w.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Rf.clear(),zg.clear());c.i=null;c.B=new Tn;c.Se=null;c.Kb=null;c.R=null;c.Ve=-1;c.Qe=[];c.Za=[];c.sg=-1;c.H&&c.H.Ei();nq(c);case 3:ya(v);c.Z.release();Ba(v,
4);break;case 4:Rb();if(a&&Ei()&&!c.I&&c.h)return F(v,mq(c),0);v.A(0)}})};p.rm=function(a){this.L=a};
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v,y;return Q(function(z){switch(z.g){case 1:if(d.m==eq)throw new V(2,7,7E3);e=null;f="";if(a instanceof Zn){if(a.s)throw new V(2,7,7006);e=a;f=e.xd()||""}else f=a||"";return F(z,Tp(d.Z,"load"),2);case 2:d.Z.release();if(!d.h)throw new V(2,7,7002);if(!d.U){z.A(3);break}d.U=f;return F(z,d.kc(!1),3);case 3:g=++d.Ue;h=function(){return Q(function(A){if(1==A.g)return d.Ue==g?A.A(0):e?F(A,e.destroy(),3):A.A(3);throw new V(2,7,
7E3);})};k=function(A,B){return Q(function(D){switch(D.g){case 1:return ua(D,2),F(D,Tp(d.Z,B),4);case 4:return F(D,h(),5);case 5:return F(D,A(),6);case 6:return F(D,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:ya(D),d.Z.release(),Ba(D,0)}})};ta(z,5,6);null==b&&e&&(b=e.getStartTime());d.L=b;d.Y=!1;d.dispatchEvent(dq("loading"));if(e){c=e.U;z.A(8);break}if(c){z.A(8);break}return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,oq(d,f),2);c=A.h;H(A)})},"guessMimeType_"),8);case 8:l=!!e;if(e){bo(e,
d);d.B=e.getStats();z.A(11);break}return F(z,pq(d,f,b,c,!0,d.g),12);case 12:(e=z.h)?(e.C=!1,bo(e,d),d.B=e.getStats(),e.start(),e.u.catch(function(){})):d.B=new Tn;case 11:m=!e;n=Date.now()/1E3;d.B=e?e.getStats():new Tn;d.U=f;d.tc=c||null;nq(d);q=function(){var A=d.Pb(),B={start:0,end:0};if(A.total.length){B.start=Infinity;A=u(A.total);for(var D=A.next();!D.done;D=A.next())D=D.value,D.start<B.start&&(B.start=D.start),D.end>B.end&&(B.end=D.end)}return B};d.sa=new dm(q);d.sa.addEventListener("regionadd",
function(A){qq(d,A.region,"metadataadded")});if(m)return F(z,k(function(){return Q(function(A){return F(A,rq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.Ta=new dm(q);return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,Promise.race([e.na,e.u]),2);d.vc=e.G;var B=e;B.oa=!0;d.G=B.l;d.i=e.hh();H(A)})},"waitForFinish"),15);case 15:if(d.I){z.A(16);break}return F(z,k(function(){return Q(function(A){return F(A,mq(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&
(d.s.enableTextDisplayer?d.s.enableTextDisplayer():Uc("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(z,k(function(){return Q(function(A){return F(A,e.u,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Ke=e.F;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.Ee=eo(e);d.De=e.Ma;if(r=e.B)d.N=r;l&&d.h&&"AUDIO"===d.h.nodeName&&(sq(d),d.configure("manifest.disableVideo",!0));if(e.i){z.A(19);break}return F(z,k(function(){return Q(function(A){return F(A,
jo(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.D=fo(e),F(z,k(function(){return Q(function(A){return F(A,d.D.$b(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(t=e.D)||d.Ma&&d.Ma==t||(d.u=co(e),d.Ma=e.D,"function"!=typeof d.u.setMediaElement&&(Uc("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.u.setMediaElement=function(){}),"function"!=typeof d.u.setCmsdManager&&(Uc("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),
d.u.setCmsdManager=function(){}),"function"!=typeof d.u.trySuggestStreams&&(Uc("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.u.trySuggestStreams=function(){})),w=go(e),v=e.J,F(z,k(function(){return Q(function(A){return F(A,tq(d,n,v,w),0)})},"loadInner_"),22);case 22:ao(e);d.tc&&Rb().dg()&&lf(d.tc)&&zk(d.I,d.U,d.tc);z.A(14);break;case 23:return F(z,k(function(){return Q(function(A){return F(A,uq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(dq("loaded"));
case 6:ya(z);if(!e){z.A(25);break}return F(z,e.destroy(),25);case 25:d.Ka=null;Ba(z,0);break;case 5:y=xa(z);if(!y||7E3==y.code){z.A(27);break}return F(z,d.kc(!1),27);case 27:throw y;}})};function sq(a){for(var b=u(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.nm=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,vq(c),2):3!=e.g?(d=e.h,F(e,c.kc(a,b),3)):e.return(d)})};p.Ji=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,vq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})};
function vq(a,b){b=void 0===b?!1:b;var c,d;return Q(function(e){if(1==e.g){c=null;if(!(a.i&&a.G&&a.vc&&a.U&&a.g))return e.A(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return F(e,wq(a,a.U,d,a.tc,a.g,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.Oe.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.vc;f.h=a.i;f.l=g;f.G=h;f=c;g=a.Ma;f.j=a.u;f.D=g;c.B=a.N;c.start();a.i=null;a.G=null;a.vc=null;a.u=null;a.Ma=null}return e.return(c)})}
p.preload=function(a,b,c,d){b=void 0===b?null:b;var e=this,f,g;return Q(function(h){if(1==h.g)return f=Vp(e),Nn(f,d||e.g,Vp(e)),F(h,pq(e,a,b,c,!1,f),2);(g=h.h)?g.start():lq(e,new V(2,7,7005));return h.return(g)})};p.Ng=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=u(a.Oe);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.Oe=[];return F(f,Promise.all(b),0)})};
function pq(a,b,c,d,e,f){e=void 0===e?!1:e;var g,h,k,l,m;return Q(function(n){if(1==n.g)return d?n.A(2):F(n,oq(a,b),3);2!=n.g&&(d=n.h);if(g=xq(a,d))return n.return(null);h=f||a.g;k=!1;l=!0;e&&(a.u&&a.Ma==h.abrFactory&&(l=!1),a.h&&"AUDIO"===a.h.nodeName&&(k=!0));m=wq(a,b,c,d||null,h,!e,k,l);m=e?m.then(function(q){q.C=!1;return q}):m.then(function(q){a.Oe.push(q);return q});return n.return(m)})}
function wq(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,r,t,w,v,y,z,A,B,D,G;return Q(function(C){if(1==C.g){k=null;l=Dd(e);g&&(l.manifest.disableVideo=!0);m=function(){return k.P&&k.s?null:k};n=function(){return m()?m().getConfiguration():a.g};if(Infinity!=a.oa.width||Infinity!=a.oa.height||a.g.ignoreHardwareResolution)return C.A(2);q=Rb();return F(C,q.mc(),3)}2!=C.g&&(r=C.h,a.oa.width=r.width,a.oa.height=r.height);t=new ti(l,a.oa,null);w={networkingEngine:a.H,
filter:function(E){var I,K;return Q(function(J){if(1==J.g)return F(J,ui(t,E),2);if(4!=J.g){I=J.h;if(!I)return J.A(0);K=dq("trackschanged");return F(J,Promise.resolve(),4)}k.dispatchEvent(K);H(J)})},makeTextStreamsForClosedCaptions:function(E){return yq(a,E)},onTimelineRegionAdded:function(E){em(k.H,E)},onEvent:function(E){return k.dispatchEvent(E)},onError:function(E){return k.onError(E)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},updateDuration:function(){a.l&&k.P&&a.l.updateDuration()},
newDrmInfo:function(E){var I=k.i,K=I?I.h:null;K&&I.B&&xi(t,K.keySystem,E)},onManifestUpdated:function(){var E=(new Map).set("isLive",a.T());k.dispatchEvent(dq("manifestupdated",E));$n(k,!1,function(){if(a.C)a.C.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},onMetadata:function(E,I,K,J){var L=E;if("com.apple.hls.interstitial"==E&&(L="com.apple.quicktime.HLS",E={startTime:I,endTime:K,values:J},a.C))a.C.onHLSInterstitialMetadata(a,a.h,E);J=u(J);E=J.next();
for(var M={};!E.done;M={Hh:void 0},E=J.next())M.Hh=E.value,"ID"!=M.Hh.name&&$n(k,!1,function(O){return function(){zq(a,I,K,L,O.Hh)}}(M))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,I){return a.addFont(E,I)}};v=new dm(function(){return a.xa()});v.addEventListener("regionadd",function(E){var I=E.region;Aq(a,"timelineregionadded",I,k);$n(k,!1,function(){a.C&&(a.C.onDashTimedMetadata(I),a.C.onDASHInterstitialMetadata(a,a.h,I))})});y=null;l.streaming.observeQualityChanges&&
(y=new Yl(function(){return a.Pb()}),y.addEventListener("qualitychange",function(E){Bq(a,E.quality,E.position)}),y.addEventListener("audiotrackchange",function(E){Bq(a,E.quality,E.position,!0)}));z=!0;A={uc:a.H,onError:function(E){return k.onError(E)},Kf:function(E){$n(k,!0,function(){if(a.D)a:{var I=E,K=dq("keystatuschanged");a.dispatchEvent(K);var J=Object.keys(I);1==J.length&&""==J[0]&&(J=["00"],I={"00":I[""]});K=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=a.keySystem();for(var M=fh(a.g.drm.clearKeys),
O=u(a.i.variants),N=O.next();!N.done;N=O.next()){N=N.value;var P=[];N.audio&&P.push(N.audio);N.video&&P.push(N.video);P=u(P);for(var R=P.next();!R.done;R=P.next()){var T=R.value;R=N.allowedByKeySystem;if(T.keyIds.size)if(T.drmInfos.length&&!M.size){T=u(T.drmInfos);for(var ca=T.next();!ca.done;ca=T.next())if(ca=ca.value,ca.keyIds.size&&ca.keySystem==J){N.allowedByKeySystem=!0;ca=u(ca.keyIds);for(var Y=ca.next();!Y.done;Y=ca.next())if(Y=Y.value,(Y=I[K?"00":Y])||a.D.F)N.allowedByKeySystem=N.allowedByKeySystem&&
!!Y&&!zi.includes(Y)}}else for(N.allowedByKeySystem=!0,T=u(T.keyIds),ca=T.next();!ca.done;ca=T.next())if(ca=ca.value,(ca=I[K?"00":ca])||a.D.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!ca&&!zi.includes(ca);R!=N.allowedByKeySystem&&(L=!0)}}}if(L&&(Cq(a),!Dq(a)))break a;(I=a.l.l)&&!I.allowedByKeySystem&&aq(a)}})},onExpirationUpdated:function(E,I){var K=dq("expirationupdated");k.dispatchEvent(K);if((K=k.l)&&K.onExpirationUpdated)K.onExpirationUpdated(E,I)},onEvent:function(E){k.dispatchEvent(E);"drmsessionupdate"==
E.type&&z&&(z=!1,E=Date.now()/1E3-k.Ha,(a.B||k.getStats()).m=E,a.P&&$c(a.P))}};B=Xp(a,m);Vg(a.H,B);D=function(){return a.sd(A)};G={config:l,Fl:w,Ql:v,Pl:y,sd:D,El:t,networkingEngine:B,dk:f,ck:h};k=new Zn(b,d,c,G);return C.return(k)})}function oq(a,b){var c,d,e;return Q(function(f){if(1==f.g)return c=a.g.manifest.retryParameters,F(f,to(b,a.H,c),2);d=f.h;"application/x-mpegurl"==d&&(e=Rb(),"WEBKIT"===e.Na()&&(d="application/vnd.apple.mpegurl"));return f.return(d)})}
function xq(a,b){if(!Ei(Rb()))return!0;if(b){if(""==(a.h||Fi()).canPlayType(b))return!1;if(!Ei(Rb())||!Ci.has(b))return!0;if(lf(b))return"WEBKIT"===Rb().Na()&&(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("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1}
function Eq(a){var b=a.g.textDisplayFactory;b!==a.Se&&(a.s=b(),a.s.configure?a.s.configure(a.g.textDisplayer):Uc("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Se=b,a.s.setTextVisibility(a.na))}
function mq(a){var b,c,d;return Q(function(e){if(1==e.g)return Rb(),iq(a,"media-source"),a.g.mediaSource.useSourceElements&&Mj(a.h),Eq(a),b=Fq(a.h,a.s,{Ik:function(){return a.keySystem()},onMetadata:function(f,g,h){f=u(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=u(k.frames),q=n.next();!q.done;q=n.next())zq(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Kl:function(f){a.Ta&&em(a.Ta,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Ml:function(){a.G&&a.G.update&&a.G.update()}},a.P,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ha=d,F(e,b.J,2);a.I=b;H(e)})}
function Gq(a,b,c){function d(){return Hq(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;0!=f&&(a.J&&(a.J.set(f),a.m==Iq&&a.u.playbackRateChanged(f),Jq(a,f)),f=dq("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.o(b.remote,"connect",function(){a.l&&"connected"==b.remote.state&&Kq(a);Cq(a)}),a.j.o(b.remote,"connecting",function(){return Cq(a)}),a.j.o(b.remote,"disconnect",function(){return Q(function(f){if(1==f.g)return a.l&&"disconnected"==
b.remote.state?F(f,Qm(a.l),3):f.A(2);2!=f.g&&Kq(a);Cq(a);H(f)})}));b.audioTracks&&(a.j.o(b.audioTracks,"addtrack",function(){return Cq(a)}),a.j.o(b.audioTracks,"removetrack",function(){return Cq(a)}),a.j.o(b.audioTracks,"change",function(){return Cq(a)}));b.videoTracks&&(a.j.o(b.videoTracks,"addtrack",function(){return Cq(a)}),a.j.o(b.videoTracks,"removetrack",function(){return Cq(a)}),a.j.o(b.videoTracks,"change",function(){return Cq(a)}));if(b.textTracks){var e=function(){a.m===Lq&&a.s instanceof
Go&&Kq(a);Cq(a)};a.j.o(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Mq(a,f);break;case "chapters":Nq(a,f);break;default:e()}});a.j.o(b.textTracks,"removetrack",e);a.j.o(b.textTracks,"change",e);"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.j.o(b,"waiting",function(){a.l&&Um(a.l)}),a.j.o(b,"timeupdate",function(){a.l&&Um(a.l)}))}"none"!=b.preload&&a.j.qa(b,"loadedmetadata",function(){a.B.F=Date.now()/1E3-c})}
function tq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N;return Q(function(P){switch(P.g){case 1:iq(a,"load");e=a.h;a.J=new Ul({qf:function(){return e.playbackRate},Uc:function(){return e.defaultPlaybackRate},Wh:function(R){e.playbackRate=R},gj:function(R){e.currentTime+=R}});Gq(a,e,b);"onchange"in window.screen&&a.j.o(window.screen,"change",function(){if(a.N.getConfiguration){var R=a.N.getConfiguration();"AUTO"==R.Gc?Dq(a):"AUTO"==a.g.preferredVideoHdrLevel&&a.g.abr.enabled&&
(R.Gc="AUTO",a.N.configure(R),Dq(a))}});f=!1;g=u(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=ad(l));cq(a,a.g,f);a.Id=a.g.preferredTextLanguage;a.Je=a.g.preferredTextRole;a.Ie=a.g.preferForcedSubs;Oq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(R,T,ca){a.i&&a.l&&R!=a.l.l&&Pq(a,R,!0,void 0===T?!1:T,void 0===ca?0:ca)});a.u.setMediaElement(e);a.u.setCmsdManager(a.ea);a.l=Qq(a);a.l.configure(a.g.streaming);a.m=Iq;
a.dispatchEvent(dq("streaming"));m=c;case 2:(q=a.l.l)||m||(m=Dq(a)?a.u.chooseVariant():null);r=[];n=q||m;t=u([n.video,n.audio]);for(w=t.next();!w.done;w=t.next())(v=w.value)&&!v.segmentIndex&&(r.push(v.createSegmentIndex()),v.dependencyStream&&r.push(v.dependencyStream.createSegmentIndex()));if(!(0<r.length)){P.A(4);break}return F(P,Promise.all(r),4);case 4:if(!n||0!=n.disabledUntilTime){P.A(2);break}if(a.G&&a.G.onInitialVariantChosen)a.G.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
a.configure(a.vg):ab("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.K&&(Zo(a.K,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),dp(a.K,1E3*b));Oq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Fm(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Y=!0;a.dispatchEvent(dq("canupdatestarttime"));y=function(R){a.F=Rq(a,R);a.eb=Sq(a,R);Tq(a,e,!1)};
a.g.streaming.startAtSegmentBoundary||(z=a.L,null==z&&a.i.startTime&&(z=a.i.startTime),y(z));if(q){P.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){P.A(8);break}A=a.i.presentationTimeline;a.L instanceof Date&&(D=A.m||A.i,G=a.L.getTime()/1E3-D,null!=G&&(B=G));null==B&&(B="number"===typeof a.L?a.L:a.h.currentTime);null==a.L&&a.i.startTime&&(B=a.i.startTime);C=A.bc();E=A.Ib();B<C?B=C:B>E&&(B=E);return F(P,Uq(m,B),9);case 9:I=P.h,y(I);case 8:Pq(a,m,!0,!1,0);case 7:return a.F.ready(),K=a.qc().find(function(R){return R.active}),
K||((J=ig(a.i.textStreams,a.Id,a.Je,a.Ie)[0]||null)&&Sn(a.B.h,J,!0),m&&(J?(lg(m.audio,J,a.g)&&(a.na=!0),a.na&&a.s.setTextVisibility(!0)):(a.na=!1,a.s.setTextVisibility(!1)),Vq(a)),J&&(a.g.streaming.alwaysStreamText||a.$c())&&(Om(a.l,J),Wq(a))),F(P,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.u.enable(),Xq(a));Cq(a);Dq(a);a.i.variants.some(function(R){return R.primary});if((L=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||
a.g.streaming.vodDynamicPlaybackRate)M=function(){return Yq(a)},a.j.o(e,"timeupdate",M);L||(O=function(){return Zq(a)},a.j.o(e,"timeupdate",O),Zq(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(N=function(){var R;return Q(function(T){if(1==T.g){R=a.xa().end-a.h.currentTime;if(isNaN(R)||!(R<=a.g.streaming.preloadNextUrlWindow))return T.A(0);a.j.Ca(e,"timeupdate",N);return F(T,a.preload(a.i.nextUrl),4)}a.Ka=T.h;H(T)})},a.j.o(e,"timeupdate",N)),a.j.o(e,"ended",function(){a.load(a.Ka||a.i.nextUrl)})));
if(a.C)a.C.onManifestUpdated(L);H(P)}})}
function rq(a,b){var c,d,e,f,g;return Q(function(h){return 1==h.g?(c=uc,d=Date.now()/1E3,e=!0,a.D=a.sd({uc:a.H,onError:function(k){lq(a,k)},Kf:function(){},onExpirationUpdated:function(){var k=dq("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.B.m=Date.now()/1E3-d)}}),a.D.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?jf(b):"",codecs:b?kf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.Ea,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},g.fullMimeTypes.add(af(g.mimeType,g.codecs)),b.startsWith("audio/")?(g.type=c.ba,f.audio=g):f.video=g,a.D.Y=!0,F(h,Eh(a.D,[f],[]),2)):F(h,a.D.$b(a.h),0)})}
function uq(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(w){switch(w.g){case 1:iq(a,"src-equals");d=a.h;a.F=new Gl(d);e=!1;a.He.push(function(){e=!0});a.dispatchEvent(dq("canupdatestarttime"));null!=a.L&&a.F.rg(a.L);a.eb=$q(a,a.L||0);a.J=new Ul({qf:function(){return d.playbackRate},Uc:function(){return d.defaultPlaybackRate},Wh:function(v){d.playbackRate=v},gj:function(v){d.currentTime+=v}});Tq(a,d,!0);d.textTracks&&(Eq(a),f=function(v){if(!(a.s instanceof Go)){var y=ar(a).find(function(z){return"disabled"!==
z.mode});y&&(y.mode=v?"showing":"hidden");a.s instanceof Io&&(y=br(a))&&(y.mode=!v&&a.s.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.webkitSupportsFullscreen&&a.j.o(g,"webkitpresentationmodechanged",function(){return f("inline"!==g.webkitPresentationMode)}));Gq(a,d,b);h=fp(a.K,a.U,c);!h.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(h+="#t=",0<a.g.playRangeStart&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.I){w.A(2);break}return F(w,a.I.destroy(),3);case 3:a.I=null;case 2:return Mj(d),d.src=h,k=Rb(),"TV"==k.Ia()&&d.load(),"none"!=d.preload&&
!d.autoplay&&lf(c)&&"WEBKIT"===k.Na()&&d.load(),a.m=Lq,a.dispatchEvent(dq("streaming")),l=new Hg,xl(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){a.F.ready();l.resolve()}),m=function(){return new Promise(function(v){var y=new yf(v);a.j.o(d.textTracks,"change",function(){return y.X(.5)});y.X(.5)})},xl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var v,y,z,A,B;return Q(function(D){if(1==D.g)return F(D,m(),2);if(e)return D.return();cr(a);v=ar(a);v.some(function(G){return"showing"===G.mode})&&
(a.na=!0,a.s.setTextVisibility(!0));if(!(a.s instanceof Go))for(v.length&&(a.s.enableTextDisplayer?a.s.enableTextDisplayer():Uc("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),y=!1,z=u(v),A=z.next();!A.done;A=z.next())B=A.value,"disabled"!==B.mode&&(y?(B.mode="disabled",ab("Found more than one enabled text track, disabling it",B)):(dr(a,B),y=!0));er(a);H(D)})}),d.error?l.reject(kq(a)):"none"==d.preload&&(ab('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.qa(d,"error",function(){l.reject(kq(a))}),F(w,Cf(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Yq(a)},a.j.o(d,"timeupdate",q);n||(r=function(){return Zq(a)},a.j.o(d,"timeupdate",r),Zq(a));a.C&&(a.C.onManifestUpdated(n),n&&(t=a.xa().end,a.j.o(d,"progress",function(){var v=a.xa().end;t!=v&&(a.C.onManifestUpdated(a.T()),t=v)})));
a.Y=!0;H(w)}})}function cr(a){var b=a.g.preferredAudioLanguage;""!=b&&a.xj(b,a.g.preferredVariantRole)}function er(a){var b=a.g.preferredTextLanguage;""!=b&&a.Rh(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Mq(a,b){if("metadata"==b.kind){b.mode="hidden";a.j.o(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,zq(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=u(b.cues);for(var f=e.next(),g={};!f.done;g={Ac:void 0},f=e.next())g.Ac=f.value,"com.apple.quicktime.HLS"==g.Ac.type&&null!=g.Ac.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ac.startTime&&k.endTime==h.Ac.endTime}}(g)),
f||(f={startTime:g.Ac.startTime,endTime:g.Ac.endTime,values:[]},d.push(f)),f.values.push(g.Ac.value));d=u(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.C&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new yf(function(){var d=fr(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ja().X(.5);
a.He.push(function(){c.stop()})}}function qq(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(dq(c,b))}function zq(a,b,c,d,e){a.sa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),em(a.sa,b))}function Nq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new yf(function(){b.mode="hidden"})).Ja().X(.5);a.He.push(function(){c.stop()})}}
p.Ul=function(){for(var a=this.Z;a.g;)a.release()};p.sd=function(a){return new xh(a)};
function Xp(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?$n(b(),!0,f):f()}b||(b=function(){return null});var e=new Rg(function(f,g,h,k,l){var m=b()?b().j:a.u;m&&m.segmentDownloaded(f,g,h,k,l)},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(dq("downloadheadersreceived",g));d(function(){if(a.ea){var k=a.ea;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],Rp(q[1]))}}catch(y){}if(m=f["cmsd-dynamic"]){try{var r=new Map,t=m.split(";");for(m=1;m<t.length;m++){var w=t[m].split("=");r.set(w[0],Rp(w[1]))}var v=r}catch(y){v=null}v&&(k.g=v)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(dq("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(dq("downloadfailed",f))},function(f,g,h){d(function(){var k=a.K,l=h;l=void 0===l?{}:l;if(k.g.enabled)if("HEAD"===
g.method)mp(k,g);else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.l?ap:$o;break a;case 3:case 2:m=k.l?cp:bp;break a;case 5:m="s";break a}m=void 0}k.i=m}mp(k,g,{ot:jp,su:!k.u})}}catch(N){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case bh:try{if(k.g.enabled){var n=g.uris[0],q=l.segment;m=0;q&&(m=q.endTime-q.startTime);var r={d:1E3*m,st:k.h.T()?"l":"v"};r.ot=qp(l);var t=r.ot===sp||r.ot===hp||r.ot===ip||r.ot===tp,w=l.stream;if(w){var v=
k.h.Ya();if(t&&(r.bl=vp(k,w.type),r.ot!==tp)){var y=wp(k,w.type);r.dl=v?y/Math.abs(v):y}w.bandwidth&&(r.br=w.bandwidth/1E3);if(w.segmentIndex&&q){var z=w.segmentIndex.ac(q.endTime,!0,0>v);if(z){var A=z.next().value;if(A&&A!=q){if(n&&!ud(q.S(),A.S())){var B=A.S()[0],D=new URL(B),G=new URL(n);if(D.origin!==G.origin)var C=B;else{for(var E=D.pathname.split("/").slice(1),I=G.pathname.split("/").slice(1,-1);E[0]===I[0];)E.shift(),I.shift();for(;I.length;)I.shift(),E.unshift("..");C=E.join("/")}r.nor=C}if((A.startByte||
A.endByte)&&(q.startByte!=A.startByte||q.endByte!=A.endByte)){var K=A.startByte+"-";A.endByte&&(K+=A.endByte);r.nrr=K}}}var J=k.h.Ya()||1,L=wp(k,w.type)||500,M=w.bandwidth;var O=M?M*(q.endTime-q.startTime)/1E3/(L/J/1E3)*k.g.rtpSafetyFactor:NaN;isNaN(O)||(r.rtp=O)}}t&&r.ot!==tp&&(r.tb=xp(k,r.ot)/1E3);mp(k,g,r)}}catch(N){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:mp(k,g,{ot:"k"});break;case 4:mp(k,g,{ot:"o"})}})},function(f,g,h,k){(f=b()?b().l:a.G)&&
f.banLocation&&f.banLocation(k)},function(f,g){if(g.data){g=g.data.byteLength;var h=b()?b().getStats():a.B;h&&(Xn(h,g),0===f&&(h.aj=g))}});e.configure(a.g.networking);return e}function Rq(a,b){return new Jl(a.h,a.i,a.g.streaming,b,function(){a.eb&&Xl(a.eb,!0);a.l&&a.l.hd();a.O&&gr(a)},function(c){return a.dispatchEvent(c)})}
function Sq(a,b){var c=a.T()||"number"===typeof b&&0<b;b=new oo(a.Ee,c);b.addEventListener("enter",function(f){Aq(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){Aq(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(Aq(a,"timelineregionenter",g),Aq(a,"timelineregionexit",g))});var d=new oo(a.sa,c);d.addEventListener("enter",function(f){qq(a,f.region,"metadata")});c=new oo(a.Ta,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(dq("emsg",f))});var e=new Wl(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.De&&e.g.add(a.De);return e}function $q(a,b){b=new oo(a.sa,b instanceof Date||0<b);b.addEventListener("enter",function(d){qq(a,d.region,"metadata")});var c=new Wl(a.h);c.g.add(b);return c}
function Tq(a,b,c){a.O=new qi;a.O.g=si;hr(a);nq(a);a.Ha=new yf(function(){gr(a)});a.g.streaming.rebufferingGoal&&a.Ha.ya(.25);a.j.o(b,"waiting",function(){return gr(a)});a.j.o(b,"canplaythrough",function(){return gr(a)});a.j.o(b,"playing",function(){return gr(a)});a.j.o(b,"seeked",function(){return gr(a)});c&&(a.j.o(b,"stalled",function(){return gr(a)}),a.j.o(b,"progress",function(){return gr(a)}),a.j.o(b,"timeupdate",function(){return gr(a)}))}
function hr(a){var b=a.g.streaming.rebufferingGoal;a.O.i.set(ri,Math.min(.5,b/2)).set(si,b)}function gr(a){var b=a.isEnded()||a.F.Wi(),c=Gj(a.h.buffered,a.h.currentTime),d=a.O,e=d.i.get(d.g),f=d.g;b=b||c>=e&&0<c?ri:si;d.g=b;(f=f!=b)&&b===ri&&(d.h=Date.now());f&&nq(a)}function Fq(a,b,c,d,e){return new vk(a,b,c,e,d)}
function Wp(a){return new Wo({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Pb:function(){return a.Pb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ya:function(){return a.Ya()},Hb:function(){return a.Hb()},kb:function(){return a.kb()},T:function(){return a.T()},pf:function(){return a.pf()}},a.g.cmcd)}
function Qq(a){return new zm(a.i,{Vc:function(){return a.F?a.F.Te():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Ya:function(){return a.Ya()},video:a.h,ia:a.I,uc:a.H,onError:function(b){return lq(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Lf:function(b,c,d){var e=b.startTime;b=b.endTime;c=c.type;if(c!=rc){if(a.F){a.F.ij();var f=Ik(a.I,c);!a.T()&&a.h.paused&&!a.h.seeking&&null!=f&&0<f&&a.F.Te()<f&&a.F.rg(f)}gr(a)}d=(new Map).set("start",e).set("end",b).set("contentType",
c).set("isMuxed",d);a.dispatchEvent(dq("segmentappended",d))},Ll:function(b,c){(c=c.Cd)&&a.De&&$l(a.De,c,b)},Ai:function(b,c){var d=a.D;if(d.g.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new vh(Kb(c));c=0;for(var e=u(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=u(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Nh(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,
c){return a.disableStream(b,c)}})}
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=on(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Uc("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&&(Uc("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){Uc("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var c=Rb();a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&"WEBKIT"===c.Na();delete a.streaming.useNativeHlsOnSafari}a.streaming&&"boolean"==typeof a.streaming.liveSync&&(Uc("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),
c=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=c);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&
(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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){Uc("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};
delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(Uc("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&&(Uc("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in
a.manifest.dash&&(Uc("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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&&(Uc("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){c=!1;for(var f in a.drm.advanced){var g=a.drm.advanced[f];d=g.videoRobustness;g=g.audioRobustness;"videoRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].videoRobustness)&&(a.drm.advanced[f].videoRobustness=[d],c=!0);"audioRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].audioRobustness)&&(a.drm.advanced[f].audioRobustness=[g],c=!0)}c&&Uc("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&&(Uc("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&&(Uc("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&&
(Uc("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);a.streaming&&"crossBoundaryStrategy"in a.streaming&&"keep"!=a.streaming.crossBoundaryStrategy&&(a.streaming.inaccurateManifestTolerance=0);f=Nn(this.g,a,Vp(this));ir(this);return f};p.jk=function(a){this.vg=a};
function ir(a){a.Ke=new ti(a.g,a.oa,a.D);if(a.G){var b=Dd(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.G.configure(b)}a.D&&a.D.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=eq&&vi(a.Ke,a.i)&&Cq(a)}catch(e){lq(a,e)}a.u&&Dq(a);b=a.l.l;!b||b.allowedByApplication&&b.allowedByKeySystem||aq(a)}a.H&&a.H.configure(a.g.networking);a.I&&(a.I.configure(a.g.mediaSource),a.I.Ha=a.g.manifest.segmentRelativeVttTiming);if(a.s)if(b=a.g.textDisplayFactory,a.Se!=b){var c=a.s;a.s=
b();a.s.configure?a.s.configure(a.g.textDisplayer):Uc("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.s.setTextLanguage||Uc("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');a.s.setTextVisibility(c.isTextVisible());c.destroy();if(a.I){c=a.I;var d=a.s;c.Z=d;c.h&&(c.h.j=d)}a.Se=b;a.l&&(b=a.l,(c=b.i.get(rc))&&Mm(b,c.stream,!0,0,!0))}else a.s.configure&&a.s.configure(a.g.textDisplayer);a.u&&(a.u.configure(a.g.abr),a.g.abr.enabled?
a.u.enable():a.u.disable(),Xq(a));a.O&&hr(a);a.Ha&&(a.g.streaming.rebufferingGoal?a.Ha.ya(.25):a.Ha.stop());a.i&&Oq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.K&&a.K.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd);a.ra&&a.ra.configure(a.g.queue)}p.getConfiguration=function(){var a=Vp(this);Nn(a,this.g,Vp(this));return a};p.zk=function(){return this.vg};p.Qi=function(){var a=Vp(this);Nn(a,this.g,Vp(this));return qn(this.g,Vp(this))};
p.Ni=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.xa().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.sj=function(){for(var a in this.g)delete this.g[a];Nn(this.g,Vp(this),Vp(this));ir(this)};p.Jk=function(){return this.m};p.ih=function(){return this.i?this.i.type:null};p.Qk=function(){return this.h};
p.Hb=function(){return this.H};p.xd=function(){return this.U};p.mf=function(){return this.C?this.C:null};p.kh=function(){return this.ra?this.ra:null};p.T=function(){return this.i&&!this.Da()?this.i.presentationTimeline.T():this.h&&(this.h.src||this.Da())?Infinity==this.h.duration:!1};p.Zc=function(){return this.i?this.i.presentationTimeline.Zc():!1};
p.zd=function(){if(this.i&&!this.Da()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.Da())?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};p.wh=function(){if(this.i&&!this.Da()){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.Da())&&this.h.audioTracks?0==this.h.audioTracks.length:!1};
p.xa=function(){if(this.i&&!this.Da()){if(!this.Y&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.bc(),end:a.Ib()}}if(this.h&&(this.h.src||this.Da())&&(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.ll=function(){this.T()&&(this.h.currentTime=this.xa().end)};p.ul=function(){return this.Y};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.D?this.D.h:null};p.be=function(){return this.D?this.D.be():Infinity};p.dh=function(){return this.D?this.D.dh():[]};p.nf=function(){return this.D?this.D.nf():{}};p.xf=function(){return this.O?this.O.g==si:!!this.U};p.Ya=function(){return this.h?this.J?this.J.i:1:0};p.oi=function(a){this.m==Iq&&this.l&&Lm(this.l,a)};
p.Nc=function(a,b){b=void 0===b?!0:b;0==a?ab("A trick play rate of 0 is unsupported!"):(this.J.set(a),this.m==Iq&&(this.u.playbackRateChanged(a),this.oi(b&&1!=a)),Jq(this,a))};p.rd=function(){var a=this.J.Uc();this.m==Lq&&this.J.set(a);this.m==Iq&&(this.J.set(a),this.u.playbackRateChanged(a),this.oi(!1));this.dc.Sa()};
p.kb=function(){if(this.i&&!this.Da()){for(var a=this.l?this.l.l:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,gg(e)){var f=Zf(e);f.active=e==a;f.active||1==c||null==a||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=jr(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return fg(h,g)}):g?[fg(null,g)]:[]}return[]};
p.qc=function(){if(this.i){if(this.Da())return[];for(var a=this.l?this.l.B:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$f(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?ar(this).map(function(f){return eg(f)}):[]};p.gh=function(){var a=this.Qe;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ag(b)})};
p.nk=function(a){var b=this,c,d;return Q(function(e){if(1==e.g)return F(e,kr(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Gb(function(f){var g=lr(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.Qc,k=f.j-f.startTime,l=0;l<h;l++){var m=mr(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function lr(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Qc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.Ri=function(a,b){var c=this,d,e,f,g;return Q(function(h){if(1==h.g)return F(h,kr(c,a),2);d=h.h;if(!d)return h.return(null);e=d.segmentIndex.find(b);if(null==e)return h.return(null);f=d.segmentIndex.get(e);return(g=lr(f.tilesLayout||d.tilesLayout))?h.return(mr(f,d,b,g)):h.return(null)})};
function kr(a,b){var c,d;return Q(function(e){if(1==e.g){if(a.m!=Iq&&a.m!=Lq)return e.return(null);c=a.Qe;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);null!=b&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.A(2):F(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function mr(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.Qc,h=f/d.rows,k=d.Qc*d.rows,l=a.j-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;1<k&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.Qc*g,q=Math.floor(q/d.Qc)*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.Dc(),endByte:a.Bc(),width:g,sprite:d,mimeType:a.mimeType||b.mimeType,
codecs:a.codecs||b.codecs}}
p.Zf=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.B&&(Sn(c.B.h,d,!1),Om(c.l,d),Kq(c),Wq(c),c.Id=d.language)}var c=this;if(this.i&&this.F&&(b(),!this.Da()))return;(function(){if(c.h&&c.h.textTracks){var d=ar(c),e=d.find(function(h){return cg(h)===a.id});if(e){if(c.s instanceof Go){d=u(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.na?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return"disabled"!==h.mode}),
d!==e&&(d&&(d.mode="disabled",c.j.Ca(d,"cuechange"),c.s.remove(0,Infinity)),e&&dr(c,e));Kq(c);Wq(c)}}})()};
function dr(a,b){a.j.o(b,"cuechange",function(){a.s.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=u(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(Infinity===f.endTime||f.endTime<f.startTime)f=null;else{var g=new ne(f.startTime,f.endTime,f.text);g.line="number"===typeof f.line?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
te:1;g.position="number"===typeof f.position?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;"lr"===f.vertical?g.writingMode="vertical-lr":"rl"===f.vertical&&(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=pd,g.region.width=f.region.width,g.region.widthUnits=pd);De(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.s.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.Nd=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&gg(f)){var g=e.l.l;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)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.Da()?Pq(e,f,!1,!1,0):Pq(e,f,!1,b||!1,c||0);e.N.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,Gc: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:"",qd:f.audio&&f.audio.label?f.audio.label:"",Qd:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",Sd:g.audio&&g.audio.codecs?g.audio.codecs:"",We:g.audio&&
g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Dq(e)}}var e=this;b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.F&&(d(),!this.Da()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=u(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,cg(g)==a.id){nr(e,g);break}}})()};
p.yj=function(a,b){b=void 0===b?0:b;var c=this.kb();if(c.length){var d=c.find(function(e){return e.active});d&&(c=c.find(function(e){return e.videoId===d.videoId&&e.language==a.language&&e.label==a.label&&e.audioMimeType==a.mimeType&&e.audioCodec==a.codecs&&e.primary==a.primary&&ud(e.audioRoles,a.roles)&&e.accessibilityPurpose==a.accessibilityPurpose&&e.channelsCount==a.channelsCount&&e.audioSamplingRate==a.audioSamplingRate&&e.spatialAudio==a.spatialAudio}))&&!c.active&&this.Nd(c,!0,b)}};
p.getAudioTracks=function(){var a=this.kb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=Iq||this.Da()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&f.audioCodec}));if(!c.length)return[];a=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalAudioId;e||null==d.audioId||(e=String(d.audioId));e&&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())};
p.zj=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;var d=this.kb();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}))&&!d.active&&this.Nd(d,b,c)}};
p.getVideoTracks=function(){if(this.m==Lq||this.Da())return[];var a=this.kb();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=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||null==d.videoId||(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})}return Array.from(a.values())};p.qk=function(){return or(this.kb())};p.Zk=function(){return or(this.qc())};p.pk=function(){return Array.from(pr(this.kb()))};p.Yk=function(){return Array.from(pr(this.qc()))};
p.xj=function(a,b,c,d,e,f,g){function h(){function l(t,w){return t.video||w.video?t.video&&w.video?Math.abs((t.video.height||0)-(w.video.height||0))+Math.abs((t.video.width||0)-(w.video.width||0)):Infinity:0}var m=k.l.l;k.N=k.g.adaptationSetCriteriaFactory();k.N.configure({language:a,role:b||"",channelCount:c||0,Gc:"",spatialAudio:f||!1,videoLayout:"",qd:g||"",Qd:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,audioCodec:e||"",Sd:m.audio&&m.audio.codecs?m.audio.codecs:"",We:m.audio&&
m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.N.create(k.i.variants),q=null;n=u(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,gg(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=Zf(q),k.Nd(m,!0,d||0)):aq(k))}var k=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;g=void 0===g?"":g;if(this.i&&this.F&&(h(),!this.Da()))return;(function(){if(k.h&&k.h.audioTracks){var l=
ig(k.kb(),a,b||"",!1)[0];l&&k.Nd(l)}})()};p.Rh=function(a,b,c){function d(){e.Id=a;e.Je=b||"";e.Ie=c||!1;var f=ig(e.i.textStreams,e.Id,e.Je,e.Ie)[0]||null;f&&f!=e.l.B&&(Sn(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.$c())&&(Om(e.l,f),Kq(e),Wq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.F&&(d(),!this.Da()))return;(function(){var f=ig(e.qc(),a,b||"",c||!1)[0];f&&e.Zf(f)})()};
p.cm=function(a,b,c){function d(){for(var f=null,g=u(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.N=e.g.adaptationSetCriteriaFactory(),e.N.configure({language:f.language,role:"",channelCount:0,Gc:"",spatialAudio:!1,videoLayout:"",Qd:"",qd:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Sd:"",We:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),aq(e,b,c))}var e=
this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F&&(d(),!this.Da()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=u(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&nr(e,g)}})()};p.$c=function(){var a=this.na;return this.s?this.s.isTextVisible():a};p.wk=function(){return this.Za.map(function(a){return $f(a)})};
p.vk=function(a){Uc("getChapters","Please use an getChaptersAsync.");if(!this.Za.length)return[];var b=yc(a);a=this.Za.filter(function(f){return yc(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Gb(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.eh=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.Za.length)return l.return([]);c=yc(a);d=b.Za.filter(function(m){return yc(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=u(d);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return F(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Gb(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.A(2);break;case 4:return l.return(e)}})};function ar(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function br(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function fr(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}
p.ze=function(a){a=!!a;this.na!=a&&(this.na=a,this.m==Iq?(this.s.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=ig(this.i.textStreams,this.Id,this.Je,this.Ie),0<a.length&&(Om(this.l,a[0]),Kq(this),Wq(this))):Km(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.s.setTextVisibility(a),Vq(this))};
p.Rk=function(){if(this.F)var a=this.F.Te();else{if(null==this.L)return new Date;if(this.L instanceof Date)return this.L;a=this.L}if(this.i&&!this.Da()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};
p.jh=function(){if(this.i&&!this.Da()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.rf=function(){return this.T()?this.i?this.i.presentationTimeline.rf():null:null};p.Pb=function(){if(this.m==Iq)return this.I.Pb();var a={total:[],audio:[],video:[],text:[]};this.m==Lq&&(a.total=Hj(this.h.buffered));return a};
p.pf=function(){if(!this.h||!this.h.currentTime)return null;var a=this.jh().getTime()+1E3*this.h.currentTime;return Math.floor(Date.now()-a)};
p.getStats=function(){if(this.m!=Iq&&this.m!=Lq)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:[]};Hq(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.T()||Wn(this.B,Math.round(100*b));this.F&&(this.B.P=this.F.pi(),this.B.R=this.F.ri());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),Un(this.B,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.B.L=Number(b.corruptedVideoFrames));this.B.s=this.D?Xh(this.D):NaN;Vn(this.B,a.videoWidth||NaN,a.videoHeight||NaN);this.B.l="";this.T()&&null!=this.jh()&&(a=this.pf()||0,this.B.D=a/1E3);b=
this.kb().find(function(e){return e.active});a=this.qc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.J?this.J.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.B.B=d}b.width&&b.height&&Vn(this.B,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.B.l=b)}this.m!=Iq||this.Da()||(this.i&&(this.B.H=this.i.periodCount,this.B.G=this.i.gapCount,this.i.presentationTimeline&&(this.B.J=this.i.presentationTimeline.h)),a=this.u.getBandwidthEstimate(),
this.B.u=a);this.m==Lq&&Xn(this.B,NaN);return Yn(this.B)};
p.Td=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,r,t,w,v,y,z,A;return Q(function(B){switch(B.g){case 1:if(h.m!=Iq&&h.m!=Lq)throw new V(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.A(2);break}return F(B,qr(h,a),3);case 3:d=B.h;case 2:k=[];h.C&&(k=h.C.getCuePoints());if(h.m!=Lq){B.A(4);break}l=Rb();g&&"WEBKIT"===l.Na()&&(c="forced");return F(B,rr(h,a,b,c,d,f||"",k),5);case 5:m=B.h;if(m.track)return Cq(h),
B.return(eg(m.track));throw new V(1,2,2012);case 4:n=uc;q=h.xa();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new V(1,4,4033);if(!k.length){B.A(6);break}return F(B,sr(h,a,h.H,h.g.streaming.retryParameters),7);case 7:t=B.h,w=tr(h,t,d,k),v=new Blob([w],{type:"text/vtt"}),a=yk(v),d="text/vtt";case 6:y={id:h.Le++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ql(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,
drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.Xa,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([af(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};z=af(y.mimeType,y.codecs);A=qf(z);if(!A)throw new V(2,2,2014,d);h.i.textStreams.push(y);Cq(h);return B.return($f(y))}})};
p.Ye=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B;return Q(function(D){switch(D.g){case 1:if(c.m!=Iq&&c.m!=Lq)throw new V(1,7,7004);if(b){D.A(2);break}return F(D,qr(c,a),3);case 3:b=D.h;case 2:if("text/vtt"!=b)throw new V(1,2,2017,a);d=uc;e=c.xa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new V(1,4,4045);return F(D,sr(c,a,c.H,c.g.streaming.retryParameters),4);case 4:g=D.h;h=pf(b);if(!h)throw new V(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
segmentEnd:f,vttOffset:0};m=Kb(g);n=k.parseMedia(m,l,a,[]);q=[];r=u(n);t=r.next();for(w={};!t.done;w={mg:void 0,td:void 0},t=r.next())w.td=t.value,w.mg=null,v=function(G){return function(){null==G.mg&&(G.mg=lc([a],[G.td.payload]));return G.mg||[]}}(w),y=new zj(w.td.startTime,w.td.endTime,v,0,null,null,0,0,Infinity),w.td.payload.includes("#xywh")&&(z=w.td.payload.split("#xywh=")[1].split(","),4===z.length&&y.cg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],
10)})),q.push(y);A=b;if(!q.length){D.A(5);break}return F(D,to(q[0].S()[0],c.H,c.g.manifest.retryParameters),6);case 6:A=D.h;case 5:return B={id:c.Le++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ol(q),mimeType:A||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.pg,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([af(A||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Lq?c.Qe.push(B):c.i.imageStreams.push(B),Cq(c),D.return(ag(B))}})};
p.Xe=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z;return Q(function(A){switch(A.g){case 1:if(d.m!=Iq&&d.m!=Lq)throw new V(1,7,7004);if(c){A.A(2);break}return F(A,qr(d,a),3);case 3:c=A.h;case 2:e=uc;f=d.xa();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(Infinity==g)throw new V(1,4,4054);return F(A,sr(d,a,d.H,d.g.streaming.retryParameters),4);case 4:h=A.h;k=pf(c);if(!k)throw new V(2,2,2014,c);l=k();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Kb(h);q=
l.parseMedia(n,m,a,[]);r=[];t=u(q);w=t.next();for(v={};!w.done;v={jf:void 0},w=t.next())v.jf=w.value,y=new zj(v.jf.startTime,v.jf.endTime,function(B){return function(){return[B.jf.payload]}}(v),0,null,null,0,0,Infinity),r.push(y);z={id:d.Le++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ol(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Xa,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([af("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.Za.push(z);Cq(d);return A.return($f(z))}})};
function qr(a,b){var c;return Q(function(d){switch(d.g){case 1:return ta(d,2),F(d,to(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}
function rr(a,b,c,d,e,f,g){var h,k,l,m;return Q(function(n){if(1==n.g)return"text/vtt"!=e||g.length?F(n,sr(a,b,a.H,a.g.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=tr(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=yk(l),e="text/vtt");m=document.createElement("track");var q=a.K,r=b;try{if(q.g.enabled){var t=gp(q);t.ot=up;t.su=!0;var w=kp(t);var v=lp(r,w)}else v=r}catch(y){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),v=r}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.ug.push(m);return n.return(m)})}function sr(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){e=bh;f=Wg([b],d);f.method="GET";var k=a.K;try{k.g.enabled&&mp(k,f,{ot:up,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return F(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function tr(a,b,c,d){var e=pf(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Kb(b),b=c.parseMedia(b,a,null,[]),Vo(b,d);throw new V(2,2,2014,c);}p.im=function(a,b){this.oa.width=a;this.oa.height=b};p.Nh=function(a){if(this.m==Iq){var b=this.l;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.C)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.fe||d.$a||d.Cb||(d.fe=!1,Jm(b,d,a));b=!0}}else b=!1;return b};
p.hh=function(){ab("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.Nk=function(){return this.vc};
p.Fk=function(){var a={video:null,audio:null,text:null};if(this.m!=Iq)return a;var b=this.l.l,c=this.h.currentTime;b=u([b.video,b.audio,this.l.B]);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};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==rc&&(a.text=e)}return a};
function Vp(a){var b=In();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Nh(d))}};b.textDisplayFactory=function(){var c=Rb();return a.Me&&(document.fullscreenEnabled||"WEBKIT"!==c.Na())?new Lo(a.h,a.Me):"track"in document.createElement("track")?new Go(a):new Ko};return b}p.Yh=function(a){this.Me=a};
function yq(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(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 Rl,l=e.closedCaptions.get(g);h={id:a.Le++,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:rc,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([af(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Uq(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return Q(function(r){if(1==r.g)return k?k.segmentIndex?r.A(2):F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.ac(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
function nq(a){var b=a.xf();if(a.B&&a.O&&a.F){if(0==a.g.streaming.rebufferingGoal){var c=a.J;c.j=!1;Vl(c)}else c=a.J,c.j=b,Vl(c);a.K&&(c=a.K,b||c.u||(c.u=!0),c.u&&b&&(c.C=!0),c.F=b);Hq(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ve<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+
++a.Ve*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(dq("buffering",b))}function Jq(a,b){a.dc.Sa();a.dc.o(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.xa(),e=a.T()?a.g.streaming.safeSeekOffset:0;0<b?Math.floor(c)>=Math.floor(d.end)&&a.rd():Math.floor(c)<=Math.floor(d.start+e)&&a.rd()})}
function Hq(a){if(a.B&&a.O){var b=a.B.g,c="playing";a.O.g==si?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)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(dq("statechanged",c)))}}
function Yq(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Ni();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Nc(d,!1):1==e&&b!==a.J.Uc()&&a.rd()}if(c&&(c=a.xa(),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,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(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.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Kb&&null!==a.R&&"number"===typeof g&&a.Ve<n&&Date.now()-a.Kb>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.R=Math.max(a.R-(g-f)/2,f+d),a.Kb=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Lq&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.O.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Nc(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.Nc(l,!1),a.Kb=null):void 0!=k&&m&&g-d<k?(b!=m&&a.Nc(m,!1),a.Kb=null):b!==a.J.Uc()&&(a.rd(),a.Kb=Date.now())}}
function Zq(a){if(a.h){var b=function(e,f){var g=void 0===g?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.sg<e?(a.sg=e,!0):!1},c=a.xa();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=dq("started");else if(b(25,c))d=dq("firstquartile");else if(b(50,c))d=dq("midpoint");else if(b(75,c))d=dq("thirdquartile");else{if(b(100,c)||100<c)d=dq("complete");a.g&&Infinity!=a.g.playRangeEnd&&
a.isEnded()&&a.h.pause()}d&&a.dispatchEvent(d)}}}function Dq(a){try{yi(a.Ke,a.i)}catch(c){return lq(a,c),!1}var b=hg(a.i.variants);b=a.N.create(b);a.u.setVariants(Array.from(b.values()));return!0}function aq(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=Dq(a)?a.u.chooseVariant():null)&&Pq(a,f,e,b,c,d)}
function Pq(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.l.l;if(b==g)d&&Nm(a.l,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Nm(a.l,b,d,e,f,c);d=null;g&&(d=Zf(g));g=Zf(b);g.active=!0;if(a.P&&(e=a.P,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.ih()){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=dq("adaptation",c),ur(a,c)):vr(a,d,g);wr(a,d,g)}}function nr(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=jr(a);c=fg(c,d);b=fg(b,d);vr(a,c,b);wr(a,c,b)}}function jr(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function Cq(a){var b=dq("trackschanged");ur(a,b);xr(a)}function vr(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=dq("variantchanged",b);ur(a,b)}function wr(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&xr(a)}function xr(a){var b=dq("audiotrackschanged");ur(a,b)}function Kq(a){var b=dq("textchanged");ur(a,b)}function Vq(a){var b=dq("texttrackvisibility");ur(a,b)}
function Xq(a){a.g.abr.enabled||$p(a);var b=(new Map).set("newStatus",a.g.abr.enabled);ur(a,dq("abrstatuschanged",b))}function Wq(a){var b=a.qc().find(function(c){return c.active});b&&a.s&&a.s.setTextLanguage&&a.s.setTextLanguage(b.language)}function $p(a,b){b=void 0===b?!0:b;if(a.m==Iq){a.Ne.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Dq(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===eq||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=u(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.Ne.ya(1);b=this.Pb().video.reduce(function(h,
k){return h+k.end-k.start},0);aq(this,!1,b,!0,!1);return!0}return!1};
function lq(a,b){var c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(a.m==eq)return h.return();1===b.severity&&a.B.K++;c=!0;if(!(a.Y&&a.i&&a.l)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3024!=b.code&&3018!=b.code){h.A(2);break}d=Rb();if("WEBKIT"===d.Na()&&3016==b.code)return h.return();ta(h,3);return F(h,Qm(a.l),5);case 5:e=h.h;c=!e;e&&(f=dq("mediasourcerecovered"),a.dispatchEvent(f));wa(h,2);break;case 3:xa(h),c=!0;case 2:if(!c)return h.return();2===b.severity&&$p(a,!1);g=dq("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);H(h)}})}p.addFont=function(a,b){return Rj(a,b)};function Aq(a,b,c,d){d=void 0===d?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(dq(b,a))}
function Bq(a,b,c,d){d=void 0===d?!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(dq(d?"audiotrackchanged":"mediaqualitychanged",b))}
function kq(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new V(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new V(2,3,3016,c,b,a.h.error.message)}function Oq(a,b,c){0<b&&(a.T()||a.Hj(b));b=a.getDuration();c<b&&(a.T()||a.vb(c))}function ur(a,b){Q(function(c){if(1==c.g)return F(c,Promise.resolve(),2);a.m!=eq&&a.dispatchEvent(b);H(c)})}
function pr(a){var b=new Set;a=u(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 or(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));"variant"==e.type?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=u(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=u(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.Da=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};p.isEnded=function(){return!this.h||this.h.ended?!0:this.Y&&!this.T()&&this.h.currentTime>=this.xa().end};S("shaka.Player",X);X.prototype.isEnded=X.prototype.isEnded;X.prototype.isRemotePlayback=X.prototype.Da;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.Yh;X.prototype.getFetchedPlaybackInfo=X.prototype.Fk;X.prototype.getManifestParserFactory=X.prototype.Nk;
X.prototype.getManifest=X.prototype.hh;X.prototype.retryStreaming=X.prototype.Nh;X.prototype.setMaxHardwareResolution=X.prototype.im;X.prototype.addChaptersTrack=X.prototype.Xe;X.prototype.addThumbnailsTrack=X.prototype.Ye;X.prototype.addTextTrackAsync=X.prototype.Td;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Pb;X.prototype.getSegmentAvailabilityDuration=X.prototype.rf;X.prototype.getPresentationStartTimeAsDate=X.prototype.jh;
X.prototype.getPlayheadTimeAsDate=X.prototype.Rk;X.prototype.setTextTrackVisibility=X.prototype.ze;X.prototype.getChaptersAsync=X.prototype.eh;X.prototype.getChapters=X.prototype.vk;X.prototype.getChaptersTracks=X.prototype.wk;X.prototype.isTextTrackVisible=X.prototype.$c;X.prototype.selectVariantsByLabel=X.prototype.cm;X.prototype.selectTextLanguage=X.prototype.Rh;X.prototype.selectAudioLanguage=X.prototype.xj;X.prototype.getTextLanguages=X.prototype.Yk;X.prototype.getAudioLanguages=X.prototype.pk;
X.prototype.getTextLanguagesAndRoles=X.prototype.Zk;X.prototype.getAudioLanguagesAndRoles=X.prototype.qk;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.zj;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.yj;X.prototype.selectVariantTrack=X.prototype.Nd;X.prototype.selectTextTrack=X.prototype.Zf;X.prototype.getThumbnails=X.prototype.Ri;X.prototype.getAllThumbnails=X.prototype.nk;
X.prototype.getImageTracks=X.prototype.gh;X.prototype.getTextTracks=X.prototype.qc;X.prototype.getVariantTracks=X.prototype.kb;X.prototype.cancelTrickPlay=X.prototype.rd;X.prototype.trickPlay=X.prototype.Nc;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.oi;X.prototype.getPlaybackRate=X.prototype.Ya;X.prototype.isBuffering=X.prototype.xf;X.prototype.getKeyStatuses=X.prototype.nf;X.prototype.getActiveSessionsMetadata=X.prototype.dh;X.prototype.getExpiration=X.prototype.be;
X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ul;X.prototype.goToLive=X.prototype.ll;X.prototype.seekRange=X.prototype.xa;X.prototype.isVideoOnly=X.prototype.wh;X.prototype.isAudioOnly=X.prototype.zd;X.prototype.isInProgress=X.prototype.Zc;X.prototype.isLive=X.prototype.T;X.prototype.getQueueManager=X.prototype.kh;X.prototype.getAdManager=X.prototype.mf;X.prototype.getAssetUri=X.prototype.xd;
X.prototype.getNetworkingEngine=X.prototype.Hb;X.prototype.getMediaElement=X.prototype.Qk;X.prototype.getManifestType=X.prototype.ih;X.prototype.getLoadMode=X.prototype.Jk;X.prototype.resetConfiguration=X.prototype.sj;X.prototype.getBufferFullness=X.prototype.Ni;X.prototype.getNonDefaultConfiguration=X.prototype.Qi;X.prototype.getConfigurationForLowLatency=X.prototype.zk;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.jk;
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Ul;X.prototype.destroyAllPreloads=X.prototype.Ng;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Ji;X.prototype.unloadAndSavePreload=X.prototype.nm;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.rm;X.prototype.unload=X.prototype.kc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.wi;X.prototype.attach=X.prototype.$b;
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return F(k,ki(),3);case 3:b=k.h;case 2:return c=Di(),d=Ak(),e=Rb(),F(k,e.mc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=gq,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};X.isBrowserSupported=hq;X.setQueueManagerFactory=function(a){Zp=a};X.setAdManagerFactory=function(a){Yp=a};X.registerSupportPlugin=fq;X.prototype.destroy=X.prototype.destroy;
var eq=0,Up=1,Iq=2,Lq=3;X.LoadMode={DESTROYED:eq,NOT_LOADED:Up,MEDIA_SOURCE:Iq,SRC_EQUALS:Lq};X.version="v4.15.0";var yr=["4","15"];Vc=new function(a){this.g=a;this.i=Wc;this.h=Xc}(new Tc(Number(yr[0]),Number(yr[1])));var gq=new Map,Yp=null,Zp=null;function zr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function Ar(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Br(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 Oc;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=Br.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 0<=this.g.getSkipTimeOffset()};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 0==this.h.getVolume()};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 null==a?1:a.getTotalAds()};
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?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 null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Br);Br.prototype.release=Br.prototype.release;Br.prototype.getPodIndex=Br.prototype.getPodIndex;
Br.prototype.getTimeOffset=Br.prototype.getTimeOffset;Br.prototype.getMediaUrl=Br.prototype.getMediaUrl;Br.prototype.getAdvertiserName=Br.prototype.getAdvertiserName;Br.prototype.getCreativeAdId=Br.prototype.getCreativeAdId;Br.prototype.getAdId=Br.prototype.getAdId;Br.prototype.getVastAdId=Br.prototype.getVastAdId;Br.prototype.getVastMediaWidth=Br.prototype.getVastMediaWidth;Br.prototype.getVastMediaHeight=Br.prototype.getVastMediaHeight;Br.prototype.getVastMediaBitrate=Br.prototype.getVastMediaBitrate;
Br.prototype.getDescription=Br.prototype.getDescription;Br.prototype.getTitle=Br.prototype.getTitle;Br.prototype.getPositionInSequence=Br.prototype.getPositionInSequence;Br.prototype.getSequenceLength=Br.prototype.getSequenceLength;Br.prototype.setMuted=Br.prototype.setMuted;Br.prototype.resize=Br.prototype.resize;Br.prototype.isLinear=Br.prototype.isLinear;Br.prototype.isMuted=Br.prototype.isMuted;Br.prototype.setVolume=Br.prototype.setVolume;Br.prototype.getVolume=Br.prototype.getVolume;
Br.prototype.play=Br.prototype.play;Br.prototype.pause=Br.prototype.pause;Br.prototype.skip=Br.prototype.skip;Br.prototype.canSkipNow=Br.prototype.canSkipNow;Br.prototype.getTimeUntilSkippable=Br.prototype.getTimeUntilSkippable;Br.prototype.isSkippable=Br.prototype.isSkippable;Br.prototype.isPaused=Br.prototype.isPaused;Br.prototype.getRemainingTime=Br.prototype.getRemainingTime;Br.prototype.getMinSuggestedDuration=Br.prototype.getMinSuggestedDuration;Br.prototype.getDuration=Br.prototype.getDuration;
Br.prototype.isUsingAnotherMediaElement=Br.prototype.isUsingAnotherMediaElement;Br.prototype.hasCustomClick=Br.prototype.hasCustomClick;Br.prototype.isClientRendering=Br.prototype.isClientRendering;Br.prototype.needsSkipUI=Br.prototype.needsSkipUI;function Cr(){}
function Dr(a,b){var c=[];a=u(Od(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Sd(d.value,"InLine"))if(d=Sd(d,"Creatives")){d=u(Od(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Sd(e,"Linear");f&&Er(c,b,f);if(e=Sd(e,"NonLinearAds")){e=Od(e,"NonLinear");e=u(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Sd(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Sd(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=Qd(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+
encodeURIComponent(l));var m=Vd(k,"width",ae)||Vd(k,"expandedWidth",ae),n=Vd(k,"height",ae)||Vd(k,"expandedHeight",ae);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=Cd(k));k=0;null!=h&&(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:q,once:!0,pre:null==h,post:Infinity==h,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})}}}}}}return c}
function Er(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=Cd(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=Sd(c,"MediaFiles")){var f=Od(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=u(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=Qd(f);if(g){a.push({id:null,groupId:null,startTime:d,
endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}S("shaka.ads.Utils",Cr);Cr.ADS_LOADED="ads-loaded";Cr.AD_STARTED="ad-started";Cr.AD_FIRST_QUARTILE="ad-first-quartile";Cr.AD_MIDPOINT="ad-midpoint";Cr.AD_THIRD_QUARTILE="ad-third-quartile";Cr.AD_COMPLETE="ad-complete";
Cr.AD_STOPPED="ad-stopped";Cr.AD_SKIPPED="ad-skipped";Cr.AD_VOLUME_CHANGED="ad-volume-changed";Cr.AD_MUTED="ad-muted";Cr.AD_PAUSED="ad-paused";Cr.AD_RESUMED="ad-resumed";Cr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Cr.CUEPOINTS_CHANGED="ad-cue-points-changed";Cr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Cr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Cr.AD_CLICKED="ad-clicked";Cr.AD_PROGRESS="ad-progress";Cr.AD_BUFFERING="ad-buffering";Cr.AD_IMPRESSION="ad-impression";
Cr.AD_DURATION_CHANGED="ad-duration-changed";Cr.AD_CLOSED="ad-closed";Cr.AD_LOADED="ad-loaded";Cr.ALL_ADS_COMPLETED="all-ads-completed";Cr.AD_LINEAR_CHANGED="ad-linear-changed";Cr.AD_METADATA="ad-metadata";Cr.AD_RECOVERABLE_ERROR="ad-recoverable-error";Cr.AD_ERROR="ad-error";Cr.AD_BREAK_READY="ad-break-ready";Cr.AD_INTERACTION="ad-interaction";Cr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Cr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Cr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Fr(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.F=!1;this.B=this.s=null;this.G=NaN;this.l=e;this.j=null;this.h=new Oc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.D=new google.ima.AdDisplayContainer(this.u,this.i);this.D.initialize();this.m=new google.ima.AdsLoader(this.D);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.15.0");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Gr(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Hr(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}Fr.prototype.configure=function(a){this.s=a};Fr.prototype.stop=function(){this.g&&this.g.stop();this.u&&Oj(this.u)};
Fr.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.D.destroy()};function Hr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Ir(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function Gr(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);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.C);a.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Jr(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.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,
a.i.offsetHeight)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.qa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Ir(a,null)}}
function Jr(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Hr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Kr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Kr(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){Ir(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Ir(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 Kr(a,b){var c=b.getAd();c?(a.j=new Br(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.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))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function Ir(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Lr(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.s=d;this.m=e;this.u=f;this.C=b.overlay}p=Lr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return this.u};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.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h};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.h&&0==this.getTimeUntilSkippable()};
p.skip=function(){this.canSkipNow()&&this.B()};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 null==this.C};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.s};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.i.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.i.uri};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};
S("shaka.ads.InterstitialAd",Lr);Lr.prototype.release=Lr.prototype.release;Lr.prototype.getPodIndex=Lr.prototype.getPodIndex;Lr.prototype.getTimeOffset=Lr.prototype.getTimeOffset;Lr.prototype.getMediaUrl=Lr.prototype.getMediaUrl;Lr.prototype.getAdvertiserName=Lr.prototype.getAdvertiserName;Lr.prototype.getCreativeAdId=Lr.prototype.getCreativeAdId;Lr.prototype.getAdId=Lr.prototype.getAdId;Lr.prototype.getVastAdId=Lr.prototype.getVastAdId;Lr.prototype.getVastMediaWidth=Lr.prototype.getVastMediaWidth;
Lr.prototype.getVastMediaHeight=Lr.prototype.getVastMediaHeight;Lr.prototype.getVastMediaBitrate=Lr.prototype.getVastMediaBitrate;Lr.prototype.getDescription=Lr.prototype.getDescription;Lr.prototype.getTitle=Lr.prototype.getTitle;Lr.prototype.getPositionInSequence=Lr.prototype.getPositionInSequence;Lr.prototype.getSequenceLength=Lr.prototype.getSequenceLength;Lr.prototype.setMuted=Lr.prototype.setMuted;Lr.prototype.resize=Lr.prototype.resize;Lr.prototype.isLinear=Lr.prototype.isLinear;
Lr.prototype.isMuted=Lr.prototype.isMuted;Lr.prototype.setVolume=Lr.prototype.setVolume;Lr.prototype.getVolume=Lr.prototype.getVolume;Lr.prototype.play=Lr.prototype.play;Lr.prototype.pause=Lr.prototype.pause;Lr.prototype.skip=Lr.prototype.skip;Lr.prototype.canSkipNow=Lr.prototype.canSkipNow;Lr.prototype.getTimeUntilSkippable=Lr.prototype.getTimeUntilSkippable;Lr.prototype.isSkippable=Lr.prototype.isSkippable;Lr.prototype.isPaused=Lr.prototype.isPaused;Lr.prototype.getRemainingTime=Lr.prototype.getRemainingTime;
Lr.prototype.getMinSuggestedDuration=Lr.prototype.getMinSuggestedDuration;Lr.prototype.getDuration=Lr.prototype.getDuration;Lr.prototype.isUsingAnotherMediaElement=Lr.prototype.isUsingAnotherMediaElement;Lr.prototype.hasCustomClick=Lr.prototype.hasCustomClick;Lr.prototype.isClientRendering=Lr.prototype.isClientRendering;Lr.prototype.needsSkipUI=Lr.prototype.needsSkipUI;function Mr(a,b,c){this.g=a;this.j=b;this.h=c;this.i=null==a.overlay}p=Mr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};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 0};p.getPodIndex=function(){return 0};p.release=function(){};S("shaka.ads.InterstitialStaticAd",Mr);Mr.prototype.release=Mr.prototype.release;Mr.prototype.getPodIndex=Mr.prototype.getPodIndex;Mr.prototype.getTimeOffset=Mr.prototype.getTimeOffset;
Mr.prototype.getMediaUrl=Mr.prototype.getMediaUrl;Mr.prototype.getAdvertiserName=Mr.prototype.getAdvertiserName;Mr.prototype.getCreativeAdId=Mr.prototype.getCreativeAdId;Mr.prototype.getAdId=Mr.prototype.getAdId;Mr.prototype.getVastAdId=Mr.prototype.getVastAdId;Mr.prototype.getVastMediaWidth=Mr.prototype.getVastMediaWidth;Mr.prototype.getVastMediaHeight=Mr.prototype.getVastMediaHeight;Mr.prototype.getVastMediaBitrate=Mr.prototype.getVastMediaBitrate;Mr.prototype.getDescription=Mr.prototype.getDescription;
Mr.prototype.getTitle=Mr.prototype.getTitle;Mr.prototype.getPositionInSequence=Mr.prototype.getPositionInSequence;Mr.prototype.getSequenceLength=Mr.prototype.getSequenceLength;Mr.prototype.setMuted=Mr.prototype.setMuted;Mr.prototype.resize=Mr.prototype.resize;Mr.prototype.isLinear=Mr.prototype.isLinear;Mr.prototype.isMuted=Mr.prototype.isMuted;Mr.prototype.setVolume=Mr.prototype.setVolume;Mr.prototype.getVolume=Mr.prototype.getVolume;Mr.prototype.play=Mr.prototype.play;Mr.prototype.pause=Mr.prototype.pause;
Mr.prototype.skip=Mr.prototype.skip;Mr.prototype.canSkipNow=Mr.prototype.canSkipNow;Mr.prototype.getTimeUntilSkippable=Mr.prototype.getTimeUntilSkippable;Mr.prototype.isSkippable=Mr.prototype.isSkippable;Mr.prototype.isPaused=Mr.prototype.isPaused;Mr.prototype.getRemainingTime=Mr.prototype.getRemainingTime;Mr.prototype.getMinSuggestedDuration=Mr.prototype.getMinSuggestedDuration;Mr.prototype.getDuration=Mr.prototype.getDuration;Mr.prototype.isUsingAnotherMediaElement=Mr.prototype.isUsingAnotherMediaElement;
Mr.prototype.hasCustomClick=Mr.prototype.hasCustomClick;Mr.prototype.isClientRendering=Mr.prototype.isClientRendering;Mr.prototype.needsSkipUI=Mr.prototype.needsSkipUI;function Nr(a,b,c,d){var e=this;this.L=null;this.B=a;this.G=b;this.g=c;this.F=null;this.C=!0;this.h=this.g;this.i=d;this.R=new Set;this.H=new Set;this.D=new Map;this.K=new Map;this.j=new X;Or(this);this.I=new Oc;this.l=new Oc;this.J=!1;this.Z=this.s=this.u=this.m=null;this.$=!1;this.O=-1;this.Y=function(){if(!e.J&&e.m&&!e.G.Da()){e.m=e.g.currentTime;var f=Pr(e);f&&Qr(e,f,1,1,Date.now())}};this.U=function(){if(!(e.J||e.m||e.G.Da())){e.m=e.g.currentTime;var f=Pr(e,!0);f&&Qr(e,f,1,1,Date.now())}};this.ea=
function(){if(!e.J&&e.m&&!e.G.Da()){var f=e.g.currentTime;e.u&&!e.u.pre&&!e.u.post&&f<(e.u.endTime||e.u.startTime)&&(e.u=null)}};this.P=new yf(this.Y);this.N=new yf(function(){var f,g,h,k,l,m,n,q,r,t,w;return Q(function(v){switch(v.g){case 1:if(!e.H.size||null==e.m){v.A(0);break}f=e.G.m;if(f==eq||f==Up)return v.return();g=!1;h=Array.from(e.H);k=e.G.xa();l=u(h);m=l.next();case 3:if(m.done){v.A(5);break}n=m.value;if(n==e.u){v.A(4);break}q=n.endTime||n.startTime;if(!(1<=k.start-q)){r=n.startTime-e.m;
0<r&&10>=r&&(!e.D.has(n)&&Rr(n)&&e.D.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),Sr(e,n));v.A(4);break}if(!e.D.has(n)){v.A(7);break}return F(v,e.D.get(n),8);case 8:(t=v.h)&&t.destroy(),e.D.delete(n);case 7:Tr(e,n),w=JSON.stringify(n),e.R.has(w)&&e.R.delete(w),e.H.delete(n),Ur(e),n.overlay||(g=!0);case 4:m=l.next();v.A(3);break;case 5:g&&Vr(e),H(v)}})})}p=Nr.prototype;p.configure=function(a){this.L=a;Wr(this)};
function Xr(a){if(!a.$&&a.H.size){a.I.o(a.g,"playing",a.U);a.I.o(a.g,"timeupdate",a.U);a.I.o(a.g,"seeked",a.ea);a.I.o(a.g,"ended",a.Y);if("requestVideoFrameCallback"in a.g&&!Yr()){var b=a.g,c=function(){-1!=a.O&&(a.Y(),-1!=a.O&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.ya(.025);a.N&&a.N.ya(1);a.$=!0}}
function Ur(a){a.$&&!a.H.size&&(a.I.Ca(a.g,"playing",a.U),a.I.Ca(a.g,"timeupdate",a.U),a.I.Ca(a.g,"seeked",a.ea),a.I.Ca(a.g,"ended",a.Y),-1!=a.O&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.N&&a.N.stop(),a.$=!1)}
function Wr(a){if(a.B&&a.L&&!a.J){var b=a.L.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.C==b&&(a.C=!b,a.C?(a.h=a.g,a.F&&(a.F.parentElement&&a.B.removeChild(a.F),a.F=null)):(a.F||(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.F=b),a.h=a.F))}}
p.stop=function(){this.l&&this.l.Sa();this.R.clear();this.H.clear();this.j.Ng();if(this.D.size){var a=Array.from(this.D.values());a=u(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.D.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=u(a),b=a.next();!b.done;b=a.next())Tr(this,b.value);this.K.clear();this.j.detach();this.J=!1;this.u=this.m=null;this.C=!0;this.h=this.g;this.F=null;Zr(this);Ur(this);this.B&&Oj(this.B);this.s&&(this.s.stop(),this.s=
null)};p.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.P&&(this.P.stop(),this.P=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};p.Rb=function(){return this.j};function $r(a,b){var c;Q(function(d){if(1==d.g)return Or(a),F(d,as(a,b),2);c=d.h;c.length?bs(a,c):ab("Unsupported HLS interstitial",b);H(d)})}
function cs(a,b){var c=Sd(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=Vd(c,"z",ae);if(d&&0!=g){var h=null,k=Sd(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=Qd(k)}k=1920;l=1080;var m=Sd(c,"Viewport");if(m){k=Vd(m,"x",ae);if(null==k)return;l=Vd(m,"y",ae);if(null==l)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=Sd(c,"Overlay");if(m&&q){var r=Sd(q,"TopLeft"),t=Sd(q,"Size");if(r&&
t){q=Vd(r,"x",ae);if(null==q)return;r=Vd(r,"y",ae);if(null==r)return;var w=Vd(t,"x",ae);if(null==w)return;t=Vd(t,"y",ae);if(null==t)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=w;n.size.y=t}}q=null;c=Sd(c,"Squeeze");if(m&&c&&(t=Sd(c,"TopLeft"),c=Sd(c,"Size"),t&&c)){m=Vd(t,"x",ae);if(null==m)return;q=Vd(t,"y",ae);if(null==q)return;t=Vd(c,"x",ae);if(null==t)return;c=Vd(c,"y",ae);if(null==c)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:t,y:c}}}bs(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:-1==g,currentVideo:q,background:h}])}}
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return c={type:12},F(n,ds(b,a,c),2);case 2:d=n.h;e=Gd(d,"VAST,vmap:VMAP");if(!e)throw new V(2,10,10007);f=[];if("VAST"==e.tagName){f=Dr(e,b.m);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var q=[],r=u(Od(e,"vmap:AdBreak")),t=r.next();!t.done;t=r.next()){var w=t.value,v=w.attributes.timeOffset;v&&(t=null,"start"==v?t=0:"end"==v?t=Infinity:t=Cd(v),(w=Sd(w,"vmap:AdSource"))&&(w=Sd(w,"vmap:AdTagURI"))&&
(w=Pd(w))&&q.push({time:t,uri:w}))}g=u(q);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return F(n,ds(b,k.uri,c),8);case 8:l=n.h;m=Gd(l,"VAST");if(!m)throw new V(2,10,10007);f.push.apply(f,x(Dr(m,k.time)));h=g.next();n.A(5);break;case 3:bs(b,f),H(n)}})};
function bs(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=u(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){ab("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}ta(m,6);g=a.j.Hb();return F(m,to(f.uri,g,a.G.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;wa(m,5);break;case 6:xa(m);case 5:h=f.id||JSON.stringify(f);if(a.R.has(h)){m.A(3);break}f.loop&&!f.overlay&&ab("Loop is only supported in overlay interstitials",f);
f.overlay||(c=!0);a.R.add(h);a.H.add(f);k=!1;f.pre&&null==a.m?k=!0:0!=f.startTime||f.canJump?null!=a.m&&(l=f.startTime-a.m,0<l&&10>=l&&(k=!0)):k=!0;k&&(!a.D.has(f)&&Rr(f)&&a.D.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Sr(a,f));case 3:e=d.next();m.A(2);break;case 4:c&&Vr(a),Xr(a),H(m)}})}
function Pr(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.H.size&&null!=a.m){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=u(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.m-Math.round(1E3*h.startTime)/1E3,m=1;a.L.allowStartInMiddleOfInterstitial&&
h.endTime&&Infinity!=h.endTime&&(m=h.endTime-h.startTime);0<l&&(l<=m||!h.canJump)&&(k=null==c&&a.u&&!a.u.pre&&!a.u.post&&a.u.startTime>=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001<Math.round(1E3*h.startTime)/1E3-Math.round(1E3*e.startTime)/1E3&&(e=h,d=0),d++)}}return e}
function Qr(a,b,c,d,e,f){f=void 0===f?0:f;a.u=b;Wr(a);!a.h.parentElement&&a.B&&a.B.appendChild(a.h);1==d&&1==c&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:.001>Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),Ur(a),b.overlay||Vr(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?es(a,b,c,d,f):ab("Unsupported interstitial",b):a.C&&b.overlay?ab("Unsupported interstitial",b):fs(a,b,c,d,e,f)}
function es(a,b,c,d,e){function f(){a.s&&(a.s.stop(),a.s=null);a.B.removeChild(k);Zr(a,b);a.i(new U("ad-stopped"));a.l.Sa();var q=Pr(a,b.pre,d-e);q?Qr(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";gs(a,b);a.i(new U("ad-started",(new Map).set("ad",new Mr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new U("ad-error",(new Map).set("originalEvent",
q)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(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||"iframe"!=h||(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.B.appendChild(k);var n=Date.now();a.s&&a.s.stop();a.s=new yf(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new U("ad-complete")),
f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new U("ad-complete")),f()):a.g.currentTime<b.startTime&&(a.i(new U("ad-skipped")),f())});b.playoutLimit&&!b.endTime?a.s.X(b.playoutLimit):b.endTime&&a.s.ya(.025);a.l.o(a.g,"seeked",function(){var q=a.g.currentTime;if(q<b.startTime||b.endTime&&q>b.endTime)a.s&&a.s.stop(),a.i(new U("ad-skipped")),f()})}
function fs(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I;Q(function(K){switch(K.g){case 1:g=Date.now();a.J=!0;if(!a.C||1!=d){K.A(2);break}a.i(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new Hg;k=function(J){return Q(function(L){if(1==L.g)return"detach"!=J.state?L.A(0):Yr()?F(L,new Promise(function(M){return(new yf(M)).X(.1)}),3):L.A(3);h.resolve();a.l.Ca(a.G,"onstatechange",k);H(L)})};a.l.o(a.G,"onstatechange",k);return F(K,h,2);case 2:return gs(a,b),a.C||
(a.h.style.display="",b.overlay?(a.h.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.h.style.height=n.y/l.y*100+"%",a.h.style.left=m.x/l.x*100+"%",a.h.style.top=m.y/l.y*100+"%",a.h.style.width=n.x/l.x*100+"%"):(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(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%")),q=!1,r=function(){if(!a.C&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&
Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var J=Date.now();a.g.currentTime+=(J-e)/1E3;e=J}},t=function(J){var L,M;return Q(function(O){if(1==O.g){r();L=Pr(a,b.pre,d-f);if(J&&b.groupId)for(;L&&L.groupId==b.groupId;)d++,L=Pr(a,b.pre,d-f);a.s&&(!b.groupId||L&&L.groupId!=b.groupId)&&(a.s.stop(),a.s=null);Zr(a,b);if(L&&!L.overlay)return O.A(2);b.post&&(a.m=null,a.u=null);return a.C?F(O,a.j.detach(),4):F(O,a.j.kc(),4)}2!=O.g&&(a.C&&(M=b.resumeOffset,null==M&&(M=b.timelineRange&&
b.endTime&&Infinity!=b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.i(new U("ad-content-resume-requested",(new Map).set("offset",M)))),a.i(new U("ad-stopped")),a.l.Sa(),a.J=!1,a.C?Vr(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));Wr(a);L&&(a.i(new U("ad-stopped")),a.l.Sa(),Qr(a,L,c,++d,e,f));H(O)})},w=function(J){return Q(function(L){if(q)return L.return();q=!0;a.i(new U("ad-error",(new Map).set("originalEvent",J)));return F(L,t(!1),0)})},v=function(){return Q(function(J){if(1==J.g){if(q)return J.return();
q=!0;return F(J,t(!1),2)}a.i(new U("ad-complete"));H(J)})},a.Z=function(){return Q(function(J){if(q)return J.return();q=!0;a.i(new U("ad-skipped"));return F(J,t(!0),0)})},y=new Lr(a.h,b,a.Z,c,d,!a.C),a.C||(y.setMuted(a.g.muted),y.setVolume(a.g.volume)),a.i(new U("ad-started",(new Map).set("ad",y))),(z=y.canSkipNow())&&a.i(new U("ad-skip-state-changed")),a.l.qa(a.j,"error",w),a.l.o(a.h,"timeupdate",function(){if(a.h.duration){var J=y.canSkipNow();z!=J&&0<y.getRemainingTime()&&0<y.getDuration()&&a.i(new U("ad-skip-state-changed"));
z=J}}),a.l.qa(a.j,"firstquartile",function(){r();a.i(new U("ad-first-quartile"))}),a.l.qa(a.j,"midpoint",function(){r();a.i(new U("ad-midpoint"))}),a.l.qa(a.j,"thirdquartile",function(){r();a.i(new U("ad-third-quartile"))}),a.l.qa(a.j,"complete",v),a.l.o(a.h,"play",function(){a.i(new U("ad-resumed"))}),a.l.o(a.h,"pause",function(){var J=a.j.getConfiguration();a.h.currentTime>=J.playRangeEnd?v():a.i(new U("ad-paused"))}),a.l.o(a.h,"volumechange",function(){a.h.muted?a.i(new U("ad-muted")):a.i(new U("ad-volume-changed"))}),
ta(K,4),Or(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0<A&&a.j.configure("playRangeEnd",A)),b.playoutLimit&&!a.s&&(a.s=(new yf(function(){a.Z()})).X(b.playoutLimit),a.j.configure("playRangeEnd",b.playoutLimit)),F(K,a.j.$b(a.h),6);case 6:return B=null,a.L.allowStartInMiddleOfInterstitial&&null!=a.m&&(D=a.m-b.startTime,.25<Math.abs(D)&&(B=D)),a.D.has(b)?F(K,a.D.get(b),10):F(K,a.j.load(b.uri,B,b.mimeType||void 0),8);case 10:return G=K.h,a.D.delete(b),
G?F(K,a.j.load(G),8):F(K,a.j.load(b.uri,B,b.mimeType||void 0),8);case 8:a.h.play();C=(Date.now()-g)/1E3;a.i(new U("ads-loaded",(new Map).set("loadTime",C)));a.C&&a.g.play();b.overlay&&(E=function(){var J=a.g.currentTime-b.startTime;.1<Math.abs(J-a.h.currentTime)&&(a.h.currentTime=J)},a.l.qa(a.h,"playing",E),a.l.o(a.g,"seeking",E),a.l.o(a.g,"seeked",function(){var J=a.g.currentTime;(J<b.startTime||b.endTime&&J>b.endTime)&&a.Z()}));wa(K,0);break;case 4:I=xa(K);if(!a.J)return K.return();w(I);H(K)}})}
function gs(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(null!=b.currentVideo){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;0<f&&100>=f&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;0<f&&100>=f&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;1>f&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;1>f&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.B&&
(a.B.style.pointerEvents="none",b.background&&(a.B.style.background=b.background));a.F&&(a.F.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Zr(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&null==b.currentVideo||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.B&&(a.B.style.pointerEvents="",!b||b.background)&&(a.B.style.background="");a.F&&(a.F.style.background="")}
function as(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za;return Q(function(ia){switch(ia.g){case 1:c=[];if(!b)return ia.return(c);d=b.values.find(function(Aa){return"X-ASSET-URI"==Aa.key});e=b.values.find(function(Aa){return"X-ASSET-LIST"==Aa.key});if(!d&&!e)return ia.return(c);f=null;if(g=b.values.find(function(Aa){return"ID"==Aa.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==
typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(Aa){return"X-RESTRICT"==Aa.key});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(t=b.values.find(function(Aa){return"X-ENABLE-SKIP-AFTER"==Aa.key}))w=t.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(y=b.values.find(function(Aa){return"X-ENABLE-SKIP-FOR"==Aa.key}))z=y.data,v=parseFloat(z),isNaN(r)&&(v=null);A=null;if(B=b.values.find(function(Aa){return"X-RESUME-OFFSET"==
Aa.key}))D=B.data,A=parseFloat(D),isNaN(A)&&(A=null);G=null;if(C=b.values.find(function(Aa){return"X-PLAYOUT-LIMIT"==Aa.key}))E=C.data,G=parseFloat(E),isNaN(G)&&(G=null);J=K=I=!1;if(L=b.values.find(function(Aa){return"CUE"==Aa.key}))M=L.data,I=M.includes("ONCE"),K=M.includes("PRE"),J=M.includes("POST");O=!1;(N=b.values.find(function(Aa){return"X-TIMELINE-OCCUPIES"==Aa.key}))?(P=N.data,O=P.includes("RANGE")):!B&&a.G.T()&&(O=!K&&!J);if(d){R=d.data;if(!R)return ia.return(c);c.push({id:f,groupId:null,
startTime:h,endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:G,once:I,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});ia.A(2);break}if(!e){ia.A(2);break}T=e.data;if(!T)return ia.return(c);ta(ia,4);ca={type:11};return F(ia,ds(a,T,ca),6);case 6:Y=ia.h;Ma=Wb(Y);Na=JSON.parse(Ma);if(Ea=Na["SKIP-CONTROL"])va=Ea["ENABLE-SKIP-AFTER"],"number"==typeof va&&(r=parseFloat(va),isNaN(va)&&(r=m?
0:null)),Ka=Ea["ENABLE-SKIP-FOR"],"number"==typeof Ka&&(v=parseFloat(Ka),isNaN(Ka)&&(v=null));for(Pa=0;Pa<Na.ASSETS.length;Pa++)za=Na.ASSETS[Pa],za.URI&&c.push({id:f+"_shaka_asset_"+Pa,groupId:f,startTime:h,endTime:k,uri:za.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:G,once:I,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});wa(ia,2);break;case 4:xa(ia);case 2:return ia.return(c)}})}
function Vr(a){for(var b=[],c=u(a.H),d=c.next(),e={};!d.done;e={yc:void 0},d=c.next())d=d.value,d.overlay||(e.yc={start:d.startTime,end:null},d.pre?(e.yc.start=0,e.yc.end=null):d.post?(e.yc.start=-1,e.yc.end=null):d.timelineRange&&(e.yc.end=d.endTime),b.find(function(f){return function(g){return f.yc.start==g.start&&f.yc.end==g.end}}(e))||b.push(e.yc));a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
function Or(a){a.j.configure(a.G.Qi());a.j.configure("ads.disableHLSInterstitial",!0);a.j.configure("ads.disableDASHInterstitial",!0);a.j.configure("playRangeEnd",Infinity);Vg(a.G.Hb(),a.j.Hb())}function ds(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=Wg([b],Fg()),e=a.G.Hb().request(7,d,c),F(g,e.promise,2);f=g.h;return g.return(f.data)})}function Rr(a){return(a=a.mimeType)?!a.startsWith("image/")&&"text/html"!==a:!0}
function Yr(){var a=Rb().Ia();return"TV"==a||"CONSOLE"==a||"CAST"==a?!0:!1}function Sr(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.startsWith("image/")&&d.push(c(b.uri));a.K.set(b,d)}}
function Tr(a,b){if(a.K.has(b)){var c=a.K.get(b);c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.K.delete(b)}};function hs(a,b,c,d,e){this.h=a;this.j=Cd(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.s=d;this.m=!1}p=hs.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"number"==typeof this.j?!0:!1};p.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};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.s};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",hs);hs.prototype.release=hs.prototype.release;hs.prototype.getPodIndex=hs.prototype.getPodIndex;
hs.prototype.getTimeOffset=hs.prototype.getTimeOffset;hs.prototype.getMediaUrl=hs.prototype.getMediaUrl;hs.prototype.getAdvertiserName=hs.prototype.getAdvertiserName;hs.prototype.getCreativeAdId=hs.prototype.getCreativeAdId;hs.prototype.getAdId=hs.prototype.getAdId;hs.prototype.getVastAdId=hs.prototype.getVastAdId;hs.prototype.getVastMediaWidth=hs.prototype.getVastMediaWidth;hs.prototype.getVastMediaHeight=hs.prototype.getVastMediaHeight;hs.prototype.getVastMediaBitrate=hs.prototype.getVastMediaBitrate;
hs.prototype.getDescription=hs.prototype.getDescription;hs.prototype.getTitle=hs.prototype.getTitle;hs.prototype.getPositionInSequence=hs.prototype.getPositionInSequence;hs.prototype.getSequenceLength=hs.prototype.getSequenceLength;hs.prototype.setMuted=hs.prototype.setMuted;hs.prototype.resize=hs.prototype.resize;hs.prototype.isLinear=hs.prototype.isLinear;hs.prototype.isMuted=hs.prototype.isMuted;hs.prototype.setVolume=hs.prototype.setVolume;hs.prototype.getVolume=hs.prototype.getVolume;
hs.prototype.play=hs.prototype.play;hs.prototype.pause=hs.prototype.pause;hs.prototype.skip=hs.prototype.skip;hs.prototype.canSkipNow=hs.prototype.canSkipNow;hs.prototype.getTimeUntilSkippable=hs.prototype.getTimeUntilSkippable;hs.prototype.isSkippable=hs.prototype.isSkippable;hs.prototype.isPaused=hs.prototype.isPaused;hs.prototype.getRemainingTime=hs.prototype.getRemainingTime;hs.prototype.getMinSuggestedDuration=hs.prototype.getMinSuggestedDuration;hs.prototype.getDuration=hs.prototype.getDuration;
hs.prototype.isUsingAnotherMediaElement=hs.prototype.isUsingAnotherMediaElement;hs.prototype.hasCustomClick=hs.prototype.hasCustomClick;hs.prototype.isClientRendering=hs.prototype.isClientRendering;hs.prototype.needsSkipUI=hs.prototype.needsSkipUI;function is(a,b,c,d){this.C=a;this.J=b;this.h=c;this.l=null;this.O=NaN;this.i=d;this.I=!1;this.B=null;this.j=[];this.L=[];this.K=this.D=this.g=null;this.F=new Map;this.m=[];this.u=[];this.G="";this.N=!0;this.H="";this.s=new Oc}is.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Ca(b.target,b.type,b.listener);js(this);this.m=[];this.u=[];this.G="";this.N=!0;this.H="";this.B=null;this.j=[];this.L=[];this.F.clear()};
is.prototype.release=function(){this.stop();this.s&&this.s.release()};is.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(ks(this,this.G,this.N),this.N=!1)};is.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(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 ls(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;Q(function(w){if(1==w.g)return d={type:7},e=Wg([b],Fg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=$b(f)),g=a.J.request(7,e,d),ta(w,2),F(w,g.promise,4);if(2!=w.g){h=w.h;k=Wb(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new qb(b),n=new qb(l.trackingUrl),a.G=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.O,a.i(new U("ads-loaded",(new Map).set("loadTime",r))),t=new qb(l.manifestUrl),a.l.resolve(m.resolve(t).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return wa(w,0)}xa(w);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,w.return();a.l.resolve(a.H);a.l=null;H(w)})}
function ks(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z;Q(function(A){if(1==A.g)return d={type:8},e=Wg([b],Fg()),f=a.J.request(7,e,d),ta(A,2),F(A,f.promise,4);if(2!=A.g){g=A.h;h=[];k=Wb(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=u(a.j);for(n=m.next();!n.done;n=m.next())for(q=n.value,r=u(q.nonLinearAdsList),t=r.next();!t.done;t=r.next())for(w=t.value,v=u(w.nonLinearAdList),y=v.next();!y.done;y=v.next())z=y.value,ms(a,z);h=a.getCuePoints();
a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",h))),js(a),a.j=[];c&&(a.I||0<h.length)&&ns(a);return wa(A,0)}xa(A);H(A)})}
function ms(a,b){var c,d,e,f,g,h,k,l,m;Q(function(n){if(1==n.g){if(!b.staticResource)return n.return();c=os(b);if(d=a.F.get(c))return n.return();e={type:9};f=Wg([b.staticResource],Fg());g=a.J.request(7,f,e);ta(n,2);a.F.set(c,[]);return F(n,g.promise,4)}if(2!=n.g)return h=n.h,k=Wb(h.data),l=JSON.parse(k),m=l.apps,a.F.set(c,m),wa(n,0);xa(n);a.F.delete(c);H(n)})}
function os(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function ns(a){ps(a);a.I||(qs(a),a.s.o(a.h,"seeked",function(){qs(a)}),a.s.o(a.h,"ended",function(){js(a)}));a.s.o(a.h,"timeupdate",function(){ps(a)})}
function qs(a){var b=a.h.currentTime;if(0!=b&&null==a.B){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(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.L.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}}
function ps(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.D,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),rs(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),rs(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),rs(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&rs(a,"skipStateChanged");0<e&&(0>=d||d>e)&&js(a)}if(!a.g||!a.g.isLinear()){a:for(d=u(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.L.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}js(a);a.K=e;a.g=new hs(g,f+1,e.ads.length,!0,a.h);a.D=g;0===f&&rs(a,"breakStart");ss(a);break}}}if(!a.g)for(d=
u(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.F.get(os(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){js(a);h=a;k=u(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.C.appendChild(m)}a.K=e;a.g=new hs(g,f+1,e.ads.length,!1,a.h);a.D=g;0===f&&rs(a,"breakStart");ss(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.B&&a.B>b&&(a.h.currentTime=a.B),a.B=null)}}}
function js(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.I||a.L.push(a.D.adId);var b=a.g.m;(void 0===b?0:b)?rs(a,"skip"):rs(a,"complete");b=u(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ca(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&rs(a,"breakEnd");a.g=null;a.D=null;a.K=null}}
function ss(a){var b=!1;a.h.paused?b=!0:(rs(a,"impression"),rs(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&rs(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||rs(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(rs(a,"impression"),rs(a,"start"),b=!1):rs(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){rs(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
d.type,d.listener)}
function rs(a,b){var c=a.D.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.K.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=u(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=Wg([e],Fg()),e.method="POST",a.J.request(7,e,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function ts(a,b){this.g=a;this.i=null;this.h=b}p=ts.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 0==this.getTimeUntilSkippable()};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 null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?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 null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",ts);
ts.prototype.release=ts.prototype.release;ts.prototype.getPodIndex=ts.prototype.getPodIndex;ts.prototype.getTimeOffset=ts.prototype.getTimeOffset;ts.prototype.getMediaUrl=ts.prototype.getMediaUrl;ts.prototype.getAdvertiserName=ts.prototype.getAdvertiserName;ts.prototype.getCreativeAdId=ts.prototype.getCreativeAdId;ts.prototype.getAdId=ts.prototype.getAdId;ts.prototype.getVastAdId=ts.prototype.getVastAdId;ts.prototype.getVastMediaWidth=ts.prototype.getVastMediaWidth;
ts.prototype.getVastMediaHeight=ts.prototype.getVastMediaHeight;ts.prototype.getVastMediaBitrate=ts.prototype.getVastMediaBitrate;ts.prototype.getDescription=ts.prototype.getDescription;ts.prototype.getTitle=ts.prototype.getTitle;ts.prototype.getPositionInSequence=ts.prototype.getPositionInSequence;ts.prototype.getSequenceLength=ts.prototype.getSequenceLength;ts.prototype.setMuted=ts.prototype.setMuted;ts.prototype.resize=ts.prototype.resize;ts.prototype.isLinear=ts.prototype.isLinear;
ts.prototype.isMuted=ts.prototype.isMuted;ts.prototype.setVolume=ts.prototype.setVolume;ts.prototype.getVolume=ts.prototype.getVolume;ts.prototype.play=ts.prototype.play;ts.prototype.pause=ts.prototype.pause;ts.prototype.skip=ts.prototype.skip;ts.prototype.canSkipNow=ts.prototype.canSkipNow;ts.prototype.getTimeUntilSkippable=ts.prototype.getTimeUntilSkippable;ts.prototype.isSkippable=ts.prototype.isSkippable;ts.prototype.isPaused=ts.prototype.isPaused;ts.prototype.getRemainingTime=ts.prototype.getRemainingTime;
ts.prototype.getMinSuggestedDuration=ts.prototype.getMinSuggestedDuration;ts.prototype.getDuration=ts.prototype.getDuration;ts.prototype.isUsingAnotherMediaElement=ts.prototype.isUsingAnotherMediaElement;ts.prototype.hasCustomClick=ts.prototype.hasCustomClick;ts.prototype.isClientRendering=ts.prototype.isClientRendering;ts.prototype.needsSkipUI=ts.prototype.needsSkipUI;function us(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.B=this.m=this.s=null;this.C="";this.D=[];this.h=new Oc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vs(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
e.j.resolve(e.C):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 ts(f,e.l);e.B&&(e.m.i=e.B);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=us.prototype;p.configure=function(){};p.stop=function(){this.C="";this.s=null;this.D=[]};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.D};
function vs(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function ws(){jb.call(this);this.h=this.i=this.j=this.g=null;this.m=new zr;this.s=navigator.language;this.l=null}pa(ws,jb);p=ws.prototype;p.setLocale=function(a){this.s=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 Nr(a,b,c,function(e){return xs(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 V(2,10,1E4);this.j&&this.j.release();this.j=new Fr(a,b,this.s,c,function(e){return xs(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);jb.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 U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new zr};p.requestClientSideAds=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new is(a,b,c,function(e){return xs(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new V(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new V(1,10,10004)):(d.l=new Hg,ls(d,a,b),d.H=c||"",d.O=Date.now()/1E3,a=d.l);return a};
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new V(1,10,10005);var b=this.i;b.G=a;b.i(new U("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 V(2,10,10002);this.h&&this.h.release();this.h=new us(a,b,this.s,function(d){return xs(c,d)});this.h.configure(this.l)};
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new V(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.15.0";c=this.h;c.j?a=Promise.reject(new V(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.G=!0),c.j=new Hg,c.g.requestStream(a),c.C=b||"",c.F=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new V(1,10,10003);(a.mpt||a.mpv)&&ab('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.15.0";this.h.g.replaceAdTagParameters(a)};
p.getServerSideCuePoints=function(){Uc("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:Ar(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&&"urn:google:dai:2018"==a.schemeIdUri&&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&&$r(this.g,c))};
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"==c.schemeIdUri,b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=u(c.eventNode.children),m=l.next();!m.done;m=
l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=Vd(m,"maxDuration",ae))&&(g=l/c.timescale);(l=Vd(m,"returnOffset",ae))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&bs(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}])}}else("urn:mpeg:dash:event:2012"==d||"urn:scte:dash:scte214-events"==d)&&c.eventNode&&Sd(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&cs(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new V(1,10,10006);bs(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new V(1,10,10006);return this.g.addAdUrlInterstitial(a)};
p.getInterstitialPlayer=function(){if(!this.g)throw new V(1,10,10006);return this.g.Rb()};function xs(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",ws);ws.prototype.getInterstitialPlayer=ws.prototype.getInterstitialPlayer;ws.prototype.addAdUrlInterstitial=ws.prototype.addAdUrlInterstitial;
ws.prototype.addCustomInterstitial=ws.prototype.addCustomInterstitial;ws.prototype.onDASHInterstitialMetadata=ws.prototype.onDASHInterstitialMetadata;ws.prototype.onHLSInterstitialMetadata=ws.prototype.onHLSInterstitialMetadata;ws.prototype.onCueMetadataChange=ws.prototype.onCueMetadataChange;ws.prototype.onHlsTimedMetadata=ws.prototype.onHlsTimedMetadata;ws.prototype.onDashTimedMetadata=ws.prototype.onDashTimedMetadata;ws.prototype.onManifestUpdated=ws.prototype.onManifestUpdated;
ws.prototype.getStats=ws.prototype.getStats;ws.prototype.getCuePoints=ws.prototype.getCuePoints;ws.prototype.getServerSideCuePoints=ws.prototype.getServerSideCuePoints;ws.prototype.replaceServerSideAdTagParameters=ws.prototype.replaceServerSideAdTagParameters;ws.prototype.requestServerSideStream=ws.prototype.requestServerSideStream;ws.prototype.initServerSide=ws.prototype.initServerSide;ws.prototype.addMediaTailorTrackingUrl=ws.prototype.addMediaTailorTrackingUrl;
ws.prototype.requestMediaTailorStream=ws.prototype.requestMediaTailorStream;ws.prototype.initMediaTailor=ws.prototype.initMediaTailor;ws.prototype.updateClientSideAdsRenderingSettings=ws.prototype.updateClientSideAdsRenderingSettings;ws.prototype.requestClientSideAds=ws.prototype.requestClientSideAds;ws.prototype.onAssetUnload=ws.prototype.onAssetUnload;ws.prototype.release=ws.prototype.release;ws.prototype.initClientSide=ws.prototype.initClientSide;ws.prototype.initInterstitial=ws.prototype.initInterstitial;
ws.prototype.configure=ws.prototype.configure;ws.prototype.setLocale=ws.prototype.setLocale;ws.ADS_LOADED="ads-loaded";ws.AD_STARTED="ad-started";ws.AD_FIRST_QUARTILE="ad-first-quartile";ws.AD_MIDPOINT="ad-midpoint";ws.AD_THIRD_QUARTILE="ad-third-quartile";ws.AD_COMPLETE="ad-complete";ws.AD_STOPPED="ad-stopped";ws.AD_SKIPPED="ad-skipped";ws.AD_VOLUME_CHANGED="ad-volume-changed";ws.AD_MUTED="ad-muted";ws.AD_PAUSED="ad-paused";ws.AD_RESUMED="ad-resumed";ws.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";
ws.CUEPOINTS_CHANGED="ad-cue-points-changed";ws.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";ws.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";ws.AD_CLICKED="ad-clicked";ws.AD_PROGRESS="ad-progress";ws.AD_BUFFERING="ad-buffering";ws.AD_IMPRESSION="ad-impression";ws.AD_DURATION_CHANGED="ad-duration-changed";ws.AD_CLOSED="ad-closed";ws.AD_LOADED="ad-loaded";ws.ALL_ADS_COMPLETED="all-ads-completed";ws.AD_LINEAR_CHANGED="ad-linear-changed";ws.AD_METADATA="ad-metadata";
ws.AD_RECOVERABLE_ERROR="ad-recoverable-error";ws.AD_ERROR="ad-error";ws.AD_BREAK_READY="ad-break-ready";ws.AD_INTERACTION="ad-interaction";ws.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";ws.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";ws.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Yp=function(){return new ws};function ys(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(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=u(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=u(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=u(Hj(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)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
function zs(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=As(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
function As(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var Bs="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Cs="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ds=["loop","playbackRate"],Es=["pause","play"],Fs=(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),Gs=(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),Hs=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Is=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Js=[["isTextTrackVisible","setTextTrackVisibility"]],Ks="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),
Ls="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Ms(a,b,c,d,e,f,g){var h=this;this.G=a;this.J=g;this.l=new yf(b);this.K=c;this.u=!1;this.B=d;this.F=e;this.L=f;this.i=this.m=!1;this.I="";this.s=null;this.C=function(){return Ns(h)};this.D=function(k,l){k=zs(l);switch(k.type){case "event":var m=k.targetName,n=Xa(k.event);h.B(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.u&&(h.K(),h.u=!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 V(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.H=0;this.h=new Map;this.j=null;Os.add(this)}p=Ms.prototype;p.destroy=function(){Os.delete(this);Ps(this);Qs&&Rs(this);this.l&&(this.l.stop(),this.l=null);this.F=this.B=null;this.i=this.m=!1;this.D=this.C=this.j=this.h=this.g=this.s=null;return Promise.resolve()};p.Pa=function(){return this.i};p.Sf=function(){return this.I};
p.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ja();var a=new chrome.cast.SessionRequest(this.G,[],null,this.J,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Os),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Hg;d.u=!0;Ss(d,e)}},function(b){for(var c=u(Os),d=c.next();!d.done;d=c.next())d=d.value,Ts="available"==b,d.l.Ja()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ts&&this.l.X(Us);(a=Qs)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Hg,this.u=!0,Ss(this,a)):Qs=null}else window.__onGCastApiAvailable!==Vs&&(Ws=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Vs)};p.Sh=function(a){this.s=a;this.i&&Xs(this,{type:"appData",appData:this.s})};
p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new V(1,8,8E3);if(!Ts)throw new V(1,8,8001);if(a.i)throw new V(1,8,8002);a.j=new Hg;chrome.cast.requestSession(function(c){return Ss(a,c)},function(c){return Ys(a,c)});return F(b,a.j,0)})};function Zs(a){a.i&&chrome.cast.requestSession(function(b){return Ss(a,b)},function(b){return Ys(a,b)})}p.wd=function(){if(this.i){Ps(this);if(Qs){Rs(this);try{Qs.stop(function(){},function(){})}catch(a){}Qs=null}Ns(this)}};
p.get=function(a,b){var c=this;if("video"==a){if(Es.includes(b))return function(){return c.pj.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(Hs.has(b)&&!this.get("player","isLive")())return function(){};if(Ks.includes(b))return function(){return c.pj.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Ls.includes(b))return function(){return c.Vl.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Fs.has(b)||Gs.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;Xs(this,{type:"set",targetName:a,property:b,value:c})};function Ss(a,b){var c=a.L();Qs=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Ns(a);Xs(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Ys(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 V(2,8,c,b))}
p.pj=function(a,b){Xs(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};p.Vl=function(a,b){var c=Ja.apply(2,arguments),d=new Hg,e=this.H.toString();this.H++;this.h.set(e,d);try{Xs(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Rs(a){var b=Qs;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
function Ns(a){var b=Qs?"connected"==Qs.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};Ps(a)}a.i=b;a.I=b?Qs.receiver.friendlyName:"";a.l.Ja()}function Ps(a){if(a.h)for(var b=u(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 V(1,7,7E3))}}
function Xs(a,b){b=ys(b);var c=Qs;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new V(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.B("player",c),a.wd(),b;}}var Us=.02,Ts=!1,Qs=null,Ws=null,Os=new Set;function Vs(a){Ws?window.__onGCastApiAvailable=Ws:delete window.__onGCastApiAvailable;Ws=null;if(a)for(var b=u(Os),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function $s(a,b,c,d){d=void 0===d?!1:d;jb.call(this);var e=this;this.i=a;this.h=b;this.l=this.s=this.m=this.u=this.j=null;this.H=c;this.G=d;this.D=[];this.C=[];this.B=[];this.F=new Map;this.g=null;window.chrome?(this.g=new Ms(c,function(){return at(e)},function(){return bt(e)},function(f,g){return ct(e,f,g)},function(){return dt(e)},function(){return et(e)},d),ft(this)):(this.j=this.i,this.u=this.h)}pa($s,jb);p=$s.prototype;
p.destroy=function(a){this.g&&(void 0===a?0:a)&&this.g.wd();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.u=this.j=this.i=null;jb.prototype.release.call(this);return Promise.all(a)};p.Fc=function(){return this.j};p.Rb=function(){return this.u};p.Cg=function(){return this.g?this.g.m&&Ts:!1};p.Pa=function(){return this.g?this.g.Pa():!1};p.Sf=function(){return this.g?this.g.Sf():""};
p.cast=function(){var a=this;return Q(function(b){return 1==b.g?a.g?F(b,a.g.cast(),2):b.return():a.h?F(b,a.h.kc(),0):b.return()})};p.Sh=function(a){this.g&&this.g.Sh(a)};p.Nj=function(){this.g&&Zs(this.g)};p.wd=function(){this.g&&this.g.wd()};
p.Di=function(a,b){b=void 0===b?!1:b;var c=this;return Q(function(d){if(1==d.g){if(a==c.H&&b==c.G)return d.return();c.H=a;c.G=b;if(!c.g)return d.return();c.g.wd();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Ms(a,function(){return at(c)},function(){return bt(c)},function(e,f){return ct(c,e,f)},function(){return dt(c)},function(){return et(c)},b);c.g.init();H(d)})};
function ft(a){a.g.init();a.l=new Oc;for(var b=u(Bs),c=b.next();!c.done;c=b.next())a.l.o(a.i,c.value,function(f){a.g.Pa()||(f=Xa(f),a.m.dispatchEvent(f))});for(var d in Ya)a.l.o(a.h,Ya[d],function(f){a.g.Pa()||a.s.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={me:b.me},b.me=e,Object.defineProperty(a.j,b.me,{configurable:!1,enumerable:!0,get:function(f){return function(){return gt(a,f.me)}}(b),set:function(f){return function(g){var h=f.me;a.g.Pa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};ht(a,
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return it(a,f)}})});jt(a);a.m=new jb;a.m.Pe=a.j;a.s=new jb;a.s.Pe=a.u;a.l.o(a.h,"unloading",function(){a.g&&a.g.Pa()||kt(a)})}function jt(a){var b=new Map;ht(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.F.set(c,d):a.F.set(d,c)):b.set(d,c)})}
function ht(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!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=u(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 et(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.xd(),startTime:null,addThumbnailsTrackCalls:a.D,addTextTrackAsyncCalls:a.C,addChaptersTrackCalls:a.B};a.i.pause();for(var c=u(Ds),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=u(Is);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=u(Js);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 at(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}function bt(a){var b=new U(a.j.paused?"pause":"play");a.m.dispatchEvent(b)}
function dt(a){for(var b=u(Is),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.D,f=a.C,g=a.B;kt(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=u(Ds);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=u(e),r=q.next();!r.done;r=q.next()){r=r.value;var t;(t=a.Rb()).Ye.apply(t,x(r))}q=u(f);for(t=q.next();!t.done;t=q.next()){t=t.value;var w;(w=a.Rb()).Td.apply(w,x(t))}w=u(g);for(q=w.next();!q.done;q=w.next()){q=q.value;var v;(v=a.Rb()).Xe.apply(v,x(q))}v=u(Ds);for(w=v.next();!w.done;w=v.next())w=w.value,a.i[w]=n[w];v=u(Js);for(w=v.next();!w.done;w=v.next())q=w.value,w=q[1],q=a.g.get("player",q[0])(),a.h[w](q);
a.h.ze(m);l&&a.h.Rh(l.language,l.roles,l.forced);a.i.autoplay=k;h&&a.i.play()}},function(q){q=(new Map).set("detail",q);q=new U("error",q);a.h.dispatchEvent(q)})}
function gt(a,b){if("addEventListener"==b)return function(d,e,f){return a.m.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.m.removeEventListener(d,e,f)};if(a.g.Pa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Pa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
function it(a,b,c){c=void 0===c?!1:c;a.F.has(b)&&(b=a.F.get(b));if("addEventListener"==b)return function(d,e,f){return a.s.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.s.removeEventListener(d,e,f)};if("getMediaElement"==b)return function(){return a.j};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Hb()};if("getDrmEngine"==b)return function(){return a.h.D};if("getAdManager"==
b)return function(){return a.h.mf()};if("getQueueManager"==b)return function(){return a.h.kh()};if("setVideoContainer"==b)return function(d){return a.h.Yh(d)};if(!c){if("addThumbnailsTrack"==b)return function(){var d=Ja.apply(0,arguments);a.D.push(d);return it(a,b,!0).apply(null,x(d))};if("addTextTrackAsync"==b)return function(){var d=Ja.apply(0,arguments);a.C.push(d);return it(a,b,!0).apply(null,x(d))};if("addChaptersTrack"==b)return function(){var d=Ja.apply(0,arguments);a.B.push(d);return it(a,
b,!0).apply(null,x(d))}}if(a.g.Pa()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()};if("getChapters"==b)return function(){ab(b+"() does not work while casting!");return[]}}return a.g.Pa()&&0==Object.keys(a.g.g.video).length&&(Fs.has(b)||Gs.has(b))||!a.g.Pa()?a.h[b].bind(a.h):a.g.get("player",b)}
function ct(a,b,c){a.g.Pa()&&("video"==b?a.m.dispatchEvent(c):"player"==b&&("unloading"==c.type&&kt(a),a.s.dispatchEvent(c)))}function kt(a){a.D=[];a.C=[];a.B=[]}S("shaka.cast.CastProxy",$s);$s.prototype.changeReceiverId=$s.prototype.Di;$s.prototype.forceDisconnect=$s.prototype.wd;$s.prototype.suggestDisconnect=$s.prototype.Nj;$s.prototype.setAppData=$s.prototype.Sh;$s.prototype.cast=$s.prototype.cast;$s.prototype.receiverName=$s.prototype.Sf;$s.prototype.isCasting=$s.prototype.Pa;
$s.prototype.canCast=$s.prototype.Cg;$s.prototype.getPlayer=$s.prototype.Rb;$s.prototype.getVideo=$s.prototype.Fc;$s.prototype.destroy=$s.prototype.destroy;function lt(a,b,c,d){jb.call(this);var e=this;this.h=a;this.g=b;this.j=new Oc;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.s=!0;this.m=0;this.C=!1;this.B=!0;this.u=this.l=null;this.D=new yf(function(){mt(e)});nt(this)}pa(lt,jb);p=lt.prototype;p.isConnected=function(){return this.G};p.vl=function(){return this.s};p.fm=function(a){this.i=a};p.ik=function(){this.i=null};
p.gm=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.em=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.dm=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 Q(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.g&&(b.push(a.g.destroy()),a.g=null),a.D&&(a.D.stop(),a.D=null),a.h=null,a.H=null,a.F=null,a.G=!1,a.s=!0,a.l=null,a.u=null,jb.prototype.release.call(a),F(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
function nt(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ot(a)};b.onSenderDisconnected=function(){return ot(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&pt(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);pt(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return qt(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return rt(a,e)};b.start();b=u(Bs);for(var c=b.next();!c.done;c=b.next())a.j.o(a.h,c.value,function(e){return st(a,"video",e)});for(var d in Ya)a.j.o(a.g,Ya[d],function(e){return st(a,"player",e)});a.j.o(a.h,"loadeddata",function(){a.C=!0});a.j.o(a.g,"loading",function(){a.s=!1;tt(a)});a.j.o(a.h,"playing",function(){a.s=!1;tt(a)});a.j.o(a.h,"pause",function(){tt(a)});a.j.o(a.g,"unloading",function(){a.s=!0;tt(a)});
a.j.o(a.h,"ended",function(){(new yf(function(){a.h&&a.h.ended&&(a.s=!0,tt(a))})).X(ut)})}function ot(a){a.m=0;a.B=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;tt(a)}function tt(a){var b;Q(function(c){if(1==c.g)return F(c,Promise.resolve(),2);if(!a.g)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);vt(a)||wt(a);H(c)})}
function xt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D;Q(function(G){switch(G.g){case 1:for(d in b.player)e=b.player[d],a.g[d](e);a.F(c);f=a.h.autoplay;return b.manifest?(a.h.autoplay=!1,ta(G,5),F(G,a.g.load(b.manifest,b.startTime),7)):F(G,Promise.resolve(),3);case 7:if(b.addThumbnailsTrackCalls)for(g=u(b.addThumbnailsTrackCalls),h=g.next();!h.done;h=g.next())k=h.value,a.g.Ye.apply(a.g,x(k));if(b.addTextTrackAsyncCalls)for(l=u(b.addTextTrackAsyncCalls),m=l.next();!m.done;m=l.next())n=m.value,
a.g.Td.apply(a.g,x(n));if(b.addChaptersTrackCalls)for(q=u(b.addChaptersTrackCalls),r=q.next();!r.done;r=q.next())t=r.value,a.g.Xe.apply(a.g,x(t));wa(G,3);break;case 5:return w=xa(G),v=(new Map).set("detail",w),y=new U("error",v),a.g&&a.g.dispatchEvent(y),G.return();case 3:if(!a.g)return G.return();for(z in b.video)A=b.video[z],a.h[z]=A;for(B in b.playerAfterLoad)D=b.playerAfterLoad[B],a.g[B](D);a.h.autoplay=f;b.manifest&&(a.h.play(),wt(a));H(G)}})}
function st(a,b,c){a.g&&(mt(a),pt(a,{type:"event",targetName:b,event:c},a.l))}
function mt(a){a.D.X(yt);for(var b={video:{},player:{}},c=u(Cs),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.h[d];a.g.T()&&Hs.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.g[f]())});Fs.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.g[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;pt(a,{type:"update",update:b},a.l);Gs.forEach(function(e,f){0==a.m%e&&(e={player:{}},e.player[f]=a.g[f](),pt(a,{type:"update",update:e},
a.l))});a.C&&(a.m+=1);vt(a)}function vt(a){return a.B&&(a.h.duration||a.g.T())?(zt(a),a.B=!1,!0):!1}function zt(a,b){var c={contentId:a.g.xd(),streamType:a.g.T()?"LIVE":"BUFFERED",contentType:""};a.g.T()||(c.duration=a.h.duration);a.i&&(c.metadata=a.i);wt(a,void 0===b?0:b,c)}
function rt(a,b){var c=zs(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.B=!0;xt(a,c.initState,c.appData);mt(a);break;case "appData":a.F(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
"player"==d&&"load"==e&&(a.m=0,a.C=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.B=!0}));c.then(function(h){return At(a,g,f,null,h)},function(h){return At(a,g,f,h,null)})}}
function qt(a,b){var c=zs(b.data);switch(c.type){case "PLAY":a.h.play();wt(a);break;case "PAUSE":a.h.pause();wt(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.h.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.h.play(),wt(a)):d&&"PLAYBACK_PAUSE"==d&&(a.h.pause(),wt(a));break;case "STOP":a.g.kc().then(function(){a.g&&wt(a)});break;case "GET_STATUS":zt(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;null!=b&&(a.h.volume=Number(b));
null!=d&&(a.h.muted=d);e==a.h.volume&&f==a.h.muted||wt(a);break;case "LOAD":a.m=0;a.C=!1;a.B=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.F(b.customData);f&&(a.h.autoplay=!0);a.g.load(e,d).then(function(){a.g&&zt(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");pt(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:pt(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
function At(a,b,c,d,e){a.g&&pt(a,{type:"asyncComplete",id:c,error:d,res:e},a.l,b)}function pt(a,b,c,d){a.G&&(a=ys(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function wt(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.h.playbackRate,playerState:a.s?Bt:a.g.xf()?Ct:a.h.paused?Dt:Et,currentTime:a.h.currentTime,supportedMediaCommands:63,volume:{level:a.h.volume,muted:a.h.muted}};c&&(d.media=c);pt(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
S("shaka.cast.CastReceiver",lt);lt.prototype.destroy=lt.prototype.destroy;lt.prototype.setContentArtist=lt.prototype.dm;lt.prototype.setContentImage=lt.prototype.em;lt.prototype.setContentTitle=lt.prototype.gm;lt.prototype.clearContentMetadata=lt.prototype.ik;lt.prototype.setContentMetadata=lt.prototype.fm;lt.prototype.isIdle=lt.prototype.vl;lt.prototype.isConnected=lt.prototype.isConnected;var yt=.5,ut=5,Bt="IDLE",Et="PLAYING",Ct="BUFFERING",Dt="PAUSED";function Ft(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(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Gt(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,t=-1,w=0;w<q.length;w++)if(null!=q[w]&&""!==q[w].g.trim()){r=w;break}for(w=q.length-1;0<=w;w--)if(null!=q[w]&&""!==q[w].g.trim()){t=w;break}if(-1===
r||-1===t)q=Ht(d,e),a.nestedCues.push(q);else{for(;r<=t;r++)if(w=q[r]){var v=w.l,y=w.i,z=w.j,A=w.h;if(v!=h||y!=k||z!=l||A!=m)n.payload&&a.nestedCues.push(n),n=Gt(d,e,v,y,z,A),h=v,k=y,l=z,m=A;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ht(d,e),a.nestedCues.push(n));n=Gt(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Gt(a,b,c,d,e,f){a=new ne(a,b,"");c&&a.textDecoration.push(Ne);d&&(a.fontStyle=Me);a.color=e;a.backgroundColor=f;return a}
function Ht(a,b){a=new ne(a,b,"");a.lineBreak=!0;return a}function It(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Jt(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.C=b;this.j=this.m=!1;this.l="white";this.s="black";this.u=this.B=null;Kt(this)}function Lt(a,b,c){var d="CC"+((a.D<<1|a.C)+1),e=new ne(b,c,"");e.lineInterpretation=1;var f=Mt.get(a.g);f&&(e.line=f);null!=a.u&&null!=a.B&&(e.position=10+Math.min(70,10*a.u)+2.5*a.B);(b=Ft(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Mt.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Kt(a){Nt(a,0,15);a.g=1}
function Ot(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Pt.has(c)?Pt.get(c):String.fromCharCode(c);break;case 1:d=Qt.get(c);break;case 2:a.i[a.g].pop();d=Rt.get(c);break;case 3:a.i[a.g].pop(),d=St.get(c)}d&&a.i[a.g].push(new It(d,a.m,a.j,a.s,a.l))}}function Tt(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Nt(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var Pt=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"]]),Qt=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"]]),Rt=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"]]),St=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"]]),Mt=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 Ut(a,b){this.h=0;this.s=new Jt(a,b);this.i=new Jt(a,b);this.g=this.j=new Jt(a,b);this.l=0;this.m=null}function Vt(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=Lt(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Nt(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Nt(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Wt(a){a.h=1;a.g=a.j;a.g.h=0}function Xt(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=4}var Yt="black green blue cyan red yellow magenta black".split(" "),Zt="white green blue cyan red yellow magenta white_italics".split(" ");function $t(a,b){this.I=b;this.L=a;this.J=this.l=!1;this.m=this.s=this.G=this.K=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.D=this.B=!1;this.C="white";this.u="black";au(this)}function au(a){a.i=[];for(var b=0;16>b;b++)a.i.push(bu())}function bu(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function cu(a,b){du(a)&&(a.i[a.h][a.g]=new It(b,a.D,a.B,a.u,a.C),a.g++)}function du(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}$t.prototype.isVisible=function(){return this.l};
function eu(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=bu()}
function fu(a,b,c){var d=new ne(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":pe;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.L;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.K;e.viewportAnchorUnits=a.J?pd:2;switch(a.G){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=Ft(d,"svc"+c,a.i,a.j,b))a.j=b;return c}$t.prototype.display=function(){this.l=!0};function gu(){this.i=[];this.h=null;this.g=0}function hu(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new iu(a.h)),a.h=null,a.g=0))}function iu(a){this.g=0;this.h=a}iu.prototype.Oa=function(){return this.g<this.h.length};iu.prototype.Ua=function(){return this.g};function ju(a){if(!a.Oa())throw new V(2,2,3E3);return a.h[a.g++]}iu.prototype.skip=function(a){if(this.g+a>this.h.length)throw new V(2,2,3E3);this.g+=a};
iu.prototype.uj=function(a){if(0>this.g-a)throw new V(2,2,3E3);this.g-=a};function ku(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function lu(a,b,c,d){if(!a.g)return[];if(24==c)return c=ju(b).value,d=ju(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),cu(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!du(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=fu(b,d,a.i));b.h+1>=b.s?eu(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=fu(b,d,a.i));b.i[b.h]=bu();b.g=0;break;case 12:b.isVisible()&&
(e=fu(b,d,a.i)),au(b),b.h=0,b.g=0}return e?[e]:[]}
function mu(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=ju(b).value;b=[];c=u(nu(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=fu(e,d,a.i);f&&b.push(f)}au(e)}return b}if(137===c)for(b=ju(b).value,b=u(nu(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=ju(b).value;b=null;c=u(nu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=fu(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(139===c){c=ju(b).value;b=null;c=u(nu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=fu(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=ju(b).value,ou(a,b,d);if(143===c)return d=ou(a,255,d),pu(a),d;if(144===c)b.skip(1),d=ju(b).value,a.g&&(a.g.B=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=ju(b).value,c=ju(b).value,b.skip(1),a.g&&(b=qu((c&48)>>4,(c&12)>>2,c&3),a.g.C=qu((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=ju(b).value,b=ju(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=ju(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new $t(c,a.i),f.j=d,a.h[c]=f);d=ju(b).value;f=ju(b).value;var g=ju(b).value,h=ju(b).value,k=ju(b).value;b=ju(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.K=f&127;b.H=g;b.G=(h&240)>>4;b.J=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function nu(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function ou(a,b,c){var d=[];b=u(nu(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=fu(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function pu(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function qu(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ru[a<<2|b<<1|c]}
var su=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"]]),ru="black blue green cyan red magenta yellow white".split(" ");function tu(){this.h=[];this.g=[];this.i=new gu;this.l=0;this.m=new Map([["CC1",new Ut(0,0)],["CC2",new Ut(0,1)],["CC3",new Ut(1,0)],["CC4",new Ut(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.B=new Set;uu(this)}tu.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;uu(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())pu(b.value)};
function uu(a){a.s=0;a.u=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Kt(c.i),Kt(c.j),Kt(c.s);a.C=!0}
tu.prototype.extract=function(a,b){if(this.C){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new hh(a,0);if(!(8>a.getLength())&&181===a.aa()&&49===a.Fa()&&1195456820===a.W()&&3===a.aa()&&(c=a.aa(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.aa(),f=(e&4)>>2,g=a.aa(),h=a.aa();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Eb:g,lc: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})))}};
tu.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=u(this.h),d=c.next();!d.done;d=c.next())(d=vu(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())hu(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=wu(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
function vu(a,b){var c=b.type;if(16===(b.Eb&112)){var d=b.Eb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Eb&&255===b.lc||!b.Eb&&!b.lc||!xu(b.Eb)||!xu(b.lc))return 45<=++a.l&&uu(a),null;a.l=0;b.Eb&=127;b.lc&=127;var e=b.Eb;if(1<=e&&15>=e||!b.Eb&&!b.lc)return null;e=null;if(16===(b.Eb&112))a:{a.B.add(d),d=b.Eb;a=b.lc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){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=95<a?a-96:a-64;13>=g?d=Zt[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Tt(g,c,1+g.g-g.h,g.h),Nt(g,0,c-1),Nt(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Ot(c.g,0,32),d=!1,b=Zt[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Yt[(a&
14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Ot(c.g,1,a);else if(18===(d&246)&&32===(a&224))Ot(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.lc){case 32:Wt(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Vt(c,2,a);break;case 38:d=Vt(c,3,a);break;case 39:d=Vt(c,4,a);break;case 40:Ot(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Kt(c.s);Xt(c);break;case 43:Xt(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Lt(b,c.l,a));Nt(b,0,15);break;case 45:b=
c.g;3!==c.h?d=null:(d=Lt(b,c.l,a),e=b.g-b.h+1,Tt(b,e-1,e,b.h),Nt(b,0,e-1),Nt(b,b.g,15-b.g),c.l=a);break;case 46:Nt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Lt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Wt(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.B=a-32)}e=null}else a=b.lc,Ot(c.g,0,b.Eb),Ot(c.g,0,a);return e}
function wu(a,b){var c=[];try{for(;b.Oa();){var d=ju(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ju(b).value&63);if(0!=e){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new ku(e));for(var g=a.j.get(e),h=b.Ua();b.Ua()-h<f;){e=g;var k=b,l=ju(k),m=l.value,n=l.pts;if(16===m){var q=ju(k);m=m<<16|q.value}if(0<=m&&31>=m)var r=lu(e,k,m,n);else if(128<=m&&159>=m)r=mu(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&
255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?cu(e.g,"\u266a"):cu(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&cu(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(su.has(k)){var t=su.get(k);cu(e.g,t)}else cu(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?cu(e.g,"_"):cu(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof V&&3E3===w.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw w;}return c}function xu(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}tu.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",tu);kd=function(){return new tu};function yu(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function zu(){this.j=new Map;this.i=this.h=0;this.g=Au}
zu.prototype.init=function(a){function b(f){f=f.name;Bu.has(f)&&(c.g=Bu.get(f))}var c=this,d=[],e=[];(new kh).box("moov",ph).box("mvex",ph).V("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.W();g=g.W();c.h=f;c.i=g}).box("trak",ph).V("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.W();1==f?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.Fa();g.Fa();g.Fa();g.Fa();d.push(h)}).box("mdia",ph).V("mdhd",
function(f){f=Ji(f.reader,f.version);e.push(f.timescale)}).box("minf",ph).box("stbl",ph).V("stsd",rh).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",sh).box("sinf",ph).box("frma",function(f){f=Mi(f.reader).codec;Bu.has(f)&&(c.g=Bu.get(f))}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new V(2,2,2010);this.g==Au&&ab("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
zu.prototype.parse=function(a){var b=this;if(this.g==Au)return[];var c=[],d=0,e=[];(new kh).box("moof",function(f){d=f.start;e=[];ph(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Yd:b.h,Zd:b.i,lj:[],timescale:9E4});ph(f)}).V("trun",function(f){var g=e[e.length-1];f=Ki(f.reader,f.version,f.flags);g.lj.push(f)}).V("tfhd",function(f){var g=e[e.length-1];f=Hi(f.reader,f.flags);g.Yd=f.Yd||b.h;g.Zd=f.Zd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).V("tfdt",function(f){var g=e[e.length-
1];f=Ii(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ua(),k=u(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new V(2,2,2010);f.reader.seek(h);Cu(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Yd,l.Zd,g,l.lj,c)}}).parse(a,!1);return c};
function Cu(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.Ph});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Mg);b.Oa();){g=b.W();var q=b.aa(),r=null;r=!1;h=1;switch(a.g){case Du:r=q&31;r=6==r;break;case Eu:h=2;b.skip(1);r=q>>1&63;r=39==r||40==r;break;case Fu:h=2;b.skip(1);r=q>>1&63;r=23==r||24==r;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].Wf||0),q=(c+q)/d,h=u(yu(b.Xb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});else try{b.skip(g-
h)}catch(t){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Qh||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",zu);var Au=0,Du=1,Eu=2,Fu=3,Bu=(new Map).set("avc1",Du).set("avc3",Du).set("dvav",Du).set("dva1",Du).set("hev1",Eu).set("hvc1",Eu).set("dvh1",Eu).set("dvhe",Eu).set("vvc1",Fu).set("vvi1",Fu).set("dvc1",Fu).set("dvi1",Fu);ld("video/mp4",function(){return new zu});function Gu(){this.g=null}Gu.prototype.init=function(){};Gu.prototype.parse=function(a){this.g?this.g.clearData():this.g=new mk;var b=[];a=Kb(a);if(!uk(a))return b;a=this.g.parse(a);var c=a.ae(),d=a.tf();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=u(yu(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Gu);ld("video/mp2t",function(){return new Gu});function Hu(a){var b=0,c=Ob(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Kb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Iu(a){a=hc(Pd(a));a=Hu(a).filter(function(b){return b.type===Ju})[0];if(!a)return null;a=Xb(a.value,!0);return(a=Hd(a,"WRMHEADER"))?a:null}
function Ku(a){try{var b=Iu(a);if(b)a:{for(var c=u(Rd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=u(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=Pd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Ju=1;function Lu(a,b,c){var d=Mu(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new V(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Ld});if(1<f.length)throw new V(2,4,4050);f.length&&(g=Nu(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ld}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ld?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
l.Ld});f.length&&(a=Ou(e,k,f,c,h),0==a.length&&(a=[mc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=u(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(mc(c,k,e));if(h=Array.from(h)[0]||null)for(k=u(a),b=k.next();!b.done;b=k.next())for(b=u(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Hi:h,Fn:e,drmInfos:a,zg:g,Mi:!0}}
function Pu(a,b,c,d){var e=Lu(a,c,d);if(b.Mi){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Mi=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new V(2,4,4008);return e.Hi||b.Hi}
function Qu(a){var b=Td(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Pd(b)))return b;if((b=Td(a.node,"urn:microsoft:playready","pro"))&&Pd(b))return Ku(b);if(a=Td(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=Pd(a)){b=hc(a);a=8;b=Ob(b);var c=b.getUint8(a);a+=20;0<c&&(a+=4+16*b.getUint32(a));a=Kb(b,a+4);a=ec(a);a=Hd("<pro>"+a+"</pro>");return Ku(a)}return""}
function Ou(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ld];if(h){var k;if((k=Td(g.node,"urn:microsoft:playready","pro"))&&Pd(k)){k=Pd(k);k=hc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:wh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ld){l=g;var m=e;if(0==m.size)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:wh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=mc(h,b,g.init||a||k||l);if(h=Ru.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Mu(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=Su(c.value))&&b.push(c);return b}
function Su(a){var b=a.attributes.schemeIdUri,c=Wd(a,"urn:mpeg:cenc:2013","default_KID"),d=Ud(a,"urn:mpeg:cenc:2013","pssh").map(Qd),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new V(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:hc(g),keyId:null}})}catch(g){throw new V(2,4,4007);}return{node:a,Ld:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
function Nu(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new V(2,4,4042);var b=Td(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new V(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new V(2,4,4051);b=Td(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new V(2,4,4051);a=b.attributes.IV;b=cc(b.attributes.keyUriTemplate);
if(!a||!b)throw new V(2,4,4051);a=ic(a.substr(2));if(16!=a.byteLength)throw new V(2,4,4048);return{Bl:b,iv:a}}
var Ru=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4054);if(a=Td(a.node,"https://dashif.org/CPS","Laurl"))if(a=Pd(a))return a;return""}).set("com.widevine.alpha",function(a){var b=Td(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Pd(b))?b:(a=Td(a.node,"urn:microsoft","laurl"))?cc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Qu).set("com.microsoft.playready.recommendation",Qu).set("com.microsoft.playready.software",
Qu).set("com.microsoft.playready.hardware",Qu).set("org.w3.clearkey",function(a){var b=Td(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Pd(b))?b:(a=Td(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Pd(a))?a:""});function Tu(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(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&ab("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 Uu(a,b){var c=Vu(a,b,"timescale"),d=1;c&&(d=be(c)||1);c=Vu(a,b,"duration");var e=(c=be(c||""))?c/d:null,f=Vu(a,b,"startNumber"),g=Number(Vu(a,b,"presentationTimeOffset"))||0,h=ce(f||"");if(null==f||null==h)h=1;f=null;if(b=Wu(a,b,"SegmentTimeline")){b=Od(b,"S");f=d;a=a.va.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],t=Vd(q,"t",ce),w=Vd(q,"d",ce),v=Vd(q,"r",ae);q=Vd(q,"k",ae)||0;null!=t&&(t-=g);if(w){t=null!=t?t:m;v=v||0;if(0>v)if(r){r=Vd(r,"t",ce);if(null==
r)break;else if(t>=r)break;v=Math.ceil((r-t)/w)-1}else{if(Infinity==a)break;else if(t/f>=a)break;v=Math.ceil((a*f-t)/w)-1}0<l.length&&t!=m&&(l[l.length-1].end=t/f);for(r=0;r<=v;++r)m=t+w,l.push({start:t/f,end:m/f,ni:t,ec:q,bm:l.length+k}),t=m}}f=l}return{timescale:d,gg:c,ob:e,Ae:h,fc:g/d||0,mi:g,timeline:f}}function Xu(a,b){return[b(a.M),b(a.ua),b(a.za)].filter(Bf)}function Vu(a,b,c){b=Xu(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
function Wu(a,b,c){b=Xu(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=Sd(d.value,c));d=b.next());return a}
function Yu(a,b,c,d,e,f){for(var g=Wd(a,"http://www.w3.org/1999/xlink","href"),h=Wd(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Jd("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Jg(new V(2,4,4028));if("onLoad"!=h)return Jg(new V(2,4,4027));var q=lc([d],[g]);return e.request(0,Wg(q,b)).bb(function(r){r=Gd(r.data,a.tagName);if(!r)return Jg(new V(2,4,4001,g));for(a.children=
[];r.children.length;){var t=r.children.shift();a.children.push(t)}t=u(Object.keys(r.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=r.attributes[w];return Zu(a,b,c,q[0],e,f+1)})}
function Zu(a,b,c,d,e,f){f=void 0===f?0:f;if(Wd(a,"http://www.w3.org/1999/xlink","href")){var g=Yu(a,b,c,d,e,f);c&&(g=g.bb(void 0,function(){return Zu(a,b,c,d,e,f)}));return g}g=[];for(var h=u(Nd(a)),k=h.next(),l={};!k.done;l={Vd:void 0},k=h.next())l.Vd=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==Wd(l.Vd,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Vd}}(l)):"SegmentTimeline"!=l.Vd.tagName&&g.push(Zu(l.Vd,b,c,d,e,f));return Ng(g).bb(function(){return a})}
;function $u(a,b,c,d,e,f,g){var h,k=(new kh).V("sidx",function(l){h=av(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new V(2,3,3004);}
function av(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.W();if(0==k)throw new V(2,3,3005);if(0==g.version){var l=g.reader.W();var m=g.reader.W()}else l=g.reader.Jd(),m=g.reader.Jd();g.reader.skip(2);var n=g.reader.Fa();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.W(),r=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.W();g.reader.skip(4);if(1==r)throw new V(2,3,3006);h.push(new zj(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function bv(a){this.h=Ob(a);this.g=new hh(this.h,0)}bv.prototype.Oa=function(){return this.g.Oa()};
function cv(a){var b=dv(a);if(7<b.length)throw new V(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=dv(a);a:{d=u(ev);for(var e=d.next();!e.done;e=d.next())if(Jb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ua();else{if(8==b.length&&b[1]&224)throw new V(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Ua()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ua();d=Ob(a.h,a.g.Ua(),b);a.g.skip(b);return new fv(c,
d)}function dv(a){var b=a.g.Ua(),c=a.g.aa();if(0==c)throw new V(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Kb(a.h,b,c)}var ev=[[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 fv(a,b){this.id=a;this.g=b}
function gv(a){if(8<a.g.byteLength)throw new V(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new V(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 hv(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new bv(a.g);for(var n=null,q=null;a.Oa();){var r=cv(a);if(187==r.id){var t=iv(r);t&&(r=c*t.qm,t=b+t.Tl,null!=n&&m.push(new zj(n+g,r+g,l,q,t-1,f,g,h,k)),n=r,q=t)}}null!=n&&m.push(new zj(n+g,d+g,l,q,null,f,g,h,k));return m}
function iv(a){var b=new bv(a.g);a=cv(b);if(179!=a.id)throw new V(2,3,3013);a=gv(a);b=cv(b);if(183!=b.id)throw new V(2,3,3012);b=new bv(b.g);for(var c=0;b.Oa();){var d=cv(b);if(241==d.id){c=gv(d);break}}return{qm:a,Tl:c}};function jv(a,b,c){b=Wu(a,b,"Initialization");if(!b)return null;var d=a.M.jb(),e=b.attributes.sourceURL;e&&(d=lc(d,[cc(e)],a.Nb()));e=0;var f=null;if(b=Vd(b,"range",$d))e=b.start,f=b.end;c=new xj(function(){return d},e,f,kv(a),null,null,c,a.ua.encrypted);c.codecs=a.M.codecs;c.mimeType=a.M.mimeType;a.va&&(c.g=a.va.start+a.va.duration);return c}
function lv(a,b,c){var d=Number(Vu(a,mv,"presentationTimeOffset"))||0,e=Vu(a,mv,"timescale"),f=1;e&&(f=be(e)||1);var g=d/f||0,h=jv(a,mv,c);nv(a,h);var k=Ed(a);return{endTime:-1,timeline:-1,Tc:function(){var l=Wu(k,mv,"RepresentationIndex");var m=k.M.jb();l&&(l=cc(l.attributes.sourceURL))&&(m=lc(m,[l],k.Nb()));l=ov(k);return pv(k,b,h,m,l.start,l.end,g)},timescale:f}}
function pv(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E;return Q(function(I){if(1==I.g)return h=a.presentationTimeline,k=!a.pc||!a.va.Yi,l=a.va.start,m=a.va.duration,n=a.M.mimeType.split("/")[1],q=b,r=null,t=[q(d,e,f,!1),"webm"==n?q(c.S(),c.startByte,c.endByte,!0):null],q=null,F(I,Promise.all(t),2);w=I.h;v=w[0];y=w[1]||null;z=null;A=l-g;B=l;D=m?l+m:Infinity;if("mp4"==n)var K=$u(v,e,d,c,A,B,D);else{K=v;var J=new bv(y);if(440786851!=cv(J).id)throw new V(2,3,3008);var L=cv(J);if(408125543!=
L.id)throw new V(2,3,3009);J=L.g.byteOffset;L=new bv(L.g);for(var M=null;L.Oa();){var O=cv(L);if(357149030==O.id){M=O;break}}if(!M)throw new V(2,3,3010);M=new bv(M.g);O=1E6;for(L=null;M.Oa();){var N=cv(M);if(2807729==N.id)O=gv(N);else if(17545==N.id)if(4==N.g.byteLength)L=N.g.getFloat32(0);else if(8==N.g.byteLength)L=N.g.getFloat64(0);else throw new V(2,3,3003);}if(null==L)throw new V(2,3,3011);M=O/1E9;L*=M;K=cv(new bv(K));if(475249515!=K.id)throw new V(2,3,3007);K=hv(K,J,M,L,d,c,A,B,D)}z=K;G=u(z);
for(C=G.next();!C.done;C=G.next())E=C.value,E.codecs=a.M.codecs,E.mimeType=a.M.mimeType,E.bandwidth=a.bandwidth;h.re(z);r=new Ol(z);k&&r.vd(B,D,!0);return I.return(r)})}function mv(a){return a.Md}function ov(a){var b=Wu(a,mv,"RepresentationIndex");a=Vu(a,mv,"indexRange");a=$d(a||"");b&&(a=Vd(b,"range",$d,a));return a}function nv(a,b){qv(a,b);if(!ov(a))throw new V(2,4,4002);}
function qv(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=rc&&"mp4"!=c&&"webm"!=c)throw new V(2,4,4006);if("webm"==c&&!b)throw new V(2,4,4005);}
function kv(a){var b=a.M;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.Jf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ua.label||null,roles:a.roles||null,language:a.ua.language||null}};function rv(a,b,c){var d=jv(a,sv,c),e=tv(a);if(!e.ob&&!e.timeline&&1<e.Dd.length)throw new V(2,4,4002);if(!e.ob&&!a.va.duration&&!e.timeline&&1==e.Dd.length)throw new V(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new V(2,4,4002);var f=null,g=null;a.za.id&&a.M.id&&(g=b.get(a.za.id+","+a.M.id))&&(f=g.segmentIndex);var h=uv(a.va.start,a.va.duration,a.M.jb,e,d,c,a.M.mimeType,a.M.codecs,a.bandwidth,a.Nb);b=!f;f?f.pe(h,a.presentationTimeline.Jb()):f=new Ol(h);a.presentationTimeline.re(h);a.pc&&
a.va.Yi||f.vd(a.va.start,a.va.duration?a.va.start+a.va.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,Tc:function(){f&&0!=f.getNumReferences()||f.Ff(h);return Promise.resolve(f)},timescale:e.timescale}}function sv(a){return a.xc}function tv(a){var b=vv(a);a=Uu(a,sv);var c=a.Ae;0==c&&(c=1);var d=0;a.ob?d=a.ob*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ob:a.ob,startTime:d,Ae:c,fc:a.fc,timescale:a.timescale,timeline:a.timeline,Dd:b}}
function uv(a,b,c,d,e,f,g,h,k,l){var m=d.Dd.length;d.timeline&&d.timeline.length!=d.Dd.length&&(m=Math.min(d.timeline.length,d.Dd.length));for(var n=a-d.fc,q=b?a+b:Infinity,r=[],t=d.startTime,w={},v=0;v<m;w={ig:void 0,Xf:void 0},v++){w.Xf=d.Dd[v];var y=t;t=void 0;t=null!=d.ob?y+d.ob:d.timeline?d.timeline[v].end:y+b;w.ig=null;w=new zj(a+y,a+t,function(z){return function(){null==z.ig&&(z.ig=lc(c(),[z.Xf.Il],l()));return z.ig}}(w),w.Xf.start,w.Xf.end,e,n,a,q,[],"",null,null,Aj,f);w.codecs=h;w.mimeType=
g;w.bandwidth=k;r.push(w)}return r}function vv(a){return[a.M.xc,a.ua.xc,a.za.xc].filter(Bf).map(function(b){return Od(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.qh&&(a.qh=!0);var c=cc(b.attributes.media);b=Vd(b,"mediaRange",$d,{start:0,end:null});return{Il:c,start:b.start,end:b.end}})};function wv(a,b,c,d,e,f,g,h,k,l){k||a.M.vf||(a.M.vf=Vu(a,xv,"initialization"));var m=a.M.vf?yv(a,g):null,n=zv(a);Av(n);var q=Ed(a);if(n.je)return qv(a,m),{endTime:-1,timeline:-1,Tc:function(){var y=Tu(n.je,q.M.originalId,null,null,q.bandwidth||null,null);y=lc(q.M.jb(),[y]);return pv(q,b,m,y,0,null,n.fc)},timescale:n.timescale};if(n.ob)return d||"image"===a.ua.contentType||"text"===a.ua.contentType||(d=a.va.start,l=a.za.id,c=a.va.duration,l=(l=null!=l&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.Bh(n.ob),
a.presentationTimeline.jj(d,l)),{endTime:-1,timeline:-1,Tc:function(){return Bv(q,n,e,m,f,g,h,a.M.Yf)},timescale:n.timescale};var r=null;d=d=null;a.za.id&&a.M.id&&(d=a.za.id+","+a.M.id,d=c.get(d))&&(r=d.segmentIndex);var t=a.va.start,w=a.va.duration?t+a.va.duration:Infinity;if(r)l=r,Cv(l,n,t,w,m),l.hb(a.presentationTimeline.Jb());else{c=0;k=-1;if(null!=a.za.id&&null!=a.M.id){var v=l.get(a.za.id);if(v)k=v.timeline;else for(l=u(l.values()),v=l.next();!v.done;v=l.next())if(v=v.value,Math.abs(n.fc-v.endTime)<=
vc&&v.Kh.includes(a.M.id)){k=v.timeline;break}else v.timeline>=c&&(c=v.timeline+1)}-1==k&&(k=c);r=new Dv(n,a.M.originalId,a.bandwidth,a.M.jb,a.Nb,t,w,m,g,a.M.Yf,k)}n.timeline&&"image"!==a.ua.contentType&&"text"!==a.ua.contentType&&a.presentationTimeline.kj(r.h?r.h.timeline:[],t);d&&a.pc&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.fc:-1;l=-1;r instanceof Dv&&(l=r.hf());return{endTime:d,timeline:l,Tc:function(){r instanceof Dv&&0==r.getNumReferences()&&Cv(r,n,t,w,m);return Promise.resolve(r)},
timescale:n.timescale}}function xv(a){return a.Kc}function zv(a){var b=Uu(a,xv),c=Vu(a,xv,"media"),d=Vu(a,xv,"index"),e=Vu(a,xv,"k"),f=0;e&&(f=parseInt(e,10));return{gg:b.gg,ob:b.ob,timescale:b.timescale,Ae:b.Ae,fc:b.fc,mi:b.mi,timeline:b.timeline,Ic:c&&cc(c),je:d,mimeType:a.M.mimeType,codecs:a.M.codecs,bandwidth:a.bandwidth,Jl:f}}
function Av(a){var b=a.je?1:0;b+=a.timeline?1:0;b+=a.ob?1:0;if(0==b)throw new V(2,4,4002);1!=b&&(a.je&&(a.timeline=null),a.gg=null,a.ob=null);if(!a.je&&!a.Ic)throw new V(2,4,4002);}
function Bv(a,b,c,d,e,f,g,h){function k(L){var M=L-v,O=M*w,N=b.gg,P=M*N;"BigInt"in window&&P>Number.MAX_SAFE_INTEGER&&(P=BigInt(M)*BigInt(N));O+=q;M=O+w;N=Math.min(M,m());var R=[],T=b.Jl;if(T)for(var ca=(N-O)/T,Y={},Ma=0;Ma<T;Y={Lj:void 0},Ma++){var Na=O+ca*Ma,Ea=Na+ca;Y.Lj=Ma+1;Y=new zj(Na,Ea,function(va){return function(){var Ka=Tu(y,A,L,va.Lj,z,P);return lc(B(),[Ka],D())}}(Y),0,null,d,G,q,m(),[],"",null,null,Aj,f);Y.codecs=a.M.codecs;Y.mimeType=a.M.mimeType;0==h?0<Ma&&Y.Bd():0!=Ma%h&&Y.Bd();R.push(Y)}O=
new zj(O,N,function(){if(T)return[];var va=Tu(y,A,L,null,z,P);return lc(B(),[va],D())},0,null,d,G,q,m(),R,"",null,null,Aj,f,0<R.length);O.codecs=a.M.codecs;O.mimeType=a.M.mimeType;O.bandwidth=a.bandwidth;O.j=M;return O}function l(){var L=[Math.max(n.Jb(),q),Math.min(n.Cc(),m())].map(function(M){return M-q});L=[Math.ceil(L[0]/w),Math.ceil(L[1]/w)-1];a.M.wb&&L[1]++;return L.map(function(M){return M+v})}function m(){var L=null!=r&&e.get(r)||t;return L?q+L:Infinity}var n=a.presentationTimeline,q=a.va.start,
r=a.za.id,t=a.va.duration,w=b.ob,v=b.Ae,y=b.Ic,z=a.bandwidth||null,A=a.M.id,B=a.M.jb,D=a.Nb,G=q-b.fc,C=l();c=a.pc?Math.max(C[0],C[1]-c+1):C[0];g=g||C[1];C=[];for(var E=c;E<=g;++E){var I=k(E);C.push(I)}var K=new Ol(C);C=n.Cc()<m();E=n.T();if(C||E){var J=Math.max(c,g+1);c=w;a.M.wb&&(c=.1);K.hg(c,function(){var L=n.Jb();K.hb(L);var M=u(l());M.next();M=M.next().value;for(var O=[];J<=M;){var N=k(J);O.push(N);J++}return L>m()&&!O.length?null:O})}return Promise.resolve(K)}
function yv(a,b){var c=a.M.vf;c||(c=Vu(a,xv,"initialization"));if(!c)return null;c=cc(c);var d=a.M.originalId,e=a.bandwidth||null,f=a.M.jb,g=a.Nb;b=new xj(function(){var h=Tu(c,d,null,null,e,null);return lc(f(),[h],g())},0,null,kv(a),null,null,b,a.ua.encrypted);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;a.va&&(b.g=a.va.start+a.va.duration);return b}
function Dv(a,b,c,d,e,f,g,h,k,l,m){Ol.call(this,[]);this.h=a;this.F=b;this.C=c;this.D=d;this.H=e;this.j=f;this.l=g;this.u=h;this.B=k;this.G=l;this.I=m;Ev(this)}pa(Dv,Ol);p=Dv.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Ol.prototype.release.call(this);this.h=null};
p.hb=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;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
function Cv(a,b,c,d,e){Fv(a,e);if(a.h){c=a.h.timeline;a.h.Ic!==b.Ic&&(a.h.Ic=b.Ic);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0<b.length&&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;Ev(a)}function Fv(a,b){if(a.u!==b){a.u=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Cj(c,b)}}
function Ev(a){if(a.h&&!a.s){for(var b=[],c=u(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.hb(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:Infinity===this.l?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(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.bm,f=d.ni+this.h.mi;c=this.j-this.h.fc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=.1<Math.abs(h-this.l)?Math.min(h,this.l):this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=(d.end-d.start)/d.ec,r={},t=0;t<d.ec;r={jg:void 0,Mj:void 0},t++){var w=d.start+q*t,v=w+q;r.Mj=t+1;r.jg=null;r=new zj(this.j+
w,this.j+v,function(y){return function(){if(!b.h)return[];null==y.jg&&(y.jg=Gv(b.h.Ic,b.F,e,b.C,f,y.Mj,b.D,b.H));return y.jg}}(r),0,null,this.u,c,this.j,this.l,[],"",null,null,Aj,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<t&&r.Bd():0!=t%this.G&&r.Bd();n.push(r)}c=new zj(this.j+d.start,h,function(){return 0<d.ec||!b.h?[]:Gv(b.h.Ic,b.F,e,b.C,f,null,b.D,b.H)},0,null,this.u,c,this.j,this.l,n,"",null,null,Aj,this.B,0<d.ec);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
p.Gb=function(a){Ev(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Gv(a,b,c,d,e,f,g,h){a=Tu(a,b,c,f,d||null,e);return lc(g(),[a],h()).map(function(k){return k.toString()})}p.hf=function(){return this.I};function Hv(a){this.s=null;this.B=a;this.G=new Pg;this.i=[];this.h=null;this.m=[];this.C=null;this.F=[];this.D=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}Hv.prototype.configure=function(a){this.s=a};Hv.prototype.destroy=function(){this.B=this.s=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Hv.prototype.setManifestType=function(a){this.u=a};
function Iv(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g)return c=lc(a.i,[Jv(a,b)]),d=Wg(c,a.s.retryParameters),e=a.B.networkingEngine.request(8,d),Qg(a.G,e),ta(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=Wb(f.data),h=JSON.parse(g),1==h.VERSION&&Kv(a,h,f.uri),wa(l,0);if((k=xa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new yf(function(){Iv(a,b)});a.g.X(a.D);H(l)})}
function Jv(a,b){if(!a.m.length)return b;b=new qb(b);var c=a.C||a.m[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hb(e)&&vb(b,e);return b.toString()}function Kv(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new yf(function(){Iv(a,d)});if(c=b.TTL)a.D=c;a.g.X(a.D);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
function Lv(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Hv.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function Mv(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=u(a.m),f=e.next(),g={};!f.done;g={Fd:void 0},f=e.next())if(g.Fd=f.value,f=b.get(g.Fd))d.push({Gh:g.Fd,location:f});else if(f=a.F.find(function(k){return function(l){return l.Om==k.Fd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Zj?(h=new qb(h),tb(h,f["URI-REPLACEMENT"].Zj),d.push({Gh:g.Fd,location:h.toString()})):d.push({Gh:g.Fd,location:h}))}e=Date.now();g=u(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=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new qb(k.location)).Fb))return!1;return!0});d.length&&(a.C=d[0].Gh);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:lc(a.i,d)};function Nv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}p=Nv.prototype;p.release=function(){for(var a=u(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=this.s=!1;this.m.clear()};p.il=function(){return this.l};p.lh=function(){return this.j.slice()};p.Gk=function(){return this.i};
p.Ii=function(a,b){if(a){if("audio"==a.type)for(var c=u(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("video"==a.type)for(c=u(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==rc)for(c=u(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("image"==a.type)for(c=u(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 Ov(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Pv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Qv(n),n]})),l=new Map(h.textStreams.map(function(n){return[Rv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Sv(n),n]}));if(b){var m=Tv(rc);l.set(Rv(m),m);m=Tv("image");h.set(Sv(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{xi:c,Wj:d,Rj:e,Vi:f}}
p.Gg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca;return Q(function(Y){if(1==Y.g){e=uc;if(!b&&1==a.length)return f=Ov(a,!1),g=f.xi,h=f.Wj,k=f.Rj,l=f.Vi,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()),Y.A(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),-1==n&&(n=q));if(-1==n)return Y.return();t=Ov(a,!0);w=t.xi;v=t.Wj;y=t.Rj;z=t.Vi;
return F(Y,Promise.all([Uv(d,d.h,w,n,Vv,Wv,m),Uv(d,d.g,v,n,Vv,Wv,m),Uv(d,d.j,y,n,Vv,Wv,m),Uv(d,d.i,z,n,Vv,Wv,m)]),2)}A=0;B=[];if(d.g.length&&d.h.length)for(J=u(d.h),L=J.next();!L.done;L=J.next())for(M=L.value,O=u(d.g),N=O.next();!N.done;N=O.next())P=N.value,R=vg(M.drmInfos,P.drmInfos),M.drmInfos.length&&P.drmInfos.length&&!R.length||(T=(M.bandwidth||0)+(P.bandwidth||0),M.dependencyStream&&(T+=M.dependencyStream.bandwidth||0),P.dependencyStream&&(T+=P.dependencyStream.bandwidth||0),ca=A++,B.push({id:ca,
language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:P,bandwidth:T,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=d.g.length?d.g:d.h,G=u(D),C=G.next();!C.done;C=G.next())E=C.value,I=A++,K=E.bandwidth||0,E.dependencyStream&&(K+=E.dependencyStream.bandwidth||0),B.push({id:I,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==e.ba?E:null,video:E.type==e.Ea?E:null,bandwidth:K,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,
decodingInfos:[]});d.l=B;H(Y)})};
function Xv(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O;return Q(function(N){switch(N.g){case 1:b=uc;if(1==a.length)return N.return(a[0]);c=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.ba}).map(function(R){return[Pv(R),R]}))});d=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.Ea}).map(function(R){return[Qv(R),R]}))});e=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.Xa}).map(function(R){return[Rv(R),R]}))});
f=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.pg}).map(function(R){return[Sv(R),R]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Yv(b.Xa),k.set(Rv(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=Yv(b.pg),q.set(Sv(r),r);t=new Nv;return F(N,Uv(t,[],c,0,Zv,$v,0),2);case 2:return w=N.h,F(N,Uv(t,[],d,0,Zv,$v,0),3);case 3:return v=N.h,F(N,Uv(t,[],e,0,Zv,$v,0),4);case 4:return y=N.h,F(N,Uv(t,[],f,0,Zv,$v,0),5);case 5:z=N.h;A=0;if(v.length&&w.length)for(E=
u(w),I=E.next();!I.done;I=E.next())for(K=I.value,J=u(v),L=J.next();!L.done;L=J.next())M=L.value,O=A++,M.variantIds.push(O),K.variantIds.push(O);else for(B=v.concat(w),D=u(B),G=D.next();!G.done;G=D.next())C=G.value,C.variantIds=[A++];return N.return(v.concat(w).concat(y).concat(z))}})}
function Uv(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K;return Q(function(J){switch(J.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=u(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return F(J,aw(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new V(2,4,4037);m=l.next();J.A(2);break;case 4:r=u(h);for(t=r.next();!t.done;t=r.next())for(w=t.value,v=u(w),y=v.next();!y.done;y=v.next())z=y.value,(A=bw(a,z,c,e,f,h))&&b.push(A);B=u(h);for(D=B.next();!D.done;D=
B.next())for(G=D.value,C=u(G),E=C.next(),I={};!E.done;I={$h:void 0},E=C.next())if(I.$h=E.value,!cw(I.$h)&&(K=b.some(function(L){return function(M){return dw(a,L.$h,M)}}(I))))throw new V(2,4,4037);return J.return(b)}})}function aw(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return ew(a,c,b,0<g),b.matchedStreams?b.segmentIndex?F(h,fw(b,d+g),2):h.A(2):h.return(!1);gw(b,d,e,f,g);return h.return(!0)})}
function fw(a,b){var c,d,e,f,g,h;return Q(function(k){if(1==k.g){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 F(k,Promise.all(c),2)}if(a.segmentIndex instanceof Rl)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})}
function bw(a,b,c,d,e,f){if(cw(b))return null;var g=d(b);ew(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return Q(function(h){if(g.segmentIndex)return h.A(0);g.segmentIndex=new Rl;return F(h,fw(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;gw(g,0,e,f,0);return g}
function gw(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;"audio"==a.type&&0==Ec(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=u(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function Vv(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=u(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};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 Zv(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 Wv(a,b){function c(g,h){g||(g=[]);h=u(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=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=vg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new V(2,
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(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=Vv(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new Rl,h=u(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),Wv(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Wv(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Vv(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new Rl,h=u(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),Wv(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Wv(a.dependencyStream,b))}
function $v(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(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=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
function ew(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=hw(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function hw(a,b,c){var d={audio:Pv,video:Qv,text:Rv,image:Sv}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return dw(a,l,m)},video:function(l,m){return dw(a,l,m)},text:iw,image:jw}[c.type];for(var g={audio:kw,video:lw,text:mw,image:nw}[c.type],h=u(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&&!cw(e)&&b.delete(d(e));return e}
function ow(a,b){return a.mimeType!=b.mimeType?!1:pw(a.codecs)===pw(b.codecs)}p.Aj=function(a){this.s=a};p.Gj=function(a){this.u=a};function dw(a,b,c){return!ow(b,c)&&!a.s||b.drmInfos&&!rg(b.drmInfos,c.drmInfos)?!1:!0}function iw(a,b){return b.language?a.forced!==b.forced||0==Ec(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function jw(){return!0}
function kw(a,b,c){var d=ow(a,b),e=ow(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ec(a.language,b.language);e=Ec(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=qw(a.channelsCount,b.channelsCount,c.channelsCount);if(d==rw)return!0;if(d==sw)return!1;d=qw(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==rw?!0:d==sw?!1:a.bandwidth&&tw(a.bandwidth,b.bandwidth,c.bandwidth)==rw?!0:!1}
function lw(a,b,c){var d=ow(a,b),e=ow(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=qw(a.width*a.height,b.width*b.height,c.width*c.height);if(d==rw)return!0;if(d==sw)return!1;if(a.frameRate){d=qw(a.frameRate,b.frameRate,c.frameRate);if(d==rw)return!0;if(d==sw)return!1}return a.bandwidth&&tw(a.bandwidth,b.bandwidth,c.bandwidth)==rw?!0:!1}
function mw(a,b,c){var d=Ec(a.language,b.language),e=Ec(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 nw(a,b,c){return qw(a.width*a.height,b.width*b.height,c.width*c.height)==rw?!0:!1}
function Yv(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 Tv(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ol([]),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 qw(a,b,c){if(b==a&&a!=c)return sw;if(c==a&&a!=b)return rw;if(b>a){if(c<=a||c-a<b-a)return rw;if(c-a>b-a)return sw}else{if(c>a)return sw;if(a-c<a-b)return rw;if(a-c>a-b)return sw}return uw}function tw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?rw:b<a?sw:uw}function cw(a){switch(a.type){case rc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
function Qv(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,pw(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 Pv(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,pw(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Rv(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Sv(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function pw(a){if(!vw.has(a)){var b=ff(a);vw.set(a,b)}return vw.get(a)}
S("shaka.util.PeriodCombiner",Nv);Nv.prototype.setUseStreamOnce=Nv.prototype.Gj;Nv.prototype.setAllowMultiTypeVariants=Nv.prototype.Aj;Nv.prototype.combinePeriods=Nv.prototype.Gg;Nv.prototype.deleteStream=Nv.prototype.Ii;Nv.prototype.getImageStreams=Nv.prototype.Gk;Nv.prototype.getTextStreams=Nv.prototype.lh;Nv.prototype.getVariants=Nv.prototype.il;var rw=1,uw=0,sw=-1,vw=new Map;function ww(a,b){var c=new DOMParser,d=xw.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 yw(a,b){try{var c=Zb(a);return ww(c,b)}catch(d){return null}}
var xw=new Qb(function(){if("undefined"!==typeof trustedTypes){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 zw(){var a=this;this.j=this.g=null;this.B=[];this.i=null;this.sa=1;this.G=[];this.l={Hf:"",type:"",profiles:[],sc:null,wb:0,jb:null,ue:0};this.u=new Map;this.C=new Map;this.s=new Map;this.D=new Map;this.oa=new Map;this.m=new Nv;this.J=0;this.ra=new Lc(5);this.K=new yf(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.H.Ca(a.I,"timeupdate"),a.I.paused)){a.H.qa(a.I,"timeupdate",function(){return Aw(a)});return}Aw(a)});this.O=new Pg;this.N=null;this.F=[];this.Z=Infinity;this.na=!1;this.h=
null;this.L=0;this.P=!1;this.H=new Oc;this.I=null;this.R=!1;this.Y="";this.ea=function(){return!1};this.U=[];this.$=new Set}p=zw.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.ea=b);c&&this.i&&this.i.presentationTimeline.T()&&this.K.Ja();this.h&&this.h.configure(this.g);this.m&&(this.m.Aj(this.g.dash.multiTypeVariantsAllowed&&dd()),this.m.Gj(this.g.dash.useStreamOnceInPeriodFlattening))};
p.start=function(a,b){var c=this,d;return Q(function(e){if(1==e.g)return c.na=b.isLowLatencyMode(),c.B=[a],c.j=b,F(e,Bw(c),2);d=e.h;c.j&&Cw(c,d);if(!c.j)throw new V(2,7,7001);return e.return(c.i)})};
p.stop=function(){for(var a=u(this.s.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.B=[];this.i=null;this.s.clear();this.D.clear();this.u.clear();this.C.clear();this.l={Hf:"",type:"",profiles:[],sc:null,wb:0,jb:null,ue:0};this.m=null;null!=this.K&&(this.K.stop(),this.K=null);this.h&&this.h.destroy();this.H&&(this.H.release(),this.H=null);this.$.clear();return this.O.destroy()};
p.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return ta(c,2),F(c,Bw(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Cc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.J=b.endTime-a,Cw(this,0))}}};
p.banLocation=function(a){this.h&&this.h.banLocation(a)};p.setMediaElement=function(a){this.I=a};
function Bw(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(1==q.g)return b=4,c="MPD",d=Dw(a),e=a.B,d.length?(e=d,c="Patch",b=6):1<a.B.length&&a.h&&(f=Mv(a.h,"Location",!0),f.length&&(e=f)),g=Wg(e,a.g.retryParameters),h=Date.now(),F(q,Ew(a,g,0,{type:b}),2);if(3!=q.g){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new qb(k.uri);a.Y=l.g.toString();return F(q,Fw(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ra.sample(1,n);a.$.clear();return q.return(n)})}
function Fw(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return Q(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=Jn;if(f!=g){Uc("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=yw(e,d);if(!h)throw new V(2,4,4001,c);f(h);e=$b(h.outerHTML)}k=Gd(e,d);if(!k)throw new V(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Kn;l!=m&&l(k);if("Patch"===d)return w.return(Gw(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Hw(a,k,c));
q=a.g.dash.xlinkFailGracefully;r=Zu(k,a.g.retryParameters,q,c,a.j.networkingEngine);Qg(a.O,r);return F(w,r.promise,2)}t=w.h;return w.return(Hw(a,t,c))})}
function Hw(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za,ia,Aa,eb,fb,mb,xb,sb,Ua,re,tc,ze,tg,ug;return Q(function(md){switch(md.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Od(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Qd(l))q=lc(d,[n])[0],m&&(a.h?Lv(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(r=Mv(a.h,"Location",!0),0<r.length&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.Hf=b.attributes.id||
"";a.l.ue=Vd(b,"publishTime",Yd)||0;a.G=Od(b,"PatchLocation");t=Promise.resolve();if((w=Sd(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new Hv(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,y=Qd(w))(z=Vd(w,"queryBeforeStart",fe,!1))?t=Iv(a.h,y):Iv(a.h,y);A=u(f.keys());for(B=A.next();!B.done;B=A.next())D=B.value,G=f.get(D),Lv(a.h,"Location",D,G)}C=Od(b,"BaseURL");E=!1;if(a.h)for(I=u(C),K=I.next();!K.done;K=I.next())J=K.value,
L=J.attributes.serviceLocation,M=Qd(J),L&&M&&(Lv(a.h,"BaseURL",L,M),E=!0);a.U=null;E&&a.h||(O=C.map(Qd),a.U=lc(d,O));N=function(){return a.h&&E?Mv(a.h,"BaseURL"):a.U?a.U:[]};a.l.jb=N;P=0;C&&C.length&&(P=Vd(C[0],"availabilityTimeOffset",ee)||0);a.l.wb=P;a.J=Vd(b,"minimumUpdatePeriod",Zd,-1);R=Vd(b,"availabilityStartTime",Yd);T=Vd(b,"timeShiftBufferDepth",Zd);ca=a.g.dash.ignoreSuggestedPresentationDelay;Y=null;ca||(Y=Vd(b,"suggestedPresentationDelay",Zd));Ma=a.g.dash.ignoreMaxSegmentDuration;Na=null;
Ma||(Na=Vd(b,"maxSegmentDuration",Zd));Ea=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.R=a.i.presentationTimeline.T()&&"static"==Ea);a.l.type=Ea;if(a.i)for(va=a.i.presentationTimeline,Ka=va.Jb(),Pa=u(a.s.values()),za=Pa.next();!za.done;za=Pa.next())ia=za.value,ia.segmentIndex&&ia.segmentIndex.hb(Ka);else Aa=a.g.dash.ignoreMinBufferTime,eb=0,Aa||(eb=Vd(b,"minBufferTime",Zd)||0),fb=0,fb=null!=Y?Math.min(Y,T||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:Math.min(1.5*
eb,T||Infinity),va=new ql(R,fb,a.g.dash.autoCorrectDrift);va.jd("static"==Ea);(mb=va.T())&&!isNaN(a.g.availabilityWindowOverride)&&(T=a.g.availabilityWindowOverride);null==T&&(T=Infinity);va.$f(T);xb=b.attributes.profiles||"";a.l.profiles=xb.split(",");sb={pc:"static"!=Ea,presentationTimeline:va,za:null,va:null,ua:null,M:null,bandwidth:0,qh:!1,wb:P,sc:null,profiles:xb.split(","),roles:null,Nb:function(){return""}};return F(md,t,2);case 2:a.L=0;Ua=Iw(a,sb,N,b,!1);re=Ua.duration;tc=Ua.periods;("static"!=
Ea||a.R)&&Ua.Ki||va.vb(re||Infinity);a.P&&a.na&&va.Bj(a.Z);va.Bh(Na||1);a.P&&a.na&&(ze=null!=Y?Y:a.g.defaultPresentationDelay,va.Th(ze));if(!a.i)return F(md,a.m.Gg(tc,sb.pc),6);a.i.periodCount=tc.length;a.i.gapCount=a.L;return F(md,Jw(a,tc,!1),4);case 6:a.i={presentationTimeline:va,variants:a.m.l,textStreams:a.m.lh(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Kw(b),nextUrl:Lw(b),periodCount:tc.length,
gapCount:a.L,isLowLatency:a.P,startTime:null};if(!va.Uj()){md.A(7);break}tg=Od(b,"UTCTiming");return F(md,Mw(a,N,tg),8);case 8:ug=md.h;if(!a.j)return md.return();va.Cj(ug);case 7:va.Df(),a.m&&!a.i.presentationTimeline.T()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),Nw(a),Ow(a,tc),H(md)}})}
function Jw(a,b,c){var d;return Q(function(e){if(1==e.g)return F(e,a.m.Gg(b,!0,c),2);a.i.variants=a.m.l;d=a.m.lh();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
function Gw(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L;return Q(function(M){if(1==M.g){c=b.attributes.mpdId;d=Vd(b,"originalPublishTime",Yd);if(!c||c!==a.l.Hf||d!==a.l.ue)throw a.G=[],new V(1,4,4052);e=[];f=[];g=new Set;h=u(Nd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=he(l.attributes.sel||""),n=m[m.length-1],q=Qd(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.zc){r=Qd(l)||"";var O=Zd(r);if(null!=O){a.l.sc=O;for(var N=u(a.u.values()),P=N.next();!P.done;P=N.next())P.value.sc=
O}}else if("type"===n.zc){a.i.presentationTimeline.jd("static"==q);a.l.type=q;O=u(a.u.values());for(N=O.next();!N.done;N=O.next())N.value.pc="dynamic"==q;"static"==q&&(a.J=-1)}else"publishTime"===n.zc?a.l.ue=Yd(q)||0:null===n.zc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)ie(a.G,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Pw(a,n.id);else if("SegmentTemplate"===n.name){N=he(l.attributes.sel||"");O=N[N.length-1];if(O.zc){N=Qw(a,N);P=Qd(l)||
"";for(var R=u(N),T=R.next();!T.done;T=R.next())T=a.u.get(T.value),ke(T.M.Kc,l.tagName,O.zc,P);O=N}else O=[];t=O;w=u(t);for(v=w.next();!v.done;v=w.next())y=v.value,g.add(y)}else if("SegmentTimeline"===n.name||"S"===n.name){O=he(l.attributes.sel||"");O=Qw(a,O);N=u(O);for(P=N.next();!P.done;P=N.next())P=a.u.get(P.value),P=Wu(P,xv,"SegmentTimeline"),R=Od(P,"S"),ie(R,l),P.children=R;z=O;A=u(z);for(B=A.next();!B.done;B=A.next())D=B.value,g.add(D)}G=u(g);for(C=G.next();!C.done;C=G.next())E=C.value,Rw(a,
E);I=u(f);for(K=I.next();!K.done;K=I.next())J=K.value,e.push.apply(e,x(Sw(a,J)));if(!e.length)return M.A(2);a.i.periodCount+=e.length;a.i.gapCount=a.L;return F(M,Jw(a,e,!0),2)}"static"==a.l.type&&(L=a.l.sc,a.i.presentationTimeline.vb(L||Infinity));H(M)})}
function Sw(a,b){return Iw(a,{pc:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,za:null,va:null,ua:null,M:null,bandwidth:0,qh:!1,wb:a.l.wb,profiles:a.l.profiles,sc:a.l.sc,roles:null,Nb:function(){return""}},a.l.jb,b,!0).periods}function Pw(a,b){a.i.periodCount--;for(var c=u(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);Wu(e,xv,"SegmentTimeline").children=[];Rw(a,d);a.u.delete(d)}a.F=a.F.filter(function(f){return f!==b})}
function Qw(a,b){var c="",d="",e=-1,f="";b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=u(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.za.id===c&&a.ua.id===d&&a.M.id&&b.push(c+","+a.M.id);else if(-1<e)for(d=u(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.za.id===c&&a.ua.position===e&&a.M.id&&b.push(c+
","+a.M.id);return b}function Rw(a,b){var c=a.u.get(b),d=a.s.get(b);d.segmentIndex&&d.segmentIndex.hb(a.i.presentationTimeline.Jb());try{var e=wv(c,function(f,g,h,k){return Tw(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.oa,c.M.aesKey,null,!0,a.C);d.createSegmentIndex=function(){return Q(function(f){if(1==f.g)return d.segmentIndex?f.A(0):F(f,e.Tc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.M.contentType,b!=rc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
function Kw(a){var b=Sd(a,"ServiceDescription");if(!b)return null;a=Sd(b,"Latency");b=Sd(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 Lw(a){a=Od(a,"SupplementalProperty");if(!a.length)return null;a=u(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
function Iw(a,b,c,d,e){var f=b.sc;f||(f=Vd(d,"mediaPresentationDuration",Zd),a.l.sc=f);var g=0;a.i&&a.i.presentationTimeline&&a.R&&(g=a.i.presentationTimeline.bc());var h=[],k=g;d=Od(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=Vd(m,"start",Zd,k),r=m.attributes.id,t=Vd(m,"duration",Zd);q=0==l&&0==q&&a.R?g:q;var w=null;if(n){var v=Vd(n,"start",Zd);null!=v&&(w=v-q+g)}else null!=f&&(w=f-q+g);v=vc;w&&t&&Math.abs(w-t)>v&&w>t&&a.L++;null==w&&(w=t);if(!(null!==a.N&&null!==r&&null!==q&&q<
a.N)||a.F.includes(r)||l+1==d.length){null!==q&&(null===a.N||q>a.N)&&(a.N=q);k=Uw(a,b,c,{start:q,duration:w,node:m,Yi:null==w||!n});h.push(k);b.za.id&&w&&a.oa.set(b.za.id,w);if(null==w){k=null;break}k=q+w}}if(e)for(b=u(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.F.includes(c)||a.F.push(c);else a.F=h.map(function(y){return y.id});return null!=f?{periods:h,duration:f+g,Ki:!1}:{periods:h,duration:k,Ki:!0}}
function Nw(a){var b=Array.from(a.D.keys()).filter(function(h){return!a.F.includes(h)});b=u(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=u(a.D.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Ii(g,c),a.s.delete(f)))}d&&a.D.delete(c)}}function Ow(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=u(a.C.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.C.delete(d)}
function Uw(a,b,c,d){b.za=Vw(a,d.node,null,c);b.va=d;b.za.wb=b.wb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Od(d.node,"EventStream");c=b.presentationTimeline.Jb();e=u(e);for(var f=e.next();!f.done;f=e.next())Ww(a,d.start,d.duration,f.value,c);c=Od(d.node,"SupplementalProperty");c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Xw(a,e)))b.Nb=e;c=Od(d.node,"AdaptationSet").map(function(r,t){return Yw(a,b,t,r)}).filter(Bf);if(b.pc){e=
[];f=u(c);for(var g=f.next();!g.done;g=f.next()){g=u(g.value.Xl);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new V(2,4,4018);}e=new Map;f=u(c);for(g=f.next();!g.done;g=f.next())for(g=u(g.value.lk),h=g.next();!h.done;h=g.next()){var k=u(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=u(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=u(h.streams),m=l.next(),n={};!m.done;n={ai:void 0},m=l.next())if(n.ai=m.value,e.has(n.ai.originalId)){f||
(f=Od(d.node,"AdaptationSet").map(function(r,t){return Yw(a,b,t,r)}).filter(Bf));m=u(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(t){return t.originalId==r.ai.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.li});c=c.filter(function(r){return r.li});if(!a.g.disableIFrames)for(c=u(c),e=c.next();!e.done;e=c.next())for(e=
e.value,f=e.li.split(" "),g=u(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=u(h.streams),k=h.next();!k.done;k=h.next())kg(k.value,e.streams);c=Zw(a.g.disableAudio,d,"audio");e=Zw(a.g.disableVideo,d,"video");f=Zw(a.g.disableText,d,rc);d=Zw(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new V(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function Zw(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 Yw(a,b,c,d){function e(L){var M=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];M&&L&&(L=lc(b.ua.jb(),[L],b.Nb()),a.j.addFont(M,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.ua=Vw(a,d,b.za,null);b.ua.position=c;var h=!1;c=Od(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Bf),
l=void 0,m=b.ua.contentType==rc;m&&(l="subtitle");c=u(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(null==q||"urn:mpeg:dash:role:2011"==q)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Od(d,"EssentialProperty");c=null;var t=!1;n=null;q=!1;r=u(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
v)var y=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var z=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?t=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=Xw(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=Od(d,"SupplementalProperty");q=u(q);for(r=q.next();!r.done;r=q.next())r=r.value,w=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==
w?A=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?y=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?z=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(r):"urn:mpeg:dash:urlparam:2014"==w&&(n=Xw(a,r));n&&(b.Nb=n);n=Od(d,"Accessibility");var B=new Map,D;n=u(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=q||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
q||a.g.disableText)"urn:mpeg:dash:role:2011"==q?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==r?D="visually impaired":"2"==r?D="hard of hearing":"9"==r&&(D="spoken subtitles"));else if(q=1,null!=r)for(r=u(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var G=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],G=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,G=v);B.set(w,yc(G))}else B.set("svc1","und");else if(q=1,null!=r)for(r=
r.split(";"),w=u(r),v=w.next();!v.done;v=w.next()){G=v.value;var C=v=void 0;G.includes("=")?(G=G.split("="),v=G[0].startsWith("CC")?G[0]:"CC"+G[0],C=G[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,C=G);B.set(v,yc(C))}else B.set("CC1","und");n=Od(d,"ContentProtection");var E=Lu(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.ua.encrypted=0<n.length;var I=yc(b.ua.language||"und"),K=b.ua.label,J=new Map;d=Od(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=u(d);for(r=q.next();!r.done;r=q.next())if(w=
r.value,r=Wd(w,"urn:scte:dash:scte214-extensions","supplementalCodecs"))w=Dd(w),w.attributes.codecs=r.split(" ").join(","),w.attributes.id&&(w.attributes.supplementalId=w.attributes.id+"_supplementalCodecs"),n.push(w);d.push.apply(d,x(n))}n=d.map(function(L){var M=$w(a,b,E,l,I,K,h,k,B,L,D,A);return M&&(M.hdr=M.hdr||y,M.colorGamut=M.colorGamut||z,M.fastSwitching=t,L=L.attributes.dependencyId)?(M.baseOriginalId=L,J.set(L,M),null):M}).filter(function(L){return!!L});if(0==n.length&&0==J.size){c="image"==
b.ua.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new V(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=ax(n[0].mimeType,n[0].codecs),m=u(n),q=m.next();!q.done;q=m.next())q.value.type=b.ua.contentType;m=b.ua.id||"__fake__"+a.sa++;q=u(n);for(r=q.next();!r.done;r=q.next()){r=r.value;w=u(E.drmInfos);for(v=w.next();!v.done;v=w.next())v=v.value,v.keyIds=v.keyIds&&r.keyIds?new Set([].concat(x(v.keyIds),x(r.keyIds))):v.keyIds||r.keyIds;r.groupId=
m}d=d.map(function(L){return L.attributes.supplementalId||L.attributes.id}).filter(Bf);return{id:m,contentType:b.ua.contentType,language:I,Gn:h,streams:n,drmInfos:E.drmInfos,li:c,Xl:d,lk:J}}
function Xw(a,b){if((b=Td(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Vd(b,"useMPDUrlQuery",fe,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.Y:c.split("&").map(function(d){if("$querypart$"==d)return a.Y;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new yb(a.Y)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function $w(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Vw(a,l,b.ua,null);var q=b.M.id;a.Z=Math.min(a.Z,b.M.wb);a.P=0<a.Z;if(!bx(b.M))return null;var r=b.va.start;b.bandwidth=Vd(l,"bandwidth",be)||0;b.roles=h;var t=Od(l,"SupplementalProperty"),w=Od(l,"EssentialProperty"),v=Od(l,"ContentProtection");l=null;var y=w.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});y?l=Xw(a,y):(y=t.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(l=Xw(a,y));l&&(b.Nb=
l);y=b.M.contentType;l=y==rc||"application"==y;y="image"==y;v.length&&(b.ua.encrypted=!0);try{var z=void 0;if(c.zg){var A=b.M.jb,B=b.Nb,D=lc(A(),[c.zg.Bl],B()),G=Wg(D,a.g.retryParameters);z={bitsKey:128,blockCipherMode:"CBC",iv:c.zg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,P,R;return Q(function(T){if(1==T.g)return F(T,Ew(a,G,6),2);if(3!=T.g){N=T.h;if(!N.data||16!=N.data.byteLength)throw new V(2,4,4049);P={name:"AES-CBC"};R=z;return F(T,window.crypto.subtle.importKey("raw",N.data,P,
!0,["decrypt"]),3)}R.cryptoKey=T.h;z.fetchKey=void 0;H(T)})}}}b.M.aesKey=z;A=function(N,P,R,T){return Tw(a,N,P,R,T)};if(b.M.Md)var C=lv(b,A,z);else if(b.M.xc)C=rv(b,a.s,z);else if(b.M.Kc)C=wv(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.oa,z,n,!1,a.C);else{var E=b.va.duration||0,I=b.M.jb,K=b.M.mimeType,J=b.M.codecs;C={endTime:-1,timeline:-1,Tc:function(){var N=Ql(r,E,I());N.Gb(function(P){P.mimeType=K;P.codecs=J});return Promise.resolve(N)},timescale:1}}}catch(N){if((l||y)&&4002==N.code)return null;
throw N;}n=Pu(v,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);v=!1;t.some(function(N){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==N.attributes.schemeIdUri&&"JOC"==N.attributes.value})&&(v=!0);t=!1;l&&(t=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(y&&((w=w.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(L=w.attributes.value),!L))return null;var M;
l=b.M.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"))&&(M="PQ");w=b.M.id?b.za.id+","+b.M.id:"";a.G.length&&q&&a.u.set(b.za.id+","+q,cx(b));b.M.Qf&&dx(a,b.M.Qf,C,b.presentationTimeline);-1!=C.endTime&&null!=b.za.id&&null!=b.M.id&&((q=a.C.get(b.za.id))?(q.endTime=C.endTime,q.Kh.includes(b.M.id)||q.Kh.push(b.M.id),a.C.set(b.za.id,q)):a.C.set(b.za.id,{endTime:C.endTime,timeline:C.timeline,Kh:[b.M.id]}));
var O=w&&a.s.has(w)?a.s.get(w):{id:a.sa++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){O.segmentIndex&&(O.segmentIndex.release(),O.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:l,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ua.language,label:f,
type:b.ua.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:t,channelsCount:b.M.Jf,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:v,closedCaptions:k,hdr:M,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([af(b.M.mimeType,b.M.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};O.createSegmentIndex=function(){var N;return Q(function(P){if(1==P.g){if(O.segmentIndex)return P.A(0);
N=O;return F(P,C.Tc(),3)}N.segmentIndex=P.h;H(P)})};w&&b.pc&&!a.s.has(w)&&(b=b.za.id||"",a.D.has(b)||a.D.set(b,[]),a.s.set(w,O),a.D.get(b).push(w));return O}
function dx(a,b,c,d){if(!a.$.has(b)){a.$.add(b);var e=Vd(b,"presentationTime",ce)||0,f=Sd(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!("urn:mpeg:dash:utc:http-ntp:2014"===f||"urn:mpeg:dash:utc:ntp:2014"===f||"urn:mpeg:dash:utc:sntp:2014"===f);g?b=1E3*(Vd(b,"wallClockTime",Yd)||0):(b=Vd(b,"wallClockTime",ce)||0,b=Zj(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.s||d.Vh(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new U("prft",
d),a.j.onEvent(d))}}function cx(a){function b(c){if(!c)return null;c=Ed(c);c.Md=null;c.xc=null;c.Kc=me(c.Kc);c.Qf=null;return c}a=Ed(a);a.za=b(a.za);a.ua=b(a.ua);a.M=b(a.M);a.va&&(a.va=Ed(a.va),a.va.node=null);return a}
function Aw(a){var b,c;return Q(function(d){switch(d.g){case 1:return b=0,ta(d,2),F(d,Bw(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=xa(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();Cw(a,b);H(d)}})}function Cw(a,b){if(!(0>a.J)){var c=a.J;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.K.X(Math.max(c-b,Mc(a.ra)))}}
function Vw(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Jf:null,audioSamplingRate:null,wb:0,Yf:0,encrypted:!1};d=d||c.jb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Od(b,"BaseURL"),h,k=!1;if(a.h)for(var l=u(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=Qd(n);m&&n&&(Lv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(Qd));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n=
um([b.attributes.codecs||c.codecs]).join(",");var q=Vd(b,"frameRate",ge)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,t=ex(Od(b,"InbandEventStream"),c.emsgSchemeIdUris),w=Od(b,"AudioChannelConfiguration");w=fx(w)||c.Jf;var v=Vd(b,"audioSamplingRate",ce)||c.audioSamplingRate;l||(l=ax(m,n));var y=Sd(b,"SegmentBase"),z=Sd(b,"SegmentTemplate"),A=y?Vd(y,"availabilityTimeOffset",ee)||0:0,B=z?Vd(z,"availabilityTimeOffset",ee)||0:0,D=g&&g.length?Vd(g[0],"availabilityTimeOffset",ee)||0:0;A=c.wb+D+A+
B;B=null;(D=Sd(b,"SegmentSequenceProperties"))&&(D=Sd(D,"SAP"))&&(B=Vd(D,"cadence",ae));D=b.attributes.label;var G=Od(b,"Label");G&&G.length&&(G=G[0],Pd(G)&&(D=Pd(G)));return{jb:function(){return lc(d(),g.length?a.h&&k?Mv(a.h,e):h?h:[]:[])},Md:y||c.Md,xc:Sd(b,"SegmentList")||c.xc,Kc:z||c.Kc,Qf:Sd(b,"ProducerReferenceTime")||c.Qf,width:Vd(b,"width",ce)||c.width,height:Vd(b,"height",ce)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:q,pixelAspectRatio:r,emsgSchemeIdUris:t,id:f||e,originalId:e,
language:b.attributes.lang,Jf:w,audioSamplingRate:v,wb:A,vf:null,Yf:B||c.Yf,label:D||null,encrypted:!1}}function ex(a,b){b=b.slice();a=u(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 fx(a){a=u(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))&&0<b&&b<c.length)return c[b]}}return null}
function bx(a){var b=a.Md?1:0;b+=a.xc?1:0;b+=a.Kc?1:0;if(0==b)return a.contentType==rc||"application"==a.contentType?!0:!1;1!=b&&(a.Md&&(a.xc=null),a.Kc=null);return!0}
function gx(a,b,c,d){var e,f,g,h,k,l,m;return Q(function(n){if(1==n.g)return e=[cc(c)],f=lc(b(),e),g=Wg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ea()}),Qg(a.O,h),F(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Wb(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Mw(a,b,c){var d,e,f,g,h,k,l,m;return Q(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=u(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;ta(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.A(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.A(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":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return F(n,gx(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,gx(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:wa(n,
3);break;case 5:xa(n);case 3:g=f.next();n.A(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function Ww(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=Vd(d,"timescale",ce)||1,k=Vd(d,"presentationTimeOffset",ce)||0;d=u(Od(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=Vd(l,"presentationTime",ce)||0,n=Vd(l,"duration",ce)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(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:le(l),eventNode:me(l)},a.j.onTimelineRegionAdded(l))}}
function Tw(a,b,c,d,e){var f,g,h,k;return Q(function(l){if(1==l.g)return f=bh,g=e?0:1,h=ym(b,c,d,a.g.retryParameters),F(l,Ew(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function ax(a,b){b=af(a,b);return qf(b)?rc:a.split("/")[0]}function Ew(a,b,c,d){d||(d={});d.isPreload=a.ea();b=a.j.networkingEngine.request(c,b,d);Qg(a.O,b);return b.promise}
function Dw(a){var b=a.l.ue;if(!a.l.Hf||!b||!a.G.length)return[];var c=Date.now()/1E3,d=a.G.filter(function(e){e=ce(e.attributes.ttl);return!e||b+e>c}).map(Qd).filter(Bf);return d.length?lc(a.B,d):[]}S("shaka.dash.DashParser",zw);Bi("application/dash+xml",function(){return new zw});Bi("video/vnd.mpeg.dash.mpd",function(){return new zw});function hx(){}S("shaka.dependencies",hx);hx.has=function(a){return ix.has(a)};hx.add=function(a,b){if(!jx[a])throw Error(a+" is not supported");a==kx?Uc("mux.js","mux.js is no longer used in Shaka Player."):ix.set(a,function(){return b})};var kx="muxjs",jx={Hn:kx,ISOBoxer:"ISOBoxer"};hx.Allowed=jx;var ix=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function lx(){this.j=new Qb(function(){return 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?"android"==navigator.userAgentData.platform.toLowerCase()?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?"MOBILE":"DESKTOP"});this.l=new Qb(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 Ei(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=lx.prototype;p.ic=function(){return!!navigator.mediaCapabilities};p.Ia=function(){return this.j.value()};p.Na=function(){return this.l.value()};p.xe=function(){return!1};
p.qj=function(){return!1};p.wf=function(){return!1};p.rj=function(){return!1};p.we=function(){return!1};p.kd=function(){return!0};p.ld=function(){return!0};p.Be=function(){return!0};p.wj=function(){return 0};p.mc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Ij=function(){return!1};p.Zh=function(){return!1};
p.ab=function(a){var b=this.Ia();if("TV"===b||"CONSOLE"===b||"CAST"===b)a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.di=function(){return!!window.indexedDB};p.oj=function(){return[]};function Gn(a){Rb();return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}p.dg=function(){return!1};p.ej=function(){return!1};p.Oh=function(){return!1};p.ci=function(){return!0};p.fj=function(){return!1};
p.Qj=function(){return!0};p.toString=function(){return"Device: "+this.Qb()+" v"+this.Ga()+"; Type: "+this.Ia()};function mx(){lx.call(this);this.g=new Qb(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 Qb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints?"MOBILE":"xr"in navigator?"VR":"DESKTOP"})}pa(mx,lx);p=mx.prototype;p.Ga=function(){return this.g.value()};p.Qb=function(){return"Apple Browser"};p.Ia=function(){return this.h.value()};
p.Na=function(){return"WEBKIT"};p.ic=function(){return!1};p.xe=function(a,b){return"audio"===b};p.wf=function(){return!0};p.rj=function(a){return"audio"===a};p.ab=function(a){lx.prototype.ab.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.dg=function(){return!0};
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Tb=function(){return new mx});function nx(){if(!ox())throw Error("Not a Chromecast device!");lx.call(this);this.h=new Qb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new Qb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?px:a.includes("fuchsia")?qx:rx})}pa(nx,lx);p=nx.prototype;p.Ga=function(){return this.h.value()};p.Qb=function(){return"Chromecast with "+this.g.value()};
p.Ia=function(){return"CAST"};p.Na=function(){return"CHROMIUM"};p.ic=function(){return lx.prototype.ic.call(this)&&this.g.value()!==rx};p.ld=function(){return this.g.value()!==rx};p.wj=function(){switch(this.g.value()){case px:return 0;case qx:return 3;default:return 1}};
p.mc=function(){var a,b,c,d,e;return Q(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};ta(f,2);if(!(c=a)){f.A(4);break}return F(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.A(6);break}if(!(d=a)){f.A(7);break}return F(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:wa(f,3);break;case 2:e=xa(f),$a("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.ab=function(a){lx.prototype.ab.call(this,a);a.streaming.stallSkip=0;return a};p.di=function(){return!1};function ox(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var px="Android",qx="Fuchsia",rx="Linux";ox()&&(Tb=function(){return new nx});function sx(){lx.call(this);var a=this;this.i=new Qb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new Qb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new Qb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.s=new Qb(function(){return navigator.userAgent.match(/Edge?\//)?!a.h.value():!0});this.m=new Qb(function(){return navigator.userAgent.includes("sony.hbbtv.tv.G5")})}pa(sx,lx);p=sx.prototype;p.Ga=function(){return this.i.value()};p.Qb=function(){return this.g.value()};p.xe=function(a){return wg(a)?"Edge"===this.g.value()&&this.h.value():!1};p.qj=function(){return"Edge"===this.g.value()&&this.h.value()};
p.wf=function(){return"Edge"===this.g.value()&&this.h.value()};p.ld=function(){return this.s.value()};p.ab=function(a){lx.prototype.ab.call(this,a);this.h.value()&&"Edge"!==this.g.value()&&(a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"});return a};p.Oh=function(){return"Edge"===this.g.value()||this.m.value()};Ub=function(){return new sx};function tx(){lx.apply(this,arguments)}pa(tx,lx);p=tx.prototype;p.Ga=function(){return null};p.Qb=function(){return"Hisense"};p.Ia=function(){return"TV"};p.ic=function(){return!1};p.mc=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}null==b&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.ab=function(a){lx.prototype.ab.call(this,a);a.streaming.stallSkip=0;return a};
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))Tb=function(){return new tx};function ux(){lx.call(this);this.g=new Qb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}pa(ux,lx);p=ux.prototype;p.Qb=function(){return"PlayStation"};p.Ia=function(){return"CONSOLE"};p.Na=function(){return"WEBKIT"};p.Ga=function(){return this.g.value()};p.ic=function(){return!1};p.kd=function(){return!1};p.ld=function(){return!1};p.Zh=function(){return 4===this.Ga()};
p.mc=function(){var a,b,c,d,e;return Q(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,ta(f,2),F(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b="4K"===c.resolution;wa(f,3);break;case 2:return xa(f),ta(f,5),F(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b="4K"===d.resolution;wa(f,3);break;case 5:e=xa(f),ab("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){lx.prototype.ab.call(this,a);4===this.Ga()&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.Oh=function(){return 4===this.Ga()};p.ci=function(){return 4!==this.Ga()};navigator.userAgent.includes("PlayStation")&&(Tb=function(){return new ux});function vx(){lx.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}pa(vx,lx);p=vx.prototype;p.Ga=function(){return this.g};p.Qb=function(){return"Tizen"};p.Na=function(){return"CHROMIUM"};p.Ia=function(){return"TV"};p.xe=function(){return!0};p.we=function(){return 3===this.Ga()};p.ic=function(){return!1};p.kd=function(){var a=this.Ga();return null!==a?4<=a:lx.prototype.kd.call(this)};p.ld=function(){return!1};
p.Be=function(){return this.g&&this.h?5===this.g?5<=this.h:5<this.g:lx.prototype.Be.call(this)};
p.mc=function(){var a={width:1920,height: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){ab("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.ab=function(a){lx.prototype.ab.call(this,a);a.drm.ignoreDuplicateInitData=2!==this.Ga();3===this.Ga()&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.oj=function(){var a=[];null!==this.g&&5>this.g&&a.push("opus");return a};p.ej=function(){return!0};p.fj=function(){return 3===this.Ga()};navigator.userAgent.includes("Tizen")&&(Tb=function(){return new vx});function wx(){lx.apply(this,arguments)}pa(wx,lx);wx.prototype.Ga=function(){return null};wx.prototype.Qb=function(){return"Vizio"};wx.prototype.Ia=function(){return"TV"};wx.prototype.ic=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(Tb=function(){return new wx});function xx(){lx.call(this);this.h=new Qb(function(){return navigator.userAgent.includes("DT_STB_BCM")});this.g=new Qb(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})}pa(xx,lx);p=xx.prototype;p.Ga=function(){return this.g.value()};p.Qb=function(){return"WebKit STB"};p.Ia=function(){return"TV"};p.Na=function(){return"WEBKIT"};
p.ic=function(){return!1};p.kd=function(){var a=this.g.value();return null!==a?15<=a:!0};p.mc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.ci=function(){return!this.h.value()};
if(navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("DT_STB_BCM")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))Tb=function(){return new xx};function yx(){lx.call(this);this.g=zx()}pa(yx,lx);p=yx.prototype;p.Ga=function(){return this.g};p.Qb=function(){return"WebOS"};p.Ia=function(){return"TV"};p.Na=function(){return"CHROMIUM"};p.ic=function(){return!1};p.kd=function(){var a=this.Ga();return null!==a?3<a:lx.prototype.kd.call(this)};p.ld=function(){var a=this.Ga();return null!==a?6<a:lx.prototype.ld.call(this)};p.Be=function(){var a=this.Ga();return null!==a?3<a:lx.prototype.Be.call(this)};
p.mc=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){ab("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.ab=function(a){lx.prototype.ab.call(this,a);3===this.Ga()&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};
function zx(){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.Qj=function(){return!1};navigator.userAgent.includes("Web0S")&&(Tb=function(){return new yx});function Ax(){lx.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}pa(Ax,lx);p=Ax.prototype;p.Ga=function(){return this.h};p.Qb=function(){return"Xbox"};p.Ia=function(){return"CONSOLE"};p.Na=function(){return this.g?"EDGE":"CHROMIUM"};p.xe=function(){return!0};p.wf=function(){return!0};p.Ij=function(){return this.g};
p.mc=function(){var a={width:1920,height:1080},b=Bx();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){ab("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.ab=function(a){lx.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.di=function(){return!1};function Bx(){var a=null;try{a="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||null!==Bx())Tb=function(){return new Ax};function Cx(a,b,c){this.type=a;this.ma=b;this.segments=c||null}function Dx(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Dx.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);0<d.length&&(c+=":"+d.join(","));return c};
function Ex(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 Fx(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Gx(a,b,c){return(a=Fx(a,b))?a.value:c||null}function Hx(a,b){a=Fx(a,b);if(!a)throw new V(2,4,4023,b);return a.value}function Ix(a,b,c){c=void 0===c?[]:c;this.ma=b;this.g=a;this.ec=c}function Jx(a,b){this.name=a;this.value=b};function Kx(a,b){return a.filter(function(c){return c.name==b})}function Lx(a,b){return a.filter(function(c){return Hx(c,"TYPE")==b})}function Mx(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Nx(a,b,c){c=void 0===c?0:c;return(a=Mx(a,b))?Number(a.value):c}function Ox(a,b,c){return b?Px(a,[b],c):[]}function Px(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return Qx(e,c)}));return lc(a,d)}
function Qx(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=u(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 V(2,4,4039,e);}}return a};function Rx(){this.g=0}
function Sx(a,b){b=Wb(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new V(2,4,4015);b=0;for(var d=!0,e=u(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Tx(a,f),--a.g,Ux.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Tx(a,g);if(Vx.includes(g.name)){if(1!=b)throw new V(2,4,4017);g=
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=u(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Tx(a,k),Ux.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Gx(k,"TYPE")?f.push(k):"MAP"==Gx(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Ix(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Ix("",d,f)));return new Cx(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
g.name&&(g.attributes.push(new Jx("URI",h)),d=!0)}}return new Cx(b,e)}function Tx(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new V(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new vd(d);var f;(f=yd(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=yd(d,g);)c.push(new Jx(f[1],f[2]||f[3])),wd(d)}return new Dx(a,b,c,e)}
var Ux="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(" "),Vx="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 Wx(){}function Xx(a,b){try{var c=Yx(a);return Lg({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Jg(d)}}
function Yx(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new V(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new V(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=hc(a):e=$b(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Wx);Wx.parse=Xx;Sg("data",Xx);function Zx(){var a=this;this.g=this.h=null;this.F=1;this.B=new Map;this.I=new Map;this.L=new Map;this.L.set("video",new Map);this.L.set("audio",new Map);this.L.set(rc,new Map);this.L.set("image",new Map);this.dc=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return $x(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=Hx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Hx(b,"URI");c=Yx(c.split("?")[0]);
c=Kb(c.data);d=mc("com.widevine.alpha",d,[{initDataType:"cenc",initData:c}]);(b=Gx(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=Hx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");b=Hx(b,"URI");b=Yx(b.split("?")[0]);b=Kb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);c=wh(b,c,new Set,0);d=mc("com.microsoft.playready",
d,[{initDataType:"cenc",initData:c}]);if(b=Hd(["<PLAYREADY>",gc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Ku(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Hx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Hx(b,"URI");c=Yx(c.split("?")[0]);c=Kb(c.data);d=mc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=Gx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));
b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.Za=new Set;this.i=new Map;this.l=null;this.D="";this.Ka=new Rx;this.J=-1;this.Z=Infinity;this.Y=this.vc=this.Ta=!1;this.C=new yf(function(){if(a.R&&!a.g.continueLoadingWhenPaused&&(a.P.Ca(a.R,"timeupdate"),a.R.paused)){a.P.qa(a.R,"timeupdate",function(){return ay(a)});return}ay(a)});this.sa=by;this.m=null;this.Ma=0;this.s=Infinity;this.gb=this.Ha=this.O=0;this.U=new Pg;this.G=new Map;this.H=new Map;this.ra=new Map;this.ea=new Map;this.K=
new Map;this.na=new Map;this.oa=new Map;this.tc=this.$=!1;this.eb=new Lc(5);this.j=null;this.N=!0;this.P=new Oc;this.u=this.R=null;this.Kb=function(){return!1}}p=Zx.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Kb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.T()&&this.C.Ja()};
p.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.$=b.isLowLatencyMode(),F(e,cy(c,[a]).promise,2)):3!=e.g?(d=e.h,c.D=d.uri,F(e,dy(c,d.data),3)):e.return(c.m)})};
p.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.U&&(a.push(this.U.destroy()),this.U=null);this.g=this.h=null;this.Za.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.B.clear();this.ra.clear();this.ea.clear();this.K.clear();this.na.clear();this.oa.clear();this.j&&this.j.destroy();this.P&&(this.P.release(),this.P=null);return Promise.all(a)};
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,q;return Q(function(r){if(1==r.g){if(!ey(a))return r.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(t){return t.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(fy(a,g));return F(r,Promise.all(b),2)}gy(a,d.map(function(t){return t.stream}));h=d.some(function(t){return 0==t.ee});d.length&&!h&&(k=hy,iy(a,k.$j),l=d.map(function(t){return t.rc}),a.l.vb(Math.min.apply(Math,x(l))),
a.h.updateDuration());h&&jy(a);m=u(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||bg(q.stream.segmentIndex)||a.h.disableStream(q.stream);H(r)})};function ky(a,b){return ey(a)?a.L.get(b.type):b.Ef}
function fy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na;return Q(function(Ea){switch(Ea.g){case 1:if(b.stream.isAudioMuxedInVideo)return Ea.return();c=[];d=u(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new qb(f),h=g.g,b.df&&(0<=b.Vb&&h.add("_HLS_msn",String(b.Vb)),0<=b.Wb&&h.add("_HLS_part",String(b.Wb))),b.ef&&h.add("_HLS_skip","YES"),Hb(h)&&vb(g,wb(h.toString())),c.push(g.toString());ta(Ea,2);return F(Ea,cy(a,c,!0).promise,4);case 4:k=Ea.h;wa(Ea,
3);break;case 2:throw l=xa(Ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Ea.return();m=Sx(a.Ka,k.data);if(1!=m.type)throw new V(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.Tf.push(n);q=Kx(m.ma,"EXT-X-DEFINE");r=ly(a,q,n);t=b.stream;w=ky(a,b);return F(Ea,my(a,m,t.mimeType,b.S,r),5);case 5:v=Ea.h;y=v.keyIds;z=v.drmInfos;A=v.encrypted;B=v.ti;t.encrypted||!A||B||(t.encrypted=!0);D=function(va,Ka){return va.size===Ka.size&&[].concat(x(va)).every(function(Pa){return Ka.has(Pa)})};
D(t.keyIds,y)||(t.keyIds=y,t.drmInfos=z,a.h.newDrmInfo(t));G=ny(a,m,w,r,b.S,b.type);C=G.segments;if(E=G.bandwidth)t.bandwidth=E;I=cm(t);K=u(C);for(J=K.next();!J.done;J=K.next())L=J.value,L.ha&&(L.ha.Cd=I);t.segmentIndex.pe(C,a.l.Jb());C.length&&(M=Nx(m.ma,"EXT-X-MEDIA-SEQUENCE",0),N=(O=Mx(m.ma,"EXT-X-SKIP"))?Number(Gx(O,"SKIPPED-SEGMENTS")):0,P=oy(M,C),R=P.Vb,T=P.Wb,b.Vb=R+N,b.Wb=T,ca=w.get(M),t.segmentIndex.hb(ca));if(Y=bg(t.segmentIndex))b.dd=Y.startTime,Ma=C[C.length-1],b.rc=Ma.endTime;if(Na=Mx(m.ma,
"EXT-X-ENDLIST"))b.ee=!0;py(a,m);qy(a,m.ma,t.type,r,b.S);H(Ea)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.R=a};
function ry(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.J,e=u(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=ky(a,f);if(g=bg(g)){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=u(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.J=Math.max(a.J,l));f.Og=l;break}}}}if(!(0>a.J))for(b=u(b),d=b.next();!d.done;d=b.next())if(d=d.value,sy(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.J-d.Og,0<f&&(e.g.splice(0,f),e=bg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
ty(a,d,e)}
function uy(a,b){if(Infinity==a.Z){b=u(b);for(var c=b.next();!c.done;c=b.next())c=bg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.Z=Math.min(a.Z,c.h))}b=a.Z;if(Infinity!=b){c=u(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!sy(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=bg(e);if(f)if(null==f.h)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(ty(a,d,f.h-b-f.startTime),d=u(e),e=d.next();!e.done;e=d.next())e.value.ei(b)}}}}
function ty(a,b,c){if(!(.001>Math.abs(c))){b.dd+=c;b.rc+=c;a=ky(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}}
function dy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za,ia;return Q(function(Aa){switch(Aa.g){case 1:c=uc;d=Sx(a.Ka,b);e=Kx(d.ma,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ql(null,0);a.l.jd(!0);k=function(){return[a.D]};l=null;m=new Map;if(1==d.type)return a.N=!1,R=Kx(d.ma,"EXT-X-DEFINE"),m=ly(a,R,a.D),l=c.Ea,T="",ca=new Map,F(Aa,vy(a,a.F++,m,d,k,"",l,T,!0,"Media Playlist",null,ca,null,!1,null,!1),7);wy(a,e);n=Kx(d.ma,"EXT-X-MEDIA");q=Kx(d.ma,"EXT-X-STREAM-INF");
r=Kx(d.ma,"EXT-X-IMAGE-STREAM-INF");t=Kx(d.ma,"EXT-X-I-FRAME-STREAM-INF");w=Kx(d.ma,"EXT-X-SESSION-KEY");v=Kx(d.ma,"EXT-X-SESSION-DATA");y=Kx(d.ma,"EXT-X-CONTENT-STEERING");xy(a,v);return F(Aa,yy(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];A=u(q);B=A.next();for(D={};!B.done;D={Oj:void 0},B=A.next())if(G=B.value,C=Gx(G,"SUPPLEMENTAL-CODECS"))D.Oj=C.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),E=G.attributes.map(function(eb){return function(fb){var mb=fb.name,xb=fb.value;"CODECS"==
mb&&(xb=eb.Oj.join(","),fb=fb.value.split(","),1<fb.length&&(fb=pc("audio",fb))&&(xb+=","+fb));return new Jx(mb,xb)}}(D)),z.push(new Dx(G.id,G.name,E,null));q.push.apply(q,x(z));I=[];K=u(t);J=K.next();for(L={};!J.done;L={Pj:void 0},J=K.next())if(M=J.value,O=Gx(M,"SUPPLEMENTAL-CODECS"))L.Pj=O.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),N=M.attributes.map(function(eb){return function(fb){var mb=fb.name;fb=fb.value;"CODECS"==mb&&(fb=eb.Pj.join(","));return new Jx(mb,fb)}}(L)),I.push(new Dx(M.id,
M.name,N,null));t.push.apply(t,x(I))}zy(a,q);Ay(a,n);P=By(a,t);return F(Aa,Cy(a,q,w,n,k,a.B,P),5);case 5:return f=Aa.h,g=Dy(a,n),F(Aa,Ey(a,r,t),6);case 6:h=Aa.h;Aa.A(3);break;case 7:Y=Aa.h,a.i.set(a.D,Y),Y.stream&&(Ma=cm(Y.stream),Y.stream.segmentIndex.Gb(function(eb){eb.ha&&(eb.ha.Cd=Ma)})),l=Y.stream.type,Na=!0,a.g.disableAudio&&"audio"==Y.type?Na=!1:a.g.disableVideo&&"video"==Y.type&&!Y.stream.codecs.includes(",")&&(Na=!1),Na&&f.push({id:0,language:yc(T||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
Y.type?Y.stream:null,video:"video"==Y.type?Y.stream:null,bandwidth:Y.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new V(2,7,7001);Fy(a,d);1==d.type&&(ey(a)&&(Gy(a,d),Ea=a.s,a.C.X(Ea)),va=Array.from(a.i.values()),Hy(a,va),jy(a),qy(a,d.ma,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.u};if(a.Y||!a.g.hls.disableCodecGuessing){Aa.A(8);break}Ka=[];Pa=u(a.m.variants);for(za=Pa.next();!za.done;za=Pa.next())ia=za.value,ia.audio&&""===ia.audio.codecs&&Ka.push(ia.audio.createSegmentIndex()),ia.video&&""===ia.video.codecs&&Ka.push(ia.video.createSegmentIndex());return F(Aa,Promise.all(Ka),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),H(Aa)}})}
function Iy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A;return Q(function(B){if(1==B.g){c=sm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return B.return(c);d=Jy(a,b);e=d.segment;f=d.segmentIndex;g=e.S();h=g[0];k=new qb(h);l=k.ub.split(".").pop();return(m=Ky.get(l))?B.return(sm(m)):F(B,Promise.all([Ly(a,e.ha,0),Ly(a,e,f)]),2)}n=B.h;q=n[1].mimeType;r=n[0].data;t=n[1].data;w="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];y=e.ha||v.includes(q);
if(!y&&uk(Kb(t))){var D=t,G=a.g.disableAudio,C=a.g.disableVideo,E=a.g.disableText;var I=Kb(D);var K=(new mk).parse(I),J=K.ae();I=K.mh();var L=[],M=!1,O=!1;if(!G)switch(J.audio){case "aac":case "aac-loas":K.yb().length&&(L.push("mp4a.40.2"),M=!0);break;case "mp3":K.yb().length&&(L.push("mp4a.40.34"),M=!0);break;case "ac3":K.yb().length&&(L.push("ac-3"),M=!0);break;case "ec3":K.yb().length&&(L.push("ec-3"),M=!0);break;case "opus":K.yb().length&&(L.push("opus"),M=!0)}if(!C)switch(J.video){case "avc":I.codec?
L.push(I.codec):L.push("avc1.42E01E");O=!0;break;case "hvc":I.codec?L.push(I.codec):L.push("hvc1.1.6.L93.90");O=!0;break;case "av1":L.push("av01.0.01M.08"),O=!0}if(L.length){G=M&&!O;C=new Map;if(O&&!E){E=new id("video/mp2t");E.Nf(D);D=u(E.qg());for(O=D.next();!O.done;O=D.next())O=O.value,C.set(O,O);E.Rd()}I={type:G?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:C,Fe:null,colorGamut:null,frameRate:I.frameRate}}else I=
null;if(z=I)return B.return(z)}else if(y||w.includes(l))if(A=tm(r,t,a.g.disableText))return B.return(A);return q?B.return(sm(q)):B.return(c)})}
function Ly(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=bh;e=ym(b.S(),b.Dc(),b.Bc(),a.g.retryParameters);f=b instanceof zj?1:0;return F(l,My(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.A(3);break}return F(l,xm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof zj?b.ye(h,!0):b.ye(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function jy(a){if(ey(a)){if(a.sa==Ny){for(var b=Infinity,c=Infinity,d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.rc),c=Math.min(c,e.dd));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.$f(b)}}else a.l.vb(Oy(a));if(!a.l.s)for(b=u(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=bg(c.stream.segmentIndex))&&
c.h&&a.l.Vh(c.h);a.l.Df()}function wy(a,b){var c=(new qb(a.D)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Gx(e,"NAME");var f=Gx(e,"VALUE");e=Gx(e,"QUERYPARAM");d&&f&&(a.B.has(d)||a.B.set(d,f));e&&(d=c.get(e)[0])&&!a.B.has(d)&&a.B.set(e,d)}}
function ly(a,b,c){c=(new qb(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Gx(f,"NAME"),h=Gx(f,"VALUE");e=Gx(f,"QUERYPARAM");f=Gx(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.B.get(f))&&d.set(f,e)}return d}
function zy(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Gx(d,"AUDIO");c=Gx(d,"VIDEO");var f=Gx(d,"SUBTITLES");d=Py(a,d);if(f){var g=pc(rc,d);a.H.set(f,g);sd(d,g)}e&&(f=pc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.H.set(e,f));c&&(e=pc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.H.set(c,e))}}
function xy(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Gx(d,"DATA-ID");c=Gx(d,"URI");var f=Gx(d,"LANGUAGE");d=Gx(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Ox([a.D],c,a.B)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function yy(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Gx(f,"PATHWAY-ID"),h=Gx(f,"SERVER-URI"),g&&h){a.j=new Hv(a.h);a.j.configure(a.g);a.j.i=[a.D];a.j.setManifestType("HLS");a.j.h=g;c=Iv(a.j,h);break}return F(k,c,0)})}
function Dy(a,b){var c=Lx(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Qy(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Hx(d.value,"GROUP-ID");if(d=a.H.get(e))if(e=a.I.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Ry(rc,d)||Sy(rc),Ty(f.stream)}}return b.filter(function(g){return g})}
function Ty(a){var b=new Set([af(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Gb(function(c){c.mimeType&&b.add(af(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function Ey(a,b,c){var d,e;return Q(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return Q(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return F(m,Uy(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=xa(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=Vy(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function Wy(a,b,c){b=b.filter(function(h){var k=Gx(h,"URI")||"";h=Gx(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ex(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Qy(a,d[g],c,!1)}function By(a,b){return b.map(function(c){c=Vy(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
function Cy(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa;return Q(function(za){switch(za.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(0<c.length)){za.A(2);break}l=u(c);m=l.next();case 3:if(m.done){za.A(2);break}n=m.value;q=Hx(n,"METHOD");r=Gx(n,"KEYFORMAT")||"identity";t=null;if("NONE"==q){za.A(4);break}if(Xy(q)){w=Ox(e(),Hx(n,"URI"),f);v=w.sort().join("");a.K.has(v)||(y=Wg(w,a.g.retryParameters),z=My(a,y,6).promise,a.K.set(v,z));za.A(4);break}if("identity"==
r)return F(za,Yy(a,n,"",e,null,f),12);A=a.dc.get(r);if(!A){B=null;za.A(10);break}return F(za,A(n,"",null),11);case 11:B=za.h;case 10:t=B;za.A(6);break;case 12:t=za.h;case 6:if(t){if(t.keyIds)for(D=u(t.keyIds),G=D.next();!G.done;G=D.next())C=G.value,k.add(C);h.push(t)}case 4:m=l.next();za.A(3);break;case 2:E={};I=u(b);for(K=I.next();!K.done;K=I.next())J=K.value,L=Ex(J,!a.j),E[L]?E[L].push(J):E[L]=[J];M=[];for(O in E)N=E[O],P=N[0],R=Gx(P,"FRAME-RATE"),T=Number(Gx(P,"AVERAGE-BANDWIDTH"))||Number(Hx(P,
"BANDWIDTH")),ca=Gx(P,"RESOLUTION"),Y=u(ca?ca.split("x"):[null,null]),Ma=Y.next().value,Na=Y.next().value,Ea=Gx(P,"VIDEO-RANGE"),(va=Gx(P,"REQ-VIDEO-LAYOUT"))&&va.includes(",")&&(Ka=va.split(",").filter(function(ia){return"CH-STEREO"==ia||"CH-MONO"==ia}),va=Ka[0]),va=va||"CH-MONO",Pa=Zy(a,N,d),M.push.apply(M,x($y(a,Pa.audio,Pa.video,T,Ma,Na,R,Ea,va,h,k,g)));return za.return(M.filter(function(ia){return null!=ia}))}})}
function Zy(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=u(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Gx(m,"AUDIO");var n=Gx(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Gx(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(t){return f.includes(Hx(t,"GROUP-ID"))}),Wy(a,c,e));c=(e=f.sort().join(","))&&a.I.has(e)?a.I.get(e):[];g?d.audio.push.apply(d.audio,x(c)):h&&d.video.push.apply(d.video,x(c));g=!1;var r=b.map(function(t){return Hx(t,
"URI")});l=d.audio.find(function(t){return t&&t.S().find(function(w){return r.includes(w)})});h=Py(a,b[0]);c=pc("video",h);(k=pc("audio",h))&&!c?(l="audio",g=0<d.audio.length):!d.audio.length&&!d.video.length&&k&&c?(l="video",h=[[c,k].join()]):d.audio.length&&l?(l="audio",g=!0):l=d.video.length&&!d.audio.length?"audio":"video";g||(a=az(a,b,h,l),e&&(a.stream.groupId=e),d[a.stream.type]=[a]);return d}
function Py(a,b){b=Gx(b,"CODECS")||"";a.Y=0<b.length;a.Y||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 um(b.split(/\s*,\s*/))}
function $y(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=u(c),r=q.next();!r.done;r=q.next())bz(r.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var t=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=t?t.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||kg(k,n);k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:
null;r=t?t.stream.drmInfos:null;t=t?t.S().sort().join(","):"";var w=f?f.S().sort().join(","):"",v=[];h&&h.codecs&&v.push(h.codecs);k&&k.codecs&&v.push(k.codecs);t=[t,w,v.sort()].join("-");h&&k&&!rg(q,r)||a.Za.has(t)||(h={id:a.F++,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.Za.add(t))}return e}
function Ay(a,b){b=Lx(b,"CLOSED-CAPTIONS");a.N=0==b.length;b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Gx(d,"LANGUAGE");c=yc(e||"und");e||(e=Gx(d,"NAME"))&&(c=e);e=Hx(d,"GROUP-ID");d=Hx(d,"INSTREAM-ID").replace("SERVICE","svc");a.G.get(e)||a.G.set(e,new Map);a.G.get(e).set(d,c)}}
function Qy(a,b,c,d){d=void 0===d?!0:d;for(var e=[],f=[],g=new Map,h=u(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=d?Hx(l,"URI"):Gx(l,"URI")||"shaka://hls-muxed";l=Hx(l,"GROUP-ID");e.push(k);f.push(l);g.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=Hx(k,"TYPE").toLowerCase();"subtitles"==h&&(h=rc);if(h==rc)b=Gx(k,"CODECS")||"";else for(f=u(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.H.has(l)){b=a.H.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);l=a.F++;if(a.j){g=u(g);for(var m=
g.next();!m.done;m=g.next()){var n=u(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Lv(a.j,l,m,n)}}c=Gx(k,"LANGUAGE");g=Gx(k,"NAME");m="YES"==Gx(k,"DEFAULT");"audio"==h?n=(n=Gx(k,"CHANNELS"))?parseInt(n.split("/")[0],10):null:n=null;var q;"audio"==h?(q=Gx(k,"CHANNELS"))?(q=q.split("/"),q=2!=q.length?!1:"JOC"===q[1]||q[1].includes("ATMOS")):q=!1:q=!1;var r=Gx(k,"CHARACTERISTICS"),t="YES"==Gx(k,"FORCED");"audio"==h?k=(k=Gx(k,"SAMPLE-RATE"))?parseInt(k,10):null:k=null;e=cz(a,l,e,b,h,c,m,g,
n,null,r,t,k,q);e.stream&&(e.stream.groupId=d);a.I.has(d)?a.I.get(d).push(e):a.I.set(d,[e]);a.i.set(f,e);return e}
function Uy(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(1==q.g){c=Hx(b,"URI");d=Gx(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Gx(b,"LANGUAGE");f=Gx(b,"NAME");g=Gx(b,"CHARACTERISTICS");h=cz(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Gx(b,"RESOLUTION"))?F(q,h.stream.createSegmentIndex(),3):q.A(2)}2!=q.g&&(l=bg(h.stream.segmentIndex),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]));if(n=Gx(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
function Vy(a,b){var c="video",d=Hx(b,"URI"),e=Gx(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Gx(b,"LANGUAGE"),g=Gx(b,"NAME"),h=Gx(b,"CHARACTERISTICS");c=cz(a,a.F++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Gx(b,"RESOLUTION");f=u(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=Gx(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function az(a,b,c,d){for(var e=a.F++,f=[],g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Hx(k,"URI");k=Gx(k,"PATHWAY-ID");a.j&&k&&Lv(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=Gx(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.N=!1;b=null;break a}if(b){if("NONE"!=b){b=a.G.get(b);break a}a.N=!1}else if(!b&&a.G.size)for(b=u(a.G.keys()).next();!b.done;){b=a.G.get(b.value);break a}}b=null}c=oc(d,c);d=cz(a,e,f,c,d,
null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function cz(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function t(B){var D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za;return Q(function(ia){switch(ia.g){case 1:return D=uc,ta(ia,2),F(ia,B.promise,4);case 4:G=ia.h;if(B.aborted)return ia.return();C=G.uri;C!=G.originalUri&&(E=y.S(),E.includes(C)||y.Tf.push(C));I=Sx(a.Ka,G.data);if(1!=I.type)throw new V(2,4,4017);K=Kx(I.ma,"EXT-X-DEFINE");J=ly(a,K,C);L=!1;(!a.Y&&a.g.hls.disableCodecGuessing||a.N&&e==D.Ea&&!a.g.hls.disableClosedCaptionsDetection)&&0<I.segments.length&&
(a.N=!1,L=!0);M=!a.Y&&a.g.hls.disableCodecGuessing;O=ey(a);return F(ia,vy(a,0,J,I,w,d,e,f,g,h,k,l,m,n,q,r,void 0,L,M),5);case 5:N=ia.h;if(B.aborted)return ia.return();P=N.stream;Fy(a,I);ey(a)&&!O&&Gy(a,I);y.dd=N.dd;y.rc=N.rc;y.ef=N.ef;y.df=N.df;y.ee=N.ee;y.Ef=N.Ef;y.Vb=N.Vb;y.Wb=N.Wb;y.yh=!0;v.segmentIndex=P.segmentIndex;v.encrypted=P.encrypted;v.drmInfos=P.drmInfos;v.keyIds=P.keyIds;v.mimeType=P.mimeType;v.bandwidth=v.bandwidth||P.bandwidth;v.codecs=v.codecs||P.codecs;v.closedCaptions=v.closedCaptions||
P.closedCaptions;v.width=v.width||P.width;v.height=v.height||P.height;v.hdr=v.hdr||P.hdr;v.colorGamut=v.colorGamut||P.colorGamut;v.frameRate=v.frameRate||P.frameRate;"und"==v.language&&"und"!=P.language&&(v.language=P.language);v.language=v.language||P.language;v.channelsCount=v.channelsCount||P.channelsCount;v.audioSamplingRate=v.audioSamplingRate||P.audioSamplingRate;Ty(v);v.drmInfos.length&&a.h.newDrmInfo(v);R=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)R=!0;
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.Ea||e==D.ba)for(T=u(a.i.values()),ca=T.next();!ca.done;ca=T.next())Y=ca.value,Y.yh||Y.type!=e||(Y.stream.mimeType=P.mimeType,Ty(Y.stream));e==D.Xa&&(Ma=bg(P.segmentIndex))&&Ma.ha&&(v.mimeType="application/mp4",Ty(v));Na=cm(v);v.segmentIndex.Gb(function(Aa){Aa.ha&&(Aa.ha.Cd=Na)});tz(a)&&(a.vc?Hy(a,[y]):(a.vc=!0,Ea=Array.from(a.i.values()),va=Ea.filter(function(Aa){return Aa.stream.segmentIndex}),Hy(a,va),jy(a),Ka=a.s,0<Ka&&a.C.X(Ka)));qy(a,
I.ma,v.type,J,w);a.m&&(a.m.startTime=a.u);wa(ia,0);break;case 2:Pa=xa(ia);v.closeSegmentIndex();if(7001===Pa.code)return ia.return();za=a.h.disableStream(v);if(!za)throw Pa;H(ia)}})}function w(){return a.j&&1<c.length?Mv(a.j,b):y.Tf.concat(Px([a.D],c,a.B))}var v=uz(a,d,e,f,g,h,k,l,m,n,q,r);c.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",Ty(v));var y={stream:v,type:e,Tf:[],dd:0,rc:0,Ef:new Map,ef:!1,df:!1,ee:!1,Og:-1,Vb:-1,Wb:-1,yh:!1,S:w},z=null,A;v.createSegmentIndex=
function(){if(z)return z;if(v.isAudioMuxedInVideo)return v.segmentIndex=new Ol([]),Promise.resolve();A=cy(a,y.S(),!0);return z=new Promise(function(B){B(t(A))})};v.closeSegmentIndex=function(){z&&!v.segmentIndex&&A.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);z=null};return y}
function Oy(a){var b=Infinity;a=u(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.rc));return b}function gy(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Gb(function(e){c.push(e)});a.l.re(c)}
function Hy(a,b){if(!ey(a))for(var c=Oy(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vd(0,c);gy(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"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=ey(a)&&!a.Ta;c=!ey(a)&&a.Ta&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?ry(a,b,d):(uy(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&ry(a,
b))}function sy(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function tz(a){if(!a.m)return!1;var b=[],c=[];a=u(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 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function vy(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z){y=void 0===y?!0:y;z=void 0===z?!0:z;var A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za,ia,Aa,eb,fb;return Q(function(mb){switch(mb.g){case 1:A=d.segments||[];B=A.every(function(xb){return Mx(xb.ma,"EXT-X-GAP")?!0:!1});if(!A.length||B)throw new V(2,4,4053);vz(a,d);ey(a)&&py(a,d);D=ey(a)?a.L.get(g):new Map;G=ny(a,d,D,c,e,g);C=G.segments;E=G.bandwidth;M=L=J=K=I=null;if(!(0<C.length&&y)){mb.A(2);break}return F(mb,Iy(a,C),3);case 3:O=mb.h,g=
O.type,h=O.language,m=O.channelCount,t=O.sampleRate,a.g.disableText||(n=O.closedCaptions),K=O.height,I=O.width,J=O.Fe,L=O.colorGamut,M=O.frameRate,z&&(v=O.mimeType,f=O.codecs);case 2:if(v){mb.A(4);break}return F(mb,wz(a,g,f,C),5);case 5:v=mb.h,g!=rc||f||"application/mp4"!=v||!C[0]||C[0].ha||(v="text/vtt");case 4:return F(mb,my(a,d,v,e,c),6);case 6:N=mb.h;P=N.drmInfos;R=N.keyIds;T=N.encrypted;ca=N.ti;if(T&&!P.length&&!ca)throw new V(2,4,4026);Y=uz(a,f,g,h,k,l,m,n,q,r,t,w);Y.encrypted=T&&!ca;Y.drmInfos=
P;Y.keyIds=R;Y.mimeType=v;E&&(Y.bandwidth=E);Ty(Y);"video"==g&&(I||K||J||L)&&bz(Y,I,K,M,J,null,L);ey(a)&&py(a,d);Ma=C[0].startTime;Na=C[C.length-1];Ea=Na.endTime;va=new Ol(C);Y.segmentIndex=va;Pa=(Ka=Mx(d.ma,"EXT-X-SERVER-CONTROL"))?null!=Fx(Ka,"CAN-SKIP-UNTIL"):!1;za=Ka?null!=Fx(Ka,"CAN-BLOCK-RELOAD"):!1;ia=Nx(d.ma,"EXT-X-MEDIA-SEQUENCE",0);Aa=oy(ia,C);eb=Aa.Vb;fb=Aa.Wb;return mb.return({stream:Y,type:g,Tf:[],S:e,dd:Ma,rc:Ea,ef:Pa,df:za,ee:!1,Og:-1,Vb:eb,Wb:fb,Ef:D,yh:!1})}})}
function oy(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Vb:a,Wb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Vb:a,Wb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Vb:a,Wb:c}}
function uz(a,b,c,d,e,f,g,h,k,l,m,n){var q=Ry(c,b)||Sy(c),r=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())r.push(t.value)}k=void 0;t=null;c==rc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(t="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,kind:c==rc?"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:t,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};Ty(a);return a}
function my(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R;return Q(function(T){switch(T.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Kx(k.ma,"EXT-X-KEY"),m=null,l.length)for(m=xz(a,b,k.ma,d,e),n=u(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);w=t=!1;v=[];y=new Set;z=u(f);A=z.next();case 2:if(A.done){T.A(4);break}B=A.value;D=u(B);G=D.next().value;C=D.next().value;E=G;I=C;K=Hx(E,"METHOD");if("NONE"==
K){T.A(3);break}t=!0;J=Gx(E,"KEYFORMAT")||"identity";L=null;if(Xy(K)){w=!0;T.A(3);break}if("identity"==J)return F(T,Yy(a,E,c,d,I,e),11);M=a.dc.get(J);if(!M){O=null;T.A(9);break}return F(T,M(E,c,I),10);case 10:O=T.h;case 9:L=O;T.A(6);break;case 11:L=T.h;case 6:if(L){if(L.keyIds)for(N=u(L.keyIds),P=N.next();!P.done;P=N.next())R=P.value,y.add(R);v.push(L)}case 3:A=z.next();T.A(2);break;case 4:return T.return({drmInfos:v,keyIds:y,encrypted:t,ti:w})}})}
function yz(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new V(2,4,4042);var f=0,g=Gx(b,"IV","");if(g){var h=ic(g.substr(2));if(16!=h.byteLength)throw new V(2,4,4048);}else f=Nx(c.ma,"EXT-X-MEDIA-SEQUENCE",0);var k=Ox(d(),Hx(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.ea.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Hx(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,t;return Q(function(w){if(1==w.g)return a.K.has(l)||(n=Wg(k,a.g.retryParameters),q=My(a,n,6).promise,a.K.set(l,q)),F(w,a.K.get(l),2);if(3!=w.g){r=w.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new V(2,4,4049);t={name:"CTR"==m.blockCipherMode?"AES-CTR":"AES-CBC",length:m.bitsKey};return F(w,window.crypto.subtle.importKey("raw",r.data,t,!0,["decrypt"]),3)}m.cryptoKey=
w.h;m.fetchKey=void 0;H(w)})};a.ea.set(c,m)}return a.ea.get(c)}function Fy(a,b){null==a.u&&(b=Mx(b.ma,"EXT-X-START"))&&(a.u=Number(Hx(b,"TIME-OFFSET")))}function vz(a,b){var c=Mx(b.ma,"EXT-X-PLAYLIST-TYPE");b=Mx(b.ma,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?iy(a,by):c?iy(a,Ny):iy(a,zz)}
function py(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Mx(d[e].ma,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Mx(b.ma,"EXT-X-TARGETDURATION");if(!d)throw new V(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Mx(b.ma,"EXT-X-PART-INF"))a.O=Number(Hx(e,"PART-TARGET"));b=Mx(b.ma,"EXT-X-SERVER-CONTROL");a.$&&a.O?(a.s=a.tc?5*a.O<=c?Math.min(a.O,a.s):Math.min(c,a.s):Math.min(a.O,a.s),a.gb=b?Number(Hx(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s),
c=b?Fx(b,"HOLD-BACK"):null,a.Ha=c?Number(c.value):0);a.Ma=Math.max(d,a.Ma)}function Gy(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.gb)c=a.gb;else if(a.Ha)c=a.Ha;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Mx(b.segments[e].ma,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.Ma}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.Fj(0);a.l.Th(c);a.l.jd(!1)}
function xz(a,b,c,d,e){var f=Mx(c,"EXT-X-MAP");if(!f)return null;var g=Hx(f,"URI"),h=Ox(d(),g,e);g=[h.toString(),Gx(f,"BYTERANGE","")].join("-");if(!a.ra.has(g)){var k=void 0,l=null,m=!1;c=u(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=Hx(n,"METHOD"),Xy(m)&&n.id<f.id?(m=!1,k=yz(a,n,b,d,e)):m="NONE"!=m):"EXT-X-BYTERANGE"==n.name&&n.id<f.id&&(l=n);b=Az(h,f,l,k,m);a.ra.set(g,b)}return a.ra.get(g)}
function Az(a,b,c,d,e){var f=0,g=null;b=Gx(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 xj(function(){return a},f,g,null,null,null,d,e)}
function Bz(a,b,c,d,e,f,g,h,k){function l(T){T=(new qb(T)).ub.split(".").pop();var ca=Cz.get(g).get(T);ca||(ca=Ky.get(T));return ca}var m=d.ma,n=Mx(m,"EXTINF"),q=0,r=0,t=null;d.ec.length&&(a.m.isLowLatency=!0);var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Mx(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=Yd(v.value),a.Ta=!0)}var y=Aj;Mx(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(0==d.ec.length)throw new V(2,4,4024,"EXTINF");if(!a.$)return null}var z=[];v=!1;var A=null,B=!1,D=!1;if(a.$&&
d.ec.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var G=w,C={},E=0;E<d.ec.length;C={kg:void 0,Mf:void 0},E++){var I=d.ec[E],K=0==E?c:z[z.length-1],J=0==E?e:K.endTime,L=Number(Gx(I,"DURATION"))||a.O;if(L){var M=J+L,O=0,N=null;"EXT-X-PRELOAD-HINT"==I.name?(O=(O=Gx(I,"BYTERANGE-START"))?Number(O):0,(K=Gx(I,"BYTERANGE-LENGTH"))?N=O+Number(K)-1:O&&(N=Number.MAX_SAFE_INTEGER)):(O=Gx(I,"BYTERANGE"),N=u(Dz(K,O)),O=N.next().value,N=N.next().value);C.Mf=Gx(I,"URI");if(C.Mf){K=
Aj;"YES"==Gx(I,"GAP")&&(a.m.gapCount++,K=2,B=!0);C.kg=null;var P=function(T){return function(){null==T.kg&&(T.kg=Ox(h(),T.Mf,f));return T.kg}}(C);q&&0<=O&&null!=N&&(A=P,v=!0);J=new zj(J,M,P,O,N,b,0,0,Infinity,[],"",null,G,K,k);"EXT-X-PRELOAD-HINT"==I.name&&(J.Ah(),D=!0);"YES"!=Gx(I,"INDEPENDENT")&&0<E&&J.Bd();if(C=l(C.Mf))J.mimeType=C,Ez.has(C)&&(J.ha=null);z.push(J);G&&(G+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;q=e+n}else if(z.length)q=z[z.length-1].endTime;else return null;
v&&(B||0!=z[0].startByte?(v=!1,A=null):z=[]);(n=Mx(m,"EXT-X-BYTERANGE"))?(t=u(Dz(c,n.value)),r=t.next().value,t=t.next().value):z.length&&(r=z[0].startByte,t=z[z.length-1].endByte);c="";n=null;"image"==g&&(c="1x1",m=Mx(m,"EXT-X-TILES"))&&(c=Hx(m,"LAYOUT"),(m=Gx(m,"DURATION"))&&(n=Number(m)));var R=null;b=new zj(e,q,function(){if(A)return A();null==R&&(R=Ox(h(),d.g,f));return R||[]},r,t,b,0,0,Infinity,z,c,n,w,y,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,Ez.has(e)&&(b.ha=null);v&&(a.tc=!0,b.bj(),
D&&b.Ah());return b}function Dz(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 qy(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!sy(a,c))for(b=Kx(b,"EXT-X-DATERANGE"),b=b.filter(function(K){return null!=Fx(K,"START-DATE")}).sort(function(K,J){K=Hx(K,"START-DATE");J=Hx(J,"START-DATE");return K<J?-1:K>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Hx(g,"START-DATE"),k=Yd(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=Gx(g,"END-DATE");if(n){var q=Yd(n);if(!isNaN(q)&&(m=q-f,0>m))continue}if(null==m){var r=Gx(g,"DURATION")||Gx(g,"PLANNED-DURATION");if(r){var t=
parseFloat(r);isNaN(t)||(m=l+t);if(0>k-f+t)continue}}var w=Gx(g,"CLASS")||"com.apple.quicktime.HLS",v="YES"==Gx(g,"END-ON-NEXT");if(null==m&&v){for(var y=c+1;y<b.length;y++){var z=Gx(b[y],"CLASS")||"com.apple.quicktime.HLS";if(w==z){var A=Hx(b[y],"START-DATE"),B=Yd(A);if(!isNaN(B)&&B&&B>k){m=Math.max(0,B-f);break}}}if(null==m)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var D=[],G=u(g.attributes),C=G.next();!C.done;C=G.next()){var E=C.value;if(!y.includes(E.name)){var I=
Qx(E.value,d);if("X-ASSET-URI"==E.name||"X-ASSET-LIST"==E.name)I=Ox(e(),E.value,d)[0];D.push({key:E.name,description:"",data:I,mimeType:null,pictureType:null})}}if(1<D.length)a.h.onMetadata(w,l,m,D)}}catch(K){}}}}
function ny(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Nx(b.ma,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Nx(b.ma,"EXT-X-MEDIA-SEQUENCE",0),m=Mx(b.ma,"EXT-X-SKIP"),n=m?Number(Gx(m,"SKIPPED-SEGMENTS")):0,q=l+n,r=0;ey(a)&&c.has(q)&&(r=c.get(q));0===r&&a.sa==Ny&&0<c.size&&!c.has(q)&&null!=a.l.i&&(r=a.l.Jb());var t=[],w=null;m=[];for(var v=0;v<g.length;v++){var y=g[v],z=0==v?r:w.endTime;q=l+n+v;Mx(y.ma,"EXT-X-DISCONTINUITY")&&(k++,w&&w.ha&&(w.ha.g=z));var A=u(y.ma);for(var B=A.next();!B.done;B=A.next())B=B.value,
"EXT-X-KEY"==B.name&&(Xy(Hx(B,"METHOD"))?h=yz(a,B,b,e,d):h=void 0);c.set(q,z);A=xz(a,b,y.ma,e,d);if(z=Bz(a,A,w,y,z,d,f,e,h))(w=Nx(y.ma,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.i=k,sy(a,f)&&null!=a.J&&q<a.J||t.push(z)}b=void 0;m.length&&(b=m.reduce(function(D,G){return D+G.duration},0),b=Math.round(m.reduce(function(D,G){return D+G.bitrate*G.duration},0)/b*1E3));if(m=t.some(function(D){return null!=
D.h}))for(c={},d=0;d<t.length;c={lf:void 0,kf:void 0,$e:void 0,fd:void 0,Ze:void 0},d++)if(c.fd=t[d],null==c.fd.h)for(c.kf=0,c.lf=d,e=function(D){return function(){var G=t[D.lf];if(G){if(null!=G.h)return G.h+D.kf;D.kf-=G.endTime-G.startTime;D.lf+=1}return null}}(c),c.Ze=0,c.$e=d,g=function(D){return function(){var G=t[D.$e];if(G){G!=D.fd&&(D.Ze+=G.endTime-G.startTime);if(null!=G.h)return G.h+D.Ze;--D.$e}return null}}(c);null==c.fd.h;)c.fd.h=g(),null==c.fd.h&&(c.fd.h=e());if(m)for(c=u(t),d=c.next();!d.done;d=
c.next())for(e=d.value,d=e.h,e=u(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.Z;if(m&&Infinity!=c&&!sy(a,f))for(a=u(t),f=a.next();!f.done;f=a.next())f.value.ei(c);return{segments:t,bandwidth:b}}function Ry(a,b){if(a==rc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
function Sy(a){return a==rc?"text/vtt":Cz.get(a).get("mp4")}function Jy(a,b){a=ey(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.Ec()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function wz(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v;return Q(function(y){switch(y.g){case 1:e=bh;f=Jy(a,d);g=f.segment;if(2==g.status)return y.return(Sy(b));h=g.S();k=new qb(h[0]);l=k.ub.split(".").pop();m=Cz.get(b);if((n=m.get(l))||(n=Ky.get(l))||(n=Ry(b,c)))return y.return(n);r=1;t=Wg(h,a.g.retryParameters);ta(y,2);t.method="HEAD";return F(y,My(a,t,e,{type:r}).promise,4);case 4:w=y.h;q=w.headers["content-type"];wa(y,3);break;case 2:v=xa(y);if(!v||1002!=v.code&&1001!=v.code){y.A(3);break}t.method=
"GET";a.g.hls.allowRangeRequestsToGuessMimeType&&(t.headers.Range="bytes=0-0");return F(y,My(a,t,e,{type:r}).promise,6);case 6:w=y.h,q=w.headers["content-type"];case 3:if(!q){y.A(7);break}n=q.toLowerCase().split(";")[0];if("application/octet-stream"!=n){y.A(8);break}if(w.data.byteLength){y.A(9);break}t.method="GET";return F(y,My(a,t,e,{type:r}).promise,10);case 10:w=y.h;case 9:uk(Kb(w.data))&&(n="video/mp2t");case 8:if("application/octet-stream"!=n)return y.return(n);case 7:return y.return(Sy(b))}})}
function bz(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 cy(a,b,c){return My(a,Wg(b,a.g.retryParameters),0,{type:c?2:3})}
function ay(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();ey(a)&&(d=(c-b)/1E3,a.eb.sample(1,d),e=0<a.g.updatePeriod?a.g.updatePeriod:a.s,f=Math.max(0,e-Mc(a.eb)),a.C.X(f));wa(h,3);break;case 2:g=xa(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.C.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
H(h)}})}function ey(a){return a.sa!=by}function iy(a,b){a.sa=b;a.l&&a.l.jd(!ey(a));ey(a)||a.C.stop()}function My(a,b,c,d){if(!a.U)throw new V(2,7,7001);d||(d={});d.isPreload=a.Kb();b=a.h.networkingEngine.request(c,b,d);Qg(a.U,b);return b}function Xy(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
function $x(a,b,c,d){var e,f,g,h,k,l;return Q(function(m){if(1==m.g){if("video/mp2t"==c)throw new V(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4041);e=Hx(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";"SAMPLE-AES"==e&&(g="cbcs");h=Hx(b,"URI");k=mc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new qb(h)).Fb.replace(/-/g,"").toLowerCase();return(l=32===n.length&&/^[0-9a-f]+$/.test(n)?
n:null)||!d?m.A(2):F(m,Fz(a,d),3)}2!=m.g&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
function Yy(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v,y;return Q(function(z){switch(z.g){case 1:if("video/mp2t"==c)throw new V(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4041);g=Hx(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return z.return(null);k=Ox(d(),Hx(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=jc(hc(k[0].split("data:text/plain;base64,").pop()));z.A(2);break}m=k.sort().join("");a.na.has(m)||(n=Wg(k,a.g.retryParameters),q=My(a,n,6).promise,
a.na.set(m,q));return F(z,a.na.get(m),3);case 3:r=z.h,l=jc(r.data);case 2:t="00000000000000000000000000000000";if(!e){z.A(4);break}return F(z,Fz(a,e),5);case 5:(w=z.h)&&(t=w);case 4:return v=new Map,v.set(t,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),z.return(nc(v,y))}})}
function Fz(a,b){var c,d,e,f;return Q(function(g){if(1==g.g){c=null;if(a.oa.has(b))return c=a.oa.get(b),g.A(2);d=ym(b.S(),b.Dc(),b.Bc(),a.g.retryParameters);e=bh;return F(g,My(a,d,e,{type:0}).promise,3)}2!=g.g&&(f=g.h,b.ye(f.data),c=wm(f.data),a.oa.set(b,c));return g.return(c)})}S("shaka.hls.HlsParser",Zx);
var Ky=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),Gz=(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"),Hz=(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"),Iz=(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"),Jz=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Cz=(new Map).set("audio",Gz).set("video",Hz).set("text",Iz).set("image",Jz),Ez=new Set(["video/mp2t"].concat(x(bf))),
by="VOD",zz="EVENT",Ny="LIVE",hy={$j:by,Im:zz,Sm:Ny};Bi("application/x-mpegurl",function(){return new Zx});Bi("application/vnd.apple.mpegurl",function(){return new Zx});function Kz(a){return Ku(a)}var Lz=(new Map).set("com.microsoft.playready",Kz).set("com.microsoft.playready.recommendation",Kz).set("com.microsoft.playready.software",Kz).set("com.microsoft.playready.hardware",Kz);function Mz(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.D=new Lc(5);this.s=new yf(function(){Nz(a)});this.C=new Pg;this.m=new Map;this.B=function(){return!1}}p=Mz.prototype;p.configure=function(a,b){this.g=a;b&&(this.B=b)};p.start=function(a,b){var c=this;return Q(function(d){if(1==d.g)return c.l=[a],c.h=b,F(d,Oz(c),2);if(!c.h)throw new V(2,7,7001);return d.return(c.j)})};
function Nz(a){var b;Q(function(c){switch(c.g){case 1:return ta(c,2),F(c,Oz(a),4);case 4:wa(c,3);break;case 2:b=xa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.C.destroy()};
p.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return ta(c,2),F(c,Oz(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};
function Oz(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g)return b=Wg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.B()}),Qg(a.C,e),F(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!=Jn){Uc("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=yw(m,"SmoothStreamingMedia");if(!m)throw new V(2,
4,4046,l);n(m);m=$b(m.outerHTML)}var q=Gd(m,"SmoothStreamingMedia");if(!q)throw new V(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Kn&&l(q);a.i||(a.i=new ql(null,0));if(l=Vd(q,"IsLive",fe,!1))throw new V(2,4,4047);a.i.jd(!l);n=Vd(q,"TimeScale",ce,1E7);m=Vd(q,"DVRWindowLength",ce);l&&(0===m||isNaN(m))&&(m=Infinity);var r=Vd(q,"CanSeek",fe,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.$f(r);
m=Vd(q,"Duration",ce,Infinity);l||a.i.vb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var t;r=Od(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=u(r);for(t=r.next();!t.done;t=r.next())m=m.concat(Od(t.value,"ProtectionHeader"));if(m.length){r=[];for(t=0;t<m.length;t++){var w=m[t],v=w.attributes.SystemID.toLowerCase(),y=n[v];if(y){var z;a:{if(z=Iu(w)){z=u(Rd(z,"DATA"));for(var A=z.next();!A.done;A=z.next())if(A=Sd(A.value,"KID")){z=hc(Pd(A));z=new Uint8Array([z[3],z[2],z[1],z[0],
z[5],z[4],z[7],z[6]].concat(x(z.slice(8))));z=jc(z);break a}}z=null}A=hc(Pd(w));v=ic(v.replace(/-/g,""));v=[{initData:wh(A,v,new Set,0),initDataType:"cenc",keyId:z}];v=mc(y,"cenc",v);z&&v.keyIds.add(z);if(y=Lz.get(y))v.licenseServerUri=y(w);r.push(v)}}n=r}else n=[];t=n;r=[];n=[];m=[];q=Od(q,"StreamIndex");q=u(q);for(w=q.next();!w.done;w=q.next()){w=w.value;y=Od(w,"QualityLevel");v=l.timescale;z=l.duration;A=Od(w,"c");for(var B=[],D=0,G=0;G<A.length;++G){var C=A[G],E=A[G+1],I=Vd(C,"t",ce),K=Vd(C,"d",
ce);C=Vd(C,"r",ae);if(!K)break;I=null!=I?I:D;(C=C||0)&&C--;if(0>C)if(E){E=Vd(E,"t",ce);if(null==E)break;else if(I>=E)break;C=Math.ceil((E-I)/K)-1}else{if(Infinity==z)break;else if(I/v>=z)break;C=Math.ceil((z*v-I)/K)-1}for(E=0;E<=C;++E)D=I+K,B.push({start:I/v,end:D/v,ni:I}),I=D}v=B;y=u(y);for(z=y.next();!z.done;z=y.next())(z=Pz(a,w,z.value,v,t,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=rc||a.g.disableText||m.push(z):n.push(z):r.push(z))}q=[];r=u(0<r.length?r:
[null]);for(t=r.next();!t.done;t=r.next())for(t=t.value,w=u(0<n.length?n:[null]),B=w.next();!B.done;B=w.next())y=q,v=y.push,z=a,A=t,B=B.value,G=0,A&&A.bandwidth&&0<A.bandwidth&&(G+=A.bandwidth),B&&B.bandwidth&&0<B.bandwidth&&(G+=B.bandwidth),z={id:z.u++,language:A?A.language:"und",disabledUntilTime:0,primary:!!A&&A.primary||!!B&&B.primary,audio:A,video:B,bandwidth:G,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(y,z);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.Df());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.D.sample(1,h);H(k)})}
function Pz(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=Vd(c,"Bitrate",be),m=Vd(c,"MaxWidth",be),n=Vd(c,"MaxHeight",be),q=Vd(c,"Channels",be),r=Vd(c,"SamplingRate",be),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.vb(Math.min(t,w));var v={id:k,originalId:b.attributes.Name||String(k),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:0<e.length,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:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=Qz.get(e))&&v.roles.push(e),"main"===e&&(v.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
null;if(!Rz.includes(e.toUpperCase()))return ab("Codec not supported:",e),null;c=Sz(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=Tz(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=Uz(c);break;case "text":if(v.type=rc,v.mimeType="application/mp4","TTML"===e||
"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(af(v.mimeType,v.codecs));v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var y=a.m.get(v.id);else y=[],"video"==v.type&&(y=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),y={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Db:y,La:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,fb:0,data:null,stream:v},y=Wi(new Qi([y])),
a.m.set(v.id,y);y=Vz(a,new xj(function(){return[]},0,null,cm(v),v.mssPrivateData.timescale,y,null,v.encrypted),v,b,d);v.segmentIndex=new Ol(y);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
function Sz(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)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("AACH"===c)return c=new Uint8Array(4),a=e[2*a],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 Tz(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Uz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function Vz(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=u(e);for(var g=e.next(),h={};!g.done;h={eg:void 0},g=e.next())h.eg=g.value,d.push(new zj(h.eg.start,h.eg.end,function(k){return function(){return lc(a.l,[f.replace("{start time}",String(k.eg.ni))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Mz);
var Rz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Qz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Bi("application/vnd.ms-sstr+xml",function(){return new Mz});function Wz(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c||304==c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Zb(b)}catch(h){}throw new V(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Xz(){}
function Yz(a,b,c,d,e,f){var g=new Zz;fh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new $z,k={Bi:!1,Tj:!1};a=aA(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 Ig(a,function(){k.Bi=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new yf(function(){k.Tj=!0;h.abort()});l.X(b/1E3);a.finally(function(){l.stop()})}return a}
function aA(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,t,w,v,y,z,A,B,D,G,C;return Q(function(E){switch(E.g){case 1:return l=bA,m=cA,q=new ArrayBuffer(0),t=r=0,w={},v=Date.now(),ta(E,2),F(E,l(a,d),4);case 4:n=E.h;w=dA(n.headers);g(w);if("HEAD"==d.method){E.A(5);break}z=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F(E,n.arrayBuffer(),9);A=n.clone().body.getReader();B=function(I){function K(){var J,L,M,O;return Q(function(N){switch(N.g){case 1:return ta(N,2),F(N,A.read(),4);case 4:J=
N.h;wa(N,3);break;case 2:return xa(N),N.return();case 3:if(J.done){N.A(5);break}r+=J.value.byteLength;if(!h){N.A(5);break}return F(N,h(J.value),5);case 5:L=Date.now();M=r-t;if(100<L-v&&M>=k||J.done)O=J.done?0:z-r,f(L-v,M,O),t=r,v=L;J.done?I.close():(I.enqueue(J.value),K());H(N)}})}K()};new m({start:B});return F(E,n.arrayBuffer(),8);case 8:q=E.h;E.A(5);break;case 9:q=E.h,D=Date.now(),f(D-v,q.byteLength,0);case 5:b.headers.Range&&(G=b.headers.Range.replace("bytes=","").split("-").filter(function(I){return I}).map(function(I){return parseInt(I,
10)}),2==G.length&&q.byteLength!=G[1]-G[0]+1&&ab("Payload length does not match range requested bytes",b,n));wa(E,3);break;case 2:C=xa(E);if(e.Bi)throw new V(1,1,7001,a,c);if(e.Tj)throw new V(1,1,1003,a,c);throw new V(1,1,1002,a,C,c);case 3:return E.return(Wz(w,q,n.status,a,n.url,b,c))}})}function dA(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function eA(){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",Xz);Xz.isSupported=eA;Xz.parse=Yz;var bA=window.fetch,$z=window.AbortController,cA=window.ReadableStream,Zz=window.Headers;eA()&&(Sg("http",Yz,2,!0),Sg("https",Yz,2,!0),Sg("blob",Yz,2,!0));function fA(){}
function gA(a,b,c,d,e,f){var g=new hA,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;g.onabort=function(){n(new V(1,1,7001,a,c))};var q=!1;g.onreadystatechange=function(){if(2==g.readyState&&!q){var t=iA(g);e(t);q=!0}};g.onload=function(t){var w=iA(g),v=g.response;try{d(Date.now()-h,t.loaded-k,0);var y=Wz(w,v,g.status,a,g.responseURL,b,c);m(y)}catch(z){n(z)}};g.onerror=
function(t){n(new V(1,1,1002,a,t,c))};g.ontimeout=function(){n(new V(1,1,1003,a,c))};g.onprogress=function(t){var w=Date.now(),v=f.minBytesForProgressEvents||0,y=t.loaded-k;if(100<w-h&&y>=v||t.lengthComputable&&t.loaded==t.total)d(w-h,y,4==g.readyState?0:t.total-t.loaded),k=t.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new Ig(l,function(){g.abort();return Promise.resolve()})}
function iA(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",fA);fA.parse=gA;var hA=window.XMLHttpRequest;Sg("http",gA,1,!0);Sg("https",gA,1,!0);Sg("blob",gA,1,!0);function jA(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function kA(a){var b=a.cc(!1);return b?gc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function lA(a,b){return ym(a.g.S(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function mA(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function nA(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}mA.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 oA(a){return 0==a.i?0:a.j/a.i};function pA(a){var b=this;this.u=a;this.i=new Map;this.h=new dh(function(){return qA(b).catch(function(){})});this.j=[];this.s=function(){};this.m=function(){};this.g=new mA;this.l=!1}pA.prototype.destroy=function(){return this.h.destroy()};function rA(a,b,c){a.s=b;a.m=c}function qA(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
pA.prototype.queue=function(a,b,c,d,e){var f=this;eh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return Q(function(t){if(1==t.g)return F(t,sA(f,b),2);h=t.h;if(f.h.g)throw new V(2,9,7001);if(d)for(m in k=Kb(h),l=new vh(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.s(oA(f.g),f.g.g);return t.return(e(h))})});this.i.set(a,g);return g};
function tA(a,b,c,d,e,f){eh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new V(2,9,7001);if(e){var h=Kb(c);h=new vh(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.s(oA(a.g),a.g.g);return f(c)});a.i.set(b,g)}function uA(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
function sA(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=bh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;sd(a.j,e);return g.return(f.data)})};function vA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Hg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}vA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return F(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);H(b)})};
function wA(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}vA.prototype.store=function(){return this.h};vA.prototype.promise=function(){return this.g};function xA(a){this.h=a;this.g=[]}xA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function yA(a,b){return zA(a,b,"readwrite")}function zA(a,b,c){c=a.h.transaction([b],c);var d=new vA(c,b);a.g.push(d);d.promise().then(function(){sd(a.g,d)},function(){sd(a.g,d)});return d};function AA(a,b,c){this.h=new xA(a);this.i=b;this.g=c}p=AA.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return BA(this.i)};p.removeSegments=function(a,b){return CA(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,DA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Gi(e)}))})};p.addManifests=function(){return BA(this.g)};
p.updateManifest=function(){return Promise.reject(new V(2,9,9016,"Cannot modify values in "+this.g))};function EA(a,b,c){a=yA(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=yA(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 CA(this,this.g,a,b)};
p.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,DA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Wd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=zA(a.h,a.g,"readonly"),c=new Map,F(d,wA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.Wd(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};p.Gi=function(a){return a};p.Wd=function(a){return Promise.resolve(a)};
function BA(a){return Promise.reject(new V(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 Q(function(m){if(1==m.g){d=yA(c.h,a);e=d.store();f=[];g=u(b);h=g.next();for(k={};!h.done;k={Lh:void 0},h=g.next())l=h.value,k.Lh=e.add(l),k.Lh.onsuccess=function(n){return function(){f.push(n.Lh.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})};
function CA(a,b,c,d){a=yA(a.h,b);b=a.store();c=u(c);for(var e=c.next(),f={};!e.done;f={xh:void 0},e=c.next())f.xh=e.value,b.delete(f.xh).onsuccess=function(g){return function(){return d(g.xh)}}(f);return a.promise()}
function DA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=zA(a.h,b,"readonly");e=d.store();f={};g=[];h=u(c);k=h.next();for(l={};!k.done;l={Vf:void 0,zf:void 0},k=h.next())l.zf=k.value,l.Vf=e.get(l.zf),l.Vf.onsuccess=function(n){return function(){void 0==n.Vf.result&&g.push(n.zf);f[n.zf]=n.Vf.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new V(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function FA(a){this.g=new xA(a)}FA.prototype.destroy=function(){return this.g.destroy()};FA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=zA(a.g,"session-ids","readonly"),c=[],F(d,wA(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};FA.prototype.add=function(a){var b=yA(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
FA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=yA(b.g,"session-ids"),F(d,wA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function GA(){this.g=new Map}GA.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};GA.prototype.init=function(){var a=this;HA.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
function IA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ub:d,ib:f},ib:e})})});if(b)return b;throw new V(2,9,9013,"Could not find a cell that supports add-operations");}function JA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ub:d,ib:f},e)})})}
function KA(a,b,c){a=a.g.get(b);if(!a)throw new V(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new V(2,9,9013,"Could not find cell with name "+c);return b}function LA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function MA(a){var b=Array.from(a.g.keys());if(!b.length)throw new V(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
function NA(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=HA,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function OA(a,b){HA.set(a,b)}S("shaka.offline.StorageMuxer",GA);GA.unregister=function(a){HA.delete(a)};GA.register=OA;GA.prototype.destroy=GA.prototype.destroy;var HA=new Map;function PA(){AA.apply(this,arguments)}pa(PA,AA);PA.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return Q(function(g){d=yA(c.h,c.g);e=d.store();f=new Hg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new V(2,9,9012,"Could not find values for "+a))};return F(g,Promise.all([d.promise(),f]),0)})};
PA.prototype.Wd=function(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){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=QA(a.periods[c],e),b.push(f);return F(h,Xv(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
function QA(a,b){RA(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return SA(e,a.startTime,b)})}
function SA(a,b,c){var d=a.initSegmentUri?TA(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=
TA(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}}PA.prototype.Gi=function(a){return{data:a.data}};
function TA(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 V(2,9,9004,"Could not parse uri "+a);}
function RA(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=u(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=u(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=u(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
e=u(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function UA(){AA.apply(this,arguments)}pa(UA,AA);
UA.prototype.Wd=function(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){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=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(VA(n,k.startTime,k.startTime+e));f=l;b.push(f)}return F(h,Xv(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
function VA(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 WA(){AA.apply(this,arguments)}pa(WA,AA);p=WA.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 EA(this,a,b)};p.Wd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function XA(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=XA.prototype;
p.init=function(){var a=this,b=new Hg,c=!1,d=new yf(function(){c=!0;b.reject(new V(2,9,9017))});"number"===typeof YA&&0<YA&&d.X(YA);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 PA(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new UA(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;
g=g.contains("manifest-v3")&&g.contains("segment-v3")?new UA(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new WA(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new FA(f):null;a.m=f;b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=u(["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 V(2,9,9001,e.error)),f.preventDefault())};return b};p.destroy=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return F(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return F(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(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 Q(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,ZA(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,F(b,a.init(),0)}})};
function ZA(){var a=new Hg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new V(2,9,9001,b.error));c.preventDefault()};return a}var YA=5;S("shaka.offline.indexeddb.StorageMechanismOpenTimeout",YA);OA("idb",function(){return Rb().di()?new XA:null});function $A(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}$A.prototype.Ub=function(){return this.i};$A.prototype.ib=function(){return this.h};$A.prototype.key=function(){return this.l};$A.prototype.toString=function(){return this.j};
function aB(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new $A(b,c,d,Number(a[4])):null};function bB(a,b){this.h=a;this.g=b}
function cB(a,b){var c=new ql(null,0);c.vb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=dB(a,d,e,c);e=b.streams.filter(function(l){return l.type==rc}).map(function(l){return eB(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return eB(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(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 dB(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){g=u(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(g=u(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=u(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=u(b);for(e=b.next();!e.done;e=
b.next())for(g=e.value,e=eB(a,g,d),g=u(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=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=eB(a,e,d),e=u(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 eB(a,b,c){var d=b.segments.map(function(e){return fB(a,e,b)});c.re(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ol(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([af(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}
function fB(a,b,c){var d=new $A("segment",a.h,a.g,b.dataKey);a=new zj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?gB(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.cg(b.thumbnailSprite);return a}function gB(a,b){var c=new $A("segment",a.h,a.g,b);return new xj(function(){return[c.toString()]},0,null)};function hB(){this.g=null}p=hB.prototype;p.configure=function(){};
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:d=aB(a);c.g=d;if(null==d||"manifest"!=d.g)throw new V(2,1,9004,a);e=new GA;ua(m,2);return F(m,e.init(),4);case 4:return F(m,KA(e,d.Ub(),d.ib()),5);case 5:return f=m.h,F(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new bB(d.Ub(),d.ib()),l=cB(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return ya(m),F(m,e.destroy(),7);case 7:Ba(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 Q(function(m){switch(m.g){case 1:return d=c.g,e=new GA,ta(m,2,3),F(m,e.init(),5);case 5:return F(m,KA(e,d.Ub(),d.ib()),6);case 6:return f=m.h,F(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),F(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:xa(m),m.A(3)}})};
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Bi("application/x-offline-manifest",function(){return new hB});function iB(){}function jB(a,b){var c=aB(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Lg(a)):a=c&&"segment"==c.g?kB(c.key(),c,b):Jg(new V(2,1,9004,a));return a}
function kB(a,b,c){var d=new GA;return Lg(void 0).bb(function(){return d.init()}).bb(function(){return KA(d,b.Ub(),b.ib())}).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",iB);iB.plugin=jB;Sg("offline",jB);function lB(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,mB(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=nB(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
function nB(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new xh({uc:b,onError:function(){},Kf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),F(f,Fh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(1==
h.g)return ta(h,2),F(h,Rh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);H(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function mB(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&td(a.audioCapabilities,b.audioCapabilities,c)&&td(a.videoCapabilities,b.videoCapabilities,c)};function oB(a,b,c){var d=b.presentationTimeline.getDuration();b=pB(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function qB(a,b){var c=cB(new bB(a.Ub(),a.ib()),b),d=b.appMetadata||{};c=pB(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 pB(a){var b=[],c=hg(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Zf(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($f(c.value));return b};function rB(){this.g=new Map}function sB(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;0>=f&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function tB(a,b){a.g.set(b.id,b.bandwidth||2048)}function uB(a,b){a=a.g.get(b);null==a&&(a=0);return a};function vB(a){var b=this;if(a&&a.constructor!=X)throw new V(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Hb()):(this.h=In(),this.g=new Rg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new dh(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return F(k,Promise.all(b.l.map(function(l){return qA(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return F(k,Promise.all(e),3);case 3:if(!c){k.A(4);
break}return F(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,H(k)}})});this.m=1E9}function wB(){if(Ei(Rb()))a:{var a=u(HA.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=vB.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=on(a,b));return Nn(this.h,a)};p.getConfiguration=function(){var a=In();Nn(a,this.h,In());return a};p.Hb=function(){return this.g};
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new pA(this.g);this.l.push(h);b=xB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.A(2):F(l,to(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Gi(a,c||null);return l.return(k())})},g,h);b=new Ig(b,function(){return qA(h)});b.finally(function(){sd(f.l,h)});return yB(this,b)};
function xB(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N;return Q(function(P){switch(P.g){case 1:return zB(),l=k=null,m=new GA,r=q=n=null,ta(P,2,3),F(P,f(),5);case 5:return k=P.h,F(P,AB(a,b,k,g),6);case 6:t=P.h;BB(a);w=!t.presentationTimeline.T()&&!t.presentationTimeline.Zc();if(!w)throw new V(2,9,9005,b);v=u(d);y=v.next();case 7:if(y.done){P.A(9);break}z=y.value;return F(P,CB(a,z,t),10);case 10:A=P.h;t.imageStreams.push(A);BB(a);y=v.next();P.A(7);break;case 9:B=u(e),D=B.next();
case 11:if(D.done)return Hh(g.drm.clearKeys,t.variants),E=t.variants.some(function(R){if(R.audio)for(var T=u(R.audio.drmInfos),ca=T.next();!ca.done;ca=T.next())if(ca.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=u(R.video.drmInfos),T=R.next();!T.done;T=R.next())if(T.value.licenseServerUri.startsWith("data:"))return!0;return!1}),I=g.offline.usePersistentLicense,E&&(I=!1),F(P,a.sd(t,function(R){r=r||R},g,I),15);G=D.value;return F(P,DB(a,t,G.uri,G.language,G.kind,G.mime,G.codecs),
14);case 14:C=P.h;t.textStreams.push(C);BB(a);D=B.next();P.A(11);break;case 15:l=P.h;BB(a);if(r)throw r;return F(P,EB(t,l,g,I),16);case 16:return F(P,m.init(),17);case 17:return BB(a),F(P,IA(m),18);case 18:return n=P.h,BB(a),K=FB(l,t,b,c,g,h,I),J=K.Dl,L=K.ji,F(P,n.ib.addManifests([J]),19);case 19:M=P.h;BB(a);q=M[0];BB(a);if(r)throw r;return F(P,GB(a,L,q,J,h,g,n.ib,t,l,I),20);case 20:return BB(a),HB(t,J,l,I),F(P,n.ib.updateManifest(q,J),21);case 21:return BB(a),O=new $A("manifest",n.path.Ub,n.path.ib,
q),P.return(qB(O,J));case 3:return ya(P),F(P,m.destroy(),22);case 22:if(!k){P.A(23);break}return F(P,k.stop(),23);case 23:if(!l){P.A(25);break}return F(P,l.destroy(),25);case 25:Ba(P,0);break;case 2:N=xa(P);if(null==q){P.A(27);break}return F(P,IB(q),27);case 27:throw r||N;}})}
function GB(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,t,w,v,y,z,A,B;return Q(function(D){switch(D.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new V(2,9,7001);};r=function(G,C){var E,I,K,J,L,M,O,N,P;return Q(function(R){if(1==R.g){E=u(G);I=E.next();for(K={};!I.done;K={nc:void 0},I=E.next())K.nc=I.value,q(),J=lA(K.nc,f),L=K.nc.i,M=K.nc.h,O=function(T){return function(ca){var Y,Ma,Na,Ea;return Q(function(va){switch(va.g){case 1:Y=T.nc.g;Ma=Y.cc(!1);if(!Y.aesKey||Ma){va.A(2);break}return F(va,xm(ca,Y.aesKey,
T.nc.j),3);case 3:ca=va.h;case 2:return Na=kA(Y),F(va,g.addSegments([{data:ca}]),4);case 4:Ea=va.h,q(),m[Na]=Ea[0],n+=ca.byteLength,H(va)}})}}(K),N=K.nc.g,(P=N.cc(!1))?tA(e,K.nc.groupId,P,L,M,O):e.queue(K.nc.groupId,J,L,M,O);return F(R,uA(e),2)}q();if(!C||e.l)return R.A(0);HB(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};t=!1;ta(D,2);if(!JB(h)||!t||KB(h)){D.A(4);break}return F(D,r(b.filter(function(G){return G.h}),!0),5);case 5:return q(),b=b.filter(function(G){return!G.h}),w=m,v=n,m={},n=0,F(D,
LB(g,c,d,w,v,function(){return BB(a)}),6);case 6:q();case 4:if(t){D.A(7);break}return F(D,r(b,!1),8);case 8:return q(),y=m,z=n,m={},n=0,F(D,LB(g,c,d,y,z,function(){return q()}),9);case 9:q();case 7:wa(D,0);break;case 2:return A=xa(D),B=Object.values(m),F(D,g.removeSegments(B,function(){}),10);case 10:throw A;}})}
function IB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new GA,F(f,b.init(),2);case 2:return F(f,IA(b),3);case 3:return c=f.h,d=new $A("manifest",c.path.Ub,c.path.ib,a),F(f,b.destroy(),4);case 4:return e=new vB,F(f,e.remove(d.toString()),0)}})}
function LB(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v;return Q(function(y){switch(y.g){case 1:g=!1;ta(y,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())r=q.value,t=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=t&&(r.dataKey=t,r.pendingSegmentRefId=void 0),t=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=t&&(r.initSegmentKey=t,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(y,a.updateManifest(b,c),4);case 4:g=!0;f();wa(y,0);break;case 2:return w=xa(y),F(y,IB(b),5);case 5:if(g){y.A(6);break}v=Object.values(d);return F(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
function EB(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R;return Q(function(T){switch(T.g){case 1:return e={width:Infinity,height:Infinity},Gf(a,c.restrictions,e),F(T,Jf(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;Ef(a,h,k,g,l);m=u(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Zf(q));r=u(a.textStreams);for(t=r.next();!t.done;t=
r.next())w=t.value,f.push($f(w));v=u(a.imageStreams);for(y=v.next();!y.done;y=v.next())z=y.value,f.push(ag(z));return F(T,c.offline.trackSelectionCallback(f),3);case 3:A=T.h;B=a.presentationTimeline.getDuration();D=0;G=u(A);for(C=G.next();!C.done;C=G.next())E=C.value,I=E.bandwidth*B/8,D+=I;ta(T,4);return F(T,c.offline.downloadSizeCallback(D),6);case 6:K=T.h;if(!K)throw new V(2,9,9014);wa(T,5);break;case 4:J=xa(T);if(J instanceof V)throw J;throw new V(2,9,9015);case 5:L=new Set;M=new Set;O=new Set;
N=u(A);for(P=N.next();!P.done;P=N.next())R=P.value,"variant"==R.type&&L.add(R.id),"text"==R.type&&M.add(R.id),"image"==R.type&&O.add(R.id);a.variants=a.variants.filter(function(ca){return L.has(ca.id)});a.textStreams=a.textStreams.filter(function(ca){return M.has(ca.id)});a.imageStreams=a.imageStreams.filter(function(ca){return O.has(ca.id)});MB(a);H(T)}})}
function FB(a,b,c,d,e,f,g){var h=oB(c,b,d),k=e.offline.progressCallback;rA(f,function(t,w){h.size=w;k(h,t)},function(t,w){l&&g&&m==w&&Nh(a,"cenc",t)});var l=JB(b)&&!KB(b),m=null;l&&(m=NB.get(a.h.keySystem));for(var n=new rB,q=u(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=u(b.imageStreams);for(r=q.next();!r.done;r=q.next())tB(n,r.value);q=u(b.variants);for(r=q.next();!r.done;r=q.next())sB(n,r.value);f=OB(f,n,b,e);e=f.streams;f=f.ji;(n=a.h)&&g&&(n.initData=[]);return{Dl:{creationTime:Date.now(),
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.be(),streams:e,sessionIds:g?Wh(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},ji:f}}function JB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function KB(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 HB(a,b,c,d){b.expiration=c.be();c=Wh(c);b.sessionIds=d?c:[];if(JB(a)&&d&&!c.length)throw new V(2,9,9007);}p.remove=function(a){return PB(this,QB(this,a))};
function QB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:zB();c=aB(b);if(null==c||"manifest"!=c.g)throw new V(2,9,9004,b);d=c;e=new GA;ua(k,2);return F(k,e.init(),4);case 4:return F(k,KA(e,d.Ub(),d.ib()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([RB(a,h,e),SB(f,d,h)]),2);case 2:return ya(k),F(k,e.destroy(),8);case 8:Ba(k,0)}})}
function TB(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:af(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:af(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function RB(a,b,c){return Q(function(d){return F(d,UB(a.g,a.h.drm,c,b),0)})}
function SB(a,b,c){function d(){}var e=VB(c);qB(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Wl=function(){return PB(this,WB(this))};
function WB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return zB(),b=a.g,c=a.h.drm,d=new GA,e=!1,ua(n,2),F(n,d.init(),4);case 4:f=[],LA(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,lB(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return ya(n),F(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})}
p.list=function(){return PB(this,XB())};function XB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return zB(),a=[],b=new GA,ua(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),JA(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=qB(new $A("manifest",e.Ub,e.ib,l),k);a.push(k)});H(h)})})}),F(d,c,2);case 2:return ya(d),F(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})}
function AB(a,b,c,d){var e,f,g,h,k;return Q(function(l){if(1==l.g)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),BB(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,BB(a),k=YB(h),F(l,Promise.all(kb(k,function(m){return m.createSegmentIndex()})),3);BB(a);if(e)throw e;return l.return(h)})}
function CB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y;return Q(function(z){switch(z.g){case 1:return F(z,ZB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new V(1,2,2017,b);return F(z,$B(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=pf(d);if(!f)throw new V(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Kb(e);l=g.parseMedia(k,h,b,[]);m=[];n=u(l);q=n.next();for(r={};!q.done;r={lg:void 0,ud:void 0},q=n.next())r.ud=q.value,r.lg=null,
t=function(A){return function(){null==A.lg&&(A.lg=lc([b],[A.ud.payload]));return A.lg||[]}}(r),w=new zj(r.ud.startTime,r.ud.endTime,t,0,null,null,0,0,Infinity),r.ud.payload.includes("#xywh")&&(v=r.ud.payload.split("#xywh=")[1].split(","),4===v.length&&w.cg({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);y=d;if(!m.length){z.A(4);break}return F(z,to(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:y=z.h;case 4:return z.return({id:a.m++,
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ol(m),mimeType:y||"",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([af(y||
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
function DB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.A(2):F(m,ZB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ql(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:rc,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([af(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=af(h.mimeType,h.codecs);l=qf(k);if(!l)throw new V(2,2,2014,f);return m.return(h)})}
function ZB(a,b){var c;return Q(function(d){switch(d.g){case 1:return ta(d,2),F(d,to(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}function $B(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=bh,e=Wg([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
p.sd=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new xh({uc:e.g,onError:b,Kf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,Ch(f,a.variants,d),2)):3!=g.g?F(g,Ph(f),3):g.return(f)})};
function OB(a,b,c,d){var e=new Map,f=YB(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=aC(a,b,c,h,d,e);g.set(h.id,k)}a=u(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()),ji:Array.from(e.values())}}
function aC(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=0===h?d.id:0;bC(d,c.presentationTimeline.Jb(),function(l,m){var n=kA(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=uB(b,d.id)*r;r=nA(a.g,r);f.set(n,new jA(l,r,k,!1,m))}l.ha&&(q=kA(l.ha),f.has(q)||(r=.5*
uB(b,d.id),r=nA(a.g,r),f.set(q,new jA(l.ha,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});0!==h&&(k=(k+1)%h)});return g}
function bC(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function BB(a){if(a.j.g)throw new V(2,9,7001);}function zB(){if(!wB())throw new V(2,9,9E3);}function PB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),ua(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);sd(a.i,b);return Ba(c,0)})}function yB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){sd(a.i,c)})}
function VB(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
function UB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=MA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:TB(d,!1),videoCapabilities:TB(d,!0)}});return F(h,lB(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function YB(a){for(var b=new Set,c=u(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=u(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
function MB(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=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",vB);vB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new GA,ua(b,2),F(b,NA(a),2)):5!=b.g?(ya(b),F(b,a.destroy(),5)):Ba(b,0)})};
vB.prototype.list=vB.prototype.list;vB.prototype.removeEmeSessions=vB.prototype.Wl;vB.prototype.remove=vB.prototype.remove;vB.prototype.store=vB.prototype.store;vB.prototype.getNetworkingEngine=vB.prototype.Hb;vB.prototype.getConfiguration=vB.prototype.getConfiguration;vB.prototype.configure=vB.prototype.configure;vB.prototype.destroy=vB.prototype.destroy;vB.support=wB;
var NB=(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");
fq("offline",wB);function cC(){}function dC(){for(var a=u(eC),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}}function fC(a,b){a={priority:b||0,callback:a};for(b=0;b<eC.length;b++)if(eC[b].priority<a.priority){eC.splice(b,0,a);return}eC.push(a)}S("shaka.polyfill",cC);cC.register=fC;cC.installAll=dC;var eC=[];function gC(){}function hC(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())iC(b.value)}function iC(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}cC.Aria=gC;gC.install=hC;fC(hC);function jC(){}function kC(){Rb().ci()&&lC()}cC.EncryptionScheme=jC;jC.install=kC;fC(kC,-2);function mC(){}
function nC(){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",oC);document.addEventListener("webkitfullscreenerror",oC);document.addEventListener("mozfullscreenchange",oC);document.addEventListener("mozfullscreenerror",oC);document.addEventListener("MSFullscreenChange",oC);document.addEventListener("MSFullscreenError",oC)}}
function oC(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)}cC.Fullscreen=mC;mC.install=nC;fC(nC);function pC(){}function qC(){Rb().ic()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),pC.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=rC)}
function rC(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};Rb();c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=""!=Fi().canPlayType(e),!f)||d&&(g=d.contentType,h=""!=Fi().canPlayType(g),!h))return q.return(b)}else return q.return(b);q.A(2);break}if(!Ei())return q.return(b);if(!c){q.A(3);break}return F(q,sC(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=
Rb().Ia(),t=d.contentType;"CAST"===r&&d.spatialRendering&&(t+="; spatialRendering=true");l=bd(t);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return F(q,tC(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function sC(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Rb(),c=b.Ia(),"CAST"!==c?e.A(2):F(e,uC(a),3)):2!=e.g?(d=e.h,e.return(d)):e.return(bd(a.contentType))})}
function tC(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return Q(function(t){switch(t.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Rb().ej()&&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=jf(k)+";"+hf(k);n=jf(l)+";"+hf(l);q=c.keySystem;r=null;ta(t,2);if(zg.has(m+"#"+n+"#"+q)){r=zg.get(m+"#"+n+"#"+q)||null;t.A(4);break}return F(t,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=t.h,zg.set(m+"#"+n+"#"+q,r);case 4:wa(t,
3);break;case 2:xa(t);case 3:return t.return(r)}})}
function uC(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(bd(a.contentType));b=a.contentType;a.width&&a.height&&1280<a.width&&720<a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),24>c||30<c)&&(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=vC;return f.has(b)?(e=f.get(b),g.A(2)):F(g,cast.__platform__.canDisplayType(b),3)}2!=g.g&&(e=g.h,f.set(b,e));return g.return(e)})}cC.MediaCapabilities=pC;pC.install=qC;pC.originalMcap=null;var vC=new Map;fC(qC,-1);function wC(){}function xC(){var a=Rb(),b="WEBKIT"===a.Na()?a.Ga():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(12>=b?(yC(),zC()):15>=b&&yC());a=u(a.oj());for(b=a.next();!b.done;b=a.next())AC(b.value);(window.MediaSource||window.ManagedMediaSource)&&BC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&CC()}
function yC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function zC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function BC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ef(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ef(c)&&b(c)}}}
function AC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return hf(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return hf(d)!=a&&c(d)}}}
function CC(){var a=MediaSource.isTypeSupported;Rb().Qj()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}cC.MediaSource=wC;wC.install=xC;fC(xC);function DC(){}function EC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?FC():void 0!=window.orientation&&GC())}function FC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
function GC(){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 HC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}cC.Orientation=DC;DC.install=EC;function HC(){jb.call(this);this.type="";this.angle=0}pa(HC,jb);
HC.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)};
HC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};fC(EC);function IC(){}var JC,KC,LC,MC,NC,OC;
function PC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=QC){if(void 0===a?0:a)JC=!0,KC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),LC=HTMLMediaElement.prototype.setMediaKeys,MC=window.MediaKeys,NC=window.MediaKeySystemAccess,OC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=RC;window.MediaKeys=SC;window.MediaKeySystemAccess=
TC;navigator.requestMediaKeySystemAccess=UC;window.shakaMediaKeysPolyfill=QC;Rf.clear();zg.clear()}}function UC(a,b){try{var c=new TC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function RC(a){var b=this.mediaKeys;b&&b!=a&&VC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?VC(a,this):Promise.resolve()}
function WC(a){a=Kb(a.initData);if(Ob(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Xb(a.subarray(4),!0);a=$b(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Lb(a);this.dispatchEvent(b)}cC.PatchedMediaKeysApple=IC;
IC.uninstall=function(){window.shakaMediaKeysPolyfill==QC&&JC&&(JC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",KC),HTMLMediaElement.prototype.setMediaKeys=LC,window.MediaKeys=MC,window.MediaKeySystemAccess=NC,navigator.requestMediaKeySystemAccess=OC,KC=OC=LC=NC=MC=null,window.shakaMediaKeysPolyfill="",Rf.clear(),zg.clear())};IC.install=PC;
function TC(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)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=u(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=u(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;}
TC.prototype.createMediaKeys=function(){var a=new SC(this.keySystem);return Promise.resolve(a)};TC.prototype.getConfiguration=function(){return this.g};function SC(a){this.h=new WebKitMediaKeys(a);this.g=new Oc}SC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new XC(this.h,a)};SC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function VC(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",WC);try{return xl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}SC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function XC(a){jb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Oc;this.sessionId="";this.expiration=NaN;this.closed=new Hg;this.keyStatuses=new YC}pa(XC,jb);p=XC.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new Hg;try{var d=this.l.createSession("video/mp4",Kb(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",void 0==c.keyStatuses.Ec()?"license-request":"license-renewal").set("message",Lb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(ZC(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(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ZC(c,"output-not-allowed");break;default:ZC(c,"internal-error")}});ZC(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 Hg;try{this.i.update(Kb(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 ZC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
function YC(){this.size=0;this.g=void 0}p=YC.prototype;p.Ec=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,yg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=yg.value();return this.g&&Jb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var QC="apple";fC(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||PC())});function $C(){}function aD(){if(window.MediaKeys){var a=Rb();MediaKeys.prototype.setServerCertificate&&a.Be()||(MediaKeys.prototype.setServerCertificate=bD)}}function bD(){return Promise.resolve(!1)}cC.PatchedMediaKeysCert=$C;$C.install=aD;fC(aD);function cD(){}
function dD(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)eD="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=fD;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=gD;window.MediaKeys=hD;window.MediaKeySystemAccess=iD;window.shakaMediaKeysPolyfill=jD}}
function kD(a){var b=eD;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function fD(a,b){try{var c=new iD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function gD(a){var b=this.mediaKeys;b&&b!=a&&lD(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lD(a,this);return Promise.resolve()}cC.PatchedMediaKeysWebkit=cD;cD.install=dD;
function iD(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(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=u(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=u(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=u(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));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}iD.prototype.createMediaKeys=function(){var a=new hD(this.g);return Promise.resolve(a)};iD.prototype.getConfiguration=function(){return this.h};function hD(a){this.l=a;this.h=null;this.g=new Oc;this.i=[];this.j=new Map}
function lD(a,b){a.h=b;a.g.Sa();var c=eD;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Lb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=mD(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Ec()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=mD(a,d.sessionId))&&d.ready()}),
a.g.o(b,c+"keyerror",function(d){var e=mD(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?(45==d.systemCode&&(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?nD(e,"output-restricted"):1==f?nD(e,"expired"):nD(e,"internal-error"))}}))}
hD.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)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 oD(b,this.l,a);this.i.push(a);return a};hD.prototype.setServerCertificate=function(){return Promise.resolve(!1)};hD.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function mD(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 oD(a,b,c){jb.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 Hg;this.keyStatuses=new pD}pa(oD,jb);p=oD.prototype;p.ready=function(){nD(this,"usable");this.g&&this.g.resolve();this.g=null};
function qD(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Kb($b("LOAD_SESSION|"+c));else{var e=$b("PERSISTENT|");d=kc(e,b)}else d=Kb(b)}catch(g){return Promise.reject(g)}a.h=new Hg;var f=kD("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new yf(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
function rD(a,b,c){if(a.g)a.g.then(function(){return rD(a,b,c)}).catch(function(){return rD(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Wb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=hc(e.keys[0].k);e=hc(e.keys[0].kid)}else d=Kb(c),e=null;var f=kD("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function nD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return qD(this,b,null)};p.load=function(a){return"persistent-license"==this.l?qD(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Hg;rD(this,b,a);return b};
p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=kD("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function pD(){this.size=0;this.g=void 0}p=pD.prototype;p.Ec=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,yg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=yg.value();return this.g&&Jb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var eD="",jD="webkit";fC(dD);function sD(){}function tD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uD,Object.defineProperty(a,"disablePictureInPicture",{get:vD,set:wD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xD,document.addEventListener("webkitpresentationmodechanged",yD,!0))}}
function yD(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){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 uD(){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 xD(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function vD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}cC.PiPWebkit=sD;sD.install=tD;fC(tD);function zD(){}function AD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=BD))}function BD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}cC.RandomUUID=zD;zD.install=AD;fC(AD);function CD(){}function DD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ED})}function ED(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}cC.Symbol=CD;CD.install=DD;fC(DD);function FD(){}function GD(){for(var a=u([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=HD),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=ID),b.prototype.includes||(b.prototype.includes=JD)}function HD(a,b){return Array.prototype.indexOf.call(this,a,b)}function ID(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
function JD(a,b){return-1!==this.indexOf(a,b)}cC.TypedArray=FD;FD.install=GD;fC(GD);function KD(){}function LD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}cC.VideoPlayPromise=KD;KD.install=LD;fC(LD);function MD(){}function ND(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||"number"===typeof Fi().webkitDroppedFrameCount)&&(a.getVideoPlaybackQuality=OD)}}function OD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}cC.VideoPlaybackQuality=MD;MD.install=ND;fC(ND);function PD(){}function QD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=RD;else if(6==b)a=SD;else{try{var c=!!RD(1,2,"")}catch(d){c=!1}c&&(a=RD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function RD(a,b,c){return new window.TextTrackCue(a,b,c)}function SD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}cC.VTTCue=PD;PD.install=QD;fC(QD);function TD(a){jb.call(this);this.h=a;this.l=null;this.g=[];this.i=-1;this.j=null;this.m=new Oc}pa(TD,jb);p=TD.prototype;p.destroy=function(){var a=this;return Q(function(b){if(1==b.g)return F(b,a.removeAllItems(),2);a.h=null;a.m&&(a.m.release(),a.m=null);jb.prototype.release.call(a);H(b)})};p.configure=function(a){this.l=a};p.getConfiguration=function(){return this.l};p.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i<this.g.length?this.g[this.i]:null};p.getCurrentItemIndex=function(){return this.i};
p.getItems=function(){return this.g.slice()};p.insertItems=function(a){this.g.push.apply(this.g,x(a));this.dispatchEvent(new U("itemsinserted"))};p.removeAllItems=function(){var a=this;return Q(function(b){switch(b.g){case 1:a.m.Sa();if(!(a.g.length&&0<=a.i)){b.A(2);break}return F(b,a.h.kc(),2);case 2:if(!a.j){b.A(4);break}if(a.j.Pf.s){b.A(5);break}return F(b,a.j.Pf.destroy(),5);case 5:a.j=null;case 4:a.g=[],a.i=-1,a.dispatchEvent(new U("itemsremoved")),H(b)}})};
p.playItem=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,t,w;return Q(function(v){if(1==v.g){b.m.Sa();if(!b.g.length||a>=b.g.length)throw new V(2,7,7007);c=b.g[a];b.i!=a&&(b.i=a,b.dispatchEvent(new U("currentitemchanged")));d=b.h.h;e=b.l?b.l.preloadNextUrlWindow:0;0<e&&(f=!1,b.m.o(d,"timeupdate",function(){var y,z,A,B;return Q(function(D){switch(D.g){case 1:if(b.j||1>=b.g.length||f||b.h.T()||!d.duration)return D.return();y=b.h.xa().end-d.currentTime;if(isNaN(y)){D.A(0);break}if(!(y<=e)){D.A(0);break}z=
b.l&&b.l.repeatMode;A=null;b.i+1<b.g.length?A=b.g[b.i+1]:1==z&&(A=b.g[0]);if(!A){D.A(0);break}f=!0;B=null;ta(D,5);return F(D,b.h.preload(A.manifestUri,A.startTime,A.mimeType,A.config),7);case 7:B=D.h;wa(D,6);break;case 5:xa(D),B=null;case 6:b.j={item:A,Pf:B},f=!1,H(D)}})}));b.m.o(b.h,"complete",function(){var y=b.l&&b.l.repeatMode,z=!1;if(2==y)z=!0;else{var A=b.i+1;A<b.g.length?b.playItem(A):1==y&&(1==b.g.length?z=!0:b.playItem(0))}z&&(d.paused?(d.currentTime=b.h.xa().start,d.play()):b.m.o(d,"paused",
function(){d.currentTime=b.h.xa().start;d.play()}))});c.config&&(b.h.sj(),b.h.configure(c.config));g=c.manifestUri;b.j&&b.j.item==c&&b.j.Pf&&(g=b.j.Pf);return F(v,b.h.load(g,c.startTime,c.mimeType),2)}b.j=null;if(c.extraText)for(h=u(c.extraText),k=h.next();!k.done;k=h.next())l=k.value,l.mime?b.h.Td(l.uri,l.language,l.kind,l.mime,l.codecs):b.h.Td(l.uri,l.language,l.kind);if(c.extraThumbnail)for(m=u(c.extraThumbnail),n=m.next();!n.done;n=m.next())q=n.value,b.h.Ye(q);if(c.extraChapter)for(r=u(c.extraChapter),
t=r.next();!t.done;t=r.next())w=t.value,b.h.Xe(w.uri,w.language,w.mime);H(v)})};S("shaka.queue.QueueManager",TD);TD.prototype.playItem=TD.prototype.playItem;TD.prototype.removeAllItems=TD.prototype.removeAllItems;TD.prototype.insertItems=TD.prototype.insertItems;TD.prototype.getItems=TD.prototype.getItems;TD.prototype.getCurrentItemIndex=TD.prototype.getCurrentItemIndex;TD.prototype.getCurrentItem=TD.prototype.getCurrentItem;TD.prototype.getConfiguration=TD.prototype.getConfiguration;
TD.prototype.configure=TD.prototype.configure;TD.prototype.destroy=TD.prototype.destroy;Zp=function(a){return new TD(a)};function UD(){}UD.prototype.parseInit=function(){};UD.prototype.setSequenceMode=function(){};UD.prototype.setManifestType=function(){};UD.prototype.parseMedia=function(a,b){var c=null,d=[];a=Wb(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=VD.exec(e))){var f=WD.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new ne(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",UD);UD.prototype.parseMedia=UD.prototype.parseMedia;UD.prototype.setManifestType=UD.prototype.setManifestType;UD.prototype.setSequenceMode=UD.prototype.setSequenceMode;UD.prototype.parseInit=UD.prototype.parseInit;var VD=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,WD=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;nf("application/x-subtitle-lrc",function(){return new UD});function XD(){}XD.prototype.parseInit=function(){};XD.prototype.setSequenceMode=function(){};XD.prototype.setManifestType=function(){};
XD.prototype.parseMedia=function(a,b,c,d){var e=Wb(a);a=[];if(""==e)return a;var f=Hd(e,"tt",!0);if(!f)throw new V(2,2,2005,"Failed to parse TTML.");e=Rd(f,"body")[0];if(!e)return[];var g=Xd(f,YD,"frameRate"),h=Xd(f,YD,"subFrameRate"),k=Xd(f,YD,"frameRateMultiplier"),l=Xd(f,YD,"tickRate"),m=Xd(f,YD,"cellResolution"),n=f.attributes["xml:space"]||"default",q=Xd(f,ZD,"extent");if("default"!=n&&"preserve"!=n)throw new V(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new $D(g,h,k,l);m=aE(m);
h=Rd(f,"metadata")[0];h=(h?h.children:[]).filter(function(w){return"\n"!=w});k=Rd(f,"style");f=Rd(f,"region");l=[];for(var r=u(f),t=r.next();!t.done;t=r.next())(t=bE(t.value,k,q))&&l.push(t);if(Od(e,"p").length)throw new V(2,2,2001,"<p> can only be inside <div> in TTML");q=u(Od(e,"div"));for(r=q.next();!r.done;r=q.next())if(Od(r.value,"span").length)throw new V(2,2,2001,"<span> can only be inside <p> in TTML");if(b=cE(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
a.push(b);return a};
function cE(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(Md(a)){if(!m)return null;var t={tagName:"span",children:[Pd(a)],attributes:{},parent:null}}else t=a;for(var w=null,v=u(dE),y=v.next();!y.done&&!(w=eE(t,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;y=Xd(t,dE,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){v=parseInt(y.split(":").pop(),10)-1;if(v>=q.length)return null;v=q[v]}else n&&y&&!y.startsWith("#")&&(z=new qb(n),y=new qb(y),(y=z.resolve(y).toString())&&
(v=y));if("p"==a.tagName||w||v)m=!0;a=m;y="default"==(t.attributes["xml:space"]||(h?"default":"preserve"));z=t.children.every(Md);h=[];if(!z)for(var A=u(t.children),B=A.next();!B.done;B=A.next())(B=cE(B.value,b,c,d,e,f,g,y,k,t,m,n,q))&&h.push(B);d=null!=l;n=Pd(t);n=t.children.length&&n&&/\S/.test(n);A=t.attributes.begin||t.attributes.end||t.attributes.dur;if(!(A||n||"br"==t.tagName||0!=h.length||d&&!y))return null;q=fE(t,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=gE(r,c,n,q),n=q.start,
q=q.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;q=null==q?Infinity:q+b.periodStart;n=Math.max(n,b.segmentStart);q=Math.min(q,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,q=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),q=Math.max(q,c.endTime);if("br"==t.tagName)return e=new ne(n,q,""),e.lineBreak=!0,e;b="";z&&(b=cc(Pd(t)||""),y&&(b=b.replace(/\s+/g," ")));b=new ne(n,q,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=eE(t,"region",f,"")[0];if(t.attributes.region&&
k&&k.attributes["xml:id"]){var D=k.attributes["xml:id"];b.region=g.filter(function(G){return G.id==D})[0]}g=k;l&&d&&!t.attributes.region&&!t.attributes.style&&(g=eE(l,"region",f,"")[0]);hE(b,t,g,w,v,e,a,0==h.length);return b}
function bE(a,b,c){var d=new od,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=iE.exec(c)||jE.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=kE(a,b,"extent");if(g){var h=(f=iE.exec(g))||jE.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?pd:0,d.heightUnits=f||null!=e?pd:0)}if(a=kE(a,b,"origin"))if(h=(f=iE.exec(a))||jE.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=pd,d.height=100-d.viewportAnchorY,d.heightUnits=pd):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?pd:0;return d}function lE(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function hE(a,b,c,d,e,f,g,h){g=g||h;"rtl"==mE(b,c,f,"direction",g)&&(a.direction="rtl");h=mE(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=qe);(h=mE(b,c,f,"textAlign",!0))?(a.positionAlign=nE.get(h),a.lineAlign=oE.get(h),a.textAlign=Oe[h.toUpperCase()]):a.textAlign=pe;if(h=mE(b,c,f,"displayAlign",!0))a.displayAlign=Pe[h.toUpperCase()];if(h=mE(b,c,f,"color",g))a.color=lE(h);if(h=mE(b,
c,f,"backgroundColor",g))a.backgroundColor=lE(h);if(h=mE(b,c,f,"border",g))a.border=h;if(h=mE(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
k}).join(",")}(h=mE(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=Le);h=mE(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=mE(b,c,f,"lineHeight",g))&&h.match(pE)&&(a.lineHeight=h);(h=mE(b,c,f,"fontSize",g))&&(h.match(pE)||h.match(qE))&&(a.fontSize=h);if(h=mE(b,c,f,"fontStyle",g))a.fontStyle=Re[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Pd(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
e);if(d=mE(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(pE)?a.textStrokeColor=a.color:(a.textStrokeColor=lE(d[0]),d.shift()),d[0]&&d[0].match(pE)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=mE(b,c,f,"letterSpacing",g))&&d.match(pE)&&(a.letterSpacing=d);(d=mE(b,c,f,"linePadding",g))&&d.match(pE)&&(a.linePadding=d);if(d=mE(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=kE(c,f,"textDecoration"))&&rE(a,d);(d=sE(b,f,"textDecoration"))&&rE(a,d);if(d=mE(b,c,f,"textCombine",g))a.textCombineUpright=
d;switch(mE(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
function rE(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(Ne)||a.textDecoration.push(Ne);break;case "noUnderline":a.textDecoration.includes(Ne)&&sd(a.textDecoration,Ne);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&sd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&sd(a.textDecoration,"overline")}}function mE(a,b,c,d,e){e=void 0===e?!0:e;return(a=sE(a,c,d))?a:e?kE(b,c,d):null}function kE(a,b,c){if(!a)return null;var d=Xd(a,ZD,c);return d?d:tE(a,b,c)}function sE(a,b,c){var d=Xd(a,ZD,c);return d?d:tE(a,b,c)}
function tE(a,b,c){a=eE(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Wd(a[e],"urn:ebu:tt:style",c);f||(f=Xd(a[e],ZD,c));f||(f=sE(a[e],b,c));f&&(d=f)}return d}function eE(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?Wd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(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 gE(a,b,c,d){a=fE(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function fE(a,b){var c=uE(a.attributes.begin,b),d=uE(a.attributes.end,b);a=uE(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
function uE(a,b){var c=null;if(vE.test(a)){a=vE.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+60*d+3600*c}else if(wE.test(a))c=xE(wE,a);else if(yE.test(a))c=xE(yE,a);else if(zE.test(a))a=zE.exec(a),c=Number(a[1])/b.frameRate;else if(AE.test(a))a=AE.exec(a),c=Number(a[1])/b.g;else if(BE.test(a))c=xE(BE,a);else if(a)throw new V(2,2,2001,"Could not parse cue time range in TTML");return c}
function xE(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function aE(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Qc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",XD);XD.prototype.parseMedia=XD.prototype.parseMedia;XD.prototype.setManifestType=XD.prototype.setManifestType;XD.prototype.setSequenceMode=XD.prototype.setSequenceMode;XD.prototype.parseInit=XD.prototype.parseInit;
function $D(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var iE=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,qE=/^(\d{1,4}(?:\.\d+)?|100)%$/,pE=/^(\d+px|\d+em|\d*\.?\d+c)$/,jE=/^(\d+)px (\d+)px$/,vE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,yE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,zE=/^(\d*(?:\.\d*)?)f$/,AE=/^(\d*(?:\.\d*)?)t$/,BE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),oE=(new Map).set("left",ue).set("center","center").set("right",
"end").set("start",ue).set("end","end"),nE=(new Map).set("left","line-left").set("center","center").set("right","line-right"),YD=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],ZD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],dE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];nf("application/ttml+xml",function(){return new XD});function CE(){this.g=new XD}CE.prototype.parseInit=function(a){var b=!1;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).box("minf",ph).box("stbl",ph).V("stsd",rh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new V(2,2,2007);};CE.prototype.setSequenceMode=function(){};CE.prototype.setManifestType=function(){};
CE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new kh).box("moof",ph).box("traf",ph).V("tfhd",function(y){e=Hi(y.reader,y.flags).Zd}).V("trun",function(y){y=Ki(y.reader,y.version,y.flags);y=u(y.Ph);for(var z=y.next();!z.done;z=y.next())h.push(z.value.sampleSize||e||0)}).V("subs",function(y){for(var z=y.reader,A=z.W(),B=-1,D=0;D<A;D++){var G=z.W();B+=G;G=z.Fa();for(var C=[],E=0;E<G;E++)1==y.version?C.push(z.W()):C.push(z.Fa()),z.aa(),z.aa(),z.W();g.set(B,C)}}).box("mdat",
uh(function(y){f.push(y)})).parse(a,!1);if(0==f.length)throw new V(2,2,2007);for(var k=kc.apply(dc,x(f)),l=0,m=0;m<h.length;m++){var n=Kb(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=Kb(n,0,q[0]);for(var r=[],t=q[0],w=1;w<q.length;w++){var v=Kb(a,t,q[w]);v=ec(v);r.push("data:image/png;base64,"+v);t+=q[w]}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",CE);CE.prototype.parseMedia=CE.prototype.parseMedia;
CE.prototype.setManifestType=CE.prototype.setManifestType;CE.prototype.setSequenceMode=CE.prototype.setSequenceMode;CE.prototype.parseInit=CE.prototype.parseInit;nf('application/mp4; codecs="stpp"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml.im1i"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml.im1t"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml.im2i"',function(){return new CE});
nf('application/mp4; codecs="stpp.ttml.im2t"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml.etd1"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new CE});nf('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new CE});nf('application/mp4; codecs="stpp.TTML.im1t"',function(){return new CE});function DE(){this.g="UNKNOWN"}DE.prototype.parseInit=function(){};DE.prototype.setSequenceMode=function(){};DE.prototype.setManifestType=function(a){this.g=a};
DE.prototype.parseMedia=function(a,b){a=Wb(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 V(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)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 V(2,2,2E3);a=Cd(a[1]);if(null==a)throw new V(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,
d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=u(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new vd(e);var f=new od;zd(e);wd(e);for(var g=zd(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");wd(e);g=zd(e)}b.push(f)}d=new Map;Ee(d);e=[];c=u(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
(g=-1));h=u(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 ne(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(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=Le;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=xe;break;case "italic":m=!0;l.fontStyle=Me;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="noWrap"!=r}}}m&&d.set(g,
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new vd(l[0]),g=Ad(h),n=yd(h,/[ \t]+--\x3e[ \t]+/g),k=Ad(h),null==g||null==n||null==k)ab("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 ne(g,k,m);wd(h);for(g=zd(h);g;)EE(l,g,b),wd(h),g=zd(h);
De(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
function EE(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pe:a.textAlign=Oe[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"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="line-left"==b||"start"==b?"line-left":"line-right"==
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":oe);else if(d=/^region:(.*)$/.exec(b)){if(b=FE(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=Qe[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=te,a.line=Number(c[1]),c[2]&&(a.lineAlign=Qe[c[2].toUpperCase()])}
function FE(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}S("shaka.text.VttTextParser",DE);DE.prototype.parseMedia=DE.prototype.parseMedia;DE.prototype.setManifestType=DE.prototype.setManifestType;DE.prototype.setSequenceMode=DE.prototype.setSequenceMode;DE.prototype.parseInit=DE.prototype.parseInit;nf("text/vtt",function(){return new DE});nf('text/vtt; codecs="vtt"',function(){return new DE});nf('text/vtt; codecs="wvtt"',function(){return new DE});function GE(){this.g=null}GE.prototype.parseInit=function(a){var b=this,c=!1;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).V("mdhd",function(d){d=Ji(d.reader,d.version);b.g=d.timescale}).box("minf",ph).box("stbl",ph).V("stsd",rh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new V(2,2,2008);if(!c)throw new V(2,2,2008);};GE.prototype.setSequenceMode=function(){};GE.prototype.setManifestType=function(){};
GE.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new V(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new kh).box("moof",ph).box("traf",ph).V("tfdt",function(A){g=!0;c=Ii(A.reader,A.version).baseMediaDecodeTime}).V("tfhd",function(A){l=Hi(A.reader,A.flags).Yd}).V("trun",function(A){h=!0;d=Ki(A.reader,A.version,A.flags).Ph}).box("mdat",uh(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new V(2,2,2008);a=c;for(var m=new hh(e,0),n=u(d),q=n.next();!q.done;q=n.next()){q=
q.value;var r=q.Qh||l,t=q.Wf?c+q.Wf:a;a=t+(r||0);var w=0;do{var v=m.W();w+=v;var y=m.W(),z=null;"vttc"==oh(y)?8<v&&(z=m.Xb(v-8)):m.skip(v-8);r&&z&&(v=HE(z,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(v))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(Bf)};function HE(a,b,c){var d,e,f;(new kh).box("payl",uh(function(g){d=Wb(g)})).box("iden",uh(function(g){e=Wb(g)})).box("sttg",uh(function(g){f=Wb(g)})).parse(a);return d?IE(d,e,f,b,c):null}
function IE(a,b,c,d,e){a=new ne(d,e,a);De(a);b&&(a.id=b);if(c)for(b=new vd(c),c=zd(b);c;)EE(a,c,[]),wd(b),c=zd(b);return a}S("shaka.text.Mp4VttParser",GE);GE.prototype.parseMedia=GE.prototype.parseMedia;GE.prototype.setManifestType=GE.prototype.setManifestType;GE.prototype.setSequenceMode=GE.prototype.setSequenceMode;GE.prototype.parseInit=GE.prototype.parseInit;nf('application/mp4; codecs="wvtt"',function(){return new GE});function JE(){}JE.prototype.parseInit=function(){};JE.prototype.setSequenceMode=function(){};JE.prototype.setManifestType=function(){};JE.prototype.parseMedia=function(a){var b=Wb(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new vd(c[0]),e=Ad(d),f=yd(d,/,/g);d=Ad(d);if(null==e||null==f||null==d)throw new V(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ne(e,d,c.slice(1).join("\n").trim()))}return a};
S("shaka.text.SbvTextParser",JE);JE.prototype.parseMedia=JE.prototype.parseMedia;JE.prototype.setManifestType=JE.prototype.setManifestType;JE.prototype.setSequenceMode=JE.prototype.setSequenceMode;JE.prototype.parseInit=JE.prototype.parseInit;nf("text/x-subviewer",function(){return new JE});function KE(){this.g=new DE}KE.prototype.parseInit=function(){};KE.prototype.setSequenceMode=function(){};KE.prototype.setManifestType=function(){};KE.prototype.parseMedia=function(a,b,c){a=Wb(a);a=LE(a);a=Kb($b(a));return this.g.parseMedia(a,b,c,[])};
function LE(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(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",KE);KE.srt2webvtt=LE;KE.prototype.parseMedia=KE.prototype.parseMedia;
KE.prototype.setManifestType=KE.prototype.setManifestType;KE.prototype.setSequenceMode=KE.prototype.setSequenceMode;KE.prototype.parseInit=KE.prototype.parseInit;nf("text/srt",function(){return new KE});function ME(){}ME.prototype.parseInit=function(){};ME.prototype.setSequenceMode=function(){};ME.prototype.setManifestType=function(){};
ME.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Wb(a).split(/\r?\n\s*\r?\n/);a=u(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=NE.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=u(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=OE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(PE);else if("Style"==a){a=f.split(PE);f={};for(var g=0;g<e.length&&
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=u(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Kj:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=OE.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(PE);else if("Dialogue"==f){g=g.split(PE);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=QE(f.Start);var k=QE(f.End);g=new ne(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Kj=f.Style;(a=d.find(function(l){return function(m){return m.Name==
l.Kj}}(a)))&&RE(g,a);e.push(g)}return e};
function RE(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=SE(c))a.color=c;if(c=b.BackColour)if(c=SE(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=Le);b.Italic&&(a.fontStyle=Me);b.Underline&&a.textDecoration.push(Ne);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=ve;a.textAlign="start";break;case 2:a.displayAlign=ve;a.textAlign=pe;break;case 3:a.displayAlign=ve;a.textAlign="end";break;case 5:a.displayAlign=
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=pe;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=pe;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function SE(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
function QE(a){a=TE.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",ME);ME.prototype.parseMedia=ME.prototype.parseMedia;ME.prototype.setManifestType=ME.prototype.setManifestType;ME.prototype.setSequenceMode=ME.prototype.setSequenceMode;ME.prototype.parseInit=ME.prototype.parseInit;var NE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,OE=/^\s*([^:]+):\s*(.*)/,PE=/\s*,\s*/,TE=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
nf("text/x-ssa",function(){return new ME});function UE(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,0<a)?{ie:c,wa:a}:null}function VE(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 WE(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){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&&255===a[b]&&240===(a[b+1]&246)}return!1}
function XE(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)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(6===b)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(1===b)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(2===b||3===b)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 YE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=YE.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(kf(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Kb(a),f=Yj(e),g=f.length;g<e.length&&!WE(e,g);g++);a=1E3*c.endTime;f=Xj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=VE(e,g);if(!f)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=UE(e,g);if(!k)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));var l=k.ie+k.wa;g+l<=e.length&&h.push({data:e.subarray(g+
k.ie,g+l),size:k.wa,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Db:[],La:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.h,baseMediaDecodeTime:a,Bb:h},stream:b};d=new Qi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Wi(d),this.g.set(c,b));c=this.i!==b;d=nj(d);this.i=b;this.h++;return c?(b=kc(b,d),Promise.resolve(b)):
Promise.resolve(d)};S("shaka.transmuxer.AacTransmuxer",YE);YE.prototype.transmux=YE.prototype.transmux;YE.prototype.getOriginalMimeType=YE.prototype.getOriginalMimeType;YE.prototype.convertCodecs=YE.prototype.convertCodecs;YE.prototype.isSupported=YE.prototype.isSupported;YE.prototype.destroy=YE.prototype.destroy;Te("audio/aac",function(){return new YE("audio/aac")},Ze);function ZE(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[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][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(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,La:a,wa:e}}
function $E(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){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(16>c)return!0}return!1};function aF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=aF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?Rb().we()?'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=Kb(a);for(var e=Yj(a),f=e.length;f<a.length&&!$E(a,f);f++);var g=1E3*c.endTime;e=Xj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=ZE(a,f);if(!l)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.La;k.push({data:a.subarray(f,f+l.wa),size:l.wa,duration:1536,
xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});f+=l.wa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Db:[],La:h,Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.h,baseMediaDecodeTime:a,Bb:k},stream:b};d=new Qi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Wi(d),this.g.set(c,b));c=this.i!==b;d=nj(d);this.i=b;this.h++;return c?(b=kc(b,d),Promise.resolve(b)):Promise.resolve(d)};S("shaka.transmuxer.Ac3Transmuxer",aF);
aF.prototype.transmux=aF.prototype.transmux;aF.prototype.getOriginalMimeType=aF.prototype.getOriginalMimeType;aF.prototype.convertCodecs=aF.prototype.convertCodecs;aF.prototype.isSupported=aF.prototype.isSupported;aF.prototype.destroy=aF.prototype.destroy;Te("audio/ac3",function(){return new aF("audio/ac3")},Ze);function bF(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ak(a.subarray(b+2));ck(c,2);ck(c,3);var d=dk(c,11)+1<<1,e=dk(c,2);if(3==e){e=dk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=dk(c,2);var g=dk(c,3),h=dk(c,1);c=dk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));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,La:a,wa:d}};function cF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=cF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Kb(a);for(var e=Yj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Xj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=bF(a,f);if(!l)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.La;k.push({data:a.subarray(f,f+l.wa),
size:l.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});f+=l.wa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Db:[],La:h,Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.h,baseMediaDecodeTime:a,Bb:k},stream:b};d=new Qi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Wi(d),this.g.set(c,b));c=this.i!==b;d=nj(d);this.i=b;this.h++;return c?(b=kc(b,d),Promise.resolve(b)):Promise.resolve(d)};
S("shaka.transmuxer.Ec3Transmuxer",cF);cF.prototype.transmux=cF.prototype.transmux;cF.prototype.getOriginalMimeType=cF.prototype.getOriginalMimeType;cF.prototype.convertCodecs=cF.prototype.convertCodecs;cF.prototype.isSupported=cF.prototype.isSupported;cF.prototype.destroy=cF.prototype.destroy;Te("audio/ec3",function(){return new cF("audio/ec3")},Ze);function dF(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new ak(b.data),d=jk(c);jk(c);jk(c);fk(c);if(eF.includes(d)&&(d=gk(c),3===d&&ck(c,1),fk(c),fk(c),ck(c,1),ik(c))){d=3!==d?8:12;for(var e=0;e<d;e++)ik(c)&&(6>e?kk(c,16):kk(c,64))}fk(c);d=gk(c);if(0===d)gk(c);else if(1===d)for(ck(c,1),fk(c),fk(c),d=gk(c),e=0;e<d;e++)fk(c);fk(c);ck(c,1);var f=gk(c),g=gk(c),h=dk(c,1);0===h&&ck(c,1);ck(c,1);var k=0,l=0,m=
0,n=0;ik(c)&&(k=gk(c),l=gk(c),m=gk(c),n=gk(c));e=d=1;if(ik(c)&&ik(c)){var q=jk(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=r[q-1],e=t[q-1]):255===q&&(d=dk(c,16),e=dk(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;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,Wa:a,cb:d,fb:e}}
function fF(a){function b(t){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:t.pts,dts:t.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var t=[],w=u(e.nalus),v=w.next();!v.done;v=w.next()){v=v.value;var y=v.fullData.byteLength,z=new Uint8Array(4);z[0]=y>>24&255;z[1]=y>>16&255;z[2]=y>>8&255;z[3]=y&255;t.push(z);t.push(v.fullData)}e.data=kc.apply(dc,x(t));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=u(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&&4<r.length&&(r=lk(new ak(r)),2===r||4===r||7===r||9===r)&&(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 eF=[100,110,122,244,44,83,86,118,128,138,139,134];function gF(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=hF(b.fullData);a=iF(c.fullData);var f=jF(d.fullData);b=kF(b.fullData,c.fullData,d.fullData,{Ch:e.Ch,gi:e.gi,ah:a.ah,bh:a.bh,Vg:a.Vg,$g:a.$g,Wg:a.Wg,Xg:a.Xg,Yg:a.Yg,Zg:a.Zg,Pg:a.Pg,Qg:a.Qg,Rg:a.Rg,Sg:a.Sg,Tg:a.Tg,Ug:a.Ug,Hg:a.Hg,Gf:a.Gf,Fg:a.Fg,Bg:a.Bg,Ag:a.Ag,Eh:f.Eh});return{height:a.height,width:a.width,
Wa:b,cb:a.am,fb:a.$l}}function hF(a){var b=new ak(a,!0);jk(b);jk(b);dk(b,4);dk(b,2);dk(b,6);a=dk(b,3);b=ik(b);return{Ch:a+1,gi:b}}
function iF(a){a=new ak(a,!0);jk(a);jk(a);var b=0,c=0,d=0,e=0;dk(a,4);var f=dk(a,3);ik(a);for(var g=dk(a,2),h=dk(a,1),k=dk(a,5),l=jk(a),m=jk(a),n=jk(a),q=jk(a),r=jk(a),t=jk(a),w=jk(a),v=jk(a),y=jk(a),z=jk(a),A=jk(a),B=[],D=[],G=0;G<f;G++)B.push(ik(a)),D.push(ik(a));if(0<f)for(G=f;8>G;G++)dk(a,2);for(G=0;G<f;G++)B[G]&&dk(a,88),D[G]&&jk(a);gk(a);B=gk(a);3==B&&dk(a,1);D=gk(a);G=gk(a);ik(a)&&(b+=gk(a),c+=gk(a),d+=gk(a),e+=gk(a));var C=gk(a),E=gk(a),I=gk(a);if(ik(a))for(var K=0;K<=f;K++)gk(a),gk(a),gk(a);
else gk(a),gk(a),gk(a);gk(a);gk(a);gk(a);gk(a);gk(a);gk(a);if(ik(a)&&ik(a))for(K=0;4>K;K++)for(var J=0;J<(3===K?2:6);J++)if(ik(a)){var L=Math.min(64,1<<4+(K<<1));1<K&&hk(a);for(var M=0;M<L;M++)hk(a)}else gk(a);ik(a);ik(a);ik(a)&&(jk(a),gk(a),gk(a),ik(a));K=gk(a);for(L=J=0;L<K;L++)if(M=!1,0!==L&&(M=ik(a)),M){L===K&&gk(a);ik(a);gk(a);for(var O=M=0;O<=J;O++){var N=ik(a),P=!1;N||(P=ik(a));(N||P)&&M++}J=M}else{O=gk(a);M=gk(a);J=O+M;for(N=0;N<O;N++)gk(a),ik(a);for(O=0;O<M;O++)gk(a),ik(a)}if(ik(a))for(K=
gk(a),J=0;J<K;J++){for(L=0;L<I+4;L++)dk(a,1);dk(a,1)}K=I=1;J=0;ik(a);ik(a);if(ik(a)){ik(a)&&(L=jk(a),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<L&&16>=L?(I=M[L-1],K=O[L-1]):255===L&&(I=dk(a,16),K=dk(a,16)));ik(a)&&ik(a);ik(a)&&(dk(a,3),ik(a),ik(a)&&(jk(a),jk(a),jk(a)));ik(a)&&(gk(a),gk(a));ik(a);ik(a);ik(a);if(L=ik(a))gk(a),gk(a),gk(a),gk(a);if(ik(a)&&(dk(a,32),dk(a,32),ik(a)&&gk(a),ik(a))){O=!1;L=ik(a);M=ik(a);if(L||M){if(O=ik(a))jk(a),dk(a,
5),ik(a),dk(a,5);dk(a,4);dk(a,4);O&&dk(a,4);dk(a,5);dk(a,5);dk(a,5)}for(N=0;N<=f;N++){var R=!0;P=1;ik(a)||(R=ik(a));var T=!1;R?gk(a):T=ik(a);T||(P=gk(a)+1);if(L){for(R=0;R<P;R++)gk(a),gk(a),O&&(gk(a),gk(a));ik(a)}if(M){for(R=0;R<P;R++)gk(a),gk(a),O&&(gk(a),gk(a));ik(a)}}}ik(a)&&(ik(a),ik(a),ik(a),J=gk(a),gk(a),gk(a),gk(a),gk(a))}return{Vg:A,ah:g,bh:h,$g:k,Wg:l,Xg:m,Yg:n,Zg:q,Pg:r,Qg:t,Rg:w,Sg:v,Tg:y,Ug:z,Gf:J,Hg:0,Fg:B,Bg:C,Ag:E,width:D-(b+c)*(1===B||2===B?2:1),height:G-(d+e)*(1===B?2:1),am:I,$l:K}}
function jF(a){var b=new ak(a,!0);jk(b);jk(b);gk(b);gk(b);ik(b);ik(b);dk(b,3);ik(b);ik(b);gk(b);gk(b);hk(b);ik(b);ik(b);ik(b)&&gk(b);hk(b);hk(b);ik(b);ik(b);ik(b);ik(b);a=ik(b);b=ik(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Eh:c}}
function kF(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ah&3)<<6|(d.bh?1:0)<<5|d.$g&31;e[2]=d.Wg;e[3]=d.Xg;e[4]=d.Yg;e[5]=d.Zg;e[6]=d.Pg;e[7]=d.Qg;e[8]=d.Rg;e[9]=d.Sg;e[10]=d.Tg;e[11]=d.Ug;e[12]=d.Vg;e[13]=240|(d.Gf&3840)>>8;e[14]=d.Gf&255;e[15]=252|d.Eh&3;e[16]=252|d.Fg&3;e[17]=248|d.Bg&7;e[18]=248|d.Ag&7;e[19]=0;e[20]=0;e[21]=(d.Hg&3)<<6|(d.Ch&7)<<3|(d.gi?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function lF(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(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*mF[14*(3===c?3-d:3===d?3:4)+e-1];f=nF[3*(3===c?0:2===c?1:2)+f];c=oF[c][d];var h=pF[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)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,wa:k,Zl:8*c*h}}return null}
function qF(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function rF(a,b){if(b+1<a.length&&qF(a,b)){var c=lF(a,b),d=4;c&&c.wa&&(d=c.wa);b+=d;return b===a.length||b+1<a.length&&qF(a,b)}return!1}
var mF=[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],nF=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],oF=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],pF=[0,1,1,4];function sF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=sF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Kb(a),f=Yj(e).length;f<e.length&&!rF(e,f);f++);var g;for(a=[];f<e.length;){var h=lF(e,f);if(!h)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));g||(g=h);f+h.wa<=e.length&&a.push({data:e.subarray(f,f+h.wa),size:h.wa,duration:1152,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});f+=h.wa}if(!g)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));e=9E4*g.Zl/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
duration:d,Db:[],La:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.h,baseMediaDecodeTime:e,Bb:a},stream:b};d=new Qi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Wi(d),this.g.set(c,b));c=this.i!==b;d=nj(d);this.i=b;this.h++;return c?(b=kc(b,d),Promise.resolve(b)):Promise.resolve(d)};S("shaka.transmuxer.Mp3Transmuxer",sF);sF.prototype.transmux=sF.prototype.transmux;sF.prototype.getOriginalMimeType=sF.prototype.getOriginalMimeType;sF.prototype.convertCodecs=sF.prototype.convertCodecs;
sF.prototype.isSupported=sF.prototype.isSupported;sF.prototype.destroy=sF.prototype.destroy;Te("audio/mpeg",function(){return new sF("audio/mpeg")},Ze);function tF(a){this.h=a;this.g=null}p=tF.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=kf(a).split(","),c=pc("audio",b);b=pc("video",b);return!c||b||"mp3"!=ff(c)?!1:bd(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"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 mk;a=Kb(a);a=this.g.parse(a);if("mp3"!=a.ae().audio||"audio"!=e)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));c=new Uint8Array([]);e=u(a.yb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=lF(a,b))?(b+d.wa<=a.length&&(c=kc(c,a.subarray(b,b+d.wa))),b+=d.wa):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",tF);tF.prototype.transmux=tF.prototype.transmux;
tF.prototype.getOriginalMimeType=tF.prototype.getOriginalMimeType;tF.prototype.convertCodecs=tF.prototype.convertCodecs;tF.prototype.isSupported=tF.prototype.isSupported;tF.prototype.destroy=tF.prototype.destroy;Te("video/mp2t",function(){return new tF("video/mp2t")},Ye);/*
@license
MSS Transmuxer
Copyright 2015 Dash Industry Forum
SPDX-License-Identifier: BSD-3-Clause
*/
function uF(a){this.h=a;(this.g=ix.get("ISOBoxer")())&&vF(this)}
function vF(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",1===this.version?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);0===this.default_sample_info_size&&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;16>d;d++)this.usertype[d]!==wF[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=uF.prototype;p.destroy=function(){};
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return bd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bd(b)||bd(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(Kb(a));if(!b.mssPrivateData)return Promise.reject(new V(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");null===g&&(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(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){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 t=e.fetch("moof");k.data_offset=t.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=xF(t,"traf")+xF(h,"senc")+16);var v=Kb(e.write());return Promise.resolve(v)}catch(y){return y instanceof V?Promise.reject(y):Promise.reject(new V(2,3,3022,c?c.S()[0]:null))}};function xF(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",uF);uF.prototype.transmux=uF.prototype.transmux;
uF.prototype.getOriginalMimeType=uF.prototype.getOriginalMimeType;uF.prototype.convertCodecs=uF.prototype.convertCodecs;uF.prototype.isSupported=uF.prototype.isSupported;uF.prototype.destroy=uF.prototype.destroy;var wF=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Te("mss/audio/mp4",function(){return new uF("mss/audio/mp4")},Ze);Te("mss/video/mp4",function(){return new uF("mss/video/mp4")},Ze);function yF(a){this.m=a;this.g=0;this.i=new Map;this.l=this.h=this.j=null}p=yF.prototype;p.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=kf(c).split(",");c=pc("audio",d);d=pc("video",d);if(c&&(c=ff(c),!zF.includes(c))||d&&(c=ff(d),!AF.includes(c)))return!1;if(b)return bd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bd(b)||bd(a)};
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=kf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Uf(c,"audio/mp4")}).map(Vf).join(","),"audio"==a?'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=Kb(a);if("audio"==e&&!uk(f)){for(var g=Yj(f),h=g.length;h<f.length;h++)if(rF(f,h))return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(WE(f,h))return this.h||(this.h=new YE("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new V(2,3,3018,c?c.S()[0]:null))}this.j?this.j.clearData():this.j=new mk;var k=this.j.parse(f),l=[],m=k.ae();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],r=null,t=k.Wc(),w=
fF(t);if(!w.length)throw new V(2,3,3023,c?c.S()[0]:null);for(var v=0;v<w.length;v++){var y=w[v];null==r&&(r=y.dts);var z=void 0;z=v+1<w.length?(w[v+1].dts||0)-(y.dts||0):1<w.length?(y.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:y.data,size:y.data.byteLength,duration:z,xb:Math.round((y.pts||0)-(y.dts||0)),flags:{zb:0,sb:0,rb:0,pb:0,qb:y.isKeyframe?2:1,Ab:y.isKeyframe?0:1}})}for(var A=[],B=u(t),D=B.next();!D.done;D=B.next())A.push.apply(A,x(D.value.nalus));var G=dF(A);if(!G||null==
r)throw new V(2,3,3018,c?c.S()[0]:null);b.height=G.height;b.width=G.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Db:[],La:new Uint8Array([]),Wa:G.Wa,cb:G.cb,fb:G.fb,data:{Yb:this.g,baseMediaDecodeTime:r,Bb:q},stream:b};break;case "hvc":var C=[],E=null,I=[],K=k.Wc();if(!K.length)throw new V(2,3,3023,c?c.S()[0]:null);for(var J=0;J<K.length;J++){var L=K[J],M=L.nalus;I.push.apply(I,x(M));for(var O=!1,N=[],P=!1,R=u(M),T=R.next();!T.done;T=
R.next()){var ca=T.value;switch(ca.type){case 1:case 0:var Y=P=!0;break;case 19:case 20:case 21:O=Y=P=!0;break;case 32:Y=!0;break;case 33:Y=!0;break;case 34:Y=!0;break;case 35:P=Y=!0;break;case 39:case 40:Y=!0;break;default:Y=!1}if(P&&Y){var Ma=ca.fullData.byteLength,Na=new Uint8Array(4);Na[0]=Ma>>24&255;Na[1]=Ma>>16&255;Na[2]=Ma>>8&255;Na[3]=Ma&255;N.push(Na);N.push(ca.fullData)}}var Ea=N.length?{data:kc.apply(dc,x(N)),isKeyframe:O}:null;if(Ea){null==E&&null!=L.dts&&(E=L.dts);var va=void 0;va=J+
1<K.length?(K[J+1].dts||0)-(L.dts||0):1<K.length?(L.dts||0)-(K[J-1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ea.data,size:Ea.data.byteLength,duration:va,xb:Math.round((L.pts||0)-(L.dts||0)),flags:{zb:0,sb:0,rb:0,pb:0,qb:Ea.isKeyframe?2:1,Ab:Ea.isKeyframe?0:1}})}}var Ka=gF(I);if(!Ka||null==E)throw new V(2,3,3018,c?c.S()[0]:null);b.height=Ka.height;b.width=Ka.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Db:[],La:new Uint8Array([]),
Wa:Ka.Wa,cb:Ka.cb,fb:Ka.fb,data:{Yb:this.g,baseMediaDecodeTime:E,Bb:C},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Pa=[],za,ia=null,Aa=null,eb=null,fb=u(k.yb()),mb=fb.next();!mb.done;mb=fb.next()){var xb=mb.value,sb=xb.data;if(sb){var Ua=0;if(-1==Aa&&eb)sb=kc(eb,xb.data),Aa=null;else if(null!=Aa&&eb){Ua=Math.max(0,Aa);var re=kc(eb,sb.subarray(0,Ua));Pa.push({data:re,size:re.byteLength,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});Aa=eb=null}za=VE(sb,
Ua);if(!za)throw new V(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=za.sampleRate;b.channelsCount=za.channelCount;null==ia&&null!==xb.pts&&(ia=xb.pts);for(;Ua<sb.length;){var tc=UE(sb,Ua);if(!tc){eb=sb.subarray(Ua,sb.length);Aa=-1;break}var ze=tc.ie+tc.wa;Aa=Math.max(0,Ua+ze-sb.length);0!=Aa?eb=sb.subarray(Ua+tc.ie,Ua+ze):Ua+ze<=sb.length&&Pa.push({data:sb.subarray(Ua+tc.ie,Ua+ze),size:tc.wa,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});Ua+=ze}}}if(!za||null==ia){if(!k.Wc().length)throw new V(2,
3,3018,c?c.S()[0]:null);ia=9E4*c.startTime;var tg=pc("audio",b.codecs.split(","));if(!tg||!b.channelsCount||!b.audioSamplingRate)throw new V(2,3,3018,c?c.S()[0]:null);za={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:tg};var ug=XE(tg,b.channelsCount);if(!ug)throw new V(2,3,3018,c?c.S()[0]:null);for(var md=ia+9E4*(c.endTime-c.startTime),dz=ia;dz<md;)Pa.push({data:ug,size:ug.byteLength,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}}),dz+=1024/za.sampleRate*9E4}var ez=za.sampleRate,
AJ=ia/9E4*ez;n={id:b.id,type:"audio",codecs:za.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ez,duration:d,Db:[],La:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.g,baseMediaDecodeTime:AJ,Bb:Pa},stream:b};break;case "ac3":for(var fz=[],cl=0,Cp=new Uint8Array([]),dl=null,gz=u(k.yb()),Dp=gz.next();!Dp.done;Dp=gz.next()){var Ep=Dp.value,Fp=Ep.data;null==dl&&null!==Ep.pts&&(dl=Ep.pts);for(var Ag=0;Ag<Fp.length;){var Be=ZE(Fp,Ag);Be?(b.audioSamplingRate=Be.sampleRate,b.channelsCount=
Be.channelCount,cl=Be.sampleRate,Cp=Be.La,fz.push({data:Fp.subarray(Ag,Ag+Be.wa),size:Be.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}}),Ag+=Be.wa):Ag++}}if(0==cl||0==Cp.byteLength||null==dl)throw new V(2,3,3018,c?c.S()[0]:null);var BJ=dl/9E4*cl;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cl,duration:d,Db:[],La:Cp,Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.g,baseMediaDecodeTime:BJ,Bb:fz},stream:b};break;case "ec3":for(var hz=[],el=0,
Gp=new Uint8Array([]),fl=null,iz=u(k.yb()),Hp=iz.next();!Hp.done;Hp=iz.next()){var Ip=Hp.value,Jp=Ip.data;null==fl&&null!==Ip.pts&&(fl=Ip.pts);for(var Bg=0;Bg<Jp.length;){var Ce=bF(Jp,Bg);Ce?(b.audioSamplingRate=Ce.sampleRate,b.channelsCount=Ce.channelCount,el=Ce.sampleRate,Gp=Ce.La,hz.push({data:Jp.subarray(Bg,Bg+Ce.wa),size:Ce.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}}),Bg+=Ce.wa):Bg++}}if(0==el||0==Gp.byteLength||null==fl)throw new V(2,3,3018,c?c.S()[0]:null);var CJ=fl/9E4*el;
n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:el,duration:d,Db:[],La:Gp,Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.g,baseMediaDecodeTime:CJ,Bb:hz},stream:b};break;case "mp3":for(var jz=[],gl,hl=null,kz=u(k.yb()),Kp=kz.next();!Kp.done;Kp=kz.next()){var Lp=Kp.value,gi=Lp.data;if(gi){null==hl&&null!==Lp.pts&&(hl=Lp.pts);for(var rf=0;rf<gi.length;){var Cg=lF(gi,rf);Cg?(gl||(gl=Cg),rf+Cg.wa<=gi.length&&jz.push({data:gi.subarray(rf,rf+Cg.wa),size:Cg.wa,duration:1152,
xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}}),rf+=Cg.wa):rf++}}}if(!gl||null==hl)throw new V(2,3,3018,c?c.S()[0]:null);var lz=gl.sampleRate,DJ=hl/9E4*lz;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lz,duration:d,Db:[],La:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.g,baseMediaDecodeTime:DJ,Bb:jz},stream:b};break;case "opus":var mz=[],il=null,xd=k.F;if(!xd)throw new V(2,3,3018,c?c.S()[0]:null);var fc=[];switch(xd.fk){case 1:case 2:fc=
[0];break;case 0:fc=[255,1,1,0,1];break;case 128:fc=[255,2,0,0,1];break;case 3:fc=[1,2,1,0,2,1];break;case 4:fc=[1,2,2,0,1,2,3];break;case 5:fc=[1,3,2,0,4,1,2,3];break;case 6:fc=[1,4,2,0,4,1,2,3,5];break;case 7:fc=[1,4,2,0,4,1,2,3,5,6];break;case 8:fc=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:fc=[1,1,2,0,1];break;case 131:fc=[1,1,3,0,1,2];break;case 132:fc=[1,1,4,0,1,2,3];break;case 133:fc=[1,1,5,0,1,2,3,4];break;case 134:fc=[1,1,6,0,1,2,3,4,5];break;case 135:fc=[1,1,7,0,1,2,3,4,5,6];break;case 136:fc=
[1,1,8,0,1,2,3,4,5,6,7]}var nz=new Uint8Array([0,xd.channelCount,0,0,xd.sampleRate>>>24&255,xd.sampleRate>>>17&255,xd.sampleRate>>>8&255,xd.sampleRate>>>0&255,0,0].concat(x(fc)));for(var oz=xd.sampleRate,pz=u(k.yb()),Mp=pz.next();!Mp.done;Mp=pz.next()){var Np=Mp.value,Dg=Np.data;null==il&&null!==Np.pts&&(il=Np.pts);for(var hi=0;hi<Dg.length;){for(var EJ=0!==(Dg[hi+1]&16),FJ=0!==(Dg[hi+1]&8),de=hi+2,jl=0;255===Dg[de];)jl+=255,de+=1;jl+=Dg[de];de+=1;de+=EJ?2:0;de+=FJ?2:0;var qz=Dg.slice(de,de+jl);mz.push({data:qz,
size:qz.byteLength,duration:960,xb:0,flags:{zb:0,sb:0,rb:0,pb:0,qb:2,Ab:0}});hi=de+jl}}if(0==nz.byteLength||null==il)throw new V(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=xd.sampleRate;b.channelsCount=xd.channelCount;var GJ=il/9E4*oz;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:oz,duration:d,Db:[],La:nz,Wa:new Uint8Array([]),cb:0,fb:0,data:{Yb:this.g,baseMediaDecodeTime:GJ,Bb:mz},stream:b}}n&&(l.push(n),n=null)}}catch(Op){return Op&&3023==Op.code?
Promise.resolve(new Uint8Array([])):Promise.reject(Op)}if(!l.length)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));var rz=new Qi(l),Pp=b.id+"_"+c.i;if(this.i.has(Pp))var ii=this.i.get(Pp);else ii=Wi(rz),this.i.set(Pp,ii);var HJ=this.l!==ii,sz=nj(rz);this.l=ii;this.g++;if(HJ){var IJ=kc(ii,sz);return Promise.resolve(IJ)}return Promise.resolve(sz)};S("shaka.transmuxer.TsTransmuxer",yF);yF.prototype.transmux=yF.prototype.transmux;yF.prototype.getOriginalMimeType=yF.prototype.getOriginalMimeType;
yF.prototype.convertCodecs=yF.prototype.convertCodecs;yF.prototype.isSupported=yF.prototype.isSupported;yF.prototype.destroy=yF.prototype.destroy;var zF=["aac","ac-3","ec-3","mp3","opus"],AF=["avc","hevc"];Te("video/mp2t",function(){return new yF("video/mp2t")},Xe);function BF(){}pa(BF,rn);S("shaka.util.FairPlayUtils",BF);/*
@license
EME Encryption Scheme Polyfill
Copyright 2019 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function CF(){}var DF;
function EF(){DF||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(DF=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=FF,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
function FF(a,b){var c=this,d;return Q(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),F(e,DF.call(c,a,b),2);d=e.h;if(GF(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=DF,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=HF;return e.return(HF.call(c,
a,b))})}
function HF(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(w){if(1==w.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=IF(a);e=[];f=u(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=JF(h.videoCapabilities,d),l=JF(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 F(w,DF.call(c,a,e),2)}q=w.h;t=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(t=e[0].audioCapabilities[0].encryptionScheme));return w.return(new KF(q,r,t))})}function JF(a,b){return a?a.filter(function(c){return LF(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",CF);CF.install=EF;function MF(){}var NF;
function OF(){NF||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(NF=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=PF,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
function PF(a){var b=this,c,d;return Q(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),F(e,NF.call(b,a),2);case 2:c=e.h;if(!c.supported||!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&GF(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=NF,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
navigator.mediaCapabilities.decodingInfo=QF;if(d){e.A(3);break}return F(e,RF(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(QF.call(b,a))}})}
function QF(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=IF(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},LF(d,g)&&LF(c,g))?F(l,NF.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
new KF(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);break}return F(l,RF(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function RF(a){var b,c;return Q(function(d){if(1==d.g){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 F(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",MF);MF.install=OF;function KF(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
KF.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=u(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=u(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};KF.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
function IF(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.huawei"))return"cenc";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function GF(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function LF(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(SF||TF||UF)return!0;return!1}function VF(){}function lC(){EF();OF()}S("EncryptionSchemePolyfills",VF);VF.install=lC;var UF=navigator.userAgent.includes("CrKey"),SF=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),WF;
var XF=navigator.userAgent||"";if(XF.includes("Web0S")){var YF=XF.match(/Chrome\/(\d+)/);WF=YF?79<=parseInt(YF[1],10):!1}else WF=!1;var TF=WF;"undefined"!==typeof module&&module.exports&&(module.exports=VF);function ZF(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Oc;this.localization=this.controls.ra;this.player=this.controls.Rb();this.video=this.controls.Fc();this.adManager=this.player.mf();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})}
ZF.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",ZF);ZF.prototype.release=ZF.prototype.release;function $F(a){return aG(a,"shaka-back-to-overflow-button")}function aG(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function bG(a){a&&(a=aG(a,"shaka-chosen-item"))&&a.parentElement.focus()}function cG(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function dG(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
function eG(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function fG(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-ad-info");this.g.disabled=!0;this.parent.appendChild(this.g);this.h=new yf(function(){if(c.ad.isLinear()){var d="",e=c.ad.getSequenceLength();1<e&&(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();-1==f||-1==g?(c.g.textContent=d,dG(c.g,""!=d)):0<f?(f=eG(g-f,!1)+" / "+eG(g,
!1),d=1<e?d+("\u00a0\u00a0"+f):c.localization.resolve("AD_TIME").replace("[AD_TIME]",f),c.g.textContent=d,dG(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.Ja();c.h.ya(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.h.stop();c.g.textContent=""});this.ad&&(this.h.Ja(),this.h.ya(.5))}
pa(fG,ZF);fG.prototype.release=function(){this.h.stop();this.h=null;ZF.prototype.release.call(this)};S("shaka.ui.AdInfo",fG);function gG(a,b){ZF.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;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";dG(c.g,!0)}else dG(c.g,
!1)});this.eventManager.o(window,"click",function(){dG(c.g,!1)});this.eventManager.o(this.g,"click",function(){dG(c.g,!1)});hG(this)}pa(gG,ZF);gG.prototype.release=function(){this.h=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];ZF.prototype.release.call(this)};gG.prototype.Fi=function(){dG(this.g,!1)};function iG(a,b){jG.set(a,b)}
function hG(a){for(var b=u(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=jG.get(c);d?a.i.push(d.create(a.g,a.controls)):ab("Unrecognized context menu element:",c)}}S("shaka.ui.ContextMenu",gG);gG.registerElement=iG;gG.prototype.closeMenu=gG.prototype.Fi;var jG=new Map;function kG(a,b){ZF.call(this,a,b);var c=this;this.button=Kj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){lG(c)});this.eventManager.o(this.localization,"locale-changed",function(){lG(c)});this.eventManager.o(this.video,"play",function(){lG(c);c.g()});this.eventManager.o(this.video,"pause",function(){lG(c);c.g()});this.eventManager.o(this.video,"seeking",function(){lG(c);c.g()});this.eventManager.o(this.adManager,"ad-paused",function(){lG(c);
c.g()});this.eventManager.o(this.adManager,"ad-resumed",function(){lG(c);c.g()});this.eventManager.o(this.adManager,"ad-started",function(){lG(c);c.g()});this.eventManager.o(this.adManager,"ad-stopped",function(){lG(c);c.g()});this.eventManager.o(this.button,"click",function(){c.controls.Ba()&&mG(c.controls)});lG(this);this.g()}pa(kG,ZF);kG.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.B.paused&&!a.R;return a};
kG.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.player?this.player.isEnded():!0};function lG(a){if(a.isEnded())a.button.ariaLabel=a.localization.resolve("REPLAY");else{var b=a.isPaused()?"PLAY":"PAUSE";a.button.ariaLabel=a.localization.resolve(b)}}kG.prototype.g=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};S("shaka.ui.PlayButton",kG);function nG(a,b){kG.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation")}pa(nG,kG);nG.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",nG);function oG(a,b){ZF.call(this,a,b);var c=this;this.s=null;this.j=this.C=!1;this.B=this.u=null;this.l=new yf(function(){0===parseInt(c.h.textContent,10)&&pG(c.controls,!0);var d=parseInt(c.h.textContent,10);0!==d&&(c.video.currentTime=c.controls.fh()+d);c.g.style.opacity="0";c.C=!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.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");
this.g.appendChild(this.i);this.m=!1;this.eventManager.o(this.g,"touchstart",function(d){c.controls.Ba()&&(0<d.touches.length&&(c.u=d.touches[0].clientX,c.B=d.touches[0].clientY),c.j=!1)});this.eventManager.o(this.g,"touchmove",function(d){if(0<d.touches.length&&null!=c.u&&null!=c.B){var e=d.touches[0].clientX-c.u;d=d.touches[0].clientY-c.B;10<Math.sqrt(e*e+d*d)&&(c.j=!0)}});this.eventManager.o(this.g,"touchend",function(d){if(c.controls.Ba()&&!c.j)if(c.controls.Ud())d.preventDefault(),c.controls.Xc();
else if(0<c.controls.g.tapSeekDistance)if(d.preventDefault(),d=c.controls.g.tapSeekDistance,!c.C)c.C=!0,c.s=Date.now(),c.l.X(.5);else if(c.s+500>Date.now()){c.l.stop();c.s=Date.now();var e=parseInt(c.h.textContent,10);e=c.m?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.l.X(.5)}})}pa(oG,ZF);S("shaka.ui.HiddenSeekButton",oG);function qG(a,b){oG.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.i.textContent="fast_forward";this.m=!1}pa(qG,oG);S("shaka.ui.HiddenFastForwardButton",qG);function rG(a,b){oG.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.m=!0}pa(rG,oG);S("shaka.ui.HiddenRewindButton",rG);function sG(a,b,c,d){ZF.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.F=new yf(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.Ba();this.container.appendChild(this.bar);this.parent.appendChild(this.container);this.K=new yf(function(){e.bar.disabled=!1});this.eventManager.o(this.controls,"showingui",function(){e.K.X(0)});this.eventManager.o(this.controls,"hidingui",function(){e.K.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,tG(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&&(tG(e,f),e.onChange(),f.stopPropagation())});this.eventManager.o(this.bar,"touchend",function(f){e.i&&(e.i=!1,tG(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,tG(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()})}pa(sG,ZF);p=sG.prototype;p.release=function(){this.F&&(this.F.stop(),this.F=null);ZF.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.F.X(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.i||(this.bar.value=a)};
function tG(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}S("shaka.ui.RangeElement",sG);sG.prototype.setValue=sG.prototype.setValue;sG.prototype.getValue=sG.prototype.getValue;sG.prototype.changeTo=sG.prototype.changeTo;sG.prototype.onChangeEnd=sG.prototype.onChangeEnd;sG.prototype.onChange=sG.prototype.onChange;sG.prototype.onChangeStart=sG.prototype.onChangeStart;
sG.prototype.setRange=sG.prototype.setRange;function uG(a,b){sG.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.D=W("div");this.D.classList.add("shaka-ad-markers");this.container.insertBefore(this.D,this.container.childNodes[0]);this.H=this.controls.g;this.u=new yf(function(){var d=c.getValue();c.player.T()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.B=new yf(function(){vG(c)});this.L=!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.J=W("div");this.J.id="shaka-player-ui-thumbnail-time-container";this.G=W("div");this.G.id="shaka-player-ui-thumbnail-time";this.J.appendChild(this.G);this.h.appendChild(this.g);this.h.appendChild(this.J);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.m=null;this.I=!1;this.s=new yf(function(){wG(c)});this.C=[];this.eventManager.o(this.localization,
"locale-updated",function(){return xG(c)});this.eventManager.o(this.localization,"locale-changed",function(){return xG(c)});this.eventManager.o(this.adManager,"ad-started",function(){yG(c)||dG(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){yG(c)&&dG(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.C=d.cuepoints;zG(c)});this.eventManager.o(this.player,"unloading",function(){c.C=[];zG(c);c.l&&(c.l.abort(),c.l=null);c.m=null;wG(c);
AG(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min),g=parseFloat(c.bar.max);d=Math.max(0,d.clientX-e.left);e=Math.min(g,Math.round(f+(g-f)/e.width*d));c.player.gh().length?(AG(c),BG(c,d,e)):(wG(c),CG(c,d,e))});this.eventManager.o(this.container,"mouseleave",function(){AG(c);c.s.stop();c.s.X(.25)});this.setValue(this.video.currentTime);this.update();xG(this);this.ad&&dG(this.container,!1)}pa(uG,sG);p=uG.prototype;
p.release=function(){this.u&&(this.u.stop(),this.u=null,this.B.stop(),this.B=null);sG.prototype.release.call(this)};p.onChangeStart=function(){this.L=!this.video.paused;this.controls.Xh(!0);this.video.pause();this.s.stop();this.I=!0};p.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.gh().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());BG(this,(d-a)/((b-a)/c.width),d)}else wG(this)};
p.onChangeEnd=function(){this.u.Ja();this.controls.Xh(!1);this.L&&this.video.play();this.I&&(this.I=!1,this.s.stop(),this.s.X(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
p.update=function(){var a=this.H.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.xa();var f=c.end-c.start;this.setRange(c.start,c.end);yG(this)?(dG(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.H.showUnbufferedStart?a.base:a.played)+" "+
100*d+"%",a.played+" "+100*d+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")"):dG(this.container,!1)};
function vG(a){if(a.C.length){for(var b=a.player.xa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=u(a.C),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&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=u(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.D.style.background="linear-gradient("+d.join(",")+")"}else a.D.style.background="transparent",a.B.stop()}function zG(a){function b(){vG(a);var c=a.player.xa();c=c.end-c.start;a.player.T()&&5<c&&a.B.ya(.25)}a.player.Y?b():a.eventManager.qa(a.player,"loaded",b)}
function yG(a){var b=a.player.xa();b=b.end-b.start;return a.player.T()&&(5>b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function xG(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
function CG(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.xa();a.player.T()?(c=b.end-c,1>c?(a.j.textContent=a.localization.resolve("LIVE"),a.j.style.left="",a.j.style.right="0px"):a.j.textContent="-"+DG(c)):a.j.textContent=DG(c-b.start)}
function BG(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A;Q(function(B){switch(B.g){case 1:return 0>c&&(c=0),d=a.player.xa(),e=Math.max(Math.ceil(d.start),Math.min(Math.floor(d.end),c)),a.player.T()?(f=d.end-c,a.G.textContent=1>f?a.localization.resolve("LIVE"):"-"+DG(f)):a.G.textContent=DG(c),F(B,a.player.Ri(null,e),2);case 2:g=B.h;if(!g||!g.uris||!g.uris.length)return wG(a),CG(a,b,c),B.return();g.width<g.height?a.h.classList.add("portrait-thumbnail"):a.h.classList.remove("portrait-thumbnail");h=-10;
k=a.h.clientWidth;l=Math.floor(9*k/16);a.h.style.height=l+"px";a.h.style.top=-(l-h)+"px";m=Math.min(a.bar.offsetWidth-k,Math.max(0,b-k/2));a.h.style.left=m+"px";a.h.style.visibility="visible";n=g.uris[0].split("#xywh=")[0];if(a.m&&n===a.m.uris[0].split("#xywh=")[0]&&g.startByte==a.m.startByte&&g.endByte==a.m.endByte){B.A(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=g.codecs&&!n.startsWith("offline:")){B.A(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(B,
5);q=bh;r=ym(g.uris,g.startByte,g.endByte,a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Hb().request(q,r,{type:1});return F(B,a.l.promise,7);case 7:t=B.h;a.l=null;"mjpg"==g.codecs?(w=(new kh).box("mdat",uh(function(D){n=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),w.parse(t.data,!1)):(v=g.mimeType||"image/jpeg",y=new Blob([t.data],{type:v}),n=URL.createObjectURL(y));wa(B,4);break;case 5:z=xa(B);if(7001==z.code)return B.return();throw z;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=n;a.g.onload=function(){n.startsWith("blob:")&&URL.revokeObjectURL(n)};a.h.insertBefore(a.g,a.h.firstChild);case 3:A=k/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform=
"scale("+A+")",a.g.style.transformOrigin="left top",l=Math.floor(k*g.height/g.width),a.h.style.height=l+"px",a.h.style.top=-(l-h)+"px",H(B)}})}function wG(a){a.h.style.visibility="hidden"}function AG(a){a.j.style.visibility="hidden"}function DG(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}S("shaka.ui.SeekBar",uG);function EG(){}EG.prototype.create=function(a,b){return new uG(a,b)};
uG.Factory=EG;function FG(a,b){ZF.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");dG(this.h,!1);this.j.appendChild(this.h);this.g=Kj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;dG(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);GG(this);this.i=new yf(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable());
0<d?c.h.textContent=d:(c.i.stop(),dG(c.h,!1))}else HG(c)});this.eventManager.o(this.localization,"locale-updated",function(){GG(c)});this.eventManager.o(this.localization,"locale-changed",function(){GG(c)});this.eventManager.o(this.adManager,"ad-started",function(){IG(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.isSkippable()?c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),dG(c.h,!1)):HG(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){HG(c)});this.eventManager.o(this.g,
"click",function(){c.ad.skip()});this.ad&&IG(this)}pa(FG,ZF);FG.prototype.release=function(){this.i.stop();this.i=null;ZF.prototype.release.call(this)};function GG(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function IG(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&(dG(a.g,!0),dG(a.h,!0),a.h.textContent="",a.i.Ja(),a.i.ya(.5))}function HG(a){a.i.stop();a.g.disabled=!0;dG(a.g,!1);dG(a.h,!1)}S("shaka.ui.SkipAdButton",FG);/*
@license
glMatrix: https://github.com/toji/gl-matrix/
Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
SPDX-License-Identifier: MIT
*/
function JG(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function KG(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 LG(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],t=b[11],w=b[12],v=b[13],y=b[14];b=b[15];var z=c[0],A=c[1],B=c[2],D=c[3];a[0]=z*d+A*h+B*n+D*w;a[1]=z*e+A*k+B*q+D*v;a[2]=z*f+A*l+B*r+D*y;a[3]=z*g+A*m+B*t+D*b;z=c[4];A=c[5];B=c[6];D=c[7];a[4]=z*d+A*h+B*n+D*w;a[5]=z*e+A*k+B*q+D*v;a[6]=z*f+A*l+B*r+D*y;a[7]=z*g+A*m+B*t+D*b;z=c[8];A=c[9];B=c[10];D=c[11];a[8]=z*d+A*h+B*n+D*w;a[9]=z*e+A*k+B*q+D*v;a[10]=z*f+A*l+B*r+D*y;a[11]=z*g+A*m+B*t+D*b;z=c[12];A=c[13];
B=c[14];D=c[15];a[12]=z*d+A*h+B*n+D*w;a[13]=z*e+A*k+B*q+D*v;a[14]=z*f+A*l+B*r+D*y;a[15]=z*g+A*m+B*t+D*b}
function MG(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;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function NG(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 OG(){var a=new Float32Array(4);a[3]=1;return a}function PG(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;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function QG(a){var b=[],c=[],d=[],e=Math.PI;a=(void 0===a?0:a)?e/2:e;for(var f=0;100>=f;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=2*k*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;100>e;e++)for(a=0;100>a;a++)f=101*e+a,h=f+101,d.push(f,h,f+1),d.push(h,h+1,f+1);return{Vj:b,Sj:c,indices:d}};function RG(a,b,c,d,e){this.i=a;this.oa=b;this.s=c;this.g=d;this.u=new Oc;this.L=OG();this.h=OG();this.ea=this.na=this.$=this.l=null;this.D=JG();this.I=JG();this.N=JG();this.Y=JG();this.C=null;this.O=!1;this.J=this.B=null;this.ra=this.sa=0;this.Z=this.P=this.R=this.K=null;this.H=this.G=0;this.j=75;this.U=0;this.m=e;this.F=-1;SG(this)}
RG.prototype.release=function(){-1!=this.F&&(this.i.cancelVideoFrameCallback(this.F),this.F=-1);this.u&&(this.u.release(),this.u=null);this.B&&(this.B.stop(),this.B=null);this.J&&(this.J.stop(),this.J=null)};RG.prototype.Pd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.s.width,this.s.height);TG(this,!1)};
function SG(a){UG(a);VG(a);WG(a);XG(a);YG(a);xl(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&TG(a);if("requestVideoFrameCallback"in a.i){var b=function(){-1!=a.F&&(TG(a),-1!=a.F&&(a.F=a.i.requestVideoFrameCallback(b)))};a.F=a.i.requestVideoFrameCallback(b)}else{var c;a.u.o(a.i,"canplaythrough",function(){TG(a)});a.u.o(a.i,"playing",function(){a.B&&a.B.stop();if(!c){var d=a.oa.kb();d=u(d);for(var e=d.next();!e.done;e=d.next())(e=e.value.frameRate)&&
(!c||c<e)&&(c=e)}c||(c=60);TG(a);a.B=(new yf(function(){TG(a)})).Ja().ya(1/c)});a.u.o(a.i,"pause",function(){a.B&&a.B.stop();a.B=null;TG(a)});a.u.o(a.i,"seeked",function(){TG(a)});a.u.o(document,"visibilitychange",function(){TG(a)})}})}
function UG(a){var b=a.D,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(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?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 t=d*l-e*n;(q=Math.sqrt(k*k+r*r+t*t))?(q=1/q,k*=q,r*=q,t*=q):t=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]=t;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+t*c);b[14]=-(d*f+e*g+m*c);b[15]=1}MG(a.L,a.D);a=b=a.Y;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 VG(a){ZG(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 WG(a){var b=$G(a,a.g.VERTEX_SHADER),c=$G(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);"cubemap"==a.m?(a.R=a.g.getAttribLocation(a.l,"aVertexPosition"),a.P=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.R=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.R),a.P=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))}
function $G(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.m?"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="cubemap"==a.m?"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 XG(a){a.K="cubemap"==a.m?{Vj:[-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],Sj:[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]}:"halfequirectangular"==a.m?QG(!0):
QG();a.$=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.$);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Vj),a.g.STATIC_DRAW);a.na=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.na);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Sj),a.g.STATIC_DRAW);a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)}
function YG(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 TG(a,b){b=void 0===b?!0:b;var c=a.oa.m==Iq;if(!(!a.i||2>a.i.readyState||!c&&0==a.i.playbackRate)){KG(a.I,a.j*Math.PI/180,1.5625);"cubemap"==a.m?KG(a.I,a.j*Math.PI/180,2.5):KG(a.I,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);ZG(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("equirectangular"==a.m||"halfequirectangular"==
a.m)LG(a.N,a.D,a.Y),LG(a.N,a.I,a.N);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.$);a.g.vertexAttribPointer(a.R,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.R);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.na);a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.P);a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);"cubemap"==a.m?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,a.N)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,
"u_VPMatrix"),!1,a.N);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.O&&a.g.viewport(0,0,a.s.width/2,a.s.height);a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0);a.O&&(a.g.viewport(a.s.width/2,0,a.s.width/2,a.s.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0))}}
function ZG(a){var b=a.i.videoWidth;b||(b=a.s.scrollWidth);var c=a.i.videoHeight;c||(c=a.s.scrollHeight);if(a.sa!==b||a.ra!==c){a.s.width=b;a.s.height=c;a.sa=b;a.ra=c;var d=b/c,e=a.I,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.I=e;a.g.viewport(0,0,b,c)}}
function aH(a,b,c,d){var e=Infinity,f=90*Math.PI/180;"halfequirectangular"==a.m&&(e=90*Math.PI/180,f/=2);var g="cubemap"==a.m?a.N:a.D;a.G+=b;a.H+=c;if(a.G<e&&a.G>-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],t=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-t*e;g[8]=h*e+n*b;g[9]=k*e+q*b;g[10]=l*e+r*b;g[11]=m*e+t*b}else a.G-=b;a.H<f&&a.H>-f?(f=JG(),e=JG(),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],t=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+t*c,f[8]=n*b-h*c,f[9]=q*b-k*c,f[10]=r*b-l*c,f[11]=t*b-m*c,LG(g,f,g)):a.H-=c;c=JG();f=JG();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;LG(g,c,g);TG(a,!1)}
function bH(a,b){if(void 0===b||b)MG(a.h,a.D),a.U=0,a.C=OG(),a.C[0]=(a.h[0]-a.L[0])/20,a.C[1]=(a.h[1]-a.L[1])/20,a.C[2]=(a.h[2]-a.L[2])/20,a.C[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.C[0];a.h[1]-=a.C[1];a.h[2]-=a.C[2];a.h[3]-=a.C[3];b=JG();PG(a.h,a.h);NG(b,a.h);a.D=b;a.J&&(a.J.stop(),a.J=null);20>a.U?a.J=(new yf(function(){bH(a,!1);a.G=0;a.H=0;a.U++;TG(a,!1)})).X(.025):(NG(b,a.L),a.D=b)};function cH(a,b,c,d,e){jb.call(this);var f=this;this.i=a;this.j=b;this.F=c;this.J=d;this.u=e;this.s=new Oc;this.h=new Oc;this.B=dH(this.j);this.g=null;this.l=!1;this.I=this.H=this.G=this.D=this.C=0;this.m=null;this.s.o(d,"loading",function(){f.g&&bH(f.g);eH(f)});this.s.o(d,"spatialvideoinfo",function(g){g=g.detail;switch(g.projection){case "hequ":switch(g.hfov){case 360:f.m="equirectangular";break;case 180:f.m="halfequirectangular"}break;case "fish":f.m="equirectangular";break;default:f.m=null}eH(f)});
this.s.o(d,"nospatialvideoinfo",function(){f.m=null;eH(f)});this.s.o(d,"unloading",function(){f.m=null;eH(f)});eH(this)}pa(cH,jb);p=cH.prototype;p.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jb.prototype.release.call(this)};p.configure=function(a){this.u=a;eH(this)};p.Dg=function(){return this.j?!!this.B:!!dH(document.createElement("canvas"))};p.Sb=function(){return!!this.g};
p.Pd=function(){this.g?this.g.Pd():ab("Not playing VR content")};p.ph=function(a){this.g?aH(this.g,a*fH,0,0):ab("Not playing VR content")};p.nh=function(a){this.g?aH(this.g,0,a*fH,0):ab("Not playing VR content")};p.oh=function(a){this.g?aH(this.g,0,0,a*fH):ab("Not playing VR content")};
function eH(a){if(a.u.displayInVrMode||a.m){a.j||(a.j=document.createElement("canvas"),a.j.classList.add("shaka-vr-canvas-container"),a.F.parentElement.insertBefore(a.j,a.F.nextElementSibling),a.B=dH(a.j));var b=a.m||a.u.defaultVrProjectionMode;a.g?a.g.m!=b&&(a.h.Sa(),a.g.release(),gH(a,b)):(a.j.style.display="",gH(a,b),a.dispatchEvent(new U("vrstatuschanged",(new Map).set("newStatus",a.Sb()))))}else!a.u.displayInVrMode&&!a.m&&a.j&&a.g&&(a.j.style.display="none",a.h.Sa(),a.g.release(),a.g=null,a.dispatchEvent(new U("vrstatuschanged",
(new Map).set("newStatus",a.Sb()))))}function gH(a,b){a.B&&a.j&&(a.g=new RG(a.F,a.J,a.j,a.B,b),hH(a))}function dH(a){if(!a)return null;var b=Rb().Ia();if("TV"==b||"CONSOLE"==b||"CAST"==b)return null;b=u(["webgl2","webgl"]);for(var c=b.next();!c.done;c=b.next())if(c=a.getContext(c.value))return c;return null}
function hH(a){a.h.o(a.i,"mousedown",function(d){if(!a.l){var e=d.clientX;d=d.clientY;a.l=!0;a.C=e;a.D=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.l){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.l=!0;a.C=e;a.D=d}});a.h.o(a.i,"wheel",function(d){if(!a.l){var e=a.g,f=d.deltaY;f/=50;20<=e.j&&100>=e.j&&(e.j+=f);20>e.j?e.j=20:100<e.j&&(e.j=100);TG(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.l&&iH(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
a.h.o(a.i,"touchmove",function(d){a.l&&iH(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.l=!1});a.h.o(a.i,"mouseup",function(){a.l=!1});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchend",function(){a.l=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,jH(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Ca(a.i,
"click",c);a.h.Ca(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ca(a.i,"touchend",c);"granted"!==d?(a.h.qa(a.i,"click",c),a.h.qa(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.qa(a.i,"touchend",c)):(b=!0,jH(a))}).catch(function(){a.h.Ca(a.i,"click",c);a.h.Ca(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ca(a.i,"touchend",c);a.h.qa(a.i,"click",c);a.h.qa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.qa(a.i,"touchend",c)})}else b=!0,jH(a)}
function jH(a){a.h.o(window,"deviceorientation",function(b){if(a.g){var c=(b.alpha||0)-a.G,d=(b.beta||0)-a.H,e=(b.gamma||0)-a.I;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.G=b.alpha||0;a.H=b.beta||0;a.I=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?aH(a.g,c*fH*-1,e*fH*-1,0):aH(a.g,c*fH*-1,d*fH,0)}})}function iH(a,b,c){var d=-.6*Math.PI/180;aH(a.g,(b-a.C)*d,-1*(c-a.D)*d,0);a.C=b;a.D=c}var fH=Math.PI/180;function Z(a,b,c,d,e){jb.call(this);var f=this;this.Y=!0;this.g=e;this.D=new $s(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.oa=!0;this.B=this.D.Fc();this.m=c;this.u=this.D.Rb();this.Z=a;this.l=b;this.Kb=d;this.na=this.u.mf();this.s=this.j=null;this.R=!1;this.I=[];this.Ta=[];this.Ma=!1;this.J=new yf(function(){f.l.classList.add("no-cursor");f.Ma=!1;kH(f)});this.$=new yf(function(){f.h.removeAttribute("shown");lH(f);mH(f);f.U&&f.U.Fi();f.N.X(f.g.closeMenusDelay)});this.N=
new yf(function(){for(var g=u(f.I),h=g.next();!h.done;h=g.next())dG(h.value,!1)});this.sa=new yf(function(){f.Ba()&&nH(f)});this.O=null;this.H=[];this.ra=oH();this.i=new Oc;this.C=null;this.configure(this.g);pH(this);qH(this);this.ea=new Set;rH(this);this.sa.ya(this.g.refreshTickInSeconds);this.i.o(this.ra,"locale-changed",function(g){g=g.locales[0];f.na.setLocale(g);f.l.setAttribute("lang",g)});this.na.initInterstitial(this.F,this.Z,this.m);this.i.o(this.u,"texttrackvisibility",function(){mH(f)})}
pa(Z,jb);p=Z.prototype;
p.destroy=function(a){a=void 0===a?!1:a;var b=this;return Q(function(c){switch(c.g){case 1:if(document.pictureInPictureElement!=b.m){c.A(2);break}return F(c,document.exitPictureInPicture(),2);case 2:b.i&&(b.i.release(),b.i=null);b.J&&(b.J.stop(),b.J=null);b.$&&(b.$.stop(),b.$=null);b.N&&(b.N.stop(),b.N=null);b.sa&&(b.sa.stop(),b.sa=null);b.C&&(b.C.release(),b.C=null);sH(b);b.h&&(b.l.removeChild(b.h),b.h=null);if(!b.D){c.A(4);break}return F(c,b.D.destroy(a),5);case 5:b.D=null;case 4:b.K&&(b.l.removeChild(b.K),
b.K=null);b.F&&(b.l.removeChild(b.F),b.F=null);if(!b.Z){c.A(6);break}return F(c,b.Z.destroy(),7);case 7:b.Z=null;case 6:b.u=null,b.m=null,b.B=null,b.ra=null,b.ea.clear(),tH(b),jb.prototype.release.call(b),H(c)}})};function sH(a){for(var b=u(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function uH(a,b){vH.set(a,b)}p.bk=function(a){this.oa=a;rH(this)};p.Cl=function(){kH(this)};
p.configure=function(a){var b=this;this.g=a;this.D.Di(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.s&&(this.s=null);this.Ka&&(this.Ka=null);this.U&&(this.U=null);this.C&&this.C.configure(a);this.h?(Oj(this.h),sH(this)):(wH(this),xH(this),this.C=new cH(this.h,this.Kb,this.m,this.u,this.g));this.l.classList.add("shaka-video-container");this.m.classList.add("shaka-video");yH(this);this.g.addBigPlayButton&&zH(this);this.g.customContextMenu&&(this.U=new gG(this.G,this),this.H.push(this.U));
this.K||AH(this);this.g.seekOnTaps&&(BH(this),CH(this));this.Ha=W("div");this.Ha.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Ha);DH(this);this.I=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.I.push.apply(this.I,x(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));this.Ta=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));kH(this);a=u(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.i.o(c,"click",d);this.i.o(c,"dblclick",d);0<navigator.maxTouchPoints&&this.i.o(c,"touchend",function(e){b.Ba()&&e.stopPropagation()})}};p.Uh=function(a){(this.Y=a)?(this.l.setAttribute("shaka-controls","true"),this.m.tabIndex=-1,this.m.controls=!1):this.l.removeAttribute("shaka-controls");kH(this)};p.Dj=function(a){this.m.controls=a;this.m.tabIndex=a?0:-1;a&&this.Uh(!1)};p.getAd=function(){return this.j};p.tk=function(){return this.D};
p.Mk=function(){return this.ra};p.jl=function(){return this.l};p.Fc=function(){return this.B};p.Lk=function(){return this.m};p.Rb=function(){return this.u};p.Kk=function(){return this.Z};p.Bk=function(){return this.h};p.Xk=function(){return this.Ha};p.xk=function(){return this.F};p.yk=function(){return this.g};p.zl=function(){return this.R};p.Xh=function(a){(this.R=a)?this.J.stop():this.J.X(3)};p.rl=function(){return this.oa};p.fh=function(){return this.s?this.s.getValue():this.B.currentTime};
p.Ej=function(a){this.O=a};p.Ud=function(){return this.I.some(function(a){return!a.classList.contains("shaka-hidden")})};p.Xc=function(){this.N.Ja()};function EH(a){return!document.fullscreenEnabled||a.m.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&"VR"==Rb().Ia()?!1:!0}function FH(a){return"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture}
p.ke=function(){return this.D.Pa()?!1:EH(this)||(!this.j||!this.j.isUsingAnotherMediaElement())&&this.m.webkitSupportsFullscreen?!0:!1};p.Hc=function(){if(EH(this))return!!document.fullscreenElement;var a=this.m;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
function GH(a){var b,c,d;return Q(function(e){switch(e.g){case 1:ta(e,2);if(!EH(a)){b=a.m;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.A(4);break}if(!a.le()){e.A(5);break}return F(e,a.md(),6);case 6:if(!FH(a)){e.A(5);break}return F(e,new Promise(function(f){(new yf(f)).X(.05)}),5);case 5:return c=a.g.fullScreenElement,F(e,c.requestFullscreen({navigationUI:"hide"}),9);case 9:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.A(4);break}ta(e,11);return F(e,screen.orientation.lock("landscape"),
13);case 13:wa(e,4,2);break;case 11:xa(e,2);case 4:wa(e,0);break;case 2:d=xa(e),a.dispatchEvent(new U("error",(new Map).set("detail",d))),H(e)}})}function HH(a){var b;return Q(function(c){if(!EH(a))return b=a.m,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.A(0);screen.orientation&&screen.orientation.unlock();return F(c,document.exitFullscreen(),0)})}p.fg=function(){var a=this;return Q(function(b){return a.Hc()?F(b,HH(a),0):F(b,GH(a),0)})};
p.yf=function(){return this.D.Pa()?!1:document.pictureInPictureEnabled||FH(this)?!this.m.disablePictureInPicture:!1};p.le=function(){return!!(window.documentPictureInPicture&&window.documentPictureInPicture.window||document.pictureInPictureElement)};
p.md=function(){var a=this,b,c;return Q(function(d){switch(d.g){case 1:ta(d,2);if(FH(a)){if(!a.Hc()){d.A(10);break}return F(d,HH(a),10)}return document.pictureInPictureElement?F(d,document.exitPictureInPicture(),5):(a.Hc()&&HH(a),b=a.m,F(d,b.requestPictureInPicture(),5));case 10:return F(d,IH(a),5);case 5:wa(d,0);break;case 2:c=xa(d),a.dispatchEvent(new U("error",(new Map).set("detail",c))),H(d)}})};
function IH(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return F(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;JH(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.i.qa(d,"pagehide",function(){f.replaceWith(b)});H(h)})}
function JH(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.Jj=function(){dG(this.P,!0);dG(this.F,!0);this.j.hasCustomClick()?this.h.setAttribute("ad-active","true"):this.h.removeAttribute("ad-active")};p.Si=function(){dG(this.P,!1);dG(this.F,!1);this.h.removeAttribute("ad-active")};function mG(a){if(a.Y){if(a.j&&(a.j&&a.j.isPaused()?a.j.play():a.j&&a.j.pause(),a.j.isLinear()))return;a.B.duration&&(a.B.paused&&!a.R?(a.u.isEnded()&&(a.B.currentTime=a.u.xa().start),a.B.play()):a.B.pause())}}
function wH(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.l.appendChild(a.h);a.l.setAttribute("shaka-controls","true");a.i.o(a.h,"touchend",function(b){a.B.duration&&(a.Ba()?(a.O=Date.now(),pG(a,!0)):KH(a,b),b.cancelable&&b.preventDefault())});a.i.o(a.h,"click",function(){pG(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.ke()&&a.fg()})}
function zH(a){var b=W("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Ka=new nG(b,a);a.H.push(a.Ka)}function yH(a){var b=W("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function LH(a){a.P=W("div");a.P.classList.add("shaka-ad-controls");var b=null!=a.j&&a.j.isLinear();dG(a.P,b);a.L.appendChild(a.P);b=new FG(a.P,a);a.H.push(b)}
function AH(a){a.K=W("div");a.K.classList.add("shaka-spinner-container");a.l.appendChild(a.K);var b=W("div");b.classList.add("shaka-spinner");a.K.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 BH(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Za=new qG(b,a);a.H.push(a.Za)}function CH(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.eb=new rG(b,a);a.H.push(a.eb)}
function DH(a){a.L=W("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(e){e.target.closest(".shaka-overflow-button")||a.Xc()});LH(a);MH(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.L.appendChild(a.G);for(var b=u(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())if(c=c.value,
vH.get(c)){var d=vH.get(c).create(a.G,a);a.H.push(d);"time_and_duration"==c&&(c=new fG(a.G,a),a.H.push(c))}else ab("Unrecognized control panel element requested:",c)}function MH(a){if(a.g.addSeekBar)a.s=NH.create(a.L,a),a.H.push(a.s);else{for(var b=u(a.I),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 xH(a){a.F=W("div");a.F.classList.add("shaka-client-side-ad-container");dG(a.F,!1);a.i.o(a.F,"click",function(){pG(a)});a.l.appendChild(a.F)}
function pH(a){a.i.o(a.u,"buffering",function(){OH(a)});OH(a);a.i.o(window,"keydown",function(b){PH(a,b)});a.i.o(window,"click",function(){return a.Xc()});a.i.o(a,"submenuopen",function(){a.Xc()});a.i.o(a.B,"play",function(){kH(a)});a.i.o(a.B,"pause",function(){kH(a)});a.i.o(a.l,"mousemove",function(b){KH(a,b)});a.i.o(a.l,"touchmove",function(b){KH(a,b)},{passive:!0});a.i.o(a.l,"touchend",function(b){KH(a,b)},{passive:!0});a.i.o(a.l,"mouseleave",function(){a.O||a.J.Ja()});a.i.o(a.l,"wheel",function(b){KH(a,
b)},{passive:!0});a.i.o(a.D,"caststatuschanged",function(){rH(a)});a.i.o(a.C,"vrstatuschanged",function(){a.dispatchEvent(new U("vrstatuschanged"))});a.i.o(a.l,"keydown",function(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");a.h.contains(c)&&KH(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.s&&e&&!d&&0<
c&&(b.preventDefault(),QH(a,a.s.getValue()-c));break;case "ArrowRight":a.s&&e&&!d&&0<c&&(b.preventDefault(),QH(a,a.s.getValue()+c));break;case "PageDown":a.s&&e&&0<c&&(b.preventDefault(),QH(a,a.s.getValue()-f));break;case "PageUp":a.s&&e&&0<c&&(b.preventDefault(),QH(a,a.s.getValue()+f));break;case "Home":a.s&&QH(a,a.u.xa().start);break;case "End":a.s&&QH(a,a.u.xa().end);break;case "f":a.ke()&&a.fg();break;case "m":a.j&&a.j.isLinear()?a.j.setMuted(!a.j.isMuted()):a.m.muted=!a.m.muted;break;case "p":a.yf()&&
a.md();break;case " ":e&&mG(a)}}});a.i.o(a.l,"keyup",function(b){a.ea.delete(b.key)});a.i.o(a.na,"ad-started",function(b){a.j=b.ad;a.Jj();OH(a)});a.i.o(a.na,"ad-stopped",function(){a.j=null;a.Si();OH(a)});screen.orientation&&a.i.o(screen.orientation,"change",function(){return Q(function(b){return F(b,RH(a),0)})})}
function qH(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.u.xa(),g=f.end-f.start;f=parseFloat((a.B.currentTime-f.start).toFixed(2));a.u.T()&&1>Math.abs(g-f)&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.B.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":mG(a);break;case "play":mG(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||QH(a,a.s.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||QH(a,a.s.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.j&&a.j.isLinear()||QH(a,a.u.xa().start+f.seekTime);break;case "stop":a.u.kc();
break;case "enterpictureinpicture":a.j&&a.j.isLinear()||a.md()}};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.u.T()||0!=a.u.xa().start?(c(),a.i.o(a.B,"timeupdate",c)):d()};a.u.Y&&b();a.i.o(a.u,"loaded",b);a.i.o(a.u,"unloading",function(){a.i.Ca(a.B,"timeupdate",c)});a.i.o(a.u,"metadata",function(f){if(f=f.payload){var g;"TIT2"==f.key&&f.data&&
(g=f.data);var h;"APIC"==f.key&&"--\x3e"==f.mimeType&&(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.m,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 tH(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 RH(a){return Q(function(b){return a.B&&0!=a.B.readyState&&!a.D.Pa()&&a.g.enableFullscreenOnRotation&&a.ke()?screen.orientation.type.includes("landscape")&&!a.Hc()?F(b,GH(a),0):screen.orientation.type.includes("portrait")&&a.Hc()?F(b,HH(a),0):b.A(0):b.return()})}
function KH(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),kH(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.O=Date.now():a.O+1E3<Date.now()&&(a.O=null);a.O&&"mousemove"==b.type||(a.l.classList.remove("no-cursor"),a.Ma=!0,a.N.stop(),a.Ba()||(nH(a),kH(a)),a.J.stop(),"touchend"!=b.type&&"wheel"!=b.type&&"keyup"!=b.type&&a.O||a.J.X(3))}
function SH(a){return window.matchMedia("hover: hover").matches?a.Ta.some(function(b){return b.matches(":hover")}):!1}function mH(a){var b=a.l.getElementsByClassName("shaka-text-container")[0];b&&(a.Ba()?b.style.bottom=a.L.clientHeight+"px":b.style.bottom="0px")}
function kH(a){var b=a.j?a.j.isPaused():!1,c=a.B.paused&&!a.R,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.j||!a.j.isLinear())&&c||a.Ma||d||SH(a)?(nH(a),null==a.h.getAttribute("shown")&&(a.h.setAttribute("shown","true"),lH(a)),mH(a),a.$.stop()):a.$.X(a.g.fadeDelay)}function pG(a,b){b=void 0===b?!1:b;a.Y&&!a.Sb()&&(a.Ud()?a.N.Ja():a.g.singleClickForPlayAndPause?mG(a):b&&a.Ba()&&a.Ti())}
function rH(a){var b=a.D.Pa();a.dispatchEvent(new U("caststatuschanged",(new Map).set("newStatus",b)));b?null==a.h.getAttribute("casting")&&(a.h.setAttribute("casting","true"),lH(a)):null!=a.h.getAttribute("casting")&&(a.h.removeAttribute("casting"),lH(a))}function OH(a){a.Y&&(a.j&&a.j.isClientRendering()&&a.j.isLinear()?dG(a.K,!1):dG(a.K,a.u.xf()))}p.Ba=function(){return this.Y?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};
function lH(a){a.Ba()?a.dispatchEvent(new U("showingui")):a.dispatchEvent(new U("hidingui"))}function QH(a,b){a.B.currentTime=b;nH(a)}
function nH(a){if(a.s)if(a.s.setValue(a.B.currentTime),a.s.update(),a.s.isShowing()){for(var b=u(a.I),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=u(a.I);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 U("timeandseekrangeupdated"))}
function PH(a,b){a.ea.add(b.key);var c=a.Ud();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),kH(a),a.i.o(window,"mousedown",function(){a.i.Ca(window,"mousedown")}));"Escape"==b.key&&a.N.Ja();c&&a.ea.has("Tab")&&TH(a,b)}
function TH(a,b){var c=a.I.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.ea.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
p.lm=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});KH(this,a)};p.Ti=function(){this.J.Ja()};p.Dg=function(){return this.C.Dg()};p.Sb=function(){return this.C.Sb()};
p.hl=function(){var a=this.C;if(a.g){a=a.g;MG(a.h,a.D);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=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else ab("Not playing VR content"),a=null;return a};p.fl=function(){var a=this.C;a.g?a=a.g.j:(ab("Not playing VR content"),a=null);return a};
p.jm=function(a){var b=this.C;b.g?(0>a?(ab("Field of view should be greater than 0"),a=0):100<a&&(ab("Field of view should be less than 100"),a=100),b=b.g,b.j=a,TG(b,!1)):ab("Not playing VR content")};p.Pd=function(){this.C.Pd()};p.ph=function(a){this.C.ph(a)};p.nh=function(a){this.C.nh(a)};p.oh=function(a){this.C.oh(a)};
function oH(){var a=new Hc("en");a.Va("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.Va("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.Va("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_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.Va("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.Va("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_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.Va("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.Va("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_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.Va("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.Va("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.Va("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.Va("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.Va("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_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.Va("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.Va("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.Va("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.Va("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.Va("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.Va("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.Ci(navigator.languages||
[]);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.oh;Z.prototype.incrementPitch=Z.prototype.nh;Z.prototype.incrementYaw=Z.prototype.ph;Z.prototype.toggleStereoscopicMode=Z.prototype.Pd;Z.prototype.setVRFieldOfView=Z.prototype.jm;Z.prototype.getVRFieldOfView=Z.prototype.fl;Z.prototype.getVRNorth=Z.prototype.hl;Z.prototype.isPlayingVR=Z.prototype.Sb;Z.prototype.canPlayVR=Z.prototype.Dg;Z.prototype.hideUI=Z.prototype.Ti;Z.prototype.showUI=Z.prototype.lm;
Z.prototype.isOpaque=Z.prototype.Ba;Z.prototype.hideAdUI=Z.prototype.Si;Z.prototype.showAdUI=Z.prototype.Jj;Z.prototype.togglePiP=Z.prototype.md;Z.prototype.isPiPEnabled=Z.prototype.le;Z.prototype.isPiPAllowed=Z.prototype.yf;Z.prototype.toggleFullScreen=Z.prototype.fg;Z.prototype.isFullScreenEnabled=Z.prototype.Hc;Z.prototype.isFullScreenSupported=Z.prototype.ke;Z.prototype.hideSettingsMenus=Z.prototype.Xc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Ud;Z.prototype.setLastTouchEventTime=Z.prototype.Ej;
Z.prototype.getDisplayTime=Z.prototype.fh;Z.prototype.isCastAllowed=Z.prototype.rl;Z.prototype.setSeeking=Z.prototype.Xh;Z.prototype.isSeeking=Z.prototype.zl;Z.prototype.getConfig=Z.prototype.yk;Z.prototype.getClientSideAdContainer=Z.prototype.xk;Z.prototype.getServerSideAdContainer=Z.prototype.Xk;Z.prototype.getControlsContainer=Z.prototype.Bk;Z.prototype.getLocalPlayer=Z.prototype.Kk;Z.prototype.getPlayer=Z.prototype.Rb;Z.prototype.getLocalVideo=Z.prototype.Lk;Z.prototype.getVideo=Z.prototype.Fc;
Z.prototype.getVideoContainer=Z.prototype.jl;Z.prototype.getLocalization=Z.prototype.Mk;Z.prototype.getCastProxy=Z.prototype.tk;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Dj;Z.prototype.setEnabledShakaControls=Z.prototype.Uh;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Cl;Z.prototype.allowCast=Z.prototype.bk;Z.registerSeekBar=function(a){NH=a};Z.registerElement=uH;Z.prototype.destroy=Z.prototype.destroy;
var vH=new Map,NH=new EG;function UH(a,b){ZF.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.m=this.controls.l;this.i=[];VH(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.j.appendChild(this.g);WH(this);this.eventManager.o(this.localization,"locale-updated",function(){XH(c)});this.eventManager.o(this.localization,"locale-changed",function(){XH(c)});
this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&dG(c.h,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){dG(c.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){dG(c.g,!1)});this.eventManager.o(this.g,"touchstart",function(d){c.controls.Ej(Date.now());d.stopPropagation()});this.eventManager.o(this.h,"click",function(){c.controls.Ba()&&YH(c)});XH(this);this.ad&&this.ad.isLinear()&&dG(this.h,!1)}pa(UH,ZF);
UH.prototype.release=function(){this.j=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];ZF.prototype.release.call(this)};function ZH(a,b){$H.set(a,b)}
function VH(a){a.h=Kj();a.h.classList.add("shaka-overflow-menu-button");a.h.classList.add("shaka-no-propagation");a.h.classList.add("material-icons-round");a.h.classList.add("shaka-tooltip");a.h.textContent="settings";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 WH(a){for(var b=u(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,$H.get(c)?(c=$H.get(c),a.i.push(c.create(a.g,a.controls))):ab("Unrecognized overflow menu element requested:",c)}function YH(a){if(a.controls.Ud())a.controls.Xc();else{dG(a.g,!0);kH(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};nb(a.g.childNodes,b)&&ob(a.g.childNodes,b)[0].focus();aI(a)}}function XH(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
function aI(a){var b=a.g.getBoundingClientRect(),c=window.getComputedStyle(a.g),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.m.getBoundingClientRect();a.g.style.maxHeight=b.bottom-e.top-d-c+"px"}S("shaka.ui.OverflowMenu",UH);UH.registerElement=ZH;function bI(){}bI.prototype.create=function(a,b){return new UH(a,b)};uH("overflow_menu",new bI);var $H=new Map;function cI(a,b){function c(e){return d.i[e]}ZF.call(this,a,b);var d=this;this.h=Kj();this.h.classList.add("shaka-ad-statistics-button");this.j=W("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.h.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);
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.h.appendChild(this.g);this.C=[];this.i=this.adManager.getStats();dG(this.h,0<this.i.started);this.s=new Map;this.B=(new Map).set("loadTimes",function(e){var f=0;e=u(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.l=new yf(function(){d.i=d.adManager.getStats();for(var e=u(d.C),f=e.next();!f.done;f=e.next())f=f.value,d.s.get(f).textContent=d.B.get(f)(f)});dI(this);eI(this);this.eventManager.o(this.localization,"locale-updated",function(){dI(d)});this.eventManager.o(this.localization,"locale-changed",function(){dI(d)});this.eventManager.o(this.h,"click",function(){d.controls.Ba()&&
(fI(d),dI(d))});this.eventManager.o(this.player,"loading",function(){dG(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){dG(d.h,!0)})}pa(cI,ZF);function fI(a){a.g.classList.contains("shaka-hidden")?(a.j.textContent="insert_chart",a.l.ya(.1),dG(a.g,!0)):(a.j.textContent="insert_chart_outlined",a.l.stop(),dG(a.g,!1))}
function dI(a){a.u.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}function gI(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.B.get(b)(b);c.appendChild(d);a.s.set(b,d);return c}
function eI(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=W("i");c.classList.add("material-icons");c.classList.add("notranslate");c.classList.add("material-icons-round");c.textContent="close";b.appendChild(c);a.g.appendChild(b);a.eventManager.o(c,"click",function(){fI(a)});b=u(a.controls.g.adStatisticsList);for(c=b.next();!c.done;c=b.next())c=c.value,c in a.i?(a.g.appendChild(gI(a,c)),a.C.push(c)):ab("Unrecognized ad statistic element:",
c)}cI.prototype.release=function(){this.l.stop();this.l=null;ZF.prototype.release.call(this)};S("shaka.ui.AdStatisticsButton",cI);function hI(){}hI.prototype.create=function(a,b){return new cI(a,b)};ZH("ad_statistics",new hI);iG("ad_statistics",new hI);function iI(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);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.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);jI(this);kI(this);this.eventManager.o(this.localization,"locale-updated",function(){jI(c)});this.eventManager.o(this.localization,"locale-changed",function(){jI(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&c.controls.Fc().webkitShowPlaybackTargetPicker()});a=this.controls.Fc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",
function(d){var e=c.player.m==Lq;dG(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){kI(c)})}pa(iI,ZF);function kI(a){var b=a.controls.Fc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function jI(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}S("shaka.ui.AirPlayButton",iI);function lI(){}lI.prototype.create=function(a,b){return new iI(a,b)};
ZH("airplay",new lI);uH("airplay",new lI);function mI(a,b){ZF.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);nI(this);this.i=this.h=null;window.ResizeObserver?(this.i=new ResizeObserver(function(){return nI(c)}),this.i.observe(this.parent)):window.addEventListener("resize",function(){return nI(c)})}pa(mI,ZF);function oI(a){return(a=a.g.getContext("2d"))?a:null}
function nI(a){a.g.width=a.parent.offsetWidth;a.g.height=a.parent.offsetHeight}
mI.prototype.ag=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("static"===b.type){if(a=oI(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"dynamic"===b.type&&pI(this,b)};
function pI(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":0>=--k&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),0>=g&&(h="transition",f=d(),k=Math.round(60*b.displayDuration),h="fadeIn")}0<g&&(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(60*b.displayDuration),l=1/(Math.round(60*b.transitionDuration)/2),m=0;f=d();a.h=requestAnimationFrame(c)}
mI.prototype.Uf=function(){this.h&&(cancelAnimationFrame(this.h),this.h=null);var a=oI(this);a&&a.clearRect(0,0,this.g.width,this.g.height)};mI.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 nI(a)});ZF.prototype.release.call(this)};S("shaka.ui.Watermark",mI);mI.prototype.removeWatermark=mI.prototype.Uf;mI.prototype.setTextWatermark=mI.prototype.ag;function qI(a,b,c,d){d=void 0===d?null:d;this.j=a;this.l=b;this.h=rI(this);var e="",f=!1;b.dataset&&b.dataset.shakaPlayerCastReceiverId?(f=b.dataset,e=f.shakaPlayerCastReceiverId,f="true"===f.shakaPlayerCastAndroidReceiverCompatible):c.dataset&&c.dataset.shakaPlayerCastReceiverId&&(f=c.dataset,e=f.shakaPlayerCastReceiverId,f="true"===f.shakaPlayerCastAndroidReceiverCompatible);e.length&&(this.h.castReceiverAppId=e,this.h.castAndroidReceiverCompatible=f);b.dataset.shakaPlayerContainer="";b.ui=this;
this.uh()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);c.controls||a.Yh(b);b.ui=this;c.ui=this;this.i=null}p=qI.prototype;p.destroy=function(a){a=void 0===a?!1:a;var b=this;return Q(function(c){if(1==c.g)return b.g?F(c,b.g.destroy(a),2):c.A(2);if(4!=c.g)return b.g=null,b.j?F(c,b.j.destroy(),4):c.A(4);b.j=null;b.i=null;H(c)})};p.uh=function(){return"MOBILE"==Rb().Ia()};p.vh=function(){return"TV"==Rb().Ia()};p.getConfiguration=function(){var a=rI(this);nn(a,this.h,rI(this),{},"");return a};
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=on(a,b));var c=Object.assign({},this.h);nn(c,a,rI(this),{},"");var d=qn(c,this.h);if(Object.keys(d).length&&(this.h=c,this.g.configure(this.h),this.g.dispatchEvent(new U("uiupdated")),(c=this.h.castSenderUrl)&&this.h.castReceiverAppId&&window.chrome&&!chrome.cast&&!this.vh())){d=!1;for(var e=u(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.Ak=function(){return this.g};p.hm=function(a){this.g.Uh(a)};p.ag=function(a,b){a&&!this.i&&this.l&&this.g&&(this.i=new mI(this.l,this.g));this.i&&this.i.ag(a,b)};p.Uf=function(){this.i&&this.i.Uf()};
function rI(a){var b="play_pause 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 save_video_frame".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:sI,textTrackLabelFormat:sI,fadeDelay:0,closeMenusDelay:2,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,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:!1,showAudioCodec:!0,showVideoCodec:!0,castSenderUrl:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"};if(a.uh()){b.addBigPlayButton=!0;b.singleClickForPlayAndPause=!1;b.seekOnTaps=!0;b.enableTooltips=!1;
b.doubleClickForFullscreen=!1;var c=["play_pause","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)})}if(a.vh()){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 tI(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D;return Q(function(G){switch(G.g){case 1:dC();if(!hq())return uI("shaka-ui-load-failed",vI),G.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){G.A(2);break}if(b.length&&!a.length){e=u(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=wI(h,c,d),m=l.$i,n=l.Xj,xI(h,g,m,n));G.A(2);break}q=u(a);r=q.next();case 4:if(r.done){G.A(2);break}t=r.value;if(t.ui){G.A(5);break}w=null;v=u(b);for(y=v.next();!y.done;y=v.next())if(z=y.value,z.parentElement==t){w=z;break}w||(w=document.createElement("video"),w.setAttribute("playsinline",""),t.appendChild(w));A=wI(t,c,d);B=A.$i;D=A.Xj;ta(G,7);return F(G,xI(t,w,B,D),9);case 9:wa(G,5);break;case 7:return xa(G),
uI("shaka-ui-load-failed",yI),G.return();case 5:r=q.next();G.A(4);break;case 2:uI("shaka-ui-loaded"),H(G)}})}function uI(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
function xI(a,b,c,d){var e,f,g,h,k,l,m,n,q,r;return Q(function(t){switch(t.g){case 1:e=new X;f=new qI(e,a,b,d?d:null);e.wi(c);b.controls&&f.g.Dj(!0);g=[];if(h=b.getAttribute("src"))g.push(h),b.removeAttribute("src");k=u(b.getElementsByTagName("source"));for(l=k.next();!l.done;l=k.next())m=l.value,g.push(m.src),b.removeChild(m);return F(t,e.$b(b),2);case 2:n=u(g),q=n.next();case 3:if(q.done){t.A(0);break}r=q.value;ta(t,6);return F(t,f.g.Rb().load(r),8);case 8:t.A(0);break;case 6:xa(t);case 4:q=n.next(),
t.A(3)}})}function wI(a,b,c){var d=null;b=u(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=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}return{$i:d,Xj:b}}S("shaka.ui.Overlay",qI);qI.prototype.removeWatermark=qI.prototype.Uf;qI.prototype.setTextWatermark=qI.prototype.ag;qI.prototype.setEnabled=qI.prototype.hm;
qI.prototype.getControls=qI.prototype.Ak;qI.prototype.configure=qI.prototype.configure;qI.prototype.getConfiguration=qI.prototype.getConfiguration;qI.prototype.isSmartTV=qI.prototype.vh;qI.prototype.isMobile=qI.prototype.uh;qI.prototype.destroy=qI.prototype.destroy;var sI=0;qI.TrackLabelFormat={LANGUAGE:sI,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var vI=0,yI=1;qI.FailReasonCode={NO_BROWSER_SUPPORT:vI,PLAYER_FAILED_TO_LOAD:yI};
"complete"==document.readyState?Q(function(a){if(1==a.g)return F(a,Promise.resolve(),2);tI();H(a)}):window.addEventListener("load",tI);function zI(a,b,c,d,e,f,g,h){function k(K){var J="";"aac"==K?J="AAC":"ac-3"===K?J="Dolby":"ec-3"===K?J="DD+":"ac-4"===K?J="Dolby AC-4":"opus"===K?J="Opus":"flac"===K&&(J="fLaC");return J?" "+J:J}function l(K){var J="";5<=K&&(J=" "+e.resolve("SURROUND"));return J}function m(K,J,L,M,O,N){J=[K,J,N];g&&null!=M&&J.push(M);h&&n(K)&&O&&J.push(O);L&&3==f&&J.push(L);return J.join(": ")}function n(K){return r.has(K)&&1<r.get(K).size}for(var q=a.find(function(K){return 1==K.active}),r=new Map,t=u(a),w=t.next();!w.done;w=
t.next())w=w.value,w.codecs&&(r.has(w.language)||r.set(w.language,new Set),r.get(w.language).add(ff(w.codecs)));t=$F(b);Oj(b);b.appendChild(t);t=new Set;q=q?m(q.language,q.roles.join(", "),q.label,q.channelsCount,q.codecs&&ff(q.codecs),q.spatialAudio):"";a=u(a);var v=a.next();for(w={};!v.done;w={Zb:void 0},v=a.next()){w.Zb=v.value;v=w.Zb.language;var y=w.Zb.roles.join(", "),z=w.Zb.label,A=w.Zb.channelsCount,B=w.Zb.codecs&&ff(w.Zb.codecs),D=w.Zb.spatialAudio,G=m(v,y,z,A,B,D);if(!t.has(G)){t.add(G);
var C=Kj();C.addEventListener("click",function(K){return function(){c(K.Zb)}}(w));var E=W("span");C.appendChild(E);E.textContent=AI(v,e);var I="";h&&g&&D&&("ec-3"==B||"ac-4"==B)?I+=" Dolby Atmos":(h&&n(v)&&(I+=k(B)),g&&(I+=l(A)));switch(f){case sI:E.textContent+=I;break;case 1:E.textContent+=I;y?E.textContent=y:(ab("Track #"+JSON.stringify(w.Zb)+" does not have a role, but the UI is configured to only show role."),E.textContent="?");break;case 2:E.textContent+=I;y&&(E.textContent+=": "+y);break;case 3:z?
E.textContent=z:(ab("Track #"+JSON.stringify(w.Zb)+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}G==q&&(C.appendChild(cG()),E.classList.add("shaka-chosen-item"),C.ariaSelected="true",d.textContent=E.textContent);b.appendChild(C)}}}
function BI(a,b,c,d,e,f,g){function h(A,B,D){A=[A,B];D&&3==g&&A.push(D);return A.join(": ")}var k=a.find(function(A){return 1==A.active}),l=$F(b);Oj(b);b.appendChild(l);l=new Set;k=k?h(k.language,k.roles.join(", "),k.label):"";a=u(a);for(var m=a.next(),n={};!m.done;n={Mc:void 0},m=a.next()){n.Mc=m.value;m=n.Mc.language;var q=n.Mc.forced,r=f.resolve("SUBTITLE_FORCED"),t=n.Mc.roles.join(", "),w=n.Mc.label,v=h(m,t,w);if(!l.has(v)){l.add(v);var y=Kj();y.addEventListener("click",function(A){return function(){c(A.Mc)}}(n));
var z=W("span");y.appendChild(z);z.textContent=AI(m,f);switch(g){case sI:q&&(z.textContent+=" ("+r+")");break;case 1:t?z.textContent=t:(ab("Track #"+n.Mc.id+" does not have a role, but the UI is configured to only show role."),z.textContent="?");q&&(z.textContent+=" ("+r+")");break;case 2:t&&(z.textContent+=": "+t);q&&(z.textContent+=" ("+r+")");break;case 3:w?z.textContent=w:(ab("Track #"+n.Mc.id+" does not have a label, but the UI is configured to only show labels."),z.textContent="?")}d&&v==k&&
(y.appendChild(cG()),z.classList.add("shaka-chosen-item"),y.ariaSelected="true",e.textContent=z.textContent);b.appendChild(y)}}}function AI(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 vo?vo[a]:c in vo?vo[c]+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function CI(a,b,c){ZF.call(this,a,b);var d=this;this.l=this.controls.l;DI(this,c);EI(this);FI(this);this.eventManager.o(this.button,"click",function(){d.controls.Ba()&&(d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new U("submenuopen")),dG(d.menu,!0),bG(d.menu),GI(d)):dG(d.menu,!1))})}pa(CI,ZF);
function DI(a,b){a.button=Kj();a.button.classList.add("shaka-overflow-button");a.icon=W("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);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 EI(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=Kj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Xc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function FI(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="navigate_before",a.eventManager.o(a.menu,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}dG(a.menu,!1);dG(a.parent,!0);nb(a.parent.childNodes,b)&&ob(a.parent.childNodes,b)[0].focus();kH(a.controls);GI(a)}))}
function GI(a){var b=a.menu.getBoundingClientRect(),c=window.getComputedStyle(a.menu),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.l.getBoundingClientRect();a.menu.style.maxHeight=b.bottom-e.top-d-c+"px"}S("shaka.ui.SettingsMenu",CI);function HI(a,b){CI.call(this,a,b,"language");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(){II(c)});this.eventManager.o(this.localization,"locale-changed",function(){II(c)});this.eventManager.o(this.player,"loading",function(){JI(c)});this.eventManager.o(this.player,"loaded",function(){JI(c)});this.eventManager.o(this.player,
"unloading",function(){JI(c)});this.eventManager.o(this.player,"audiotrackschanged",function(){JI(c)});II(this);JI(this)}pa(HI,CI);
function JI(a){var b=a.player.getAudioTracks()||[];zI(b,a.menu,function(c){a.player.yj(c);a.player.configure("preferredAudioLanguage",c.language);c.label&&a.player.configure("preferredAudioLabel",c.label);c.channelsCount&&a.player.configure("preferredAudioChannelCount",c.channelsCount);a.player.configure("preferSpatialAudio",c.spatialAudio)},a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants,a.controls.g.showAudioCodec);bG(a.menu);a.controls.dispatchEvent(new U("languageselectionupdated"));
a.button.setAttribute("shaka-status",a.currentSelection.innerText);dG(a.button,2<a.menu.getElementsByTagName("button").length)}function II(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",HI);function KI(){}KI.prototype.create=function(a,b){return new HI(a,b)};ZH("language",new KI);
uH("language",new KI);function LI(a,b){ZF.call(this,a,b);var c=this;this.h=this.controls.D;this.g=Kj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);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.l=W("span");a.appendChild(this.l);
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);MI(this);NI(this);this.eventManager.o(this.localization,"locale-updated",function(){MI(c)});this.eventManager.o(this.localization,"locale-changed",function(){MI(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&OI(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){NI(c)})}pa(LI,ZF);
function OI(a){var b;Q(function(c){if(1==c.g){if(a.h.Pa())return a.h.Nj(),c.A(0);ta(c,3);a.g.disabled=!0;return F(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,wa(c,0);b=xa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new U("error",(new Map).set("detail",b)));H(c)})}function NI(a){var b=a.h.Cg()&&a.controls.oa,c=a.h.Pa();dG(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");PI(a)}
function PI(a){a.j.textContent=a.h.Pa()?a.h.Sf():a.localization.resolve("OFF")}function MI(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");PI(a)}S("shaka.ui.CastButton",LI);function QI(){}QI.prototype.create=function(a,b){return new LI(a,b)};ZH("cast",new QI);uH("cast",new QI);function RI(a,b){CI.call(this,a,b,"bookmarks");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(){SI(c);TI(c)});this.eventManager.o(this.localization,"locale-changed",function(){SI(c);TI(c)});this.eventManager.o(this.player,"unloading",function(){UI(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",
function(){TI(c)});SI(this);TI(this)}pa(RI,CI);function SI(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 UI(a){var b=$F(a.menu);Oj(a.menu);a.menu.appendChild(b);dG(a.button,!1)}
function TI(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t;Q(function(w){switch(w.g){case 1:b=function(v,y){return!v&&!y||v.id===y.id&&v.title===y.title&&v.startTime===y.startTime&&v.endTime===y.endTime},c="und",d=[],e=a.localization.g,f=u(Array.from(e)),g=f.next();case 2:if(g.done){w.A(4);break}c=h=g.value;if(!a.player){w.A(5);break}return F(w,a.player.eh(c),6);case 6:d=w.h||[];case 5:if(d.length){w.A(4);break}g=f.next();w.A(2);break;case 4:if(d.length){w.A(7);break}c="und";if(!a.player){w.A(7);break}return F(w,
a.player.eh(c),9);case 9:d=w.h||[];case 7:k=c!==a.h;l=a.g.length!==d.length||!a.g.some(function(v,y){y=d.at(y);return b(v,y)||d.some(function(z){return b(v,z)})});a.h=c;a.g=d;if(!d.length)UI(a);else if(k||l){m=u(a.g);n=m.next();for(q={};!n.done;q={Eg:void 0},n=m.next())q.Eg=n.value,r=Kj(),t=W("span"),t.classList.add("shaka-chapter"),t.textContent=q.Eg.title,r.appendChild(t),a.eventManager.o(r,"click",function(v){return function(){a.controls.Ba()&&(a.video.currentTime=v.Eg.startTime)}}(q)),a.menu.appendChild(r);
dG(a.button,!0);bG(a.menu)}H(w)}})}S("shaka.ui.ChapterSelection",RI);function VI(){}VI.prototype.create=function(a,b){return new RI(a,b)};ZH("chapter",new VI);uH("chapter",new VI);function WI(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);XI(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){XI(c)});this.eventManager.o(this.localization,"locale-changed",function(){XI(c)});
this.eventManager.o(this.g,"click",function(){if(c.controls.Ba()&&c.video.duration){var d=c.h.indexOf(c.player.Ya())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",c.player.Ya()+"x")})}pa(WI,ZF);function XI(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",WI);function YI(){}
YI.prototype.create=function(a,b){return new WI(a,b)};uH("fast_forward",new YI);function ZI(a,b){ZF.call(this,a,b);var c=this;this.h=this.controls.m;this.g=Kj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");$I(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);aJ(this);this.eventManager.o(this.localization,"locale-updated",function(){aJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){aJ(c)});this.eventManager.o(this.g,"click",function(){return Q(function(d){return c.controls.Ba()?
F(d,c.controls.fg(),0):d.return()})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Hc()?"fullscreen_exit":"fullscreen";aJ(c)});this.eventManager.o(this.h,"loadedmetadata",function(){$I(c)});this.eventManager.o(this.h,"loadeddata",function(){$I(c)});this.eventManager.o(this.adManager,"ad-started",function(){$I(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){$I(c)})}pa(ZI,ZF);
function $I(a){a.controls.ke()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function aJ(a){var b=a.controls.Hc()?"EXIT_FULL_SCREEN":"FULL_SCREEN";a.g.ariaLabel=a.localization.resolve(b)}S("shaka.ui.FullscreenButton",ZI);function bJ(){}bJ.prototype.create=function(a,b){return new ZI(a,b)};uH("fullscreen",new bJ);function cJ(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);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.l=W("span");this.l.textContent=this.localization.resolve("LOOP");a.appendChild(this.l);
this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);dJ(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){dJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){dJ(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&(c.video.loop=!c.video.loop,c.h.Ja(),c.h.ya(1))});this.m=this.video.loop;this.h=new yf(function(){c.m!=c.video.loop&&(dJ(c),c.m=c.video.loop)});
this.h.ya(1)}pa(cJ,ZF);cJ.prototype.release=function(){this.h.stop();this.h=null;ZF.prototype.release.call(this)};function dJ(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}S("shaka.ui.LoopButton",cJ);function eJ(){}eJ.prototype.create=function(a,b){return new cJ(a,b)};ZH("loop",new eJ);
uH("loop",new eJ);iG("loop",new eJ);function fJ(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-mute-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="volume_up";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("MUTE");a.appendChild(this.i);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);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.Ba()&&(c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted||0!=c.video.volume?c.video.muted=!c.video.muted:c.video.volume=1)});this.eventManager.o(this.video,"volumechange",function(){gJ(c);
hJ(c)});this.eventManager.o(this.player,"loading",function(){gJ(c);hJ(c)});this.eventManager.o(this.player,"loaded",function(){iJ(c)});this.eventManager.o(this.player,"unloading",function(){iJ(c)});this.eventManager.o(this.player,"trackschanged",function(){iJ(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){gJ(c);hJ(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){gJ(c);hJ(c)});this.eventManager.o(this.adManager,"ad-muted",function(){gJ(c);hJ(c)});this.eventManager.o(this.adManager,
"ad-started",function(){iJ(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;gJ(c);hJ(c);iJ(c)});iJ(this)}pa(fJ,ZF);function gJ(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted||0==a.video.volume?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b);a.i.textContent=a.localization.resolve(b)}function hJ(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted||0==a.video.volume?"volume_off":"volume_up";a.h.textContent=b}
function iJ(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.wh()&&(b=!1);dG(a.g,b)}S("shaka.ui.MuteButton",fJ);function jJ(){}jJ.prototype.create=function(a,b){return new fJ(a,b)};ZH("mute",new jJ);uH("mute",new jJ);iG("mute",new jJ);function kJ(a,b){ZF.call(this,a,b);var c=this;this.l=this.controls.m;this.g=Kj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);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("PICTURE_IN_PICTURE");
a.appendChild(this.j);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);lJ(this);this.parent.appendChild(this.g);this.controls.yf()||dG(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){lJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){lJ(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&c.controls.md()});this.eventManager.o(this.l,"enterpictureinpicture",function(){mJ(c)});
this.eventManager.o(this.l,"leavepictureinpicture",function(){nJ(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){oJ(c)});this.eventManager.o(this.player,"trackschanged",function(){oJ(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){mJ(c);c.eventManager.qa(d.window,"pagehide",function(){nJ(c)})})}pa(kJ,ZF);
function mJ(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function nJ(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
function lJ(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.le();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 oJ(a){Q(function(b){if(!a.controls.yf())return dG(a.g,!1),a.controls.le()?F(b,a.controls.md(),0):b.A(0);if(!a.player||!a.player.zd())return dG(a.g,!0),b.A(0);dG(a.g,!1);return a.controls.le()?F(b,a.controls.md(),0):b.A(0)})}S("shaka.ui.PipButton",kJ);
function pJ(){}pJ.prototype.create=function(a,b){return new kJ(a,b)};ZH("picture_in_picture",new pJ);uH("picture_in_picture",new pJ);iG("picture_in_picture",new pJ);function qJ(a,b){CI.call(this,a,b,"slow_motion_video");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(){rJ(c)});this.eventManager.o(this.localization,"locale-changed",
function(){rJ(c)});this.eventManager.o(this.player,"loaded",function(){sJ(c)});this.eventManager.o(this.player,"ratechange",function(){sJ(c)});rJ(this);tJ(this);sJ(this)}pa(qJ,CI);function rJ(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 sJ(a){var b=a.player.Ya(),c=aG(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return e.textContent==b+"x"}))d=c.parentElement,d.appendChild(cG()),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 tJ(a){for(var b=u(a.controls.g.playbackRates),c=b.next(),d={};!c.done;d={Rf:void 0},c=b.next()){d.Rf=c.value;c=Kj();var e=W("span");e.textContent=d.Rf+"x";c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){f.Rf==a.video.defaultPlaybackRate?a.player.rd():a.player.Nc(f.Rf,!1)}}(d));a.menu.appendChild(c)}bG(a.menu)}S("shaka.ui.PlaybackRateSelection",qJ);function uJ(){}uJ.prototype.create=function(a,b){return new qJ(a,b)};
ZH("playback_rate",new uJ);uH("playback_rate",new uJ);function vJ(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-current-time");wJ(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&c.player.T()&&(c.video.currentTime=c.player.xa().end)});this.eventManager.o(this.player,"loading",function(){dG(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.R,e=c.controls.fh(),f=c.player.xa(),g=f.end-f.start;isFinite(g)?c.player.T()?(e=
Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(wJ(c,"- "+eG(e,g)),c.g.disabled=!1):(wJ(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=eG(Math.max(0,e-f.start),d),g&&(e+=" / "+eG(g,d)),wJ(c,e),c.g.disabled=!0):(wJ(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){dG(c.g,!c.ad.isLinear())});
this.eventManager.o(this.adManager,"ad-stopped",function(){dG(c.g,!0)})}pa(vJ,ZF);function wJ(a,b){b!=a.g.textContent&&(a.g.textContent=b)}S("shaka.ui.PresentationTimeTracker",vJ);function xJ(){}xJ.prototype.create=function(a,b){return new vJ(a,b)};uH("time_and_duration",new xJ);function yJ(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");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);zJ(this);this.eventManager.o(this.localization,"locale-updated",function(){zJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){zJ(c)});var d=this.controls.C;this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&(d.g?bH(d.g):ab("Not playing VR content"))});this.eventManager.o(d,"vrstatuschanged",function(){dG(c.g,c.controls.Sb())});dG(this.g,this.controls.Sb())}pa(yJ,ZF);
function zJ(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}S("shaka.ui.RecenterVRButton",yJ);function JJ(){}JJ.prototype.create=function(a,b){return new yJ(a,b)};ZH("recenter_vr",new JJ);uH("recenter_vr",new JJ);function KJ(a,b){ZF.call(this,a,b);var c=this;this.j=Rb().dg();this.g=Kj();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent=this.j?"airplay":"cast";this.g.appendChild(this.i);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.l=W("span");this.l.classList.add("shaka-current-selection-span");
a.appendChild(this.l);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;LJ(this);dG(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){LJ(c)}),this.eventManager.o(this.localization,"locale-changed",function(){LJ(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){MJ(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&c.video.remote.prompt()}),this.eventManager.o(this.video.remote,"connect",function(){MJ(c);
NJ(c)}),this.eventManager.o(this.video.remote,"connecting",function(){MJ(c);NJ(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){MJ(c);NJ(c)}),this.eventManager.o(this.player,"loaded",function(){MJ(c)}),MJ(this,!0),NJ(this)):this.g.classList.add("shaka-hidden")}pa(KJ,ZF);KJ.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});ZF.prototype.release.call(this)};
function MJ(a,b){b=void 0===b?!1:b;var c,d;Q(function(e){switch(e.g){case 1:if(a.controls.D.Cg()&&a.controls.oa||!a.video.remote){dG(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.A(0);break}if("disconnected"==a.video.remote.state||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;Rb().dg()&&a.player.m==Iq&&"HLS"!=a.player.ih()&&(h=!1);dG(a.g,h&&f&&!g)}else dG(a.g,!1)};ta(e,7);if(-1==a.h){e.A(9);break}return F(e,a.video.remote.cancelWatchAvailability(a.h),
10)}dG(a.g,!0);if(-1==a.h){e.A(0);break}return F(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.A(0);break;case 10:a.h=-1;case 9:wa(e,8);break;case 7:xa(e);case 8:return ta(e,11),F(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;wa(e,0);break;case 11:xa(e),c(!0),H(e)}})}function LJ(a){var b=a.j?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}
function NJ(a){a.j||(a.i.textContent="disconnected"==a.video.remote.state?"cast":"cast_connected")}S("shaka.ui.RemoteButton",KJ);function OJ(){}OJ.prototype.create=function(a,b){return new KJ(a,b)};ZH("remote",new OJ);uH("remote",new OJ);function PJ(a,b){CI.call(this,a,b,"tune");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=Nj(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(){QJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){QJ(c)});this.eventManager.o(this.player,"loading",function(){RJ(c);SJ(c)});this.eventManager.o(this.player,"loaded",function(){RJ(c);
SJ(c)});this.eventManager.o(this.player,"unloading",function(){RJ(c);SJ(c)});this.eventManager.o(this.player,"variantchanged",function(){RJ(c);SJ(c)});this.eventManager.o(this.player,"trackschanged",function(){RJ(c);SJ(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){RJ(c);SJ(c)});this.eventManager.o(this.player,"adaptation",function(){RJ(c);SJ(c)});RJ(this)}pa(PJ,CI);
function SJ(a){var b=a.player.getConfiguration().abr.enabled;if(a.player.zd()){a.i.textContent="";a.i.style.display="none";a.g&&(a.g.textContent="",a.g.style.display="none");var c=a.player.kb()||[],d=c.find(function(e){return e.active});d&&(b?(a.h.textContent=d.bandwidth?TJ(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?UJ(a,d,c):d.bandwidth?Math.round(d.bandwidth/
1E3)+" kbits/s":"Unknown",a.h.style.display=""):a.h.style.display="none",b=VJ(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=VJ(a,b.width,b.height),a.g.textContent=b,a.g.style.display=""!==b?"":"none")}
function VJ(a,b,c){if(!b||!c)return"";c>b&&(c=u([c,b]),b=c.next().value,c=c.next().value);b/c>16/9&&(c=Math.round(9*b/16));a=a.controls.g.qualityMarks;return 8640<=c?c+"p":4320<=c?a["4320"]:2160<=c?a["2160"]:1440<=c?a["1440"]:1080<=c?a["1080"]:720<=c?a["720"]:""}
function RJ(a){var b=$F(a.menu);Oj(a.menu);a.menu.appendChild(b);b=0;b=a.player.zd()?WJ(a):XJ(a);var c=Kj();c.classList.add("shaka-enable-abr-button");a.eventManager.o(c,"click",function(){a.player.configure({abr:{enabled:!0}});RJ(a)});a.j=W("span");a.j.textContent=a.localization.resolve("AUTO_QUALITY");c.appendChild(a.j);a.player.getConfiguration().abr.enabled&&(c.ariaSelected="true",c.appendChild(cG()),a.j.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);bG(a.menu);a.controls.dispatchEvent(new U("resolutionselectionupdated"));QJ(a);dG(a.button,0<b)}
function WJ(a){var b=[];a.player.m==Lq||a.player.Da()||(b=a.player.kb()||[]);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(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&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=u(b),f=e.next(),g={};!f.done;g={Ce:void 0},f=e.next()){g.Ce=f.value;f=Kj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Ce;a.player.configure({abr:{enabled:!1}});a.player.Nd(l,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.Ce.bandwidth?TJ(a,g.Ce,b):"Unknown";f.appendChild(h);d||g.Ce!=
c||(f.ariaSelected="true",f.appendChild(cG()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function XJ(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;r&&a.controls.g.showVideoCodec&&q.codecs&&m.codecs&&(r=ff(q.codecs)==ff(m.codecs));return r})==n});b.sort(function(m,n){return n.height==m.height||null==m.height||null==n.height?n.bandwidth-m.bandwidth:n.height-m.height});for(var d=a.player.getConfiguration().abr.enabled,
e=u(b),f=e.next(),g={};!f.done;g={jc:void 0},f=e.next()){g.jc=f.value;f=Kj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(m){return function(){var n=m.jc;a.player.configure({abr:{enabled:!1}});a.player.zj(n,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.jc.height&&g.jc.width?UJ(a,g.jc,b):g.jc.bandwidth?Math.round(g.jc.bandwidth/1E3)+" kbits/s":"Unknown";f.appendChild(h);var k=VJ(a,g.jc.width,g.jc.height);if(""!==k){var l=W("sup");l.classList.add("shaka-quality-mark");
l.textContent=k;f.appendChild(l)}d||g.jc!=c||(f.ariaSelected="true",f.appendChild(cG()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function UJ(a,b,c){function d(l,m){return l!=m&&l.height==m.height&&l.hdr==m.hdr&&Math.round(l.frameRate||0)==Math.round(m.frameRate||0)}var e=b.height||0,f=b.width||0;e>f&&(e=u([e,f]),f=e.next().value,e=e.next().value);var g=e;f/e>16/9&&(g=Math.round(9*f/16));f=g+"p";e=new Set;g=u(c);for(var h=g.next();!h.done;h=g.next())h=h.value,h.frameRate&&e.add(Math.round(h.frameRate));1<e.size&&(e=b.frameRate)&&(50<=e||20>=e)&&(f+=Math.round(b.frameRate));if("PQ"==b.hdr||"HLG"==b.hdr)f+=" HDR";"CH-STEREO"==
b.videoLayout&&(f+=" 3D");if(c.some(function(l){return d(b,l)})&&(c.some(function(l){return d(b,l)&&l.bandwidth==b.bandwidth})||(f+=" ("+Math.round(b.bandwidth/1E3)+" kbits/s)"),a.controls.g.showVideoCodec)){var k=function(l){var m="";l&&(l=ff(l),m=l.startsWith("dovi-")?"Dolby Vision":l.toUpperCase());return m?" "+m:m};c.some(function(l){return d(b,l)&&k(l.codecs)!=k(b.codecs)})&&(f+=k(b.codecs))}return f}
function TJ(a,b,c){var d=Math.round(b.bandwidth/1E3)+" kbits/s";if(a.controls.g.showAudioCodec){var e=function(f){var g="";f&&(g=ff(f).toUpperCase());return g?" "+g:g};c.some(function(f){return e(f.codecs)!=e(b.codecs)})&&(d+=e(b.codecs))}return d}
function QJ(a){var b=a.player.zd()?"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.j.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",PJ);function YJ(){}
YJ.prototype.create=function(a,b){return new PJ(a,b)};ZH("quality",new YJ);uH("quality",new YJ);function ZJ(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);$J(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){$J(c)});this.eventManager.o(this.localization,"locale-changed",function(){$J(c)});
this.eventManager.o(this.g,"click",function(){if(c.controls.Ba()&&c.video.duration){var d=c.h.indexOf(c.player.Ya())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",c.player.Ya()+"x")})}pa(ZJ,ZF);function $J(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",ZJ);function aK(){}
aK.prototype.create=function(a,b){return new ZJ(a,b)};uH("rewind",new aK);function bK(a,b){ZF.call(this,a,b);var c=this;this.l=this.controls.D;this.g=Kj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);
this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);cK(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){cK(c)});this.eventManager.o(this.localization,"locale-changed",function(){cK(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;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.C,"vrstatuschanged",function(){dK(c)});this.eventManager.o(this.adManager,"ad-started",function(){dK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){dK(c)});this.eventManager.o(this.player,"unloading",function(){dK(c)});this.eventManager.o(this.player,"loaded",function(){dK(c)});this.eventManager.o(this.video,"play",
function(){dK(c)});this.eventManager.o(this.video,"pause",function(){dK(c)});this.eventManager.o(this.video,"seeking",function(){dK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){dK(c)});dK(this)}pa(bK,ZF);function dK(a){var b=!0;a.controls.Sb()&&(b=!1);b&&a.l.Pa()&&(b=!1);b&&(a.player.drmInfo()||a.player.zd())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);dG(a.g,b)}
function cK(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",bK);function eK(){}eK.prototype.create=function(a,b){return new bK(a,b)};ZH("save_video_frame",new eK);iG("save_video_frame",new eK);function fK(a,b){ZF.call(this,a,b);var c=this;if(this.h=this.player.kh())this.g=Kj(),this.g.classList.add("shaka-skip-next-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),this.g.textContent="skip_next",this.parent.appendChild(this.g),gK(this),hK(this),this.eventManager.o(this.localization,"locale-updated",function(){gK(c)}),this.eventManager.o(this.localization,"locale-changed",function(){gK(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&
c.h.playItem(c.h.getCurrentItemIndex()+1)}),this.eventManager.o(this.h,"currentitemchanged",function(){hK(c)}),this.eventManager.o(this.h,"itemsinserted",function(){hK(c)}),this.eventManager.o(this.h,"itemsremoved",function(){hK(c)}),this.eventManager.o(this.player,"loading",function(){hK(c)})}pa(fK,ZF);function gK(a){a.g.ariaLabel=a.localization.resolve("SKIP_NEXT")}function hK(a){var b=a.h.getItems().length;b=1<b&&a.h.getCurrentItemIndex()+1<b;dG(a.g,b)}S("shaka.ui.SkipNextButton",fK);
function iK(){}iK.prototype.create=function(a,b){return new fK(a,b)};uH("skip_next",new iK);function jK(a,b){kG.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip")}pa(jK,kG);S("shaka.ui.SmallPlayButton",jK);function kK(){}kK.prototype.create=function(a,b){return new jK(a,b)};uH("play_pause",new kK);function lK(a,b){ZF.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(lK,ZF);S("shaka.ui.Spacer",lK);function mK(){}mK.prototype.create=function(a,b){return new lK(a,b)};uH("spacer",new mK);function nK(a,b){function c(m){m=parseInt(l.g[m],10);return 2E9<m?(m/1E9).toFixed(2)+"GB":1E6<m?(m/1E6).toFixed(2)+"MB":1E3<m?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return eG(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)"}ZF.call(this,a,b);var l=this;this.i=Kj();this.i.classList.add("shaka-statistics-button");
this.j=W("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);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.h.appendChild(this.h);this.C=[];this.D=["stateHistory","switchHistory"];this.g=this.player.getStats();this.s=new Map;this.B=(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.l=new yf(function(){l.g=
l.player.getStats();for(var m=u(l.C),n=m.next();!n.done;n=m.next()){var q=n.value;n=l.s.get(q);n.textContent=l.B.get(q)(q);n&&n.parentElement&&(q=l.g[q],"string"==typeof q?dG(n.parentElement,""!=q):dG(n.parentElement,!isNaN(q)))}});oK(this);pK(this);this.eventManager.o(this.localization,"locale-updated",function(){oK(l)});this.eventManager.o(this.localization,"locale-changed",function(){oK(l)});this.eventManager.o(this.i,"click",function(){qK(l);oK(l)})}pa(nK,ZF);
function qK(a){a.h.classList.contains("shaka-hidden")?(a.j.textContent="insert_chart",a.l.ya(.1),dG(a.h,!0)):(a.j.textContent="insert_chart_outlined",a.l.stop(),dG(a.h,!1))}function oK(a){a.u.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
function rK(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.B.get(b)(b);c.appendChild(d);a.s.set(b,d);return c}
function pK(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=W("i");c.classList.add("material-icons");c.classList.add("notranslate");c.classList.add("material-icons-round");c.textContent="close";b.appendChild(c);a.h.appendChild(b);a.eventManager.o(c,"click",function(){qK(a)});b=u(a.controls.g.statisticsList);for(c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.D.includes(c)){var d=rK(a,c);a.h.appendChild(d);a.C.push(c)}else ab("Unrecognized statistic element:",
c)}nK.prototype.release=function(){this.l.stop();this.l=null;ZF.prototype.release.call(this)};S("shaka.ui.StatisticsButton",nK);function sK(){}sK.prototype.create=function(a,b){return new nK(a,b)};ZH("statistics",new sK);iG("statistics",new sK);function tK(a,b){CI.call(this,a,b,"closed_caption");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.$c()?this.button.ariaPressed="true":this.button.ariaPressed="false";uK(this);this.eventManager.o(this.localization,"locale-updated",function(){vK(c);wK(c)});this.eventManager.o(this.localization,"locale-changed",function(){vK(c);wK(c)});this.eventManager.o(this.player,
"loading",function(){xK(c);wK(c)});this.eventManager.o(this.player,"loaded",function(){xK(c);wK(c)});this.eventManager.o(this.player,"unloading",function(){xK(c);wK(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){xK(c);wK(c)});this.eventManager.o(this.player,"textchanged",function(){wK(c)});this.eventManager.o(this.player,"trackschanged",function(){wK(c)});xK(this);vK(this);wK(this)}pa(tK,CI);
function uK(a){var b=Kj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(cG());a.g=W("span");b.appendChild(a.g)}function xK(a){a.player.$c()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new U("captionselectionupdated"))}
function wK(a){var b=a.player.qc()||[];BI(b,a.menu,function(d){return yK(a,d)},a.player.$c(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat);var c=Kj();c.classList.add("shaka-turn-captions-off-button");a.eventManager.o(c,"click",function(){a.player.ze(!1);wK(a)});c.appendChild(a.g);a.menu.appendChild(c);a.player.$c()?a.g.classList.remove("shaka-chosen-item"):(c.ariaSelected="true",c.appendChild(cG()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);bG(a.menu);a.controls.dispatchEvent(new U("captionselectionupdated"));dG(a.button,0<b.length)}function yK(a,b){return Q(function(c){if(1==c.g)return a.player.Zf(b),F(c,a.player.ze(!0),2);a.player.configure("preferredTextLanguage",b.language);a.player.configure("preferForcedSubs",b.forced);H(c)})}
function vK(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",tK);function zK(){}zK.prototype.create=function(a,b){return new tK(a,b)};ZH("captions",new zK);uH("captions",new zK);function AK(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");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);BK(this);this.eventManager.o(this.localization,"locale-updated",function(){BK(c)});this.eventManager.o(this.localization,"locale-changed",function(){BK(c)});var d=this.controls.C;this.eventManager.o(this.g,"click",function(){c.controls.Ba()&&d.Pd()});this.eventManager.o(d,"vrstatuschanged",function(){dG(c.g,c.controls.Sb())});dG(this.g,this.controls.Sb())}pa(AK,ZF);
function BK(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}S("shaka.ui.ToggleStereoscopicButton",AK);function CK(){}CK.prototype.create=function(a,b){return new AK(a,b)};ZH("toggle_stereoscopic",new CK);uH("toggle_stereoscopic",new CK);function DK(a,b){sG.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return EK(c)});this.eventManager.o(this.player,"loading",function(){return EK(c)});this.eventManager.o(this.player,"loaded",function(){return FK(c)});this.eventManager.o(this.player,"unloading",function(){return FK(c)});this.eventManager.o(this.player,"trackschanged",function(){return FK(c)});this.eventManager.o(this.controls,
"caststatuschanged",function(){return EK(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return GK(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return GK(c)});this.eventManager.o(this.adManager,"ad-started",function(){return FK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){FK(c);EK(c)});this.eventManager.o(this.localization,"locale-updated",function(){return HK(c)});this.eventManager.o(this.localization,"locale-changed",function(){return HK(c)});
EK(this);HK(this);if(this.ad)this.onChange();FK(this)}pa(DK,sG);DK.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,0<this.video.volume&&(this.video.muted=!1))};function EK(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);IK(a)}function GK(a){var b=a.ad.getVolume();a.setValue(100*b);IK(a)}
function IK(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 HK(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}function FK(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.wh()&&(b=!1);dG(a.container,b)}S("shaka.ui.VolumeBar",DK);function JK(){}JK.prototype.create=function(a,b){return new DK(a,b)};uH("volume",new JK);}).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