UNPKG

shaka-player

Version:
1,491 lines • 666 kB
/*
 @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){/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
var r,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ba=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 ca(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 da=ca(this),fa="Int8 Uint8 Uint8Clamped Int16 Uint16 Int32 Uint32 Float32 Float64".split(" ");da.BigInt64Array&&(fa.push("BigInt64"),fa.push("BigUint64"));
function ia(a,b){if(b)for(var c=0;c<fa.length;c++)la(fa[c]+"Array.prototype."+a,b)}function ma(a,b){b&&la(a,b)}function la(a,b){var c=da;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&&ba(c,a,{configurable:!0,writable:!0,value:b})}var oa;
if(typeof Object.setPrototypeOf=="function")oa=Object.setPrototypeOf;else{var pa;a:{var qa={a:!0},ra={};try{ra.__proto__=qa;pa=ra.a;break a}catch(a){}pa=!1}oa=pa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var sa=oa;
function ta(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(sa)sa(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.Sm=b.prototype}function va(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:va(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function wa(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function xa(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");}
function ya(){this.I=!1;this.D=null;this.j=void 0;this.i=1;this.C=this.H=0;this.M=this.B=null}function za(a){if(a.I)throw new TypeError("Generator is already running");a.I=!0}ya.prototype.L=function(a){this.j=a};function Ba(a,b){a.B={Jh:b,Xh:!0};a.i=a.H||a.C}ya.prototype.getNextAddressJsc=function(){return this.i};ya.prototype.getYieldResultJsc=function(){return this.j};ya.prototype.return=function(a){this.B={return:a};this.i=this.C};ya.prototype["return"]=ya.prototype.return;
ya.prototype.O=function(a){this.B={A:a};this.i=this.C};ya.prototype.jumpThroughFinallyBlocks=ya.prototype.O;ya.prototype.h=function(a,b){this.i=b;return{value:a}};ya.prototype.yield=ya.prototype.h;ya.prototype.T=function(a,b){a=t(a);var c=a.next();xa(c);if(c.done)this.j=c.value,this.i=b;else return this.D=a,this.h(c.value,b)};ya.prototype.yieldAll=ya.prototype.T;ya.prototype.A=function(a){this.i=a};ya.prototype.jumpTo=ya.prototype.A;ya.prototype.l=function(){this.i=0};ya.prototype.jumpToEnd=ya.prototype.l;
ya.prototype.o=function(a,b){this.H=a;b!=void 0&&(this.C=b)};ya.prototype.setCatchFinallyBlocks=ya.prototype.o;ya.prototype.K=function(a){this.H=0;this.C=a||0};ya.prototype.setFinallyBlock=ya.prototype.K;ya.prototype.u=function(a,b){this.i=a;this.H=b||0};ya.prototype.leaveTryBlock=ya.prototype.u;ya.prototype.m=function(a){this.H=a||0;a=this.B.Jh;this.B=null;return a};ya.prototype.enterCatchBlock=ya.prototype.m;
ya.prototype.F=function(a,b,c){c?this.M[c]=this.B:this.M=[this.B];this.H=a||0;this.C=b||0};ya.prototype.enterFinallyBlock=ya.prototype.F;ya.prototype.G=function(a,b){b=this.M.splice(b||0)[0];(b=this.B=this.B||b)?b.Xh?this.i=this.H||this.C:b.A!=void 0&&this.C<b.A?(this.i=b.A,this.B=null):this.i=this.C:this.i=a};ya.prototype.leaveFinallyBlock=ya.prototype.G;ya.prototype.N=function(a){return new Ca(a)};ya.prototype.forIn=ya.prototype.N;
function Ca(a){this.j=a;this.h=[];for(var b in a)this.h.push(b);this.h.reverse()}Ca.prototype.i=function(){for(;this.h.length>0;){var a=this.h.pop();if(a in this.j)return a}return null};Ca.prototype.getNext=Ca.prototype.i;function Da(a){this.h=new ya;this.i=a}function Ea(a,b){za(a.h);var c=a.h.D;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.h.return);a.h.return(b);return Ga(a)}
function Fa(a,b,c,d){try{var e=b.call(a.h.D,c);xa(e);if(!e.done)return a.h.I=!1,e;var f=e.value}catch(g){return a.h.D=null,Ba(a.h,g),Ga(a)}a.h.D=null;d.call(a.h,f);return Ga(a)}function Ga(a){for(;a.h.i;)try{var b=a.i(a.h);if(b)return a.h.I=!1,{value:b.value,done:!1}}catch(c){a.h.j=void 0,Ba(a.h,c)}a.h.I=!1;if(a.h.B){b=a.h.B;a.h.B=null;if(b.Xh)throw b.Jh;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ha(a){this.next=function(b){za(a.h);a.h.D?b=Fa(a,a.h.D.next,b,a.h.L):(a.h.L(b),b=Ga(a));return b};this.throw=function(b){za(a.h);a.h.D?b=Fa(a,a.h.D["throw"],b,a.h.L):(Ba(a.h,b),b=Ga(a));return b};this.return=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
function H(a){return Ia(new Ha(new Da(a)))}function Ja(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}ma("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.h=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.h};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
ma("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Ka(va(this))}});return a});function Ka(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
ma("Promise",function(a){function b(g){this.i=0;this.j=void 0;this.h=[];this.u=!1;var h=this.l();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.h=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.i=function(g){if(this.h==null){this.h=[];var h=this;this.j(function(){h.m()})}this.h.push(g)};var e=da.setTimeout;c.prototype.j=function(g){e(g,0)};c.prototype.m=function(){for(;this.h&&this.h.length;){var g=this.h;this.h=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.l(l)}}}this.h=null};c.prototype.l=function(g){this.j(function(){throw g;})};b.prototype.l=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.m)}};b.prototype.G=function(g){if(g===this)this.m(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.o(g)}};
b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.m(k);return}typeof h=="function"?this.K(h,g):this.o(g)};b.prototype.m=function(g){this.B(2,g)};b.prototype.o=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(this.i!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.i);this.i=g;this.j=h;this.i===2&&this.H();this.C()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=da.console;typeof h!=="undefined"&&h.error(g.j)}},1)};b.prototype.D=
function(){if(this.u)return!1;var g=da.CustomEvent,h=da.Event,k=da.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=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.j;return k(g)};b.prototype.C=function(){if(this.h!=null){for(var g=0;g<this.h.length;++g)f.i(this.h[g]);this.h=null}};var f=new c;
b.prototype.I=function(g){var h=this.l();g.re(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.l();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p=="function"?function(q){try{l(p(q))}catch(v){m(v)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.re(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.re=function(g,h){function k(){switch(l.i){case 1:g(l.j);break;case 2:h(l.j);
break;default:throw Error("Unexpected state: "+l.i);}}var l=this;this.h==null?f.i(k):this.h.push(k);this.u=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).re(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(q){return function(v){p[q]=v;u--;u==0&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).re(n(p.length-1),m),k=h.next();
while(!k.done)})};return b});function La(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
ma("WeakMap",function(a){function b(k){this.h=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!La(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(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(!La(k,g))throw Error("WeakMap key fail: "+k);k[g][this.h]=l;return this};b.prototype.get=function(k){return d(k)&&La(k,g)?k[g][this.h]:void 0};b.prototype.has=function(k){return d(k)&&La(k,
g)&&La(k[g],this.h)};b.prototype.delete=function(k){return d(k)&&La(k,g)&&La(k[g],this.h)?delete k[g][this.h]:!1};return b});
ma("Map",function(a){function b(){var h={};return h.Xb=h.next=h.head=h}function c(h,k){var l=h[1];return Ka(function(){if(l){for(;l.head!=h[1];)l=l.Xb;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&&La(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Xb:this[1].Xb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Xb.next=l.entry,this[1].Xb=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.Xb.next=
h.entry.next,h.entry.next.Xb=h.entry.Xb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Xb=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});
ma("Set",function(a){function b(c){this.h=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.h.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.h.set(c,c);this.size=this.h.size;return this};b.prototype.delete=function(c){c=this.h.delete(c);this.size=this.h.size;return c};b.prototype.clear=function(){this.h.clear();this.size=0};b.prototype.has=function(c){return this.h.has(c)};b.prototype.entries=function(){return this.h.entries()};b.prototype.values=function(){return this.h.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.h.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ma(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{Th:e,v:f}}return{Th:-1,v:void 0}}ma("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ma(this,b,c).Th}});
function Na(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}ma("Array.prototype.values",function(a){return a?a:function(){return Na(this,function(b,c){return c})}});
ma("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}});ma("Array.prototype.keys",function(a){return a?a:function(){return Na(this,function(b){return b})}});
ma("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});ma("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
function Oa(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+""}ma("String.prototype.includes",function(a){return a?a:function(b,c){return Oa(this,b,"includes").indexOf(b,c||0)!==-1}});
ma("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}});
ma("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Oa(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}});
ma("WeakSet",function(a){function b(c){this.h=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.h.set(c,!0);return this};b.prototype.has=function(c){return this.h.has(c)};b.prototype.delete=function(c){return this.h.delete(c)};return b});
ma("Array.prototype.find",function(a){return a?a:function(b,c){return Ma(this,b,c).v}});ma("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push([d,b[d]]);return c}});var Pa=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)La(d,e)&&(a[e]=d[e])}return a};ma("Object.assign",function(a){return a||Pa});
ma("Math.clz32",function(a){return a?a:function(b){b=Number(b)>>>0;if(b===0)return 32;var c=0;(b&4294901760)===0&&(b<<=16,c+=16);(b&4278190080)===0&&(b<<=8,c+=8);(b&4026531840)===0&&(b<<=4,c+=4);(b&3221225472)===0&&(b<<=2,c+=2);(b&2147483648)===0&&c++;return c}});ma("String.prototype.repeat",function(a){return a?a:function(b){var c=Oa(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}});
ma("Array.prototype.entries",function(a){return a?a:function(){return Na(this,function(b,c){return[b,c]})}});ma("Promise.withResolvers",function(a){return a?a:function(){var b,c;return{promise:new Promise(function(d,e){b=d;c=e}),resolve:b,reject:c}}});ma("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;})})}});
ma("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});ma("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Oa(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}});
ma("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}});ma("Number.EPSILON",function(){return 2.220446049250313E-16});ma("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
ma("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;c<0&&(c=Math.max(0,e+c));if(d==null||d>e)d=e;d=Number(d);d<0&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}});ia("fill",function(a){return a?a:Array.prototype.fill});ma("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});ma("String.prototype.trimLeft",function(a){function b(){return this.replace(/^[\s\xa0]+/,"")}return a||b});
ma("String.prototype.trimStart",function(a){return a||String.prototype.trimLeft});ma("Number.isInteger",function(a){return a?a:function(b){return Number.isFinite(b)?b===Math.floor(b):!1}});/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var Qa=this||self;function K(a,b){a=a.split(".");var c=Qa;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};var shaka={};function Ra(a){this.j=Math.log(.5);this.h=Math.exp(this.j/a);this.l=this.i=0}Ra.prototype.sample=function(a,b){var c=Math.pow(this.h,a);b=b*(1-c)+c*this.i;isNaN(b)||(this.i=b,this.l+=a)};function Sa(a){return a.i/(1-Math.pow(a.h,a.l))};function Ta(){this.i=new Ra(2);this.l=new Ra(5);this.h=0;this.j=128E3;this.m=16E3}Ta.prototype.configure=function(a){this.j=a.minTotalBytes;this.m=a.minBytes;var b=this.i;b.h=Math.exp(b.j/a.fastHalfLife);b=this.l;b.h=Math.exp(b.j/a.slowHalfLife)};Ta.prototype.sample=function(a,b){if(!(b<this.m)){var c=8E3*b/a;a/=1E3;this.h+=b;this.i.sample(a,c);this.l.sample(a,c)}};Ta.prototype.getBandwidthEstimate=function(a){return this.h<this.j?a:Math.min(Sa(this.i),Sa(this.l))};function Ua(){}function Va(){}function Wa(){}function Xa(a){var b=Ja.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ua,wa(b)))}function Za(){}function $a(){}function ab(){}var Ya=new Set;
self.console&&((new Map).set(1,function(){return console.error.apply(console,wa(Ja.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,wa(Ja.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,wa(Ja.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,wa(Ja.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,wa(Ja.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,wa(Ja.apply(0,arguments)))}),
Wa=function(){return console.warn.apply(console,wa(Ja.apply(0,arguments)))},Va=function(){console.error.apply(console,wa(Ja.apply(0,arguments)))});function cb(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function db(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function eb(a,b){var c;c||(c=cb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={$h:void 0},d=a.next()){e.$h=d.value;d=b.findIndex(function(f){return function(g){return c(f.$h,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function fb(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;b(a[e])?c=e+1:d=e}return c}function gb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=cb);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 hb(){this.h=new Map}r=hb.prototype;r.push=function(a,b){this.h.getOrInsertComputed(a,function(){return[]}).push(b)};r.get=function(a){return this.h.has(a)?this.h.get(a).slice():null};r.remove=function(a,b){if(this.h.has(a)){var c=this.h.get(a).filter(function(d){return d!=b});this.h.set(a,c);c.length||this.h.delete(a)}};r.forEach=function(a){this.h.forEach(function(b,c){a(c,b)})};r.size=function(){return this.h.size};r.keys=function(){return Array.from(this.h.keys())};function ib(){this.h=new hb}r=ib.prototype;r.release=function(){this.Ta();this.h=null};r.J=function(a,b,c,d){this.h&&(a=new jb(a,b,c,d),this.h.push(b,a))};r.Ra=function(a,b,c,d){function e(g){f.qb(a,b,e);c(g)}var f=this;this.J(a,b,e,d)};r.Lb=function(a,b,c,d){if(this.h){b=t(b);for(var e=b.next();!e.done;e=b.next())this.J(a,e.value,c,d)}};
r.zk=function(a,b,c,d){var e=this;if(this.h)for(var f=!1,g=function(l){if(!f){f=!0;for(var m=t(b),n=m.next();!n.done;n=m.next())e.qb(a,n.value,g);c(l)}},h=t(b),k=h.next();!k.done;k=h.next())this.J(a,k.value,g,d)};r.qb=function(a,b,c){if(this.h){var d=this.h.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.qb(),this.h.remove(b,e))}};r.Al=function(a,b,c){if(this.h){b=t(b);for(var d=b.next();!d.done;d=b.next())this.qb(a,d.value,c)}};
r.Ta=function(){if(this.h){for(var a=[],b=t(this.h.h.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,wa(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.qb();this.h.h.clear()}};K("shaka.util.EventManager",ib);ib.prototype.removeAll=ib.prototype.Ta;ib.prototype.unlistenMulti=ib.prototype.Al;ib.prototype.unlisten=ib.prototype.qb;ib.prototype.listenOnceMulti=ib.prototype.zk;ib.prototype.listenMulti=ib.prototype.Lb;ib.prototype.listenOnce=ib.prototype.Ra;ib.prototype.listen=ib.prototype.J;
ib.prototype.release=ib.prototype.release;function jb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.h=kb(a,d);this.target.addEventListener(b,c,this.h)}jb.prototype.qb=function(){this.target.removeEventListener(this.type,this.listener,this.h);this.listener=this.target=null;this.h=!1};function kb(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 lb(a)?b:b.capture||!1}
function lb(a){var b=mb;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}mb=b}return b||!1}var mb=void 0;function nb(a){this.i=a;this.h=void 0}nb.prototype.value=function(){this.h===void 0&&(this.h=this.i());return this.h};function ob(){return pb.value()}var rb=null,sb=null,pb=new nb(function(){var a=void 0;rb&&(a=rb());!a&&sb&&(a=sb());return a});function tb(){}function ub(a,b){if(a===b||!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;var c=ArrayBuffer.isView(a)?a.buffer:a,d=ArrayBuffer.isView(b)?b.buffer:b,e,f=(e=a.byteOffset)!=null?e:0,g;b=(g=b.byteOffset)!=null?g:0;if(f===b&&c==d)return!0;c=new DataView(c,f);d=new DataView(d,b);f=Math.floor(a.byteLength/4);for(g=0;g<f;++g)if(c.getUint32(g*4)!==d.getUint32(g*4))return!1;for(f*=4;f<a.byteLength;++f)if(c.getUint8(f)!==d.getUint8(f))return!1;return!0}
function xb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}function yb(a,b,c){c=c===void 0?Infinity:c;return zb(a,b===void 0?0:b,c,Uint8Array)}function Ab(a,b,c){c=c===void 0?Infinity:c;return zb(a,b===void 0?0:b,c,Uint16Array)}function Bb(a,b,c){c=c===void 0?Infinity:c;return zb(a,b===void 0?0:b,c,DataView)}
function zb(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)}K("shaka.util.BufferUtils",tb);tb.toDataView=Bb;tb.toUint16=Ab;tb.toUint8=yb;tb.toArrayBuffer=xb;tb.equal=ub;function L(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Cb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}L.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};function Db(a){var b=a.code,c=a.msExtendedCode;c&&(c<0&&(c+=4294967296),c=c.toString(16));return{code:b,vj:c,message:a.message}}K("shaka.util.Error",L);var Cb=!0;
L.Severity={RECOVERABLE:1,CRITICAL:2};L.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
L.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,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,BUFFER_WRITE_OUT_OF_BOUNDS:3025,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,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,WEBTRANSPORT_NOT_AVAILABLE:4056,WEBTRANSPORT_INITIALIZATION_FAILED:4057,MSF_VOD_CONTENT_NOT_SUPPORTED:4058,HLS_INVALID_KEY_IV_FOR_GCM:4059,HLS_INVALID_GCM_SEGMENT:4060,DASH_UNSUPPORTED_ESSENTIAL_PROPERTY:4063,MSF_CATALOG_TIMEOUT:4064,MSF_CONNECTION_CLOSED:4065,MSF_SUBSCRIBE_FAILED:4066,MSF_UNSUPPORTED_COMPRESSION:4067,MSF_UNSUPPORTED_CATALOG_VERSION:4068,
MKV_INVALID_FILE:4069,MKV_MISSING_INDEX:4070,MKV_NO_SUPPORTED_TRACKS:4071,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,SS_IMA_SDK_MISSING:10002,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,VAST_INVALID_XML:10007,CS_AD_CONTAINER_MISSING:10008,SS_AD_CONTAINER_MISSING:10009,MEDIATAILOR_REQUEST_FAILED:10010};function Eb(){}
function Fb(a){if(!a)return"";a=yb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(self.TextDecoder&&!ob().Xg())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Va('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 Gb(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new L(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Bb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return Hb.value()(d)}
function Ib(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=yb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return Fb(c);if(c[0]==254&&c[1]==255)return Gb(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return Gb(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return Gb(a,!1);if(c[1]==0&&c[3]==0)return Gb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Fb(a);throw new L(2,2,2003);}
function Jb(a){if(self.TextEncoder&&!ob().Xg()){var b=new TextEncoder;return xb(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 xb(b)}function Kb(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 Lb(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||""}K("shaka.util.StringUtils",Eb);Eb.resetFromCharCode=function(){Hb.h=void 0};
Eb.toUTF16=Kb;Eb.toUTF8=Jb;Eb.fromBytesAutoDetect=Ib;Eb.fromUTF16=Gb;Eb.fromUTF8=Fb;var Hb=new nb(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={vc:65536};b.vc>0;b={vc:b.vc},b.vc/=2)if(a(b.vc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.vc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.vc));return e}}(b);return null});function Mb(){}function Nb(a){a=yb(a);return Uint8Array.prototype.toBase64?a.toBase64({alphabet:"base64",omitPadding:!1}):(a=Hb.value()(a),btoa(a))}function Ob(a,b){b=b==void 0?!0:b;return Uint8Array.prototype.toBase64?yb(a).toBase64({alphabet:"base64url",omitPadding:!b}):(a=Nb(a).replace(/\+/g,"-").replace(/\//g,"_"),b?a:a.replace(/[=]*$/,""))}
function Pb(a){if(!("fromBase64"in Uint8Array)){a=self.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 Qb(a){if(!("fromHex"in Uint8Array)){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=parseInt(a.substr(d*2,2),16);return c}return Uint8Array.fromHex(a)}
function Rb(a){var b=yb(a);if(!Uint8Array.prototype.toHex){a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}return b.toHex()}function Sb(){var a=Ja.apply(0,arguments);return Ub(a,0,a.length)}
function Ub(a,b,c){b=b===void 0?0:b;c=c===void 0?a.length:c;for(var d=0,e=b;e<c;++e)d+=a[e].byteLength;d=new Uint8Array(d);for(e=0;b<c;++b){var f=a[b];ArrayBuffer.isView(f)&&f.BYTES_PER_ELEMENT===1?d.set(f,e):d.set(yb(f),e);e+=f.byteLength}return d}function Vb(a){for(var b=new Uint8Array(a.length),c=0,d=0,e=0;e<a.length;e++){var f=a[e];c>=2&&f==3?c=0:(b[d++]=f,f==0?c++:c=0)}return b.subarray(0,d)}K("shaka.util.Uint8ArrayUtils",Mb);Mb.concat=Sb;Mb.toHex=Rb;Mb.fromHex=Qb;Mb.fromBase64=Pb;
Mb.toBase64=Ob;Mb.toStandardBase64=Nb;function Wb(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Xb(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Xb(e))return!0}return!1}
function Yb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(wa(d.keyIds),wa(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 Xb(d)?c.push(d):Xb(f)&&c.push(f)}return c}
function Zb(a){return a?a.keySystem:""}function $b(a){return a==="org.w3.clearkey"}function ac(a){return a?!!a.match(/^com\.widevine\.alpha/):!1}function bc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function cc(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Xb(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}function dc(a,b,c,d){d=[].concat(wa(new Set(d))).sort().join("#");return a+"#"+b+"#"+c+"#"+d}
function ec(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c={"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"};if(!a&&!b)return c;var d=
{},e;for(e in c){var f=c[e],g=e;b?g="urn:uuid:"+e:a&&(g=e.replace(/-/g,""));d[g]=f}return d}function fc(a){return a.length===22?a:Ob(Qb(a),!1)}var hc=new nb(function(){return xb(new Uint8Array([0]))}),jc=new Map;function kc(){}function lc(a,b){a=mc(a);b=mc(b);return a.split("-")[0]==b.split("-")[0]}function nc(a,b){a=mc(a);b=mc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function oc(a,b){a=mc(a);b=mc(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function mc(a){a=t(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=t(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=pc.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function qc(a,b){a=mc(a);b=mc(b);return b==a?4:nc(b,a)?3:oc(b,a)?2:nc(a,b)?1:0}function rc(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=pc.get(a)||a}
function sc(a){return a.language?mc(a.language):a.audio&&a.audio.language?mc(a.audio.language):a.video&&a.video.language?mc(a.video.language):"und"}
function tc(a,b){a=mc(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(mc(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,nc(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,oc(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,nc(a,b))return b;return null}K("shaka.util.LanguageUtils",kc);kc.findClosestLocale=tc;kc.getLocaleForVariant=sc;
kc.getLocaleForText=function(a){return mc(a.language||"und")};kc.getBase=rc;kc.relatedness=qc;kc.areSiblings=function(a,b){var c=rc(a),d=rc(b);return a!=c&&b!=d&&c==d};kc.normalize=mc;kc.isSiblingOf=oc;kc.isParentOf=nc;kc.areLanguageCompatible=lc;kc.areLocaleCompatible=function(a,b){a=mc(a);b=mc(b);return a==b};
var pc=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,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&&cc(a)&&b.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null});return b}
function vc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[],f=new Map;a.forEach(function(h,k){var l=fc(k);h=fc(h);var m={kty:"oct",kid:l,k:h};c.push(m);d.push(m.kid);e.push(k);f.set(l,h)});a=JSON.stringify({keys:c});var g=JSON.stringify({kids:d});g=[{initData:yb(Jb(g)),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:g,keyIds:new Set(e),clearKeys:f}}function wc(a,b){if(b.length==1)return b[0];a=xc(a,b);if(a!=null)return a;throw new L(2,4,4025,b);}function xc(a,b){var c=yc.get(a);c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==zc?"":null}
function Ac(a,b){var c=[];a=yc.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var zc="text",Bc={qa:"video",Z:"audio",Ua:zc,$i:"image",Ll:"application",Yi:"chapter"},yc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av0[12]/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Cc(a,b,c,d){this.h=null;this.m=a;this.j=b;this.o=c;this.l=d;typeof libDPIModule==="undefined"&&Wa("Could not find LCEVC Library dependencies on this page");typeof LCEVCdec!=="undefined"?(this.i=LCEVCdec,typeof this.i.SupportObject==="undefined"?(Wa("Could not find LCEVC Library on this page"),a=!1):(this.i.SupportObject.SupportStatus||Wa(this.i.SupportObject.SupportError),a=typeof this.i!=="undefined"&&typeof libDPIModule!=="undefined"&&this.j instanceof HTMLCanvasElement&&this.i.SupportObject.SupportStatus)):
(Wa("Could not find LCEVC Library on this page"),a=!1);a&&!this.h&&this.i.SupportObject.webGLSupport(this.j)&&(this.j.classList.remove("shaka-hidden"),this.h=new this.i.LCEVCdec(this.m,this.j,this.o))}function Dc(a,b,c,d){d.type!=="video"||a.l&&!Ec(d)||a.h&&a.h.appendBuffer(b,"video",d.id,-c,!a.l)}function Fc(a){a.h&&a.j.classList.add("shaka-hidden")}Cc.prototype.release=function(){this.h&&(this.h.close(),this.h=null)};function Ec(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}
K("shaka.lcevc.Dec",Cc);Cc.prototype.release=Cc.prototype.release;function Gc(){}function Hc(a,b){Ic.set(a,b)}function Jc(){var a={};ob();if(Kc())for(var b=t(Ic.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","audio/x-mpegurl"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Kc()?Ic.has(c):Mc().canPlayType(c)!="";return a}function Nc(a,b){if(b){var c=Ic.get(b);if(c)return c}throw new L(2,4,4E3,a,b);}K("shaka.media.ManifestParser",Gc);Gc.unregisterParserByMime=function(a){Ic.delete(a)};
Gc.registerParserByMime=Hc;Gc.AccessibilityPurpose={tm:"visually impaired",Ul:"hard of hearing",om:"spoken subtitles"};var Ic=new Map;function Oc(){}r=Oc.prototype;r.extract=function(){};r.extractRaw608=function(){};r.decode=function(){return[]};r.clear=function(){};r.getStreams=function(){return[]};function Qc(){}Qc.prototype.init=function(){};Qc.prototype.parse=function(){return[]};function Rc(a){this.i=new Map;this.j=0;this.l=new Qc;if(a=Sc(a.toLowerCase()))this.l=a();this.h=new Oc;if(a=Tc)this.h=a(),this.i.set(this.j,this.h)}Rc.prototype.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;c!=-1&&this.j!=c?Uc(this,c):b||this.h.clear();this.l.init(a);c!=-1&&(this.j=c)};
function Vc(a,b){b=a.l.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=yb(c.packet);if(d.length>0)switch(c.format){case Wc:a.h.extract(d,c.pts);break;case Xc:a.h.extractRaw608(d,c.pts)}}return a.h.decode()}function Uc(a,b){a.i.set(a.j,a.h);a.h=a.i.getOrInsertComputed(b,function(){var c=Tc;return c?c():a.h})}
Rc.prototype.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.i.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.i.get(c);d&&d.clear();this.i.delete(c)}};function Zc(a,b){$c.set(a,b)}function Sc(a){return $c.get(a)}K("shaka.media.ClosedCaptionParser",Rc);Rc.findDecoder=function(){return Tc};Rc.unregisterDecoder=function(){Tc=null};Rc.registerDecoder=function(a){Tc=a};Rc.findParser=Sc;Rc.unregisterParser=function(a){$c.delete(a)};Rc.registerParser=Zc;
var $c=new Map,Tc=null,Wc="sei",Xc="raw608";function ad(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=bd;this.scroll=cd;this.backgroundColor="";this.opacity=1;this.overflow=this.padding="";this.zIndex=null}
ad.prototype.clone=function(){var a=new ad;a.id=this.id;a.viewportAnchorX=this.viewportAnchorX;a.viewportAnchorY=this.viewportAnchorY;a.regionAnchorX=this.regionAnchorX;a.regionAnchorY=this.regionAnchorY;a.width=this.width;a.height=this.height;a.heightUnits=this.heightUnits;a.widthUnits=this.widthUnits;a.viewportAnchorUnits=this.viewportAnchorUnits;a.scroll=this.scroll;a.backgroundColor=this.backgroundColor;a.opacity=this.opacity;a.padding=this.padding;a.overflow=this.overflow;a.zIndex=this.zIndex;
return a};K("shaka.text.CueRegion",ad);ad.prototype.clone=ad.prototype.clone;var bd=1;ad.units={PX:0,PERCENTAGE:bd,LINES:2};var cd="";ad.scrollMode={NONE:cd,UP:"up"};function fd(a){this.i=a||"";this.h=0}function gd(a,b){for(var c=hd(a);c;)b(c),id(a,/[ \t]+/gm),c=hd(a)}function id(a,b){b.lastIndex=a.h;b=b.exec(a.i);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.h==a.i.length||b==null||b.position!=a.h)return null;a.h+=b.length;return b.results}function hd(a){return a.h==a.i.length?null:(a=id(a,/[^ \t\n]*/gm))?a[0]:null}
function jd(a){a=id(a,kd);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 ld(a){return a?jd(new fd(a)):null}var kd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function md(){}function nd(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 od(a){var b={},c;for(c in a)b[c]=a[c];return b}
function pd(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=pd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=pd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}K("shaka.util.ObjectUtils",md);md.alphabeticalKeyOrderStringify=pd;
md.shallowCloneObject=od;md.cloneObject=nd;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function rd(a,b){a=sd(a,!1);if(!b&&a.length)return a[0];var c=b.split(",");return(b=a.find(function(d){return c.includes(d.tagName)}))?b:null}function td(a){return ud.has(a)?ud.get(a):""}
function sd(a,b){function c(h,k){k=k===void 0?!1:k;for(var l=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){k=e+2;e=a.indexOf(">",e);k=a.substring(k,e);var m=k.indexOf(h);if(m==-1){var n=h.indexOf(".");n>0&&(m=k.indexOf(h.substring(0,n)))}if(m==-1)throw h=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(h.length-1)+"\nColumn: "+(h[h.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"){m=a.indexOf("]]\x3e",e);m==-1?(l.push(a.substr(e+9)),e=a.length):(l.push(a.substring(e+9,m)),e=m+3);continue}e++;continue}if(f>512)throw Error("XML is too deeply nested");f++;a:{n=k;e++;var p=d(),u={};for(m=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var v=
a.charCodeAt(e);v&&v!==39&&v!==34&&!(v>64&&v<91||v>96&&v<123)&&v!==62;)e++,v=a.charCodeAt(e);var w=e+1;e=a.indexOf(a[e],w);w=(" "+a.slice(w,e)).slice(1);if(v===39||v===34){if(e===-1){n={tagName:p,attributes:u,children:m,parent:null};if(b)for(p=0;p<m.length;p++)typeof m[p]!=="string"&&(m[p].parent=n);m=n;break a}}else w=null,e--;if(q.startsWith("xmlns:")){v=w;var x=q.split(":")[1];ud.set(v,x);vd.set(x,v)}u[q]=w}e++}g.push(u);b:if(q=p,w=q.indexOf(":"),q=w<0?"":q.substring(0,w),q=="xml")q="http://www.w3.org/XML/1998/namespace";
else{w=q?"xmlns:"+q:"xmlns";for(v=g.length-1;v>=0;--v)if(x=g[v][w],x!=null){q=x||(q?null:"");break b}q=q?null:""}if(u["xml:space"]=="preserve"||u["xml:space"]=="default")n=u["xml:space"]=="preserve";a.charCodeAt(e-1)!==47?(e++,m=c(p,n)):e++;g.pop();n={tagName:p,attributes:u,children:m,parent:null};wd.set(n,q);p=m.length;for(u=0;u<p;u++)q=m[u],typeof q!=="string"?b&&(q.parent=n):u==p-1&&q=="\n"&&m.pop();m=n}f--;l.push(m);if(typeof m==="string")break;m.tagName[0]==="?"&&m.children&&(l.push.apply(l,
wa(m.children)),m.children=[])}else m=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),m=(" "+a.slice(m,e+1)).slice(1),k?m.length>0&&l.push(m):l.length&&m.length==1&&m[0]=="\n"?l.push(m):m.trim().length>0&&l.push(m),e++;return l}function d(){for(var h=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return(" "+a.slice(h,e)).slice(1)}var e=0,f=0,g=[];return c("")}function xd(a){return typeof a==="string"}
function Bd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function Cd(a){if(typeof a==="string")return Lb(a);var b=[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"&&b.push(c);b=b.join("");return b===""?null:Lb(b)}
function Dd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())Dd(d.value,b,c)}return c}function Ed(a,b,c,d){d=d===void 0?[]:d;Fd(a,b,c)&&d.push(a);a=t(Bd(a));for(var e=a.next();!e.done;e=a.next())Ed(e.value,b,c,d);return d}
function Fd(a,b,c){if(typeof a=="string")return!1;var d=a.tagName.indexOf(":");if(a.tagName.substring(d+1)!=c)return!1;c=wd.get(a);if(c===void 0){for(var e=d<0?"xmlns":"xmlns:"+a.tagName.substring(0,d);a;a=a.parent)if(a.attributes[e]!=null){c=a.attributes[e];break}c===void 0&&(c=d<0?"":null);d>=0&&c==""&&(c=null)}return c!=null&&(typeof b=="string"?c==b:b.includes(c))}function Gd(a,b,c){b=td(b);return a.attributes[b+":"+c]||null}
function Hd(a,b){var c=Id;return Bd(a).filter(function(d){return Fd(d,c,b)})}function Jd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=Gd(a,d.value,c))return d;return null}function Kd(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}var ud=new Map,vd=new Map,wd=new WeakMap;function Ld(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new ad;this.position=null;this.positionAlign=Md;this.size=0;this.textAlign=Nd;this.direction=Od;this.writingMode=Pd;this.lineInterpretation=Qd;this.line=null;this.lineHeight="";this.lineAlign=Rd;this.displayAlign=Sd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Td;this.fontStyle=Ud;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.visibility=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 Vd(a,b){a=new Ld(a,b,"");a.lineBreak=!0;return a}
Ld.prototype.clone=function(){function a(d){if(d===null||typeof d!=="object")return d;if(Array.isArray(d))return d.map(a);if(d instanceof Ld)return d.clone();if(d instanceof ad)return d.clone();var e={},f;for(f in d)e[f]=a(d[f]);return e}var b=new Ld(0,0,""),c;for(c in this)b[c]=a(this[c]);return b};
function Wd(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(!gb(a.nestedCues,b.nestedCues,Wd))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(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Xd(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&Yd(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(Zd)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=$d(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=rd(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())ae(c.value,a,b);else a.payload=Lb(c);else a.payload=Lb(c)}else a.payload=Lb(c)}function Yd(a){for(var b=t(Object.entries(be)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Ld(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ce));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Ld(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function $d(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 ae(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new ad;d.position=null;d.size=0;d.textAlign=Nd;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=g.backgroundColor||h.backgroundColor,h.color=g.color||h.color,h.fontFamily=g.fontFamily||h.fontFamily,
h.fontSize=g.fontSize||h.fontSize,h.textShadow=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=Vd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=de;break;case "i":d.fontStyle=ee;break;case "u":d.textDecoration.push(fe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=ld(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(xd(a)||e.length==1&&xd(e[0]))for(c=Cd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Vd(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=Lb(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())ae(a.value,d,c)}K("shaka.text.Cue",Ld);Ld.parseCuePayload=Xd;Ld.equal=Wd;Ld.prototype.clone=Ld.prototype.clone;
var Md="auto";Ld.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Md};var Nd="center",ge={LEFT:"left",RIGHT:"right",CENTER:Nd,START:"start",END:"end"};Ld.textAlign=ge;var Sd="after",he={BEFORE:"before",CENTER:"center",AFTER:Sd};Ld.displayAlign=he;var Od="ltr";Ld.direction={HORIZONTAL_LEFT_TO_RIGHT:Od,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Pd="horizontal-tb";Ld.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Pd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var Qd=0;Ld.lineInterpretation={LINE_NUMBER:Qd,PERCENTAGE:1};var Rd="start",ie={CENTER:"center",START:Rd,END:"end"};Ld.lineAlign=ie;var be={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ld.defaultTextColor=be;var ce={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ld.defaultTextBackgroundColor=ce;var Td=400,de=700;Ld.fontWeight={NORMAL:Td,BOLD:de};
var Ud="normal",ee="italic",je={NORMAL:Ud,ITALIC:ee,OBLIQUE:"oblique"};Ld.fontStyle=je;var fe="underline";Ld.textDecoration={UNDERLINE:fe,LINE_THROUGH:"line-through",OVERLINE:"overline"};var Zd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ke(){}ke.prototype.destroy=function(){};function le(a,b,c){me.set(ne(a)+"-"+c,{priority:c,Ze:b})}function oe(a,b){for(var c=t(pe),d=c.next();!d.done;d=c.next()){a:{var e=a;d=d.value;d=d===void 0?null:d;e=ne(e);d=t(d!==null?[d]:pe);for(var f=d.next();!f.done;f=d.next())if(f=me.get(e+"-"+f.value)){e=f.Ze;break a}e=null}if(e){d=void 0;try{d=e()}catch(g){continue}f=!1;try{f=d.isSupported(a,b)}catch(g){}finally{d.destroy()}if(f)return e}}return null}
function qe(a,b){a=ne(a);for(var c=t(pe),d=c.next();!d.done;d=c.next()){d=d.value;var e=me.get(a+"-"+d);if(e&&e.Ze===b)return d}return null}function ne(a){return a.toLowerCase().split(";")[0]}K("shaka.transmuxer.TransmuxerEngine",ke);ke.findTransmuxer=oe;ke.unregisterTransmuxer=function(a,b){me.delete(ne(a)+"-"+b)};ke.registerTransmuxer=le;ke.prototype.destroy=ke.prototype.destroy;var me=new Map;ke.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4};var pe=[4,3,2,1];function re(){}function se(a,b){var c=a;b&&!we.includes(a)&&(c+='; codecs="'+b+'"');return c}function xe(a,b){b&&(a+='; codecs="'+b+'"');return a}function ye(a,b,c){var d=se(a,b);b=xe(a,b);oe(b)?(a=oe(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 ze(a){return a.split(";")[0].split("/")[1]}
function Ae(a){var b=Be(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 Ce(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Be(c.value),b.push(c[0]);return b.sort().join(",")}function De(a){return a.split(";")[0]}function Ee(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
function Fe(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"||a==="audio/x-mpegurl"}function Ge(a,b){var c=ob(),d=a.toLowerCase();return d=="flac"?c.Ea()!="WEBKIT"?"flac":"fLaC":d==="opus"?c.Ea()!="WEBKIT"?"opus":ze(b)=="mp4"?"Opus":"opus":d=="ac-3"&&c.Vd()?"ec-3":a}function He(a,b){a=a.split(",").map(function(d){return d.trim()});var c=xc("audio",a);return a.map(function(d){return d==c?Ge(d,b):Ie(d)}).join(",")}
function Ie(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 Be(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}K("shaka.util.MimeUtils",re);re.getFullTypeWithAllCodecs=xe;re.getFullType=se;
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Je="application/cea-608",Ke="application/cea-708",we=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Le(a,b){this.m=null;this.l=a;this.F=b===void 0?"UNKNOWN":b;this.D=this.K=this.I=!1;this.u=new Map;this.j=new Map;this.B=0;this.C=Infinity;this.i=this.h=null;this.H="";this.G=function(){};this.o=new Map}function Me(a,b){Ne.set(a,b)}function Oe(a){return Ne.get(a)}function Pe(a){return Ne.has(a)?!0:a==Je||a==Ke?!!Tc:!1}Le.prototype.destroy=function(){this.l=this.m=null;this.u.clear();this.j.clear();this.o.clear();return Promise.resolve()};
function Qe(a,b,c,d,e,f){f=f===void 0?-1:f;var g,h,k,l,m,n,p,u,q;return H(function(v){if(v.i==1)return a.D||a.u.has(f)?v.h(Promise.resolve(),2):(g=a.j.get(f)||[],g.push({buffer:b,startTime:c,endTime:d,uri:e,tj:f}),a.j.set(f,g),v.return());if(!a.m||!a.l)return v.return();if(c==null||d==null)return a.m.parseInit(yb(b)),v.return();h=a.D?0:a.u.get(f);k=a.I||a.D?c:a.u.get(f);l={periodStart:h,segmentStart:c,segmentEnd:d,vttOffset:k,isMpegTs:a.K};m=a.m.parseMedia(yb(b),l,e,[]);n=t(m);for(p=n.next();!p.done;p=
n.next())u=p.value,a.G(u,e||null,l);q=m.filter(function(w){return w.startTime>=a.B&&w.startTime<a.C});a.l.append(q);a.h==null&&(a.h=Math.max(c,a.B));a.i=Math.min(d,a.C);v.l()})}
Le.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n;return H(function(p){if(p.i==1)return p.h(Promise.resolve(),2);if(a>=b||c&&(Re(d,a,b),d.H===""))return p.return();e=function(u){return u.startTime<b&&u.endTime>a};f=t(d.j.keys());for(g=f.next();!g.done;g=f.next()){h=g.value;k=d.j.get(h);l=[];for(m=0;m<k.length;m++)n=k[m],e(n)||l.push(n);d.j.set(h,l)}d.l&&d.l.remove(a,b)&&d.h!=null&&(b<=d.h||a>=d.i||(a<=d.h&&b>=d.i?d.h=d.i=null:a<=d.h&&b<d.i?d.h=b:a>d.h&&b>=d.i&&(d.i=
a)),Se(d));p.l()})};function Te(a,b,c){c=c===void 0?-1:c;(!a.u.has(c)||a.F!=="HLS"||a.F==="HLS"&&c===-1&&a.u.get(c)===0)&&a.u.set(c,b);b=a.j.get(c)||[];for(var d=0;d<b.length;d++){var e=b[d];Qe(a,e.buffer,e.startTime,e.endTime,e.uri,e.tj)}a.j.set(c,[])}function Ue(a,b){a.K=b}function Ve(a,b,c){a.B=b;a.C=c}function Xe(a,b,c){a.H=b;if(b=a.o.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function Ye(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ye(a,d.value,c)}
function Ze(a,b,c){var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.getOrInsert(e,[]);Ye(a,f,c);f.startTime>=a.B&&f.startTime<a.C&&(d.get(e).push(f),e==a.H&&a.l.append([f]))}c=t(d.keys());for(b=c.next();!b.done;b=c.next())for(e=b.value,b=a.o.getOrInsertComputed(e,function(){return[]}),e=t(d.get(e)),f=e.next();!f.done;f=e.next())b.push(f.value);Se(a)}
function Re(a,b,c){for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.o.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.o.set(e,f)}}
function Se(a){for(var b=Infinity,c=-Infinity,d=t(a.o.values()),e=d.next();!e.done;e=d.next()){e=t(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.h=a.h==null?Math.max(b,a.B):Math.min(a.h,Math.max(b,a.B)),a.i=Math.max(a.i,Math.min(c,a.C)))}K("shaka.text.TextEngine",Le);Le.prototype.destroy=Le.prototype.destroy;Le.findParser=Oe;Le.unregisterParser=function(a){Ne.delete(a)};Le.registerParser=Me;var Ne=new Map;function $e(a){this.i=a;this.h=null}$e.prototype.hb=function(){this.stop();this.i();return this};$e.prototype.ea=function(a){var b=this;this.stop();af(this,function(){b.i()},a);return this};$e.prototype.La=function(a){this.stop();bf(this,a);return this};$e.prototype.stop=function(){var a;(a=this.h)==null||a.call(this);this.h=null};function af(a,b,c){var d=!0,e=null;a.h=function(){clearTimeout(e);d=!1};e=setTimeout(function(){d&&b()},c*1E3)}function bf(a,b){af(a,function(){bf(a,b);a.i()},b)}
K("shaka.util.Timer",$e);$e.prototype.stop=$e.prototype.stop;$e.prototype.tickEvery=$e.prototype.La;$e.prototype.tickAfter=$e.prototype.ea;$e.prototype.tickNow=$e.prototype.hb;function cf(a){return a!=null}function df(a,b){return Promise.race([b,new Promise(function(c,d){(new $e(d)).ea(a)})])}function ef(a){return new Promise(function(b){(new $e(b)).ea(a)})};function ff(){}
function gf(a,b,c,d,e){if(e.length){var f=a.textStreams;e=t(e);for(var g=e.next(),h={};!g.done;h={eh:void 0},g=e.next())if(h.eh=g.value,g=f.filter(function(q){return function(v){return v.codecs.startsWith(q.eh)||v.mimeType.startsWith(q.eh)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=hf(f,b,c);if(d.length){b=new hb;f=t(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(q,v){q=0;var w=[];v=t(v);for(var x=
v.next(),y={};!x.done;y={pf:void 0},x=v.next())y.pf=x.value,x=d.filter(function(z){return function(C){return z.pf.decodingInfos[0][C]}}(y)).length,x>q?(q=x,w=[y.pf]):x==q&&w.push(y.pf);k.push.apply(k,wa(w))});f=k}b=new Set;c=t(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(q,v){return q.bandwidth&&v.bandwidth&&q.bandwidth!=
v.bandwidth?q.bandwidth-v.bandwidth:q.width!=v.width?q.width-v.width:q.codecs&&v.codecs?(q=Ae(q.codecs),v=Ae(v.codecs),(l[q]||1)-(l[v]||1)):0});var m=[];b=new Map;c=function(q){var v=[String(q.width||""),String(q.height||""),String(Math.round(q.frameRate||0)),q.hdr||"",q.fastSwitching];q.dependencyStream&&v.push(q.dependencyStream.baseOriginalId||"");q.roles&&v.push(q.roles.sort().join("_"));return v.join(";")};e=t(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 p=
Ae(n[n.length-1].codecs),u=Ae(g.codecs);p==u&&(n.push(g),m.push(g.id))}else n.push(g),m.push(g.id);b.set(h,n)}a.variants=f.filter(function(q){return(q=q.video)&&!m.includes(q.id)?!1:!0})}else a.variants=f}
function hf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Vi:void 0},d=b.next())if(e.Vi=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Vi)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={xh:void 0},b=c.next())if(d.xh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.xh)}}(d)),b.length){a=b;break}return a}
function jf(a,b,c){function d(h,k,l){return h>=k&&h<=l}if(a&&a.video&&a.video.width&&a.video.height){var e=a.video.width,f=a.video.height;f>e&&(f=t([f,e]),e=f.next().value,f=f.next().value);var g=c.width;c=c.height;c>g&&(c=t([c,g]),g=c.next().value,c=c.next().value);if(!d(e,b.minWidth,Math.min(b.maxWidth,g))||!d(f,b.minHeight,Math.min(b.maxHeight,c))||!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 kf(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return H(function(e){if(e.i==1)return e.h(lf(a,b,b.offlineSessionIds.length>0,c,d),2);mf(b);return e.h(sf(b),0)})}
function lf(a,b,c,d,e){var f,g;return H(function(h){if(h.i==1)return ob().Mi()&&tf(b.variants),h.h(uf(b.variants,c,!1,d),2);f=null;a&&(g=a.Tb())&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=vf(k,f,e);if(!l){var m=[];k.audio&&m.push(wf(k.audio));k.video&&m.push(wf(k.video))}return l});h.l()})}
function tf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function vf(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=ob(),e=d.mb()==="Xbox";d=d.Ka()==="MOBILE"&&d.Ea()==="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)&&!Ec(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function xf(a,b){var c,d,e,f,g,h,k;return H(function(l){if(l.i==1){c=function(m,n){if(m){var p=od(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,qe:void 0},g=f.next())k=g.value,h.qe=pd(k),h.cache=yf,h.cache.has(h.qe)?d=c(d,h.cache.get(h.qe)):e.push(zf(k).then(function(m){return function(n){var p=
null;n=t(n||[]);for(var u=n.next();!u.done;u=n.next())p=c(p,u.value);p&&(m.cache.set(m.qe,p),d=c(d,p))}}(h)));return l.h(Promise.all(e),2)}d&&a.decodingInfos.push(d);l.l()})}
function zf(a){var b=[""];a.video&&(b=Ee(a.video.contentType).split(","));var c=[""];a.audio&&(c=Ee(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={wc:void 0},g=f.next())g=g.value,h.wc=nd(a),a.video&&(h.wc.video.contentType=se(De(h.wc.video.contentType),e)),a.audio&&(h.wc.audio.contentType=se(De(h.wc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(ob().Ka()=="MOBILE"?df(5,navigator.mediaCapabilities.decodingInfo(k.wc)):
navigator.mediaCapabilities.decodingInfo(k.wc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function uf(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A;return H(function(D){switch(D.i){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f=t(d);g=f.next();h={};case 2:if(g.done){D.A(4);break}h.si=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.A(7);break}n=m.value;p=Af(n,b,c).filter(function(F){return function(E){E=E[0];E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||E===F.si}}(h));u=t(p);q=u.next();case 8:if(q.done){D.A(10);break}v=
q.value;return D.h(xf(n,v),9);case 9:q=u.next();D.A(8);break;case 10:n.decodingInfos.some(function(F){return F.supported})&&(k=!0);m=l.next();D.A(5);break;case 7:if(k)return D.return();h={si:void 0};g=f.next();D.A(2);break;case 4:w=t(a),x=w.next();case 12:if(x.done){D.A(0);break}y=x.value;z=Af(y,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});C=t(z);B=C.next();case 15:if(B.done){x=w.next();D.A(12);break}A=B.value;return D.h(xf(y,
A),16);case 16:B=C.next(),D.A(15)}})}
function Af(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=Ee(k);if(l.includes(",")&&!d){var m=l.split(","),n=De(k);l=wc("video",m);m=wc("audio",m);m=Ge(m,n);n=ye(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Ie(l);k={contentType:ye(De(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=De(l),l=Ge(Ee(l),k),k=ye(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),n=l.next();!n.done;n=
l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=t(n);for(m=n.next();!m.done;m=n.next()){m=
m.value;var p=m.videoRobustness+","+m.audioRobustness;l.get(p)||l.set(p,[]);l.get(p).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];p=t(h);for(var u=p.next();!u.done;u=p.next()){u=Object.assign({},u.value);for(var q={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=t(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var x=new Set,y=t(w.initData),z=y.next();!z.done;z=y.next())x.add(z.value.initDataType);
q.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(q.distinctiveIdentifier="required");w.persistentStateRequired&&(q.persistentState="required");w.sessionType&&(q.sessionTypes=[w.sessionType]);d&&(q.audio?(w.encryptionScheme&&(q.audio.encryptionScheme=q.audio.encryptionScheme||w.encryptionScheme),q.audio.robustness=q.audio.robustness||w.audioRobustness):(q.audio={robustness:w.audioRobustness},w.encryptionScheme&&(q.audio.encryptionScheme=w.encryptionScheme)),q.audio.robustness==
""&&delete q.audio.robustness);e&&(q.video?(w.encryptionScheme&&(q.video.encryptionScheme=q.video.encryptionScheme||w.encryptionScheme),q.video.robustness=q.video.robustness||w.videoRobustness):(q.video={robustness:w.videoRobustness},w.encryptionScheme&&(q.video.encryptionScheme=w.encryptionScheme)),q.video.robustness==""&&delete q.video.robustness)}u.keySystemConfiguration=q;m.push(u)}a.push(m)}}return a}
function mf(a){a.textStreams=a.textStreams.filter(function(b){b=se(b.mimeType,b.codecs);return Pe(b)})}
function sf(a){var b,c,d,e,f,g,h,k;return H(function(l){switch(l.i){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(Bf.has(f)){l.A(5);break}g=Cf.get(f);if(!g){Bf.set(f,!1);l.A(5);break}return l.h(Df(g),7);case 7:h=l.j,Bf.set(f,h);case 5:(k=Bf.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,l.l()}})}
function Df(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 Ef(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,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,audioLanguage:null,videoLanguage: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.videoLanguage=c.language||null;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=wc("video",e),a.audioCodec=wc("audio",e)}catch(u){}}}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.audioLanguage=b.language||null,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 Ff(a){return{id:a.id,active:!1,type:zc,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 Gf(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=Hf(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 If(a){return{id:a.id,type:"chapter",bandwidth:a.bandwidth||0,language:a.language}}
function Jf(a){a.__shaka_id==void 0&&(a.__shaka_id=Kf++);return a.__shaka_id}function Lf(a,b){b=b===void 0?!1:b;b={id:Jf(a),active:b&&a.mode!="disabled",type:zc,bandwidth:0,language:mc(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 Mf(a,b){var c=a?a.language:null;c={id:Jf(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:mc(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,audioLanguage:a?mc(a.language||"und"):
null,videoLanguage:b?mc(b.language||"und"):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 Nf(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}
function Of(a){return a.filter(function(b){return Nf(b)})}function Pf(a){return!!a.video&&(!!a.audio||a.video.codecs.includes(","))}function Qf(a){var b=a.filter(Pf);return b.length?b:a}
function Rf(a,b,c,d){if(!b)return[];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(mc(b),a.map(function(k){return k.language}));if(h)e=a.filter(function(k){return mc(k.language)==h});else return[]}e=e.filter(function(k){return k.forced==d});if(c)return Sf(e,c);a=e.filter(function(k){return k.roles.length==0});if(a.length)return a;a=e.map(function(k){return k.roles}).reduce(function(k,l){return k.concat(l)},
[]);return a.length?Sf(e,a[0]):e}function Tf(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.language&&(c=Rf(a,c.language,c.role||"",c.forced||!1),c.length))return c;return[]}function Sf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Uf(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function Vf(a,b){b.length&&(b=b.filter(function(c){return Ae(a.codecs)==Ae(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 wf(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 Wf(a){var b={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",supplementalCodecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],accessibilityPurpose:null,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,
isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1,preselection:null};Object.assign(b,a);b.mimeType&&b.fullMimeTypes.add(se(b.mimeType,b.codecs));return b}
function Xf(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Wf({mimeType:c?De(c):"",codecs:c?Ee(c):"",encrypted:!0,language:"und",type:"video"});c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}K("shaka.util.StreamUtils",ff);ff.meetsRestrictions=jf;
var yf=new Map,Kf=0,Bf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Cf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Yf(){var a=this;this.M=this.H=null;this.u=!1;this.B=new Ta;this.j=new ib;navigator.connection&&navigator.connection.addEventListener&&this.j.J(navigator.connection,"change",function(){var b;((b=a.h)==null?0:b.useNetworkInformation)&&navigator.onLine&&(a.B=new Ta,a.B.configure(a.h.advanced),a.trySuggestStreams())});this.o=[];this.I=1;this.O=!1;this.m=this.i=this.h=this.C=null;this.D=new $e(function(){if(a.u&&(a.h.restrictToElementSize||a.h.restrictToScreenSize)){var b=a.chooseVariant();b&&
a.H&&a.H(b,a.h.clearBufferSwitch,a.h.safeMarginSwitch)}});this.F=window;"documentPictureInPicture"in window&&this.j.J(window.documentPictureInPicture,"enter",function(){a.F=window.documentPictureInPicture.window;a.D&&a.D.hb();a.j.Ra(a.F,"pagehide",function(){a.F=window;a.D&&a.D.hb()})});this.N=this.G=this.l=null;this.L=this.K=0}r=Yf.prototype;
r.stop=function(){this.H=null;this.u=!1;this.o=[];this.I=1;this.i=this.C=null;var a;(a=this.m)==null||a.disconnect();this.m=null;var b;(b=this.D)==null||b.stop();this.G=this.l=null;Zf(this)};r.release=function(){this.stop();this.j.release();this.D=null};r.init=function(a,b){this.H=a;this.M=b};
r.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.h.restrictToScreenSize&&(c=this.h.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,b=this.F.screen.height*c,c*=this.F.screen.width);if(this.m&&this.h.restrictToElementSize){var d=this.h.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,e=this.i.clientHeight,f=this.i.clientWidth;this.l&&document.pictureInPictureElement&&document.pictureInPictureElement==this.i&&(e=this.l.height,f=this.l.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.o.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.o);d=e;a&&e.length!=this.o.length&&(d=this.o.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=$f(this,this.h.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=ag(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=$f(this,this.h.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=$f(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.h.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.h.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};r.enable=function(){this.u=!0;bg(this);this.o.length&&this.trySuggestStreams()};r.disable=function(){this.u=!1};r.segmentDownloaded=function(a,b,c){a>=this.h.cacheLoadThreshold&&this.B.sample(a,b);c&&this.C!=null&&this.u&&cg(this)};r.trySuggestStreams=function(){this.u&&(this.C=Date.now(),cg(this,!0))};
r.getBandwidthEstimate=function(){var a=this.h.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.h.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.h.useNetworkInformation&&this.h.preferNetworkInformationBandwidth)return a;a=this.B.getBandwidthEstimate(a);return this.G?this.G.getBandwidthEstimate(a):a};r.setVariants=function(a){if(eb(a,this.o))return!1;this.o=a;return!0};
r.playbackRateChanged=function(a){this.I=a};r.setMediaElement=function(a){function b(){c.D.ea(dg)}var c=this;this.i=a;this.m&&(this.m.disconnect(),this.m=null);this.i&&"ResizeObserver"in window&&(this.m=new ResizeObserver(b),this.m.observe(this.i));this.j.J(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.l=d.pictureInPictureWindow,c.j.J(c.l,"resize",b))});this.j.J(a,"leavepictureinpicture",function(){c.l&&c.j.qb(c.l,"resize",b);c.l=null});fg(this)};
r.setCmsdManager=function(a){this.G=a};r.configure=function(a){this.h=a;this.B&&this.h&&this.B.configure(this.h.advanced);fg(this)};function cg(a,b){if(b===void 0||!b){if(!a.O){b=a.B;if(!(b.h>=b.j))return;a.O=!0;a.C-=(a.h.switchInterval-a.h.minTimeToSwitch)*1E3}if(Date.now()-a.C<a.h.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H&&(a.H(b,a.h.clearBufferSwitch,a.h.safeMarginSwitch),bg(a))}
function $f(a,b,c,d,e){if(a.G){var f=a.G.Oh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return jf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function ag(a){var b=[];a=t(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})}
function fg(a){Zf(a);var b=a.i;a.h.droppedFrames&&b!=null&&b.getVideoPlaybackQuality&&(bg(a),gg(a),a.N=(new $e(function(){if(!a.i.paused&&a.u&&a.h.droppedFrames){var c=a.i.getVideoPlaybackQuality(),d=c.droppedVideoFrames;c=c.totalVideoFrames;if((isNaN(a.I)?1:Math.abs(a.I))>1||!c)a.K=d,a.L=c;else{var e=d-a.K,f=c-a.L;a.K=d;a.L=c;e/f>=a.h.advanced.droppedFramesThreshold&&a.M&&a.M("video",a.h.advanced.droppedFramesBanDuration)}}})).La(a.h.advanced.droppedFramesInterval))}
function Zf(a){a.j.qb(a.i,"resize");var b;(b=a.N)==null||b.stop();a.N=null}function bg(a){var b=a.i;a.h.droppedFrames&&(b==null?0:b.getVideoPlaybackQuality)&&(b=b.getVideoPlaybackQuality(),a.K=b.droppedVideoFrames,a.L=b.totalVideoFrames)}function gg(a){a.j.J(a.i,"resize",function(){bg(a)})}K("shaka.abr.SimpleAbrManager",Yf);Yf.prototype.configure=Yf.prototype.configure;Yf.prototype.setCmsdManager=Yf.prototype.setCmsdManager;Yf.prototype.setMediaElement=Yf.prototype.setMediaElement;
Yf.prototype.playbackRateChanged=Yf.prototype.playbackRateChanged;Yf.prototype.setVariants=Yf.prototype.setVariants;Yf.prototype.getBandwidthEstimate=Yf.prototype.getBandwidthEstimate;Yf.prototype.trySuggestStreams=Yf.prototype.trySuggestStreams;Yf.prototype.segmentDownloaded=Yf.prototype.segmentDownloaded;Yf.prototype.disable=Yf.prototype.disable;Yf.prototype.enable=Yf.prototype.enable;Yf.prototype.chooseVariant=Yf.prototype.chooseVariant;Yf.prototype.init=Yf.prototype.init;
Yf.prototype.release=Yf.prototype.release;Yf.prototype.stop=Yf.prototype.stop;var dg=1;function hg(a,b,c,d,e,f){f=f===void 0?!1:f;if(d>=e)return null;for(var g=-1,h=-1,k=0;k<c.length;k++)c[k].some(function(D){return D!=null&&D.h.trim()!=""})&&(g===-1&&(g=k),h=k);if(g===-1||h===-1)return null;for(var l=k=!1,m="white",n="black",p=d,u=ig(d,e,k,l,m,n);g<=h;g++){for(var q=c[g],v=-1,w=-1,x=0;x<q.length;x++)q[x]!=null&&q[x].h.trim()!==""&&(v===-1&&(v=x),w=x);if(v===-1||w===-1)q=jg(d,e),a.nestedCues.push(q);else{for(;v<=w;v++)if(x=q[v]){var y=x.m,z=x.j,C=x.l,B=x.i,A=x.o;A=f&&A!=null&&A>d?A:
d;if(y!=k||z!=l||C!=m||B!=n||A!=p)u.payload&&a.nestedCues.push(u),u=ig(A,e,y,z,C,B),k=y,l=z,m=C,n=B,p=A;u.payload+=x.h}else u.payload+=" ";u.payload&&a.nestedCues.push(u);g!==h&&(p=jg(d,e),a.nestedCues.push(p));p=d;u=ig(d,e,k,l,m,n)}}return a.nestedCues.length?{cue:a,stream:b}:null}function ig(a,b,c,d,e,f){a=new Ld(a,b,"");c&&a.textDecoration.push(fe);d&&(a.fontStyle=ee);a.color=e;a.backgroundColor=f;return a}function jg(a,b){a=new Ld(a,b,"");a.lineBreak=!0;return a}
function kg(a,b){switch(a){case lg:return b==6;case mg:return b==39||b==40;case ng:return b==23||b==24;default:return!1}}var lg=0,mg=1,ng=2;function og(a,b,c,d,e,f){this.h=a;this.m=b;this.j=c;this.i=d;this.l=e;this.o=f===void 0?null:f};function pg(a,b){this.j=[];this.h=1;this.i=0;this.F=a;this.D=b;this.m=this.u=!1;this.o="white";this.C="black";this.B=this.l=null;qg(this)}function rg(a,b,c,d){d=d===void 0?!1:d;var e="CC"+((a.F<<1|a.D)+1),f=new Ld(b,c,"");f.lineInterpretation=1;var g=a.j.findIndex(function(h){return h.some(function(k){return k.h.trim()!=""})});if(g=sg.get(g))f.line=g;a.B!=null&&a.l!=null&&(f.position=10+Math.min(70,a.B*10)+a.l*2.5);return hg(f,e,a.j,b,c,d)}function qg(a){tg(a,0,15);a.h=1;a.l=null;a.B=null}
function ug(a,b,c,d){d=d===void 0?null:d;if(!(c<32||c>127)){var e="";switch(b){case 0:e=vg.has(c)?vg.get(c):String.fromCharCode(c);break;case 1:e=wg.get(c);break;case 2:a.j[a.h].pop();e=xg.get(c);break;case 3:a.j[a.h].pop(),e=yg.get(c)}e&&a.j[a.h].push(new og(e,a.u,a.m,a.C,a.o,d))}}function zg(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.j[b+d]=a.j[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.j[b+e]=a.j[c+e].map(function(f){return f})}
function tg(a,b,c){for(var d=0;d<=c;d++)a.j[b+d]=[]}
var vg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),wg=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"]]),xg=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"]]),yg=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"]]),sg=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 Ag(a,b){this.i=0;this.u=new pg(a,b);this.j=new pg(a,b);this.h=this.l=new pg(a,b);this.m=0;this.o=null}function Bg(a,b,c){a.h=a.j;var d=a.h,e=null;a.i!==3&&a.i!==4&&(e=rg(d,a.m,c,a.i===2),c=a.j,c.h=c.i>0?c.i:0,tg(c,0,15),c=a.l,c.h=c.i>0?c.i:0,tg(c,0,15),d.h=15);a.i=3;d.i=b;return e}function Cg(a){a.i=1;a.h=a.l;a.h.i=0}function Dg(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.h=a.u;a.i=4}var Eg="black green blue cyan red yellow magenta black".split(" "),Fg="white green blue cyan red yellow magenta white_italics".split(" ");function Gg(a,b){this.K=b;this.N=a;this.L=this.m=!1;this.o=this.u=this.H=this.M=this.I=0;this.G=2;this.j=[];this.h=this.i=this.l=0;this.F=this.C=!1;this.D="white";this.B="black";Hg(this)}function Hg(a){a.j=[];for(var b=0;b<16;b++)a.j.push(Ig())}function Ig(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function Jg(a,b){Kg(a)&&(a.j[a.i][a.h]=new og(b,a.F,a.C,a.B,a.D),a.h++)}function Kg(a){var b=a.h<a.o&&a.h>=0;return a.i<a.u&&a.i>=0&&b}Gg.prototype.isVisible=function(){return this.m};
function Lg(a,b,c){var d=new Ld(a.l,b,"");d.textAlign=a.G===0?"left":a.G===1?"right":Nd;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.N;e.height=a.u;e.width=a.o;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?bd: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=hg(d,"svc"+c,a.j,a.l,b))a.l=b;return c}Gg.prototype.display=function(){this.m=!0};function Og(){this.j=[];this.i=null;this.h=0}function Pg(a,b){b.type===3?(a.h=(b.value&63)*2-1,a.i=[]):a.i&&(a.h>0&&(a.i.push(b),a.h--),a.h===0&&(a.j.push(new Qg(a.i)),a.i=null,a.h=0))}function Qg(a){this.h=0;this.i=a}Qg.prototype.Wa=function(){return this.h<this.i.length};Qg.prototype.Ia=function(){return this.h};function Rg(a){if(!a.Wa())throw new L(2,2,3E3);return a.i[a.h++]}Qg.prototype.skip=function(a){if(this.h+a>this.i.length)throw new L(2,2,3E3);this.h+=a};
Qg.prototype.Ai=function(a){if(this.h-a<0)throw new L(2,2,3E3);this.h-=a};function Sg(a){this.j=a;this.i=[null,null,null,null,null,null,null,null];this.h=null}
function Tg(a,b){var c=Rg(b),d=c.value;c=c.pts;if(d===16){var e=Rg(b);d=d<<16|e.value}if(d>=0&&d<=31){e=d;if(e==24)c=Rg(b).value,b=Rg(b).value,a.h&&Jg(a.h,String.fromCharCode(c<<8|b)),a=[];else if(a.h){b=a.h;d=null;switch(e){case 8:!Kg(b)||b.h<=0&&b.i<=0||(b.h<=0?(b.h=b.o-1,b.i--):b.h--,b.j[b.i][b.h]=null);break;case 13:b.isVisible()&&(d=Lg(b,c,a.j));if(b.i+1>=b.u){a=0;for(c=1;c<16;c++,a++)b.j[a]=b.j[c];for(c=0;c<1;c++,a++)b.j[a]=Ig()}else b.i++;b.h=0;break;case 14:b.isVisible()&&(d=Lg(b,c,a.j));
b.j[b.i]=Ig();b.h=0;break;case 12:b.isVisible()&&(d=Lg(b,c,a.j)),Hg(b),b.i=0,b.h=0}a=d?[d]:[]}else a=[];return a}if(d>=128&&d<=159)return Ug(a,b,d,c);d>=4096&&d<=4127?(a=d&255,a>=8&&a<=15?b.skip(1):a>=16&&a<=23?b.skip(2):a>=24&&a<=31&&b.skip(3)):d>=4224&&d<=4255?(a=d&255,a>=128&&a<=135?b.skip(4):a>=136&&a<=143&&b.skip(5)):d>=32&&d<=127?(b=d,a.h&&(b===127?Jg(a.h,"\u266a"):Jg(a.h,String.fromCharCode(b)))):d>=160&&d<=255?a.h&&Jg(a.h,String.fromCharCode(d)):d>=4128&&d<=4223?(b=d&255,a.h&&(Vg.has(b)?(b=
Vg.get(b),Jg(a.h,b)):Jg(a.h,"_"))):d>=4256&&d<=4351&&a.h&&((d&255)!=160?Jg(a.h,"_"):Jg(a.h,"[CC]"));return[]}
function Ug(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.i[d]&&(a.h=a.i[d]);else{if(c===136){c=Rg(b).value;b=[];c=t(Wg(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.i[e.value];if(e.isVisible()){var f=Lg(e,d,a.j);f&&b.push(f)}Hg(e)}return b}if(c===137)for(b=Rg(b).value,b=t(Wg(a,b)),c=b.next();!c.done;c=b.next())c=a.i[c.value],c.isVisible()||(c.l=d),c.display();else{if(c===138){c=Rg(b).value;b=null;c=t(Wg(a,c));for(e=c.next();!e.done;e=c.next())e=a.i[e.value],e.isVisible()&&(b=Lg(e,d,a.j)),e.m=!1;return b?
[b]:[]}if(c===139){c=Rg(b).value;b=null;c=t(Wg(a,c));for(e=c.next();!e.done;e=c.next())e=a.i[e.value],e.isVisible()?b=Lg(e,d,a.j):e.l=d,e.m=!e.m;return b?[b]:[]}if(c===140)return b=Rg(b).value,Xg(a,b,d);if(c===143)return d=Xg(a,255,d),Yg(a),d;if(c===144)b.skip(1),d=Rg(b).value,a.h&&(a.h.C=(d&128)>0,a.h.F=(d&64)>0);else if(c===145)d=Rg(b).value,c=Rg(b).value,b.skip(1),a.h&&(b=Zg((c&48)>>4,(c&12)>>2,c&3,c>>6),a.h.D=Zg((d&48)>>4,(d&12)>>2,d&3,d>>6),a.h.B=b);else if(c===146)d=Rg(b).value,b=Rg(b).value,
a.h&&(a=a.h,a.i=d&15,a.h=b&63);else if(c===151)b.skip(1),b.skip(1),d=Rg(b).value,b.skip(1),a.h&&(a.h.G=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.i[c]!==null;e||(f=new Gg(c,a.j),f.l=d,a.i[c]=f);d=Rg(b).value;f=Rg(b).value;var g=Rg(b).value,h=Rg(b).value,k=Rg(b).value;b=Rg(b).value;e&&(b&7)===0||(b=a.i[c],b.i=0,b.h=0,b.F=!1,b.C=!1,b.D="white",b.B="black");b=a.i[c];b.m=(d&32)>0;b.M=f&127;b.I=g;b.H=(h&240)>>4;b.L=(f&128)>0;b.u=(h&15)+1;b.o=(k&63)+1;a.h=a.i[c]}}}return[]}
function Wg(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.i[d]&&c.push(d),b>>=1;return c}function Xg(a,b,c){var d=[];b=t(Wg(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.i[e];f.isVisible()&&(f=Lg(f,c,a.j))&&d.push(f);a.i[e]=null}return d}function Yg(a){a.h=null;a.i=[null,null,null,null,null,null,null,null]}function Zg(a,b,c,d){d=d===void 0?0:d;return d===3?"rgba(0, 0, 0, 0)":d===2?"rgba("+(a>>1)*255+", "+(b>>1)*255+", "+((c>>1)*255+", 0.5)"):$g[a>>1<<2|b>>1<<1|c>>1]}
var Vg=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"]]),$g="black blue green cyan red magenta yellow white".split(" ");function ah(a,b){this.i=Bb(a);this.j=b==bh;this.h=0}r=ah.prototype;r.Wa=function(){return this.h<this.i.byteLength};r.Ia=function(){return this.h};r.Na=function(){return this.i.byteLength};r.X=function(){try{var a=this.i.getUint8(this.h);this.h+=1;return a}catch(b){throw ch();}};r.xa=function(){try{var a=this.i.getUint16(this.h,this.j);this.h+=2;return a}catch(b){throw ch();}};r.R=function(){try{var a=this.i.getUint32(this.h,this.j);this.h+=4;return a}catch(b){throw ch();}};
r.Jg=function(){try{var a=this.i.getInt32(this.h,this.j);this.h+=4;return a}catch(b){throw ch();}};r.$e=function(){try{if(this.j){var a=this.i.getUint32(this.h,!0);var b=this.i.getUint32(this.h+4,!0)}else b=this.i.getUint32(this.h,!1),a=this.i.getUint32(this.h+4,!1)}catch(c){throw ch();}if(b>2097151)throw new L(2,3,3001);this.h+=8;return b*4294967296+a};r.wa=function(a,b){if(this.h+a>this.i.byteLength)throw ch();var c=yb(this.i,this.h,a);this.h+=a;return b?new Uint8Array(c):c};
r.skip=function(a){if(a<0||this.h+a>this.i.byteLength)throw ch();this.h+=a};r.Ai=function(a){if(a<0||this.h<a)throw ch();this.h-=a};r.seek=function(a){if(a<0||a>this.i.byteLength)throw ch();this.h=a};r.hd=function(){for(var a=this.h;this.Wa()&&this.i.getUint8(this.h)!=0;)this.h+=1;a=yb(this.i,a,this.h-a);this.h+=1;return Fb(a)};function ch(){return new L(2,3,3E3)}K("shaka.util.DataViewReader",ah);ah.prototype.readTerminatedString=ah.prototype.hd;ah.prototype.seek=ah.prototype.seek;
ah.prototype.rewind=ah.prototype.Ai;ah.prototype.skip=ah.prototype.skip;ah.prototype.readBytes=ah.prototype.wa;ah.prototype.readUint64=ah.prototype.$e;ah.prototype.readInt32=ah.prototype.Jg;ah.prototype.readUint32=ah.prototype.R;ah.prototype.readUint16=ah.prototype.xa;ah.prototype.readUint8=ah.prototype.X;ah.prototype.getLength=ah.prototype.Na;ah.prototype.getPosition=ah.prototype.Ia;ah.prototype.hasMoreData=ah.prototype.Wa;var bh=1;ah.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:bh};function dh(){this.h=[];this.i=[];this.j=new Og;this.l=0;this.m=new Map([["CC1",new Ag(0,0)],["CC2",new Ag(0,1)],["CC3",new Ag(1,0)],["CC4",new Ag(1,1)]]);this.u=this.o=0;this.D=new Map;this.C=!0;this.B=new Set;eh(this)}r=dh.prototype;r.clear=function(){this.l=0;this.h=[];this.i=[];var a=this.j;a.j=[];a.i=null;a.h=0;eh(this);a=t(this.D.values());for(var b=a.next();!b.done;b=a.next())Yg(b.value)};
function eh(a){a.o=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.i=0,c.h=c.l,c.o=null,qg(c.j),qg(c.l),qg(c.u);a.C=!0}
r.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.m=b;this.C=!1}a=new ah(a,0);if(!(a.Na()<8)&&a.X()===181&&a.xa()===49&&a.R()===1195456820&&a.X()===3&&(c=a.X(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.X(),f=(e&4)>>2,g=a.X(),h=a.X();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,jb:g,Fb:h,order:this.h.length}):(this.i.push({pts:b,type:e,value:g,order:this.i.length}),this.i.push({pts:b,type:2,value:h,order:this.i.length})))}};
r.extractRaw608=function(a,b){for(var c=0;c+1<a.length;c+=2)this.h.push({pts:b,type:0,jb:a[c],Fb:a[c+1],order:this.h.length})};
r.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.i.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=fh(this,d.value))&&b.push(d);c=t(this.i);for(d=c.next();!d.done;d=c.next())Pg(this.j,d.value);c=t(this.j.j);for(d=c.next();!d.done;d=c.next())d=gh(this,d.value),b.push.apply(b,wa(d));this.j.j=[];this.h=[];this.i=[];return b};
function fh(a,b){var c=b.type;if((b.jb&112)===16){var d=b.jb>>3&1;c===0?a.o=d:a.u=d}var e="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(e);if(b.jb===255&&b.Fb===255||!b.jb&&!b.Fb||!hh(b.jb)||!hh(b.Fb))return++a.l>=45&&eh(a),null;a.l=0;b.jb&=127;b.Fb&=127;d=b.jb;if(d>=1&&d<=15||!b.jb&&!b.Fb)return null;d=null;if((b.jb&112)===16)a:{a.B.add(e),d=b.jb;a=b.Fb;e=b.pts;if(c.o===(d<<8|a))c.o=null;else if(c.o=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=Fg[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.i!==4&&(g=c.h,c.i===3&&b!==g.h&&(c=1+b-g.i,zg(g,c,1+g.h-g.i,g.i),tg(g,0,c-1),tg(g,b+1,15-b)),g.h=b,g.u=a,g.m=e,g.o=d,g.B=f,g.l=null,g.C="black")}else if((d&247)===17&&(a&240)===32)c.h.u=!1,c.h.m=!1,c.h.o="white",ug(c.h,0,32,e),b=!1,d=Fg[(a&14)>>1],d==="white_italics"&&(d="white",b=!0),c.h.u=(a&1)===1,c.h.m=b,c.h.o=d;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",
(d&7)===0&&(b=Eg[(a&14)>>1]),c.h.C=b;else if((d&247)===17&&(a&240)===48)ug(c.h,1,a,e);else if((d&246)===18&&(a&224)===32)ug(c.h,d&1?3:2,a,e);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.Fb){case 32:Cg(c);break;case 33:c=c.h;c.j[c.h].pop();break;case 37:d=Bg(c,2,a);break;case 38:d=Bg(c,3,a);break;case 39:d=Bg(c,4,a);break;case 40:ug(c.h,0,32,a);break;case 41:c.i=2;c.h=c.j;c.h.i=0;c.m=a;break;case 42:qg(c.u);Dg(c);break;case 43:Dg(c);break;case 44:b=c.j;d=null;c.i!==4&&(d=rg(b,c.m,a,
c.i===2||c.i===3));tg(b,0,15);break;case 45:b=c.h;c.i!==3?d=null:(d=rg(b,c.m,a,!0),e=b.h-b.i+1,zg(b,e-1,e,b.i),tg(b,0,e-1),tg(b,b.h,15-b.h),c.m=a);break;case 46:tg(c.l,0,15);break;case 47:b=null,c.i!==4&&(b=rg(c.j,c.m,a,c.i===2||c.i===3)),d=c.l,c.l=c.j,c.j=d,Cg(c),c.m=a,d=b}break a}(d==23||d==31)&&a>=33&&a<=35&&(c.h.l=a-32)}d=null}else a=b.Fb,e=b.pts,ug(c.h,0,b.jb,e),ug(c.h,0,a,e);return d}
function gh(a,b){var c=[];try{for(;b.Wa();){var d=Rg(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=Rg(b).value&63);if(e!=0){a.B.add("svc"+e);for(var g=a.D.getOrInsertComputed(e,function(l){return new Sg(l)}),h=b.Ia();b.Ia()-h<f;){var k=Tg(g,b);c.push.apply(c,wa(k))}}}}catch(l){if(l instanceof L&&l.code===3E3)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw l;}return c}function hh(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}r.getStreams=function(){return Array.from(this.B)};
K("shaka.cea.CeaDecoder",dh);Tc=function(){return new dh};function ih(a){var b=[];a=Vb(a);for(var c=0;c<a.length;){for(var d=0;a[c]==255;)d+=255,c++;d+=a[c++];for(var e=0;a[c]==255;)e+=255,c++;e+=a[c++];d==4&&b.push(a.subarray(c,c+e));c+=e}return b};function jh(){this.j=new Map;this.i=new Map;this.h=!1}r=jh.prototype;r.box=function(a,b){a=kh(a);this.j.set(a,lh);this.i.set(a,b);return this};r.ma=function(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())this.box(c.value,b);return this};r.P=function(a,b){a=kh(a);this.j.set(a,mh);this.i.set(a,b);return this};r.Kh=function(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())this.P(c.value,b);return this};r.stop=function(){this.h=!0};
r.parse=function(a,b,c){a=new ah(a,0);for(this.h=!1;a.Wa()&&!this.h;)this.fd(0,a,b,c)};
r.fd=function(a,b,c,d){var e=b.Ia();if(d&&e+8>b.Na())this.h=!0;else{var f=b.R(),g=b.R(),h=nh(g),k=!1;switch(f){case 0:f=b.Na()-e;break;case 1:if(d&&b.Ia()+8>b.Na()){this.h=!0;return}f=b.$e();k=!0}var l=this.i.get(g);if(l){var m=null,n=null;if(this.j.get(g)==mh){if(d&&b.Ia()+4>b.Na()){this.h=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.Na()&&(g=b.Na());d&&g>b.Na()?this.h=!0:(g-=b.Ia(),b=g>0?b.wa(g,!1):new Uint8Array(0),b=new ah(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.max(0,Math.min(e+f-b.Ia(),b.Na()-b.Ia())))}};function oh(a){for(var b=ph(a);a.reader.Wa()&&!a.parser.h;)a.parser.fd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function qh(a){for(var b=ph(a),c=a.reader.R(),d=0;d<c&&(a.parser.fd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.h);d++);}
function rh(a){var b=ph(a);for(a.reader.skip(78);a.reader.Wa()&&!a.parser.h;)a.parser.fd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function sh(a){var b=ph(a);a.reader.skip(8);var c=a.reader.xa();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Wa()&&!a.parser.h;)a.parser.fd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function th(a,b){return function(c){a(c.reader.wa(c.reader.Na()-c.reader.Ia(),b))}}
function kh(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function nh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function ph(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}K("shaka.util.Mp4Parser",jh);jh.headerSize=ph;jh.typeToString=nh;jh.allData=th;jh.audioSampleEntry=sh;jh.visualSampleEntry=rh;jh.sampleDescription=qh;jh.children=oh;jh.prototype.parseNext=jh.prototype.fd;jh.prototype.parse=jh.prototype.parse;
jh.prototype.stop=jh.prototype.stop;jh.prototype.fullBoxes=jh.prototype.Kh;jh.prototype.fullBox=jh.prototype.P;jh.prototype.boxes=jh.prototype.ma;jh.prototype.box=jh.prototype.box;var lh=0,mh=1,uh=["moov","trak","mdia","minf","stbl"],vh=["moof","traf"],wh=["av01","dav1"],xh=[].concat(wa(["avc1","avc3","dvav","dva1"]),wa(["hev1","hvc1","dvh1","dvhe"])),yh=[].concat(wa(xh),wa(["vvc1","vvi1","dvc1","dvi1"])),zh="ac-3 ec-3 ac-4 Opus fLaC apac iamf".split(" ");function Ah(a,b){for(var c=0,d=0;d<8&&!(b+d>=a.byteLength);d++){var e=a[b+d];c+=(e&127)*Math.pow(2,d*7);if(!(e&128))return{value:c,size:d+1}}return null}function Bh(a){for(var b=[],c=0;c<a.byteLength;){var d=c,e=a[c++];if(e&128)break;var f=(e&120)>>3,g=(e&2)!=0;if((e&4)!=0){if(c>=a.byteLength)break;c++}if(g){g=Ah(a,c);if(!g)break;e=g.value;c+=g.size}else e=a.byteLength-c;e=c+e;if(e>a.byteLength)break;b.push({type:f,data:a.subarray(c,e),fullData:a.subarray(d,e)});c=e}return b}
function Ch(a){for(var b=[],c=-1,d=0,e=0;e<a.byteLength;e++){var f=a[e];if(f){if(f==1&&d>=2){if(c>=0){c=Dh(a.subarray(c,e-2));if(!c)return null;b.push.apply(b,wa(c))}c=e+1}d=0}else d++}if(c<0)return null;a=Dh(a.subarray(c));if(!a)return null;b.push.apply(b,wa(a));return Ub(b)}
function Dh(a){for(var b=null,c=0,d=0,e=0;e<a.byteLength;e++){var f=a[e];d==2&&f==3?(b||(b=new Uint8Array(a.byteLength-1),b.set(a.subarray(0,e)),c=e),d=0):(d=f?0:d+1,b&&(b[c++]=f))}a=b?b.subarray(0,c):a;if(!a.byteLength)return[];b=a[0];if(b&128)return null;if(b&2)return[a];b=b&4?2:1;if(a.byteLength<b)return null;c=a.slice(0,b);c[0]|=2;d=a.byteLength-b;e=[];do f=d%128,d=Math.floor(d/128),e.push(d?f|128:f);while(d);d=new Uint8Array(e);return[c,d,a.subarray(b)]};function Eh(a,b){var c=null,d=null,e=null,f=null,g=a.R();b&1&&(e=a.$e());b&2&&(f=a.R());b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:g,Hb:c,cc:d,yh:e,Ug:f}}function Fh(a,b){return b==1?(b=a.R(),a=a.R(),{za:b*4294967296+a}):{za:a.R()}}function Gh(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.R();a.skip(4);a=a.xa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function Hh(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.Jg());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={tc:null,sampleSize:null,gf:null};c&256&&(h.tc=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.gf=b==0?a.R():a.Jg());e.push(h)}return{sampleCount:d,sc:e,ac:f}}
function Ih(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.R();b==1?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.xa()+a.xa()/16;a=a.xa()+a.xa()/16;return{trackId:c,width:b,height:a}}function Jh(a){a.skip(6);a.skip(2);a.skip(8);var b=a.xa();a.skip(2);a.skip(2);a.skip(2);a=a.xa()+a.xa()/65536;return{channelCount:b,sampleRate:a}}
function Kh(a,b){b.skip(1);var c=b.X();b=b.X();var d=c>>>5,e=(b&64)>>6;return{codec:a+"."+d+"."+Lh(c&31,2)+(b>>>7?"H":"M")+"."+Lh(d===2&&e?(b&32)>>5?12:10:e?10:8,2)+"."+((b&16)>>4)+"."+((b&8)>>3)+((b&4)>>2)+(b&3)+"."+Lh(1,2)+"."+Lh(1,2)+"."+Lh(1,2)+".0"}}function Mh(a){a=a.R();return{codec:nh(a)}}function Nh(a,b){a.X();var c=a.X(),d=b>=1?c>>4&15:0;b=b>=1?c&15:0;c=a.X();var e=a.X(),f=a.wa(16,!1);f=Rb(f);var g=null;c===1&&e===0&&(g=a.X(),g=a.wa(g,!0));return{defaultKID:f,Fm:c,rj:e,Be:d,Ce:b,bc:g}}
function Oh(a){var b=null,c=null,d=a.wa(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.xa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.xa();a.xa();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,videoRange:c}}
function Ph(a,b){a=a.toString(16).toUpperCase();return(b===void 0?0:b)?a:("0"+a).slice(-2)}function Lh(a,b){for(a=String(a);a.length<b;)a="0"+a;return a}
function Qh(a,b,c,d){var e=!!(b&2);b&1&&(a.skip(3),c=a.X(),a.skip(16),c===0&&(d=a.X(),d=a.wa(d,!0)));b=a.R();for(var f=[],g=0;g<b;g++){var h=d;if(c>0)h=a.wa(c,!0);else if(!h)throw Error("SENC specifies IV size 0 but no constant IV is available.");var k=new Uint8Array(16);k.set(h.subarray(0,Math.min(h.length,16)),0);h=null;if(e){var l=a.xa();h=[];for(var m=0;m<l;m++)h.push({zd:a.xa(),ec:a.R()})}f.push({iv:k,Pi:h})}return{Sa:f}};function Rh(){this.l=new Map;this.j=this.i=0;this.m=null;this.h=Sh}
Rh.prototype.init=function(a){function b(g){g=g.name;Th.has(g)&&(c.h=Th.get(g))}var c=this,d=[],e=[],f=null;(new jh).ma([].concat(wa(uh),["mvex"]),oh).P("trex",function(g){var h=g.reader;h.skip(4);h.skip(4);g=h.R();h=h.R();c.i=g;c.j=h}).P("tkhd",function(g){g=Ih(g.reader,g.version);f=g.trackId;d.push(g.trackId)}).P("mdhd",function(g){g=Gh(g.reader,g.version);e.push(g.timescale)}).P("stsd",qh).ma(yh,b).ma(wh,b).box("encv",rh).box("sinf",oh).box("frma",function(g){g=Mh(g.reader).codec;Th.has(g)&&(c.h=
Th.get(g))}).box("c608",function(){c.h=Uh;c.m=f}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new L(2,2,2010);this.h==Sh&&Wa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(g,h){c.l.set(g,e[h])})};
Rh.prototype.parse=function(a){var b=this;if(this.h==Sh)return[];var c=[],d=0,e=[];(new jh).box("moof",function(f){d=f.start;e=[];oh(f)}).box("traf",function(f){e.push({trackId:null,za:null,Hb:b.i,cc:b.j,Fg:[],timescale:9E4});oh(f)}).P("trun",function(f){var g=e[e.length-1];f=Hh(f.reader,f.version,f.flags);g.Fg.push(f)}).P("tfhd",function(f){var g=e[e.length-1];f=Eh(f.reader,f.flags);g.trackId=f.trackId;g.Hb=f.Hb||b.i;g.cc=f.cc||b.j;f=f.trackId;b.l.has(f)&&(g.timescale=b.l.get(f))}).P("tfdt",function(f){var g=
e[e.length-1];f=Fh(f.reader,f.version);g.za=f.za}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ia(),k=t(e),l=k.next();!l.done;l=k.next()){var m=l.value;if(b.h!=Uh||m.trackId===b.m)if(m.za===null)Wa("Unable to find base media decode time for CEA captions!");else if(f.reader.seek(h),b.h===Uh){l=f.reader;var n=m.timescale,p=m.Hb,u=m.cc,q=m.za,v=t(m.Fg);for(m=v.next();!m.done;m=v.next()){m=m.value;m.ac!=null&&l.seek(g+m.ac);m=t(m.sc);for(var w=m.next();!w.done;w=m.next()){w=w.value;var x=
q/n,y=l.wa(w.sampleSize||u,!1);c.push({packet:y,pts:x,format:Xc});q+=w.tc||p}}}else a:for(l=b,n=f.reader,p=m.timescale,u=m.Hb,q=m.cc,v=m.za,m=t(m.Fg),w=m.next();!w.done;w=m.next())for(w=w.value,w.ac!=null&&n.seek(g+w.ac),w=t(w.sc),x=w.next();!x.done;x=w.next()){x=x.value;y=(v+(x.gf||0))/p;var z=x.sampleSize||q;if(l.h==Vh)try{for(var C=n.wa(z,!1),B=t(Bh(C)),A=B.next();!A.done;A=B.next()){var D=A.value;if(D.type==5){var F=Ah(D.data,0);F&&F.value==4&&c.push({packet:D.data.subarray(F.size),pts:y,format:Wc})}}}catch(N){break a}else for(;z>
0&&n.Wa();){var E=n.R(),G=n.X(),J=1;switch(l.h){case Wh:G&=31;G=kg(lg,G);break;case Xh:case Yh:J=2;n.skip(1);G=G>>1&63;G=kg(l.h===Xh?mg:ng,G);break;default:break a}if(G)for(J=n.wa(E-J,!1),J=t(ih(J)),G=J.next();!G.done;G=J.next())c.push({packet:G.value,pts:y,format:Wc});else try{n.skip(E-J)}catch(N){break a}z-=E+4}v+=x.tc||u}}}).parse(a,!1,!0);return c};K("shaka.cea.Mp4CeaParser",Rh);
var Sh=0,Wh=1,Xh=2,Yh=3,Uh=4,Vh=5,Th=(new Map).set("avc1",Wh).set("avc3",Wh).set("dvav",Wh).set("dva1",Wh).set("hev1",Xh).set("hvc1",Xh).set("dvh1",Xh).set("dvhe",Xh).set("vvc1",Yh).set("vvi1",Yh).set("dvc1",Yh).set("dvi1",Yh).set("av01",Vh).set("dav1",Vh);Zc("video/mp4",function(){return new Rh});function Zh(){}function $h(a,b){var c=ai.get(b)||[];b=[];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,b.push.apply(b,wa(d().parse(a)));a=new Set;c=[];b=t(b);for(d=b.next();!d.done;d=b.next())d=d.value,a.has(d.key)||(a.add(d.key),c.push(d));return c}function bi(a){a=ai.get(a);return a!=null&&a.length>0}function ci(a,b){ai.has(a)||ai.set(a,[]);ai.get(a).push(b)}K("shaka.metadata.Metadata",Zh);Zh.unregisterParserByMime=function(a){ai.delete(a)};Zh.registerParserByMime=ci;Zh.supports=bi;
Zh.getMetadataFrames=$h;var ai=new Map;function di(){}function ei(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 fi(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 gi(a,b){var c=a[b]<<24;c|=a[b+1]<<16;c|=a[b+2]<<8;c|=a[b+3];return c>>>0}
function hi(a,b){switch(b){case 0:return Array.from(a).map(function(c){return String.fromCharCode(c)}).join("");case 1:return Ib(a);case 2:return Gb(a,!1);case 3:return Fb(a);default:return""}}function ii(a){return a===1||a===2?2:1}function ji(a,b,c){c=c===void 0?0:c;if(b===1||b===2){for(b=c;b+1<a.length;b+=2)if(a[b]===0&&a[b+1]===0)return b;return-1}return a.indexOf(0,c)}function ki(a,b){var c=a[b+5];return 10+fi(a,b+6)+(a[b+3]>=4&&c&16?10:0)}
function li(a){for(var b=new Uint8Array(a.length),c=0,d=0;d<a.length;d++)b[c++]=a[d],a[d]===255&&a[d+1]===0&&d++;return b.subarray(0,c)}
function mi(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2)return null;var c=a.data[0],d=a.data.subarray(1).indexOf(0);if(d===-1)return null;var e=Fb(yb(a.data,1,d)),f=a.data[2+d],g=3+d;d=ji(a.data,c,g);if(d===-1)return null;g=hi(a.data.subarray(g,d),c);c=d+ii(c);var h;e==="--\x3e"?h=Fb(a.data.subarray(c)):h=xb(a.data.subarray(c));b.mimeType=e;b.pictureType=f;b.description=g;b.data=h;return b}if(a.type==="COMM"){if(a.size<5)return null;
h=a.data[0];e=Fb(a.data.subarray(1,4)).replace(/\0/g,"");c=ji(a.data,h,4);if(c===-1)return null;f=hi(a.data.subarray(4,c),h);a=hi(a.data.subarray(c+ii(h)),h).replace(/\0*$/,"");b.description=f||e;b.data=a;return b}if(a.type==="TXXX"){if(a.size<2)return null;f=a.data[0];h=ji(a.data,f,1);if(h===-1)return null;e=hi(a.data.subarray(1,h),f);a=hi(a.data.subarray(h+ii(f)),f).replace(/^\ufeff/,"").replace(/\0*$/,"");b.description=e;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2)return null;f=a.data[0];
h=ji(a.data,f,1);if(h===-1)return null;e=hi(a.data.subarray(1,h),f);a=Fb(a.data.subarray(h+ii(f))).replace(/\0*$/,"");b.description=e;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;f=a.data.indexOf(0);if(f===-1)return null;e=Fb(yb(a.data,0,f));b.description=e;a=a.data.subarray(f+1);e=="com.apple.streaming.transportStreamTimestamp"&&a.length>=8?b.data=((a[3]&1)*4294967296+a[4]*16777216+(a[5]<<16)+(a[6]<<8)+a[7])/90:b.data=xb(a);return b}if(a.type==="UFID"){e=a.data.indexOf(0);if(e===
-1)return null;f=Fb(yb(a.data,0,e));b.description=f;b.data=xb(a.data.subarray(e+1));return b}if(a.type[0]==="T"){if(a.size<2)return null;a=hi(a.data.subarray(1),a.data[0]).replace(/\0+$/,"").split("\x00").map(function(k){return k.replace(/^\ufeff/,"")}).filter(function(k){return k.length>0}).join(" / ");b.data=a;return b}return a.type[0]==="W"?(a=Fb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=xb(a.data),b):null}
function ni(a){for(var b=0,c=[];ei(a,b);){var d=a[b+3],e=a[b+5],f=a.subarray(b+10,b+10+fi(a,b+6));b+=ki(a,b);if(!(d<3)){var g=(e&128)!=0;d<4&&g&&(f=li(f));var h=0;for(e&64&&(h=d>=4?fi(f,0):gi(f,0)+4);h+10<f.length&&f[h]!==0;){var k=f.subarray(h);e=String.fromCharCode(k[0],k[1],k[2],k[3]);var l=d>=4?fi(k,4):gi(k,4),m=k[9];k=k.subarray(10,10+l);l=10+l;var n=0,p=!1;if(d>=4){m&64&&(n+=1);m&4&&(n+=1);m&1&&(n+=4);var u=(m&12)!=0;p=d>=4&&g||(m&2)!=0}else m&128&&(n+=4),m&64&&(n+=1),m&32&&(n+=1),u=(m&192)!=
0;u?e={frame:null,length:l}:(k=k.subarray(n),p&&(k=li(k)),e={frame:{type:e,size:k.length,data:k},length:l});m=e;e=m.frame;m=m.length;(e=e?mi(e):null)&&c.push(e);h+=m}}}return c}function oi(a,b){for(var c=b=b===void 0?0:b;ei(a,b);)b+=ki(a,b);return a.subarray(c,Math.min(b,a.length))}di.prototype.parse=function(a){return ni(a)};K("shaka.metadata.Id3Utils",di);di.prototype.parse=di.prototype.parse;di.getID3Data=oi;di.getID3Frames=ni;for(var pi=t(we),qi=pi.next();!qi.done;qi=pi.next())ci(qi.value,function(){return new di});/*

 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 ri(a,b){this.l=a;if(b===void 0?0:b)this.l=Vb(a);this.j=this.l.byteLength;this.h=this.i=0}function si(a){var b=a.l.byteLength-a.j,c=Math.min(4,a.j);if(c!==0){for(var d=0,e=0;e<c;e++)d=d<<8|a.l[b+e];a.i=d<<(4-c)*8;a.h=c*8;a.j-=c}}function ti(a,b){if(a.h<=b){b-=a.h;var c=Math.floor(b/8);b-=c*8;a.h-=c;si(a)}a.i<<=b;a.h-=b}function ui(a,b){var c=Math.min(a.h,b),d=a.i>>>32-c;a.h-=c;a.h>0?a.i<<=c:a.j>0&&si(a);c=b-c;return c>0?d<<c|ui(a,c):d}
function vi(a){for(var b=0;a.h===0;){if(a.j===0)return b;si(a)}for(;;){var c=Math.clz32(a.i);c>a.h&&(c=a.h);b+=c;a.i<<=c;a.h-=c;if(a.h>0||a.j===0)break;si(a)}return b}function wi(a){ti(a,1+vi(a))}function W(a){var b=vi(a);return ui(a,b+1)-1}function xi(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function yi(a){return ui(a,1)===1}function zi(a){return ui(a,8)}function Ai(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=xi(a),d=(c+d+256)%256),c=d===0?c:d}function Bi(a){W(a);return W(a)}
K("shaka.util.ExpGolomb",ri);function Ci(){this.N=null;this.O=!1;this.j=this.H=null;this.u=[];this.m=[];this.h=[];this.I=this.F=null;this.o=[];this.l=[];this.i=[];this.G=null;this.C=[];this.B=[];this.L=this.K=this.M=this.D=null}r=Ci.prototype;r.clearData=function(){this.u=[];this.m=[];this.h=[];this.o=[];this.l=[];this.i=[];this.C=[];this.B=[]};r.hf=function(a){this.L!=null&&this.L!=a&&(this.D=null);this.L=a};
r.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Di(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.N=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.N:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Zc:-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,p=m;p>2;){var u=f[n+1]+2;switch(f[n]){case 5:var q=n+2;q=f[q]<<24|f[q+1]<<16|f[q+2]<<8|f[q+3];g.audio==-1&&q===1332770163?(g.audio=l,g.audioCodec="opus"):g.video==-1&&q===1096167473&&(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 128:g.videoCodec==
"av1"&&u>=5&&(this.K=f.subarray(n+2,n+5));break;case 127:g.audioCodec=="opus"&&(q=null,f[n+2]===128&&(q=f[n+3]),q!=null&&(this.M={channelCount:(q&15)===0?2:q&15,ij:q,sampleRate:48E3}))}n+=u;p-=u}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.Zc==-1&&(g.Zc=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.H=f.video,this.j=f.videoCodec);f.audio!=-1&&(this.F=f.audio,this.I=f.audioCodec);f.Zc!=-1&&(this.G=f.Zc);h=[f.video,f.audio,f.Zc];f.video==-1&&h.includes(this.H)&&(this.j=this.H=null);f.audio==-1&&h.includes(this.F)&&(this.I=this.F=null);f.Zc==-1&&h.includes(this.G)&&(this.G=null);d&&!this.O&&(d=!1,e=b-188);this.O=!0;break;
case this.H:h=a.subarray(h,e+188);f?(this.m.push(this.u.length),this.u.push(h)):this.m.length&&this.u.push(h);break;case this.F:h=a.subarray(h,e+188);f?(this.l.push(this.o.length),this.o.push(h)):this.l.length&&this.o.push(h);break;case this.G:h=a.subarray(h,e+188);f?(this.B.push(this.C.length),this.C.push(h)):this.B.length&&this.C.push(h);break;default:d=!0}}return this};function Ei(a,b,c){return Ub(a,b[c],c+1<b.length?b[c+1]:a.length)}
function Fi(a,b,c){if(b.byteLength<9||(b[0]<<16|b[1]<<8|b[2])!==1)return null;var d=b[4]<<8|b[5];if(d&&d>c-6)return null;var e=null,f=null,g=b[7];if(b.byteLength<Gi(b))return null;if(g&192){e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;var h=null;g&64&&(h=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,e=Hi(e,h));a.D==null&&(a.D=e);e=Hi(e,a.D);f=a.D=e;h!=null&&(f=Hi(h,e))}a=b[8]+9;return c<=a?null:{packetLength:d,
Pk:a,pts:e,dts:f}}function Ii(a,b){return(a=Fi(a,b,b.byteLength))?{data:b.subarray(a.Pk),packetLength:a.packetLength,pts:a.pts,dts:a.dts,nalus:[]}:null}
r.ri=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.j=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0,n=this.j==="hvc";f==-1&&(l=0,m=n?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var p=a[h++];if(f)if(f===1)f=p?0:2;else if(p)if(p==1){p=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,p),fullData:a.subarray(l,p),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Ve)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)),p>0&&(p=a.subarray(0,p),f.data=Sb(f.data,p),f.fullData=Sb(f.fullData,p),f.state=0);h<d?(m=n?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=p?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.Ve&&(c=k.length?k[k.length-1]:b.Ve)&&(c.data=Sb(c.data,a),c.fullData=Sb(c.fullData,a));b.state=f;return k};
r.getMetadata=function(){for(var a=[],b=0;b<this.B.length;b++){var c=Ei(this.C,this.B,b);(c=Ii(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:ni(c.data),dts:c.dts,pts:c.pts})}return a};
r.kb=function(){if(this.l.length&&!this.i.length)for(var a=0;a<this.l.length;a++){var b=Ei(this.o,this.l,a),c=Ii(this,b),d=this.i.length?this.i[this.i.length-1]:null;c&&c.pts!=null&&c.dts!=null&&(!d||d.pts!=c.pts&&d.dts!=c.dts)?this.i.push(c):this.i.length&&(b=c?c.data:b)&&(d=this.i[this.i.length-1],d.data=Sb(d.data,b))}return this.i};
r.zc=function(a){a=a===void 0?!0:a;if(this.m.length&&!this.h.length){for(var b=0;b<this.m.length;b++){var c=Ei(this.u,this.m,b),d=Ii(this,c),e=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!e||e.pts!=d.pts&&e.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(e=this.h[this.h.length-1],e.data=Sb(e.data,c))}if(a&&this.j!="av1"){b={Ve:null,state:null};e=[];c=t(this.h);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.ri(d,b),d.nalus.length&&(e.push(d),b.Ve=d.nalus[d.nalus.length-
1]);this.h=e}}return a?this.h:(a=this.h,this.h=[],a)};function Ji(a,b){if(b=="audio"){b=a.o;var c=a.l}else if(b=="video")b=a.u,c=a.m;else return null;for(var d=0;d<c.length;d++){var e=c[d],f=d+1<c.length?c[d+1]:b.length,g=b[e];if(g){for(var h=0,k=e;k<f;k++)h+=b[k].byteLength;e=g.byteLength>=9&&g.byteLength>=Gi(g)?g:Ub(b,e,f);if(h=Fi(a,e,h))if(h=Ki(h),h!=null)return h}}return null}function Gi(a){a=a[7];return a&64?19:a&192?14:9}
function Ki(a){return a.pts==null||a.dts==null?null:Math.min(a.dts,a.pts)/9E4}r.getStartTime=function(a){if(a=="audio")a=this.kb();else if(a=="video")a=this.zc(!1);else return null;return a.length?Ki(a[0]):null};r.Ed=function(){return{audio:this.I,video:this.j}};r.Ne=function(){for(var a=[],b=t(this.zc()),c=b.next();!c.done;c=b.next())a.push.apply(a,wa(c.value.nalus));return a};
r.Rh=function(){if(this.j=="hvc")var a=Li(this);else if(this.j=="av1"){if(a={height:null,width:null,codec:null,frameRate:Mi(this)},this.K){var b=new Uint8Array(4);b.set(this.K);b=new ah(b,0);a.codec=Kh("av01",b).codec}}else a=Ni(this);return a};function Mi(a){var b=a.zc();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?Math.abs(1/(b-a)*9E4):null}
function Ni(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Ne();if(!c.length)return b;c=c.find(function(u){return u.type==7});if(!c)return b;c=new ri(c.data);var d=zi(c),e=zi(c),f=zi(c);wi(c);if(Oi.includes(d)){var g=W(c);g===3&&ti(c,1);wi(c);wi(c);ti(c,1);if(yi(c)){g=g!==3?8:12;for(var h=0;h<g;h++)yi(c)&&(h<6?Ai(c,16):Ai(c,64))}}wi(c);g=W(c);if(g===0)W(c);else if(g===1)for(ti(c,1),wi(c),wi(c),g=W(c),h=0;h<g;h++)wi(c);wi(c);ti(c,1);g=W(c);h=W(c);var k=ui(c,1);k===0&&ti(c,1);ti(c,
1);var l=0,m=0,n=0,p=0;yi(c)&&(l=W(c),m=W(c),n=W(c),p=W(c));b.height=String((2-k)*(h+1)*16-n*2-p*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=Mi(a);return b}
function Li(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Ne();if(!c.length)return b;c=c.find(function(B){return B.type==33});if(!c)return b;var d=new ri(c.fullData,!0);zi(d);zi(d);ui(d,4);var e=ui(d,3);yi(d);var f=ui(d,2);c=ui(d,1);for(var g=ui(d,5),h=ui(d,32),k=zi(d),l=zi(d),m=zi(d),n=zi(d),p=zi(d),u=zi(d),q=zi(d),v=[],w=[],x=0;x<e;x++)v.push(yi(d)),w.push(yi(d));if(e>0)for(x=e;x<8;x++)ui(d,2);for(x=0;x<e;x++)v[x]&&ui(d,88),w[x]&&zi(d);W(d);e=W(d);e==3&&ui(d,1);v=W(d);w=W(d);var y=
x=0,z=0,C=0;yi(d)&&(x+=W(d),y+=W(d),z+=W(d),C+=W(d));b.width=String(v-(x+y)*(e===1||e===2?2:1));b.height=String(w-(z+C)*(e===1?2:1));d=function(B){for(var A=0,D=0;D<32;D++)A|=(B>>D&1)<<31-D;return A>>>0}(h);f="hvc1"+("."+["","A","B","C"][f]+g);f+="."+d.toString(16).toUpperCase();f+="."+(c==1?"H":"L")+q;u&&(f+="."+u.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
k&&(f+="."+k.toString(16).toUpperCase());b.codec=f;b.frameRate=Mi(a);return b}function Hi(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function Pi(a){return Di(a)<0?!1:!0}function Di(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;var d=a.indexOf(71,c+1);c=d>=0&&d<b?d:c+1}return-1}K("shaka.util.TsParser",Ci);Ci.syncOffset=Di;Ci.probe=Pi;Ci.prototype.getVideoInfo=Ci.prototype.Rh;Ci.prototype.getVideoNalus=Ci.prototype.Ne;
Ci.prototype.getCodecs=Ci.prototype.Ed;Ci.prototype.getStartTime=Ci.prototype.getStartTime;Ci.prototype.getVideoData=Ci.prototype.zc;Ci.prototype.getAudioData=Ci.prototype.kb;Ci.prototype.getMetadata=Ci.prototype.getMetadata;Ci.prototype.parseNalus=Ci.prototype.ri;Ci.prototype.parse=Ci.prototype.parse;Ci.prototype.setDiscontinuitySequence=Ci.prototype.hf;Ci.prototype.clearData=Ci.prototype.clearData;Ci.Timescale=9E4;var Oi=[100,110,122,244,44,83,86,118,128,138,139,134];function Qi(){this.h=null}Qi.prototype.init=function(){};Qi.prototype.parse=function(a){this.h?this.h.clearData():this.h=new Ci;var b=[];a=yb(a);if(!Pi(a))return b;var c=this.h.parse(a);a=null;switch(c.Ed().video){case "avc":a=lg;break;case "hvc":a=mg}if(a==null)return b;c=c.Ne();c=t(c);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.time!=null&&kg(a,d.type))for(var e=t(ih(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time,format:Wc});return b};
K("shaka.cea.TsCeaParser",Qi);Zc("video/mp2t",function(){return new Qi});function Ri(a,b,c){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return!1;var d=a[b+4]>>6;if(d>=3)return!1;var e=a[b+4]&63,f=[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][e*3+d]*2;if(b+f>a.length)return!1;var g=a[b+6]>>5,h=0;g===2?h+=2:(g&1&&g!==1&&(h+=2),g&4&&(h+=2));h=(a[b+6]<<8|a[b+7])>>12-h&1;var k=a[b+5]&7;a=new Uint8Array([d<<6|a[b+5]>>3<<1|k>>2,(k&3)<<6|g<<3|h<<2|e>>4,e<<4&224]);c.sampleRate=[48E3,44100,32E3][d];c.channelCount=[2,1,2,3,3,4,4,5][g]+h;c.Pb=a;c.ha=f;return!0}
function Si(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 Ti(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)?{Jd:c,ha:a}:null}function Ui(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 Vi(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 Wi(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 Xi(a){if(!a.length)return null;a=a.find(function(c){return c.type==1});if(!a)return null;var b=Yi(a.data);return b?{width:b.width,height:b.height,Lg:b.Lg,ae:Zi(b,a.fullData)}:null}function Zi(a,b){var c=new Uint8Array(4+b.byteLength);c[0]=129;c[1]=(a.il&7)<<5|a.hl&31;c[2]=a.jl<<7|a.pk<<6|a.zl<<5|a.Ek<<4|a.wl<<3|a.xl<<2|a.jj&3;c[3]=0;c.set(b,4);return c}
function Yi(a){if(!a.byteLength)return null;a={Aj:new ri(a),pe:a.byteLength*8,Dg:!1};var b=$i(a,3);$i(a,1);var c=$i(a,1)==1,d=0,e=0;if(c)d=$i(a,5);else{var f=!1,g=0;if($i(a,1)==1){$i(a,64);if($i(a,1)==1)a:{for(f=0;f<32&&$i(a,1)==0;){if(a.Dg)break a;f++}f<32&&$i(a,f)}if(f=$i(a,1)==1)g=$i(a,5)+1,$i(a,32),$i(a,10)}for(var h=$i(a,1)==1,k=$i(a,5)+1,l=0;l<k;l++){$i(a,12);var m=$i(a,5),n=m>7?$i(a,1):0;l==0&&(d=m,e=n);f&&$i(a,1)==1&&$i(a,2*g+1);h&&$i(a,1)==1&&$i(a,4)}}g=$i(a,4)+1;f=$i(a,4)+1;g=$i(a,g)+1;
f=$i(a,f)+1;c||$i(a,1)==1&&$i(a,7);$i(a,3);c||($i(a,4),(h=$i(a,1)==1)&&$i(a,2),k=2,$i(a,1)==0&&(k=$i(a,1)),k>0&&$i(a,1)==0&&$i(a,1),h&&$i(a,3));$i(a,3);h=$i(a,1);k=0;l=h?10:8;b==2&&h&&(l=(k=$i(a,1))?12:10);m=b==1?0:$i(a,1);var p=n=2,u=2;$i(a,1)==1&&(n=$i(a,8),p=$i(a,8),u=$i(a,8));var q=1,v=1,w=0;m?$i(a,1):n==1&&p==13&&u==0?v=q=0:($i(a,1),b==0?v=q=1:b==1?v=q=0:l==12?v=(q=$i(a,1))?$i(a,1):0:(q=1,v=0),q&&v&&(w=$i(a,2)));return a.Dg||g<=1||f<=1?null:{il:b,hl:d,jl:e,pk:h,zl:k,Ek:m,wl:q,xl:v,jj:w,width:g,
height:f,Lg:c}}function $i(a,b){if(b>a.pe)return a.Dg=!0,a.pe=0;a.pe-=b;for(var c=0;b>0;){var d=Math.min(b,16);c=c*Math.pow(2,d)+ui(a.Aj,d);b-=d}return c};function nj(a,b,c){if(b+8>a.length||!oj(a,b))return!1;var d=new ri(a.subarray(b+2));ti(d,2);ti(d,3);var e=ui(d,11)+1<<1,f=ui(d,2);if(f==3){f=ui(d,2);f=[24E3,22060,16E3][f];var g=3}else f=[48E3,44100,32E3][f],g=ui(d,2);var h=ui(d,3),k=ui(d,1);d=ui(d,5);if(b+e>a.byteLength)return!1;a=Math.floor(e*f/([1,2,3,6][g]*16));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,f<<6|d<<1|0,0|h<<1|k<<0,0]);c.sampleRate=f;c.channelCount=[2,1,2,3,3,4,4,5][h]+k;c.Pb=a;c.ha=e;return!0}
function oj(a,b){return(a[b]<<8|a[b+1]<<0)===2935?!0:!1};function pj(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 ri(b.data),d=zi(c);zi(c);zi(c);wi(c);if(qj.includes(d)&&(d=W(c),d===3&&ti(c,1),wi(c),wi(c),ti(c,1),yi(c))){d=d!==3?8:12;for(var e=0;e<d;e++)yi(c)&&(e<6?Ai(c,16):Ai(c,64))}wi(c);d=W(c);if(d===0)W(c);else if(d===1)for(ti(c,1),wi(c),wi(c),d=W(c),e=0;e<d;e++)wi(c);wi(c);ti(c,1);var f=W(c),g=W(c),h=ui(c,1);h===0&&ti(c,1);ti(c,1);var k=0,l=0,m=0,n=0;
yi(c)&&(k=W(c),l=W(c),m=W(c),n=W(c));e=d=1;if(yi(c)&&yi(c)){var p=zi(c),u=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],q=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];p>0&&p<=16?(d=u[p-1],e=q[p-1]):p===255&&(d=ui(c,16),e=ui(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;b=b.fullData;k=b.byteLength;a=a.fullData;l=a.byteLength;g=0;h=new Uint8Array(11+k+l);h[g++]=1;h[g++]=b[1];h[g++]=b[2];h[g++]=b[3];h[g++]=255;h[g++]=225;h[g++]=k>>>8&255;h[g++]=k&255;h.set(b,g);g+=k;h[g++]=1;h[g++]=l>>>8&255;
h[g++]=l&255;h.set(a,g);return{height:c,width:f,ae:h,Ac:d,Mc:e}}
function rj(a){function b(v){e={data:g,frame:!1,isKeyframe:!1,pts:v.pts,dts:v.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var v=e.nalus.length*4,w=t(e.nalus),x=w.next();!x.done;x=w.next())v+=x.value.fullData.byteLength;v=new Uint8Array(v);w=0;x=t(e.nalus);for(var y=x.next();!y.done;y=x.next()){y=y.value;var z=y.fullData.byteLength;v[w]=z>>24&255;v[w+1]=z>>16&255;v[w+2]=z>>8&255;v[w+3]=z&255;v.set(y.fullData,w+4);w+=4+z}e.data=v;d.push(e)}}for(var d=[],e=null,f=!1,g=new Uint8Array(0),
h=0;h<a.length;h++){var k=a[h],l=k.nalus,m=!1;e&&l.length&&!f&&(c(),b(k));l=t(k.nalus);for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=!1;switch(n.type){case 1:var u=!1;p=!0;var q=n.data;m&&q.length>4&&(q=Bi(new ri(q)),q===2||q===4||q===7||q===9)&&(u=!0);u&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(k);e.frame=!0;e.isKeyframe=u;break;case 5:p=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(k);e.frame=!0;e.isKeyframe=!0;break;case 6:p=!0;break;case 7:m=p=!0;break;case 8:p=!0;break;case 9:f=
p=!0;e&&e.frame&&(c(),e=null);e||b(k);break;case 12:p=!0;break;default:p=!1}e&&p&&e.nalus.push(n)}}c();return d}var qj=[100,110,122,244,44,83,86,118,128,138,139,134];function sj(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=tj(b.fullData);a=uj(c.fullData);var f=vj(d.fullData);b=wj(b.fullData,c.fullData,d.fullData,{Bg:e.Bg,dh:e.dh,ag:a.ag,cg:a.cg,Vf:a.Vf,$f:a.$f,Wf:a.Wf,Xf:a.Xf,Yf:a.Yf,Zf:a.Zf,Pf:a.Pf,Qf:a.Qf,Rf:a.Rf,Sf:a.Sf,Tf:a.Tf,Uf:a.Uf,Ue:a.Ue,Ff:a.Ff,Bf:a.Bf,Af:a.Af,Eg:f.Eg,Of:a.Of,Nf:a.Nf});return{height:a.height,width:a.width,
ae:b,Ac:a.$k,Mc:a.Zk}}function tj(a){var b=new ri(a,!0);zi(b);zi(b);ui(b,4);ui(b,2);ui(b,6);a=ui(b,3);b=yi(b);return{Bg:a+1,dh:b}}
function uj(a){a=new ri(a,!0);zi(a);zi(a);var b=0,c=0,d=0,e=0;ui(a,4);var f=ui(a,3);yi(a);for(var g=ui(a,2),h=ui(a,1),k=ui(a,5),l=zi(a),m=zi(a),n=zi(a),p=zi(a),u=zi(a),q=zi(a),v=zi(a),w=zi(a),x=zi(a),y=zi(a),z=zi(a),C=[],B=[],A=0;A<f;A++)C.push(yi(a)),B.push(yi(a));if(f>0)for(A=f;A<8;A++)ui(a,2);for(A=0;A<f;A++)C[A]&&ui(a,88),B[A]&&zi(a);W(a);C=W(a);C==3&&ui(a,1);B=W(a);A=W(a);yi(a)&&(b+=W(a),c+=W(a),d+=W(a),e+=W(a));var D=W(a),F=W(a),E=W(a);if(yi(a))for(var G=0;G<=f;G++)W(a),W(a),W(a);else W(a),
W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(yi(a)&&yi(a))for(G=0;G<4;G++)for(var J=0;J<(G===3?2:6);J++)if(yi(a)){var N=Math.min(64,1<<4+(G<<1));G>1&&xi(a);for(var P=0;P<N;P++)xi(a)}else W(a);yi(a);yi(a);yi(a)&&(zi(a),W(a),W(a),yi(a));G=W(a);for(N=J=0;N<G;N++)if(P=!1,N!==0&&(P=yi(a)),P){N===G&&W(a);yi(a);W(a);for(var U=P=0;U<=J;U++){var Q=yi(a),M=!1;Q||(M=yi(a));(Q||M)&&P++}J=P}else{U=W(a);P=W(a);J=U+P;for(Q=0;Q<U;Q++)W(a),yi(a);for(U=0;U<P;U++)W(a),yi(a)}if(yi(a))for(G=W(a),J=0;J<G;J++){for(N=0;N<
E+4;N++)ui(a,1);ui(a,1)}G=E=1;J=!0;N=1;U=P=0;yi(a);yi(a);if(yi(a)){if(yi(a)){Q=zi(a);M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Q>0&&Q<=16?(E=M[Q-1],G=O[Q-1]):Q===255&&(E=ui(a,16),G=ui(a,16))}yi(a)&&yi(a);yi(a)&&(ui(a,3),yi(a),yi(a)&&(zi(a),zi(a),zi(a)));yi(a)&&(W(a),W(a));yi(a);yi(a);yi(a);if(Q=yi(a))wi(a),wi(a),wi(a),wi(a);if(yi(a)&&(N=ui(a,32),P=ui(a,32),yi(a)&&W(a),yi(a))){O=!1;Q=yi(a);M=yi(a);if(Q||M){if(O=yi(a))zi(a),ui(a,5),yi(a),ui(a,
5);ui(a,4);ui(a,4);O&&ui(a,4);ui(a,5);ui(a,5);ui(a,5)}for(var V=0;V<=f;V++){J=yi(a);var ea=!0,ha=1;J||(ea=yi(a));var I=!1;ea?W(a):I=yi(a);I||(ha=W(a)+1);if(Q){for(ea=0;ea<ha;ea++)W(a),W(a),O&&(W(a),W(a));yi(a)}if(M){for(ea=0;ea<ha;ea++)W(a),W(a),O&&(W(a),W(a));yi(a)}}}yi(a)&&(yi(a),yi(a),yi(a),U=W(a),W(a),W(a),W(a),W(a))}return{Vf:z,ag:g,cg:h,$f:k,Wf:l,Xf:m,Yf:n,Zf:p,Pf:u,Qf:q,Rf:v,Sf:w,Tf:x,Uf:y,Ue:U,Ff:C,Bf:D,Af:F,width:B-(b+c)*(C===1||C===2?2:1),height:A-(d+e)*(C===1?2:1),$k:E,Zk:G,Of:P/N,Nf:J}}
function vj(a){var b=new ri(a,!0);zi(b);zi(b);W(b);W(b);yi(b);yi(b);ui(b,3);yi(b);yi(b);W(b);W(b);xi(b);yi(b);yi(b);yi(b)&&W(b);xi(b);xi(b);yi(b);yi(b);yi(b);yi(b);a=yi(b);b=yi(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Eg:c}}
function wj(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ag&3)<<6|(d.cg?1:0)<<5|d.$f&31;e[2]=d.Wf;e[3]=d.Xf;e[4]=d.Yf;e[5]=d.Zf;e[6]=d.Pf;e[7]=d.Qf;e[8]=d.Rf;e[9]=d.Sf;e[10]=d.Tf;e[11]=d.Uf;e[12]=d.Vf;e[13]=240|(d.Ue&3840)>>8;e[14]=d.Ue&255;e[15]=252|d.Eg&3;e[16]=252|d.Ff&3;e[17]=248|d.Bf&7;e[18]=248|d.Af&7;e[19]=0;e[20]=parseInt(d.Of,10);e[21]=((d.Nf?1:0)&3)<<6|(d.Bg&7)<<3|(d.dh?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,a[d].byteLength>>8,a[d].byteLength&255]),b),b+=5,e.set(a[d],b),b+=a[d].byteLength;return e};function xj(a,b){if(!(b+1<a.length&&yj(a,b)))return null;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=zj[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=Aj[(c===3?0:c===2?1:2)*3+f];var h=Bj[c][d],k=Cj[d];c=h*8*k;h=Math.floor(h*e/f+(a[b+2]>>1&1))*k;if(!h||!c||!f)return null;(k=(k=(navigator.userAgent||"").match(/Chrome\/(\d+)/i))?parseInt(k[1],10):0)&&k<=87&&d===2&&e>=224E3&&g===0&&(a[b+3]|=128);return{sampleRate:f,channelCount:g===3?1:2,ha:h,Yk:c}}return null}
function yj(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function Dj(a,b){if(b+1<a.length&&yj(a,b)){var c=xj(a,b),d=4;c&&c.ha&&(d=c.ha);b+=d;return b===a.length||b+1<a.length&&yj(a,b)}return!1}
var zj=[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],Aj=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Bj=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Cj=[0,1,1,4];function Ej(a){if(a.length<1)return 960;var b=a[0],c=b&3;b=Fj[b>>3&31];if(c===0)a=1;else if(c===1||c===2)a=2;else{if(a.length<2)return b;a=a[1]&63;if(a===0)return b}return b*a}var Fj=[480,960,1920,2880,480,960,1920,2880,480,960,1920,2880,480,960,480,960,120,240,480,960,120,240,480,960,120,240,480,960,120,240,480,960];new Uint8Array([79,112,117,115,72,101,97,100]);K("shaka.config.CharacterEdgeStyle",{DEFAULT:0,NONE:1,DROP_SHADOW:2,RAISED:3,DEPRESSED:4,OUTLINE:5});K("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});K("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});K("shaka.config.FontFamily",{DEFAULT:"",MONOSPACED_SERIF:'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace',PROPORTIONAL_SERIF:'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif',MONOSPACED_SANS_SERIF:'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace',PROPORTIONAL_SANS_SERIF:'Roboto, Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif'});K("shaka.config.MsfVersion",{AUTO:"auto",DRAFT_18:"draft-18",DRAFT_20:"draft-20",DRAFT_21:"draft-21",DRAFT_22:"draft-22"});K("shaka.config.PositionArea",{DEFAULT:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,CENTER_LEFT:4,CENTER:5,CENTER_RIGHT:6,BOTTOM_LEFT:7,BOTTOM_CENTER:8,BOTTOM_RIGHT:9});K("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Gj(a,b){this.h=a;this.i=b}Gj.prototype.toString=function(){return"v"+this.h+"."+this.i};function Hj(a,b){var c=new Gj(6,0),d=Ij,e=d.h,f=c.i-e.i;((c.h-e.h||f)>0?d.j:d.i)(d.h,c,a,b)}function Jj(a,b,c,d){Wa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Kj(a,b,c,d){Va([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Ij=null;function Lj(){}function Mj(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function Nj(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 Oj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function Mc(){if(Pj)return Pj;Qj||(Qj=new $e(function(){Pj=null}));(Pj=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Pj=document.createElement("video"));Qj.ea(1);return Pj}
function Rj(a,b){var c,d,e,f,g;return H(function(h){if(h.i==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=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);h.l()})}
function Sj(a,b,c){a.J(document,"fullscreenchange",function(){c(!!document.fullscreenElement)});b&&((b.webkitPresentationMode||b.webkitSupportsFullscreen)&&a.J(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?c(b.webkitPresentationMode!=="inline"):b.webkitSupportsFullscreen&&c(b.webkitDisplayingFullscreen)}),a.J(b,"enterpictureinpicture",function(){c(!0)}),a.J(b,"leavepictureinpicture",function(){c(!1)}));"documentPictureInPicture"in window&&a.J(window.documentPictureInPicture,
"enter",function(d){c(!0);a.Ra(d.window,"pagehide",function(){c(!1)})})}K("shaka.util.Dom",Lj);Lj.removeAllChildren=Oj;Lj.clearSourceFromVideo=Nj;var Qj=null,Pj=null;function Tj(){this.l=new nb(function(){for(var a=navigator.userAgent.toLowerCase(),b=t([{type:"VR",Mg:/oculus|quest/},{type:"TV",Mg:/smart[ _]?tv|android ?tv/},{type:"MOBILE",Mg:/iphone|ipad|ipod|android/}]),c=b.next();!c.done;c=b.next())if(c=c.value,c.Mg.test(a))return c.type;a=navigator.userAgentData;var d;b=(a==null?void 0:(d=a.platform)==null?void 0:d.toLowerCase())||"";if(a){if(a.mobile)return"MOBILE";if(b.includes("android"))return"TV"}return"DESKTOP"});this.m=new nb(function(){var a=navigator.userAgent;
return navigator.vendor.includes("Apple")&&(a.includes("Version/")||a.includes("OS/"))?"WEBKIT":a.includes("Edge/")?"EDGE":a.includes("Chrome/")?"CHROMIUM":a.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Kc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}r=Tj.prototype;r.Mb=function(){return!!navigator.mediaCapabilities};r.Ka=function(){return this.l.value()};r.Ea=function(){return this.m.value()};r.jd=function(){return!1};r.Qg=function(){return!1};
r.Pe=function(){return!1};r.xi=function(){return!1};r.Vd=function(){return!1};r.df=function(){return!1};r.gb=function(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType};r.Xd=function(){return!0};r.Bi=function(){return 0};r.Ib=function(){return Promise.resolve({width:Infinity,height:Infinity})};r.Mi=function(){return!1};r.Xg=function(){return!1};
r.Va=function(a){var b=this.Ka();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;b==="TV"&&(a.textDisplayer.suspendRenderingWhenHidden=!1);return a};r.Ng=function(){return[]};r.jc=function(a){return window.matchMedia!==void 0&&(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(dynamic-range: high)").matches)?a?"HLG":"PQ":"SDR"};r.Ri=function(){return!1};r.ii=function(){return!1};r.ef=function(){return!1};
r.lf=function(){return!0};r.ji=function(){return!1};r.Qi=function(){return!0};r.Kc=function(){return!1};r.zg=function(a){return a==="com.apple.fps"};r.ld=function(){return!0};function Uj(a,b){a=a.Ka();return["DESKTOP","MOBILE","VR","APPLE_VR"].includes(a)?b.remote:null}r.md=function(){return typeof Worker!=="undefined"};r.Sh=function(){return!0};r.Ag=function(){return!1};r.toString=function(){return"Device: "+this.mb()+" v"+this.ua()+"; Type: "+this.Ka()};function Vj(){Tj.call(this);this.h=new nb(function(){var a=navigator.userAgent.match(/Version\/(\d+)(?:\.(\d+))?/);a||(a=navigator.userAgent.match(/OS (\d+)(?:_(\d+))?/));return a?[parseInt(a[1],10),parseInt(a[2]||"0",10)]:[0,0]});this.i=new nb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}ta(Vj,Tj);r=Vj.prototype;r.ua=function(){return this.h.value()[0]};r.mb=function(){return"Apple Browser"};
r.Ka=function(){return this.i.value()};r.Ea=function(){return"WEBKIT"};r.Mb=function(){return!1};r.jd=function(a,b){return!Wj(this)&&b==="audio"};r.Pe=function(){return!Wj(this)};r.xi=function(a){return!Wj(this)&&a==="audio"};r.Va=function(a){Tj.prototype.Va.call(this,a);a.streaming.fallbackToNativeHlsOnMseError=!0;a.abr.minTimeToSwitch=.5;a.streaming.inaccurateManifestTolerance=0;return a};r.Ri=function(){return!0};r.ld=function(){return!1};r.Sh=function(){return!1};r.df=function(){return!0};
r.Ag=function(){return!0};function Wj(a){a=a.h.value();return a[0]>=27?!0:a[0]===26&&a[1]>=4}(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"))&&(rb=function(){return new Vj});function Xj(){if(!Yj())throw Error("Not a Chromecast device!");Tj.call(this);this.i=new nb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.h=new nb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?Zj:a.includes("fuchsia")?ak:bk})}ta(Xj,Tj);r=Xj.prototype;r.ua=function(){return this.i.value()};r.mb=function(){return"Chromecast with "+this.h.value()};
r.Ka=function(){return"CAST"};r.Ea=function(){return"CHROMIUM"};r.Mb=function(){return Tj.prototype.Mb.call(this)&&this.h.value()!==bk};r.gb=function(a){return Tj.prototype.gb.call(this,a)&&this.h.value()!==bk};r.Bi=function(){switch(this.h.value()){case Zj:return 0;case ak:return 3;default:return 1}};
r.Ib=function(){var a,b,c,d,e;return H(function(f){switch(f.i){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};f.o(2);if(!(c=a)){f.A(4);break}return f.h(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.j;case 4:if(c){b.width=3840;b.height=2160;f.A(6);break}if(!(d=a)){f.A(7);break}return f.h(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.j;case 7:d&&(b.width=1920,b.height=1080);case 6:f.u(3);break;case 2:e=f.m(),Va("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};r.Va=function(a){Tj.prototype.Va.call(this,a);a.streaming.stallSkip=0;return a};r.Kc=function(){return!0};r.Ng=function(){var a=this.ua();return a!==null&&a<90?["opus"]:[]};r.df=function(){return this.h.value()===bk};function Yj(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}
var Zj="Android",ak="Fuchsia",bk="Linux";Yj()&&(rb=function(){return new Xj});function ck(){Tj.call(this);this.j=new nb(function(){var a=navigator.userAgent.match(/Edge?\/(\d+)/);return a||(a=navigator.userAgent.match(/OPR\/(\d+)/))?parseInt(a[1],10):(a=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/))?parseInt(a[2],10):null});this.h=new nb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("OPR/")?"Opera":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.u=new nb(function(){return navigator.userAgentData&&
navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="macos":navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1});this.i=new nb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1});this.B=new nb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.o=new nb(function(){return navigator.userAgentData&&
navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}ta(ck,Tj);r=ck.prototype;r.ua=function(){return this.j.value()};r.mb=function(){return this.h.value()};r.jd=function(a){return bc(a)?this.i.value():!1};r.Qg=function(a){return bc(a)||this.h.value()==="Edge"?this.i.value():!1};r.ld=function(){return this.h.value()==="Opera"&&this.u.value()?!1:Tj.prototype.ld.call(this)};
r.Pe=function(a){return bc(a)||this.h.value()==="Edge"?this.i.value():!1};r.gb=function(a){return this.i.value()&&bc(a)?!1:Tj.prototype.gb.call(this,a)};
r.Va=function(a){Tj.prototype.Va.call(this,a);if(this.i.value())switch(this.h.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Opera":case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.o.value()&&(a.drm.defaultAudioRobustnessForWidevine="SW_SECURE_CRYPTO",a.drm.defaultVideoRobustnessForWidevine=
"SW_SECURE_CRYPTO");return a};r.ef=function(){return this.h.value()==="Edge"||this.B.value()};r.Kc=function(){if(this.Ea()==="GECKO"){var a=this.ua();return a!==null?a>=100:Tj.prototype.Kc.call(this)}return Tj.prototype.Kc.call(this)};r.zg=function(a){return this.Ea()==="GECKO"?bc(a):Tj.prototype.zg.call(this,a)};sb=function(){return new ck};function dk(){Tj.apply(this,arguments)}ta(dk,Tj);r=dk.prototype;r.ua=function(){return null};r.mb=function(){return"Hisense"};r.Ka=function(){return"TV"};r.Mb=function(){return!1};r.gb=function(){return!1};r.Ib=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)};
r.Va=function(a){Tj.prototype.Va.call(this,a);a.streaming.stallSkip=0;return a};r.md=function(){return!1};if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))rb=function(){return new dk};function ek(){Tj.call(this);this.h=new nb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}ta(ek,Tj);r=ek.prototype;r.mb=function(){return"PlayStation"};r.Ka=function(){return"CONSOLE"};r.Ea=function(){return"WEBKIT"};r.ua=function(){return this.h.value()};r.Mb=function(){return!1};r.gb=function(){return!1};r.Xg=function(){return this.ua()===4};
r.Ib=function(){var a,b,c,d,e;return H(function(f){switch(f.i){case 1:return a={width:1920,height:1080},b=!1,f.o(2),f.h(window.msdk.device.getDisplayInfo(),4);case 4:c=f.j;b=c.resolution==="4K";f.u(3);break;case 2:return f.m(),f.o(5),f.h(window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.j;b=d.resolution==="4K";f.u(3);break;case 5:e=f.m(),Wa("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
r.Va=function(a){Tj.prototype.Va.call(this,a);this.ua()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};r.ef=function(){return this.ua()===4};r.lf=function(){return this.ua()!==4};navigator.userAgent.includes("PlayStation")&&(rb=function(){return new ek});function fk(){Tj.apply(this,arguments)}ta(fk,Tj);r=fk.prototype;r.ua=function(){return null};r.mb=function(){return"TitanOS"};r.Ka=function(){return"TV"};r.Ib=function(){var a={width:1920,height:1080};try{SmartTvA_API.hasCapability("UHD")?(a.width=3840,a.height=2160):SmartTvA_API.hasCapability("FHD")?(a.width=1920,a.height=1080):(a.width=1280,a.height=720)}catch(b){Wa("Titan OS: Error detecting screen size, default screen size 1920x1080.",b)}return Promise.resolve(a)};
r.jc=function(a){try{if(SmartTvA_API.hasCapability("HDR","HDR10")||SmartTvA_API.hasCapability("HDR","DV"))return a?"HLG":"PQ"}catch(b){return Wa("Titan OS: Error checking HDR support",b),Tj.prototype.jc.call(this,a)}return"SDR"};navigator.userAgent.includes("TitanOS")&&(rb=function(){return new fk});function gk(){Tj.apply(this,arguments)}ta(gk,Tj);r=gk.prototype;r.ua=function(){return null};r.mb=function(){return"TiVoOS"};r.Ka=function(){return"TV"};r.Ea=function(){return"CHROMIUM"};r.gb=function(){return!1};navigator.userAgent.includes("TiVoOS")&&(rb=function(){return new gk});function hk(){Tj.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.h=a?parseInt(a[1],10):null;this.i=a?parseInt(a[2],10):null}ta(hk,Tj);r=hk.prototype;r.ua=function(){return this.h};r.mb=function(){return"Tizen"};r.Ea=function(){return"CHROMIUM"};r.Ka=function(){return"TV"};r.jd=function(){return!0};r.Vd=function(){return this.ua()===3};r.Mb=function(){return!1};r.gb=function(){return!1};r.Xd=function(){return this.h&&this.i?this.h===5?this.i>=5:this.h>5:Tj.prototype.Xd.call(this)};
r.Ib=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){Wa("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};r.Va=function(a){Tj.prototype.Va.call(this,a);a.drm.ignoreDuplicateInitData=this.ua()!==2;this.ua()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};r.Ng=function(){var a=[];this.h!==null&&this.h<5&&a.push("opus");return a};
r.jc=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return Tj.prototype.jc.call(this,a)}return"SDR"};r.ii=function(){return!0};r.ji=function(){return this.ua()===3};r.md=function(){var a=this.ua();return a!==null&&a<3?!1:Tj.prototype.md.call(this)};navigator.userAgent.includes("Tizen")&&(rb=function(){return new hk});function ik(){Tj.apply(this,arguments)}ta(ik,Tj);r=ik.prototype;r.ua=function(){return null};r.mb=function(){return"Vizio"};r.Ka=function(){return"TV"};r.Mb=function(){return!1};r.df=function(){return!0};navigator.userAgent.includes("VIZIO SmartCast")&&(rb=function(){return new ik});function jk(){Tj.call(this);this.j=new nb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.i=new nb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.h=new nb(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})}ta(jk,Tj);r=jk.prototype;r.ua=function(){return this.h.value()};
r.mb=function(){return"WebKit STB"};r.Ka=function(){return"TV"};r.Ea=function(){return"WEBKIT"};r.Mb=function(){return!1};r.jd=function(){return this.i.value()};r.Ib=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};r.lf=function(){return!this.j.value()};r.ld=function(){return!1};r.Ag=function(){return!0};
if(navigator.userAgent.includes("PlayStation")?0: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")))rb=function(){return new jk};function kk(){Tj.call(this);var a=this;this.i=lk();this.h=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);var d,e,f,g;a.h=(g=(f=(d=c.configs)==null?void 0:d["tv.model.supportHDR"])!=null?f:(e=c.configs)==null?void 0:e["tv.config.supportDolbyHDRContents"])!=null?g:!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){Wa("WebOS: getConfigs call failed",c)}}
ta(kk,Tj);r=kk.prototype;r.ua=function(){return this.i};r.mb=function(){return"WebOS"};r.Ka=function(){return"TV"};r.Ea=function(){return"CHROMIUM"};r.Mb=function(){return!1};r.gb=function(){return!1};r.Xd=function(){var a=this.ua();return a!==null?a>3:Tj.prototype.Xd.call(this)};r.Ib=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){Wa("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
r.Va=function(a){Tj.prototype.Va.call(this,a);this.ua()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};r.jc=function(a){return this.h==null?(Wa("WebOS: getConfigs call haven't finished"),Tj.prototype.jc.call(this,a)):this.h?a?"HLG":"PQ":"SDR"};
function lk(){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;case 132:return 26;default:return null}}r.Qi=function(){return!1};r.Kc=function(){var a=this.ua();return a!==null?a>=6:Tj.prototype.Kc.call(this)};r.md=function(){var a=this.ua();return a!==null&&a<4?!1:Tj.prototype.md.call(this)};
if(navigator.userAgent.includes("Web0S")){var mk=new kk;rb=function(){return mk}};function nk(){Tj.call(this);this.h=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.i=a?parseInt(a[1],10):null}ta(nk,Tj);r=nk.prototype;r.ua=function(){return this.i};r.mb=function(){return"Xbox"};r.Ka=function(){return"CONSOLE"};r.Ea=function(){return this.h?"EDGE":"CHROMIUM"};r.jd=function(){return!0};r.Qg=function(){return!0};r.Pe=function(){return!0};r.Mi=function(){return this.h};
r.Ib=function(){var a={width:1920,height:1080},b=ok();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){Wa("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
r.Va=function(a){Tj.prototype.Va.call(this,a);a.drm.parseInbandPsshEnabled=this.h;a.drm.preferredKeySystems.push("com.microsoft.playready");this.h&&(a.streaming.gapPadding=.01);return a};r.ef=function(){return!0};function ok(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||ok()!==null)rb=function(){return new nk};function pk(a,b){var c=qk();this.u=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.o=a.baseDelay==null?c.baseDelay:a.baseDelay;this.C=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.B=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.h=0;this.i=this.o;this.m=b===void 0?!1:b;this.l=this.j=null;this.m&&(this.h=1)}
pk.prototype.attempt=function(){var a=this,b,c,d;return H(function(e){if(e.i==1){if(a.h>=a.u)if(a.m)a.h=1,a.i=a.o;else throw new L(2,7,1010);b=a.h;a.h++;if(b==0)return e.return();c=a.i*(1+(Math.random()*2-1)*a.C);d=Promise.withResolvers();a.j=d;a.l=rk(c,function(){a.j=null;a.l=null;d.resolve()});return e.h(d.promise,2)}a.i*=a.B;e.l()})};pk.prototype.stop=function(){var a;(a=this.l)==null||a.stop();this.l=null;var b;(b=this.j)==null||b.reject(new L(2,7,7001));this.j=null};
function qk(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}}function rk(a,b){b=new $e(b);b.ea(a/1E3);return b};function sk(a,b){this.promise=a;this.j=b;this.h=null}function tk(a){return new sk(Promise.reject(a),function(){return Promise.resolve()})}function uk(){var a=Promise.reject(new L(2,7,7001));a.catch(function(){});return new sk(a,function(){return Promise.resolve()})}function vk(a){return new sk(Promise.resolve(a),function(){return Promise.resolve()})}da.Object.defineProperties(sk.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h!==null}}});
sk.prototype.abort=function(){this.h||(this.h=this.j());return this.h};sk.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
sk.prototype.Gb=function(a,b){function c(g){return function(h){if(e.h&&g)f.reject(new L(2,7,7001));else{var k=g?a:b;k?d=wk(k,h,f):(g?f.resolve:f.reject)(h)}}}function d(){f.reject(new L(2,7,7001));return e.abort()}var e=this,f=Promise.withResolvers();f.promise.catch(function(){});this.promise.then(c(!0),c(!1));return new sk(f.promise,function(){return d()})};
function wk(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()}}}K("shaka.util.AbortableOperation",sk);sk.prototype.chain=sk.prototype.Gb;sk.prototype["finally"]=sk.prototype.finally;sk.all=function(a){return new sk(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})};
sk.prototype.abort=sk.prototype.abort;sk.notAbortable=function(a){return new sk(a,function(){return a.catch(function(){})})};sk.completed=vk;sk.aborted=uk;sk.failed=tk;function xk(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.h=!1}
xk.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};xk.prototype.stopImmediatePropagation=function(){this.h=!0};xk.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",xk);function yk(){this.fb=new hb;this.qh=this}yk.prototype.addEventListener=function(a,b){this.fb&&this.fb.push(a,b)};yk.prototype.removeEventListener=function(a,b){this.fb&&this.fb.remove(a,b)};yk.prototype.dispatchEvent=function(a){if(!this.fb)return!0;var b=this.fb.get(a.type)||[],c=this.fb.get("__shaka_all_events__");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.qh;a.currentTarget=this.qh;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.h)break}return a.defaultPrevented};
yk.prototype.release=function(){this.fb=null};function zk(){this.h=[]}function Ak(a,b){a.h.push(b.finally(function(){db(a.h,b)}))}zk.prototype.destroy=function(){for(var a=[],b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.h=[];return Promise.all(a)};function Bk(a,b){var c=c===void 0?"":c;if(b.length==0)return a;var d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;for(var f=t(b),g=f.next();!g.done;g=f.next()){g=new URL(g.value,e);if(c){var h=c.replace(/^[?&]/,""),k=g.search.replace(/^\?/,"");g.search=k?k+"&"+h:h}d.push(g.toString())}}return d}function Ck(a){try{var b=(new URL(a)).protocol.slice(0,-1);if(b&&a.toLowerCase().startsWith(b+":"))return b}catch(c){}return(a=a.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/))?a[1].toLowerCase():""}
function Dk(a){if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(a))return a;try{return(new URL(a,typeof document!="undefined"&&document.baseURI||location.href)).toString()}catch(b){return a}}function Ek(a){try{var b=(new URL(a)).hostname;if(b)return b}catch(c){}return(a=a.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/([^/?#]*)/))?a[1]:""}function Fk(a,b){a=new URL(a);a.hostname=b;return a.toString()}
function Gk(a,b){b=b==null?void 0:b();if(!b)return a;a=new URL(a);b=b.replace(/^[?&]/,"").split("&").filter(function(c){return c});Hk(a,b);return a.toString()}function Ik(a,b){if(!b.size)return a;a=new URL(a);var c=[];b=t(b.entries());for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;c.push(encodeURIComponent(d)+"="+encodeURIComponent(e))}Hk(a,c);return a.toString()}
function Hk(a,b){function c(f){return f.split("=")[0]}var d=new Set(b.map(c)),e=a.search.replace(/^\?/,"").split("&").filter(function(f){return f&&!d.has(c(f))});a.search=e.concat(b).join("&")};function Jk(a,b,c,d,e,f,g){yk.call(this);this.j=null;this.l=!1;this.B=new zk;this.h=new Set;this.i=new Set;this.u=a||null;this.o=b||null;this.C=c||null;this.D=d||null;this.F=e||null;this.H=f||null;this.G=g||null;this.m=new Map}ta(Jk,yk);r=Jk.prototype;r.configure=function(a){this.j=a};function Kk(a,b,c,d){d=d===void 0?!1:d;c=c||Lk;var e=Mk.get(a);(!e||c>=e.priority)&&Mk.set(a,{priority:c,Ze:b,Qk:d})}
function Nk(a,b){for(var c=t(a.h),d=c.next();!d.done;d=c.next())b.h.add(d.value);a=t(a.i);for(c=a.next();!c.done;c=a.next())b.i.add(c.value)}r.Tk=function(a){this.h.add(a)};r.Cl=function(a){this.h.delete(a)};r.kj=function(){this.h.clear()};r.Uk=function(a){this.i.add(a)};r.Dl=function(a){this.i.delete(a)};r.lj=function(){this.i.clear()};r.Dh=function(){this.m.clear()};
function Ok(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,attempt:0}}r.destroy=function(){this.l=!0;this.h.clear();this.i.clear();this.m.clear();yk.prototype.release.call(this);return this.B.destroy()};
r.request=function(a,b,c){var d=this,e=new Pk;if(this.l){var f=Promise.reject(new L(2,7,7001));f.catch(function(){});return new Qk(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};f=nd(b.headers);b.retryParameters=b.retryParameters?nd(b.retryParameters):qk();b.uris=nd(b.uris);b.attempt=0;f=Rk(this,a,b,c,new pk(b.retryParameters,!1),null,e,f,b.streamDataCallback?Sk(b,b.streamDataCallback):null);var g=f.Gb(function(l){return Tk(d,a,l,c)}),h=0;f.promise.then(function(){h=
Date.now()},function(){});var k=g.Gb(function(l){var m=l.response;m.timeMs+=Date.now()-h;l.lk||!d.u||m.fromCache||b.method=="HEAD"||a!=Uk||d.u(m.timeMs,m.data.byteLength,Vk(c),b,c);d.G&&d.G(a,m,c);return m},function(l){l&&(l.severity=2);throw l;});e=new Qk(k.promise,function(){return k.abort()},e);Ak(this.B,e);return e};
function Wk(a,b,c,d){function e(h){f=f.Gb(function(){c.body&&(c.body=xb(c.body));return h(b,c,d)})}var f=vk(void 0);a.F&&e(a.F);a=t(a.h);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Gb(void 0,function(h){if(h instanceof L&&h.code==7001)throw h;throw new L(2,1,1006,h);})}
function Sk(a,b){var c=0;return function(){var d=a.attempt,e=0;return function(f){if(a.attempt!=d)return Promise.resolve();var g=e;e+=f.byteLength;if(e<=c)return Promise.resolve();var h=f;g<c&&(h=yb(f,c-g));c=e;return b(h)}}}
function Rk(a,b,c,d,e,f,g,h,k){var l=c.attempt%c.uris.length;c.headers=nd(h);k&&(c.streamDataCallback=k());var m=Wk(a,b,c,d),n=Date.now(),p=0;m.promise.then(function(){p=Date.now()-n},function(){});c.uris[l]=Dk(c.uris[l]);a.j.forceHTTP&&(c.uris[l]=c.uris[l].replace("https://","http://"));a.j.forceHTTPS&&(c.uris[l]=c.uris[l].replace("http://","https://"));l>0&&a.H&&a.H(b,d,c.uris[l],c.uris[l-1]);var u=!1,q=Ck(c.uris[l]),v=(q=Mk.get(q))?q.Ze:null;if(!v)return tk(new L(2,1,1E3,c.uris[l]));var w=q.Qk;
(q=a.m.get(Ek(c.uris[l])))&&(c.headers[a.j.commonAccessTokenHeaderName]=q);var x=null,y=null,z=!1,C=!1,B;return m.Gb(function(){var A=e.attempt();return new sk(A,function(){e.stop();return A.catch(function(){})})}).Gb(function(){if(a.l)return uk();B=Date.now();var A=0;c.requestStartTime=Date.now();var D=v(c.uris[l],c,b,function(G,J,N){x&&x.stop();y&&y.ea(E/1E3);a.u&&b==Uk&&(A++,c.packetNumber=A,a.u(G,J,Vk(d),c,d),u=!0,g.h=N)},function(G){C=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.o&&a.o(G,
c,b)},{minBytesForProgressEvents:a.j.minBytesForProgressEvents});if(!w)return D;var F=c.retryParameters.connectionTimeout;F&&(x=new $e(function(){z=!0;D.abort()}),x.ea(F/1E3));var E=c.retryParameters.stallTimeout;E&&(y=new $e(function(){z=!0;D.abort()}));return D}).Gb(function(A){x&&x.stop();y&&y.stop();A.timeMs==void 0&&(A.timeMs=Date.now()-B,A.timeMs+=p);var D=A.headers[a.j.commonAccessTokenHeaderName];D&&a.m.set(Ek(A.uri),D);D={response:A,lk:u};!C&&a.o&&a.o(A.headers,c,b);a.C&&a.C(b,c,d,A);return D},
function(A){x&&x.stop();y&&y.stop();if(a.D){var D=null,F=0;A instanceof L&&(D=A,A.code==1001&&(F=A.data[1]));a.D(b,c,d,D,F,z)}if(a.l)return uk();z&&(A=new L(1,1,1003,c.uris[l],b));if(A instanceof L){if(A.code==7001)throw A;if(A.code==1010)throw f;if(A.severity==1){D=(new Map).set("error",A);D=new xk("retry",D);D.cancelable=!0;a.dispatchEvent(D);if(D.defaultPrevented)throw A;++c.attempt;return Rk(a,b,c,d,e,A,g,h,k)}}throw A;})}
function Tk(a,b,c,d){var e=vk(void 0);a=t(a.i);for(var f=a.next(),g={};!f.done;g={zi:void 0},f=a.next())g.zi=f.value,e=e.Gb(function(h){return function(){var k=c.response;k.data&&(k.data=xb(k.data));return(0,h.zi)(b,k,d)}}(g));return e.Gb(function(){return c},function(h){var k=2;if(h instanceof L){if(h.code==7001)throw h;k=h.severity}throw new L(k,1,1007,h);})}function Vk(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Fc)return!1}return!0}K("shaka.net.NetworkingEngine",Jk);
Jk.prototype.request=Jk.prototype.request;Jk.prototype.destroy=Jk.prototype.destroy;Jk.makeRequest=Ok;Jk.defaultRetryParameters=function(){return qk()};Jk.prototype.clearCommonAccessTokenMap=Jk.prototype.Dh;Jk.prototype.clearAllResponseFilters=Jk.prototype.lj;Jk.prototype.unregisterResponseFilter=Jk.prototype.Dl;Jk.prototype.registerResponseFilter=Jk.prototype.Uk;Jk.prototype.clearAllRequestFilters=Jk.prototype.kj;Jk.prototype.unregisterRequestFilter=Jk.prototype.Cl;
Jk.prototype.registerRequestFilter=Jk.prototype.Tk;Jk.unregisterScheme=function(a){Mk.delete(a)};Jk.registerScheme=Kk;Jk.prototype.configure=Jk.prototype.configure;function Pk(){this.h=0}Jk.NumBytesRemainingClass=Pk;function Qk(a,b,c){sk.call(this,a,b);this.i=c}ta(Qk,sk);Jk.PendingRequest=Qk;var Uk=1,Xk={MANIFEST:0,SEGMENT:Uk,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9,SESSION_DATA:10,FINGERPRINT:11,PLAYLIST:12,EVENT_CALLBACK:13};Jk.RequestType=Xk;
Jk.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,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,TRACKING_EVENT:13,XLINK:14,LINKED_MPD:15};var Lk=3;Jk.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Lk};var Mk=new Map;function Yk(a){this.h=!1;this.i=Promise.withResolvers();this.j=a}Yk.prototype.destroy=function(){var a=this;if(this.h)return this.i.promise;this.h=!0;return this.j().then(function(){a.i.resolve()},function(){a.i.resolve()})};function Zk(a,b){if(a.h){if(b instanceof L&&b.code==7003)throw b;throw new L(2,7,7003,b);}};function $k(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function al(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function bl(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function cl(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function dl(a){var b=this;this.h=[];this.data=[];(new jh).ma(["moov","moof"],oh).P("pssh",function(c){if(!(c.version>1)){var d=yb(c.reader.i,-12,c.size);b.data.push(d);c=c.reader.wa(16,!1);b.h.push(Rb(c))}}).parse(a)};function el(a){var b=this;this.F=a;this.u=this.B=null;this.T=!1;this.L=0;this.h=null;this.C=new ib;this.j=new Map;this.Y=[];this.D=new Map;this.M=!1;this.m=Promise.withResolvers();this.i=null;this.o=function(c){c.severity==2&&b.m.reject(c);a.onError(c)};this.ba=new Map;this.$=new Map;this.H=new $e(function(){return fl(b)});this.ia=!1;this.N=[];this.na=!1;this.G=new $e(function(){gl(b)});this.m.promise.catch(function(){});this.l=new Yk(function(){return hl(b)});this.O=!1;this.I=this.K=null;this.V=
function(){return!1}}r=el.prototype;r.destroy=function(){return this.l.destroy()};
function hl(a){var b;return H(function(c){switch(c.i){case 1:return a.C.release(),a.C=null,a.m.reject(),a.G.stop(),a.G=null,a.H.stop(),a.H=null,c.h(il(a),2);case 2:if(!a.u){c.A(3);break}if(!a.B){c.A(4);break}c.o(5);return c.h(a.u.setMediaKeys(null),7);case 7:c.u(4);break;case 5:b=c.m(),Wa("DrmEngine.destroyNow_ exception",b);case 4:a.u=null;case 3:a.h=null,a.B=null,a.D=new Map,a.i=null,a.o=function(){},a.F=null,a.O=!1,a.K=null,c.l()}})}
r.configure=function(a,b){this.i=a;b&&(this.V=b);this.G&&this.T&&this.h&&this.G.La(this.i.updateExpirationTime)};function jl(a,b,c,d){d=d===void 0?!0:d;a.D=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.D.set(e.value,{initData:null,initDataType:null});c=t(a.i.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.ia=a.D.size>0;return kl(a,b,d)}
function kl(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C;return H(function(B){if(B.i==1){ll(a.i.clearKeys,b);d=b.some(function(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});e=bl(a.i.servers);f=bl(a.i.advanced||{});!d&&c&&ml(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=nl(l),n=t(m),p=n.next();!p.done;p=n.next())u=p.value,g.has(u)||(g.add(u),ol(u,e,f,a.i.keySystemsMapping));q=function(A,D){var F=[];A=t(A);for(var E=A.next();!E.done;E=
A.next()){E=E.value;var G=E[D]||f.has(E.keySystem)&&f.get(E.keySystem)[D]||"";G==""&&ac(E.keySystem)&&(D=="audioRobustness"?G=[a.i.defaultAudioRobustnessForWidevine]:D=="videoRobustness"&&(G=[a.i.defaultVideoRobustnessForWidevine]));if(typeof G==="string")F.push(E);else if(Array.isArray(G)){G.length===0&&(G=[""]);G=t(G);for(var J=G.next();!J.done;J=G.next()){var N={};F.push(Object.assign({},E,(N[D]=J.value,N)))}}}return F};v=new WeakSet;w=t(b);for(x=w.next();!x.done;x=w.next())y=x.value,y.video&&
!v.has(y.video)&&(y.video.drmInfos=q(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=q(y.video.drmInfos,"audioRobustness"),v.add(y.video)),y.audio&&!v.has(y.audio)&&(y.audio.drmInfos=q(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=q(y.audio.drmInfos,"audioRobustness"),v.add(y.audio));return B.h(uf(b,a.ia,a.O,a.i.preferredKeySystems),2)}Zk(a.l);z=d||e.size>0;if(!z)return a.T=!0,B.return(Promise.resolve());C=pl(a,b);return B.return(d?C:C.catch(function(){}))})}
function ql(a){var b;return H(function(c){switch(c.i){case 1:if(a.u.mediaKeys)return c.return();if(!a.K){c.A(2);break}return c.h(a.K,3);case 3:return Zk(a.l),c.return();case 2:return c.o(4),a.K=a.u.setMediaKeys(a.B),c.h(a.K,6);case 6:c.u(5);break;case 4:b=c.m(),a.o(new L(2,6,6003,b.message));case 5:Zk(a.l),c.l()}})}function rl(a,b){return H(function(c){if(c.i==1)return c.h(ql(a),2);sl(a,b.initDataType,yb(b.initData));c.l()})}
r.xb=function(a){var b=this,c,d,e,f;return H(function(g){if(g.i==1){if(b.u===a)return g.return();if(!b.B)return b.C.Ra(a,"encrypted",function(){b.o(new L(2,6,6010))}),g.return();c=ob();b.u=a;b.i.delayLicenseRequestUntilPlayed&&b.C.Ra(b.u,"play",function(){for(var h=t(b.N),k=h.next();!k.done;k=h.next())tl(b,k.value);b.na=!0;b.N=[]});(d=Uj(c,b.u))?b.C.Lb(d,["connect","connecting","disconnect"],function(){il(b)}):"webkitCurrentPlaybackTargetIsWireless"in b.u&&b.C.J(b.u,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return il(b)});b.I=b.h?b.h.initData.find(function(h){return h.initData.length>0})||null:null;e=b.h.keySystem;return(f=c.zg(e))||!b.I&&b.h.keySystem==="com.apple.fps"&&!b.D.size?g.A(2):g.h(ql(b),2)}ul(b).catch(function(){});!f&&(b.I||b.D.size||b.i.parseInbandPsshEnabled)||b.C.J(b.u,"encrypted",function(h){return rl(b,h)});g.l()})};
function vl(a){var b,c,d,e,f;return H(function(g){switch(g.i){case 1:if(!a.B||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.A(2);break}b=Ok([a.h.serverCertificateUri],a.i.retryParameters);g.o(3);c=a.F.dd.request(5,b,{isPreload:a.V()});return g.h(c.promise,5);case 5:d=g.j;a.h.serverCertificate=yb(d.data);g.u(4);break;case 3:throw e=g.m(),new L(2,6,6017,e);case 4:if(a.l.h)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return();
g.o(6);return g.h(a.B.setServerCertificate(a.h.serverCertificate),8);case 8:g.u(0);break;case 6:throw f=g.m(),new L(2,6,6004,f.message);}})}
function ul(a){var b,c,d,e,f;return H(function(g){if(g.i==1){if(!a.D.size)return g.A(2);a.D.forEach(function(h,k){wl(a,k,h)});return g.h(a.m.promise,3)}if(g.i!=2){b=a.h&&a.h.keyIds||new Set([]);if(b.size>0&&xl(a))return g.return(a.m.promise);a.M=!1;a.m=Promise.withResolvers();a.m.promise.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,sl(a,f.initDataType,f.initData);yl(a)&&a.m.resolve();return g.return(a.m.promise)})}
function sl(a,b,c){if(!a.l.h&&c.length){try{c=a.i.initDataTransform(c,b,a.h)}catch(g){b=g;g instanceof L||(b=new L(2,6,6016,g));a.o(b);return}if(a.i.ignoreDuplicateInitData){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(ub(c,e.value.initData))return;var f=!1;a.D.forEach(function(g){!f&&ub(c,g.initData)&&(f=!0)});if(f)return}a.M=!0;a.j.size>0&&yl(a)&&(a.m.resolve(),a.M=!1,a.m=Promise.withResolvers(),a.m.promise.catch(function(){}));zl(a,b,c,a.h.sessionType)}}
r.dg=function(){var a=this,b=this.j.keys();b=$k(b,function(c){var d=a.j.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Og=function(a){var b=this;this.j.forEach(function(c,d){a!=void 0&&d.sessionId!=a||Al(b,d)})};
r.Sg=function(a,b){b=b===void 0?.1:b;var c=this,d,e,f,g,h;return H(function(k){switch(k.i){case 1:Zk(c.l);e=d=null;c.j.forEach(function(l,m){m.sessionId===a.sessionId&&(d=m,e=l)});if(!(d&&e&&c.h&&e.initData&&e.initDataType))return k.return(!1);f=e.initData;g=e.initDataType;if(!(b>0)){k.A(2);break}return k.h(ef(b),2);case 2:return k.o(4),c.j.delete(d),k.h(Bl(c,d),6);case 6:h=zl(c,g,f,c.h.sessionType,!1);if(!h)throw new L(2,6,6005,"Failed to create new session for license retry");return k.return(!0);
case 4:return k.m(),k.return(!1)}})};r.eg=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function Cl(a){return a.L?a.L:NaN}r.Tb=function(){return this.h};r.Ke=function(){return cl(this.$)};
function pl(a,b){var c,d,e,f,g,h,k;return H(function(l){switch(l.i){case 1:c=new Map;d=Dl(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new L(2,6,6020);throw new L(2,6,6001);}Zk(a.l);l.o(2);d.getConfiguration();e=a.i.keySystemsMapping[d.keySystem]||d.keySystem;a.h=El(a,e,c.get(e));if(!a.h.licenseServerUri)throw new L(2,6,6012,a.h.keySystem);return l.h(d.createMediaKeys(),4);case 4:f=l.j;Zk(a.l);a.B=f;if(!(a.i.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.A(5);break}l.o(6);return l.h(a.B.getStatusForPolicy({minHdcpVersion:a.i.minHdcpVersion}),
8);case 8:g=l.j;if(g!="usable")throw new L(2,6,6018);Zk(a.l);l.u(5,2);break;case 6:h=l.m(2);if(h instanceof L)throw h;throw new L(2,6,6019,h.message);case 5:return a.T=!0,a.G.La(a.i.updateExpirationTime),l.h(vl(a),9);case 9:Zk(a.l);l.u(0);break;case 2:k=l.m();Zk(a.l,k);a.h=null;if(k instanceof L)throw k;throw new L(2,6,6002,k.message);}})}
function Dl(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(nl(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.getOrInsertComputed(f.keySystem,function(){return[]}).push(f)}if(c.size==1&&c.has(""))throw new L(2,6,6E3);d=a.i.preferredKeySystems;d.length||(e=bl(a.i.servers),e.size==1&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={ti:void 0},g=e.next()){f.ti=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(p){return p.supported&&
p.keySystemAccess!=null&&p.keySystemAccess.keySystem==n.ti}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.i.keySystemsMapping[l]&&(m=c.get(a.i.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function Fl(a){yl(a)&&a.m.resolve()}function Gl(a,b){(new $e(function(){b.loaded=!0;Fl(a)})).ea(Hl)}
function wl(a,b,c){var d,e,f,g,h,k,l;H(function(m){switch(m.i){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new L(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.C.J(d,"message",function(n){Il(a)?a.N.push(n):tl(a,n)});a.C.J(d,"keystatuseschange",function(n){return Jl(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Cg:Infinity,sb:null,type:"persistent-license",Nd:0,Yh:!1};a.j.set(d,f);m.o(2);return m.h(d.load(b),4);case 4:return g=m.j,Zk(a.l),
g||(a.j.delete(d),h=a.i.persistentSessionOnlinePlayback?1:2,a.o(new L(h,6,6013)),f.loaded=!0),Gl(a,f),Fl(a),m.return(d);case 2:k=m.m(),Zk(a.l,k),a.j.delete(d),l=a.i.persistentSessionOnlinePlayback?1:2,a.o(new L(l,6,6005,k.message)),f.loaded=!0,Fl(a);case 3:return m.return(Promise.resolve())}})}
function zl(a,b,c,d,e){e=e===void 0?!1:e;if(a.l.h)return null;try{var f=a.B.createSession(d)}catch(g){return a.o(new L(2,6,6005,g.message)),null}a.C.J(f,"message",function(g){Il(a)?a.N.push(g):tl(a,g)});a.C.J(f,"keystatuseschange",function(g){return Jl(a,g)});a.j.set(f,{initData:c,initDataType:b,loaded:!1,Cg:Infinity,sb:null,type:d,Nd:0,Yh:e});f.closed.then(function(g){if(!a.l.h){var h=a.j.get(f);if(h){var k=f;g=g||"unknown";g!=="unknown"&&(a.j.delete(k),Kl(a,g,h))}}}).catch(function(){});a.i.logLicenseExchange&&
Ob(c);f.generateRequest(b,c).catch(function(g){if(!a.l.h){a.j.delete(f);Bl(a,f);var h=g.errorCode;if(h&&h.systemCode){var k=h.systemCode;k<0&&(k+=4294967296);k="0x"+k.toString(16)}a.o(new L(2,6,6006,g.message,g,k))}});return f}function Il(a){return a.u?a.i.delayLicenseRequestUntilPlayed&&a.u.paused&&!a.na:a.i.delayLicenseRequestUntilPlayed}function Ll(a){return H(function(b){return b.i==1?!a.M||Il(a)?b.A(0):b.h(a.m.promise,3):b.h(Promise.all(a.Y.map(function(c){return c.promise})),0)})}
function tl(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y;H(function(z){switch(z.i){case 1:c=b.target;a.i.logLicenseExchange&&Ob(b.message);d=a.j.get(c);e=a.h.licenseServerUri;f=a.i.advanced[a.h.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Ok([e],a.i.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType,d.Yh&&
(g.licenseRequestType="license-renewal"));if(f&&f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(k=$b(a.h.keySystem)){var C=g,B=a.h;try{var A=Ib(C.body);if(A){var D=JSON.parse(A);D.type||(D.type=B.sessionType,C.body=Jb(JSON.stringify(D)))}}catch(F){}}if(bc(a.h.keySystem))if(C=Gb(g.body,!0,!0),C.includes("PlayReadyKeyMessage")){C=rd(C,"PlayReadyKeyMessage");B=Dd(C,"HttpHeader");B=t(B);for(A=B.next();!A.done;A=B.next())D=A.value,A=Dd(D,"name")[0],D=Dd(D,"value")[0],g.headers[Cd(A)]=Cd(D);C=
Dd(C,"Challenge")[0];g.body=Pb(Cd(C))}else g.headers["Content-Type"]="text/xml; charset=utf-8";l=Date.now();z.o(2);n=a.F.dd.request(2,g,{isPreload:a.V()});a.Y.push(n);return z.h(n.promise,4);case 4:m=z.j;db(a.Y,n);z.u(3);break;case 2:p=z.m();if(a.l.h)return z.return();u={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};q=new L(2,6,6007,p,u);if(a.i.failureCallback)try{a.i.failureCallback(q)}catch(F){}if(q.handled)return d&&d.sb&&d.sb.reject(q),z.return();a.j.size==
1?(a.o(q),d&&d.sb&&d.sb.reject(q)):(d&&d.sb&&d.sb.reject(q),a.j.delete(c),Bl(a,c),yl(a)&&(a.m.resolve(),a.H.ea(.1)));return z.return();case 3:if(a.l.h)return z.return();a.L+=(Date.now()-l)/1E3;a.i.logLicenseExchange&&Ob(m.data);k&&Ml(a,m);z.o(5);return z.h(c.update(m.data),7);case 7:d&&(d.Nd=Date.now()/1E3);z.u(6);break;case 5:return w=(v=z.m())&&v.message||String(v),x=new L(2,6,6008,w),a.o(x),d&&d.sb&&d.sb.reject(x),z.return();case 6:if(a.l.h)return z.return();y=new xk("drmsessionupdate");a.F.onEvent(y);
d&&(d.sb&&d.sb.resolve(),Gl(a,d));z.l()}})}function Ml(a,b){b=Fb(b.data);try{var c=JSON.parse(b),d=new Map(c.keys.map(function(l){var m=l.kid;l=l.k;return[fc(m),fc(l)]}));if(a.h.clearKeys)for(var e=t(d),f=e.next();!f.done;f=e.next()){var g=t(f.value),h=g.next().value,k=g.next().value;a.h.clearKeys.set(h,k)}else a.h.clearKeys=d}catch(l){}}
function Jl(a,b){b=b.target;var c=a.j.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=ob();if(bc(a.h.keySystem)&&g.byteLength==16&&h.ef()){h=Bb(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)}c&&f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=Rb(g).slice(0,32);a.ba.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.sb&&(a.j.delete(b),Bl(a,b));yl(a)&&(a.m.resolve(),
a.H.ea(Nl))}function fl(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.o(new L(2,6,6014));a.F.pi(cl(c))}
function Ol(){var a,b,c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J;return H(function(N){if(N.i==1){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&
window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return N.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"]};p=[null,"cenc","cbcs"];u=new Map;q=ob();v=function(P,U,Q){var M,O,V,ea,ha,I,T,R,S,X,ka,na,Aa;return H(function(ja){switch(ja.i){case 1:return ja.o(2),ja.h(U.createMediaKeys(),5);case 5:M=ja.j;case 4:ja.u(3);break;case 2:return ja.m(),ja.return();case 3:V=(O=U.getConfiguration().sessionTypes)?O.includes("persistent-license"):
!1;q.ji()&&(V=!1);ea=U.getConfiguration().videoCapabilities;ha=U.getConfiguration().audioCapabilities;I={persistentState:V,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};u.get(P)?I=u.get(P):u.set(P,I);(T=ea[0].encryptionScheme)&&!I.encryptionSchemes.includes(T)&&I.encryptionSchemes.push(T);(R=ea[0].robustness)&&!I.videoRobustnessLevels.includes(R)&&I.videoRobustnessLevels.push(R);(S=ha[0].robustness)&&!I.audioRobustnessLevels.includes(S)&&I.audioRobustnessLevels.push(S);
if(!(Q&&"getStatusForPolicy"in M)){ja.A(0);break}X=t(f);ka=X.next();case 7:if(ka.done){ja.A(0);break}na=ka.value;if(I.minHdcpVersions.includes(na)){ja.A(8);break}return ja.h(M.getStatusForPolicy({minHdcpVersion:na}),10);case 10:if(Aa=ja.j,Aa=="usable")I.minHdcpVersions.includes(na)||I.minHdcpVersions.push(na);else{ja.A(0);break}case 8:ka=X.next(),ja.A(7)}})};w=function(P,U,Q,M,O){O=O===void 0?!1:O;var V,ea,ha,I,T,R,S,X,ka,na,Aa;return H(function(ja){switch(ja.i){case 1:ja.o(2);V=nd(n);ea=t(V.videoCapabilities);
for(ha=ea.next();!ha.done;ha=ea.next())I=ha.value,I.encryptionScheme=U,I.robustness=Q;T=t(V.audioCapabilities);for(R=T.next();!R.done;R=T.next())S=R.value,S.encryptionScheme=U,S.robustness=M;X=nd(V);X.persistentState="required";X.sessionTypes=["persistent-license"];ka=[X,V];Aa=ob();return Aa.Ka()=="MOBILE"?ja.h(df(5,navigator.requestMediaKeySystemAccess(P,ka)),7):ja.h(navigator.requestMediaKeySystemAccess(P,ka),6);case 6:na=ja.j;ja.A(5);break;case 7:na=ja.j;case 5:return ja.h(v(P,na,O),8);case 8:ja.u(0);
break;case 2:ja.m(),ja.l()}})};x=[];y=t(a);for(z=y.next();!z.done;z=y.next()){C=z.value;u.set(C,null);B=!0;A=t(p);for(D=A.next();!D.done;D=A.next())F=D.value,x.push(w(C,F,"","",B)),B=!1;E=t(k[C]||[]);for(G=E.next();!G.done;G=E.next())J=G.value,x.push(w(C,null,J,"")),x.push(w(C,null,"",J))}return N.h(Promise.all(x),2)}return N.return(cl(u))})}
function Bl(a,b){var c,d;return H(function(e){switch(e.i){case 1:return c=null,e.o(2),e.h(df(Pl,Promise.all([b.close().catch(function(){}),b.closed])),4);case 4:d=e.j;c=d[1];e.u(3);break;case 2:e.m();case 3:c&&c!=="unknown"&&Kl(a,c),e.l()}})}
function Kl(a,b,c){if(b==="internal-error")a.o(new L(2,6,6005,"CDM reported internal error"));else if(b!=="closed-by-application"&&b!=="release-acknowledged"&&b!=="resource-evicted"&&b==="hardware-context-reset"&&c)if(c.initDataType&&c.initData)try{zl(a,c.initDataType,c.initData,c.type)}catch(d){a.o(new L(2,6,6005,"Failed to recreate session after hardware context reset: "+d.message))}else a.o(new L(2,6,6005,"Cannot recreate session after hardware reset: missing metadata"))}
function il(a){var b;return H(function(c){b=Array.from(a.j.entries());a.j.clear();return c.h(Promise.all(b.map(function(d){d=t(d);var e=d.next().value;var f=d.next().value;return H(function(g){if(g.i==1)return g.o(2),a.D.has(e.sessionId)||f.type!=="persistent-license"||a.i.persistentSessionOnlinePlayback?g.h(Bl(a,e),5):g.h(e.remove(),5);if(g.i!=2)return g.u(0);g.m();g.l()})})),0)})}function nl(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function gl(a){var b=Date.now()/1E3;a.j.forEach(function(c,d){var e=c.Cg,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(a.F.onExpirationUpdated(d.sessionId,f),c.Cg=f);a.i.renewalIntervalSec>0&&(e=b-c.Nd,c.Nd>0&&e>=a.i.renewalIntervalSec&&Al(a,d))})}
function Al(a,b){var c,d,e,f,g,h,k,l;H(function(m){switch(m.i){case 1:if(c=a.j.get(b))c.Nd=Date.now()/1E3;if(!a.h)return m.return();d=a.h.keySystem;e=b;f={sessionId:b.sessionId,sessionType:a.h.sessionType,initData:c?c.initData:null,initDataType:c?c.initDataType:null};m.o(2);return cc(d)?(g=Jb("renew"),m.h(b.update(g),5)):bc(d)&&c&&c.initData&&c.initDataType?m.h(Ql(a,b,c),7):(Wa("Manual license renewal is not supported for "+d),m.return());case 7:e=m.j;m.A(5);break;case 5:m.u(3);break;case 2:return m.m(),
m.return();case 3:h=a.j.get(e),k={sessionId:e.sessionId,sessionType:a.h.sessionType,initData:h?h.initData:null,initDataType:h?h.initDataType:null},l=new xk("licenserenewal",(new Map).set("oldSessionMetadata",f).set("newSessionMetadata",k)),a.F.onEvent(l),m.l()}})}
function Ql(a,b,c){var d;return H(function(e){if(e.i==1)return a.j.delete(b),e.h(Bl(a,b),2);d=zl(a,c.initDataType,c.initData,a.h.sessionType,!0);if(!d)throw new L(2,6,6005,"Failed to create new session for renewal");return e.return(d)})}function yl(a){a=a.j.values();return al(a,function(b){return b.loaded})}function xl(a){for(var b=t(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.ba.get(c.value)!=="usable")return!1;return!0}
function ml(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
function El(a,b,c){var d=[],e=[],f=[],g=[],h=[],k=new Set,l=new Set;Rl(c,d,e,g,f,h,k,l);a=a.ia?"persistent-license":"temporary";b={keySystem:b,encryptionScheme:d[0],licenseServerUri:e[0],distinctiveIdentifierRequired:c[0].distinctiveIdentifierRequired,persistentStateRequired:c[0].persistentStateRequired,sessionType:c[0].sessionType||a,audioRobustness:c[0].audioRobustness||"",videoRobustness:c[0].videoRobustness||"",serverCertificate:g[0],serverCertificateUri:f[0],initData:h,keyIds:k,mediaTypes:c[0].mediaTypes};
l.size>0&&(b.keySystemUris=l);c=t(c);for(l=c.next();!l.done;l=c.next())l=l.value,l.distinctiveIdentifierRequired&&(b.distinctiveIdentifierRequired=l.distinctiveIdentifierRequired),l.persistentStateRequired&&(b.persistentStateRequired=l.persistentStateRequired);return b}
function Rl(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ja:void 0},l=a.next()){m.Ja=l.value;b.includes(m.Ja.encryptionScheme)||b.push(m.Ja.encryptionScheme);$b(m.Ja.keySystem)&&m.Ja.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ja.licenseServerUri)||k.push(m.Ja.licenseServerUri):c.includes(m.Ja.licenseServerUri)||c.push(m.Ja.licenseServerUri);e.includes(m.Ja.serverCertificateUri)||e.push(m.Ja.serverCertificateUri);m.Ja.serverCertificate&&(d.some(function(u){return function(q){return ub(q,
u.Ja.serverCertificate)}}(m))||d.push(m.Ja.serverCertificate));if(m.Ja.initData){l=t(m.Ja.initData);for(var n=l.next(),p={};!n.done;p={mg:void 0},n=l.next())p.mg=n.value,f.some(function(u){return function(q){var v=u.mg;return q.keyId&&q.keyId==v.keyId?!0:q.initDataType==v.initDataType&&ub(q.initData,v.initData)}}(p))||f.push(p.mg)}if(m.Ja.keyIds)for(l=t(m.Ja.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ja.keySystemUris&&h)for(m=t(m.Ja.keySystemUris),l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==
1)c.push(k[0]);else if(k.length>0){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,wa(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function ol(a,b,c,d){var e=a.keySystem;if(e&&(!$b(e)||!Xb(a))){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 ll(a,b){a=bl(a);if(a.size!=0){a=vc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var Pl=1,Hl=5,Nl=.5;function Sl(){}function Tl(a){a=Ib(a);return Ek(a)}function Ul(a,b,c){function d(h){Bb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(yb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new L(2,6,6015);var e;typeof b=="string"?e=Kb(b,!0):e=b;a=Ib(a);a=Kb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Vl(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Ib(a).split("skd://").pop();return Ul(a,c,b)}
function Wl(a,b){a!==2||b.attempt>0||(a=b.drmInfo)&&cc(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}K("shaka.drm.FairPlay",Sl);
Sl.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&cc(a.keySystem)){try{var c=Fb(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=xb(Pb(c)))}};
Sl.gumletFairPlayRequest=function(a,b){a!==2||b.attempt>0||(a=b.drmInfo)&&cc(a.keySystem)&&b.body&&(a=yb(b.body),a=Ob(a),b.body=Jb(JSON.stringify({Rm:a})),b.headers["Content-Type"]="application/json")};Sl.muxFairPlayRequest=function(a,b){Wl(a,b)};Sl.expressplayFairPlayRequest=function(a,b){Wl(a,b)};Sl.conaxFairPlayRequest=function(a,b){Wl(a,b)};Sl.ezdrmFairPlayRequest=function(a,b){Wl(a,b)};
Sl.verimatrixFairPlayRequest=function(a,b){a!==2||b.attempt>0||(a=b.drmInfo)&&cc(a.keySystem)&&(a=yb(b.body),a=Ob(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Jb("spc="+a))};Sl.muxInitDataTransform=function(a,b,c){return Vl(a,b,c)};Sl.expressplayInitDataTransform=function(a,b,c){return Vl(a,b,c)};
Sl.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Ib(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Ab(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Ul(a,d,b)};Sl.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Ib(a).split(";").pop();return Ul(a,c,b)};Sl.verimatrixInitDataTransform=function(a,b,c){return Vl(a,b,c)};Sl.initDataTransform=Ul;
Sl.defaultGetContentId=Tl;Sl.isFairPlaySupported=function(){var a;return H(function(b){if(b.i==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},b.o(2),b.h(navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.i!=2)return b.return(!0);b.m();return b.return(!1)})};function Xl(a){var b=0,c=Bb(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=yb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Yl(a){a=Xl(a).find(function(b){return b.type===Zl});if(!a)return null;a=Gb(a.value,!0);return(a=rd(a,"WRMHEADER"))?a:null}
function $l(a){try{var b=Yl(a);if(b)a:{for(var c=t(Dd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if(h.tagName=="LA_URL"){var k=Cd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Zl=1;function am(a,b,c){this.type=a;this.W=b;this.segments=c||null}function bm(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}bm.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 cm(a,b){return a.attributes.find(function(c){return c.name===b})||null}function Y(a,b,c){return(a=cm(a,b))?a.value:c||null}function dm(a,b){a=cm(a,b);if(!a)throw new L(2,4,4023,b);return a.value}function em(a,b,c){c=c===void 0?[]:c;this.W=b;this.h=a;this.Gc=c}function fm(a,b){this.name=a;this.value=b};function gm(a,b){return a.filter(function(c){return c.name==b})}function hm(a,b){return a.filter(function(c){return dm(c,"TYPE")==b})}function im(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function jm(a,b,c){c=c===void 0?0:c;return(a=im(a,b))?Number(a.value):c}function km(a,b,c){return b?lm(a,[b],c):[]}function lm(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return mm(e,c)}));return Bk(a,d)}
function mm(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new L(2,4,4039,e);}}return a}function nm(a){a=a.value;var b=a.indexOf(",");return Number(b===-1?a:a.substring(0,b))}function om(a){return(a=Y(a,"SUPPLEMENTAL-CODECS"))?a.split(/\s*,\s*/).map(function(b){return b.split("/")[0]}).join(","):""};function pm(){this.h=0}
function qm(a,b){var c=Fb(b).trim().split(/[\r\n]+/);if(!c[0].startsWith("#EXTM3U"))throw new L(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=rm(a,h);d||(sm.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:tm.has(h.name)&&(b=1,d=!0));if(tm.has(h.name)){if(b!=1)throw new L(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"))if(m=rm(f,m),sm.has(m.name))e.push(m);else if(m.name=="EXT-X-MAP")k=m;else if(m.name=="EXT-X-PART")l.push(m);else if(m.name=="EXT-X-PRELOAD-HINT")switch(Y(m,"TYPE")){case "PART":l.push(m);break;case "MAP":m.name="EXT-X-MAP";k=m;break;case "KEY":e.push(m)}else h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new em(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new em("",h,l),d<a.length?a[d++]=c:(a.push(c),
d++));return new am(b,e,d<a.length?a.slice(0,d):a)}e.push(h);h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new fm("URI",k)),f=!0)}}return new am(b,e)}
function rm(a,b){a=a.h++;var c=b.indexOf(":"),d=c===-1?b.substring(1):b.substring(1,c);if(!d.startsWith("EXT"))throw new L(2,4,4016,b);b=c===-1?null:b.substring(c+1);if(b===null)a=new bm(a,d,[]);else if(b.indexOf("=")===-1)a=new bm(a,d,[],b);else{c=[];var e=null,f=0,g=b.indexOf(","),h=b.indexOf("=");g!==-1&&g<h&&(e=b.substring(0,g),f=g+1);for(;f<b.length;){for(;b[f]===" ";)f++;h=b.indexOf("=",f);if(h===-1)break;g=b.substring(f,h);f=h+1;if(b[f]==='"'){f++;var k=b.indexOf('"',f);h=k===-1?b.substring(f):
b.substring(f,k);f=k===-1?b.length:k+1}else k=b.indexOf(",",f),h=k===-1?b.substring(f):b.substring(f,k),f=k===-1?b.length:k;f<b.length&&b[f]===","&&f++;c.push(new fm(g,h))}a=new bm(a,d,c,e)}return a}var sm=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(" ")),tm=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 um(a,b,c,d,e,f,g,h){this.S=a;this.startByte=b;this.endByte=c;this.bd=d===void 0?null:d;this.timescale=e===void 0?null:e;this.i=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.h=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}um.prototype.kc=function(){return this.startByte};um.prototype.hc=function(){return this.endByte};um.prototype.Wd=function(a){this.i=a};um.prototype.yc=function(){return this.i};
function vm(a,b){return a===b?!0:a&&b?a.kc()==b.kc()&&a.hc()==b.hc()&&gb(a.S().sort(),b.S().sort())&&ub(a.yc(),b.yc()):a==b}K("shaka.media.InitSegmentReference",um);um.prototype.getEndByte=um.prototype.hc;um.prototype.getStartByte=um.prototype.kc;
function wm(a,b,c,d,e,f,g,h,k,l,m,n,p,u,q,v){l=l===void 0?[]:l;u=u===void 0?xm:u;this.startTime=a;this.l=this.endTime=b;this.G=c;this.startByte=d;this.endByte=e;this.initSegmentReference=f;this.m=g;this.F=h;this.D=k;this.i=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.h=p===void 0?null:p;this.status=u;this.preload=!1;this.j=!0;this.u=!1;this.aesKey=q===void 0?null:q;this.thumbnailSprite=null;this.discontinuitySequence=-1;this.o=v===void 0?!1:v;this.Md=this.Fc=!1;a=t(this.i);for(b=
a.next();!b.done;b=a.next())b.value.gi();this.o&&this.i.length&&this.i[this.i.length-1].di();this.B=this.bandwidth=this.mimeType=this.codecs=null;this.I=!1;this.H=null}r=wm.prototype;r.S=function(){return this.G()};r.getStartTime=function(){return this.startTime};r.Mj=function(){return this.endTime};r.kc=function(){return this.startByte};r.hc=function(){return this.endByte};
function ym(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.i.length>0&&a.o)for(a=t(a.i),a=a.next();!a.done;a=a.next()){ym(a.value);break}return null}r.ik=function(){return this.tilesLayout};r.hk=function(){return this.C};r.Kb=function(){return this.status};r.Ck=function(){this.status=zm};r.wg=function(){this.preload=!0};r.isPreload=function(){return this.preload};r.ei=function(){this.j=!1};r.rk=function(){return this.j};
r.gi=function(){this.Fc=!0};r.vk=function(){return this.Fc};r.di=function(){this.Md=!0};r.tk=function(){return this.Md};r.ci=function(){this.u=!0};r.nk=function(){return this.u};r.Ki=function(a){this.thumbnailSprite=a};r.fk=function(){return this.thumbnailSprite};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=t(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};
r.bh=function(a){this.h==null?Va("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};r.Wd=function(a,b){this.B=a;this.I=b===void 0?!1:b};r.yc=function(a){var b=this.B;(a===void 0||a)&&this.I&&(this.B=null);return b};r.Wg=function(a){this.H=a};r.getMetadata=function(){return this.H};K("shaka.media.SegmentReference",wm);wm.prototype.getMetadata=wm.prototype.getMetadata;wm.prototype.setMetadata=wm.prototype.Wg;wm.prototype.getSegmentData=wm.prototype.yc;
wm.prototype.setSegmentData=wm.prototype.Wd;wm.prototype.syncAgainst=wm.prototype.bh;wm.prototype.offset=wm.prototype.offset;wm.prototype.getThumbnailSprite=wm.prototype.fk;wm.prototype.setThumbnailSprite=wm.prototype.Ki;wm.prototype.hasByterangeOptimization=wm.prototype.nk;wm.prototype.markAsByterangeOptimization=wm.prototype.ci;wm.prototype.isLastPartial=wm.prototype.tk;wm.prototype.markAsLastPartial=wm.prototype.di;wm.prototype.isPartial=wm.prototype.vk;wm.prototype.markAsPartial=wm.prototype.gi;
wm.prototype.isIndependent=wm.prototype.rk;wm.prototype.markAsNonIndependent=wm.prototype.ei;wm.prototype.isPreload=wm.prototype.isPreload;wm.prototype.markAsPreload=wm.prototype.wg;wm.prototype.markAsUnavailable=wm.prototype.Ck;wm.prototype.getStatus=wm.prototype.Kb;wm.prototype.getTileDuration=wm.prototype.hk;wm.prototype.getTilesLayout=wm.prototype.ik;wm.prototype.getEndByte=wm.prototype.hc;wm.prototype.getStartByte=wm.prototype.kc;wm.prototype.getEndTime=wm.prototype.Mj;
wm.prototype.getStartTime=wm.prototype.getStartTime;wm.prototype.getUris=wm.prototype.S;var xm=0,zm=1;wm.Status={Ml:xm,rm:zm,Wl:2};function Am(a,b,c,d){this.j=a;this.H=b;this.u=this.o=Infinity;this.i=d===void 0?1:d;this.h=this.m=null;this.F=0;this.C=!0;this.M=!1;this.K=0;this.I=c===void 0?!0:c;this.L=!1;this.D=0;this.B=!1;this.l=a;this.G=[]}r=Am.prototype;r.getDuration=function(){return this.o};r.Sj=function(){return this.i};r.Gi=function(a){this.j=a};r.uc=function(a){this.o=a;a!=Infinity&&(this.u=Infinity)};r.Zj=function(){return this.j};r.ll=function(a){this.F=a};
r.jf=function(a){a&&!this.C&&(this.M=!0);if(this.C=a)this.u=Infinity};r.Ji=function(a){this.isLive()&&(this.u=a)};r.Me=function(){return this.u};r.Di=function(a){this.L=a};r.Ei=function(a){this.H=a};r.Lj=function(){return this.H};
r.Kk=function(a,b){if(a.length!=0){var c=(Date.now()+this.F)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.We(a[0].start+b);this.i=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.i);this.h=Math.max(this.h,d);this.j!=null&&this.I&&!this.B&&(this.j=c-this.h-this.i)}}};
r.oi=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.F)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.i=Math.max(this.i,e.endTime-e.startTime));this.We(b);this.h=Math.max(this.h,c);this.j!=null&&this.I&&!this.B&&(this.j=d-this.h-this.i)}};r.Jk=function(a,b){this.We(a);b==Infinity||this.isLive()||(this.h=Math.max(this.h,b))};r.Tj=function(){return this.h};r.ai=function(){this.B=!0};
r.xk=function(){return this.B};r.Fi=function(a){this.l=a};r.Qj=function(){return this.l};r.Hi=function(a){this.G=a};r.jg=function(a){if(!this.G.length)return null;for(var b=this.G[0],c=t(this.G),d=c.next();!d.done;d=c.next())if(d=d.value,d.start<=a)b=d;else break;return b};r.Qh=function(a){var b=this.jg(a);return b?b.Ig+(a-b.start):this.l==null?null:this.l+a};r.We=function(a){this.m==null?this.m=a:this.M||(this.m=Math.min(this.m,a))};r.Ik=function(a){this.i=Math.max(this.i,a)};
r.offset=function(a){this.m!=null&&(this.m+=a);this.h!=null&&(this.h+=a)};r.isLive=function(){return this.o==Infinity&&!this.C};r.ad=function(){return this.o!=Infinity&&!this.C};r.oa=function(){return!this.C};r.Hd=function(){var a=this.Gd()-this.u;return Math.max(this.K,a)};r.Li=function(a){this.K=a};r.Gd=function(){return this.oa()?Math.min(Math.max(0,(Date.now()+this.F)/1E3-this.i-this.j)+this.D,this.L&&this.h!=null?this.h+this.i+this.D:Infinity,this.o):this.h?Math.min(this.h,this.o):this.o};
r.Fd=function(a){var b=Math.max(this.m,this.K);if(this.u==Infinity)return Math.ceil(b*1E3)/1E3;var c=this.Gd()-this.u;a=Math.min(c+a,this.pb());return Math.max(b,a)};r.Ab=function(){return this.Fd(0)};r.pb=function(){var a=this.oa()?this.H:0;return Math.max(0,this.Gd()-a)};r.Fl=function(){return this.j==null||this.h!=null&&this.I?!1:!0};r.kl=function(a){this.D=a};r.Hj=function(){return this.D};K("shaka.media.PresentationTimeline",Am);Am.prototype.getAvailabilityTimeOffset=Am.prototype.Hj;
Am.prototype.setAvailabilityTimeOffset=Am.prototype.kl;Am.prototype.usingPresentationStartTime=Am.prototype.Fl;Am.prototype.getSeekRangeEnd=Am.prototype.pb;Am.prototype.getSeekRangeStart=Am.prototype.Ab;Am.prototype.getSafeSeekRangeStart=Am.prototype.Fd;Am.prototype.getSegmentAvailabilityEnd=Am.prototype.Gd;Am.prototype.setUserSeekStart=Am.prototype.Li;Am.prototype.getSegmentAvailabilityStart=Am.prototype.Hd;Am.prototype.isDynamic=Am.prototype.oa;Am.prototype.isInProgress=Am.prototype.ad;
Am.prototype.isLive=Am.prototype.isLive;Am.prototype.offset=Am.prototype.offset;Am.prototype.notifyMaxSegmentDuration=Am.prototype.Ik;Am.prototype.notifyMinSegmentStartTime=Am.prototype.We;Am.prototype.getProgramDateTimeForTime=Am.prototype.Qh;Am.prototype.getProgramDateTimeRegionForTime=Am.prototype.jg;Am.prototype.setProgramDateTimeRegions=Am.prototype.Hi;Am.prototype.getInitialProgramDateTime=Am.prototype.Qj;Am.prototype.setInitialProgramDateTime=Am.prototype.Fi;
Am.prototype.isStartTimeLocked=Am.prototype.xk;Am.prototype.lockStartTime=Am.prototype.ai;Am.prototype.getMaxSegmentEndTime=Am.prototype.Tj;Am.prototype.notifyPeriodDuration=Am.prototype.Jk;Am.prototype.notifySegments=Am.prototype.oi;Am.prototype.notifyTimeRange=Am.prototype.Kk;Am.prototype.getDelay=Am.prototype.Lj;Am.prototype.setDelay=Am.prototype.Ei;Am.prototype.setClampLiveEdgeToSegments=Am.prototype.Di;Am.prototype.getSegmentAvailabilityDuration=Am.prototype.Me;
Am.prototype.setSegmentAvailabilityDuration=Am.prototype.Ji;Am.prototype.setStatic=Am.prototype.jf;Am.prototype.setClockOffset=Am.prototype.ll;Am.prototype.getPresentationStartTime=Am.prototype.Zj;Am.prototype.setDuration=Am.prototype.uc;Am.prototype.setPresentationStartTime=Am.prototype.Gi;Am.prototype.getMaxSegmentDuration=Am.prototype.Sj;Am.prototype.getDuration=Am.prototype.getDuration;function Bm(a){var b=this;this.l=a;this.i=new ib;this.h=new Set;this.j=(new $e(function(){Cm(b,!1)})).hb();a.paused||this.j.La(.25);this.i.J(a,"playing",function(){b.j.hb().La(.25)});this.i.J(a,"pause",function(){b.j.stop()});this.i.J(a,"seeked",function(){b.j.hb();a.paused||b.j.La(.25)});this.i.J(a,"ended",function(){Cm(b,!1,a.duration)})}Bm.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.j.stop();for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h.clear()};
function Cm(a,b,c){c=isFinite(c)?Number(c):a.l.currentTime;a=t(a.h);for(var d=a.next();!d.done;d=a.next())d.value.l(c,b)};function Dm(a){yk.call(this);this.h=new Map;this.i=a}ta(Dm,yk);Dm.prototype.release=function(){this.h.clear();yk.prototype.release.call(this)};function Em(a,b){var c=a.h.get(b);c||(c={Ud:[],If:null,contentType:b},a.h.set(b,c));return c}function Fm(a,b,c){var d=Em(a,b.contentType);Gm(a,d);a={bd:b,position:c};d=d.Ud;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
Dm.prototype.l=function(a){for(var b=t(this.h.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.If;a:{var e=c.Ud;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.bd;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&&!gb(d.roles,e.roles);(g||h||d)&&Hm(this,a,e.contentType)&&(c.If=e,d=new xk("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Hm(this,a,e.contentType)&&(c.If=e,JSON.stringify(e),c=new xk("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function Hm(a,b,c){return(a=a.i()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Gm(a,b){if((a=a.i()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.Ud;b.Ud=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.Ud=[]}
function Im(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 Jm(a){this.h=a;this.l=null;this.i=0;this.m=!1}r=Jm.prototype;r.getNumReferences=function(){return this.h.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.m||(this.h=[],this.l&&this.l.stop(),this.l=null)};r.Dk=function(){this.m=!0};r.Sb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())a(c.value)};function Hf(a){return a.h[0]||null}
r.find=function(a){var b=this.h.length-1;if(b<0)return null;if(a<this.h[0].startTime)return this.i;var c=fb(this.h,function(e){return e.startTime<=a})-1;if(c<0)return null;var d=this.h[c];b=c<b?this.h[c+1].startTime:d.endTime;return a>=d.startTime&&a<b?c+this.i:null};r.get=function(a){if(this.h.length==0)return null;a-=this.i;return a<0||a>=this.h.length?null:this.h[a]};r.offset=function(a){if(!this.m)for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.offset(a)};
r.yg=function(a){if(!this.m&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3,c=fb(this.h,function(d){return Math.round(d.startTime*1E3)/1E3<b});this.h.length=c;this.h.push.apply(this.h,wa(a))}};r.Pd=function(a,b){for(var c=Math.max(b,this.h.length>0?this.h[0].startTime:-Infinity),d=0;d<a.length&&a[d].endTime<=c;)d++;d>0&&(a=a.slice(d));this.yg(a);this.zb(b)};r.zb=function(a){if(!this.m){var b=fb(this.h,function(c){return c.endTime<=a});b>0&&(this.i+=b,this.h=this.h.slice(b))}};
r.Ge=function(a,b,c){c=c===void 0?!1:c;if(!this.m){for(;this.h.length;)if(this.h[this.h.length-1].startTime>=b)this.h.pop();else break;var d=fb(this.h,function(e){return e.endTime<=a});d>0&&(c||(this.i+=d),this.h=this.h.slice(d));this.h.length!=0&&(c=this.h[this.h.length-1],b=new wm(c.startTime,b,c.G,c.startByte,c.endByte,c.initSegmentReference,c.m,c.F,c.D,c.i,c.tilesLayout,c.C,c.h,c.status,c.aesKey),b.mimeType=c.mimeType,b.codecs=c.codecs,b.discontinuitySequence=c.discontinuitySequence,this.h[this.h.length-
1]=b)}};r.ih=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new $e(function(){var d=b();d?c.h.push.apply(c.h,wa(d)):(c.l.stop(),c.l=null)}),this.l.La(a))};Jm.prototype[Symbol.iterator]=function(){return this.ob(0)};
Jm.prototype.ob=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.i.length>0)for(var g=e.i.length-1;g>=0;--g){var h=e.i[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.j;)g--,h=e.i[g];if(!h.j)return Va("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Km(this,d,f,c)};function Lm(a,b,c){a=new wm(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Jm([a])}
K("shaka.media.SegmentIndex",Jm);Jm.forSingleSegment=Lm;Jm.prototype.getIteratorForTime=Jm.prototype.ob;Jm.prototype.updateEvery=Jm.prototype.ih;Jm.prototype.fit=Jm.prototype.Ge;Jm.prototype.evict=Jm.prototype.zb;Jm.prototype.mergeAndEvict=Jm.prototype.Pd;Jm.prototype.offset=Jm.prototype.offset;Jm.prototype.get=Jm.prototype.get;Jm.prototype.find=Jm.prototype.find;Jm.prototype.markImmutable=Jm.prototype.Dk;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.j=a;this.i=b;this.h=c;this.reverse=d}r=Km.prototype;r.kd=function(a){this.reverse=a};r.qj=function(){return this.i};r.current=function(){var a=this.j.get(this.i);a&&a.i.length>0&&a.o&&this.h>=a.i.length&&(this.i++,this.h=0,a=this.j.get(this.i));return a&&a.i.length>0?a.i[this.h]:a};
r.next=function(){var a=this.j.get(this.i);this.reverse?a&&a.i.length>0?(this.h--,this.h<0&&(this.i--,this.h=(a=this.j.get(this.i))&&a.i.length>0?a.i.length-1:0)):(this.i--,this.h=0):a&&a.i.length>0?(this.h++,a.o&&this.h==a.i.length&&(this.i++,this.h=0)):(this.i++,this.h=0);a=this.current();return{value:a,done:!a}};r.Rg=function(){var a=this.current();if(a&&a.Fc&&!a.j&&(a=this.j.get(this.i))&&a.i.length>0)for(var b=a.i[this.h];b.j&&!(this.h<=0);)this.h--,b=a.i[this.h]};
K("shaka.media.SegmentIterator",Km);Km.prototype.resetToLastIndependent=Km.prototype.Rg;Km.prototype.next=Km.prototype.next;Km.prototype.current=Km.prototype.current;Km.prototype.currentPosition=Km.prototype.qj;Km.prototype.setReverse=Km.prototype.kd;function Mm(){Jm.call(this,[]);this.j=[]}ta(Mm,Jm);r=Mm.prototype;r.clone=function(){var a=new Mm;a.j=this.j.slice();a.i=this.i;return a};r.release=function(){this.j=[]};r.Sb=function(a){for(var b=t(this.j),c=b.next();!c.done;c=b.next())c.value.Sb(a)};
function Nm(a,b){a=t(a.j);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.i,c=t(this.j),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=t(a.j);for(var c=a.next();!c.done&&c.value.find(b)==null;c=a.next());return-1}
r.get=function(a){for(var b=this.i,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.yg=function(){};r.zb=function(a){if(this.j.length){var b=this.j[0];b.zb(a);b.getNumReferences()==0&&(this.j.shift(),this.i+=b.getNumEvicted(),b.release(),this.zb(a))}};r.Pd=function(){};r.Ge=function(){};r.ih=function(){};K("shaka.media.MetaSegmentIndex",Mm);Mm.prototype.updateEvery=Mm.prototype.ih;
Mm.prototype.fit=Mm.prototype.Ge;Mm.prototype.mergeAndEvict=Mm.prototype.Pd;Mm.prototype.evict=Mm.prototype.zb;Mm.prototype.merge=Mm.prototype.yg;Mm.prototype.offset=Mm.prototype.offset;Mm.prototype.get=Mm.prototype.get;Mm.prototype.find=Mm.prototype.find;Mm.prototype.forEachTopLevelReference=Mm.prototype.Sb;Mm.prototype.release=Mm.prototype.release;function Pm(a){return Qm.getOrInsertComputed(a,function(){var b,c;return(c=(b=self.ManagedMediaSource||self.MediaSource)==null?void 0:b.isTypeSupported(a))!=null?c:!1})}function Rm(){var a=self.ManagedMediaSource||self.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Qm=new Map;function Sm(a){var b=De(a),c=b.split("/")[0];a=Ee(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,videoRange:null,colorGamut:null,frameRate:null,timescale:null,drmInfos:[]}}function Tm(a){a=yb(a);var b=oi(a).length;return Dj(a,b)?"audio/mpeg":Vi(a,b)?"audio/aac":Si(a,b)?"audio/ac3":oj(a,b)?"audio/ec3":null}
function Um(a,b,c){function d(I){E=I.name;var T=I.reader;T.skip(24);var R=T.xa(),S=T.xa();T.skip(50);q=String(R);u=String(S);I.reader.Wa()&&oh(I)}function e(I){var T=Jh(I.reader);v=T.channelCount;w=T.sampleRate;f(I.name);I.reader.Wa()&&oh(I)}function f(I){I=I.toLowerCase();switch(I){case "avc1":case "avc3":h.push(I+".42E01E");m=!0;break;case "hev1":case "hvc1":h.push(I+".1.6.L93.90");m=!0;break;case "dvh1":case "dvhe":h.push(I+".05.04");m=!0;break;case "vp09":h.push(I+".00.10.08");m=!0;break;case "av01":h.push(I+
".0.01M.08");m=!0;break;case "mp4a":g.push("mp4a.40.2");l=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(I);l=!0;break;case "apac":g.push("apac.31.00"),l=!0}}var g=[],h=[],k=[],l=!1,m=!1,n=!1,p=null,u=null,q=null,v=null,w=null,x=null,y=null,z=null,C=null,B=new Map,A=new Set,D=null,F=null,E,G=0,J=[],N=new Map,P=null,U=new Map;if(a&&b){C=yb(a);var Q=yb(b);Q=Sb(C,Q)}else b?Q=yb(b):a&&(Q=yb(a));var M;(new jh).ma([].concat(wa(uh),wa(vh)),oh).P("tkhd",function(I){P=Ih(I.reader,
I.version).trackId}).P("mdhd",function(I){I=Gh(I.reader,I.version);p=I.language;P!==null&&N.set(P,I.timescale)}).P("stsd",qh).P("tfhd",function(I){I=Eh(I.reader,I.flags);I.Hb&&(G=I.Hb)}).P("trun",function(I){J=Hh(I.reader,I.version,I.flags).sc}).box("mp4a",function(I){var T=Jh(I.reader);v=T.channelCount;w=T.sampleRate;I.reader.Wa()?oh(I):f(I.name)}).box("esds",function(I){I=I.reader;for(var T="mp4a",R,S;I.Wa();){R=I.X();for(var X=I.X();X&128;)X=I.X();if(R==3)I.xa(),X=I.X(),X&128&&I.xa(),X&64&&I.skip(I.X()),
X&32&&I.xa();else if(R==4)S=I.X(),I.skip(12);else if(R==5)break}S&&(T+="."+Ph(S),R==5&&I.Wa()&&(R=I.X(),S=(R&248)>>3,S===31&&I.Wa()&&(S=32+((R&7)<<3)+((I.X()&224)>>5)),T+="."+S));g.push(T);l=!0}).ma(zh,e).box("iacb",function(I){I=I.reader;if(I.X()!=1)I={codec:null};else{I=I.wa(I.Na()-I.Ia(),!1);var T=Ah(I,0);if(T){T=I.subarray(T.size,T.size+T.value);I=[];for(var R=0;R<T.byteLength;){var S=R,X=T[R++],ka=X>>3,na=(X&2)!=0;X=(X&1)!=0;var Aa=Ah(T,R);if(!Aa)break;R+=Aa.size;Aa=R+Aa.value;if(Aa>T.byteLength)break;
if(na){na=Ah(T,R);if(!na)break;R+=na.size;na=Ah(T,R);if(!na)break;R+=na.size}if(X){X=Ah(T,R);if(!X)break;R+=X.size+X.value}if(R>Aa)break;I.push({type:ka,data:T.subarray(R,Aa),fullData:T.subarray(S,Aa)});R=Aa}R=T=null;I=t(I);for(S=I.next();!S.done;S=I.next()){S=S.value;switch(S.type){case 31:S.data.byteLength>=6&&(T=Lh(S.data[4],3)+"."+Lh(S.data[5],3));break;case 0:(ka=Ah(S.data,0))&&S.data.byteLength>=ka.size+4&&(R=ka.size,R=String.fromCharCode(S.data[R],S.data[R+1],S.data[R+2],S.data[R+3]))}if(T&&
R)break}I=T&&R?{codec:"iamf."+T+"."+(R=="mp4a"?"mp4a.40.2":R)}:{codec:null}}else I={codec:null}}I.codec&&(g.push(I.codec),l=!0)}).ma([].concat(wa(xh),["vp09","av01"]),d).box("avcC",function(I){var T=E||"";switch(E){case "dvav":T="avc3";break;case "dva1":T="avc1"}I=I.reader;I.skip(1);I=T+"."+Ph(I.X())+Ph(I.X())+Ph(I.X());h.push(I);m=!0}).box("hvcC",function(I){var T=E||"";switch(E){case "dvh1":T="hvc1";break;case "dvhe":T="hev1"}var R=I.reader;R.skip(1);I=R.X();var S=["","A","B","C"][I>>6],X=I&31,
ka=R.R(),na=(I&32)>>5?"H":"L";I=[R.X(),R.X(),R.X(),R.X(),R.X(),R.X()];R=R.X();for(var Aa=0,ja=0;ja<32;ja++){Aa|=ka&1;if(ja==31)break;Aa<<=1;ka>>=1}T=T+("."+S+X)+("."+Ph(Aa,!0));T+="."+na+R;S="";for(X=I.length;X--;)if((na=I[X])||S)S="."+na.toString(16).toUpperCase()+S;T+=S;h.push(T);m=!0}).box("dvcC",function(I){var T=E||"";switch(E){case "hvc1":T="dvh1";break;case "hev1":T="dvhe";break;case "avc1":T="dva1";break;case "avc3":T="dvav";break;case "av01":T="dav1"}var R=I.reader;R.skip(2);I=R.X();R=R.X();
h.push(T+"."+Lh(I>>1&127,2)+"."+Lh(I<<5&32|R>>3&31,2));m=!0}).box("dvvC",function(I){var T=E||"";switch(E){case "hvc1":T="dvh1";break;case "hev1":T="dvhe";break;case "avc1":T="dva1";break;case "avc3":T="dvav";break;case "av01":T="dav1"}var R=I.reader;R.skip(2);I=R.X();R=R.X();h.push(T+"."+Lh(I>>1&127,2)+"."+Lh(I<<5&32|R>>3&31,2));m=!0}).P("vpcC",function(I){var T=E||"",R=I.reader;I=R.X();var S=R.X();R=R.X()>>4&15;h.push(T+"."+Lh(I,2)+"."+Lh(S,2)+"."+Lh(R,2));m=!0}).box("av1C",function(I){var T=E||
"";switch(E){case "dav1":T="av01"}I=Kh(T,I.reader);h.push(I.codec);m=!0}).ma(["wvtt","stpp"],function(I){k.push(I.name);n=!0}).box("c608",function(){U.set("CC1","CC1");P!==null&&N.delete(P)}).box("enca",e).box("encv",d).box("sinf",oh).box("frma",function(I){I=Mh(I.reader).codec;f(I)}).box("colr",function(I){h=h.map(function(S){if(S.startsWith("av01.")){var X=I.reader,ka=X.Ia(),na=X.wa(4,!1);var Aa=String.fromCharCode(na[0]);Aa+=String.fromCharCode(na[1]);Aa+=String.fromCharCode(na[2]);Aa+=String.fromCharCode(na[3]);
if(Aa==="nclx"){na=X.xa();Aa=X.xa();var ja=X.xa(),ua=X.X()>>7,vb=S.split(".");vb.length==10&&(vb[6]=Lh(na,2),vb[7]=Lh(Aa,2),vb[8]=Lh(ja,2),vb[9]=String(ua),S=vb.join("."))}X.seek(ka)}return S});var T=Oh(I.reader),R=T.colorGamut;x=T.videoRange;y=R}).P("schm",function(I){D=nh(I.reader.R())}).box("schi",oh).P("tenc",function(I){F=Nh(I.reader,I.version).defaultKID}).P("pssh",function(I){var T=yb(I.reader.i,-12,I.size),R=Rb(T);if(!A.has(R)&&(A.add(R),R=I.reader.wa(16,!1),R=Rb(R),M||(M=ec(!0)),R=M[R.toLowerCase()])){var S=
uc(R,"cenc",[{initDataType:"cenc",initData:T}]);if(bc(R)){var X=8;T=Bb(T);var ka=T.getUint8(X);X+=20;ka>0&&(X+=4+16*T.getUint32(X));T=yb(T,X+4);T=$l(T);S.licenseServerUri=T}if(I.version>0)for(T=I.reader.R(),X=0;X<T;X++)ka=I.reader.wa(16,!1),S.keyIds.add(Rb(ka));B.set(R,S)}}).parse(Q,!0,!0);if(!g.length&&!h.length&&!k.length)return null;C=N.values().next().value;Q=l&&!m;if(m&&!c&&b&&!U.size){c=new Rc("video/mp4");a&&c.init(a);try{Vc(c,b);for(var O=t(c.h.getStreams()),V=O.next();!V.done;V=O.next()){var ea=
V.value;U.set(ea,ea)}}catch(I){}c.h.clear()}a=g.concat(h).concat(k);D==="cbcs"&&F&&!B.has("com.apple.fps")&&B.set("com.apple.fps",uc("com.apple.fps",D,null));b=t(B.values());for(O=b.next();!O.done;O=b.next())O=O.value,D&&(O.encryptionScheme=D),F&&O.keyIds.add(F);b="video";O="video/mp4";n?(b="text",O="application/mp4"):Q&&(b="audio",O="audio/mp4");if(b==="video"&&C!=null&&J.length){Q=C;V=0;ea=t(J);for(c=ea.next();!c.done;c=ea.next()){var ha=void 0;V+=(ha=c.value.tc)!=null?ha:G}V>0&&(z=Q*J.length/V)}return{type:b,
mimeType:O,codecs:Vm(a).join(", "),language:p,height:u,width:q,channelCount:v,sampleRate:w,closedCaptions:U,videoRange:x,colorGamut:y,frameRate:z,timescale:C,drmInfos:Array.from(B.values())}}function Vm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ce(d);b.has(e)||(c.push(d),b.add(e))}b=Ac("audio",c);d=Ac("video",c);a=Ac(zc,c);d=Wm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Wm(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?Pm('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Xm(a){var b=null;(new jh).ma([].concat(wa(uh),["sinf","schi"]),oh).P("stsd",qh).box("encv",rh).box("enca",sh).P("tenc",function(c){b=Nh(c.reader,c.version).defaultKID}).parse(a,!0);return b}
function Ym(a,b,c){var d,e,f,g,h,k,l,m,n;return H(function(p){if(p.i==1)return d=b,d.cryptoKey?p.A(2):p.h(d.fetchKey(),3);if(b.blockCipherMode=="GCM"&&b.bitsKey==256){e=yb(a);if(e.byteLength<32)throw new L(2,4,4060);f=e.slice(0,16);g=e.slice(16);h={name:"AES-GCM",iv:f,tagLength:128};return p.return(window.crypto.subtle.decrypt(h,d.cryptoKey,g))}k=d.iv;if(!k)for(k=yb(new ArrayBuffer(16)),l=d.firstMediaSequenceNumber+c,m=k.byteLength-1;m>=0;m--)k[m]=l%256,l=Math.floor(l/256);b.blockCipherMode=="CBC"?
n={name:"AES-CBC",iv:k}:n={name:"AES-CTR",counter:k,length:64};return p.return(window.crypto.subtle.decrypt(n,d.cryptoKey,a))})};function Zm(){}function $m(a,b){try{var c=an(a);return vk({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return tk(d)}}
function an(a){if(!a.startsWith("data:"))throw new L(2,1,1004,a);var b=a.substring(5),c=b.indexOf(",");if(c<0)throw new L(2,1,1004,a);a=b.substring(0,c);b=decodeURIComponent(b.substring(c+1));c=a.split(";");a=c[0];var d=!1;c.length>1&&c[c.length-1].toLowerCase()=="base64"&&(d=!0,c.pop());var e;d?e=Pb(b):e=Jb(b);return{data:e,contentType:a,hh:c}}K("shaka.net.DataUriPlugin",Zm);Zm.parse=$m;Kk("data",$m);function bn(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.i){case 1:var m;if(d=(m=cn.get(dn(a)))!=null?m:"")return l.return(d);e=0;f=Ok([a],c);l.o(2);f.method="HEAD";return l.h(b.request(e,f).promise,4);case 4:g=l.j;d=g.headers["content-type"];l.u(3);break;case 2:h=l.m();if(!h||h.code!=1002&&h.code!=1001){l.A(3);break}f.method="GET";return l.h(b.request(e,f).promise,6);case 6:k=l.j,d=k.headers["content-type"];case 3:return l.return(d?d.toLowerCase().split(";").shift():"")}})}
function dn(a){for(var b=a.length,c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d===63||d===35){b=c;break}}for(c=b-1;c>=0;c--){d=a.charCodeAt(c);if(d===46){if(c+1<b)return a.slice(c+1,b).toLowerCase();break}if(d===47)break}return""}function en(a,b,c,d,e){a=Ok(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a}
var cn=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("cmfv","video/mp4").set("cmfa","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("opus","audio/opus").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac",
"audio/flac").set("wav","audio/wav").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").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 fn(a){this.u=null;this.C=a;this.H=new zk;this.m=[];this.j=null;this.l=[];this.D=null;this.G=[];this.F=300;this.o=new Map;this.i=new Map;this.h=null;this.B="UNKNOWN"}fn.prototype.configure=function(a){this.u=a};fn.prototype.destroy=function(){this.C=this.u=null;this.m=[];this.j=null;this.l=[];this.G=[];this.o.clear();this.h!=null&&(this.h.stop(),this.h=null);return this.H.destroy()};fn.prototype.setManifestType=function(a){this.B=a};
function gn(a,b){var c,d,e,f,g,h,k;return H(function(l){if(l.i==1)return c=Bk(a.m,[hn(a,b)]),d=Ok(c,a.u.retryParameters),e=a.C.networkingEngine.request(8,d),Ak(a.H,e),l.o(2),l.h(e.promise,4);if(l.i!=2)return f=l.j,g=Fb(f.data),h=JSON.parse(g),h.VERSION==1&&jn(a,h,f.uri),l.u(0);if((k=l.m())&&k.code==7001)return l.return();a.h!=null&&(a.h.stop(),a.h=null);a.h=new $e(function(){gn(a,b)});a.h.ea(a.F);l.l()})}
function hn(a,b){if(!a.l.length)return b;var c=new Map,d=a.D||a.l[0],e=Math.round(a.C.getBandwidthEstimate()),f=Number.isFinite(e);a.B=="DASH"?(c.set("_DASH_pathway",d),f&&c.set("_DASH_throughput",String(e))):a.B=="HLS"&&(c.set("_HLS_pathway",d),f&&c.set("_HLS_throughput",String(e)));return Ik(b,c)}function jn(a,b,c){a.h!=null&&(a.h.stop(),a.h=null);var d=b["RELOAD-URI"]||c;a.h=new $e(function(){gn(a,d)});if(c=b.TTL)a.F=c;a.h.ea(a.F);a.l=b["PATHWAY-PRIORITY"]||[];a.G=b["PATHWAY-CLONES"]||[]}
function kn(a,b,c,d){var e=a.o.get(b);e||(e=new Map);e.set(c,d);a.o.set(b,e)}fn.prototype.banLocation=function(a){this.i.set(a,Date.now()+6E4)};
function ln(a,b){var c=c===void 0?!1:c;b=a.o.get(b)||new Map;for(var d=[],e=t(a.l),f=e.next(),g={};!f.done;g={gd:void 0},f=e.next())if(g.gd=f.value,f=b.get(g.gd))d.push({Gg:g.gd,location:f});else if(f=a.G.find(function(k){return function(l){return l.Vl==k.gd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Zi?(f=Fk(h,f["URI-REPLACEMENT"].Zi),d.push({Gg:g.gd,location:f})):d.push({Gg:g.gd,location:h}))}e=Date.now();g=t(a.i.keys());for(f=g.next();!f.done;f=g.next())f=f.value,h=a.i.get(f),e>
h&&a.i.delete(f);d=d.filter(function(k){k=Ek(k.location);for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes(k))return!1;return!0});d.length&&(a.D=d[0].Gg);d=d.map(function(k){return k.location});if(!d.length&&a.j)for(e=t(a.j.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.D=a.j,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Bk(a.m,d)};function mn(a){if(a.tagName.split(":").pop()=="Binary")return a=Cd(a),a=(a||"").replace(/\s/g,""),!a||a.length%4||!/^[A-Za-z0-9+/]+={0,2}$/.test(a)?null:Pb(a);a=t(a.children);for(var b=a.next();!b.done;b=a.next())if(b=b.value,typeof b!="string"&&(b=mn(b)))return b;return null}function nn(a){return a&&/^0[xX](?:[0-9a-fA-F]{2})+$/.test(a)?Qb(a.substring(2)):null}var on=["urn:scte:scte35:2013:xml","urn:scte:scte35:2014:xml+bin","urn:scte:scte35:2013:xml+bin","urn:scte:scte35:2013:bin"];function pn(){var a=this;this.h=this.j=null;this.G=1;this.O=new Map;this.T=new Map;this.u=new Map;this.u.set("video",new Map);this.u.set("audio",new Map);this.u.set(zc,new Map);this.u.set("image",new Map);this.Nb=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return qn(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){return rn(a,b)}).set("com.microsoft.playready",function(b){var c=dm(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";
c=="SAMPLE-AES"&&(d="cbcs");b=dm(b,"URI");c=an(b.split("?")[0]);b=yb(c.data);var e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),f=b.length,g=12+e.length+4+f,h=new Uint8Array(g),k=Bb(h),l=0;k.setUint32(l,g);l+=4;k.setUint32(l,1886614376);l+=4;k.setUint32(l,0);l+=4;h.set(e,l);l+=e.length;k.setUint32(l,f);h.set(b,l+4);d=uc("com.microsoft.playready",d,[{initDataType:"cenc",initData:h}],void 0,c.hh);if(b=rd(["<PLAYREADY>",Ob(b),"</PLAYREADY>"].join("\n")))b=Pb(Cd(b)),b=$l(b),
d.licenseServerUri=b;d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){return sn(a,b)});this.$a=new Set;this.m=new Map;this.l=null;this.F="";this.Ma=new pm;this.I=-1;this.sa=Infinity;this.Ya=new WeakMap;this.N=this.$b=this.Aa=!1;this.D=new $e(function(){if(a.ba&&!a.h.continueLoadingWhenPaused&&(a.$.qb(a.ba,"timeupdate"),a.ba.paused)){a.$.Ra(a.ba,"timeupdate",function(){return tn(a)});return}tn(a)});this.Pa=un;this.i=null;this.Oa=
0;this.C=Infinity;this.Ob=null;this.Ga=this.Ca=this.Y=0;this.ia=new zk;this.H=new Map;this.K=new Map;this.Zb=new Map;this.eb=new Map;this.na=new Map;this.L=new Map;this.Db=new Map;this.va=new Map;this.Yb=this.ra=!1;this.fb=new Ra(5);this.o=null;this.V=!0;this.$=new ib;this.B=this.ba=null;this.Eb=function(){return!1};this.Qa=new Map;this.M=[];this.Da=new Map}r=pn.prototype;
r.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.h.updatePeriod&&a.updatePeriod>=0;this.h=a;b&&(this.Eb=b);this.o&&this.o.configure(this.h);c&&this.i&&this.i.presentationTimeline.oa()&&this.D.hb()};r.start=function(a,b){var c=this,d;return H(function(e){return e.i==1?(c.j=b,c.ra=b.isLowLatencyMode(),e.h(vn(c,[a]).promise,2)):e.i!=3?(d=e.j,c.F=d.uri,e.h(wn(c,d.data),3)):e.return(c.i)})};
r.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.ia&&(a.push(this.ia.destroy()),this.ia=null);this.h=this.j=null;this.$a.clear();this.i=null;this.m.clear();this.T.clear();this.K.clear();this.O.clear();this.Zb.clear();this.eb.clear();this.na.clear();for(var b=t(this.L.values()),c=b.next();!c.done;c=b.next())c.value.Lc.stop();this.L.clear();this.Db.clear();this.va.clear();this.Qa.clear();this.o&&this.o.destroy();this.$&&(this.$.release(),this.$=null);return Promise.all(a)};
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p,u,q,v;return H(function(w){if(w.i==1){if(!xn(a))return w.return();b=[];c=Array.from(a.m.values());d=c.filter(function(x){return!x.stream.isAudioMuxedInVideo&&x.stream.segmentIndex});if(d.length===0)return w.return();a.C=Infinity;a.i.gapCount=0;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(yn(a,g));b.push(zn(a));return w.h(Promise.all(b),2)}h=Array.from(a.Da.values());k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.i.chapterStreams.includes(m)||
a.i.chapterStreams.push(m);An(a,d.map(function(x){return x.stream}));n=d.some(function(x){return x.Id==0});d.length&&!n&&(Bn(a,un),Cn(a));n&&Cn(a);p=a.l.getDuration();n&&!Dn(a)&&p!=a.Ob&&(a.Ob=p,a.j.updateDuration());u=t(d);for(q=u.next();!q.done;q=u.next())v=q.value,v.stream.isAudioMuxedInVideo||!v.stream.segmentIndex||Hf(v.stream.segmentIndex)||a.j.disableStream(v.stream);w.l()})};function Wn(a,b){return Dn(a)?a.u.get(b.type):b.Te}
function yn(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea,ha,I,T,R;return H(function(S){switch(S.i){case 1:if(b.stream.isAudioMuxedInVideo)return S.return();c=[];d=t(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Map,b.se&&(b.Bb>=0&&g.set("_HLS_msn",String(b.Bb)),b.Cb>=0&&g.set("_HLS_part",String(b.Cb))),b.ue?g.set("_HLS_skip","v2"):b.ve&&g.set("_HLS_skip","YES"),c.push(Ik(f,g));S.o(2);return S.h(vn(a,c,!0).promise,4);case 4:h=S.j;S.u(3);break;case 2:throw k=
S.m(),a.j&&a.j.disableStream(b.stream),k;case 3:if(!b.stream.segmentIndex)return S.return();l=qm(a.Ma,h.data);if(l.type!=1)throw new L(2,4,4017);m=h.uri;Xn(b,h);n=gm(l.W,"EXT-X-DEFINE");p=Yn(a,n,m);u=b.stream;q=Wn(a,b);return S.h(Zn(a,l,u.mimeType,b.S,p),5);case 5:v=S.j;w=v.keyIds;x=v.drmInfos;y=v.encrypted;z=v.wh;$n(a,l,u.id,b.S,p);u.encrypted||!y||z||(u.encrypted=!0);C=function(X,ka){return X.size===ka.size&&[].concat(wa(X)).every(function(na){return ka.has(na)})};C(u.keyIds,w)||(u.keyIds=w,u.drmInfos=
x,a.j.newDrmInfo(u));B=h.uri!==h.originalUri;A=ao(a,l,q,p,b.S,b.type,B,u.segmentIndex);D=A.segments;F=A.yl;E=A.bandwidth;bo(D,u.mimeType);E&&(u.bandwidth=E);G=Im(u);J=t(D);for(N=J.next();!N.done;N=J.next())P=N.value,P.initSegmentReference&&(P.initSegmentReference.bd=G);U=jm(l.W,"EXT-X-MEDIA-SEQUENCE",0);Q=q.get(U);D.length&&(M=Q!=null?Q:a.l.Hd(),u.segmentIndex.Pd(D,M));F&&(V=(O=im(l.W,"EXT-X-SKIP"))?Number(Y(O,"SKIPPED-SEGMENTS")):0,ea=co(U,D,F),ha=ea.Bb,I=ea.Cb,b.Bb=ha+V,b.Cb=I,u.segmentIndex.zb(Q));
eo(a,u,b.type);if(T=Hf(u.segmentIndex))b.Ec=T.startTime,D.length&&(b.mc=D[D.length-1].endTime);if(R=im(l.W,"EXT-X-ENDLIST"))b.Id=!0;fo(a,l);go(a,l.W,u.type,p,b.S);S.l()}})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.o&&this.o.banLocation(a)};r.setMediaElement=function(a){this.ba=a};
function ho(a,b,c){c=c===void 0?!1:c;for(var d=a.I==-1,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Wn(a,f);if(g=Hf(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.I=Math.max(a.I,l));f.Mf=l;break}}}}if(!(a.I<0))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,io(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.I-d.Mf,f>0&&(e.h.splice(0,f),e=Hf(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
jo(a,d,e)}
function ko(a,b){if(a.sa==Infinity){b=t(b);for(var c=b.next();!c.done;c=b.next())c=Hf(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.sa=Math.min(a.sa,c.h))}b=a.sa;if(b!=Infinity){c=t(a.m.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!io(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=Hf(e);if(f)if(f.h==null)Va("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(jo(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.bh(b)}}}}
function jo(a,b,c){if(!(Math.abs(c)<.001)){b.Ec+=c;b.mc+=c;a=Wn(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}}
function wn(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O;return H(function(V){switch(V.i){case 1:c=Bc;d=qm(a.Ma,b);e=gm(d.W,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Am(null,0);a.l.jf(!0);k=function(){return[a.F]};l=null;m=new Map;a.i={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,chapterStreams:[],offlineSessionIds:[],sequenceMode:a.h.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.h.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,
nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.B};if(d.type==1)return a.V=!1,B=gm(d.W,"EXT-X-DEFINE"),m=Yn(a,B,a.F),l=c.qa,A="",D=new Map,F=a.F,V.h(lo(a,a.G++,m,d,k,"",l,A,!0,"Media Playlist",null,D,null,!1,null,!1,"",F),7);mo(a,e,a.O,a.F);n=gm(d.W,"EXT-X-MEDIA");p=gm(d.W,"EXT-X-STREAM-INF");u=gm(d.W,"EXT-X-IMAGE-STREAM-INF");q=gm(d.W,"EXT-X-I-FRAME-STREAM-INF");v=gm(d.W,"EXT-X-SESSION-KEY");w=gm(d.W,"EXT-X-SESSION-DATA");x=gm(d.W,"EXT-X-CONTENT-STEERING");a.M=no(a,w);a.h.hls.chaptersUri&&
!a.M.includes(a.h.hls.chaptersUri)&&a.M.push(a.h.hls.chaptersUri);return V.h(oo(a,x),4);case 4:return a.h.ignoreSupplementalCodecs||(p.push.apply(p,wa(po(p,!0))),q.push.apply(q,wa(po(q,!1)))),qo(a,p),ro(a,n),y=so(a,q),V.h(to(a,p,v,n,k,a.O,y),5);case 5:return f=V.j,g=uo(a,n),z=t,V.h(Promise.all([vo(a,u,q),zn(a)]),6);case 6:C=z(V.j);h=C.next().value;V.A(3);break;case 7:return E=V.j,$n(a,d,E.stream.id,k,m),a.m.set(a.F,E),E.stream&&(G=Im(E.stream),E.stream.segmentIndex.Sb(function(ea){ea.initSegmentReference&&
(ea.initSegmentReference.bd=G)})),l=E.stream.type,J=!0,a.h.disableAudio&&E.type=="audio"?J=!1:a.h.disableVideo&&E.type=="video"&&!E.stream.codecs.includes(",")&&(J=!1),J&&f.push({id:0,language:mc(A||"und"),disabledUntilTime:0,primary:!0,audio:E.type=="audio"?E.stream:null,video:E.type=="video"?E.stream:null,bandwidth:E.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}),a.h.hls.chaptersUri&&!a.M.includes(a.h.hls.chaptersUri)&&a.M.push(a.h.hls.chaptersUri),V.h(zn(a),
3);case 3:if(!a.j)throw new L(2,7,7001);wo(a,d);if(d.type!=1){V.A(9);break}xn(a)&&(xo(a,d),N=a.C,a.D.ea(N));P=Array.from(a.m.values());yo(a,P);Cn(a);return V.h(go(a,d.W,l,m,k),9);case 9:a.i.variants=f;a.i.textStreams=g;a.i.imageStreams=h;a.i.chapterStreams=Array.from(a.Da.values());a.i.startTime=a.B;zo(a);if(a.N||!a.h.hls.disableCodecGuessing){V.A(11);break}U=[];Q=t(a.i.variants);for(M=Q.next();!M.done;M=Q.next())O=M.value,O.audio&&O.audio.codecs===""&&U.push(O.audio.createSegmentIndex()),O.video&&
O.video.codecs===""&&U.push(O.video.createSegmentIndex());return V.h(Promise.all(U),11);case 11:a.j.makeTextStreamsForClosedCaptions(a.i),V.l()}})}
function zo(a){if(!a.H.size){for(var b=new Map,c=t(a.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.video&&d.video.closedCaptions){d=t(d.video.closedCaptions);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;b.set(e,f)}}if(b.size)for(a=t(a.i.variants),c=a.next();!c.done;c=a.next())c=c.value,c.video&&!c.video.closedCaptions&&(c.video.closedCaptions=new Map(b))}}
function Ao(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A;return H(function(D){switch(D.i){case 1:d=Sm(a.h.hls.mediaPlaylistFullMimeType);if(!b.length)return D.return(d);e=Bo(a,b);f=e.segment;g=e.segmentIndex;h=f.S();if(k=dn(h[0]))if(l=Co.get(k))return D.return(Sm(l));return D.h(Promise.all([Do(a,f.initSegmentReference,0),Do(a,f,g)]),2);case 2:m=D.j;n=m[1].mimeType;p=m[0].data;u=m[1].data;q="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];
w=f.initSegmentReference||v.includes(n);if(x=!w&&Pi(yb(u))){var F=u,E=a.h.disableAudio,G=a.h.disableVideo,J=a.h.disableText;var N=yb(F);var P=(new Ci).parse(N),U=P.Ed();N=P.Rh();var Q=[],M=!1,O=!1;if(!E)switch(U.audio){case "aac":case "aac-loas":P.kb().length&&(Q.push("mp4a.40.2"),M=!0);break;case "mp3":P.kb().length&&(Q.push("mp4a.40.34"),M=!0);break;case "ac3":P.kb().length&&(Q.push("ac-3"),M=!0);break;case "ec3":P.kb().length&&(Q.push("ec-3"),M=!0);break;case "opus":P.kb().length&&(Q.push("opus"),
M=!0)}if(!G)switch(U.video){case "avc":N.codec?Q.push(N.codec):Q.push("avc1.42E01E");O=!0;break;case "hvc":N.codec?Q.push(N.codec):Q.push("hvc1.1.6.L93.90");O=!0;break;case "av1":N.codec?Q.push(N.codec):Q.push("av01.0.01M.08"),O=!0}if(Q.length){E=M&&!O;G=new Map;if(O&&!J){J=new Rc("video/mp2t");Vc(J,F);F=t(J.h.getStreams());for(O=F.next();!O.done;O=F.next())O=O.value,G.set(O,O);J.h.clear()}N={type:E?"audio":"video",mimeType:"video/mp2t",codecs:Q.join(", "),language:null,height:N.height,width:N.width,
channelCount:null,sampleRate:null,closedCaptions:G,videoRange:null,colorGamut:null,frameRate:N.frameRate,timescale:null,drmInfos:[]}}else N=null;if(y=N)return D.return(y);D.A(3);break}if(!w&&!q.includes(k)){D.A(3);break}z=Um(p,u,a.h.disableText);if(!z){D.A(3);break}if(!c||z.closedCaptions.size){D.A(6);break}C=Eo(a,b,g);return D.h(Fo(a,C,f.initSegmentReference,p),7);case 7:if(B=D.j)z.closedCaptions=B;case 6:return D.return(z);case 3:return w||x||!(A=Tm(u))?n?D.return(Sm(n)):D.return(d):D.return(Sm(A))}})}
function Fo(a,b,c,d){var e,f,g,h;return H(function(k){switch(k.i){case 1:e=b.shift();if(!e)return k.return(null);if(e.segment.initSegmentReference==c){k.A(2);break}c=e.segment.initSegmentReference;return k.h(Do(a,c,0),3);case 3:f=k.j,d=f.data;case 2:return k.h(Do(a,e.segment,e.segmentIndex),4);case 4:return g=k.j,(h=Um(d,g.data,a.h.disableText))&&h.closedCaptions.size?k.return(h.closedCaptions):k.return(Fo(a,b,c,d))}})}
function Eo(a,b,c){var d=b.length-1;d=Dn(a)?[Math.trunc(d*3/4),Math.trunc(d/4)]:[Math.trunc(d/2),d];a=[];b=b.map(function(g,h){return{segment:g,segmentIndex:h}}).filter(function(g){return g.segmentIndex!=c&&g.segment.Kb()!=2});d=t(d);for(var e=d.next(),f={};!e.done;f={Df:void 0},e=d.next())f.Df=e.value,b.length&&(b.sort(function(g){return function(h,k){return Math.abs(h.segmentIndex-g.Df)-Math.abs(k.segmentIndex-g.Df)}}(f)),a.push(b.shift()));return a}
function Do(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.i){case 1:if(!b)return l.return({mimeType:null,data:null});d=Uk;e=en(b.S(),b.kc(),b.hc(),a.j.getStreamingRetryParameters());f=b instanceof wm?1:0;return l.h(Go(a,e,d,{type:f}).promise,2);case 2:g=l.j;h=g.data;if(!b.aesKey){l.A(3);break}return l.h(Ym(h,b.aesKey,c),4);case 4:h=l.j;case 3:return b instanceof wm?b.Wd(h,!0):b.Wd(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function Cn(a){if(Dn(a)){for(var b=Infinity,c=Infinity,d=t(a.m.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.mc),c=Math.min(c,e.Ec));b=b-c||0;isNaN(a.h.availabilityWindowOverride)||(b=a.h.availabilityWindowOverride);a.l.Ji(b)}else a.l.uc(Ho(a));if(!a.l.B)for(b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=Hf(c.stream.segmentIndex))&&
c.h!=null&&a.l.Fi(c.h);a.l.ai()}function Yn(a,b,c){var d=new Map;mo(a,b,d,c,!0);return d}function mo(a,b,c,d,e){e=e===void 0?!1:e;b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=Y(f,"NAME"),h=Y(f,"VALUE"),k=Y(f,"QUERYPARAM");g&&h&&c.getOrInsert(g,h);if(k){if(!l)var l=(new URL(d)).searchParams;(g=l.get(k))&&!c.has(g)&&c.set(k,g)}e&&(f=Y(f,"IMPORT"))&&(k=a.O.get(f))&&c.set(f,k)}}
function Xn(a,b){var c=a.S(),d=b.uri;if(d==b.originalUri){d=(b=b.originalRequest)?b.uris.indexOf(d):-1;if(d<=0||d>=c.length)return;d=c[d]}else if(c.includes(d))return;db(a.bf,d);a.bf.unshift(d)}function Io(a,b){var c={};b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d=d.value,f=!a.o,g=(new Set).add("URI");f||g.add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID");e=e.toString(g);c[e]?c[e].push(d):c[e]=[d]}return c}
function po(a,b){var c=[];a=t(a);for(var d=a.next(),e={};!d.done;e={ah:void 0},d=a.next())d=d.value,e.ah=om(d),e.ah&&(e=d.attributes.map(function(f){return function(g){var h=g.name,k=g.value;h=="CODECS"&&(k=f.ah,b&&(g=g.value.split(","),g.length>1&&(g=xc("audio",g))&&(k+=","+g)));return new fm(h,k)}}(e)),c.push(new bm(d.id,d.name,e,null)));return c}
function qo(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"AUDIO");c=Y(d,"VIDEO");var f=Y(d,"SUBTITLES");d=Jo(a,d);if(f){var g=xc(zc,d);a.K.set(f,g);db(d,g)}e&&(f=xc("audio",d),f||(f=a.h.hls.defaultAudioCodec),a.K.set(e,f));c&&(e=xc("video",d),e||(e=a.h.hls.defaultVideoCodec),a.K.set(c,e))}}
function no(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"DATA-ID");var f=Y(e,"URI"),g=Y(e,"LANGUAGE");e=Y(e,"VALUE");var h=(new Map).set("id",d);f&&h.set("uri",km([a.F],f,a.O)[0]);g&&h.set("language",g);e&&h.set("value",e);d=="com.apple.hls.chapters"&&f&&c.push(h.get("uri"));d=new xk("sessiondata",h);if(a.j)a.j.onEvent(d)}return c}
function oo(a,b){var c,d,e,f,g,h;return H(function(k){if(!a.j||!a.h)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Y(f,"PATHWAY-ID"),h=Y(f,"SERVER-URI"),g&&h){a.o=new fn(a.j);a.o.configure(a.h);a.o.m=[a.F];a.o.setManifestType("HLS");a.o.j=g;c=gn(a.o,h);break}return k.h(c,0)})}
function uo(a,b){var c=hm(b,"SUBTITLES"),d=Io(a,c);b=[];if(!a.h.disableText)for(var e in d)try{b.push(Ko(a,d[e],new Map).stream)}catch(g){if(!a.h.hls.ignoreTextStreamFailures)throw g;}e=t(c);for(c=e.next();!c.done;c=e.next())if(d=dm(c.value,"GROUP-ID"),c=a.K.get(d))if(d=a.T.get(d)){d=t(d);for(var f=d.next();!f.done;f=d.next())f=f.value,f.stream.codecs=c,f.stream.mimeType=Lo(zc,c)||Mo(zc),No(f.stream)}return b.filter(function(g){return g})}
function No(a){var b=new Set([se(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Sb(function(c){c.mimeType&&b.add(se(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function vo(a,b,c){var d,e;return H(function(f){if(f.i==1)return d=b.map(function(g){var h,k,l;return H(function(m){if(m.i==1){if(h=a.h.disableThumbnails)return m.return(null);m.o(2);return m.h(Oo(a,g),4)}if(m.i!=2)return k=m.j,m.return(k.stream);l=m.m();if(a.h.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.h.disableThumbnails)return null;try{var h=Po(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.h.hls.ignoreImageStreamFailures)return null;
throw k;}})),f.h(Promise.all(d),2);e=f.j;return f.return(e.filter(function(g){return g}))})}function zn(a){var b,c,d,e;return H(function(f){if(a.h.disableChapters)return f.return();b=[];c=t(a.M);for(d=c.next();!d.done;d=c.next())e=d.value,b.push(Qo(a,e));return f.h(Promise.all(b),0)})}
function Qo(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B;return H(function(A){if(A.i==1)return c=Ok([b],a.h.retryParameters),A.h(Go(a,c,10).promise,2);d=A.j;e=Fb(d.data);f=JSON.parse(e);g=new Map;for(h=0;h<f.length;h++)if(k=f[h],k.titles){l=[];if(k.images)for(m=t(k.images),n=m.next();!n.done;n=m.next())if(p=n.value,p.url)for(u=km([d.uri],p.url),q=t(u),v=q.next();!v.done;v=q.next())w=v.value,x={type:p["image-category"],width:p["pixel-width"],height:p["pixel-height"],url:w},l.push(x);y=t(k.titles);
for(z=y.next();!z.done;z=y.next())C=z.value,B={id:"",title:C.title,startTime:k["start-time"],endTime:k["start-time"],images:l},k.duration?B.endTime+=k.duration:h+1<f.length&&(B.endTime=f[h+1]["start-time"]),g.getOrInsertComputed(C.language,function(){return[]}).push(B)}g.forEach(function(D,F){var E=[];D=t(D);for(var G=D.next();!G.done;G=D.next()){G=G.value;var J=new wm(G.startTime,G.endTime,function(){return[]},0,null,null,0,0,Infinity);J.Wg({title:G.title,images:G.images});E.push(J)}D=a.Da.getOrInsertComputed(F,
function(){return Wf({id:a.G++,mimeType:"text/plain",kind:"",language:F,originalLanguage:F,type:"chapter",external:!0})});D.segmentIndex?D.segmentIndex.Pd(E,a.l.Hd()):D.segmentIndex=new Jm(E)});A.l()})}function Ro(a,b,c){b=b.filter(function(e){var f=Y(e,"URI")||"";e=Y(e,"TYPE");return e!="SUBTITLES"&&(f!=""||e=="AUDIO"||e=="VIDEO")});b=Io(a,b);for(var d in b)Ko(a,b[d],c,!1)}
function so(a,b){return b.map(function(c){c=Po(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function to(a,b,c,d,e,f,g){var h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea;return H(function(ha){switch(ha.i){case 1:h=[];k=new Set;if(a.h.ignoreDrmInfo||!(c.length>0)){ha.A(2);break}l=t(c);m=l.next();case 3:if(m.done){ha.A(2);break}n=m.value;p=dm(n,"METHOD");u=Y(n,"KEYFORMAT")||"identity";q=null;if(p=="NONE"){ha.A(4);break}if(So(p)){v=km(e(),dm(n,"URI"),f);To(a,v);ha.A(4);break}if(u=="identity")return ha.h(Uo(a,n,"",e,null,f),12);w=a.Nb.get(u);if(!w){x=null;ha.A(10);break}return ha.h(w(n,
"",null),11);case 11:x=ha.j;case 10:q=x;ha.A(6);break;case 12:q=ha.j;case 6:if(q){if(q.keyIds)for(y=t(q.keyIds),z=y.next();!z.done;z=y.next())C=z.value,k.add(C);h.push(q)}case 4:m=l.next();ha.A(3);break;case 2:B=Io(a,b);A=[];for(D in B)F=B[D],E=F[0],G=Vo(E),J=Number(dm(E,"BANDWIDTH"))||Number(Y(E,"AVERAGE-BANDWIDTH")),N=Y(E,"RESOLUTION"),P=t(N?N.split("x"):[null,null]),U=P.next().value,Q=P.next().value,M=Y(E,"VIDEO-RANGE"),(O=Y(E,"REQ-VIDEO-LAYOUT"))&&O.includes(",")&&(V=O.split(",").filter(function(I){return I==
"CH-STEREO"||I=="CH-MONO"}),O=V[0]),O=O||"CH-MONO",ea=Wo(a,F,d),A.push.apply(A,wa(Xo(a,ea.audio,ea.video,J,U,Q,G,M,O,h,k,g)));return ha.return(A.filter(function(I){return I!=null}))}})}
function Wo(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=new Set,g=new Set,h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=Y(l,"AUDIO");var m=Y(l,"VIDEO");if(k||m)l=Y(l,"PATHWAY-ID"),k&&!f.has(k)&&(f.add(k),l&&e.set(k,l)),m&&!g.has(m)&&(g.add(m),l&&e.set(m,l))}var n=[].concat(wa(f),wa(g));n.length&&c.length&&(c=c.filter(function(u){return n.includes(dm(u,"GROUP-ID"))}),Ro(a,c,e));d.audio.push.apply(d.audio,wa(Yo(a,f)));d.video.push.apply(d.video,wa(Yo(a,g)));e=d.video.find(function(u){return u.stream.isAudioMuxedInVideo});
f=!1;var p=b.map(function(u){return dm(u,"URI")});m=d.audio.find(function(u){return u&&u.S().find(function(q){return p.includes(q)})});g=Jo(a,b[0]);c=xc("video",g);h=xc("audio",g);k=om(b[0]);e?(e="video",h&&c&&!d.audio.length&&(g=[[c,h].join()])):h&&!c?(e="audio",f=d.audio.length>0&&!d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&h&&c?(e="video",g=[[c,h].join()]):d.audio.length&&m?(e="audio",f=!0):e=d.video.length&&!d.audio.length?"audio":"video";
f||(a=Zo(a,b,g,e,k),b=a.stream,f=e=="audio"?d.audio:d.video,g=f.find(function(u){return u.stream.isAudioMuxedInVideo}),b.type==e&&g?(e=g.stream,b.language=e.language,b.originalLanguage=e.originalLanguage,b.label=e.label,b.channelsCount=e.channelsCount,b.audioSamplingRate=e.audioSamplingRate,b.originalId=e.originalId,b.primary=e.primary,b.roles=e.roles,f.splice(f.indexOf(g),1,a)):(b.type=="audio"?d.audio:d.video).push(a));d.video=d.video.filter(function(u){return!u.stream.isAudioMuxedInVideo});return d}
function Yo(a,b){if(!b.size)return[];b=[].concat(wa(b)).sort().join(",");return a.T.get(b)||[]}function Jo(a,b){b=Y(b,"CODECS")||"";a.N=b.length>0;a.N||a.h.hls.disableCodecGuessing||(b=[],a.h.disableVideo||b.push(a.h.hls.defaultVideoCodec),a.h.disableAudio||b.push(a.h.hls.defaultAudioCodec),b=b.join(","));return Vm(b.split(/\s*,\s*/))}function $o(a){return(a=Y(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function ap(a){return(a=Y(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function Vo(a){return(a=Y(a,"FRAME-RATE"))?parseFloat(a):null}function bp(a){a=Y(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")||a[1].includes("IMSA")}function cp(a){a=dm(a,"TYPE").toLowerCase();a=="subtitles"&&(a=zc);return a}
function Xo(a,b,c,d,e,f,g,h,k,l,m,n){for(var p=t(c),u=p.next();!u.done;u=p.next())dp(u.value.stream,e,f,g,h,k,null);e=a.h.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(x){return!x.stream.isAudioMuxedInVideo}));e=a.h.disableAudio;if(!b.length||e)b=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m,a.h.disableIFrames||Vf(k,n);k&&
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);p=f?f.stream.drmInfos:null;u=q?q.stream.drmInfos:null;q=q?q.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);q=[q,v,w.sort()].join("-");h&&k&&!Wb(p,u)||a.$a.has(q)||(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.$a.add(q))}return e}
function ro(a,b){b=hm(b,"CLOSED-CAPTIONS");a.V=b.length==0;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"LANGUAGE");c=mc(e||"und");e||(e=Y(d,"NAME"))&&(c=e);e=dm(d,"GROUP-ID");d=dm(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
function Ko(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next(),l={};!k.done;l={nd:void 0},k=h.next()){l.nd=k.value;k=function(x){return function(){return"shaka://hls-muxed"+x.nd.id}}(l);var m=d?dm(l.nd,"URI"):Y(l.nd,"URI")||k();k=dm(l.nd,"GROUP-ID");e.push(m);f.push(k);g.set(k,m);(l=Y(l.nd,"PATHWAY-ID"))&&c.set(k,l)}d=f.sort().join(",");l=b[0];b="";h=cp(l);h==zc&&(b=Y(l,"CODECS")||"");if(!b)for(f=t(f),k=f.next();!k.done;k=f.next())if(k=k.value,a.K.has(k)){b=a.K.get(k);break}k=
om(l);f=m=e.sort().join(",");h=="audio"&&d&&(f+=d);if(a.m.has(f))return a.m.get(f);var n=a.G++;if(a.o){g=t(g);for(var p=g.next();!p.done;p=g.next()){var u=t(p.value);p=u.next().value;u=u.next().value;(p=c.get(p))&&kn(a.o,n,p,u)}}c=Y(l,"LANGUAGE");g=Y(l,"NAME");p=Y(l,"DEFAULT")=="YES";u=h=="audio"?$o(l):null;var q=h=="audio"?bp(l):!1,v=Y(l,"CHARACTERISTICS"),w=Y(l,"FORCED")=="YES";l=h=="audio"?ap(l):null;e=ep(a,n,e,b,h,c,p,g,u,null,v,w,l,q,k,m);a.T.has(d)?a.T.get(d).push(e):a.T.set(d,[e]);a.m.set(f,
e);return e}
function Oo(a,b){var c,d,e,f,g,h,k,l,m,n,p,u;return H(function(q){if(q.i==1){c=dm(b,"URI");d=Y(b,"CODECS","jpeg")||"";e=om(b);if(a.m.has(c))return q.return(a.m.get(c));f=Y(b,"LANGUAGE");g=Y(b,"NAME");h=Y(b,"CHARACTERISTICS");k=c;l=ep(a,a.G++,[c],d,"image",f,!1,g,null,null,h,!1,null,!1,e,k);return(m=Y(b,"RESOLUTION"))?q.h(l.stream.createSegmentIndex(),3):q.A(2)}if(q.i!=2){n=Hf(l.stream.segmentIndex);if(p=n.tilesLayout)l.stream.width=Number(m.split("x")[0])*Number(p.split("x")[0]),l.stream.height=Number(m.split("x")[1])*
Number(p.split("x")[1]);l.stream.closeSegmentIndex()}if(u=Y(b,"BANDWIDTH"))l.stream.bandwidth=Number(u);a.m.set(c,l);return q.return(l)})}
function Po(a,b){var c="video",d=dm(b,"URI"),e=Y(b,"CODECS")||"",f=om(b);e=="mjpg"&&(c="image");if(a.m.has(d))return a.m.get(d);var g=Y(b,"LANGUAGE"),h=Y(b,"NAME"),k=Y(b,"CHARACTERISTICS");c=ep(a,a.G++,[d],e,c,g,!1,h,null,null,k,!1,null,!1,f,d);c.stream.isIframe=!0;e=Y(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Y(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.m.set(d,c);return c}
function Zo(a,b,c,d,e){for(var f=a.G++,g=[],h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=dm(l,"URI");l=Y(l,"PATHWAY-ID");a.o&&l&&kn(a.o,f,l,k);g.push(k)}h=g.sort().join(",")+c.sort().join(",");if(a.m.has(h))return a.m.get(h);k=g.join(",");a:{b=Y(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.h.disableText){a.V=!1;b=null;break a}if(b){if(b!="NONE"){b=a.H.get(b);break a}a.V=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()),b=b.next();!b.done;b=b.next()){b=a.H.get(b.value);break a}}b=null}c=wc(d,c);
d=ep(a,f,g,c,d,null,!1,null,null,b,null,!1,null,!1,e,k);a.m.set(h,d);return d}
function ep(a,b,c,d,e,f,g,h,k,l,m,n,p,u,q,v){function w(A){var D,F,E,G,J,N,P,U,Q,M,O,V,ea,ha,I,T,R,S,X;return H(function(ka){switch(ka.i){case 1:return D=Bc,ka.o(2),ka.h(A.promise,4);case 4:F=ka.j;if(A.aborted)return ka.return();E=F.uri;Xn(z,F);G=qm(a.Ma,F.data);if(G.type!=1)throw new L(2,4,4017);J=gm(G.W,"EXT-X-DEFINE");N=Yn(a,J,E);P=!1;(!a.N&&a.h.hls.disableCodecGuessing||a.V&&e==D.qa&&!a.h.hls.disableClosedCaptionsDetection)&&G.segments.length>0&&(a.V=!1,P=!0);U=!a.N&&a.h.hls.disableCodecGuessing;
Q=xn(a);return ka.h(lo(a,0,N,G,x,d,e,f,g,h,k,l,m,n,p,u,q,v,void 0,P,U),5);case 5:M=ka.j;if(A.aborted)return ka.return();O=M.stream;wo(a,G);xn(a)&&!Q&&xo(a,G);z.Ec=M.Ec;z.mc=M.mc;z.ve=M.ve;z.ue=M.ue;z.se=M.se;z.Id=M.Id;z.Te=M.Te;z.Bb=M.Bb;z.Cb=M.Cb;y.segmentIndex=O.segmentIndex;y.encrypted=O.encrypted;y.drmInfos=O.drmInfos;y.keyIds=O.keyIds;y.mimeType=O.mimeType;$n(a,G,y.id,x,N);y.bandwidth=y.bandwidth||O.bandwidth;y.codecs=y.codecs||O.codecs;y.closedCaptions=y.closedCaptions||O.closedCaptions;zo(a);
y.width=y.width||O.width;y.height=y.height||O.height;y.hdr=y.hdr||O.hdr;y.colorGamut=y.colorGamut||O.colorGamut;y.frameRate=y.frameRate||O.frameRate;y.language=="und"&&O.language!="und"&&(y.language=O.language);y.language=y.language||O.language;y.channelsCount=y.channelsCount||O.channelsCount;y.audioSamplingRate=y.audioSamplingRate||O.audioSamplingRate;No(y);z.type!=D.qa||M.type!=D.Z||a.N&&!we.includes(y.mimeType)||fp(a,z,O);y.drmInfos.length&&a.j.newDrmInfo(y);V=!1;if(!l&&y.closedCaptions||l&&y.closedCaptions&&
l.size!=y.closedCaptions.size)V=!0;a.i&&V&&a.j.makeTextStreamsForClosedCaptions(a.i);e==D.Ua&&(ea=Hf(O.segmentIndex))&&ea.initSegmentReference&&(y.mimeType="application/mp4",No(y));ha=Im(y);y.segmentIndex.Sb(function(na){na.initSegmentReference&&(na.initSegmentReference.bd=ha)});gp(a)&&(a.$b?yo(a,[z]):(a.$b=!0,I=Array.from(a.m.values()),T=I.filter(function(na){return na.stream.segmentIndex}),yo(a,T),Cn(a),R=a.C,R>0&&a.D.ea(R)));a.i&&(a.i.startTime=a.B);return ka.h(go(a,G.W,y.type,N,x),6);case 6:ka.u(0);
break;case 2:S=ka.m();y.closeSegmentIndex();if(S.code===7001)return ka.return();X=a.j.disableStream(y);if(!X)throw S;ka.l()}})}function x(){if(a.o&&c.length>1)return ln(a.o,b);var A=z.bf.concat(lm([a.F],c,a.O));return Array.from(new Set(A))}var y=hp(a,d,e,f,g,h,k,l,m,n,p,u,q,v);c.some(function(A){return A.startsWith("shaka://hls-muxed")})&&(y.isAudioMuxedInVideo=!0,e=="audio"&&(y.mimeType="video/mp2t",No(y)));var z={stream:y,type:e,bf:[],Ec:0,mc:0,Te:new Map,ve:!1,ue:!1,se:!1,Id:!1,Mf:-1,Bb:-1,Cb:-1,
S:x},C=null,B;y.createSegmentIndex=function(){if(C)return C;if(y.isAudioMuxedInVideo)return y.segmentIndex=new Jm([]),Promise.resolve();B=vn(a,z.S(),!0);return C=new Promise(function(A){A(w(B))})};y.closeSegmentIndex=function(){C&&!y.segmentIndex&&B.abort();y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null);C=null};return z}
function fp(a,b,c){var d=b.stream,e=c.type,f=b.type;Dn(a)&&(a.u.set(e,a.u.get(f)),a.u.set(f,new Map));b.type=e;d.type=e;d.codecs=xc(e,c.codecs.split(/\s*,\s*/))||"";No(d);if(a.i){b=t(a.i.variants);for(c=b.next();!c.done;c=b.next())c=c.value,e=="audio"&&c.video==d&&(c.video=null,c.audio||(c.audio=d,c.language=d.language));a.i.variants=a.i.variants.filter(function(g){return g.audio||g.video})}}
function Ho(a){var b=Infinity;a=t(a.m.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.mc));return b}function An(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Sb(function(e){c.push(e)});a.l.oi(c)}
function yo(a,b){if(!xn(a))for(var c=Ho(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ge(0,c);An(a,b.map(function(f){return f.stream}));d=Array.from(a.m.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=Dn(a)&&!a.Aa;c=!xn(a)&&a.Aa&&!(c&&e);a.h.hls.ignoreManifestProgramDateTime||d||c?ho(a,b,d):(ko(a,b),a.h.hls.ignoreManifestProgramDateTimeForTypes.length>0&&ho(a,
b))}function io(a,b){return a.h.hls.ignoreManifestProgramDateTime?!0:a.h.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function gp(a){if(!a.i||!a.i.variants.length)return!1;var b=[],c=[];a=Qf(a.i.variants);a=t(a);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 lo(a,b,c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C){z=z===void 0?!0:z;C=C===void 0?!0:C;var B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea,ha,I,T,R,S,X,ka,na,Aa,ja,ua,vb,wb,eg,qd,Lc,Yc;return H(function(bb){switch(bb.i){case 1:B=g;A=d.segments||[];D=A.every(function(We){return im(We.W,"EXT-X-GAP")?!0:!1});if(!A.length||D)throw new L(2,4,4053);ip(a,d);xn(a)&&fo(a,d);F=Dn(a)?a.u.get(g):new Map;E=ao(a,d,F,c,e,g,!0,null);G=E.segments;J=E.bandwidth;if(y||g!=zc){bb.A(2);break}return bb.h(jp(a,g,f,G),3);case 3:y=bb.j,
f||y!="application/mp4"||!G[0]||G[0].initSegmentReference||(y="text/vtt"),f||y!="application/mp4"||(C=z=!0);case 2:M=Q=U=P=N=null;if(!(G.length>0&&z)){bb.A(4);break}O=g=="video"&&!n&&!a.h.hls.disableClosedCaptionsDetection;return bb.h(Ao(a,G,O),5);case 5:V=bb.j,g!=V.type&&Dn(a)&&(a.u.set(V.type,a.u.get(g)),a.u.set(g,new Map)),g=V.type,V.type!="video"&&(h=V.language),m=V.channelCount,q=V.sampleRate,a.h.disableText||(n=V.closedCaptions),P=V.height,N=V.width,U=V.videoRange,Q=V.colorGamut,M=V.frameRate,
C&&(y=V.mimeType,f=V.codecs);case 4:if(y){bb.A(6);break}return bb.h(jp(a,g,f,G),7);case 7:y=bb.j;case 6:return B=="video"&&we.includes(y)&&(g="audio"),bo(G,y),bb.h(Zn(a,d,y,e,c),8);case 8:ea=bb.j;ha=ea.drmInfos;I=ea.keyIds;T=ea.encrypted;R=ea.wh;if(T&&!ha.length&&!R)throw new L(2,4,4026);S=hp(a,f,g,h,k,l,m,n,p,u,q,v,w,x);S.encrypted=T&&!R;S.drmInfos=ha;S.keyIds=I;S.mimeType=y;J&&(S.bandwidth=J);im(d.W,"EXT-X-I-FRAMES-ONLY")&&(S.isIframe=!0);No(S);g=="video"&&(N||P||U||Q)&&dp(S,N,P,M,U,null,Q);xn(a)&&
fo(a,d);X=G[0].startTime;ka=G[G.length-1];na=ka.endTime;Aa=new Jm(G);S.segmentIndex=Aa;eo(a,S,g);ua=(ja=im(d.W,"EXT-X-SERVER-CONTROL"))?cm(ja,"CAN-SKIP-UNTIL")!=null:!1;vb=!1;ua&&(vb=ja?cm(ja,"CAN-SKIP-DATERANGES")!=null:!1);wb=ja?cm(ja,"CAN-BLOCK-RELOAD")!=null:!1;eg=jm(d.W,"EXT-X-MEDIA-SEQUENCE",0);qd=co(eg,G);Lc=qd.Bb;Yc=qd.Cb;return bb.return({stream:S,type:g,bf:[],S:e,Ec:X,mc:na,ve:ua,ue:vb,se:wb,Id:!1,Mf:-1,Bb:Lc,Cb:Yc,Te:F})}})}
function co(a,b,c){c=c===void 0?b.length:c;a=a+c-1;c=-1;if(!b.length)return a++,{Bb:a,Cb:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.u&&(c=0),{Bb:a,Cb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Bb:a,Cb:c}}function kp(a,b,c,d){for(var e=t(["video","audio"]),f=e.next();!f.done;f=e.next())if(f=f.value,f!=b){f=a.u.get(f);for(var g=0,h=0;h<d.length;h++){if(f.has(c+h))return f.get(c+h)-g;var k=im(d[h].W,"EXTINF");if(!k)break;g+=nm(k)}}return null}
function lp(a,b,c){if(!a||!b.has(c))return null;b=b.get(c);c=a.find(b);return c==null?null:(a=a.get(c))&&a.startTime==b?a:null}
function hp(a,b,c,d,e,f,g,h,k,l,m,n,p,u){var q=Lo(c,b)||Mo(c),v=[];if(k){k=t(k.split(","));for(var w=k.next();!w.done;w=k.next())v.push(w.value)}k=void 0;w=null;c==zc?k=v.includes("public.accessibility.transcribes-spoken-dialog")&&v.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":v.includes("public.accessibility.describes-video")&&(w="visually impaired");v.length||k!=="subtitle"||v.push("subtitle");a={id:a.G++,originalId:u,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,supplementalCodecs:p,kind:c==zc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:mc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:v,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:w,
external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1,preselection:null};No(a);return a}
function Zn(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O;return H(function(V){switch(V.i){case 1:f=new Map;if(!a.h.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=gm(k.W,"EXT-X-KEY"),m=null,l.length)for(m=mp(a,b,k.W,d,e),n=t(l),p=n.next();!p.done;p=n.next())u=p.value,f.set(u,m);v=q=!1;w=[];x=new Set;y=t(f);z=y.next();case 2:if(z.done){V.A(4);break}C=z.value;B=t(C);A=B.next().value;D=B.next().value;F=A;E=D;G=dm(F,"METHOD");if(G==
"NONE"){V.A(3);break}q=!0;J=Y(F,"KEYFORMAT")||"identity";N=null;if(So(G)){v=!0;V.A(3);break}if(J=="identity")return V.h(Uo(a,F,c,d,E,e),11);P=a.Nb.get(J);if(!P){U=null;V.A(9);break}return V.h(P(F,c,E),10);case 10:U=V.j;case 9:N=U;V.A(6);break;case 11:N=V.j;case 6:if(N){if(N.keyIds)for(Q=t(N.keyIds),M=Q.next();!M.done;M=Q.next())O=M.value,x.add(O);w.push(N)}case 3:z=y.next();V.A(2);break;case 4:return V.return({drmInfos:w,keyIds:x,encrypted:q,wh:v})}})}
function np(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new L(2,4,4042);var f=dm(b,"METHOD"),g=0,h=Y(b,"IV","");if(f==="AES-256-GCM"){if(h)throw new L(2,4,4059);}else if(h){var k=Qb(h.substr(2));if(k.byteLength!=16)throw new L(2,4,4048);}else g=jm(c.W,"EXT-X-MEDIA-SEQUENCE",0);var l=km(d(),dm(b,"URI"),e);c=l.slice().sort().join("");return a.eb.getOrInsertComputed(b.toString()+
"-"+g+"-"+c,function(){var m={bitsKey:128,blockCipherMode:"CBC",iv:k,firstMediaSequenceNumber:g};switch(f){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256;m.blockCipherMode="CTR";break;case "AES-256-GCM":m.bitsKey=256,m.blockCipherMode="GCM"}m.fetchKey=function(){var n,p;return H(function(u){if(u.i==1)return u.h(To(a,l),2);if(u.i!=3){n=u.j;if(!n.data||n.data.byteLength!=m.bitsKey/8)throw new L(2,4,4049);p={name:m.blockCipherMode==="CBC"?"AES-CBC":m.blockCipherMode==="GCM"?"AES-GCM":
"AES-CTR",length:m.bitsKey};return u.h(window.crypto.subtle.importKey("raw",n.data,p,!0,["decrypt"]),3)}m.cryptoKey=u.j;m.fetchKey=void 0;u.l()})};return m})}function To(a,b){var c=b.slice().sort().join("");return a.na.getOrInsertComputed(c,function(){var d=Go(a,Ok(b,a.h.retryParameters),6).promise;d.catch(function(){a.na.get(c)===d&&a.na.delete(c)});return d})}
function $n(a,b,c,d,e){if(xn(a)){var f=new Set,g=new Set,h=gm(b.W,"EXT-X-PRELOAD-HINT");h=t(h);for(var k=h.next(),l={};!k.done;l={Ld:void 0,rg:void 0,hint:void 0},k=h.next())if(l.hint=k.value,Y(l.hint,"TYPE")=="KEY"&&(k=Y(l.hint,"KEYFORMAT")||"identity",!g.has(k))){g.add(k);var m=Y(l.hint,"METHOD")||"",n=Y(l.hint,"URI");k=="identity"&&So(m)&&n&&(l.rg=km(d(),n,e),l.Ld=l.rg.slice().sort().join(""),a.na.has(l.Ld)||(f.add(l.Ld),a.L.getOrInsertComputed(l.Ld,function(p){return function(){var u=new $e(function(){a.L.delete(p.Ld);
To(a,p.rg)}),q=op(a,p.hint,b);u.ea(q);return{Lc:u,$g:new Set}}}(l)).$g.add(c)))}d=t(Array.from(a.L.keys()));for(e=d.next();!e.done;e=d.next())e=e.value,g=a.L.get(e),f.has(e)||!g.$g.delete(c)||g.$g.size||(g.Lc.stop(),a.L.delete(e))}}
function op(a,b,c){var d=null;b=Kd(Y(b,"DATE-OF-FIRST-USE")||"");if(b!=null&&!a.h.hls.ignoreManifestProgramDateTime){a:{for(var e=c.segments||[],f=e.length-1;f>=0;f--)if((a=im(e[f].W,"EXT-X-PROGRAM-DATE-TIME"))&&a.value){a=Kd(a.value);if(a==null)break;e=t(e.slice(f));for(f=e.next();!f.done;f=e.next()){f=f.value;var g=im(f.W,"EXTINF");if(g)a+=nm(g);else for(f=t(f.Gc),g=f.next();!g.done;g=f.next())g=g.value,g.name=="EXT-X-PART"&&(a+=Number(Y(g,"DURATION"))||0)}break a}a=null}a!=null&&(d=b-a)}d==null&&
(d=jm(c.W,"EXT-X-TARGETDURATION",0));return Math.random()*Math.max(0,d)}function wo(a,b){a.B==null&&(b=im(b.W,"EXT-X-START"))&&(a.B=Number(dm(b,"TIME-OFFSET")))}function ip(a,b){var c=im(b.W,"EXT-X-PLAYLIST-TYPE");b=im(b.W,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?Bn(a,un):c?Bn(a,pp):Bn(a,qp)}
function fo(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=im(d[e].W,"EXTINF");if(f){c=nm(f);break}e--}d=im(b.W,"EXT-X-TARGETDURATION");if(!d)throw new L(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=im(b.W,"EXT-X-PART-INF"))a.Y=Number(dm(e,"PART-TARGET"));b=im(b.W,"EXT-X-SERVER-CONTROL");a.ra&&a.Y?(a.C=a.Yb?a.Y*5<=c?Math.min(a.Y,a.C):Math.min(c,a.C):Math.min(a.Y,a.C),a.Ga=b?Number(dm(b,"PART-HOLD-BACK")):0):(a.C=Math.min(c,a.C),c=b?cm(b,"HOLD-BACK"):null,
a.Ca=c?Number(c.value):0);a.Oa=Math.max(d,a.Oa)}function xo(a,b){var c=0;if(a.h.defaultPresentationDelay)c=a.h.defaultPresentationDelay;else if(a.Ga)c=a.Ga;else if(a.Ca)c=a.Ca;else for(var d=b.segments.length,e=d-Math.min(d,a.h.hls.liveSegmentsDelay);e<d;e++){var f=im(b.segments[e].W,"EXTINF");c=f?c+nm(f):c+a.Oa}a.B&&a.B<0&&(c=Math.min(-a.B,c),a.B+=c);a.l.Gi(0);a.l.Ei(c);a.l.jf(!1);a.l.Di(!0)}
function mp(a,b,c,d,e){var f=im(c,"EXT-X-MAP");if(!f)return null;var g=dm(f,"URI"),h=km(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");return a.Zb.getOrInsertComputed(g,function(){for(var k=void 0,l=void 0,m=!1,n=t(c),p=n.next();!p.done;p=n.next())p=p.value,p.name=="EXT-X-KEY"?(m=dm(p,"METHOD"),So(m)&&p.id<f.id?(m=!1,k=np(a,p,b,d,e)):m=m!="NONE"):p.name=="EXT-X-BYTERANGE"&&p.id<f.id&&(l=p);return rp(h,f,l,k,m)})}
function rp(a,b,c,d,e){var f=0,g=null;b=Y(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 um(function(){return a},f,g,null,null,null,d,e)}
function sp(a,b,c,d,e,f,g,h,k,l){var m=d.W,n=im(m,"EXTINF"),p=0,u=0,q=null;d.Gc.length&&(a.i.isLowLatency=!0);var v=null;if(!a.h.hls.ignoreManifestProgramDateTime){var w=im(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=Kd(w.value),a.Aa=!0)}var x=xm;im(m,"EXT-X-GAP")&&(a.i.gapCount++,x=2);if(!n){if(d.Gc.length==0)throw new L(2,4,4024,"EXTINF");if(!a.ra)return null}var y=[];w=!1;var z=null,C=!1,B=!1;if(a.ra&&d.Gc.length){p=b&&window.ReadableStream&&a.h.hls.allowLowLatencyByteRangeOptimization;for(var A=
v,D={},F=0;F<d.Gc.length;D={nf:void 0,Td:void 0},F++){var E=d.Gc[F],G=F==0?c:y[y.length-1],J=F==0?e:G.endTime,N=Number(Y(E,"DURATION"))||a.Y;if(N){var P=J+N,U=0,Q=null;E.name=="EXT-X-PRELOAD-HINT"?(U=(U=Y(E,"BYTERANGE-START"))?Number(U):0,(G=Y(E,"BYTERANGE-LENGTH"))?Q=U+Number(G)-1:U&&(Q=Number.MAX_SAFE_INTEGER)):(U=Y(E,"BYTERANGE"),Q=t(tp(G,U)),U=Q.next().value,Q=Q.next().value);D.Td=Y(E,"URI");if(D.Td){G=xm;Y(E,"GAP")=="YES"&&(a.i.gapCount++,G=2,C=!0);D.nf=null;var M=function(V){return function(){V.nf==
null&&(V.nf=km(h(),V.Td,f));return V.nf}}(D);p&&U>=0&&Q!=null&&(z=M,w=!0);J=new wm(J,P,M,U,Q,b,0,0,Infinity,[],"",null,A,G,l);E.name=="EXT-X-PRELOAD-HINT"&&(J.wg(),B=!0);Y(E,"INDEPENDENT")!="YES"&&F>0&&J.ei();E=k;E||(y.length&&y[0].mimeType?E=y[0].mimeType:D.Td&&(D=dn(D.Td),E=up.get(g).get(D)||null));E&&(J.mimeType=E,vp.has(E)&&(J.initSegmentReference=null));y.push(J);A&&(A+=N)}}}}if(n){n=nm(n);if(n==0)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(C||y[0].startByte!=
0?(w=!1,z=null):y=[]);(n=im(m,"EXT-X-BYTERANGE"))?(q=t(tp(c,n.value)),u=q.next().value,q=q.next().value):y.length&&(u=y[0].startByte,q=y[y.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=im(m,"EXT-X-TILES"))&&(c=dm(g,"LAYOUT"),(g=Y(g,"DURATION"))&&(n=Number(g)));var O=null;b=new wm(e,p,function(){if(z)return z();O==null&&(O=km(h(),d.h,f));return O||[]},u,q,b,0,0,Infinity,y,c,n,v,x,l,y.length>0&&!!d.h);k&&(b.mimeType=k,vp.has(k)&&(b.initSegmentReference=null));w&&(a.Yb=!0,b.ci(),B&&b.wg());return b}
function tp(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 go(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea,ha,I,T,R,S,X,ka,na;return H(function(Aa){f=Bc;if(c!=f.qa&&c!=f.Z)return Aa.return();g=a.l.l;if(g==null||io(a,c))return Aa.return();h=gm(b,"EXT-X-DATERANGE");h=h.filter(function(ja){return cm(ja,"START-DATE")!=null}).sort(function(ja,ua){ja=dm(ja,"START-DATE");ua=dm(ua,"START-DATE");return ja<ua?-1:ja>ua?1:0});k=[];for(l=0;l<h.length;l++){m=h[l];try{if(n=dm(m,"START-DATE"),p=Kd(n),!isNaN(p)){u=Math.max(0,p-g);
q=null;if(v=Y(m,"END-DATE"))if(w=Kd(v),!isNaN(w)&&(q=w-g,q<0))continue;if(q==null&&(x=Y(m,"DURATION")||Y(m,"PLANNED-DURATION"))&&(y=parseFloat(x),isNaN(y)||(q=u+y),z=p-g+y,z<0))continue;C=t(["SCTE35-OUT","SCTE35-IN","SCTE35-CMD"]);for(B=C.next();!B.done;B=C.next())if(A=B.value,D=nn(Y(m,A)))F=A=="SCTE35-IN"&&q!=null?q:u,a.j.onScte35Event({schemeIdUri:"urn:scte:scte35:2013:bin",startTime:F,endTime:A=="SCTE35-OUT"&&q!=null?q:F,id:dm(m,"ID"),source:"hls",kind:A.substring(7).toLowerCase(),data:D,node:null});
E=Y(m,"CLASS")||"com.apple.quicktime.HLS";G=Y(m,"END-ON-NEXT")=="YES";if(q==null&&G){for(J=l+1;J<h.length;J++)if(N=Y(h[J],"CLASS")||"com.apple.quicktime.HLS",E==N&&(P=dm(h[J],"START-DATE"),U=Kd(P),!isNaN(U)&&U&&U>p)){q=Math.max(0,U-g);break}if(q==null)continue}Q=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];M=[];O=t(m.attributes);for(V=O.next();!V.done;V=O.next())if(ea=V.value,!Q.includes(ea.name)){ha=mm(ea.value,d);if(ea.name=="X-ASSET-URI"||ea.name=="X-ASSET-LIST")ha=km(e(),ea.value,
d)[0];I={key:ea.name,description:"",data:ha,mimeType:null,pictureType:null};M.push(I)}T={schemeIdUri:E,value:"",startTime:u,endTime:q!=null?q:Infinity,id:dm(m,"ID"),timescale:1,eventNode:null,urlParams:void 0,values:M};a.j.onTimelineRegionAdded(T);if(M.length>1){R=a.j.onMetadata(E,u,q,M);S=!1;if(X=M.find(function(ja){return ja.key=="CUE"})||M.find(function(ja){return ja.key=="X-CUE"}))ka=X.data,ka.includes("PRE")&&(S=!0);q==null||S||(na=void 0,na=a.i.startTime!=null?a.i.startTime:xn(a)?a.i.presentationTimeline.pb():
a.i.presentationTimeline.Ab(),S=u<=na&&q>=na);S&&k.push(R)}}}catch(ja){}}return k.length?Aa.h(Promise.all(k),0):Aa.A(0)})}function bo(a,b){if(we.includes(b)){a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.mimeType&&c.mimeType!=b&&(c.mimeType=b)}}
function ao(a,b,c,d,e,f,g,h){function k(M){M=dn(M);if(!M)return null;var O=up.get(f).get(M);O||(O=Co.get(M));return O}var l=b.segments,m=null,n=null,p=null,u=null,q=void 0,v=jm(b.W,"EXT-X-DISCONTINUITY-SEQUENCE",-1),w=jm(b.W,"EXT-X-MEDIA-SEQUENCE",0),x=im(b.W,"EXT-X-SKIP"),y=x?Number(Y(x,"SKIPPED-SEGMENTS")):0,z=w+y,C=0;Dn(a)&&c.has(z)&&(C=c.get(z));C===0&&Dn(a)&&c.size>0&&!c.has(z)&&a.l.j!=null&&(C=a.l.Hd());Dn(a)&&!c.size&&a.I>=0&&(!a.Aa||io(a,f))&&(x=kp(a,f,z,l),x!=null&&(C=x));var B=[];x=[];var A=
null,D=null,F=[],E=0;if(!g&&h){E=l.length;for(var G=0;G<l.length;G++){z=w+y+G;if(!c.has(z)){E=G;break}if(l[G].Gc.length){E=G;break}if(a.ra){var J=im(l[G].W,"EXTINF");if(J&&(J=nm(J),(z=lp(h,c,z))&&Math.abs(z.endTime-z.startTime-J)>.001)){E=G;break}}}E>0&&((A=lp(h,c,w+y+E-1))?D=A:E=0)}G=D;!G&&h&&(G=lp(h,c,w+y)||h.get(h.getNumEvicted()+h.getNumReferences()-1));for(h=0;h<l.length;h++){var N=l[h];(z=im(N.W,"EXT-X-MAP"))&&z.id!==n&&(m=mp(a,b,N.W,e,d),n=z.id);z=N.h;J="";z&&(J=dn(z));J!==u&&(p=k(z),u=J);
var P=h==0?C:A.endTime;z=w+y+h;im(N.W,"EXT-X-DISCONTINUITY")&&(v++,h>=E&&A&&A.initSegmentReference&&(A.initSegmentReference.h=P));J=t(N.W);for(var U=J.next();!U.done;U=J.next())U=U.value,U.name=="EXT-X-KEY"&&(So(dm(U,"METHOD"))?q=np(a,U,b,e,d):q=void 0);if(!(h<E)&&(J=g||!c.has(z),c.set(z,P),P=sp(a,m,A,N,P,d,f,e,p,q))){if(A=jm(N.W,"EXT-X-BITRATE"))F.push({bitrate:A,duration:P.endTime-P.startTime}),P.bandwidth=A;else if(P.endByte){if(N=ym(P))A=P.endTime-P.startTime,N=N*8/A/1E3,F.push({bitrate:N,duration:A}),
P.bandwidth=N}else F.length&&(A=F[F.length-1],A.duration+=P.endTime-P.startTime,P.bandwidth=A.bitrate);if(P.bandwidth)for(A=t(P.i),N=A.next();!N.done;N=A.next())N.value.bandwidth=P.bandwidth;A=P;P.discontinuitySequence=v;io(a,f)&&a.I!=null&&z<a.I||(B.push(P),!J&&g||x.push(P))}}b=void 0;F.length&&(b=F.reduce(function(M,O){return M+O.duration},0),b=Math.round(F.reduce(function(M,O){return M+O.bitrate*O.duration},0)/b*1E3));var Q;if(c=!((Q=D)==null||!Q.h)||B.some(function(M){return M.h!=null}))for(Q=
{},d=0;d<B.length;Q={Ie:void 0,He:void 0,me:void 0,Hc:void 0,wd:void 0},d++)if(Q.Hc=B[d],Q.Hc.h==null)for(Q.He=0,Q.Ie=d,e=function(M){return function(){var O=B[M.Ie];if(O){if(O.h!=null)return O.h+M.He;M.He-=O.endTime-O.startTime;M.Ie+=1}return null}}(Q),Q.wd=0,Q.me=d,l=function(M){return function(){var O=B[M.me];if(O){O!=M.Hc&&(M.wd+=O.endTime-O.startTime);if(O.h!=null)return O.h+M.wd;--M.me}else if(D&&D.h!=null)return D.h+(D.endTime-D.startTime)+M.wd;return null}}(Q);Q.Hc.h==null;)Q.Hc.h=l(),Q.Hc.h==
null&&(Q.Hc.h=e());if(c)for(Q=0,e=D,G&&G.h!=null&&(d=a.Ya.get(G),d!=null&&(Q=d-G.h)),G=t(B),d=G.next();!d.done;d=G.next()){d=d.value;d.h!=null&&(a.Ya.set(d,d.h),e&&e.h!=null&&e.discontinuitySequence!=d.discontinuitySequence&&(e=d.h-(e.h+(e.endTime-e.startTime))-Q,Math.abs(e)>1&&(Q+=e)),d.h-=Q);e=d.h;l=t(d.i);for(m=l.next();!m.done;m=l.next())m=m.value,m.h=e,e+=m.endTime-m.startTime;e=d}G=a.sa;if(c&&G!=Infinity&&!io(a,f))for(a=t(B),Q=a.next();!Q.done;Q=a.next())Q.value.bh(G);return{segments:g?B:x,
yl:E+B.length,bandwidth:b}}function eo(a,b,c){if(c=="video"&&!io(a,c)&&b.segmentIndex){c=[];var d=null;b=t(b.segmentIndex);for(var e=b.next();!e.done;e=b.next())if((e=e.value)&&e.h!=null){var f=a.Ya.get(e);if(f!=null){var g=f-e.h;(d==null||Math.abs(g-d)>.001)&&c.push({start:e.startTime,Ig:f});d=g}}a.l.Hi(c)}}
function Lo(a,b){if(a==zc){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 Mo(a){return a==zc?"text/vtt":up.get(a).get("mp4")}function Bo(a,b){a=Dn(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.Kb()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function jp(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,q,v,w;return H(function(x){switch(x.i){case 1:e=Uk;f=Bo(a,d);g=f.segment;if(g.status==2)return x.return(Mo(b));k=g.S();if(l=dn(k[0]))if(m=up.get(b),(n=m.get(l))||(n=Co.get(l)))return x.return(n);if(h=Lo(b,c))return x.return(h);u=1;q=Ok(k,a.j.getStreamingRetryParameters());x.o(2);q.method="HEAD";return x.h(Go(a,q,e,{type:u}).promise,4);case 4:v=x.j;p=v.headers["content-type"];x.u(3);break;case 2:w=x.m();if(!w||w.code!=1002&&w.code!=1001){x.A(3);break}q.method=
"GET";a.h.hls.allowRangeRequestsToGuessMimeType&&(q.headers.Range="bytes=0-0");return x.h(Go(a,q,e,{type:u}).promise,6);case 6:v=x.j,p=v.headers["content-type"];case 3:if(!p){x.A(7);break}h=p.toLowerCase().split(";")[0];if(!wp.includes(h)){x.A(8);break}if(v.data.byteLength){x.A(9);break}q.method="GET";return x.h(Go(a,q,e,{type:u}).promise,10);case 10:v=x.j;case 9:Pi(yb(v.data))&&(h="video/mp2t");case 8:if(!wp.includes(h))return x.return(h);case 7:return x.return(Mo(b))}})}
function dp(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=d||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function vn(a,b,c){return Go(a,Ok(b,a.h.retryParameters),0,{type:c?2:3})}
function tn(a){var b,c,d,e,f,g;return H(function(h){switch(h.i){case 1:if(!a.j)return h.return();h.o(2);b=Date.now();return h.h(a.update(),4);case 4:c=Date.now();xn(a)&&(d=(c-b)/1E3,a.fb.sample(1,d),e=a.h.updatePeriod>0?a.h.updatePeriod:a.C,f=Math.max(0,e-Sa(a.fb)),isFinite(f)?a.D.ea(f):a.D.ea(1));h.u(3);break;case 2:g=h.m();if(!a.j)return h.return();if(a.h.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(g),h.return();g.severity=1;a.j.onError(g);a.D.ea(.1);case 3:if(!a.j)return h.return();
a.j.onManifestUpdated();h.l()}})}function xn(a){return a.Pa!=un}function Dn(a){return a.Pa==pp}function Bn(a,b){a.Pa=b;a.l&&a.l.jf(!xn(a));xn(a)||a.D.stop()}function Go(a,b,c,d){if(!a.ia)throw new L(2,7,7001);d||(d={});d.isPreload=a.Eb();b=a.j.networkingEngine.request(c,b,d);Ak(a.ia,b);return b}function So(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"||a=="AES-256-GCM"}
function qn(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(m.i==1){if(c=="video/mp2t")throw new L(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new L(2,4,4041);e=dm(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=dm(b,"URI");k=uc("com.apple.fps",g,null,h);var n=Ek(h).replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?n:null)||!d?m.A(2):m.h(xp(a,d),3)}m.i!=2&&(l=m.j);l&&k.keyIds.add(l);
return m.return(k)})}function rn(a,b){var c=dm(b,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c))return Promise.resolve(null);var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");c=dm(b,"URI");var e=an(c.split("?")[0]);a=a.Qa.getOrInsertComputed(c.split("?")[0],function(){return yb(e.data)});d=uc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a}],void 0,e.hh);(b=Y(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));return Promise.resolve(d)}
function sn(a,b){var c=dm(b,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c))return Promise.resolve(null);var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");c=dm(b,"URI");var e=an(c.split("?")[0]);a=a.Qa.getOrInsertComputed(c.split("?")[0],function(){return yb(e.data)});d=uc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:a}],void 0,e.hh);(b=Y(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));return Promise.resolve(d)}
function Uo(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,q,v;return H(function(w){switch(w.i){case 1:if(c=="video/mp2t")throw new L(2,4,4040);g=dm(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return w.return(null);k=km(d(),dm(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Rb(Pb(k[0].split("data:text/plain;base64,").pop()));w.A(2);break}m=k.sort().join("");return w.h(a.Db.getOrInsertComputed(m,function(){return Go(a,Ok(k,a.h.retryParameters),6).promise}),3);case 3:n=w.j,l=Rb(n.data);
case 2:p="00000000000000000000000000000000";if(!e){w.A(4);break}return w.h(xp(a,e),5);case 5:(u=w.j)&&(p=u);case 4:return q=new Map,q.set(p,l),v="cenc",g=="SAMPLE-AES"&&(v="cbcs"),w.return(vc(q,v))}})}function xp(a,b){var c,d,e,f;return H(function(g){if(g.i==1){c=null;if(a.va.has(b))return c=a.va.get(b),g.A(2);d=en(b.S(),b.kc(),b.hc(),a.j.getStreamingRetryParameters());e=Uk;return g.h(Go(a,d,e,{type:0}).promise,3)}g.i!=2&&(f=g.j,b.Wd(f.data),c=Xm(f.data),a.va.set(b,c));return g.return(c)})}
K("shaka.hls.HlsParser",pn);
var Co=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),yp=(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"),zp=(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"),Ap=(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"),Bp=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),up=(new Map).set("audio",yp).set("video",zp).set("text",Ap).set("image",Bp),vp=new Set(["video/mp2t"].concat(wa(we))),
wp=["application/octet-stream","binary/octet-stream"],un="VOD",qp="EVENT",pp="LIVE";Hc("application/x-mpegurl",function(){return new pn});Hc("application/vnd.apple.mpegurl",function(){return new pn});Hc("audio/x-mpegurl",function(){return new pn});function Cp(a,b,c){c=c===void 0?!0:c;this.i=a;this.h=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}Cp.prototype.add=function(a,b){return Dp(this.i,a,b===void 0?!0:b)?(this.h.add(a),!0):!1};function Dp(a,b,c){return!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language||a.audio&&b.audio&&!Ep(a.audio,b.audio,c)||a.video&&b.video&&!Fp(a.video,b.video,c)?!1:!0}Cp.prototype.values=function(){return this.h.values()};
function Gp(a,b){if(!a.audio||!b.audio)return a.audio==b.audio;if(a.audio==b.audio)return!0;var c=!a.audio.channelsCount||!b.audio.channelsCount||a.audio.channelsCount==b.audio.channelsCount;return a.language==b.language&&a.audio.label==b.audio.label&&c&&a.audio.spatialAudio==b.audio.spatialAudio&&a.audio.groupId==b.audio.groupId&&Ae(a.audio.codecs)==Ae(b.audio.codecs)&&eb(a.audio.roles,b.audio.roles)}
function Hp(a,b){return a.video&&b.video?(a.video.label||"")==(b.video.label||"")&&(a.video.language||"")==(b.video.language||"")&&eb(a.video.roles,b.video.roles):!a.video==!b.video}
function Ip(a,b,c){function d(p){return(p.channelsCount||0)*2+(p.spatialAudio?1:0)}var e=a[0];if(!e||!e.audio||a.some(function(p){return!p.audio||!p.audio.channelsCount}))return[];var f=Math.min.apply(Math,wa(a.map(function(p){return d(p.audio)}))),g=new Set(a.map(function(p){var u;return(u=p.video)==null?void 0:u.hdr})),h=new Set(a.map(function(p){var u;return(u=p.video)==null?void 0:u.videoLayout})),k=new Map;b=t(b);for(var l=b.next();!l.done;l=b.next()){l=l.value;var m=l.audio;a.includes(l)||!m||
!m.channelsCount||d(m)>=f||l.language!=e.language||m.label!=e.audio.label||!eb(m.roles,e.audio.roles)||c&&!Jp(e.audio,m)||Hp(e,l)&&(!e.video||!l.video||g.has(l.video.hdr)&&h.has(l.video.videoLayout)&&Fp(e.video,l.video,c))&&k.getOrInsertComputed(d(m),function(){return[]}).push(l)}c=Ae(e.audio.codecs);e=[];var n=Math.min.apply(Math,wa(a.map(function(p){return p.bandwidth})));a=Array.from(k.keys()).sort(function(p,u){return u-p});a=t(a);g=a.next();for(f={};!g.done;f={xc:void 0,Fe:void 0},g=a.next()){g=
k.get(g.value);f.xc=new Map;h=t(g);for(b=h.next();!b.done;b=h.next())b=Ae(b.value.audio.codecs),f.xc.set(b,f.xc.getOrInsert(b,0)+1);f.Fe=c;f.xc.has(f.Fe)||(f.Fe=Array.from(f.xc.keys()).reduce(function(p){return function(u,q){return p.xc.get(q)>p.xc.get(u)?q:u}}(f)));f=g.filter(function(p){return function(u){return Ae(u.audio.codecs)==p.Fe&&u.bandwidth<n}}(f));f.length&&(e.push.apply(e,wa(f)),n=Math.min.apply(Math,wa(f.map(function(p){return p.bandwidth}))))}return e}
function Ep(a,b,c){if(!a.channelsCount||!b.channelsCount){if(a.channelsCount!=b.channelsCount&&Ae(a.codecs)!=Ae(b.codecs))return!1}else if((a.channelsCount>2||b.channelsCount>2)&&a.channelsCount!=b.channelsCount)return!1;return a.spatialAudio!==b.spatialAudio||c&&!Jp(a,b)||!eb(a.roles,b.roles)||a.groupId!==b.groupId?!1:!0}function Fp(a,b,c){return c&&!Jp(a,b)||!eb(a.roles,b.roles)?!1:!0}
function Jp(a,b){function c(d){d=ye(d.mimeType,d.codecs,d.type);var e=Ee(d).split(",").map(function(f){return Ce(f)});return{xd:De(d),Fh:e}}a=c(a);b=c(b);return a.xd==b.xd&&eb(a.Fh,b.Fh)}K("shaka.media.AdaptationSet",Cp);function Kp(){this.h=Lp;this.l=(new Map).set(Lp,2).set(Mp,1);this.j=0;this.i=-1}function Np(a,b){var c=a.h!==b;a.h=b;c&&b===Lp&&(a.j=Date.now());return c}var Mp=0,Lp=1;function Op(){this.i=null;this.l=new Map;this.j=this.h=null}function Pp(a,b,c,d){var e;return H(function(f){if(f.i==1){e=yb(b);if(c)return a.j=e,f.return(Qp(e));if(!a.j)return f.return(e);if(a.i===d)return f.A(2);a.i=d;a.h=Rp(a.i);return f.h(a.h,3)}f.i!=2&&(a.l=f.j,a.h=null);return f.return(Sp(a,e,a.j))})}
Op.prototype.destroy=function(){var a=this;return H(function(b){switch(b.i){case 1:if(!a.h){b.A(2);break}b.o(3);return b.h(a.h,5);case 5:b.u(2);break;case 3:b.m();case 2:a.i=null,a.l.clear(),a.h=null,a.j=null,b.l()}})};
function Rp(a){var b,c,d,e,f,g,h,k,l;return H(function(m){if(m.i==1)return b=new Map,a.clearKeys?m.h(Promise.all([].concat(wa(a.clearKeys.entries())).map(function(n){var p=t(n);n=p.next().value;p=p.next().value;p=Pb(p);var u=Pb(n);return Promise.all([crypto.subtle.importKey("raw",p,{name:"AES-CBC"},!1,["decrypt","encrypt"]),crypto.subtle.importKey("raw",p,{name:"AES-CTR"},!1,["decrypt"])]).then(function(q){var v=t(q);q=v.next().value;v=v.next().value;return{yk:Rb(u),Ef:q,ze:v}})})),2):m.return(b);
c=m.j;d=t(c);for(e=d.next();!e.done;e=d.next())g=f=e.value,h=g.yk,k=g.Ef,l=g.ze,b.set(h,{Ef:k,ze:l});return m.return(b)})}function Sp(a,b,c){var d,e,f,g,h;return H(function(k){if(k.i==1)return d=Tp(c),e=Up(b,d),f=e.yj.map(function(l){var m=d.get(l.trackId)||d.values().next().value;return Vp(a,l,b,m)}),k.h(Promise.all(f),2);g=k.j;h=[b.slice(0,e.wj)].concat(wa(g));return k.return(Sb.apply(Mb,wa(h)))})}
function Qp(a){function b(h){e.push(function(){d.setUint32(h.start+4,1718773093,!1);c.fill(0,h.start+8,h.start+h.size)})}var c=yb(a).slice(),d=Bb(c),e=[],f=-1;(new jh).ma(uh,oh).P("stsd",qh).box("encv",function(h){f=h.start;rh(h)}).box("enca",function(h){f=h.start;sh(h)}).box("sinf",function(h){b(h);oh(h)}).box("frma",function(h){var k=Mh(h.reader).codec,l=f;l!==-1&&k&&e.push(function(){for(var m=0;m<4;++m)d.setUint8(l+4+m,k.charCodeAt(m))})}).P("sgpd",b).box("pssh",b).parse(c,!0);a=t(e);for(var g=
a.next();!g.done;g=a.next())g=g.value,g();return c}
function Tp(a){var b=new Map,c=0;(new jh).ma(["moov","mdia","minf","stbl"],oh).box("trak",function(d){c=0;oh(d)}).P("tkhd",function(d){c=Ih(d.reader,d.version).trackId;b.getOrInsert(c,{defaultKID:"",encryptionScheme:"cenc",Cd:8,bc:null,Be:0,Ce:0})}).P("stsd",qh).box("encv",rh).box("enca",sh).box("sinf",oh).P("schm",function(d){d=nh(d.reader.R());var e=b.get(c);e&&(e.encryptionScheme=d.toLowerCase())}).box("schi",oh).P("tenc",function(d){d=Nh(d.reader,d.version);var e=b.get(c);e&&(e.defaultKID=d.defaultKID,
e.Cd=d.rj,e.bc=d.bc,e.Be=d.Be,e.Ce=d.Ce)}).parse(a,!0);return b}
function Up(a,b){function c(g){f&&f.Cf.push({start:g.start,size:g.size})}var d=[],e=0,f=null;(new jh).box("moof",function(g){d.length||(e=g.start);f={cd:g.start,ki:g.size,xg:-1,Od:-1,Ci:null,Si:0,trackId:0,Ui:[],Cf:[]};oh(g)}).box("traf",oh).P("tfhd",function(g){f&&(g=Eh(g.reader,g.flags),f.trackId=g.trackId,f.Si=g.cc||0)}).P("trun",function(g){if(f){g=Hh(g.reader,g.version,g.flags);g=t(g.sc);for(var h=g.next();!h.done;h=g.next())f.Ui.push({size:h.value.sampleSize||f.Si})}}).P("senc",function(g){if(f){var h=
b.get(f.trackId);h&&(f.Ci=Qh(g.reader,g.flags,h.Cd,h.bc));c(g)}}).Kh(["saiz","saio","sgpd","sbgp"],c).box("pssh",c).box("mdat",function(g){f&&(f.xg=g.start,f.Od=g.size,d.push(f),f=null)}).parse(a);return{yj:d,wj:e}}
function Vp(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z;return H(function(C){if(C.i==1){e=d.defaultKID;f=a.l.get(e);if(!f)return C.return(c.slice(b.cd,b.xg+b.Od));g=d.encryptionScheme;(h=b.Ci)&&d.Cd!==8&&(k=c.subarray(b.cd,b.cd+b.ki),(new jh).ma(vh,oh).P("senc",function(B){h=Qh(B.reader,B.flags,d.Cd,d.bc)}).parse(k,!1));l=b.xg+8;m=c.subarray(l,l+b.Od-8);return C.h(Wp(m,b.Ui.map(function(B){return B.size}),h,d,f,g),2)}n=C.j;p=c.slice(b.cd,b.cd+b.ki);u=Bb(p);if(b.Cf)for(q=t(b.Cf),v=q.next();!v.done;v=
q.next())w=v.value,x=w.start-b.cd,x>=0&&x+w.size<=p.byteLength&&(u.setUint32(x+4,1718773093,!1),p.fill(0,x+8,x+w.size));y=8+n.byteLength;z=new Uint8Array(y);Bb(z).setUint32(0,y,!1);z.set([109,100,97,116],4);z.set(n,8);return C.return(Sb(p,z))})}
function Wp(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,q,v;return H(function(w){if(w.i==1)return g=new Uint8Array(a.byteLength),h=0,k=b.map(function(x,y){var z=h;h+=x;x=a.subarray(z,z+x);if(c&&c.Sa[y]){y=c.Sa[y];var C=d.Cd===16?16:8,B=new Uint8Array(16);B.set(y.iv.slice(0,C),0);return f==="cenc"?Xp(x,B,y.Pi,e).then(function(A){return{offset:z,Ae:A}}):Yp(x,d.bc||B,y.Pi,d,e).then(function(A){return{offset:z,Ae:A}})}return f==="cbcs"&&d.bc?Yp(x,d.bc,null,d,e).then(function(A){return{offset:z,Ae:A}}):Promise.resolve({offset:z,
Ae:x})}),w.h(Promise.all(k),2);l=w.j;m=t(l);for(n=m.next();!n.done;n=m.next())u=p=n.value,q=u.offset,v=u.Ae,g.set(v,q);return w.return(g)})}
function Xp(a,b,c,d){var e,f,g,h,k,l,m,n,p,u;return H(function(q){switch(q.i){case 1:if(c&&c.length){q.A(2);break}e=tb;f=yb;return q.h(crypto.subtle.decrypt({name:"AES-CTR",counter:b,length:64},d.ze,a),3);case 3:return q.return(f.call(e,q.j));case 2:return g=new Uint8Array(a.byteLength),k=h=0,l=c.map(function(v){var w=h;h+=v.zd;if(v.ec===0)return Promise.resolve({xe:w,Eh:v.zd,Ih:h,uj:0,Kf:null});var x=b.slice();Zp(x,k);var y=h;h+=v.ec;k+=Math.ceil(v.ec/16);return crypto.subtle.decrypt({name:"AES-CTR",
counter:x,length:64},d.ze,a.subarray(y,y+v.ec)).then(function(z){return{xe:w,Eh:v.zd,Ih:y,uj:v.ec,Kf:yb(z)}})}),q.h(Promise.all(l),4);case 4:m=q.j;n=t(m);for(p=n.next();!p.done;p=n.next())u=p.value,g.set(a.subarray(u.xe,u.xe+u.Eh),u.xe),u.Kf&&g.set(u.Kf,u.Ih);return q.return(g)}})}
function Yp(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,q,v;return H(function(w){if(w.i==1){f=d.Be;g=d.Ce;f===0&&(f=1,g=0);h=new Uint8Array(a.byteLength);k=[];l=function(x,y){var z=b,C=x;x+=y;for(y={};C<x;y={Vc:void 0,Ye:void 0,we:void 0}){var B=Math.min(f*16,x-C);if(B>=16){var A=Math.floor(B/16)*16;y.Vc=C;y.Ye=B-A;y.we=C+A;k.push($p(a.subarray(y.Vc,y.Vc+A),z,e.Ef).then(function(D){return function(F){h.set(F,D.Vc);D.Ye>0&&h.set(a.subarray(D.we,D.we+D.Ye),D.we)}}(y)));z=a.slice(y.Vc+A-16,y.Vc+A);C+=A+y.Ye}else h.set(a.subarray(C,
C+B),C),C+=B;y=Math.min(g*16,x-C);y>0&&(h.set(a.subarray(C,C+y),C),C+=y)}};if(c&&c.length)for(m=0,n=t(c),p=n.next();!p.done;p=n.next())u=p.value,q=m,m+=u.zd,h.set(a.subarray(q,q+u.zd),q),u.ec>0&&(v=m,m+=u.ec,l(v,u.ec));else l(0,a.byteLength);return w.h(Promise.all(k),2)}return w.return(h)})}
function $p(a,b,c){var d,e,f,g,h,k,l,m;return H(function(n){if(n.i==1){if(!a||!a.byteLength||a.byteLength%16!==0)return n.return(new Uint8Array(0));d=a.byteLength/16;e=a.subarray((d-1)*16,d*16);f=e.map(function(p){return 16^p});g=new Uint8Array(16);return n.h(crypto.subtle.encrypt({name:"AES-CBC",iv:g},c,f),2)}if(n.i!=3)return h=n.j,k=new Uint8Array(h,0,16),l=new Uint8Array(a.byteLength+16),l.set(a,0),l.set(k,a.byteLength),n.h(crypto.subtle.decrypt({name:"AES-CBC",iv:b},c,l),3);m=n.j;return n.return(yb(m))})}
function Zp(a,b){for(var c=15;c>=8&&b>0;c--)b+=a[c],a[c]=b&255,b>>>=8}function aq(a){if(!a)return!1;var b;return(b=window.crypto)!=null&&b.subtle&&$b(a.keySystem)?!ob().Sh():!1};function bq(a){this.h=a=a===void 0?[]:a}function cq(a,b){return dq("stbl",eq(b),fq.value(),gq.value(),hq.value(),iq.value())}function eq(a){var b=new Uint8Array([]);switch(a.type){case "video":var c=jq.find(function(d){d=t(d).next().value;return a.codecs.includes(d)});c&&(b=kq(a,c[0],c[1]));break;case "audio":b=lq(a)}return dq("stsd",mq.value(),b)}
function kq(a,b,c){var d=a.stream.width||0,e=a.stream.height||0,f=new Uint8Array([]);a.cb.byteLength>0&&(f=dq(c,a.cb));c=nq.value();oq(c,d,24);oq(c,e,26);if(a.Ac||a.Mc){d=a.Ac||0;e=a.Mc||0;var g=pq("pasp",8);qq(g,d,8);qq(g,e,12);d=g}else d=new Uint8Array([]);g=(e=a.Im)&&(e.length<5?null:{profile:e[2]>>1,level:(e[2]&1)<<5|e[3]>>3,Pm:!!(e[3]&4),Km:!!(e[3]&2),xm:!!(e[3]&1),ym:e[4]>>4});e=e&&g?dq(g.profile>7?"dvvC":"dvcC",e):new Uint8Array([]);g=new Uint8Array([]);rq(a.stream)&&(g=sq(a.stream,a.codecs),
b="encv");return dq(b,c,f,e,d,g)}
function lq(a){var b="aac";a.codecs.includes("mp3")?b="mp3":a.codecs.includes("ac-3")?b=ob().Vd()?"ec-3":"ac-3":a.codecs.includes("ec-3")?b="ec-3":a.codecs.includes("opus")?b="opus":a.codecs.toLowerCase().includes("flac")&&(b="flac");var c=a.stream.channelsCount||2,d=a.stream.audioSamplingRate||44100,e=tq.value();e[17]=c;oq(e,d>65535?0:d,24);c=new Uint8Array([]);d=a.cb;switch(b){case "mp3":b=".mp3";break;case "ac-3":b="ac-3";c=dq("dac3",d);break;case "ec-3":b="ec-3";c=dq("dec3",d);break;case "opus":b=
"Opus";c=dq("dOps",d);break;case "flac":b="fLaC";c=dq("dfLa",d);break;default:b="mp4a";c=dq;if(!(d.byteLength>0)){d=a.id+1;var f=a.stream.channelsCount||2,g=a.stream.audioSamplingRate||44100,h=wc("audio",a.codecs.split(",")),k={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},l=k[g];if(h==="mp4a.40.5"||h==="mp4a.40.29")l=k[g*2];g=parseInt(h.split(".").pop(),10);h=uq.value();oq(h,d,6);h[26]=g<<3|l>>>1;h[27]=l<<7|f<<3;d=h}c=c("esds",d)}d=new Uint8Array([]);
rq(a.stream)&&(d=sq(a.stream,a.codecs),b="enca");return dq(b,e,c,d)}function vq(a){var b=[];if(!rq(a))return new Uint8Array([]);a=t(a.drmInfos);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.initData){c=t(c.initData);for(var d=c.next();!d.done;d=c.next())b.push(d.value.initData)}return Sb.apply(Mb,wa(b))}
function sq(a,b){var c=dq,d=b.split(".")[0];b=pq("frma",4);qq(b,wq(d),8);d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);e=xq.value();qq(e,wq(d),4);d=dq("schm",e);e=dq;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next()){f=h.value;h=new Uint8Array(f.length/2);for(var k=0;k<f.length/2;k+=1)h[k]=parseInt(String(f[k*2]+f[k*2+
1]),16);f=h}}a=dq("tenc",yq.value(),f);return c("sinf",b,d,e("schi",a))}
function zq(a){var b=[],c=0;a=t(a.h);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=dq,f=d.data?d.data.sequenceNumber:0,g=pq("mfhd",8);qq(g,f,12);f=g;var h,k=d.data?d.data.Sa:[];g=pq("sdtp",4+k.length);for(h=0;h<k.length;h++){var l=k[h].flags;g[h+12]=l.Ee<<4|l.Qe<<2|l.Oe}var m=g.length+32+20+8+16+8+8;k=dq;h=d.id+1;l=Aq.value();qq(l,h,4);h=dq("tfhd",l);l=d.data?d.data.za:0;var n=Math.floor(l/(Bq+1)),p=Math.floor(l%(Bq+1));l=pq("tfdt",12);l[8]=1;qq(l,n,12);qq(l,p,16);var u=m;m=d.data?d.data.Sa:
[];n=m.length;var q=12+16*n;p=pq("trun",q);u+=8+q;p[8]=d.type==="video"?1:0;p[9]=0;p[10]=15;p[11]=1;qq(p,n,12);qq(p,u,16);for(u=0;u<n;u++){q=m[u];var v=q.flags,w=20+16*u;qq(p,q.duration,w);qq(p,q.size,w+4);p[w+8]=v.pg<<2|v.Ee;p[w+9]=v.Qe<<6|v.Oe<<4|v.qg;p[w+10]=v.De&61440;p[w+11]=v.De&15;qq(p,q.ab,w+12)}g=k("traf",h,l,p,g);e=e("moof",f,g);d=d.data?d.data.Sa:[];f=0;g=t(d);for(k=g.next();!k.done;k=g.next())f+=k.value.data.byteLength;f=8+f;b.push({Fk:e,Sa:d,Od:f});c+=e.byteLength+f}c=yb(new ArrayBuffer(c));
a=0;b=t(b);for(d=b.next();!d.done;d=b.next())for(f=d.value,d=f.Fk,e=f.Sa,f=f.Od,c.set(d,a),a+=d.byteLength,qq(c,f,a),c.set(Cq.value(),a+4),a+=8,d=t(e),e=d.next();!e.done;e=d.next())e=e.value,c.set(e.data,a),a+=e.data.byteLength;return c}function qq(a,b,c){a[c]=b>>>24&255;a[c+1]=b>>>16&255;a[c+2]=b>>>8&255;a[c+3]=b&255}function oq(a,b,c){a[c]=b>>>8&255;a[c+1]=b&255}function wq(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function dq(a){for(var b=Ja.apply(1,arguments),c=0,d=t(b),e=d.next();!e.done;e=d.next())c+=e.value.byteLength;c=pq(a,c);d=8;for(e=0;e<b.length;e++)c.set(b[e],d),d+=b[e].byteLength;return c}function pq(a,b){var c=Dq.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Dq.set(a,c));a=8+b;b=new Uint8Array(a);b[0]=a>>24&255;b[1]=a>>16&255;b[2]=a>>8&255;b[3]=a&255;b.set(c,4);return b}function rq(a){return a.encrypted&&a.drmInfos.length>0}
var Bq=4294967295,Dq=new Map,Cq=new nb(function(){return new Uint8Array([109,100,97,116])}),Eq=new nb(function(){return new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,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])}),Fq=new nb(function(){return new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,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,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])}),Gq=new nb(function(){return new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}),Hq=new nb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}),Aq=new nb(function(){return new Uint8Array([0,0,0,58,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}),uq=new nb(function(){return new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,
0,0,0,0,0,0,0,0,0,0,5,2,0,0,6,1,2])}),tq=new nb(function(){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0])}),nq=new nb(function(){return 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,0,0,0,0,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])}),yq=new nb(function(){return new Uint8Array([0,0,0,0,0,0,1,8])}),xq=new nb(function(){return new Uint8Array([0,0,0,
0,0,0,0,0,0,1,0,0])}),Iq=new nb(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])}),Jq=new nb(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])}),Kq=new nb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),Lq=new nb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),jq=[["avc1","avcC"],["hvc1","hvcC"],["av01",
"av1C"],["vp09","vpcC"],["dvh1","hvcC"],["dva1","avcC"],["dav1","av1C"]],mq=new nb(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),Mq=new nb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return dq("ftyp",a,c,a,b)}),Nq=new nb(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=dq("dref",a);return dq("dinf",a)}),fq=new nb(function(){return pq("stts",8)}),gq=new nb(function(){return pq("stsc",8)}),
hq=new nb(function(){return pq("stsz",12)}),iq=new nb(function(){return pq("stco",8)});function Oq(a){a=yb(a);var b=null;(new jh).ma(uh,oh).P("stsd",qh).box("enca",function(c){b=c.reader.i;return sh(c)}).box("sinf",oh).box("frma",function(c){c.parser.stop();Mh(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}function Pq(a){a=yb(a);var b=null,c=-1;(new jh).ma(uh,oh).P("stsd",qh).ma(["encv","hvc1"],function(d){b=d.reader.i;c=d.start;return rh(d)}).box("dvvC",function(d){d.parser.stop();b.setUint32(d.start-c-4,1718773093)}).parse(a);return a}
function Qq(a,b,c,d){var e=b=yb(b),f=!1,g,h=[],k=[];(new jh).ma(uh,function(m){h.push(m);oh(m)}).P("stsd",function(m){g=m;h.push(m);qh(m)}).ma(["encv","enca"],function(m){f=!0;m.parser.stop()}).ma(yh,function(m){k.push({box:m,mi:1701733238})}).ma([].concat(wa(zh),["mp4a"]),function(m){k.push({box:m,mi:1701733217})}).parse(b);if(f)return b;if(k.length==0||!g)throw ab(Rb(b)),new L(2,3,3019,c);k.reverse();c=t(k);for(var l=c.next();!l.done;l=c.next())l=l.value,e=Rq(a,e,g,l.box,h,l.mi,d);e=Sq(a,e);return ob().Qg(d)?
(a=new Uint8Array(b.byteLength+e.byteLength),a.set(e),a.set(b,e.byteLength),a):e}function Tq(a){a=yb(a);var b=[];(new jh).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(Uq(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return Sb.apply(Mb,wa(c))}
function Uq(a){var b,c,d,e,f=[];(new jh).ma(vh,function(m){f.push(m);oh(m)}).P("tfhd",function(m){b=m;d=Eh(m.reader,m.flags)}).P("trun",function(m){c=m;e=Hh(m.reader,m.version,m.flags)}).parse(a);if(d&&d.Ug!==2){var g=b.start+ph(b)+4+(d.yh!==null?8:0),h=Bb(a);if(d.Ug!==null)h.setUint32(g,2);else{Vq(a,b.start,b.size+4);var k=h.getUint32(b.start+8);h.setUint32(b.start+8,k|2);e&&e.ac!==null&&h.setInt32(c.start+ph(c)+4,e.ac+4);k=a.subarray(0,g);h=a.subarray(g);a=new Uint8Array(a.byteLength+4);a.set(k);
k=[];for(var l=3;l>=0;l--)k.push(2>>8*l&255);a.set(new Uint8Array(k),g);a.set(h,g+4);g=t(f);for(h=g.next();!h.done;h=g.next())h=h.value,Vq(a,h.start,h.size+4)}}return a}
function Rq(a,b,c,d,e,f,g){var h=sq(a,d.name),k=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+h.byteLength);a.set(k,0);Bb(a).setUint32(4,f);a.set(h,d.size);Vq(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=ob().Pe(g)?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,Vq(f,e.start,e.size+a.byteLength);a=Bb(f,c.start);c=ph(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function Sq(a,b){a=vq(a);if(a.byteLength===0)return b;var c=0,d=0;(new jh).box("moov",function(h){c=h.start;d=h.size;h.parser.stop()}).parse(b);var e=c+d;Vq(b,c,d+a.byteLength);var f=new Uint8Array(b.byteLength+a.byteLength),g=b.subarray(e);f.set(b.subarray(0,e));f.set(a,e);f.set(g,e+a.byteLength);return f}function Vq(a,b,c){a=Bb(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 Wq(a){var b=yb(a),c=[];(new jh).ma(uh,function(d){c.push({start:d.start,size:d.size});oh(d)}).box("stsd",function(d){c.push({start:d.start,size:d.size});for(var e=Bb(b,d.start),f=0;f<d.size-3;f++){var g=e.getUint32(f);g==1633889587?e.setUint32(f,1700998451):g==1684103987&&e.setUint32(f,1684366131)}}).parse(b);return b}
function Xq(a){a=yb(a);var b=[],c=[],d=[],e=[],f=!1;(new jh).box("moof",function(A){b.push(A);oh(A)}).box("traf",function(A){c.push(A);oh(A)}).P("tfhd",function(A){d.push(A)}).P("trun",function(A){e.push(A)}).ma(["senc","saiz","saio"],function(){f=!0}).parse(a,!1,!0);if(f||b.length!=1||c.length!=1||d.length!=1||e.length!=1)return a;var g=b[0],h=c[0],k=d[0],l=e[0],m=l.flags,n=Eh(k.reader,k.flags),p=Hh(l.reader,l.version,l.flags);if(n.yh!=null||!(m&1)||p.ac==null)return a;var u=g.start+g.size,q=Bb(a);
if(u+8>a.byteLength||q.getUint32(u+4)!=1835295092)return a;q=q.getUint32(u);if(q==1)return a;q==0&&(q=a.byteLength-u);var v=a.byteLength-(u+8);if(v>=q-8)return a;for(var w=q=0,x=t(p.sc),y=x.next();!y.done;y=x.next()){y=y.value;y=y.sampleSize!=null?y.sampleSize:n.cc;if(y==null)return a;if(q+y>v)break;q+=y;w++}if(w!=1||w>=p.sampleCount)return a;x=(m&256)!=0;v=0;y=t(p.sc);for(var z=y.next();!z.done;z=y.next()){z=z.value;z=x?z.tc:n.Hb;if(z==null)return a;v+=z}y=ph(l);z=l.start+y+4;z+=4;m&4&&(z+=4);var C=
0;m&256&&(C+=4);m&512&&(C+=4);m&1024&&(C+=4);m&2048&&(C+=4);m=(p.sampleCount-w)*C;C=z+w*C;if(C+m!=u)return a;C=a.slice(0,C);var B=Bb(C);B.setUint32(l.start+y,w);B.setInt32(l.start+y+4,p.ac-m);x?B.setUint32(z,v):(k=k.start+ph(k)+4,n.Ug!=null&&(k+=4),B.setUint32(k,v));Vq(C,l.start,l.size-m);Vq(C,h.start,h.size-m);Vq(C,g.start,g.size-m);g=a.slice(u,u+8);Vq(g,0,8+q);return Sb(C,g,a.subarray(u+8,u+8+q))};function Yq(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Zq(a){return!a||Yq(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function $q(a){return!a||Yq(a)?null:a.length?a.end(a.length-1):null}function ar(a,b){return!a||!a.length||Yq(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function br(a,b){if(!a||!a.length||Yq(a))return 0;var c=0;a=t(cr(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 dr(a,b){if(!a||!a.length||Yq(a))return 0;var c=0;a=t(cr(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;d<b&&(c+=Math.min(e,b)-d)}return c}function er(a,b,c){if(!a||!a.length||Yq(a))return null;a=cr(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function cr(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 fr(a,b,c,d,e,f){var g=this;this.B=d;this.I=e||function(){return a.playbackRate};this.K=f||function(){return[]};this.h=a;this.F=b;this.i=c;this.m=new ib;this.u=!1;this.o=0;this.D=!1;this.H=this.G=0;this.l=gr(this);this.C=!1;this.m.J(a,"waiting",function(){return hr(g)});this.j=(new $e(function(){hr(g)})).La(this.i.gapJumpTimerTime)}
fr.prototype.release=function(){this.m&&(this.m.release(),this.m=null);this.j!=null&&(this.j.stop(),this.j=null);this.l&&(this.l.release(),this.l=null);this.h=this.F=this.B=null};fr.prototype.ed=function(){this.C=!0;this.j&&this.j.La(this.i.gapJumpTimerTime);hr(this)};
function hr(a){if(a.h.readyState!=0){if(a.h.seeking){if(!a.u)return}else a.u=!1;if(!a.h.paused||a.h.currentTime==a.o&&(a.h.autoplay||a.h.currentTime!=a.o))if(!a.l||!ir(a.l)){var b=a.h.currentTime,c=a.h.buffered,d=a.i.gapDetectionThreshold;if(!(a.I()<0)){d=er(c,b,d);if(d==null&&a.l&&!ir(a.l))for(var e=cr(c),f=0;f<e.length-1;f++)if(Math.abs(b-e[f].end)<.1&&e[f+1].start>e[f].end){d=f+1;break}if(d!=null&&(d!=0||a.C)){if(d>0){var g=c.end(d-1);if(a.K().some(function(h){return g>=h.start-.1&&g<h.end})&&
g-b>.1)return}e=c.start(d);(f=a.i.gapPadding)&&(e=Math.ceil((e+f)*100)/100);f=a.F.pb();e>=f||e-b<.001||(d==0||Za(c.end(d-1)),jr(a,e),b==a.o&&(a.o=e),a.G++,a.B(new xk("gapjumped")))}}}}}function jr(a,b){a.D=!0;a.m.Ra(a.h,"seeked",function(){a.D=!1});a.h.currentTime=b}
function gr(a){if(!a.i.stallEnabled)return null;var b=a.i.stallThreshold,c=a.i.stallSkip;return new kr(new lr(a.h),b,function(d,e,f){var g;return H(function(h){if(h.i==1)return g=cr(a.h.buffered),g.length?c?(a.h.currentTime+=c,h.A(2)):h.h(a.h.play(),3):h.return();if(h.i!=2){if(!a.h)return h.return();a.h.pause();a.h.play()}f==0&&(a.H++,a.B(new xk("stalldetected")));h.l()})})}function kr(a,b,c){this.j=a;this.B=mr(a);this.i=a.h.currentTime;this.o=Date.now()/1E3;this.m=this.h=0;this.u=b;this.l=c}
kr.prototype.release=function(){this.j&&this.j.release();this.l=this.j=null};function ir(a){var b=a.j,c=mr(b),d=b.h.currentTime,e=Date.now()/1E3;if(a.i!=d||a.B!=c)a.o=e,a.i=d,a.B=c,a.h=0;d=e-a.o;if(c=d>=a.u&&c&&a.h<3&&(a.h==0||e-a.m>=a.u))a.l&&a.l(a.i,d,a.h),a.h++,a.m=e,a.i=b.h.currentTime;return c}
function lr(a){var b=this;this.h=a;this.i=new ib;this.j=!1;this.i.J(this.h,"audiofocuspaused",function(){b.j=!0});this.i.J(this.h,"audiofocusgranted",function(){b.j=!1});this.i.J(this.h,"audiofocuslost",function(){b.j=!0})}function mr(a){if(a.h.paused||a.h.playbackRate==0||a.j||a.h.buffered.length==0)var b=!1;else a:{b=a.h.currentTime;a=t(cr(a.h.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}
lr.prototype.release=function(){this.i&&this.i.release();this.i=null};function nr(a,b,c){this.i=a;this.j=b;this.h=c}
function or(a,b){var c,d,e;return H(function(f){if(f.i==1)return f.h(kf(a.h,b,a.i.drm.preferredKeySystems,a.i.drm.keySystemsMapping),2);a.i.streaming.dontChooseCodecs||(c=a.i.preferredVideo.map(function(g){return g.codec}).filter(Boolean),d=a.i.preferredAudio.map(function(g){return g.codec}).filter(Boolean),e=a.i.preferredText.map(function(g){return g.format}).filter(Boolean),gf(b,c,d,a.i.preferredDecodingAttributes,e));if(!b.variants.some(Nf))throw new L(2,4,4032);return f.return(pr(a,b))})}
function qr(a,b){var c=a.i.restrictions;a=a.j;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=jf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function pr(a,b){var c=qr(a,b);if(b){var d=a.h?a.h.Tb():null;if(d&&a.h.B){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())rr(a,d.keySystem,f.value)}sr(a,b)}return c}
function rr(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){for(var e=t(d.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,sl(a.h,f.initDataType,f.initData);e=a.h;e.h&&(e.h.mediaTypes!==d.mediaTypes&&(e.h.mediaTypes=d.mediaTypes),Xb(d)&&(e.h=El(e,e.h.keySystem,[e.h,d])),e.$.size&&yl(e)&&e.H.ea(Nl))}}
function sr(a,b){function c(l){if(l&&!h.has(l)&&(h.add(l),l.keyIds.size)){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=d[e?"00":m];n?tr.includes(n)&&g.add(n):f.add(m)}}}var d=a.h?a.h.Ke():{};a=Object.keys(d);var e=a.length&&a[0]=="00";a=!1;var f=new Set,g=new Set,h=new WeakSet;b=t(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 L(2,4,4012,a);}var tr=["output-restricted","internal-error"];function ur(a,b,c){this.i=a;this.B=c===void 0?null:c;this.C=b===void 0?"":b;this.j=!1;this.u=0;this.h=new Map;this.l=vr++;this.m=this.o=!1}r=ur.prototype;r.destroy=function(){for(var a=t(this.h.values()),b=a.next();!b.done;b=a.next())b=b.value,b.Lc.stop(),b.reject(new L(2,3,3018,"Worker transmuxer destroyed"));this.h.clear();this.m&&(wr&&wr.postMessage({cmd:"destroy",id:this.l}),xr.delete(this.l),this.m=!1,xr.size===0&&wr&&yr.ea(10));this.i.destroy()};
r.isSupported=function(a,b){return this.i.isSupported(a,b)};r.convertCodecs=function(a,b){return this.i.convertCodecs(a,b)};r.getOriginalMimeType=function(){return this.i.getOriginalMimeType()};
r.transmux=function(a,b,c,d,e){var f=this,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F;return H(function(E){if(E.i==1){if(f.j)return E.return(f.i.transmux(a,b,c,d,e));if(!f.m){g=zr(f.C);if(!g)return f.j=!0,E.return(f.i.transmux(a,b,c,d,e));yr.stop();xr.set(f.l,f);f.m=!0}h=wr;if(!h)return f.j=!0,E.return(f.i.transmux(a,b,c,d,e));f.o||(k=f.i.getOriginalMimeType(),h.postMessage({cmd:"init",id:f.l,mimeType:k,priority:f.B,typeSupport:Array.from(Qm)}),f.o=!0);l=f.u++;m={id:b.id,codecs:b.codecs,channelsCount:b.channelsCount,
audioSamplingRate:b.audioSamplingRate,height:b.height,width:b.width,language:b.language};n=c?{discontinuitySequence:c.discontinuitySequence,startTime:c.startTime,endTime:c.endTime,uris:c.S()}:null;p=xb(Sb(a));u=Promise.withResolvers();q=u.promise;v=u.resolve;w=u.reject;x=!1;y=new $e(function(){f.h.has(l)&&(f.h.delete(l),x=f.j=!0,v(null))});y.ea(30);f.h.set(l,{resolve:v,reject:w,Lc:y});try{h.postMessage({cmd:"transmux",id:f.l,reqId:l,data:p,streamProps:m,refProps:n,duration:d,contentType:e},[p])}catch(G){return y.stop(),
f.h.delete(l),Ar(),E.return(f.i.transmux(a,b,c,d,e))}return E.h(q,2)}z=E.j;if(x||z===null)return Wa("Worker transmux unavailable; falling back to main-thread transmuxing"),E.return(f.i.transmux(a,b,c,d,e));if((C=z.streamMutations)&&Object.keys(C).length>0)for(B=t(Object.keys(C)),A=B.next();!A.done;A=B.next())D=A.value,b[D]=C[D];F=z.output;return F.type==="raw"?E.return(yb(F.data)):E.return({data:yb(F.data),init:F.init?yb(F.init):null})})};K("shaka.transmuxer.TransmuxerProxy",ur);
ur.prototype.transmux=ur.prototype.transmux;ur.prototype.getOriginalMimeType=ur.prototype.getOriginalMimeType;ur.prototype.convertCodecs=ur.prototype.convertCodecs;ur.prototype.isSupported=ur.prototype.isSupported;ur.prototype.destroy=ur.prototype.destroy;var vr=0,wr=null,xr=new Map,yr=new $e(function(){xr.size===0&&wr&&(wr.terminate(),wr=null)});
function zr(a){if(wr)return wr;if(!ob().md()||!a)return null;try{var b=new Worker(a);b.addEventListener("message",function(c){c=c.data;var d=c.cmd;if(d==="transmuxed"||d==="error"||d==="unavailable")if(d=xr.get(c.id)){var e=c.cmd;if(e==="unavailable"){d.j=!0;var f=d.h.get(c.reqId);f&&(f.Lc.stop(),d.h.delete(c.reqId),f.resolve(null))}else if(e==="transmuxed"||e==="error"){var g=c.reqId;if(f=d.h.get(g))f.Lc.stop(),d.h.delete(g),e==="error"?(c=c.error,f.reject(new (Function.prototype.bind.apply(L,[null,
c.severity,c.category,c.code].concat(wa(c.data)))))):f.resolve(c)}}});b.addEventListener("error",function(){Ar()});return wr=b}catch(c){return null}}function Ar(){for(var a=t(xr.values()),b=a.next();!b.done;b=a.next()){b=b.value;b.j=!0;for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Lc.stop(),d.resolve(null);b.h.clear()}yr.stop();wr=null;xr.clear()};function Br(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 Cr(a,b,c,d,e){var f=this;this.h=a;this.F=c;this.u=d;this.ra=b;this.l=new Map;this.D=new Map;this.V=new Map;this.Ma=new Map;this.i=null;this.Ga=!1;this.H=e||null;this.B=new Map;this.C=new ib;this.m=new Map;this.I=null;this.O=Promise.withResolvers();this.Da="";this.fb=!1;this.Ca=!0;this.na=!1;this.L=this.ia=null;this.j=Dr(this,this.O);this.Oa=this.Pa=this.K=!1;this.G=new Yk(function(){return Er(f)});this.M=!1;this.Y="UNKNOWN";this.o=this.$a=this.eb=!1;this.Aa=null;this.Qa=new Map;this.sa=this.$=
this.va=this.T=null;this.ba=Promise.withResolvers();var g=Uj(ob(),this.h);g&&(this.na=g.state!="disconnected",this.C.Lb(g,["connect","connecting","disconnect"],function(){f.na=g.state!="disconnected"}));this.Ya=!1;this.N=new Map}
function Dr(a,b){a.Ca=!0;if(window.ManagedMediaSource){a.L||(a.h.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.C.J(c,"startstreaming",function(){a.Ca=!0});a.C.J(c,"endstreaming",function(){a.Ca=!1})}else c=new MediaSource;a.C.Ra(c,"sourceopen",function(){URL.revokeObjectURL(a.Da);b.resolve()});a.C.Ra(a.h,"playing",function(){a.fb=!0});a.Da=Fr(c);Gr(a);a.u.useSourceElements?(a.ia=Mj(a.Da),a.h.appendChild(a.ia),a.L&&a.h.appendChild(a.L),a.h.load()):a.h.src=a.Da;return c}
function Hr(a,b,c){if(a.h&&window.ManagedMediaSource&&a.j&&a.u.useSourceElements){var d;((d=a.L)==null?void 0:d.parentElement)===a.h&&a.h.removeChild(a.L);a.L=Mj(b,c);a.h.appendChild(a.L);a.h.disableRemotePlayback=!1}}
function Ir(){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="mp3",audio/mp4; codecs="mp4a.6B",audio/mp4; codecs="mp4a.69",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",audio/mp4; codecs="iamf.000.000.Opus",audio/mp4; codecs="iamf.000.000.mp4a.40.2",audio/mp4; codecs="iamf.000.000.fLaC",audio/mp4; codecs="iamf.000.000.ipcm",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(wa(we)),b=
{};ob();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Pe(c))b[c]=!0;else if(Kc()){var d=De(c),e=Ge(Ee(c),d);d=se(d,e);b[c]=Pm(d)||(oe(d)?!0:!1)}else b[c]=Mc().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}r=Cr.prototype;r.destroy=function(){return this.G.destroy()};
function Er(a){var b,c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y;return H(function(z){if(z.i==1){b=[];c=t(a.B);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.B.set(l,h.slice(0,1)),k&&b.push(k.p.promise.catch(function(){})),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())p=n.value,p.p.reject(new L(2,7,7003,void 0));a.i&&b.push(a.i.destroy());return z.h(Promise.all(b),2)}b=[];u=t(a.m.values());for(q=u.next();!q.done;q=u.next())v=q.value,v.destroy();w=t(a.N.values());
for(x=w.next();!x.done;x=w.next())y=x.value,b.push(y.destroy());a.C&&(a.C.release(),a.C=null);a.h&&(Gr(a),a.h.load(),a.h.disableRemotePlayback=!1);a.h=null;a.ia=null;a.L=null;a.u=null;a.j=null;a.i=null;a.ra=null;a.l.clear();a.V.clear();a.Ma.clear();a.N.clear();a.m.clear();a.I=null;a.B.clear();a.H=null;a.Qa.clear();a.F=null;return z.h(Promise.all(b),0)})}
function Gr(a){if(a.h){a.h.removeAttribute("src");var b;((b=a.ia)==null?void 0:b.parentElement)===a.h&&a.h.removeChild(a.ia);var c;((c=a.L)==null?void 0:c.parentElement)===a.h&&a.h.removeChild(a.L)}}
r.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 H(function(n){if(n.i==1)return f=Bc,n.h(e.O.promise,2);if(n.i!=3){if(!Jr(e)&&!Kr(e))return n.A(3);Va("Expected MediaSource to be open during init(); reopening the media source.");e.O=Promise.withResolvers();e.j=Dr(e,e.O);return n.h(e.O.promise,3)}e.M=b;e.Y=c;e.eb=d;e.$a=!e.M&&e.Y=="HLS"&&!e.eb;e.Qa.clear();e.T=null;e.va=null;e.$=null;e.sa=null;e.ba=Promise.withResolvers();g=t(a.keys());
for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),Lr(e,k,l,l.codecs),e.o?(e.B.set(f.Z,[]),e.B.set(f.qa,[])):e.B.set(k,[]);(m=a.get(f.Z))&&m.isAudioMuxedInVideo&&(e.o=!0);n.l()})};
function Lr(a,b,c,d){b=="audio"&&d&&(d=Ge(d,c.mimeType));b=="video"&&d&&c.mimeType=="video/mp4"&&(d=He(d,c.mimeType));var e=se(c.mimeType,d);if(b==zc)Mr(a,e,c.external);else{var f=Pm(e)&&(a.M||!we.includes(e)),g=xe(c.mimeType,d);if(a.u.forceTransmux||!f){var h=oe(g),k=xc("audio",(d||"").split(","));d=xc("video",(d||"").split(","));if(k&&d&&(h||!f)){a.o=!0;Lr(a,"audio",c,k);Lr(a,"video",c,d);return}h&&(e=new ur(h(),a.u.transmuxWorkerUrl,qe(g,h)),a.m.set(b,e),e=e.convertCodecs(b,g))}g=e+a.u.addExtraFeaturesToSourceBuffer(e);
Zk(a.G);try{var l=a.j.addSourceBuffer(g)}catch(n){throw new L(2,3,3015,n,"The mediaSource_ status was "+a.j.readyState+" expected 'open'",null);}a.M&&(l.mode=Nr);a.C.J(l,"error",function(){var n=a.B.get(b)[0];n.p.reject(new L(2,3,3014,a.h.error?a.h.error.code:0,n.uri))});a.C.J(l,"updateend",function(){return Or(a,b)});a.l.set(b,l);a.D.set(b,e);a.Ma.set(b,!!c.drmInfos.length);c=a.F.Tb();if(aq(c))a.N.set(b,new Op);else{var m;(m=a.N.get(b))==null||m.destroy();a.N.delete(b)}}}
r.configure=function(a){this.u=a;this.i&&(this.i.G=a.modifyCueCallback)};function Pr(a){return a.Ca&&!a.na&&!a.K}function Mr(a,b,c){a.i||(a.i=new Le(a.ra,a.Y),a.i&&(a.i.G=a.u.modifyCueCallback));var d=a.i;a=a.Ga;b==Je||b==Ke?d.m=null:(d.m=Ne.get(b)(),d.m.setManifestType(d.F),d.I=a,d.D=c)}function Jr(a){return a.K?!1:a.j?a.j.readyState=="ended":!0}function Kr(a){return a.K?!1:a.j?a.j.readyState=="closed":!0}function Qr(a,b){return a.l.size?b==zc?a.i.h:Zq(Rr(a,b)):null}
function Sr(a,b){return a.l.size?b==zc?a.i.i:$q(Rr(a,b)):null}function Tr(a,b,c){if(b==zc)return a=a.i,a.h==null||a.i==null?!1:c>=a.h&&c<a.i;a=Rr(a,b);return ar(a,c)}function Ur(a,b,c){if(b==zc)return a=a.i,a.i==null||a.i<c?0:a.i-Math.max(c,a.h);a=Rr(a,b);return br(a,c)}function Vr(a,b,c){if(b==zc)return a=a.i,a.h==null||a.h>c?0:Math.min(c,a.i)-a.h;a=Rr(a,b);return dr(a,c)}
r.fc=function(){var a={total:this.K?[]:cr(this.h.buffered),audio:cr(Rr(this,"audio")),video:cr(Rr(this,"video")),text:[]};if(this.i){var b=this.i.h,c=this.i.i;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function Rr(a,b){if(!Wr(a))return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function Xr(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=yb(c);if(we.includes(f)||b=="audio"&&!f.includes("/mp4")&&!f.includes("/webm")&&!Pi(l)&&Tm(l))c=ni(l),c.length&&d&&((g=c.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=g.data/1E3),a.F.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.initSegmentReference){l=new jh;var m=e.emsgSchemeIdUris!=
null&&e.emsgSchemeIdUris.length>0||a.u.dispatchAllEmsgBoxes,n=[];m&&l.P("emsg",function(v){a:{var w=e.emsgSchemeIdUris;if(v.version===0){var x=v.reader.hd();var y=v.reader.hd();var z=v.reader.R();var C=v.reader.R();var B=v.reader.R();var A=v.reader.R();var D=d.startTime+C/z}else z=v.reader.R(),D=v.reader.$e()/z+d.m,C=D-d.startTime,B=v.reader.R(),A=v.reader.R(),x=v.reader.hd(),y=v.reader.hd();v=v.reader.wa(v.reader.Na()-v.reader.Ia(),!0);if(w&&w.includes(x)||a.u.dispatchAllEmsgBoxes)if(x=="urn:mpeg:dash:event:2012")a.F.Ok();
else{w=D;if(x!=="https://aomedia.org/emsg/ID3"||B!==4294967295)w+=B/z;z={startTime:D,endTime:w,schemeIdUri:x,value:y,timescale:z,presentationTimeDelta:C,eventDuration:B,id:A,messageData:v};break a}z=null}z&&n.push(z)});var p=d.initSegmentReference.timescale;b=p&&!isNaN(p);var u=0,q=!1;b&&l.P("prft",function(v){var w=v.reader,x=v.version;w.R();v=w.R();var y=w.R();v=v*1E3+y/4294967296*1E3;x===0?w=w.R():(x=w.R(),w=w.R(),w=x*4294967296+w);v=(new Date(Date.UTC(1900,0,1,0,0,0,0)+v)).getTime();w=(new Map).set("detail",
{wallClockTime:v,programStartDate:new Date(v-w/p*1E3)});w=new xk("prft",w);a.F.onEvent(w)}).ma(vh,oh).P("tfdt",function(v){q||(u=Fh(v.reader,v.version).za/p,q=!0,m||v.parser.stop())});(m||b)&&l.parse(c,!1,g);q&&d.m==0&&(h=u);l=t(n);for(c=l.next();!c.done;c=l.next())Yr(a,c.value,d,h)}else f.includes("/mp4")||f.includes("/webm")||!Pi(l)||(k=a.Qa.getOrInsertComputed(b,function(){return new Ci}),k.clearData(),k.hf(d.discontinuitySequence),k.parse(l),l=Ji(k,b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,
metadata:k}}function Yr(a,b,c,d){var e=Br(b.startTime,c.startTime+b.presentationTimeDelta/b.timescale);d&&a.Y=="HLS"&&!e&&(c=-d+c.startTime,b.startTime+=c,b.endTime+=c);a.F.Lk(b);!b.messageData||b.schemeIdUri!="https://aomedia.org/emsg/ID3"&&b.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(c=ni(b.messageData),c.length&&(d=b.startTime,a.F.onMetadata([{cueTime:d,data:b.messageData,frames:c,dts:d,pts:d}],0,b.endTime)))}
function Zr(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,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea,ha,I,T,R,S,X,ka,na,Aa,ja;return H(function(ua){switch(ua.i){case 1:n=Bc;if(b!=n.Ua){ua.A(2);break}return ua.h(Qe(a.i,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null,d?d.discontinuitySequence:-1),3);case 3:return ua.return({Dc:null});case 2:if(l||!a.o){ua.A(4);break}return ua.h(Zr(a,n.qa,c,d,e,f,g,h,k,!0,m),5);case 5:return p=ua.j,ua.h(Zr(a,
n.Z,c,d,e,f,g,h,k,!0,m),6);case 6:return u=ua.j,ua.return(p.Dc!=null?p:u);case 4:if(!a.l.has(b))return ua.return({Dc:null});e.preselection&&(q={data:c,preselection:e.preselection,stream:e,contentType:b,isInitSegment:d==null},(v=a.u.modifyPreselectionSegmentCallback(q))&&v.data&&(c=v.data));w=a.V.has(b)?a.V.get(b):a.l.get(b).timestampOffset;x=null;Jr(a)&&$r(a,b,function(){var vb=a.l.get(b);if(Jr(a)){var wb=vb.buffered;wb=wb.length?wb.end(wb.length-1):0;vb.remove(wb,wb+.001)}else Or(a,b)},null);y=a.D.get(b);
a.m.has(b)&&(y=a.m.get(b).getOriginalMimeType());if(!d){ua.A(7);break}z=Xr(a,b,c,d,e,y,k);C=z.timestamp;B=z.metadata;if(C==null){ua.A(8);break}x=C;a.T==null&&b==n.qa&&(a.T=C,a.va=d.startTime,a.$!=null&&(A=0,a.va==a.sa&&(A=a.T-a.$),a.ba.resolve(A)));a.$==null&&b==n.Z&&(a.$=C,a.sa=d.startTime,a.T!=null&&(D=0,a.va==a.sa&&(D=a.T-a.$),a.ba.resolve(D)));E=as;G=b==n.Z&&a.o&&!a.M&&a.T!=null&&a.l.has(n.qa)&&a.l.get(n.Z).mode==E.aj;if(!G){J=C;N=we;!a.M&&N.includes(a.D.get(b))&&(J=0);F=d.startTime-J;ua.A(9);
break}P=a.V.has(n.qa)?a.V.get(n.qa):a.l.get(n.qa).timestampOffset;return ua.h(a.ba.promise,10);case 10:U=ua.j,F=P+U;case 9:Q=Math.abs(w-F),(Q>=.001||g||h)&&(!k||F>0||!w)&&(w=F,a.$a&&($r(a,b,function(){return bs(a,b)},null),$r(a,b,function(){return cs(a,b,w)},null))),(M=b==n.qa||!a.l.has(n.qa))&&a.i&&((a.M||a.Y=="HLS")&&Te(a.i,w,d.discontinuitySequence),Ue(a.i,(y||"").includes("mp2t")));case 8:if(B.length)a.F.onMetadata(B,w,d?d.endTime:null);case 7:O=null;if(!a.m.has(b)){ua.A(11);break}return ua.h(a.m.get(b).transmux(c,
e,d,a.j.duration,b),12);case 12:V=ua.j,ArrayBuffer.isView(V)?c=V:(ea=V,ea.init!=null&&(O=ha=ea.init,$r(a,b,function(){ds(a,b,ha,w,e,!0)},d?d.S()[0]:null)),c=ea.data);case 11:f&&b==n.qa&&(a.i||Mr(a,Je,!1),a.I||(I=a.D.get(b)||y,a.I=new Rc(I.split(";",1)[0])),!O&&d||a.I.init(O||c,h,m),d&&(T=Vc(a.I,c),T.length&&Ze(a.i,T,w)));c=es(a,e,c,d,b);if(!a.N.has(b)){ua.A(13);break}R=ze(a.D.get(b))=="mp4";S=a.F.Tb();if(!R||!S){ua.A(13);break}X=d===null;ka=a.N.get(b);return ua.h(Pp(ka,c,X,S),15);case 15:c=ua.j;case 13:na=
we.includes(a.D.get(b));if(!d||!a.M&&!na||b==n.Ua){ua.A(16);break}if(!g&&!h){ua.A(16);break}Aa=d.startTime;if(a.Y!="HLS"||a.o||b!=n.Z||!a.l.has(n.qa)){ua.A(18);break}return ua.h(a.ba.promise,19);case 19:ja=ua.j,Math.abs(ja)>.15&&(Aa-=ja);case 18:$r(a,b,function(){return bs(a,b)},null),$r(a,b,function(){return cs(a,b,Aa)},null);case 16:return ua.h($r(a,b,function(){ds(a,b,c,w,e,!d)},d?d.S()[0]:null),20);case 20:return ua.return({Dc:x})}})}function fs(a,b){var c=Sr(a,"video")||0;Xe(a.i,b,c)}
function gs(a){a.i&&Xe(a.i,"",0)}r.remove=function(a,b,c,d){var e=this,f,g;return H(function(h){return h.i==1?(f=Bc,a==f.qa&&e.I&&(e.I.remove(d),g=e.i.h||0,e.i.remove(g,c,!0)),a==f.Ua?h.h(e.i.remove(b,c),0):c>b?h.h($r(e,a,function(){return hs(e,a,b,c)},null),5):h.A(0)):e.o?h.h($r(e,f.Z,function(){return hs(e,f.Z,b,c)},null),0):h.A(0)})};
function is(a,b){var c;return H(function(d){return d.i==1?(c=Bc,b==c.Ua?a.i?d.h(a.i.remove(0,Infinity),0):d.return():b===c.qa&&a.I&&a.i?d.h(a.i.remove(0,Infinity,!0),4):d.A(4)):d.i!=6?d.h($r(a,b,function(){return hs(a,b,0,a.j.duration)},null),6):a.o?d.h($r(a,c.Z,function(){return hs(a,c.Z,0,a.j.duration)},null),0):d.A(0)})}
r.flush=function(a){var b=this,c;return H(function(d){return d.i==1?(c=Bc,a==c.Ua?d.return():d.h($r(b,a,function(){b.h.currentTime-=.001;Or(b,a)},null),2)):b.o?d.h($r(b,c.Z,function(){var e=c.Z;b.h.currentTime-=.001;Or(b,e)},null),0):d.A(0)})};
function js(a,b,c,d,e,f,g,h,k,l){var m,n,p;return H(function(u){if(u.i==1){m=Bc;if(b==m.Ua)return f||Te(a.i,c),Ve(a.i,d,e),u.return();n=[];return u.h(ks(a,b,g,h,k,l||null),2)}p=u.j;p||(n.push($r(a,b,function(){return bs(a,b)},null)),a.o&&n.push($r(a,m.Z,function(){return bs(a,m.Z)},null)));f||(n.push($r(a,b,function(){return cs(a,b,c)},null)),a.o&&n.push($r(a,m.Z,function(){return cs(a,m.Z,c)},null)));if(d!=0||e!=Infinity)n.push($r(a,b,function(){return ls(a,b,d,e)},null)),a.o&&n.push($r(a,m.Z,function(){return ls(a,
m.Z,d,e)},null));return n.length?u.h(Promise.all(n),0):u.A(0)})}function ms(a,b,c){var d,e;return H(function(f){if(f.i==1){d=Bc;if(b==d.Ua||!a.M||(e=Sr(a,b))&&Math.abs(e-c)<.15)return f.return();$r(a,b,function(){return bs(a,b)},null);a.o&&$r(a,d.Z,function(){return bs(a,d.Z)},null);return f.h($r(a,b,function(){return cs(a,b,c)},null),2)}return a.o?f.h($r(a,d.Z,function(){return cs(a,d.Z,c)},null),0):f.A(0)})}
r.endOfStream=function(a){var b=this;return H(function(c){return c.h(ns(b,function(){Jr(b)||Kr(b)||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};r.uc=function(a){var b=this;return H(function(c){return c.h(ns(b,function(){if(b.u.durationReductionEmitsUpdateEnd&&a<b.j.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:Promise.withResolvers(),uri:null};b.B.get(e).unshift(f)}b.j.duration=a;b.Aa=a}),0)})};r.getDuration=function(){return this.j.duration};
function os(a,b,c){H(function(d){if(!Wr(a)||a.j.duration!==Infinity)return d.return();a.Ya=!0;return d.h(ns(a,function(){Wr(a)&&a.j.duration===Infinity&&a.j.setLiveSeekableRange(b,c)}),0)})}function ps(a){H(function(b){if(!Wr(a)||!a.Ya||a.j.duration!==Infinity)return b.return();a.Ya=!1;return b.h(ns(a,function(){Wr(a)&&a.j.duration===Infinity&&a.j.clearLiveSeekableRange()}),0)})}
function ds(a,b,c,d,e,f){f=f===void 0?!1:f;yb(c).byteLength==0?Or(a,b):(a.H&&Dc(a.H,c,d,e),d=f,d=d===void 0?!1:d,d=(new Map).set("data",c).set("contentType",b).set("isInitData",d),d=new xk("bufferappending",d),a.F.onEvent(d),a.l.get(b).appendBuffer(c))}function hs(a,b,c,d){if(d<=c)Or(a,b);else{if(a.H){var e=a.H;b==="video"&&e.h&&e.h.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}
function bs(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Or(a,b)}function cs(a,b,c){a.V.set(b,c);var d;if(d=c<0)d=ob().Ea()==="EDGE";d&&(c+=.001);a.l.get(b).timestampOffset=c;Or(a,b)}function ls(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;Or(a,b)}
function Or(a,b){if(a.K||a.G.h){var c=a.B.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.B.set(b,[]))}else if(c=a.B.get(b)[0])c.p.resolve(),qs(a,b)}function $r(a,b,c,d){Zk(a.G);c={start:c,p:Promise.withResolvers(),uri:d};a.B.get(b).push(c);a.B.get(b).length==1&&rs(a,b);return c.p.promise}
function ns(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C;return H(function(B){switch(B.i){case 1:Zk(a.G);c=[];d=Array.from(a.l.keys());e=new Map;f=t(d);g=f.next();for(h={};!g.done;h={ready:void 0},g=f.next())k=g.value,h.ready=Promise.withResolvers(),l={start:function(A){return function(){return A.ready.resolve()}}(h),p:h.ready,uri:null},m=a.B.get(k),m.push(l),c.push(h.ready.promise),e.set(k,l),m.length==1&&l.start();B.o(2);return B.h(Promise.all(c),4);case 4:B.u(3);break;case 2:n=B.m();if(a.G.h){p=
t(d);for(u=p.next();!u.done;u=p.next())q=u.value,v=a.B.get(q),e.has(q)&&db(v,e.get(q));return B.return()}throw n;case 3:return B.o(5,6),B.h(b(),6);case 6:B.F();w=t(d);for(x=w.next();!x.done;x=w.next())y=x.value,qs(a,y);B.G(0);break;case 5:throw z=B.m(),C=a.h.error?Db(a.h.error):"No error in the media element",new L(2,3,3015,z,C,null);}})}function qs(a,b){a.B.get(b).shift();rs(a,b)}
function rs(a,b){var c=a.B.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new L(2,3,3017,b)):Pr(a)?c.p.reject(new L(2,3,3015,d,a.h.error?Db(a.h.error):"No error in the media element",c.uri)):c.p.reject(new L(2,3,3024,b)),qs(a,b)}}function ss(a,b){a.ra=b;a.i&&(a.i.l=b)}
function es(a,b,c,d,e){if(ze(a.D.get(e))!="mp4")return c;var f=d===null,g=a.Ma.get(e),h=a.F.Le(),k=!1;d&&d.initSegmentReference&&(k=d.initSegmentReference.encrypted);d=d?d.S()[0]:null;var l=ob();a.u.correctEc3Enca&&f&&e==="audio"&&(c=Oq(c));var m;if(m=f)if(l.Ea()!="CHROMIUM")m=!1;else{m=null;var n=navigator.userAgent.match(/Chrome\/(\d+)/);n&&(m=parseInt(n[1],10));m=b.type==="video"&&m!=null&&m<94&&b.supplementalCodecs!=b.codecs&&/dvh1|dvhe/.test(b.supplementalCodecs)}m&&(c=Pq(c));a.u.insertFakeEncryptionInInit&&
g&&l.jd(h,e)&&(f?c=Qq(b,c,d,h):!k&&l.xi(e)&&(c=Tq(c)));f&&l.Vd()&&(c=Wq(c));!f&&b.isIframe&&a.u.repairIFrames&&(c=Xq(c));return c}function ts(a,b,c,d){var e;return H(function(f){return f.i==1?(e=!0,f.h($r(a,b,function(){if(b===zc)e=!0;else{a.D.get(b);a.m.has(b)&&(a.m.get(b).destroy(),a.m.delete(b));d&&a.m.set(b,d);var g=c+a.u.addExtraFeaturesToSourceBuffer(c),h=!0;try{a.l.get(b).changeType(g),a.D.set(b,c)}catch(k){h=!1}Or(a,b);e=h}},null),2)):f.return(e)})}
function us(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F;return H(function(E){if(E.i==1){if(a.K||a.na)return E.return();c=Bc;a.K=!0;a.Pa=!0;a.o=!1;d=a.h.currentTime;e=a.h.autoplay;a.h.paused||(a.Oa=!0);a.fb&&(a.h.autoplay=!1);E.K(2);a.C.Ta();f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.N.values());for(l=k.next();!l.done;l=k.next())m=l.value,m.destroy();n=t(a.l.values());for(p=n.next();!p.done;p=n.next()){u=p.value;try{a.j.removeSourceBuffer(u)}catch(G){}}a.m.clear();
a.l.clear();a.V.clear();a.N.clear();q=a.j.duration;a.O=Promise.withResolvers();a.j=Dr(a,a.O);return E.h(a.O.promise,4)}if(E.i!=2){!isNaN(q)&&q?a.j.duration=q:!isNaN(a.Aa)&&a.Aa&&(a.j.duration=a.Aa);v=Promise.withResolvers();w=a.j.sourceBuffers;x=b.size;y=0;z=function(){y++;y===x&&(v.resolve(),a.C.qb(w,"addsourcebuffer",z))};a.C.J(w,"addsourcebuffer",z);C=t(b.keys());for(B=C.next();!B.done;B=C.next())A=B.value,D=b.get(A),Lr(a,A,D,D.codecs);(F=b.get(c.Z))&&F.isAudioMuxedInVideo&&(a.o=!0);a.o&&!a.B.has(c.Z)&&
a.B.set(c.Z,[]);return E.h(v.promise,2)}E.F();a.K=!1;Zk(a.G);a.C.Ra(a.h,"loadedmetadata",function(){a.G.h||(a.h.currentTime=d,a.Pa=!1)});a.C.Ra(a.h,"canplaythrough",function(){a.G.h||(a.h.autoplay=e,a.Oa&&(a.Oa=!1,a.h.play()))});return E.G(0)})}function vs(a,b){return ns(a,function(){return us(a,b)})}
function ws(a,b,c,d,e){e=e===void 0?!1:e;c=="video/mp4"&&(d=He(d,c));var f=!1,g=xc("audio",(d||"").split(",")),h=xc("video",(d||"").split(",")),k=h;b=="audio"&&(k=g);k||(k=d);var l=se(c,k),m=De(a.D.get(b));e=a.u.forceTransmux||e;!Pm(l)||!a.M&&we.includes(l)?e=!0:e||c==m||(e=!ob().ld()&&we.includes(c));if(e&&(k=xe(c,k),m=oe(k))){var n=new ur(m(),a.u.transmuxWorkerUrl,qe(k,m));g&&h&&(f=!0);l=n.convertCodecs(b,k)}!n&&b==="video"&&g&&(l=se(c,d));a=Ae(Ee(l));return{ib:n,Yd:f,xd:De(l),codec:a,mimeType:l}}
function xs(a,b,c,d,e){function f(u){var q=ws(a,b,c,d,u),v=!0;q.Yd&&a.D.has("audio")&&(u=ws(a,"audio",c,d,u),v=a.D.get("audio"),v=Ae(Ee(v))==u.codec&&De(v)==u.xd,u.ib&&u.ib.destroy());return{ib:q.ib,Yd:q.Yd,mimeType:q.mimeType,matches:g===q.codec&&h===q.xd&&v}}if(b==zc)return{type:ys,Rd:c,ib:null};var g=Ae(Ee(a.D.get(b))),h=De(a.D.get(b)),k=f(!1),l=k.ib,m=k.Yd,n=k.mimeType;if(k.matches)return{type:ys,Rd:n,ib:l};k=!0;if(a.o&&!e.has("audio")||m&&l&&!a.m.has(b))k=!1;m=ob();var p=a.F.Le();if(k&&a.u.codecSwitchingStrategy===
"smooth"&&m.gb(p))return{type:zs,Rd:n,ib:l};l&&l.destroy();e=e.get(b);if(!(l||e&&e.encrypted)&&(l=f(!0),l.ib)){if(l.matches&&(!l.Yd||a.o&&a.m.has("audio")))return{type:ys,Rd:l.mimeType,ib:l.ib};l.ib.destroy()}return{type:As,Rd:n,ib:null}}
function ks(a,b,c,d,e,f){var g,h,k,l,m,n,p,u;return H(function(q){switch(q.i){case 1:g=Bc;h=xs(a,b,c,d,e);k=h.type;l=h.ib;m=h.Rd;if(n=e.get(g.Z))a.o=n.isAudioMuxedInVideo;if(k==ys)return a.m.has(b)&&!l?(a.m.get(b).destroy(),a.m.delete(b)):!a.m.has(b)&&l?a.m.set(b,l):l&&(a.m.has(b)&&a.m.get(b).transmux!==l.transmux?(a.m.get(b).destroy(),a.m.set(b,l)):l.destroy()),q.return(!1);p=k==As;if(k!=zs){q.A(2);break}return q.h(ts(a,b,m,l),3);case 3:(u=q.j)||(p=!0);case 2:if(!p){q.A(4);break}if(!f){q.A(5);break}return q.h(f(),
5);case 5:return q.h(vs(a,e),4);case 4:return q.return(!0)}})}function Wr(a){return!a.j||a.G.h||a.h.error||a.na||a.K||Kr(a)?!1:!0}var Fr=window.URL.createObjectURL,Nr="sequence",as={jm:Nr,aj:"segments"},ys="none",As="reset",zs="changeType";function Bs(a){var b=this;this.h=a;this.l=!1;this.i=this.h.kg();this.j=new $e(function(){b.h.isPaused()||b.h.Gk(b.i*.25)})}Bs.prototype.release=function(){this.set(this.Wc());this.j&&(this.j.stop(),this.j=null);this.h=null};Bs.prototype.set=function(a){this.i=a;Cs(this)};Bs.prototype.Wc=function(){return this.h.Wc()};function Cs(a){a.j.stop();var b=a.l?0:a.i;if(b>=0&&b<=16)try{a.h.kg()!=b&&a.h.Ii(b);return}catch(c){}a.j.La(.25);a.h.kg()!=0&&a.h.Ii(0)};function Ds(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Es.value().get(b),c.Ra(a,b,d))}var Es=new nb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fs(a,b,c,d){var e=this;this.h=a;this.u=b;this.C=c;this.l=null;this.o=function(){e.l==null&&(e.l=d());return e.l};this.m=this.B=!1;this.i=new ib;this.j=new Gs(a);Ds(this.h,HTMLMediaElement.HAVE_METADATA,this.i,function(){Hs(e,e.o())})}Fs.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.j!=null&&(this.j.release(),this.j=null);this.u=function(){};this.h=null};function Is(a){return a.B?a.h.currentTime:a.o()}
function Js(a,b){a.h.readyState>0?Ks(a.j,b):(a.l=b,Ds(a.h,HTMLMediaElement.HAVE_METADATA,a.i,function(){Hs(a,a.o())}))}function Hs(a,b){Math.abs(a.h.currentTime-b)<.001?Ls(a):(a.i.Ra(a.h,"seeking",function(){Ls(a)}),Ks(a.j,b))}function Ls(a){a.B=!0;a.i.J(a.h,"seeking",function(){(a.m||a.h.ended)&&a.h.paused&&a.h.pause();a.m=!1;a.u()});a.i.J(a.h,"ended",function(){a.m=!0});a.i.J(a.h,"play",function(){a.m=!1});a.C(a.h.currentTime)}
function Gs(a){var b=this;this.h=a;this.o=10;this.l=this.m=this.j=0;this.i=new $e(function(){b.j<=0?b.i.stop():b.h.currentTime!=b.m||b.h.currentTime===b.l?b.i.stop():(b.h.currentTime=b.l,b.j--)})}Gs.prototype.release=function(){this.i&&(this.i.stop(),this.i=null);this.h=null};function Ks(a,b){var c=a.h.ended,d=a.h.paused;a.m=a.h.currentTime;a.l=b;a.j=a.o;a.h.currentTime=b;c&&d&&a.h.pause();a.i.La(.1)};function Ms(a){this.h=a;this.j=!1;this.i=null;this.l=new ib}r=Ms.prototype;r.ready=function(){function a(){if(b.i==null||b.i==0&&b.h.duration!=Infinity)b.j=!0;else{var c=b.h.currentTime,d=null;if(typeof b.i==="number")d=b.i;else if(b.i instanceof Date){var e=Ns(b);e!==null&&(d=b.i.getTime()/1E3-e,d=Os(b,d))}d==null?b.j=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.l.Ra(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0)}}var b=this;Ds(this.h,HTMLMediaElement.HAVE_FUTURE_DATA,this.l,function(){a()})};
r.release=function(){this.l&&(this.l.release(),this.l=null);this.h=null};r.qf=function(a){this.i=this.j?this.i:a};r.vd=function(){var a=this.j?this.h.currentTime:this.i;a instanceof Date&&(a=a.getTime()/1E3-(Ns(this)||0),a=Os(this,a));return a||0};r.oh=function(){return 0};r.mh=function(){return 0};r.nh=function(){return!1};r.ni=function(){};r.Vh=function(){var a=$q(this.h.buffered);return a!=null&&a>=this.h.duration-1};
function Ns(a){return a.h.getStartDate&&(a=a.h.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function Os(a,b){a=a.h.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function Ps(a,b,c,d,e,f,g,h){var k=this;this.i=a;this.h=b.presentationTimeline;this.m=c;this.B=e;this.u=null;this.D=h||function(){return[]};this.C=g||function(){return a.playbackRate};this.j=new fr(a,b.presentationTimeline,c,f,g,h);this.l=new Fs(a,function(){a:{var l=k.j;l.u=!0;l.C=!1;l.j&&l.j.La(l.i.gapJumpTimerTime);hr(l);var m=Is(k.l);l=Qs(k,m);if(!Rm()&&Math.abs(l-m)>.001){m=!1;var n=ob().Bi();if(n){var p=Date.now()/1E3;if(!k.u||k.u<p-n)k.u=p,m=!0}else m=!0;if(m){Js(k.l,l);l=void 0;break a}}k.B();
l=void 0}return l},function(l){var m=k.j;m.h.seeking&&!m.u&&(m.u=!0,m.o=l);m.j&&m.j.La(m.i.gapJumpTimerTime);hr(m)},function(){return Rs(k,d)});this.o=new $e(function(){if(k.i.readyState!=0&&!k.i.paused){var l=Is(k.l),m=k.h.Ab(),n=k.h.pb();n-m<3&&(m=n-3);l<m&&(l=Qs(k,l),k.i.currentTime=l)}})}r=Ps.prototype;r.ready=function(){this.o.La(.25)};
r.release=function(){this.l&&(this.l.release(),this.l=null);this.j&&(this.j.release(),this.j=null);this.o&&(this.o.stop(),this.o=null);this.i=this.l=this.h=this.m=null;this.B=function(){}};r.qf=function(a){Js(this.l,Rs(this,a))};r.vd=function(){var a=Is(this.l);return this.i.readyState>0&&!this.i.paused?Ss(this,a):a};r.oh=function(){return this.j.H};r.mh=function(){return this.j.G};r.nh=function(){return this.j.D};
function Rs(a,b){b==null?b=a.h.oa()?a.h.pb():a.h.Ab():b instanceof Date?b=b.getTime()/1E3-(a.h.l||a.h.j):b<0&&(b=a.h.pb()+b);return Ts(a,Ss(a,b))}r.ni=function(){this.j.ed()};r.Vh=function(){if(this.h.oa()){var a=this.h.Gd(),b=$q(this.i.buffered);if(b!=null&&b>=a)return!0}return!1};function Ts(a,b){var c=a.h.getDuration();return b>=c?c-a.m.durationBackoff:b}
function Qs(a,b){var c=a.m.rebufferingGoal,d=a.m.safeSeekOffset,e=a.h.Ab(),f=a.h.pb(),g=a.h.getDuration();f-e<3&&(e=f-3);var h=a.h.Fd(c),k=a.h.Fd(d);c=a.h.Fd(c+d);if(b>=g)return Ts(a,b);if(b>f)return f-a.m.safeSeekEndOffset;if(b<e)return a.h.isLive()&&a.m.returnToEndOfLiveWindowWhenOutside?f-a.m.safeSeekEndOffset:ar(a.i.buffered,k)?k:c;if(a.C()>0)for(e=t(a.D()),f=e.next();!f.done;f=e.next())if(f=f.value,b>=f.start&&b<f.end)return f.end;return b>=h||ar(a.i.buffered,b)?b:c}
function Ss(a,b){var c=a.h.Ab();if(b<c)return c;a=a.h.pb();return b>a?a:b};function Us(){this.i=this.h=null}Us.prototype.configure=function(a){this.h=a};Us.prototype.getConfiguration=function(){return this.h};
Us.prototype.create=function(a){a=Vs(a,this.h.preferredAudio,this.h.audioCodec,this.h.activeAudioCodec);a:for(var b=t(this.h.preferredVideo),c=b.next();!c.done;c=b.next()){c=c.value;var d=a;if(c.role&&(d=Ws(d,c.role),!d.length))continue;if(c.language&&(d=Xs(d,c.language),!d.length))continue;if(c.label&&(d=Ys(d,c.label),!d.length))continue;if(c.hdrLevel&&(d=Zs(d,c.hdrLevel),!d.length))continue;if(c.layout&&(d=$s(d,c.layout),!d.length))continue;if(c.codec)if(c=at(d,c.codec),c.length)d=c;else continue;
if(d.length){a=d;break a}}b=ob();c=this.h.keySystem;b=!(this.h.codecSwitchingStrategy=="smooth"&&b.gb(c));c=bt(a,b);return this.i=new Cp(c,a,b)};Us.prototype.getLastAdaptationSet=function(){return this.i};
function bt(a,b){function c(m){return a.filter(function(n){return Dp(m,n,!0)}).length}function d(m){var n=m.video.codecs.split(",").map(function(p){return Ce(p)}).sort();return m.video.mimeType+";"+n.join(",")}var e=a[0];if(!b||!e.video)return e;b=e;for(var f=c(e),g=new Set([d(e)]),h=t(a),k=h.next();!k.done;k=h.next())if(k=k.value,k.video&&!g.has(d(k))&&Dp(e,k,!1)&&(!e.audio||!k.audio||Ep(e.audio,k.audio,!0))){g.add(d(k));var l=c(k);l>f&&(b=k,f=l)}return b}
function Vs(a,b,c,d){b=t(b);for(var e=b.next(),f={};!e.done;f={Tc:void 0},e=b.next()){e=e.value;var g=a;if(e.language&&(g=ct(g,e.language),!g.length))continue;if(e.role&&(g=dt(g,e.role),!g.length))continue;if(e.label&&(g=et(g,e.label),!g.length))continue;if(e.channelCount&&(g=ft(g,e.channelCount),!g.length))continue;f.Tc=[];e.codec&&f.Tc.push(e.codec);c&&f.Tc.push(c);d&&f.Tc.push(d);var h=f.Tc.filter(function(m){return function(n,p){return m.Tc.indexOf(n)===p}}(f));if(h.length){f=!1;h=t(h);for(var k=
h.next();!k.done;k=h.next())if(k=k.value,k=gt(g,k,k!=e.codec),k.length){g=k;f=!0;break}if(!f&&e.codec)continue}if(e.spatialAudio!==void 0)if(e=ht(g,e.spatialAudio),e.length)g=e;else continue;if(g.length)return g}var l=[];c&&l.push(c);d&&l.push(d);c=l.filter(function(m,n){return l.indexOf(m)===n});if(c.length)for(c=t(c),d=c.next();!d.done;d=c.next())if(d=gt(a,d.value,!0),d.length){a=d;break}c=a.filter(function(m){return m.primary});return c.length?c:a}
function ct(a,b){b=mc(b);var c=tc(b,a.map(function(d){return sc(d)}));return c?a.filter(function(d){return c==sc(d)}):[]}function dt(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function Ws(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}function Xs(a,b){var c=mc(b);return a.filter(function(d){return d.video&&d.video.language?mc(d.video.language)==c:!1})}
function et(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Ys(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function ft(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 Zs(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=ob().jc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function $s(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function ht(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}
function gt(a,b,c){var d=c?Ae(b):b;return a.filter(function(e){return e.audio?(c?Ae(e.audio.codecs):e.audio.codecs)==d:!0})}function at(a,b){return a.filter(function(c){return c.video&&c.video.codecs!=b?!1:!0})};function it(a){yk.call(this);this.h=new Map;this.j=a;this.i=null}ta(it,yk);it.prototype.release=function(){this.h.clear();this.i&&(this.i.stop(),this.i=null);yk.prototype.release.call(this)};function jt(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 xk("regionadd",new Map([["region",b]])),a.dispatchEvent(b),kt(a))}
function kt(a){a.i||(a.i=(new $e(function(){for(var b=a.j(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new xk("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.i&&(a.i.stop(),a.i=null)})).La(2))};function lt(a,b,c,d,e,f,g){function h(k,l){return l.fastSwitching&&k.Fc&&k.Md?!1:!0}this.o=a;this.j=b;this.m=c;this.h=new Map;this.l=new Map;this.i=null;this.u=d;this.D=e||h;this.B=f||function(){return 1};this.C=g||function(){return!0}}function mt(a,b){a.m=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.h=b}
function nt(a,b,c){c=c===void 0?!1:c;if(!a.j.segmentIndex)return Promise.resolve();a.i||(a.i=a.j.segmentIndex.ob(b,!0,a.u));if(!a.i)return Promise.resolve();c&&a.i.next();b=[];c=Math.abs(a.B());for(c=Math.ceil(a.o*c);a.h.size<c;){var d=a.i.next().value;if(!d)break;var e=!0;d.isPreload()&&d.endByte!=null&&(e=!1);d.Kb()==2&&(e=!1);d.yc(!1)&&(e=!1);a.C(d)||(e=!1);e&&d.initSegmentReference&&b.push(ot(a,d.initSegmentReference));e&&!a.h.has(d)&&(e=new pt(a.m),b.push(qt(a,a.h,d,e)),a.h.set(d,e));if(!a.D(d,
a.j))break}rt(a);return Promise.all(b)}function ot(a,b){if(!a.j.segmentIndex||b.yc()||Array.from(a.l.keys()).some(function(e){return vm(e,b)}))return Promise.resolve();var c=new pt(a.m),d=qt(a,a.l,b,c);a.l.set(b,c);return d}function qt(a,b,c,d){return st(d,c,a.j).catch(function(e){b.get(c)==d&&b.delete(c);throw e;})}function tt(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&ut(a,c)}function vt(a,b){b=b===void 0?!0:b;tt(a,a.h);b&&tt(a,a.l);a.i=null}
lt.prototype.zb=function(a,b){b=b===void 0?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&ut(this,d);b&&rt(this)};lt.prototype.kd=function(a){this.u=a;this.i&&this.i.kd(a)};function rt(a){if(a.h.size)for(var b=Array.from(a.h.keys()),c=t(a.l.keys()),d=c.next(),e={};!d.done;e={ng:void 0},d=c.next())e.ng=d.value,b.some(function(f){return function(g){return vm(g.initSegmentReference,f.ng)}}(e))||ut(a,e.ng)}
function wt(a,b){a.o=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&ut(a,d)}rt(a)}function xt(a,b){b&&b!==a.j&&(vt(a),a.j=b)}function ut(a,b){var c=a.h;b instanceof um&&(c=a.l);a=c.get(b);c.delete(b);a&&a.abort()}function pt(a){this.h=a;this.Sd=this.Zg=null}
function st(a,b,c){var d=[];a.Sd=a.h(b,c,function(e){var f;return H(function(g){if(!a.Zg)return d.push(e),g.return();f=e;d.length>0&&(d.push(e),f=Ub(d),d=[]);return g.h(a.Zg(f),0)})});return a.Sd.promise.then(function(e){d=[];return e},function(e){d=[];return e instanceof L&&e.code==7001?Promise.resolve():Promise.reject(e)})}pt.prototype.abort=function(){this.Sd&&this.Sd.abort()};function yt(a){this.h=[];this.i=a;this.j=new WeakSet;this.l=new WeakSet}yt.prototype.add=function(a,b){if(b<=a)return!1;a={start:a,end:b};b=[];for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,a.start<=d.end+.001&&d.start<=a.end+.001?a={start:Math.min(a.start,d.start),end:Math.max(a.end,d.end)}:b.push(d);b.push(a);b.sort(function(e,f){return e.start-f.start});this.h=b;this.i.wi();return!0};
yt.prototype.remove=function(a,b){if(!(b<=a)){for(var c=[],d=!1,e=t(this.h),f=e.next();!f.done;f=e.next()){f=f.value;var g=Br(a,f.start,.001)?f.start:a,h=Br(b,f.end,.001)?f.end:b;h<=f.start||g>=f.end?c.push(f):(d=!0,g-f.start>.001&&c.push({start:f.start,end:g}),f.end-h>.001&&c.push({start:h,end:f.end}))}d&&(c.sort(function(k,l){return k.start-l.start}),this.h=c,this.i.wi())}};
function zt(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,b>c.start-.001&&b<c.end&&!Br(b,c.end,.001))return c;return null}function At(a,b,c){b=Bt(a,b);return!b||c>b.end+.001||!a.j.has(b)?null:b}function Bt(a,b){return a.h.length==0||a.i.Ha()<0?null:zt(a,b)}function Ct(a,b){var c=Bt(a,b);return(a=!c||a.i.wk(c.start,c.end)?null:c)?a.end:b}
function Dt(a,b,c,d){c=Et(b.start,c,function(e){return[e.startTime]});d=Et(b.end,d,function(e){return[e.startTime,e.endTime]});c==null||d==null?a.l.add(b):Ft(a,b,c,d)}function Et(a,b,c){var d=null,e=Infinity;b=t(Array.isArray(b)?b:[b]);for(var f=b.next();!f.done;f=b.next())if(f=f.value){f=t(c(f));for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=Math.abs(g-a);h<=.001&&h<e&&(d=g,e=h)}}return d}
function Ft(a,b,c,d){var e=b.start!==c||b.end!==d;b.start=c;b.end=d;a.j.add(b);e&&a.h.sort(function(f,g){return f.start-g.start})};function Gt(a,b,c){var d=this;this.h=b;this.C=c;this.j=a;this.l=null;this.Y=new Map;this.D=1;this.F=this.u=null;this.ia=0;this.i=new Map;this.K=!1;this.ra=null;this.G=!1;this.m=new Yk(function(){return Ht(d)});this.$=Date.now()/1E3;this.na=!1;this.o=new Map;this.ba={projection:null,hfov:null};this.va=0;this.sa=Infinity;this.I=null;this.V=[];this.T=new ib;this.B=new $e(function(){if(d.j&&d.h){var e=d.j.presentationTimeline,f=d.h.U;f=d.j.type=="HLS"&&e.getDuration()<Infinity&&f.getDuration()==Infinity;
e.oa()||f?(e=d.j.presentationTimeline.Ab(),f=d.j.presentationTimeline.pb(),f-e>1?os(d.h.U,e,f):ps(d.h.U)):(ps(d.h.U),d.B&&d.B.stop())}else d.B&&d.B.stop()});this.N=this.H=null;this.M=!1;this.O=new $e(function(){var e=d.h.video;!e.ended&&d.H&&(d.N=d.H,d.M=!0,e.currentTime=d.H,d.H=null)});this.L=new ib}r=Gt.prototype;r.destroy=function(){return this.m.destroy()};
function Ht(a){var b,c,d,e,f,g,h,k,l,m,n;return H(function(p){if(p.i==1){(b=a.B)==null||b.stop();a.B=null;(c=a.T)==null||c.release();a.T=null;(d=a.O)==null||d.stop();a.O=null;(e=a.L)==null||e.release();a.L=null;f=[];g=t(a.i.values());for(h=g.next();!h.done;h=g.next())k=h.value,It(k),f.push(Jt(k)),k.aa&&(vt(k.aa),k.aa=null);l=t(a.o.values());for(m=l.next();!m.done;m=l.next())n=m.value,vt(n);return p.h(Promise.all(f),2)}a.i.clear();a.o.clear();a.h=null;a.j=null;a.l=null;a.H=null;p.l()})}
r.configure=function(a){this.l=a;this.ra=new pk({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.aa&&(vt(b.aa),b.aa=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,vt(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(zc))&&
b.aa&&(vt(b.aa),b.aa=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.aa&&(vt(b.aa),b.aa=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.aa?(wt(c.aa,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(vt(c.aa),c.aa=null)):a.segmentPrefetchLimit>0&&(c.aa=Kt(this,c.stream));a.disableAudioPrefetch||Lt(this)};function Mt(a,b,c){a.j.presentationTimeline.oa()||(a.va=b,a.sa=c)}
function Nt(a,b){a=a.ob(Math.max(0,b-.001));if(!a)return[];b=[];for(var c=0;c<2;c++){var d=a.next().value;if(!d)break;b.push(d)}return b}
function Ot(a,b,c){if(!c||a.C.h.length==0)return c;if(a.h.Ha()>=0){var d=zt(a.C,c.startTime),e;if(e=d)e=a.C,e=!(e.j.has(d)||e.l.has(d));if(e){var f,g;(e=(g=(f=a.i.get("video")||a.i.get("audio"))==null?void 0:f.stream.segmentIndex)!=null?g:null)&&Dt(a.C,d,Nt(e,d.start),Nt(e,d.end))}}a=At(a.C,c.startTime,c.endTime);if(!a)return c;d=b.stream.segmentIndex.ob(a.end);if(!d){for(;b.ka&&b.ka.next().value;);return null}b.ka=d;for(c=d.next().value;c&&c.startTime<a.end&&!Br(c.startTime,a.end,.001);)c=d.next().value;
return c}r.start=function(a){var b=this;return H(function(c){if(c.i==1)return c.h(Pt(b,a||new Map),2);Zk(b.m);b.K=!0;c.l()})};function Qt(a,b){var c,d,e,f,g,h,k;H(function(l){switch(l.i){case 1:return c=Bc,a.ia++,d=a.ia,l.o(2),l.h(is(a.h.U,c.Ua),4);case 4:l.u(3);break;case 2:if(e=l.m(),a.h)a.h.onError(e);case 3:f=se(b.mimeType,b.codecs),Mr(a.h.U,f,b.external),g=a.h.U.ra,(h=g.isTextVisible())&&a.ia==d&&(k=Rt(a,b),a.i.set(c.Ua,k),St(a,k,0)),l.l()}})}
function Tt(a){var b=a.i.get(zc);b&&(It(b),Jt(b).catch(function(){}),a.I=a.i.get(zc),a.i.delete(zc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.F=null}
function Ut(a,b){for(var c=a.h.Ha()<0,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ka&&e.ka.kd(c),e.aa&&e.aa.kd(c),c&&(e.ka=null,e.endOfStream=!1,e.ya||e.Xa||e.yb||e.wb||St(a,e,0));d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.kd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.qc&&(Vt(a,b,!1,0,!1),c.qc=d);else if(b=c.qc)c.qc=null,Vt(a,b,!0,0,!1)}
function Wt(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.K&&(b.video&&Vt(a,b.video,c,d,e,f),b.audio&&Vt(a,b.audio,c,d,e,f))}function Xt(a,b){H(function(c){if(c.i==1)return a.I=null,a.F=b,a.K?b.segmentIndex?c.A(2):c.h(b.createSegmentIndex(),2):c.return();Vt(a,b,!0,0,!1);c.l()})}function Yt(a){var b=a.i.get(zc);b&&Vt(a,b.stream,!0,0,!0)}
function Zt(a,b){for(var c=t(a.Y.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.Y.delete(d))}}
function Vt(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=zc?g&&(g.qc&&(b.trickModeVideo?(g.qc=b,b=b.trickModeVideo):g.qc=null),g.stream!=b||e)&&(a.o.has(b)?g.aa=a.o.get(b):g.aa&&xt(g.aa,b),b.type==zc&&g.stream!=b&&(e=se(b.mimeType,b.codecs),Mr(a.h.U,e,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&(g.ya?a.Y.getOrInsert("("+g.type+":"+g.stream.id+")",g.stream.closeSegmentIndex):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream=b,g.ka=null,g.yf=
!!f,b.dependencyStream?g.dc=Rt(a,b.dependencyStream):g.dc=null,$t(a),e&&(g.bb=null,g.Vb=null,g.Ub=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.i.get("audio"):g.type==="audio"&&(b=a.i.get("video")),b&&(Jt(b).catch(function(){}),b.bb=null,b.Vb=null,b.Ub=null,au(a,b),bu(a,b).catch(function(h){if(a.h)a.h.onError(h)})))),c?g.yb?g.od=!0:g.ya?(g.wb=!0,g.Sc=d,g.od=!0):(It(g),cu(a,g,!0,d).catch(function(h){if(a.h)a.h.onError(h)})):g.ya||g.Xa||St(a,g,0),bu(a,g).catch(function(h){if(a.h)a.h.onError(h)})):
Qt(a,b)}
function bu(a,b){var c,d,e;return H(function(f){if(f.i==1){if(!b.operation)return f.return();c=b.stream;d=b.operation;return c.segmentIndex?f.A(2):f.h(c.createSegmentIndex(),2)}if(f.i!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.A(4):f.h(e.createSegmentIndex(),4);if(b.operation!=d||b.stream!=c||!b.stream.segmentIndex)return f.return();var g=a.h.Jb();var h=Sr(a.h.U,b.type),k=du(a,b,g);k=b.stream.segmentIndex.find(k);var l=k==null?null:b.stream.segmentIndex.get(k);k=l?ym(l):null;l&&!k&&(k=(l.endTime-
l.getStartTime())*(b.stream.bandwidth||a.u.bandwidth)/8);k?((l=l.initSegmentReference)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.h.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.l.rebufferingGoal||b.operation.i.h>k?!0:!1):g=!0;g&&b.operation.abort();f.l()})}
r.Ic=function(){if(this.h){var a=this.h.Jb(),b=this.N!=null&&Br(a,this.N,.1);this.N=null;b||(this.M=!1);for(var c=t(this.i.keys()),d=c.next();!d.done;d=c.next()){var e=d.value;d=this.i.get(e);if(!b&&!Tr(this.h.U,e,a)){this.$=0;d.aa&&(d.aa.i=null);if(d.type==="audio")for(var f=t(this.o.values()),g=f.next();!g.done;g=f.next())g.value.i=null;d.ka=null;(Sr(this.h.U,e)!=null||d.ya)&&au(this,d);d.operation&&(d.operation.abort(),d.operation=null);e===zc&&(e=this.h.U,e.I&&e.I.h.clear());d.Ic=!0}!b||d.yb||
d.ya||d.Xa||St(this,d,0)}eu(this)&&fu(this)}};function au(a,b){b.yb||b.wb||(b.ya?(b.wb=!0,b.Sc=0):Qr(a.h.U,b.type)==null?b.Xa==null&&St(a,b,0):(It(b),cu(a,b,!1,0).catch(function(c){if(a.h)a.h.onError(c)})))}
function Pt(a,b){var c,d,e,f,g,h,k,l;return H(function(m){if(m.i==1){if(!a.u)throw new L(2,5,5006);c=gu(a,!0);d=a.h.U;return m.h(d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}Zk(a.m);a.updateDuration().catch(function(){});e=t(c.keys());for(f=e.next();!f.done;f=e.next())if(g=f.value,h=c.get(g),!a.i.has(g)){k=Rt(a,h);if(l=b.get(h.id))mt(l,function(n,p,u){return hu(a,n,p,u)}),k.aa=l;a.i.set(g,k);St(a,k,0)}$t(a);m.l()})}
function Rt(a,b){var c={stream:b,type:b.type,ka:null,aa:Kt(a,b),Fa:null,bb:null,Se:null,Vb:null,Ub:null,ug:null,vg:null,qc:null,endOfStream:!1,ya:!1,Xa:null,wb:!1,Sc:0,od:!1,yb:!1,Ic:!0,yf:!1,Kg:!1,Yc:!1,operation:null,dc:null};b.dependencyStream&&(c.dc=Rt(a,b.dependencyStream));return c}
function Kt(a,b){if(a.j.type=="MSF"||b.type==="video"&&a.l.disableVideoPrefetch||b.type==="audio"&&a.l.disableAudioPrefetch||b.type===zc&&(b.mimeType==Je||b.mimeType==Ke)||b.type===zc&&a.l.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.aa)&&b===c.j?c:a.l.segmentPrefetchLimit>0?new lt(a.l.segmentPrefetchLimit,b,function(d,e,f){return hu(a,d,e,f)},a.h.Ha()<0,a.h.vl,a.h.Ha,function(d){var e=a.C,f=d.endTime;d=Bt(e,d.startTime);return!(!d||f>d.end+.001?
0:!e.l.has(d))}):null}
function Lt(a){for(var b=a.l.segmentPrefetchLimit,c=a.l.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={ub:void 0},e=d.next())if(f.ub=e.value,f.ub.audio)if(a.o.has(f.ub.audio)){if(e=a.o.get(f.ub.audio),wt(e,b),!(b>0&&c.some(function(h){return function(k){return lc(h.ub.audio.language,k)}}(f)))){var g=a.i.get(f.ub.audio.type);e!==(g&&g.aa)&&vt(e);a.o.delete(f.ub.audio)}}else b<=0||!c.some(function(h){return function(k){return lc(h.ub.audio.language,k)}}(f))||!(e=Kt(a,f.ub.audio))||
(f.ub.audio.segmentIndex||f.ub.audio.createSegmentIndex(),a.o.set(f.ub.audio,e))}r.updateDuration=function(){var a=this,b,c;return H(function(d){if(d.i==1)return b=Rm(),c=a.j.presentationTimeline.getDuration(),a.T.Ta(),c<Infinity?(b&&(a.B&&a.B.stop(),ps(a.h.U)),d.h(a.h.U.uc(c),0)):b?d.h(a.h.U.uc(Infinity),5):(a.h.U.uc(4294967296),d.A(0));a.B&&(a.B.hb(),a.T.Ra(a.h.video,"timeupdate",function(){a.B.hb().La(.5)}));return d.A(0)})};
function iu(a,b){var c,d,e,f,g,h,k,l,m,n,p,u;return H(function(q){switch(q.i){case 1:Zk(a.m);c=Bc;if(b.ya||b.Xa==null||b.yb)return q.return();b.Xa=null;if(!b.wb){q.A(2);break}return q.h(cu(a,b,b.od,b.Sc),3);case 3:return q.return();case 2:Zt(a,b);if(b.stream.segmentIndex){q.A(4);break}d=b.stream;e=b.stream.codecs;f=b.stream.mimeType;q.o(5);return q.h(b.stream.createSegmentIndex(),7);case 7:q.u(6);break;case 5:return g=q.m(),q.h(ju(a,b,g),8);case 8:return q.return();case 6:if(b.type!==c.Ua||e==b.stream.codecs&&
f==b.stream.mimeType||(h=se(b.stream.mimeType,b.stream.codecs),Mr(a.h.U,h,b.stream.external)),d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.ya||b.Xa||St(a,b,0),q.return();case 4:if(!b.dc){q.A(9);break}if(b.dc.stream.segmentIndex){q.A(9);break}q.o(11);return q.h(b.dc.stream.createSegmentIndex(),13);case 13:q.u(9);break;case 11:q.m();case 9:q.o(14);k=ku(a,b);k!=null&&(St(a,b,k),b.Yc=!1);q.u(15);break;case 14:return l=q.m(),q.h(ju(a,b,l),16);case 16:return q.return();case 15:if(b.type===
c.Ua)return q.return();m=[];b.stream&&!b.stream.isAudioMuxedInVideo&&m.push(b);n=b.type===c.Z?c.qa:c.Z;(p=a.i.get(n))&&p.stream&&!p.stream.isAudioMuxedInVideo&&m.push(p);if(!a.K||!m.every(function(v){return v.endOfStream})){q.A(0);break}return q.h(a.h.U.endOfStream(),18);case 18:Zk(a.m),u=a.h.U.getDuration(),u!=0&&u<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.uc(u),q.l()}})}
function ku(a,b){if(lu(b))return fs(a.h.U,b.stream.originalId||""),null;b.type==zc&&gs(a.h.U);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=zc&&Kr(a.h.U))return mu(a,!0),null;var c=a.l.updateIntervalSeconds/Math.max(1,Math.abs(a.h.Ha()));if(!Pr(a.h.U)&&b.type!=zc)return c/2;var d=a.h.Jb(),e=a.h.Ha()<0;if(b.type==="audio")for(var f=t(a.o.keys()),g=f.next();!g.done;g=f.next())g=a.o.get(g.value),g.zb(d,!0),nt(g,d);f=du(a,b,d);var h=e?Vr(a.h.U,b.type,d):Ur(a.h.U,b.type,d);b.type==
"video"&&!a.i.has("audio")&&a.h.U.l.has("audio")&&(g=e?Vr(a.h.U,"audio",d):Ur(a.h.U,"audio",d),h=Math.min(h,g));g=Math.max(1,Math.max(a.l.rebufferingGoal,a.l.bufferingGoal)*a.D);var k=a.j.presentationTimeline.oa()?Infinity:a.j.presentationTimeline.getDuration()-f,l=Sr(a.h.U,b.type);if(!e&&k<1E-6&&l)return b.endOfStream=!0,b.type=="video"&&((c=a.i.get(zc))&&lu(c)&&(c.endOfStream=!0),(c=a.i.get("audio"))&&c.stream.isAudioMuxedInVideo&&(c.endOfStream=!0)),null;b.endOfStream=!1;if(e){var m=a.j.presentationTimeline.Ab();
if(l!=null&&f<=m+1E-6)return null}if(h>0&&a.l.stopFetchingOnPause&&a.h.video.paused||h>=g)return c/2;m=!b.ka;h=nu(a,b,d,l);if(!h){if(!a.j.presentationTimeline.oa()&&k<1E-6)return b.endOfStream=!0,b.type=="video"&&(c=a.i.get(zc))&&lu(c)&&(c.endOfStream=!0),null;a=Infinity;(b=b.Fa)&&(a=b.endTime-b.startTime);return Math.min(a/2,c)}k=b.bb;l=h.initSegmentReference;k&&l&&vm(l,k)&&(k.h=l.h);k=!1;m&&b.yf&&(k=!0,b.yf=!1);m=Infinity;l=-Infinity;for(var n=t(a.i.values()),p=n.next();!p.done;p=n.next())p=p.value,
lu(p)||p.stream.isAudioMuxedInVideo||p.ka&&!p.ka.current()||(p=du(a,p,d),m=Math.min(m,p),l=Math.max(l,p));if((e?l-f:f-m)>=Math.max(a.j.presentationTimeline.i,.5))return c;b.aa&&b.ka&&!a.o.has(b.stream)&&(b.aa.zb(h.startTime+.001),nt(b.aa,h.startTime).catch(function(){}));if(eu(a)&&ou(a,b,h))return null;pu(a,b,d,h,k).catch(function(){});b.dc&&qu(a,b.dc,d,g);return null}function du(a,b,c){return b.Fa?a.h.Ha()<0?b.Fa.startTime:Ct(a.C,b.Fa.endTime):Ct(a.C,c)}
function nu(a,b,c,d){if(b.ka){var e=b.ka.current();e&&b.Fa&&(c=b.Fa.endTime,Br(b.Fa.startTime,e.startTime,.002)&&Br(c,e.endTime,.002)&&(e=b.ka.next().value));return Ot(a,b,e)}if(b.Fa||d){if(e=a.h.Ha()<0){var f=Qr(a.h.U,b.type);c=b.Fa?b.Fa.startTime:null;c!=null&&(f==null||c<f)&&(f=c);c=f!=null?f-.001:d}else c=b.Fa?b.Fa.endTime:d;b.stream.segmentIndex&&(b.ka=b.stream.segmentIndex.ob(c,!1,e));e=b.ka&&b.ka.next().value;return Ot(a,b,e)}f=a.j.sequenceMode||eu(a)||a.j.type==="MSF"?0:a.l.inaccurateManifestTolerance;
var g=Math.max(c-f,0);d=a.h.U.getDuration();Math.abs(g-d)<1&&(f=1,g=Math.max(c-f,0));var h=a.h.Ha()<0;d=null;f&&(b.stream.segmentIndex&&(b.ka=b.stream.segmentIndex.ob(g,!1,h)),d=b.ka&&b.ka.next().value);d||(b.stream.segmentIndex&&(b.ka=b.stream.segmentIndex.ob(c,!1,h)),d=b.ka&&b.ka.next().value);for(;((e=d)==null?void 0:e.Kb())===2;)f=c=void 0,d=(f=(c=b.ka)==null?void 0:c.next().value)!=null?f:null;return d=Ot(a,b,d)}
function pu(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C;return H(function(B){switch(B.i){case 1:f=Bc;g=b.stream;h=b.ka;b.ya=!0;B.o(2);if(d.Kb()==2)throw new L(1,1,1011);return B.h(ru(a,b,d,e),4);case 4:Zk(a.m);if(a.G)return B.return();k={Dc:null};if(su(a.j,a.l.lowLatencyMode,g,d))return n=new Uint8Array(0),u=p=!1,v=function(A){var D,F,E,G,J;return H(function(N){switch(N.i){case 1:if(p)return N.return();u=!0;Zk(a.m);if(a.G)return N.return();N.o(2);n=Sb(n,A);D=!1;F=0;(new jh).box("mdat",function(P){F=
P.size+P.start;D=!0}).parse(n,!1,!0);if(!D){N.A(4);break}E=n.subarray(0,F);n=n.subarray(F);return N.h(tu(a,b,c,g,d,E,!0,e),5);case 5:G=N.j,k.Dc==null&&(k=G),b.aa&&b.ka&&nt(b.aa,d.startTime,!0);case 4:N.u(0);break;case 2:q=J=N.m(),N.l()}})},B.h(uu(a,b,d,v),9);l=uu(a,b,d);return B.h(l,7);case 7:m=B.j;Zk(a.m);if(a.G)return B.return();Zk(a.m);return b.wb?(b.ya=!1,St(a,b,0),B.return()):At(a.C,d.startTime,d.endTime)?(b.ya=!1,b.Xa||St(a,b,0),B.return()):B.h(tu(a,b,c,g,d,m,!1,e),8);case 8:k=B.j;B.A(6);break;
case 9:w=B.j;if(q)throw q;if(u){B.A(10);break}p=!0;Zk(a.m);return a.G?B.return():b.wb?(b.ya=!1,St(a,b,0),B.return()):B.h(tu(a,b,c,g,d,w,!1,e),11);case 11:k=B.j;case 10:b.aa&&b.ka&&nt(b.aa,d.startTime,!0);case 6:Zk(a.m);if(a.G)return B.return();b.Fa=d;h.next();b.ya=!1;b.Kg=!1;x=a.h.U.fc();y=x[b.type];$a(JSON.stringify(y));b.wb||(z=null,b.type===f.qa?z=a.i.get(f.Z):b.type===f.Z&&(z=a.i.get(f.qa)),z&&z.type==f.Z?a.h.ed(d,b.stream,z.stream.isAudioMuxedInVideo,!1,k.Dc):a.h.ed(d,b.stream,b.stream.codecs.includes(","),
!1,k.Dc));It(b);St(a,b,0);B.u(0);break;case 2:C=B.m();Zk(a.m,C);if(a.G)return B.return();b.ya=!1;C.code!=7001&&C.category!=1||!b.aa||(ut(b.aa,d),d.initSegmentReference&&ut(b.aa,d.initSegmentReference));if(C.code==7001)b.ya=!1,It(b),St(a,b,0),B.A(0);else if(b.type==f.Ua&&a.l.ignoreTextStreamFailures)a.i.delete(f.Ua),B.A(0);else{if(C.code==3017)return B.h(vu(a,b,C),0);b.Yc=!0;C.severity=2;return B.h(ju(a,b,C),0)}}})}
function qu(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,q,v,w;return H(function(x){switch(x.i){case 1:e=Bc;f=b.stream;for(k=(h=(g=f.segmentIndex)&&g.ob(c))&&h.next().value;k&&a.V.includes(k.startTime);)k=h&&h.next().value;if(!k){x.A(0);break}l=k.initSegmentReference;if(!l||vm(l,b.bb)){x.A(3);break}b.bb=l;x.o(4);return x.h(uu(a,b,l),6);case 6:m=x.j;if(!a.h)return x.return();var y=a.h.U;y.H&&Dc(y.H,m,0,f);a.V=[];x.u(3);break;case 4:throw n=x.m(),b.bb=null,n;case 3:if(b.Fa&&b.Fa==k){x.A(0);break}b.Fa=k;x.o(8);
return x.h(uu(a,b,k),10);case 10:p=x.j;if(!a.h)return x.return();y=a.h.U;y.H&&Dc(y.H,p,0,f);a.V.push(k.startTime);x.u(9);break;case 8:throw u=x.m(),b.Fa=null,u;case 9:if(!a.h)return x.return();b.wb||(q=null,b.type===e.qa?q=a.i.get(e.Z):b.type===e.Z&&(q=a.i.get(e.qa)),q&&q.type==e.Z?a.h.ed(k,b.stream,q.stream.isAudioMuxedInVideo,!0,null):a.h.ed(k,b.stream,b.stream.codecs.includes(","),!0,null));v=Math.max.apply(Math,[0].concat(wa(a.V)));w=a.h.Jb();if(w+d>v)return x.h(qu(a,b,k.startTime,d),0);x.A(0)}})}
function vu(a,b,c){var d,e,f,g,h,k,l,m,n,p,u;return H(function(q){switch(q.i){case 1:d=!1;e=t(a.i.values());for(f=e.next();!f.done;f=e.next())if(g=f.value,g!=b&&g.Kg){d=!0;break}if(d){q.A(2);break}if(a.l.avoidEvictionOnQuotaExceededError){h=wu(a,c);if(k=a.h.disableStream(b.stream,h))return q.return();St(a,b,4);return q.return()}l=Math.round(100*a.D);if(l>20){a.D-=.2;q.A(3);break}if(l>4){a.D-=.04;q.A(3);break}m=wu(a,c);n=a.h.disableStream(b.stream,m);if(!n){b.Yc=!0;a.G=!0;a.h.onError(c);q.A(5);break}a.D=
1;p=a.h.Jb();return q.h(xu(a,b,p),5);case 5:return q.return();case 3:return b.Kg=!0,u=a.h.Jb(),q.h(xu(a,b,u),2);case 2:St(a,b,4),q.l()}})}
function ru(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,q,v,w,x,y;return H(function(z){if(z.i==1)return e=Bc,f=b.Fa==null,g=[],h=Math.max(0,Math.max(c.F,a.va)-.1),k=Math.min(c.D,a.sa)+.1,a.l.clampAppendWindowToDuration&&(l=a.j.presentationTimeline.getDuration(),l<Infinity&&(k=Math.min(k,l))),m=c.codecs||b.stream.codecs,n=Ce(m),p=De(c.mimeType||b.stream.mimeType),u=c.m,u==b.Se&&h==b.Vb&&k==b.Ub&&n==b.ug&&p==b.vg?z.A(2):z.h(yu(a,b,u,h,k,c,n,p),2);vm(c.initSegmentReference,b.bb)||(b.bb=c.initSegmentReference,c.j&&
c.initSegmentReference&&(q=uu(a,b,c.initSegmentReference),v=function(){var C,B,A,D,F,E,G,J,N,P,U;return H(function(Q){switch(Q.i){case 1:return Q.o(2),Q.h(q,4);case 4:return C=Q.j,Zk(a.m),B=null,A=new Map,D={projection:null,hfov:null},b.stream&&(F=b.stream.videoLayout)&&(E=F.split("/"),E.includes("PROJ-RECT")?D.projection="rect":E.includes("PROJ-EQUI")?D.projection="equi":E.includes("PROJ-HEQU")?D.projection="hequ":E.includes("PROJ-PRIM")?D.projection="prim":E.includes("PROJ-AIV")&&(D.projection=
"aiv")),G=new jh,G.ma(["moov","trak","mdia"],oh).P("mdhd",function(M){B=Gh(M.reader,M.version).timescale}).P("hdlr",function(M){M=M.reader;M.skip(4);M=M.wa(4,!1);switch(String.fromCharCode(M[0],M[1],M[2],M[3])){case "soun":A.set(e.Z,B);break;case "vide":A.set(e.qa,B)}B=null}),b.type!==e.qa||D.projection||G.ma(["minf","stbl"],oh).P("stsd",qh).ma([].concat(wa(yh),["encv"]),rh).ma(["vexu","proj"],oh).P("prji",function(M){M=M.reader.hd();D.projection=M}).box("hfov",function(M){M=M.reader.R()/1E3;D.hfov=
M}),G.parse(C,!0,!0),b.type===e.qa&&zu(a,D),A.has(b.type)?c.initSegmentReference.timescale=A.get(b.type):B!=null&&(c.initSegmentReference.timescale=B),J=b.stream.segmentIndex,J instanceof Mm&&(N=Om(J,c.startTime)),P=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,Q.h(a.h.Ah(b.type,C),5);case 5:return Q.h(Zr(a.h.U,b.type,C,null,b.stream,P,b.Ic,d,!1,!1,N),6);case 6:Q.u(0);break;case 2:throw U=Q.m(),b.bb=null,U;}})},w=c.startTime,f&&(x=Sr(a.h.U,b.type),x!=null&&(w=x)),a.h.Mk(w,c.initSegmentReference),
g.push(v())));y=b.Fa?b.Fa.discontinuitySequence:-1;c.discontinuitySequence!=y&&g.push(ms(a.h.U,b.type,c.startTime));return z.h(Promise.all(g),0)})}
function yu(a,b,c,d,e,f,g,h){var k,l,m,n,p;return H(function(u){switch(u.i){case 1:k=Bc;l=gu(a);u.o(2);b.Vb=d;b.Ub=e;g&&(b.ug=g);h&&(b.vg=h);b.Se=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.qa?n=a.i.get(k.Z):b.type===k.Z&&(n=a.i.get(k.qa));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){u.A(4);break}return u.h(js(a.h.U,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return u.h(js(a.h.U,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l,function(){return Au(a,
n)}),6);case 6:u.u(0);break;case 2:throw p=u.m(),b.Vb=null,b.Ub=null,b.ug=null,b.vg=null,b.Se=null,p;}})}function Au(a,b){return H(function(c){if(c.i==1)return b?c.h(Jt(b).catch(function(){}),2):c.return();b.bb=null;b.Vb=null;b.Ub=null;au(a,b);c.l()})}
function tu(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,p,u;return H(function(q){switch(q.i){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.l.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.initSegmentReference&&(m=e.initSegmentReference.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new jh).ma(vh,oh).P("tfdt",function(v){var w,x,y,z,C,B;return H(function(A){w=Fh(v.reader,v.version);x=w.za;if(!x)return A.return();
y=-x/m;z=Number(b.Se)||0;if(!(z<y))return A.A(0);C=b.Vb;B=b.Ub;return A.h(yu(a,b,y,C,B,e),0)})}).parse(f,!1,g)),q.h(xu(a,b,c),2);case 2:return Zk(a.m),p=b.Ic,b.Ic=!1,q.h(a.h.Ah(b.type,f),3);case 3:return q.h(Zr(a.h.U,b.type,f,e,d,k,p,h,g),4);case 4:return u=q.j,Zk(a.m),q.return(u)}})}
function xu(a,b,c){var d,e,f,g,h,k,l,m,n,p;return H(function(u){if(u.i==1){a.I==b&&(a.I=null);d=b.stream.segmentIndex;d instanceof Mm&&(d.zb(a.j.presentationTimeline.Hd()),e=[],Nm(d,function(){e.push(-1)}));f=Math.max(a.l.bufferBehind*a.D,a.j.presentationTimeline.i);g=Qr(a.h.U,b.type);if(g==null)return u.return();h=c-g;k=a.l.evictionGoal;l=a.j.presentationTimeline.Ab();m=a.j.presentationTimeline.pb();n=m-l;p=h-f;n>k&&(p=Math.max(h-f,l-k-g));return p<=k?u.return():u.h(a.h.U.remove(b.type,g,g+p,e),
2)}if(u.i!=4)return Zk(a.m),a.I?u.h(xu(a,a.I,c),4):u.A(0);Zk(a.m);u.l()})}function lu(a){return a&&a.type==zc&&(a.stream.mimeType==Je||a.stream.mimeType==Ke)}
function uu(a,b,c,d){var e,f,g,h,k;return H(function(l){switch(l.i){case 1:if(e=c.yc())return l.return(e);f=null;if(b.aa){var m=b.aa,n=m.h;c instanceof um&&(n=m.l);n.has(c)?(m=n.get(c),d&&(m.Zg=d),f=m.Sd):f=null}f||(f=Bu(c,b.stream,d||null,a.l.retryParameters,a.h.dd));g=0;b.ka&&(g=b.ka.i);b.operation=f;return l.h(f.promise,2);case 2:h=l.j;b.operation=null;k=h.data;if(!c.aesKey){l.A(3);break}return l.h(Ym(k,c.aesKey,g),4);case 4:k=l.j;case 3:return l.return(k)}})}
function hu(a,b,c,d){su(a.j,a.l.lowLatencyMode,c,b)||(d=null);return Bu(b,c,d||null,a.l.retryParameters,a.h.dd)}function su(a,b,c,d){return a&&a.isLowLatency&&b&&window.ReadableStream&&d instanceof wm&&(c.mimeType=="video/mp4"||c.mimeType=="audio/mp4")?a.type!="HLS"||d.u:!1}function Bu(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof wm?a:void 0,h=g?1:0;a=en(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Uk,a,{type:h,stream:b,segment:g,isPreload:f})}
function cu(a,b,c,d){var e,f,g;return H(function(h){if(h.i==1)return b.wb=!1,b.od=!1,b.Sc=0,b.yb=!0,b.Fa=null,b.ka=null,b.aa&&!a.o.has(b.stream)&&vt(b.aa,c),d?(f=a.h.Jb(),g=a.h.U.getDuration(),h.h(a.h.U.remove(b.type,f+d,g),3)):h.h(is(a.h.U,b.type),4);if(h.i!=3){Zk(a.m);if(!c)return h.A(3);e=ob();return e.df()?h.h(a.h.U.flush(b.type),3):h.A(3)}Zk(a.m);b.yb=!1;b.endOfStream=!1;b.ya||b.Xa||St(a,b,0);h.l()})}
function St(a,b,c){var d=b.type;if(d!=zc||a.i.has(d))b.Xa=(new $e(function(){var e;return H(function(f){if(f.i==1)return f.o(2),f.h(iu(a,b),4);if(f.i!=2)return f.u(0);e=f.m();if(a.h)a.h.onError(e);f.l()})})).ea(c)}function It(a){a.Xa!=null&&(a.Xa.stop(),a.Xa=null)}function Jt(a){return H(function(b){return a.operation?b.h(a.operation.abort(),0):b.A(0)})}
function ju(a,b,c){var d,e,f,g,h,k,l,m,n,p;return H(function(u){switch(u.i){case 1:return c.code==3024?(b.ya=!1,It(b),St(a,b,0),u.return()):u.h(a.ra.attempt(),2);case 2:Zk(a.m);if(c.code!=3015&&c.code!=3014&&(c.category!==1||c.code==1003)){u.A(3);break}if(b.qc)return Ut(a,!1),u.return();d=!1;if(c.code!=3015&&c.code!=3014){u.A(4);break}return u.h(mu(a,!0),5);case 5:d=u.j;e=t(a.i.values());for(f=e.next();!f.done;f=e.next())g=f.value,It(g);Zk(a.m);case 4:h=wu(a,c),k=a.h.disableStream(b.stream,h),c.handled=
k||d,k&&(c.severity=1);case 3:if(c.handled||c.code!=1011){u.A(6);break}l=a.h.Jb();m=Sr(a.h.U,b.type);for(n=nu(a,b,l,m);((p=n)==null?void 0:p.Kb())===2;)b.Fa=n,n=nu(a,b,l,m);if(!n){u.A(6);break}return u.h(ms(a.h.U,b.type,n.startTime),8);case 8:return b.ya=!1,b.Yc=!1,It(b),St(a,b,0),u.return();case 6:if(!c.handled||c.code!=1011)a.h.onError(c);c.handled||a.l.failureCallback(c);u.l()}})}
function wu(a,b){return a.l.maxDisabledTime===0&&b.code==1011?1:b.code==3014||b.code==3015?Infinity:a.l.maxDisabledTime}
function mu(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return H(function(k){if(k.i==1){c=Date.now()/1E3;d=a.l.minTimeBetweenRecoveries;if(!b&&(!a.l.allowMediaSourceRecoveries||c-a.$<d))return k.return(!1);a.$=c;e=Bc;if(f=a.i.get(e.Z))It(f),f.operation&&(f.operation.abort(),f.operation=null),f.bb=null,f.Vb=null,f.Ub=null,f.ya=!1,f.wb=!1,f.Sc=0,f.od=!1,f.yb=!1,f.ka&&f.ka.Rg();if(g=a.i.get(e.qa))It(g),g.operation&&(g.operation.abort(),g.operation=null),g.bb=null,g.Vb=null,g.Ub=null,g.ya=!1,g.wb=!1,g.Sc=
0,g.od=!1,g.yb=!1,g.ka&&g.ka.Rg();h=a.h.video.paused;return k.h(vs(a.h.U,gu(a)),2)}!g||g.yb||g.ya||g.Xa||St(a,g,0);!f||f.yb||f.ya||f.Xa||St(a,f,0);h||a.h.video.play();return k.return(!0)})}function zu(a,b){if(a.ba.projection!=b.projection||a.ba.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new xk("spatialvideoinfo",c)}else c=new xk("nospatialvideoinfo");c.cancelable=!0;a.h.onEvent(c);a.ba=b}}
function Cu(a){var b=a.l.crossBoundaryStrategy;return b==="reset_to_encrypted"&&a.na?"keep":b}
function eu(a){if(Cu(a)!=="keep")return!0;var b=ob(),c=a.h.Le();if(!b.gb(c))for(b=t(a.i.keys()),c=b.next();!c.done;c=b.next()){if(c=a.i.get(c.value),c.type!==Bc.Ua&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.ld())for(b=t(a.i.keys()),c=b.next();!c.done;c=b.next())if(c=a.i.get(c.value),c.type!==Bc.Ua&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=t(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(ze(c.value));return a.size>1}return!1}
function $t(a){a.L.Ta();eu(a)&&a.L.Lb(a.h.video,["waiting","timeupdate"],function(){fu(a)})}function fu(a){if(eu(a)){a.O.stop();var b=a.h.Jb(),c=a.i.get("video")||a.i.get("audio");c&&(c=c.bb)&&c.h!==null&&(b=c.h-b,b<-.1||b>1||(a.H=c.h+.1,a.O.ea(Math.max(0,b))))}}
function ou(a,b,c){if(b.type===zc)return!1;var d=b.bb;if(!d)return!1;var e=c.initSegmentReference,f=d.h!==e.h;c=f;Cu(a)==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.na=!0));var g=Cu(a);g==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(g==="keep"&&d.mimeType&&e.mimeType){g=Ae(Ee(d.mimeType));var h=Ae(Ee(e.mimeType));d.mimeType==e.mimeType&&g==h&&(c=!1)}if(f=(g=(a.i.get("video")||a.i.get("audio"))===b)&&f&&a.M)a.M=!1;g&&c&&(f||b.Ic)&&mu(a,!0).then(function(){var k=
(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.h.onEvent(new xk("boundarycrossed",k))});return c}function gu(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.i.has(f.type)){var g=a.i.get(f.type),h=Sr(a.h.U,g.type),k=a.h.Jb();(g=nu(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.F&&d.set(zc,a.F);return d};function Du(){}
function Eu(a,b,c,d,e){var f=e in d,g=new Set(["__proto__","constructor","prototype"]);var h=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;for(var k=f||h,l=!0,m=t(Object.keys(b)),n=m.next();!n.done;n=m.next()){n=n.value;var p=e+"."+n,u=f?d[e]:c[n];g.has(n)?(Va("Invalid config, dangerous key "+p),l=!1):k||n in c?b[n]===void 0?u===void 0||k?delete a[n]:a[n]=nd(u):h?a[n]=b[n]:u.constructor==Object&&b[n]&&b[n].constructor==Object?(a[n]||(a[n]=nd(u)),
n=Eu(a[n],b[n],u,d,p),l=l&&n):typeof b[n]!=typeof u||b[n]==null||typeof b[n]!="function"&&b[n].constructor!=u.constructor?(Va("Invalid config, wrong type for "+p),l=!1):typeof c[n]=="function"&&c[n].length!=b[n].length?(Wa("Unexpected number of arguments for "+p),a[n]=b[n]):a[n]=Array.isArray(a[n])?b[n].slice():b[n]:(Va("Invalid config, unrecognized key "+p),l=!1)}return l}
function Fu(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 Gu(a,b){return a&&b}
function Hu(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())h=h.value,f[h]instanceof HTMLElement||(e(f[h])&&Object.keys(f[h]).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])?gb(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}K("shaka.util.ConfigUtils",Du);Du.getDifferenceFromConfigObjects=Hu;Du.convertToConfigObject=Fu;Du.mergeConfigObjects=Eu;function Iu(){}
function Ju(){var a=Infinity,b=ob();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:qk(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],keepDrmEngineOnDetach:!1,initDataTransform:function(g,h,k){"apple"===window.shakaMediaKeysPolyfill&&h=="skd"&&(h=k.serverCertificate,k=Tl(g),g=Ul(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},
parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE",renewalIntervalSec:0,failureCallback:function(g){return Gu([g])}},d="reload";b.gb("")&&(d="smooth");var e={trackSelectionCallback:function(g){return H(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return H(function(k){if(k.i==1)return navigator.storage&&navigator.storage.estimate?k.h(navigator.storage.estimate(),
3):k.return(!0);h=k.j;return k.return(h.usage+g<h.quota*.95)})},progressCallback:function(g,h){return Gu([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:c,manifest:{retryParameters:qk(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,disableChapters:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,
updatePeriod:-1,ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:ec(!1,!0),manifestPreprocessorTXml:Ku,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:!1,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1,chaptersUri:""},msf:{fingerprintUri:"",namespaces:[],authorizationToken:"",version:"auto",catalogPreprocessor:Lu}},streaming:{retryParameters:qk(),
failureCallback:function(g){return Gu([g])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!1,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,fallbackToNativeHlsOnMseError:!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,stopFetchingOnPause:!1,clampAppendWindowToDuration:!1,processSrcEqualMetadata:!0},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,commonAccessTokenHeaderName:"cta-common-access-token"},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(g){return Gu([g],
"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(g,h,k){return Gu([g,h,k])},modifyPreselectionSegmentCallback:function(g){return g},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0,transmuxWorkerUrl:"",repairIFrames:!0},offline:e,abrFactory:function(){return new Yf},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Us,[null].concat(wa(Ja.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,
defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5,droppedFramesThreshold:.15,droppedFramesInterval:2,droppedFramesBanDuration:30},restrictToElementSize:!1,restrictToScreenSize:!1,
ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,droppedFrames:!0,allowAudioFallback:!0},preferredAudio:[{language:"",role:"",label:"",channelCount:2,codec:""}],preferredText:[],preferredVideo:[{label:"",role:"",language:"",codec:"",hdrLevel:"AUTO",layout:""}],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:{fontScaleFactor:1,positionArea:0,fontFamily:"",fontColor:"",fontOpacity:NaN,backgroundColor:"",backgroundOpacity:NaN,characterEdgeStyle:0,subtitleDelay:0,suspendRenderingWhenHidden:!0},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],includeInRequests:[],version:1,
eventTargets:[],applyParametersFromManifest:!0},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,disableSVTA:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0,disableTrackingEvents:!1,disableSnapback:!1,interstitialPreloadAheadTime:10,
interstitialCooldown:0,disablePlayedLinearAdSkip:!1,disableTrackingForPlayedLinearAds:!1},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0,autoPlayNext:!0},accessibility:{handleForcedSubtitlesAutomatically:!0,speechToText:{enabled:!1,maxTextLength:140,processLocally:!1,languagesToTranslate:[]}}};e.trackSelectionCallback=function(g){var h,k;return H(function(l){h=f.preferredAudio.map(function(m){return m.language}).filter(Boolean);k=f.preferredVideo[0]&&
f.preferredVideo[0].hdrLevel||"";return l.return(Mu(g,h,k))})};return b.Va(f)}function Nu(){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 Ou(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 Eu(a,b,c||Ju(),d,"")}
function Pu(a){var b=a.preferredAudio[0],c=a.preferredVideo[0],d;a.language=(d=b==null?void 0:b.language)!=null?d:"";var e;a.role=(e=b==null?void 0:b.role)!=null?e:"";var f;a.channelCount=(f=b==null?void 0:b.channelCount)!=null?f:2;var g;a.spatialAudio=(g=b==null?void 0:b.spatialAudio)!=null?g:!1;var h;a.audioLabel=(h=b==null?void 0:b.label)!=null?h:"";var k;a.videoRole=(k=c==null?void 0:c.role)!=null?k:"";var l;a.hdrLevel=(l=c==null?void 0:c.hdrLevel)!=null?l:"";var m;a.videoLayout=(m=c==null?void 0:
c.layout)!=null?m:"";var n;a.videoLabel=(n=c==null?void 0:c.label)!=null?n:"";a.preferredAudioCodecs=a.preferredAudio.map(function(u){return u.codec}).filter(Boolean);var p;a.preferredAudioChannelCount=(p=b==null?void 0:b.channelCount)!=null?p:2}
function Mu(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(l){return l.hdr&&l.hdr=="HLG"?!0:!1}),d=ob().jc(c));var e=a.filter(function(l){return l.type!="variant"||l.hdr&&l.hdr!=d?!1:!0});c=[];var f=e.map(function(l){return l.language}),g=null;b=t(b);for(var h=b.next();!h.done&&!(g=tc(h.value,f));h=b.next());g&&(c=e.filter(function(l){return mc(l.language)==g}));c.length==0&&(c=e.filter(function(l){return l.primary}));c.length==0&&(e.map(function(l){return l.language}),c=e);var k=c.filter(function(l){return l.height&&
l.height<=480});k.length&&(k.sort(function(l,m){return m.height-l.height}),c=k.filter(function(l){return l.height==k[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(l,m){return l.bandwidth-m.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=zc&&c.type!="image"&&c.type!="chapter"||b.push(c);return b}function Ku(a){return Gu([a],a)}function Lu(a){return Gu([a],a)}K("shaka.util.PlayerConfiguration",Iu);Iu.mergeConfigObjects=Ou;
Iu.createDefaultForLL=Nu;Iu.createDefault=Ju;function Qu(){this.h=null;this.i=[]}function Ru(a,b){var c=0;a.h&&a.h.state==b&&(c+=a.h.duration);a=t(a.i);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Su(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.i),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.h&&c.push(b(a.h));return c};function Tu(){this.j=this.i=null;this.h=[]}function Uu(a,b,c){a.j!=b&&(a.j=b,a.h.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Vu(){this.F=this.ba=NaN;this.m="";this.j=this.bi=this.C=this.D=this.M=this.G=this.B=this.o=this.L=this.u=this.H=this.i=this.Y=this.$=this.O=this.T=this.V=NaN;this.N=0;this.I=this.K=NaN;this.h=new Qu;this.l=new Tu}function Wu(a,b,c){a.V=b;a.T=c}function Xu(a,b,c){a.ba=b;a.F=c}function Yu(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Zu(a,b){b>=0&&(a.B=b)}function $u(a,b){b>=0&&(a.G=b)}function av(a,b){b>=0&&(a.M=b)}function bv(a,b){a.j=isNaN(a.j)?b:a.j+b}
function cv(a){var b=a.ba,c=a.F,d=a.m,e=a.D,f=a.T,g=a.V,h=a.O,k=a.$,l=a.Y,m=a.C,n=a.i,p=a.H,u=a.u,q=a.L,v=a.o,w=Ru(a.h,"playing"),x=Ru(a.h,"paused"),y=Ru(a.h,"buffering"),z=a.B,C=a.G,B=a.M,A=a.bi,D=a.j,F=a.N,E=a.K,G=a.I,J=Su(a.h),N=[];a=t(a.l.h);for(var P=a.next();!P.done;P=a.next())P=P.value,N.push({timestamp:P.timestamp,id:P.id,type:P.type,fromAdaptation:P.fromAdaptation,bandwidth:P.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:p,timeToFirstFrame:u,manifestTimeSeconds:q,drmTimeSeconds:v,playTime:w,pauseTime:x,bufferingTime:y,licenseTime:z,liveLatency:C,maxSegmentDuration:B,manifestSizeBytes:A,bytesDownloaded:D,nonFatalErrorCount:F,manifestPeriodCount:E,manifestGapCount:G,stateHistory:J,switchHistory:N}};function dv(a,b,c,d){yk.call(this);this.T=a;this.ba=b;this.Ma=d.networkingEngine;this.B=c;this.m=null;this.Ga=0;this.Pa=d.ye;this.I=d.Ak;this.ra=d.Bk;this.j=d.config;this.o=this.L=this.h=null;this.va=!1;this.M=d.Sk;this.Aa=!1;this.V=d.al||new it(function(){return{start:0,end:Infinity}});this.Ca=!1;this.l=null;this.Y=!1;this.D=null;this.G=new Map;this.Da=!1;this.Oa=d.Rk;this.ia=new Vu;this.sa=Promise.withResolvers();this.C=Promise.withResolvers();this.$=null;this.F=!1;this.na=d.ej;this.Qa=d.Nk;this.u=
this.i=null;this.K=!1;this.O=[];this.N=[];this.H=!0}ta(dv,yk);function ev(a,b,c){(a=b?a.N:a.O)?a.push(c):c()}function fv(a){if(a.N)for(var b=t(a.N),c=b.next();!c.done;c=b.next())c=c.value,c();a.N=null}function gv(a,b){a.$=b;a.K=!0;if(a.O){b=t(a.O);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.O=null}r=dv.prototype;r.getStartTime=function(){return this.B};r.ig=function(){return this.ba};r.Je=function(){return this.T};r.hg=function(){return this.h};function hv(a){a.Aa=!0;return a.M}
function iv(a){a.Ca=!0;return a.V}r.getStats=function(){return this.ia};function jv(a){a.Y=!0;return a.l}function kv(a,b){a.l=b;a.I.h=b;a.Y=!0}r.Yj=function(){return this.i?Ef(this.i):null};r.Xj=function(){return this.u?Ff(this.u):null};function lv(a){a.Da=!0;return a.G}
r.start=function(){var a=this;this.C.promise.catch(function(){});(function(){var b;return H(function(c){switch(c.i){case 1:return c.h(Promise.resolve(),2);case 2:return c.o(3),c.h(mv(a),5);case 5:nv(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return c.h(ov(a),7);case 7:nv(a);case 6:return c.h(pv(a),8);case 8:nv(a);if(!a.na){c.A(9);break}return c.h(qv(a),10);case 10:nv(a);case 9:if(!a.na||!a.l){c.A(11);break}return c.h(Ll(a.l),12);case 12:nv(a);case 11:a.C.resolve();c.u(0);break;case 3:b=
c.m(),b instanceof L&&(b.code==7001||b.code==7003)||a.C.reject(b),c.l()}})})()};r.dispatchEvent=function(a){return this.$?this.$.dispatchEvent(a):yk.prototype.dispatchEvent.call(this,a)};r.onError=function(a){a.severity===2&&(this.C.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new xk("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function nv(a){if(a.F)throw new L(2,7,7003);}function rv(a,b){a.dispatchEvent(new xk("onstatechange",(new Map).set("state",b)))}
function mv(a){var b,c,d,e,f,g;return H(function(h){switch(h.i){case 1:rv(a,"manifest-parser");a.o||(a.L=Nc(a.T,a.ba),a.o=a.L(),a.o.configure(a.j.manifest,function(){return a.H}));b=Date.now()/1E3;rv(a,"manifest");if(a.h){h.A(2);break}return h.h(a.o.start(a.T,a.ra),3);case 3:return a.h=h.j,sv(a.h),a.F||a.Qa(a.h),h.h(tv(a),2);case 2:return a.sa.resolve(),c=new xk("manifestparsed",void 0),h.h(Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new L(2,4,4036);sv(a.h);d=qr(a.I,
a.h);if(!d){h.A(6);break}e=new xk("trackschanged",void 0);return h.h(Promise.resolve(),7);case 7:nv(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,g>=0&&(a.ia.L=g),h.l()}})}
function ov(a,b){var c,d,e,f,g;return H(function(h){switch(h.i){case 1:if(!a.h||a.l)return h.return();rv(a,"drm-engine");a.Ga=Date.now()/1E3;a.l=a.Pa();a.I.h=a.l;a.l.configure(a.j.drm,function(){return a.H});c=Of(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.oa());return h.h(jl(a.l,c,a.h.offlineSessionIds,d),2);case 2:nv(a);if(!b){h.A(3);break}return h.h(a.l.xb(b),4);case 4:nv(a);case 3:return a.m&&(e=a.m.getConfiguration(),e.keySystem=uv(a),a.m.configure(e)),h.h(or(a.I,
a.h),5);case 5:f=h.j;if(!f){h.A(0);break}g=new xk("trackschanged",void 0);return h.h(Promise.resolve(),7);case 7:a.dispatchEvent(g),h.l()}})}r.configure=function(a,b){a=Fu(a,b);Ou(this.j,a);vv(this)};r.getConfiguration=function(){return nd(this.j)};
function tv(a){var b;return H(function(c){a.m||(a.m=a.j.adaptationSetCriteriaFactory(),b={preferredAudio:a.j.preferredAudio,preferredVideo:a.j.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:a.j.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:uv(a)},Pu(b),a.m.configure(b));if(a.i||
!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return c.A(0);a.i=wv(a);return a.i?c.h(xv(a.i),0):c.A(0)})}function pv(a){return H(function(b){if(b.i==1)return!a.i||a.h.variants.includes(a.i)?b.A(0):b.h(yv(a.i),3);a.i=wv(a);return a.i?b.h(xv(a.i),0):b.A(0)})}
function qv(a){var b,c,d,e,f;return H(function(g){!a.i&&(b=wv(a))&&(a.i=b);if(!a.i)return g.A(0);c=a.h.presentationTimeline.isLive();d=[];e=a.i;e.video&&d.push(zv(a,e.video,c));e.audio&&d.push(zv(a,e.audio,c));if(f=Av(a,e))d.push(zv(a,f,c)),a.u=f;return g.h(Promise.all(d),0)})}
function wv(a){if(!a.D){var b=a.j.abrFactory;a.D=b();b=a.D;var c=b.configure;var d=a.ra.getBandwidthEstimate();if(!Number.isFinite(d)||d<=0)d=a.j.abr;else{var e=od(a.j.abr);e.defaultBandwidthEstimate=d;e.useNetworkInformation=!1;d=e}c.call(b,d)}b=a.h.isLowLatency&&a.j.streaming.lowLatencyMode;c=Of(a.h.variants);c=a.m.create(c);a.D.setVariants(Array.from(c.values()),b);return a.D.chooseVariant(!0)}
function Av(a,b){var c=null,d=Tf(a.h.textStreams,a.j.preferredText);d.length&&(c=d[0]);!c&&(b==null?0:b.audio)&&a.j.accessibility.handleForcedSubtitlesAutomatically&&(d=Rf(a.h.textStreams,b.audio.language,"",!0),d.length&&(c=d[0]));return c}
function zv(a,b,c){var d,e,f,g,h;return H(function(k){if(k.i==1)return d=a.j.streaming.segmentPrefetchLimit||2,e=new lt(d,b,function(l,m,n){su(a.h,a.j.streaming.lowLatencyMode,m,l)||(n=null);return Bu(l,m,n||null,a.j.streaming.retryParameters,a.Ma,a.H)},!1),a.G.set(b.id,e),b.segmentIndex?k.A(2):k.h(b.createSegmentIndex(),2);f=typeof a.B==="number"?a.B:0;(h=(g=b.segmentIndex.ob(f))?g.next().value:null)||(h=Hf(b.segmentIndex));return h?c?h.initSegmentReference?k.h(ot(e,h.initSegmentReference),0):k.A(0):
k.h(nt(e,h.startTime),0):k.A(0)})}
function vv(a){var b,c,d,e,f,g,h,k,l,m,n,p,u;H(function(q){if(q.i==1){if(!a.i)return q.return();b=a.h.presentationTimeline.isLive();c=[];d=function(v){v&&(a.G.has(v.id)&&(vt(a.G.get(v.id)),a.G.delete(v.id)),v.segmentIndex&&v.closeSegmentIndex&&c.push(v.closeSegmentIndex()))};e=function(){var v=a.i;v=t([v.video,v.audio]);for(var w=v.next();!w.done;w=v.next())d(w.value);a.u=null};f=function(){d(a.u);a.u=null};g=a.m.getConfiguration();h={preferredAudio:a.j.preferredAudio,preferredVideo:a.j.preferredVideo,
language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:a.j.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:uv(a)};Pu(h);pd(g)!=pd(h)&&(a.m.configure(h),e(),a.i=wv(a));a.i?(k=Av(a,a.i))?k!=a.u&&(f(),a.u=k):f():f();return q.h(Promise.all(c),2)}l=[];if(a.i){m=a.i;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=
n.next())u=p.value,l.push(zv(a,u,b));a.u&&l.push(zv(a,a.u,b))}return q.h(Promise.all(l),0)})}function xv(a){var b,c,d,e;return H(function(f){b=[];c=t([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?f.h(Promise.all(b),0):f.A(0)})}
function yv(a){var b,c,d,e;return H(function(f){b=[];c=t([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?f.h(Promise.all(b),0):f.A(0)})}r.Gl=function(){return this.C.promise};
r.destroy=function(){var a=this,b,c,d;return H(function(e){if(e.i==1)return a.F=!0,!a.o||a.va?e.A(2):e.h(a.o.stop(),2);if(e.i!=4)return a.D&&a.D.release(),a.M&&!a.Aa&&a.M.release(),a.Ca||a.V.release(),!a.l||a.Y?e.A(4):e.h(a.l.destroy(),4);if(a.G.size>0&&!a.Da)for(b=t(a.G.values()),c=b.next();!c.done;c=b.next())d=c.value,vt(d);e.l()})};function uv(a){return Zb(a.l?a.l.Tb():null)}
function sv(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))}K("shaka.media.PreloadManager",dv);dv.prototype.destroy=dv.prototype.destroy;dv.prototype.waitForFinish=dv.prototype.Gl;dv.prototype.getPrefetchedTextTrack=dv.prototype.Xj;dv.prototype.getPrefetchedVariantTrack=dv.prototype.Yj;function Bv(a){yk.call(this);this.h=a;this.i=null}ta(Bv,yk);Bv.prototype.release=function(){this.h=null;yk.prototype.release.call(this)};Bv.prototype.l=function(a){if(this.h&&(a=this.h.jg(a))){var b=a.Ig-a.start;this.i!=null&&Math.abs(b-this.i)>.5&&this.dispatchEvent(new xk("change",new Map([["programDateTime",new Date(a.Ig*1E3)],["timestamp",a.start]])));this.i=b}};function Cv(a,b,c){c=c===void 0?null:c;yk.call(this);var d=this;this.j=a;this.o=b;this.h=new Map;this.m=c;this.u=[{Oc:null,Nc:Dv,Cc:function(e,f){return Ev(d,"enter",e,f)}},{Oc:Fv,Nc:Dv,Cc:function(e,f){return Ev(d,"enter",e,f)}},{Oc:Gv,Nc:Dv,Cc:function(e,f){return Ev(d,"enter",e,f)}},{Oc:Dv,Nc:Fv,Cc:function(e,f){return Ev(d,"exit",e,f)}},{Oc:Dv,Nc:Gv,Cc:function(e,f){return Ev(d,"exit",e,f)}},{Oc:Fv,Nc:Gv,Cc:function(e,f){f?Ev(d,"skip",e,f):(Ev(d,"enter",e,f),Ev(d,"exit",e,f))}},{Oc:Gv,Nc:Fv,Cc:function(e,
f){return Ev(d,"skip",e,f)}}];this.i=new ib;this.i.J(this.j,"regionremove",function(e){d.h.delete(e.region)})}ta(Cv,yk);Cv.prototype.release=function(){this.j=null;this.h.clear();this.i.release();this.i=null;yk.prototype.release.call(this)};
Cv.prototype.l=function(a,b){if(!this.o||a!=0){this.o=!1;var c=this.m;this.m=a;for(var d=t(this.j.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.h.get(e),g=a<e.startTime?Fv:a>e.endTime?Gv:Dv;f==null&&c!=null&&g==Gv&&e.endTime>=c&&(f=Fv);this.h.set(e,g);for(var h=t(this.u),k=h.next();!k.done;k=h.next())k=k.value,k.Oc==f&&k.Nc==g&&k.Cc(e,b)}}};function Ev(a,b,c,d){b=new xk(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Fv=1,Dv=2,Gv=3;function Hv(){}Hv.prototype.parse=function(a){function b(h,k){k&&d.push({key:h,description:"",data:k,mimeType:null,pictureType:null})}function c(h,k){return Fb(a.subarray(e+h,e+h+k)).replace(/\0/g,"").trim()}var d=[],e=a.length-128;if(e<0||a[e]!==84||a[e+1]!==65||a[e+2]!==71)return d;b("TIT2",c(3,30));b("TPE1",c(33,30));b("TALB",c(63,30));b("TYER",c(93,4));var f="",g=null;a[e+125]===0?(f=c(97,28),g=a[e+126]):f=c(97,30);b("COMM",f);g!==null&&b("TRCK",String(g));b("TCON",String(a[e+127]));return d};
K("shaka.metadata.Id3V1Utils",Hv);Hv.prototype.parse=Hv.prototype.parse;for(var Iv=t(we),Jv=Iv.next();!Jv.done;Jv=Iv.next())ci(Jv.value,function(){return new Hv});function Kv(){}Kv.prototype.parse=function(a){var b=[];(new jh).ma(["moov","udta"],oh).P("meta",oh).box("ilst",function(c){for(;c.reader.Wa()&&!(c.reader.Na()-c.reader.Ia()<8);){var d=c.reader.R(),e=nh(c.reader.R());if(d<8)break;d=c.reader.wa(Math.min(d-8,c.reader.Na()-c.reader.Ia()),!1);(e=e==="----"?Lv(d):Mv(e,d))&&b.push(e)}}).parse(a);return b};
function Lv(a){var b="",c="",d=null;(new jh).P("mean",function(e){b=Fb(e.reader.wa(e.reader.Na()-e.reader.Ia(),!1))}).P("name",function(e){c=Fb(e.reader.wa(e.reader.Na()-e.reader.Ia(),!1))}).P("data",function(e){d=Nv(e)}).parse(a);return d&&c?{key:c,data:d.data,description:b?"Domain: "+b:"",mimeType:d.mimeType,pictureType:d.pictureType}:null}
function Mv(a,b){var c=Ov.get(a)||a,d=null;(new jh).P("data",function(e){e=Nv(e,a);d={key:c,data:e.data,description:"",mimeType:e.mimeType,pictureType:e.pictureType}}).parse(b);return d}
function Nv(a,b){b=b===void 0?"":b;a.reader.skip(4);var c=a.reader.wa(a.reader.Na()-a.reader.Ia(),!1);if((b==="trkn"||b==="disk")&&c.length>=6)return a=Bb(c),c=a.getUint16(2,!1),a=a.getUint16(4,!1),{data:a>0?c+"/"+a:""+c,mimeType:null,pictureType:null};switch(a.flags){case 13:return{data:xb(c),mimeType:"image/jpeg",pictureType:3};case 14:return{data:xb(c),mimeType:"image/png",pictureType:3};case 21:a=Bb(c);switch(c.length){case 1:a=a.getInt8(0);break;case 2:a=a.getInt16(0,!1);break;case 3:a=c[0]<<
16|c[1]<<8|c[2];a&8388608&&(a|=-16777216);break;case 4:a=a.getInt32(0,!1);break;default:for(a=0,c=t(c),b=c.next();!b.done;b=c.next())a=a<<8|b.value}return{data:a,mimeType:null,pictureType:null};default:return{data:Fb(c).replace(/\0/g,""),mimeType:null,pictureType:null}}}K("shaka.metadata.IlstUtils",Kv);Kv.prototype.parse=Kv.prototype.parse;
var Ov=(new Map).set("\u00a9nam","TIT2").set("\u00a9ART","TPE1").set("aART","TPE2").set("\u00a9alb","TALB").set("\u00a9gen","TCON").set("\u00a9day","TDRC").set("\u00a9wrt","TEXT").set("trkn","TRCK").set("disk","TPOS").set("\u00a9cmt","COMM").set("covr","APIC").set("cprt","TCOP").set("\u00a9too","TENC").set("tmpo","TBPM").set("cpil","TCMP");ci("audio/mp4",function(){return new Kv});function Pv(){}
Pv.prototype.parse=function(a){if(a.length>=4&&a[0]==102&&a[1]==76&&a[2]==97&&a[3]==67){for(var b=[],c=4;c+4<=a.length;){var d=a[c],e=!!(d&128),f=d&127;d=a[c+1]<<16|a[c+2]<<8|a[c+3];c+=4;if(c+d>a.length)break;var g=a.subarray(c,c+d);f==4&&b.push.apply(b,wa(Qv(g)));if(f==6){try{var h=new ah(g,0),k=h.R(),l=h.R(),m=Fb(h.wa(l,!0)),n=h.R(),p=Fb(h.wa(n,!0));h.skip(16);var u=h.R(),q=h.wa(u,!0);var v={key:"APIC",data:xb(q),description:p,mimeType:m,pictureType:k}}catch(w){v=null}(f=v)&&b.push(f)}c+=d;if(e)break}return b}return a.length>=
4&&a[0]==79&&a[1]==103&&a[2]==103&&a[3]==83&&(b=Fb(a),c=b.indexOf("OpusTags"),c<0&&(c=b.indexOf("vorbis")),c>=0)?Qv(a.subarray(c+8)):[]};function Qv(a){var b=[];try{var c=new ah(a,bh),d=c.R();c.skip(d);var e=c.R();for(a=0;a<e;a++){var f=c.R(),g=Fb(c.wa(f,!1)),h=g.indexOf("=");if(!(h<0)){var k=g.substring(0,h).toUpperCase();b.push({key:Rv[k]||k,data:g.substring(h+1),description:"",mimeType:null,pictureType:null})}}}catch(l){}return b}K("shaka.metadata.VorbisUtils",Pv);Pv.prototype.parse=Pv.prototype.parse;
var Rv={TITLE:"TIT2",ARTIST:"TPE1",ALBUM:"TALB",ALBUMARTIST:"TPE2",TRACKNUMBER:"TRCK",DISCNUMBER:"TPOS",DATE:"TDRC",GENRE:"TCON",COMMENT:"COMM",DESCRIPTION:"TIT3",COPYRIGHT:"TCOP",COMPOSER:"TCOM",LYRICS:"USLT",ISRC:"TSRC"};ci("audio/flac",function(){return new Pv});ci("audio/ogg",function(){return new Pv});ci("audio/vorbis",function(){return new Pv});ci("audio/opus",function(){return new Pv});function Sv(a){return a>=200&&a<=299&&a!=202||a==304}function Tv(a,b,c,d,e,f,g){if(Sv(c))return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Ib(b)}catch(h){}throw new L(1,1,1001,d,c,f,a,g,e||d);};function Uv(){}
function pw(a,b,c,d,e,f){var g=new qw;try{bl(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return tk(new L(1,1,1002,a,m,c))}var h=new rw,k={Ch:!1,Ti:!1};a=sw(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 sk(a,function(){k.Ch=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new $e(function(){k.Ti=!0;h.abort()});l.ea(b/
1E3);a.finally(function(){l.stop()})}return a}
function sw(a,b,c,d,e,f,g,h,k){var l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F;return H(function(E){switch(E.i){case 1:return l=tw,n=new ArrayBuffer(0),u=p=0,q={},v=Date.now(),E.o(2),E.h(l(a,d),4);case 4:m=E.j;q=uw(m.headers);g(q);Sv(m.status)||(h=null);if(d.method=="HEAD"){E.A(5);break}x=(w=m.headers.get("Content-Length"))?parseInt(w,10):0;if(!m.body)return E.h(m.arrayBuffer(),12);y=vw(m.body,x,m.headers);z=y.reader;C=y.Bh;B=function(G){var J,N,P;return H(function(U){if(U.i==1){if(!G)return U.A(2);p+=G.byteLength;
return h?U.h(h(G),2):U.A(2)}J=Date.now();N=p-u;if(J-v>100&&N>=k||!G)P=G?x-p:0,f(J-v,N,P),u=p,v=J;U.l()})};return C?E.h(ww(z,x,B,!!h),11):E.h(xw(z,x,B),10);case 10:n=E.j;E.A(5);break;case 11:n=E.j;E.A(5);break;case 12:n=E.j,A=Date.now(),f(A-v,n.byteLength,0);case 5:b.headers.Range&&(D=b.headers.Range.replace("bytes=","").split("-").filter(function(G){return G}).map(function(G){return parseInt(G,10)}),D.length==2&&n.byteLength!=D[1]-D[0]+1&&Wa("Payload length does not match range requested bytes",b,
m));E.u(3);break;case 2:F=E.m();if(e.Ch)throw new L(1,1,7001,a,c);if(e.Ti)throw new L(1,1,1003,a,c);throw new L(1,1,1002,a,F,c);case 3:return E.return(Tv(q,n,m.status,a,m.url,b,c))}})}function vw(a,b,c){if(yw&&b>0&&!c.get("Content-Encoding")){b=null;try{b=a.getReader({mode:"byob"})}catch(d){}if(b)return{reader:b,Bh:b instanceof yw}}return{reader:a.getReader(),Bh:!1}}
function xw(a,b,c){var d,e,f,g;return H(function(h){switch(h.i){case 1:d=new zw(b),e=!1;case 2:if(e){h.A(4);break}return h.h(a.read(),5);case 5:return f=h.j,(g=(e=f.done)?null:f.value)&&d.append(g),h.h(c(g),2);case 4:return h.return(Aw(d))}})}
function ww(a,b,c,d){var e,f,g,h,k,l,m,n,p;return H(function(u){switch(u.i){case 1:e=new ArrayBuffer(b),f=0,g=null,h=!1;case 2:if(h){u.A(4);break}l=(k=!g&&f<b)?new Uint8Array(e,f,b-f):new Uint8Array(65536);return u.h(a.read(l),5);case 5:return m=u.j,n=m.value,k&&n&&(e=n.buffer),h=m.done,p=null,h||(p=n,k?f+=p.byteLength:(g||(g=new zw(0),g.append(new Uint8Array(e,0,f))),g.append(p)),d&&(p=p.slice())),u.h(c(p),2);case 4:return g?u.return(Aw(g)):u.return(xb(new Uint8Array(e,0,f)))}})}
function uw(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Bw(){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)}K("shaka.net.HttpFetchPlugin",Uv);Uv.isSupported=Bw;Uv.parse=pw;function zw(a){this.h=null;if(a>0)try{this.h=new Uint8Array(a)}catch(b){}this.i=0;this.j=[]}
zw.prototype.append=function(a){this.h&&this.i+a.byteLength>this.h.byteLength&&(this.j.push(this.h.subarray(0,this.i)),this.h=null);this.h?this.h.set(a,this.i):this.j.push(a);this.i+=a.byteLength};function Aw(a){return a.h?xb(a.h.subarray(0,a.i)):xb(Ub(a.j))}var yw=window.ReadableStreamBYOBReader,tw=window.fetch,rw=window.AbortController,qw=window.Headers;Bw()&&(Kk("http",pw,2,!0),Kk("https",pw,2,!0),Kk("blob",pw,2,!0));function Cw(){}
function Dw(a,b,c,d,e,f){var g=new Ew,h=Date.now(),k=0,l=new Promise(function(m,n){function p(){g.onload=null;g.onerror=null;g.ontimeout=null;g.onabort=null;g.onreadystatechange=null;g.onprogress=null}g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var u={};g.onabort=function(){n(new L(1,1,7001,a,c));p()};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var v=g.getAllResponseHeaders().trim().split("\r\n"),w=
{};v=t(v);for(var x=v.next();!x.done;x=v.next()){x=x.value;var y=x.indexOf(": ");y!==-1&&(w[x.slice(0,y).toLowerCase()]=x.slice(y+2))}u=w;e(u)}};g.onload=function(){var v=g.response;try{var w=Tv(u,v,g.status,a,g.responseURL,b,c);m(w)}catch(x){n(x)}p()};g.onerror=function(v){n(new L(1,1,1002,a,v,c));p()};g.ontimeout=function(){n(new L(1,1,1003,a,c));p()};g.onprogress=function(v){var w=Date.now(),x=f.minBytesForProgressEvents||0,y=v.loaded-k;if(w-h>100&&y>=x||v.lengthComputable&&v.loaded==v.total)d(w-
h,y,g.readyState==4?0:v.total-v.loaded),k=v.loaded,h=w};for(var q in b.headers)try{g.setRequestHeader(q.toLowerCase(),b.headers[q])}catch(v){throw new L(1,1,1002,a,v,c);}g.send(b.body)});return new sk(l,function(){g.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",Cw);Cw.parse=Dw;var Ew=window.XMLHttpRequest;Kk("http",Dw,1,!0);Kk("https",Dw,1,!0);Kk("blob",Dw,1,!0);for(var Fw={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",ase:"American Sign Language",bfi:"British Sign Language",bzs:"Brazilian Sign Language",csn:"Colombian Sign Language",dse:"Dutch Sign Language",dsl:"Danish Sign Language",fsl:"French Sign Language",
gsg:"German Sign Language",gss:"Greek Sign Language",isg:"Irish Sign Language",ise:"Italian Sign Language",jsl:"Japanese Sign Language",mfs:"Mexican Sign Language",ncs:"Nicaraguan Sign Language",nsl:"Norwegian Sign Language",psr:"Portuguese Sign Language",sfb:"French Belgian Sign Language",sfs:"South African Sign Language",sgg:"Swiss German Sign Language",ssp:"Spanish Sign Language",swl:"Swedish Sign Language",vgt:"Flemish Sign Language"},Gw=t(Object.keys(Fw)),Hw=Gw.next();!Hw.done;Hw=Gw.next()){var Iw=
Hw.value;Fw[Iw.toLowerCase()]=Fw[Iw]};function Jw(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Jw(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=de,e=a.fontStyle==ee,f=a.textDecoration.includes(fe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=Kw(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=Kw(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function Kw(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 Lw(a){a=a.trim().toLowerCase();Mw.has(a)&&(a=Mw.get(a));var b=a.match(/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/);if(b){a=b[1];a.length<=4&&(a=a.split("").map(function(g){return g+g}).join(""));b=[];for(var c=0;c<a.length;c+=2)b.push(parseInt(a.slice(c,c+2),16));b.length==3?b.push(1):b[3]/=255;return b}if(a=a.match(/^rgba?\(([^)]*)\)$/)){a=a[1].trim().split(/\s*[,/]\s*|\s+/);if(a.length<3||a.length>4)return null;b=[];for(c=0;c<a.length;c++){var d=a[c],e=d.endsWith("%"),f=Number(e?d.slice(0,
-1):d);if(!d||isNaN(f))return null;c<3?(f=e?f*255/100:f,b.push(Math.min(255,Math.max(0,f)))):(f=e?f/100:f,b.push(Math.min(1,Math.max(0,f))))}b.length==3&&b.push(1);return b}return null}function Nw(a,b){return(a=Lw(a))?"rgba("+a.slice(0,3).join(", ")+", "+Math.min(1,Math.max(0,b))+")":null}
function Ow(a,b){var c=[];a=t(Pw(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,wa(Ow(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Jw(d,b);c.push(e)}return c}function Pw(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Gf:void 0},c=a.next())d.Gf=c.value,b.some(function(e){return function(f){return Wd(e.Gf,f)}}(d))||b.push(d.Gf);return b}
function Qw(a,b){function c(e){for(var f=5381,g=e.length;g;)f=f*33^e.charCodeAt(--g);return(f>>>0).toString()}if(a.startTime>=a.endTime)return null;var d=new VTTCue(a.startTime,a.endTime,a.payload);d.id=c(a.startTime.toString())+c(a.endTime.toString())+c(a.payload);d.lineAlign=a.lineAlign;d.positionAlign=a.positionAlign;a.size&&(d.size=a.size);try{d.align=a.textAlign}catch(e){}a.textAlign=="center"&&d.align!="center"&&(d.align="middle");a.writingMode=="vertical-lr"?d.vertical="lr":a.writingMode==
"vertical-rl"&&(d.vertical="rl");a.lineInterpretation==1&&(d.snapToLines=!1);a.line!=null&&(d.line=a.line);a.position!=null&&(d.position=a.position);b&&(a=Rw(b,a.region))&&(d.region=a);return d}
function Rw(a,b){if(!(window.VTTRegion&&"region"in VTTCue.prototype&&b&&b.id&&b.heightUnits==2&&b.widthUnits==bd&&b.viewportAnchorUnits==bd))return null;var c=[b.id,b.width,b.height,b.regionAnchorX,b.regionAnchorY,b.viewportAnchorX,b.viewportAnchorY,b.scroll].join("_"),d=a.get(c);d||(d=new VTTRegion,d.id=b.id,d.width=b.width,d.lines=b.height,d.regionAnchorX=b.regionAnchorX,d.regionAnchorY=b.regionAnchorY,d.viewportAnchorX=b.viewportAnchorX,d.viewportAnchorY=b.viewportAnchorY,d.scroll=b.scroll,a.set(c,
d));return d}
function Sw(a,b,c){var d=Ow(b),e=[];b=a.cues?Array.from(a.cues):[];d=t(d);for(var f=d.next(),g={};!f.done;g={$c:void 0},f=d.next())g.$c=f.value,!b.some(function(h){return function(k){return k.startTime==h.$c.startTime&&k.endTime==h.$c.endTime&&k.text==h.$c.payload}}(g))&&g.$c.payload&&(f=Qw(g.$c,c))&&e.push(f);c=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:h.region&&k.region?e.indexOf(h)-e.indexOf(k):"line"in VTTCue.prototype?
e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});c=t(c);for(b=c.next();!b.done;b=c.next())a.addCue(b.value)}function Tw(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 Uw(a){function b(d){d.line=c.line;d.lineAlign=c.lineAlign;d.position=c.position;d.positionAlign=c.positionAlign;d.size=c.size;d.displayAlign=c.displayAlign;d.region=c.region;d=t(d.nestedCues);for(var e=d.next();!e.done;e=d.next())b(e.value)}var c=new Ld(0,0,"");b(a)}
var Mw=new Map([["transparent","#0000"],["black","#000"],["silver","#c0c0c0"],["gray","#808080"],["grey","#808080"],["white","#fff"],["maroon","#800000"],["red","#f00"],["purple","#800080"],["fuchsia","#f0f"],["magenta","#f0f"],["green","#008000"],["lime","#0f0"],["olive","#808000"],["yellow","#ff0"],["navy","#000080"],["blue","#00f"],["teal","#008080"],["aqua","#0ff"],["cyan","#0ff"]]);function Vw(a){var b=this;this.i=a;this.u=new ib;this.o=new ib;this.l=this.D=null;this.h=new Map;this.B=new Map;this.j=-1;this.C=!1;this.m=null;this.u.J(a,"loaded",function(){return Ww(b)});Ww(this)}r=Vw.prototype;r.configure=function(a){this.D=a};r.remove=function(a,b){if(!this.i)return!1;var c=Xw(this);c&&Tw(c,function(d){return d.startTime<b&&d.endTime>a});return!0};
r.append=function(a){var b=Xw(this);if(b){var c,d,e=(d=(c=this.D)==null?void 0:c.subtitleDelay)!=null?d:0;a=e!==0?a.map(function(f){f=f.clone();f.startTime=Math.max(0,f.startTime+e);f.endTime=Math.max(0,f.endTime+e);return f}):a;c=this.B.getOrInsert(b,new Map);Sw(b,a,c)}};r.destroy=function(){this.i&&(this.l&&Yw(this),this.i=null);this.B.clear();var a;(a=this.m)==null||a.stop();this.m=null;var b;(b=this.u)==null||b.release();this.u=null;var c;(c=this.o)==null||c.release();this.o=null;return Promise.resolve()};
r.isTextVisible=function(){return this.C};r.setTextVisibility=function(a){this.C=a;var b=Xw(this);b?b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a)):this.i&&this.i.gg()===Zw&&$w(this,a)};r.setTextLanguage=function(){};function Yw(a){var b;(b=a.m)==null||b.stop();a.m=null;var c;(c=a.o)==null||c.Ta();b=t(a.h.values());for(c=b.next();!c.done;c=b.next())c.value.remove();a.h.clear();a.B.clear();a.j=-1;a.l=null}
function ax(a){var b=new Map,c=a.i.rb();c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;if(a.h.has(d.id)){var e=a;var f=e.h.get(d.id);d.active||f.track.mode==="disabled"||(f.track.mode="disabled");e.h.delete(d.id);e=f}else{e=a;f=e.l.ownerDocument.createElement("track");var g=ob();g=d.forced&&g.Ea()==="WEBKIT"?"forced":d.kind==="caption"?"captions":"subtitles";f.kind=g;f.label=bx(d);var h=void 0;g=d.language?d.language in Fw?d.language:(h=rc(d.language))!=null?h:"und":"und";f.srclang=g;f.src=
"data:,WEBVTT";e.l.appendChild(f);f.track.mode="hidden";f.track.mode="disabled";e=f}b.set(d.id,e);d.active&&(a.j=d.id)}c=t(a.h.values());for(d=c.next();!d.done;d=c.next())d=d.value,a.B.delete(d.track),d.remove();a.h=b;a.j<=-1||(a.h.has(a.j)?(b=a.h.get(a.j).track,b.mode==="disabled"&&(b.mode=a.C?"showing":"hidden")):a.j=-1)}
function cx(a){if(!a.m){var b=a.l;a.m=(new $e(function(){a.m=null;if(a.l===b){a:{var c=-1;if(a.h.has(a.j)){var d=a.h.get(a.j).track.mode;if(d==="showing"){c=a.j;break a}d==="hidden"&&(c=a.j)}d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=a.h.get(e);if(f.track.mode==="showing"){c=e;break a}c<0&&f.track.mode==="hidden"&&(c=e)}}d=a.h.get(c);e=t(a.h.values());for(f=e.next();!f.done;f=e.next())f=f.value,f!==d&&f.track.mode!=="disabled"&&(f.track.mode="disabled");a.j!==c&&(a.j=c,
dx(a,c))}})).ea(0)}}function Xw(a){return a.h.has(a.j)?a.h.get(a.j).track:null}function $w(a,b){a=Array.from(a.i.Xc().textTracks).filter(function(c){return["captions","subtitles","forced"].includes(c.kind)});if(b)!a.some(function(c){return c.mode==="showing"})&&(b=a.find(function(c){return c.mode==="hidden"}))&&(b.mode="showing");else for(b=t(a),a=b.next();!a.done;a=b.next())a=a.value,a.mode==="showing"&&(a.mode="hidden")}
function dx(a,b){if(b>-1){var c=a.i.rb().find(function(d){return d.id===b});if(c){a.i.Jc(c);return}}a.i.Jc(null)}function Ww(a){!a.l&&a.i&&a.i.gg()===ex&&(a.l=a.i.Xc(),a.u.Ra(a.i,"unloading",function(){return Yw(a)}),a.o.J(a.i,"textchanged",function(){return ax(a)}),a.o.J(a.l.textTracks,"change",function(){return cx(a)}),ax(a))}
function bx(a){if(a.label)return a.label;if(a.language){var b=rc(a.language);if(window.Intl&&"DisplayNames"in Intl)try{var c=(new Intl.DisplayNames(a.language,{type:"language",languageDisplay:"standard"})).of(a.language);if(c&&c.toLowerCase()!=a.language.toLowerCase())return c.charAt(0).toUpperCase()+c.slice(1)}catch(e){}if(c=Fw[a.language])return c;if(c=b&&Fw[b])return b===a.language?c:c+" ("+a.language+")"}var d;b=String((d=a.originalTextId)!=null?d:"");return a.language&&a.language!==a.originalTextId?
b+" ("+a.language+")":b}K("shaka.text.NativeTextDisplayer",Vw);Vw.prototype.setTextLanguage=Vw.prototype.setTextLanguage;Vw.prototype.setTextVisibility=Vw.prototype.setTextVisibility;Vw.prototype.isTextVisible=Vw.prototype.isTextVisible;Vw.prototype.destroy=Vw.prototype.destroy;Vw.prototype.append=Vw.prototype.append;Vw.prototype.remove=Vw.prototype.remove;Vw.prototype.configure=Vw.prototype.configure;var ex=2,Zw=3;function fx(a){var b=this;this.m=a;this.u=null;this.l=new ib;this.I=gx.value();this.h=null;this.B=!1;this.C=new hx;this.L=new $e(function(){ix(b)});this.K=1E15;this.G=jx(this);this.j=[this.G];this.F=this.H=this.i=this.o=null;this.D=new kx(this.C,this.L,function(c){if(b.B&&b.h){var d=b.u.maxTextLength;if(!(c.length<=d)){for(d=c.length-d;d>0&&c[d-1]!==" ";)d--;c="..."+c.slice(d).trimStart()}var e;(e=b.i)!=null&&e.i&&(e.h||(e.h=document.createElement("span"),e.h.setAttribute("translate","no"),e.h.style.backgroundColor=
"rgba(0,0,0,0.8)",e.h.style.padding="0px 5px",e.h.style.margin="2.5% 5%",e.i.appendChild(e.h)),e.h.textContent=c)}},function(){var c;(c=b.i)!=null&&c.h&&(c.h.textContent="")})}r=fx.prototype;r.configure=function(a){this.u=a;lx(this)};r.release=function(){this.o=null;this.l.Ta();mx(this);this.m=null;this.l.release();var a;(a=this.i)==null||a.release();this.h&&this.h.parentElement&&(this.h.remove(),this.h=null)};
r.enable=function(a){var b=this;this.I&&(this.h||(this.h=nx(this)),this.h&&(this.i||(this.i=new ox(this.h)),this.B&&a.id==this.o||(this.B=!0,this.o=a.id,this.l.J(this.m,"audiotrackschanged",function(){ix(b)}),a=this.m.Xc(),this.l.J(a,"seeking",function(){ix(b)}),this.l.J(a,"pause",function(){mx(b,!1)}),this.l.J(a,"play",function(){ix(b)}),a.paused||ix(this))))};
r.disable=function(){if(this.B){this.B=!1;this.o=null;this.l.Ta();mx(this);var a;(a=this.i)==null||a.release();this.i=null;this.C.release();this.D.release()}};r.isSupported=function(){if(!this.I)return!1;this.h||(this.h=nx(this));return this.h?!0:!1};r.rb=function(){if(!this.isSupported())return[];for(var a=t(this.j),b=a.next();!b.done;b=a.next())b=b.value,b.active=b.id==this.o;return this.j};
function ix(a){var b,c,d,e,f,g,h,k;H(function(l){switch(l.i){case 1:(b=a.i)!=null&&b.h&&(b.h.textContent="");c=a.m.getAudioTracks();if(!c.length)return l.return();d=px(a);if(!d)return l.return();e=c.find(function(m){return m.active});f="en";e&&e.language&&e.language!="und"&&(f=e.language);g=a.j.find(function(m){return m.id==a.o});h="";g&&g.language&&g.language!="und"&&(h=g.language);if(!a.D.isActive()||a.H!==f||a.F===h){l.A(2);break}a.F=h;return l.h(qx(a.C,f,h),3);case 3:return l.return();case 2:return mx(a),
l.o(4),l.h(qx(a.C,f,h),6);case 6:l.u(5);break;case 4:if(k=l.m(),k.name=="NotSupportedError")return l.return();case 5:return l.h(a.D.start(d,f,a.u.processLocally),7);case 7:a.H=f,a.F=h,l.l()}})}function mx(a,b){a.D.stop(b===void 0?!0:b)}
function px(a){var b=a.m.Xc();return b?rx.getOrInsertComputed(b,function(){var c=new (window.AudioContext||window.webkitAudioContext),d=c.createMediaElementSource(b),e=c.createMediaStreamDestination();d.connect(e);d.connect(c.destination);var f=e.stream.getAudioTracks()[0];return{wm:c,Qm:d,Gm:e,gj:f}}).gj:null}
function nx(a){a=a.m.pd;if(!a)return null;var b=document.createElement("div");b.classList.add("shaka-speech-to-text-container");b.style.textAlign="center";b.style.display="flex";b.style.flexDirection="column";b.style.alignItems="center";b.style.justifyContent="flex-end";a.appendChild(b);return b}
function lx(a){var b=a.j.map(function(e){return e.language}).filter(function(e){return e});if(!eb(a.u.languagesToTranslate,b)&&"Translator"in window){a.j=a.j.filter(function(e){if(e.id==a.G.id||a.u.languagesToTranslate.includes(e.language))return!0;e.id==a.o&&a.disable();return!1});b=t(a.u.languagesToTranslate);for(var c=b.next(),d={};!c.done;d={sg:void 0},c=b.next())d.sg=c.value,c=a.j.find(function(e){return function(f){return f.language==e.sg}}(d)),c||(c=jx(a),c.language=d.sg,a.j.push(c));b=new xk("textchanged");
a.m.dispatchEvent(b)}}function jx(a){return{id:a.K++,active:!1,type:zc,bandwidth:0,language:"",label:null,kind:null,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:!1,originalTextId:null,originalLanguage:"speech-to-text"}}
var rx=new Map,gx=new nb(function(){var a=document.body.appendChild(document.createElement("iframe"));var b=a.contentWindow;b=b.SpeechRecognition||b.webkitSpeechRecognition;if(!b)return a.remove(),!1;b=new b;a.remove();try{return b.start(0),b.stop(),!1}catch(c){return c.name=="TypeError"}});function ox(a){this.i=a;this.h=null}ox.prototype.release=function(){this.i&&Oj(this.i);this.h=null};function kx(a,b,c,d){this.o=a;this.j=b;this.B=c;this.u=d;this.i=new ib;this.m=null;this.h=0;this.l=!1}
kx.prototype.start=function(a,b,c){var d=this,e,f,g,h,k;return H(function(l){switch(l.i){case 1:d.stop();d.h++;e=d.h;d.l=!0;f=window.SpeechRecognition||window.webkitSpeechRecognition;g=new f;d.m=g;g.lang=b;g.continuous=!0;g.interimResults=!0;if(!(c&&"install"in f&&"available"in f)){l.A(2);break}l.o(3);return l.h(f.available({langs:[b],processLocally:!0}),5);case 5:h=l.j;switch(h){case "available":g.processLocally=!0;break;case "downloading":case "downloadable":return l.A(6);default:return l.return()}l.A(7);
break;case 6:return l.h(f.install({langs:[b],processLocally:!0}),8);case 8:g.processLocally=!0;l.A(7);break;case 7:l.u(2);break;case 3:l.m();case 2:if(e!==d.h)return l.return();k=!1;d.i.J(g,"start",function(){e===d.h&&d.j.ea(5)});d.i.J(g,"result",function(m){var n,p,u,q;return H(function(v){if(v.i==1){if(e!==d.h)return v.return();n=m;p="";for(u=n.resultIndex;u<n.results.length;u++)p+=n.results[u][0].transcript;return v.h(sx(d.o,p),2)}q=v.j;if(q===null||e!==d.h)return v.return();d.B(q);d.j.ea(.75);
v.l()})});d.i.J(g,"error",function(m){e===d.h&&(k=!0,d.u(),m.error=="network"&&d.j.ea(30))});d.i.J(g,"end",function(){d.l&&e===d.h&&(k||d.start(a,b,c))});g.start(a);l.l()}})};kx.prototype.stop=function(a){a=a===void 0?!0:a;this.h++;this.l=!1;this.i.Ta();this.j.stop();this.m&&(this.m.stop(),this.m=null);a&&this.u()};kx.prototype.release=function(){this.stop();this.o.release()};kx.prototype.isActive=function(){return this.l};function hx(){this.i=this.h=null;this.o=this.m=0;this.l=this.j=null}
function qx(a,b,c){var d,e,f;return H(function(g){if(g.i==1){if(a.j===b&&a.l===c&&a.h)return g.return();a.release();a.m++;d=a.m;if(!(c&&b!=c&&"Translator"in window))return g.return();a.i=new AbortController;g.o(2);return g.h(Translator.create({sourceLanguage:b,targetLanguage:c,signal:a.i.signal}),4)}if(g.i!=2){e=g.j;if(d!==a.m)return e.destroy(),g.return();a.h=e;a.j=b;a.l=c;return g.u(0)}f=g.m();if(f.name=="NotSupportedError")throw f;g.l()})}
function sx(a,b){var c,d;return H(function(e){if(e.i==1){if(!a.h)return e.return(b);a.o++;c=a.o;e.o(2);return e.h(a.h.translate(b),4)}if(e.i!=2)return d=e.j,c!==a.o?e.return(null):e.return(d);e.m();return e.return(null)})}hx.prototype.release=function(){var a;(a=this.i)==null||a.abort();this.i=null;var b;(b=this.h)==null||b.destroy();this.l=this.j=this.h=null};function tx(){}r=tx.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};r.setTextLanguage=function(){};K("shaka.text.StubTextDisplayer",tx);tx.prototype.setTextLanguage=tx.prototype.setTextLanguage;tx.prototype.setTextVisibility=tx.prototype.setTextVisibility;tx.prototype.isTextVisible=tx.prototype.isTextVisible;tx.prototype.destroy=tx.prototype.destroy;tx.prototype.append=tx.prototype.append;
tx.prototype.remove=tx.prototype.remove;tx.prototype.configure=tx.prototype.configure;function ux(a){var b=this;this.u=!1;this.j=[];this.V=a;this.l=a.Xc();this.i=a.pd;this.F=null;this.G=!1;this.Y=!0;this.C=this.H=this.O=null;this.M=!1;this.h=document.createElement("div");this.h.classList.add("shaka-text-container");this.h.style.textAlign="center";this.h.style.display="flex";this.h.style.flexDirection="column";this.h.style.alignItems="center";this.h.style.justifyContent="flex-end";this.B=new $e(function(){vx(b);wx(b)});wx(this);this.D=new $e(function(){xx(b)});this.o=new Map;this.m=
new ib;this.m.J(document,"fullscreenchange",function(){vx(b,!0)});this.m.J(this.l,"seeking",function(){vx(b,!0);wx(b)});this.m.Lb(this.l,["play","playing","pause","waiting"],function(){wx(b)});this.m.J(this.V,"ratechange",function(){wx(b)});this.m.J(this.l,"resize",function(){var c=b.l,d=c.videoWidth;c=c.videoHeight;d&&c?b.F=d/c:b.F=null});this.T=!1;this.L=null;"ResizeObserver"in window&&(this.L=new ResizeObserver(function(){b.T||(b.T=!0,requestAnimationFrame(function(){b.T=!1;b.h&&b.h.parentElement&&
b.u&&vx(b,!0)}))}),this.L.observe(this.i));this.K=new Map;this.I=new Map;this.N=null;"IntersectionObserver"in window&&(this.N=new IntersectionObserver(function(c){c.length&&(c=c[c.length-1],b.Y=c.isIntersecting&&c.intersectionRatio>0,b.D.ea(.25))},{root:null,threshold:[.01]}),this.N.observe(this.i));this.m.J(document,"visibilitychange",function(){b.D.hb()});Sj(this.m,this.l,function(){return b.D.hb()});a=this.l;(a.webkitPresentationMode||a.webkitSupportsFullscreen)&&this.m.J(a,"webkitpresentationmodechanged",
function(){b.D.hb()});xx(this)}r=ux.prototype;r.configure=function(a){this.O=a;wx(this);xx(this);vx(this,!0)};r.ql=function(a,b){this.H=Object.assign({},a);this.C=new Ld(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,b);vx(this,!0)};r.nj=function(){if(this.H||this.C)this.C=this.H=null,this.M=!1,vx(this,!0)};
r.append=function(a){var b=[].concat(wa(this.j));a=t(Pw(a));for(var c=a.next(),d={};!c.done;d={Hf:void 0},c=a.next())d.Hf=c.value,b.some(function(e){return function(f){return Wd(f,e.Hf)}}(d))||this.j.push(d.Hf);this.j.length&&wx(this);vx(this)};
r.destroy=function(){if(!this.h)return Promise.resolve();this.h.parentElement&&this.i.removeChild(this.h);this.h=null;this.u=!1;this.j=[];this.C=this.H=null;this.M=!1;var a;(a=this.B)==null||a.stop();this.B=null;var b;(b=this.D)==null||b.stop();this.D=null;this.o.clear();var c;(c=this.m)==null||c.release();this.m=null;var d;(d=this.L)==null||d.disconnect();this.L=null;var e;(e=this.N)==null||e.disconnect();this.N=null;return Promise.resolve()};
r.remove=function(a,b){if(!this.h)return!1;var c=this.j.length;this.j=this.j.filter(function(d){return d.startTime<a||d.endTime>=b});vx(this,c>this.j.length);this.j.length||wx(this);return!0};r.isTextVisible=function(){return this.u};r.setTextVisibility=function(a){(this.u=a)?(this.h.parentElement||this.i.appendChild(this.h),vx(this,!0)):this.h.parentElement&&this.i.removeChild(this.h)};r.setTextLanguage=function(a){a&&a!="und"?this.h.setAttribute("lang",a):this.h.setAttribute("lang","")};
function wx(a){if(a.B)if(!a.j.length||a.G||a.l.paused)a.B.stop();else{var b,c,d=(c=(b=yx(a))==null?void 0:b.subtitleDelay)!=null?c:0;b=a.l.currentTime-d;c=1;d=zx(a,a.j,b);d!=null&&a.l.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&(c=Math.min(c,Math.max(0,d-b)));a.B.ea(Math.max(Ax,c/(Math.abs(a.V.Ha())||1)))}}
function zx(a,b,c){function d(g){g>c&&(e==null||g<e)&&(e=g)}var e=null;b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,d(f.startTime),d(f.endTime),f.nestedCues.length&&(f=zx(a,f.nestedCues,c),f!=null&&d(f));return e}function yx(a){return a.H||a.O}
function xx(a){var b=a.l,c=!1;window.documentPictureInPicture&&window.documentPictureInPicture.window?c=!0:document.pictureInPictureElement===b&&(c=!0);var d=!1;document.fullscreenEnabled&&document.fullscreenElement===a.i?d=!0:b.webkitSupportsFullscreen&&(d=b.webkitDisplayingFullscreen);b=document.visibilityState==="visible";var e,f;(f=(e=a.O)==null?void 0:e.suspendRenderingWhenHidden)!=null&&!f||c||d||b&&a.Y?a.G&&(a.G=!1,wx(a),requestAnimationFrame(function(){a.h&&a.h.parentElement&&a.u&&vx(a)})):
a.G||(a.G=!0,a.B&&a.B.stop())}function Bx(a,b){for(;b!=null;){if(b==a.h)return!0;b=b.parentElement}return!1}function Cx(a,b,c){var d=b,e=a.o.get(b)||null;if(!e&&c&&c.positionArea!=0){c=t(a.o.keys());for(var f=c.next();!f.done;f=c.next())f=f.value,Wd(b,f)&&(d=f,e=a.o.get(f))}return{key:d,ui:e}}
function Dx(a,b,c,d,e){var f=yx(a),g=!1,h=[],k=[],l=new Set;b=t(b);for(var m=b.next();!m.done;m=b.next()){m=m.value;e.push(m);var n=Cx(a,m,f),p=n.key;n=n.ui;var u=m.startTime<=d&&m.endTime>d,q=n?n.Xi:null;n&&(h.push(n.Bd),n.nc&&h.push(n.nc),u||(g=!0,a.o.delete(p),n=null));u&&(k.push(m),n?Bx(a,q)||(g=!0):(Ex(a,m,e),l.add(m),n=a.o.get(p),q=n.Xi,g=!0));m.nestedCues.length>0&&q&&Dx(a,m.nestedCues,q,d,e);e.pop()}if(g){d=t(h);for(g=d.next();!g.done;g=d.next())g=g.value,g.parentElement&&g.parentElement.removeChild(g);
e.length||k.sort(function(v,w){return v.startTime!=w.startTime?v.startTime-w.startTime:v.endTime-w.endTime});e=new Map;k=t(k);for(d=k.next();!d.done;d=k.next())g=d.value,d=Cx(a,g,f).ui,d.nc?(d.nc.contains(c)&&d.nc.removeChild(c),c.appendChild(d.nc),d.nc.appendChild(d.Bd),l.has(g)&&g.region.scroll=="up"&&(g=d.nc,e.has(g)||e.set(g,[]),e.get(g).push(d.Bd))):c.appendChild(d.Bd);a=t(e.keys());for(c=a.next();!c.done;c=a.next())c=c.value,Fx(c,e.get(c))}}
function Gx(a,b,c){return b.some(function(d){return d.startTime<=c&&d.endTime>c&&Hx(a,d)})}function Hx(a,b){return!!b.payload.replace(/[\u00a0\u200B]/g," ").trim()||!!b.backgroundImage||b.nestedCues.some(function(c){return Hx(a,c)})}
function vx(a,b){b=b===void 0?!1:b;if(a.h&&!a.G){var c=yx(a),d,e=(d=c==null?void 0:c.subtitleDelay)!=null?d:0;d=a.l.currentTime-e;e=!!a.C&&(!a.u||!Gx(a,a.j,d));e!=a.M&&(b=!0,a.M=e);e&&(b=!0);var f=a.u||e;f?a.h.parentElement||a.i.appendChild(a.h):a.h.parentElement&&a.i.removeChild(a.h);if(!f||b){b=t(a.K.values());for(var g=b.next();!g.done;g=b.next())Oj(g.value);Oj(a.h);a.o.clear();a.K.clear();a.I.clear()}f&&(b=e&&a.C?[a.C]:a.j,c&&c.positionArea!=0&&(b=b.map(function(h){var k=yx(a);h=h.clone();Uw(h);
h.region=Ix.value();switch(k.positionArea){case 1:h.textAlign="left";h.displayAlign="before";break;case 2:h.textAlign=Nd;h.displayAlign="before";break;case 3:h.textAlign="right";h.displayAlign="before";break;case 4:h.textAlign="left";h.displayAlign="center";break;case 5:h.textAlign=Nd;h.displayAlign="center";break;case 6:h.textAlign="right";h.displayAlign="center";break;case 7:h.textAlign="left";h.displayAlign=Sd;break;case 8:h.textAlign=Nd;h.displayAlign=Sd;break;case 9:h.textAlign="right",h.displayAlign=
Sd}return h})),Dx(a,b,a.h,d,[]),Jx(a))}}function Kx(a){var b=a.heightUnits==bd?"%":"px";a.heightUnits==2&&(b="lines");return a.id+"_"+a.width+"x"+a.height+b+"-"+a.viewportAnchorX+"x"+a.viewportAnchorY+(a.viewportAnchorUnits==bd?"%":"px")+"-"+a.regionAnchorX+"x"+a.regionAnchorY+"-"+a.backgroundColor+"-"+a.opacity+"-"+a.padding+"-"+a.overflow+"-"+a.zIndex}
function Lx(a,b){var c=b.region,d=a.F===4/3?2.5:1.9,e=Kx(c);if(a.K.has(e))return a.K.get(e);var f=document.createElement("span"),g=c.heightUnits==bd?"%":"px",h=c.widthUnits==bd?"%":"px",k=c.viewportAnchorUnits==bd?"%":"px";f.id="shaka-text-region---"+e;f.classList.add("shaka-text-region");f.style.position="absolute";var l=c.width;c.widthUnits===2&&(l=c.width*d,h="%");f.style.width=l+h;d=c.heightUnits===2;h="";var m=0;d?(h=yx(a),h=Mx(b.fontSize||"1em",b,a.i,h?h.fontScaleFactor:1),m=c.height*1.4,f.style.height=
"calc("+m+" * "+h+")",f.style.lineHeight="1.4"):f.style.height=c.height+g;var n=k;c.viewportAnchorUnits===2?(k=c.viewportAnchorY/75*100,g=c.viewportAnchorX/(a.F===4/3?160:210)*100,n="%"):(k=c.viewportAnchorY,g=c.viewportAnchorX);g-=c.regionAnchorX*l/100;f.style.left=g+n;d?f.style.top="calc("+k+n+" - "+c.regionAnchorY/100*m+" * "+h+")":(k-=c.regionAnchorY*c.height/100,f.style.top=k+n);c.heightUnits!==0&&c.widthUnits!==0&&c.viewportAnchorUnits!==0&&(f.style.left=Math.max(0,Math.min(100-(parseInt(f.style.width.slice(0,
-1),10)||0),g))+"%",d||(f.style.top=Math.max(0,Math.min(100-(parseInt(f.style.height.slice(0,-1),10)||0),k))+"%"));f.style.display="flex";f.style.flexDirection="column";f.style.alignItems="center";f.style.justifyContent=Nx(b.displayAlign);c.backgroundColor&&a.I.set(f,c.backgroundColor);c.opacity!=1&&(f.style.opacity=String(c.opacity));if(c.padding&&!d){f.style.boxSizing="border-box";var p=a.i;f.style.padding=c.padding.split(" ").map(function(u,q){var v=q%2;q=v?c.width:c.height;v=(v?c.widthUnits:c.heightUnits)!=
bd?100:v?p.clientWidth:p.clientHeight;return u.endsWith("%")?parseFloat(u)*q*v/1E4+"px":u}).join(" ")}c.overflow&&(f.style.overflow=c.overflow);c.zIndex!=null&&(f.style.zIndex=String(c.zIndex),a.h.style.isolation="isolate");c.scroll=="up"&&(f.style.justifyContent="flex-end",f.style.overflow="hidden");a.K.set(e,f);return f}
function Jx(a){if(a.I.size){for(var b=[],c=t(a.o.keys()),d=c.next();!d.done;d=c.next())d=d.value,d.nestedCues.length||b.push(a.o.get(d).Bd);c=t(a.I.keys());var e=c.next();for(d={};!e.done;d={cf:void 0},e=c.next())d.cf=e.value,e=b.some(function(f){return function(g){return f.cf.contains(g)}}(d)),d.cf.style.backgroundColor=e?a.I.get(d.cf):""}}
function Fx(a,b){var c=Array.from(a.childNodes);if(!(c.length<=b.length)){a=0;b=t(b);for(var d=b.next();!d.done;d=b.next())a+=d.value.offsetHeight;if(a)for(c=t(c),b=c.next();!b.done;b=c.next())b=b.value,b.animate&&b.animate([{transform:"translateY("+a+"px)"},{transform:"translateY(0)"}],{duration:433,easing:"ease"})}}
function Ex(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=document.createElement(e);e!="br"&&Ox(a,f,b,c,d);c=null;b.region&&b.region.id&&(c=Lx(a,b));e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),Px(yx(a))||(e.style.backgroundColor=b.backgroundColor),e.style.lineHeight="normal",f.appendChild(e));a.o.set(b,{Bd:f,Xi:e,nc:c})}
function Qx(a,b,c,d){b=b.color;d&&d.fontColor&&(b=d.fontColor);if(!d||isNaN(d.fontOpacity))return b;if(!b){if(c)return"";b=window.getComputedStyle(a.h).color}return Nw(b,d.fontOpacity)||b}function Rx(a,b,c){if(!Px(c))return a||(b?"rgba(0, 0, 0, 0.8)":"");if(!b)return"";a=c.backgroundColor||a||"rgba(0, 0, 0, 0.8)";return isNaN(c.backgroundOpacity)?a:Nw(a,c.backgroundOpacity)||a}function Px(a){return!!a&&(!!a.backgroundColor||!isNaN(a.backgroundOpacity))}
function Sx(a,b){var c=b?b.characterEdgeStyle:0;if(c!=0){var d=b&&!isNaN(b.fontOpacity)?b.fontOpacity:1;b="rgba(34, 34, 34, "+d+")";var e="rgba(204, 204, 204, "+d+")";d=[];switch(c){case 2:c=t([3,4,5]);for(e=c.next();!e.done;e=c.next())d.push("0.0625em 0.0625em "+(e.value/32+"em ")+b);break;case 3:c=t([1,2,3]);for(e=c.next();!e.done;e=c.next())e=e.value,d.push(e/32+"em "+(e/32+"em ")+b);break;case 4:d.push("0.03125em 0.03125em "+e);d.push("-0.03125em -0.03125em "+b);break;case 5:for(c=0;c<5;c++)d.push("0 0 0.0625em "+
b)}a.textShadow=d.length?d.join(", "):"none";a.webkitTextStrokeWidth="0"}}
function Tx(a,b,c){var d=[],e=c.slice().reverse().find(function(l){return l.textStrokeWidth}),f=e?Ux(Vx(a,e.textStrokeWidth,b)):null;if(f&&f.value>0)for(var g=e.textStrokeColor||Wx(c,function(l){return l.color})||"currentColor",h=0;h<16;h++){var k=h*2*Math.PI/16;d.push((""+Number((f.value*Math.cos(k)).toFixed(3))+f.unit+" "+Number((f.value*Math.sin(k)).toFixed(3))+f.unit+" 0 "+g).trim())}(c=Wx(c,function(l){return l.textShadow}))&&c!="none"&&d.push(Vx(a,c,b));return d.length?d.join(", "):e||c?"none":
""}function Vx(a,b,c){var d=a.i;return b.replace(/(^|[\s,(])(-?\d*\.?\d+)(c|rw|rh)(?=[\s,)]|$)/g,function(e,f,g,h){e=Number(g);g=d.clientHeight*e/100;h=="c"?g=d.clientHeight*e/c.cellResolution.rows:h=="rw"&&(g=d.clientWidth*e/100);return f+g+"px"})}function Xx(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Md?c:a==="left"||a==="start"&&b===Od||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===Od?"line-right":"center"}
function Ox(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1,k=yx(a),l=c.payload.replace(/\s+$/g,function(n){return"\u00a0".repeat(n.length)});f.whiteSpace=c.wrapLine?/[\t\r\f]| {2}|(^|\n) | \n/.test(l)?"pre-wrap":"pre-line":"pre";f.color=Qx(a,c,h,k);f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Mx(c.linePadding,c,a.i);f.paddingRight=Mx(c.linePadding,c,a.i);f.textCombineUpright=c.textCombineUpright;f.visibility=c.visibility;f.textShadow=Tx(a,c,d);Sx(f,k);if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage.replace(/['"()\\]/g,"")+"')",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 m=b;else m=document.createElement("span"),b.appendChild(m);c.border&&(m.style.border=c.border);!e&&(b=Rx(Wx(d,function(n){return n.backgroundColor}),!!l,k))&&(m.style.backgroundColor=b);l&&(m.setAttribute("translate","no"),m.textContent=l)}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="flex-start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="flex-end";f.justifyContent=Nx(c.displayAlign)}g||(f.margin="0");f.fontFamily=(k==null?void 0:k.fontFamily)||c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;d=k?k.fontScaleFactor:
1;if(h)c.fontSize&&(h=Ux(c.fontSize),f.fontSize=Mx(c.fontSize,c,a.i,h&&h.unit=="em"?1:d));else if(d!==1||c.fontSize)f.fontSize=Mx(c.fontSize||"1em",c,a.i,d);h=c.line;h!=null?(d=c.lineInterpretation,d==Qd&&(d=1,g=16,a.F&&a.F<1&&(g=32),h=h<0?100+h/g*100:h/g*100),d==1&&(f.position="absolute",c.writingMode==Pd?(f.width="100%",c.lineAlign==Rd?f.top=h+"%":c.lineAlign=="end"&&(f.bottom=100-h+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Rd?f.left=h+"%":c.lineAlign=="end"&&(f.right=100-
h+"%")):(f.height="100%",c.lineAlign==Rd?f.right=h+"%":c.lineAlign=="end"&&(f.left=100-h+"%")))):c.writingMode!=Pd&&(f.position="absolute",f.top="0",f.height="100%",c.writingMode=="vertical-lr"?f.right="0":f.left="0");f.lineHeight=Vx(a,c.lineHeight,c);a=Xx(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==Pd?(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==
Pd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==Pd?(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&&(h=c.position,h==null&&(h=c.textAlign==
"left"?0:c.textAlign=="right"?100:50),a=Math.min(c.size,a=="line-left"?100-h:a=="line-right"?h:h<=50?h*2:(100-h)*2),c.writingMode==Pd?f.width=a+"%":f.height=a+"%")}function Ux(a){return(a=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(a[1]),unit:a[2]}:null}
function Mx(a,b,c,d){d=d===void 0?1:d;var e=Ux(a);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 Wx(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}function Nx(a){switch(a){case "before":return"flex-start";case "center":return"center";default:return"flex-end"}}K("shaka.text.UITextDisplayer",ux);
ux.prototype.setTextLanguage=ux.prototype.setTextLanguage;ux.prototype.setTextVisibility=ux.prototype.setTextVisibility;ux.prototype.isTextVisible=ux.prototype.isTextVisible;ux.prototype.remove=ux.prototype.remove;ux.prototype.destroy=ux.prototype.destroy;ux.prototype.append=ux.prototype.append;ux.prototype.clearTextStylePreview=ux.prototype.nj;ux.prototype.setTextStylePreview=ux.prototype.ql;ux.prototype.configure=ux.prototype.configure;
var Ax=1/60,Ix=new nb(function(){var a=new ad;a.id="shaka-custom-region";a.height=90;a.width=90;a.viewportAnchorX=5;a.viewportAnchorY=5;return a});function Yx(a,b){function c(g){var h=[];switch(g.textAlign){case "left":h.push("align:left");break;case "right":h.push("align:right");break;case Nd:h.push("align:middle");break;case "start":h.push("align:start");break;case "end":h.push("align:end")}switch(g.writingMode){case "vertical-lr":h.push("vertical:lr");break;case "vertical-rl":h.push("vertical:rl")}return h.length?" "+h.join(" "):""}function d(g){for(var h=g,k=t(b),l=k.next();!l.done;l=k.next())l=l.value,l.end&&l.start<g&&(h+=l.end-l.start);
g=Math.floor(h/3600);k=Math.floor(h/60%60);l=Math.floor(h%60);h=Math.floor(h*1E3%1E3);return(g<10?"0":"")+g+":"+(k<10?"0":"")+k+":"+(l<10?"0":"")+l+"."+(h<100?h<10?"00":"0":"")+h}var e=Ow(a);a="WEBVTT\n\n";e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,a+=d(f.startTime)+" --\x3e "+d(f.endTime)+c(f)+"\n",a+=f.payload+"\n\n";return a}K("shaka.text.WebVttGenerator",function(){});/*
 @license
 Copyright 2024 Streaming Video Technology Alliance
 SPDX-License-Identifier: Apache-2.0
*/
var Zx=["cen","e","h","ts"];var $x="ab bg bl br bs bsa bsd bsda cdn cid cs d dfa dl ec lab lb ltc msd mtp nor nr ot pb pr pt rtp sf sid sn st sta su tab tb tbl tpb v".split(" ");var ay="cmsdd cmsds rc smrt ttfb ttfbb ttlb url".split(" ");var by="bl br bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" ");var cy=new Map([["ps","sta"],["pr","pr"],["c","cid"],["b","bg"],["bc","br"]]);function dy(a,b){Array.isArray(a)&&(a=a.map(function(c){return c instanceof dy?c:new dy(c)}));this.value=a;this.Wb=b}function ey(a){this.description=a}function fy(a,b){var c=Error;a=Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a==="object"?JSON.stringify(a):String(a);return c('failed to serialize "'+a+'" as '+b,{cause:void 0})}
function gy(a,b){if(a<0)return-gy(-a,b);b=Math.pow(10,b);return Math.abs(a*b%1-.5)<Number.EPSILON?(a=Math.floor(a*b),(a%2===0?a:a+1)/b):Math.round(a*b)/b}function hy(a){if(a<-999999999999999||999999999999999<a)throw fy(a,"Integer");return a.toString()}var iy=/[\x00-\x1f\x7f]+/;function jy(a){a=a.description||a.toString().slice(7,-1);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(a)===!1)throw fy(a,"Token");return a}
function ky(a){switch(typeof a){case "number":if(!Number.isFinite(a))throw fy(a,"Bare Item");if(Number.isInteger(a))a=hy(a);else{var b=gy(a,3);if(Math.floor(Math.abs(b)).toString().length>12)throw fy(a,"Decimal");a=b.toString();a=a.includes(".")?a:a+".0"}return a;case "string":if(iy.test(a))throw fy(a,"String");return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"';case "symbol":return jy(a);case "boolean":if(typeof a!=="boolean")throw fy(a,"Boolean");return a?"?1":"?0";case "object":if(a instanceof
Date)return"@"+hy(a.getTime()/1E3);if(a instanceof Uint8Array){if(ArrayBuffer.isView(a)===!1)throw fy(a,"Byte Sequence");return":"+btoa(String.fromCharCode.apply(String,wa(a)))+":"}if(a instanceof ey)return jy(a);default:throw fy(a,"Bare Item");}}function ly(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw fy(a,"Key");return a}function my(a){return a==null?"":Object.entries(a).map(function(b){var c=t(b);b=c.next().value;c=c.next().value;return c===!0?";"+ly(b):";"+ly(b)+"="+ky(c)}).join("")}
function ny(a){return a instanceof dy?ky(a.value)+my(a.Wb):ky(a)}
function oy(a){var b={Wi:!1};b=b===void 0?{Wi:!0}:b;if(typeof a!=="object"||a==null)throw fy(a,"Dict");a=a instanceof Map?a.entries():Object.entries(a);b=b.Wi?" ":"";return Array.from(a).map(function(c){c=t(c);var d=c.next().value;c=c.next().value;c instanceof dy===!1&&(c=new dy(c));d=ly(d);c.value===!0?d+=my(c.Wb):(d+="=",Array.isArray(c.value)?(c="("+c.value.map(ny).join(" ")+")"+my(c.Wb),c=d+c):c=d+ny(c),d=c);return d}).join(","+b)};function py(a,b){try{var c=new URL(a)}catch(f){return a}b=new URL(b);if(c.origin!==b.origin)return a;a=c.pathname.split("/").slice(1);b=b.pathname.split("/").slice(1,-1);for(var d=Math.min(a.length,b.length),e=0;e<d&&a[e]===b[e];e++)a.shift(),b.shift();for(;b.length;)b.shift(),a.unshift("..");return a.join("/")+c.search+c.hash};function qy(a){return a instanceof dy?new dy(Math.round(a.value),a.Wb):Math.round(a)}function ry(a){return Array.isArray(a)?a.map(qy):qy(a)}function sy(a){if(a)try{var b=URL,c=new URL(a);var d=c.origin+c.pathname.substring(0,c.pathname.lastIndexOf("/")+1);return(new b(d)).href}catch(e){}}
function ty(a,b){if(Array.isArray(a))return a.map(function(d){return ty(d,b)});if(a instanceof dy&&typeof a.value==="string")return new dy(ty(a.value,b),a.Wb);var c=sy(b.oe);c&&(a=py(a,c));return b.version===1?encodeURIComponent(a):a}function uy(a){return a instanceof dy?new dy(Math.round(a.value/100)*100,a.Wb):Math.round(a/100)*100}function vy(a){return Array.isArray(a)?a.map(uy):uy(a)}
var wy={br:ry,d:ry,bl:vy,dl:vy,mtp:vy,nor:function(a,b){var c=a;b.version>=2&&(a instanceof dy&&typeof a.value==="string"?c=new dy([a]):typeof a==="string"&&(c=[a]));return ty(c,b)},rtp:vy,tb:ry};var xy=new Set("ab bl br bsa bsd bsda lab lb mtp pb tab tb tbl tpb".split(" "));var yy=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;var zy=new Set($x);function Ay(a){return zy.has(a)||yy.test(a)};var By=new Set(ay);var Cy=new Set(Zx);var Dy=new Set(by);function Ey(a){return Dy.has(a)||yy.test(a)};var Fy=new Set(["ot","sf","st","e","sta"]);function Gy(a){return typeof a==="number"?Number.isFinite(a):a!=null&&a!==""&&a!==!1};var Hy={},Iy=(Hy.event=function(a){return Ay(a)||By.has(a)||Cy.has(a)},Hy.request=Ay,Hy);function Jy(a,b){if(Array.isArray(a)){var c;b&&(c=a.find(function(d){return d&&d.Wb&&d.Wb.ot===b}));c||(c=a[0]);return Jy(c)}return a instanceof dy?a.value:a}
function Ky(a){for(var b={},c=t(Object.entries(a)),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e==null?b[d]=e:d==="nor"?(d=(Array.isArray(e)?e:[e])[0],d instanceof dy?(b.nor=d.value,(d=d.Wb)&&d.r&&(b.nrr=d.r)):b.nor=d):xy.has(d)?b[d]=Jy(e,a.ot):b[d]=e}return b}
function Ly(a,b){b=b||{};var c={};if(a==null||typeof a!=="object")return c;var d=b.version||a.v||2,e=b.Pg||"request";a=d===1?Ky(a):a;var f=d===1?Ey:Iy[e],g=Object.keys(a).filter(f);a.e&&a.e!=="rr"&&(g=g.filter(function(m){return!By.has(m)}));f=b.filter;typeof f==="function"&&(g=g.filter(f));if(f=e==="event"){var h=a.e;g.includes("e")||h==null||g.push("e");g.includes("ts")||g.push("ts");g.includes("cen")||a.cen==null||h!=="ce"||g.push("cen");(h=h?cy.get(h):void 0)&&a[h]!=null&&!g.includes(h)&&g.push(h)}if(g.length===
0)return c;d>1&&!g.includes("v")&&g.push("v");e={version:d,Pg:e,oe:b.oe};g.sort();g=t(g);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h],l=b.xj&&b.xj[h]||wy[h];typeof l==="function"&&(k=l(k,e));if(h==="v")if(d===1)continue;else k=d;if(h!=="pr"||k!==1||f&&a.e==="pr")if(f&&h==="ts"&&!Number.isFinite(k)&&(k=Date.now()),l=f&&k===!1&&h==="bg"&&a.e==="b",Gy(k)||l)Fy.has(h)&&typeof k==="string"&&(k=new ey(k)),c[h]=k}return c};var My=/[!'()*]/g,Ny=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g;function Oy(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()}function Py(a){return a.length===2?a:"\ufffd"};function Qy(a,b){var c=a.indexOf("#");c=c===-1?a.length:c;var d=a.indexOf("?");d=d===-1||d>c?c:d;var e=[];if(b){try{var f=encodeURIComponent(b)}catch(k){f=encodeURIComponent(b.replace(Ny,Py))}b="CMCD="+f.replace(My,Oy)}else b="";f=!1;for(var g=t(d<c?a.slice(d+1,c).split("&"):[]),h=g.next();!h.done;h=g.next())h=h.value,h==="CMCD"||h.startsWith("CMCD=")?(f=!0,b&&(e.push(b),b="")):e.push(h);if(b)e[e.length-1]===""&&e.pop(),e.push(b);else if(!f)return a;e=e.join("&");return a.slice(0,d)+(e?"?"+e:"")+
a.slice(c)};var Ry={vm:"CMCD-Object",br:"CMCD-Object",d:"CMCD-Object",Lm:"CMCD-Object",Mm:"CMCD-Object",ot:"CMCD-Object",Tm:"CMCD-Object",tb:"CMCD-Object",Vm:"CMCD-Object",bl:"CMCD-Request",Dm:"CMCD-Request",Hm:"CMCD-Request",dl:"CMCD-Request",ltc:"CMCD-Request",mtp:"CMCD-Request",nor:"CMCD-Request",nrr:"CMCD-Request",Om:"CMCD-Request",sn:"CMCD-Request",Oi:"CMCD-Request",su:"CMCD-Request",Um:"CMCD-Request",cid:"CMCD-Session",msd:"CMCD-Session",sf:"CMCD-Session",sid:"CMCD-Session",st:"CMCD-Session",v:"CMCD-Session",
bg:"CMCD-Status",bs:"CMCD-Status",zm:"CMCD-Status",Am:"CMCD-Status",Bm:"CMCD-Status",Cm:"CMCD-Status",Jm:"CMCD-Status",Nm:"CMCD-Status",pr:"CMCD-Status",pt:"CMCD-Status",rtp:"CMCD-Status"};function Sy(a){return Object.keys(a).reduce(function(b,c){var d=a[c];d&&d.forEach(function(e){return b[e]=c});return b},{})};function Ty(a,b,c){var d=new Set(b.Rb||[]);return{version:b.version||2,Pg:a,filter:function(e){return d.has(e)},oe:c}}function Uy(a,b){if(a===b)return!0;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++){var d=a[c],e=b[c];if(d!==e){if(typeof d==="number"||typeof e==="number")return!1;var f=e;if(d.value!==f.value)return!1;e=d.params;d=f.params;f=e&&Object.keys(e)[0];var g=d&&Object.keys(d)[0];if(f!==g||f&&g&&e&&d&&e[f]!==d[g])return!1}}return!0}function Vy(a){return a}
for(var Wy=function(){var a=[];cy.forEach(function(b,c){b==="br"?a.push({event:c,Dd:b,Lf:function(d,e){return d===void 0||e===void 0?d===e:Uy(d,e)},Ni:function(d){return d.slice()}}):a.push({event:c,Dd:b,Lf:Object.is,Ni:Vy})});return a}(),Xy=new Map,Yy=t(Wy),Zy=Yy.next();!Zy.done;Zy=Yy.next()){var $y=Zy.value;Xy.set($y.event,$y)}
function az(a,b){this.B=performance.timeOrigin||performance.timing&&performance.timing.fetchStart||Date.now()-performance.now();this.h={};var c=a.version||2,d=a.eventTargets||[],e=a.sid||crypto.randomUUID(),f=a.gh||"query",g=[];d=t(d);for(var h=d.next();!h.done;h=d.next())(h=h.value)&&h.url&&h.events&&h.events.length&&g.push({version:h.version||2,Rb:h.Rb?[].concat(h.Rb):[],url:h.url,events:[].concat(h.events),interval:h.interval!=null?h.interval:30,batchSize:h.batchSize||1});this.i=Object.assign({},
a,{version:c,gh:f,sid:e,cid:a.cid,Rb:a.Rb,eventTargets:g});this.l=NaN;this.j=new Map;this.o={sn:0,Qd:!1};this.u=b;this.m={};this.h={cid:this.i.cid,sid:this.i.sid,v:this.i.version};a=t(this.i.eventTargets||[]);for(b=a.next();!b.done;b=a.next())this.j.set(b.value,{og:void 0,sn:0,Qd:!1,queue:[]})}az.prototype.start=function(){var a=this;this.j.forEach(function(b,c){bz(b);if(c.interval!==0&&c.events&&c.events.includes("t")){var d=function(){cz(a,b,c,"t");dz(a)};b.og=setInterval(d,c.interval*1E3);d()}})};
az.prototype.stop=function(a){(a===void 0?0:a)&&this.flush();this.j.forEach(function(b){bz(b)})};az.prototype.flush=function(){dz(this,!0)};function ez(a,b){b.sid&&b.sid!==a.h.sid&&fz(a);b.msd&&!isNaN(b.msd)&&(a.l=b.msd);a.h=Object.assign({},a.h,b,{msd:void 0});for(var c=t(Wy),d=c.next();!d.done;d=c.next())d=d.value,d.Dd in b&&!d.Lf(a.h[d.Dd],a.m[d.Dd])&&gz(a,d.event)}
function gz(a,b,c){var d=c||{};if(c=Xy.get(b)){var e=c.Dd,f=d[e];f!==void 0&&(a.h[e]=f);f=a.h[e];if(f===void 0||c.Lf(f,a.m[e]))return;a.m[e]=c.Ni(f)}a.j.forEach(function(g,h){cz(a,g,h,b,d)});dz(a)}function cz(a,b,c,d,e){e=e||{};c.events&&c.events.includes(d)&&(c=Object.assign({},a.h,e,{e:d,ts:e.ts!=null?e.ts:Date.now(),sn:b.sn++}),isNaN(a.l)||b.Qd||(c.msd=a.l,b.Qd=!0),b.queue.push(c))}
function hz(a,b,c){var d=b.customData||{};b=Object.assign({},b,{headers:Object.assign({},b.headers||{}),Jf:Object.assign({},d,{cmcd:{}})});if(!a.i.Rb||!a.i.Rb.length||!b.url)return b;c=Object.assign({},a.h,c||{},{sn:a.o.sn++});var e=Ty("request",a.i,b.url);isNaN(a.l)||a.o.Qd||(c.msd=a.l,a.o.Qd=!0);var f=b.Jf.cmcd=Ly(c,e);switch(a.i.gh){case "query":if(a=oy(f))b.url=Qy(b.url,a);break;case "headers":a=Object;c=a.assign;d=b.headers;var g={};var h=e.Em;e={};if(f){var k=Object.keys(f);h=h?Sy(h):{};k=t(k);
for(var l=k.next();!l.done;l=k.next()){l=l.value;var m=Ry[l]||h[l]||"CMCD-Request";(e[m]||(e[m]={}))[l]=f[l]}}f=t(Object.entries(e));for(e=f.next();!e.done;e=f.next())h=t(e.value),e=h.next().value,h=h.next().value,(h=oy(h))&&(g[e]=h);c.call(a,d,g)}return b}
function dz(a,b){b=b===void 0?!1:b;var c=!1;a.j.forEach(function(d,e){var f=d.queue;if(f.length&&(!(f.length<e.batchSize)||b)){var g=f.splice(0,b?f.length:e.batchSize);iz(a,e,g).catch(function(){d.queue.unshift.apply(d.queue,wa(g))});c=c||f.length>0}});c&&dz(a)}
function iz(a,b,c){var d,e,f;return H(function(g){if(g.i==1)return d=Ty("event",b),g.h(a.u({url:b.url,method:"POST",headers:{"Content-Type":"application/cmcd"},body:c.map(function(h){h?(h=Ly(h,d),h=oy(h)):h="";return h}).join("\n")+"\n"}),2);e=g.j;f=e.status;if(f===410)jz(a,b);else if(f===429||f>499&&f<600)throw Error("Event report failed with status "+f);g.l()})}function bz(a){clearInterval(a.og);a.og=void 0}function jz(a,b){var c=a.j.get(b);c&&(bz(c),a.j.delete(b))}
function fz(a){a.j.forEach(function(b){b.sn=0});a.o.sn=0;a.m={}};function kz(a,b,c){b?b?(b=Ly(b,c),b=oy(b)):b="":b="";return b?Qy(a,b):a};function lz(a,b){this.i=a;this.G=b;this.D=this.F=null;this.j=mz(this);this.o=this.h=this.l=null;this.B=void 0;this.u=new Map;this.m=new ib;this.C=0}lz.prototype.setMediaElement=function(a){this.l=a;nz(this)};lz.prototype.configure=function(a){this.G=a;oz(this)};function pz(a){qz(a);a.F=null;a.D=null;a.o=null;a.B=void 0;a.C=0;a.j=mz(a)}
function oz(a){var b=a.j;a.j=mz(a);var c;if(c=a.h)c=a.j,c=b.enabled!=c.enabled||b.version!=c.version||b.useHeaders!=c.useHeaders||b.sessionId!=c.sessionId||b.contentId!=c.contentId||b.eventTargets!=c.eventTargets||!gb(b.includeKeys,c.includeKeys);c&&qz(a);nz(a)}
function mz(a){var b=a.G,c=a.F;a=a.D;var d=(c=b.applyParametersFromManifest!==!1&&c&&c.cmcdParameters?c:null)?c.cmcdParameters:null,e=d?d.version:b.version,f=b.includeKeys||[];if(d&&d.keys){var g=rz(d.keys,e);g.length?f=g:Xa("CMCD_NO_SUPPORTED_MANIFEST_KEYS","CMCD: the manifest lists no key this player supports at version "+e+"; using the application keys instead.")}return{enabled:!!d||b.enabled,version:e,useHeaders:d?d.mode=="header":b.useHeaders,sessionId:d&&d.sessionId||b.sessionId||a||"",contentId:d&&
d.contentId||b.contentId||"",rtpSafetyFactor:b.rtpSafetyFactor,includeKeys:f,includeInRequests:d?d.includeInRequests:b.includeInRequests||[],eventTargets:b.eventTargets,serviceLocations:c?c.serviceLocations:null,adaptationSets:c?c.adaptationSets:null,serviceLocationBaseUris:c?c.serviceLocationBaseUris:[],zj:!!d}}function qz(a){a.h&&(a.h.stop(!0),a.h=null);a.u.clear();a.m.Ta()}function sz(a,b){a.h&&(a.C=b,a.l&&a.l.autoplay&&(b=a.l.play())&&b.catch(function(){a.C=0}))}
function tz(a,b,c){if(!a.h||!uz(a,"segment"))return b;try{var d=vz(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="a";break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e="av";break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "audio/x-mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=
"m";break a}e=void 0}d.ot=e;d.su=!0;return kz(b,d,wz(a,b))}catch(f){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",f),b}}function nz(a){if(!a.h&&a.l&&a.j.enabled){a.j.sessionId||(a.D=window.crypto.randomUUID(),a.j=mz(a));var b=xz(a.j);a.h=new az(b,yz(a));a.h.start();a.B&&ez(a.h,{sf:a.B,st:a.i.isLive()?"l":"v"});a.o&&ez(a.h,{Oi:a.o});zz(a)}}
function xz(a){var b=a.includeKeys&&a.includeKeys.length?a.includeKeys:Az(a.version);b={sid:a.sessionId,cid:a.contentId,gh:a.useHeaders?"headers":"query",Rb:b,version:a.version===2?2:1};var c=a.eventTargets;c&&c.length&&(b.eventTargets=c.filter(function(d){return d.enabled!==!1&&d.url&&d.events&&d.events.length}).map(function(d){var e=d.includeKeys&&d.includeKeys.length?d.includeKeys:Az(d.version||a.version);return{url:d.url,events:d.events,interval:d.interval,batchSize:d.batchSize,Rb:e,version:2}}));
return b}function yz(a){return function(b){var c,d,e,f,g,h;return H(function(k){if(k.i==1)return c=Xk,d=qk(),e=b.url,f=Ok([e],d),f.method=b.method||"POST",f.headers=b.headers||{},f.body=Jb(b.body),k.o(2),g=a.i.M,k.h(g.request(c.Pl,f).promise,4);if(k.i!=2)return k.return({status:200});h=k.m();return k.return({status:h&&h.status?h.status:0})})}}function Bz(a,b){a.h&&a.o!==b&&(a.o=b,ez(a.h,{Oi:b}))}
function Cz(a,b,c){try{var d={url:b.uris[0],headers:Object.assign({},b.headers||{}),Jf:{}},e=hz(a.h,d,c),f=e.headers||{},g=Object.keys(d.headers).length;if(Object.keys(f).length>g){b.headers||(b.headers={});for(var h=t(Object.keys(f)),k=h.next();!k.done;k=h.next()){var l=k.value;l in d.headers||(b.headers[l]=f[l])}}var m=e.url;if(m&&m!==d.url)if(b.uris.length===1)b.uris=[m];else{var n=oy(e.Jf.cmcd);b.uris=b.uris.map(function(p){return p.includes("offline:")?p:Qy(p,n)})}}catch(p){Xa("CMCD_REQUEST_ERROR",
"Could not apply CMCD data to request.",p)}}
function Dz(a,b,c,d){a=a.j;if(a.serviceLocations&&b!=8){b=Ez(c.uris[0],a.serviceLocationBaseUris);if(!b)return Xa("CMCD_UNKNOWN_SERVICE_LOCATION","CMCD: the manifest restricts reporting to service locations "+a.serviceLocations.join(" ")+" but the location of some requests cannot be resolved; they are not decorated."),!1;if(!a.serviceLocations.includes(b))return!1}if(a.adaptationSets&&d.stream){var e=d.stream.groupId;if(!e)return Xa("CMCD_NO_GROUP_ID","CMCD: the manifest restricts reporting to adaptation sets "+a.adaptationSets.join(" ")+
" but some streams have no group id; they are not decorated. For DASH this happens when dash.enableAudioGroups is false."),!1;if(!a.adaptationSets.some(function(f){return e==f||e.startsWith(f+"_preselection_")}))return!1}return!0}function uz(a,b){var c=a.j.includeInRequests,d=c;if(!c.length){if(a.j.zj)return!1;d=Fz}return d.includes("*")||b=="init"&&d.includes("segment")?!0:d.includes(b)}
function Gz(a){return(a=a.j.eventTargets)?a.some(function(b){return b.enabled!==!1&&b.events&&b.events.includes("rr")}):!1}function vz(a){return{v:a.j.version,sid:a.j.sessionId,cid:a.j.contentId,sf:a.B,mtp:a.i.getBandwidthEstimate()/1E3}}function wz(a,b){var c={};b&&!b.includes("offline:")&&(c.oe=b);a.j.version!=null&&(c.version=a.j.version);c.Pg="request";return c}
function zz(a){a.m.J(a.l,"pause",function(){Bz(a,"a")});a.m.J(a.l,"playing",function(){Bz(a,"p");a.h&&a.C&&(ez(a.h,{msd:Date.now()-a.C}),a.C=0)});a.m.J(a.l,"seeking",function(){Bz(a,"k")});a.m.J(a.l,"ended",function(){Bz(a,"e")});a.m.J(a.l,"volumechange",function(){a.h&&a.l&&gz(a.h,a.l.muted?"m":"um")});a.m.J(a.i,"buffering",function(b){Bz(a,b.buffering?"r":"p")});a.m.J(a.i,"adaptation",function(){if(a.h&&a.i){var b=a.i.lc().find(function(c){return c.active});b&&b.bandwidth&&ez(a.h,{br:[b.bandwidth/
1E3]})}});a.m.J(a.i,"error",function(){Bz(a,"f");a.h&&gz(a.h,"e")});Sj(a.m,a.l,function(b){a.h&&gz(a.h,b?"pe":"pc")});a.m.J(document,"visibilitychange",function(){a.h&&ez(a.h,{bg:document.hidden})});a.m.J(a.i,"complete",function(){Bz(a,"e")})}function Hz(a){if(a.type===0)return"i";if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?"av":"v";if(b=="audio")return"a";if(b=="text")return a.mimeType==="application/mp4"?"tt":"c"}}
function Iz(a,b){b=a.i.fc()[b];if(!b.length)return NaN;var c=a.l?a.l.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Jz(a,b){b=a.i.fc()[b];if(!b.length)return 0;var c=a.l?a.l.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Kz(a,b){var c=a.i.lc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case "v":return a.videoBandwidth||NaN;case "a":return a.audioBandwidth||NaN;default:return a.bandwidth}}function rz(a,b){var c=new Set(Az(b)),d=a.filter(function(e){return c.has(e)||yy.test(e)});d.length!=a.length&&Za(a.filter(function(e){return!d.includes(e)}));return d}
function Az(a){return a===2?Array.from(new Set([].concat($x,ay,Zx))):[].concat(by)}function Lz(a,b){switch(a){case Uk:return b.type==0?"init":"segment";case 0:switch(b.type){case 6:return"mpdpatch";case 14:return"xlink";case 15:return"mpdlink";default:return"mpd"}case 8:return"steering";case 13:return"callback";case 2:case 5:case 6:return"license";case 4:return"timing";default:return null}}
function Ez(a,b){var c=null;b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.startsWith(d.uri)&&(!c||d.uri.length>c.uri.length)&&(c=d);return c?c.serviceLocation:null}var Fz="segment init mpd mpdpatch xlink mpdlink license timing".split(" ");K("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",nm:"s",OTHER:"o"});
K("shaka.util.CmcdManager.EventType",{Ol:"bc",bm:"ps",Yl:"pr",ERROR:"e",qm:"t",Ql:"c",Nl:"b",Xl:"m",sm:"um",$l:"pe",Zl:"pc",hm:"rr",Kl:"as",Jl:"ae",Il:"abs",Hl:"abe",lm:"sk",Rl:"ce"});K("shaka.util.CmcdManager.PlayerState",{pm:"s",am:"p",im:"k",gm:"r",PAUSED:"a",um:"w",Sl:"e",Tl:"f",fm:"q",dm:"d"});function Mz(a){this.i=a;this.h=null}r=Mz.prototype;r.configure=function(a){this.i=a};r.Oh=function(){return this.i.enabled&&this.i.applyMaximumSuggestedBitrate&&this.h&&this.h.has(Nz)?this.h.get(Nz)*1E3:null};r.Mh=function(){return this.i.enabled&&this.h&&this.h.has(Oz)?this.h.get(Oz)*1E3:null};r.bk=function(){return this.i.enabled&&this.h&&this.h.has(Pz)?this.h.get(Pz):null};r.ck=function(){return this.i.enabled&&this.h&&this.h.has(Qz)?this.h.get(Qz):null};
r.getBandwidthEstimate=function(a){var b=this.Mh();if(!b)return a;var c=this.i.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function Rz(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}K("shaka.util.CmsdManager",Mz);Mz.prototype.getBandwidthEstimate=Mz.prototype.getBandwidthEstimate;Mz.prototype.getRoundTripTime=Mz.prototype.ck;Mz.prototype.getResponseDelay=Mz.prototype.bk;Mz.prototype.getEstimatedThroughput=Mz.prototype.Mh;
Mz.prototype.getMaxBitrate=Mz.prototype.Oh;var Oz="etp",Nz="mb",Pz="rd",Qz="rtt";function Sz(){this.h=null;this.i=[]}function Tz(a,b){return H(function(c){if(c.i==1)return a.h?c.h(new Promise(function(d){return a.i.push(d)}),2):c.A(2);a.h=b;c.l()})}Sz.prototype.release=function(){this.i.length>0?this.i.shift()():this.h=null};function Uz(a){this.h=a;this.j=this.i=null}Uz.prototype.start=function(a,b){function c(e,f){d.h&&d.j===c&&a(e,f);d.h&&d.j===c&&!b&&(d.i=d.h.requestVideoFrameCallback(c))}var d=this;b=b===void 0?!1:b;Vz(this);if(!(this.h&&"requestVideoFrameCallback"in this.h))return!1;this.j=c;this.i=this.h.requestVideoFrameCallback(c);return!0};Uz.prototype.release=function(){Vz(this);this.h=null};
function Vz(a){if(a.i!==null){var b,c;(b=a.h)==null||(c=b.cancelVideoFrameCallback)==null||c.call(b,a.i);a.i=null}a.j=null};function Z(a,b,c){b=b===void 0?null:b;yk.call(this);var d=this;this.m=Wz;this.i=null;this.pd=b;this.Oa=!1;this.ie=new ib;this.rd=new ib;this.o=new ib;this.Ob=new ib;this.Pc=new ib;this.G=this.H=this.td=this.V=this.u=this.M=null;this.Qc=0;this.va=new Sz;this.l=this.qd=this.ia=this.sh=this.Ma=this.K=this.Ya=this.eb=this.Ca=this.$b=this.$=this.$a=this.N=this.Db=null;this.ra=Xz(this);this.T=this.Y=this.ba=this.j=this.Zb=this.I=null;this.sa=!1;this.tf=this.B=null;this.je=1E9;this.ge=[];this.Yb=new Map;
this.fe=[];this.rf=-1;this.h=Yz(this);this.vf=Nu();this.na=null;this.le=-1;this.Nb=null;this.Pa={width:Infinity,height:Infinity};this.be=new nr(this.h,this.Pa,null);this.ee=[];this.C=null;this.O=this.h.adaptationSetCriteriaFactory();b={preferredAudio:this.h.preferredAudio,preferredVideo:this.h.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:this.h.mediaSource.codecSwitchingStrategy,
audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:this.keySystem()};Pu(b);this.O.configure(b);this.sd=[];c&&c(this);this.K=new lz(this,this.h.cmcd);this.Ma=new Mz(this.h.cmsd);this.M=Zz(this);this.Da=this.Ga=this.Qa=this.D=null;this.xf=!1;this.uf=[];this.wf=new $e(function(){var e;return H(function(f){switch(f.i){case 1:if(!d.Ga){f.A(0);break}f.o(3);return f.h(d.xb(d.Da,!0),5);case 5:return f.h(d.load(d.Ga),6);case 6:f.u(4);break;case 3:return e=f.m(),$z(d,e),f.return();case 4:d.xf?
d.Da.pause():d.Da.play(),d.Ga=null,d.xf=!1,f.l()}})});aA&&(this.D=aA(this),this.D.configure(this.h.ads),this.Pc.J(this.D,"ad-content-pause-requested",function(e){var f,g,h;return H(function(k){if(k.i==1){d.wf.stop();if(d.Ga)return k.A(0);d.Da=d.i;d.xf=d.Kd();f=e.saveLivePosition||!1;g=!0;d.isLive()&&(g=f);k.o(3);return k.h(d.Hh(!0,g),5)}if(k.i!=3)return d.Ga=k.j,k.u(0);h=k.m();$z(d,h);k.l()})}),this.Pc.J(this.D,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.Ga){var f=d.Ga;f.B&&e&&(typeof f.B===
"number"?f.B+=e:f.B.setTime(f.B.getTime()+e*1E3))}d.wf.ea(.1)}),this.Pc.J(this.D,"ad-content-attach-requested",function(){var e;return H(function(f){switch(f.i){case 1:if(d.i||!d.Da){f.A(0);break}f.o(3);return f.h(d.xb(d.Da,!0),5);case 5:f.u(4);break;case 3:return e=f.m(),$z(d,e),f.return();case 4:d.Da=null,f.l()}})}));bA&&(this.Qa=bA(this),this.Qa.configure(this.h.queue));this.ie.J(window,"online",function(){cA(d);d.Tg()});this.ce=new $e(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.j.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.ce.stop();f&&dA(d,!1,void 0,!1,!1)});this.L=this.F=this.Eb=null;this.ud=new Set;this.Aa=null;this.ph=new zk;this.ke=null;a&&(Wa("Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.xb(a,!0))}ta(Z,yk);function eA(a){a.ia!=null&&(Fc(a.ia),a.ia.release(),a.ia=null)}
function fA(a,b,c){c||b.lcevc.enabled?(eA(a),a.ia==null&&(a.ia=new Cc(a.i,a.sh,b.lcevc,c),a.H&&(a.H.H=a.ia))):eA(a)}function gA(a,b){return new xk(a,b)}r=Z.prototype;
r.destroy=function(){var a=this,b;return H(function(c){switch(c.i){case 1:if(a.m==hA)return c.return();eA(a);for(var d=a.va;d.h;)d.release();b=a.detach();a.m=hA;return c.h(b,2);case 2:if(!a.V){c.A(3);break}return c.h(a.V.destroy(),4);case 4:a.V=null;case 3:return a.td=null,c.h(a.Gh(),5);case 5:a.ie&&(a.ie.release(),a.ie=null);a.rd&&(a.rd.release(),a.rd=null);a.o&&(a.o.release(),a.o=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.Pc&&(a.Pc.release(),a.Pc=null);a.tf=null;a.h=null;a.C=null;a.pd=null;a.K=null;
a.Ma=null;if(!a.M){c.A(6);break}return c.h(a.M.destroy(),7);case 7:a.M=null;case 6:a.B&&(a.B.release(),a.B=null),a.Qa&&(a.Qa.destroy(),a.Qa=null),a.L&&(a.L.release(),a.L=null),a.Aa&&(a.Aa.release(),a.Aa=null),yk.prototype.release.call(a),c.l()}})};function iA(a,b){a.dispatchEvent(gA("onstatechange",(new Map).set("state",b)))}
r.xb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return H(function(g){switch(g.i){case 1:jA(c);d=c.i&&c.i==a;if(!c.i||c.i==a){g.A(2);break}return g.h(c.detach(),2);case 2:return jA(c),g.h(kA(c,"attach"),4);case 4:if(g.j)return g.return();g.o(5,6);d||(iA(c,"attach"),e=function(){var h=lA(c,!1);h&&mA(c,h)},c.rd.J(a,"error",e),c.i=a,c.K&&c.K.setMediaElement(a));ob();if(!b||!Kc()||c.H){g.A(6);break}return g.h(nA(c),6);case 6:g.F();c.va.release();g.G(0);break;case 5:return f=g.m(),g.h(c.detach(),
10);case 10:throw f;}})};r.fj=function(a){this.sh=a};r.detach=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this;return H(function(d){if(d.i==1)return jA(c),d.h(c.$d(!1,a,b),2);if(d.i!=3)return d.h(kA(c,"detach"),3);if(d.j)return d.return();try{c.i&&(c.rd.Ta(),c.i=null),iA(c,"detach"),c.D&&!a&&c.D.release()}finally{c.va.release()}d.l()})};function kA(a,b){var c;return H(function(d){return d.i==1?(c=++a.Qc,d.h(Tz(a.va,b),2)):c!=a.Qc?(a.va.release(),d.return(!0)):d.return(!1)})}
r.$d=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,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B;return H(function(A){switch(A.i){case 1:return d.m!=hA&&(d.m=Wz),A.h(kA(d,"unload"),2);case 2:if(A.j)return A.return();e=d.h.drm.keepDrmEngineOnDetach&&!!d.u&&!!d.u.Tb();if(!e){A.A(3);break}if(!d.V||d.V==d.u){A.A(4);break}return A.h(d.V.destroy(),4);case 4:d.V=d.u,d.td=d.ba,d.u=null;case 3:return A.K(6),d.sa=!1,iA(d,"unload"),eA(d),f=d.sd.map(function(D){return D()}),d.sd=[],A.h(Promise.all(f),
8);case 8:g=(new Map).set("isSwitchingContent",c);d.dispatchEvent(gA("unloading",g));d.$b&&(d.$b.release(),d.$b=null);d.Ya&&(d.Ya.release(),d.Ya=null);d.Ca&&(d.Ca.release(),d.Ca=null);d.eb&&(d.eb.release(),d.eb=null);d.i&&(d.o.Ta(),d.Ob.Ta());d.ce.stop();d.Db&&(d.Db.release(),d.Db=null);d.$a&&(d.$a.stop(),d.$a=null);if(!d.I){A.A(9);break}return A.h(d.I.stop(),10);case 10:d.I=null,d.Zb=null;case 9:d.B&&d.B.stop();if(!d.l){A.A(11);break}return A.h(d.l.destroy(),12);case 12:d.l=null;case 11:d.ra.h=[];
d.N&&(d.N.release(),d.N=null);d.G&&(d.G.release(),d.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!d.u){A.A(13);break}return A.h(d.u.destroy(),14);case 14:d.u=null;case 13:if(!d.H){A.A(15);break}return A.h(d.H.destroy(),16);case 16:d.H=null;case 15:if(d.D&&!b)d.D.onAssetUnload();d.Ga&&!b&&(d.Ga.destroy(),d.Ga=null);b||d.wf.stop();d.K&&pz(d.K);d.Ma&&(d.Ma.h=null);if(!d.F){A.A(17);break}return A.h(d.F.destroy(),18);case 18:d.F=null;case 17:return d.Oa=!1,d.L&&d.L.disable(),d.ud.clear(),d.Aa&&
(d.Aa.release(),d.Aa=null),A.h(d.ph.destroy(),19);case 19:if(d.i){h=t(d.uf);for(k=h.next();!k.done;k=h.next())l=k.value,l.src.startsWith("blob:")&&URL.revokeObjectURL(l.src),l.remove();d.uf=[];Nj(d.i)&&d.i.load()}if(!d.u){A.A(20);break}return A.h(d.u.destroy(),21);case 21:d.u=null;case 20:d.Eb&&d.ba!=d.Eb.Je()&&(d.Eb.F||d.Eb.destroy(),d.Eb=null);d.ba=null;d.Y=null;d.$=null;if(d.j){m=t(d.j.variants);for(n=m.next();!n.done;n=m.next())for(p=n.value,u=t([p.audio,p.video]),q=u.next();!q.done;q=u.next())(v=
q.value)&&v.segmentIndex&&v.segmentIndex.release();w=t(d.j.textStreams);for(x=w.next();!x.done;x=w.next())y=x.value,y.segmentIndex&&y.segmentIndex.release()}d.h&&d.h.streaming.clearDecodingCache&&(yf.clear(),jc.clear());d.j=null;d.C=new Vu;d.rh=null;d.Nb=null;d.na=null;d.le=-1;d.ge=[];z=t(d.Yb.values());for(C=z.next();!C.done;C=z.next())B=C.value,B.stop();d.Yb.clear();d.fe=[];d.rf=-1;d.M&&d.M.Dh();d.ke&&(URL.revokeObjectURL(d.ke),d.ke=null);oA(d);ob();if(!a||!Kc()||d.H||!d.i){A.A(6);break}return A.h(nA(d),
6);case 6:A.F(),d.va.release(),A.G(0)}})};r.El=function(a){this.T=a};r.load=function(a,b,c){b=b===void 0?null:b;var d=this;return H(function(e){return e.h(pA(d,a,b,c),0)})};
function pA(a,b,c,d,e,f){e=e===void 0?!1:e;f=f===void 0?null:f;var g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D;return H(function(F){switch(F.i){case 1:jA(a);if(a.i||!a.Da){F.A(2);break}return F.h(a.xb(a.Da,!0),3);case 3:a.Da=null;case 2:g=null;h="";d=(k=d)==null?void 0:k.toLowerCase();if(b instanceof dv){if(b.F)throw new L(2,7,7006);g=b;h=g.Je()||""}else h=b||"";return F.h(Tz(a.va,"load"),4);case 4:a.va.release();if(f!=null&&f!=a.Qc)throw new L(2,7,7E3);if(!a.i)throw new L(2,7,7002);l=a.h.drm.keepDrmEngineOnDetach&&
!!a.V&&a.td===h;if(!a.ba){F.A(5);break}a.ba=h;return F.h(a.$d(!1,!1,!0),5);case 5:a.K&&nz(a.K);jA(a);m=++a.Qc;n=function(){return H(function(E){if(E.i==1)return a.Qc==m?E.A(0):g?E.h(g.destroy(),3):E.A(3);throw new L(2,7,7E3);})};p=function(E,G){return H(function(J){switch(J.i){case 1:return J.K(2),J.h(Tz(a.va,G),4);case 4:return J.h(n(),5);case 5:return J.h(E(),6);case 6:return J.h(n(),7);case 7:g&&a.h&&(g.j=a.h);case 2:J.F(),a.va.release(),J.G(0)}})};u=!1;F.o(7,8);c==null&&g&&(c=g.getStartTime());
a.T=c;a.sa=!1;a.ba=h;a.dispatchEvent(gA("loading"));if(g){d=g.ig();F.A(10);break}if(d){F.A(10);break}return F.h(p(function(){return H(function(E){if(E.i==1)return E.h(qA(a,h),2);d=E.j;E.l()})},"guessMimeType_"),10);case 10:q=!!g;if(g||e){g&&(gv(g,a),a.C=g.getStats());F.A(13);break}return F.h(rA(a,h,c,d,!0,a.h),14);case 14:(g=F.j)?(g.H=!1,gv(g,a),a.C=g.getStats(),l&&a.V&&kv(g,a.V),g.start(),g.C.promise.catch(function(){})):a.C=new Vu;case 13:v=!g;w=Date.now()/1E3;a.C=g?g.getStats():new Vu;a.Y=d||null;
oA(a);x=function(){var E=a.i?a.i.buffered:null;return{start:Zq(E)||0,end:$q(E)||0}};a.Ca=new it(x);a.Ca.addEventListener("regionadd",function(E){sA(a,E.region,"metadataadded")});if(v)return F.h(p(function(){return H(function(E){return E.h(tA(a,d,l),0)})},"initializeSrcEqualsDrmInner_"),28);a.eb=new it(x);return F.h(p(function(){return H(function(E){if(E.i==1)return E.h(Promise.race([g.sa.promise,g.C.promise]),2);a.Zb=g.L;var G=g;G.va=!0;a.I=G.o;a.j=g.hg();E.l()})},"waitForFinish"),17);case 17:uA(a);
if(a.H){F.A(18);break}return F.h(p(function(){return H(function(E){return E.h(nA(a),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return F.h(p(function(){return H(function(E){return E.h(g.C.promise,0)})},"waitForFinish"),20);case 20:a.h=g.getConfiguration();a.be=g.I;a.I&&a.I.setMediaElement&&a.i&&a.I.setMediaElement(a.i);a.$b=hv(g);a.Ya=iv(g);a.qd=g.Oa;if(y=g.m)a.O=y;q&&a.i&&a.i.nodeName==="AUDIO"&&(vA(a),a.configure("manifest.disableVideo",!0));if(l)return a.u=a.V,a.V=null,a.td=null,F.h(p(function(){return H(function(E){return E.h(a.u.xb(a.i),
0)})},"drmEngine_.attach"),22);if(g.l){F.A(23);break}return F.h(p(function(){return H(function(E){return E.h(ov(g,a.i),0)})},"drmEngine_.init"),23);case 23:return a.u=jv(g),F.h(p(function(){return H(function(E){return E.h(a.u.xb(a.i),0)})},"drmEngine_.attach"),22);case 22:return a.O&&(z=a.O.getConfiguration(),z.keySystem=a.keySystem(),a.O.configure(z)),C=a.h.abrFactory,a.B&&a.tf==C||(a.tf=C,a.B&&a.B.release(),a.B=C(),a.B.configure(a.h.abr)),B=lv(g),A=g.i,F.h(p(function(){return H(function(E){return E.h(wA(a,
w,A,B),0)})},"loadInner_"),27);case 27:fv(g);a.Y&&ob().Ri()&&Fe(a.Y)&&Hr(a.H,a.ba,a.Y);F.A(16);break;case 28:return F.h(p(function(){return H(function(E){return E.h(xA(a,w,d),0)})},"srcEqualsInner_"),16);case 16:a.dispatchEvent(gA("loaded"));case 8:F.F();if(!g){F.A(30);break}return F.h(g.destroy(),30);case 30:a.Eb=null;F.G(9);break;case 7:D=F.m();if(u=D instanceof L&&!!g&&!e&&a.Qc==m&&yA(a,d,D))c=a.T;if(!D||D.code==7E3){F.A(32);break}return F.h(a.$d(!1),32);case 32:if(!u)throw D;F.A(8);break;case 9:if(u)return F.h(pA(a,
h,c,d,!0,m+1),0);F.A(0)}})}function vA(a){for(var b=t(a.j.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.j.variants=a.j.variants.filter(function(d){return d.audio})}r.Bl=function(a,b,c,d){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;d=d===void 0?!1:d;var e=this,f;return H(function(g){return g.i==1?g.h(zA(e,c),2):g.i!=3?(f=g.j,g.h(e.$d(a,b,d),3)):g.return(f)})};
r.Hh=function(a,b,c){a=a===void 0?!1:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return H(function(f){return f.i==1?f.h(zA(d,b),2):f.i!=3?(e=f.j,f.h(d.detach(a,c),3)):f.return(e)})};
function zA(a,b){b=b===void 0?!1:b;var c,d,e;return H(function(f){if(f.i==1){c=null;if(!(a.j&&a.I&&a.Zb&&a.ba&&a.h))return f.A(2);d=a.i.currentTime;b||(d=null);return f.h(AA(a,a.ba,d,a.Y,a.h,!0,!1),3)}if(f.i!=2){c=f.j;a.ee.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.Zb;g.h=a.j;g.o=h;g.L=k;c.m=a.O;c.start();a.j=null;a.I=null;a.Zb=null}return f.return(c)})}
r.preload=function(a,b,c,d,e){b=b===void 0?null:b;e=e===void 0?!1:e;var f=this,g,h,k,l;return H(function(m){if(m.i==1)return c=(g=c)==null?void 0:g.toLowerCase(),h=Yz(f),Ou(h,d||f.h,Yz(f)),m.h(rA(f,a,b,c,!1,h),2);if(k=m.j)k.start();else{l=new L(2,7,7005);if(e)throw l;mA(f,l)}return m.return(k)})};r.Gh=function(){var a=this,b,c,d,e;return H(function(f){b=[];c=t(a.ee);for(d=c.next();!d.done;d=c.next())e=d.value,e.F||b.push(e.destroy());a.ee=[];return f.h(Promise.all(b),0)})};
function rA(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return H(function(m){if(m.i==1)return d?m.A(2):m.h(qA(a,b),3);m.i!=2&&(d=m.j);if(g=yA(a,d))return m.return(null);h=f||a.h;k=!1;e&&a.i&&a.i.nodeName==="AUDIO"&&(k=!0);l=AA(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.H=!1;return n}):l.then(function(n){a.ee.push(n);return n});return m.return(l)})}
function AA(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,p,u,q,v,w,x,y,z,C,B,A;return H(function(D){if(D.i==1){h=null;k=nd(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.K&&h.F?null:h};m=function(){return l()?l().getConfiguration():a.h};if(a.Pa.width!=Infinity||a.Pa.height!=Infinity||a.h.ignoreHardwareResolution)return D.A(2);n=ob();return D.h(n.Ib(),3)}D.i!=2&&(p=D.j,a.Pa.width=p.width,a.Pa.height=p.height);u=new nr(k,a.Pa,null);q={networkingEngine:a.M,filter:function(F){var E,
G;return H(function(J){if(J.i==1)return J.h(or(u,F),2);if(J.i!=4){E=J.j;if(!E)return J.A(0);G=gA("trackschanged");return J.h(Promise.resolve(),4)}h.dispatchEvent(G);J.l()})},makeTextStreamsForClosedCaptions:function(F){for(var E=new Set,G=t(F.textStreams),J=G.next();!J.done;J=G.next())J=J.value,J.mimeType!=Je&&J.mimeType!=Ke||E.add(J.originalId);G=t(F.variants);for(J=G.next();!J.done;J=G.next())if((J=J.value.video)&&J.closedCaptions)for(var N=t(J.closedCaptions.keys()),P=N.next();!P.done;P=N.next())if(P=
P.value,!E.has(P)){var U=P.startsWith("CC")?Je:Ke,Q=new Mm,M=J.closedCaptions.get(P);U=Wf({id:a.je++,originalId:P,segmentIndex:Q,mimeType:U,kind:"caption",language:M,originalLanguage:M,type:zc,roles:J.roles});F.textStreams.push(U);E.add(P)}},onTimelineRegionAdded:function(F){jt(h.M,F)},onScte35Event:function(F){jt(h.V,F)},onEvent:function(F){return h.dispatchEvent(F)},onError:function(F){return h.onError(F)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&
h.K&&a.l.updateDuration()},newDrmInfo:function(F){var E=h.l,G=E?E.Tb():null;G&&E.B&&rr(u,G.keySystem,F)},onManifestUpdated:function(){var F=(new Map).set("isLive",a.isLive()).set("isInProgress",a.ad());h.dispatchEvent(gA("manifestupdated",F));ev(h,!1,function(){if(a.D)a.D.onManifestUpdated(a.oa())});h.K&&uA(a)},getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},onMetadata:function(F,E,G,J){var N=F;if(F=="com.apple.hls.interstitial"||F=="com.apple.hls.overlay")N="com.apple.quicktime.HLS";
var P={type:N,startTime:E,endTime:G,values:J};F=new Promise(function(M){ev(h,!1,function(){return H(function(O){switch(O.i){case 1:if(!a.D){O.A(0);break}if(!a.i){O.A(3);break}O.o(4);return O.h(a.D.onHLSMetadata(P),6);case 6:O.u(3);break;case 4:O.m();case 3:M(),O.l()}})})});J=t(J);for(var U=J.next(),Q={};!U.done;Q={Hg:void 0},U=J.next())Q.Hg=U.value,Q.Hg.name!="ID"&&ev(h,!1,function(M){return function(){BA(a,E,G,N,M.Hg)}}(Q));return F},disableStream:function(F){return a.disableStream(F,a.h.streaming.maxDisabledTime)},
addFont:function(F,E){return a.addFont(F,E)},getStreamingRetryParameters:function(){return a.h.streaming.retryParameters},onSegmentReceived:function(F,E){ev(h,!1,function(){var G;(G=a.B)==null||G.segmentDownloaded(F,E,!0)})}};v=new it(function(){return a.Za()});v.addEventListener("regionadd",function(F){var E=F.region;CA(a,"timelineregionadded",E,h);ev(h,!1,function(){if(a.D)a.D.onDASHMetadata(E)})});w=new it(function(){return a.Za()});w.addEventListener("regionadd",function(F){h.dispatchEvent(gA("scte35added",
(new Map).set("detail",F.region)))});x=null;k.streaming.observeQualityChanges&&(x=new Dm(function(){return a.fc()}),x.addEventListener("qualitychange",function(F){DA(a,F.quality,F.position)}),x.addEventListener("audiotrackchange",function(F){DA(a,F.quality,F.position,!0)}));y=!0;z={dd:a.M,onError:function(F){return h.onError(F)},pi:function(F){ev(h,!0,function(){a.u&&EA(a,F)})},onExpirationUpdated:function(F,E){var G=gA("expirationupdated");h.dispatchEvent(G);if((G=h.o)&&G.onExpirationUpdated)G.onExpirationUpdated(F,
E)},onEvent:function(F){h.dispatchEvent(F);if(F.type=="drmsessionupdate"&&y){y=!1;F=Date.now()/1E3-h.Ga;var E=a.C||h.getStats();F>=0&&(E.o=F);a.ia&&Fc(a.ia)}}};C=Zz(a,l);Nk(a.M,C);B=function(){return a.ye(z)};A={config:k,Bk:q,Sk:v,al:w,Rk:x,ye:B,Ak:u,networkingEngine:C,ej:f,Nk:function(F){h.K&&uA(a,F)}};h=new dv(b,d,c,A);return D.return(h)})}
function qA(a,b){var c,d,e,f;return H(function(g){if(g.i==1)return c=a.h.manifest.retryParameters,g.h(bn(b,a.M,c),2);d=g.j;Fe(d)?(e=ob(),e.Ea()==="WEBKIT"&&(d="application/vnd.apple.mpegurl")):d==="video/quicktime"&&(f=ob(),f.Ea()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function yA(a,b,c){c=c===void 0?null:c;ob();if(!c&&!Kc())return!0;if(b){if((a.i||Mc()).canPlayType(b)=="")return!1;if(c)return a.h.streaming.fallbackToNativeHlsOnMseError&&Fe(b)&&(c.code==4040||c.code==4041);if(!Kc(ob())||!Ic.has(b))return!0;if(Fe(b))return ob().Ea()==="WEBKIT"&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"])?a.h.streaming.useNativeHlsForFairPlay:a.h.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.h.streaming.preferNativeDash}return!1}
function FA(a,b){var c=a.h.textDisplayFactory;a.rh!==c||(b===void 0?0:b)?(b=a.F,a.F=c(a),a.F.configure(a.h.textDisplayer),b?(a.F.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.F.setTextVisibility(a.Oa),a.H&&ss(a.H,a.F),a.rh=c,a.l&&Yt(a.l)):a.F&&a.F.configure(a.h.textDisplayer)}
function nA(a){var b,c,d;return H(function(e){if(e.i==1)return ob(),iA(a,"media-source"),a.h.mediaSource.useSourceElements&&Nj(a.i),FA(a),b=GA(a.i,a.F,{Le:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),p=n.next();!p.done;p=n.next())BA(a,l,m,"org.id3",p.value);if(a.D)a.D.onHlsTimedMetadata(k,l)}},Lk:function(f){a.eb&&jt(a.eb,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f});if(a.Ya){if(on.includes(f.schemeIdUri.trim())){var g={schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.eventDuration==4294967295?f.startTime:f.endTime,id:String(f.id),source:"emsg",kind:"",data:null,node:null};if(f.messageData&&f.messageData.length)if(f.schemeIdUri.trim().endsWith(":bin"))g.data=f.messageData;else{var h=null;try{b:{var k=Ib(f.messageData);try{for(var l=t(sd(k,!1)||[]),m=l.next();!m.done;m=
l.next()){var n=m.value;if(typeof n!="string"&&!n.tagName.startsWith("?")){h=n;break b}}}catch(p){}h=null}}catch(p){}h&&(g.data=mn(h),g.data||(g.node=h))}f=g}else f=null;f&&jt(a.Ya,f)}},onEvent:function(f){return a.dispatchEvent(f)},Ok:function(){a.I&&a.I.update&&a.I.update()},Tb:function(){return a.drmInfo()}},a.ia,a.h.mediaSource),c=a.h.manifest,d=c.segmentRelativeVttTiming,b.Ga=d,e.h(b.O.promise,2);a.H=b;e.l()})}
function HA(a,b){a.N=new Bs({kg:function(){return b.playbackRate},Wc:function(){return b.defaultPlaybackRate},Ii:function(c){b.playbackRate=c},Gk:function(c){var d=b.currentTime;if(ar(b.buffered,d)&&!(b.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){var e=d+c,f=a.Za();if(e<f.start)d!==f.start&&(b.currentTime=f.start);else if(e>f.end)d!==f.end&&(b.currentTime=f.end);else{if(c<0)for(c=cr(b.buffered),d=c.length-1;d>=0;d--)if(e>=c[d].start){e>c[d].end&&(e=Math.max(c[d].start,c[d].end-.5));break}b.currentTime=
e}}},isPaused:function(){return b.paused}})}
function IA(a,b,c){a.o.Lb(b,["playing","pause","ended"],function(){JA(a)});a.o.J(b,"ratechange",function(){KA(a)});var d=Uj(ob(),b);d&&(a.o.J(d,"connect",function(){a.l&&d.state=="connected"&&LA(a);MA(a)}),a.o.J(d,"connecting",function(){return MA(a)}),a.o.J(d,"disconnect",function(){return H(function(f){if(f.i==1)return a.l&&d.state=="disconnected"?f.h(mu(a.l),3):f.A(2);f.i!=2&&LA(a);MA(a);f.l()})}));b.audioTracks&&a.o.Lb(b.audioTracks,["addtrack","removetrack","change"],function(){MA(a)});b.videoTracks&&
a.o.Lb(b.videoTracks,["addtrack","removetrack","change"],function(){MA(a)});(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&a.o.J(b,"webkitpresentationmodechanged",function(){a.pd&&FA(a,!0)});if(b.textTracks){var e=function(){a.m===NA&&a.F instanceof Vw&&LA(a);MA(a)};a.o.J(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":OA(a,f);break;case "chapters":PA(a,f);break;default:e()}});a.o.Lb(b.textTracks,["removetrack","change"],e)}b.preload!="none"&&(a.o.Ra(b,
"loadedmetadata",function(){var f=a.C,g=Date.now()/1E3-c;g>=0&&(f.H=g)}),a.Uh()||(a.Aa=new Uz(b),a.Aa.start(function(){a.Aa.release();a.Aa=null;var f=a.C,g=Date.now()/1E3-c;g>=0&&(f.u=g)},!0)||a.o.Ra(b,"loadeddata",function(){var f=a.C,g=Date.now()/1E3-c;g>=0&&(f.u=g)})))}
function wA(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea,ha,I,T;return H(function(R){switch(R.i){case 1:iA(a,"load");e=a.i;HA(a,e);IA(a,e,b);"onchange"in window.screen&&a.o.J(window.screen,"change",function(){if(a.O.getConfiguration){var S=a.O.getConfiguration();S.preferredVideo.some(function(X){return X.hdrLevel=="AUTO"})?QA(a):a.h.preferredVideo.some(function(X){return X.hdrLevel=="AUTO"})&&a.h.abr.enabled&&(S.preferredVideo=a.h.preferredVideo,Pu(S),a.O.configure(S),
QA(a))}});f=!1;g=t(a.j.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=Ec(l));fA(a,a.h,f);RA(a.j.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(S,X,ka){a.j&&a.l&&S!=a.l.u&&SA(a,S,!0,X===void 0?!1:X,ka===void 0?0:ka)},function(S,X){var ka,na=(ka=a.l)==null?void 0:ka.u;(S=na&&na[S])&&a.disableStream(S,X)});a.B.setMediaElement(e);a.B.setCmsdManager(a.Ma);a.l=TA(a);a.l.configure(a.h.streaming);m=a.ra.h.slice();a.ra.h=[];n=t(m);
for(p=n.next();!p.done;p=n.next())u=p.value,a.uh(u.start,u.end);a.m=UA;a.dispatchEvent(gA("streaming"));q=c;case 2:w=a.l.u;w||(x=VA(a,!0),c||(q=x));y=[];v=w||q;z=t([v.video,v.audio]);for(C=z.next();!C.done;C=z.next())(B=C.value)&&!B.segmentIndex&&(y.push(B.createSegmentIndex()),B.dependencyStream&&y.push(B.dependencyStream.createSegmentIndex()));if(!(y.length>0)){R.A(4);break}return R.h(Promise.all(y),4);case 4:if(!v||v.disabledUntilTime!=0){R.A(2);break}QA(a);if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(v);
a.j.isLowLatency&&(a.h.streaming.lowLatencyMode?a.configure(a.vf):Wa("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&&sz(a.K,b*1E3);RA(a.j.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);Mt(a.l,a.h.playRangeStart,a.h.playRangeEnd);return R.h(WA(a),7);case 7:a.sa=!0;a.dispatchEvent(gA("canupdatestarttime"));A=function(S){a.G=XA(a,S);a.Db=
YA(a,S);ZA(a,e,!1)};a.h.streaming.startAtSegmentBoundary||(D=a.T,D==null&&a.j.startTime&&(D=a.j.startTime),A(D));if(w){R.A(8);break}if(!a.h.streaming.startAtSegmentBoundary){R.A(9);break}F=a.j.presentationTimeline;a.T instanceof Date&&(G=F.l||F.j,J=a.T.getTime()/1E3-G,J!=null&&(E=J));E==null&&(E=typeof a.T==="number"?a.T:a.isLive()?Infinity:a.i.currentTime);a.T==null&&a.j.startTime&&(E=a.j.startTime);N=F.Ab();P=F.pb();E<N?E=N:E>P&&(E=P);return R.h($A(q,E),10);case 10:U=R.j,A(U);case 9:SA(a,q,!0,!1,
0);case 8:a.G.ready();Q=a.rb().find(function(S){return S.active});if(!Q){if(M=aB(a,q))Uu(a.C.l,M,!0),M?(a.Oa=!0,a.F.setTextVisibility(!0)):(a.Oa=!1,a.F.setTextVisibility(!1));M&&a.Oa&&(Xt(a.l,M),bB(a))}return R.h(a.l.start(d),11);case 11:a.h.abr.enabled&&(a.B.enable(),cB(a));MA(a);a.j.variants.some(function(S){return S.primary});O=a.oa();V=a.j.serviceDescription;ea=!!V&&(V.targetLatency!=null||V.maxLatency!=null||V.minLatency!=null||V.maxPlaybackRate!=null||V.minPlaybackRate!=null);if(O&&(a.h.streaming.liveSync&&
a.h.streaming.liveSync.enabled||ea||a.h.streaming.liveSync.panicMode)||a.h.streaming.vodDynamicPlaybackRate)ha=function(){return dB(a)},a.o.J(e,"timeupdate",ha);O||(I=function(){return eB(a)},a.o.J(e,"timeupdate",I),eB(a),a.j.nextUrl&&(a.h.streaming.preloadNextUrlWindow>0&&(T=function(){var S;return H(function(X){if(X.i==1){S=a.Za().end-a.i.currentTime;if(isNaN(S)||!(S<=a.h.streaming.preloadNextUrlWindow))return X.A(0);a.o.qb(e,"timeupdate",T);return X.h(a.preload(a.j.nextUrl),4)}a.Eb=X.j;X.l()})},
a.o.J(e,"timeupdate",T)),a.o.J(e,"ended",function(){a.load(a.Eb||a.j.nextUrl)})));if(a.D)a.D.onManifestUpdated(O);R.l()}})}
function tA(a,b,c){c=c===void 0?!1:c;var d,e,f;return H(function(g){switch(g.i){case 1:if(!c||!a.V){g.A(2);break}a.u=a.V;a.V=null;a.td=null;a.u.O=!0;return g.h(a.u.xb(a.i),3);case 3:return g.return();case 2:return d=Date.now()/1E3,e=!0,a.u=a.ye({dd:a.M,onError:function(h){mA(a,h)},pi:function(){},onExpirationUpdated:function(){var h=gA("expirationupdated");a.dispatchEvent(h)},onEvent:function(h){a.dispatchEvent(h);if(h.type=="drmsessionupdate"&&e){e=!1;h=a.C;var k=Date.now()/1E3-d;k>=0&&(h.o=k)}}}),
a.u.configure(a.h.drm),f=Xf([b]),a.u.O=!0,g.h(jl(a.u,[f],[]),4);case 4:return g.h(a.u.xb(a.i),0)}})}
function xA(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U;return H(function(Q){switch(Q.i){case 1:iA(a,"src-equals");d=a.i;a.G=new Ms(d);e=!1;a.sd.push(function(){e=!0});a.dispatchEvent(gA("canupdatestarttime"));a.T!=null&&a.G.qf(a.T);a.Db=fB(a,a.T||0);HA(a,d);ZA(a,d,!0);d.textTracks&&(FA(a),f=function(M){if(!(a.F instanceof Vw)){var O=gB(a).find(function(V){return V.mode!=="disabled"});O&&(O.mode=M?"showing":"hidden")}},a.o.J(d,"enterpictureinpicture",function(){return f(!0)}),
a.o.J(d,"leavepictureinpicture",function(){return f(!1)}),g=ob(),(h=Uj(g,d))?a.o.Lb(h,["connect","connecting","disconnect"],function(){f(!1)}):"webkitCurrentPlaybackTargetIsWireless"in d&&a.o.J(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return f(!1)}),k=d,(k.webkitPresentationMode||k.webkitSupportsFullscreen)&&a.o.J(k,"webkitpresentationmodechanged",function(){k.webkitPresentationMode?f(k.webkitPresentationMode!=="inline"):k.webkitSupportsFullscreen&&f(k.webkitDisplayingFullscreen)}));
IA(a,d,b);l=tz(a.K,a.ba,c);if(!(a.Y&&a.h.streaming.processSrcEqualMetadata&&bi(a.Y))){Q.A(2);break}n=!1;p=a.h.streaming.retryParameters;u=Ok([l],p);q=a.M.request(0,u);Ak(a.ph,q);v=function(M){M.request===u&&(M=M.headers,!M["content-length"]||M["icy-br"]||M["icy-description"]||M["icy-genre"]||M["icy-name"]||M["icy-url"])&&(n=!0,q.abort())};a.addEventListener("downloadheadersreceived",v);Q.o(3,4);return Q.h(q.promise,6);case 6:w=Q.j,m=yb(w.data),x=new Blob([w.data],{type:a.Y}),l=URL.createObjectURL(x),
a.ke=l;case 4:Q.F();a.removeEventListener("downloadheadersreceived",v);Q.G(2);break;case 3:y=Q.m();if(!n)throw y;Q.A(4);break;case 2:!l.includes("#t=")&&(a.h.playRangeStart>0||isFinite(a.h.playRangeEnd))&&(l+="#t=",a.h.playRangeStart>0&&(l+=a.h.playRangeStart),isFinite(a.h.playRangeEnd)&&(l+=","+a.h.playRangeEnd));if(!a.H){Q.A(7);break}return Q.h(a.H.destroy(),8);case 8:a.H=null;case 7:return Nj(d),d.src=l,z=ob(),z.Ka()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&Fe(c)&&z.Ea()==="WEBKIT"&&d.load(),
a.m=NA,a.ra.h.length!=0&&(Wa("Skip ranges are not supported for src= playback; ignoring"),a.ra.h=[]),a.dispatchEvent(gA("streaming")),C=function(){return new Promise(function(M){var O=new $e(M);a.o.J(d.textTracks,"change",function(){return O.ea(.5)});O.ea(.5)})},B=Promise.withResolvers(),Ds(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){return H(function(M){if(M.i==1)return a.G.ready(),a.Y&&Fe(a.Y)?M.h(C(),3):(B.resolve(),M.A(0));B.resolve();M.l()})}),Ds(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,
function(){var M,O,V,ea,ha;return H(function(I){if(I.i==1)return I.h(C(),2);if(e)return I.return();hB(a);M=gB(a);M.some(function(T){return T.mode==="showing"})&&(a.Oa=!0,a.F.setTextVisibility(!0));if(!(a.F instanceof Vw))for(O=!1,V=t(M),ea=V.next();!ea.done;ea=V.next())ha=ea.value,ha.mode!=="disabled"&&(O?(ha.mode="disabled",Wa("Found more than one enabled text track, disabling it",ha)):(iB(a,ha),O=!0));jB(a);I.l()})}),d.error?B.reject(lA(a)):d.preload=="none"&&(Wa('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.'),
B.resolve()),a.o.Ra(d,"error",function(){B.reject(lA(a))}),Q.h(df(a.h.streaming.loadTimeout,B.promise),9);case 9:if((A=a.oa())&&(a.h.streaming.liveSync&&a.h.streaming.liveSync.enabled||a.h.streaming.liveSync.panicMode)||a.h.streaming.vodDynamicPlaybackRate)D=function(){return dB(a)},a.o.J(d,"timeupdate",D);A||(F=function(){return eB(a)},a.o.J(d,"timeupdate",F),eB(a));a.D&&(a.D.onManifestUpdated(A),A&&(E=a.Za().end,a.o.J(d,"progress",function(){var M=a.Za().end;E!=M&&(a.D.onManifestUpdated(a.oa()),
E=M)})));if(a.Y&&m&&(G=$h(m,a.Y),G.length))for(J=a.i.duration,N=t(G),P=N.next();!P.done;P=N.next())U=P.value,BA(a,0,J,"org.id3",U);return Q.h(WA(a),10);case 10:a.sa=!0,Q.l()}})}function hB(a){var b=a.h.preferredAudio;if(b.length&&a.i&&a.i.audioTracks){var c=a.lc();b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.language&&(d=Rf(c,d.language,d.role,!1)[0])){a.Vg(d);break}}}
function jB(a){var b=a.rb();if(!b.some(function(d){return d.active})){var c=Tf(b,a.h.preferredText);if(c.length)a.Jc(c[0]);else{if(a.i&&a.i.audioTracks&&a.h.accessibility.handleForcedSubtitlesAutomatically&&(c=Array.from(a.i.audioTracks).find(function(d){return d.enabled}))&&(c=Rf(b,c.language,"",!0),c.length)){a.Jc(c[0]);return}a.Jc(null)}}}
function OA(a,b){if(b.kind=="metadata"){b.mode="hidden";var c=function(){if(b.cues){for(var e=[],f=t(b.cues),g=f.next(),h={};!g.done;h={Qb:void 0},g=f.next())h.Qb=g.value,h.Qb.startTime!=null&&"type"in h.Qb&&(g=e.find(function(k){return function(l){return l.startTime==k.Qb.startTime&&l.endTime==k.Qb.endTime}}(h)),g||(g={type:h.Qb.type,startTime:h.Qb.startTime,endTime:h.Qb.endTime,values:[]},e.push(g)),g.values.push(h.Qb.value));e=t(e);for(f=e.next();!f.done;f=e.next())f=f.value,a.D&&(f.values.some(function(k){return k.key==
"X-ASSET-URI"||k.key=="X-ASSET-LIST"})&&(h=f.startTime==0&&!a.oa(),f.values.push({key:"CUE",description:"",data:h?"ONCE,PRE":"ONCE",mimeType:null,pictureType:null})),a.D.onHLSMetadata(f))}};a.o.J(b,"cuechange",function(){if(b.activeCues)for(var e=t(b.activeCues),f=e.next();!f.done;f=e.next())if(f=f.value,BA(a,f.startTime,f.endTime,f.type,f.value),a.D)a.D.onCueMetadataChange(f.value);c()});c();var d=(new $e(function(){var e=kB(a);e=t(e);for(var f=e.next();!f.done;f=e.next())f.value.mode="hidden"})).hb().ea(.5);
a.sd.push(function(){d.stop()})}}function sA(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(gA(c,b))}function BA(a,b,c,d,e){a.Ca&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),jt(a.Ca,b))}function PA(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new $e(function(){b.mode="hidden"})).hb().ea(.5);a.sd.push(function(){c.stop()})}}
r.Vk=function(){for(var a=this.va;a.h;)a.release()};r.ye=function(a){return new el(a)};
function Zz(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?ev(b(),!0,f):f()}b||(b=function(){return null});var e=new Jk(function(f,g,h,k,l){d(function(){a.B&&a.B.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(gA("downloadheadersreceived",g));d(function(){if(a.Ma){var k=a.Ma;if(k.i.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var p=n[l].split("=");
m.set(p[0],Rz(p[1]))}}catch(x){}if(m=f["cmsd-dynamic"]){a:{try{var u=new Map,q=m.split(";");for(m=1;m<q.length;m++){var v=q[m].split("=");u.set(v[0],Rz(v[1]))}var w=u;break a}catch(x){w=null;break a}w=void 0}w&&(k.h=w)}}}})},function(f,g,h,k){f=(new Map).set("requestType",f).set("request",g).set("context",h).set("response",k);c(gA("downloadcompleted",f))},function(f,g,h,k,l,m){f=(new Map).set("requestType",f).set("request",g).set("context",h).set("error",k).set("httpResponseCode",l).set("aborted",
m);c(gA("downloadfailed",f))},function(f,g,h){d(function(){if(a.K){var k=a.K,l=h;l=l===void 0?{}:l;if(f==0&&l.type){a:{switch(l.type){case 4:var m="d";break a;case 3:case 2:m="h";break a}m=void 0}m&&m!==k.B&&(k.B=m,k.h&&ez(k.h,{sf:m,st:k.i.isLive()?"l":"v"}))}if(k.h){f==Uk&&(k.u.has(g)&&k.u.delete(g),k.u.set(g,Date.now()));m=l;var n=Lz(f,m);if(n&&uz(k,n)&&Dz(k,f,g,m))if(g.method==="HEAD")Cz(k,g,{});else switch(f){case 0:Cz(k,g,{ot:"m",su:k.o===null});break;case Uk:var p=l,u=g.uris[0];m=p.segment;
l=0;m&&(l=m.endTime-m.startTime);l={d:l*1E3,st:k.i.isLive()?"l":"v"};l.ot=Hz(p);n=l.ot==="v"||l.ot==="a"||l.ot==="av"||l.ot==="tt";if(p=p.stream){var q=k.i.Ha();if(n){var v=Iz(k,p.type);Number.isFinite(v)&&(l.bl=v);l.ot!=="tt"&&(v=Jz(k,p.type),l.dl=q?v/Math.abs(q):v)}p.bandwidth&&(l.br=p.bandwidth/1E3);p.segmentIndex&&m&&((q=p.segmentIndex.ob(m.endTime,!0,q<0))&&(q=q.next().value)&&q!=m&&(u&&!gb(m.S(),q.S())&&(l.nor=q.S()[0]),!q.startByte&&!q.endByte||m.startByte==q.startByte&&m.endByte==q.endByte||
(u=q.startByte+"-",q.endByte&&(u+=q.endByte),l.nrr=u)),u=k.i.Ha()||1,q=Jz(k,p.type)||500,m=(p=p.bandwidth)?p*(m.endTime-m.startTime)/1E3/(q/u/1E3)*k.j.rtpSafetyFactor:NaN,Number.isFinite(m)&&(l.rtp=m))}n&&l.ot!=="tt"&&(m=Kz(k,l.ot)/1E3,Number.isFinite(m)&&(l.tb=m));k.i.isLive()&&(m=k.i.fg())&&(l.ltc=m);l.su=k.o===null||k.o==="r";Cz(k,g,l);break;case 2:case 5:case 6:Cz(k,g,{ot:"k"});break;case 4:Cz(k,g,{ot:"o"});break;case 8:case 13:Cz(k,g,{ot:"o"})}}}})},function(f,g,h,k){(f=b()?b().o:a.I)&&f.banLocation&&
f.banLocation(k)},function(f,g){if(g.data){var h=g.data.byteLength,k=b()?b().getStats():a.C;k&&(bv(k,h),f===0&&(k.bi=h));h=a.K;if(h.h&&f===Uk&&(f=h.u.get(g.originalRequest),h.u.delete(g.originalRequest),Gz(h)))try{var l=Qy(g.originalUri||g.uri);k={url:l};g.status!=null&&(k.rc=g.status);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(k.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(k.ttlb=g.timeMs);f!=null&&(k.ts=f);g.headers&&g.headers["CMSD-Static"]&&(k.cmsds=btoa(g.headers["CMSD-Static"]));
g.headers&&g.headers["CMSD-Dynamic"]&&(k.cmsdd=btoa(g.headers["CMSD-Dynamic"]));var m=h.h,n={request:{url:l},status:g.status||0};g=k||{};var p=n.request||{},u=n.status,q=n.resourceTiming||null,v=g.url!=null?g.url:p.url;if(v){var w={url:Qy(v),rc:u};q&&(q.startTime!=null&&(w.ts=Math.round(m.B+q.startTime),q.responseStart!=null&&(w.ttfb=Math.round(q.responseStart-q.startTime))),q.duration!=null&&(w.ttlb=Math.round(q.duration)));var x=p.customData||{};gz(m,"rr",Object.assign({},x.cmcd!=null?x.cmcd:{},
w,g))}}catch(y){Xa("CMCD_RESPONSE_ERROR","Could not apply CMCD data to response.",y)}}});e.configure(a.h.networking);return e}function XA(a,b){return new Ps(a.i,a.j,a.h.streaming,b,function(){a.Db&&Cm(a.Db,!a.G.nh());a.l&&a.l.Ic();a.$&&lB(a,"seeking")},function(c){return a.dispatchEvent(c)},function(){return a.Ha()},function(){return a.ra.h})}
function YA(a,b){var c=a.oa()||typeof b==="number"&&b>0,d=null;a.oa()||(b==null?d=0:typeof b==="number"&&b>=0&&(d=b));b=new Cv(a.$b,c,d);b.addEventListener("enter",function(h){h=h.region;CA(a,"timelineregionenter",h);mB(a,h)});b.addEventListener("exit",function(h){CA(a,"timelineregionexit",h.region)});b.addEventListener("skip",function(h){var k=h.region;h.seeking||(CA(a,"timelineregionenter",k),CA(a,"timelineregionexit",k))});var e=new Cv(a.Ca,c,d);e.addEventListener("enter",function(h){sA(a,h.region,
"metadata")});var f=new Cv(a.eb,c,d);f.addEventListener("enter",function(h){h=(new Map).set("detail",h.region.emsg);a.dispatchEvent(gA("emsg",h))});c=new Cv(a.Ya,c,d);c.addEventListener("enter",function(h){a.dispatchEvent(gA("scte35enter",(new Map).set("detail",h.region)))});c.addEventListener("exit",function(h){a.dispatchEvent(gA("scte35exit",(new Map).set("detail",h.region)))});d=new Bv(a.j.presentationTimeline);d.addEventListener("change",function(h){a.dispatchEvent(gA("timelinechange",new Map([["programDateTime",
h.programDateTime],["timestamp",h.timestamp]])))});var g=new Bm(a.i);g.h.add(b);g.h.add(e);g.h.add(f);g.h.add(c);g.h.add(d);a.qd&&g.h.add(a.qd);return g}function fB(a,b){b=new Cv(a.Ca,b instanceof Date||b>0);b.addEventListener("enter",function(d){sA(a,d.region,"metadata")});var c=new Bm(a.i);c.h.add(b);return c}
function ZA(a,b,c){a.$=new Kp;Np(a.$,Mp);nB(a);oA(a);a.$a=new $e(function(){lB(a)});a.h.streaming.rebufferingGoal&&a.$a.La(.25);a.o.J(b,"waiting",function(){return lB(a,"waiting")});a.o.J(b,"canplaythrough",function(){return lB(a,"canplaythrough")});a.o.J(b,"playing",function(){return lB(a,"playing")});a.o.J(b,"seeked",function(){return lB(a,"seeked")});a.o.J(b,"timeupdate",function(){return lB(a,"timeupdate")});c&&(a.o.J(b,"progress",function(){return lB(a,"progress")}),a.o.J(b,"stalled",function(){return lB(a,
"stalled")}))}function nB(a){var b=a.h.streaming.rebufferingGoal;a.$.l.set(Lp,Math.min(.5,b/2)).set(Mp,b)}
function lB(a,b){if(a.h.streaming.rebufferingGoal){b=a.H?Jr(a.H):!1;b=a.Kd()||b||a.G.Vh();var c=a.Ha()<0?dr(a.i.buffered,a.i.currentTime):br(a.i.buffered,a.i.currentTime),d=a.$,e=d.l.get(d.h);Np(d,b||c>=e&&c>0?Lp:Mp)&&oA(a)}else if(b){c=a.$;d=a.i.currentTime;e=c.i;c.i=d;var f=void 0;switch(b){case "seeking":case "waiting":c.i=-1;f=Mp;break;case "canplaythrough":case "playing":case "seeked":f=Lp;break;case "timeupdate":e>=0&&d-e>.01&&(f=Lp)}f!==void 0&&Np(c,f)&&oA(a)}}
function GA(a,b,c,d,e){return new Cr(a,b,c,e,d)}function uA(a,b){b=b===void 0?a.j:b;a.K&&(b=b?b.serviceDescription:null,a=a.K,a.F=b?b.clientDataReporting:null,oz(a))}
function Xz(a){return new yt({wi:function(){var b;if((b=a.l)!=null)for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.ya||d.Xa||St(b,d,0)},Ha:function(){return a.Ha()},wk:function(b,c){var d,e;if((d=a.l)==null)b=void 0;else a:{var f=d.h.U;d=t(d.i.values());for(var g=d.next();!g.done;g=d.next()){g=g.value;var h=g.stream.segmentIndex;if(h&&(h=h.ob(b)))for(var k=h.next().value;k&&k.startTime<c;){k=(k.startTime+k.endTime)/2;if(k>=b&&k<c&&Tr(f,g.type,k)){b=!0;break a}k=h.next().value}}b=
!1}return(e=b)!=null?e:!1}})}
function TA(a){return new Gt(a.j,{Jb:function(){return a.G?a.G.vd():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},Ha:function(){return a.Ha()},video:a.i,U:a.H,dd:a.M,onError:function(b){return mA(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ed:function(b,c,d,e,f){var g=b.startTime,h=b.endTime,k=c.type;if(k!=zc){if(a.G){a.G.ni();var l=Qr(a.H,k),m;if(m=!a.oa()&&a.i.paused&&!a.i.seeking)m=a.H,m=!(m.K||m.Pa);m&&l!=null&&l>0&&a.G.vd()<l&&!Br(a.G.vd(),l,.001)&&a.G.qf(l)}lB(a)}d=
(new Map).set("start",g).set("end",h).set("contentType",k).set("isMuxed",d).set("isDependency",e).set("mediaTimestamp",f);a.dispatchEvent(gA("segmentappended",d));a.B&&c.fastSwitching&&b.Fc&&b.Md&&a.B.trySuggestStreams()},Mk:function(b,c){(c=c.bd)&&a.qd&&Fm(a.qd,c,b)},Ah:function(b,c){var d=a.u;if(d.i.parseInbandPsshEnabled&&!d.I&&["audio","video"].includes(b)){b=new dl(yb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);
e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;sl(d,"cenc",c);d=d.m.promise}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},vl:function(b,c){return a.h.abr.enabled&&c.fastSwitching&&b.Fc&&b.Md?!1:!0},Le:function(){return a.keySystem()}},a.ra)}
r.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Fu(a,b));a.manifest&&a.manifest.dash&&"disableXlinkProcessing"in a.manifest.dash&&(Hj("manifest.dash.disableXlinkProcessing configuration","It is now automatically detected if the manifest has Xlink."),delete a.manifest.dash.disableXlinkProcessing);a.manifest&&a.manifest.msf&&"useFetchCatalog"in a.manifest.msf&&(Hj("manifest.msf.useFetchCatalog configuration","MSF requires the catalog to be retrieved with a SUBSCRIBE that joins the current Group, so it is always subscribed to."),
delete a.manifest.msf.useFetchCatalog);a.manifest&&a.manifest.msf&&"subscribeFilterType"in a.manifest.msf&&(Hj("manifest.msf.subscribeFilterType configuration","A subscription at the live edge now always joins the current Group from its first Object."),delete a.manifest.msf.subscribeFilterType);a.textDisplayer&&"captionsUpdatePeriod"in a.textDisplayer&&(Hj("textDisplayer.captionsUpdatePeriod configuration","Captions are now updated based on the cue timings, so this configuration is no longer needed."),
delete a.textDisplayer.captionsUpdatePeriod);oB(a);var d=Ou(this.h,a,Yz(this));pB(this,c);return d};r.pj=function(a){this.vf=a};
function pB(a,b){a.be=new nr(a.h,a.Pa,a.u);if(a.I){var c=nd(a.h.manifest);a.i&&a.i.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.u&&a.u.configure(a.h.drm);if(a.l){a.l.configure(a.h.streaming);try{a.m!=hA&&pr(a.be,a.j)&&MA(a)}catch(e){mA(a,e)}a.B&&QA(a);c=a.l.u;!c||c.allowedByApplication&&c.allowedByKeySystem||dA(a)}a.M&&a.M.configure(a.h.networking);a.H&&(a.H.configure(a.h.mediaSource),a.H.Ga=a.h.manifest.segmentRelativeVttTiming);a.F&&FA(a);a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?
a.B.enable():a.B.disable(),cB(a));a.$&&nB(a);a.$a&&(a.h.streaming.rebufferingGoal?a.$a.La(.25):a.$a.stop());a.j&&RA(a.j.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.D&&a.D.configure(a.h.ads);a.K&&a.K.configure(a.h.cmcd);a.Ma&&a.Ma.configure(a.h.cmsd);a.Qa&&a.Qa.configure(a.h.queue);c=a.m==UA||a.m==NA;a.h.accessibility.speechToText.enabled?a.L?a.L.configure(a.h.accessibility.speechToText):(a.L=new fx(a),a.L.configure(a.h.accessibility.speechToText),c&&LA(a)):a.L&&(a.L.release(),a.L=
null,c&&LA(a));if(a.m==UA&&a.O.getConfiguration){c=a.O.getConfiguration();var d=!1;pd(b.preferredVideo)!=pd(a.h.preferredVideo)&&(c.preferredVideo=a.h.preferredVideo,d=!0);pd(b.preferredAudio)!=pd(a.h.preferredAudio)&&(c.preferredAudio=a.h.preferredAudio,d=!0);d?(Pu(c),a.O.configure(c),dA(a)):!b.abr.enabled&&a.h.abr.enabled&&(c.preferredVideo=a.h.preferredVideo,Pu(c),a.O.configure(c),a.j&&a.B&&QA(a))}b=gA("configurationchanged");a.dispatchEvent(b)}
r.getConfiguration=function(){var a=Yz(this);Ou(a,this.h,Yz(this));return a};r.Kj=function(){return this.vf};r.Vj=function(){var a=Yz(this);Ou(a,this.h,Yz(this));return Hu(this.h,Yz(this))};r.Lh=function(){if(this.i){var a=this.i.buffered.length;a=a?this.i.buffered.end(a-1):0;var b=Math.min(this.i.currentTime+this.h.streaming.bufferingGoal,this.Za().end);if(a>=b)return 1;if(!(a<=this.i.currentTime)&&a<b)return(a-this.i.currentTime)/(b-this.i.currentTime)}return 0};
r.Xk=function(){var a=this.getConfiguration(),b;for(b in this.h)delete this.h[b];Ou(this.h,Yz(this),Yz(this));pB(this,a)};r.gg=function(){return this.m};r.Nh=function(){return this.j?this.j.type:null};r.Xc=function(){return this.i};r.Uj=function(){return this.M};r.Je=function(){return this.ba};r.ig=function(){return this.Y};r.Dj=function(){var a;return Array.from(((a=this.Ca)==null?void 0:a.h.values())||[])};r.Cj=function(){var a;return Array.from(((a=this.eb)==null?void 0:a.h.values())||[])};
r.Ej=function(){var a;return Array.from(((a=this.Ya)==null?void 0:a.h.values())||[])};r.Gj=function(){var a;return Array.from(((a=this.$b)==null?void 0:a.h.values())||[])};r.Bj=function(){return this.D?this.D:null};r.$j=function(){return this.Qa?this.Qa:null};r.isLive=function(){return this.j&&!this.Ba()?this.j.presentationTimeline.isLive():this.i&&(this.i.src||this.Ba())?this.i.duration==Infinity:!1};r.ad=function(){return this.j?this.j.presentationTimeline.ad():!1};
r.oa=function(){return this.isLive()||this.ad()};r.Uh=function(){if(this.j&&!this.Ba()){var a=this.j.variants;return a.length?a.every(function(b){return!b.video}):!1}return this.i&&(this.i.src||this.Ba())?this.i.videoTracks?this.i.videoTracks.length==0:this.i.videoHeight==0:!1};
r.Zh=function(){if(this.j&&!this.Ba()){var a=this.j.variants;return a.length?a.every(function(b){return!b.audio&&!!b.video&&!b.video.codecs.includes(",")}):!1}return this.i&&(this.i.src||this.Ba())&&this.i.audioTracks?this.i.audioTracks.length==0:!1};
r.Za=function(){if(this.j&&!this.Ba()){if(!this.sa&&this.j.type=="HLS")return{start:0,end:0};var a=this.j.presentationTimeline;return{start:a.Ab(),end:a.pb()}}if(this.i&&(this.i.src||this.Ba())&&(a=this.i.seekable)&&a.length){var b=this.h?this.h.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.h?this.h.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};r.kk=function(){this.oa()&&(this.i.currentTime=this.Za().end)};r.qk=function(){return this.sa};
r.keySystem=function(){return Zb(this.drmInfo())};r.drmInfo=function(){return this.u?this.u.Tb():null};r.eg=function(){return this.u?this.u.eg():Infinity};r.dg=function(){return this.u?this.u.dg():[]};r.Og=function(a){this.u&&this.u.Og(a)};r.Sg=function(a,b){var c=this,d;return H(function(e){return e.i==1?c.u?e.h(c.u.Sg(a,b),3):e.A(2):e.i!=2?(d=e.j,e.return(d)):e.return(!1)})};r.Ke=function(){return this.u?this.u.Ke():{}};r.Wh=function(){return this.$?this.$.h==Mp:!!this.ba};
r.Ha=function(){return this.i?this.N?this.N.i:1:0};r.jh=function(a){this.m==UA&&this.l&&Ut(this.l,a)};r.uh=function(a,b){if(this.m==NA)return Wa("addSkipRange() is not supported for src= playback; ignoring"),!1;var c;if(c=this.j)c=this.j.sequenceMode||this.j.presentationTimeline.oa()?!1:!0,c=!c;return c?!1:this.ra.add(a,b)};r.Wk=function(a,b){this.ra.remove(a,b)};r.mj=function(){this.ra.h=[]};r.dk=function(){return this.ra.h.map(function(a){return{start:a.start,end:a.end}})};
r.Zd=function(a,b){b=b===void 0?!0:b;if(a==0)Wa("A trick play rate of 0 is unsupported!");else{var c=this.i.playbackRate,d=this.N.i;this.N.set(a);this.m==UA&&(this.B.playbackRateChanged(a),this.jh(b&&a!=1));qB(this,a);c===0&&this.i.playbackRate===0&&a!=d&&KA(this)}};r.yd=function(){var a=this.N.Wc();this.m==NA&&this.N.set(a);this.m==UA&&(this.N.set(a),this.B.playbackRateChanged(a),this.jh(!1));this.Ob.Ta()};
r.lc=function(){if(this.j&&!this.Ba()){for(var a=this.l?this.l.u:null,b=[],c=0,d=t(this.j.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Nf(e)){var f=Ef(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.i&&this.i.audioTracks){var g=rB(this);a=Array.from(this.i.audioTracks);return a.length?a.map(function(h){return Mf(h,g)}):g?[Mf(null,g)]:[]}return[]};
r.rb=function(){if(this.j){if(this.Ba())return[];for(var a=this.l?this.l.F:null,b=[],c=t(this.j.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ff(d);e.active=d==a;b.push(e)}this.L&&b.push.apply(b,wa(this.L.rb()));return b}if(this.i&&this.i.src&&this.i.textTracks){a=gB(this);var f=this.F.isTextVisible();a=a.map(function(g){return Lf(g,f)});this.L&&a.push.apply(a,wa(this.L.rb()));return a}return[]};r.Pj=function(){var a=this.ge;this.j&&(a=this.j.imageStreams);return a.map(function(b){return Gf(b)})};
r.Fj=function(a){var b=this,c,d;return H(function(e){if(e.i==1)return e.h(sB(b,a),2);c=e.j;if(!c)return e.return(null);d=[];c.segmentIndex.Sb(function(f){var g=tB(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=(f.l-f.startTime)/h,l=0;l<h;l++){var m=uB(f,c,f.startTime+l*k,g);if(!m)break;d.push(m)}});return e.return(d)})};function tB(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
r.gk=function(a,b){var c=this,d,e,f,g;return H(function(h){if(h.i==1)return h.h(sB(c,a),2);d=h.j;if(!d)return h.return(null);e=d.segmentIndex.find(b);if(e==null)return h.return(null);f=d.segmentIndex.get(e);return(g=tB(f.tilesLayout||d.tilesLayout))?h.return(uB(f,d,b,g)):h.return(null)})};
function sB(a,b){var c,d,e;return H(function(f){if(f.i==1){if(a.m!=UA&&a.m!=NA)return f.return(null);c=a.ge;a.j&&(c=a.j.imageStreams);d=c[0];if(!d)return f.return(null);b!=null&&(d=c.find(function(g){return g.id==b}));return d?d.segmentIndex?f.A(2):f.h(d.createSegmentIndex(),2):f.return(null)}d.closeSegmentIndex&&(a.Yb.has(d)||(e=new $e(function(){d&&(d.closeSegmentIndex(),a.Yb.delete(d))}),a.Yb.set(d,e)),a.Yb.get(d).ea(5));return f.return(d)})}
function uB(a,b,c,d){var e=a.S();if(!e.length)return null;var f=b.width||0,g=b.height||0,h=f/d.columns,k=g/d.rows,l=d.columns*d.rows,m=a.l-a.startTime;m=a.C||m/l;var n=a.startTime,p=0,u=0;l>1&&(u=Math.floor((c-a.startTime)/m+1E-4),n=a.startTime+u*m,p=u%d.columns*h,u=Math.floor(u/d.columns)*k);if(n>=a.endTime||Br(n,a.endTime,1E-4))return null;d=!1;if(c=a.thumbnailSprite)d=!0,k=c.height,p=c.positionX,u=c.positionY,h=c.width;return{segment:a,imageHeight:g,imageWidth:f,height:k,positionX:p,positionY:u,
startTime:n,duration:m,uris:e,startByte:a.kc(),endByte:a.hc(),width:h,sprite:d,mimeType:a.mimeType||b.mimeType,codecs:a.codecs||b.codecs}}
r.Jc=function(a){var b=this,c=!1;this.L&&a&&(c=this.L.rb().includes(a));this.L&&!c&&this.L.disable();if(!a||c)this.L&&c&&a&&this.L.enable(a),LA(this),vB(this,!1);else{c=function(){var d=b.j.textStreams.find(function(e){return e.id==a.id});d?d!=b.l.F&&(Uu(b.C.l,d,!1),Xt(b.l,d),LA(b),bB(b),vB(b,!0)):b.Ba()};if(this.j&&this.G&&(c(),!this.Ba()))return;(function(){if(b.i&&b.i.textTracks){var d=gB(b),e=d.find(function(h){return Jf(h)===a.id});if(e){if(b.F instanceof Vw){d=t(d);for(var f=d.next();!f.done;f=
d.next()){f=f.value;var g=f===e?b.Oa?"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",b.o.qb(d,"cuechange"),b.F.remove(0,Infinity)),e&&iB(b,e));LA(b);bB(b);vB(b,!0)}}})()}};
function iB(a,b){a.o.J(b,"cuechange",function(){a.F.remove(0,Math.max(0,a.i.currentTime-a.h.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.i.duration,vttOffset:0,isMpegTs:!1},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new Ld(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?
Qd: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=bd,g.region.width=f.region.width,g.region.widthUnits=bd);Xd(g);f=g}f&&((g=a.h.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.F.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
r.Vg=function(a,b,c){function d(){var f=e.j.variants.find(function(h){return h.id==a.id});if(f){if(Nf(f)){var g=e.l.u;e.h.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)&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.Ba()?SA(e,f,!1,!1,0):SA(e,f,!1,b||!1,c||0);f=
{preferredAudio:[{language:f.language||"",role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",label:f.audio&&f.audio.label||"",channelCount:f.audio&&f.audio.channelsCount||0,codec:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1}],preferredVideo:[{label:f.video&&f.video.label||"",role:f.video&&f.video.roles&&f.video.roles[0]||"",language:f.video&&f.video.language||"",codec:f.video&&f.video.codecs||"",hdrLevel:f.video&&f.video.hdr||"",layout:f.video&&f.video.videoLayout||""}],language:"",
role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:e.h.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,keySystem:e.keySystem()};Pu(f);e.O.configure(f);QA(e)}}else e.Ba()}var e=this;b=b===void 0?
!1:b;c=c===void 0?0:c;if(this.j&&this.G&&(d(),!this.Ba()))return;(function(){if(a.originalAudioId&&e.i&&e.i.audioTracks){var f=Array.from(e.i.audioTracks);f=t(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,Jf(g)==a.id){wB(e,g);break}}})()};
r.cl=function(a,b){function c(){var f=e.O.getConfiguration();f.audioCodec=a.codecs||"";f.preferredAudio=[{language:a.language,role:a.roles[0]||"",label:a.label||"",channelCount:a.channelsCount||0,codec:"",spatialAudio:a.spatialAudio}];var g=e.l.u;if(g=g&&g.audio)f.activeAudioCodec=g.codecs||"",f.activeAudioChannelCount=g.channelsCount||0,d(g.language,a.language);Pu(f);e.O.configure(f);dA(e,!0,b,!1,!1)}function d(f,g){if(f!=g&&e.h.accessibility.handleForcedSubtitlesAutomatically){var h=e.rb(),k=h.find(function(m){return m.active}),
l=k?mc(k.language):null;f=mc(f);g=mc(g);if(!k||l==f&&l!=g&&k.forced)h=Rf(h,g,"",!0),h.length&&e.Jc(h[0])}}var e=this;b=b===void 0?0:b;if(this.j&&this.G&&(c(),!this.Ba()))return;(function(){if(e.i&&e.i.audioTracks){var f=mc(a.language),g=Array.from(e.i.audioTracks),h=null,k=null;a.id!=null&&(h=g.find(function(u){return Jf(u)===a.id}));g=t(g);for(var l=g.next();!l.done;l=g.next()){l=l.value;if(!h){var m=l.language||"und",n=l.kind||"",p=a.roles&&a.roles.length?a.roles[0]:"";(l.label||"")==(a.label||
"")&&mc(m)==f&&n==p&&(h=l)}l.enabled&&(k=l)}h&&(k&&d(k.language,h.language),wB(e,h))}})()};
r.getAudioTracks=function(){if(this.j&&!this.Ba()){var a=this.lc();if(!a.length)return[];var b=a.find(function(g){return g.active});if(!b)return[];var c=a;if(this.m==UA&&!this.Ba()){var d=xB(this),e=d.get(b.id);c=a.filter(function(g){var h=d.get(g.id);return!!h&&!!e&&Hp(h,e)&&(g.audioCodec||we.includes(g.audioMimeType||""))})}if(!c.length)return[];a=new Map;c=t(c);for(b=c.next();!b.done;b=c.next()){var f=b.value;b=[f.language,f.originalLanguage,f.label||"",(f.audioRoles||[]).join(","),f.channelsCount,
f.spatialAudio,f.audioCodec?Ae(f.audioCodec):"",f.accessibilityPurpose||""].join("_");f={active:f.active,language:f.language,label:f.label,mimeType:f.audioMimeType,codecs:f.audioCodec,primary:f.primary,roles:f.audioRoles||[],accessibilityPurpose:f.accessibilityPurpose,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,originalLanguage:f.originalLanguage};a.has(b)?!a.get(b).active&&f.active&&a.set(b,f):a.set(b,f)}return Array.from(a.values())}return this.i&&
this.i.audioTracks?Array.from(this.i.audioTracks).map(function(g){var h=g.language;h={id:Jf(g),active:g.enabled,language:mc(h||"und"),label:g.label,mimeType:null,codecs:null,primary:g.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:h};g.kind&&(g.kind=="description"&&(h.accessibilityPurpose="visually impaired"),h.roles.push(g.kind));g.configuration&&(g.configuration.codec&&(h.codecs=g.configuration.codec),g.configuration.sampleRate&&
(h.audioSamplingRate=g.configuration.sampleRate),g.configuration.numberOfChannels&&(h.channelsCount=g.configuration.numberOfChannels));return h}):[]};
r.fl=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.lc();if(d.length){var e=d.find(function(k){return k.active});if(e){d=d.filter(function(k){return(k.videoBandwidth||k.bandwidth)==a.bandwidth&&k.width==a.width&&k.height==a.height&&k.frameRate==a.frameRate&&k.pixelAspectRatio==a.pixelAspectRatio&&k.hdr==a.hdr&&k.colorGamut==a.colorGamut&&k.videoLayout==a.videoLayout&&k.videoMimeType==a.mimeType&&k.videoCodec==a.codecs&&gb(k.videoRoles,a.roles)&&(k.videoLanguage||"und")==(a.language||
"und")&&k.videoLabel==a.label});var f;d.length==1?f=d[0]:f=d.find(function(k){return k.audioId===e.audioId});if(!f&&this.j){var g=xB(this),h=g.get(e.id);f=d.find(function(k){k=g.get(k.id);return!!k&&!!h&&Gp(k,h)})}f&&!f.active&&this.Vg(f,b,c)}}};function xB(a){var b=new Map;a=t(a.j.variants);for(var c=a.next();!c.done;c=a.next())c=c.value,Nf(c)&&b.set(c.id,c);return b}
r.getVideoTracks=function(){if(this.m==NA||this.Ba())return[];var a=this.lc();if(!a.length)return[];var b=a.find(function(h){return h.active});if(!b)return[];var c=a;if(!this.Zh()&&this.j){c=xB(this);var d=c.get(b.id);b=[];d&&(b=Array.from(c.values()).filter(function(h){return!!h.video&&Gp(h,d)}));var e=new Set(b.map(function(h){return h.id}));c=a.filter(function(h){return h.active||e.has(h.id)})}if(!c.length)return[];a=new Map;b=t(c);for(c=b.next();!c.done;c=b.next()){var f=c.value;(c=f.originalVideoId)||
f.videoId==null||(c=String(f.videoId));if(c){f={active:f.active,language:f.videoLanguage||"und",bandwidth:f.videoBandwidth||f.bandwidth,width:f.width,height:f.height,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,colorGamut:f.colorGamut,videoLayout:f.videoLayout,mimeType:f.videoMimeType,codecs:f.videoCodec,roles:f.videoRoles||[],label:f.videoLabel};var g=a.get(c);(!g||!g.active&&f.active)&&a.set(c,f)}}return Array.from(a.values())};
r.Jj=function(){var a=this.fe;this.j&&(a=this.j.chapterStreams);a=a.map(function(c){return If(c)});var b=yB(this);b.length&&a.push.apply(a,wa(b.map(function(c){return{id:Jf(c),type:"chapter",bandwidth:0,language:mc(c.language||"und")}})));return a};
r.Ij=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,p,u,q;return H(function(v){switch(v.i){case 1:c=zB(b,a);if(c.length)return v.return(c);d=b.fe;b.j&&(d=b.j.chapterStreams);if(!d.length)return v.return([]);e=mc(a);f=d.filter(function(w){return mc(w.language)==e});if(!f.length)return v.return([]);g=[];h=new Set;k=t(f);l=k.next();m={};case 2:if(l.done){v.A(4);break}n=l.value;if(n.segmentIndex){v.A(5);break}return v.h(n.createSegmentIndex(),5);case 5:m.Bc=0;p=void 0;b.isLive()&&((p=b.j)==null?void 0:p.type)===
"HLS"&&(u=b.j.presentationTimeline,q=void 0,m.Bc=Math.max(0,(q=u.l)!=null?q:u.j));n.segmentIndex.Sb(function(w){return function(x){var y=x.getMetadata();if(y){var z=y.title,C=x.startTime+"-"+x.endTime+"-"+z;w.Bc>0&&x.endTime-w.Bc<0&&(w.Bc=0);x={id:C,title:z,startTime:Math.max(0,x.startTime-w.Bc),endTime:Math.max(0,x.endTime-w.Bc),images:y.images};h.has(C)||(g.push(x),h.add(C))}}}(m));m={Bc:void 0};l=k.next();v.A(2);break;case 4:return v.return(g)}})};
function zB(a,b){a=yB(a);if(!a.length)return[];var c=mc(b),d=a.filter(function(h){return mc(h.language)==c});if(!d||!d.length)return[];b=[];a=new Set;d=t(d);for(var e=d.next();!e.done;e=d.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&f!=""||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime,images:[]};a.has(f)||(b.push(g),a.add(f))}}return b}
function gB(a){return Array.from(a.i.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function kB(a){return Array.from(a.i.textTracks).filter(function(b){return b.kind=="metadata"})}function yB(a){return a.i&&a.i.textTracks?Array.from(a.i.textTracks).filter(function(b){return b.kind=="chapters"}):[]}
function vB(a,b){b=!!b;a.Oa!=b&&(a.Oa=b,a.m==UA?(a.F.setTextVisibility(b),b?a.l.F||(b=Tf(a.j.textStreams,a.h.preferredText),b.length>0&&(Xt(a.l,b[0]),LA(a),bB(a))):Tt(a.l)):a.i&&a.i.src&&a.i.textTracks&&a.F.setTextVisibility(b))}
r.Wj=function(){if(this.G)var a=this.G.vd();else{if(this.T==null)return new Date;if(this.T instanceof Date)return this.T;a=this.T}if(this.j&&!this.Ba()){var b=this.j.presentationTimeline,c=b.Qh(a);return c!=null?new Date(c*1E3):new Date((b.j+a)*1E3)}return this.i&&this.i.getStartDate?(b=this.i.getStartDate(),b instanceof Date&&!isNaN(b.getTime())?new Date(b.getTime()+a*1E3):null):null};
r.Ph=function(){if(this.j&&!this.Ba()){var a=this.j.presentationTimeline;a=a.l||a.j;return a===null?null:new Date(a*1E3)}return this.i&&this.i.getStartDate?(a=this.i.getStartDate(),a instanceof Date&&!isNaN(a.getTime())?a:null):null};r.Me=function(){return this.isLive()?this.j?this.j.presentationTimeline.Me():null:null};r.fc=function(){if(this.m==UA)return this.H.fc();var a={total:[],audio:[],video:[],text:[]};this.m==NA&&(a.total=cr(this.i.buffered));return a};
r.fg=function(){if(!this.i||!this.i.currentTime)return null;var a=this.Ph();return a?Math.floor(Date.now()-(a.getTime()+this.i.currentTime*1E3)):null};r.getBandwidthEstimate=function(){return this.B?this.B.getBandwidthEstimate():NaN};
r.getStats=function(){if(this.m!=UA&&this.m!=NA)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,timeToFirstFrame: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:[]};JA(this);var a=this.i,b=a.currentTime/a.duration;isNaN(b)||this.oa()||Yu(this.C,Math.round(100*b));this.G&&(this.C.Y=this.G.mh(),this.C.$=this.G.oh());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),Wu(this.C,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.C.O=Number(b.corruptedVideoFrames));Zu(this.C,this.u?Cl(this.u):NaN);Xu(this.C,a.videoWidth||NaN,a.videoHeight||NaN);this.C.m="";this.oa()&&(a=this.fg(),a!=null&&$u(this.C,
a/1E3));b=this.lc().find(function(e){return e.active});a=this.rb().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.N?this.N.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.C.D=d}b.width&&b.height&&Xu(this.C,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.C.m=b)}this.m!=UA||this.Ba()||(this.j&&(this.C.K=this.j.periodCount,this.C.I=this.j.gapCount,this.j.presentationTimeline&&av(this.C,this.j.presentationTimeline.i)),a=this.B.getBandwidthEstimate(),
this.C.C=a);this.m==NA&&bv(this.C,NaN);return cv(this.C)};
r.cj=function(a,b,c,d,e,f,g){var h=this;g=g===void 0?!1:g;var k=function(){var l,m,n,p,u,q,v,w,x,y,z,C;return H(function(B){switch(B.i){case 1:if(h.m!=UA&&h.m!=NA)throw new L(1,7,7004);c!="subtitles"&&c!="captions"&&Wa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");a=Dk(a);if(d){B.A(2);break}return B.h(AB(h,a),3);case 3:d=B.j;case 2:l=[];h.D&&(l=h.D.getCuePoints());if(h.m!=NA){B.A(4);break}m=ob();g&&m.Ea()==="WEBKIT"&&(c="forced");return B.h(BB(h,a,b,c,d,f||
"",l),5);case 5:n=B.j;if(n.track)return MA(h),LA(h),B.return(Lf(n.track,h.F.isTextVisible()));throw new L(1,2,2012);case 4:p=Bc;u=h.Za();q=u.end-u.start;h.j&&(q=h.j.presentationTimeline.getDuration());if(q==Infinity)throw new L(1,4,4033);if(!l.length){B.A(6);break}return B.h(CB(h,a),7);case 7:v=B.j,w=DB(h,v,d,l),x=new Blob([w],{type:"text/vtt"}),a=Fr(x),d="text/vtt";case 6:y=Wf({id:h.je++,segmentIndex:Lm(0,q,[a]),mimeType:d||"",codecs:e||"",kind:c,language:b,originalLanguage:b,label:f||null,type:p.Ua,
forced:!!g,external:!0});z=se(y.mimeType,y.codecs);C=Pe(z);if(!C)throw new L(2,2,2014,d);h.j.textStreams.push(y);MA(h);LA(h);return B.return(Ff(y))}})}();this.sa||EB(this,k);return k};
r.dj=function(a,b){var c=this,d=function(){var e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B;return H(function(A){switch(A.i){case 1:if(c.m!=UA&&c.m!=NA)throw new L(1,7,7004);a=Dk(a);if(b){A.A(2);break}return A.h(AB(c,a),3);case 3:b=A.j;case 2:if(b!="text/vtt")throw new L(1,2,2017,a);e=Bc;f=c.Za();g=f.end-f.start;c.j&&(g=c.j.presentationTimeline.getDuration());if(g==Infinity)throw new L(1,4,4045);return A.h(CB(c,a),4);case 4:h=A.j;k=Oe(b);if(!k)throw new L(2,2,2014,b);l=k();m={periodStart:0,segmentStart:0,
segmentEnd:g,vttOffset:0,isMpegTs:!1};n=yb(h);p=l.parseMedia(n,m,a,[]);u=[];q=t(p);v=q.next();for(w={};!v.done;w={mf:void 0,Uc:void 0},v=q.next())w.Uc=v.value,w.mf=null,x=function(D){return function(){D.mf==null&&(D.mf=Bk([a],[D.Uc.payload]));return D.mf||[]}}(w),y=new wm(w.Uc.startTime,w.Uc.endTime,x,0,null,null,0,0,Infinity),w.Uc.payload.includes("#xywh")&&(z=w.Uc.payload.split("#xywh=")[1].split(","),z.length===4&&y.Ki({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],
10),width:parseInt(z[2],10)})),u.push(y);C=b;if(!u.length){A.A(5);break}return A.h(AB(c,u[0].S()[0]),6);case 6:C=A.j;case 5:return B=Wf({id:c.je++,segmentIndex:new Jm(u),mimeType:C||"",kind:"",language:"und",type:e.$i,tilesLayout:"1x1",external:!0}),c.m==NA?c.ge.push(B):c.j.imageStreams.push(B),MA(c),A.return(Gf(B))}})}();this.sa||EB(this,d);return d};
r.bj=function(a,b,c){var d=this,e=function(){var f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C;return H(function(B){switch(B.i){case 1:if(d.m!=UA&&d.m!=NA)throw new L(1,7,7004);a=Dk(a);if(c){B.A(2);break}return B.h(AB(d,a),3);case 3:c=B.j;case 2:f=Bc;g=d.Za();h=g.end-g.start;d.j&&(h=d.j.presentationTimeline.getDuration());if(h==Infinity)throw new L(1,4,4055);k=Oe(c);if(!k)throw new L(2,2,2014,c);return B.h(CB(d,a),4);case 4:l=B.j;m=k();n={periodStart:0,segmentStart:0,segmentEnd:h,vttOffset:0,isMpegTs:!1};p=yb(l);
u=m.parseMedia(p,n,a,[]);q=[];v=t(u);for(w=v.next();!w.done;w=v.next())x=w.value,y=new wm(x.startTime,x.endTime,function(){return[]},0,null,null,0,0,Infinity),z={title:x.payload,images:[]},y.Wg(z),q.push(y);C=Wf({id:d.je++,segmentIndex:new Jm(q),mimeType:"text/plain",kind:"",language:b,originalLanguage:b,type:f.Yi,external:!0});d.m==UA?d.j.chapterStreams.push(C):d.fe.push(C);MA(d);return B.return(If(C))}})}();this.sa||EB(this,e);return e};
function AB(a,b){var c;return H(function(d){switch(d.i){case 1:return d.o(2),d.h(bn(b,a.M,a.h.streaming.retryParameters),4);case 4:c=d.j;d.u(3);break;case 2:d.m();case 3:if(c)return d.return(c);throw new L(1,2,2011,b);}})}
function BB(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(n.i==1)return e!="text/vtt"||g.length?n.h(CB(a,b),3):n.A(2);n.i!=2&&(h=n.j,k=DB(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fr(l),e="text/vtt");m=document.createElement("track");var p=a.K,u=b;if(p.h&&uz(p,"segment"))try{var q=vz(p);q.ot="c";q.su=!0;var v=kz(u,q,wz(p,u))}catch(w){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=u}else v=u;m.src=v;m.label=f;m.kind=d;m.srclang=c;a.i.getAttribute("crossorigin")||
a.i.setAttribute("crossorigin","anonymous");a.i.appendChild(m);a.uf.push(m);return n.return(m)})}function CB(a,b){var c,d,e,f;return H(function(g){if(g.i==1){c=Uk;d=a.h.streaming.retryParameters;e=Ok([b],d);e.method="GET";var h=a.K;h.h&&uz(h,"segment")&&Cz(h,e,{ot:"c",su:!0});return g.h(a.M.request(c,e).promise,2)}f=g.j;return g.return(f.data)})}
function DB(a,b,c,d){var e=Oe(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.i.duration,vttOffset:0,isMpegTs:!1},b=yb(b),b=c.parseMedia(b,a,null,[]),Yx(b,d);throw new L(2,2,2014,c);}r.ol=function(a,b){this.Pa.width=a;this.Pa.height=b};
r.Tg=function(a){var b;if(!(b=this.m!=UA)){b=this.l;a=a===void 0?.1:a;if(b.m.h)b=!1;else if(b.G)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Yc||d.ya||d.Xa||(d.Yc=!1,St(b,d,a));b=!0}b=!b}if(b)return!1;cA(this,!1);return!0};r.hg=function(){Wa("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.j};
r.Rj=function(){return this.Zb};
r.Nj=function(){var a={video:null,audio:null,text:null};if(this.m!=UA)return a;var b=this.l.u,c=this.i.currentTime;b=t([b.video,b.audio,this.l.F]);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);var f=void 0,g=void 0,h=void 0,k=void 0,l=void 0,m=void 0,n={codecs:(k=(f=e)==null?void 0:f.codecs)!=null?k:d.codecs,mimeType:(l=(g=e)==null?void 0:g.mimeType)!=null?l:d.mimeType,bandwidth:(m=(h=e)==null?void 0:h.bandwidth)!=null?m:
d.bandwidth};d.type=="video"?(n.width=d.width,n.height=d.height,a.video=n):d.type=="audio"?a.audio=n:d.type==zc&&(a.text=n)}return a};
function Yz(a){var b=Ju();b.streaming.failureCallback=function(c){if(a.oa()){var d=null;c.code==1001||c.code==1002?(d=1,a.h.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.Tg(d))}};b.textDisplayFactory=function(c){if(a.pd){var d=a.i;d=d.webkitPresentationMode?d.webkitPresentationMode=="inline":!d.webkitDisplayingFullscreen}else d=!1;return d?new ux(c):"track"in document.createElement("track")?new Vw(c):new tx};return b}r.ul=function(a){this.pd=a};
function $A(a,b){var c,d,e,f,g;return H(function(h){if(h.i==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return H(function(u){if(u.i==1)return k?k.segmentIndex?u.A(2):u.h(k.createSegmentIndex(),2):u.return(null);n=(m=k.segmentIndex.ob(l))?m.next().value:null;if(!n)return u.return(null);p=n.startTime;return u.return(p)})},h.h(e(c,b),2);if(h.i!=3)return f=h.j,h.h(e(d,b),3);g=h.j;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 oA(a){var b=a.Wh();if(a.C&&a.$&&a.G){if(a.h.streaming.rebufferingGoal==0){var c=a.N;c.l=!1;Cs(c)}else c=a.N,c.l=b,Cs(c);a.K&&Bz(a.K,b?"r":"p");JA(a);c=a.h.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.h.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.le<c){c=a.h.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.h.streaming.liveSync.targetLatencyTolerance,e=a.h.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.na&&(a.na=Math.min(a.na+ ++a.le*e,c-d))}}b=
(new Map).set("buffering",b);a.dispatchEvent(gA("buffering",b))}function KA(a){var b=a.i.playbackRate;b==0?(b=a.Ha(),b!==0&&b!==1&&(b=gA("ratechange"),a.dispatchEvent(b))):(a.N&&(a.N.set(b),a.m==UA&&a.B.playbackRateChanged(b),qB(a,b)),b=gA("ratechange"),a.dispatchEvent(b))}
function qB(a,b){a.Ob.Ta();a.Ob.J(a.i,"timeupdate",function(){var c=a.i.currentTime,d=a.Za(),e=a.oa(),f=e?a.h.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.yd():Math.floor(c)<=Math.floor(d.start+f)&&a.yd()})}
function JA(a){if(a.C&&a.$){var b=a.C.h,c="playing";a.$.h==Mp?c="buffering":a.Kd()?c="ended":a.i.paused&&(c="paused");var d=c;if(b.h==null)b.h={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.h.duration=e-b.h.timestamp;b.h.state==d?b=!1:(b.i.push(b.h),b.h={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(gA("statechanged",c)))}}
function dB(a){var b=a.i.playbackRate,c=a.oa();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Lh();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Zd(d,!1):e==1&&b!==a.N.Wc()&&a.yd()}if(c&&(c=a.Za(),Number.isFinite(c.end)&&!(a.i.currentTime<c.start||a.i.paused))){d=a.h.streaming.liveSync.targetLatencyTolerance;e=a.h.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.h.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.h.streaming.liveSync&&a.h.streaming.liveSync.enabled){var g=a.h.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.h.streaming.liveSync.maxPlaybackRate;var m=a.h.streaming.liveSync.minPlaybackRate}else a.j&&a.j.serviceDescription&&(g=a.j.serviceDescription.targetLatency,a.j.serviceDescription.targetLatency!=null?h=a.j.serviceDescription.targetLatency+d:a.j.serviceDescription.maxLatency!=null&&(h=a.j.serviceDescription.maxLatency),a.j.serviceDescription.targetLatency!=null?
k=Math.max(0,a.j.serviceDescription.targetLatency-d):a.j.serviceDescription.minLatency!=null&&(k=a.j.serviceDescription.minLatency),l=a.j.serviceDescription.maxPlaybackRate||a.h.streaming.liveSync.maxPlaybackRate,m=a.j.serviceDescription.minPlaybackRate||a.h.streaming.liveSync.minPlaybackRate);a.na||typeof g!=="number"||(a.na=g);var n=a.h.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Nb&&a.na!==null&&typeof g==="number"&&a.le<n&&Date.now()-a.Nb>f*1E3&&(f=a.h.streaming.liveSync.dynamicTargetLatency.minLatency,
a.na=Math.max(a.na-(g-f)/2,f+d),a.Nb=Date.now());e&&a.na!==null&&(h=a.na+d,k=a.na-d);g=c.end-a.i.currentTime;d=0;a.m==NA&&(e=a.i.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.h.streaming.liveSync.panicMode;e=a.h.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.$.j;c&&!m&&(m=a.h.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Zd(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.Zd(l,!1),a.Nb=null):k!=void 0&&m&&g-d<k?(b!=m&&a.Zd(m,!1),a.Nb=null):b!==a.N.Wc()&&(a.yd(),a.Nb=Date.now())}}
function FB(a,b,c){return(Br(b,c,.01)||c>b)&&a.rf<b?(a.rf=b,!0):!1}function eB(a){if(a.i){var b=a.Za();b=b.end-b.start;b=b>0?a.i.currentTime/b:0;if(!isNaN(b)){b*=100;if(FB(a,0,b))var c=gA("started");else if(FB(a,25,b))c=gA("firstquartile");else if(FB(a,50,b))c=gA("midpoint");else if(FB(a,75,b))c=gA("thirdquartile");else{if(FB(a,100,b)||b>100){var d;(d=a.Db)!=null&&Cm(d,!1);c=gA("complete")}a.h&&a.h.playRangeEnd!=Infinity&&a.Kd()&&a.i.pause()}c&&a.dispatchEvent(c)}}}
function QA(a){try{sr(a.be,a.j)}catch(f){return mA(a,f),!1}var b=a.j.isLowLatency&&a.h.streaming.lowLatencyMode,c=Of(a.j.variants),d=a.O.create(c);d=Array.from(d.values());if(a.h.abr.allowAudioFallback){var e=ob();e=!(a.h.mediaSource.codecSwitchingStrategy=="smooth"&&e.gb(a.keySystem()));d.push.apply(d,wa(Ip(d,c,e)))}a=a.B.setVariants(d,b);return typeof a=="boolean"?a:!0}
function VA(a,b){b=b===void 0?!1:b;if(QA(a)){if(!a.h.abr.enabled){var c=a.O.getLastAdaptationSet();if(c&&(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.B.chooseVariant(b)}return null}function aB(a,b){var c=null,d=Tf(a.j.textStreams,a.h.preferredText);d.length&&(c=d[0]);!c&&b.audio&&a.h.accessibility.handleForcedSubtitlesAutomatically&&(d=Rf(a.j.textStreams,b.audio.language,"",!0),d.length&&(c=d[0]));return c}
function dA(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=VA(a);f&&SA(a,f,e,b,c,d)}
function SA(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.u;if(b==g)d&&Wt(a.l,b,d,e,!0);else{var h=a.C.l;h.i!=b&&(h.i=b,h.h.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Wt(a.l,b,d,e,f,c);d=null;g&&(d=Ef(g));e=Ef(b);e.active=!0;if(a.ia&&(f=a.ia,h=b.video)){h.dependencyStream&&(h=h.dependencyStream);var k=0,l=-1;switch(h.mimeType){case "video/webm":k=1;break;case "video/mp4":k=2}switch(a.Nh()){case "DASH":l=1;break;case "HLS":l=0}f.h&&(f.h.setLevelSwitching(h.id,
!0),f.h.setContainerFormat(k),f.h.setStreamingFormat(l))}c?(c=(new Map).set("oldTrack",d).set("newTrack",e),c=gA("adaptation",c),GB(a,c)):HB(a,d,e);g&&Gp(g,b)&&Hp(g,b)||IB(a)}}function wB(a,b){var c=Array.from(a.i.audioTracks),d=c.find(function(f){return f.enabled});c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,e!==b&&(e.enabled=!1);b.enabled=!0;c=rB(a);d=d?Mf(d,c):null;b=Mf(b,c);HB(a,d,b);JB(a,d,b)}
function rB(a){return a.i&&a.i.videoTracks?Array.from(a.i.videoTracks).find(function(b){return b.selected}):null}function MA(a){var b=gA("trackschanged");GB(a,b);IB(a)}function HB(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=gA("variantchanged",b);GB(a,b)}function JB(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&IB(a)}function IB(a){var b=gA("audiotrackschanged");GB(a,b)}function LA(a){var b=gA("textchanged");GB(a,b)}
function cB(a){a.h.abr.enabled||cA(a);var b=(new Map).set("newStatus",a.h.abr.enabled);GB(a,gA("abrstatuschanged",b))}function bB(a){var b=a.rb().find(function(c){return c.active});b&&a.F&&a.F.setTextLanguage(b.language)}function cA(a,b){b=b===void 0?!0:b;if(a.m==UA){a.ce.stop();for(var c=t(a.j.variants),d=c.next();!d.done;d=c.next())d=d.value,isFinite(d.disabledUntilTime)&&(d.disabledUntilTime=0);b&&QA(a)}}
r.disableStream=function(a,b){if(!(this.h.abr.enabled&&this.m!==hA&&navigator.onLine&&b!=0&&this.j&&this.B&&this.l))return!1;if(this.j.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.j.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.ce.La(1);
b=this.fc().video.reduce(function(h,k){return h+k.end-k.start},0);dA(this,!1,b,!0,!1);return!0}return!1};function $z(a,b){b instanceof L&&b.code==7E3||b instanceof L&&mA(a,b)}
function mA(a,b){var c,d,e,f,g;return H(function(h){switch(h.i){case 1:if(a.m==hA)return h.return();b.severity===1&&a.C.N++;if(!a.j||!a.l||b.handled||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.A(2);break}c=Of(a.j.variants);if(!(c.length>1||a.sa)){h.A(2);break}d=ob();if(d.Ea()==="WEBKIT"&&b.code==3016)return h.return();h.o(4);return h.h(mu(a.l),6);case 6:if(e=h.j)return f=gA("mediasourcerecovered"),a.dispatchEvent(f),h.return();h.u(2);break;case 4:h.m();case 2:g=gA("error",
(new Map).set("detail",b)),a.dispatchEvent(g),g.defaultPrevented&&(b.handled=!0),h.l()}})}r.addFont=function(a,b){return Rj(a,b)};function CA(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,eventNode:c.eventNode,urlParams:c.urlParams,values:c.values});d.dispatchEvent(gA(b,a))}
function mB(a,b){if(b.schemeIdUri==="urn:mpeg:dash:event:callback:2015"&&b.eventNode){var c=Cd(b.eventNode);c&&(c=c.trim())&&(c=Gk(c,b.urlParams),a.M.request(13,Ok([c],qk())).promise.catch(function(){}))}}
function DA(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(gA(d?"audiotrackchanged":"mediaqualitychanged",b))}
function lA(a,b){b=b===void 0?!0:b;if(!a.i.error)return b?new L(2,3,3016):null;a=Db(a.i.error);var c=a.code;return b||c!==MediaError.MEDIA_ERR_ABORTED?new L(2,3,3016,c,a.vj,a.message):null}
function EA(a,b){if(a.l){var c=gA("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=bl(a.h.drm.clearKeys),g=function(q,v){q.allowedByKeySystem=!0;v=t(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.u.I)q.allowedByKeySystem=q.allowedByKeySystem&&!!w&&!tr.includes(w)},h=t(a.j.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=Uf(k);l=t(l);
for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.j.type=="HLS")for(var p=t(m.drmInfos),u=p.next();!u.done;u=p.next())u=u.value,u.keySystem==d&&(u.keyIds.size?g(k,u.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}c&&(MA(a),(c=a.l.u)&&!c.allowedByKeySystem?dA(a):QA(a))}}function RA(a,b,c){b>0&&(a.oa()||a.Li(b));b=a.getDuration();c<b&&(a.oa()||a.uc(c))}
function GB(a,b){H(function(c){if(c.i==1)return c.h(Promise.resolve(),2);a.m!=hA&&a.dispatchEvent(b);c.l()})}function jA(a){if(a.m==hA)throw new L(2,7,7E3);}r.Ba=function(){if(!this.i)return!1;var a=Uj(ob(),this.i);return a?a.state!="disconnected":!1};r.Kd=function(){return!this.i||this.i.ended?!0:this.sa&&!this.oa()&&this.i.currentTime>=this.Za().end};
function oB(a){function b(g,h){Wa(g,"has been deprecated. Please use",h,"instead.")}var c={preferredAudioLanguage:"language",preferredAudioRole:"role",preferredAudioLabel:"label",preferredAudioChannelCount:"channelCount",preferSpatialAudio:"spatialAudio"};if(Object.keys(c).some(function(g){return g in a})){var d={language:"",role:"",label:"",channelCount:0,codec:""};c=t(Object.entries(c));for(var e=c.next();!e.done;e=c.next()){var f=t(e.value);e=f.next().value;f=f.next().value;e in a&&(b(e,"preferredAudio"),
d[f]=a[e],delete a[e])}a.preferredAudio||(a.preferredAudio=[d])}"preferredAudioCodecs"in a&&(b("preferredAudioCodecs","preferredAudio"),d=a.preferredAudioCodecs,Array.isArray(d)&&d.length&&(a.preferredAudio||(a.preferredAudio=d.map(function(g){return{language:"",role:"",label:"",channelCount:0,codec:g}}))),delete a.preferredAudioCodecs);c={preferredTextLanguage:"language",preferredTextRole:"role",preferForcedSubs:"forced"};if(Object.keys(c).some(function(g){return g in a})){d={language:"",role:"",
format:""};c=t(Object.entries(c));for(e=c.next();!e.done;e=c.next())f=t(e.value),e=f.next().value,f=f.next().value,e in a&&(b(e,"preferredText"),d[f]=a[e],delete a[e]);a.preferredText||(a.preferredText=[d])}"preferredTextFormats"in a&&(b("preferredTextFormats","preferredText"),d=a.preferredTextFormats,Array.isArray(d)&&d.length&&(a.preferredText||(a.preferredText=d.map(function(g){return{language:"",role:"",format:g}}))),delete a.preferredTextFormats);c={preferredVideoLabel:"label",preferredVideoRole:"role",
preferredVideoHdrLevel:"hdrLevel",preferredVideoLayout:"layout"};if(Object.keys(c).some(function(g){return g in a})){d={label:"",role:"",language:"",codec:"",hdrLevel:"",layout:""};c=t(Object.entries(c));for(e=c.next();!e.done;e=c.next())f=t(e.value),e=f.next().value,f=f.next().value,e in a&&(b(e,"preferredVideo"),d[f]=a[e],delete a[e]);a.preferredVideo||(a.preferredVideo=[d])}"preferredVideoCodecs"in a&&(b("preferredVideoCodecs","preferredVideo"),d=a.preferredVideoCodecs,Array.isArray(d)&&d.length&&
(a.preferredVideo||(a.preferredVideo=d.map(function(g){return{label:"",role:"",language:"",codec:g,hdrLevel:"",layout:""}}))),delete a.preferredVideoCodecs)}function EB(a,b){a.ud.add(b);b.finally(function(){return a.ud.delete(b)})}function WA(a){return H(function(b){return a.ud.size?b.h(Promise.all([].concat(wa(a.ud))),0):b.return()})}K("shaka.Player",Z);Z.prototype.isEnded=Z.prototype.Kd;Z.prototype.isRemotePlayback=Z.prototype.Ba;Z.prototype.addFont=Z.prototype.addFont;
Z.prototype.setVideoContainer=Z.prototype.ul;Z.prototype.getFetchedPlaybackInfo=Z.prototype.Nj;Z.prototype.getManifestParserFactory=Z.prototype.Rj;Z.prototype.getManifest=Z.prototype.hg;Z.prototype.retryStreaming=Z.prototype.Tg;Z.prototype.setMaxHardwareResolution=Z.prototype.ol;Z.prototype.addChaptersTrack=Z.prototype.bj;Z.prototype.addThumbnailsTrack=Z.prototype.dj;Z.prototype.addTextTrackAsync=Z.prototype.cj;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.getLiveLatency=Z.prototype.fg;
Z.prototype.getBufferedInfo=Z.prototype.fc;Z.prototype.getSegmentAvailabilityDuration=Z.prototype.Me;Z.prototype.getPresentationStartTimeAsDate=Z.prototype.Ph;Z.prototype.getPlayheadTimeAsDate=Z.prototype.Wj;Z.prototype.getChaptersAsync=Z.prototype.Ij;Z.prototype.getChaptersTracks=Z.prototype.Jj;Z.prototype.getVideoTracks=Z.prototype.getVideoTracks;Z.prototype.selectVideoTrack=Z.prototype.fl;Z.prototype.getAudioTracks=Z.prototype.getAudioTracks;Z.prototype.selectAudioTrack=Z.prototype.cl;
Z.prototype.selectVariantTrack=Z.prototype.Vg;Z.prototype.selectTextTrack=Z.prototype.Jc;Z.prototype.getThumbnails=Z.prototype.gk;Z.prototype.getAllThumbnails=Z.prototype.Fj;Z.prototype.getImageTracks=Z.prototype.Pj;Z.prototype.getTextTracks=Z.prototype.rb;Z.prototype.getVariantTracks=Z.prototype.lc;Z.prototype.cancelTrickPlay=Z.prototype.yd;Z.prototype.trickPlay=Z.prototype.Zd;Z.prototype.getSkipRanges=Z.prototype.dk;Z.prototype.clearSkipRanges=Z.prototype.mj;Z.prototype.removeSkipRange=Z.prototype.Wk;
Z.prototype.addSkipRange=Z.prototype.uh;Z.prototype.useTrickPlayTrackIfAvailable=Z.prototype.jh;Z.prototype.getPlaybackRate=Z.prototype.Ha;Z.prototype.isBuffering=Z.prototype.Wh;Z.prototype.getKeyStatuses=Z.prototype.Ke;Z.prototype.retryLicensing=Z.prototype.Sg;Z.prototype.renewLicense=Z.prototype.Og;Z.prototype.getActiveSessionsMetadata=Z.prototype.dg;Z.prototype.getExpiration=Z.prototype.eg;Z.prototype.drmInfo=Z.prototype.drmInfo;Z.prototype.keySystem=Z.prototype.keySystem;
Z.prototype.isFullyLoaded=Z.prototype.qk;Z.prototype.goToLive=Z.prototype.kk;Z.prototype.seekRange=Z.prototype.Za;Z.prototype.isVideoOnly=Z.prototype.Zh;Z.prototype.isAudioOnly=Z.prototype.Uh;Z.prototype.isDynamic=Z.prototype.oa;Z.prototype.isInProgress=Z.prototype.ad;Z.prototype.isLive=Z.prototype.isLive;Z.prototype.getQueueManager=Z.prototype.$j;Z.prototype.getAdManager=Z.prototype.Bj;Z.prototype.getAllTimelineRegions=Z.prototype.Gj;Z.prototype.getAllScte35Events=Z.prototype.Ej;
Z.prototype.getAllEmsgRegions=Z.prototype.Cj;Z.prototype.getAllMetadataRegions=Z.prototype.Dj;Z.prototype.getMimeType=Z.prototype.ig;Z.prototype.getAssetUri=Z.prototype.Je;Z.prototype.getNetworkingEngine=Z.prototype.Uj;Z.prototype.getMediaElement=Z.prototype.Xc;Z.prototype.getManifestType=Z.prototype.Nh;Z.prototype.getLoadMode=Z.prototype.gg;Z.prototype.resetConfiguration=Z.prototype.Xk;Z.prototype.getBufferFullness=Z.prototype.Lh;Z.prototype.getNonDefaultConfiguration=Z.prototype.Vj;
Z.prototype.getConfigurationForLowLatency=Z.prototype.Kj;Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.configurationForLowLatency=Z.prototype.pj;Z.prototype.configure=Z.prototype.configure;Z.prototype.releaseAllMutexes=Z.prototype.Vk;Z.prototype.destroyAllPreloads=Z.prototype.Gh;Z.prototype.preload=Z.prototype.preload;Z.prototype.detachAndSavePreload=Z.prototype.Hh;Z.prototype.unloadAndSavePreload=Z.prototype.Bl;Z.prototype.load=Z.prototype.load;
Z.prototype.updateStartTime=Z.prototype.El;Z.prototype.unload=Z.prototype.$d;Z.prototype.detach=Z.prototype.detach;Z.prototype.attachCanvas=Z.prototype.fj;Z.prototype.attach=Z.prototype.xb;
Z.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return H(function(k){switch(k.i){case 1:b={};if(!a){k.A(2);break}return k.h(Ol(),3);case 3:b=k.j;case 2:return c=Jc(),d=Ir(),e=ob(),k.h(e.Ib(),4);case 4:return f=k.j,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=KB,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
Z.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;ob();return Kc()?!0:Mc().canPlayType("application/x-mpegurl")!=""};Z.setQueueManagerFactory=function(a){bA=a};Z.setAdManagerFactory=function(a){aA=a};Z.registerSupportPlugin=function(a,b){KB.set(a,b)};Z.prototype.destroy=Z.prototype.destroy;var hA=0,Wz=1,UA=2,NA=3;
Z.LoadMode={DESTROYED:hA,NOT_LOADED:Wz,MEDIA_SOURCE:UA,SRC_EQUALS:NA};Z.version="v5.3.6";var LB=["5","3"];Ij=new function(a){this.h=a;this.j=Jj;this.i=Kj}(new Gj(Number(LB[0]),Number(LB[1])));var KB=new Map,aA=null,bA=null;function MB(){}function NB(a,b){a={priority:b||0,hj:a};for(b=0;b<OB.length;b++)if(OB[b].priority<a.priority){OB.splice(b,0,a);return}OB.push(a)}K("shaka.polyfill",MB);MB.register=NB;MB.installAll=function(){for(var a=t(OB),b=a.next();!b.done;b=a.next()){b=b.value;try{b.hj()}catch(c){Wa("Error installing polyfill!",c)}}};var OB=[];function PB(a,b,c){this.h=a;this.j=b||null;this.i=c||null;this.keySystem=a.keySystem}PB.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.j;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;return a};PB.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};function QB(a){if(cc(a))return"cbcs";if(ac(a)||bc(a)||$b(a)||a==="com.huawei.wiseplay")return"cenc";Wa("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function RB(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 SB(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&ob().Kc()?!0:!1};function TB(){}var UB;function VB(){ob().lf()&&!UB&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(UB=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=WB,navigator.emeEncryptionSchemePolyfilled=!0)}
function WB(a,b){var c=this,d,e;return H(function(f){if(f.i==1)return f.h(UB.call(c,a,b),2);d=f.j;if(e=RB(d))return navigator.requestMediaKeySystemAccess=UB,f.return(d);navigator.requestMediaKeySystemAccess=XB;return f.return(XB.call(c,a,b))})}
function XB(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,u,q;return H(function(v){if(v.i==1){d=QB(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=YB(h.videoCapabilities,d),l=YB(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 v.h(UB.call(c,a,e),2)}p=v.j;q=u=null;e[0]&&(e[0].videoCapabilities&&(u=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(q=e[0].audioCapabilities[0].encryptionScheme));return v.return(new PB(p,u,q))})}function YB(a,b){return a?a.filter(function(c){return SB(c.encryptionScheme,b)}):a}MB.EmeEncryptionScheme=TB;TB.install=VB;NB(VB);function ZB(){}function $B(){"getOrInsert"in Map.prototype||(Map.prototype.getOrInsert=aC);"getOrInsertComputed"in Map.prototype||(Map.prototype.getOrInsertComputed=bC);"getOrInsert"in WeakMap.prototype||(WeakMap.prototype.getOrInsert=aC);"getOrInsertComputed"in WeakMap.prototype||(WeakMap.prototype.getOrInsertComputed=bC)}function aC(a,b){this.has(a)||this.set(a,b);return this.get(a)}function bC(a,b){this.has(a)||this.set(a,b(a));return this.get(a)}MB.Map=ZB;ZB.install=$B;NB($B);function cC(){}var dC;function eC(){ob().lf()&&!dC&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(dC=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=fC,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function fC(a){var b=this,c,d,e;return H(function(f){switch(f.i){case 1:return f.h(dC.call(b,a),2);case 2:c=f.j;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=RB(d))return navigator.mediaCapabilities.decodingInfo=dC,f.return(c);navigator.mediaCapabilities.decodingInfo=gC;if(d){f.A(3);break}return f.h(hC(a),4);case 4:return c.keySystemAccess=f.j,f.return(c);case 3:return f.return(gC.call(b,a))}})}
function gC(a){var b=this,c,d,e,f,g,h,k;return H(function(l){switch(l.i){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=QB(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},SB(d,g)&&SB(c,g))?l.h(dC.call(b,a),2):l.return(h);case 2:k=l.j;if(k.keySystemAccess){k.keySystemAccess=new PB(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);
break}return l.h(hC(a),5);case 5:k.keySystemAccess=l.j;case 3:return l.return(k)}})}
function hC(a){var b,c;return H(function(d){if(d.i==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 d.h(navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.j;return d.return(c)})}MB.MCapEncryptionScheme=cC;cC.install=eC;NB(eC,-2);function iC(){}function jC(){ob().Mb()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),iC.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=kC)}
function kC(a){var b,c,d,e,f,g,h,k,l,m,n;return H(function(p){switch(p.i){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};ob();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Mc().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Mc().canPlayType(g)!="",!h))return p.return(b)}else return p.return(b);p.A(2);break}if(!Kc())return p.return(b);if(!c){p.A(3);break}return p.h(lC(c),4);case 4:if(k=p.j,!k)return p.return(b);case 3:if(!d){p.A(2);
break}return p.h(mC(d),6);case 6:if(l=p.j,!l)return p.return(b);case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return p.h(nC(c,d,m),8);case 8:if(n=p.j)b.supported=!0,b.keySystemAccess=n;case 7:return p.return(b)}})}function lC(a){var b,c,d;return H(function(e){return e.i==1?(b=ob(),c=b.Ka(),c!=="CAST"?e.A(2):e.h(oC(a),3)):e.i!=2?(d=e.j,e.return(d)):e.return(Pm(a.contentType))})}
function mC(a){var b,c,d,e,f;return H(function(g){switch(g.i){case 1:b=ob();c=b.Ka();d=a.contentType;if(c!=="CAST"||!a.spatialRendering){g.A(2);break}d+="; spatialRendering=true";if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)){g.A(2);break}e=!1;f=pC;if(f.has(d)){e=f.get(d);g.A(4);break}return g.h(cast.__platform__.canDisplayType(d),5);case 5:e=g.j,f.set(d,e);case 4:return g.return(e);case 2:return g.return(Pm(d))}})}
function nC(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,q;return H(function(v){switch(v.i){case 1:d=[];e=[];f=[];c.audio&&(g={robustness:c.audio.robustness||"",contentType:b.contentType},ob().ii()&&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=De(l)+";"+Ce(l);p=De(m)+";"+Ce(m);u=c.keySystem;q=null;v.o(2);var w=dc(n,p,u,f);if(jc.has(w)){w=dc(n,p,u,f);q=jc.get(w)||null;v.A(4);break}return v.h(navigator.requestMediaKeySystemAccess(c.keySystem,
[k]),5);case 5:w=q=v.j;var x=dc(n,p,u,f);jc.set(x,w);case 4:v.u(3);break;case 2:v.m();case 3:return v.return(q)}})}
function oC(a){var b,c,d,e,f;return H(function(g){if(g.i==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Pm(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=pC;return f.has(b)?(e=f.get(b),g.A(2)):g.h(cast.__platform__.canDisplayType(b),3)}g.i!=2&&(e=g.j,f.set(b,e));return g.return(e)})}MB.MediaCapabilities=iC;iC.install=jC;iC.originalMcap=null;var pC=new Map;NB(jC,-1);function qC(){this.size=0;this.h=void 0}r=qC.prototype;r.Kb=function(){return this.h};r.forEach=function(a){this.h&&a(this.h,hc.value())};r.get=function(a){if(this.has(a))return this.h};r.has=function(a){var b=hc.value();return this.h&&ub(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};qC.prototype[Symbol.iterator]=function(){return[][Symbol.iterator]()};function rC(){}function sC(){var a=ob(),b=a.Ag()?a.ua():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(tC(),uC()):b<=15&&tC());a=t(a.Ng());for(b=a.next();!b.done;b=a.next())vC(b.value);(window.MediaSource||window.ManagedMediaSource)&&wC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&xC()}
function tC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function uC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function wC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return ze(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return ze(c)!="mp2t"&&b(c)}}}
function vC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return!yC(d,a)&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return!yC(d,a)&&c(d)}}}function yC(a,b){return(a=Ee(a))?a.split(",").some(function(c){return Ce(c.trim()).toLowerCase()==b.toLowerCase()}):!1}
function xC(){var a=MediaSource.isTypeSupported;ob().Qi()&&(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)})}MB.MediaSource=rC;rC.install=sC;NB(sC);function zC(){}var AC,BC,CC,DC,EC,FC;
function GC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=HC){if(a===void 0?0:a)AC=!0,BC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),CC=HTMLMediaElement.prototype.setMediaKeys,DC=window.MediaKeys,EC=window.MediaKeySystemAccess,FC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=IC;window.MediaKeys=JC;window.MediaKeySystemAccess=
KC;navigator.requestMediaKeySystemAccess=LC;window.shakaMediaKeysPolyfill=HC;yf.clear();jc.clear()}}function LC(a,b){try{var c=new KC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function IC(a){var b=this.mediaKeys;b&&b!=a&&MC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?MC(a,this):Promise.resolve()}
function NC(a){a=yb(a.initData);if(Bb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Gb(a.subarray(4),!0);a=Jb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=xb(a);this.dispatchEvent(b)}MB.PatchedMediaKeysApple=zC;
zC.uninstall=function(){window.shakaMediaKeysPolyfill==HC&&AC&&(AC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",BC),HTMLMediaElement.prototype.setMediaKeys=CC,window.MediaKeys=DC,window.MediaKeySystemAccess=EC,navigator.requestMediaKeySystemAccess=FC,BC=FC=CC=EC=DC=null,window.shakaMediaKeysPolyfill="",yf.clear(),jc.clear())};zC.install=GC;
function KC(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.h=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
KC.prototype.createMediaKeys=function(){var a=new JC(this.keySystem);return Promise.resolve(a)};KC.prototype.getConfiguration=function(){return this.h};function JC(a){this.i=new WebKitMediaKeys(a);this.h=new ib}JC.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new OC(this.i,a)};JC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function MC(a,b){a.h.Ta();if(!b)return Promise.resolve();a.h.J(b,"webkitneedkey",NC);try{return Ds(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.i)}),Promise.resolve()}catch(c){return Promise.reject(c)}}JC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function OC(a){yk.call(this);this.j=null;this.o=a;this.h=this.i=null;this.l=new ib;this.m=Promise.withResolvers();this.sessionId="";this.expiration=NaN;this.keyStatuses=new qC;this.onkeystatuseschange=null}ta(OC,yk);da.Object.defineProperties(OC.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.m.promise}}});r=OC.prototype;
r.generateRequest=function(a,b){var c=this;this.i=Promise.withResolvers();try{var d=this.o.createSession("video/mp4",yb(b));this.j=d;this.sessionId=d.sessionId||"";this.l.J(this.j,"webkitkeymessage",function(e){c.i&&(c.i.resolve(),c.i=null);e=(new Map).set("messageType",c.keyStatuses.Kb()==void 0?"license-request":"license-renewal").set("message",xb(e.message));e=new xk("message",e);c.dispatchEvent(e)});this.l.J(d,"webkitkeyadded",function(){c.h&&(PC(c,"usable"),c.h.resolve(),c.h=null)});this.l.J(d,
"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(c.i!=null)c.i.reject(e),c.i=null;else if(c.h!=null)c.h.reject(e),c.h=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:PC(c,"output-not-allowed");break;default:PC(c,"internal-error")}});PC(this,"status-pending")}catch(e){this.i.reject(e)}return this.i.promise};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
r.update=function(a){this.h=Promise.withResolvers();try{this.j.update(yb(a))}catch(b){this.h.reject(b)}return this.h.promise};r.close=function(){try{this.j.close(),this.m.resolve(),this.l.Ta()}catch(a){this.m.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function PC(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.h=b;b=new xk("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}var HC="apple";NB(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||GC())});function QC(){}function RC(){if(window.MediaKeys){var a=ob();MediaKeys.prototype.setServerCertificate&&a.Xd()||(MediaKeys.prototype.setServerCertificate=SC)}}function SC(){return Promise.resolve(!1)}MB.PatchedMediaKeysCert=QC;QC.install=RC;NB(RC);function TC(){}
function UC(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)VC="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=WC;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=XC;window.MediaKeys=YC;window.MediaKeySystemAccess=ZC;window.shakaMediaKeysPolyfill=$C}}
function aD(a){var b=VC;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function WC(a,b){try{var c=new ZC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function XC(a){var b=this.mediaKeys;b&&b!=a&&bD(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&bD(a,this);return Promise.resolve()}MB.PatchedMediaKeysWebkit=TC;TC.install=UC;
function ZC(a,b){this.h=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.h="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.h)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.h)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.h)||e.canPlayType("video/webm",this.h));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.i=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;}ZC.prototype.createMediaKeys=function(){var a=new YC(this.h);return Promise.resolve(a)};ZC.prototype.getConfiguration=function(){return this.i};function YC(a){this.m=a;this.i=null;this.h=new ib;this.j=[];this.l=new Map}
function bD(a,b){a.i=b;a.h.Ta();var c=VC;b&&(a.h.J(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=xb(d.initData);a.i.dispatchEvent(e)}),a.h.J(b,c+"keymessage",function(d){var e=cD(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Kb()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new xk("message",d),e.i&&(e.i.resolve(),e.i=null),e.dispatchEvent(d))}),a.h.J(b,c+"keyadded",function(d){(d=cD(a,d.sessionId))&&d.ready()}),
a.h.J(b,c+"keyerror",function(d){var e=cD(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.i?(d.systemCode==45&&(f.message="Unsupported session type."),e.i.reject(f),e.i=null):d.sessionId&&e.h?(e.h.reject(f),e.h=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?dD(e,"output-restricted"):f==1?dD(e,"expired"):dD(e,"internal-error"))}}))}
YC.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.i||document.createElement("video");b.src||(b.src="about:blank");a=new eD(b,this.m,a);this.j.push(a);return a};YC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};YC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function cD(a,b){var c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null}function eD(a,b,c){yk.call(this);this.m=a;this.u=!1;this.h=this.i=null;this.l=b;this.o=c;this.j=Promise.withResolvers();this.sessionId="";this.expiration=NaN;this.keyStatuses=new qC;this.onkeystatuseschange=null}ta(eD,yk);da.Object.defineProperties(eD.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.j.promise}}});r=eD.prototype;
r.ready=function(){dD(this,"usable");this.h&&this.h.resolve();this.h=null};
function fD(a,b,c){if(a.u)return Promise.reject(Error("The session is already initialized."));a.u=!0;try{if(a.o=="persistent-license")if(c)var d=yb(Jb("LOAD_SESSION|"+c));else{var e=Jb("PERSISTENT|");d=Sb(e,b)}else d=yb(b)}catch(g){return Promise.reject(g)}a.i=Promise.withResolvers();var f=aD("generateKeyRequest");try{a.m[f](a.l,d)}catch(g){if(g.name!="InvalidStateError")return a.i=null,Promise.reject(g);(new $e(function(){try{a.m[f](a.l,d)}catch(h){a.i.reject(h),a.i=null}})).ea(.01)}return a.i.promise}
function gD(a,b,c){if(a.h)a.h.promise.then(function(){return gD(a,b,c)}).catch(function(){return gD(a,b,c)});else{a.h=b;if(a.l=="webkit-org.w3.clearkey"){var d=Fb(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.h.reject(Error("Response is not a valid JSON Web Key Set.")),a.h=null);d=Pb(e.keys[0].k);e=Pb(e.keys[0].kid)}else d=yb(c),e=null;var f=aD("addKey");try{a.m[f](a.l,d,e,a.sessionId)}catch(g){a.h.reject(g),a.h=null}}}
function dD(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.h=b;b=new xk("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}r.generateRequest=function(a,b){return fD(this,b,null)};r.load=function(a){return this.o=="persistent-license"?fD(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=Promise.withResolvers();gD(this,b,a);return b.promise};
r.close=function(){if(this.o!="persistent-license"){if(!this.sessionId)return this.j.reject(Error("The session is not callable.")),this.j.promise;var a=aD("cancelKeyRequest");try{this.m[a](this.l,this.sessionId)}catch(b){}}this.j.resolve();return this.j.promise};r.remove=function(){return this.o!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};var VC="",$C="webkit";NB(UC);function hD(){}function iD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=jD))}function jD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}MB.RandomUUID=hD;hD.install=iD;NB(iD);function kD(){}function lD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:mD})}function mD(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}MB.Symbol=kD;kD.install=lD;NB(lD);function nD(){}function oD(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next()){b=b.value;var c=void 0;(c=b.prototype).indexOf!=null||(c.indexOf=Array.prototype.indexOf);c=void 0;(c=b.prototype).lastIndexOf!=null||(c.lastIndexOf=Array.prototype.lastIndexOf);c=void 0;(c=b.prototype).includes!=null||(c.includes=Array.prototype.includes)}}MB.TypedArray=nD;nD.install=oD;NB(oD);function pD(){}function qD(){window.URLSearchParams||(window.URLSearchParams=rD);!window.URL||!window.URL.prototype||"searchParams"in window.URL.prototype||Object.defineProperty(window.URL.prototype,"searchParams",{get:sD,enumerable:!0,configurable:!0})}
function sD(){var a=this,b=tD.get(a);if(!b){b=new window.URLSearchParams(a.search);var c=function(){var g=b.toString();a.search=g?"?"+g:""},d=b.append;b.append=function(g,h){d.call(this,g,h);c()};var e=b.delete;b.delete=function(g){e.call(this,g);c()};var f=b.set;b.set=function(g,h){f.call(this,g,h);c()};tD.set(a,b)}return b}MB.URLSearchParams=pD;pD.install=qD;var tD=new WeakMap;
function rD(a){this.h=[];if(typeof a==="string"){if(a.startsWith("?")&&(a=a.substring(1)),a){a=t(a.split("&"));for(var b=a.next();!b.done;b=a.next()){var c=b.value.split("=");b=decodeURIComponent(c[0].replace(/\+/g," "));c=c.length>1?decodeURIComponent(c[1].replace(/\+/g," ")):"";this.append(b,c)}}}else if(Array.isArray(a))for(a=t(a),b=a.next();!b.done;b=a.next())b=b.value,this.append(b[0],b[1]);else if(a)for(b in a)this.append(b,a[b])}r=rD.prototype;
r.append=function(a,b){this.h.push([String(a),String(b)])};r.get=function(a){a=String(a);for(var b=t(this.h),c=b.next();!c.done;c=b.next())if(c=c.value,c[0]===a)return c[1];return null};r.has=function(a){var b=String(a);return this.h.some(function(c){return c[0]===b})};r.set=function(a,b){a=String(a);b=String(b);for(var c=!1,d=0;d<this.h.length;d++)this.h[d][0]===a&&(c?(this.h.splice(d,1),d--):(this.h[d][1]=b,c=!0));c||this.append(a,b)};
r.toString=function(){return this.h.map(function(a){return encodeURIComponent(a[0]).replace(/%20/g,"+")+"="+encodeURIComponent(a[1]).replace(/%20/g,"+")}).join("&")};r.entries=function(){var a=0,b=this.h.map(function(d){return[d[0],d[1]]}),c={next:function(){return a<b.length?{value:b[a++],done:!1}:{value:void 0,done:!0}}};c[Symbol.iterator]=function(){return c};return c};
r.keys=function(){var a=0,b=this.h,c={next:function(){return a<b.length?{value:b[a++][0],done:!1}:{value:void 0,done:!0}}};c[Symbol.iterator]=function(){return c};return c};r.values=function(){var a=0,b=this.h,c={next:function(){return a<b.length?{value:b[a++][1],done:!1}:{value:void 0,done:!0}}};c[Symbol.iterator]=function(){return c};return c};r.forEach=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,a(c[1],c[0],this)};rD.prototype[Symbol.iterator]=function(){return this.entries()};
NB(qD);function uD(){}function vD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}MB.VideoPlayPromise=uD;uD.install=vD;NB(vD);function wD(){}function xD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.requestVideoFrameCallback&&window.requestAnimationFrame&&a.getVideoPlaybackQuality&&(a.requestVideoFrameCallback=yD,a.cancelVideoFrameCallback=zD)}}function AD(a){var b=BD.get(a);b||(b={Hk:1,Rc:new Map,presentedFrames:0},BD.set(a,b));return b}
function yD(a){function b(g){if(d.Rc.has(e)){var h=c.getVideoPlaybackQuality().totalVideoFrames||0;h!==d.presentedFrames?(d.presentedFrames=h,h={presentationTime:g,expectedDisplayTime:g,mediaTime:c.currentTime,presentedFrames:h,width:c.videoWidth,height:c.videoHeight,processingDuration:0},d.Rc.delete(e),a(g,h)):(g=window.requestAnimationFrame(b),d.Rc.set(e,g))}}var c=this,d=AD(c),e=d.Hk++,f=window.requestAnimationFrame(b);d.Rc.set(e,f);return e}
function zD(a){var b=BD.get(this);if(b){var c=b.Rc.get(a);c!=null&&(window.cancelAnimationFrame(c),b.Rc.delete(a))}}MB.VideoFrameCallback=wD;wD.install=xD;var BD=new WeakMap;NB(xD,-2);function CD(){}function DD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Mc().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=ED)}}function ED(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}MB.VideoPlaybackQuality=CD;CD.install=DD;NB(DD);function FD(){}function GD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=HD;else if(b==6)a=ID;else{try{var c=!!HD(1,2,"")}catch(d){c=!1}c&&(a=HD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function HD(a,b,c){return new window.TextTrackCue(a,b,c)}function ID(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}MB.VTTCue=FD;FD.install=GD;NB(GD);function JD(){this.h="UNKNOWN"}JD.prototype.parseInit=function(){};JD.prototype.setManifestType=function(a){this.h=a};
JD.prototype.parseMedia=function(a,b,c,d){function e(B,A,D){for(var F=[],E=t(q),G=E.next();!G.done;G=E.next())(G=KD(G.value.clone(),A,D))&&F.push(G);B.nestedCues=F.concat(B.nestedCues);A=t(F);for(D=A.next();!D.done;D=A.next())D=D.value,B.startTime=Math.min(B.startTime,D.startTime),B.endTime=Math.max(B.endTime,D.endTime)}a=Fb(a);var f=[];if(a=="")return f;var g=sd(a,!0).find(function(B){return Fd(B,Id,"tt")});if(!g)throw new L(2,2,2005,"Failed to parse TTML.");f=Ed(g,Id,"body")[0];if(!f)return[];a=
g.attributes["xml:space"]||"default";var h=Jd(g,LD,"extent");if(a!="default"&&a!="preserve")throw new L(2,2,2005,"Invalid xml:space value: "+a);var k=a=="default",l=new MD(Jd(g,ND,"frameRate"),Jd(g,ND,"subFrameRate"),Jd(g,ND,"frameRateMultiplier"),Jd(g,ND,"tickRate"));a=OD(Jd(g,ND,"cellResolution"));var m=Ed(g,Id,"metadata")[0];m=(m?m.children:[]).filter(function(B){return B!="\n"});var n=Ed(g,Id,"style"),p=Ed(g,Id,"region");g=new Map;for(var u=[],q=[],v=t(p),w=v.next();!w.done;w=v.next()){w=w.value;
var x=PD(this,w,n,h,a);if(x){u.push(x);var y=QD(this,w,l,0,!1,g);RD(this,w,n,"showBackground")=="whenActive"||SD.test(x.backgroundColor)||(y=new Ld(Math.max(y.start+b.periodStart,b.segmentStart),Math.min(y.end+b.periodStart,b.segmentEnd),""),y.region=x,y.isContainer=!0,y.displayAlign=RD(this,w,n,"displayAlign")||y.displayAlign,q.push(y))}}if(Hd(f,"p").length)throw new L(2,2,2001,"<p> can only be inside <div> in TTML");h=t(Hd(f,"div"));for(v=h.next();!v.done;v=h.next())if(Hd(v.value,"span").length)throw new L(2,
2,2001,"<span> can only be inside <p> in TTML");QD(this,f,l,0,!1,g);h=u.length>0&&Array.from(g.keys()).some(function(B){return!!B.attributes.region});c=TD(this,f,b,l,m,n,p,u,k,a,null,!1,c,d,g,{start:0,end:Infinity},h);d=t(c);for(k=d.next();!k.done;k=d.next())k=k.value,k.backgroundColor=k.backgroundColor||"transparent";var z=UD(f),C=c.slice().sort(function(B,A){return B.startTime-A.startTime});C.forEach(function(B,A){e(B,z||A>0?B.startTime:-Infinity,z||A<C.length-1?B.endTime:Infinity)});!c.length&&
q.length&&(f=g.get(f)||{start:0,end:Infinity},d=new Ld(Infinity,0,""),d.isContainer=!0,d.backgroundColor="transparent",a&&(d.cellResolution=a),e(d,z?f.start+b.periodStart:-Infinity,z?f.end+b.periodStart:Infinity),d.startTime<d.endTime&&c.push(d));return c};function UD(a){return!!(a.attributes.begin||a.attributes.end||a.attributes.dur)}
function TD(a,b,c,d,e,f,g,h,k,l,m,n,p,u,q,v,w){function x(N,P){return VD(a,N,P,m,z,B,F,f,E,G.length==0)}var y=xd(b)?m&&WD(m)?null:v:(y=q.get(b))?{start:Math.max(y.start,v.start),end:Math.min(y.end,v.end)}:v;var z=(v=xd(b)?m:b)?XD(v,"region",g,"")[0]:null;v=z?q.get(z):null;y&&v&&(y={start:Math.max(y.start,v.start),end:Math.min(y.end,v.end)});if(!y||y.start>=y.end)return[];var C=!w||!!z;if(xd(b)){if(!n||!C)return[];v={tagName:"span",children:[Cd(b)],attributes:{},parent:null}}else v=b;for(var B=null,
A=t(YD),D=A.next();!D.done&&!(B=XD(v,"backgroundImage",e,"#",D.value)[0]);D=A.next());var F=null;A=Jd(v,YD,"backgroundImage");D=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(A&&D.test(A)){A=parseInt(A.split(":").pop(),10)-1;if(A>=u.length)return[];F=u[A]}else p&&A&&!A.startsWith("#")&&(A=(new URL(A,p)).toString())&&(F=A);b=ZD(b);if(b=="p"||B||F)n=!0;var E=n;k=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";D=v.children.filter(function(N){return xd(N)||["div","p","span",
"br"].includes(ZD(N))});A=D.every(xd);var G=[];if(!A){D=t(D);for(var J=D.next();!J.done;J=D.next())G=G.concat(TD(a,J.value,c,d,e,f,g,h,k,l,v,n,p,u,q,y,w))}e=m!=null;d=Cd(v);p=v.children.length&&d&&/\S/.test(d);if(A&&p&&!C)return[];g=UD(v);if(!(g||p||b=="br"||G.length!=0||e&&!k))return[];e=y.start+c.periodStart;y=y.end+c.periodStart;a.h!=="HLS"&&(e=Math.max(e,c.segmentStart),y=Math.min(y,c.segmentEnd));if(!g&&G.length>0)for(e=Infinity,y=0,g=t(G),p=g.next();!p.done;p=g.next())p=p.value,e=Math.min(e,
p.startTime),y=Math.max(y,p.endTime);if(b=="br")return c=new Ld(e,y,""),c.lineBreak=!0,[c];g="";!A||b=="p"&&WD(v)||(g=Lb(d||""),k&&(g=g.replace(/\s+/g," ")));y=new Ld(e,y,g);y.nestedCues=G;n||(y.isContainer=!0);l&&(y.cellResolution=l);v.attributes.region&&z&&(y.region=h.find(function(N){return N.id==z.attributes["xml:id"]}));x(y,v);return $D(a,y,v,f,q,c,x)}
function $D(a,b,c,d,e,f,g){function h(v,w){for(var x=Object.assign({},c,{attributes:Object.assign({},c.attributes)}),y=m.filter(function(E){return e.get(E).start+f.periodStart<=v&&v<e.get(E).end+f.periodStart}),z=t(y),C=z.next();!C.done;C=z.next()){C=t(k(C.value));for(var B=C.next();!B.done;B=C.next()){B=B.value;for(var A=t(Object.entries(B.attributes)),D=A.next();!D.done;D=A.next()){var F=t(D.value);D=F.next().value;F=F.next().value;(D=l(B,D))&&(x.attributes[D]=F)}}}if(aE(a,x,d,"display")=="none")return null;
w=KD(b.clone(),v,w);y.length&&(w.textDecoration=[],g(w,x));return w}function k(v,w){w=w===void 0?new Set:w;var x=[];w.add(v);for(var y=t((v.attributes.style||"").split(/\s+/)),z=y.next(),C={};!z.done;C={li:void 0},z=y.next())C.li=z.value,(z=d.find(function(B){return function(A){return A.attributes["xml:id"]==B.li}}(C)))&&!w.has(z)&&x.push.apply(x,wa(k(z,w)));x.push(v);return x}function l(v,w){var x=w.indexOf(":");if(x<1)return null;for(var y="xmlns:"+w.substring(0,x),z=null;v&&z==null;v=v.parent)z=
v.attributes[y];y=LD.concat(["urn:ebu:tt:style"]);return z!=null&&y.includes(z)?td(z)+":"+w.substring(x+1):null}var m=Hd(c,"set");if(!m.length)return aE(a,c,d,"display")!="none"?[b]:[];for(var n=[b.startTime,b.endTime],p=t(m),u=p.next();!u.done;u=p.next())u=u.value,n.push(e.get(u).start+f.periodStart,e.get(u).end+f.periodStart);n=Array.from(new Set(n)).filter(function(v){return v>=b.startTime&&v<=b.endTime}).sort(function(v,w){return v-w});p=[];for(u=1;u<n.length;u++){var q=h(n[u-1],n[u]);q&&p.push(q)}return p}
function KD(a,b,c){a.startTime=Math.max(a.startTime,b);a.endTime=Math.min(a.endTime,c);if(a.startTime>=a.endTime)return null;a.nestedCues=a.nestedCues.filter(function(d){return KD(d,b,c)});return a}
function PD(a,b,c,d,e){function f(x,y,z){if(!y||y.trim()=="auto")return null;var C=y.trim().split(/\s+/),B=C.length==2?g(C[0],!1,z):null;z=C.length==2?g(C[1],!0,z):null;return B&&z?{x:B,y:z}:(Xa("ttml-region-"+x+"-"+y,"TtmlTextParser ignored the tts:"+x+" of region "+n+", which is invalid or not supported: "+y),null)}function g(x,y,z){var C=bE(x);if(!C||!z&&Number(C[1])<0)return null;z=C[2]=="px";if(C[2]=="%")return{value:Number(C[1]),units:bd,Re:z};x=h(x,y);return x!=null?{value:x,units:bd,Re:z}:
z?{value:Number(C[1]),units:0,Re:z}:null}function h(x,y){var z=bE(x),C=z?Number(z[1]):0;z=z?z[2]:"%";if(z=="%")return null;if(z=="px")return(x=y?u:p)?C*100/x:null;if(z=="rw"||z=="rh")return z=="rh"==y?C:null;if(z=="c")return C*100/(y?v:q);if(z=="em"){z=(l("fontSize")||"1c").trim().split(/\s+/);if(z.length>2)return null;if(z.length==2)return x=k(z[y?1:0],y),x==null?null:C*x;var B=k(z[0],!0);if(B==null)return null;if(y)return C*B;if(p&&u)return C*B*u/p;Xa("ttml-horizontal-em","TtmlTextParser approximated a horizontal length in em, as the TTML document has no tts:extent in pixels: "+
x);x=k(z[0],!1);return x==null?null:C*x}return null}function k(x,y){var z=100/(y?v:q);x=bE(x);if(!x)return z;var C=Number(x[1]);return x[2]=="%"?C*z/100:x[2]=="em"?C*z:h(x[0],y)}function l(x){return RD(a,b,c,x)}var m=new ad,n=b.attributes["xml:id"];if(!n)return null;m.id=n;var p=(d=cE.exec(d||""))?Number(d[1]):null,u=d?Number(d[2]):null,q=e?e.columns:32,v=e?e.rows:15;e=l("extent");if(d=f("extent",e,!1))m.width=d.x.value,m.height=d.y.value,m.widthUnits=d.x.units,m.heightUnits=d.y.units;d=l("origin");
var w=f("origin",d,!0);w&&w.x.units!=w.y.units&&(Xa("ttml-region-origin-units-"+d,"TtmlTextParser ignored the tts:origin of region "+n+", which mixes pixels and other units without a tts:extent in pixels on the TTML document: "+d),w=null);w&&(m.viewportAnchorX=w.x.value,m.viewportAnchorY=w.y.value,m.viewportAnchorUnits=w.x.units,e||w.x.Re||w.y.Re||(m.width=100-m.viewportAnchorX,m.widthUnits=bd,m.height=100-m.viewportAnchorY,m.heightUnits=bd));(e=l("position"))&&!d&&(e=dE(e,m,h))&&(m.viewportAnchorX=
e[0],m.viewportAnchorY=e[1],m.viewportAnchorUnits=bd);if(e=l("backgroundColor"))m.backgroundColor=eE(e);e=parseFloat(l("opacity")||"");isNaN(e)||(m.opacity=e);if(e=l("padding"))m.padding=fE(e,m,l("writingMode"),h);l("overflow")=="hidden"&&(m.overflow="hidden");(e=l("zIndex"))&&/^-?\d+$/.test(e)&&(m.zIndex=Number(e));return m}
function dE(a,b,c){a=a.trim().split(/\s+/);if(b.widthUnits!=bd||b.heightUnits!=bd||a.length>4)return null;for(var d=[["left","50%"],["top","50%"]],e=a.some(function(n){return/^(top|bottom)$/.test(n)}),f=a.some(function(n){return/^(left|right)$/.test(n)}),g=[!1,!1],h=0;h<a.length;h++){var k=a[h];if(/^[a-z]/.test(k)){var l=a.length>2&&/^[-.\d]/.test(a[h+1]||"")?a[++h]:"0%",m=void 0;m=/^(top|bottom)$/.test(k)?1:/^(left|right)$/.test(k)?0:e!=f?e?0:1:g[0]?1:0;d[m]=[k,l];g[m]=!0}else{if(a.length>2)return null;
d[h][1]=k;g[h]=!0}}a=d.map(function(n,p){var u=p?b.height:b.width,q=bE(n[1]);p=q&&q[2]=="%"?Number(q[1])*(100-u)/100:c(n[1],!!p);if(n[0]=="center")return p==null?NaN:Number(((100-u)/2+p).toFixed(4));n=n[0]=="right"||n[0]=="bottom";return p==null?NaN:Number((n?100-u-p:p).toFixed(4))});return a.some(isNaN)?null:a}
function fE(a,b,c,d){var e=a.trim().split(/\s+/);if(e.length>4)return"";a=e[0];var f=e[1]||a,g=e[2]||a;e=e[3]||f;var h=[a,f,g,e];if(c=="rltb"||c=="rl")h=[a,e,g,f];else if(c=="tblr")h=[e,g,f,a];else if(c=="tbrl"||c=="tb")h=[e,a,f,g];return h.map(function(k,l){var m=!(l%2),n=(bE(k)||[])[2];l=d(k,m);if(n=="%"||n=="px"&&!l)return k;k=(m?b.heightUnits:b.widthUnits)==bd;m=m?b.height:b.width;return l!=null&&k&&m?Number((l*100/m).toFixed(4))+"%":"0px"}).join(" ")}
function eE(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(",").map(function(c){return c.trim()}),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function VD(a,b,c,d,e,f,g,h,k,l){function m(q){var v;if(!(v=n(q)))a:{for(v=d;v&&!Fd(v,Id,"tt");v=v.parent){var w=aE(a,v,h,q);if(w){v=w;break a}}v=null}return v}function n(q){return gE(a,c,e,h,q,p)}var p=k||l;n("direction")=="rtl"&&(b.direction="rtl");k=n("writingMode");k=="tblr"?b.writingMode="vertical-lr":k=="tb"||k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=Od);if(k=gE(a,c,e,h,"textAlign")){var u=hE[k]||[];b.positionAlign=u[0];b.lineAlign=u[1];b.textAlign=
ge[k.toUpperCase()]}else b.textAlign=Nd;if(k=gE(a,c,e,h,"displayAlign"))b.displayAlign=he[k.toUpperCase()];if(k=n("color"))b.color=eE(k);if(k=aE(a,c,h,"backgroundColor"))b.backgroundColor=eE(k);if(k=n("border"))b.border=k;if(k=n("fontFamily"))b.fontFamily=iE[k]||k.split(",").filter(function(q){return q!="default"}).join(",");m("fontWeight")=="bold"&&(b.fontWeight=de);b.wrapLine=m("wrapOption")!="noWrap";(k=ZD(c)=="p"?n("lineHeight")||"normal":null)&&(k=="normal"||k.match(jE)||k.match(kE))&&(b.lineHeight=
k);(k=n("fontSize"))&&(k.match(jE)||k.match(kE))&&(b.fontSize=lE(a,c,d,e,h)||k);if(k=m("fontStyle"))b.fontStyle=je[k.toUpperCase()];f?(g=f.attributes.imageType||f.attributes.imagetype,k=f.attributes.encoding,f=Cd(f).trim(),g=="PNG"&&k=="Base64"&&f&&(b.backgroundImage="data:image/png;base64,"+f)):g&&(b.backgroundImage=g);f=n("textOutline");f=="none"?b.textStrokeWidth="0":f&&(f=f.trim().split(/\s+(?![^(]*\))/),mE(f[0])?(g=m("color"),b.textStrokeColor=g?eE(g):b.color):(b.textStrokeColor=eE(f[0]),f.shift()),
(f=f[0]?mE(f[0]):null)?b.textStrokeWidth=f:b.textStrokeColor="");if(f=n("textShadow"))b.textShadow=nE(f);(f=n("letterSpacing"))&&f.match(jE)&&(b.letterSpacing=f);(f=n("linePadding"))&&f.match(jE)&&(b.linePadding=f);if(f=aE(a,c,h,"opacity"))b.opacity=parseFloat(f);if(l)for(l=[RD(a,e,h,"textDecoration")].concat(oE(c,d).map(function(q){return aE(a,q,h,"textDecoration")})),l=t(l),f=l.next();!f.done;f=l.next())(f=f.value)&&pE(b,f);l=n("visibility");if(l=="hidden"||l=="visible")b.visibility=l;if(l=n("textCombine"))b.textCombineUpright=
l;if(l={container:"ruby",text:"rt"}[n("ruby")])b.rubyTag=l}function nE(a){return a=="none"?a:a.split(/,(?![^(]*\))/).map(function(b){return b.trim().split(/\s+(?![^(]*\))/).map(function(c){return mE(c)||eE(c)}).join(" ")}).join(", ")}function bE(a){return/^(-?\d*\.?\d+)(px|em|c|%|rw|rh)$/.exec(a)}function mE(a){var b=bE(a);return b?b[2]=="%"?Number(b[1])/100+"em":a:null}function oE(a,b){for(a=[a];b&&ZD(b)!="tt";b=b.parent)a.unshift(b);return a}
function pE(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next()){var d=c.value;d=="none"?a.textDecoration=[]:(c=!d.startsWith("no"),d=qE[(c?d:d.slice(2)).toLowerCase()],c?d&&!a.textDecoration.includes(d)&&a.textDecoration.push(d):db(a.textDecoration,d))}}function gE(a,b,c,d,e,f){f=f===void 0?!0:f;return Jd(b,LD,e)||rE(a,b,d,e)||(f?RD(a,c,d,e):null)}function RD(a,b,c,d){return b?Jd(b,LD,d)||rE(a,b,c,d,Hd(b,"style"))||rE(a,b,c,d):null}
function aE(a,b,c,d){return Jd(b,LD,d)||(b.attributes.style?rE(a,b,c,d):null)}function lE(a,b,c,d,e){b=[RD(a,d,e,"fontSize")].concat(oE(b,c).map(function(h){return aE(a,h,e,"fontSize")})).filter(function(h){return h});c=0;d="";for(var f=t(b),g=f.next();!g.done;g=f.next()){g=bE(g.value);if(!g||!["px","c","%"].includes(g[2]))return null;g[2]=="%"&&d?c=c*Number(g[1])/100:(c=Number(g[1]),d=g[2])}return b.length>1?Number(c.toFixed(4))+d:null}
function rE(a,b,c,d,e){e=e||XD(b,"style",c,"");b=null;e=t(e);for(var f=e.next();!f.done;f=e.next()){var g=f.value;if(!(f=Gd(g,"urn:ebu:tt:style",d)||Jd(g,LD,d))){f=a;var h=c,k=d;f=Jd(g,LD,k)||rE(f,g,h,k)}b=f||b}return b}function XD(a,b,c,d,e){return(a=a&&c.length?sE(a,b,e):null)?a.split(" ").map(function(f){return c.find(function(g){return d+g.attributes["xml:id"]==f})}).filter(function(f){return f}):[]}
function sE(a,b,c){for(;a;a=a.parent){var d=c?Gd(a,c,b):a.attributes[b];if(d)return d}return null}
function QD(a,b,c,d,e,f){var g=tE(b.attributes.begin,c),h=tE(b.attributes.end,c),k=tE(b.attributes.dur,c);g=d+(g||0);var l=WD(b),m=uE(b);e=m||e?g:Infinity;for(var n=t(Hd(b,"set")),p=n.next();!p.done;p=n.next())QD(a,p.value,c,g,!1,f);m=t(m||[]);for(n=m.next();!n.done;n=m.next())n=n.value,p=l?e:g,n=xd(n)?l?p:Infinity:QD(a,n,c,p,l,f).end,e=l?n:Math.max(e,n);a=e;h!=null&&k!=null?a=Math.min(g+k,d+h):k!=null?a=g+k:h!=null&&(a=d+h);d={start:g,end:a};f.set(b,d);return d}
function uE(a){var b=ZD(a),c=b=="p"||b=="span";a=c||b=="body"||b=="div"?a.children.filter(function(d){return xd(d)?c:["div","p","span","br"].includes(ZD(d))}):[];return!a.length||b=="span"&&a.every(xd)?null:a}function ZD(a){if(xd(a))return"";var b=a.tagName.split(":").pop();return Fd(a,Id,b)?b:""}function WD(a){return a.attributes.timeContainer=="seq"}
function tE(a,b){if(!a)return null;var c=vE.exec(a);if(c)return Number(c[3])+(Number(c[4])+(Number(c[5])||0)/b.h)/b.frameRate+Number(c[2])*60+Number(c[1])*3600;if(c=wE.exec(a))return Number(c[1])/(c[2]=="f"?b.frameRate:b.i);c=xE.exec(a)||yE.exec(a);if(!c)throw new L(2,2,2001,"Could not parse cue time range in TTML");return(Number(c[4])||0)/1E3+(Number(c[3])||0)+(Number(c[2])||0)*60+(Number(c[1])||0)*3600}
function OD(a){return(a=/^(\d+) (\d+)$/.exec(a||""))?{columns:Number(a[1]),rows:Number(a[2])}:null}K("shaka.text.TtmlTextParser",JD);JD.prototype.parseMedia=JD.prototype.parseMedia;JD.prototype.setManifestType=JD.prototype.setManifestType;JD.prototype.parseInit=JD.prototype.parseInit;function MD(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.i=Number(d)||(a?this.frameRate*this.h:1);if(a=/^(\d+) (\d+)$/.exec(c||""))this.frameRate*=Number(a[1])/Number(a[2])}
var SD=/^(transparent|#\w{6}00|rgba\(.*,\s*0\))?$/i,kE=/^(\d{1,4}(?:\.\d+)?|100)%$/,jE=/^(\d+px|\d+em|\d*\.?\d+c)$/,cE=/^(\d+)px (\d+)px$/,vE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,xE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}(?:\.\d+)?)$/,wE=/^(\d*(?:\.\d*)?)([ft])$/,yE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m(?!s))?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),iE={monospaceSerif:"Courier New,Liberation Mono,Courier,monospace",proportionalSansSerif:"Arial,Helvetica,Liberation Sans,sans-serif",
sansSerif:"sans-serif",monospaceSansSerif:"Consolas,monospace",proportionalSerif:"serif"},qE={underline:fe,linethrough:"line-through",overline:"overline"},hE={left:["line-left",Rd],center:["center","center"],right:["line-right","end"],start:["line-left",Rd],end:["line-right","end"]},Id=["http://www.w3.org/ns/ttml","http://www.w3.org/2006/10/ttaf1",""],ND=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],LD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],
YD=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Me("application/ttml+xml",function(){return new JD});function zE(){this.h=new JD;this.i=null}zE.prototype.parseInit=function(a){var b=this,c=!1;(new jh).ma(uh,oh).P("mdhd",function(d){d=Gh(d.reader,d.version);b.i=d.timescale}).P("stsd",qh).box("stpp",function(d){c=!0;d.parser.stop()}).parse(a);if(!c)throw new L(2,2,2007);};zE.prototype.setManifestType=function(a){this.h.setManifestType(a)};
zE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=null,g=[],h=new Map,k=[],l=[],m=[],n=0;(new jh).ma(vh,oh).P("tfhd",function(A){A=Eh(A.reader,A.flags);e=A.cc;f=A.Hb}).P("tfdt",function(A){n=Fh(A.reader,A.version).za}).P("trun",function(A){A=Hh(A.reader,A.version,A.flags);A=t(A.sc);for(var D=A.next();!D.done;D=A.next())D=D.value,k.push(D.sampleSize||e||0),D=D.tc||f,l.push(D),m.push(n),n+=D||0}).P("subs",function(A){for(var D=A.reader,F=D.R(),E=-1,G=0;G<F;G++){var J=D.R();E+=J;J=D.xa();for(var N=
[],P=0;P<J;P++)A.version==1?N.push(D.R()):N.push(D.xa()),D.X(),D.X(),D.R();h.set(E,N)}}).box("mdat",th(function(A){g.push(A)},!1)).parse(a,!1);if(g.length==0)throw new L(2,2,2007);a=Sb.apply(Mb,wa(g));for(var p=AE(this,m,l,b),u=0,q=0;q<k.length;q++){var v=yb(a,u,k[q]);u+=k[q];var w=h.get(q),x=[];if(w&&w.length){for(var y=yb(v,0,w[0]),z=w[0],C=1;C<w.length;C++){var B=yb(v,z,w[C]);B=Nb(B);x.push("data:image/png;base64,"+B);z+=w[C]}v=y}d=d.concat(this.h.parseMedia(v,p?p[q]:b,c,x))}return d};
function AE(a,b,c,d){a=a.i;if(!a||c.length<2)return null;var e=[];c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;if(!f)return null;e.push(f)}c=b[0];f=[];for(var g=0;g<e.length;g++){var h=d.segmentStart+(b[g]-c)/a;f.push({periodStart:d.periodStart,segmentStart:Math.min(Math.max(h,d.segmentStart),d.segmentEnd),segmentEnd:Math.min(Math.max(h+e[g]/a,d.segmentStart),d.segmentEnd),vttOffset:d.vttOffset,isMpegTs:d.isMpegTs})}f[f.length-1].segmentEnd=d.segmentEnd;return f}
K("shaka.text.Mp4TtmlParser",zE);zE.prototype.parseMedia=zE.prototype.parseMedia;zE.prototype.setManifestType=zE.prototype.setManifestType;zE.prototype.parseInit=zE.prototype.parseInit;Me('application/mp4; codecs="stpp"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml.im1i"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml.im1t"',function(){return new zE});
Me('application/mp4; codecs="stpp.ttml.im2i"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml.im2t"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml.etd1"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new zE});Me('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new zE});Me('application/mp4; codecs="stpp.TTML.im1t"',function(){return new zE});function BE(){this.h="UNKNOWN"}BE.prototype.parseInit=function(){};BE.prototype.setManifestType=function(a){this.h=a};
BE.prototype.parseMedia=function(a,b){a=Fb(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 L(2,2,2E3);a=b.vttOffset;if(this.h=="HLS"&&c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=c.slice(1);var e=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!e||!d)throw new L(2,2,2E3);e=ld(e[1]);if(e==null)throw new L(2,2,2E3);d=Number(d[1]);var f=b.segmentStart-b.periodStart;a=(a=a.join("\n").match(/^[ \t]*((?:\d+:)?\d{2}:\d{2}\.\d{3})[ \t]+--\x3e/m))?
ld(a[1]):null;a!=null&&(f-=a-e);d+=Math.max(0,Math.round((f-d/9E4)/95443.7176888889))*8589934592;a=b.periodStart+d/9E4-e}b=CE(c[0]);e=new Map;Yd(e);d=[];f=!1;c=t(c.slice(1));for(var g=c.next();!g.done;g=c.next())if(g=g.value.split("\n"),DE(g))f||b.push(EE(g.slice(1).join("\n"),":"));else{if((g.length!=1||g[0])&&!FE.test(g[0])&&g[0]=="STYLE"){for(var h=[],k=-1,l=1;l<g.length;l++)g[l].includes("::cue")&&(h.push([]),k=h.length-1),k!=-1&&(h[k].push(g[l]),g[l].includes("}")&&(k=-1));h=t(h);for(k=h.next();!k.done;k=
h.next()){var m=k.value;k="global";(l=m[0].match(/\((.*)\)/))&&(k=l.pop());l=m.slice(1,-1);m[0].includes("}")&&(m=/\{(.*?)\}/.exec(m[0]))&&(l=m[1].split(";"));(m=e.get(k))||(m=new Ld(0,0,""));for(var n=!1,p=0;p<l.length;p++){var u=/^\s*([^:]+):\s*(.*)/.exec(l[p]);if(u){var q=u[2].trim().replace(";","");switch(u[1].trim()){case "background-color":case "background":n=!0;m.backgroundColor=q;break;case "color":n=!0;m.color=q;break;case "font-family":n=!0;m.fontFamily=q;break;case "font-size":n=!0;m.fontSize=
/^\d*\.?\d+%$/.test(q)?parseFloat(q)/100+"em":q;break;case "font-weight":if(parseInt(q,10)>=700||q=="bold")n=!0,m.fontWeight=de;break;case "font-style":switch(q){case "normal":n=!0;m.fontStyle=Ud;break;case "italic":n=!0;m.fontStyle=ee;break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=!0;m.opacity=parseFloat(q);break;case "text-combine-upright":n=!0;m.textCombineUpright=q;break;case "text-shadow":n=!0;m.textShadow=q;break;case "white-space":n=!0,m.wrapLine=q!="noWrap"}}}n&&e.set(k,
m)}}m=g;p=a;if(m.length==1&&!m[0]||FE.test(m[0])||m[0]=="STYLE"||DE(m))g=null;else if(g=null,n=0,m[0].includes("--\x3e")||(g=m[0],n=1),h=new fd(m[n]),k=jd(h),u=id(h,/[ \t]+--\x3e[ \t]+/g),l=jd(h),k==null||u==null||l==null)Wa("Failed to parse VTT time code. Cue skipped:",g,m),g=null;else{k+=p;l+=p;k<0&&(k=0);p="";for(u=n+1;u<m.length;u++)u>n+1&&(p+="\n"),p+=m[u];p=p.trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=p):m=new Ld(k,l,p);id(h,/[ \t]+/gm);GE(m,h,b);Xd(m,
e);g!=null&&(m.id=g);g=m}g&&(f=!0,d.push(g))}return d};function HE(a){var b=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").split(/\n{2,}/m);a=CE(b[0]);b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");if(c.some(function(d){return d.includes("--\x3e")}))break;DE(c)&&a.push(EE(c.slice(1).join("\n"),":"))}return a}function CE(a){var b=[];a=t(a.split("\n"));for(var c=a.next();!c.done;c=a.next())c=c.value,/^Region:/.test(c)&&b.push(EE(c.substring(7),"="));return b}
function DE(a){return/^REGION[ \t]*$/.test(a[0])&&!(a.length>1&&a[1].includes("--\x3e"))}
function EE(a,b){var c=new ad;c.height=3;c.heightUnits=2;c.regionAnchorX=0;c.regionAnchorY=100;c.viewportAnchorX=0;c.viewportAnchorY=100;a=t(a.split(/[ \t\n]+/));for(var d=a.next();!d.done;d=a.next())if(d=d.value){var e=d.indexOf(b);if(!(e<=0||e==d.length-1)){var f=d.substring(e+1);switch(d.substring(0,e)){case "id":c.id=f;break;case "width":d=IE(f);if(d==null)break;c.width=d;break;case "lines":if(!/^\d+$/.test(f))break;c.height=Number(f);c.heightUnits=2;break;case "regionanchor":d=JE(f);if(!d)break;
c.regionAnchorX=d[0];c.regionAnchorY=d[1];break;case "viewportanchor":d=JE(f);if(!d)break;c.viewportAnchorX=d[0];c.viewportAnchorY=d[1];break;case "scroll":f=="up"&&(c.scroll="up")}}}return c}
function GE(a,b,c){gd(b,function(d){var e;if(e=KE.exec(d))d=e[1],d=="middle"?a.textAlign=Nd:a.textAlign=ge[d.toUpperCase()];else if(e=LE.exec(d))a.writingMode=e[1]=="lr"?"vertical-lr":"vertical-rl";else if(e=ME.exec(d))a.size=Number(e[1]);else if(e=NE.exec(d))a.position=Number(e[1]),e[2]&&(d=e[2],a.positionAlign=d=="line-left"||d=="start"?"line-left":d=="line-right"||d=="end"?"line-right":d=="center"||d=="middle"?"center":Md);else if(e=OE.exec(d)){b:{for(d=c.length-1;d>=0;d--)if(c[d].id==e[1]){d=
c[d];break b}d=null}d&&(a.region=d)}else b:{if(e=PE.exec(d))a.lineInterpretation=1;else if(e=QE.exec(d))a.lineInterpretation=Qd;else break b;a.line=Number(e[1]);e[2]&&(a.lineAlign=ie[e[2].toUpperCase()])}});a.region.id&&(a.line!=null||a.size&&a.size!=100||a.writingMode!=Pd)&&(a.region=new ad)}function JE(a){var b=a.indexOf(",");if(b<0)return null;var c=IE(a.substring(0,b));a=IE(a.substring(b+1));return c==null||a==null?null:[c,a]}
function IE(a){if(!/^\d+(?:\.\d+)?%$/.test(a))return null;a=parseFloat(a);return a>100?null:a}K("shaka.text.VttTextParser",BE);BE.prototype.parseMedia=BE.prototype.parseMedia;BE.prototype.setManifestType=BE.prototype.setManifestType;BE.prototype.parseInit=BE.prototype.parseInit;
var FE=/^NOTE($|[ \t])/,KE=/^align:(start|middle|center|end|left|right)$/,LE=/^vertical:(lr|rl)$/,ME=/^size:([\d.]+)%$/,NE=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,OE=/^region:(.+)$/,PE=/^line:([\d.]+)%(?:,(start|end|center))?$/,QE=/^line:(-?\d+)(?:,(start|end|center))?$/;Me("text/vtt",function(){return new BE});Me('text/vtt; codecs="vtt"',function(){return new BE});Me('text/vtt; codecs="wvtt"',function(){return new BE});function RE(){this.h=null;this.i=[]}RE.prototype.parseInit=function(a){var b=this,c=!1;(new jh).ma(uh,oh).P("mdhd",function(d){d=Gh(d.reader,d.version);b.h=d.timescale}).P("stsd",qh).box("wvtt",function(d){c=!0;d.reader.skip(8);oh(d)}).box("vttC",th(function(d){b.i=HE(Fb(d))},!1)).parse(a);if(!this.h)throw new L(2,2,2008);if(!c)throw new L(2,2,2008);};RE.prototype.setManifestType=function(){};
RE.prototype.parseMedia=function(a,b){var c=this;if(!a.length)return[];if(!this.h)throw new L(2,2,2008);var d=0,e=[],f=[],g=!1,h=!1,k=!1,l=null;(new jh).ma(vh,oh).P("tfdt",function(m){g=!0;d=Fh(m.reader,m.version).za}).P("tfhd",function(m){l=Eh(m.reader,m.flags).Hb}).P("trun",function(m){h=!0;e=Hh(m.reader,m.version,m.flags).sc}).box("mdat",th(function(m){k=!0;var n=e,p=d,u=l,q=p;m=new ah(m,0);n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.tc||u,x=v.gf?p+v.gf:q;q=x+(w||0);var y=0;
do{var z=m.R();if(z<8)throw new L(2,2,2008);y+=z;var C=m.R(),B=null;nh(C)=="vttc"?z>8&&(B=m.wa(z-8,!1)):m.skip(z-8);w&&B&&(z=SE(B,b.periodStart+x/c.h,b.periodStart+q/c.h,c.i),f.push(z))}while(v.sampleSize&&y<v.sampleSize)}p=t(e);for(u=p.next();!u.done;u=p.next())d+=u.value.tc||l||0;e=[]},!1)).parse(a,!1);if(!k&&!g&&!h)throw new L(2,2,2008);return f.filter(cf)};
function SE(a,b,c,d){var e,f,g;(new jh).box("payl",th(function(h){e=Fb(h)},!1)).box("iden",th(function(h){f=Fb(h)},!1)).box("sttg",th(function(h){g=Fb(h)},!1)).parse(a);return e?TE(e,f,g,b,c,d):null}function TE(a,b,c,d,e,f){a=new Ld(d,e,a);Xd(a);b&&(a.id=b);c&&GE(a,new fd(c),f);return a}K("shaka.text.Mp4VttParser",RE);RE.prototype.parseMedia=RE.prototype.parseMedia;RE.prototype.setManifestType=RE.prototype.setManifestType;RE.prototype.parseInit=RE.prototype.parseInit;
Me('application/mp4; codecs="wvtt"',function(){return new RE});function UE(a){this.o=a;this.frameIndex=0;this.l=new Map;this.m=null}UE.prototype.destroy=function(){this.l.clear()};UE.prototype.getOriginalMimeType=function(){return this.o};function VE(a,b){a=ni(a);if(a.length){var c;a=(c=a.find(function(d){return d.description==="com.apple.streaming.transportStreamTimestamp"}))==null?void 0:c.data;if(typeof a=="number")return a}return b}
function WE(a,b,c,d){c=a.l.getOrInsertComputed(c.id+"_"+d.discontinuitySequence,function(){if(b.h.length===0)throw Error("StreamInfos must have elements");var f=[];for(var g=t(b.h),h=g.next();!h.done;h=g.next()){var k=f,l=k.push,m=b,n=h.value;h=dq;var p=n.id+1,u=n.stream.width||0,q=n.stream.height||0;n.type=="audio"&&(q=u=0);var v=n.duration*n.timescale,w=Math.floor(v/(Bq+1));v=Math.floor(v%(Bq+1));var x=Fq.value();qq(x,p,20);qq(x,w,28);qq(x,v,32);oq(x,u,88);oq(x,q,92);p=dq("tkhd",x);u=n;n=dq;w=u.duration*
u.timescale;q=Math.floor(w/(Bq+1));w=Math.floor(w%(Bq+1));v=u.stream.language;v=v.charCodeAt(0)-96<<10|v.charCodeAt(1)-96<<5|v.charCodeAt(2)-96;x=Gq.value();qq(x,u.timescale,20);qq(x,q,24);qq(x,w,28);oq(x,v,32);q=dq("mdhd",x);w=new Uint8Array([]);switch(u.type){case "video":w=Iq.value();break;case "audio":w=Jq.value()}w=dq("hdlr",w);a:{switch(u.type){case "video":m=dq("minf",dq("vmhd",Kq.value()),Nq.value(),cq(m,u));break a;case "audio":m=dq("minf",dq("smhd",Lq.value()),Nq.value(),cq(m,u));break a}m=
new Uint8Array([])}m=n("mdia",q,w,m);h=h("trak",p,m);l.call(k,h)}g=b.h[0];k=dq;l=k.apply;p=g.duration*g.timescale;h=Math.floor(p/(Bq+1));p=Math.floor(p%(Bq+1));m=Eq.value();qq(m,g.timescale,20);qq(m,h,24);qq(m,p,28);h=["moov",dq("mvhd",m)];p=h.concat;f=wa(f);m=[];n=t(b.h);for(w=n.next();!w.done;w=n.next())u=m,q=u.push,w=w.value.id+1,v=Hq.value(),qq(v,w,4),w=dq("trex",v),q.call(u,w);m=dq.apply(bq,["mvex"].concat(wa(m)));f=l.call(k,bq,p.call(h,f,[m,vq(g.stream)]));g=Mq.value();k=new Uint8Array(g.byteLength+
f.byteLength);k.set(g);k.set(f,g.byteLength);return k});d=a.m!==c;var e=zq(b);a.m=c;a.frameIndex++;return{data:e,init:d?c:null}}K("shaka.transmuxer.BaseTransmuxer",UE);UE.prototype.getOriginalMimeType=UE.prototype.getOriginalMimeType;UE.prototype.destroy=UE.prototype.destroy;var XE=Object.freeze({pg:0,Qe:0,Oe:0,De:0,Ee:2,qg:0}),YE=Object.freeze({pg:0,Qe:0,Oe:0,De:0,Ee:2,qg:0}),ZE=Object.freeze({pg:0,Qe:0,Oe:0,De:0,Ee:1,qg:1});function $E(){UE.apply(this,arguments)}ta($E,UE);$E.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?Pm(this.convertCodecs("audio",a)):!1};$E.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Ee(b)||"mp4a.40.2")+'"':b};
$E.prototype.transmux=function(a,b,c,d){var e=yb(a);a=oi(e);for(var f=a.length;f<e.length&&!Vi(e,f);f++);var g=VE(a,c.endTime*1E3);a=Ui(e,f);if(!a)return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=a.sampleRate;b.channelsCount=a.channelCount;for(var h=[];f<e.length;){var k=Ti(e,f);if(!k)return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));var l=k.Jd+k.ha;f+l<=e.length&&h.push({data:e.subarray(f+k.Jd,f+l),size:k.ha,duration:1024,ab:0,flags:XE});f+=l}e=a.sampleRate;f=Math.floor(g*
e/1E3);d={id:b.id,type:"audio",codecs:a.codec,timescale:e,duration:d,cb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,za:f,Sa:h},stream:b};return Promise.resolve(WE(this,new bq([d]),b,c))};K("shaka.transmuxer.AacTransmuxer",$E);$E.prototype.transmux=$E.prototype.transmux;$E.prototype.convertCodecs=$E.prototype.convertCodecs;$E.prototype.isSupported=$E.prototype.isSupported;le("audio/aac",function(){return new $E("audio/aac")},1);function aF(){UE.apply(this,arguments)}ta(aF,UE);aF.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?Pm(this.convertCodecs("audio",a)):!1};aF.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?ob().Vd()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};
aF.prototype.transmux=function(a,b,c,d){a=yb(a);for(var e=oi(a),f=e.length;f<a.length&&!Si(a,f);f++);e=VE(e,c.endTime*1E3);for(var g=0,h=new Uint8Array([]),k=[],l={sampleRate:0,channelCount:0,Pb:new Uint8Array(0),ha:0};f<a.length;){if(!Ri(a,f,l))return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;g=l.sampleRate;h=l.Pb;k.push({data:a.subarray(f,f+l.ha),size:l.ha,duration:1536,ab:0,flags:XE});f+=l.ha}return Promise.resolve(WE(this,new bq([{id:b.id,
type:"audio",codecs:"ac-3",timescale:g,duration:d,cb:h,data:{sequenceNumber:this.frameIndex,za:Math.floor(e*g/1E3),Sa:k},stream:b}]),b,c))};K("shaka.transmuxer.Ac3Transmuxer",aF);aF.prototype.transmux=aF.prototype.transmux;aF.prototype.convertCodecs=aF.prototype.convertCodecs;aF.prototype.isSupported=aF.prototype.isSupported;le("audio/ac3",function(){return new aF("audio/ac3")},1);function bF(){UE.apply(this,arguments)}ta(bF,UE);bF.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?Pm(this.convertCodecs("audio",a)):!1};bF.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};
bF.prototype.transmux=function(a,b,c,d){a=yb(a);for(var e=oi(a),f=e.length;f<a.length&&!oj(a,f);f++);e=VE(e,c.endTime*1E3);for(var g=0,h=new Uint8Array([]),k=[],l={sampleRate:0,channelCount:0,Pb:new Uint8Array(0),ha:0};f<a.length;){if(!nj(a,f,l))return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;g=l.sampleRate;h=l.Pb;k.push({data:a.subarray(f,f+l.ha),size:l.ha,duration:1536,ab:0,flags:XE});f+=l.ha}return Promise.resolve(WE(this,new bq([{id:b.id,
type:"audio",codecs:"ec-3",timescale:g,duration:d,cb:h,data:{sequenceNumber:this.frameIndex,za:Math.floor(e*g/1E3),Sa:k},stream:b}]),b,c))};K("shaka.transmuxer.Ec3Transmuxer",bF);bF.prototype.transmux=bF.prototype.transmux;bF.prototype.convertCodecs=bF.prototype.convertCodecs;bF.prototype.isSupported=bF.prototype.isSupported;le("audio/ec3",function(){return new bF("audio/ec3")},1);function cF(){UE.apply(this,arguments)}ta(cF,UE);cF.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?Pm(this.convertCodecs("audio",a)):!1};cF.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};
cF.prototype.transmux=function(a,b,c,d){for(var e=yb(a),f=oi(e).length;f<e.length&&!Dj(e,f);f++);var g;for(a=[];f<e.length;){var h=xj(e,f);h?(g||(g=h),f+h.ha<=e.length&&a.push({data:e.subarray(f,f+h.ha),size:h.ha,duration:1152,ab:0,flags:XE}),f+=h.ha):f++}if(!g)return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));e=g.Yk*9E4/g.sampleRate*this.frameIndex;d={id:b.id,type:"audio",codecs:"mp3",timescale:g.sampleRate,duration:d,cb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,za:e,Sa:a},stream:b};
return Promise.resolve(WE(this,new bq([d]),b,c))};K("shaka.transmuxer.Mp3Transmuxer",cF);cF.prototype.transmux=cF.prototype.transmux;cF.prototype.convertCodecs=cF.prototype.convertCodecs;cF.prototype.isSupported=cF.prototype.isSupported;le("audio/mpeg",function(){return new cF("audio/mpeg")},1);function dF(a){this.i=a;this.h=null}r=dF.prototype;r.destroy=function(){};r.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=Ee(a).split(","),c=xc("audio",b);b=xc("video",b);return!c||b||Ae(c)!="mp3"?!1:Pm(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.i};
r.transmux=function(a,b,c,d,e){this.h?this.h.clearData():this.h=new Ci;this.h.hf(c.discontinuitySequence);a=yb(a);a=this.h.parse(a);if(a.Ed().audio!="mp3"||e!="audio")return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));c=[];e=t(a.kb());for(a=e.next();!a.done;a=e.next())a=a.value,a.data&&c.push(a.data);c=Ub(c);e=[];for(a=0;a<c.length;)(b=xj(c,a))?(a+b.ha<=c.length&&e.push(c.subarray(a,a+b.ha)),a+=b.ha):a++;return Promise.resolve(Ub(e))};K("shaka.transmuxer.MpegTsTransmuxer",dF);
dF.prototype.transmux=dF.prototype.transmux;dF.prototype.getOriginalMimeType=dF.prototype.getOriginalMimeType;dF.prototype.convertCodecs=dF.prototype.convertCodecs;dF.prototype.isSupported=dF.prototype.isSupported;dF.prototype.destroy=dF.prototype.destroy;le("video/mp2t",function(){return new dF("video/mp2t")},2);function eF(a){UE.call(this,a);this.h=this.j=this.i=null}ta(eF,UE);eF.prototype.destroy=function(){UE.prototype.destroy.call(this);this.j&&this.j.destroy()};eF.prototype.isSupported=function(a,b){if(!fF(a))return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Ee(c).split(",");c=xc("audio",d);d=xc("video",d);if(c&&(c=Ae(c),!gF.includes(c))||d&&(c=Ae(d),!hF.includes(c)))return!1;if(b)return Pm(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Pm(b)||Pm(a)};
function fF(a){a=a.toLowerCase().split(";")[0];return a=="video/mp2t"||a=="audio/mp2t"}eF.prototype.convertCodecs=function(a,b){return fF(b)?(b=Ee(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Ge(c,"audio/mp4")}).map(Ie).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};
eF.prototype.transmux=function(a,b,c,d,e){var f=yb(a);if(e=="audio"&&!Pi(f)){for(var g=oi(f),h=g.length;h<f.length;h++)if(Dj(f,h))return Promise.reject(new L(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(Vi(f,h))return this.j||(this.j=new $E("audio/aac")),this.j.transmux(a,b,c,d,e);return Promise.reject(new L(2,3,3018,c?c.S()[0]:null))}this.i?this.i.clearData():this.i=new Ci;this.i.hf(c.discontinuitySequence);var k=this.i.parse(f),l=[],m=k.Ed();try{var n=null;if(e=="video"){switch(m.video){case "avc":var p=
[],u=null,q=k.zc(),v=rj(q);if(!v.length)throw new L(2,3,3023,c?c.S()[0]:null);for(var w=0;w<v.length;w++){var x=v[w];u==null&&(u=x.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(x.dts||0):v.length>1?(x.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;p.push({data:x.data,size:x.data.byteLength,duration:y,ab:Math.round((x.pts||0)-(x.dts||0)),flags:x.isKeyframe?YE:ZE})}for(var z=[],C=t(q),B=C.next();!B.done;B=C.next())z.push.apply(z,wa(B.value.nalus));var A=pj(z);if(!A||u==null)throw new L(2,3,
3018,c?c.S()[0]:null);b.height=b.height||A.height;b.width=b.width||A.width;n={id:b.id,type:"video",codecs:"avc1",timescale:9E4,duration:d,cb:A.ae,Ac:A.Ac,Mc:A.Mc,data:{sequenceNumber:this.frameIndex,za:u,Sa:p},stream:b};break;case "hvc":var D=[],F=null,E=[],G=k.zc(),J=new Uint8Array(0),N=!1;if(!G.length)throw new L(2,3,3023,c?c.S()[0]:null);for(var P=0;P<G.length;P++){var U=G[P],Q=U.nalus;E.push.apply(E,wa(Q));for(var M=!1,O=[],V=0,ea=!1,ha=t(Q),I=ha.next();!I.done;I=ha.next()){var T=I.value;switch(T.type){case 1:case 0:var R=
ea=!0;break;case 19:case 20:case 21:M=R=ea=!0;break;case 32:case 33:case 34:R=!0;break;case 35:ea=R=!0;break;case 39:case 40:R=!0;break;default:R=!1}R&&(O.push(T.fullData),V+=T.fullData.byteLength)}if(ea&&O.length){V+=4*O.length;for(var S=new Uint8Array(V),X=0,ka=t(O),na=ka.next();!na.done;na=ka.next()){var Aa=na.value,ja=Aa.byteLength;S[X]=ja>>24&255;S[X+1]=ja>>16&255;S[X+2]=ja>>8&255;S[X+3]=ja&255;S.set(Aa,X+4);X+=ja+4}J=S;N=M;var ua=!0}else ua=!1;if(ua){F==null&&U.dts!=null&&(F=U.dts);var vb=void 0;
vb=P+1<G.length?(G[P+1].dts||0)-(U.dts||0):G.length>1?(U.dts||0)-(G[P-1].dts||0):(c.endTime-c.startTime)*9E4;D.push({data:J,size:J.byteLength,duration:vb,ab:Math.round((U.pts||0)-(U.dts||0)),flags:N?YE:ZE})}}var wb=sj(E);if(!wb||F==null)throw new L(2,3,3018,c?c.S()[0]:null);b.height=b.height||wb.height;b.width=b.width||wb.width;n={id:b.id,type:"video",codecs:"hvc1",timescale:9E4,duration:d,cb:wb.ae,Ac:wb.Ac,Mc:wb.Mc,data:{sequenceNumber:this.frameIndex,za:F,Sa:D},stream:b};break;case "av1":var eg=
[],qd=null,Lc=k.zc();if(!Lc.length)throw new L(2,3,3023,c?c.S()[0]:null);for(var Yc=0;Yc<Lc.length;Yc++){var bb=Lc[Yc],We=Ch(bb.data);if(We){var Vv=Bh(We),Wv=Xi(Vv);Wv&&(this.h=Wv);if(this.h){qd==null&&bb.dts!=null&&(qd=bb.dts);var Xv=void 0;Xv=Yc+1<Lc.length?(Lc[Yc+1].dts||0)-(bb.dts||0):Lc.length>1?(bb.dts||0)-(Lc[Yc-1].dts||0):(c.endTime-c.startTime)*9E4;a:{for(var NF=this.h.Lg,Yv=t(Vv),En=Yv.next();!En.done;En=Yv.next()){var aj=En.value;if(aj.type==6||aj.type==3){if(NF){var Fn=!0;break a}if(!aj.data.byteLength)break;
var Zv=aj.data[0];if(Zv&128)break;Fn=(Zv&96)>>5==0;break a}}Fn=!1}eg.push({data:We,size:We.byteLength,duration:Xv,ab:Math.round((bb.pts||0)-(bb.dts||0)),flags:Fn?YE:ZE})}}}if(!this.h||qd==null)throw new L(2,3,3018,c?c.S()[0]:null);b.height=b.height||this.h.height;b.width=b.width||this.h.width;n={id:b.id,type:"video",codecs:"av01",timescale:9E4,duration:d,cb:this.h.ae,data:{sequenceNumber:this.frameIndex,za:qd,Sa:eg},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var bj=
[],dd,te=null,yd=null,ue=null,$v=t(k.kb()),Gn=$v.next();!Gn.done;Gn=$v.next()){var cj=Gn.value,ic=cj.data;if(ic){var Tb=0;if(yd==-1&&ue)ic=Sb(ue,cj.data),yd=null;else if(yd!=null&&ue){Tb=Math.max(0,yd);var aw=Sb(ue,ic.subarray(0,Tb));bj.push({data:aw,size:aw.byteLength,duration:1024,ab:0,flags:XE});yd=ue=null}dd=Ui(ic,Tb);if(!dd)throw new L(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=dd.sampleRate;b.channelsCount=dd.channelCount;te==null&&cj.pts!==null&&(te=cj.pts);for(;Tb<ic.length;){var nf=Ti(ic,
Tb);if(!nf){ue=ic.subarray(Tb,ic.length);yd=-1;break}var Mg=nf.Jd+nf.ha;yd=Math.max(0,Tb+Mg-ic.length);yd!=0?ue=ic.subarray(Tb+nf.Jd,Tb+Mg):Tb+Mg<=ic.length&&bj.push({data:ic.subarray(Tb+nf.Jd,Tb+Mg),size:nf.ha,duration:1024,ab:0,flags:XE});Tb+=Mg}}}if(!dd||te==null){te=c.startTime*9E4;var Hn=xc("audio",b.codecs.split(","));if(!Hn||!b.channelsCount||!b.audioSamplingRate)throw new L(2,3,3018,c?c.S()[0]:null);dd={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Hn};var In=Wi(Hn,b.channelsCount);
if(!In)throw new L(2,3,3018,c?c.S()[0]:null);for(var OF=te+(c.endTime-c.startTime)*9E4,bw=te;bw<OF;)bj.push({data:In,size:In.byteLength,duration:1024,ab:0,flags:XE}),bw+=1024/dd.sampleRate*9E4}var cw=dd.sampleRate,PF=te/9E4*cw;n={id:b.id,type:"audio",codecs:dd.codec,timescale:cw,duration:d,cb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,za:PF,Sa:bj},stream:b};break;case "ac3":for(var dw=[],dj=0,Jn=new Uint8Array([]),ej=null,zd={sampleRate:0,channelCount:0,Pb:new Uint8Array(0),ha:0},ew=
t(k.kb()),Kn=ew.next();!Kn.done;Kn=ew.next()){var Ln=Kn.value,Mn=Ln.data;ej==null&&Ln.pts!==null&&(ej=Ln.pts);for(var of=0;of<Mn.length;)Ri(Mn,of,zd)?(b.audioSamplingRate=zd.sampleRate,b.channelsCount=zd.channelCount,dj=zd.sampleRate,Jn=zd.Pb,dw.push({data:Mn.subarray(of,of+zd.ha),size:zd.ha,duration:1536,ab:0,flags:XE}),of+=zd.ha):of++}if(dj==0||Jn.byteLength==0||ej==null)throw new L(2,3,3018,c?c.S()[0]:null);n={id:b.id,type:"audio",codecs:"ac-3",timescale:dj,duration:d,cb:Jn,data:{sequenceNumber:this.frameIndex,
za:ej/9E4*dj,Sa:dw},stream:b};break;case "ec3":for(var fw=[],fj=0,Nn=new Uint8Array([]),gj=null,Ad={sampleRate:0,channelCount:0,Pb:new Uint8Array(0),ha:0},gw=t(k.kb()),On=gw.next();!On.done;On=gw.next()){var Pn=On.value,Qn=Pn.data;gj==null&&Pn.pts!==null&&(gj=Pn.pts);for(var pf=0;pf<Qn.length;)nj(Qn,pf,Ad)?(b.audioSamplingRate=Ad.sampleRate,b.channelsCount=Ad.channelCount,fj=Ad.sampleRate,Nn=Ad.Pb,fw.push({data:Qn.subarray(pf,pf+Ad.ha),size:Ad.ha,duration:1536,ab:0,flags:XE}),pf+=Ad.ha):pf++}if(fj==
0||Nn.byteLength==0||gj==null)throw new L(2,3,3018,c?c.S()[0]:null);n={id:b.id,type:"audio",codecs:"ec-3",timescale:fj,duration:d,cb:Nn,data:{sequenceNumber:this.frameIndex,za:gj/9E4*fj,Sa:fw},stream:b};break;case "mp3":for(var hw=[],hj,ij=null,iw=[],jw=t(k.kb()),Rn=jw.next();!Rn.done;Rn=jw.next()){var jj=Rn.value;jj.data&&(ij==null&&jj.pts!==null&&(ij=jj.pts),iw.push(jj.data))}for(var kj=Ub(iw),ve=0;ve<kj.length;){var qf=xj(kj,ve);qf?(hj||(hj=qf),ve+qf.ha<=kj.length&&hw.push({data:kj.subarray(ve,
ve+qf.ha),size:qf.ha,duration:1152,ab:0,flags:XE}),ve+=qf.ha):ve++}if(!hj||ij==null)throw new L(2,3,3018,c?c.S()[0]:null);var kw=hj.sampleRate,QF=ij/9E4*kw;n={id:b.id,type:"audio",codecs:"mp3",timescale:kw,duration:d,cb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,za:QF,Sa:hw},stream:b};break;case "opus":var lw=[],lj=null,Pc=k.M;if(!Pc)throw new L(2,3,3018,c?c.S()[0]:null);var qb=[];switch(Pc.ij){case 1:case 2:qb=[0];break;case 0:qb=[255,1,1,0,1];break;case 128:qb=[255,2,0,0,1];break;case 3:qb=
[1,2,1,0,2,1];break;case 4:qb=[1,2,2,0,1,2,3];break;case 5:qb=[1,3,2,0,4,1,2,3];break;case 6:qb=[1,4,2,0,4,1,2,3,5];break;case 7:qb=[1,4,2,0,4,1,2,3,5,6];break;case 8:qb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:qb=[1,1,2,0,1];break;case 131:qb=[1,1,3,0,1,2];break;case 132:qb=[1,1,4,0,1,2,3];break;case 133:qb=[1,1,5,0,1,2,3,4];break;case 134:qb=[1,1,6,0,1,2,3,4,5];break;case 135:qb=[1,1,7,0,1,2,3,4,5,6];break;case 136:qb=[1,1,8,0,1,2,3,4,5,6,7]}var mw=new Uint8Array([0,Pc.channelCount,0,0,Pc.sampleRate>>>
24&255,Pc.sampleRate>>>17&255,Pc.sampleRate>>>8&255,Pc.sampleRate>>>0&255,0,0].concat(wa(qb)));for(var nw=Pc.sampleRate,ow=t(k.kb()),Sn=ow.next();!Sn.done;Sn=ow.next()){var Tn=Sn.value,rf=Tn.data;lj==null&&Tn.pts!==null&&(lj=Tn.pts);for(var Ng=0;Ng<rf.length;){for(var RF=(rf[Ng+1]&16)!==0,SF=(rf[Ng+1]&8)!==0,ed=Ng+2,mj=0;rf[ed]===255;)mj+=255,ed+=1;mj+=rf[ed];ed+=1;ed+=RF?2:0;ed+=SF?2:0;var Un=rf.slice(ed,ed+mj);lw.push({data:Un,size:Un.byteLength,duration:Ej(Un),ab:0,flags:XE});Ng=ed+mj}}if(mw.byteLength==
0||lj==null)throw new L(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Pc.sampleRate;b.channelsCount=Pc.channelCount;n={id:b.id,type:"audio",codecs:"opus",timescale:nw,duration:d,cb:mw,data:{sequenceNumber:this.frameIndex,za:lj/9E4*nw,Sa:lw},stream:b}}n&&(l.push(n),n=null)}}catch(Vn){return Vn&&Vn.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(Vn)}return l.length?Promise.resolve(WE(this,new bq(l),b,c)):Promise.reject(new L(2,3,3018,c?c.S()[0]:null))};
K("shaka.transmuxer.TsTransmuxer",eF);eF.prototype.transmux=eF.prototype.transmux;eF.prototype.convertCodecs=eF.prototype.convertCodecs;eF.prototype.isSupported=eF.prototype.isSupported;eF.prototype.destroy=eF.prototype.destroy;var gF=["aac","ac-3","ec-3","mp3","opus"],hF=["av01","avc","hevc"];le("video/mp2t",function(){return new eF("video/mp2t")},3);le("audio/mp2t",function(){return new eF("audio/mp2t")},3);function iF(a){this.h=new Uint8Array(a);Bb(this.h);this.i=0}iF.prototype.Ia=function(){return this.i};iF.prototype.Na=function(){return this.i};iF.prototype.seek=function(a){if(a>this.h.length)throw new L(2,3,3025);this.i=a};iF.prototype.skip=function(a){var b=this.i+a;b<=this.h.length||(b=new Uint8Array(Math.max(this.h.length*2,b)),b.set(this.h),this.h=b,Bb(this.h));this.i+=a};K("shaka.util.DataViewWriter",iF);iF.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1};function jF(){this.o=[];this.i=[];this.h=[];this.l=[];this.j=[];this.u=!1;this.m=new Set;this.B=(new Map).set("audio",this.i).set("video",this.h).set(zc,this.l).set("image",this.j)}r=jF.prototype;r.release=function(){for(var a=t(this.i.concat(this.h,this.l,this.j)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.i=[];this.h=[];this.l=[];this.j=[];this.o=[];this.u=!1;this.m.clear();this.B.clear()};r.jk=function(){return this.o};r.ek=function(){return this.l.slice()};
r.Oj=function(){return this.j};r.sj=function(a,b){if(a){var c=this.B.get(a.type)||[];c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;kF(d,a);d=lF(d);d=t(d);for(var e=d.next();!e.done;e=d.next())kF(e.value,a)}a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};function kF(a,b){var c;a.matchedStreams=(c=a.matchedStreams)==null?void 0:c.filter(function(d){return d!==b})}function mF(a,b){return new Map(a.map(function(c){return[b(c),c]}))}
function nF(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=mF(h.audioStreams,oF);var k=mF(h.videoStreams,pF),l=mF(h.textStreams,qF);h=mF(h.imageStreams,rF);if(b){var m=sF(zc);l.set(qF(m),m);m=sF("image");h.set(rF(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{zf:c,kh:d,fh:e,lg:f}}
r.oj=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G,J,N,P,U,Q,M,O,V,ea;return H(function(ha){switch(ha.i){case 1:e=Bc;if(!b&&a.length==1){f=nF(a,!1);g=f.zf;h=f.kh;k=f.fh;l=f.lg;d.i=Array.from(g[0].values());d.h=Array.from(h[0].values());d.l=Array.from(k[0].values());d.j=Array.from(l[0].values());ha.A(2);break}m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)u=a[p],d.m.has(u.id)||(d.m.add(u.id),n==-1&&(n=p));if(n!=-1){ha.A(3);break}return ha.h(tF(d,a),4);case 4:return ha.return();
case 3:return q=nF(a,!0),v=q.zf,w=q.kh,x=q.fh,y=q.lg,ha.h(Promise.all([uF(d,d.i,v,n,m),uF(d,d.h,w,n,m),uF(d,d.l,x,n,m),uF(d,d.j,y,n,m)]),2);case 2:z=0;C=[];if(d.h.length&&d.i.length)for(J=t(d.i),N=J.next();!N.done;N=J.next())for(P=N.value,U=t(d.h),Q=U.next();!Q.done;Q=U.next())M=Q.value,O=Yb(P.drmInfos,M.drmInfos),P.drmInfos.length&&M.drmInfos.length&&!O.length||(V=(P.bandwidth||0)+(M.bandwidth||0),P.dependencyStream&&(V+=P.dependencyStream.bandwidth||0),M.dependencyStream&&(V+=M.dependencyStream.bandwidth||
0),ea=z++,C.push({id:ea,language:P.language,disabledUntilTime:0,primary:P.primary,audio:P,video:M,bandwidth:V,drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.h.length?d.h:d.i,A=t(B),D=A.next();!D.done;D=A.next())F=D.value,E=z++,G=F.bandwidth||0,F.dependencyStream&&(G+=F.dependencyStream.bandwidth||0),C.push({id:E,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.Z?F:null,video:F.type==e.qa?F:null,bandwidth:G,drmInfos:F.drmInfos,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]});d.o=C;ha.l()}})};
function tF(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,q,v,w,x,y,z;return H(function(C){switch(C.i){case 1:c=nF(b,!1),d=[{Xe:a.i,kf:c.zf},{Xe:a.h,kf:c.kh},{Xe:a.l,kf:c.fh},{Xe:a.j,kf:c.lg}],e=t(d),f=e.next();case 2:if(f.done){C.A(0);break}h=g=f.value;k=h.Xe;l=h.kf;m=t(k);n=m.next();case 5:if(n.done){f=e.next();C.A(2);break}p=n.value;u=p.matchedStreams;if(!u){C.A(6);break}q=t(l);v=q.next();case 8:if(v.done){C.A(6);break}w=v.value;x=vF(a,w,p);if(!x||u.includes(x)){C.A(9);break}y=u.length;u.push(x);C.o(11);if(!p.segmentIndex){C.A(13);
break}return C.h(wF(p,y),13);case 13:C.u(12);break;case 11:throw z=C.m(),u.pop(),z;case 12:xF(p,x);case 9:v=q.next();C.A(8);break;case 6:n=m.next(),C.A(5)}})}
function uF(a,b,c,d,e){var f=yF,g=xF,h,k,l,m,n,p,u,q,v,w,x,y,z,C,B,A,D,F,E,G;return H(function(J){switch(J.i){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return J.h(zF(a,n,c,d,g,h,e),5);case 5:p=J.j;if(!p)throw new L(2,4,4037);m=l.next();J.A(2);break;case 4:u=t(h);for(q=u.next();!q.done;q=u.next())for(v=q.value,w=t(v),x=w.next();!x.done;x=w.next())y=x.value,(z=AF(a,b,y,c,f,g,h))&&b.push(z);C=t(h);
for(B=C.next();!B.done;B=C.next())for(A=B.value,D=t(A),F=D.next(),E={};!F.done;E={Yg:void 0},F=D.next())if(E.Yg=F.value,!BF(E.Yg)&&(G=b.some(function(N){return function(P){return CF(N.Yg,P)}}(E))))throw new L(2,4,4037);return J.return(b)}})}function zF(a,b,c,d,e,f,g){return H(function(h){if(h.i==1)return DF(a,c,b,g>0),b.matchedStreams?b.segmentIndex?h.h(wF(b,d+g),2):h.A(2):h.return(!1);EF(b,d,e,f,g);return h.return(!0)})}
function wF(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(p.i==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)for(f=d[e],c.push(f.createSegmentIndex()),g=lF(f),h=t(g),k=h.next();!k.done;k=h.next())l=k.value,l.segmentIndex||c.push(l.createSegmentIndex());return p.h(Promise.all(c),2)}if(a.segmentIndex instanceof Mm)for(m=b;m<d.length;m++)n=d[m],n.segmentIndex&&a.segmentIndex.j.push(n.segmentIndex);p.l()})}
function AF(a,b,c,d,e,f,g){if(BF(c))return null;var h=e(c);DF(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return H(function(k){if(h.segmentIndex)return k.A(0);h.segmentIndex=new Mm;return k.h(wF(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=t(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=t(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;EF(h,0,f,g,0);return h}
function EF(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"&&qc(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function yF(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 FF(a,b){a||(a=[]);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,a.includes(c)||a.push(c);return a}
function xF(a,b){a.roles=FF(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=FF(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var c=t(b.keyIds),d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.originalId==null?a.originalId=b.originalId:(c=b.originalId||"")&&!a.originalId.endsWith(c)&&(a.originalId+=","+c);c=Yb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new L(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||
(a.closedCaptions=new Map),c=t(b.closedCaptions),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));c=t(GF);for(d=c.next();!d.done;d=c.next())HF(a,b,d.value)}
function HF(a,b,c){var d=b[c]||null,e=a[c]||null;d?(e||(e=yF(d),e.matchedStreams=[],e.createSegmentIndex=function(){var f,g,h,k;return H(function(l){switch(l.i){case 1:if(e.segmentIndex)return l.return();f=new Mm;g=t(e.matchedStreams);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return l.h(k.createSegmentIndex(),5);case 5:f.j.push(k.segmentIndex);h=g.next();l.A(2);break;case 4:e.segmentIndex=f,l.l()}})},a[c]=e),e.matchedStreams.push(d),xF(e,d)):e&&(e.matchedStreams.push(b),
xF(e,b))}function DF(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=vF(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function vF(a,b,c){var d={audio:oF,video:pF,text:qF,image:rF}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return CF(l,m)},video:function(l,m){return CF(l,m)},text:IF,image:JF}[c.type];for(var g={audio:KF,video:LF,text:MF,image:TF}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!BF(e)&&b.delete(d(e));return e}
function UF(a,b){return a.mimeType!=b.mimeType?!1:VF(a.codecs)===VF(b.codecs)}r.rl=function(a){this.u=a};function CF(a,b){return a.drmInfos&&!Wb(a.drmInfos,b.drmInfos)?!1:!0}function IF(a,b){return b.language?a.forced!==b.forced||qc(a.language,b.language)==0?!1:!0:!0}function JF(){return!0}
function KF(a,b,c){var d=WF(a,b,c);if(d===XF)return!0;if(d===YF)return!1;d=qc(a.language,b.language);var e=qc(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=ZF(a.channelsCount,b.channelsCount,c.channelsCount);if(d==XF)return!0;if(d==YF)return!1;d=ZF(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==XF?!0:d==YF?!1:a.bandwidth&&$F(a.bandwidth,b.bandwidth,c.bandwidth)==XF?!0:!1}
function LF(a,b,c){var d=WF(a,b,c);if(d===XF)return!0;if(d===YF)return!1;d=ZF(a.width*a.height,b.width*b.height,c.width*c.height);if(d==XF)return!0;if(d==YF)return!1;if(a.frameRate){d=ZF(a.frameRate,b.frameRate,c.frameRate);if(d==XF)return!0;if(d==YF)return!1}return a.bandwidth&&$F(a.bandwidth,b.bandwidth,c.bandwidth)==XF?!0:!1}
function MF(a,b,c){var d=qc(a.language,b.language),e=qc(a.language,c.language);if(e>d)return!0;if(e<d)return!1;d=b.kind==a.kind;if((e=c.kind==a.kind)&&!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 TF(a,b,c){return ZF(a.width*a.height,b.width*b.height,c.width*c.height)==XF?!0:!1}function sF(a){return Wf({originalId:"",segmentIndex:new Jm([]),type:a})}
function ZF(a,b,c){if(b==a&&a!=c)return YF;if(c==a&&a!=b)return XF;if(b>a){if(c<=a||c-a<b-a)return XF;if(c-a>b-a)return YF}else{if(c>a)return YF;if(a-c<a-b)return XF;if(a-c>a-b)return YF}return aG}function WF(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 YF;if(!d&&e)return XF;b=UF(a,b);a=UF(a,c);return b&&!a?YF:!b&&a?XF:aG}function $F(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?XF:b<a?YF:aG}
function BF(a){switch(a.type){case zc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function pF(a){var b,c;return bG([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,(c=(b=a.dependencyStream)==null?void 0:b.baseOriginalId)!=null?c:a.baseOriginalId,Array.from(a.keyIds)])}
function oF(a){var b,c;return bG([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,(c=(b=a.dependencyStream)==null?void 0:b.baseOriginalId)!=null?c:a.baseOriginalId,Array.from(a.keyIds)])}function qF(a){return bG([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function rF(a){return bG([a.width,a.codecs,a.mimeType])}function bG(a){return JSON.stringify(a)}
function VF(a){return cG.getOrInsertComputed(a,function(){return Ae(a)})}function lF(a){for(var b=[],c=t(GF),d=c.next();!d.done;d=c.next())(d=a[d.value])&&b.push(d);return b}K("shaka.util.PeriodCombiner",jF);jF.prototype.setUseStreamOnce=jF.prototype.rl;jF.prototype.combinePeriods=jF.prototype.oj;jF.prototype.deleteStream=jF.prototype.sj;jF.prototype.getImageStreams=jF.prototype.Oj;jF.prototype.getTextStreams=jF.prototype.ek;jF.prototype.getVariants=jF.prototype.jk;
var GF=["trickModeVideo","dependencyStream"],XF=1,aG=0,YF=-1,cG=new Map;[].concat(by,$x,ay,Zx).filter(function(a,b,c){return c.indexOf(a)===b});}).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.hls.map