/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ca=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this),fa="Int8 Uint8 Uint8Clamped Int16 Uint16 Int32 Uint32 Float32 Float64".split(" ");ea.BigInt64Array&&(fa.push("BigInt64"),fa.push("BigUint64"));
function ha(a,b){if(b)for(var c=0;c<fa.length;c++)ia(fa[c]+"Array.prototype."+a,b)}function ja(a,b){b&&ia(a,b)}function ia(a,b){var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ca(c,a,{configurable:!0,writable:!0,value:b})}var ka;
if(typeof Object.setPrototypeOf=="function")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=aa(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Xn=b.prototype}function qa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function u(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:qa(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}function sa(){this.u=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function ta(a){if(a.u)throw new TypeError("Generator is already running");a.u=!0}
sa.prototype.A=function(a){this.h=a};function ua(a,b){a.i={$i:b,nj:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function H(a,b,c){a.g=c;return{value:b}}sa.prototype.B=function(a){this.g=a};function I(a){a.g=0}function va(a,b,c){a.m=b;c!=void 0&&(a.j=c)}function wa(a,b){a.m=0;a.j=b||0}function xa(a,b,c){a.g=b;a.m=c||0}function ya(a,b){a.m=b||0;b=a.i.$i;a.i=null;return b}function Aa(a){a.C=[a.i];a.m=0;a.j=0}
function Ga(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.nj?a.g=a.m||a.j:c.B!=void 0&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Ha(a){this.g=new sa;this.h=a}function Ka(a,b){ta(a.g);var c=a.g.l;if(c)return Ma(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Na(a)}
function Ma(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.u=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Na(a)}a.g.l=null;d.call(a.g,f);return Na(a)}function Na(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.u=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.u=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.nj)throw b.$i;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Oa(a){this.next=function(b){ta(a.g);a.g.l?b=Ma(a,a.g.l.next,b,a.g.A):(a.g.A(b),b=Na(a));return b};this.throw=function(b){ta(a.g);a.g.l?b=Ma(a,a.g.l["throw"],b,a.g.A):(ua(a.g,b),b=Na(a));return b};this.return=function(b){return Ka(a,b)};this[Symbol.iterator]=function(){return this}}function Pa(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 O(a){return Pa(new Oa(new Ha(a)))}function Ra(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}ja("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
ja("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");ca(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Sa(qa(this))}});return a});function Sa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
ja("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.u=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.F(g):this.m(g)}};
b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.A(2,g)};b.prototype.m=function(g){this.A(1,g)};b.prototype.A=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.C()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=ea.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.D=
function(){if(this.u)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(this.g!=null){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.I=function(g){var h=this.j();g.pf(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,r){return typeof q=="function"?function(t){try{l(q(t))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.pf(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.pf=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;this.g==null?f.h(k):this.g.push(k);this.u=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=u(g),m=l.next();!m.done;m=l.next())d(m.value).pf(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(v){q[t]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).pf(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function Ta(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
ja("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 l==="object"&&k!==null||l==="function"}function e(k){if(!Ta(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ta(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ta(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ta(k,
g)&&Ta(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ta(k,g)&&Ta(k[g],this.g)?delete k[g][this.g]:!1};return b});
ja("Map",function(a){function b(){var h={};return h.Ic=h.next=h.head=h}function c(h,k){var l=h[1];return Sa(function(){if(l){for(;l.head!=h[1];)l=l.Ic;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ta(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||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(u([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Ic:this[1].Ic,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Ic.next=l.entry,this[1].Ic=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.Ic.next=
h.entry.next,h.entry.next.Ic=h.entry.Ic,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Ic=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 Ua(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}ja("Array.prototype.keys",function(a){return a?a:function(){return Ua(this,function(b){return b})}});
ja("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||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(u([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});ja("Array.prototype.values",function(a){return a?a:function(){return Ua(this,function(b,c){return c})}});
ja("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
function Va(a,b,c){if(a==null)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ja("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Va(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}});
ja("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});ja("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});ja("String.prototype.includes",function(a){return a?a:function(b,c){return Va(this,b,"includes").indexOf(b,c||0)!==-1}});
ja("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
function Wa(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{jj:e,v:f}}return{jj:-1,v:void 0}}ja("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Wa(this,b,c).jj}});
ja("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});
ja("Array.prototype.find",function(a){return a?a:function(b,c){return Wa(this,b,c).v}});ja("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ta(b,d)&&c.push([d,b[d]]);return c}});var Xa=typeof Object.assign=="function"?Object.assign:function(a,b){if(a==null)throw new TypeError("No nullish arg");a=Object(a);for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ta(d,e)&&(a[e]=d[e])}return a};ja("Object.assign",function(a){return a||Xa});
ja("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;})})}});ja("Array.prototype.entries",function(a){return a?a:function(){return Ua(this,function(b,c){return[b,c]})}});ja("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});
ja("String.prototype.repeat",function(a){return a?a:function(b){var c=Va(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ja("Number.EPSILON",function(){return 2.220446049250313E-16});ja("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ja("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});
ja("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ta(b,d)&&c.push(b[d]);return c}});ja("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ja("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Va(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});
ja("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0)return b;var c=Math.floor(Math.abs(b));return b<0?-c:c}});function Ya(a){a=Math.trunc(a)||0;a<0&&(a+=this.length);if(!(a<0||a>=this.length))return this[a]}ja("Array.prototype.at",function(a){return a?a:Ya});ha("at",function(a){return a?a:Ya});ja("String.prototype.at",function(a){return a?a:Ya});var Za=this||self;
function S(a,b){a=a.split(".");var c=Za;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function T(a,b){if(b)if(b instanceof Map)for(var c=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 $a(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",T);
var ab={Km:"abrstatuschanged",Lm:"adaptation",Mm:"audiotrackchanged",Nm:"audiotrackschanged",Om:"boundarycrossed",Pm:"buffering",Qm:"canupdatestarttime",Rm:"complete",Sm:"currentitemchanged",Tm:"downloadcompleted",Um:"downloadfailed",Vm:"downloadheadersreceived",Wm:"drmsessionupdate",Xm:"emsg",dn:"itemsinserted",fn:"itemsremoved",xn:"prft",Error:"error",Ym:"expirationupdated",Zm:"firstquartile",$m:"gapjumped",gn:"keystatuschanged",ln:"loaded",mn:"loading",on:"manifestparsed",pn:"manifestupdated",
qn:"mediaqualitychanged",rn:"mediasourcerecovered",tn:"metadataadded",Metadata:"metadata",un:"midpoint",vn:"nospatialvideoinfo",wn:"onstatechange",yn:"ratechange",Bn:"segmentappended",Cn:"sessiondata",Dn:"spatialvideoinfo",En:"stalldetected",Fn:"started",Gn:"statechanged",Hn:"streaming",In:"textchanged",Jn:"texttrackvisibility",Kn:"thirdquartile",Ln:"timelineregionadded",Mn:"timelineregionenter",Nn:"timelineregionexit",On:"trackschanged",Qn:"unloading",Sn:"variantchanged"};function bb(){}function cb(){}function db(){}function eb(a){var b=Ra.apply(1,arguments);fb.has(a)||(fb.add(a),db.apply(bb,x(b)))}function gb(){}function hb(){}function ib(){}var fb=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Ra.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Ra.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Ra.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Ra.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Ra.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Ra.apply(0,arguments)))}),
db=function(){return console.warn.apply(console,x(Ra.apply(0,arguments)))},cb=function(){console.error.apply(console,x(Ra.apply(0,arguments)))});function jb(){this.g=new Map}p=jb.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function kb(){this.hb=new jb;this.cf=this}kb.prototype.addEventListener=function(a,b){this.hb&&this.hb.push(a,b)};kb.prototype.removeEventListener=function(a,b){this.hb&&this.hb.remove(a,b)};kb.prototype.dispatchEvent=function(a){if(!this.hb)return!0;var b=this.hb.get(a.type)||[],c=this.hb.get("All");c&&(b=b.concat(c));b=u(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.cf;a.currentTarget=this.cf;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
kb.prototype.release=function(){this.hb=null};function lb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function mb(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.qc),this.yd=a.yd,sb(this,a.Ib),tb(this,a.Ud),this.Tb=a.Tb,ub(this,a.g.clone()),this.gd=a.gd):a&&(b=String(a).match(pb))?(rb(this,b[1]||"",!0),this.yd=vb(b[2]||""),sb(this,b[3]||"",!0),tb(this,b[4]),this.Tb=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.gd=vb(b[7]||"")):this.g=new xb(null)}p=qb.prototype;p.qc="";p.yd="";p.Ib="";p.Ud=null;p.Tb="";p.gd="";
p.toString=function(){var a=[],b=this.qc;b&&a.push(yb(b,zb,!0),":");if(b=this.Ib){a.push("//");var c=this.yd;c&&a.push(yb(c,zb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ud;b!=null&&a.push(":",String(b))}if(b=this.Tb)this.Ib&&b.charAt(0)!="/"&&a.push("/"),a.push(yb(b,b.charAt(0)=="/"?Ab:Db,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gd)&&a.push("#",yb(b,Eb));return a.join("")};
p.resolve=function(a){var b=this.clone();b.qc==="data"&&(b=new qb);var c=!!a.qc;c?rb(b,a.qc):c=!!a.yd;c?b.yd=a.yd:c=!!a.Ib;c?sb(b,a.Ib):c=a.Ud!=null;var d=a.Tb;if(c)tb(b,a.Ud);else if(c=!!a.Tb){if(d.charAt(0)!="/")if(this.Ib&&!this.Tb)d="/"+d;else{var e=b.Tb.lastIndexOf("/");e!=-1&&(d=b.Tb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h==
".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Tb=d:c=a.g.toString()!=="";c?ub(b,a.g.clone()):c=!!a.gd;c&&(b.gd=a.gd);return b};p.clone=function(){return new qb(this)};function rb(a,b,c){a.qc=c?vb(b,!0):b;a.qc&&(a.qc=a.qc.replace(/:$/,""))}function sb(a,b,c){a.Ib=c?vb(b,!0):b}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Ud=b}else a.Ud=null}
function ub(a,b,c){b instanceof xb?a.g=b:(c||(b=yb(b,Fb)),a.g=new xb(b))}function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Gb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Gb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var zb=/[#\/\?@]/g,Db=/[#\?:]/g,Ab=/[#\?]/g,Fb=/[#\?@]/g,Eb=/#/g;function xb(a){this.g=a||null}
function Hb(a){if(!a.ob&&(a.ob=new Map,a.pe=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=xb.prototype;p.ob=null;p.pe=null;function Ib(a){Hb(a);return a.pe}p.add=function(a,b){Hb(this);this.g=null;var c=this.ob.has(a)?this.ob.get(a):null;c||this.ob.set(a,c=[]);c.push(b);this.pe++;return this};
p.set=function(a,b){Hb(this);this.g=null;this.ob.has(a)?this.ob.set(a,[b]):this.add(a,b);return this};p.get=function(a){Hb(this);return this.ob.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.ob||!this.ob.size)return"";for(var a=[],b=u(this.ob.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.ob.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
p.clone=function(){var a=new xb;a.g=this.g;if(this.ob){for(var b=new Map,c=u(this.ob),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.ob=b;a.pe=this.pe}return a};function Jb(){}function Kb(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=Lb(a);b=Lb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Mb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Lb(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,Uint8Array)}function Ob(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,Uint16Array)}function Pb(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,DataView)}
function Nb(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",Jb);Jb.toDataView=Pb;Jb.toUint16=Ob;Jb.toUint8=Lb;Jb.toArrayBuffer=Mb;Jb.equal=Kb;function Qb(a){this.h=a;this.g=void 0}Qb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};function Rb(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(Sb(c))return!0;for(var d=u(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Sb(e))return!0}return!1}
function Tb(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 Sb(d)?c.push(d):Sb(f)&&c.push(f)}return c}
function Ub(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Vb(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Sb(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}function Wb(a,b,c,d){d=[].concat(x(new Set(d))).sort().join("#");return a+"#"+b+"#"+c+"#"+d}var Xb=new Qb(function(){return Mb(new Uint8Array([0]))}),Yb=new Map;function V(a,b,c){var d=Ra.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(Zb)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 Zb=!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:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,
KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};/*
 @license
 Shaka Player
 Copyright 2025 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function $b(){return ac.value()}var bc=null,cc=null,ac=new Qb(function(){var a=void 0;bc&&(a=bc());!a&&cc&&(a=cc());return a});function dc(){}
function ec(a){if(!a)return"";a=Lb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!$b().oi())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&cb('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&
(a[c+2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
function fc(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new V(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Pb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return hc.value()(d)}
function jc(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=Lb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return ec(c);if(c[0]==254&&c[1]==255)return fc(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return fc(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return fc(a,!1);if(c[1]==0&&c[3]==0)return fc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return ec(a);throw new V(2,2,2003);}
function lc(a){if(window.TextEncoder&&!$b().oi()){var b=new TextEncoder;return Mb(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 Mb(b)}function mc(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}
function nc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return e[1]=="#"?(e=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",dc);dc.resetFromCharCode=function(){hc.g=void 0};
dc.toUTF16=mc;dc.toUTF8=lc;dc.fromBytesAutoDetect=jc;dc.fromUTF16=fc;dc.fromUTF8=ec;var hc=new Qb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={cd:65536};b.cd>0;b={cd:b.cd},b.cd/=2)if(a(b.cd))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.cd)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.cd));return e}}(b);return null});function oc(){}function pc(a){a=Lb(a);return Uint8Array.prototype.toBase64?a.toBase64({alphabet:"base64",omitPadding:!1}):(a=hc.value()(a),btoa(a))}function qc(a,b){b=b==void 0?!0:b;return Uint8Array.prototype.toBase64?Lb(a).toBase64({alphabet:"base64url",omitPadding:!b}):(a=pc(a).replace(/\+/g,"-").replace(/\//g,"_"),b?a:a.replace(/[=]*$/,""))}
function rc(a){if(!("fromBase64"in Uint8Array)){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}a=a.replace(/\s+/g,"");return Uint8Array.fromBase64(a,{alphabet:/[-_]/.test(a)?"base64url":"base64"})}function uc(a){if(!("fromHex"in Uint8Array)){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}return Uint8Array.fromHex(a)}
function vc(a){var b=Lb(a);if(!Uint8Array.prototype.toHex){a="";b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}return b.toHex()}function wc(){for(var a=Ra.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(Lb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",oc);oc.concat=wc;oc.toHex=vc;
oc.fromHex=uc;oc.fromBase64=rc;oc.toBase64=qc;oc.toStandardBase64=pc;function xc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new qb(a[0]);b=new qb(b[0]);b=d.resolve(b);c&&ub(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&&ub(g,c),d.push(g.toString())}return d}
function yc(a,b,c,d,e){b={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set,mediaTypes:e};d&&(b.keySystemUris=new Set([d]));!c&&Vb(a)&&b.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null});return b}
function zc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=qc(uc(h),!1));var l=g;l.length!=22&&(l=qc(uc(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:Lb(lc(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 Ac(a,b){if(b.length==1)return b[0];a=Cc(a,b);if(a!=null)return a;throw new V(2,4,4025,b);}function Cc(a,b){var c=Dc.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==Ec?"":null}
function Fc(a,b){var c=[];a=Dc.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 Ec="text",Hc={Ga:"video",ia:"audio",Va:Ec,Dg:"image",Im:"application"},Ic=1/15,Dc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Jc(){}function Kc(a,b){a=Lc(a);b=Lc(b);return a.split("-")[0]==b.split("-")[0]}function Mc(a,b){a=Lc(a);b=Lc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function Nc(a,b){a=Lc(a);b=Lc(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function Lc(a){a=u(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=u(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Oc.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Pc(a,b){var c=Qc(a),d=Qc(b);return a!=c&&b!=d&&c==d}function Rc(a,b){a=Lc(a);b=Lc(b);return b==a?4:Mc(b,a)?3:Nc(b,a)?2:Mc(a,b)?1:0}
function Qc(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=Oc.get(a)||a}function Sc(a){return a.language?Lc(a.language):a.audio&&a.audio.language?Lc(a.audio.language):a.video&&a.video.language?Lc(a.video.language):"und"}
function Tc(a,b){a=Lc(a);var c=new Set;b=u(b);for(var d=b.next();!d.done;d=b.next())c.add(Lc(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,Mc(d,a))return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Nc(d,a))return d;c=u(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Mc(a,b))return b;return null}S("shaka.util.LanguageUtils",Jc);Jc.findClosestLocale=Tc;Jc.getLocaleForVariant=Sc;
Jc.getLocaleForText=function(a){return Lc(a.language||"und")};Jc.getBase=Qc;Jc.relatedness=Rc;Jc.areSiblings=Pc;Jc.normalize=Lc;Jc.isSiblingOf=Nc;Jc.isParentOf=Mc;Jc.areLanguageCompatible=Kc;Jc.areLocaleCompatible=function(a,b){a=Lc(a);b=Lc(b);return a==b};
var Oc=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 Uc(a){kb.call(this);this.j=Lc(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Uc,kb);p=Uc.prototype;p.release=function(){kb.prototype.release.call(this)};
p.Ri=function(a){var b=this;this.g.clear();a=u(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Lc(c.value));Vc(this);a=ob(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("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 T("locale-changed",a))};
p.Xa=function(a,b,c){a=Lc(a);c===void 0&&(c=Wc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Wc||d.set(f,e)});this.h.set(a,d);Vc(this);this.dispatchEvent(new T("locale-updated"));return this};p.nm=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 T("unknown-localization",a));return""};
p.Qk=function(){return this.g};
function Vc(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={De:void 0},g=f.next()){h.De=g.value;e.add(h.De);e.add(Qc(h.De));g=ob(b.keys(),function(l){return function(m){return Pc(m,l.De)}}(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 Qc(m)==l.De}}(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,Xc(f,b,e);e.size>0&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function Xc(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",Uc);Uc.prototype.getCurrentLocales=Uc.prototype.Qk;
Uc.prototype.resolve=Uc.prototype.resolve;Uc.prototype.resolveDictionary=Uc.prototype.nm;Uc.prototype.insert=Uc.prototype.Xa;Uc.prototype.changeLocale=Uc.prototype.Ri;Uc.prototype.release=Uc.prototype.release;var Wc=1;Uc.ConflictResolution={USE_OLD:0,USE_NEW:Wc};Uc.UNKNOWN_LOCALES="unknown-locales";Uc.UNKNOWN_LOCALIZATION="unknown-localization";Uc.MISSING_LOCALIZATIONS="missing-localizations";Uc.LOCALE_CHANGED="locale-changed";Uc.LOCALE_UPDATED="locale-updated";function Yc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Yc.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 Zc(a){return a.h/(1-Math.pow(a.g,a.i))};function $c(){this.h=new Yc(2);this.j=new Yc(5);this.g=0;this.i=128E3;this.l=16E3}$c.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)};$c.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)}};$c.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Zc(this.h),Zc(this.j))};function ad(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function bd(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function cd(a,b,c){c||(c=ad);if(a.length!=b.length)return!1;b=b.slice();a=u(a);for(var d=a.next(),e={};!d.done;e={oj:void 0},d=a.next()){e.oj=d.value;d=b.findIndex(function(f){return function(g){return c(f.oj,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function dd(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=ad);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 ed(){this.g=new jb}p=ed.prototype;p.release=function(){this.Ta();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new fd(a,b,c,d),this.g.push(b,a))};p.qa=function(a,b,c,d){function e(g){f.Ea(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.Ea=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.Ea(),this.g.remove(b,e))}};
p.Ta=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.Ea();this.g.g.clear()}};S("shaka.util.EventManager",ed);ed.prototype.removeAll=ed.prototype.Ta;ed.prototype.unlisten=ed.prototype.Ea;ed.prototype.listenOnce=ed.prototype.qa;ed.prototype.listen=ed.prototype.o;ed.prototype.release=ed.prototype.release;
function fd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gd(a,d);this.target.addEventListener(b,c,this.g)}fd.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gd(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return hd(a)?b:b.capture||!1}
function hd(a){var b=id;if(b==void 0){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}id=b}return b||!1}var id=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function jd(a,b){this.g=a;this.h=b}jd.prototype.toString=function(){return"v"+this.g+"."+this.h};function kd(a,b){var c=new jd(5,0),d=ld,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function md(a,b,c,d){db([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function nd(a,b,c,d){cb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var ld=null;function od(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.u=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&db("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,kd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{db("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(db("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||db(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function pd(a,b,c,d){d.type!=="video"||a.u&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.u)}function qd(a){a.g&&a.i.classList.add("shaka-hidden")}od.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function rd(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}S("shaka.lcevc.Dec",od);od.prototype.release=od.prototype.release;function sd(){}function ud(a,b){vd.set(a,b)}function wd(){var a={};$b();if(xd())for(var b=u(vd.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]=xd()?vd.has(c):yd().canPlayType(c)!="";return a}function zd(a,b){if(b){var c=vd.get(b.toLowerCase());if(c)return c}throw new V(2,4,4E3,a,b);}S("shaka.media.ManifestParser",sd);
sd.unregisterParserByMime=function(a){vd.delete(a)};sd.registerParserByMime=ud;sd.registerParserByExtension=function(){kd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};sd.AccessibilityPurpose={Rn:"visually impaired",an:"hard of hearing",An:"spoken subtitles"};var vd=new Map;function Ad(){}Ad.prototype.extract=function(){};Ad.prototype.decode=function(){return[]};Ad.prototype.clear=function(){};Ad.prototype.getStreams=function(){return[]};function Bd(){}Bd.prototype.init=function(){};Bd.prototype.parse=function(){return[]};function Cd(){}p=Cd.prototype;p.init=function(){};p.Yf=function(){};p.je=function(){};p.remove=function(){};p.Eg=function(){};S("shaka.media.IClosedCaptionParser",Cd);function Dd(a){this.h=new Map;this.i=0;this.j=new Bd;if(a=Ed(a.toLowerCase()))this.j=a();this.g=new Ad;if(a=Id)this.g=a(),this.h.set(this.i,this.g)}p=Dd.prototype;
p.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=Id)this.g=d();this.h.set(b,this.g)}}else b||this.je();this.j.init(a);c!=-1&&(this.i=c)};p.Yf=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=Lb(b.packet);c.length>0&&this.g.extract(c,b.pts)}return this.g.decode()};p.je=function(){this.g.clear()};
p.remove=function(a){a=a===void 0?[]: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.Eg=function(){return this.g.getStreams()};function Kd(a,b){Ld.set(a,b)}function Ed(a){return Ld.get(a)}S("shaka.media.ClosedCaptionParser",Dd);Dd.findDecoder=function(){return Id};Dd.unregisterDecoder=function(){Id=null};Dd.registerDecoder=function(a){Id=a};Dd.findParser=Ed;Dd.unregisterParser=function(a){Ld.delete(a)};
Dd.registerParser=Kd;var Ld=new Map,Id=null;function Md(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Nd;this.scroll=Od}S("shaka.text.CueRegion",Md);var Nd=1;Md.units={PX:0,PERCENTAGE:Nd,LINES:2};var Od="";Md.scrollMode={NONE:Od,UP:"up"};function Pd(a){this.h=a||"";this.g=0}function Qd(a){Rd(a,/[ \t]+/gm)}function Rd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function Sd(a){return a.g==a.h.length?null:(a=Rd(a,/[^ \t\n]*/gm))?a[0]:null}
function Td(a){a=Rd(a,Ud);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}function Vd(a){return a?Td(new Pd(a)):null}var Ud=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Wd(){}function Xd(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 Yd(a){var b={},c;for(c in a)b[c]=a[c];return b}
function Zd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=Zd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=u(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=Zd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}S("shaka.util.ObjectUtils",Wd);Wd.alphabeticalKeyOrderStringify=Zd;
Wd.shallowCloneObject=Yd;Wd.cloneObject=Xd;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function $d(a,b){var c=c===void 0?!1:c;a=jc(a);return ae(a,b,c)}function ae(a,b,c){a=be(a,c===void 0?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function ce(a){return de.has(a)?de.get(a):""}
function be(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var r=a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&&
r<123)&&r!==62;)e++,r=a.charCodeAt(e);var t=e+1;e=a.indexOf(a[e],t);t=(" "+a.slice(t,e)).slice(1);if(r===39||r===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else t=null,e--;if(q.startsWith("xmlns:")){r=t;var v=q.split(":")[1];de.set(r,v);ee.set(v,r)}m==="tt"&&q==="xml:space"&&t==="preserve"&&(l=!0);n[q]=t}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};
m=k.length;for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=(" "+a.slice(k,e+1)).slice(1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return(" "+a.slice(f,e)).slice(1)}
var e=0;return c("")}function fe(a){return typeof a==="string"}function ge(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function he(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 ie(a){if(typeof a==="string")return nc(a);a=a.children.reduce(function(b,c){return typeof c==="string"?b+c:b},"");return a===""?null:nc(a)}function je(a){if(!Array.from(a.children).every(function(b){return typeof b==="string"}))return null;(a=ie(a))&&(a=a.trim());return a}function ke(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())ke(d.value,b,c)}return c}function le(a,b){a=he(a,b);return a.length!=1?null:a[0]}
function me(a,b,c){a=ne(a,b,c);return a.length!=1?null:a[0]}function oe(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a!=null&&(e=c(a));return e==null?d:e}function qe(a,b,c){b=ce(b);return a.attributes[b+":"+c]||null}function ne(a,b,c){var d=ce(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 re(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=qe(a,d.value,c))return d;return null}
function se(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 te(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 ue(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 ve(a){a=Number(a);return a%1===0?a:null}function we(a){a=Number(a);return a%1===0&&a>0?a:null}function xe(a){a=Number(a);return a%1===0&&a>=0?a:null}function ye(a){a=Number(a);return isNaN(a)?null:a}function ze(a){return a?a.toLowerCase()==="true":!1}
function Ae(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function Be(a){var b=[];a=nc(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,Oc:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Oc=c.slice(1))}return b}
function Ce(a,b){var c=Be(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=De(a,"t",d.t)),d.n!==null&&(c=De(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Oc)&&a[c]?Ee(a[c],e,d,je(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(x(b.children))))}}
function De(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 Ee(a,b,c,d){if(b==="remove")delete a.attributes[c];else if(b==="add"||b==="replace")a.attributes[c]=d}
function Fe(a){var b="",c=a.tagName.split(":");c.length>0&&(b=c[0],b=ee.has(b)?ee.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,typeof d=="string"?c=new Text(d):c=Fe(d),b.appendChild(c);return b}
function Ge(a){if(!a)return null;var b={tagName:a.tagName,attributes:Yd(a.attributes),children:[],parent:null};a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"?b.children.push(c):(c=Ge(c),c.parent=b,b.children.push(c));return b}var de=new Map,ee=new Map;function He(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Md;this.position=null;this.positionAlign=Ie;this.size=0;this.textAlign=Je;this.direction=Ke;this.writingMode=Le;this.lineInterpretation=Me;this.line=null;this.lineHeight="";this.lineAlign=Ne;this.displayAlign=Oe;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Pe;this.fontStyle=Qe;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={columns:32,rows:15}}function Re(a,b){a=new He(a,b,"");a.lineBreak=!0;return a}He.prototype.clone=function(){var a=new He(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function Ue(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!dd(a.nestedCues,b.nestedCues,Ue))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!dd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Ve(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&We(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(Xe)&&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(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=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=Ye(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=ae(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=u(m),c=m.next();!c.done;c=m.next())Ze(c.value,a,b);else a.payload=nc(c);else a.payload=nc(c)}else a.payload=nc(c)}function We(a){for(var b=u(Object.entries($e)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new He(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(af));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new He(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Ye(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 Ze(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Md;d.position=null;d.size=0;d.textAlign=Je;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=bf(g.backgroundColor,h.backgroundColor),h.color=bf(g.color,h.color),h.fontFamily=bf(g.fontFamily,h.fontFamily),
h.fontSize=bf(g.fontSize,h.fontSize),h.textShadow=bf(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=Re(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=cf;break;case "i":d.fontStyle=df;break;case "u":d.textDecoration.push(ef);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=Vd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(fe(a)||e.length==1&&fe(e[0]))for(c=ie(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Re(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=nc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())Ze(a.value,d,c)}function bf(a,b){return a&&a.length>0?a:b}S("shaka.text.Cue",He);He.parseCuePayload=Ve;He.equal=Ue;
He.prototype.clone=He.prototype.clone;var Ie="auto";He.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ie};var Je="center",ff={LEFT:"left",RIGHT:"right",CENTER:Je,START:"start",END:"end"};He.textAlign=ff;var Oe="after",gf={BEFORE:"before",CENTER:"center",AFTER:Oe};He.displayAlign=gf;var Ke="ltr";He.direction={HORIZONTAL_LEFT_TO_RIGHT:Ke,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Le="horizontal-tb";He.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Le,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var Me=0;He.lineInterpretation={LINE_NUMBER:Me,PERCENTAGE:1};var Ne="start",hf={CENTER:"center",START:Ne,END:"end"};He.lineAlign=hf;var $e={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};He.defaultTextColor=$e;var af={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};He.defaultTextBackgroundColor=af;var Pe=400,cf=700;He.fontWeight={NORMAL:Pe,BOLD:cf};
var Qe="normal",df="italic",jf={NORMAL:Qe,ITALIC:df,OBLIQUE:"oblique"};He.fontStyle=jf;var ef="underline";He.textDecoration={UNDERLINE:ef,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Xe=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function kf(){}kf.prototype.destroy=function(){};function lf(a,b,c){mf.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,Zf:b})}function nf(a,b){for(var c=a.toLowerCase().split(";")[0],d=u([of,pf,qf,rf]),e=d.next();!e.done;e=d.next())if(e=mf.get(c+"-"+e.value)){var f=e.Zf(),g=f.isSupported(a,b);f.destroy();if(g)return e.Zf}return null}S("shaka.transmuxer.TransmuxerEngine",kf);kf.findTransmuxer=nf;kf.unregisterTransmuxer=function(a,b){mf.delete(a.toLowerCase().split(";")[0]+"-"+b)};
kf.registerTransmuxer=lf;kf.prototype.destroy=kf.prototype.destroy;var mf=new Map,rf=1,qf=2,pf=3,of=4;kf.PluginPriority={FALLBACK:rf,PREFERRED_SECONDARY:qf,PREFERRED:pf,APPLICATION:of};function sf(){}function tf(a,b){var c=a;b&&!uf.includes(a)&&(c+='; codecs="'+b+'"');return c}function vf(a,b){b&&(a+='; codecs="'+b+'"');return a}function wf(a,b,c){var d=tf(a,b);b=vf(a,b);nf(b)?(a=nf(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function xf(a){return a.split(";")[0].split("/")[1]}
function yf(a){var b=zf(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
case a==="dvc1":case a==="dvi1":return"dovi-vvc";case a==="lvc1":return"lcevc"}return a}function Bf(a){var b=[];a=u(a.split(","));for(var c=a.next();!c.done;c=a.next())c=zf(c.value),b.push(c[0]);return b.sort().join(",")}function Cf(a){return a.split(";")[0]}function Df(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ef(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"}
function zf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",sf);sf.getFullTypeWithAllCodecs=vf;sf.getFullType=tf;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var uf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ff(a){this.i=null;this.l=a;this.D=!1;this.m=this.A=0;this.u=Infinity;this.h=this.g=null;this.F="";this.C=function(){};this.j=new Map}function Gf(a,b){Hf.set(a,b)}function If(a){return Hf.get(a)}function Jf(a){return Hf.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!Id:!1}Ff.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
function Kf(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(q){if(q.g==1)return H(q,Promise.resolve(),2);if(!a.i||!a.l)return q.return();if(c==null||d==null)return a.i.parseInit(Lb(b)),q.return();f=a.D?c:a.A;g={periodStart:a.A,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Lb(b),g,e,[]);k=u(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.C(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.m&&r.startTime<a.u});a.l.append(n);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,a.u);I(q)})}
Ff.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return O(function(e){if(e.g==1)return H(e,Promise.resolve(),2);if(a>=b)return e.return();c&&Lf(d,a,b);d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),Mf(d));I(e)})};function Nf(a,b,c){a.m=b;a.u=c}function Of(a,b,c){a.F=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function Pf(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Pf(a,d.value,c)}
function Qf(a,b,c){var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);Pf(a,f,c);f.startTime>=a.m&&f.startTime<a.u&&(d.get(e).push(f),e==a.F&&a.l.append([f]))}c=u(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=u(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);Mf(a)}
function Lf(a,b,c){for(var d=u(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
function Mf(a){for(var b=Infinity,c=-Infinity,d=u(a.j.values()),e=d.next();!e.done;e=d.next()){e=u(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.u)))}S("shaka.text.TextEngine",Ff);Ff.prototype.destroy=Ff.prototype.destroy;Ff.findParser=If;Ff.unregisterParser=function(a){Hf.delete(a)};Ff.registerParser=Gf;var Hf=new Map;function Rf(a){this.h=a;this.g=null}Rf.prototype.Y=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},a*1E3);return this};Rf.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Sf(a){this.h=a;this.g=null}Sf.prototype.Ka=function(){this.stop();this.h();return this};Sf.prototype.Y=function(a){var b=this;this.stop();this.g=(new Rf(function(){b.h()})).Y(a);return this};Sf.prototype.xa=function(a){var b=this;this.stop();this.g=(new Rf(function(){b.g.Y(a);b.h()})).Y(a);return this};Sf.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Sf);Sf.prototype.stop=Sf.prototype.stop;Sf.prototype.tickEvery=Sf.prototype.xa;
Sf.prototype.tickAfter=Sf.prototype.Y;Sf.prototype.tickNow=Sf.prototype.Ka;function Tf(a,b){return a.concat(b)}function Uf(){}function Vf(a){return a!=null}function Wf(a,b){return Promise.race([b,new Promise(function(c,d){(new Sf(d)).Y(a)})])};function Xf(){}
function Yf(a,b,c,d,e){if(e.length){var f=a.textStreams;e=u(e);for(var g=e.next(),h={};!g.done;h={zi:void 0},g=e.next())if(h.zi=g.value,g=f.filter(function(t){return function(v){return v.codecs.startsWith(t.zi)||v.mimeType.startsWith(t.zi)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=Zf(f,b,c);if(d.length){b=new jb;f=u(f);for(c=f.next();!c.done;c=f.next())c=c.value,b.push(String(c.video.width||0),c);var k=[];b.forEach(function(t,v){t=0;var w=[];v=u(v);for(var z=
v.next(),y={};!z.done;y={Cg:void 0},z=v.next())y.Cg=z.value,z=d.filter(function(A){return function(D){return A.Cg.decodingInfos[0][D]}}(y)).length,z>t?(t=z,w=[y.Cg]):z==t&&w.push(y.Cg);k.push.apply(k,x(w))});f=k}b=new Set;c=u(f);for(e=c.next();!e.done;e=c.next())e=e.value,e.video&&b.add(e.video);if(b.size){var l={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};e=Array.from(b).sort(function(t,v){return t.bandwidth&&v.bandwidth&&t.bandwidth!=
v.bandwidth?t.bandwidth-v.bandwidth:t.width!=v.width?t.width-v.width:t.codecs&&v.codecs?(t=yf(t.codecs),v=yf(v.codecs),(l[t]||1)-(l[v]||1)):0});var m=[];b=new Map;c=function(t){var v=[String(t.width||""),String(t.height||""),String(Math.round(t.frameRate||0)),t.hdr||"",t.fastSwitching];t.dependencyStream&&v.push(t.dependencyStream.baseOriginalId||"");t.roles&&v.push(t.roles.sort().join("_"));return v.join(";")};e=u(e);for(g=e.next();!g.done;g=e.next()){g=g.value;h=c(g);var n=b.get(h)||[];if(n.length){var q=
yf(n[n.length-1].codecs),r=yf(g.codecs);q==r&&(n.push(g),m.push(g.id))}else n.push(g),m.push(g.id);b.set(h,n)}a.variants=f.filter(function(t){return(t=t.video)&&!m.includes(t.id)?!1:!0})}else a.variants=f}
function Zf(a,b,c){b=u(b);for(var d=b.next(),e={};!d.done;e={lk:void 0},d=b.next())if(e.lk=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.lk)}}(e)),d.length){a=d;break}c=u(c);b=c.next();for(d={};!b.done;d={Mi:void 0},b=c.next())if(d.Mi=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Mi)}}(d)),b.length){a=b;break}return a}function $f(a,b,c){a.variants=a.variants.filter(function(d){return ag(d,b,c)})}
function ag(a,b,c){function d(g,h,k){return g>=h&&g<=k}if(a&&a.video&&a.video.width&&a.video.height){var e=a.video.width,f=a.video.height;f>e&&(f=u([f,e]),e=f.next().value,f=f.next().value);if(!d(e,b.minWidth,Math.min(b.maxWidth,c.width))||!d(f,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e*f,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 bg(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return O(function(e){if(e.g==1)return H(e,cg(a,b,b.offlineSessionIds.length>0,c,d),2);dg(b);return H(e,eg(b),0)})}
function cg(a,b,c,d,e){var f,g;return O(function(h){if(h.g==1)return $b().Wj()&&fg(b.variants),H(h,gg(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=hg(k,f,e);if(!l){var m=[];k.audio&&m.push(ig(k.audio));k.video&&m.push(ig(k.video))}return l});I(h)})}
function fg(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 hg(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=$b(),e=d.Vb()==="Xbox";d=d.Oa()==="MOBILE"&&d.Ja()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!rd(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function jg(a,b){var c,d,e,f,g,h,k;return O(function(l){if(l.g==1){c=function(m,n){if(m){var q=Yd(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,nf:void 0},g=f.next())k=g.value,h.nf=Zd(k),h.cache=kg,h.cache.has(h.nf)?d=c(d,h.cache.get(h.nf)):e.push(lg(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.nf,q),d=c(d,q))}}(h)));return H(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);I(l)})}
function lg(a){var b=[""];a.video&&(b=Df(a.video.contentType).split(","));var c=[""];a.audio&&(c=Df(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={fd:void 0},g=f.next())g=g.value,h.fd=Xd(a),a.video&&(h.fd.video.contentType=tf(Cf(h.fd.video.contentType),e)),a.audio&&(h.fd.audio.contentType=tf(Cf(h.fd.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){($b().Oa()=="MOBILE"?Wf(5,navigator.mediaCapabilities.decodingInfo(k.fd)):
navigator.mediaCapabilities.decodingInfo(k.fd)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function gg(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B;return O(function(E){switch(E.g){case 1:if(e=a.some(function(C){return C.decodingInfos.length}))return E.return();f=u(d);g=f.next();h={};case 2:if(g.done){E.B(4);break}h.Cj=g.value;k=!1;l=u(a);m=l.next();case 5:if(m.done){E.B(7);break}n=m.value;q=mg(n,b,c).filter(function(C){return function(K){K=K[0];return(K.keySystemConfiguration&&K.keySystemConfiguration.keySystem)===C.Cj}}(h));r=u(q);t=r.next();case 8:if(t.done){E.B(10);break}v=t.value;
return H(E,jg(n,v),9);case 9:t=r.next();E.B(8);break;case 10:n.decodingInfos.some(function(C){return C.supported})&&(k=!0);m=l.next();E.B(5);break;case 7:if(k)return E.return();h={Cj:void 0};g=f.next();E.B(2);break;case 4:w=u(a),z=w.next();case 12:if(z.done){E.B(0);break}y=z.value;A=mg(y,b,c).filter(function(C){C=C[0];C=C.keySystemConfiguration&&C.keySystemConfiguration.keySystem;return!C||!d.includes(C)});D=u(A);G=D.next();case 15:if(G.done){z=w.next();E.B(12);break}B=G.value;return H(E,jg(y,B),
16);case 16:G=D.next(),E.B(15)}})}
function mg(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=Df(k);if(l.includes(",")&&!d){var m=l.split(","),n=Cf(k);l=Ac("video",m);m=Ac("audio",m);m=ng(m,n);n=wf(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=og(l);k={contentType:wf(Cf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=u(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=Cf(l),l=ng(Df(l),k),k=wf(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=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},v=u(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var z=new Set,y=u(w.initData),A=y.next();!A.done;A=y.next())z.add(A.value.initDataType);
t.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(t.distinctiveIdentifier="required");w.persistentStateRequired&&(t.persistentState="required");w.sessionType&&(t.sessionTypes=[w.sessionType]);d&&(t.audio?(w.encryptionScheme&&(t.audio.encryptionScheme=t.audio.encryptionScheme||w.encryptionScheme),t.audio.robustness=t.audio.robustness||w.audioRobustness):(t.audio={robustness:w.audioRobustness},w.encryptionScheme&&(t.audio.encryptionScheme=w.encryptionScheme)),t.audio.robustness==
""&&delete t.audio.robustness);e&&(t.video?(w.encryptionScheme&&(t.video.encryptionScheme=t.video.encryptionScheme||w.encryptionScheme),t.video.robustness=t.video.robustness||w.videoRobustness):(t.video={robustness:w.videoRobustness},w.encryptionScheme&&(t.video.encryptionScheme=w.encryptionScheme)),t.video.robustness==""&&delete t.video.robustness)}r.keySystemConfiguration=t;m.push(r)}a.push(m)}}return a}
function ng(a,b){var c=$b();return a.toLowerCase()=="flac"?c.Ja()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.Ja()!="WEBKIT"?"opus":xf(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.Le()?"ec-3":a}function og(a){if(a.includes("avc1")){var b=a.split(".");if(b.length==3)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if(a=="vp9")return"vp09.00.41.08";return a}
function dg(a){a.textStreams=a.textStreams.filter(function(b){b=tf(b.mimeType,b.codecs);return Jf(b)})}
function eg(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=u(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(pg.has(f)){l.B(5);break}g=qg.get(f);if(!g){pg.set(f,!1);l.B(5);break}return H(l,rg(g),7);case 7:h=l.h,pg.set(f,h);case 5:(k=pg.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,I(l)}})}
function rg(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(c.height===2)}})}
function sg(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,videoLabel:null,
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,
accessibilityPurpose:null,originalLanguage:null};if(c){a.videoId=c.id;a.originalVideoId=c.originalId;a.width=c.width||null;a.height=c.height||null;a.frameRate=c.frameRate||null;a.pixelAspectRatio=c.pixelAspectRatio||null;a.videoBandwidth=c.bandwidth||null;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.pixelAspectRatio=
d.pixelAspectRatio||a.pixelAspectRatio,a.videoBandwidth&&d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=Ac("video",e),a.audioCodec=Ac("audio",e)}catch(r){}}}b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=
b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):
a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function tg(a){return{id:a.id,active:!1,type:Ec,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 ug(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=vg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function wg(a){a.__shaka_id||(a.__shaka_id=xg++);return a.__shaka_id}
function yg(a){var b={id:wg(a),active:a.mode!="disabled",type:Ec,bandwidth:0,language:Lc(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function zg(a,b){var c=a?a.language:null;c={id:wg(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:Lc(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function Ag(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function Bg(a){return a.filter(function(b){return Ag(b)})}
function Cg(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=Tc(Lc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Lc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Dg(e,c),a.length)return a}else if(a=e.filter(function(k){return k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Tf,[]);return a.length?
Dg(e,a[0]):e}function Dg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ig(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function Jg(a,b){b.length&&(b=b.filter(function(c){return yf(a.codecs)==yf(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function ig(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function Kg(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=Lc(c.preferredTextLanguage);b=Lc(b.language);if(c.autoShowText==2)return Kc(b,d);if(c.autoShowText==3){if(!a)return!1;a=Lc(a.language);return Kc(b,d)&&!Kc(a,b)}db("Invalid autoShowText setting!");return!1}
function Lg(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?Cf(c):"",codecs:c?Df(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(tf(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}S("shaka.util.StreamUtils",Xf);Xf.meetsRestrictions=ag;
var kg=new Map,xg=0,pg=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),qg=(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.H=null;this.G=!1;this.A=new $c;this.j=new ed;navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){a.g.useNetworkInformation&&navigator.onLine&&(a.A=new $c,a.g&&a.A.configure(a.g.advanced),a.trySuggestStreams())});this.l=[];this.I=1;this.J=!1;this.h=this.u=this.g=this.C=null;this.m=new Sf(function(){if(a.G&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=a.chooseVariant();b&&a.H(b,a.g.clearBufferSwitch,
a.g.safeMarginSwitch)}});this.D=window;"documentPictureInPicture"in window&&this.j.o(window.documentPictureInPicture,"enter",function(){a.D=window.documentPictureInPicture.window;a.m&&a.m.Ka();a.j.qa(a.D,"pagehide",function(){a.D=window;a.m&&a.m.Ka()})});this.F=this.i=null}p=Mg.prototype;p.stop=function(){this.H=null;this.G=!1;this.l=[];this.I=1;this.u=this.C=null;this.h&&(this.h.disconnect(),this.h=null);this.m&&this.m.stop();this.F=this.i=null};
p.release=function(){this.stop();this.j.release();this.m=null};p.init=function(a){this.H=a};
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,b=this.D.screen.height*c,c*=this.D.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,e=this.u.clientHeight,f=this.u.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.u&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.l.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.l);d=e;a&&e.length!=this.l.length&&(d=this.l.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Rg(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=Sg(a);a=u(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Rg(this,this.g.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Rg(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.I)?1:Math.abs(this.I);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;c&&e&&b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
e.video.height))&&(c=e)}this.C=Date.now();return c};p.enable=function(){this.G=!0;this.l.length&&this.trySuggestStreams()};p.disable=function(){this.G=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.A.sample(e,b);c&&this.C!=null&&this.G&&Tg(this)};p.trySuggestStreams=function(){this.G&&(this.C=Date.now(),Tg(this,!0))};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.A.getBandwidthEstimate(a);return this.F?this.F.getBandwidthEstimate(a):a};p.setVariants=function(a){if(cd(a,this.l))return!1;this.l=a;return!0};
p.playbackRateChanged=function(a){this.I=a};p.setMediaElement=function(a){function b(){c.m.Y(Ug)}var c=this;this.u=a;this.h&&(this.h.disconnect(),this.h=null);this.u&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.u));this.j.o(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.o(c.i,"resize",b))});this.j.o(a,"leavepictureinpicture",function(){c.i&&c.j.Ea(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.F=a};
p.configure=function(a){this.g=a;this.A&&this.g&&this.A.configure(this.g.advanced)};function Tg(a,b){if(b===void 0||!b){if(!a.J){b=a.A;if(!(b.g>=b.i))return;a.J=!0;a.C-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.C<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
function Rg(a,b,c,d,e){if(a.F){var f=a.F.dj();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return ag(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function Sg(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&(c=c.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 Ug=1;function Vg(a,b){var c=Wg();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.u=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function Xg(a){var b,c;return O(function(d){if(d.g==1){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(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.u);return H(d,new Promise(function(e){(new Sf(e)).Y(c/1E3)}),2)}a.h*=a.m;I(d)})}function Wg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Yg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Yg.prototype.resolve=function(){};Yg.prototype.reject=function(){};function Zg(a,b){this.promise=a;this.i=b;this.g=null}function $g(a){return new Zg(Promise.reject(a),function(){return Promise.resolve()})}function ah(){var a=Promise.reject(new V(2,7,7001));a.catch(function(){});return new Zg(a,function(){return Promise.resolve()})}function bh(a){return new Zg(Promise.resolve(a),function(){return Promise.resolve()})}function ch(a){return new Zg(a,function(){return a.catch(function(){})})}Zg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function dh(a){return new Zg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Zg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
Zg.prototype.cb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=eh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Yg;f.catch(function(){});var g=new V(2,7,7001);this.promise.then(c(!0),c(!1));return new Zg(f,function(){return d()})};
function eh(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(Zg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});S("shaka.util.AbortableOperation",Zg);Zg.prototype.chain=Zg.prototype.cb;Zg.prototype["finally"]=Zg.prototype.finally;
Zg.all=dh;Zg.prototype.abort=Zg.prototype.abort;Zg.notAbortable=ch;Zg.completed=bh;Zg.aborted=ah;Zg.failed=$g;function fh(){this.g=[]}function gh(a,b){a.g.push(b.finally(function(){bd(a.g,b)}))}fh.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 hh(a,b,c,d,e,f,g){kb.call(this);this.i=null;this.j=!1;this.A=new fh;this.g=new Set;this.h=new Set;this.u=a||null;this.m=b||null;this.C=c||null;this.D=d||null;this.F=e||null;this.H=f||null;this.G=g||null;this.l=new Map}pa(hh,kb);p=hh.prototype;p.configure=function(a){this.i=a};function ih(a,b,c,d){d=d===void 0?!1:d;c=c||jh;var e=kh.get(a);(!e||c>=e.priority)&&kh.set(a,{priority:c,Zf:b,$l:d})}
function lh(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.dm=function(a){this.g.add(a)};p.Dm=function(a){this.g.delete(a)};p.yk=function(){this.g.clear()};p.fm=function(a){this.h.add(a)};p.Em=function(a){this.h.delete(a)};p.zk=function(){this.h.clear()};p.Ti=function(){this.l.clear()};
function mh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();kb.prototype.release.call(this);return this.A.destroy()};
p.request=function(a,b,c){var d=this,e=new nh;if(this.j){var f=Promise.reject(new V(2,7,7001));f.catch(function(){});return new oh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xd(b.retryParameters):Wg();b.uris=Xd(b.uris);f=ph(this,a,b,c);var g=f.cb(function(){return qh(d,a,b,c,new Vg(b.retryParameters,!1),0,null,e)}),h=g.cb(function(q){return rh(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.cb(function(q){var r=Date.now()-m,t=q.response;t.timeMs+=l;t.timeMs+=r;q.El||!d.u||t.fromCache||b.method=="HEAD"||a!=sh||d.u(t.timeMs,t.data.byteLength,th(c),b,c);d.G&&d.G(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new oh(n.promise,function(){return n.abort()},e);gh(this.A,f);return f};
function ph(a,b,c,d){function e(h){f=f.cb(function(){c.body&&(c.body=Mb(c.body));return h(b,c,d)})}var f=bh(void 0);a.F&&e(a.F);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.cb(void 0,function(h){if(h instanceof V&&h.code==7001)throw h;throw new V(2,1,1006,h);})}
function qh(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new qb(c.uris[f]),l=k.qc,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=kh.get(l))?l.Zf:null;if(!n)return $g(new V(2,1,1E3,k));var q=l.$l;(k=a.l.get(k.Ib))&&(c.headers["common-access-token"]=k);var r=null,t=null,v=!1,w=!1,z;return ch(Xg(e)).cb(function(){if(a.j)return ah();
z=Date.now();var y=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(B,E,C){r&&r.stop();t&&t.Y(G/1E3);a.u&&b==sh&&(y++,c.packetNumber=y,a.u(B,E,th(d),c,d),m=!0,h.g=C)},function(B){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(B,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return A;var D=c.retryParameters.connectionTimeout;D&&(r=new Sf(function(){v=!0;A.abort()}),r.Y(D/1E3));var G=c.retryParameters.stallTimeout;G&&(t=new Sf(function(){v=!0;A.abort()}));
return A}).cb(function(y){r&&r.stop();t&&t.stop();y.timeMs==void 0&&(y.timeMs=Date.now()-z);var A=y.headers["common-access-token"];if(A){var D=new qb(y.uri);a.l.set(D.Ib,A)}A={response:y,El:m};!w&&a.m&&a.m(y.headers,c,b);a.C&&a.C(c,y);return A},function(y){r&&r.stop();t&&t.stop();if(a.D){var A=null,D=0;y instanceof V&&(A=y,y.code==1001&&(D=y.data[1]));a.D(c,A,D,v)}if(a.j)return ah();v&&(y=new V(1,1,1003,c.uris[f],b));if(y instanceof V){if(y.code==7001)throw y;if(y.code==1010)throw g;if(y.severity==
1){A=(new Map).set("error",y);A=new T("retry",A);A.cancelable=!0;a.dispatchEvent(A);if(A.defaultPrevented)throw y;f=(f+1)%c.uris.length;return qh(a,b,c,d,e,f,y,h)}}throw y;})}
function rh(a,b,c,d){var e=bh(void 0);a=u(a.h);for(var f=a.next(),g={};!f.done;g={Ij:void 0},f=a.next())g.Ij=f.value,e=e.cb(function(h){return function(){var k=c.response;k.data&&(k.data=Mb(k.data));return(0,h.Ij)(b,k,d)}}(g));return e.cb(function(){return c},function(h){var k=2;if(h instanceof V){if(h.code==7001)throw h;k=h.severity}throw new V(k,1,1007,h);})}function th(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.od)return!1}return!0}S("shaka.net.NetworkingEngine",hh);
hh.prototype.request=hh.prototype.request;hh.prototype.destroy=hh.prototype.destroy;hh.makeRequest=mh;hh.defaultRetryParameters=function(){return Wg()};hh.prototype.clearCommonAccessTokenMap=hh.prototype.Ti;hh.prototype.clearAllResponseFilters=hh.prototype.zk;hh.prototype.unregisterResponseFilter=hh.prototype.Em;hh.prototype.registerResponseFilter=hh.prototype.fm;hh.prototype.clearAllRequestFilters=hh.prototype.yk;hh.prototype.unregisterRequestFilter=hh.prototype.Dm;
hh.prototype.registerRequestFilter=hh.prototype.dm;hh.unregisterScheme=function(a){kh.delete(a)};hh.registerScheme=ih;hh.prototype.configure=hh.prototype.configure;function nh(){this.g=0}hh.NumBytesRemainingClass=nh;function oh(a,b,c){Zg.call(this,a,b);this.h=c}pa(oh,Zg);hh.PendingRequest=oh;var sh=1;hh.RequestType={MANIFEST:0,SEGMENT:sh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
hh.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 jh=3;hh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:jh};var kh=new Map;function uh(a){this.g=!1;this.h=new Yg;this.i=a}uh.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 vh(a,b){if(a.g){if(b instanceof V&&b.code==7003)throw b;throw new V(2,7,7003,b);}};function wh(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 xh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function yh(a,b){this.h=Pb(a);this.i=b==zh;this.g=0}p=yh.prototype;p.Qa=function(){return this.g<this.h.byteLength};p.Wa=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.ba=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ah();}};p.Ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ah();}};p.$=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ah();}};
p.Wh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ah();}};p.Vd=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 Ah();}if(b>2097151)throw new V(2,3,3001);this.g+=8;return b*4294967296+a};p.bc=function(a,b){if(this.g+a>this.h.byteLength)throw Ah();var c=Lb(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Ah();this.g+=a};p.Jj=function(a){if(this.g<a)throw Ah();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw Ah();this.g=a};p.pd=function(){for(var a=this.g;this.Qa()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=Lb(this.h,a,this.g-a);this.g+=1;return ec(a)};function Ah(){return new V(2,3,3E3)}S("shaka.util.DataViewReader",yh);yh.prototype.readTerminatedString=yh.prototype.pd;yh.prototype.seek=yh.prototype.seek;yh.prototype.rewind=yh.prototype.Jj;
yh.prototype.skip=yh.prototype.skip;yh.prototype.readBytes=yh.prototype.bc;yh.prototype.readUint64=yh.prototype.Vd;yh.prototype.readInt32=yh.prototype.Wh;yh.prototype.readUint32=yh.prototype.$;yh.prototype.readUint16=yh.prototype.Ia;yh.prototype.readUint8=yh.prototype.ba;yh.prototype.getLength=yh.prototype.getLength;yh.prototype.getPosition=yh.prototype.Wa;yh.prototype.hasMoreData=yh.prototype.Qa;var zh=1;yh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zh};function Bh(){this.i=new Map;this.h=new Map;this.g=!1}p=Bh.prototype;p.box=function(a,b){a=Ch(a);this.i.set(a,Dh);this.h.set(a,b);return this};p.X=function(a,b){a=Ch(a);this.i.set(a,Eh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new yh(a,0);for(this.g=!1;a.Qa()&&!this.g;)this.Sd(0,a,b,c)};
p.Sd=function(a,b,c,d){var e=b.Wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.$(),g=b.$(),h=Fh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Wa()+8>b.getLength()){this.g=!0;return}f=b.Vd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==Eh){if(d&&b.Wa()+4>b.getLength()){this.g=!0;return}n=b.$();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Wa(),b=g>0?b.bc(g,!1):new Uint8Array(0),b=new yh(b,0),l({name:h,
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Wa(),b.getLength()-b.Wa()))}};function Gh(a){for(var b=Hh(a);a.reader.Qa()&&!a.parser.g;)a.parser.Sd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Ih(a){for(var b=Hh(a),c=a.reader.$(),d=0;d<c&&(a.parser.Sd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
function Jh(a){var b=Hh(a);for(a.reader.skip(78);a.reader.Qa()&&!a.parser.g;)a.parser.Sd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Kh(a){var b=Hh(a);a.reader.skip(8);var c=a.reader.Ia();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Qa()&&!a.parser.g;)a.parser.Sd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Lh(a,b){return function(c){a(c.reader.bc(c.reader.getLength()-c.reader.Wa(),b))}}
function Ch(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 Fh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Hh(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}S("shaka.util.Mp4Parser",Bh);Bh.headerSize=Hh;Bh.typeToString=Fh;Bh.allData=Lh;Bh.audioSampleEntry=Kh;Bh.visualSampleEntry=Jh;Bh.sampleDescription=Ih;Bh.children=Gh;Bh.prototype.parseNext=Bh.prototype.Sd;Bh.prototype.parse=Bh.prototype.parse;
Bh.prototype.stop=Bh.prototype.stop;Bh.prototype.fullBox=Bh.prototype.X;Bh.prototype.box=Bh.prototype.box;var Dh=0,Eh=1;function Mh(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bh).box("moov",Gh).box("moof",Gh).X("pssh",function(c){if(!(c.version>1)){var d=Lb(c.reader.h,-12,c.size);b.data.push(d);d=c.reader.bc(16,!1);b.g.push(vc(d));if(c.version>0){d=c.reader.$();for(var e=0;e<d;e++){var f=c.reader.bc(16,!1);f=vc(f);b.h.push(f)}}}}).parse(a)}
function Nh(a,b,c,d){var e=a.length,f=12+b.length+4+e;d>0&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Pb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;d<1?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(d>0)for(h.setUint32(k,c.size),k+=4,b=u(c),c=b.next();!c.done;c=b.next())c=uc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Oh(a){var b=this;this.F=a;this.l=this.C=null;this.W=this.R=!1;this.J=0;this.g=null;this.u=new ed;this.i=new Map;this.V=[];this.D=new Map;this.K=!1;this.m=new Yg;this.h=null;this.A=function(c){c.severity==2&&b.m.reject(c);a.onError(c)};this.Z=new Map;this.aa=new Map;this.L=new Sf(function(){return Ph(b)});this.P=!1;this.M=[];this.ea=!1;this.G=new Sf(function(){Qh(b)});this.m.catch(function(){});this.j=new uh(function(){return Rh(b)});this.O=!1;this.H=this.I=null;this.T=function(){return!1}}
p=Oh.prototype;p.destroy=function(){return this.j.destroy()};function Rh(a){return O(function(b){switch(b.g){case 1:return a.u.release(),a.u=null,a.m.reject(),a.G.stop(),a.G=null,a.L.stop(),a.L=null,H(b,Sh(a),2);case 2:if(!a.l){b.B(3);break}va(b,4);return H(b,a.l.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:ya(b);case 5:a.l=null;case 3:a.g=null,a.C=null,a.D=new Map,a.h=null,a.A=function(){},a.F=null,a.O=!1,a.I=null,I(b)}})}
p.configure=function(a,b){this.h=a;b&&(this.T=b);this.G&&this.R&&this.g&&this.G.xa(this.h.updateExpirationTime)};function Th(a,b,c){a.W=!0;a.D=new Map;a.P=c;return Uh(a,b,!1)}
function Vh(a,b,c,d){d=d===void 0?!0:d;a.D=new Map;c=u(c);for(var e=c.next();!e.done;e=c.next())a.D.set(e.value,{initData:null,initDataType:null});c=u(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.D.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.P=a.D.size>0;return Uh(a,b,d)}
function Wh(a,b,c,d,e,f){var g,h,k,l,m;return O(function(n){if(n.g==1)return g=[],f.length&&g.push(f[0].contentType),e.length&&g.push(e[0].contentType),h=function(q){q=yc(b,q,null);q.licenseServerUri=c;q.serverCertificate=d;q.persistentStateRequired=!0;q.sessionType="persistent-license";return q},k=Lg(g),k.video&&(l=h(f[0].encryptionScheme||""),k.video.drmInfos.push(l)),k.audio&&(m=h(e[0].encryptionScheme||""),k.audio.drmInfos.push(m)),H(n,gg([k],!0,a.O,[]),2);vh(a.j);return n.return(Xh(a,[k]))})}
function Uh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D;return O(function(G){if(G.g==1){Yh(a.h.clearKeys,b);d=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});e=wh(a.h.servers);f=wh(a.h.advanced||{});!d&&c&&Zh(b,e);g=new WeakSet;h=u(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=$h(l),n=u(m),q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),ai(r,e,f,a.h.keySystemsMapping));t=function(B,E){var C=[];B=u(B);for(var K=B.next();!K.done;K=
B.next()){K=K.value;var F=K[E]||f.has(K.keySystem)&&f.get(K.keySystem)[E]||"",J;if(J=F=="")J=(J=K.keySystem)?!!J.match(/^com\.widevine\.alpha/):!1;J&&(E=="audioRobustness"?F=[a.h.defaultAudioRobustnessForWidevine]:E=="videoRobustness"&&(F=[a.h.defaultVideoRobustnessForWidevine]));if(typeof F==="string")C.push(K);else if(Array.isArray(F))for(F.length===0&&(F=[""]),F=u(F),J=F.next();!J.done;J=F.next()){var L={};C.push(Object.assign({},K,(L[E]=J.value,L)))}}return C};v=new WeakSet;w=u(b);for(z=w.next();!z.done;z=
w.next())y=z.value,y.video&&!v.has(y.video)&&(y.video.drmInfos=t(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=t(y.video.drmInfos,"audioRobustness"),v.add(y.video)),y.audio&&!v.has(y.audio)&&(y.audio.drmInfos=t(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=t(y.audio.drmInfos,"audioRobustness"),v.add(y.audio));return H(G,gg(b,a.P,a.O,a.h.preferredKeySystems),2)}vh(a.j);A=d||e.size>0;if(!A)return a.R=!0,G.return(Promise.resolve());D=Xh(a,b);return G.return(d?D:D.catch(function(){}))})}
function bi(a){var b;return O(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.I){c.B(2);break}return H(c,a.I,3);case 3:return vh(a.j),c.return();case 2:return va(c,4),a.I=a.l.setMediaKeys(a.C),H(c,a.I,6);case 6:xa(c,5);break;case 4:b=ya(c),a.A(new V(2,6,6003,b.message));case 5:vh(a.j),I(c)}})}function ci(a,b){return O(function(c){if(c.g==1)return H(c,bi(a),2);di(a,b.initDataType,Lb(b.initData));I(c)})}
p.Ub=function(a){var b=this,c,d;return O(function(e){if(e.g==1){if(b.l===a)return e.return();if(!b.C)return b.u.qa(a,"encrypted",function(){b.A(new V(2,6,6010))}),e.return();b.l=a;b.h.delayLicenseRequestUntilPlayed&&b.u.qa(b.l,"play",function(){for(var f=u(b.M),g=f.next();!g.done;g=f.next())ei(b,g.value);b.ea=!0;b.M=[]});b.l.remote?(b.u.o(b.l.remote,"connect",function(){return Sh(b)}),b.u.o(b.l.remote,"connecting",function(){return Sh(b)}),b.u.o(b.l.remote,"disconnect",function(){return Sh(b)})):
"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.u.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Sh(b)});b.H=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=$b().Oh(c))||!b.H&&b.g.keySystem==="com.apple.fps"&&!b.D.size?e.B(2):H(e,bi(b),2)}fi(b).catch(function(){});!d&&(b.H||b.D.size||b.h.parseInbandPsshEnabled)||b.u.o(b.l,"encrypted",function(f){return ci(b,f)});I(e)})};
function gi(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=mh([a.g.serverCertificateUri],a.h.retryParameters);va(g,3);c=a.F.Gc.request(5,b,{isPreload:a.T()});return H(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Lb(d.data);xa(g,4);break;case 3:throw e=ya(g),new V(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
va(g,6);return H(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=ya(g),new V(2,6,6004,f.message);}})}function hi(a,b){var c,d,e;return O(function(f){if(f.g==1)return H(f,ii(a,b,{initData:null,initDataType:null}),2);if(f.g!=3){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Qb=new Yg,d.push(e.Qb);d.push(c.remove());return H(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
function fi(a){var b,c,d,e,f;return O(function(g){if(g.g==1){if(!a.D.size)return g.B(2);a.D.forEach(function(h,k){ii(a,k,h)});return H(g,a.m,3)}if(g.g!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&ji(a))return g.return(a.m);a.K=!1;a.m=new Yg;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,di(a,f.initDataType,f.initData);ki(a)&&a.m.resolve();return g.return(a.m)})}
function di(a,b,c){if(c.length){try{c=a.h.initDataTransform(c,b,a.g)}catch(g){b=g;g instanceof V||(b=new V(2,6,6016,g));a.A(b);return}if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(Kb(c,e.value.initData))return;var f=!1;a.D.forEach(function(g){!f&&Kb(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;a.i.size>0&&ki(a)&&(a.m.resolve(),a.K=!1,a.m=new Yg,a.m.catch(function(){}));oi(a,b,c,a.g.sessionType)}}
function pi(a){a=a.i.keys();a=lb(a,function(b){return b.sessionId});return Array.from(a)}p.sh=function(){var a=this,b=this.i.keys();b=lb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.ue=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 qi(a){return a.J?a.J:NaN}p.yf=function(){return xh(this.aa)};
function Xh(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:c=new Map;d=ri(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new V(2,6,6020);throw new V(2,6,6001);}vh(a.j);va(l,2);d.getConfiguration();var m=e=a.h.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],r=[],t=[],v=[],w=[],z=new Set,y=new Set;si(n,q,r,v,t,w,z,y);var A=a.P?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:r[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||A,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:t[0],initData:w,keyIds:z,mediaTypes:n[0].mediaTypes};y.size>0&&(m.keySystemUris=y);n=u(n);for(y=n.next();!y.done;y=n.next())y=y.value,y.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=y.distinctiveIdentifierRequired),y.persistentStateRequired&&(m.persistentStateRequired=y.persistentStateRequired);
a.g=m;if(!a.g.licenseServerUri)throw new V(2,6,6012,a.g.keySystem);return H(l,d.createMediaKeys(),4);case 4:f=l.h;vh(a.j);a.C=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.C)){l.B(5);break}va(l,6);return H(l,a.C.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),8);case 8:g=l.h;if(g!="usable")throw new V(2,6,6018);vh(a.j);xa(l,5,2);break;case 6:h=ya(l,2);if(h instanceof V)throw h;throw new V(2,6,6019,h.message);case 5:return a.R=!0,a.G.xa(a.h.updateExpirationTime),H(l,gi(a),9);case 9:vh(a.j);
xa(l,0);break;case 2:k=ya(l);vh(a.j,k);a.g=null;if(k instanceof V)throw k;throw new V(2,6,6002,k.message);}})}
function ri(a,b,c){for(var d=u(b),e=d.next();!e.done;e=d.next()){e=u($h(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new V(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=wh(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=u(d);var g=e.next();for(f={};!g.done;f={Dj:void 0},g=e.next()){f.Dj=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&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.Dj}}(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.h.keySystemsMapping[l]&&(m=c.get(a.h.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 ti(a){ki(a)&&a.m.resolve()}function ui(a,b){(new Sf(function(){b.loaded=!0;ti(a)})).Y(vi)}
function ii(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.C.createSession("persistent-license")}catch(n){return e=new V(2,6,6005,n.message),a.A(e),m.return(Promise.reject(e))}a.u.o(d,"message",function(n){wi(a)?a.M.push(n):ei(a,n)});a.u.o(d,"keystatuseschange",function(n){return xi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Rh:Infinity,Qb:null,type:"persistent-license"};a.i.set(d,f);va(m,2);return H(m,d.load(b),4);case 4:return g=m.h,vh(a.j),g||
(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.A(new V(h,6,6013)),f.loaded=!0),ui(a,f),ti(a),m.return(d);case 2:k=ya(m),vh(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.A(new V(l,6,6005,k.message)),f.loaded=!0,ti(a);case 3:return m.return(Promise.resolve())}})}
function oi(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.A(new V(2,6,6005,f.message));return}a.u.o(e,"message",function(f){wi(a)?a.M.push(f):ei(a,f)});a.u.o(e,"keystatuseschange",function(f){return xi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Rh:Infinity,Qb:null,type:d});a.h.logLicenseExchange&&qc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.A(new V(2,6,6006,
f.message,f,h))}})}function wi(a){return a.l?a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.ea:!a.W&&a.h.delayLicenseRequestUntilPlayed}function yi(a){return O(function(b){return b.g==1?!a.K||wi(a)?b.B(0):H(b,a.m,3):H(b,Promise.all(a.V.map(function(c){return c.promise})),0)})}
function ei(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;O(function(y){switch(y.g){case 1:c=b.target;a.h.logLicenseExchange&&qc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=mh([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(a.g.keySystem==="org.w3.clearkey"){var A=g,D=a.g;try{var G=jc(A.body);if(G){var B=JSON.parse(G);B.type||(B.type=D.sessionType,A.body=lc(JSON.stringify(B)))}}catch(E){}}if(Ub(a.g.keySystem))if(A=fc(g.body,!0,!0),A.includes("PlayReadyKeyMessage")){A=ae(A,"PlayReadyKeyMessage");D=ke(A,"HttpHeader");D=u(D);for(G=D.next();!G.done;G=D.next())B=G.value,G=ke(B,"name")[0],B=ke(B,"value")[0],g.headers[ie(G)]=ie(B);A=ke(A,"Challenge")[0];g.body=rc(ie(A))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();va(y,2);m=a.F.Gc.request(2,g,{isPreload:a.T()});a.V.push(m);return H(y,m.promise,4);case 4:l=y.h;bd(a.V,m);xa(y,3);break;case 2:n=ya(y);if(a.j.g)return y.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new V(2,6,6007,n,q);a.i.size==1?(a.A(r),d&&d.Qb&&d.Qb.reject(r)):(d&&d.Qb&&d.Qb.reject(r),a.i.delete(c),ki(a)&&(a.m.resolve(),a.L.Y(.1)));return y.return();case 3:if(a.j.g)return y.return();a.J+=(Date.now()-
k)/1E3;a.h.logLicenseExchange&&qc(l.data);va(y,5);return H(y,c.update(l.data),7);case 7:xa(y,6);break;case 5:return v=(t=ya(y))&&t.message||String(t),w=new V(2,6,6008,v),a.A(w),d&&d.Qb&&d.Qb.reject(w),y.return();case 6:if(a.j.g)return y.return();z=new T("drmsessionupdate");a.F.onEvent(z);d&&(d.Qb&&d.Qb.resolve(),ui(a,d));I(y)}})}
function xi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=$b();if(Ub(a.g.keySystem)&&g.byteLength==16&&h.gg()){h=Pb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=vc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Qb&&(a.i.delete(b),Ci(b));ki(a)&&(a.m.resolve(),
a.L.Y(Di))}function Ph(a){var b=a.Z,c=a.aa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.A(new V(2,6,6014));a.F.Xf(xh(c))}
function Ei(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L;return O(function(P){if(P.g==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&
window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=u(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return P.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];
m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];r=new Map;t=$b();v=function(Q,N,M){var R,U,ra,ba,Ia,Ea,Ca,Ja,Da,Qa,za,La,Ba;return O(function(Fa){switch(Fa.g){case 1:return va(Fa,2),H(Fa,N.createMediaKeys(),5);case 5:R=Fa.h;case 4:xa(Fa,3);break;case 2:return ya(Fa),Fa.return();case 3:ra=(U=N.getConfiguration().sessionTypes)?U.includes("persistent-license"):
!1;t.vj()&&(ra=!1);ba=N.getConfiguration().videoCapabilities;Ia=N.getConfiguration().audioCapabilities;Ea={persistentState:ra,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.get(Q)?Ea=r.get(Q):r.set(Q,Ea);(Ca=ba[0].encryptionScheme)&&!Ea.encryptionSchemes.includes(Ca)&&Ea.encryptionSchemes.push(Ca);(Ja=ba[0].robustness)&&!Ea.videoRobustnessLevels.includes(Ja)&&Ea.videoRobustnessLevels.push(Ja);(Da=Ia[0].robustness)&&!Ea.audioRobustnessLevels.includes(Da)&&
Ea.audioRobustnessLevels.push(Da);if(!(M&&"getStatusForPolicy"in R)){Fa.B(0);break}Qa=u(f);za=Qa.next();case 7:if(za.done){Fa.B(0);break}La=za.value;if(Ea.minHdcpVersions.includes(La)){Fa.B(8);break}return H(Fa,R.getStatusForPolicy({minHdcpVersion:La}),10);case 10:if(Ba=Fa.h,Ba=="usable")Ea.minHdcpVersions.includes(La)||Ea.minHdcpVersions.push(La);else{Fa.B(0);break}case 8:za=Qa.next(),Fa.B(7)}})};w=function(Q,N,M,R,U){U=U===void 0?!1:U;var ra,ba,Ia,Ea,Ca,Ja,Da,Qa,za,La,Ba;return O(function(Fa){switch(Fa.g){case 1:va(Fa,
2);ra=Xd(n);ba=u(ra.videoCapabilities);for(Ia=ba.next();!Ia.done;Ia=ba.next())Ea=Ia.value,Ea.encryptionScheme=N,Ea.robustness=M;Ca=u(ra.audioCapabilities);for(Ja=Ca.next();!Ja.done;Ja=Ca.next())Da=Ja.value,Da.encryptionScheme=N,Da.robustness=R;Qa=Xd(ra);Qa.persistentState="required";Qa.sessionTypes=["persistent-license"];za=[Qa,ra];Ba=$b();return Ba.Oa()=="MOBILE"?H(Fa,Wf(5,navigator.requestMediaKeySystemAccess(Q,za)),7):H(Fa,navigator.requestMediaKeySystemAccess(Q,za),6);case 6:La=Fa.h;Fa.B(5);break;
case 7:La=Fa.h;case 5:return H(Fa,v(Q,La,U),8);case 8:xa(Fa,0);break;case 2:ya(Fa),I(Fa)}})};z=function(Q){return $b().Ja()==="WEBKIT"&&Q==="org.w3.clearkey"?!1:!0};y=[];A=u(a);for(D=A.next();!D.done;D=A.next())if(G=D.value,r.set(G,null),z(G)){B=!0;E=u(q);for(C=E.next();!C.done;C=E.next())K=C.value,y.push(w(G,K,"","",B)),B=!1;F=u(k[G]||[]);for(J=F.next();!J.done;J=F.next())L=J.value,y.push(w(G,null,L,"")),y.push(w(G,null,"",L))}return H(P,Promise.all(y),2)}return P.return(xh(r))})}
function Ci(a){return O(function(b){if(b.g==1)return va(b,2),H(b,Wf(Fi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.g!=2)return xa(b,0);ya(b);I(b)})}
function Sh(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return H(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value;var f=d.next().value;return O(function(g){if(g.g==1)return va(g,2),a.W||a.D.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?H(g,Ci(e),5):H(g,e.remove(),5);if(g.g!=2)return xa(g,0);ya(g);I(g)})})),0)})}function $h(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Qh(a){a.i.forEach(function(b,c){var d=b.Rh,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.Rh=e)})}function ki(a){a=a.i.values();return mb(a,function(b){return b.loaded})}function ji(a){for(var b=u(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.Z.get(c.value)!=="usable")return!1;return!0}
function Zh(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 si(a,b,c,d,e,f,g,h){var k=[];a=u(a);for(var l=a.next(),m={};!l.done;m={Ua:void 0},l=a.next()){m.Ua=l.value;b.includes(m.Ua.encryptionScheme)||b.push(m.Ua.encryptionScheme);m.Ua.keySystem=="org.w3.clearkey"&&m.Ua.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ua.licenseServerUri)||k.push(m.Ua.licenseServerUri):c.includes(m.Ua.licenseServerUri)||c.push(m.Ua.licenseServerUri);e.includes(m.Ua.serverCertificateUri)||e.push(m.Ua.serverCertificateUri);m.Ua.serverCertificate&&
(d.some(function(r){return function(t){return Kb(t,r.Ua.serverCertificate)}}(m))||d.push(m.Ua.serverCertificate));if(m.Ua.initData){l=u(m.Ua.initData);for(var n=l.next(),q={};!n.done;q={Hh:void 0},n=l.next())q.Hh=n.value,f.some(function(r){return function(t){var v=r.Hh;return t.keyId&&t.keyId==v.keyId?!0:t.initDataType==v.initDataType&&Kb(t.initData,v.initData)}}(q))||f.push(q.Hh)}if(m.Ua.keyIds)for(l=u(m.Ua.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ua.keySystemUris&&h)for(m=u(m.Ua.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==1)c.push(k[0]);else if(k.length>0){b=[];k=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 ai(a,b,c,d){var e=a.keySystem;if(e&&(e!="org.w3.clearkey"||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function Yh(a,b){a=wh(a);if(a.size!=0){a=zc(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 Fi=1,vi=5,Di=.5;function Gi(){this.g=Hi;this.j=(new Map).set(Hi,2).set(Ii,1);this.i=0;this.h=-1}function Ji(a,b){var c=a.g!==b;a.g=b;c&&b===Hi&&(a.i=Date.now());return c}var Ii=0,Hi=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Ki(a,b,c){this.h=a;this.i=b;this.g=c}function Li(a,b){return O(function(c){if(c.g==1)return H(c,bg(a.g,b,a.h.drm.preferredKeySystems,a.h.drm.keySystemsMapping),2);a.h.streaming.dontChooseCodecs||Yf(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes,a.h.preferredTextFormats);if(!b.variants.some(Ag))throw new V(2,4,4032);return c.return(Mi(a,b))})}
function Ni(a,b){var c=a.h.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=ag(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function Mi(a,b){var c=Ni(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.C){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())Oi(a,d.keySystem,f.value)}Pi(a,b)}return c}
function Oi(a,b,c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){for(var e=u(d.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,di(a.g,f.initDataType,f.initData);e=a.g;e.g&&e.g.mediaTypes!==d.mediaTypes&&(e.g.mediaTypes=d.mediaTypes)}}
function Pi(a,b){function c(l){if(l&&!h.has(l)&&(h.add(l),l.keyIds.size)){l=u(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=d[e?"00":m];n?Qi.includes(n)&&g.add(n):f.add(m)}}}var d=a.g?a.g.yf():{};a=Object.keys(d);var e=a.length&&a[0]=="00";a=!1;var f=new Set,g=new Set,h=new WeakSet;b=u(b.variants);for(var k=b.next();!k.done;k=b.next()){k=k.value;if(!k.allowedByApplication)a=!0;else if(k.allowedByKeySystem)return;c(k.audio);c(k.video)}a={hasAppRestrictions:a,missingKeys:Array.from(f),
restrictedKeyStatuses:Array.from(g)};throw new V(2,4,4012,a);}var Qi=["output-restricted","internal-error"];S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ri(a){if(Si.has(a))return Si.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Si.set(a,b),b):!1}function Ti(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Si=new Map;function Ui(a,b){var c=null,d=null,e=null,f=null,g=a.$();b&1&&(e=a.Vd());b&2&&(f=a.$());b&8&&(c=a.$());b&16&&(d=a.$());return{trackId:g,qe:c,re:d,wk:e,Kj:f}}function Vi(a,b){return b==1?(b=a.$(),a=a.$(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.$()}}function Wi(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.$();a.skip(4);a=a.Ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function Xi(a,b,c){var d=a.$(),e=[],f=null;c&1&&(f=a.Wh());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={di:null,sampleSize:null,hg:null};c&256&&(h.di=a.$());c&512&&(h.sampleSize=a.$());c&1024&&a.skip(4);c&2048&&(h.hg=b==0?a.$():a.Wh());e.push(h)}return{Wn:d,ci:e,Yg:f}}function Yi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Ia();a.skip(2);a.skip(2);a.skip(2);a=a.Ia()+a.Ia()/65536;return{channelCount:b,sampleRate:a}}function Zi(a){a=a.$();return{codec:Fh(a)}}
function $i(a){var b=null,c=null,d=a.bc(4,!1);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if(e==="nclx"){switch(a.Ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Ia();a.Ia();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,Se:c}}
function aj(a,b){b=b===void 0?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function bj(a){return(a<10?"0":"")+a};function cj(a){this.g=a}
function dj(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=ej;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;g.type=="audio"&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(fj+1));m=Math.floor(m%(fj+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(gj(h,4)),[0,0,0,0],x(gj(n,4)),x(gj(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(gj(k,2)),[0,0],x(gj(l,
2)),[0,0]));h=ej("tkhd",h);k=ej;n=g.duration*g.timescale;l=Math.floor(n/(fj+1));n=Math.floor(n%(fj+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(gj(g.timescale,4)),x(gj(l,4)),x(gj(n,4)),x(gj(m,2)),[0,0]));l=ej("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=hj.value();break;case "audio":m=ij.value()}n=ej("hdlr",m);a:{switch(g.type){case "video":g=ej("minf",ej("vmhd",jj.value()),
kj.value(),lj(g));break a;case "audio":g=ej("minf",ej("smhd",mj.value()),kj.value(),lj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=wc.apply(oc,x(b));f=a.g[0];c=ej;d=f.duration*f.timescale;e=Math.floor(d/(fj+1));d=Math.floor(d%(fj+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(gj(f.timescale,4)),x(gj(e,4)),x(gj(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=ej("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(gj(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=ej("trex",k),h.call(g,k);a=wc.apply(oc,x(d));a=ej("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=wc.apply(oc,x(d))}else f=new Uint8Array([]);
a=c("moov",e,b,a,f);b=nj.value();c=new Uint8Array(b.byteLength+a.byteLength);c.set(b);c.set(a,b.byteLength);return c}
function lj(a){var b=ej,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=$b().Le()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(a.Ya.byteLength>0)var e=ej("avcC",a.Ya);else{e=ej;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Gb.length;n++){var q=oj(a.Gb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
f+=q.length+2}}g.length>0&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(gj(c,2)),x(gj(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=pj(a);g=new Uint8Array([]);a.encrypted&&(g=qj(a.stream,a.codecs),d="encv");d=ej(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),a.Ya.byteLength>0&&(c=ej("hvcC",a.Ya)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(gj(d,2)),x(gj(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=pj(a),g=new Uint8Array([]),a.encrypted&&(g=qj(a.stream,a.codecs),e="encv"),d=ej(e,d,c,h,g));break;case "audio":if(c=="mp3")a=ej(".mp3",rj(a));else if(c=="ac-3")c=ej("dac3",a.Ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=qj(a.stream,a.codecs),d="enca"),a=ej(d,rj(a),c,e);else if(c=="ec-3")c=ej("dec3",a.Ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=qj(a.stream,a.codecs),d="enca"),
a=ej(d,rj(a),c,e);else if(c=="opus")c=ej("dOps",a.Ma),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=qj(a.stream,a.codecs),d="enca"),a=ej(d,rj(a),c,e);else{if(a.Ma.byteLength>0)c=ej("esds",a.Ma);else{c=ej;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Ac("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if(k==="mp4a.40.5"||k==="mp4a.40.29")h=l[g*2];g=parseInt(k.split(".").pop(),10);d=
new Uint8Array([0,0,0,0,3,25].concat(x(gj(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=qj(a.stream,a.codecs),d="enca");a=ej(d,rj(a),c,e)}d=a}a=ej("stsd",sj.value(),d);return b("stbl",a,ej("stts",tj.value()),ej("stsc",uj.value()),ej("stsz",vj.value()),ej("stco",wj.value()))}
function pj(a){if(!a.fb&&!a.gb)return new Uint8Array([]);var b=a.gb;a=new Uint8Array([].concat(x(gj(a.fb,4)),x(gj(b,4))));return ej("pasp",a)}function rj(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(gj(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function qj(a,b){var c=ej;b=new Uint8Array([].concat(x(gj(xj(b.split(".")[0]),4))));b=ej("frma",b);var d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(gj(xj(d),4)),[0,1,0,0]));d=ej("schm",d);e=ej;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.drmInfos);for(var g=a.next();!g.done;g=a.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=oj(h.value)}a=new Uint8Array([0,0,0,0,
0,0,1,8]);f=ej("tenc",a,f);return c("sinf",b,d,e("schi",f))}
function yj(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=ej;var g=new Uint8Array([0,0,0,0].concat(x(gj(c.data?c.data.sequenceNumber:0,4))));g=ej("mfhd",g);var h;var k=c.data?c.data.Eb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.rb<<4|m.ub<<2|m.sb}k=ej("sdtp",l);var n=k.length+32+20+8+16+8+8;l=ej;h=new Uint8Array([0,0,0,58].concat(x(gj(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=ej("tfhd",h);m=c.data?
c.data.baseMediaDecodeTime:0;var q=Math.floor(m%(fj+1));m=new Uint8Array([1,0,0,0].concat(x(gj(Math.floor(m/(fj+1)),4)),x(gj(q,4))));m=ej("tfdt",m);var r=n;n=c.data?c.data.Eb:[];q=n.length;var t=12+16*q,v=new Uint8Array(t);r+=8+t;v.set([c.type==="video"?1:0,0,15,1].concat(x(gj(q,4)),x(gj(r,4))),0);for(r=0;r<q;r++){var w=n[r];t=gj(w.duration,4);var z=gj(w.size,4),y=w.flags;w=gj(w.Ab,4);v.set([].concat(x(t),x(z),[y.Cb<<2|y.rb,y.ub<<6|y.sb<<4|y.Db,y.qb&61440,y.qb&15],x(w)),12+16*r)}n=ej("trun",v);k=
l("traf",h,m,n,k);f=f("moof",g,k);e.call(d,b,[f,zj(c)])}return wc.apply(oc,x(b))}function zj(a){a=(a.data?a.data.Eb:[]).map(function(b){return b.data});a=wc.apply(oc,x(a));return ej("mdat",a)}function gj(a,b){var c=[];for(--b;b>=0;b--)c.push(a>>8*b&255);return c}function oj(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[c*2]+a[c*2+1]),16);return b}function xj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function ej(a){var b=Ra.apply(1,arguments),c=Aj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Aj.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
var fj=4294967295,Aj=new Map,hj=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])}),ij=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),tj=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),uj=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),wj=new Qb(function(){return new Uint8Array([0,
0,0,0,0,0,0,0])}),vj=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),jj=new Qb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),mj=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),sj=new Qb(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),nj=new Qb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return ej("ftyp",a,c,a,b)}),kj=new Qb(function(){var a=new Uint8Array([0,0,0,0,0,0,0,1,0,
0,0,12,117,114,108,32,0,0,0,1]);a=ej("dref",a);return ej("dinf",a)});function Bj(a){a=Lb(a);var b=null;(new Bh).box("moov",Gh).box("trak",Gh).box("mdia",Gh).box("minf",Gh).box("stbl",Gh).X("stsd",Ih).box("enca",function(c){b=c.reader.h;return Kh(c)}).box("sinf",Gh).box("frma",function(c){c.parser.stop();Zi(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function Cj(a,b,c){function d(r){n.push({box:r,xj:1701733217})}function e(r){n.push({box:r,xj:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);Gh(r)}var h=b=Lb(b),k=!1,l,m=[],n=[];(new Bh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).X("stsd",function(r){l=r;m.push(r);Ih(r)}).X("encv",f).X("enca",f).X("dvav",e).X("dva1",e).X("dvh1",e).X("dvhe",e).X("dvc1",e).X("dvi1",e).X("hev1",e).X("hvc1",e).X("avc1",e).X("avc3",e).X("ac-3",d).X("ec-3",d).X("ac-4",
d).X("Opus",d).X("fLaC",d).X("mp4a",d).parse(b);if(k)return b;if(n.length==0||!l)throw ib(vc(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=Dj(a,h,l,q.box,m,q.xj);return $b().$h()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function Ej(a){a=Lb(a);var b=[];(new Bh).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(Fj(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return wc.apply(oc,x(c))}
function Fj(a){function b(n){g.push(n);Gh(n)}var c,d,e,f,g=[];(new Bh).box("moof",b).box("traf",b).X("tfhd",function(n){c=n;e=Ui(n.reader,n.flags)}).X("trun",function(n){d=n;f=Xi(n.reader,n.version,n.flags)}).parse(a);if(e&&e.Kj!==2){var h=c.start+Hh(c)+4+(e.wk!==null?8:0),k=Pb(a);if(e.Kj!==null)k.setUint32(h,2);else{Gj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&f.Yg!==null&&k.setInt32(d.start+Hh(d)+4,f.Yg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;m>=0;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=u(g);for(k=h.next();!k.done;k=h.next())k=k.value,Gj(a,k.start,k.size+4)}}return a}
function Dj(a,b,c,d,e,f){var g=qj(a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Pb(a).setUint32(4,f);a.set(g,d.size);Gj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=$b().Gf()?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,Gj(f,e.start,e.size+a.byteLength);a=Pb(f,c.start);c=Hh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function Gj(a,b,c){a=Pb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function Hj(a){function b(e){d.push({start:e.start,size:e.size});Gh(e)}var c=Lb(a),d=[];(new Bh).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=Pb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);h==1633889587?f.setUint32(g,1700998451):h==1684103987&&f.setUint32(g,1684366131)}}).parse(c);return c};function Ij(a,b,c,d,e,f,g,h){this.S=a;this.startByte=b;this.endByte=c;this.Pd=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}Ij.prototype.Uc=function(){return this.startByte};Ij.prototype.Sc=function(){return this.endByte};Ij.prototype.Ne=function(a){this.h=a};Ij.prototype.jc=function(){return this.h};
function Jj(a,b){return a===b?!0:a&&b?a.Uc()==b.Uc()&&a.Sc()==b.Sc()&&dd(a.S().sort(),b.S().sort())&&Kb(a.jc(),b.jc()):a==b}S("shaka.media.InitSegmentReference",Ij);Ij.prototype.getEndByte=Ij.prototype.Sc;Ij.prototype.getStartByte=Ij.prototype.Uc;
function Kj(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v){l=l===void 0?[]:l;r=r===void 0?Lj:r;this.startTime=a;this.j=this.endTime=b;this.D=c;this.startByte=d;this.endByte=e;this.ka=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.h=q===void 0?null:q;this.status=r;this.preload=!1;this.l=!0;this.u=!1;this.aesKey=t===void 0?null:t;this.thumbnailSprite=null;this.i=-1;this.m=v===void 0?!1:v;this.Ce=this.od=!1;a=u(this.g);
for(b=a.next();!b.done;b=a.next())b.value.tj();this.m&&this.g.length&&this.g[this.g.length-1].sj();this.A=this.bandwidth=this.mimeType=this.codecs=null;this.F=!1}p=Kj.prototype;p.S=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.Sk=function(){return this.endTime};p.Uc=function(){return this.startByte};p.Sc=function(){return this.endByte};
function Mj(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.m)for(a=u(a.g),a=a.next();!a.done;a=a.next()){Mj(a.value);break}return null}p.xl=function(){return this.tilesLayout};p.wl=function(){return this.C};p.Vc=function(){return this.status};p.Sl=function(){this.status=Nj};p.Nh=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.Od=function(){this.l=!1};p.Il=function(){return this.l};
p.tj=function(){this.od=!0};p.Kl=function(){return this.od};p.sj=function(){this.Ce=!0};p.Jl=function(){return this.Ce};p.rj=function(){this.u=!0};p.Fl=function(){return this.u};p.og=function(a){this.thumbnailSprite=a};p.vl=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.wi=function(a){this.h==null?cb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.Ne=function(a,b){this.A=a;this.F=b===void 0?!1:b};p.jc=function(a){var b=this.A;(a===void 0||a)&&this.F&&(this.A=null);return b};function Oj(a,b){a.ka=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())Oj(c.value,b)}S("shaka.media.SegmentReference",Kj);Kj.prototype.getSegmentData=Kj.prototype.jc;Kj.prototype.setSegmentData=Kj.prototype.Ne;Kj.prototype.syncAgainst=Kj.prototype.wi;
Kj.prototype.offset=Kj.prototype.offset;Kj.prototype.getThumbnailSprite=Kj.prototype.vl;Kj.prototype.setThumbnailSprite=Kj.prototype.og;Kj.prototype.hasByterangeOptimization=Kj.prototype.Fl;Kj.prototype.markAsByterangeOptimization=Kj.prototype.rj;Kj.prototype.isLastPartial=Kj.prototype.Jl;Kj.prototype.markAsLastPartial=Kj.prototype.sj;Kj.prototype.isPartial=Kj.prototype.Kl;Kj.prototype.markAsPartial=Kj.prototype.tj;Kj.prototype.isIndependent=Kj.prototype.Il;Kj.prototype.markAsNonIndependent=Kj.prototype.Od;
Kj.prototype.isPreload=Kj.prototype.isPreload;Kj.prototype.markAsPreload=Kj.prototype.Nh;Kj.prototype.markAsUnavailable=Kj.prototype.Sl;Kj.prototype.getStatus=Kj.prototype.Vc;Kj.prototype.getTileDuration=Kj.prototype.wl;Kj.prototype.getTilesLayout=Kj.prototype.xl;Kj.prototype.getEndByte=Kj.prototype.Sc;Kj.prototype.getStartByte=Kj.prototype.Uc;Kj.prototype.getEndTime=Kj.prototype.Sk;Kj.prototype.getStartTime=Kj.prototype.getStartTime;Kj.prototype.getUris=Kj.prototype.S;var Lj=0,Nj=1;
Kj.Status={Jm:Lj,Pn:Nj,nn:2};function Pj(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Qj(a){return!a||Pj(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Rj(a){return!a||Pj(a)?null:a.length?a.end(a.length-1):null}function Sj(a,b){return!a||!a.length||Pj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Tj(a,b){if(!a||!a.length||Pj(a))return 0;var c=0;a=u(Uj(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 Vj(a,b,c){if(!a||!a.length||Pj(a))return null;a=Uj(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function Uj(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 Wj(){}function W(a){return document.createElement(a)}function Xj(a){return document.createElementNS("http://www.w3.org/2000/svg",a)}function Yj(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Zj(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function ak(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}
function bk(a){a=a.getElementsByClassName("shaka-overflow-quality-mark");return a.length?a[0]:null}function ck(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function yd(){if(dk)return dk;ek||(ek=new Sf(function(){dk=null}));(dk=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dk=document.createElement("video"));ek.Y(1);return dk}
function fk(a,b){var c,d,e,f,g;return O(function(h){if(h.g==1)return"fonts"in document&&"FontFace"in window?H(h,document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=u(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);I(h)})}
S("shaka.util.Dom",Wj);Wj.removeAllChildren=ck;Wj.clearSourceFromVideo=ak;var ek=null,dk=null;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function gk(){}function hk(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function ik(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function jk(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 kk(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=ec(Lb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=ec(Lb(a.data,3+c,f)),h;d==="--\x3e"?h=ec(Lb(a.data,4+c+f)):h=Mb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==
3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=ec(Lb(a.data,1,d));a=ec(Lb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=ec(Lb(a.data,1,d));a=ec(Lb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=ec(Lb(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Mb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=ec(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=ec(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Mb(a.data),b):null}
function lk(a){for(var b=0,c=[];hk(a,b);){var d=jk(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=jk(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=kk(e))&&c.push(f);b+=e.size+10}ik(a,b)&&(b+=10)}return c}function mk(a,b){for(var c=b=b===void 0?0:b,d=0;hk(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=jk(a,b+6),ik(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",gk);gk.getID3Data=mk;
gk.getID3Frames=lk;function nk(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 ok(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=Lb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function pk(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);d!==0&&(c.set(a.j.subarray(b,b+d)),a.h=(new yh(c,0)).$(),a.g=d*8,a.i-=d)}function qk(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;pk(a)}a.h<<=b;a.g-=b}
function rk(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&pk(a);c=b-c;return c>0?d<<c|rk(a,c):d}function sk(a){var b;for(b=0;b<a.g;++b)if((a.h&2147483648>>>b)!==0)return a.h<<=b,a.g-=b,b;pk(a);return b+sk(a)}function tk(a){qk(a,1+sk(a))}function uk(a){var b=sk(a);return rk(a,b+1)-1}function vk(a){a=uk(a);return 1&a?1+a>>>1:-1*(a>>>1)}function wk(a){return rk(a,1)===1}function xk(a){return rk(a,8)}
function yk(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=vk(a),d=(c+d+256)%256),c=d===0?c:d}function zk(a){xk(a);uk(a);return uk(a)}S("shaka.util.ExpGolomb",ok);function Ak(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.D=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.C=this.H=this.u=this.A=null}p=Ak.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.lg=function(a){this.C!=null&&this.C!=a&&(this.u=this.A=null);this.C=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Bk(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ef:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(m>0)for(var n=h+5,q=m;q>2;){var r=f[n+1]+2;switch(f[n]){case 5:var t=f.subarray(n+2,n+r);t=hc.value()(t);g.audio==-1&&t==="Opus"?(g.audio=l,g.audioCodec="opus"):g.video==-1&&t==="AV01"&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 127:g.audioCodec==
"opus"&&(t=null,f[n+2]===128&&(t=f[n+3]),t!=null&&(this.H={channelCount:(t&15)===0?2:t&15,xk:t,sampleRate:48E3}))}n+=r;q-=r}break;case 15:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.Ef==-1&&(g.Ef=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec=
"ac3");break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.K=f.video,this.m=f.videoCodec);f.audio!=-1&&(this.F=f.audio,this.D=f.audioCodec);f.Ef!=-1&&(this.G=f.Ef);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.F:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
function Ck(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.A==null&&(a.A=e);c.pts=Dk(e,a.A);a.A=c.pts;c.dts=c.pts;d&64&&(d=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.u==null&&(a.u=d),c.dts=c.pts!=
e?Dk(d,a.u):d);a.u=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Zl=function(a){kd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Th(a,{Fe:null,state:null})};
p.Th=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.m=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;f==-1&&(l=0,m=this.m=="hvc"?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(f===1)f=n?0:2;else if(n)if(n==1){n=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Fe)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
g)),n>0&&(n=a.subarray(0,n),f.data=wc(f.data,n),f.fullData=wc(f.fullData,n),f.state=0);h<d?(m=this.m=="hvc"?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Fe&&(c=k.length?k[k.length-1]:b.Fe)&&(c.data=wc(c.data,a),c.fullData=wc(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=wc.apply(oc,x(c.value)),(c=Ck(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:lk(c.data),dts:c.dts,pts:c.pts});return a};
p.Bb=function(){if(this.i.length&&!this.h.length)for(var a=u(this.i),b=a.next();!b.done;b=a.next()){var c=wc.apply(oc,x(b.value)),d=Ck(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=wc(b.data,c),this.h.push(b))}return this.h};
p.Kd=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=u(this.j),c=b.next();!c.done;c=b.next()){var d=wc.apply(oc,x(c.value)),e=Ck(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&e.pts!=null&&e.dts!=null&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=wc(c.data,d),this.g.push(c))}if(a){b={Fe:null,state:null};c=[];d=u(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Th(e,b),e.nalus.length&&(c.push(e),
b.Fe=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.Bb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Kd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.se=function(){return{audio:this.D,video:this.m}};p.Df=function(){for(var a=[],b=u(this.Kd()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};
p.Cl=function(){kd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ch();return{height:a.height,width:a.width}};p.Ch=function(){return this.m=="hvc"?Ek(this):Fk(this)};function Gk(a){var b=a.Kd();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function Fk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Df();if(!c.length)return b;c=c.find(function(r){return r.type==7});if(!c)return b;c=new ok(c.data);var d=xk(c),e=xk(c),f=xk(c);tk(c);if(Hk.includes(d)){var g=uk(c);g===3&&qk(c,1);tk(c);tk(c);qk(c,1);if(wk(c)){g=g!==3?8:12;for(var h=0;h<g;h++)wk(c)&&(h<6?yk(c,16):yk(c,64))}}tk(c);g=uk(c);if(g===0)uk(c);else if(g===1)for(qk(c,1),tk(c),tk(c),g=uk(c),h=0;h<g;h++)tk(c);tk(c);qk(c,1);g=uk(c);h=uk(c);var k=rk(c,1);k===0&&qk(c,1);
qk(c,1);var l=0,m=0,n=0,q=0;wk(c)&&(l=uk(c),m=uk(c),n=uk(c),q=uk(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Gk(a);return b}
function Ek(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Df();if(!c.length)return b;c=c.find(function(G){return G.type==33});if(!c)return b;var d=new ok(c.fullData,!0);xk(d);xk(d);rk(d,4);var e=rk(d,3);wk(d);var f=rk(d,2),g=rk(d,1),h=rk(d,5),k=rk(d,32);c=xk(d);for(var l=xk(d),m=xk(d),n=xk(d),q=xk(d),r=xk(d),t=xk(d),v=[],w=[],z=0;z<e;z++)v.push(wk(d)),w.push(wk(d));if(e>0)for(z=e;z<8;z++)rk(d,2);for(z=0;z<e;z++)v[z]&&rk(d,88),w[z]&&xk(d);uk(d);e=uk(d);e==3&&rk(d,1);v=uk(d);w=uk(d);
var y=z=0,A=0,D=0;wk(d)&&(z+=uk(d),y+=uk(d),A+=uk(d),D+=uk(d));b.width=String(v-(z+y)*(e===1||e===2?2:1));b.height=String(w-(A+D)*(e===1?2:1));d=function(G){for(var B=0,E=0;E<32;E++)B|=(G>>E&1)<<31-E;return B>>>0}(k);g=g==1?"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=Gk(a);return b}function Dk(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function Ik(a){return Bk(a)<0?!1:!0}function Bk(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;c++}return-1}S("shaka.util.TsParser",Ak);Ak.syncOffset=Bk;Ak.probe=Ik;Ak.prototype.getVideoInfo=Ak.prototype.Ch;Ak.prototype.getVideoResolution=Ak.prototype.Cl;
Ak.prototype.getVideoNalus=Ak.prototype.Df;Ak.prototype.getCodecs=Ak.prototype.se;Ak.prototype.getStartTime=Ak.prototype.getStartTime;Ak.prototype.getVideoData=Ak.prototype.Kd;Ak.prototype.getAudioData=Ak.prototype.Bb;Ak.prototype.getMetadata=Ak.prototype.getMetadata;Ak.prototype.parseNalus=Ak.prototype.Th;Ak.prototype.parseAvcNalus=Ak.prototype.Zl;Ak.prototype.parse=Ak.prototype.parse;Ak.prototype.setDiscontinuitySequence=Ak.prototype.lg;Ak.prototype.clearData=Ak.prototype.clearData;
Ak.Timescale=9E4;var Hk=[100,110,122,244,44,83,86,118,128,138,139,134];function Jk(a,b,c,d,e){var f=this;this.g=a;this.O=c;this.C=d;this.Z=b;this.l=new Map;this.G=new Map;this.La=new Map;this.h=null;this.Fa=!1;this.D=e||null;this.u=new Map;this.A=new ed;this.j=new Map;this.K=null;this.L=new Yg;this.ya="";this.kb=!1;this.ua=!0;this.M=!1;this.F=this.P=null;this.i=Kk(this,this.L);this.Na=this.H=!1;this.I=new uh(function(){return Lk(f)});this.J=!1;this.V="UNKNOWN";this.$a=this.jb=!1;this.hb=new Yg;this.m=!1;this.sa=null;this.W=new Map;this.ea=this.R=this.oa=this.T=null;
this.aa=new Yg;this.g.remote&&(this.M=this.g.remote.state!="disconnected",this.A.o(this.g.remote,"connect",function(){f.M=f.g.remote.state!="disconnected"}),this.A.o(this.g.remote,"connecting",function(){f.M=f.g.remote.state!="disconnected"}),this.A.o(this.g.remote,"disconnect",function(){f.M=f.g.remote.state!="disconnected"}))}
function Kk(a,b){a.ua=!0;if(window.ManagedMediaSource){a.F||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.A.o(c,"startstreaming",function(){a.ua=!0});a.A.o(c,"endstreaming",function(){a.ua=!1})}else c=new MediaSource;a.A.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.ya);b.resolve()});a.A.qa(a.g,"playing",function(){a.kb=!0});a.ya=Mk(c);a.C.useSourceElements?(a.g.removeAttribute("src"),a.P&&a.g.removeChild(a.P),a.F&&a.g.removeChild(a.F),a.P=Zj(a.ya),a.g.appendChild(a.P),a.F&&a.g.appendChild(a.F),
a.g.load()):a.g.src=a.ya;return c}function Nk(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.C.useSourceElements&&(a.F&&a.g.removeChild(a.F),a.F=Zj(b,c),a.g.appendChild(a.F),a.g.disableRemotePlayback=!1)}
function Ok(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(uf)),b=
{};$b();a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Jf(c))b[c]=!0;else if(xd()){var d=Cf(c),e=ng(Df(c),d);d=tf(d,e);b[c]=Ri(d)||(nf(d)?!0:!1)}else b[c]=yd().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=Jk.prototype;p.destroy=function(){return this.I.destroy()};
function Lk(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,v;return O(function(w){if(w.g==1){b=[];c=u(a.u);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.u.set(l,h.slice(0,1)),k&&b.push(k.p.catch(Uf)),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 H(w,Promise.all(b),2)}r=u(a.j.values());for(t=r.next();!t.done;t=r.next())v=t.value,v.destroy();a.A&&(a.A.release(),a.A=null);a.g&&a.F&&
a.g.removeChild(a.F);a.g&&a.P&&(a.g.removeChild(a.P),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.P=null;a.F=null;a.C=null;a.i=null;a.h=null;a.Z=null;a.l.clear();a.La.clear();a.j.clear();a.K=null;a.u.clear();a.D=null;a.W.clear();a.O=null;I(w)})}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return O(function(n){if(n.g==1)return f=Hc,H(n,e.L,2);if(n.g!=3){if(!Pk(e)&&!Qk(e))return n.B(3);cb("Expected MediaSource to be open during init(); reopening the media source.");e.L=new Yg;e.i=Kk(e,e.L);return H(n,e.L,3)}e.J=b;e.V=c;e.jb=d;e.$a=!e.J&&e.V=="HLS"&&!e.jb;e.W.clear();e.T=null;e.oa=null;e.R=null;e.ea=null;e.aa=new Yg;g=u(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),
Rk(e,k,l,l.codecs),e.m?(e.u.set(f.ia,[]),e.u.set(f.Ga,[])):e.u.set(k,[]);(m=a.get(f.ia))&&m.isAudioMuxedInVideo&&(e.m=!0);I(n)})};
function Rk(a,b,c,d){b=="audio"&&d&&(d=ng(d,c.mimeType));var e=tf(c.mimeType,d);if(b==Ec)Sk(a,e,a.J,c.external);else{var f=a.C.forceTransmux;if(!Ri(e)||!a.J&&uf.includes(e))f=!0;var g=vf(c.mimeType,d);if(f){f=Cc("audio",(d||"").split(","));d=Cc("video",(d||"").split(","));if(f&&d){a.m=!0;Rk(a,"audio",c,f);Rk(a,"video",c,d);return}if(d=nf(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.C.addExtraFeaturesToSourceBuffer(e);vh(a.I);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.J&&(h.mode=Tk);a.A.o(h,"error",function(){var k=a.u.get(b)[0];k.p.reject(new V(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.A.o(h,"updateend",function(){return Xk(a,b)});a.l.set(b,h);a.G.set(b,e);a.La.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.C=a;this.h&&(this.h.C=a.modifyCueCallback)};function Yk(a){return a.ua&&!a.M&&!a.H}
function Sk(a,b,c,d){a.h||(a.h=new Ff(a.Z),a.h&&(a.h.C=a.C.modifyCueCallback));var e=a.h;d=d||a.Fa;a=a.V;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=Hf.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):kd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):kd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.D=d)}
function Pk(a){return a.H?!1:a.i?a.i.readyState=="ended":!0}function Qk(a){return a.H?!1:a.i?a.i.readyState=="closed":!0}function Zk(a,b){return a.l.size?b==Ec?a.h.g:Qj($k(a,b)):null}function al(a,b){return a.l.size?b==Ec?a.h.h:Rj($k(a,b)):null}function bl(a,b,c){if(b==Ec)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=$k(a,b);return Tj(a,c)}
p.Rc=function(){var a={total:this.H?[]:Uj(this.g.buffered),audio:Uj($k(this,"audio")),video:Uj($k(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function $k(a,b){if(a.H||a.M||Qk(a))return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function cl(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=Lb(c);if(uf.includes(f))c=lk(l),c.length&&d&&((g=c.find(function(t){return t.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.O.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.ka){l=new Bh;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.C.dispatchAllEmsgBoxes;m&&l.X("emsg",
function(t){var v=e.emsgSchemeIdUris;if(t.version===0){var w=t.reader.pd();var z=t.reader.pd();var y=t.reader.$();var A=t.reader.$();var D=t.reader.$();var G=t.reader.$();var B=d.startTime+A/y}else y=t.reader.$(),B=t.reader.Vd()/y+d.timestampOffset,A=B-d.startTime,D=t.reader.$(),G=t.reader.$(),w=t.reader.pd(),z=t.reader.pd();t=t.reader.bc(t.reader.getLength()-t.reader.Wa(),!0);if(v&&v.includes(w)||a.C.dispatchAllEmsgBoxes)if(w=="urn:mpeg:dash:event:2012")a.O.Yl();else if(v=B+D/y,a.O.Wl({startTime:B,
endTime:v,schemeIdUri:w,value:z,timescale:y,presentationTimeDelta:A,eventDuration:D,id:G,messageData:t}),w=="https://aomedia.org/emsg/ID3"||w=="https://developer.apple.com/streaming/emsg-id3")if(y=lk(t),y.length)a.O.onMetadata([{cueTime:B,data:t,frames:y,dts:B,pts:B}],0,v)});var n=d.ka.timescale;b=n&&!isNaN(n);var q=0,r=!1;b&&l.X("prft",function(t){var v=t.reader,w=t.version;v.$();t=v.$();var z=v.$();t=t*1E3+z/4294967296*1E3;w===0?v=v.$():(w=v.$(),v=v.$(),v=w*4294967296+v);t=nk(t);v=(new Map).set("detail",
{wallClockTime:t,programStartDate:new Date(t-v/n*1E3)});v=new T("prft",v);a.O.onEvent(v)}).box("moof",Gh).box("traf",Gh).X("tfdt",function(t){r||(q=Vi(t.reader,t.version).baseMediaDecodeTime/n,r=!0,m||t.parser.stop())});(m||b)&&l.parse(c,!1,g);r&&d.timestampOffset==0&&(h=q)}else f.includes("/mp4")||f.includes("/webm")||!Ik(l)||(a.W.has(b)||a.W.set(b,new Ak),k=a.W.get(b),k.clearData(),k.lg(d.i),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function dl(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N;return O(function(M){switch(M.g){case 1:n=Hc;if(b!=n.Va){M.B(2);break}if(a.V!="HLS"){M.B(3);break}return H(M,a.hb,4);case 4:q=M.h,a.h.A=q;case 3:return H(M,Kf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null),5);case 5:return M.return();case 2:if(l||!a.m){M.B(6);break}return H(M,dl(a,n.ia,c,d,e,f,g,h,k,!0),7);case 7:return H(M,dl(a,n.Ga,
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.G.get(b);a.j.has(b)&&(t=a.j.get(b).getOriginalMimeType());if(d&&(v=cl(a,b,c,d,e,t,k),w=v.timestamp,z=v.metadata,w!=null&&(a.T==null&&b==n.Ga&&(a.T=w,a.oa=d.startTime,a.R!=null&&(y=0,a.oa==a.ea&&(y=a.T-a.R),a.aa.resolve(y))),a.R==null&&b==n.ia&&(a.R=w,a.ea=d.startTime,a.T!=null&&(A=0,a.oa==a.ea&&(A=a.T-a.R),a.aa.resolve(A))),D=w,G=uf,!a.J&&G.includes(a.G.get(b))&&(D=0),B=d.startTime-
D,E=Math.abs(r-B),(E>=.001||g||h)&&(!k||B>0||!r)&&(r=B,a.$a&&(el(a,b,function(){return fl(a,b)},null),el(a,b,function(){return gl(a,b,r)},null))),(C=b==n.Ga||!a.l.has(n.Ga))&&a.hb.resolve(r)),z.length))a.O.onMetadata(z,r,d?d.endTime:null);f&&b==n.Ga&&(a.h||Sk(a,"application/cea-608",a.J,!1),a.K||(K=t.split(";",1)[0],a.K=new Dd(K)),d?(F=a.K.Yf(c),F.length&&Qf(a.h,F,r)):a.K.init(c,h,m));if(!a.j.has(b)){M.B(9);break}return H(M,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:J=M.h,ArrayBuffer.isView(J)?
c=J:(L=J,L.init!=null&&(P=L.init,el(a,b,function(){a.D&&pd(a.D,P,r,e);a.l.get(b).appendBuffer(P)},d?d.S()[0]:null)),c=L.data);case 9:c=hl(a,e,c,d,b);if(!d||!a.J||b==n.Va){M.B(11);break}if(!g&&!h){M.B(11);break}Q=d.startTime;if(a.V!="HLS"||a.m||b!=n.ia||!a.l.has(n.Ga)){M.B(13);break}return H(M,a.aa,14);case 14:N=M.h,Math.abs(N)>.15&&(Q-=N);case 13:el(a,b,function(){return fl(a,b)},null),el(a,b,function(){return gl(a,b,Q)},null);case 11:return H(M,el(a,b,function(){var R=c;a.D&&pd(a.D,R,r,e);a.l.get(b).appendBuffer(R)},
d?d.S()[0]:null),15);case 15:I(M)}})}function il(a,b){var c=al(a,"video")||0;Of(a.h,b,c)}function jl(a){a.h&&Of(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return O(function(h){return h.g==1?(f=Hc,a==f.Ga&&e.K&&(e.K.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Va?H(h,e.h.remove(b,c),0):c>b?H(h,el(e,a,function(){return kl(e,a,b,c)},null),5):h.B(0)):e.m?H(h,el(e,f.ia,function(){return kl(e,f.ia,b,c)},null),0):h.B(0)})};
function ll(a,b){var c;return O(function(d){return d.g==1?(c=Hc,b==c.Va?a.h?H(d,a.h.remove(0,Infinity),0):d.return():b===c.Ga&&a.K&&a.h?H(d,a.h.remove(0,Infinity,!0),4):d.B(4)):d.g!=6?H(d,el(a,b,function(){return kl(a,b,0,a.i.duration)},null),6):a.m?H(d,el(a,c.ia,function(){return kl(a,c.ia,0,a.i.duration)},null),0):d.B(0)})}
p.flush=function(a){var b=this,c;return O(function(d){return d.g==1?(c=Hc,a==c.Va?d.return():H(d,el(b,a,function(){b.g.currentTime-=.001;Xk(b,a)},null),2)):b.m?H(d,el(b,c.ia,function(){var e=c.ia;b.g.currentTime-=.001;Xk(b,e)},null),0):d.B(0)})};
function ml(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(q){if(q.g==1){l=Hc;if(b==l.Va)return f||(a.h.A=c),Nf(a.h,d,e),q.return();m=[];return H(q,nl(a,b,g,h,k),2)}n=q.h;n||(m.push(el(a,b,function(){return fl(a,b)},null)),a.m&&m.push(el(a,l.ia,function(){return fl(a,l.ia)},null)));f||(m.push(el(a,b,function(){return gl(a,b,c)},null)),a.m&&m.push(el(a,l.ia,function(){return gl(a,l.ia,c)},null)));if(d!=0||e!=Infinity)m.push(el(a,b,function(){return ol(a,b,d,e)},null)),a.m&&m.push(el(a,l.ia,function(){return ol(a,
l.ia,d,e)},null));return m.length?H(q,Promise.all(m),0):q.B(0)})}function pl(a,b,c){var d,e;return O(function(f){if(f.g==1){d=Hc;if(b==d.Va)return f.return();b==d.Ga&&(a.hb=new Yg);if(!a.J||(e=al(a,b))&&Math.abs(e-c)<.15)return f.return();el(a,b,function(){return fl(a,b)},null);a.m&&el(a,d.ia,function(){return fl(a,d.ia)},null);return H(f,el(a,b,function(){return gl(a,b,c)},null),2)}return a.m?H(f,el(a,d.ia,function(){return gl(a,d.ia,c)},null),0):f.B(0)})}
p.endOfStream=function(a){var b=this;return O(function(c){return H(c,ql(b,function(){Pk(b)||Qk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.Fb=function(a){var b=this;return O(function(c){return H(c,ql(b,function(){if(b.C.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 Yg,uri:null};b.u.get(e).unshift(f)}b.i.duration=a;b.sa=a}),0)})};p.getDuration=function(){return this.i.duration};
function rl(a,b,c){O(function(d){return a.I.g||a.g.error||a.M||a.H||Pk(a)||Qk(a)?d.return():H(d,ql(a,function(){Pk(a)||Qk(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function sl(a){O(function(b){return a.I.g||a.g.error||a.M||a.H||Pk(a)||Qk(a)?b.return():H(b,ql(a,function(){Pk(a)||Qk(a)||a.i.clearLiveSeekableRange()}),0)})}function kl(a,b,c,d){if(d<=c)Xk(a,b);else{if(a.D){var e=a.D;b==="video"&&e.g&&e.g.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}
function fl(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Xk(a,b)}function gl(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;Xk(a,b)}function ol(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;Xk(a,b)}
function Xk(a,b){if(a.H||a.I.g){var c=a.u.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.u.set(b,[]))}else if(c=a.u.get(b)[0])c.p.resolve(),tl(a,b)}function el(a,b,c,d){vh(a.I);c={start:c,p:new Yg,uri:d};a.u.get(b).push(c);a.u.get(b).length==1&&ul(a,b);return c.p}
function ql(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t;return O(function(v){switch(v.g){case 1:vh(a.I);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 Yg,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},l=a.u.get(h),l.push(k),c.push(g.ready),l.length==1&&k.start();va(v,2);return H(v,Promise.all(c),4);case 4:xa(v,3);break;case 2:throw m=ya(v),m;case 3:return va(v,5,6),H(v,b(),6);case 6:Aa(v);n=u(d);for(q=
n.next();!q.done;q=n.next())r=q.value,tl(a,r);Ga(v,0);break;case 5:throw t=ya(v),new V(2,3,3015,t,a.g.error||"No error in the media element",null);}})}function tl(a,b){a.u.get(b).shift();ul(a,b)}function ul(a,b){var c=a.u.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new V(2,3,3017,b)):Yk(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)),tl(a,b)}}function vl(a,b){a.Z=b;a.h&&(a.h.l=b)}
function hl(a,b,c,d,e){if(xf(a.G.get(e))!="mp4")return c;var f=d===null,g=a.La.get(e),h=a.O.Wk(),k=!1;d&&d.ka&&(k=d.ka.encrypted);d=d?d.S()[0]:null;var l=$b();a.C.correctEc3Enca&&f&&e==="audio"&&(c=Bj(c));a.C.insertFakeEncryptionInInit&&g&&l.Wd(h,e)&&(f?c=Cj(b,c,d):!k&&l.Gj(e)&&(c=Ej(c)));f&&l.Le()&&(c=Hj(c));return c}
function wl(a,b,c,d){return el(a,b,function(){if(b!==Ec){a.G.get(b);if($b().Pb()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.C.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.G.set(b,c)}Xk(a,b)}},null)}
function xl(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G;return O(function(B){if(B.g==1){if(a.H||a.M)return B.return();c=Hc;a.H=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Na=!0);a.kb&&(a.g.autoplay=!1);wa(B,2);a.A.Ta();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(E){}}a.j.clear();a.l.clear();n=a.i.duration;a.L=new Yg;a.i=Kk(a,a.L);return H(B,a.L,4)}if(B.g!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.sa)&&a.sa&&(a.i.duration=a.sa);q=new Yg;r=a.i.sourceBuffers;t=b.size;v=0;w=function(){v++;v===t&&(q.resolve(),a.A.Ea(r,"addsourcebuffer",w))};a.A.o(r,"addsourcebuffer",w);z=u(b.keys());for(y=z.next();!y.done;y=z.next())A=y.value,D=b.get(A),Rk(a,A,D,D.codecs);(G=b.get(c.ia))&&G.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.u.has(c.ia)&&a.u.set(c.ia,[]);return H(B,q,2)}Aa(B);a.H=!1;vh(a.I);a.A.qa(a.g,"loadedmetadata",function(){a.I.g||(a.g.currentTime=d)});a.A.qa(a.g,
"canplaythrough",function(){a.I.g||(a.g.autoplay=e,a.Na&&(a.Na=!1,a.g.play()))});return Ga(B,0)})}function yl(a,b){return ql(a,function(){return xl(a,b)})}
function zl(a,b,c,d){var e=!1,f=Cc("audio",(d||"").split(",")),g=Cc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);var k=tf(c,h),l=Cf(a.G.get(b)),m=a.C.forceTransmux;!Ri(k)||!a.J&&uf.includes(k)?m=!0:m||c==l||(m=!$b().qg()&&uf.includes(c));if(m&&(a=vf(c,h),h=nf(a))){var n=h();f&&g&&(e=!0);k=n.convertCodecs(b,a)}!n&&b==="video"&&f&&(k=tf(c,d));b=yf(Df(k));return{uc:n,Cm:e,Oi:Cf(k),codec:b,mimeType:k}}
function Al(a,b,c,d,e){if(b==Ec)return{type:Bl,Uf:c,uc:null};var f=yf(Df(a.G.get(b))),g=Cf(a.G.get(b)),h=zl(a,b,c,d),k=h.uc,l=h.Cm,m=h.Oi,n=h.codec;h=h.mimeType;var q=!0;l&&a.G.has("audio")&&(c=zl(a,"audio",c,d),d=yf(Df(a.G.get("audio"))),q=Cf(a.G.get("audio")),q=d==c.codec&&q==c.Oi,c.uc&&c.uc.destroy());if(f===n&&g===m&&q)return{type:Bl,Uf:h,uc:k};f=!0;if(a.m&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;b=$b();if(f&&a.C.codecSwitchingStrategy==="smooth"&&b.Pb())return{type:Cl,Uf:h,uc:k};k&&k.destroy();
return{type:Dl,Uf:h,uc:null}}
function nl(a,b,c,d,e){var f,g,h,k,l,m;return O(function(n){if(n.g==1){f=Hc;g=Al(a,b,c,d,e);h=g.type;k=g.uc;l=g.Uf;if(m=e.get(f.ia))a.m=m.isAudioMuxedInVideo;if(h==Bl)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==Cl)return H(n,wl(a,b,l,k),3);if(h!=Dl)return n.B(3);k&&k.destroy();return H(n,yl(a,e),3)}return n.return(!0)})}
function El(a,b,c,d,e){a=Al(a,b,c,d,e);a.uc&&a.uc.destroy();return a.type==Dl}var Mk=window.URL.createObjectURL,Tk="sequence",Bl="none",Dl="reset",Cl="changeType";function Fl(a,b,c){this.i=a;this.F=b;this.A=this.l=Infinity;this.h=1;this.g=this.j=null;this.C=0;this.D=!0;this.J=!1;this.I=0;this.G=c===void 0?!0:c;this.H=0;this.u=!1;this.m=a}p=Fl.prototype;p.getDuration=function(){return this.l};p.al=function(){return this.h};p.Tj=function(a){this.i=a};p.Fb=function(a){this.l=a};p.jl=function(){return this.i};p.Qj=function(a){this.C=a};p.td=function(a){a&&!this.D&&(this.J=!0);this.D=a};p.mg=function(a){this.A=a};p.Cf=function(){return this.A};
p.ii=function(a){this.F=a};p.Rk=function(){return this.F};p.Aj=function(a,b){if(a.length!=0){var c=(Date.now()+this.C)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.Vf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.G&&!this.u&&(this.i=c-this.g-this.h)}}};
p.Ge=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.C)/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.Vf(b);this.g=Math.max(this.g,c);this.i!=null&&this.G&&!this.u&&(this.i=d-this.g-this.h)}};p.zj=function(a,b){this.Vf(a);b==Infinity||this.U()||(this.g=Math.max(this.g,b))};p.cl=function(){return this.g};p.Pf=function(){this.u=!0};
p.Ml=function(){return this.u};p.ki=function(a){this.m=a};p.Vk=function(){return this.m};p.Vf=function(a){this.j==null?this.j=a:this.J||(this.j=Math.min(this.j,a))};p.Ph=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.U=function(){return this.l==Infinity&&!this.D};p.md=function(){return this.l!=Infinity&&!this.D};p.Mb=function(){return Math.max(this.I,this.Tc()-this.A)};p.Vj=function(a){this.I=a};
p.Tc=function(){return this.U()||this.md()?Math.min(Math.max(0,(Date.now()+this.C)/1E3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l};p.ve=function(a){var b=Math.max(this.j,this.I);return this.A==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.Tc()-this.A+a,this.Lb()))};p.hc=function(){return this.ve(0)};p.Lb=function(){return Math.max(0,this.Tc()-(this.U()||this.md()?this.F:0))};p.jk=function(){return this.i==null||this.g!=null&&this.G?!1:!0};
p.Pj=function(a){this.H=a};p.Hk=function(){return this.H};S("shaka.media.PresentationTimeline",Fl);Fl.prototype.getAvailabilityTimeOffset=Fl.prototype.Hk;Fl.prototype.setAvailabilityTimeOffset=Fl.prototype.Pj;Fl.prototype.usingPresentationStartTime=Fl.prototype.jk;Fl.prototype.getSeekRangeEnd=Fl.prototype.Lb;Fl.prototype.getSeekRangeStart=Fl.prototype.hc;Fl.prototype.getSafeSeekRangeStart=Fl.prototype.ve;Fl.prototype.getSegmentAvailabilityEnd=Fl.prototype.Tc;Fl.prototype.setUserSeekStart=Fl.prototype.Vj;
Fl.prototype.getSegmentAvailabilityStart=Fl.prototype.Mb;Fl.prototype.isInProgress=Fl.prototype.md;Fl.prototype.isLive=Fl.prototype.U;Fl.prototype.offset=Fl.prototype.offset;Fl.prototype.notifyMaxSegmentDuration=Fl.prototype.Ph;Fl.prototype.notifyMinSegmentStartTime=Fl.prototype.Vf;Fl.prototype.getInitialProgramDateTime=Fl.prototype.Vk;Fl.prototype.setInitialProgramDateTime=Fl.prototype.ki;Fl.prototype.isStartTimeLocked=Fl.prototype.Ml;Fl.prototype.lockStartTime=Fl.prototype.Pf;
Fl.prototype.getMaxSegmentEndTime=Fl.prototype.cl;Fl.prototype.notifyPeriodDuration=Fl.prototype.zj;Fl.prototype.notifySegments=Fl.prototype.Ge;Fl.prototype.notifyTimeRange=Fl.prototype.Aj;Fl.prototype.getDelay=Fl.prototype.Rk;Fl.prototype.setDelay=Fl.prototype.ii;Fl.prototype.getSegmentAvailabilityDuration=Fl.prototype.Cf;Fl.prototype.setSegmentAvailabilityDuration=Fl.prototype.mg;Fl.prototype.setStatic=Fl.prototype.td;Fl.prototype.setClockOffset=Fl.prototype.Qj;
Fl.prototype.getPresentationStartTime=Fl.prototype.jl;Fl.prototype.setDuration=Fl.prototype.Fb;Fl.prototype.setPresentationStartTime=Fl.prototype.Tj;Fl.prototype.getMaxSegmentDuration=Fl.prototype.al;Fl.prototype.getDuration=Fl.prototype.getDuration;function Ml(a,b,c,d){var e=this;this.A=d;this.g=a;this.F=b;this.h=c;this.j=new ed;this.m=!1;this.l=0;this.D=!1;this.H=this.G=0;this.u=Nl(this);this.C=!1;this.j.o(a,"waiting",function(){return Ol(e)});this.i=(new Sf(function(){Ol(e)})).xa(this.h.gapJumpTimerTime)}Ml.prototype.release=function(){this.j&&(this.j.release(),this.j=null);this.i!=null&&(this.i.stop(),this.i=null);this.u&&(this.u.release(),this.u=null);this.g=this.F=this.A=null};
Ml.prototype.Rd=function(){this.C=!0;this.i&&this.i.xa(this.h.gapJumpTimerTime);Ol(this)};
function Ol(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||a.g.currentTime==a.l&&(a.g.autoplay||a.g.currentTime!=a.l)){var b;if(!(b=!a.u)){b=a.u;var c=b.h,d=Pl(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.i=!1;e=f-b.l;if(d=e>=b.u&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Vj(c,b,a.h.gapDetectionThreshold),d==null||d==0&&!a.C||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*
100)/100),e>=a.F.Lb()||e-b<.001||(d!=0&&c.end(d-1),Ql(a,e),b==a.l&&(a.l=e),a.G++,a.A(new T("gapjumped")))))}}}function Ql(a,b){a.D=!0;a.j.qa(a.g,"seeked",function(){a.D=!1});a.g.currentTime=b}
function Nl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new Rl(new Sl(a.g),b,function(){var d;return O(function(e){if(e.g==1)return d=Uj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.B(2)):H(e,a.g.play(),3):e.return();if(e.g!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.H++;a.A(new T("stalldetected"));I(e)})})}function Rl(a,b,c){this.h=a;this.m=Pl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.u=b;this.j=c}
Rl.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function Sl(a){var b=this;this.g=a;this.h=new ed;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 Pl(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=u(Uj(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}Sl.prototype.release=function(){this.h&&this.h.release();this.h=null};function Tl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ul.value().get(b),c.qa(a,b,d))}var Ul=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 Vl(a,b,c,d){var e=this;this.g=a;this.m=b;this.A=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.u=!1;this.h=new ed;this.i=new Wl(a);Tl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Xl(e,e.j())})}Vl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Yl(a){return a.u?a.g.currentTime:a.j()}
function Zl(a,b){a.g.readyState>0?$l(a.i,b):Tl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Xl(a,a.j())})}function Xl(a,b){Math.abs(a.g.currentTime-b)<.001?am(a):(a.h.qa(a.g,"seeking",function(){am(a)}),$l(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function am(a){a.u=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.A(a.g.currentTime)}
function Wl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Sf(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Wl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function $l(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.xa(.1)};function bm(a){this.g=a;this.i=!1;this.h=null;this.j=new ed}p=bm.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=cm(b);e!==null&&(d=b.h.getTime()/1E3-e,d=dm(b,d))}d==null?b.i=!0:(d<0&&(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;Tl(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.Fg=function(a){this.h=this.i?this.h:a};p.ke=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(cm(this)||0),a=dm(this,a));return a||0};p.Hi=function(){return 0};p.Fi=function(){return 0};p.Gi=function(){return!1};p.yj=function(){};p.mj=function(){var a=Rj(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function cm(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function dm(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function em(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.A=e;this.u=null;this.i=new Ml(a,b.presentationTimeline,c,f);this.j=new Vl(a,function(){a:{var h=g.i;h.m=!0;h.C=!1;h.i&&h.i.xa(h.h.gapJumpTimerTime);Ol(h);var k=Yl(g.j);h=fm(g,k);if(!Ti()&&Math.abs(h-k)>.001){k=!1;var l=$b().Lj();if(l){var m=Date.now()/1E3;if(!g.u||g.u<m-l)g.u=m,k=!0}else k=!0;if(k){Zl(g.j,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.m&&(k.m=!0,k.l=h);k.i&&
k.i.xa(k.h.gapJumpTimerTime);Ol(k)},function(){return gm(g,d)});this.m=new Sf(function(){if(g.h.readyState!=0&&!g.h.paused){var h=Yl(g.j),k=g.g.hc(),l=g.g.Lb();l-k<3&&(k=l-3);h<k&&(h=fm(g,h),g.h.currentTime=h)}})}p=em.prototype;p.ready=function(){this.m.xa(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.A=function(){}};p.Fg=function(a){Zl(this.j,gm(this,a))};
p.ke=function(){var a=Yl(this.j);return this.h.readyState>0&&!this.h.paused?hm(this,a):a};p.Hi=function(){return this.i.H};p.Fi=function(){return this.i.G};p.Gi=function(){return this.i.D};function gm(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.hc():a.g.Lb():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.Lb()+b);return im(a,hm(a,b))}p.yj=function(){this.i.Rd()};p.mj=function(){if(this.g.U()){var a=this.g.Tc(),b=Rj(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function im(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function fm(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.hc(),f=a.g.Lb(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.ve(c),k=a.g.ve(d);c=a.g.ve(c+d);return b>=g?im(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.U()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Sj(a.h.buffered,k)?k:c:b>=h||Sj(a.h.buffered,b)?b:c}function hm(a,b){var c=a.g.hc();if(b<c)return c;a=a.g.Lb();return b>a?a:b};function jm(a){this.g=a;this.m=null;this.i=0;this.u=!1}p=jm.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.u||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Tl=function(){this.u=!0};p.Kb=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function vg(a){return a.g[0]||null}
p.find=function(a){for(var b=this.g.length-1,c=b;c>=0;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.u)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.Rf=function(a){if(!this.u&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3;this.g=this.g.filter(function(c){return Math.round(c.startTime*1E3)/1E3<b});this.g.push.apply(this.g,x(a))}};p.Ee=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(c.g.length==0||d.endTime>c.g[0].startTime)});this.Rf(a);this.eb(b)};p.eb=function(a){if(!this.u){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
p.Hd=function(a,b,c){c=c===void 0?!1:c;if(!this.u){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;this.g.length!=0&&(a=this.g[this.g.length-1],b=new Kj(a.startTime,b,a.D,a.startByte,a.endByte,a.ka,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.wg=function(a,b){var c=this;this.u||(this.m&&this.m.stop(),this.m=new Sf(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};jm.prototype[Symbol.iterator]=function(){return this.fc(0)};
jm.prototype.fc=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return cb("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new km(this,d,f,c)};jm.prototype.tf=function(){return-1};
function lm(a,b,c){a=new Kj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new jm([a])}S("shaka.media.SegmentIndex",jm);jm.forSingleSegment=lm;jm.prototype.getIteratorForTime=jm.prototype.fc;jm.prototype.updateEvery=jm.prototype.wg;jm.prototype.fit=jm.prototype.Hd;jm.prototype.evict=jm.prototype.eb;jm.prototype.mergeAndEvict=jm.prototype.Ee;jm.prototype.offset=jm.prototype.offset;jm.prototype.get=jm.prototype.get;jm.prototype.find=jm.prototype.find;jm.prototype.markImmutable=jm.prototype.Tl;
jm.prototype.release=jm.prototype.release;jm.prototype.getNumEvicted=jm.prototype.getNumEvicted;jm.prototype.getNumReferences=jm.prototype.getNumReferences;function km(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=km.prototype;p.$d=function(a){this.reverse=a};p.Ck=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.m&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.m&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.ai=function(){var a=this.current();if(a&&a.od&&!a.l&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.l&&!(this.g<=0);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",km);km.prototype.resetToLastIndependent=km.prototype.ai;km.prototype.next=km.prototype.next;km.prototype.current=km.prototype.current;km.prototype.currentPosition=km.prototype.Ck;km.prototype.setReverse=km.prototype.$d;function mm(){jm.call(this,[]);this.h=[]}pa(mm,jm);p=mm.prototype;p.clone=function(){var a=new mm;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Kb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Kb(a)};
function nm(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(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function om(a,b){a=u(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.find(b)!=null)return c.tf();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.Rf=function(){};p.eb=function(a){if(this.h.length){var b=this.h[0];b.eb(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.eb(a))}};p.Ee=function(){};p.Hd=function(){};p.wg=function(){};S("shaka.media.MetaSegmentIndex",mm);mm.prototype.updateEvery=mm.prototype.wg;
mm.prototype.fit=mm.prototype.Hd;mm.prototype.mergeAndEvict=mm.prototype.Ee;mm.prototype.evict=mm.prototype.eb;mm.prototype.merge=mm.prototype.Rf;mm.prototype.offset=mm.prototype.offset;mm.prototype.get=mm.prototype.get;mm.prototype.find=mm.prototype.find;mm.prototype.forEachTopLevelReference=mm.prototype.Kb;mm.prototype.release=mm.prototype.release;function pm(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Bf();this.h=new Sf(function(){b.g.wj(b.i*.25)})}pm.prototype.release=function(){this.set(this.kd());this.h&&(this.h.stop(),this.h=null);this.g=null};pm.prototype.set=function(a){this.i=a;qm(this)};pm.prototype.kd=function(){return this.g.kd()};function qm(a){a.h.stop();var b=a.j?0:a.i;if(b>=0)try{a.g.Bf()!=b&&a.g.li(b);return}catch(c){}a.h.xa(.25);a.g.Bf()!=0&&a.g.li(0)};function rm(a){var b=this;this.j=a;this.h=new ed;this.g=new Set;this.i=(new Sf(function(){sm(b,!1)})).Ka();a.paused||this.i.xa(.25);this.h.o(a,"playing",function(){b.i.Ka().xa(.25)});this.h.o(a,"pause",function(){b.i.stop()})}rm.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 sm(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 tm(a){kb.call(this);this.g=new Map;this.h=a}pa(tm,kb);tm.prototype.release=function(){this.g.clear();kb.prototype.release.call(this)};function um(a,b){var c=a.g.get(b);c||(c={Ke:[],Xg:null,contentType:b},a.g.set(b,c));return c}function vm(a,b,c){var d=um(a,b.contentType);wm(a,d);a={Pd:b,position:c};d=d.Ke;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
tm.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.Xg;a:{var e=c.Ke;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Pd;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&&!dd(d.roles,e.roles);(g||h||d)&&xm(this,a,e.contentType)&&(c.Xg=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&xm(this,a,e.contentType)&&(c.Xg=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function xm(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function wm(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.Ke;b.Ke=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.Ke=[]}
function ym(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};a.type=="video"&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);a.type=="audio"&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function zm(a){kb.call(this);this.h=new Map;this.i=a;this.g=null}pa(zm,kb);zm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);kb.prototype.release.call(this)};function Am(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new T("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Bm(a))}
function Bm(a){a.g||(a.g=(new Sf(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 T("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).xa(2))};function Cm(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.od&&g.Ce?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.u=d;this.A=e||f}function Dm(a,b){a.l=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function Em(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.fc(b,!0,a.u));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.Vc()==2&&(d=!1);c.jc(!1)&&(d=!1);d&&c.ka&&b.push(Fm(a,c.ka));d&&!a.g.has(c)&&(d=new Gm(a.l),b.push(Hm(d,c,a.i)),a.g.set(c,d));if(!a.A(c,a.i))break}Im(a);return Promise.all(b)}
function Fm(a,b){if(!a.i.segmentIndex||b.jc()||Array.from(a.j.keys()).some(function(e){return Jj(e,b)}))return Promise.resolve();var c=new Gm(a.l),d=Hm(c,b,a.i);a.j.set(b,c);return d}function Jm(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Km(a,c)}function Lm(a){Jm(a,a.g);Jm(a,a.j);a.h=null}Cm.prototype.eb=function(a,b){b=b===void 0?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Km(this,d);b&&Im(this)};
Cm.prototype.$d=function(a){this.u=a;this.h&&this.h.$d(a)};function Im(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=u(a.j.keys()),d=c.next(),e={};!d.done;e={Ih:void 0},d=c.next())e.Ih=d.value,b.some(function(f){return function(g){return Jj(g.ka,f.Ih)}}(e))||Km(a,e.Ih)}function Mm(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Km(a,d)}Im(a)}function Nm(a,b){b&&b!==a.i&&(Lm(a),a.i=b)}
function Km(a,b){var c=a.g;b instanceof Ij&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Gm(a){this.g=a;this.He=this.si=null}function Hm(a,b,c){var d=new Uint8Array(0);a.He=a.g(b,c,function(e){return O(function(f){if(f.g==1)return d.byteLength>0?d=wc(d,e):d=e,a.si?H(f,a.si(d),3):f.B(0);d=new Uint8Array(0);I(f)})});return a.He.promise.catch(function(e){return e instanceof V&&e.code==7001?Promise.resolve():Promise.reject(e)})}Gm.prototype.abort=function(){this.He&&this.He.abort()};S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function Om(a){var b=Cf(a),c=b.split("/")[0];a=Df(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Se:null,colorGamut:null,frameRate:null,timescale:null}}
function Pm(a,b,c){function d(C){y=C.name;var K=C.reader;K.skip(24);var F=K.Ia(),J=K.Ia();K.skip(50);q=String(F);n=String(J);C.reader.Qa()&&Gh(C)}function e(C){var K=Yi(C.reader);r=K.channelCount;t=K.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;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,t=null,v=null,w=null,z=null,y;(new Bh).box("moov",Gh).box("trak",Gh).box("mdia",Gh).X("mdhd",function(C){C=Wi(C.reader,C.version);m=C.language;z=C.timescale}).box("minf",Gh).box("stbl",Gh).X("stsd",Ih).box("mp4a",function(C){var K=Yi(C.reader);r=K.channelCount;t=K.sampleRate;
C.reader.Qa()?Gh(C):f(C.name)}).box("esds",function(C){C=C.reader;for(var K="mp4a",F,J;C.Qa();){F=C.ba();for(var L=C.ba();L&128;)L=C.ba();if(F==3)C.Ia(),L=C.ba(),L&128&&C.Ia(),L&64&&C.skip(C.ba()),L&32&&C.Ia();else if(F==4)J=C.ba(),C.skip(12);else if(F==5)break}J&&(K+="."+aj(J),F==5&&C.Qa()&&(F=C.ba(),J=(F&248)>>3,J===31&&C.Qa()&&(J=32+((F&7)<<3)+((C.ba()&224)>>5)),K+="."+J));g.push(K);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",
d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(C){var K=y||"";switch(y){case "dvav":K="avc3";break;case "dva1":K="avc1"}C=C.reader;C.skip(1);C=K+"."+aj(C.ba())+aj(C.ba())+aj(C.ba());h.push(C);l=!0}).box("hvcC",function(C){var K=y||"";switch(y){case "dvh1":K="hvc1";break;case "dvhe":K="hev1"}var F=C.reader;F.skip(1);C=F.ba();var J=["","A","B","C"][C>>6],L=C&31,P=F.$(),Q=(C&32)>>5?"H":"L";C=[F.ba(),F.ba(),F.ba(),
F.ba(),F.ba(),F.ba()];F=F.ba();for(var N=0,M=0;M<32;M++){N|=P&1;if(M==31)break;N<<=1;P>>=1}K=K+("."+J+L)+("."+aj(N,!0));K+="."+Q+F;J="";for(L=C.length;L--;)if((Q=C[L])||J)J="."+Q.toString(16).toUpperCase()+J;K+=J;h.push(K);l=!0}).box("dvcC",function(C){var K=y||"";switch(y){case "hvc1":K="dvh1";break;case "hev1":K="dvhe";break;case "avc1":K="dva1";break;case "avc3":K="dvav";break;case "av01":K="dav1"}var F=C.reader;F.skip(2);C=F.ba();F=F.ba();h.push(K+"."+bj(C>>1&127)+"."+bj(C<<5&32|F>>3&31));l=!0}).box("dvvC",
function(C){var K=y||"";switch(y){case "hvc1":K="dvh1";break;case "hev1":K="dvhe";break;case "avc1":K="dva1";break;case "avc3":K="dvav";break;case "av01":K="dav1"}var F=C.reader;F.skip(2);C=F.ba();F=F.ba();h.push(K+"."+bj(C>>1&127)+"."+bj(C<<5&32|F>>3&31));l=!0}).X("vpcC",function(C){var K=y||"",F=C.reader;C=F.ba();var J=F.ba();F=F.ba()>>4&15;h.push(K+"."+bj(C)+"."+bj(J)+"."+bj(F));l=!0}).box("av1C",function(C){var K=y||"";switch(y){case "dav1":K="av01"}var F=C.reader;F.skip(1);C=F.ba();F=F.ba();
var J=C>>>5,L=(F&64)>>6;h.push(K+"."+J+"."+bj(C&31)+(F>>>7?"H":"M")+"."+bj(J===2&&L?(F&32)>>5?12:10:L?10:8)+"."+((F&16)>>4)+"."+((F&8)>>3)+((F&4)>>2)+(F&3)+"."+bj(1)+"."+bj(1)+"."+bj(1)+".0");l=!0}).box("enca",Kh).box("encv",Jh).box("sinf",Gh).box("frma",function(C){C=Zi(C.reader).codec;f(C)}).box("colr",function(C){h=h.map(function(J){if(J.startsWith("av01.")){var L=C.reader,P=L.Wa(),Q=L.bc(4,!1);var N=String.fromCharCode(Q[0]);N+=String.fromCharCode(Q[1]);N+=String.fromCharCode(Q[2]);N+=String.fromCharCode(Q[3]);
if(N==="nclx"){Q=L.Ia();N=L.Ia();var M=L.Ia(),R=L.ba()>>7,U=J.split(".");U.length==10&&(U[6]=bj(Q),U[7]=bj(N),U[8]=bj(M),U[9]=String(R),J=U.join("."))}L.seek(P)}return J});var K=$i(C.reader),F=K.colorGamut;v=K.Se;w=F}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var A=k&&!l,D=new Map;if(l&&!c){c=new Dd("video/mp4");a&&c.init(a);try{c.Yf(b);for(var G=u(c.Eg()),B=G.next();!B.done;B=G.next()){var E=B.value;D.set(E,E)}}catch(C){}c.je()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",
codecs:Qm(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r,sampleRate:t,closedCaptions:D,Se:v,colorGamut:w,frameRate:null,timescale:z}}function Qm(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Bf(d);b.has(e)||(c.push(d),b.add(e))}b=Fc("audio",c);d=Fc("video",c);a=Fc(Ec,c);d=Rm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Rm(a){if(a.length<=1)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?Ri('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Sm(a){var b=null;(new Bh).box("moov",Gh).box("trak",Gh).box("mdia",Gh).box("minf",Gh).box("stbl",Gh).X("stsd",Ih).box("encv",Jh).box("enca",Kh).box("sinf",Gh).box("schi",Gh).X("tenc",function(c){c=c.reader;c.ba();c.ba();c.ba();c.ba();c=c.bc(16,!1);b=vc(c)}).parse(a,!0);return b}
function Tm(a,b,c){var d,e,f,g,h;return O(function(k){if(k.g==1)return d=b,d.cryptoKey?k.B(2):H(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Lb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Um(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Vm(a);if(e=Wm.get(d))return m.return(e);f=0;g=mh([a],c);va(m,2);g.method="HEAD";return H(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||k.code!=1002&&k.code!=1001){m.B(3);break}g.method="GET";return H(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})}
function Vm(a){a=(new qb(a)).Tb.split("/").pop().split(".");return a.length==1?"":a.pop().toLowerCase()}function Xm(a,b,c,d,e){a=mh(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a}
var Wm=(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");function Ym(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.L=new Map;this.D=1;this.C=this.u=null;this.T=0;this.h=new Map;this.M=!1;this.V=null;this.F=!1;this.l=new uh(function(){return Zm(c)});this.P=Date.now()/1E3;this.m=new Map;this.R={projection:null,hfov:null};this.Z=0;this.W=Infinity;this.H=null;this.O=[];this.A=new Sf(function(){if(c.j&&c.g)if(c.j.presentationTimeline.U()){var d=c.j.presentationTimeline.hc(),e=c.j.presentationTimeline.Lb();e-d>1?rl(c.g.ha,d,e):sl(c.g.ha)}else sl(c.g.ha),
c.A&&c.A.stop();else c.A&&c.A.stop()});this.I=null;this.J=!1;this.K=new Sf(function(){var d=c.g.video;!d.ended&&c.I&&(c.J=!0,d.currentTime=c.I,c.I=null)});this.G=new ed}p=Ym.prototype;p.destroy=function(){return this.l.destroy()};
function Zm(a){var b,c,d,e,f,g,h;return O(function(k){if(k.g==1){a.A&&a.A.stop();a.A=null;a.K&&a.K.stop();a.K=null;a.G&&(a.G.release(),a.G=null);b=[];c=u(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,$m(e),b.push(an(e)),e.na&&(Lm(e.na),e.na=null);f=u(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,Lm(h);return H(k,Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;I(k)})}
p.configure=function(a){this.i=a;this.V=new Vg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.na&&(Lm(b.na),b.na=null);b=u(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Lm(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(Ec))&&
b.na&&(Lm(b.na),b.na=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.na&&(Lm(b.na),b.na=null);b=u(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.na?(Mm(c.na,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Lm(c.na),c.na=null)):a.segmentPrefetchLimit>0&&(c.na=bn(this,c.stream));a.disableAudioPrefetch||cn(this)};function dn(a,b,c){a.j.presentationTimeline.U()||(a.Z=b,a.W=c)}
p.start=function(a){var b=this;return O(function(c){if(c.g==1)return H(c,en(b,a||new Map),2);vh(b.l);b.M=!0;I(c)})};function fn(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Hc,a.T++,d=a.T,va(l,2),H(l,ll(a.g.ha,c.Va),4);case 4:xa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=tf(b.mimeType,b.codecs),Sk(a.g.ha,f,a.j.sequenceMode,b.external),g=a.g.ha.Z,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.T==d&&(k=gn(a,b),a.h.set(c.Va,k),hn(a,k,0)),I(l)}})}
function jn(a){var b=a.h.get(Ec);b&&($m(b),an(b).catch(function(){}),a.H=a.h.get(Ec),a.h.delete(Ec),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.C=null}
function kn(a,b){for(var c=a.g.Za()<0,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.Ba&&e.Ba.$d(c),e.na&&e.na.$d(c);d=u(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.$d(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.$c&&(ln(a,b,!1,0,!1),c.$c=d);else if(b=c.$c)c.$c=null,ln(a,b,!0,0,!1)}
function mn(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.u=b;a.M&&(b.video&&ln(a,b.video,c,d,e,f),b.audio&&ln(a,b.audio,c,d,e,f))}function nn(a,b){O(function(c){if(c.g==1)return a.H=null,a.C=b,a.M?b.segmentIndex?c.B(2):H(c,b.createSegmentIndex(),2):c.return();ln(a,b,!0,0,!1);I(c)})}function on(a){var b=a.h.get(Ec);b&&ln(a,b.stream,!0,0,!0)}
function pn(a,b){for(var c=u(a.L.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.L.delete(d))}}
function ln(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Ec?g&&(g.$c&&(b.trickModeVideo?(g.$c=b,b=b.trickModeVideo):g.$c=null),g.stream!=b||e)&&(a.m.has(b)?g.na=a.m.get(b):g.na&&Nm(g.na,b),b.type==Ec&&g.stream!=b&&(e=tf(b.mimeType,b.codecs),Sk(a.g.ha,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Sa?(e="("+g.type+":"+g.stream.id+")",a.L.has(e)||a.L.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.Ba=null,g.Lg=!!f,b.dependencyStream?g.Qc=gn(a,b.dependencyStream):g.Qc=null,qn(a),e&&(g.xb=null,g.Ec=null,g.Dc=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(an(b).catch(function(){}),b.xb=null,b.Ec=null,b.Dc=null,rn(a,b),sn(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.ec?g.fe=!0:g.Sa?(g.dc=!0,g.Dd=d,g.fe=!0):($m(g),tn(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Sa||g.yb||hn(a,g,0),sn(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
fn(a,b)}
function sn(a,b){var c,d,e;return O(function(f){if(f.g==1){if(!b.ab)return f.return();c=b.stream;d=b.ab;return c.segmentIndex?f.B(2):H(f,c.createSegmentIndex(),2)}if(f.g!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.B(4):H(f,e.createSegmentIndex(),4);if(b.ab!=d||b.stream!=c)return f.return();var g=a.g.Bc();var h=al(a.g.ha,b.type),k=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Mj(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.u.bandwidth)/
8);k?((l=l.ka)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.ab.h.g>k?!0:!1):g=!0;g&&b.ab.abort();I(f)})}
p.sd=function(){if(this.g){for(var a=this.g.Bc(),b=u(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.J)e=this.g.ha,d==Ec?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=$k(e,d),e=Sj(e,a)),e=!e;if(e){this.P=0;c.na&&(c.na.h=null);if(c.type==="audio"){e=u(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.Ba=null;(al(this.g.ha,d)!=null||c.Sa)&&rn(this,c);c.ab&&(c.ab.abort(),c.ab=null);d===Ec&&(d=this.g.ha,d.K&&d.K.je());c.sd=!0}!this.J||
c.ec||c.Sa||c.yb||hn(this,c,0)}un(this)&&vn(this)}};function rn(a,b){b.ec||b.dc||(b.Sa?(b.dc=!0,b.Dd=0):Zk(a.g.ha,b.type)==null?b.yb==null&&hn(a,b,0):($m(b),tn(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function en(a,b){var c,d,e,f,g,h,k,l;return O(function(m){if(m.g==1){if(!a.u)throw new V(2,5,5006);c=wn(a,!0);d=a.g.ha;return H(m,d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}vh(a.l);a.updateDuration();e=u(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=gn(a,h),b.has(h.id)&&(l=b.get(h.id),Dm(l,function(n,q,r){return xn(n,q,r||null,a.i.retryParameters,a.g.Gc)}),k.na=l),a.h.set(g,k),hn(a,k,0));qn(a);I(m)})}
function gn(a,b){var c={stream:b,type:b.type,Ba:null,na:bn(a,b),Ra:null,xb:null,Of:null,Ec:null,Dc:null,Mf:null,Nf:null,$c:null,endOfStream:!1,Sa:!1,yb:null,dc:!1,Dd:0,fe:!1,ec:!1,sd:!0,Lg:!1,Xh:!1,xe:!1,ab:null,Qc:null};b.dependencyStream&&(c.Qc=gn(a,b.dependencyStream));return c}
function bn(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===Ec&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===Ec&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.na)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new Cm(a.i.segmentPrefetchLimit,b,function(d,e,f){return xn(d,e,f||null,a.i.retryParameters,a.g.Gc)},a.g.Za()<0,a.g.Am):null}
function cn(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=u(a.j.variants),e=d.next(),f={};!e.done;f={Sb:void 0},e=d.next())if(f.Sb=e.value,f.Sb.audio)if(a.m.has(f.Sb.audio)){if(e=a.m.get(f.Sb.audio),Mm(e,b),!(b>0&&c.some(function(h){return function(k){return Kc(h.Sb.audio.language,k)}}(f)))){var g=a.h.get(f.Sb.audio.type);e!==(g&&g.na)&&Lm(e);a.m.delete(f.Sb.audio)}}else b<=0||!c.some(function(h){return function(k){return Kc(h.Sb.audio.language,k)}}(f))||!(e=bn(a,f.Sb.audio))||
(f.Sb.audio.segmentIndex||f.Sb.audio.createSegmentIndex(),a.m.set(f.Sb.audio,e))}p.updateDuration=function(){var a=Ti(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.A&&this.A.stop(),sl(this.g.ha)),this.g.ha.Fb(b)):a?(this.A&&this.A.xa(.5),this.g.ha.Fb(Infinity)):this.g.ha.Fb(4294967296)};
function yn(a,b){var c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:vh(a.l);c=Hc;if(b.Sa||b.yb==null||b.ec)return n.return();b.yb=null;if(!b.dc){n.B(2);break}return H(n,tn(a,b,b.fe,b.Dd),3);case 3:return n.return();case 2:pn(a,b);if(b.stream.segmentIndex){n.B(4);break}d=b.stream;va(n,5);return H(n,b.stream.createSegmentIndex(),7);case 7:xa(n,6);break;case 5:return e=ya(n),H(n,zn(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Sa||
b.yb||hn(a,b,0),n.return();case 4:if(!b.Qc){n.B(9);break}if(b.Qc.stream.segmentIndex){n.B(9);break}va(n,11);return H(n,b.Qc.stream.createSegmentIndex(),13);case 13:xa(n,9);break;case 11:ya(n);case 9:va(n,14);f=An(a,b);f!=null&&(hn(a,b,f),b.xe=!1);xa(n,15);break;case 14:return g=ya(n),H(n,zn(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Va)return n.return();h=[];b.stream&&!b.stream.isAudioMuxedInVideo&&h.push(b);k=b.type===c.ia?c.Ga:c.ia;(l=a.h.get(k))&&l.stream&&!l.stream.isAudioMuxedInVideo&&
h.push(l);if(!a.M||!h.every(function(q){return q.endOfStream})){n.B(0);break}return H(n,a.g.ha.endOfStream(),18);case 18:vh(a.l),m=a.g.ha.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Fb(m),I(n)}})}
function An(a,b){if(Bn(b))return il(a.g.ha,b.stream.originalId||""),null;b.type==Ec&&jl(a.g.ha);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=Ec&&Qk(a.g.ha))return Cn(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.Za()));if(!Yk(a.g.ha)&&b.type!=Ec)return c/2;var d=a.g.Bc();if(b.type==="audio")for(var e=u(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.eb(d,!0),Em(f,d);e=b.Ra?b.Ra.endTime:d;var g=bl(a.g.ha,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.D);var h=a.j.presentationTimeline.getDuration()-e,k=al(a.g.ha,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&(c=a.h.get(Ec))&&Bn(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.Ba;k=Dn(a,b,d,k);if(!k)return a=Infinity,(b=b.Ra)&&(a=b.endTime-b.startTime),Math.min(a/2,c);g=b.xb;var l=k.ka;g&&l&&Jj(l,g)&&(g.g=l.g);g=!1;h&&b.Lg&&(g=!0,b.Lg=!1);h=Infinity;l=Array.from(a.h.values());l=u(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Bn(m)||m.Ba&&
!m.Ba.current()||(h=Math.min(h,m.Ra?m.Ra.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;b.na&&b.Ba&&!a.m.has(b.stream)&&(b.na.eb(k.startTime+.001),Em(b.na,k.startTime).catch(function(){}));if(un(a)&&En(a,b,k))return null;Fn(a,b,d,k,g).catch(function(){});b.Qc&&Gn(a,b.Qc,d,f);return null}
function Dn(a,b,c,d){if(b.Ba)return(c=b.Ba.current())&&b.Ra&&Math.abs(b.Ra.startTime-c.startTime)<.001&&(c=b.Ba.next().value),c;if(b.Ra||d)return c=b.Ra?b.Ra.endTime:d,a=a.g.Za()<0,b.stream.segmentIndex&&(b.Ba=b.stream.segmentIndex.fc(c,!1,a)),b.Ba&&b.Ba.next().value;d=a.j.sequenceMode||un(a)?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=a.g.Za()<0;var f=null;d&&(b.stream.segmentIndex&&(b.Ba=b.stream.segmentIndex.fc(e,!1,a)),f=b.Ba&&b.Ba.next().value);f||(b.stream.segmentIndex&&(b.Ba=
b.stream.segmentIndex.fc(c,!1,a)),f=b.Ba&&b.Ba.next().value);return f}
function Fn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B;return O(function(E){switch(E.g){case 1:f=Hc;g=b.stream;h=b.Ba;b.Sa=!0;va(E,2);if(d.Vc()==2)throw new V(1,1,1011);return H(E,Hn(a,b,d,e),4);case 4:vh(a.l);if(a.F)return E.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.u))return r=new Uint8Array(0),v=t=!1,z=function(C){var K,F,J,L;return O(function(P){switch(P.g){case 1:if(t)return P.return();
v=!0;vh(a.l);if(a.F)return P.return();va(P,2);r=wc(r,C);K=!1;F=0;(new Bh).box("mdat",function(Q){F=Q.size+Q.start;K=!0}).parse(r,!1,!0);if(!K){P.B(4);break}J=r.subarray(0,F);r=r.subarray(F);return H(P,In(a,b,c,g,d,J,!0,e),5);case 5:b.na&&b.Ba&&Em(b.na,d.startTime,!0);case 4:xa(P,0);break;case 2:w=L=ya(P),I(P)}})},H(E,Jn(a,b,d,z),9);n=Jn(a,b,d);return H(E,n,7);case 7:q=E.h;vh(a.l);if(a.F)return E.return();vh(a.l);return b.dc?(b.Sa=!1,hn(a,b,0),E.return()):H(E,In(a,b,c,g,d,q,!1,e),6);case 9:y=E.h;if(w)throw w;
if(v){E.B(10);break}t=!0;vh(a.l);return a.F?E.return():b.dc?(b.Sa=!1,hn(a,b,0),E.return()):H(E,In(a,b,c,g,d,y,!1,e),10);case 10:b.na&&b.Ba&&Em(b.na,d.startTime,!0);case 6:vh(a.l);if(a.F)return E.return();b.Ra=d;h.next();b.Sa=!1;b.Xh=!1;A=a.g.ha.Rc();D=A[b.type];hb(JSON.stringify(D));b.dc||(G=null,b.type===f.Ga?G=a.h.get(f.ia):b.type===f.ia&&(G=a.h.get(f.Ga)),G&&G.type==f.ia?a.g.Rd(d,b.stream,G.stream.isAudioMuxedInVideo,!1):a.g.Rd(d,b.stream,b.stream.codecs.includes(","),!1));$m(b);hn(a,b,0);xa(E,
0);break;case 2:B=ya(E);vh(a.l,B);if(a.F)return E.return();b.Sa=!1;if(B.code==7001)b.Sa=!1,$m(b),hn(a,b,0),E.B(0);else if(b.type==f.Va&&a.i.ignoreTextStreamFailures)a.h.delete(f.Va),E.B(0);else{if(B.code==3017)return H(E,Kn(a,b,B),0);b.xe=!0;B.category==1&&b.na&&Km(b.na,d);B.severity=2;return H(E,zn(a,b,B),0)}}})}
function Gn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w;return O(function(z){switch(z.g){case 1:e=Hc;f=b.stream;for(k=(h=(g=f.segmentIndex)&&g.fc(c))&&h.next().value;k&&a.O.includes(k.startTime);)k=h&&h.next().value;if(!k){z.B(0);break}l=k.ka;if(!l||Jj(l,b.xb)){z.B(3);break}b.xb=l;va(z,4);return H(z,Jn(a,b,l),6);case 6:m=z.h;var y=a.g.ha;y.D&&pd(y.D,m,0,f);a.O=[];xa(z,3);break;case 4:throw n=ya(z),b.xb=null,n;case 3:if(b.Ra&&b.Ra==k){z.B(0);break}b.Ra=k;va(z,8);return H(z,Jn(a,b,k),10);case 10:q=z.h;y=
a.g.ha;y.D&&pd(y.D,q,0,f);a.O.push(k.startTime);xa(z,9);break;case 8:throw r=ya(z),b.Ra=null,r;case 9:b.dc||(t=null,b.type===e.Ga?t=a.h.get(e.ia):b.type===e.ia&&(t=a.h.get(e.Ga)),t&&t.type==e.ia?a.g.Rd(k,b.stream,t.stream.isAudioMuxedInVideo,!0):a.g.Rd(k,b.stream,b.stream.codecs.includes(","),!0));v=Math.max.apply(Math,[0].concat(x(a.O)));w=a.g.Bc();if(w+d>v)return H(z,Gn(a,b,k.startTime,d),0);z.B(0)}})}
function Kn(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.g){case 1:d=Array.from(a.h.values());if(e=d.some(function(r){return r!=b&&r.Xh})){q.B(2);break}if(a.i.avoidEvictionOnQuotaExceededError){f=Ln(a,c);if(g=a.g.disableStream(b.stream,f))return q.return();hn(a,b,4);return q.return()}h=Math.round(100*a.D);if(h>20){a.D-=.2;q.B(3);break}if(h>4){a.D-=.04;q.B(3);break}k=Ln(a,c);l=a.g.disableStream(b.stream,k);if(!l){b.xe=!0;a.F=!0;a.g.onError(c);q.B(5);break}a.D=1;m=a.g.Bc();return H(q,
Mn(a,b,m),5);case 5:return q.return();case 3:return b.Xh=!0,n=a.g.Bc(),H(q,Mn(a,b,n),2);case 2:hn(a,b,4),I(q)}})}
function Hn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A;return O(function(D){switch(D.g){case 1:e=Hc;f=b.Ra==null;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.Z)-.1);k=Math.min(c.appendWindowEnd,a.W)+.1;l=c.codecs||b.stream.codecs;m=Bf(l);n=Cf(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.Of&&h==b.Ec&&k==b.Dc&&m==b.Mf&&n==b.Nf){D.B(2);break}r=b.Mf&&b.Nf&&El(a.g.ha,b.type,n,l,wn(a));if(!r){D.B(3);break}t=null;b.type===e.Ga?t=a.h.get(e.ia):b.type===e.ia&&(t=a.h.get(e.Ga));if(!t){D.B(3);
break}return H(D,an(t).catch(function(){}),5);case 5:t.xb=null,t.Ec=null,t.Dc=null,rn(a,t);case 3:return H(D,Nn(a,b,q,h,k,c,m,n),2);case 2:return Jj(c.ka,b.xb)||(b.xb=c.ka,c.l&&c.ka&&(v=Jn(a,b,c.ka),w=function(){var G,B,E,C,K,F,J,L,P,Q,N;return O(function(M){switch(M.g){case 1:return va(M,2),H(M,v,4);case 4:return G=M.h,vh(a.l),B=null,E=new Map,C={projection:null,hfov:null},b.stream&&(K=b.stream.videoLayout)&&(F=K.split("/"),F.includes("PROJ-RECT")?C.projection="rect":F.includes("PROJ-EQUI")?C.projection=
"equi":F.includes("PROJ-HEQU")?C.projection="hequ":F.includes("PROJ-PRIM")?C.projection="prim":F.includes("PROJ-AIV")&&(C.projection="hequ")),J=new Bh,J.box("moov",Gh).box("trak",Gh).box("mdia",Gh).X("mdhd",function(R){B=Wi(R.reader,R.version).timescale}).box("hdlr",function(R){R=R.reader;R.skip(8);switch(R.pd()){case "soun":E.set(e.ia,B);break;case "vide":E.set(e.Ga,B)}B=null}),b.type!==e.Ga||C.projection||J.box("minf",Gh).box("stbl",Gh).X("stsd",Ih).box("encv",Jh).box("avc1",Jh).box("avc3",Jh).box("hev1",
Jh).box("hvc1",Jh).box("dvav",Jh).box("dva1",Jh).box("dvh1",Jh).box("dvhe",Jh).box("dvc1",Jh).box("dvi1",Jh).box("vexu",Gh).box("proj",Gh).X("prji",function(R){R=R.reader.pd();C.projection=R}).box("hfov",function(R){R=R.reader.$()/1E3;C.hfov=R}),J.parse(G,!0,!0),b.type===e.Ga&&On(a,C),E.has(b.type)?c.ka.timescale=E.get(b.type):B!=null&&(c.ka.timescale=B),L=b.stream.segmentIndex,L instanceof mm&&(P=om(L,c.startTime)),Q=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,H(M,a.g.Pi(b.type,G),5);
case 5:return H(M,dl(a.g.ha,b.type,G,null,b.stream,Q,b.sd,d,!1,!1,P),6);case 6:xa(M,0);break;case 2:throw N=ya(M),b.xb=null,N;}})},z=c.startTime,f&&(y=al(a.g.ha,b.type),y!=null&&(z=y)),a.g.Xl(z,c.ka),g.push(w()))),A=b.Ra?b.Ra.i:-1,c.i!=A&&g.push(pl(a.g.ha,b.type,c.startTime)),H(D,Promise.all(g),0)}})}
function Nn(a,b,c,d,e,f,g,h){var k,l,m,n,q;return O(function(r){switch(r.g){case 1:k=Hc;l=wn(a);va(r,2);b.Ec=d;b.Dc=e;g&&(b.Mf=g);h&&(b.Nf=h);b.Of=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.Ga?n=a.h.get(k.ia):b.type===k.ia&&(n=a.h.get(k.Ga));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.B(4);break}return H(r,ml(a.g.ha,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return H(r,ml(a.g.ha,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:xa(r,
0);break;case 2:throw q=ya(r),b.Ec=null,b.Dc=null,b.Mf=null,b.Nf=null,b.Of=null,q;}})}
function In(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return O(function(r){switch(r.g){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.ka&&(m=e.ka.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new Bh).box("moof",Gh).box("traf",Gh).X("tfdt",function(t){var v,w,z,y,A,D;return O(function(G){v=Vi(t.reader,t.version);w=v.baseMediaDecodeTime;if(!w)return G.return();z=
-w/m;y=Number(b.Of)||0;if(!(y<z))return G.B(0);A=b.Ec;D=b.Dc;return H(G,Nn(a,b,z,A,D,e),0)})}).parse(f,!1,g)),H(r,Mn(a,b,c),2);case 2:return vh(a.l),q=b.sd,b.sd=!1,H(r,a.g.Pi(b.type,f),3);case 3:return H(r,dl(a.g.ha,b.type,f,e,d,k,q,h,g),4);case 4:vh(a.l),I(r)}})}
function Mn(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(q){if(q.g==1){a.H==b&&(a.H=null);d=b.stream.segmentIndex;d instanceof mm&&(d.eb(a.j.presentationTimeline.Mb()),e=[],nm(d,function(r){e.push(r.tf())}));f=Math.max(a.i.bufferBehind*a.D,a.j.presentationTimeline.h);g=Zk(a.g.ha,b.type);if(g==null)return q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.hc();m=a.j.presentationTimeline.Lb();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():H(q,a.g.ha.remove(b.type,g,g+n,e),
2)}if(q.g!=4)return vh(a.l),a.H?H(q,Mn(a,a.H,c),4):q.B(0);vh(a.l);I(q)})}function Bn(a){return a&&a.type==Ec&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function Jn(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.jc())return l.return(e);f=null;if(b.na){var m=b.na,n=m.g;c instanceof Ij&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.si=d),f=m.He):f=null}f||(f=xn(c,b.stream,d||null,a.i.retryParameters,a.g.Gc));g=0;b.Ba&&(g=b.Ba.h);b.ab=f;return H(l,f.promise,2);case 2:h=l.h;b.ab=null;k=h.data;if(!c.aesKey){l.B(3);break}return H(l,Tm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function xn(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof Kj?a:void 0,h=g?1:0;a=Xm(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(sh,a,{type:h,stream:b,segment:g,isPreload:f})}
function tn(a,b,c,d){var e,f;return O(function(g){if(g.g==1)return b.dc=!1,b.fe=!1,b.Dd=0,b.ec=!0,b.Ra=null,b.Ba=null,b.na&&!a.m.has(b.stream)&&Lm(b.na),d?(e=a.g.Bc(),f=a.g.ha.getDuration(),H(g,a.g.ha.remove(b.type,e+d,f),3)):H(g,ll(a.g.ha,b.type),4);if(g.g!=3)return vh(a.l),c?H(g,a.g.ha.flush(b.type),3):g.B(3);vh(a.l);b.ec=!1;b.endOfStream=!1;b.Sa||b.yb||hn(a,b,0);I(g)})}
function hn(a,b,c){var d=b.type;if(d!=Ec||a.h.has(d))b.yb=(new Rf(function(){var e;return O(function(f){if(f.g==1)return va(f,2),H(f,yn(a,b),4);if(f.g!=2)return xa(f,0);e=ya(f);if(a.g)a.g.onError(e);I(f)})})).Y(c)}function $m(a){a.yb!=null&&(a.yb.stop(),a.yb=null)}function an(a){return O(function(b){return a.ab?H(b,a.ab.abort(),0):b.B(0)})}
function zn(a,b,c){var d;return O(function(e){if(e.g==1)return c.code==3024?(b.Sa=!1,$m(b),hn(a,b,0),e.return()):H(e,Xg(a.V),2);vh(a.l);if(c.category===1&&c.code!=1003){if(b.$c)return kn(a,!1),e.return();d=Ln(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);I(e)})}function Ln(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function Cn(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return O(function(k){if(k.g==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||c-a.P<d)return k.return(!1);a.P=c}e=Hc;if(f=a.h.get(e.ia))$m(f),f.ab&&(f.ab.abort(),f.ab=null),f.xb=null,f.Ec=null,f.Dc=null,f.Sa=!1,f.dc=!1,f.Dd=0,f.fe=!1,f.ec=!1,f.Ba&&f.Ba.ai();if(g=a.h.get(e.Ga))$m(g),g.ab&&(g.ab.abort(),g.ab=null),g.xb=null,g.Ec=null,g.Dc=null,g.Sa=!1,g.dc=!1,g.Dd=0,g.fe=!1,g.ec=!1,g.Ba&&g.Ba.ai();h=a.g.video.paused;
return H(k,yl(a.g.ha,wn(a)),2)}!g||g.ec||g.Sa||g.yb||hn(a,g,0);!f||f.ec||f.Sa||f.yb||hn(a,f,0);h||a.g.video.play();return k.return(!0)})}function On(a,b){if(a.R.projection!=b.projection||a.R.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.R=b}}
function un(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=$b();if(!b.Pb()){b=u(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Hc.Va&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.qg())for(b=u(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Hc.Va&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=u(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(xf(c.value));return a.size>1}return!1}
function qn(a){a.G.Ta();un(a)&&(a.G.o(a.g.video,"waiting",function(){return vn(a)}),a.G.o(a.g.video,"timeupdate",function(){return vn(a)}))}function vn(a){if(un(a)){a.K.stop();var b=a.g.Bc(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.xb)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.K.Y(b)))}}
function En(a,b,c){if(b.type===Ec)return!1;var d=b.xb;if(!d)return!1;var e=c.ka;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=yf(Df(d.mimeType)),g=yf(Df(d.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}c&&(a.J||b.sd)&&(a.J=!1,Cn(a,!0).then(function(){var h=
(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new T("boundarycrossed",h))}));return c}function wn(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=al(a.g.ha,g.type),k=a.g.Bc();(g=Dn(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.u.audio;e&&(c(e),d.set("audio",e));if(e=a.u.video)c(e),d.set("video",e);b&&a.C&&d.set(Ec,a.C);return d};function Pn(){}
function Qn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?b[l]===void 0?n===void 0||h?delete a[l]:a[l]=Xd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Xd(n)),m=Qn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||b[l]==null||typeof b[l]!="function"&&b[l].constructor!=n.constructor?(cb("Invalid config, wrong type for "+m),
k=!1):typeof c[l]=="function"&&c[l].length!=b[l].length?(db("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(cb("Invalid config, unrecognized key "+m),k=!1)}return k}function Rn(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||a[e-1]!="\\")f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Sn(a,b){return a&&b}
function Tn(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])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?cd(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Pn);Pn.getDifferenceFromConfigObjects=Tn;Pn.convertToConfigObject=Rn;Pn.mergeConfigObjects=Qn;S("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Un(){}function Vn(a){a=jc(a);return(new qb(a)).Ib}function Wn(a,b,c){function d(h){Pb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Lb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new V(2,6,6015);var e;typeof b=="string"?e=mc(b,!0):e=b;a=jc(a);a=mc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Xn(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=jc(a).split("skd://").pop();return Wn(a,c,b)}
function Yn(a,b){a===2&&(a=b.drmInfo)&&Vb(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",Un);
Un.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&Vb(a.keySystem)){try{var c=ec(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Mb(rc(c)))}};Un.muxFairPlayRequest=function(a,b){Yn(a,b)};
Un.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&Vb(c.keySystem)&&Yn(a,b)}};Un.conaxFairPlayRequest=function(a,b){Yn(a,b)};Un.ezdrmFairPlayRequest=function(a,b){Yn(a,b)};Un.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&Vb(a.keySystem)&&(a=Lb(b.body),a=qc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=lc("spc="+a))};Un.muxInitDataTransform=function(a,b,c){return Xn(a,b,c)};
Un.expressplayInitDataTransform=function(a,b,c){return Xn(a,b,c)};Un.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=jc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Ob(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Wn(a,d,b)};Un.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=jc(a).split(";").pop();return Wn(a,c,b)};
Un.verimatrixInitDataTransform=function(a,b,c){return Xn(a,b,c)};Un.initDataTransform=Wn;Un.defaultGetContentId=Vn;Un.isFairPlaySupported=function(){var a;return O(function(b){if(b.g==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},va(b,2),H(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.g!=2)return b.return(!0);ya(b);return b.return(!1)})};function Zn(a,b,c){c=c===void 0?!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)}
Zn.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!$n(d,e))&&cd(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||$n(c,d))&&cd(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Zn.prototype.values=function(){return this.g.values()};function $n(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(c){return Bf(c)});b=b.codecs.split(",").map(function(c){return Bf(c)});return cd(a,b)}S("shaka.media.AdaptationSet",Zn);function ao(){this.h=this.g=null}ao.prototype.configure=function(a){this.g=a};ao.prototype.getConfiguration=function(){return this.g};
ao.prototype.create=function(a){var b;if(this.g.language){var c=bo(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=co(b,this.g.role);a.length&&(b=a);a=eo(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=fo(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=go(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=u(a),
c=a.next();!c.done;c=a.next())if(c=ho(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=io(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=jo(b,this.g.videoLabel),a.length&&(b=a));a=ko(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(x(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=u(a),c=a.next();!c.done;c=a.next())if(c=lo(b,c.value),c.length){b=c;break}a=$b();a=this.g.codecSwitchingStrategy==
"smooth"&&a.Pb();return this.h=new Zn(b[0],b,!a)};ao.prototype.getLastAdaptationSet=function(){return this.h};function bo(a,b){b=Lc(b);var c=Tc(b,a.map(function(d){return Sc(d)}));return c?a.filter(function(d){return c==Sc(d)}):[]}function co(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function eo(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function io(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function jo(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function ho(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 go(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=$b().Jd(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function fo(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function ko(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function lo(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function mo(){}
function no(){var a=Infinity,b=$b();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Wg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Vn(h),h=Wn(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";b.Pb()&&(d="smooth");var e={retryParameters:Wg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,
ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:oo,manifestPreprocessorTXml:po,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.wd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:oo,manifestPreprocessorTXml:po,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
f={trackSelectionCallback:function(h){return O(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return O(function(l){if(l.g==1)return navigator.storage&&navigator.storage.estimate?H(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return Sn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Wg(),failureCallback:function(h){return Sn([h])},rebufferingGoal:0,
bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],
disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,
loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return Sn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k,l){return Sn([h,k,l])},dispatchAllEmsgBoxes:!1,
useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new Mg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(ao,[null].concat(x(Ra.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,
playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,
disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return O(function(k){return k.return(qo(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.bb(g)}
function ro(){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 so(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 Qn(a,b,c||no(),d,"")}
function qo(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=$b().Jd(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Tc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Lc(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ec&&c.type!="image"||b.push(c);return b}function oo(a){return Sn([a],a)}function po(a){return Sn([a],a)}S("shaka.util.PlayerConfiguration",mo);mo.mergeConfigObjects=so;mo.createDefaultForLL=ro;mo.createDefault=no;function to(){this.g=null;this.h=[]}function uo(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 vo(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 wo(){this.i=this.h=null;this.g=[]}function xo(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 yo(){this.D=this.V=NaN;this.l="";this.j=this.qj=this.A=this.C=this.K=this.F=this.u=this.m=this.J=this.G=this.i=this.R=this.T=this.M=this.O=this.P=NaN;this.L=0;this.H=this.I=NaN;this.g=new to;this.h=new wo}function zo(a,b,c){a.P=b;a.O=c}function Ao(a,b,c){a.V=b;a.D=c}function Bo(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Co(a,b){a.j=isNaN(a.j)?b:a.j+b}
function Do(a){var b=a.V,c=a.D,d=a.l,e=a.C,f=a.O,g=a.P,h=a.M,k=a.T,l=a.R,m=a.A,n=a.i,q=a.G,r=a.J,t=a.m,v=uo(a.g,"playing"),w=uo(a.g,"paused"),z=uo(a.g,"buffering"),y=a.u,A=a.F,D=a.K,G=a.qj,B=a.j,E=a.L,C=a.I,K=a.H,F=vo(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:v,pauseTime:w,bufferingTime:z,licenseTime:y,liveLatency:A,maxSegmentDuration:D,manifestSizeBytes:G,bytesDownloaded:B,nonFatalErrorCount:E,manifestPeriodCount:C,manifestGapCount:K,stateHistory:F,switchHistory:J}};function Eo(a,b,c,d){kb.call(this);this.M=a;this.T=b;this.ya=d.networkingEngine;this.u=c;this.D=null;this.ua=0;this.La=d.Ed;this.G=d.Ql;this.Na=d.Rl;this.g=d.config;this.m=this.H=this.h=null;this.ea=!1;this.I=d.bm;this.oa=!1;this.j=null;this.Z=!1;this.A=null;this.L=new Map;this.sa=!1;this.Fa=d.am;this.V=new yo;this.aa=new Yg;this.C=new Yg;this.O=null;this.l=!1;this.W=d.vk;this.R=this.i=null;this.P=!1;this.K=[];this.J=[];this.F=!0}pa(Eo,kb);function Fo(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
function Go(a){if(a.J)for(var b=u(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function Ho(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=Eo.prototype;p.getStartTime=function(){return this.u};p.jd=function(){return this.M};p.yh=function(){return this.h};function Io(a){a.oa=!0;return a.I}p.getStats=function(){return this.V};function Jo(a){a.Z=!0;return a.j}p.il=function(){return this.i?sg(this.i):null};
p.hl=function(){return this.R?tg(this.R):null};function Ko(a){a.sa=!0;return a.L}
p.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return H(c,Promise.resolve(),2);case 2:return va(c,3),H(c,Lo(a),5);case 5:Mo(a);if("webkit"===window.shakaMediaKeysPolyfill){c.B(6);break}return H(c,No(a),7);case 7:Mo(a);case 6:return H(c,Oo(a),8);case 8:Mo(a);if(!a.W){c.B(9);break}return H(c,Po(a),10);case 10:Mo(a);case 9:if(!a.W||!a.j){c.B(11);break}return H(c,yi(a.j),12);case 12:Mo(a);case 11:a.C.resolve();xa(c,0);break;case 3:b=ya(c),b instanceof V&&(b.code==
7001||b.code==7003)||a.C.reject(b),I(c)}})})()};p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):kb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.C.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Mo(a){if(a.l)throw new V(2,7,7003);}function Qo(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
function Lo(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:Qo(a,"manifest-parser");a.m||(a.H=zd(a.M,a.T),a.m=a.H(),a.m.configure(a.g.manifest,function(){return a.F}));b=Date.now()/1E3;Qo(a,"manifest");if(a.h){h.B(2);break}return H(h,a.m.start(a.M,a.Na),3);case 3:return a.h=h.h,Ro(a.h),H(h,So(a),2);case 2:return a.aa.resolve(),c=new T("manifestparsed",void 0),H(h,Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new V(2,4,4036);Ro(a.h);d=Ni(a.G,a.h);if(!d){h.B(6);
break}e=new T("trackschanged",void 0);return H(h,Promise.resolve(),7);case 7:Mo(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,a.V.J=g,I(h)}})}
function No(a,b){var c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.h||a.j)return g.return();Qo(a,"drm-engine");a.ua=Date.now()/1E3;a.j=a.La();a.G.g=a.j;a.j.configure(a.g.drm,function(){return a.F});c=Bg(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.U());return H(g,Vh(a.j,c,a.h.offlineSessionIds,d),2);case 2:Mo(a);if(!b){g.B(3);break}return H(g,a.j.Ub(b),4);case 4:Mo(a);case 3:return H(g,Li(a.G,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new T("trackschanged",
void 0);return H(g,Promise.resolve(),7);case 7:a.dispatchEvent(f),I(g)}})}p.configure=function(a,b){a=Rn(a,b);so(this.g,a)};p.getConfiguration=function(){return Xd(this.g)};
function So(a){return O(function(b){a.D||(a.D=a.g.adaptationSetCriteriaFactory(),a.D.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:0,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,
preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.i||!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return b.B(0);a.i=To(a);return a.i?H(b,Uo(a.i),0):b.B(0)})}function Oo(a){return O(function(b){if(b.g==1)return!a.i||a.h.variants.includes(a.i)?b.B(0):H(b,Vo(a.i),3);a.i=To(a);return a.i?H(b,Uo(a.i),0):b.B(0)})}
function Po(a){var b,c,d,e,f;return O(function(g){!a.i&&(b=To(a))&&(a.i=b);if(!a.i)return g.B(0);c=a.h.presentationTimeline.U();d=[];e=a.i;e.video&&d.push(Wo(a,e.video,c));e.audio&&d.push(Wo(a,e.audio,c));(f=Cg(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&Kg(e.audio,f,a.g)&&(d.push(Wo(a,f,c)),a.R=f);return H(g,Promise.all(d),0)})}
function To(a){if(!a.A){var b=a.g.abrFactory;a.A=b();a.A.configure(a.g.abr)}b=Bg(a.h.variants);b=a.D.create(b);a.A.setVariants(Array.from(b.values()));return a.A.chooseVariant(!0)}
function Wo(a,b,c){var d,e,f,g,h;return O(function(k){if(k.g==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Cm(d,b,function(l,m,n){return xn(l,m,n||null,a.g.streaming.retryParameters,a.ya,a.F)},!1),a.L.set(b.id,e),b.segmentIndex?k.B(2):H(k,b.createSegmentIndex(),2);f=typeof a.u==="number"?a.u:0;g=b.segmentIndex.fc(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=vg(b.segmentIndex));return h?c?h.ka?H(k,Fm(e,h.ka),0):k.B(0):H(k,Em(e,h.startTime),0):k.B(0)})}
function Uo(a){var b,c,d,e;return O(function(f){b=[];c=u([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&!e.segmentIndex&&b.push(e.createSegmentIndex());return b.length>0?H(f,Promise.all(b),0):f.B(0)})}function Vo(a){var b,c,d,e;return O(function(f){b=[];c=u([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&e.segmentIndex&&e.closeSegmentIndex&&b.push(e.closeSegmentIndex());return b.length>0?H(f,Promise.all(b),0):f.B(0)})}p.Hm=function(){return this.C};
p.destroy=function(){var a=this,b,c,d;return O(function(e){if(e.g==1)return a.l=!0,!a.m||a.ea?e.B(2):H(e,a.m.stop(),2);if(e.g!=4)return a.A&&a.A.release(),a.I&&!a.oa&&a.I.release(),!a.j||a.Z?e.B(4):H(e,a.j.destroy(),4);if(a.L.size>0&&!a.sa)for(b=u(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Lm(d);I(e)})};function Ro(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",Eo);
Eo.prototype.destroy=Eo.prototype.destroy;Eo.prototype.waitForFinish=Eo.prototype.Hm;Eo.prototype.getPrefetchedTextTrack=Eo.prototype.hl;Eo.prototype.getPrefetchedVariantTrack=Eo.prototype.il;function Xo(a,b){kb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Bd:null,zd:Yo,ld:function(d,e){return Zo(c,"enter",d,e)}},{Bd:$o,zd:Yo,ld:function(d,e){return Zo(c,"enter",d,e)}},{Bd:ap,zd:Yo,ld:function(d,e){return Zo(c,"enter",d,e)}},{Bd:Yo,zd:$o,ld:function(d,e){return Zo(c,"exit",d,e)}},{Bd:Yo,zd:ap,ld:function(d,e){return Zo(c,"exit",d,e)}},{Bd:$o,zd:ap,ld:function(d,e){e?Zo(c,"skip",d,e):(Zo(c,"enter",d,e),Zo(c,"exit",d,e))}},{Bd:ap,zd:$o,ld:function(d,e){return Zo(c,"skip",
d,e)}}];this.h=new ed;this.h.o(this.i,"regionremove",function(d){c.g.delete(d.region)})}pa(Xo,kb);Xo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;kb.prototype.release.call(this)};
Xo.prototype.j=function(a,b){if(!this.l||a!=0){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?$o:a>d.endTime?ap:Yo;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Bd==e&&h.zd==f&&h.ld(d,b)}}};function Zo(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var $o=1,Yo=2,ap=3;/*
 @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 bp={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"},cp=u(Object.keys(bp)),dp=cp.next();!dp.done;dp=cp.next()){var ep=dp.value;bp[ep.toLowerCase()]=bp[ep]};function fp(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return fp(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=cf,e=a.fontStyle==df,f=a.textDecoration.includes(ef);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=gp(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=gp(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+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function gp(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&a.length>7&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function hp(a,b){var c=[];a=u(ip(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(hp(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=fp(d,b);c.push(e)}return c}
function ip(a){var b=[];a=u(a);for(var c=a.next(),d={};!c.done;d={Ug:void 0},c=a.next())d.Ug=c.value,b.some(function(e){return function(f){return Ue(e.Ug,f)}}(d))||b.push(d.Ug);return b}
function jp(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
function kp(a,b){var c=hp(b),d=[];b=a.cues?Array.from(a.cues):[];c=u(c);for(var e=c.next(),f={};!e.done;f={Ld:void 0},e=c.next())f.Ld=e.value,!b.some(function(g){return function(h){return h.startTime==g.Ld.startTime&&h.endTime==g.Ld.endTime&&h.text==g.Ld.payload?!0:!1}}(f))&&f.Ld.payload&&(e=jp(f.Ld))&&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 lp(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function mp(a){var b=this;this.i=a;this.l=new ed;this.j=null;this.h=new Map;this.g=-1;this.A=!1;this.u=null;this.D=function(){b.l.Ea(b.i,"textchanged",b.m);b.l.Ea(b.j.textTracks,"change",b.C);for(var c=u(b.h.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.i.Cc();d=u(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||(f.track.mode="disabled");b.h.delete(e.id)}else{f=
b.j.ownerDocument.createElement("track");f.kind=np(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in bp)h=bp[e.language];else{var k=Qc(e.language);k in bp&&(h=bp[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in bp&&(f.srclang=e.language);f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=u(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();
b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.A?"showing":"hidden")):b.g=-1);b.h=c};this.C=function(){if(!b.u){var c=b.j;b.u=(new Sf(function(){b.u=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=u(b.h),f=e.next();!f.done;f=e.next()){var g=u(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=u(b.h);
for(f=e.next();!f.done;f=e.next())g=u(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.kg({id:d}));b.i.ae(d>-1&&b.h.get(d).track.mode==="showing")}})).Y(0)}};this.l.o(a,"loaded",function(){return b.enableTextDisplayer()});this.enableTextDisplayer()}p=mp.prototype;p.configure=function(){};
p.remove=function(a,b){if(this.i)this.h.has(this.g)&&lp(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&kp(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.D(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.A};
p.setTextVisibility=function(a){this.A=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.Ac()===3)if(b=Array.from(this.i.zf().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,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=u(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.Ac()===2&&(this.j=this.i.zf(),this.l.qa(this.i,"unloading",this.D),this.l.o(this.i,"textchanged",this.m),this.l.o(this.j.textTracks,"change",this.C),this.m())};
function np(a){var b=$b();return a.forced&&b.Ja()==="WEBKIT"?"forced":a.kind==="caption"||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}S("shaka.text.NativeTextDisplayer",mp);mp.prototype.enableTextDisplayer=mp.prototype.enableTextDisplayer;mp.prototype.setTextLanguage=mp.prototype.setTextLanguage;mp.prototype.setTextVisibility=mp.prototype.setTextVisibility;
mp.prototype.isTextVisible=mp.prototype.isTextVisible;mp.prototype.destroy=mp.prototype.destroy;mp.prototype.append=mp.prototype.append;mp.prototype.remove=mp.prototype.remove;mp.prototype.configure=mp.prototype.configure;function op(a,b){kd("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,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=op.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;lp(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&kp(this.g,a)};p.destroy=function(){this.g&&(lp(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&pp(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){pp(this)};function pp(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
S("shaka.text.SimpleTextDisplayer",op);op.prototype.enableTextDisplayer=op.prototype.enableTextDisplayer;op.prototype.setTextLanguage=op.prototype.setTextLanguage;op.prototype.setTextVisibility=op.prototype.setTextVisibility;op.prototype.isTextVisible=op.prototype.isTextVisible;op.prototype.destroy=op.prototype.destroy;op.prototype.append=op.prototype.append;op.prototype.remove=op.prototype.remove;op.prototype.configure=op.prototype.configure;function qp(){}p=qp.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",qp);qp.prototype.enableTextDisplayer=qp.prototype.enableTextDisplayer;qp.prototype.setTextLanguage=qp.prototype.setTextLanguage;qp.prototype.setTextVisibility=qp.prototype.setTextVisibility;
qp.prototype.isTextVisible=qp.prototype.isTextVisible;qp.prototype.destroy=qp.prototype.destroy;qp.prototype.append=qp.prototype.append;qp.prototype.remove=qp.prototype.remove;qp.prototype.configure=qp.prototype.configure;function rp(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.u=b;this.D=this.A=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.C=new Sf(function(){c.j.paused||sp(c)});tp(this);this.l=new Map;this.i=new ed;this.i.o(document,"fullscreenchange",function(){sp(c,!0)});this.i.o(this.j,"seeking",function(){sp(c,!0)});
this.i.o(this.j,"ratechange",function(){tp(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.A=e/d:c.A=null});this.F=null;"ResizeObserver"in window&&(this.F=new ResizeObserver(function(){sp(c,!0)}),this.F.observe(this.g));this.G=new Map}p=rp.prototype;p.configure=function(a){this.D=a;tp(this);sp(this,!0)};
p.append=function(a){var b=[].concat(x(this.h));a=u(ip(a));for(var c=a.next(),d={};!c.done;d={Vg:void 0},c=a.next())d.Vg=c.value,b.some(function(e){return function(f){return Ue(f,e.Vg)}}(d))||this.h.push(d.Vg);this.h.length&&tp(this);sp(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&(this.C.stop(),this.C=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.F&&(this.F.disconnect(),this.F=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});sp(this,c>this.h.length);this.h.length||tp(this);return!0};
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.u.appendChild(this.g),sp(this,!0)):this.g.parentElement&&this.u.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function tp(a){a.C&&(a.h.length?a.C.xa((a.D?a.D.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.C.stop())}
function up(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function vp(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.qk:null;l&&(g.push(l.Wg),l.rd&&g.push(l.rd),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?up(a,n)||(f=!0):(wp(a,k,e),l=a.l.get(k),n=l.qk,f=!0));k.nestedCues.length>0&&n&&vp(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.rd?(d.rd.contains(c)&&d.rd.removeChild(c),c.appendChild(d.rd),d.rd.appendChild(d.Wg)):c.appendChild(d.Wg)}}function sp(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(b===void 0?0:b)){b=u(a.G.values());for(var d=b.next();!d.done;d=b.next())ck(d.value);ck(a.g);a.l.clear();a.G.clear()}a.m&&vp(a,a.h,a.g,c,[])}}
function wp(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=W(e);e!="br"&&xp(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.A===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Nd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Nd?"%":"px");if(a.G.has(c))c=a.G.get(c);else{e=W("span");var k=g.heightUnits==Nd?"%":"px",l=g.widthUnits==Nd?"%":"px",m=g.viewportAnchorUnits==
Nd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.A===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=
g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=b.displayAlign=="before"?"flex-start":
b.displayAlign=="center"?"center":"flex-end";a.G.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{Wg:f,qk:e,rd:c})}function yp(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Ie?c:a==="left"||a==="start"&&b===Ke||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===Ke?"line-right":"center"}
function xp(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=zp(c.linePadding,c,a.u);f.paddingRight=zp(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Ap(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=k)}if(h&&
!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
d=a.D?a.D.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=zp(c.fontSize||"1em",c,a.u,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==Me&&(g=1,h=16,a.A&&a.A<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==Le?(f.width="100%",c.lineAlign==Ne?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Ne?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ne?f.right=d+"%":c.lineAlign==
"end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=yp(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==Le?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==Le?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==Le?(f.left=c.position+"%",f.width="auto"):f.top=
c.position+"%",c.size&&(f.transform="translateX(-50%)"));f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Le?f.width=c.size+"%":f.height=c.size+"%")}
function zp(a,b,c,d){d=d===void 0?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Ap(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}S("shaka.text.UITextDisplayer",rp);rp.prototype.enableTextDisplayer=rp.prototype.enableTextDisplayer;
rp.prototype.setTextLanguage=rp.prototype.setTextLanguage;rp.prototype.setTextVisibility=rp.prototype.setTextVisibility;rp.prototype.isTextVisible=rp.prototype.isTextVisible;rp.prototype.remove=rp.prototype.remove;rp.prototype.destroy=rp.prototype.destroy;rp.prototype.append=rp.prototype.append;rp.prototype.configure=rp.prototype.configure;function Bp(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(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=hp(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 Je: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 Cp(a,b){this.g=b;this.j=a;this.m=new Map;this.l=void 0;this.F=!1;this.J=!0;this.A=this.I=!1;this.D=this.C=void 0;this.H=0;this.K={request:!1,response:!1,event:!1};this.u={};this.i=new ed;this.G=[];this.h=null}Cp.prototype.setMediaElement=function(a){this.h=a;Dp(this)};Cp.prototype.configure=function(a){this.g=a;Ep(this)};function Fp(a){a.m.clear();a.F=!1;a.J=!0;a.I=!1;a.A=!1;a.C=0;a.D=0;a.H=0;a.K={request:!1,response:!1,event:!1};Gp(a);a.u={};a.h=null;a.i.Ta()}
function Hp(a,b){a.A=b;a.A?a.l==Ip?a.l=Jp:a.l==Kp&&(a.l=Lp):a.l==Jp?a.l=Ip:a.l==Lp&&(a.l=Kp)}function Mp(a,b){if(a.g&&a.g.enabled&&(Np(a,"ps",{ud:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.H=b}).catch(function(){a.H=0})}}
function Op(a,b,c){try{if(!a.g.enabled)return b;var d=Pp(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=Qp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Rp;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=Sp;break a}e=void 0}d.ot=e;d.su=
!0;var f=Tp(d);return Up(b,f)}catch(g){return eb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function Dp(a){a.i.o(a.h,"playing",function(){a.D||(a.D=Date.now());Np(a,"ps",{ud:"p"})});a.i.o(a.h,"volumechange",function(){Np(a,a.h.muted?"m":"um")});a.i.o(a.h,"play",function(){a.C||(a.C=Date.now(),Np(a,"ps",{ud:"s"}))});a.i.o(a.h,"pause",function(){Np(a,"ps",{ud:"a"})});a.i.o(a.j,"buffering",function(){Np(a,"ps",{ud:"w"})});a.i.o(a.h,"seeking",function(){return Np(a,"ps",{ud:"k"})});a.i.o(document,"fullscreenchange",function(){Np(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.o(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?Np(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&Np(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.o(a.h,"enterpictureinpicture",function(){Np(a,"pe")});a.i.o(a.h,"leavepictureinpicture",function(){Np(a,"pc")});"documentPictureInPicture"in window&&a.i.o(window.documentPictureInPicture,"enter",function(c){Np(a,"pe");a.i.qa(c.window,"pagehide",function(){Np(a,"pc")})});
a.i.o(document,"visibilitychange",function(){document.hidden?Np(a,"b",{bg:!0}):Np(a,"b")});a.i.o(a.j,"complete",function(){Np(a,"ps",{ud:"e"})})}function Ep(a){Gp(a);var b=Vp(a);b=u(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=Wp),c>=1){var d=new Sf(function(){return Np(a,Xp)});d.xa(c);a.G.push(d)}}function Gp(a){if(a.G)for(var b=u(a.G),c=b.next();!c.done;c=b.next())c.value.stop();a.G=[]}
function Vp(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Yp&&b.enabled}):[]}function Zp(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===$p&&b.enabled===!0}):[]}function Pp(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function Np(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=aq(a,b,Yp);c=a.g.targets;if(!(a.g.version<bq)&&c){var d=Vp(a);c=Array.from(new Set([].concat(x(cq),x(dq))));d=u(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=eq(e.includeKeys||[],c);f.includes(fq)||f.push(fq);f=gq(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!hq.includes(h)||!(h!=="ps"||k&&iq.includes(k))||g&&g.length>0&&!g.includes(h))||jq(a,f,e)}}}
function kq(a,b,c){if(a.g.enabled){c=aq(a,c,vq);var d=wq({mode:vq,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.u[d]||(a.u[d]={request:1,response:1});c.sn=a.u[d].request++;d=a.g.includeKeys||[];var e=a.g.version==bq?Array.from(new Set([].concat(x(cq),x(xq)))):yq;d=eq(d,e);c=gq(c,d);zq(a,c,b,a.g.useHeaders)}}
function jq(a,b,c,d){var e=Wg(),f=c.url;if(c.useHeaders){b=Aq(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=mh([f],e);Object.assign(d.headers,b)}else{b=Tp(b);if(!b)return;f=Up(f,b);d&&(d.uri=f);d=mh([f],e)}a.j.Wb().request(9,d)}function zq(a,b,c,d){if(d){b=Aq(b);if(!Object.keys(b).length)return;Object.assign(c.headers,b)}else{var e=Tp(b);if(!e)return;c.uris=c.uris.map(function(f){return Up(f,e)})}Zp(a).length>0||!a.m.has(c)||a.m.delete(c)}
function eq(a,b){if(!a||a.length===0)return b;for(var c=u(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function gq(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function Bq(a){if(a.type===0)return Cq;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?Rp:Dq;if(b=="audio")return Qp;if(b=="text")return a.mimeType==="application/mp4"?Eq:Fq}}
function wq(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function Gq(a,b){b=a.j.Rc()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Hq(a,b){b=a.j.Rc()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Iq(a,b){var c=a.j.Nb();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Dq:return a.videoBandwidth||NaN;case Qp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Jq(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.U()?Kq:Lq};e.ot=Bq(b);var f=e.ot===Dq||e.ot===Qp||e.ot===Rp||e.ot===Eq;if(b=b.stream){var g=a.j.Za();if(f&&(e.bl=Gq(a,b.type),e.ot!==Eq)){var h=Hq(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.fc(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!dd(d.S(),g.S())){var k=g.S()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.Za()||1;c=Hq(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==Eq&&(e.tb=Iq(a,e.ot)/1E3);return e}
function aq(a,b,c){Object.assign(b,Pp(a));b.pr=a.j.Za();var d=b.ot===Dq||b.ot===Rp;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.J);a.j.U()&&(d=Mq(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.D&&a.C?a.D-(a.H||a.C):void 0;d==void 0||a.K[c]||(b.msd=d,a.K[c]=!0);return b}
function Tp(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function Aq(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Tp(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function Up(a,b){if(!b||a.includes("offline:"))return a;a=new qb(a);a.g.set("CMCD",b);return a.toString()}var Sp="m",Qp="a",Dq="v",Rp="av",Cq="i",Fq="c",Eq="tt",bq=2,Lq="v",Kq="l",Ip="d",Jp="ld",Kp="h",Lp="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:Ip,hn:Jp,HLS:Kp,jn:Lp,zn:"s",OTHER:"o"});
var yq="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),cq="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),xq="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Nq="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),dq=["e","sta"],hq="ps e t c b m um pe pc".split(" "),iq="spawkrfeqd".split(""),Wp=10,fq="ts",Xp="t",vq="request",$p="response",Yp="event";function Oq(a){this.h=a;this.g=null}p=Oq.prototype;p.configure=function(a){this.h=a};p.dj=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Pq)?this.g.get(Pq)*1E3:null};p.cj=function(){return this.h.enabled&&this.g&&this.g.has(Qq)?this.g.get(Qq)*1E3:null};p.kl=function(){return this.h.enabled&&this.g&&this.g.has(Rq)?this.g.get(Rq):null};p.ll=function(){return this.h.enabled&&this.g&&this.g.has(Sq)?this.g.get(Sq):null};
p.getBandwidthEstimate=function(a){var b=this.cj();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function Tq(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Oq);Oq.prototype.getBandwidthEstimate=Oq.prototype.getBandwidthEstimate;Oq.prototype.getRoundTripTime=Oq.prototype.ll;Oq.prototype.getResponseDelay=Oq.prototype.kl;Oq.prototype.getEstimatedThroughput=Oq.prototype.cj;
Oq.prototype.getMaxBitrate=Oq.prototype.dj;var Qq="etp",Pq="mb",Rq="rd",Sq="rtt";function Uq(){this.g=null;this.h=[]}function Vq(a,b){return O(function(c){if(c.g==1)return a.g?H(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;I(c)})}Uq.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function Wq(a,b,c){c=c===void 0?Number.EPSILON:c;if(a===b)return!0;a=Math.abs(a-b);return a<=c?!0:c!==Number.EPSILON?Math.abs(a-c)<=Number.EPSILON:!1};function X(a,b,c){b=b===void 0?null:b;kb.call(this);var d=this;this.m=Xq;this.h=null;this.Ue=b;this.W=!1;this.ef=new ed;this.Ve=new ed;this.j=new ed;this.mc=new ed;this.Xd=new ed;this.G=this.H=this.F=this.M=null;this.gf=0;this.Z=new Uq;this.O=this.Fa=this.V=this.i=this.Kc=this.I=this.l=this.Re=this.R=this.Ji=this.oa=this.K=this.jb=this.ya=this.Te=this.P=this.La=this.L=this.Ob=null;this.Na=!1;this.Ze=this.u=null;this.Ye=1E9;this.df=[];this.Jc=new Map;this.kb=[];this.Gg=-1;this.g=Yq(this);this.Ig=ro();
this.T=null;this.hf=-1;this.lc=null;this.sa={width:Infinity,height:Infinity};this.Xe=new Ki(this.g,this.sa,null);this.bf=[];this.C=null;this.J=this.g.adaptationSetCriteriaFactory();this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.ce=this.g.preferredTextLanguage;this.ie=this.g.preferredTextRole;this.ge=this.g.preferForcedSubs;this.We=[];c&&c(this);this.K=new Cp(this,this.g.cmcd);this.oa=new Oq(this.g.cmsd);this.M=Zq(this);this.aa=this.ea=this.ua=this.D=null;this.Kg=!1;this.Hg=[];this.Jg=
new Sf(function(){return O(function(e){if(e.g==1)return d.ea?H(e,d.Ub(d.aa,!0),3):e.B(0);if(e.g!=4)return H(e,d.load(d.ea),4);d.Kg?d.aa.pause():d.aa.play();d.ea=null;d.Kg=!1;I(e)})});$q&&(this.D=$q(),this.D.configure(this.g.ads),this.Xd.o(this.D,"ad-content-pause-requested",function(e){var f,g;return O(function(h){if(h.g==1){d.Jg.stop();if(d.ea)return h.B(0);d.aa=d.h;d.Kg=d.isEnded();f=e.saveLivePosition||!1;g=!0;d.U()&&(g=f);return H(h,d.Yi(!0,g),3)}d.ea=h.h;I(h)})}),this.Xd.o(this.D,"ad-content-resume-requested",
function(e){e=e.offset||0;if(d.ea){var f=d.ea;f.u&&e&&(typeof f.u==="number"?f.u+=e:f.u.setTime(f.u.getTime()+e*1E3))}d.Jg.Y(.1)}),this.Xd.o(this.D,"ad-content-attach-requested",function(){return O(function(e){if(e.g==1)return d.h||!d.aa?e.B(0):H(e,d.Ub(d.aa,!0),3);d.aa=null;I(e)})}));ar&&(this.ua=ar(this),this.ua.configure(this.g.queue));this.ef.o(window,"online",function(){br(d);d.bi()});this.$e=new Sf(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,k.disabledUntilTime>0&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.$e.stop();f&&cr(d,!1,void 0,!1,!1)});this.$a=null;a&&(kd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ub(a,!0));this.A=null}pa(X,kb);function dr(a){a.R!=null&&(qd(a.R),a.R.release(),a.R=null)}
function er(a,b,c){c||b.lcevc.enabled?(dr(a),a.R==null&&(a.R=new od(a.h,a.Ji,b.lcevc,c),a.H&&(a.H.D=a.R))):dr(a)}function fr(a,b){return new T(a,b)}p=X.prototype;
p.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.m==gr)return c.return();dr(a);b=a.detach();a.m=gr;return H(c,b,2);case 2:return H(c,a.Zg(),3);case 3:a.ef&&(a.ef.release(),a.ef=null);a.Ve&&(a.Ve.release(),a.Ve=null);a.j&&(a.j.release(),a.j=null);a.mc&&(a.mc.release(),a.mc=null);a.Xd&&(a.Xd.release(),a.Xd=null);a.Ze=null;a.g=null;a.C=null;a.Ue=null;a.K=null;a.oa=null;if(!a.M){c.B(4);break}return H(c,a.M.destroy(),5);case 5:a.M=null;case 4:a.u&&(a.u.release(),a.u=null),
a.ua&&(a.ua.destroy(),a.ua=null),kb.prototype.release.call(a),I(c)}})};function hr(a,b){ir.set(a,b)}function jr(){window.Promise||db("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;$b();return xd()?!0:yd().canPlayType("application/x-mpegurl")!=""}function kr(a,b){a.dispatchEvent(fr("onstatechange",(new Map).set("state",b)))}
p.Ub=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.m==gr)throw new V(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return H(g,c.detach(),2);case 2:return H(g,lr(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(kr(c,"attach"),e=function(){var h=mr(c,!1);h&&nr(c,h)},c.Ve.o(a,"error",e),c.h=a,c.K&&c.K.setMediaElement(a));$b();if(!b||!xd()||c.H){g.B(6);break}return H(g,or(c),6);case 6:Aa(g);c.Z.release();Ga(g,0);break;case 5:return f=
ya(g),H(g,c.detach(),10);case 10:throw f;}})};p.Li=function(a){this.Ji=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return O(function(c){if(c.g==1){if(b.m==gr)throw new V(2,7,7E3);return H(c,b.wc(!1,a),2)}if(c.g!=3)return H(c,lr(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Ve.Ta(),b.h=null),kr(b,"detach"),b.D&&!a&&b.D.release()}finally{b.Z.release()}I(c)})};
function lr(a,b){var c;return O(function(d){return d.g==1?(c=++a.gf,H(d,Vq(a.Z,b),2)):c!=a.gf?(a.Z.release(),d.return(!0)):d.return(!1)})}
p.wc=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;return O(function(A){switch(A.g){case 1:return c.m!=gr&&(c.m=Xq),H(A,lr(c,"unload"),2);case 2:if(A.h)return A.return();wa(A,3);c.Na=!1;kr(c,"unload");dr(c);d=c.We.map(function(D){return D()});c.We=[];return H(A,Promise.all(d),5);case 5:c.dispatchEvent(fr("unloading"));c.Te&&(c.Te.release(),c.Te=null);c.ya&&(c.ya.release(),c.ya=null);c.jb&&(c.jb.release(),c.jb=null);c.h&&(c.j.Ta(),c.mc.Ta());c.$e.stop();
c.Ob&&(c.Ob.release(),c.Ob=null);c.La&&(c.La.stop(),c.La=null);if(!c.I){A.B(6);break}return H(A,c.I.stop(),7);case 7:c.I=null,c.Kc=null;case 6:c.u&&c.u.stop();if(!c.l){A.B(8);break}return H(A,c.l.destroy(),9);case 9:c.l=null;case 8:c.L&&(c.L.release(),c.L=null);c.G&&(c.G.release(),c.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.F){A.B(10);break}return H(A,c.F.destroy(),11);case 11:c.F=null;case 10:if(!c.H){A.B(12);break}return H(A,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.D&&!b)c.D.onAssetUnload();
c.ea&&!b&&(c.ea.destroy(),c.ea=null);b||c.Jg.stop();c.K&&Fp(c.K);c.oa&&(c.oa.g=null);if(!c.A){A.B(14);break}return H(A,c.A.destroy(),15);case 15:c.A=null;case 14:c.W=!1;if(c.h){e=u(c.Hg);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Hg=[];ak(c.h)&&c.h.load()}if(!c.F){A.B(16);break}return H(A,c.F.destroy(),17);case 17:c.F=null;case 16:c.$a&&c.V!=c.$a.jd()&&(c.$a.l||c.$a.destroy(),c.$a=null);c.V=null;c.Fa=null;c.P=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())v=t.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(kg.clear(),Yb.clear());c.i=null;c.C=new yo;c.Ii=null;c.lc=null;c.T=null;c.hf=-1;c.df=[];w=u(c.Jc.values());for(z=w.next();!z.done;z=w.next())y=z.value,y.stop();c.Jc.clear();c.kb=[];c.Gg=-1;c.M&&c.M.Ti();
pr(c);case 3:Aa(A);c.Z.release();Ga(A,4);break;case 4:$b();if(a&&xd()&&!c.H&&c.h)return H(A,or(c),0);A.B(0)}})};p.Gm=function(a){this.O=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return O(function(y){switch(y.g){case 1:if(d.m==gr)throw new V(2,7,7E3);if(d.h||!d.aa){y.B(2);break}return H(y,d.Ub(d.aa,!0),3);case 3:d.aa=null;case 2:e=null;f="";if(a instanceof Eo){if(a.l)throw new V(2,7,7006);e=a;f=e.jd()||""}else f=a||"";return H(y,Vq(d.Z,"load"),4);case 4:d.Z.release();if(!d.h)throw new V(2,7,7002);if(!d.V){y.B(5);break}d.V=f;return H(y,d.wc(!1),5);case 5:g=++d.gf;h=function(){return O(function(A){if(A.g==
1)return d.gf==g?A.B(0):e?H(A,e.destroy(),3):A.B(3);throw new V(2,7,7E3);})};k=function(A,D){return O(function(G){switch(G.g){case 1:return wa(G,2),H(G,Vq(d.Z,D),4);case 4:return H(G,h(),5);case 5:return H(G,A(),6);case 6:return H(G,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Aa(G),d.Z.release(),Ga(G,0)}})};va(y,7,8);b==null&&e&&(b=e.getStartTime());d.O=b;d.Na=!1;d.dispatchEvent(fr("loading"));if(e){c=e.T;y.B(10);break}if(c){y.B(10);break}return H(y,k(function(){return O(function(A){if(A.g==1)return H(A,
qr(d,f),2);c=A.h;I(A)})},"guessMimeType_"),10);case 10:l=!!e;if(e){Ho(e,d);d.C=e.getStats();y.B(13);break}return H(y,rr(d,f,b,c,!0,d.g),14);case 14:(e=y.h)?(e.F=!1,Ho(e,d),d.C=e.getStats(),e.start(),e.C.catch(function(){})):d.C=new yo;case 13:m=!e;n=Date.now()/1E3;d.C=e?e.getStats():new yo;d.V=f;d.Fa=c||null;pr(d);q=function(){var A=d.h?d.h.buffered:null;return{start:Qj(A)||0,end:Rj(A)||0}};d.ya=new zm(q);d.ya.addEventListener("regionadd",function(A){sr(d,A.region,"metadataadded")});if(m)return H(y,
k(function(){return O(function(A){return H(A,tr(d,c),0)})},"initializeSrcEqualsDrmInner_"),25);d.jb=new zm(q);return H(y,k(function(){return O(function(A){if(A.g==1)return H(A,Promise.race([e.aa,e.C]),2);d.Kc=e.H;var D=e;D.ea=!0;d.I=D.m;d.i=e.yh();I(A)})},"waitForFinish"),17);case 17:if(d.H){y.B(18);break}return H(y,k(function(){return O(function(A){return H(A,or(d),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return d.i&&d.i.textStreams.length&&(d.A.enableTextDisplayer?d.A.enableTextDisplayer():
kd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),H(y,k(function(){return O(function(A){return H(A,e.C,0)})},"waitForFinish"),20);case 20:d.g=e.getConfiguration();d.Xe=e.G;d.I&&d.I.setMediaElement&&d.h&&d.I.setMediaElement(d.h);d.Te=Io(e);d.Re=e.Fa;if(r=e.D)d.J=r;l&&d.h&&d.h.nodeName==="AUDIO"&&(ur(d),d.configure("manifest.disableVideo",!0));if(e.j){y.B(21);break}return H(y,k(function(){return O(function(A){return H(A,No(e,d.h),0)})},"drmEngine_.init"),
21);case 21:return d.F=Jo(e),H(y,k(function(){return O(function(A){return H(A,d.F.Ub(d.h),0)})},"drmEngine_.attach"),23);case 23:return t=d.g.abrFactory,d.u&&d.Ze==t||(d.Ze=t,d.u&&d.u.release(),d.u=t(),typeof d.u.setMediaElement!="function"&&(kd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.u.setMediaElement=function(){}),typeof d.u.setCmsdManager!="function"&&(kd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),
d.u.setCmsdManager=function(){}),typeof d.u.trySuggestStreams!="function"&&(kd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.u.trySuggestStreams=function(){}),d.u.configure(d.g.abr)),v=Ko(e),w=e.i,H(y,k(function(){return O(function(A){return H(A,vr(d,n,w,v),0)})},"loadInner_"),24);case 24:Go(e);d.Fa&&$b().pg()&&Ef(d.Fa)&&Nk(d.H,d.V,d.Fa);y.B(16);break;case 25:return H(y,k(function(){return O(function(A){return H(A,wr(d,n,c),0)})},"srcEqualsInner_"),
16);case 16:d.dispatchEvent(fr("loaded"));case 8:Aa(y);if(!e){y.B(27);break}return H(y,e.destroy(),27);case 27:d.$a=null;Ga(y,0);break;case 7:z=ya(y);if(!z||z.code==7E3){y.B(29);break}return H(y,d.wc(!1),29);case 29:throw z;}})};function ur(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.ik=function(a,b,c){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return O(function(f){return f.g==1?H(f,xr(d,c),2):f.g!=3?(e=f.h,H(f,d.wc(a,b),3)):f.return(e)})};p.Yi=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return O(function(e){return e.g==1?H(e,xr(c,b),2):e.g!=3?(d=e.h,H(e,c.detach(a),3)):e.return(d)})};
function xr(a,b){b=b===void 0?!1:b;var c,d,e;return O(function(f){if(f.g==1){c=null;if(!(a.i&&a.I&&a.Kc&&a.V&&a.g))return f.B(2);d=a.h.currentTime;b||(d=null);return H(f,yr(a,a.V,d,a.Fa,a.g,!0,!1),3)}if(f.g!=2){c=f.h;a.bf.push(c);a.I&&a.I.setMediaElement&&a.I.setMediaElement(null);if(e=a.l?a.l.u:null)c.i=e;var g=c,h=a.I,k=a.Kc;g.h=a.i;g.m=h;g.H=k;c.D=a.J;c.start();a.i=null;a.I=null;a.Kc=null;a.u=null;a.Ze=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g;return O(function(h){if(h.g==1)return f=Yq(e),so(f,d||e.g,Yq(e)),H(h,rr(e,a,b,c,!1,f),2);(g=h.h)?g.start():nr(e,new V(2,7,7005));return h.return(g)})};p.Zg=function(){var a=this,b,c,d,e;return O(function(f){b=[];c=u(a.bf);for(d=c.next();!d.done;d=c.next())e=d.value,e.l||b.push(e.destroy());a.bf=[];return H(f,Promise.all(b),0)})};
function rr(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return O(function(m){if(m.g==1)return d?m.B(2):H(m,qr(a,b),3);m.g!=2&&(d=m.h);if(g=zr(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=yr(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.F=!1;return n}):l.then(function(n){a.bf.push(n);return n});return m.return(l)})}
function yr(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,r,t,v,w,z,y,A,D,G;return O(function(B){if(B.g==1){h=null;k=Xd(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.P&&h.l?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.sa.width!=Infinity||a.sa.height!=Infinity||a.g.ignoreHardwareResolution)return B.B(2);n=$b();return H(B,n.yc(),3)}B.g!=2&&(q=B.h,a.sa.width=q.width,a.sa.height=q.height);r=new Ki(k,a.sa,null);t={networkingEngine:a.M,filter:function(E){var C,
K;return O(function(F){if(F.g==1)return H(F,Li(r,E),2);if(F.g!=4){C=F.h;if(!C)return F.B(0);K=fr("trackschanged");return H(F,Promise.resolve(),4)}h.dispatchEvent(K);I(F)})},makeTextStreamsForClosedCaptions:function(E){return Ar(a,E)},onTimelineRegionAdded:function(E){Am(h.I,E)},onEvent:function(E){return h.dispatchEvent(E)},onError:function(E){return h.onError(E)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&h.P&&a.l.updateDuration()},newDrmInfo:function(E){var C=
h.j,K=C?C.g:null;K&&C.C&&Oi(r,K.keySystem,E)},onManifestUpdated:function(){var E=(new Map).set("isLive",a.U());h.dispatchEvent(fr("manifestupdated",E));Fo(h,!1,function(){if(a.D)a.D.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},onMetadata:function(E,C,K,F){var J=E;if(E=="com.apple.hls.interstitial"||E=="com.apple.hls.overlay")if(J="com.apple.quicktime.HLS",E={startTime:C,endTime:K,values:F},a.D)a.D.onHLSInterstitialMetadata(a,a.h,E);F=u(F);E=F.next();
for(var L={};!E.done;L={Vh:void 0},E=F.next())L.Vh=E.value,L.Vh.name!="ID"&&Fo(h,!1,function(P){return function(){Br(a,C,K,J,P.Vh)}}(L))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,C){return a.addFont(E,C)}};v=new zm(function(){return a.wa()});v.addEventListener("regionadd",function(E){var C=E.region;Cr(a,"timelineregionadded",C,h);Fo(h,!1,function(){a.D&&(a.D.onDashTimedMetadata(C),a.D.onDASHInterstitialMetadata(a,a.h,C))})});w=null;k.streaming.observeQualityChanges&&
(w=new tm(function(){return a.Rc()}),w.addEventListener("qualitychange",function(E){Dr(a,E.quality,E.position)}),w.addEventListener("audiotrackchange",function(E){Dr(a,E.quality,E.position,!0)}));z=!0;y={Gc:a.M,onError:function(E){return h.onError(E)},Xf:function(E){Fo(h,!0,function(){a.F&&Er(a,E)})},onExpirationUpdated:function(E,C){var K=fr("expirationupdated");h.dispatchEvent(K);if((K=h.m)&&K.onExpirationUpdated)K.onExpirationUpdated(E,C)},onEvent:function(E){h.dispatchEvent(E);E.type=="drmsessionupdate"&&
z&&(z=!1,E=Date.now()/1E3-h.ua,(a.C||h.getStats()).m=E,a.R&&qd(a.R))}};A=Zq(a,l);lh(a.M,A);D=function(){return a.Ed(y)};G={config:k,Rl:t,bm:v,am:w,Ed:D,Ql:r,networkingEngine:A,vk:f};h=new Eo(b,d,c,G);return B.return(h)})}
function qr(a,b){var c,d,e,f;return O(function(g){if(g.g==1)return c=a.g.manifest.retryParameters,H(g,Um(b,a.M,c),2);d=g.h;d=="application/x-mpegurl"&&(e=$b(),e.Ja()==="WEBKIT"&&(d="application/vnd.apple.mpegurl"));d=="video/quicktime"&&(f=$b(),f.Ja()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function zr(a,b){if(!xd($b()))return!0;if(b){if((a.h||yd()).canPlayType(b)=="")return!1;if(!xd($b())||!vd.has(b.toLowerCase()))return!0;if(Ef(b))return $b().Ja()==="WEBKIT"&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function Fr(a,b){var c=a.g.textDisplayFactory;a.Ii!==c||(b===void 0?0:b)?(b=a.A,a.A=c(),a.A.configure?a.A.configure(a.g.textDisplayer):kd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.A.setTextLanguage||kd("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.A.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.A.setTextVisibility(a.W),a.H&&vl(a.H,a.A),a.Ii=c,a.l&&on(a.l)):a.A&&a.A.configure&&a.A.configure(a.g.textDisplayer)}
function or(a){var b,c,d;return O(function(e){if(e.g==1)return $b(),kr(a,"media-source"),a.g.mediaSource.useSourceElements&&ak(a.h),Fr(a),b=Gr(a.h,a.A,{Wk: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&&typeof k.cueTime=="number"&&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())Br(a,l,m,"org.id3",q.value);if(a.D)a.D.onHlsTimedMetadata(k,l)}},Wl:function(f){a.jb&&Am(a.jb,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Yl:function(){a.I&&a.I.update&&a.I.update()}},a.R,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Fa=d,H(e,b.L,2);a.H=b;I(e)})}
function Hr(a,b,c){function d(){return Ir(a)}a.j.o(b,"playing",d);a.j.o(b,"pause",d);a.j.o(b,"ended",d);a.j.o(b,"ratechange",function(){var f=a.h.playbackRate;f!=0&&(a.L&&(a.L.set(f),a.m==Jr&&a.u.playbackRateChanged(f),Kr(a,f)),f=fr("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.o(b.remote,"connect",function(){a.l&&b.remote.state=="connected"&&Lr(a);Mr(a)}),a.j.o(b.remote,"connecting",function(){return Mr(a)}),a.j.o(b.remote,"disconnect",function(){return O(function(f){if(f.g==1)return a.l&&b.remote.state==
"disconnected"?H(f,Cn(a.l),3):f.B(2);f.g!=2&&Lr(a);Mr(a);I(f)})}));b.audioTracks&&(a.j.o(b.audioTracks,"addtrack",function(){return Mr(a)}),a.j.o(b.audioTracks,"removetrack",function(){return Mr(a)}),a.j.o(b.audioTracks,"change",function(){return Mr(a)}));b.videoTracks&&(a.j.o(b.videoTracks,"addtrack",function(){return Mr(a)}),a.j.o(b.videoTracks,"removetrack",function(){return Mr(a)}),a.j.o(b.videoTracks,"change",function(){return Mr(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&
a.j.o(b,"webkitpresentationmodechanged",function(){a.Ue&&Fr(a,!0)});if(b.textTracks){var e=function(){a.m===Nr&&a.A instanceof mp&&Lr(a);Mr(a)};a.j.o(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Or(a,f);break;case "chapters":Pr(a,f);break;default:e()}});a.j.o(b.textTracks,"removetrack",e);a.j.o(b.textTracks,"change",e)}b.preload!="none"&&a.j.qa(b,"loadedmetadata",function(){a.C.G=Date.now()/1E3-c})}
function vr(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N;return O(function(M){switch(M.g){case 1:kr(a,"load");e=a.h;a.L=new pm({Bf:function(){return e.playbackRate},kd:function(){return e.defaultPlaybackRate},li:function(R){e.playbackRate=R},wj:function(R){e.currentTime+=R}});Hr(a,e,b);"onchange"in window.screen&&a.j.o(window.screen,"change",function(){if(a.J.getConfiguration){var R=a.J.getConfiguration();R.hdrLevel=="AUTO"?Qr(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&
(R.hdrLevel="AUTO",a.J.configure(R),Qr(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=rd(l));er(a,a.g,f);a.ce=a.g.preferredTextLanguage;a.ie=a.g.preferredTextRole;a.ge=a.g.preferForcedSubs;Rr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(R,U,ra){a.i&&a.l&&R!=a.l.u&&Sr(a,R,!0,U===void 0?!1:U,ra===void 0?0:ra)});a.u.setMediaElement(e);a.u.setCmsdManager(a.oa);a.l=Tr(a);a.l.configure(a.g.streaming);
a.m=Jr;a.dispatchEvent(fr("streaming"));m=c;case 2:(q=a.l.u)||m||(m=Ur(a,!0));r=[];n=q||m;t=u([n.video,n.audio]);for(v=t.next();!v.done;v=t.next())(w=v.value)&&!w.segmentIndex&&(r.push(w.createSegmentIndex()),w.dependencyStream&&r.push(w.dependencyStream.createSegmentIndex()));if(!(r.length>0)){M.B(4);break}return H(M,Promise.all(r),4);case 4:if(!n||n.disabledUntilTime!=0){M.B(2);break}Qr(a);if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
a.configure(a.Ig):db("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&&(Hp(a.K,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),Mp(a.K,b*1E3));Rr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);dn(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Na=!0;a.dispatchEvent(fr("canupdatestarttime"));z=function(R){a.G=Vr(a,R);a.Ob=Wr(a,R);Xr(a,e,!1)};
a.g.streaming.startAtSegmentBoundary||(y=a.O,y==null&&a.i.startTime&&(y=a.i.startTime),z(y));if(q){M.B(7);break}if(!a.g.streaming.startAtSegmentBoundary){M.B(8);break}A=a.i.presentationTimeline;a.O instanceof Date&&(G=A.m||A.i,B=a.O.getTime()/1E3-G,B!=null&&(D=B));D==null&&(D=typeof a.O==="number"?a.O:a.h.currentTime);a.O==null&&a.i.startTime&&(D=a.i.startTime);E=A.hc();C=A.Lb();D<E?D=E:D>C&&(D=C);return H(M,Yr(m,D),9);case 9:K=M.h,z(K);case 8:Sr(a,m,!0,!1,0);case 7:return a.G.ready(),F=a.Cc().find(function(R){return R.active}),
F||((J=Cg(a.i.textStreams,a.ce,a.ie,a.ge)[0]||null)&&xo(a.C.h,J,!0),m&&(J?(Kg(m.audio,J,a.g)&&(a.W=!0),a.W&&a.A.setTextVisibility(!0)):(a.W=!1,a.A.setTextVisibility(!1)),Zr(a)),J&&(a.g.streaming.alwaysStreamText||a.Yc())&&(nn(a.l,J),$r(a))),H(M,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.u.enable(),as(a));Mr(a);a.i.variants.some(function(R){return R.primary});if((L=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)P=
function(){return bs(a)},a.j.o(e,"timeupdate",P);L||(Q=function(){return cs(a)},a.j.o(e,"timeupdate",Q),cs(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>0&&(N=function(){var R;return O(function(U){if(U.g==1){R=a.wa().end-a.h.currentTime;if(isNaN(R)||!(R<=a.g.streaming.preloadNextUrlWindow))return U.B(0);a.j.Ea(e,"timeupdate",N);return H(U,a.preload(a.i.nextUrl),4)}a.$a=U.h;I(U)})},a.j.o(e,"timeupdate",N)),a.j.o(e,"ended",function(){a.load(a.$a||a.i.nextUrl)})));if(a.D)a.D.onManifestUpdated(L);
I(M)}})}function tr(a,b){var c,d,e;return O(function(f){return f.g==1?(c=Date.now()/1E3,d=!0,a.F=a.Ed({Gc:a.M,onError:function(g){nr(a,g)},Xf:function(){},onExpirationUpdated:function(){var g=fr("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);g.type=="drmsessionupdate"&&d&&(d=!1,a.C.m=Date.now()/1E3-c)}}),a.F.configure(a.g.drm),e=Lg([b]),a.F.O=!0,H(f,Vh(a.F,[e],[]),2)):H(f,a.F.Ub(a.h),0)})}
function wr(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;return O(function(v){switch(v.g){case 1:kr(a,"src-equals");d=a.h;a.G=new bm(d);e=!1;a.We.push(function(){e=!0});a.dispatchEvent(fr("canupdatestarttime"));a.O!=null&&a.G.Fg(a.O);a.Ob=ds(a,a.O||0);a.L=new pm({Bf:function(){return d.playbackRate},kd:function(){return d.defaultPlaybackRate},li:function(w){d.playbackRate=w},wj:function(w){d.currentTime+=w}});Xr(a,d,!0);d.textTracks&&(Fr(a),f=function(w){if(!(a.A instanceof mp)){var z=es(a).find(function(y){return y.mode!==
"disabled"});z&&(z.mode=w?"showing":"hidden");a.A instanceof op&&(z=fs(a))&&(z.mode=!w&&a.A.isTextVisible()?"showing":"hidden")}},a.j.o(d,"enterpictureinpicture",function(){return f(!0)}),a.j.o(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.o(d.remote,"connect",function(){return f(!1)}),a.j.o(d.remote,"connecting",function(){return f(!1)}),a.j.o(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.o(d,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.o(g,"webkitpresentationmodechanged",function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));Hr(a,d,b);h=Op(a.K,a.V,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.H){v.B(2);break}return H(v,
a.H.destroy(),3);case 3:a.H=null;case 2:return ak(d),d.src=h,k=$b(),k.Oa()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&Ef(c)&&k.Ja()==="WEBKIT"&&d.load(),a.m=Nr,a.dispatchEvent(fr("streaming")),l=function(){return new Promise(function(w){var z=new Sf(w);a.j.o(d.textTracks,"change",function(){return z.Y(.5)});z.Y(.5)})},m=new Yg,Tl(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){return O(function(w){if(w.g==1)return a.G.ready(),a.Fa&&Ef(a.Fa)?H(w,l(),3):(m.resolve(),w.B(0));m.resolve();I(w)})}),
Tl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,z,y,A,D;return O(function(G){if(G.g==1)return H(G,l(),2);if(e)return G.return();gs(a);w=es(a);w.some(function(B){return B.mode==="showing"})&&(a.W=!0,a.A.setTextVisibility(!0));if(!(a.A instanceof mp))for(w.length&&(a.A.enableTextDisplayer?a.A.enableTextDisplayer():kd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),z=!1,y=u(w),A=y.next();!A.done;A=y.next())D=A.value,D.mode!=="disabled"&&
(z?(D.mode="disabled",db("Found more than one enabled text track, disabling it",D)):(hs(a,D),z=!0));is(a);I(G)})}),d.error?m.reject(mr(a)):d.preload=="none"&&(db('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.'),m.resolve()),a.j.qa(d,"error",function(){m.reject(mr(a))}),H(v,Wf(a.g.streaming.loadTimeout,m),4);case 4:if((n=
a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return bs(a)},a.j.o(d,"timeupdate",q);n||(r=function(){return cs(a)},a.j.o(d,"timeupdate",r),cs(a));a.D&&(a.D.onManifestUpdated(n),n&&(t=a.wa().end,a.j.o(d,"progress",function(){var w=a.wa().end;t!=w&&(a.D.onManifestUpdated(a.U()),t=w)})));a.Na=!0;I(v)}})}function gs(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Mj(b,a.g.preferredAudioRole)}
function is(a){var b=a.g.preferredTextLanguage;b!=""&&a.ei(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Or(a,b){if(b.kind=="metadata"){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,Br(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value);if(b.cues){d=[];e=u(b.cues);for(var f=e.next(),g={};!f.done;g={Pc:void 0},f=e.next())g.Pc=f.value,g.Pc.type=="com.apple.quicktime.HLS"&&g.Pc.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Pc.startTime&&k.endTime==h.Pc.endTime}}(g)),
f||(f={startTime:g.Pc.startTime,endTime:g.Pc.endTime,values:[]},d.push(f)),f.values.push(g.Pc.value));d=u(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.D&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.D.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Sf(function(){var d=js(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ka().Y(.5);
a.We.push(function(){c.stop()})}}function sr(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(fr(c,b))}function Br(a,b,c,d,e){a.ya&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Am(a.ya,b))}function Pr(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Sf(function(){b.mode="hidden"})).Ka().Y(.5);a.We.push(function(){c.stop()})}}
p.hm=function(){for(var a=this.Z;a.g;)a.release()};p.Ed=function(a){return new Oh(a)};
function Zq(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?Fo(b(),!0,f):f()}b||(b=function(){return null});var e=new hh(function(f,g,h,k,l){d(function(){a.u&&a.u.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(fr("downloadheadersreceived",g));d(function(){if(a.oa){var k=a.oa;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],Tq(q[1]))}}catch(z){}if(m=f["cmsd-dynamic"]){a:{try{var r=new Map,t=m.split(";");for(m=1;m<t.length;m++){var v=t[m].split("=");r.set(v[0],Tq(v[1]))}var w=r;break a}catch(z){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(fr("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(fr("downloadfailed",f))},function(f,g,h){d(function(){if(a.K){var k=a.K,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")kq(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.A?Jp:Ip;break a;case 3:case 2:m=k.A?Lp:Kp;break a;case 5:m="s";break a}m=void 0}k.l=m}kq(k,g,{ot:Sp,su:!k.F})}}catch(q){eb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case sh:try{if(k.g.enabled){var n=Jq(k,l,g.uris[0]);n.ts=Date.now();k.m.has(g)&&k.m.delete(g);k.m.set(g,n.ts);kq(k,g,n)}}catch(q){eb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:kq(k,g,{ot:"k"});break;case 4:kq(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().m:a.I)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.C;l&&(Co(l,k),f===0&&(l.qj=k));k=a.K;h=h===void 0?{}:h;if(Zp(k).length!==0)switch(f){case sh:try{var m=Jq(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var r=q.toString()}catch(E){r=n}else r=n;m.url=r;k.m.has(g.originalRequest)?(m.ts=k.m.get(g.originalRequest),k.m.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var t=Zp(k);if(t.length!==0){var v=k.g.version==bq?Array.from(new Set([].concat(x(cq),x(Nq)))):yq;m.rc=g.status||0;var w=aq(k,m,$p);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var z=u(t),y=z.next();!y.done;y=z.next()){var A=y.value,D=eq(A.includeKeys||[],v),G=wq(A);k.u[G]||(k.u[G]={request:1,response:1});w.sn=k.u[G].response++;var B=gq(w,D);jq(k,B,A,g)}}}catch(E){eb("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",E)}}}});e.configure(a.g.networking);return e}
function Vr(a,b){return new em(a.h,a.i,a.g.streaming,b,function(){a.Ob&&sm(a.Ob,!a.G.Gi());a.l&&a.l.sd();a.P&&ks(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function Wr(a,b){var c=a.U()||typeof b==="number"&&b>0;b=new Xo(a.Te,c);b.addEventListener("enter",function(f){Cr(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){Cr(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(Cr(a,"timelineregionenter",g),Cr(a,"timelineregionexit",g))});var d=new Xo(a.ya,c);d.addEventListener("enter",function(f){sr(a,f.region,"metadata")});c=new Xo(a.jb,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(fr("emsg",f))});var e=new rm(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.Re&&e.g.add(a.Re);return e}function ds(a,b){b=new Xo(a.ya,b instanceof Date||b>0);b.addEventListener("enter",function(d){sr(a,d.region,"metadata")});var c=new rm(a.h);c.g.add(b);return c}
function Xr(a,b,c){a.P=new Gi;Ji(a.P,Ii);ls(a);pr(a);a.La=new Sf(function(){ks(a)});a.g.streaming.rebufferingGoal&&a.La.xa(.25);a.j.o(b,"waiting",function(){return ks(a,"waiting")});a.j.o(b,"canplaythrough",function(){return ks(a,"canplaythrough")});a.j.o(b,"playing",function(){return ks(a,"playing")});a.j.o(b,"seeked",function(){return ks(a,"seeked")});a.j.o(b,"timeupdate",function(){return ks(a,"timeupdate")});c&&(a.j.o(b,"progress",function(){return ks(a,"progress")}),a.j.o(b,"stalled",function(){return ks(a,
"stalled")}))}function ls(a){var b=a.g.streaming.rebufferingGoal;a.P.j.set(Hi,Math.min(.5,b/2)).set(Ii,b)}
function ks(a,b){if(a.g.streaming.rebufferingGoal){b=a.H?Pk(a.H):!1;b=a.isEnded()||b||a.G.mj();var c=Tj(a.h.buffered,a.h.currentTime),d=a.P,e=d.j.get(d.g);Ji(d,b||c>=e&&c>0?Hi:Ii)&&pr(a)}else if(b){c=a.P;d=a.h.currentTime;e=c.h;c.h=d;var f=void 0;switch(b){case "seeking":case "waiting":c.h=-1;f=Ii;break;case "canplaythrough":case "playing":case "seeked":f=Hi;break;case "timeupdate":e>=0&&d-e>.01&&(f=Hi)}f!==void 0&&Ji(c,f)&&pr(a)}}function Gr(a,b,c,d,e){return new Jk(a,b,c,e,d)}
function Tr(a){return new Ym(a.i,{Bc:function(){return a.G?a.G.ke():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Za:function(){return a.Za()},video:a.h,ha:a.H,Gc:a.M,onError:function(b){return nr(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Rd:function(b,c,d,e){var f=b.startTime,g=b.endTime,h=c.type;if(h!=Ec){if(a.G){a.G.yj();var k=Zk(a.H,h);!a.U()&&a.h.paused&&!a.h.seeking&&k!=null&&k>0&&a.G.ke()<k&&!Wq(a.G.ke(),k,.001)&&a.G.Fg(k)}ks(a)}d=(new Map).set("start",f).set("end",
g).set("contentType",h).set("isMuxed",d).set("isDependency",e);a.dispatchEvent(fr("segmentappended",d));a.u&&c.fastSwitching&&b.od&&b.Ce&&a.u.trySuggestStreams()},Xl:function(b,c){(c=c.Pd)&&a.Re&&vm(a.Re,c,b)},Pi:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Mh(Lb(c));c=0;for(var e=u(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=u(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,
c.set(f,e),e+=f.length;di(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},Am:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.od&&b.Ce?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Rn(a,b));"preferredVariantRole"in a&&(kd("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(kd("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&&(kd("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){kd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=$b();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.Ja()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(kd("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(kd("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&&(kd("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&&(kd("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&&(kd("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&&(kd("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&&(kd("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&&(kd("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&&(kd("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){kd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(kd("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&&(kd("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(kd("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(kd("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&&(kd("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&&(kd("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&&(kd("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&&
(kd("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&&(kd("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&&(kd("manifest.dash.ignoreDrmInfo configuration",
"Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=
[h],d=!0)}d&&kd("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&&(kd("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&&(kd("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&&(kd("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=so(this.g,a,Yq(this));
ms(this,c);return g};p.Bk=function(a){this.Ig=a};
function ms(a,b){a.Xe=new Ki(a.g,a.sa,a.F);if(a.I){var c=Xd(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.F&&a.F.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=gr&&Mi(a.Xe,a.i)&&Mr(a)}catch(e){nr(a,e)}a.u&&Qr(a);c=a.l.u;!c||c.allowedByApplication&&c.allowedByKeySystem||cr(a)}a.M&&a.M.configure(a.g.networking);a.H&&(a.H.configure(a.g.mediaSource),a.H.Fa=a.g.manifest.segmentRelativeVttTiming);a.A&&Fr(a);a.u&&(a.u.configure(a.g.abr),a.g.abr.enabled?
a.u.enable():a.u.disable(),as(a));a.P&&ls(a);a.La&&(a.g.streaming.rebufferingGoal?a.La.xa(.25):a.La.stop());a.i&&Rr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.D&&a.D.configure(a.g.ads);a.K&&a.K.configure(a.g.cmcd);a.oa&&a.oa.configure(a.g.cmsd);a.ua&&a.ua.configure(a.g.queue);if(a.m==Jr&&a.J.getConfiguration){c=a.J.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.J.configure(c),cr(a))}}p.getConfiguration=function(){var a=Yq(this);so(a,this.g,Yq(this));return a};
p.Nk=function(){return this.Ig};p.ej=function(){var a=Yq(this);so(a,this.g,Yq(this));return Tn(this.g,Yq(this))};p.bj=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.wa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Hj=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];so(this.g,Yq(this),Yq(this));ms(this,a)};p.Ac=function(){return this.m};p.Ah=function(){return this.i?this.i.type:null};p.zf=function(){return this.h};p.Wb=function(){return this.M};p.jd=function(){return this.V};p.xf=function(){return this.D?this.D:null};p.Af=function(){return this.ua?this.ua:null};
p.U=function(){return this.i&&!this.Da()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.Da())?this.h.duration==Infinity:!1};p.md=function(){return this.i?this.i.presentationTimeline.md():!1};p.Md=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?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.Kf=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?this.h.audioTracks.length==0:!1};
p.wa=function(){if(this.i&&!this.Da()){if(!this.Na&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.hc(),end:a.Lb()}}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.Dl=function(){this.U()&&(this.h.currentTime=this.wa().end)};p.Jh=function(){return this.Na};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.F?this.F.g:null};p.ue=function(){return this.F?this.F.ue():Infinity};p.sh=function(){return this.F?this.F.sh():[]};p.yf=function(){return this.F?this.F.yf():{}};p.Hf=function(){return this.P?this.P.g==Ii:!!this.V};p.Za=function(){return this.h?this.L?this.L.i:1:0};p.Ei=function(a){this.m==Jr&&this.l&&kn(this.l,a)};
p.vc=function(a,b){b=b===void 0?!0:b;a==0?db("A trick play rate of 0 is unsupported!"):(this.L.set(a),this.m==Jr&&(this.u.playbackRateChanged(a),this.Ei(b&&a!=1)),Kr(this,a))};p.Cd=function(){var a=this.L.kd();this.m==Nr&&this.L.set(a);this.m==Jr&&(this.L.set(a),this.u.playbackRateChanged(a),this.Ei(!1));this.mc.Ta()};
p.Nb=function(){if(this.i&&!this.Da()){for(var a=this.l?this.l.u:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Ag(e)){var f=sg(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=ns(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return zg(h,g)}):g?[zg(null,g)]:[]}return[]};
p.Cc=function(){if(this.i){if(this.Da())return[];for(var a=this.l?this.l.C:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=tg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?es(this).map(function(f){return yg(f)}):[]};p.xh=function(){var a=this.df;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ug(b)})};
p.Ek=function(a){var b=this,c,d;return O(function(e){if(e.g==1)return H(e,os(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Kb(function(f){var g=ps(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=f.j-f.startTime,l=0;l<h;l++){var m=qs(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function ps(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.gj=function(a,b){var c=this,d,e,f,g,h,k;return O(function(l){if(l.g==1)return H(l,os(c,a),2);d=l.h;if(!d)return l.return(null);d.closeSegmentIndex&&(c.Jc.has(d)||(e=new Sf(function(){d.closeSegmentIndex();c.Jc.delete(d)}),c.Jc.set(d,e)),f=c.Jc.get(d),f.Y(5));g=d.segmentIndex.find(b);if(g==null)return l.return(null);h=d.segmentIndex.get(g);return(k=ps(h.tilesLayout||d.tilesLayout))?l.return(qs(h,d,b,k)):l.return(null)})};
function os(a,b){var c,d;return O(function(e){if(e.g==1){if(a.m!=Jr&&a.m!=Nr)return e.return(null);c=a.df;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);b!=null&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.B(2):H(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function qs(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.j-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.S(),startByte:a.Uc(),endByte:a.Sc(),width:g,sprite:d,mimeType:a.mimeType||
b.mimeType,codecs:a.codecs||b.codecs}}
p.kg=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.C&&(xo(c.C.h,d,!1),nn(c.l,d),Lr(c),$r(c),c.ce=d.language)}var c=this;if(this.i&&this.G&&(b(),!this.Da()))return;(function(){if(c.h&&c.h.textTracks){var d=es(c),e=d.find(function(h){return wg(h)===a.id});if(e){if(c.A instanceof mp){d=u(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.W?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.Ea(d,"cuechange"),c.A.remove(0,Infinity)),e&&hs(c,e));Lr(c);$r(c)}}})()};
function hs(a,b){a.j.o(b,"cuechange",function(){a.A.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=u(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new He(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
Me:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=Nd,g.region.width=f.region.width,g.region.widthUnits=Nd);Ve(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.A.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.Me=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Ag(f)){var g=e.l.u;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&db("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.Da()?Sr(e,f,!1,!1,0):Sr(e,f,!1,b||!1,c||0);e.J.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Qr(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.G&&(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,wg(g)==a.id){rs(e,g);break}}})()};
p.Nj=function(a,b){function c(){var e=d.J.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;var f=d.l.u;if(f=f&&f.audio)e.activeAudioCodec=f.codecs||"",e.activeAudioChannelCount=f.channelsCount||0;d.J.configure(e);cr(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.G&&(c(),!this.Da()))return;(function(){if(d.h&&d.h.audioTracks){var e=Lc(a.language),f=Array.from(d.h.audioTracks),
g=null;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==a.label&&Lc(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&rs(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.Da()){var a=this.Nb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=Jr||this.Da()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||uf.includes(f.audioMimeType||""))}));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||d.audioId==null||(e=String(d.audioId));!e&&d.codecs.includes(",")&&d.audioCodec&&(e="muxed-in-video");
e&&(e+=[d.language,d.label,d.channelsCount,d.spatialAudio,d.audioCodec||""].join("_"),a.set(e,{active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage}))}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:Lc(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&(f.kind=="description"&&(g.accessibilityPurpose="visually impaired"),g.roles.push(f.kind));f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&
(g.channelsCount=f.configuration.numberOfChannels));return g}):[]};
p.Oj=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Nb();if(d.length){var e=d.find(function(g){return g.active});if(e){d=d.filter(function(g){return(g.videoBandwidth||g.bandwidth)==a.bandwidth&&g.width==a.width&&g.height==a.height&&g.frameRate==a.frameRate&&g.pixelAspectRatio==a.pixelAspectRatio&&g.hdr==a.hdr&&g.colorGamut==a.colorGamut&&g.videoLayout==a.videoLayout&&g.videoMimeType==a.mimeType&&g.videoCodec==a.codecs&&dd(g.videoRoles,a.roles)&&g.videoLabel==a.label});var f;d.length==
1?f=d[0]:f=d.find(function(g){return g.audioId===e.audioId});f||(f=d.find(function(g){return g.language==e.language&&g.label===e.label&&g.channelsCount===e.channelsCount&&g.spatialAudio===e.spatialAudio&&g.audioMimeType===e.audioMimeType&&yf(g.audioCodec||"")===yf(e.audioCodec||"")&&dd(g.audioRoles,e.audioRoles)}));f&&!f.active&&this.Me(f,b,c)}}};
p.getVideoTracks=function(){if(this.m==Nr||this.Da())return[];var a=this.Nb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.Kf()||(c=a.filter(function(f){return f.videoCodec&&f.audioGroupId===b.audioGroupId&&f.originalAudioId===b.originalAudioId?f.audioId===b.audioId?!0:f.language===b.language&&f.label===b.label&&f.channelsCount===b.channelsCount&&f.spatialAudio===b.spatialAudio&&f.audioMimeType===b.audioMimeType&&yf(f.audioCodec||"")===yf(b.audioCodec||
"")&&dd(f.audioRoles,b.audioRoles):!1}));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||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};
p.Gk=function(){return ss(this.Nb())};p.ul=function(){return ss(this.Cc())};p.Fk=function(){return Array.from(ts(this.Nb()))};p.rl=function(){return Array.from(ts(this.Cc()))};
p.Mj=function(a,b,c,d,e,f,g){function h(){function l(t,v){return t.video||v.video?t.video&&v.video?Math.abs((t.video.height||0)-(v.video.height||0))+Math.abs((t.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.l.u;k.J=k.g.adaptationSetCriteriaFactory();k.J.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.J.create(k.i.variants),q=null;n=u(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,Ag(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=sg(q),k.Me(m,!0,d||0)):cr(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.G&&(h(),!this.Da()))return;(function(){if(k.h&&k.h.audioTracks){var l=Cg(k.Nb(),a,b||"",!1)[0];l&&k.Me(l)}})()};p.ei=function(a,b,c){function d(){e.ce=a;e.ie=b||"";e.ge=c||!1;var f=Cg(e.i.textStreams,e.ce,e.ie,e.ge)[0]||null;f&&f!=e.l.C&&(xo(e.C.h,f,!1),e.g.streaming.alwaysStreamText||e.Yc())&&(nn(e.l,f),Lr(e),$r(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.G&&(d(),!this.Da()))return;(function(){var f=Cg(e.Cc(),a,b||"",c||!1)[0];f&&e.kg(f)})()};
p.sm=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}f!=null&&(e.J=e.g.adaptationSetCriteriaFactory(),e.J.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
cr(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.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&&rs(e,g)}})()};p.Yc=function(){var a=this.W;return this.A?this.A.isTextVisible():a};p.Kk=function(){return this.kb.map(function(a){return tg(a)})};
p.Jk=function(a){kd("getChapters","Please use an getChaptersAsync.");if(!this.kb.length)return[];var b=Lc(a);a=this.kb.filter(function(f){return Lc(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.Kb(function(f){var g=f.S()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
p.uh=function(a){var b=this,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(!b.kb.length)return l.return([]);c=Lc(a);d=b.kb.filter(function(m){return Lc(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.B(4);break}k=h.value;if(k.segmentIndex){l.B(5);break}return H(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Kb(function(m){var n=m.S()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.B(2);break;case 4:return l.return(e)}})};function es(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function fs(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function js(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.ae=function(a){a=!!a;this.W!=a&&(this.W=a,this.m==Jr?(this.A.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.C||(a=Cg(this.i.textStreams,this.ce,this.ie,this.ge),a.length>0&&(nn(this.l,a[0]),Lr(this),$r(this))):jn(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.A.setTextVisibility(a),Zr(this))};
p.fl=function(){if(this.G)var a=this.G.ke();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;a=this.O}if(this.i&&!this.Da()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+a*1E3)):null};
p.fj=function(){if(this.i&&!this.Da()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.Cf=function(){return this.U()?this.i?this.i.presentationTimeline.Cf():null:null};p.Rc=function(){if(this.m==Jr)return this.H.Rc();var a={total:[],audio:[],video:[],text:[]};this.m==Nr&&(a.total=Uj(this.h.buffered));return a};
function Mq(a){if(!a.h||!a.h.currentTime)return null;var b=a.fj();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.u?this.u.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.m!=Jr&&this.m!=Nr)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:[]};Ir(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.U()||Bo(this.C,Math.round(100*b));this.G&&(this.C.R=this.G.Fi(),this.C.T=this.G.Hi());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),zo(this.C,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.C.M=Number(b.corruptedVideoFrames));this.C.u=this.F?qi(this.F):NaN;Ao(this.C,a.videoWidth||NaN,a.videoHeight||NaN);this.C.l="";this.U()&&(a=Mq(this),a!=null&&(this.C.F=a/1E3));b=this.Nb().find(function(e){return e.active});
a=this.Cc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.L?this.L.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.C.C=d}b.width&&b.height&&Ao(this.C,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.C.l=b)}this.m!=Jr||this.Da()||(this.i&&(this.C.I=this.i.periodCount,this.C.H=this.i.gapCount,this.i.presentationTimeline&&(this.C.K=this.i.presentationTimeline.h)),a=this.u.getBandwidthEstimate(),this.C.A=a);this.m==Nr&&Co(this.C,NaN);
return Do(this.C)};
p.le=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,r,t,v,w,z,y,A;return O(function(D){switch(D.g){case 1:if(h.m!=Jr&&h.m!=Nr)throw new V(1,7,7004);c!="subtitles"&&c!="captions"&&db("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){D.B(2);break}return H(D,us(h,a),3);case 3:d=D.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.m!=Nr){D.B(4);break}l=$b();g&&l.Ja()==="WEBKIT"&&(c="forced");return H(D,vs(h,a,b,c,d,f||"",k),5);case 5:m=D.h;if(m.track)return Mr(h),
Lr(h),D.return(yg(m.track));throw new V(1,2,2012);case 4:n=Hc;q=h.wa();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(r==Infinity)throw new V(1,4,4033);if(!k.length){D.B(6);break}return H(D,ws(h,a),7);case 7:t=D.h,v=xs(h,t,d,k),w=new Blob([v],{type:"text/vtt"}),a=Mk(w),d="text/vtt";case 6:z={id:h.Ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:lm(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,
language:b,originalLanguage:b,label:f||null,type:n.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([tf(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};y=tf(z.mimeType,z.codecs);A=Jf(y);if(!A)throw new V(2,2,2014,d);h.i.textStreams.push(z);Mr(h);Lr(h);return D.return(tg(z))}})};
p.kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D;return O(function(G){switch(G.g){case 1:if(c.m!=Jr&&c.m!=Nr)throw new V(1,7,7004);if(b){G.B(2);break}return H(G,us(c,a),3);case 3:b=G.h;case 2:if(b!="text/vtt")throw new V(1,2,2017,a);d=Hc;e=c.wa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new V(1,4,4045);return H(G,ws(c,a),4);case 4:g=G.h;h=If(b);if(!h)throw new V(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,segmentEnd:f,vttOffset:0};
m=Lb(g);n=k.parseMedia(m,l,a,[]);q=[];r=u(n);t=r.next();for(v={};!t.done;v={Bg:void 0,Fd:void 0},t=r.next())v.Fd=t.value,v.Bg=null,w=function(B){return function(){B.Bg==null&&(B.Bg=xc([a],[B.Fd.payload]));return B.Bg||[]}}(v),z=new Kj(v.Fd.startTime,v.Fd.endTime,w,0,null,null,0,0,Infinity),v.Fd.payload.includes("#xywh")&&(y=v.Fd.payload.split("#xywh=")[1].split(","),y.length===4&&z.og({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)})),q.push(z);
A=b;if(!q.length){G.B(5);break}return H(G,us(c,q[0].S()[0]),6);case 6:A=G.h;case 5:return D={id:c.Ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jm(q),mimeType:A||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Dg,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([tf(A||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Nr?c.df.push(D):c.i.imageStreams.push(D),Mr(c),G.return(ug(D))}})};
p.jf=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;return O(function(A){switch(A.g){case 1:if(d.m!=Jr&&d.m!=Nr)throw new V(1,7,7004);if(c){A.B(2);break}return H(A,us(d,a),3);case 3:c=A.h;case 2:e=Hc;f=d.wa();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new V(1,4,4055);h=If(c);if(!h)throw new V(2,2,2014,c);return H(A,ws(d,a),4);case 4:k=A.h;l=h();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Lb(k);q=l.parseMedia(n,m,a,[]);r=[];t=u(q);
v=t.next();for(w={};!v.done;w={uf:void 0},v=t.next())w.uf=v.value,z=new Kj(w.uf.startTime,w.uf.endTime,function(D){return function(){return[D.uf.payload]}}(w),0,null,null,0,0,Infinity),r.push(z);y={id:d.Ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jm(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,
roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([tf("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.kb.push(y);Mr(d);return A.return(tg(y))}})};
function us(a,b){var c;return O(function(d){switch(d.g){case 1:return va(d,2),H(d,Um(b,a.M,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}
function vs(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(n.g==1)return e!="text/vtt"||g.length?H(n,ws(a,b),3):n.B(2);n.g!=2&&(h=n.h,k=xs(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Mk(l),e="text/vtt");m=document.createElement("track");a:{var q=a.K,r=b;try{if(!q.g.enabled){var t=r;break a}var v=Pp(q);v.ot=Fq;v.su=!0;var w=Tp(v);t=Up(r,w);break a}catch(z){eb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z);t=r;break a}t=void 0}m.src=t;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Hg.push(m);return n.return(m)})}function ws(a,b){var c,d,e,f;return O(function(g){if(g.g==1){c=sh;d=a.g.streaming.retryParameters;e=mh([b],d);e.method="GET";var h=a.K;try{h.g.enabled&&kq(h,e,{ot:Fq,su:!0})}catch(k){eb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",k)}return H(g,a.M.request(c,e).promise,2)}f=g.h;return g.return(f.data)})}
function xs(a,b,c,d){var e=If(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Lb(b),b=c.parseMedia(b,a,null,[]),Bp(b,d);throw new V(2,2,2014,c);}p.ym=function(a,b){this.sa.width=a;this.sa.height=b};p.bi=function(a){if(this.m==Jr){var b=this.l;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.F)b=!1;else{for(var c=u(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.xe||d.Sa||d.yb||(d.xe=!1,hn(b,d,a));b=!0}}else b=!1;return b};
p.yh=function(){db("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.$k=function(){return this.Kc};
p.Tk=function(){var a={video:null,audio:null,text:null};if(this.m!=Jr)return a;var b=this.l.u,c=this.h.currentTime;b=u([b.video,b.audio,this.l.C]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==Ec&&(a.text=e)}return a};
function Yq(a){var b=no();b.streaming.failureCallback=function(c){if(a.U()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.bi(d))}};b.textDisplayFactory=function(){if(a.Ue){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new rp(a.h,a.Ue):"track"in document.createElement("track")?new mp(a):new qp};return b}p.ni=function(a){this.Ue=a};
function Ar(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=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 mm,l=e.closedCaptions.get(g);h={id:a.Ye++,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:Ec,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([tf(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Yr(a,b){var c,d,e,f,g;return O(function(h){if(h.g==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return O(function(r){if(r.g==1)return k?k.segmentIndex?r.B(2):H(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.fc(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},H(h,e(c,b),2);if(h.g!=3)return f=h.h,H(h,e(d,b),3);g=h.h;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
function pr(a){var b=a.Hf();if(a.C&&a.P&&a.G){if(a.g.streaming.rebufferingGoal==0){var c=a.L;c.j=!1;qm(c)}else c=a.L,c.j=b,qm(c);a.K&&(c=a.K,b||c.F||(c.F=!0),c.F&&b&&(c.I=!0,Np(c,"ps",{ud:"r"})),c.J=b);Ir(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.hf<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.T&&(a.T=Math.min(a.T+ ++a.hf*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(fr("buffering",b))}function Kr(a,b){a.mc.Ta();a.mc.o(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.wa(),e=a.U(),f=e?a.g.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.Cd():Math.floor(c)<=Math.floor(d.start+f)&&a.Cd()})}
function Ir(a){if(a.C&&a.P){var b=a.C.g,c="playing";a.P.g==Ii?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(fr("statechanged",c)))}}
function bs(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.bj();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.vc(d,!1):e==1&&b!==a.L.kd()&&a.Cd()}if(c&&(c=a.wa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.T||typeof g!=="number"||(a.T=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.lc&&a.T!==null&&typeof g==="number"&&a.hf<n&&Date.now()-a.lc>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.T=Math.max(a.T-(g-f)/2,f+d),a.lc=Date.now());e&&a.T!==null&&(h=a.T+d,k=a.T-d);g=c.end-a.h.currentTime;d=0;a.m==Nr&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.P.i;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.vc(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.vc(l,!1),a.lc=null):k!=void 0&&m&&g-d<k?(b!=m&&a.vc(m,!1),a.lc=null):b!==a.L.kd()&&(a.Cd(),a.lc=Date.now())}}
function cs(a){if(a.h){var b=function(e,f){return(Wq(e,f,.01)||f>e)&&a.Gg<e?(a.Gg=e,!0):!1},c=a.wa();c=c.end-c.start;c=c>0?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=fr("started");else if(b(25,c))d=fr("firstquartile");else if(b(50,c))d=fr("midpoint");else if(b(75,c))d=fr("thirdquartile");else{if(b(100,c)||c>100)d=fr("complete");a.g&&a.g.playRangeEnd!=Infinity&&a.isEnded()&&a.h.pause()}d&&a.dispatchEvent(d)}}}
function Qr(a){try{Pi(a.Xe,a.i)}catch(c){return nr(a,c),!1}var b=Bg(a.i.variants);b=a.J.create(b);a=a.u.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function Ur(a,b){b=b===void 0?!1:b;if(Qr(a)){if(!a.g.abr.enabled){var c=a.J;typeof c.getLastAdaptationSet!="function"&&(kd("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.l.u;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.u.chooseVariant(b)}return null}
function cr(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=Ur(a);f&&Sr(a,f,e,b,c,d)}
function Sr(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.u;if(b==g)d&&mn(a.l,b,d,e,!0);else{var h=a.C.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));mn(a.l,b,d,e,f,c);d=null;g&&(d=sg(g));g=sg(b);g.active=!0;if(a.R&&(e=a.R,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.Ah()){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=fr("adaptation",c),ys(a,c)):zs(a,d,g);As(a,d,g)}}function rs(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=ns(a);c=zg(c,d);b=zg(b,d);zs(a,c,b);As(a,c,b)}}function ns(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function Mr(a){var b=fr("trackschanged");ys(a,b);Bs(a)}function zs(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=fr("variantchanged",b);ys(a,b)}function As(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&Bs(a)}function Bs(a){var b=fr("audiotrackschanged");ys(a,b)}function Lr(a){var b=fr("textchanged");ys(a,b)}function Zr(a){var b=fr("texttrackvisibility");ys(a,b)}
function as(a){a.g.abr.enabled||br(a);var b=(new Map).set("newStatus",a.g.abr.enabled);ys(a,fr("abrstatuschanged",b))}function $r(a){var b=a.Cc().find(function(c){return c.active});b&&a.A&&a.A.setTextLanguage&&a.A.setTextLanguage(b.language)}function br(a,b){b=b===void 0?!0:b;if(a.m==Jr){a.$e.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Qr(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===gr||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=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.$e.xa(1);b=this.Rc().video.reduce(function(h,
k){return h+k.end-k.start},0);cr(this,!1,b,!0,!1);return!0}return!1};
function nr(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(a.m==gr)return h.return();b.severity===1&&a.C.L++;c=!0;if(!(a.Na&&a.i&&a.l)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.B(2);break}d=$b();if(d.Ja()==="WEBKIT"&&b.code==3016)return h.return();va(h,3);return H(h,Cn(a.l),5);case 5:e=h.h;c=!e;e&&(f=fr("mediasourcerecovered"),a.dispatchEvent(f));xa(h,2);break;case 3:ya(h),c=!0;case 2:if(!c)return h.return();b.severity===2&&br(a,!1);g=fr("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);I(h)}})}p.addFont=function(a,b){return fk(a,b)};function Cr(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(fr(b,a))}
function Dr(a,b,c,d){d=d===void 0?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(fr(d?"audiotrackchanged":"mediaqualitychanged",b))}
function mr(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new V(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new V(2,3,3016,c,b,a.h.error.message)}
function Er(a,b){var c=fr("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=wh(a.g.drm.clearKeys),g=function(t,v){t.allowedByKeySystem=!0;v=u(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.F.H)t.allowedByKeySystem=t.allowedByKeySystem&&!!w&&!Qi.includes(w)},h=u(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=Ig(k);l=u(l);for(var m=
l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=u(m.drmInfos),r=q.next();!r.done;r=q.next())r=r.value,r.keySystem==d&&(r.keyIds.size?g(k,r.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}c&&(Mr(a),(c=a.l.u)&&!c.allowedByKeySystem?cr(a):Qr(a))}function Rr(a,b,c){b>0&&(a.U()||a.Vj(b));b=a.getDuration();c<b&&(a.U()||a.Fb(c))}
function ys(a,b){O(function(c){if(c.g==1)return H(c,Promise.resolve(),2);a.m!=gr&&a.dispatchEvent(b);I(c)})}function ts(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(Lc(c.language)):b.add("und");return b}
function ss(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=Lc(e.language));e.type=="variant"?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?this.h.remote.state!="disconnected":!1};p.isEnded=function(){return!this.h||this.h.ended?!0:this.Na&&!this.U()&&this.h.currentTime>=this.wa().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.ni;X.prototype.getFetchedPlaybackInfo=X.prototype.Tk;X.prototype.getManifestParserFactory=X.prototype.$k;
X.prototype.getManifest=X.prototype.yh;X.prototype.retryStreaming=X.prototype.bi;X.prototype.setMaxHardwareResolution=X.prototype.ym;X.prototype.addChaptersTrack=X.prototype.jf;X.prototype.addThumbnailsTrack=X.prototype.kf;X.prototype.addTextTrackAsync=X.prototype.le;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Rc;X.prototype.getSegmentAvailabilityDuration=X.prototype.Cf;X.prototype.getPresentationStartTimeAsDate=X.prototype.fj;
X.prototype.getPlayheadTimeAsDate=X.prototype.fl;X.prototype.setTextTrackVisibility=X.prototype.ae;X.prototype.getChaptersAsync=X.prototype.uh;X.prototype.getChapters=X.prototype.Jk;X.prototype.getChaptersTracks=X.prototype.Kk;X.prototype.isTextTrackVisible=X.prototype.Yc;X.prototype.selectVariantsByLabel=X.prototype.sm;X.prototype.selectTextLanguage=X.prototype.ei;X.prototype.selectAudioLanguage=X.prototype.Mj;X.prototype.getTextLanguages=X.prototype.rl;X.prototype.getAudioLanguages=X.prototype.Fk;
X.prototype.getTextLanguagesAndRoles=X.prototype.ul;X.prototype.getAudioLanguagesAndRoles=X.prototype.Gk;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.Oj;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.Nj;X.prototype.selectVariantTrack=X.prototype.Me;X.prototype.selectTextTrack=X.prototype.kg;X.prototype.getThumbnails=X.prototype.gj;X.prototype.getAllThumbnails=X.prototype.Ek;
X.prototype.getImageTracks=X.prototype.xh;X.prototype.getTextTracks=X.prototype.Cc;X.prototype.getVariantTracks=X.prototype.Nb;X.prototype.cancelTrickPlay=X.prototype.Cd;X.prototype.trickPlay=X.prototype.vc;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.Ei;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Hf;X.prototype.getKeyStatuses=X.prototype.yf;X.prototype.getActiveSessionsMetadata=X.prototype.sh;X.prototype.getExpiration=X.prototype.ue;
X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.Jh;X.prototype.goToLive=X.prototype.Dl;X.prototype.seekRange=X.prototype.wa;X.prototype.isVideoOnly=X.prototype.Kf;X.prototype.isAudioOnly=X.prototype.Md;X.prototype.isInProgress=X.prototype.md;X.prototype.isLive=X.prototype.U;X.prototype.getQueueManager=X.prototype.Af;X.prototype.getAdManager=X.prototype.xf;X.prototype.getAssetUri=X.prototype.jd;
X.prototype.getNetworkingEngine=X.prototype.Wb;X.prototype.getMediaElement=X.prototype.zf;X.prototype.getManifestType=X.prototype.Ah;X.prototype.getLoadMode=X.prototype.Ac;X.prototype.resetConfiguration=X.prototype.Hj;X.prototype.getBufferFullness=X.prototype.bj;X.prototype.getNonDefaultConfiguration=X.prototype.ej;X.prototype.getConfigurationForLowLatency=X.prototype.Nk;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.Bk;
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.hm;X.prototype.destroyAllPreloads=X.prototype.Zg;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Yi;X.prototype.unloadAndSavePreload=X.prototype.ik;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Gm;X.prototype.unload=X.prototype.wc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Li;X.prototype.attach=X.prototype.Ub;
X.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return H(k,Ei(),3);case 3:b=k.h;case 2:return c=wd(),d=Ok(),e=$b(),H(k,e.yc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=ir,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};X.isBrowserSupported=jr;X.setQueueManagerFactory=function(a){ar=a};X.setAdManagerFactory=function(a){$q=a};X.registerSupportPlugin=hr;X.prototype.destroy=X.prototype.destroy;
var gr=0,Xq=1,Jr=2,Nr=3;X.LoadMode={DESTROYED:gr,NOT_LOADED:Xq,MEDIA_SOURCE:Jr,SRC_EQUALS:Nr};X.version="v4.16.12";var Cs=["4","16"];ld=new function(a){this.g=a;this.i=md;this.h=nd}(new jd(Number(Cs[0]),Number(Cs[1])));var ir=new Map,$q=null,ar=null;function Ds(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function Es(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Fs(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 ed;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=Fs.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};
p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return this.h.getVolume()==0};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};
p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Fs);Fs.prototype.release=Fs.prototype.release;Fs.prototype.getPodIndex=Fs.prototype.getPodIndex;
Fs.prototype.getTimeOffset=Fs.prototype.getTimeOffset;Fs.prototype.getMediaUrl=Fs.prototype.getMediaUrl;Fs.prototype.getAdvertiserName=Fs.prototype.getAdvertiserName;Fs.prototype.getCreativeAdId=Fs.prototype.getCreativeAdId;Fs.prototype.getAdId=Fs.prototype.getAdId;Fs.prototype.getVastAdId=Fs.prototype.getVastAdId;Fs.prototype.getVastMediaWidth=Fs.prototype.getVastMediaWidth;Fs.prototype.getVastMediaHeight=Fs.prototype.getVastMediaHeight;Fs.prototype.getVastMediaBitrate=Fs.prototype.getVastMediaBitrate;
Fs.prototype.getDescription=Fs.prototype.getDescription;Fs.prototype.getTitle=Fs.prototype.getTitle;Fs.prototype.getPositionInSequence=Fs.prototype.getPositionInSequence;Fs.prototype.getSequenceLength=Fs.prototype.getSequenceLength;Fs.prototype.setMuted=Fs.prototype.setMuted;Fs.prototype.resize=Fs.prototype.resize;Fs.prototype.isLinear=Fs.prototype.isLinear;Fs.prototype.isMuted=Fs.prototype.isMuted;Fs.prototype.setVolume=Fs.prototype.setVolume;Fs.prototype.getVolume=Fs.prototype.getVolume;
Fs.prototype.play=Fs.prototype.play;Fs.prototype.pause=Fs.prototype.pause;Fs.prototype.skip=Fs.prototype.skip;Fs.prototype.canSkipNow=Fs.prototype.canSkipNow;Fs.prototype.getTimeUntilSkippable=Fs.prototype.getTimeUntilSkippable;Fs.prototype.isSkippable=Fs.prototype.isSkippable;Fs.prototype.isPaused=Fs.prototype.isPaused;Fs.prototype.getRemainingTime=Fs.prototype.getRemainingTime;Fs.prototype.getMinSuggestedDuration=Fs.prototype.getMinSuggestedDuration;Fs.prototype.getDuration=Fs.prototype.getDuration;
Fs.prototype.isUsingAnotherMediaElement=Fs.prototype.isUsingAnotherMediaElement;Fs.prototype.hasCustomClick=Fs.prototype.hasCustomClick;Fs.prototype.isClientRendering=Fs.prototype.isClientRendering;Fs.prototype.needsSkipUI=Fs.prototype.needsSkipUI;function Gs(){}
function Hs(a,b){var c=[];a=u(he(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=le(d.value,"InLine"))if(d=le(d,"Creatives")){d=u(he(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=le(e,"Linear");f&&Is(c,b,f);if(e=le(e,"NonLinearAds")){e=he(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=le(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=le(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=je(l)){g==="text/html"&&(l="data:text/html;charset=UTF-8,"+
encodeURIComponent(l));var m=oe(k,"width",ve)||oe(k,"expandedWidth",ve),n=oe(k,"height",ve)||oe(k,"expandedHeight",ve);if(m||n){var q=null,r=le(k,"NonLinearClickThrough");r&&(r=je(r))&&(q=r);r=null;(k=k.attributes.minSuggestedDuration)&&(r=Vd(k));k=0;h!=null&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:r,once:!0,pre:h==null,post:h==Infinity,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,
y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:q})}}}}}}return c}
function Is(a,b,c){var d=0;b!=null&&(d=b);var e=null;c.attributes.skipoffset&&(e=Vd(c.attributes.skipoffset),isNaN(e)&&(e=null));var f=le(c,"MediaFiles");if(f){var g=null;(c=le(c,"VideoClicks"))&&(c=le(c,"ClickThrough"))&&(c=je(c))&&(g=c);f=c=he(f,"MediaFile");c=c.filter(function(k){return k.attributes.delivery=="streaming"});c.length&&(f=c);f=f.sort(function(k,l){return(parseInt(l.attributes.height,10)||0)-(parseInt(k.attributes.height,10)||0)});f=u(f);for(c=f.next();!c.done;c=f.next())if(c=c.value,
!c.attributes.apiFramework){var h=je(c);if(h){a.push({id:null,groupId:null,startTime:d,endTime:null,uri:h,mimeType:c.attributes.type||null,isSkippable:e!=null,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:b==null,post:b==Infinity,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:g});break}}}}
function Js(a){var b=[];a=u(he(a,"vmap:AdBreak"));for(var c=a.next();!c.done;c=a.next()){var d=c.value,e=d.attributes.timeOffset;e&&(c=null,e=="start"?c=null:e=="end"?c=Infinity:c=Vd(e),(d=le(d,"vmap:AdSource"))&&(d=le(d,"vmap:AdTagURI"))&&(d=ie(d))&&b.push({time:c,uri:d}))}return b}S("shaka.ads.Utils",Gs);Gs.ADS_LOADED="ads-loaded";Gs.AD_STARTED="ad-started";Gs.AD_FIRST_QUARTILE="ad-first-quartile";Gs.AD_MIDPOINT="ad-midpoint";Gs.AD_THIRD_QUARTILE="ad-third-quartile";Gs.AD_COMPLETE="ad-complete";
Gs.AD_STOPPED="ad-stopped";Gs.AD_SKIPPED="ad-skipped";Gs.AD_VOLUME_CHANGED="ad-volume-changed";Gs.AD_MUTED="ad-muted";Gs.AD_PAUSED="ad-paused";Gs.AD_RESUMED="ad-resumed";Gs.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Gs.CUEPOINTS_CHANGED="ad-cue-points-changed";Gs.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Gs.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Gs.AD_CLICKED="ad-clicked";Gs.AD_PROGRESS="ad-progress";Gs.AD_BUFFERING="ad-buffering";Gs.AD_IMPRESSION="ad-impression";
Gs.AD_DURATION_CHANGED="ad-duration-changed";Gs.AD_CLOSED="ad-closed";Gs.AD_LOADED="ad-loaded";Gs.ALL_ADS_COMPLETED="all-ads-completed";Gs.AD_LINEAR_CHANGED="ad-linear-changed";Gs.AD_METADATA="ad-metadata";Gs.AD_RECOVERABLE_ERROR="ad-recoverable-error";Gs.AD_ERROR="ad-error";Gs.AD_BREAK_READY="ad-break-ready";Gs.AD_INTERACTION="ad-interaction";Gs.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Gs.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Gs.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Ks(a,b,c,d,e){var f=this;this.A=a;this.i=b;this.G=!1;this.C=this.u=null;this.H=NaN;this.l=e;this.j=null;this.h=new ed;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.F=new google.ima.AdDisplayContainer(this.A,this.i);this.F.initialize();this.m=new google.ima.AdsLoader(this.F);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.16.12");this.g=null;this.D=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Ls(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Ms(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.qa(this.i,"play",function(){f.G=!0})}Ks.prototype.configure=function(a){this.u=a};Ks.prototype.stop=function(){this.g&&this.g.stop();this.A&&ck(this.A)};
Ks.prototype.release=function(){this.stop();this.C&&this.C.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.F.destroy()};function Ms(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));Ns(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function Ls(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.D);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.D);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Os(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.C=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.C.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,
a.i.offsetHeight)}),a.G||a.u.skipPlayDetection?a.g.start():a.h.qa(a.i,"play",function(){a.G=!0;a.g.start()})}catch(f){Ns(a,null)}}
function Os(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Ms(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Ps(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Ps(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){Ns(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed");Ns(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.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 Ps(a,b){var c=b.getAd();c?(a.j=new Fs(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.u.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.u.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):db("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function Ns(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.u.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Qs(a,b,c,d,e,f){this.g=a;this.h=b;this.j=(this.i=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.C=c;this.u=d;this.m=e;this.A=f;this.D=b.overlay}p=Qs.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.h.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return this.A};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()};
p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.i&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i};p.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};
p.canSkipNow=function(){return this.i&&this.getTimeUntilSkippable()==0};p.skip=function(){this.canSkipNow()&&this.C()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.D==null};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.u};
p.getPositionInSequence=function(){return this.m};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.h.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.h.uri};
p.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Qs);Qs.prototype.release=Qs.prototype.release;Qs.prototype.getPodIndex=Qs.prototype.getPodIndex;Qs.prototype.getTimeOffset=Qs.prototype.getTimeOffset;Qs.prototype.getMediaUrl=Qs.prototype.getMediaUrl;Qs.prototype.getAdvertiserName=Qs.prototype.getAdvertiserName;Qs.prototype.getCreativeAdId=Qs.prototype.getCreativeAdId;
Qs.prototype.getAdId=Qs.prototype.getAdId;Qs.prototype.getVastAdId=Qs.prototype.getVastAdId;Qs.prototype.getVastMediaWidth=Qs.prototype.getVastMediaWidth;Qs.prototype.getVastMediaHeight=Qs.prototype.getVastMediaHeight;Qs.prototype.getVastMediaBitrate=Qs.prototype.getVastMediaBitrate;Qs.prototype.getDescription=Qs.prototype.getDescription;Qs.prototype.getTitle=Qs.prototype.getTitle;Qs.prototype.getPositionInSequence=Qs.prototype.getPositionInSequence;Qs.prototype.getSequenceLength=Qs.prototype.getSequenceLength;
Qs.prototype.setMuted=Qs.prototype.setMuted;Qs.prototype.resize=Qs.prototype.resize;Qs.prototype.isLinear=Qs.prototype.isLinear;Qs.prototype.isMuted=Qs.prototype.isMuted;Qs.prototype.setVolume=Qs.prototype.setVolume;Qs.prototype.getVolume=Qs.prototype.getVolume;Qs.prototype.play=Qs.prototype.play;Qs.prototype.pause=Qs.prototype.pause;Qs.prototype.skip=Qs.prototype.skip;Qs.prototype.canSkipNow=Qs.prototype.canSkipNow;Qs.prototype.getTimeUntilSkippable=Qs.prototype.getTimeUntilSkippable;
Qs.prototype.isSkippable=Qs.prototype.isSkippable;Qs.prototype.isPaused=Qs.prototype.isPaused;Qs.prototype.getRemainingTime=Qs.prototype.getRemainingTime;Qs.prototype.getMinSuggestedDuration=Qs.prototype.getMinSuggestedDuration;Qs.prototype.getDuration=Qs.prototype.getDuration;Qs.prototype.isUsingAnotherMediaElement=Qs.prototype.isUsingAnotherMediaElement;Qs.prototype.hasCustomClick=Qs.prototype.hasCustomClick;Qs.prototype.isClientRendering=Qs.prototype.isClientRendering;
Qs.prototype.needsSkipUI=Qs.prototype.needsSkipUI;function Rs(a,b,c){this.g=a;this.j=b;this.h=c;this.i=a.overlay==null}p=Rs.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.g.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return-1};p.isPaused=function(){return!1};p.isSkippable=function(){return!1};
p.getTimeUntilSkippable=function(){return 0};p.canSkipNow=function(){return!1};p.skip=function(){};p.pause=function(){};p.play=function(){};p.getVolume=function(){return 1};p.setVolume=function(){};p.isMuted=function(){return!1};p.isLinear=function(){return this.i};p.resize=function(){};p.setMuted=function(){};p.getSequenceLength=function(){return this.j};p.getPositionInSequence=function(){return this.h};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};
p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.g.uri};p.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime};p.getPodIndex=function(){return 0};p.release=function(){};S("shaka.ads.InterstitialStaticAd",Rs);Rs.prototype.release=Rs.prototype.release;
Rs.prototype.getPodIndex=Rs.prototype.getPodIndex;Rs.prototype.getTimeOffset=Rs.prototype.getTimeOffset;Rs.prototype.getMediaUrl=Rs.prototype.getMediaUrl;Rs.prototype.getAdvertiserName=Rs.prototype.getAdvertiserName;Rs.prototype.getCreativeAdId=Rs.prototype.getCreativeAdId;Rs.prototype.getAdId=Rs.prototype.getAdId;Rs.prototype.getVastAdId=Rs.prototype.getVastAdId;Rs.prototype.getVastMediaWidth=Rs.prototype.getVastMediaWidth;Rs.prototype.getVastMediaHeight=Rs.prototype.getVastMediaHeight;
Rs.prototype.getVastMediaBitrate=Rs.prototype.getVastMediaBitrate;Rs.prototype.getDescription=Rs.prototype.getDescription;Rs.prototype.getTitle=Rs.prototype.getTitle;Rs.prototype.getPositionInSequence=Rs.prototype.getPositionInSequence;Rs.prototype.getSequenceLength=Rs.prototype.getSequenceLength;Rs.prototype.setMuted=Rs.prototype.setMuted;Rs.prototype.resize=Rs.prototype.resize;Rs.prototype.isLinear=Rs.prototype.isLinear;Rs.prototype.isMuted=Rs.prototype.isMuted;Rs.prototype.setVolume=Rs.prototype.setVolume;
Rs.prototype.getVolume=Rs.prototype.getVolume;Rs.prototype.play=Rs.prototype.play;Rs.prototype.pause=Rs.prototype.pause;Rs.prototype.skip=Rs.prototype.skip;Rs.prototype.canSkipNow=Rs.prototype.canSkipNow;Rs.prototype.getTimeUntilSkippable=Rs.prototype.getTimeUntilSkippable;Rs.prototype.isSkippable=Rs.prototype.isSkippable;Rs.prototype.isPaused=Rs.prototype.isPaused;Rs.prototype.getRemainingTime=Rs.prototype.getRemainingTime;Rs.prototype.getMinSuggestedDuration=Rs.prototype.getMinSuggestedDuration;
Rs.prototype.getDuration=Rs.prototype.getDuration;Rs.prototype.isUsingAnotherMediaElement=Rs.prototype.isUsingAnotherMediaElement;Rs.prototype.hasCustomClick=Rs.prototype.hasCustomClick;Rs.prototype.isClientRendering=Rs.prototype.isClientRendering;Rs.prototype.needsSkipUI=Rs.prototype.needsSkipUI;function Ss(a,b,c,d){function e(g){return g?g.overlay?!0:f.g.ended?g.post:f.g.paused?!1:!0:!1}var f=this;this.L=null;this.m=a;this.D=b;this.g=c;this.G=null;this.A=!0;this.h=this.g;this.oa=d;this.aa=new Set;this.R=new Set;this.H=new Set;this.F=new Map;this.K=new Map;this.i=new X;Ts(this);this.I=new ed;this.j=new ed;this.J=!1;this.W=this.u=this.C=this.l=null;this.Z=!1;this.O=-1;this.V=function(){if(!f.J&&f.l&&!f.D.Da()){f.l=f.g.currentTime;var g=Us(f);g&&e(g)&&Vs(f,g,1,1,Date.now())}};this.T=function(){if(!(f.J||
f.l||f.D.Da())){f.g.paused||(f.l=f.g.currentTime);var g=Us(f,!0);g||(g=Us(f));g&&e(g)&&Vs(f,g,1,1,Date.now())}};this.ea=function(){if(!f.J&&f.l&&!f.D.Da()){var g=f.g.currentTime;f.C&&!f.C.pre&&!f.C.post&&g<(f.C.endTime||f.C.startTime)&&(f.C=null)}};this.P=new Sf(this.V);this.M=new Sf(function(){var g,h,k,l,m,n,q,r,t,v,w;return O(function(z){switch(z.g){case 1:if(!f.H.size||f.l==null){z.B(0);break}g=f.D.Ac();if(g==gr||g==Xq)return z.return();h=!1;k=Array.from(f.H);l=f.D.wa();m=u(k);n=m.next();case 3:if(n.done){z.B(5);
break}q=n.value;if(q==f.C){z.B(4);break}r=q.endTime||q.startTime;if(!(l.start-r>=1)){t=q.startTime-f.l;t>0&&t<=10&&(!f.F.has(q)&&Ws(q)&&f.F.set(q,f.i.preload(q.uri,null,q.mimeType||void 0)),Xs(f,q));z.B(4);break}if(!f.F.has(q)){z.B(7);break}return H(z,f.F.get(q),8);case 8:(v=z.h)&&v.destroy(),f.F.delete(q);case 7:Ys(f,q),w=q.id||JSON.stringify(q),f.R.has(w)&&f.R.delete(w),f.H.delete(q),Zs(f),q.overlay||(h=!0);case 4:n=m.next();z.B(3);break;case 5:h&&$s(f),I(z)}})});this.configure(this.D.getConfiguration().ads)}
p=Ss.prototype;p.configure=function(a){this.L=a;this.J||at(this)};function bt(a){if(!a.Z&&a.H.size){a.I.o(a.g,"playing",a.T);a.I.o(a.g,"timeupdate",a.T);a.I.o(a.g,"seeked",a.ea);a.I.o(a.g,"ended",a.V);if("requestVideoFrameCallback"in a.g&&!ct()){var b=a.g,c=function(){a.O!=-1&&(a.V(),a.O!=-1&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.xa(.025);a.M&&a.M.xa(1);a.Z=!0}}
function Zs(a){a.Z&&!a.H.size&&(a.I.Ea(a.g,"playing",a.T),a.I.Ea(a.g,"timeupdate",a.T),a.I.Ea(a.g,"seeked",a.ea),a.I.Ea(a.g,"ended",a.V),a.O!=-1&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.M&&a.M.stop(),a.Z=!1)}
function at(a){if(a.m&&a.L){var b=a.L.supportsMultipleMediaElements,c=a.g;c.controls?b=!1:c.webkitPresentationMode&&c.webkitPresentationMode!=="inline"?b=!1:c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.h=a.g,a.G&&(a.G.parentElement&&a.m.removeChild(a.G),a.G=null)):(a.G||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.G=
b),a.h=a.G))}else a.A=!0}
p.stop=function(){this.j&&this.j.Ta();this.aa.clear();this.R.clear();this.H.clear();this.i.Zg();if(this.F.size){var a=Array.from(this.F.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.F.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=u(a),b=a.next();!b.done;b=a.next())Ys(this,b.value);this.K.clear();this.i.detach();this.J=!1;this.C=this.l=null;this.A=!0;this.h=this.g;this.G=null;dt(this);Zs(this);this.m&&ck(this.m);this.u&&(this.u.stop(),
this.u=null)};p.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.P&&(this.P.stop(),this.P=null);this.M&&(this.M.stop(),this.M=null);this.i.destroy()};p.Xb=function(){return this.i};
function et(a,b){var c,d,e;O(function(f){if(f.g==1){c=null;if(d=b.values.find(function(g){return g.key=="ID"}))c=d.data;if(c){if(a.aa.has(c))return f.return();a.aa.add(c)}Ts(a);e=[];return b&&b.values.find(function(g){return g.key=="X-OVERLAY-ID"})?(e=ft(b),f.B(2)):H(f,gt(a,b),3)}f.g!=2&&(e=f.h);e.length?ht(a,e):db("Unsupported HLS interstitial",b);I(f)})}
function it(a,b){var c=le(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f=c.attributes.loop=="true",g=oe(c,"z",ve);if(d&&g!=0){var h=null,k=le(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=je(k)}k=1920;l=1080;var m=le(c,"Viewport");if(m){k=oe(m,"x",ve);if(k==null)return;l=oe(m,"y",ve);if(l==null)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=le(c,"Overlay");if(m&&q){var r=le(q,"TopLeft"),t=le(q,"Size");if(r&&
t){q=oe(r,"x",ve);if(q==null)return;r=oe(r,"y",ve);if(r==null)return;var v=oe(t,"x",ve);if(v==null)return;t=oe(t,"y",ve);if(t==null)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=v;n.size.y=t}}q=null;c=le(c,"Squeeze");if(m&&c&&(t=le(c,"TopLeft"),c=le(c,"Size"),t&&c)){m=oe(t,"x",ve);if(m==null)return;q=oe(t,"y",ve);if(q==null)return;t=oe(c,"x",ve);if(t==null)return;c=oe(c,"y",ve);if(c==null)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:t,y:c}}}ht(a,[{id:b.id,groupId:null,startTime:b.startTime,
endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:g==-1,currentVideo:q,background:h,clickThroughUrl:null}])}}
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return O(function(n){if(n.g==1)return c={type:12},H(n,jt(b,a,c),2);if(n.g!=3){d=n.h;e=$d(d,"VAST,vmap:VMAP");if(!e)throw new V(2,10,10007);f=[];if(e.tagName=="VAST")return f=Hs(e,b.l),n.B(3);if(e.tagName!="vmap:VMAP")return n.B(3);g=function(q){var r,t;return O(function(v){if(v.g==1)return H(v,jt(b,q.uri,c),2);r=v.h;t=$d(r,"VAST");if(!t)throw new V(2,10,10007);f.push.apply(f,x(Hs(t,q.time)));I(v)})};h=[];k=u(Js(e));for(l=k.next();!l.done;l=
k.next())m=l.value,h.push(g(m));return h.length?H(n,Promise.all(h),3):n.B(3)}ht(b,f);I(n)})};
function ht(a,b){var c,d,e,f,g,h,k,l;O(function(m){switch(m.g){case 1:c=!1,d=u(b),e=d.next();case 2:if(e.done){m.B(4);break}f=e.value;if(!f.uri){db("Missing URL in interstitial",f);m.B(3);break}if(f.mimeType){m.B(5);break}va(m,6);g=a.i.Wb();return H(m,Um(f.uri,g,a.D.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;xa(m,5);break;case 6:ya(m);case 5:h=f.id||JSON.stringify(f);if(a.R.has(h)){m.B(3);break}f.loop&&!f.overlay&&db("Loop is only supported in overlay interstitials",f);
f.overlay||(c=!0);a.R.add(h);a.H.add(f);k=!1;f.pre&&a.l==null?k=!0:f.startTime!=0||f.canJump?a.l!=null&&(l=f.startTime-a.l,l>0&&l<=10&&(k=!0)):k=!0;k&&(!a.F.has(f)&&Ws(f)&&a.F.set(f,a.i.preload(f.uri,null,f.mimeType||void 0)),Xs(a,f));case 3:e=d.next();m.B(2);break;case 4:c&&$s(a),bt(a),I(m)}})}
function Us(a,b,c){b=b===void 0?!1:b;c=c===void 0?null:c;var d=0,e=null;if(a.H.size&&a.l!=null){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.post});g=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.l-Math.round(h.startTime*1E3)/1E3,m=1;a.L.allowStartInMiddleOfInterstitial&&
h.endTime&&h.endTime!=Infinity&&(m=h.endTime-h.startTime);(l>0||l==0&&a.l==0)&&(l<=m||!h.canJump)&&(k=c==null&&a.C&&!a.C.pre&&!a.C.post&&a.C.startTime>=h.startTime?!1:!0)}k&&(!a.C||h.startTime>=a.C.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&Math.round(h.startTime*1E3)/1E3-Math.round(e.startTime*1E3)/1E3>.001&&(e=h,d=0),d++)}}return e}
function Vs(a,b,c,d,e,f){f=f===void 0?0:f;a.C=b;at(a);a.A||!a.m||a.h.parentElement||a.m.appendChild(a.h);d==1&&c==1&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:Math.abs(g.startTime-b.startTime)<.001}).length);b.once&&(f++,a.H.delete(b),Zs(a),b.overlay||$s(a));b.mimeType&&(b.mimeType.startsWith("image/")||b.mimeType==="text/html")?b.overlay?kt(a,b,c,d,f):db("Unsupported interstitial",b):a.A&&b.overlay?db("Unsupported interstitial",b):lt(a,b,c,d,e,f)}
function kt(a,b,c,d,e){function f(){a.u&&(a.u.stop(),a.u=null);a.m.removeChild(k);dt(a,b);mt(a,"ad-stopped");a.j.Ta();var q=Us(a,b.pre,d-e);q?Vs(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h=b.mimeType=="text/html"?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";nt(a,b);var l=new Rs(b,c,d);mt(a,"ad-impression");mt(a,"ad-started",(new Map).set("ad",l));h=="iframe"?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){mt(a,
"ad-error",(new Map).set("originalEvent",q));f()});l=g.viewport;var m=g.topLeft;g=g.size;l.x==0&&l.y==0?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||h!="iframe"||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.m.appendChild(k);var n=Date.now();a.u&&a.u.stop();a.u=new Sf(function(){b.playoutLimit&&(Date.now()-
n)/1E3>b.playoutLimit?(mt(a,"ad-complete"),f()):b.endTime&&a.g.currentTime>b.endTime?(mt(a,"ad-complete"),f()):a.g.currentTime<b.startTime&&(mt(a,"ad-skipped"),f())});b.playoutLimit&&!b.endTime?a.u.Y(b.playoutLimit):b.endTime&&a.u.xa(.025);a.j.o(a.g,"seeked",function(){var q=a.g.currentTime;if(q<b.startTime||b.endTime&&q>b.endTime)a.u&&a.u.stop(),mt(a,"ad-skipped"),f()});b.clickThroughUrl&&a.j.o(k,"click",function(){b.clickThroughUrl&&window.open(b.clickThroughUrl,"_blank")})}
function lt(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F;O(function(J){switch(J.g){case 1:g=Date.now();a.J=!0;h=!1;k=function(){if(!a.A&&!b.overlay&&b.resumeOffset==null)if(b.timelineRange&&b.endTime&&b.endTime!=Infinity)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var L=Date.now();a.g.currentTime+=(L-e)/1E3;e=L}};l=function(L){var P,Q;return O(function(N){if(N.g==1){k();P=Us(a,b.pre,d-f);if(L&&b.groupId)for(;P&&P.groupId==b.groupId;)d++,P=Us(a,b.pre,d-f);a.u&&(!b.groupId||
P&&P.groupId!=b.groupId)&&(a.u.stop(),a.u=null);dt(a,b);if(P&&!P.overlay)return N.B(2);b.post&&(a.l=null,a.C=null);return a.A?H(N,a.i.detach(),4):H(N,a.i.wc(),4)}N.g!=2&&(a.A&&(Q=b.resumeOffset,Q==null&&(Q=b.timelineRange&&b.endTime&&b.endTime!=Infinity?b.endTime-(a.l||0):(Date.now()-e)/1E3),mt(a,"ad-content-resume-requested",(new Map).set("offset",Q))),mt(a,"ad-stopped"),a.j.Ta(),a.J=!1,a.A?$s(a):(a.h.style.display="none",k(),a.g.ended||a.g.play()));at(a);P&&(mt(a,"ad-stopped"),a.j.Ta(),Vs(a,P,c,
++d,e,f));I(N)})};m=function(L){return O(function(P){if(h)return P.return();h=!0;mt(a,"ad-error",(new Map).set("originalEvent",L));return H(P,l(!1),0)})};n=function(){return O(function(L){if(L.g==1){if(h)return L.return();h=!0;return H(L,l(!1),2)}mt(a,"ad-complete");I(L)})};a.W=function(){return O(function(L){if(h)return L.return();h=!0;mt(a,"ad-skipped");return H(L,l(!0),0)})};q=new Qs(a.h,b,a.W,c,d,!a.A);a.A||(q.setMuted(a.g.muted),q.setVolume(a.g.volume));mt(a,"ad-started",(new Map).set("ad",q));
(r=q.canSkipNow())&&mt(a,"ad-skip-state-changed");a.j.qa(a.i,"error",m);a.j.o(a.h,"timeupdate",function(){if(a.h.duration){var L=q.canSkipNow();r!=L&&q.getRemainingTime()>0&&q.getDuration()>0&&mt(a,"ad-skip-state-changed");r=L;!a.A&&!b.overlay&&b.resumeOffset==null&&b.timelineRange&&b.endTime&&b.endTime!=Infinity&&a.g.currentTime!=b.endTime&&a.D.wa().end>=b.endTime&&(a.g.currentTime=b.endTime)}});a.j.qa(a.i,"firstquartile",function(){k();mt(a,"ad-first-quartile")});a.j.qa(a.i,"midpoint",function(){k();
mt(a,"ad-midpoint")});a.j.qa(a.i,"thirdquartile",function(){k();mt(a,"ad-third-quartile")});a.j.qa(a.i,"complete",n);a.j.o(a.h,"play",function(){mt(a,"ad-resumed")});a.j.o(a.h,"pause",function(){var L=a.i.getConfiguration();a.h.currentTime>=L.playRangeEnd?n():mt(a,"ad-paused")});a.j.o(a.h,"volumechange",function(){a.h.muted?mt(a,"ad-muted"):mt(a,"ad-volume-changed")});b.clickThroughUrl&&(t=a.m||a.h,a.j.o(t,"click",function(){b.clickThroughUrl&&(q.isPaused()||q.pause(),window.open(b.clickThroughUrl,
"_blank"))}));if(!a.A||d!=1){J.B(2);break}mt(a,"ad-content-pause-requested",(new Map).set("saveLivePosition",!0));v=new Yg;w=function(L){return O(function(P){if(P.g==1)return L.state!="detach"?P.B(0):ct()?H(P,new Promise(function(Q){return(new Sf(Q)).Y(.1)}),3):P.B(3);v.resolve();a.j.Ea(a.D,"onstatechange",w);I(P)})};a.j.o(a.D,"onstatechange",w);return H(J,v,2);case 2:return nt(a,b),a.A||(a.h.style.display="",b.overlay?(a.h.loop=b.loop,z=b.overlay.viewport,y=b.overlay.topLeft,A=b.overlay.size,a.h.style.height=
A.y/z.y*100+"%",a.h.style.left=y.x/z.x*100+"%",a.h.style.top=y.y/z.y*100+"%",a.h.style.width=A.x/z.x*100+"%"):(a.g.pause(),b.resumeOffset!=null&&b.resumeOffset!=0&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),va(J,4),Ts(a),b.startTime&&b.endTime&&b.endTime!=Infinity&&b.startTime!=b.endTime&&(D=b.endTime-b.startTime,D>0&&a.i.configure("playRangeEnd",D)),b.playoutLimit&&!a.u&&(a.u=(new Sf(function(){a.W()})).Y(b.playoutLimit),
a.i.configure("playRangeEnd",b.playoutLimit)),H(J,a.i.Ub(a.h),6);case 6:return G=null,b.pre||b.post||!a.L.allowStartInMiddleOfInterstitial||a.l==null||(B=a.l-b.startTime,Math.abs(B)>.25&&(G=B)),a.F.has(b)?H(J,a.F.get(b),10):H(J,a.i.load(b.uri,G,b.mimeType||void 0),8);case 10:return E=J.h,a.F.delete(b),E?H(J,a.i.load(E),8):H(J,a.i.load(b.uri,G,b.mimeType||void 0),8);case 8:b.overlay&&a.g.paused?a.h.pause():a.h.play();C=(Date.now()-g)/1E3;mt(a,"ads-loaded",(new Map).set("loadTime",C));a.A&&a.g.play();
b.overlay&&(b.pre||b.post||a.D.U()&&!(b.startTime>0)||(K=function(){var L=a.g.currentTime-b.startTime;Math.abs(L-a.h.currentTime)>.1&&(a.h.currentTime=L)},a.j.qa(a.h,"playing",K),a.j.o(a.g,"seeking",K)),a.j.o(a.g,"seeked",function(){var L=a.g.currentTime;(L<b.startTime||b.endTime&&L>b.endTime)&&a.W()}));xa(J,0);break;case 4:F=ya(J);if(!a.J)return J.return();m(F);I(J)}})}
function nt(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(b.currentVideo!=null){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;f>0&&f<=100&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;f>0&&f<=100&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;f<1&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;f<1&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.m&&
(b.clickThroughUrl?(a.m.setAttribute("ad-active","true"),a.m.style.pointerEvents=""):a.m.style.pointerEvents="none",b.background&&(a.m.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}
function dt(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&b.currentVideo==null||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.m&&(a.m.removeAttribute("ad-active"),a.m.style.pointerEvents="",!b||b.background)&&(a.m.style.background="");a.G&&(a.G.style.background="")}
function gt(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea,Ca,Ja,Da,Qa,za;return O(function(La){switch(La.g){case 1:c=[];if(!b)return La.return(c);d=b.values.find(function(Ba){return Ba.key=="X-ASSET-URI"});e=b.values.find(function(Ba){return Ba.key=="X-ASSET-LIST"});if(!d&&!e)return La.return(c);f=null;if(g=b.values.find(function(Ba){return Ba.key=="ID"}))f=g.data;h=f==null?Math.floor(b.startTime*10)/10:b.startTime;(k=b.endTime)&&b.endTime!=Infinity&&typeof b.endTime==
"number"&&(k=f==null?Math.floor(b.endTime*10)/10:b.endTime);l=b.values.find(function(Ba){return Ba.key=="X-RESTRICT"});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(t=b.values.find(function(Ba){return Ba.key=="X-ENABLE-SKIP-AFTER"}))v=t.data,r=parseFloat(v),isNaN(r)&&(r=m?0:null);w=null;if(z=b.values.find(function(Ba){return Ba.key=="X-ENABLE-SKIP-FOR"}))y=z.data,w=parseFloat(y),isNaN(r)&&(w=null);A=null;if(D=b.values.find(function(Ba){return Ba.key=="X-RESUME-OFFSET"}))G=
D.data,A=parseFloat(G),isNaN(A)&&(A=null);B=null;if(E=b.values.find(function(Ba){return Ba.key=="X-PLAYOUT-LIMIT"}))C=E.data,B=parseFloat(C),isNaN(B)&&(B=null);J=F=K=!1;if(L=b.values.find(function(Ba){return Ba.key=="CUE"}))P=L.data,K=P.includes("ONCE"),F=P.includes("PRE"),J=P.includes("POST");Q=!1;(N=b.values.find(function(Ba){return Ba.key=="X-TIMELINE-OCCUPIES"}))?(M=N.data,Q=M.includes("RANGE")):!D&&a.D.U()&&(Q=!F&&!J);if(d){R=d.data;if(!R)return La.return(c);c.push({id:f,groupId:null,startTime:h,
endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:A,playoutLimit:B,once:K,pre:F,post:J,timelineRange:Q,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});La.B(2);break}if(!e){La.B(2);break}U=e.data;if(!U)return La.return(c);va(La,4);ra={type:11};return H(La,jt(a,U,ra),6);case 6:ba=La.h;Ia=ec(ba);Ea=JSON.parse(Ia);if(Ca=Ea["SKIP-CONTROL"])Ja=Ca["ENABLE-SKIP-AFTER"],typeof Ja=="number"&&(r=parseFloat(Ja),isNaN(Ja)&&
(r=m?0:null)),Da=Ca["ENABLE-SKIP-FOR"],typeof Da=="number"&&(w=parseFloat(Da),isNaN(Da)&&(w=null));for(Qa=0;Qa<Ea.ASSETS.length;Qa++)za=Ea.ASSETS[Qa],za.URI&&c.push({id:f+"_shaka_asset_"+Qa,groupId:f,startTime:h,endTime:k,uri:za.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:A,playoutLimit:B,once:K,pre:F,post:J,timelineRange:Q,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});xa(La,2);break;case 4:ya(La);case 2:return La.return(c)}})}
function ft(a){var b=[];if(!a)return b;var c=a.values.find(function(w){return w.key=="X-ASSET-URI"});if(!c)return b;c=c.data;if(!c)return b;var d=null,e=a.values.find(function(w){return w.key=="X-OVERLAY-ID"});e&&(d=e.data);e=d==null?Math.floor(a.startTime*10)/10:a.startTime;var f=a.endTime;a.endTime&&a.endTime!=Infinity&&typeof a.endTime=="number"&&(f=d==null?Math.floor(a.endTime*10)/10:a.endTime);var g=!1,h=!1,k=!1,l=a.values.find(function(w){return w.key=="CUE"});l&&(k=l.data,g=k.includes("ONCE"),
h=k.includes("PRE"),k=k.includes("POST"));l=null;var m=a.values.find(function(w){return w.key=="X-ASSET-MIMETYPE"});m&&(l=m.data);m=!1;var n=a.values.find(function(w){return w.key=="X-LOOP"});n&&(m=n.data=="YES");n=1;var q=a.values.find(function(w){return w.key=="X-DEPTH"});q&&(n=parseFloat(q.data),isNaN(n)&&(n=1));q=null;var r=a.values.find(function(w){return w.key=="X-BACKGROUND"});r&&(q=r.data);r=1920;var t=1080,v=a.values.find(function(w){return w.key=="X-VIEWPORT"});if(v){t=v.data.split("x");
if(t.length!=2)return b;r=parseFloat(t[0]);t=parseFloat(t[1])}r={viewport:{x:r,y:t},topLeft:{x:0,y:0},size:{x:r,y:t}};if(t=a.values.find(function(w){return w.key=="X-OVERLAY-POSITION"})){t=t.data.split("x");if(t.length!=2)return b;r.topLeft.x=parseFloat(t[0]);r.topLeft.y=parseFloat(t[1])}if(t=a.values.find(function(w){return w.key=="X-OVERLAY-SIZE"})){t=t.data.split("x");if(t.length!=2)return b;r.size.x=parseFloat(t[0]);r.size.y=parseFloat(t[1])}t=null;if(v=a.values.find(function(w){return w.key==
"X-SQUEEZECURRENT"}))if(t=parseFloat(v.data),isNaN(t)&&(t=1),t={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*t,y:1080*t}},a=a.values.find(function(w){return w.key=="X-SQUEEZECURRENT-POSITION"})){a=a.data.split("x");if(a.length!=2)return b;t.topLeft.x=parseFloat(a[0]);t.topLeft.y=parseFloat(a[1])}b.push({id:d,groupId:null,startTime:e,endTime:f,uri:c,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:g,pre:h,post:k,timelineRange:!0,
loop:m,overlay:r,displayOnBackground:n==-1,currentVideo:t,background:q,clickThroughUrl:null});return b}
function $s(a){for(var b=[],c=u(a.H),d=c.next(),e={};!d.done;e={Mc:void 0},d=c.next())d=d.value,d.overlay||(e.Mc={start:d.startTime,end:null},d.pre?(e.Mc.start=0,e.Mc.end=null):d.post?(e.Mc.start=-1,e.Mc.end=null):d.timelineRange&&(e.Mc.end=d.endTime),b.find(function(f){return function(g){return f.Mc.start==g.start&&f.Mc.end==g.end}}(e))||b.push(e.Mc));mt(a,"ad-cue-points-changed",(new Map).set("cuepoints",b))}
function Ts(a){a.i.configure(a.D.ej());a.i.configure("ads.disableHLSInterstitial",!0);a.i.configure("ads.disableDASHInterstitial",!0);a.i.configure("playRangeEnd",Infinity);lh(a.D.Wb(),a.i.Wb())}function jt(a,b,c){var d,e,f;return O(function(g){if(g.g==1)return d=mh([b],Wg()),e=a.D.Wb().request(7,d,c),H(g,e.promise,2);f=g.h;return g.return(f.data)})}function Ws(a){return(a=a.mimeType)?!a.startsWith("image/")&&a!=="text/html":!0}
function ct(){var a=$b().Oa();return a=="TV"||a=="CONSOLE"||a=="CAST"?!0:!1}function Xs(a,b){if(!(a.K.has(b)||a.L&&!a.L.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType&&b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.K.set(b,d)}}
function Ys(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 mt(a,b,c){a.oa(new T(b,c))};function ot(a,b,c,d,e){this.h=a;this.j=Vd(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.u=d;this.m=!1}p=ot.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.h.durationInSeconds};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return typeof this.j=="number"?!0:!1};p.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};
p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.u};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.l?this.l:1};p.getPositionInSequence=function(){return this.i?this.i:1};p.getTitle=function(){return this.h.adTitle};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};
p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return this.h.vastAdId||""};p.getAdId=function(){return this.h.adId};p.getCreativeAdId=function(){return this.h.creativeId};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",ot);ot.prototype.release=ot.prototype.release;ot.prototype.getPodIndex=ot.prototype.getPodIndex;
ot.prototype.getTimeOffset=ot.prototype.getTimeOffset;ot.prototype.getMediaUrl=ot.prototype.getMediaUrl;ot.prototype.getAdvertiserName=ot.prototype.getAdvertiserName;ot.prototype.getCreativeAdId=ot.prototype.getCreativeAdId;ot.prototype.getAdId=ot.prototype.getAdId;ot.prototype.getVastAdId=ot.prototype.getVastAdId;ot.prototype.getVastMediaWidth=ot.prototype.getVastMediaWidth;ot.prototype.getVastMediaHeight=ot.prototype.getVastMediaHeight;ot.prototype.getVastMediaBitrate=ot.prototype.getVastMediaBitrate;
ot.prototype.getDescription=ot.prototype.getDescription;ot.prototype.getTitle=ot.prototype.getTitle;ot.prototype.getPositionInSequence=ot.prototype.getPositionInSequence;ot.prototype.getSequenceLength=ot.prototype.getSequenceLength;ot.prototype.setMuted=ot.prototype.setMuted;ot.prototype.resize=ot.prototype.resize;ot.prototype.isLinear=ot.prototype.isLinear;ot.prototype.isMuted=ot.prototype.isMuted;ot.prototype.setVolume=ot.prototype.setVolume;ot.prototype.getVolume=ot.prototype.getVolume;
ot.prototype.play=ot.prototype.play;ot.prototype.pause=ot.prototype.pause;ot.prototype.skip=ot.prototype.skip;ot.prototype.canSkipNow=ot.prototype.canSkipNow;ot.prototype.getTimeUntilSkippable=ot.prototype.getTimeUntilSkippable;ot.prototype.isSkippable=ot.prototype.isSkippable;ot.prototype.isPaused=ot.prototype.isPaused;ot.prototype.getRemainingTime=ot.prototype.getRemainingTime;ot.prototype.getMinSuggestedDuration=ot.prototype.getMinSuggestedDuration;ot.prototype.getDuration=ot.prototype.getDuration;
ot.prototype.isUsingAnotherMediaElement=ot.prototype.isUsingAnotherMediaElement;ot.prototype.hasCustomClick=ot.prototype.hasCustomClick;ot.prototype.isClientRendering=ot.prototype.isClientRendering;ot.prototype.needsSkipUI=ot.prototype.needsSkipUI;function pt(a,b,c,d){this.D=a;this.K=b;this.h=c;this.l=null;this.P=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.F=this.g=null;this.G=new Map;this.m=[];this.A=[];this.H="";this.O=!0;this.I="";this.u=new ed}pt.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.u.Ea(b.target,b.type,b.listener);qt(this);this.m=[];this.A=[];this.H="";this.O=!0;this.I="";this.C=null;this.j=[];this.M=[];this.G.clear()};
pt.prototype.release=function(){this.stop();this.u&&this.u.release()};pt.prototype.onManifestUpdated=function(a){this.J=a;this.H!=""&&(rt(this,this.H,this.O),this.O=!1)};pt.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 st(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;O(function(v){if(v.g==1)return d={type:7},e=mh([b],Wg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=lc(f)),g=a.K.request(7,e,d),va(v,2),H(v,g.promise,4);if(v.g!=2){h=v.h;k=ec(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new qb(b),n=new qb(l.trackingUrl),a.H=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.P,a.i(new T("ads-loaded",(new Map).set("loadTime",r))),t=new qb(l.manifestUrl),a.l.resolve(m.resolve(t).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return xa(v,0)}ya(v);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.I);a.l=null;I(v)})}
function rt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;O(function(A){if(A.g==1)return d={type:8},e=mh([b],Wg()),f=a.K.request(7,e,d),va(A,2),H(A,f.promise,4);if(A.g!=2){g=A.h;h=[];k=ec(g.data);l=JSON.parse(k);if(l.avails.length>0){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=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(v=t.value,w=u(v.nonLinearAdList),z=w.next();!z.done;z=w.next())y=z.value,tt(a,y);h=a.getCuePoints();
a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h))),qt(a),a.j=[];c&&(a.J||h.length>0)&&ut(a);return xa(A,0)}ya(A);I(A)})}
function tt(a,b){var c,d,e,f,g,h,k,l,m;O(function(n){if(n.g==1){if(!b.staticResource)return n.return();c=vt(b);if(d=a.G.get(c))return n.return();e={type:9};f=mh([b.staticResource],Wg());g=a.K.request(7,f,e);va(n,2);a.G.set(c,[]);return H(n,g.promise,4)}if(n.g!=2)return h=n.h,k=ec(h.data),l=JSON.parse(k),m=l.apps,a.G.set(c,m),xa(n,0);ya(n);a.G.delete(c);I(n)})}
function vt(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function ut(a){wt(a);a.J||(xt(a),a.u.o(a.h,"seeked",function(){xt(a)}),a.u.o(a.h,"ended",function(){qt(a)}));a.u.o(a.h,"timeupdate",function(){wt(a)})}
function xt(a){var b=a.h.currentTime;if(b!=0&&a.C==null){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.M.includes(d.adId)&&(a.C=b,a.h.currentTime=c.startTimeInSeconds)}}
function wt(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.F,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.A.includes("firstQuartile")?(a.A.push("firstQuartile"),yt(a,"firstQuartile")):b>=e&&!a.A.includes("midpoint")?(a.A.push("midpoint"),yt(a,"midpoint")):b>=f&&!a.A.includes("thirdQuartile")&&(a.A.push("thirdQuartile"),yt(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&d>0&&e>0&&yt(a,"skipStateChanged");e>0&&(d<=0||d>e)&&qt(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.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}qt(a);a.L=e;a.g=new ot(g,f+1,e.ads.length,!0,a.h);a.F=g;f===0&&yt(a,"breakStart");zt(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.G.get(vt(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){qt(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.D.appendChild(m)}a.L=e;a.g=new ot(g,f+1,e.ads.length,!1,a.h);a.F=g;f===0&&yt(a,"breakStart");zt(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.C&&a.C>b&&(a.h.currentTime=a.C),a.C=null)}}}
function qt(a){if(a.g){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.F.adId);var b=a.g.m;(b===void 0?0:b)?yt(a,"skip"):yt(a,"complete");b=u(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.u.Ea(c.target,c.type,c.listener);a.m=[];a.A=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&yt(a,"breakEnd");a.g=null;a.F=null;a.L=null}}
function zt(a){var b=!1;a.h.paused?b=!0:(yt(a,"impression"),yt(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&yt(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||yt(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(yt(a,"impression"),yt(a,"start"),b=!1):yt(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){yt(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.u.o(d.target,
d.type,d.listener)}
function yt(a,b){var c=a.F.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=u(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&e!=""&&(e=mh([e],Wg()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.D.setAttribute("ad-active","true");break;case "breakEnd":a.D.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function At(a,b){this.g=a;this.i=null;this.h=b}p=At.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()};
p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){};
p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",At);
At.prototype.release=At.prototype.release;At.prototype.getPodIndex=At.prototype.getPodIndex;At.prototype.getTimeOffset=At.prototype.getTimeOffset;At.prototype.getMediaUrl=At.prototype.getMediaUrl;At.prototype.getAdvertiserName=At.prototype.getAdvertiserName;At.prototype.getCreativeAdId=At.prototype.getCreativeAdId;At.prototype.getAdId=At.prototype.getAdId;At.prototype.getVastAdId=At.prototype.getVastAdId;At.prototype.getVastMediaWidth=At.prototype.getVastMediaWidth;
At.prototype.getVastMediaHeight=At.prototype.getVastMediaHeight;At.prototype.getVastMediaBitrate=At.prototype.getVastMediaBitrate;At.prototype.getDescription=At.prototype.getDescription;At.prototype.getTitle=At.prototype.getTitle;At.prototype.getPositionInSequence=At.prototype.getPositionInSequence;At.prototype.getSequenceLength=At.prototype.getSequenceLength;At.prototype.setMuted=At.prototype.setMuted;At.prototype.resize=At.prototype.resize;At.prototype.isLinear=At.prototype.isLinear;
At.prototype.isMuted=At.prototype.isMuted;At.prototype.setVolume=At.prototype.setVolume;At.prototype.getVolume=At.prototype.getVolume;At.prototype.play=At.prototype.play;At.prototype.pause=At.prototype.pause;At.prototype.skip=At.prototype.skip;At.prototype.canSkipNow=At.prototype.canSkipNow;At.prototype.getTimeUntilSkippable=At.prototype.getTimeUntilSkippable;At.prototype.isSkippable=At.prototype.isSkippable;At.prototype.isPaused=At.prototype.isPaused;At.prototype.getRemainingTime=At.prototype.getRemainingTime;
At.prototype.getMinSuggestedDuration=At.prototype.getMinSuggestedDuration;At.prototype.getDuration=At.prototype.getDuration;At.prototype.isUsingAnotherMediaElement=At.prototype.isUsingAnotherMediaElement;At.prototype.hasCustomClick=At.prototype.hasCustomClick;At.prototype.isClientRendering=At.prototype.isClientRendering;At.prototype.needsSkipUI=At.prototype.needsSkipUI;function Bt(a,b,c,d){var e=this;this.A=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.H=!1;this.C=this.m=this.u=null;this.D="";this.F=[];this.h=new ed;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.A,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Ct(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.D.length?
e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new At(f,e.l);e.C&&(e.m.i=e.C);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.A.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.A.removeAttribute("ad-active");
var f=e.l.currentTime;e.u&&e.u>f&&(e.l.currentTime=e.u,e.u=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.i=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.A.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=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.F=
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=Bt.prototype;p.configure=function(){};p.stop=function(){this.D="";this.u=null;this.F=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.F};
function Ct(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(c!=0){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.u=c,a.l.currentTime=d.start)}})};function Y(){kb.call(this);this.h=this.i=this.j=this.g=null;this.m=new Ds;this.u=navigator.language;this.l=null}pa(Y,kb);p=Y.prototype;p.setLocale=function(a){this.u=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Ss(a,b,c,function(e){return Dt(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 Ks(a,b,this.u,c,function(e){return Dt(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);kb.prototype.release.call(this)};
p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new Ds};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.H=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.D=a;b.g&&b.g.updateAdsRenderingSettings(b.D)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new pt(a,b,c,function(e){return Dt(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new V(1,10,10005);var d=this.i;c=c===void 0?"":c;d.l?a=Promise.reject(new V(1,10,10004)):(d.l=new Yg,st(d,a,b),d.I=c||"",d.P=Date.now()/1E3,a=d.l);return a};
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new V(1,10,10005);var b=this.i;b.H=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new V(2,10,10002);this.h&&this.h.release();this.h=new Bt(a,b,this.u,function(d){return Dt(c,d)});this.h.configure(this.l)};
p.requestServerSideStream=function(a,b){b=b===void 0?"":b;if(!this.h)throw new V(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&db('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.16.12";c=this.h;c.j?a=Promise.reject(new V(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.H=!0),c.j=new Yg,c.g.requestStream(a),c.D=b||"",c.G=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new V(1,10,10003);(a.mpt||a.mpv)&&db('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.16.12";this.h.g.replaceAdTagParameters(a)};
p.getServerSideCuePoints=function(){kd("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:Es(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
p.onDashTimedMetadata=function(a){this.h&&a.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&et(this.g,c))};
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if(d=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||d=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",d=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=u(c.eventNode.children),m=l.next();!m.done;m=
l.next())if(m=m.value,m.tagName=="AlternativeMPD"){if(m=m.attributes.uri){k=m;break}}else if(m.tagName=="InsertPresentation"||m.tagName=="ReplacePresentation"){var n=m.attributes.url;if(n){k=nc(n);(l=oe(m,"maxDuration",ve))&&(g=l/c.timescale);(l=oe(m,"returnOffset",ve))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&ht(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&&
!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else(d=="urn:mpeg:dash:event:2012"||d=="urn:scte:dash:scte214-events")&&c.eventNode&&le(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&it(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new V(1,10,10006);ht(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.Xb()};function Dt(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.getInterstitialPlayer=Y.prototype.getInterstitialPlayer;Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial;
Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial;Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata;Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata;Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.initInterstitial=Y.prototype.initInterstitial;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;
Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
Y.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Y.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Y.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";$q=function(){return new Y};function Et(a){return JSON.stringify(a,function(b,c){if(typeof c!="function"){b=c instanceof T;if(c instanceof Event||b){var d={};for(f in c){var e=c[f];e&&typeof e=="object"?f=="detail"?d[f]=e:e instanceof Event||e instanceof T?d[f]={__type__:"Event",event:Et(e)}:b&&Array.isArray(e)&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);b=u(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())f.add(d.value);b={};f=
u(f);for(d=f.next();!d.done;d=f.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof TimeRanges){f={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(Uj(c));for(b=c.next();!b.done;b=c.next())b=b.value,d=b.end,f.start.push(b.start),f.end.push(d);c=f}else c=ArrayBuffer.isView(c)&&c.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(c)}:typeof c=="number"?isNaN(c)?"NaN":isFinite(c)?c:c<0?"-Infinity":"Infinity":c;return c}})}
function Ft(a){return JSON.parse(a,function(b,c){if(c=="NaN")var d=NaN;else if(c=="-Infinity")d=-Infinity;else if(c=="Infinity")d=Infinity;else if(c&&typeof c=="object"&&c.__type__=="TimeRanges")d=Gt(c);else if(c&&typeof c=="object"&&c.__type__=="Uint8Array")d=new Uint8Array(c.entries);else if(c&&typeof c=="object"&&c.__type__=="Error"){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c&&typeof c=="object"&&c.__type__=="Event"?Ft(c.event):c;return d})}
function Gt(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var Ht="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),It="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Jt=["loop","playbackRate"],Kt=["pause","play"],Lt=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1).set("isRemotePlayback",1),Mt=(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),Nt=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Ot=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Pt=[["isTextTrackVisible","setTextTrackVisibility"]],Qt="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),
Rt="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function St(a,b,c,d,e,f,g){var h=this;this.H=a;this.K=g;this.l=new Sf(b);this.L=c;this.A=!1;this.C=d;this.G=e;this.M=f;this.i=this.m=!1;this.J="";this.u=null;this.D=function(){return Tt(h)};this.F=function(k,l){k=Ft(l);switch(k.type){case "event":var m=k.targetName,n=$a(k.event);h.C(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.A&&(h.L(),h.A=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new 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.I=0;this.h=new Map;this.j=null;Ut.add(this)}p=St.prototype;p.destroy=function(){Ut.delete(this);Vt(this);Wt&&Xt(this);this.l&&(this.l.stop(),this.l=null);this.G=this.C=null;this.i=this.m=!1;this.F=this.D=this.j=this.h=this.g=this.u=null;return Promise.resolve()};p.Pa=function(){return this.i};p.cg=function(){return this.J};
p.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ka();var a=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Ut),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Yg;d.A=!0;Yt(d,e)}},function(b){for(var c=u(Ut),d=c.next();!d.done;d=c.next())d=d.value,Zt=b=="available",d.l.Ka()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Zt&&this.l.Y($t);(a=Wt)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Yg,this.A=!0,Yt(this,a)):Wt=null}else window.__onGCastApiAvailable!==au&&(bu=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=au)};p.gi=function(a){this.u=a;this.i&&cu(this,{type:"appData",appData:this.u})};
p.cast=function(){var a=this;return O(function(b){if(!a.m)throw new V(1,8,8E3);if(!Zt)throw new V(1,8,8001);if(a.i)throw new V(1,8,8002);a.j=new Yg;chrome.cast.requestSession(function(c){return Yt(a,c)},function(c){return du(a,c)});return H(b,a.j,0)})};function eu(a){a.i&&chrome.cast.requestSession(function(b){return Yt(a,b)},function(b){return du(a,b)})}p.Id=function(){if(this.i){Vt(this);if(Wt){Xt(this);try{Wt.stop(function(){},function(){})}catch(a){}Wt=null}Tt(this)}};
p.get=function(a,b){var c=this;if(a=="video"){if(Kt.includes(b))return function(){return c.Fj.apply(c,[a,b].concat(x(Ra.apply(0,arguments))))}}else if(a=="player"){if(Nt.has(b)&&!this.get("player","isLive")())return function(){};if(Qt.includes(b))return function(){return c.Fj.apply(c,[a,b].concat(x(Ra.apply(0,arguments))))};if(Rt.includes(b))return function(){return c.im.apply(c,[a,b].concat(x(Ra.apply(0,arguments))))};if(Lt.has(b)||Mt.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;cu(this,{type:"set",targetName:a,property:b,value:c})};function Yt(a,b){var c=a.M();Wt=b;b.addUpdateListener(a.D);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);Tt(a);cu(a,{type:"init",initState:c,appData:a.u});a.j.resolve()}function du(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.Fj=function(a,b){cu(this,{type:"call",targetName:a,methodName:b,args:Ra.apply(2,arguments)})};p.im=function(a,b){var c=Ra.apply(2,arguments),d=new Yg,e=this.I.toString();this.I++;this.h.set(e,d);try{cu(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Xt(a){var b=Wt;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
function Tt(a){var b=Wt?Wt.status=="connected":!1;if(a.i&&!b){a.G();for(var c in a.g)a.g[c]={};Vt(a)}a.i=b;a.J=b?Wt.receiver.friendlyName:"";a.l.Ka()}function Vt(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 cu(a,b){b=Et(b);var c=Wt;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},gb)}catch(d){throw b=new V(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.C("player",c),a.Id(),b;}}var $t=.02,Zt=!1,Wt=null,bu=null,Ut=new Set;function au(a){bu?window.__onGCastApiAvailable=bu:delete window.__onGCastApiAvailable;bu=null;if(a)for(var b=u(Ut),c=b.next();!c.done;c=b.next())c.value.init();typeof window.__onGCastApiAvailable==="function"&&window.__onGCastApiAvailable(a)};function fu(a,b,c,d){d=d===void 0?!1:d;kb.call(this);var e=this;this.i=a;this.h=b;this.l=this.u=this.m=this.A=this.j=null;this.I=c;this.H=d;this.F=[];this.D=[];this.C=[];this.G=new Map;this.g=null;window.chrome&&$b().Oa()!="CAST"?(this.g=new St(c,function(){return gu(e)},function(){return hu(e)},function(f,g){return iu(e,f,g)},function(){return ju(e)},function(){return ku(e)},d),lu(this)):(this.j=this.i,this.A=this.h)}pa(fu,kb);p=fu.prototype;
p.destroy=function(a){this.g&&(a===void 0?0:a)&&this.g.Id();this.l&&(this.l.release(),this.l=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.A=this.j=this.i=null;kb.prototype.release.call(this);return Promise.all(a)};p.Wc=function(){return this.j};p.Xb=function(){return this.A};p.Pg=function(){return this.g?this.g.m&&Zt:!1};p.Pa=function(){return this.g?this.g.Pa():!1};p.cg=function(){return this.g?this.g.cg():""};
p.cast=function(){var a=this;return O(function(b){return b.g==1?a.g?H(b,a.g.cast(),2):b.return():a.h?H(b,a.h.wc(),0):b.return()})};p.gi=function(a){this.g&&this.g.gi(a)};p.bk=function(){this.g&&eu(this.g)};p.Id=function(){this.g&&this.g.Id()};
p.Si=function(a,b){b=b===void 0?!1:b;var c=this;return O(function(d){if(d.g==1){if(a==c.I&&b==c.H)return d.return();c.I=a;c.H=b;if(!c.g)return d.return();c.g.Id();return H(d,c.g.destroy(),2)}c.g=null;c.g=new St(a,function(){return gu(c)},function(){return hu(c)},function(e,f){return iu(c,e,f)},function(){return ju(c)},function(){return ku(c)},b);c.g.init();I(d)})};
function lu(a){a.g.init();a.l=new ed;for(var b=u(Ht),c=b.next();!c.done;c=b.next())a.l.o(a.i,c.value,function(f){a.g.Pa()||(f=$a(f),a.m.dispatchEvent(f))});for(var d in ab)a.l.o(a.h,ab[d],function(f){a.g.Pa()||a.u.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={Be:b.Be},b.Be=e,Object.defineProperty(a.j,b.Be,{configurable:!1,enumerable:!0,get:function(f){return function(){return mu(a,f.Be)}}(b),set:function(f){return function(g){var h=f.Be;a.g.Pa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.A={};nu(a,
function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return ou(a,f)}})});pu(a);a.m=new kb;a.m.cf=a.j;a.u=new kb;a.u.cf=a.A;a.l.o(a.h,"unloading",function(){a.g&&a.g.Pa()||qu(a)})}function pu(a){var b=new Map;nu(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.G.set(c,d):a.G.set(d,c)):b.set(d,c)})}
function nu(a,b){function c(k){return k=="constructor"||typeof d[k]!="function"?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=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 ku(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.jd(),startTime:null,addThumbnailsTrackCalls:a.F,addTextTrackAsyncCalls:a.D,addChaptersTrackCalls:a.C};a.i.pause();for(var c=u(Jt),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(Ot);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(Pt);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 gu(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}function hu(a){var b=new T(a.j.paused?"pause":"play");a.m.dispatchEvent(b)}
function ju(a){for(var b=u(Ot),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.F,f=a.D,g=a.C;qu(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(Jt);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.Xb()).kf.apply(t,x(r))}q=u(f);for(t=q.next();!t.done;t=q.next()){t=t.value;var v;(v=a.Xb()).le.apply(v,x(t))}v=u(g);for(q=v.next();!q.done;q=v.next()){q=q.value;var w;(w=a.Xb()).jf.apply(w,x(q))}w=u(Jt);for(v=w.next();!v.done;v=w.next())v=v.value,a.i[v]=n[v];w=u(Pt);for(v=w.next();!v.done;v=w.next())q=v.value,v=q[1],q=a.g.get("player",q[0])(),a.h[v](q);
a.h.ae(m);l&&a.h.ei(l.language,l.roles,l.forced);a.i.autoplay=k;h&&a.i.play()}},function(q){q=(new Map).set("detail",q);q=new T("error",q);a.h.dispatchEvent(q)})}
function mu(a,b){if(b=="addEventListener")return function(d,e,f){return a.m.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.m.removeEventListener(d,e,f)};if(a.g.Pa()&&Object.keys(a.g.g.video).length==0){var c=a.i[b];if(typeof c!="function")return c}return a.g.Pa()?a.g.get("video",b):(b=a.i[b],typeof b=="function"&&(b=b.bind(a.i)),b)}
function ou(a,b,c){c=c===void 0?!1:c;a.G.has(b)&&(b=a.G.get(b));if(b=="addEventListener")return function(d,e,f){return a.u.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.u.removeEventListener(d,e,f)};if(b=="getMediaElement")return function(){return a.j};if(b=="getSharedConfiguration")return a.g.get("player","getConfiguration");if(b=="getNetworkingEngine")return function(){return a.h.Wb()};if(b=="getDrmEngine")return function(){return a.h.F};if(b=="getAdManager")return function(){return a.h.xf()};
if(b=="getQueueManager")return function(){return a.h.Af()};if(b=="setVideoContainer")return function(d){return a.h.ni(d)};if(!c){if(b=="addThumbnailsTrack")return function(){var d=Ra.apply(0,arguments);a.F.push(d);return ou(a,b,!0).apply(null,x(d))};if(b=="addTextTrackAsync")return function(){var d=Ra.apply(0,arguments);a.D.push(d);return ou(a,b,!0).apply(null,x(d))};if(b=="addChaptersTrack")return function(){var d=Ra.apply(0,arguments);a.C.push(d);return ou(a,b,!0).apply(null,x(d))}}if(a.g.Pa()){if(b==
"getManifest"||b=="drmInfo")return function(){db(b+"() does not work while casting!");return null};if(b=="attach"||b=="detach")return function(){db(b+"() does not work while casting!");return Promise.resolve()};if(b=="getChapters")return function(){db(b+"() does not work while casting!");return[]}}return a.g.Pa()&&Object.keys(a.g.g.video).length==0&&(Lt.has(b)||Mt.has(b))||!a.g.Pa()?a.h[b].bind(a.h):a.g.get("player",b)}
function iu(a,b,c){a.g.Pa()&&(b=="video"?a.m.dispatchEvent(c):b=="player"&&(c.type=="unloading"&&qu(a),a.u.dispatchEvent(c)))}function qu(a){a.F=[];a.D=[];a.C=[]}S("shaka.cast.CastProxy",fu);fu.prototype.changeReceiverId=fu.prototype.Si;fu.prototype.forceDisconnect=fu.prototype.Id;fu.prototype.suggestDisconnect=fu.prototype.bk;fu.prototype.setAppData=fu.prototype.gi;fu.prototype.cast=fu.prototype.cast;fu.prototype.receiverName=fu.prototype.cg;fu.prototype.isCasting=fu.prototype.Pa;
fu.prototype.canCast=fu.prototype.Pg;fu.prototype.getPlayer=fu.prototype.Xb;fu.prototype.getVideo=fu.prototype.Wc;fu.prototype.destroy=fu.prototype.destroy;function ru(a,b,c,d){kb.call(this);var e=this;this.h=a;this.g=b;this.j=new ed;this.I={video:a,player:b};this.G=c||function(){};this.J=d||function(f){return f};this.i=null;this.H=!1;this.u=!0;this.m=0;this.D=!1;this.C=!0;this.A=this.l=null;this.F=new Sf(function(){su(e)});tu(this)}pa(ru,kb);p=ru.prototype;p.isConnected=function(){return this.H};p.Hl=function(){return this.u};p.vm=function(a){this.i=a};p.Ak=function(){this.i=null};
p.wm=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.um=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.tm=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 O(function(d){if(d.g==1)return a.j&&(a.j.release(),a.j=null),b=[],a.g&&(b.push(a.g.destroy()),a.g=null),a.F&&(a.F.stop(),a.F=null),a.h=null,a.I=null,a.G=null,a.H=!1,a.u=!0,a.l=null,a.A=null,kb.prototype.release.call(a),H(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
function tu(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return uu(a)};b.onSenderDisconnected=function(){return uu(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&vu(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);vu(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.A=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.A.onMessage=function(e){return wu(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return xu(a,e)};b.start();b=u(Ht);for(var c=b.next();!c.done;c=b.next())a.j.o(a.h,c.value,function(e){return yu(a,"video",e)});for(var d in ab)a.j.o(a.g,ab[d],function(e){return yu(a,"player",e)});a.j.o(a.h,"loadeddata",function(){a.D=!0});a.j.o(a.g,"loading",function(){a.u=!1;zu(a)});a.j.o(a.h,"playing",function(){a.u=!1;zu(a)});a.j.o(a.h,"pause",function(){zu(a)});a.j.o(a.g,"unloading",function(){a.u=!0;zu(a)});
a.j.o(a.h,"ended",function(){(new Sf(function(){a.h&&a.h.ended&&(a.u=!0,zu(a))})).Y(Au)})}function uu(a){a.m=0;a.C=!0;a.H=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0;zu(a)}function zu(a){var b;O(function(c){if(c.g==1)return H(c,Promise.resolve(),2);if(!a.g)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);Bu(a)||Cu(a);I(c)})}
function Du(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G;O(function(B){switch(B.g){case 1:for(d in b.player)e=b.player[d],a.g[d](e);a.G(c);f=a.h.autoplay;return b.manifest?(a.h.autoplay=!1,va(B,5),H(B,a.g.load(b.manifest,b.startTime),7)):H(B,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.kf.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.le.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.jf.apply(a.g,x(t));xa(B,3);break;case 5:return v=ya(B),w=(new Map).set("detail",v),z=new T("error",w),a.g&&a.g.dispatchEvent(z),B.return();case 3:if(!a.g)return B.return();for(y in b.video)A=b.video[y],a.h[y]=A;for(D in b.playerAfterLoad)G=b.playerAfterLoad[D],a.g[D](G);a.h.autoplay=f;b.manifest&&(a.h.play(),Cu(a));I(B)}})}
function yu(a,b,c){a.g&&(su(a),vu(a,{type:"event",targetName:b,event:c},a.l))}
function su(a){a.F.Y(Eu);for(var b={video:{},player:{}},c=u(It),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.h[d];a.g.U()&&Nt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});Lt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;vu(a,{type:"update",update:b},a.l);Mt.forEach(function(e,f){a.m%e==0&&(e={player:{}},e.player[f]=a.g[f](),vu(a,{type:"update",update:e},
a.l))});a.D&&(a.m+=1);Bu(a)}function Bu(a){return a.C&&(a.h.duration||a.g.U())?(Fu(a),a.C=!1,!0):!1}function Fu(a,b){var c={contentId:a.g.jd(),streamType:a.g.U()?"LIVE":"BUFFERED",contentType:""};a.g.U()||(c.duration=a.h.duration);a.i&&(c.metadata=a.i);Cu(a,b===void 0?0:b,c)}
function xu(a,b){var c=Ft(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0;Du(a,c.initState,c.appData);su(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if(d=="video")if(b=cast.receiver.CastReceiverManager.getInstance(),e=="volume"){b.setSystemVolumeLevel(c);break}else if(e=="muted"){b.setSystemVolumeMuted(c);break}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
d=="player"&&e=="load"&&(a.m=0,a.D=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);d=="player"&&e=="load"&&(c=c.then(function(){a.C=!0}));c.then(function(h){return Gu(a,g,f,null,h)},function(h){return Gu(a,g,f,h,null)})}}
function wu(a,b){var c=Ft(b.data);switch(c.type){case "PLAY":a.h.play();Cu(a);break;case "PAUSE":a.h.pause();Cu(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;b!=null&&(a.h.currentTime=Number(b));d&&d=="PLAYBACK_START"?(a.h.play(),Cu(a)):d&&d=="PLAYBACK_PAUSE"&&(a.h.pause(),Cu(a));break;case "STOP":a.g.wc().then(function(){a.g&&Cu(a)});break;case "GET_STATUS":Fu(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.h.volume,f=a.h.muted;b!=null&&(a.h.volume=Number(b));
d!=null&&(a.h.muted=d);e==a.h.volume&&f==a.h.muted||Cu(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.h.autoplay=!0);a.g.load(e,d).then(function(){a.g&&Fu(a)}).catch(function(g){var h="LOAD_FAILED";g.category==7&&g.code==7E3&&(h="LOAD_CANCELLED");vu(a,{requestId:Number(c.requestId),type:h},a.A)});break;default:vu(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.A)}}
function Gu(a,b,c,d,e){a.g&&vu(a,{type:"asyncComplete",id:c,error:d,res:e},a.l,b)}function vu(a,b,c,d){a.H&&(a=Et(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Cu(a,b,c){c=c===void 0?null:c;var d={mediaSessionId:0,playbackRate:a.h.playbackRate,playerState:a.u?Hu:a.g.Hf()?Iu:a.h.paused?Ju:Ku,currentTime:a.h.currentTime,supportedMediaCommands:63,volume:{level:a.h.volume,muted:a.h.muted}};c&&(d.media=c);vu(a,{requestId:b===void 0?0:b,type:"MEDIA_STATUS",status:[d]},a.A)}
S("shaka.cast.CastReceiver",ru);ru.prototype.destroy=ru.prototype.destroy;ru.prototype.setContentArtist=ru.prototype.tm;ru.prototype.setContentImage=ru.prototype.um;ru.prototype.setContentTitle=ru.prototype.wm;ru.prototype.clearContentMetadata=ru.prototype.Ak;ru.prototype.setContentMetadata=ru.prototype.vm;ru.prototype.isIdle=ru.prototype.Hl;ru.prototype.isConnected=ru.prototype.isConnected;var Eu=.5,Au=5,Hu="IDLE",Ku="PLAYING",Iu="BUFFERING",Ju="PAUSED";function Lu(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(D){return D!=null&&D.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(D){return D!=null&&D.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=Mu(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,t=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){r=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){t=v;break}if(r===
-1||t===-1)q=Nu(d,e),a.nestedCues.push(q);else{for(;r<=t;r++)if(v=q[r]){var w=v.l,z=v.i,y=v.j,A=v.h;if(w!=h||z!=k||y!=l||A!=m)n.payload&&a.nestedCues.push(n),n=Mu(d,e,w,z,y,A),h=w,k=z,l=y,m=A;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Nu(d,e),a.nestedCues.push(n));n=Mu(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Mu(a,b,c,d,e,f){a=new He(a,b,"");c&&a.textDecoration.push(ef);d&&(a.fontStyle=df);a.color=e;a.backgroundColor=f;return a}
function Nu(a,b){a=new He(a,b,"");a.lineBreak=!0;return a}function Ou(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Pu(a,b){this.i=[];this.g=1;this.h=0;this.F=a;this.D=b;this.j=this.m=!1;this.l="white";this.u="black";this.A=this.C=null;Qu(this)}function Ru(a,b,c){var d="CC"+((a.F<<1|a.D)+1),e=new He(b,c,"");e.lineInterpretation=1;var f=Su.get(a.g);f&&(e.line=f);a.A!=null&&a.C!=null&&(e.position=10+Math.min(70,a.A*10)+a.C*2.5);(b=Lu(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=Su.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Qu(a){Tu(a,0,15);a.g=1}
function Uu(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=Vu.has(c)?Vu.get(c):String.fromCharCode(c);break;case 1:d=Wu.get(c);break;case 2:a.i[a.g].pop();d=Xu.get(c);break;case 3:a.i[a.g].pop(),d=Yu.get(c)}d&&a.i[a.g].push(new Ou(d,a.m,a.j,a.u,a.l))}}function Zu(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Tu(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var Vu=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"]]),Wu=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"]]),Xu=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"]]),Yu=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"]]),Su=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 $u(a,b){this.h=0;this.u=new Pu(a,b);this.i=new Pu(a,b);this.g=this.j=new Pu(a,b);this.l=0;this.m=null}function av(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=Ru(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,Tu(c,0,15),c=a.j,c.g=c.h>0?c.h:0,Tu(c,0,15),d.g=15);a.h=3;d.h=b;return e}function bv(a){a.h=1;a.g=a.j;a.g.h=0}function cv(a){eb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.u;a.h=4}var dv="black green blue cyan red yellow magenta black".split(" "),ev="white green blue cyan red yellow magenta white_italics".split(" ");function fv(a,b){this.J=b;this.M=a;this.K=this.l=!1;this.m=this.u=this.H=this.L=this.I=0;this.G=2;this.i=[];this.g=this.h=this.j=0;this.F=this.C=!1;this.D="white";this.A="black";gv(this)}function gv(a){a.i=[];for(var b=0;b<16;b++)a.i.push(hv())}function hv(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function iv(a,b){jv(a)&&(a.i[a.h][a.g]=new Ou(b,a.F,a.C,a.A,a.D),a.g++)}function jv(a){var b=a.g<a.m&&a.g>=0;return a.h<a.u&&a.h>=0&&b}fv.prototype.isVisible=function(){return this.l};
function kv(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=hv()}
function lv(a,b,c){var d=new He(a.j,b,"");d.textAlign=a.G===0?"left":a.G===1?"right":Je;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.M;e.height=a.u;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Nd:2;switch(a.H){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Lu(d,"svc"+c,a.i,a.j,b))a.j=b;return c}fv.prototype.display=function(){this.l=!0};function mv(){this.i=[];this.h=null;this.g=0}function nv(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new ov(a.h)),a.h=null,a.g=0))}function ov(a){this.g=0;this.h=a}ov.prototype.Qa=function(){return this.g<this.h.length};ov.prototype.Wa=function(){return this.g};function pv(a){if(!a.Qa())throw new V(2,2,3E3);return a.h[a.g++]}ov.prototype.skip=function(a){if(this.g+a>this.h.length)throw new V(2,2,3E3);this.g+=a};
ov.prototype.Jj=function(a){if(this.g-a<0)throw new V(2,2,3E3);this.g-=a};function qv(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function rv(a,b,c,d){if(!a.g)return[];if(c==24)return c=pv(b).value,d=pv(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),iv(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!jv(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=lv(b,d,a.i));b.h+1>=b.u?kv(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=lv(b,d,a.i));b.i[b.h]=hv();b.g=0;break;case 12:b.isVisible()&&
(e=lv(b,d,a.i)),gv(b),b.h=0,b.g=0}return e?[e]:[]}
function sv(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=pv(b).value;b=[];c=u(tv(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=lv(e,d,a.i);f&&b.push(f)}gv(e)}return b}if(c===137)for(b=pv(b).value,b=u(tv(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=pv(b).value;b=null;c=u(tv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=lv(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(c===139){c=pv(b).value;b=null;c=u(tv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=lv(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=pv(b).value,uv(a,b,d);if(c===143)return d=uv(a,255,d),vv(a),d;if(c===144)b.skip(1),d=pv(b).value,a.g&&(a.g.C=(d&128)>0,a.g.F=(d&64)>0);else if(c===145)d=pv(b).value,c=pv(b).value,b.skip(1),a.g&&(b=wv((c&48)>>4,(c&12)>>2,c&3),a.g.D=wv((d&48)>>4,(d&12)>>2,d&3),a.g.A=b);else if(c===146)d=pv(b).value,b=pv(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=pv(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new fv(c,a.i),f.j=d,a.h[c]=f);d=pv(b).value;f=pv(b).value;var g=pv(b).value,h=pv(b).value,k=pv(b).value;b=pv(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.F=!1,b.C=!1,b.D="white",b.A="black");b=a.h[c];b.l=(d&32)>0;b.L=f&127;b.I=g;b.H=(h&240)>>4;b.K=(f&128)>0;b.u=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function tv(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function uv(a,b,c){var d=[];b=u(tv(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=lv(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function vv(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function wv(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return xv[a<<2|b<<1|c]}
var yv=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"]]),xv="black blue green cyan red magenta yellow white".split(" ");function zv(){this.h=[];this.g=[];this.i=new mv;this.l=0;this.m=new Map([["CC1",new $u(0,0)],["CC2",new $u(0,1)],["CC3",new $u(1,0)],["CC4",new $u(1,1)]]);this.A=this.u=0;this.j=new Map;this.D=!0;this.C=new Set;Av(this)}zv.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Av(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())vv(b.value)};
function Av(a){a.u=0;a.A=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,Qu(c.i),Qu(c.j),Qu(c.u);a.D=!0}
zv.prototype.extract=function(a,b){if(this.D){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.D=!1}a=new yh(a,0);if(!(a.getLength()<8)&&a.ba()===181&&a.Ia()===49&&a.$()===1195456820&&a.ba()===3&&(c=a.ba(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ba(),f=(e&4)>>2,g=a.ba(),h=a.ba();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,Hb:g,xc: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})))}};
zv.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=Bv(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())nv(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=Cv(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
function Bv(a,b){var c=b.type;if((b.Hb&112)===16){var d=b.Hb>>3&1;c===0?a.u=d:a.A=d}d="CC"+((c<<1|(c?a.A:a.u))+1);c=a.m.get(d);if(b.Hb===255&&b.xc===255||!b.Hb&&!b.xc||!Dv(b.Hb)||!Dv(b.xc))return++a.l>=45&&Av(a),null;a.l=0;b.Hb&=127;b.xc&=127;var e=b.Hb;if(e>=1&&e<=15||!b.Hb&&!b.xc)return null;e=null;if((b.Hb&112)===16)a:{a.C.add(d),d=b.Hb;a=b.xc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
null;var g=a>95?a-96:a-64;g<=13?d=ev[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,Zu(g,c,1+g.g-g.h,g.h),Tu(g,0,c-1),Tu(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.A=f,g.u="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",Uu(c.g,0,32),d=!1,b=ev[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=dv[(a&
14)>>1]),c.g.u=b;else if((d&247)===17&&(a&240)===48)Uu(c.g,1,a);else if((d&246)===18&&(a&224)===32)Uu(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.xc){case 32:bv(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=av(c,2,a);break;case 38:d=av(c,3,a);break;case 39:d=av(c,4,a);break;case 40:Uu(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Qu(c.u);cv(c);break;case 43:cv(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=Ru(b,c.l,a));Tu(b,0,15);break;case 45:b=
c.g;c.h!==3?d=null:(d=Ru(b,c.l,a),e=b.g-b.h+1,Zu(b,e-1,e,b.h),Tu(b,0,e-1),Tu(b,b.g,15-b.g),c.l=a);break;case 46:Tu(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=Ru(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,bv(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.C=a-32)}e=null}else a=b.xc,Uu(c.g,0,b.Hb),Uu(c.g,0,a);return e}
function Cv(a,b){var c=[];try{for(;b.Qa();){var d=pv(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=pv(b).value&63);if(e!=0){a.C.add("svc"+e);a.j.has(e)||a.j.set(e,new qv(e));for(var g=a.j.get(e),h=b.Wa();b.Wa()-h<f;){e=g;var k=b,l=pv(k),m=l.value,n=l.pts;if(m===16){var q=pv(k);m=m<<16|q.value}if(m>=0&&m<=31)var r=rv(e,k,m,n);else if(m>=128&&m<=159)r=sv(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?iv(e.g,"\u266a"):iv(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&iv(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(yv.has(k)){var t=yv.get(k);iv(e.g,t)}else iv(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?iv(e.g,"_"):iv(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(v){if(v instanceof V&&v.code===3E3)eb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function Dv(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}zv.prototype.getStreams=function(){return Array.from(this.C)};S("shaka.cea.CeaDecoder",zv);Id=function(){return new zv};function Ev(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function Fv(){this.j=new Map;this.i=this.h=0;this.g=Gv}
Fv.prototype.init=function(a){function b(f){f=f.name;Hv.has(f)&&(c.g=Hv.get(f))}var c=this,d=[],e=[];(new Bh).box("moov",Gh).box("mvex",Gh).X("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.$();g=g.$();c.h=f;c.i=g}).box("trak",Gh).X("tkhd",function(f){var g=f.reader;f=f.version;f==1?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.$();f==1?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Ia();g.Ia();g.Ia();g.Ia();d.push(h)}).box("mdia",Gh).X("mdhd",
function(f){f=Wi(f.reader,f.version);e.push(f.timescale)}).box("minf",Gh).box("stbl",Gh).X("stsd",Ih).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",Jh).box("sinf",Gh).box("frma",function(f){f=Zi(f.reader).codec;Hv.has(f)&&(c.g=Hv.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new V(2,2,2010);this.g==Gv&&db("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
Fv.prototype.parse=function(a){var b=this;if(this.g==Gv)return[];var c=[],d=0,e=[];(new Bh).box("moof",function(f){d=f.start;e=[];Gh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,qe:b.h,re:b.i,Bj:[],timescale:9E4});Gh(f)}).X("trun",function(f){var g=e[e.length-1];f=Xi(f.reader,f.version,f.flags);g.Bj.push(f)}).X("tfhd",function(f){var g=e[e.length-1];f=Ui(f.reader,f.flags);g.qe=f.qe||b.h;g.re=f.re||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).X("tfdt",function(f){var g=e[e.length-
1];f=Vi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Wa(),k=u(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?db("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),Iv(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.qe,l.re,g,l.Bj,c))}).parse(a,!1,!0);return c};
function Iv(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.ci});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Yg);b.Qa();){g=b.$();var q=b.ba(),r=null;r=!1;h=1;switch(a.g){case Jv:r=q&31;r=r==6;break;case Kv:h=2;b.skip(1);r=q>>1&63;r=r==39||r==40;break;case Lv:h=2;b.skip(1);r=q>>1&63;r=r==23||r==24;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].hg||0),q=(c+q)/d,h=b.bc(g-h,!1),h=u(Ev(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;m==0&&(c=l<n.length?c+(n[l].di||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Fv);var Gv=0,Jv=1,Kv=2,Lv=3,Hv=(new Map).set("avc1",Jv).set("avc3",Jv).set("dvav",Jv).set("dva1",Jv).set("hev1",Kv).set("hvc1",Kv).set("dvh1",Kv).set("dvhe",Kv).set("vvc1",Lv).set("vvi1",Lv).set("dvc1",Lv).set("dvi1",Lv);Kd("video/mp4",function(){return new Fv});function Mv(){this.g=null}Mv.prototype.init=function(){};Mv.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Ak;var b=[];a=Lb(a);if(!Ik(a))return b;a=this.g.parse(a);var c=a.se(),d=a.Df();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)&&d.time!=null)for(var e=u(Ev(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Mv);Kd("video/mp2t",function(){return new Mv});function Nv(a){var b=0,c=Pb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=Lb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ov(a){a=rc(ie(a));a=Nv(a).filter(function(b){return b.type===Pv})[0];if(!a)return null;a=fc(a.value,!0);return(a=ae(a,"WRMHEADER"))?a:null}
function Qv(a){try{var b=Ov(a);if(b)a:{for(var c=u(ke(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(h.tagName=="LA_URL"){var k=ie(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Pv=1;function Rv(){this.g=new Map}Rv.prototype.release=function(){this.g.clear()};
function Sv(a,b,c,d){var e=Tv(a,b),f=null;a=[];var g=[];b=null;var h=new Set(e.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(h.size>1)throw new V(2,4,4010);if(!c){g=e.filter(function(l){return l.Yd=="urn:mpeg:dash:sea:2012"});if(g.length>1)throw new V(2,4,4050);g.length&&(b=Uv(g[0]));(g=e.find(function(l){return l.Yd=="urn:mpeg:dash:mp4protection:2011"}))&&g.encryptionScheme&&(k=g.encryptionScheme);g=e.filter(function(l){return l.Yd=="urn:mpeg:dash:mp4protection:2011"?(f=l.init||
f,!1):l.Yd!="urn:mpeg:dash:sea:2012"});g.length&&(a=Vv(f,k,g,d,h),a.length==0&&(a=[yc("",k,f)]))}if(e.length&&!b&&(c||!g.length))for(a=[],c=u(Object.values(d)),d=c.next();!d.done;d=c.next())d=d.value,d!="org.w3.clearkey"&&(d=yc(d,k,f),a.push(d));if(h=Array.from(h)[0]||null)for(k=u(a),c=k.next();!c.done;c=k.next())for(c=u(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Wi:h,Tn:f,drmInfos:a,Mg:b,aj:!0}}
function Wv(a,b,c,d,e){var f=Sv(a,b,d,e);if(c.aj){a=c.drmInfos.length==1&&!c.drmInfos[0].keySystem;b=f.drmInfos.length==0;if(c.drmInfos.length==0||a&&!b)c.drmInfos=f.drmInfos;c.aj=!1}else if(f.drmInfos.length>0&&(c.drmInfos=c.drmInfos.filter(function(g){return f.drmInfos.some(function(h){return h.keySystem==g.keySystem})}),c.drmInfos.length==0))throw new V(2,4,4008);return f.Wi||c.Wi}
function Xv(a){var b=me(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ie(b)))return b;if((b=me(a.node,"urn:microsoft:playready","pro"))&&ie(b))return Qv(b);if(a=me(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=ie(a)){b=rc(a);a=8;b=Pb(b);var c=b.getUint8(a);a+=20;c>0&&(a+=4+16*b.getUint32(a));a=Lb(b,a+4);a=pc(a);a=ae("<pro>"+a+"</pro>");return Qv(a)}return""}
function Vv(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.Yd];if(h){var k;if((k=me(g.node,"urn:microsoft:playready","pro"))&&ie(k)){k=ie(k);k=rc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Nh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if(g.Yd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=g;var m=e;if(m.size==0)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Nh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=yc(h,b,g.init||a||k||l);if(h=Yv.get(h))k.licenseServerUri=h(g);a:{if(g=me(g.node,"https://dashif.org/CPS","Certurl"))if(g=ie(g))break a;g=""}k.serverCertificateUri=g;f.push(k)}}return f}function Tv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())(d=Zv(a,d.value))&&c.push(d);return c}
function Zv(a,b){var c=b.attributes.schemeIdUri,d=qe(b,"urn:mpeg:cenc:2013","default_KID"),e=ne(b,"urn:mpeg:cenc:2013","pssh").map(je),f=b.attributes.value;if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new V(2,4,4009);var g=[];try{g=e.map(function(h){if(!a.g.has(h)){var k=rc(h);a.g.set(h,k)}return{initDataType:"cenc",initData:a.g.get(h),keyId:null}})}catch(h){throw new V(2,4,4007);}return{node:b,Yd:c,keyId:d,init:g.length>0?g:null,encryptionScheme:f}}
function Uv(a){if(!window.crypto||!window.crypto.subtle)throw db("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=me(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new V(2,4,4051);if(b.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new V(2,4,4051);b=me(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new V(2,4,4051);a=b.attributes.IV;b=nc(b.attributes.keyUriTemplate);
if(!a||!b)throw new V(2,4,4051);a=uc(a.substr(2));if(a.byteLength!=16)throw new V(2,4,4048);return{Nl:b,iv:a}}
var Yv=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4054);if(a=me(a.node,"https://dashif.org/CPS","Laurl"))if(a=ie(a))return a;return""}).set("com.widevine.alpha",function(a){var b=me(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ie(b))?b:(a=me(a.node,"urn:microsoft","laurl"))?nc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Xv).set("com.microsoft.playready.recommendation",Xv).set("com.microsoft.playready.software",
Xv).set("com.microsoft.playready.hardware",Xv).set("org.w3.clearkey",function(a){var b=me(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ie(b))?b:(a=me(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&a.attributes.Lic_type==="EME-1.0"&&a&&(a=ie(a))?a:""});function $v(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if(h=="$$")return"$";var n=g.get(k);if(n==null)return h;k=="RepresentationID"&&l&&(l=void 0);k=="Time"&&typeof n!="bigint"&&(Math.abs(n-Math.round(n))>=.2&&db("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 aw(a,b){var c=bw(a,b,"timescale"),d=1;c&&(d=we(c)||1);c=bw(a,b,"duration");var e=(c=we(c||""))?c/d:null,f=bw(a,b,"startNumber"),g=Number(bw(a,b,"presentationTimeOffset"))||0,h=xe(f||"");if(f==null||h==null)h=1;f=null;if(b=cw(a,b,"SegmentTimeline")){b=he(b,"S");f=d;a=a.ra.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],t=oe(q,"t",xe),v=oe(q,"d",xe),w=oe(q,"r",ve);q=oe(q,"k",ve)||0;t!=null&&(t-=g);if(v){t=t!=null?t:m;w=w||0;if(w<0)if(r){r=oe(r,"t",xe);if(r==
null)break;else if(t>=r)break;w=Math.ceil((r-t)/v)-1}else{if(a==Infinity)break;else if(t/f>=a)break;w=Math.ceil((a*f-t)/v)-1}l.length>0&&t!=m&&(l[l.length-1].end=t/f);for(r=0;r<=w;++r)m=t+v,l.push({start:t/f,ee:t,end:m/f,Di:m,Hc:q,rm:l.length+k}),t=m}}f=l}return{timescale:d,vg:c,pb:e,Oe:h,nc:g/d||0,xd:g,timeline:f}}function dw(a,b){return[b(a.N),b(a.va),b(a.Aa)].filter(Vf)}function bw(a,b,c){b=dw(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 cw(a,b,c){b=dw(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=le(d.value,c));d=b.next());return a}
function ew(a,b,c,d,e,f){for(var g=qe(a,"http://www.w3.org/1999/xlink","href"),h=qe(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=ce("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(f>=5)return $g(new V(2,4,4028));if(h!="onLoad")return $g(new V(2,4,4027));var q=xc([d],[g]);return e.request(0,mh(q,b)).cb(function(r){r=$d(r.data,a.tagName);if(!r)return $g(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 v=t.next();!v.done;v=t.next())v=v.value,a.attributes[v]=r.attributes[v];return fw(a,b,c,q[0],e,f+1)})}
function fw(a,b,c,d,e,f){f=f===void 0?0:f;if(qe(a,"http://www.w3.org/1999/xlink","href")){var g=ew(a,b,c,d,e,f);c&&(g=g.cb(void 0,function(){return fw(a,b,c,d,e,f)}));return g}g=[];for(var h=u(ge(a)),k=h.next(),l={};!k.done;l={me:void 0},k=h.next())l.me=k.value,qe(l.me,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?a.children=a.children.filter(function(m){return function(n){return n!==m.me}}(l)):l.me.tagName!="SegmentTimeline"&&g.push(fw(l.me,b,c,d,e,f));return dh(g).cb(function(){return a})}
;function gw(a,b,c,d,e,f,g,h){var k,l=(new Bh).X("sidx",function(m){k=hw(b,d,e,f,g,c,m,h)});a&&l.parse(a);if(k)return k;throw new V(2,3,3004);}
function hw(a,b,c,d,e,f,g,h){h=h===void 0?!1:h;var k=[];g.reader.skip(4);var l=g.reader.$();if(l==0)throw new V(2,3,3005);if(g.version==0){var m=g.reader.$();var n=g.reader.$()}else m=g.reader.Vd(),n=g.reader.Vd();g.reader.skip(2);var q=g.reader.Ia();a=(h?-g.size:a)+g.size+n;for(h=0;h<q;h++){var r=g.reader.$();n=(r&2147483648)>>>31;r&=2147483647;var t=g.reader.$();g.reader.skip(4);if(n==1)throw new V(2,3,3006);k.push(new Kj(m/l+c,(m+t)/l+c,function(){return f},a,a+r-1,b,c,d,e));m+=t;a+=r}g.parser.stop();
return k};function iw(a){this.h=Pb(a);this.g=new yh(this.h,0)}iw.prototype.Qa=function(){return this.g.Qa()};
function jw(a){var b=kw(a);if(b.length>7)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=kw(a);a:{d=u(lw);for(var e=d.next();!e.done;e=d.next())if(Kb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Wa();else{if(b.length==8&&b[1]&224)throw new V(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=e==0?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Wa();d=Pb(a.h,a.g.Wa(),b);a.g.skip(b);return new mw(c,
d)}function kw(a){var b=a.g.Wa(),c=a.g.ba();if(c==0)throw new V(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Lb(a.h,b,c)}var lw=[[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 mw(a,b){this.id=a;this.g=b}
function nw(a){if(a.g.byteLength>8)throw new V(2,3,3002);if(a.g.byteLength==8&&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 ow(a,b,c,d,e,f,g){b=new iw(b);if(jw(b).id!=440786851)throw new V(2,3,3008);var h=jw(b);if(h.id!=408125543)throw new V(2,3,3009);b=h.g.byteOffset;h=new iw(h.g);for(var k=null;h.Qa();){var l=jw(h);if(l.id==357149030){k=l;break}}if(!k)throw new V(2,3,3010);k=new iw(k.g);l=1E6;for(h=null;k.Qa();){var m=jw(k);if(m.id==2807729)l=nw(m);else if(m.id==17545)if(m.g.byteLength==4)h=m.g.getFloat32(0);else if(m.g.byteLength==8)h=m.g.getFloat64(0);else throw new V(2,3,3003);}if(h==null)throw new V(2,3,
3011);k=l/1E9;h*=k;a=jw(new iw(a));if(a.id!=475249515)throw new V(2,3,3007);return pw(a,b,k,h,c,d,e,f,g)}function pw(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new iw(a.g);for(var n=null,q=null;a.Qa();){var r=jw(a);if(r.id==187){var t=qw(r);t&&(r=c*t.Fm,t=b+t.gm,n!=null&&m.push(new Kj(n+g,r+g,l,q,t-1,f,g,h,k)),n=r,q=t)}}n!=null&&m.push(new Kj(n+g,d+g,l,q,null,f,g,h,k));return m}
function qw(a){var b=new iw(a.g);a=jw(b);if(a.id!=179)throw new V(2,3,3013);a=nw(a);b=jw(b);if(b.id!=183)throw new V(2,3,3012);b=new iw(b.g);for(var c=0;b.Qa();){var d=jw(b);if(d.id==241){c=nw(d);break}}return{Fm:a,gm:c}};function rw(a,b,c){b=cw(a,b,"Initialization");if(!b)return null;var d=a.N.ib(),e=b.attributes.sourceURL;e&&(d=xc(d,[nc(e)],a.Rb()));e=0;var f=null;if(b=oe(b,"range",ue))e=b.start,f=b.end;c=new Ij(function(){return d},e,f,sw(a),null,null,c,a.va.encrypted);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;a.ra&&!a.ra.If&&(c.g=a.ra.start+a.ra.duration);return c}
function tw(a,b,c){var d=Number(bw(a,uw,"presentationTimeOffset"))||0,e=bw(a,uw,"timescale"),f=1;e&&(f=we(e)||1);var g=d/f||0,h=rw(a,uw,c);vw(a,h);var k=Yd(a);return{endTime:-1,timeline:-1,hd:function(){var l=cw(k,uw,"RepresentationIndex");var m=k.N.ib();l&&(l=nc(l.attributes.sourceURL))&&(m=xc(m,[l],k.Rb()));l=ww(k);return xw(k,b,h,m,l.start,l.end,g)},timescale:f}}
function xw(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F;return O(function(J){if(J.g==1)return h=a.presentationTimeline,k=!a.Jb||!a.ra.If,l=a.ra.start,m=a.ra.duration,n=a.N.mimeType.split("/")[1],q=b,r=null,t=[q(d,e,f,!1),n=="webm"?q(c.S(),c.startByte,c.endByte,!0):null],q=null,H(J,Promise.all(t),2);v=J.h;w=v[0];z=v[1]||null;y=null;A=l-g;D=l;G=m?l+m:Infinity;B=a.N.ib();E=B.length!=d.length||B.some(function(L,P){return L!=d[P]});y=n=="mp4"?gw(w,e,B,c,A,D,G,E):ow(w,z,B,c,A,D,G);C=u(y);
for(K=C.next();!K.done;K=C.next())F=K.value,F.codecs=a.N.codecs,F.mimeType=a.N.mimeType,F.bandwidth=a.bandwidth;h.Ge(y);r=new jm(y);k&&r.Hd(D,G,!0);return J.return(r)})}function uw(a){return a.Zd}function ww(a){var b=cw(a,uw,"RepresentationIndex");a=bw(a,uw,"indexRange");a=ue(a||"");b&&(a=oe(b,"range",ue,a));return a}function vw(a,b){yw(a,b);if(!ww(a))throw new V(2,4,4002);}
function yw(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Ec&&c!="mp4"&&c!="webm")throw new V(2,4,4006);if(c=="webm"&&!b)throw new V(2,4,4005);}
function sw(a){var b=a.N;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Wf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.va.label||null,roles:a.roles||null,language:a.va.language||null}};function zw(a,b,c){var d=rw(a,Aw,c),e=Bw(a);if(!e.pb&&!e.timeline&&e.Qd.length>1)throw new V(2,4,4002);if(!e.pb&&!a.ra.duration&&!e.timeline&&e.Qd.length==1)throw new V(2,4,4002);if(e.timeline&&e.timeline.length==0)throw new V(2,4,4002);var f=null,g=null;a.Aa.id&&a.N.id&&(g=b.get(a.Aa.id+","+a.N.id))&&(f=g.segmentIndex);var h=Cw(a.ra.start,a.ra.duration,a.N.ib,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Rb);b=!f;f?f.Ee(h,a.presentationTimeline.Mb()):f=new jm(h);a.presentationTimeline.Ge(h);a.Jb&&
a.ra.If||f.Hd(a.ra.start,a.ra.duration?a.ra.start+a.ra.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,hd:function(){f&&f.getNumReferences()!=0||f.Rf(h);return Promise.resolve(f)},timescale:e.timescale}}function Aw(a){return a.Lc}function Bw(a){var b=Dw(a);a=aw(a,Aw);var c=a.Oe;c==0&&(c=1);var d=0;a.pb?d=a.pb*(c-1):a.timeline&&a.timeline.length>0&&(d=a.timeline[0].start);return{pb:a.pb,startTime:d,Oe:c,nc:a.nc,timescale:a.timescale,timeline:a.timeline,Qd:b}}
function Cw(a,b,c,d,e,f,g,h,k,l){var m=d.Qd.length;d.timeline&&d.timeline.length!=d.Qd.length&&(m=Math.min(d.timeline.length,d.Qd.length));for(var n=a-d.nc,q=b?a+b:Infinity,r=[],t=d.startTime,v={},w=0;w<m;v={xg:void 0,ig:void 0},w++){v.ig=d.Qd[w];var z=t;t=void 0;t=d.pb!=null?z+d.pb:d.timeline?d.timeline[w].end:z+b;v.xg=null;v=new Kj(a+z,a+t,function(y){return function(){y.xg==null&&(y.xg=xc(c(),[y.ig.Ul],l()));return y.xg}}(v),v.ig.start,v.ig.end,e,n,a,q,[],"",null,null,Lj,f);v.codecs=h;v.mimeType=
g;v.bandwidth=k;r.push(v)}return r}function Dw(a){return[a.N.Lc,a.va.Lc,a.Aa.Lc].filter(Vf).map(function(b){return he(b,"SegmentURL")}).reduce(function(b,c){return b.length>0?b:c}).map(function(b){b.attributes.indexRange&&!a.Gh&&(a.Gh=!0);var c=nc(b.attributes.media);b=oe(b,"mediaRange",ue,{start:0,end:null});return{Ul:c,start:b.start,end:b.end}})};function Ew(a,b,c,d,e,f,g,h,k,l){k||a.N.Ff||(a.N.Ff=bw(a,Fw,"initialization"));var m=a.N.Ff?Gw(a,g):null,n=Hw(a);Iw(n);var q=Yd(a);if(n.ze)return yw(a,m),{endTime:-1,timeline:-1,hd:function(){var z=$v(n.ze,q.N.originalId,null,null,q.bandwidth||null,null);z=xc(q.N.ib(),[z]);return xw(q,b,m,z,0,null,n.nc)},timescale:n.timescale};if(n.pb)return d||a.va.contentType==="image"||a.va.contentType==="text"||(d=a.ra.start,l=a.Aa.id,c=a.ra.duration,l=(l=l!=null&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.Ph(n.pb),
a.presentationTimeline.zj(d,l)),{endTime:-1,timeline:-1,hd:function(){return Jw(q,n,e,m,f,g,h,a.N.jg)},timescale:n.timescale};var r=null;d=d=null;a.Aa.id&&a.N.id&&(d=a.Aa.id+","+a.N.id,d=c.get(d))&&(r=d.segmentIndex);var t=a.ra.start,v=a.ra.duration?t+a.ra.duration:Infinity;if(r)l=r,Kw(l,n,t,v,m,a.Jb),l.eb(a.presentationTimeline.Mb());else{c=0;k=-1;if(a.Aa.id!=null&&a.N.id!=null){var w=l.get(a.Aa.id);if(w)k=w.timeline;else for(l=u(l.values()),w=l.next();!w.done;w=l.next())if(w=w.value,Math.abs(n.nc-
w.endTime)<=Ic&&w.Yh.includes(a.N.id)){k=w.timeline;break}else w.timeline>=c&&(c=w.timeline+1)}k==-1&&(k=c);r=new Lw(a.Jb,n,a.N.originalId,a.bandwidth,a.N.ib,a.Rb,t,v,m,g,a.N.jg,k)}n.timeline&&a.va.contentType!=="image"&&a.va.contentType!=="text"&&a.presentationTimeline.Aj(r.h?r.h.timeline:[],t);d&&a.Jb&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.nc:-1;l=-1;r instanceof Lw&&(l=r.tf());return{endTime:d,timeline:l,hd:function(){r instanceof Lw&&r.getNumReferences()==0&&Kw(r,n,t,
v,m,a.Jb);return Promise.resolve(r)},timescale:n.timescale}}function Fw(a){return a.bd}function Hw(a){var b=aw(a,Fw),c=bw(a,Fw,"media"),d=bw(a,Fw,"index"),e=bw(a,Fw,"k"),f=0;e&&(f=parseInt(e,10));return{vg:b.vg,pb:b.pb,timescale:b.timescale,Oe:b.Oe,nc:b.nc,xd:b.xd,timeline:b.timeline,kc:c&&nc(c),ze:d,mimeType:a.N.mimeType,codecs:a.N.codecs,bandwidth:a.bandwidth,Vl:f}}
function Iw(a){var b=a.ze?1:0;b+=a.timeline?1:0;b+=a.pb?1:0;if(b==0)throw new V(2,4,4002);b!=1&&(a.ze&&(a.timeline=null),a.vg=null,a.pb=null);if(!a.ze&&!a.kc)throw new V(2,4,4002);}
function Jw(a,b,c,d,e,f,g,h){function k(L){var P=L-w,Q=P*v,N=b.vg,M=P*N;"BigInt"in window&&M>Number.MAX_SAFE_INTEGER&&(M=BigInt(P)*BigInt(N));Q+=q;P=Q+v;N=Math.min(P,m());var R=[],U=b.Vl;if(U)for(var ra=(N-Q)/U,ba={},Ia=0;Ia<U;ba={Zj:void 0},Ia++){var Ea=Q+ra*Ia,Ca=Ea+ra;ba.Zj=Ia;ba=new Kj(Ea,Ca,function(Ja){return function(){var Da=$v(z,A,L,Ja.Zj,y,M);return xc(D(),[Da],G())}}(ba),0,null,d,B,q,m(),[],"",null,null,Lj,f);ba.codecs=a.N.codecs;ba.mimeType=a.N.mimeType;h==0?Ia>0&&ba.Od():Ia%h!=0&&ba.Od();
R.push(ba)}Q=new Kj(Q,N,function(){if(U)return[];var Ja=$v(z,A,L,null,y,M);return xc(D(),[Ja],G())},0,null,d,B,q,m(),R,"",null,null,Lj,f,R.length>0);Q.codecs=a.N.codecs;Q.mimeType=a.N.mimeType;Q.bandwidth=a.bandwidth;Q.j=P;return Q}function l(){var L=[Math.max(n.Mb(),q),Math.min(n.Tc(),m())].map(function(P){return P-q});L=[Math.ceil(L[0]/v),Math.ceil(L[1]/v)-1];a.N.zb&&L[1]++;return L.map(function(P){return P+w})}function m(){var L=r!=null&&e.get(r)||t;return L?q+L:Infinity}var n=a.presentationTimeline,
q=a.ra.start,r=a.Aa.id,t=a.ra.duration,v=b.pb,w=b.Oe,z=b.kc,y=a.bandwidth||null,A=a.N.originalId,D=a.N.ib,G=a.Rb,B=q-b.nc,E=l();c=a.Jb?Math.max(E[0],E[1]-c+1):E[0];g=g||E[1];E=[];for(var C=c;C<=g;++C){var K=k(C);E.push(K)}var F=new jm(E);E=n.Tc()<m();C=n.U();if(E||C){var J=Math.max(c,g+1);c=v;a.N.zb&&(c=.1);F.wg(c,function(){var L=n.Mb();F.eb(L);var P=u(l());P.next();P=P.next().value;for(var Q=[];J<=P;){var N=k(J);Q.push(N);J++}return L>m()&&!Q.length?null:Q})}return Promise.resolve(F)}
function Gw(a,b){var c=a.N.Ff;c||(c=bw(a,Fw,"initialization"));if(!c)return null;c=nc(c);var d=a.N.originalId,e=a.bandwidth||null,f=a.N.ib,g=a.Rb;b=new Ij(function(){var h=$v(c,d,null,null,e,null);return xc(f(),[h],g())},0,null,sw(a),null,null,b,a.va.encrypted);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;a.ra&&!a.ra.If&&(b.g=a.ra.start+a.ra.duration);return b}
function Lw(a,b,c,d,e,f,g,h,k,l,m,n){jm.call(this,[]);this.F=a;this.h=b;this.H=c;this.D=d;this.G=e;this.J=f;this.j=g;this.l=h;this.A=k;this.C=l;this.I=m;this.K=n;Mw(this)}pa(Lw,jm);p=Lw.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){jm.prototype.release.call(this);this.h=null};
p.eb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;b>0&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,this.getNumReferences()===0&&this.release())}};
function Kw(a,b,c,d,e,f){Nw(a,e);a.F=f;if(a.h){if(a.h.xd!==b.xd)for(c=b.xd-a.h.xd,e=0;e<b.timeline.length;e++)f=b.timeline[e],f.ee+=c,f.Di+=c,f.start=(f.ee+c)/b.timescale,f.end=(f.Di+c)/b.timescale;a.h.kc!==b.kc&&(a.h.kc=b.kc);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();b.length>0&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Mw(a)}
function Nw(a,b){if(a.A!==b){a.A=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Oj(c,b)}}function Mw(a){if(a.h&&!a.u){for(var b=[],c=u(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||d.end<=0||b.push(d);a.h.timeline=b;a.eb(a.j)}}
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:this.l===Infinity?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
p.get=function(a){var b=this;a-=this.i;if(a<0||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.rm,e=c.ee+this.h.xd,f=this.j-this.h.nc,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&this.l!==Infinity&&(h=this.F&&Math.abs(h-this.l)>.1?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.Hc&&this.h&&this.h.kc&&(q=this.h.kc.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.Hc;for(var r={},t=0;t<c.Hc;r={yg:void 0,
$j:void 0},t++){var v=c.start+q*t,w=v+q;r.$j=t;r.yg=null;r=new Kj(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];z.yg==null&&(z.yg=Ow(b.h.kc,b.H,d,b.D,e,z.$j,b.G,b.J));return z.yg}}(r),0,null,this.A,f,this.j,this.l,[],"",null,null,Lj,this.C);r.codecs=k;r.mimeType=l;r.bandwidth=m;this.I==0?t>0&&r.Od():t%this.I!=0&&r.Od();n.push(r)}}c=new Kj(this.j+c.start,h,function(){return n.length>0||!b.h?[]:Ow(b.h.kc,b.H,d,b.D,e,null,b.G,b.J)},0,null,this.A,f,this.j,this.l,n,"",null,null,Lj,this.C,
n.length>0);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};p.Kb=function(a){Mw(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Ow(a,b,c,d,e,f,g,h){a=$v(a,b,c,f,d||null,e);return xc(g(),[a],h()).map(function(k){return k.toString()})}p.tf=function(){return this.K};function Pw(a){this.u=null;this.C=a;this.H=new fh;this.i=[];this.h=null;this.m=[];this.D=null;this.G=[];this.F=300;this.l=new Map;this.j=new Map;this.g=null;this.A="UNKNOWN"}Pw.prototype.configure=function(a){this.u=a};Pw.prototype.destroy=function(){this.C=this.u=null;this.i=[];this.h=null;this.m=[];this.G=[];this.l.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.H.destroy()};Pw.prototype.setManifestType=function(a){this.A=a};
function Qw(a,b){var c,d,e,f,g,h,k;return O(function(l){if(l.g==1)return c=xc(a.i,[Rw(a,b)]),d=mh(c,a.u.retryParameters),e=a.C.networkingEngine.request(8,d),gh(a.H,e),va(l,2),H(l,e.promise,4);if(l.g!=2)return f=l.h,g=ec(f.data),h=JSON.parse(g),h.VERSION==1&&Sw(a,h,f.uri),xa(l,0);if((k=ya(l))&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new Sf(function(){Qw(a,b)});a.g.Y(a.F);I(l)})}
function Rw(a,b){if(!a.m.length)return b;b=new qb(b);var c=a.D||a.m[0],d=Math.round(a.C.getBandwidthEstimate()),e=b.g;a.A=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.A=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ib(e)&&ub(b,e);return b.toString()}function Sw(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Sf(function(){Qw(a,d)});if(c=b.TTL)a.F=c;a.g.Y(a.F);a.m=b["PATHWAY-PRIORITY"]||[];a.G=b["PATHWAY-CLONES"]||[]}
function Tw(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Pw.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function Uw(a,b,c){c=c===void 0?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=u(a.m),f=e.next(),g={};!f.done;g={Td:void 0},f=e.next())if(g.Td=f.value,f=b.get(g.Td))d.push({Uh:g.Td,location:f});else if(f=a.G.find(function(k){return function(l){return l.cn==k.Td}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].rk?(h=new qb(h),sb(h,f["URI-REPLACEMENT"].rk),d.push({Uh:g.Td,location:h.toString()})):d.push({Uh:g.Td,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)).Ib))return!1;return!0});d.length&&(a.D=d[0].Uh);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.D=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:xc(a.i,d)};function Vw(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=!1;this.m=new Set}p=Vw.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=!1;this.m.clear()};p.Al=function(){return this.l};p.Bh=function(){return this.j.slice()};p.Uk=function(){return this.i};
p.Xi=function(a,b){if(a){if(a.type=="audio")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(a.type=="video")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==Ec)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(a.type=="image")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 Ww(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[Xw(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Yw(n),n]})),l=new Map(h.textStreams.map(function(n){return[Zw(n),n]}));h=new Map(h.imageStreams.map(function(n){return[$w(n),n]}));if(b){var m=ax(Ec);l.set(Zw(m),m);m=ax("image");h.set($w(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Ni:c,nk:d,fk:e,lj:f}}
p.Tg=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra;return O(function(ba){if(ba.g==1){e=Hc;if(!b&&a.length==1)return f=Ww(a,!1),g=f.Ni,h=f.nk,k=f.fk,l=f.lj,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ba.B(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),n==-1&&(n=q));if(n==-1)return ba.return();t=Ww(a,!0);v=t.Ni;w=t.nk;z=t.fk;
y=t.lj;return H(ba,Promise.all([bx(d,d.h,v,n,cx,dx,m),bx(d,d.g,w,n,cx,dx,m),bx(d,d.j,z,n,cx,dx,m),bx(d,d.i,y,n,cx,dx,m)]),2)}A=0;D=[];if(d.g.length&&d.h.length)for(J=u(d.h),L=J.next();!L.done;L=J.next())for(P=L.value,Q=u(d.g),N=Q.next();!N.done;N=Q.next())M=N.value,R=Tb(P.drmInfos,M.drmInfos),P.drmInfos.length&&M.drmInfos.length&&!R.length||(U=(P.bandwidth||0)+(M.bandwidth||0),P.dependencyStream&&(U+=P.dependencyStream.bandwidth||0),M.dependencyStream&&(U+=M.dependencyStream.bandwidth||0),ra=A++,
D.push({id:ra,language:P.language,disabledUntilTime:0,primary:P.primary,audio:P,video:M,bandwidth:U,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=d.g.length?d.g:d.h,B=u(G),E=B.next();!E.done;E=B.next())C=E.value,K=A++,F=C.bandwidth||0,C.dependencyStream&&(F+=C.dependencyStream.bandwidth||0),D.push({id:K,language:C.language,disabledUntilTime:0,primary:C.primary,audio:C.type==e.ia?C:null,video:C.type==e.Ga?C:null,bandwidth:F,drmInfos:C.drmInfos,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]});d.l=D;I(ba)})};
function ex(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q;return O(function(N){switch(N.g){case 1:b=Hc;if(a.length==1)return N.return(a[0]);c=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.ia}).map(function(R){return[Xw(R),R]}))});d=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Ga}).map(function(R){return[Yw(R),R]}))});e=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Va}).map(function(R){return[Zw(R),
R]}))});f=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Dg}).map(function(R){return[$w(R),R]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=fx(b.Va),k.set(Zw(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=fx(b.Dg),q.set($w(r),r);t=new Vw;return H(N,bx(t,[],c,0,gx,hx,0),2);case 2:return v=N.h,H(N,bx(t,[],d,0,gx,hx,0),3);case 3:return w=N.h,H(N,bx(t,[],e,0,gx,hx,0),4);case 4:return z=N.h,H(N,bx(t,[],f,0,gx,hx,0),5);case 5:y=N.h;A=0;if(w.length&&v.length)for(C=
u(v),K=C.next();!K.done;K=C.next())for(F=K.value,J=u(w),L=J.next();!L.done;L=J.next())P=L.value,Q=A++,P.variantIds.push(Q),F.variantIds.push(Q);else for(D=w.concat(v),G=u(D),B=G.next();!B.done;B=G.next())E=B.value,E.variantIds=[A++];return N.return(w.concat(v).concat(z).concat(y))}})}
function bx(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F;return O(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.B(4);break}n=m.value;return H(J,ix(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.B(2);break;case 4:r=u(h);for(t=r.next();!t.done;t=r.next())for(v=t.value,w=u(v),z=w.next();!z.done;z=w.next())y=z.value,(A=jx(a,b,y,c,e,f,h))&&b.push(A);D=u(h);for(G=
D.next();!G.done;G=D.next())for(B=G.value,E=u(B),C=E.next(),K={};!C.done;K={pi:void 0},C=E.next())if(K.pi=C.value,!kx(K.pi)&&(F=b.some(function(L){return function(P){return lx(L.pi,P)}}(K))))throw new V(2,4,4037);return J.return(b)}})}function ix(a,b,c,d,e,f,g){return O(function(h){if(h.g==1)return mx(a,c,b,g>0),b.matchedStreams?b.segmentIndex?H(h,nx(b,d+g),2):h.B(2):h.return(!1);ox(b,d,e,f,g);return h.return(!0)})}
function nx(a,b){var c,d,e,f,g,h;return O(function(k){if(k.g==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return H(k,Promise.all(c),2)}if(a.segmentIndex instanceof mm)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);I(k)})}
function jx(a,b,c,d,e,f,g){if(kx(c))return null;var h=e(c);mx(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return O(function(k){if(h.segmentIndex)return k.B(0);h.segmentIndex=new mm;return H(k,nx(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=u(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=u(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;ox(h,0,f,g,0);return h}
function ox(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;a.type=="audio"&&Rc(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=u(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function cx(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;b.trickModeVideo=null;b.dependencyStream=null;return b}
function gx(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 dx(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);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Tb(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=cx(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new mm,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),dx(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),dx(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=cx(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new mm,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),dx(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),dx(a.dependencyStream,b))}
function hx(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 mx(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=px(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function px(a,b,c){var d={audio:Xw,video:Yw,text:Zw,image:$w}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return lx(l,m)},video:function(l,m){return lx(l,m)},text:qx,image:rx}[c.type];for(var g={audio:sx,video:tx,text:ux,image:vx}[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&&!kx(e)&&b.delete(d(e));return e}
function wx(a,b){return a.mimeType!=b.mimeType?!1:xx(a.codecs)===xx(b.codecs)}p.Uj=function(a){this.u=a};function lx(a,b){return a.drmInfos&&!Rb(a.drmInfos,b.drmInfos)?!1:!0}function qx(a,b){return b.language?a.forced!==b.forced||Rc(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function rx(){return!0}
function sx(a,b,c){var d=yx(a,b,c);if(d===zx)return!0;if(d===Ax)return!1;d=Rc(a.language,b.language);var e=Rc(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=Bx(a.channelsCount,b.channelsCount,c.channelsCount);if(d==zx)return!0;if(d==Ax)return!1;d=Bx(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==zx?!0:d==Ax?!1:a.bandwidth&&Cx(a.bandwidth,b.bandwidth,c.bandwidth)==zx?!0:!1}
function tx(a,b,c){var d=yx(a,b,c);if(d===zx)return!0;if(d===Ax)return!1;d=Bx(a.width*a.height,b.width*b.height,c.width*c.height);if(d==zx)return!0;if(d==Ax)return!1;if(a.frameRate){d=Bx(a.frameRate,b.frameRate,c.frameRate);if(d==zx)return!0;if(d==Ax)return!1}return a.bandwidth&&Cx(a.bandwidth,b.bandwidth,c.bandwidth)==zx?!0:!1}
function ux(a,b,c){var d=Rc(a.language,b.language),e=Rc(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 vx(a,b,c){return Bx(a.width*a.height,b.width*b.height,c.width*c.height)==zx?!0:!1}
function fx(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 ax(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jm([]),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 Bx(a,b,c){if(b==a&&a!=c)return Ax;if(c==a&&a!=b)return zx;if(b>a){if(c<=a||c-a<b-a)return zx;if(c-a>b-a)return Ax}else{if(c>a)return Ax;if(a-c<a-b)return zx;if(a-c>a-b)return Ax}return Dx}function yx(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return Ax;if(!d&&e)return zx;b=wx(a,b);a=wx(a,c);return b&&!a?Ax:!b&&a?zx:Dx}function Cx(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?zx:b<a?Ax:Dx}
function kx(a){switch(a.type){case Ec:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function Yw(a){return Ex([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function Xw(a){return Ex([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Zw(a){return Ex([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function $w(a){return Ex([a.width,a.codecs,a.mimeType])}function Ex(a){return JSON.stringify(a)}function xx(a){if(!Fx.has(a)){var b=yf(a);Fx.set(a,b)}return Fx.get(a)}
S("shaka.util.PeriodCombiner",Vw);Vw.prototype.setUseStreamOnce=Vw.prototype.Uj;Vw.prototype.combinePeriods=Vw.prototype.Tg;Vw.prototype.deleteStream=Vw.prototype.Xi;Vw.prototype.getImageStreams=Vw.prototype.Uk;Vw.prototype.getTextStreams=Vw.prototype.Bh;Vw.prototype.getVariants=Vw.prototype.Al;var zx=1,Dx=0,Ax=-1,Fx=new Map;function Gx(a,b){var c=new DOMParser,d=Hx.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 Ix(a,b){try{var c=jc(a);return Gx(c,b)}catch(d){return null}}
var Hx=new Qb(function(){if(typeof trustedTypes!=="undefined"){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Jx(){var a=this;this.j=this.g=null;this.C=[];this.h=null;this.Fa=1;this.H=[];this.l={Tf:"",type:"",profiles:[],Fc:null,zb:0,ib:null,Je:0};this.A=new Map;this.D=new Map;this.u=new Map;this.F=new Map;this.ua=new Map;this.m=new Vw;this.K=0;this.ya=new Yc(5);this.L=new Sf(function(){if(a.J&&!a.g.continueLoadingWhenPaused&&(a.I.Ea(a.J,"timeupdate"),a.J.paused)){a.I.qa(a.J,"timeupdate",function(){return Kx(a)});return}Kx(a)});this.P=new fh;this.O=null;this.G=[];this.Z=Infinity;this.oa=!1;this.i=
null;this.M=0;this.R=!1;this.I=new ed;this.J=null;this.T=!1;this.W="";this.ea=function(){return!1};this.V=[];this.aa=new Set;this.sa=new Rv}p=Jx.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.ea=b);c&&this.h&&this.h.presentationTimeline.U()&&this.L.Ka();this.i&&this.i.configure(this.g);this.m&&this.m.Uj(this.g.dash.useStreamOnceInPeriodFlattening)};
p.start=function(a,b){var c=this,d;return O(function(e){if(e.g==1)return c.oa=b.isLowLatencyMode(),c.C=[a],c.j=b,H(e,Lx(c),2);d=e.h;c.j&&Mx(c,d);if(!c.j)throw new V(2,7,7001);return e.return(c.h)})};
p.stop=function(){for(var a=u(this.u.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.C=[];this.h=null;this.u.clear();this.F.clear();this.A.clear();this.D.clear();this.l={Tf:"",type:"",profiles:[],Fc:null,zb:0,ib:null,Je:0};this.m=null;this.L!=null&&(this.L.stop(),this.L=null);this.i&&this.i.destroy();this.I&&(this.I.release(),this.I=null);this.aa.clear();this.sa.release();return this.P.destroy()};
p.update=function(){var a=this,b;return O(function(c){if(c.g==1)return va(c,2),H(c,Lx(a),4);if(c.g!=2)return xa(c,0);b=ya(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.h&&this.h.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.h.presentationTimeline.Tc();var c=b.segmentIndex.find(a);c!=null&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Mx(this,0))}}};
p.banLocation=function(a){this.i&&this.i.banLocation(a)};p.setMediaElement=function(a){this.J=a};
function Lx(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(q){if(q.g==1)return b=4,c="MPD",d=Nx(a),e=a.C,d.length?(e=d,c="Patch",b=6):a.C.length>1&&a.i&&(f=Uw(a.i,"Location",!0),f.length&&(e=f)),g=mh(e,a.g.retryParameters),h=Date.now(),H(q,Ox(a,g,0,{type:b}),2);if(q.g!=3){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.C.includes(k.uri)&&a.C.unshift(k.uri);l=new qb(k.uri);a.W=l.g.toString();return H(q,Px(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ya.sample(1,n);a.aa.clear();
return q.return(n)})}
function Px(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return O(function(v){if(v.g==1){e=b;f=a.g.dash.manifestPreprocessor;g=oo;if(f!=g){kd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Ix(e,d);if(!h)throw new V(2,4,4001,c);f(h);e=lc(h.outerHTML)}k=$d(e,d);if(!k)throw new V(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=po;l!=m&&l(k);if(d==="Patch")return v.return(Qx(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Rx(a,k,c));
q=a.g.dash.xlinkFailGracefully;r=fw(k,a.g.retryParameters,q,c,a.j.networkingEngine);gh(a.P,r);return H(v,r.promise,2)}t=v.h;return v.return(Rx(a,t,c))})}
function Rx(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea,Ca,Ja,Da,Qa,za,La,Ba,Fa,wb,Bb,Gc,sc,Bc,Eg,Fd,Gd,Fg,Hd,Uk,li,mi;return O(function(td){switch(td.g){case 1:a.i&&a.i.l.clear();d=[c];e=[];f=new Map;g=he(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=je(l))q=xc(d,[n])[0],m&&(a.i?Tw(a.i,"Location",m,q):f.set(m,q)),e.push(q);a.i?(r=Uw(a.i,"Location",!0),r.length>0&&(d=a.C=r)):e.length&&(d=a.C=e);a.l.Tf=
b.attributes.id||"";a.l.Je=oe(b,"publishTime",se)||0;a.H=he(b,"PatchLocation");t=Promise.resolve();if((v=le(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.i)a.i.i=d,a.i.h=w;else if(a.i=new Pw(a.j),a.i.configure(a.g),a.i.setManifestType("DASH"),a.i.i=d,a.i.h=w,z=je(v))(y=oe(v,"queryBeforeStart",ze,!1))?t=Qw(a.i,z):Qw(a.i,z);A=u(f.keys());for(D=A.next();!D.done;D=A.next())G=D.value,B=f.get(G),Tw(a.i,"Location",G,B)}E=he(b,"BaseURL");C=!1;if(a.i)for(K=u(E),F=K.next();!F.done;F=
K.next())J=F.value,L=J.attributes.serviceLocation,P=je(J),L&&P&&(Tw(a.i,"BaseURL",L,P),C=!0);a.V.splice(0);C&&a.i||(Q=E.map(je),a.V.push.apply(a.V,x(xc(d,Q))));N=a.i;M=a.V;R=Sx;U=R.call(Jx,N,C,M);a.l.ib=U;ra=0;E&&E.length&&(ra=oe(E[0],"availabilityTimeOffset",ye)||0);a.l.zb=ra;a.K=oe(b,"minimumUpdatePeriod",te,-1);ba=oe(b,"availabilityStartTime",se);Ia=oe(b,"timeShiftBufferDepth",te);Ea=a.g.dash.ignoreSuggestedPresentationDelay;Ca=null;Ea||(Ca=oe(b,"suggestedPresentationDelay",te));Ja=a.g.dash.ignoreMaxSegmentDuration;
Da=null;Ja||(Da=oe(b,"maxSegmentDuration",te));Qa=b.attributes.type||"static";a.h&&a.h.presentationTimeline&&(a.T=a.h.presentationTimeline.U()&&Qa=="static");a.l.type=Qa;if(a.h)for(za=a.h.presentationTimeline,La=za.Mb(),Ba=u(a.u.values()),Fa=Ba.next();!Fa.done;Fa=Ba.next())wb=Fa.value,wb.segmentIndex&&wb.segmentIndex.eb(La);else Bb=a.g.dash.ignoreMinBufferTime,Gc=0,Bb||(Gc=oe(b,"minBufferTime",te)||0),sc=0,sc=Ca!=null?Math.min(Ca,Ia||Infinity):a.g.defaultPresentationDelay>0?a.g.defaultPresentationDelay:
Math.min(Gc*1.5,Ia||Infinity),za=new Fl(ba,sc,a.g.dash.autoCorrectDrift);za.td(Qa=="static");(Bc=za.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Ia=a.g.availabilityWindowOverride);Ia==null&&(Ia=Infinity);za.mg(Ia);Eg=b.attributes.profiles||"";a.l.profiles=Eg.split(",");Fd={Jb:Qa!="static",presentationTimeline:za,Aa:null,ra:null,va:null,N:null,bandwidth:0,Gh:!1,zb:ra,Fc:null,profiles:Eg.split(","),roles:null,Rb:Tx};return H(td,t,2);case 2:a.M=0;Gd=Ux(a,Fd,U,b,!1);Fg=Gd.duration;Hd=Gd.periods;(Qa!=
"static"||a.T)&&Gd.Zi||za.Fb(Fg||Infinity);a.R&&a.oa&&za.Pj(a.Z);za.Ph(Da||1);a.R&&a.oa&&(Uk=Ca!=null?Ca:a.g.defaultPresentationDelay,za.ii(Uk));if(!a.h)return H(td,a.m.Tg(Hd,Fd.Jb),6);a.h.periodCount=Hd.length;a.h.gapCount=a.M;return H(td,Vx(a,Hd,!1),4);case 6:var Vk=za,Gg=a.m.l,ni=a.m.Bh(),Hg=a.m.i,Wk=a.g.dash.sequenceMode;var Cb=le(b,"ServiceDescription");if(Cb){var tc=le(Cb,"Latency");Cb=le(Cb,"PlaybackRate");if(tc||Cb){var ic={};tc&&("target"in tc.attributes&&(ic.targetLatency=parseInt(tc.attributes.target,
10)/1E3),"max"in tc.attributes&&(ic.maxLatency=parseInt(tc.attributes.max,10)/1E3),"min"in tc.attributes&&(ic.minLatency=parseInt(tc.attributes.min,10)/1E3));Cb&&("max"in Cb.attributes&&(ic.maxPlaybackRate=parseFloat(Cb.attributes.max)),"min"in Cb.attributes&&(ic.minPlaybackRate=parseFloat(Cb.attributes.min)));tc=ic}else tc=null}else tc=null;a:{Cb=he(b,"SupplementalProperty");if(Cb.length)for(Cb=u(Cb),ic=Cb.next();!ic.done;ic=Cb.next())if(ic=ic.value,ic.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016"){Cb=
ic.attributes.value;break a}Cb=null}a.h={presentationTimeline:Vk,variants:Gg,textStreams:ni,imageStreams:Hg,offlineSessionIds:[],sequenceMode:Wk,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:tc,nextUrl:Cb,periodCount:Hd.length,gapCount:a.M,isLowLatency:a.R,startTime:null};if(!za.jk()){td.B(7);break}li=he(b,"UTCTiming");return H(td,Wx(a,U,li),8);case 8:mi=td.h;if(!a.j)return td.return();za.Qj(mi);case 7:za.Pf(),a.m&&!a.h.presentationTimeline.U()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.h),
Xx(a),Yx(a,Hd),I(td)}})}function Vx(a,b,c){var d;return O(function(e){if(e.g==1)return H(e,a.m.Tg(b,!0,c),2);a.h.variants=a.m.l;d=a.m.Bh();d.length>0&&(a.h.textStreams=d);a.h.imageStreams=a.m.i;a.j.filter(a.h);I(e)})}
function Qx(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L;return O(function(P){if(P.g==1){c=b.attributes.mpdId;d=oe(b,"originalPublishTime",se);if(!c||c!==a.l.Tf||d!==a.l.Je)throw a.H=[],new V(1,4,4052);e=[];f=[];g=new Set;h=u(ge(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Be(l.attributes.sel||""),n=m[m.length-1],q=je(l)||"",n.name==="MPD")if(n.Oc==="mediaPresentationDuration"){r=je(l)||"";var Q=te(r);if(Q!=null){a.l.Fc=Q;for(var N=u(a.A.values()),M=N.next();!M.done;M=N.next())M.value.Fc=
Q}}else if(n.Oc==="type"){a.h.presentationTimeline.td(q=="static");a.l.type=q;Q=u(a.A.values());for(N=Q.next();!N.done;N=Q.next())N.value.Jb=q=="dynamic";q=="static"&&(a.K=-1)}else n.Oc==="publishTime"?a.l.Je=se(q)||0:n.Oc===null&&l.tagName==="add"&&f.push(l);else if(n.name==="PatchLocation")Ce(a.H,l);else if(n.name==="Period")l.tagName==="add"?f.push(l):l.tagName==="remove"&&n.id&&Zx(a,n.id);else if(n.name==="SegmentTemplate"){N=Be(l.attributes.sel||"");Q=N[N.length-1];if(Q.Oc){N=$x(a,N);M=je(l)||
"";for(var R=u(N),U=R.next();!U.done;U=R.next())U=a.A.get(U.value),Ee(U.N.bd,l.tagName,Q.Oc,M);Q=N}else Q=[];t=Q;v=u(t);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if(n.name==="SegmentTimeline"||n.name==="S"){Q=Be(l.attributes.sel||"");Q=$x(a,Q);N=u(Q);for(M=N.next();!M.done;M=N.next())M=a.A.get(M.value),M=cw(M,Fw,"SegmentTimeline"),R=he(M,"S"),Ce(R,l),M.children=R;y=Q;A=u(y);for(D=A.next();!D.done;D=A.next())G=D.value,g.add(G)}B=u(g);for(E=B.next();!E.done;E=B.next())C=E.value,ay(a,
C);K=u(f);for(F=K.next();!F.done;F=K.next())J=F.value,e.push.apply(e,x(Ux(a,{Jb:a.l.type=="dynamic",presentationTimeline:a.h.presentationTimeline,Aa:null,ra:null,va:null,N:null,bandwidth:0,Gh:!1,zb:a.l.zb,profiles:a.l.profiles,Fc:a.l.Fc,roles:null,Rb:Tx},a.l.ib,J,!0).periods));if(!e.length)return P.B(2);a.h.periodCount+=e.length;a.h.gapCount=a.M;return H(P,Vx(a,e,!0),2)}a.l.type=="static"&&(L=a.l.Fc,a.h.presentationTimeline.Fb(L||Infinity));I(P)})}
function Zx(a,b){a.h.periodCount--;for(var c=u(a.A.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.A.get(d);cw(e,Fw,"SegmentTimeline").children=[];ay(a,d);a.A.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
function $x(a,b){var c="",d="",e=-1,f="";b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,g.name==="Period"?c=g.id:g.name==="AdaptationSet"?(d=g.id,g.position!==null&&(e=g.position)):g.name==="Representation"&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=u(a.A.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Aa.id===c&&a.va.id===d&&a.N.id&&b.push(c+","+a.N.id);else if(e>-1)for(d=u(a.A.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Aa.id===c&&a.va.position===e&&a.N.id&&b.push(c+
","+a.N.id);return b}function ay(a,b){var c=a.A.get(b),d=a.u.get(b);d.segmentIndex&&d.segmentIndex.eb(a.h.presentationTimeline.Mb());try{var e=Ew(c,function(f,g,h,k){return by(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.ua,c.N.aesKey,null,!0,a.D);d.createSegmentIndex=function(){return O(function(f){if(f.g==1)return d.segmentIndex?f.B(0):H(f,e.hd(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.N.contentType,b!=Ec&&b!="application"&&b!="image"||f.code!=4002)throw f;}}
function Ux(a,b,c,d,e){var f=b.Fc;f||(f=oe(d,"mediaPresentationDuration",te),a.l.Fc=f);var g=0;a.h&&a.h.presentationTimeline&&a.T&&(g=a.h.presentationTimeline.hc());var h=[],k=g;d=he(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=oe(m,"start",te,k),r=m.attributes.id,t=oe(m,"duration",te);q=l==0&&q==0&&a.T?g:q;var v=null;if(n){var w=oe(n,"start",te);w!=null&&(v=w-q+g)}else f!=null&&(v=f-q+g);w=Ic;v&&t&&Math.abs(v-t)>w&&v>t&&a.M++;v==null&&(v=t);if(!(a.O!==null&&r!==null&&q!==null&&q<
a.O)||a.G.includes(r)||l+1==d.length){q!==null&&(a.O===null||q>a.O)&&(a.O=q);k=cy(a,b,c,{start:q,duration:v,node:m,If:v==null||!n});h.push(k);b.Aa.id&&v&&a.ua.set(b.Aa.id,v);if(v==null){k=null;break}k=q+v}}if(e)for(b=u(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return f!=null?{periods:h,duration:f+g,Zi:!1}:{periods:h,duration:k,Zi:!0}}
function Xx(a){var b=Array.from(a.F.keys()).filter(function(h){return!a.G.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.F.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.u.get(f);g&&(g.segmentIndex&&g.segmentIndex.getNumReferences()!=0?d=!1:(a.m&&a.m.Xi(g,c),a.u.delete(f)))}d&&a.F.delete(c)}}function Yx(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=u(a.D.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.D.delete(d)}
function cy(a,b,c,d){b.Aa=dy(a,d.node,null,c);b.ra=d;b.Aa.zb=b.zb;b.Aa.id||(b.Aa.id="__shaka_period_"+d.start);var e=he(d.node,"EventStream");c=b.presentationTimeline.Mb();e=u(e);for(var f=e.next();!f.done;f=e.next())ey(a,d.start,d.duration,f.value,c);c=he(d.node,"SupplementalProperty");c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(e=fy(a,e)))b.Rb=e;c=he(d.node,"AdaptationSet").map(function(r,t){return gy(a,b,t,r)}).filter(Vf);if(b.Jb){e=
[];f=u(c);for(var g=f.next();!g.done;g=f.next()){g=u(g.value.lm);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.Dk),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={ri:void 0},m=l.next())if(n.ri=m.value,e.has(n.ri.originalId)){f||
(f=he(d.node,"AdaptationSet").map(function(r,t){return gy(a,b,t,r)}).filter(Vf));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.ri.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.Bi});c=c.filter(function(r){return r.Bi});if(!a.g.disableIFrames)for(c=u(c),e=c.next();!e.done;e=c.next())for(e=
e.value,f=e.Bi.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())Jg(k.value,e.streams);c=hy(a.g.disableAudio,d,"audio");e=hy(a.g.disableVideo,d,"video");f=hy(a.g.disableText,d,Ec);d=hy(a.g.disableThumbnails,d,"image");if(e.length===0&&c.length===0)throw new V(2,4,4004);return{id:b.Aa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function hy(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 gy(a,b,c,d){function e(L){var P=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];P&&L&&(L=xc(b.va.ib(),[L],b.Rb()),a.j.addFont(P,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=dy(a,d,b.Aa,null);b.va.position=c;var h=!1;c=he(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Vf),
l=void 0,m=b.va.contentType==Ec;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(q==null||q=="urn:mpeg:dash:role:2011")switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=he(d,"EssentialProperty");c=null;var t=!1;n=null;q=!1;r=u(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if(w=="http://dashif.org/guidelines/trickmode")c=v.attributes.value;else if(w=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var z=
g(parseInt(v.attributes.value,10));else if(w=="urn:mpeg:mpegB:cicp:ColourPrimaries")var y=f(parseInt(v.attributes.value,10));else w!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(w=="urn:mpeg:dash:ssr:2023"&&a.g.dash.enableFastSwitching?t=!0:w=="urn:dvb:dash:fontdownload:2014"?e(v):w=="urn:mpeg:dash:urlparam:2014"?(n=fy(a,v))||(q=!0):q=!0)}if(q)return null;var A=null;q=he(d,"SupplementalProperty");q=u(q);for(r=q.next();!r.done;r=q.next())r=r.value,v=r.attributes.schemeIdUri,v=="http://dashif.org/guidelines/last-segment-number"?
A=parseInt(r.attributes.value,10)-1:v=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?z=g(parseInt(r.attributes.value,10)):v=="urn:mpeg:mpegB:cicp:ColourPrimaries"?y=f(parseInt(r.attributes.value,10)):v=="urn:dvb:dash:fontdownload:2014"?e(r):v=="urn:mpeg:dash:urlparam:2014"&&(n=fy(a,r));n&&(b.Rb=n);n=he(d,"Accessibility");var D=new Map,G;n=u(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,q!="urn:scte:dash:cc:cea-608:2015"||a.g.disableText)if(q!="urn:scte:dash:cc:cea-708:2015"||
a.g.disableText)q=="urn:mpeg:dash:role:2011"?r!=null&&(k.push(r),r=="captions"&&(l="caption")):q=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(r=="1"?G="visually impaired":r=="2"?G="hard of hearing":r=="9"&&(G="spoken subtitles"));else if(q=1,r!=null)for(r=u(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var B=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],B=w[1].split(",")[0].split(":").pop()):(v="svc"+q,q++,B=w);D.set(v,Lc(B))}else D.set("svc1","und");else if(q=1,r!=null)for(r=r.split(";"),
v=u(r),w=v.next();!w.done;w=v.next()){B=w.value;var E=w=void 0;B.includes("=")?(B=B.split("="),w=B[0].startsWith("CC")?B[0]:"CC"+B[0],E=B[1]||"und"):(w="CC"+q,r.length==2?q+=2:q++,E=B);D.set(w,Lc(E))}else D.set("CC1","und");n=he(d,"ContentProtection");var C=Sv(a.sa,n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.va.encrypted=n.length>0;var K=Lc(b.va.language||"und"),F=b.va.label,J=new Map;d=he(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=u(d);for(r=q.next();!r.done;r=q.next())if(v=
r.value,r=qe(v,"urn:scte:dash:scte214-extensions","supplementalCodecs"))v=Xd(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,x(n))}n=d.map(function(L){var P=iy(a,b,C,l,K,F,h,k,D,L,G,A);return P&&(P.hdr=P.hdr||z,P.colorGamut=P.colorGamut||y,P.fastSwitching=t,L=L.attributes.dependencyId)?(P.baseOriginalId=L,J.set(L,P),null):P}).filter(function(L){return!!L});if(n.length==0&&J.size==0){c=b.va.contentType==
"image";if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new V(2,4,4003);}if(!b.va.contentType||b.va.contentType=="application")for(b.va.contentType=jy(n[0].mimeType,n[0].codecs),m=u(n),q=m.next();!q.done;q=m.next())q.value.type=b.va.contentType;m=b.va.id||"__fake__"+a.Fa++;q=u(n);for(r=q.next();!r.done;r=q.next()){r=r.value;v=u(C.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(x(w.keyIds),x(r.keyIds))):w.keyIds||r.keyIds;a.g.enableAudioGroups&&
(r.groupId=m)}d=d.map(function(L){return L.attributes.supplementalId||L.attributes.id}).filter(Vf);return{id:m,contentType:b.va.contentType,language:K,Un:h,streams:n,drmInfos:C.drmInfos,Bi:c,lm:d,Dk:J}}
function fy(a,b){if((b=me(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&oe(b,"useMPDUrlQuery",ze,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return c=="$querypart$"?a.W:c.split("&").map(function(d){if(d=="$querypart$")return a.W;var e=/\$query:(.*?)\$/g.exec(d);if(e&&e.length==2){e=e[1];var f=(new xb(a.W)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function iy(a,b,c,d,e,f,g,h,k,l,m,n){b.N=dy(a,l,b.va,null);var q=b.N.id;a.Z=Math.min(a.Z,b.N.zb);a.R=a.Z>0;if(!ky(b.N))return null;var r=b.ra.start;b.bandwidth=oe(l,"bandwidth",we)||0;b.roles=h;var t=he(l,"SupplementalProperty"),v=he(l,"EssentialProperty"),w=he(l,"ContentProtection");l=null;var z=v.find(function(N){return N.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});z?l=fy(a,z):(z=t.find(function(N){return N.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"}))&&(l=fy(a,z));l&&(b.Rb=
l);z=b.N.contentType;l=z==Ec||z=="application";z=z=="image";w.length&&(b.va.encrypted=!0);try{var y=void 0;if(c.Mg){var A=b.N.ib,D=b.Rb,G=xc(A(),[c.Mg.Nl],D()),B=mh(G,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Mg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,M,R;return O(function(U){if(U.g==1)return H(U,Ox(a,B,6),2);if(U.g!=3){N=U.h;if(!N.data||N.data.byteLength!=16)throw new V(2,4,4049);M={name:"AES-CBC"};R=y;return H(U,window.crypto.subtle.importKey("raw",N.data,M,
!0,["decrypt"]),3)}R.cryptoKey=U.h;y.fetchKey=void 0;I(U)})}}}b.N.aesKey=y;A=function(N,M,R,U){return by(a,N,M,R,U)};if(b.N.Zd)var E=tw(b,A,y);else if(b.N.Lc)E=zw(b,a.u,y);else if(b.N.bd)E=Ew(b,A,a.u,!!a.h,a.g.dash.initialSegmentLimit,a.ua,y,n,!1,a.D);else{var C=b.ra.duration||0,K=b.N.ib,F=b.N.mimeType,J=b.N.codecs;E={endTime:-1,timeline:-1,hd:function(){var N=lm(r,C,K());N.Kb(function(M){M.mimeType=F;M.codecs=J});return Promise.resolve(N)},timescale:1}}}catch(N){if((l||z)&&N.code==4002)return null;
throw N;}n=Wv(a.sa,w,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;t.some(function(N){return N.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&N.attributes.value=="JOC"})&&(w=!0);t=!1;l&&(t=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(z&&((v=v.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(L=v.attributes.value),!L))return null;
var P;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(P="PQ");v=b.N.id?b.Aa.id+","+b.N.id:"";a.H.length&&q&&a.A.set(b.Aa.id+","+q,ly(b));b.N.$f&&my(a,b.N.$f,E,b.presentationTimeline);E.endTime!=-1&&b.Aa.id!=null&&b.N.id!=null&&((q=a.D.get(b.Aa.id))?(q.endTime=E.endTime,q.Yh.includes(b.N.id)||q.Yh.push(b.N.id),a.D.set(b.Aa.id,q)):a.D.set(b.Aa.id,{endTime:E.endTime,timeline:E.timeline,Yh:[b.N.id]}));
var Q=v&&a.u.has(v)?a.u.get(v):{id:a.Fa++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){Q.segmentIndex&&(Q.segmentIndex.release(),Q.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:c.drmInfos.length>0,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.va.language,label:f,
type:b.va.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:t,channelsCount:b.N.Wf,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:P,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([tf(b.N.mimeType,b.N.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};Q.createSegmentIndex=function(){var N;return O(function(M){if(M.g==1){if(Q.segmentIndex)return M.B(0);
N=Q;return H(M,E.hd(),3)}N.segmentIndex=M.h;I(M)})};v&&b.Jb&&!a.u.has(v)&&(b=b.Aa.id||"",a.F.has(b)||a.F.set(b,[]),a.u.set(v,Q),a.F.get(b).push(v));return Q}
function my(a,b,c,d){if(!a.aa.has(b)){a.aa.add(b);var e=oe(b,"presentationTime",xe)||0,f=le(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!(f==="urn:mpeg:dash:utc:http-ntp:2014"||f==="urn:mpeg:dash:utc:ntp:2014"||f==="urn:mpeg:dash:utc:sntp:2014");g?b=(oe(b,"wallClockTime",se)||0)*1E3:(b=oe(b,"wallClockTime",xe)||0,b=nk(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.u||d.ki(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new T("prft",
d),a.j.onEvent(d))}}function ly(a){function b(c){if(!c)return null;c=Yd(c);c.Zd=null;c.Lc=null;c.bd=Ge(c.bd);c.$f=null;return c}a=Yd(a);a.Aa=b(a.Aa);a.va=b(a.va);a.N=b(a.N);a.ra&&(a.ra=Yd(a.ra),a.ra.node=null);return a}
function Kx(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,va(d,2),H(d,Lx(a),4);case 4:b=d.h;xa(d,3);break;case 2:if(c=ya(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();Mx(a,b);I(d)}})}function Mx(a,b){if(!(a.K<0)){var c=a.K;a.g.updatePeriod>=0&&(c=a.g.updatePeriod);a.L.Y(Math.max(c-b,Zc(a.ya)))}}
function dy(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Wf:null,audioSamplingRate:null,zb:0,jg:1,encrypted:!1};d=d||c.ib;var e=b.attributes.id,f=b.attributes.supplementalId,g=he(b,"BaseURL"),h,k=!1;if(a.i)for(var l=u(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=je(n);m&&n&&(Tw(a.i,e,m,n),k=!0)}k&&a.i||(h=g.map(je));var q=a.i;a=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;
m=Qm([b.attributes.codecs||c.codecs]).join(",");n=oe(b,"frameRate",Ae)||c.frameRate;var r=b.attributes.sar||c.pixelAspectRatio,t=ny(he(b,"InbandEventStream"),c.emsgSchemeIdUris),v=he(b,"AudioChannelConfiguration");v=oy(v)||c.Wf;var w=oe(b,"audioSamplingRate",xe)||c.audioSamplingRate;a||(a=jy(l,m));var z=le(b,"SegmentBase"),y=le(b,"SegmentTemplate"),A=z?oe(z,"availabilityTimeOffset",ye)||0:0,D=y?oe(y,"availabilityTimeOffset",ye)||0:0,G=g&&g.length?oe(g[0],"availabilityTimeOffset",ye)||0:0;A=c.zb+G+
A+D;D=null;(G=le(b,"SegmentSequenceProperties"))&&(G=oe(G,"cadence",we))&&(D=G);G=b.attributes.label;var B=he(b,"Label");B&&B.length&&(B=B[0],ie(B)&&(G=ie(B)));return{ib:function(){return xc(d(),g.length?q&&k?Uw(q,e):h?h:[]:[])},Zd:z||c.Zd,Lc:le(b,"SegmentList")||c.Lc,bd:y||c.bd,$f:le(b,"ProducerReferenceTime")||c.$f,width:oe(b,"width",xe)||c.width,height:oe(b,"height",xe)||c.height,contentType:a,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:t,id:f||e,originalId:e,language:b.attributes.lang,
Wf:v,audioSamplingRate:w,zb:A,Ff:null,jg:D||c.jg,label:G||null,encrypted:!1}}function ny(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 oy(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))&&b>0&&b<c.length)return c[b]}}return null}
function ky(a){var b=a.Zd?1:0;b+=a.Lc?1:0;b+=a.bd?1:0;if(b==0)return a.contentType==Ec||a.contentType=="application"?!0:!1;b!=1&&(a.Zd&&(a.Lc=null),a.bd=null);return!0}
function py(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(n.g==1)return e=[nc(c)],f=xc(b(),e),g=mh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ea()}),gh(a.P,h),H(n,h.promise,2);k=n.h;if(d=="HEAD"){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=ec(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Wx(a,b,c){var d,e,f,g,h,k,l,m;return O(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.B(4);break}h=g.value;va(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":db("NTP UTCTiming scheme is not supported");break;default:db("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return H(n,py(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return H(n,py(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
3);break;case 5:ya(n);case 3:g=f.next();n.B(2);break;case 4:return db("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function ey(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=oe(d,"timescale",xe)||1,k=oe(d,"presentationTimeOffset",xe)||0;d=u(he(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=oe(l,"presentationTime",xe)||0,n=oe(l,"duration",xe)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;c!=null&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:Fe(l),eventNode:Ge(l)},a.j.onTimelineRegionAdded(l))}}
function by(a,b,c,d,e){var f,g,h,k;return O(function(l){if(l.g==1)return f=sh,g=e?0:1,h=Xm(b,c,d,a.g.retryParameters),H(l,Ox(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function jy(a,b){b=tf(a,b);return Jf(b)?Ec:a.split("/")[0]}function Ox(a,b,c,d){d||(d={});d.isPreload=a.ea();b=a.j.networkingEngine.request(c,b,d);gh(a.P,b);return b.promise}
function Nx(a){var b=a.l.Je;if(!a.l.Tf||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=xe(e.attributes.ttl);return!e||b+e>c}).map(je).filter(Vf);return d.length?xc(a.C,d):[]}function Tx(){return""}function Sx(a,b,c){return function(){return a&&b?Uw(a,"BaseURL"):c.slice()}}S("shaka.dash.DashParser",Jx);ud("application/dash+xml",function(){return new Jx});ud("video/vnd.mpeg.dash.mpd",function(){return new Jx});function qy(){}S("shaka.dependencies",qy);qy.has=function(a){return ry.has(a)};qy.add=function(a,b){if(!sy[a])throw Error(a+" is not supported");a==ty?kd("mux.js","mux.js is no longer used in Shaka Player."):ry.set(a,function(){return b})};var ty="muxjs",sy={Vn:ty,ISOBoxer:"ISOBoxer"};qy.Allowed=sy;var ry=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function uy(){this.j=new Qb(function(){return["Oculus","Quest"].some(function(a){return navigator.userAgent.includes(a.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?
"MOBILE":"DESKTOP"});this.l=new 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 xd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=uy.prototype;p.sc=function(){return!!navigator.mediaCapabilities};
p.Oa=function(){return this.j.value()};p.Ja=function(){return this.l.value()};p.Wd=function(){return!1};p.$h=function(){return!1};p.Gf=function(){return!1};p.Gj=function(){return!1};p.Le=function(){return!1};p.wd=function(){return!0};p.Pb=function(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType};p.Pe=function(){return!0};p.Lj=function(){return 0};p.yc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Wj=function(){return!1};
p.oi=function(){return!1};p.bb=function(a){var b=this.Oa();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.ti=function(){return!!window.indexedDB};p.Ej=function(){return[]};p.Jd=function(a){return window.matchMedia!==void 0&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"};p.pg=function(){return!1};p.uj=function(){return!1};p.gg=function(){return!1};p.rg=function(){return!0};
p.vj=function(){return!1};p.ek=function(){return!0};p.vd=function(){return!1};p.Oh=function(a){return a==="com.apple.fps"};p.qg=function(){return!0};p.toString=function(){return"Device: "+this.Vb()+" v"+this.Ha()+"; Type: "+this.Oa()};function vy(){uy.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)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}pa(vy,uy);p=vy.prototype;p.Ha=function(){return this.g.value()};p.Vb=function(){return"Apple Browser"};p.Oa=function(){return this.h.value()};
p.Ja=function(){return"WEBKIT"};p.sc=function(){return!1};p.Wd=function(a,b){return b==="audio"};p.Gf=function(){return!0};p.Gj=function(a){return a==="audio"};p.bb=function(a){uy.prototype.bb.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.pg=function(){return!0};p.qg=function(){return!1};
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(bc=function(){return new vy});function wy(){if(!xy())throw Error("Not a Chromecast device!");uy.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")?yy:a.includes("fuchsia")?zy:Ay})}pa(wy,uy);p=wy.prototype;p.Ha=function(){return this.h.value()};p.Vb=function(){return"Chromecast with "+this.g.value()};
p.Oa=function(){return"CAST"};p.Ja=function(){return"CHROMIUM"};p.sc=function(){return uy.prototype.sc.call(this)&&this.g.value()!==Ay};p.Pb=function(){return uy.prototype.Pb.call(this)&&this.g.value()!==Ay};p.Lj=function(){switch(this.g.value()){case yy:return 0;case zy:return 3;default:return 1}};
p.yc=function(){var a,b,c,d,e;return O(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};va(f,2);if(!(c=a)){f.B(4);break}return H(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.h;case 4:if(c){b.width=3840;b.height=2160;f.B(6);break}if(!(d=a)){f.B(7);break}return H(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:xa(f,3);break;case 2:e=ya(f),cb("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.bb=function(a){uy.prototype.bb.call(this,a);a.streaming.stallSkip=0;return a};p.ti=function(){return!1};p.vd=function(){return!0};function xy(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var yy="Android",zy="Fuchsia",Ay="Linux";xy()&&(bc=function(){return new wy});function By(){uy.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?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.A=new Qb(function(){return uy.prototype.Pb.call(a)?navigator.userAgent.match(/Edge?\//)?!a.h.value():!0:!1});this.u=new Qb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new Qb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}pa(By,uy);p=By.prototype;p.Ha=function(){return this.i.value()};
p.Vb=function(){return this.g.value()};p.Wd=function(a){return Ub(a)?this.g.value()==="Edge"&&this.h.value():!1};p.$h=function(){return this.g.value()==="Edge"&&this.h.value()};p.Gf=function(){return this.g.value()==="Edge"&&this.h.value()};p.Pb=function(){return this.A.value()};
p.bb=function(a){uy.prototype.bb.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.gg=function(){return this.g.value()==="Edge"||this.u.value()};p.vd=function(){if(this.Ja()==="GECKO"){var a=this.Ha();return a!==null?a>=100:uy.prototype.vd.call(this)}return uy.prototype.vd.call(this)};p.Oh=function(a){return this.Ja()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):uy.prototype.Oh.call(this,a)};cc=function(){return new By};function Cy(){uy.apply(this,arguments)}pa(Cy,uy);p=Cy.prototype;p.Ha=function(){return null};p.Vb=function(){return"Hisense"};p.Oa=function(){return"TV"};p.sc=function(){return!1};p.yc=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.bb=function(a){uy.prototype.bb.call(this,a);a.streaming.stallSkip=0;return a};
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))bc=function(){return new Cy};function Dy(){uy.call(this);this.g=new Qb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}pa(Dy,uy);p=Dy.prototype;p.Vb=function(){return"PlayStation"};p.Oa=function(){return"CONSOLE"};p.Ja=function(){return"WEBKIT"};p.Ha=function(){return this.g.value()};p.sc=function(){return!1};p.wd=function(){return!1};p.Pb=function(){return!1};p.oi=function(){return this.Ha()===4};
p.yc=function(){var a,b,c,d,e;return O(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,va(f,2),H(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b=c.resolution==="4K";xa(f,3);break;case 2:return ya(f),va(f,5),H(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b=d.resolution==="4K";xa(f,3);break;case 5:e=ya(f),db("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.bb=function(a){uy.prototype.bb.call(this,a);this.Ha()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.gg=function(){return this.Ha()===4};p.rg=function(){return this.Ha()!==4};navigator.userAgent.includes("PlayStation")&&(bc=function(){return new Dy});function Ey(){uy.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(Ey,uy);p=Ey.prototype;p.Ha=function(){return this.g};p.Vb=function(){return"Tizen"};p.Ja=function(){return"CHROMIUM"};p.Oa=function(){return"TV"};p.Wd=function(){return!0};p.Le=function(){return this.Ha()===3};p.sc=function(){return!1};p.wd=function(){var a=this.Ha();return a!==null?a>=4:uy.prototype.wd.call(this)};p.Pb=function(){return!1};
p.Pe=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:uy.prototype.Pe.call(this)};
p.yc=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
a.height=2160)}catch(c){db("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.bb=function(a){uy.prototype.bb.call(this,a);a.drm.ignoreDuplicateInitData=this.Ha()!==2;this.Ha()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.Ej=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Jd=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return uy.prototype.Jd.call(this,a)}return"SDR"};p.uj=function(){return!0};p.vj=function(){return this.Ha()===3};navigator.userAgent.includes("Tizen")&&(bc=function(){return new Ey});function Fy(){uy.apply(this,arguments)}pa(Fy,uy);Fy.prototype.Ha=function(){return null};Fy.prototype.Vb=function(){return"Vizio"};Fy.prototype.Oa=function(){return"TV"};Fy.prototype.sc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(bc=function(){return new Fy});function Gy(){uy.call(this);this.i=new Qb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new Qb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});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(Gy,uy);p=Gy.prototype;p.Ha=function(){return this.g.value()};
p.Vb=function(){return"WebKit STB"};p.Oa=function(){return"TV"};p.Ja=function(){return"WEBKIT"};p.sc=function(){return!1};p.wd=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Wd=function(){return this.h.value()};p.yc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.rg=function(){return!this.i.value()};p.qg=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))bc=function(){return new Gy};function Hy(){uy.call(this);var a=this;this.h=Iy();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);a.g=c.configs["tv.model.supportHDR"]||c.configs["tv.config.supportDolbyHDRContents"]||!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){db("WebOS: getConfigs call failed",c)}}pa(Hy,uy);p=Hy.prototype;p.Ha=function(){return this.h};p.Vb=function(){return"WebOS"};
p.Oa=function(){return"TV"};p.Ja=function(){return"CHROMIUM"};p.sc=function(){return!1};p.wd=function(){var a=this.Ha();return a!==null?a>3:uy.prototype.wd.call(this)};p.Pb=function(){return!1};p.Pe=function(){var a=this.Ha();return a!==null?a>3:uy.prototype.Pe.call(this)};p.yc=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){db("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.bb=function(a){uy.prototype.bb.call(this,a);this.Ha()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};p.Jd=function(a){return this.g==null?(db("WebOS: getConfigs call haven't finished"),uy.prototype.Jd.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};
function Iy(){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.ek=function(){return!1};p.vd=function(){var a=this.Ha();return a!==null?a>=6:uy.prototype.vd.call(this)};if(navigator.userAgent.includes("Web0S")){var Jy=new Hy;bc=function(){return Jy}};function Ky(){uy.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}pa(Ky,uy);p=Ky.prototype;p.Ha=function(){return this.h};p.Vb=function(){return"Xbox"};p.Oa=function(){return"CONSOLE"};p.Ja=function(){return this.g?"EDGE":"CHROMIUM"};p.Wd=function(){return!0};p.$h=function(){return!0};p.Gf=function(){return!0};p.Wj=function(){return this.g};
p.yc=function(){var a={width:1920,height:1080},b=Ly();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){db("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.bb=function(a){uy.prototype.bb.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.gg=function(){return!0};p.ti=function(){return!1};function Ly(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Ly()!==null)bc=function(){return new Ky};function My(a,b,c){this.type=a;this.ma=b;this.segments=c||null}function Ny(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}Ny.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);d.length>0&&(c+=":"+d.join(","));return c};
function Oy(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 Py(a,b){return a.attributes.find(function(c){return c.name===b})||null}function Qy(a,b,c){return(a=Py(a,b))?a.value:c||null}function Ry(a,b){a=Py(a,b);if(!a)throw new V(2,4,4023,b);return a.value}function Sy(a,b,c){c=c===void 0?[]:c;this.ma=b;this.g=a;this.Hc=c}function Ty(a,b){this.name=a;this.value=b};function Uy(a,b){return a.filter(function(c){return c.name==b})}function Vy(a,b){return a.filter(function(c){return Ry(c,"TYPE")==b})}function Wy(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 Xy(a,b,c){c=c===void 0?0:c;return(a=Wy(a,b))?Number(a.value):c}function Yy(a,b,c){return b?Zy(a,[b],c):[]}function Zy(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return $y(e,c)}));return xc(a,d)}
function $y(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 az(){this.g=0}
function bz(a,b){b=ec(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!cz.test(c[0]))throw new V(2,4,4015);b=0;for(var d=!1,e=[],f=!0,g=0;g<c.length;g++){var h=c[g],k=c[g+1];if(h.startsWith("#")&&!h.startsWith("#EXT")||f)f=!1;else{h=dz(a,h);d||(ez.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:fz.has(h.name)&&(b=1,d=!0));if(fz.has(h.name)){if(b!=1)throw new V(2,4,4017);f=a;a=Array(Math.max(100,Math.floor((c.length-g)/2)));d=0;h=[];var l=[];
for(k=null;g<c.length;g++){var m=c[g];if(m.startsWith("#EXT"))m=dz(f,m),ez.has(m.name)?e.push(m):m.name=="EXT-X-MAP"?k=m:m.name=="EXT-X-PART"?l.push(m):m.name=="EXT-X-PRELOAD-HINT"?Qy(m,"TYPE")=="PART"?l.push(m):Qy(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",k=m):h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new Sy(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new Sy("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new My(b,e,d<
a.length?a.slice(0,d):a)}e.push(h);h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new Ty("URI",k)),f=!0)}}return new My(b,e)}function dz(a,b){a=a.g++;var c=b.match(gz);if(!c)throw new V(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Pd(d);var f;hz.lastIndex=0;(f=Rd(d,hz))&&(e=f[1]);iz.lastIndex=0;for(f=Rd(d,iz);f;)c.push(new Ty(f[1],f[2]||f[3])),Qd(d),f=Rd(d,iz)}return new Ny(a,b,c,e)}
var gz=/^#(EXT[^:]*)(?::(.*))?$/,cz=/^#EXTM3U($|[ \t\n])/m,hz=/^([^,=]+)(?:,|$)/g,iz=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,ez=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),fz=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function jz(){}function kz(a,b){try{var c=lz(a);return bh({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return $g(d)}}
function lz(a){var b=a.split(":");if(b.length<2||b[0]!="data")throw new V(2,1,1004,a);b=b.slice(1).join(":").split(",");if(b.length<2)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;b.length>1&&b[b.length-1]=="base64"&&(d=!0,b.pop());var e;d?e=rc(a):e=lc(a);return{data:e,contentType:c,Ci:b}}S("shaka.net.DataUriPlugin",jz);jz.parse=kz;ih("data",kz);function mz(){var a=this;this.g=this.h=null;this.G=1;this.C=new Map;this.L=new Map;this.D=new Map;this.D.set("video",new Map);this.D.set("audio",new Map);this.D.set(Ec,new Map);this.D.set("image",new Map);this.mc=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return nz(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=Ry(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Ry(b,"URI");c=lz(e.split("?")[0]);
e=e.split("?")[0];if(!a.I.has(e)){var f=Lb(c.data);a.I.set(e,f)}d=yc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a.I.get(e)}],void 0,c.Ci);(b=Qy(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=Ry(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");b=Ry(b,"URI");c=lz(b.split("?")[0]);b=Lb(c.data);var e=new Uint8Array([154,4,240,
121,152,64,66,134,171,146,230,91,224,136,95,149]);e=Nh(b,e,new Set,0);d=yc("com.microsoft.playready",d,[{initDataType:"cenc",initData:e}],void 0,c.Ci);if(b=ae(["<PLAYREADY>",qc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Qv(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Ry(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Ry(b,"URI");c=lz(e.split("?")[0]);
e=e.split("?")[0];if(!a.I.has(e)){var f=Lb(c.data);a.I.set(e,f)}d=yc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:a.I.get(e)}],void 0,c.Ci);(b=Qy(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.kb=new Set;this.i=new Map;this.l=null;this.H="";this.hb=new az;this.M=-1;this.aa=Infinity;this.Z=this.Kc=this.jb=!1;this.F=new Sf(function(){if(a.V&&!a.g.continueLoadingWhenPaused&&(a.T.Ea(a.V,"timeupdate"),a.V.paused)){a.T.qa(a.V,
"timeupdate",function(){return oz(a)});return}oz(a)});this.Fa=pz;this.m=null;this.$a=0;this.u=Infinity;this.Na=this.La=this.R=0;this.W=new fh;this.J=new Map;this.K=new Map;this.ya=new Map;this.oa=new Map;this.O=new Map;this.sa=new Map;this.ua=new Map;this.Jc=this.ea=!1;this.Ob=new Yc(5);this.j=null;this.P=!0;this.T=new ed;this.A=this.V=null;this.lc=function(){return!1};this.I=new Map}p=mz.prototype;
p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.lc=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.U()&&this.F.Ka()};p.start=function(a,b){var c=this,d;return O(function(e){return e.g==1?(c.h=b,c.ea=b.isLowLatencyMode(),H(e,qz(c,[a]).promise,2)):e.g!=3?(d=e.h,c.H=d.uri,H(e,rz(c,d.data),3)):e.return(c.m)})};
p.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.kb.clear();this.m=null;this.i.clear();this.L.clear();this.K.clear();this.C.clear();this.ya.clear();this.oa.clear();this.O.clear();this.sa.clear();this.ua.clear();this.I.clear();this.j&&this.j.destroy();this.T&&(this.T.release(),this.T=null);return Promise.all(a)};
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return O(function(n){if(n.g==1){if(!sz(a))return n.return();b=[];c=Array.from(a.i.values());a.u=Infinity;a.m.gapCount=0;d=c.filter(function(q){return!q.stream.isAudioMuxedInVideo&&q.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(tz(a,g));return H(n,Promise.all(b),2)}uz(a,d.map(function(q){return q.stream}));h=d.some(function(q){return q.we==0});d.length&&!h&&(vz(a,pz),wz(a));h&&wz(a);k=u(d);for(l=k.next();!l.done;l=
k.next())m=l.value,m.stream.isAudioMuxedInVideo||!m.stream.segmentIndex||vg(m.stream.segmentIndex)||a.h.disableStream(m.stream);I(n)})};function xz(a,b){return sz(a)?a.D.get(b.type):b.Qf}
function tz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea;return O(function(Ca){switch(Ca.g){case 1:if(b.stream.isAudioMuxedInVideo)return Ca.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.qf&&(b.$b>=0&&h.add("_HLS_msn",String(b.$b)),b.ac>=0&&h.add("_HLS_part",String(b.ac))),b.rf&&h.add("_HLS_skip","YES"),Ib(h)&&ub(g,vb(h.toString())),c.push(g.toString());va(Ca,2);return H(Ca,qz(a,c,!0).promise,4);case 4:k=Ca.h;xa(Ca,
3);break;case 2:throw l=ya(Ca),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Ca.return();m=bz(a.hb,k.data);if(m.type!=1)throw new V(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.dg.push(n);q=Uy(m.ma,"EXT-X-DEFINE");r=yz(a,q,n);t=b.stream;v=xz(a,b);return H(Ca,zz(a,m,t.mimeType,b.S,r),5);case 5:w=Ca.h;z=w.keyIds;y=w.drmInfos;A=w.encrypted;D=w.Ki;t.encrypted||!A||D||(t.encrypted=!0);G=function(Ja,Da){return Ja.size===Da.size&&[].concat(x(Ja)).every(function(Qa){return Da.has(Qa)})};
G(t.keyIds,z)||(t.keyIds=z,t.drmInfos=y,a.h.newDrmInfo(t));B=Az(a,m,v,r,b.S,b.type);E=B.segments;if(C=B.bandwidth)t.bandwidth=C;K=ym(t);F=u(E);for(J=F.next();!J.done;J=F.next())L=J.value,L.ka&&(L.ka.Pd=K);t.segmentIndex.Ee(E,a.l.Mb());E.length&&(P=Xy(m.ma,"EXT-X-MEDIA-SEQUENCE",0),N=(Q=Wy(m.ma,"EXT-X-SKIP"))?Number(Qy(Q,"SKIPPED-SEGMENTS")):0,M=Bz(P,E),R=M.$b,U=M.ac,b.$b=R+N,b.ac=U,ra=v.get(P),t.segmentIndex.eb(ra));if(ba=vg(t.segmentIndex))b.nd=ba.startTime,Ia=E[E.length-1],b.Zc=Ia.endTime;if(Ea=
Wy(m.ma,"EXT-X-ENDLIST"))b.we=!0;Cz(a,m);Dz(a,m.ma,t.type,r,b.S);I(Ca)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.V=a};
function Ez(a,b,c){c=c===void 0?!1:c;for(var d=a.M==-1,e=u(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=xz(a,f);if(g=vg(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.M=Math.max(a.M,l));f.$g=l;break}}}}if(!(a.M<0))for(b=u(b),d=b.next();!d.done;d=b.next())if(d=d.value,Fz(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.M-d.$g,f>0&&(e.g.splice(0,f),e=vg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
Gz(a,d,e)}
function Hz(a,b){if(a.aa==Infinity){b=u(b);for(var c=b.next();!c.done;c=b.next())c=vg(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(b!=Infinity){c=u(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Fz(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=vg(e);if(f)if(f.h==null)cb("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(Gz(a,d,f.h-b-f.startTime),d=u(e),e=d.next();!e.done;e=d.next())e.value.wi(b)}}}}
function Gz(a,b,c){if(!(Math.abs(c)<.001)){b.nd+=c;b.Zc+=c;a=xz(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 rz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea,Ca,Ja,Da,Qa,za,La;return O(function(Ba){switch(Ba.g){case 1:c=Hc;d=bz(a.hb,b);e=Uy(d.ma,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Fl(null,0);a.l.td(!0);k=function(){return[a.H]};l=null;m=new Map;if(d.type==1)return a.P=!1,R=Uy(d.ma,"EXT-X-DEFINE"),m=yz(a,R,a.H),l=c.Ga,U="",ra=new Map,H(Ba,Iz(a,a.G++,m,d,k,"",l,U,!0,"Media Playlist",null,ra,null,!1,null,!1),7);Jz(a,e);n=Uy(d.ma,"EXT-X-MEDIA");q=Uy(d.ma,
"EXT-X-STREAM-INF");r=Uy(d.ma,"EXT-X-IMAGE-STREAM-INF");t=Uy(d.ma,"EXT-X-I-FRAME-STREAM-INF");v=Uy(d.ma,"EXT-X-SESSION-KEY");w=Uy(d.ma,"EXT-X-SESSION-DATA");z=Uy(d.ma,"EXT-X-CONTENT-STEERING");Kz(a,w);return H(Ba,Lz(a,z),4);case 4:if(!a.g.ignoreSupplementalCodecs){y=[];A=u(q);D=A.next();for(G={};!D.done;G={ck:void 0},D=A.next())if(B=D.value,E=Qy(B,"SUPPLEMENTAL-CODECS"))G.ck=E.split(/\s*,\s*/).map(function(Fa){return Fa.split("/")[0]}),C=B.attributes.map(function(Fa){return function(wb){var Bb=wb.name,
Gc=wb.value;Bb=="CODECS"&&(Gc=Fa.ck.join(","),wb=wb.value.split(","),wb.length>1&&(wb=Cc("audio",wb))&&(Gc+=","+wb));return new Ty(Bb,Gc)}}(G)),y.push(new Ny(B.id,B.name,C,null));q.push.apply(q,x(y));K=[];F=u(t);J=F.next();for(L={};!J.done;L={dk:void 0},J=F.next())if(P=J.value,Q=Qy(P,"SUPPLEMENTAL-CODECS"))L.dk=Q.split(/\s*,\s*/).map(function(Fa){return Fa.split("/")[0]}),N=P.attributes.map(function(Fa){return function(wb){var Bb=wb.name;wb=wb.value;Bb=="CODECS"&&(wb=Fa.dk.join(","));return new Ty(Bb,
wb)}}(L)),K.push(new Ny(P.id,P.name,N,null));t.push.apply(t,x(K))}Mz(a,q);Nz(a,n);M=Oz(a,t);return H(Ba,Pz(a,q,v,n,k,a.C,M),5);case 5:return f=Ba.h,g=Qz(a,n),H(Ba,Rz(a,r,t),6);case 6:h=Ba.h;Ba.B(3);break;case 7:ba=Ba.h,a.i.set(a.H,ba),ba.stream&&(Ia=ym(ba.stream),ba.stream.segmentIndex.Kb(function(Fa){Fa.ka&&(Fa.ka.Pd=Ia)})),l=ba.stream.type,Ea=!0,a.g.disableAudio&&ba.type=="audio"?Ea=!1:a.g.disableVideo&&ba.type=="video"&&!ba.stream.codecs.includes(",")&&(Ea=!1),Ea&&f.push({id:0,language:Lc(U||"und"),
disabledUntilTime:0,primary:!0,audio:ba.type=="audio"?ba.stream:null,video:ba.type=="video"?ba.stream:null,bandwidth:ba.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new V(2,7,7001);Sz(a,d);d.type==1&&(sz(a)&&(Tz(a,d),Ca=a.u,a.F.Y(Ca)),Ja=Array.from(a.i.values()),Uz(a,Ja),wz(a),Dz(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.A};if(a.Z||!a.g.hls.disableCodecGuessing){Ba.B(8);break}Da=[];Qa=u(a.m.variants);for(za=Qa.next();!za.done;za=Qa.next())La=za.value,La.audio&&La.audio.codecs===""&&Da.push(La.audio.createSegmentIndex()),La.video&&La.video.codecs===""&&Da.push(La.video.createSegmentIndex());return H(Ba,Promise.all(Da),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),I(Ba)}})}
function Vz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return O(function(y){if(y.g==1){c=Om(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return y.return(c);d=Wz(a,b);e=d.segment;f=d.segmentIndex;g=e.S();if(h=Vm(g[0]))if(k=Xz.get(h))return y.return(Om(k));return H(y,Promise.all([Yz(a,e.ka,0),Yz(a,e,f)]),2)}l=y.h;m=l[1].mimeType;n=l[0].data;q=l[1].data;r="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");t=["audio/mp4","video/mp4","video/iso.segment"];v=e.ka||t.includes(m);if(!v&&Ik(Lb(q))){var A=
q,D=a.g.disableAudio,G=a.g.disableVideo,B=a.g.disableText;var E=Lb(A);var C=(new Ak).parse(E),K=C.se();E=C.Ch();var F=[],J=!1,L=!1;if(!D)switch(K.audio){case "aac":case "aac-loas":C.Bb().length&&(F.push("mp4a.40.2"),J=!0);break;case "mp3":C.Bb().length&&(F.push("mp4a.40.34"),J=!0);break;case "ac3":C.Bb().length&&(F.push("ac-3"),J=!0);break;case "ec3":C.Bb().length&&(F.push("ec-3"),J=!0);break;case "opus":C.Bb().length&&(F.push("opus"),J=!0)}if(!G)switch(K.video){case "avc":E.codec?F.push(E.codec):
F.push("avc1.42E01E");L=!0;break;case "hvc":E.codec?F.push(E.codec):F.push("hvc1.1.6.L93.90");L=!0;break;case "av1":F.push("av01.0.01M.08"),L=!0}if(F.length){D=J&&!L;G=new Map;if(L&&!B){B=new Dd("video/mp2t");B.Yf(A);A=u(B.Eg());for(L=A.next();!L.done;L=A.next())L=L.value,G.set(L,L);B.je()}E={type:D?"audio":"video",mimeType:"video/mp2t",codecs:F.join(", "),language:null,height:E.height,width:E.width,channelCount:null,sampleRate:null,closedCaptions:G,Se:null,colorGamut:null,frameRate:E.frameRate,timescale:null}}else E=
null;if(w=E)return y.return(w)}else if(v||r.includes(h))if(z=Pm(n,q,a.g.disableText))return y.return(z);return m?y.return(Om(m)):y.return(c)})}
function Yz(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=sh;e=Xm(b.S(),b.Uc(),b.Sc(),a.g.retryParameters);f=b instanceof Kj?1:0;return H(l,Zz(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.B(3);break}return H(l,Tm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof Kj?b.Ne(h,!0):b.Ne(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function wz(a){if(sz(a)){if(a.Fa==$z){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&&e.stream.type!="text"&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.Zc),c=Math.min(c,e.nd));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.mg(b)}}else a.l.Fb(aA(a));if(!a.l.u)for(b=u(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=vg(c.stream.segmentIndex))&&
c.h&&a.l.ki(c.h);a.l.Pf()}function Jz(a,b){var c=(new qb(a.H)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Qy(e,"NAME");var f=Qy(e,"VALUE");e=Qy(e,"QUERYPARAM");d&&f&&(a.C.has(d)||a.C.set(d,f));e&&(d=c.get(e)[0])&&!a.C.has(d)&&a.C.set(e,d)}}
function yz(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=Qy(f,"NAME"),h=Qy(f,"VALUE");e=Qy(f,"QUERYPARAM");f=Qy(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.C.get(f))&&d.set(f,e)}return d}
function Mz(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Qy(d,"AUDIO");c=Qy(d,"VIDEO");var f=Qy(d,"SUBTITLES");d=bA(a,d);if(f){var g=Cc(Ec,d);a.K.set(f,g);bd(d,g)}e&&(f=Cc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.K.set(e,f));c&&(e=Cc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.K.set(c,e))}}
function Kz(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Qy(d,"DATA-ID");c=Qy(d,"URI");var f=Qy(d,"LANGUAGE");d=Qy(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Yy([a.H],c,a.C)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function Lz(a,b){var c,d,e,f,g,h;return O(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=Qy(f,"PATHWAY-ID"),h=Qy(f,"SERVER-URI"),g&&h){a.j=new Pw(a.h);a.j.configure(a.g);a.j.i=[a.H];a.j.setManifestType("HLS");a.j.h=g;c=Qw(a.j,h);break}return H(k,c,0)})}
function Qz(a,b){var c=Vy(b,"SUBTITLES"),d={};b=u(c);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Oy(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}b=[];if(!a.g.disableText)for(var g in d)try{b.push(cA(a,d[g],new Map).stream)}catch(h){if(!a.g.hls.ignoreTextStreamFailures)throw h;}g=u(c);for(c=g.next();!c.done;c=g.next())if(d=Ry(c.value,"GROUP-ID"),c=a.K.get(d))if(d=a.L.get(d))for(d=u(d),e=d.next();!e.done;e=d.next())e=e.value,e.stream.codecs=c,e.stream.mimeType=dA(Ec,c)||eA(Ec),fA(e.stream);return b.filter(function(h){return h})}
function fA(a){var b=new Set([tf(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Kb(function(c){c.mimeType&&b.add(tf(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function Rz(a,b,c){var d,e;return O(function(f){if(f.g==1)return d=b.map(function(g){var h,k,l;return O(function(m){if(m.g==1){if(h=a.g.disableThumbnails)return m.return(null);va(m,2);return H(m,gA(a,g),4)}if(m.g!=2)return k=m.h,m.return(k.stream);l=ya(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=hA(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),H(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function iA(a,b,c){b=b.filter(function(h){var k=Qy(h,"URI")||"";h=Qy(h,"TYPE");return h!="SUBTITLES"&&(k!=""||h=="AUDIO")});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Oy(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)cA(a,d[g],c,!1)}function Oz(a,b){return b.map(function(c){c=hA(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function Pz(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea,Ca,Ja,Da,Qa;return O(function(za){switch(za.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(c.length>0)){za.B(2);break}l=u(c);m=l.next();case 3:if(m.done){za.B(2);break}n=m.value;q=Ry(n,"METHOD");r=Qy(n,"KEYFORMAT")||"identity";t=null;if(q=="NONE"){za.B(4);break}if(jA(q)){v=Yy(e(),Ry(n,"URI"),f);w=v.sort().join("");a.O.has(w)||(z=mh(v,a.g.retryParameters),y=Zz(a,z,6).promise,a.O.set(w,y));za.B(4);break}if(r==
"identity")return H(za,kA(a,n,"",e,null,f),12);A=a.mc.get(r);if(!A){D=null;za.B(10);break}return H(za,A(n,"",null),11);case 11:D=za.h;case 10:t=D;za.B(6);break;case 12:t=za.h;case 6:if(t){if(t.keyIds)for(G=u(t.keyIds),B=G.next();!B.done;B=G.next())E=B.value,k.add(E);h.push(t)}case 4:m=l.next();za.B(3);break;case 2:C={};K=u(b);for(F=K.next();!F.done;F=K.next())J=F.value,L=Oy(J,!a.j),C[L]?C[L].push(J):C[L]=[J];P=[];for(Q in C)N=C[Q],M=N[0],R=Qy(M,"FRAME-RATE"),U=Number(Ry(M,"BANDWIDTH"))||Number(Qy(M,
"AVERAGE-BANDWIDTH")),ra=Qy(M,"RESOLUTION"),ba=u(ra?ra.split("x"):[null,null]),Ia=ba.next().value,Ea=ba.next().value,Ca=Qy(M,"VIDEO-RANGE"),(Ja=Qy(M,"REQ-VIDEO-LAYOUT"))&&Ja.includes(",")&&(Da=Ja.split(",").filter(function(La){return La=="CH-STEREO"||La=="CH-MONO"}),Ja=Da[0]),Ja=Ja||"CH-MONO",Qa=lA(a,N,d),P.push.apply(P,x(xA(a,Qa.audio,Qa.video,U,Ia,Ea,R,Ca,Ja,h,k,g)));return za.return(P.filter(function(La){return La!=null}))}})}
function lA(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=Qy(m,"AUDIO");var n=Qy(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Qy(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(Ry(t,"GROUP-ID"))}),iA(a,c,e));c=(e=f.sort().join(","))&&a.L.has(e)?a.L.get(e):[];g?d.audio.push.apply(d.audio,x(c)):h&&d.video.push.apply(d.video,x(c));h=!1;var r=b.map(function(t){return Ry(t,
"URI")});g=d.audio.find(function(t){return t&&t.S().find(function(v){return r.includes(v)})});c=bA(a,b[0]);k=Cc("video",c);(l=Cc("audio",c))&&!k?(g="audio",h=d.audio.length>0&&!d.audio.some(function(t){return t.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&l&&k?(g="video",c=[[k,l].join()]):d.audio.length&&g?(g="audio",h=!0):g=d.video.length&&!d.audio.length?"audio":"video";h||(b=yA(a,b,c,g),e&&a.g.enableAudioGroups&&(b.stream.groupId=e),b.stream.type=="audio"&&g==="audio"&&d.audio.some(function(t){return t.stream.isAudioMuxedInVideo})&&
(a=d.audio[0].stream,b.stream.language=a.language,b.stream.channelsCount=a.channelsCount,b.stream.label=a.label,b.stream.audioSamplingRate=a.audioSamplingRate,b.stream.originalId=a.originalId,b.stream.originalLanguage=a.originalLanguage),d[b.stream.type]=[b]);return d}
function bA(a,b){b=Qy(b,"CODECS")||"";a.Z=b.length>0;a.Z||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return Qm(b.split(/\s*,\s*/))}function zA(a){return(a=Qy(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function AA(a){return(a=Qy(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function BA(a){a=Qy(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")}function CA(a){a=Ry(a,"TYPE").toLowerCase();a=="subtitles"&&(a=Ec);return a}
function xA(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())DA(r.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(z){return!z.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=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||Jg(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 v=f?f.S().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);t=[t,v,w.sort()].join("-");h&&k&&!Rb(q,r)||a.kb.has(t)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.kb.add(t))}return e}
function Nz(a,b){b=Vy(b,"CLOSED-CAPTIONS");a.P=b.length==0;b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Qy(d,"LANGUAGE");c=Lc(e||"und");e||(e=Qy(d,"NAME"))&&(c=e);e=Ry(d,"GROUP-ID");d=Ry(d,"INSTREAM-ID").replace("SERVICE","svc");a.J.get(e)||a.J.set(e,new Map);a.J.get(e).set(d,c)}}
function cA(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=u(b),k=h.next(),l={};!k.done;l={kj:void 0},k=h.next()){k=k.value;l.kj=++a.G;l=function(v){return function(){return"shaka://hls-muxed"+v.kj}}(l);var m=d?Ry(k,"URI"):Qy(k,"URI")||l();l=Ry(k,"GROUP-ID");e.push(m);f.push(l);g.set(l,m);(k=Qy(k,"PATHWAY-ID"))&&c.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=CA(k);if(h==Ec)b=Qy(k,"CODECS")||"";else for(f=u(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.K.has(l)){b=a.K.get(l);break}f=e.sort().join(",");
h=="audio"&&d&&(f+=d);if(a.i.has(f))return a.i.get(f);l=a.G++;if(a.j)for(g=u(g),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))&&Tw(a.j,l,m,n)}c=Qy(k,"LANGUAGE");g=Qy(k,"NAME");m=Qy(k,"DEFAULT")=="YES";n=h=="audio"?zA(k):null;var q=h=="audio"?BA(k):!1,r=Qy(k,"CHARACTERISTICS"),t=Qy(k,"FORCED")=="YES";k=h=="audio"?AA(k):null;e=EA(a,l,e,b,h,c,m,g,n,null,r,t,k,q);e.stream&&a.g.enableAudioGroups&&(e.stream.groupId=d);a.L.has(d)?a.L.get(d).push(e):a.L.set(d,
[e]);a.i.set(f,e);return e}
function gA(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(q.g==1){c=Ry(b,"URI");d=Qy(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Qy(b,"LANGUAGE");f=Qy(b,"NAME");g=Qy(b,"CHARACTERISTICS");h=EA(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Qy(b,"RESOLUTION"))?H(q,h.stream.createSegmentIndex(),3):q.B(2)}if(q.g!=2){l=vg(h.stream.segmentIndex);if(m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
Number(m.split("x")[1]);h.stream.closeSegmentIndex()}if(n=Qy(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
function hA(a,b){var c="video",d=Ry(b,"URI"),e=Qy(b,"CODECS")||"";e=="mjpg"&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Qy(b,"LANGUAGE"),g=Qy(b,"NAME"),h=Qy(b,"CHARACTERISTICS");c=EA(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Qy(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=Qy(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function yA(a,b,c,d){for(var e=a.G++,f=[],g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Ry(k,"URI");k=Qy(k,"PATHWAY-ID");a.j&&k&&Tw(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=Qy(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.g.disableText){a.P=!1;b=null;break a}if(b){if(b!="NONE"){b=a.J.get(b);break a}a.P=!1}else if(!b&&a.J.size)for(b=u(a.J.keys()),b=b.next();!b.done;b=b.next()){b=a.J.get(b.value);break a}}b=null}c=Ac(d,c);
d=EA(a,e,f,c,d,null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function EA(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function t(D){var G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea,Ca,Ja;return O(function(Da){switch(Da.g){case 1:return G=Hc,va(Da,2),H(Da,D.promise,4);case 4:B=Da.h;if(D.aborted)return Da.return();E=B.uri;E!=B.originalUri&&(C=z.S(),C.includes(E)||z.dg.push(E));K=bz(a.hb,B.data);if(K.type!=1)throw new V(2,4,4017);F=Uy(K.ma,"EXT-X-DEFINE");J=yz(a,F,E);L=!1;(!a.Z&&a.g.hls.disableCodecGuessing||a.P&&e==G.Ga&&!a.g.hls.disableClosedCaptionsDetection)&&K.segments.length>
0&&(a.P=!1,L=!0);P=!a.Z&&a.g.hls.disableCodecGuessing;Q=sz(a);return H(Da,Iz(a,0,J,K,v,d,e,f,g,h,k,l,m,n,q,r,void 0,L,P),5);case 5:N=Da.h;if(D.aborted)return Da.return();M=N.stream;Sz(a,K);sz(a)&&!Q&&Tz(a,K);z.nd=N.nd;z.Zc=N.Zc;z.rf=N.rf;z.qf=N.qf;z.we=N.we;z.Qf=N.Qf;z.$b=N.$b;z.ac=N.ac;w.segmentIndex=M.segmentIndex;w.encrypted=M.encrypted;w.drmInfos=M.drmInfos;w.keyIds=M.keyIds;w.mimeType=M.mimeType;w.bandwidth=w.bandwidth||M.bandwidth;w.codecs=w.codecs||M.codecs;w.closedCaptions=w.closedCaptions||
M.closedCaptions;w.width=w.width||M.width;w.height=w.height||M.height;w.hdr=w.hdr||M.hdr;w.colorGamut=w.colorGamut||M.colorGamut;w.frameRate=w.frameRate||M.frameRate;w.language=="und"&&M.language!="und"&&(w.language=M.language);w.language=w.language||M.language;w.channelsCount=w.channelsCount||M.channelsCount;w.audioSamplingRate=w.audioSamplingRate||M.audioSamplingRate;fA(w);w.drmInfos.length&&a.h.newDrmInfo(w);R=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)R=!0;
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);e==G.Va&&(U=vg(M.segmentIndex))&&U.ka&&(w.mimeType="application/mp4",fA(w));ra=ym(w);w.segmentIndex.Kb(function(Qa){Qa.ka&&(Qa.ka.Pd=ra)});FA(a)&&(a.Kc?Uz(a,[z]):(a.Kc=!0,ba=Array.from(a.i.values()),Ia=ba.filter(function(Qa){return Qa.stream.segmentIndex}),Uz(a,Ia),wz(a),Ea=a.u,Ea>0&&a.F.Y(Ea)));Dz(a,K.ma,w.type,J,v);a.m&&(a.m.startTime=a.A);xa(Da,0);break;case 2:Ca=ya(Da);w.closeSegmentIndex();if(Ca.code===7001)return Da.return();Ja=a.h.disableStream(w);
if(!Ja)throw Ca;I(Da)}})}function v(){return a.j&&c.length>1?Uw(a.j,b):z.dg.concat(Zy([a.H],c,a.C))}var w=GA(a,d,e,f,g,h,k,l,m,n,q,r);c.some(function(D){return D.startsWith("shaka://hls-muxed")})&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",fA(w));var z={stream:w,type:e,dg:[],nd:0,Zc:0,Qf:new Map,rf:!1,qf:!1,we:!1,$g:-1,$b:-1,ac:-1,S:v},y=null,A;w.createSegmentIndex=function(){if(y)return y;if(w.isAudioMuxedInVideo)return w.segmentIndex=new jm([]),Promise.resolve();A=qz(a,z.S(),!0);return y=
new Promise(function(D){D(t(A))})};w.closeSegmentIndex=function(){y&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);y=null};return z}function aA(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&&c.stream.type!="text"&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.Zc));return b}
function uz(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Kb(function(e){c.push(e)});a.l.Ge(c)}
function Uz(a,b){if(!sz(a))for(var c=aA(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Hd(0,c);uz(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return f.stream.type=="audio"});e=d.some(function(f){return f.stream.type=="video"});d=sz(a)&&!a.jb;c=!sz(a)&&a.jb&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Ez(a,b,d):(Hz(a,b),a.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&Ez(a,
b))}function Fz(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function FA(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 b.length>0&&!b.some(function(e){return e.segmentIndex})||c.length>0&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function Iz(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y){z=z===void 0?!0:z;y=y===void 0?!0:y;var A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R,U,ra,ba,Ia,Ea,Ca,Ja,Da,Qa,za,La,Ba,Fa,wb;return O(function(Bb){switch(Bb.g){case 1:A=d.segments||[];D=A.every(function(Gc){return Wy(Gc.ma,"EXT-X-GAP")?!0:!1});if(!A.length||D)throw new V(2,4,4053);HA(a,d);sz(a)&&Cz(a,d);G=sz(a)?a.D.get(g):new Map;B=Az(a,d,G,c,e,g);E=B.segments;C=B.bandwidth;P=L=J=F=K=null;if(!(E.length>0&&z)){Bb.B(2);break}return H(Bb,Vz(a,E),3);case 3:Q=Bb.h,
g!=Q.type&&sz(a)&&(a.D.set(Q.type,a.D.get(g)),a.D.set(g,new Map)),g=Q.type,h=Q.language,m=Q.channelCount,t=Q.sampleRate,a.g.disableText||(n=Q.closedCaptions),F=Q.height,K=Q.width,J=Q.Se,L=Q.colorGamut,P=Q.frameRate,y&&(w=Q.mimeType,f=Q.codecs);case 2:if(w){Bb.B(4);break}return H(Bb,IA(a,g,f,E),5);case 5:w=Bb.h,g!=Ec||f||w!="application/mp4"||!E[0]||E[0].ka||(w="text/vtt");case 4:return H(Bb,zz(a,d,w,e,c),6);case 6:N=Bb.h;M=N.drmInfos;R=N.keyIds;U=N.encrypted;ra=N.Ki;if(U&&!M.length&&!ra)throw new V(2,
4,4026);ba=GA(a,f,g,h,k,l,m,n,q,r,t,v);ba.encrypted=U&&!ra;ba.drmInfos=M;ba.keyIds=R;ba.mimeType=w;C&&(ba.bandwidth=C);fA(ba);g=="video"&&(K||F||J||L)&&DA(ba,K,F,P,J,null,L);sz(a)&&Cz(a,d);Ia=E[0].startTime;Ea=E[E.length-1];Ca=Ea.endTime;Ja=new jm(E);ba.segmentIndex=Ja;Qa=(Da=Wy(d.ma,"EXT-X-SERVER-CONTROL"))?Py(Da,"CAN-SKIP-UNTIL")!=null:!1;za=Da?Py(Da,"CAN-BLOCK-RELOAD")!=null:!1;La=Xy(d.ma,"EXT-X-MEDIA-SEQUENCE",0);Ba=Bz(La,E);Fa=Ba.$b;wb=Ba.ac;return Bb.return({stream:ba,type:g,dg:[],S:e,nd:Ia,
Zc:Ca,rf:Qa,qf:za,we:!1,$g:-1,$b:Fa,ac:wb,Qf:G})}})}function Bz(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{$b:a,ac:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.u&&(c=0),{$b:a,ac:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{$b:a,ac:c}}
function GA(a,b,c,d,e,f,g,h,k,l,m,n){var q=dA(c,b)||eA(c),r=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())r.push(t.value)}t=void 0;k=null;c==Ec?t=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(k="visually impaired");r.length||t!=="subtitle"||r.push("subtitle");t=null;c!="video"&&(t=f);a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,kind:c==Ec?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Lc(d||"und"),originalLanguage:d,label:t,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:k,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};fA(a);return a}
function zz(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R;return O(function(U){switch(U.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=Uy(k.ma,"EXT-X-KEY"),m=null,l.length)for(m=JA(a,b,k.ma,d,e),n=u(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);v=t=!1;w=[];z=new Set;y=u(f);A=y.next();case 2:if(A.done){U.B(4);break}D=A.value;G=u(D);B=G.next().value;E=G.next().value;C=B;K=E;F=Ry(C,"METHOD");if(F==
"NONE"){U.B(3);break}t=!0;J=Qy(C,"KEYFORMAT")||"identity";L=null;if(jA(F)){v=!0;U.B(3);break}if(J=="identity")return H(U,kA(a,C,c,d,K,e),11);P=a.mc.get(J);if(!P){Q=null;U.B(9);break}return H(U,P(C,c,K),10);case 10:Q=U.h;case 9:L=Q;U.B(6);break;case 11:L=U.h;case 6:if(L){if(L.keyIds)for(N=u(L.keyIds),M=N.next();!M.done;M=N.next())R=M.value,z.add(R);w.push(L)}case 3:A=y.next();U.B(2);break;case 4:return U.return({drmInfos:w,keyIds:z,encrypted:t,Ki:v})}})}
function KA(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw db("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=Qy(b,"IV","");if(g){var h=uc(g.substr(2));if(h.byteLength!=16)throw new V(2,4,4048);}else f=Xy(c.ma,"EXT-X-MEDIA-SEQUENCE",0);var k=Yy(d(),Ry(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.oa.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Ry(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 O(function(v){if(v.g==1)return a.O.has(l)||(n=mh(k,a.g.retryParameters),q=Zz(a,n,6).promise,a.O.set(l,q)),H(v,a.O.get(l),2);if(v.g!=3){r=v.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new V(2,4,4049);t={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey};return H(v,window.crypto.subtle.importKey("raw",r.data,t,!0,["decrypt"]),3)}m.cryptoKey=
v.h;m.fetchKey=void 0;I(v)})};a.oa.set(c,m)}return a.oa.get(c)}function Sz(a,b){a.A==null&&(b=Wy(b.ma,"EXT-X-START"))&&(a.A=Number(Ry(b,"TIME-OFFSET")))}function HA(a,b){var c=Wy(b.ma,"EXT-X-PLAYLIST-TYPE");b=Wy(b.ma,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?vz(a,pz):c?vz(a,$z):vz(a,LA)}
function Cz(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=Wy(d[e].ma,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Wy(b.ma,"EXT-X-TARGETDURATION");if(!d)throw new V(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Wy(b.ma,"EXT-X-PART-INF"))a.R=Number(Ry(e,"PART-TARGET"));b=Wy(b.ma,"EXT-X-SERVER-CONTROL");a.ea&&a.R?(a.u=a.Jc?a.R*5<=c?Math.min(a.R,a.u):Math.min(c,a.u):Math.min(a.R,a.u),a.Na=b?Number(Ry(b,"PART-HOLD-BACK")):0):(a.u=Math.min(c,a.u),
c=b?Py(b,"HOLD-BACK"):null,a.La=c?Number(c.value):0);a.$a=Math.max(d,a.$a)}function Tz(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Na)c=a.Na;else if(a.La)c=a.La;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=Wy(b.segments[e].ma,"EXTINF");c=f?c+Number(f.value.split(",")[0]):c+a.$a}a.A&&a.A<0&&(c=Math.min(-a.A,c),a.A+=c);a.l.Tj(0);a.l.ii(c);a.l.td(!1)}
function JA(a,b,c,d,e){var f=Wy(c,"EXT-X-MAP");if(!f)return null;var g=Ry(f,"URI"),h=Yy(d(),g,e);g=[h.toString(),Qy(f,"BYTERANGE","")].join("-");if(!a.ya.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,n.name=="EXT-X-KEY"?(m=Ry(n,"METHOD"),jA(m)&&n.id<f.id?(m=!1,k=KA(a,n,b,d,e)):m=m!="NONE"):n.name=="EXT-X-BYTERANGE"&&n.id<f.id&&(l=n);b=MA(h,f,l,k,m);a.ya.set(g,b)}return a.ya.get(g)}
function MA(a,b,c,d,e){var f=0,g=null;b=Qy(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 Ij(function(){return a},f,g,null,null,null,d,e)}
function NA(a,b,c,d,e,f,g,h,k,l){var m=d.ma,n=Wy(m,"EXTINF"),q=0,r=0,t=null;d.Hc.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Wy(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=se(w.value),a.jb=!0)}var z=Lj;Wy(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(d.Hc.length==0)throw new V(2,4,4024,"EXTINF");if(!a.ea)return null}var y=[];w=!1;var A=null,D=!1,G=!1;if(a.ea&&d.Hc.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=
v,E={},C=0;C<d.Hc.length;E={zg:void 0,Ie:void 0},C++){var K=d.Hc[C],F=C==0?c:y[y.length-1],J=C==0?e:F.endTime,L=Number(Qy(K,"DURATION"))||a.R;if(L){var P=J+L,Q=0,N=null;K.name=="EXT-X-PRELOAD-HINT"?(Q=(Q=Qy(K,"BYTERANGE-START"))?Number(Q):0,(F=Qy(K,"BYTERANGE-LENGTH"))?N=Q+Number(F)-1:Q&&(N=Number.MAX_SAFE_INTEGER)):(Q=Qy(K,"BYTERANGE"),N=u(OA(F,Q)),Q=N.next().value,N=N.next().value);E.Ie=Qy(K,"URI");if(E.Ie){F=Lj;Qy(K,"GAP")=="YES"&&(a.m.gapCount++,F=2,D=!0);E.zg=null;var M=function(U){return function(){U.zg==
null&&(U.zg=Yy(h(),U.Ie,f));return U.zg}}(E);q&&Q>=0&&N!=null&&(A=M,w=!0);J=new Kj(J,P,M,Q,N,b,0,0,Infinity,[],"",null,B,F,l);K.name=="EXT-X-PRELOAD-HINT"&&(J.Nh(),G=!0);Qy(K,"INDEPENDENT")!="YES"&&C>0&&J.Od();K=k;K||(y.length&&y[0].mimeType?K=y[0].mimeType:E.Ie&&(E=Vm(E.Ie),K=PA.get(g).get(E)||null));K&&(J.mimeType=K,QA.has(K)&&(J.ka=null));y.push(J);B&&(B+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(n==0)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(D||y[0].startByte!=
0?(w=!1,A=null):y=[]);(n=Wy(m,"EXT-X-BYTERANGE"))?(t=u(OA(c,n.value)),r=t.next().value,t=t.next().value):y.length&&(r=y[0].startByte,t=y[y.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=Wy(m,"EXT-X-TILES"))&&(c=Ry(g,"LAYOUT"),(g=Qy(g,"DURATION"))&&(n=Number(g)));var R=null;b=new Kj(e,q,function(){if(A)return A();R==null&&(R=Yy(h(),d.g,f));return R||[]},r,t,b,0,0,Infinity,y,c,n,v,z,l,y.length>0&&!!d.g);k&&(b.mimeType=k,QA.has(k)&&(b.ka=null));w&&(a.Jc=!0,b.rj(),G&&b.Nh());return b}
function OA(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 Dz(a,b,c,d,e){if(c=="video"||c=="audio"){var f=a.l.m;if(f&&!Fz(a,c))for(b=Uy(b,"EXT-X-DATERANGE"),b=b.filter(function(F){return Py(F,"START-DATE")!=null}).sort(function(F,J){F=Ry(F,"START-DATE");J=Ry(J,"START-DATE");return F<J?-1:F>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Ry(g,"START-DATE"),k=se(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=Qy(g,"END-DATE");if(n){var q=se(n);if(!isNaN(q)&&(m=q-f,m<0))continue}if(m==null){var r=Qy(g,"DURATION")||Qy(g,"PLANNED-DURATION");if(r){var t=
parseFloat(r);isNaN(t)||(m=l+t);if(k-f+t<0)continue}}var v=Qy(g,"CLASS")||"com.apple.quicktime.HLS",w=Qy(g,"END-ON-NEXT")=="YES";if(m==null&&w){for(var z=c+1;z<b.length;z++){var y=Qy(b[z],"CLASS")||"com.apple.quicktime.HLS";if(v==y){var A=Ry(b[z],"START-DATE"),D=se(A);if(!isNaN(D)&&D&&D>k){m=Math.max(0,D-f);break}}}if(m==null)continue}z=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var G=[],B=u(g.attributes),E=B.next();!E.done;E=B.next()){var C=E.value;if(!z.includes(C.name)){var K=
$y(C.value,d);if(C.name=="X-ASSET-URI"||C.name=="X-ASSET-LIST")K=Yy(e(),C.value,d)[0];G.push({key:C.name,description:"",data:K,mimeType:null,pictureType:null})}}if(G.length>1)a.h.onMetadata(v,l,m,G)}}catch(F){}}}}
function Az(a,b,c,d,e,f){function g(F){F=Vm(F);if(!F)return null;var J=PA.get(f).get(F);J||(J=Xz.get(F));return J}var h=b.segments,k=null,l=null,m=null,n=null,q=void 0,r=Xy(b.ma,"EXT-X-DISCONTINUITY-SEQUENCE",-1),t=Xy(b.ma,"EXT-X-MEDIA-SEQUENCE",0),v=Wy(b.ma,"EXT-X-SKIP"),w=v?Number(Qy(v,"SKIPPED-SEGMENTS")):0,z=t+w,y=0;sz(a)&&c.has(z)&&(y=c.get(z));y===0&&a.Fa==$z&&c.size>0&&!c.has(z)&&a.l.i!=null&&(y=a.l.Mb());var A=[],D=null;v=[];for(var G=0;G<h.length;G++){var B=h[G];(z=Wy(B.ma,"EXT-X-MAP"))&&
z.id!==l&&(k=JA(a,b,B.ma,e,d),l=z.id);z=B.g;var E="";z&&(E=Vm(z));E!==n&&(m=g(z),n=E);E=G==0?y:D.endTime;z=t+w+G;Wy(B.ma,"EXT-X-DISCONTINUITY")&&(r++,D&&D.ka&&(D.ka.g=E));for(var C=u(B.ma),K=C.next();!K.done;K=C.next())K=K.value,K.name=="EXT-X-KEY"&&(jA(Ry(K,"METHOD"))?q=KA(a,K,b,e,d):q=void 0);c.set(z,E);if(E=NA(a,k,D,B,E,d,f,e,m,q)){if(D=Xy(B.ma,"EXT-X-BITRATE"))v.push({bitrate:D,duration:E.endTime-E.startTime}),E.bandwidth=D;else if(E.endByte){if(B=Mj(E))D=E.endTime-E.startTime,B=B*8/D/1E3,v.push({bitrate:B,
duration:D}),E.bandwidth=B}else v.length&&(D=v.pop(),D.duration+=E.endTime-E.startTime,v.push(D),E.bandwidth=D.bitrate);if(E.bandwidth)for(D=u(E.g),B=D.next();!B.done;B=D.next())B.value.bandwidth=E.bandwidth;D=E;E.i=r;Fz(a,f)&&a.M!=null&&z<a.M||A.push(E)}}b=void 0;v.length&&(b=v.reduce(function(F,J){return F+J.duration},0),b=Math.round(v.reduce(function(F,J){return F+J.bitrate*J.duration},0)/b*1E3));if(v=A.some(function(F){return F.h!=null}))for(c={},d=0;d<A.length;c={wf:void 0,vf:void 0,mf:void 0,
qd:void 0,lf:void 0},d++)if(c.qd=A[d],c.qd.h==null)for(c.vf=0,c.wf=d,e=function(F){return function(){var J=A[F.wf];if(J){if(J.h!=null)return J.h+F.vf;F.vf-=J.endTime-J.startTime;F.wf+=1}return null}}(c),c.lf=0,c.mf=d,h=function(F){return function(){var J=A[F.mf];if(J){J!=F.qd&&(F.lf+=J.endTime-J.startTime);if(J.h!=null)return J.h+F.lf;--F.mf}return null}}(c);c.qd.h==null;)c.qd.h=h(),c.qd.h==null&&(c.qd.h=e());if(v)for(c=u(A),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),h=e.next();!h.done;h=
e.next())h=h.value,h.h=d,d+=h.endTime-h.startTime;c=a.aa;if(v&&c!=Infinity&&!Fz(a,f))for(a=u(A),v=a.next();!v.done;v=a.next())v.value.wi(c);return{segments:A,bandwidth:b}}function dA(a,b){if(a==Ec){if(b=="vtt"||b=="wvtt")return"text/vtt";if(b&&b!=="")return"application/mp4"}return a!="image"||b&&b!="jpeg"?a=="audio"&&b=="mp4a.40.34"?"audio/mpeg":b=="mjpg"?"application/mp4":null:"image/jpeg"}function eA(a){return a==Ec?"text/vtt":PA.get(a).get("mp4")}
function Wz(a,b){a=sz(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.Vc()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function IA(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w;return O(function(z){switch(z.g){case 1:e=sh;f=Wz(a,d);g=f.segment;if(g.status==2)return z.return(eA(b));k=g.S();if(l=Vm(k[0]))if(m=PA.get(b),(n=m.get(l))||(n=Xz.get(l)))return z.return(n);if(h=dA(b,c))return z.return(h);r=1;t=mh(k,a.g.retryParameters);va(z,2);t.method="HEAD";return H(z,Zz(a,t,e,{type:r}).promise,4);case 4:v=z.h;q=v.headers["content-type"];xa(z,3);break;case 2:w=ya(z);if(!w||w.code!=1002&&w.code!=1001){z.B(3);break}t.method="GET";
a.g.hls.allowRangeRequestsToGuessMimeType&&(t.headers.Range="bytes=0-0");return H(z,Zz(a,t,e,{type:r}).promise,6);case 6:v=z.h,q=v.headers["content-type"];case 3:if(!q){z.B(7);break}h=q.toLowerCase().split(";")[0];if(h!="application/octet-stream"){z.B(8);break}if(v.data.byteLength){z.B(9);break}t.method="GET";return H(z,Zz(a,t,e,{type:r}).promise,10);case 10:v=z.h;case 9:Ik(Lb(v.data))&&(h="video/mp2t");case 8:if(h!="application/octet-stream")return z.return(h);case 7:return z.return(eA(b))}})}
function DA(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 qz(a,b,c){return Zz(a,mh(b,a.g.retryParameters),0,{type:c?2:3})}
function oz(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();va(h,2);b=Date.now();return H(h,a.update(),4);case 4:c=Date.now();sz(a)&&(d=(c-b)/1E3,a.Ob.sample(1,d),e=a.g.updatePeriod>0?a.g.updatePeriod:a.u,f=Math.max(0,e-Zc(a.Ob)),a.F.Y(f));xa(h,3);break;case 2:g=ya(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.F.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
I(h)}})}function sz(a){return a.Fa!=pz}function vz(a,b){a.Fa=b;a.l&&a.l.td(!sz(a));sz(a)||a.F.stop()}function Zz(a,b,c,d){if(!a.W)throw new V(2,7,7001);d||(d={});d.isPreload=a.lc();b=a.h.networkingEngine.request(c,b,d);gh(a.W,b);return b}function jA(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"}
function nz(a,b,c,d){var e,f,g,h,k,l;return O(function(m){if(m.g==1){if(c=="video/mp2t")throw new V(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4041);e=Ry(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=Ry(b,"URI");k=yc("com.apple.fps",g,null,h);var n=(new qb(h)).Ib.replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?n:null)||!d?m.B(2):H(m,RA(a,d),3)}m.g!=2&&(l=m.h);l&&k.keyIds.add(l);
return m.return(k)})}
function kA(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,v,w,z;return O(function(y){switch(y.g){case 1:if(c=="video/mp2t")throw new V(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4041);g=Ry(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return y.return(null);k=Yy(d(),Ry(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=vc(rc(k[0].split("data:text/plain;base64,").pop()));y.B(2);break}m=k.sort().join("");a.sa.has(m)||(n=mh(k,a.g.retryParameters),q=Zz(a,n,6).promise,
a.sa.set(m,q));return H(y,a.sa.get(m),3);case 3:r=y.h,l=vc(r.data);case 2:t="00000000000000000000000000000000";if(!e){y.B(4);break}return H(y,RA(a,e),5);case 5:(v=y.h)&&(t=v);case 4:return w=new Map,w.set(t,l),z="cenc",g=="SAMPLE-AES"&&(z="cbcs"),y.return(zc(w,z))}})}
function RA(a,b){var c,d,e,f;return O(function(g){if(g.g==1){c=null;if(a.ua.has(b))return c=a.ua.get(b),g.B(2);d=Xm(b.S(),b.Uc(),b.Sc(),a.g.retryParameters);e=sh;return H(g,Zz(a,d,e,{type:0}).promise,3)}g.g!=2&&(f=g.h,b.Ne(f.data),c=Sm(f.data),a.ua.set(b,c));return g.return(c)})}S("shaka.hls.HlsParser",mz);
var Xz=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),SA=(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"),TA=(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"),UA=(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"),VA=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),PA=(new Map).set("audio",SA).set("video",TA).set("text",UA).set("image",VA),QA=new Set(["video/mp2t"].concat(x(uf))),
pz="VOD",LA="EVENT",$z="LIVE";ud("application/x-mpegurl",function(){return new mz});ud("application/vnd.apple.mpegurl",function(){return new mz});function WA(a){return Qv(a)}var XA=(new Map).set("com.microsoft.playready",WA).set("com.microsoft.playready.recommendation",WA).set("com.microsoft.playready.software",WA).set("com.microsoft.playready.hardware",WA);function YA(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.A=1;this.i=null;this.F=new Yc(5);this.u=new Sf(function(){ZA(a)});this.D=new fh;this.m=new Map;this.C=function(){return!1}}p=YA.prototype;p.configure=function(a,b){this.g=a;b&&(this.C=b)};p.start=function(a,b){var c=this;return O(function(d){if(d.g==1)return c.l=[a],c.h=b,H(d,$A(c),2);if(!c.h)throw new V(2,7,7001);return d.return(c.j)})};
function ZA(a){var b;O(function(c){switch(c.g){case 1:return va(c,2),H(c,$A(a),4);case 4:xa(c,3);break;case 2:b=ya(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;this.u!=null&&(this.u.stop(),this.u=null);this.m.clear();return this.D.destroy()};
p.update=function(){var a=this,b;return O(function(c){if(c.g==1)return va(c,2),H(c,$A(a),4);if(c.g!=2)return xa(c,0);b=ya(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};
function $A(a){var b,c,d,e,f,g,h;return O(function(k){if(k.g==1)return b=mh(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.C()}),gh(a.D,e),H(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!=oo){kd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Ix(m,"SmoothStreamingMedia");if(!m)throw new V(2,
4,4046,l);n(m);m=lc(m.outerHTML)}var q=$d(m,"SmoothStreamingMedia");if(!q)throw new V(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=po&&l(q);a.i||(a.i=new Fl(null,0));if(l=oe(q,"IsLive",ze,!1))throw new V(2,4,4047);a.i.td(!l);n=oe(q,"TimeScale",xe,1E7);m=oe(q,"DVRWindowLength",xe);l&&(m===0||isNaN(m))&&(m=Infinity);var r=oe(q,"CanSeek",ze,!1);m===0&&r&&(m=Infinity);r=null;m&&m>0&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);r==null&&(r=Infinity);a.i.mg(r);
m=oe(q,"Duration",xe,Infinity);l||a.i.Fb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var t;r=he(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=u(r);for(t=r.next();!t.done;t=r.next())m=m.concat(he(t.value,"ProtectionHeader"));if(m.length){r=[];for(t=0;t<m.length;t++){var v=m[t],w=v.attributes.SystemID.toLowerCase(),z=n[w];if(z){var y;a:{if(y=Ov(v)){y=u(ke(y,"DATA"));for(var A=y.next();!A.done;A=y.next())if(A=le(A.value,"KID")){y=rc(ie(A));y=new Uint8Array([y[3],y[2],y[1],y[0],
y[5],y[4],y[7],y[6]].concat(x(y.slice(8))));y=vc(y);break a}}y=null}A=rc(ie(v));w=uc(w.replace(/-/g,""));w=[{initData:Nh(A,w,new Set,0),initDataType:"cenc",keyId:y}];w=yc(z,"cenc",w);y&&w.keyIds.add(y);if(z=XA.get(z))w.licenseServerUri=z(v);r.push(w)}}n=r}else n=[];t=n;r=[];n=[];m=[];q=he(q,"StreamIndex");q=u(q);for(v=q.next();!v.done;v=q.next()){v=v.value;z=he(v,"QualityLevel");w=l.timescale;y=l.duration;A=he(v,"c");for(var D=[],G=0,B=0;B<A.length;++B){var E=A[B],C=A[B+1],K=oe(E,"t",xe),F=oe(E,"d",
xe);E=oe(E,"r",ve);if(!F)break;K=K!=null?K:G;(E=E||0)&&E--;if(E<0)if(C){C=oe(C,"t",xe);if(C==null)break;else if(K>=C)break;E=Math.ceil((C-K)/F)-1}else{if(y==Infinity)break;else if(K/w>=y)break;E=Math.ceil((y*w-K)/F)-1}for(C=0;C<=E;++C)G=K+F,D.push({start:K/w,end:G/w,ee:K}),K=G}w=D;z=u(z);for(y=z.next();!y.done;y=z.next())(y=aB(a,v,y.value,w,t,l))&&(y.type!="audio"||a.g.disableAudio?y.type!="video"||a.g.disableVideo?y.type!=Ec||a.g.disableText||m.push(y):n.push(y):r.push(y))}q=[];r=u(r.length>0?r:
[null]);for(t=r.next();!t.done;t=r.next())for(t=t.value,v=u(n.length>0?n:[null]),D=v.next();!D.done;D=v.next())z=q,w=z.push,y=a,A=t,D=D.value,B=0,A&&A.bandwidth&&A.bandwidth>0&&(B+=A.bandwidth),D&&D.bandwidth&&D.bandwidth>0&&(B+=D.bandwidth),y={id:y.A++,language:A?A.language:"und",disabledUntilTime:0,primary:!!A&&A.primary||!!D&&D.primary,audio:A,video:D,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,y);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.Pf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);I(k)})}
function aB(a,b,c,d,e,f){var g=b.attributes.Type;if(g!=="audio"&&g!=="video"&&g!=="text")return db("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.A++,l=oe(c,"Bitrate",we),m=oe(c,"MaxWidth",we),n=oe(c,"MaxHeight",we),q=oe(c,"Channels",we),r=oe(c,"SamplingRate",we),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Fb(Math.min(t,v));(v=b.attributes.Name)&&(v+=c.attributes.Index);v||(v=String(k));var w={id:k,originalId:v,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:e.length>0,drmInfos:e,keyIds:new Set,language:Lc(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=bB.get(e))&&w.roles.push(e),e==="main"&&(w.primary=!0);e=c.attributes.FourCC;if(e===null||e==="")e=b.attributes.FourCC;if(!e)if(g==="audio")e="AAC";else if(g==="video")return db('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
null;if(!cB.includes(e.toUpperCase()))return db("Codec not supported:",e),null;c=dB(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return db("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=eB(e,c);break;case "video":if(!c)return db("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=fB(c);break;case "text":if(w.type=Ec,w.mimeType="application/mp4",e==="TTML"||
e==="DFXP")w.codecs="stpp"}w.fullMimeTypes.add(tf(w.mimeType,w.codecs));w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var z=a.m.get(w.id);else z=[],w.type=="video"&&(z=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Gb:z,Ma:new Uint8Array([]),Ya:new Uint8Array([]),fb:0,gb:0,data:null,stream:w},z=dj(new cj([z])),
a.m.set(w.id,z);z=gB(a,new Ij(function(){return[]},0,null,ym(w),w.mssPrivateData.timescale,z,null,w.encrypted),w,b,d);w.segmentIndex=new jm(z);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
function dB(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if(b!=="audio")return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if(c==="AACH")return c=new Uint8Array(4),a=e[a*2],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function eB(a,b){var c=0;a==="AACH"&&(c=5);b?c===0&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,a==="AACH"&&(c=5));return"mp4a.40."+c}function fB(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function gB(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={sg:void 0},g=e.next())h.sg=g.value,d.push(new Kj(h.sg.start,h.sg.end,function(k){return function(){return xc(a.l,[f.replace("{start time}",String(k.sg.ee))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",YA);
var cB="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),bB=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");ud("application/vnd.ms-sstr+xml",function(){return new YA});function hB(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=jc(b)}catch(h){}throw new V(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function iB(){}
function jB(a,b,c,d,e,f){var g=new kB;try{wh(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return $g(new V(1,1,1002,a,m,c))}var h=new lB,k={Qi:!1,hk:!1};a=mB(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 Zg(a,function(){k.Qi=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Sf(function(){k.hk=!0;h.abort()});l.Y(b/
1E3);a.finally(function(){l.stop()})}return a}
function mB(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,t,v,w,z,y,A,D,G,B,E;return O(function(C){switch(C.g){case 1:return l=nB,m=oB,q=new ArrayBuffer(0),t=r=0,v={},w=Date.now(),va(C,2),H(C,l(a,d),4);case 4:n=C.h;v=pB(n.headers);g(v);if(d.method=="HEAD"){C.B(5);break}y=(z=n.headers.get("Content-Length"))?parseInt(z,10):0;if(!n.body)return H(C,n.arrayBuffer(),9);A=n.clone().body.getReader();D=function(K){function F(){var J,L,P,Q;return O(function(N){switch(N.g){case 1:return va(N,2),H(N,A.read(),4);case 4:J=
N.h;xa(N,3);break;case 2:return ya(N),N.return();case 3:if(J.done){N.B(5);break}r+=J.value.byteLength;if(!h){N.B(5);break}return H(N,h(J.value),5);case 5:L=Date.now();P=r-t;if(L-w>100&&P>=k||J.done)Q=J.done?0:y-r,f(L-w,P,Q),t=r,w=L;J.done?K.close():(K.enqueue(J.value),F());I(N)}})}F()};new m({start:D});return H(C,n.arrayBuffer(),8);case 8:q=C.h;C.B(5);break;case 9:q=C.h,G=Date.now(),f(G-w,q.byteLength,0);case 5:b.headers.Range&&(B=b.headers.Range.replace("bytes=","").split("-").filter(function(K){return K}).map(function(K){return parseInt(K,
10)}),B.length==2&&q.byteLength!=B[1]-B[0]+1&&db("Payload length does not match range requested bytes",b,n));xa(C,3);break;case 2:E=ya(C);if(e.Qi)throw new V(1,1,7001,a,c);if(e.hk)throw new V(1,1,1003,a,c);throw new V(1,1,1002,a,E,c);case 3:return C.return(hB(v,q,n.status,a,n.url,b,c))}})}function pB(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function qB(){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",iB);iB.isSupported=qB;iB.parse=jB;var nB=window.fetch,lB=window.AbortController,oB=window.ReadableStream,kB=window.Headers;qB()&&(ih("http",jB,2,!0),ih("https",jB,2,!0),ih("blob",jB,2,!0));function rB(){}
function sB(a,b,c,d,e,f){var g=new tB,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new V(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var t=g.getAllResponseHeaders().trim().split("\r\n"),v={};t=u(t);for(var w=t.next();!w.done;w=t.next())w=w.value.split(": "),v[w[0].toLowerCase()]=w.slice(1).join(": ");
q=v;e(q)}};g.onload=function(t){var v=g.response;try{d(Date.now()-h,t.loaded-k,0);var w=hB(q,v,g.status,a,g.responseURL,b,c);m(w)}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 v=Date.now(),w=f.minBytesForProgressEvents||0,z=t.loaded-k;if(v-h>100&&z>=w||t.lengthComputable&&t.loaded==t.total)d(v-h,z,g.readyState==4?0:t.total-t.loaded),k=t.loaded,h=v};for(var r in b.headers)try{g.setRequestHeader(r.toLowerCase(),
b.headers[r])}catch(t){throw new V(1,1,1002,a,t,c);}g.send(b.body)});return new Zg(l,function(){g.abort();return Promise.resolve()})}S("shaka.net.HttpXHRPlugin",rB);rB.parse=sB;var tB=window.XMLHttpRequest;ih("http",sB,1,!0);ih("https",sB,1,!0);ih("blob",sB,1,!0);function uB(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function vB(a){var b=a.jc(!1);return b?qc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function wB(a,b){return Xm(a.g.S(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function xB(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function yB(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}xB.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 zB(a){return a.i==0?0:a.j/a.i};function AB(a){var b=this;this.A=a;this.i=new Map;this.h=new uh(function(){return BB(b).catch(function(){})});this.j=[];this.u=function(){};this.m=function(){};this.g=new xB;this.l=!1}AB.prototype.destroy=function(){return this.h.destroy()};function CB(a,b,c){a.u=b;a.m=c}function BB(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
AB.prototype.queue=function(a,b,c,d,e){var f=this;vh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return O(function(t){if(t.g==1)return H(t,DB(f,b),2);h=t.h;if(f.h.g)throw new V(2,9,7001);if(d)for(m in k=Lb(h),l=new Mh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.u(zB(f.g),f.g.g);return t.return(e(h))})});this.i.set(a,g);return g};
function EB(a,b,c,d,e,f){vh(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=Lb(c);h=new Mh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.u(zB(a.g),a.g.g);return f(c)});a.i.set(b,g)}function FB(a){return O(function(b){return b.g==1?H(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
function DB(a,b){var c,d,e,f;return O(function(g){if(g.g==1)return c=sh,d=a.A.request(c,b),e=function(){return d.abort()},a.j.push(e),H(g,d.promise,2);f=g.h;bd(a.j,e);return g.return(f.data)})};function GB(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Yg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}GB.prototype.abort=function(){var a=this;return O(function(b){if(b.g==1){try{a.i.abort()}catch(c){}va(b,2);return H(b,a.g,4)}if(b.g!=2)return xa(b,0);ya(b);I(b)})};
function HB(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(g.g==1){if(e.result==null)return c(),g.return();f=e.result;return H(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}GB.prototype.store=function(){return this.h};GB.prototype.promise=function(){return this.g};function IB(a){this.h=a;this.g=[]}IB.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function JB(a,b){return KB(a,b,"readwrite")}function KB(a,b,c){c=a.h.transaction([b],c);var d=new GB(c,b);a.g.push(d);d.promise().then(function(){bd(a.g,d)},function(){bd(a.g,d)});return d};function LB(a,b,c){this.h=new IB(a);this.i=b;this.g=c}p=LB.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return MB(this.i)};p.removeSegments=function(a,b){return NB(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return O(function(d){if(d.g==1)return H(d,OB(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Vi(e)}))})};p.addManifests=function(){return MB(this.g)};
p.updateManifest=function(){return Promise.reject(new V(2,9,9016,"Cannot modify values in "+this.g))};function PB(a,b,c){a=JB(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=JB(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 NB(this,this.g,a,b)};
p.getManifests=function(a){var b=this,c;return O(function(d){if(d.g==1)return H(d,OB(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.oe(e)})))})};p.getAllManifests=function(){var a=this,b,c;return O(function(d){return d.g==1?(b=KB(a.h,a.g,"readonly"),c=new Map,H(d,HB(b,function(e,f){var g;return O(function(h){if(h.g==1)return H(h,a.oe(f),2);g=h.h;c.set(e,g);I(h)})}),2)):d.g!=3?H(d,b.promise(),3):d.return(c)})};p.Vi=function(a){return a};p.oe=function(a){return Promise.resolve(a)};
function MB(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 O(function(m){if(m.g==1){d=JB(c.h,a);e=d.store();f=[];g=u(b);h=g.next();for(k={};!h.done;k={Zh:void 0},h=g.next())l=h.value,k.Zh=e.add(l),k.Zh.onsuccess=function(n){return function(){f.push(n.Zh.result)}}(k);return H(m,d.promise(),2)}return m.return(f)})};
function NB(a,b,c,d){a=JB(a.h,b);b=a.store();c=u(c);for(var e=c.next(),f={};!e.done;f={Mh:void 0},e=c.next())f.Mh=e.value,b.delete(f.Mh).onsuccess=function(g){return function(){return d(g.Mh)}}(f);return a.promise()}
function OB(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(m.g==1){d=KB(a.h,b,"readonly");e=d.store();f={};g=[];h=u(c);k=h.next();for(l={};!k.done;l={fg:void 0,Lf:void 0},k=h.next())l.Lf=k.value,l.fg=e.get(l.Lf),l.fg.onsuccess=function(n){return function(){n.fg.result==void 0&&g.push(n.Lf);f[n.Lf]=n.fg.result}}(l);return H(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 QB(a){this.g=new IB(a)}QB.prototype.destroy=function(){return this.g.destroy()};QB.prototype.getAll=function(){var a=this,b,c;return O(function(d){return d.g==1?(b=KB(a.g,"session-ids","readonly"),c=[],H(d,HB(b,function(e,f){c.push(f)}),2)):d.g!=3?H(d,b.promise(),3):d.return(c)})};QB.prototype.add=function(a){var b=JB(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()};
QB.prototype.remove=function(a){var b=this,c;return O(function(d){return d.g==1?(c=JB(b.g,"session-ids"),H(d,HB(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):H(d,c.promise(),0)})};function RB(){this.g=new Map}RB.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)};RB.prototype.init=function(){var a=this;SB.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 TB(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Zb:d,mb:f},mb:e})})});if(b)return b;throw new V(2,9,9013,"Could not find a cell that supports add-operations");}function UB(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Zb:d,mb:f},e)})})}
function VB(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 WB(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function XB(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 YB(a){var b,c,d;return O(function(e){return e.g==1?(b=Array.from(a.g.values()),c=b.length>0,c||(d=SB,d.forEach(function(f){(f=f())&&b.push(f)})),H(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):H(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ZB(a,b){SB.set(a,b)}S("shaka.offline.StorageMuxer",RB);RB.unregister=function(a){SB.delete(a)};RB.register=ZB;RB.prototype.destroy=RB.prototype.destroy;var SB=new Map;function $B(){LB.apply(this,arguments)}pa($B,LB);$B.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=JB(c.h,c.g);e=d.store();f=new Yg;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 H(g,Promise.all([d.promise(),f]),0)})};
$B.prototype.oe=function(a){var b,c,d,e,f,g;return O(function(h){if(h.g==1){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=aC(a.periods[c],e),b.push(f);return H(h,ex(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:a.expiration==null?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
function aC(a,b){bC(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return cC(e,a.startTime,b)})}
function cC(a,b,c){var d=a.initSegmentUri?dC(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=
dC(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}}$B.prototype.Vi=function(a){return{data:a.data}};
function dC(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 bC(a){var b=a.streams.filter(function(h){return h.contentType=="audio"});a=a.streams.filter(function(h){return h.contentType=="video"});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=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 eC(){LB.apply(this,arguments)}pa(eC,LB);
eC.prototype.oe=function(a){var b,c,d,e,f,g;return O(function(h){if(h.g==1){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,n.variantIds.length!=0&&l.push(fC(n,k.startTime,k.startTime+e));f=l;b.push(f)}return H(h,ex(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:a.expiration==
null?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
function fC(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 gC(){LB.apply(this,arguments)}pa(gC,LB);p=gC.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 PB(this,a,b)};p.oe=function(a){a.expiration==null&&(a.expiration=Infinity);return Promise.resolve(a)};function hC(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=hC.prototype;
p.init=function(){var a=this,b=new Yg,c=!1,d=new Sf(function(){c=!0;b.reject(new V(2,9,9017))});typeof iC==="number"&&iC>0&&d.Y(iC);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 $B(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new eC(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;
g=g.contains("manifest-v3")&&g.contains("segment-v3")?new eC(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new gC(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new QB(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 O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return H(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return H(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return H(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return H(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return H(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),I(b)}})};
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m};
p.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return H(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return H(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return H(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return H(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),H(b,jC(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,H(b,a.init(),0)}})};
function jC(){var a=new Yg,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 iC=5;S("shaka.offline.indexeddb.StorageMechanismOpenTimeout",iC);ZB("idb",function(){return $b().ti()?new hC:null});function kC(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}kC.prototype.Zb=function(){return this.i};kC.prototype.mb=function(){return this.h};kC.prototype.key=function(){return this.l};kC.prototype.toString=function(){return this.j};
function lC(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(a==null)return null;var b=a[1];if(b!="manifest"&&b!="segment")return null;var c=a[2];if(!c)return null;var d=a[3];return d&&b!=null?new kC(b,c,d,Number(a[4])):null};function mC(a,b){this.h=a;this.g=b}
function nC(a,b){var c=new Fl(null,0);c.Fb(b.duration);var d=b.streams.filter(function(l){return l.type=="audio"}),e=b.streams.filter(function(l){return l.type=="video"});d=oC(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ec}).map(function(l){return pC(a,l,c)});var f=b.streams.filter(function(l){return l.type=="image"}).map(function(l){return pC(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 oC(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=pC(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=pC(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 pC(a,b,c){var d=b.segments.map(function(e){return qC(a,e,b)});c.Ge(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jm(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([tf(b.mimeType,b.codecs)]),isAudioMuxedInVideo:b.isAudioMuxedInVideo||!1,baseOriginalId:null}}
function qC(a,b,c){var d=new kC("segment",a.h,a.g,b.dataKey);a=new Kj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,b.initSegmentKey!=null?rC(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.og(b.thumbnailSprite);return a}function rC(a,b){var c=new kC("segment",a.h,a.g,b);return new Ij(function(){return[c.toString()]},0,null)};function sC(){this.g=null}p=sC.prototype;p.configure=function(){};
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=lC(a);c.g=d;if(d==null||d.g!="manifest")throw new V(2,1,9004,a);e=new RB;wa(m,2);return H(m,e.init(),4);case 4:return H(m,VB(e,d.Zb(),d.mb()),5);case 5:return f=m.h,H(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new mC(d.Zb(),d.mb()),l=nC(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Aa(m),H(m,e.destroy(),7);case 7:Ga(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 O(function(m){switch(m.g){case 1:return d=c.g,e=new RB,va(m,2,3),H(m,e.init(),5);case 5:return H(m,VB(e,d.Zb(),d.mb()),6);case 6:return f=m.h,H(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=h.expiration==void 0||h.expiration>b;if(!k||!l){m.B(3);break}return H(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Aa(m),H(m,e.destroy(),10);case 10:Ga(m,0);break;case 2:ya(m),m.B(3)}})};
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};ud("application/x-offline-manifest",function(){return new sC});function tC(){}function uC(a,b){var c=lC(a);c&&c.g=="manifest"?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=bh(a)):a=c&&c.g=="segment"?vC(c.key(),c,b):$g(new V(2,1,9004,a));return a}
function vC(a,b,c){var d=new RB;return bh(void 0).cb(function(){return d.init()}).cb(function(){return VB(d,b.Zb(),b.mb())}).cb(function(e){return e.getSegments([b.key()])}).cb(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",tC);tC.plugin=uC;ih("offline",uC);function wC(a,b,c){var d,e,f,g,h,k;return O(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),v=t.next();!v.done;v=t.next())if(v=v.value,xC(v.info,q)){v.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.B(4);break}g=f.value;h=yC(a,b,g);return H(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
function yC(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Oh({Gc:b,onError:function(){},Xf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),va(f,2),d.configure(a),H(f,Wh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:xa(f,3);break;case 2:return ya(f),H(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],H(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(h.g==
1)return va(h,2),H(h,hi(d,g),4);if(h.g!=2)return e.push(g),xa(h,0);ya(h);I(h)})})),6);case 6:return H(f,d.destroy(),7);case 7:return f.return(e)}})}function xC(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&cd(a.audioCapabilities,b.audioCapabilities,c)&&cd(a.videoCapabilities,b.videoCapabilities,c)};function zC(a,b,c){var d=b.presentationTimeline.getDuration();b=AC(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function BC(a,b){var c=nC(new mC(a.Zb(),a.mb()),b),d=b.appMetadata||{};c=AC(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 AC(a){var b=[],c=Bg(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(sg(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(tg(c.value));return b};function CC(){this.g=new Map}function DC(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;f<=0&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function EC(a,b){a.g.set(b.id,b.bandwidth||2048)}function FC(a,b){a=a.g.get(b);a==null&&(a=0);return a};function GC(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.Wb()):(this.h=no(),this.g=new hh,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new uh(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return H(k,Promise.all(b.l.map(function(l){return BB(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 H(k,Promise.all(e),3);case 3:if(!c){k.B(4);
break}return H(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,I(k)}})});this.m=1E9}function HC(){if(xd($b()))a:{var a=u(SB.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=GC.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Rn(a,b));return so(this.h,a)};p.getConfiguration=function(){var a=no();so(a,this.h,no());return a};p.Wb=function(){return this.g};
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new AB(this.g);this.l.push(h);b=IC(this,a,b||{},d||[],e||[],function(){var k;return O(function(l){if(l.g==1)return c?l.B(2):H(l,Um(a,f.g,g.manifest.retryParameters),3);l.g!=2&&(c=l.h);k=zd(a,c||null);return l.return(k())})},g,h);b=new Zg(b,function(){return BB(h)});b.finally(function(){bd(f.l,h)});return JC(this,b)};
function IC(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N;return O(function(M){switch(M.g){case 1:return KC(),l=k=null,m=new RB,r=q=n=null,va(M,2,3),H(M,f(),5);case 5:return k=M.h,H(M,LC(a,b,k,g),6);case 6:t=M.h;MC(a);v=!t.presentationTimeline.U()&&!t.presentationTimeline.md();if(!v)throw new V(2,9,9005,b);w=u(d);z=w.next();case 7:if(z.done){M.B(9);break}y=z.value;return H(M,NC(a,y,t),10);case 10:A=M.h;t.imageStreams.push(A);MC(a);z=w.next();M.B(7);break;case 9:D=u(e),G=D.next();
case 11:if(G.done)return Yh(g.drm.clearKeys,t.variants),C=t.variants.some(function(R){if(R.audio)for(var U=u(R.audio.drmInfos),ra=U.next();!ra.done;ra=U.next())if(ra.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=u(R.video.drmInfos),U=R.next();!U.done;U=R.next())if(U.value.licenseServerUri.startsWith("data:"))return!0;return!1}),K=g.offline.usePersistentLicense,C&&(K=!1),H(M,a.Ed(t,function(R){r=r||R},g,K),15);B=G.value;return H(M,OC(a,t,B.uri,B.language,B.kind,B.mime,B.codecs),
14);case 14:E=M.h;t.textStreams.push(E);MC(a);G=D.next();M.B(11);break;case 15:l=M.h;MC(a);if(r)throw r;return H(M,PC(t,l,g,K),16);case 16:return H(M,m.init(),17);case 17:return MC(a),H(M,TB(m),18);case 18:return n=M.h,MC(a),F=QC(l,t,b,c,g,h,K),J=F.Pl,L=F.Ai,H(M,n.mb.addManifests([J]),19);case 19:P=M.h;MC(a);q=P[0];MC(a);if(r)throw r;return H(M,RC(a,L,q,J,h,g,n.mb,t,l,K),20);case 20:return MC(a),SC(t,J,l,K),H(M,n.mb.updateManifest(q,J),21);case 21:return MC(a),Q=new kC("manifest",n.path.Zb,n.path.mb,
q),M.return(BC(Q,J));case 3:return Aa(M),H(M,m.destroy(),22);case 22:if(!k){M.B(23);break}return H(M,k.stop(),23);case 23:if(!l){M.B(25);break}return H(M,l.destroy(),25);case 25:Ga(M,0);break;case 2:N=ya(M);if(q==null){M.B(27);break}return H(M,TC(q),27);case 27:throw r||N;}})}
function RC(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,t,v,w,z,y,A,D;return O(function(G){switch(G.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new V(2,9,7001);};r=function(B,E){var C,K,F,J,L,P,Q,N,M;return O(function(R){if(R.g==1){C=u(B);K=C.next();for(F={};!K.done;F={zc:void 0},K=C.next())F.zc=K.value,q(),J=wB(F.zc,f),L=F.zc.i,P=F.zc.h,Q=function(U){return function(ra){var ba,Ia,Ea,Ca;return O(function(Ja){switch(Ja.g){case 1:ba=U.zc.g;Ia=ba.jc(!1);if(!ba.aesKey||Ia){Ja.B(2);break}return H(Ja,Tm(ra,
ba.aesKey,U.zc.j),3);case 3:ra=Ja.h;case 2:return Ea=vB(ba),H(Ja,g.addSegments([{data:ra}]),4);case 4:Ca=Ja.h,q(),m[Ea]=Ca[0],n+=ra.byteLength,I(Ja)}})}}(F),N=F.zc.g,(M=N.jc(!1))?EB(e,F.zc.groupId,M,L,P,Q):e.queue(F.zc.groupId,J,L,P,Q);return H(R,FB(e),2)}q();if(!E||e.l)return R.B(0);SC(h,d,k,l);return H(R,g.updateManifest(c,d),0)})};t=!1;va(G,2);if(!UC(h)||!t||VC(h)){G.B(4);break}return H(G,r(b.filter(function(B){return B.h}),!0),5);case 5:return q(),b=b.filter(function(B){return!B.h}),v=m,w=n,m=
{},n=0,H(G,WC(g,c,d,v,w,function(){return MC(a)}),6);case 6:q();case 4:if(t){G.B(7);break}return H(G,r(b,!1),8);case 8:return q(),z=m,y=n,m={},n=0,H(G,WC(g,c,d,z,y,function(){return q()}),9);case 9:q();case 7:xa(G,0);break;case 2:return A=ya(G),D=Object.values(m),H(G,g.removeSegments(D,function(){}),10);case 10:throw A;}})}
function TC(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new RB,H(f,b.init(),2);case 2:return H(f,TB(b),3);case 3:return c=f.h,d=new kC("manifest",c.path.Zb,c.path.mb,a),H(f,b.destroy(),4);case 4:return e=new GC,H(f,e.remove(d.toString()),0)}})}
function WC(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,v,w;return O(function(z){switch(z.g){case 1:g=!1;va(z,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,t!=null&&(r.dataKey=t,r.pendingSegmentRefId=void 0),t=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,t!=null&&(r.initSegmentKey=t,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return H(z,a.updateManifest(b,c),4);case 4:g=!0;f();xa(z,0);break;case 2:return v=ya(z),H(z,TC(b),5);case 5:if(g){z.B(6);break}w=Object.values(d);return H(z,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
function PC(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G,B,E,C,K,F,J,L,P,Q,N,M,R;return O(function(U){switch(U.g){case 1:return e={width:Infinity,height:Infinity},$f(a,c.restrictions,e),H(U,cg(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;Yf(a,h,k,g,l);m=u(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(sg(q));r=u(a.textStreams);for(t=r.next();!t.done;t=
r.next())v=t.value,f.push(tg(v));w=u(a.imageStreams);for(z=w.next();!z.done;z=w.next())y=z.value,f.push(ug(y));return H(U,c.offline.trackSelectionCallback(f),3);case 3:A=U.h;D=a.presentationTimeline.getDuration();G=0;B=u(A);for(E=B.next();!E.done;E=B.next())C=E.value,K=C.bandwidth*D/8,G+=K;va(U,4);return H(U,c.offline.downloadSizeCallback(G),6);case 6:F=U.h;if(!F)throw new V(2,9,9014);xa(U,5);break;case 4:J=ya(U);if(J instanceof V)throw J;throw new V(2,9,9015);case 5:L=new Set;P=new Set;Q=new Set;
N=u(A);for(M=N.next();!M.done;M=N.next())R=M.value,R.type=="variant"&&L.add(R.id),R.type=="text"&&P.add(R.id),R.type=="image"&&Q.add(R.id);a.variants=a.variants.filter(function(ra){return L.has(ra.id)});a.textStreams=a.textStreams.filter(function(ra){return P.has(ra.id)});a.imageStreams=a.imageStreams.filter(function(ra){return Q.has(ra.id)});XC(a);I(U)}})}
function QC(a,b,c,d,e,f,g){var h=zC(c,b,d),k=e.offline.progressCallback;CB(f,function(t,v){h.size=v;k(h,t)},function(t,v){l&&g&&m==v&&di(a,"cenc",t)});var l=UC(b)&&!VC(b),m=null;l&&(m=YC.get(a.g.keySystem));for(var n=new CC,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())EC(n,r.value);q=u(b.variants);for(r=q.next();!r.done;r=q.next())DC(n,r.value);f=ZC(f,n,b,e);e=f.streams;f=f.Ai;(n=a.g)&&g&&(n.initData=[]);return{Pl:{creationTime:Date.now(),
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ue(),streams:e,sessionIds:g?pi(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Ai:f}}function UC(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function VC(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 SC(a,b,c,d){b.expiration=c.ue();c=pi(c);b.sessionIds=d?c:[];if(UC(a)&&d&&!c.length)throw new V(2,9,9007);}p.remove=function(a){return $C(this,aD(this,a))};
function aD(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:KC();c=lC(b);if(c==null||c.g!="manifest")throw new V(2,9,9004,b);d=c;e=new RB;wa(k,2);return H(k,e.init(),4);case 4:return H(k,VB(e,d.Zb(),d.mb()),5);case 5:return f=k.h,H(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],H(k,Promise.all([bD(a,h,e),cD(f,d,h)]),2);case 2:return Aa(k),H(k,e.destroy(),8);case 8:Ga(k,0)}})}
function dD(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&e.type=="video"?c.push({contentType:tf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||e.type!="audio"||c.push({contentType:tf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function bD(a,b,c){return O(function(d){return H(d,eD(a.g,a.h.drm,c,b),0)})}
function cD(a,b,c){function d(){}var e=fD(c);BC(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.jm=function(){return $C(this,gD(this))};
function gD(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return KC(),b=a.g,c=a.h.drm,d=new RB,e=!1,wa(n,2),H(n,d.init(),4);case 4:f=[],WB(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return H(n,k.getAll(),8);case 8:return l=n.h,H(n,wC(c,b,l),9);case 9:return m=n.h,H(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return Aa(n),H(n,d.destroy(),11);case 11:Ga(n,3);break;case 3:return n.return(!e)}})}
p.list=function(){return $C(this,hD())};function hD(){var a,b,c;return O(function(d){switch(d.g){case 1:return KC(),a=[],b=new RB,wa(d,2),H(d,b.init(),4);case 4:return c=Promise.resolve(),UB(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(h.g==1)return H(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=BC(new kC("manifest",e.Zb,e.mb,l),k);a.push(k)});I(h)})})}),H(d,c,2);case 2:return Aa(d),H(d,b.destroy(),6);case 6:Ga(d,3);break;case 3:return d.return(a)}})}
function LC(a,b,c,d){var e,f,g,h,k;return O(function(l){if(l.g==1)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
addFont:function(){}},c.configure(d.manifest),MC(a),H(l,c.start(b,g),2);if(l.g!=3)return h=l.h,MC(a),k=iD(h),H(l,Promise.all(lb(k,function(m){return m.createSegmentIndex()})),3);MC(a);if(e)throw e;return l.return(h)})}
function NC(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return O(function(y){switch(y.g){case 1:return H(y,jD(a,b),2);case 2:d=y.h;if(d!="text/vtt")throw new V(1,2,2017,b);return H(y,kD(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=If(d);if(!f)throw new V(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Lb(e);l=g.parseMedia(k,h,b,[]);m=[];n=u(l);q=n.next();for(r={};!q.done;r={Ag:void 0,Gd:void 0},q=n.next())r.Gd=q.value,r.Ag=null,
t=function(A){return function(){A.Ag==null&&(A.Ag=xc([b],[A.Gd.payload]));return A.Ag||[]}}(r),v=new Kj(r.Gd.startTime,r.Gd.endTime,t,0,null,null,0,0,Infinity),r.Gd.payload.includes("#xywh")&&(w=r.Gd.payload.split("#xywh=")[1].split(","),w.length===4&&v.og({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),m.push(v);z=d;if(!m.length){y.B(4);break}return H(y,Um(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++,
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jm(m),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([tf(z||
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
function OC(a,b,c,d,e,f,g){var h,k,l;return O(function(m){if(m.g==1)return f?m.B(2):H(m,jD(a,c),3);m.g!=2&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:lm(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:Ec,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([tf(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=tf(h.mimeType,h.codecs);l=Jf(k);if(!l)throw new V(2,2,2014,f);return m.return(h)})}
function jD(a,b){var c;return O(function(d){switch(d.g){case 1:return va(d,2),H(d,Um(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}function kD(a,b,c){var d,e,f;return O(function(g){if(g.g==1)return d=sh,e=mh([a],c),e.method="GET",H(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
p.Ed=function(a,b,c,d){var e=this,f;return O(function(g){return g.g==1?(f=new Oh({Gc:e.g,onError:b,Xf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),H(g,Th(f,a.variants,d),2)):g.g!=3?H(g,fi(f),3):g.return(f)})};
function ZC(a,b,c,d){var e=new Map,f=iD(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=lD(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()),Ai:Array.from(e.values())}}
function lD(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=h===0?d.id:0;mD(d,c.presentationTimeline.Mb(),function(l,m){var n=vB(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=FC(b,d.id)*r;r=yB(a.g,r);f.set(n,new uB(l,r,k,!1,m))}l.ka&&(q=vB(l.ka),f.has(q)||(r=FC(b,
d.id)*.5,r=yB(a.g,r),f.set(q,new uB(l.ka,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});h!==0&&(k=(k+1)%h)});return g}
function mD(a,b,c){b=a.segmentIndex.find(b);if(b!=null)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function MC(a){if(a.j.g)throw new V(2,9,7001);}function KC(){if(!HC())throw new V(2,9,9E3);}function $C(a,b){return O(function(c){if(c.g==1)return a.i.push(b),wa(c,2),H(c,b,4);if(c.g!=2)return c.return(c.h);Aa(c);bd(a.i,b);return Ga(c,0)})}function JC(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){bd(a.i,c)})}
function fD(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,d.initSegmentKey!=null&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
function eD(a,b,c,d){var e,f,g;return O(function(h){if(h.g==1){if(!d.drmInfo)return h.return();e=XB(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:dD(d,!1),videoCapabilities:dD(d,!0)}});return H(h,wC(b,a,f),2)}return h.g!=3?(g=h.h,H(h,e.remove(g),3)):H(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function iD(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 XC(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",GC);GC.deleteAll=function(){var a;return O(function(b){return b.g==1?(a=new RB,wa(b,2),H(b,YB(a),2)):b.g!=5?(Aa(b),H(b,a.destroy(),5)):Ga(b,0)})};
GC.prototype.list=GC.prototype.list;GC.prototype.removeEmeSessions=GC.prototype.jm;GC.prototype.remove=GC.prototype.remove;GC.prototype.store=GC.prototype.store;GC.prototype.getNetworkingEngine=GC.prototype.Wb;GC.prototype.getConfiguration=GC.prototype.getConfiguration;GC.prototype.configure=GC.prototype.configure;GC.prototype.destroy=GC.prototype.destroy;GC.support=HC;
var YC=(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");
hr("offline",HC);function nD(){}function oD(){for(var a=u(pD),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){db("Error installing polyfill!",c)}}}function qD(a,b){a={priority:b||0,callback:a};for(b=0;b<pD.length;b++)if(pD[b].priority<a.priority){pD.splice(b,0,a);return}pD.push(a)}S("shaka.polyfill",nD);nD.register=qD;nD.installAll=oD;var pD=[];function rD(){}function sD(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tD(b.value)}function tD(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){c==null||c==void 0?this.removeAttribute(b):this.setAttribute(b,c)}})}nD.Aria=rD;rD.install=sD;qD(sD);function uD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}uD.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};uD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function vD(a){if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("org.w3")||a.startsWith("com.huawei"))return"cenc";db("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function wD(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function xD(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&$b().vd()?!0:!1};function yD(){}var zD;function AD(){$b().rg()&&!zD&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(zD=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=BD,navigator.emeEncryptionSchemePolyfilled=!0)}
function BD(a,b){var c=this,d,e;return O(function(f){if(f.g==1)return H(f,zD.call(c,a,b),2);d=f.h;if(e=wD(d))return navigator.requestMediaKeySystemAccess=zD,f.return(d);navigator.requestMediaKeySystemAccess=CD;return f.return(CD.call(c,a,b))})}
function CD(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t;return O(function(v){if(v.g==1){d=vD(a);e=[];f=u(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=DD(h.videoCapabilities,d),l=DD(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 H(v,zD.call(c,a,e),2)}q=v.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 v.return(new uD(q,r,t))})}function DD(a,b){return a?a.filter(function(c){return xD(c.encryptionScheme,b)}):a}nD.EmeEncryptionScheme=yD;yD.install=AD;qD(AD);function ED(){}
function FD(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
{get:function(){return document.mozFullScreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",GD);document.addEventListener("webkitfullscreenerror",GD);document.addEventListener("mozfullscreenchange",GD);document.addEventListener("mozfullscreenerror",GD)}}function GD(a){var b=a.type.replace(/^(webkit|moz)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}nD.Fullscreen=ED;ED.install=FD;
qD(FD);function HD(){}var ID;function JD(){$b().rg()&&!ID&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(ID=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=KD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function KD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return H(f,ID.call(b,a),2);case 2:c=f.h;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=wD(d))return navigator.mediaCapabilities.decodingInfo=ID,f.return(c);navigator.mediaCapabilities.decodingInfo=LD;if(d){f.B(3);break}return H(f,MD(a),4);case 4:return c.keySystemAccess=f.h,f.return(c);case 3:return f.return(LD.call(b,a))}})}
function LD(a){var b=this,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=vD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},xD(d,g)&&xD(c,g))?H(l,ID.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=new uD(k.keySystemAccess,c,d);l.B(3);break}if(!a.keySystemConfiguration){l.B(3);
break}return H(l,MD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function MD(a){var b,c;return O(function(d){if(d.g==1){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return H(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}nD.MCapEncryptionScheme=HD;HD.install=JD;qD(JD,-2);function ND(){}function OD(){$b().sc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ND.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=PD)}
function PD(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};$b();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=yd().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=yd().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.B(2);break}if(!xd())return q.return(b);if(!c){q.B(3);break}return H(q,QD(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=
$b().Oa(),t=d.contentType;r==="CAST"&&d.spatialRendering&&(t+="; spatialRendering=true");l=Ri(t);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return H(q,RD(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function QD(a){var b,c,d;return O(function(e){return e.g==1?(b=$b(),c=b.Oa(),c!=="CAST"?e.B(2):H(e,SD(a),3)):e.g!=2?(d=e.h,e.return(d)):e.return(Ri(a.contentType))})}
function RD(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;return O(function(v){switch(v.g){case 1:d=[];e=[];f=[];c.audio&&(g={robustness:c.audio.robustness||"",contentType:b.contentType},$b().uj()&&b.contentType.includes('codecs="ac-3"')&&(g.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(g.encryptionScheme=c.audio.encryptionScheme,f.push(c.audio.encryptionScheme)),d.push(g));c.video&&(h={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(h.encryptionScheme=
c.video.encryptionScheme,f.push(c.video.encryptionScheme)),e.push(h));k={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(k.audioCapabilities=d);e.length&&(k.videoCapabilities=e);l=a?a.contentType:"";m=b?b.contentType:"";n=Cf(l)+";"+Bf(l);q=Cf(m)+";"+Bf(m);r=c.keySystem;t=null;va(v,2);var w=Wb(n,q,r,f);if(Yb.has(w)){w=Wb(n,q,r,f);t=Yb.get(w)||null;v.B(4);break}return H(v,navigator.requestMediaKeySystemAccess(c.keySystem,
[k]),5);case 5:w=t=v.h;var z=Wb(n,q,r,f);Yb.set(z,w);case 4:xa(v,3);break;case 2:ya(v);case 3:return v.return(t)}})}
function SD(a){var b,c,d,e,f;return O(function(g){if(g.g==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Ri(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
default:return g.return(!1)}e=!1;f=TD;return f.has(b)?(e=f.get(b),g.B(2)):H(g,cast.__platform__.canDisplayType(b),3)}g.g!=2&&(e=g.h,f.set(b,e));return g.return(e)})}nD.MediaCapabilities=ND;ND.install=OD;ND.originalMcap=null;var TD=new Map;qD(OD,-1);function UD(){}function VD(){var a=$b(),b=a.Ja()==="WEBKIT"?a.Ha():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(WD(),XD()):b<=15&&WD());a=u(a.Ej());for(b=a.next();!b.done;b=a.next())YD(b.value);(window.MediaSource||window.ManagedMediaSource)&&ZD();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&$D()}
function WD(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ra.apply(0,arguments));b.abort=function(){};return b}}function XD(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function ZD(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return xf(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return xf(c)!="mp2t"&&b(c)}}}
function YD(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Bf(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Bf(d)!=a&&c(d)}}}
function $D(){var a=MediaSource.isTypeSupported;$b().ek()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}nD.MediaSource=UD;UD.install=VD;qD(VD);function aE(){}function bE(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=void 0?cE():window.orientation!=void 0&&dE())}function cE(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()});screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}
function dE(){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 eE;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}nD.Orientation=aE;aE.install=bE;function eE(){kb.call(this);this.type="";this.angle=0}pa(eE,kb);
eE.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(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)};
eE.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation&&screen.mozUnlockOrientation()};qD(bE);function fE(){}var gE,hE,iE,jE,kE,lE;
function mE(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=nE){if(a===void 0?0:a)gE=!0,hE=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),iE=HTMLMediaElement.prototype.setMediaKeys,jE=window.MediaKeys,kE=window.MediaKeySystemAccess,lE=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=oE;window.MediaKeys=pE;window.MediaKeySystemAccess=
qE;navigator.requestMediaKeySystemAccess=rE;window.shakaMediaKeysPolyfill=nE;kg.clear();Yb.clear()}}function rE(a,b){try{var c=new qE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function oE(a){var b=this.mediaKeys;b&&b!=a&&sE(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?sE(a,this):Promise.resolve()}
function tE(a){a=Lb(a.initData);if(Pb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=fc(a.subarray(4),!0);a=lc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Mb(a);this.dispatchEvent(b)}nD.PatchedMediaKeysApple=fE;
fE.uninstall=function(){window.shakaMediaKeysPolyfill==nE&&gE&&(gE=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",hE),HTMLMediaElement.prototype.setMediaKeys=iE,window.MediaKeys=jE,window.MediaKeySystemAccess=kE,navigator.requestMediaKeySystemAccess=lE,hE=lE=iE=kE=jE=null,window.shakaMediaKeysPolyfill="",kg.clear(),Yb.clear())};fE.install=mE;
function qE(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(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=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;}
qE.prototype.createMediaKeys=function(){var a=new pE(this.keySystem);return Promise.resolve(a)};qE.prototype.getConfiguration=function(){return this.g};function pE(a){this.h=new WebKitMediaKeys(a);this.g=new ed}pE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new uE(this.h,a)};pE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function sE(a,b){a.g.Ta();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",tE);try{return Tl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}pE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function uE(a){kb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new ed;this.sessionId="";this.expiration=NaN;this.closed=new Yg;this.keyStatuses=new vE;this.onkeystatuseschange=null}
pa(uE,kb);p=uE.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new Yg;try{var d=this.l.createSession("video/mp4",Lb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.Vc()==void 0?"license-request":"license-renewal").set("message",Mb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(wE(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:wE(c,"output-not-allowed");break;default:wE(c,"internal-error")}});wE(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 Yg;try{this.i.update(Lb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ta()}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 wE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function vE(){this.size=0;this.g=void 0}p=vE.prototype;p.Vc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Xb.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Xb.value();return this.g&&Kb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var nE="apple";
qD(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||mE())});function xE(){}function yE(){if(window.MediaKeys){var a=$b();MediaKeys.prototype.setServerCertificate&&a.Pe()||(MediaKeys.prototype.setServerCertificate=zE)}}function zE(){return Promise.resolve(!1)}nD.PatchedMediaKeysCert=xE;xE.install=yE;qD(yE);function AE(){}
function BE(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)CE="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=DE;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=EE;window.MediaKeys=FE;window.MediaKeySystemAccess=GE;window.shakaMediaKeysPolyfill=HE}}
function IE(a){var b=CE;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function DE(a,b){try{var c=new GE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function EE(a){var b=this.mediaKeys;b&&b!=a&&JE(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&JE(a,this);return Promise.resolve()}nD.PatchedMediaKeysWebkit=AE;AE.install=BE;
function GE(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=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));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}GE.prototype.createMediaKeys=function(){var a=new FE(this.g);return Promise.resolve(a)};GE.prototype.getConfiguration=function(){return this.h};function FE(a){this.l=a;this.h=null;this.g=new ed;this.i=[];this.j=new Map}
function JE(a,b){a.h=b;a.g.Ta();var c=CE;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Mb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=KE(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Vc()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=KE(a,d.sessionId))&&d.ready()}),
a.g.o(b,c+"keyerror",function(d){var e=KE(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(d.systemCode==45&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?LE(e,"output-restricted"):f==1?LE(e,"expired"):LE(e,"internal-error"))}}))}
FE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new ME(b,this.l,a);this.i.push(a);return a};FE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};FE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function KE(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 ME(a,b,c){kb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Yg;this.keyStatuses=new NE;this.onkeystatuseschange=null}pa(ME,kb);p=ME.prototype;p.ready=function(){LE(this,"usable");this.g&&this.g.resolve();this.g=null};
function OE(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=Lb(lc("LOAD_SESSION|"+c));else{var e=lc("PERSISTENT|");d=wc(e,b)}else d=Lb(b)}catch(g){return Promise.reject(g)}a.h=new Yg;var f=IE("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new Sf(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h}
function PE(a,b,c){if(a.g)a.g.then(function(){return PE(a,b,c)}).catch(function(){return PE(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=ec(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=rc(e.keys[0].k);e=rc(e.keys[0].kid)}else d=Lb(c),e=null;var f=IE("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function LE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return OE(this,b,null)};p.load=function(a){return this.l=="persistent-license"?OE(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Yg;PE(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=IE("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function NE(){this.size=0;this.g=void 0}p=NE.prototype;p.Vc=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,Xb.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Xb.value();return this.g&&Kb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var CE="",HE="webkit";qD(BE);function QE(){}function RE(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=SE,Object.defineProperty(a,"disablePictureInPicture",{get:TE,set:UE,enumerable:!0,configurable:!0}),document.exitPictureInPicture=VE,document.addEventListener("webkitpresentationmodechanged",WE,!0))}}
function WE(a){a=a.target;if(a.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
function SE(){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 VE(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function TE(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function UE(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nD.PiPWebkit=QE;QE.install=RE;qD(RE);function XE(){}function YE(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=ZE))}function ZE(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}nD.RandomUUID=XE;XE.install=YE;qD(YE);function $E(){}function aF(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:bF})}function bF(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}nD.Symbol=$E;$E.install=aF;qD(aF);function cF(){}function dF(){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=eF),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=fF),b.prototype.includes||(b.prototype.includes=gF)}function eF(a,b){return Array.prototype.indexOf.call(this,a,b)}function fF(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
function gF(a,b){return this.indexOf(a,b)!==-1}nD.TypedArray=cF;cF.install=dF;qD(dF);function hF(){}function iF(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}nD.VideoPlayPromise=hF;hF.install=iF;qD(iF);function jF(){}function kF(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof yd().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=lF)}}function lF(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nD.VideoPlaybackQuality=jF;jF.install=kF;qD(kF);function mF(){}function nF(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=oF;else if(b==6)a=pF;else{try{var c=!!oF(1,2,"")}catch(d){c=!1}c&&(a=oF)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function oF(a,b,c){return new window.TextTrackCue(a,b,c)}function pF(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}nD.VTTCue=mF;mF.install=nF;qD(nF);function qF(a){kb.call(this);this.g=a;this.m=null;this.h=[];this.j=-1;this.i=this.l=null;this.u=new ed}pa(qF,kb);p=qF.prototype;p.destroy=function(){var a=this;return O(function(b){if(b.g==1)return H(b,a.removeAllItems(),2);a.g=null;a.u&&(a.u.release(),a.u=null);kb.prototype.release.call(a);I(b)})};p.configure=function(a){this.m=a};p.getConfiguration=function(){return this.m};p.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null};
p.getCurrentItemIndex=function(){return this.j};p.getItems=function(){return this.h.slice()};p.insertItems=function(a){this.h.push.apply(this.h,x(a));this.dispatchEvent(new T("itemsinserted"))};
p.removeAllItems=function(){var a=this,b,c,d,e;return O(function(f){if(f.g==1)return a.u.Ta(),a.h.length&&a.j>=0?H(f,a.g.wc(),2):f.B(2);if(f.g!=4){b=[];a.i&&(a.i.preloadManager.l||b.push(a.i.preloadManager.destroy()),a.i=null);a.l&&(a.l.preloadManager.l||b.push(a.l.preloadManager.destroy()),a.l=null);c=u(a.h);for(d=c.next();!d.done;d=c.next())e=d.value,e.preloadManager&&!e.preloadManager.l&&b.push(e.preloadManager.destroy());return b.length?H(f,Promise.all(b),4):f.B(4)}a.h=[];a.j=-1;a.dispatchEvent(new T("itemsremoved"));
I(f)})};
p.playItem=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;return O(function(A){switch(A.g){case 1:b.u.Ta();if(!b.h.length||a>=b.h.length)throw new V(2,7,7007);c=b.getCurrentItem();d=b.h[a];b.j!=a&&(b.j=a,b.dispatchEvent(new T("currentitemchanged")));e=b.g.zf();f=b.m?b.m.preloadNextUrlWindow:0;f>0&&(g=!1,b.u.o(e,"timeupdate",function(){var D,G,B,E;return O(function(C){switch(C.g){case 1:if(b.l||b.h.length<=1||g||b.g.U()||!e.duration)return C.return();D=b.g.wa().end-e.currentTime;if(isNaN(D)){C.B(0);
break}if(!(D<=f)){C.B(0);break}G=b.m&&b.m.repeatMode;B=null;b.j+1<b.h.length?B=b.h[b.j+1]:G==1&&(B=b.h[0]);if(!B||B.preloadManager&&!B.preloadManager.l){C.B(0);break}g=!0;E=null;va(C,5);return H(C,b.g.preload(B.manifestUri,B.startTime,B.mimeType,B.config),7);case 7:E=C.h;xa(C,6);break;case 5:ya(C),E=null;case 6:b.l={item:B,preloadManager:E},g=!1,I(C)}})}));b.u.o(b.g,"complete",function(){var D=b.m&&b.m.repeatMode,G=!1;if(D==2)G=!0;else{var B=b.j+1;B<b.h.length?b.playItem(B):D==1&&(b.h.length==1?G=
!0:b.playItem(0))}G&&(e.paused?(e.currentTime=b.g.wa().start,e.play()):b.u.o(e,"paused",function(){e.currentTime=b.g.wa().start;e.play()}))});h=d.manifestUri;d.preloadManager&&!d.preloadManager.l&&(h=d.preloadManager);k=!1;b.l&&b.l.item==d&&b.l.preloadManager?h=b.l.preloadManager:b.i&&b.i.item==d&&b.i.preloadManager&&(h=b.i.preloadManager,k=!0);if(!b.i){A.B(2);break}if(k||b.i.preloadManager.l){A.B(3);break}return H(A,b.i.preloadManager.destroy(),3);case 3:b.i=null;case 2:if(!(b.m&&b.m.preloadPrevItem&&
c&&b.g.Ac()===Jr)){A.B(5);break}l=null;va(A,6);return H(A,b.g.ik(),8);case 8:l=A.h;xa(A,7);break;case 6:ya(A),l=null;case 7:b.i={item:c,preloadManager:l};case 5:return d.config&&(b.g.Hj(),b.g.configure(d.config)),H(A,b.g.load(h,d.startTime,d.mimeType),9);case 9:b.l=null;if(d.extraText)for(m=u(d.extraText),n=m.next();!n.done;n=m.next())q=n.value,q.mime?b.g.le(q.uri,q.language,q.kind,q.mime,q.codecs):b.g.le(q.uri,q.language,q.kind);if(d.extraThumbnail)for(r=u(d.extraThumbnail),t=r.next();!t.done;t=
r.next())v=t.value,b.g.kf(v);if(d.extraChapter)for(w=u(d.extraChapter),z=w.next();!z.done;z=w.next())y=z.value,b.g.jf(y.uri,y.language,y.mime);I(A)}})};S("shaka.queue.QueueManager",qF);qF.prototype.playItem=qF.prototype.playItem;qF.prototype.removeAllItems=qF.prototype.removeAllItems;qF.prototype.insertItems=qF.prototype.insertItems;qF.prototype.getItems=qF.prototype.getItems;qF.prototype.getCurrentItemIndex=qF.prototype.getCurrentItemIndex;qF.prototype.getCurrentItem=qF.prototype.getCurrentItem;
qF.prototype.getConfiguration=qF.prototype.getConfiguration;qF.prototype.configure=qF.prototype.configure;qF.prototype.destroy=qF.prototype.destroy;ar=function(a){return new qF(a)};function rF(){}rF.prototype.parseInit=function(){};rF.prototype.setSequenceMode=function(){};rF.prototype.setManifestType=function(){};rF.prototype.parseMedia=function(a,b){var c=null,d=[];a=ec(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=sF.exec(e))){var f=tF.exec(e[1]);f=parseInt(f[1],10)*60+parseFloat(f[2].replace(",","."));e=new He(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",rF);rF.prototype.parseMedia=rF.prototype.parseMedia;rF.prototype.setManifestType=rF.prototype.setManifestType;rF.prototype.setSequenceMode=rF.prototype.setSequenceMode;rF.prototype.parseInit=rF.prototype.parseInit;var sF=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,tF=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Gf("application/x-subtitle-lrc",function(){return new rF});function uF(){this.g="UNKNOWN"}uF.prototype.parseInit=function(){};uF.prototype.setSequenceMode=function(){};uF.prototype.setManifestType=function(a){this.g=a};
uF.prototype.parseMedia=function(a,b,c,d){var e=ec(a);a=[];if(e=="")return a;var f=ae(e,"tt",!0);if(!f)throw new V(2,2,2005,"Failed to parse TTML.");e=ke(f,"body")[0];if(!e)return[];var g=re(f,vF,"frameRate"),h=re(f,vF,"subFrameRate"),k=re(f,vF,"frameRateMultiplier"),l=re(f,vF,"tickRate"),m=re(f,vF,"cellResolution"),n=f.attributes["xml:space"]||"default",q=re(f,wF,"extent");if(n!="default"&&n!="preserve")throw new V(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new xF(g,h,k,l);m=yF(m);
h=ke(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=ke(f,"style");f=ke(f,"region");l=[];for(var r=u(f),t=r.next();!t.done;t=r.next())(t=zF(this,t.value,k,q))&&l.push(t);if(he(e,"p").length)throw new V(2,2,2001,"<p> can only be inside <div> in TTML");q=u(he(e,"div"));for(r=q.next();!r.done;r=q.next())if(he(r.value,"span").length)throw new V(2,2,2001,"<span> can only be inside <p> in TTML");if(b=AF(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
"transparent"),a.push(b);return a};
function AF(a,b,c,d,e,f,g,h,k,l,m,n,q,r){var t=m;if(fe(b)){if(!n)return null;var v={tagName:"span",children:[ie(b)],attributes:{},parent:null}}else v=b;for(var w=null,z=u(BF),y=z.next();!y.done&&!(w=CF(v,"backgroundImage",e,"#",y.value)[0]);y=z.next());z=null;y=re(v,BF,"backgroundImage");var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&A.test(y)){z=parseInt(y.split(":").pop(),10)-1;if(z>=r.length)return null;z=r[z]}else q&&y&&!y.startsWith("#")&&(A=new qb(q),y=new qb(y),(y=A.resolve(y).toString())&&
(z=y));if(b.tagName=="p"||w||z)n=!0;b=n;y=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";A=v.children.every(fe);k=[];if(!A)for(var D=u(v.children),G=D.next();!G.done;G=D.next())(G=AF(a,G.value,c,d,e,f,g,h,y,l,v,n,q,r))&&k.push(G);e=m!=null;q=ie(v);q=v.children.length&&q&&/\S/.test(q);D=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(D||q||v.tagName=="br"||k.length!=0||e&&!y))return null;r=DF(v,d);q=r.start;for(r=r.end;t&&t.tagName&&t.tagName!="tt";)r=EF(t,d,q,r),q=r.start,
r=r.end,t=t.parent;q==null&&(q=0);q+=c.periodStart;r=r==null?Infinity:r+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),r=Math.min(r,c.segmentEnd));if(!D&&k.length>0)for(q=Infinity,r=0,c=u(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),r=Math.max(r,d.endTime);if(v.tagName=="br")return a=new He(q,r,""),a.lineBreak=!0,a;c="";A&&(c=nc(ie(v)||""),y&&(c=c.replace(/\s+/g," ")));c=new He(q,r,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=CF(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var B=l.attributes["xml:id"];c.region=h.filter(function(E){return E.id==B})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=CF(m,"region",g,"")[0]);FF(a,c,v,h,w,z,f,b,k.length==0);return c}
function zF(a,b,c,d){var e=new Md,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=GF.exec(d)||HF.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=IF(a,b,c,"extent");if(h){var k=(g=GF.exec(h))||HF.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?Nd:0,e.heightUnits=g||f!=null?Nd:0)}if(a=IF(a,b,c,"origin"))if(k=(g=GF.exec(a))||HF.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=Nd,e.height=100-e.viewportAnchorY,e.heightUnits=Nd):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?Nd:0;return e}function JF(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function FF(a,b,c,d,e,f,g,h,k){h=h||k;KF(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=KF(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=Ke);(k=KF(a,c,d,g,"textAlign",!0))?(b.positionAlign=LF.get(k),b.lineAlign=MF.get(k),b.textAlign=ff[k.toUpperCase()]):b.textAlign=Je;if(k=KF(a,c,d,g,"displayAlign",!0))b.displayAlign=gf[k.toUpperCase()];if(k=KF(a,c,d,g,"color",h))b.color=JF(k);
if(k=KF(a,c,d,g,"backgroundColor",h))b.backgroundColor=JF(k);if(k=KF(a,c,d,g,"border",h))b.border=k;if(k=KF(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=KF(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=cf);k=KF(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=KF(a,c,d,g,"lineHeight",h))&&k.match(NF)&&(b.lineHeight=k);(k=KF(a,c,d,g,"fontSize",h))&&(k.match(NF)||k.match(OF))&&(b.fontSize=k);if(k=KF(a,c,d,g,"fontStyle",h))b.fontStyle=jf[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=ie(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=KF(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(NF)?b.textStrokeColor=b.color:(b.textStrokeColor=JF(e[0]),e.shift()),e[0]&&e[0].match(NF)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=KF(a,c,d,g,"letterSpacing",h))&&e.match(NF)&&(b.letterSpacing=e);(e=KF(a,c,d,g,"linePadding",h))&&e.match(NF)&&(b.linePadding=e);if(e=KF(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=IF(a,d,g,"textDecoration"))&&PF(b,e);(e=QF(a,c,
g,"textDecoration"))&&PF(b,e);if(e=KF(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(KF(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function PF(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(ef)||a.textDecoration.push(ef);break;case "noUnderline":a.textDecoration.includes(ef)&&bd(a.textDecoration,ef);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&bd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&bd(a.textDecoration,"overline")}}function KF(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=QF(a,b,d,e))?b:f?IF(a,c,d,e):null}function IF(a,b,c,d){if(!b)return null;var e=re(b,wF,d);return e?e:RF(a,b,c,d)}function QF(a,b,c,d){var e=re(b,wF,d);return e?e:RF(a,b,c,d)}
function RF(a,b,c,d){b=CF(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=qe(b[f],"urn:ebu:tt:style",d);g||(g=re(b[f],wF,d));g||(g=QF(a,b[f],c,d));g&&(e=g)}return e}function CF(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?qe(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 EF(a,b,c,d){a=DF(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function DF(a,b){var c=SF(a.attributes.begin,b),d=SF(a.attributes.end,b);a=SF(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function SF(a,b){var c=null;if(TF.test(a)){a=TF.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+d*60+c*3600}else if(UF.test(a))c=VF(UF,a);else if(WF.test(a))c=VF(WF,a);else if(XF.test(a))a=XF.exec(a),c=Number(a[1])/b.frameRate;else if(YF.test(a))a=YF.exec(a),c=Number(a[1])/b.g;else if(ZF.test(a))c=VF(ZF,a);else if(a)throw new V(2,2,2001,"Could not parse cue time range in TTML");return c}
function VF(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function yF(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",uF);uF.prototype.parseMedia=uF.prototype.parseMedia;uF.prototype.setManifestType=uF.prototype.setManifestType;uF.prototype.setSequenceMode=uF.prototype.setSequenceMode;uF.prototype.parseInit=uF.prototype.parseInit;
function xF(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var GF=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,OF=/^(\d{1,4}(?:\.\d+)?|100)%$/,NF=/^(\d+px|\d+em|\d*\.?\d+c)$/,HF=/^(\d+)px (\d+)px$/,TF=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,UF=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,WF=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,XF=/^(\d*(?:\.\d*)?)f$/,YF=/^(\d*(?:\.\d*)?)t$/,ZF=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),MF=(new Map).set("left",Ne).set("center","center").set("right",
"end").set("start",Ne).set("end","end"),LF=(new Map).set("left","line-left").set("center","center").set("right","line-right"),vF=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],wF=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],BF=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Gf("application/ttml+xml",function(){return new uF});function $F(){this.g=new uF}$F.prototype.parseInit=function(a){var b=!1;(new Bh).box("moov",Gh).box("trak",Gh).box("mdia",Gh).box("minf",Gh).box("stbl",Gh).X("stsd",Ih).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new V(2,2,2007);};$F.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};$F.prototype.setManifestType=function(a){this.g.setManifestType(a)};
$F.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new Bh).box("moof",Gh).box("traf",Gh).X("tfhd",function(z){e=Ui(z.reader,z.flags).re}).X("trun",function(z){z=Xi(z.reader,z.version,z.flags);z=u(z.ci);for(var y=z.next();!y.done;y=z.next())h.push(y.value.sampleSize||e||0)}).X("subs",function(z){for(var y=z.reader,A=y.$(),D=-1,G=0;G<A;G++){var B=y.$();D+=B;B=y.Ia();for(var E=[],C=0;C<B;C++)z.version==1?E.push(y.$()):E.push(y.Ia()),y.ba(),y.ba(),y.$();g.set(D,E)}}).box("mdat",
Lh(function(z){f.push(z)},!1)).parse(a,!1);if(f.length==0)throw new V(2,2,2007);for(var k=wc.apply(oc,x(f)),l=0,m=0;m<h.length;m++){var n=Lb(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=Lb(n,0,q[0]);for(var r=[],t=q[0],v=1;v<q.length;v++){var w=Lb(a,t,q[v]);w=pc(w);r.push("data:image/png;base64,"+w);t+=q[v]}d=d.concat(this.g.parseMedia(n,b,c,r))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};S("shaka.text.Mp4TtmlParser",$F);$F.prototype.parseMedia=$F.prototype.parseMedia;
$F.prototype.setManifestType=$F.prototype.setManifestType;$F.prototype.setSequenceMode=$F.prototype.setSequenceMode;$F.prototype.parseInit=$F.prototype.parseInit;Gf('application/mp4; codecs="stpp"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml.im1i"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml.im1t"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml.im2i"',function(){return new $F});
Gf('application/mp4; codecs="stpp.ttml.im2t"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml.etd1"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new $F});Gf('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new $F});Gf('application/mp4; codecs="stpp.TTML.im1t"',function(){return new $F});function aG(){this.g="UNKNOWN"}aG.prototype.parseInit=function(){};aG.prototype.setSequenceMode=function(){};aG.prototype.setManifestType=function(a){this.g=a};
aG.prototype.parseMedia=function(a,b){a=ec(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(this.g=="HLS"&&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=Vd(a[1]);if(a==null)throw new V(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=95443.7176888889,
d+=8589934592;a=b.periodStart+d/9E4-a}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 Pd(e);var f=new Md;Sd(e);Qd(e);for(var g=Sd(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");Qd(e);g=Sd(e)}b.push(f)}d=new Map;We(d);e=[];c=u(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=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 He(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(parseInt(r,10)>=700||r=="bold")m=
!0,l.fontWeight=cf;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Qe;break;case "italic":m=!0;l.fontStyle=df;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine=r!="noWrap"}}}m&&d.set(g,l)}}l=f;m=a;if(l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=
null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Pd(l[0]),g=Td(h),n=Rd(h,/[ \t]+--\x3e[ \t]+/g),k=Td(h),g==null||n==null||k==null)db("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;g<0&&(g=0);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 He(g,k,m);Qd(h);for(g=Sd(h);g;)bG(l,g,b),Qd(h),g=Sd(h);Ve(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function bG(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],b=="middle"?a.textAlign=Je:a.textAlign=ff[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||
b=="end"?"line-right":b=="center"||b=="middle"?"center":Ie);else if(d=/^region:(.*)$/.exec(b)){if(b=cG(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=hf[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Me,a.line=Number(c[1]),c[2]&&(a.lineAlign=hf[c[2].toUpperCase()])}function cG(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
S("shaka.text.VttTextParser",aG);aG.prototype.parseMedia=aG.prototype.parseMedia;aG.prototype.setManifestType=aG.prototype.setManifestType;aG.prototype.setSequenceMode=aG.prototype.setSequenceMode;aG.prototype.parseInit=aG.prototype.parseInit;Gf("text/vtt",function(){return new aG});Gf('text/vtt; codecs="vtt"',function(){return new aG});Gf('text/vtt; codecs="wvtt"',function(){return new aG});function dG(){this.g=null}dG.prototype.parseInit=function(a){var b=this,c=!1;(new Bh).box("moov",Gh).box("trak",Gh).box("mdia",Gh).X("mdhd",function(d){d=Wi(d.reader,d.version);b.g=d.timescale}).box("minf",Gh).box("stbl",Gh).X("stsd",Ih).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new V(2,2,2008);if(!c)throw new V(2,2,2008);};dG.prototype.setSequenceMode=function(){};dG.prototype.setManifestType=function(){};
dG.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 Bh).box("moof",Gh).box("traf",Gh).X("tfdt",function(A){g=!0;c=Vi(A.reader,A.version).baseMediaDecodeTime}).X("tfhd",function(A){l=Ui(A.reader,A.flags).qe}).X("trun",function(A){h=!0;d=Xi(A.reader,A.version,A.flags).ci}).box("mdat",Lh(function(A){k=!0;e=A},!1)).parse(a,!1);if(!k&&!g&&!h)throw new V(2,2,2008);a=c;for(var m=new yh(e,0),n=u(d),q=n.next();!q.done;q=
n.next()){q=q.value;var r=q.di||l,t=q.hg?c+q.hg:a;a=t+(r||0);var v=0;do{var w=m.$();v+=w;var z=m.$(),y=null;Fh(z)=="vttc"?w>8&&(y=m.bc(w-8,!1)):m.skip(w-8);r&&y&&(w=eG(y,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Vf)};function eG(a,b,c){var d,e,f;(new Bh).box("payl",Lh(function(g){d=ec(g)},!1)).box("iden",Lh(function(g){e=ec(g)},!1)).box("sttg",Lh(function(g){f=ec(g)},!1)).parse(a);return d?fG(d,e,f,b,c):null}
function fG(a,b,c,d,e){a=new He(d,e,a);Ve(a);b&&(a.id=b);if(c)for(b=new Pd(c),c=Sd(b);c;)bG(a,c,[]),Qd(b),c=Sd(b);return a}S("shaka.text.Mp4VttParser",dG);dG.prototype.parseMedia=dG.prototype.parseMedia;dG.prototype.setManifestType=dG.prototype.setManifestType;dG.prototype.setSequenceMode=dG.prototype.setSequenceMode;dG.prototype.parseInit=dG.prototype.parseInit;Gf('application/mp4; codecs="wvtt"',function(){return new dG});function gG(){}gG.prototype.parseInit=function(){};gG.prototype.setSequenceMode=function(){};gG.prototype.setManifestType=function(){};gG.prototype.parseMedia=function(a){var b=ec(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 Pd(c[0]),e=Td(d),f=Rd(d,/,/g);d=Td(d);if(e==null||f==null||d==null)throw new V(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new He(e,d,c.slice(1).join("\n").trim()))}return a};
S("shaka.text.SbvTextParser",gG);gG.prototype.parseMedia=gG.prototype.parseMedia;gG.prototype.setManifestType=gG.prototype.setManifestType;gG.prototype.setSequenceMode=gG.prototype.setSequenceMode;gG.prototype.parseInit=gG.prototype.parseInit;Gf("text/x-subviewer",function(){return new gG});function hG(){this.g=new aG}hG.prototype.parseInit=function(){};hG.prototype.setSequenceMode=function(){};hG.prototype.setManifestType=function(){};
hG.prototype.parseMedia=function(a,b,c){var d=ec(a);a="WEBVTT\n\n";if(d!=""){d=d.replace(/\r+/g,"");d=d.trim();d=u(d.split("\n\n"));for(var e=d.next();!e.done;e=d.next())e=e.value.split(/\n/),e[0].match(/\d+/)&&e.shift(),e[0]=e[0].replace(/,/g,"."),a+=e.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"}a=Lb(lc(a));return this.g.parseMedia(a,b,c,[])};S("shaka.text.SrtTextParser",hG);
hG.prototype.parseMedia=hG.prototype.parseMedia;hG.prototype.setManifestType=hG.prototype.setManifestType;hG.prototype.setSequenceMode=hG.prototype.setSequenceMode;hG.prototype.parseInit=hG.prototype.parseInit;Gf("text/srt",function(){return new hG});function iG(){}iG.prototype.parseInit=function(){};iG.prototype.setSequenceMode=function(){};iG.prototype.setManifestType=function(){};
iG.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=ec(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=jG.exec(f))d=f[1],e=f[2];d=="V4 Styles"||d=="V4+ Styles"?(b=e,b=c?b+("\n"+e):e):d=="Events"&&(c=c?c+("\n"+e):e)}d=[];e=null;b=u(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=kG.exec(a)))if(a=f[1].trim(),f=f[2].trim(),a=="Format")e=f.split(lG);else if(a=="Style"){a=f.split(lG);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={Yj:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=kG.exec(f)))if(f=g[1].trim(),g=g[2].trim(),f=="Format")b=g.split(lG);else if(f=="Dialogue"){g=g.split(lG);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=mG(f.Start);var k=mG(f.End);g=new He(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Yj=f.Style;(a=d.find(function(l){return function(m){return m.Name==
l.Yj}}(a)))&&nG(g,a);e.push(g)}return e};
function nG(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=oG(c))a.color=c;if(c=b.BackColour)if(c=oG(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=cf);b.Italic&&(a.fontStyle=df);b.Underline&&a.textDecoration.push(ef);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Oe;a.textAlign="start";break;case 2:a.displayAlign=Oe;a.textAlign=Je;break;case 3:a.displayAlign=Oe;a.textAlign="end";break;case 5:a.displayAlign=
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Je;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=Je;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function oG(a){a=parseInt(a.replace("&H",""),16);return a>=0?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
function mG(a){a=pG.exec(a);return(a[1]?parseInt(a[1].replace(":",""),10):0)*3600+parseInt(a[2],10)*60+parseFloat(a[3])}S("shaka.text.SsaTextParser",iG);iG.prototype.parseMedia=iG.prototype.parseMedia;iG.prototype.setManifestType=iG.prototype.setManifestType;iG.prototype.setSequenceMode=iG.prototype.setSequenceMode;iG.prototype.parseInit=iG.prototype.parseInit;var jG=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,kG=/^\s*([^:]+):\s*(.*)/,lG=/\s*,\s*/,pG=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
Gf("text/x-ssa",function(){return new iG});function qG(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,a>0)?{ye:c,za:a}:null}function rG(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 sG(a,b){if(b+1<a.length&&a[b]===255&&(a[b+1]&246)===240){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&a[b]===255&&(a[b+1]&246)===240}return!1}
function tG(a,b){switch(a){case "mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2||b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function uG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=uG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?Ri(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Df(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Lb(a),f=mk(e),g=f.length;g<e.length&&!sG(e,g);g++);a=c.endTime*1E3;f=lk(f);f.length&&c&&(f=f.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=f.data);f=rG(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=qG(e,g);if(!k)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));var l=k.ye+k.za;g+l<=e.length&&
h.push({data:e.subarray(g+k.ye,g+l),size:k.za,duration:1024,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Eb:h},stream:b};d=new cj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=dj(d),this.g.set(c,b));c=this.i!==b;d=yj(d);this.i=b;this.h++;
return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.AacTransmuxer",uG);uG.prototype.transmux=uG.prototype.transmux;uG.prototype.getOriginalMimeType=uG.prototype.getOriginalMimeType;uG.prototype.convertCodecs=uG.prototype.convertCodecs;uG.prototype.isSupported=uG.prototype.isSupported;uG.prototype.destroy=uG.prototype.destroy;lf("audio/aac",function(){return new uG("audio/aac")},rf);function vG(a,b){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return null;var c=a[b+4]>>6;if(c>=3)return null;var d=a[b+4]&63,e=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][d*3+c]*2;if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;f===2?g+=2:(f&1&&f!==1&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Ma:a,za:e}}
function wG(a,b){if(a[b]===11&&a[b+1]===119){var c=0,d=5;b+=d;for(var e,f;d>0;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(c<16)return!0}return!1};function xG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=xG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?Ri(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?$b().Le()?'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=Lb(a);for(var e=mk(a),f=e.length;f<a.length&&!wG(a,f);f++);var g=c.endTime*1E3;e=lk(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=vG(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.Ma;k.push({data:a.subarray(f,f+l.za),size:l.za,duration:1536,
Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});f+=l.za}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Gb:[],Ma:h,Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Eb:k},stream:b};d=new cj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=dj(d),this.g.set(c,b));c=this.i!==b;d=yj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Ac3Transmuxer",xG);
xG.prototype.transmux=xG.prototype.transmux;xG.prototype.getOriginalMimeType=xG.prototype.getOriginalMimeType;xG.prototype.convertCodecs=xG.prototype.convertCodecs;xG.prototype.isSupported=xG.prototype.isSupported;xG.prototype.destroy=xG.prototype.destroy;lf("audio/ac3",function(){return new xG("audio/ac3")},rf);function yG(a,b){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return null;var c=new ok(a.subarray(b+2));qk(c,2);qk(c,3);var d=rk(c,11)+1<<1,e=rk(c,2);if(e==3){e=rk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=rk(c,2);var g=rk(c,3),h=rk(c,1);c=rk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/([1,2,3,6][f]*16));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Ma:a,za:d}};function zG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=zG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?Ri(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Lb(a);for(var e=mk(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);var g=c.endTime*1E3;e=lk(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=yG(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.Ma;k.push({data:a.subarray(f,f+l.za),
size:l.za,duration:1536,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});f+=l.za}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Gb:[],Ma:h,Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Eb:k},stream:b};d=new cj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=dj(d),this.g.set(c,b));c=this.i!==b;d=yj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};
S("shaka.transmuxer.Ec3Transmuxer",zG);zG.prototype.transmux=zG.prototype.transmux;zG.prototype.getOriginalMimeType=zG.prototype.getOriginalMimeType;zG.prototype.convertCodecs=zG.prototype.convertCodecs;zG.prototype.isSupported=zG.prototype.isSupported;zG.prototype.destroy=zG.prototype.destroy;lf("audio/ec3",function(){return new zG("audio/ec3")},rf);function AG(a){if(!a.length)return null;var b=a.find(function(v){return v.type==7});a=a.find(function(v){return v.type==8});if(!b||!a)return null;var c=new ok(b.data),d=xk(c);xk(c);xk(c);tk(c);if(BG.includes(d)&&(d=uk(c),d===3&&qk(c,1),tk(c),tk(c),qk(c,1),wk(c))){d=d!==3?8:12;for(var e=0;e<d;e++)wk(c)&&(e<6?yk(c,16):yk(c,64))}tk(c);d=uk(c);if(d===0)uk(c);else if(d===1)for(qk(c,1),tk(c),tk(c),d=uk(c),e=0;e<d;e++)tk(c);tk(c);qk(c,1);var f=uk(c),g=uk(c),h=rk(c,1);h===0&&qk(c,1);qk(c,1);var k=0,l=0,m=
0,n=0;wk(c)&&(k=uk(c),l=uk(c),m=uk(c),n=uk(c));e=d=1;if(wk(c)&&wk(c)){var q=xk(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];q>0&&q<=16?(d=r[q-1],e=t[q-1]):q===255&&(d=rk(c,16),e=rk(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,
k[3],k[4],k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ya:a,fb:d,gb:e}}
function CG(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=[],v=u(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var z=w.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;t.push(y);t.push(w.fullData)}e.data=wc.apply(oc,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&&r.length>4&&(r=zk(new ok(r)),r===2||r===4||r===7||r===9)&&(q=!0);q&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=q;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
return d}var BG=[100,110,122,244,44,83,86,118,128,138,139,134];function DG(a){if(!a.length)return null;var b=a.find(function(g){return g.type==32}),c=a.find(function(g){return g.type==33}),d=a.find(function(g){return g.type==34});if(!b||!c||!d)return null;var e=EG(b.fullData);a=FG(c.fullData);var f=GG(d.fullData);b=HG(b.fullData,c.fullData,d.fullData,{Qh:e.Qh,xi:e.xi,qh:a.qh,rh:a.rh,jh:a.jh,ph:a.ph,kh:a.kh,mh:a.mh,nh:a.nh,oh:a.oh,dh:a.dh,eh:a.eh,fh:a.fh,gh:a.gh,hh:a.hh,ih:a.ih,Sf:a.Sf,Sg:a.Sg,Og:a.Og,Ng:a.Ng,Sh:f.Sh,bh:a.bh,ah:a.ah});return{height:a.height,width:a.width,
Ya:b,fb:a.qm,gb:a.pm}}function EG(a){var b=new ok(a,!0);xk(b);xk(b);rk(b,4);rk(b,2);rk(b,6);a=rk(b,3);b=wk(b);return{Qh:a+1,xi:b}}
function FG(a){a=new ok(a,!0);xk(a);xk(a);var b=0,c=0,d=0,e=0;rk(a,4);var f=rk(a,3);wk(a);for(var g=rk(a,2),h=rk(a,1),k=rk(a,5),l=xk(a),m=xk(a),n=xk(a),q=xk(a),r=xk(a),t=xk(a),v=xk(a),w=xk(a),z=xk(a),y=xk(a),A=xk(a),D=[],G=[],B=0;B<f;B++)D.push(wk(a)),G.push(wk(a));if(f>0)for(B=f;B<8;B++)rk(a,2);for(B=0;B<f;B++)D[B]&&rk(a,88),G[B]&&xk(a);uk(a);D=uk(a);D==3&&rk(a,1);G=uk(a);B=uk(a);wk(a)&&(b+=uk(a),c+=uk(a),d+=uk(a),e+=uk(a));var E=uk(a),C=uk(a),K=uk(a);if(wk(a))for(var F=0;F<=f;F++)uk(a),uk(a),uk(a);
else uk(a),uk(a),uk(a);uk(a);uk(a);uk(a);uk(a);uk(a);uk(a);if(wk(a)&&wk(a))for(F=0;F<4;F++)for(var J=0;J<(F===3?2:6);J++)if(wk(a)){var L=Math.min(64,1<<4+(F<<1));F>1&&vk(a);for(var P=0;P<L;P++)vk(a)}else uk(a);wk(a);wk(a);wk(a)&&(xk(a),uk(a),uk(a),wk(a));F=uk(a);for(L=J=0;L<F;L++)if(P=!1,L!==0&&(P=wk(a)),P){L===F&&uk(a);wk(a);uk(a);for(var Q=P=0;Q<=J;Q++){var N=wk(a),M=!1;N||(M=wk(a));(N||M)&&P++}J=P}else{Q=uk(a);P=uk(a);J=Q+P;for(N=0;N<Q;N++)uk(a),wk(a);for(Q=0;Q<P;Q++)uk(a),wk(a)}if(wk(a))for(F=
uk(a),J=0;J<F;J++){for(L=0;L<K+4;L++)rk(a,1);rk(a,1)}F=K=1;J=!0;L=1;Q=P=0;wk(a);wk(a);if(wk(a)){if(wk(a)){N=xk(a);M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var R=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];N>0&&N<=16?(K=M[N-1],F=R[N-1]):N===255&&(K=rk(a,16),F=rk(a,16))}wk(a)&&wk(a);wk(a)&&(rk(a,3),wk(a),wk(a)&&(xk(a),xk(a),xk(a)));wk(a)&&(uk(a),uk(a));wk(a);wk(a);wk(a);if(N=wk(a))tk(a),tk(a),tk(a),tk(a);if(wk(a)&&(L=rk(a,32),P=rk(a,32),wk(a)&&uk(a),wk(a))){R=!1;N=wk(a);M=wk(a);if(N||M){if(R=
wk(a))xk(a),rk(a,5),wk(a),rk(a,5);rk(a,4);rk(a,4);R&&rk(a,4);rk(a,5);rk(a,5);rk(a,5)}for(var U=0;U<=f;U++){J=wk(a);var ra=!0,ba=1;J||(ra=wk(a));var Ia=!1;ra?uk(a):Ia=wk(a);Ia||(ba=uk(a)+1);if(N){for(ra=0;ra<ba;ra++)uk(a),uk(a),R&&(uk(a),uk(a));wk(a)}if(M){for(ra=0;ra<ba;ra++)uk(a),uk(a),R&&(uk(a),uk(a));wk(a)}}}wk(a)&&(wk(a),wk(a),wk(a),Q=uk(a),uk(a),uk(a),uk(a),uk(a))}return{jh:A,qh:g,rh:h,ph:k,kh:l,mh:m,nh:n,oh:q,dh:r,eh:t,fh:v,gh:w,hh:z,ih:y,Sf:Q,Sg:D,Og:E,Ng:C,width:G-(b+c)*(D===1||D===2?2:1),
height:B-(d+e)*(D===1?2:1),qm:K,pm:F,bh:P/L,ah:J}}function GG(a){var b=new ok(a,!0);xk(b);xk(b);uk(b);uk(b);wk(b);wk(b);rk(b,3);wk(b);wk(b);uk(b);uk(b);vk(b);wk(b);wk(b);wk(b)&&uk(b);vk(b);vk(b);wk(b);wk(b);wk(b);wk(b);a=wk(b);b=wk(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Sh:c}}
function HG(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.qh&3)<<6|(d.rh?1:0)<<5|d.ph&31;e[2]=d.kh;e[3]=d.mh;e[4]=d.nh;e[5]=d.oh;e[6]=d.dh;e[7]=d.eh;e[8]=d.fh;e[9]=d.gh;e[10]=d.hh;e[11]=d.ih;e[12]=d.jh;e[13]=240|(d.Sf&3840)>>8;e[14]=d.Sf&255;e[15]=252|d.Sh&3;e[16]=252|d.Sg&3;e[17]=248|d.Og&7;e[18]=248|d.Ng&7;e[19]=0;e[20]=parseInt(d.bh,10);e[21]=((d.ah?1:0)&3)<<6|(d.Qh&7)<<3|(d.xi?1:0)<<2|3;e[22]=3;a=[a,b,c];b=23;c=a.length-1;for(d=0;d<a.length;d+=
1)e.set(new Uint8Array([32+d|(d===c?128:0),0,1]),b),b+=3,e.set(new Uint8Array([a[d].byteLength>>8,a[d].byteLength&255]),b),b+=2,e.set(a[d],b),b+=a[d].byteLength;return e};function IG(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(c!==1&&e!==0&&e!==15&&f!==3){var g=a[b+3]>>6;e=JG[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=KG[(c===3?0:c===2?1:2)*3+f];c=LG[c][d];var h=MG[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&l<=87&&d===2&&e>=224E3&&g===0&&(a[b+3]|=128);return{sampleRate:f,channelCount:g===3?1:2,za:k,om:c*8*h}}return null}
function NG(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function OG(a,b){if(b+1<a.length&&NG(a,b)){var c=IG(a,b),d=4;c&&c.za&&(d=c.za);b+=d;return b===a.length||b+1<a.length&&NG(a,b)}return!1}
var JG=[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],KG=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],LG=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],MG=[0,1,1,4];function PG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=PG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?Ri(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Lb(a),f=mk(e).length;f<e.length&&!OG(e,f);f++);var g;for(a=[];f<e.length;){var h=IG(e,f);if(!h)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));g||(g=h);f+h.za<=e.length&&a.push({data:e.subarray(f,f+h.za),size:h.za,duration:1152,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});f+=h.za}if(!g)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));e=g.om*9E4/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:g.sampleRate,
duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,Eb:a},stream:b};d=new cj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=dj(d),this.g.set(c,b));c=this.i!==b;d=yj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Mp3Transmuxer",PG);PG.prototype.transmux=PG.prototype.transmux;PG.prototype.getOriginalMimeType=PG.prototype.getOriginalMimeType;PG.prototype.convertCodecs=PG.prototype.convertCodecs;
PG.prototype.isSupported=PG.prototype.isSupported;PG.prototype.destroy=PG.prototype.destroy;lf("audio/mpeg",function(){return new PG("audio/mpeg")},rf);function QG(a){this.h=a;this.g=null}p=QG.prototype;p.destroy=function(){};p.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=Df(a).split(","),c=Cc("audio",b);b=Cc("video",b);return!c||b||yf(c)!="mp3"?!1:Ri(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Ak;this.g.lg(c.i);a=Lb(a);a=this.g.parse(a);if(a.se().audio!="mp3"||e!="audio")return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));c=new Uint8Array([]);e=u(a.Bb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=IG(a,b))?(b+d.za<=a.length&&(c=wc(c,a.subarray(b,b+d.za))),b+=d.za):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",QG);QG.prototype.transmux=QG.prototype.transmux;
QG.prototype.getOriginalMimeType=QG.prototype.getOriginalMimeType;QG.prototype.convertCodecs=QG.prototype.convertCodecs;QG.prototype.isSupported=QG.prototype.isSupported;QG.prototype.destroy=QG.prototype.destroy;lf("video/mp2t",function(){return new QG("video/mp2t")},qf);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function RG(a){this.h=a;(this.g=ry.get("ISOBoxer")())&&SG(this)}
function SG(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;d<16;d++)this.usertype[d]!==TG[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=RG.prototype;p.destroy=function(){};
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Ri(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ri(b)||Ri(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(Lb(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");g===null&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(n!==null){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(q===null){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var v=e.fetch("saio");v!==null&&(v.offset[0]=UG(t,"traf")+UG(h,"senc")+16);var w=Lb(e.write());return Promise.resolve(w)}catch(z){return z instanceof V?Promise.reject(z):Promise.reject(new V(2,3,3022,c?c.S()[0]:null))}};function UG(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",RG);RG.prototype.transmux=RG.prototype.transmux;
RG.prototype.getOriginalMimeType=RG.prototype.getOriginalMimeType;RG.prototype.convertCodecs=RG.prototype.convertCodecs;RG.prototype.isSupported=RG.prototype.isSupported;RG.prototype.destroy=RG.prototype.destroy;var TG=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);lf("mss/audio/mp4",function(){return new RG("mss/audio/mp4")},rf);lf("mss/video/mp4",function(){return new RG("mss/video/mp4")},rf);function VG(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=VG.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
p.isSupported=function(a,b){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Df(c).split(",");c=Cc("audio",d);d=Cc("video",d);if(c&&(c=yf(c),!WG.includes(c))||d&&(c=yf(d),!XG.includes(c)))return!1;if(b)return Ri(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ri(b)||Ri(a)};
p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?(b=Df(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return ng(c,"audio/mp4")}).map(og).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
p.transmux=function(a,b,c,d,e){var f=Lb(a);if(e=="audio"&&!Ik(f)){for(var g=mk(f),h=g.length;h<f.length;h++)if(OG(f,h))return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(sG(f,h))return this.i||(this.i=new uG("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new V(2,3,3018,c?c.S()[0]:null))}this.h?this.h.clearData():this.h=new Ak;this.h.lg(c.i);var k=this.h.parse(f),l=[],m=k.se();try{var n=null;if(e=="video"){switch(m.video){case "avc":var q=[],r=null,
t=k.Kd(),v=CG(t);if(!v.length)throw new V(2,3,3023,c?c.S()[0]:null);for(var w=0;w<v.length;w++){var z=v[w];r==null&&(r=z.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(z.dts||0):v.length>1?(z.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;q.push({data:z.data,size:z.data.byteLength,duration:y,Ab:Math.round((z.pts||0)-(z.dts||0)),flags:{Cb:0,ub:0,sb:0,qb:0,rb:z.isKeyframe?2:1,Db:z.isKeyframe?0:1}})}for(var A=[],D=u(t),G=D.next();!G.done;G=D.next())A.push.apply(A,x(G.value.nalus));var B=AG(A);
if(!B||r==null)throw new V(2,3,3018,c?c.S()[0]:null);b.height=B.height;b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:B.Ya,fb:B.fb,gb:B.gb,data:{sequenceNumber:this.g,baseMediaDecodeTime:r,Eb:q},stream:b};break;case "hvc":var E=[],C=null,K=[],F=k.Kd();if(!F.length)throw new V(2,3,3023,c?c.S()[0]:null);for(var J=0;J<F.length;J++){var L=F[J],P=L.nalus;K.push.apply(K,x(P));for(var Q=!1,N=[],M=!1,
R=u(P),U=R.next();!U.done;U=R.next()){var ra=U.value;switch(ra.type){case 1:case 0:var ba=M=!0;break;case 19:case 20:case 21:Q=ba=M=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:M=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(M&&ba){var Ia=ra.fullData.byteLength,Ea=new Uint8Array(4);Ea[0]=Ia>>24&255;Ea[1]=Ia>>16&255;Ea[2]=Ia>>8&255;Ea[3]=Ia&255;N.push(Ea);N.push(ra.fullData)}}var Ca=N.length?{data:wc.apply(oc,x(N)),isKeyframe:Q}:null;if(Ca){C==null&&L.dts!=
null&&(C=L.dts);var Ja=void 0;Ja=J+1<F.length?(F[J+1].dts||0)-(L.dts||0):F.length>1?(L.dts||0)-(F[J-1].dts||0):(c.endTime-c.startTime)*9E4;E.push({data:Ca.data,size:Ca.data.byteLength,duration:Ja,Ab:Math.round((L.pts||0)-(L.dts||0)),flags:{Cb:0,ub:0,sb:0,qb:0,rb:Ca.isKeyframe?2:1,Db:Ca.isKeyframe?0:1}})}}var Da=DG(K);if(!Da||C==null)throw new V(2,3,3018,c?c.S()[0]:null);b.height=Da.height;b.width=Da.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,
duration:d,Gb:[],Ma:new Uint8Array([]),Ya:Da.Ya,fb:Da.fb,gb:Da.gb,data:{sequenceNumber:this.g,baseMediaDecodeTime:C,Eb:E},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var Qa=[],za,La=null,Ba=null,Fa=null,wb=u(k.Bb()),Bb=wb.next();!Bb.done;Bb=wb.next()){var Gc=Bb.value,sc=Gc.data;if(sc){var Bc=0;if(Ba==-1&&Fa)sc=wc(Fa,Gc.data),Ba=null;else if(Ba!=null&&Fa){Bc=Math.max(0,Ba);var Eg=wc(Fa,sc.subarray(0,Bc));Qa.push({data:Eg,size:Eg.byteLength,duration:1024,Ab:0,flags:{Cb:0,
ub:0,sb:0,qb:0,rb:2,Db:0}});Ba=Fa=null}za=rG(sc,Bc);if(!za)throw new V(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=za.sampleRate;b.channelsCount=za.channelCount;La==null&&Gc.pts!==null&&(La=Gc.pts);for(;Bc<sc.length;){var Fd=qG(sc,Bc);if(!Fd){Fa=sc.subarray(Bc,sc.length);Ba=-1;break}var Gd=Fd.ye+Fd.za;Ba=Math.max(0,Bc+Gd-sc.length);Ba!=0?Fa=sc.subarray(Bc+Fd.ye,Bc+Gd):Bc+Gd<=sc.length&&Qa.push({data:sc.subarray(Bc+Fd.ye,Bc+Gd),size:Fd.za,duration:1024,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});
Bc+=Gd}}}if(!za||La==null){La=c.startTime*9E4;var Fg=Cc("audio",b.codecs.split(","));if(!Fg||!b.channelsCount||!b.audioSamplingRate)throw new V(2,3,3018,c?c.S()[0]:null);za={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Fg};var Hd=tG(Fg,b.channelsCount);if(!Hd)throw new V(2,3,3018,c?c.S()[0]:null);for(var Uk=La+(c.endTime-c.startTime)*9E4,li=La;li<Uk;)Qa.push({data:Hd,size:Hd.byteLength,duration:1024,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),li+=1024/za.sampleRate*9E4}var mi=
za.sampleRate,td=La/9E4*mi;n={id:b.id,type:"audio",codecs:za.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:mi,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:td,Eb:Qa},stream:b};break;case "ac3":for(var Vk=[],Gg=0,ni=new Uint8Array([]),Hg=null,Wk=u(k.Bb()),Cb=Wk.next();!Cb.done;Cb=Wk.next()){var tc=Cb.value,ic=tc.data;Hg==null&&tc.pts!==null&&(Hg=tc.pts);for(var Ng=0;Ng<ic.length;){var Se=vG(ic,Ng);Se?(b.audioSamplingRate=
Se.sampleRate,b.channelsCount=Se.channelCount,Gg=Se.sampleRate,ni=Se.Ma,Vk.push({data:ic.subarray(Ng,Ng+Se.za),size:Se.za,duration:1536,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),Ng+=Se.za):Ng++}}if(Gg==0||ni.byteLength==0||Hg==null)throw new V(2,3,3018,c?c.S()[0]:null);var OK=Hg/9E4*Gg;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:Gg,duration:d,Gb:[],Ma:ni,Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:OK,Eb:Vk},stream:b};
break;case "ec3":for(var mA=[],Gl=0,lq=new Uint8Array([]),Hl=null,nA=u(k.Bb()),mq=nA.next();!mq.done;mq=nA.next()){var nq=mq.value,oq=nq.data;Hl==null&&nq.pts!==null&&(Hl=nq.pts);for(var Og=0;Og<oq.length;){var Te=yG(oq,Og);Te?(b.audioSamplingRate=Te.sampleRate,b.channelsCount=Te.channelCount,Gl=Te.sampleRate,lq=Te.Ma,mA.push({data:oq.subarray(Og,Og+Te.za),size:Te.za,duration:1536,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),Og+=Te.za):Og++}}if(Gl==0||lq.byteLength==0||Hl==null)throw new V(2,3,3018,
c?c.S()[0]:null);var PK=Hl/9E4*Gl;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:Gl,duration:d,Gb:[],Ma:lq,Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:PK,Eb:mA},stream:b};break;case "mp3":for(var oA=[],Il,Jl=null,pA=u(k.Bb()),pq=pA.next();!pq.done;pq=pA.next()){var qq=pq.value,zi=qq.data;if(zi){Jl==null&&qq.pts!==null&&(Jl=qq.pts);for(var Af=0;Af<zi.length;){var Pg=IG(zi,Af);Pg?(Il||(Il=Pg),Af+Pg.za<=zi.length&&oA.push({data:zi.subarray(Af,
Af+Pg.za),size:Pg.za,duration:1152,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}}),Af+=Pg.za):Af++}}}if(!Il||Jl==null)throw new V(2,3,3018,c?c.S()[0]:null);var qA=Il.sampleRate,QK=Jl/9E4*qA;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:qA,duration:d,Gb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:QK,Eb:oA},stream:b};break;case "opus":var rA=[],Kl=null,Jd=k.H;if(!Jd)throw new V(2,3,3018,c?c.S()[0]:
null);var kc=[];switch(Jd.xk){case 1:case 2:kc=[0];break;case 0:kc=[255,1,1,0,1];break;case 128:kc=[255,2,0,0,1];break;case 3:kc=[1,2,1,0,2,1];break;case 4:kc=[1,2,2,0,1,2,3];break;case 5:kc=[1,3,2,0,4,1,2,3];break;case 6:kc=[1,4,2,0,4,1,2,3,5];break;case 7:kc=[1,4,2,0,4,1,2,3,5,6];break;case 8:kc=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:kc=[1,1,2,0,1];break;case 131:kc=[1,1,3,0,1,2];break;case 132:kc=[1,1,4,0,1,2,3];break;case 133:kc=[1,1,5,0,1,2,3,4];break;case 134:kc=[1,1,6,0,1,2,3,4,5];break;case 135:kc=
[1,1,7,0,1,2,3,4,5,6];break;case 136:kc=[1,1,8,0,1,2,3,4,5,6,7]}var sA=new Uint8Array([0,Jd.channelCount,0,0,Jd.sampleRate>>>24&255,Jd.sampleRate>>>17&255,Jd.sampleRate>>>8&255,Jd.sampleRate>>>0&255,0,0].concat(x(kc)));for(var tA=Jd.sampleRate,uA=u(k.Bb()),rq=uA.next();!rq.done;rq=uA.next()){var sq=rq.value,Qg=sq.data;Kl==null&&sq.pts!==null&&(Kl=sq.pts);for(var Ai=0;Ai<Qg.length;){for(var RK=(Qg[Ai+1]&16)!==0,SK=(Qg[Ai+1]&8)!==0,pe=Ai+2,Ll=0;Qg[pe]===255;)Ll+=255,pe+=1;Ll+=Qg[pe];pe+=1;pe+=RK?2:
0;pe+=SK?2:0;var vA=Qg.slice(pe,pe+Ll);rA.push({data:vA,size:vA.byteLength,duration:960,Ab:0,flags:{Cb:0,ub:0,sb:0,qb:0,rb:2,Db:0}});Ai=pe+Ll}}if(sA.byteLength==0||Kl==null)throw new V(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Jd.sampleRate;b.channelsCount=Jd.channelCount;var TK=Kl/9E4*tA;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:tA,duration:d,Gb:[],Ma:sA,Ya:new Uint8Array([]),fb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:TK,Eb:rA},
stream:b}}n&&(l.push(n),n=null)}}catch(tq){return tq&&tq.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(tq)}if(!l.length)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));var wA=new cj(l),uq=b.id+"_"+c.i;if(this.j.has(uq))var Bi=this.j.get(uq);else Bi=dj(wA),this.j.set(uq,Bi);var UK=this.l!==Bi,VK=yj(wA);this.l=Bi;this.g++;return Promise.resolve({data:VK,init:UK?Bi:null})};S("shaka.transmuxer.TsTransmuxer",VG);VG.prototype.transmux=VG.prototype.transmux;
VG.prototype.getOriginalMimeType=VG.prototype.getOriginalMimeType;VG.prototype.convertCodecs=VG.prototype.convertCodecs;VG.prototype.isSupported=VG.prototype.isSupported;VG.prototype.destroy=VG.prototype.destroy;var WG=["aac","ac-3","ec-3","mp3","opus"],XG=["avc","hevc"];lf("video/mp2t",function(){return new VG("video/mp2t")},pf);function YG(){}pa(YG,Un);S("shaka.util.FairPlayUtils",YG);function ZG(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new ed;this.localization=this.controls.ya;this.player=this.controls.Xb();this.video=this.controls.Wc();this.adManager=this.player.xf();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})}
ZG.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",ZG);ZG.prototype.release=ZG.prototype.release;function $G(a,b){this.parent=a;this.g=Xj("svg");this.h=Xj("path");this.g.classList.add("material-svg-icon");this.g.setAttribute("viewBox","0 -960 960 960");b&&this.use(b);this.g.appendChild(this.h);this.parent&&a.appendChild(this.g)}$G.prototype.use=function(a){a&&typeof a=="string"&&this.h.setAttribute("d",a)};$G.prototype.ql=function(){return this.g};S("shaka.ui.MaterialSVGIcon",$G);$G.prototype.getSvgElement=$G.prototype.ql;$G.prototype.use=$G.prototype.use;function aH(a){return bH(a,"shaka-back-to-overflow-button")}function bH(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function cH(a){a&&(a=bH(a,"shaka-chosen-item"))&&a.parentElement.focus()}function dH(){var a=(new $G(null,"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z")).g;a.classList.add("shaka-chosen-item");a.ariaHidden="true";return a}
function eH(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}function fH(a,b){var c=Math.floor(a/86400),d=Math.floor(a%86400/3600),e=Math.floor(a/60%60);a=Math.floor(a%60);a<10&&(a="0"+a);a=e+":"+a;b&&(e<10&&(a="0"+a),a=d+":"+a,c>0&&(d<10&&(a="0"+a),a=c+":"+a));return a};function gH(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-ad-info");this.g.disabled=!0;this.parent.appendChild(this.g);this.h=new Sf(function(){if(c.ad.isLinear()){var d="",e=c.ad.getSequenceLength();e>1&&(d=c.ad.getPositionInSequence(),d=c.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(d)).replace("[NUM_ADS]",String(e)));var f=Math.round(c.ad.getRemainingTime()),g=c.ad.getDuration();f!=-1&&g!=-1&&isFinite(f)&&isFinite(g)?f>0?(f=fH(g-f,!1)+" / "+fH(g,!1),
d=e>1?d+("\u00a0\u00a0"+f):c.localization.resolve("AD_TIME").replace("[AD_TIME]",f),c.g.textContent=d,eH(c.g,d!="")):(c.h.stop(),c.g.textContent=""):(c.g.textContent=d,eH(c.g,d!=""))}});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.h.Ka();c.h.xa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.h.stop();c.g.textContent=""});this.ad&&
(this.h.Ka(),this.h.xa(.5))}pa(gH,ZG);gH.prototype.release=function(){this.h.stop();this.h=null;ZG.prototype.release.call(this)};S("shaka.ui.AdInfo",gH);function hH(a,b){ZG.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.i;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";eH(c.g,!0)}else eH(c.g,
!1)});this.eventManager.o(window,"click",function(){eH(c.g,!1)});this.eventManager.o(this.g,"click",function(){eH(c.g,!1)});iH(this)}pa(hH,ZG);hH.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=[];ZG.prototype.release.call(this)};hH.prototype.Ui=function(){eH(this.g,!1)};function jH(a,b){kH.set(a,b)}
function iH(a){for(var b=u(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=kH.get(c);d?a.i.push(d.create(a.g,a.controls)):db("Unrecognized context menu element:",c)}}S("shaka.ui.ContextMenu",hH);hH.registerElement=jH;hH.prototype.closeMenu=hH.prototype.Ui;var kH=new Map;function lH(a,b){ZG.call(this,a,b);var c=this;this.button=Yj();this.parent.appendChild(this.button);this.h=new $G(this.button);this.eventManager.o(this.localization,"locale-updated",function(){mH(c)});this.eventManager.o(this.localization,"locale-changed",function(){mH(c)});this.eventManager.o(this.video,"play",function(){mH(c);c.g()});this.eventManager.o(this.video,"pause",function(){mH(c);c.g()});this.eventManager.o(this.video,"seeking",function(){mH(c);c.g()});this.eventManager.o(this.player,"loaded",
function(){mH(c);c.g()});this.eventManager.o(this.adManager,"ad-paused",function(){mH(c);c.g()});this.eventManager.o(this.adManager,"ad-resumed",function(){mH(c);c.g()});this.eventManager.o(this.adManager,"ad-started",function(){mH(c);c.g()});this.eventManager.o(this.adManager,"ad-stopped",function(){mH(c);c.g()});this.eventManager.o(this.button,"click",function(){c.controls.Ca()&&nH(c.controls)});mH(this);this.g()}pa(lH,ZG);
lH.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.C.paused&&!a.V;return a};lH.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.player?this.player.isEnded():!0};function mH(a){if(a.isEnded()&&a.video.duration)a.button.ariaLabel=a.localization.resolve("REPLAY");else{var b=a.isPaused()?"PLAY":"PAUSE";a.button.ariaLabel=a.localization.resolve(b)}}
lH.prototype.g=function(){this.isEnded()&&this.video.duration?this.h.use("M480-80q-75 0-140.5-28.5t-114-77q-48.5-48.5-77-114T120-440q0-17 11.5-28.5T160-480q17 0 28.5 11.5T200-440q0 117 81.5 198.5T480-160q117 0 198.5-81.5T760-440q0-117-81.5-198.5T480-720h-6l34 34q12 12 11.5 28T508-630q-12 12-28.5 12.5T451-629L348-732q-12-12-12-28t12-28l103-103q12-12 28.5-11.5T508-890q11 12 11.5 28T508-834l-34 34h6q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-440q0 75-28.5 140.5t-77 114q-48.5 48.5-114 77T480-80Z"):this.h.use(this.isPaused()?
"M320-273v-414q0-17 12-28.5t28-11.5q5 0 10.5 1.5T381-721l326 207q9 6 13.5 15t4.5 19q0 10-4.5 19T707-446L381-239q-5 3-10.5 4.5T360-233q-16 0-28-11.5T320-273Z":"M640-200q-33 0-56.5-23.5T560-280v-400q0-33 23.5-56.5T640-760q33 0 56.5 23.5T720-680v400q0 33-23.5 56.5T640-200Zm-320 0q-33 0-56.5-23.5T240-280v-400q0-33 23.5-56.5T320-760q33 0 56.5 23.5T400-680v400q0 33-23.5 56.5T320-200Z")};S("shaka.ui.PlayButton",lH);function oH(a,b){lH.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation")}pa(oH,lH);oH.prototype.g=function(){this.isEnded()&&this.video.duration?this.button.setAttribute("icon","replay"):this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};S("shaka.ui.BigPlayButton",oH);function pH(a,b){ZG.call(this,a,b);var c=this;this.m=null;this.i=this.D=!1;this.C=this.A=null;this.j=new Sf(function(){parseInt(c.h.textContent,10)===0&&qH(c.controls,!0);var d=parseInt(c.h.textContent,10);d!==0&&(c.video.currentTime=c.controls.wh()+d);c.g.style.opacity="0";c.D=!1;c.h.textContent="0s"});this.g=W("div");this.g.classList.add("shaka-no-propagation");this.parent.appendChild(this.g);this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.u=new $G(this.g);this.u.g.classList.add("shaka-forward-rewind-container-icon");
this.l=!1;this.eventManager.o(this.g,"touchstart",function(d){d.touches.length>0&&(c.A=d.touches[0].clientX,c.C=d.touches[0].clientY);c.i=!1});this.eventManager.o(this.g,"touchmove",function(d){if(d.touches.length>0&&c.A!=null&&c.C!=null){var e=d.touches[0].clientX-c.A;d=d.touches[0].clientY-c.C;Math.sqrt(e*e+d*d)>10&&(c.i=!0)}});this.eventManager.o(this.g,"touchend",function(d){if(!c.i)if(c.controls.Nc())d.preventDefault(),c.controls.Xc();else if(c.controls.g.tapSeekDistance>0&&(!c.ad||!c.ad.isLinear()))if(d.preventDefault(),
d=c.controls.g.tapSeekDistance,!c.D)c.D=!0,c.m=Date.now(),c.j.Y(.5);else if(c.m+500>Date.now()){c.j.stop();c.m=Date.now();var e=parseInt(c.h.textContent,10);e=c.l?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.j.Y(.5)}})}pa(pH,ZG);S("shaka.ui.HiddenSeekButton",pH);function rH(a,b){pH.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.u.use("M100-315v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T428-480q0 10-4.5 18.5T410-447L162-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Zm400 0v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T828-480q0 10-4.5 18.5T810-447L562-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z");this.l=!1}pa(rH,pH);S("shaka.ui.HiddenFastForwardButton",rH);function sH(a,b){pH.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.u.use("M798-281 550-447q-9-6-13.5-14.5T532-480q0-10 4.5-18.5T550-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Zm-400 0L150-447q-9-6-13.5-14.5T132-480q0-10 4.5-18.5T150-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z");this.l=!0}pa(sH,pH);S("shaka.ui.HiddenRewindButton",sH);function tH(a,b,c,d){ZG.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.i=!1;this.bar=document.createElement("input");this.G=new Sf(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.Ca();this.container.appendChild(this.bar);this.parent.appendChild(this.container);this.L=new Sf(function(){e.bar.disabled=!1});this.eventManager.o(this.controls,"showingui",function(){e.L.Y(0)});this.eventManager.o(this.controls,"hidingui",function(){e.L.stop();e.bar.disabled=!0});this.eventManager.o(this.bar,"mousedown",function(f){e.bar.disabled||(e.i=!0,e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"touchstart",function(f){e.bar.disabled||(e.i=!0,uH(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&&(uH(e,f),e.onChange(),f.stopPropagation())});this.eventManager.o(this.bar,"touchend",function(f){e.i&&(e.i=!1,uH(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,uH(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(tH,ZG);p=tH.prototype;p.release=function(){this.G&&(this.G.stop(),this.G=null);ZG.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};
p.changeTo=function(a){this.i||(this.i=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.G.Y(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.i||(this.bar.value=a)};
function vH(a,b){var c=a.bar.getBoundingClientRect(),d=parseFloat(a.bar.min),e=parseFloat(a.bar.max);a=parseFloat(a.bar.step)||1;var f=c.left+6;c=c.right-6;b=d+(Math.max(f,Math.min(c,b))-f)/(c-f)*(e-d);b=Math.round((b-d)/a)*a+d;return b=Math.min(e,Math.max(d,b))}function uH(a,b){b.preventDefault();a.bar.value=vH(a,b.changedTouches[0].clientX)}S("shaka.ui.RangeElement",tH);tH.prototype.setValue=tH.prototype.setValue;tH.prototype.getValue=tH.prototype.getValue;tH.prototype.changeTo=tH.prototype.changeTo;
tH.prototype.onChangeEnd=tH.prototype.onChangeEnd;tH.prototype.onChange=tH.prototype.onChange;tH.prototype.onChangeStart=tH.prototype.onChangeStart;tH.prototype.setRange=tH.prototype.setRange;function wH(a,b){tH.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=W("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.I=this.controls.g;this.C=new Sf(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.D=new Sf(function(){xH(c)});this.M=!1;this.h=W("div");this.h.id="shaka-player-ui-thumbnail-container";
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.K=W("div");this.K.id="shaka-player-ui-thumbnail-time-container";this.H=W("div");this.H.id="shaka-player-ui-thumbnail-time";this.K.appendChild(this.H);this.h.appendChild(this.g);this.h.appendChild(this.K);this.container.appendChild(this.h);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.u=null;this.J=!1;this.A=new Sf(function(){yH(c)});this.m=[];this.eventManager.o(this.bar,
"input",function(){c.controls.Xc()});this.eventManager.o(this.localization,"locale-updated",function(){return zH(c)});this.eventManager.o(this.localization,"locale-changed",function(){return zH(c)});this.eventManager.o(this.adManager,"ad-started",function(){AH(c)||eH(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){AH(c)&&eH(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.m=d.cuepoints;BH(c)});this.eventManager.o(this.player,"unloading",
function(){c.m=[];BH(c);c.l&&(c.l.abort(),c.l=null);c.u=null;yH(c);CH(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.controls.Nc())CH(c),yH(c);else{var e=vH(c,d.clientX),f=c.bar.getBoundingClientRect();d=Math.max(0,d.clientX-f.left);c.player.xh().length?(CH(c),DH(c,d,e)):(yH(c),EH(c,d,e))}});this.eventManager.o(this.container,"mouseleave",function(){CH(c);c.A.stop();c.A.Y(.25)});this.setValue(this.video.currentTime);this.update();zH(this);this.ad&&eH(this.container,!1)}pa(wH,tH);
p=wH.prototype;p.release=function(){this.C&&(this.C.stop(),this.C=null,this.D.stop(),this.D=null);tH.prototype.release.call(this)};p.onChangeStart=function(){this.M=!this.video.paused;this.controls.mi(!0);this.video.pause();this.A.stop();this.J=!0};
p.onChange=function(){if(this.video.duration)if(this.update(),this.C.Y(.125),this.player.xh().length&&!this.controls.Nc()){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());DH(this,(d-a)/((b-a)/c.width),d)}else yH(this)};p.onChangeEnd=function(){this.C.Ka();this.controls.mi(!1);this.M&&this.video.play();this.J&&(this.J=!1,this.A.stop(),this.A.Y(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
p.update=function(){var a=this.I.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0;c=this.player.wa();var f=c.end-c.start;this.setRange(c.start,c.end);AH(this)?(eH(this.container,!0),d=(Math.max(d,c.start)-c.start)/f||0,e=(Math.min(e,c.end)-c.start)/f||0,b=(Math.min(Math.max(b,c.start),c.end)-c.start)/f||0,this.container.style.background="linear-gradient("+["to right",(this.I.showUnbufferedStart?a.base:a.played)+" "+
d*100+"%",a.played+" "+d*100+"%",a.played+" "+b*100+"%",a.buffered+" "+b*100+"%",a.buffered+" "+e*100+"%",a.base+" "+e*100+"%"].join()+")"):eH(this.container,!1)};
function xH(a){if(a.m.length){for(var b=a.player.wa(),c=b.end-b.start,d=["to right"],e=[],f=a.I.seekBarColors.adBreaks,g=!1,h=u(a.m),k=h.next();!k.done;k=h.next())if(k=k.value,k.start==-1&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||typeof k.end=="number"&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,q){return n.start-q.start});b=u(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
c.start*100+"%"),d.push(f+" "+c.start*100+"%"),d.push(f+" "+c.end*100+"%"),d.push("transparent "+c.end*100+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent",a.D.stop()}function BH(a){function b(){xH(a);var c=a.player.wa();c=c.end-c.start;a.player.U()&&c>5&&a.D.xa(.25)}b();a.player.Jh()||a.eventManager.qa(a.player,"loaded",b)}
function AH(a){var b=a.player.wa();b=b.end-b.start;return a.player.U()&&(b<5||!isFinite(b))?!1:a.ad==null||!a.ad.isLinear()}function zH(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
function EH(a,b,c){var d=a.j.clientWidth;a.j.style.width="auto";a.j.style.height="20px";a.j.style.top="-30px";a.j.style.left=Math.min(a.bar.offsetWidth-d,Math.max(0,b-d/2))+"px";a.j.style.right="";a.j.style.visibility="visible";b=a.player.wa();a.player.U()?(c=b.end-c,c<1?(a.j.textContent=a.localization.resolve("LIVE"),a.j.style.left="",a.j.style.right="0px"):a.j.textContent="-"+fH(c,c>=3600)):(c-=b.start,a.j.textContent=fH(c,c>=3600))}
function DH(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D;O(function(G){switch(G.g){case 1:c<0&&(c=0);d=!1;a.m.length&&(d=a.m.some(function(B){return B.end?c>=B.start&&c<=B.end:!1}));if(d)return yH(a),EH(a,b,c),G.return();e=a.player.wa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));a.player.U()?(g=e.end-c,a.H.textContent=g<1?a.localization.resolve("LIVE"):"-"+fH(g,g>=3600)):a.H.textContent=fH(c,c>=3600);h=-10;k=a.h.clientWidth;l=Math.floor(k*9/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";return H(G,a.player.gj(null,f),2);case 2:n=G.h;if(!n||!n.uris||!n.uris.length)return yH(a),EH(a,b,c),G.return();n.width<n.height?a.h.classList.add("portrait-thumbnail"):a.h.classList.remove("portrait-thumbnail");a.h.style.visibility="visible";q=n.uris[0].split("#xywh=")[0];if(a.u&&q===a.u.uris[0].split("#xywh=")[0]&&n.startByte==a.u.startByte&&n.endByte==a.u.endByte){G.B(3);break}a.u=n;a.l&&(a.l.abort(),a.l=null);
if(n.codecs!="mjpg"&&!q.startsWith("offline:")){G.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';va(G,5);r=sh;t=Xm(n.uris,n.startByte,n.endByte,a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Wb().request(r,t,{type:1});return H(G,a.l.promise,7);case 7:v=G.h;a.l=null;n.codecs=="mjpg"?(w=(new Bh).box("mdat",Lh(function(B){q=URL.createObjectURL(new Blob([B],{type:"image/jpeg"}))},!0)),w.parse(v.data,!1)):(z=n.mimeType||"image/jpeg",y=new Blob([v.data],
{type:z}),q=URL.createObjectURL(y));xa(G,4);break;case 5:A=ya(G);if(A.code==7001)return G.return();throw A;case 4:try{a.h.removeChild(a.g)}catch(B){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=q;a.g.onload=function(){q.startsWith("blob:")&&URL.revokeObjectURL(q)};a.h.insertBefore(a.g,a.h.firstChild);case 3:D=k/n.width,n.imageHeight?a.g.height=n.imageHeight:n.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),n.imageWidth?a.g.width=n.imageWidth:n.sprite||
(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+D*n.positionX+"px",a.g.style.top="-"+D*n.positionY+"px",a.g.style.transform="scale("+D+")",a.g.style.transformOrigin="left top",l=Math.floor(k*n.height/n.width),a.h.style.height=l+"px",a.h.style.top=-(l-h)+"px",I(G)}})}function yH(a){a.h.style.visibility="hidden"}function CH(a){a.j.style.visibility="hidden"}S("shaka.ui.SeekBar",wH);function FH(){}FH.prototype.create=function(a,b){return new wH(a,b)};wH.Factory=FH;function GH(a,b){ZG.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");eH(this.h,!1);this.j.appendChild(this.h);this.g=Yj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;eH(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);HH(this);this.i=new Sf(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable());
d>0?c.h.textContent=d:(c.i.stop(),eH(c.h,!1))}else IH(c)});this.eventManager.o(this.localization,"locale-updated",function(){HH(c)});this.eventManager.o(this.localization,"locale-changed",function(){HH(c)});this.eventManager.o(this.adManager,"ad-started",function(){JH(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.isSkippable()?c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),eH(c.h,!1)):IH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){IH(c)});this.eventManager.o(this.g,
"click",function(){c.ad.skip()});this.ad&&JH(this)}pa(GH,ZG);GH.prototype.release=function(){this.i.stop();this.i=null;ZG.prototype.release.call(this)};function HH(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function JH(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&(eH(a.g,!0),eH(a.h,!0),a.h.textContent="",a.i.Ka(),a.i.xa(.5))}function IH(a){a.i.stop();a.g.disabled=!0;eH(a.g,!1);eH(a.h,!1)}S("shaka.ui.SkipAdButton",GH);/*
 @license
 glMatrix: https://github.com/toji/gl-matrix/
 Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
 SPDX-License-Identifier: MIT
*/
function KH(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function LH(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 MH(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],v=b[12],w=b[13],z=b[14];b=b[15];var y=c[0],A=c[1],D=c[2],G=c[3];a[0]=y*d+A*h+D*n+G*v;a[1]=y*e+A*k+D*q+G*w;a[2]=y*f+A*l+D*r+G*z;a[3]=y*g+A*m+D*t+G*b;y=c[4];A=c[5];D=c[6];G=c[7];a[4]=y*d+A*h+D*n+G*v;a[5]=y*e+A*k+D*q+G*w;a[6]=y*f+A*l+D*r+G*z;a[7]=y*g+A*m+D*t+G*b;y=c[8];A=c[9];D=c[10];G=c[11];a[8]=y*d+A*h+D*n+G*v;a[9]=y*e+A*k+D*q+G*w;a[10]=y*f+A*l+D*r+G*z;a[11]=y*g+A*m+D*t+G*b;y=c[12];A=c[13];
D=c[14];G=c[15];a[12]=y*d+A*h+D*n+G*v;a[13]=y*e+A*k+D*q+G*w;a[14]=y*f+A*l+D*r+G*z;a[15]=y*g+A*m+D*t+G*b}
function NH(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;m>0?(b=Math.sqrt(m+1)*2,a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=Math.sqrt(1+g-h-b)*2,a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=Math.sqrt(1+h-g-b)*2,a[3]=(k-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=Math.sqrt(1+b-g-h)*2,a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function OH(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 PH(){var a=new Float32Array(4);a[3]=1;return a}function QH(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;f>0&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function RH(a){var b=[],c=[],d=[],e=Math.PI;a=(a===void 0?0:a)?e/2:e;for(var f=0;f<=100;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;k<=100;k++){var l=k*2*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;e<100;e++)for(a=0;a<100;a++)f=e*101+a,h=f+100+1,d.push(f,h,f+1),d.push(h,h+1,f+1);return{kk:b,gk:c,indices:d}};function SH(a,b,c,d,e){this.i=a;this.sa=b;this.u=c;this.g=d;this.A=new ed;this.M=PH();this.h=PH();this.ea=this.oa=this.aa=this.l=null;this.F=KH();this.J=KH();this.O=KH();this.W=KH();this.D=null;this.P=!1;this.K=this.C=null;this.ua=this.ya=0;this.Z=this.R=this.T=this.L=null;this.I=this.H=0;this.j=75;this.V=0;this.m=e;this.G=-1;TH(this)}
SH.prototype.release=function(){this.G!=-1&&(this.i.cancelVideoFrameCallback(this.G),this.G=-1);this.A&&(this.A.release(),this.A=null);this.C&&(this.C.stop(),this.C=null);this.K&&(this.K.stop(),this.K=null)};SH.prototype.be=function(){(this.P=!this.P)||this.g.viewport(0,0,this.u.width,this.u.height);UH(this,!1)};
function TH(a){VH(a);WH(a);XH(a);YH(a);ZH(a);Tl(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&UH(a);if("requestVideoFrameCallback"in a.i){var b=function(){a.G!=-1&&(UH(a),a.G!=-1&&(a.G=a.i.requestVideoFrameCallback(b)))};a.G=a.i.requestVideoFrameCallback(b)}else{var c;a.A.o(a.i,"canplaythrough",function(){UH(a)});a.A.o(a.i,"playing",function(){a.C&&a.C.stop();if(!c){var d=a.sa.Nb();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);UH(a);a.C=(new Sf(function(){UH(a)})).Ka().xa(1/c)});a.A.o(a.i,"pause",function(){a.C&&a.C.stop();a.C=null;UH(a)});a.A.o(a.i,"seeked",function(){UH(a)});a.A.o(document,"visibilitychange",function(){UH(a)})}})}
function VH(a){var b=a.F,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(Math.abs(f-m)<1E-6&&Math.abs(g-e)<1E-6&&Math.abs(c-n)<1E-6)for(f=0;f<16;f++)b[f]=f%5==0?1:0;else{d=f-m;e=g-e;m=c-n;var q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var 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}NH(a.M,a.F);a=b=a.W;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
function WH(a){$H(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 XH(a){var b=aI(a,a.g.VERTEX_SHADER),c=aI(a,a.g.FRAGMENT_SHADER);a.l=a.g.createProgram();a.g.attachShader(a.l,b);a.g.attachShader(a.l,c);a.g.linkProgram(a.l);a.m=="cubemap"?(a.T=a.g.getAttribLocation(a.l,"aVertexPosition"),a.R=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.T=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.T),a.R=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.R))}
function aI(a,b){switch(b){case a.g.VERTEX_SHADER:var c=a.m=="cubemap"?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n  gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n  vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
break;case a.g.FRAGMENT_SHADER:c=a.m=="cubemap"?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n  highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n  gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n      (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n      texture2D(uSampler, tc);\n  gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
function YH(a){a.L=a.m=="cubemap"?{kk:[-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],gk:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}:a.m=="halfequirectangular"?RH(!0):
RH();a.aa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.L.kk),a.g.STATIC_DRAW);a.oa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.oa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.L.gk),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.L.indices),a.g.STATIC_DRAW)}
function ZH(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 UH(a,b){b=b===void 0?!0:b;var c=a.sa.Ac()==Jr;if(!(!a.i||a.i.readyState<2||!c&&a.i.playbackRate==0)){LH(a.J,a.j*Math.PI/180,1.5625);a.m=="cubemap"?LH(a.J,a.j*Math.PI/180,2.5):LH(a.J,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);$H(a);b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.i));if(a.m=="equirectangular"||a.m==
"halfequirectangular")MH(a.O,a.F,a.W),MH(a.O,a.J,a.O);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.vertexAttribPointer(a.T,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.T);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.oa);a.g.vertexAttribPointer(a.R,2,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.R);a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.m=="cubemap"?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.J),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,
a.O)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"u_VPMatrix"),!1,a.O);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.P&&a.g.viewport(0,0,a.u.width/2,a.u.height);a.g.drawElements(a.g.TRIANGLES,a.L.indices.length,a.g.UNSIGNED_SHORT,0);a.P&&(a.g.viewport(a.u.width/2,0,a.u.width/2,a.u.height),a.g.drawElements(a.g.TRIANGLES,a.L.indices.length,a.g.UNSIGNED_SHORT,0))}}
function $H(a){var b=a.i.videoWidth;b||(b=a.u.scrollWidth);var c=a.i.videoHeight;c||(c=a.u.scrollHeight);if(a.ya!==b||a.ua!==c){a.u.width=b;a.u.height=c;a.ya=b;a.ua=c;var d=b/c,e=a.J,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.J=e;a.g.viewport(0,0,b,c)}}
function bI(a,b,c,d){var e=Infinity,f=90*Math.PI/180;a.m=="halfequirectangular"&&(e=90*Math.PI/180,f/=2);var g=a.m=="cubemap"?a.O:a.F;a.H+=b;a.I+=c;if(a.H<e&&a.H>-e){e=Math.sin(b);b=Math.cos(b);var h=g[0],k=g[1],l=g[2],m=g[3],n=g[8],q=g[9],r=g[10],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.H-=b;a.I<f&&a.I>-f?(f=KH(),e=KH(),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,MH(g,f,g)):a.I-=c;c=KH();f=KH();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;MH(g,c,g);UH(a,!1)}
function cI(a,b){if(b===void 0||b)NH(a.h,a.F),a.V=0,a.D=PH(),a.D[0]=(a.h[0]-a.M[0])/20,a.D[1]=(a.h[1]-a.M[1])/20,a.D[2]=(a.h[2]-a.M[2])/20,a.D[3]=(a.h[3]-a.M[3])/20;a.h[0]-=a.D[0];a.h[1]-=a.D[1];a.h[2]-=a.D[2];a.h[3]-=a.D[3];b=KH();QH(a.h,a.h);OH(b,a.h);a.F=b;a.K&&(a.K.stop(),a.K=null);a.V<20?a.K=(new Sf(function(){cI(a,!1);a.H=0;a.I=0;a.V++;UH(a,!1)})).Y(.025):(OH(b,a.M),a.F=b)};function dI(a,b,c,d,e,f){kb.call(this);var g=this;this.i=a;this.j=b;this.G=c;this.L=d;this.F=e;this.H=f;this.u=new ed;this.h=new ed;this.A=eI(this.j);this.g=null;this.m=!1;this.K=this.J=this.I=this.D=this.C=0;this.l=null;this.u.o(d,"loading",function(){g.g&&cI(g.g);fI(g)});this.u.o(d,"spatialvideoinfo",function(h){h=h.detail;switch(h.projection){case "rect":g.l=null;break;case "equi":g.l="equirectangular";break;case "hequ":switch(h.hfov){case 360:g.l="equirectangular";break;case 180:g.l="halfequirectangular";
break;default:h.hfov==null?g.l="halfequirectangular":g.l=null}break;case "fish":g.l="halfequirectangular";break;default:g.l=null}fI(g)});this.u.o(d,"nospatialvideoinfo",function(){g.l=null;fI(g)});this.u.o(d,"unloading",function(){g.l=null;fI(g)});this.u.o(this.H,"caststatuschanged",function(){fI(g)});fI(this)}pa(dI,kb);p=dI.prototype;p.release=function(){this.u&&(this.u.release(),this.u=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);kb.prototype.release.call(this)};
p.configure=function(a){this.F=a;fI(this)};p.Qg=function(){return this.j?!!this.A:!!eI(document.createElement("canvas"))};p.Yb=function(){return!!this.g};p.be=function(){this.g?this.g.be():db("Not playing VR content")};p.Fh=function(a){this.g?bI(this.g,a*gI,0,0):db("Not playing VR content")};p.Dh=function(a){this.g?bI(this.g,0,a*gI,0):db("Not playing VR content")};p.Eh=function(a){this.g?bI(this.g,0,0,a*gI):db("Not playing VR content")};
function fI(a){var b=a.H.F.Pa();!a.F.displayInVrMode&&!a.l||b?a.j&&a.g&&(a.j.style.display="none",a.h.Ta(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Yb())))):(a.j||(a.j=document.createElement("canvas"),a.j.classList.add("shaka-vr-canvas-container"),a.G.parentElement.insertBefore(a.j,a.G.nextElementSibling),a.A=eI(a.j)),b=a.l||a.F.defaultVrProjectionMode,a.g)?a.g.m!=b&&(a.h.Ta(),a.g.release(),hI(a,b)):(a.j.style.display="",hI(a,b),a.dispatchEvent(new T("vrstatuschanged",
(new Map).set("newStatus",a.Yb()))))}function hI(a,b){a.A&&a.j&&(a.g=new SH(a.G,a.L,a.j,a.A,b),iI(a))}function eI(a){if(!a||!window.WebGLRenderingContext)return null;for(var b=u(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.getContext(c.value))return c;return null}
function iI(a){a.h.o(a.i,"mousedown",function(d){if(!a.m){var e=d.clientX;d=d.clientY;a.m=!0;a.C=e;a.D=d}});navigator.maxTouchPoints>0&&a.h.o(a.i,"touchstart",function(d){if(!a.m){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.m=!0;a.C=e;a.D=d}});a.h.o(a.i,"wheel",function(d){if(!a.m){var e=a.g,f=d.deltaY;f/=50;e.j>=20&&e.j<=100&&(e.j+=f);e.j<20?e.j=20:e.j>100&&(e.j=100);UH(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.m&&jI(a,d.clientX,d.clientY)});navigator.maxTouchPoints>
0&&a.h.o(a.i,"touchmove",function(d){a.m&&jI(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.m=!1});a.h.o(a.i,"mouseup",function(){a.m=!1});navigator.maxTouchPoints>0&&a.h.o(a.i,"touchend",function(){a.m=!1});var b=!1;if(window.DeviceOrientationEvent)if(typeof DeviceMotionEvent.requestPermission=="function"){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){d!=="granted"||b||(b=!0,kI(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Ea(a.i,
"click",c);a.h.Ea(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.Ea(a.i,"touchend",c);d!=="granted"?(a.h.qa(a.i,"click",c),a.h.qa(a.i,"mouseup",c),navigator.maxTouchPoints>0&&a.h.qa(a.i,"touchend",c)):(b=!0,kI(a))}).catch(function(){a.h.Ea(a.i,"click",c);a.h.Ea(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.Ea(a.i,"touchend",c);a.h.qa(a.i,"click",c);a.h.qa(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.qa(a.i,"touchend",c)})}else b=!0,kI(a)}
function kI(a){a.h.o(window,"deviceorientation",function(b){if(a.g){var c=(b.alpha||0)-a.I,d=(b.beta||0)-a.J,e=(b.gamma||0)-a.K;if(Math.abs(c)>10||Math.abs(d)>10||Math.abs(e)>5)d=e=c=0;a.I=b.alpha||0;a.J=b.beta||0;a.K=b.gamma||0;b=screen.orientation.angle;b==90||b==-90?bI(a.g,c*gI*-1,e*gI*-1,0):bI(a.g,c*gI*-1,d*gI,0)}})}function jI(a,b,c){var d=-.6*Math.PI/180;bI(a.g,(b-a.C)*d,(c-a.D)*-1*d,0);a.C=b;a.D=c}var gI=Math.PI/180;function Z(a,b,c,d,e){kb.call(this);var f=this;this.aa=!0;this.g=e;this.F=new fu(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ua=!0;this.C=this.F.Wc();this.u=c;this.m=this.F.Xb();this.ea=a;this.l=b;this.Ob=d;this.sa=this.m.xf();this.A=this.j=null;this.V=!1;this.K=[];this.$a=[];this.Na=!1;this.L=new Sf(function(){f.l.classList.add("no-cursor");f.Na=!1;lI(f)});this.oa=new Sf(function(){f.i.removeAttribute("shown");mI(f);nI(f);f.Z&&f.Z.Ui();f.P.Y(f.g.closeMenusDelay)});this.P=
new Sf(function(){for(var g=u(f.K),h=g.next();!h.done;h=g.next())eH(h.value,!1);f.g.enableTooltips&&f.H.classList.add("shaka-tooltips-on")});this.Fa=new Sf(function(){f.Ca()&&oI(f)});this.R=null;this.J=[];this.ya=pI();this.h=new ed;this.D=null;this.configure(this.g);qI(this);rI(this);this.W=new Set;sI(this);this.Fa.xa(this.g.refreshTickInSeconds);this.h.o(this.ya,"locale-changed",function(g){g=g.locales[0];f.sa.setLocale(g);f.l.setAttribute("lang",g)});this.sa.initInterstitial(this.G,this.ea,this.u);
this.h.o(this.m,"texttrackvisibility",function(){nI(f)});this.h.o(this.m,"unloading",function(){f.j||(f.wb()&&tI(f),f.Nd()&&f.dd())})}pa(Z,kb);p=Z.prototype;
p.destroy=function(a){a=a===void 0?!1:a;var b=this;return O(function(c){switch(c.g){case 1:if(document.pictureInPictureElement!=b.u){c.B(2);break}return H(c,document.exitPictureInPicture(),2);case 2:b.h&&(b.h.release(),b.h=null);b.L&&(b.L.stop(),b.L=null);b.oa&&(b.oa.stop(),b.oa=null);b.P&&(b.P.stop(),b.P=null);b.Fa&&(b.Fa.stop(),b.Fa=null);b.D&&(b.D.release(),b.D=null);uI(b);b.i&&(b.l.removeChild(b.i),b.i=null);if(!b.F){c.B(4);break}return H(c,b.F.destroy(a),5);case 5:b.F=null;case 4:b.M&&(b.l.removeChild(b.M),
b.M=null);b.G&&(b.l.removeChild(b.G),b.G=null);b.I&&(b.l.removeChild(b.I),b.I=null);if(!b.ea){c.B(6);break}return H(c,b.ea.destroy(),7);case 7:b.ea=null;case 6:b.m=null,b.u=null,b.C=null,b.ya=null,b.W.clear(),vI(b),kb.prototype.release.call(b),I(c)}})};function uI(a){for(var b=u(a.J),c=b.next();!c.done;c=b.next())c.value.release();a.J=[]}function wI(a,b){xI.set(a,b)}p.tk=function(a){this.ua=a;sI(this)};p.Ol=function(){lI(this)};
p.configure=function(a){var b=this;this.g=a;this.F.Si(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.A&&(this.A=null);this.La&&(this.La=null);this.Z&&(this.Z=null);this.D&&this.D.configure(a);this.i?(ck(this.i),uI(this)):(yI(this),zI(this),this.D=new dI(this.i,this.Ob,this.u,this.m,this.g,this));this.l.classList.add("shaka-video-container");this.u.classList.add("shaka-video");AI(this);this.g.addBigPlayButton&&BI(this);this.g.customContextMenu&&(this.Z=new hH(this.H,this),this.J.push(this.Z));
this.M||CI(this);this.g.seekOnTaps&&(DI(this),EI(this));FI(this);this.K=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.K.push.apply(this.K,x(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));this.$a=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));lI(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.h.o(c,"click",d);
this.h.o(c,"dblclick",d);navigator.maxTouchPoints>0&&this.h.o(c,"touchend",function(e){b.Ca()&&e.stopPropagation()})}};p.ji=function(a){(this.aa=a)?(this.l.setAttribute("shaka-controls","true"),this.u.tabIndex=-1,this.u.controls=!1):this.l.removeAttribute("shaka-controls");lI(this)};p.Rj=function(a){this.u.controls=a;this.u.tabIndex=a?0:-1;a&&this.ji(!1)};p.getAd=function(){return this.j};p.Ik=function(){return this.F};p.Zk=function(){return this.ya};p.Bl=function(){return this.l};p.Wc=function(){return this.C};
p.Yk=function(){return this.u};p.Xb=function(){return this.m};p.Xk=function(){return this.ea};p.Pk=function(){return this.i};p.ol=function(){return this.I};p.Lk=function(){return this.G};p.Mk=function(){return this.g};p.Ll=function(){return this.V};p.mi=function(a){(this.V=a)?this.L.stop():this.L.Y(3)};p.Gl=function(){return this.ua};p.wh=function(){return this.A?this.A.getValue():this.C.currentTime};p.Sj=function(a){this.R=a};p.Nc=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
p.Xc=function(){this.P.Ka()};function GI(a){return!document.fullscreenEnabled||a.u.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&$b().Oa()=="APPLE_VR"?!1:!0}function HI(a){return"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture}p.Ae=function(){return this.F.Pa()?!1:GI(this)||(!this.j||!this.j.isUsingAnotherMediaElement())&&this.u.webkitSupportsFullscreen?!0:!1};
p.wb=function(){if(GI(this))return!!document.fullscreenElement;var a=this.u;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
function II(a){var b,c,d;return O(function(e){switch(e.g){case 1:va(e,2);if(!GI(a)){b=a.u;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!a.Nd()){e.B(5);break}return H(e,a.dd(),6);case 6:if(!HI(a)){e.B(5);break}return H(e,new Promise(function(f){(new Sf(f)).Y(.05)}),5);case 5:return c=a.g.fullScreenElement,H(e,c.requestFullscreen({navigationUI:"hide"}),9);case 9:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}va(e,11);return H(e,screen.orientation.lock("landscape"),
13);case 13:xa(e,4,2);break;case 11:ya(e,2);case 4:xa(e,0);break;case 2:d=ya(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),I(e)}})}function tI(a){var b;return O(function(c){if(!GI(a))return b=a.u,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return H(c,document.exitFullscreen(),0)})}p.ug=function(){var a=this;return O(function(b){return a.wb()?H(b,tI(a),0):H(b,II(a),0)})};
p.Jf=function(){return this.F.Pa()?!1:document.pictureInPictureEnabled||HI(this)?!this.u.disablePictureInPicture:!1};p.Nd=function(){return!!(window.documentPictureInPicture&&window.documentPictureInPicture.window||document.pictureInPictureElement)};
p.dd=function(){var a=this,b,c;return O(function(d){switch(d.g){case 1:va(d,2);if(HI(a)){if(!a.wb()){d.B(10);break}return H(d,tI(a),10)}return document.pictureInPictureElement?H(d,document.exitPictureInPicture(),5):(a.wb()&&tI(a),b=a.u,H(d,b.requestPictureInPicture(),5));case 10:return H(d,JI(a),5);case 5:xa(d,0);break;case 2:c=ya(d),a.dispatchEvent(new T("error",(new Map).set("detail",c))),I(d)}})};
function JI(a){var b,c,d,e,f,g;return O(function(h){if(h.g==1){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return H(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;KI(d);e=b.parentNode||document.body;f=a.l.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n      width: 100% !important; max-height: 100%}");
d.document.head.append(g);d.document.body.append(b);a.h.qa(d,"pagehide",function(){f.replaceWith(b)});I(h)})}
function KI(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.Xj=function(){eH(this.T,!0);this.G&&this.G.hasChildNodes()&&eH(this.G,!0);this.I&&this.I.hasChildNodes()&&eH(this.I,!0);this.j.hasCustomClick()?this.i.setAttribute("ad-active","true"):this.i.removeAttribute("ad-active")};p.hj=function(){eH(this.T,!1);eH(this.G,!1);eH(this.I,!1);this.i.removeAttribute("ad-active")};
function nH(a){if(a.aa){if(a.j&&(a.j&&a.j.isPaused()?a.j.play():a.j&&a.j.pause(),a.j.isLinear()))return;a.C.duration&&(a.C.paused&&!a.V?(a.m.isEnded()&&(a.C.currentTime=a.m.wa().start),a.C.play()):a.C.pause())}}
function yI(a){a.i=W("div");a.i.classList.add("shaka-controls-container");a.l.appendChild(a.i);a.l.setAttribute("shaka-controls","true");a.h.o(a.i,"touchend",function(b){a.C.duration&&(a.Ca()?(a.R=Date.now(),qH(a,!0)):LI(a,b),b.cancelable&&b.preventDefault())});a.h.o(a.i,"click",function(){qH(a)});a.h.o(a.i,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Ae()&&a.ug()})}
function BI(a){var b=W("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.La=new oH(b,a);a.J.push(a.La)}function AI(a){var b=W("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function MI(a){a.T=W("div");a.T.classList.add("shaka-ad-controls");var b=a.j!=null&&a.j.isLinear();eH(a.T,b);a.O.appendChild(a.T);b=new GH(a.T,a);a.J.push(b)}
function CI(a){a.M=W("div");a.M.classList.add("shaka-spinner-container");a.l.appendChild(a.M);var b=W("div");b.classList.add("shaka-spinner");a.M.appendChild(b);b.insertAdjacentHTML("beforeend",'<svg focusable="false" stroke="currentColor"\n         viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"\n         width="50px" height="50px" class="q-spinner text-grey-9">\n      <g transform="translate(1 1)" stroke-width="6" fill="none"\n        fill-rule="evenodd">\n        <circle stroke-opacity=".5" cx="18" cy="18" r="16"></circle>\n        <path d="M34 18c0-9.94-8.06-16-16-16">\n          <animateTransform attributeName="transform" type="rotate"\n            from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite">\n          </animateTransform>\n        </path>\n      </g>\n    </svg>')}
function DI(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.i.appendChild(b);a.jb=new rH(b,a);a.J.push(a.jb)}function EI(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.i.appendChild(b);a.kb=new sH(b,a);a.J.push(a.kb)}
function FI(a){a.O=W("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.o(a.O,"click",function(e){e.target.closest(".shaka-overflow-button")||a.Xc()});MI(a);NI(a);a.H=W("div");a.H.classList.add("shaka-controls-button-panel");a.H.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.H.classList.add("shaka-tooltips-on");a.O.appendChild(a.H);for(var b=u(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())if(c=c.value,
xI.get(c)){var d=xI.get(c).create(a.H,a);a.J.push(d);c=="time_and_duration"&&(c=new gH(a.H,a),a.J.push(c))}else db("Unrecognized control panel element requested:",c)}function NI(a){if(a.g.addSeekBar)a.A=OI.create(a.O,a),a.J.push(a.A);else{for(var b=u(a.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a=a.H;a.classList.contains("shaka-tooltips-on")&&a.classList.add("shaka-tooltips-low-position")}}
function zI(a){a.G=W("div");a.G.classList.add("shaka-client-side-ad-container");eH(a.G,!1);a.h.o(a.G,"click",function(){qH(a)});a.l.appendChild(a.G);a.I=W("div");a.I.classList.add("shaka-server-side-ad-container");eH(a.I,!1);a.h.o(a.I,"click",function(){qH(a)});a.l.appendChild(a.I)}
function qI(a){a.h.o(a.m,"buffering",function(){PI(a)});PI(a);a.h.o(window,"keydown",function(b){QI(a,b)});a.h.o(window,"click",function(){return a.Xc()});a.h.o(a,"submenuopen",function(){a.Xc()});a.h.o(a.C,"play",function(){lI(a)});a.h.o(a.C,"pause",function(){lI(a)});a.h.o(a.l,"mousemove",function(b){LI(a,b)});a.h.o(a.l,"touchmove",function(b){LI(a,b)},{passive:!0});a.h.o(a.l,"touchend",function(b){LI(a,b)},{passive:!0});a.h.o(a.l,"mouseleave",function(){a.R||a.L.Ka()});a.h.o(a.l,"wheel",function(b){LI(a,
b)},{passive:!0});a.h.o(a.F,"caststatuschanged",function(){sI(a)});a.h.o(a.D,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.h.o(a.l,"keydown",function(b){a.g.enableKeyboardPlaybackControlsInWindow||a.wb()||RI(a,b)});a.h.o(a.l,"keyup",function(b){a.g.enableKeyboardPlaybackControlsInWindow||a.wb()||a.W.delete(b.key)});a.h.o(window,"keydown",function(b){(a.g.enableKeyboardPlaybackControlsInWindow||a.wb())&&RI(a,b)});a.h.o(window,"keyup",function(b){(a.g.enableKeyboardPlaybackControlsInWindow||
a.wb())&&a.W.delete(b.key)});a.h.o(a.sa,"ad-started",function(b){a.j=b.ad;a.Xj();PI(a)});a.h.o(a.sa,"ad-stopped",function(){a.j=null;a.hj();PI(a)});screen.orientation&&a.h.o(screen.orientation,"change",function(){return O(function(b){return H(b,SI(a),0)})})}
function rI(a){if(a.g.setupMediaSession&&navigator.mediaSession){var b=function(f,g){try{navigator.mediaSession.setActionHandler(f,function(h){g(h)})}catch(h){}},c=function(){if(a.j&&a.j.isLinear())d();else{var f=a.m.wa(),g=f.end-f.start;f=parseFloat((a.C.currentTime-f.start).toFixed(2));a.m.U()&&Math.abs(g-f)<1&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.C.playbackRate,position:Math.max(0,f)})}catch(h){}}},d=function(){try{navigator.mediaSession.setPositionState()}catch(f){}},
e=function(f){var g=a.g.keyboardSeekDistance;switch(f.action){case "pause":nH(a);break;case "play":nH(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||TI(a,a.A.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||TI(a,a.A.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.j&&a.j.isLinear()||TI(a,a.m.wa().start+f.seekTime);break;case "stop":a.m.wc();
break;case "enterpictureinpicture":a.j&&a.j.isLinear()||a.dd()}};b("pause",e);b("play",e);b("seekbackward",e);b("seekforward",e);b("seekto",e);b("stop",e);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",e);b=function(){a.m.U()||a.m.wa().start!=0?(c(),a.h.o(a.C,"timeupdate",c)):d()};a.m.Jh()&&b();a.h.o(a.m,"loaded",b);a.h.o(a.m,"unloading",function(){a.h.Ea(a.C,"timeupdate",c)});a.h.o(a.m,"metadata",function(f){if(f=f.payload){var g;f.key=="TIT2"&&
f.data&&(g=f.data);var h;f.key=="APIC"&&f.mimeType=="--\x3e"&&(h=f.data);g&&(f={title:g,artwork:[]},navigator.mediaSession.metadata&&(f=navigator.mediaSession.metadata,f.title=g),navigator.mediaSession.metadata=new MediaMetadata(f));h&&(g=a.u,h!=g.poster&&(g.poster=h),g={title:"",artwork:[{src:h}]},navigator.mediaSession.metadata&&(g=navigator.mediaSession.metadata,g.artwork=[{src:h}]),navigator.mediaSession.metadata=new MediaMetadata(g))}})}}
function vI(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 SI(a){return O(function(b){return a.C&&a.C.readyState!=0&&!a.F.Pa()&&a.g.enableFullscreenOnRotation&&a.Ae()?screen.orientation.type.includes("landscape")&&!a.wb()?H(b,II(a),0):screen.orientation.type.includes("portrait")&&a.wb()?H(b,tI(a),0):b.B(0):b.return()})}
function LI(a,b){b.type=="mousemove"&&(a.i.classList.remove("shaka-keyboard-navigation"),lI(a));b.type=="touchstart"||b.type=="touchmove"||b.type=="touchend"||b.type=="keyup"?a.R=Date.now():a.R+1E3<Date.now()&&(a.R=null);a.R&&b.type=="mousemove"||(a.l.classList.remove("no-cursor"),a.Na=!0,a.P.stop(),a.Ca()||(oI(a),lI(a)),a.L.stop(),b.type!="touchend"&&b.type!="wheel"&&b.type!="keyup"&&a.R||a.L.Y(3))}
function UI(a){return window.matchMedia("hover: hover").matches?a.$a.some(function(b){return b.matches(":hover")}):!1}function nI(a){var b=a.l.getElementsByClassName("shaka-text-container")[0];b&&(a.Ca()?b.style.bottom=a.O.clientHeight+"px":b.style.bottom="0px")}
function lI(a){var b=a.j?a.j.isPaused():!1,c=a.C.paused&&!a.V,d=a.i.classList.contains("shaka-keyboard-navigation");b||(!a.j||!a.j.isLinear())&&c||a.Na||d||UI(a)?(oI(a),a.i.getAttribute("shown")==null&&(a.i.setAttribute("shown","true"),mI(a)),nI(a),a.oa.stop()):a.oa.Y(a.g.fadeDelay);a.Nc()&&a.H.classList.remove("shaka-tooltips-on")}function qH(a,b){b=b===void 0?!1:b;a.aa&&!a.Yb()&&(a.Nc()?a.P.Ka():a.g.singleClickForPlayAndPause?nH(a):b&&a.Ca()&&a.ij())}
function sI(a){var b=a.F.Pa();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.getAttribute("casting")==null&&(a.i.setAttribute("casting","true"),mI(a)):a.i.getAttribute("casting")!=null&&(a.i.removeAttribute("casting"),mI(a))}
function RI(a,b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar"),f=a.wb();c=a.i.contains(c);f=f||a.g.enableKeyboardPlaybackControlsInWindow;c&&LI(a,b);if(a.g.enableKeyboardPlaybackControls&&a.m.jd()){var g=a.g.keyboardSeekDistance,h=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.A&&g>0&&(e||f)&&!d&&(b.preventDefault(),TI(a,a.A.getValue()-g));break;case "ArrowRight":a.A&&g>0&&(e||f)&&
!d&&(b.preventDefault(),TI(a,a.A.getValue()+g));break;case "PageDown":a.A&&h>0&&(e||f)&&(b.preventDefault(),TI(a,a.A.getValue()-h));break;case "PageUp":a.A&&h>0&&(e||f)&&(b.preventDefault(),TI(a,a.A.getValue()+h));break;case "Home":a.A&&TI(a,a.m.wa().start);break;case "End":a.A&&TI(a,a.m.wa().end);break;case "c":a.m.ae(!a.m.Yc());break;case "f":a.Ae()&&a.ug();break;case "m":a.j&&a.j.isLinear()?a.j.setMuted(!a.j.isMuted()):a.u.muted=!a.u.muted;break;case "p":a.Jf()&&a.dd();break;case ">":b=a.g.playbackRates.indexOf(a.m.Za());
b>-1&&b+1<a.g.playbackRates.length&&a.m.vc(a.g.playbackRates[b+1],!1);break;case "<":b=a.g.playbackRates.indexOf(a.m.Za());b>-1&&b-1>=0&&a.m.vc(a.g.playbackRates[b-1],!1);break;case " ":(e||f&&!c)&&nH(a)}}}function PI(a){a.aa&&(a.j&&a.j.isClientRendering()&&a.j.isLinear()?eH(a.M,!1):eH(a.M,a.m.Hf()))}p.Ca=function(){return this.aa?this.i.getAttribute("shown")!=null||this.i.getAttribute("casting")!=null:!1};
function mI(a){a.Ca()?a.dispatchEvent(new T("showingui")):a.dispatchEvent(new T("hidingui"))}function TI(a,b){a.C.currentTime=b;oI(a)}
function oI(a){if(a.A)if(a.A.setValue(a.C.currentTime),a.A.update(),a.A.isShowing()){for(var b=u(a.K),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");b=a.H;b.classList.contains("shaka-tooltips-on")&&b.classList.remove("shaka-tooltips-low-position")}else{b=u(a.K);for(c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");b=a.H;b.classList.contains("shaka-tooltips-on")&&b.classList.add("shaka-tooltips-low-position")}a.dispatchEvent(new T("timeandseekrangeupdated"))}
function QI(a,b){a.W.add(b.key);var c=a.Nc();b.key=="Tab"&&(a.i.classList.add("shaka-keyboard-navigation"),lI(a),a.h.o(window,"mousedown",function(){a.h.Ea(window,"mousedown")}));b.key=="Escape"&&a.P.Ka();c&&a.W.has("Tab")&&VI(a,b)}
function VI(a,b){var c=a.K.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.W.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
p.Bm=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});LI(this,a)};p.ij=function(){this.L.Ka()};p.Qg=function(){return this.D.Qg()};p.Yb=function(){return this.D.Yb()};
p.zl=function(){var a=this.D;if(a.g){a=a.g;NH(a.h,a.F);var b=a.h,c=0;a=0;a=b[0];var d=b[1],e=b[2];b=b[3];c=d*d;var f=e*e,g=b*b;c=a*a+c+f+g;var h=a*b-d*e;h>.499995*c?(c=Math.PI/2,a=2*Math.atan2(d,a)):h<-.499995*c?(c=-Math.PI/2,a=2*Math.atan2(d,a)):(c=Math.asin(2*(a*e-b*d)),a=Math.atan2(2*(a*b+d*e),1-2*(f+g)));a=Math.acos(Math.cos(a)*Math.cos(c))*180/Math.PI}else db("Not playing VR content"),a=null;return a};p.yl=function(){var a=this.D;a.g?a=a.g.j:(db("Not playing VR content"),a=null);return a};
p.zm=function(a){var b=this.D;b.g?(a<0?(db("Field of view should be greater than 0"),a=0):a>100&&(db("Field of view should be less than 100"),a=100),b=b.g,b.j=a,UH(b,!1)):db("Not playing VR content")};p.be=function(){this.D.be()};p.Fh=function(a){this.D.Fh(a)};p.Dh=function(a){this.D.Dh(a)};p.Eh=function(a){this.D.Eh(a)};
function pI(){var a=new Uc("en");a.Xa("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_STATISTICS","\u0625\u062d\u0635\u0627\u0621\u0627\u062a \u0627\u0644\u0625\u0639\u0644\u0627\u0646\u0627\u062a"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],
["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["CHAPTERS","\u0627\u0644\u0641\u0635\u0648\u0644"],["DOWNLOAD_VIDEO_FRAME","\u062d\u0641\u0638 \u0625\u0637\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648"],["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],
["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],
["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],
["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["PLAYBACK_RATE","\u0633\u0631\u0639\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["QUALITY","\u0627\u0644\u062c\u0648\u062f\u0629"],["RECENTER_VR","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u0633\u064a\u0637"],
["REPLAY","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["RESOLUTION","\u062f\u0631\u062c\u0629 \u0627\u0644\u062f\u0642\u0629"],["REWIND","\u062a\u0631\u062c\u064a\u0639"],["SEEK","\u0627\u0644\u0628\u062d\u062b \u0628\u0627\u0644\u062a\u0645\u0631\u064a\u0631"],["SKIP_AD","\u062a\u062e\u0637\u0651\u064a \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["SKIP_TO_LIVE","\u0627\u0644\u0627\u0646\u062a\u0642\u0627\u0644 \u0625\u0644\u0649 \u0628\u062b \u0645\u0628\u0627\u0634\u0631"],
["STATISTICS","\u0627\u0644\u0625\u062d\u0635\u0627\u0621\u0627\u062a"],["SUBTITLE_FORCED","\u0639\u0631\u0636 \u0625\u062c\u0628\u0627\u0631\u064a"],["SURROUND","\u0635\u0648\u062a \u0645\u062d\u064a\u0637\u064a"],["TOGGLE_STEREOSCOPIC","\u0625\u064a\u0642\u0627\u0641 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0645\u062c\u0633\u0651\u0645 \u0623\u0648 \u062a\u0641\u0639\u064a\u0644\u0647"],["UNDETERMINED_LANGUAGE","\u063a\u064a\u0631 \u0645\u062d\u062f\u062f"],["UNMUTE","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0635\u0648\u062a"],
["UNRECOGNIZED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641"],["VOLUME","\u0645\u0633\u062a\u0648\u0649 \u0627\u0644\u0635\u0648\u062a"]]));a.Xa("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung\u00a0[AD_ON] von\u00a0[NUM_ADS]"],["AD_STATISTICS","Anzeigenstatistiken"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Zur\u00fcck"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["CHAPTERS","Kapitel"],["DOWNLOAD_VIDEO_FRAME",
"Videoframe speichern"],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild im Bild aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild im Bild beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Schleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE",
"Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["QUALITY","Qualit\u00e4t"],["RECENTER_VR","Zentrieren"],["REPLAY","Noch einmal wiedergeben"],["RESOLUTION","Aufl\u00f6sung"],["REWIND","Zur\u00fcckspulen"],["SEEK","Suche"],["SKIP_AD","\u00dcberspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["STATISTICS","Statistiken"],["SUBTITLE_FORCED","Erzwungen"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Einstellung \u201estereoskopisch\u201c ein\u2011/ausschalten"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautst\u00e4rke"]]));a.Xa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS",
"Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE",
"Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recenter"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_NEXT","Next"],["SKIP_PREVIOUS","Previous"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]]));a.Xa("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE",
"Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],
["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recentre"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE",
"Unrecognised"],["VOLUME","volume"]]));a.Xa("es",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas del anuncio"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Enviar..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Reproducir en bucle el v\u00eddeo actual"],
["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el v\u00eddeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar r\u00e1pidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","M\u00e1s ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],
["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_NEXT","Siguiente"],["SKIP_PREVIOUS","Anterior"],["SKIP_TO_LIVE","Ir al v\u00eddeo en directo"],
["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC","Activar/Desactivar estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Xa("es-419",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas de anuncios"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY",
"AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetici\u00f3n indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],
["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","M\u00e1s opciones de configuraci\u00f3n"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR",
"Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisi\u00f3n en vivo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Sonido envolvente"],["TOGGLE_STEREOSCOPIC","Activar o desactivar el modo estereosc\u00f3pico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],
["VOLUME","Volumen"]]));a.Xa("fr",new Map([["AD_DURATION","Dur\u00e9e de l'annonce"],["AD_PROGRESS","Annonce\u00a0[AD_ON] sur\u00a0[NUM_ADS]"],["AD_STATISTICS","Statistiques sur les annonces"],["AD_TIME","Annonce\u00a0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster\u2026"],["CHAPTERS","Chapitres"],["DOWNLOAD_VIDEO_FRAME","T\u00e9l\u00e9charger l'image de la vid\u00e9o"],["ENTER_LOOP_MODE","Lire en boucle la vid\u00e9o en cours"],
["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein \u00e9cran"],["EXIT_LOOP_MODE","Arr\u00eater la lecture en boucle de la vid\u00e9o en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode\u00a0PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein \u00e9cran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","R\u00e9p\u00e9ter"],["MORE_SETTINGS","Plus de param\u00e8tres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],
["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","D\u00e9sactiv\u00e9e"],["ON","Activ\u00e9e"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualit\u00e9"],["RECENTER_VR","Recentrer"],["REPLAY","Revoir"],["RESOLUTION","R\u00e9solution"],["REWIND","Retour arri\u00e8re"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_NEXT","Suivante"],["SKIP_PREVIOUS","Pr\u00e9c\u00e9dente"],["SKIP_TO_LIVE",
"Acc\u00e9der \u00e0 la partie la plus r\u00e9cente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forc\u00e9"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Activer/D\u00e9sactiver le mode st\u00e9r\u00e9oscopique"],["UNDETERMINED_LANGUAGE","Langue ind\u00e9termin\u00e9e"],["UNMUTE","R\u00e9activer le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]]));a.Xa("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_STATISTICS",
"Statistiche sugli annunci"],["AD_TIME","Annuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["CHAPTERS","Capitoli"],["DOWNLOAD_VIDEO_FRAME","Salva fotogramma"],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE",
"Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES","Pi\u00f9 lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocit\u00e0 di riproduzione"],["QUALITY","Qualit\u00e0"],
["RECENTER_VR","Ricentra"],["REPLAY","Riproduci di nuovo"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["STATISTICS","Statistiche"],["SUBTITLE_FORCED","Forzata"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Pulsante di attivazione/disattivazione stereoscopico"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]]));
a.Xa("ja",new Map([["AD_DURATION","\u5e83\u544a\u518d\u751f\u6642\u9593"],["AD_PROGRESS","[AD_ON] \u756a\u76ee\u306e\u5e83\u544a\uff08\u5168 [NUM_ADS] \u500b\uff09"],["AD_STATISTICS","\u5e83\u544a\u306e\u7d71\u8a08\u60c5\u5831"],["AD_TIME","\u5e83\u544a: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u623b\u308b"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u30ad\u30e3\u30b9\u30c8..."],["CHAPTERS","\u7ae0"],["DOWNLOAD_VIDEO_FRAME","\u52d5\u753b\u30d5\u30ec\u30fc\u30e0\u3092\u4fdd\u5b58"],
["ENTER_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u3092\u30eb\u30fc\u30d7\u518d\u751f"],["ENTER_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb"],["EXIT_FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a\u3092\u7d42\u4e86"],["EXIT_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u306e\u30eb\u30fc\u30d7\u518d\u751f\u3092\u505c\u6b62"],["EXIT_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86"],
["FAST_FORWARD","\u65e9\u9001\u308a"],["FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a"],["LANGUAGE","\u8a00\u8a9e"],["LIVE","\u30e9\u30a4\u30d6"],["LOOP","\u30eb\u30fc\u30d7"],["MORE_SETTINGS","\u8a73\u7d30\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u8a00\u8a9e"],["MUTE","\u30df\u30e5\u30fc\u30c8"],["NOT_APPLICABLE","\u8a72\u5f53\u306a\u3057"],["OFF","\u30aa\u30d5"],["ON","\u30aa\u30f3"],["PAUSE","\u4e00\u6642\u505c\u6b62"],["PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],
["PLAY","\u518d\u751f"],["PLAYBACK_RATE","\u518d\u751f\u901f\u5ea6"],["QUALITY","\u54c1\u8cea"],["RECENTER_VR","\u4e2d\u5fc3\u3092\u518d\u8a2d\u5b9a"],["REPLAY","\u3082\u3046\u4e00\u5ea6\u518d\u751f"],["RESOLUTION","\u89e3\u50cf\u5ea6"],["REWIND","\u5dfb\u304d\u623b\u3057"],["SEEK","\u30b7\u30fc\u30af\u518d\u751f"],["SKIP_AD","\u5e83\u544a\u3092\u30b9\u30ad\u30c3\u30d7"],["SKIP_TO_LIVE","\u30e9\u30a4\u30d6\u914d\u4fe1\u307e\u3067\u30b9\u30ad\u30c3\u30d7"],["STATISTICS","\u7d71\u8a08\u60c5\u5831"],
["SUBTITLE_FORCED","\u5f37\u5236"],["SURROUND","\u30b5\u30e9\u30a6\u30f3\u30c9"],["TOGGLE_STEREOSCOPIC","\u7acb\u4f53\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u30df\u30e5\u30fc\u30c8\u3092\u89e3\u9664"],["UNRECOGNIZED_LANGUAGE","\u4e0d\u660e"],["VOLUME","\u97f3\u91cf"]]));a.Xa("ko",new Map([["AD_DURATION","\uad11\uace0 \uae30\uac04"],["AD_PROGRESS","\uad11\uace0 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\uad11\uace0 \ud1b5\uacc4"],["AD_TIME",
"\uad11\uace0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\uc790\ub3d9"],["BACK","\ub4a4\ub85c"],["CAPTIONS","\uc790\ub9c9"],["CAST","\uc804\uc1a1..."],["CHAPTERS","\uc7a5"],["DOWNLOAD_VIDEO_FRAME","\ub3d9\uc601\uc0c1 \ud504\ub808\uc784 \uc800\uc7a5"],["ENTER_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd"],["ENTER_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc2dc\uc791"],["EXIT_FULL_SCREEN","\uc804\uccb4\ud654\uba74 \ub2eb\uae30"],["EXIT_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd \uc911\uc9c0"],
["EXIT_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc885\ub8cc"],["FAST_FORWARD","\ube68\ub9ac \uac10\uae30"],["FULL_SCREEN","\uc804\uccb4\ud654\uba74"],["LANGUAGE","\uc5b8\uc5b4"],["LIVE","\uc2e4\uc2dc\uac04"],["LOOP","\ubc18\ubcf5 \uc7ac\uc0dd"],["MORE_SETTINGS","\uc124\uc815 \ub354\ubcf4\uae30"],["MULTIPLE_LANGUAGES","\uc5ec\ub7ec \uc5b8\uc5b4"],["MUTE","\uc74c\uc18c\uac70"],["NOT_APPLICABLE","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["OFF","\uc0ac\uc6a9 \uc548\ud568"],["ON","\uc0ac\uc6a9"],["PAUSE",
"\uc77c\uc2dc\uc911\uc9c0"],["PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc"],["PLAY","\uc7ac\uc0dd"],["PLAYBACK_RATE","\uc7ac\uc0dd \uc18d\ub3c4"],["QUALITY","\ud488\uc9c8"],["RECENTER_VR","\uc911\uc2ec \uc7ac\uc124\uc815"],["REPLAY","\ub2e4\uc2dc\ubcf4\uae30"],["RESOLUTION","\ud574\uc0c1\ub3c4"],["REWIND","\ub418\uac10\uae30"],["SEEK","\ucc3e\uae30"],["SKIP_AD","\uad11\uace0 \uac74\ub108\ub6f0\uae30"],["SKIP_TO_LIVE","\ub77c\uc774\ube0c \ub3d9\uc601\uc0c1\uc73c\ub85c \uac74\ub108\ub6f0\uae30"],["STATISTICS",
"\ud1b5\uacc4"],["SUBTITLE_FORCED","\uac15\uc81c"],["SURROUND","\uc11c\ub77c\uc6b4\ub4dc"],["TOGGLE_STEREOSCOPIC","\uc785\uccb4 \ubcf4\uae30 \uc804\ud658"],["UNDETERMINED_LANGUAGE","\ubbf8\uc815"],["UNMUTE","\uc74c\uc18c\uac70 \ud574\uc81c"],["UNRECOGNIZED_LANGUAGE","\uc54c \uc218 \uc5c6\uc74c"],["VOLUME","\ubcfc\ub968"]]));a.Xa("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_STATISTICS","Advertentiestatistieken"],["AD_TIME","Advertentie: [AD_TIME]"],
["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["CHAPTERS","Hoofdstukken"],["DOWNLOAD_VIDEO_FRAME","Videoframe opslaan"],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN",
"Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Geluid uitzetten"],["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["QUALITY","Kwaliteit"],["RECENTER_VR","Opnieuw centreren"],["REPLAY","Opnieuw afspelen"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],
["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["STATISTICS","Statistieken"],["SUBTITLE_FORCED","Afgedwongen"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Stereoscopisch aan-/uitzetten"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Geluid aanzetten"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]]));a.Xa("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama\u00a0[AD_ON] z\u00a0[NUM_ADS]"],["AD_STATISTICS","Statystyki reklam"],
["AD_TIME","Reklama: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesy\u0142aj..."],["CHAPTERS","Rozdzia\u0142y"],["DOWNLOAD_VIDEO_FRAME","Zapisz klatk\u0119 filmu"],["ENTER_LOOP_MODE","Odtwarzaj bie\u017c\u0105cy film w\u00a0p\u0119tli"],["ENTER_PICTURE_IN_PICTURE","W\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["EXIT_FULL_SCREEN","Zamknij pe\u0142ny ekran"],["EXIT_LOOP_MODE","Wy\u0142\u0105cz odtwarzanie bie\u017c\u0105cego filmu w\u00a0p\u0119tli"],
["EXIT_PICTURE_IN_PICTURE","Wy\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["FAST_FORWARD","Przewi\u0144 do przodu"],["FULL_SCREEN","Pe\u0142ny ekran"],["LANGUAGE","J\u0119zyk"],["LIVE","Na \u017cywo"],["LOOP","Odtwarzaj w\u00a0p\u0119tli"],["MORE_SETTINGS","Wi\u0119cej ustawie\u0144"],["MULTIPLE_LANGUAGES","Wiele j\u0119zyk\u00f3w"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wy\u0142\u0105czone"],["ON","W\u0142\u0105czone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w\u00a0obrazie"],
["PLAY","Odtw\u00f3rz"],["PLAYBACK_RATE","Szybko\u015b\u0107 odtwarzania"],["QUALITY","Jako\u015b\u0107"],["RECENTER_VR","Wy\u015brodkuj"],["REPLAY","Odtw\u00f3rz ponownie"],["RESOLUTION","Rozdzielczo\u015b\u0107"],["REWIND","Przewi\u0144 do ty\u0142u"],["SEEK","Szukaj"],["SKIP_AD","Pomi\u0144 reklam\u0119"],["SKIP_NEXT","Dalej"],["SKIP_PREVIOUS","Poprzedni"],["SKIP_TO_LIVE","Przejd\u017a do transmisji na \u017cywo"],["STATISTICS","Statystyki"],["SUBTITLE_FORCED","Wymuszone"],["SURROUND","Przestrzenny"],
["TOGGLE_STEREOSCOPIC","Prze\u0142\u0105cz tryb stereoskopowy"],["UNDETERMINED_LANGUAGE","Nie okre\u015blono"],["UNMUTE","Wy\u0142\u0105cz wyciszenie"],["UNRECOGNIZED_LANGUAGE","Nierozpoznany"],["VOLUME","G\u0142o\u015bno\u015b\u0107"]]));a.Xa("pt-BR",new Map([["AD_DURATION","Dura\u00e7\u00e3o do an\u00fancio"],["AD_PROGRESS","An\u00fancio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estat\u00edsticas de an\u00fancios"],["AD_TIME","An\u00fancio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tica"],
["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Salvar frame do v\u00eddeo"],["ENTER_LOOP_MODE","Repetir o v\u00eddeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repeti\u00e7\u00e3o do v\u00eddeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avan\u00e7ar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE",
"Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais defini\u00e7\u00f5es"],["MULTIPLE_LANGUAGES","V\u00e1rios idiomas"],["MUTE","Desativar som"],["NOT_APPLICABLE","N\u00e3o relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodu\u00e7\u00e3o"],["QUALITY","Qualidade"],["RECENTER_VR","Centralizar"],["REPLAY","Repetir"],["RESOLUTION","Resolu\u00e7\u00e3o"],["REWIND",
"Voltar"],["SEEK","Procurar"],["SKIP_AD","Pular an\u00fancio"],["SKIP_TO_LIVE","Pular para transmiss\u00e3o ao vivo"],["STATISTICS","Estat\u00edsticas"],["SUBTITLE_FORCED","Exibi\u00e7\u00e3o for\u00e7ada"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Alternar imagem estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","N\u00e3o reconhecido"],["VOLUME","Volume"]]));a.Xa("ru",new Map([["AD_DURATION","\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u044b"],
["AD_PROGRESS","\u0420\u0435\u043a\u043b\u0430\u043c\u0430 [AD_ON] \u0438\u0437 [NUM_ADS]"],["AD_STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439"],["AD_TIME","\u0420\u0435\u043a\u043b\u0430\u043c\u0430: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0410\u0432\u0442\u043e"],["BACK","\u041d\u0430\u0437\u0430\u0434"],["CAPTIONS","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["CAST","\u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c..."],
["CHAPTERS","\u042d\u043f\u0438\u0437\u043e\u0434\u044b"],["DOWNLOAD_VIDEO_FRAME","\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e"],["ENTER_LOOP_MODE","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0438\u0434\u0435\u043e"],["ENTER_PICTURE_IN_PICTURE",'\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["EXIT_FULL_SCREEN","\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["EXIT_LOOP_MODE","\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e"],["EXIT_PICTURE_IN_PICTURE",'\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["FAST_FORWARD","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u0432\u043f\u0435\u0440\u0435\u0434"],["FULL_SCREEN","\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["LANGUAGE","\u042f\u0437\u044b\u043a"],["LIVE","\u041f\u0440\u044f\u043c\u043e\u0439 \u044d\u0444\u0438\u0440"],["LOOP","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c"],["MORE_SETTINGS","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],
["MULTIPLE_LANGUAGES","\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432"],["MUTE","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["NOT_APPLICABLE","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["OFF","\u0412\u044b\u043a\u043b."],["ON","\u0412\u043a\u043b."],["PAUSE","\u041f\u0430\u0443\u0437\u0430"],["PICTURE_IN_PICTURE","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],
["PLAY","\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438"],["PLAYBACK_RATE","\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f"],["QUALITY","\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e"],["RECENTER_VR","\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e"],["REPLAY","\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"],
["RESOLUTION","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["REWIND","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["SEEK","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430"],["SKIP_AD","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"],["SKIP_TO_LIVE","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438"],
["STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430"],["SUBTITLE_FORCED","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e"],["SURROUND","\u041e\u0431\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0432\u0443\u043a"],["TOGGLE_STEREOSCOPIC","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u0440\u0435\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c"],
["UNDETERMINED_LANGUAGE","\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e"],["UNMUTE","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["UNRECOGNIZED_LANGUAGE","\u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043e"],["VOLUME","\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"]]));a.Xa("th",new Map([["AD_DURATION","\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_PROGRESS","\u0e42\u0e06\u0e29\u0e13\u0e32 [AD_ON] \u0e08\u0e32\u0e01 [NUM_ADS] \u0e23\u0e32\u0e22\u0e01\u0e32\u0e23"],
["AD_STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_TIME","\u0e42\u0e06\u0e29\u0e13\u0e32: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["BACK","\u0e01\u0e25\u0e31\u0e1a"],["CAPTIONS","\u0e04\u0e33\u0e1a\u0e23\u0e23\u0e22\u0e32\u0e22\u0e41\u0e17\u0e19\u0e40\u0e2a\u0e35\u0e22\u0e07"],["CAST","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["CHAPTERS","\u0e1a\u0e17"],["DOWNLOAD_VIDEO_FRAME","\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e40\u0e1f\u0e23\u0e21\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],
["ENTER_LOOP_MODE","\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["ENTER_PICTURE_IN_PICTURE","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["EXIT_FULL_SCREEN","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["EXIT_LOOP_MODE",
"\u0e2b\u0e22\u0e38\u0e14\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["EXIT_PICTURE_IN_PICTURE","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["FAST_FORWARD","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["FULL_SCREEN","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["LANGUAGE","\u0e20\u0e32\u0e29\u0e32"],
["LIVE","\u0e2a\u0e14"],["LOOP","\u0e25\u0e39\u0e1b"],["MORE_SETTINGS","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["MULTIPLE_LANGUAGES","\u0e2b\u0e25\u0e32\u0e22\u0e20\u0e32\u0e29\u0e32"],["MUTE","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["NOT_APPLICABLE","\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["OFF","\u0e1b\u0e34\u0e14"],["ON","\u0e40\u0e1b\u0e34\u0e14"],["PAUSE","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"],
["PICTURE_IN_PICTURE","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["PLAY","\u0e40\u0e25\u0e48\u0e19"],["PLAYBACK_RATE","\u0e04\u0e27\u0e32\u0e21\u0e40\u0e23\u0e47\u0e27\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e25\u0e48\u0e19"],["QUALITY","\u0e04\u0e38\u0e13\u0e20\u0e32\u0e1e"],["RECENTER_VR","\u0e08\u0e31\u0e14\u0e01\u0e36\u0e48\u0e07\u0e01\u0e25\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48"],["REPLAY","\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33"],
["RESOLUTION","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["REWIND","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["SEEK","\u0e04\u0e49\u0e19\u0e2b\u0e32"],["SKIP_AD","\u0e02\u0e49\u0e32\u0e21\u0e42\u0e06\u0e29\u0e13\u0e32"],["SKIP_TO_LIVE","\u0e02\u0e49\u0e32\u0e21\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e01\u0e32\u0e23\u0e16\u0e48\u0e32\u0e22\u0e17\u0e2d\u0e14\u0e2a\u0e14"],["STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34"],["SUBTITLE_FORCED","\u0e1a\u0e31\u0e07\u0e04\u0e31\u0e1a"],
["SURROUND","\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e23\u0e32\u0e27\u0e14\u0e4c"],["TOGGLE_STEREOSCOPIC","\u0e40\u0e1b\u0e34\u0e14/\u0e1b\u0e34\u0e14\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e2a\u0e32\u0e21\u0e21\u0e34\u0e15\u0e34"],["UNDETERMINED_LANGUAGE","\u0e44\u0e21\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14"],["UNMUTE","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["UNRECOGNIZED_LANGUAGE","\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01"],["VOLUME","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"]]));
a.Xa("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_STATISTICS","Reklam istatistikleri"],["AD_TIME","Reklam: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyaz\u0131lar"],["CAST","Yay\u0131nla..."],["CHAPTERS","B\u00f6l\u00fcmler"],["DOWNLOAD_VIDEO_FRAME","Video karesini kaydet"],["ENTER_LOOP_MODE","Mevcut videoyu d\u00f6ng\u00fcye al"],["ENTER_PICTURE_IN_PICTURE","Pencere i\u00e7inde Pencere moduna gir"],
["EXIT_FULL_SCREEN","Tam ekrandan \u00e7\u0131k"],["EXIT_LOOP_MODE","Mevcut videonun d\u00f6ng\u00fcs\u00fcn\u00fc durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencereden \u00c7\u0131k"],["FAST_FORWARD","\u0130leri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canl\u0131"],["LOOP","D\u00f6ng\u00fc"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden \u00e7ok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Ge\u00e7erli de\u011fil"],["OFF","Kapal\u0131"],
["ON","A\u00e7\u0131k"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","\u00c7alma h\u0131z\u0131"],["QUALITY","Kalite"],["RECENTER_VR","Ortala"],["REPLAY","Tekrar Oynat"],["RESOLUTION","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklam\u0131 Atla"],["SKIP_TO_LIVE","Canl\u0131 yay\u0131na atla"],["STATISTICS","\u0130statistikler"],["SUBTITLE_FORCED","Zorunlu"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC",
"Stereoskopik modu a\u00e7/kapat"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi a\u00e7"],["UNRECOGNIZED_LANGUAGE","Tan\u0131nmayan"],["VOLUME","Ses"]]));a.Xa("zh",new Map([["AD_DURATION","\u5e7f\u544a\u6301\u7eed\u65f6\u95f4"],["AD_PROGRESS","\u5e7f\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5e7f\u544a\u7edf\u8ba1\u4fe1\u606f"],["AD_TIME","\u5e7f\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52a8"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e\u2026"],
["CHAPTERS","\u7ae0\u8282"],["DOWNLOAD_VIDEO_FRAME","\u4fdd\u5b58\u89c6\u9891\u5e27"],["ENTER_LOOP_MODE","\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["ENTER_PICTURE_IN_PICTURE","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["EXIT_PICTURE_IN_PICTURE","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["FAST_FORWARD","\u5feb\u8fdb"],
["FULL_SCREEN","\u5168\u5c4f"],["LANGUAGE","\u8bed\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u73af\u64ad\u653e"],["MORE_SETTINGS","\u66f4\u591a\u8bbe\u7f6e"],["MULTIPLE_LANGUAGES","\u591a\u79cd\u8bed\u8a00"],["MUTE","\u9759\u97f3"],["NOT_APPLICABLE","\u4e0d\u9002\u7528"],["OFF","\u5173\u95ed"],["ON","\u5f00\u542f"],["PAUSE","\u6682\u505c"],["PICTURE_IN_PICTURE","\u753b\u4e2d\u753b"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u753b\u8d28"],["RECENTER_VR",
"\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u653e"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7edf\u8ba1\u4fe1\u606f"],["SUBTITLE_FORCED","\u5df2\u5f3a\u5236\u663e\u793a"],["SURROUND","\u73af\u7ed5\u58f0"],["TOGGLE_STEREOSCOPIC","\u5207\u6362\u7acb\u4f53\u58f0"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],
["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.Xa("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5ee3\u544a\u7d71\u8a08\u8cc7\u6599"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["CHAPTERS","\u7ae0\u7bc0"],["DOWNLOAD_VIDEO_FRAME","\u5132\u5b58\u5f71\u7247\u5f71\u683c"],
["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
"\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ri(navigator.languages||
[]);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.Eh;Z.prototype.incrementPitch=Z.prototype.Dh;Z.prototype.incrementYaw=Z.prototype.Fh;Z.prototype.toggleStereoscopicMode=Z.prototype.be;Z.prototype.setVRFieldOfView=Z.prototype.zm;Z.prototype.getVRFieldOfView=Z.prototype.yl;Z.prototype.getVRNorth=Z.prototype.zl;Z.prototype.isPlayingVR=Z.prototype.Yb;Z.prototype.canPlayVR=Z.prototype.Qg;Z.prototype.hideUI=Z.prototype.ij;Z.prototype.showUI=Z.prototype.Bm;
Z.prototype.isOpaque=Z.prototype.Ca;Z.prototype.hideAdUI=Z.prototype.hj;Z.prototype.showAdUI=Z.prototype.Xj;Z.prototype.togglePiP=Z.prototype.dd;Z.prototype.isPiPEnabled=Z.prototype.Nd;Z.prototype.isPiPAllowed=Z.prototype.Jf;Z.prototype.toggleFullScreen=Z.prototype.ug;Z.prototype.isFullScreenEnabled=Z.prototype.wb;Z.prototype.isFullScreenSupported=Z.prototype.Ae;Z.prototype.hideSettingsMenus=Z.prototype.Xc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Nc;Z.prototype.setLastTouchEventTime=Z.prototype.Sj;
Z.prototype.getDisplayTime=Z.prototype.wh;Z.prototype.isCastAllowed=Z.prototype.Gl;Z.prototype.setSeeking=Z.prototype.mi;Z.prototype.isSeeking=Z.prototype.Ll;Z.prototype.getConfig=Z.prototype.Mk;Z.prototype.getClientSideAdContainer=Z.prototype.Lk;Z.prototype.getServerSideAdContainer=Z.prototype.ol;Z.prototype.getControlsContainer=Z.prototype.Pk;Z.prototype.getLocalPlayer=Z.prototype.Xk;Z.prototype.getPlayer=Z.prototype.Xb;Z.prototype.getLocalVideo=Z.prototype.Yk;Z.prototype.getVideo=Z.prototype.Wc;
Z.prototype.getVideoContainer=Z.prototype.Bl;Z.prototype.getLocalization=Z.prototype.Zk;Z.prototype.getCastProxy=Z.prototype.Ik;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Rj;Z.prototype.setEnabledShakaControls=Z.prototype.ji;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ol;Z.prototype.allowCast=Z.prototype.tk;Z.registerSeekBar=function(a){OI=a};Z.registerElement=wI;Z.prototype.destroy=Z.prototype.destroy;
var xI=new Map,OI=new FH;function WI(a,b){function c(){return XI(d)}ZG.call(this,a,b);var d=this;this.m=this.controls.g;this.l=this.controls.i;this.u=this.controls.l;this.j=[];YI(this);this.g=W("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");this.l.appendChild(this.g);ZI(this);this.eventManager.o(this.localization,"locale-updated",function(){$I(d)});this.eventManager.o(this.localization,
"locale-changed",function(){$I(d)});this.eventManager.o(this.adManager,"ad-started",function(){d.ad&&d.ad.isLinear()&&eH(d.h,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){eH(d.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){eH(d.g,!1)});this.eventManager.o(this.g,"touchstart",function(e){d.controls.Sj(Date.now());e.stopPropagation()});this.eventManager.o(this.h,"click",function(){d.controls.Ca()&&aJ(d)});$I(this);this.ad&&this.ad.isLinear()&&eH(this.h,!1);this.i=
null;window.ResizeObserver?(this.i=new ResizeObserver(c),this.i.observe(this.controls.l)):this.eventManager.o(window,"resize",c)}pa(WI,ZG);WI.prototype.release=function(){this.l=null;for(var a=u(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[];this.i&&(this.i.disconnect(),this.i=null);ZG.prototype.release.call(this)};function bJ(a,b){cJ.set(a,b)}
function YI(a){a.h=Yj();a.h.classList.add("shaka-overflow-menu-button");a.h.classList.add("shaka-no-propagation");a.h.classList.add("shaka-tooltip");(new $G(a.h)).use("M433-80q-27 0-46.5-18T363-142l-9-66q-13-5-24.5-12T307-235l-62 26q-25 11-50 2t-39-32l-47-82q-14-23-8-49t27-43l53-40q-1-7-1-13.5v-27q0-6.5 1-13.5l-53-40q-21-17-27-43t8-49l47-82q14-23 39-32t50 2l62 26q11-8 23-15t24-12l9-66q4-26 23.5-44t46.5-18h94q27 0 46.5 18t23.5 44l9 66q13 5 24.5 12t22.5 15l62-26q25-11 50-2t39 32l47 82q14 23 8 49t-27 43l-53 40q1 7 1 13.5v27q0 6.5-2 13.5l53 40q21 17 27 43t-8 49l-48 82q-14 23-39 32t-50-2l-60-26q-11 8-23 15t-24 12l-9 66q-4 26-23.5 44T527-80h-94Zm49-260q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Z");
var b=W("span");b.classList.add("shaka-overflow-quality-mark");b.style.display="none";a.h.appendChild(b);a.parent.appendChild(a.h)}function ZI(a){for(var b=u(a.m.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,cJ.get(c)?(c=cJ.get(c),a.j.push(c.create(a.g,a.controls))):db("Unrecognized overflow menu element requested:",c)}
function aJ(a){if(a.controls.Nc())a.controls.Xc();else{eH(a.g,!0);lI(a.controls);var b=function(c){return c.classList.contains("shaka-hidden")==0};nb(a.g.childNodes,b)&&ob(a.g.childNodes,b)[0].focus();XI(a)}}function $I(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}function XI(a){var b=a.g.getBoundingClientRect(),c=window.getComputedStyle(a.g),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.u.getBoundingClientRect();a.g.style.maxHeight=b.bottom-e.top-d-c+"px"}
S("shaka.ui.OverflowMenu",WI);WI.registerElement=bJ;function dJ(){}dJ.prototype.create=function(a,b){return new WI(a,b)};wI("overflow_menu",new dJ);var cJ=new Map;function eJ(a,b){function c(e){return d.i[e]}ZG.call(this,a,b);var d=this;this.h=Yj();this.h.classList.add("shaka-ad-statistics-button");this.u=new $G(this.h,"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.A=W("span");a.appendChild(this.A);this.l=W("span");this.l.classList.add("shaka-current-selection-span");a.appendChild(this.l);this.h.appendChild(a);this.parent.appendChild(this.h);this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");
this.controls.i.appendChild(this.g);this.D=[];this.i=this.adManager.getStats();eH(this.h,this.i.started>0);this.m=new Map;this.C=(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.j=new Sf(function(){d.i=d.adManager.getStats();for(var e=u(d.D),f=e.next();!f.done;f=e.next())f=f.value,d.m.get(f).textContent=
d.C.get(f)(f)});fJ(this);gJ(this);this.eventManager.o(this.localization,"locale-updated",function(){fJ(d)});this.eventManager.o(this.localization,"locale-changed",function(){fJ(d)});this.eventManager.o(this.h,"click",function(){d.controls.Ca()&&(hJ(d),fJ(d))});this.eventManager.o(this.player,"loading",function(){eH(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){eH(d.h,!0)})}pa(eJ,ZG);
function hJ(a){a.g.classList.contains("shaka-hidden")?(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-440q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),a.j.xa(.1),
eH(a.g,!0)):(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),
a.j.stop(),eH(a.g,!1))}function fJ(a){a.A.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.l.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}function iJ(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.C.get(b)(b);c.appendChild(d);a.m.set(b,d);return c}
function gJ(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=(new $G(b,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z")).g;c.classList.add("material-icons","notranslate");a.g.appendChild(b);a.eventManager.o(c,"click",function(){hJ(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(iJ(a,c)),a.D.push(c)):db("Unrecognized ad statistic element:",c)}eJ.prototype.release=function(){this.j.stop();this.j=null;ZG.prototype.release.call(this)};S("shaka.ui.AdStatisticsButton",eJ);function jJ(){}jJ.prototype.create=function(a,b){return new eJ(a,b)};bJ("ad_statistics",new jJ);jH("ad_statistics",new jJ);function kJ(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";(new $G(this.g)).use("M80-280v-480q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v480q0 33-23.5 56.5T800-200h-80q-17 0-28.5-11.5T680-240q0-17 11.5-28.5T720-280h80v-480H160v480h80q17 0 28.5 11.5T280-240q0 17-11.5 28.5T240-200h-80q-33 0-56.5-23.5T80-280Zm232 160q-14 0-22-9.5t-8-20.5q0-5 2-10.5t7-10.5l161-161q6-6 13-9t15-3q8 0 15 3t13 9l161 161q5 5 7 10.5t2 10.5q0 11-8 20.5t-22 9.5H312Zm168-360Z");
window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);lJ(this);mJ(this);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.Ca()&&c.controls.Wc().webkitShowPlaybackTargetPicker()});a=this.controls.Wc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=c.player.Ac()==Nr;eH(c.g,d.availability=="available"&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){mJ(c)})}pa(kJ,ZG);
function mJ(a){var b=a.controls.Wc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function lJ(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.i.textContent=a.localization.resolve("AIRPLAY")}S("shaka.ui.AirPlayButton",kJ);function nJ(){}nJ.prototype.create=function(a,b){return new kJ(a,b)};bJ("airplay",new nJ);wI("airplay",new nJ);function oJ(a,b){ZG.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);pJ(this);this.i=this.h=null;window.ResizeObserver?(this.i=new ResizeObserver(function(){return pJ(c)}),this.i.observe(this.parent)):window.addEventListener("resize",function(){return pJ(c)})}pa(oJ,ZG);function qJ(a){return(a=a.g.getContext("2d"))?a:null}
function pJ(a){a.g.width=a.parent.offsetWidth;a.g.height=a.parent.offsetHeight}
oJ.prototype.ng=function(a,b){a={type:"static",text:a,position:"top-right",color:"rgba(255, 255, 255, 0.7)",size:20,alpha:.7,interval:2E3,skip:500,displayDuration:2E3,transitionDuration:.5};b=Object.assign({},a,b||a);if(b.type==="static"){if(a=qJ(this)){a.clearRect(0,0,this.g.width,this.g.height);a.globalAlpha=b.alpha;a.fillStyle=b.color;a.font=b.size+"px Arial";var c=a.measureText(b.text);switch(b.position){case "top-left":c=20;var d=b.size+20;break;case "top-right":c=this.g.width-c.width-20;d=b.size+
20;break;case "bottom-left":c=20;d=this.g.height-20;break;case "bottom-right":c=this.g.width-c.width-20;d=this.g.height-20;break;default:c=(this.g.width-c.width)/2,d=(this.g.height+b.size)/2}a.fillText(b.text,c,d)}}else b.type==="dynamic"&&rJ(this,b)};
function rJ(a,b){function c(){if(a.h){e.clearRect(0,0,a.g.width,a.g.height);switch(h){case "fadeIn":g=Math.min(b.alpha,g+l);g>=b.alpha&&(h="display");break;case "display":--k<=0&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),g<=0&&(h="transition",f=d(),k=Math.round(b.displayDuration*60),h="fadeIn")}g>0&&(e.globalAlpha=g,e.fillStyle=b.color,e.font=b.size+"px Arial",e.fillText(b.text,f.left,f.top));a.h&&(a.h=requestAnimationFrame(c))}}function d(){e.font=b.size+"px Arial";var n=e.measureText(b.text).width,
q=b.size;n=[{left:20,top:q+20},{left:a.g.width-n-20,top:q+20},{left:20,top:a.g.height-20},{left:a.g.width-n-20,top:a.g.height-20},{left:(a.g.width-n)/2,top:(a.g.height+q)/2}];q=n[m];m=(m+1)%n.length;return q}var e=a.g.getContext("2d"),f={left:0,top:0},g=0,h="fadeIn",k=Math.round(b.displayDuration*60),l=1/(Math.round(b.transitionDuration*60)/2),m=0;f=d();a.h=requestAnimationFrame(c)}
oJ.prototype.eg=function(){this.h&&(cancelAnimationFrame(this.h),this.h=null);var a=qJ(this);a&&a.clearRect(0,0,this.g.width,this.g.height)};oJ.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 pJ(a)});ZG.prototype.release.call(this)};S("shaka.ui.Watermark",oJ);oJ.prototype.removeWatermark=oJ.prototype.eg;oJ.prototype.setTextWatermark=oJ.prototype.ng;function sJ(a,b,c,d){d=d===void 0?null:d;this.j=a;this.l=b;this.h=tJ(this);var e="",f=!1;b.dataset&&b.dataset.shakaPlayerCastReceiverId?(f=b.dataset,e=f.shakaPlayerCastReceiverId,f=f.shakaPlayerCastAndroidReceiverCompatible==="true"):c.dataset&&c.dataset.shakaPlayerCastReceiverId&&(f=c.dataset,e=f.shakaPlayerCastReceiverId,f=f.shakaPlayerCastAndroidReceiverCompatible==="true");e.length&&(this.h.castReceiverAppId=e,this.h.castAndroidReceiverCompatible=f);b.dataset.shakaPlayerContainer="";b.ui=this;
this.Kh()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);c.controls||a.ni(b);b.ui=this;c.ui=this;this.i=null}p=sJ.prototype;p.destroy=function(a){a=a===void 0?!1:a;var b=this;return O(function(c){if(c.g==1)return b.g?H(c,b.g.destroy(a),2):c.B(2);if(c.g!=4)return b.g=null,b.j?H(c,b.j.destroy(),4):c.B(4);b.j=null;b.i=null;I(c)})};p.Kh=function(){return $b().Oa()=="MOBILE"};p.Lh=function(){return $b().Oa()=="TV"};
p.getConfiguration=function(){var a=tJ(this);Qn(a,this.h,tJ(this),{},"");return a};
p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Rn(a,b));var c=Object.assign({},this.h);Qn(c,a,tJ(this),{},"");var d=Tn(c,this.h);if(Object.keys(d).length&&(this.h=c,this.g.configure(this.h),this.g.dispatchEvent(new T("uiupdated")),(c=this.h.castSenderUrl)&&this.h.castReceiverAppId&&window.chrome&&!chrome.cast&&!this.Lh())){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.Ok=function(){return this.g};p.xm=function(a){this.g.ji(a)};p.ng=function(a,b){a&&!this.i&&this.l&&this.g&&(this.i=new oJ(this.l,this.g));this.i&&this.i.ng(a,b)};p.eg=function(){this.i&&this.i.eg()};
function tJ(a){var b="play_pause skip_previous skip_next mute volume time_and_duration spacer overflow_menu".split(" ");window.chrome&&b.push("cast");"remote"in HTMLMediaElement.prototype?b.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.push("airplay");b.push("fullscreen");b={controlPanelElements:b,overflowMenuButtons:"captions quality language chapter picture_in_picture playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height currentCodecs corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),
adStatisticsList:"loadTimes averageLoadTime started overlayAds playedCompletely skipped errors".split(" "),contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",
buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},qualityMarks:{720:"",1080:"HD",1440:"2K",2160:"4K",4320:"8K"},trackLabelFormat:uJ,textTrackLabelFormat:uJ,fadeDelay:0,closeMenusDelay:2,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!1,forceLandscapeOnFullscreen:!1,enableTooltips:!0,keyboardSeekDistance:5,
keyboardLargeSeekDistance:60,fullScreenElement:a.l,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!1,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular",setupMediaSession:!0,preferVideoFullScreenInVisionOS:!0,showAudioCodec:!0,showVideoCodec:!0,castSenderUrl:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",enableKeyboardPlaybackControlsInWindow:!1,alwaysShowVolumeBar:!1};if(a.Kh()){b.addBigPlayButton=!0;b.singleClickForPlayAndPause=
!1;b.seekOnTaps=!0;b.enableTooltips=!1;b.doubleClickForFullscreen=!1;a=$b();b.enableFullscreenOnRotation=a.Ja()!=="WEBKIT";b.forceLandscapeOnFullscreen=!0;var c=["play_pause","skip_previous","skip_next","volume"];b.controlPanelElements=b.controlPanelElements.filter(function(e){return!c.includes(e)});b.overflowMenuButtons=b.overflowMenuButtons.filter(function(e){return!c.includes(e)});b.contextMenuElements=b.contextMenuElements.filter(function(e){return!c.includes(e)})}else if(a.Lh()){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 vJ(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,D,G;return O(function(B){switch(B.g){case 1:oD();if(!jr())return wJ("shaka-ui-load-failed",xJ),B.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){B.B(2);break}if(b.length&&!a.length){B.B(3);break}e=u(a);f=e.next();case 5:if(f.done){B.B(2);
break}g=f.value;if(g.ui){B.B(6);break}h=null;k=u(b);for(l=k.next();!l.done;l=k.next())if(m=l.value,m.parentElement==g){h=m;break}h||(h=document.createElement("video"),h.setAttribute("playsinline",""),g.appendChild(h));n=yJ(g,c,d);q=n.pj;r=n.pk;va(B,8);return H(B,zJ(g,h,q,r),10);case 10:xa(B,6);break;case 8:return ya(B),wJ("shaka-ui-load-failed",AJ),B.return();case 6:f=e.next();B.B(5);break;case 3:t=u(b),v=t.next();case 11:if(v.done){B.B(2);break}w=v.value;if(w.ui){B.B(12);break}z=document.createElement("div");
y=w.parentElement;y.replaceChild(z,w);z.appendChild(w);A=yJ(z,c,d);D=A.pj;G=A.pk;va(B,14);return H(B,zJ(z,w,D,G),16);case 16:xa(B,12);break;case 14:return ya(B),wJ("shaka-ui-load-failed",AJ),B.return();case 12:v=t.next();B.B(11);break;case 2:wJ("shaka-ui-loaded"),I(B)}})}function wJ(a,b){var c=null;b!=void 0&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
function zJ(a,b,c,d){var e,f,g,h,k,l,m,n,q,r;return O(function(t){switch(t.g){case 1:e=new X;f=[];if(g=b.getAttribute("src"))f.push(g),b.removeAttribute("src");h=u(b.getElementsByTagName("source"));for(k=h.next();!k.done;k=h.next())l=k.value,f.push(l.src),b.removeChild(l);return H(t,e.Ub(b),2);case 2:e.Li(c),m=new sJ(e,a,b,d?d:null),b.controls&&m.g.Rj(!0),n=u(f),q=n.next();case 3:if(q.done){t.B(0);break}r=q.value;va(t,6);return H(t,m.g.Xb().load(r),8);case 8:t.B(0);break;case 6:ya(t);case 4:q=n.next(),
t.B(3)}})}function yJ(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{pj:d,pk:b}}S("shaka.ui.Overlay",sJ);sJ.prototype.removeWatermark=sJ.prototype.eg;sJ.prototype.setTextWatermark=sJ.prototype.ng;sJ.prototype.setEnabled=sJ.prototype.xm;
sJ.prototype.getControls=sJ.prototype.Ok;sJ.prototype.configure=sJ.prototype.configure;sJ.prototype.getConfiguration=sJ.prototype.getConfiguration;sJ.prototype.isSmartTV=sJ.prototype.Lh;sJ.prototype.isMobile=sJ.prototype.Kh;sJ.prototype.destroy=sJ.prototype.destroy;var uJ=0;sJ.TrackLabelFormat={LANGUAGE:uJ,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var xJ=0,AJ=1;sJ.FailReasonCode={NO_BROWSER_SUPPORT:xJ,PLAYER_FAILED_TO_LOAD:AJ};
document.readyState=="complete"?O(function(a){if(a.g==1)return H(a,Promise.resolve(),2);vJ();I(a)}):window.addEventListener("load",vJ);function BJ(a){function b(d){return{codecs:d.codecs,channelCount:d.channelCount,language:d.language,roles:d.roles,spatialAudio:d.spatialAudio}}var c=b(a[0]);return a.every(function(d){return JSON.stringify(b(d))===JSON.stringify(c)})}
function CJ(a,b,c,d,e,f,g,h){function k(F){var J="";F=="aac"?J="AAC":F==="ac-3"?J="Dolby":F==="ec-3"?J="DD+":F==="ac-4"?J="Dolby AC-4":F==="opus"?J="Opus":F==="flac"&&(J="fLaC");return J?" "+J:J}function l(F){var J="";F>=5&&(J=" "+e.resolve("SURROUND"));return J}function m(F,J,L,P,Q,N){J=[F,J,N];g&&P!=null&&J.push(P);h&&n(F)&&Q&&J.push(Q);L&&f==3&&J.push(L);return J.join(": ")}function n(F){return r.has(F)&&r.get(F).size>1}var q=a.find(function(F){return F.active==1});a.length>1&&a[0].label&&f!=3&&
BJ(a)&&(f=3);for(var r=new Map,t=u(a),v=t.next();!v.done;v=t.next())v=v.value,v.codecs&&(r.has(v.language)||r.set(v.language,new Set),r.get(v.language).add(yf(v.codecs)));t=aH(b);ck(b);b.appendChild(t);t=new Set;q=q?m(q.language,q.roles.join(", "),q.label,q.channelsCount,q.codecs&&yf(q.codecs),q.spatialAudio):"";a=u(a);var w=a.next();for(v={};!w.done;v={cc:void 0},w=a.next()){v.cc=w.value;w=v.cc.language;var z=v.cc.roles.join(", "),y=v.cc.label,A=v.cc.channelsCount,D=v.cc.codecs&&yf(v.cc.codecs),
G=v.cc.spatialAudio,B=m(w,z,y,A,D,G);if(!t.has(B)){t.add(B);var E=Yj();E.addEventListener("click",function(F){return function(){c(F.cc)}}(v));var C=W("span");E.appendChild(C);C.textContent=DJ(w,e);var K="";h&&g&&G&&(D=="ec-3"||D=="ac-4")?K+=" Dolby Atmos":(h&&n(w)&&(K+=k(D)),g&&(K+=l(A)));switch(f){case uJ:C.textContent+=K;break;case 1:C.textContent+=K;z?C.textContent=z:(db("Track #"+JSON.stringify(v.cc)+" does not have a role, but the UI is configured to only show role."),C.textContent="?");break;
case 2:C.textContent+=K;z&&(C.textContent+=": "+z);break;case 3:y?C.textContent=y:(db("Track #"+JSON.stringify(v.cc)+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}B==q&&(E.appendChild(dH()),C.classList.add("shaka-chosen-item"),E.ariaSelected="true",d.textContent=C.textContent);b.appendChild(E)}}}
function EJ(a,b,c,d,e,f,g){function h(A,D,G,B){A=[A,D,B];G&&g==3&&A.push(G);return A.join(": ")}var k=a.find(function(A){return A.active==1}),l=aH(b);ck(b);b.appendChild(l);l=new Set;k=k?h(k.language,k.roles.join(", "),k.label,k.forced):"";a=u(a);for(var m=a.next(),n={};!m.done;n={ed:void 0},m=a.next()){n.ed=m.value;m=n.ed.language;var q=n.ed.forced,r=f.resolve("SUBTITLE_FORCED"),t=n.ed.roles.join(", "),v=n.ed.label,w=h(m,t,v,q);if(!l.has(w)){l.add(w);var z=Yj();z.addEventListener("click",function(A){return function(){c(A.ed)}}(n));
var y=W("span");z.appendChild(y);y.textContent=DJ(m,f);switch(g){case uJ:q&&(y.textContent+=" ("+r+")");break;case 1:t?y.textContent=t:(db("Track #"+n.ed.id+" does not have a role, but the UI is configured to only show role."),y.textContent="?");q&&(y.textContent+=" ("+r+")");break;case 2:t&&(y.textContent+=": "+t);q&&(y.textContent+=" ("+r+")");break;case 3:v?y.textContent=v:(db("Track #"+n.ed.id+" does not have a label, but the UI is configured to only show labels."),y.textContent="?")}d&&w==k&&
(z.appendChild(dH()),y.classList.add("shaka-chosen-item"),z.ariaSelected="true",e.textContent=y.textContent);b.appendChild(z)}}}function DJ(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=Qc(a);return a in bp?bp[a]:c in bp?bp[c]+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function FJ(a,b,c){function d(){return GJ(e)}ZG.call(this,a,b);var e=this;this.m=this.controls.l;HJ(this,c);IJ(this);JJ(this);this.eventManager.o(this.button,"click",function(){e.controls.Ca()&&(e.menu.classList.contains("shaka-hidden")?(e.controls.dispatchEvent(new T("submenuopen")),eH(e.menu,!0),cH(e.menu),GJ(e)):eH(e.menu,!1))});this.j=null;window.ResizeObserver?(this.j=new ResizeObserver(d),this.j.observe(this.controls.l)):this.eventManager.o(window,"resize",d)}pa(FJ,ZG);
FJ.prototype.release=function(){this.j&&(this.j.disconnect(),this.j=null);ZG.prototype.release.call(this)};
function HJ(a,b){a.button=Yj();a.button.classList.add("shaka-overflow-button");a.icon=new $G(a.button,b);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");b.classList.add("shaka-overflow-button-label-inline");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
function IJ(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=Yj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Xc()});a.u=new $G(a.backButton,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z");
a.backSpan=W("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
function JJ(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.u.use("m432-480 156 156q11 11 11 28t-11 28q-11 11-28 11t-28-11L348-452q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l184-184q11-11 28-11t28 11q11 11 11 28t-11 28L432-480Z"),a.eventManager.o(a.menu,"click",function(){function b(c){return c.classList.contains("shaka-hidden")==0}eH(a.menu,!1);eH(a.parent,!0);nb(a.parent.childNodes,b)&&ob(a.parent.childNodes,b)[0].focus();lI(a.controls);GJ(a)}))}
function GJ(a){var b=a.menu.getBoundingClientRect(),c=window.getComputedStyle(a.menu),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.m.getBoundingClientRect();a.menu.style.maxHeight=b.bottom-e.top-d-c+"px"}S("shaka.ui.SettingsMenu",FJ);function KJ(a,b){FJ.call(this,a,b,"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z");
var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){LJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){LJ(c)});this.eventManager.o(this.player,"loading",function(){MJ(c)});this.eventManager.o(this.player,"loaded",function(){MJ(c)});this.eventManager.o(this.player,"unloading",function(){MJ(c)});this.eventManager.o(this.player,
"audiotrackschanged",function(){MJ(c)});LJ(this);MJ(this)}pa(KJ,FJ);
function MJ(a){var b=a.player.getAudioTracks()||[];CJ(b,a.menu,function(c){a.player.Nj(c);var d={preferredAudioLanguage:c.language,preferSpatialAudio:c.spatialAudio};c.label&&(d.preferredAudioLabel=c.label);c.channelsCount&&(d.preferredAudioChannelCount=c.channelsCount);a.player.configure(d)},a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants,a.controls.g.showAudioCodec);cH(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));
a.button.setAttribute("shaka-status",a.currentSelection.innerText);eH(a.button,a.menu.getElementsByTagName("button").length>2)}function LJ(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",KJ);function NJ(){}NJ.prototype.create=function(a,b){return new KJ(a,b)};bJ("language",new NJ);
wI("language",new NJ);function OJ(a,b){ZG.call(this,a,b);var c=this;this.h=this.controls.F;this.g=Yj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.l=new $G(this.g,"M480-480Zm320 320H600q0-20-1.5-40t-4.5-40h206v-480H160v46q-20-3-40-4.5T80-680v-40q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160Zm-720 0v-120q50 0 85 35t35 85H80Zm200 0q0-83-58.5-141.5T80-360v-80q117 0 198.5 81.5T360-160h-80Zm160 0q0-75-28.5-140.5t-77-114q-48.5-48.5-114-77T80-520v-80q91 0 171 34.5T391-471q60 60 94.5 140T520-160h-80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);PJ(this);QJ(this);this.eventManager.o(this.localization,"locale-updated",function(){PJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){PJ(c)});
this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&RJ(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){QJ(c)})}pa(OJ,ZG);function RJ(a){var b;O(function(c){if(c.g==1){if(a.h.Pa())return a.h.bk(),c.B(0);va(c,3);a.g.disabled=!0;return H(c,a.h.cast(),5)}if(c.g!=3)return a.g.disabled=!1,xa(c,0);b=ya(c);a.g.disabled=!1;b.code!=8004&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));I(c)})}
function QJ(a){var b=a.h.Pg()&&a.controls.ua,c=a.h.Pa();eH(a.g,b);a.l.use(c?"M720-600v240q0 17-11.5 28.5T680-320h-87q-8 0-14.5-4.5T569-337q-29-81-81.5-147T364-596q-16-10-11.5-27t21.5-17h306q17 0 28.5 11.5T720-600ZM320-160q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125.5T518-201q2 17-9.5 29T480-160Zm-340 0q-25 0-42.5-17.5T80-220q0-25 17.5-42.5T140-280q25 0 42.5 17.5T200-220q0 25-17.5 42.5T140-160Zm740-560v480q0 33-23.5 56.5T800-160H638q-17 0-28.5-11.5T598-200q0-17 11.5-28.5T638-240h162v-480H160v6q0 17-11.5 28.5T120-674q-17 0-28.5-11.5T80-714v-6q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720Z":
"M480-480Zm320 320H600q0-20-1.5-40t-4.5-40h206v-480H160v46q-20-3-40-4.5T80-680v-40q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160Zm-720 0v-120q50 0 85 35t35 85H80Zm200 0q0-83-58.5-141.5T80-360v-80q117 0 198.5 81.5T360-160h-80Zm160 0q0-75-28.5-140.5t-77-114q-48.5-48.5-114-77T80-520v-80q91 0 171 34.5T391-471q60 60 94.5 140T520-160h-80Z");b&&(a.g.ariaPressed=c?"true":"false");SJ(a)}function SJ(a){a.i.textContent=a.h.Pa()?a.h.cg():a.localization.resolve("OFF")}
function PJ(a){a.g.ariaLabel=a.localization.resolve("CAST");a.j.textContent=a.localization.resolve("CAST");SJ(a)}S("shaka.ui.CastButton",OJ);function TJ(){}TJ.prototype.create=function(a,b){return new OJ(a,b)};bJ("cast",new TJ);wI("cast",new TJ);function UJ(a,b){FJ.call(this,a,b,"m400-200-182 91q-20 10-39-1.5T160-145v-495q0-33 23.5-56.5T240-720h320q33 0 56.5 23.5T640-640v495q0 23-19 34.5t-39 1.5l-182-91Zm360-40q-17 0-28.5-11.5T720-280v-520H320q-17 0-28.5-11.5T280-840q0-17 11.5-28.5T320-880h400q33 0 56.5 23.5T800-800v520q0 17-11.5 28.5T760-240Z");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,
"locale-updated",function(){VJ(c);WJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){VJ(c);WJ(c)});this.eventManager.o(this.player,"unloading",function(){XJ(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",function(){WJ(c)});VJ(this);WJ(this)}pa(UJ,FJ);
function VJ(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 XJ(a){var b=aH(a.menu);ck(a.menu);a.menu.appendChild(b);eH(a.button,!1)}
function WJ(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t;O(function(v){switch(v.g){case 1:b=function(w,z){return!w&&!z||w.id===z.id&&w.title===z.title&&w.startTime===z.startTime&&w.endTime===z.endTime},c="und",d=[],e=a.localization.g,f=u(Array.from(e)),g=f.next();case 2:if(g.done){v.B(4);break}c=h=g.value;if(!a.player){v.B(5);break}return H(v,a.player.uh(c),6);case 6:d=v.h||[];case 5:if(d.length){v.B(4);break}g=f.next();v.B(2);break;case 4:if(d.length){v.B(7);break}c="und";if(!a.player){v.B(7);break}return H(v,
a.player.uh(c),9);case 9:d=v.h||[];case 7:k=c!==a.h;l=a.g.length!==d.length||!a.g.some(function(w,z){z=d.at(z);return b(w,z)||d.some(function(y){return b(w,y)})});a.h=c;a.g=d;if(!d.length)XJ(a);else if(k||l){m=u(a.g);n=m.next();for(q={};!n.done;q={Rg:void 0},n=m.next())q.Rg=n.value,r=Yj(),t=W("span"),t.classList.add("shaka-chapter"),t.textContent=q.Rg.title,r.appendChild(t),a.eventManager.o(r,"click",function(w){return function(){a.controls.Ca()&&(a.video.currentTime=w.Rg.startTime)}}(q)),a.menu.appendChild(r);
eH(a.button,!0);cH(a.menu)}I(v)}})}S("shaka.ui.ChapterSelection",UJ);function YJ(){}YJ.prototype.create=function(a,b){return new UJ(a,b)};bJ("chapter",new YJ);wI("chapter",new YJ);function ZJ(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");(new $G(this.g)).use("M100-315v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T428-480q0 10-4.5 18.5T410-447L162-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Zm400 0v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T828-480q0 10-4.5 18.5T810-447L562-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z");this.parent.appendChild(this.g);
$J(this);this.h=this.controls.g.fastForwardRates;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.Ca()&&c.video.duration){var d=c.h.indexOf(c.player.Za())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.vc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",
c.player.Za()+"x")})}pa(ZJ,ZG);function $J(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",ZJ);function aK(){}aK.prototype.create=function(a,b){return new ZJ(a,b)};wI("fast_forward",new aK);function bK(a,b){ZG.call(this,a,b);var c=this;this.h=this.controls.u;this.g=Yj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("shaka-tooltip");this.i=new $G(this.g,"M200-200h80q17 0 28.5 11.5T320-160q0 17-11.5 28.5T280-120H160q-17 0-28.5-11.5T120-160v-120q0-17 11.5-28.5T160-320q17 0 28.5 11.5T200-280v80Zm560 0v-80q0-17 11.5-28.5T800-320q17 0 28.5 11.5T840-280v120q0 17-11.5 28.5T800-120H680q-17 0-28.5-11.5T640-160q0-17 11.5-28.5T680-200h80ZM200-760v80q0 17-11.5 28.5T160-640q-17 0-28.5-11.5T120-680v-120q0-17 11.5-28.5T160-840h120q17 0 28.5 11.5T320-800q0 17-11.5 28.5T280-760h-80Zm560 0h-80q-17 0-28.5-11.5T640-800q0-17 11.5-28.5T680-840h120q17 0 28.5 11.5T840-800v120q0 17-11.5 28.5T800-640q-17 0-28.5-11.5T760-680v-80Z");
cK(this);this.parent.appendChild(this.g);dK(this);this.eventManager.o(this.localization,"locale-updated",function(){dK(c)});this.eventManager.o(this.localization,"locale-changed",function(){dK(c)});this.eventManager.o(this.g,"click",function(){return O(function(d){return c.controls.Ca()?H(d,c.controls.ug(),0):d.return()})});this.eventManager.o(document,"fullscreenchange",function(){c.i.use(c.controls.wb()?"M240-240h-80q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h120q17 0 28.5 11.5T320-280v120q0 17-11.5 28.5T280-120q-17 0-28.5-11.5T240-160v-80Zm480 0v80q0 17-11.5 28.5T680-120q-17 0-28.5-11.5T640-160v-120q0-17 11.5-28.5T680-320h120q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240h-80ZM240-720v-80q0-17 11.5-28.5T280-840q17 0 28.5 11.5T320-800v120q0 17-11.5 28.5T280-640H160q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h80Zm480 0h80q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H680q-17 0-28.5-11.5T640-680v-120q0-17 11.5-28.5T680-840q17 0 28.5 11.5T720-800v80Z":
"M200-200h80q17 0 28.5 11.5T320-160q0 17-11.5 28.5T280-120H160q-17 0-28.5-11.5T120-160v-120q0-17 11.5-28.5T160-320q17 0 28.5 11.5T200-280v80Zm560 0v-80q0-17 11.5-28.5T800-320q17 0 28.5 11.5T840-280v120q0 17-11.5 28.5T800-120H680q-17 0-28.5-11.5T640-160q0-17 11.5-28.5T680-200h80ZM200-760v80q0 17-11.5 28.5T160-640q-17 0-28.5-11.5T120-680v-120q0-17 11.5-28.5T160-840h120q17 0 28.5 11.5T320-800q0 17-11.5 28.5T280-760h-80Zm560 0h-80q-17 0-28.5-11.5T640-800q0-17 11.5-28.5T680-840h120q17 0 28.5 11.5T840-800v120q0 17-11.5 28.5T800-640q-17 0-28.5-11.5T760-680v-80Z");
dK(c)});this.eventManager.o(this.h,"loadedmetadata",function(){cK(c)});this.eventManager.o(this.h,"loadeddata",function(){cK(c)});this.eventManager.o(this.adManager,"ad-started",function(){cK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){cK(c)})}pa(bK,ZG);function cK(a){a.controls.Ae()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function dK(a){var b=a.controls.wb()?"EXIT_FULL_SCREEN":"FULL_SCREEN";a.g.ariaLabel=a.localization.resolve(b)}
S("shaka.ui.FullscreenButton",bK);function eK(){}eK.prototype.create=function(a,b){return new bK(a,b)};wI("fullscreen",new eK);function fK(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.m=new $G(this.g,"m274-200 34 34q12 12 11.5 28T308-110q-12 12-28.5 12.5T251-109L148-212q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l103-103q12-12 28.5-11.5T308-370q11 12 11.5 28T308-314l-34 34h406v-120q0-17 11.5-28.5T720-440q17 0 28.5 11.5T760-400v120q0 33-23.5 56.5T680-200H274Zm412-480H280v120q0 17-11.5 28.5T240-520q-17 0-28.5-11.5T200-560v-120q0-33 23.5-56.5T280-760h406l-34-34q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T709-851l103 103q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L709-589q-12 12-28.5 11.5T652-590q-11-12-11.5-28t11.5-28l34-34Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.j=W("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);gK(this);this.parent.appendChild(this.g);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.Ca()&&(c.video.loop=!c.video.loop,c.h.Ka(),c.h.xa(1))});this.l=this.video.loop;this.h=new Sf(function(){c.l!=c.video.loop&&(gK(c),c.l=c.video.loop)});this.h.xa(1);this.eventManager.o(this.player,"unloading",function(){hK(c)});this.eventManager.o(this.player,"loaded",function(){hK(c)});this.eventManager.o(this.player,"manifestupdated",function(){hK(c)});this.eventManager.o(this.video,"durationchange",function(){hK(c)})}
pa(fK,ZG);fK.prototype.release=function(){this.h.stop();this.h=null;ZG.prototype.release.call(this)};
function gK(a){a.j.textContent=a.localization.resolve("LOOP");a.i.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.m.use(a.video.loop?"M120-40q-33 0-56.5-23.5T40-120v-720q0-33 23.5-56.5T120-920h720q33 0 56.5 23.5T920-840v720q0 33-23.5 56.5T840-40H120Zm154-160h406q33 0 56.5-23.5T760-280v-120q0-17-11.5-28.5T720-440q-17 0-28.5 11.5T680-400v120H274l34-34q12-12 11.5-28T308-370q-12-12-28.5-12.5T251-371L148-268q-6 6-8.5 13t-2.5 15q0 8 2.5 15t8.5 13l103 103q12 12 28.5 11.5T308-110q11-12 11.5-28T308-166l-34-34Zm412-480-34 34q-12 12-11.5 28t11.5 28q12 12 28.5 12.5T709-589l103-103q6-6 8.5-13t2.5-15q0-8-2.5-15t-8.5-13L709-851q-12-12-28.5-11.5T652-850q-11 12-11.5 28t11.5 28l34 34H280q-33 0-56.5 23.5T200-680v120q0 17 11.5 28.5T240-520q17 0 28.5-11.5T280-560v-120h406Z":"m274-200 34 34q12 12 11.5 28T308-110q-12 12-28.5 12.5T251-109L148-212q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l103-103q12-12 28.5-11.5T308-370q11 12 11.5 28T308-314l-34 34h406v-120q0-17 11.5-28.5T720-440q17 0 28.5 11.5T760-400v120q0 33-23.5 56.5T680-200H274Zm412-480H280v120q0 17-11.5 28.5T240-520q-17 0-28.5-11.5T200-560v-120q0-33 23.5-56.5T280-760h406l-34-34q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T709-851l103 103q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L709-589q-12 12-28.5 11.5T652-590q-11-12-11.5-28t11.5-28l34-34Z");
a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}function hK(a){eH(a.g,!a.player.U())}S("shaka.ui.LoopButton",fK);function iK(){}iK.prototype.create=function(a,b){return new fK(a,b)};bJ("loop",new iK);wI("loop",new iK);jH("loop",new iK);function jK(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-mute-button");this.g.classList.add("shaka-tooltip");this.j=new $G(this.g,"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.h=W("span");this.h.textContent=this.localization.resolve("MUTE");a.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);kK(this);lK(this);this.eventManager.o(this.localization,"locale-updated",function(){kK(c)});this.eventManager.o(this.localization,"locale-changed",function(){kK(c)});
this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&(c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted||c.video.volume!=0?c.video.muted=!c.video.muted:c.video.volume=1)});this.eventManager.o(this.video,"volumechange",function(){kK(c);lK(c)});this.eventManager.o(this.player,"loading",function(){kK(c);lK(c)});this.eventManager.o(this.player,"loaded",function(){mK(c)});this.eventManager.o(this.player,"unloading",function(){mK(c)});this.eventManager.o(this.player,"trackschanged",
function(){mK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){kK(c);lK(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){kK(c);lK(c)});this.eventManager.o(this.adManager,"ad-muted",function(){kK(c);lK(c)});this.eventManager.o(this.adManager,"ad-started",function(){mK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;kK(c);lK(c);mK(c)});mK(this)}pa(jK,ZG);
function kK(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted||a.video.volume==0?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b);a.h.textContent=a.localization.resolve(b)}
function lK(a){var b=a.ad?a.ad.isMuted()?"M671-177q-11 7-22 13t-23 11q-15 7-30.5 0T574-176q-6-15 1.5-29.5T598-227q4-2 7.5-4t7.5-4L480-368v111q0 27-24.5 37.5T412-228L280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h88L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28q-11 11-28 11t-28-11l-93-93Zm89-304q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131t58 197q0 33-6 65.5T817-353q-8 22-24.5 27.5t-30.5.5q-14-5-22.5-18t-.5-30q11-26 16-52.5t5-55.5ZM591-623q33 21 51 63t18 80v10q0 5-1 10-2 13-14 17t-22-6l-51-51q-6-6-9-13.5t-3-15.5v-77q0-12 10.5-17.5t20.5.5Zm-201-59q-6-6-6-14t6-14l22-22q19-19 43.5-8.5T480-703v63q0 14-12 19t-22-5l-56-56Z":"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z":
a.video.muted||a.video.volume==0?"M671-177q-11 7-22 13t-23 11q-15 7-30.5 0T574-176q-6-15 1.5-29.5T598-227q4-2 7.5-4t7.5-4L480-368v111q0 27-24.5 37.5T412-228L280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h88L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28q-11 11-28 11t-28-11l-93-93Zm89-304q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131t58 197q0 33-6 65.5T817-353q-8 22-24.5 27.5t-30.5.5q-14-5-22.5-18t-.5-30q11-26 16-52.5t5-55.5ZM591-623q33 21 51 63t18 80v10q0 5-1 10-2 13-14 17t-22-6l-51-51q-6-6-9-13.5t-3-15.5v-77q0-12 10.5-17.5t20.5.5Zm-201-59q-6-6-6-14t6-14l22-22q19-19 43.5-8.5T480-703v63q0 14-12 19t-22-5l-56-56Z":
"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z";a.j.use(b)}
function mK(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.Kf()&&(b=!1);eH(a.g,b)}S("shaka.ui.MuteButton",jK);function nK(){}nK.prototype.create=function(a,b){return new jK(a,b)};bJ("mute",new nK);wI("mute",new nK);jH("mute",new nK);function oK(a,b){ZG.call(this,a,b);var c=this;this.j=this.controls.u;this.g=Yj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.l=new $G(this.g,"M120-520q-17 0-28.5-11.5T80-560q0-17 11.5-28.5T120-600h104L80-743q-12-12-12-28.5T80-800q12-12 28.5-12t28.5 12l143 144v-104q0-17 11.5-28.5T320-800q17 0 28.5 11.5T360-760v200q0 17-11.5 28.5T320-520H120Zm40 360q-33 0-56.5-23.5T80-240v-160q0-17 11.5-28.5T120-440q17 0 28.5 11.5T160-400v160h280q17 0 28.5 11.5T480-200q0 17-11.5 28.5T440-160H160Zm680-280q-17 0-28.5-11.5T800-480v-240H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v240q0 17-11.5 28.5T840-440ZM600-160q-17 0-28.5-11.5T560-200v-120q0-17 11.5-28.5T600-360h240q17 0 28.5 11.5T880-320v120q0 17-11.5 28.5T840-160H600Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.i=W("span");this.i.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);pK(this);this.parent.appendChild(this.g);this.controls.Jf()||eH(this.g,!1);this.eventManager.o(this.localization,"locale-updated",
function(){pK(c)});this.eventManager.o(this.localization,"locale-changed",function(){pK(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.controls.dd()});this.eventManager.o(this.j,"enterpictureinpicture",function(){qK(c)});this.eventManager.o(this.j,"leavepictureinpicture",function(){rK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){sK(c)});this.eventManager.o(this.player,"trackschanged",function(){sK(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,
"enter",function(d){qK(c);c.eventManager.qa(d.window,"pagehide",function(){rK(c)})})}pa(oK,ZG);
function qK(a){a.l.use("M160-160q-33 0-56.5-23.5T80-240v-240q0-17 11.5-28.5T120-520q17 0 28.5 11.5T160-480v240h640v-480H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm400-263 95 95q12 12 28 12t28-12q12-12 12-28.5T711-385l-95-95h64q17 0 28.5-11.5T720-520q0-17-11.5-28.5T680-560H520q-17 0-28.5 11.5T480-520v160q0 17 11.5 28.5T520-320q17 0 28.5-11.5T560-360v-63ZM120-600q-17 0-28.5-11.5T80-640v-120q0-17 11.5-28.5T120-800h200q17 0 28.5 11.5T360-760v120q0 17-11.5 28.5T320-600H120Zm360 120Z");a.g.ariaLabel=
a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}
function rK(a){a.l.use("M120-520q-17 0-28.5-11.5T80-560q0-17 11.5-28.5T120-600h104L80-743q-12-12-12-28.5T80-800q12-12 28.5-12t28.5 12l143 144v-104q0-17 11.5-28.5T320-800q17 0 28.5 11.5T360-760v200q0 17-11.5 28.5T320-520H120Zm40 360q-33 0-56.5-23.5T80-240v-160q0-17 11.5-28.5T120-440q17 0 28.5 11.5T160-400v160h280q17 0 28.5 11.5T480-200q0 17-11.5 28.5T440-160H160Zm680-280q-17 0-28.5-11.5T800-480v-240H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v240q0 17-11.5 28.5T840-440ZM600-160q-17 0-28.5-11.5T560-200v-120q0-17 11.5-28.5T600-360h240q17 0 28.5 11.5T880-320v120q0 17-11.5 28.5T840-160H600Z");a.g.ariaLabel=
a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}function pK(a){a.i.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Nd();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 sK(a){O(function(b){if(!a.controls.Jf())return eH(a.g,!1),a.controls.Nd()?H(b,a.controls.dd(),0):b.B(0);if(!a.player||!a.player.Md())return eH(a.g,!0),b.B(0);eH(a.g,!1);return a.controls.Nd()?H(b,a.controls.dd(),0):b.B(0)})}S("shaka.ui.PipButton",oK);function tK(){}tK.prototype.create=function(a,b){return new oK(a,b)};bJ("picture_in_picture",new tK);wI("picture_in_picture",new tK);jH("picture_in_picture",new tK);function uK(a,b){FJ.call(this,a,b,"m426-330 195-125q14-9 14-25t-14-25L426-630q-15-10-30.5-1.5T380-605v250q0 18 15.5 26.5T426-330ZM121-440q17 0 30.5 11t18.5 28q6 23 14.5 43.5T204-317q9 15 7.5 32T198-256q-11 11-27 10t-25-14q-22-31-37-66.5T86-400q-3-16 7.5-28t27.5-12Zm77-264q12 12 13 29t-7 31q-11 20-19.5 41T170-559q-5 17-18.5 28T121-520q-17 0-27.5-12.5T87-561q8-38 23-73.5t36-66.5q9-13 25-13.5t27 10.5Zm56 505q12-13 29.5-14t32.5 8q20 11 40.5 20t42.5 15q17 5 28 18t11 30q0 17-12.5 27T397-88q-38-8-71.5-23T260-146q-14-9-15.5-25t9.5-28Zm186-639q0 17-10.5 30T402-790q-23 6-44 14.5T317-755q-15 9-32.5 7.5T255-761q-12-12-10.5-28.5T260-815q32-20 66.5-34.5T399-872q16-3 28.5 7t12.5 27Zm360 358q0-113-69.5-199.5T553-792q-15-4-24-17t-9-29q0-16 11-26.5t25-7.5q140 28 232 137t92 255q0 146-92 255T556-88q-14 3-25-7.5T520-122q0-16 9-29t24-17q108-26 177.5-112.5T800-480Z");
var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");Array.from(a.classList).includes("shaka-overflow-menu")||(this.g=W("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),this.button.appendChild(this.g));this.eventManager.o(this.localization,"locale-updated",function(){vK(c)});this.eventManager.o(this.localization,"locale-changed",function(){vK(c)});this.eventManager.o(this.player,
"loaded",function(){wK(c)});this.eventManager.o(this.player,"ratechange",function(){wK(c)});vK(this);xK(this);wK(this)}pa(uK,FJ);function vK(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 wK(a){var b=a.player.Za(),c=bH(a.menu,"material-svg-icon shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");var e=d.getElementsByTagName("span")[0];e&&e.classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(f){return f.textContent==b+"x"}))d=c.parentElement,d.appendChild(dH()),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 xK(a){for(var b=u(a.controls.g.playbackRates),c=b.next(),d={};!c.done;d={ag:void 0},c=b.next()){d.ag=c.value;c=Yj();var e=W("span");e.textContent=d.ag+"x";c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){f.ag==a.video.defaultPlaybackRate?a.player.Cd():a.player.vc(f.ag,!1)}}(d));a.menu.appendChild(c)}cH(a.menu)}S("shaka.ui.PlaybackRateSelection",uK);function yK(){}yK.prototype.create=function(a,b){return new uK(a,b)};
bJ("playback_rate",new yK);wI("playback_rate",new yK);function zK(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-current-time");AK(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.player.U()&&(c.video.currentTime=c.player.wa().end)});this.eventManager.o(this.player,"loading",function(){eH(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.V,e=c.controls.wh(),f=c.player.wa(),g=f.end-f.start;isFinite(g)?c.player.U()?(e=
Math.max(0,Math.floor(f.end-e)),g=g>=3600,e>=1||d?(AK(c,"- "+fH(e,g)),c.g.disabled=!1):(AK(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=g>=3600,e=fH(Math.max(0,e-f.start),d),g&&(e+=" / "+fH(g,d)),AK(c,e),c.g.disabled=!0):(AK(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){eH(c.g,!c.ad.isLinear())});
this.eventManager.o(this.adManager,"ad-stopped",function(){eH(c.g,!0)})}pa(zK,ZG);function AK(a,b){b!=a.g.textContent&&(a.g.textContent=b)}S("shaka.ui.PresentationTimeTracker",zK);function BK(){}BK.prototype.create=function(a,b){return new zK(a,b)};wI("time_and_duration",new BK);function CK(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";new $G(this.g,"M479-359q-50 0-85-35t-35-85q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35Zm-57 222-85-85q-12-12-11.5-28.5T338-279q12-12 28.5-12t28.5 12l85 86 85-85q11-11 28-11t28 11q11 11 11 28t-11 28l-85 85q-12 12-27 18t-30 6q-15 0-30-6t-27-18ZM221-337l-85-85q-12-12-18-27t-6-30q0-15 6-30t18-27l85-85q12-12 28.5-12t28.5 12q12 12 12 28.5T278-564l-86 86 85 85q11 11 11 28t-11 28q-11 11-28 11t-28-11Zm116-401 85-85q12-12 27-18t30-6q15 0 30 6t27 18l85 85q12 12 12 28t-12 28q-12 12-28.5 12T564-682l-86-85-85 85q-11 11-28 11t-28-11q-11-11-11-28t11-28Zm344 343 85-85-85-85q-11-11-11-28t11-28q11-11 28-11t28 11l85 85q12 12 18 27t6 30q0 15-6 30t-18 27l-85 85q-12 12-28 11.5T681-338q-12-12-12-28.5t12-28.5Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);DK(this);this.eventManager.o(this.localization,"locale-updated",function(){DK(c)});this.eventManager.o(this.localization,"locale-changed",function(){DK(c)});var d=this.controls.D;this.eventManager.o(this.g,"click",
function(){c.controls.Ca()&&(d.g?cI(d.g):db("Not playing VR content"))});this.eventManager.o(d,"vrstatuschanged",function(){eH(c.g,c.controls.Yb())});eH(this.g,this.controls.Yb())}pa(CK,ZG);function DK(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.i.textContent=a.localization.resolve("RECENTER_VR")}S("shaka.ui.RecenterVRButton",CK);function EK(){}EK.prototype.create=function(a,b){return new CK(a,b)};bJ("recenter_vr",new EK);wI("recenter_vr",new EK);function FK(a,b){ZG.call(this,a,b);var c=this;this.i=$b().pg();this.g=Yj();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.l=new $G(this.g,this.i?"M80-280v-480q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v480q0 33-23.5 56.5T800-200h-80q-17 0-28.5-11.5T680-240q0-17 11.5-28.5T720-280h80v-480H160v480h80q17 0 28.5 11.5T280-240q0 17-11.5 28.5T240-200h-80q-33 0-56.5-23.5T80-280Zm232 160q-14 0-22-9.5t-8-20.5q0-5 2-10.5t7-10.5l161-161q6-6 13-9t15-3q8 0 15 3t13 9l161 161q5 5 7 10.5t2 10.5q0 11-8 20.5t-22 9.5H312Zm168-360Z":
"M480-480Zm320 320H600q0-20-1.5-40t-4.5-40h206v-480H160v46q-20-3-40-4.5T80-680v-40q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160Zm-720 0v-120q50 0 85 35t35 85H80Zm200 0q0-83-58.5-141.5T80-360v-80q117 0 198.5 81.5T360-160h-80Zm160 0q0-75-28.5-140.5t-77-114q-48.5-48.5-114-77T80-520v-80q91 0 171 34.5T391-471q60 60 94.5 140T520-160h-80Z");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.m=W("span");a.appendChild(this.m);
this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;GK(this);eH(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){GK(c)}),this.eventManager.o(this.localization,"locale-changed",function(){GK(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){HK(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.video.remote.prompt().catch(function(){})}),
this.eventManager.o(this.video.remote,"connect",function(){HK(c);IK(c)}),this.eventManager.o(this.video.remote,"connecting",function(){HK(c);IK(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){HK(c);IK(c)}),this.eventManager.o(this.player,"loaded",function(){HK(c)}),HK(this,!0),IK(this)):this.g.classList.add("shaka-hidden")}pa(FK,ZG);FK.prototype.release=function(){this.video.remote&&this.h!=-1&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});ZG.prototype.release.call(this)};
function HK(a,b){b=b===void 0?!1:b;var c,d;O(function(e){switch(e.g){case 1:if(a.controls.F.Pg()&&a.controls.ua||!a.video.remote){eH(a.g,!1);a.h!=-1&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.B(0);break}if(a.video.remote.state=="disconnected"||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;$b().pg()&&a.player.Ac()==Jr&&a.player.Ah()!="HLS"&&(h=!1);eH(a.g,h&&f&&!g)}else eH(a.g,!1)};va(e,7);if(a.h==-1){e.B(9);break}return H(e,a.video.remote.cancelWatchAvailability(a.h),
10)}eH(a.g,!0);if(a.h==-1){e.B(0);break}return H(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.B(0);break;case 10:a.h=-1;case 9:xa(e,8);break;case 7:ya(e);case 8:return va(e,11),H(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;xa(e,0);break;case 11:ya(e),c(!0),I(e)}})}function GK(a){var b=a.i?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}
function IK(a){a.i||(a.video.remote.state=="disconnected"?a.l.use("M480-480Zm320 320H600q0-20-1.5-40t-4.5-40h206v-480H160v46q-20-3-40-4.5T80-680v-40q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160Zm-720 0v-120q50 0 85 35t35 85H80Zm200 0q0-83-58.5-141.5T80-360v-80q117 0 198.5 81.5T360-160h-80Zm160 0q0-75-28.5-140.5t-77-114q-48.5-48.5-114-77T80-520v-80q91 0 171 34.5T391-471q60 60 94.5 140T520-160h-80Z"):a.l.use("M720-600v240q0 17-11.5 28.5T680-320h-87q-8 0-14.5-4.5T569-337q-29-81-81.5-147T364-596q-16-10-11.5-27t21.5-17h306q17 0 28.5 11.5T720-600ZM320-160q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125.5T518-201q2 17-9.5 29T480-160Zm-340 0q-25 0-42.5-17.5T80-220q0-25 17.5-42.5T140-280q25 0 42.5 17.5T200-220q0 25-17.5 42.5T140-160Zm740-560v480q0 33-23.5 56.5T800-160H638q-17 0-28.5-11.5T598-200q0-17 11.5-28.5T638-240h162v-480H160v6q0 17-11.5 28.5T120-674q-17 0-28.5-11.5T80-714v-6q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720Z"))}
S("shaka.ui.RemoteButton",FK);function JK(){}JK.prototype.create=function(a,b){return new FK(a,b)};bJ("remote",new JK);wI("remote",new JK);function KK(a,b){FJ.call(this,a,b,"M480-120q-17 0-28.5-11.5T440-160v-160q0-17 11.5-28.5T480-360q17 0 28.5 11.5T520-320v40h280q17 0 28.5 11.5T840-240q0 17-11.5 28.5T800-200H520v40q0 17-11.5 28.5T480-120Zm-320-80q-17 0-28.5-11.5T120-240q0-17 11.5-28.5T160-280h160q17 0 28.5 11.5T360-240q0 17-11.5 28.5T320-200H160Zm160-160q-17 0-28.5-11.5T280-400v-40H160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h120v-40q0-17 11.5-28.5T320-600q17 0 28.5 11.5T360-560v160q0 17-11.5 28.5T320-360Zm160-80q-17 0-28.5-11.5T440-480q0-17 11.5-28.5T480-520h320q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H480Zm160-160q-17 0-28.5-11.5T600-640v-160q0-17 11.5-28.5T640-840q17 0 28.5 11.5T680-800v40h120q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680H680v40q0 17-11.5 28.5T640-600Zm-480-80q-17 0-28.5-11.5T120-720q0-17 11.5-28.5T160-760h320q17 0 28.5 11.5T520-720q0 17-11.5 28.5T480-680H160Z");
var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.h=W("span");this.h.classList.add("shaka-current-auto-quality");this.h.style.display="none";this.i=W("sup");this.i.classList.add("shaka-current-quality-mark");this.i.style.display="none";Array.from(a.classList).includes("shaka-overflow-menu")?this.parent.parentElement&&(this.g=bk(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(){LK(c)});this.eventManager.o(this.localization,"locale-changed",function(){LK(c)});this.eventManager.o(this.player,"loading",function(){MK(c);NK(c)});this.eventManager.o(this.player,"loaded",function(){MK(c);NK(c)});this.eventManager.o(this.player,"unloading",function(){MK(c);
NK(c)});this.eventManager.o(this.player,"variantchanged",function(){MK(c);NK(c)});this.eventManager.o(this.player,"trackschanged",function(){MK(c);NK(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){MK(c);NK(c)});this.eventManager.o(this.player,"adaptation",function(){MK(c);NK(c)});MK(this)}pa(KK,FJ);
function NK(a){var b=a.player.getConfiguration().abr.enabled;if(a.player.Md()){a.i.textContent="";a.i.style.display="none";a.g&&(a.g.textContent="",a.g.style.display="none");var c=a.player.Nb()||[],d=c.find(function(e){return e.active});d&&(b?(a.h.textContent=d.bandwidth?WK(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?XK(a,d,c):d.bandwidth?YK(d.bandwidth):"Unknown",
a.h.style.display=""):a.h.style.display="none",b=ZK(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=ZK(a,b.width,b.height),a.g.textContent=b,a.g.style.display=b!==""?"":"none")}
function ZK(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(b*9/16));a=a.controls.g.qualityMarks;return c>=8640?c+"p":c>=4320?a["4320"]:c>=2160?a["2160"]:c>=1440?a["1440"]:c>=1080?a["1080"]:c>=720?a["720"]:""}
function MK(a){var b=aH(a.menu);ck(a.menu);a.menu.appendChild(b);b=0;b=a.player.Md()?$K(a):aL(a);var c=Yj();c.classList.add("shaka-enable-abr-button");a.eventManager.o(c,"click",function(){a.player.configure({abr:{enabled:!0}});MK(a)});a.l=W("span");a.l.textContent=a.localization.resolve("AUTO_QUALITY");c.appendChild(a.l);a.player.getConfiguration().abr.enabled&&(c.ariaSelected="true",c.appendChild(dH()),a.l.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(c);cH(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));LK(a);eH(a.button,b>0)}
function $K(a){var b=[];a.player.Ac()==Nr||a.player.Da()||(b=a.player.Nb()||[]);var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(l==1||l==2)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||l==3&&k.label!=c.label||!k.bandwidth?!1:!0}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
k.bandwidth})==l});b.sort(function(k,l){return l.bandwidth-k.bandwidth});for(var d=a.player.getConfiguration().abr.enabled,e=u(b),f=e.next(),g={};!f.done;g={Qe:void 0},f=e.next()){g.Qe=f.value;f=Yj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Qe;a.player.configure({abr:{enabled:!1}});a.player.Me(l,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.Qe.bandwidth?WK(a,g.Qe,b):"Unknown";f.appendChild(h);d||g.Qe!=
c||(f.ariaSelected="true",f.appendChild(dH()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function aL(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&&dd(q.roles,m.roles);r&&a.controls.g.showVideoCodec&&q.codecs&&m.codecs&&(r=yf(q.codecs)==yf(m.codecs));return r})==n});b.sort(function(m,n){return n.height==m.height||m.height==null||n.height==null?n.bandwidth-m.bandwidth:n.height-m.height});
for(var d=a.player.getConfiguration().abr.enabled,e=u(b),f=e.next(),g={};!f.done;g={tc:void 0},f=e.next()){g.tc=f.value;f=Yj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(m){return function(){var n=m.tc;a.player.configure({abr:{enabled:!1}});a.player.Oj(n,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.tc.height&&g.tc.width?XK(a,g.tc,b):g.tc.bandwidth?YK(g.tc.bandwidth):"Unknown";f.appendChild(h);var k=ZK(a,g.tc.width,g.tc.height);if(k!==
""){var l=W("sup");l.classList.add("shaka-quality-mark");l.textContent=k;f.appendChild(l)}d||g.tc!=c||(f.ariaSelected="true",f.appendChild(dH()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function XK(a,b,c){function d(n,q){return n!=q&&n.height==q.height&&n.hdr==q.hdr&&f(n)==f(q)&&e(n)==e(q)&&Math.round(n.frameRate||0)==Math.round(q.frameRate||0)}function e(n){return n.codecs?yf(n.codecs).startsWith("lcevc"):!1}function f(n){return n.codecs?yf(n.codecs).startsWith("dovi-"):!1}var g=b.height||0,h=b.width||0,k=!0;if(b.pixelAspectRatio){var l=b.pixelAspectRatio.split(":").map(function(n){return Number(n)});l.length===2?k=l[0]===l[1]:l.length===1&&(k=l[0]===1)}g>h&&k&&(g=u([g,h]),h=g.next().value,
g=g.next().value);k=g;h/g>16/9&&(k=Math.round(h*9/16));h=k+"p";g=new Set;k=u(c);for(l=k.next();!l.done;l=k.next())l=l.value,l.frameRate&&g.add(Math.round(l.frameRate));g.size>1&&(g=b.frameRate)&&(g>=50||g<=20)&&(h+=Math.round(b.frameRate));if(f(b))h+=" Dolby Vision";else if(b.hdr=="PQ"||b.hdr=="HLG")h+=" HDR";e(b)&&(h+=" LCEVC");(b.videoLayout||"").includes("CH-STEREO")&&(h+=" 3D");if(c.some(function(n){return d(b,n)})&&(c.some(function(n){return d(b,n)&&n.bandwidth==b.bandwidth})||(h+=" ("+YK(b.bandwidth)+
")"),a.controls.g.showVideoCodec)){var m=function(n){var q="";n&&(q=yf(n).toUpperCase());return q?" "+q:q};c.some(function(n){return d(b,n)&&m(n.codecs)!=m(b.codecs)})&&(h+=m(b.codecs))}return h}function WK(a,b,c){var d=YK(b.bandwidth);if(a.controls.g.showAudioCodec){var e=function(f){var g="";f&&(g=yf(f).toUpperCase());return g?" "+g:g};c.some(function(f){return e(f.codecs)!=e(b.codecs)})&&(d+=e(b.codecs))}return d}
function YK(a){return a>=1E6?(a/1E6).toFixed(1).replace(".0","")+" Mbps":Math.floor(a/1E3)+" Kbps"}
function LK(a){var b=a.player.Md()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.l.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",KK);function bL(){}
bL.prototype.create=function(a,b){return new KK(a,b)};bJ("quality",new bL);wI("quality",new bL);function cL(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));(new $G(this.g)).use("M798-281 550-447q-9-6-13.5-14.5T532-480q0-10 4.5-18.5T550-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Zm-400 0L150-447q-9-6-13.5-14.5T132-480q0-10 4.5-18.5T150-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z");
this.parent.appendChild(this.g);dL(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){dL(c)});this.eventManager.o(this.localization,"locale-changed",function(){dL(c)});this.eventManager.o(this.g,"click",function(){if(c.controls.Ca()&&c.video.duration){var d=c.h.indexOf(c.player.Za())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.vc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",
function(){c.g.setAttribute("shaka-status",c.player.Za()+"x")})}pa(cL,ZG);function dL(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",cL);function eL(){}eL.prototype.create=function(a,b){return new cL(a,b)};wI("rewind",new eL);function fL(a,b){ZG.call(this,a,b);var c=this;this.j=this.controls.F;this.g=Yj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");new $G(this.g,"M480-337q-8 0-15-2.5t-13-8.5L308-492q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T365-549l75 75v-286q0-17 11.5-28.5T480-800q17 0 28.5 11.5T520-760v286l75-75q12-12 28.5-11.5T652-548q11 12 11.5 28T652-492L508-348q-6 6-13 8.5t-15 2.5ZM240-160q-33 0-56.5-23.5T160-240v-80q0-17 11.5-28.5T200-360q17 0 28.5 11.5T240-320v80h480v-80q0-17 11.5-28.5T760-360q17 0 28.5 11.5T800-320v80q0 33-23.5 56.5T720-160H240Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.h=W("span");this.h.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);gL(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){gL(c)});this.eventManager.o(this.localization,"locale-changed",function(){gL(c)});
this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.u;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download="videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.D,"vrstatuschanged",function(){hL(c)});this.eventManager.o(this.adManager,"ad-started",function(){hL(c)});this.eventManager.o(this.adManager,
"ad-stopped",function(){hL(c)});this.eventManager.o(this.player,"unloading",function(){hL(c)});this.eventManager.o(this.player,"loaded",function(){hL(c)});this.eventManager.o(this.video,"play",function(){hL(c)});this.eventManager.o(this.video,"pause",function(){hL(c)});this.eventManager.o(this.video,"seeking",function(){hL(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){hL(c)});hL(this)}pa(fL,ZG);
function hL(a){var b=!0;a.controls.Yb()&&(b=!1);b&&a.j.Pa()&&(b=!1);b&&(a.player.drmInfo()||a.player.Md())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&a.video.remote.state!="disconnected"&&(b=!1);eH(a.g,b)}function gL(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.h.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",fL);function iL(){}iL.prototype.create=function(a,b){return new fL(a,b)};bJ("save_video_frame",new iL);
jH("save_video_frame",new iL);function jL(a,b){ZG.call(this,a,b);var c=this;if(this.g=this.player.Af())this.h=Yj(),this.h.classList.add("shaka-skip-next-button"),this.h.classList.add("shaka-tooltip"),(new $G(this.h)).use("M660-280v-400q0-17 11.5-28.5T700-720q17 0 28.5 11.5T740-680v400q0 17-11.5 28.5T700-240q-17 0-28.5-11.5T660-280Zm-440-35v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T548-480q0 10-4.5 18.5T530-447L282-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z"),this.parent.appendChild(this.h),kL(this),lL(this),this.eventManager.o(this.localization,
"locale-updated",function(){kL(c)}),this.eventManager.o(this.localization,"locale-changed",function(){kL(c)}),this.eventManager.o(this.h,"click",function(){c.controls.Ca()&&c.g.playItem(c.g.getCurrentItemIndex()+1)}),this.eventManager.o(this.g,"currentitemchanged",function(){lL(c)}),this.eventManager.o(this.g,"itemsinserted",function(){lL(c)}),this.eventManager.o(this.g,"itemsremoved",function(){lL(c)}),this.eventManager.o(this.player,"loading",function(){lL(c)})}pa(jL,ZG);
function kL(a){a.h.ariaLabel=a.localization.resolve("SKIP_NEXT")}function lL(a){var b=a.g.getItems().length;b=b>1&&a.g.getCurrentItemIndex()+1<b;eH(a.h,b)}S("shaka.ui.SkipNextButton",jL);function mL(){}mL.prototype.create=function(a,b){return new jL(a,b)};wI("skip_next",new mL);function nL(a,b){ZG.call(this,a,b);var c=this;if(this.g=this.player.Af())this.h=Yj(),this.h.classList.add("shaka-skip-previous-button"),this.h.classList.add("shaka-tooltip"),(new $G(this.h)).use("M220-280v-400q0-17 11.5-28.5T260-720q17 0 28.5 11.5T300-680v400q0 17-11.5 28.5T260-240q-17 0-28.5-11.5T220-280Zm458-1L430-447q-9-6-13.5-14.5T412-480q0-10 4.5-18.5T430-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z"),this.parent.appendChild(this.h),oL(this),pL(this),this.eventManager.o(this.localization,
"locale-updated",function(){oL(c)}),this.eventManager.o(this.localization,"locale-changed",function(){oL(c)}),this.eventManager.o(this.h,"click",function(){c.controls.Ca()&&c.g.playItem(c.g.getCurrentItemIndex()-1)}),this.eventManager.o(this.g,"currentitemchanged",function(){pL(c)}),this.eventManager.o(this.g,"itemsinserted",function(){pL(c)}),this.eventManager.o(this.g,"itemsremoved",function(){pL(c)}),this.eventManager.o(this.player,"loading",function(){pL(c)})}pa(nL,ZG);
function oL(a){a.h.ariaLabel=a.localization.resolve("SKIP_PREVIOUS")}function pL(a){var b=a.g.getItems().length>1&&a.g.getCurrentItemIndex()>0;eH(a.h,b)}S("shaka.ui.SkipPreviousButton",nL);function qL(){}qL.prototype.create=function(a,b){return new nL(a,b)};wI("skip_previous",new qL);function rL(a,b){lH.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("shaka-tooltip")}pa(rL,lH);S("shaka.ui.SmallPlayButton",rL);function sL(){}sL.prototype.create=function(a,b){return new rL(a,b)};wI("play_pause",new sL);function tL(a,b){ZG.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(tL,ZG);S("shaka.ui.Spacer",tL);function uL(){}uL.prototype.create=function(a,b){return new tL(a,b)};wI("spacer",new uL);function vL(a,b){function c(m){m=parseInt(l.g[m],10);return m>2E9?(m/1E9).toFixed(2)+"GB":m>1E6?(m/1E6).toFixed(2)+"MB":m>1E3?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){m=l.g[m];return fH(m,m>3600)}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)"}ZG.call(this,a,b);var l=this;this.i=Yj();this.i.classList.add("shaka-statistics-button");
this.u=new $G(this.i,"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.A=W("span");a.appendChild(this.A);this.l=W("span");this.l.classList.add("shaka-current-selection-span");a.appendChild(this.l);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");
this.controls.i.appendChild(this.h);this.D=[];this.F=["stateHistory","switchHistory"];this.g=this.player.getStats();this.m=new Map;this.C=(new Map).set("width",k).set("height",k).set("currentCodecs",function(m){return l.g[m]}).set("completionPercent",function(m){return l.g[m]+" (%)"}).set("bufferingTime",g).set("drmTimeSeconds",g).set("licenseTime",g).set("liveLatency",g).set("loadLatency",g).set("manifestTimeSeconds",g).set("estimatedBandwidth",f).set("streamBandwidth",f).set("maxSegmentDuration",
g).set("pauseTime",e).set("playTime",e).set("corruptedFrames",h).set("decodedFrames",h).set("droppedFrames",h).set("stallsDetected",function(m){return l.g[m]+" (stalls)"}).set("gapsJumped",d).set("manifestSizeBytes",c).set("bytesDownloaded",c).set("nonFatalErrorCount",function(m){return l.g[m]+" (errors)"}).set("manifestPeriodCount",function(m){return l.g[m]+" (periods)"}).set("manifestGapCount",d);this.j=new Sf(function(){l.g=l.player.getStats();for(var m=u(l.D),n=m.next();!n.done;n=m.next()){var q=
n.value;n=l.m.get(q);n.textContent=l.C.get(q)(q);n&&n.parentElement&&(q=l.g[q],typeof q=="string"?eH(n.parentElement,q!=""):eH(n.parentElement,!isNaN(q)))}});wL(this);xL(this);this.eventManager.o(this.localization,"locale-updated",function(){wL(l)});this.eventManager.o(this.localization,"locale-changed",function(){wL(l)});this.eventManager.o(this.i,"click",function(){yL(l);wL(l)})}pa(vL,ZG);
function yL(a){a.h.classList.contains("shaka-hidden")?(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-440q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),a.j.xa(.1),
eH(a.h,!0)):(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),
a.j.stop(),eH(a.h,!1))}function wL(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.l.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}function zL(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.C.get(b)(b);c.appendChild(d);a.m.set(b,d);return c}
function xL(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=(new $G(b,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z")).g;c.classList.add("material-icons","notranslate");a.h.appendChild(b);a.eventManager.o(c,"click",function(){yL(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.F.includes(c)){var d=zL(a,c);a.h.appendChild(d);a.D.push(c)}else db("Unrecognized statistic element:",c)}vL.prototype.release=function(){this.j.stop();this.j=null;ZG.prototype.release.call(this)};S("shaka.ui.StatisticsButton",vL);function AL(){}AL.prototype.create=function(a,b){return new vL(a,b)};bJ("statistics",new AL);jH("statistics",new AL);function BL(a,b){FJ.call(this,a,b,"M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h560q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H200Zm80-200h120q17 0 28.5-11.5T440-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T400-600H280q-17 0-28.5 11.5T240-560v160q0 17 11.5 28.5T280-360Zm400-240H560q-17 0-28.5 11.5T520-560v160q0 17 11.5 28.5T560-360h120q17 0 28.5-11.5T720-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T680-600Z");
var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Yc()?this.button.ariaPressed="true":this.button.ariaPressed="false";CL(this);this.eventManager.o(this.localization,"locale-updated",function(){DL(c);EL(c)});this.eventManager.o(this.localization,"locale-changed",function(){DL(c);EL(c)});this.eventManager.o(this.player,"loading",function(){FL(c);EL(c)});this.eventManager.o(this.player,
"loaded",function(){FL(c);EL(c)});this.eventManager.o(this.player,"unloading",function(){FL(c);EL(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){FL(c);EL(c)});this.eventManager.o(this.player,"textchanged",function(){EL(c)});this.eventManager.o(this.player,"trackschanged",function(){EL(c)});FL(this);DL(this);EL(this)}pa(BL,FJ);function CL(a){var b=Yj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(dH());a.g=W("span");b.appendChild(a.g)}
function FL(a){a.player.Yc()?(a.icon.use("M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h560q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H200Zm80-200h120q17 0 28.5-11.5T440-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T400-600H280q-17 0-28.5 11.5T240-560v160q0 17 11.5 28.5T280-360Zm400-240H560q-17 0-28.5 11.5T520-560v160q0 17 11.5 28.5T560-360h120q17 0 28.5-11.5T720-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T680-600Z"),
a.button.ariaPressed="true"):(a.icon.use("M791-57 687-160H200q-33 0-56.5-23.5T120-240v-487l-65-65q-12-12-12-28.5T55-849q12-12 28.5-12t28.5 12l736 736q12 12 12 28t-12 28q-12 12-28.5 12T791-57ZM280-360h120q17 0 28.5-11.5T440-400v-25q0-8-6-14t-14-6h-20q-8 0-14 6t-6 14v5h-80v-127l-45-45v1q-7 5-11 13t-4 18v160q0 17 11.5 28.5T280-360Zm560-360v388q0 27-24.5 37.5T772-303l-66-66q7-5 10.5-13.5T720-400v-20q0-8-6-14t-14-6h-20q-8 0-14 6t-6 14h-5l-75-75v-45h80v5q0 8 6 14t14 6h20q8 0 14-6t6-14v-25q0-17-11.5-28.5T680-600H560q-17 0-28.5 11.5T520-560v5L343-732q-19-19-8.5-43.5T372-800h388q33 0 56.5 23.5T840-720Z"),
a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
function EL(a){var b=a.player.Cc()||[];EJ(b,a.menu,function(d){return GL(a,d)},a.player.Yc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat);var c=Yj();c.classList.add("shaka-turn-captions-off-button");a.eventManager.o(c,"click",function(){a.player.ae(!1);EL(a)});c.appendChild(a.g);a.menu.appendChild(c);a.player.Yc()?a.g.classList.remove("shaka-chosen-item"):(c.ariaSelected="true",c.appendChild(dH()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);cH(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"));eH(a.button,b.length>0)}function GL(a,b){return O(function(c){if(c.g==1)return a.player.kg(b),H(c,a.player.ae(!0),2);a.player.configure({preferredTextLanguage:b.language,preferForcedSubs:b.forced});I(c)})}
function DL(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",BL);function HL(){}HL.prototype.create=function(a,b){return new BL(a,b)};bJ("captions",new HL);wI("captions",new HL);function IL(a,b){ZG.call(this,a,b);var c=this;this.g=Yj();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";new $G(this.g,"M620-360H520q-8 0-14-6t-6-14v-200q0-8 6-14t14-6h100q17 0 28.5 11.5T660-560v160q0 17-11.5 28.5T620-360Zm-200 0h-90q-13 0-21.5-8.5T300-390q0-13 8.5-21.5T330-420h70v-40h-40q-8 0-14-6t-6-14q0-8 6-14t14-6h40v-40h-70q-13 0-21.5-8.5T300-570q0-13 8.5-21.5T330-600h90q17 0 28.5 11.5T460-560v160q0 17-11.5 28.5T420-360Zm140-60h40v-120h-40v120Zm280-20q-17 0-28.5-11.5T800-480q0-115-72.5-203T542-794l30 30q11 11 11 28t-11 28q-11 11-28 11t-28-11L387-837q-8-8-4.5-20t14.5-15q20-5 41-6.5t42-1.5q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 17-11.5 28.5T840-440ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-17 11.5-28.5T120-520q17 0 28.5 11.5T160-480q0 115 72.5 203T418-166l-30-30q-11-11-11-28t11-28q11-11 28-11t28 11l129 129q8 8 4.5 20T563-88q-20 5-41 6.5T480-80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);JL(this);this.eventManager.o(this.localization,"locale-updated",function(){JL(c)});this.eventManager.o(this.localization,"locale-changed",function(){JL(c)});var d=this.controls.D;this.eventManager.o(this.g,"click",
function(){c.controls.Ca()&&d.be()});this.eventManager.o(d,"vrstatuschanged",function(){eH(c.g,c.controls.Yb())});eH(this.g,this.controls.Yb())}pa(IL,ZG);function JL(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.i.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}S("shaka.ui.ToggleStereoscopicButton",IL);function KL(){}KL.prototype.create=function(a,b){return new IL(a,b)};bJ("toggle_stereoscopic",new KL);wI("toggle_stereoscopic",new KL);function LL(a,b){tH.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.g.alwaysShowVolumeBar||this.container.classList.add("shaka-volume-bar-container-allow-hiding");this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return ML(c)});this.eventManager.o(this.player,"loading",function(){return ML(c)});this.eventManager.o(this.player,"loaded",function(){return NL(c)});this.eventManager.o(this.player,"unloading",function(){return NL(c)});
this.eventManager.o(this.player,"trackschanged",function(){return NL(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){return ML(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return OL(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return OL(c)});this.eventManager.o(this.adManager,"ad-started",function(){return NL(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){NL(c);ML(c)});this.eventManager.o(this.localization,"locale-updated",
function(){return PL(c)});this.eventManager.o(this.localization,"locale-changed",function(){return PL(c)});ML(this);PL(this);if(this.ad)this.onChange();NL(this)}pa(LL,tH);LL.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.volume>0&&(this.video.muted=!1))};function ML(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume*100);QL(a)}function OL(a){var b=a.ad.getVolume();a.setValue(b*100);QL(a)}
function QL(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 PL(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}function NL(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.Kf()&&(b=!1);eH(a.container,b)}S("shaka.ui.VolumeBar",LL);function RL(){}RL.prototype.create=function(a,b){return new LL(a,b)};wI("volume",new RL);}).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