shaka-player 4.8.1 → 4.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,10 +15,10 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function y(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ha="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ia;
17
17
  if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:{var ka={a:!0},la={};try{la.__proto__=ka;ja=la.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ma=ia;
18
- function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ij=b.prototype}function oa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function pa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}oa.prototype.s=function(a){this.h=a};
19
- function qa(a,b){a.i={Yf:b,jg:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}oa.prototype.u=function(a){this.g=a};function G(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Yf;a.i=null;return b}function wa(a){a.A=[a.i];a.m=0;a.j=0}
20
- function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.jg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new oa;this.h=a}function Aa(a,b){pa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
21
- function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,qa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,qa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.jg)throw b.Yf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
18
+ function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Hj=b.prototype}function oa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function pa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}oa.prototype.s=function(a){this.h=a};
19
+ function qa(a,b){a.i={Zf:b,kg:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}oa.prototype.u=function(a){this.g=a};function G(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Zf;a.i=null;return b}function wa(a){a.A=[a.i];a.m=0;a.j=0}
20
+ function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.kg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new oa;this.h=a}function Aa(a,b){pa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
21
+ function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,qa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,qa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.kg)throw b.Zf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
22
22
  function Ea(a){this.next=function(b){pa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this.throw=function(b){pa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(qa(a.g,b),b=Da(a));return b};this.return=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
23
23
  function L(a){return Ga(new Ea(new za(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
24
24
  ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
@@ -39,7 +39,7 @@ function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,
39
39
  ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
40
40
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
41
41
  b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ja(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}ea("Array.prototype.keys",function(a){return a?a:function(){return Ja(this,function(b){return b})}});
42
- function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{gg:e,v:f}}return{gg:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).gg}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
+ function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{hg:e,v:f}}return{hg:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).hg}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
43
  ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
44
  ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=La(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}});
45
45
  ea("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
@@ -53,19 +53,19 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function Oa(){}function Pa(){};function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Wa(){}function Xa(a){var b=Ha.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ta,y(b)))}function $a(){}function ab(){}function bb(){}var Ya=new Set;window.console&&(Wa=function(){return console.warn.apply(console,y(Ha.apply(0,arguments)))},Ua=function(){console.error.apply(console,y(Ha.apply(0,arguments)))});function cb(){this.g={}}r=cb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function eb(){this.g=new cb}r=eb.prototype;r.release=function(){this.ib();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};r.na=function(a,b,c,d){function e(g){f.Kb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Kb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Kb(),this.g.remove(b,e))}};
57
- r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Kb();this.g.g={}}};P("shaka.util.EventManager",eb);eb.prototype.removeAll=eb.prototype.ib;eb.prototype.unlisten=eb.prototype.Kb;eb.prototype.listenOnce=eb.prototype.na;eb.prototype.listen=eb.prototype.D;eb.prototype.release=eb.prototype.release;function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gb(a,d);this.target.addEventListener(b,c,this.g)}
56
+ function Oa(){}function Pa(){};function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Wa(){}function Xa(a){var b=Ha.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ta,y(b)))}function $a(){}function ab(){}function bb(){}var Ya=new Set;window.console&&(Wa=function(){return console.warn.apply(console,y(Ha.apply(0,arguments)))},Ua=function(){console.error.apply(console,y(Ha.apply(0,arguments)))});function cb(){this.g={}}r=cb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function db(){this.g=new cb}r=db.prototype;r.release=function(){this.ib();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};r.na=function(a,b,c,d){function e(g){f.Kb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Kb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Kb(),this.g.remove(b,e))}};
57
+ r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Kb();this.g.g={}}};P("shaka.util.EventManager",db);db.prototype.removeAll=db.prototype.ib;db.prototype.unlisten=db.prototype.Kb;db.prototype.listenOnce=db.prototype.na;db.prototype.listen=db.prototype.D;db.prototype.release=db.prototype.release;function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gb(a,d);this.target.addEventListener(b,c,this.g)}
58
58
  fb.prototype.Kb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return ib(a)?b:b.capture||!1}
59
59
  function ib(a){var b=jb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}jb=b}return b||!1}var jb=void 0;function lb(a){if(mb.has(a))return mb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);mb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),mb.set(a,b),b):!1}function nb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var mb=new Map;function ob(a,b){this.g=a;this.h=b}ob.prototype.toString=function(){return"v"+this.g+"."+this.h};function pb(a,b){var c=new ob(5,0),d=qb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function rb(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 sb(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var qb=null;function tb(){}tb.prototype.extract=function(){};tb.prototype.decode=function(){return[]};tb.prototype.clear=function(){};tb.prototype.getStreams=function(){return[]};function vb(){}vb.prototype.init=function(){};vb.prototype.parse=function(){return[]};function wb(){}function xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(zb(a)==zb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Ab(a);b=Ab(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function zb(a){return a instanceof ArrayBuffer?a:a.buffer}function Bb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
60
60
  function Ab(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,DataView)}function Cb(a,b,c,d){var e=zb(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)}
61
61
  P("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=Ab;wb.toArrayBuffer=Bb;wb.equal=xb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.h=function(){};Fb.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",Fb);function Gb(a){this.l=new vb;if(a=Hb[a.toLowerCase()])this.l=a();this.g=new tb;if(a=Ib)this.g=a()}Gb.prototype.init=function(a){this.l.init(a)};Gb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Ab(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
62
- Gb.prototype.h=function(){this.g.clear()};Gb.prototype.j=function(){return this.g.getStreams()};P("shaka.media.ClosedCaptionParser",Gb);Gb.findDecoder=function(){return Ib};Gb.unregisterDecoder=function(){Ib=null};Gb.registerDecoder=function(a){Ib=a};Gb.findParser=function(a){return Hb[a]};Gb.unregisterParser=function(a){delete Hb[a]};Gb.registerParser=function(a,b){Hb[a]=b};var Hb={},Ib=null;function Jb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Kb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Lb(a,b,c){c||(c=Jb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={ne:d.ne},e=a.next()){d.ne=e.value;e=b.findIndex(function(f){return function(g){return c(f.ne,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
62
+ Gb.prototype.h=function(){this.g.clear()};Gb.prototype.j=function(){return this.g.getStreams()};P("shaka.media.ClosedCaptionParser",Gb);Gb.findDecoder=function(){return Ib};Gb.unregisterDecoder=function(){Ib=null};Gb.registerDecoder=function(a){Ib=a};Gb.findParser=function(a){return Hb[a]};Gb.unregisterParser=function(a){delete Hb[a]};Gb.registerParser=function(a,b){Hb[a]=b};var Hb={},Ib=null;function Jb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Kb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Lb(a,b,c){c||(c=Jb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={oe:d.oe},e=a.next()){d.oe=e.value;e=b.findIndex(function(f){return function(g){return c(f.oe,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
63
63
  function Mb(a,b,c){c||(c=Jb);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 Nb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Ob;this.position=null;this.positionAlign=Pb;this.size=0;this.textAlign=Qb;this.direction=Rb;this.writingMode=Tb;this.lineInterpretation=Ub;this.line=null;this.lineHeight="";this.lineAlign=Vb;this.displayAlign=Wb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Xb;this.fontStyle=Yb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
64
- "";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={Rb:32,rows:15}}function Zb(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}Nb.prototype.clone=function(){var a=new Nb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
64
+ "";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={Sb:32,rows:15}}function Zb(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}Nb.prototype.clone=function(){var a=new Nb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
65
65
  function $b(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Mb(a.nestedCues,b.nestedCues,$b))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Mb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}P("shaka.text.Cue",Nb);Nb.equal=$b;Nb.prototype.clone=Nb.prototype.clone;var Pb="auto";
66
66
  Nb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Pb};var Qb="center",ac={LEFT:"left",RIGHT:"right",CENTER:Qb,START:"start",END:"end"};Nb.textAlign=ac;var Wb="after",bc={BEFORE:"before",CENTER:"center",AFTER:Wb};Nb.displayAlign=bc;var Rb="ltr";Nb.direction={HORIZONTAL_LEFT_TO_RIGHT:Rb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Tb="horizontal-tb";Nb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Tb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ub=0;
67
67
  Nb.lineInterpretation={LINE_NUMBER:Ub,PERCENTAGE:1};var Vb="start",cc={CENTER:"center",START:Vb,END:"end"};Nb.lineAlign=cc;var dc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Nb.defaultTextColor=dc;var ec={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Nb.defaultTextBackgroundColor=ec;var Xb=400;Nb.fontWeight={NORMAL:Xb,BOLD:700};
68
- var Yb="normal",fc={NORMAL:Yb,ITALIC:"italic",OBLIQUE:"oblique"};Nb.fontStyle=fc;Nb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Ob(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=gc;this.scroll=hc}P("shaka.text.CueRegion",Ob);var gc=1;Ob.units={PX:0,PERCENTAGE:gc,LINES:2};var hc="";Ob.scrollMode={NONE:hc,UP:"up"};function ic(){}ic.prototype.destroy=function(){};function jc(a,b,c){kc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ge:b}}function lc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([mc,nc,oc,pc]),e=d.next();!e.done;e=d.next())if(e=kc[c+"-"+e.value]){var f=e.ge(),g=f.isSupported(a,b);f.destroy();if(g)return e.ge}return null}P("shaka.transmuxer.TransmuxerEngine",ic);ic.findTransmuxer=lc;ic.unregisterTransmuxer=function(a,b){delete kc[a.toLowerCase().split(";")[0]+"-"+b]};
68
+ var Yb="normal",fc={NORMAL:Yb,ITALIC:"italic",OBLIQUE:"oblique"};Nb.fontStyle=fc;Nb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Ob(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=gc;this.scroll=hc}P("shaka.text.CueRegion",Ob);var gc=1;Ob.units={PX:0,PERCENTAGE:gc,LINES:2};var hc="";Ob.scrollMode={NONE:hc,UP:"up"};function ic(){}ic.prototype.destroy=function(){};function jc(a,b,c){kc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,he:b}}function lc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([mc,nc,oc,pc]),e=d.next();!e.done;e=d.next())if(e=kc[c+"-"+e.value]){var f=e.he(),g=f.isSupported(a,b);f.destroy();if(g)return e.he}return null}P("shaka.transmuxer.TransmuxerEngine",ic);ic.findTransmuxer=lc;ic.unregisterTransmuxer=function(a,b){delete kc[a.toLowerCase().split(";")[0]+"-"+b]};
69
69
  ic.registerTransmuxer=jc;ic.prototype.destroy=ic.prototype.destroy;var kc={},pc=1,oc=2,nc=3,mc=4;ic.PluginPriority={FALLBACK:pc,PREFERRED_SECONDARY:oc,PREFERRED:nc,APPLICATION:mc};/*
70
70
  @license
71
71
  Copyright 2008 The Closure Library Authors
@@ -76,10 +76,10 @@ var qc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
76
76
  Copyright 2006 The Closure Library Authors
77
77
  SPDX-License-Identifier: Apache-2.0
78
78
  */
79
- function rc(a){var b;a instanceof rc?(sc(this,a.kb),this.lc=a.lc,tc(this,a.wb),uc(this,a.Bc),this.Pa=a.Pa,vc(this,a.g.clone()),this.Vb=a.Vb):a&&(b=String(a).match(qc))?(sc(this,b[1]||"",!0),this.lc=wc(b[2]||""),tc(this,b[3]||"",!0),uc(this,b[4]),this.Pa=wc(b[5]||"",!0),vc(this,b[6]||"",!0),this.Vb=wc(b[7]||"")):this.g=new xc(null)}r=rc.prototype;r.kb="";r.lc="";r.wb="";r.Bc=null;r.Pa="";r.Vb="";
80
- r.toString=function(){var a=[],b=this.kb;b&&a.push(yc(b,zc,!0),":");if(b=this.wb){a.push("//");var c=this.lc;c&&a.push(yc(c,zc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Bc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(yc(b,"/"==b.charAt(0)?Ac:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",yc(b,Dc));return a.join("")};
81
- r.resolve=function(a){var b=this.clone();"data"===b.kb&&(b=new rc);var c=!!a.kb;c?sc(b,a.kb):c=!!a.lc;c?b.lc=a.lc:c=!!a.wb;c?tc(b,a.wb):c=null!=a.Bc;var d=a.Pa;if(c)uc(b,a.Bc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.wb&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
82
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.g.toString();c?vc(b,a.g.clone()):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};r.clone=function(){return new rc(this)};function sc(a,b,c){a.kb=c?wc(b,!0):b;a.kb&&(a.kb=a.kb.replace(/:$/,""))}function tc(a,b,c){a.wb=c?wc(b,!0):b}function uc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Bc=b}else a.Bc=null}
79
+ function rc(a){var b;a instanceof rc?(sc(this,a.kb),this.mc=a.mc,tc(this,a.wb),uc(this,a.Bc),this.Pa=a.Pa,vc(this,a.g.clone()),this.Wb=a.Wb):a&&(b=String(a).match(qc))?(sc(this,b[1]||"",!0),this.mc=wc(b[2]||""),tc(this,b[3]||"",!0),uc(this,b[4]),this.Pa=wc(b[5]||"",!0),vc(this,b[6]||"",!0),this.Wb=wc(b[7]||"")):this.g=new xc(null)}r=rc.prototype;r.kb="";r.mc="";r.wb="";r.Bc=null;r.Pa="";r.Wb="";
80
+ r.toString=function(){var a=[],b=this.kb;b&&a.push(yc(b,zc,!0),":");if(b=this.wb){a.push("//");var c=this.mc;c&&a.push(yc(c,zc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Bc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(yc(b,"/"==b.charAt(0)?Ac:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Wb)&&a.push("#",yc(b,Dc));return a.join("")};
81
+ r.resolve=function(a){var b=this.clone();"data"===b.kb&&(b=new rc);var c=!!a.kb;c?sc(b,a.kb):c=!!a.mc;c?b.mc=a.mc:c=!!a.wb;c?tc(b,a.wb):c=null!=a.Bc;var d=a.Pa;if(c)uc(b,a.Bc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.wb&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
82
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.g.toString();c?vc(b,a.g.clone()):c=!!a.Wb;c&&(b.Wb=a.Wb);return b};r.clone=function(){return new rc(this)};function sc(a,b,c){a.kb=c?wc(b,!0):b;a.kb&&(a.kb=a.kb.replace(/:$/,""))}function tc(a,b,c){a.wb=c?wc(b,!0):b}function uc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Bc=b}else a.Bc=null}
83
83
  function vc(a,b,c){b instanceof xc?a.g=b:(c||(b=yc(b,Ec)),a.g=new xc(b))}function wc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var zc=/[#\/\?@]/g,Cc=/[#\?:]/g,Ac=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function xc(a){this.g=a||null}
84
84
  function Gc(a){if(!a.Ca&&(a.Ca={},a.Zc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=xc.prototype;r.Ca=null;r.Zc=null;function Hc(a){Gc(a);return a.Zc}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ca.hasOwnProperty(a)?this.Ca[a]:null;c||(this.Ca[a]=c=[]);c.push(b);this.Zc++;return this};
85
85
  r.set=function(a,b){Gc(this);this.g=null;this.Ca.hasOwnProperty(a)?this.Ca[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ca[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ca)return"";var a=[],b;for(b in this.Ca)for(var c=encodeURIComponent(b),d=this.Ca[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
@@ -92,33 +92,33 @@ HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORT
92
92
  MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,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,
93
93
  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,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
94
94
  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,
95
- CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){this.h=a;this.g=null}Lc.prototype.W=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Lc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Mc(a){this.h=a;this.g=null}Mc.prototype.jc=function(){this.stop();this.h();return this};Mc.prototype.W=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.h()})).W(a);return this};Mc.prototype.$a=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.g.W(a);b.h()})).W(a);return this};Mc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Mc);Mc.prototype.stop=Mc.prototype.stop;Mc.prototype.tickEvery=Mc.prototype.$a;
96
- Mc.prototype.tickAfter=Mc.prototype.W;Mc.prototype.tickNow=Mc.prototype.jc;function Nc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Rc(){return Sc("Xbox One")}function Tc(){return Sc("Tizen")}function Uc(){return Sc("Tizen 3")}function Vc(){return Sc("Tizen 2")}function Wc(){return Sc("Web0S")}function Xc(){return Sc("CrKey")}
95
+ CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){this.h=a;this.g=null}Lc.prototype.X=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Lc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Mc(a){this.h=a;this.g=null}Mc.prototype.kc=function(){this.stop();this.h();return this};Mc.prototype.X=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.h()})).X(a);return this};Mc.prototype.Sa=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.g.X(a);b.h()})).X(a);return this};Mc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Mc);Mc.prototype.stop=Mc.prototype.stop;Mc.prototype.tickEvery=Mc.prototype.Sa;
96
+ Mc.prototype.tickAfter=Mc.prototype.X;Mc.prototype.tickNow=Mc.prototype.kc;function Nc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Rc(){return Sc("Xbox One")}function Tc(){return Sc("Tizen")}function Uc(){return Sc("Tizen 3")}function Vc(){return Sc("Tizen 2")}function Wc(){return Sc("Web0S")}function Xc(){return Sc("CrKey")}
97
97
  function Yc(){if(!Sc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function Zc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Tc()&&!Sc("PC=EOS")&&!Sc("PC=APL")&&!Sc("VirginMedia")&&!Sc("SOPOpenBrowser")&&!$c()&&!Sc("AFT")&&!Sc("WPE")}function ad(){return Sc("PlayStation 5")}function $c(){return Sc("PlayStation 4")}function bd(){return Sc("Hisense")||Sc("VIDAA")}
98
- function cd(){if(!Zc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Sc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.W(1);return dd}
98
+ function cd(){if(!Zc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Sc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.X(1);return dd}
99
99
  function fd(){var a,b,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:a={width:Infinity,height:Infinity};if(Xc()){window.cast&&cast.__platform__&&cast.__platform__.canDisplayType&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);m.u(2);break}if(Tc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),a.width=
100
100
  b.width,a.height=b.height):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(n){Wa("Tizen: Error detecting screen size, default screen size 1920x1080.")}m.u(2);break}if(Rc()){c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=null;try{do e=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"',
101
- "com.microsoft.playready.recommendation");while(e===d.maybe)}catch(n){e=d.notSupported}e===d.probably?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);m.u(2);break}if(Wc()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.Hj),a.height=Math.max(1080,f.Gj)}catch(n){Wa("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}m.u(2);break}if(bd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=
102
- 2160):(a.width=1920,a.height=1080);m.u(2);break}if(!$c()&&!ad()){m.u(2);break}g=!1;ra(m,8);return C(m,window.msdk.device.getDisplayInfo(),10);case 10:h=m.h;g="4K"===h.resolution;ta(m,9);break;case 8:return va(m),ra(m,11),C(m,window.msdk.device.getDisplayInfoImmediate(),13);case 13:k=m.h;g="4K"===k.resolution;ta(m,9);break;case 11:l=va(m),Wa("PlayStation: Failed to get the display info:",l);case 9:g?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);case 2:return m.return(a)}})}
101
+ "com.microsoft.playready.recommendation");while(e===d.maybe)}catch(n){e=d.notSupported}e===d.probably?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);m.u(2);break}if(Wc()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=Math.max(1080,f.screenHeight)}catch(n){Wa("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}m.u(2);break}if(bd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?
102
+ (a.width=3840,a.height=2160):(a.width=1920,a.height=1080);m.u(2);break}if(!$c()&&!ad()){m.u(2);break}g=!1;ra(m,8);return C(m,window.msdk.device.getDisplayInfo(),10);case 10:h=m.h;g="4K"===h.resolution;ta(m,9);break;case 8:return va(m),ra(m,11),C(m,window.msdk.device.getDisplayInfoImmediate(),13);case 13:k=m.h;g="4K"===k.resolution;ta(m,9);break;case 11:l=va(m),Wa("PlayStation: Failed to get the display info:",l);case 9:g?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);case 2:return m.return(a)}})}
103
103
  var ed=null,dd=null;function gd(){}
104
104
  function hd(a){if(!a)return"";a=Ab(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!$c())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
105
105
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
106
- function kd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new Q(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Eb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ld(d)}
107
- function md(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ab(a);if(239==c[0]&&187==c[1]&&191==c[2])return hd(c);if(254==c[0]&&255==c[1])return kd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return kd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return kd(a,!1);if(0==c[1]&&0==c[3])return kd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return hd(a);throw new Q(2,2,2003);}
106
+ function id(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new Q(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Eb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ld(d)}
107
+ function md(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ab(a);if(239==c[0]&&187==c[1]&&191==c[2])return hd(c);if(254==c[0]&&255==c[1])return id(c.subarray(2),!1);if(255==c[0]&&254==c[1])return id(c.subarray(2),!0);if(0==c[0]&&0==c[2])return id(a,!1);if(0==c[1]&&0==c[3])return id(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return hd(a);throw new Q(2,2,2003);}
108
108
  function nd(a){if(window.TextEncoder&&!$c()){var b=new TextEncoder;return Bb(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 Bb(b)}function od(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function ld(a){return pd.value()(a)}
109
- function qd(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}P("shaka.util.StringUtils",gd);gd.resetFromCharCode=function(){pd.g=void 0};gd.toUTF16=od;gd.toUTF8=nd;gd.fromBytesAutoDetect=md;gd.fromUTF16=kd;gd.fromUTF8=hd;
109
+ function qd(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}P("shaka.util.StringUtils",gd);gd.resetFromCharCode=function(){pd.g=void 0};gd.toUTF16=od;gd.toUTF8=nd;gd.fromBytesAutoDetect=md;gd.fromUTF16=id;gd.fromUTF8=hd;
110
110
  var pd=new Jc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Db:65536};0<b.Db;b={Db:b.Db},b.Db/=2)if(a(b.Db))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Db)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Db));return e}}(b);return null});function rd(){}function sd(a){a=ld(Ab(a));return btoa(a)}function td(a,b){b=void 0==b?!0:b;a=sd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function ud(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function vd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
111
- function yd(a){var b=Ab(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function zd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Ab(e),c);c+=e.byteLength}return b}P("shaka.util.Uint8ArrayUtils",rd);rd.concat=zd;rd.toHex=yd;rd.fromHex=vd;rd.fromBase64=ud;rd.toBase64=td;rd.toStandardBase64=sd;function Ad(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new rc(a[0]);b=new rc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new rc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new rc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
111
+ function wd(a){var b=Ab(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function zd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Ab(e),c);c+=e.byteLength}return b}P("shaka.util.Uint8ArrayUtils",rd);rd.concat=zd;rd.toHex=wd;rd.fromHex=vd;rd.fromBase64=ud;rd.toBase64=td;rd.toStandardBase64=sd;function Ad(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new rc(a[0]);b=new rc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new rc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new rc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
112
112
  function Bd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
113
- function Ed(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=td(vd(h),!1));var l=g;22!=l.length&&(l=td(vd(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Ab(nd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
113
+ function Cd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=td(vd(h),!1));var l=g;22!=l.length&&(l=td(vd(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Ab(nd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
114
114
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Fd(a,b){if(1==b.length)return b[0];a=Gd(a,b);if(null!=a)return a;throw new Q(2,4,4025,b);}function Gd(a,b){for(var c=t(Hd[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Id?"":null}
115
- function Jd(a,b){var c=[];a=t(Hd[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 Id="text",Kd={fa:"video",S:"audio",ma:Id,ue:"image",Gi:"application"},Hd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ld(){}function Md(a,b){var c=a;b&&!Nd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Od(a,b){b&&(a+='; codecs="'+b+'"');return a}function Pd(a,b,c){var d=Md(a,b);b=Od(a,b);lc(b)?(a=lc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
115
+ function Jd(a,b){var c=[];a=t(Hd[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 Id="text",Kd={fa:"video",S:"audio",ma:Id,ve:"image",Hi:"application"},Hd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ld(){}function Md(a,b){var c=a;b&&!Nd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Od(a,b){b&&(a+='; codecs="'+b+'"');return a}function Pd(a,b,c){var d=Md(a,b);b=Od(a,b);lc(b)?(a=lc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
116
116
  function Qd(a,b,c){var d=[b];Rd.forEach(function(e,f){var g=a[f];"codecs"==f?Nd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Sd(a){return a.split(";")[0].split("/")[1]}
117
117
  function Td(a){var b=Ud(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
118
118
  a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Vd(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Ud(c.value),b.push(c[0]);return b.sort().join(",")}function Wd(a){return a.split(";")[0]}
119
- function Xd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function be(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function Ud(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}P("shaka.util.MimeUtils",Ld);Ld.getFullTypeWithAllCodecs=Od;Ld.getFullType=Md;
119
+ function Xd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Yd(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function Ud(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}P("shaka.util.MimeUtils",Ld);Ld.getFullTypeWithAllCodecs=Od;Ld.getFullType=Md;
120
120
  var Rd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Nd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ce(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function de(a){return ee[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Ib:!1}ce.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
121
- function ge(a,b,c,d,e){var f,g,h,k,l,m,n;return L(function(q){if(1==q.g)return C(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Ab(b)),q.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Ab(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(p){return p.startTime>=a.l&&p.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);G(q)})}
121
+ function fe(a,b,c,d,e){var f,g,h,k,l,m,n;return L(function(q){if(1==q.g)return C(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Ab(b)),q.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Ab(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(p){return p.startTime>=a.l&&p.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);G(q)})}
122
122
  ce.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return C(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));G(d)})};function he(a,b,c){a.l=b;a.m=c}function ie(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
123
123
  function je(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())je(a,d.value,c)}
124
124
  function ke(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);je(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
@@ -137,7 +137,7 @@ function Be(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Ce(e,b,c);if(d.len
137
137
  g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,x){return u.bandwidth-x.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Td(m.codecs),q=Td(g.codecs);n==q&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
138
138
  x){return u.bandwidth&&x.bandwidth?u.bandwidth-x.bandwidth:u.width-x.width});b=nb();var p=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Td(m.codecs),q=Td(g.codecs),n!==q))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Td(m.codecs),q=Td(g.codecs),n==q&&g.bandwidth>m.bandwidth&&(l.push(g),p.push(g.id)))}else l.push(g),
139
139
  p.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var x=u.audio;u=u.video;return x&&!h.includes(x.id)||u&&!p.includes(u.id)?!1:!0})}
140
- function Ce(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={te:d.te},e=b.next())if(d.te=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.te)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={me:d.me},b=c.next())if(d.me=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.me)}}(d)),b.length){a=b;break}return a}function De(a,b,c){a.variants=a.variants.filter(function(d){return Ee(d,b,c)})}
140
+ function Ce(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={ue:d.ue},e=b.next())if(d.ue=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.ue)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={ne:d.ne},b=c.next())if(d.ne=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.ne)}}(d)),b.length){a=b;break}return a}function De(a,b,c){a.variants=a.variants.filter(function(d){return Ee(d,b,c)})}
141
141
  function Ee(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
142
142
  function Fe(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ee(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Ge(a,b,c){c=void 0===c?[]:c;return L(function(d){if(1==d.g)return C(d,He(a,b,0<b.offlineSessionIds.length,c),2);Ie(b);return C(d,Je(b),0)})}
143
143
  function He(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return C(g,Ke(b.variants,c,!1,d),2);e=null;a&&(f=a.g)&&(e=f.keySystem);b.variants=b.variants.filter(function(h){var k=Le(h,e);if(!k){var l=[];h.audio&&l.push(Me(h.audio));h.video&&l.push(Me(h.video))}return k});G(g)})}
@@ -147,8 +147,8 @@ function Qe(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=function(m,
147
147
  null;n=t(n||[]);for(var p=n.next();!p.done;p=n.next())q=c(q,p.value);q&&(m.Gc[m.Hc]=q,d=c(d,q))}}(f)));return C(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
148
148
  function Se(a){var b=[""];a.video&&(b=Xd(a.video.contentType).split(","));var c=[""];a.audio&&(c=Xd(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={},g=t(c),h=g.next();!h.done;f={Mb:f.Mb},h=g.next())h=h.value,f.Mb=ye(a),a.video&&(f.Mb.video.contentType=Md(Wd(f.Mb.video.contentType),e)),a.audio&&(f.Mb.audio.contentType=Md(Wd(f.Mb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Mb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
149
149
  return null})}
150
- function Ke(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.u(4);break}f.oe=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.u(7);break}n=m.value;q=Te(n,b,c).filter(function(F){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.oe}}(f));p=t(q);u=p.next();case 8:if(u.done){D.u(10);break}x=u.value;
151
- return C(D,Qe(n,x),9);case 9:u=p.next();D.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.u(5);break;case 7:if(k)return D.return();f={oe:f.oe};h=g.next();D.u(2);break;case 4:w=t(a),m=w.next();case 12:if(m.done){D.u(0);break}z=m.value;v=Te(z,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});B=t(v);u=B.next();case 15:if(u.done){m=w.next();D.u(12);break}A=u.value;return C(D,Qe(z,A),16);case 16:u=B.next(),D.u(15)}})}
150
+ function Ke(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.u(4);break}f.pe=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.u(7);break}n=m.value;q=Te(n,b,c).filter(function(F){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.pe}}(f));p=t(q);u=p.next();case 8:if(u.done){D.u(10);break}x=u.value;
151
+ return C(D,Qe(n,x),9);case 9:u=p.next();D.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.u(5);break;case 7:if(k)return D.return();f={pe:f.pe};h=g.next();D.u(2);break;case 4:w=t(a),m=w.next();case 12:if(m.done){D.u(0);break}z=m.value;v=Te(z,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});B=t(v);u=B.next();case 15:if(u.done){m=w.next();D.u(12);break}A=u.value;return C(D,Qe(z,A),16);case 16:u=B.next(),D.u(15)}})}
152
152
  function Te(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=Xd(k);if(l.includes(",")&&!d){var m=l.split(",");l=Fd("video",m);m=Fd("audio",m);m=Oe(m);m=Pd(Wd(k),m,"audio");g.push({contentType:m,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Ne(l);k={contentType:Pd(Wd(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
153
153
  "srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())k=k.value,l=Oe(Xd(k)),k=Pd(Wd(k),l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),m=l.next();!m.done;m=l.next()){m=
154
154
  m.value;var n={type:c?"file":"media-source"};k&&(n.video=k);m&&(n.audio=m);h.push(n)}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(var q=g.next();!q.done;q=g.next())f=q.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;l=[];m=t(h);for(n=m.next();!n.done;n=m.next()){n=Object.assign({},
@@ -170,47 +170,47 @@ function gf(a){var b=a.language;return{id:df(a),active:!1,type:"",bandwidth:0,la
170
170
  originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function jf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function kf(a){return a.filter(function(b){return jf(b)})}
171
171
  function lf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=xe(qe(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return qe(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=qf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(le,[]);return a.length?
172
172
  qf(e,a[0]):e}function qf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Me(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}P("shaka.util.StreamUtils",Ae);Ae.meetsRestrictions=Ee;
173
- var Re={},ef=0,Ue=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ve=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function rf(){var a=this;this.s=null;this.o=!1;this.i=new Sa;this.F=new eb;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.o&&a.g.useNetworkInformation){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=[];this.B=1;this.G=!1;this.h=this.l=this.g=this.A=null;this.C=new Mc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
173
+ var Re={},ef=0,Ue=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ve=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function rf(){var a=this;this.s=null;this.o=!1;this.i=new Sa;this.F=new db;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.o&&a.g.useNetworkInformation){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=[];this.B=1;this.G=!1;this.h=this.l=this.g=this.A=null;this.C=new Mc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
174
174
  b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}r=rf.prototype;r.stop=function(){this.s=null;this.o=!1;this.m=[];this.B=1;this.l=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.j=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.s=a};
175
175
  r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.l.clientHeight*d);c=Math.min(c,this.l.clientWidth*d)}var e=this.m.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
176
176
  this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=sf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=tf(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=sf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=sf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
177
177
  a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.A=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.o&&uf(this)};
178
178
  r.trySuggestStreams=function(){null!=this.A&&this.o&&uf(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.B=a};
179
- r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.W(vf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
180
- function uf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function sf(a,b,c,d,e){if(a.j){var f=a.j.dg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ee(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
179
+ r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.X(vf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
180
+ function uf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function sf(a,b,c,d,e){if(a.j){var f=a.j.eg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ee(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
181
181
  function tf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",rf);rf.prototype.configure=rf.prototype.configure;rf.prototype.setCmsdManager=rf.prototype.setCmsdManager;rf.prototype.setMediaElement=rf.prototype.setMediaElement;rf.prototype.playbackRateChanged=rf.prototype.playbackRateChanged;rf.prototype.setVariants=rf.prototype.setVariants;
182
- rf.prototype.getBandwidthEstimate=rf.prototype.getBandwidthEstimate;rf.prototype.trySuggestStreams=rf.prototype.trySuggestStreams;rf.prototype.segmentDownloaded=rf.prototype.segmentDownloaded;rf.prototype.disable=rf.prototype.disable;rf.prototype.enable=rf.prototype.enable;rf.prototype.chooseVariant=rf.prototype.chooseVariant;rf.prototype.init=rf.prototype.init;rf.prototype.release=rf.prototype.release;rf.prototype.stop=rf.prototype.stop;var vf=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{hj:"reload",Og:"smooth"});function wf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}wf.prototype.add=function(a,b,c){return xf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
182
+ rf.prototype.getBandwidthEstimate=rf.prototype.getBandwidthEstimate;rf.prototype.trySuggestStreams=rf.prototype.trySuggestStreams;rf.prototype.segmentDownloaded=rf.prototype.segmentDownloaded;rf.prototype.disable=rf.prototype.disable;rf.prototype.enable=rf.prototype.enable;rf.prototype.chooseVariant=rf.prototype.chooseVariant;rf.prototype.init=rf.prototype.init;rf.prototype.release=rf.prototype.release;rf.prototype.stop=rf.prototype.stop;var vf=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{ij:"reload",Pg:"smooth"});function wf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}wf.prototype.add=function(a,b,c){return xf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
183
183
  function xf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!yf(e,f)||!zf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||yf(a,b))&&zf(a.roles,b.roles)));return d?!1:!0}wf.prototype.values=function(){return this.g.values()};
184
184
  function yf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Vd(d)});b=b.codecs.split(",").map(function(d){return Vd(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function zf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Af(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Bf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Af.prototype.create=function(a){var b=this,c="smooth"==this.h&&nb(),d=a.filter(function(e){return xf(b.i,e,!c,b.g)});return d.length?new wf(d[0],d,!c,this.g):this.j.create(a)};
185
185
  function Bf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
186
186
  Bf.prototype.create=function(a){var b=[];b=Cf(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Df(b,this.A);a.length&&(b=a);this.l&&(a=Ef(b,this.l),a.length&&(b=a));this.i&&(a=Ff(b,this.i),a.length&&(b=a));this.h&&(a=Gf(b,this.h),a.length&&(b=a));this.g&&(a=Hf(b,this.g),a.length&&(b=a));this.j&&(a=If(b,this.j),a.length&&(b=a));a=Jf(b,this.B);a.length&&(b=a);return new wf(b[0],b,!("smooth"==this.m&&nb()),this.o)};
187
187
  function Cf(a,b){b=qe(b);var c=xe(b,a.map(function(d){return we(d)}));return c?a.filter(function(d){return c==we(d)}):[]}function Df(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Hf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function If(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
188
188
  function Gf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Ff(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Ef(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Jf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Kf(){this.g=Lf;this.i=(new Map).set(Lf,2).set(Mf,1);this.h=0}function Nf(a,b,c){a.i.set(Lf,c).set(Mf,b)}var Mf=0,Lf=1;function Of(a,b){var c=Pf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
189
- function Qf(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new Q(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return C(d,new Promise(function(e){(new Mc(e)).W(c/1E3)}),2)}a.h*=a.m;G(d)})}function Pf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Rf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Rf.prototype.resolve=function(){};Rf.prototype.reject=function(){};function Sf(a,b){this.promise=a;this.i=b;this.g=!1}function Tf(a){return new Sf(Promise.reject(a),function(){return Promise.resolve()})}function Uf(){var a=Promise.reject(new Q(2,7,7001));a.catch(function(){});return new Sf(a,function(){return Promise.resolve()})}function Vf(a){return new Sf(Promise.resolve(a),function(){return Promise.resolve()})}function Wf(a){return new Sf(a,function(){return a.catch(function(){})})}Sf.prototype.abort=function(){this.g=!0;return this.i()};
189
+ function Qf(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new Q(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return C(d,new Promise(function(e){(new Mc(e)).X(c/1E3)}),2)}a.h*=a.m;G(d)})}function Pf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Rf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Rf.prototype.resolve=function(){};Rf.prototype.reject=function(){};function Sf(a,b){this.promise=a;this.i=b;this.g=!1}function Tf(a){return new Sf(Promise.reject(a),function(){return Promise.resolve()})}function Uf(){var a=Promise.reject(new Q(2,7,7001));a.catch(function(){});return new Sf(a,function(){return Promise.resolve()})}function Vf(a){return new Sf(Promise.resolve(a),function(){return Promise.resolve()})}function Wf(a){return new Sf(a,function(){return a.catch(function(){})})}Sf.prototype.abort=function(){this.g=!0;return this.i()};
190
190
  function Xf(a){return new Sf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Sf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
191
191
  Sf.prototype.va=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Yf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Rf,g=new Q(2,7,7001);this.promise.then(c(!0),c(!1));return new Sf(f,function(){return d()})};
192
192
  function Yf(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()}}}P("shaka.util.AbortableOperation",Sf);Sf.prototype.chain=Sf.prototype.va;Sf.prototype["finally"]=Sf.prototype.finally;Sf.all=Xf;Sf.prototype.abort=Sf.prototype.abort;Sf.notAbortable=Wf;Sf.completed=Vf;Sf.aborted=Uf;Sf.failed=Tf;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
193
193
  function Zf(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};P("shaka.util.FakeEvent",S);
194
- var $f={Ii:"abrstatuschanged",Ji:"adaptation",Ki:"buffering",Li:"complete",Mi:"downloadfailed",Ni:"downloadheadersreceived",Oi:"drmsessionupdate",Qi:"emsg",gj:"prft",Error:"error",Ri:"expirationupdated",Si:"firstquartile",Ti:"gapjumped",Wi:"keystatuschanged",Yi:"loaded",Zi:"loading",aj:"manifestparsed",bj:"manifestupdated",cj:"mediaqualitychanged",Metadata:"metadata",dj:"midpoint",ej:"nospatialvideoinfo",fj:"onstatechange",ij:"ratechange",jj:"segmentappended",kj:"sessiondata",lj:"spatialvideoinfo",
195
- mj:"stalldetected",nj:"started",oj:"statechanged",pj:"streaming",qj:"textchanged",rj:"texttrackvisibility",sj:"thirdquartile",tj:"timelineregionadded",uj:"timelineregionenter",vj:"timelineregionexit",wj:"trackschanged",yj:"unloading",Aj:"variantchanged"};function ag(){this.ia=new cb;this.Ud=this}ag.prototype.addEventListener=function(a,b){this.ia&&this.ia.push(a,b)};ag.prototype.removeEventListener=function(a,b){this.ia&&this.ia.remove(a,b)};ag.prototype.dispatchEvent=function(a){if(!this.ia)return!0;var b=this.ia.get(a.type)||[],c=this.ia.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ud;a.currentTarget=this.Ud;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
196
- ag.prototype.release=function(){this.ia=null};function bg(){this.g=[]}function cg(a,b){a.g.push(b.finally(function(){Kb(a.g,b)}))}bg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function dg(a,b,c,d,e,f){ag.call(this);this.i=!1;this.m=new bg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.A=d||null;this.C=e||null;this.B=f||null;this.o=!1}na(dg,ag);r=dg.prototype;r.Cf=function(a){this.o=a};function eg(a,b,c,d){c=c||fg;var e=gg[a];if(!e||c>=e.priority)gg[a]={priority:c,ge:b,bi:void 0===d?!1:d}}r.ei=function(a){this.g.add(a)};r.Bi=function(a){this.g.delete(a)};r.$g=function(){this.g.clear()};r.fi=function(a){this.h.add(a)};r.Ci=function(a){this.h.delete(a)};
197
- r.ah=function(){this.h.clear()};function hg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();ag.prototype.release.call(this);return this.m.destroy()};
194
+ var $f={Ji:"abrstatuschanged",Ki:"adaptation",Li:"buffering",Mi:"complete",Ni:"downloadfailed",Oi:"downloadheadersreceived",Pi:"drmsessionupdate",Ri:"emsg",hj:"prft",Error:"error",Si:"expirationupdated",Ti:"firstquartile",Ui:"gapjumped",Xi:"keystatuschanged",Zi:"loaded",$i:"loading",bj:"manifestparsed",cj:"manifestupdated",dj:"mediaqualitychanged",Metadata:"metadata",ej:"midpoint",fj:"nospatialvideoinfo",gj:"onstatechange",jj:"ratechange",kj:"segmentappended",lj:"sessiondata",mj:"spatialvideoinfo",
195
+ nj:"stalldetected",oj:"started",pj:"statechanged",qj:"streaming",rj:"textchanged",sj:"texttrackvisibility",tj:"thirdquartile",uj:"timelineregionadded",vj:"timelineregionenter",wj:"timelineregionexit",xj:"trackschanged",zj:"unloading",Bj:"variantchanged"};function ag(){this.ia=new cb;this.Vd=this}ag.prototype.addEventListener=function(a,b){this.ia&&this.ia.push(a,b)};ag.prototype.removeEventListener=function(a,b){this.ia&&this.ia.remove(a,b)};ag.prototype.dispatchEvent=function(a){if(!this.ia)return!0;var b=this.ia.get(a.type)||[],c=this.ia.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Vd;a.currentTarget=this.Vd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
196
+ ag.prototype.release=function(){this.ia=null};function bg(){this.g=[]}function cg(a,b){a.g.push(b.finally(function(){Kb(a.g,b)}))}bg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function dg(a,b,c,d,e,f){ag.call(this);this.i=!1;this.m=new bg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.A=d||null;this.C=e||null;this.B=f||null;this.o=!1}na(dg,ag);r=dg.prototype;r.Df=function(a){this.o=a};function eg(a,b,c,d){c=c||fg;var e=gg[a];if(!e||c>=e.priority)gg[a]={priority:c,he:b,ci:void 0===d?!1:d}}r.fi=function(a){this.g.add(a)};r.Ci=function(a){this.g.delete(a)};r.ah=function(){this.g.clear()};r.gi=function(a){this.h.add(a)};r.Di=function(a){this.h.delete(a)};
197
+ r.bh=function(){this.h.clear()};function hg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();ag.prototype.release.call(this);return this.m.destroy()};
198
198
  r.request=function(a,b,c){var d=this,e=new ig;if(this.i){var f=Promise.reject(new Q(2,7,7001));f.catch(function(){});return new jg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ye(b.retryParameters):Pf();b.uris=ye(b.uris);f=kg(this,a,b,c);var g=f.va(function(){return lg(d,a,b,c,new Of(b.retryParameters,!1),0,null,e)}),h=g.va(function(q){return mg(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
199
- var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.va(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.Ih||!d.l||u.fromCache||"HEAD"==b.method||a!=ng||d.l(u.timeMs,u.data.byteLength,og(c));d.B&&d.B(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new jg(n.promise,function(){return n.abort()},e);cg(this.m,f);return f};
199
+ var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.va(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.Jh||!d.l||u.fromCache||"HEAD"==b.method||a!=ng||d.l(u.timeMs,u.data.byteLength,og(c));d.B&&d.B(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new jg(n.promise,function(){return n.abort()},e);cg(this.m,f);return f};
200
200
  function kg(a,b,c,d){function e(h){f=f.va(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=Vf(void 0);a.A&&e(a.A);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.va(void 0,function(h){if(h instanceof Q&&7001==h.code)throw h;throw new Q(2,1,1006,h);})}
201
- function lg(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.C&&a.C(b,d,c.uris[f],c.uris[f-1]);var k=new rc(c.uris[f]),l=k.kb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=gg[l])?l.ge:null;if(!n)return Tf(new Q(2,1,1E3,k));var q=l.bi,p=null,u=null,x=!1,w=!1,z;return Wf(Qf(e)).va(function(){if(a.i)return Uf();z=Date.now();var v=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(F,J,I){p&&p.stop();
202
- u&&u.W(D/1E3);a.l&&b==ng&&(v++,c.packetNumber=v,a.l(F,J,og(d),c),m=!0,h.g=I)},function(F){a.j&&a.j(F,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return B;var A=c.retryParameters.connectionTimeout;A&&(p=new Mc(function(){x=!0;B.abort()}),p.W(A/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Mc(function(){x=!0;B.abort()}));return B}).va(function(v){p&&p.stop();u&&u.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-z);var B={response:v,Ih:m};!w&&a.j&&a.j(v.headers,c,b);return B},
201
+ function lg(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.C&&a.C(b,d,c.uris[f],c.uris[f-1]);var k=new rc(c.uris[f]),l=k.kb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=gg[l])?l.he:null;if(!n)return Tf(new Q(2,1,1E3,k));var q=l.ci,p=null,u=null,x=!1,w=!1,z;return Wf(Qf(e)).va(function(){if(a.i)return Uf();z=Date.now();var v=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(F,J,I){p&&p.stop();
202
+ u&&u.X(D/1E3);a.l&&b==ng&&(v++,c.packetNumber=v,a.l(F,J,og(d),c),m=!0,h.g=I)},function(F){a.j&&a.j(F,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return B;var A=c.retryParameters.connectionTimeout;A&&(p=new Mc(function(){x=!0;B.abort()}),p.X(A/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Mc(function(){x=!0;B.abort()}));return B}).va(function(v){p&&p.stop();u&&u.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-z);var B={response:v,Jh:m};!w&&a.j&&a.j(v.headers,c,b);return B},
203
203
  function(v){p&&p.stop();u&&u.stop();if(a.s){var B=null,A=0;v instanceof Q&&(B=v,1001==v.code&&(A=v.data[1]));a.s(c,B,A,x)}if(a.i)return Uf();x&&(v=new Q(1,1,1003,c.uris[f],b));if(v instanceof Q){if(7001==v.code)throw v;if(1010==v.code)throw g;if(1==v.severity)return B=(new Map).set("error",v),B=new S("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,lg(a,b,c,d,e,f,v,h)}throw v;})}
204
- function mg(a,b,c,d){var e=Vf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={qe:f.qe},g=a.next())f.qe=g.value,e=e.va(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.qe(b,k,d)}}(f));return e.va(function(){return c},function(h){var k=2;if(h instanceof Q){if(7001==h.code)throw h;k=h.severity}throw new Q(k,1,1007,h);})}function og(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.md)return!1}return!0}P("shaka.net.NetworkingEngine",dg);
205
- dg.prototype.request=dg.prototype.request;dg.prototype.destroy=dg.prototype.destroy;dg.makeRequest=hg;dg.defaultRetryParameters=function(){return Pf()};dg.prototype.clearAllResponseFilters=dg.prototype.ah;dg.prototype.unregisterResponseFilter=dg.prototype.Ci;dg.prototype.registerResponseFilter=dg.prototype.fi;dg.prototype.clearAllRequestFilters=dg.prototype.$g;dg.prototype.unregisterRequestFilter=dg.prototype.Bi;dg.prototype.registerRequestFilter=dg.prototype.ei;dg.unregisterScheme=function(a){delete gg[a]};
206
- dg.registerScheme=eg;dg.prototype.setForceHTTPS=dg.prototype.Cf;function ig(){this.g=0}dg.NumBytesRemainingClass=ig;function jg(a,b,c){Sf.call(this,a,b);this.h=c}na(jg,Sf);dg.PendingRequest=jg;var ng=1;dg.RequestType={MANIFEST:0,SEGMENT:ng,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};dg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var fg=3;dg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:fg};var gg={};function pg(a){this.g=!1;this.h=new Rf;this.i=a}pg.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function qg(a,b){if(a.g){if(b instanceof Q&&7003==b.code)throw b;throw new Q(2,7,7003,b);}};function rg(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 tg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function ug(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 vg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function wg(a,b){this.h=Eb(a);this.i=b==xg;this.g=0}r=wg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.wa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.P=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw yg();}};r.ra=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw yg();}};r.M=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw yg();}};
207
- r.sg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw yg();}};r.Cc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw yg();}if(2097151<b)throw new Q(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.sb=function(a){if(this.g+a>this.h.byteLength)throw yg();var b=Ab(this.h,this.g,a);this.g+=a;return b};
208
- r.skip=function(a){if(this.g+a>this.h.byteLength)throw yg();this.g+=a};r.mi=function(a){if(this.g<a)throw yg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw yg();this.g=a};r.fc=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Ab(this.h,a,this.g-a);this.g+=1;return hd(a)};function yg(){return new Q(2,3,3E3)}P("shaka.util.DataViewReader",wg);wg.prototype.readTerminatedString=wg.prototype.fc;wg.prototype.seek=wg.prototype.seek;wg.prototype.rewind=wg.prototype.mi;
209
- wg.prototype.skip=wg.prototype.skip;wg.prototype.readBytes=wg.prototype.sb;wg.prototype.readUint64=wg.prototype.Cc;wg.prototype.readInt32=wg.prototype.sg;wg.prototype.readUint32=wg.prototype.M;wg.prototype.readUint16=wg.prototype.ra;wg.prototype.readUint8=wg.prototype.P;wg.prototype.getLength=wg.prototype.getLength;wg.prototype.getPosition=wg.prototype.wa;wg.prototype.hasMoreData=wg.prototype.ka;var xg=1;wg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:xg};function zg(){this.i=[];this.h=[];this.g=!1}r=zg.prototype;r.box=function(a,b){a=Ag(a);this.i[a]=Bg;this.h[a]=b;return this};r.O=function(a,b){a=Ag(a);this.i[a]=Cg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new wg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.Ac(0,a,b,c)};
204
+ function mg(a,b,c,d){var e=Vf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={re:f.re},g=a.next())f.re=g.value,e=e.va(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.re(b,k,d)}}(f));return e.va(function(){return c},function(h){var k=2;if(h instanceof Q){if(7001==h.code)throw h;k=h.severity}throw new Q(k,1,1007,h);})}function og(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.md)return!1}return!0}P("shaka.net.NetworkingEngine",dg);
205
+ dg.prototype.request=dg.prototype.request;dg.prototype.destroy=dg.prototype.destroy;dg.makeRequest=hg;dg.defaultRetryParameters=function(){return Pf()};dg.prototype.clearAllResponseFilters=dg.prototype.bh;dg.prototype.unregisterResponseFilter=dg.prototype.Di;dg.prototype.registerResponseFilter=dg.prototype.gi;dg.prototype.clearAllRequestFilters=dg.prototype.ah;dg.prototype.unregisterRequestFilter=dg.prototype.Ci;dg.prototype.registerRequestFilter=dg.prototype.fi;dg.unregisterScheme=function(a){delete gg[a]};
206
+ dg.registerScheme=eg;dg.prototype.setForceHTTPS=dg.prototype.Df;function ig(){this.g=0}dg.NumBytesRemainingClass=ig;function jg(a,b,c){Sf.call(this,a,b);this.h=c}na(jg,Sf);dg.PendingRequest=jg;var ng=1;dg.RequestType={MANIFEST:0,SEGMENT:ng,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};dg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var fg=3;dg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:fg};var gg={};function pg(a){this.g=!1;this.h=new Rf;this.i=a}pg.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function qg(a,b){if(a.g){if(b instanceof Q&&7003==b.code)throw b;throw new Q(2,7,7003,b);}};function rg(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 tg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function ug(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 vg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function wg(a,b){this.h=Eb(a);this.i=b==xg;this.g=0}r=wg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.wa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.P=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw yg();}};r.ra=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw yg();}};r.M=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw yg();}};
207
+ r.tg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw yg();}};r.Cc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw yg();}if(2097151<b)throw new Q(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.sb=function(a){if(this.g+a>this.h.byteLength)throw yg();var b=Ab(this.h,this.g,a);this.g+=a;return b};
208
+ r.skip=function(a){if(this.g+a>this.h.byteLength)throw yg();this.g+=a};r.ni=function(a){if(this.g<a)throw yg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw yg();this.g=a};r.hc=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Ab(this.h,a,this.g-a);this.g+=1;return hd(a)};function yg(){return new Q(2,3,3E3)}P("shaka.util.DataViewReader",wg);wg.prototype.readTerminatedString=wg.prototype.hc;wg.prototype.seek=wg.prototype.seek;wg.prototype.rewind=wg.prototype.ni;
209
+ wg.prototype.skip=wg.prototype.skip;wg.prototype.readBytes=wg.prototype.sb;wg.prototype.readUint64=wg.prototype.Cc;wg.prototype.readInt32=wg.prototype.tg;wg.prototype.readUint32=wg.prototype.M;wg.prototype.readUint16=wg.prototype.ra;wg.prototype.readUint8=wg.prototype.P;wg.prototype.getLength=wg.prototype.getLength;wg.prototype.getPosition=wg.prototype.wa;wg.prototype.hasMoreData=wg.prototype.ka;var xg=1;wg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:xg};function zg(){this.i=[];this.h=[];this.g=!1}r=zg.prototype;r.box=function(a,b){a=Ag(a);this.i[a]=Bg;this.h[a]=b;return this};r.O=function(a,b){a=Ag(a);this.i[a]=Cg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new wg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.Ac(0,a,b,c)};
210
210
  r.Ac=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.M(),g=b.M(),h=Dg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.Cc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Cg){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.M();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.sb(d):new Uint8Array(0),b=new wg(b,0),l({name:h,parser:this,
211
211
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Eg(a){for(var b=Fg(a);a.reader.ka()&&!a.parser.g;)a.parser.Ac(a.start+b,a.reader,a.partialOkay)}function Ig(a){for(var b=Fg(a),c=a.reader.M(),d=0;d<c&&(a.parser.Ac(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Jg(a){var b=Fg(a);for(a.reader.skip(78);a.reader.ka()&&!a.parser.g;)a.parser.Ac(a.start+b,a.reader,a.partialOkay)}
212
212
  function Kg(a){var b=Fg(a);a.reader.skip(8);var c=a.reader.ra();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ka()&&!a.parser.g;)a.parser.Ac(a.start+b,a.reader,a.partialOkay)}function Lg(a){return function(b){a(b.reader.sb(b.reader.getLength()-b.reader.wa()))}}function Ag(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 Dg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
213
- function Fg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",zg);zg.headerSize=Fg;zg.typeToString=Dg;zg.allData=Lg;zg.audioSampleEntry=Kg;zg.visualSampleEntry=Jg;zg.sampleDescription=Ig;zg.children=Eg;zg.prototype.parseNext=zg.prototype.Ac;zg.prototype.parse=zg.prototype.parse;zg.prototype.stop=zg.prototype.stop;zg.prototype.fullBox=zg.prototype.O;zg.prototype.box=zg.prototype.box;var Bg=0,Cg=1;function Mg(a){var b=this;this.g=[];this.h=[];this.data=[];(new zg).box("moov",Eg).box("moof",Eg).O("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(yd(c.reader.sb(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=yd(c.reader.sb(16));b.h.push(f)}}}}).parse(a)}
213
+ function Fg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",zg);zg.headerSize=Fg;zg.typeToString=Dg;zg.allData=Lg;zg.audioSampleEntry=Kg;zg.visualSampleEntry=Jg;zg.sampleDescription=Ig;zg.children=Eg;zg.prototype.parseNext=zg.prototype.Ac;zg.prototype.parse=zg.prototype.parse;zg.prototype.stop=zg.prototype.stop;zg.prototype.fullBox=zg.prototype.O;zg.prototype.box=zg.prototype.box;var Bg=0,Cg=1;function Mg(a){var b=this;this.g=[];this.h=[];this.data=[];(new zg).box("moov",Eg).box("moof",Eg).O("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(wd(c.reader.sb(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=wd(c.reader.sb(16));b.h.push(f)}}}}).parse(a)}
214
214
  function Ng(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=vd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
215
215
  @license
216
216
  tXml
@@ -227,42 +227,42 @@ function Xg(a){if(!Array.from(a.children).every(function(b){return"string"===typ
227
227
  function bh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ch(a,b,c){b=Rg(b);return a.attributes[b+":"+c]||null}function ah(a,b,c){b=Rg(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function dh(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ch(a,d.value,c))return d;return null}
228
228
  function eh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function fh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
229
229
  function gh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function hh(a){a=Number(a);return 0===a%1?a:null}function ih(a){a=Number(a);return 0===a%1&&0<a?a:null}function jh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function kh(a){a=Number(a);return isNaN(a)?null:a}function lh(a){return a?"true"===a.toLowerCase():!1}
230
- function mh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function nh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&nh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=nh(b,!1,!0),d.appendChild(c);return d}var Sg=new Map([]);function oh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new eb;this.i=new Map;this.A=new Map;this.l=new Rf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.ea=new Map;this.L=new Mc(function(){return ph(b)});this.T=!1;this.N=[];this.X=!1;this.K=new Mc(function(){qh(b)});this.l.catch(function(){});this.j=new pg(function(){return rh(b)});this.ba=!1;this.F=this.G=null}r=oh.prototype;r.destroy=function(){return this.j.destroy()};
231
- function rh(a){return L(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,C(b,sh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,G(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.$a(this.h.updateExpirationTime)};
230
+ function mh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function nh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&nh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=nh(b,!1,!0),d.appendChild(c);return d}var Sg=new Map([]);function oh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new db;this.i=new Map;this.A=new Map;this.l=new Rf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.ea=new Map;this.L=new Mc(function(){return ph(b)});this.T=!1;this.N=[];this.Y=!1;this.K=new Mc(function(){qh(b)});this.l.catch(function(){});this.j=new pg(function(){return rh(b)});this.ba=!1;this.F=this.G=null}r=oh.prototype;r.destroy=function(){return this.j.destroy()};
231
+ function rh(a){return L(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,C(b,sh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,G(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Sa(this.h.updateExpirationTime)};
232
232
  function th(a,b,c){a.ia=!0;a.A=new Map;a.T=c;return uh(a,b)}function vh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.T=0<a.A.size;return uh(a,b)}
233
233
  function wh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return xh(a,g,[])}
234
234
  function uh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){if(1==B.g){if(c=yh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=ug(a.h.servers),zh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ah(m),q=t(n),p=q.next();!p.done;p=q.next())u=p.value,k.add(u);x=t(k);for(p=x.next();!p.done;p=
235
235
  x.next())w=p.value,Bh(w,ug(a.h.servers),ug(a.h.advanced||{}),a.h.keySystemsMapping);return C(B,Ke(b,a.T,a.ba,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.da=!0,B.return(Promise.resolve());v=xh(a,void 0,b);return B.return(g?v:v.catch(function(){}))})}
236
236
  function Ch(a){var b;return L(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return C(c,a.G,3);case 3:return qg(a.j),c.return();case 2:return ra(c,4),a.G=a.m.setMediaKeys(a.s),C(c,a.G,6);case 6:ta(c,5);break;case 4:b=va(c),a.o(new Q(2,6,6003,b.message));case 5:qg(a.j),G(c)}})}function Dh(a,b){return L(function(c){if(1==c.g)return C(c,Ch(a),2);Eh(a,b.initDataType,Ab(b.initData));G(c)})}
237
- r.Vc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.s)return b.B.na(a,"encrypted",function(){b.o(new Q(2,6,6010))}),c.return();b.m=a;b.B.na(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Fh(b,e.value);b.X=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
237
+ r.Vc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.s)return b.B.na(a,"encrypted",function(){b.o(new Q(2,6,6010))}),c.return();b.m=a;b.B.na(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Fh(b,e.value);b.Y=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
238
238
  b.A.size?C(c,Ch(b),2):c.u(2)}Gh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Dh(b,d)});G(c)})};
239
239
  function Hh(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=hg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.C.zb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);ta(g,4);break;case 3:throw e=va(g),new Q(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
240
240
  ra(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=va(g),new Q(2,6,6004,f.message);}})}function Ih(a,b){var c,d,e;return L(function(f){if(1==f.g)return C(f,Jh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ab=new Rf,d.push(e.ab);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
241
241
  function Gh(a){var b,c,d,e,f;return L(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Jh(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Kh(a))return g.return(a.l);a.l=new Rf;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Eh(a,f.initDataType,f.initData);Lh(a)&&a.l.resolve();return g.return(a.l)})}
242
242
  function Eh(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Lh(a)&&(a.l.resolve(),a.l=new Rf,a.l.catch(function(){}));Mh(a,b,c,a.g.sessionType)}}function Nh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Oh(a){a=a.i.keys();a=rg(a,function(b){return b.sessionId});return Array.from(a)}
243
- r.Se=function(){var a=this,b=this.i.keys();b=rg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.cd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Kd=function(){return vg(this.ea)};
243
+ r.Te=function(){var a=this,b=this.i.keys();b=rg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.cd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Kd=function(){return vg(this.ea)};
244
244
  function xh(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z;return L(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Ph(a,c,d);v.u(2);break}return C(v,Qh(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new Q(2,6,6001);qg(a.j);ra(v,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());q=t(k);for(m=q.next();!m.done;m=q.next())p=m.value,a.H.add(p.contentType.toLowerCase());if(c.length){var B=
245
245
  f.keySystem;var A=d.get(f.keySystem);var D=[],F=[],J=[],I=[],E=[],H=new Set;Rh(A,D,F,I,J,E,H);var K=a.T?"persistent-license":"temporary";B={keySystem:B,encryptionScheme:D[0],licenseServerUri:F[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||K,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:E,keyIds:H};A=t(A);
246
246
  for(D=A.next();!D.done;D=A.next())D=D.value,D.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(B.persistentStateRequired=D.persistentStateRequired);A=B}else A=f.keySystem,B=b.get(f.keySystem),D=[],F=[],J=[],I=[],E=[],H=new Set,Rh(B.drmInfos,D,F,I,J,E,H),A={keySystem:A,encryptionScheme:D[0],licenseServerUri:F[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,
247
247
  sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:E,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new Q(2,6,6012,a.g.keySystem);return C(v,f.createMediaKeys(),6);case 6:u=v.h;qg(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){v.u(7);break}ra(v,8);return C(v,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
248
248
  10);case 10:x=v.h;if("usable"!=x)throw new Q(2,6,6018);qg(a.j);ta(v,7,4);break;case 8:w=va(v,4);if(w instanceof Q)throw w;throw new Q(2,6,6019,w.message);case 7:return a.da=!0,C(v,Hh(a),11);case 11:qg(a.j);ta(v,0);break;case 4:z=va(v);qg(a.j,z);a.g=null;a.H.clear();if(z instanceof Q)throw z;throw new Q(2,6,6002,z.message);}})}
249
- function Ph(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ah(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new Q(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={pe:d.pe},e=a.next())for(d.pe=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
250
- l.pe}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
249
+ function Ph(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ah(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new Q(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={qe:d.qe},e=a.next())for(d.qe=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
250
+ l.qe}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
251
251
  function Qh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new Q(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.u(4);break}k=h.value;if(!b.has(k)){z.u(3);break}l=b.get(k);ra(z,6);return C(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
252
252
  z.h,z.return(c);case 6:va(z);case 7:qg(a.j);case 3:h=g.next();z.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.u(11);break}q=n.value;p=t(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.u(9);break}u=h.value;x=b.get(u);w=x.drmInfos.some(function(v){return!!v.licenseServerUri});if(w!=q){z.u(13);break}ra(z,15);return C(z,navigator.requestMediaKeySystemAccess(u,[x]),17);case 17:return c=z.h,z.return(c);case 15:va(z);case 16:qg(a.j);case 13:h=p.next();z.u(12);break;case 11:return z.return(c)}})}
253
- function yh(a){a=ug(a.h.clearKeys);return 0==a.size?null:Ed(a)}function Sh(a){Lh(a)&&a.l.resolve()}function Th(a,b){(new Mc(function(){b.loaded=!0;Sh(a)})).W(Uh)}
254
- function Jh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new Q(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.X?a.N.push(n):Fh(a,n)});a.B.D(d,"keystatuseschange",function(n){return Vh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,lf:Infinity,ab:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return C(m,
253
+ function yh(a){a=ug(a.h.clearKeys);return 0==a.size?null:Cd(a)}function Sh(a){Lh(a)&&a.l.resolve()}function Th(a,b){(new Mc(function(){b.loaded=!0;Sh(a)})).X(Uh)}
254
+ function Jh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new Q(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(n):Fh(a,n)});a.B.D(d,"keystatuseschange",function(n){return Vh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,lf:Infinity,ab:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return C(m,
255
255
  d.load(b),4);case 4:return g=m.h,qg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new Q(h,6,6013)),f.loaded=!0),Th(a,f),Sh(a),m.return(d);case 2:k=va(m),qg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new Q(l,6,6005,k.message)),f.loaded=!0,Sh(a);case 3:return m.return(Promise.resolve())}})}
256
- function Mh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new Q(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.X?a.N.push(f):Fh(a,f)});a.B.D(e,"keystatuseschange",function(f){return Vh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,lf:Infinity,ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof Q||(b=new Q(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&td(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
256
+ function Mh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new Q(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(f):Fh(a,f)});a.B.D(e,"keystatuseschange",function(f){return Vh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,lf:Infinity,ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof Q||(b=new Q(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&td(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
257
257
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new Q(2,6,6006,f.message,f,h))}})}
258
258
  function Fh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u;L(function(x){switch(x.g){case 1:c=b.target;a.h.logLicenseExchange&&td(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=hg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(Nh(a.g.keySystem)){var w=
259
- kd(g.body,!0,!0);if(w.includes("PlayReadyKeyMessage")){w=Pg(w,"PlayReadyKeyMessage");var z=Yg(w,"HttpHeader");z=t(z);for(var v=z.next();!v.done;v=z.next()){var B=v.value;v=Yg(B,"name")[0];B=Yg(B,"value")[0];g.headers[Wg(v)]=Wg(B)}w=Yg(w,"Challenge")[0];g.body=ud(Wg(w))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(x,2);l=a.C.zb.request(2,g);return C(x,l.promise,4);case 4:k=x.h;ta(x,3);break;case 2:m=va(x);if(a.j.g)return x.return();n=new Q(2,6,6007,m);1==a.i.size?(a.o(n),
260
- d&&d.ab&&d.ab.reject(n)):(d&&d.ab&&d.ab.reject(n),a.i.delete(c),Lh(a)&&(a.l.resolve(),a.L.W(.1)));return x.return();case 3:if(a.j.g)return x.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&td(k.data);ra(x,5);return C(x,c.update(k.data),7);case 7:ta(x,6);break;case 5:return q=va(x),p=new Q(2,6,6008,q.message),a.o(p),d&&d.ab&&d.ab.reject(p),x.return();case 6:if(a.j.g)return x.return();u=new S("drmsessionupdate");a.C.onEvent(u);d&&(d.ab&&d.ab.resolve(),Th(a,d));G(x)}})}
261
- function Vh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nh(a.g.keySystem)&&16==g.byteLength&&(Qc()||$c())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=yd(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ab&&(a.i.delete(b),b.close().catch(function(){}));
262
- Lh(a)&&(a.l.resolve(),a.L.W(Wh))}function ph(a){var b=a.aa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new Q(2,6,6014));a.C.ee(vg(c))}
259
+ id(g.body,!0,!0);if(w.includes("PlayReadyKeyMessage")){w=Pg(w,"PlayReadyKeyMessage");var z=Yg(w,"HttpHeader");z=t(z);for(var v=z.next();!v.done;v=z.next()){var B=v.value;v=Yg(B,"name")[0];B=Yg(B,"value")[0];g.headers[Wg(v)]=Wg(B)}w=Yg(w,"Challenge")[0];g.body=ud(Wg(w))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(x,2);l=a.C.zb.request(2,g);return C(x,l.promise,4);case 4:k=x.h;ta(x,3);break;case 2:m=va(x);if(a.j.g)return x.return();n=new Q(2,6,6007,m);1==a.i.size?(a.o(n),
260
+ d&&d.ab&&d.ab.reject(n)):(d&&d.ab&&d.ab.reject(n),a.i.delete(c),Lh(a)&&(a.l.resolve(),a.L.X(.1)));return x.return();case 3:if(a.j.g)return x.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&td(k.data);ra(x,5);return C(x,c.update(k.data),7);case 7:ta(x,6);break;case 5:return q=va(x),p=new Q(2,6,6008,q.message),a.o(p),d&&d.ab&&d.ab.reject(p),x.return();case 6:if(a.j.g)return x.return();u=new S("drmsessionupdate");a.C.onEvent(u);d&&(d.ab&&d.ab.resolve(),Th(a,d));G(x)}})}
261
+ function Vh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nh(a.g.keySystem)&&16==g.byteLength&&(Qc()||$c())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=wd(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ab&&(a.i.delete(b),b.close().catch(function(){}));
262
+ Lh(a)&&(a.l.resolve(),a.L.X(Wh))}function ph(a){var b=a.aa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new Q(2,6,6014));a.C.fe(vg(c))}
263
263
  function Xh(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,q;return L(function(p){switch(p.g){case 1:ra(p,
264
264
  2);if("org.w3.clearkey"===l&&cd())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Uc()&&(q=!1),f.set(l,{persistentState:q}),C(p,m.createMediaKeys(),5);case 5:ta(p,0);break;case 2:va(p),f.set(l,null),G(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(vg(f))})}
265
- function Yh(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).W(Zh)}),ra(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);va(c);G(c)})}
265
+ function Yh(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).X(Zh)}),ra(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);va(c);G(c)})}
266
266
  function sh(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return ra(g,2),a.ia||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,Yh(e),5):C(g,e.remove(),5);if(2!=g.g)return ta(g,0);va(g);G(g)})})),0)})}function $h(a,b){return a.length&&b.length&&a!==b?0<ai(a,b).length:!0}
267
267
  function ai(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(y(d.keyIds),y(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
268
268
  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}}return c}
@@ -281,18 +281,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
281
281
  function ci(a,b,c){this.h=a;this.i=b;this.g=c}function di(a,b){return L(function(c){return 1==c.g?C(c,ei(a,b),2):c.return(fi(a,b))})}function ei(a,b){return L(function(c){if(1==c.g)return C(c,Ge(a.g,b,a.h.drm.preferredKeySystems),2);if(!b.variants.some(jf))throw new Q(2,4,4032);G(c)})}
282
282
  function fi(a,b){var c=Fe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,gi(a,d.keySystem,f.video),gi(a,d.keySystem,f.audio);hi(a,b)}return c}function gi(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Eh(a.g,e.initDataType,e.initData)}}}
283
283
  function hi(a,b){a=a.g?a.g.Kd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?ii.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
284
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new Q(2,4,4012,a);}var ii=["output-restricted","internal-error"];function ji(){}function ki(a,b){if(b){var c=li[b.toLowerCase()];if(c)return c}throw new Q(2,4,4E3,a,b);}P("shaka.media.ManifestParser",ji);ji.unregisterParserByMime=function(a){delete li[a]};ji.registerParserByMime=function(a,b){li[a]=b};ji.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ji.AccessibilityPurpose={zj:"visually impaired",Ui:"hard of hearing"};var li={};function mi(a){function b(){d=!0}function c(l){f.push(l);Eg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new zg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Ig(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Xa:1701733238})}).O("dva1",function(l){g.push({box:l,Xa:1701733238})}).O("dvh1",function(l){g.push({box:l,Xa:1701733238})}).O("dvhe",function(l){g.push({box:l,Xa:1701733238})}).O("hev1",function(l){g.push({box:l,Xa:1701733238})}).O("hvc1",
285
- function(l){g.push({box:l,Xa:1701733238})}).O("avc1",function(l){g.push({box:l,Xa:1701733238})}).O("avc3",function(l){g.push({box:l,Xa:1701733238})}).O("ac-3",function(l){g.push({box:l,Xa:1701733217})}).O("ec-3",function(l){g.push({box:l,Xa:1701733217})}).O("ac-4",function(l){g.push({box:l,Xa:1701733217})}).O("mp4a",function(l){g.push({box:l,Xa:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(yd(a)),new Q(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
286
- a=ni(a,e,k.box,f,k.Xa);return a}
284
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new Q(2,4,4012,a);}var ii=["output-restricted","internal-error"];function ji(){}function ki(a,b){if(b){var c=li[b.toLowerCase()];if(c)return c}throw new Q(2,4,4E3,a,b);}P("shaka.media.ManifestParser",ji);ji.unregisterParserByMime=function(a){delete li[a]};ji.registerParserByMime=function(a,b){li[a]=b};ji.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ji.AccessibilityPurpose={Aj:"visually impaired",Vi:"hard of hearing"};var li={};function mi(a){function b(){d=!0}function c(l){f.push(l);Eg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new zg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Ig(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Ya:1701733238})}).O("dva1",function(l){g.push({box:l,Ya:1701733238})}).O("dvh1",function(l){g.push({box:l,Ya:1701733238})}).O("dvhe",function(l){g.push({box:l,Ya:1701733238})}).O("hev1",function(l){g.push({box:l,Ya:1701733238})}).O("hvc1",
285
+ function(l){g.push({box:l,Ya:1701733238})}).O("avc1",function(l){g.push({box:l,Ya:1701733238})}).O("avc3",function(l){g.push({box:l,Ya:1701733238})}).O("ac-3",function(l){g.push({box:l,Ya:1701733217})}).O("ec-3",function(l){g.push({box:l,Ya:1701733217})}).O("ac-4",function(l){g.push({box:l,Ya:1701733217})}).O("mp4a",function(l){g.push({box:l,Ya:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(wd(a)),new Q(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
286
+ a=ni(a,e,k.box,f,k.Ya);return a}
287
287
  function ni(a,b,c,d,e){var f=oi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);pi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Rc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,pi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Fg(b);a=k.getUint32(b);
288
- k.setUint32(b,a+1);return e}function pi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var oi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function qi(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.ff=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}qi.prototype.$b=function(){return this.Aa};qi.prototype.Xb=function(){return this.ja};qi.prototype.ed=function(){return this.g};function ui(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Xb()==b.Xb()&&Mb(a.$().sort(),b.$().sort())&&xb(a.ed(),b.ed()):a==b}P("shaka.media.InitSegmentReference",qi);
289
- qi.prototype.getEndByte=qi.prototype.Xb;qi.prototype.getStartByte=qi.prototype.$b;
288
+ k.setUint32(b,a+1);return e}function pi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var oi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function qi(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}qi.prototype.ac=function(){return this.Aa};qi.prototype.Yb=function(){return this.ja};qi.prototype.ed=function(){return this.g};function ui(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Mb(a.$().sort(),b.$().sort())&&xb(a.ed(),b.ed()):a==b}P("shaka.media.InitSegmentReference",qi);
289
+ qi.prototype.getEndByte=qi.prototype.Yb;qi.prototype.getStartByte=qi.prototype.ac;
290
290
  function vi(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,x){l=void 0===l?[]:l;p=void 0===p?wi:p;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Aa=d;this.ja=e;this.ca=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===q?null:q;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.j=0;this.o=void 0===x?!1:x;this.Wd=this.md=!1;a=t(this.g);for(b=a.next();!b.done;b=
291
- a.next())b.value.ng();this.o&&this.g.length&&this.g[this.g.length-1].mg();this.B=this.mimeType=this.codecs=null}r=vi.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.mh=function(){return this.endTime};r.$b=function(){return this.Aa};r.Xb=function(){return this.ja};r.Dh=function(){return this.tilesLayout};r.Ch=function(){return this.A};r.ac=function(){return this.status};r.Vh=function(){this.status=xi};r.ef=function(){this.preload=!0};r.Ph=function(){return this.preload};
292
- r.Zd=function(){this.l=!1};r.Mh=function(){return this.l};r.ng=function(){this.md=!0};r.Oh=function(){return this.md};r.mg=function(){this.Wd=!0};r.Nh=function(){return this.Wd};r.lg=function(){this.m=!0};r.Jh=function(){return this.m};r.Eg=function(a){this.s=a};r.Bh=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
293
- r.Ff=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.yi=function(a){this.B=a};r.ed=function(){return this.B};function yi(a,b){a.ca=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())yi(c.value,b)}P("shaka.media.SegmentReference",vi);vi.prototype.getSegmentData=vi.prototype.ed;vi.prototype.setSegmentData=vi.prototype.yi;vi.prototype.syncAgainst=vi.prototype.Ff;vi.prototype.offset=vi.prototype.offset;
294
- vi.prototype.getThumbnailSprite=vi.prototype.Bh;vi.prototype.setThumbnailSprite=vi.prototype.Eg;vi.prototype.hasByterangeOptimization=vi.prototype.Jh;vi.prototype.markAsByterangeOptimization=vi.prototype.lg;vi.prototype.isLastPartial=vi.prototype.Nh;vi.prototype.markAsLastPartial=vi.prototype.mg;vi.prototype.isPartial=vi.prototype.Oh;vi.prototype.markAsPartial=vi.prototype.ng;vi.prototype.isIndependent=vi.prototype.Mh;vi.prototype.markAsNonIndependent=vi.prototype.Zd;vi.prototype.isPreload=vi.prototype.Ph;
295
- vi.prototype.markAsPreload=vi.prototype.ef;vi.prototype.markAsUnavailable=vi.prototype.Vh;vi.prototype.getStatus=vi.prototype.ac;vi.prototype.getTileDuration=vi.prototype.Ch;vi.prototype.getTilesLayout=vi.prototype.Dh;vi.prototype.getEndByte=vi.prototype.Xb;vi.prototype.getStartByte=vi.prototype.$b;vi.prototype.getEndTime=vi.prototype.mh;vi.prototype.getStartTime=vi.prototype.getStartTime;vi.prototype.getUris=vi.prototype.$;var wi=0,xi=1;vi.Status={Hi:wi,xj:xi,$i:2};function zi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ai(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Bi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ci(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}
291
+ a.next())b.value.og();this.o&&this.g.length&&this.g[this.g.length-1].ng();this.B=this.mimeType=this.codecs=null}r=vi.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.nh=function(){return this.endTime};r.ac=function(){return this.Aa};r.Yb=function(){return this.ja};r.Eh=function(){return this.tilesLayout};r.Dh=function(){return this.A};r.bc=function(){return this.status};r.Wh=function(){this.status=xi};r.ff=function(){this.preload=!0};r.Qh=function(){return this.preload};
292
+ r.Zd=function(){this.l=!1};r.Nh=function(){return this.l};r.og=function(){this.md=!0};r.Ph=function(){return this.md};r.ng=function(){this.Wd=!0};r.Oh=function(){return this.Wd};r.mg=function(){this.m=!0};r.Kh=function(){return this.m};r.Fg=function(a){this.s=a};r.Ch=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
293
+ r.Gf=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.zi=function(a){this.B=a};r.ed=function(){return this.B};function yi(a,b){a.ca=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())yi(c.value,b)}P("shaka.media.SegmentReference",vi);vi.prototype.getSegmentData=vi.prototype.ed;vi.prototype.setSegmentData=vi.prototype.zi;vi.prototype.syncAgainst=vi.prototype.Gf;vi.prototype.offset=vi.prototype.offset;
294
+ vi.prototype.getThumbnailSprite=vi.prototype.Ch;vi.prototype.setThumbnailSprite=vi.prototype.Fg;vi.prototype.hasByterangeOptimization=vi.prototype.Kh;vi.prototype.markAsByterangeOptimization=vi.prototype.mg;vi.prototype.isLastPartial=vi.prototype.Oh;vi.prototype.markAsLastPartial=vi.prototype.ng;vi.prototype.isPartial=vi.prototype.Ph;vi.prototype.markAsPartial=vi.prototype.og;vi.prototype.isIndependent=vi.prototype.Nh;vi.prototype.markAsNonIndependent=vi.prototype.Zd;vi.prototype.isPreload=vi.prototype.Qh;
295
+ vi.prototype.markAsPreload=vi.prototype.ff;vi.prototype.markAsUnavailable=vi.prototype.Wh;vi.prototype.getStatus=vi.prototype.bc;vi.prototype.getTileDuration=vi.prototype.Dh;vi.prototype.getTilesLayout=vi.prototype.Eh;vi.prototype.getEndByte=vi.prototype.Yb;vi.prototype.getStartByte=vi.prototype.ac;vi.prototype.getEndTime=vi.prototype.nh;vi.prototype.getStartTime=vi.prototype.getStartTime;vi.prototype.getUris=vi.prototype.$;var wi=0,xi=1;vi.Status={Ii:wi,yj:xi,aj:2};function zi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ai(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Bi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ci(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}
296
296
  function Di(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ci(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ci(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};/*
297
297
  @license
298
298
  Shaka Player
@@ -304,8 +304,8 @@ function Ii(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
304
304
  d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=hd(Ab(a.data,1,d));a=hd(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=hd(Ab(a.data,1,d));a=hd(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=hd(Ab(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
305
305
  c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Bb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=hd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=hd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Bb(a.data),b):null}
306
306
  function Ji(a){for(var b=0,c=[];Fi(a,b);){var d=Hi(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Hi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ii(e))&&c.push(f);b+=e.size+10}Gi(a,b)&&(b+=10)}return c}function Ki(a,b){for(var c=b=void 0===b?0:b,d=0;Fi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Hi(a,b+6),Gi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}P("shaka.util.Id3Utils",Ei);Ei.getID3Data=Ki;
307
- Ei.getID3Frames=Ji;function Li(a,b){var c=null,d=null,e=null,f=a.M();b&1&&(e=a.Cc());b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:f,Wf:c,fh:d,Bj:e}}function Mi(a,b){return 1==b?(b=a.M(),a=a.M(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.M()}}function Ni(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.M();a.skip(4);a=a.ra();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
308
- function Oi(a,b,c){var d=a.M(),e=[],f=null;c&1&&(f=a.M());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={wf:null,sampleSize:null,he:null};c&256&&(h.wf=a.M());c&512&&(h.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(h.he=0==b?a.M():a.sg());e.push(h)}return{Fj:d,vg:e,eh:f}}
307
+ Ei.getID3Frames=Ji;function Li(a,b){var c=null,d=null,e=null,f=a.M();b&1&&(e=a.Cc());b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:f,Xf:c,gh:d,Cj:e}}function Mi(a,b){return 1==b?(b=a.M(),a=a.M(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.M()}}function Ni(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.M();a.skip(4);a=a.ra();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
308
+ function Oi(a,b,c){var d=a.M(),e=[],f=null;c&1&&(f=a.M());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={xf:null,sampleSize:null,ie:null};c&256&&(h.xf=a.M());c&512&&(h.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(h.ie=0==b?a.M():a.tg());e.push(h)}return{Gj:d,wg:e,fh:f}}
309
309
  function Pi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.M();1==b?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.ra()+a.ra()/16;a=a.ra()+a.ra()/16;return{trackId:c,width:b,height:a}}function Qi(a){a=a.M();return{Ea:Dg(a)}}function Ri(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Si(a){return(10>a?"0":"")+a};/*
310
310
 
311
311
  Copyright Brightcove, Inc.
@@ -327,25 +327,25 @@ function Wi(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&
327
327
  function aj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Zi(a),d=(c+d+256)%256),c=0===d?c:d}function hj(a){$i(a);T(a);return T(a)}P("shaka.util.ExpGolomb",Ti);function ij(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=ij.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
328
328
  r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,jj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Sd:-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<
329
329
  k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,q=m;2<q;){var p=f[n+1]+2;switch(f[n]){case 5:var u=ld(f.subarray(n+2,n+p));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
330
- null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,Zg:u,sampleRate:48E3}))}n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Sd&&(g.Sd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
330
+ null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,$g:u,sampleRate:48E3}))}n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Sd&&(g.Sd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
331
331
  break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Sd&&(this.C=f.Sd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
332
332
  break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
333
333
  function kj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=lj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=lj(d,
334
- a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.ai=function(a){pb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.qf(a)};
334
+ a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.bi=function(a){pb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.qf(a)};
335
335
  r.qf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=zd(b.data,q),b.fullData=zd(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=zd(b.data,k),b.fullData=zd(b.fullData,k)));if(n>=e-f)return h;
336
336
  n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=zd(b.data,a),b.fullData=zd(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=zd.apply(rd,y(c.value)),(c=kj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ji(c.data),dts:c.dts,pts:c.pts});return a};
337
337
  r.Fb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=zd.apply(rd,y(c.value)),e=kj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=zd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
338
338
  r.xc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=zd.apply(rd,y(d.value)),f=kj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=zd(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.qf(d,
339
339
  g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Fb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.xc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};
340
- r.bd=function(){return{audio:this.A,video:this.m}};r.Od=function(){for(var a=[],b=t(this.xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Gh=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.We();return{height:a.height,width:a.width}};r.We=function(){return"hvc"==this.m?mj(this):nj(this)};
340
+ r.bd=function(){return{audio:this.A,video:this.m}};r.Od=function(){for(var a=[],b=t(this.xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Hh=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Xe();return{height:a.height,width:a.width}};r.Xe=function(){return"hvc"==this.m?mj(this):nj(this)};
341
341
  function nj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new Ti(a.data);var c=$i(a),d=$i(a),e=$i(a);Yi(a);if(oj.includes(c)){var f=T(a);3===f&&Vi(a,1);Yi(a);Yi(a);Vi(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?aj(a,16):aj(a,64))}}Yi(a);f=T(a);if(0===f)T(a);else if(1===f)for(Vi(a,1),Yi(a),Yi(a),f=T(a),g=0;g<f;g++)Yi(a);Yi(a);Vi(a,1);f=T(a);g=T(a);var h=Wi(a,1);0===h&&Vi(a,1);Vi(a,1);var k=0,l=0,m=0,n=
342
342
  0;W(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.Ea="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
343
343
  function mj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new Ti(a.fullData,!0);$i(c);$i(c);Wi(c,4);var d=Wi(c,3);W(c);var e=Wi(c,2),f=Wi(c,1),g=Wi(c,5),h=Wi(c,32);a=$i(c);for(var k=$i(c),l=$i(c),m=$i(c),n=$i(c),q=$i(c),p=$i(c),u=[],x=[],w=0;w<d;w++)u.push(W(c)),x.push(W(c));if(0<d)for(w=d;8>w;w++)Wi(c,2);for(w=0;w<d;w++)u[w]&&Wi(c,88),x[w]&&$i(c);T(c);d=T(c);3==d&&Wi(c,1);u=T(c);x=T(c);var z=w=0,v=0,B=0;W(c)&&
344
344
  (w+=T(c),z+=T(c),v+=T(c),B+=T(c));b.width=String(u-(w+z)*(1===d||2===d?2:1));b.height=String(x-(v+B)*(1===d?2:1));c=function(A){for(var D=0,F=0;32>F;F++)D|=(A>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
345
- a.toString(16).toUpperCase());b.Ea=e;return b}function lj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function pj(a){return 0>jj(a)?!1:!0}function jj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",ij);ij.syncOffset=jj;ij.probe=pj;ij.prototype.getVideoInfo=ij.prototype.We;ij.prototype.getVideoResolution=ij.prototype.Gh;ij.prototype.getVideoNalus=ij.prototype.Od;
346
- ij.prototype.getCodecs=ij.prototype.bd;ij.prototype.getStartTime=ij.prototype.getStartTime;ij.prototype.getVideoData=ij.prototype.xc;ij.prototype.getAudioData=ij.prototype.Fb;ij.prototype.getMetadata=ij.prototype.getMetadata;ij.prototype.parseNalus=ij.prototype.qf;ij.prototype.parseAvcNalus=ij.prototype.ai;ij.prototype.parse=ij.prototype.parse;ij.prototype.clearData=ij.prototype.clearData;ij.Timescale=9E4;var oj=[100,110,122,244,44,83,86,118,128,138,139,134];function qj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Wa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Wa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Wa("Could not find LCEVC Library on this page"),
345
+ a.toString(16).toUpperCase());b.Ea=e;return b}function lj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function pj(a){return 0>jj(a)?!1:!0}function jj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",ij);ij.syncOffset=jj;ij.probe=pj;ij.prototype.getVideoInfo=ij.prototype.Xe;ij.prototype.getVideoResolution=ij.prototype.Hh;ij.prototype.getVideoNalus=ij.prototype.Od;
346
+ ij.prototype.getCodecs=ij.prototype.bd;ij.prototype.getStartTime=ij.prototype.getStartTime;ij.prototype.getVideoData=ij.prototype.xc;ij.prototype.getAudioData=ij.prototype.Fb;ij.prototype.getMetadata=ij.prototype.getMetadata;ij.prototype.parseNalus=ij.prototype.qf;ij.prototype.parseAvcNalus=ij.prototype.bi;ij.prototype.parse=ij.prototype.parse;ij.prototype.clearData=ij.prototype.clearData;ij.Timescale=9E4;var oj=[100,110,122,244,44,83,86,118,128,138,139,134];function qj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Wa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Wa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Wa("Could not find LCEVC Library on this page"),
347
347
  a=!1):(this.h.SupportObject.SupportStatus||Wa(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function rj(a){a.g&&a.i.classList.add("shaka-hidden")}
348
- qj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function sj(a,b,c){var d=tj,e=uj;switch(b.mimeType){case "video/webm":d=vj;break;case "video/mp4":d=wj}switch(c){case "DASH":e=xj;break;case "HLS":e=yj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",qj);qj.prototype.release=qj.prototype.release;var tj=0,vj=1,wj=2,yj=0,xj=1,uj=-1;function zj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new eb;this.m={};this.H=null;this.L=new Rf;this.N="";this.da=!1;this.l=Aj(this,this.L);this.C=!1;this.I=new pg(function(){return Bj(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.sa=!1;this.ia=new Rf;this.s=!1;this.ea=!0;this.K=this.X=null}
348
+ qj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function sj(a,b,c){var d=tj,e=uj;switch(b.mimeType){case "video/webm":d=vj;break;case "video/mp4":d=wj}switch(c){case "DASH":e=xj;break;case "HLS":e=yj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",qj);qj.prototype.release=qj.prototype.release;var tj=0,vj=1,wj=2,yj=0,xj=1,uj=-1;function zj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new db;this.m={};this.H=null;this.L=new Rf;this.N="";this.da=!1;this.l=Aj(this,this.L);this.C=!1;this.I=new pg(function(){return Bj(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.sa=!1;this.ia=new Rf;this.s=!1;this.ea=!0;this.K=this.Y=null}
349
349
  function Aj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.ea=!0});a.o.D(c,"endstreaming",function(){a.ea=!1});a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Cj(c);a.i.src=a.N;return c}c=new MediaSource;a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Cj(c);a.i.src=a.N;return c}
350
350
  function Dj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?C(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Kd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Md(h,k),!de(m))return p.return(!1)}else if(b==c.fa?k=Ne(k):b==c.S&&(k=Oe(k)),n=Qd(a,
351
351
  h,k),q=Od(h,k),!lb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=zj.prototype;r.destroy=function(){return this.I.destroy()};
@@ -359,992 +359,992 @@ function Ij(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Jj(a,b){a.C
359
359
  r.ob=function(){var a={total:this.C?[]:Ci(this.i.buffered),audio:this.C?[]:Ci(Kj(this,"audio")),video:this.C?[]:Ci(Kj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Kj(a,b){try{return a.h[b].buffered}catch(c){return null}}
360
360
  function Nj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Nd.includes(e))f=Ji(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ta([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new zg).box("moof",Eg).box("traf",Eg).O("tfdt",function(n){l=Mi(n.reader,
361
361
  n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!pj(h)||(a.K?a.K.clearData():a.K=new ij,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ta(h,f,d?d.endTime:null));return g}
362
- function Oj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:m=Kd;if(b!=m.ma){D.u(2);break}if(!a.B){D.u(3);break}return C(D,a.ia,4);case 4:n=D.h,a.g.s=n;case 3:return C(D,ge(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return D.return();case 2:if(l||!a.s){D.u(6);break}return C(D,Oj(a,m.S,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Oj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
362
+ function Oj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:m=Kd;if(b!=m.ma){D.u(2);break}if(!a.B){D.u(3);break}return C(D,a.ia,4);case 4:n=D.h,a.g.s=n;case 3:return C(D,fe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return D.return();case 2:if(l||!a.s){D.u(6);break}return C(D,Oj(a,m.S,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Oj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
363
363
  case 6:if(!a.h[b])return D.return();q=a.h[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(u=Nj(a,b,c,d,p,q),null!=u&&(x=d.startTime-u,w=Math.abs(q-x),(.001<=w||g||h)&&(!k||0<x||!q)&&(q=x,a.pa&&(Pj(a,b,function(){return Qj(a,b)}),Pj(a,b,function(){return Rj(a,b,q)}))),z=b==m.fa||!(m.fa in a.h),a.B&&z&&a.ia.resolve(q)));f&&b==m.fa&&(a.g||Fj(a,"application/cea-608",a.B,!1),a.H||(v=p.split(";",1)[0],a.H=new Gb(v)),d?(B=a.H.i(c),B.length&&ke(a.g,B,d.startTime,d.endTime,q)):a.H.init(c));
364
364
  if(!a.m[b]){D.u(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=Sj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(A=d.startTime,Pj(a,b,function(){return Qj(a,b)}),Pj(a,b,function(){return Rj(a,b,A)})),C(D,Pj(a,b,function(){var F=c;if("video"==b&&a.T){var J=a.T;J.g&&J.g.appendBuffer(F,"video",J.o,-q)}a.h[b].appendBuffer(F)}),11);case 11:G(D)}})}function Tj(a,b){var c=Lj(a,"video")||0;ie(a.g,b,c)}function Uj(a){a.g&&ie(a.g,"",0)}
365
365
  r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Kd,a==e.ma?C(f,d.g.remove(b,c),0):C(f,Pj(d,a,function(){return Vj(d,a,b,c)}),4)):d.s?C(f,Pj(d,e.S,function(){return Vj(d,e.S,b,c)}),0):f.u(0)})};function Wj(a,b){var c;return L(function(d){return 1==d.g?(c=Kd,b==c.ma?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,Pj(a,b,function(){return Vj(a,b,0,a.l.duration)}),4)):a.s?C(d,Pj(a,c.S,function(){return Vj(a,c.S,0,a.l.duration)}),0):d.u(0)})}
366
366
  r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Kd,a==c.ma?d.return():C(d,Pj(b,a,function(){b.i.currentTime-=.001;Hj(b,a)}),2)):b.s?C(d,Pj(b,c.S,function(){var e=c.S;b.i.currentTime-=.001;Hj(b,e)}),0):d.u(0)})};
367
367
  function Xj(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Kd;if(b==l.ma)return f||(a.g.s=c),he(a.g,d,e),q.return();m=[];return C(q,Yj(a,b,g,h,k),2)}n=q.h;n||(m.push(Pj(a,b,function(){return Qj(a,b)})),a.s&&m.push(Pj(a,l.S,function(){return Qj(a,l.S)})));f||(m.push(Pj(a,b,function(){return Rj(a,b,c)})),a.s&&m.push(Pj(a,l.S,function(){return Rj(a,l.S,c)})));m.push(Pj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Hj(a,b)}));a.s&&m.push(Pj(a,
368
368
  l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Hj(a,p)}));return C(q,Promise.all(m),0)})}function Zj(a,b,c){var d;return L(function(e){if(1==e.g){d=Kd;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Rf);Pj(a,b,function(){return Qj(a,b)});a.s&&Pj(a,d.S,function(){return Qj(a,d.S)});return C(e,Pj(a,b,function(){return Rj(a,b,c)}),2)}return a.s?C(e,Pj(a,d.S,function(){return Rj(a,d.S,c)}),0):e.u(0)})}
369
- r.endOfStream=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){Ij(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Za=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Rf};b.j[d].unshift(e)}b.l.duration=a;b.X=a}),0)})};r.getDuration=function(){return this.l.duration};function Vj(a,b,c,d){d<=c?Hj(a,b):a.h[b].remove(c,d)}
369
+ r.endOfStream=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){Ij(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.$a=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Rf};b.j[d].unshift(e)}b.l.duration=a;b.Y=a}),0)})};r.getDuration=function(){return this.l.duration};function Vj(a,b,c,d){d<=c?Hj(a,b):a.h[b].remove(c,d)}
370
370
  function Qj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Hj(a,b)}function Rj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Hj(a,b)}function Hj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),bk(a,b))}}function Pj(a,b,c){qg(a.I);c={start:c,p:new Rf};a.j[b].push(c);1==a.j[b].length&&ck(a,b);return c.p}
371
371
  function ak(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:qg(a.I);c=[];d={};for(e in a.h)d.Mc=new Rf,f={start:function(m){return function(){return m.Mc.resolve()}}(d),p:d.Mc},a.j[e].push(f),c.push(d.Mc),1==a.j[e].length&&f.start(),d={Mc:d.Mc};ra(l,2);return C(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=va(l),g;case 3:return ra(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.h)bk(a,h);ya(l,0);break;case 5:throw k=va(l),new Q(2,3,3015,k,a.i.error||"No error in the media element");
372
372
  }})}function bk(a,b){a.j[b].shift();ck(a,b)}function ck(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new Q(2,3,3017,b)):c.p.reject(new Q(2,3,3015,d,a.i.error||"No error in the media element")),bk(a,b)}}function Sj(a,b,c,d){var e=a.qa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Tc()||Rc()||Sc("SOPOpenBrowser"))&&"mp4"==Sd(a.G[d])&&(b=mi(b));return b}
373
373
  function dk(a,b,c,d){return Pj(a,b,function(){b!==Id&&(nb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Hj(a,b))})}
374
374
  function ek(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E;return L(function(H){switch(H.g){case 1:c=Kd;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);sa(H,2);a.o.ib();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(me)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new Q(2,7,7003,void 0));for(u in a.h){x=a.h[u];try{a.l.removeSourceBuffer(x)}catch(K){}}return C(H,
375
- Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Rf,a.l=Aj(a,a.L),C(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.X)&&a.X&&(a.l.duration=a.X),z=new Rf,v=a.l.sourceBuffers,B=b.size,A=0,D=function(){A++;A===B&&(z.resolve(),a.o.Kb(v,"addsourcebuffer",D))},a.o.D(v,"addsourcebuffer",D),F=t(b.keys()),J=F.next();case 6:if(J.done)return a.i.currentTime=d,C(H,z,2);I=J.value;E=b.get(I);return C(H,Ej(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=F.next();H.u(6);
375
+ Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Rf,a.l=Aj(a,a.L),C(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),z=new Rf,v=a.l.sourceBuffers,B=b.size,A=0,D=function(){A++;A===B&&(z.resolve(),a.o.Kb(v,"addsourcebuffer",D))},a.o.D(v,"addsourcebuffer",D),F=t(b.keys()),J=F.next();case 6:if(J.done)return a.i.currentTime=d,C(H,z,2);I=J.value;E=b.get(I);return C(H,Ej(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=F.next();H.u(6);
376
376
  break;case 2:wa(H),a.C=!1,qg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function fk(a,b){return ak(a,function(){return ek(a,b)})}
377
377
  function Yj(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){if(1==A.g){f=Kd;if(b==f.ma)return A.return(!1);g=Vd(Xd(a.G[b]));h=Wd(a.G[b]);l=!1;m=Md(c,d);n=a.A.forceTransmux;if(!lb(m)||!a.B&&Nd.includes(m))n=!0;n&&(q=Od(c,d),p=lc(q))&&(k=p(),u=Gd(f.S,(d||"").split(",")),x=Gd(f.fa,(d||"").split(",")),u&&x?(l=!0,w=x,b==f.S&&(w=u),m=k.convertCodecs(b,Od(c,w))):m=k.convertCodecs(b,q));z=Vd(Xd(m));v=Wd(m);if(g===z&&h===v)return A.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
378
- a.A.codecSwitchingStrategy&&nb())return C(A,dk(a,b,m,k),3);k&&k.destroy();return C(A,fk(a,e),3)}return A.return(!0)})}function gk(a,b,c,d){if(b==Id)var e=!1;else{e=Vd(Xd(a.G[b]));var f=Wd(a.G[b]),g=Md(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&Nd.includes(g))h=!0;c=Od(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Vd(Xd(g));g=Wd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Cj=window.URL.createObjectURL,Gj="sequence";function hk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=null}r=hk.prototype;r.getDuration=function(){return this.j};r.sh=function(){return this.g};r.Cg=function(a){this.i=a};r.Za=function(a){this.j=a};r.wh=function(){return this.i};r.Ag=function(a){this.A=a};r.Ec=function(a){this.F=a};r.je=function(a){this.m=a};r.Nd=function(){return this.m};r.Bf=function(a){this.s=a};r.lh=function(){return this.s};
379
- r.qg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.ce(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
380
- r.ld=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.g=Math.max(this.g,e.endTime-e.startTime));this.ce(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Xd=function(){this.o=!0};r.Qh=function(){return this.o};r.Bg=function(a){this.B=a};r.ph=function(){return this.B};
381
- r.ce=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.F};r.cc=function(){return Infinity!=this.j&&!this.F};r.qb=function(){return Math.max(this.G,this.Gb()-this.m)};r.Gg=function(a){this.G=a};
382
- r.Gb=function(){return this.R()||this.cc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.dd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Gb()-this.m+a,this.pb()))};r.Zb=function(){return this.dd(0)};r.pb=function(){return Math.max(0,this.Gb()-(this.R()||this.cc()?this.s:0))};r.Kg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
383
- r.zg=function(a){this.H=a};P("shaka.media.PresentationTimeline",hk);hk.prototype.setAvailabilityTimeOffset=hk.prototype.zg;hk.prototype.usingPresentationStartTime=hk.prototype.Kg;hk.prototype.getSeekRangeEnd=hk.prototype.pb;hk.prototype.getSeekRangeStart=hk.prototype.Zb;hk.prototype.getSafeSeekRangeStart=hk.prototype.dd;hk.prototype.getSegmentAvailabilityEnd=hk.prototype.Gb;hk.prototype.setUserSeekStart=hk.prototype.Gg;hk.prototype.getSegmentAvailabilityStart=hk.prototype.qb;
384
- hk.prototype.isInProgress=hk.prototype.cc;hk.prototype.isLive=hk.prototype.R;hk.prototype.offset=hk.prototype.offset;hk.prototype.notifyMaxSegmentDuration=hk.prototype.hf;hk.prototype.notifyMinSegmentStartTime=hk.prototype.ce;hk.prototype.getInitialProgramDateTime=hk.prototype.ph;hk.prototype.setInitialProgramDateTime=hk.prototype.Bg;hk.prototype.isStartTimeLocked=hk.prototype.Qh;hk.prototype.lockStartTime=hk.prototype.Xd;hk.prototype.notifySegments=hk.prototype.ld;hk.prototype.notifyTimeRange=hk.prototype.qg;
385
- hk.prototype.getDelay=hk.prototype.lh;hk.prototype.setDelay=hk.prototype.Bf;hk.prototype.getSegmentAvailabilityDuration=hk.prototype.Nd;hk.prototype.setSegmentAvailabilityDuration=hk.prototype.je;hk.prototype.setStatic=hk.prototype.Ec;hk.prototype.setClockOffset=hk.prototype.Ag;hk.prototype.getPresentationStartTime=hk.prototype.wh;hk.prototype.setDuration=hk.prototype.Za;hk.prototype.setPresentationStartTime=hk.prototype.Cg;hk.prototype.getMaxSegmentDuration=hk.prototype.sh;
386
- hk.prototype.getDuration=hk.prototype.getDuration;function ik(a,b,c){this.j=c;this.l=a;this.s=jk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}ik.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function kk(a,b){a.i=b}function lk(a){this.g=a}function jk(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ci(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function mk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new eb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return nk(f)});this.m=(new Mc(function(){nk(f)})).$a(this.s.gapJumpTimerTime)}mk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};mk.prototype.mf=function(){this.o=!0;nk(this)};
378
+ a.A.codecSwitchingStrategy&&nb())return C(A,dk(a,b,m,k),3);k&&k.destroy();return C(A,fk(a,e),3)}return A.return(!0)})}function gk(a,b,c,d){if(b==Id)var e=!1;else{e=Vd(Xd(a.G[b]));var f=Wd(a.G[b]),g=Md(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&Nd.includes(g))h=!0;c=Od(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Vd(Xd(g));g=Wd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Cj=window.URL.createObjectURL,Gj="sequence";function hk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=null}r=hk.prototype;r.getDuration=function(){return this.j};r.th=function(){return this.g};r.Dg=function(a){this.i=a};r.$a=function(a){this.j=a};r.xh=function(){return this.i};r.Bg=function(a){this.A=a};r.Ec=function(a){this.F=a};r.ke=function(a){this.m=a};r.Nd=function(){return this.m};r.Cf=function(a){this.s=a};r.mh=function(){return this.s};
379
+ r.rg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.de(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
380
+ r.ld=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.g=Math.max(this.g,e.endTime-e.startTime));this.de(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Xd=function(){this.o=!0};r.Rh=function(){return this.o};r.Cg=function(a){this.B=a};r.qh=function(){return this.B};
381
+ r.de=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.F};r.dc=function(){return Infinity!=this.j&&!this.F};r.qb=function(){return Math.max(this.G,this.Gb()-this.m)};r.Hg=function(a){this.G=a};
382
+ r.Gb=function(){return this.R()||this.dc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.dd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Gb()-this.m+a,this.pb()))};r.$b=function(){return this.dd(0)};r.pb=function(){return Math.max(0,this.Gb()-(this.R()||this.dc()?this.s:0))};r.Lg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
383
+ r.Ag=function(a){this.H=a};P("shaka.media.PresentationTimeline",hk);hk.prototype.setAvailabilityTimeOffset=hk.prototype.Ag;hk.prototype.usingPresentationStartTime=hk.prototype.Lg;hk.prototype.getSeekRangeEnd=hk.prototype.pb;hk.prototype.getSeekRangeStart=hk.prototype.$b;hk.prototype.getSafeSeekRangeStart=hk.prototype.dd;hk.prototype.getSegmentAvailabilityEnd=hk.prototype.Gb;hk.prototype.setUserSeekStart=hk.prototype.Hg;hk.prototype.getSegmentAvailabilityStart=hk.prototype.qb;
384
+ hk.prototype.isInProgress=hk.prototype.dc;hk.prototype.isLive=hk.prototype.R;hk.prototype.offset=hk.prototype.offset;hk.prototype.notifyMaxSegmentDuration=hk.prototype.hf;hk.prototype.notifyMinSegmentStartTime=hk.prototype.de;hk.prototype.getInitialProgramDateTime=hk.prototype.qh;hk.prototype.setInitialProgramDateTime=hk.prototype.Cg;hk.prototype.isStartTimeLocked=hk.prototype.Rh;hk.prototype.lockStartTime=hk.prototype.Xd;hk.prototype.notifySegments=hk.prototype.ld;hk.prototype.notifyTimeRange=hk.prototype.rg;
385
+ hk.prototype.getDelay=hk.prototype.mh;hk.prototype.setDelay=hk.prototype.Cf;hk.prototype.getSegmentAvailabilityDuration=hk.prototype.Nd;hk.prototype.setSegmentAvailabilityDuration=hk.prototype.ke;hk.prototype.setStatic=hk.prototype.Ec;hk.prototype.setClockOffset=hk.prototype.Bg;hk.prototype.getPresentationStartTime=hk.prototype.xh;hk.prototype.setDuration=hk.prototype.$a;hk.prototype.setPresentationStartTime=hk.prototype.Dg;hk.prototype.getMaxSegmentDuration=hk.prototype.th;
386
+ hk.prototype.getDuration=hk.prototype.getDuration;function ik(a,b,c){this.j=c;this.l=a;this.s=jk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}ik.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function kk(a,b){a.i=b}function lk(a){this.g=a}function jk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ci(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function mk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new db;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return nk(f)});this.m=(new Mc(function(){nk(f)})).Sa(this.s.gapJumpTimerTime)}mk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};mk.prototype.mf=function(){this.o=!0;nk(this)};
387
387
  function nk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=jk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new S("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Di(c,b,a.s.gapDetectionThreshold),null==
388
- d||0==d&&!a.o||(e=c.start(d),e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new S("gapjumped")))))}}};function ok(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=pk.value().get(b),c.na(a,b,d))}var pk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function qk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new eb;this.i=new rk(a);ok(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){sk(e,e.j())})}qk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function tk(a){return a.o?a.g.currentTime:a.j()}
388
+ d||0==d&&!a.o||(e=c.start(d),e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new S("gapjumped")))))}}};function ok(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=pk.value().get(b),c.na(a,b,d))}var pk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function qk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new db;this.i=new rk(a);ok(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){sk(e,e.j())})}qk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function tk(a){return a.o?a.g.currentTime:a.j()}
389
389
  function uk(a,b){0<a.g.readyState?vk(a.i,b):ok(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){sk(a,a.j())})}function sk(a,b){.001>Math.abs(a.g.currentTime-b)?wk(a):(a.h.na(a.g,"seeking",function(){wk(a)}),vk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function wk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
390
- function rk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}rk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function vk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.$a(.1)};function xk(a){this.g=a;this.j=!1;this.h=null;this.i=new eb}r=xk.prototype;r.ve=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;ok(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.we=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Nf=function(){return 0};
391
- r.Mf=function(){return 0};r.pg=function(){};
390
+ function rk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}rk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function vk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Sa(.1)};function xk(a){this.g=a;this.j=!1;this.h=null;this.i=new db}r=xk.prototype;r.we=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;ok(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.xe=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Of=function(){return 0};
391
+ r.Nf=function(){return 0};r.qg=function(){};
392
392
  function yk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=zk(a,c,f);this.j=new mk(a,b.presentationTimeline,c,this.o,f);this.h=new qk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=tk(g.h);h=Ak(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;uk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
393
- g.g.Zb():g.g.pb():0>h&&(h=g.g.pb()+h);return Bk(g,Ck(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=tk(g.h),k=g.g.Zb(),l=g.g.pb();3>l-k&&(k=l-3);if(h<k||h>l)h=Ak(g,h),g.i.currentTime=h}})}r=yk.prototype;r.ve=function(){this.m.$a(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.we=function(a){uk(this.h,a)};
394
- r.Dd=function(){var a=tk(this.h);return 0<this.i.readyState&&!this.i.paused?Ck(this,a):a};r.Nf=function(){return this.o?this.o.o:0};r.Mf=function(){return this.j.C};r.pg=function(){this.j.mf()};function Bk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
395
- function Ak(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Zb(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?Bk(a,b):b>f?f:b<e?Ai(a.i.buffered,k)?k:c:b>=h||Ai(a.i.buffered,b)?b:c}function Ck(a,b){var c=a.g.Zb();if(b<c)return c;a=a.g.pb();return b>a?a:b}
396
- function zk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new ik(new lk(a),b.stallThreshold,c);kk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Dk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Dk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Wh=function(){this.o=!0};r.tc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
393
+ g.g.$b():g.g.pb():0>h&&(h=g.g.pb()+h);return Bk(g,Ck(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=tk(g.h),k=g.g.$b(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Ak(g,h),g.i.currentTime=h)}})}r=yk.prototype;r.we=function(){this.m.Sa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.xe=function(a){uk(this.h,a)};
394
+ r.Dd=function(){var a=tk(this.h);return 0<this.i.readyState&&!this.i.paused?Ck(this,a):a};r.Of=function(){return this.o?this.o.o:0};r.Nf=function(){return this.j.C};r.qg=function(){this.j.mf()};function Bk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
395
+ function Ak(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?Bk(a,b):b>f?f:b<e?Ai(a.i.buffered,k)?k:c:b>=h||Ai(a.i.buffered,b)?b:c}function Ck(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.pb();return b>a?a:b}
396
+ function zk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new ik(new lk(a),b.stallThreshold,c);kk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Dk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Dk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Xh=function(){this.o=!0};r.tc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
397
397
  r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
398
398
  r.ae=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,y(a))}};r.kd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ae(a);this.La(b)};r.La=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
399
399
  r.sc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new vi(a.startTime,b,a.C,a.Aa,a.ja,a.ca,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
400
- r.ke=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.$a(a))};Dk.prototype[Symbol.iterator]=function(){return this.xb(0)};
400
+ r.le=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.Sa(a))};Dk.prototype[Symbol.iterator]=function(){return this.xb(0)};
401
401
  Dk.prototype.xb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;d--;var e=this.get(d+1),f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ua("No independent partial segment found!"),null}d++;f=g-1;break}}return new Ek(this,d,f,c)};function Fk(a,b,c){a=new vi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Dk([a])}
402
- P("shaka.media.SegmentIndex",Dk);Dk.forSingleSegment=Fk;Dk.prototype.getIteratorForTime=Dk.prototype.xb;Dk.prototype.updateEvery=Dk.prototype.ke;Dk.prototype.fit=Dk.prototype.sc;Dk.prototype.evict=Dk.prototype.La;Dk.prototype.mergeAndEvict=Dk.prototype.kd;Dk.prototype.offset=Dk.prototype.offset;Dk.prototype.get=Dk.prototype.get;Dk.prototype.find=Dk.prototype.find;Dk.prototype.markImmutable=Dk.prototype.Wh;Dk.prototype.release=Dk.prototype.release;Dk.prototype.getNumEvicted=Dk.prototype.getNumEvicted;
403
- Dk.prototype.getNumReferences=Dk.prototype.getNumReferences;function Ek(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Ek.prototype.ie=function(a){this.reverse=a};Ek.prototype.dh=function(){return this.h};Ek.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
404
- Ek.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};P("shaka.media.SegmentIterator",Ek);Ek.prototype.next=Ek.prototype.next;Ek.prototype.current=Ek.prototype.current;Ek.prototype.currentPosition=Ek.prototype.dh;
405
- Ek.prototype.setReverse=Ek.prototype.ie;function Gk(){Dk.call(this,[]);this.h=[]}na(Gk,Dk);r=Gk.prototype;r.clone=function(){var a=new Gk;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.tc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.tc(a)};r.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
406
- r.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ae=function(){};r.La=function(){};r.kd=function(){};r.sc=function(){};r.ke=function(){};P("shaka.media.MetaSegmentIndex",Gk);Gk.prototype.updateEvery=Gk.prototype.ke;Gk.prototype.fit=Gk.prototype.sc;Gk.prototype.mergeAndEvict=Gk.prototype.kd;Gk.prototype.evict=Gk.prototype.La;Gk.prototype.merge=Gk.prototype.ae;
407
- Gk.prototype.offset=Gk.prototype.offset;Gk.prototype.get=Gk.prototype.get;Gk.prototype.find=Gk.prototype.find;Gk.prototype.forEachTopLevelReference=Gk.prototype.tc;Gk.prototype.release=Gk.prototype.release;function Hk(a){var b=this;this.g=a;this.h=this.g.Md();this.i=new Mc(function(){b.g.og(.25*b.h)})}Hk.prototype.release=function(){this.set(this.Wb());this.i&&(this.i.stop(),this.i=null);this.g=null};Hk.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.Md()!=b&&this.g.Df(b);break a}catch(c){}this.i.$a(.25);0!=this.g.Md()&&this.g.Df(0)}};Hk.prototype.Wb=function(){return this.g.Wb()};function Ik(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Jk(b,!1)})).$a(.25)}Ik.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Jk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Kk(){this.g=null;this.h=[]}function Lk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Mk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Nk(){this.i=this.h=null;this.g=[]}function Ok(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Pk(){this.Ed=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.I=this.K=this.l=this.o=NaN;this.g=new Kk;this.h=new Nk};function Qk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Rk(a,b){a.j=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
408
- function Sk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.ac()&&(c=!1);c&&d.ca&&Tk(a,d.ca);c&&!a.g.has(d)&&(c=new Uk(a.j),Vk(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.md&&d.Wd)break;d=b.next().value}Wk(a)}}}function Tk(a,b){if(a.h.segmentIndex&&!a.i.has(b)){var c=new Uk(a.j);Vk(c,b,a.h);a.i.set(b,c)}}
409
- function Xk(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Yk(a,c)}function Zk(a){Xk(a,a.g);Xk(a,a.i);a.l=0}Qk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Yk(this,d);b&&Wk(this)};function Wk(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();!e.done;c={wd:c.wd},e=d.next())c.wd=e.value,b.some(function(f){return function(g){return g.ca===f.wd}}(c))||Yk(a,c.wd)}
410
- function $k(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Yk(a,d)}Wk(a)}function al(a,b){b&&b!==a.h&&(Zk(a),a.h=b)}function Yk(a,b){var c=a.g;b instanceof qi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Uk(a){this.g=a;this.fe=this.Ef=null}function Vk(a,b,c){var d=new Uint8Array(0);a.fe=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=zd(d,e):d=e,a.Ef?C(f,a.Ef(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}
411
- Uk.prototype.abort=function(){this.fe&&this.fe.abort()};function bl(a){ag.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).$a(2)}na(bl,ag);bl.prototype.release=function(){this.g.clear();this.h.stop();ag.prototype.release.call(this)};function cl(a){ag.call(this);this.g=new Map;this.h=a}na(cl,ag);cl.prototype.release=function(){this.g.clear();ag.prototype.release.call(this)};function dl(a,b){var c=a.g.get(b);c||(c={nd:[],Uf:null,contentType:b},a.g.set(b,c));return c}function el(a,b,c){var d=dl(a,b.contentType);fl(a,d);a={ff:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
412
- cl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.nd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.ff;break a}}d=null}if(e=d)e=c.Uf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
413
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Uf=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function fl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=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.nd=[]};function gl(a,b,c,d,e){a=hg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.l=new pg(function(){return il(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=hl.prototype;r.destroy=function(){return this.l.destroy()};
414
- function il(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,jl(e),b.push(kl(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,Zk(h);return C(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
415
- r.configure=function(a){this.h=a;this.I=new Of({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.Z&&(Zk(b.Z),b.Z=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Zk(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Id))&&
416
- b.Z&&(Zk(b.Z),b.Z=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.Z&&(Zk(b.Z),b.Z=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.Z?($k(c.Z,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.Z=null)):0<a.segmentPrefetchLimit&&(c.Z=ll(this,c.stream));a.disableAudioPrefetch||ml(this)};r.start=function(a){var b=this;return L(function(c){if(1==c.g)return C(c,nl(b,a||new Map),2);qg(b.l);b.C=!0;G(c)})};
417
- function ol(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Kd,a.H++,d=a.H,ra(l,2),C(l,Wj(a.g.V,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Md(b.mimeType,b.codecs),Fj(a.g.V,f,a.m.sequenceMode,b.external),g=a.g.V.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=pl(a,b),a.i.set(c.ma,k),ql(a,k,0)),G(l)}})}function rl(a){var b=a.i.get(Id);b&&(jl(b),kl(b).catch(function(){}),a.i.delete(Id));a.s=null}
418
- function sl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Y&&d.Y.ie(c);(d=a.i.get("audio"))&&d.Y&&d.Y.ie(c);(d=a.i.get(Id))&&d.Y&&d.Y.ie(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.ic&&(tl(a,b,!1,0,!1),c.ic=d);else if(b=c.ic)c.ic=null,tl(a,b,!0,0,!1)}function ul(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&tl(a,b.video,c,d,e,f),b.audio&&tl(a,b.audio,c,d,e,f))}
419
- function vl(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):C(c,b.createSegmentIndex(),2):c.return();tl(a,b,!0,0,!1);G(c)})}
420
- function tl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Id?g&&(g.ic&&(b.trickModeVideo?(g.ic=b,b=b.trickModeVideo):g.ic=null),g.stream!=b||e)&&(a.o.has(b)?g.Z=a.o.get(b):g.Z&&al(g.Z,b),b.type==Id&&(e=Md(b.mimeType,b.codecs),Fj(a.g.V,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Y=null,g.Of=!!f,c&&(g.Xc?g.le=!0:g.Qa?(g.Lb=!0,g.Id=d,g.le=!0):(jl(g),wl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),xl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
421
- ol(a,b)}
422
- function xl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.Ya)return e.return();c=b.stream;d=b.Ya;return c.segmentIndex?e.u(2):C(e,c.createSegmentIndex(),2)}if(b.Ya!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=Lj(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Oa?b.Oa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
423
- 8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ya.h.g>h?!0:!1):f=!1;f&&b.Ya.abort();G(e)})}
424
- r.od=function(){if(this.g)for(var a=this.g.Ld(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Y&&(e=c.Y.current());if(!e||e.startTime>a||e.endTime<a)c.Y=null;e=this.g.V;e.C?e=!1:d==Id?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Kj(e,d),e=Ai(e,a));e||((null!=Lj(this.g.V,d)||c.Qa)&&yl(this,c),c.Ya&&(c.Ya.abort(),c.Ya=null),d===Id&&(d=this.g.V,d.H&&d.H.h()),c.od=!0)}};
425
- function yl(a,b){b.Xc||b.Lb||(b.Qa?(b.Lb=!0,b.Id=0):null==Jj(a.g.V,b.type)?null==b.ub&&ql(a,b,0):(jl(b),wl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
426
- function nl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Kd;if(!a.j)throw new Q(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.V;return C(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}qg(a.l);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=pl(a,l),b.has(l.id)&&(n=
427
- b.get(l.id),Rk(n,function(p,u,x){return zl(p,u,x||null,a.h.retryParameters,a.g.zb)}),m.Z=n),a.i.set(k,m),ql(a,m,0));G(q)})}function pl(a,b){return{stream:b,type:b.type,Y:null,Z:ll(a,b),Oa:null,dc:null,cf:null,af:null,$e:null,ic:null,endOfStream:!1,Qa:!1,ub:null,Lb:!1,Id:0,le:!1,Xc:!1,od:!0,uf:!1,gd:!1,Ya:null}}
428
- function ll(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Id&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Id&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.Z)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Qk(a.h.segmentPrefetchLimit,b,function(d,e,f){return zl(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
429
- function ml(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),$k(f,b),!(0<b&&c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.Z)&&Zk(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d))||!(f=ll(a,d.Fa.audio))||
430
- (d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.Za(a):this.g.V.Za(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
431
- function Al(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:qg(a.l);if(b.Qa||null==b.ub||b.Xc)return h.return();b.ub=null;if(!b.Lb){h.u(2);break}return C(h,wl(a,b,b.le,b.Id),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.ub||ql(a,b,0),h.return();case 4:ra(h,6);d=Bl(a,b);null!=d&&(ql(a,b,d),b.gd=!1);ta(h,7);break;case 6:return e=
432
- va(h),C(h,Cl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return C(h,a.g.V.endOfStream(),10);case 10:qg(a.l),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Za(g),G(h)}})}
433
- function Bl(a,b){if(Dl(b))return Tj(a.g.V,b.stream.originalId||""),null;b.type==Id&&Uj(a.g.V);if(!a.g.V.ea&&b.type!=Id)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.La(c,!0),Sk(e,c);d=b.Oa?b.Oa.endTime:c;e=Mj(a.g.V,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Lj(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=
434
- !0,"video"==b.type&&(a=a.i.get(Id))&&Dl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=El(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Dl(h)||h.Y&&!h.Y.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Z&&b.Y&&!a.o.has(b.stream)&&(b.Z.La(c),Sk(b.Z,e.startTime));Fl(a,b,c,e).catch(function(){});return null}
435
- function El(a,b,c,d){if(b.Y)return b.Y.current();if(b.Oa||d)return b.Y=b.stream.segmentIndex.xb(b.Oa?b.Oa.endTime:d,!1,0>a.g.eb()),b.Y&&b.Y.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Y=b.stream.segmentIndex.xb(e,!1,a),f=b.Y&&b.Y.next().value);f||(b.Y=b.stream.segmentIndex.xb(c,!1,a),f=b.Y&&b.Y.next().value);return f}
436
- function Fl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:e=Kd;f=b.stream;g=b.Y;b.Qa=!0;ra(A,2);if(2==d.ac())throw new Q(1,1,1011);return C(A,Gl(a,b,d),4);case 4:qg(a.l);if(a.A)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,x=function(D){var F,J,I,E;return L(function(H){switch(H.g){case 1:if(q)return H.return();p=!0;qg(a.l);if(a.A)return H.return();
437
- ra(H,2);n=Hl(n,D);F=!1;J=0;(new zg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(n,!1,!0);if(!F){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(H,Il(a,b,c,f,d,I,!0),5);case 5:b.Z&&b.Y&&Sk(b.Z,d.startTime,!0);case 4:ta(H,0);break;case 2:u=E=va(H),G(H)}})},C(A,Jl(a,b,d,x),9);l=Jl(a,b,d);return C(A,l,7);case 7:m=A.h;qg(a.l);if(a.A)return A.return();qg(a.l);return b.Lb?(b.Qa=!1,ql(a,b,0),A.return()):C(A,Il(a,b,c,f,d,m),6);case 9:w=A.h;if(u)throw u;if(p){A.u(10);break}q=!0;qg(a.l);return a.A?
438
- A.return():b.Lb?(b.Qa=!1,ql(a,b,0),A.return()):C(A,Il(a,b,c,f,d,w),10);case 10:b.Z&&b.Y&&Sk(b.Z,d.startTime,!0);case 6:qg(a.l);if(a.A)return A.return();b.Oa=d;g.next();b.Qa=!1;b.uf=!1;z=a.g.V.ob();v=z[b.type];ab(JSON.stringify(v));b.Lb||a.g.mf(d,b.stream);ql(a,b,0);ta(A,0);break;case 2:B=va(A);qg(a.l,B);if(a.A)return A.return();b.Qa=!1;if(7001==B.code)b.Qa=!1,jl(b),ql(a,b,0),A.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),A.u(0);else if(3017==B.code)Kl(a,b,B),A.u(0);else return b.gd=
439
- !0,B.severity=2,C(A,Cl(a,b,B),0)}})}function Ll(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
440
- function Hl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Kl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.uf})){if(0<a.h.maxDisabledTime&&a.g.Jd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.gd=!0;a.A=!0;a.g.onError(c);return}b.uf=!0}ql(a,b,4)}
441
- function Gl(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x;return L(function(w){switch(w.g){case 1:d=Kd;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Vd(b.stream.codecs);k=Wd(b.stream.mimeType);l=c.timestampOffset;if(l==b.cf&&f==b.af&&g==b.$e&&h==b.bf&&k==b.kg){w.u(2);break}m=b.bf&&b.kg&&gk(a.g.V,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){w.u(3);break}return C(w,kl(n).catch(function(){}),5);case 5:n.dc=null,yl(a,n);case 3:return q=
442
- function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.af=f,b.$e=g,b.bf=h,b.kg=k,b.cf=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Xj(a.g.V,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.af=null;b.$e=null;b.bf=null;b.cf=null;throw B;})},C(w,q(),2);case 2:return ui(c.ca,b.dc)||(b.dc=c.ca,c.l&&c.ca&&(p=Jl(a,b,c.ca),u=function(){var z,v,B,A,D,F,J;return L(function(I){switch(I.g){case 1:return ra(I,
443
- 2),C(I,p,4);case 4:return z=I.h,qg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new zg,D.box("moov",Eg).box("trak",Eg).box("mdia",Eg).O("mdhd",function(E){v=Ni(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.fc()){case "soun":B.set(d.S,v);break;case "vide":B.set(d.fa,v)}v=null}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("avc1",Jg).box("avc3",Jg).box("hev1",Jg).box("hvc1",Jg).box("dvav",Jg).box("dva1",Jg).box("dvh1",Jg).box("dvhe",Jg).box("vexu",
444
- Eg).box("proj",Eg).O("prji",function(E){E=E.reader.fc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),Ml(a,A),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=v&&(c.ca.timescale=v),F=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(I,a.g.Qf(b.type,z),5);case 5:return C(I,Oj(a.g.V,b.type,z,null,b.stream,F),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.dc=null,J;}})},a.g.Yh(c.startTime,c.ca),e.push(u()))),a.m.sequenceMode&&(x=b.Oa?b.Oa.j:null,c.j!=x&&e.push(Zj(a.g.V,
402
+ P("shaka.media.SegmentIndex",Dk);Dk.forSingleSegment=Fk;Dk.prototype.getIteratorForTime=Dk.prototype.xb;Dk.prototype.updateEvery=Dk.prototype.le;Dk.prototype.fit=Dk.prototype.sc;Dk.prototype.evict=Dk.prototype.La;Dk.prototype.mergeAndEvict=Dk.prototype.kd;Dk.prototype.offset=Dk.prototype.offset;Dk.prototype.get=Dk.prototype.get;Dk.prototype.find=Dk.prototype.find;Dk.prototype.markImmutable=Dk.prototype.Xh;Dk.prototype.release=Dk.prototype.release;Dk.prototype.getNumEvicted=Dk.prototype.getNumEvicted;
403
+ Dk.prototype.getNumReferences=Dk.prototype.getNumReferences;function Ek(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Ek.prototype.je=function(a){this.reverse=a};Ek.prototype.eh=function(){return this.h};Ek.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
404
+ Ek.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};P("shaka.media.SegmentIterator",Ek);Ek.prototype.next=Ek.prototype.next;Ek.prototype.current=Ek.prototype.current;Ek.prototype.currentPosition=Ek.prototype.eh;
405
+ Ek.prototype.setReverse=Ek.prototype.je;function Gk(){Dk.call(this,[]);this.h=[]}na(Gk,Dk);r=Gk.prototype;r.clone=function(){var a=new Gk;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.tc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.tc(a)};r.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
406
+ r.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ae=function(){};r.La=function(){};r.kd=function(){};r.sc=function(){};r.le=function(){};P("shaka.media.MetaSegmentIndex",Gk);Gk.prototype.updateEvery=Gk.prototype.le;Gk.prototype.fit=Gk.prototype.sc;Gk.prototype.mergeAndEvict=Gk.prototype.kd;Gk.prototype.evict=Gk.prototype.La;Gk.prototype.merge=Gk.prototype.ae;
407
+ Gk.prototype.offset=Gk.prototype.offset;Gk.prototype.get=Gk.prototype.get;Gk.prototype.find=Gk.prototype.find;Gk.prototype.forEachTopLevelReference=Gk.prototype.tc;Gk.prototype.release=Gk.prototype.release;function Hk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Md();this.h=new Mc(function(){b.g.pg(.25*b.i)})}Hk.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Hk.prototype.set=function(a){this.i=a;Ik(this)};Hk.prototype.Xb=function(){return this.g.Xb()};function Ik(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Md()!=b&&a.g.Ef(b);return}catch(c){}a.h.Sa(.25);0!=a.g.Md()&&a.g.Ef(0)};function Jk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Kk(b,!1)})).Sa(.25)}Jk.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Kk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Lk(){this.g=null;this.h=[]}function Mk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Nk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ok(){this.i=this.h=null;this.g=[]}function Pk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Qk(){this.Ed=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.I=this.K=this.l=this.o=NaN;this.g=new Lk;this.h=new Ok};function Rk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Sk(a,b){a.j=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
408
+ function Tk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.bc()&&(c=!1);c&&d.ca&&Uk(a,d.ca);c&&!a.g.has(d)&&(c=new Vk(a.j),Wk(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.md&&d.Wd)break;d=b.next().value}Xk(a)}}}
409
+ function Uk(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return ui(d,b)})){var c=new Vk(a.j);Wk(c,b,a.h);a.i.set(b,c)}}function Yk(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Zk(a,c)}function $k(a){Yk(a,a.g);Yk(a,a.i);a.l=0}Rk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Zk(this,d);b&&Xk(this)};
410
+ function Xk(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();!e.done;c={wd:c.wd},e=d.next())c.wd=e.value,b.some(function(f){return function(g){return ui(g.ca,f.wd)}}(c))||Zk(a,c.wd)}function al(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Zk(a,d)}Xk(a)}function bl(a,b){b&&b!==a.h&&($k(a),a.h=b)}function Zk(a,b){var c=a.g;b instanceof qi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Vk(a){this.g=a;this.ge=this.Ff=null}
411
+ function Wk(a,b,c){var d=new Uint8Array(0);a.ge=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=zd(d,e):d=e,a.Ff?C(f,a.Ff(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}Vk.prototype.abort=function(){this.ge&&this.ge.abort()};function cl(a){ag.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Sa(2)}na(cl,ag);cl.prototype.release=function(){this.g.clear();this.h.stop();ag.prototype.release.call(this)};function dl(a){ag.call(this);this.g=new Map;this.h=a}na(dl,ag);dl.prototype.release=function(){this.g.clear();ag.prototype.release.call(this)};function el(a,b){var c=a.g.get(b);c||(c={nd:[],Vf:null,contentType:b},a.g.set(b,c));return c}function fl(a,b,c){var d=el(a,b.contentType);gl(a,d);a={gf:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
412
+ dl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.nd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.Vf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
413
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Vf=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function gl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=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.nd=[]};function hl(a,b,c,d,e){a=hg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function il(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.l=new pg(function(){return jl(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=il.prototype;r.destroy=function(){return this.l.destroy()};
414
+ function jl(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,kl(e),b.push(ll(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,$k(h);return C(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
415
+ r.configure=function(a){this.h=a;this.I=new Of({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.W&&($k(b.W),b.W=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,$k(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Id))&&
416
+ b.W&&($k(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&($k(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(al(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.W=null)):0<a.segmentPrefetchLimit&&(c.W=ml(this,c.stream));a.disableAudioPrefetch||nl(this)};r.start=function(a){var b=this;return L(function(c){if(1==c.g)return C(c,ol(b,a||new Map),2);qg(b.l);b.C=!0;G(c)})};
417
+ function pl(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Kd,a.H++,d=a.H,ra(l,2),C(l,Wj(a.g.V,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Md(b.mimeType,b.codecs),Fj(a.g.V,f,a.m.sequenceMode,b.external),g=a.g.V.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=ql(a,b),a.i.set(c.ma,k),rl(a,k,0)),G(l)}})}function sl(a){var b=a.i.get(Id);b&&(kl(b),ll(b).catch(function(){}),a.i.delete(Id));a.s=null}
418
+ function tl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Z&&d.Z.je(c);(d=a.i.get("audio"))&&d.Z&&d.Z.je(c);(d=a.i.get(Id))&&d.Z&&d.Z.je(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.jc&&(ul(a,b,!1,0,!1),c.jc=d);else if(b=c.jc)c.jc=null,ul(a,b,!0,0,!1)}function vl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&ul(a,b.video,c,d,e,f),b.audio&&ul(a,b.audio,c,d,e,f))}
419
+ function wl(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):C(c,b.createSegmentIndex(),2):c.return();ul(a,b,!0,0,!1);G(c)})}
420
+ function ul(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Id?g&&(g.jc&&(b.trickModeVideo?(g.jc=b,b=b.trickModeVideo):g.jc=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&bl(g.W,b),b.type==Id&&(e=Md(b.mimeType,b.codecs),Fj(a.g.V,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Pf=!!f,c&&(g.Xc?g.me=!0:g.Qa?(g.Lb=!0,g.Id=d,g.me=!0):(kl(g),xl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),yl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
421
+ pl(a,b)}
422
+ function yl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.Za)return e.return();c=b.stream;d=b.Za;return c.segmentIndex?e.u(2):C(e,c.createSegmentIndex(),2)}if(b.Za!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=Lj(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Oa?b.Oa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
423
+ 8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Za.h.g>h?!0:!1):f=!1;f&&b.Za.abort();G(e)})}
424
+ r.od=function(){if(this.g)for(var a=this.g.Ld(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.V;e.C?e=!1:d==Id?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Kj(e,d),e=Ai(e,a));e||((null!=Lj(this.g.V,d)||c.Qa)&&zl(this,c),c.Za&&(c.Za.abort(),c.Za=null),d===Id&&(d=this.g.V,d.H&&d.H.h()),c.od=!0)}};
425
+ function zl(a,b){b.Xc||b.Lb||(b.Qa?(b.Lb=!0,b.Id=0):null==Jj(a.g.V,b.type)?null==b.ub&&rl(a,b,0):(kl(b),xl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
426
+ function ol(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Kd;if(!a.j)throw new Q(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.V;return C(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}qg(a.l);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=ql(a,l),b.has(l.id)&&(n=
427
+ b.get(l.id),Sk(n,function(p,u,x){return Al(p,u,x||null,a.h.retryParameters,a.g.zb)}),m.W=n),a.i.set(k,m),rl(a,m,0));G(q)})}function ql(a,b){return{stream:b,type:b.type,Z:null,W:ml(a,b),Oa:null,ec:null,df:null,bf:null,af:null,jc:null,endOfStream:!1,Qa:!1,ub:null,Lb:!1,Id:0,me:!1,Xc:!1,od:!0,vf:!1,gd:!1,Za:null}}
428
+ function ml(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Id&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Id&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.W)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Rk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Al(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
429
+ function nl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),al(f,b),!(0<b&&c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.W)&&$k(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d))||!(f=ml(a,d.Fa.audio))||
430
+ (d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.$a(a):this.g.V.$a(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
431
+ function Bl(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:qg(a.l);if(b.Qa||null==b.ub||b.Xc)return h.return();b.ub=null;if(!b.Lb){h.u(2);break}return C(h,xl(a,b,b.me,b.Id),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.ub||rl(a,b,0),h.return();case 4:ra(h,6);d=Cl(a,b);null!=d&&(rl(a,b,d),b.gd=!1);ta(h,7);break;case 6:return e=
432
+ va(h),C(h,Dl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return C(h,a.g.V.endOfStream(),10);case 10:qg(a.l),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.$a(g),G(h)}})}
433
+ function Cl(a,b){if(El(b))return Tj(a.g.V,b.stream.originalId||""),null;b.type==Id&&Uj(a.g.V);if(!a.g.V.ea&&b.type!=Id)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.La(c,!0),Tk(e,c);d=b.Oa?b.Oa.endTime:c;e=Mj(a.g.V,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Lj(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=
434
+ !0,"video"==b.type&&(a=a.i.get(Id))&&El(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Fl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,El(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.W&&b.Z&&!a.o.has(b.stream)&&(b.W.La(c),Tk(b.W,e.startTime));Gl(a,b,c,e).catch(function(){});return null}
435
+ function Fl(a,b,c,d){if(b.Z)return b.Z.current();if(b.Oa||d)return b.Z=b.stream.segmentIndex.xb(b.Oa?b.Oa.endTime:d,!1,0>a.g.eb()),b.Z&&b.Z.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Z=b.stream.segmentIndex.xb(e,!1,a),f=b.Z&&b.Z.next().value);f||(b.Z=b.stream.segmentIndex.xb(c,!1,a),f=b.Z&&b.Z.next().value);return f}
436
+ function Gl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:e=Kd;f=b.stream;g=b.Z;b.Qa=!0;ra(A,2);if(2==d.bc())throw new Q(1,1,1011);return C(A,Hl(a,b,d),4);case 4:qg(a.l);if(a.A)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,x=function(D){var F,J,I,E;return L(function(H){switch(H.g){case 1:if(q)return H.return();p=!0;qg(a.l);if(a.A)return H.return();
437
+ ra(H,2);n=Il(n,D);F=!1;J=0;(new zg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(n,!1,!0);if(!F){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(H,Jl(a,b,c,f,d,I,!0),5);case 5:b.W&&b.Z&&Tk(b.W,d.startTime,!0);case 4:ta(H,0);break;case 2:u=E=va(H),G(H)}})},C(A,Kl(a,b,d,x),9);l=Kl(a,b,d);return C(A,l,7);case 7:m=A.h;qg(a.l);if(a.A)return A.return();qg(a.l);return b.Lb?(b.Qa=!1,rl(a,b,0),A.return()):C(A,Jl(a,b,c,f,d,m),6);case 9:w=A.h;if(u)throw u;if(p){A.u(10);break}q=!0;qg(a.l);return a.A?
438
+ A.return():b.Lb?(b.Qa=!1,rl(a,b,0),A.return()):C(A,Jl(a,b,c,f,d,w),10);case 10:b.W&&b.Z&&Tk(b.W,d.startTime,!0);case 6:qg(a.l);if(a.A)return A.return();b.Oa=d;g.next();b.Qa=!1;b.vf=!1;z=a.g.V.ob();v=z[b.type];ab(JSON.stringify(v));b.Lb||a.g.mf(d,b.stream);rl(a,b,0);ta(A,0);break;case 2:B=va(A);qg(a.l,B);if(a.A)return A.return();b.Qa=!1;if(7001==B.code)b.Qa=!1,kl(b),rl(a,b,0),A.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),A.u(0);else if(3017==B.code)Ll(a,b,B),A.u(0);else return b.gd=
439
+ !0,1==B.category&&b.W&&Zk(b.W,d),B.severity=2,C(A,Dl(a,b,B),0)}})}function Ml(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
440
+ function Il(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Ll(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.vf})){if(0<a.h.maxDisabledTime&&a.g.Jd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.gd=!0;a.A=!0;a.g.onError(c);return}b.vf=!0}rl(a,b,4)}
441
+ function Hl(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x;return L(function(w){switch(w.g){case 1:d=Kd;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Vd(b.stream.codecs);k=Wd(b.stream.mimeType);l=c.timestampOffset;if(l==b.df&&f==b.bf&&g==b.af&&h==b.cf&&k==b.lg){w.u(2);break}m=b.cf&&b.lg&&gk(a.g.V,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){w.u(3);break}return C(w,ll(n).catch(function(){}),5);case 5:n.ec=null,zl(a,n);case 3:return q=
442
+ function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.bf=f,b.af=g,b.cf=h,b.lg=k,b.df=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Xj(a.g.V,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.bf=null;b.af=null;b.cf=null;b.df=null;throw B;})},C(w,q(),2);case 2:return ui(c.ca,b.ec)||(b.ec=c.ca,c.l&&c.ca&&(p=Kl(a,b,c.ca),u=function(){var z,v,B,A,D,F,J;return L(function(I){switch(I.g){case 1:return ra(I,
443
+ 2),C(I,p,4);case 4:return z=I.h,qg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new zg,D.box("moov",Eg).box("trak",Eg).box("mdia",Eg).O("mdhd",function(E){v=Ni(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.hc()){case "soun":B.set(d.S,v);break;case "vide":B.set(d.fa,v)}v=null}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("avc1",Jg).box("avc3",Jg).box("hev1",Jg).box("hvc1",Jg).box("dvav",Jg).box("dva1",Jg).box("dvh1",Jg).box("dvhe",Jg).box("vexu",
444
+ Eg).box("proj",Eg).O("prji",function(E){E=E.reader.hc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),Nl(a,A),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=v&&(c.ca.timescale=v),F=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(I,a.g.Rf(b.type,z),5);case 5:return C(I,Oj(a.g.V,b.type,z,null,b.stream,F),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.ec=null,J;}})},a.g.Zh(c.startTime,c.ca),e.push(u()))),a.m.sequenceMode&&(x=b.Oa?b.Oa.j:null,c.j!=x&&e.push(Zj(a.g.V,
445
445
  b.type,c.startTime))),C(w,Promise.all(e),0)}})}
446
- function Il(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new zg;l&&k.O("emsg",function(u){var x=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.fc();var z=u.reader.fc();var v=u.reader.M();var B=u.reader.M();var A=u.reader.M();var D=u.reader.M();var F=e.startTime+B/v}else v=u.reader.M(),F=u.reader.Cc()/
447
- v+e.timestampOffset,B=F-e.startTime,A=u.reader.M(),D=u.reader.M(),w=u.reader.fc(),z=u.reader.fc();u=u.reader.sb(u.reader.getLength()-u.reader.wa());if(x&&x.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Zh():(x=(new Map).set("detail",{startTime:F,endTime:F+A/v,schemeIdUri:w,value:z,timescale:v,presentationTimeDelta:B,eventDuration:A,id:D,messageData:u}),x=new S("emsg",x),x.cancelable=!0,a.g.onEvent(x),x.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
448
- w||(w=Ji(u),w.length&&e&&a.g.$h([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(u){if(!a.F&&e.ca.timescale){var x=u.reader,w=u.version;x.M();u=x.M();var z=x.M();u=1E3*u+z/Math.pow(2,32)*1E3;0===w?x=x.M():(w=x.M(),x=x.M(),x=w*Math.pow(2,32)+x);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();x=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-x/e.ca.timescale*1E3)});x=new S("prft",x);a.g.onEvent(x);
449
- a.F=!0}});(l||m)&&k.parse(f);return C(p,Nl(a,b,c),2);case 2:return qg(a.l),n=b.od,b.od=!1,q=b.Of,b.Of=!1,C(p,a.g.Qf(b.type,f),3);case 3:return C(p,Oj(a.g.V,b.type,f,e,d,h,n,q,g),4);case 4:qg(a.l),G(p)}})}function Nl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Jj(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():C(h,a.g.V.remove(b.type,e,e+g),2)}qg(a.l);G(h)})}
450
- function Dl(a){return a&&a.type==Id&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
451
- function Jl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.Z){var m=b.Z,n=m.g;c instanceof qi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Ef=d),f=m.fe):f=null}f||(f=zl(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Y&&(g=b.Y.h);b.Ya=f;return C(l,f.promise,2);case 2:h=l.h;b.Ya=null;k=h.data;if(!c.aesKey){l.u(3);break}return C(l,Ll(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
452
- function zl(a,b,c,d,e){var f=a instanceof vi?a:void 0,g=f?1:0;a=gl(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(ng,a,{type:g,stream:b,segment:f})}
453
- function wl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.le=!1,b.Id=0,b.Xc=!0,b.Oa=null,b.dc=null,b.Y=null,b.Z&&!a.o.has(b.stream)&&Zk(b.Z),d?(e=a.g.Ld(),f=a.g.V.getDuration(),C(g,a.g.V.remove(b.type,e+d,f),3)):C(g,Wj(a.g.V,b.type),4);if(3!=g.g)return qg(a.l),c?C(g,a.g.V.flush(b.type),3):g.u(3);qg(a.l);b.Xc=!1;b.endOfStream=!1;b.Qa||b.ub||ql(a,b,0);G(g)})}
454
- function ql(a,b,c){var d=b.type;if(d!=Id||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Al(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);G(f)})})).W(c)}function jl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function kl(a){return L(function(b){return a.Ya?C(b,a.Ya.abort(),0):b.u(0)})}
455
- function Cl(a,b,c){var d;return L(function(e){if(1==e.g)return C(e,Qf(a.I),2);qg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Jd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
456
- function Ol(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Kd;if(e=a.i.get(d.S))e.dc=null,yl(a,e),kl(e).catch(function(){});if(f=a.i.get(d.fa))f.dc=null,yl(a,f),kl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return C(h,fk(a.g.V,g),2)}return h.return(!0)})}
457
- function Ml(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new S("spatialvideoinfo",c)}else c=new S("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Pl(){}
458
- function Ql(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=ye(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ye(l)),k=Ql(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
459
- k),g=!1)}return g}function Rl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Sl(a,b){return a&&b}P("shaka.util.ConfigUtils",Pl);Pl.convertToConfigObject=Rl;Pl.mergeConfigObjects=Ql;function Tl(){}function Ul(a){a=md(a);return(new rc(a)).wb}function Vl(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new Q(2,6,6015);var e;"string"==typeof b?e=od(b,!0):e=b;a=md(a);a=od(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Wl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split("skd://").pop();return Vl(a,c,b)}
460
- function Xl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}P("shaka.util.FairPlayUtils",Tl);Tl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=hd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);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=Bb(ud(c)))}};Tl.expressplayFairPlayRequest=function(a,b){Xl(a,b)};
461
- Tl.conaxFairPlayRequest=function(a,b){Xl(a,b)};Tl.ezdrmFairPlayRequest=function(a,b){Xl(a,b)};Tl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=td(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=nd("spc="+a))};Tl.expressplayInitDataTransform=function(a,b,c){return Wl(a,b,c)};
462
- Tl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Vl(a,d,b)};Tl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split(";").pop();return Vl(a,c,b)};Tl.verimatrixInitDataTransform=function(a,b,c){return Wl(a,b,c)};Tl.initDataTransform=Vl;
463
- Tl.defaultGetContentId=Ul;Tl.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function Yl(){}
464
- function Zl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Pf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){window.shakaMediaKeysPolyfill&&"skd"==l&&(l=m.serverCertificate,m=Ul(k),k=Vl(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc(),minHdcpVersion:"",
465
- ignoreDuplicateInitData:!Vc()};(Rc()||$c())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Vc()||Uc()||Sc("Tizen 4")||Wc()&&38===Yc()||Wc()&&53===Yc()||Wc()&&68===Yc()||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase().includes("windows"))&&Qc()||(c="smooth",d=!0);d={retryParameters:Pf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,
466
- defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha",
467
- "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:$l,manifestPreprocessorTXml:am,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],
468
- mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Uc()||Vc()||Wc()&&38===Yc()||$c()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:$l,manifestPreprocessorTXml:am,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};
469
- var e={retryParameters:Pf(),failureCallback:function(k){return Sl([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,
470
- dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,
471
- infiniteLiveStreamDuration:!1};if(Wc()||Tc()||Xc()||bd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Sl([k,l])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,
472
- defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return Sl([k],
473
- "")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Sl([k,l])}};var g=!1;if(Wc()||Tc()||Xc()||bd()||ad()||$c()||Rc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new rf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",
474
- preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},
475
- cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(bm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
476
- function cm(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:""}};return Ql(a,b,c||Zl(),d,"")}
477
- function bm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=xe(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return qe(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
478
- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Id&&"image"!=c.type||b.push(c);return b}function $l(a){return Sl([a],a)}function am(a){return Sl([a],a)}P("shaka.util.PlayerConfiguration",Yl);Yl.mergeConfigObjects=cm;Yl.createDefault=Zl;function dm(a,b,c,d,e){ag.call(this);this.K=a;this.X=b;this.bb=e.networkingEngine;this.aa=d;this.m=null;this.Ub=c;this.Ia=0;this.Sb=e.rc;this.A=e.Th;this.Tb=e.Uh;this.g=e.config;this.j=this.B=this.h=null;this.sa=!1;this.C=e.di;this.Ga=!1;this.l=null;this.ea=!1;this.i=this.s=null;this.da=!1;this.I=new Map;this.Ha=!1;this.lb=e.ci;this.ba=new Pk;this.qa=new Rf;this.pa=new Rf;this.L=new Rf;this.F=new Rf;this.F.catch(function(){});this.N=null;this.o=!1;this.Qb=e.Vg;this.ta=null;this.mb=e.Ug;this.T=!1;
479
- this.H=[];this.G=[]}na(dm,ag);function em(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function fm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function gm(a,b){a.N=b;a.T=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=dm.prototype;r.getStartTime=function(){return this.aa};r.ad=function(){return this.K};r.Te=function(){return this.h};function hm(a){a.da=!0;return a.i}function im(a){a.sa=!0;return a.j}function jm(a){a.Ga=!0;return a.C}
480
- r.getStats=function(){return this.ba};function km(a){a.ea=!0;return a.l}function lm(a){a.Ha=!0;return a.I}
481
- r.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,mm(a),5);case 5:if(a.o)return c.return();a.qa.resolve();return C(c,nm(a),6);case 6:if(a.o)return c.return();a.pa.resolve();a.m||(a.m=new Bf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,
482
- a.g.manifest.dash.enableAudioGroups),Be(a.h,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes));if(a.mb){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.Qb){d=a.h.presentationTimeline.R();var e=kf(a.h.variants);e=a.m.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ta=e,e.video&&om(a,e.video,d),e.audio&&om(a,e.audio,d)}return C(c,void 0,7);case 7:if(a.o)return c.return();a.L.resolve();ta(c,0);break;
483
- case 3:throw b=va(c),a.F.reject(b),b;}})};r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):ag.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new S("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function pm(a,b){a.dispatchEvent(new S("onstatechange",(new Map).set("state",b)))}
484
- function mm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){pm(a,"manifest-parser");a.j||(a.B=ki(a.K,a.X),a.j=a.B(),a.j.configure(a.g.manifest));b=Date.now()/1E3;pm(a,"manifest");if(a.h)return g.u(2);c=a;return C(g,a.j.start(a.K,a.Tb),3)}2!=g.g&&(c.h=g.h);d=new S("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new Q(2,4,4036);qm(a.h);e=Date.now()/1E3;f=e-b;a.ba.F=f;G(g)})}
485
- function nm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:pm(a,"drm-engine");a.Ia=Date.now()/1E3;a.l=a.Sb();a.A.g=a.l;a.l.configure(a.g.drm);var h=a.A;b=Fe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new S("trackschanged",void 0);return C(g,Promise.resolve(),3);case 3:a.dispatchEvent(c);case 2:return d=kf(a.h.variants),C(g,vh(a.l,d,a.h.offlineSessionIds),4);case 4:return C(g,di(a.A,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new S("trackschanged",void 0);return C(g,Promise.resolve(),
486
- 7);case 7:a.dispatchEvent(f),G(g)}})}r.configure=function(a,b){a=Rl(a,b);cm(this.g,a)};r.getConfiguration=function(){return ye(this.g)};
487
- function om(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Qk(d,b,function(l,m,n){return zl(l,m,n||null,a.g.streaming.retryParameters,a.bb)}),a.I.set(b.id,e),C(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Tk(e,h.ca):Sk(e,h.startTime));G(k)})}r.Fi=function(){return Promise.race([this.L,this.F])};
488
- r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.o=!0;if(!a.j||a.sa){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.C&&!a.Ga&&a.C.release();if(!a.l||a.ea){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.Ha)for(b=t(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,Zk(d);G(e)}})};
489
- function qm(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))}P("shaka.media.PreloadManager",dm);dm.prototype.destroy=dm.prototype.destroy;dm.prototype.waitForFinish=dm.prototype.Fi;function rm(a,b){ag.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{nc:null,mc:sm,bc:function(d,e){return Gm(c,"enter",d,e)}},{nc:Hm,mc:sm,bc:function(d,e){return Gm(c,"enter",d,e)}},{nc:Im,mc:sm,bc:function(d,e){return Gm(c,"enter",d,e)}},{nc:sm,mc:Hm,bc:function(d,e){return Gm(c,"exit",d,e)}},{nc:sm,mc:Im,bc:function(d,e){return Gm(c,"exit",d,e)}},{nc:Hm,mc:Im,bc:function(d,e){return Gm(c,"skip",d,e)}},{nc:Im,mc:Hm,bc:function(d,e){return Gm(c,"skip",d,e)}}];this.h=new eb;this.h.D(this.i,
490
- "regionremove",function(d){c.g.delete(d.region)})}na(rm,ag);rm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ag.prototype.release.call(this)};rm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Hm:a>d.endTime?Im:sm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.nc==e&&h.mc==f&&h.bc(d,b)}}};
491
- function Gm(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hm=1,sm=2,Im=3;function Jm(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new rc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Km[d])return m.return(e);f=0;g=hg([a],c);ra(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
446
+ function Jl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new zg;l&&k.O("emsg",function(u){var x=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.hc();var z=u.reader.hc();var v=u.reader.M();var B=u.reader.M();var A=u.reader.M();var D=u.reader.M();var F=e.startTime+B/v}else v=u.reader.M(),F=u.reader.Cc()/
447
+ v+e.timestampOffset,B=F-e.startTime,A=u.reader.M(),D=u.reader.M(),w=u.reader.hc(),z=u.reader.hc();u=u.reader.sb(u.reader.getLength()-u.reader.wa());if(x&&x.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.$h():(x=(new Map).set("detail",{startTime:F,endTime:F+A/v,schemeIdUri:w,value:z,timescale:v,presentationTimeDelta:B,eventDuration:A,id:D,messageData:u}),x=new S("emsg",x),x.cancelable=!0,a.g.onEvent(x),x.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
448
+ w||(w=Ji(u),w.length&&e&&a.g.ai([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(u){if(!a.F&&e.ca.timescale){var x=u.reader,w=u.version;x.M();u=x.M();var z=x.M();u=1E3*u+z/Math.pow(2,32)*1E3;0===w?x=x.M():(w=x.M(),x=x.M(),x=w*Math.pow(2,32)+x);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();x=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-x/e.ca.timescale*1E3)});x=new S("prft",x);a.g.onEvent(x);
449
+ a.F=!0}});(l||m)&&k.parse(f);return C(p,Ol(a,b,c),2);case 2:return qg(a.l),n=b.od,b.od=!1,q=b.Pf,b.Pf=!1,C(p,a.g.Rf(b.type,f),3);case 3:return C(p,Oj(a.g.V,b.type,f,e,d,h,n,q,g),4);case 4:qg(a.l),G(p)}})}function Ol(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Jj(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():C(h,a.g.V.remove(b.type,e,e+g),2)}qg(a.l);G(h)})}
450
+ function El(a){return a&&a.type==Id&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
451
+ function Kl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.W){var m=b.W,n=m.g;c instanceof qi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Ff=d),f=m.ge):f=null}f||(f=Al(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.Za=f;return C(l,f.promise,2);case 2:h=l.h;b.Za=null;k=h.data;if(!c.aesKey){l.u(3);break}return C(l,Ml(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
452
+ function Al(a,b,c,d,e){var f=a instanceof vi?a:void 0,g=f?1:0;a=hl(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(ng,a,{type:g,stream:b,segment:f})}
453
+ function xl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.me=!1,b.Id=0,b.Xc=!0,b.Oa=null,b.ec=null,b.Z=null,b.W&&!a.o.has(b.stream)&&$k(b.W),d?(e=a.g.Ld(),f=a.g.V.getDuration(),C(g,a.g.V.remove(b.type,e+d,f),3)):C(g,Wj(a.g.V,b.type),4);if(3!=g.g)return qg(a.l),c?C(g,a.g.V.flush(b.type),3):g.u(3);qg(a.l);b.Xc=!1;b.endOfStream=!1;b.Qa||b.ub||rl(a,b,0);G(g)})}
454
+ function rl(a,b,c){var d=b.type;if(d!=Id||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Bl(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);G(f)})})).X(c)}function kl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function ll(a){return L(function(b){return a.Za?C(b,a.Za.abort(),0):b.u(0)})}
455
+ function Dl(a,b,c){var d;return L(function(e){if(1==e.g)return C(e,Qf(a.I),2);qg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Jd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
456
+ function Pl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Kd;if(e=a.i.get(d.S))e.ec=null,zl(a,e),ll(e).catch(function(){});if(f=a.i.get(d.fa))f.ec=null,zl(a,f),ll(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return C(h,fk(a.g.V,g),2)}return h.return(!0)})}
457
+ function Nl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new S("spatialvideoinfo",c)}else c=new S("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Ql(){}
458
+ function Rl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=ye(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ye(l)),k=Rl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
459
+ k),g=!1)}return g}function Sl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Tl(a,b){return a&&b}P("shaka.util.ConfigUtils",Ql);Ql.convertToConfigObject=Sl;Ql.mergeConfigObjects=Rl;function Ul(){}function Vl(a){a=md(a);return(new rc(a)).wb}function Wl(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new Q(2,6,6015);var e;"string"==typeof b?e=od(b,!0):e=b;a=md(a);a=od(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Xl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split("skd://").pop();return Wl(a,c,b)}
460
+ function Yl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}P("shaka.util.FairPlayUtils",Ul);Ul.commonFairPlayResponse=function(a,b){if(2===a){try{var c=hd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);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=Bb(ud(c)))}};Ul.expressplayFairPlayRequest=function(a,b){Yl(a,b)};
461
+ Ul.conaxFairPlayRequest=function(a,b){Yl(a,b)};Ul.ezdrmFairPlayRequest=function(a,b){Yl(a,b)};Ul.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=td(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=nd("spc="+a))};Ul.expressplayInitDataTransform=function(a,b,c){return Xl(a,b,c)};
462
+ Ul.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Wl(a,d,b)};Ul.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split(";").pop();return Wl(a,c,b)};Ul.verimatrixInitDataTransform=function(a,b,c){return Xl(a,b,c)};Ul.initDataTransform=Wl;
463
+ Ul.defaultGetContentId=Vl;Ul.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function Zl(){}
464
+ function $l(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Pf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){window.shakaMediaKeysPolyfill&&"skd"==l&&(l=m.serverCertificate,m=Vl(k),k=Wl(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc(),minHdcpVersion:"",
465
+ ignoreDuplicateInitData:!Vc()};(Rc()||$c())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Vc()||Uc()||Sc("Tizen 4")||Wc()&&38===Yc()||Wc()&&53===Yc()||Wc()&&68===Yc()||Xc()&&(!Xc()||!Sc("Android"))||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("windows"))&&Qc()||(c="smooth",d=!0);d={retryParameters:Pf(),availabilityWindowOverride:NaN,disableAudio:!1,
466
+ disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
467
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:am,manifestPreprocessorTXml:bm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",
468
+ ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Uc()||Vc()||Wc()&&38===Yc()||$c()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:am,manifestPreprocessorTXml:bm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
469
+ "79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Pf(),failureCallback:function(k){return Tl([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
470
+ autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
471
+ vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1};if(Wc()||Tc()||Xc()||bd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Tl([k,l])},
472
+ usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
473
+ clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return Tl([k],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Tl([k,l])}};var g=!1;if(Wc()||Tc()||Xc()||bd()||ad()||$c()||Rc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new rf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
474
+ preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
475
+ textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(cm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
476
+ function dm(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:""}};return Rl(a,b,c||$l(),d,"")}
477
+ function cm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=xe(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return qe(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
478
+ h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Id&&"image"!=c.type||b.push(c);return b}function am(a){return Tl([a],a)}function bm(a){return Tl([a],a)}P("shaka.util.PlayerConfiguration",Zl);Zl.mergeConfigObjects=dm;Zl.createDefault=$l;function em(a,b,c,d,e){ag.call(this);this.K=a;this.Y=b;this.bb=e.networkingEngine;this.aa=d;this.m=null;this.Vb=c;this.Ia=0;this.Tb=e.rc;this.A=e.Uh;this.Ub=e.Vh;this.g=e.config;this.j=this.B=this.h=null;this.sa=!1;this.C=e.ei;this.Ga=!1;this.l=null;this.ea=!1;this.i=this.s=null;this.da=!1;this.I=new Map;this.Ha=!1;this.lb=e.di;this.ba=new Qk;this.qa=new Rf;this.pa=new Rf;this.L=new Rf;this.F=new Rf;this.F.catch(function(){});this.N=null;this.o=!1;this.Rb=e.Wg;this.ta=null;this.mb=e.Vg;this.T=!1;
479
+ this.H=[];this.G=[]}na(em,ag);function fm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function gm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function hm(a,b){a.N=b;a.T=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=em.prototype;r.getStartTime=function(){return this.aa};r.ad=function(){return this.K};r.Ue=function(){return this.h};function im(a){a.da=!0;return a.i}function jm(a){a.sa=!0;return a.j}function km(a){a.Ga=!0;return a.C}
480
+ r.getStats=function(){return this.ba};function lm(a){a.ea=!0;return a.l}function mm(a){a.Ha=!0;return a.I}
481
+ r.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,nm(a),5);case 5:if(a.o)return c.return();a.qa.resolve();return C(c,om(a),6);case 6:if(a.o)return c.return();a.pa.resolve();a.m||(a.m=new Bf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,
482
+ a.g.manifest.dash.enableAudioGroups),Be(a.h,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes));if(a.mb){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.Rb){d=a.h.presentationTimeline.R();var e=kf(a.h.variants);e=a.m.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ta=e,e.video&&pm(a,e.video,d),e.audio&&pm(a,e.audio,d)}return C(c,void 0,7);case 7:if(a.o)return c.return();a.L.resolve();ta(c,0);break;
483
+ case 3:throw b=va(c),a.F.reject(b),b;}})};r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):ag.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new S("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function qm(a,b){a.dispatchEvent(new S("onstatechange",(new Map).set("state",b)))}
484
+ function nm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){qm(a,"manifest-parser");a.j||(a.B=ki(a.K,a.Y),a.j=a.B(),a.j.configure(a.g.manifest));b=Date.now()/1E3;qm(a,"manifest");if(a.h)return g.u(2);c=a;return C(g,a.j.start(a.K,a.Ub),3)}2!=g.g&&(c.h=g.h);d=new S("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new Q(2,4,4036);rm(a.h);e=Date.now()/1E3;f=e-b;a.ba.F=f;G(g)})}
485
+ function om(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:qm(a,"drm-engine");a.Ia=Date.now()/1E3;a.l=a.Tb();a.A.g=a.l;a.l.configure(a.g.drm);var h=a.A;b=Fe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new S("trackschanged",void 0);return C(g,Promise.resolve(),3);case 3:a.dispatchEvent(c);case 2:return d=kf(a.h.variants),C(g,vh(a.l,d,a.h.offlineSessionIds),4);case 4:return C(g,di(a.A,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new S("trackschanged",void 0);return C(g,Promise.resolve(),
486
+ 7);case 7:a.dispatchEvent(f),G(g)}})}r.configure=function(a,b){a=Sl(a,b);dm(this.g,a)};r.getConfiguration=function(){return ye(this.g)};
487
+ function pm(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Rk(d,b,function(l,m,n){return Al(l,m,n||null,a.g.streaming.retryParameters,a.bb)}),a.I.set(b.id,e),C(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Uk(e,h.ca):Tk(e,h.startTime));G(k)})}r.Gi=function(){return Promise.race([this.L,this.F])};
488
+ r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.o=!0;if(!a.j||a.sa){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.C&&!a.Ga&&a.C.release();if(!a.l||a.ea){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.Ha)for(b=t(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,$k(d);G(e)}})};
489
+ function rm(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))}P("shaka.media.PreloadManager",em);em.prototype.destroy=em.prototype.destroy;em.prototype.waitForFinish=em.prototype.Gi;function sm(a,b){ag.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{oc:null,nc:tm,cc:function(d,e){return Hm(c,"enter",d,e)}},{oc:Im,nc:tm,cc:function(d,e){return Hm(c,"enter",d,e)}},{oc:Jm,nc:tm,cc:function(d,e){return Hm(c,"enter",d,e)}},{oc:tm,nc:Im,cc:function(d,e){return Hm(c,"exit",d,e)}},{oc:tm,nc:Jm,cc:function(d,e){return Hm(c,"exit",d,e)}},{oc:Im,nc:Jm,cc:function(d,e){return Hm(c,"skip",d,e)}},{oc:Jm,nc:Im,cc:function(d,e){return Hm(c,"skip",d,e)}}];this.h=new db;this.h.D(this.i,
490
+ "regionremove",function(d){c.g.delete(d.region)})}na(sm,ag);sm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ag.prototype.release.call(this)};sm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Im:a>d.endTime?Jm:tm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.oc==e&&h.nc==f&&h.cc(d,b)}}};
491
+ function Hm(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Im=1,tm=2,Jm=3;function Km(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new rc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Lm[d])return m.return(e);f=0;g=hg([a],c);ra(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
492
492
  e.toLowerCase().split(";").shift():"")}})}
493
- var Km={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Lm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Lm(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Mm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Mm(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;
493
+ var Lm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Mm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Mm(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Nm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Nm(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;
494
494
  return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
495
- function Mm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
496
- 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 Nm(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Nm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Lm(d,b);c.push(e)}return c};function Om(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Om.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Pm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
497
- r.append=function(a){var b=Nm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={pc:d.pc},e=b.next())d.pc=e.value,a.some(function(f){return function(g){return g.startTime==f.pc.startTime&&g.endTime==f.pc.endTime&&g.text==f.pc.payload?!0:!1}}(d))||(e=Qm(d.pc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
498
- c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Pm(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
499
- function Qm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
500
- function Pm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Om);Om.prototype.setTextVisibility=Om.prototype.setTextVisibility;Om.prototype.isTextVisible=Om.prototype.isTextVisible;Om.prototype.destroy=Om.prototype.destroy;Om.prototype.append=Om.prototype.append;Om.prototype.remove=Om.prototype.remove;Om.prototype.configure=Om.prototype.configure;function Rm(){}r=Rm.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Rm);Rm.prototype.setTextVisibility=Rm.prototype.setTextVisibility;Rm.prototype.isTextVisible=Rm.prototype.isTextVisible;Rm.prototype.destroy=Rm.prototype.destroy;Rm.prototype.append=Rm.prototype.append;Rm.prototype.remove=Rm.prototype.remove;Rm.prototype.configure=Rm.prototype.configure;function Sm(){}function Tm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Sm);Sm.removeAllChildren=Tm;function Um(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);this.C=(new Mc(function(){d.A.paused||Vm(d)})).$a(c.captionsUpdatePeriod);this.i=new Map;this.j=new eb;this.j.D(document,"fullscreenchange",function(){Vm(d,
501
- !0)});this.j.D(this.A,"seeking",function(){Vm(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Vm(d,!0)}),this.o.observe(this.g));this.B=new Map}r=Um.prototype;r.configure=function(a){this.C&&this.C.$a(a.captionsUpdatePeriod)};
502
- r.append=function(a){var b=[].concat(y(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);Vm(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
503
- r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Vm(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function Wm(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
504
- function Xm(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Mg:null;l&&(g.push(l.Ce),l.hc&&g.push(l.hc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Wm(a,n)||(f=!0):(Ym(a,k,e),l=a.i.get(k),n=l.Mg,f=!0));0<k.nestedCues.length&&n&&Xm(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
505
- p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.hc?(d.hc.contains(c)&&d.hc.removeChild(c),c.appendChild(d.hc),d.hc.appendChild(d.Ce)):c.appendChild(d.Ce)}}function Vm(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())Tm(d.value);Tm(a.g);a.i.clear();a.B.clear()}a.m&&Xm(a,a.h,a.g,c,[])}}
506
- function Ym(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Zm(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
495
+ function Nm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
496
+ 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 Om(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Om(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Mm(d,b);c.push(e)}return c};function Pm(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Pm.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Qm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
497
+ r.append=function(a){var b=Om(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={qc:d.qc},e=b.next())d.qc=e.value,a.some(function(f){return function(g){return g.startTime==f.qc.startTime&&g.endTime==f.qc.endTime&&g.text==f.qc.payload?!0:!1}}(d))||(e=Rm(d.qc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
498
+ c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Qm(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
499
+ function Rm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
500
+ function Qm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Pm);Pm.prototype.setTextVisibility=Pm.prototype.setTextVisibility;Pm.prototype.isTextVisible=Pm.prototype.isTextVisible;Pm.prototype.destroy=Pm.prototype.destroy;Pm.prototype.append=Pm.prototype.append;Pm.prototype.remove=Pm.prototype.remove;Pm.prototype.configure=Pm.prototype.configure;function Sm(){}r=Sm.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Sm);Sm.prototype.setTextVisibility=Sm.prototype.setTextVisibility;Sm.prototype.isTextVisible=Sm.prototype.isTextVisible;Sm.prototype.destroy=Sm.prototype.destroy;Sm.prototype.append=Sm.prototype.append;Sm.prototype.remove=Sm.prototype.remove;Sm.prototype.configure=Sm.prototype.configure;function Tm(){}function Um(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Tm);Tm.removeAllChildren=Um;function Vm(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||pb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Mc(function(){d.A.paused||
501
+ Wm(d)})).Sa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new db;this.j.D(document,"fullscreenchange",function(){Wm(d,!0)});this.j.D(this.A,"seeking",function(){Wm(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Wm(d,!0)}),this.o.observe(this.g));this.B=new Map}r=Vm.prototype;r.configure=function(a){this.C&&this.C.Sa(a.captionsUpdatePeriod)};
502
+ r.append=function(a){var b=[].concat(y(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);Wm(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
503
+ r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Wm(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function Xm(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
504
+ function Ym(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ng:null;l&&(g.push(l.De),l.ic&&g.push(l.ic),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Xm(a,n)||(f=!0):(Zm(a,k,e),l=a.i.get(k),n=l.Ng,f=!0));0<k.nestedCues.length&&n&&Ym(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
505
+ p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.ic?(d.ic.contains(c)&&d.ic.removeChild(c),c.appendChild(d.ic),d.ic.appendChild(d.De)):c.appendChild(d.De)}}function Wm(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())Um(d.value);Um(a.g);a.i.clear();a.B.clear()}a.m&&Ym(a,a.h,a.g,c,[])}}
506
+ function Zm(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&$m(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
507
507
  gc?"%":"px",m=c.viewportAnchorUnits==gc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):
508
508
  (h.style.top=c.viewportAnchorY-c.regionAnchorY*c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,
509
- {Ce:f,Mg:e,hc:c})}function $m(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
510
- function Zm(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=an(c.linePadding,c,a.s);f.paddingRight=an(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
511
- "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=bn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=bn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
512
- 1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=an(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
513
- c.writingMode==Tb?(f.width="100%",c.lineAlign==Vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=$m(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
509
+ {De:f,Ng:e,ic:c})}function an(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
510
+ function $m(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=bn(c.linePadding,c,a.s);f.paddingRight=bn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
511
+ "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=cn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=cn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
512
+ 1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=bn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
513
+ c.writingMode==Tb?(f.width="100%",c.lineAlign==Vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=an(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
514
514
  f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Tb?f.width=c.size+"%":f.height=c.size+"%")}
515
- function an(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function bn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Um);Um.prototype.setTextVisibility=Um.prototype.setTextVisibility;
516
- Um.prototype.isTextVisible=Um.prototype.isTextVisible;Um.prototype.remove=Um.prototype.remove;Um.prototype.destroy=Um.prototype.destroy;Um.prototype.append=Um.prototype.append;Um.prototype.configure=Um.prototype.configure;function cn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Nm(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
517
- break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function dn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}dn.prototype.configure=function(a){this.g=a};
518
- function en(a,b,c){try{if(!a.g.enabled)return b;var d=fn(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=gn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=hn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=jn;break a}e=void 0}d.ot=e;d.su=
519
- !0;var f=kn(d);return ln(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function fn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
520
- function mn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,fn(a));c.pr=a.h.eb();var e=c.ot===nn||c.ot===hn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=on(a,c);if(d)d=pn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=kn(a);f&&(b.uris=b.uris.map(function(g){return ln(g,f)}))}}}function on(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
521
- function qn(a){if(0===a.type)return rn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?hn:nn;if("audio"==b)return gn;if("text"==b)return"application/mp4"===a.mimeType?sn:tn}}function un(a,b){b=a.h.ob()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
522
- function vn(a,b){b=a.h.ob()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function wn(a,b){var c=a.h.Hb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case nn:return a.videoBandwidth||NaN;case gn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
523
- function kn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
524
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function pn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=kn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
525
- function ln(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var jn="m",gn="a",nn="v",hn="av",rn="i",tn="c",sn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Og:"s",OTHER:"o"});function xn(a){this.h=a;this.g=null}r=xn.prototype;r.configure=function(a){this.h=a};r.dg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(yn)?1E3*this.g.get(yn):null};r.cg=function(){return this.h.enabled&&this.g&&this.g.has(zn)?1E3*this.g.get(zn):null};r.xh=function(){return this.h.enabled&&this.g&&this.g.has(An)?this.g.get(An):null};r.yh=function(){return this.h.enabled&&this.g&&this.g.has(Bn)?this.g.get(Bn):null};
526
- r.getBandwidthEstimate=function(a){var b=this.cg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Cn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",xn);xn.prototype.getBandwidthEstimate=xn.prototype.getBandwidthEstimate;xn.prototype.getRoundTripTime=xn.prototype.yh;xn.prototype.getResponseDelay=xn.prototype.xh;xn.prototype.getEstimatedThroughput=xn.prototype.cg;
527
- xn.prototype.getMaxBitrate=xn.prototype.dg;var zn="etp",yn="mb",An="rd",Bn="rtt";function Dn(){this.g=null;this.h=[]}function En(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Dn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ag.call(this);var c=this;this.l=Fn;this.Rd=this.g=null;this.da=!1;this.Vd=new eb;this.Qb=new eb;this.m=new eb;this.ta=new eb;this.C=this.F=this.B=this.G=null;this.Yd=0;this.X=new Dn;this.ea=this.gf=this.qa=this.i=this.Ga=this.I=this.j=this.lb=this.K=this.rg=this.aa=this.T=this.mb=this.L=this.H=this.bb=null;this.Ia=!1;this.pa=this.o=null;this.nf=1E9;this.$c=[];this.N=NaN;this.h=Gn(this);this.ba={width:Infinity,height:Infinity};this.Pd=new ci(this.h,this.ba,null);this.s=null;this.sa=
528
- new Bf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.Ub=this.h.preferredTextRole;this.Tb=this.h.preferForcedSubs;this.Sb=[];b&&b(this);this.T=Hn(this);this.aa=new xn(this.h.cmsd);this.G=In(this);
529
- this.G.Cf(this.h.streaming.forceHTTPS);this.A=null;Jn&&(this.A=Jn(),this.A.configure(this.h.ads));this.Vd.D(window,"online",function(){Kn(c);c.vf()});this.Td=new Mc(function(){return Ln(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Vc(a,!0))}na(X,ag);function Mn(a){null!=a.K&&(rj(a.K),a.K.release(),a.K=null)}
530
- function Nn(a,b){if(b.lcevc.enabled){var c=a.Hb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Wa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Mn(a);null==a.K&&(a.K=new qj(a.g,a.rg,b.lcevc),a.F&&(a.F.T=a.K))}else Mn(a)}function On(a,b){return new S(a,b)}r=X.prototype;
531
- r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Pn)return c.return();Mn(a);b=a.detach();a.l=Pn;return C(c,b,2);case 2:a.Vd&&(a.Vd.release(),a.Vd=null);a.Qb&&(a.Qb.release(),a.Qb=null);a.m&&(a.m.release(),a.m=null);a.ta&&(a.ta.release(),a.ta=null);a.pa=null;a.h=null;a.s=null;a.Rd=null;a.T=null;a.aa=null;if(!a.G){c.u(3);break}return C(c,a.G.destroy(),4);case 4:a.G=null;case 3:a.o&&(a.o.release(),a.o=null),ag.prototype.release.call(a),G(c)}})};
532
- function Qn(a,b){a.dispatchEvent(On("onstatechange",(new Map).set("state",b)))}
533
- r.Vc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Pn)throw new Q(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Rn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Qn(c,"attach"),e=function(){var h=Sn(c);h&&Tn(c,h)},c.Qb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return C(g,Un(c),6);case 6:wa(g);c.X.release();ya(g,0);break;case 5:return f=va(g),C(g,c.detach(),10);case 10:throw f;
534
- }})};r.Wg=function(a){this.rg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Pn)throw new Q(2,7,7E3);return C(c,b.kc(!1,a),2)}if(3!=c.g)return C(c,Rn(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Qb.ib(),b.g=null),Qn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.X.release()}G(c)})};function Rn(a,b){var c;return L(function(d){return 1==d.g?(c=++a.Yd,C(d,En(a.X,b),2)):c!=a.Yd?(a.X.release(),d.return(!0)):d.return(!1)})}
535
- r.kc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:return c.l!=Pn&&(c.l=Fn),C(q,Rn(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ia=!1;Qn(c,"unload");a&&!Nc()&&(a=!1);Mn(c);d=c.Sb.map(function(p){return p()});c.Sb=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(On("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ta.ib());c.Td.stop();c.bb&&(c.bb.release(),c.bb=null);if(!c.I){q.u(6);break}return C(q,
536
- c.I.stop(),7);case 7:c.I=null,c.Ga=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!c.F){q.u(12);break}return C(q,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Tm(c.g);if(!c.g||!c.g.src){q.u(14);break}return C(q,new Promise(function(p){return(new Mc(p)).W(.1)}),15);case 15:c.g.removeAttribute("src"),
537
- c.g.load();case 14:if(!c.B){q.u(16);break}return C(q,c.B.destroy(),17);case 17:c.B=null;case 16:c.qa=null;c.gf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new Pk;c.kf=null;c.$c=[];c.N=NaN;Vn(c);case 3:wa(q);c.X.release();ya(q,4);break;
538
- case 4:if(a&&Nc()&&!c.F)return C(q,Un(c),0);q.u(0)}})};r.Ei=function(a){this.ea=a};
539
- r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:if(d.l==Pn)throw new Q(2,7,7E3);e=null;f="";a instanceof dm?(e=a,f=e.ad()||""):f=a||"";return C(z,En(d.X,"load"),2);case 2:d.X.release();if(!d.g)throw new Q(2,7,7002);if(!d.qa){z.u(3);break}return C(z,d.kc(!1),3);case 3:g=++d.Yd;h=function(){return L(function(v){if(1==v.g)return d.Yd==g?v.u(0):e?C(v,e.destroy(),3):v.u(3);throw new Q(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
540
- 2),C(A,En(d.X,B),4);case 4:return C(A,h(),5);case 5:return C(A,v(),6);case 6:return C(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:wa(A),d.X.release(),ya(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ia=!1;d.dispatchEvent(On("loading"));if(e){c=e.X;z.u(8);break}if(c){z.u(8);break}return C(z,k(function(){return L(function(v){if(1==v.g)return C(v,Wn(d,f),2);c=v.h;G(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){gm(e,d);d.s=e.getStats();z.u(11);break}return C(z,Xn(d,f,b,c,!0),12);case 12:e=
541
- z.h;if(!e){d.s=new Pk;z.u(11);break}gm(e,d);d.s=e.getStats();return C(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Ub:Date.now()/1E3;d.s=e?e.getStats():new Pk;d.qa=f;d.gf=c||null;if(m)return C(z,k(function(){return L(function(v){return C(v,Yn(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.F){z.u(17);break}return C(z,k(function(){return L(function(v){return C(v,Un(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return C(z,k(function(){return e.qa},"waitForManifest"),
542
- 19);case 19:d.h=e.getConfiguration();d.Pd=e.A;d.Ga=e.B;d.I=im(e);d.mb=jm(e);d.lb=e.lb;d.i=e.Te();if(q=e.m)d.sa=q;l&&d.g&&"AUDIO"===d.g.nodeName&&(Zn(d),d.configure("manifest.disableVideo",!0));return C(z,k(function(){return e.pa},"waitForDrm"),20);case 20:return d.B=km(e),C(z,k(function(){return L(function(v){return C(v,d.B.Vc(d.g),0)})},"drmEngine_.attach"),21);case 21:return C(z,k(function(){return e.L},"waitForChooseInitialVariant"),22);case 22:return!(p=e.s)||d.pa&&d.pa==p||(d.o=hm(e),d.pa=e.s,
515
+ function bn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function cn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Vm);Vm.prototype.setTextVisibility=Vm.prototype.setTextVisibility;
516
+ Vm.prototype.isTextVisible=Vm.prototype.isTextVisible;Vm.prototype.remove=Vm.prototype.remove;Vm.prototype.destroy=Vm.prototype.destroy;Vm.prototype.append=Vm.prototype.append;Vm.prototype.configure=Vm.prototype.configure;function dn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Om(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
517
+ break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function en(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}en.prototype.configure=function(a){this.g=a};
518
+ function fn(a,b,c){try{if(!a.g.enabled)return b;var d=gn(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=hn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=jn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=kn;break a}e=void 0}d.ot=e;d.su=
519
+ !0;var f=ln(d);return mn(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function gn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
520
+ function nn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,gn(a));c.pr=a.h.eb();var e=c.ot===on||c.ot===jn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=pn(a,c);if(d)d=qn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=ln(a);f&&(b.uris=b.uris.map(function(g){return mn(g,f)}))}}}function pn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
521
+ function rn(a){if(0===a.type)return sn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?jn:on;if("audio"==b)return hn;if("text"==b)return"application/mp4"===a.mimeType?tn:un}}function vn(a,b){b=a.h.ob()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
522
+ function wn(a,b){b=a.h.ob()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function xn(a,b){var c=a.h.Hb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case on:return a.videoBandwidth||NaN;case hn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
523
+ function ln(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
524
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function qn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=ln(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
525
+ function mn(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var kn="m",hn="a",on="v",jn="av",sn="i",un="c",tn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Pg:"s",OTHER:"o"});function yn(a){this.h=a;this.g=null}r=yn.prototype;r.configure=function(a){this.h=a};r.eg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(zn)?1E3*this.g.get(zn):null};r.dg=function(){return this.h.enabled&&this.g&&this.g.has(An)?1E3*this.g.get(An):null};r.yh=function(){return this.h.enabled&&this.g&&this.g.has(Bn)?this.g.get(Bn):null};r.zh=function(){return this.h.enabled&&this.g&&this.g.has(Cn)?this.g.get(Cn):null};
526
+ r.getBandwidthEstimate=function(a){var b=this.dg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Dn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",yn);yn.prototype.getBandwidthEstimate=yn.prototype.getBandwidthEstimate;yn.prototype.getRoundTripTime=yn.prototype.zh;yn.prototype.getResponseDelay=yn.prototype.yh;yn.prototype.getEstimatedThroughput=yn.prototype.dg;
527
+ yn.prototype.getMaxBitrate=yn.prototype.eg;var An="etp",zn="mb",Bn="rd",Cn="rtt";function En(){this.g=null;this.h=[]}function Fn(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}En.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ag.call(this);var c=this;this.l=Gn;this.Rd=this.g=null;this.da=!1;this.Yd=new db;this.Rb=new db;this.m=new db;this.ta=new db;this.C=this.F=this.B=this.H=null;this.ce=0;this.Y=new En;this.ea=this.kf=this.qa=this.i=this.Ga=this.I=this.j=this.lb=this.K=this.sg=this.aa=this.T=this.mb=this.L=this.Td=this.G=this.bb=null;this.Ia=!1;this.pa=this.o=null;this.tf=1E9;this.$c=[];this.N=NaN;this.h=Hn(this);this.ba={width:Infinity,height:Infinity};this.Pd=new ci(this.h,this.ba,null);this.s=null;
528
+ this.sa=new Bf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.Vb=this.h.preferredTextRole;this.Ub=this.h.preferForcedSubs;this.Tb=[];b&&b(this);this.T=In(this);this.aa=new yn(this.h.cmsd);this.H=
529
+ Jn(this);this.H.Df(this.h.streaming.forceHTTPS);this.A=null;Kn&&(this.A=Kn(),this.A.configure(this.h.ads));this.Yd.D(window,"online",function(){Ln(c);c.wf()});this.Ud=new Mc(function(){return Mn(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Vc(a,!0))}na(X,ag);function Nn(a){null!=a.K&&(rj(a.K),a.K.release(),a.K=null)}
530
+ function On(a,b){if(b.lcevc.enabled){var c=a.Hb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Wa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Nn(a);null==a.K&&(a.K=new qj(a.g,a.sg,b.lcevc),a.F&&(a.F.T=a.K))}else Nn(a)}function Pn(a,b){return new S(a,b)}r=X.prototype;
531
+ r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Qn)return c.return();Nn(a);b=a.detach();a.l=Qn;return C(c,b,2);case 2:a.Yd&&(a.Yd.release(),a.Yd=null);a.Rb&&(a.Rb.release(),a.Rb=null);a.m&&(a.m.release(),a.m=null);a.ta&&(a.ta.release(),a.ta=null);a.pa=null;a.h=null;a.s=null;a.Rd=null;a.T=null;a.aa=null;if(!a.H){c.u(3);break}return C(c,a.H.destroy(),4);case 4:a.H=null;case 3:a.o&&(a.o.release(),a.o=null),ag.prototype.release.call(a),G(c)}})};
532
+ function Rn(a,b){a.dispatchEvent(Pn("onstatechange",(new Map).set("state",b)))}
533
+ r.Vc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Qn)throw new Q(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Sn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Rn(c,"attach"),e=function(){var h=Tn(c);h&&Un(c,h)},c.Rb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return C(g,Vn(c),6);case 6:wa(g);c.Y.release();ya(g,0);break;case 5:return f=va(g),C(g,c.detach(),10);case 10:throw f;
534
+ }})};r.Xg=function(a){this.sg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Qn)throw new Q(2,7,7E3);return C(c,b.lc(!1,a),2)}if(3!=c.g)return C(c,Sn(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Rb.ib(),b.g=null),Rn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}G(c)})};function Sn(a,b){var c;return L(function(d){return 1==d.g?(c=++a.ce,C(d,Fn(a.Y,b),2)):c!=a.ce?(a.Y.release(),d.return(!0)):d.return(!1)})}
535
+ r.lc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:return c.l!=Qn&&(c.l=Gn),C(q,Sn(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ia=!1;Rn(c,"unload");a&&!Nc()&&(a=!1);Nn(c);d=c.Tb.map(function(p){return p()});c.Tb=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(Pn("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ta.ib());c.Ud.stop();c.bb&&(c.bb.release(),c.bb=null);c.Td&&(c.Td.stop(),c.Td=null);
536
+ if(!c.I){q.u(6);break}return C(q,c.I.stop(),7);case 7:c.I=null,c.Ga=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.G&&(c.G.release(),c.G=null);c.C&&(c.C.release(),c.C=null);if(!c.F){q.u(12);break}return C(q,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Um(c.g);if(!c.g||!c.g.src){q.u(14);break}return C(q,new Promise(function(p){return(new Mc(p)).X(.1)}),
537
+ 15);case 15:c.g.removeAttribute("src"),c.g.load();case 14:if(!c.B){q.u(16);break}return C(q,c.B.destroy(),17);case 17:c.B=null;case 16:c.qa=null;c.kf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new Qk;c.nf=null;c.$c=[];c.N=NaN;Wn(c);
538
+ case 3:wa(q);c.Y.release();ya(q,4);break;case 4:if(a&&Nc()&&!c.F)return C(q,Vn(c),0);q.u(0)}})};r.Fi=function(a){this.ea=a};
539
+ r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:if(d.l==Qn)throw new Q(2,7,7E3);e=null;f="";a instanceof em?(e=a,f=e.ad()||""):f=a||"";return C(z,Fn(d.Y,"load"),2);case 2:d.Y.release();if(!d.g)throw new Q(2,7,7002);if(!d.qa){z.u(3);break}return C(z,d.lc(!1),3);case 3:g=++d.ce;h=function(){return L(function(v){if(1==v.g)return d.ce==g?v.u(0):e?C(v,e.destroy(),3):v.u(3);throw new Q(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
540
+ 2),C(A,Fn(d.Y,B),4);case 4:return C(A,h(),5);case 5:return C(A,v(),6);case 6:return C(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:wa(A),d.Y.release(),ya(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ia=!1;d.dispatchEvent(Pn("loading"));if(e){c=e.Y;z.u(8);break}if(c){z.u(8);break}return C(z,k(function(){return L(function(v){if(1==v.g)return C(v,Xn(d,f),2);c=v.h;G(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){hm(e,d);d.s=e.getStats();z.u(11);break}return C(z,Yn(d,f,b,c,!0),12);case 12:e=
541
+ z.h;if(!e){d.s=new Qk;z.u(11);break}hm(e,d);d.s=e.getStats();return C(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Vb:Date.now()/1E3;d.s=e?e.getStats():new Qk;d.qa=f;d.kf=c||null;if(m)return C(z,k(function(){return L(function(v){return C(v,Zn(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.F){z.u(17);break}return C(z,k(function(){return L(function(v){return C(v,Vn(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return C(z,k(function(){return e.qa},"waitForManifest"),
542
+ 19);case 19:d.h=e.getConfiguration();d.Pd=e.A;d.Ga=e.B;d.I=jm(e);d.mb=km(e);d.lb=e.lb;d.i=e.Ue();if(q=e.m)d.sa=q;l&&d.g&&"AUDIO"===d.g.nodeName&&($n(d),d.configure("manifest.disableVideo",!0));return C(z,k(function(){return e.pa},"waitForDrm"),20);case 20:return d.B=lm(e),C(z,k(function(){return L(function(v){return C(v,d.B.Vc(d.g),0)})},"drmEngine_.attach"),21);case 21:return C(z,k(function(){return e.L},"waitForChooseInitialVariant"),22);case 22:return!(p=e.s)||d.pa&&d.pa==p||(d.o=im(e),d.pa=e.s,
543
543
  "function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),
544
- u=lm(e),x=e.ta,C(z,k(function(){return L(function(v){return C(v,$n(d,n,x,u),0)})},"loadInner_"),23);case 23:fm(e);z.u(16);break;case 24:return C(z,k(function(){return L(function(v){return C(v,ao(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(On("loaded"));case 6:wa(z);if(!e){z.u(26);break}return C(z,e.destroy(),26);case 26:ya(z,0);break;case 5:w=va(z);if(7E3==w.code){z.u(28);break}return C(z,d.kc(!1),28);case 28:throw w;}})};
545
- function Zn(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
546
- r.Ai=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ga&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,bo(c,c.qa,e,c.gf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ga;h.h=c.i;h.j=k;h.B=l;h=d;k=c.pa;h.i=c.o;h.s=k;d.m=c.sa;d.start();c.i=null;c.I=null;c.Ga=null;c.o=null;c.pa=null;case 2:return C(g,c.kc(a,b),4);case 4:return g.return(d)}})};
547
- r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f,Xn(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):Tn(d,new Q(2,7,7005));return f.return(e)})};
548
- function Xn(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):C(l,Wn(a,b),3);2!=l.g&&(d=l.h);if(g=co(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.pa==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(bo(a,b,c,d||null,f,!e,h,k))})}
549
- function bo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,u,x,w,z,v,B,A,D,F;return L(function(J){if(1==J.g)return k=null,l=ye(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.T&&k.o?null:k},n=function(){return m()?m().getConfiguration():a.h},q=function(I,E){m()?k.configure(I,E):a.configure(I,E)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):C(J,fd(),3);2!=J.g&&(p=J.h,a.ba.width=p.width,a.ba.height=p.height);u=new ci(l,a.ba,null);x={networkingEngine:a.G,
550
- filter:function(I){var E,H;return L(function(K){if(1==K.g)return C(K,di(u,I),2);if(4!=K.g){E=K.h;if(!E)return K.u(0);H=On("trackschanged");return C(K,Promise.resolve(),4)}k.dispatchEvent(H);G(K)})},makeTextStreamsForClosedCaptions:function(I){return eo(a,I)},onTimelineRegionAdded:function(I){var E=k.C;a:{var H=t(E.g);for(var K=H.next();!K.done;K=H.next())if(K=K.value,K.schemeIdUri==I.schemeIdUri&&K.id==I.id&&K.startTime==I.startTime&&K.endTime==I.endTime){H=K;break a}H=null}null==H&&(E.g.add(I),I=
544
+ u=mm(e),x=e.ta,C(z,k(function(){return L(function(v){return C(v,ao(d,n,x,u),0)})},"loadInner_"),23);case 23:gm(e);z.u(16);break;case 24:return C(z,k(function(){return L(function(v){return C(v,bo(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(Pn("loaded"));case 6:wa(z);if(!e){z.u(26);break}return C(z,e.destroy(),26);case 26:ya(z,0);break;case 5:w=va(z);if(7E3==w.code){z.u(28);break}return C(z,d.lc(!1),28);case 28:throw w;}})};
545
+ function $n(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
546
+ r.Bi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ga&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,co(c,c.qa,e,c.kf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ga;h.h=c.i;h.j=k;h.B=l;h=d;k=c.pa;h.i=c.o;h.s=k;d.m=c.sa;d.start();c.i=null;c.I=null;c.Ga=null;c.o=null;c.pa=null;case 2:return C(g,c.lc(a,b),4);case 4:return g.return(d)}})};
547
+ r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f,Yn(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):Un(d,new Q(2,7,7005));return f.return(e)})};
548
+ function Yn(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):C(l,Xn(a,b),3);2!=l.g&&(d=l.h);if(g=eo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.pa==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(co(a,b,c,d||null,f,!e,h,k))})}
549
+ function co(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,u,x,w,z,v,B,A,D,F;return L(function(J){if(1==J.g)return k=null,l=ye(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.T&&k.o?null:k},n=function(){return m()?m().getConfiguration():a.h},q=function(I,E){m()?k.configure(I,E):a.configure(I,E)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):C(J,fd(),3);2!=J.g&&(p=J.h,a.ba.width=p.width,a.ba.height=p.height);u=new ci(l,a.ba,null);x={networkingEngine:a.H,
550
+ filter:function(I){var E,H;return L(function(K){if(1==K.g)return C(K,di(u,I),2);if(4!=K.g){E=K.h;if(!E)return K.u(0);H=Pn("trackschanged");return C(K,Promise.resolve(),4)}k.dispatchEvent(H);G(K)})},makeTextStreamsForClosedCaptions:function(I){return fo(a,I)},onTimelineRegionAdded:function(I){var E=k.C;a:{var H=t(E.g);for(var K=H.next();!K.done;K=H.next())if(K=K.value,K.schemeIdUri==I.schemeIdUri&&K.id==I.id&&K.startTime==I.startTime&&K.endTime==I.endTime){H=K;break a}H=null}null==H&&(E.g.add(I),I=
551
551
  new S("regionadd",new Map([["region",I]])),E.dispatchEvent(I))},onEvent:function(I){return k.dispatchEvent(I)},onError:function(I){return k.onError(I)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){q("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.T&&a.j.updateDuration()},newDrmInfo:function(I){var E=k.l,H=E?E.g:null;H&&E.s&&gi(u,H.keySystem,I)},onManifestUpdated:function(){var I=
552
- (new Map).set("isLive",a.R());k.dispatchEvent(On("manifestupdated",I));em(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.R())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new bl(function(){return a.Ib()});w.addEventListener("regionadd",function(I){var E=I.region;fo(a,"timelineregionadded",E,k);em(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(E)})});z=null;l.streaming.observeQualityChanges&&(z=new cl(function(){return a.ob()}),z.addEventListener("qualitychange",function(I){var E=
553
- I.quality;I=I.position;E=(new Map).set("mediaQuality",{bandwidth:E.bandwidth,audioSamplingRate:E.audioSamplingRate,codecs:E.codecs,contentType:E.contentType,frameRate:E.frameRate,height:E.height,mimeType:E.mimeType,channelsCount:E.channelsCount,pixelAspectRatio:E.pixelAspectRatio,width:E.width}).set("position",I);a.dispatchEvent(On("mediaqualitychanged",E))}));v=!0;B={zb:a.G,onError:function(I){return k.onError(I)},ee:function(I){em(k,!0,function(){a:{var E=On("keystatuschanged");a.dispatchEvent(E);
552
+ (new Map).set("isLive",a.R());k.dispatchEvent(Pn("manifestupdated",I));fm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.R())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new cl(function(){return a.Ib()});w.addEventListener("regionadd",function(I){var E=I.region;go(a,"timelineregionadded",E,k);fm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(E)})});z=null;l.streaming.observeQualityChanges&&(z=new dl(function(){return a.ob()}),z.addEventListener("qualitychange",function(I){var E=
553
+ I.quality;I=I.position;E=(new Map).set("mediaQuality",{bandwidth:E.bandwidth,audioSamplingRate:E.audioSamplingRate,codecs:E.codecs,contentType:E.contentType,frameRate:E.frameRate,height:E.height,mimeType:E.mimeType,channelsCount:E.channelsCount,pixelAspectRatio:E.pixelAspectRatio,width:E.width}).set("position",I);a.dispatchEvent(Pn("mediaqualitychanged",E))}));v=!0;B={zb:a.H,onError:function(I){return k.onError(I)},fe:function(I){fm(k,!0,function(){a:{var E=Pn("keystatuschanged");a.dispatchEvent(E);
554
554
  var H=Object.keys(I);E=1==H.length&&"00"==H[0];var K=!1;if(H.length){H=t(a.i.variants);for(var M=H.next();!M.done;M=H.next()){M=M.value;var O=[];M.audio&&O.push(M.audio);M.video&&O.push(M.video);O=t(O);for(var N=O.next();!N.done;N=O.next()){var U=N.value;N=M.allowedByKeySystem;if(U.keyIds.size){M.allowedByKeySystem=!0;U=t(U.keyIds);for(var R=U.next();!R.done;R=U.next())if(R=R.value,(R=I[E?"00":R])||a.B.F)M.allowedByKeySystem=M.allowedByKeySystem&&!!R&&!ii.includes(R)}N!=M.allowedByKeySystem&&(K=!0)}}}if(K&&
555
- (go(a),!ho(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&io(a)}})},onExpirationUpdated:function(I,E){var H=On("expirationupdated");k.dispatchEvent(H);if((H=k.j)&&H.onExpirationUpdated)H.onExpirationUpdated(I,E)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.Ia,(a.s||k.getStats()).j=I,a.K&&rj(a.K))}};A=In(a,m);D=function(){return a.rc(B)};F={config:l,Uh:x,di:w,ci:z,rc:D,Th:u,networkingEngine:A,Vg:f,Ug:h};k=new dm(b,d,e,c,F);return J.return(k)})}
556
- function Wn(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,C(e,Jm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&Zc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
557
- function co(a,b){if(!Nc())return!0;if(b){if(""==(a.g||Pc()).canPlayType(b))return!1;if(!(Nc()&&b in li))return!0;if(be(b)){if(a.h.streaming.preferNativeHls)return!0;if(Zc()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(Zc())return a.h.streaming.useNativeHlsOnSafari}}return!1}
558
- function Un(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return Qn(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.kf=b,d=jo(a.g,c,function(h,k,l){ko(a,h,k,l)},a.K),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.ba=f,C(g,d.L,2);a.F=d;G(g)})}
559
- function $n(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){switch(E.g){case 1:Qn(a,"load");e=a.g;a.H=new Hk({Md:function(){return e.playbackRate},Wb:function(){return e.defaultPlaybackRate},Df:function(H){e.playbackRate=H},og:function(H){e.currentTime+=H}});f=function(){return lo(a)};g=function(){return mo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);Nn(a,a.h);a.Ha=a.h.preferredTextLanguage;a.Ub=a.h.preferredTextRole;a.Tb=a.h.preferForcedSubs;
560
- no(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(H,K,M){a.j&&H!=a.j.j&&oo(a,H,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=po(a);a.j.configure(a.h.streaming);a.l=qo;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":ro(a,H)}});a.dispatchEvent(On("streaming"));h=c;(k=a.j.j)||h||(h=so(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=q.value)&&
561
- !p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);no(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);u=function(H){a.C=to(a,H);a.bb=uo(a,b);vo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||u(a.ea);if(k){E.u(4);break}if(!a.h.streaming.startAtSegmentBoundary){E.u(5);break}x=a.i.presentationTimeline;w=a.ea||
562
- a.g.currentTime;z=x.Zb();v=x.pb();w<z?w=z:w>v&&(w=v);return C(E,wo(h,w),6);case 6:B=E.h,u(B);case 5:oo(a,h,!0,!1,0);case 4:return a.C.ve(),A=a.wc().find(function(H){return H.active}),A||((D=lf(a.i.textStreams,a.Ha,a.Ub,a.Tb)[0]||null)&&Ok(a.s.h,D,!0),h&&(D?(h.audio&&xo(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),yo(a)):a.da=!1),D&&(a.h.streaming.alwaysStreamText||a.Ze())&&vl(a.j,D)),C(E,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),zo(a));go(a);ho(a);a.i.variants.some(function(H){return H.primary});
563
- (F=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?(J=function(){return Ao(a)},a.m.D(e,"timeupdate",J)):F||(I=function(){return Bo(a)},a.m.D(e,"timeupdate",I),Bo(a));if(a.A)a.A.onManifestUpdated(F);a.Ia=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(E)}})}
564
- function Yn(a,b){var c,d,e,f;return L(function(g){return 1==g.g?(c=Kd,d=Date.now()/1E3,e=!0,a.B=a.rc({zb:a.G,onError:function(h){Tn(a,h)},ee:function(){},onExpirationUpdated:function(){var h=On("expirationupdated");a.dispatchEvent(h)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
555
+ (ho(a),!io(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&jo(a)}})},onExpirationUpdated:function(I,E){var H=Pn("expirationupdated");k.dispatchEvent(H);if((H=k.j)&&H.onExpirationUpdated)H.onExpirationUpdated(I,E)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.Ia,(a.s||k.getStats()).j=I,a.K&&rj(a.K))}};A=Jn(a,m);D=function(){return a.rc(B)};F={config:l,Vh:x,ei:w,di:z,rc:D,Uh:u,networkingEngine:A,Wg:f,Vg:h};k=new em(b,d,e,c,F);return J.return(k)})}
556
+ function Xn(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,C(e,Km(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&Zc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
557
+ function eo(a,b){if(!Nc())return!0;if(b){if(""==(a.g||Pc()).canPlayType(b))return!1;if(!(Nc()&&b in li))return!0;if(Yd(b)){if(a.h.streaming.preferNativeHls)return!0;if(Zc()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(Zc())return a.h.streaming.useNativeHlsOnSafari}}return!1}
558
+ function Vn(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return Rn(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.nf=b,d=ko(a.g,c,function(h,k,l){lo(a,h,k,l)},a.K),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.ba=f,C(g,d.L,2);a.F=d;G(g)})}
559
+ function ao(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){switch(E.g){case 1:Rn(a,"load");e=a.g;a.G=new Hk({Md:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Ef:function(H){e.playbackRate=H},pg:function(H){e.currentTime+=H}});f=function(){return mo(a)};g=function(){return no(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);On(a,a.h);a.Ha=a.h.preferredTextLanguage;a.Vb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;
560
+ oo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(H,K,M){a.j&&H!=a.j.j&&po(a,H,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=qo(a);a.j.configure(a.h.streaming);a.l=ro;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":so(a,H)}});a.dispatchEvent(Pn("streaming"));h=c;(k=a.j.j)||h||(h=to(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=q.value)&&
561
+ !p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);oo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);u=function(H){a.C=uo(a,H);a.bb=vo(a,b);wo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||u(a.ea);if(k){E.u(4);break}if(!a.h.streaming.startAtSegmentBoundary){E.u(5);break}x=a.i.presentationTimeline;w=a.ea||
562
+ a.g.currentTime;z=x.$b();v=x.pb();w<z?w=z:w>v&&(w=v);return C(E,xo(h,w),6);case 6:B=E.h,u(B);case 5:po(a,h,!0,!1,0);case 4:return a.C.we(),A=a.wc().find(function(H){return H.active}),A||((D=lf(a.i.textStreams,a.Ha,a.Vb,a.Ub)[0]||null)&&Pk(a.s.h,D,!0),h&&(D?(h.audio&&yo(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),zo(a)):a.da=!1),D&&(a.h.streaming.alwaysStreamText||a.$e())&&wl(a.j,D)),C(E,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),Ao(a));ho(a);io(a);a.i.variants.some(function(H){return H.primary});
563
+ (F=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?(J=function(){return Bo(a)},a.m.D(e,"timeupdate",J)):F||(I=function(){return Co(a)},a.m.D(e,"timeupdate",I),Co(a));if(a.A)a.A.onManifestUpdated(F);a.Ia=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(E)}})}
564
+ function Zn(a,b){var c,d,e,f;return L(function(g){return 1==g.g?(c=Kd,d=Date.now()/1E3,e=!0,a.B=a.rc({zb:a.H,onError:function(h){Un(a,h)},fe:function(){},onExpirationUpdated:function(){var h=Pn("expirationupdated");a.dispatchEvent(h)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
565
565
  segmentIndex:null,mimeType:b?Wd(b):"",codecs:b?Xd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},f.video.fullMimeTypes.add(Md(f.video.mimeType,
566
566
  f.video.codecs)),a.B.ba=!0,C(g,vh(a.B,[f],[]),2)):C(g,a.B.Vc(a.g),0)})}
567
- function ao(a,b,c){var d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return Qn(a,"src-equals"),d=a.g,a.C=new xk(d),e=!1,a.Sb.push(function(){e=!0}),null!=a.ea&&a.C.we(a.ea),a.H=new Hk({Md:function(){return d.playbackRate},Wb:function(){return d.defaultPlaybackRate},Df:function(u){d.playbackRate=u},og:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,vo(a,d,f),g=function(){return lo(a)},h=function(){return mo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
568
- "ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return go(a)}),a.m.D(d.audioTracks,"removetrack",function(){return go(a)}),a.m.D(d.audioTracks,"change",function(){return go(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Co(a,u);break;case "chapters":ro(a,u);break;default:go(a)}}),a.m.D(d.textTracks,"removetrack",function(){return go(a)}),
569
- a.m.D(d.textTracks,"change",function(){return go(a)})),d.src=en(a.T,a.qa,c),(Tc()||Wc())&&d.load(),"none"!=d.preload&&!d.autoplay&&be(c)&&cd()&&d.load(),a.l=Do,a.dispatchEvent(On("streaming")),k=new Rf,ok(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ve();k.resolve()}),ok(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return L(function(x){if(1==x.g)return Eo(a),u=Fo(a),u.find(function(w){return"disabled"!=w.mode})?(0<u.length&&(a.da=!0),x.u(2)):C(x,new Promise(function(w){a.m.na(d.textTracks,
570
- "change",w);(new Mc(w)).W(1)}),2);if(e)return x.return();Go(a);G(x)})}),d.error?k.reject(Sn(a)):"none"==d.preload&&(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.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Sn(a))}),C(p,k,2);(l=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?
571
- (m=function(){return Ao(a)},a.m.D(d,"timeupdate",m)):l||(n=function(){return Bo(a)},a.m.D(d,"timeupdate",n),Bo(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Ib().end,a.m.D(d,"progress",function(){var u=a.Ib().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.Ia=!0;G(p)})}function Eo(a){var b=a.h.preferredAudioLanguage;""!=b&&a.wg(b,a.h.preferredVariantRole)}function Go(a){var b=a.h.preferredTextLanguage;""!=b&&a.yf(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
572
- function Co(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ho(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Io(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).jc().W(.5);a.Sb.push(function(){c.stop()})}}
573
- function ko(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Ho(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Ho(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(On("metadata",b))}
574
- function ro(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).jc().W(.5);a.Sb.push(function(){c.stop()})}}r.hi=function(){for(var a=this.X;a.g;)a.release()};r.rc=function(a){return new oh(a)};
575
- function In(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?em(b(),!0,e):e()}b||(b=function(){return null});return new dg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(On("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
576
- Cn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],Cn(u[1]))}var x=q}catch(w){x=null}x&&(h.g=x)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(On("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)mn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
577
- "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}mn(h,f,{ot:jn,su:!h.i})}}catch(N){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case ng:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.R()?"l":"v"};n.ot=qn(k);var q=n.ot===nn||n.ot===gn||n.ot===hn||n.ot===sn,p=k.stream;if(p){var u=h.h.eb();if(q&&(n.bl=un(h,p.type),n.ot!==sn)){var x=vn(h,p.type);n.dl=u?x/Math.abs(u):x}p.bandwidth&&(n.br=p.bandwidth/1E3);
578
- if(p.segmentIndex&&m){var w=p.segmentIndex.xb(m.endTime,!0,0>u);if(w){var z=w.next().value;if(z&&z!=m){if(!Mb(m.$(),z.$())){var v=z.$()[0],B=f.uris[0],A=new URL(v),D=new URL(B);if(A.origin!==D.origin)var F=v;else{for(var J=A.pathname.split("/").slice(1),I=D.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");F=J.join("/")}n.nor=F}if((z.Aa||z.ja)&&(m.Aa!=z.Aa||m.ja!=z.ja)){var E=z.Aa+"-";z.ja&&(E+=z.ja);n.nrr=E}}}var H=h.h.eb()||1,K=vn(h,p.type)||
579
- 500,M=p.bandwidth;var O=M?M*(m.endTime-m.startTime)/1E3/(K/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}q&&n.ot!==sn&&(n.tb=wn(h,n.ot)/1E3);mn(h,f,n)}}catch(N){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:mn(h,f,{ot:"k"});break;case 4:mn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.I)&&e.banLocation&&e.banLocation(h)},function(e,f){e=f.data.byteLength;if(f=b()?b().getStats():a.s)f.Ed=isNaN(f.Ed)?e:f.Ed+e})}
580
- function to(a,b){return new yk(a.g,a.i,a.h.streaming,b,function(){a.bb&&Jk(a.bb,!0);a.j&&a.j.od();a.L&&Jo(a)},function(c){return a.dispatchEvent(c)})}
581
- function uo(a,b){b=new rm(a.mb,a.R()||0<b);b.addEventListener("enter",function(d){fo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){fo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(fo(a,"timelineregionenter",e),fo(a,"timelineregionexit",e))});var c=new Ik(a.g);c.g.add(b);a.lb&&c.g.add(a.lb);return c}
582
- function vo(a,b,c){a.L=new Kf;a.L.g=Mf;Nf(a.L,c,Math.min(.5,c/2));Vn(a);a.m.D(b,"waiting",function(){return Jo(a)});a.m.D(b,"stalled",function(){return Jo(a)});a.m.D(b,"canplaythrough",function(){return Jo(a)});a.m.D(b,"progress",function(){return Jo(a)})}
583
- function Jo(a){switch(a.l){case Do:if(a.g.ended)var b=!0;else{var c=zi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case qo:a:if(a.g.ended||Ij(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Gb();var d=zi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Bi(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Lf:Mf;c.g=d;(b=b!=d)&&d===Lf&&(c.h=Date.now());b&&Vn(a)}function jo(a,b,c,d){return new zj(a,b,c,d)}
584
- function Hn(a){return new dn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Yb:function(){return a.Yb()},Hb:function(){return a.Hb()},R:function(){return a.R()}},a.h.cmcd)}
585
- function po(a){return new hl(a.i,{Ld:function(){return a.C?a.C.Dd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},V:a.F,zb:a.G,onError:function(b){return Tn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Zh:function(){a.I&&a.I.update&&a.I.update()},mf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.pg();var g=Jj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Dd()<g&&a.C.we(g)}Jo(a);d=(new Map).set("start",d).set("end",e).set("contentType",
586
- f);a.dispatchEvent(On("segmentappended",d));a.o&&c.fastSwitching&&b.md&&b.Wd&&a.o.trySuggestStreams()},Yh:function(b,c){(c=c.ff)&&a.lb&&el(a.lb,c,b)},Qf:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Mg(Ab(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Eh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
587
- return d},$h:function(b,c,d){ko(a,b,c,d)},Jd:function(b,c){return a.Jd(b,c)}})}
588
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
567
+ function bo(a,b,c){var d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return Rn(a,"src-equals"),d=a.g,a.C=new xk(d),e=!1,a.Tb.push(function(){e=!0}),null!=a.ea&&a.C.xe(a.ea),a.G=new Hk({Md:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Ef:function(u){d.playbackRate=u},pg:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,wo(a,d,f),g=function(){return mo(a)},h=function(){return no(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
568
+ "ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return ho(a)}),a.m.D(d.audioTracks,"removetrack",function(){return ho(a)}),a.m.D(d.audioTracks,"change",function(){return ho(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Do(a,u);break;case "chapters":so(a,u);break;default:ho(a)}}),a.m.D(d.textTracks,"removetrack",function(){return ho(a)}),
569
+ a.m.D(d.textTracks,"change",function(){return ho(a)})),d.src=fn(a.T,a.qa,c),(Tc()||Wc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Yd(c)&&cd()&&d.load(),a.l=Eo,a.dispatchEvent(Pn("streaming")),k=new Rf,ok(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.we();k.resolve()}),ok(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return L(function(x){if(1==x.g)return Fo(a),u=Go(a),u.find(function(w){return"disabled"!=w.mode})?(0<u.length&&(a.da=!0),x.u(2)):C(x,new Promise(function(w){a.m.na(d.textTracks,
570
+ "change",w);(new Mc(w)).X(1)}),2);if(e)return x.return();Ho(a);G(x)})}),d.error?k.reject(Tn(a)):"none"==d.preload&&(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.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Tn(a))}),C(p,k,2);(l=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?
571
+ (m=function(){return Bo(a)},a.m.D(d,"timeupdate",m)):l||(n=function(){return Co(a)},a.m.D(d,"timeupdate",n),Co(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Ib().end,a.m.D(d,"progress",function(){var u=a.Ib().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.Ia=!0;G(p)})}function Fo(a){var b=a.h.preferredAudioLanguage;""!=b&&a.xg(b,a.h.preferredVariantRole)}function Ho(a){var b=a.h.preferredTextLanguage;""!=b&&a.zf(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
572
+ function Do(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Io(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Jo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).kc().X(.5);a.Tb.push(function(){c.stop()})}}
573
+ function lo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Io(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Io(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Pn("metadata",b))}
574
+ function so(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).kc().X(.5);a.Tb.push(function(){c.stop()})}}r.ii=function(){for(var a=this.Y;a.g;)a.release()};r.rc=function(a){return new oh(a)};
575
+ function Jn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?fm(b(),!0,e):e()}b||(b=function(){return null});return new dg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Pn("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
576
+ Dn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],Dn(u[1]))}var x=q}catch(w){x=null}x&&(h.g=x)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Pn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)nn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
577
+ "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}nn(h,f,{ot:kn,su:!h.i})}}catch(N){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case ng:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.R()?"l":"v"};n.ot=rn(k);var q=n.ot===on||n.ot===hn||n.ot===jn||n.ot===tn,p=k.stream;if(p){var u=h.h.eb();if(q&&(n.bl=vn(h,p.type),n.ot!==tn)){var x=wn(h,p.type);n.dl=u?x/Math.abs(u):x}p.bandwidth&&(n.br=p.bandwidth/1E3);
578
+ if(p.segmentIndex&&m){var w=p.segmentIndex.xb(m.endTime,!0,0>u);if(w){var z=w.next().value;if(z&&z!=m){if(!Mb(m.$(),z.$())){var v=z.$()[0],B=f.uris[0],A=new URL(v),D=new URL(B);if(A.origin!==D.origin)var F=v;else{for(var J=A.pathname.split("/").slice(1),I=D.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");F=J.join("/")}n.nor=F}if((z.Aa||z.ja)&&(m.Aa!=z.Aa||m.ja!=z.ja)){var E=z.Aa+"-";z.ja&&(E+=z.ja);n.nrr=E}}}var H=h.h.eb()||1,K=wn(h,p.type)||
579
+ 500,M=p.bandwidth;var O=M?M*(m.endTime-m.startTime)/1E3/(K/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}q&&n.ot!==tn&&(n.tb=xn(h,n.ot)/1E3);nn(h,f,n)}}catch(N){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:nn(h,f,{ot:"k"});break;case 4:nn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.I)&&e.banLocation&&e.banLocation(h)},function(e,f){e=f.data.byteLength;if(f=b()?b().getStats():a.s)f.Ed=isNaN(f.Ed)?e:f.Ed+e})}
580
+ function uo(a,b){return new yk(a.g,a.i,a.h.streaming,b,function(){a.bb&&Kk(a.bb,!0);a.j&&a.j.od();a.L&&Ko(a)},function(c){return a.dispatchEvent(c)})}
581
+ function vo(a,b){b=new sm(a.mb,a.R()||0<b);b.addEventListener("enter",function(d){go(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){go(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(go(a,"timelineregionenter",e),go(a,"timelineregionexit",e))});var c=new Jk(a.g);c.g.add(b);a.lb&&c.g.add(a.lb);return c}
582
+ function wo(a,b,c){a.L=new Kf;a.L.g=Mf;Nf(a.L,c,Math.min(.5,c/2));Wn(a);a.Td=(new Mc(function(){Ko(a)})).Sa(.25);a.m.D(b,"waiting",function(){return Ko(a)});a.m.D(b,"stalled",function(){return Ko(a)});a.m.D(b,"canplaythrough",function(){return Ko(a)});a.m.D(b,"progress",function(){return Ko(a)})}
583
+ function Ko(a){switch(a.l){case Eo:if(a.g.ended)var b=!0;else{var c=zi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ro:a:if(a.g.ended||Ij(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Gb();var d=zi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Bi(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Lf:Mf;c.g=d;(b=b!=d)&&d===Lf&&(c.h=Date.now());b&&Wn(a)}function ko(a,b,c,d){return new zj(a,b,c,d)}
584
+ function In(a){return new en({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Zb:function(){return a.Zb()},Hb:function(){return a.Hb()},R:function(){return a.R()}},a.h.cmcd)}
585
+ function qo(a){return new il(a.i,{Ld:function(){return a.C?a.C.Dd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},V:a.F,zb:a.H,onError:function(b){return Un(a,b)},onEvent:function(b){return a.dispatchEvent(b)},$h:function(){a.I&&a.I.update&&a.I.update()},mf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.qg();var g=Jj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Dd()<g&&a.C.xe(g)}Ko(a);d=(new Map).set("start",d).set("end",e).set("contentType",
586
+ f);a.dispatchEvent(Pn("segmentappended",d));a.o&&c.fastSwitching&&b.md&&b.Wd&&a.o.trySuggestStreams()},Zh:function(b,c){(c=c.gf)&&a.lb&&fl(a.lb,c,b)},Rf:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Mg(Ab(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Eh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
587
+ return d},ai:function(b,c,d){lo(a,b,c,d)},Jd:function(b,c){return a.Jd(b,c)}})}
588
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Sl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
589
589
  a.streaming&&"useNativeHlsOnSafari"in a.streaming&&pb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){pb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
590
590
  a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
591
- 100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var d=cm(this.h,a,Gn(this));Ko(this);return d};
592
- function Ko(a){a.Pd=new ci(a.h,a.ba,a.B);if(a.I){var b=ye(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.B&&a.B.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=Pn&&fi(a.Pd,a.i)&&go(a)}catch(f){Tn(a,f)}a.o&&ho(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||io(a)}a.G&&a.G.Cf(a.h.streaming.forceHTTPS);if(a.F)if(a.F.configure(a.h.mediaSource),a.F.ba=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.kf!=b){var c=b();c.configure?
593
- c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.kf=b;a.j&&(b=a.j,(c=b.i.get(Id))&&tl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),zo(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Nf(a.L,b,Math.min(.5,
594
- b/2)));a.i&&no(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Gn(this);cm(a,this.h,Gn(this));return a};
595
- r.ag=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ib().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.li=function(){for(var a in this.h)delete this.h[a];cm(this.h,Gn(this),Gn(this));Ko(this)};r.qh=function(){return this.l};r.Ue=function(){return this.i?this.i.type:null};r.th=function(){return this.g};
596
- r.Yb=function(){return this.G};r.ad=function(){return this.qa};r.$f=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.cc=function(){return this.i?this.i.presentationTimeline.cc():!1};r.Kh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
597
- r.Ib=function(){if(this.i){if(!this.Ia&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Zb(),end:a.pb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Hh=function(){this.R()&&(this.g.currentTime=this.Ib().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.B?this.B.g:null};r.cd=function(){return this.B?this.B.cd():Infinity};
598
- r.Se=function(){return this.B?this.B.Se():[]};r.Kd=function(){return this.B?this.B.Kd():{}};r.Xe=function(){return this.L?this.L.g==Mf:!1};r.eb=function(){return this.g?this.H?this.H.h:1:0};
599
- r.sd=function(a){var b=this;0==a?Wa("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.H.set(a),this.l==qo&&(this.o.playbackRateChanged(a),sl(this.j,1<Math.abs(a))),this.R()&&this.ta.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Ib(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Wc():Math.floor(c)<=Math.floor(d.start+e)&&b.Wc()}))};
600
- r.Wc=function(){var a=this.H.Wb();this.l==Do&&this.H.set(a);this.l==qo&&(this.H.set(a),this.o.playbackRateChanged(a),sl(this.j,!1));this.ta.ib()};
591
+ 100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var d=dm(this.h,a,Hn(this));Lo(this);return d};
592
+ function Lo(a){a.Pd=new ci(a.h,a.ba,a.B);if(a.I){var b=ye(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.B&&a.B.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=Qn&&fi(a.Pd,a.i)&&ho(a)}catch(f){Un(a,f)}a.o&&io(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||jo(a)}a.H&&a.H.Df(a.h.streaming.forceHTTPS);if(a.F)if(a.F.configure(a.h.mediaSource),a.F.ba=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.nf!=b){var c=b();c.configure?
593
+ c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.nf=b;a.j&&(b=a.j,(c=b.i.get(Id))&&ul(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),Ao(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Nf(a.L,b,Math.min(.5,
594
+ b/2)));a.i&&oo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Hn(this);dm(a,this.h,Hn(this));return a};
595
+ r.bg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ib().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.mi=function(){for(var a in this.h)delete this.h[a];dm(this.h,Hn(this),Hn(this));Lo(this)};r.rh=function(){return this.l};r.Ve=function(){return this.i?this.i.type:null};r.uh=function(){return this.g};
596
+ r.Zb=function(){return this.H};r.ad=function(){return this.qa};r.ag=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.dc=function(){return this.i?this.i.presentationTimeline.dc():!1};r.Lh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
597
+ r.Ib=function(){if(this.i){if(!this.Ia&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.$b(),end:a.pb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Ih=function(){this.R()&&(this.g.currentTime=this.Ib().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.B?this.B.g:null};r.cd=function(){return this.B?this.B.cd():Infinity};
598
+ r.Te=function(){return this.B?this.B.Te():[]};r.Kd=function(){return this.B?this.B.Kd():{}};r.Ye=function(){return this.L?this.L.g==Mf:!1};r.eb=function(){return this.g?this.G?this.G.i:1:0};
599
+ r.sd=function(a){var b=this;0==a?Wa("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.G.set(a),this.l==ro&&(this.o.playbackRateChanged(a),tl(this.j,1<Math.abs(a))),this.R()&&this.ta.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Ib(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Wc():Math.floor(c)<=Math.floor(d.start+e)&&b.Wc()}))};
600
+ r.Wc=function(){var a=this.G.Xb();this.l==Eo&&this.G.set(a);this.l==ro&&(this.G.set(a),this.o.playbackRateChanged(a),tl(this.j,!1));this.ta.ib()};
601
601
  r.Hb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,jf(e)){var f=Xe(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return hf(g)}):[]};
602
- r.wc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ye(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Fo(this).map(function(f){return ff(f)}):[]};r.oh=function(){var a=this.$c;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Ze(b)})};
603
- r.gh=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=qo&&b.l!=Do)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.tc(function(h){var k=Lo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Rb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.fg(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
604
- function Lo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Rb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
605
- r.fg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=qo&&c.l!=Do)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Lo(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Rb;n=l/h.rows;q=h.Rb*h.rows;p=g.i-g.startTime;
606
- u=g.A||p/q;x=g.startTime;z=w=0;1<q&&(v=Math.floor((b-g.startTime)/u),x=g.startTime+v*u,w=v%h.Rb*m,z=Math.floor(v/h.Rb)*n);B=!1;if(A=g.s)B=!0,n=A.height,w=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:z,startTime:x,duration:u,uris:g.$(),width:m,sprite:B})})};
607
- r.xg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Ok(this.s.h,b,!1),vl(this.j,b),Mo(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Fo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,df(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Mo(this)}};
608
- r.zf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&jf(d)&&(oo(this,d,!1,b,c),this.sa=new Af(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),ho(this))}else if(this.g&&this.g.audioTracks)for(b=
609
- Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,df(c)==a.id){No(this,c);break}};r.ih=function(){return Oo(this.Hb())};r.Ah=function(){return Oo(this.wc())};r.hh=function(){return Array.from(Po(this.Hb()))};r.zh=function(){return Array.from(Po(this.wc()))};
610
- r.wg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.sa=new Bf(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.sa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
611
- b))c=f;c?(a=Xe(c),this.zf(a,!0,d)):io(this)}else this.g&&this.g.audioTracks&&(d=lf(this.Hb(),a,b||"",!1)[0])&&this.zf(d)};r.yf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ha=a,this.Ub=b||"",this.Tb=c,(a=lf(this.i.textStreams,this.Ha,this.Ub,this.Tb)[0]||null)&&a!=this.j.s&&(Ok(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Ze()))vl(this.j,a),Mo(this)}else(a=lf(this.wc(),a,b||"",c)[0])&&this.xg(a)};
612
- r.si=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.sa=new Bf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),io(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&No(this,b)}};
613
- r.Ze=function(){var a=this.da;return this.F&&this.l==qo?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Fo(this).some(function(b){return"showing"==b.mode}):a};r.bg=function(){return this.g&&this.g.src&&this.g.textTracks?Qo(this).map(function(a){return ff(a)}):[]};
614
- r.jh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=qe(a),c=Qo(this).filter(function(h){return qe(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.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};d.has(f)||(a.push(g),d.add(f))}}return a};
615
- function Fo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Io(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Qo(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
616
- r.Dg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==qo)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=lf(this.i.textStreams,this.Ha,this.Ub,this.Tb),0<a.length&&(vl(this.j,a[0]),Mo(this))):rl(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Fo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}yo(this)}};
617
- r.vh=function(){if(this.C)var a=this.C.Dd();else{if(null==this.ea)return new Date;a=this.ea}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.eg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:a):null};
618
- r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==qo)return this.F.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Do&&(a.total=Ci(this.g.buffered));return a};
619
- r.getStats=function(){if(this.l!=qo&&this.l!=Do)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};lo(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
620
- this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Mf(),this.s.N=this.C.Nf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.I=d;this.s.H=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==qo){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
621
- NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.eg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Do&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.I;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,u=Lk(f.g,"playing"),x=Lk(f.g,"paused"),w=Lk(f.g,"buffering"),z=f.s,v=f.C,B=f.G,A=f.Ed,D=Mk(f.g),F=[];
602
+ r.wc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ye(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Go(this).map(function(f){return ff(f)}):[]};r.ph=function(){var a=this.$c;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Ze(b)})};
603
+ r.hh=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=ro&&b.l!=Eo)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.tc(function(h){var k=Mo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Sb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.gg(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
604
+ function Mo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Sb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
605
+ r.gg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=ro&&c.l!=Eo)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Mo(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Sb;n=l/h.rows;q=h.Sb*h.rows;p=g.i-g.startTime;
606
+ u=g.A||p/q;x=g.startTime;z=w=0;1<q&&(v=Math.floor((b-g.startTime)/u),x=g.startTime+v*u,w=v%h.Sb*m,z=Math.floor(v/h.Sb)*n);B=!1;if(A=g.s)B=!0,n=A.height,w=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:z,startTime:x,duration:u,uris:g.$(),width:m,sprite:B})})};
607
+ r.yg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Pk(this.s.h,b,!1),wl(this.j,b),No(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Go(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,df(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";No(this)}};
608
+ r.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&jf(d)&&(po(this,d,!1,b,c),this.sa=new Af(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),io(this))}else if(this.g&&this.g.audioTracks)for(b=
609
+ Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,df(c)==a.id){Oo(this,c);break}};r.jh=function(){return Po(this.Hb())};r.Bh=function(){return Po(this.wc())};r.ih=function(){return Array.from(Qo(this.Hb()))};r.Ah=function(){return Array.from(Qo(this.wc()))};
610
+ r.xg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.sa=new Bf(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.sa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
611
+ b))c=f;c?(a=Xe(c),this.Af(a,!0,d)):jo(this)}else this.g&&this.g.audioTracks&&(d=lf(this.Hb(),a,b||"",!1)[0])&&this.Af(d)};r.zf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ha=a,this.Vb=b||"",this.Ub=c,(a=lf(this.i.textStreams,this.Ha,this.Vb,this.Ub)[0]||null)&&a!=this.j.s&&(Pk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.$e()))wl(this.j,a),No(this)}else(a=lf(this.wc(),a,b||"",c)[0])&&this.yg(a)};
612
+ r.ti=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.sa=new Bf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),jo(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Oo(this,b)}};
613
+ r.$e=function(){var a=this.da;return this.F&&this.l==ro?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Go(this).some(function(b){return"showing"==b.mode}):a};r.cg=function(){return this.g&&this.g.src&&this.g.textTracks?Ro(this).map(function(a){return ff(a)}):[]};
614
+ r.kh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=qe(a),c=Ro(this).filter(function(h){return qe(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.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};d.has(f)||(a.push(g),d.add(f))}}return a};
615
+ function Go(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Jo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Ro(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
616
+ r.Eg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==ro)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=lf(this.i.textStreams,this.Ha,this.Vb,this.Ub),0<a.length&&(wl(this.j,a[0]),No(this))):sl(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Go(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}zo(this)}};
617
+ r.wh=function(){if(this.C)var a=this.C.Dd();else{if(null==this.ea)return new Date;a=this.ea}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.fg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:a):null};
618
+ r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==ro)return this.F.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Eo&&(a.total=Ci(this.g.buffered));return a};
619
+ r.getStats=function(){if(this.l!=ro&&this.l!=Eo)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};mo(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
620
+ this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Nf(),this.s.N=this.C.Of());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.I=d;this.s.H=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==ro){c=this.j.j;b=this.j.s;if(c){d=this.G?this.G.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
621
+ NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.fg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Eo&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.I;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,u=Mk(f.g,"playing"),x=Mk(f.g,"paused"),w=Mk(f.g,"buffering"),z=f.s,v=f.C,B=f.G,A=f.Ed,D=Nk(f.g),F=[];
622
622
  f=t(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,F.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:u,pauseTime:x,bufferingTime:w,licenseTime:z,liveLatency:v,maxSegmentDuration:B,bytesDownloaded:A,stateHistory:D,
623
623
  switchHistory:F}};
624
- r.Rg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=qo&&h.l!=Do)throw new Q(1,7,7004);"subtitles"!=c&&"captions"!=c&&Wa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.u(2);break}return C(A,Ro(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Do){A.u(4);break}g&&(c="forced");return C(A,So(h,a,b,c,d,f||"",k),5);case 5:l=qe(b);m=h.wc();if(n=m.find(function(D){return qe(D.language)==
625
- l&&D.label==(f||"")&&D.kind==c}))return go(h),A.return(n);throw new Q(1,2,2012);case 4:q=Kd;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new Q(1,4,4033);if(!k.length){A.u(6);break}return C(A,To(h,a,h.G,h.h.streaming.retryParameters),7);case 7:u=A.h,x=Uo(h,u,d,k),w=new Blob([x],{type:"text/vtt"}),a=Cj(w),d="text/vtt";case 6:z={id:h.nf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fk(0,p,[a]),mimeType:d||"",
626
- codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Md(d||"",e||"")])};v=Md(z.mimeType,z.codecs);B=de(v);if(!B)throw new Q(2,2,2014,d);h.i.textStreams.push(z);go(h);return A.return(Ye(z))}})};
627
- r.Sg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=qo&&c.l!=Do)throw new Q(1,7,7004);if(b){B.u(2);break}return C(B,Ro(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new Q(1,2,2017,a);d=Kd;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new Q(1,4,4045);return C(B,To(c,a,c.G,c.h.streaming.retryParameters),4);case 4:f=B.h;g=ee[b];if(!g)throw new Q(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
628
- vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Rc:q.Rc,Nb:q.Nb},u=p.next())q.Nb=u.value,q.Rc=null,x=function(A){return function(){null==A.Rc&&(A.Rc=Ad([a],[A.Nb.payload]));return A.Rc||[]}}(q),w=new vi(q.Nb.startTime,q.Nb.endTime,x,0,null,null,0,0,Infinity),q.Nb.payload.includes("#xywh")&&(z=q.Nb.payload.split("#xywh=")[1].split(","),4===z.length&&w.Eg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
629
- n.push(w);v={id:c.nf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ue,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Md(b||
630
- "","")])};c.l==Do?c.$c.push(v):c.i.imageStreams.push(v);go(c);return B.return(Ze(v))}})};
631
- r.Qg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=qo&&d.l!=Do)throw new Q(1,7,7004);if(c){k.u(2);break}return C(k,Ro(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,So(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.bg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return C(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new Q(1,2,2015))})}),6);case 6:return go(d),k.return(h);case 5:throw new Q(1,
632
- 2,2012);}})};function Ro(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),C(d,Jm(b,a.G,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new Q(1,2,2011,b);}})}
633
- function So(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,To(a,b,a.G,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Uo(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Cj(l),e="text/vtt");m=document.createElement("track");var q=a.T,p=b;try{if(q.g.enabled){var u=fn(q);u.ot=tn;u.su=!0;var x=kn(u);var w=ln(p,x)}else w=p}catch(z){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
634
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function To(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=ng;f=hg([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&mn(k,f,{ot:tn,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
635
- function Uo(a,b,c,d){var e=ee[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),cn(b,d);throw new Q(2,2,2014,c);}r.xi=function(a,b){this.ba.width=a;this.ba.height=b};r.vf=function(a){if(this.l==qo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Qa||d.ub||(d.gd=!1,ql(b,d,a));b=!0}}else b=!1;return b};
636
- r.Te=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.i};r.rh=function(){return this.Ga};
637
- function Gn(a){var b=Zl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.vf(d))}};b.textDisplayFactory=function(){if(a.Rd){var c=a.getConfiguration();return new Um(a.g,a.Rd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Om(a.g,"Shaka Player TextTrack"):new Rm};return b}r.Hg=function(a){this.Rd=a};
638
- function eo(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Gk,l=e.closedCaptions.get(g);h={id:a.nf++,originalId:g,groupId:null,
624
+ r.Sg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=ro&&h.l!=Eo)throw new Q(1,7,7004);"subtitles"!=c&&"captions"!=c&&Wa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.u(2);break}return C(A,So(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Eo){A.u(4);break}g&&(c="forced");return C(A,To(h,a,b,c,d,f||"",k),5);case 5:l=qe(b);m=h.wc();if(n=m.find(function(D){return qe(D.language)==
625
+ l&&D.label==(f||"")&&D.kind==c}))return ho(h),A.return(n);throw new Q(1,2,2012);case 4:q=Kd;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new Q(1,4,4033);if(!k.length){A.u(6);break}return C(A,Uo(h,a,h.H,h.h.streaming.retryParameters),7);case 7:u=A.h,x=Vo(h,u,d,k),w=new Blob([x],{type:"text/vtt"}),a=Cj(w),d="text/vtt";case 6:z={id:h.tf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fk(0,p,[a]),mimeType:d||"",
626
+ codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Md(d||"",e||"")])};v=Md(z.mimeType,z.codecs);B=de(v);if(!B)throw new Q(2,2,2014,d);h.i.textStreams.push(z);ho(h);return A.return(Ye(z))}})};
627
+ r.Tg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=ro&&c.l!=Eo)throw new Q(1,7,7004);if(b){B.u(2);break}return C(B,So(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new Q(1,2,2017,a);d=Kd;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new Q(1,4,4045);return C(B,Uo(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=B.h;g=ee[b];if(!g)throw new Q(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
628
+ vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Rc:q.Rc,Nb:q.Nb},u=p.next())q.Nb=u.value,q.Rc=null,x=function(A){return function(){null==A.Rc&&(A.Rc=Ad([a],[A.Nb.payload]));return A.Rc||[]}}(q),w=new vi(q.Nb.startTime,q.Nb.endTime,x,0,null,null,0,0,Infinity),q.Nb.payload.includes("#xywh")&&(z=q.Nb.payload.split("#xywh=")[1].split(","),4===z.length&&w.Fg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
629
+ n.push(w);v={id:c.tf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ve,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Md(b||
630
+ "","")])};c.l==Eo?c.$c.push(v):c.i.imageStreams.push(v);ho(c);return B.return(Ze(v))}})};
631
+ r.Rg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=ro&&d.l!=Eo)throw new Q(1,7,7004);if(c){k.u(2);break}return C(k,So(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,To(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.cg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return C(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new Q(1,2,2015))})}),6);case 6:return ho(d),k.return(h);case 5:throw new Q(1,
632
+ 2,2012);}})};function So(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),C(d,Km(b,a.H,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new Q(1,2,2011,b);}})}
633
+ function To(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,Uo(a,b,a.H,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Vo(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Cj(l),e="text/vtt");m=document.createElement("track");var q=a.T,p=b;try{if(q.g.enabled){var u=gn(q);u.ot=un;u.su=!0;var x=ln(u);var w=mn(p,x)}else w=p}catch(z){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
634
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function Uo(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=ng;f=hg([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&nn(k,f,{ot:un,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
635
+ function Vo(a,b,c,d){var e=ee[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),dn(b,d);throw new Q(2,2,2014,c);}r.yi=function(a,b){this.ba.width=a;this.ba.height=b};r.wf=function(a){if(this.l==ro){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Qa||d.ub||(d.gd=!1,rl(b,d,a));b=!0}}else b=!1;return b};
636
+ r.Ue=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.i};r.sh=function(){return this.Ga};
637
+ function Hn(a){var b=$l();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.wf(d))}};b.textDisplayFactory=function(){if(a.Rd){var c=a.getConfiguration();return new Vm(a.g,a.Rd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Pm(a.g,"Shaka Player TextTrack"):new Sm};return b}r.Ig=function(a){this.Rd=a};
638
+ function fo(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Gk,l=e.closedCaptions.get(g);h={id:a.tf++,originalId:g,groupId:null,
639
639
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Id,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Md(h,"")])};b.textStreams.push(h);c.add(g)}}
640
- function wo(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
641
- function Vn(a){var b=a.Xe();if(a.s&&a.L&&a.C){if(a.T){var c=a.T;b||c.i||(c.i=!0);c.i&&b&&(c.j=!0);c.l=b}lo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(On("buffering",b))}function mo(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=On("ratechange"),a.dispatchEvent(b))}
642
- function lo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Mf?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(On("statechanged",c)))}}
643
- function Ao(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ag();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.H.Wb()&&a.Wc()}if(c&&(e=a.Ib(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
644
- g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Do){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
645
- l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.sd(k):f&&g&&c-d>f?b!=g&&a.sd(g):h&&k&&c-d<h?b!=k&&a.sd(k):b!==a.H.Wb()&&a.Wc()}}
646
- function Bo(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=On("started"):25==a.N?d=On("firstquartile"):50==a.N?d=On("midpoint"):75==a.N?d=On("thirdquartile"):100==a.N&&(d=On("complete"));d&&a.dispatchEvent(d)}}}function ho(a){try{hi(a.Pd,a.i)}catch(c){return Tn(a,c),!1}var b=kf(a.i.variants);b=a.sa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
647
- function so(a,b){b=void 0===b?!1:b;return ho(a)?a.o.chooseVariant(b):null}
648
- function Ln(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,bb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Td.stop();d&&io(a,!0,void 0,!1,!1)}
649
- function io(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=so(a);f&&oo(a,f,e,b,c,d)}function oo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&ul(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));ul(a.j,b,d,e,f,c);d=null;g&&(d=Xe(g));b=Xe(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&sj(a.K,b,a.Ue()),c=On("adaptation",c),Vo(a,c)):Wo(a,d,b)}}
650
- function No(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=hf(c);b=hf(b);Wo(a,c,b)}function xo(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=qe(a.h.preferredTextLanguage);c=qe(c.language);if(2==a.h.autoShowText)return pe(c,d);if(3==a.h.autoShowText)return a=qe(b.language),pe(c,d)&&!pe(a,c);Wa("Invalid autoShowText setting!");return!1}function go(a){var b=On("trackschanged");Vo(a,b)}
651
- function Wo(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&sj(a.K,c,a.Ue());c=On("variantchanged",b);Vo(a,c)}function Mo(a){var b=On("textchanged");Vo(a,b)}function yo(a){var b=On("texttrackvisibility");Vo(a,b)}function zo(a){a.h.abr.enabled||Kn(a);var b=(new Map).set("newStatus",a.h.abr.enabled);Vo(a,On("abrstatuschanged",b))}function Kn(a,b){b=void 0===b?!0:b;if(a.l==qo){a.Td.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&ho(a)}}
652
- r.Jd=function(a,b){if(!this.h.abr.enabled||this.l===Pn||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Td.$a(1);b=this.ob().video.reduce(function(f,g){return f+g.end-g.start},0);io(this,!0,b,!0,!1);return!0}return!1};
653
- function Tn(a,b){var c,d,e;return L(function(f){switch(f.g){case 1:if(a.l==Pn)return f.return();c=!0;if(!(a.Ia&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return C(f,Ol(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Kn(a,!1);e=On("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);G(f)}})}
654
- function fo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(On(b,a))}function Sn(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new Q(2,3,3016,b,c,a.g.error.message)}
655
- function no(a,b,c){0<b&&(a.R()||a.Gg(b));b=a.getDuration();c<b&&(a.R()||a.Za(c))}function Vo(a,b){L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Pn&&a.dispatchEvent(b);G(c)})}function Po(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(qe(c.language)):b.add("und");return b}
656
- function Oo(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=qe(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
657
- h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Hg;X.prototype.getManifestParserFactory=X.prototype.rh;X.prototype.getManifest=X.prototype.Te;X.prototype.retryStreaming=X.prototype.vf;X.prototype.setMaxHardwareResolution=X.prototype.xi;X.prototype.addChaptersTrack=X.prototype.Qg;X.prototype.addThumbnailsTrack=X.prototype.Sg;X.prototype.addTextTrackAsync=X.prototype.Rg;X.prototype.getStats=X.prototype.getStats;
658
- X.prototype.getBufferedInfo=X.prototype.ob;X.prototype.getSegmentAvailabilityDuration=X.prototype.Nd;X.prototype.getPresentationStartTimeAsDate=X.prototype.eg;X.prototype.getPlayheadTimeAsDate=X.prototype.vh;X.prototype.setTextTrackVisibility=X.prototype.Dg;X.prototype.getChapters=X.prototype.jh;X.prototype.getChaptersTracks=X.prototype.bg;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.si;X.prototype.selectTextLanguage=X.prototype.yf;
659
- X.prototype.selectAudioLanguage=X.prototype.wg;X.prototype.getTextLanguages=X.prototype.zh;X.prototype.getAudioLanguages=X.prototype.hh;X.prototype.getTextLanguagesAndRoles=X.prototype.Ah;X.prototype.getAudioLanguagesAndRoles=X.prototype.ih;X.prototype.selectVariantTrack=X.prototype.zf;X.prototype.selectTextTrack=X.prototype.xg;X.prototype.getThumbnails=X.prototype.fg;X.prototype.getAllThumbnails=X.prototype.gh;X.prototype.getImageTracks=X.prototype.oh;X.prototype.getTextTracks=X.prototype.wc;
660
- X.prototype.getVariantTracks=X.prototype.Hb;X.prototype.cancelTrickPlay=X.prototype.Wc;X.prototype.trickPlay=X.prototype.sd;X.prototype.getPlaybackRate=X.prototype.eb;X.prototype.isBuffering=X.prototype.Xe;X.prototype.getKeyStatuses=X.prototype.Kd;X.prototype.getActiveSessionsMetadata=X.prototype.Se;X.prototype.getExpiration=X.prototype.cd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Hh;X.prototype.seekRange=X.prototype.Ib;
661
- X.prototype.isAudioOnly=X.prototype.Kh;X.prototype.isInProgress=X.prototype.cc;X.prototype.isLive=X.prototype.R;X.prototype.getAdManager=X.prototype.$f;X.prototype.getAssetUri=X.prototype.ad;X.prototype.getNetworkingEngine=X.prototype.Yb;X.prototype.getMediaElement=X.prototype.th;X.prototype.getManifestType=X.prototype.Ue;X.prototype.getLoadMode=X.prototype.qh;X.prototype.resetConfiguration=X.prototype.li;X.prototype.getBufferFullness=X.prototype.ag;X.prototype.getConfiguration=X.prototype.getConfiguration;
662
- X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.hi;X.prototype.preload=X.prototype.preload;X.prototype.unloadAndSavePreload=X.prototype.Ai;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ei;X.prototype.unload=X.prototype.kc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Wg;X.prototype.attach=X.prototype.Vc;
640
+ function xo(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
641
+ function Wn(a){var b=a.Ye();if(a.s&&a.L&&a.C){var c=a.G;c.j=b;Ik(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);mo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Pn("buffering",b))}function no(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Pn("ratechange"),a.dispatchEvent(b))}
642
+ function mo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Mf?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Pn("statechanged",c)))}}
643
+ function Bo(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.bg();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.G.Xb()&&a.Wc()}if(c&&(e=a.Ib(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
644
+ g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Eo){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
645
+ l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.sd(k):f&&g&&c-d>f?b!=g&&a.sd(g):h&&k&&c-d<h?b!=k&&a.sd(k):b!==a.G.Xb()&&a.Wc()}}
646
+ function Co(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=Pn("started"):25==a.N?d=Pn("firstquartile"):50==a.N?d=Pn("midpoint"):75==a.N?d=Pn("thirdquartile"):100==a.N&&(d=Pn("complete"));d&&a.dispatchEvent(d)}}}function io(a){try{hi(a.Pd,a.i)}catch(c){return Un(a,c),!1}var b=kf(a.i.variants);b=a.sa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
647
+ function to(a,b){b=void 0===b?!1:b;return io(a)?a.o.chooseVariant(b):null}
648
+ function Mn(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,bb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Ud.stop();d&&jo(a,!0,void 0,!1,!1)}
649
+ function jo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=to(a);f&&po(a,f,e,b,c,d)}function po(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&vl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));vl(a.j,b,d,e,f,c);d=null;g&&(d=Xe(g));b=Xe(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&sj(a.K,b,a.Ve()),c=Pn("adaptation",c),Wo(a,c)):Xo(a,d,b)}}
650
+ function Oo(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=hf(c);b=hf(b);Xo(a,c,b)}function yo(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=qe(a.h.preferredTextLanguage);c=qe(c.language);if(2==a.h.autoShowText)return pe(c,d);if(3==a.h.autoShowText)return a=qe(b.language),pe(c,d)&&!pe(a,c);Wa("Invalid autoShowText setting!");return!1}function ho(a){var b=Pn("trackschanged");Wo(a,b)}
651
+ function Xo(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&sj(a.K,c,a.Ve());c=Pn("variantchanged",b);Wo(a,c)}function No(a){var b=Pn("textchanged");Wo(a,b)}function zo(a){var b=Pn("texttrackvisibility");Wo(a,b)}function Ao(a){a.h.abr.enabled||Ln(a);var b=(new Map).set("newStatus",a.h.abr.enabled);Wo(a,Pn("abrstatuschanged",b))}function Ln(a,b){b=void 0===b?!0:b;if(a.l==ro){a.Ud.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&io(a)}}
652
+ r.Jd=function(a,b){if(!this.h.abr.enabled||this.l===Qn||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Ud.Sa(1);b=this.ob().video.reduce(function(f,g){return f+g.end-g.start},0);jo(this,!0,b,!0,!1);return!0}return!1};
653
+ function Un(a,b){var c,d,e;return L(function(f){switch(f.g){case 1:if(a.l==Qn)return f.return();c=!0;if(!(a.Ia&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return C(f,Pl(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Ln(a,!1);e=Pn("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);G(f)}})}
654
+ function go(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Pn(b,a))}function Tn(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new Q(2,3,3016,b,c,a.g.error.message)}
655
+ function oo(a,b,c){0<b&&(a.R()||a.Hg(b));b=a.getDuration();c<b&&(a.R()||a.$a(c))}function Wo(a,b){L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Qn&&a.dispatchEvent(b);G(c)})}function Qo(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(qe(c.language)):b.add("und");return b}
656
+ function Po(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=qe(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
657
+ h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Ig;X.prototype.getManifestParserFactory=X.prototype.sh;X.prototype.getManifest=X.prototype.Ue;X.prototype.retryStreaming=X.prototype.wf;X.prototype.setMaxHardwareResolution=X.prototype.yi;X.prototype.addChaptersTrack=X.prototype.Rg;X.prototype.addThumbnailsTrack=X.prototype.Tg;X.prototype.addTextTrackAsync=X.prototype.Sg;X.prototype.getStats=X.prototype.getStats;
658
+ X.prototype.getBufferedInfo=X.prototype.ob;X.prototype.getSegmentAvailabilityDuration=X.prototype.Nd;X.prototype.getPresentationStartTimeAsDate=X.prototype.fg;X.prototype.getPlayheadTimeAsDate=X.prototype.wh;X.prototype.setTextTrackVisibility=X.prototype.Eg;X.prototype.getChapters=X.prototype.kh;X.prototype.getChaptersTracks=X.prototype.cg;X.prototype.isTextTrackVisible=X.prototype.$e;X.prototype.selectVariantsByLabel=X.prototype.ti;X.prototype.selectTextLanguage=X.prototype.zf;
659
+ X.prototype.selectAudioLanguage=X.prototype.xg;X.prototype.getTextLanguages=X.prototype.Ah;X.prototype.getAudioLanguages=X.prototype.ih;X.prototype.getTextLanguagesAndRoles=X.prototype.Bh;X.prototype.getAudioLanguagesAndRoles=X.prototype.jh;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.yg;X.prototype.getThumbnails=X.prototype.gg;X.prototype.getAllThumbnails=X.prototype.hh;X.prototype.getImageTracks=X.prototype.ph;X.prototype.getTextTracks=X.prototype.wc;
660
+ X.prototype.getVariantTracks=X.prototype.Hb;X.prototype.cancelTrickPlay=X.prototype.Wc;X.prototype.trickPlay=X.prototype.sd;X.prototype.getPlaybackRate=X.prototype.eb;X.prototype.isBuffering=X.prototype.Ye;X.prototype.getKeyStatuses=X.prototype.Kd;X.prototype.getActiveSessionsMetadata=X.prototype.Te;X.prototype.getExpiration=X.prototype.cd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Ih;X.prototype.seekRange=X.prototype.Ib;
661
+ X.prototype.isAudioOnly=X.prototype.Lh;X.prototype.isInProgress=X.prototype.dc;X.prototype.isLive=X.prototype.R;X.prototype.getAdManager=X.prototype.ag;X.prototype.getAssetUri=X.prototype.ad;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.uh;X.prototype.getManifestType=X.prototype.Ve;X.prototype.getLoadMode=X.prototype.rh;X.prototype.resetConfiguration=X.prototype.mi;X.prototype.getBufferFullness=X.prototype.bg;X.prototype.getConfiguration=X.prototype.getConfiguration;
662
+ X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.ii;X.prototype.preload=X.prototype.preload;X.prototype.unloadAndSavePreload=X.prototype.Bi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Fi;X.prototype.unload=X.prototype.lc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Xg;X.prototype.attach=X.prototype.Vc;
663
663
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?C(h,Xh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in li)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!li[m]:Oc(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(Nd));
664
- k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Nc()?de(m)?!0:lb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Xo;for(g in f)e[g]=f[g]();return h.return(e)})};
665
- X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=cd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Jn=a};
666
- X.registerSupportPlugin=function(a,b){Xo[a]=b};X.prototype.destroy=X.prototype.destroy;var Pn=0,Fn=1,qo=2,Do=3;X.LoadMode={DESTROYED:Pn,NOT_LOADED:Fn,MEDIA_SOURCE:qo,SRC_EQUALS:Do};X.version="v4.8.1";var Yo=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(Yo[0]),Number(Yo[1])));var Xo={},Jn=null;function Zo(){this.h=[];this.j=this.i=this.g=0};function $o(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new eb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=$o.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
664
+ k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Nc()?de(m)?!0:lb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Yo;for(g in f)e[g]=f[g]();return h.return(e)})};
665
+ X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=cd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Kn=a};
666
+ X.registerSupportPlugin=function(a,b){Yo[a]=b};X.prototype.destroy=X.prototype.destroy;var Qn=0,Gn=1,ro=2,Eo=3;X.LoadMode={DESTROYED:Qn,NOT_LOADED:Gn,MEDIA_SOURCE:ro,SRC_EQUALS:Eo};X.version="v4.8.3";var Zo=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(Zo[0]),Number(Zo[1])));var Yo={},Kn=null;function $o(){this.h=[];this.j=this.i=this.g=0};function ap(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new db;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=ap.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
667
667
  r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
668
668
  r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
669
669
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
670
- r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",$o);$o.prototype.release=$o.prototype.release;
671
- $o.prototype.getPodIndex=$o.prototype.getPodIndex;$o.prototype.getTimeOffset=$o.prototype.getTimeOffset;$o.prototype.getMediaUrl=$o.prototype.getMediaUrl;$o.prototype.getAdvertiserName=$o.prototype.getAdvertiserName;$o.prototype.getCreativeAdId=$o.prototype.getCreativeAdId;$o.prototype.getAdId=$o.prototype.getAdId;$o.prototype.getVastMediaWidth=$o.prototype.getVastMediaWidth;$o.prototype.getVastMediaHeight=$o.prototype.getVastMediaHeight;$o.prototype.getVastMediaBitrate=$o.prototype.getVastMediaBitrate;
672
- $o.prototype.getDescription=$o.prototype.getDescription;$o.prototype.getTitle=$o.prototype.getTitle;$o.prototype.getPositionInSequence=$o.prototype.getPositionInSequence;$o.prototype.getSequenceLength=$o.prototype.getSequenceLength;$o.prototype.setMuted=$o.prototype.setMuted;$o.prototype.resize=$o.prototype.resize;$o.prototype.isLinear=$o.prototype.isLinear;$o.prototype.isMuted=$o.prototype.isMuted;$o.prototype.setVolume=$o.prototype.setVolume;$o.prototype.getVolume=$o.prototype.getVolume;
673
- $o.prototype.play=$o.prototype.play;$o.prototype.pause=$o.prototype.pause;$o.prototype.skip=$o.prototype.skip;$o.prototype.canSkipNow=$o.prototype.canSkipNow;$o.prototype.getTimeUntilSkippable=$o.prototype.getTimeUntilSkippable;$o.prototype.isSkippable=$o.prototype.isSkippable;$o.prototype.isPaused=$o.prototype.isPaused;$o.prototype.getRemainingTime=$o.prototype.getRemainingTime;$o.prototype.getMinSuggestedDuration=$o.prototype.getMinSuggestedDuration;$o.prototype.getDuration=$o.prototype.getDuration;function ap(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.C=!1;this.A=this.s=null;this.F=NaN;this.m=e;this.j=null;this.h=new eb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.1");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
674
- function(g){bp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){cp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.C=!0})}ap.prototype.configure=function(a){this.s=a};ap.prototype.stop=function(){this.g&&this.g.stop();this.o&&Tm(this.o)};ap.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
675
- function cp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));dp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
676
- function bp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
677
- a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}ep(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,fp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,fp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
678
- a.i.offsetHeight,fp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,fp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.C||a.s.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.C=!0;a.g.start()})}catch(f){dp(a,null)}}
679
- function fp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
680
- function ep(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new S(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){cp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){gp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){gp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
681
- function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){dp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){dp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
670
+ r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",ap);ap.prototype.release=ap.prototype.release;
671
+ ap.prototype.getPodIndex=ap.prototype.getPodIndex;ap.prototype.getTimeOffset=ap.prototype.getTimeOffset;ap.prototype.getMediaUrl=ap.prototype.getMediaUrl;ap.prototype.getAdvertiserName=ap.prototype.getAdvertiserName;ap.prototype.getCreativeAdId=ap.prototype.getCreativeAdId;ap.prototype.getAdId=ap.prototype.getAdId;ap.prototype.getVastMediaWidth=ap.prototype.getVastMediaWidth;ap.prototype.getVastMediaHeight=ap.prototype.getVastMediaHeight;ap.prototype.getVastMediaBitrate=ap.prototype.getVastMediaBitrate;
672
+ ap.prototype.getDescription=ap.prototype.getDescription;ap.prototype.getTitle=ap.prototype.getTitle;ap.prototype.getPositionInSequence=ap.prototype.getPositionInSequence;ap.prototype.getSequenceLength=ap.prototype.getSequenceLength;ap.prototype.setMuted=ap.prototype.setMuted;ap.prototype.resize=ap.prototype.resize;ap.prototype.isLinear=ap.prototype.isLinear;ap.prototype.isMuted=ap.prototype.isMuted;ap.prototype.setVolume=ap.prototype.setVolume;ap.prototype.getVolume=ap.prototype.getVolume;
673
+ ap.prototype.play=ap.prototype.play;ap.prototype.pause=ap.prototype.pause;ap.prototype.skip=ap.prototype.skip;ap.prototype.canSkipNow=ap.prototype.canSkipNow;ap.prototype.getTimeUntilSkippable=ap.prototype.getTimeUntilSkippable;ap.prototype.isSkippable=ap.prototype.isSkippable;ap.prototype.isPaused=ap.prototype.isPaused;ap.prototype.getRemainingTime=ap.prototype.getRemainingTime;ap.prototype.getMinSuggestedDuration=ap.prototype.getMinSuggestedDuration;ap.prototype.getDuration=ap.prototype.getDuration;function bp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.C=!1;this.A=this.s=null;this.F=NaN;this.m=e;this.j=null;this.h=new db;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.3");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
674
+ function(g){cp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){dp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.C=!0})}bp.prototype.configure=function(a){this.s=a};bp.prototype.stop=function(){this.g&&this.g.stop();this.o&&Um(this.o)};bp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
675
+ function dp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));ep(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
676
+ function cp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
677
+ a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}fp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
678
+ a.i.offsetHeight,gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.C||a.s.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.C=!0;a.g.start()})}catch(f){ep(a,null)}}
679
+ function gp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
680
+ function fp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new S(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){dp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
681
+ function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){ep(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){ep(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
682
682
  a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
683
683
  a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
684
684
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
685
- function gp(a,b){var c=b.getAd();c?(a.j=new $o(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new S("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Wa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
686
- function dp(a,b){a.m(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function hp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=hp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
685
+ function hp(a,b){var c=b.getAd();c?(a.j=new ap(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new S("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Wa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
686
+ function ep(a,b){a.m(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function ip(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=ip.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
687
687
  r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};
688
688
  r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.j?this.j:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};
689
- r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",hp);hp.prototype.release=hp.prototype.release;hp.prototype.getPodIndex=hp.prototype.getPodIndex;hp.prototype.getTimeOffset=hp.prototype.getTimeOffset;hp.prototype.getMediaUrl=hp.prototype.getMediaUrl;hp.prototype.getAdvertiserName=hp.prototype.getAdvertiserName;
690
- hp.prototype.getCreativeAdId=hp.prototype.getCreativeAdId;hp.prototype.getAdId=hp.prototype.getAdId;hp.prototype.getVastMediaWidth=hp.prototype.getVastMediaWidth;hp.prototype.getVastMediaHeight=hp.prototype.getVastMediaHeight;hp.prototype.getVastMediaBitrate=hp.prototype.getVastMediaBitrate;hp.prototype.getDescription=hp.prototype.getDescription;hp.prototype.getTitle=hp.prototype.getTitle;hp.prototype.getPositionInSequence=hp.prototype.getPositionInSequence;hp.prototype.getSequenceLength=hp.prototype.getSequenceLength;
691
- hp.prototype.setMuted=hp.prototype.setMuted;hp.prototype.resize=hp.prototype.resize;hp.prototype.isLinear=hp.prototype.isLinear;hp.prototype.isMuted=hp.prototype.isMuted;hp.prototype.setVolume=hp.prototype.setVolume;hp.prototype.getVolume=hp.prototype.getVolume;hp.prototype.play=hp.prototype.play;hp.prototype.pause=hp.prototype.pause;hp.prototype.skip=hp.prototype.skip;hp.prototype.canSkipNow=hp.prototype.canSkipNow;hp.prototype.getTimeUntilSkippable=hp.prototype.getTimeUntilSkippable;
692
- hp.prototype.isSkippable=hp.prototype.isSkippable;hp.prototype.isPaused=hp.prototype.isPaused;hp.prototype.getRemainingTime=hp.prototype.getRemainingTime;hp.prototype.getMinSuggestedDuration=hp.prototype.getMinSuggestedDuration;hp.prototype.getDuration=hp.prototype.getDuration;function ip(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.X=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new eb}ip.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Kb(b.target,b.type,b.listener);jp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
693
- ip.prototype.release=function(){this.stop();this.o&&this.o.release()};ip.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(kp(this,this.G,this.T),this.T=!1)};ip.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
694
- function lp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(u){if(1==u.g)return d=hg([b],Pf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=nd(e)),f=a.K.request(7,d),ra(u,2),C(u,f.promise,4);if(2!=u.g){g=u.h;h=hd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.X,a.i(new S("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
689
+ r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",ip);ip.prototype.release=ip.prototype.release;ip.prototype.getPodIndex=ip.prototype.getPodIndex;ip.prototype.getTimeOffset=ip.prototype.getTimeOffset;ip.prototype.getMediaUrl=ip.prototype.getMediaUrl;ip.prototype.getAdvertiserName=ip.prototype.getAdvertiserName;
690
+ ip.prototype.getCreativeAdId=ip.prototype.getCreativeAdId;ip.prototype.getAdId=ip.prototype.getAdId;ip.prototype.getVastMediaWidth=ip.prototype.getVastMediaWidth;ip.prototype.getVastMediaHeight=ip.prototype.getVastMediaHeight;ip.prototype.getVastMediaBitrate=ip.prototype.getVastMediaBitrate;ip.prototype.getDescription=ip.prototype.getDescription;ip.prototype.getTitle=ip.prototype.getTitle;ip.prototype.getPositionInSequence=ip.prototype.getPositionInSequence;ip.prototype.getSequenceLength=ip.prototype.getSequenceLength;
691
+ ip.prototype.setMuted=ip.prototype.setMuted;ip.prototype.resize=ip.prototype.resize;ip.prototype.isLinear=ip.prototype.isLinear;ip.prototype.isMuted=ip.prototype.isMuted;ip.prototype.setVolume=ip.prototype.setVolume;ip.prototype.getVolume=ip.prototype.getVolume;ip.prototype.play=ip.prototype.play;ip.prototype.pause=ip.prototype.pause;ip.prototype.skip=ip.prototype.skip;ip.prototype.canSkipNow=ip.prototype.canSkipNow;ip.prototype.getTimeUntilSkippable=ip.prototype.getTimeUntilSkippable;
692
+ ip.prototype.isSkippable=ip.prototype.isSkippable;ip.prototype.isPaused=ip.prototype.isPaused;ip.prototype.getRemainingTime=ip.prototype.getRemainingTime;ip.prototype.getMinSuggestedDuration=ip.prototype.getMinSuggestedDuration;ip.prototype.getDuration=ip.prototype.getDuration;function jp(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new db}jp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Kb(b.target,b.type,b.listener);kp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
693
+ jp.prototype.release=function(){this.stop();this.o&&this.o.release()};jp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(lp(this,this.G,this.T),this.T=!1)};jp.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
694
+ function mp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(u){if(1==u.g)return d=hg([b],Pf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=nd(e)),f=a.K.request(7,d),ra(u,2),C(u,f.promise,4);if(2!=u.g){g=u.h;h=hd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.Y,a.i(new S("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
695
695
  return ta(u,0)}va(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;G(u)})}
696
- function kp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z;L(function(v){if(1==v.g)return d=hg([b],Pf()),e=a.K.request(7,d),ra(v,2),C(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=hd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,x=t(u.nonLinearAdList),w=x.next();!w.done;w=x.next())z=w.value,mp(a,z);g=a.getCuePoints();a.i(new S("ad-cue-points-changed",
697
- (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",g))),jp(a),a.j=[];c&&(a.I||0<g.length)&&np(a);return ta(v,0)}va(v);G(v)})}
698
- function mp(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=op(b);if(d=a.F.get(c))return m.return();e=hg([b.staticResource],Pf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return C(m,f.promise,4)}if(2!=m.g)return g=m.h,h=hd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);va(m);a.F.delete(c);G(m)})}
699
- function op(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function np(a){pp(a);a.I||(qp(a),a.o.D(a.g,"seeked",function(){qp(a)}),a.o.D(a.g,"ended",function(){jp(a)}));a.o.D(a.g,"timeupdate",function(){pp(a)})}
700
- function qp(a){var b=a.g.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.g.currentTime=c.startTimeInSeconds)}}
701
- function pp(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),rp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),rp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),rp(a,"thirdQuartile"));d=a.h.getRemainingTime();
702
- e=a.h.getDuration();0<e&&(0>=d||d>e)&&jp(a)}if(!a.h||!a.h.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}jp(a);a.L=e;a.h=new hp(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&rp(a,"breakStart");sp(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
703
- if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(op(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){jp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
704
- 0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.h=new hp(g,f+1,e.ads.length,!1,a.g);a.C=g;0===f&&rp(a,"breakStart");sp(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.A&&a.A>b&&(a.g.currentTime=a.A),a.A=null)}}}
705
- function jp(a){if(a.h){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);rp(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&rp(a,"breakEnd");a.h=null;a.C=null;a.L=null}}
706
- function sp(a){var b=!1;a.g.paused?b=!0:(rp(a,"impression"),rp(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&rp(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||rp(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(rp(a,"impression"),rp(a,"start"),b=!1):rp(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){rp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
696
+ function lp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z;L(function(v){if(1==v.g)return d=hg([b],Pf()),e=a.K.request(7,d),ra(v,2),C(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=hd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,x=t(u.nonLinearAdList),w=x.next();!w.done;w=x.next())z=w.value,np(a,z);g=a.getCuePoints();a.i(new S("ad-cue-points-changed",
697
+ (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",g))),kp(a),a.j=[];c&&(a.I||0<g.length)&&op(a);return ta(v,0)}va(v);G(v)})}
698
+ function np(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=pp(b);if(d=a.F.get(c))return m.return();e=hg([b.staticResource],Pf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return C(m,f.promise,4)}if(2!=m.g)return g=m.h,h=hd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);va(m);a.F.delete(c);G(m)})}
699
+ function pp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function op(a){qp(a);a.I||(rp(a),a.o.D(a.g,"seeked",function(){rp(a)}),a.o.D(a.g,"ended",function(){kp(a)}));a.o.D(a.g,"timeupdate",function(){qp(a)})}
700
+ function rp(a){var b=a.g.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.g.currentTime=c.startTimeInSeconds)}}
701
+ function qp(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),sp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),sp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),sp(a,"thirdQuartile"));d=a.h.getRemainingTime();
702
+ e=a.h.getDuration();0<e&&(0>=d||d>e)&&kp(a)}if(!a.h||!a.h.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}kp(a);a.L=e;a.h=new ip(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&sp(a,"breakStart");tp(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
703
+ if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(pp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){kp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
704
+ 0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.h=new ip(g,f+1,e.ads.length,!1,a.g);a.C=g;0===f&&sp(a,"breakStart");tp(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.A&&a.A>b&&(a.g.currentTime=a.A),a.A=null)}}}
705
+ function kp(a){if(a.h){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);sp(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&sp(a,"breakEnd");a.h=null;a.C=null;a.L=null}}
706
+ function tp(a){var b=!1;a.g.paused?b=!0:(sp(a,"impression"),sp(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&sp(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||sp(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(sp(a,"impression"),sp(a,"start"),b=!1):sp(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){sp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
707
707
  d.type,d.listener)}
708
- function rp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=hg([d],Pf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new S("ad-impression"));break;case "start":a.i(new S("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new S("ad-muted"));break;case "unmute":a.i(new S("ad-volume-changed"));break;
709
- case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused"));break;case "firstQuartile":a.i(new S("ad-first-quartile"));break;case "midpoint":a.i(new S("ad-midpoint"));break;case "thirdQuartile":a.i(new S("ad-third-quartile"));break;case "complete":a.i(new S("ad-complete"));a.i(new S("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active")}};function tp(a,b){this.g=a;this.i=null;this.h=b}r=tp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
708
+ function sp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=hg([d],Pf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new S("ad-impression"));break;case "start":a.i(new S("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new S("ad-muted"));break;case "unmute":a.i(new S("ad-volume-changed"));break;
709
+ case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused"));break;case "firstQuartile":a.i(new S("ad-first-quartile"));break;case "midpoint":a.i(new S("ad-midpoint"));break;case "thirdQuartile":a.i(new S("ad-third-quartile"));break;case "complete":a.i(new S("ad-complete"));a.i(new S("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active")}};function up(a,b){this.g=a;this.i=null;this.h=b}r=up.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
710
710
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
711
711
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
712
- r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",tp);tp.prototype.release=tp.prototype.release;tp.prototype.getPodIndex=tp.prototype.getPodIndex;
713
- tp.prototype.getTimeOffset=tp.prototype.getTimeOffset;tp.prototype.getMediaUrl=tp.prototype.getMediaUrl;tp.prototype.getAdvertiserName=tp.prototype.getAdvertiserName;tp.prototype.getCreativeAdId=tp.prototype.getCreativeAdId;tp.prototype.getAdId=tp.prototype.getAdId;tp.prototype.getVastMediaWidth=tp.prototype.getVastMediaWidth;tp.prototype.getVastMediaHeight=tp.prototype.getVastMediaHeight;tp.prototype.getVastMediaBitrate=tp.prototype.getVastMediaBitrate;tp.prototype.getDescription=tp.prototype.getDescription;
714
- tp.prototype.getTitle=tp.prototype.getTitle;tp.prototype.getPositionInSequence=tp.prototype.getPositionInSequence;tp.prototype.getSequenceLength=tp.prototype.getSequenceLength;tp.prototype.setMuted=tp.prototype.setMuted;tp.prototype.resize=tp.prototype.resize;tp.prototype.isLinear=tp.prototype.isLinear;tp.prototype.isMuted=tp.prototype.isMuted;tp.prototype.setVolume=tp.prototype.setVolume;tp.prototype.getVolume=tp.prototype.getVolume;tp.prototype.play=tp.prototype.play;tp.prototype.pause=tp.prototype.pause;
715
- tp.prototype.skip=tp.prototype.skip;tp.prototype.canSkipNow=tp.prototype.canSkipNow;tp.prototype.getTimeUntilSkippable=tp.prototype.getTimeUntilSkippable;tp.prototype.isSkippable=tp.prototype.isSkippable;tp.prototype.isPaused=tp.prototype.isPaused;tp.prototype.getRemainingTime=tp.prototype.getRemainingTime;tp.prototype.getMinSuggestedDuration=tp.prototype.getMinSuggestedDuration;tp.prototype.getDuration=tp.prototype.getDuration;function up(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new eb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
716
- e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new tp(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
712
+ r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",up);up.prototype.release=up.prototype.release;up.prototype.getPodIndex=up.prototype.getPodIndex;
713
+ up.prototype.getTimeOffset=up.prototype.getTimeOffset;up.prototype.getMediaUrl=up.prototype.getMediaUrl;up.prototype.getAdvertiserName=up.prototype.getAdvertiserName;up.prototype.getCreativeAdId=up.prototype.getCreativeAdId;up.prototype.getAdId=up.prototype.getAdId;up.prototype.getVastMediaWidth=up.prototype.getVastMediaWidth;up.prototype.getVastMediaHeight=up.prototype.getVastMediaHeight;up.prototype.getVastMediaBitrate=up.prototype.getVastMediaBitrate;up.prototype.getDescription=up.prototype.getDescription;
714
+ up.prototype.getTitle=up.prototype.getTitle;up.prototype.getPositionInSequence=up.prototype.getPositionInSequence;up.prototype.getSequenceLength=up.prototype.getSequenceLength;up.prototype.setMuted=up.prototype.setMuted;up.prototype.resize=up.prototype.resize;up.prototype.isLinear=up.prototype.isLinear;up.prototype.isMuted=up.prototype.isMuted;up.prototype.setVolume=up.prototype.setVolume;up.prototype.getVolume=up.prototype.getVolume;up.prototype.play=up.prototype.play;up.prototype.pause=up.prototype.pause;
715
+ up.prototype.skip=up.prototype.skip;up.prototype.canSkipNow=up.prototype.canSkipNow;up.prototype.getTimeUntilSkippable=up.prototype.getTimeUntilSkippable;up.prototype.isSkippable=up.prototype.isSkippable;up.prototype.isPaused=up.prototype.isPaused;up.prototype.getRemainingTime=up.prototype.getRemainingTime;up.prototype.getMinSuggestedDuration=up.prototype.getMinSuggestedDuration;up.prototype.getDuration=up.prototype.getDuration;function vp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new db;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){wp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
716
+ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new up(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
717
717
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
718
718
  this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
719
- f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=up.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
720
- function vp(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){ag.call(this);this.g=this.h=this.i=null;this.j=new Zo;this.m=navigator.language;this.l=null}na(Y,ag);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new Q(2,10,1E4);this.i&&this.i.release();this.i=new ap(a,b,this.m,c,function(e){return wp(d,e)});this.i.configure(this.l)};
721
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ag.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new Zo};r.requestClientSideAds=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
722
- r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new ip(a,b,c,function(e){return wp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new Q(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new Q(1,10,10004)):(d.l=new Rf,lp(d,a,b),d.H=c||"",d.X=Date.now()/1E3,a=d.l);return a};
723
- r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new Q(1,10,10005);var b=this.h;b.G=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new Q(2,10,10002);this.g&&this.g.release();this.g=new up(a,b,this.m,function(d){return wp(c,d)});this.g.configure(this.l)};
724
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new Q(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.1";c=this.g;c.j?a=Promise.reject(new Q(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
725
- (c.G=!0),c.j=new Rf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new Q(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.1";this.g.g.replaceAdTagParameters(a)};
719
+ f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=vp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
720
+ function wp(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){ag.call(this);this.g=this.h=this.i=null;this.j=new $o;this.m=navigator.language;this.l=null}na(Y,ag);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new Q(2,10,1E4);this.i&&this.i.release();this.i=new bp(a,b,this.m,c,function(e){return xp(d,e)});this.i.configure(this.l)};
721
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ag.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new $o};r.requestClientSideAds=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
722
+ r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new jp(a,b,c,function(e){return xp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new Q(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new Q(1,10,10004)):(d.l=new Rf,mp(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
723
+ r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new Q(1,10,10005);var b=this.h;b.G=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new Q(2,10,10002);this.g&&this.g.release();this.g=new vp(a,b,this.m,function(d){return xp(c,d)});this.g.configure(this.l)};
724
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new Q(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.3";c=this.g;c.j?a=Promise.reject(new Q(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
725
+ (c.G=!0),c.j=new Rf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new Q(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.3";this.g.g.replaceAdTagParameters(a)};
726
726
  r.getServerSideCuePoints=function(){pb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
727
727
  r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
728
- function wp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
728
+ function xp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
729
729
  Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
730
730
  Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
731
731
  Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";
732
- Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Jn=function(){return new Y};function xp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
732
+ Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Kn=function(){return new Y};function yp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
733
733
  TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Ci(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
734
- function yp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=zp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
735
- function zp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
736
- var Ap="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Bp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Cp=["loop","playbackRate"],Dp=["pause","play"],Ep={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
737
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Fp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Gp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Hp=[["getConfiguration","configure"]],Ip=[["isTextTrackVisible","setTextTrackVisibility"]],Jp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
738
- Kp=["attach","attachCanvas","detach","load","unload"];function Lp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Mp(h)};this.C=function(k,l){k=yp(l);switch(k.type){case "event":var m=k.targetName,n=Zf(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new Q(q.severity,q.category,
739
- q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Np.add(this)}r=Lp.prototype;r.destroy=function(){Np.delete(this);Op(this);Pp&&Qp(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.Ua=function(){return this.h};r.tf=function(){return this.I};
740
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.jc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Np),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Rf;d.s=!0;Rp(d,e)}},function(b){for(var c=t(Np),d=c.next();!d.done;d=c.next())d=d.value,Sp="available"==b,d.l.jc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Sp&&this.l.W(Tp);(a=Pp)&&
741
- a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Rf,this.s=!0,Rp(this,a)):Pp=null}else window.__onGCastApiAvailable!==Up&&(Vp=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Up)};r.Af=function(a){this.o=a;this.h&&Wp(this,{type:"appData",appData:this.o})};
742
- r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new Q(1,8,8E3);if(!Sp)throw new Q(1,8,8001);if(a.h)throw new Q(1,8,8002);a.j=new Rf;chrome.cast.requestSession(function(c){return Rp(a,c)},function(c){return Xp(a,c)});return C(b,a.j,0)})};function Yp(a){a.h&&chrome.cast.requestSession(function(b){return Rp(a,b)},function(b){return Xp(a,b)})}r.uc=function(){if(this.h){Op(this);if(Pp){Qp(this);try{Pp.stop(function(){},function(){})}catch(a){}Pp=null}Mp(this)}};
743
- r.get=function(a,b){var c=this;if("video"==a){if(Dp.includes(b))return function(){return c.ug.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))}}else if("player"==a){if(Gp[b]&&!this.get("player","isLive")())return function(){};if(Jp.includes(b))return function(){return c.ug.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Kp.includes(b))return function(){return c.ii.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Ep[b]||Fp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
744
- r.set=function(a,b,c){this.g[a][b]=c;Wp(this,{type:"set",targetName:a,property:b,value:c})};function Rp(a,b){var c=a.N();Pp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Mp(a);Wp(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Xp(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new Q(2,8,c,b))}
745
- r.ug=function(a,b){Wp(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.ii=function(a,b){var c=Ha.apply(2,arguments),d=new Rf,e=this.H.toString();this.H++;this.i[e]=d;try{Wp(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Qp(a){var b=Pp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
746
- function Mp(a){var b=Pp?"connected"==Pp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Op(a)}a.h=b;a.I=b?Pp.receiver.friendlyName:"";a.l.jc()}function Op(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new Q(1,7,7E3))}}function Wp(a,b){b=xp(b);var c=Pp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)}catch(d){throw b=new Q(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var Tp=.02,Sp=!1,Pp=null,Vp=null,Np=new Set;
747
- function Up(a){Vp?window.__onGCastApiAvailable=Vp:delete window.__onGCastApiAvailable;Vp=null;if(a)for(var b=t(Np),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Zp(a,b,c,d){d=void 0===d?!1:d;ag.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Lp(c,function(){return $p(e)},function(){return aq(e)},function(f,g){return bq(e,f,g)},function(){return cq(e)},function(){return dq(e)},d);eq(this)}na(Zp,ag);r=Zp.prototype;
748
- r.destroy=function(a){a&&this.g.uc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;ag.prototype.release.call(this);return Promise.all(a)};r.Fh=function(){return this.l};r.uh=function(){return this.s};r.Xg=function(){return this.g.m&&Sp};r.Ua=function(){return this.g.Ua()};r.tf=function(){return this.g.tf()};
749
- r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.kc(),0):b.return()})};r.Af=function(a){this.g.Af(a)};r.zi=function(){Yp(this.g)};r.uc=function(){this.g.uc()};
750
- r.Yg=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Lp(a,function(){return $p(c)},function(){return aq(c)},function(e,f){return bq(c,e,f)},function(){return cq(c)},function(){return dq(c)},b);c.g.init();G(d)})};
751
- function eq(a){a.g.init();a.m=new eb;for(var b=t(Ap),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ua()||(f=Zf(f),a.j.dispatchEvent(f))});for(var d in $f)a.m.D(a.h,$f[d],function(f){a.g.Ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Kc=e,Object.defineProperty(a.l,b.Kc,{configurable:!1,enumerable:!0,get:function(f){return function(){return fq(a,f.Kc)}}(b),set:function(f){return function(g){var h=f.Kc;a.g.Ua()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Kc:b.Kc};a.s={};gq(a,
752
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return hq(a,f)}})});iq(a);a.j=new ag;a.j.Ud=a.l;a.o=new ag;a.o.Ud=a.s}function iq(a){var b=new Map;gq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
753
- function gq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
754
- function dq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ad(),startTime:null};a.i.pause();for(var c=t(Cp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Hp);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Ip);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function $p(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
755
- function aq(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
756
- function cq(a){for(var b=t(Hp),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Cp);for(d=c.next();!d.done;d=c.next())d=
757
- d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Cp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Ip);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Dg(h);g&&a.h.yf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new S("error",l);a.h.dispatchEvent(l)})}
758
- function fq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ua()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
759
- function hq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Yb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.$f()};
760
- if("setVideoContainer"==b)return function(c){return a.h.Hg(c)};if(a.g.Ua()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ua()&&0==Object.keys(a.g.g.video).length&&(Ep[b]||Fp[b])||!a.g.Ua()?a.h[b].bind(a.h):a.g.get("player",b)}
761
- function bq(a,b,c){a.g.Ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",Zp);Zp.prototype.changeReceiverId=Zp.prototype.Yg;Zp.prototype.forceDisconnect=Zp.prototype.uc;Zp.prototype.suggestDisconnect=Zp.prototype.zi;Zp.prototype.setAppData=Zp.prototype.Af;Zp.prototype.cast=Zp.prototype.cast;Zp.prototype.receiverName=Zp.prototype.tf;Zp.prototype.isCasting=Zp.prototype.Ua;Zp.prototype.canCast=Zp.prototype.Xg;Zp.prototype.getPlayer=Zp.prototype.uh;
762
- Zp.prototype.getVideo=Zp.prototype.Fh;Zp.prototype.destroy=Zp.prototype.destroy;function jq(a,b,c,d){ag.call(this);var e=this;this.g=a;this.h=b;this.j=new eb;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Mc(function(){kq(e)});lq(this)}na(jq,ag);r=jq.prototype;r.isConnected=function(){return this.F};r.Lh=function(){return this.o};r.vi=function(a){this.i=a};r.bh=function(){this.i=null};
763
- r.wi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.ui=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.ti=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
734
+ function zp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Ap(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
735
+ function Ap(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
736
+ var Bp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Cp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Dp=["loop","playbackRate"],Ep=["pause","play"],Fp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
737
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Gp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Hp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Ip=[["getConfiguration","configure"]],Jp=[["isTextTrackVisible","setTextTrackVisibility"]],Kp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
738
+ Lp=["attach","attachCanvas","detach","load","unload"];function Mp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Np(h)};this.C=function(k,l){k=zp(l);switch(k.type){case "event":var m=k.targetName,n=Zf(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new Q(q.severity,q.category,
739
+ q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Op.add(this)}r=Mp.prototype;r.destroy=function(){Op.delete(this);Pp(this);Qp&&Rp(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.Va=function(){return this.h};r.uf=function(){return this.I};
740
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.kc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Op),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Rf;d.s=!0;Sp(d,e)}},function(b){for(var c=t(Op),d=c.next();!d.done;d=c.next())d=d.value,Tp="available"==b,d.l.kc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Tp&&this.l.X(Up);(a=Qp)&&
741
+ a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Rf,this.s=!0,Sp(this,a)):Qp=null}else window.__onGCastApiAvailable!==Vp&&(Wp=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Vp)};r.Bf=function(a){this.o=a;this.h&&Xp(this,{type:"appData",appData:this.o})};
742
+ r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new Q(1,8,8E3);if(!Tp)throw new Q(1,8,8001);if(a.h)throw new Q(1,8,8002);a.j=new Rf;chrome.cast.requestSession(function(c){return Sp(a,c)},function(c){return Yp(a,c)});return C(b,a.j,0)})};function Zp(a){a.h&&chrome.cast.requestSession(function(b){return Sp(a,b)},function(b){return Yp(a,b)})}r.uc=function(){if(this.h){Pp(this);if(Qp){Rp(this);try{Qp.stop(function(){},function(){})}catch(a){}Qp=null}Np(this)}};
743
+ r.get=function(a,b){var c=this;if("video"==a){if(Ep.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))}}else if("player"==a){if(Hp[b]&&!this.get("player","isLive")())return function(){};if(Kp.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Lp.includes(b))return function(){return c.ji.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Fp[b]||Gp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
744
+ r.set=function(a,b,c){this.g[a][b]=c;Xp(this,{type:"set",targetName:a,property:b,value:c})};function Sp(a,b){var c=a.N();Qp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Np(a);Xp(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Yp(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new Q(2,8,c,b))}
745
+ r.vg=function(a,b){Xp(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.ji=function(a,b){var c=Ha.apply(2,arguments),d=new Rf,e=this.H.toString();this.H++;this.i[e]=d;try{Xp(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Rp(a){var b=Qp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
746
+ function Np(a){var b=Qp?"connected"==Qp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Pp(a)}a.h=b;a.I=b?Qp.receiver.friendlyName:"";a.l.kc()}function Pp(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new Q(1,7,7E3))}}function Xp(a,b){b=yp(b);var c=Qp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)}catch(d){throw b=new Q(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var Up=.02,Tp=!1,Qp=null,Wp=null,Op=new Set;
747
+ function Vp(a){Wp?window.__onGCastApiAvailable=Wp:delete window.__onGCastApiAvailable;Wp=null;if(a)for(var b=t(Op),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function $p(a,b,c,d){d=void 0===d?!1:d;ag.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Mp(c,function(){return aq(e)},function(){return bq(e)},function(f,g){return cq(e,f,g)},function(){return dq(e)},function(){return eq(e)},d);fq(this)}na($p,ag);r=$p.prototype;
748
+ r.destroy=function(a){a&&this.g.uc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;ag.prototype.release.call(this);return Promise.all(a)};r.Gh=function(){return this.l};r.vh=function(){return this.s};r.Yg=function(){return this.g.m&&Tp};r.Va=function(){return this.g.Va()};r.uf=function(){return this.g.uf()};
749
+ r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.lc(),0):b.return()})};r.Bf=function(a){this.g.Bf(a)};r.Ai=function(){Zp(this.g)};r.uc=function(){this.g.uc()};
750
+ r.Zg=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Mp(a,function(){return aq(c)},function(){return bq(c)},function(e,f){return cq(c,e,f)},function(){return dq(c)},function(){return eq(c)},b);c.g.init();G(d)})};
751
+ function fq(a){a.g.init();a.m=new db;for(var b=t(Bp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Va()||(f=Zf(f),a.j.dispatchEvent(f))});for(var d in $f)a.m.D(a.h,$f[d],function(f){a.g.Va()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Kc=e,Object.defineProperty(a.l,b.Kc,{configurable:!1,enumerable:!0,get:function(f){return function(){return gq(a,f.Kc)}}(b),set:function(f){return function(g){var h=f.Kc;a.g.Va()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Kc:b.Kc};a.s={};hq(a,
752
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return iq(a,f)}})});jq(a);a.j=new ag;a.j.Vd=a.l;a.o=new ag;a.o.Vd=a.s}function jq(a){var b=new Map;hq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
753
+ function hq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
754
+ function eq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ad(),startTime:null};a.i.pause();for(var c=t(Dp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Ip);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Jp);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function aq(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
755
+ function bq(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
756
+ function dq(a){for(var b=t(Ip),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Dp);for(d=c.next();!d.done;d=c.next())d=
757
+ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Dp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Jp);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Eg(h);g&&a.h.zf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new S("error",l);a.h.dispatchEvent(l)})}
758
+ function gq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Va()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Va()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
759
+ function iq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.ag()};
760
+ if("setVideoContainer"==b)return function(c){return a.h.Ig(c)};if(a.g.Va()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Va()&&0==Object.keys(a.g.g.video).length&&(Fp[b]||Gp[b])||!a.g.Va()?a.h[b].bind(a.h):a.g.get("player",b)}
761
+ function cq(a,b,c){a.g.Va()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",$p);$p.prototype.changeReceiverId=$p.prototype.Zg;$p.prototype.forceDisconnect=$p.prototype.uc;$p.prototype.suggestDisconnect=$p.prototype.Ai;$p.prototype.setAppData=$p.prototype.Bf;$p.prototype.cast=$p.prototype.cast;$p.prototype.receiverName=$p.prototype.uf;$p.prototype.isCasting=$p.prototype.Va;$p.prototype.canCast=$p.prototype.Yg;$p.prototype.getPlayer=$p.prototype.vh;
762
+ $p.prototype.getVideo=$p.prototype.Gh;$p.prototype.destroy=$p.prototype.destroy;function kq(a,b,c,d){ag.call(this);var e=this;this.g=a;this.h=b;this.j=new db;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Mc(function(){lq(e)});mq(this)}na(kq,ag);r=kq.prototype;r.isConnected=function(){return this.F};r.Mh=function(){return this.o};r.wi=function(a){this.i=a};r.dh=function(){this.i=null};
763
+ r.xi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.vi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.ui=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
764
764
  r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,ag.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
765
- function lq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mq(a)};b.onSenderDisconnected=function(){return mq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&nq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);nq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return oq(a,
766
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return pq(a,e)};b.start();b=t(Ap);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return qq(a,"video",e)});for(var d in $f)a.j.D(a.h,$f[d],function(e){return qq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;rq(a)});a.j.D(a.g,"playing",function(){a.o=!1;rq(a)});a.j.D(a.g,"pause",function(){rq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;rq(a)});
767
- a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,rq(a))})).W(sq)})}function mq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;rq(a)}function rq(a){var b;L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);tq(a)||uq(a);G(c)})}
768
- function vq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
769
- a.g.autoplay=f;b.manifest&&(a.g.play(),uq(a));G(p)}})}function qq(a,b,c){a.h&&(kq(a),nq(a,{type:"event",targetName:b,event:c},a.l))}
770
- function kq(a){a.G.W(wq);for(var b={video:{},player:{}},c=t(Bp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Gp)0==a.m%Gp[e]&&(b.player[e]=a.h[e]());for(var f in Ep)0==a.m%Ep[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;nq(a,{type:"update",update:b},a.l);for(var g in Fp)0==a.m%Fp[g]&&(b={player:{}},b.player[g]=a.h[g](),nq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
771
- 1);tq(a)}function tq(a){return a.A&&(a.g.duration||a.h.R())?(xq(a),a.A=!1,!0):!1}function xq(a,b){var c={contentId:a.h.ad(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);uq(a,void 0===b?0:b,c)}
772
- function pq(a,b){var c=yp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;vq(a,c.initState,c.appData);kq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
773
- "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return yq(a,g,f,null)},function(h){return yq(a,g,f,h)})}}
774
- function oq(a,b){var c=yp(b.data);switch(c.type){case "PLAY":a.g.play();uq(a);break;case "PAUSE":a.g.pause();uq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),uq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),uq(a));break;case "STOP":a.h.kc().then(function(){a.h&&uq(a)});break;case "GET_STATUS":xq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
775
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||uq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&xq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");nq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:nq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
776
- function yq(a,b,c,d){a.h&&nq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function nq(a,b,c,d){a.F&&(a=xp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function uq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?zq:a.h.Xe()?Aq:a.g.paused?Bq:Cq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);nq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
777
- P("shaka.cast.CastReceiver",jq);jq.prototype.destroy=jq.prototype.destroy;jq.prototype.setContentArtist=jq.prototype.ti;jq.prototype.setContentImage=jq.prototype.ui;jq.prototype.setContentTitle=jq.prototype.wi;jq.prototype.clearContentMetadata=jq.prototype.bh;jq.prototype.setContentMetadata=jq.prototype.vi;jq.prototype.isIdle=jq.prototype.Lh;jq.prototype.isConnected=jq.prototype.isConnected;var wq=.5,sq=5,zq="IDLE",Cq="PLAYING",Aq="BUFFERING",Bq="PAUSED";function Dq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Eq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,x=0;x<q.length;x++)if(null!=q[x]&&""!==q[x].g.trim()){p=x;break}for(x=q.length-1;0<=x;x--)if(null!=q[x]&&""!==q[x].g.trim()){u=x;break}if(-1===
778
- p||-1===u)q=Fq(d,e),a.nestedCues.push(q);else{for(;p<=u;p++)if(x=q[p]){var w=x.l,z=x.i,v=x.j,B=x.h;if(w!=h||z!=k||v!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Eq(d,e,w,z,v,B),h=w,k=z,l=v,m=B;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Fq(d,e),a.nestedCues.push(n));n=Eq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
779
- function Eq(a,b,c,d,e,f){a=new Nb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Fq(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}function Gq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Hq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Iq(this)}function Jq(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Nb(b,c,"");e.lineInterpretation=1;var f=Kq.get(a.g);f&&(e.line=f);return Dq(e,d,a.i,b,c)}function Iq(a){Lq(a,0,15);a.g=1}
780
- function Mq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Nq:d=Oq.has(c)?Oq.get(c):String.fromCharCode(c);break;case Pq:d=Qq.get(c);break;case Rq:a.i[a.g].pop();d=Sq.get(c);break;case Tq:a.i[a.g].pop(),d=Uq.get(c)}d&&a.i[a.g].push(new Gq(d,a.m,a.j,a.o,a.l))}}function Vq(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Lq(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
781
- var Nq=0,Pq=1,Rq=2,Tq=3,Oq=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Qq=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"]]),Sq=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
782
- "\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"]]),Uq=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
783
- [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"]]),Kq=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 Wq(a,b){this.h=Xq;this.o=new Hq(a,b);this.i=new Hq(a,b);this.g=this.j=new Hq(a,b);this.l=0;this.m=null}function Yq(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Zq&&a.h!==$q&&(e=Jq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Lq(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Lq(c,0,15),d.g=15);a.h=Zq;d.h=b;return e}function ar(a){a.h=br;a.g=a.j;a.g.h=0}function cr(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=$q}
784
- var Xq=0,br=1,Zq=3,$q=4,dr="black green blue cyan red yellow magenta black".split(" "),er="white green blue cyan red yellow magenta white_italics".split(" ");function fr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=gr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";hr(this)}function hr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(ir())}function ir(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function jr(a,b){kr(a)&&(a.i[a.h][a.g]=new Gq(b,a.C,a.A,a.s,a.B),a.g++)}function kr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}fr.prototype.isVisible=function(){return this.l};
785
- function lr(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===mr?"left":a.F===nr?"right":Qb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case or:e.regionAnchorX=0;e.regionAnchorY=0;break;case pr:e.regionAnchorX=50;e.regionAnchorY=0;break;case qr:e.regionAnchorX=100;e.regionAnchorY=0;break;case rr:e.regionAnchorX=0;e.regionAnchorY=50;break;case sr:e.regionAnchorX=
786
- 50;e.regionAnchorY=50;break;case tr:e.regionAnchorX=100;e.regionAnchorY=50;break;case ur:e.regionAnchorX=0;e.regionAnchorY=100;break;case vr:e.regionAnchorX=50;e.regionAnchorY=100;break;case wr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Dq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var mr=0,nr=1,gr=2,or=0,pr=1,qr=2,rr=3,sr=4,tr=5,ur=6,vr=7,wr=8;function xr(){this.i=[];this.h=null;this.g=0}function yr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new zr(a.h)),a.h=null,a.g=0))}function zr(a){this.g=0;this.h=a}zr.prototype.ka=function(){return this.g<this.h.length};zr.prototype.wa=function(){return this.g};function Ar(a){if(!a.ka())throw new Q(2,2,3E3);return a.h[a.g++]}zr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new Q(2,2,3E3);this.g+=a};function Br(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
787
- function Cr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Ar(b).value;b=null;c=t(Dr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=lr(e,d,a.i)),hr(e);return b}if(137===c)for(b=Ar(b).value,b=t(Dr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Ar(b).value;b=null;c=t(Dr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=lr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Ar(b).value;
788
- b=null;c=t(Dr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=lr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Ar(b).value,Er(a,b,d);if(143===c)return d=Er(a,255,d),Fr(a),d;if(144===c)b.skip(1),d=Ar(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Ar(b).value,c=Ar(b).value,b.skip(1),a.g&&(b=Gr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Gr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Ar(b).value,b=Ar(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
789
- b.skip(1),d=Ar(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new fr(c,a.i);f.j=d;a.h[c]=f}d=Ar(b).value;f=Ar(b).value;var g=Ar(b).value,h=Ar(b).value,k=Ar(b).value;b=Ar(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
790
- function Dr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Er(a,b,c){var d=null;b=t(Dr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=lr(f,c,a.i));a.h[e]=null}return d}function Fr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Gr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Hr[a<<2|b<<1|c]}
791
- var Ir=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"]]),Hr="black blue green cyan red magenta yellow white".split(" ");function Jr(){this.h=[];this.g=[];this.i=new xr;this.l=0;this.m=new Map([["CC1",new Wq(0,0)],["CC2",new Wq(0,1)],["CC3",new Wq(1,0)],["CC4",new Wq(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Kr(this)}Jr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Kr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Fr(b.value)};
792
- function Kr(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Xq,c.g=c.j,c.m=null,Iq(c.i),Iq(c.j),Iq(c.o);a.B=!0}
793
- Jr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new wg(a,0);if(!(8>a.getLength())&&181===a.P()&&49===a.ra()&&1195456820===a.M()&&3===a.P()&&(c=a.P(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.P(),f=(e&4)>>2,g=a.P(),h=a.P();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,vb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
794
- Jr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Lr(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())yr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Mr(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
795
- function Lr(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.vb||!b.cb&&!b.vb||!Nr(b.cb)||!Nr(b.vb))return 45<=++a.l&&Kr(a),null;a.l=0;b.cb&=127;b.vb&=127;if(!b.cb&&!b.vb)return null;a.A.add(d);a=null;if(16===(b.cb&112))a:{d=b.cb;a=b.vb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=
796
- er[e]:7===e&&(f=!0);a=1===(a&1);c.h!==$q&&(e=c.g,c.h===Zq&&b!==e.g&&(c=1+b-e.h,Vq(e,c,1+e.g-e.h,e.h),Lq(e,0,c-1),Lq(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Mq(c.g,Nq,32),d=!1,b=er[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=dr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Mq(c.g,Pq,a);else if(18===
797
- (d&246)&&32===(a&224))Mq(c.g,d&1?Tq:Rq,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.vb){case 32:ar(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Yq(c,2,a);break;case 38:d=Yq(c,3,a);break;case 39:d=Yq(c,4,a);break;case 40:Mq(c.g,Nq,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Iq(c.o);cr(c);break;case 43:cr(c);break;case 44:b=c.i;d=null;c.h!==$q&&(d=Jq(b,c.l,a));Lq(b,0,15);break;case 45:b=c.g;c.h!==Zq?d=null:(d=Jq(b,c.l,a),f=b.g-b.h+1,Vq(b,f-1,f,b.h),Lq(b,0,
798
- f-1),Lq(b,b.g,15-b.g),c.l=a);break;case 46:Lq(c.j,0,15);break;case 47:b=null,c.h!==$q&&(b=Jq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,ar(c),c.l=a,d=b}a=d;break a}a=null}else d=b.vb,Mq(c.g,Nq,b.cb),Mq(c.g,Nq,d);return a}
799
- function Mr(a,b){var c=[];try{for(;b.ka();){var d=Ar(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ar(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Br(e));for(var g=a.j.get(e),h=b.wa();b.wa()-h<f;){e=b;var k=Ar(e),l=k.value,m=k.pts;if(16===l){var n=Ar(e);l=l<<16|n.value}if(0<=l&&31>=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!kr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=lr(p,q,g.i));if(p.h+1>=p.o){q=p;for(var u=
800
- 0,x=1;16>x;x++,u++)q.i[u]=q.i[x];for(x=0;1>x;x++,u++)q.i[u]=ir()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=lr(p,q,g.i));p.i[p.h]=ir();p.g=0;break;case 12:p.isVisible()&&(e=lr(p,q,g.i)),hr(p),q=p,q.h=0,q.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Cr(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?jr(g.g,
801
- "\u266a"):jr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&jr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ir.has(e)){var z=Ir.get(e);jr(g.g,z)}else jr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?jr(g.g,"_"):jr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(v){if(v instanceof Q&&3E3===v.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function Nr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
802
- Jr.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Jr);Ib=function(){return new Jr};function Or(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Pr(){this.j=new Map;this.i=this.h=0;this.g=Qr}
803
- Pr.prototype.init=function(a){function b(f){f=f.name;f in Rr&&(c.g=Rr[f])}var c=this,d=[],e=[];(new zg).box("moov",Eg).box("mvex",Eg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.M();g=g.M();c.h=f;c.i=g}).box("trak",Eg).O("tkhd",function(f){f=Pi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Eg).O("mdhd",function(f){f=Ni(f.reader,f.version);e.push(f.timescale)}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
804
- b).box("dvh1",b).box("dvhe",b).box("encv",Jg).box("sinf",Eg).box("frma",function(f){f=Qi(f.reader).Ea;f in Rr&&(c.g=Rr[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new Q(2,2,2010);this.g==Qr&&Wa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
805
- Pr.prototype.parse=function(a){var b=this;if(this.g==Qr)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new zg).box("moof",function(l){f=l.start;g=[];Eg(l)}).box("traf",Eg).O("trun",function(l){l=Oi(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Li(l.reader,l.flags);d=l.Wf||b.h;e=l.fh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Mi(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Wa("Unable to find base media decode time for CEA captions!"),
806
- new Q(2,2,2010);Sr(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
807
- function Sr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.vg});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].eh);b.ka();){g=b.M();var q=b.P(),p=null;p=!1;h=1;switch(a.g){case Tr:p=q&31;p=6==p;break;case Ur:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].he||0),q=(c+q)/d,h=t(Or(b.sb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
808
- c+(n[l].wf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Pr);var Qr=0,Tr=1,Ur=2,Rr={avc1:Tr,avc3:Tr,hev1:Ur,hvc1:Ur,dvav:Tr,dva1:Tr,dvh1:Ur,dvhe:Ur};Hb["video/mp4"]=function(){return new Pr};function Vr(){this.g=null}Vr.prototype.init=function(){};Vr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new ij;var b=[];a=Ab(a);if(!pj(a))return b;a=this.g.parse(a);var c=a.bd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Or(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
809
- P("shaka.cea.TsCeaParser",Vr);Hb["video/mp2t"]=function(){return new Vr};function Wr(a,b,c){var d=Xr(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new Q(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Dc});if(1<f.length)throw new Q(2,4,4050);f.length&&(g=Yr(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
810
- l.Dc});f.length&&(a=Zr(e,k,f,c,h),0==a.length&&(a=[Bd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Bd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Vf:h,Cj:e,drmInfos:a,xe:g,Zf:!0}}
811
- function $r(a,b,c,d){var e=Wr(a,c,d);if(b.Zf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Zf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new Q(2,4,4008);return e.Vf||b.Vf}
812
- function as(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function bs(a){a=t(Yg(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return Wg(c)}return""}
813
- function cs(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Wg(b)))return b;a=$g(a.node,"urn:microsoft:playready","pro");if(!a||!Wg(a))return"";a=Wg(a);a=ud(a);a=as(a).filter(function(c){return c.type===ds})[0];if(!a)return"";a=kd(a.value,!0);return(a=Pg(a,"WRMHEADER"))?bs(a):""}
814
- function Zr(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Dc];if(h){var k;if((k=$g(g.node,"urn:microsoft:playready","pro"))&&Wg(k)){k=Wg(k);k=ud(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Ng(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Dc)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
815
- 60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Ng(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Bd(h,b,g.init||a||k||l);if(h=es.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Xr(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=fs(c.value))&&b.push(c);return b}
816
- function fs(a){var b=a.attributes.schemeIdUri,c=ch(a,"urn:mpeg:cenc:2013","default_KID"),d=ah(a,"urn:mpeg:cenc:2013","pssh").map(Xg),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new Q(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:ud(g),keyId:null}})}catch(g){throw new Q(2,4,4007);}return{node:a,Dc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
817
- function Yr(a){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Q(2,4,4042);var b=$g(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new Q(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new Q(2,4,4051);b=$g(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new Q(2,4,4051);a=b.attributes.IV;b=qd(b.attributes.keyUriTemplate);
818
- if(!a||!b)throw new Q(2,4,4051);a=vd(a.substr(2));if(16!=a.byteLength)throw new Q(2,4,4048);return{Rh:b,iv:a}}
819
- var ds=1,es=(new Map).set("com.widevine.alpha",function(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wg(b))?b:(a=$g(a.node,"urn:microsoft","laurl"))?qd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",cs).set("com.microsoft.playready.recommendation",cs).set("com.microsoft.playready.software",cs).set("com.microsoft.playready.hardware",cs).set("org.w3.clearkey",function(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wg(b))?b:(a=$g(a.node,"http://dashif.org/guidelines/clearKey",
820
- "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Wg(a))?a:""});function gs(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Wa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
765
+ function mq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return nq(a)};b.onSenderDisconnected=function(){return nq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&oq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);oq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return pq(a,
766
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return qq(a,e)};b.start();b=t(Bp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return rq(a,"video",e)});for(var d in $f)a.j.D(a.h,$f[d],function(e){return rq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;sq(a)});a.j.D(a.g,"playing",function(){a.o=!1;sq(a)});a.j.D(a.g,"pause",function(){sq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;sq(a)});
767
+ a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,sq(a))})).X(tq)})}function nq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;sq(a)}function sq(a){var b;L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);uq(a)||vq(a);G(c)})}
768
+ function wq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
769
+ a.g.autoplay=f;b.manifest&&(a.g.play(),vq(a));G(p)}})}function rq(a,b,c){a.h&&(lq(a),oq(a,{type:"event",targetName:b,event:c},a.l))}
770
+ function lq(a){a.G.X(xq);for(var b={video:{},player:{}},c=t(Cp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Hp)0==a.m%Hp[e]&&(b.player[e]=a.h[e]());for(var f in Fp)0==a.m%Fp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;oq(a,{type:"update",update:b},a.l);for(var g in Gp)0==a.m%Gp[g]&&(b={player:{}},b.player[g]=a.h[g](),oq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
771
+ 1);uq(a)}function uq(a){return a.A&&(a.g.duration||a.h.R())?(yq(a),a.A=!1,!0):!1}function yq(a,b){var c={contentId:a.h.ad(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);vq(a,void 0===b?0:b,c)}
772
+ function qq(a,b){var c=zp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;wq(a,c.initState,c.appData);lq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
773
+ "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return zq(a,g,f,null)},function(h){return zq(a,g,f,h)})}}
774
+ function pq(a,b){var c=zp(b.data);switch(c.type){case "PLAY":a.g.play();vq(a);break;case "PAUSE":a.g.pause();vq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),vq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),vq(a));break;case "STOP":a.h.lc().then(function(){a.h&&vq(a)});break;case "GET_STATUS":yq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
775
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||vq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&yq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");oq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:oq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
776
+ function zq(a,b,c,d){a.h&&oq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function oq(a,b,c,d){a.F&&(a=yp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function vq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Aq:a.h.Ye()?Bq:a.g.paused?Cq:Dq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);oq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
777
+ P("shaka.cast.CastReceiver",kq);kq.prototype.destroy=kq.prototype.destroy;kq.prototype.setContentArtist=kq.prototype.ui;kq.prototype.setContentImage=kq.prototype.vi;kq.prototype.setContentTitle=kq.prototype.xi;kq.prototype.clearContentMetadata=kq.prototype.dh;kq.prototype.setContentMetadata=kq.prototype.wi;kq.prototype.isIdle=kq.prototype.Mh;kq.prototype.isConnected=kq.prototype.isConnected;var xq=.5,tq=5,Aq="IDLE",Dq="PLAYING",Bq="BUFFERING",Cq="PAUSED";function Eq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Fq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,x=0;x<q.length;x++)if(null!=q[x]&&""!==q[x].g.trim()){p=x;break}for(x=q.length-1;0<=x;x--)if(null!=q[x]&&""!==q[x].g.trim()){u=x;break}if(-1===
778
+ p||-1===u)q=Gq(d,e),a.nestedCues.push(q);else{for(;p<=u;p++)if(x=q[p]){var w=x.l,z=x.i,v=x.j,B=x.h;if(w!=h||z!=k||v!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Fq(d,e,w,z,v,B),h=w,k=z,l=v,m=B;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Gq(d,e),a.nestedCues.push(n));n=Fq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
779
+ function Fq(a,b,c,d,e,f){a=new Nb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Gq(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}function Hq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Iq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Jq(this)}function Kq(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Nb(b,c,"");e.lineInterpretation=1;var f=Lq.get(a.g);f&&(e.line=f);return Eq(e,d,a.i,b,c)}function Jq(a){Mq(a,0,15);a.g=1}
780
+ function Nq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Oq:d=Pq.has(c)?Pq.get(c):String.fromCharCode(c);break;case Qq:d=Rq.get(c);break;case Sq:a.i[a.g].pop();d=Tq.get(c);break;case Uq:a.i[a.g].pop(),d=Vq.get(c)}d&&a.i[a.g].push(new Hq(d,a.m,a.j,a.o,a.l))}}function Wq(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Mq(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
781
+ var Oq=0,Qq=1,Sq=2,Uq=3,Pq=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Rq=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"]]),Tq=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
782
+ "\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"]]),Vq=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
783
+ [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"]]),Lq=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 Xq(a,b){this.h=Yq;this.o=new Iq(a,b);this.i=new Iq(a,b);this.g=this.j=new Iq(a,b);this.l=0;this.m=null}function Zq(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==$q&&a.h!==ar&&(e=Kq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Mq(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Mq(c,0,15),d.g=15);a.h=$q;d.h=b;return e}function br(a){a.h=cr;a.g=a.j;a.g.h=0}function dr(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=ar}
784
+ var Yq=0,cr=1,$q=3,ar=4,er="black green blue cyan red yellow magenta black".split(" "),fr="white green blue cyan red yellow magenta white_italics".split(" ");function gr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=hr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";ir(this)}function ir(a){a.i=[];for(var b=0;16>b;b++)a.i.push(jr())}function jr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function kr(a,b){lr(a)&&(a.i[a.h][a.g]=new Hq(b,a.C,a.A,a.s,a.B),a.g++)}function lr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}gr.prototype.isVisible=function(){return this.l};
785
+ function mr(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===nr?"left":a.F===or?"right":Qb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case pr:e.regionAnchorX=0;e.regionAnchorY=0;break;case qr:e.regionAnchorX=50;e.regionAnchorY=0;break;case rr:e.regionAnchorX=100;e.regionAnchorY=0;break;case sr:e.regionAnchorX=0;e.regionAnchorY=50;break;case tr:e.regionAnchorX=
786
+ 50;e.regionAnchorY=50;break;case ur:e.regionAnchorX=100;e.regionAnchorY=50;break;case vr:e.regionAnchorX=0;e.regionAnchorY=100;break;case wr:e.regionAnchorX=50;e.regionAnchorY=100;break;case xr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Eq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var nr=0,or=1,hr=2,pr=0,qr=1,rr=2,sr=3,tr=4,ur=5,vr=6,wr=7,xr=8;function yr(){this.i=[];this.h=null;this.g=0}function zr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Ar(a.h)),a.h=null,a.g=0))}function Ar(a){this.g=0;this.h=a}Ar.prototype.ka=function(){return this.g<this.h.length};Ar.prototype.wa=function(){return this.g};function Br(a){if(!a.ka())throw new Q(2,2,3E3);return a.h[a.g++]}Ar.prototype.skip=function(a){if(this.g+a>this.h.length)throw new Q(2,2,3E3);this.g+=a};function Cr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
787
+ function Dr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Br(b).value;b=null;c=t(Er(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=mr(e,d,a.i)),ir(e);return b}if(137===c)for(b=Br(b).value,b=t(Er(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Br(b).value;b=null;c=t(Er(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=mr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Br(b).value;
788
+ b=null;c=t(Er(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=mr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Br(b).value,Fr(a,b,d);if(143===c)return d=Fr(a,255,d),Gr(a),d;if(144===c)b.skip(1),d=Br(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Br(b).value,c=Br(b).value,b.skip(1),a.g&&(b=Hr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Hr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Br(b).value,b=Br(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
789
+ b.skip(1),d=Br(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new gr(c,a.i);f.j=d;a.h[c]=f}d=Br(b).value;f=Br(b).value;var g=Br(b).value,h=Br(b).value,k=Br(b).value;b=Br(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
790
+ function Er(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Fr(a,b,c){var d=null;b=t(Er(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=mr(f,c,a.i));a.h[e]=null}return d}function Gr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Hr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ir[a<<2|b<<1|c]}
791
+ var Jr=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"]]),Ir="black blue green cyan red magenta yellow white".split(" ");function Kr(){this.h=[];this.g=[];this.i=new yr;this.l=0;this.m=new Map([["CC1",new Xq(0,0)],["CC2",new Xq(0,1)],["CC3",new Xq(1,0)],["CC4",new Xq(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Lr(this)}Kr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Lr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Gr(b.value)};
792
+ function Lr(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Yq,c.g=c.j,c.m=null,Jq(c.i),Jq(c.j),Jq(c.o);a.B=!0}
793
+ Kr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new wg(a,0);if(!(8>a.getLength())&&181===a.P()&&49===a.ra()&&1195456820===a.M()&&3===a.P()&&(c=a.P(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.P(),f=(e&4)>>2,g=a.P(),h=a.P();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,vb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
794
+ Kr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Mr(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())zr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Nr(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
795
+ function Mr(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.vb||!b.cb&&!b.vb||!Or(b.cb)||!Or(b.vb))return 45<=++a.l&&Lr(a),null;a.l=0;b.cb&=127;b.vb&=127;if(!b.cb&&!b.vb)return null;a.A.add(d);a=null;if(16===(b.cb&112))a:{d=b.cb;a=b.vb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=
796
+ fr[e]:7===e&&(f=!0);a=1===(a&1);c.h!==ar&&(e=c.g,c.h===$q&&b!==e.g&&(c=1+b-e.h,Wq(e,c,1+e.g-e.h,e.h),Mq(e,0,c-1),Mq(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Nq(c.g,Oq,32),d=!1,b=fr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=er[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Nq(c.g,Qq,a);else if(18===
797
+ (d&246)&&32===(a&224))Nq(c.g,d&1?Uq:Sq,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.vb){case 32:br(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Zq(c,2,a);break;case 38:d=Zq(c,3,a);break;case 39:d=Zq(c,4,a);break;case 40:Nq(c.g,Oq,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Jq(c.o);dr(c);break;case 43:dr(c);break;case 44:b=c.i;d=null;c.h!==ar&&(d=Kq(b,c.l,a));Mq(b,0,15);break;case 45:b=c.g;c.h!==$q?d=null:(d=Kq(b,c.l,a),f=b.g-b.h+1,Wq(b,f-1,f,b.h),Mq(b,0,
798
+ f-1),Mq(b,b.g,15-b.g),c.l=a);break;case 46:Mq(c.j,0,15);break;case 47:b=null,c.h!==ar&&(b=Kq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,br(c),c.l=a,d=b}a=d;break a}a=null}else d=b.vb,Nq(c.g,Oq,b.cb),Nq(c.g,Oq,d);return a}
799
+ function Nr(a,b){var c=[];try{for(;b.ka();){var d=Br(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Br(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Cr(e));for(var g=a.j.get(e),h=b.wa();b.wa()-h<f;){e=b;var k=Br(e),l=k.value,m=k.pts;if(16===l){var n=Br(e);l=l<<16|n.value}if(0<=l&&31>=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!lr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=mr(p,q,g.i));if(p.h+1>=p.o){q=p;for(var u=
800
+ 0,x=1;16>x;x++,u++)q.i[u]=q.i[x];for(x=0;1>x;x++,u++)q.i[u]=jr()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=mr(p,q,g.i));p.i[p.h]=jr();p.g=0;break;case 12:p.isVisible()&&(e=mr(p,q,g.i)),ir(p),q=p,q.h=0,q.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Dr(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?kr(g.g,
801
+ "\u266a"):kr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&kr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Jr.has(e)){var z=Jr.get(e);kr(g.g,z)}else kr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?kr(g.g,"_"):kr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(v){if(v instanceof Q&&3E3===v.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function Or(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
802
+ Kr.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Kr);Ib=function(){return new Kr};function Pr(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Qr(){this.j=new Map;this.i=this.h=0;this.g=Rr}
803
+ Qr.prototype.init=function(a){function b(f){f=f.name;f in Sr&&(c.g=Sr[f])}var c=this,d=[],e=[];(new zg).box("moov",Eg).box("mvex",Eg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.M();g=g.M();c.h=f;c.i=g}).box("trak",Eg).O("tkhd",function(f){f=Pi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Eg).O("mdhd",function(f){f=Ni(f.reader,f.version);e.push(f.timescale)}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
804
+ b).box("dvh1",b).box("dvhe",b).box("encv",Jg).box("sinf",Eg).box("frma",function(f){f=Qi(f.reader).Ea;f in Sr&&(c.g=Sr[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new Q(2,2,2010);this.g==Rr&&Wa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
805
+ Qr.prototype.parse=function(a){var b=this;if(this.g==Rr)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new zg).box("moof",function(l){f=l.start;g=[];Eg(l)}).box("traf",Eg).O("trun",function(l){l=Oi(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Li(l.reader,l.flags);d=l.Xf||b.h;e=l.gh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Mi(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Wa("Unable to find base media decode time for CEA captions!"),
806
+ new Q(2,2,2010);Tr(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
807
+ function Tr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.wg});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].fh);b.ka();){g=b.M();var q=b.P(),p=null;p=!1;h=1;switch(a.g){case Ur:p=q&31;p=6==p;break;case Vr:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].ie||0),q=(c+q)/d,h=t(Pr(b.sb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
808
+ c+(n[l].xf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Qr);var Rr=0,Ur=1,Vr=2,Sr={avc1:Ur,avc3:Ur,hev1:Vr,hvc1:Vr,dvav:Ur,dva1:Ur,dvh1:Vr,dvhe:Vr};Hb["video/mp4"]=function(){return new Qr};function Wr(){this.g=null}Wr.prototype.init=function(){};Wr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new ij;var b=[];a=Ab(a);if(!pj(a))return b;a=this.g.parse(a);var c=a.bd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Pr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
809
+ P("shaka.cea.TsCeaParser",Wr);Hb["video/mp2t"]=function(){return new Wr};function Xr(a,b,c){var d=Yr(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new Q(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Dc});if(1<f.length)throw new Q(2,4,4050);f.length&&(g=Zr(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
810
+ l.Dc});f.length&&(a=$r(e,k,f,c,h),0==a.length&&(a=[Bd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Bd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Wf:h,Dj:e,drmInfos:a,ye:g,$f:!0}}
811
+ function as(a,b,c,d){var e=Xr(a,c,d);if(b.$f){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.$f=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new Q(2,4,4008);return e.Wf||b.Wf}
812
+ function bs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function cs(a){a=t(Yg(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return Wg(c)}return""}
813
+ function ds(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Wg(b)))return b;a=$g(a.node,"urn:microsoft:playready","pro");if(!a||!Wg(a))return"";a=Wg(a);a=ud(a);a=bs(a).filter(function(c){return c.type===es})[0];if(!a)return"";a=id(a.value,!0);return(a=Pg(a,"WRMHEADER"))?cs(a):""}
814
+ function $r(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Dc];if(h){var k;if((k=$g(g.node,"urn:microsoft:playready","pro"))&&Wg(k)){k=Wg(k);k=ud(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Ng(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Dc)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
815
+ 60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Ng(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Bd(h,b,g.init||a||k||l);if(h=fs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Yr(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=gs(c.value))&&b.push(c);return b}
816
+ function gs(a){var b=a.attributes.schemeIdUri,c=ch(a,"urn:mpeg:cenc:2013","default_KID"),d=ah(a,"urn:mpeg:cenc:2013","pssh").map(Xg),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new Q(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:ud(g),keyId:null}})}catch(g){throw new Q(2,4,4007);}return{node:a,Dc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
817
+ function Zr(a){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Q(2,4,4042);var b=$g(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new Q(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new Q(2,4,4051);b=$g(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new Q(2,4,4051);a=b.attributes.IV;b=qd(b.attributes.keyUriTemplate);
818
+ if(!a||!b)throw new Q(2,4,4051);a=vd(a.substr(2));if(16!=a.byteLength)throw new Q(2,4,4048);return{Sh:b,iv:a}}
819
+ var es=1,fs=(new Map).set("com.widevine.alpha",function(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wg(b))?b:(a=$g(a.node,"urn:microsoft","laurl"))?qd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",ds).set("com.microsoft.playready.recommendation",ds).set("com.microsoft.playready.software",ds).set("com.microsoft.playready.hardware",ds).set("org.w3.clearkey",function(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wg(b))?b:(a=$g(a.node,"http://dashif.org/guidelines/clearKey",
820
+ "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Wg(a))?a:""});function hs(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Wa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
821
821
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
822
- function hs(a,b){var c=is(a,b,"timescale"),d=1;c&&(d=ih(c)||1);var e=is(a,b,"duration");c=ih(e||"");"image"==a.J.contentType&&(c=kh(e||""));c&&(c/=d);var f=is(a,b,"startNumber");e=Number(is(a,b,"presentationTimeOffset"))||0;var g=jh(f||"");if(null==f||null==g)g=1;var h=js(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;f=g;h=Vg(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=bh(n,"t",jh),u=bh(n,"d",jh),x=bh(n,"r",hh);n=bh(n,"k",hh)||0;null!=p&&(p-=e);if(!u)break;
823
- p=null!=p?p:l;x=x||0;if(0>x)if(q){q=bh(q,"t",jh);if(null==q)break;else if(p>=q)break;x=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;x=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=x;++q)l=p+u,k.push({start:p/b,end:l/b,Kf:p,rb:n,ri:k.length+f}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:e/d||0,Jf:e,timeline:b}}function ks(a,b){return[b(a.J),b(a.ua),b(a.za)].filter(ne)}
824
- function is(a,b,c){b=ks(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}function js(a,b,c){b=ks(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Zg(d.value,c));d=b.next());return a}
825
- function ls(a,b,c,d,e,f){for(var g=ch(a,"http://www.w3.org/1999/xlink","href"),h=ch(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Rg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Tf(new Q(2,4,4028));if("onLoad"!=h)return Tf(new Q(2,4,4027));var q=Ad([d],[g]);return e.request(0,hg(q,b)).va(function(p){p=Og(p.data,a.tagName);if(!p)return Tf(new Q(2,4,4001,g));for(a.children=
826
- [];p.children.length;){var u=p.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(p.attributes));for(var x=u.next();!x.done;x=u.next())x=x.value,a.attributes[x]=p.attributes[x];return ms(a,b,c,q[0],e,f+1)})}
827
- function ms(a,b,c,d,e,f){f=void 0===f?0:f;if(ch(a,"http://www.w3.org/1999/xlink","href")){var g=ls(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return ms(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Ug(a)),l=k.next();!l.done;h={oc:h.oc},l=k.next())h.oc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==ch(h.oc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.oc}}(h)):"SegmentTimeline"!=h.oc.tagName&&g.push(ms(h.oc,b,c,d,e,f));return Xf(g).va(function(){return a})}
828
- ;function ns(a,b,c,d,e,f,g){var h,k=(new zg).O("sidx",function(l){h=os(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new Q(2,3,3004);}
829
- function os(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new Q(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Cc(),m=g.reader.Cc();g.reader.skip(2);var n=g.reader.ra();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.M(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.M();g.reader.skip(4);if(1==p)throw new Q(2,3,3006);h.push(new vi(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function ps(a){this.h=Eb(a);this.g=new wg(this.h,0)}ps.prototype.ka=function(){return this.g.ka()};
830
- function qs(a){var b=rs(a);if(7<b.length)throw new Q(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=rs(a);a:{d=t(ss);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new Q(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new ts(c,
831
- d)}function rs(a){var b=a.g.wa(),c=a.g.P();if(0==c)throw new Q(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var ss=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function ts(a,b){this.id=a;this.g=b}
832
- function us(a){if(8<a.g.byteLength)throw new Q(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new Q(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function vs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ps(a.g);for(var n=null,q=null;a.ka();){var p=qs(a);if(187==p.id){var u=ws(p);u&&(p=c*u.Di,u=b+u.gi,null!=n&&m.push(new vi(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new vi(n+g,d+g,l,q,null,f,g,h,k));return m}
833
- function ws(a){var b=new ps(a.g);a=qs(b);if(179!=a.id)throw new Q(2,3,3013);a=us(a);b=qs(b);if(183!=b.id)throw new Q(2,3,3012);b=new ps(b.g);for(var c=0;b.ka();){var d=qs(b);if(241==d.id){c=us(d);break}}return{Di:a,gi:c}};function xs(a,b,c){b=js(a,b,"Initialization");if(!b)return null;var d=a.J.nb(),e=b.attributes.sourceURL;e&&(d=Ad(d,[qd(e)]));e=0;var f=null;if(b=bh(b,"range",gh))e=b.start,f=b.end;c=new qi(function(){return d},e,f,ys(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
834
- function zs(a,b,c){var d=Number(is(a,As,"presentationTimeOffset"))||0,e=is(a,As,"timescale"),f=1;e&&(f=ih(e)||1);var g=d/f||0,h=xs(a,As,c);Bs(a,h);var k=ze(a);return{vc:function(){var l=js(k,As,"RepresentationIndex");var m=k.J.nb();l&&(l=qd(l.attributes.sourceURL))&&(m=Ad(m,[l]));l=Cs(k);return Ds(k,b,h,m,l.start,l.end,g)}}}
835
- function Ds(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Eb||!a.ha.Ye,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.$(),c.Aa,c.ja,!0):null],q=null,C(E,Promise.all(u),2);x=E.h;w=x[0];z=x[1]||null;v=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var H=ns(w,e,d,c,B,A,D);else{H=new ps(z);if(440786851!=qs(H).id)throw new Q(2,3,3008);var K=qs(H);if(408125543!=K.id)throw new Q(2,
836
- 3,3009);H=K.g.byteOffset;K=new ps(K.g);for(var M=null;K.ka();){var O=qs(K);if(357149030==O.id){M=O;break}}if(!M)throw new Q(2,3,3010);M=new ps(M.g);O=1E6;for(K=null;M.ka();){var N=qs(M);if(2807729==N.id)O=us(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new Q(2,3,3003);}if(null==K)throw new Q(2,3,3011);M=O/1E9;K*=M;O=qs(new ps(w));if(475249515!=O.id)throw new Q(2,3,3007);H=vs(O,H,M,K,d,c,B,A,D)}v=H;F=t(v);for(J=F.next();!J.done;J=
837
- F.next())I=J.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.ld(v);p=new Dk(v);k&&p.sc(A,D,!0);return E.return(p)})}function As(a){return a.pd}function Cs(a){var b=js(a,As,"RepresentationIndex");a=is(a,As,"indexRange");a=gh(a||"");b&&(a=bh(b,"range",gh,a));return a}function Bs(a,b){Es(a,b);if(!Cs(a))throw new Q(2,4,4002);}function Es(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Id&&"mp4"!=c&&"webm"!=c)throw new Q(2,4,4006);if("webm"==c&&!b)throw new Q(2,4,4005);}
838
- function ys(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.de,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Fs(a,b,c){var d=xs(a,Gs,c),e=Hs(a);if(!e.Da&&!e.timeline&&1<e.yc.length)throw new Q(2,4,4002);if(!e.Da&&!a.ha.duration&&!e.timeline&&1==e.yc.length)throw new Q(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new Q(2,4,4002);var f=null,g=null;a.za.id&&a.J.id&&(g=b[a.za.id+","+a.J.id])&&(f=g.segmentIndex);var h=Is(a.ha.start,a.ha.duration,a.J.nb,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.kd(h,a.presentationTimeline.qb()):f=new Dk(h);a.presentationTimeline.ld(h);a.Eb&&a.ha.Ye||f.sc(a.ha.start,
839
- a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{vc:function(){f&&0!=f.getNumReferences()||f.ae(h);return Promise.resolve(f)}}}function Gs(a){return a.Jb}function Hs(a){var b=Js(a);a=hs(a,Gs);var c=a.rd;0==c&&(c=1);var d=0;a.Da?d=a.Da*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Da:a.Da,startTime:d,rd:c,Bb:a.Bb,timeline:a.timeline,yc:b}}
840
- function Is(a,b,c,d,e,f,g,h){var k=d.yc.length;d.timeline&&d.timeline.length!=d.yc.length&&(k=Math.min(d.timeline.length,d.yc.length));for(var l=a-d.Bb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},u=0;u<k;p={Sc:p.Sc,Oc:p.Oc},u++){p.Oc=d.yc[u];var x=q;q=void 0;q=null!=d.Da?x+d.Da:d.timeline?d.timeline[u].end:x+b;p.Sc=null;x=new vi(a+x,a+q,function(w){return function(){null==w.Sc&&(w.Sc=Ad(c(),[w.Oc.Xh]));return w.Sc}}(p),p.Oc.start,p.Oc.end,e,l,a,m,[],"",null,null,wi,f);x.codecs=h;x.mimeType=g;n.push(x)}return n}
841
- function Js(a){return[a.J.Jb,a.ua.Jb,a.za.Jb].filter(ne).map(function(b){return Vg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.ig&&(a.ig=!0);var c=qd(b.attributes.media);b=bh(b,"mediaRange",gh,{start:0,end:null});return{Xh:c,start:b.start,end:b.end}})};function Ks(a,b,c,d,e,f,g,h){var k=Ls(a,g),l=Ms(a);Ns(l);var m=ze(a);if(l.hd)return Es(a,k),{vc:function(){var x=gs(l.hd,m.J.id,null,null,m.bandwidth||null,null);x=Ad(m.J.nb(),[x]);return Ds(m,b,k,x,0,null,l.Bb)}};if(l.Da)return d||"image"===a.ua.contentType||(a.presentationTimeline.hf(l.Da),a.presentationTimeline.ce(a.ha.start)),{vc:function(){return Os(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.za.id&&a.J.id&&(d=a.za.id+","+a.J.id,d=c[d])&&(n=d.segmentIndex);var q=a.ha.start,p=a.ha.duration?q+a.ha.duration:
842
- Infinity,u=!(a.Eb&&a.ha.Ye);n?(c=n,Ps(c,l,q,p,u,k),c.La(a.presentationTimeline.qb())):n=new Qs(l,a.J.id,a.bandwidth,a.J.nb,q,p,k,u,g,a.J.xf);l.timeline&&"image"!==a.ua.contentType&&a.presentationTimeline.qg(l.timeline,q);d&&a.Eb&&(d.segmentIndex=n);return{vc:function(){n instanceof Qs&&0==n.getNumReferences()&&Ps(n,l,q,p,u,k);return Promise.resolve(n)}}}function Rs(a){return a.qd}
843
- function Ms(a){var b=hs(a,Rs),c=is(a,Rs,"media"),d=is(a,Rs,"index");return{Da:b.Da,timescale:b.timescale,rd:b.rd,Bb:b.Bb,Jf:b.Jf,timeline:b.timeline,zc:c&&qd(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Ns(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Da?1:0;if(0==b)throw new Q(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Da=null);if(!a.hd&&!a.zc)throw new Q(2,4,4002);}
844
- function Os(a,b,c,d,e,f,g){function h(K){var M=(K-x)*u,O=M+b.Bb,N=M+n;M=N+u;var U=Math.min(M,l());N=new vi(N,U,function(){var R=O*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(w));R=gs(z,B,K,null,v,R);return Ad(A(),[R])},0,null,d,D,n,l(),[],"",null,null,wi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=M;return N}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Gb(),l())].map(function(M){return M-n});return[Math.ceil(K[0]/u),Math.ceil(K[1]/u)-1].map(function(M){return M+
845
- x})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,u=b.Da,x=b.rd,w=b.timescale,z=b.zc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,F=k();c=a.Eb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var J=c;J<=g;++J){var I=h(J);F.push(I)}var E=new Dk(F);F=m.Gb()<l();J=m.R();if(F||J){var H=Math.max(c,g+1);E.ke(u,function(){var K=m.qb();E.La(K);var M=t(k());M.next();M=M.next().value;for(var O=[];H<=M;){var N=h(H);O.push(N);H++}return K>
846
- l()&&!O.length?null:O})}return Promise.resolve(E)}function Ls(a,b){var c=is(a,Rs,"initialization");if(!c)return null;c=qd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.nb;b=new qi(function(){var g=gs(c,d,null,null,e,null);return Ad(f(),[g])},0,null,ys(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Qs(a,b,c,d,e,f,g,h,k,l){Dk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Ss(this)}na(Qs,Dk);r=Qs.prototype;
822
+ function is(a,b){var c=js(a,b,"timescale"),d=1;c&&(d=ih(c)||1);c=js(a,b,"duration");(c=ih(c||""))&&(c/=d);var e=js(a,b,"startNumber"),f=Number(js(a,b,"presentationTimeOffset"))||0,g=jh(e||"");if(null==e||null==g)g=1;var h=ks(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Vg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=bh(n,"t",jh),u=bh(n,"d",jh),x=bh(n,"r",hh);n=bh(n,"k",hh)||0;null!=p&&(p-=f);if(!u)break;p=null!=p?p:l;x=x||0;if(0>x)if(q){q=bh(q,"t",
823
+ jh);if(null==q)break;else if(p>=q)break;x=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;x=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=x;++q)l=p+u,k.push({start:p/b,end:l/b,Lf:p,rb:n,si:k.length+e}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:f/d||0,Kf:f,timeline:b}}function ls(a,b){return[b(a.J),b(a.ua),b(a.za)].filter(ne)}function js(a,b,c){b=ls(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
824
+ function ks(a,b,c){b=ls(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Zg(d.value,c));d=b.next());return a}
825
+ function ms(a,b,c,d,e,f){for(var g=ch(a,"http://www.w3.org/1999/xlink","href"),h=ch(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Rg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Tf(new Q(2,4,4028));if("onLoad"!=h)return Tf(new Q(2,4,4027));var q=Ad([d],[g]);return e.request(0,hg(q,b)).va(function(p){p=Og(p.data,a.tagName);if(!p)return Tf(new Q(2,4,4001,g));for(a.children=
826
+ [];p.children.length;){var u=p.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(p.attributes));for(var x=u.next();!x.done;x=u.next())x=x.value,a.attributes[x]=p.attributes[x];return ns(a,b,c,q[0],e,f+1)})}
827
+ function ns(a,b,c,d,e,f){f=void 0===f?0:f;if(ch(a,"http://www.w3.org/1999/xlink","href")){var g=ms(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return ns(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Ug(a)),l=k.next();!l.done;h={pc:h.pc},l=k.next())h.pc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==ch(h.pc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.pc}}(h)):"SegmentTimeline"!=h.pc.tagName&&g.push(ns(h.pc,b,c,d,e,f));return Xf(g).va(function(){return a})}
828
+ ;function os(a,b,c,d,e,f,g){var h,k=(new zg).O("sidx",function(l){h=ps(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new Q(2,3,3004);}
829
+ function ps(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new Q(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Cc(),m=g.reader.Cc();g.reader.skip(2);var n=g.reader.ra();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.M(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.M();g.reader.skip(4);if(1==p)throw new Q(2,3,3006);h.push(new vi(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function qs(a){this.h=Eb(a);this.g=new wg(this.h,0)}qs.prototype.ka=function(){return this.g.ka()};
830
+ function rs(a){var b=ss(a);if(7<b.length)throw new Q(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ss(a);a:{d=t(ts);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new Q(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new us(c,
831
+ d)}function ss(a){var b=a.g.wa(),c=a.g.P();if(0==c)throw new Q(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var ts=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function us(a,b){this.id=a;this.g=b}
832
+ function vs(a){if(8<a.g.byteLength)throw new Q(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new Q(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ws(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new qs(a.g);for(var n=null,q=null;a.ka();){var p=rs(a);if(187==p.id){var u=xs(p);u&&(p=c*u.Ei,u=b+u.hi,null!=n&&m.push(new vi(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new vi(n+g,d+g,l,q,null,f,g,h,k));return m}
833
+ function xs(a){var b=new qs(a.g);a=rs(b);if(179!=a.id)throw new Q(2,3,3013);a=vs(a);b=rs(b);if(183!=b.id)throw new Q(2,3,3012);b=new qs(b.g);for(var c=0;b.ka();){var d=rs(b);if(241==d.id){c=vs(d);break}}return{Ei:a,hi:c}};function ys(a,b,c){b=ks(a,b,"Initialization");if(!b)return null;var d=a.J.nb(),e=b.attributes.sourceURL;e&&(d=Ad(d,[qd(e)]));e=0;var f=null;if(b=bh(b,"range",gh))e=b.start,f=b.end;c=new qi(function(){return d},e,f,zs(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
834
+ function As(a,b,c){var d=Number(js(a,Bs,"presentationTimeOffset"))||0,e=js(a,Bs,"timescale"),f=1;e&&(f=ih(e)||1);var g=d/f||0,h=ys(a,Bs,c);Cs(a,h);var k=ze(a);return{vc:function(){var l=ks(k,Bs,"RepresentationIndex");var m=k.J.nb();l&&(l=qd(l.attributes.sourceURL))&&(m=Ad(m,[l]));l=Ds(k);return Es(k,b,h,m,l.start,l.end,g)}}}
835
+ function Es(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Eb||!a.ha.Ze,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.$(),c.Aa,c.ja,!0):null],q=null,C(E,Promise.all(u),2);x=E.h;w=x[0];z=x[1]||null;v=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var H=os(w,e,d,c,B,A,D);else{H=new qs(z);if(440786851!=rs(H).id)throw new Q(2,3,3008);var K=rs(H);if(408125543!=K.id)throw new Q(2,
836
+ 3,3009);H=K.g.byteOffset;K=new qs(K.g);for(var M=null;K.ka();){var O=rs(K);if(357149030==O.id){M=O;break}}if(!M)throw new Q(2,3,3010);M=new qs(M.g);O=1E6;for(K=null;M.ka();){var N=rs(M);if(2807729==N.id)O=vs(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new Q(2,3,3003);}if(null==K)throw new Q(2,3,3011);M=O/1E9;K*=M;O=rs(new qs(w));if(475249515!=O.id)throw new Q(2,3,3007);H=ws(O,H,M,K,d,c,B,A,D)}v=H;F=t(v);for(J=F.next();!J.done;J=
837
+ F.next())I=J.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.ld(v);p=new Dk(v);k&&p.sc(A,D,!0);return E.return(p)})}function Bs(a){return a.pd}function Ds(a){var b=ks(a,Bs,"RepresentationIndex");a=js(a,Bs,"indexRange");a=gh(a||"");b&&(a=bh(b,"range",gh,a));return a}function Cs(a,b){Fs(a,b);if(!Ds(a))throw new Q(2,4,4002);}function Fs(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Id&&"mp4"!=c&&"webm"!=c)throw new Q(2,4,4006);if("webm"==c&&!b)throw new Q(2,4,4005);}
838
+ function zs(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ee,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Gs(a,b,c){var d=ys(a,Hs,c),e=Is(a);if(!e.Da&&!e.timeline&&1<e.yc.length)throw new Q(2,4,4002);if(!e.Da&&!a.ha.duration&&!e.timeline&&1==e.yc.length)throw new Q(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new Q(2,4,4002);var f=null,g=null;a.za.id&&a.J.id&&(g=b[a.za.id+","+a.J.id])&&(f=g.segmentIndex);var h=Js(a.ha.start,a.ha.duration,a.J.nb,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.kd(h,a.presentationTimeline.qb()):f=new Dk(h);a.presentationTimeline.ld(h);a.Eb&&a.ha.Ze||f.sc(a.ha.start,
839
+ a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{vc:function(){f&&0!=f.getNumReferences()||f.ae(h);return Promise.resolve(f)}}}function Hs(a){return a.Jb}function Is(a){var b=Ks(a);a=is(a,Hs);var c=a.rd;0==c&&(c=1);var d=0;a.Da?d=a.Da*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Da:a.Da,startTime:d,rd:c,Bb:a.Bb,timeline:a.timeline,yc:b}}
840
+ function Js(a,b,c,d,e,f,g,h){var k=d.yc.length;d.timeline&&d.timeline.length!=d.yc.length&&(k=Math.min(d.timeline.length,d.yc.length));for(var l=a-d.Bb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},u=0;u<k;p={Sc:p.Sc,Oc:p.Oc},u++){p.Oc=d.yc[u];var x=q;q=void 0;q=null!=d.Da?x+d.Da:d.timeline?d.timeline[u].end:x+b;p.Sc=null;x=new vi(a+x,a+q,function(w){return function(){null==w.Sc&&(w.Sc=Ad(c(),[w.Oc.Yh]));return w.Sc}}(p),p.Oc.start,p.Oc.end,e,l,a,m,[],"",null,null,wi,f);x.codecs=h;x.mimeType=g;n.push(x)}return n}
841
+ function Ks(a){return[a.J.Jb,a.ua.Jb,a.za.Jb].filter(ne).map(function(b){return Vg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.jg&&(a.jg=!0);var c=qd(b.attributes.media);b=bh(b,"mediaRange",gh,{start:0,end:null});return{Yh:c,start:b.start,end:b.end}})};function Ls(a,b,c,d,e,f,g,h){var k=Ms(a,g),l=Ns(a);Os(l);var m=ze(a);if(l.hd)return Fs(a,k),{vc:function(){var x=hs(l.hd,m.J.id,null,null,m.bandwidth||null,null);x=Ad(m.J.nb(),[x]);return Es(m,b,k,x,0,null,l.Bb)}};if(l.Da)return d||"image"===a.ua.contentType||(a.presentationTimeline.hf(l.Da),a.presentationTimeline.de(a.ha.start)),{vc:function(){return Ps(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.za.id&&a.J.id&&(d=a.za.id+","+a.J.id,d=c[d])&&(n=d.segmentIndex);var q=a.ha.start,p=a.ha.duration?q+a.ha.duration:
842
+ Infinity,u=!(a.Eb&&a.ha.Ze);n?(c=n,Qs(c,l,q,p,u,k),c.La(a.presentationTimeline.qb())):n=new Rs(l,a.J.id,a.bandwidth,a.J.nb,q,p,k,u,g,a.J.yf);l.timeline&&"image"!==a.ua.contentType&&a.presentationTimeline.rg(l.timeline,q);d&&a.Eb&&(d.segmentIndex=n);return{vc:function(){n instanceof Rs&&0==n.getNumReferences()&&Qs(n,l,q,p,u,k);return Promise.resolve(n)}}}function Ss(a){return a.qd}
843
+ function Ns(a){var b=is(a,Ss),c=js(a,Ss,"media"),d=js(a,Ss,"index");return{Da:b.Da,timescale:b.timescale,rd:b.rd,Bb:b.Bb,Kf:b.Kf,timeline:b.timeline,zc:c&&qd(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Os(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Da?1:0;if(0==b)throw new Q(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Da=null);if(!a.hd&&!a.zc)throw new Q(2,4,4002);}
844
+ function Ps(a,b,c,d,e,f,g){function h(K){var M=(K-x)*u,O=M+b.Bb,N=M+n;M=N+u;var U=Math.min(M,l());N=new vi(N,U,function(){var R=O*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(w));R=hs(z,B,K,null,v,R);return Ad(A(),[R])},0,null,d,D,n,l(),[],"",null,null,wi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=M;return N}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Gb(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/u),Math.ceil(K[1]/u)-1];a.J.Qb&&K[1]++;return K.map(function(M){return M+
845
+ x})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,u=b.Da,x=b.rd,w=b.timescale,z=b.zc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,F=k();c=a.Eb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var J=c;J<=g;++J){var I=h(J);F.push(I)}var E=new Dk(F);F=m.Gb()<l();J=m.R();if(F||J){var H=Math.max(c,g+1);E.le(u,function(){var K=m.qb();E.La(K);var M=t(k());M.next();M=M.next().value;for(var O=[];H<=M;){var N=h(H);O.push(N);H++}return K>
846
+ l()&&!O.length?null:O})}return Promise.resolve(E)}function Ms(a,b){var c=js(a,Ss,"initialization");if(!c)return null;c=qd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.nb;b=new qi(function(){var g=hs(c,d,null,null,e,null);return Ad(f(),[g])},0,null,zs(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Rs(a,b,c,d,e,f,g,h,k,l){Dk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Ts(this)}na(Rs,Dk);r=Rs.prototype;
847
847
  r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Dk.prototype.release.call(this);this.h=null};r.La=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
848
- function Ps(a,b,c,d,e,f){Ts(a,f);if(a.h){c=a.h.timeline;a.h.zc=b.zc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Ss(a)}function Ts(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&yi(c,b)}}function Ss(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.La(a.i)}}
848
+ function Qs(a,b,c,d,e,f){Us(a,f);if(a.h){c=a.h.timeline;a.h.zc=b.zc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Ts(a)}function Us(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&yi(c,b)}}function Ts(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.La(a.i)}}
849
849
  r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
850
- r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.zc,e=this.h.timeline[a],f=e.ri,g=this.h.Jf+e.Kf;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},u=0;u<e.rb;p={Tc:p.Tc,se:p.se},u++){var x=e.start+q*u,w=x+q;p.se=u+1;p.Tc=null;x=new vi(this.i+x,this.i+w,function(z){return function(){if(!b.h)return[];
851
- null==z.Tc&&(z.Tc=Us(b.h.zc,b.F,f,b.B,g,z.se,b.C));return z.Tc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,wi,this.A);x.codecs=l;x.mimeType=m;0==this.G?0<u&&x.Zd():0!=u%this.G&&x.Zd();n.push(x)}c=new vi(this.i+e.start,k,function(){return 0<e.rb?[]:Us(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,wi,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
852
- function Us(a,b,c,d,e,f,g){a=gs(a,b,c,f,d||null,e);return Ad(g(),[a]).map(function(h){return h.toString()})};function Vs(a){this.o=null;this.A=a;this.G=new bg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Vs.prototype.configure=function(a){this.o=a};Vs.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Vs.prototype.setManifestType=function(a){this.s=a};
853
- function Ws(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Ad(a.i,[Xs(a,b)]),d=hg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),cg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=hd(f.data),h=JSON.parse(g),1==h.VERSION&&Ys(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){Ws(a,b)});a.g.W(a.C);G(l)})}
854
- function Xs(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function Ys(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){Ws(a,d)});if(c=b.TTL)a.C=c;a.g.W(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
855
- function Zs(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Vs.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
856
- function $s(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Pb:e.Pb},g=f.next())if(e.Pb=g.value,g=b.get(e.Pb))d.push({rf:e.Pb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Vi==k.Pb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Ng?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Ng),d.push({rf:e.Pb,location:h.toString()})):d.push({rf:e.Pb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
857
- h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Ad(a.i,d)};function at(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=at.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.Eh=function(){return this.j};r.Ve=function(){return this.l.slice()};r.nh=function(){return this.i};
858
- function bt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[ct(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[dt(n),n]})),l=new Map(h.textStreams.map(function(n){return[et(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ft(n),n]}));if(b){var m=gt(Id);l.set(et(m),m);m=gt("image");h.set(ft(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Pf:c,Lg:d,Ig:e,hg:f}}
859
- r.Sf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U;return L(function(R){if(1==R.g){d=Kd;if(!b&&1==a.length)return e=bt(a,!1),f=e.Pf,g=e.Lg,h=e.Ig,k=e.hg,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),R.u(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return R.return();q=bt(a,!0);p=q.Pf;u=q.Lg;x=q.Ig;w=q.hg;return C(R,Promise.all([ht(c,c.h,p,l,it,
860
- jt),ht(c,c.g,u,l,it,jt),ht(c,c.l,x,l,it,jt),ht(c,c.i,w,l,it,jt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=t(c.h),E=I.next();!E.done;E=I.next())for(H=E.value,K=t(c.g),M=K.next();!M.done;M=K.next())O=M.value,N=ai(H.drmInfos,O.drmInfos),H.drmInfos.length&&O.drmInfos.length&&!N.length||(U=z++,v.push({id:U,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H,video:O,bandwidth:(H.bandwidth||0)+(O.bandwidth||0),drmInfos:N,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
850
+ r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.zc,e=this.h.timeline[a],f=e.si,g=this.h.Kf+e.Lf;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},u=0;u<e.rb;p={Tc:p.Tc,te:p.te},u++){var x=e.start+q*u,w=x+q;p.te=u+1;p.Tc=null;x=new vi(this.i+x,this.i+w,function(z){return function(){if(!b.h)return[];
851
+ null==z.Tc&&(z.Tc=Vs(b.h.zc,b.F,f,b.B,g,z.te,b.C));return z.Tc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,wi,this.A);x.codecs=l;x.mimeType=m;0==this.G?0<u&&x.Zd():0!=u%this.G&&x.Zd();n.push(x)}c=new vi(this.i+e.start,k,function(){return 0<e.rb?[]:Vs(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,wi,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
852
+ function Vs(a,b,c,d,e,f,g){a=hs(a,b,c,f,d||null,e);return Ad(g(),[a]).map(function(h){return h.toString()})};function Ws(a){this.o=null;this.A=a;this.G=new bg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Ws.prototype.configure=function(a){this.o=a};Ws.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Ws.prototype.setManifestType=function(a){this.s=a};
853
+ function Xs(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Ad(a.i,[Ys(a,b)]),d=hg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),cg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=hd(f.data),h=JSON.parse(g),1==h.VERSION&&Zs(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){Xs(a,b)});a.g.X(a.C);G(l)})}
854
+ function Ys(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function Zs(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){Xs(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
855
+ function $s(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Ws.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
856
+ function at(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Pb:e.Pb},g=f.next())if(e.Pb=g.value,g=b.get(e.Pb))d.push({rf:e.Pb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Wi==k.Pb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Og?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Og),d.push({rf:e.Pb,location:h.toString()})):d.push({rf:e.Pb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
857
+ h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Ad(a.i,d)};function bt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=bt.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.Fh=function(){return this.j};r.We=function(){return this.l.slice()};r.oh=function(){return this.i};
858
+ function ct(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[dt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[et(n),n]})),l=new Map(h.textStreams.map(function(n){return[ft(n),n]}));h=new Map(h.imageStreams.map(function(n){return[gt(n),n]}));if(b){var m=ht(Id);l.set(ft(m),m);m=ht("image");h.set(gt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Qf:c,Mg:d,Jg:e,ig:f}}
859
+ r.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U;return L(function(R){if(1==R.g){d=Kd;if(!b&&1==a.length)return e=ct(a,!1),f=e.Qf,g=e.Mg,h=e.Jg,k=e.ig,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),R.u(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return R.return();q=ct(a,!0);p=q.Qf;u=q.Mg;x=q.Jg;w=q.ig;return C(R,Promise.all([it(c,c.h,p,l,jt,
860
+ kt),it(c,c.g,u,l,jt,kt),it(c,c.l,x,l,jt,kt),it(c,c.i,w,l,jt,kt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=t(c.h),E=I.next();!E.done;E=I.next())for(H=E.value,K=t(c.g),M=K.next();!M.done;M=K.next())O=M.value,N=ai(H.drmInfos,O.drmInfos),H.drmInfos.length&&O.drmInfos.length&&!N.length||(U=z++,v.push({id:U,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H,video:O,bandwidth:(H.bandwidth||0)+(O.bandwidth||0),drmInfos:N,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
861
861
  else for(B=c.g.length?c.g:c.h,A=t(B),D=A.next();!D.done;D=A.next())F=D.value,J=z++,v.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==d.S?F:null,video:F.type==d.fa?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=v;G(R)})};
862
- function kt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N;return L(function(U){switch(U.g){case 1:b=Kd;if(1==a.length)return U.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.S}).map(function(V){return[ct(V),V]}))});d=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.fa}).map(function(V){return[dt(V),V]}))});e=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.ma}).map(function(V){return[et(V),V]}))});
863
- f=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.ue}).map(function(V){return[ft(V),V]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=lt(b.ma),k.set(et(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=lt(b.ue),q.set(ft(p),p);u=new at;return C(U,ht(u,[],c,0,mt,nt),2);case 2:return x=U.h,C(U,ht(u,[],d,0,mt,nt),3);case 3:return w=U.h,C(U,ht(u,[],e,0,mt,nt),4);case 4:return z=U.h,C(U,ht(u,[],f,0,mt,nt),5);case 5:v=U.h;B=0;if(w.length&&x.length)for(I=t(x),E=
862
+ function lt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N;return L(function(U){switch(U.g){case 1:b=Kd;if(1==a.length)return U.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.S}).map(function(V){return[dt(V),V]}))});d=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.fa}).map(function(V){return[et(V),V]}))});e=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.ma}).map(function(V){return[ft(V),V]}))});
863
+ f=a.map(function(R){return new Map(R.filter(function(V){return V.type===b.ve}).map(function(V){return[gt(V),V]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=mt(b.ma),k.set(ft(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=mt(b.ve),q.set(gt(p),p);u=new bt;return C(U,it(u,[],c,0,nt,ot),2);case 2:return x=U.h,C(U,it(u,[],d,0,nt,ot),3);case 3:return w=U.h,C(U,it(u,[],e,0,nt,ot),4);case 4:return z=U.h,C(U,it(u,[],f,0,nt,ot),5);case 5:v=U.h;B=0;if(w.length&&x.length)for(I=t(x),E=
864
864
  I.next();!E.done;E=I.next())for(H=E.value,K=t(w),M=K.next();!M.done;M=K.next())O=M.value,N=B++,O.variantIds.push(N),H.variantIds.push(N);else for(A=w.concat(x),D=t(A),F=D.next();!F.done;F=D.next())J=F.value,J.variantIds=[B++];return U.return(w.concat(x).concat(z).concat(v))}})}
865
- function ht(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){switch(E.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=t(b);m=l.next();case 2:if(m.done){E.u(4);break}n=m.value;return C(E,ot(a,n,c,d,f,g),5);case 5:q=E.h;if(!q)throw new Q(2,4,4037);m=l.next();E.u(2);break;case 4:p=t(g);for(u=p.next();!u.done;u=p.next())for(x=u.value,w=t(x),z=w.next();!z.done;z=w.next())v=z.value,(B=pt(a,v,c,e,f,g))&&b.push(B);A=t(g);for(u=
866
- A.next();!u.done;u=A.next())for(D=u.value,F={},J=t(D),z=J.next();!z.done;F={Bd:F.Bd},z=J.next())if(F.Bd=z.value,!qt(F.Bd)&&(I=b.some(function(H){return function(K){return rt(a,H.Bd,K)}}(F))))throw new Q(2,4,4037);return E.return(b)}})}function ot(a,b,c,d,e,f){return L(function(g){if(1==g.g)return st(a,c,b),b.matchedStreams?b.segmentIndex?C(g,tt(b,d),2):g.u(2):g.return(!1);ut(b,d,e,f);return g.return(!0)})}
867
- function tt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Gk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);G(l)})}
868
- function pt(a,b,c,d,e,f){if(qt(b))return null;var g=d(b);st(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return L(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Gk;return C(h,tt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;ut(g,0,e,f);return g}
869
- function ut(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==ue(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=t(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
870
- function it(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
871
- function mt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
872
- function jt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=ai(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new Q(2,4,4038);a.drmInfos=
873
- d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=it(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),jt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&jt(a.trickModeVideo,
874
- b)}function nt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
875
- function st(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=vt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
876
- function vt(a,b,c){var d={audio:ct,video:dt,text:et,image:ft}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return rt(a,l,m)},video:function(l,m){return rt(a,l,m)},text:wt,image:xt}[c.type];for(var g={audio:yt,video:zt,text:At,image:Bt}[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.o&&!qt(e)&&b.delete(d(e));return e}
877
- function Ct(a,b){function c(d){if(!Dt.has(d)){var e=Td(d);Dt.set(d,e)}return Dt.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}r.yg=function(a){this.m=a};r.Fg=function(a){this.o=a};function rt(a,b,c){return!Ct(b,c)&&!a.m||b.drmInfos&&!$h(b.drmInfos,c.drmInfos)?!1:!0}function wt(a,b){return b.language?a.forced!==b.forced||0==ue(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function xt(){return!0}
878
- function yt(a,b,c){var d=Ct(a,b),e=Ct(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ue(a.language,b.language);e=ue(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)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
879
- if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Et(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ft)return!0;if(d==Gt)return!1;d=Et(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ft?!0:d==Gt?!1:a.bandwidth&&Ht(a.bandwidth,b.bandwidth,c.bandwidth)==Ft?!0:!1}
880
- function zt(a,b,c){var d=Ct(a,b),e=Ct(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Et(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ft)return!0;if(d==Gt)return!1;if(a.frameRate){d=Et(a.frameRate,b.frameRate,c.frameRate);if(d==Ft)return!0;if(d==Gt)return!1}return a.bandwidth&&Ht(a.bandwidth,b.bandwidth,c.bandwidth)==Ft?!0:!1}
881
- function At(a,b,c){var d=ue(a.language,b.language),e=ue(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
882
- 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 Bt(a,b,c){return Et(a.width*a.height,b.width*b.height,c.width*c.height)==Ft?!0:!1}
883
- function lt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
884
- function gt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
885
- function Et(a,b,c){if(b==a&&a!=c)return Gt;if(c==a&&a!=b)return Ft;if(b>a){if(c<=a||c-a<b-a)return Ft;if(c-a>b-a)return Gt}else{if(c>a)return Gt;if(a-c<a-b)return Ft;if(a-c>a-b)return Gt}return It}function Ht(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ft:b<a?Gt:It}function qt(a){switch(a.type){case Id:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
886
- function dt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function ct(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function et(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
887
- function ft(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",at);at.prototype.setUseStreamOnce=at.prototype.Fg;at.prototype.setAllowMultiTypeVariants=at.prototype.yg;at.prototype.combinePeriods=at.prototype.Sf;at.prototype.getImageStreams=at.prototype.nh;at.prototype.getTextStreams=at.prototype.Ve;at.prototype.getVariants=at.prototype.Eh;var Ft=1,It=0,Gt=-1,Dt=new Map;function Jt(a,b){var c=new DOMParser,d=Kt.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Lt(a,b){try{var c=md(a);return Jt(c,b)}catch(d){return null}}
888
- var Kt=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Mt(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.L={};this.l=new at;this.G=0;this.H=new Qa(5);this.A=new Mc(function(){Nt(a)});this.F=new bg;this.B=null;this.K=[];this.C=Infinity;this.s=!1;this.h=null}r=Mt.prototype;
889
- r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.jc();this.h&&this.h.configure(this.g);this.l&&(this.l.yg(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Fg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,Ot(c),2);d=e.h;c.i&&Pt(c,d);if(!c.i)throw new Q(2,7,7001);return e.return(c.j)})};
890
- r.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Ot(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);G(c)})};
891
- r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Gb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,Pt(this,0))}}};r.banLocation=function(a){this.h&&this.h.banLocation(a)};
892
- function Ot(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=$s(a.h,"Location",!0),c.length&&(b=c)),d=hg(b,a.g.retryParameters),e=Date.now(),C(k,Qt(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,Rt(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
893
- function Rt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(u){if(1==u.g){d=b;e=a.g.dash.manifestPreprocessor;f=$l;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Lt(d,"MPD");if(!g)throw new Q(2,4,4001,c);e(g);d=nd(g.outerHTML)}h=Og(d,"MPD");if(!h)throw new Q(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=am;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return u.return(St(a,h,c));n=a.g.dash.xlinkFailGracefully;
894
- q=ms(h,a.g.retryParameters,n,c,a.i.networkingEngine);cg(a.F,q);return C(u,q.promise,2)}p=u.h;return u.return(St(a,p,c))})}
895
- function St(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,db,Fa,Va,ua,kb,yb,hb,Za,$e,wd,Yd,id,Bc,Zd,af,$d,xd,ri,sg,si,ti,bf,ae,cf;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Vg(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Xg(l))q=Ad(d,[n])[0],m&&(a.h?Zs(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=$s(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);u=Promise.resolve();
896
- if((x=Zg(b,"ContentSteering"))&&a.i){w=x.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Vs(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,z=Xg(x))(v=bh(x,"queryBeforeStart",lh,!1))?u=Ws(a.h,z):Ws(a.h,z);B=t(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,F=f.get(D),Zs(a.h,"Location",D,F)}J=Vg(b,"BaseURL");E=!1;if(a.h)for(H=t(J),K=H.next();!K.done;K=H.next())M=K.value,O=M.attributes.serviceLocation,N=Xg(M),O&&N&&(Zs(a.h,"BaseURL",O,N),E=!0);E&&a.h||
897
- (U=J.map(Xg),I=Ad(d,U));R=function(){return a.h&&E?$s(a.h,"BaseURL"):I?I:[]};V=0;J&&J.length&&(V=bh(J[0],"availabilityTimeOffset",kh)||0);xa=a.g.dash.ignoreMinBufferTime;Ca=0;xa||(Ca=bh(b,"minBufferTime",fh)||0);a.G=bh(b,"minimumUpdatePeriod",fh,-1);db=bh(b,"availabilityStartTime",eh);Fa=bh(b,"timeShiftBufferDepth",fh);Va=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Va||(ua=bh(b,"suggestedPresentationDelay",fh));kb=a.g.dash.ignoreMaxSegmentDuration;yb=null;kb||(yb=bh(b,"maxSegmentDuration",fh));
898
- hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,$e=t(Object.values(a.m)),wd=$e.next();!wd.done;wd=$e.next())Yd=wd.value,Yd.segmentIndex&&Yd.segmentIndex.La(Za.qb());else id=a.g.defaultPresentationDelay||1.5*Ca,Bc=null!=ua?ua:id,Za=new hk(db,Bc,a.g.dash.autoCorrectDrift);Za.Ec("static"==hb);(Zd=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);Za.je(Fa);af=b.attributes.profiles||"";$d={Eb:"static"!=hb,presentationTimeline:Za,
899
- za:null,ha:null,ua:null,J:null,bandwidth:0,ig:!1,qc:V,profiles:af.split(",")};xd=Tt(a,$d,R,b);ri=xd.duration;sg=xd.periods;"static"!=hb&&xd.Xf||Za.Za(ri||Infinity);a.C&&!a.s&&(si=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?Za.zg(a.C):a.C&&Wa("Low-latency DASH 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.");Za.hf(yb||1);
900
- return C(Sb,a.l.Sf(sg,$d.Eb),2);case 2:return C(Sb,u,3);case 3:a.s&&(Ca=0,ti=null!=ua?ua:a.g.defaultPresentationDelay,Za.Bf(ti));if(a.j){a.j.variants=a.l.j;bf=a.l.Ve();0<bf.length&&(a.j.textStreams=bf);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:Za,variants:a.l.j,textStreams:a.l.Ve(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Ut(b)};if(!Za.Kg()){Sb.u(5);
901
- break}ae=Vg(b,"UTCTiming");return C(Sb,gu(a,R,ae),6);case 6:cf=Sb.h;if(!a.i)return Sb.return();Za.Ag(cf);case 5:Za.Xd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),G(Sb)}})}
902
- function Ut(a){var b=Zg(a,"ServiceDescription");if(!b)return null;a=Zg(b,"Latency");b=Zg(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
903
- function Tt(a,b,c,d){var e=bh(d,"mediaPresentationDuration",fh),f=[],g=0;d=Vg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bh(k,"start",fh,g),n=k.attributes.id,q=bh(k,"duration",fh),p=null;if(l){var u=bh(l,"start",fh);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=hu(a,b,c,{start:m,duration:p,node:k,Ye:null==p||!l});f.push(g);b.za.id&&p&&(a.L[b.za.id]=p);if(null==
904
- p){g=null;break}g=m+p}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Xf:!1}:{periods:f,duration:g,Xf:!0}}
905
- function hu(a,b,c,d){b.za=iu(a,d.node,null,c);b.ha=d;b.za.qc=b.qc;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Vg(d.node,"EventStream");c=b.presentationTimeline.qb();e=t(e);for(var f=e.next();!f.done;f=e.next())ju(a,d.start,d.duration,f.value,c);c=Vg(d.node,"AdaptationSet").map(function(m){return ku(a,b,m)}).filter(ne);if(b.Eb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.ki);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new Q(2,4,4018);
906
- }d=c.filter(function(m){return!m.If});c=c.filter(function(m){return m.If});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.If.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Td(m.Cd.codecs)==Td(n.codecs)}}(h))}}}c=lu(a.g.disableAudio,d,"audio");e=lu(a.g.disableVideo,d,"video");f=lu(a.g.disableText,
907
- d,Id);d=lu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new Q(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function lu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
908
- function ku(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=iu(a,c,b.za,null);var e=!1,f=Vg(c,"Role"),g=f.map(function(E){return E.attributes.value}).filter(ne),h=void 0,k=b.ua.contentType==Id;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
865
+ function it(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){switch(E.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=t(b);m=l.next();case 2:if(m.done){E.u(4);break}n=m.value;return C(E,pt(a,n,c,d,f,g),5);case 5:q=E.h;if(!q)throw new Q(2,4,4037);m=l.next();E.u(2);break;case 4:p=t(g);for(u=p.next();!u.done;u=p.next())for(x=u.value,w=t(x),z=w.next();!z.done;z=w.next())v=z.value,(B=qt(a,v,c,e,f,g))&&b.push(B);A=t(g);for(u=
866
+ A.next();!u.done;u=A.next())for(D=u.value,F={},J=t(D),z=J.next();!z.done;F={Bd:F.Bd},z=J.next())if(F.Bd=z.value,!rt(F.Bd)&&(I=b.some(function(H){return function(K){return st(a,H.Bd,K)}}(F))))throw new Q(2,4,4037);return E.return(b)}})}function pt(a,b,c,d,e,f){return L(function(g){if(1==g.g)return tt(a,c,b),b.matchedStreams?b.segmentIndex?C(g,ut(b,d),2):g.u(2):g.return(!1);vt(b,d,e,f);return g.return(!0)})}
867
+ function ut(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Gk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);G(l)})}
868
+ function qt(a,b,c,d,e,f){if(rt(b))return null;var g=d(b);tt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return L(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Gk;return C(h,ut(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;vt(g,0,e,f);return g}
869
+ function vt(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==ue(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=t(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
870
+ function jt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
871
+ function nt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
872
+ function kt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=ai(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new Q(2,4,4038);a.drmInfos=
873
+ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=jt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),kt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&kt(a.trickModeVideo,
874
+ b)}function ot(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
875
+ function tt(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=wt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
876
+ function wt(a,b,c){var d={audio:dt,video:et,text:ft,image:gt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return st(a,l,m)},video:function(l,m){return st(a,l,m)},text:xt,image:yt}[c.type];for(var g={audio:zt,video:At,text:Bt,image:Ct}[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.o&&!rt(e)&&b.delete(d(e));return e}
877
+ function Dt(a,b){function c(d){if(!Et.has(d)){var e=Td(d);Et.set(d,e)}return Et.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}r.zg=function(a){this.m=a};r.Gg=function(a){this.o=a};function st(a,b,c){return!Dt(b,c)&&!a.m||b.drmInfos&&!$h(b.drmInfos,c.drmInfos)?!1:!0}function xt(a,b){return b.language?a.forced!==b.forced||0==ue(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function yt(){return!0}
878
+ function zt(a,b,c){var d=Dt(a,b),e=Dt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ue(a.language,b.language);e=ue(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)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
879
+ if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Ft(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Gt)return!0;if(d==Ht)return!1;d=Ft(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Gt?!0:d==Ht?!1:a.bandwidth&&It(a.bandwidth,b.bandwidth,c.bandwidth)==Gt?!0:!1}
880
+ function At(a,b,c){var d=Dt(a,b),e=Dt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ft(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Gt)return!0;if(d==Ht)return!1;if(a.frameRate){d=Ft(a.frameRate,b.frameRate,c.frameRate);if(d==Gt)return!0;if(d==Ht)return!1}return a.bandwidth&&It(a.bandwidth,b.bandwidth,c.bandwidth)==Gt?!0:!1}
881
+ function Bt(a,b,c){var d=ue(a.language,b.language),e=ue(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
882
+ 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 Ct(a,b,c){return Ft(a.width*a.height,b.width*b.height,c.width*c.height)==Gt?!0:!1}
883
+ function mt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
884
+ function ht(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
885
+ function Ft(a,b,c){if(b==a&&a!=c)return Ht;if(c==a&&a!=b)return Gt;if(b>a){if(c<=a||c-a<b-a)return Gt;if(c-a>b-a)return Ht}else{if(c>a)return Ht;if(a-c<a-b)return Gt;if(a-c>a-b)return Ht}return Jt}function It(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Gt:b<a?Ht:Jt}function rt(a){switch(a.type){case Id:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
886
+ function et(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function dt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function ft(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
887
+ function gt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",bt);bt.prototype.setUseStreamOnce=bt.prototype.Gg;bt.prototype.setAllowMultiTypeVariants=bt.prototype.zg;bt.prototype.combinePeriods=bt.prototype.Tf;bt.prototype.getImageStreams=bt.prototype.oh;bt.prototype.getTextStreams=bt.prototype.We;bt.prototype.getVariants=bt.prototype.Fh;var Gt=1,Jt=0,Ht=-1,Et=new Map;function Kt(a,b){var c=new DOMParser,d=Lt.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Mt(a,b){try{var c=md(a);return Kt(c,b)}catch(d){return null}}
888
+ var Lt=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Nt(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.L={};this.l=new bt;this.G=0;this.H=new Qa(5);this.A=new Mc(function(){Ot(a)});this.F=new bg;this.B=null;this.K=[];this.C=Infinity;this.s=!1;this.h=null}r=Nt.prototype;
889
+ r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.kc();this.h&&this.h.configure(this.g);this.l&&(this.l.zg(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Gg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,Pt(c),2);d=e.h;c.i&&Qt(c,d);if(!c.i)throw new Q(2,7,7001);return e.return(c.j)})};
890
+ r.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Pt(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);G(c)})};
891
+ r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Gb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,Qt(this,0))}}};r.banLocation=function(a){this.h&&this.h.banLocation(a)};
892
+ function Pt(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=at(a.h,"Location",!0),c.length&&(b=c)),d=hg(b,a.g.retryParameters),e=Date.now(),C(k,Rt(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,St(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
893
+ function St(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(u){if(1==u.g){d=b;e=a.g.dash.manifestPreprocessor;f=am;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Mt(d,"MPD");if(!g)throw new Q(2,4,4001,c);e(g);d=nd(g.outerHTML)}h=Og(d,"MPD");if(!h)throw new Q(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=bm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return u.return(Tt(a,h,c));n=a.g.dash.xlinkFailGracefully;
894
+ q=ns(h,a.g.retryParameters,n,c,a.i.networkingEngine);cg(a.F,q);return C(u,q.promise,2)}p=u.h;return u.return(Tt(a,p,c))})}
895
+ function Tt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va,ua,kb,yb,hb,Za,$e,xd,Zd,jd,Bc,$d,af,ae,yd,ri,sg,si,ti,bf,be,cf;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Vg(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Xg(l))q=Ad(d,[n])[0],m&&(a.h?$s(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=at(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);u=Promise.resolve();
896
+ if((x=Zg(b,"ContentSteering"))&&a.i){w=x.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Ws(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,z=Xg(x))(v=bh(x,"queryBeforeStart",lh,!1))?u=Xs(a.h,z):Xs(a.h,z);B=t(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,F=f.get(D),$s(a.h,"Location",D,F)}J=Vg(b,"BaseURL");E=!1;if(a.h)for(H=t(J),K=H.next();!K.done;K=H.next())M=K.value,O=M.attributes.serviceLocation,N=Xg(M),O&&N&&($s(a.h,"BaseURL",O,N),E=!0);E&&a.h||
897
+ (U=J.map(Xg),I=Ad(d,U));R=function(){return a.h&&E?at(a.h,"BaseURL"):I?I:[]};V=0;J&&J.length&&(V=bh(J[0],"availabilityTimeOffset",kh)||0);xa=a.g.dash.ignoreMinBufferTime;Ca=0;xa||(Ca=bh(b,"minBufferTime",fh)||0);a.G=bh(b,"minimumUpdatePeriod",fh,-1);eb=bh(b,"availabilityStartTime",eh);Fa=bh(b,"timeShiftBufferDepth",fh);Va=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Va||(ua=bh(b,"suggestedPresentationDelay",fh));kb=a.g.dash.ignoreMaxSegmentDuration;yb=null;kb||(yb=bh(b,"maxSegmentDuration",fh));
898
+ hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,$e=t(Object.values(a.m)),xd=$e.next();!xd.done;xd=$e.next())Zd=xd.value,Zd.segmentIndex&&Zd.segmentIndex.La(Za.qb());else jd=a.g.defaultPresentationDelay||1.5*Ca,Bc=null!=ua?ua:jd,Za=new hk(eb,Bc,a.g.dash.autoCorrectDrift);Za.Ec("static"==hb);($d=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);Za.ke(Fa);af=b.attributes.profiles||"";ae={Eb:"static"!=hb,presentationTimeline:Za,
899
+ za:null,ha:null,ua:null,J:null,bandwidth:0,jg:!1,Qb:V,profiles:af.split(",")};yd=Ut(a,ae,R,b);ri=yd.duration;sg=yd.periods;"static"!=hb&&yd.Yf||Za.$a(ri||Infinity);a.C&&!a.s&&(si=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?Za.Ag(a.C):a.C&&Wa("Low-latency DASH 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.");Za.hf(yb||1);
900
+ return C(Sb,a.l.Tf(sg,ae.Eb),2);case 2:return C(Sb,u,3);case 3:a.s&&(Ca=0,ti=null!=ua?ua:a.g.defaultPresentationDelay,Za.Cf(ti));if(a.j){a.j.variants=a.l.j;bf=a.l.We();0<bf.length&&(a.j.textStreams=bf);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:Za,variants:a.l.j,textStreams:a.l.We(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Vt(b)};if(!Za.Lg()){Sb.u(5);
901
+ break}be=Vg(b,"UTCTiming");return C(Sb,Wt(a,R,be),6);case 6:cf=Sb.h;if(!a.i)return Sb.return();Za.Bg(cf);case 5:Za.Xd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),G(Sb)}})}
902
+ function Vt(a){var b=Zg(a,"ServiceDescription");if(!b)return null;a=Zg(b,"Latency");b=Zg(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
903
+ function Ut(a,b,c,d){var e=bh(d,"mediaPresentationDuration",fh),f=[],g=0;d=Vg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bh(k,"start",fh,g),n=k.attributes.id,q=bh(k,"duration",fh),p=null;if(l){var u=bh(l,"start",fh);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=iu(a,b,c,{start:m,duration:p,node:k,Ze:null==p||!l});f.push(g);b.za.id&&p&&(a.L[b.za.id]=p);if(null==
904
+ p){g=null;break}g=m+p}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Yf:!1}:{periods:f,duration:g,Yf:!0}}
905
+ function iu(a,b,c,d){b.za=ju(a,d.node,null,c);b.ha=d;b.za.Qb=b.Qb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Vg(d.node,"EventStream");c=b.presentationTimeline.qb();e=t(e);for(var f=e.next();!f.done;f=e.next())ku(a,d.start,d.duration,f.value,c);c=Vg(d.node,"AdaptationSet").map(function(m){return lu(a,b,m)}).filter(ne);if(b.Eb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.li);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new Q(2,4,4018);
906
+ }d=c.filter(function(m){return!m.Jf});c=c.filter(function(m){return m.Jf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Jf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Td(m.Cd.codecs)==Td(n.codecs)}}(h))}}}c=mu(a.g.disableAudio,d,"audio");e=mu(a.g.disableVideo,d,"video");f=mu(a.g.disableText,
907
+ d,Id);d=mu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new Q(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function mu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
908
+ function lu(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=ju(a,c,b.za,null);var e=!1,f=Vg(c,"Role"),g=f.map(function(E){return E.attributes.value}).filter(ne),h=void 0,k=b.ua.contentType==Id;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
909
909
  l}}var n;m=Vg(c,"EssentialProperty");f=null;var q=!1;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var u=p.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==u?f=p.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u?n=d(parseInt(p.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=u&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=u&&("urn:mpeg:dash:ssr:2023"==u?q=!0:l=!0)}var x=null;m=Vg(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=
910
910
  p.value,u=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==u?x=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u&&(n=d(parseInt(p.attributes.value,10)));m=Vg(c,"Accessibility");var w=new Map,z;m=t(m);for(p=m.next();!p.done;p=m.next())if(u=p.value,p=u.attributes.schemeIdUri,u=u.attributes.value,"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=u){u=u.split(";");for(var v=t(u),B=v.next();!B.done;B=v.next()){var A=B.value,D=B=void 0;A.includes("=")?
911
911
  (A=A.split("="),B=A[0].startsWith("CC")?A[0]:"CC"+A[0],D=A[1]||"und"):(B="CC"+p,2==u.length?p+=2:p++,D=A);w.set(B,qe(D))}}else w.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=u)for(u=t(u.split(";")),B=u.next();!B.done;B=u.next())B=B.value,A=v=void 0,B.includes("=")?(B=B.split("="),v="svc"+B[0],A=B[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,A=B),w.set(v,qe(A));else w.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=u&&(g.push(u),"captions"==u&&(h="caption")):
912
- "urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==u?z="visually impaired":"2"==u&&(z="hard of hearing"));if(l)return null;l=Vg(c,"ContentProtection");var F=Wr(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=qe(b.ua.language||"und"),I=c.attributes.label;(l=Vg(c,"Label"))&&l.length&&(l=Wg(l[0]))&&(I=l);l=Vg(c,"Representation");c=l.map(function(E){if(E=mu(a,b,F,h,J,I,e,g,w,E,z,x))E.hdr=E.hdr||n,E.fastSwitching=q;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ua.contentType;
913
- if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new Q(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=nu(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.ua.contentType;k=b.ua.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(F.drmInfos);for(v=u.next();!v.done;v=u.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
914
- (p.groupId=k)}l=l.map(function(E){return E.attributes.id}).filter(ne);return{id:k,contentType:b.ua.contentType,language:J,Dj:e,streams:c,drmInfos:F.drmInfos,If:f,ki:l}}
915
- function mu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=iu(a,l,b.ua,null);a.C=Math.min(a.C,b.J.qc);if(!ou(b.J))return null;var q=b.ha.start;b.bandwidth=bh(l,"bandwidth",ih)||0;var p=b.J.contentType,u=p==Id||"application"==p;p="image"==p;try{var x=void 0;if(c.xe){var w=b.J.nb,z=Ad(w(),[c.xe.Rh]),v=hg(z,a.g.retryParameters);x={bitsKey:128,blockCipherMode:"CBC",iv:c.xe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var E,H,K;return L(function(M){if(1==M.g)return C(M,Qt(a,v,6),2);if(3!=M.g){E=M.h;if(!E.data||16!=
916
- E.data.byteLength)throw new Q(2,4,4049);H={name:"AES-CBC"};K=x;return C(M,window.crypto.subtle.importKey("raw",E.data,H,!0,["decrypt"]),3)}K.cryptoKey=M.h;x.fetchKey=void 0;G(M)})}}}w=function(E,H,K,M){return pu(a,E,H,K,M)};if(b.J.pd)var B=zs(b,w,x);else if(b.J.Jb)B=Fs(b,a.m,x);else if(b.J.qd)B=Ks(b,w,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.L,x,n);else{var A=b.ha.duration||0,D=b.J.nb;B={vc:function(){var E=Fk(q,A,D());E.tc(function(H){H.mimeType=b.J.mimeType;H.codecs=b.J.codecs});return Promise.resolve(E)}}}}catch(E){if((u||
917
- p)&&4002==E.code)return null;throw E;}n=Vg(l,"ContentProtection");n=$r(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;Vg(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.attributes.schemeIdUri&&"JOC"==E.attributes.value})&&(w=!0);z=!1;u&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(p&&((l=Vg(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.attributes.schemeIdUri)}))&&
912
+ "urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==u?z="visually impaired":"2"==u&&(z="hard of hearing"));if(l)return null;l=Vg(c,"ContentProtection");var F=Xr(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=qe(b.ua.language||"und"),I=c.attributes.label;(l=Vg(c,"Label"))&&l.length&&(l=Wg(l[0]))&&(I=l);l=Vg(c,"Representation");c=l.map(function(E){if(E=nu(a,b,F,h,J,I,e,g,w,E,z,x))E.hdr=E.hdr||n,E.fastSwitching=q;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ua.contentType;
913
+ if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new Q(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=ou(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.ua.contentType;k=b.ua.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(F.drmInfos);for(v=u.next();!v.done;v=u.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
914
+ (p.groupId=k)}l=l.map(function(E){return E.attributes.id}).filter(ne);return{id:k,contentType:b.ua.contentType,language:J,Ej:e,streams:c,drmInfos:F.drmInfos,Jf:f,li:l}}
915
+ function nu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=ju(a,l,b.ua,null);a.C=Math.min(a.C,b.J.Qb);if(!pu(b.J))return null;var q=b.ha.start;b.bandwidth=bh(l,"bandwidth",ih)||0;var p=b.J.contentType,u=p==Id||"application"==p;p="image"==p;try{var x=void 0;if(c.ye){var w=b.J.nb,z=Ad(w(),[c.ye.Sh]),v=hg(z,a.g.retryParameters);x={bitsKey:128,blockCipherMode:"CBC",iv:c.ye.iv,firstMediaSequenceNumber:0,fetchKey:function(){var E,H,K;return L(function(M){if(1==M.g)return C(M,Rt(a,v,6),2);if(3!=M.g){E=M.h;if(!E.data||16!=
916
+ E.data.byteLength)throw new Q(2,4,4049);H={name:"AES-CBC"};K=x;return C(M,window.crypto.subtle.importKey("raw",E.data,H,!0,["decrypt"]),3)}K.cryptoKey=M.h;x.fetchKey=void 0;G(M)})}}}w=function(E,H,K,M){return qu(a,E,H,K,M)};if(b.J.pd)var B=As(b,w,x);else if(b.J.Jb)B=Gs(b,a.m,x);else if(b.J.qd)B=Ls(b,w,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.L,x,n);else{var A=b.ha.duration||0,D=b.J.nb;B={vc:function(){var E=Fk(q,A,D());E.tc(function(H){H.mimeType=b.J.mimeType;H.codecs=b.J.codecs});return Promise.resolve(E)}}}}catch(E){if((u||
917
+ p)&&4002==E.code)return null;throw E;}n=Vg(l,"ContentProtection");n=as(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;Vg(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.attributes.schemeIdUri&&"JOC"==E.attributes.value})&&(w=!0);z=!1;u&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(p&&((l=Vg(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.attributes.schemeIdUri)}))&&
918
918
  (F=l.attributes.value),!F))return null;var J;l=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");u=b.J.id?b.za.id+","+b.J.id:"";var I=u&&a.m[u]?a.m[u]:{id:a.I++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,
919
- frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.de,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,
919
+ frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.ee,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,
920
920
  fastSwitching:!1,fullMimeTypes:new Set([Md(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var E;return L(function(H){if(1==H.g){if(I.segmentIndex)return H.u(0);E=I;return C(H,B.vc(),3)}E.segmentIndex=H.h;G(H)})};u&&b.Eb&&!a.m[u]&&(a.m[u]=I);return I}
921
- function Nt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,Ot(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Pt(a,b);G(d)}})}function Pt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.W(Math.max(c-b,Ra(a.H)))}}
922
- function iu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,de:null,audioSamplingRate:null,qc:0,xf:0};d=d||c.nb;var e=b.attributes.id,f=Vg(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=Xg(m);l&&m&&(Zs(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Xg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=bh(b,"frameRate",
923
- mh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=qu(Vg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=Vg(b,"AudioChannelConfiguration");u=ru(u)||c.de;var x=bh(b,"audioSamplingRate",jh)||c.audioSamplingRate;k||(k=nu(l,m));var w=Zg(b,"SegmentBase"),z=Zg(b,"SegmentTemplate"),v=w?bh(w,"availabilityTimeOffset",kh)||0:0,B=z?bh(z,"availabilityTimeOffset",kh)||0:0,A=f&&f.length?bh(f[0],"availabilityTimeOffset",kh)||0:0;v=c.qc+A+v+B;B=null;(A=Zg(b,"SegmentSequenceProperties"))&&(A=Zg(A,"SAP"))&&(B=
924
- bh(A,"cadence",hh));return{nb:function(){return Ad(d(),f.length?a.h&&h?$s(a.h,e):g?g:[]:[])},pd:w||c.pd,Jb:Zg(b,"SegmentList")||c.Jb,qd:z||c.qd,width:bh(b,"width",jh)||c.width,height:bh(b,"height",jh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,de:u,audioSamplingRate:x,qc:v,xf:B||c.xf}}
925
- function qu(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
926
- function ru(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
927
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function ou(a){var b=a.pd?1:0;b+=a.Jb?1:0;b+=a.qd?1:0;if(0==b)return a.contentType==Id||"application"==a.contentType?!0:!1;1!=b&&(a.pd&&(a.Jb=null),a.qd=null);return!0}
928
- function su(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[qd(c)],f=Ad(b(),e),g=hg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),cg(a.F,h),C(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=hd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
929
- function gu(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
930
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return C(n,su(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,su(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
921
+ function Ot(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,Pt(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Qt(a,b);G(d)}})}function Qt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.X(Math.max(c-b,Ra(a.H)))}}
922
+ function ju(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ee:null,audioSamplingRate:null,Qb:0,yf:0};d=d||c.nb;var e=b.attributes.id,f=Vg(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=Xg(m);l&&m&&($s(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Xg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=bh(b,"frameRate",
923
+ mh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=ru(Vg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=Vg(b,"AudioChannelConfiguration");u=su(u)||c.ee;var x=bh(b,"audioSamplingRate",jh)||c.audioSamplingRate;k||(k=ou(l,m));var w=Zg(b,"SegmentBase"),z=Zg(b,"SegmentTemplate"),v=w?bh(w,"availabilityTimeOffset",kh)||0:0,B=z?bh(z,"availabilityTimeOffset",kh)||0:0,A=f&&f.length?bh(f[0],"availabilityTimeOffset",kh)||0:0;v=c.Qb+A+v+B;B=null;(A=Zg(b,"SegmentSequenceProperties"))&&(A=Zg(A,"SAP"))&&(B=
924
+ bh(A,"cadence",hh));return{nb:function(){return Ad(d(),f.length?a.h&&h?at(a.h,e):g?g:[]:[])},pd:w||c.pd,Jb:Zg(b,"SegmentList")||c.Jb,qd:z||c.qd,width:bh(b,"width",jh)||c.width,height:bh(b,"height",jh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,ee:u,audioSamplingRate:x,Qb:v,yf:B||c.yf}}
925
+ function ru(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
926
+ function su(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
927
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function pu(a){var b=a.pd?1:0;b+=a.Jb?1:0;b+=a.qd?1:0;if(0==b)return a.contentType==Id||"application"==a.contentType?!0:!1;1!=b&&(a.pd&&(a.Jb=null),a.qd=null);return!0}
928
+ function tu(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[qd(c)],f=Ad(b(),e),g=hg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),cg(a.F,h),C(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=hd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
929
+ function Wt(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
930
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return C(n,tu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,tu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
931
931
  3);break;case 5:va(n);case 3:g=f.next();n.u(2);break;case 4:return Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
932
- function ju(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=bh(d,"timescale",jh)||1;d=t(Vg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bh(k,"presentationTime",jh)||0,m=bh(k,"duration",jh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:nh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
933
- function pu(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=ng,g=e?0:1,h=gl(b,c,d,a.g.retryParameters),C(l,Qt(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function nu(a,b){b=Md(a,b);return de(b)?Id:a.split("/")[0]}function Qt(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);cg(a.F,b);return b.promise}P("shaka.dash.DashParser",Mt);li["application/dash+xml"]=function(){return new Mt};li["video/vnd.mpeg.dash.mpd"]=function(){return new Mt};function tu(){}P("shaka.dependencies",tu);tu.has=function(a){return uu.has(a)};tu.add=function(a,b){if(!vu[a])throw Error(a+" is not supported");a==wu?pb("mux.js","mux.js is no longer used in Shaka Player."):uu.set(a,function(){return b})};var wu="muxjs",vu={Ej:wu,ISOBoxer:"ISOBoxer"};tu.Allowed=vu;var uu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function xu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function yu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}yu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
934
- function zu(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Au(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Au(a,b))?a.value:c||null}function Bu(a,b){a=Au(a,b);if(!a)throw new Q(2,4,4023,b);return a.value}function Cu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.rb=c}function Du(a,b){this.name=a;this.value=b};function Eu(a,b){return a.filter(function(c){return c.name==b})}function Fu(a,b){return a.filter(function(c){return Bu(c,"TYPE")==b})}function Gu(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 Hu(a,b,c){c=void 0===c?0:c;return(a=Gu(a,b))?Number(a.value):c}function Iu(a,b,c){return b?Ju(a,[b],c):[]}
935
- function Ju(a,b,c){if(!b.length)return[];b=Ad(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new Q(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Ku(a){this.h=a||"";this.g=0}function Lu(a){Mu(a,/[ \t]+/gm)}function Mu(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Nu(a){return a.g==a.h.length?null:(a=Mu(a,/[^ \t\n]*/gm))?a[0]:null};function Ou(){this.g=0}
936
- function Pu(a,b){b=hd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new Q(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Qu(a,f),--a.g,Ru.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Qu(a,g);if(Su.includes(g.name)){if(1!=b)throw new Q(2,4,4017);g=
937
- c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Qu(a,k),Ru.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Cu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Cu("",d,f)));return new xu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
938
- g.name&&(g.attributes.push(new Du("URI",h)),d=!0)}}return new xu(b,e)}function Qu(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new Q(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Ku(d);var f;(f=Mu(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Mu(d,g);)c.push(new Du(f[1],f[2]||f[3])),Lu(d)}return new yu(a,b,c,e)}
939
- var Ru="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".split(" "),Su="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Tu(){}function Uu(a){try{var b=Vu(a);return Vf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Tf(c)}}
940
- function Vu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new Q(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new Q(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=ud(a):e=nd(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Tu);Tu.parse=Uu;eg("data",Uu);function Wu(a){var b=Wd(a),c=b.split("/")[0];a=Xd(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Lf:null}}
941
- function Xu(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
932
+ function ku(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=bh(d,"timescale",jh)||1;d=t(Vg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bh(k,"presentationTime",jh)||0,m=bh(k,"duration",jh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:nh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
933
+ function qu(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=ng,g=e?0:1,h=hl(b,c,d,a.g.retryParameters),C(l,Rt(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function ou(a,b){b=Md(a,b);return de(b)?Id:a.split("/")[0]}function Rt(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);cg(a.F,b);return b.promise}P("shaka.dash.DashParser",Nt);li["application/dash+xml"]=function(){return new Nt};li["video/vnd.mpeg.dash.mpd"]=function(){return new Nt};function uu(){}P("shaka.dependencies",uu);uu.has=function(a){return vu.has(a)};uu.add=function(a,b){if(!wu[a])throw Error(a+" is not supported");a==xu?pb("mux.js","mux.js is no longer used in Shaka Player."):vu.set(a,function(){return b})};var xu="muxjs",wu={Fj:xu,ISOBoxer:"ISOBoxer"};uu.Allowed=wu;var vu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function yu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function zu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}zu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
934
+ function Au(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Bu(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Bu(a,b))?a.value:c||null}function Cu(a,b){a=Bu(a,b);if(!a)throw new Q(2,4,4023,b);return a.value}function Du(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.rb=c}function Eu(a,b){this.name=a;this.value=b};function Fu(a,b){return a.filter(function(c){return c.name==b})}function Gu(a,b){return a.filter(function(c){return Cu(c,"TYPE")==b})}function Hu(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 Iu(a,b,c){c=void 0===c?0:c;return(a=Hu(a,b))?Number(a.value):c}function Ju(a,b,c){return b?Ku(a,[b],c):[]}
935
+ function Ku(a,b,c){if(!b.length)return[];b=Ad(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new Q(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Lu(a){this.h=a||"";this.g=0}function Mu(a){Nu(a,/[ \t]+/gm)}function Nu(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Ou(a){return a.g==a.h.length?null:(a=Nu(a,/[^ \t\n]*/gm))?a[0]:null};function Pu(){this.g=0}
936
+ function Qu(a,b){b=hd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new Q(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Ru(a,f),--a.g,Su.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Ru(a,g);if(Tu.includes(g.name)){if(1!=b)throw new Q(2,4,4017);g=
937
+ c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Ru(a,k),Su.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Du(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Du("",d,f)));return new yu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
938
+ g.name&&(g.attributes.push(new Eu("URI",h)),d=!0)}}return new yu(b,e)}function Ru(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new Q(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Lu(d);var f;(f=Nu(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Nu(d,g);)c.push(new Eu(f[1],f[2]||f[3])),Mu(d)}return new zu(a,b,c,e)}
939
+ var Su="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".split(" "),Tu="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Uu(){}function Vu(a){try{var b=Wu(a);return Vf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Tf(c)}}
940
+ function Wu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new Q(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new Q(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=ud(a):e=nd(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Uu);Uu.parse=Vu;eg("data",Vu);function Xu(a){var b=Wd(a),c=b.split("/")[0];a=Xd(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Mf:null}}
941
+ function Yu(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
942
942
  null,q=null,p=null,u;(new zg).box("moov",Eg).box("trak",Eg).O("tkhd",function(v){v=Pi(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Eg).O("mdhd",function(v){k=Ni(v.reader,v.version).language}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("mp4a",function(v){var B=v.reader;B.skip(6);B.skip(2);B.skip(8);var A=B.ra();B.skip(2);B.skip(2);B.skip(2);B=B.ra()+B.ra()/65536;n=A;q=B;v.reader.ka()?Eg(v):c(v)}).box("esds",function(v){v=v.reader;for(var B="mp4a",A,D;v.ka();){A=v.P();for(var F=
943
943
  v.P();F&128;)F=v.P();if(3==A)v.ra(),F=v.P(),F&128&&v.ra(),F&64&&v.skip(v.P()),F&32&&v.ra();else if(4==A)D=v.P(),v.skip(12);else if(5==A)break}D&&(B+="."+Ri(D),5==A&&v.ka()&&(A=v.P(),D=(A&248)>>3,31===D&&v.ka()&&(D=32+((A&7)<<3)+((v.P()&224)>>5)),B+="."+D));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){u=v.name;Jg(v)}).box("avc3",function(v){u=v.name;Jg(v)}).box("hev1",function(v){u=v.name;Jg(v)}).box("hvc1",function(v){u=v.name;Jg(v)}).box("dva1",
944
944
  function(v){u=v.name;Jg(v)}).box("dvav",function(v){u=v.name;Jg(v)}).box("dvh1",function(v){u=v.name;Jg(v)}).box("dvhe",function(v){u=v.name;Jg(v)}).box("vp09",function(v){u=v.name;Jg(v)}).box("av01",function(v){u=v.name;Jg(v)}).box("avcC",function(v){var B=u||"";switch(u){case "dvav":B="avc3";break;case "dva1":B="avc1"}v=v.reader;v.skip(1);v=B+"."+Ri(v.P())+Ri(v.P())+Ri(v.P());f.push(v);h=!0}).box("hvcC",function(v){var B=u||"";switch(u){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var A=v.reader;
945
945
  A.skip(1);v=A.P();var D=["","A","B","C"][v>>6],F=v&31,J=A.M(),I=(v&32)>>5?"H":"L";v=[A.P(),A.P(),A.P(),A.P(),A.P(),A.P()];A=A.P();for(var E=0,H=0;32>H;H++){E|=J&1;if(31==H)break;E<<=1;J>>=1}B=B+("."+D+F)+("."+Ri(E,!0));B+="."+I+A;D="";for(F=v.length;F--;)if((I=v[F])||D)D="."+I.toString(16).toUpperCase()+D;B+=D;f.push(B);h=!0}).box("dvcC",function(v){var B=u||"";switch(u){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var A=v.reader;A.skip(2);
946
946
  v=A.P();A=A.P();f.push(B+"."+Si(v>>1&127)+"."+Si(v<<5&32|A>>3&31));h=!0}).O("vpcC",function(v){var B=u||"",A=v.reader;v=A.P();var D=A.P();A=A.P()>>4&15;f.push(B+"."+Si(v)+"."+Si(D)+"."+Si(A));h=!0}).box("av1C",function(v){var B=u||"",A=v.reader;A.skip(1);v=A.P();A=A.P();var D=v>>>5,F=(A&64)>>6;f.push(B+"."+D+"."+Si(v&31)+(A>>>7?"H":"M")+"."+Si(2===D&&F?(A&32)>>5?12:10:F?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Si(1)+"."+Si(1)+"."+Si(1)+".0");h=!0}).box("enca",Kg).box("encv",Jg).box("sinf",
947
947
  Eg).box("frma",function(v){v=Qi(v.reader).Ea;d(v)}).box("colr",function(v){v=v.reader;var B=null,A=v.sb(4);var D=String.fromCharCode(A[0]);D+=String.fromCharCode(A[1]);D+=String.fromCharCode(A[2]);D+=String.fromCharCode(A[3]);if("nclx"===D)switch(v.ra(),A=v.ra(),v.ra(),A){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}p=B}).parse(a||b,!0);if(!e.length&&!f.length)return null;var x=g&&!h,w=new Map;if(h){var z=new Gb("video/mp4");a&&z.init(a);z.i(b);a=t(z.j());
948
- for(b=a.next();!b.done;b=a.next())b=b.value,w.set(b,b);z.h()}return{type:x?"audio":"video",mimeType:x?"audio/mp4":"video/mp4",codecs:Yu(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:q,closedCaptions:w,Lf:p}}function Yu(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Vd(d);b.has(e)||(c.push(d),b.add(e))}b=Jd("audio",c);d=Jd("video",c);a=Jd(Id,c);d=Zu(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
949
- function Zu(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?lb('video/mp4; codecs="'+b+"\"'")?[b]:a.filter(function(c){return c!=b}):a}function $u(a){var b=null;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("enca",Kg).box("sinf",Eg).box("schi",Eg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=yd(c.sb(16))}).parse(a,!0);return b};function av(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Id,new Map);this.K.set("image",new Map);this.Ia=new Set;this.h=new Map;this.l=null;this.aa="";this.Ga=new Ou;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){bv(a)});this.qa=cv;this.C=null;this.Ha=0;this.m=Infinity;this.ta=this.sa=this.L=0;this.N=new bg;this.F=new Map;this.G=new Map;this.X=new Map;this.ba=new Map;
950
- this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.bb=new Qa(5);this.j=null}r=av.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),C(e,dv(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,C(e,ev(c,d.data,a),3)):e.return(c.C)})};
951
- r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ia.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.X.clear();this.ba.clear();this.da.clear();this.ia.clear();this.pa.clear();this.j&&this.j.destroy();return Promise.all(a)};
952
- r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!fv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(gv(a,g));return C(m,Promise.all(b),2)}hv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.fd});d.length&&!h&&(k=iv,jv(a,k.Pg),l=d.map(function(n){return n.yb}),a.l.Za(Math.min.apply(Math,y(l))),a.i.updateDuration());
953
- h&&kv(a);G(m)})};function lv(a,b){return fv(a)?a.K.get(b.type):b.$d}
954
- function gv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U;return L(function(R){if(1==R.g){c=[];d=t(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(R,dv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=Pu(a.Ga,k.data);if(1!=l.type)throw new Q(2,4,4017);m=k.uri;m==k.originalUri||
955
- b.$().includes(m)||b.tg.push(m);n=Eu(l.g,"EXT-X-DEFINE");q=mv(a,n,m);p=b.stream;u=lv(a,b);return C(R,nv(a,l,p.mimeType,b.$,q),3)}x=R.h;w=x.keyIds;z=x.drmInfos;v=function(V,xa){return V.size===xa.size&&[].concat(y(V)).every(function(Ca){return xa.has(Ca)})};v(p.keyIds,w)||(p.keyIds=w,p.drmInfos=z,a.i.newDrmInfo(p));B=ov(a,l,p,u,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(F=Hu(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Gu(l.g,"EXT-X-SKIP"))?Number(Z(J,
956
- "SKIPPED-SEGMENTS")):0,E=pv(F,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=u.get(F),p.segmentIndex.La(M));O=A[0];b.ec=O.startTime;N=A[A.length-1];b.yb=N.endTime;if(U=Gu(l.g,"EXT-X-ENDLIST"))b.fd=!0;qv(a,l);G(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
957
- function rv(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=lv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.De=k;break}}}}if(!(0>a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,sv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.De,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),tv(a,
948
+ for(b=a.next();!b.done;b=a.next())b=b.value,w.set(b,b);z.h()}return{type:x?"audio":"video",mimeType:x?"audio/mp4":"video/mp4",codecs:Zu(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:q,closedCaptions:w,Mf:p}}function Zu(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Vd(d);b.has(e)||(c.push(d),b.add(e))}b=Jd("audio",c);d=Jd("video",c);a=Jd(Id,c);d=$u(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
949
+ function $u(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?lb('video/mp4; codecs="'+b+"\"'")?[b]:a.filter(function(c){return c!=b}):a}function av(a){var b=null;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("enca",Kg).box("sinf",Eg).box("schi",Eg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=wd(c.sb(16))}).parse(a,!0);return b};function bv(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Id,new Map);this.K.set("image",new Map);this.Ia=new Set;this.h=new Map;this.l=null;this.aa="";this.Ga=new Pu;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){cv(a)});this.qa=dv;this.C=null;this.Ha=0;this.m=Infinity;this.ta=this.sa=this.L=0;this.N=new bg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
950
+ this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.bb=new Qa(5);this.j=null}r=bv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),C(e,ev(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,C(e,fv(c,d.data,a),3)):e.return(c.C)})};
951
+ r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ia.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.Y.clear();this.ba.clear();this.da.clear();this.ia.clear();this.pa.clear();this.j&&this.j.destroy();return Promise.all(a)};
952
+ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!gv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(hv(a,g));return C(m,Promise.all(b),2)}iv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.fd});d.length&&!h&&(k=jv,kv(a,k.Qg),l=d.map(function(n){return n.yb}),a.l.$a(Math.min.apply(Math,y(l))),a.i.updateDuration());
953
+ h&&lv(a);G(m)})};function mv(a,b){return gv(a)?a.K.get(b.type):b.$d}
954
+ function hv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U;return L(function(R){if(1==R.g){c=[];d=t(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(R,ev(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=Qu(a.Ga,k.data);if(1!=l.type)throw new Q(2,4,4017);m=k.uri;m==k.originalUri||
955
+ b.$().includes(m)||b.ug.push(m);n=Fu(l.g,"EXT-X-DEFINE");q=nv(a,n,m);p=b.stream;u=mv(a,b);return C(R,ov(a,l,p.mimeType,b.$,q),3)}x=R.h;w=x.keyIds;z=x.drmInfos;v=function(V,xa){return V.size===xa.size&&[].concat(y(V)).every(function(Ca){return xa.has(Ca)})};v(p.keyIds,w)||(p.keyIds=w,p.drmInfos=z,a.i.newDrmInfo(p));B=pv(a,l,p,u,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(F=Iu(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Hu(l.g,"EXT-X-SKIP"))?Number(Z(J,
956
+ "SKIPPED-SEGMENTS")):0,E=qv(F,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=u.get(F),p.segmentIndex.La(M));O=A[0];b.fc=O.startTime;N=A[A.length-1];b.yb=N.endTime;if(U=Hu(l.g,"EXT-X-ENDLIST"))b.fd=!0;rv(a,l);G(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
957
+ function sv(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=mv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.Ee=k;break}}}}if(!(0>a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,tv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.Ee,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),uv(a,
958
958
  c,d)}
959
- function uv(a,b){if(Infinity==a.T){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!sv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(tv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Ff(b)}}}
960
- function tv(a,b,c){b.ec+=c;b.yb+=c;a=lv(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.$()}
961
- function ev(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,db,Fa,Va;return L(function(ua){switch(ua.g){case 1:d=Pu(a.Ga,b);e=Eu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];k=function(){return[c]};if(1==d.type)return C(ua,vv(a,d,k),7);wv(a,e);l=Eu(d.g,"EXT-X-MEDIA");m=Eu(d.g,"EXT-X-STREAM-INF");n=Eu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Eu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Eu(d.g,"EXT-X-SESSION-KEY");u=Eu(d.g,"EXT-X-SESSION-DATA");x=Eu(d.g,"EXT-X-CONTENT-STEERING");xv(a,u);return C(ua,
962
- yv(a,x),4);case 4:return zv(a,m),Av(a,l),C(ua,Bv(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Cv(a,l),C(ua,Dv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return w=ua.h,z=w.type,v=w.mimeType,B=w.codecs,A=w.language,D=w.height,F=w.width,J=w.channelCount,I=w.sampleRate,E=w.closedCaptions,H=w.Lf,C(ua,Ev(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,E,null,!1,I,!1,v),8);case 8:K=ua.h,a.h.set(c,K),"video"==z&&Fv(K.stream,F,D,null,H,null),f.push({id:0,language:qe(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
963
- z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new Q(2,7,7001);a.l=new hk(null,0);a.l.Ec(!0);1==d.type&&(fv(a)&&(Gv(a,d),M=a.m,a.s.W(M)),O=Array.from(a.h.values()),Hv(a,O),kv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
964
- type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}N=[];U=t(a.C.variants);for(R=U.next();!R.done;R=U.next())V=R.value,V.audio&&""===V.audio.codecs&&N.push(V.audio.createSegmentIndex()),V.video&&""===V.video.codecs&&N.push(V.video.createSegmentIndex());return C(ua,Promise.all(N),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){xa=[];Ca=f[0];db=t([Ca.video,Ca.audio]);for(Fa=db.next();!Fa.done;Fa=db.next())(Va=Fa.value)&&!Va.segmentIndex&&xa.push(Va.createSegmentIndex());
959
+ function vv(a,b){if(Infinity==a.T){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!tv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(uv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Gf(b)}}}
960
+ function uv(a,b,c){b.fc+=c;b.yb+=c;a=mv(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.$()}
961
+ function fv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va;return L(function(ua){switch(ua.g){case 1:d=Qu(a.Ga,b);e=Fu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];k=function(){return[c]};if(1==d.type)return C(ua,wv(a,d,k),7);xv(a,e);l=Fu(d.g,"EXT-X-MEDIA");m=Fu(d.g,"EXT-X-STREAM-INF");n=Fu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Fu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Fu(d.g,"EXT-X-SESSION-KEY");u=Fu(d.g,"EXT-X-SESSION-DATA");x=Fu(d.g,"EXT-X-CONTENT-STEERING");yv(a,u);return C(ua,
962
+ zv(a,x),4);case 4:return Av(a,m),Bv(a,l),C(ua,Cv(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Dv(a,l),C(ua,Ev(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return w=ua.h,z=w.type,v=w.mimeType,B=w.codecs,A=w.language,D=w.height,F=w.width,J=w.channelCount,I=w.sampleRate,E=w.closedCaptions,H=w.Mf,C(ua,Fv(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,E,null,!1,I,!1,v),8);case 8:K=ua.h,a.h.set(c,K),"video"==z&&Gv(K.stream,F,D,null,H,null),f.push({id:0,language:qe(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
963
+ z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new Q(2,7,7001);a.l=new hk(null,0);a.l.Ec(!0);1==d.type&&(gv(a)&&(Hv(a,d),M=a.m,a.s.X(M)),O=Array.from(a.h.values()),Iv(a,O),lv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
964
+ type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}N=[];U=t(a.C.variants);for(R=U.next();!R.done;R=U.next())V=R.value,V.audio&&""===V.audio.codecs&&N.push(V.audio.createSegmentIndex()),V.video&&""===V.video.codecs&&N.push(V.video.createSegmentIndex());return C(ua,Promise.all(N),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){xa=[];Ca=f[0];eb=t([Ca.video,Ca.audio]);for(Fa=eb.next();!Fa.done;Fa=eb.next())(Va=Fa.value)&&!Va.segmentIndex&&xa.push(Va.createSegmentIndex());
965
965
  if(0<xa.length)return C(ua,Promise.all(xa),0)}ua.u(0)}})}
966
- function vv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:d=Wu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Iu(c(),b.segments[0].h);h=g[0];k=new rc(h);l=k.Pa.split(".").pop();if(m=Iv[l])return D.return(Wu(m));n=ng;q=null;p=Jv(a,b,f.g,c);a.X.clear();if(!p){D.u(2);break}u=gl(p.$(),p.$b(),p.Xb(),a.g.retryParameters);return C(D,Kv(a,u,n,{type:0}),3);case 3:x=D.h,q=x.data;case 2:return w=
967
- hg(g,a.g.retryParameters),C(D,Kv(a,w,n,{type:1}),4);case 4:z=D.h;(v=z.headers["content-type"])&&(v=v.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==v){var F=z.data;var J=Ab(F);J=(new ij).parse(J);var I=J.bd();J=J.We();var E=[],H=!1,K=!1;switch(I.audio){case "aac":case "aac-loas":E.push("mp4a.40.2");H=!0;break;case "mp3":E.push("mp4a.40.34");H=!0;break;case "ac3":E.push("ac-3");H=!0;break;case "ec3":E.push("ec-3");H=!0;break;case "opus":E.push("opus"),H=!0}switch(I.video){case "avc":J.Ea?E.push(J.Ea):
968
- E.push("avc1.42E01E");K=!0;break;case "hvc":J.Ea?E.push(J.Ea):E.push("hvc1.1.6.L93.90");K=!0;break;case "av1":E.push("av01.0.01M.08"),K=!0}if(E.length){I=H&&!K;H=new Map;if(K){K=new Gb("video/mp2t");K.i(F);F=t(K.j());for(var M=F.next();!M.done;M=F.next())M=M.value,H.set(M,M);K.h()}J={type:I?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:H,Lf:null}}else J=null;if(B=J)return D.return(B)}else if("mp4"==
969
- l||"cmfv"==l||"m4s"==l||"video/mp4"==v||"audio/mp4"==v||"video/iso.segment"==v)if(A=Xu(q,z.data))return D.return(A);return D.return(d)}})}
970
- function kv(a){if(fv(a)){if(a.qa==Lv){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.ec));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.je(b)}}else a.l.Za(Mv(a));if(!a.l.o)for(b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
971
- c.h&&a.l.Bg(c.h);a.l.Xd()}function wv(a,b){var c=(new rc(a.aa)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
972
- function mv(a,b,c){c=(new rc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
973
- function zv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Nv(a,d);if(f){var g=Gd(Id,d);a.G.set(f,g);Kb(d,g)}e&&(f=Gd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Gd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
974
- function xv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Iu([a.aa],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.i)a.i.onEvent(c)}}
975
- function yv(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new Vs(a.i);a.j.configure(a.g);a.j.i=[a.aa];a.j.setManifestType("HLS");a.j.h=g;c=Ws(a.j,h);break}return C(k,c,0)})}
976
- function Cv(a,b){var c=Fu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ov(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Bu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Pv(Id,d)||Qv(Id),Rv(f.stream)}}return b.filter(function(g){return g})}
977
- function Rv(a){a.fullMimeTypes=new Set([Md(a.mimeType,a.codecs)])}
978
- function Dv(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return C(m,Sv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Bu(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
979
- q=Z(g,"CHARACTERISTICS"),p=Tv(a,a.A++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),x=t(u?u.split("x"):[null,null]),w=x.next().value,z=x.next().value;p.stream.width=Number(w)||void 0;p.stream.height=Number(z)||void 0;var v=Z(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
980
- function Uv(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=zu(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Ov(a,d[g],c)}
981
- function Bv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,db;return L(function(Fa){switch(Fa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Fa.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Fa.u(2);break}m=l.value;n=Bu(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||Vv(n)){Fa.u(4);break}if("identity"!=q){p=(u=Wv[q])?u(m,""):null;Fa.u(6);break}return C(Fa,Xv(a,m,"",e,null,f),8);case 8:p=Fa.h;case 6:if(p){if(p.keyIds)for(x=t(p.keyIds),w=x.next();!w.done;w=
982
- x.next())z=w.value,h.add(z);g.push(p)}case 4:l=k.next();Fa.u(3);break;case 2:v={};B=t(b);for(A=B.next();!A.done;A=B.next())D=A.value,F=zu(D),v[F]?v[F].push(D):v[F]=[D];J=[];for(I in v)E=v[I],H=E[0],K=Z(H,"FRAME-RATE"),M=Number(Z(H,"AVERAGE-BANDWIDTH"))||Number(Bu(H,"BANDWIDTH")),O=Z(H,"RESOLUTION"),N=t(O?O.split("x"):[null,null]),U=N.next().value,R=N.next().value,V=Z(H,"VIDEO-RANGE"),(xa=Z(H,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(Ca=xa.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==
983
- Va}),xa=Ca[0]),xa=xa||"CH-MONO",db=Yv(a,E,d,M),J.push.apply(J,y(Zv(a,db.audio,db.video,M,U,R,K,V,xa,g,h)));return Fa.return(J.filter(function(Va){return null!=Va}))}})}
984
- function Yv(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(Bu(w,"GROUP-ID"))}),Uv(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var u=b.map(function(w){return Bu(w,
985
- "URI")});k=e.audio.find(function(w){return w&&w.$().find(function(z){return u.includes(z)})});h=Nv(a,b[0]);q=Gd("video",h);(p=Gd("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var x=n=p=q=m=null;!l.length&&(c=c.find(function(w){var z=Z(w,"URI")||"",v=Z(w,"TYPE");w=Bu(w,"GROUP-ID");return"SUBTITLES"!=v&&""==z&&g.includes(w)}))&&(m=Z(c,"LANGUAGE"),
986
- q=Z(c,"NAME"),p=$v(c),aw(c),n=Z(c,"CHARACTERISTICS"),x=bw(c));a=cw(a,b,h,k,m,q,p,n,x);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
987
- function Nv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,y(b)));return Yu(a)}function $v(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
988
- function bw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function aw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
989
- function Zv(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),q=n.next();!q.done;q=n.next())Fv(q.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[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 p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.$().sort().join(","):"";var u=f?f.$().sort().join(","):
966
+ function wv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:d=Xu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Ju(c(),b.segments[0].h);h=g[0];k=new rc(h);l=k.Pa.split(".").pop();if(m=Jv[l])return D.return(Xu(m));n=ng;q=null;p=Kv(a,b,f.g,c);a.Y.clear();if(!p){D.u(2);break}u=hl(p.$(),p.ac(),p.Yb(),a.g.retryParameters);return C(D,Lv(a,u,n,{type:0}),3);case 3:x=D.h,q=x.data;case 2:return w=
967
+ hg(g,a.g.retryParameters),C(D,Lv(a,w,n,{type:1}),4);case 4:z=D.h;(v=z.headers["content-type"])&&(v=v.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==v){var F=z.data;var J=Ab(F);J=(new ij).parse(J);var I=J.bd();J=J.Xe();var E=[],H=!1,K=!1;switch(I.audio){case "aac":case "aac-loas":E.push("mp4a.40.2");H=!0;break;case "mp3":E.push("mp4a.40.34");H=!0;break;case "ac3":E.push("ac-3");H=!0;break;case "ec3":E.push("ec-3");H=!0;break;case "opus":E.push("opus"),H=!0}switch(I.video){case "avc":J.Ea?E.push(J.Ea):
968
+ E.push("avc1.42E01E");K=!0;break;case "hvc":J.Ea?E.push(J.Ea):E.push("hvc1.1.6.L93.90");K=!0;break;case "av1":E.push("av01.0.01M.08"),K=!0}if(E.length){I=H&&!K;H=new Map;if(K){K=new Gb("video/mp2t");K.i(F);F=t(K.j());for(var M=F.next();!M.done;M=F.next())M=M.value,H.set(M,M);K.h()}J={type:I?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:H,Mf:null}}else J=null;if(B=J)return D.return(B)}else if("mp4"==
969
+ l||"cmfv"==l||"m4s"==l||"video/mp4"==v||"audio/mp4"==v||"video/iso.segment"==v)if(A=Yu(q,z.data))return D.return(A);return D.return(d)}})}
970
+ function lv(a){if(gv(a)){if(a.qa==Mv){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ke(b)}}else a.l.$a(Nv(a));if(!a.l.o)for(b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
971
+ c.h&&a.l.Cg(c.h);a.l.Xd()}function xv(a,b){var c=(new rc(a.aa)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
972
+ function nv(a,b,c){c=(new rc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
973
+ function Av(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Ov(a,d);if(f){var g=Gd(Id,d);a.G.set(f,g);Kb(d,g)}e&&(f=Gd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Gd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
974
+ function yv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Ju([a.aa],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.i)a.i.onEvent(c)}}
975
+ function zv(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new Ws(a.i);a.j.configure(a.g);a.j.i=[a.aa];a.j.setManifestType("HLS");a.j.h=g;c=Xs(a.j,h);break}return C(k,c,0)})}
976
+ function Dv(a,b){var c=Gu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Pv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Cu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Qv(Id,d)||Rv(Id),Sv(f.stream)}}return b.filter(function(g){return g})}
977
+ function Sv(a){a.fullMimeTypes=new Set([Md(a.mimeType,a.codecs)])}
978
+ function Ev(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return C(m,Tv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Cu(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
979
+ q=Z(g,"CHARACTERISTICS"),p=Uv(a,a.A++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),x=t(u?u.split("x"):[null,null]),w=x.next().value,z=x.next().value;p.stream.width=Number(w)||void 0;p.stream.height=Number(z)||void 0;var v=Z(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
980
+ function Vv(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Au(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Pv(a,d[g],c)}
981
+ function Cv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb;return L(function(Fa){switch(Fa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Fa.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Fa.u(2);break}m=l.value;n=Cu(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||Wv(n)){Fa.u(4);break}if("identity"!=q){p=(u=Xv[q])?u(m,""):null;Fa.u(6);break}return C(Fa,Yv(a,m,"",e,null,f),8);case 8:p=Fa.h;case 6:if(p){if(p.keyIds)for(x=t(p.keyIds),w=x.next();!w.done;w=
982
+ x.next())z=w.value,h.add(z);g.push(p)}case 4:l=k.next();Fa.u(3);break;case 2:v={};B=t(b);for(A=B.next();!A.done;A=B.next())D=A.value,F=Au(D),v[F]?v[F].push(D):v[F]=[D];J=[];for(I in v)E=v[I],H=E[0],K=Z(H,"FRAME-RATE"),M=Number(Z(H,"AVERAGE-BANDWIDTH"))||Number(Cu(H,"BANDWIDTH")),O=Z(H,"RESOLUTION"),N=t(O?O.split("x"):[null,null]),U=N.next().value,R=N.next().value,V=Z(H,"VIDEO-RANGE"),(xa=Z(H,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(Ca=xa.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==
983
+ Va}),xa=Ca[0]),xa=xa||"CH-MONO",eb=Zv(a,E,d,M),J.push.apply(J,y($v(a,eb.audio,eb.video,M,U,R,K,V,xa,g,h)));return Fa.return(J.filter(function(Va){return null!=Va}))}})}
984
+ function Zv(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(Cu(w,"GROUP-ID"))}),Vv(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var u=b.map(function(w){return Cu(w,
985
+ "URI")});k=e.audio.find(function(w){return w&&w.$().find(function(z){return u.includes(z)})});h=Ov(a,b[0]);q=Gd("video",h);(p=Gd("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var x=n=p=q=m=null;!l.length&&(c=c.find(function(w){var z=Z(w,"URI")||"",v=Z(w,"TYPE");w=Cu(w,"GROUP-ID");return"SUBTITLES"!=v&&""==z&&g.includes(w)}))&&(m=Z(c,"LANGUAGE"),
986
+ q=Z(c,"NAME"),p=aw(c),bw(c),n=Z(c,"CHARACTERISTICS"),x=cw(c));a=dw(a,b,h,k,m,q,p,n,x);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
987
+ function Ov(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,y(b)));return Zu(a)}function aw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
988
+ function cw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function bw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
989
+ function $v(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),q=n.next();!q.done;q=n.next())Gv(q.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[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 p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.$().sort().join(","):"";var u=f?f.$().sort().join(","):
990
990
  "";p=p+" - "+u;h&&k&&!$h(n,q)||a.Ia.has(p)||(h={id:a.A++,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.Ia.add(p))}return e}
991
- function Av(a,b){b=Fu(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=qe(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Bu(d,"GROUP-ID");d=Bu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
992
- function Ov(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Bu(k,"URI");k=Bu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Bu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Id);if(k==Id)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.A++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
993
- m=n.next().value;n=n.next().value;(m=c.get(m))&&Zs(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?$v(h):null;var q="audio"==k?aw(h):!1,p=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?bw(h):null;d=Tv(a,l,d,b,k,c,m,f,n,null,p,u,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
994
- function Sv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Bu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Tv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
991
+ function Bv(a,b){b=Gu(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=qe(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Cu(d,"GROUP-ID");d=Cu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
992
+ function Pv(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Cu(k,"URI");k=Cu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Cu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Id);if(k==Id)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.A++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
993
+ m=n.next().value;n=n.next().value;(m=c.get(m))&&$s(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?aw(h):null;var q="audio"==k?bw(h):!1,p=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?cw(h):null;d=Uv(a,l,d,b,k,c,m,f,n,null,p,u,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
994
+ function Tv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Cu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Uv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
995
995
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
996
- function cw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Bu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&Zs(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Fd(d,c);d=Tv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
997
- function Tv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,db,Fa,Va;return L(function(ua){switch(ua.g){case 1:return F=v.$(),C(ua,dv(a,v.$(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();I=J.uri;I==J.originalUri||F.includes(I)||z.push(I);E=Pu(a.Ga,J.data);H=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return C(ua,vv(a,E,x),4);case 4:K=ua.h,H=K.mimeType,d=K.codecs;case 3:return M=fv(a),C(ua,Ev(a,0,E,x,I,d,e,f,g,h,k,l,m,n,q,p,H),5);case 5:O=ua.h;
998
- if(D.aborted)return ua.return();N=O.stream;fv(a)&&!M&&Gv(a,E);v.ec=O.ec;v.yb=O.yb;v.Hd=O.Hd;v.Gd=O.Gd;v.fd=O.fd;v.$d=O.$d;v.gb=O.gb;v.hb=O.hb;v.df=!0;w.segmentIndex=N.segmentIndex;w.encrypted=N.encrypted;w.drmInfos=N.drmInfos;w.keyIds=N.keyIds;w.mimeType=N.mimeType;w.bandwidth=w.bandwidth||N.bandwidth;w.codecs=w.codecs||N.codecs;Rv(w);w.drmInfos.length&&a.i.newDrmInfo(w);U=Kd;if(e==U.fa||e==U.S)for(R=t(a.h.values()),V=R.next();!V.done;V=R.next())xa=V.value,xa.df||xa.type!=e||(xa.stream.mimeType=N.mimeType,
999
- Rv(xa.stream));e==U.ma&&(Ca=N.segmentIndex.get(0))&&Ca.ca&&(w.mimeType="application/mp4",Rv(w));dw(a)&&(a.mb?Hv(a,[v]):(a.mb=!0,db=Array.from(a.h.values()),Fa=db.filter(function(kb){return kb.stream.segmentIndex}),Hv(a,Fa),kv(a),Va=a.m,0<Va&&a.s.W(Va)));G(ua)}})}function x(){return a.j&&1<c.length?$s(a.j,b):z.concat(Ju([a.aa],c,a.o))}var w=ew(a,d,e,f,g,h,k,l,m,n,q,p),z=[],v={stream:w,type:e,tg:z,$:x,ec:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,De:-1,gb:-1,hb:-1,df:!1},B=null,A=new AbortController;w.createSegmentIndex=
1000
- function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(u(A.signal))})};w.closeSegmentIndex=function(){B&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return v}function Mv(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.yb));return b}
1001
- function hv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.tc(function(e){c.push(e)});a.l.ld(c)}function Hv(a,b){if(!fv(a))for(var c=Mv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.sc(0,c);hv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?rv(a,b):(uv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&rv(a,b))}
1002
- function sv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function dw(a){if(!a.C)return!1;var b=[],c=[];a=t(a.C.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
1003
- function Ev(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w){var z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,db,Fa,Va,ua;return L(function(kb){switch(kb.g){case 1:if(1!=c.type)throw new Q(2,4,4017);z=Eu(c.g,"EXT-X-DEFINE");v=mv(a,z,e);var yb=Gu(c.g,"EXT-X-PLAYLIST-TYPE"),hb=Gu(c.g,"EXT-X-ENDLIST");hb=yb&&"VOD"==yb.value||hb;yb=yb&&"EVENT"==yb.value&&!hb;yb=!hb&&!yb;hb?jv(a,cv):yb?jv(a,Lv):jv(a,fw);fv(a)&&qv(a,c);if(w){kb.u(2);break}return C(kb,gw(a,g,f,c,v,d),3);case 3:w=kb.h;case 2:return C(kb,nv(a,c,w,d,v),4);case 4:B=
1004
- kb.h;A=B.drmInfos;D=B.keyIds;F=B.encrypted;J=B.Tg;if(F&&!A.length&&!J)throw new Q(2,4,4026);I=ew(a,f,g,h,k,l,m,n,q,p,u,x);I.encrypted=F;I.drmInfos=A;I.keyIds=D;I.mimeType=w;Rv(I);E=fv(a)?a.K.get(g):new Map;H=ov(a,c,I,E,v,d,g);K=H.segments;if(M=H.bandwidth)I.bandwidth=M;fv(a)&&qv(a,c);O=K[0].startTime;N=K[K.length-1];U=N.endTime;R=new Dk(K);I.segmentIndex=R;xa=(V=Gu(c.g,"EXT-X-SERVER-CONTROL"))?null!=Au(V,"CAN-SKIP-UNTIL"):!1;Ca=V?null!=Au(V,"CAN-BLOCK-RELOAD"):!1;db=Hu(c.g,"EXT-X-MEDIA-SEQUENCE",
1005
- 0);Fa=pv(db,K);Va=Fa.gb;ua=Fa.hb;return kb.return({stream:I,type:g,tg:[],$:d,ec:O,yb:U,Hd:xa,Gd:Ca,fd:!1,De:-1,gb:Va,hb:ua,$d:E,df:!1})}})}function pv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{gb:a,hb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{gb:a,hb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{gb:a,hb:c}}
1006
- function ew(a,b,c,d,e,f,g,h,k,l,m,n){var q=Pv(c,b)||Qv(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Id?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
996
+ function dw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Cu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&$s(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Fd(d,c);d=Uv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
997
+ function Uv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va;return L(function(ua){switch(ua.g){case 1:return F=v.$(),C(ua,ev(a,v.$(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();I=J.uri;I==J.originalUri||F.includes(I)||z.push(I);E=Qu(a.Ga,J.data);H=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return C(ua,wv(a,E,x),4);case 4:K=ua.h,H=K.mimeType,d=K.codecs;case 3:return M=gv(a),C(ua,Fv(a,0,E,x,I,d,e,f,g,h,k,l,m,n,q,p,H),5);case 5:O=ua.h;
998
+ if(D.aborted)return ua.return();N=O.stream;gv(a)&&!M&&Hv(a,E);v.fc=O.fc;v.yb=O.yb;v.Hd=O.Hd;v.Gd=O.Gd;v.fd=O.fd;v.$d=O.$d;v.gb=O.gb;v.hb=O.hb;v.ef=!0;w.segmentIndex=N.segmentIndex;w.encrypted=N.encrypted;w.drmInfos=N.drmInfos;w.keyIds=N.keyIds;w.mimeType=N.mimeType;w.bandwidth=w.bandwidth||N.bandwidth;w.codecs=w.codecs||N.codecs;Sv(w);w.drmInfos.length&&a.i.newDrmInfo(w);U=Kd;if(e==U.fa||e==U.S)for(R=t(a.h.values()),V=R.next();!V.done;V=R.next())xa=V.value,xa.ef||xa.type!=e||(xa.stream.mimeType=N.mimeType,
999
+ Sv(xa.stream));e==U.ma&&(Ca=N.segmentIndex.get(0))&&Ca.ca&&(w.mimeType="application/mp4",Sv(w));ew(a)&&(a.mb?Iv(a,[v]):(a.mb=!0,eb=Array.from(a.h.values()),Fa=eb.filter(function(kb){return kb.stream.segmentIndex}),Iv(a,Fa),lv(a),Va=a.m,0<Va&&a.s.X(Va)));G(ua)}})}function x(){return a.j&&1<c.length?at(a.j,b):z.concat(Ku([a.aa],c,a.o))}var w=fw(a,d,e,f,g,h,k,l,m,n,q,p),z=[],v={stream:w,type:e,ug:z,$:x,fc:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,Ee:-1,gb:-1,hb:-1,ef:!1},B=null,A=new AbortController;w.createSegmentIndex=
1000
+ function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(u(A.signal))})};w.closeSegmentIndex=function(){B&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return v}function Nv(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.yb));return b}
1001
+ function iv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.tc(function(e){c.push(e)});a.l.ld(c)}function Iv(a,b){if(!gv(a))for(var c=Nv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.sc(0,c);iv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?sv(a,b):(vv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&sv(a,b))}
1002
+ function tv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function ew(a){if(!a.C)return!1;var b=[],c=[];a=t(a.C.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
1003
+ function Fv(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w){var z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va,ua;return L(function(kb){switch(kb.g){case 1:if(1!=c.type)throw new Q(2,4,4017);z=Fu(c.g,"EXT-X-DEFINE");v=nv(a,z,e);var yb=Hu(c.g,"EXT-X-PLAYLIST-TYPE"),hb=Hu(c.g,"EXT-X-ENDLIST");hb=yb&&"VOD"==yb.value||hb;yb=yb&&"EVENT"==yb.value&&!hb;yb=!hb&&!yb;hb?kv(a,dv):yb?kv(a,Mv):kv(a,gw);gv(a)&&rv(a,c);if(w){kb.u(2);break}return C(kb,hw(a,g,f,c,v,d),3);case 3:w=kb.h;case 2:return C(kb,ov(a,c,w,d,v),4);case 4:B=
1004
+ kb.h;A=B.drmInfos;D=B.keyIds;F=B.encrypted;J=B.Ug;if(F&&!A.length&&!J)throw new Q(2,4,4026);I=fw(a,f,g,h,k,l,m,n,q,p,u,x);I.encrypted=F;I.drmInfos=A;I.keyIds=D;I.mimeType=w;Sv(I);E=gv(a)?a.K.get(g):new Map;H=pv(a,c,I,E,v,d,g);K=H.segments;if(M=H.bandwidth)I.bandwidth=M;gv(a)&&rv(a,c);O=K[0].startTime;N=K[K.length-1];U=N.endTime;R=new Dk(K);I.segmentIndex=R;xa=(V=Hu(c.g,"EXT-X-SERVER-CONTROL"))?null!=Bu(V,"CAN-SKIP-UNTIL"):!1;Ca=V?null!=Bu(V,"CAN-BLOCK-RELOAD"):!1;eb=Iu(c.g,"EXT-X-MEDIA-SEQUENCE",
1005
+ 0);Fa=qv(eb,K);Va=Fa.gb;ua=Fa.hb;return kb.return({stream:I,type:g,ug:[],$:d,fc:O,yb:U,Hd:xa,Gd:Ca,fd:!1,Ee:-1,gb:Va,hb:ua,$d:E,ef:!1})}})}function qv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{gb:a,hb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{gb:a,hb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{gb:a,hb:c}}
1006
+ function fw(a,b,c,d,e,f,g,h,k,l,m,n){var q=Qv(c,b)||Rv(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Id?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1007
1007
  segmentIndex:null,mimeType:q,codecs:b,kind:c==Id?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:qe(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set};
1008
- Rv(a);return a}
1009
- function nv(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R;return L(function(V){switch(V.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Eu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Jv(a,b,k.g,d,e),n=t(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);x=u=!1;w=[];z=new Set;v=t(f);B=v.next();case 2:if(B.done){V.u(4);break}A=B.value;D=t(A);F=D.next().value;J=D.next().value;I=F;E=J;H=Bu(I,"METHOD");if("NONE"==H){V.u(3);break}u=
1010
- !0;K=Z(I,"KEYFORMAT")||"identity";M=null;if(Vv(H)){x=!0;V.u(3);break}if("identity"!=K){M=(O=Wv[K])?O(I,c):null;V.u(6);break}return C(V,Xv(a,I,c,d,E,e),8);case 8:M=V.h;case 6:if(M){if(M.keyIds)for(N=t(M.keyIds),U=N.next();!U.done;U=N.next())R=U.value,z.add(R);w.push(M)}case 3:B=v.next();V.u(2);break;case 4:return V.return({drmInfos:w,keyIds:z,encrypted:u,Tg:x})}})}
1011
- function hw(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 Q(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=vd(g.substr(2));if(16!=h.byteLength)throw new Q(2,4,4048);}else f=Hu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ba.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Bu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1012
- 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,u,x;return L(function(w){if(1==w.g)return l=Iu(d(),Bu(b,"URI"),e),m=l.sort().join(""),a.da.has(m)||(n=hg(l,a.g.retryParameters),q=Kv(a,n,6),a.da.set(m,q)),C(w,a.da.get(m),2);if(3!=w.g){p=w.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new Q(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};x=k;return C(w,window.crypto.subtle.importKey("raw",p.data,u,!0,["decrypt"]),3)}x.cryptoKey=w.h;k.fetchKey=void 0;
1008
+ Sv(a);return a}
1009
+ function ov(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R;return L(function(V){switch(V.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Fu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Kv(a,b,k.g,d,e),n=t(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);x=u=!1;w=[];z=new Set;v=t(f);B=v.next();case 2:if(B.done){V.u(4);break}A=B.value;D=t(A);F=D.next().value;J=D.next().value;I=F;E=J;H=Cu(I,"METHOD");if("NONE"==H){V.u(3);break}u=
1010
+ !0;K=Z(I,"KEYFORMAT")||"identity";M=null;if(Wv(H)){x=!0;V.u(3);break}if("identity"!=K){M=(O=Xv[K])?O(I,c):null;V.u(6);break}return C(V,Yv(a,I,c,d,E,e),8);case 8:M=V.h;case 6:if(M){if(M.keyIds)for(N=t(M.keyIds),U=N.next();!U.done;U=N.next())R=U.value,z.add(R);w.push(M)}case 3:B=v.next();V.u(2);break;case 4:return V.return({drmInfos:w,keyIds:z,encrypted:u,Ug:x})}})}
1011
+ function iw(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 Q(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=vd(g.substr(2));if(16!=h.byteLength)throw new Q(2,4,4048);}else f=Iu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ba.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Cu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1012
+ 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,u,x;return L(function(w){if(1==w.g)return l=Ju(d(),Cu(b,"URI"),e),m=l.sort().join(""),a.da.has(m)||(n=hg(l,a.g.retryParameters),q=Lv(a,n,6),a.da.set(m,q)),C(w,a.da.get(m),2);if(3!=w.g){p=w.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new Q(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};x=k;return C(w,window.crypto.subtle.importKey("raw",p.data,u,!0,["decrypt"]),3)}x.cryptoKey=w.h;k.fetchKey=void 0;
1013
1013
  G(w)})};a.ba.set(c,k)}return a.ba.get(c)}
1014
- function qv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Gu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Gu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new Q(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Gu(b.g,"EXT-X-PART-INF"))a.L=Number(Bu(e,"PART-TARGET"));b=Gu(b.g,"EXT-X-SERVER-CONTROL");a.B&&a.L?(a.m=a.lb?5*a.L<=c?Math.min(a.L,a.m):Math.min(c,a.m):Math.min(a.L,a.m),a.ta=b?Number(Bu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1015
- Au(b,"HOLD-BACK"):null,a.sa=c?Number(c.value):0);a.Ha=Math.max(d,a.Ha)}function Gv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ta)b=a.ta;else if(a.sa)b=a.sa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ha*c}a.l.Cg(0);a.l.Bf(b);a.l.Ec(!1)}
1016
- function Jv(a,b,c,d,e){var f=Gu(c,"EXT-X-MAP");if(!f)return null;var g=Bu(f,"URI"),h=Iu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.X.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Vv(Bu(m,"METHOD"))&&m.id<f.id&&(k=hw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=iw(h,f,l,k);a.X.set(g,b)}return a.X.get(g)}
1017
- function iw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new qi(function(){return a},e,f,null,null,null,d)}
1018
- function jw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Gu(l,"EXTINF"),n=0,q=0,p=null;d.rb.length&&!a.B&&Wa("Low-latency HLS 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.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Gu(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(u=eh(x.value))}var w=wi;Gu(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.rb.length)throw new Q(2,4,4024,"EXTINF");
1014
+ function rv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Hu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Hu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new Q(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Hu(b.g,"EXT-X-PART-INF"))a.L=Number(Cu(e,"PART-TARGET"));b=Hu(b.g,"EXT-X-SERVER-CONTROL");a.B&&a.L?(a.m=a.lb?5*a.L<=c?Math.min(a.L,a.m):Math.min(c,a.m):Math.min(a.L,a.m),a.ta=b?Number(Cu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1015
+ Bu(b,"HOLD-BACK"):null,a.sa=c?Number(c.value):0);a.Ha=Math.max(d,a.Ha)}function Hv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ta)b=a.ta;else if(a.sa)b=a.sa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ha*c}a.l.Dg(0);a.l.Cf(b);a.l.Ec(!1)}
1016
+ function Kv(a,b,c,d,e){var f=Hu(c,"EXT-X-MAP");if(!f)return null;var g=Cu(f,"URI"),h=Ju(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.Y.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Wv(Cu(m,"METHOD"))&&m.id<f.id&&(k=iw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=jw(h,f,l,k);a.Y.set(g,b)}return a.Y.get(g)}
1017
+ function jw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new qi(function(){return a},e,f,null,null,null,d)}
1018
+ function kw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Hu(l,"EXTINF"),n=0,q=0,p=null;d.rb.length&&!a.B&&Wa("Low-latency HLS 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.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Hu(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(u=eh(x.value))}var w=wi;Hu(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.rb.length)throw new Q(2,4,4024,"EXTINF");
1019
1019
  if(!a.B)return null}var z=[];x=!1;var v=null,B=!1,A=!1;if(a.B&&d.rb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.rb.length;F={Qc:F.Qc,yd:F.yd},J++){var I=d.rb[J],E=0==J?c:z[z.length-1],H=0==J?e:E.endTime,K=Number(Z(I,"DURATION"))||a.L;if(K){var M=H+K,O=0,N=null;"EXT-X-PRELOAD-HINT"==I.name?(O=(O=Z(I,"BYTERANGE-START"))?Number(O):0,(E=Z(I,"BYTERANGE-LENGTH"))?N=O+Number(E)-1:O&&(N=Number.MAX_SAFE_INTEGER)):
1020
- (O=Z(I,"BYTERANGE"),N=t(kw(E,O)),O=N.next().value,N=N.next().value);F.yd=Z(I,"URI");if(F.yd){E=wi;"YES"==Z(I,"GAP")&&(E=2,B=!0);F.Qc=null;var U=function(V){return function(){null==V.Qc&&(V.Qc=Iu(h(),V.yd,f));return V.Qc}}(F);n&&0<=O&&null!=N&&(v=U,x=!0);H=new vi(H,M,U,O,N,b,0,0,Infinity,[],"",null,D,E,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.ef(),A=!0);"YES"!=Z(I,"INDEPENDENT")&&0<J&&H.Zd();z.push(H);D&&(D+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
1021
- 1].endTime;else return null;x&&(B||0!=z[0].Aa?(x=!1,v=null):z=[]);(m=Gu(l,"EXT-X-BYTERANGE"))?(p=t(kw(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Aa,p=z[z.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=Gu(l,"EXT-X-TILES"))&&(c=Bu(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new vi(e,n,function(){if(v)return v();null==R&&(R=Iu(h(),d.h,f));return R||[]},q,p,b,0,0,Infinity,z,c,m,u,w,k,0<z.length&&!!d.h);x&&(a.lb=!0,b.lg(),A&&b.ef());return b}
1022
- function kw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
1023
- function ov(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Hu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Hu(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Gu(b.g,"EXT-X-SKIP"),q=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,p=m+q,u=0;fv(a)&&d.has(p)&&(u=d.get(p));0===u&&a.qa==Lv&&0<d.size&&!d.has(p)&&(u=a.l.qb());var x=[],w=null;n=[];for(var z=0;z<h.length;z++){var v=h[z],B=0==z?u:w.endTime;p=m+q+z;Gu(v.g,"EXT-X-DISCONTINUITY")&&l++;var A=t(v.g);for(var D=A.next();!D.done;D=A.next())D=D.value,"EXT-X-KEY"==D.name&&(Vv(Bu(D,"METHOD"))?
1024
- k=hw(a,D,b,f,e):k=void 0);d.set(p,B);A=Jv(a,b,v.g,f,e);!a.B&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.B=a.i.isLowLatencyMode());if(B=jw(a,A,w,v,B,e,c,f,k))(w=Hu(v.g,"EXT-X-BITRATE"))?n.push({bitrate:w,duration:B.endTime-B.startTime}):n.length&&(w=n.pop(),w.duration+=B.endTime-B.startTime,n.push(w)),w=B,B.j=l,sv(a,g)&&null!=a.I&&p<a.I||x.push(B)}b=void 0;n.length&&(b=n.reduce(function(F,J){return F+J.duration},0),b=Math.round(n.reduce(function(F,J){return F+J.bitrate*J.duration},0)/
1020
+ (O=Z(I,"BYTERANGE"),N=t(lw(E,O)),O=N.next().value,N=N.next().value);F.yd=Z(I,"URI");if(F.yd){E=wi;"YES"==Z(I,"GAP")&&(E=2,B=!0);F.Qc=null;var U=function(V){return function(){null==V.Qc&&(V.Qc=Ju(h(),V.yd,f));return V.Qc}}(F);n&&0<=O&&null!=N&&(v=U,x=!0);H=new vi(H,M,U,O,N,b,0,0,Infinity,[],"",null,D,E,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.ff(),A=!0);"YES"!=Z(I,"INDEPENDENT")&&0<J&&H.Zd();z.push(H);D&&(D+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
1021
+ 1].endTime;else return null;x&&(B||0!=z[0].Aa?(x=!1,v=null):z=[]);(m=Hu(l,"EXT-X-BYTERANGE"))?(p=t(lw(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Aa,p=z[z.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=Hu(l,"EXT-X-TILES"))&&(c=Cu(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new vi(e,n,function(){if(v)return v();null==R&&(R=Ju(h(),d.h,f));return R||[]},q,p,b,0,0,Infinity,z,c,m,u,w,k,0<z.length&&!!d.h);x&&(a.lb=!0,b.mg(),A&&b.ff());return b}
1022
+ function lw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
1023
+ function pv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Iu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Iu(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Hu(b.g,"EXT-X-SKIP"),q=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,p=m+q,u=0;gv(a)&&d.has(p)&&(u=d.get(p));0===u&&a.qa==Mv&&0<d.size&&!d.has(p)&&(u=a.l.qb());var x=[],w=null;n=[];for(var z=0;z<h.length;z++){var v=h[z],B=0==z?u:w.endTime;p=m+q+z;Hu(v.g,"EXT-X-DISCONTINUITY")&&l++;var A=t(v.g);for(var D=A.next();!D.done;D=A.next())D=D.value,"EXT-X-KEY"==D.name&&(Wv(Cu(D,"METHOD"))?
1024
+ k=iw(a,D,b,f,e):k=void 0);d.set(p,B);A=Kv(a,b,v.g,f,e);!a.B&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.B=a.i.isLowLatencyMode());if(B=kw(a,A,w,v,B,e,c,f,k))(w=Iu(v.g,"EXT-X-BITRATE"))?n.push({bitrate:w,duration:B.endTime-B.startTime}):n.length&&(w=n.pop(),w.duration+=B.endTime-B.startTime,n.push(w)),w=B,B.j=l,tv(a,g)&&null!=a.I&&p<a.I||x.push(B)}b=void 0;n.length&&(b=n.reduce(function(F,J){return F+J.duration},0),b=Math.round(n.reduce(function(F,J){return F+J.bitrate*J.duration},0)/
1025
1025
  b*1E3));if(n=x.some(function(F){return null!=F.h}))for(c={},d=0;d<x.length;c={Jc:c.Jc,Ic:c.Ic,td:c.td,Cb:c.Cb,Fc:c.Fc},d++)if(c.Cb=x[d],null==c.Cb.h)for(c.Ic=0,c.Jc=d,e=function(F){return function(){var J=x[F.Jc];if(J){if(null!=J.h)return J.h+F.Ic;F.Ic-=J.endTime-J.startTime;F.Jc+=1}return null}}(c),c.Fc=0,c.td=d,f=function(F){return function(){var J=x[F.td];if(J){J!=F.Cb&&(F.Fc+=J.endTime-J.startTime);if(null!=J.h)return J.h+F.Fc;--F.td}return null}}(c);null==c.Cb.h;)c.Cb.h=f(),null==c.Cb.h&&(c.Cb.h=
1026
- e());if(n)for(c=t(x),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!sv(a,g))for(a=t(x),d=a.next();!d.done;d=a.next())d.value.Ff(c);return{segments:x,bandwidth:b}}function Pv(a,b){if(a==Id){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
1027
- function Qv(a){return a==Id?"text/vtt":lw[a].mp4}
1028
- function gw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:g=ng;h=Math.trunc((d.segments.length-1)/2);k=Iu(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Pa.split(".").pop();n=lw[b];if((q=n[m])||(q=Iv[m])||(q=Pv(b,c)))return B.return(q);u=1;x=hg(k,a.g.retryParameters);ra(B,2);x.method="HEAD";return C(B,Kv(a,x,g,{type:u}),4);case 4:w=B.h;p=w.headers["content-type"];ta(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.u(3);break}x.method="GET";return C(B,
1029
- Kv(a,x,g,{type:u}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Qv(b))}})}function Fv(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function dv(a,b,c){return Kv(a,hg(b,a.g.retryParameters),0,{type:c?2:3})}
1030
- function bv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();fv(a)&&(d=(c-b)/1E3,a.bb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.bb)),a.s.W(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.W(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();G(h)}})}
1031
- function fv(a){return a.qa!=cv}function jv(a,b){a.qa=b;a.l&&a.l.Ec(!fv(a));fv(a)||a.s.stop()}function Kv(a,b,c,d){if(!a.N)throw new Q(2,7,7001);b=a.i.networkingEngine.request(c,b,d);cg(a.N,b);return b.promise}function Vv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1032
- function Xv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);g=Bu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Iu(d(),Bu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=yd(ud(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=hg(k,a.g.retryParameters),q=Kv(a,n,6),a.ia.set(m,
1033
- q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=yd(p.data);case 2:u="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){x=a.pa.get(e);D.u(5);break}w=gl(e.$(),e.$b(),e.Xb(),a.g.retryParameters);z=ng;return C(D,Kv(a,w,z,{type:0}),6);case 6:v=D.h,x=$u(v.data),a.pa.set(e,x);case 5:x&&(u=x);case 4:return B=new Map,B.set(u,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Ed(B,A))}})}P("shaka.hls.HlsParser",av);
1034
- var Iv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},lw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1035
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Wv={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);a=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Bd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
1036
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Bu(a,"URI");b=Vu(b);b=Ab(b.data);c=Bd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
1037
- b&&(c="cbcs");a=Bu(a,"URI");a=Vu(a);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ng(a,b,new Set,0);return Bd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},cv="VOD",fw="EVENT",Lv="LIVE",iv={Pg:cv,Pi:fw,Xi:Lv};li["application/x-mpegurl"]=function(){return new av};li["application/vnd.apple.mpegurl"]=function(){return new av};function mw(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function nw(a){if(a=ow(a))a:{a=t(Yg(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=Zg(b.value,"LA_URL")){a=Wg(b);break a}a=""}else a="";return a}
1038
- function ow(a){a=ud(Wg(a));a=mw(a).filter(function(b){return b.type===pw})[0];if(!a)return null;a=kd(a.value,!0);return(a=Pg(a,"WRMHEADER"))?a:null}var pw=1,qw=(new Map).set("com.microsoft.playready",nw).set("com.microsoft.playready.recommendation",nw).set("com.microsoft.playready.software",nw).set("com.microsoft.playready.hardware",nw);function rw(a){if(!sw){sw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);tw=uw("ftyp",b,d,b,c);b=uw("dref",vw);ww=uw("dinf",b)}this.g=a}
1039
- function xw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=uw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(yw+1));m=Math.floor(m%(yw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(zw(h,4)),[0,0,0,0],y(zw(n,4)),y(zw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(zw(k,2)),[0,0],y(zw(l,
1040
- 2)),[0,0]));h=uw("tkhd",h);k=uw;n=g.duration*g.timescale;l=Math.floor(n/(yw+1));n=Math.floor(n%(yw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(zw(g.timescale,4)),y(zw(l,4)),y(zw(n,4)),y(zw(m,2)),[0,0]));l=uw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Aw;break;case "audio":m=Bw}n=uw("hdlr",m);a:{switch(g.type){case "video":g=uw("minf",uw("vmhd",Cw),ww,Dw(g));break a;
1041
- case "audio":g=uw("minf",uw("smhd",Ew),ww,Dw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=zd.apply(rd,y(b));f=a.g[0];c=uw;d=f.duration*f.timescale;e=Math.floor(d/(yw+1));d=Math.floor(d%(yw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(zw(f.timescale,4)),y(zw(e,4)),y(zw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
1042
- 255]));e=uw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(zw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=uw("trex",k),h.call(g,k);a=zd.apply(rd,y(d));a=uw("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=zd.apply(rd,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(tw.byteLength+
1043
- a.byteLength);b.set(tw);b.set(a,tw.byteLength);return b}
1044
- function Dw(a){var b=uw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.oa.byteLength)var e=uw("avcC",a.oa);else{e=uw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Sa.length;n++){var q=Fw(a.Sa[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
1045
- 0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(zw(c,2)),y(zw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Gw(a);g=new Uint8Array([]);
1046
- a.encrypted&&(g=Hw(a),d="encv");c=uw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.oa.byteLength&&(c=uw("hvcC",a.oa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(zw(d,2)),y(zw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Gw(a),g=new Uint8Array([]),a.encrypted&&(g=Hw(a),e="encv"),c=uw(e,d,
1047
- c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=uw(".mp3",Iw(a));else if(a.codecs.includes("ac-3"))c=uw("dac3",a.ga),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Hw(a),d="enca"),a=uw(d,Iw(a),c,e);else if(a.codecs.includes("ec-3"))c=uw("dec3",a.ga),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Hw(a),d="enca"),a=uw(d,Iw(a),c,e);else if(a.codecs.includes("opus"))c=uw("dOps",a.ga),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Hw(a),d="enca"),a=uw(d,Iw(a),c,e);else{if(0<a.ga.byteLength)c=uw("esds",
1048
- a.ga);else{c=uw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Fd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(y(zw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Hw(a),d="enca");
1049
- a=uw(d,Iw(a),c,e)}c=a}a=uw("stsd",Jw,c);return b("stbl",a,uw("stts",Kw),uw("stsc",Lw),uw("stsz",Mw),uw("stco",Nw))}function Gw(a){if(!a.xa&&!a.ya)return new Uint8Array([]);var b=a.ya;a=new Uint8Array([].concat(y(zw(a.xa,4)),y(zw(b,4))));return uw("pasp",a)}function Iw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(zw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1050
- function Hw(a){var b=uw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(y(zw(d,4))));c=uw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=uw("schm",d);e=uw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.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=Fw(h.value)}a=new Uint8Array([0,
1051
- 0,0,0,0,0,1,8]);f=uw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1052
- function Ow(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=uw;var g=new Uint8Array([0,0,0,0].concat(y(zw(c.data?c.data.jb:0,4))));g=uw("mfhd",g);var h;var k=c.data?c.data.Ra:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ka<<4|m.Na<<2|m.Ma}k=uw("sdtp",l);var n=k.length+92;l=uw;h=new Uint8Array([0,0,0,58].concat(y(zw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=uw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1053
- 0;var q=Math.floor(m%(yw+1));m=new Uint8Array([1,0,0,0].concat(y(zw(Math.floor(m/(yw+1)),4)),y(zw(q,4))));m=uw("tfdt",m);var p=n;n=c.data?c.data.Ra:[];q=n.length;var u=12+16*q,x=new Uint8Array(u);p+=8+u;x.set(["video"===c.type?1:0,0,15,1].concat(y(zw(q,4)),y(zw(p,4))),0);for(p=0;p<q;p++){var w=n[p];u=zw(w.duration,4);var z=zw(w.size,4),v=w.flags;w=zw(w.Ta,4);x.set([].concat(y(u),y(z),[v.Va<<2|v.Ka,v.Na<<6|v.Ma<<4|v.Wa,v.Ja&61440,v.Ja&15],y(w)),12+16*p)}n=uw("trun",x);k=l("traf",h,m,n,k);f=f("moof",
1054
- g,k);e.call(d,b,[f,Pw(c)])}return zd.apply(rd,y(b))}function Pw(a){a=(a.data?a.data.Ra:[]).map(function(b){return b.data});a=zd.apply(rd,y(a));return uw("mdat",a)}function zw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Fw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
1055
- function uw(a){var b=Ha.apply(1,arguments),c=Qw[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Qw[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
1056
- var sw=!1,yw=Math.pow(2,32)-1,Qw={},Aw=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]),Bw=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]),Kw=new Uint8Array([0,0,0,0,0,0,0,0]),Lw=new Uint8Array([0,0,0,0,0,0,0,0]),Nw=new Uint8Array([0,0,0,0,0,0,0,0]),Mw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Cw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ew=new Uint8Array([0,
1057
- 0,0,0,0,0,0,0]),Jw=new Uint8Array([0,0,0,0,0,0,0,1]),tw=new Uint8Array([]),vw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ww=new Uint8Array([]);function Rw(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Qa(5);this.o=new Mc(function(){Sw(a)});this.A=new bg;this.m=new Map}r=Rw.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return L(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Tw(c),2);if(!c.h)throw new Q(2,7,7001);return d.return(c.j)})};
1058
- function Sw(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),C(c,Tw(a),4);case 4:ta(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();G(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1059
- r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Tw(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);G(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1060
- function Tw(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=hg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),cg(a.A,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=$l){pb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Lt(m,"SmoothStreamingMedia");if(!m)throw new Q(2,4,4046,
1061
- l);n(m);m=nd(m.outerHTML)}var q=Og(m,"SmoothStreamingMedia");if(!q)throw new Q(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=am&&l(q);a.i||(a.i=new hk(null,0));if(l=bh(q,"IsLive",lh,!1))throw new Q(2,4,4047);a.i.Ec(!l);n=bh(q,"TimeScale",jh,1E7);m=bh(q,"DVRWindowLength",jh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=bh(q,"CanSeek",lh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.je(p);m=bh(q,
1062
- "Duration",jh,Infinity);l||a.i.Za(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Vg(q,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];p=t(p);for(u=p.next();!u.done;u=p.next())m=m.concat(Vg(u.value,"ProtectionHeader"));if(m.length){p=[];for(u=0;u<m.length;u++){var x=m[u],w=x.attributes.SystemID.toLowerCase(),z=n[w];if(z){var v=ow(x);if(v)a:{v=t(Yg(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=Zg(B.value,"KID")){v=ud(Wg(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
1063
- v[4],v[7],v[6]].concat(y(v.slice(8))));v=yd(v);break a}v=null}else v=null;B=ud(Wg(x));w=vd(w.replace(/-/g,""));w=[{initData:Ng(B,w,new Set,0),initDataType:"cenc",keyId:v}];w=Bd(z,"cenc",w);v&&w.keyIds.add(v);if(z=qw.get(z))w.licenseServerUri=z(x);p.push(w)}}n=p}else n=[];u=n;p=[];n=[];m=[];q=Vg(q,"StreamIndex");q=t(q);for(x=q.next();!x.done;x=q.next()){x=x.value;z=Vg(x,"QualityLevel");w=l.timescale;v=l.duration;B=Vg(x,"c");for(var A=[],D=0,F=0;F<B.length;++F){var J=B[F],I=B[F+1],E=bh(J,"t",jh),H=
1064
- bh(J,"d",jh);J=bh(J,"r",hh);if(!H)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=bh(I,"t",jh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/H)-1}else{if(Infinity==v)break;else if(E/w>=v)break;J=Math.ceil((v*w-E)/H)-1}for(I=0;I<=J;++I)D=E+H,A.push({start:E/w,end:D/w,Kf:E}),E=D}w=A;z=t(z);for(v=z.next();!v.done;v=z.next())(v=Uw(a,x,v.value,w,u,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Id||a.g.disableText||m.push(v):n.push(v):p.push(v))}q=[];p=t(0<p.length?
1026
+ e());if(n)for(c=t(x),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!tv(a,g))for(a=t(x),d=a.next();!d.done;d=a.next())d.value.Gf(c);return{segments:x,bandwidth:b}}function Qv(a,b){if(a==Id){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
1027
+ function Rv(a){return a==Id?"text/vtt":mw[a].mp4}
1028
+ function hw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:g=ng;h=Math.trunc((d.segments.length-1)/2);k=Ju(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Pa.split(".").pop();n=mw[b];if((q=n[m])||(q=Jv[m])||(q=Qv(b,c)))return B.return(q);u=1;x=hg(k,a.g.retryParameters);ra(B,2);x.method="HEAD";return C(B,Lv(a,x,g,{type:u}),4);case 4:w=B.h;p=w.headers["content-type"];ta(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.u(3);break}x.method="GET";return C(B,
1029
+ Lv(a,x,g,{type:u}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Rv(b))}})}function Gv(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function ev(a,b,c){return Lv(a,hg(b,a.g.retryParameters),0,{type:c?2:3})}
1030
+ function cv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();gv(a)&&(d=(c-b)/1E3,a.bb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.bb)),a.s.X(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.X(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();G(h)}})}
1031
+ function gv(a){return a.qa!=dv}function kv(a,b){a.qa=b;a.l&&a.l.Ec(!gv(a));gv(a)||a.s.stop()}function Lv(a,b,c,d){if(!a.N)throw new Q(2,7,7001);b=a.i.networkingEngine.request(c,b,d);cg(a.N,b);return b.promise}function Wv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1032
+ function Yv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);g=Cu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Ju(d(),Cu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=wd(ud(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=hg(k,a.g.retryParameters),q=Lv(a,n,6),a.ia.set(m,
1033
+ q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=wd(p.data);case 2:u="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){x=a.pa.get(e);D.u(5);break}w=hl(e.$(),e.ac(),e.Yb(),a.g.retryParameters);z=ng;return C(D,Lv(a,w,z,{type:0}),6);case 6:v=D.h,x=av(v.data),a.pa.set(e,x);case 5:x&&(u=x);case 4:return B=new Map,B.set(u,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Cd(B,A))}})}P("shaka.hls.HlsParser",bv);
1034
+ var Jv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},mw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1035
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Xv={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);a=Cu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Bd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
1036
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Cu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Cu(a,"URI");b=Wu(b);b=Ab(b.data);c=Bd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Cu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
1037
+ b&&(c="cbcs");a=Cu(a,"URI");a=Wu(a);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ng(a,b,new Set,0);return Bd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},dv="VOD",gw="EVENT",Mv="LIVE",jv={Qg:dv,Qi:gw,Yi:Mv};li["application/x-mpegurl"]=function(){return new bv};li["application/vnd.apple.mpegurl"]=function(){return new bv};function nw(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function ow(a){if(a=pw(a))a:{a=t(Yg(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=Zg(b.value,"LA_URL")){a=Wg(b);break a}a=""}else a="";return a}
1038
+ function pw(a){a=ud(Wg(a));a=nw(a).filter(function(b){return b.type===qw})[0];if(!a)return null;a=id(a.value,!0);return(a=Pg(a,"WRMHEADER"))?a:null}var qw=1,rw=(new Map).set("com.microsoft.playready",ow).set("com.microsoft.playready.recommendation",ow).set("com.microsoft.playready.software",ow).set("com.microsoft.playready.hardware",ow);function sw(a){if(!tw){tw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);uw=vw("ftyp",b,d,b,c);b=vw("dref",ww);xw=vw("dinf",b)}this.g=a}
1039
+ function yw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=vw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(zw+1));m=Math.floor(m%(zw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Aw(h,4)),[0,0,0,0],y(Aw(n,4)),y(Aw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(Aw(k,2)),[0,0],y(Aw(l,
1040
+ 2)),[0,0]));h=vw("tkhd",h);k=vw;n=g.duration*g.timescale;l=Math.floor(n/(zw+1));n=Math.floor(n%(zw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Aw(g.timescale,4)),y(Aw(l,4)),y(Aw(n,4)),y(Aw(m,2)),[0,0]));l=vw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Bw;break;case "audio":m=Cw}n=vw("hdlr",m);a:{switch(g.type){case "video":g=vw("minf",vw("vmhd",Dw),xw,Ew(g));break a;
1041
+ case "audio":g=vw("minf",vw("smhd",Fw),xw,Ew(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=zd.apply(rd,y(b));f=a.g[0];c=vw;d=f.duration*f.timescale;e=Math.floor(d/(zw+1));d=Math.floor(d%(zw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Aw(f.timescale,4)),y(Aw(e,4)),y(Aw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
1042
+ 255]));e=vw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(Aw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=vw("trex",k),h.call(g,k);a=zd.apply(rd,y(d));a=vw("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=zd.apply(rd,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(uw.byteLength+
1043
+ a.byteLength);b.set(uw);b.set(a,uw.byteLength);return b}
1044
+ function Ew(a){var b=vw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.oa.byteLength)var e=vw("avcC",a.oa);else{e=vw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ta.length;n++){var q=Gw(a.Ta[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
1045
+ 0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Aw(c,2)),y(Aw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Hw(a);g=new Uint8Array([]);
1046
+ a.encrypted&&(g=Iw(a),d="encv");c=vw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.oa.byteLength&&(c=vw("hvcC",a.oa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Aw(d,2)),y(Aw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Hw(a),g=new Uint8Array([]),a.encrypted&&(g=Iw(a),e="encv"),c=vw(e,d,
1047
+ c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=vw(".mp3",Jw(a));else if(a.codecs.includes("ac-3"))c=vw("dac3",a.ga),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Iw(a),d="enca"),a=vw(d,Jw(a),c,e);else if(a.codecs.includes("ec-3"))c=vw("dec3",a.ga),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Iw(a),d="enca"),a=vw(d,Jw(a),c,e);else if(a.codecs.includes("opus"))c=vw("dOps",a.ga),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Iw(a),d="enca"),a=vw(d,Jw(a),c,e);else{if(0<a.ga.byteLength)c=vw("esds",
1048
+ a.ga);else{c=vw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Fd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(y(Aw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Iw(a),d="enca");
1049
+ a=vw(d,Jw(a),c,e)}c=a}a=vw("stsd",Kw,c);return b("stbl",a,vw("stts",Lw),vw("stsc",Mw),vw("stsz",Nw),vw("stco",Ow))}function Hw(a){if(!a.xa&&!a.ya)return new Uint8Array([]);var b=a.ya;a=new Uint8Array([].concat(y(Aw(a.xa,4)),y(Aw(b,4))));return vw("pasp",a)}function Jw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(Aw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1050
+ function Iw(a){var b=vw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(y(Aw(d,4))));c=vw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=vw("schm",d);e=vw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.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=Gw(h.value)}a=new Uint8Array([0,
1051
+ 0,0,0,0,0,1,8]);f=vw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1052
+ function Pw(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=vw;var g=new Uint8Array([0,0,0,0].concat(y(Aw(c.data?c.data.jb:0,4))));g=vw("mfhd",g);var h;var k=c.data?c.data.Ra:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ka<<4|m.Na<<2|m.Ma}k=vw("sdtp",l);var n=k.length+92;l=vw;h=new Uint8Array([0,0,0,58].concat(y(Aw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=vw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1053
+ 0;var q=Math.floor(m%(zw+1));m=new Uint8Array([1,0,0,0].concat(y(Aw(Math.floor(m/(zw+1)),4)),y(Aw(q,4))));m=vw("tfdt",m);var p=n;n=c.data?c.data.Ra:[];q=n.length;var u=12+16*q,x=new Uint8Array(u);p+=8+u;x.set(["video"===c.type?1:0,0,15,1].concat(y(Aw(q,4)),y(Aw(p,4))),0);for(p=0;p<q;p++){var w=n[p];u=Aw(w.duration,4);var z=Aw(w.size,4),v=w.flags;w=Aw(w.Ua,4);x.set([].concat(y(u),y(z),[v.Wa<<2|v.Ka,v.Na<<6|v.Ma<<4|v.Xa,v.Ja&61440,v.Ja&15],y(w)),12+16*p)}n=vw("trun",x);k=l("traf",h,m,n,k);f=f("moof",
1054
+ g,k);e.call(d,b,[f,Qw(c)])}return zd.apply(rd,y(b))}function Qw(a){a=(a.data?a.data.Ra:[]).map(function(b){return b.data});a=zd.apply(rd,y(a));return vw("mdat",a)}function Aw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Gw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
1055
+ function vw(a){var b=Ha.apply(1,arguments),c=Rw[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Rw[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
1056
+ var tw=!1,zw=Math.pow(2,32)-1,Rw={},Bw=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]),Cw=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]),Lw=new Uint8Array([0,0,0,0,0,0,0,0]),Mw=new Uint8Array([0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,0,0,0,0,0,0,0]),Nw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Dw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Fw=new Uint8Array([0,
1057
+ 0,0,0,0,0,0,0]),Kw=new Uint8Array([0,0,0,0,0,0,0,1]),uw=new Uint8Array([]),ww=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),xw=new Uint8Array([]);function Sw(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Qa(5);this.o=new Mc(function(){Tw(a)});this.A=new bg;this.m=new Map}r=Sw.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return L(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Uw(c),2);if(!c.h)throw new Q(2,7,7001);return d.return(c.j)})};
1058
+ function Tw(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),C(c,Uw(a),4);case 4:ta(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();G(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1059
+ r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Uw(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);G(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1060
+ function Uw(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=hg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),cg(a.A,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=am){pb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Mt(m,"SmoothStreamingMedia");if(!m)throw new Q(2,4,4046,
1061
+ l);n(m);m=nd(m.outerHTML)}var q=Og(m,"SmoothStreamingMedia");if(!q)throw new Q(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=bm&&l(q);a.i||(a.i=new hk(null,0));if(l=bh(q,"IsLive",lh,!1))throw new Q(2,4,4047);a.i.Ec(!l);n=bh(q,"TimeScale",jh,1E7);m=bh(q,"DVRWindowLength",jh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=bh(q,"CanSeek",lh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.ke(p);m=bh(q,
1062
+ "Duration",jh,Infinity);l||a.i.$a(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Vg(q,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];p=t(p);for(u=p.next();!u.done;u=p.next())m=m.concat(Vg(u.value,"ProtectionHeader"));if(m.length){p=[];for(u=0;u<m.length;u++){var x=m[u],w=x.attributes.SystemID.toLowerCase(),z=n[w];if(z){var v=pw(x);if(v)a:{v=t(Yg(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=Zg(B.value,"KID")){v=ud(Wg(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
1063
+ v[4],v[7],v[6]].concat(y(v.slice(8))));v=wd(v);break a}v=null}else v=null;B=ud(Wg(x));w=vd(w.replace(/-/g,""));w=[{initData:Ng(B,w,new Set,0),initDataType:"cenc",keyId:v}];w=Bd(z,"cenc",w);v&&w.keyIds.add(v);if(z=rw.get(z))w.licenseServerUri=z(x);p.push(w)}}n=p}else n=[];u=n;p=[];n=[];m=[];q=Vg(q,"StreamIndex");q=t(q);for(x=q.next();!x.done;x=q.next()){x=x.value;z=Vg(x,"QualityLevel");w=l.timescale;v=l.duration;B=Vg(x,"c");for(var A=[],D=0,F=0;F<B.length;++F){var J=B[F],I=B[F+1],E=bh(J,"t",jh),H=
1064
+ bh(J,"d",jh);J=bh(J,"r",hh);if(!H)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=bh(I,"t",jh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/H)-1}else{if(Infinity==v)break;else if(E/w>=v)break;J=Math.ceil((v*w-E)/H)-1}for(I=0;I<=J;++I)D=E+H,A.push({start:E/w,end:D/w,Lf:E}),E=D}w=A;z=t(z);for(v=z.next();!v.done;v=z.next())(v=Vw(a,x,v.value,w,u,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Id||a.g.disableText||m.push(v):n.push(v):p.push(v))}q=[];p=t(0<p.length?
1065
1065
  p:[null]);for(u=p.next();!u.done;u=p.next())for(u=u.value,x=t(0<n.length?n:[null]),v=x.next();!v.done;v=x.next())z=q,w=z.push,v=v.value,B=0,u&&u.bandwidth&&0<u.bandwidth&&(B+=u.bandwidth),v&&v.bandwidth&&0<v.bandwidth&&(B+=v.bandwidth),v={id:a.s++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!v&&v.primary,audio:u,video:v,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,v);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
1066
1066
  l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},a.i.Xd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);G(k)})}
1067
- function Uw(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Wa("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=bh(c,"Bitrate",ih),m=bh(c,"MaxWidth",ih),n=bh(c,"MaxHeight",ih),q=bh(c,"Channels",ih),p=bh(c,"SamplingRate",ih),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var x=a.i.getDuration();a.i.Za(Math.min(u,x));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1067
+ function Vw(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Wa("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=bh(c,"Bitrate",ih),m=bh(c,"MaxWidth",ih),n=bh(c,"MaxHeight",ih),q=bh(c,"Channels",ih),p=bh(c,"SamplingRate",ih),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var x=a.i.getDuration();a.i.$a(Math.min(u,x));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1068
1068
  closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:qe(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
1069
- mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Vw[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Wa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Ww.includes(e.toUpperCase()))return Wa("Codec not supported:",
1070
- e),null;c=Xw(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=Yw(e,c);break;case "video":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=Zw(c);break;case "text":if(w.type=Id,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Md(w.mimeType,w.codecs));
1071
- w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var z=a.m.get(w.id);else z=[],"video"==w.type&&(z=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Sa:z,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:w},z=xw(new rw([z])),a.m.set(w.id,z);z=$w(a,new qi(function(){return[]},0,null,null,void 0,
1069
+ mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Ww[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Wa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Xw.includes(e.toUpperCase()))return Wa("Codec not supported:",
1070
+ e),null;c=Yw(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=Zw(e,c);break;case "video":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=$w(c);break;case "text":if(w.type=Id,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Md(w.mimeType,w.codecs));
1071
+ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var z=a.m.get(w.id);else z=[],"video"==w.type&&(z=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Ta:z,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:w},z=yw(new sw([z])),a.m.set(w.id,z);z=ax(a,new qi(function(){return[]},0,null,null,void 0,
1072
1072
  z),w,b,d);w.segmentIndex=new Dk(z);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
1073
- function Xw(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1074
- b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Yw(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Zw(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1075
- function $w(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Pc:g.Pc},h=e.next())g.Pc=h.value,d.push(new vi(g.Pc.start,g.Pc.end,function(k){return function(){return Ad(a.l,[f.replace("{start time}",String(k.Pc.Kf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Rw);var Ww="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Vw={CAPT:"main",SUBT:"alternate",DESC:"main"};
1076
- li["application/vnd.ms-sstr+xml"]=function(){return new Rw};function ax(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=md(b)}catch(g){}throw new Q(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function bx(){}function cx(a,b,c,d,e){var f=new dx;ug(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ex,h={Rf:!1,Jg:!1};a=fx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Sf(a,function(){h.Rf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Jg=!0;g.abort()});k.W(b/1E3);a.finally(function(){k.stop()})}return a}
1077
- function fx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return h=gx,k=hx,q=n=0,p=Date.now(),ra(A,2),C(A,h(a,c),4);case 4:l=A.h;f(ix(l.headers));if("HEAD"==c.method){A.u(5);break}u=l.clone().body.getReader();w=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;z=function(D){function F(){var J,I;return L(function(E){switch(E.g){case 1:return ra(E,2),C(E,u.read(),4);case 4:J=E.h;ta(E,3);break;case 2:return va(E),E.return();case 3:if(J.done){E.u(5);break}n+=
1078
- J.value.byteLength;if(!g){E.u(5);break}return C(E,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)e(I-p,n-q,w-n),q=n,p=I;J.done?D.close():(D.enqueue(J.value),F());G(E)}})}F()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Rf)throw new Q(1,1,7001,a,b);if(d.Jg)throw new Q(1,1,1003,a,b);throw new Q(1,1,1002,a,v,b);case 3:return B=ix(l.headers),A.return(ax(B,m,l.status,a,l.url,b))}})}
1079
- function ix(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function jx(){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||!window.AbortController)}P("shaka.net.HttpFetchPlugin",bx);bx.isSupported=jx;bx.parse=cx;var gx=window.fetch,ex=window.AbortController,hx=window.ReadableStream,dx=window.Headers;
1080
- jx()&&(eg("http",cx,2,!0),eg("https",cx,2,!0),eg("blob",cx,2,!0));function kx(){}
1081
- function lx(a,b,c,d,e){var f=new mx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new Q(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=nx(f);e(p);n=!0}};f.onload=function(){var p=nx(f),u=f.response;try{var x=ax(p,u,f.status,a,f.responseURL,c);l(x)}catch(w){m(w)}};f.onerror=function(p){m(new Q(1,1,1002,a,p,
1073
+ function Yw(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1074
+ b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Zw(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function $w(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1075
+ function ax(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Pc:g.Pc},h=e.next())g.Pc=h.value,d.push(new vi(g.Pc.start,g.Pc.end,function(k){return function(){return Ad(a.l,[f.replace("{start time}",String(k.Pc.Lf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Sw);var Xw="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Ww={CAPT:"main",SUBT:"alternate",DESC:"main"};
1076
+ li["application/vnd.ms-sstr+xml"]=function(){return new Sw};function bx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=md(b)}catch(g){}throw new Q(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function cx(){}function dx(a,b,c,d,e){var f=new ex;ug(b.headers).forEach(function(l,m){f.append(m,l)});var g=new fx,h={Sf:!1,Kg:!1};a=gx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Sf(a,function(){h.Sf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Kg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
1077
+ function gx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return h=hx,k=ix,q=n=0,p=Date.now(),ra(A,2),C(A,h(a,c),4);case 4:l=A.h;f(jx(l.headers));if("HEAD"==c.method){A.u(5);break}u=l.clone().body.getReader();w=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;z=function(D){function F(){var J,I;return L(function(E){switch(E.g){case 1:return ra(E,2),C(E,u.read(),4);case 4:J=E.h;ta(E,3);break;case 2:return va(E),E.return();case 3:if(J.done){E.u(5);break}n+=
1078
+ J.value.byteLength;if(!g){E.u(5);break}return C(E,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)e(I-p,n-q,w-n),q=n,p=I;J.done?D.close():(D.enqueue(J.value),F());G(E)}})}F()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Sf)throw new Q(1,1,7001,a,b);if(d.Kg)throw new Q(1,1,1003,a,b);throw new Q(1,1,1002,a,v,b);case 3:return B=jx(l.headers),A.return(bx(B,m,l.status,a,l.url,b))}})}
1079
+ function jx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function kx(){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||!window.AbortController)}P("shaka.net.HttpFetchPlugin",cx);cx.isSupported=kx;cx.parse=dx;var hx=window.fetch,fx=window.AbortController,ix=window.ReadableStream,ex=window.Headers;
1080
+ kx()&&(eg("http",dx,2,!0),eg("https",dx,2,!0),eg("blob",dx,2,!0));function lx(){}
1081
+ function mx(a,b,c,d,e){var f=new nx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new Q(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=ox(f);e(p);n=!0}};f.onload=function(){var p=ox(f),u=f.response;try{var x=bx(p,u,f.status,a,f.responseURL,c);l(x)}catch(w){m(w)}};f.onerror=function(p){m(new Q(1,1,1002,a,p,
1082
1082
  c))};f.ontimeout=function(){m(new Q(1,1,1003,a,c))};f.onprogress=function(p){var u=Date.now();if(100<u-g||p.lengthComputable&&p.loaded==p.total)d(u-g,p.loaded-h,p.total-p.loaded),h=p.loaded,g=u};for(var q in b.headers)f.setRequestHeader(q.toLowerCase(),b.headers[q]);f.send(b.body)});return new Sf(k,function(){f.abort();return Promise.resolve()})}
1083
- function nx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",kx);kx.parse=lx;var mx=window.XMLHttpRequest;eg("http",lx,1,!0);eg("https",lx,1,!0);eg("blob",lx,1,!0);function ox(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function px(a){return a.$().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ja}function qx(a,b){return gl(a.g.$(),a.g.Aa,a.g.ja,b.streaming.retryParameters)};function rx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function sx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}rx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function tx(a){var b=this;this.o=a;this.j=new Map;this.i=new pg(function(){return ux(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new rx}tx.prototype.destroy=function(){return this.i.destroy()};function vx(a,b,c){a.m=b;a.l=c}function ux(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1084
- function wx(a,b,c,d,e,f){qg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return L(function(u){if(1==u.g)return C(u,xx(a,c),2);h=u.h;if(a.i.g)throw new Q(2,9,7001);if(e)for(m in k=Ab(h),l=new Mg(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function yx(a){return L(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1085
- function xx(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=ng,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function zx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Rf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}zx.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return C(b,a.g,4)}if(2!=b.g)return ta(b,0);va(b);G(b)})};
1086
- function Ax(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();G(g)})}})}zx.prototype.store=function(){return this.h};zx.prototype.promise=function(){return this.g};function Bx(a){this.h=a;this.g=[]}Bx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Cx(a,b){return Dx(a,b,"readwrite")}function Dx(a,b,c){c=a.h.transaction([b],c);var d=new zx(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function Ex(a,b,c){this.h=new Bx(a);this.i=b;this.g=c}r=Ex.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Fx(this.i)};r.removeSegments=function(a,b){return Gx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Hx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Tf(e)}))})};r.addManifests=function(){return Fx(this.g)};
1087
- r.updateManifest=function(){return Promise.reject(new Q(2,9,9016,"Cannot modify values in "+this.g))};function Ix(a,b,c){a=Cx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Cx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Gx(this,this.g,a,b)};
1088
- r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Hx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Yc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Dx(a.h,a.g,"readonly"),c=new Map,C(d,Ax(b,function(e,f){var g;return L(function(h){if(1==h.g)return C(h,a.Yc(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Tf=function(a){return a};r.Yc=function(a){return Promise.resolve(a)};
1089
- function Fx(a){return Promise.reject(new Q(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Cx(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={zd:g.zd},k=h.next())l=k.value,g.zd=e.add(l),g.zd.onsuccess=function(n){return function(){f.push(n.zd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
1090
- function Gx(a,b,c,d){a=Cx(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={xd:e.xd},f=c.next())e.xd=f.value,b.delete(e.xd).onsuccess=function(g){return function(){return d(g.xd)}}(e);return a.promise()}
1091
- function Hx(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Dx(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Nc:h.Nc,Lc:h.Lc},l=k.next())h.Lc=l.value,h.Nc=e.get(h.Lc),h.Nc.onsuccess=function(n){return function(){void 0==n.Nc.result&&g.push(n.Lc);f[n.Lc]=n.Nc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new Q(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Jx(a){this.g=new Bx(a)}Jx.prototype.destroy=function(){return this.g.destroy()};Jx.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Dx(a.g,"session-ids","readonly"),c=[],C(d,Ax(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Jx.prototype.add=function(a){var b=Cx(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1092
- Jx.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Cx(b.g,"session-ids"),C(d,Ax(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Kx(){this.g=new Map}Kx.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Kx.prototype.init=function(){var a=this;Lx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1093
- function Mx(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{fb:d,Ba:f},Ba:e})})});if(b)return b;throw new Q(2,9,9013,"Could not find a cell that supports add-operations");}function Nx(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({fb:d,Ba:f},e)})})}
1094
- function Ox(a,b,c){a=a.g.get(b);if(!a)throw new Q(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new Q(2,9,9013,"Could not find cell with name "+c);return b}function Px(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Qx(a){var b=Array.from(a.g.keys());if(!b.length)throw new Q(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1095
- function Rx(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Lx,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Sx(a,b){Lx.set(a,b)}P("shaka.offline.StorageMuxer",Kx);Kx.unregister=function(a){Lx.delete(a)};Kx.register=Sx;Kx.prototype.destroy=Kx.prototype.destroy;var Lx=new Map;function Tx(){Ex.apply(this,arguments)}na(Tx,Ex);Tx.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=Cx(c.h,c.g);e=d.store();f=new Rf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new Q(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
1096
- Tx.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Ux(a.periods[c],e),b.push(f);return C(h,kt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1097
- function Ux(a,b){Vx(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Wx(e,a.startTime,b)})}
1098
- function Wx(a,b,c){var d=a.initSegmentUri?Xx(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1099
- Xx(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Tx.prototype.Tf=function(a){return{data:a.data}};
1100
- function Xx(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new Q(2,9,9004,"Could not parse uri "+a);}
1101
- function Vx(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
1102
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Yx(){Ex.apply(this,arguments)}na(Yx,Ex);
1103
- Yx.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Zx(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,kt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1083
+ function ox(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",lx);lx.parse=mx;var nx=window.XMLHttpRequest;eg("http",mx,1,!0);eg("https",mx,1,!0);eg("blob",mx,1,!0);function px(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function qx(a){return a.$().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ja}function rx(a,b){return hl(a.g.$(),a.g.Aa,a.g.ja,b.streaming.retryParameters)};function sx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function tx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}sx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function ux(a){var b=this;this.o=a;this.j=new Map;this.i=new pg(function(){return vx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new sx}ux.prototype.destroy=function(){return this.i.destroy()};function wx(a,b,c){a.m=b;a.l=c}function vx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1084
+ function xx(a,b,c,d,e,f){qg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return L(function(u){if(1==u.g)return C(u,yx(a,c),2);h=u.h;if(a.i.g)throw new Q(2,9,7001);if(e)for(m in k=Ab(h),l=new Mg(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function zx(a){return L(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1085
+ function yx(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=ng,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function Ax(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Rf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ax.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return C(b,a.g,4)}if(2!=b.g)return ta(b,0);va(b);G(b)})};
1086
+ function Bx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();G(g)})}})}Ax.prototype.store=function(){return this.h};Ax.prototype.promise=function(){return this.g};function Cx(a){this.h=a;this.g=[]}Cx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Dx(a,b){return Ex(a,b,"readwrite")}function Ex(a,b,c){c=a.h.transaction([b],c);var d=new Ax(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function Fx(a,b,c){this.h=new Cx(a);this.i=b;this.g=c}r=Fx.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Gx(this.i)};r.removeSegments=function(a,b){return Hx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Ix(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Uf(e)}))})};r.addManifests=function(){return Gx(this.g)};
1087
+ r.updateManifest=function(){return Promise.reject(new Q(2,9,9016,"Cannot modify values in "+this.g))};function Jx(a,b,c){a=Dx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Dx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Hx(this,this.g,a,b)};
1088
+ r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Ix(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Yc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Ex(a.h,a.g,"readonly"),c=new Map,C(d,Bx(b,function(e,f){var g;return L(function(h){if(1==h.g)return C(h,a.Yc(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Uf=function(a){return a};r.Yc=function(a){return Promise.resolve(a)};
1089
+ function Gx(a){return Promise.reject(new Q(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Dx(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={zd:g.zd},k=h.next())l=k.value,g.zd=e.add(l),g.zd.onsuccess=function(n){return function(){f.push(n.zd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
1090
+ function Hx(a,b,c,d){a=Dx(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={xd:e.xd},f=c.next())e.xd=f.value,b.delete(e.xd).onsuccess=function(g){return function(){return d(g.xd)}}(e);return a.promise()}
1091
+ function Ix(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Ex(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Nc:h.Nc,Lc:h.Lc},l=k.next())h.Lc=l.value,h.Nc=e.get(h.Lc),h.Nc.onsuccess=function(n){return function(){void 0==n.Nc.result&&g.push(n.Lc);f[n.Lc]=n.Nc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new Q(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Kx(a){this.g=new Cx(a)}Kx.prototype.destroy=function(){return this.g.destroy()};Kx.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Ex(a.g,"session-ids","readonly"),c=[],C(d,Bx(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Kx.prototype.add=function(a){var b=Dx(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1092
+ Kx.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Dx(b.g,"session-ids"),C(d,Bx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Lx(){this.g=new Map}Lx.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Lx.prototype.init=function(){var a=this;Mx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1093
+ function Nx(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{fb:d,Ba:f},Ba:e})})});if(b)return b;throw new Q(2,9,9013,"Could not find a cell that supports add-operations");}function Ox(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({fb:d,Ba:f},e)})})}
1094
+ function Px(a,b,c){a=a.g.get(b);if(!a)throw new Q(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new Q(2,9,9013,"Could not find cell with name "+c);return b}function Qx(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Rx(a){var b=Array.from(a.g.keys());if(!b.length)throw new Q(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1095
+ function Sx(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Mx,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Tx(a,b){Mx.set(a,b)}P("shaka.offline.StorageMuxer",Lx);Lx.unregister=function(a){Mx.delete(a)};Lx.register=Tx;Lx.prototype.destroy=Lx.prototype.destroy;var Mx=new Map;function Ux(){Fx.apply(this,arguments)}na(Ux,Fx);Ux.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=Dx(c.h,c.g);e=d.store();f=new Rf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new Q(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
1096
+ Ux.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Vx(a.periods[c],e),b.push(f);return C(h,lt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1097
+ function Vx(a,b){Wx(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Xx(e,a.startTime,b)})}
1098
+ function Xx(a,b,c){var d=a.initSegmentUri?Yx(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1099
+ Yx(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Ux.prototype.Uf=function(a){return{data:a.data}};
1100
+ function Yx(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new Q(2,9,9004,"Could not parse uri "+a);}
1101
+ function Wx(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
1102
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Zx(){Fx.apply(this,arguments)}na(Zx,Fx);
1103
+ Zx.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push($x(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,lt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1104
1104
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1105
- function Zx(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1106
- appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function $x(){Ex.apply(this,arguments)}na($x,Ex);r=$x.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Ix(this,a,b)};r.Yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ay(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ay.prototype;
1107
- r.init=function(){var a=this,b=new Rf,c=!1,d=new Mc(function(){c=!0;b.reject(new Q(2,9,9017))});d.W(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Tx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Yx(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1108
- new Yx(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new $x(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Jx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new Q(2,
1105
+ function $x(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1106
+ appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function ay(){Fx.apply(this,arguments)}na(ay,Fx);r=ay.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Jx(this,a,b)};r.Yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function by(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=by.prototype;
1107
+ r.init=function(){var a=this,b=new Rf,c=!1,d=new Mc(function(){c=!0;b.reject(new Q(2,9,9017))});d.X(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Ux(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Zx(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1108
+ new Zx(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ay(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Kx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new Q(2,
1109
1109
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
1110
1110
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
1111
- r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,by(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
1112
- function by(){var a=new Rf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new Q(2,9,9001,b.error));c.preventDefault()};return a}Sx("idb",function(){return Xc()||Rc()||!window.indexedDB?null:new ay});function cy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}cy.prototype.fb=function(){return this.i};cy.prototype.Ba=function(){return this.h};cy.prototype.key=function(){return this.l};cy.prototype.toString=function(){return this.j};
1113
- function dy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new cy(b,c,d,Number(a[4])):null};function ey(a,b){this.h=a;this.g=b}
1114
- function fy(a,b){var c=new hk(null,0);c.Za(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=gy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Id}).map(function(l){return hy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return hy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1111
+ r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,cy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
1112
+ function cy(){var a=new Rf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new Q(2,9,9001,b.error));c.preventDefault()};return a}Tx("idb",function(){return Xc()||Rc()||!window.indexedDB?null:new by});function dy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}dy.prototype.fb=function(){return this.i};dy.prototype.Ba=function(){return this.h};dy.prototype.key=function(){return this.l};dy.prototype.toString=function(){return this.j};
1113
+ function ey(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new dy(b,c,d,Number(a[4])):null};function fy(a,b){this.h=a;this.g=b}
1114
+ function gy(a,b){var c=new hk(null,0);c.$a(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=hy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Id}).map(function(l){return iy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return iy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1115
1115
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null}}
1116
- function gy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
1117
- b.next())for(e=e.value,g=hy(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=hy(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
1118
- function hy(a,b,c){var d=b.segments.map(function(e){return iy(a,e,b)});c.ld(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1116
+ function hy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
1117
+ b.next())for(e=e.value,g=iy(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=iy(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
1118
+ function iy(a,b,c){var d=b.segments.map(function(e){return jy(a,e,b)});c.ld(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1119
1119
  null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Md(b.mimeType,b.codecs)])}}
1120
- function iy(a,b,c){var d=new cy("segment",a.h,a.g,b.dataKey);a=new vi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?jy(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function jy(a,b){var c=new cy("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function ky(){this.g=null}r=ky.prototype;r.configure=function(){};
1121
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=dy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new Q(2,1,9004,a);e=new Kx;sa(m,2);return C(m,e.init(),4);case 4:return C(m,Ox(e,d.fb(),d.Ba()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new ey(d.fb(),d.Ba()),l=fy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
1120
+ function jy(a,b,c){var d=new dy("segment",a.h,a.g,b.dataKey);a=new vi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?ky(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function ky(a,b){var c=new dy("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function ly(){this.g=null}r=ly.prototype;r.configure=function(){};
1121
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=ey(a);c.g=d;if(null==d||"manifest"!=d.g)throw new Q(2,1,9004,a);e=new Lx;sa(m,2);return C(m,e.init(),4);case 4:return C(m,Px(e,d.fb(),d.Ba()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new fy(d.fb(),d.Ba()),l=gy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
1122
1122
  r.update=function(){};
1123
- r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Kx,ra(m,2,3),C(m,e.init(),5);case 5:return C(m,Ox(e,d.fb(),d.Ba()),6);case 6:return f=m.h,C(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.u(3)}})};
1124
- r.onInitialVariantChosen=function(){};r.banLocation=function(){};li["application/x-offline-manifest"]=function(){return new ky};function ly(){}function my(a){var b=dy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Vf(a)):a=b&&"segment"==b.g?ny(b.key(),b):Tf(new Q(2,1,9004,a));return a}
1125
- function ny(a,b){var c=new Kx;return Vf(void 0).va(function(){return c.init()}).va(function(){return Ox(c,b.fb(),b.Ba())}).va(function(d){return d.getSegments([b.key()])}).va(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",ly);ly.plugin=my;eg("offline",my);function oy(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),x=u.next();!x.done;x=u.next())if(x=x.value,py(x.info,q)){x.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=qy(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1126
- function qy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new oh({zb:b,onError:function(){},ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),C(f,wh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
1127
- h.g)return ra(h,2),C(h,Ih(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);G(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function py(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function ry(a,b,c){var d=b.presentationTimeline.getDuration();b=sy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ty(a,b){var c=fy(new ey(a.fb(),a.Ba()),b),d=b.appMetadata||{};c=sy(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
1128
- function sy(a){var b=[],c=kf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Ye(c.value));return b};function uy(){this.g={}}function vy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function wy(a,b){a.g[b.id]=b.bandwidth||2048}function xy(a,b){a=a.g[b];null==a&&(a=0);return a};function yy(a){var b=this;if(a&&a.constructor!=X)throw new Q(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Yb()):(this.h=Zl(),this.g=new dg);this.i=[];this.j=[];var c=!a;this.l=new pg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return ux(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return C(k,b.g.destroy(),4);
1129
- case 4:b.h=null,b.g=null,G(k)}})})}function zy(){if(Nc())a:{var a=t(Lx.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=yy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rl(a,b));return cm(this.h,a)};r.getConfiguration=function(){var a=Zl();cm(a,this.h,Zl());return a};r.Yb=function(){return this.g};
1130
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new tx(this.g);this.j.push(f);b=Ay(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.u(2):C(h,Jm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ki(a,c||null);return h.return(g())})},e,f);b=new Sf(b,function(){return ux(f)});b.finally(function(){Kb(d.j,f)});return By(this,b)};
1131
- function Ay(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return Cy(),h=g=null,k=new Kx,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Dy(a,b,g,e),6);case 6:q=A.h;Ey(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.cc();if(!p)throw new Q(2,9,9005,b);return C(A,a.rc(q,function(D){n=n||D},e),7);case 7:h=A.h;Ey(a);if(n)throw n;return C(A,Fy(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Ey(a),C(A,Mx(k),10);case 10:return l=A.h,Ey(a),u=Gy(h,
1132
- q,b,c,e,f),x=u.Sh,w=u.Hf,C(A,l.Ba.addManifests([x]),11);case 11:z=A.h;Ey(a);m=z[0];Ey(a);if(n)throw n;return C(A,Hy(a,w,m,x,f,e,l.Ba,q,h),12);case 12:return Ey(a),Iy(q,x,h,e),C(A,l.Ba.updateManifest(m,x),13);case 13:return Ey(a),v=new cy("manifest",l.path.fb,l.path.Ba,m),A.return(ty(v,x));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return C(A,g.stop(),15);case 15:if(!h){A.u(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.u(19);break}return C(A,
1133
- Jy(m),19);case 19:throw n||B;}})}
1134
- function Hy(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,I,E,H,K,M;return L(function(O){if(1==O.g){F={};J=t(A);for(I=J.next();!I.done;F={Ob:F.Ob},I=J.next())F.Ob=I.value,E=qx(F.Ob,f),H=F.Ob.i,K=F.Ob.h,M=function(N){return function(U){var R,V,xa;return L(function(Ca){if(1==Ca.g)return C(Ca,g.addSegments([{data:U}]),2);R=Ca.h;Ey(a);V=N.Ob.g;xa=px(V);l[xa]=R[0];m+=U.byteLength;G(Ca)})}}(F),wx(e,F.Ob.groupId,E,H,K,M);return C(O,yx(e),
1135
- 2)}if(!D)return O.u(0);Ey(a);Iy(h,d,k,f);return C(O,g.updateManifest(c,d),0)})};q=!1;ra(B,2);if(!Ky(h)||!q||Ly(h)){B.u(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Ey(a),b=b.filter(function(A){return!A.h}),p=l,u=m,l={},m=0,C(B,My(g,c,d,p,u,function(){return Ey(a)}),6);case 6:Ey(a);case 4:if(q){B.u(7);break}return C(B,n(b,!1),8);case 8:return Ey(a),x=l,w=m,l={},m=0,C(B,My(g,c,d,x,w,function(){return Ey(a)}),9);case 9:Ey(a);case 7:ta(B,0);break;case 2:return z=va(B),
1136
- v=Object.values(l),C(B,g.removeSegments(v,function(){}),10);case 10:throw z;}})}function Jy(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Kx,C(f,b.init(),2);case 2:return C(f,Mx(b),3);case 3:return c=f.h,d=new cy("manifest",c.path.fb,c.path.Ba,a),C(f,b.destroy(),4);case 4:return e=new yy,C(f,e.remove(d.toString()),0)}})}
1137
- function My(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:g=!1;ra(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
1138
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ta(z,0);break;case 2:return x=va(z),C(z,Jy(b),5);case 5:if(g){z.u(6);break}w=Object.values(d);return C(z,a.removeSegments(w,function(){}),6);case 6:throw x;}})}
1139
- function Fy(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N;return L(function(U){switch(U.g){case 1:return d={width:Infinity,height:Infinity},De(a,c.restrictions,d),C(U,He(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Be(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(Xe(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push(Ye(p));
1123
+ r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Lx,ra(m,2,3),C(m,e.init(),5);case 5:return C(m,Px(e,d.fb(),d.Ba()),6);case 6:return f=m.h,C(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.u(3)}})};
1124
+ r.onInitialVariantChosen=function(){};r.banLocation=function(){};li["application/x-offline-manifest"]=function(){return new ly};function my(){}function ny(a){var b=ey(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Vf(a)):a=b&&"segment"==b.g?oy(b.key(),b):Tf(new Q(2,1,9004,a));return a}
1125
+ function oy(a,b){var c=new Lx;return Vf(void 0).va(function(){return c.init()}).va(function(){return Px(c,b.fb(),b.Ba())}).va(function(d){return d.getSegments([b.key()])}).va(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",my);my.plugin=ny;eg("offline",ny);function py(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),x=u.next();!x.done;x=u.next())if(x=x.value,qy(x.info,q)){x.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=ry(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1126
+ function ry(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new oh({zb:b,onError:function(){},fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),C(f,wh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
1127
+ h.g)return ra(h,2),C(h,Ih(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);G(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function qy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function sy(a,b,c){var d=b.presentationTimeline.getDuration();b=ty(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function uy(a,b){var c=gy(new fy(a.fb(),a.Ba()),b),d=b.appMetadata||{};c=ty(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
1128
+ function ty(a){var b=[],c=kf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Ye(c.value));return b};function vy(){this.g={}}function wy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function xy(a,b){a.g[b.id]=b.bandwidth||2048}function yy(a,b){a=a.g[b];null==a&&(a=0);return a};function zy(a){var b=this;if(a&&a.constructor!=X)throw new Q(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Zb()):(this.h=$l(),this.g=new dg);this.i=[];this.j=[];var c=!a;this.l=new pg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return vx(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return C(k,b.g.destroy(),4);
1129
+ case 4:b.h=null,b.g=null,G(k)}})})}function Ay(){if(Nc())a:{var a=t(Mx.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=zy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Sl(a,b));return dm(this.h,a)};r.getConfiguration=function(){var a=$l();dm(a,this.h,$l());return a};r.Zb=function(){return this.g};
1130
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ux(this.g);this.j.push(f);b=By(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.u(2):C(h,Km(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ki(a,c||null);return h.return(g())})},e,f);b=new Sf(b,function(){return vx(f)});b.finally(function(){Kb(d.j,f)});return Cy(this,b)};
1131
+ function By(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return Dy(),h=g=null,k=new Lx,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Ey(a,b,g,e),6);case 6:q=A.h;Fy(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.dc();if(!p)throw new Q(2,9,9005,b);return C(A,a.rc(q,function(D){n=n||D},e),7);case 7:h=A.h;Fy(a);if(n)throw n;return C(A,Gy(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Fy(a),C(A,Nx(k),10);case 10:return l=A.h,Fy(a),u=Hy(h,
1132
+ q,b,c,e,f),x=u.Th,w=u.If,C(A,l.Ba.addManifests([x]),11);case 11:z=A.h;Fy(a);m=z[0];Fy(a);if(n)throw n;return C(A,Iy(a,w,m,x,f,e,l.Ba,q,h),12);case 12:return Fy(a),Jy(q,x,h,e),C(A,l.Ba.updateManifest(m,x),13);case 13:return Fy(a),v=new dy("manifest",l.path.fb,l.path.Ba,m),A.return(uy(v,x));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return C(A,g.stop(),15);case 15:if(!h){A.u(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.u(19);break}return C(A,
1133
+ Ky(m),19);case 19:throw n||B;}})}
1134
+ function Iy(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,I,E,H,K,M;return L(function(O){if(1==O.g){F={};J=t(A);for(I=J.next();!I.done;F={Ob:F.Ob},I=J.next())F.Ob=I.value,E=rx(F.Ob,f),H=F.Ob.i,K=F.Ob.h,M=function(N){return function(U){var R,V,xa;return L(function(Ca){if(1==Ca.g)return C(Ca,g.addSegments([{data:U}]),2);R=Ca.h;Fy(a);V=N.Ob.g;xa=qx(V);l[xa]=R[0];m+=U.byteLength;G(Ca)})}}(F),xx(e,F.Ob.groupId,E,H,K,M);return C(O,zx(e),
1135
+ 2)}if(!D)return O.u(0);Fy(a);Jy(h,d,k,f);return C(O,g.updateManifest(c,d),0)})};q=!1;ra(B,2);if(!Ly(h)||!q||My(h)){B.u(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Fy(a),b=b.filter(function(A){return!A.h}),p=l,u=m,l={},m=0,C(B,Ny(g,c,d,p,u,function(){return Fy(a)}),6);case 6:Fy(a);case 4:if(q){B.u(7);break}return C(B,n(b,!1),8);case 8:return Fy(a),x=l,w=m,l={},m=0,C(B,Ny(g,c,d,x,w,function(){return Fy(a)}),9);case 9:Fy(a);case 7:ta(B,0);break;case 2:return z=va(B),
1136
+ v=Object.values(l),C(B,g.removeSegments(v,function(){}),10);case 10:throw z;}})}function Ky(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Lx,C(f,b.init(),2);case 2:return C(f,Nx(b),3);case 3:return c=f.h,d=new dy("manifest",c.path.fb,c.path.Ba,a),C(f,b.destroy(),4);case 4:return e=new zy,C(f,e.remove(d.toString()),0)}})}
1137
+ function Ny(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:g=!1;ra(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
1138
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ta(z,0);break;case 2:return x=va(z),C(z,Ky(b),5);case 5:if(g){z.u(6);break}w=Object.values(d);return C(z,a.removeSegments(w,function(){}),6);case 6:throw x;}})}
1139
+ function Gy(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N;return L(function(U){switch(U.g){case 1:return d={width:Infinity,height:Infinity},De(a,c.restrictions,d),C(U,He(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Be(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(Xe(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push(Ye(p));
1140
1140
  u=t(a.imageStreams);for(x=u.next();!x.done;x=u.next())w=x.value,e.push(Ze(w));return C(U,c.offline.trackSelectionCallback(e),3);case 3:z=U.h;v=a.presentationTimeline.getDuration();B=0;A=t(z);for(D=A.next();!D.done;D=A.next())F=D.value,J=F.bandwidth*v/8,B+=J;ra(U,4);return C(U,c.offline.downloadSizeCallback(B),6);case 6:I=U.h;if(!I)throw new Q(2,9,9014);ta(U,5);break;case 4:E=va(U);if(E instanceof Q)throw E;throw new Q(2,9,9015);case 5:H=new Set;K=new Set;M=new Set;O=t(z);for(D=O.next();!D.done;D=
1141
- O.next())N=D.value,"variant"==N.type&&H.add(N.id),"text"==N.type&&K.add(N.id),"image"==N.type&&M.add(N.id);a.variants=a.variants.filter(function(R){return H.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return K.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return M.has(R.id)});Ny(a);G(U)}})}
1142
- function Gy(a,b,c,d,e,f){var g=ry(c,b,d),h=e.offline.progressCallback;vx(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Eh(a,"cenc",p)});var k=Ky(b)&&!Ly(b),l=null;k&&(l=Oy.get(a.g.keySystem));for(var m=new uy,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())wy(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())vy(m,n.value);m=Py(f,m,b,e);f=m.streams;m=m.Hf;q=a.g;n=e.offline.usePersistentLicense;
1143
- q&&n&&(q.initData=[]);return{Sh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:n?Oh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Hf:m}}function Ky(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1144
- function Ly(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Iy(a,b,c,d){b.expiration=c.cd();c=Oh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ky(a)&&d.offline.usePersistentLicense&&!c.length)throw new Q(2,9,9007);}r.remove=function(a){return Qy(this,Ry(this,a))};
1145
- function Ry(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Cy();c=dy(b);if(null==c||"manifest"!=c.g)throw new Q(2,9,9004,b);d=c;e=new Kx;sa(k,2);return C(k,e.init(),4);case 4:return C(k,Ox(e,d.fb(),d.Ba()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Sy(a,h,e),Ty(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
1146
- function Uy(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Md(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Md(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Sy(a,b,c){return L(function(d){return C(d,Vy(a.g,a.h.drm,c,b),0)})}
1147
- function Ty(a,b,c){function d(){}var e=Wy(c);ty(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.ji=function(){return Qy(this,Xy(this))};
1148
- function Xy(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return Cy(),b=a.g,c=a.h.drm,d=new Kx,e=!1,sa(n,2),C(n,d.init(),4);case 4:f=[],Px(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,oy(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return wa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
1149
- r.list=function(){return Qy(this,Yy())};function Yy(){var a,b,c;return L(function(d){switch(d.g){case 1:return Cy(),a=[],b=new Kx,sa(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Nx(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=ty(new cy("manifest",e.fb,e.Ba,l),k);a.push(k)});G(h)})})}),C(d,c,2);case 2:return wa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1150
- function Dy(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1151
- c.configure(d.manifest),Ey(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ey(a),k=Zy(h),C(l,Promise.all(rg(k,function(m){return m.createSegmentIndex()})),3);Ey(a);if(e)throw e;return l.return(h)})}r.rc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new oh({zb:d.g,onError:b,ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),C(f,th(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?C(f,Gh(e),3):f.return(e)})};
1152
- function Py(a,b,c,d){var e=new Map,f=Zy(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=$y(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Hf:Array.from(e.values())}}
1153
- function $y(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
1154
- spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;az(d,c.presentationTimeline.qb(),function(l){var m=px(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=xy(b,d.id)*q;q=sx(a.g,q);f.set(m,new ox(l,q,k,!1))}l.ca&&(n=px(l.ca),f.has(n)||(q=.5*xy(b,d.id),q=sx(a.g,q),f.set(n,new ox(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
1155
- endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function az(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ey(a){if(a.l.g)throw new Q(2,9,7001);}function Cy(){if(!zy())throw new Q(2,9,9E3);}
1156
- function Qy(a,b){return L(function(c){if(1==c.g)return a.i.push(b),sa(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);Kb(a.i,b);return ya(c,0)})}function By(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Kb(a.i,c)})}function Wy(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1157
- function Vy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Qx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Uy(d,!1),videoCapabilities:Uy(d,!0)}});return C(h,oy(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1158
- function Zy(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
1159
- function Ny(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",yy);yy.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Kx,sa(b,2),C(b,Rx(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
1160
- yy.prototype.list=yy.prototype.list;yy.prototype.removeEmeSessions=yy.prototype.ji;yy.prototype.remove=yy.prototype.remove;yy.prototype.store=yy.prototype.store;yy.prototype.getNetworkingEngine=yy.prototype.Yb;yy.prototype.getConfiguration=yy.prototype.getConfiguration;yy.prototype.configure=yy.prototype.configure;yy.prototype.destroy=yy.prototype.destroy;yy.support=zy;
1161
- var Oy=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");Xo.offline=zy;function bz(){}function cz(a,b){a={priority:b||0,callback:a};for(b=0;b<dz.length;b++)if(dz[b].priority<a.priority){dz.splice(b,0,a);return}dz.push(a)}P("shaka.polyfill",bz);bz.register=cz;bz.installAll=function(){for(var a=t(dz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Wa("Error installing polyfill!",c)}}};var dz=[];function ez(){this.g=new fz}function gz(){window.AbortController||(window.AbortController=ez,window.AbortSignal=fz)}ez.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(ez.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});bz.AbortController=ez;ez.install=gz;
1162
- function fz(){ag.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(fz,ag);da.Object.defineProperties(fz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});cz(gz);function hz(){}function iz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())jz(b.value)}function jz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}bz.Aria=hz;hz.install=iz;cz(iz);function kz(){}function lz(){mz()}bz.EncryptionScheme=kz;kz.install=lz;cz(lz,-2);function nz(){}
1163
- function oz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1164
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",pz);document.addEventListener("webkitfullscreenerror",pz);document.addEventListener("mozfullscreenchange",pz);document.addEventListener("mozfullscreenerror",pz);document.addEventListener("MSFullscreenChange",pz);document.addEventListener("MSFullscreenError",pz)}}
1165
- function pz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}bz.Fullscreen=nz;nz.install=oz;cz(oz);function qz(){}function rz(){var a=!0;if(Zc()||ad()||$c()||Wc()||Tc()||Xc()||Sc("PC=EOS")||bd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),sz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=tz)}
1166
- function tz(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Nc())return A.return(b);if(c){if(Xc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var D=c.contentType;c.width&&c.height&&(D+="; width="+c.width+"; height="+c.height);c.framerate&&(D+="; framerate="+c.framerate);"pq"===c.transferFunction&&
1167
- (D+="; eotf=smpte2084");if(D in uz)var F=uz[D];else F=cast.__platform__.canDisplayType(D),uz[D]=F;e=F}else e=lb(c.contentType);else Tc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=lb(f)):e=lb(c.contentType);if(!e)return A.return(b)}if(d&&(Xc()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=lb(h)):g=lb(d.contentType),!g))return A.return(b)}else if("file"==
1141
+ O.next())N=D.value,"variant"==N.type&&H.add(N.id),"text"==N.type&&K.add(N.id),"image"==N.type&&M.add(N.id);a.variants=a.variants.filter(function(R){return H.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return K.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return M.has(R.id)});Oy(a);G(U)}})}
1142
+ function Hy(a,b,c,d,e,f){var g=sy(c,b,d),h=e.offline.progressCallback;wx(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Eh(a,"cenc",p)});var k=Ly(b)&&!My(b),l=null;k&&(l=Py.get(a.g.keySystem));for(var m=new vy,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())xy(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())wy(m,n.value);m=Qy(f,m,b,e);f=m.streams;m=m.If;q=a.g;n=e.offline.usePersistentLicense;
1143
+ q&&n&&(q.initData=[]);return{Th:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:n?Oh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},If:m}}function Ly(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1144
+ function My(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Jy(a,b,c,d){b.expiration=c.cd();c=Oh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ly(a)&&d.offline.usePersistentLicense&&!c.length)throw new Q(2,9,9007);}r.remove=function(a){return Ry(this,Sy(this,a))};
1145
+ function Sy(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Dy();c=ey(b);if(null==c||"manifest"!=c.g)throw new Q(2,9,9004,b);d=c;e=new Lx;sa(k,2);return C(k,e.init(),4);case 4:return C(k,Px(e,d.fb(),d.Ba()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Ty(a,h,e),Uy(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
1146
+ function Vy(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Md(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Md(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ty(a,b,c){return L(function(d){return C(d,Wy(a.g,a.h.drm,c,b),0)})}
1147
+ function Uy(a,b,c){function d(){}var e=Xy(c);uy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.ki=function(){return Ry(this,Yy(this))};
1148
+ function Yy(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return Dy(),b=a.g,c=a.h.drm,d=new Lx,e=!1,sa(n,2),C(n,d.init(),4);case 4:f=[],Qx(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,py(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return wa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
1149
+ r.list=function(){return Ry(this,Zy())};function Zy(){var a,b,c;return L(function(d){switch(d.g){case 1:return Dy(),a=[],b=new Lx,sa(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Ox(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=uy(new dy("manifest",e.fb,e.Ba,l),k);a.push(k)});G(h)})})}),C(d,c,2);case 2:return wa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1150
+ function Ey(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1151
+ c.configure(d.manifest),Fy(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Fy(a),k=$y(h),C(l,Promise.all(rg(k,function(m){return m.createSegmentIndex()})),3);Fy(a);if(e)throw e;return l.return(h)})}r.rc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new oh({zb:d.g,onError:b,fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),C(f,th(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?C(f,Gh(e),3):f.return(e)})};
1152
+ function Qy(a,b,c,d){var e=new Map,f=$y(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=az(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),If:Array.from(e.values())}}
1153
+ function az(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
1154
+ spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;bz(d,c.presentationTimeline.qb(),function(l){var m=qx(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=yy(b,d.id)*q;q=tx(a.g,q);f.set(m,new px(l,q,k,!1))}l.ca&&(n=qx(l.ca),f.has(n)||(q=.5*yy(b,d.id),q=tx(a.g,q),f.set(n,new px(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
1155
+ endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function bz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Fy(a){if(a.l.g)throw new Q(2,9,7001);}function Dy(){if(!Ay())throw new Q(2,9,9E3);}
1156
+ function Ry(a,b){return L(function(c){if(1==c.g)return a.i.push(b),sa(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);Kb(a.i,b);return ya(c,0)})}function Cy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Kb(a.i,c)})}function Xy(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1157
+ function Wy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Rx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Vy(d,!1),videoCapabilities:Vy(d,!0)}});return C(h,py(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1158
+ function $y(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
1159
+ function Oy(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",zy);zy.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Lx,sa(b,2),C(b,Sx(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
1160
+ zy.prototype.list=zy.prototype.list;zy.prototype.removeEmeSessions=zy.prototype.ki;zy.prototype.remove=zy.prototype.remove;zy.prototype.store=zy.prototype.store;zy.prototype.getNetworkingEngine=zy.prototype.Zb;zy.prototype.getConfiguration=zy.prototype.getConfiguration;zy.prototype.configure=zy.prototype.configure;zy.prototype.destroy=zy.prototype.destroy;zy.support=Ay;
1161
+ var Py=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");Yo.offline=Ay;function cz(){}function dz(a,b){a={priority:b||0,callback:a};for(b=0;b<ez.length;b++)if(ez[b].priority<a.priority){ez.splice(b,0,a);return}ez.push(a)}P("shaka.polyfill",cz);cz.register=dz;cz.installAll=function(){for(var a=t(ez),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Wa("Error installing polyfill!",c)}}};var ez=[];function fz(){this.g=new gz}function hz(){window.AbortController||(window.AbortController=fz,window.AbortSignal=gz)}fz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(fz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});cz.AbortController=fz;fz.install=hz;
1162
+ function gz(){ag.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(gz,ag);da.Object.defineProperties(gz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});dz(hz);function iz(){}function jz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())kz(b.value)}function kz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}cz.Aria=iz;iz.install=jz;dz(jz);function lz(){}function mz(){nz()}cz.EncryptionScheme=lz;lz.install=mz;dz(mz,-2);function oz(){}
1163
+ function pz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1164
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",qz);document.addEventListener("webkitfullscreenerror",qz);document.addEventListener("mozfullscreenchange",qz);document.addEventListener("mozfullscreenerror",qz);document.addEventListener("MSFullscreenChange",qz);document.addEventListener("MSFullscreenError",qz)}}
1165
+ function qz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}cz.Fullscreen=oz;oz.install=pz;dz(pz);function rz(){}function sz(){var a=!0;if(Zc()||ad()||$c()||Wc()||Tc()||Xc()||Sc("PC=EOS")||bd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),tz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=uz)}
1166
+ function uz(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Nc())return A.return(b);if(c){if(Xc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var D=c.contentType;c.width&&c.height&&(D+="; width="+c.width+"; height="+c.height);c.framerate&&(D+="; framerate="+c.framerate);"pq"===c.transferFunction&&
1167
+ (D+="; eotf=smpte2084");if(D in vz)var F=vz[D];else F=cast.__platform__.canDisplayType(D),vz[D]=F;e=F}else e=lb(c.contentType);else Tc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=lb(f)):e=lb(c.contentType);if(!e)return A.return(b)}if(d&&(Xc()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=lb(h)):g=lb(d.contentType),!g))return A.return(b)}else if("file"==
1168
1168
  a.type){if(c&&(k=c.contentType,l=Oc(k),!l)||d&&(m=d.contentType,n=Oc(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));q=a.keySystemConfiguration;p=[];u=[];q.audio&&(x={robustness:q.audio.robustness||"",contentType:a.audio.contentType},Tc()&&a.audio.contentType.includes('codecs="ac-3"')&&(x={robustness:x.robustness,contentType:'audio/mp4; codecs="ec-3"'}),q.audio.encryptionScheme&&(x={robustness:x.robustness,contentType:x.contentType,
1169
1169
  encryptionScheme:q.audio.encryptionScheme}),p.push(x));q.video&&(w={robustness:q.video.robustness||"",contentType:a.video.contentType},q.video.encryptionScheme&&(w={robustness:w.robustness,contentType:w.contentType,encryptionScheme:q.video.encryptionScheme}),u.push(w));z={initDataTypes:[q.initDataType],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,sessionTypes:q.sessionTypes};p.length&&(z.audioCapabilities=p);u.length&&(z.videoCapabilities=u);v=(a.video?a.video.contentType:
1170
- "")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ra(A,3);if(v in vz){B=vz[v];A.u(5);break}return C(A,navigator.requestMediaKeySystemAccess(q.keySystem,[z]),6);case 6:B=A.h,vz[v]=B;case 5:ta(A,4);break;case 3:va(A);case 4:B&&(b.supported=!0,b.keySystemAccess=B);case 2:return A.return(b)}})}bz.MediaCapabilities=qz;qz.install=rz;var sz=null;qz.originalMcap=sz;var vz={};qz.memoizedMediaKeySystemAccessRequests_=vz;var uz={};qz.memoizedCanDisplayTypeRequests_=uz;cz(rz,-1);function wz(){}function xz(){var a=cd();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(yz(),zz()):15>=a&&yz():(Vc()||Uc()||Sc("Tizen 4"))&&Az();(window.MediaSource||window.ManagedMediaSource)&&Bz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Cz()}
1171
- function yz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function zz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1172
- function Bz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Sd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Sd(c)&&b(c)}}}
1173
- function Az(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Vd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Vd(c)&&b(c)}}}
1174
- function Cz(){var a=MediaSource.isTypeSupported;Wc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}bz.MediaSource=wz;wz.install=xz;cz(xz);function Dz(){}function Ez(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Fz():void 0!=window.orientation&&Gz())}function Fz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1175
- function Gz(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Hz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}bz.Orientation=Dz;Dz.install=Ez;function Hz(){ag.call(this);this.type="";this.angle=0}na(Hz,ag);
1176
- Hz.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1177
- Hz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};cz(Ez);function Iz(){}var Jz,Kz,Lz,Mz,Nz,Oz;function Pz(a,b){try{var c=new Qz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Rz(a){var b=this.mediaKeys;b&&b!=a&&Sz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Sz(a,this):Promise.resolve()}
1178
- function Tz(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=kd(a.subarray(4),!0);a=nd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}bz.PatchedMediaKeysApple=Iz;
1179
- Iz.uninstall=function(){Jz&&(Jz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Kz),HTMLMediaElement.prototype.setMediaKeys=Lz,window.MediaKeys=Mz,window.MediaKeySystemAccess=Nz,navigator.requestMediaKeySystemAccess=Oz,Kz=Oz=Lz=Nz=Mz=null,window.shakaMediaKeysPolyfill=!1)};
1180
- Iz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Jz=!0,Kz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Lz=HTMLMediaElement.prototype.setMediaKeys,Mz=window.MediaKeys,Nz=window.MediaKeySystemAccess,Oz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Rz;window.MediaKeys=Uz;window.MediaKeySystemAccess=Qz;navigator.requestMediaKeySystemAccess=
1181
- Pz;window.shakaMediaKeysPolyfill=!0}};
1182
- function Qz(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("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1170
+ "")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ra(A,3);if(v in wz){B=wz[v];A.u(5);break}return C(A,navigator.requestMediaKeySystemAccess(q.keySystem,[z]),6);case 6:B=A.h,wz[v]=B;case 5:ta(A,4);break;case 3:va(A);case 4:B&&(b.supported=!0,b.keySystemAccess=B);case 2:return A.return(b)}})}cz.MediaCapabilities=rz;rz.install=sz;var tz=null;rz.originalMcap=tz;var wz={};rz.memoizedMediaKeySystemAccessRequests_=wz;var vz={};rz.memoizedCanDisplayTypeRequests_=vz;dz(sz,-1);function xz(){}function yz(){var a=cd();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(zz(),Az()):15>=a&&zz():(Vc()||Uc()||Sc("Tizen 4"))&&Bz();(window.MediaSource||window.ManagedMediaSource)&&Cz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Dz()}
1171
+ function zz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Az(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1172
+ function Cz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Sd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Sd(c)&&b(c)}}}
1173
+ function Bz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Vd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Vd(c)&&b(c)}}}
1174
+ function Dz(){var a=MediaSource.isTypeSupported;Wc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}cz.MediaSource=xz;xz.install=yz;dz(yz);function Ez(){}function Fz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Gz():void 0!=window.orientation&&Hz())}function Gz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1175
+ function Hz(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Iz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}cz.Orientation=Ez;Ez.install=Fz;function Iz(){ag.call(this);this.type="";this.angle=0}na(Iz,ag);
1176
+ Iz.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1177
+ Iz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};dz(Fz);function Jz(){}var Kz,Lz,Mz,Nz,Oz,Pz;function Qz(a,b){try{var c=new Rz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Sz(a){var b=this.mediaKeys;b&&b!=a&&Tz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Tz(a,this):Promise.resolve()}
1178
+ function Uz(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=id(a.subarray(4),!0);a=nd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}cz.PatchedMediaKeysApple=Jz;
1179
+ Jz.uninstall=function(){Kz&&(Kz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Lz),HTMLMediaElement.prototype.setMediaKeys=Mz,window.MediaKeys=Nz,window.MediaKeySystemAccess=Oz,navigator.requestMediaKeySystemAccess=Pz,Lz=Pz=Mz=Oz=Nz=null,window.shakaMediaKeysPolyfill=!1)};
1180
+ Jz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Kz=!0,Lz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Mz=HTMLMediaElement.prototype.setMediaKeys,Nz=window.MediaKeys,Oz=window.MediaKeySystemAccess,Pz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Sz;window.MediaKeys=Vz;window.MediaKeySystemAccess=Rz;navigator.requestMediaKeySystemAccess=
1181
+ Qz;window.shakaMediaKeysPolyfill=!0}};
1182
+ function Rz(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("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1183
1183
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
1184
- Qz.prototype.createMediaKeys=function(){var a=new Uz(this.keySystem);return Promise.resolve(a)};Qz.prototype.getConfiguration=function(){return this.g};function Uz(a){this.h=new WebKitMediaKeys(a);this.g=new eb}Uz.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Vz(this.h,a)};Uz.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1185
- function Sz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Tz);try{return ok(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Uz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Vz(a){ag.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new eb;this.sessionId="";this.expiration=NaN;this.closed=new Rf;this.keyStatuses=new Wz}na(Vz,ag);r=Vz.prototype;
1186
- r.generateRequest=function(a,b){var c=this;this.h=new Rf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ac()?"license-request":"license-renewal").set("message",Bb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Xz(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1187
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Xz(c,"output-not-allowed");break;default:Xz(c,"internal-error")}});Xz(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1188
- r.update=function(a){this.g=new Rf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.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 Xz(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
1189
- function Wz(){this.size=0;this.g=void 0}r=Wz.prototype;r.ac=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,bi.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bi.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Yz(){}function Zz(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=$z,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=aA,window.MediaKeys=bA,window.MediaKeySystemAccess=cA,window.shakaMediaKeysPolyfill=!0)}function $z(){return Promise.reject(Error("The key system specified is not supported."))}
1190
- function aA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}bz.PatchedMediaKeysNop=Yz;Yz.install=Zz;function bA(){throw new TypeError("Illegal constructor.");}bA.prototype.createSession=function(){};bA.prototype.setServerCertificate=function(){};bA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function cA(){this.keySystem="";throw new TypeError("Illegal constructor.");}cA.prototype.getConfiguration=function(){};
1191
- cA.prototype.createMediaKeys=function(){};cz(Zz,-10);function dA(){}
1192
- function eA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)fA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=gA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=hA;window.MediaKeys=iA;window.MediaKeySystemAccess=jA;window.shakaMediaKeysPolyfill=!0}}
1193
- function kA(a){var b=fA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function gA(a,b){try{var c=new jA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hA(a){var b=this.mediaKeys;b&&b!=a&&lA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lA(a,this);return Promise.resolve()}bz.PatchedMediaKeysWebkit=dA;dA.install=eA;
1194
- function jA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=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),
1184
+ Rz.prototype.createMediaKeys=function(){var a=new Vz(this.keySystem);return Promise.resolve(a)};Rz.prototype.getConfiguration=function(){return this.g};function Vz(a){this.h=new WebKitMediaKeys(a);this.g=new db}Vz.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Wz(this.h,a)};Vz.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1185
+ function Tz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Uz);try{return ok(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Vz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Wz(a){ag.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new db;this.sessionId="";this.expiration=NaN;this.closed=new Rf;this.keyStatuses=new Xz}na(Wz,ag);r=Wz.prototype;
1186
+ r.generateRequest=function(a,b){var c=this;this.h=new Rf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.bc()?"license-request":"license-renewal").set("message",Bb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Yz(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1187
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Yz(c,"output-not-allowed");break;default:Yz(c,"internal-error")}});Yz(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1188
+ r.update=function(a){this.g=new Rf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.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 Yz(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
1189
+ function Xz(){this.size=0;this.g=void 0}r=Xz.prototype;r.bc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,bi.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bi.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Zz(){}function $z(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=aA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=bA,window.MediaKeys=cA,window.MediaKeySystemAccess=dA,window.shakaMediaKeysPolyfill=!0)}function aA(){return Promise.reject(Error("The key system specified is not supported."))}
1190
+ function bA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}cz.PatchedMediaKeysNop=Zz;Zz.install=$z;function cA(){throw new TypeError("Illegal constructor.");}cA.prototype.createSession=function(){};cA.prototype.setServerCertificate=function(){};cA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function dA(){this.keySystem="";throw new TypeError("Illegal constructor.");}dA.prototype.getConfiguration=function(){};
1191
+ dA.prototype.createMediaKeys=function(){};dz($z,-10);function eA(){}
1192
+ function fA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)gA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=hA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=iA;window.MediaKeys=jA;window.MediaKeySystemAccess=kA;window.shakaMediaKeysPolyfill=!0}}
1193
+ function lA(a){var b=gA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function hA(a,b){try{var c=new kA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function iA(a){var b=this.mediaKeys;b&&b!=a&&mA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&mA(a,this);return Promise.resolve()}cz.PatchedMediaKeysWebkit=eA;eA.install=fA;
1194
+ function kA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=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),
1195
1195
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
1196
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}jA.prototype.createMediaKeys=function(){var a=new iA(this.g);return Promise.resolve(a)};jA.prototype.getConfiguration=function(){return this.h};function iA(a){this.l=a;this.h=null;this.g=new eb;this.i=[];this.j=new Map}
1197
- function lA(a,b){a.h=b;a.g.ib();var c=fA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=mA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ac()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=mA(a,d.sessionId))nA(d,"usable"),
1198
- d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=mA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?nA(e,"output-restricted"):1==f?nA(e,"expired"):nA(e,"internal-error"))}}))}
1199
- iA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new oA(b,this.l,a);this.i.push(a);return a};iA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};iA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1200
- function mA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function oA(a,b,c){ag.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Rf;this.keyStatuses=new pA}na(oA,ag);
1201
- function qA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(nd("LOAD_SESSION|"+c));else{var e=nd("PERSISTENT|");d=zd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Rf;var f=kA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).W(.01)}return a.h}
1202
- function rA(a,b,c){if(a.g)a.g.then(function(){return rA(a,b,c)}).catch(function(){return rA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=hd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=ud(e.keys[0].k);e=ud(e.keys[0].kid)}else d=Ab(c),e=null;var f=kA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1203
- function nA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}r=oA.prototype;r.generateRequest=function(a,b){return qA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?qA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Rf;rA(this,b,a);return b};
1204
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=kA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function pA(){this.size=0;this.g=void 0}r=pA.prototype;r.ac=function(){return this.g};
1205
- r.forEach=function(a){this.g&&a(this.g,bi.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bi.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var fA="";cz(eA);function sA(){}function tA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uA,Object.defineProperty(a,"disablePictureInPicture",{get:vA,set:wA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xA,document.addEventListener("webkitpresentationmodechanged",yA,!0))}}
1206
- function yA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1207
- function uA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function xA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1208
- function vA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}bz.PiPWebkit=sA;sA.install=tA;cz(tA);function zA(){}function AA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=BA))}function BA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}bz.RandomUUID=zA;zA.install=AA;cz(AA);function CA(){}function DA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:EA})}function EA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}bz.Symbol=CA;CA.install=DA;cz(DA);function FA(){}function GA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}bz.VideoPlayPromise=FA;FA.install=GA;cz(GA);function HA(){}function IA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Wc()&&38===Yc())&&(a.getVideoPlaybackQuality=JA)}}function JA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}bz.VideoPlaybackQuality=HA;HA.install=IA;cz(IA);function KA(){}function LA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=MA;else if(6==b)a=NA;else{try{var c=!!MA(1,2,"")}catch(d){c=!1}c&&(a=MA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function MA(a,b,c){return new window.TextTrackCue(a,b,c)}function NA(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}bz.VTTCue=KA;KA.install=LA;cz(LA);function OA(){}OA.prototype.parseInit=function(){};OA.prototype.setSequenceMode=function(){};OA.prototype.setManifestType=function(){};OA.prototype.parseMedia=function(a,b){var c=null,d=[];a=hd(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=PA.exec(e))){var f=QA.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1209
- P("shaka.text.LrcTextParser",OA);OA.prototype.parseMedia=OA.prototype.parseMedia;OA.prototype.setManifestType=OA.prototype.setManifestType;OA.prototype.setSequenceMode=OA.prototype.setSequenceMode;OA.prototype.parseInit=OA.prototype.parseInit;var PA=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,QA=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ee["application/x-subtitle-lrc"]=function(){return new OA};function RA(){}RA.prototype.parseInit=function(){};RA.prototype.setSequenceMode=function(){};RA.prototype.setManifestType=function(){};
1210
- RA.prototype.parseMedia=function(a,b,c){var d=hd(a);a=[];if(""==d)return a;var e=Pg(d,"tt");if(!e)throw new Q(2,2,2005,"Failed to parse TTML.");d=Yg(e,"body")[0];if(!d)return[];var f=dh(e,SA,"frameRate"),g=dh(e,SA,"subFrameRate"),h=dh(e,SA,"frameRateMultiplier"),k=dh(e,SA,"tickRate"),l=dh(e,SA,"cellResolution"),m=e.attributes["xml:space"]||"default",n=dh(e,TA,"extent");if("default"!=m&&"preserve"!=m)throw new Q(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new UA(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1211
- {Rb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=Yg(e,"metadata")[0])?g.children:[];h=Yg(e,"style");e=Yg(e,"region");k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Ob;var x=u.attributes["xml:id"];if(x){p.id=x;var w=null;n&&(w=VA.exec(n)||WA.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var z,v=XA(u,h,"extent");if(v){var B=(z=VA.exec(v))||WA.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=x&&(p.width=100*p.width/x),null!=w&&(p.height=
1212
- 100*p.height/w)),p.widthUnits=z||null!=x?gc:0,p.heightUnits=z||null!=w?gc:0)}if(u=XA(u,h,"origin"))if(B=(z=VA.exec(u))||WA.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=gc,p.height=100-p.viewportAnchorY,p.heightUnits=gc):(null!=w&&(p.viewportAnchorY=100*p.viewportAnchorY/w),null!=x&&(p.viewportAnchorX=100*p.viewportAnchorX/x)),p.viewportAnchorUnits=z||null!=x?gc:0}else p=null;p&&k.push(p)}if(Vg(d,"p").length)throw new Q(2,
1213
- 2,2001,"<p> can only be inside <div> in TTML");n=t(Vg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Vg(q.value,"span").length)throw new Q(2,2,2001,"<span> can only be inside <p> in TTML");if(b=YA(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1214
- function YA(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(Tg(a)){if(!m)return null;var p={tagName:"span",children:[Wg(a)],attributes:{},parent:null}}else p=a;for(var u=null,x=t(ZA),w=x.next();!w.done&&!(u=$A(p,"backgroundImage",d,"#",w.value)[0]);w=x.next());x=null;var z=dh(p,ZA,"backgroundImage");n&&z&&!z.startsWith("#")&&(w=new rc(n),z=new rc(z),(w=w.resolve(z).toString())&&(x=w));if("p"==a.tagName||u||x)m=!0;a=m;w="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(Tg);h=
1215
- [];if(!z)for(var v=t(p.children),B=v.next();!B.done;B=v.next())(B=YA(B.value,b,c,d,e,f,g,w,k,p,m,n))&&h.push(B);d=null!=l;n=Wg(p);n=p.children.length&&n&&/\S/.test(n);B=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(B||n||"br"==p.tagName||0!=h.length||d&&!w))return null;v=aB(p,c);n=v.start;for(v=v.end;q&&q.tagName&&"tt"!=q.tagName;)v=bB(q,c,n,v),n=v.start,v=v.end,q=q.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
1216
- if(!B&&0<h.length)for(n=Infinity,v=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Nb(n,v,""),e.lineBreak=!0,e;b="";z&&(b=qd(Wg(p)||""),w&&(b=b.replace(/\s+/g," ")));b=new Nb(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=$A(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var A=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.attributes.region&&
1217
- !p.attributes.style&&(g=$A(l,"region",f,"")[0]);cB(b,p,g,u,x,e,a,0==h.length);return b}
1218
- function cB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==dB(b,c,f,"direction",g)&&(a.direction="rtl");h=dB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Rb);(h=dB(b,c,f,"textAlign",!0))?(a.positionAlign=eB[h],a.lineAlign=fB[h],a.textAlign=ac[h.toUpperCase()]):a.textAlign=Qb;if(h=dB(b,c,f,"displayAlign",!0))a.displayAlign=bc[h.toUpperCase()];if(h=dB(b,c,f,"color",g))a.color=h;if(h=dB(b,c,f,"backgroundColor",
1219
- g))a.backgroundColor=h;if(h=dB(b,c,f,"border",g))a.border=h;if(h=dB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=dB(b,c,f,"fontWeight",g))&&
1220
- "bold"==h&&(a.fontWeight=700);h=dB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=dB(b,c,f,"lineHeight",g))&&h.match(gB)&&(a.lineHeight=h);(h=dB(b,c,f,"fontSize",g))&&(h.match(gB)||h.match(hB))&&(a.fontSize=h);if(h=dB(b,c,f,"fontStyle",g))a.fontStyle=fc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Wg(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=dB(b,c,f,"textOutline",g))d=
1221
- d.split(" "),d[0].match(gB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(gB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=dB(b,c,f,"letterSpacing",g))&&d.match(gB)&&(a.letterSpacing=d);(d=dB(b,c,f,"linePadding",g))&&d.match(gB)&&(a.linePadding=d);if(d=dB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=XA(c,f,"textDecoration"))&&iB(a,d);(d=jB(b,f,"textDecoration"))&&iB(a,d);if(d=dB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(dB(b,c,f,"ruby",g)){case "container":a.rubyTag=
1196
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}kA.prototype.createMediaKeys=function(){var a=new jA(this.g);return Promise.resolve(a)};kA.prototype.getConfiguration=function(){return this.h};function jA(a){this.l=a;this.h=null;this.g=new db;this.i=[];this.j=new Map}
1197
+ function mA(a,b){a.h=b;a.g.ib();var c=gA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=nA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=nA(a,d.sessionId))oA(d,"usable"),
1198
+ d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=nA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?oA(e,"output-restricted"):1==f?oA(e,"expired"):oA(e,"internal-error"))}}))}
1199
+ jA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new pA(b,this.l,a);this.i.push(a);return a};jA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};jA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1200
+ function nA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function pA(a,b,c){ag.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Rf;this.keyStatuses=new qA}na(pA,ag);
1201
+ function rA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(nd("LOAD_SESSION|"+c));else{var e=nd("PERSISTENT|");d=zd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Rf;var f=lA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
1202
+ function sA(a,b,c){if(a.g)a.g.then(function(){return sA(a,b,c)}).catch(function(){return sA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=hd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=ud(e.keys[0].k);e=ud(e.keys[0].kid)}else d=Ab(c),e=null;var f=lA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1203
+ function oA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}r=pA.prototype;r.generateRequest=function(a,b){return rA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?rA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Rf;sA(this,b,a);return b};
1204
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=lA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function qA(){this.size=0;this.g=void 0}r=qA.prototype;r.bc=function(){return this.g};
1205
+ r.forEach=function(a){this.g&&a(this.g,bi.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bi.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gA="";dz(fA);function tA(){}function uA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vA,Object.defineProperty(a,"disablePictureInPicture",{get:wA,set:xA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=yA,document.addEventListener("webkitpresentationmodechanged",zA,!0))}}
1206
+ function zA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1207
+ function vA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function yA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1208
+ function wA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function xA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}cz.PiPWebkit=tA;tA.install=uA;dz(uA);function AA(){}function BA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=CA))}function CA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}cz.RandomUUID=AA;AA.install=BA;dz(BA);function DA(){}function EA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:FA})}function FA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}cz.Symbol=DA;DA.install=EA;dz(EA);function GA(){}function HA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}cz.VideoPlayPromise=GA;GA.install=HA;dz(HA);function IA(){}function JA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Wc()&&38===Yc())&&(a.getVideoPlaybackQuality=KA)}}function KA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}cz.VideoPlaybackQuality=IA;IA.install=JA;dz(JA);function LA(){}function MA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=NA;else if(6==b)a=OA;else{try{var c=!!NA(1,2,"")}catch(d){c=!1}c&&(a=NA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function NA(a,b,c){return new window.TextTrackCue(a,b,c)}function OA(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}cz.VTTCue=LA;LA.install=MA;dz(MA);function PA(){}PA.prototype.parseInit=function(){};PA.prototype.setSequenceMode=function(){};PA.prototype.setManifestType=function(){};PA.prototype.parseMedia=function(a,b){var c=null,d=[];a=hd(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=QA.exec(e))){var f=RA.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1209
+ P("shaka.text.LrcTextParser",PA);PA.prototype.parseMedia=PA.prototype.parseMedia;PA.prototype.setManifestType=PA.prototype.setManifestType;PA.prototype.setSequenceMode=PA.prototype.setSequenceMode;PA.prototype.parseInit=PA.prototype.parseInit;var QA=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,RA=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ee["application/x-subtitle-lrc"]=function(){return new PA};function SA(){}SA.prototype.parseInit=function(){};SA.prototype.setSequenceMode=function(){};SA.prototype.setManifestType=function(){};
1210
+ SA.prototype.parseMedia=function(a,b,c){var d=hd(a);a=[];if(""==d)return a;var e=Pg(d,"tt");if(!e)throw new Q(2,2,2005,"Failed to parse TTML.");d=Yg(e,"body")[0];if(!d)return[];var f=dh(e,TA,"frameRate"),g=dh(e,TA,"subFrameRate"),h=dh(e,TA,"frameRateMultiplier"),k=dh(e,TA,"tickRate"),l=dh(e,TA,"cellResolution"),m=e.attributes["xml:space"]||"default",n=dh(e,UA,"extent");if("default"!=m&&"preserve"!=m)throw new Q(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new VA(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1211
+ {Sb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=Yg(e,"metadata")[0])?g.children:[];h=Yg(e,"style");e=Yg(e,"region");k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Ob;var x=u.attributes["xml:id"];if(x){p.id=x;var w=null;n&&(w=WA.exec(n)||XA.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var z,v=YA(u,h,"extent");if(v){var B=(z=WA.exec(v))||XA.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=x&&(p.width=100*p.width/x),null!=w&&(p.height=
1212
+ 100*p.height/w)),p.widthUnits=z||null!=x?gc:0,p.heightUnits=z||null!=w?gc:0)}if(u=YA(u,h,"origin"))if(B=(z=WA.exec(u))||XA.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=gc,p.height=100-p.viewportAnchorY,p.heightUnits=gc):(null!=w&&(p.viewportAnchorY=100*p.viewportAnchorY/w),null!=x&&(p.viewportAnchorX=100*p.viewportAnchorX/x)),p.viewportAnchorUnits=z||null!=x?gc:0}else p=null;p&&k.push(p)}if(Vg(d,"p").length)throw new Q(2,
1213
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(Vg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Vg(q.value,"span").length)throw new Q(2,2,2001,"<span> can only be inside <p> in TTML");if(b=ZA(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1214
+ function ZA(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(Tg(a)){if(!m)return null;var p={tagName:"span",children:[Wg(a)],attributes:{},parent:null}}else p=a;for(var u=null,x=t($A),w=x.next();!w.done&&!(u=aB(p,"backgroundImage",d,"#",w.value)[0]);w=x.next());x=null;var z=dh(p,$A,"backgroundImage");n&&z&&!z.startsWith("#")&&(w=new rc(n),z=new rc(z),(w=w.resolve(z).toString())&&(x=w));if("p"==a.tagName||u||x)m=!0;a=m;w="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(Tg);h=
1215
+ [];if(!z)for(var v=t(p.children),B=v.next();!B.done;B=v.next())(B=ZA(B.value,b,c,d,e,f,g,w,k,p,m,n))&&h.push(B);d=null!=l;n=Wg(p);n=p.children.length&&n&&/\S/.test(n);B=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(B||n||"br"==p.tagName||0!=h.length||d&&!w))return null;v=bB(p,c);n=v.start;for(v=v.end;q&&q.tagName&&"tt"!=q.tagName;)v=cB(q,c,n,v),n=v.start,v=v.end,q=q.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
1216
+ if(!B&&0<h.length)for(n=Infinity,v=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Nb(n,v,""),e.lineBreak=!0,e;b="";z&&(b=qd(Wg(p)||""),w&&(b=b.replace(/\s+/g," ")));b=new Nb(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=aB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var A=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.attributes.region&&
1217
+ !p.attributes.style&&(g=aB(l,"region",f,"")[0]);dB(b,p,g,u,x,e,a,0==h.length);return b}
1218
+ function dB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==eB(b,c,f,"direction",g)&&(a.direction="rtl");h=eB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Rb);(h=eB(b,c,f,"textAlign",!0))?(a.positionAlign=fB[h],a.lineAlign=gB[h],a.textAlign=ac[h.toUpperCase()]):a.textAlign=Qb;if(h=eB(b,c,f,"displayAlign",!0))a.displayAlign=bc[h.toUpperCase()];if(h=eB(b,c,f,"color",g))a.color=h;if(h=eB(b,c,f,"backgroundColor",
1219
+ g))a.backgroundColor=h;if(h=eB(b,c,f,"border",g))a.border=h;if(h=eB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=eB(b,c,f,"fontWeight",g))&&
1220
+ "bold"==h&&(a.fontWeight=700);h=eB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=eB(b,c,f,"lineHeight",g))&&h.match(hB)&&(a.lineHeight=h);(h=eB(b,c,f,"fontSize",g))&&(h.match(hB)||h.match(iB))&&(a.fontSize=h);if(h=eB(b,c,f,"fontStyle",g))a.fontStyle=fc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Wg(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=eB(b,c,f,"textOutline",g))d=
1221
+ d.split(" "),d[0].match(hB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(hB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=eB(b,c,f,"letterSpacing",g))&&d.match(hB)&&(a.letterSpacing=d);(d=eB(b,c,f,"linePadding",g))&&d.match(hB)&&(a.linePadding=d);if(d=eB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=YA(c,f,"textDecoration"))&&jB(a,d);(d=kB(b,f,"textDecoration"))&&jB(a,d);if(d=eB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(eB(b,c,f,"ruby",g)){case "container":a.rubyTag=
1222
1222
  "ruby";break;case "text":a.rubyTag="rt"}}
1223
- function iB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Kb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Kb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1224
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function dB(a,b,c,d,e){e=void 0===e?!0:e;return(a=jB(a,c,d))?a:e?XA(b,c,d):null}function XA(a,b,c){if(!a)return null;var d=dh(a,TA,c);return d?d:kB(a,b,c)}function jB(a,b,c){var d=dh(a,TA,c);return d?d:kB(a,b,c)}
1225
- function kB(a,b,c){a=$A(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ch(a[e],"urn:ebu:tt:style",c);f||(f=dh(a[e],TA,c));f||(f=jB(a[e],b,c));f&&(d=f)}return d}function $A(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ch(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
1226
- function bB(a,b,c,d){a=aB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function aB(a,b){var c=lB(a.attributes.begin,b),d=lB(a.attributes.end,b);a=lB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1227
- function lB(a,b){var c=null;if(mB.test(a)){a=mB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(nB.test(a))c=oB(nB,a);else if(pB.test(a))c=oB(pB,a);else if(qB.test(a))a=qB.exec(a),c=Number(a[1])/b.frameRate;else if(rB.test(a))a=rB.exec(a),c=Number(a[1])/b.g;else if(sB.test(a))c=oB(sB,a);else if(a)throw new Q(2,2,2001,"Could not parse cue time range in TTML");return c}
1228
- function oB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}P("shaka.text.TtmlTextParser",RA);RA.prototype.parseMedia=RA.prototype.parseMedia;RA.prototype.setManifestType=RA.prototype.setManifestType;RA.prototype.setSequenceMode=RA.prototype.setSequenceMode;RA.prototype.parseInit=RA.prototype.parseInit;
1229
- function UA(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1230
- var VA=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,hB=/^(\d{1,2}(?:\.\d+)?|100)%$/,gB=/^(\d+px|\d+em|\d*\.?\d+c)$/,WA=/^(\d+)px (\d+)px$/,mB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,nB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,pB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,qB=/^(\d*(?:\.\d*)?)f$/,rB=/^(\d*(?:\.\d*)?)t$/,sB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),fB={left:Vb,center:"center",right:"end",start:Vb,
1231
- end:"end"},eB={left:"line-left",center:"center",right:"line-right"},SA=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],TA=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],ZA=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ee["application/ttml+xml"]=function(){return new RA};function tB(){this.g=new RA}tB.prototype.parseInit=function(a){var b=!1;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new Q(2,2,2007);};tB.prototype.setSequenceMode=function(){};tB.prototype.setManifestType=function(){};
1232
- tB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new zg).box("mdat",Lg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new Q(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",tB);tB.prototype.parseMedia=tB.prototype.parseMedia;tB.prototype.setManifestType=tB.prototype.setManifestType;tB.prototype.setSequenceMode=tB.prototype.setSequenceMode;tB.prototype.parseInit=tB.prototype.parseInit;ee['application/mp4; codecs="stpp"']=function(){return new tB};
1233
- ee['application/mp4; codecs="stpp.ttml"']=function(){return new tB};ee['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new tB};ee['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new tB};function uB(){this.h=!1;this.g="UNKNOWN"}uB.prototype.parseInit=function(){};uB.prototype.setSequenceMode=function(a){this.h=a};uB.prototype.setManifestType=function(a){this.g=a};
1234
- uB.prototype.parseMedia=function(a,b){a=hd(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 Q(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new Q(2,2,2E3);a=vB(new Ku(a[1]));if(null==a)throw new Q(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
1235
- for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Ku(e);var f=new Ob;Nu(e);Lu(e);for(var g=Nu(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
1236
- h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Lu(e);g=Nu(e)}b.push(f)}d=new Map;wB(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
1223
+ function jB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Kb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Kb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1224
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function eB(a,b,c,d,e){e=void 0===e?!0:e;return(a=kB(a,c,d))?a:e?YA(b,c,d):null}function YA(a,b,c){if(!a)return null;var d=dh(a,UA,c);return d?d:lB(a,b,c)}function kB(a,b,c){var d=dh(a,UA,c);return d?d:lB(a,b,c)}
1225
+ function lB(a,b,c){a=aB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ch(a[e],"urn:ebu:tt:style",c);f||(f=dh(a[e],UA,c));f||(f=kB(a[e],b,c));f&&(d=f)}return d}function aB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ch(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
1226
+ function cB(a,b,c,d){a=bB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function bB(a,b){var c=mB(a.attributes.begin,b),d=mB(a.attributes.end,b);a=mB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1227
+ function mB(a,b){var c=null;if(nB.test(a)){a=nB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(oB.test(a))c=pB(oB,a);else if(qB.test(a))c=pB(qB,a);else if(rB.test(a))a=rB.exec(a),c=Number(a[1])/b.frameRate;else if(sB.test(a))a=sB.exec(a),c=Number(a[1])/b.g;else if(tB.test(a))c=pB(tB,a);else if(a)throw new Q(2,2,2001,"Could not parse cue time range in TTML");return c}
1228
+ function pB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}P("shaka.text.TtmlTextParser",SA);SA.prototype.parseMedia=SA.prototype.parseMedia;SA.prototype.setManifestType=SA.prototype.setManifestType;SA.prototype.setSequenceMode=SA.prototype.setSequenceMode;SA.prototype.parseInit=SA.prototype.parseInit;
1229
+ function VA(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1230
+ var WA=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,iB=/^(\d{1,2}(?:\.\d+)?|100)%$/,hB=/^(\d+px|\d+em|\d*\.?\d+c)$/,XA=/^(\d+)px (\d+)px$/,nB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,oB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,qB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,rB=/^(\d*(?:\.\d*)?)f$/,sB=/^(\d*(?:\.\d*)?)t$/,tB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),gB={left:Vb,center:"center",right:"end",start:Vb,
1231
+ end:"end"},fB={left:"line-left",center:"center",right:"line-right"},TA=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],UA=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],$A=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ee["application/ttml+xml"]=function(){return new SA};function uB(){this.g=new SA}uB.prototype.parseInit=function(a){var b=!1;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new Q(2,2,2007);};uB.prototype.setSequenceMode=function(){};uB.prototype.setManifestType=function(){};
1232
+ uB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new zg).box("mdat",Lg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new Q(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",uB);uB.prototype.parseMedia=uB.prototype.parseMedia;uB.prototype.setManifestType=uB.prototype.setManifestType;uB.prototype.setSequenceMode=uB.prototype.setSequenceMode;uB.prototype.parseInit=uB.prototype.parseInit;ee['application/mp4; codecs="stpp"']=function(){return new uB};
1233
+ ee['application/mp4; codecs="stpp.ttml"']=function(){return new uB};ee['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new uB};ee['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new uB};function vB(){this.h=!1;this.g="UNKNOWN"}vB.prototype.parseInit=function(){};vB.prototype.setSequenceMode=function(a){this.h=a};vB.prototype.setManifestType=function(a){this.g=a};
1234
+ vB.prototype.parseMedia=function(a,b){a=hd(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 Q(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new Q(2,2,2E3);a=wB(new Lu(a[1]));if(null==a)throw new Q(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
1235
+ for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Lu(e);var f=new Ob;Ou(e);Mu(e);for(var g=Ou(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
1236
+ h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Mu(e);g=Ou(e)}b.push(f)}d=new Map;xB(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
1237
1237
  l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Nb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=
1238
1238
  700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Yb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&d.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
1239
- f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Ku(f[0]),k=vB(g),n=Mu(g,/[ \t]+--\x3e[ \t]+/g),l=vB(g),null==k||null==n||null==l)Wa("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Nb(k,l,"");Lu(g);for(k=Nu(g);k;)xB(m,k,b),Lu(g),k=Nu(g);yB(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
1240
- function wB(a){for(var b=t(Object.entries(dc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Nb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ec));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Nb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1241
- function yB(a,b,c){if(a.includes("<")){0===c.size&&wB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(zB)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
1242
- k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=AB(a);try{var m=Pg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
1243
- m.next())BB(a.value,b,c);else b.payload=qd(a);else b.payload=qd(a)}else b.payload=qd(a)}function AB(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 CB(a,b){return a&&0<a.length?a:b}
1244
- function BB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ob;d.position=null;d.size=0;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)&&(g=c.get(g))&&(d.backgroundColor=CB(g.backgroundColor,d.backgroundColor),d.color=CB(g.color,d.color),d.fontFamily=CB(g.fontFamily,d.fontFamily),d.fontSize=
1245
- CB(g.fontSize,d.fontSize),d.textShadow=CB(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Zb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
1246
- if(!f)break;if(f=vB(new Ku(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Tg(a)||1==e.length&&Tg(e[0]))for(c=Wg(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Zb(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=qd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())BB(a.value,d,c)}
1247
- function xB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=ac[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1248
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=DB(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()])}
1249
- function DB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function vB(a){a=Mu(a,zB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.VttTextParser",uB);uB.prototype.parseMedia=uB.prototype.parseMedia;uB.prototype.setManifestType=uB.prototype.setManifestType;uB.prototype.setSequenceMode=uB.prototype.setSequenceMode;uB.prototype.parseInit=uB.prototype.parseInit;var zB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1250
- ee["text/vtt"]=function(){return new uB};ee['text/vtt; codecs="vtt"']=function(){return new uB};ee['text/vtt; codecs="wvtt"']=function(){return new uB};function EB(){this.g=null}EB.prototype.parseInit=function(a){var b=this,c=!1;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).O("mdhd",function(d){d=Ni(d.reader,d.version);b.g=d.timescale}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new Q(2,2,2008);if(!c)throw new Q(2,2,2008);};EB.prototype.setSequenceMode=function(){};EB.prototype.setManifestType=function(){};
1251
- EB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new Q(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new zg).box("moof",Eg).box("traf",Eg).O("tfdt",function(B){g=!0;c=Mi(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Li(B.reader,B.flags).Wf}).O("trun",function(B){h=!0;d=Oi(B.reader,B.version,B.flags).vg}).box("mdat",Lg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new Q(2,2,2008);a=c;for(var m=new wg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
1252
- q.value;var p=q.wf||l,u=q.he?c+q.he:a;a=u+(p||0);var x=0;do{var w=m.M();x+=w;var z=m.M(),v=null;"vttc"==Dg(z)?8<w&&(v=m.sb(w-8)):m.skip(w-8);p&&v&&(w=FB(v,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(ne)};function FB(a,b,c){var d,e,f;(new zg).box("payl",Lg(function(g){d=hd(g)})).box("iden",Lg(function(g){e=hd(g)})).box("sttg",Lg(function(g){f=hd(g)})).parse(a);return d?GB(d,e,f,b,c):null}
1253
- function GB(a,b,c,d,e){d=new Nb(d,e,"");yB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Ku(c),b=Nu(a);b;)xB(d,b,[]),Lu(a),b=Nu(a);return d}P("shaka.text.Mp4VttParser",EB);EB.prototype.parseMedia=EB.prototype.parseMedia;EB.prototype.setManifestType=EB.prototype.setManifestType;EB.prototype.setSequenceMode=EB.prototype.setSequenceMode;EB.prototype.parseInit=EB.prototype.parseInit;ee['application/mp4; codecs="wvtt"']=function(){return new EB};function HB(){}HB.prototype.parseInit=function(){};HB.prototype.setSequenceMode=function(){};HB.prototype.setManifestType=function(){};HB.prototype.parseMedia=function(a){var b=hd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ku(c[0]),e=IB(d),f=Mu(d,/,/g);d=IB(d);if(null==e||null==f||null==d)throw new Q(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
1254
- function IB(a){a=Mu(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.SbvTextParser",HB);HB.prototype.parseMedia=HB.prototype.parseMedia;HB.prototype.setManifestType=HB.prototype.setManifestType;HB.prototype.setSequenceMode=HB.prototype.setSequenceMode;HB.prototype.parseInit=HB.prototype.parseInit;ee["text/x-subviewer"]=function(){return new HB};function JB(){this.g=new uB}JB.prototype.parseInit=function(){};JB.prototype.setSequenceMode=function(){};JB.prototype.setManifestType=function(){};JB.prototype.parseMedia=function(a,b,c){a=hd(a);a=KB(a);a=Ab(nd(a));return this.g.parseMedia(a,b,c)};
1255
- function KB(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",JB);JB.srt2webvtt=KB;JB.prototype.parseMedia=JB.prototype.parseMedia;
1256
- JB.prototype.setManifestType=JB.prototype.setManifestType;JB.prototype.setSequenceMode=JB.prototype.setSequenceMode;JB.prototype.parseInit=JB.prototype.parseInit;ee["text/srt"]=function(){return new JB};function LB(){}LB.prototype.parseInit=function(){};LB.prototype.setSequenceMode=function(){};LB.prototype.setManifestType=function(){};
1257
- LB.prototype.parseMedia=function(a){var b="",c="";a=hd(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=MB.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=NB.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(OB);else if("Style"==e){e=f.split(OB);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1258
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={re:e.re},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=NB.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(OB);else if("Dialogue"==f){g=g.split(OB);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=PB(f.Start);var k=PB(f.End);g=new Nb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.re=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.re}}(e)))&&QB(g,f);d.push(g)}return d};
1259
- function QB(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=RB(c))a.color=c;if(c=b.BackColour)if(c=RB(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Qb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
1239
+ f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Lu(f[0]),k=wB(g),n=Nu(g,/[ \t]+--\x3e[ \t]+/g),l=wB(g),null==k||null==n||null==l)Wa("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Nb(k,l,"");Mu(g);for(k=Ou(g);k;)yB(m,k,b),Mu(g),k=Ou(g);zB(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
1240
+ function xB(a){for(var b=t(Object.entries(dc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Nb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ec));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Nb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1241
+ function zB(a,b,c){if(a.includes("<")){0===c.size&&xB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(AB)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
1242
+ k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=BB(a);try{var m=Pg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
1243
+ m.next())CB(a.value,b,c);else b.payload=qd(a);else b.payload=qd(a)}else b.payload=qd(a)}function BB(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 DB(a,b){return a&&0<a.length?a:b}
1244
+ function CB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ob;d.position=null;d.size=0;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)&&(g=c.get(g))&&(d.backgroundColor=DB(g.backgroundColor,d.backgroundColor),d.color=DB(g.color,d.color),d.fontFamily=DB(g.fontFamily,d.fontFamily),d.fontSize=
1245
+ DB(g.fontSize,d.fontSize),d.textShadow=DB(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Zb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
1246
+ if(!f)break;if(f=wB(new Lu(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Tg(a)||1==e.length&&Tg(e[0]))for(c=Wg(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Zb(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=qd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())CB(a.value,d,c)}
1247
+ function yB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=ac[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1248
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=EB(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()])}
1249
+ function EB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function wB(a){a=Nu(a,AB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.VttTextParser",vB);vB.prototype.parseMedia=vB.prototype.parseMedia;vB.prototype.setManifestType=vB.prototype.setManifestType;vB.prototype.setSequenceMode=vB.prototype.setSequenceMode;vB.prototype.parseInit=vB.prototype.parseInit;var AB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1250
+ ee["text/vtt"]=function(){return new vB};ee['text/vtt; codecs="vtt"']=function(){return new vB};ee['text/vtt; codecs="wvtt"']=function(){return new vB};function FB(){this.g=null}FB.prototype.parseInit=function(a){var b=this,c=!1;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).O("mdhd",function(d){d=Ni(d.reader,d.version);b.g=d.timescale}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new Q(2,2,2008);if(!c)throw new Q(2,2,2008);};FB.prototype.setSequenceMode=function(){};FB.prototype.setManifestType=function(){};
1251
+ FB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new Q(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new zg).box("moof",Eg).box("traf",Eg).O("tfdt",function(B){g=!0;c=Mi(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Li(B.reader,B.flags).Xf}).O("trun",function(B){h=!0;d=Oi(B.reader,B.version,B.flags).wg}).box("mdat",Lg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new Q(2,2,2008);a=c;for(var m=new wg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
1252
+ q.value;var p=q.xf||l,u=q.ie?c+q.ie:a;a=u+(p||0);var x=0;do{var w=m.M();x+=w;var z=m.M(),v=null;"vttc"==Dg(z)?8<w&&(v=m.sb(w-8)):m.skip(w-8);p&&v&&(w=GB(v,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(ne)};function GB(a,b,c){var d,e,f;(new zg).box("payl",Lg(function(g){d=hd(g)})).box("iden",Lg(function(g){e=hd(g)})).box("sttg",Lg(function(g){f=hd(g)})).parse(a);return d?HB(d,e,f,b,c):null}
1253
+ function HB(a,b,c,d,e){d=new Nb(d,e,"");zB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Lu(c),b=Ou(a);b;)yB(d,b,[]),Mu(a),b=Ou(a);return d}P("shaka.text.Mp4VttParser",FB);FB.prototype.parseMedia=FB.prototype.parseMedia;FB.prototype.setManifestType=FB.prototype.setManifestType;FB.prototype.setSequenceMode=FB.prototype.setSequenceMode;FB.prototype.parseInit=FB.prototype.parseInit;ee['application/mp4; codecs="wvtt"']=function(){return new FB};function IB(){}IB.prototype.parseInit=function(){};IB.prototype.setSequenceMode=function(){};IB.prototype.setManifestType=function(){};IB.prototype.parseMedia=function(a){var b=hd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Lu(c[0]),e=JB(d),f=Nu(d,/,/g);d=JB(d);if(null==e||null==f||null==d)throw new Q(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
1254
+ function JB(a){a=Nu(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.SbvTextParser",IB);IB.prototype.parseMedia=IB.prototype.parseMedia;IB.prototype.setManifestType=IB.prototype.setManifestType;IB.prototype.setSequenceMode=IB.prototype.setSequenceMode;IB.prototype.parseInit=IB.prototype.parseInit;ee["text/x-subviewer"]=function(){return new IB};function KB(){this.g=new vB}KB.prototype.parseInit=function(){};KB.prototype.setSequenceMode=function(){};KB.prototype.setManifestType=function(){};KB.prototype.parseMedia=function(a,b,c){a=hd(a);a=LB(a);a=Ab(nd(a));return this.g.parseMedia(a,b,c)};
1255
+ function LB(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",KB);KB.srt2webvtt=LB;KB.prototype.parseMedia=KB.prototype.parseMedia;
1256
+ KB.prototype.setManifestType=KB.prototype.setManifestType;KB.prototype.setSequenceMode=KB.prototype.setSequenceMode;KB.prototype.parseInit=KB.prototype.parseInit;ee["text/srt"]=function(){return new KB};function MB(){}MB.prototype.parseInit=function(){};MB.prototype.setSequenceMode=function(){};MB.prototype.setManifestType=function(){};
1257
+ MB.prototype.parseMedia=function(a){var b="",c="";a=hd(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=NB.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=OB.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(PB);else if("Style"==e){e=f.split(PB);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1258
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={se:e.se},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=OB.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(PB);else if("Dialogue"==f){g=g.split(PB);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=QB(f.Start);var k=QB(f.End);g=new Nb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.se=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.se}}(e)))&&RB(g,f);d.push(g)}return d};
1259
+ function RB(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=SB(c))a.color=c;if(c=b.BackColour)if(c=SB(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Qb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
1260
1260
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Qb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1261
- function RB(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function PB(a){a=SB.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",LB);LB.prototype.parseMedia=LB.prototype.parseMedia;LB.prototype.setManifestType=LB.prototype.setManifestType;LB.prototype.setSequenceMode=LB.prototype.setSequenceMode;LB.prototype.parseInit=LB.prototype.parseInit;
1262
- var MB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,NB=/^\s*([^:]+):\s*(.*)/,OB=/\s*,\s*/,SB=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ee["text/x-ssa"]=function(){return new LB};function TB(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Qd:c,U:a}:null}function UB(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,Ea:"mp4a.40."+e}}
1263
- function VB(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1264
- function WB(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1265
- 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function XB(a){this.i=a;this.h=0;this.g=new Map}r=XB.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Xd(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1266
- r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Ki(e),g=f.length;g<e.length&&!VB(e,g);g++);a=1E3*c.endTime;f=Ji(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=UB(e,g);if(!c)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=TB(e,g);if(!h)return Promise.reject(new Q(2,3,3018));var k=h.Qd+h.U;g+k<=e.length&&f.push({data:e.subarray(g+h.Qd,g+k),size:h.U,
1267
- duration:1024,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Sa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:f},stream:b};a=new rw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=xw(a),this.g.set(b.id,d));b=Ow(a);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.AacTransmuxer",XB);
1268
- XB.prototype.transmux=XB.prototype.transmux;XB.prototype.getOriginalMimeType=XB.prototype.getOriginalMimeType;XB.prototype.convertCodecs=XB.prototype.convertCodecs;XB.prototype.isSupported=XB.prototype.isSupported;XB.prototype.destroy=XB.prototype.destroy;jc("audio/aac",function(){return new XB("audio/aac")},pc);function YB(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1261
+ function SB(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function QB(a){a=TB.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",MB);MB.prototype.parseMedia=MB.prototype.parseMedia;MB.prototype.setManifestType=MB.prototype.setManifestType;MB.prototype.setSequenceMode=MB.prototype.setSequenceMode;MB.prototype.parseInit=MB.prototype.parseInit;
1262
+ var NB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,OB=/^\s*([^:]+):\s*(.*)/,PB=/\s*,\s*/,TB=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ee["text/x-ssa"]=function(){return new MB};function UB(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Qd:c,U:a}:null}function VB(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,Ea:"mp4a.40."+e}}
1263
+ function WB(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1264
+ function XB(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1265
+ 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function YB(a){this.i=a;this.h=0;this.g=new Map}r=YB.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Xd(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1266
+ r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Ki(e),g=f.length;g<e.length&&!WB(e,g);g++);a=1E3*c.endTime;f=Ji(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=VB(e,g);if(!c)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=UB(e,g);if(!h)return Promise.reject(new Q(2,3,3018));var k=h.Qd+h.U;g+k<=e.length&&f.push({data:e.subarray(g+h.Qd,g+k),size:h.U,
1267
+ duration:1024,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:f},stream:b};a=new sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=yw(a),this.g.set(b.id,d));b=Pw(a);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.AacTransmuxer",YB);
1268
+ YB.prototype.transmux=YB.prototype.transmux;YB.prototype.getOriginalMimeType=YB.prototype.getOriginalMimeType;YB.prototype.convertCodecs=YB.prototype.convertCodecs;YB.prototype.isSupported=YB.prototype.isSupported;YB.prototype.destroy=YB.prototype.destroy;jc("audio/aac",function(){return new YB("audio/aac")},pc);function ZB(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1269
1269
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ga:a,U:e}}
1270
- function ZB(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function $B(a){this.i=a;this.h=0;this.g=new Map}r=$B.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1271
- r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Ki(a),f=e.length;f<a.length&&!ZB(a,f);f++);var g=1E3*c.endTime;e=Ji(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=YB(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.U),size:k.U,duration:1536,Ta:0,flags:{Va:0,
1272
- Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});f+=k.U}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Sa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new rw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=xw(a),this.g.set(b.id,d));b=Ow(a);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",$B);$B.prototype.transmux=$B.prototype.transmux;
1273
- $B.prototype.getOriginalMimeType=$B.prototype.getOriginalMimeType;$B.prototype.convertCodecs=$B.prototype.convertCodecs;$B.prototype.isSupported=$B.prototype.isSupported;$B.prototype.destroy=$B.prototype.destroy;jc("audio/ac3",function(){return new $B("audio/ac3")},pc);function aC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Ti(a.subarray(b+2));Vi(c,2);Vi(c,3);var d=Wi(c,11)+1<<1,e=Wi(c,2);if(3==e){e=Wi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Wi(c,2);var g=Wi(c,3),h=Wi(c,1);c=Wi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,U:d}};function bC(a){this.i=a;this.h=0;this.g=new Map}r=bC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1274
- r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Ki(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ji(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=aC(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.U),size:k.U,duration:1536,
1275
- Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});f+=k.U}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Sa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new rw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=xw(a),this.g.set(b.id,d));b=Ow(a);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",bC);bC.prototype.transmux=bC.prototype.transmux;
1276
- bC.prototype.getOriginalMimeType=bC.prototype.getOriginalMimeType;bC.prototype.convertCodecs=bC.prototype.convertCodecs;bC.prototype.isSupported=bC.prototype.isSupported;bC.prototype.destroy=bC.prototype.destroy;jc("audio/ec3",function(){return new bC("audio/ec3")},pc);function cC(a){if(!a.length)return null;var b=a.find(function(x){return 7==x.type});a=a.find(function(x){return 8==x.type});if(!b||!a)return null;var c=new Ti(b.data),d=$i(c);$i(c);$i(c);Yi(c);if(dC.includes(d)&&(d=T(c),3===d&&Vi(c,1),Yi(c),Yi(c),Vi(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?aj(c,16):aj(c,64))}Yi(c);d=T(c);if(0===d)T(c);else if(1===d)for(Vi(c,1),Yi(c),Yi(c),d=T(c),e=0;e<d;e++)Yi(c);Yi(c);Vi(c,1);var f=T(c),g=T(c),h=Wi(c,1);0===h&&Vi(c,1);Vi(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1270
+ function $B(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function aC(a){this.i=a;this.h=0;this.g=new Map}r=aC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1271
+ r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Ki(a),f=e.length;f<a.length&&!$B(a,f);f++);var g=1E3*c.endTime;e=Ji(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=ZB(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.U),size:k.U,duration:1536,Ua:0,flags:{Wa:0,
1272
+ Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});f+=k.U}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ta:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=yw(a),this.g.set(b.id,d));b=Pw(a);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",aC);aC.prototype.transmux=aC.prototype.transmux;
1273
+ aC.prototype.getOriginalMimeType=aC.prototype.getOriginalMimeType;aC.prototype.convertCodecs=aC.prototype.convertCodecs;aC.prototype.isSupported=aC.prototype.isSupported;aC.prototype.destroy=aC.prototype.destroy;jc("audio/ac3",function(){return new aC("audio/ac3")},pc);function bC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Ti(a.subarray(b+2));Vi(c,2);Vi(c,3);var d=Wi(c,11)+1<<1,e=Wi(c,2);if(3==e){e=Wi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Wi(c,2);var g=Wi(c,3),h=Wi(c,1);c=Wi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,U:d}};function cC(a){this.i=a;this.h=0;this.g=new Map}r=cC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1274
+ r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Ki(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ji(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=bC(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.U),size:k.U,duration:1536,
1275
+ Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});f+=k.U}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ta:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=yw(a),this.g.set(b.id,d));b=Pw(a);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",cC);cC.prototype.transmux=cC.prototype.transmux;
1276
+ cC.prototype.getOriginalMimeType=cC.prototype.getOriginalMimeType;cC.prototype.convertCodecs=cC.prototype.convertCodecs;cC.prototype.isSupported=cC.prototype.isSupported;cC.prototype.destroy=cC.prototype.destroy;jc("audio/ec3",function(){return new cC("audio/ec3")},pc);function dC(a){if(!a.length)return null;var b=a.find(function(x){return 7==x.type});a=a.find(function(x){return 8==x.type});if(!b||!a)return null;var c=new Ti(b.data),d=$i(c);$i(c);$i(c);Yi(c);if(eC.includes(d)&&(d=T(c),3===d&&Vi(c,1),Yi(c),Yi(c),Vi(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?aj(c,16):aj(c,64))}Yi(c);d=T(c);if(0===d)T(c);else if(1===d)for(Vi(c,1),Yi(c),Yi(c),d=T(c),e=0;e<d;e++)Yi(c);Yi(c);Vi(c,1);var f=T(c),g=T(c),h=Wi(c,1);0===h&&Vi(c,1);Vi(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1277
1277
  (k=T(c),l=T(c),m=T(c),n=T(c));e=d=1;if(W(c)&&W(c)){var q=$i(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=p[q-1],e=u[q-1]):255===q&&(d=Wi(c,16),e=Wi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,y(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,y(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
1278
1278
  225].concat(k,[1],b));return{height:c,width:f,oa:a,xa:d,ya:e}}
1279
- function eC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=hj(new Ti(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1280
- {data:zd.apply(rd,y(c)),jd:b}:null}var dC=[100,110,122,244,44,83,86,118,128,138,139,134];function fC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=gC(b.fullData);a=hC(c.fullData);var f=iC(d.fullData);b=jC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Gf:e.Gf,Qe:a.Qe,Re:a.Re,Ke:a.Ke,Pe:a.Pe,Le:a.Le,Me:a.Me,Ne:a.Ne,Oe:a.Oe,Ee:a.Ee,Fe:a.Fe,Ge:a.Ge,He:a.He,Ie:a.Ie,Je:a.Je,Be:a.Be,be:a.be,Ae:a.Ae,ze:a.ze,ye:a.ye,pf:f.pf});return{height:a.height,width:a.width,
1281
- oa:b,xa:a.pi,ya:a.oi}}function gC(a){var b=new Ti(a,!0);$i(b);$i(b);Wi(b,4);Wi(b,2);Wi(b,6);a=Wi(b,3);b=W(b);return{jf:a+1,Gf:b}}
1282
- function hC(a){a=new Ti(a,!0);$i(a);$i(a);var b=0,c=0,d=0,e=0;Wi(a,4);var f=Wi(a,3);W(a);for(var g=Wi(a,2),h=Wi(a,1),k=Wi(a,5),l=$i(a),m=$i(a),n=$i(a),q=$i(a),p=$i(a),u=$i(a),x=$i(a),w=$i(a),z=$i(a),v=$i(a),B=$i(a),A=[],D=[],F=0;F<f;F++)A.push(W(a)),D.push(W(a));if(0<f)for(F=f;8>F;F++)Wi(a,2);for(F=0;F<f;F++)A[F]&&Wi(a,88),D[F]&&$i(a);T(a);A=T(a);3==A&&Wi(a,1);D=T(a);F=T(a);W(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),I=T(a),E=T(a);if(W(a))for(var H=0;H<=f;H++)T(a),T(a),T(a);else T(a),T(a),
1279
+ function fC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=hj(new Ti(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1280
+ {data:zd.apply(rd,y(c)),jd:b}:null}var eC=[100,110,122,244,44,83,86,118,128,138,139,134];function gC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=hC(b.fullData);a=iC(c.fullData);var f=jC(d.fullData);b=kC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Hf:e.Hf,Re:a.Re,Se:a.Se,Le:a.Le,Qe:a.Qe,Me:a.Me,Ne:a.Ne,Oe:a.Oe,Pe:a.Pe,Fe:a.Fe,Ge:a.Ge,He:a.He,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Ce:a.Ce,be:a.be,Be:a.Be,Ae:a.Ae,ze:a.ze,pf:f.pf});return{height:a.height,width:a.width,
1281
+ oa:b,xa:a.ri,ya:a.pi}}function hC(a){var b=new Ti(a,!0);$i(b);$i(b);Wi(b,4);Wi(b,2);Wi(b,6);a=Wi(b,3);b=W(b);return{jf:a+1,Hf:b}}
1282
+ function iC(a){a=new Ti(a,!0);$i(a);$i(a);var b=0,c=0,d=0,e=0;Wi(a,4);var f=Wi(a,3);W(a);for(var g=Wi(a,2),h=Wi(a,1),k=Wi(a,5),l=$i(a),m=$i(a),n=$i(a),q=$i(a),p=$i(a),u=$i(a),x=$i(a),w=$i(a),z=$i(a),v=$i(a),B=$i(a),A=[],D=[],F=0;F<f;F++)A.push(W(a)),D.push(W(a));if(0<f)for(F=f;8>F;F++)Wi(a,2);for(F=0;F<f;F++)A[F]&&Wi(a,88),D[F]&&$i(a);T(a);A=T(a);3==A&&Wi(a,1);D=T(a);F=T(a);W(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),I=T(a),E=T(a);if(W(a))for(var H=0;H<=f;H++)T(a),T(a),T(a);else T(a),T(a),
1283
1283
  T(a);T(a);T(a);T(a);T(a);T(a);T(a);if(W(a)&&W(a))for(H=0;4>H;H++)for(var K=0;K<(3===H?2:6);K++)if(W(a)){var M=Math.min(64,1<<4+(H<<1));1<H&&Zi(a);for(var O=0;O<M;O++)Zi(a)}else T(a);W(a);W(a);W(a)&&($i(a),T(a),T(a),W(a));H=T(a);for(M=K=0;M<H;M++)if(O=!1,0!==M&&(O=W(a)),O){M===H&&T(a);W(a);T(a);for(var N=O=0;N<=K;N++){var U=W(a),R=!1;U||(R=W(a));(U||R)&&O++}K=O}else{N=T(a);O=T(a);K=N+O;for(U=0;U<N;U++)T(a),W(a);for(N=0;N<O;N++)T(a),W(a)}if(W(a))for(H=T(a),K=0;K<H;K++){for(M=0;M<E+4;M++)Wi(a,1);Wi(a,
1284
1284
  1)}H=E=1;K=0;W(a);W(a);if(W(a)){W(a)&&(M=$i(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(E=O[M-1],H=N[M-1]):255===M&&(E=Wi(a,16),H=Wi(a,16)));W(a)&&W(a);W(a)&&(Wi(a,3),W(a),W(a)&&($i(a),$i(a),$i(a)));W(a)&&(T(a),T(a));W(a);W(a);W(a);if(M=W(a))T(a),T(a),T(a),T(a);if(W(a)&&(Wi(a,32),Wi(a,32),W(a)&&T(a),W(a))){N=!1;M=W(a);O=W(a);if(M||O){if(N=W(a))$i(a),Wi(a,5),W(a),Wi(a,5);Wi(a,4);Wi(a,4);N&&Wi(a,4);Wi(a,5);Wi(a,5);Wi(a,5)}for(U=0;U<=
1285
- f;U++){var V=!0;R=1;W(a)||(V=W(a));var xa=!1;V?T(a):xa=W(a);xa||(R=T(a)+1);if(M){for(V=0;V<R;V++)T(a),T(a),N&&(T(a),T(a));W(a)}if(O){for(V=0;V<R;V++)T(a),T(a),N&&(T(a),T(a));W(a)}}}W(a)&&(W(a),W(a),W(a),K=T(a),T(a),T(a),T(a),T(a))}return{Ke:B,Qe:g,Re:h,Pe:k,Le:l,Me:m,Ne:n,Oe:q,Ee:p,Fe:u,Ge:x,He:w,Ie:z,Je:v,be:K,Be:0,Ae:A,ze:J,ye:I,width:D-(b+c)*(1===A||2===A?2:1),height:F-(d+e)*(1===A?2:1),pi:E,oi:H}}
1286
- function iC(a){var b=new Ti(a,!0);$i(b);$i(b);T(b);T(b);W(b);W(b);Wi(b,3);W(b);W(b);T(b);T(b);Zi(b);W(b);W(b);W(b)&&T(b);Zi(b);Zi(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{pf:c}}
1287
- function jC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Qe&3)<<6|(d.Re?1:0)<<5|d.Pe&31;e[2]=d.Le;e[3]=d.Me;e[4]=d.Ne;e[5]=d.Oe;e[6]=d.Ee;e[7]=d.Fe;e[8]=d.Ge;e[9]=d.He;e[10]=d.Ie;e[11]=d.Je;e[12]=d.Ke;e[13]=240|(d.be&3840)>>8;e[14]=d.be&255;e[15]=252|d.pf&3;e[16]=252|d.Ae&3;e[17]=248|d.ze&7;e[18]=248|d.ye&7;e[19]=0;e[20]=0;e[21]=(d.Be&3)<<6|(d.jf&7)<<3|(d.Gf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1288
- 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function kC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*lC[14*(3===c?3-d:3===d?3:4)+e-1];f=mC[3*(3===c?0:2===c?1:2)+f];c=nC[c][d];var h=oC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,U:k,ni:8*c*h}}return null}
1289
- function pC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function qC(a,b){if(b+1<a.length&&pC(a,b)){var c=kC(a,b),d=4;c&&c.U&&(d=c.U);b+=d;return b===a.length||b+1<a.length&&pC(a,b)}return!1}
1290
- var lC=[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],mC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],nC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],oC=[0,1,1,4];function rC(a){this.i=a;this.h=0;this.g=new Map}r=rC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1291
- r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Ki(c).length;e<c.length&&!qC(c,e);e++);var f;for(a=[];e<c.length;){var g=kC(c,e);if(!g)return Promise.reject(new Q(2,3,3018));f||(f=g);e+g.U<=c.length&&a.push({data:c.subarray(e,e+g.U),size:g.U,duration:1152,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});e+=g.U}if(!f)return Promise.reject(new Q(2,3,3018));c=9E4*f.ni/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Sa:[],
1292
- ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Ra:a},stream:b};f=new rw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=xw(f),this.g.set(b.id,d));b=Ow(f);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",rC);rC.prototype.transmux=rC.prototype.transmux;rC.prototype.getOriginalMimeType=rC.prototype.getOriginalMimeType;rC.prototype.convertCodecs=rC.prototype.convertCodecs;rC.prototype.isSupported=rC.prototype.isSupported;
1293
- rC.prototype.destroy=rC.prototype.destroy;jc("audio/mpeg",function(){return new rC("audio/mpeg")},pc);function sC(a){this.h=a;this.g=null}r=sC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Xd(a).split(","),c=Gd("audio",b);b=Gd("video",b);return!c||b||"mp3"!=Td(c)?!1:lb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1294
- r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ij;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.bd().audio||"audio"!=e)return Promise.reject(new Q(2,3,3018));e=new Uint8Array([]);a=t(a.Fb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=kC(b,c))?(c+d.U<=b.length&&(e=zd(e,b.subarray(c,c+d.U))),c+=d.U):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",sC);sC.prototype.transmux=sC.prototype.transmux;sC.prototype.getOriginalMimeType=sC.prototype.getOriginalMimeType;
1295
- sC.prototype.convertCodecs=sC.prototype.convertCodecs;sC.prototype.isSupported=sC.prototype.isSupported;sC.prototype.destroy=sC.prototype.destroy;jc("video/mp2t",function(){return new sC("video/mp2t")},oc);/*
1285
+ f;U++){var V=!0;R=1;W(a)||(V=W(a));var xa=!1;V?T(a):xa=W(a);xa||(R=T(a)+1);if(M){for(V=0;V<R;V++)T(a),T(a),N&&(T(a),T(a));W(a)}if(O){for(V=0;V<R;V++)T(a),T(a),N&&(T(a),T(a));W(a)}}}W(a)&&(W(a),W(a),W(a),K=T(a),T(a),T(a),T(a),T(a))}return{Le:B,Re:g,Se:h,Qe:k,Me:l,Ne:m,Oe:n,Pe:q,Fe:p,Ge:u,He:x,Ie:w,Je:z,Ke:v,be:K,Ce:0,Be:A,Ae:J,ze:I,width:D-(b+c)*(1===A||2===A?2:1),height:F-(d+e)*(1===A?2:1),ri:E,pi:H}}
1286
+ function jC(a){var b=new Ti(a,!0);$i(b);$i(b);T(b);T(b);W(b);W(b);Wi(b,3);W(b);W(b);T(b);T(b);Zi(b);W(b);W(b);W(b)&&T(b);Zi(b);Zi(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{pf:c}}
1287
+ function kC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Re&3)<<6|(d.Se?1:0)<<5|d.Qe&31;e[2]=d.Me;e[3]=d.Ne;e[4]=d.Oe;e[5]=d.Pe;e[6]=d.Fe;e[7]=d.Ge;e[8]=d.He;e[9]=d.Ie;e[10]=d.Je;e[11]=d.Ke;e[12]=d.Le;e[13]=240|(d.be&3840)>>8;e[14]=d.be&255;e[15]=252|d.pf&3;e[16]=252|d.Be&3;e[17]=248|d.Ae&7;e[18]=248|d.ze&7;e[19]=0;e[20]=0;e[21]=(d.Ce&3)<<6|(d.jf&7)<<3|(d.Hf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1288
+ 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function lC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*mC[14*(3===c?3-d:3===d?3:4)+e-1];f=nC[3*(3===c?0:2===c?1:2)+f];c=oC[c][d];var h=pC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,U:k,oi:8*c*h}}return null}
1289
+ function qC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function rC(a,b){if(b+1<a.length&&qC(a,b)){var c=lC(a,b),d=4;c&&c.U&&(d=c.U);b+=d;return b===a.length||b+1<a.length&&qC(a,b)}return!1}
1290
+ var mC=[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],nC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],oC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],pC=[0,1,1,4];function sC(a){this.i=a;this.h=0;this.g=new Map}r=sC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1291
+ r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Ki(c).length;e<c.length&&!rC(c,e);e++);var f;for(a=[];e<c.length;){var g=lC(c,e);if(!g)return Promise.reject(new Q(2,3,3018));f||(f=g);e+g.U<=c.length&&a.push({data:c.subarray(e,e+g.U),size:g.U,duration:1152,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});e+=g.U}if(!f)return Promise.reject(new Q(2,3,3018));c=9E4*f.oi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Ta:[],
1292
+ ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Ra:a},stream:b};f=new sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=yw(f),this.g.set(b.id,d));b=Pw(f);this.h++;b=zd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",sC);sC.prototype.transmux=sC.prototype.transmux;sC.prototype.getOriginalMimeType=sC.prototype.getOriginalMimeType;sC.prototype.convertCodecs=sC.prototype.convertCodecs;sC.prototype.isSupported=sC.prototype.isSupported;
1293
+ sC.prototype.destroy=sC.prototype.destroy;jc("audio/mpeg",function(){return new sC("audio/mpeg")},pc);function tC(a){this.h=a;this.g=null}r=tC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Xd(a).split(","),c=Gd("audio",b);b=Gd("video",b);return!c||b||"mp3"!=Td(c)?!1:lb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1294
+ r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ij;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.bd().audio||"audio"!=e)return Promise.reject(new Q(2,3,3018));e=new Uint8Array([]);a=t(a.Fb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=lC(b,c))?(c+d.U<=b.length&&(e=zd(e,b.subarray(c,c+d.U))),c+=d.U):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",tC);tC.prototype.transmux=tC.prototype.transmux;tC.prototype.getOriginalMimeType=tC.prototype.getOriginalMimeType;
1295
+ tC.prototype.convertCodecs=tC.prototype.convertCodecs;tC.prototype.isSupported=tC.prototype.isSupported;tC.prototype.destroy=tC.prototype.destroy;jc("video/mp2t",function(){return new tC("video/mp2t")},oc);/*
1296
1296
  @license
1297
1297
  MSS Transmuxer
1298
1298
  Copyright 2015 Dash Industry Forum
1299
1299
  SPDX-License-Identifier: BSD-3-Clause
1300
1300
  */
1301
- function tC(a){this.h=a;(this.g=uu.get("ISOBoxer")())&&uC(this)}
1302
- function uC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1301
+ function uC(a){this.h=a;(this.g=vu.get("ISOBoxer")())&&vC(this)}
1302
+ function vC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1303
1303
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1304
- "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==vC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=tC.prototype;r.destroy=function(){};
1304
+ "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==wC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=uC.prototype;r.destroy=function(){};
1305
1305
  r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
1306
1306
  r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new Q(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
1307
1307
  1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
1308
- 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var x=e.fetch("saio");null!==x&&(x.offset[0]=wC(u,"traf")+wC(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(z){return z instanceof Q?Promise.reject(z):Promise.reject(new Q(2,3,3022))}};function wC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",tC);tC.prototype.transmux=tC.prototype.transmux;tC.prototype.getOriginalMimeType=tC.prototype.getOriginalMimeType;
1309
- tC.prototype.convertCodecs=tC.prototype.convertCodecs;tC.prototype.isSupported=tC.prototype.isSupported;tC.prototype.destroy=tC.prototype.destroy;var vC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new tC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new tC("mss/video/mp4")},pc);function xC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=xC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1310
- r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Xd(c).split(",");c=Gd("audio",d);d=Gd("video",d);if(c&&(c=Td(c),!yC.includes(c))||d&&(c=Td(d),!zC.includes(c)))return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};
1311
- r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Xd(b).replace("mp4a.40.34","mp3").split(",").map(this.kh).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.kh=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};r.getOriginalMimeType=function(){return this.l};
1312
- r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!pj(f)){for(var g=Ki(f),h=g.length;h<f.length;h++)if(qC(f,h))return Promise.reject(new Q(2,3,3018));for(h=g.length;h<f.length;h++)if(VB(f,h))return this.h||(this.h=new XB("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new Q(2,3,3018))}this.j?this.j.clearData():this.j=new ij;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,u=[],x=k.xc();if(!x.length)throw new Q(2,3,
1313
- 3023);for(var w=0;w<x.length;w++){var z=x[w],v=z.nalus;u.push.apply(u,y(v));var B=eC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=w+1<x.length?(x[w+1].dts||0)-(z.dts||0):1<x.length?(z.dts||0)-(x[w-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:B.data,size:B.data.byteLength,duration:A,Ta:Math.round((z.pts||0)-(z.dts||0)),flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:B.jd?2:1,Wa:B.jd?0:1}})}}var D=cC(u);if(!D||null==p)throw new Q(2,3,3018);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",
1314
- encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Sa:[],ga:new Uint8Array([]),oa:D.oa,xa:D.xa,ya:D.ya,data:{jb:this.g,baseMediaDecodeTime:p,Ra:q},stream:b};break;case "hvc":var F=[],J=null,I=[],E=k.xc();if(!E.length)throw new Q(2,3,3023);for(var H=0;H<E.length;H++){var K=E[H],M=K.nalus;I.push.apply(I,y(M));for(var O=!1,N=[],U=!1,R=t(M),V=R.next();!V.done;V=R.next()){var xa=V.value;switch(xa.type){case 1:case 0:var Ca=U=!0;break;case 19:case 20:case 21:O=Ca=U=!0;break;case 32:Ca=
1315
- !0;break;case 33:Ca=!0;break;case 34:Ca=!0;break;case 35:U=Ca=!0;break;case 39:case 40:Ca=!0;break;default:Ca=!1}if(U&&Ca){var db=xa.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=db>>24&255;Fa[1]=db>>16&255;Fa[2]=db>>8&255;Fa[3]=db&255;N.push(Fa);N.push(xa.fullData)}}var Va=N.length?{data:zd.apply(rd,y(N)),jd:O}:null;if(Va){null==J&&null!=K.dts&&(J=K.dts);var ua=void 0;ua=H+1<E.length?(E[H+1].dts||0)-(K.dts||0):1<E.length?(K.dts||0)-(E[H-1].dts||0):9E4*(c.endTime-c.startTime);F.push({data:Va.data,
1316
- size:Va.data.byteLength,duration:ua,Ta:Math.round((K.pts||0)-(K.dts||0)),flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:Va.jd?2:1,Wa:Va.jd?0:1}})}}var kb=fC(I);if(!kb||null==J)throw new Q(2,3,3018);b.height=kb.height;b.width=kb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Sa:[],ga:new Uint8Array([]),oa:kb.oa,xa:kb.xa,ya:kb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Ra:F},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var yb=
1317
- [],hb,Za=null,$e=t(k.Fb()),wd=$e.next();!wd.done;wd=$e.next()){var Yd=wd.value,id=Yd.data;if(id){var Bc=0;hb=UB(id,Bc);if(!hb)throw new Q(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Yd.pts&&(Za=Yd.pts);for(;Bc<id.length;){var Zd=TB(id,Bc);if(Zd){var af=Zd.Qd+Zd.U;Bc+af<=id.length&&yb.push({data:id.subarray(Bc+Zd.Qd,Bc+af),size:Zd.U,duration:1024,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});Bc+=af}else Bc++}}}if(!hb||null==Za){if(!k.xc().length)throw new Q(2,
1318
- 3,3018);Za=9E4*c.startTime;var $d=Gd("audio",b.codecs.split(","));if(!$d||!b.channelsCount||!b.audioSamplingRate)throw new Q(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:$d};var xd=WB($d,b.channelsCount);if(!xd)throw new Q(2,3,3018);for(var ri=Za+9E4*(c.endTime-c.startTime),sg=Za;sg<ri;)yb.push({data:xd,size:xd.byteLength,duration:1024,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),sg+=1024/hb.sampleRate*9E4}var si=hb.sampleRate,ti=Za/9E4*si;n={id:b.id,type:"audio",codecs:hb.Ea,
1319
- encrypted:b.encrypted&&0<b.drmInfos.length,timescale:si,duration:d,Sa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ti,Ra:yb},stream:b};break;case "ac3":for(var bf=[],ae=0,cf=new Uint8Array([]),Sb=null,Vt=t(k.Fb()),tm=Vt.next();!tm.done;tm=Vt.next()){var um=tm.value,vm=um.data;null==Sb&&null!==um.pts&&(Sb=um.pts);for(var mf=0;mf<vm.length;){var Cd=YB(vm,mf);Cd?(b.audioSamplingRate=Cd.sampleRate,b.channelsCount=Cd.channelCount,ae=Cd.sampleRate,cf=Cd.ga,
1320
- bf.push({data:vm.subarray(mf,mf+Cd.U),size:Cd.U,duration:1536,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),mf+=Cd.U):mf++}}if(0==ae||0==cf.byteLength||null==Sb)throw new Q(2,3,3018);var OC=Sb/9E4*ae;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ae,duration:d,Sa:[],ga:cf,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:OC,Ra:bf},stream:b};break;case "ec3":for(var Wt=[],bj=0,wm=new Uint8Array([]),cj=null,Xt=t(k.Fb()),xm=Xt.next();!xm.done;xm=
1321
- Xt.next()){var ym=xm.value,zm=ym.data;null==cj&&null!==ym.pts&&(cj=ym.pts);for(var nf=0;nf<zm.length;){var Dd=aC(zm,nf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,bj=Dd.sampleRate,wm=Dd.ga,Wt.push({data:zm.subarray(nf,nf+Dd.U),size:Dd.U,duration:1536,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),nf+=Dd.U):nf++}}if(0==bj||0==wm.byteLength||null==cj)throw new Q(2,3,3018);var PC=cj/9E4*bj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bj,
1322
- duration:d,Sa:[],ga:wm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:PC,Ra:Wt},stream:b};break;case "mp3":for(var Yt=[],dj,ej=null,Zt=t(k.Fb()),Am=Zt.next();!Am.done;Am=Zt.next()){var Bm=Am.value,Gg=Bm.data;if(Gg){null==ej&&null!==Bm.pts&&(ej=Bm.pts);for(var fe=0;fe<Gg.length;){var of=kC(Gg,fe);of?(dj||(dj=of),fe+of.U<=Gg.length&&Yt.push({data:Gg.subarray(fe,fe+of.U),size:of.U,duration:1152,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),fe+=of.U):fe++}}}if(!dj||null==ej)throw new Q(2,
1323
- 3,3018);var $t=dj.sampleRate,QC=ej/9E4*$t;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$t,duration:d,Sa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:QC,Ra:Yt},stream:b};break;case "opus":var au=[],fj=null,Kc=k.F;if(!Kc)throw new Q(2,3,3018);var ub=[];switch(Kc.Zg){case 1:case 2:ub=[0];break;case 0:ub=[255,1,1,0,1];break;case 128:ub=[255,2,0,0,1];break;case 3:ub=[1,2,1,0,2,1];break;case 4:ub=[1,2,2,0,1,2,3];
1324
- break;case 5:ub=[1,3,2,0,4,1,2,3];break;case 6:ub=[1,4,2,0,4,1,2,3,5];break;case 7:ub=[1,4,2,0,4,1,2,3,5,6];break;case 8:ub=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:ub=[1,1,2,0,1];break;case 131:ub=[1,1,3,0,1,2];break;case 132:ub=[1,1,4,0,1,2,3];break;case 133:ub=[1,1,5,0,1,2,3,4];break;case 134:ub=[1,1,6,0,1,2,3,4,5];break;case 135:ub=[1,1,7,0,1,2,3,4,5,6];break;case 136:ub=[1,1,8,0,1,2,3,4,5,6,7]}var bu=new Uint8Array([0,Kc.channelCount,0,0,Kc.sampleRate>>>24&255,Kc.sampleRate>>>17&255,Kc.sampleRate>>>
1325
- 8&255,Kc.sampleRate>>>0&255,0,0].concat(y(ub)));for(var cu=Kc.sampleRate,du=t(k.Fb()),Cm=du.next();!Cm.done;Cm=du.next()){var Dm=Cm.value,pf=Dm.data;null==fj&&null!==Dm.pts&&(fj=Dm.pts);for(var Hg=0;Hg<pf.length;){for(var RC=0!==(pf[Hg+1]&16),SC=0!==(pf[Hg+1]&8),jd=Hg+2,gj=0;255===pf[jd];)gj+=255,jd+=1;gj+=pf[jd];jd+=1;jd+=RC?2:0;jd+=SC?2:0;var eu=pf.slice(jd,jd+gj);au.push({data:eu,size:eu.byteLength,duration:960,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});Hg=jd+gj}}if(0==bu.byteLength||null==fj)throw new Q(2,
1326
- 3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var TC=fj/9E4*cu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cu,duration:d,Sa:[],ga:bu,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:TC,Ra:au},stream:b}}n&&(l.push(n),n=null)}}catch(Em){return Em&&3023==Em.code?Promise.resolve(new Uint8Array([])):Promise.reject(Em)}if(!l.length)return Promise.reject(new Q(2,3,3018));var fu=new rw(l);if(this.i.has(b.id))var Fm=
1327
- this.i.get(b.id);else Fm=xw(fu),this.i.set(b.id,Fm);var UC=Ow(fu);this.g++;var VC=zd(Fm,UC);return Promise.resolve(VC)};P("shaka.transmuxer.TsTransmuxer",xC);xC.prototype.transmux=xC.prototype.transmux;xC.prototype.getOriginalMimeType=xC.prototype.getOriginalMimeType;xC.prototype.convertCodecs=xC.prototype.convertCodecs;xC.prototype.isSupported=xC.prototype.isSupported;xC.prototype.destroy=xC.prototype.destroy;var yC=["aac","ac-3","ec-3","mp3","opus"],zC=["avc","hevc"];
1328
- jc("video/mp2t",function(){return new xC("video/mp2t")},nc);/*
1308
+ 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var x=e.fetch("saio");null!==x&&(x.offset[0]=xC(u,"traf")+xC(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(z){return z instanceof Q?Promise.reject(z):Promise.reject(new Q(2,3,3022))}};function xC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",uC);uC.prototype.transmux=uC.prototype.transmux;uC.prototype.getOriginalMimeType=uC.prototype.getOriginalMimeType;
1309
+ uC.prototype.convertCodecs=uC.prototype.convertCodecs;uC.prototype.isSupported=uC.prototype.isSupported;uC.prototype.destroy=uC.prototype.destroy;var wC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new uC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new uC("mss/video/mp4")},pc);function yC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=yC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1310
+ r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Xd(c).split(",");c=Gd("audio",d);d=Gd("video",d);if(c&&(c=Td(c),!zC.includes(c))||d&&(c=Td(d),!AC.includes(c)))return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};
1311
+ r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Xd(b).replace("mp4a.40.34","mp3").split(",").map(this.lh).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.lh=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};r.getOriginalMimeType=function(){return this.l};
1312
+ r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!pj(f)){for(var g=Ki(f),h=g.length;h<f.length;h++)if(rC(f,h))return Promise.reject(new Q(2,3,3018));for(h=g.length;h<f.length;h++)if(WB(f,h))return this.h||(this.h=new YB("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new Q(2,3,3018))}this.j?this.j.clearData():this.j=new ij;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,u=[],x=k.xc();if(!x.length)throw new Q(2,3,
1313
+ 3023);for(var w=0;w<x.length;w++){var z=x[w],v=z.nalus;u.push.apply(u,y(v));var B=fC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=w+1<x.length?(x[w+1].dts||0)-(z.dts||0):1<x.length?(z.dts||0)-(x[w-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:B.data,size:B.data.byteLength,duration:A,Ua:Math.round((z.pts||0)-(z.dts||0)),flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:B.jd?2:1,Xa:B.jd?0:1}})}}var D=dC(u);if(!D||null==p)throw new Q(2,3,3018);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",
1314
+ encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ta:[],ga:new Uint8Array([]),oa:D.oa,xa:D.xa,ya:D.ya,data:{jb:this.g,baseMediaDecodeTime:p,Ra:q},stream:b};break;case "hvc":var F=[],J=null,I=[],E=k.xc();if(!E.length)throw new Q(2,3,3023);for(var H=0;H<E.length;H++){var K=E[H],M=K.nalus;I.push.apply(I,y(M));for(var O=!1,N=[],U=!1,R=t(M),V=R.next();!V.done;V=R.next()){var xa=V.value;switch(xa.type){case 1:case 0:var Ca=U=!0;break;case 19:case 20:case 21:O=Ca=U=!0;break;case 32:Ca=
1315
+ !0;break;case 33:Ca=!0;break;case 34:Ca=!0;break;case 35:U=Ca=!0;break;case 39:case 40:Ca=!0;break;default:Ca=!1}if(U&&Ca){var eb=xa.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=eb>>24&255;Fa[1]=eb>>16&255;Fa[2]=eb>>8&255;Fa[3]=eb&255;N.push(Fa);N.push(xa.fullData)}}var Va=N.length?{data:zd.apply(rd,y(N)),jd:O}:null;if(Va){null==J&&null!=K.dts&&(J=K.dts);var ua=void 0;ua=H+1<E.length?(E[H+1].dts||0)-(K.dts||0):1<E.length?(K.dts||0)-(E[H-1].dts||0):9E4*(c.endTime-c.startTime);F.push({data:Va.data,
1316
+ size:Va.data.byteLength,duration:ua,Ua:Math.round((K.pts||0)-(K.dts||0)),flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:Va.jd?2:1,Xa:Va.jd?0:1}})}}var kb=gC(I);if(!kb||null==J)throw new Q(2,3,3018);b.height=kb.height;b.width=kb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ta:[],ga:new Uint8Array([]),oa:kb.oa,xa:kb.xa,ya:kb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Ra:F},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var yb=
1317
+ [],hb,Za=null,$e=t(k.Fb()),xd=$e.next();!xd.done;xd=$e.next()){var Zd=xd.value,jd=Zd.data;if(jd){var Bc=0;hb=VB(jd,Bc);if(!hb)throw new Q(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Zd.pts&&(Za=Zd.pts);for(;Bc<jd.length;){var $d=UB(jd,Bc);if($d){var af=$d.Qd+$d.U;Bc+af<=jd.length&&yb.push({data:jd.subarray(Bc+$d.Qd,Bc+af),size:$d.U,duration:1024,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});Bc+=af}else Bc++}}}if(!hb||null==Za){if(!k.xc().length)throw new Q(2,
1318
+ 3,3018);Za=9E4*c.startTime;var ae=Gd("audio",b.codecs.split(","));if(!ae||!b.channelsCount||!b.audioSamplingRate)throw new Q(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:ae};var yd=XB(ae,b.channelsCount);if(!yd)throw new Q(2,3,3018);for(var ri=Za+9E4*(c.endTime-c.startTime),sg=Za;sg<ri;)yb.push({data:yd,size:yd.byteLength,duration:1024,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),sg+=1024/hb.sampleRate*9E4}var si=hb.sampleRate,ti=Za/9E4*si;n={id:b.id,type:"audio",codecs:hb.Ea,
1319
+ encrypted:b.encrypted&&0<b.drmInfos.length,timescale:si,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ti,Ra:yb},stream:b};break;case "ac3":for(var bf=[],be=0,cf=new Uint8Array([]),Sb=null,Xt=t(k.Fb()),um=Xt.next();!um.done;um=Xt.next()){var vm=um.value,wm=vm.data;null==Sb&&null!==vm.pts&&(Sb=vm.pts);for(var mf=0;mf<wm.length;){var Dd=ZB(wm,mf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,be=Dd.sampleRate,cf=Dd.ga,
1320
+ bf.push({data:wm.subarray(mf,mf+Dd.U),size:Dd.U,duration:1536,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),mf+=Dd.U):mf++}}if(0==be||0==cf.byteLength||null==Sb)throw new Q(2,3,3018);var PC=Sb/9E4*be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:be,duration:d,Ta:[],ga:cf,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:PC,Ra:bf},stream:b};break;case "ec3":for(var Yt=[],bj=0,xm=new Uint8Array([]),cj=null,Zt=t(k.Fb()),ym=Zt.next();!ym.done;ym=
1321
+ Zt.next()){var zm=ym.value,Am=zm.data;null==cj&&null!==zm.pts&&(cj=zm.pts);for(var nf=0;nf<Am.length;){var Ed=bC(Am,nf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,bj=Ed.sampleRate,xm=Ed.ga,Yt.push({data:Am.subarray(nf,nf+Ed.U),size:Ed.U,duration:1536,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),nf+=Ed.U):nf++}}if(0==bj||0==xm.byteLength||null==cj)throw new Q(2,3,3018);var QC=cj/9E4*bj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bj,
1322
+ duration:d,Ta:[],ga:xm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:QC,Ra:Yt},stream:b};break;case "mp3":for(var $t=[],dj,ej=null,au=t(k.Fb()),Bm=au.next();!Bm.done;Bm=au.next()){var Cm=Bm.value,Gg=Cm.data;if(Gg){null==ej&&null!==Cm.pts&&(ej=Cm.pts);for(var ge=0;ge<Gg.length;){var of=lC(Gg,ge);of?(dj||(dj=of),ge+of.U<=Gg.length&&$t.push({data:Gg.subarray(ge,ge+of.U),size:of.U,duration:1152,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),ge+=of.U):ge++}}}if(!dj||null==ej)throw new Q(2,
1323
+ 3,3018);var bu=dj.sampleRate,RC=ej/9E4*bu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bu,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:RC,Ra:$t},stream:b};break;case "opus":var cu=[],fj=null,Kc=k.F;if(!Kc)throw new Q(2,3,3018);var ub=[];switch(Kc.$g){case 1:case 2:ub=[0];break;case 0:ub=[255,1,1,0,1];break;case 128:ub=[255,2,0,0,1];break;case 3:ub=[1,2,1,0,2,1];break;case 4:ub=[1,2,2,0,1,2,3];
1324
+ break;case 5:ub=[1,3,2,0,4,1,2,3];break;case 6:ub=[1,4,2,0,4,1,2,3,5];break;case 7:ub=[1,4,2,0,4,1,2,3,5,6];break;case 8:ub=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:ub=[1,1,2,0,1];break;case 131:ub=[1,1,3,0,1,2];break;case 132:ub=[1,1,4,0,1,2,3];break;case 133:ub=[1,1,5,0,1,2,3,4];break;case 134:ub=[1,1,6,0,1,2,3,4,5];break;case 135:ub=[1,1,7,0,1,2,3,4,5,6];break;case 136:ub=[1,1,8,0,1,2,3,4,5,6,7]}var du=new Uint8Array([0,Kc.channelCount,0,0,Kc.sampleRate>>>24&255,Kc.sampleRate>>>17&255,Kc.sampleRate>>>
1325
+ 8&255,Kc.sampleRate>>>0&255,0,0].concat(y(ub)));for(var eu=Kc.sampleRate,fu=t(k.Fb()),Dm=fu.next();!Dm.done;Dm=fu.next()){var Em=Dm.value,pf=Em.data;null==fj&&null!==Em.pts&&(fj=Em.pts);for(var Hg=0;Hg<pf.length;){for(var SC=0!==(pf[Hg+1]&16),TC=0!==(pf[Hg+1]&8),kd=Hg+2,gj=0;255===pf[kd];)gj+=255,kd+=1;gj+=pf[kd];kd+=1;kd+=SC?2:0;kd+=TC?2:0;var gu=pf.slice(kd,kd+gj);cu.push({data:gu,size:gu.byteLength,duration:960,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});Hg=kd+gj}}if(0==du.byteLength||null==fj)throw new Q(2,
1326
+ 3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var UC=fj/9E4*eu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:eu,duration:d,Ta:[],ga:du,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:UC,Ra:cu},stream:b}}n&&(l.push(n),n=null)}}catch(Fm){return Fm&&3023==Fm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Fm)}if(!l.length)return Promise.reject(new Q(2,3,3018));var hu=new sw(l);if(this.i.has(b.id))var Gm=
1327
+ this.i.get(b.id);else Gm=yw(hu),this.i.set(b.id,Gm);var VC=Pw(hu);this.g++;var WC=zd(Gm,VC);return Promise.resolve(WC)};P("shaka.transmuxer.TsTransmuxer",yC);yC.prototype.transmux=yC.prototype.transmux;yC.prototype.getOriginalMimeType=yC.prototype.getOriginalMimeType;yC.prototype.convertCodecs=yC.prototype.convertCodecs;yC.prototype.isSupported=yC.prototype.isSupported;yC.prototype.destroy=yC.prototype.destroy;var zC=["aac","ac-3","ec-3","mp3","opus"],AC=["avc","hevc"];
1328
+ jc("video/mp2t",function(){return new yC("video/mp2t")},nc);/*
1329
1329
  @license
1330
1330
  EME Encryption Scheme Polyfill
1331
1331
  Copyright 2019 Google LLC
1332
1332
  SPDX-License-Identifier: Apache-2.0
1333
1333
  */
1334
- function AC(){}var BC;function CC(){BC?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(BC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=DC):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1335
- function DC(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,BC.call(c,a,b),2);d=e.h;if(EC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=BC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=FC;return e.return(FC.call(c,
1334
+ function BC(){}var CC;function DC(){CC?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(CC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=EC):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1335
+ function EC(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,CC.call(c,a,b),2);d=e.h;if(FC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=CC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=GC;return e.return(GC.call(c,
1336
1336
  a,b))})}
1337
- function FC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=GC(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=HC(h.videoCapabilities,d),l=HC(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."),
1338
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,BC.call(c,a,e),2)}q=p.h;return p.return(new IC(q,d))})}function HC(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}P("EmeEncryptionSchemePolyfill",AC);AC.install=CC;function JC(){}var KC;
1339
- function LC(){KC?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(KC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=MC):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1340
- function MC(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,KC.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&EC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=KC,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1341
- navigator.mediaCapabilities.decodingInfo=NC;if(d){f.u(3);break}e=c;return C(f,WC(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(NC.call(b,a))}})}
1342
- function NC(a){var b=this,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=GC(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,KC.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1343
- new IC(k.keySystemAccess,c);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return C(m,WC(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1344
- function WC(a){var b,c;return L(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});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 C(d,
1345
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",JC);JC.install=LC;function IC(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1346
- IC.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.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};IC.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1347
- function GC(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function EC(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
1348
- function XC(){}function mz(){CC();LC()}P("EncryptionSchemePolyfills",XC);XC.install=mz;"undefined"!==typeof module&&module.exports&&(module.exports=XC);}).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})();
1337
+ function GC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=HC(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=IC(h.videoCapabilities,d),l=IC(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."),
1338
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,CC.call(c,a,e),2)}q=p.h;return p.return(new JC(q,d))})}function IC(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}P("EmeEncryptionSchemePolyfill",BC);BC.install=DC;function KC(){}var LC;
1339
+ function MC(){LC?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(LC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=NC):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1340
+ function NC(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,LC.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&FC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=LC,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1341
+ navigator.mediaCapabilities.decodingInfo=OC;if(d){f.u(3);break}e=c;return C(f,XC(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(OC.call(b,a))}})}
1342
+ function OC(a){var b=this,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=HC(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,LC.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1343
+ new JC(k.keySystemAccess,c);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return C(m,XC(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1344
+ function XC(a){var b,c;return L(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});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 C(d,
1345
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",KC);KC.install=MC;function JC(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1346
+ JC.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.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};JC.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1347
+ function HC(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function FC(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
1348
+ function YC(){}function nz(){DC();MC()}P("EncryptionSchemePolyfills",YC);YC.install=nz;"undefined"!==typeof module&&module.exports&&(module.exports=YC);}).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})();
1349
1349
 
1350
1350
  //# sourceMappingURL=shaka-player.compiled.map