1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8678],{89785:(e,t,n)=>{!function(){var e="undefined"!=typeof window?window:n.g,i={};for(var r in(function(e,t,n){function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var r,a,o,s,u,l,c,d,h,f="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},p=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var i=0;i<n.length;++i){var r=n[i];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function g(e,t){if(t)e:{var n=p;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&f(n,e,{configurable:!0,writable:!0,value:t})}}function m(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function v(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:i(e)}}function y(e){if(!(e instanceof Array)){e=v(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}g("Symbol",function(e){function t(e,t){this.g=e,f(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}}),g("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=p[t[n]];"function"==typeof r&&"function"!=typeof r.prototype[e]&&f(r.prototype,e,{configurable:!0,writable:!0,value:function(){return m(i(this))}})}return e});var b,w,T="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)w=Object.setPrototypeOf;else{e:{var x={};try{x.__proto__={a:!0},r=x.a;break e}catch(e){}r=!1}w=r?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var S=w;function E(e,t){if(e.prototype=T(t.prototype),e.prototype.constructor=e,S)S(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.zh=t.prototype}function A(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.u=this.i=null}function k(e){if(e.o)throw TypeError("Generator is already running");e.o=!0}function I(e,t){e.i={Ee:t,Le:!0},e.g=e.m||e.j}function C(e,t,n){return e.g=n,{value:t}}function M(e){e.g=0}function D(e,t,n){e.m=t,void 0!=n&&(e.j=n)}function R(e){e.m=0,e.j=2}function N(e,t){e.g=t,e.m=0}function P(e){e.m=0;var t=e.i.Ee;return e.i=null,t}function L(e){e.u=[e.i],e.m=0,e.j=0}function _(e,t){var n=e.u.splice(0)[0];(n=e.i=e.i||n)?n.Le?e.g=e.m||e.j:void 0!=n.B&&e.j<n.B?(e.g=n.B,e.i=null):e.g=e.j:e.g=t}function j(e){this.g=new A,this.h=e}function O(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var a=r.value}catch(t){return e.g.l=null,I(e.g,t),U(e)}
1return e.g.l=null,i.call(e.g,a),U(e)}function U(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,I(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Le)throw t.Ee;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function B(e){this.next=function(t){return k(e.g),e.g.l?t=O(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=U(e)),t},this.throw=function(t){return k(e.g),e.g.l?t=O(e,e.g.l.throw,t,e.g.s):(I(e.g,t),t=U(e)),t},this.return=function(t){var n;return k(e.g),(n=e.g.l)?O(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),U(e))},this[Symbol.iterator]=function(){return this}}function F(e){var t=new B(new j(e));function n(e){return t.next(e)}function i(e){return t.throw(e)}return new Promise(function(e,r){!function t(a){a.done?e(a.value):Promise.resolve(a.value).then(n,i).then(t,r)}(t.next())})}function V(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function H(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function K(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var a=e[r];if(t.call(n,a,r,e))return{Je:r,v:a}}return{Je:-1,v:void 0}}function q(e,t,n){if(null==e)throw TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function G(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}A.prototype.s=function(e){this.h=e},A.prototype.return=function(e){this.i={return:e},this.g=this.j},A.prototype.B=function(e){this.g=e},g("Promise",function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i(function(){t.l()})}this.g.push(e)};var r=p.setTimeout;n.prototype.i=function(e){r(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i(function(){throw e})},t.prototype.j=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{switch(typeof e){case"object":var n=null!=e;break;case"function":n=!0;break;default:n=!1}n?this.D(e):this.m(e)}},t.prototype.D=function(e){var t=void 0;try{t=e.then}catch(e){this.l(e);return}"function"==typeof t?this.J(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.G(),this.u()},t.prototype.G=function(){var e=this;r(function(){if(e.A()){var t=p.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.A=function(){if(this.o)return!1;var e=p.CustomEvent,t=p.Event,n=p.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=p.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.H=function(e){var t=this.j();e.Mc(t.resolve,t.reject)},t.prototype.J=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){a(e)}}:t}var r,a,o=new t(function(e,t){r=e,a=t});return this.Mc(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Mc=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.o=!0},t.resolve=i,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=v(e),a=r.next();!a.done;a=r.next())i(a.value).Mc(t,n)})},t.all=function(e){var n=v(e),r=n.next();return r.done?i([]):new t(function(e,t){var a=[],o=0;do a.push(void 0),o++,i(r.value).Mc(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),g("WeakMap",function(e){function t(e){if(this.g=(s+=Math.random()+1).toString(),e){e=v(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){H(e,o)||f(e,o,{value:new n})}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([[t,2],[n,3]]);if(2!=i.get(t)||3!=i.get(n))return!1;return i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n)}catch(e){return!1}}())return e;var o="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var s=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!H(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.g]=t,this},t.prototype.get=function(e){return i(e)&&H(e,o)?e[o][this.g]:void 0},t.prototype.has=function(e){return i(e)&&H(e,o)&&H(e[o],this.g)},t.prototype.delete=function(e){return!!(i(e)&&H(e,o)&&H(e[o],this.g))&&delete e[o][this.g]},t}),g("Map",function(e){function t(){var e={};return e.Ra=e.next=e.head=e}function n(e,t){var n=e.g;return m(function(){if(n){for(;n.head!=e.g;)n=n.Ra;for(;n.next!=n.head;)return{done:!1,value:t(n=n.next)};n=null}return{done:!0,value:void 0}})}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e.h[n];if(i&&H(e.h,n))for(e=0;e<i.length;e++){var r=i[e];if(t!=t&&r.key!=r.key||t===r.key)return{id:n,list:i,index:e,ha:r}}return{id:n,list:i,index:-1,ha:void 0}}function r(e){if(this.h={},this.g=t(),this.size=0,e){e=v(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(v([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||"s"!=r.value[1])return!1;return!(r=i.next()).done&&4==r.value[0].x&&"t"==r.value[1]&&!!i.next().done}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.ha?n.ha.value=t:(n.ha={next:this.g,Ra:this.g.Ra,head:this.g,key:e,value:t},n.list.push(n.ha),this.g.Ra.next=n.ha,this.g.Ra=n.ha,this.size++),this},r.prototype.delete=function(e){return!!(e=i(this,e)).ha&&!!e.list&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.ha.Ra.next=e.ha.next,e.ha.next.Ra=e.ha.Ra,e.ha.head=null,this.size--,!0)},r.prototype.clear=function(){this.h={},this.g=this.g.Ra=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).ha},r.prototype.get=function(e){return(e=i(this,e).ha)&&e.value},r.prototype.entries=function(){return n(this,function(e){return[e.key,e.value]})},r.prototype.keys=function(){return n(this,function(e){return e.key})},r.prototype.values=function(){return n(this,function(e){return e.value})},r.prototype.forEach=function(e,t){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var o=0;return r}),g("Set",function(e){function t(e){if(this.g=new Map,e){e=v(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return!function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(v([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||r.value[1]!=t)return!1;return!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done}catch(e){return!1}}()?(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach(function(i){return e.call(t,i,i,n)})},t):e}),g("Array.prototype.findIndex",function(e){return e||function(e,t){return K(this,e,t).Je}}),g("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),g("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for(0>(t=t||0)&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}}),g("String.prototype.includes",function(e){return e||function(e,t){return -1!==q(this,e,"includes").indexOf(e,t||0)}}),g("Array.prototype.find",function(e){return e||function(e,t){return K(this,e,t).v}}),g("String.prototype.startsWith",function(e){return e||function(e,t){var n=q(this,e,"startsWith"),i=n.length,r=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<r&&t<i;)if(n[t++]!=e[a++])return!1;return a>=r}}),g("Array.prototype.keys",function(e){return e||function(){return G(this,function(e){return e})}});var X="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)H(i,r)&&(e[r]=i[r])}return e};g("Object.assign",function(e){return e||X}),g("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}}),g("Array.prototype.values",function(e){return e||function(){return G(this,function(e,t){return t})}}),g("Promise.prototype.finally",function(e){return e||function(e){return this.then(function(t){return Promise.resolve(e()).then(function(){return t})},function(t){return Promise.resolve(e()).then(function(){throw t})})}}),g("Array.prototype.entries",function(e){return e||function(){return G(this,function(e,t){return[e,t]})}}),g("String.prototype.repeat",function(e){return e||function(e){var t=q(this,null,"repeat");if(0>e||0x4fffffff<e)throw RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),g("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),g("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)H(e,t)&&n.push(e[t]);return n}}),g("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),g("Math.trunc",function(e){return e||function(e){if(isNaN(e=Number(e))||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}}),g("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)H(e,t)&&n.push([t,e[t]]);return n}});var z=this||self;function W(e,t){e=e.split(".");var n,i=z;for((e[0]in i)||void 0===i.execScript||i.execScript("var "+e[0]);e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function Y(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function $(e){return e.h/(1-Math.pow(e.g,e.i))}function J(){this.h=new Y(2),this.j=new Y(5),this.g=0,this.i=128e3,this.l=16e3}function Q(){}function Z(){}function ee(){}function et(e){var t=V.apply(1,arguments);ei.has(e)||(ei.add(e),ee.apply(Q,y(t)))}function en(){}Y.prototype.sample=function(e,t){var n=Math.pow(this.g,e);isNaN(t=t*(1-n)+n*this.h)||(this.h=t,this.i+=e)},J.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},J.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},J.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min($(this.h),$(this.j))};var ei=new Set;function er(e){if(ea.has(e))return ea.get(e);
1var t=MediaSource.isTypeSupported(e);return ea.set(e,t),t}e.console&&(ee=function(){return console.warn.apply(console,y(V.apply(0,arguments)))},Z=function(){console.error.apply(console,y(V.apply(0,arguments)))});var ea=new Map;function eo(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function es(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function eu(e,t,n){if(n||(n=eo),e.length!=t.length)return!1;t=t.slice();var i={};e=v(e);for(var r=e.next();!r.done;i={pd:i.pd},r=e.next()){if(i.pd=r.value,-1==(r=t.findIndex(function(e){return function(t){return n(e.pd,t)}}(i))))return!1;t[r]=t[t.length-1],t.pop()}return 0==t.length}function el(e,t,n){if(n||(n=eo),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function ec(e,t,n){this.startTime=e,this.direction=em,this.endTime=t,this.payload=n,this.region=new ek,this.position=null,this.positionAlign=ed,this.size=0,this.textAlign=eh,this.writingMode=ev,this.lineInterpretation=ey,this.line=null,this.lineHeight="",this.lineAlign=eb,this.displayAlign=ep,this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=eS,this.fontStyle=eE,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.cellResolution={columns:32,rows:15}}ec.prototype.clone=function(){var e,t=new ec(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},W("shaka.text.Cue",ec);var ed="auto";ec.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ed};var eh="center",ef={LEFT:"left",RIGHT:"right",CENTER:eh,START:"start",END:"end"};ec.textAlign=ef;var ep="after",eg={BEFORE:"before",CENTER:"center",AFTER:ep};ec.displayAlign=eg;var em="ltr";ec.direction={HORIZONTAL_LEFT_TO_RIGHT:em,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ev="horizontal-tb";ec.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ev,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ey=0;ec.lineInterpretation={LINE_NUMBER:0,PERCENTAGE:1};var eb="start",ew={CENTER:"center",START:eb,END:"end"};ec.lineAlign=ew;var eT={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ec.defaultTextColor=eT;var ex={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ec.defaultTextBackgroundColor=ex;var eS=400;ec.fontWeight={NORMAL:400,BOLD:700};var eE="normal",eA={NORMAL:eE,ITALIC:"italic",OBLIQUE:"oblique"};function ek(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=eI,this.scroll=eC}ec.fontStyle=eA,ec.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},W("shaka.text.CueRegion",ek);var eI=1;ek.units={PX:0,PERCENTAGE:1,LINES:2};var eC="";function eM(){}function eD(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(eR(e)==eR(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=eP(e);t=eP(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function eR(e){return e instanceof ArrayBuffer?e:e.buffer}function eN(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function eP(e,t,n){return e_(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}
1function eL(e,t,n){return e_(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function e_(e,t,n,i){var r=(e.byteOffset||0)+e.byteLength;return t=Math.max(0,Math.min((e.byteOffset||0)+t,r)),new i(eR(e),t,Math.min(t+Math.max(n,0),r)-t)}function ej(e,t,n){var i=V.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}ek.scrollMode={NONE:eC,UP:"up"},W("shaka.util.BufferUtils",eM),eM.toDataView=eL,eM.toUint8=eP,eM.toArrayBuffer=eN,eM.equal=eD,ej.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},W("shaka.util.Error",ej),ej.Severity={RECOVERABLE:1,CRITICAL:2},ej.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},ej.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OP
1ERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};var eO=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function eU(e){var t;e instanceof eU?(eB(this,e.Ea),this.qb=e.qb,this.Ha=e.Ha,eF(this,e.Lb),this.ra=e.ra,eV(this,e.g.clone()),this.fb=e.fb):e&&(t=String(e).match(eO))?(eB(this,t[1]||"",!0),this.qb=eH(t[2]||""),this.Ha=eH(t[3]||"",!0),eF(this,t[4]),this.ra=eH(t[5]||"",!0),eV(this,t[6]||"",!0),this.fb=eH(t[7]||"")):this.g=new e$(null)}function eB(e,t,n){e.Ea=n?eH(t,!0):t,e.Ea&&(e.Ea=e.Ea.replace(/:$/,""))}function eF(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.Lb=t}else e.Lb=null}function eV(e,t,n){t instanceof e$?e.g=t:(n||(t=eK(t,eW)),e.g=new e$(t))}function eH(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function eK(e,t,n){return null!=e?(e=encodeURI(e).replace(t,eq),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function eq(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(b=eU.prototype).Ea="",b.qb="",b.Ha="",b.Lb=null,b.ra="",b.fb="",b.toString=function(){var e=[],t=this.Ea;if(t&&e.push(eK(t,eG,!0),":"),t=this.Ha){e.push("//");var n=this.qb;n&&e.push(eK(n,eG,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Lb)&&e.push(":",String(t))}return(t=this.ra)&&(this.Ha&&"/"!=t.charAt(0)&&e.push("/"),e.push(eK(t,"/"==t.charAt(0)?ez:eX,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.fb)&&e.push("#",eK(t,eY)),e.join("")},b.resolve=function(e){var t=this.clone();"data"===t.Ea&&(t=new eU);var n=!!e.Ea;n?eB(t,e.Ea):n=!!e.qb,n?t.qb=e.qb:n=!!e.Ha,n?t.Ha=e.Ha:n=null!=e.Lb;var i=e.ra;if(n)eF(t,e.Lb);else if(n=!!e.ra){if("/"!=i.charAt(0))if(this.Ha&&!this.ra)i="/"+i;else{var r=t.ra.lastIndexOf("/");-1!=r&&(i=t.ra.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.ra=i:n=""!==e.g.toString(),n?eV(t,e.g.clone()):n=!!e.fb,n&&(t.fb=e.fb),t},b.clone=function(){return new eU(this)};var eG=/[#\/\?@]/g,eX=/[#\?:]/g,ez=/[#\?]/g,eW=/[#\?@]/g,eY=/#/g;function e$(e){this.g=e||null}function eJ(e){if(!e.na&&(e.na={},e.Pc=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),r=r||"",e.add(a,decodeURIComponent(r.replace(/\+/g," ")))}}function eQ(e,t){return e.concat(t)}function eZ(){}function e0(e){return null!=e}function e1(e,t){if(0==t.length)return e;if(1==e.length&&1==t.length)return e=new eU(e[0]),t=new eU(t[0]),[e.resolve(t).toString()];var n=t.map(function(e){return new eU(e)});return e.map(function(e){var t=new eU(e);return n.map(function(e){return t.resolve(e).toString()})}).reduce(eQ,[])}function e2(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function e4(e,t){if(1==t.length)return t[0];if(null!=(e=e3(e,t)))return e;throw new ej(2,4,4025,t)}function e3(e,t){for(var n=v(e8[e]),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=v(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==e5?"":null}(b=e$.prototype).na=null,b.Pc=null,b.add=function(e,t){eJ(this),this.g=null;var n=this.na.hasOwnProperty(e)?this.na[e]:null;return n||(this.na[e]=n=[]),n.push(t),this.Pc++,this},b.set=function(e,t){return eJ(this),this.g=null,this.na.hasOwnProperty(e)?this.na[e]=[t]:this.add(e,t),this},b.toString=function(){if(this.g)return this.g;if(!this.na)return"";var e,t=[];for(e in this.na)for(var n=encodeURIComponent(e),i=this.na[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.g=t.join("&")},b.clone=function(){var e=new e$;if(e.g=this.g,this.na){var t,n={};for(t in this.na)n[t]=this.na[t].concat();e.na=n,e.Pc=this.Pc}return e};var e5="text",e6={va:"video",Ic:"audio",Y:e5,Xb:"image",Ig:"application"},e8={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function e9(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function e7(e){this.h=e,this.g=void 0}function te(e){this.h=e,this.g=null}function tt(e){this.h=e,this.g=null}
1function tn(){return!!e.MediaSource&&!!MediaSource.isTypeSupported}function ti(e){return""!=th().canPlayType(e)}function tr(){return!!navigator.userAgent.match(/Edge?\//)}function ta(){return td("Xbox One")}function to(){return td("Tizen")}function ts(){return td("Web0S")&&td("Chrome/38.0.2125.122 Safari/537.36")}function tu(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!to()&&!td("PC=EOS")&&!td("VirginMedia")&&!td("SOPOpenBrowser")&&!tl()&&!td("AFT")}function tl(){return td("PlayStation 4")}function tc(){if(!tu())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function td(e){return(navigator.userAgent||"").includes(e)}function th(){return tp||(tf||(tf=new tt(function(){tp=null})),(tp=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(tp=document.createElement("video")),tf.N(1)),tp}e9.prototype.resolve=function(){},e9.prototype.reject=function(){},e7.prototype.value=function(){return void 0==this.g&&(this.g=this.h()),this.g},te.prototype.N=function(t){var n=this;this.stop();var i=!0,r=null;return this.g=function(){e.clearTimeout(r),i=!1},r=e.setTimeout(function(){i&&n.h()},1e3*t),this},te.prototype.stop=function(){this.g&&(this.g(),this.g=null)},tt.prototype.Nb=function(){return this.stop(),this.h(),this},tt.prototype.N=function(e){var t=this;return this.stop(),this.g=new te(function(){t.h()}).N(e),this},tt.prototype.Ca=function(e){var t=this;return this.stop(),this.g=new te(function(){t.g.N(e),t.h()}).N(e),this},tt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},W("shaka.util.Timer",tt),tt.prototype.stop=tt.prototype.stop,tt.prototype.tickEvery=tt.prototype.Ca,tt.prototype.tickAfter=tt.prototype.N,tt.prototype.tickNow=tt.prototype.Nb;var tf=null,tp=null;function tg(){}function tm(t){if(!t)return"";if(239==(t=eP(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!tl())return(t=(new TextDecoder).decode(t)).includes("�")&&Z('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),t;for(var n="",i=0;i<t.length;++i){var r=65533;if(0==(128&t[i])?r=t[i]:t.length>=i+2&&192==(224&t[i])&&128==(192&t[i+1])?(r=(31&t[i])<<6|63&t[i+1],i+=1):t.length>=i+3&&224==(240&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])?(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2],i+=2):t.length>=i+4&&240==(241&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])&&128==(192&t[i+3])&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3],i+=3),65535>=r)n+=String.fromCharCode(r);else{var a=1023&(r-=65536);n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+a)}}return n}function tv(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new ej(2,2,2004);var i=new Uint16Array(n=Math.floor(e.byteLength/2));e=eL(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return tT.value()(i)}function ty(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=eP(e);if(239==n[0]&&187==n[1]&&191==n[2])return tm(n);if(254==n[0]&&255==n[1])return tv(n.subarray(2),!1);if(255==n[0]&&254==n[1])return tv(n.subarray(2),!0);if(0==n[0]&&0==n[2])return tv(e,!1);if(0==n[1]&&0==n[3])return tv(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return tm(e);throw new ej(2,2,2003)}function tb(t){if(e.TextEncoder&&!tl()){var n=new TextEncoder;return eN(n.encode(t))}n=new Uint8Array((t=unescape(t=encodeURIComponent(t))).length);for(var i=0;i<t.length;i++)n[i]=t[i].charCodeAt(0);return eN(n)}function tw(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}W("shaka.util.StringUtils",tg),tg.resetFromCharCode=function(){tT.g=void 0},tg.toUTF16=tw,tg.toUTF8=tb,tg.fromBytesAutoDetect=ty,tg.fromUTF16=tv,tg.fromUTF8=tm;var tT=new e7(function(){for(var e={Va:65536};0<e.Va;e={Va:e.Va},e.Va/=2)if(function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}(e.Va))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.Va)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.Va));return n}}(e);return null});function tx(){}function tS(e){return e=eP(e),btoa(e=tT.value()(e))}function tE(e,t){return t=void 0==t||t,e=tS(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function tA(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}function tk(t){for(var n=t.length/2,i=new Uint8Array(n),r=0;r<n;r++)i[r]=e.parseInt(t.substr(2*r,2),16);return i}function tI(e){var t=eP(e);e="",t=v(t);for(var n=t.next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function tC(){for(var e=V.apply(0,arguments),t=0,n=v(e),i=n.next();!i.done;i=n.next())t+=i.value.byteLength;for(t=new Uint8Array(t),n=0,i=(e=v(e)).next();!i.done;i=e.next())i=i.value,t.set(eP(i),n),n+=i.byteLength;return t}function tM(){}W("shaka.util.Uint8ArrayUtils",tx),tx.concat=tC,tx.toHex=tI,tx.fromHex=tk,tx.fromBase64=tA,tx.toBase64=tE,tx.toStandardBase64=tS,W("shaka.dependencies",tM),tM.has=function(e){return tR.has(e)},tM.add=function(e,t){if(!tD[e])throw Error(e+" is not supported");tR.set(e,function(){return t})};var tD={muxjs:"muxjs"};tM.Allowed=tD;var tR=new Map([["muxjs",function(){return e.muxjs}]]);function tN(e){var t=this;this.o=e,this.m=tR.get("muxjs")(),this.h=this.g=null,this.l=[],this.i=[],this.j=!1,this.m&&(this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(e){t.i=e.captions,t.l.push(tC(e.initSegment,e.data))}),this.g.on("done",function(){var e={data:tC.apply(tx,y(t.l)),captions:t.i};t.h.resolve(e),t.j=!1}))}function tP(e,t){var n=tL(e),i="audio/aac"==e.toLowerCase().split(";")[0];return!!tR.get("muxjs")()&&(!!n||!!i)&&(i?er('audio/mp4; codecs="mp4a.40.2"'):t?er(tj(t,e)):(t=tj("audio",e),e=tj("video",e),er(t)||er(e)))}function tL(e){return"mp2t"==e.toLowerCase().split(";")[0].split("/")[1]}function t_(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':tL(t)?tj(e,t):t}function tj(e,t){if(t=t.replace(/mp2t/i,"mp4"),"audio"==e&&(t=t.replace("video","audio")),e=/avc1\.(66|77|100)\.(\d+)/.exec(t)){var n="avc1.",i=e[1],r=Number(e[2]);n=("66"==i?n+"4200":"77"==i?n+"4d00":n+"6400")+(r>>4).toString(16)+(15&r).toString(16),t=t.replace(e[0],n)}return t}function tO(){}function tU(e,t){return t&&(e+='; codecs="'+t+'"'),e}function tB(e,t,n){return tP(t=tU(e,t),n)?t_(n,t):"video/mp2t"!=e&&"audio"==n?t.replace("video","audio"):t}function tF(e){var t=tH(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:return"ac-3";case"mp4a"===e&&"a6"===t:return"ec-3";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";
1case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"dvh1"===e:case"dvhe"===e:return"dovi"}return e}function tV(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function tH(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}function tK(e){this.i=null,this.j=e,this.u=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.A="",this.o=new Map}function tq(e){return!!tz[e]||"application/cea-608"==e||"application/cea-708"==e}function tG(e,t,n){if(e.A=t,t=e.o.get(t))for(var i=v(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(e){return e.endTime<=n}))&&e.j.append(r)}function tX(e,t,n,i,r){var a=n+" "+i,o=new Map;t=v(t);for(var s=t.next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),function e(t,n,i){n.startTime+=i,n.endTime+=i,n=v(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,u,r),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.A&&e.j.append([u]))}for(a=(r=v(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=v(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.o.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}tN.prototype.destroy=function(){return this.g&&this.g.dispose(),this.g=null,Promise.resolve()},W("shaka.util.MimeUtils",tO),tO.getFullType=tU,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),tK.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},tK.prototype.remove=function(e,t){var n=this;return F(function(i){if(1==i.g)return C(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),M(i)})},W("shaka.text.TextEngine",tK),tK.prototype.destroy=tK.prototype.destroy,tK.findParser=function(e){return tz[e]},tK.unregisterParser=function(e){delete tz[e]},tK.registerParser=function(e,t){tz[e]=t};var tz={};function tW(){}function tY(e,t){return e=tQ(e),t=tQ(t),e.split("-")[0]==t.split("-")[0]}function t$(e,t){return e=tQ(e),t=tQ(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function tJ(e,t){return e=tQ(e),t=tQ(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function tQ(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=t4.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function tZ(e,t){return e=tQ(e),(t=tQ(t))==e?4:t$(t,e)?3:tJ(t,e)?2:+!!t$(e,t)}function t0(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),t4.get(e)||e}function t1(e){return e.language?tQ(e.language):e.audio&&e.audio.language?tQ(e.audio.language):e.video&&e.video.language?tQ(e.video.language):"und"}function t2(e,t){e=tQ(e);var n=new Set,i=v(t);for(t=i.next();!t.done;t=i.next())n.add(tQ(t.value));for(t=(i=v(n)).next();!t.done;t=i.next())if((t=t.value)==e)return t;for(t=(i=v(n)).next();!t.done;t=i.next())if(t$(t=t.value,e))return t;for(t=(i=v(n)).next();!t.done;t=i.next())if(tJ(t=t.value,e))return t;for(t=(n=v(n)).next();!t.done;t=n.next())if(t$(e,t=t.value))return t;return null}W("shaka.util.LanguageUtils",tW),tW.findClosestLocale=t2,tW.getLocaleForVariant=t1,tW.getLocaleForText=function(e){return tQ(e.language||"und")},tW.getBase=t0,tW.relatedness=tZ,tW.areSiblings=function(e,t){var n=t0(e),i=t0(t);return e!=n&&t!=i&&n==i},tW.normalize=tQ,tW.isSiblingOf=tJ,tW.isParentOf=t$,tW.areLanguageCompatible=tY,tW.areLocaleCompatible=function(e,t){return(e=tQ(e))==(t=tQ(t))};var t4=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["
1ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function t3(){this.g={}}function t5(e,t,n,i,r){var a,o,s,u,l=e.variants;(t.length||n.length)&&(l=function(e,t,n){var i={};t=v(t);for(var r=t.next();!r.done;i={Bd:i.Bd},r=t.next())if(i.Bd=r.value,(r=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.Bd)}}(i))).length){e=r;break}for(i={},t=(n=v(n)).next();!t.done;i={md:i.md},t=n.next())if(i.md=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.md)}}(i))).length){e=t;break}return e}(l,t,n));var c=function(e,t){t=v(t);for(var n,i,r=t.next();!r.done;r=t.next())if((r=r.value)==nb||r==nw){if(1==(e=function(e,t){var n=0,i=new t3;return e.forEach(function(e,r){for(var a=0,o=0,s=v(r),u=s.next();!u.done;u=s.next())(u=u.value).decodingInfos.length&&(a+=+!!u.decodingInfos[0][t],o++);(a/=o)>n?(i.g={},i.push(e,r),n=a):a==n&&i.push(e,r)}),i}(e,r)).size())return e.keys()[0]}else if(r==nT)break;return n="",i=1/0,e.forEach(function(e,t){var r=0,a=0;t=v(t);for(var o=t.next();!o.done;o=t.next())r+=o.value.bandwidth||0,++a;(r/=a)<i&&(n=e,i=r)}),n}((a=t=function(e){var t=new t3;e=v(e);for(var n=e.next();!n.done;n=e.next()){var i=t6(n=n.value);t.push(i,n)}return t}(l=nf(l,i)),o=0,s=new Map,u=a.size(),a.forEach(function(e,t){t=v(t);for(var n=t.next();!n.done;n=t.next()){var i=(n=n.value).video;if(i&&i.width&&i.height){i=i.width*i.height*(i.frameRate||1),s.has(i)||s.set(i,new t3);var r=s.get(i);r.push(e,n),r.size()===u&&(o=Math.max(o,i))}}}),t=o?s.get(o):a),r);e.variants=e.variants.filter(function(e){return t6(e)==c})}function t6(e){var t="";e.video&&(t=tF(e.video.codecs));var n="";return e.audio&&(n=tF(e.audio.codecs)),t+"-"+n}function t8(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y=e.video;if(0!=e.disabledUntilTime){if(e.disabledUntilTime>Date.now()/1e3)return!1;e.disabledUntilTime=0}return(!y||!y.width||!y.height||(i=y.width,r=t.minWidth,a=Math.min(t.maxWidth,n.width),i>=r&&i<=a&&(o=y.height,s=t.minHeight,u=Math.min(t.maxHeight,n.height),o>=s&&o<=u)&&(l=y.width*y.height,c=t.minPixels,d=t.maxPixels,l>=c&&l<=d)))&&(!e||!e.video||!e.video.frameRate||(h=e.video.frameRate,f=t.minFrameRate,p=t.maxFrameRate,h>=f&&h<=p))&&(g=e.bandwidth,m=t.minBandwidth,v=t.maxBandwidth,g>=m&&g<=v)}function t9(e,t,n){var i=!1;e=v(e);for(var r=e.next();!r.done;r=e.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=t8(r,t,n),a!=r.allowedByApplication&&(i=!0)}return i}function t7(e,t){return F(function(n){if(1==n.g)return C(n,ne(e.variants,t,!1),2);e.variants=e.variants.filter(function(e){var t=e.video;
1if(t){var n=nn(t.codecs);if(t.codecs.includes(",")){var i=t.codecs.split(",");n=nn(n=e4("video",i)),i=nt(i=e4("audio",i));var r=tB(t.mimeType,i,"audio");if(!er(r))return!1;n=[n,i].join()}if(!er(i=tB(t.mimeType,n,"video")))return!1;t.codecs=n}if(n=e.audio){if(i=nt(n.codecs),!er(r=tB(n.mimeType,i,"audio")))return!1;n.codecs=i}return ta()&&t&&(t.width&&1920<t.width||t.height&&1080<t.height)&&(t.codecs.includes("avc1.")||t.codecs.includes("avc3."))?(nm(e),!1):((t=e.decodingInfos.some(function(e){return e.supported}))||nm(e),t)}),M(n)})}function ne(e,t,n){var i,r,a,o,s,u,l,c,d;return F(function(h){if(e.some(function(e){return e.decodingInfos.length}))return h.return();for(i=navigator.mediaCapabilities,r=[],a=function(e,t){var n;return F(function(r){return 1==r.g?(D(r,2),C(r,i.decodingInfo(t),4)):2!=r.g?(n=r.h,e.decodingInfos.push(n),N(r,0)):void(P(r),JSON.stringify(t),M(r))})},s=(o=v(e)).next();!s.done;s=o.next())for(c=(l=v(function(e,t,n){var i=e.audio,r=e.video;if(n={type:n?"file":"media-source"},r){var a=r.codecs;if(r.codecs.includes(",")){var o=r.codecs.split(",");a=nn(a=e4("video",o)),o=nt(o=e4("audio",o)),o=tB(r.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}if(a=nn(a),a=tB(r.mimeType,a,"video"),n.video={contentType:a,width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":n.video.transferFunction="srgb";break;case"PQ":n.video.transferFunction="pq";break;case"HLG":n.video.transferFunction="hlg"}}if(i&&(a=nt(i.codecs),a=tB(i.mimeType,a,"audio"),n.audio={contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio}),!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[n];e=[],a=new Map,o=v(o);for(var s=o.next();!s.done;s=o.next()){var u=s.value;a.get(u.keySystem)||a.set(u.keySystem,[]),a.get(u.keySystem).push(u)}o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],u=v(a.keys());for(var l=u.next();!l.done;l=u.next()){var c=l.value;l=Object.assign({},n);var d=a.get(c);
1for(c={keySystem:c,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(d=v(d)).next();!s.done;s=d.next()){if((s=s.value).initData&&s.initData.length){for(var h=new Set,f=v(s.initData),p=f.next();!p.done;p=f.next())h.add(p.value.initDataType);c.initDataType=s.initData[0].initDataType}s.distinctiveIdentifierRequired&&(c.distinctiveIdentifier="required"),s.persistentStateRequired&&(c.persistentState="required"),s.sessionType&&(c.sessionTypes=[s.sessionType]),i&&(""!=s.audioRobustness?c.audio?c.audio.robustness=c.audio.robustness||s.audioRobustness:c.audio={robustness:s.audioRobustness}:c.audio||(c.audio={})),r&&(""!=s.videoRobustness?c.video?c.video.robustness=c.video.robustness||s.videoRobustness:c.video={robustness:s.videoRobustness}:c.video||(c.video={}))}l.keySystemConfiguration=c,e.push(l)}return e}(u=s.value,t,n))).next();!c.done;c=l.next())d=c.value,r.push(a(u,d));return C(h,Promise.all(r),0)})}function nt(e){return"fLaC"===e?"flac":"Opus"===e?"opus":to()&&"ac-3"==e.toLowerCase()?"ec-3":e}function nn(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return t.shift()+"."+parseInt(t.shift(),10).toString(16)+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function ni(e,t){t.variants=t.variants.filter(function(t){var n=t.audio;return t=t.video,(!n||!e||!e.audio||!!nr(n,e.audio))&&(!t||!e||!e.video||!!nr(t,e.video))})}function nr(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]}function na(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=v(t.roles),h=d.next();!h.done;h=d.next())c.add(h.value);if(n)for(h=(d=v(n.roles)).next();!h.done;h=d.next())c.add(h.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(c),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null),t&&(e.audioId=t.
1id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles),e}function no(e){return{id:e.id,active:!1,type:e5,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null}}function ns(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=e.segmentIndex.get(0));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId}}function nu(e){return e.__shaka_id||(e.__shaka_id=ny++),e.__shaka_id}function nl(e){var t=nd(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}function nc(e){var t=nd(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function nd(e){var t=e.language;return{id:nu(e),active:!1,type:"",bandwidth:0,language:tQ(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioR
1oles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,wh:t}}function nh(e){return e.allowedByApplication&&e.allowedByKeySystem}function nf(e,t){var n=e.filter(function(e){return e.audio&&e.audio.channelsCount}),i=new Map;n=v(n);for(var r=n.next();!r.done;r=n.next()){var a=(r=r.value).audio.channelsCount;i.has(a)||i.set(a,[]),i.get(a).push(r)}return 0==(n=Array.from(i.keys())).length?e:(e=n.filter(function(e){return e<=t})).length?i.get(Math.max.apply(Math,y(e))):i.get(Math.min.apply(Math,y(n)))}function np(e,t,n,i){var r=e,a=e.filter(function(e){return e.primary});a.length&&(r=a);var o=r.length?r[0].language:"";if(r=r.filter(function(e){return e.language==o}),t){var s=t2(tQ(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return tQ(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=ng(r,n)).length)return e}else if((e=r.filter(function(e){return 0==e.roles.length})).length)return e;return(e=r.map(function(e){return e.roles}).reduce(eQ,[])).length?ng(r,e[0]):r}function ng(e,t){return e.filter(function(e){return e.roles.includes(t)})}function nm(e){var t=[];return e.audio&&t.push(nv(e.audio)),e.video&&t.push(nv(e.video)),t.join(", ")}function nv(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}(b=t3.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},b.get=function(e){return(e=this.g[e])?e.slice():null},b.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter(function(e){return e!=t}),0==this.g[e].length&&delete this.g[e])},b.forEach=function(e){for(var t in this.g)e(t,this.g[t])},b.size=function(){return Object.keys(this.g).length},b.keys=function(){return Object.keys(this.g)};var ny=0,nb="smooth",nw="powerEfficient",nT="bandwidth",nx=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),nS=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function nE(){var e=this;this.l=null,this.o=!1,this.i=new J,this.u=null,navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(e.o&&e.g.useNetworkInformation){e.i=new J,e.g&&e.i.configure(e.g.advanced);var t=e.chooseVariant();t&&e.l(t)}},navigator.connection.addEventListener("change",this.u)),this.m=[],this.A=1,this.F=!1,this.h=this.j=this.g=this.s=null,this.D=new tt(function(){if(e.g.restrictToElementSize){var t=e.chooseVariant();t&&e.l(t)}})}function nA(e){var t=e.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&e.g.useNetworkInformation&&(t=1e6*navigator.connection.downlink),t}function nk(e,t,n,i){return e&&(t=t.filter(function(t){return t8(t,e,{width:i,height:n})})),t.sort(function(e,t){return e.bandwidth-t.bandwidth})}(b=nE.prototype).stop=function(){this.l=null,this.o=!1,this.m=[],this.A=1,this.j=this.s=null,this.h&&(this.h.disconnect(),this.h=null),this.D.stop()},b.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null),this.D=null},b.init=function(e){this.l=e},b.chooseVariant=function(){var t=1/0,n=1/0;this.g.restrictToScreenSize&&(n=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio,t=e.screen.height*n,n*=e.screen.width),this.h&&this.g.restrictToElementSize&&(n=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio,t=this.j.clientHeight*n,n*=this.j.clientWidth),t=nk(this.g.restrictions,this.m,t,n),n=this.i.getBandwidthEstimate(nA(this)),this.m.length&&!t.length&&(t=[(t=nk(null,this.m,1/0,1/0))[0]]);for(var i=t[0]||null,r=0;r<t.length;r++){for(var a=t[r],o=isNaN(this.A)?1:Math.abs(this.A),s=o*a.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},l=r+1;l<t.length;l++)if(a.bandwidth!=t[l].bandwidth){u=t[l];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,n>=s&&n<=o&&i.bandwidth!=a.bandwidth&&(i=a)}return this.s=Date.now(),i},b.enable=function(){this.o=!0},b.disable=function(){this.o=!1},b.segmentDownloaded=function(e,t){if(this.i.sample(e,t),null!=this.s&&this.o)e:{if
1(this.F){if(Date.now()-this.s<1e3*this.g.switchInterval)break e}else{if(!((e=this.i).g>=e.i))break e;this.F=!0}e=this.chooseVariant(),this.i.getBandwidthEstimate(nA(this)),e&&this.l(e)}},b.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(nA(this))},b.setVariants=function(e){this.m=e},b.playbackRateChanged=function(e){this.A=e},b.setMediaElement=function(t){var n=this;this.j=t,this.h&&(this.h.disconnect(),this.h=null),this.j&&"ResizeObserver"in e&&(this.h=new ResizeObserver(function(){n.D.N(nI)}),this.h.observe(this.j))},b.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},W("shaka.abr.SimpleAbrManager",nE),nE.prototype.configure=nE.prototype.configure,nE.prototype.setMediaElement=nE.prototype.setMediaElement,nE.prototype.playbackRateChanged=nE.prototype.playbackRateChanged,nE.prototype.setVariants=nE.prototype.setVariants,nE.prototype.getBandwidthEstimate=nE.prototype.getBandwidthEstimate,nE.prototype.segmentDownloaded=nE.prototype.segmentDownloaded,nE.prototype.disable=nE.prototype.disable,nE.prototype.enable=nE.prototype.enable,nE.prototype.chooseVariant=nE.prototype.chooseVariant,nE.prototype.init=nE.prototype.init,nE.prototype.release=nE.prototype.release,nE.prototype.stop=nE.prototype.stop;var nI=1;function nC(e,t){this.g=e,this.h=t}function nM(e,t){var n=new nC(5,0),i=nN,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function nD(e,t,n,i){ee([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function nR(e,t,n,i){Z(n+"has been deprecated and has been removed in"+t+". We are now at version"+e+". Additional information:"+i)}nC.prototype.toString=function(){return"v"+this.g+"."+this.h};var nN=null;function nP(e,t){for(this.h=e,this.g=new Set([e]),t=(e=v(t=t||[])).next();!t.done;t=e.next())this.add(t.value)}function nL(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var i=t.audio;n=!((!(!n.channelsCount||!i.channelsCount||2<n.channelsCount||2<i.channelsCount)||n.channelsCount==i.channelsCount)&&n_(n,i)&&nj(n.roles,i.roles))}return!n&&(n=e.video&&t.video)&&(n=!(n_(e=e.video,t=t.video)&&nj(e.roles,t.roles))),!n}function n_(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(e){return tH(e)[0]}),t=t.codecs.split(",").map(function(e){return tH(e)[0]}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function nj(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=v(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function nO(e){this.g=e,this.h=new nU(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function nU(e,t,n,i){this.i=e,this.j=t,this.g=n,this.h=void 0===i?"":i}function nB(){this.g=nH,this.h=(new Map).set(nH,2).set(nV,1)}function nF(e,t,n){e.h.set(nH,n).set(nV,t)}W("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),nP.prototype.add=function(e){return!!nL(this.h,e)&&(this.g.add(e),!0)},nP.prototype.values=function(){return this.g.values()},nO.prototype.create=function(e){var t=this,n=e.filter(function(e){return nL(t.g,e)});return n.length?new nP(n[0],n):this.h.create(e)},nU.prototype.create=function(e){var t,n,i,r,a,o,s,u=[];t=e,u=(i=t2(n=tQ(n=this.i),t.map(function(e){return t1(e)})))?t.filter(function(e){return i==t1(e)}):[];var l=e.filter(function(e){return e.primary});for((r=u=u.length?u:l.length?l:e,a=this.j,e=r.filter(function(e){return!!e.audio&&(a?e.audio.roles.includes(a):0==e.audio.roles.length)})).length&&(u=e),this.g&&(e=nf(u,this.g)).length&&(u=e),this.h&&(o=u,s=this.h,e=o.filter(function(e){return!!e.audio&&e.audio.label.toLowerCase()==s.toLowerCase()})).length&&(u=e),e=new nP(u[0]),l=(u=v(u)).next();!l.done;l=u.next())l=l.value,nL(e.h,l)&&e.add(l);return e};var nV=0,nH=1;function nK(e,t){var n=nG();this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.o=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function nq(e){var t,n;return F(function(i){if(1==i.g){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new ej(2,7,1010);return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),C(i,new Promise(function(e){new tt(e).N(n/1e3)}),2))}e.h*=e.m,M(i)})}function nG(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function nX(e,t){this.promise=e,this.i=t,this.g=!1}function nz(e){return new nX(Promise.reject(e),function(){return Promise.resolve()})}function nW(){var e=Promise.reject(new ej(2,7,7001));return e.catch(function(){}),new nX(e,function(){return Promise.resolve()})}function nY(e){return new nX(Promise.resolve(e),function(){return Promise.resolve()})}function n$(e){return new nX(e,function(){return e.catch(function(){})})}function nJ(e){return new nX(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function nQ(t,n){if(n)if(n instanceof Map)for(var i=v(n.keys()),r=i.next();!r.done;r=i.next())Object.defineProperty(this,r=r.value,{value:n.get(r),writable:!0,enumerable:!0});else for(i in n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function nZ(e){var t,n=new nQ(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}nX.prototype.abort=function(){return this.g=!0,this.i()},nX.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},nX.prototype.Z=function(e,t){function n(n){return function(s){if(r.g&&n)a.reject(o);else{var u=n?e:t;u?i=function(e,t,n){try{var i=e(t);if(i&&i.promise&&i.abort)return n.resolve(i.promise),function(){return i.abort()};return n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})}}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function i(){return a.reject(o),r.abort()}var r=this,a=new e9,o=new ej(2,7,7001);return this.promise.then(n(!0),n(!1)),new nX(a,function(){return i()})},W("shaka.util.AbortableOperation",nX),nX.prototype.chain=nX.prototype.Z,nX.prototype.finally=nX.prototype.finally,nX.all=nJ,nX.prototype.abort=nX.prototype.abort,nX.notAbortable=n$,nX.completed=nY,nX.aborted=nW,nX.failed=nz,nQ.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},nQ.prototype.stopImmediatePropagation=function(){this.g=!0},nQ.prototype.stopPropagation=function(){},W("shaka.util.FakeEvent",nQ);
1var n0={Kg:"abrstatuschanged",Lg:"adaptation",Mg:"buffering",Ng:"downloadfailed",Og:"downloadheadersreceived",Pg:"drmsessionupdate",Rg:"emsg",bh:"prft",Error:"error",Sg:"expirationupdated",Tg:"gapjumped",Vg:"loaded",Wg:"loading",Yg:"manifestparsed",Zg:"mediaqualitychanged",Metadata:"metadata",$g:"onstatechange",ah:"onstateidle",dh:"ratechange",fh:"segmentappended",gh:"sessiondata",hh:"stalldetected",ih:"streaming",jh:"textchanged",kh:"texttrackvisibility",lh:"timelineregionadded",mh:"timelineregionenter",nh:"timelineregionexit",oh:"trackschanged",qh:"unloading",rh:"variantchanged"};function n1(){this.ea=new t3,this.Yc=this}function n2(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var i=n.constructor==Array;if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function n4(e){var t,n={};for(t in e)n[t]=e[t];return n}function n3(){this.g=[]}function n5(e,t){e.g.push(t.finally(function(){es(e.g,t)}))}function n6(e,t,n){n1.call(this),this.i=!1,this.m=new n3,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.s=n||null,this.o=!1}function n8(e,t,n,i){n=n||ii;var r=ir[e];(!r||n>=r.priority)&&(ir[e]={priority:n,lg:t,mg:void 0!==i&&i})}function n9(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function n7(){this.g=0}function ie(e,t,n){nX.call(this,e,t),this.h=n}n1.prototype.addEventListener=function(e,t){this.ea&&this.ea.push(e,t)},n1.prototype.removeEventListener=function(e,t){this.ea&&this.ea.remove(e,t)},n1.prototype.dispatchEvent=function(e){if(!this.ea)return!0;var t=this.ea.get(e.type)||[],n=this.ea.get("All");for(n&&(t=t.concat(n)),n=(t=v(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Yc,e.currentTarget=this.Yc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},n1.prototype.release=function(){this.ea=null},n3.prototype.destroy=function(){for(var e=[],t=v(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)},E(n6,n1),(b=n6.prototype).ke=function(e){this.o=e},b.ng=function(e){this.g.add(e)},b.Dg=function(e){this.g.delete(e)},b.tf=function(){this.g.clear()},b.og=function(e){this.h.add(e)},b.Eg=function(e){this.h.delete(e)},b.uf=function(){this.h.clear()},b.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),n1.prototype.release.call(this),this.m.destroy()},b.request=function(e,t){var n=this,i=new n7;if(this.i){var r=Promise.reject(new ej(2,7,7001));return r.catch(function(){}),new ie(r,function(){return Promise.resolve()},i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?n2(t.retryParameters):nG(),t.uris=n2(t.uris);var a=(r=function(e,t,n){var i=nY(void 0),r={};e=v(e.g);for(var a=e.next();!a.done;r={vd:r.vd},a=e.next())r.vd=a.value,i=i.Z(function(e){return function(){return n.body&&(n.body=eN(n.body)),e.vd(t,n)}}(r));return i.Z(void 0,function(e){if(e instanceof ej&&7001==e.code)throw e;throw new ej(2,1,1006,e)})}(this,e,t)).Z(function(){return function e(t,n,i,r,a,o,s){t.o&&(i.uris[a]=i.uris[a].replace("http://","https://"));var u=new eU(i.uris[a]),l=u.Ea,c=!1;l||(eB(u,l=(l=location.protocol).slice(0,-1)),i.uris[a]=u.toString());var d=(l=ir[l=l.toLowerCase()])?l.lg:null;if(!d)return nz(new ej(2,1,1e3,u));var h,f=l.mg,p=null,g=null,m=!1,v=!1;return n$(nq(r)).Z(function(){if(t.i)return nW();h=Date.now();var e=d(i.uris[a],i,n,function(e,i,r){p&&p.stop(),g&&g.N(o/1e3),t.l&&n==it&&(t.l(e,i),c=!0,s.g=r)},function(e){t.j&&t.j(e,i,n),v=!0});if(!f)return e;var r=i.retryParameters.connectionTimeout;r&&(p=new tt(function(){m=!0,e.abort()})).N(r/1e3);var o=i.retryParameters.stallTimeout;return o&&(g=new tt(function(){m=!0,e.abort()})),e}).Z(function(e){p&&p.stop(),g&&g.stop(),void 0==e.timeMs&&(e.timeMs=Date.now()-h);var r={response:e,Zf:c};return!v&&t.j&&t.j(e.headers,i,n),r},function(u){if(p&&p.stop(),g&&g.stop(),t.s){var l=null,c=0;u instanceof ej&&(l=u,1001==u.code&&(c=u.data[1])),t.s(i,l,c,m)}if(t.i)return nW();if(m&&(u=new ej(1,1,1003,i.uris[a],n)),u instanceof ej){if(7001==u.code)throw u;if(1010==u.code)throw o;if(1==u.severity)return l=new nQ("retry",l=(new Map).set("error",u)),t.dispatchEvent(l),a=(a+1)%i.uris.length,e(t,n,i,r,a,u,s)}throw u})}(n,e,t,new nK(t.retryParameters,!1),0,null,i)}),o=a.Z(function(t){var i=n,r=e,a=t,o=nY(void 0),s={};i=v(i.h);for(var u=i.next();!u.done;s={wd:s.wd},u=i.next())s.wd=u.value,o=o.Z(function(e){return function(){var t=a.response;return t.data&&(t.data=eN(t.data)),e.wd(r,t)}}(s));return o.Z(function(){return a},function(e){var t=2;if(e instanceof ej){if(7001==e.code)throw e;t=e.severity}throw new ej(t,1,1007,e)})}),s=Date.now(),u=0;r.promise.then(function(){u=Date.now()-s},function(){});var l=0;a.promise.then(function(){l=Date.now()},function(){});var c=o.Z(function(i){var r=Date.now()-l,a=i.response;return a.timeMs+=u,a.timeMs+=r,i.Zf||!n.l||a.fromCache||"HEAD"==t.method||e!=it||n.l(a.timeMs,a.data.byteLength),a},function(e){throw e&&(e.severity=2),e});return r=new ie(c.promise,function(){return c.abort()},i),n5(this.m,r),r},W("shaka.net.NetworkingEngine",n6),n6.prototype.request=n6.prototype.request,n6.prototype.destroy=n6.prototype.destroy,n6.makeRequest=n9,n6.defaultRetryParameters=function(){return nG()},n6.prototype.clearAllResponseFilters=n6.prototype.uf,n6.prototype.unregisterResponseFilter=n6.prototype.Eg,n6.prototype.registerResponseFilter=n6.prototype.og,n6.prototype.clearAllRequestFilters=n6.prototype.tf,n6.prototype.unregisterRequestFilter=n6.prototype.Dg,n6.prototype.registerRequestFilter=n6.prototype.ng,n6.unregisterScheme=function(e){delete ir[e]},n6.registerScheme=n8,n6.prototype.setForceHTTPS=n6.prototype.ke,n6.NumBytesRemainingClass=n
17,E(ie,nX),n6.PendingRequest=ie;var it=1;n6.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var ii=3;n6.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var ir={};function ia(e){this.g=!1,this.h=new e9,this.i=e}function io(e,t){if(e.g){if(t instanceof ej&&7003==t.code)throw t;throw new ej(2,7,7003,t)}}function is(){this.g=new t3}function iu(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(void 0==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(e){return!n.has(e)}),!function(e){var t=il;if(void 0==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch(e){t=!1}il=t}return t||!1}(e)?t.capture||!1:t}(e,i),this.target.addEventListener(t,n,this.g)}ia.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))},(b=is.prototype).release=function(){this.ob(),this.g=null},b.C=function(e,t,n,i){this.g&&(e=new iu(e,t,n,i),this.g.push(t,e))},b.ca=function(e,t,n,i){var r=this;this.C(e,t,function i(a){r.Ac(e,t,i),n(a)},i)},b.Ac=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=v(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Ac(),this.g.remove(t,r))}},b.ob=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,y(t.g[e]));for(n=(t=v(n)).next();!n.done;n=t.next())n.value.Ac();this.g.g={}}},W("shaka.util.EventManager",is),is.prototype.removeAll=is.prototype.ob,is.prototype.unlisten=is.prototype.Ac,is.prototype.listenOnce=is.prototype.ca,is.prototype.listen=is.prototype.C,is.prototype.release=is.prototype.release,iu.prototype.Ac=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var il=void 0;function ic(e,t){var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function id(e){for(var t=new Map,n=v(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function ih(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function ip(e,t){this.S=eL(e),this.h=t==im,this.g=0}function ig(){return new ej(2,3,3e3)}(b=ip.prototype).ia=function(){return this.g<this.S.byteLength},b.$=function(){return this.g},b.Hf=function(){return this.S.byteLength},b.Sa=function(){try{var e=this.S.getUint8(this.g);return this.g+=1,e}catch(e){throw ig()}},b.be=function(){try{var e=this.S.getUint16(this.g,this.h);return this.g+=2,e}catch(e){throw ig()}},b.K=function(){try{var e=this.S.getUint32(this.g,this.h);return this.g+=4,e}catch(e){throw ig()}},b.Pe=function(){try{var e=this.S.getInt32(this.g,this.h);return this.g+=4,e}catch(e){throw ig()}},b.$a=function(){try{if(this.h)var e=this.S.getUint32(this.g,!0),t=this.S.getUint32(this.g+4,!0);else t=this.S.getUint32(this.g,!1),e=this.S.getUint32(this.g+4,!1)}catch(e){throw ig()}if(2097151<t)throw new ej(2,3,3001);return this.g+=8,0x100000000*t+e},b.Za=function(e){if(this.g+e>this.S.byteLength)throw ig();var t=eP(this.S,this.g,e);return this.g+=e,t},b.skip=function(e){if(this.g+e>this.S.byteLength)throw ig();this.g+=e},b.ug=function(e){if(this.g<e)throw ig();this.g-=e},b.seek=function(e){if(0>e||e>this.S.byteLength)throw ig();this.g=e},b.tc=function(){for(var e=this.g;this.ia()&&0!=this.S.getUint8(this.g);)this.g+=1;return e=eP(this.S,e,this.g-e),this.g+=1,tm(e)},W("shaka.util.DataViewReader",ip),ip.prototype.readTerminatedString=ip.prototype.tc,ip.prototype.seek=ip.prototype.seek,ip.prototype.rewind=ip.prototype.ug,ip.prototype.skip=ip.prototype.skip,ip.prototype.readBytes=ip.prototype.Za,ip.prototype.readUint64=ip.prototype.$a,ip.prototype.readInt32=ip.prototype.Pe,ip.prototype.readUint32=ip.prototype.K,ip.prototype.readUint16=ip.prototype.be,ip.prototype.readUint8=ip.prototype.Sa,ip.prototype.getLength=ip.prototype.Hf,ip.prototype.getPosition=ip.prototype.$,ip.prototype.hasMoreData=ip.prototype.ia;var im=1;function iv(){this.i=[],this.h=[],this.g=!1}function iy(e){for(var t=iE(e);e.reader.ia()&&!e.parser.g;)e.parser.rc(e.start+t,e.reader,e.partialOkay)}function ib(e){for(var t=iE(e),n=e.reader.K(),i=0;i<n&&(e.parser.rc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function iw(e){var t=iE(e);for(e.reader.skip(78);e.reader.ia()&&!e.parser.g;)e.parser.rc(e.start+t,e.reader,e.partialOkay)}function iT(e){return function(t){e(t.reader.Za(t.reader.S.byteLength-t.reader.$()))}}function ix(e){var t=0;e=v(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function iS(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function iE(e){return 8+8*!!e.has64BitSize+4*(null!=e.flags)}ip.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(b=iv.prototype).box=function(e,t){return e=ix(e),this.i[e]=iA,this.h[e]=t,this}
1,b.P=function(e,t){return e=ix(e),this.i[e]=ik,this.h[e]=t,this},b.stop=function(){this.g=!0},b.parse=function(e,t,n){for(e=new ip(e,0),this.g=!1;e.ia()&&!this.g;)this.rc(0,e,t,n)},b.rc=function(e,t,n,i){var r=t.$();if(i&&r+8>t.S.byteLength)this.g=!0;else{var a=t.K(),o=t.K(),s=iS(o),u=!1;switch(a){case 0:a=t.S.byteLength-r;break;case 1:if(i&&t.$()+8>t.S.byteLength){this.g=!0;return}a=t.$a(),u=!0}var l=this.h[o];if(l){var c=null,d=null;if(this.i[o]==ik){if(i&&t.$()+4>t.S.byteLength){this.g=!0;return}c=(d=t.K())>>>24,d&=0xffffff}o=r+a,n&&o>t.S.byteLength&&(o=t.S.byteLength),i&&o>t.S.byteLength?this.g=!0:l({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new ip(t=0<(i=o-t.$())?t.Za(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u})}else t.skip(Math.min(r+a-t.$(),t.S.byteLength-t.$()))}},W("shaka.util.Mp4Parser",iv),iv.headerSize=iE,iv.typeToString=iS,iv.allData=iT,iv.visualSampleEntry=iw,iv.sampleDescription=ib,iv.children=iy,iv.prototype.parseNext=iv.prototype.rc,iv.prototype.parse=iv.prototype.parse,iv.prototype.stop=iv.prototype.stop,iv.prototype.fullBox=iv.prototype.P,iv.prototype.box=iv.prototype.box;var iA=0,ik=1;function iI(e){var t=this;this.g=[],this.h=[],this.data=[],(new iv).box("moov",iy).box("moof",iy).P("pssh",function(e){if(!(1<e.version)){var n=eP(e.reader.S,-12,e.size);if(t.data.push(n),t.g.push(tI(e.reader.Za(16))),0<e.version){n=e.reader.K();for(var i=0;i<n;i++){var r=tI(e.reader.Za(16));t.h.push(r)}}}}).parse(e)}function iC(e,t,n,i){var r=e.length,a=t.length+16+r;0<i&&(a+=4+16*n.size);var o=new Uint8Array(a),s=eL(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,0x70737368),u+=4,1>i?s.setUint32(u,0):s.setUint32(u,0x1000000),u+=4,o.set(t,u),u+=t.length,0<i)for(s.setUint32(u,n.size),u+=4,n=(t=v(n)).next();!n.done;n=t.next())n=tk(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function iM(e,t){return 1!=(e=iR(e,t)).length?null:e[0]}function iD(e,t,n){return 1!=(e=iN(e,t,n)).length?null:e[0]}function iR(e,t){var n=[];e=v(e.childNodes);for(var i=e.next();!i.done;i=e.next())(i=i.value)instanceof Element&&i.tagName==t&&n.push(i);return n}function iN(e,t,n){var i=[];e=v(e.childNodes);for(var r=e.next();!r.done;r=e.next())(r=r.value)instanceof Element&&r.localName==n&&r.namespaceURI==t&&i.push(r);return i}function iP(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function iL(e,t,n){t=v(t);for(var i=t.next();!i.done;i=t.next())if(i=i.value,e.hasAttributeNS(i,n))return e.getAttributeNS(i,n);return null}function i_(e){return Array.from(e.childNodes).every(ij)?e.textContent.trim():null}function ij(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function iO(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.getAttribute(t))&&(r=n(e)),null==r?i:r}function iU(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),isNaN(e=Date.parse(e))?null:e/1e3):null}function iB(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(e))&&isFinite(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null))?e:null}function iF(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t&&isFinite(e=Number(t[1]))&&isFinite(t=Number(t[2]))?{start:e,end:t}:null}function iV(e){return 0==(e=Number(e))%1?e:null}function iH(e){return 0==(e=Number(e))%1&&0<e?e:null}function iK(e){return 0==(e=Number(e))%1&&0<=e?e:null}function iq(e){return isNaN(e=Number(e))?null:e}function iG(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function iX(e,t){var n=new DOMParser,i=iW.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch(e){return null}if(!(n=e.documentElement)||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function iz(e,t){try{var n=tm(e);return iX(n,t)}catch(e){return null}}var iW=new e7(function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}});function iY(e,t){var n=this;t=void 0===t?1:t,this.D=e,this.G=new Set,this.l=this.u=null,this.fa=this.ba=!1,this.H=0,this.g=null,this.s=new is,this.i=new Map,this.A=[],this.o=new e9,this.h=null,this.m=function(t){n.o.reject(t),e.onError(t)},this.ka=new Map,this.da=new Map,this.V=new tt(function(){var e,t,i;return t=(e=n).ka,void((i=e.da).clear(),t.forEach(function(e,t){return i.set(t,e)}
1),(t=Array.from(i.values())).length&&t.every(function(e){return"expired"==e})&&e.m(new ej(2,6,6014)),e.D.ed(ih(i)))}),this.M=!1,this.L=[],this.O=!1,this.ea=new tt(function(){var e;(e=n).i.forEach(function(t,n){var i=t.Xd,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.Xd=r)})}).Ca(t),this.o.catch(function(){}),this.j=new ia(function(){var e;return e=n,F(function(t){switch(t.g){case 1:return e.s.release(),e.s=null,e.o.reject(),e.ea.stop(),e.ea=null,e.V.stop(),e.V=null,C(t,i9(e),2);case 2:if(!e.l){t.B(3);break}return D(t,4),C(t,e.l.setMediaKeys(null),6);case 6:N(t,5);break;case 4:P(t);case 5:e.l=null;case 3:e.g=null,e.G.clear(),e.u=null,e.A=[],e.h=null,e.m=function(){},e.D=null,e.W=!1,e.F=null,M(t)}})}),this.W=!1,this.J=this.F=null}function i$(e,t,n){return e.A=n,e.M=0<n.length,iJ(e,t)}function iJ(t,n){var i,r,a,o,s,u,l,c,d,h,f,p;return F(function(g){if(1==g.g){if(i=function(t){if(0==(t=id(t.h.clearKeys)).size)return null;var n=[],i=[];t.forEach(function(e,t){var r=t;22!=r.length&&(r=tE(tk(t),!1)),22!=(t=e).length&&(t=tE(tk(e),!1)),e={kty:"oct",kid:r,k:t},n.push(e),i.push(e.kid)}),t=JSON.stringify({keys:n});var r=JSON.stringify({kids:i});return r=[{initData:eP(tb(r)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:r,keyIds:new Set(i)}}(t))for(a=(r=v(n)).next();!a.done;a=r.next())(o=a.value).video&&(o.video.drmInfos=[i]),o.audio&&(o.audio.drmInfos=[i]);for((s=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}))||function(e,t){var n=[];for(t.forEach(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),t=(e=v(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,id(t.h.servers)),u=new Set,a=(l=v(n)).next();!a.done;a=l.next())for(d=(c=v(re(a.value))).next();!d.done;d=c.next())h=d.value,u.add(h);for(d=(f=v(u)).next();!d.done;d=f.next())!function(t,n,i,r){var a=t.keySystem;a&&("org.w3.clearkey"!=a||!t.licenseServerUri)&&(n.size&&(t.licenseServerUri=n=n.get(a)||""),t.keyIds||(t.keyIds=new Set),(i=i.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.videoRobustness||(t.videoRobustness=i.videoRobustness),t.audioRobustness||(t.audioRobustness=i.audioRobustness),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),r[a]&&(t.keySystem=r[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(d.value,id(t.h.servers),id(t.h.advanced||{}),t.h.keySystemsMapping);return C(g,ne(n,t.M,t.W),2)}return s||Object.keys(t.h.servers).length?(p=i3(t,void 0,n),g.return(s?p:p.catch(function(){}))):(t.ba=!0,g.return(Promise.resolve()))})}function iQ(e){var t;return F(function(n){switch(n.g){case 1:if(e.l.mediaKeys)return n.return();if(!e.F){n.B(2);break}return C(n,e.F,3);case 3:return io(e.j),n.return();case 2:return D(n,4),e.F=e.l.setMediaKeys(e.u),C(n,e.F,6);case 6:N(n,5);break;case 4:t=P(n),e.m(new ej(2,6,6003,t.message));case 5:io(e.j),M(n)}})}function iZ(e){var t,n;return F(function(i){switch(i.g){case 1:if(!e.u||!e.g)return i.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){i.B(2);break}return t=n9([e.g.serverCertificateUri],e.h.retryParameters),D(i,3),C(i,e.D.lb.request(5,t).promise,5);case 5:n=i.h,e.g.serverCertificate=eP(n.data),N(i,4);break;case 3:throw new ej(2,6,6017,P(i));case 4:if(e.j.g)return i.return();case 2:if(!e.g.serverCertificate||!e.g.serverCertificate.length)return i.return();return D(i,6),C(i,e.u.setServerCertificate(e.g.serverCertificate),8);case 8:N(i,0);break;case 6:throw new ej(2,6,6004,P(i).message)}})}function i0(e){for(var t=(e.g?e.g.initData:[])||[],n=v(t),i=n.next();!i.done;i=n.next())i1(e,(i=i.value).initDataType,i.initData);for(i=(n=v(e.A)).next();!i.done;i=n.next())i5(e,i.value);return t.length||e.A.length||e.o.resolve(),e.o}function i1(e,t,n){if(n.length){var i=e.i.values();i=v(i);for(var r=i.next();!r.done;r=i.next())if(eD(n,r.value.initData)&&!td("Tizen 2"))return;0<e.i.size&&rt(e)&&(e.o.resolve(),e.o=new e9,e.o.catch(function(){})),function(e,t,n,i){try{var r=e.u.createSession(i)}catch(t){e.m(new ej(2,6,6005,t.message));return}e.s.C(r,"message",function(t){e.l&&e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.O?e.L.push(t):i6(e,t)}),e.s.C(r,"keystatuseschange",function(t){return i8(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Xd:1/0,Ja:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(n){t=n,n instanceof ej||(t=new ej(2,6,6016,n)),e.m(t);return}e.h.logLicenseExchange&&tE(n),r.generateRequest(t,n).catch(function(t){if(!e.j.g){e.i.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;0>i&&(i+=0x100000000),i="0x"+i.toString(16)}e.m(new ej(2,6,6006,t.message,t,i))}})}(e,t,n,e.g.sessionType)}}function i2(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function i4(e){return Array.from(e=ic(e=e.i.keys(),function(e){return e.sessionId}))}function i3(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g;return F(function(m){switch(m.g){case 1:var y,b,w,T,x,S,E,A,k,I,M,R,L,_,j,O;if(i=new Map,n.length){r=function(e,t,n){for(var i=v(t),r=i.next();!r.done;r=i.next()){var a=v(re(r.value));for(r=a.next();!r.done;r=a.next())r=r.value,n.has(r.keySystem)||n.set(r.keySystem,[]),n.get(r.keySystem).push(r)}if(1==n.size&&n.has(""))throw new ej(2,6,6e3);for(i={},r=(e=v(e.h.preferredKeySystems)).next();!r.done;i={td:i.td},r=e.next())for(i.td=r.value,r=(a=v(t)).next();!r.done;r=a.next())if(r=r.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.td}}(i)))return r.keySystemAccess;for(r=(e=v([!0,!1])).next();!r.done;r=e.next())for(i=r.value,r=(a=v(t)).next();!r.done;r=a.next()){var o=v(r.value.decodingInfos);for(r=o.next();!r.done;r=o.next()){var s=r.value;if(s.supported&&s.keySystemAccess){var u=v(r=n.get(s.keySystemAccess.keySystem));for(r=u.next();!r.done;r=u.next())if(!!r.value.licenseServerUri==i)return s.keySystemAccess}}}return null}(e,n,i),m.B(2);break}return C(m,(y=e,b=t,F(function(e){switch(e.g){case 1:if(1==b.size&&b.has(""))throw new ej(2,6,6e3);
1for(x=(T=v(b.values())).next();!x.done;x=T.next())0==(S=x.value).audioCapabilities.length&&delete S.audioCapabilities,0==S.videoCapabilities.length&&delete S.videoCapabilities;A=(E=v(y.h.preferredKeySystems)).next();case 2:if(A.done){e.B(4);break}if(k=A.value,!b.has(k)){e.B(3);break}return I=b.get(k),D(e,6),C(e,navigator.requestMediaKeySystemAccess(k,[I]),8);case 8:return w=e.h,e.return(w);case 6:P(e);case 7:io(y.j);case 3:A=E.next(),e.B(2);break;case 4:R=(M=v([!0,!1])).next();case 9:if(R.done){e.B(11);break}L=R.value,A=(_=v(b.keys())).next();case 12:if(A.done){R=M.next(),e.B(9);break}if(j=A.value,(O=b.get(j)).drmInfos.some(function(e){return!!e.licenseServerUri})!=L){e.B(13);break}return D(e,15),C(e,navigator.requestMediaKeySystemAccess(j,[O]),17);case 17:return w=e.h,e.return(w);case 15:P(e);case 16:io(y.j);case 13:A=_.next(),e.B(12);break;case 11:return e.return(w)}})),3);case 3:r=m.h;case 2:if(!(a=r))throw new ej(2,6,6001);for(io(e.j),D(m,4),e.G.clear(),s=(o=a.getConfiguration()).audioCapabilities||[],u=o.videoCapabilities||[],c=(l=v(s)).next();!c.done;c=l.next())d=c.value,e.G.add(d.contentType.toLowerCase());for(c=(h=v(u)).next();!c.done;c=h.next())f=c.value,e.G.add(f.contentType.toLowerCase());if(n.length){var U=a.keySystem,B=i.get(a.keySystem),V=[],H=[],K=[],q=[],G=new Set;rn(B,V,K,H,q,G);var X=e.M?"persistent-license":"temporary";for(U={keySystem:U,licenseServerUri:V[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||X,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:K[0],serverCertificateUri:H[0],initData:q,keyIds:G},V=(B=v(B)).next();!V.done;V=B.next())(V=V.value).distinctiveIdentifierRequired&&(U.distinctiveIdentifierRequired=V.distinctiveIdentifierRequired),V.persistentStateRequired&&(U.persistentStateRequired=V.persistentStateRequired);B=U}else B=a.keySystem,U=t.get(a.keySystem),V=[],H=[],K=[],q=[],G=new Set,rn(U.drmInfos,V,K,H,q,G),B={keySystem:B,licenseServerUri:V[0],distinctiveIdentifierRequired:"required"==U.distinctiveIdentifier,persistentStateRequired:"required"==U.persistentState,sessionType:U.sessionTypes[0]||"temporary",audioRobustness:(U.audioCapabilities?U.audioCapabilities[0].robustness:"")||"",videoRobustness:(U.videoCapabilities?U.videoCapabilities[0].robustness:"")||"",serverCertificate:K[0],serverCertificateUri:H[0],initData:q,keyIds:G};if(e.g=B,!e.g.licenseServerUri)throw new ej(2,6,6012,e.g.keySystem);return C(m,a.createMediaKeys(),6);case 6:return p=m.h,io(e.j),e.u=p,e.ba=!0,C(m,iZ(e),7);case 7:io(e.j),N(m,0);break;case 4:if(g=P(m),io(e.j,g),e.g=null,e.G.clear(),g instanceof ej)throw g;throw new ej(2,6,6002,g.message)}})}function i5(e,t){var n,i,r,a,o;return F(function(s){switch(s.g){case 1:try{n=e.u.createSession("persistent-license")}catch(t){return i=new ej(2,6,6005,t.message),e.m(i),s.return(Promise.reject(i))}return e.s.C(n,"message",function(t){e.l&&e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.O?e.L.push(t):i6(e,t)}),e.s.C(n,"keystatuseschange",function(t){return i8(e,t)}),r={initData:null,initDataType:null,loaded:!1,Xd:1/0,Ja:null,type:"persistent-license"},e.i.set(n,r),D(s,2),C(s,n.load(t),4);case 4:if(a=s.h,io(e.j),!a)return e.i.delete(n),e.m(new ej(2,6,6013)),s.return(Promise.resolve());return r.loaded=!0,rt(e)&&e.o.resolve(),s.return(n);case 2:o=P(s),io(e.j,o),e.i.delete(n),e.m(new ej(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}})}function i6(e,t){var n,i,r,a,o,s,u,l,c,d;F(function(h){switch(h.g){case 1:return n=t.target,e.h.logLicenseExchange&&tE(t.message),i=e.i.get(n),r=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=n9([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType),i2(e.g.keySystem)&&function(e){var t=tv(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){t=iX(t,"PlayReadyKeyMessage");for(var n=v(t.getElementsByTagName("HttpHeader")),i=n.next();!i.done;i=n.next())i=i.value,e.headers[i.getElementsByTagName("name")[0].textContent]=i.getElementsByTagName("value")[0].textContent;e.body=tA(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),D(h,2),C(h,e.D.lb.request(2,o).promise,4);case 4:u=h.h,N(h,3);break;case 2:return l=new ej(2,6,6007,P(h)),e.m(l),i&&i.Ja&&i.Ja.reject(l),h.return();case 3:if(e.j.g)return h.return();return e.H+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&tE(u.data),D(h,5),C(
1h,n.update(u.data),7);case 7:N(h,6);break;case 5:return c=new ej(2,6,6008,P(h).message),e.m(c),i&&i.Ja&&i.Ja.reject(c),h.return();case 6:if(e.j.g)return h.return();d=new nQ("drmsessionupdate"),e.D.onEvent(d),i&&(i.Ja&&i.Ja.resolve(),new tt(function(){i.loaded=!0,rt(e)&&e.o.resolve()}).N(rr)),M(h)}})}function i8(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(i2(e.g.keySystem)&&16==r.byteLength&&(tr()||tl())){var o=(a=eL(r)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(i=!0),r=tI(r).slice(0,32),e.ka.set(r,t)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.Ja&&(e.i.delete(t),t.close().catch(function(){})),rt(e)&&(e.o.resolve(),e.V.N(ra))}function i9(e){var t;return F(function(n){return t=Array.from(e.i.entries()),e.i.clear(),C(n,Promise.all(t.map(function(t){var n=(t=v(t)).next().value,i=t.next().value;return F(function(t){if(1==t.g){var r;return D(t,2),e.fa||e.A.includes(n.sessionId)||"persistent-license"!==i.type?C(t,F(function(e){return 1==e.g?(r=new Promise(function(e,t){new tt(t).N(ri)}),D(e,2),C(e,Promise.race([Promise.all([n.close(),n.closed]),r]),4)):2!=e.g?N(e,0):void(P(e),M(e))}),5):C(t,n.remove(),5)}if(2!=t.g)return N(t,0);P(t),M(t)})})),0)})}function i7(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r={},a=v(t),o=a.next();!o.done;r={Da:r.Da},o=a.next())if(o=o.value,i.keySystem==o.keySystem){r.Da=[],r.Da=r.Da.concat(i.initData||[]),r.Da=r.Da.concat(o.initData||[]),r.Da=r.Da.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Da.findIndex(function(e){return e.keyId===t.keyId})}}(r)),a=i.keyIds&&o.keyIds?new Set([].concat(y(i.keyIds),y(o.keyIds))):i.keyIds||o.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||o.persistentStateRequired,videoRobustness:i.videoRobustness||o.videoRobustness,audioRobustness:i.audioRobustness||o.audioRobustness,serverCertificate:i.serverCertificate||o.serverCertificate,serverCertificateUri:i.serverCertificateUri||o.serverCertificateUri,initData:r.Da,keyIds:a});break}}return n}function re(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function rt(e){var t=e=e.i.values();t=v(t);for(var n=t.next();!n.done;n=t.next())if(!n.value.loaded)return!1;return!0}function rn(e,t,n,i,r,a){var o={};e=v(e);for(var s=e.next();!s.done;o={pa:o.pa},s=e.next()){if(o.pa=s.value,t.includes(o.pa.licenseServerUri)||t.push(o.pa.licenseServerUri),i.includes(o.pa.serverCertificateUri)||i.push(o.pa.serverCertificateUri),o.pa.serverCertificate&&(n.some(function(e){return function(t){return eD(t,e.pa.serverCertificate)}}(o))||n.push(o.pa.serverCertificate)),o.pa.initData){s={};for(var u=v(o.pa.initData),l=u.next();!l.done;s={Ec:s.Ec},l=u.next())s.Ec=l.value,r.some(function(e){return function(t){var n=e.Ec;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&eD(t.initData,n.initData)}}(s))||r.push(s.Ec)}if(o.pa.keyIds)for(u=(s=v(o.pa.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}(b=iY.prototype).destroy=function(){return this.j.destroy()},b.configure=function(e){this.h=e},b.Zb=function(e){var t=this;return F(function(n){if(1==n.g)return t.u?(t.l=e,t.s.ca(t.l,"play",function(){for(var e=v(t.L),n=e.next();!n.done;n=e.next())i6(t,n.value);t.O=!0,t.L=[]}),"webkitCurrentPlaybackTargetIsWireless"in t.l&&t.s.C(t.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return i9(t)}),t.J=t.g&&t.g.initData.find(function(e){return 0<e.initData.length})||null,t.J||"com.apple.fps"!==t.g.keySystem||t.A.length?C(n,iQ(t),2):n.B(2)):(t.s.ca(e,"encrypted",function(){t.m(new ej(2,6,6010))}),n.return());i0(t),t.J||t.A.length||t.h.parseInbandPsshEnabled||t.s.C(t.l,"encrypted",function(e){return F(function(n){if(1==n.g)return C(n,iQ(t),2);i1(t,e.initDataType,eP(e.initData)),M(n)})}),M(n)})},b.jc=function(){var e=1/0,t=this.i.keys();t=v(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},b.Rc=function(){return ih(this.da)};var ri=1,rr=5,ra=.5,ro=new e7(function(){return eN(new Uint8Array([0]))});function rs(){}function ru(e,t,n,i){var r,a,o,s;return F(function(u){if(1==u.g)return i&&(r=rd[i.toLowerCase()])?u.return(r):(a=rc(e))&&(o=rh[a])?u.return(o):i?u.B(2):C(u,rl(e,t,n),3);if(2!=u.g&&(i=u.h)&&(s=rd[i]))return u.return(s);throw new ej(2,4,4e3,e)})}function rl(e,t,n){var i,r;return F(function(a){return 1==a.g?((i=n9([e],n)).method="HEAD",C(a,t.request(0,i).promise,2)):(r=a.h.headers["content-type"],a.return(r?r.toLowerCase().split(";").shift():""))})}function rc(e){return 1==(e=new eU(e).ra.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}W("shaka.media.ManifestParser",rs),rs.unregisterParserByMime=function(e){delete rd[e]}
1,rs.registerParserByMime=function(e,t){rd[e]=t},rs.registerParserByExtension=function(e,t){rh[e]=t};var rd={},rh={};function rf(e,t,n){0!=(t=(e=eL(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,0|n)):e.setUint32(0,n))}var rp=new e7(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 rg(e,t,n,i,r){if(i>=r)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",c="black",d=rm(i,r,s,u,l,c);a<=o;a++){for(var h=n[a],f=-1,p=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}for(g=h.length-1;0<=g;g--)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}if(-1===f||-1===p)h=rv(i,r),e.nestedCues.push(h);else{for(;f<=p;f++)if(g=h[f]){var m=g.l,v=g.i,y=g.j,b=g.h;(m!=s||v!=u||y!=l||b!=c)&&(d.payload&&e.nestedCues.push(d),d=rm(i,r,m,v,y,b),s=m,u=v,l=y,c=b),d.payload+=g.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=rv(i,r),e.nestedCues.push(d)),d=rm(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function rm(e,t,n,i,r,a){return e=new ec(e,t,""),n&&e.textDecoration.push("underline"),i&&(e.fontStyle="italic"),e.color=r,e.backgroundColor=a,e}function rv(e,t){return(e=new ec(e,t,"")).lineBreak=!0,e}function ry(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function rb(e,t){this.i=[],this.g=1,this.h=0,this.u=e,this.s=t,this.j=this.m=!1,this.l="white",this.o="black",rT(this)}function rw(e,t,n){return rg(new ec(t,n,""),"CC"+(e.u<<1|e.s+1),e.i,t,n)}function rT(e){rE(e,0,15),e.g=1}function rx(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case rA:i=rM.has(n)?rM.get(n):String.fromCharCode(n);break;case rk:i=rD.get(n);break;case rI:e.i[e.g].pop(),i=rR.get(n);break;case rC:e.i[e.g].pop(),i=rN.get(n)}i&&e.i[e.g].push(new ry(i,e.m,e.j,e.o,e.l))}}function rS(e,t,n,i){if(!(0>n||0>t))if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(e){return e});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(e){return e})}function rE(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var rA=0,rk=1,rI=2,rC=3,rM=new Map([[39,"â"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"â"]]),rD=new Map([[48,"\xae"],[49,"\xb0"],[50,"\xbd"],[51,"\xbf"],[52,"â¢"],[53,"\xa2"],[54,"\xa3"],[55,"âª"],[56,"\xe0"],[57,"â "],[58,"\xe8"],[59,"\xe2"],[60,"\xea"],[61,"\xee"],[62,"\xf4"],[63,"\xfb"]]),rR=new Map([[32,"\xc1"],[33,"\xc9"],[34,"\xd3"],[35,"\xda"],[36,"\xdc"],[37,"\xfc"],[38,"â"],[39,"\xa1"],[40,"*"],[41,"'"],[42,"â"],[43,"\xa9"],[44,"â "],[45,"\xb7"],[46,"â"],[47,"â"],[48,"\xc0"],[49,"\xc2"],[50,"\xc7"],[51,"\xc8"],[52,"\xca"],[53,"\xcb"],[54,"\xeb"],[55,"\xce"],[56,"\xcf"],[57,"\xef"],[58,"\xd4"],[59,"\xd9"],[60,"\xf9"],[61,"\xdb"],[62,"\xab"],[63,"\xbb"]]),rN=new Map([[32,"\xc3"],[33,"\xe3"],[34,"\xcd"],[35,"\xcc"],[36,"\xec"],[37,"\xd2"],[38,"\xf2"],[39,"\xd5"],[40,"\xf5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xc4"],[49,"\xe4"],[50,"\xd6"],[51,"\xf6"],[52,"\xdf"],[53,"\xa5"],[54,"\xa4"],[55,"â"],[56,"\xc5"],[57,"\xe5"],[58,"\xd8"],[59,"\xf8"],[60,"â"],[61,"â"],[62,"â"],[63,"â"]]);function rP(e,t){this.h=rO,this.o=new rb(e,t),this.i=new rb(e,t),this.l=new rb(e,t),this.g=this.i,this.j=0,this.m=null}function rL(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==rB&&e.h!==rF&&(r=rw(i,e.j,n),(n=e.i).g=0<n.h?n.h:0,rE(n,0,15),(n=e.l).g=0<n.h?n.h:0,rE(n,0,15),i.g=15),e.h=rB,i.h=t,r}function r_(e){e.h=rU,e.g=e.l,e.g.h=0}function rj(e){et("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=rF}var rO=0,rU=1,rB=3,rF=4,rV="black green blue cyan red yellow magenta black".split(" "),rH="white green blue cyan red yellow magenta white_italics".split(" ");function rK(){this.l=!1,this.A=this.F=0,this.D=rJ,this.i=[],this.g=this.h=this.j=0,this.u=this.o=!1,this.s="white",this.m="black",rq(this)}function rq(e){e.i=[];for(var t=0;16>t;t++)e.i.push(rG())}function rG(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function rX(e,t){rz(e)&&(e.i[e.h][e.g]=new ry(t,e.u,e.o,e.m,e.s),e.g++)}function rz(e){var t=e.g<e.A&&0<=e.g;return e.h<e.F&&0<=e.h&&t}function rW(e,t,n){var i=new ec(e.j,t,"");return i.textAlign=e.D===rY?"left":e.D===r$?"right":eh,(n=rg(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}rK.prototype.isVisible=function(){return this.l};var rY=0,r$=1,rJ=2;function rQ(){this.i=[],this.h=null,this.g=0}function rZ(e){this.g=0,this.h=e}function r0(e){if(!e.ia())throw new ej(2,2,3e3);return e.h[e.g++]}function r1(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function r2(e,t){for(var n=[],i=0;8>i;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}function r4(e,t,n){var i=null;t=v(r2(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=rW(a,n,e.i)),e.h[r]=null}return i}function r3(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function r5(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],r8[e<<2|(t=i[t])<<1|(n=i[n])]}rZ.prototype.ia=function(){return this.g<this.h.length},rZ.prototype.$=function(){return this.g},rZ.prototype.skip=function(e){if(this.g+e>this.h.length)throw new ej(2,2,3e3);this.g+=e};var r6=new Map([[32," "],[33,"\xa0"],[37,"â¦"],[42,"Å "],[44,"Å"],[48,"â"],[49,"â"],[50,"â"],[51,"â"],[52,"â"],[53,"â¢"],[57,"â¢"],[58,"Å¡"],[60,"Å"],[61,"â "],[63,"Ÿ"],[118,"â
"],[119,"â
"],[120,"â
"],[121,"â
"],[122,"â"],[123,"â"],[124,"â"],[125,"â"],[126,"â"],[127,"â"]]),r8="black blue green cyan red magenta yellow white".split(" ");function r9(){this.h=[],this.g=[],this.i=new rQ,this.l=0,this.s=new Map([["CC1",new rP(0,0)],["CC2",new rP(0,1)],["CC3",new rP(1,0)],["CC4",new rP(1,1)]]),this.o=this.m=0,this.j=new Map,r7(this)}function r7(e){e.m=0,e.o=0,e=v(e.s.values());for(var t=e.next();!t.done;t=e.next())(t=t.value).h=2,t.g=t.i,t.m=null,rT(t.i),rT(t.l),rT(t.o)}function ae(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function at(){}function an(e,t){var n=null,i=null,r=null,a=e.K();return 1&t&&(r=e.$a()),2&t&&e.skip(4),8&t&&(n=e.K()),16&t&&(i=e.K()),{trackId:a,Ce:n,yf:i,sh:r}}function ai(e,t){return{we:1==t?e.$a():e.K()}}
1function ar(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),{timescale:e.K()}}function aa(e,t,n){var i=e.K(),r=[],a=null;1&n&&(a=e.K()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={ge:null,sampleSize:null,gd:null};256&n&&(s.ge=e.K()),512&n&&(s.sampleSize=e.K()),1024&n&&e.skip(4),2048&n&&(s.gd=0==t?e.K():e.Pe()),r.push(s)}return{yh:i,Re:r,xf:a}}function ao(){this.j=new Map,this.i=this.h=0,this.g=as}at.prototype.init=function(){},at.prototype.parse=function(){return[]},ao.prototype.init=function(e){function t(e){(e=e.name)in ac&&(n.g=ac[e])}var n=this,i=[],r=[];if((new iv).box("moov",iy).box("mvex",iy).P("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.K(),t=t.K(),n.h=e,n.i=t}).box("trak",iy).P("tkhd",function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4)),e=t.K(),i.push(e)}).box("mdia",iy).P("mdhd",function(e){e=ar(e.reader,e.version),r.push(e.timescale)}).box("minf",iy).box("stbl",iy).P("stsd",ib).box("avc1",t).box("avc3",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("encv",iw).box("sinf",iy).box("frma",function(e){(e=iS(e=e.reader.K()))in ac&&(n.g=ac[e])}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new ej(2,2,2010);this.g==as&&ee("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},ao.prototype.parse=function(e){var t=this;if(this.g==as)return[];var n=[],i=this.h,r=this.i,a=0,o=[],s=null,u=9e4;return(new iv).box("moof",function(e){a=e.start,o=[],iy(e)}).box("traf",iy).P("trun",function(e){e=aa(e.reader,e.version,e.flags),o.push(e)}).P("tfhd",function(e){i=(e=an(e.reader,e.flags)).Ce||t.h,r=e.yf||t.i,e=e.trackId,t.j.has(e)&&(u=t.j.get(e))}).P("tfdt",function(e){s=ai(e.reader,e.version).we}).box("mdat",function(e){if(null===s)throw ee("Unable to find base media decode time for CEA captions!"),new ej(2,2,2010);!function(e,t,n,i,r,a,o,s,u){var l=0,c=a,d=s.map(function(e){return e.Re});for((d=[].concat.apply([],y(d))).length&&(c=d[0].sampleSize||a),t.skip(o+s[0].xf);t.ia();){o=t.K();var h=t.Sa(),f=null;switch(f=!1,s=1,e.g){case au:f=6==(f=31&h);break;case al:s=2,t.skip(1),f=39==(f=h>>1&63)||40==f;break;default:return}if(f)for(h=0,l<d.length&&(h=d[l].gd||0),h=(n+h)/i,f=(s=v(function(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(y(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(i=0,e=n;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}(t.Za(o-s)))).next();!f.done;f=s.next())u.push({kg:f.value,pts:h});else try{t.skip(o-s)}catch(e){break}0==(c-=o+4)&&(n=l<d.length?n+(d[l].ge||r):n+r,c=++l<d.length&&d[l].sampleSize||a)}}(t,e.reader,s,u,i,r,a-e.start-8,o,n)}).parse(e,!1),n};var as=0,au=1,al=2,ac={avc1:1,avc3:1,hev1:2,hvc1:2,dvh1:2,dvhe:2};function ad(e){this.h=new at,e.includes("video/mp4")&&(this.h=new ao),this.g=new r9}function ah(e,t,n,i,r,a){this.ya=e,this.Ba=t,this.ma=n,this.Qd=void 0===i?null:i,this.timescale=void 0===r?null:r,this.m=void 0===a?null:a}function af(e,t,n,i,r,a,o,s,u,l,c,d,h,f,p){l=void 0===l?[]:l,f=void 0===f?ap:f,this.startTime=e,this.j=this.endTime=t,this.A=n,this.Ba=i,this.ma=r,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.i=l,this.tilesLayout=void 0===c?"":c,this.s=void 0===d?null:d,this.g=void 0===h?null:h,this.status=f,this.u=!1,this.m=void 0===p?null:p,this.o=null,this.l=0}ad.prototype.init=function(e){this.h.init(e)},ah.prototype.mc=function(){return this.Ba},ah.prototype.ic=function(){return this.ma},W("shaka.media.InitSegmentReference",ah),ah.prototype.getEndByte=ah.prototype.ic,ah.prototype.getStartByte=ah.prototype.mc,(b=af.prototype).ya=function(){return this.A()},b.getStartTime=function(){return this.startTime},b.Ff=function(){return this.endTime},b.mc=function(){return this.Ba},b.ic=function(){return this.ma},b.Wf=function(){return this.tilesLayout},b.Vf=function(){return this.s},b.Fb=function(){return this.status},b.dg=function(){this.status=ag},b.Me=function(){this.u=!0},b.bg=function(){return this.u},b.Ze=function(e){this.o=e},b.Tf=function(){return this.o},b.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=v(this.i),n=t.next();!n.done;
1n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},b.oe=function(e){null==this.g?Z("Sync attempted without sync time!"):.001<=Math.abs(e=this.g-e-this.startTime)&&this.offset(e)},W("shaka.media.SegmentReference",af),af.prototype.syncAgainst=af.prototype.oe,af.prototype.offset=af.prototype.offset,af.prototype.getThumbnailSprite=af.prototype.Tf,af.prototype.setThumbnailSprite=af.prototype.Ze,af.prototype.isPreload=af.prototype.bg,af.prototype.markAsPreload=af.prototype.Me,af.prototype.markAsUnavailable=af.prototype.dg,af.prototype.getStatus=af.prototype.Fb,af.prototype.getTileDuration=af.prototype.Vf,af.prototype.getTilesLayout=af.prototype.Wf,af.prototype.getEndByte=af.prototype.ic,af.prototype.getStartByte=af.prototype.mc,af.prototype.getEndTime=af.prototype.Ff,af.prototype.getStartTime=af.prototype.getStartTime,af.prototype.getUris=af.prototype.ya;var ap=0,ag=1;function am(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null}function av(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function ay(e,t){return!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t>=e.start(0)}function ab(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;var n=0;e=v(aw(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,(r=r.end)>t&&(n+=r-Math.max(i,t))}return n}function aw(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function aT(){}function ax(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function aS(e){for(var t=0,n=[];t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9];){var i=ax(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),a=ax(r,4);(a=function(e){var t={key:e.type,description:"",data:""};if("TXXX"===e.type){if(2>e.size||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=tm(eP(e.data,1,n));return e=tm(eP(e.data,2+n)).replace(/\0*$/,""),t.description=i,t.data=e,t}return"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(n=e.data.subarray(1).indexOf(0))?null:(i=tm(eP(e.data,1,n)),e=tm(eP(e.data,2+n)).replace(/\0*$/,""),t.description=i,t.data=e,t):"PRIV"===e.type?2>e.size||-1===(i=e.data.indexOf(0))?null:(i=tm(eP(e.data,0,i)),e=eN(e.data.subarray(i.length+1)),t.description=i,t.data=e,t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(t.data=e=tm(e.data.subarray(1)).replace(/\0*$/,""),t):"W"===e.type[0]?(t.data=e=tm(e.data).replace(/\0*$/,""),t):e.data?(t.data=eN(e.data),t):null}(r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:a,data:r.subarray(10,10+a)}))&&n.push(a),t+=r.size+10}t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]&&(t+=10)}return n}function aE(){this.m=null,this.o=!1,this.s=this.i=null,this.A=[],this.j=this.g=null,this.u=[],this.l=null,this.h=[]}function aA(e){if(1!=(e[0]<<16|e[1]<<8|e[2]))return null;var t={data:new Uint8Array(0),xh:6+(e[4]<<8|e[5]),pts:null,dts:null},n=e[7];return 192&n&&(t.pts=0x20000000*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,t.dts=t.pts,64&n&&(t.dts=0x20000000*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)),t.data=e.subarray(9+e[8]),t}function ak(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return -1}
1function aI(e,t,n){this.g=null,this.i=-1,this.j=e,this.h=t,this.l=n,"undefined"==typeof libDPIModule&&ee("Could not Find LCEVC Library dependencies on this page"),"undefined"==typeof LcevcDil?ee("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||ee(LcevcDil.SupportObject.SupportError),"undefined"!=typeof LcevcDil&&"undefined"!=typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&(this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}function aC(e,t){var n=aM;switch(t.mimeType){case"video/webm":n=aD;break;case"video/mp4":n=aR}e.g&&(e.i=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(n))}af.Status={Jg:0,ph:1,Xg:2},W("shaka.util.Id3Utils",aT),aT.getID3Frames=aS,aE.prototype.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,ak(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(71===e[r]){var a=!!(64&e[r+1]),o=((31&e[r+1])<<8)+e[r+2];if(1<(48&e[r+3])>>4){var s=r+5+e[r+4];if(s===r+188)continue}else s=r+4;switch(o){case 0:a&&(s+=e[s]+1),this.m=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.m:a&&(s+=e[s]+1),o={audio:-1,video:-1,Xc:-1,audioCodec:"",videoCodec:""};var u=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<u;
1){var l=(31&a[s+1])<<8|a[s+2];switch(a[s]){case 15:-1===o.audio&&(o.audio=l,o.audioCodec="aac");break;case 21:-1===o.Xc&&(o.Xc=l);break;case 27:-1===o.video&&(o.video=l,o.videoCodec="avc");break;case 3:case 4:-1===o.audio&&(o.audio=l,o.audioCodec="mp3");break;case 36:-1===o.video&&(o.video=l,o.videoCodec="hvc")}s+=((15&a[s+3])<<8|a[s+4])+5}-1!=(a=o).video&&(this.s=a.video),-1!=a.audio&&(this.j=a.audio),-1!=a.Xc&&(this.l=a.Xc),i&&!this.o&&(i=!1,r=t-188),this.o=!0;break;case this.s:a=e.subarray(s,r+188),null==this.i&&(s=aA(a))&&null!=s.pts&&(this.i=s.pts/9e4),this.A.push(a);break;case this.j:a=e.subarray(s,r+188),null==this.g&&(s=aA(a))&&null!=s.pts&&(this.g=s.pts/9e4),this.u.push(a);break;case this.l:this.h.push(e.subarray(s,r+188));break;default:i=!0}}return this},aE.prototype.getStartTime=function(){return{audio:this.g,video:this.i}},W("shaka.util.TsParser",aE),aI.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},W("shaka.lcevc.Dil",aI),aI.prototype.release=aI.prototype.release;var aM=0,aD=1,aR=2;function aN(e,t,n,i){var r,a,o,s=this;this.l=e,this.G=null,this.m=t,this.h={},this.L={},this.O={},this.g=null,this.H=!1,this.V=n||function(){},this.F=i||null,this.i={},this.u=new is,this.o={},this.s=null,this.J=new e9,this.M="",this.j=(r=this,a=this.J,o=new MediaSource,r.u.ca(o,"sourceopen",function(){URL.revokeObjectURL(r.M),a.resolve()}),r.M=aY(o),r.l.src=r.M,o),this.D=new ia(function(){var e,t,n,i,r,a,o,u;return e=s,F(function(s){if(1==s.g){for(n in t=[],e.i)for(r=(i=e.i[n])[0],e.i[n]=i.slice(0,1),r&&t.push(r.p.catch(eZ)),o=(a=v(i.slice(1))).next();!o.done;o=a.next())o.value.p.reject(new ej(2,7,7003,void 0));for(u in e.g&&t.push(e.g.destroy()),e.m&&t.push(e.m.destroy()),e.o)t.push(e.o[u].destroy());return C(s,Promise.all(t),2)}e.u&&(e.u.release(),e.u=null),e.l&&(e.l.removeAttribute("src"),e.l.load(),e.l=null),e.G=null,e.j=null,e.g=null,e.m=null,e.h={},e.o={},e.s=null,e.i={},e.F=null,M(s)})}),this.A=!1,this.W=new e9}function aP(e,t,n,i){e.g||(e.g=new tK(e.m));var r=e.g;e=i||e.H,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=(0,tz[t])(),r.i.setSequenceMode?r.i.setSequenceMode(n):ee('Text parsers should have a "setSequenceMode" method!'),r.u=e)}function aL(e){return!e.j||"ended"==e.j.readyState}function a_(e,t){return t==e5?e.g.g:am(aO(e,t))}function aj(e,t){return t==e5?e.g.h:av(aO(e,t))}function aO(e,t){try{return e.h[t].buffered}catch(e){return null}}function aU(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g,m,b,w,T,x,S,E,A,k,I,D,R,N;return a=void 0!==a&&a,o=void 0!==o&&o,F(function(P){var L,_,j,O,U,B,V,H,K,q,G,X,z,W;switch(P.g){case 1:if(t!=(s=e6).Y){P.B(2);break}if(!e.A){P.B(3);break}return C(P,e.W,4);case 4:u=P.h,e.g.s=u;case 3:return C(P,(L=e.g,_=n,j=i?i.startTime:null,O=i?i.endTime:null,F(function(e){return 1==e.g?C(e,Promise.resolve(),2):L.i&&L.j?null==j||null==O?(L.i.parseInit(eP(_)),e.return()):void(U=L.u?j:L.s,B={periodStart:L.s,segmentStart:j,segmentEnd:O,vttOffset:U},V=L.i.parseMedia(eP(_),B).filter(function(e){return e.startTime>=L.l&&e.startTime<L.m}),L.j.append(V),null==L.g&&(L.g=Math.max(j,L.l)),L.h=Math.min(O,L.m),M(e)):e.return()})),5);case 5:return P.return();case 2:if(l=eP(n),c=e.L[t],e.o[t]&&(c=e.o[t].o),0>ak(l)?aJ.includes(c)&&(p=aS(l)).length&&i&&(g={cueTime:i.startTime,data:l,frames:p,dts:i.startTime,pts:i.startTime},e.V([g],0,i.endTime)):(d=(new aE).parse(l),h=i.startTime-(d.getStartTime()[t]||0),(f=function(e){for(var t=[],n=new Uint8Array(0),i=e.h.length-1;0<=i;i--){var r=aA(n=tC(e.h[i],n));r&&(t.unshift({cueTime:r.pts?r.pts/9e4:null,data:r.data,frames:aS(r.data),dts:r.dts,pts:r.pts}),n=new Uint8Array(0))}return t}(d)).length&&e.V(f,h,i?i.endTime:null)),!e.o[t]){r&&t==s.va&&(e.g||aP(e,"application/cea-608",e.A,!1),e.s||(e.s=new ad(c)),i?(m=function(e,t){t=v(t=e.h.parse(t));for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=eP(i.kg);if(0<r.length&&(n=e.g,i=i.pts,181===(r=new ip(r,0)).Sa()&&49===r.be()&&0x47413934===r.K()&&3===r.Sa())){var a=r.Sa();if(0!=(64&a)){a&=31,r.skip(1);for(var o=0;o<a;o++){var s=r.Sa(),u=(4&s)>>2,l=r.Sa(),c=r.Sa();u&&(0==(s&=3)||1===s?n.h.push({pts:i,type:s,xa:l,La:c,order:n.h.length}):(n.g.push({pts:i,type:s,value:l,order:n.g.length}),n.g.push({pts:i,type:2,value:c,order:n.g.length})))}}}}return function(e){function t(e,t){return e.pts-t.pts||e.order-t.order}var n,i,r=[];e.h.sort(t),e.g.sort(t);for(var a=v(e.h),o=a.next();!o.done;o=a.next())(o=function(e,t){var n=t.type;if(16==(112&t.xa)){var i=t.xa>>3&1;0===n?e.m=i:e.o=i}if(n=e.s.get("CC"+(n<<1|(n?e.o:e.m)+1)),255===t.xa&&255===t.La||!t.xa&&!t.La||!ae(t.xa)||!ae(t.La))return 45<=++e.l&&r7(e),null;if(e.l=0,t.xa&=127,t.La&=127,!t.xa&&!t.La)return null;if(e=null,16==(112&t.xa))e:{if(i=t.xa,e=t.La,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,16==(240&i)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|e>>5&1];var r=(30&e)>>1;i="white";var a=!1;if(7>r?i=rH[r]:7===r&&(a=!0),e=1==(1&e),n.h!==rF){if(r=n.g,n.h===rB&&t!==r.g){var o=1+t-r.h;rS(r,o,1+r.g-r.h,r.h),rE(r,0,o-1),rE(r,t+1,15-t)}r.g=t,n.g.m=e,n.g.j=a,n.g.l=i,n.g.o="black"}}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",rx(n.g,rA,32),i=!1,"white_italics"===(t=rH[(14&e)>>
11])&&(t="white",i=!0),n.g.m=1==(1&e),n.g.j=i,n.g.l=t;else if(16==(247&i)&&32==(240&e)||23==(247&i)&&45==(255&e))t="black",0==(7&i)&&(t=rV[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))rx(n.g,rk,e);else if(18==(246&i)&&32==(224&e))rx(n.g,1&i?rC:rI,e);else if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.La){case 32:r_(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=rL(n,2,e);break;case 38:i=rL(n,3,e);break;case 39:i=rL(n,4,e);break;case 40:rx(n.g,rA,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=e;break;case 42:rT(n.o),rj(n);break;case 43:rj(n);break;case 44:t=n.i,i=null,n.h!==rF&&(i=rw(t,n.j,e)),rE(t,0,15);break;case 45:t=n.g,n.h!==rB?i=null:(i=rw(t,n.j,e),a=t.g-t.h+1,rS(t,a-1,a,t.h),rE(t,0,a-1),rE(t,t.g,15-t.g),n.j=e);break;case 46:rE(n.l,0,15);break;case 47:t=null,n.h!==rF&&(t=rw(n.i,n.j,e)),i=n.l,n.l=n.i,n.i=i,r_(n),n.j=e,i=t}e=i;break e}e=null}else i=t.La,rx(n.g,rA,t.xa),rx(n.g,rA,i);return e}(e,o.value))&&r.push(o);for(o=(a=v(e.g)).next();!o.done;o=a.next())n=e.i,3===(i=o.value).type?(n.g=2*(63&i.value)-1,n.h=[]):n.h&&(0<n.g&&(n.h.push(i),n.g--),0===n.g&&(n.i.push(new rZ(n.h)),n.h=null,n.g=0));for(o=(a=v(e.i.i)).next();!o.done;o=a.next())o=function(e,t){var n=[];try{for(;t.ia();){var i=r0(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&r0(t).value),0!=r){e.j.has(r)||e.j.set(r,new r1(r));for(var o=e.j.get(r),s=t.$();t.$()-s<a;){r=t;var u=r0(r),l=u.value,c=u.pts;if(16===l){var d=r0(r);l=l<<16|d.value}if(0<=l&&31>=l){var h=c;if(o.g){var f=o.g;switch(r=null,l){case 8:!rz(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.A-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(r=rW(f,h,o.i)),f.h+1>=f.F){h=f;for(var p=0,g=1;16>g;g++,p++)h.i[p]=h.i[g];for(g=0;1>g;g++,p++)h.i[p]=rG()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(r=rW(f,h,o.i)),f.i[f.h]=rG(),f.g=0;break;case 12:f.isVisible()&&(r=rW(f,h,o.i)),rq(f),(h=f).h=0,h.g=0}var m=r}else m=null}else if(128<=l&&159>=l)m=function(e,t,n,i){if(128<=n&&135>=n)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=r0(t).value,t=null,n=v(r2(e,n));for(var r=n.next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=rW(r,i,e.i)),rq(r);return t}if(137===n)for(n=(t=v(r2(e,t=r0(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.l=!0;else{if(138===n){for(n=r0(t).value,t=null,r=(n=v(r2(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=rW(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=r0(t).value,t=null,r=(n=v(r2(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=rW(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return r4(e,t=r0(t).value,i);if(143===n)return i=r4(e,255,i),r3(e),i;if(144===n)t.skip(1),i=r0(t).value,e.g&&(e.g.o=0<(128&i),e.g.u=0<(64&i));
1else if(145===n)i=r0(t).value,n=r0(t).value,t.skip(1),e.g&&(t=r5((48&n)>>4,(12&n)>>2,3&n),e.g.s=r5((48&i)>>4,(12&i)>>2,3&i),e.g.m=t);else if(146===n)i=r0(t).value,t=r0(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),i=r0(t).value,t.skip(1),e.g&&(e.g.D=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new rK;a.j=i,e.h[n]=a}i=r0(t).value,r0(t),r0(t),a=r0(t).value;var o=r0(t).value;t=r0(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.u=!1,t.o=!1,t.s="white",t.m="black"),(t=e.h[n]).l=0<(32&i),t.F=(15&a)+1,t.A=(63&o)+1,e.g=e.h[n]}}}return null}(o,r,l,c);else{if(4096<=l&&4127>=l)h=255&l,8<=h&&15>=h?r.skip(1):16<=h&&23>=h?r.skip(2):24<=h&&31>=h&&r.skip(3);else if(4224<=l&&4255>=l)h=255&l,128<=h&&135>=h?r.skip(4):136<=h&&143>=h&&r.skip(5);else if(32<=l&&127>=l)r=l,o.g&&(127===r?rX(o.g,"âª"):rX(o.g,String.fromCharCode(r)));else if(160<=l&&255>=l)o.g&&rX(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(r=255&l,o.g)if(r6.has(r)){var y=r6.get(r);rX(o.g,y)}else rX(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&(160!=(255&l)?rX(o.g,"_"):rX(o.g,"[CC]"));m=null}(r=m)&&n.push(r)}}}}catch(e){if(e instanceof ej&&3e3===e.code)et("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(e,o.value),r.push.apply(r,y(o));return e.i.i=[],e.h=[],e.g=[],r}(e.g)}(e.s,n)).length&&(b=e.h[s.va].timestampOffset,tX(e.g,m,i.startTime,i.endTime,b)):e.s.init(n)),P.B(6);break}return a&&e.o[t].g.resetCaptions(),C(P,(H=e.o[t],K=n,H.j=!0,H.h=new e9,H.l=[],H.i=[],K=eP(K),H.g.push(K),H.g.flush(),H.j&&H.h.reject(new ej(2,3,3018)),H.h),7);case 7:w=P.h,e.g||aP(e,"application/cea-608",e.A,!1),w.captions&&w.captions.length&&(T=e.h[s.va].timestampOffset,x=function(e){var t=[];e=v(e);for(var n=e.next();!n.done;n=e.next())t.push({stream:(n=n.value).stream,cue:new ec(n.startTime,n.endTime,n.text)});return t}(w.captions),tX(e.g,x,i?i.startTime:null,i?i.endTime:null,T)),n=w.data;case 6:if(q=e,G=n,X=i?i.startTime:null,z=t,W=q.O[z],null==X&&W&&(to()||ta())&&"mp4"==q.L[z].split(";")[0].split("/")[1]&&(G=function(e){function t(){r=!0}function n(e){a.push(e),iy(e)}e=eP(e);var i,r=!1,a=[],o=[];if((new iv).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).P("stsd",function(e){i=e,a.push(e),ib(e)}).P("encv",t).P("enca",t).P("hev1",function(e){o.push({box:e,mb:0x656e6376})}).P("hvc1",function(e){o.push({box:e,mb:0x656e6376})}).P("avc1",function(e){o.push({box:e,mb:0x656e6376})}).P("avc3",function(e){o.push({box:e,mb:0x656e6376})}).P("ac-3",function(e){o.push({box:e,mb:0x656e6361})}).P("ec-3",function(e){o.push({box:e,mb:0x656e6361})}).P("mp4a",function(e){o.push({box:e,mb:0x656e6361})}).parse(e),r)return e;if(0==o.length||!i)throw tI(e),new ej(2,3,3019);o.reverse();for(var s=v(o),u=s.next();!u.done;u=s.next())u=u.value,e=function(e,t,n,i,r){var a=rp.value(),o=e.subarray(n.start,n.start+n.size),s=eL(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=eL(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),rf(u,0,u.byteLength),r=new
1Uint8Array(e.byteLength+u.byteLength),n=ta()?n.start:n.start+n.size,a=e.subarray(n),r.set(e.subarray(0,n)),r.set(u,n),r.set(a,n+u.byteLength),i=(e=v(i)).next();!i.done;i=e.next())rf(r,(i=i.value).start,i.size+u.byteLength);return u=eL(r,t.start),t=iE(t),e=u.getUint32(t),u.setUint32(t,e+1),r}(e,i,u.box,a,u.mb);return e}(G)),n=G,S=e.h[t],E=a$,!e.A||S.mode==E||!i){P.B(8);break}if(A=e.j.duration,t!=s.va&&s.va in e.h){P.B(9);break}return k=[S.appendWindowStart,S.appendWindowEnd],S.appendWindowStart=0,S.appendWindowEnd=1/0,I=S.timestampOffset,S.timestampOffset=0,C(P,aG(e,t,function(){return aF(e,t,n)}),10);case 10:return C(P,aG(e,t,function(){return aH(e,t)}),11);case 11:return S.timestampOffset=I,S.appendWindowStart=k[0],S.appendWindowEnd=k[1],D=am(aO(e,t)),R=(i.startTime||0)-(D||0),e.W.resolve(R),C(P,aG(e,t,function(){return aV(e,t,0,A)}),12);case 12:if(t!=s.va){P.B(9);break}return C(P,aG(e,t,function(){e.l.currentTime-=.001,aq(e,t)}),9);case 9:return S.mode=E,C(P,e.Aa(A),8);case 8:return i&&e.A&&t!=s.Y&&(a||o)&&(N=i.startTime,aG(e,t,function(){return aH(e,t)}),aG(e,t,function(){return aK(e,t,N)})),C(P,aG(e,t,function(){aF(e,t,n)}),16);case 16:M(P)}})}function aB(e,t){return F(function(n){return t==e6.Y?e.g?C(n,e.g.remove(0,1/0),0):n.return():C(n,aG(e,t,function(){return aV(e,t,0,e.j.duration)}),0)})}function aF(e,t,n){if("video"==t&&e.F){var i=e.F;i.g&&i.g.appendBuffer(n,"video",i.i)}e.h[t].appendBuffer(n)}function aV(e,t,n,i){i<=n?aq(e,t):e.h[t].remove(n,i)}function aH(e,t){var n=e.h[t].appendWindowStart,i=e.h[t].appendWindowEnd;e.h[t].abort(),e.h[t].appendWindowStart=n,e.h[t].appendWindowEnd=i,aq(e,t)}function aK(e,t,n){0>n&&(n+=.001),e.h[t].timestampOffset=n,aq(e,t)}function aq(e,t){var n=e.i[t][0];n&&(n.p.resolve(),az(e,t))}function aG(e,t,n){return io(e.D),n={start:n,p:new e9},e.i[t].push(n),1==e.i[t].length&&aW(e,t),n.p}function aX(e,t){var n,i,r,a,o;return F(function(s){switch(s.g){case 1:for(r in io(e.D),n=[],i={},e.h)i.Vb=new e9,a={start:function(e){return function(){return e.Vb.resolve()}}(i),p:i.Vb},e.i[r].push(a),n.push(i.Vb),1==e.i[r].length&&a.start(),i={Vb:i.Vb};return D(s,2),C(s,Promise.all(n),4);case 4:N(s,3);break;case 2:throw P(s);case 3:try{t()}catch(e){throw new ej(2,3,3015,e)}finally{for(o in e.h)az(e,o)}M(s)}})}function az(e,t){e.i[t].shift(),aW(e,t)}function aW(e,t){var n=e.i[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new ej(2,3,3017,t)):n.p.reject(new ej(2,3,3015,i)),az(e,t)}}(b=aN.prototype).destroy=function(){return this.D.destroy()},b.init=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d=this;return F(function(h){if(1==h.g)return i=e6,C(h,d.J,2);for(d.A=n,r={},o=(a=v(e.keys())).next();!o.done;r={oa:r.oa},o=a.next())if(r.oa=o.value,u=tU((s=e.get(r.oa)).mimeType,s.codecs),r.oa==i.Y)aP(d,u,n,s.external);else{!t&&er(u)||!tP(u,r.oa)||(d.o[r.oa]=new tN(u),u=t_(r.oa,u)),l=u+d.G.sourceBufferExtraFeatures,io(d.D),c=void 0;try{c=d.j.addSourceBuffer(l)}catch(e){throw new ej(2,3,3015,e,"The mediaSource_ status was"+d.j.readyState+"expected 'open'")}d.u.C(c,"error",function(e){return function(){d.i[e.oa][0].p.reject(new ej(2,3,3014,d.l.error?d.l.error.code:0))}}(r)),d.u.C(c,"updateend",function(e){return function(){return aq(d,e.oa)}}(r)),d.h[r.oa]=c,d.L[r.oa]=u,d.i[r.oa]=[],d.O[r.oa]=!!s.drmInfos.length}M(h)})},b.configure=function(e){this.G=e},b.Ma=function(){var e={total:aw(this.l.buffered),audio:aw(aO(this,"audio")),video:aw(aO(this,"video")),text:[]};if(this.g){var t=this.g.g,n=this.g.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},b.remove=function(e,t,n){var i=this;return F(function(r){return e==e6.Y?C(r,i.g.remove(t,n),0):C(r,aG(i,e,function(){return aV(i,e,t,n)}),0)})},b.flush=function(e){var t=this;return F(function(n){return e==e6.Y?n.return():C(n,aG(t,e,function(){t.l.currentTime-=.001,aq(t,e)}),0)})},b.endOfStream=function(e){var t=this;return F(function(n){return C(n,aX(t,function(){aL(t)||"closed"===t.j.readyState||(e?t.j.endOfStream(e):t.j.endOfStream())}),0)})},b.Aa=function(e){var t=this;return F(function(n){return C(n,aX(t,function(){if(e<t.j.duration)for(var n in t.h){var i={start:function(){},p:new e9};t.i[n].unshift(i)}t.j.duration=e}),0)})},b.getDuration=function(){return this.j.duration};var aY=e.URL.createObjectURL,a$="sequence",aJ=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function aQ(e,t,n){this.i=e,this.m=t,this.o=this.j=1/0,this.g=1,this.h=this.l=null,this.s=0,this.u=!0,this.A=0,this.D=void 0===n||n,this.F=0,this.G=!1}function aZ(e,t,n){this.l=n,this.j=e,this.s=a1(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.u=t,this.i=function(){}}function a0(e){this.g=e}function a1(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=v(aw(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function a2(e,t,n,i,r){var a=this;this.s=r,this.g=e,this.u=t,this.F=n,this.l=new is,this.j=!1,this.D=e.readyState,this.A=this.i=0,this.h=i,this.o=!1,this.l.C(e,"waiting",function(){return a4(a)}),this.m=new tt(function(){a4(a)}).Ca(.25)}function a4(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.j)return}else e.j=!1;if(!e.g.paused||e.g.currentTime==e.i&&(e.g.autoplay||e.g.currentTime!=e.i)){if(e.g.readyState!=e.D&&(e.D=e.g.readyState),!(r=!e.h)){var t,n,i,r=e.h,a=r.j,o=a1(a),s=a.g.currentTime,u=Date.now()/1e3;
1(r.g!=s||r.s!=o)&&(r.m=u,r.g=s,r.s=o,r.h=!1),(o=(s=u-r.m)>=r.u&&o&&!r.h)&&(r.i(r.g,s),r.h=!0,r.g=a.g.currentTime,r.o++,r.l(new nQ("stalldetected"))),r=!o}r&&(r=e.g.currentTime,t=a=e.g.buffered,n=r,i=e.F.gapDetectionThreshold,null==(o=!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)?null:0<=(t=aw(t).findIndex(function(e,t,r){return e.start>n&&(0==t||r[t-1].end-n<=i)}))?t:null)||0==o&&!e.o||(s=a.start(o))>=e.u.Na()||.001>s-r||(0!=o&&a.end(o-1),e.g.currentTime=s,r==e.i&&(e.i=s),e.A++,e.s(new nQ("gapjumped"))))}}}function a3(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=a5.value().get(t),n.ca(e,t,i))}(b=aQ.prototype).getDuration=function(){return this.j},b.Lf=function(){return this.g},b.Ye=function(e){this.i=e},b.Aa=function(e){this.j=e},b.Qf=function(){return this.i},b.We=function(e){this.s=e},b.zc=function(e){this.u=e},b.ne=function(e){this.o=e},b.Xe=function(e){this.m=e},b.Ef=function(){return this.m},b.Jb=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.s)/1e3;e=v(e);for(var r=e.next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.g=Math.max(this.g,r.endTime-r.startTime));this.Vd(t),this.h=Math.max(this.h,n),null!=this.i&&this.D&&!this.G&&(this.i=i-this.h-this.g)}},b.Od=function(){this.G=!0},b.Vd=function(e){this.l=null==this.l?e:Math.min(this.l,e)},b.Ud=function(e){this.g=Math.max(this.g,e)},b.offset=function(e){null!=this.l&&(this.l+=e),null!=this.h&&(this.h+=e)},b.T=function(){return 1/0==this.j&&!this.u},b.jb=function(){return 1/0!=this.j&&!this.u},b.Oa=function(){return Math.max(this.A,this.gb()-this.o)},b.$e=function(e){this.A=e},b.gb=function(){return this.T()||this.jb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j},b.lc=function(e){var t=Math.max(this.l,this.A);return 1/0==this.o?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.gb()-this.o+e,this.Na()))},b.Eb=function(){return this.lc(0)},b.Na=function(){return Math.max(0,this.gb()-(this.T()||this.jb()?this.m:0))},b.ef=function(){return null!=this.i&&(null==this.h||!this.D)},b.Ve=function(e){this.F=e},W("shaka.media.PresentationTimeline",aQ),aQ.prototype.setAvailabilityTimeOffset=aQ.prototype.Ve,aQ.prototype.usingPresentationStartTime=aQ.prototype.ef,aQ.prototype.getSeekRangeEnd=aQ.prototype.Na,aQ.prototype.getSeekRangeStart=aQ.prototype.Eb,aQ.prototype.getSafeSeekRangeStart=aQ.prototype.lc,aQ.prototype.getSegmentAvailabilityEnd=aQ.prototype.gb,aQ.prototype.setUserSeekStart=aQ.prototype.$e,aQ.prototype.getSegmentAvailabilityStart=aQ.prototype.Oa,aQ.prototype.isInProgress=aQ.prototype.jb,aQ.prototype.isLive=aQ.prototype.T,aQ.prototype.offset=aQ.prototype.offset,aQ.prototype.notifyMaxSegmentDuration=aQ.prototype.Ud,aQ.prototype.notifyMinSegmentStartTime=aQ.prototype.Vd,aQ.prototype.lockStartTime=aQ.prototype.Od,aQ.prototype.notifySegments=aQ.prototype.Jb,aQ.prototype.getDelay=aQ.prototype.Ef,aQ.prototype.setDelay=aQ.prototype.Xe,aQ.prototype.setSegmentAvailabilityDuration=aQ.prototype.ne,aQ.prototype.setStatic=aQ.prototype.zc,aQ.prototype.setClockOffset=aQ.prototype.We,aQ.prototype.getPresentationStartTime=aQ.prototype.Qf,aQ.prototype.setDuration=aQ.prototype.Aa,aQ.prototype.setPresentationStartTime=aQ.prototype.Ye,aQ.prototype.getMaxSegmentDuration=aQ.prototype.Lf,aQ.prototype.getDuration=aQ.prototype.getDuration,aZ.prototype.release=function(){this.l=this.j=null,this.i=function(){}},a2.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.u=this.s=null},a2.prototype.Yd=function(){this.o=!0,a4(this)};var a5=new e7(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function a6(e,t,n,i){var r=this;this.g=e,this.l=t,this.o=n,this.j=i,this.m=!1,this.h=new is,this.i=new ot(e),a3(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){a7(r,r.j)})}function a8(e){return e.m?e.g.currentTime:e.j}function a9(e,t){0<e.g.readyState?on(e.i,t):a3(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){a7(e,e.j)})}function a7(e,t){.001>Math.abs(e.g.currentTime-t)?oe(e):(e.h.ca(e.g,"seeking",function(){oe(e)}),on(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function oe(e){e.m=!0,e.h.C(e.g,"seeking",function(){return e.l()}),e.o(e.g.currentTime)}function ot(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new tt(function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)})}function on(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Ca(.1)}function oi(e){this.g=e,this.j=!1,this.h=null,this.i=new is}function or(e,t,n,i,r,a){var o,s,u=this;this.i=e,this.g=t.presentationTimeline,this.A=t.minBufferTime||0,this.l=n,this.u=r,this.s=null,this.o=function(e,t,n){if(!t.stallEnabled)return null;var i=t.stallSkip;return(t=new aZ(new a0(e),t.stallThreshold,n)).i=function(){i?e.currentTime+=i:(e.pause(),e.play())},t}(e,n,a),this.j=new a2(e,t.presentationTimeline,n,this.o,a),this.h=new a6(e,function(){e:{var e=u.j;e.j=!0,e.o=!1;var t=a8(u.h);if(.001<Math.abs((e=oo(u,t))-t)&&(t=Date.now()/1e3,!u.s||u.s<t-1)){u.s=t,a9(u.h,e),e=void 0;break e}u.u(),e=void 0}return e},function(e){var t=u.j;t.g.seeking&&!t.j&&(t.j=!0,t.i=e)},(o=this,null==(s=i)?s=1/0>o.g.getDuration()?o.g.Eb():o.g.Na():0>s&&(s=o.g.Na()+s),oa(o,os(o,s)))),this.m=new tt(function(){if(0!=u.i.readyState&&!u.i.paused){var e=a8(u.h),t=u.g.Eb(),n=u.g.Na();3>n-t&&(t=n-3),e<t&&(e=oo(u,e),u.i.currentTime=e)}})}function oa(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function oo(e,t){var n=Math.max(e.A,e.l.rebufferingGoal),i=e.l.safeSeekOffset,r=e.g.Eb(),a=e.g.Na(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.lc(n),u=e.g.lc(i);return n=e.g.lc(n+i),t>=o?oa(e,t):t>a?a:t<r?ay(e.i.buffered,u)?u:n:t>=s||ay(e.i.buffered,t)?t:n}function os(e,t){var n=e.g.Eb();return t<n?n:t>(e=e.g.Na())?e:t}function ou(e){this.g=e,this.h=null,this.i=0,this.j=!1}function ol(e,t,n){return new ou([new af(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function oc(e,t,n){this.i=e,this.g=t,this.h=n}function od(){ou.call(this,[]),this.l=[]}function oh(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Uc(),this.h=new tt(function(){t.g.Ne(.25*t.i)})}function of(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.Uc()!=t&&e.g.me(t);return}catch(e){}e.h.Ca(.25),0!=e.g.Uc()&&e.g.me(0)}function op(e){var t=this;this.h=e,this.g=new Set,this.i=new tt(function(){og(t,!1)}).Ca(.25)}function og(e,t){for(var n=v(e.g),i=n.next();!i.done;i=n.next())i.value.j(e.h.currentTime,t)}function om(e){n1.call(this),this.g=new Map,this.h=e}function ov(e){n1.call(this);var t=this;this.g=new Set,this.i=e,this.h=new tt(function(){for(var e=t.i(),n=v(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime<e.start&&(t.g.delete(i),i=new nQ("regionremove",new Map([["region",i]])),t.dis
1patchEvent(i))}).Ca(2)}function oy(e,t){n1.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{sb:null,rb:oT,ib:function(e,t){return ob(n,"enter",e,t)}},{sb:ow,rb:oT,ib:function(e,t){return ob(n,"enter",e,t)}},{sb:ox,rb:oT,ib:function(e,t){return ob(n,"enter",e,t)}},{sb:oT,rb:ow,ib:function(e,t){return ob(n,"exit",e,t)}},{sb:oT,rb:ox,ib:function(e,t){return ob(n,"exit",e,t)}},{sb:ow,rb:ox,ib:function(e,t){return ob(n,"skip",e,t)}},{sb:ox,rb:ow,ib:function(e,t){return ob(n,"skip",e,t)}}],this.h=new is,this.h.C(this.i,"regionremove",function(e){n.g.delete(e.region)})}function ob(e,t,n,i){t=new nQ(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}a6.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},ot.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},(b=oi.prototype).Cd=function(){var e=this;a3(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){null==e.h||0==e.h?e.j=!0:(e.i.ca(e.g,"seeking",function(){e.j=!0}),e.g.currentTime=Math.max(0,e.g.currentTime+e.h))})},b.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},b.Dd=function(e){this.h=this.j?this.h:e},b.Jc=function(){return(this.j?this.g.currentTime:this.h)||0},b.ue=function(){return 0},b.te=function(){return 0},b.Oe=function(){},(b=or.prototype).Cd=function(){this.m.Ca(.25)},b.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.u=function(){}},b.Dd=function(e){a9(this.h,e)},b.Jc=function(){var e=a8(this.h);return 0<this.i.readyState&&!this.i.paused?os(this,e):e},b.ue=function(){return this.o?this.o.o:0},b.te=function(){return this.j.A},b.Oe=function(){this.j.Yd()},(b=ou.prototype).release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)},b.eg=function(){this.j=!0},b.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},b.get=function(e){return 0==this.g.length||0>(e-=this.i)||e>=this.g.length?null:this.g[e]},b.offset=function(e){if(!this.j)for(var t=v(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},b.qc=function(e){if(!this.j&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(e){return Math.round(1e3*e.startTime)/1e3<t}),this.g.push.apply(this.g,y(e))}},b.Ib=function(e,t){var n=this;e=e.filter(function(e){return e.endTime>t&&(0==n.g.length||e.endTime>n.g[0].startTime)}),this.qc(e),this.eb(t)},b.eb=function(e){if(!this.j){var t=this.g.length;this.g=this.g.filter(function(t){return t.endTime>e}),this.i+=t-this.g.length}},b.Ya=function(e,t,n){if(n=void 0!==n&&n,!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=t)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=e)this.g.shift(),n||this.i++;else break;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new af(e.startTime,t,e.A,e.Ba,e.ma,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.i,e.tilesLayout,e.s,e.g,e.status,e.m),this.g[this.g.length-1].l=e.l)}},b.jd=function(e,t){var n=this;this.j||(this.h&&this.h.stop(),this.h=new tt(function(){var e=t();e?n.g.push.apply(n.g,y(e)):(n.h.stop(),n.h=null)}),this.h.Ca(e))},ou.prototype[Symbol.iterator]=function(){return this.Db(0)},ou.prototype.Db=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),i=-1;if(n&&0<n.i.length)for(var r=n.i.length-1;0<=r;--r){var a=n.i[r];if(e>=a.startTime&&e<a.endTime){t++,i=r-1;break}}return new oc(this,t,i)},W("shaka.media.SegmentIndex",ou),ou.forSingleSegment=ol,ou.prototype.getIteratorForTime=ou.prototype.Db,ou.prototype.updateEvery=ou.prototype.jd,ou.prototype.fit=ou.prototype.Ya,ou.prototype.evict=ou.prototype.eb,ou.prototype.mergeAndEvict=ou.prototype.Ib,ou.prototype.offset=ou.prototype.offset,ou.prototype.get=ou.prototype.get,ou.prototype.find=ou.prototype.find,ou.prototype.markImmutable=ou.prototype.eg,ou.prototype.release=ou.prototype.release,oc.prototype.wf=function(){return this.g},oc.prototype.current=function(){var e=this.i.get(this.g);return e&&0<e.i.length&&e.ya().length&&this.h>=e.i.length&&(this.g++,this.h=0,e=this.i.get(this.g)),e&&0<e.i.length?e.i[this.h
1]:e},oc.prototype.next=function(){var e=this.i.get(this.g);return e&&0<e.i.length?(this.h++,e.ya().length&&this.h==e.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0),{value:e=this.current(),done:!e}},W("shaka.media.SegmentIterator",oc),oc.prototype.next=oc.prototype.next,oc.prototype.current=oc.prototype.current,oc.prototype.currentPosition=oc.prototype.wf,E(od,ou),(b=od.prototype).clone=function(){var e=new od;return e.l=this.l.slice(),e},b.release=function(){for(var e=v(this.l),t=e.next();!t.done;t=e.next())t.value.release();this.l=[]},b.find=function(e){for(var t=0,n=v(this.l),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.i+i.g.length}return null},b.get=function(e){for(var t=0,n=v(this.l),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;t+=i.i+i.g.length}return null},b.offset=function(){},b.qc=function(){},b.eb=function(){},b.Ib=function(){},b.Ya=function(){},b.jd=function(){},W("shaka.media.MetaSegmentIndex",od),od.prototype.updateEvery=od.prototype.jd,od.prototype.fit=od.prototype.Ya,od.prototype.mergeAndEvict=od.prototype.Ib,od.prototype.evict=od.prototype.eb,od.prototype.merge=od.prototype.qc,od.prototype.offset=od.prototype.offset,od.prototype.get=od.prototype.get,od.prototype.find=od.prototype.find,od.prototype.release=od.prototype.release,oh.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},oh.prototype.set=function(e){this.i=e,of(this)},oh.prototype.Qc=function(){return this.g.Qc()},op.prototype.release=function(){this.i.stop();for(var e=v(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},E(om,n1),om.prototype.release=function(){this.g.clear(),n1.prototype.release.call(this)},om.prototype.j=function(e){for(var t=v(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;e:{for(var i=n.sc,r=i.length-1;0<=r;r--){var a=i[r];if(a.position<=e){i=a.Qd;break e}}i=null}if((r=i)&&(r=!((r=n.Ae)===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width)),r)e:{if(r=e,a=i.contentType,(a=this.h()[a])&&0<a.length){var o=a[a.length-1].end;if(r>=a[0].start&&r<o){r=!0;break e}}r=!1}r&&(n.Ae=i,JSON.stringify(i),n=new nQ("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}},E(ov,n1),ov.prototype.release=function(){this.g.clear(),this.h.stop(),n1.prototype.release.call(this)},E(oy,n1),oy.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,n1.prototype.release.call(this)},oy.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=v(this.i.g),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?ow:e>i.endTime?ox:oT;this.g.set(i,a);for(var o=v(this.m),s=o.next();!s.done;s=o.next())(s=s.value).sb==r&&s.rb==a&&s.ib(i,t)}}};var ow=1,oT=2,ox=3;function oS(e,t,n,i,r){return e=n9(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function oE(e,t){var n=this;this.g=t,this.m=e,this.h=null,this.u=1,this.o=this.l=null,this.F=0,this.D=!1,this.j=new Map,this.A=!1,this.G=null,this.s=!1,this.i=new ia(function(){var e,t,i,r,a;return e=n,F(function(n){if(1==n.g){for(t=[],r=(i=v(e.j.values())).next();!r.done;r=i.next())o_(a=r.value),t.push(oj(a));return C(n,Promise.all(t),2)}e.j.clear(),e.g=null,e.m=null,e.h=null,M(n)})})}function oA(e,t){var n=e.j.get("video");if(n){var i=n.stream;i&&(t?(t=i.trickModeVideo)&&!n.pb&&(oC(e,t,!1,0,!1),n.pb=i):(i=n.pb)&&(n.pb=null,oC(e,i,!0,0,!1)))}}function ok(e,t,n,i,r,a){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,a=void 0!==a&&a,e.l=t,e.A&&(t.video&&oC(e,t.video,n,i,r,a),t.audio&&oC(e,t.audio,n,i,r,a))}function oI(e,t){F(function(n){if(1==n.g)return e.o=t,e.A?t.segmentIndex?n.B(2):C(n,t.createSegmentIndex(),2):n.return();oC(e,t,!0,0,!1),M(n)})}function oC(e,t,n,i,r,a){var o,s,u,l,c,d,h,f,p,g,m=e.j.get(t.type);m||t.type!=e5?m&&(m.pb&&(t.trickModeVideo?(m.pb=t,t=t.trickModeVideo):m.pb=null),m.stream!=t||r)&&(t.type==e5&&aP(e.g.R,tU(t.mimeType,t.codecs),e.m.sequenceMode,t.external),m.stream.closeSegmentIndex&&m.stream.closeSegmentIndex(),m.stream=t,m.X=null,m.ve=!!a,n&&(m.bc?m.ld=!0:m.sa?(m.bb=!0,m.Oc=i,m.ld=!0):(o_(m),oP(e,m,!0,i).catch(function(t){e.g&&e.g.onError(t)}))),(o=e,s=m,F(function(e){if(1==e.g)return s.ua?(u=s.stream,l=s.ua,u.segmentIndex?e.B(2):C(e,u.createSegmentIndex(),2)):e.return();if(s.ua!=l||s.stream!=u)return e.return();var t=o.g.Tc(),n=aj(o.g.R,s.type),i=s.stream.segmentIndex.find(s.qa?s.qa.endTime:t),r=null==i?null:s.stream.segmentIndex.get(i);i=r&&r.ma?r.ma-r.Ba:null,r&&!i&&(i=(r.endTime-r.getStartTime())*(s.stream.bandwidth||0)/8),i?((r=r.h)&&(i+=(r.ma?r.ma-r.Ba:null)||0),t=8*i/(r=o.g.getBandwidthEstimate())<(n||0)-t-Math.max(o.m.minBufferTime||0,o.h.rebufferingGoal)||s.ua.h.g>i):t=!1,t&&s.ua.abort(),M(e)})).catch(function(t){e.g&&e.g.onError(t)})):(c=t,F(function(t){switch(t.g){case 1:return d=e6,e.F++,h=e.F,D(t,2),C(t,aB(e.g.R,d.Y),4);case 4:N(t,3);break;case 2:f=P(t),e.g&&e.g.onError(f);case 3:p=tU(c.mimeType,c.codecs),aP(e.g.R,p,e.m.sequenceMode,c.external),(e.g.R.m.isTextVisible()||e.h.alwaysStreamText)&&e.F==h&&(g=oM(c),e.j.set(d.Y,g),oL(e,g,0)),M(t)}}))}
1function oM(e){return{stream:e,type:e.type,X:null,qa:null,ad:null,Md:null,Ld:null,Kd:null,pb:null,endOfStream:!1,sa:!1,Ka:null,bb:!1,Oc:0,ld:!1,bc:!1,wc:!0,Td:!1,de:!1,oc:!1,ua:null}}function oD(e,t,n,i,r,a){var o,s,u,l,c,d;return F(function(h){switch(h.g){case 1:var f,p,g,m,v,y;return o=i.closedCaptions&&0<i.closedCaptions.size,u=null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length||e.h.dispatchAllEmsgBoxes,l=e.h.parsePrftBox&&!e.D,(u||l)&&(s=new iv),u&&s.P("emsg",function(t){var n=i.emsgSchemeIdUris;if(0===t.version)var a=t.reader.tc(),o=t.reader.tc(),s=t.reader.K(),u=t.reader.K(),l=t.reader.K(),c=t.reader.K(),d=r.startTime+u/s;else s=t.reader.K(),u=(d=t.reader.$a()/s+r.timestampOffset)-r.startTime,l=t.reader.K(),c=t.reader.K(),a=t.reader.tc(),o=t.reader.tc();t=t.reader.Za(t.reader.S.byteLength-t.reader.$()),(n&&n.includes(a)||e.h.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.g.ig():((n=new nQ("emsg",n=(new Map).set("detail",{startTime:d,endTime:d+l/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t}))).cancelable=!0,e.g.onEvent(n),n.defaultPrevented||"https://aomedia.org/emsg/ID3"!=a&&"https://developer.apple.com/streaming/emsg-id3"!=a||(a=aS(t)).length&&r&&e.g.jg([{cueTime:r.startTime,data:t,frames:a,dts:r.startTime,pts:r.startTime}],0,r.endTime)))}),l&&s.P("prft",function(t){e:{if(!e.D&&r.h.timescale){t.reader.K();var n=t.reader.K();if(n=1e3*n+t.reader.K()/0x100000000*1e3,0===t.version)var i=t.reader.K();else try{i=t.reader.$a()}catch(t){e.D=!0,i=void 0;break e}t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+n).getTime(),i=new nQ("prft",i=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-i/r.h.timescale*1e3)})),e.g.onEvent(i),e.D=!0}i=void 0}return i}),(u||l)&&s.parse(a),C(h,(f=e,p=t,g=n,F(function(e){if(1==e.g)return(m=Math.max(f.h.bufferBehind,f.m.presentationTimeline.g),null==(v=a_(f.g.R,p.type))||.01>=(y=g-v-m))?e.return():C(e,f.g.R.remove(p.type,v,v+y),2);io(f.i),M(e)})),2);case 2:return io(e.i),c=t.wc,t.wc=!1,d=t.ve,t.ve=!1,C(h,e.g.xe(t.type,a),3);case 3:return C(h,aU(e.g.R,t.type,a,r,o,c,d),4);case 4:io(e.i),M(h)}})}function oR(e){return e&&e.type==e5&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function oN(t,n,i,r){var a,o,s,u,l,c,d;return F(function(h){switch(h.g){case 1:return a=it,o=oS(i.ya(),i.Ba,i.ma,t.h.retryParameters,r),s=n.stream,t.g.modifySegmentRequest(o,{type:s.type,init:i instanceof ah,duration:i.endTime-i.startTime,mimeType:s.mimeType,codecs:s.codecs,bandwidth:s.bandwidth}),n.ua=u=t.g.lb.request(a,o),C(h,u.promise,2);case 2:var f,p,g,m,v,y;if(l=h.h,n.ua=null,c=l.data,!i.m){h.B(3);break}return d=n.X,C(h,(f=c,p=i.m,F(function(t){if(1==t.g)return(g=p).cryptoKey?t.B(2):C(t,g.fetchKey(),3);if(!(m=g.iv))for(m=eP(new ArrayBuffer(16)),v=g.firstMediaSequenceNumber+d.g,y=m.byteLength-1;0<=y;y--)m[y]=255&v,v>>=8;return t.return(e.crypto.subtle.decrypt({name:"AES-CBC",iv:m},g.cryptoKey,f))})),4);case 4:c=h.h;case 3:return h.return(c)}})}function oP(e,t,n,i){var r,a;return F(function(o){return 1==o.g?(t.bb=!1,t.ld=!1,t.Oc=0,t.bc=!0,t.qa=null,t.ad=null,t.X=null,i?(r=e.g.Tc(),a=e.g.R.getDuration(),C(o,e.g.R.remove(t.type,r+i,a),3)):C(o,aB(e.g.R,t.type),4)):3!=o.g?(io(e.i),n?C(o,e.g.R.flush(t.type),3):o.B(3)):void(io(e.i),t.bc=!1,t.endOfStream=!1,t.sa||t.Ka||oL(e,t,0),M(o))})}function oL(t,n,i){var r=n.type;(r!=e5||t.j.has(r))&&(n.Ka=new te(function(){var i;return F(function(r){if(1==r.g){var a,o,s,u,l;return D(r,2),C(r,F(function(i){switch(i.g){case 1:if(io(t.i),n.sa||null==n.Ka||n.bc)return i.return();if(n.Ka=null,!n.bb){i.B(2);break}return C(i,oP(t,n,n.ld,n.Oc),3);case 3:return i.return();case 2:if(n.stream.segmentIndex){i.B(4);break}return a=n.stream,C(i,n.stream.createSegmentIndex(),5);case 5:if(a!=n.stream)return a.closeSegmentIndex&&a.closeSegmentIndex(),n.sa||n.Ka||oL(t,n,0),i.return();case 4:D(i,6),null!=(o=function(t,n){if(oR(n))return w=t.g.R,T=n.stream.originalId||"",x=aj(w,"video")||0,tG(w.g,T,x),null;n.type==e5&&(S=t.g.R).g&&tG(S.g,"",0);var i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,T,x,S,E,A,k=t.g.Tc(),I=n.qa?n.qa.endTime:k,M=(E=t.g.R,A=n.type,A==e5?null==(E=E.g).h||E.h<k?0:E.h-Math.max(k,E.g):ab(E=aO(E,A),k)),R=Math.max(t.m.minBufferTime||0,t.h.rebufferingGoal,t.h.bufferingGoal)*t.u,L=t.m.presentationTimeline.getDuration()-I,_=aj(t.g.R,n.type);if(1e-6>L&&_)return n.endOfStream=!0,"video"==n.type&&(t=t.j.get(e5))&&oR(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,M>=R)return t.h.updateIntervalSeconds/2;if(!(M=function(e,t,n,i){if(t.X)return t.X.current();if(t.qa||i)return n=t.qa?t.qa.endTime:i,t.Td=!0,t.X=t.stream.segmentIndex.Db(n),t.X&&t.X.next().value;i=Math.max(n-(e=e.h.inaccurateManifestTolerance),0);var r=null;return e&&(t.X=t.stream.segmentIndex.Db(i),r=t.X&&t.X.next().value),r||(t.X=t.stream.segmentIndex.Db(n),r=t.X&&t.X.next().value),r}(t,n,k,_)))return t.h.updateIntervalSeconds;
1for(R=1/0,_=(L=v(L=Array.from(t.j.values()))).next();!_.done;_=L.next())oR(_=_.value)||_.X&&!_.X.current()||(R=Math.min(R,_.qa?_.qa.endTime:k));return I>=R+t.m.presentationTimeline.g?t.h.updateIntervalSeconds:((i=t,r=n,a=k,o=M,F(function(t){switch(t.g){case 1:var n,v,w,T,x,S,E,A,k,I,M;if(s=e6,u=r.stream,l=r.X,r.sa=!0,D(t,2),2==o.Fb())throw new ej(1,1,1011);return C(t,(n=i,v=r,w=o,F(function(e){var t,i,r,a,o;return T=[],x=Math.max(0,w.appendWindowStart-.1),S=w.appendWindowEnd+.01,((E=w.timestampOffset)!=v.Md||x!=v.Ld||S!=v.Kd)&&(A=function(){var e;return F(function(t){if(1==t.g){var i,r,a,o,s,u;return D(t,2),v.Ld=x,v.Kd=S,v.Md=E,C(t,(i=n.g.R,r=v.type,a=E,o=x,s=S,u=n.m.sequenceMode,F(function(e){var t;return r==e6.Y?(u||(i.g.s=a),t=i.g,t.l=o,t.m=s,e.return()):C(e,Promise.all([aG(i,r,function(){return aH(i,r)}),u?Promise.resolve():aG(i,r,function(){return aK(i,r,a)}),aG(i,r,function(){i.h[r].appendWindowStart=0,i.h[r].appendWindowEnd=s,i.h[r].appendWindowStart=o,aq(i,r)})]),0)})),4)}if(2!=t.g)return N(t,0);throw e=P(t),v.Ld=null,v.Kd=null,v.Md=null,e})},T.push(A())),t=w.h,i=v.ad,(t&&i?!(t.mc()==i.mc()&&t.ic()==i.ic()&&el(t.ya(),i.ya())):t!=i)&&(v.ad=w.h)&&(k=oN(n,v,w.h),I=function(){var e,t,i;return F(function(r){switch(r.g){case 1:return D(r,2),C(r,k,4);case 4:return e=r.h,io(n.i),(new iv).box("moov",iy).box("trak",iy).box("mdia",iy).P("mdhd",function(e){e=ar(e.reader||0,e.version||0),w.h.timescale=e.timescale}).parse(e),t=v.stream.closedCaptions&&0<v.stream.closedCaptions.size,C(r,n.g.xe(v.type,e),5);case 5:return C(r,aU(n.g.R,v.type,e,null,t),6);case 6:N(r,0);break;case 2:throw i=P(r),v.ad=null,i}})},n.g.hg(w.startTime,w.h),T.push(I())),n.m.sequenceMode&&(M=v.qa?v.qa.l:null,w.l!=M||v.Td)&&(v.Td=!1,T.push((r=n.g.R,a=v.type,o=w.startTime,F(function(e){return a==e6.Y?e.return():(aG(r,a,function(){return aH(r,a)}),C(e,aG(r,a,function(){return aK(r,a,o)}),0))})))),C(e,Promise.all(T),0)})),4);case 4:if(io(i.i),i.s)return t.return();if(c="video/mp4"==u.mimeType||"audio/mp4"==u.mimeType,d=e.ReadableStream,i.h.lowLatencyMode&&d&&c&&!o.m)return f=new Uint8Array(0),g=p=!1,m=function(e){var t,n,s;return F(function(l){var c,d,h;return p||(g=!0,io(i.i),i.s)?l.return():(c=f,d=e,(h=new Uint8Array(c.length+d.length)).set(c),h.set(d,c.length),f=h,t=!1,n=0,(new iv).box("mdat",function(e){n=e.size+e.start,t=!0}).parse(f,!1,!0),t)?(s=f.subarray(0,n),f=f.subarray(n),C(l,oD(i,r,a,u,o,s),0)):l.B(0)})},C(t,oN(i,r,o,m),9);return C(t,oN(i,r,o),7);case 7:return h=t.h,io(i.i),i.s?t.return():r.bb?(r.sa=!1,oL(i,r,0),t.return()):C(t,oD(i,r,a,u,o,h),6);case 9:if(y=t.h,g){t.B(6);break}return p=!0,io(i.i),i.s?t.return():r.bb?(r.sa=!1,oL(i,r,0),t.return()):C(t,oD(i,r,a,u,o,y),6);case 6:if(io(i.i),i.s)return t.return();r.qa=o,l.next(),r.sa=!1,r.de=!1,JSON.stringify(i.g.R.Ma()[r.type]),r.bb||i.g.Yd(o.startTime,o.endTime,r.type),oL(i,r,0),N(t,0);break;case 2:if(b=P(t),io(i.i,b),i.s)return t.return();if(r.sa=!1,7001==b.code)r.sa=!1,o_(r),oL(i,r,0),t.B(0);else if(r.type==s.Y&&i.h.ignoreTextStreamFailures)i.j.delete(s.Y),t.B(0);else{if(3017!=b.code)return r.oc=!0,b.severity=2,C(t,oO(i,b),0);(function(e,t,n){if(!Array.from(e.j.values()).some(function(e){return e!=t&&e.de})){var i=Math.round(100*e.u);if(20<i)e.u-=.2;else if(4<i)e.u-=.04;else{t.oc=!0,e.s=!0,e.g.onError(n);return}t.de=!0}oL(e,t,4)})(i,r,b),t.B(0)}}})).catch(function(){}),null)}(t,n))&&(oL(t,n,o),n.oc=!1),N(i,7);break;case 6:return s=P(i),C(i,oO(t,s),8);case 8:return i.return();case 7:if(u=Array.from(t.j.values()),!t.A||!u.every(function(e){return e.endOfStream})){i.B(0);break}return C(i,t.g.R.endOfStream(),10);case 10:io(t.i),0!=(l=t.g.R.getDuration())&&l<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.Aa(l),M(i)}}),4)}if(2!=r.g)return N(r,0);i=P(r),t.g&&t.g.onError(i),M(r)})}).N(i))}function o_(e){null!=e.Ka&&(e.Ka.stop(),e.Ka=null)}function oj(e){return F(function(t){return e.ua?C(t,e.ua.abort(),0):t.B(0)})}function oO(e,t){return F(function(n){if(1==n.g)return C(n,nq(e.G),2);io(e.i),e.g.onError(t),t.handled||e.h.failureCallback(t),M(n)})}function oU(e,t){var n=s8(),i=this;this.j=t,this.i=e,this.l=n,this.o=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then(function(){var e;return e=i,F(function(t){if(e.s.g)t=t.B(0);else{if(0==e.m.length||e.g&&!e.g.hb)var n,i,r,a=!1;else{e.g&&(e.g.Ia.nb(),e.g=null);var o=(a=e.m.shift()).create(e.l);o?(a.Ia.Kb(),e.g={node:o.node,payload:o.payload,hb:o.hb,Ia:a.Ia}):a.Ia.fd(),a=!0}a?a=Promise.resolve():e.g?(n=e,a=F(function(e){switch(e.g){case 1:return n.i=n.j.Nf(n.i,n.l,n.g.node,n.g.payload),D(e,2),n.h=n.j.zf(n.i,n.l,n.g.payload),C(e,n.h.promise,4);case 4:n.h=null,n.i==n.g.node&&(n.g.Ia.dd(),n.g=null),N(e,0);break;case 2:return 7001==(i=P(e)).code?n.g.Ia.nb():n.g.Ia.onError(i),n.g=null,n.h=null,r=n,C(e,n.j.handleError(n.l,i),5);case 5:r.i=e.h,M(e)}})):(e.j.gg(e.i),e.o=new e9,a=e.o),t=C(t,a,1)}return t})}),this.s=new ia(function(){var e,t,n;return e=i,F(function(i){if(1==i.g)return e.h&&e.h.abort(),oF(e),C(i,e.u,2);for(e.g&&e.g.Ia.nb(),n=(t=v(e.m)).next();!n.done;n=t.next())n.value.Ia.nb();e.g=null,e.m=[],e.j=null,M(i)})})}function oB(e,t){var n={Kb:function(){},dd:function(){},nb:function(){},onError:function(){},fd:function(){},vh:function(){}};return e.m.push({create:t,Ia:n}),e.h&&e.h.abort(),oF(e),n}function oF(e){e.o&&(e.o.resolve(),e.o=null)}function oV(e,t){e=v(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).isContainer)oV(n.nestedCues,t);else{var i=n.clone();i.nestedCues=[],i.payload=function e(t){var n=[],i=700<=t.fontWeight,r="italic"==t.fontStyle,a=t.textDecoration.includes("underline");return i&&n.push("b"),r&&n.push("i"),a&&n.push("u"),i=n.reduce(function(e,t){return e+"<"+t+">"},""),n=n.reduceRight(function(e,t){return e+"</"+t+">"},""),t.lineBreak?"\n":t.nestedCues.length?t.nestedCues.map(e).join(""):i+t.payload+n}(n),t.push(i)}return t}function oH(e){this.g=null;for(var t=v(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function oK(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=v(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function oq(){}function oG(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function oX(t,n){var i=this;this.j=!1,this.i=[],this.A=t,this.m=n,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.m.appendChild(this.g),this.u=new tt(function(){oz(i)}).Ca(.25),this.h=new Map,this.s=new is,this.s.C(document,"fullscreenchange",function(){oz(i,!0)}),this.l=null,"ResizeObserver"in e&&(this.l=new ResizeObserver(function(){oz(i,!0)}),this.l.observe(this.g)),this.o=new Map}function oz(e,t){if(e.g){var n=e.A.currentTime;if(!e.j||(void 0===t?0:t)){t=v(e.o.values());for(var i=t.next();!i.done;i=t.next())oG(i.value);oG(e.g),e.h.clear(),e.o.clear()}if(e.j){t=new Map,i=v(e.h.keys());for(var r=i.next();!r.done;r=i.next())r=r.value,t.set(r,e.h.get(r));!function e(t,n,i,r,a){var o=!1,s=[],u=[];n=v(n);for(var l=n.next();!l.done;l=n.next()){l=l.value,a.push(l);var c=t.h.get(l),d=l.startTime<=r&&l.endTime>r,h=c?c.ff:null;c&&(s.push(c.Ed),c.uc&&s.push(c.uc),d||(o=!0,t.h.delete(l),c=null)),d&&(u.pu
1sh(l),c?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,h)||(o=!0):(function(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),i=!i&&0<t.nestedCues.length;var a=document.createElement(r);if("br"!=r&&function(e,t,n,i,r){var a,o,s,u=t.style,l=0==n.nestedCues.length,c=1<i.length;u.whiteSpace="pre-wrap";var d=n.payload.replace(/\s+$/g,function(e){return"\xa0".repeat(e.length)});if(u.webkitTextStrokeColor=n.textStrokeColor,u.webkitTextStrokeWidth=n.textStrokeWidth,u.color=n.color,u.direction=n.direction,u.opacity=n.opacity,u.paddingLeft=oW(n.linePadding,n,e.m),u.paddingRight=oW(n.linePadding,n,e.m),u.textShadow=n.textShadow,n.backgroundImage)u.backgroundImage="url('"+n.backgroundImage+"')",u.backgroundRepeat="no-repeat",u.backgroundSize="contain",u.backgroundPosition="center",u.width="100%",u.height="100%";else{if(n.nestedCues.length)var h=t;else h=document.createElement("span"),t.appendChild(h);n.border&&(h.style.border=n.border),r||((t=function(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,function(e){return e.backgroundColor}))?h.style.backgroundColor=t:d&&(h.style.backgroundColor="rgba(0, 0, 0, 0.8)")),d&&(h.textContent=d)}c&&!i[i.length-1].isContainer?u.display="inline":(u.display="flex",u.flexDirection="column",u.alignItems="center",u.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),l||(u.margin="0"),u.fontFamily=n.fontFamily,u.fontWeight=n.fontWeight.toString(),u.fontStyle=n.fontStyle,u.letterSpacing=n.letterSpacing,u.fontSize=oW(n.fontSize,n,e.m),null!=n.line&&(e=n.lineInterpretation,0==n.line&&e==ey&&(e=1),1==e&&(u.position="absolute",n.writingMode==ev?(u.width="100%",n.lineAlign==eb?u.top=n.line+"%":"end"==n.lineAlign&&(u.bottom=100-n.line+"%")):"vertical-lr"==n.writingMode?(u.height="100%",n.lineAlign==eb?u.left=n.line+"%":"end"==n.lineAlign&&(u.right=100-n.line+"%")):(u.height="100%",n.lineAlign==eb?u.right=n.line+"%":"end"==n.lineAlign&&(u.left=100-n.line+"%")))),u.lineHeight=n.lineHeight,null!=n.position&&(n.writingMode==ev?u.paddingLeft=n.position:u.paddingTop=n.position),o=(a=n).direction,s=a.positionAlign,a=a.textAlign,"line-left"==(e=s!==ed?s:"left"===a||"start"===a&&o===em||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===em?"line-right":"center")?u.cssFloat="left":"line-right"==e&&(u.cssFloat="right"),u.textAlign=n.textAlign,u.textDecoration=n.textDecoration.join(" "),u.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&u.writingMode==n.writingMode||(u.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==ev?u.width=n.size+"%":u.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id)if(r=(n=t.region).id+"_"+n.width+"x"+n.height+(n.heightUnits==eI?"%":"px")+"-"+n.viewportAnchorX+"x"+n.viewportAnchorY+(n.viewportAnchorUnits==eI?"%":"px"),e.o.has(r))n=e.o.get(r);else{var o=document.createElement("span"),s=n.heightUnits==eI?"%":"px",u=n.widthUnits==eI?"%":"px",l=n.viewportAnchorUnits==eI?"%":"px";o.id="shaka-text-region---"+r,o.classList.add("shaka-text-region"),o.style.height=n.height+s,o.style.width=n.width+u,o.style.position="absolute",o.style.top=n.viewportAnchorY+l,o.style.left=n.viewportAnchorX+l,o.style.display="flex",o.style.flexDirection="column",o.style.alignItems="center",o.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.o.set(r,o),n=o}r=a,i&&((r=document.createElement("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",a.appendChild(r)),e.h.set(t,{Ed:a,ff:r,uc:n})}(t,l,a),h=(c=t.h.get(l)).ff,o=!0)),0<l.nestedCues.length&&h&&e(t,l.nestedCues,h,r,a),a.pop()}if(o){for(a=(r=v(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(u.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),l=(u=v(u)).next();!l.done;l=u.next())(r=t.h.get(l.value)).uc?(i.appendChild(r.uc),r.uc.appendChild(r.Ed)):i.appendChild(r.Ed)}}(e,e.i,e.g,n,[])}}}function oW(e,t,n){var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;var r=i.value;switch(i.unit){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return e}}function oY(e,t){this.h=e,this.g=t,this.j="",this.o=void 0,this.i=!1,this.m=!0,this.l=!1}function o$(e,t,n){try{if(e.g.enabled){var i,r,a={d:1e3*n.duration,st:e.h.T()?o9:o8};r=(i=n).type,a.ot=i.init?o3:"video"==r?i.codecs.includes(",")?o4:o2:"audio"==r?o1:"text"==r?"application/mp4"===i.mimeType?o6:o5:void 0;var o=a.ot===o2||a.ot===o1||a.ot===o4||a.ot===o6;o&&(a.bl=function(e,t){if(!(t=e.h.Ma()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}
1))?1e3*(e.end-n):NaN}(e,n.type)),n.bandwidth&&(a.br=n.bandwidth/1e3),o&&a.ot!==o6&&(a.tb=function(e,t){var n=e.h.Pa();if(!n.length)return NaN;e=n[0],n=v(n);for(var i=n.next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case o2:return e.videoBandwidth||NaN;case o1:return e.audioBandwidth||NaN;default:return e.bandwidth}}(e,a.ot)/1e3),oQ(e,t,a)}}catch(e){et("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}}function oJ(t){return t.j||(t.j=t.g.sessionId||e.crypto.randomUUID()),{v:1,sf:t.o,sid:t.j,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function oQ(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,oJ(e)),n.pr=e.h.Sc();var r=n.ot===o2||n.ot===o4;if(e.l&&r&&(n.bs=!0,n.su=!0,e.l=!1),null==n.su&&(n.su=e.m),i)Object.keys(e=function(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={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};t=v(t);for(var o=t.next();!o.done;o=t.next())r[null!=a[o=o.value]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=oZ(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(n)).length&&Object.assign(t.headers,e);else{var a=oZ(n);a&&(t.uris=t.uris.map(function(e){return o0(e,a)}))}}}function oZ(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}var i=[],r={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},a=Object.keys(e||{}).sort();a=v(a);for(var o=a.next();!o.done;o=a.next()){var s,u=e[o=o.value];if(!Number.isNaN(s=u)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==u)&&("pr"!=o||1!==u)){var l=r[o];l&&(u=l(u));var c=void 0;c="string"==(l=typeof u)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(u):"boolean"===l?o:"symbol"===l?o+"="+u.description:o+"="+u,i.push(c)}}return i.join(",")}function o0(e,t){return!t||e.includes("offline:")?e:((e=new eU(e)).g.set("CMCD",t),e.toString())}(b=oE.prototype).destroy=function(){return this.i.destroy()},b.configure=function(e){this.h=e,this.G=new nK({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)},b.start=function(){var e=this;return F(function(t){if(1==t.g){var n,i,r,a,o,s,u,l,c,d,h;return C(t,(n=e,F(function(e){if(1==e.g){if(i=e6,!n.l)throw new ej(2,5,5006);return r=new Map,a=new Set,n.l.audio&&(r.set(i.Ic,n.l.audio),a.add(n.l.audio)),n.l.video&&(r.set(i.va,n.l.video),a.add(n.l.video)),n.o&&(r.set(i.Y,n.o),a.add(n.o)),o=n.g.R,s=n.h.forceTransmux,C(e,o.init(r,s,n.m.sequenceMode),2)}for(io(n.i),n.updateDuration(),l=(u=v(r.keys())).next();!l.done;l=u.next())c=l.value,d=r.get(c),n.j.has(c)||(h=oM(d),n.j.set(c,h),oL(n,h,0));M(e)})),2)}io(e.i),e.A=!0,M(t)})},b.wc=function(){if(this.g)for(var e=this.g.Tc(),t=v(this.j.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.j.get(i);var r=null;if(n.X&&(r=n.X.current()),(!r||r.startTime>e||r.endTime<e)&&(n.X=null),r=this.g.R,!(r=i==e5?null!=(r=r.g).g&&null!=r.h&&e>=r.g&&e<r.h:ay(r=aO(r,i),e))){if((null!=aj(this.g.R,i)||n.sa)&&function(e,t){t.bc||t.bb||(t.sa?(t.bb=!0,t.Oc=0):null==a_(e.g.R,t.type)?null==t.Ka&&oL(e,t,0):(o_(t),oP(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}(this,n),n.ua&&(n.ua.abort(),n.ua=null),i===e5&&(i=this.g.R).s)for((i=i.s.g).l=0,i.h=[],i.g=[],(r=i.i).i=[],r.h=[],r.g=0,r7(i),r=(i=v(i.j.values())).next();!r.done;r=i.next())r3(r.value);n.wc=!0}}},b.updateDuration=function(){var e=this.m.presentationTimeline.getDuration();1/0>e?this.g.R.Aa(e):this.g.R.Aa(0x100000000)},oU.prototype.destroy=function(){return this.s.destroy()},(b=oH.prototype).remove=function(e,t){return!!this.g&&(oK(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},b.append=function(e){var t=oV(e,[]),n=[];e=this.g.cues?Array.from(this.g.cues):[];var i={};t=v(t);for(var r=t.next();!r.done;i={ub:i.ub},r=t.next())i.ub=r.value,e.some(function(e){return function(t){return t.startTime==e.ub.startTime&&t.endTime==e.ub.endTime&&t.text==e.ub.payload}}(i))||(r=function(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}(i.ub))&&n.push(r);for(i=(e=v(e=n.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)}))).next();!i.done;i=e.next())this.g.addCue(i.value)},b.destroy=function(){return this.g&&(oK(this.g,function(){return!0}),this.g.mode="disabled"),this.g=null,Promise.resolve()},b.isTextVisible=function(){return"showing"==this.g.mode},b.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},W("shaka.text.SimpleTextDisplayer",oH),oH.prototype.setTextVisibility=oH.prototype.setTextVisibility,oH.prototype.isTextVisible=oH.prototype.isTextVisible,oH.prototype.destroy=oH.prototype.destroy,oH.prototype.append=oH.prototype.append,oH.prototype.remove=oH.prototype.remove,W("shaka.util.Dom",oq),oq.removeAllChildren=oG,(b=oX.prototype).append=function(e){var t=[].concat(y(this.i)),n={};e=v(e);for(var i=e.next();!i.done;n={Dc:n.Dc},i=e.next())n.Dc=i.value,t.some(function(e){return function(t){return function e(t,n){if(t.startTime!=n.startTime||t.endTime!=n.endTime||t.payload!=n.payload)return!1;for(var i in t)if("startTime"!=i&&"endTime"!=i&&"payload"!=i){if("nestedCues"==i){if(!el(t.nestedCues,n.nestedCues,e))return!1}else if("region"==i||"cellResolution"==i){for(var r in t[i])if(t[i][r]!=n[i][r])return!1}else if(Array.isArray(t[i])){if(!el(t[i],n[i]))return!1}else if(t[i]!=n[i])return!1}return!0}(t,e.Dc)}}(n))||this.i.push(n.Dc);oz(this)},b.destroy=function(){this.m.removeChild(this.g),this.g=null,this.j=!1,this.i=[],this.u&&this.u.stop(),this.h.clear(),this.s&&(this.s.release(),this.s=null),this.l&&(this.l.disconnect(),this.l=null)},b.remove=function(e,t){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter(function(n){return n.startTime<e||n.endTime>=t}),oz(this,n>this.i.length),!0},b.isTextVisible=function(){return this.j},b.setTextVisibility=function(e){this.j=e},W("shaka.text.UITextDisplayer",oX),oX.prototype.setTextVisibility=oX.prototype.setTextVisibility,oX.prototype.isTextVisible=oX.prototype.isTextVisible,oX.prototype.remove=oX.prototype.remove,oX.prototype.destroy=oX.prototype.destroy,oX.prototype.append=oX.prototype.append,W("shaka.text.WebVttGenerator",function(){});var o1="a",o2="v",o4="av",o3="i",o5="c",o6="tt",o8="v",o9="l";function o7(){}function se(e,t,n,i,r){var a,o=r in i,s=!0;for(a in t){var u=r+"."+a,l=o?i[r]:n[a];o||a in n?void 0===t[a]?void 0===l||o?delete e[a]:e[a]=n2(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=n2(l)),u=se(e[a],t[a],l,i,u),s=s&&u):typeof t[a]!=typeof l||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=l.constructor?(Z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&ee("Unexpected number of arguments for "+u),e[a]=t[a]):(Z("Invalid config, unrecognized key "+u),s=!1)}return s}function st(e,t){for(var n={},i=n,r=0,a=0;!(0>(r=e.indexOf(".",r)));)(0==r||"\\"!=e[r-1])&&(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function sn(){}function si(e){return new eU(e=ty(e)).Ha}function sr(e,t,n){function i(e){eL(a).setUint32(o,e.byteLength,!0),o+=4,a.set(eP(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new ej(2,6,6015);
1var r="string"==typeof t?tw(t,!0):t,a=new Uint8Array(12+(e=tw(e=ty(e),!0)).byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function sa(){}function so(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:nG(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(t,n,i){return e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,i=si(t),t=sr(t,i,n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:ta()},i={retryParameters:nG(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!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","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(e){var t;return t=[e],t&&e},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},r={retryParameters:nG(),failureCallback:function(e){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};(td("Web0S")||to()||td("CrKey"))&&(r.stallSkip=0);var a={trackSelectionCallback:function(e){return F(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return F(function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?C(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))})},progressCallback:function(e,t){},usePersistentLicense:!0,numberOfParallelDownloads:5},o={drm:n,manifest:i,streaming:r,mediaSource:{sourceBufferExtraFeatures:""},offline:a,abrFactory:function(){return new nE},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};return a.trackSelectionCallback=function(e){return F(function(t){return t.return(function(e,t){var n=e.filter(function(e){return"variant"==e.type}),i=[],r=t2(t,n.map(function(e){return e.language}));r&&(i=n.filter(function(e){return tQ(e.language)==r})),0==i.length&&(i=n.filter(function(e){return e.primary})),0==i.length&&(n.map(function(e){return e.language}),i=n);var a=i.filter(function(e){return e.height&&480>
1=e.height});for(a.length&&(a.sort(function(e,t){return t.height-e.height}),i=a.filter(function(e){return e.height==a[0].height})),t=[],i.length&&(n=Math.floor(i.length/2),i.sort(function(e,t){return e.bandwidth-t.bandwidth}),t.push(i[n])),i=(e=v(e)).next();!i.done;i=e.next())(i=i.value).type!=e5&&"image"!=i.type||t.push(i);return t}(e,o.preferredAudioLanguage))})},o}function ss(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return se(e,t,n||so(),i,"")}function su(){this.g=null,this.h=[]}function sl(e,t){if(null==e.g)e.g={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function sc(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=v(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function sd(){this.i=this.h=null,this.g=[]}function sh(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function sf(){this.u=this.A=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.M=this.O=this.H=this.J=this.L=this.l=this.o=NaN,this.g=new su,this.h=new sd}function sp(t,n){n1.call(this);var i,r=this;this.l=ue,this.Vc=this.g=null,this.da=!1,this.Zc=new is,this.Yb=new is,this.u=new is,this.Ob=this.i=this.$c=this.J=this.j=this.ka=this.L=this.df=this.V=this.Fa=this.M=this.Wc=this.H=this.yb=this.A=this.G=this.m=this.D=null,this.ec=!1,this.Pd=this.s=null,this.$d=1e9,this.h=sR(this),this.fc={width:1/0,height:1/0},this.o=null,this.vb=new nU(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.wb=this.h.preferredTextLanguage,this.dc=this.h.preferredTextRole,this.ac=this.h.preferForcedSubs,this.$b=[],this.hc=null,n&&n(this),this.D=(i=this,new n6(function(e,t){i.s&&i.s.segmentDownloaded(e,t)},function(e,t,n){e=(new Map).set("headers",e).set("request",t).set("requestType",n),i.dispatchEvent(sm("downloadheadersreceived",e))},function(e,t,n,r){e=(new Map).set("request",e).set("error",t).set("httpResponseCode",n).set("aborted",r),i.dispatchEvent(sm("downloadfailed",e))})),this.D.ke(this.h.streaming.forceHTTPS),this.F=null,ua&&(this.F=ua()),this.Zc.C(e,"online",function(){r.ee()}),this.O={name:"detach"},this.W={name:"attach"},this.fa={name:"unload"},this.ae={name:"manifest-parser"},this.Zd={name:"manifest"},this.xb={name:"media-source"},this.Sd={name:"drm-engine"},this.ba={name:"load"},this.fe={name:"src-equals-drm-engine"},this.zb={name:"src-equals"};var a=new Map;a.set(this.W,function(e,t){var n,i,a;return n$((n=r,i=e,a=t,null==i.mediaElement&&(i.mediaElement=a.mediaElement,n.Yb.C(i.mediaElement,"error",function(){var e=s$(n);e&&sW(n,e)})),n.g=i.mediaElement,Promise.resolve()))}),a.set(this.O,function(e){return e.mediaElement&&(r.Yb.ob(),e.mediaElement=null),r.F&&r.F.release(),r.g=null,n$(e=Promise.resolve())}),a.set(this.fa,function(e){return n$(sv(r,e))}),a.set(this.xb,function(e){var t,n,i,a,o,s;return n$((t=r,n=e,e=F(function(e){if(1==e.g){var r;return a=(i=t.h.textDisplayFactory)(),t.Wd=i,(r=n.mediaElement,o=new aN(r,a,function(e,n,i){sy(t,e,n,i)},t.L)).configure(t.h.mediaSource),s=t.h.manifest.segmentRelativeVttTiming,o.H=s,C(e,o.J,2)}t.G=o,M(e)})))}),a.set(this.ae,function(e,t){var n,i,a,o,s,u,l;return n$((n=r,i=e,a=t,e=F(function(e){if(1==e.g)return i.mimeType=a.mimeType,i.uri=a.uri,o=i.uri,s=n.D,n.Ob=o,u=n,C(e,ru(o,s,n.h.manifest.retryParameters,i.mimeType),2);u.$c=e.h,n.J=n.$c(),l=n2(n.h.manifest),a.mediaElement&&"AUDIO"===a.mediaElement.nodeName&&(l.disableVideo=!0),n.J.configure(l),M(e)})))}),a.set(this.Zd,function(e){var t,n,i,a,o,s,u,l;return t=r,s=(n=e).uri,n=t.D,t.Fa=new ov(function(){return t.vc()}),t.Fa.addEventListener("regionadd",function(e){sY(t,"timelineregionadded",e=e.region),t.F&&t.F.onDashTimedMetadata(e)}),t.ka=null,t.h.streaming.observeQualityChanges&&(t.ka=new om(function(){return t.Ma()}),t.ka.addEventListener("qualitychange",function(e){var n=e.quality;e=e.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.co
1decs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",e),t.dispatchEvent(sm("mediaqualitychanged",n))})),u={networkingEngine:n,modifyManifestRequest:function(e,n){var i=t.V;try{i.g.enabled&&(i.o=n.format,oQ(i,e,{ot:"m",su:!i.i}))}catch(e){et("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}},modifySegmentRequest:function(e,n){o$(t.V,e,n)},filter:function(e){return sN(t,e)},makeTextStreamsForClosedCaptions:function(e){return function(e,t){for(var n=new Set,i=v(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(r=(i=v(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=v(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new od;s={id:e.$d++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:r.closedCaptions.get(o),label:null,type:e5,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},t.textStreams.push(s),n.add(o)}}}(t,e)},onTimelineRegionAdded:function(e){var n=t.Fa;e:{for(var i=v(n.g),r=i.next();!r.done;r=i.next())if((r=r.value).schemeIdUri==e.schemeIdUri&&r.id==e.id&&r.startTime==e.startTime&&r.endTime==e.endTime){i=r;break e}i=null}null==i&&(n.g.add(e),e=new nQ("regionadd",new Map([["region",e]])),n.dispatchEvent(e))},onEvent:function(e){return t.dispatchEvent(e)},onError:function(e){return sW(t,e)},isLowLatencyMode:function(){return t.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return t.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){t.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){t.j&&t.j.updateDuration()},newDrmInfo:function(e){var n=t.m?t.m.g:null;n&&t.m.u&&sL(t,n.keySystem,e)}},l=Date.now()/1e3,new nX(F(function(e){if(1==e.g)return i=t,C(e,t.J.start(s,u),2);if(i.i=e.h,a=sm("manifestparsed"),t.dispatchEvent(a),0==t.i.variants.length)throw new ej(2,4,4036);(function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))})(t.i),o=Date.now()/1e3-l,t.o.F=o,M(e)}),function(){return t.J.stop()})}),a.set(this.Sd,function(e){var t,n,i,a;return n$((t=r,n=e,e=F(function(e){return 1==e.g?(i=Date.now()/1e3,a=!0,t.m=sT(t,{lb:t.D,onError:function(e){sW(t,e)},ed:function(e){sJ(t,e)},onExpirationUpdated:function(e,n){sQ(t,e,n)},onEvent:function(e){t.dispatchEvent(e),"drmsessionupdate"==e.type&&a&&(a=!1,t.o.j=Date.now()/1e3-i,t.L&&(e=t.L).g&&e.h.classList.add("shaka-hidden"))}}),t.m.configure(t.h.drm),C(e,i$(t.m,t.i.variants,t.i.offlineSessionIds),2)):3!=e.g?C(e,t.m.Zb(n.mediaElement),3):C(e,sN(t,t.i),0)})))}),a.set(this.ba,function(e,t){var n,i,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,T;return n$((n=r,i=e,a=t,F(function(e){switch(e.g){case 1:i.startTime=a.startTime,null!=n.hc&&(i.startTime=n.hc,n.hc=null),o=i.mediaElement,n.Ob=i.uri,n.H=new oh({Uc:function(){return o.playbackRate},Qc:function(){return o.defaultPlaybackRate},me:function(e){o.playbackRate=e},Ne:function(e){o.currentTime+=e}}),s=function(){return sO(n)},u=function(){return sj(n)},n.u.C(o,"playing",s),n.u.C(o,"pause",s),n.u.C(o,"ended",s),n.u.C(o,"ratechange",u);var t,r,x,S,E,A,k,I,D,R,N,P,L,_=n.h;if(_.lcevc.enabled){var j=n.Pa();j&&j[0]&&j[0].videoMimeType==uo.ts&&(tr()||navigator.userAgent.match(/Edge\//))&&(_.streaming.forceTransmux||ee("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled.")),sg(n),null==n.L&&(n.L=new aI(n.g,n.df,_.lcevc),n.G&&(n.G.F=n.L))}else sg(n);for(l=n.h.abrFactory,n.s&&n.Pd==l||(n.Pd=l,n.s=l(),"function"!=typeof n.s.setMediaElement&&(nM("AbrManager","Please use an AbrManager with setMediaElement function."),n.s.setMediaElement=function(){}),n.s.configure(n.h.abr)),n.vb=new nU(n.h.preferredAudioLanguage,n.h.preferredVariantRole,n.h.preferredAudioChannelCount),n.wb=n.h.preferredTextLanguage,n.dc=n.h.preferredTextRole,n.ac=n.h.preferForcedSubs,sZ(n.i.presentationTimeline,n.h.playRangeStart,n.h.playRangeEnd),n.s.init(function(e,t,i){n.j&&e!=n.j.l&&sV(n,e,!0,void 0!==t&&t,void 0===i?0:i)}),n.s.setMediaElement(o),t5(n.i,n.h.preferredVideoCodecs,n.h.preferredAudioCodecs,n.h.preferredAudioChannelCount,n.h.preferredDecodingAttributes),n.j=new oE((L=n).i,{Tc:function(){return L.A?L.A.J
1c():0},getBandwidthEstimate:function(){return L.s.getBandwidthEstimate()},modifySegmentRequest:function(e,t){o$(L.V,e,t)},R:L.G,lb:L.D,onError:function(e){return sW(L,e)},onEvent:function(e){return L.dispatchEvent(e)},ig:function(){L.J&&L.J.update&&L.J.update()},Yd:function(e,t,n){L.A&&L.A.Oe(),sS(L),e=(new Map).set("start",e).set("end",t).set("contentType",n),L.dispatchEvent(sm("segmentappended",e))},hg:function(e,t){var n,i,r,a,o,s;(t=t.Qd)&&L.ka&&(n=L.ka,i=t,r=n,a=i.contentType,(o=r.g.get(a))||(o={sc:[],Ae:null,contentType:a},r.g.set(a,o)),function(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.sc;t.sc=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.sc=[]}(n,s=o),n={Qd:i,position:e},0<=(i=(s=s.sc).findIndex(function(t){return t.position>=e}))?s.splice(i,+(s[i].position==e),n):s.push(n))},xe:function(e,t){var n=L.m;if(n.h.parseInbandPsshEnabled&&!n.J&&["audio","video"].includes(e)){t=new iI(eP(t));var i=0,r=v(t.data);for(e=r.next();!e.done;e=r.next())i+=e.value.length;if(0==i)n=Promise.resolve();else{for(i=new Uint8Array(i),r=0,e=(t=v(t.data)).next();!e.done;e=t.next())e=e.value,i.set(e,r),r+=e.length;i1(n,"cenc",i),n=n.o}}else n=Promise.resolve();return n},jg:function(e,t,n){sy(L,e,t,n)}}),n.j.configure(n.h.streaming),n.l=ut,o.textTracks&&n.u.C(o.textTracks,"addtrack",function(e){e.track&&"chapters"===(e=e.track).kind&&sw(n,e)}),n.dispatchEvent(sm("streaming")),c=null,(d=n.j.l)||(c=sB(n)),h=[],g=(p=v([(f=d||c).video,f.audio])).next();!g.done;g=p.next())(m=g.value)&&!m.segmentIndex&&h.push(m.createSegmentIndex());if(!(0<h.length)){e.B(2);break}return C(e,Promise.all(h),2);case 2:if(sZ(n.i.presentationTimeline,n.h.playRangeStart,n.h.playRangeEnd),t=n,r=i.startTime,n.A=new or(t.g,t.i,t.h.streaming,r,function(){t.yb&&og(t.yb,!0),t.j&&t.j.wc(),t.M&&sS(t)},function(e){return t.dispatchEvent(e)}),x=n,S=i.hd,(S=new oy(x.Fa,x.T()||0<S)).addEventListener("enter",function(e){sY(x,"timelineregionenter",e.region)}),S.addEventListener("exit",function(e){sY(x,"timelineregionexit",e.region)}),S.addEventListener("skip",function(e){var t=e.region;e.seeking||(sY(x,"timelineregionenter",t),sY(x,"timelineregionexit",t))}),(E=new op(x.g)).g.add(S),x.ka&&E.g.add(x.ka),n.yb=E,y=Math.max(n.i.minBufferTime,n.h.streaming.rebufferingGoal),sx(n,y),d||(sV(n,c,!0,!1,0),!n.h.streaming.startAtSegmentBoundary)){e.B(4);break}return b=n.A.Jc(),C(e,(A=c,k=b,F(function(e){return 1==e.g?(I=A.audio,D=A.video,R=function(e,t){var n,i,r;return F(function(a){return 1==a.g?e?C(a,e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Db(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},C(e,R(I,k),2)):3!=e.g?(N=e.h,C(e,R(D,k),3)):null!=(P=e.h)&&null!=N?e.return(Math.max(P,N)):null!=P?e.return(P):null!=N?e.return(N):e.return(k)})),6);case 6:w=e.h,n.A.Dd(w);case 4:return n.A.Cd(),n.Gb().find(function(e){return e.active})||((T=np(n.i.textStreams,n.wb,n.dc,n.ac)[0]||null)&&sh(n.o.h,T,!0),c&&(T?(c.audio&&function(e,t,n){if(0==e.h.autoShowText)return!1;if(1==e.h.autoShowText)return!0;var i=tQ(e.h.preferredTextLanguage);return(n=tQ(n.language),2==e.h.autoShowText)?tY(n,i):3==e.h.autoShowText?(e=tQ(t.language),tY(n,i)&&!tY(e,n)):(ee("Invalid autoShowText setting!"),!1)}(n,c.audio,T)&&(n.da=!0),n.da&&n.G.m.setTextVisibility(!0),sX(n)):n.da=!1),T&&(n.h.streaming.alwaysStreamText||n.Jd())&&oI(n.j,T)),C(e,n.j.start(),7);case 7:n.h.abr.enabled&&(n.s.enable(),sz(n)),ni(n.j?n.j.l:null,n.i),s1(n.i),sK(n),sU(n),n.i.variants.some(function(e){return e.primary}),n.ec=!0,n.u.ca(o,"loadedmetadata",function(){n.o.m=Date.now()/1e3-a.hd}),M(e)}})))}),a.set(this.fe,function(e,t){var n,i,a,o,s,u,l,c;return n$((n=r,i=e,a=t,e=F(function(e){return 1==e.g?(o=e6,s=Date.now()/1e3,u=!0,n.m=sT(n,{lb:n.D,onError:function(e){sW(n,e)},ed:function(e){sJ(n,e)},onExpirationUpdated:function(e,t){sQ(n,e,t)},onEvent:function(e){n.dispatchEvent(e),"drmsessionupdate"==e.type&&u&&(u=!1,n.o.j=Date.now()/1e3-s)}}),n.m.configure(n.h.drm),"application/x-mpegurl"==(l=uo[rc(a.uri||"")])&&tu
1()&&(l="application/vnd.apple.mpegurl"),l||(l="video/mp4"),c={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:a.mimeType?a.mimeType.split(";")[0]:l,codecs:a.mimeType?tV(a.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:o.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},n.m.W=!0,C(e,i$(n.m,[c],[]),2)):C(e,n.m.Zb(i.mediaElement),0)})))}),a.set(this.zb,function(e,t){return function(e,t,n){function i(){return sO(e)}t.uri=n.uri,t.startTime=n.startTime,e.Ob=t.uri;var r=t.mediaElement;e.A=new oi(r);var a=!1;e.$b.push(function(){a=!0}),null!=t.startTime&&e.A.Dd(t.startTime),e.H=new oh({Uc:function(){return r.playbackRate},Qc:function(){return r.defaultPlaybackRate},me:function(e){r.playbackRate=e},Ne:function(e){r.currentTime+=e}}),sx(e,e.h.streaming.rebufferingGoal),e.u.C(r,"playing",i),e.u.C(r,"pause",i),e.u.C(r,"ended",i),e.u.C(r,"ratechange",function(){return sj(e)}),"none"!=r.preload&&e.u.ca(r,"loadedmetadata",function(){e.o.m=Date.now()/1e3-n.hd}),r.audioTracks&&(e.u.C(r.audioTracks,"addtrack",function(){return sK(e)}),e.u.C(r.audioTracks,"removetrack",function(){return sK(e)}),e.u.C(r.audioTracks,"change",function(){return sK(e)})),r.textTracks&&(e.u.C(r.textTracks,"addtrack",function(t){if(t.track)switch((t=t.track).kind){case"metadata":var n=e,i=t;if("metadata"==i.kind){i.mode="hidden",n.u.C(i,"cuechange",function(){if(i.activeCues)for(var e=v(i.activeCues),t=e.next();!t.done;t=e.next())sb(n,(t=t.value).startTime,t.endTime,t.type,t.value),n.F&&n.F.onCueMetadataChange(t.value)});var r=new tt(function(){var e=Array.from(n.g.textTracks).filter(function(e){return"metadata"==e.kind});e=v(e);for(var t=e.next();!t.done;t=e.next())t.value.mode="hidden"}).Nb().N(.5);n.$b.push(function(){r.stop()})}break;case"chapters":sw(e,t);break;default:sK(e)}}),e.u.C(r.textTracks,"removetrack",function(){return sK(e)}),e.u.C(r.textTracks,"change",function(){return sK(e)}));var o=rc(t.uri);r.src=function(e,t,n){try{if(!e.g.enabled)return t;var i=oJ(e);e:{switch(n.toLowerCase()){case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":var r=o4;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":r="m";break e}r=void 0}i.ot=r,i.su=!0;var a=oZ(i);return o0(t,a)}catch(e){return et("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.V,t.uri,uo[o]),(to()||td("Web0S"))&&r.load(),e.l=un,e.dispatchEvent(sm("streaming"));var s=new e9;return a3(r,HTMLMediaElement.HAVE_METADATA,e.u,function(){e.A.Cd(),s.resolve()}),a3(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.u,function(){var t;return F(function(n){var i,o,s,u;return 1==n.g?(""!=(o=(i=e).h.preferredAudioLanguage)&&i.Se(o,i.h.preferredVariantRole),(t=sA(e)).find(function(e){return"disabled"!=e.mode})?(0<t.length&&(e.da=!0),n.B(2)):C(n,new Promise(function(t){e.u.ca(r.textTracks,"change",t),new tt(t).N(1)}),2)):a?n.return():void(""!=(u=(s=e).h.preferredTextLanguage)&&s.Te(u,s.h.preferredTextRole,s.h.preferForcedSubs),M(n))})}),r.error?s.reject(s$(e)):"none"==r.preload&&(ee('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.'),s.resolve()),e.u.ca(r,"error",function(){s.reject(s$(e))}),new nX(s,function(){return s.reject(new ej(2,7,7001)),Promise.resolve()}).Z(function(){e.ec=!0})}(r,e,t)}),this.Ga=new oU(this.O,{Nf:function(e,t,n,i){var a=null;return e==r.O&&(a=n==r.O?r.O:r.W),e==r.W&&(a=n==r.O||t.mediaElement!=i.mediaElement?r.O:n==r.W?r.W:n==r.xb||n==r.ba?r.xb:n==r.zb?r.fe:null),e==r.xb&&(a=n==r.ba&&t.mediaElement==i.mediaElement?r.ae:r.fa),e==r.ae&&(a=s6(r.ba,r.Zd,r.fa,n,t,i)),e==r.Zd&&(a=s6(r.ba,r.Sd,r.fa,n,t,i)),e==r.Sd&&
1(a=s6(r.ba,r.ba,r.fa,n,t,i)),e==r.fe&&(a=n==r.zb&&t.mediaElement==i.mediaElement?r.zb:r.fa),(e==r.ba||e==r.zb)&&(a=r.fa),e==r.fa&&(a=i.mediaElement&&t.mediaElement==i.mediaElement?r.W:r.O),a},zf:function(e,t,n){return r.dispatchEvent(sm("onstatechange",(new Map).set("state",e.name))),a.get(e)(t,n)},handleError:function(e){return F(function(t){return 1==t.g?C(t,sv(r,e),2):t.return(e.mediaElement?r.W:r.O)})},gg:function(e){r.dispatchEvent(sm("onstateidle",(new Map).set("state",e.name)))}}),this.bf=new tt(function(){t9(r.i.variants,r.h.restrictions,r.fc)&&sB(r)}),t&&this.Zb(t,!0)}function sg(e){null!=e.L&&(e.L.release(),e.L=null)}function sm(e,t){return new nQ(e,t)}function sv(e,t){var n,i,r,a,o,s,u,l,c;return F(function(d){switch(d.g){case 1:return e.l!=s7&&(e.l=ue),n=e.$b.map(function(e){return e()}),e.$b=[],C(d,Promise.all(n),2);case 2:if(e.dispatchEvent(sm("unloading")),t.mimeType=null,t.startTime=null,t.uri=null,e.Fa&&(e.Fa.release(),e.Fa=null),t.mediaElement&&e.u.ob(),e.bf.stop(),e.yb&&(e.yb.release(),e.yb=null),e.Wc&&(e.Wc.stop(),e.Wc=null),!e.J){d.B(3);break}return C(d,e.J.stop(),4);case 4:e.J=null,e.$c=null;case 3:if(!e.s){d.B(5);break}return C(d,e.s.stop(),5);case 5:if(!e.j){d.B(7);break}return C(d,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.H&&(e.H.release(),e.H=null),e.A&&(e.A.release(),e.A=null),!e.G){d.B(9);break}return C(d,e.G.destroy(),10);case 10:e.G=null;case 9:if(e.F&&e.F.onAssetUnload(),!t.mediaElement||!t.mediaElement.src){d.B(11);break}return C(d,new Promise(function(e){return new tt(e).N(.1)}),12);case 12:for(t.mediaElement.removeAttribute("src"),t.mediaElement.load();t.mediaElement.lastChild;)t.mediaElement.removeChild(t.mediaElement.firstChild);case 11:if(!e.m){d.B(13);break}return C(d,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.Ob=null,e.M=null,e.i){for(r=(i=v(e.i.variants)).next();!r.done;r=i.next())for(s=(o=v([(a=r.value).audio,a.video])).next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(s=(l=v(e.i.textStreams)).next();!s.done;s=l.next())(c=s.value).segmentIndex&&c.segmentIndex.release()}e.i=null,e.o=new sf,e.Wd=null,s_(e),M(d)}})}function sy(e,t,n,i){t=v(t);for(var r=t.next();!r.done;r=t.next())if((r=r.value).data&&r.cueTime&&r.frames){var a=r.cueTime+n,o=i;o&&a>o&&(o=a);for(var s=v(r.frames),u=s.next();!u.done;u=s.next())sb(e,a,o,"org.id3",u.value);e.F&&e.F.onHlsTimedMetadata(r,a)}}function sb(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(sm("metadata",t))}function sw(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new tt(function(){t.mode="hidden"}).Nb().N(.5);e.$b.push(function(){n.stop()})}}function sT(e,t){return new iY(t,e.h.drm.updateExpirationTime)}function sx(e,t){e.M=new nB,e.M.g=nV,nF(e.M,t,Math.min(.5,t/2)),s_(e),e.Wc=new tt(function(){sS(e)}).Ca(.25)}function sS(e){switch(e.l){case un:if(e.g.ended)var t=!0;else{var n=av(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case ut:e:if(e.g.ended||aL(e.G))t=!0;else{if(e.i.presentationTimeline.T()){n=e.i.presentationTimeline.gb();var i=av(e.g.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=ab(e.g.buffered,e.g.currentTime);var r=t,a=(n=e.M).h.get(n.g);t=n.g,i=r||i>=a?nH:nV,n.g=i,t!=i&&s_(e)}function sE(e){if(e.J){var t=n2(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.J.configure(t)}if(e.m&&e.m.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{sP(e,e.i)}catch(t){sW(e,t)}e.s&&sU(e),(t=e.j.l)&&(!t.allowedByApplication||!t.allowedByKeySystem)&&sF(e)}if(e.D&&e.D.ke(e.h.streaming.forceHTTPS),e.G&&(e.G.configure(e.h.mediaSource),e.G.H=e.h.manifest.segmentRelativeVttTiming,t=e.h.textDisplayFactory,e.Wd!=t)){var n=t(),i=e.G,r=i.m;i.m=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.g&&(i.g.j=n),e.Wd=t,e.j&&(n=(t=e.j).j.get(e5))&&oC(t,n.stream,!0,0,!0)}e.s&&(e.s.configure(e.h.abr),e.h.abr.enabled?e.s.enable():e.s.disable(),sz(e)),e.M&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),nF(e.M,t,Math.min(.5,t/2))),e.i&&sZ(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd)}function sA(e){return Array.from(e.g.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function sk(e){return Array.from(e.g.textTracks).filter(function(e){return"chapters"==e.kind})}function sI(e,t){var n,i;return F(function(r){switch(r.g){case 1:if(i=us[n=rc(t)])return r.return(i);return D(r,2),C(r,rl(t,e.D,e.h.streaming.retryParameters),4);case 4:i=r.h,N(r,3);break;case 2:P(r);case 3:if(i)return r.return(i);throw new ej(1,2,2011,n)}})}function sC(e,t,n,i,r,a,o){var s;return F(function(u){if(1==u.g)return"text/vtt"!=r||o.length?C(u,sM(e,t,e.D,e.h.streaming.retryParameters),3):u.B(2);2!=u.g&&(t=aY(new Blob([sD(e,u.h,r,o)],{type:"text/vtt"})),r="text/vtt"),s=document.createElement("track");var l=e.V,c=t;try{if(l.g.enabled){var d=oJ(l);d.ot=o5,d.su=!0;var h=oZ(d),f=o0(c,h)}else f=c}catch(e){et("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),f=c}return s.src=f,s.label=a,s.kind=i,s.srclang=n,e.g.getAttribute("crossorigin")||e.g.setAttribute("crossorigin","anonymous"),e.g.appendChild(s),u.return(s)})}function sM(e,t,n,i){var r,a,o;return F(function(s){if(1==s.g){r=it,(a=n9([t],i)).method="GET";var u=e.V;try{u.g.enabled&&oQ(u,a,{ot:o5,su:!0})}catch(e){et("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return C(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)})}function sD(e,t,n,i){var r=tz[n];if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration,vttOffset:0},t=eP(t),function(e,t){function n(e){for(var n=e,i=v(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(i=Math.floor(n/60%60))?"0":"")+i+":"+(10>(r=Math.floor(n%60))?"0":"")+r+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var i=oV(e,[]);e="WEBVTT\n\n",i=v(i);for(var r=i.next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --\x3e "+n(r.endTime)+function(e){var t=[];
1switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case eh:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(r)+"\n",e+=r.payload+"\n\n";return e}(t=n.parseMedia(t,e),i);throw new ej(2,2,2014,n)}function sR(e){var t=so();return t.streaming.failureCallback=function(t){if(e.T()){var n=null;1001==t.code||1002==t.code?n=1:1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.ee(n))}},t.textDisplayFactory=function(){return e.Vc?new oX(e.g,e.Vc):new oH(e.g)},t}function sN(e,t){return F(function(n){if(1==n.g){var i,r;return C(n,(i=e,r=t,F(function(e){if(1==e.g){var t;return C(e,(t=i.j?i.j.l:null,F(function(e){var n,i,a,o,s,u,l,c,d;return 1==e.g?C(e,t7(r,0<r.offlineSessionIds.length),2):(ni(t,r),(n=r).textStreams=n.textStreams.filter(function(e){return tq(tU(e.mimeType,e.codecs))}),C(e,(i=r,F(function(e){switch(e.g){case 1:a=[],s=(o=v(i.imageStreams)).next();case 2:var t;if(s.done){e.B(4);break}if(l=(u=s.value).mimeType,nx.has(l)){e.B(5);break}if(!(c=nS.get(l))){nx.set(l,!1),e.B(5);break}return C(e,(t=c,new Promise(function(e){var n=new Image;n.src=t,"decode"in n?n.decode().then(function(){e(!0)}).catch(function(){e(!1)}):n.onload=n.onerror=function(){e(2===n.height)}})),7);case 7:d=e.h,nx.set(l,d);case 5:nx.get(l)&&a.push(u),s=o.next(),e.B(2);break;case 4:i.imageStreams=a,M(e)}})),0))})),2)}s1(r),M(e)})),2)}sP(e,t),M(n)})}function sP(e,t){if(e.l!=s7){t9(t.variants,e.h.restrictions,e.fc)&&e.j&&sK(e);var n=e.m?e.m.g:null;if(n&&e.m.u)for(var i=v(t.variants),r=i.next();!r.done;r=i.next())r=r.value,sL(e,n.keySystem,r.video),sL(e,n.keySystem,r.audio);s0(e,t)}}function sL(e,t,n){if(n){n=v(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){i=v(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,i1(e.m,r.initDataType,r.initData)}}}function s_(e){var t=e.Hd();if(e.o&&e.M&&e.A){var n=e.H;n.j=t,of(n),e.V&&(n=e.V,t||n.i||(n.i=!0),n.i&&t&&(n.l=!0),n.m=t),sO(e)}t=(new Map).set("buffering",t),e.dispatchEvent(sm("buffering",t))}function sj(e){var t=e.g.playbackRate;0!=t&&(e.H&&e.H.set(t),t=sm("ratechange"),e.dispatchEvent(t))}function sO(e){if(e.o&&e.M){var t=e.o.g;e.M.g==nV?sl(t,"buffering"):e.g.paused?sl(t,"paused"):e.g.ended?sl(t,"ended"):sl(t,"playing")}}function sU(e){try{s0(e,e.i)}catch(t){return sW(e,t),!1}var t=e.i.variants.filter(function(e){return nh(e)});return t=e.vb.create(t),e.s.setVariants(Array.from(t.values())),!0}function sB(e){return sU(e)?e.s.chooseVariant():null}function sF(e){var t=sB(e);t&&sV(e,t,!0,!0,0)}function sV(e,t,n,i,r){var a=e.j.l;if(t==a)i&&ok(e.j,t,i,r,!0);else{var o=e.o.h;o.h!=t&&(o.h=t,o.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),ok(e.j,t,i,r,void 0,n),i=null,a&&(i=na(a)),t=na(t),n?(n=(new Map).set("oldTrack",i).set("newTrack",t),e.L&&aC(e.L,t),s2(e,n=sm("adaptation",n))):sq(e,i,t)}}function sH(e,t){var n=Array.from(e.g.audioTracks).find(function(e){return e.enabled});t.enabled=!0,t.id!==n.id&&(n.enabled=!1),sq(e,n=nc(n),t=nc(t))}function sK(e){s2(e,sm("trackschanged"))}function sq(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.L&&aC(e.L,n),s2(e,n=sm("variantchanged",t))}function sG(e){s2(e,sm("textchanged"))}function sX(e){s2(e,sm("texttrackvisibility"))}function sz(e){var t=(new Map).set("newStatus",e.h.abr.enabled);s2(e,sm("abrstatuschanged",t))}function sW(e,t){if(e.l!=s7)if(function(e,t){if(1002!=t.code&&1011!=t.code||1!=t.category||e.l!=ut||!navigator.onLine)return!1;var n=e.h.streaming.maxDisabledTime;if(0==n)if(1011!=t.code)return!1;else n=1;t=e.Pa().find(function(e){return e.active});for(var i=e.i,r=v(i.variants),a=r.next();!a.done;a=r.next())(a=a.value).id===t.id&&(a.disabledUntilTime=Date.now()/1e3+n);return t9(i.variants,e.h.restrictions,e.fc),!!(t=sB(e))&&(i=e.Ma().video.reduce(function(e,t){return e+t.end-t.start},0),sV(e,t,!1,!0,i),e.bf.N(n),!0)}(e,t))t.handled=!0;else{var n=sm("error",(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function sY(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(sm(t,n))}function s$(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=0x100000000),n=n.toString(16)),new ej(2,3,3016,t,n,e.g.error.message)}function sJ(e,t){if(e.j){var n=Object.keys(t),i=1==n.length&&"00"==n[0],r=!1;if(n.length){n=v(e.i.variants);for(var a=n.next();!a.done;a=n.next()){a=a.value;var o=[];a.audio&&o.push(a.audio),a.video&&o.push(a.video),o=v(o);for(var s=o.next();!s.done;s=o.next()){var u=s.value;if(s=a.allowedByKeySystem,u.keyIds.size){a.allowedByKeySystem=!0,u=v(u.keyIds);for(var l=u.next();!l.done;l=u.next())l=l.value,l=t[i?"00":l],a.allowedByKeySystem=a.allowedByKeySystem&&!!l&&!ui.includes(l)}s!=a.allowedByKeySystem&&(r=!0)}}}(!r||sU(e))&&((t=e.j.l)&&!t.allowedByKeySystem&&sF(e),r&&sK(e))}}
1function sQ(e,t,n){e.J&&e.J.onExpirationUpdated&&e.J.onExpirationUpdated(t,n),t=sm("expirationupdated"),e.dispatchEvent(t)}function sZ(e,t,n){0<t&&(e.T()||e.$e(t)),n<(t=e.getDuration())&&(e.T()||e.Aa(n))}function s0(e,t){var n=Object.keys(e=e.m?e.m.Rc():{});n=n.length&&"00"==n[0];var i=!1,r=!1,a=new Set,o=new Set;t=v(t.variants);for(var s=t.next();!s.done;s=t.next()){s=s.value;var u=[];s.audio&&u.push(s.audio),s.video&&u.push(s.video),u=v(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).keyIds.size){l=v(l.keyIds);for(var c=l.next();!c.done;c=l.next()){c=c.value;var d=e[n?"00":c];d?ui.includes(d)&&o.add(d):a.add(c)}}s.allowedByApplication?s.allowedByKeySystem&&(i=!0):r=!0}if(!i)throw new ej(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}function s1(e){if(!e.variants.some(nh))throw new ej(2,4,4032)}function s2(e,t){F(function(n){if(1==n.g)return C(n,Promise.resolve(),2);e.l!=s7&&e.dispatchEvent(t),M(n)})}function s4(e){var t=new Set;e=v(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(tQ(n.language)):t.add("und");return t}function s3(e){var t=new Map,n=new Map;e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",a=[];i.language&&(r=tQ(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set),a=v(a);for(var o=a.next();!o.done;o=a.next())o=o.value,t.get(r).add(o),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(o,i.label))}var s=[];return t.forEach(function(e,t){e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=null;n.has(t)&&n.get(t).has(i)&&(r=n.get(t).get(i)),s.push({language:t,role:i,label:r})}}),s}function s5(){return new ej(2,7,7e3)}function s6(e,t,n,i,r,a){return i==e&&r.mediaElement==a.mediaElement&&r.uri==a.uri&&r.mimeType==a.mimeType?t:n}function s8(){return{mediaElement:null,mimeType:null,startTime:null,hd:NaN,uri:null}}function s9(e){return new Promise(function(t,n){e.nb=function(){return n(s5())},e.dd=function(){return t()},e.onError=function(e){return n(e)},e.fd=function(){return n(s5())}})}W("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",eh:"s",OTHER:"o"}),W("shaka.util.ConfigUtils",o7),o7.convertToConfigObject=st,o7.mergeConfigObjects=se,W("shaka.util.FairPlayUtils",sn),sn.commonFairPlayResponse=function(e,t){if(2===e){try{var n=tm(t.data)}catch(e){return}e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0);try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch(e){}e&&(t.data=eN(tA(n)))}},sn.conaxFairPlayRequest=function(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")},sn.ezdrmFairPlayRequest=function(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")},sn.verimatrixFairPlayRequest=function(e,t){2===e&&(e=tE(e=eP(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=tb("spc="+e))},sn.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=ty(t).split("skd://").pop().split("?").shift();var r=new ArrayBuffer(2*(i=e.atob(i)).length);r=new Uint16Array(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return sr(t,r,n)},sn.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=ty(e).split(";").pop(),sr(e,n,t))},sn.verimatrixInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=ty(e).split("skd://").pop(),sr(e,n,t))},sn.initDataTransform=sr,sn.defaultGetContentId=si,sn.isFairPlaySupported=function(){var e;return F(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(t,2),C(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(P(t),t.return(!1))})},W("shaka.util.PlayerConfiguration",sa),sa.mergeConfigObjects=ss,sa.createDefault=so,E(sp,n1),(b=sp.prototype).destroy=function(){var e,t=this;return F(function(n){switch(n.g){case 1:if(t.l==s7)return n.return();return sg(t),t.l=s7,e=oB(t.Ga,function(){return{node:t.O,payload:s8(),hb:!1}}),C(n,new Promise(function(t){e.Kb=function(){},e.dd=function(){t()},e.nb=function(){t()},e.onError=function(){t()},e.fd=function(){t()}}),2);case 2:return C(n,t.Ga.destroy(),3);case 3:if(t.Zc&&(t.Zc.release(),t.Zc=null),t.Yb&&(t.Yb.release(),t.Yb=null),t.u&&(t.u.release(),t.u=null),t.Pd=null,t.h=null,t.o=null,t.Vc=null,t.V=null,!t.D){n.B(4);break}return C(n,t.D.destroy(),5);case 5:t.D=null;case 4:t.s&&(t.s.release(),t.s=null),n1.prototype.release.call(t),M(n)}})},b.Zb=function(e,t){if(t=void 0===t||t,this.l==s7)return Promise.reject(s5());var n=s8();n.mediaElement=e,tn()||(t=!1);var i=t?this.xb:this.W;return(e=oB(this.Ga,function(){return{node:i,payload:n,hb:!1}})).Kb=function(){},s9(e)},b.mf=function(e){this.df=e},b.detach=function(){var e=this;if(this.l==s7)return Promise.reject(s5());var t=oB(this.Ga,function(){return{node:e.O,payload:s8(),hb:!1}});return t.Kb=function(){},s9(t)},b.re=function(e){var t=this;if(e=void 0===e||e,this.l==s7)return Promise.reject(s5());this.ec=!1,tn()||(e=!1),sg(this);var n=s8(),i=oB(this.Ga,function(i){var r=i.mediaElement&&e?t.xb:i.mediaElement?t.W:t.O;return n.mediaElement=i.mediaElement,{node:r,payload:n,hb:!1}});return i.Kb=function(){},s9(i)},b.Hg=function(e){this.hc=e},b.load=function(e,t,n){var i,r=this;if(this.hc=null,this.ec=!1,this.l==s7)return Promise.reject(s5());this.dispatchEvent(sm("loading"));var a=s8();
1a.uri=e,a.hd=Date.now()/1e3,n&&(a.mimeType=n),void 0!==t&&(a.startTime=t);var o=!function(e,t){if(!tn())return!0;var n=t.mimeType,i=t.uri||"";if(n||(n=uo[n=rc(i)]),n){if(""==(t.mediaElement||th()).canPlayType(n))return!1;if(!tn()||!(n in rd||rc(i)in rh)||("application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n)&&e.h.streaming.preferNativeHls)return!0;if(tu())return e.h.streaming.useNativeHlsOnSafari}return!1}(this,a)?this.ba:this.zb,s=oB(this.Ga,function(e){return null==e.mediaElement?null:(a.mediaElement=e.mediaElement,{node:o,payload:a,hb:!0})});return this.o=new sf,this.V=(i=this,new oY({getBandwidthEstimate:function(){return i.s?i.s.getBandwidthEstimate():NaN},Ma:function(){return i.Ma()},getCurrentTime:function(){return i.g?i.g.currentTime:0},Pa:function(){return i.Pa()},Sc:function(){return i.Sc()},T:function(){return i.T()}},i.h.cmcd)),s.Kb=function(){},new Promise(function(e,t){s.fd=function(){return t(new ej(2,7,7002))},s.dd=function(){e(),r.dispatchEvent(sm("loaded"))},s.nb=function(){return t(s5())},s.onError=function(e){return t(e)}})},b.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=st(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(nM("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),e.streaming.forceTransmux=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&e.streaming.lowLatencyMode&&(void 0==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),void 0==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01));var n=ss(this.h,e,sR(this));return sE(this),n},b.getConfiguration=function(){var e=sR(this);return ss(e,this.h,sR(this)),e},b.Cf=function(){if(this.g){var e=this.g.buffered.length;e=e?this.g.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.g.currentTime+t,this.vc().end)))return 1;if(!(e<=this.g.currentTime)&&e<t)return(e-this.g.currentTime)/(t-this.g.currentTime)}return 0},b.tg=function(){for(var e in this.h)delete this.h[e];ss(this.h,sR(this),sR(this)),sE(this)},b.If=function(){return this.l},b.Mf=function(){return this.g},b.kc=function(){return this.D},b.Gd=function(){return this.Ob},b.Ge=function(){return this.F?this.F:null},b.T=function(){return this.i?this.i.presentationTimeline.T():!!this.g&&!!this.g.src&&1/0==this.g.duration},b.jb=function(){return!!this.i&&this.i.presentationTimeline.jb()},b.$f=function(){if(this.i){var e=this.i.variants;return!!e.length&&!e[0].video}return!!this.g&&!!this.g.src&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},b.vc=function(){if(!this.ec)return{start:0,end:0};if(this.i){var e=this.i.presentationTimeline;return{start:e.Eb(),end:e.Na()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},b.Yf=function(){this.T()&&(this.g.currentTime=this.vc().end)},b.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},b.drmInfo=function(){return this.m?this.m.g:null},b.jc=function(){return this.m?this.m.jc():1/0},b.Rc=function(){return this.m?this.m.Rc():{}},b.Hd=function(){return!!this.M&&this.M.g==nV},b.Sc=function(){return this.g?this.H?this.H.i:1:0},b.Cg=function(e){0==e?ee("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(e),this.l==ut&&(this.s.playbackRateChanged(e),oA(this.j,1<Math.abs(e))))},b.qf=function(){var e=this.H.Qc();this.l==un&&this.H.set(e),this.l==ut&&(this.H.set(e),this.s.playbackRateChanged(e),oA(this.j,!1))},b.Pa=function(){if(this.i){for(var e=this.j?this.j.l:null,t=[],n=0,i=v(this.i.variants),r=i.next();!r.done;r=i.next())if(nh(r=r.value)){var a=na(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(e){return nc(e)}):[]},b.Gb=function(){if(this.i){for(var e=this.j?this.j.o:null,t=[],n=v(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=no(i=i.value);r.active=i==e,t.push(r)}return t}return this.g&&this.g.src&&this.g.textTracks?sA(this).map(function(e){return nl(e)}):[]},b.Gf=function(){return this.i?this.i.imageStreams.map(function(e){return ns(e)}):[]},b.Uf=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,T,x=this;return F(function(S){return 1==S.g?x.i?(n=x.i.imageStreams.find(function(t){return t.id==e}))?n.segmentIndex?S.B(3):C(S,n.createSegmentIndex(),3):S.return(null):S.B(2):2!=S.g?null==(i=n.segmentIndex.find(t))?S.return(null):(a=(r=n.segmentIndex.get(i)).tilesLayout||n.tilesLayout,o=/(\d+)x(\d+)/.exec(a))?(s=n.width||0,u=n.height||0,l=parseInt(o[1],10),c=parseInt(o[2],10),d=s/l,h=u/c,f=l*c,p=r.j-r.startTime,g=r.s||p/f,m=r.startTime,y=v=0,1<f&&(b=Math.floor((t-r.startTime)/g),m=r.startTime+b*g,v=b%l*d,y=Math.floor(b/l)*h),w=!1,(T=r.o)&&(w=!0,h=T.height,v=T.positionX,y=T.positionY,d=T.width),S.return({imageHeight:u,imageWidth:s,height:h,positionX:v,positionY:y,startTime:m,duration:g,uris:r.ya(),width:d,sprite:w})):S.return(null):S.return(null)})},b.Ue=function(e){if(this.i&&this.j){var t=this.i.textStreams.find(function(t){return t.id==e.id});t&&t!=this.j.o&&(sh(this.o.h,t,!1),oI(this.j,t),sG(this),this.wb=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){t=v(t=sA(this));for(var n=t.next();!n.done;n=t.next())nu(n=n.value)==e.id?n.mode=this.da?"showing":"hidden":n.mode="disabled";sG(this)}},b.ie=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.j){this.h.abr.enabled&&ee("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=this.i.variants.find(function(t){return t.id==e.id});i&&nh(i)&&(sV(this,i,!1,t,n),this.vb=new nO(i),sU(this))}else if(this.g&&this.g.audioTracks){for(n=(t=v(t=Array.from(this.g.audioTracks))).next();!n.done;n=t.next())if(nu(n=n.value)==e.id){sH(this,n);break}}},b.Bf=function(){return s3(this.Pa())},b.Sf=function(){return s3(this.Gb())},b.Af=function(){return Array.from(s4(this.Pa()))},b.Rf=function(){return Array.from(s4(this.Gb()))},b.Se=function(e,t,n){if(n=void 0===n?0:n,this.i&&this.A){this.vb=new nU(e,t||"",n,""),e=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},t=this.j.l;var i=this.vb.create(this.i.variants);n=null,i=v(i.values());for(var r=i.next();!r.done;r=i.next())r=r.value,(!n||e(n,t)>e(r,t))&&(n=r);n?(e=na(n),this.ie(e,!0)):sF(this)}else this.g&&this.g.audioTracks&&(e=np(this.Pa(),e,t||"",!1)[0])&&this.ie(e)},b.Te=function(e,t,n){n=void 0!==n&&n,this.i&&this.A?(this.wb=e,this.dc=t||"",this.ac=n,(e=np(this.i.textStreams,this.wb,this.dc,this.ac)[0]||null)&&e!=this.j.o&&(sh(this.o.h,e,!1),this.h.streaming.alwaysStreamText||this.Jd())&&(oI(this.j,e),sG(this))):(e=np(this.Gb(),e,t||"",n)[0])&&this.Ue(e)},b.vg=function(e){if(this.i&&this.A){for(var t=null,n=v(this.i.variants),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){t=i;break}null!=t&&(this.vb=new nU(t.language,"",0,e),sF(this))}else if(this.g&&this.g.audioTracks){for(n=Array.from(this.g.audioTracks),t=null,i=(n=v(n)).next();!i.done;i=n.next())(i=i.value).label==e&&(t=i);t&&sH(this,t)}},b.Jd=function(){var e=this.da;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?sA(this).some(function(e){return"showing"==e.mode}):e},b.He=function(){return this.g&&this.g.src&&this.g.textTracks?sk(this).map(function(e){return nl(e)}):[]},b.Df=function(e){var t=tQ(e),n=sk(this).filter(function(e){return tQ(e.language)==t});if(!n||!n.length)return[];e=[];var i=new Set;n=v(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&r.cues){r=v(r.cues);for(var a=r.next();!a.done;a=r.next()){var o=a.value;
1(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime},i.has(a)||(e.push(o),i.add(a))}}return e},b.Ag=function(e){if(e=!!e,this.da!=e){if(this.da=e,this.l==ut){var t,n;this.G.m.setTextVisibility(e),this.h.streaming.alwaysStreamText||(e?this.j.o||0<(e=np(this.i.textStreams,this.wb,this.dc,this.ac)).length&&(oI(this.j,e[0]),sG(this)):((n=(t=this.j).j.get(e5))&&(o_(n),oj(n).catch(function(){}),t.j.delete(e5)),t.o=null))}else if(this.g&&this.g.src&&this.g.textTracks){var i=sA(this);i=v(i);for(var r=i.next();!r.done;r=i.next())"disabled"!=(r=r.value).mode&&(r.mode=e?"showing":"hidden")}sX(this)}},b.Pf=function(){if(!this.T())return null;var e=this.Ga.l,t=0;if(this.A)t=this.A.Jc();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.i+t)):this.g&&this.g.getStartDate?isNaN((e=this.g.getStartDate()).getTime())?null:new Date(e.getTime()+1e3*t):null},b.Ie=function(){if(!this.T())return null;if(this.i)return new Date(1e3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},b.Ma=function(){if(this.l==ut)return this.G.Ma();var e={total:[],audio:[],video:[],text:[]};return this.l==un&&(e.total=aw(this.g.buffered)),e},b.getStats=function(){if(this.l!=ut&&this.l!=un)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,switchHistory:[],stateHistory:[]};sO(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.o;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.A&&(this.o.M=this.A.te(),this.o.O=this.A.ue()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.o;var i=Number(n.totalVideoFrames);t.L=Number(n.droppedVideoFrames),t.J=i,this.o.H=Number(n.corruptedVideoFrames)}n=this.m&&(n=this.m).H?n.H:NaN,this.o.s=n,this.l==ut&&((n=this.j.l)&&(this.o.A=(this.H?this.H.i:1)*n.bandwidth),n&&n.video&&(t=this.o,i=n.video.height||NaN,t.o=n.video.width||NaN,t.l=i),this.T()&&(n=this.Ie().valueOf()+1e3*this.vc().end,this.o.D=(Date.now()-n)/1e3),this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g),n=this.s.getBandwidthEstimate(),this.o.u=n),this.l==u
1n&&(n=this.o,t=e.videoHeight||NaN,n.o=e.videoWidth||NaN,n.l=t);var r=this.o;e=r.o,n=r.l,t=r.A,i=r.J;var a=r.L,o=r.H,s=r.O,u=r.M,l=r.u,c=r.i,d=r.m,h=r.F,f=r.j,p=sc(r.g,"playing"),g=sc(r.g,"paused"),m=sc(r.g,"buffering"),y=r.s,b=r.D,w=r.G,T=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=v(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(r.g),x=[];r=v(r.h.g);for(var S=r.next();!S.done;S=r.next())x.push({timestamp:(S=S.value).timestamp,id:S.id,type:S.type,fromAdaptation:S.fromAdaptation,bandwidth:S.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:a,corruptedFrames:o,stallsDetected:s,gapsJumped:u,estimatedBandwidth:l,completionPercent:c,loadLatency:d,manifestTimeSeconds:h,drmTimeSeconds:f,playTime:p,pauseTime:g,bufferingTime:m,licenseTime:y,liveLatency:b,maxSegmentDuration:w,stateHistory:T,switchHistory:x}},b.jf=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h=this;return F(function(f){switch(f.g){case 1:if(h.l!=ut&&h.l!=un)throw new ej(1,7,7004);if(i){f.B(2);break}return C(f,sI(h,e),3);case 3:i=f.h;case 2:if(s=[],h.F)try{s=h.F.getServerSideCuePoints()}catch(e){}if(h.l!=un){f.B(4);break}return o&&(n="forced"),C(f,sC(h,e,t,n,i,a||"",s),5);case 5:if(u=h.Gb().find(function(e){return e.language==t&&e.label==(a||"")&&e.kind==n}))return sK(h),f.return(u);throw new ej(1,2,2012);case 4:if(l=e6,1/0==(c=h.i.presentationTimeline.getDuration()))throw new ej(1,4,4033);if(!s.length){f.B(6);break}return C(f,sM(h,e,h.D,h.h.streaming.retryParameters),7);case 7:e=aY(new Blob([sD(h,f.h,i,s)],{type:"text/vtt"})),i="text/vtt";case 6:if(!tq(tU((d={id:h.$d++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ol(0,c,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:l.Y,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!0}).mimeType,d.codecs)))throw new ej(2,2,2014,i);return h.i.textStreams.push(d),sK(h),f.return(no(d))}})},b.kf=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b=this;return F(function(w){switch(w.g){case 1:if(b.l!=ut&&b.l!=un)throw new ej(1,7,7004);if(b.l==un)throw new ej(1,2,2016);if(t){w.B(2);break}return C(w,sI(b,e),3);case 3:t=w.h;case 2:if("text/vtt"!=t)throw new ej(1,2,2017,e);if(n=e6,1/0==(i=b.i.presentationTimeline.getDuration()))throw new ej(1,4,4045);return C(w,sM(b,e,b.D,b.h.streaming.retryParameters),4);case 4:if(r=w.h,!(a=tz[t]))throw new ej(2,2,2014,t);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:i,vttOffset:0},u=eP(r),l=o.parseMedia(u,s),c=[],d={},f=(h=v(l)).next();!f.done;d={Sb:d.Sb},f=h.next())p=f.value,d.Sb=e1([e],[p.payload])[0],g=new af(p.startTime,p.endTime,function(e){return function(){return[e.Sb]}}(d),0,null,null,0,0,1/0),d.Sb.includes("#xywh")&&4===(m=d.Sb.split("#xywh=")[1].split(",")).length&&g.Ze({height:parseInt(m[3],10),positionX:parseInt(m[0],10),positionY:parseInt(m[1],10),width:parseInt(m[2],10)}),c.push(g);return y={id:b.$d++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ou(c),mimeType:t||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:n.Xb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",external:!0},b.i.imageStreams.push(y),sK(b),w.return(ns(y))}})},b.hf=function(e,t,n){var i,r,a,o=this;return F(function(s){switch(s.g){case 1:if(o.l!=ut&&o.l!=un)throw new ej(1,7,7004);if(n){s.B(2);break}return C(s,sI(o,e),3);case 3:n=s.h;case 2:if(i=[],o.F)try{i=o.F.getServerSideCuePoints()}catch(e){}return C(s,sC(o,e,t,"chapters",n,"",i),4);case 4:if(r=s.h,!(a=o.He().find(function(e){return e.language==t}))){s.B(5);break}return C(s,new Promise(function(e,t){o.u.ca(r,"load",e),o.u.ca(r,"error",function(){t(new ej(1,2,2015))})}),6);case 6:return s.return(a);case 5:throw new ej(1,2,2012)}})},b.le=function(e,t){this.fc.width=e,this.fc.height=t},b.ee=function(e){if(this.l==ut){var t=this.j;if(e=void 0===e?.1:e,t.i.g)t=!1;else if(t.s)t=!1;else{for(var n=v(t.j.values()),i=n.next();!i.done;i=n.next())!(i=i.value).oc||i.sa||i.Ka||(i.oc=!1,oL(t,i,e));t=!0}}else t=!1;return t},b.Jf=function(){return ee("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."),this.i},b.Kf=function(){return this.$c},b.af=function(e){this.Vc=e},W("shaka.Player",sp),sp.prototype.setVideoContainer=sp.prototype.af,sp.prototype.getManifestParserFactory=sp.prototype.Kf,sp.prototype.getManifest=sp.prototype.Jf,sp.prototype.retryStreaming=sp.prototype.ee,sp.prototype.setMaxHardwareResolution=sp.prototype.le,sp.prototype.addChapter
1sTrack=sp.prototype.hf,sp.prototype.addThumbnailsTrack=sp.prototype.kf,sp.prototype.addTextTrackAsync=sp.prototype.jf,sp.prototype.getStats=sp.prototype.getStats,sp.prototype.getBufferedInfo=sp.prototype.Ma,sp.prototype.getPresentationStartTimeAsDate=sp.prototype.Ie,sp.prototype.getPlayheadTimeAsDate=sp.prototype.Pf,sp.prototype.setTextTrackVisibility=sp.prototype.Ag,sp.prototype.getChapters=sp.prototype.Df,sp.prototype.getChaptersTracks=sp.prototype.He,sp.prototype.isTextTrackVisible=sp.prototype.Jd,sp.prototype.selectVariantsByLabel=sp.prototype.vg,sp.prototype.selectTextLanguage=sp.prototype.Te,sp.prototype.selectAudioLanguage=sp.prototype.Se,sp.prototype.getTextLanguages=sp.prototype.Rf,sp.prototype.getAudioLanguages=sp.prototype.Af,sp.prototype.getTextLanguagesAndRoles=sp.prototype.Sf,sp.prototype.getAudioLanguagesAndRoles=sp.prototype.Bf,sp.prototype.selectVariantTrack=sp.prototype.ie,sp.prototype.selectTextTrack=sp.prototype.Ue,sp.prototype.getThumbnails=sp.prototype.Uf,sp.prototype.getImageTracks=sp.prototype.Gf,sp.prototype.getTextTracks=sp.prototype.Gb,sp.prototype.getVariantTracks=sp.prototype.Pa,sp.prototype.cancelTrickPlay=sp.prototype.qf,sp.prototype.trickPlay=sp.prototype.Cg,sp.prototype.getPlaybackRate=sp.prototype.Sc,sp.prototype.isBuffering=sp.prototype.Hd,sp.prototype.getKeyStatuses=sp.prototype.Rc,sp.prototype.getExpiration=sp.prototype.jc,sp.prototype.drmInfo=sp.prototype.drmInfo,sp.prototype.keySystem=sp.prototype.keySystem,sp.prototype.goToLive=sp.prototype.Yf,sp.prototype.seekRange=sp.prototype.vc,sp.prototype.isAudioOnly=sp.prototype.$f,sp.prototype.isInProgress=sp.prototype.jb,sp.prototype.isLive=sp.prototype.T,sp.prototype.getAdManager=sp.prototype.Ge,sp.prototype.getAssetUri=sp.prototype.Gd,sp.prototype.getNetworkingEngine=sp.prototype.kc,sp.prototype.getMediaElement=sp.prototype.Mf,sp.prototype.getLoadMode=sp.prototype.If,sp.prototype.resetConfiguration=sp.prototype.tg,sp.prototype.getBufferFullness=sp.prototype.Cf,sp.prototype.getConfiguration=sp.prototype.getConfiguration,sp.prototype.configure=sp.prototype.configure,sp.prototype.load=sp.prototype.load,sp.prototype.updateStartTime=sp.prototype.Hg,sp.prototype.unload=sp.prototype.re,sp.prototype.detach=sp.prototype.detach,sp.prototype.attachCanvas=sp.prototype.mf,sp.prototype.attach=sp.prototype.Zb,sp.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,F(function(o){if(1==o.g){var s,u,l,c,d,h;return t={},e?C(o,F(function(e){return 1==e.g?(s="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),l={initDataTypes:["cenc"],videoCapabilities:u=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}]},c=[{videoCapabilities:u,persistentState:"required",sessionTypes:["persistent-license"]},l],d=new Map,h=function(e){var t,n,i;return F(function(r){switch(r.g){case 1:if(D(r,2),"org.w3.clearkey"===e&&tc())throw Error("Unsupported keySystem");return C(r,navigator.requestMediaKeySystemAccess(e,c),4);case 4:return i=!!(n=(t=r.h).getConfiguration().sessionTypes)&&n.includes("persistent-license"),td("Tizen 3")&&(i=!1),d.set(e,{persistentState:i}),C(r,t.createMediaKeys(),5);case 5:N(r,0);break;case 2:P(r),d.set(e,null),M(r)}})},C(e,Promise.all(s.map(function(e){return h(e)})),2)):e.return(ih(d))}),3):o.B(2)}2!=o.g&&(t=o.h);var f={};if(tn()){for(var p in rd)f[p]=!0;for(var g in rh)f[g]=!0}p={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"},g=v(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=g.next();!m.done;m=g.next())f[m=m.value]=tn()?!!rd[m]:ti(m);for(var b in p)f[b]=tn()?!!rh[b]:ti(p[b]);for(n=f,b='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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",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(aJ)),f={},p=(b=v(b)).next();!p.done;p=b.next())f[p=p.value]=tn()?!!tq(p)||er(p)||tP(p):ti(p),f[g=p.split(";")[0]]=f[g]||f[p];for(a in i={manifest:n,media:f,drm:t},r=ur)i[a]=r[a]();return o.return(i)})},sp.isBrowserSupported=function(){if(e.Promise||ee("A Promise implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||td("Trident/"))return!1;var t=tc();return(!t||!(13>t))&&!!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)&&(!!tn()||ti("application/x-mpegurl"))},sp.setAdManagerFactory=function(e){ua=e},sp.registerSupportPlugin=function(e,t){ur[e]=t},sp.prototype.destroy=sp.prototype.destroy;var s7=0,ue=1,ut=2,un=3;sp.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3},sp.version="v4.3.13";nN=new function(e){this.g=e,this.i=nD,this.h=nR}(new nC(Number("4"),Number("3")));var ui=["output-restricted","internal-error"],ur={},ua=null,uo={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/d
1ash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},us={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 uu(){this.h=[],this.j=this.i=this.g=0}function ul(e,t,n){var i=this;this.h=e,this.g=t,this.m=n,this.i=!1,this.l=this.g.getVolume(),this.j=new is,this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function uc(t,n,i,r){var a=this;this.o=t,this.i=n,this.u=!1,this.s=null,this.A=NaN,this.l=r,this.j=null,this.h=new is,google.ima.settings.setLocale(i),(t=new google.ima.AdDisplayContainer(this.o,this.i)).initialize(),this.m=new google.ima.AdsLoader(t),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.3.13"),this.g=null,this.h.ca(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){var n=a,i=t;n.l(new nQ("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-n.A))),n.g=i.getAdsManager(n.i),n.l(new nQ("ima-ad-manager-loaded",(new Map).set("imaAdManager",n.g)));var r=n.g.getCuePoints();if(r.length){i=[],r=v(r);for(var o=r.next();!o.done;o=r.next())i.push({start:o.value,end:null});n.l(new nQ("ad-cue-points-changed",(new Map).set("cuepoints",i)))}var s=n;function u(e,t){e=(new Map).set("originalEvent",e),s.l(new nQ(t,e))}s.h.C(s.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){ud(s,e)}),s.h.C(s.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){uf(s,e)}),s.h.C(s.g,google.ima.AdEvent.Type.STARTED,function(e){uf(s,e)}),s.h.C(s.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){u(e,"ad-first-quartile")}),s.h.C(s.g,google.ima.AdEvent.Type.MIDPOINT,function(e){u(e,"ad-midpoint")}),s.h.C(s.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){u(e,"ad-third-quartile")}),s.h.C(s.g,google.ima.AdEvent.Type.COMPLETE,function(e){u(e,"ad-complete")}
1),s.h.C(s.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(e){up(s,e)}),s.h.C(s.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){up(s,e)}),s.h.C(s.g,google.ima.AdEvent.Type.SKIPPED,function(e){u(e,"ad-skipped")}),s.h.C(s.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){u(e,"ad-volume-changed")}),s.h.C(s.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){u(e,"ad-muted")}),s.h.C(s.g,google.ima.AdEvent.Type.PAUSED,function(e){s.j&&(s.j.i=!0,u(e,"ad-paused"))}),s.h.C(s.g,google.ima.AdEvent.Type.RESUMED,function(e){s.j&&(s.j.i=!1,u(e,"ad-resumed"))}),s.h.C(s.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(e){s.j&&u(e,"ad-skip-state-changed")}),s.h.C(s.g,google.ima.AdEvent.Type.CLICK,function(e){u(e,"ad-clicked")}),s.h.C(s.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){u(e,"ad-progress")}),s.h.C(s.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){u(e,"ad-buffering")}),s.h.C(s.g,google.ima.AdEvent.Type.IMPRESSION,function(e){u(e,"ad-impression")}),s.h.C(s.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){u(e,"ad-duration-changed")}),s.h.C(s.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){u(e,"ad-closed")}),s.h.C(s.g,google.ima.AdEvent.Type.LOADED,function(e){u(e,"ad-loaded")}),s.h.C(s.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){u(e,"all-ads-completed")}),s.h.C(s.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){u(e,"ad-linear-changed")}),s.h.C(s.g,google.ima.AdEvent.Type.AD_METADATA,function(e){u(e,"ad-metadata")}),s.h.C(s.g,google.ima.AdEvent.Type.LOG,function(e){u(e,"ad-recoverable-error")}),s.h.C(s.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){u(e,"ad-break-ready")}),s.h.C(s.g,google.ima.AdEvent.Type.INTERACTION,function(e){u(e,"ad-interaction")});try{n.g.init(n.i.offsetWidth,n.i.offsetHeight,uh(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),n.h.C(n.i,"loadeddata",function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight,uh(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in e?(n.s=new ResizeObserver(function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight,uh(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),n.s.observe(n.i)):n.h.C(document,"fullscreenchange",function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight,uh(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),n.u?n.g.start():n.h.ca(n.i,"play",function(){n.u=!0,n.g.start()})}catch(e){up(n,null)}}),this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){ud(a,e)}),this.h.C(this.i,"ended",function(){a.m.contentComplete()}),this.h.ca(this.i,"play",function(){a.u=!0})}function ud(e,t){t.getError(),up(e,null),e.l(new nQ("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function uh(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function uf(e,t){var n=t.getAd();n?(e.j=new ul(n,e.g,e.i),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new nQ("ad-started",t)),e.j.isLinear()&&(e.o.setAttribute("ad-active","true"),e.i.pause(),e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))):ee("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function up(e,t){e.l(new nQ("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.o.removeAttribute("ad-active"),e.i.ended||e.i.play())}function ug(e,t){this.i=e,this.h=null,this.g=t}function um(e,t,n,i){var r=this;this.s=e,this.l=t,this.j=null,this.G=NaN,this.i=i,this.F=!1,this.u=this.m=this.o=null,this.A="",this.D=[],this.h=new is,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new nQ("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){var t,n;t=r,n=e,t.i(new nQ("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.G))),n=n.getStreamData().url,t.j.resolve(n),t.j=null,t.F||t.h.C(t.l,"seeked",function(){var e=t.l.currentTime;if(0!=e){t.g.streamTimeForContentTime(e);var n=t.g.previousCuePointForStreamTime(e);n&&!n.played&&(t.o=e,t.l.currentTime=n.start)}})}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.A.length?r.j.resolve(r.A):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){r.m=new ug(e=e.getAd(),r.l),r.u&&(r.m.h=r.u),r.i(new nQ("ad-started",(new Map).set("ad",r.m))),r.s.setAttribute("ad-active","true")}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.s.removeAttribute("ad-active");var e=r.l.currentTime;r.o&&r.o>e&&(r.l.currentTime=r.o,r.o=null)}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.u=e.getStreamData().adProgressData,r.m&&(r.m.h=r.u)}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new nQ("ad-first-quartile"))}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new nQ("ad-mi
1dpoint"))}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new nQ("ad-third-quartile"))}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new nQ("ad-complete")),r.i(new nQ("ad-stopped")),r.s.removeAttribute("ad-active"),r.m=null}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new nQ("ad-skipped")),r.i(new nQ("ad-stopped"))}),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=v(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.D=e,r.i(new nQ("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function uv(){n1.call(this),this.g=this.i=null,this.h=new uu,this.j=navigator.language}function uy(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof nQ){var n={};for(i in t)(e=t[i])&&"object"==typeof e?"detail"==i&&(n[i]=e):i in Event||(n[i]=e);return n}if(t instanceof Error){var i=new Set(["name","message","stack"]);for(n in t)i.add(n);for(n=(e=v(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())i.add(n.value);for(e={},n=(i=v(i)).next();!n.done;n=i.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=v(aw(t))).next();!n.done;n=t.next())e=(n=n.value).end,i.start.push(n.start),i.end.push(e);t=i}else t=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}})}function ub(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n,i=NaN;else if("-Infinity"==t)i=-1/0;else if("Infinity"==t)i=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__){i={length:(n=t).length,start:function(e){return n.start[e]},end:function(e){return n.end[e]}}}else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)i=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(i in t=Error((e=t.contents).message),e)t[i]=e[i];i=t}else i=t;return i})}(b=ul.prototype).getDuration=function(){return this.h.getDuration()},b.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()},b.getRemainingTime=function(){return this.g.getRemainingTime()},b.isPaused=function(){return this.i},b.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()},b.getTimeUntilSkippable=function(){var e=this.h.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},b.canSkipNow=function(){return this.g.getAdSkippableState()},b.skip=function(){return this.g.skip()},b.pause=function(){return this.g.pause()},b.play=function(){return this.g.resume()},b.getVolume=function(){return this.g.getVolume()},b.setVolume=function(e){return this.g.setVolume(e)},b.isMuted=function(){return 0==this.g.getVolume()},b.isLinear=function(){return this.h.isLinear()},b.resize=function(e,t){var n=!1,i=this.m;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.g.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},b.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},b.getSequenceLength=function(){var e=this.h.getAdPodInfo();return null==e?1:e.getTotalAds()},b.getPositionInSequence=function(){var e=this.h.getAdPodInfo();return null==e?1:e.getAdPosition()},b.getTitle=function(){return this.h.getTitle()},b.getDescription=function(){return this.h.getDescription()},b.release=function(){this.g=this.h=null},W("shaka.ads.ClientSideAd",ul),ul.prototype.release=ul.prototype.release,ul.prototype.getDescription=ul.prototype.getDescription,ul.prototype.getTitle=ul.prototype.getTitle,ul.prototype.getPositionInSequence=ul.prototype.getPositionInSequence,ul.prototype.getSequenceLength=ul.prototype.getSequenceLength,ul.prototype.setMuted=ul.prototype.setMuted,ul.prototype.resize=ul.prototype.resize,ul.prototype.isLinear=ul.prototype.isLinear,ul.prototype.isMuted=ul.prototype.isMuted,ul.prototype.setVolume=ul.prototype.setVolume,ul.prototype.getVolume=ul.prototype.getVolume,ul.prototype.play=ul.prototype.play,ul.prototype.pause=ul.prototype.pause,ul.prototype.skip=ul.prototype.skip,ul.prototype.canSkipNow=ul.prototype.canSkipNow,ul.prototype.getTimeUntilSkippable=ul.prototype.getTimeUntilSkippable,ul.prototype.isSkippable=ul.prototype.isSkippable,ul.prototype.isPaused=ul.prototype.isPaused,ul.prototype.getRemainingTime=ul.prototype.getRemainingTime,ul.prototype.getMinSuggestedDuration=ul.prototype.getMinSuggestedDuration,ul.prototype.getDuration=ul.prototype.getDuration,uc.prototype.stop=function(){this.g&&this.g.stop(),this.o&&oG(this.o)},uc.prototype.release=function(){this.stop(),this.s&&this.s.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy()},(b=ug.prototype).getDuration=function(){return this.h?this.h.duration:-1},b.getMinSuggestedDuration=function(){return this.getDuration()},b.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},b.isPaused=function(){return this.g.paused},b.isSkippable=function(){return this.i.isSkippable()},b.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},b.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},b.skip=function(){this.g.currentTime+=this.getRemainingTime()},b.pause=function(){return this.g.pause()},b.play=function(){return this.g.play()},b.getVolume=function(){return this.g.volume},b.setVolume=function(e){this.g.volume=e},b.isMuted=function(){return this.g.muted},b.isLinear=function(){return!0},b.resize=function(){},b.setMuted=function(e){this.g.muted=e},b.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},b.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},b.getTitle=function(){return this.i.getTitle()},b.getDescription=function(){return this.i.getDescription()},b.release=function(){this.g=this.h=this.i=null},W("shaka.ads.ServerSideAd",ug),ug.prototype.release=ug.prototype.release,ug.prototype.getDescription=ug.prototype.getDescription,ug.prototype.getTitle=ug.prototype.getTitle,ug.prototype.getPositionInSequence=ug.prototype.getPositionInSequence,ug.prototype.getSequenceLength=ug.prototype.getSequenceLength,ug.prototype.setMuted=ug.prototype.setMuted,ug.prototype.resize=ug.prototype.resize,ug.prototype.isLinear=ug.prototype.isLinear,ug.prototype.isMuted=ug.prototype.isMuted,ug.prototype.setVolume=ug.prototype.setVolume,ug.prototype.getVolume=ug.prototype.getVolume,ug.prototype.play=ug.prototype.play,ug.prototype.pause=ug.prototype.pause,ug.prototype.skip=ug.prototype.skip,ug.prototype.canSkipNow=ug.prototype.canSkipNow,ug.prototype.getTimeUntilSkippable=ug.prototype.getTimeUntilSkippable,ug.prototype.isSkippable=ug.prototype.isSkippable,ug.prototype.isPaused=ug.prototype.isPaused,ug.prototype.getRemainingTime=ug.prototype.getRemainingTime,ug.prototype.getMinSuggestedDuration=ug.prototype.getMinSuggestedDuration,ug.prototype.getDuration=ug.prototype.getDuration,um.prototype.stop=function(){this.A="",this.o=null,this.D=[]},um.prototype.release=function(){this.stop(),this.h&&this.h.release()},um.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},E(uv,n1),(b=uv.prototype).setLocale=function(e){this.j=e},b.initClientSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new ej(2,10,1e4);this.i&&this.i.release(),this.i=new uc(t,n,this.j,function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.h.h.push(e.loadTime);break;case"ad-started":i.h.g++;break;case"ad-complete":i.h.i++;break;case"ad-skipped":i.h.j++}i.dispatchEvent(e)})},b.release=function(){this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),n1.prototype.release.call(this)},b.onAssetUnload=function(){this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new nQ("ad-stopped")),this.h=new uu},b.requestClientSideAds=function(e){if(!this.i)throw new ej(1,10,10001);var t=this.i;t.A=Date.now()/1e3,t.m.requestAds(e)},b.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new ej(2,10,10002);this.g&&this.g.release(),this.g=new um(t,n,this.j,function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.h.h.push(e.loadTime);break;case"ad-started":i.h.g++;break;case"ad-complete":i.h.i++;break;case"ad-skipped":i.h.j++}i.dispatchEvent(e)})},b.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new ej(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&ee('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.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.3.13",(n=this.g).j?e=Promise.reject(new ej(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.F=!0),n.j=new e9,n.g.requestStream(e),n.A=t||"",n.G=Date.now()/1e3,e=n.j),e},b.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new ej(1,10,10003);(e.mpt||e.mpv)&&ee('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.'),e.mpt="Shaka Player",e.mpv="v4.3.13",this.g.g.replaceAdTagParameters(e)},b.getServerSideCuePoints=function(){if(!this.g)throw new ej(1,10,10003);return this.g.D},b.getStats=function(){var e=this.h;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},b.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(t,n,e.startTime)}},b.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},b.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},W("shaka.ads.AdManager",uv),uv.prototype.onCueMetadataChange=uv.prototype.onCueMetadataChange,uv.prototype.onHlsTimedMetadata=uv.prototype.onHlsTimedMetadata,uv.prototype.onDashTimedMetadata=uv.prototype.onDashTimedMetadata,uv.prototype.getStats=uv.prototype.getStats,uv.prototype.getServerSideCuePoints=uv.prototype.getServerSideCuePoints,uv.prototype.replaceServerSideAdTagParameters=uv.prototype.replaceServerSideAdTagParameters,uv.prototype.requestServerSideStream=uv.prototype.requestServerSideStream,uv.prototype.initServerSide=uv.prototype.initServerSide,uv.prototype.requestClientSideAds=uv.prototype.requestClientSideAds,uv.prototype.onAssetUnload=uv.prototype.onAssetUnload,uv.prototype.release=uv.prototype.release,uv.prototype.initClientSide=uv.prototype.initClientSide,uv.prototype.setLocale=uv.prototype.setLocale,uv.ADS_
1LOADED="ads-loaded",uv.AD_STARTED="ad-started",uv.AD_FIRST_QUARTILE="ad-first-quartile",uv.AD_MIDPOINT="ad-midpoint",uv.AD_THIRD_QUARTILE="ad-third-quartile",uv.AD_COMPLETE="ad-complete",uv.AD_STOPPED="ad-stopped",uv.AD_SKIPPED="ad-skipped",uv.AD_VOLUME_CHANGED="ad-volume-changed",uv.AD_MUTED="ad-muted",uv.AD_PAUSED="ad-paused",uv.AD_RESUMED="ad-resumed",uv.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",uv.CUEPOINTS_CHANGED="ad-cue-points-changed",uv.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",uv.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",uv.AD_CLICKED="ad-clicked",uv.AD_PROGRESS="ad-progress",uv.AD_BUFFERING="ad-buffering",uv.AD_IMPRESSION="ad-impression",uv.AD_DURATION_CHANGED="ad-duration-changed",uv.AD_CLOSED="ad-closed",uv.AD_LOADED="ad-loaded",uv.ALL_ADS_COMPLETED="all-ads-completed",uv.AD_LINEAR_CHANGED="ad-linear-changed",uv.AD_METADATA="ad-metadata",uv.AD_RECOVERABLE_ERROR="ad-recoverable-error",uv.AD_BREAK_READY="ad-break-ready",uv.AD_INTERACTION="ad-interaction",ua=function(){return new uv};var uw="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),uT="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ux=["loop","playbackRate"],uS=["pause","play"],uE={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},uA={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},uk={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},uI=[["getConfiguration","configure"]],uC=[["isTextTrackVisible","setTextTrackVisibility"]],uM="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),uD=["attach","attachCanvas","detach","load","unload"];function uR(e,t,n,i,r,a,o){var s=this;this.G=e,this.M=o,this.j=new tt(t),this.O=n,this.u=!1,this.s=i,this.F=r,this.J=a,this.h=this.m=!1,this.L="",this.o=null,this.A=function(){return uj(s)},this.D=function(e,t){switch((e=ub(t)).type){case"event":var n=e.targetName,i=nZ(e.event);s.s(n,i);break;case"update":for(i in n=e.update)for(var r in e=s.g[i]||{},n[i])e[r]=n[i][r];s.u&&(s.O(),s.u=!1);break;case"asyncComplete":if(i=e.id,r=e.error,e=s.i[i],delete s.i[i],e)if(r){for(n in i=new ej(r.severity,r.category,r.code),r)i[n]=r[n];e.reject(i)}else e.resolve()}},this.g={video:{},player:{}},this.H=0,this.i={},this.l=null,uK.add(this)}function uN(e,t,n){uV=n,n.addUpdateListener(e.A),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),uj(e),uU(e,{type:"init",initState:t,appData:e.o}),e.l.resolve()}function uP(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new ej(2,8,n,t))}function uL(e,t){var n=e.J();e.l=new e9,e.u=!0,uN(e,n,t)}function u_(e){var t=uV;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function uj(e){var t=!!uV&&"connected"==uV.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};uO(e)}e.h=t,e.L=t?uV.receiver.friendlyName:"",e.j.Nb()}function uO(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new ej(1,7,7e3))}}
1function uU(e,t){t=uy(t);var n=uV;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},en)}catch(i){throw t=new ej(2,8,8005,i),n=new nQ("error",(new Map).set("detail",t)),e.s("player",n),e.Bb(),t}}(b=uR.prototype).destroy=function(){return uK.delete(this),uO(this),uV&&u_(this),this.j&&(this.j.stop(),this.j=null),this.F=this.s=null,this.h=this.m=!1,this.D=this.A=this.l=this.i=this.g=this.o=null,Promise.resolve()},b.ta=function(){return this.h},b.ce=function(){return this.L},b.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Nb();var t=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=v(uK),n=t.next();!n.done;n=t.next())uL(n.value,e)},function(e){for(var t=v(uK),n=t.next();!n.done;n=t.next())n=n.value,uF="available"==e,n.j.Nb()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),uF&&this.j.N(uB),(t=uV)&&t.status!=chrome.cast.SessionStatus.STOPPED?uL(this,t):uV=null}else e.__onGCastApiAvailable!==uq&&(uH=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=uq)},b.je=function(e){this.o=e,this.h&&uU(this,{type:"appData",appData:this.o})},b.cast=function(e){var t=this;return F(function(n){if(!t.m)throw new ej(1,8,8e3);if(!uF)throw new ej(1,8,8001);if(t.h)throw new ej(1,8,8002);return t.l=new e9,chrome.cast.requestSession(function(n){return uN(t,e,n)},function(e){return uP(t,e)}),C(n,t.l,0)})},b.Bb=function(){if(this.h){if(uO(this),uV){u_(this);try{uV.stop(function(){},function(){})}catch(e){}uV=null}uj(this)}},b.get=function(e,t){var n=this;if("video"==e){if(uS.includes(t))return function(){return n.Qe.apply(n,[e,t].concat(y(V.apply(0,arguments))))}}else if("player"==e){if(uk[t]&&!this.get("player","isLive")())return function(){};if(uM.includes(t))return function(){return n.Qe.apply(n,[e,t].concat(y(V.apply(0,arguments))))};if(uD.includes(t))return function(){return n.qg.apply(n,[e,t].concat(y(V.apply(0,arguments))))};if(uE[t]||uA[t])return function(){return n.g[e][t]}}return this.g[e][t]},b.set=function(e,t,n){this.g[e][t]=n,uU(this,{type:"set",targetName:e,property:t,value:n})},b.Qe=function(e,t){uU(this,{type:"call",targetName:e,methodName:t,args:V.apply(2,arguments)})},b.qg=function(e,t){var n=V.apply(2,arguments),i=new e9,r=this.H.toString();this.H++,this.i[r]=i;try{uU(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var uB=.02,uF=!1,uV=null,uH=null,uK=new Set;function uq(t){if(uH?e.__onGCastApiAvailable=uH:delete e.__onGCastApiAvailable,uH=null,t)for(var n=v(uK),i=n.next();!i.done;i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function uG(e,t,n,i){i=void 0!==i&&i,n1.call(this);var r=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.D=n,this.A=i,this.u=new Map,this.g=new uR(n,function(){return uW(r)},function(){return uY(r)},function(e,t){return uJ(r,e,t)},function(){return u$(r)},function(){return uz(r)},i),function(e){e.g.init(),e.m=new is;for(var t,n,i=v(uw),r=i.next();!r.done;r=i.next())e.m.C(e.i,r.value,function(t){e.g.ta()||(t=nZ(t),e.j.dispatchEvent(t))});for(var a in n0)e.m.C(e.h,n0[a],function(t){e.g.ta()||e.o.dispatchEvent(t)});for(var o in e.l={},i={},e.i)i.Tb=o,Object.defineProperty(e.l,i.Tb,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.j.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.j.removeEventListener(t,n,i)};if(e.g.ta()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.ta()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.Tb)}}(i),set:function(t){return function(n){var i=t.Tb;e.g.ta()?e.g.set("video",i,n):e.i[i]=n}}(i)}),i={Tb:i.Tb};e.s={},uX(e,function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){var n=e,i=t;if(n.u.has(i)&&(i=n.u.get(i)),"addEventListener"==i)return function(e,t,i){return n.o.addEventListener(e,t,i)};if("removeEventListener"==i)return function(e,t,i){return n.o.removeEventListener(e,t,i)};if("getMediaElement"==i)return function(){return n.l};
1if("getSharedConfiguration"==i)return n.g.get("player","getConfiguration");if("getNetworkingEngine"==i)return function(){return n.h.kc()};if("getDrmEngine"==i)return function(){return n.h.m};if("getAdManager"==i)return function(){return n.h.Ge()};if("setVideoContainer"==i)return function(e){return n.h.af(e)};if(n.g.ta()){if("getManifest"==i||"drmInfo"==i)return function(){return ee(i+"() does not work while casting!"),null};if("attach"==i||"detach"==i)return function(){return ee(i+"() does not work while casting!"),Promise.resolve()}}return n.g.ta()&&0==Object.keys(n.g.g.video).length&&(uE[i]||uA[i])||!n.g.ta()?n.h[i].bind(n.h):n.g.get("player",i)}})}),t=e,n=new Map,uX(t,function(e,i){n.has(i)?(i=n.get(i),e.length<i.length?t.u.set(e,i):t.u.set(i,e)):n.set(i,e)}),e.j=new n1,e.j.Yc=e.l,e.o=new n1,e.o.Yc=e.s}(this)}function uX(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!a.has(e)}var i,r=e.h,a=new Set;for(i in r)n(i)&&(a.add(i),t(i,r[i]));for(e=Object.getPrototypeOf(r),i=Object.getPrototypeOf({});e&&e!=i;){for(var o=v(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,r[s]));e=Object.getPrototypeOf(e)}}function uz(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Gd(),startTime:null};e.i.pause();for(var n=v(ux),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),i=(n=v(uI)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(i=(n=v(uC)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function uW(e){var t=new nQ("caststatuschanged");e.dispatchEvent(t)}function uY(e){var t=new nQ(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function u$(e){for(var t=v(uI),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.g.get("player","getAssetUri")();n=e.g.get("video","ended"),t=Promise.resolve();var a=e.i.autoplay;i=null,n||(i=e.g.get("video","currentTime")),r&&(e.i.autoplay=!1,t=e.h.load(r,i));var o={};for(i=(n=v(ux)).next();!i.done;i=n.next())o[i=i.value]=e.g.get("video",i);t.then(function(){if(e.i){for(var t=v(ux),n=t.next();!n.done;n=t.next())n=n.value,e.i[n]=o[n];for(n=(t=v(uC)).next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}e.i.autoplay=a,r&&e.i.play()}},function(t){t=new nQ("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)})}function uJ(e,t,n){e.g.ta()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function uQ(e,t,n,i){n1.call(this);var r=this;this.g=e,this.h=t,this.j=new is,this.H={video:e,player:t},this.D=n||function(){},this.J=i||function(e){return e},this.i=null,this.F=!1,this.o=!0,this.m=0,this.A=!1,this.u=!0,this.s=this.l=null,this.G=new tt(function(){u2(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return uZ(e)},t.onSenderDisconnected=function(){return uZ(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&u6(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),u6(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(t){var n=e,i=t,r=ub(i.data);switch(r.type){case"PLAY":n.g.play(),u8(n);break;case"PAUSE":n.g.pause(),u8(n);break;case"SEEK":i=r.currentTime;var a=r.resumeState;null!=i&&(n.g.currentTime=Number(i)),a&&"PLAYBACK_START"==a?(n.g.play(),u8(n)):a&&"PLAYBACK_PAUSE"==a&&(n.g.pause(),u8(n));break;case"STOP":n.h.re().then(function(){n.h&&u8(n)});break;case"GET_STATUS":u3(n,Number(r.requestId));break;case"VOLUME":i=(a=r.volume).level,a=a.muted;var o=n.g.volume,s=n.g.muted;null!=i&&(n.g.volume=Number(i)),null!=a&&(n.g.muted=a),o==n.g.volume&&s==n.g.muted||u8(n);break;case"LOAD":n.m=0,n.A=!1,n.u=!1,i=r.media,a=r.currentTime,o=n.J(i.contentId),s=r.auto
1play||!0,n.D(i.customData),s&&(n.g.autoplay=!0),n.h.load(o,a).then(function(){n.h&&u3(n)}).catch(function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),u6(n,{requestId:Number(r.requestId),type:t},n.s)});break;default:u6(n,{requestId:Number(r.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},n.s)}},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f=ub(t.data);switch(f.type){case"init":e.m=0,e.A=!1,e.u=!0,n=f.initState,i=f.appData,F(function(t){switch(t.g){case 1:for(r in n.player)a=n.player[r],e.h[r](a);return e.D(i),o=e.g.autoplay,n.manifest?(e.g.autoplay=!1,D(t,5),C(t,e.h.load(n.manifest,n.startTime),7)):C(t,Promise.resolve(),3);case 7:N(t,3);break;case 5:return s=P(t),u=new nQ("error",(new Map).set("detail",s)),e.h&&e.h.dispatchEvent(u),t.return();case 3:if(!e.h)return t.return();for(l in n.video)c=n.video[l],e.g[l]=c;for(d in n.playerAfterLoad)h=n.playerAfterLoad[d],e.h[d](h);e.g.autoplay=o,n.manifest&&(e.g.play(),u8(e)),M(t)}}),u2(e);break;case"appData":e.D(f.appData);break;case"set":var p=f.targetName,g=f.property;if(f=f.value,"video"==p){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==g){t.setSystemVolumeLevel(f);break}else if("muted"==g){t.setSystemVolumeMuted(f);break}}e.H[p][g]=f;break;case"call":(p=e.H[f.targetName])[f.methodName].apply(p,f.args);break;case"asyncCall":p=f.targetName,g=f.methodName,"player"==p&&"load"==g&&(e.m=0,e.A=!1);var m=f.id,v=t.senderId;f=(t=e.H[p])[g].apply(t,f.args),"player"==p&&"load"==g&&(f=f.then(function(){e.u=!0})),f.then(function(){return u5(e,v,m,null)},function(t){return u5(e,v,m,t)})}}(e,t)},t.start(),t=v(uw);for(var n=t.next();!n.done;n=t.next())e.j.C(e.g,n.value,function(t){return u1(e,"video",t)});for(var i in n0)e.j.C(e.h,n0[i],function(t){return u1(e,"player",t)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.le(3840,2160):e.h.le(1920,1080),e.j.C(e.g,"loadeddata",function(){e.A=!0}),e.j.C(e.h,"loading",function(){e.o=!1,u0(e)}),e.j.C(e.g,"playing",function(){e.o=!1,u0(e)}),e.j.C(e.g,"pause",function(){u0(e)}),e.j.C(e.h,"unloading",function(){e.o=!0,u0(e)}),e.j.C(e.g,"ended",function(){new tt(function(){e.g&&e.g.ended&&(e.o=!0,u0(e))}).N(u7)})}(this)}function uZ(e){e.m=0,e.u=!0,e.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,u0(e)}function u0(e){var t;F(function(n){return 1==n.g?C(n,Promise.resolve(),2):e.h?void(t=new nQ("caststatuschanged"),e.dispatchEvent(t),u4(e)||u8(e),M(n)):n.return()})}function u1(e,t,n){e.h&&(u2(e),u6(e,{type:"event",targetName:t,event:n},e.l))}function u2(e){e.G.N(u9);for(var t={video:{},player:{}},n=v(uT),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];if(e.h.T())for(var r in uk)0==e.m%uk[r]&&(t.player[r]=e.h[r]());for(var a in uE)0==e.m%uE[a]&&(t.player[a]=e.h[a]());for(var o in(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),u6(e,{type:"update",update:t},e.l),uA)0==e.m%uA[o]&&((t={player:{}}).player[o]=e.h[o](),u6(e,{type:"update",update:t},e.l));e.A&&(e.m+=1),u4(e)}function u4(e){return!!(e.u&&(e.g.duration||e.h.T()))&&(u3(e),e.u=!1,!0)}function u3(e,t){var n={contentId:e.h.Gd(),streamType:e.h.T()?"LIVE":"BUFFERED",contentType:""};e.h.T()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),u8(e,void 0===t?0:t,n)}function u5(e,t,n,i){e.h&&u6(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function u6(e,t,n,i){e.F&&(e=uy(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function u8(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?le:e.h.Hd()?ln:e.g.paused?li:lt,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),u6(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}E(uG,n1),(b=uG.prototype).destroy=function(e){return e&&this.g.Bb(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.l=this.i=null,n1.prototype.release.call(this),Promise.all(e)},b.Xf=function(){return this.l},b.Of=function(){return this.s},b.pf=function(){return this.g.m&&uF},b.ta=function(){return this.g.ta()},b.ce=function(){return this.g.ce()},b.cast=function(){var e,t=this;return F(function(n){return 1==n.g?(e=uz(t),C(n,t.g.cast(e),2)):t.h?C(n,t.h.re(),0):n.return()})},b.je=function(e){this.g.je(e)},b.Bg=function(){var e=this.g;if(e.h){var t=e.J();
1chrome.cast.requestSession(function(n){return uN(e,t,n)},function(t){return uP(e,t)})}},b.Bb=function(){this.g.Bb()},b.rf=function(e,t){t=void 0!==t&&t;var n=this;return F(function(i){if(1==i.g)return e==n.D&&t==n.A?i.return():(n.D=e,n.A=t,n.g.Bb(),C(i,n.g.destroy(),2));n.g=null,n.g=new uR(e,function(){return uW(n)},function(){return uY(n)},function(e,t){return uJ(n,e,t)},function(){return u$(n)},function(){return uz(n)},t),n.g.init(),M(i)})},W("shaka.cast.CastProxy",uG),uG.prototype.changeReceiverId=uG.prototype.rf,uG.prototype.forceDisconnect=uG.prototype.Bb,uG.prototype.suggestDisconnect=uG.prototype.Bg,uG.prototype.setAppData=uG.prototype.je,uG.prototype.cast=uG.prototype.cast,uG.prototype.receiverName=uG.prototype.ce,uG.prototype.isCasting=uG.prototype.ta,uG.prototype.canCast=uG.prototype.pf,uG.prototype.getPlayer=uG.prototype.Of,uG.prototype.getVideo=uG.prototype.Xf,uG.prototype.destroy=uG.prototype.destroy,E(uQ,n1),(b=uQ.prototype).isConnected=function(){return this.F},b.ag=function(){return this.o},b.yg=function(e){this.i=e},b.vf=function(){this.i=null},b.zg=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},b.xg=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},b.wg=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},b.destroy=function(){var e,t=this;return F(function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.G&&(t.G.stop(),t.G=null),t.g=null,t.H=null,t.D=null,t.F=!1,t.o=!0,t.l=null,t.s=null,n1.prototype.release.call(t),C(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),M(n)})},W("shaka.cast.CastReceiver",uQ),uQ.prototype.destroy=uQ.prototype.destroy,uQ.prototype.setContentArtist=uQ.prototype.wg,uQ.prototype.setContentImage=uQ.prototype.xg,uQ.prototype.setContentTitle=uQ.prototype.zg,uQ.prototype.clearContentMetadata=uQ.prototype.vf,uQ.prototype.setContentMetadata=uQ.prototype.yg,uQ.prototype.isIdle=uQ.prototype.ag,uQ.prototype.isConnected=uQ.prototype.isConnected;var u9=.5,u7=5,le="IDLE",lt="PLAYING",ln="BUFFERING",li="PAUSED";function lr(e,t,n){var i=function(e){var t=[];e=v(e);for(var n=e.next();!n.done;n=e.next())(n=function(e){var t=e.getAttribute("schemeIdUri"),n=iP(e,"urn:mpeg:cenc:2013","default_KID"),i=iN(e,"urn:mpeg:cenc:2013","pssh").map(i_);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new ej(2,4,4009);var r=[];try{r=i.map(function(e){return{initDataType:"cenc",initData:tA(e),keyId:null}})}catch(e){throw new ej(2,4,4007)}return{node:e,he:t,keyId:n,init:0<r.length?r:null}}(n.value))&&t.push(n);return t}(e),r=null;e=[];var a=[],o=new Set(i.map(function(e){return e.keyId}));if(o.delete(null),1<o.size)throw new ej(2,4,4010);if(t||(a=i.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.he||(r=e.init||r,!1)})).length&&0==(e=function(e,t,n,i){var r=[];t=v(t);for(var a=t.next();!a.done;a=t.next()){var o,s=n[(a=a.value).he];if(s){if(o=iD(a.node,"urn:microsoft:playready","pro")){o=tA(o.textContent);var u=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);o=[{initData:iC(o,u,new Set,0),initDataType:"cenc",keyId:a.keyId}]}else o=null;if(u=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===a.he)if(0==(u=i).size)u=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);u=[{initData:iC(new Uint8Array([]),l,u,1),initDataType:"cenc",keyId:a.keyId}]}o=e2(s,a.init||e||o||u),(s=ls.get(s))&&(o.licenseServerUri=s(a)),r.push(o)}}return r}(r,a,n,o)).length&&(e=[e2("",r)]),i.length&&(t||!a.length))for(e=[],n=(t=v(Object.values(n))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(e2(n,r));if(o=Array.from(o)[0]||null)for(n=(t=v(e)).next();!n.done;n=t.next())for(i=(n=v(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=o;return{Be:o,th:r,drmInfos:e,Fe:!0}}function la(e){return(e=iD(e.node,"urn:microsoft:playready","pro"))&&(e=(function(e){var t=0,n=eL(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,0!=(1&r)||r+e>n.byteLength){n=[];break e}var a=eP(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=tA(e.textContent)).filter(function(e){return e.type===lo})[0])&&(e=iX(e=tv(e.value,!0),"WRMHEADER"))?function(e){e=v(e.getElementsByTagName("DATA"));for(var t=e.next();!t.done;t=e.next()){t=v(t.value.childNodes);for(var n=t.next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent}return""}(e):""}var lo=1,ls=(new Map).set("com.widevine.alpha",function(e){return(e=iD(e.n
1ode,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""}).set("com.microsoft.playready",la).set("com.microsoft.playready.recommendation",la).set("com.microsoft.playready.software",la).set("com.microsoft.playready.hardware",la).set("org.w3.clearkey",function(e){return(e=iD(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.getAttribute("Lic_type")&&e.textContent?e.textContent:""});function lu(t,n,i,r,a){var o={RepresentationID:n,Number:i,Bandwidth:r,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(t,n,i,r){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&(a=Math.round(a)),r){case void 0:case"d":case"i":case"u":default:t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase()}return Array(Math.max(0,(i=e.parseInt(i,10)||1)-t.length)+1).join("0")+t})}function ll(e,t){var n=lc(e,t,"timescale"),i=1;n&&(i=iH(n)||1);var r=lc(e,t,"duration");n=iH(r||""),"image"==e.I.contentType&&(n=iq(r||"")),n&&(n/=i);var a=lc(e,t,"startNumber");r=Number(lc(e,t,"presentationTimeOffset"))||0;var o=iK(a||"");if((null==a||null==o)&&(o=1),a=ld(e,t,"SegmentTimeline"),t=null,a){t=i,e=e.U.duration||1/0,a=iR(a,"S");for(var s=[],u=-r,l=0;l<a.length;++l){var c=a[l],d=a[l+1],h=iO(c,"t",iK),f=iO(c,"d",iK);if(c=iO(c,"r",iV),null!=h&&(h-=r),!f)break;if(h=null!=h?h:u,0>(c=c||0))if(d){if(null==(d=iO(d,"t",iK))||h>=d)break;c=Math.ceil((d-h)/f)-1}else{if(1/0==e||h/t>=e)break;c=Math.ceil((e*t-h)/f)-1}for(0<s.length&&h!=u&&(s[s.length-1].end=h/t),d=0;d<=c;++d)u=h+f,s.push({start:h/t,end:u/t,Fg:h}),h=u}t=s}return{timescale:i,ja:n,Mb:o,Ta:r/i||0,se:r,timeline:t}}function lc(e,t,n){return[t(e.I),t(e.ga),t(e.aa)].filter(e0).map(function(e){return e.getAttribute(n)}).reduce(function(e,t){return e||t})}function ld(e,t,n){return[t(e.I),t(e.ga),t(e.aa)].filter(e0).map(function(e){return iM(e,n)}).reduce(function(e,t){return e||t})}function lh(e){this.h=eL(e),this.g=new ip(this.h,0)}function lf(e){var t=lp(e);if(7<t.length)throw new ej(2,3,3002);var n=0;t=v(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=lp(e);e:{i=v(lg);for(var r=i.next();!r.done;r=i.next())if(eD(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.$();else{if(8==t.length&&224&t[1])throw new ej(2,3,3001);for(r=i=0;r<t.length;r++){var a=t[r];i=0==r?a&(1<<8-t.length)-1:256*i+a}t=i}return t=e.g.$()+t<=e.h.byteLength?t:e.h.byteLength-e.g.$(),i=eL(e.h,e.g.$(),t),e.g.skip(t),new lm(n,i)}function lp(e){var t=e.g.$(),n=e.g.Sa();if(0==n)throw new ej(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),eP(e.h,t,n)}lh.prototype.ia=function(){return this.g.ia()};var lg=[[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 lm(e,t){this.id=e,this.g=t}function lv(e){if(8<e.g.byteLength)throw new ej(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new ej(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function ly(e,t){if(!(t=ld(e,t,"Initialization")))return null;var n=e.I.wa,i=t.getAttribute("sourceURL");i&&(n=e1(e.I.wa,[i])),i=0;var r=null;return(t=iO(t,"range",iF))&&(i=t.start,r=t.end),new ah(function(){return n},i,r,lS(e))}function lb(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g,m,v,y,b,w,T;return F(function(x){if(1==x.g)return s=e.presentationTimeline,u=!e.Xa||!e.U.Id,l=e.U.start,c=e.U.duration,d=e.I.mimeType.split("/")[1],f=null,p=[(h=t)(i,r,a),"webm"==d?h(n.ya(),n.Ba,n.ma):null],h=null,C(x,Promise.all(p),2);if(m=(g=x.h)[0],v=g[1]||null,y=null,b=l-o,w=l,T=c?l+c:1/0,"mp4"==d)var S=function(e,t,n,i,r,a,o){var s,u=(new iv).P("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.K();if(0==u)throw new ej(2,3,3005);if(0==o.version)var l=o.reader.K(),c=o.reader.K();else l=o.reader.$a(),c=o.reader.$a();o.reader.skip(2);var d=o.reader.be();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.K(),f=(0x80000000&h)>>>31;h&=0x7fffffff;var p=o.reader.K();if(o.reader.skip(4),1==f)throw new ej(2,3,3006);s.push(new af(l/u+n,(l+p)/u+n,function(){return a},e,e+h-1,t,n,i,r)),l+=p,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)});if(e&&u.parse(e),s)return s;throw new ej(2,3,3004)}(m,r,i,n,b,w,T);else{if(0x1a45dfa3!=lf(S=new lh(v)).id)throw new ej(2,3,3008);var E=lf(S);if(0x18538067!=E.id)throw new ej(2,3,3009);S=E.g.byteOffset,E=new lh(E.g);for(var A=null;E.ia();){var k=lf(E);if(0x1549a966==k.id){A=k;break}}if(!A)throw new ej(2,3,3010);for(E=null,A=new lh(A.g),k=1e6;A.ia();){var I=lf(A);
1if(2807729==I.id)k=lv(I);else if(17545==I.id)if(4==I.g.byteLength)E=I.g.getFloat32(0);else if(8==I.g.byteLength)E=I.g.getFloat64(0);else throw new ej(2,3,3003)}if(null==E)throw new ej(2,3,3011);if(E*=A=k/1e9,0x1c53bb6b!=(k=lf(new lh(m))).id)throw new ej(2,3,3007);S=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new lh(e.g);for(var d=null,h=null;e.ia();){var f=lf(e);if(187==f.id){var p=function(e){var t=new lh(e.g);if(179!=(e=lf(t)).id)throw new ej(2,3,3013);if(e=lv(e),183!=(t=lf(t)).id)throw new ej(2,3,3012);t=new lh(t.g);for(var n=0;t.ia();){var i=lf(t);if(241==i.id){n=lv(i);break}}return{Gg:e,pg:n}}(f);p&&(f=n*p.Gg,p=t+p.pg,null!=d&&c.push(new af(d+o,f+o,l,h,p-1,a,o,s,u)),d=f,h=p)}}return null!=d&&c.push(new af(d+o,i+o,l,h,null,a,o,s,u)),c}(k,S,A,E,i,n,b,w,T)}return y=S,s.Jb(y),f=new ou(y),u&&f.Ya(w,T,!0),x.return(f)})}function lw(e){return e.xc}function lT(e){var t=ld(e,lw,"RepresentationIndex");return e=iF((e=lc(e,lw,"indexRange"))||""),t&&(e=iO(t,"range",iF,e)),e}function lx(e,t){var n=e.I.mimeType.split("/")[1];if(e.I.contentType!=e5&&"mp4"!=n&&"webm"!=n)throw new ej(2,4,4006);if("webm"==n&&!t)throw new ej(2,4,4005)}function lS(e){var t=e.I;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.cd,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function lE(e){return e.ab}function lA(e){return e.yc}function lk(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function lI(e){var t,n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,T,x,S,E;return F(function(A){switch(A.g){case 1:if(t=e6,1==e.length)return A.return(e[0]);for(n=e.map(function(e){return e.filter(function(e){return e.type==t.Ic})}),i=e.map(function(e){return e.filter(function(e){return e.type==t.va})}),r=e.map(function(e){return e.filter(function(e){return e.type==t.Y})}),a=e.map(function(e){return e.filter(function(e){return e.type==t.Xb})}),s=(o=v(r)).next();!s.done;s=o.next())s.value.push(lK(t.Y));for(l=(u=v(a)).next();!l.done;l=u.next())l.value.push(lK(t.Xb));return C(A,lC([],n,0,lN,lL),2);case 2:return c=A.h,C(A,lC([],i,0,lN,lL),3);case 3:return d=A.h,C(A,lC([],r,0,lN,lL),4);case 4:return h=A.h,C(A,lC([],a,0,lN,lL),5);case 5:if(f=A.h,p=0,d.length&&c.length)for(b=(y=v(c)).next();!b.done;b=y.next())for(w=b.value,x=(T=v(d)).next();!x.done;x=T.next())S=x.value,E=p++,S.variantIds.push(E),w.variantIds.push(E);else for(m=(g=v(d.concat(c))).next();!m.done;m=g.next())m.value.variantIds=[p++];return A.return(d.concat(c).concat(h).concat(f))}})}function lC(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,T;return F(function(x){switch(x.g){case 1:for(s=0,a=e6,o=[];s<t.length;s++)s>=n?o.push(new Set(t[s])):o.push(new Set);l=(u=v(e)).next();case 2:var S,E,A,k,I;if(l.done){x.B(4);break}return C(x,(S=l.value,E=t,A=n,k=r,I=o,F(function(e){return 1==e.g?(l_(E,S),S.matchedStreams?S.segmentIndex?C(e,lM(S,A),2):e.B(2):e.return(!1)):(lD(S,A,k,I),e.return(!0))})),5);case 5:if(!x.h)throw new ej(2,4,4037);l=u.next(),x.B(2);break;case 4:for(d=(c=v(o)).next();!d.done;d=c.next())for(f=(h=v(d.value)).next();!f.done;f=h.next())(p=function(e,t,n,i,r){var a=n(e);return(l_(t,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return F(function(e){return a.segmentIndex?e.B(0):(a.segmentIndex=new od,C(e,lM(a,0),0))})}),a.matchedStreams&&a.matchedStreams.length)?(lD(a,0,i,r),a):null}(f.value,t,i,r,o))&&e.push(p);for(d=(g=v(o)).next();!d.done;d=g.next())for(m=d.value,y={},f=(b=v(m)).next();!f.done;y={Wa:y.Wa},f=b.next())if(y.Wa=f.value,w=y.Wa.type==a.Y&&!y.Wa.language,T=y.Wa.type==a.Xb&&!y.Wa.tilesLayout,!w&&!T&&e.some(function(e){return function(t){return t.mimeType==e.Wa.mimeType&&tF(t.codecs)==tF(e.Wa.codecs)}}(y)))throw new ej(2,4,4037);return x.return(e)}})}function lM(e,t){var n,i,r,a,o,s,u;return F(function(l){if(1==l.g){for(n=[],a=(r=v(i=e.matchedStreams)).next();!a.done;a=r.next())o=a.value,n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return C(l,Promise.all(n),2)}if(e.segmentIndex instanceof od)for(s=t;s<i.length;s++)(u=i[s]).segmentIndex&&e.segmentIndex.l.push(u.segmentIndex);M(l)})}function lD(e,t,n,i){for(var r=e.matchedStreams,a=0;a<r.length;a++)if(a>=t){var o=r[a];n(e,o);var s=!0;"audio"==e.type&&0==tZ(e.language,o.language)&&(s=!1),s&&i[a].delete(o)}}function lR(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=v(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=null,t.trickModeVideo=null,t}function lN(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function lP(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris)))),n=e.keyIds,i=t.keyIds,e.keyIds=new Set([].concat(y(n),y(i))),null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||"");var n,i,r=i7(e.drmInfos,t.drmInfos);if(t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new ej(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map),r=v(t.closedCaptions);for(var a=r.next();!a.done;a=r.next()){var o=v(a.value);a=o.next().value,o=o.next().value,e.closedCaptions.set(a,o)}}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=lR(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),lP(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&lP(e.trickModeVideo,t)}function lL(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(y(e.keyIds),y(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,y(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=v(t.closedCaptions)).next();!n.done;n=t.next()){var i=v(n.value);n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}}function l_(e,t){var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){var r=t,a={audio:lj,video:lj,text:lO,image:lU}[r.type],o={audio:lB,video:lF,text:lV,image:lH}[r.type],s=null;i=v(i.value);for(var u=i.next();!u.done;u=i.next())a(r,u=u.value)&&(!s||o(r,s,u))&&(s=u);if(!(r=s))return;n.push(r)}t.matchedStreams=n}function lj(e,t){var n;return!(n=t.mimeType!=e.mimeType||tF(t.codecs)!=tF(e.codecs))&&(n=e.drmInfos)&&(e=e.drmInfos,t=t.drmInfos,n=!(e.length&&t.length?0<i7(e,t).length:1)),!n}function lO(e,t){return!!e.language&&(!t.language||0!=tZ(e.language,t.language)&&t.kind==e.kind)}function lU(e){return!!e.tilesLayout}function lB(e,t,n){if(e.id==n.id)return!0;var i=tZ(e.language,t.language),r=tZ(e.language,n.language);return r>i||!(r<i)&&(e.roles.length?(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length||!(r.length<i.length)&&n.roles.length<t.roles.length):!n.roles.length&&!!t.roles.length||(!n.roles.length||!!t.roles.length)&&(!t.primary&&!!n.primary||(!t.primary||!!n.primary)&&((i=lG(e.channelsCount,t.channelsCount,n.channelsCount))==lz||i!=lY&&((i=lG(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==lz||i!=lY&&!!e.bandwidth&&lX(e.bandwidth,t.bandwidth,n.bandwidth)==lz))))}function lF(e,t,n){if(e.id==n.id)return!0;var i=lG(e.width*e.height,t.width*t.height,n.width*n.height);if(i==lz)return!0;
1if(i==lY)return!1;if(e.frameRate){if((i=lG(e.frameRate,t.frameRate,n.frameRate))==lz)return!0;if(i==lY)return!1}return!!e.bandwidth&&lX(e.bandwidth,t.bandwidth,n.bandwidth)==lz}function lV(e,t,n){if(e.id==n.id)return!0;var i=tZ(e.language,t.language),r=tZ(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(e.roles.length){if(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function lH(e,t,n){return e.id==n.id||lG(e.width*e.height,t.width*t.height,n.width*n.height)==lz}function lK(e){return{id:0,originalId:"",primary:!1,type:e,mimeType:"",codecs:"",language:"",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}}function lq(e){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ou([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}function lG(e,t,n){if(t==e&&e!=n)return lY;if(n==e&&e!=t)return lz;if(t>e){if(n<=e||n-e<t-e)return lz;if(n-e>t-e)return lY}else{if(n>e)return lY;if(e-n<e-t)return lz;if(e-n>e-t)return lY}return lW}function lX(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?lz:t<e?lY:lW}lk.prototype.release=function(){for(var e=v(this.g.concat(this.h,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.g=[],this.h=[],this.j=[],this.i=[],this.l=[]};var lz=1,lW=0,lY=-1;function l$(){var e=this;this.h=this.g=null,this.m=[],this.i=null,this.G=1,this.l={},this.L={},this.j=new lk,this.F=0,this.H=new Y(5),this.D=new tt(function(){var t,n,i;t=e,F(function(e){switch(e.g){case 1:return n=0,D(e,2),C(e,lJ(t),4);case 4:n=e.h,N(e,3);break;case 2:i=P(e),t.h&&(i.severity=1,t.h.onError(i));case 3:if(!t.h)return e.return();l0(t,n),M(e)}})}),this.o=new n3,this.s=null,this.J=[],this.u=1/0,this.A=!1}function lJ(e){var t,n,i,r,a,o;return F(function(s){if(1==s.g)return t=n9(e.m,e.g.retryParameters),n=e.h.networkingEngine,e.h.modifyManifestRequest(t,{format:"d"}),i=Date.now(),r=n.request(0,t),n5(e.o,r),C(s,r.promise,2);if(3!=s.g){var u,l,c,d,h,f,p;return(a=s.h,e.h)?(a.uri&&!e.m.includes(a.uri)&&e.m.unshift(a.uri),C(s,(u=e,l=a.data,c=a.uri,F(function(e){if(1==e.g){if(!(d=iz(l,"MPD")))throw new ej(2,4,4001,c);return u.g.dash.disableXlinkProcessing?e.return(lQ(u,d,c)):(h=u.g.dash.xlinkFailGracefully,f=function e(t,n,i,r,a,o){if(o=void 0===o?0:o,iP(t,"http://www.w3.org/1999/xlink","href")){var s=function(t,n,i,r,a,o){for(var s=iP(t,"http://www.w3.org/1999/xlink","href"),u=iP(t,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=v(Array.from(t.attributes)),c=l.next();!c.done;c=l.next())"http://www.w3.org/1999/xlink"==(c=c.value).namespaceURI&&t.removeAttributeNS(c.namespaceURI,c.localName);if(5<=o)return nz(new ej(2,4,4028));if("onLoad"!=u)return nz(new ej(2,4,4027));var d=e1([r],[s]);return a.request(0,n9(d,n)).Z(function(r){if(!(r=iz(r.data,t.tagName)))return nz(new ej(2,4,4001,s));for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);for(;r.childNodes.length;){var u=r.childNodes[0];r.removeChild(u),t.appendChild(u)}for(u=(r=v(Array.from(r.attributes))).next();!u.done;u=r.next())t.setAttributeNode(u.value.cloneNode(!1));return e(t,n,i,d[0],a,o+1)})}(t,n,i,r,a,o);return i&&(s=s.Z(void 0,function(){return e(t,n,i,r,a,o)})),s}s=[];for(var u=v(Array.from(t.childNodes)),l=u.next();!l.done;l=u.next())(l=l.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==iP(l,"http://www.w3.org/1999/xlink","href")?t.removeChild(l):"SegmentTimeline"!=l.tagName&&s.push(e(l,n,i,r,a,o)));return nJ(s).Z(function(){return t})}(d,u.g.retryParameters,h,c,u.h.networkingEngine),n5(u.o,f),C(e,f.promise,2))}return p=e.h,e.return(lQ(u,p,c))}
1)),3)):s.return(0)}return o=(Date.now()-i)/1e3,e.H.sample(1,o),s.return(o)})}function lQ(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m,b,w,T,x,S,E,A,k,I,R,L,_,j,O,U;return F(function(B){var V,H,K,q,G,X,z,W,Y,$,J,Q,Z,et,en,ei,er,ea,eo,es,el,ec,ed,eh,ef,ep,eg,em,ev,ey,eb,ew,eT,ex,eS,eE,eA,ek,eI,eC;switch(B.g){case 1:if((i=e.g.dash.manifestPreprocessor)&&i(t),r=[n],0<(a=iR(t,"Location").map(i_).filter(e0)).length&&(r=e.m=e1(r,a)),s=(o=iR(t,"BaseURL")).map(i_),u=e1(r,s),l=0,o&&o.length&&(l=iO(o[0],"availabilityTimeOffset",iq)||0),c=e.g.dash.ignoreMinBufferTime,d=0,c||(d=iO(t,"minBufferTime",iB)||0),e.F=iO(t,"minimumUpdatePeriod",iB,-1),h=iO(t,"availabilityStartTime",iU),f=iO(t,"timeShiftBufferDepth",iB),p=e.g.dash.ignoreSuggestedPresentationDelay,g=null,p||(g=iO(t,"suggestedPresentationDelay",iB)),m=e.g.dash.ignoreMaxSegmentDuration,b=null,m||(b=iO(t,"maxSegmentDuration",iB)),w=t.getAttribute("type")||"static",e.i)for(T=e.i.presentationTimeline,S=(x=v(Object.values(e.l))).next();!S.done;S=x.next())(E=S.value).segmentIndex&&E.segmentIndex.eb(T.Oa());else A=e.g.defaultPresentationDelay||1.5*d,T=new aQ(h,null!=g?g:A,e.g.dash.autoCorrectDrift);return T.zc("static"==w),T.T()&&!isNaN(e.g.availabilityWindowOverride)&&(f=e.g.availabilityWindowOverride),null==f&&(f=1/0),T.ne(f),k=t.getAttribute("profiles")||"",L=(R=function(e,t,n,i){var r=iO(i,"mediaPresentationDuration",iB),a=[],o=0;i=iR(i,"Period");for(var s=0;s<i.length;s++){var u=i[s],l=i[s+1],c=iO(u,"start",iB,o),d=u.id,h=iO(u,"duration",iB),f=null;if(l){var p=iO(l,"start",iB);null!=p&&(f=p-c)}else null!=r&&(f=r-c);if(null==f&&(f=h),!(null!==e.s&&null!==d&&null!==c&&c<e.s)||e.J.includes(d)||s+1==i.length){if(null!==c&&(null===e.s||c>e.s)&&(e.s=c),o=function(e,t,n,i){t.aa=l1(i.node,null,n),t.U=i,t.aa.Ab=t.Ab,t.aa.id||(t.aa.id="__shaka_period_"+i.start);var r=iR(i.node,"EventStream");n=t.presentationTimeline.Oa(),r=v(r);for(var a=r.next();!a.done;a=r.next())!function(e,t,n,i,r){var a=i.getAttribute("schemeIdUri")||"",o=i.getAttribute("value")||"",s=iO(i,"timescale",iK)||1;i=v(iR(i,"Event"));for(var u=i.next();!u.done;u=i.next()){var l=iO(u=u.value,"presentationTime",iK)||0,c=iO(u,"duration",iK)||0;c=(l=l/s+t)+c/s,null!=n&&(l=Math.min(l,t+n),c=Math.min(c,t+n)),c<r||(u={schemeIdUri:a,value:o,startTime:l,endTime:c,id:u.getAttribute("id")||"",eventElement:u},e.h.onTimelineRegionAdded(u))}}(e,i.start,i.duration,a.value,n);if(n=iR(i.node,"AdaptationSet").map(function(n){return function(e,t,n){function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ga=l1(n,t.aa,null);var r,a=!1,o=iR(n,"Role"),s=o.map(function(e){return e.getAttribute("value")}).filter(e0),u=void 0,l=t.ga.contentType==e5;l&&(u="subtitle"),o=v(o);for(var c=o.next();!c.done;c=o.next()){var d=(c=c.value).getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(c=c.getAttribute("value")){case"main":a=!0;break;case"caption":case"subtitle":u=c}}d=iR(n,"EssentialProperty"),o=null,c=!1,d=v(d);for(var h=d.next();!h.done;h=d.next()){var f=(h=h.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==f?o=h.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==f?r=i(parseInt(h.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=f&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=f&&(c=!0)}for(h=(d=v(d=iR(n,"SupplementalProperty"))).next();!h.done;h=d.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(h=h.value).getAttribute("schemeIdUri")&&(r=i(parseInt(h.getAttribute("value"),10)));d=iR(n,"Accessibility");var p=new Map;for(h=(d=v(d)).next();!h.done;h=d.next())if(h=(f=h.value).getAttribute("schemeIdUri"),f=f.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==h)if(h=1,null!=f){f=f.split(";");for(var g=v(f),m=g.next();!m.done;m=g.next()){var b=m.value,w=m=void 0;b.includes("=")?(m=(b=b.split("="))[0].startsWith("CC")?b[0]:"CC"+b[0],w=b[1]||"und"):(m="CC"+h,2==f.length?h+=2:h++,w=b),p.set(m,tQ(w))}}else p.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==h)if(h=1,null!=f)for(m=(f=v(f.split(";"))).next();!m.done;m=f.next())m=m.value,b=g=void 0,m.includes("=")?(g="svc"+(m=m.split("="))[0],b=m[1].split(",")[0].split(":").pop()):(g="svc"+h,h++,b=m),p.set(g,tQ(b));else p.set("svc1","und");else"urn:mpeg:dash:role:2011"==h&&null!=f&&(s.push(f),"captions"==f&&(u="caption"));if(c)return null;var T=lr(c=iR(n,"ContentProtection"),e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),x=tQ(n.getAttribute("lang")||"und"),S=n.getAttribute("label");if((c=iR(n,"Label"))&&c.length&&(c=c[0]).textContent&&(S=c.textContent),0==(n=(c=iR(n,"Representation")).map(function(n){return(n=function(e,t,n,i,r,a,o,s,u,l){if(t.I=l1(l,t.ga,null),e.u=Math.min(e.u,t.I.Ab),!function(e){var t=+!!e.xc;return 0==(t+=+!!e.ab+ +!!e.yc)?e.contentType==e5||"application"==e.contentType:(1!=t&&(e.xc&&(e.ab=null),e.yc=null),!0)}(t.I))return null;var c,d,h=t.U.start;t.bandwidth=iO(l,"bandwidth",iH)||0;var f=t.I.contentType,p=f==e5||"application"==f;f="image"==f;try{var g=function(t,n,i){return function(e,t,n,i){var r,a,o,s;return F(function(u){return 1==u.g?(r=it,a=oS(t,n,i,e.g.retryParameters),o=e.h.networkingEngine.request(r,a),n5(e.o,o),C(u,o.promise,2)):(s=u.h,u.return(s.data))})}(e,t,n,i)};if(t.I.xc)var m,y,b,w,T,x,S,E=(m=g,y=Number(lc(t,lw,"presentationTimeOffset"))||0,b=lc(t,lw,"timescale"),w=1,b&&(w=iH(b)||1),T=y/w||0,x=ly(t,lw),function(e,t){if(lx(e,t),!lT(e))throw new ej(2,4,4002)}(t,x),S=n4(t),{Cb:function(){var e=ld(S,lw,"RepresentationIndex"),t=S.I.wa;return e&&(e=e.getAttribute("sourceURL"))&&(t=e1(S.I.wa,[e])),e=lT(S),lb(S,m,x,t,e.start,e.end,T)}});else if(t.I.ab)E=function(e,t){var n=ly(e,lE),i=function(e){var t=function(e){return[e.I.ab,e.ga.ab,e.aa.ab].filter(e0).map(function(e){return iR(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){return t.getAttribute("indexRange")&&!e.Ke&&(e.Ke=!0),{fg:t.getAttribute("media"),start:(t=iO(t,"mediaRange",iF,{start:0,end:null})).start,end:t.end}})}(e),n=(e=ll(e,lE)).Mb;0==n&&(n=1);var i=0;return e.ja?i=e.ja*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{ja:e.ja,startTime:i,Mb:n,Ta:e.Ta,timeline:e.timeline,Hb:t}}(e);if(!i.ja&&!i.timeline&&1<i.Hb.length||!i.ja&&!e.U.duration&&!i.timeline&&1==i.Hb.length||i.timeline&&0==i.timeline.length)throw new ej(2,4,4002);var r=null,a=null;e.aa.id&&e.I.id&&(a=t[e.aa.id+","+e.I.id])&&(r=a.segmentIndex);var o=function(e,t,n,i,r){var a=i.Hb.length;i.timeline&&i.timeline.length!=i.Hb.length&&(a=Math.min(i.timeline.length,i.Hb.length));for(var o=e-i.Ta,s=t?e+t:1/0,u=[],l=i.startTime,c={},d=0;d<a;c={rd:c.rd},d++){var h=i.Hb[d];c.rd=e1(n,[h.fg]);var f=void 0;f=null!=i.ja?l+i.ja:i.timeline?i.timeline[d].end:l+t,u.push(new af(e+l,e+f,function(e){return function(){return e.rd}}(c),h.start,h.end,r,o,e,s)),l=f}return u}(e.U.start,e.U.duration,e.I.wa,i,n);
1return t=!r,r?r.Ib(o,e.presentationTimeline.Oa()):r=new ou(o),e.presentationTimeline.Jb(o),e.Xa&&e.U.Id||r.Ya(e.U.start,e.U.duration?e.U.start+e.U.duration:1/0,t),a&&(a.segmentIndex=r),{Cb:function(){return r&&0!=r.g.length||r.qc(o),Promise.resolve(r)}}}(t,e.l);else if(t.I.yc)E=function(e,t,n,i,r,a){var o=function(e){var t=lc(e,lA,"initialization");if(!t)return null;var n=e.I.id,i=e.bandwidth||null,r=e.I.wa;return new ah(function(){return e1(r,[lu(t,n,null,i,null)])},0,null,lS(e))}(e),s=function(e){var t=ll(e,lA),n=lc(e,lA,"media");return e=lc(e,lA,"index"),{ja:t.ja,timescale:t.timescale,Mb:t.Mb,Ta:t.Ta,se:t.se,timeline:t.timeline,Rd:n,pc:e}}(e);!function(e){var t=+!!e.pc;if(0==(t+=+!!e.timeline+ +!!e.ja)||(1!=t&&(e.pc&&(e.timeline=null),e.ja=null),!e.pc&&!e.Rd))throw new ej(2,4,4002)}(s);var u=n4(e);if(s.pc)return lx(e,o),{Cb:function(){var e=lu(s.pc,u.I.id,null,u.bandwidth||null,null);return e=e1(u.I.wa,[e]),lb(u,t,o,e,0,null,s.Ta)}};if(s.ja)return i||"image"===e.ga.contentType||(e.presentationTimeline.Ud(s.ja),e.presentationTimeline.Vd(e.U.start)),{Cb:function(){return function(e,t,n,i,r){function a(e){var n=(e-f)*h,r=n+t.Ta,a=n+l,o=Math.min(n=a+h,s());return(a=new af(a,o,function(){return e1(b,[lu(g,y,e,m,r*p)])},0,null,i,w,l,s())).j=n,a}function o(){var e=[Math.max(u.Oa(),l),Math.min(u.gb(),s())].map(function(e){return e-l});return[Math.ceil(e[0]/h),Math.ceil(e[1]/h)-1].map(function(e){return e+f})}function s(){var e=null!=c&&r[c]||d;return e?l+e:1/0}var u=e.presentationTimeline,l=e.U.start,c=e.aa.id,d=e.U.duration,h=t.ja,f=t.Mb,p=t.timescale,g=t.Rd,m=e.bandwidth||null,y=e.I.id,b=e.I.wa,w=l-t.Ta,T=o();e=e.Xa?Math.max(T[0],T[1]-n+1):T[0],T=T[1],n=[];for(var x=e;x<=T;++x){var S=a(x);n.push(S)}var E=new ou(n);if(n=u.gb()<s(),x=u.T(),n||x){var A=Math.max(e,T+1);E.jd(h,function(){var e=u.Oa();E.eb(e);var t=v(o());t.next(),t=t.next().value;for(var n=[];A<=t;){var i=a(A);n.push(i),A++}return e>s()&&!n.length?null:n})}return Promise.resolve(E)}(u,s,r,o,a)}};var l=null;i=i=null,e.aa.id&&e.I.id&&(i=n[i=e.aa.id+","+e.I.id])&&(l=i.segmentIndex);var c=function(e,t,n){var i=e.U.start,r=e.U.duration,a=i-t.Ta;r=r?i+r:1/0;for(var o=[],s={},u=0;u<t.timeline.length;s={qd:s.qd,ud:s.ud,xd:s.xd,nd:s.nd,zd:s.zd,od:s.od},u++){var l=t.timeline[u],c=l.start,d=l.Fg;l=l.end,s.xd=u+t.Mb,s.zd=d+t.se,s.ud=e.I.id,s.nd=e.bandwidth||null,s.qd=t.Rd,s.od=e.I.wa,o.push(new af(i+c,i+l,function(e){return function(){var t=lu(e.qd,e.ud,e.xd,e.nd||null,e.zd);return e1(e.od,[t]).map(function(e){return e.toString()})}}(s),0,null,n,a,i,r))}return o}(u,s,o);n=e.U.start;var d=e.U.duration?e.U.start+e.U.duration:1/0,h=!(e.Xa&&e.U.Id);return l?(h&&new ou(c).Ya(n,d,!0),l.Ib(c,e.presentationTimeline.Oa())):l=new ou(c),e.presentationTimeline.Jb(c),h&&l.Ya(n,d),i&&e.Xa&&(i.segmentIndex=l),{Cb:function(){return l&&0!=l.g.length||l.qc(c),Promise.resolve(l)}}}(t,g,e.l,!!e.i,e.g.dash.initialSegmentLimit,e.L);else{var A=t.I.wa,k=t.U.duration||0;E={Cb:function(){return Promise.resolve(ol(h,k,A))}}}}catch(e){if((p||f)&&4002==e.code)return null;throw e}g=new Set((g=function(e,t,n,i){var r=lr(e,n,i);
1if(t.Fe)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==r.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=r.drmInfos),t.Fe=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(e){return r.drmInfos.some(function(t){return t.keySystem==e.keySystem})}),0==t.drmInfos.length))throw new ej(2,4,4008);return r.Be||t.Be}(g=iR(l,"ContentProtection"),n,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI))?[g]:[]);var I=!1;iR(l,"SupplementalProperty").some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")})&&(I=!0);var D=!1;if(p&&(D=s.includes("forced_subtitle")||s.includes("forced-subtitle")),f&&((l=iR(l,"EssentialProperty").find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))}))&&(c=l.getAttribute("value")),!c))return null;l=t.I.codecs,t.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"))&&(d="PQ");var R=(l=t.I.id?t.aa.id+","+t.I.id:"")&&e.l[l]?e.l[l]:{id:e.G++,originalId:t.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){R.segmentIndex&&(R.segmentIndex.release(),R.segmentIndex=null)},segmentIndex:null,mimeType:t.I.mimeType,codecs:t.I.codecs,frameRate:t.I.frameRate,pixelAspectRatio:t.I.pixelAspectRatio,bandwidth:t.bandwidth,width:t.I.width,height:t.I.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:g,language:r,label:a,type:t.ga.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:t.I.emsgSchemeIdUris,roles:s,forced:D,channelsCount:t.I.cd,audioSamplingRate:t.I.audioSamplingRate,spatialAudio:I,closedCaptions:u,hdr:d,tilesLayout:c,matchedStreams:[],external:!1};return R.createSegmentIndex=function(){var e;return F(function(t){if(1==t.g)return R.segmentIndex?t.B(0):(e=R,C(t,E.Cb(),3));e.segmentIndex=t.h,M(t)})},l&&t.Xa&&!e.l[l]&&(e.l[l]=R),R}(e,t,T,u,x,S,a,s,p,n))&&(n.hdr=n.hdr||r),n}).filter(function(e){return!!e})).length){if(o="image"==t.ga.contentType,e.g.dash.ignoreEmptyAdaptationSet||l||o)return null;throw new ej(2,4,4003)}if(!t.ga.contentType||"application"==t.ga.contentType)for(t.ga.contentType=l4(n[0].mimeType,n[0].codecs),d=(l=v(n)).next();!d.done;d=l.next())d.value.type=t.ga.contentType;for(d=(l=v(n)).next();!d.done;d=l.next())for(d=d.value,f=(h=v(T.drmInfos)).next();!f.done;f=h.next())(f=f.value).keyIds=f.keyIds&&d.keyIds?new Set([].concat(y(f.keyIds),y(d.keyIds))):f.keyIds||d.keyIds;return l=c.map(function(e){return e.getAttribute("id")}).filter(e0),{id:t.ga.id||"__fake__"+e.G++,contentType:t.ga.contentType,language:x,uh:a,streams:n,drmInfos:T.drmInfos,qe:o,sg:l}}(e,t,n)}).filter(e0),t.Xa){for(i=[],a=(r=v(n)).next();!a.done;a=r.next()){a=v(a.value.sg);for(var o=a.next();!o.done;o=a.next())i.push(o.value)}if(i.length!=new Set(i).size)throw new ej(2,4,4018)}for(i=n.filter(function(e){return!e.qe}),r=(n=v(n=n.filter(function(e){return e.qe}))).next();!r.done;r=n.next()){a=(r=r.value).qe.split(" "),o=v(i);for(var s=o.next();!s.done;s=o.next()){var u=s.value;if(a.includes(u.id)){s={},u=v(u.streams);for(var l=u.next();!l.done;s={Hc:s.Hc},l=u.next())s.Hc=l.value,s.Hc.trickModeVideo=r.streams.find(function(e){return function(t){return tF(e.Hc.codecs)==tF(t.codecs)}}(s))}}}if(r=e.g.disableAudio?[]:lZ(i,"audio"),o=e.g.disableVideo?[]:lZ(i,"video"),a=e.g.disableText?[]:lZ(i,e5),n=e.g.disableThumbnails?[]:lZ(i,"image"),!o.length&&!r.length)throw new ej(2,4,4004);for(i=[],s=(r=v(r)).next();!s.done;s=r.next())i.push.apply(i,y(s.value.streams));for(r=[],s=(o=v(o)).next();!s.done;s=o.next())r.push.apply(r,y(s.value.streams));for(o=[],s=(a=v(a)).next();!s.done;s=a.next())o.push.apply(o,y(s.value.streams));for(a=[],s=(n=v(n)).next();!s.done;s=n.next())a.push.apply(a,y(s.value.streams));return{id:t.aa.id,Lc:i,kd:r,textStreams:o,imageStreams:a}}(e,t,n,{start:c,duration:f,node:u,Id:null==f||!l}),a.push(o),t.aa.id&&f&&(e.L[t.aa.id]=f),null==f){o=null;break}o=c+f}}return e.J=a.map(function(e){return e.id}),null!=r?{periods:a,duration:r,De:!1}:{periods:a,duration:o,De:!0}}(e,I={Xa:"static"!=w,presentationTimeline:T,aa:null,U:null,ga:null,I:null,bandwidth:0,Ke:!1,Ab:l,profiles:k.split(",")},u,t)).duration,_=R.periods,"static"!=w&&R.De||T.Aa(L||1/0),e.u&&!e.A&&e.h.isAutoLowLatencyMode()&&(e.h.enableLowLatencyMode(),e.A=e.h.isLowLatencyMode()),e.A?T.Ve(e.u):e.u&&ee("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."),T.Ud(b||1),C(B,(V=e.j,H=I.Xa,F(function(e){switch(e.g){case 1:if(K=e6,function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.Lc),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.channelsCount==s.channelsCount&&r.language==s.language&&r.bandwidth==s.bandwidth&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&eu(r.roles,s.roles)&&r.audioSamplingRate==s.audioSamplingRate&&r.primary==s.primary&&(a=!0);a||n.push(r)}t.Lc=n}}(_),function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.kd),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.frameRate==s.frameRate&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.label==s.label&&eu(r.roles,s.roles)&&function(e,t){if(!e&&!t)return!0;
1if(e&&!t||t&&!e||e.size!=t.size)return!1;e=v(e);for(var n=e.next();!n.done;n=e.next()){var i=v(n.value);if(n=i.next().value,i=i.next().value,!t.has(n)||(n=t.get(n))!=i||void 0==n)return!1}return!0}(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.kd=n}}(_),function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.textStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.language==s.language&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.bandwidth==s.bandwidth&&eu(r.roles,s.roles)&&(a=!0);a||n.push(r)}t.textStreams=n}}(_),function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.imageStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&(a=!0);a||n.push(r)}t.imageStreams=n}}(_),!H&&1==_.length){V.g=(q=_[0]).Lc,V.h=q.kd,V.j=q.textStreams,V.i=q.imageStreams,e.B(2);break}for(X=0,G=-1;X<_.length;X++)z=_[X],V.m.has(z.id)||(V.m.add(z.id),-1==G&&(G=X));if(-1==G)return e.return();for(W=_.map(function(e){return e.Lc}),Y=_.map(function(e){return e.kd}),$=_.map(function(e){return e.textStreams}),J=_.map(function(e){return e.imageStreams}),Z=(Q=v($)).next();!Z.done;Z=Q.next())Z.value.push(lq(K.Y));for(en=(et=v(J)).next();!en.done;en=et.next())en.value.push(lq(K.Xb));return C(e,lC(V.g,W,G,lR,lP),3);case 3:return C(e,lC(V.h,Y,G,lR,lP),4);case 4:return C(e,lC(V.j,$,G,lR,lP),5);case 5:return C(e,lC(V.i,J,G,lR,lP),2);case 2:if(ei=0,er=[],V.h.length&&V.g.length)for(ed=(ec=v(V.g)).next();!ed.done;ed=ec.next())for(eh=ed.value,ep=(ef=v(V.h)).next();!ep.done;ep=ef.next())eg=ep.value,em=i7(eh.drmInfos,eg.drmInfos),eh.drmInfos.length&&eg.drmInfos.length&&!em.length||(ev=ei++,er.push({id:ev,language:eh.language,primary:eh.primary,audio:eh,video:eg,bandwidth:(eh.bandwidth||0)+(eg.bandwidth||0),drmInfos:em,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(eo=(ea=v(V.h.concat(V.g))).next();!eo.done;eo=ea.next())es=eo.value,el=ei++,er.push({id:el,language:es.language,primary:es.primary,audio:es.type==K.Ic?es:null,video:es.type==K.va?es:null,bandwidth:es.bandwidth||0,drmInfos:es.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});V.l=er,M(e)}})),2);case 2:if(e.i){e.i.variants=e.j.l,0<(j=e.j.j.slice()).length&&(e.i.textStreams=j),e.i.imageStreams=e.j.i,e.h.filter(e.i),B.B(3);break}if(e.i={presentationTimeline:T,variants:e.j.l,textStreams:e.j.j.slice(),imageStreams:e.j.i,offlineSessionIds:[],minBufferTime:d||0,sequenceMode:e.g.dash.sequenceMode},!T.ef()){B.B(4);break}return O=iR(t,"UTCTiming"),C(B,(ey=e,eb=u,ew=O,F(function(e){switch(e.g){case 1:eT=ew.map(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}),ex=ey.g.dash.clockSyncUri,!eT.length&&ex&&eT.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:ex}),eE=(eS=v(eT)).next();case 2:if(eE.done){e.B(4);break}switch(eA=eE.value,D(e,5),ek=eA.scheme,eI=eA.value,ek){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return e.B(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return e.B(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return eC=Date.parse(eI),e.return(isNaN(eC)?0:eC-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":ee("NTP UTCTiming scheme is not supported");break;default:ee("Unrecognized scheme in UTCTiming element",ek)}e.B(9);break;case 7:return C(e,l2(ey,eb,eI,"HEAD"),10);case 10:case 11:return e.return(e.h);case 8:return C(e,l2(ey,eb,eI,"GET"),11);case 9:N(e,3);break;case 5:P(e);case 3:eE=eS.next(),e.B(2);break;case 4:return ee("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),e.return(0)}})),5);case 5:if(U=B.h,!e.h)return B.return();T.We(U);case 4:T.Od();case 3:e.h.makeTextStreamsForClosedCaptions(e.i),M(B)}})}function lZ(e,t){return e.filter(function(e){return e.contentType==t})}function l0(e,t){0>e.F||e.D.N(Math.max(3,e.F-t,$(e.H)))}function l1(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,cd:null,audioSamplingRate:null,Ab:0},n=n||t.wa;var i=iR(e,"BaseURL"),r=i.map(i_),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=iO(e,"frameRate",iG)||t.frameRate,l=e.getAttribute("sar")||t.pixelAspectRatio,c=iR(e,"InbandEventStream"),d=t.emsgSchemeIdUris.slice();c=v(c);for(var h=c.next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),d.includes(h)||d.push(h);c=function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;
1case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(c=iR(e,"AudioChannelConfiguration"))||t.cd,h=iO(e,"audioSamplingRate",iK)||t.audioSamplingRate,a||(a=l4(o,s));var f=iM(e,"SegmentBase"),p=iM(e,"SegmentTemplate"),g=f&&iO(f,"availabilityTimeOffset",iq)||0,m=p&&iO(p,"availabilityTimeOffset",iq)||0;return i=i&&i.length&&iO(i[0],"availabilityTimeOffset",iq)||0,i=t.Ab+i+g+m,{wa:e1(n,r),xc:f||t.xc,ab:iM(e,"SegmentList")||t.ab,yc:p||t.yc,width:iO(e,"width",iK)||t.width,height:iO(e,"height",iK)||t.height,contentType:a,mimeType:o,codecs:s,frameRate:u,pixelAspectRatio:l,emsgSchemeIdUris:d,id:e.getAttribute("id"),cd:c,audioSamplingRate:h,Ab:i}}function l2(e,t,n,i){var r,a,o,s,u;return F(function(l){if(1==l.g)return(r=n9(e1(t,[n]),e.g.retryParameters)).method=i,a=e.h.networkingEngine.request(4,r),n5(e.o,a),C(l,a.promise,2);if(o=l.h,"HEAD"==i){if(!o.headers||!o.headers.date)return l.return(0);s=o.headers.date}else s=tm(o.data);return isNaN(u=Date.parse(s))?l.return(0):l.return(u-Date.now())})}function l4(e,t){return tq(tU(e,t))?e5:e.split("/")[0]}function l3(e,t,n,i){this.h=e,this.type=t,this.g=n,this.segments=i||null}function l5(e,t,n,i){this.id=e,this.name=t,this.g=n,this.value=void 0===i?null:i}function l6(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function l8(e,t){if(!(e=e.getAttribute(t)))throw new ej(2,4,4023,t);return e.value}function l9(e,t,n){n=void 0===n?[]:n,this.g=t,this.i=e,this.h=n}function l7(e,t){this.name=e,this.value=t}function ce(e,t){return e.filter(function(e){return e.name==t})}function ct(e,t){return e.filter(function(e){return l8(e,"TYPE")==t})}function cn(e,t){return(e=ce(e,t)).length?e[0]:null}function ci(e,t){return(e=cn(e,t))?Number(e.value):0}function cr(e,t){return e1([e],[t])[0]}function ca(e){this.h=e,this.g=0}function co(e){cs(e,/[ \t]+/gm)}function cs(e,t){return(t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g)?null:(e.g+=t.length,t.results)}function cu(e){return e.g==e.h.length?null:(e=cs(e,/[^ \t\n]*/gm))?e[0]:null}function cl(){this.g=0}function cc(e,t,n){var i=(t=(t=tm(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new ej(2,4,4015);t=0;for(var r=!0,a=v(i),o=a.next();!o.done;o=a.next())if(o=o.value,/^#(?!EXT)/m.test(o)||r)r=!1;else if(o=cd(e,o),--e.g,ch.includes(o.name)){t=1;break}else"EXT-X-STREAM-INF"==o.name&&(r=!0);for(o=0,a=[],r=!0;o<i.length;o++){var s=i[o],u=i[o+1];if(/^#(?!EXT)/m.test(s)||r)r=!1;else{if(s=cd(e,s),cf.includes(s.name)){if(1!=t)throw new ej(2,4,4017);var l=i.splice(o,i.length-o);i=n,r=[],o=[],u=[],s=null,l=v(l);for(var c=l.next();!c.done;c=l.next())c=c.value,/^(#EXT)/.test(c)?(c=cd(e,c),ch.includes(c.name)?a.push(c):"EXT-X-MAP"==c.name?s=c:"EXT-X-PART"==c.name?u.push(c):"EXT-X-PRELOAD-HINT"==c.name?"PART"==l6(c,"TYPE")?null!=l6(c,"BYTERANGE-START")?null!=l6(c,"BYTERANGE-LENGTH")&&u.push(c):u.push(c):"MAP"==l6(c,"TYPE")&&(c.name="EXT-X-MAP",s=c):o.push(c)):/^#(?!EXT)/m.test(c)||(c=cr(i,c.trim()),s&&o.push(s),r.push(new l9(c,o,u)),o=[],u=[]);return u.length&&(s&&o.push(s),r.push(new l9("",o,u))),new l3(n,t,a,r)}a.push(s),"EXT-X-STREAM-INF"==s.name&&(s.g.push(new l7("URI",u)),r=!0)}}return new l3(n,t,a)}function cd(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new ej(2,4,4016,t);t=n[1];var i=n[2];if(n=[],i){(a=cs(i=new ca(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var r,a,o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=cs(i,o);)n.push(new l7(a[1],a[2]||a[3])),co(i)}return new l5(e,t,n,r)}(b=l$.prototype).configure=function(e){this.g=e},b.start=function(e,t){var n,i=this;return F(function(r){if(1==r.g)return i.A=t.isLowLatencyMode(),i.m=[e],i.h=t,C(r,lJ(i),2);if(n=r.h,i.h&&l0(i,n),!i.h)throw new ej(2,7,7001);return r.return(i.i)})},b.stop=function(){for(var e=v(Object.values(this.l)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.j&&this.j.release(),this.g=this.h=null,this.m=[],this.i=null,this.l={},this.j=null,null!=this.D&&(this.D.stop(),this.D=null),this.o.destroy()},b.update=function(){var e,t=this;return F(function(n){return 1==n.g?(D(n,2),C(n,lJ(t),4)):2!=n.g?N(n,0):(e=P(n),t.h&&e)?void(t.h.onError(e),M(n)):n.return()})},b.onExpirationUpdated=function(){},W("shaka.dash.DashParser",l$),rh.mpd=function(){return new l$}
1,rd["application/dash+xml"]=function(){return new l$},rd["video/vnd.mpeg.dash.mpd"]=function(){return new l$},l5.prototype.toString=function(){var e="#"+this.name,t=this.g?this.g.map(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},l5.prototype.getAttribute=function(e){var t=this.g.filter(function(t){return t.name==e});return t.length?t[0]:null};var ch="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(" "),cf="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function cp(){}function cg(e){try{var t=cm(e);return nY({uri:e,originalUri:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return nz(e)}}function cm(t){var n=t.split(":");if(2>n.length||"data"!=n[0]||2>(n=n.slice(1).join(":").split(",")).length)throw new ej(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),i=(n=i.split(";"))[0];var r=!1;return 1<n.length&&"base64"==n[n.length-1]&&(r=!0,n.pop()),{data:r?tA(t):tb(t),contentType:i}}function cv(){var e=this;this.g=this.i=null,this.Fa=1,this.o=new Map,this.u=new Map,this.F=new Map,this.F.set("video",new Map),this.F.set("audio",new Map),this.F.set(e5,new Map),this.F.set("image",new Map),this.ka=new Set,this.h=new Map,this.j=null,this.M="",this.W=new cl,this.O=0,this.A=-1,this.H=1/0,this.Ga=!1,this.m=new tt(function(){var t,n,i;t=e,F(function(e){return 1==e.g?t.i?(D(e,2),C(e,t.update(),4)):e.return():2!=e.g?(cV(t)&&(n=t.O,t.m.N(n)),N(e,0)):(i=P(e),t.i)?void(i.severity=1,t.i.onError(i),t.m.N(.1),M(e)):e.return()})}),this.fa=cY,this.D=null,this.da=0,this.J=1/0,this.V=this.ea=0,this.G=new n3,this.L=new Map,this.s=new Map,this.ba=new Map,this.l=!1}function cy(e,t){return cV(e)?e.F.get(t.type):t.bd}function cb(e,t,n){t.kb+=n,t.Qa+=n,t=v(e=cy(e,t));for(var i=t.next();!i.done;i=t.next()){var r=v(i.value);i=r.next().value,r=r.next().value,e.set(i,r+n)}}function cw(e){if(cV(e)){if(e.O=e.J,e.fa==cJ){for(var t,n=t=1/0,i=v(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&(t=Math.min(t,r.Qa),n=Math.min(n,r.kb));t-=n,e.g.hls.useSafariBehaviorForLive&&(t=e.j.m),isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.j.ne(t)}}else e.j.Aa(ck(e));e.j.Od()}function cT(e,t){var n=new Map;t=v(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=l6(r,"NAME");var a=l6(r,"VALUE");r=l6(r,"IMPORT"),i&&a&&n.set(i,a),r&&(i=e.o.get(r))&&n.set(r,i)}return n}function cx(e,t){var n=[];e.g.disableVideo||n.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||n.push(e.g.hls.defaultAudioCodec),n=l6(t,"CODECS",n.join(",")).split(/\s*,\s*/),e=new Set,t=[],n=v(n);for(var i=n.next();!i.done;i=n.next()){var r=tH(i=i.value)[0];e.has(r)||(t.push(i),e.add(r))}return t}function cS(e){return tQ(e=l6(e,"LANGUAGE")||"und")}function cE(e,t){var n=l8(t,"GROUP-ID"),i="",r=l8(t,"TYPE").toLowerCase();"subtitles"==r&&(r=e5);var a=r;if(a==e5?i=l6(t,"CODECS")||"":n&&e.s.has(n)&&(i=e.s.get(n)),r=cO(l8(t,"URI"),e.o),e.h.has(r))return e.h.get(r);var o=cS(t),s=l6(t,"NAME"),u="YES"==l6(t,"DEFAULT"),l="audio"==a&&(l=l6(t,"CHANNELS"))?parseInt(l.split("/")[0],10):null,c="audio"==a&&!!(c=l6(t,"CHANNELS"))&&c.includes("/JOC");return(i=cA(e,r,i,a,o,u,s,l,null,l6(t,"CHARACTERISTICS"),t="YES"==l6(t,"FORCED"),c),e.u.has(n)?e.u.get(n).push(i):e.u.set(n,[i]),e.h.has(r))?e.h.get(r):(e.h.set(r,i),i)}function cA(e,t,n,i,r,a,o,s,u,l,c,d){var h=cr(e.M,t),f=cD(e,n,i,r,a,o,s,u,l,c,d);aJ.includes(f.mimeType)&&(f.codecs="");var p={stream:f,type:i,Bc:t,Kc:h,kb:0,Qa:0,bd:new Map,Nc:!1,nc:!1,Fd:-1,Nd:!1},g=null,m=new AbortController;return f.createSegmentIndex=function(){return g||(m=new AbortController,g=new Promise(function(h){var g,y,b,w,T,x,S,E,A,k,I,D,R,N;h((g=m.signal,F(function(h){if(1==h.g)return C(h,cF(e,p.Kc),2);if(3!=h.g)return(y=h.h,g.aborted)?h.return():(b=y.uri,w=cc(e.W,y.data,b),T=cV(e),C(h,cM(e,w,t,b,n,i,r,a,o,s,u,l,c,d),3));if(x=h.h,g.aborted)return h.return();if(S=x.stream,cV(e)&&!T&&cL(e,w),p.Kc=b,p.kb=x.kb,p.Qa=x.Qa,p.Nc=x.Nc,p.nc=x.nc,p.bd=x.bd,p.Nd=!0,f.segmentIndex=S.segmentIndex,f.encrypted=S.encrypted,f.drmInfos=S.drmInfos,f.keyIds=S.keyIds,f.mimeType=S.mimeType,aJ.includes(f.mimeType)&&(f.codecs=""),f.drmInfos.length&&e.i.newDrmInfo(f),i==(E=e6).va||i==E.Ic)for(k=(A=v(e.h.values())
1).next();!k.done;k=A.next())(I=k.value).Nd||I.type!=i||(I.stream.mimeType=S.mimeType,aJ.includes(I.stream.mimeType)&&(I.stream.codecs=""));i==E.Y&&(D=S.segmentIndex.get(0))&&D.h&&(f.mimeType="application/mp4"),function(e){if(!e.D)return!1;var t=[],n=[];e=v(e.D.variants);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&t.push(i.video),i.audio&&n.push(i.audio);return(!(0<t.length)||!!t.some(function(e){return e.segmentIndex}))&&(!(0<n.length)||!!n.some(function(e){return e.segmentIndex}))}(e)&&(e.Ga?cC(e,[p]):(e.Ga=!0,R=Array.from(e.h.values()).filter(function(e){return e.stream.segmentIndex}),cC(e,R),cw(e),0<(N=e.O)&&e.m.N(N))),M(h)})))}))},f.closeSegmentIndex=function(){g&&!f.segmentIndex&&m.abort(),f.segmentIndex&&(f.segmentIndex.release(),f.segmentIndex=null),g=null},p}function ck(e){var t=1/0;e=v(e.h.values());for(var n=e.next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&(t=Math.min(t,n.Qa));return t}function cI(e,t){var n=[];t=v(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&function(e,t){e=v(e.g);for(var n=e.next();!n.done;n=e.next())t(n.value)}(i.segmentIndex,function(e){n.push(e)});e.j.Jb(n)}function cC(e,t){if(!cV(e))for(var n=ck(e),i=v(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Ya(0,n);for(r=(n=v(t)).next();!r.done;r=n.next())r=r.value.stream,aJ.includes(r.mimeType)&&(r.codecs="");cI(e,t.map(function(e){return e.stream})),e.g.hls.ignoreManifestProgramDateTime?function(e,t){for(var n=-1==e.A,i=v(t),r=i.next();!r.done;r=i.next()){var a=(r=r.value).stream.segmentIndex,o=cy(e,r);if(a=a.g[0]||null){o=v(o);for(var s=o.next();!s.done;s=o.next()){var u=(s=v(s.value)).next().value;if(s.next().value==a.startTime){n&&(e.A=Math.max(e.A,u)),r.Fd=u;break}}}}if(!(0>e.A))for(r=(t=v(t)).next();!r.done;r=t.next())(i=(n=r.value).stream.segmentIndex)&&(i.g.splice(0,e.A-n.Fd),i=i.g[0]||null)&&(i=-i.startTime,n.stream.segmentIndex.offset(i),cb(e,n,i))}(e,t):function(e,t){if(1/0==e.H){t=v(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value.stream.segmentIndex.g[0]||null;null!=i&&null!=i.g&&(e.H=Math.min(e.H,i.g))}}if(1/0!=(t=e.H))for(n=(i=v(e.h.values())).next();!n.done;n=i.next()){var r=(n=n.value).stream.segmentIndex;if(null!=r){var a=r.g[0]||null;if(null==a.g)Z("Missing EXT-X-PROGRAM-DATE-TIME for stream",n.Bc,"Expect AV sync issues!");else for(cb(e,n,a.g-t-a.startTime),r=(n=v(r)).next();!r.done;r=n.next())r.value.oe(t)}}}(e,t)}function cM(e,t,n,i,r,a,o,s,u,l,c,d,h,f,p){var g,m,v,y,b,w,T,x,S,E,A,k,I,M,D;return F(function(R){if(1==R.g){var N,P,L,_,j,O,U,B,V,H,K,q;if(1!=t.type)throw new ej(2,4,4017);return g=cT(e,ce(t.g,"EXT-X-DEFINE")),cP(e,t),p?R.B(2):C(R,(N=e,P=a,L=r,_=t,j=g,F(function(e){return 1==e.g?(O=it,U=Math.trunc((_.segments.length-1)/2),V=new eU(B=cO(_.segments[U].i,j)).ra.split(".").pop(),(H=cz[P][V])||(H=cq[V])||(H=cU(P,L)))?e.return(H):((K=n9([B],N.g.retryParameters)).method="HEAD",C(e,cK(N,K,O),2)):(q=e.h.headers["content-type"])?e.return(q.split(";")[0]):e.return(cB(P))})),3)}if(2!=R.g&&(p=R.h),v=(m=cR(t,p)).drmInfos,y=m.keyIds,b=m.encrypted,w=m.lf,b&&!v.length&&!w)throw new ej(2,4,4026);return T=cV(e)?e.F.get(a):new Map,x=e.l,S=cj(e,t,a,T,g),x!=e.l&&cP(e,t),E=S[0].startTime,A=S[S.length-1].endTime,k=new ou(S),M=!!(I=cn(t.g,"EXT-X-SERVER-CONTROL"))&&null!=I.getAttribute("CAN-SKIP-UNTIL"),(D=cD(e,r,a,o,s,u,l,c,d,h,f)).segmentIndex=k,D.encrypted=b,D.drmInfos=v,D.keyIds=y,D.mimeType=p,R.return({stream:D,type:a,Bc:n,Kc:i,kb:E,Qa:A,Nc:M,nc:!1,Fd:-1,bd:T,Nd:!1})})}function cD(e,t,n,i,r,a,o,s,u,l,c){var d=cU(n,t)||cB(n),h=[];if(u){u=v(u.split(","));for(var f=u.next();!f.done;f=u.next())h.push(f.value)}return u=n==e5?"subtitle":void 0,h.length||"subtitle"!==u||h.push("subtitle"),{id:e.Fa++,originalId:a,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:d,codecs:t,kind:u,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,label:a,type:n,primary:r,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:h,forced:l,channelsCount:o,audioSamplingRate:null,spatialAudio:c,closedCaptions:s,hdr:void 0,tilesLayout:void 0,external:!1}}function cR(e,t){var n=[];if(e.segments){e=v(e.segments);for(var i=e.next();!i.done;i=e.next())i=ce(i.value.g,"EXT-X-KEY"),n.push.apply(n,y(i))}i=e=!1;var r=[],a=new Set;n=v(n);for(var o=n.next();!o.done;o=n.next()){var s=l8(o=o.value,"METHOD");if("NONE"!=s){if(e=!0,"AES-128"==s)i=!0;else if(o=(s=cW[s=l6(o,"KEYFORMAT")||"identity"])?s(o,t):null){if(o.keyIds){s=v(o.keyIds);for(var u=s.next();!u.done;u=s.next())a.add(u.value)}r.push(o)}}}return{drmInfos:r,keyIds:a,encrypted:e,lf:i}}function cN(t,n,i){if(!e.crypto||!e.crypto.subtle)throw ee("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new ej(2,4,4042);var r=0,a=l6(n,"IV","");if(a){var o=tk(a.substr(2));if(16!=o.byteLength)throw new ej(2,4,4043)}else r=ci(i.g,"EXT-X-MEDIA-SEQUENCE");var s=n9([n=cr(i.h,l8(n,"URI"))],t.g.retryParameters),u={method:"AES-128",iv:o,firstMediaSequenceNumber:r,fetchKey:function(){var n,i,r;
1return F(function(a){if(1==a.g)return C(a,cK(t,s,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new ej(2,4,4044);return i={name:"AES-CBC"},r=u,C(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,u.fetchKey=void 0,M(a)})}};return u}function cP(e,t){var n=cn(t.g,"EXT-X-PLAYLIST-TYPE"),i=cn(t.g,"EXT-X-ENDLIST");if(i=n&&"VOD"==n.value||i,n=n&&"EVENT"==n.value&&!i,n=!i&&!n,i)cH(e,cY);else{if(n?cH(e,cJ):cH(e,c$),!(i=cn(t.g,"EXT-X-TARGETDURATION")))throw new ej(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),n=cn(t.g,"EXT-X-PART-INF"),e.l&&n?(e.ea=Number(l8(n,"PART-TARGET")),e.J=Math.min(e.ea,e.J),e.V=(t=cn(t.g,"EXT-X-SERVER-CONTROL"))?Number(l8(t,"PART-HOLD-BACK")):0):e.J=Math.min(i,e.J),e.da=Math.max(i,e.da)}}function cL(e,t){if(e.g.defaultPresentationDelay)t=e.g.defaultPresentationDelay;else if(e.V)t=e.V;else{t=t.segments.length;var n=e.g.hls.liveSegmentsDelay;n>t-2&&(n=Math.max(1,t-2)),t=e.da*n}e.j.Ye(0),e.j.Xe(t),e.j.zc(!1)}function c_(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.ma+1)+t-1),[n,i]}function cj(e,t,n,i,r){var a=t.segments,o=void 0,s=ci(t.g,"EXT-X-DISCONTINUITY-SEQUENCE"),u=ci(t.g,"EXT-X-MEDIA-SEQUENCE"),l=cn(t.g,"EXT-X-SKIP"),c=u+(l=l?Number(l6(l,"SKIPPED-SEGMENTS")):0),d=0;cV(e)&&i.has(c)&&(d=i.get(c));for(var h=[],f=null,p=0;p<a.length;p++){var g=a[p],m=0==p?d:f.endTime;c=u+l+p,cn(g.g,"EXT-X-DISCONTINUITY")&&s++;for(var y=v(g.g),b=y.next();!b.done;b=y.next())"EXT-X-KEY"==(b=b.value).name&&(o="AES-128"==l8(b,"METHOD")?cN(e,b,t):void 0);i.set(c,m),y=function(e,t,n,i){var r=cn(n,"EXT-X-MAP");if(!r)return null;var a=l8(r,"URI");if(i=[a=cO(cr(t.h,a),i),l6(r,"BYTERANGE","")].join("-"),!e.ba.has(i)){var o=void 0;n=v(n);for(var s=n.next();!s.done;s=n.next())"EXT-X-KEY"==(s=s.value).name&&"AES-128"==l8(s,"METHOD")&&s.id<r.id&&(o=cN(e,s,t));t=function(e,t,n){var i=0,r=null;return(t=l6(t,"BYTERANGE"))&&(r=Number((i=t.split("@"))[0]),r=(i=Number(i[1]))+r-1,n&&(t=r+1-i)%16&&(r+=16-t%16)),new ah(function(){return[e]},i,r,null,null,n)}(a,r,o),e.ba.set(i,t)}return e.ba.get(i)}(e,t,g.g,r),!e.l&&e.i.isAutoLowLatencyMode()&&(e.i.enableLowLatencyMode(),e.l=e.i.isLowLatencyMode()),(g=function(e,t,n,i,r,a,o,s,u){var l=i.g,c=cO(i.i,a),d=cn(l,"EXTINF"),h=0;a=0;var f=null;i.h.length&&!e.l&&ee("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 p=null;if(!e.g.hls.ignoreManifestProgramDateTime){var g=cn(l,"EXT-X-PROGRAM-DATE-TIME");g&&g.value&&(p=iU(g.value))}if(g=ap,cn(l,"EXT-X-GAP")&&(g=2),!d){if(0==i.h.length)throw new ej(2,4,4024,"EXTINF");if(!e.l)return null}var m=[];if(e.l){h={};for(var y=0;y<i.h.length;h={sd:h.sd},y++){var b=i.h[y],w=0==y?n:m[m.length-1],T=0==y?r:w.endTime,x=Number(l6(b,"DURATION"))||e.ea;if(x){x=T+x;var S=0,E=null;"EXT-X-PRELOAD-HINT"==b.name?S=(S=l6(b,"BYTERANGE-START"))?Number(S):0:(S=(E=v(c_(w,S=l6(b,"BYTERANGE")))).next().value,E=E.next().value),(w=l6(b,"URI"))&&(h.sd=cr(o,w),w=ap,"YES"==l6(b,"GAP")&&(w=2),T=new af(T,x,function(e){return function(){return[e.sd]}}(h),S,E,t,0,0,1/0,[],"",null,null,w),"EXT-X-PRELOAD-HINT"==b.name&&T.Me(),m.push(T))}}}if(d){if(0==(e=Number(d.value.split(",")[0])))return null;h=r+e}else{if(!m.length)return null;h=m[m.length-1].endTime}return(e=cn(l,"EXT-X-BYTERANGE"))?(a=(f=v(c_(n,e.value))).next().value,f=f.next().value):m.length&&(a=m[0].Ba,f=m[m.length-1].ma),n="",e=null,"image"==s&&(n="1x1",s=cn(l,"EXT-X-TILES"))&&(n=l8(s,"LAYOUT"),(s=l6(s,"DURATION"))&&(e=Number(s))),new af(r,h,function(){return c.length?[c]:[]},a,f,t,0,0,1/0,m,n,e,p,g,u)}(e,y,f,g,m,r,t.h,n,o))&&(f=g,g.l=s,e.g.hls.ignoreManifestProgramDateTime&&null!=e.A&&c<e.A||h.push(g))}if(t=h.some(function(e){return null!=e.g})){for(n={},i=0;i<h.length;n={Rb:n.Rb,Qb:n.Qb,Cc:n.Cc,Ua:n.Ua,Pb:n.Pb},i++)if(n.Ua=h[i],null==n.Ua.g)for(n.Qb=0,n.Rb=i,r=function(e){return function(){var t=h[e.Rb];if(t){if(null!=t.g)return t.g+e.Qb;e.Qb-=t.endTime-t.startTime,e.Rb+=1}return null}}(n),n.Pb=0,n.Cc=i,a=function(e){return function(){var t=h[e.Cc];if(t){if(t!=e.Ua&&(e.Pb+=t.endTime-t.startTime),null!=t.g)return t.g+e.Pb;--e.Cc}return null}}(n);null==n.Ua.g;)n.Ua.g=a(),null==n.Ua.g&&(n.Ua.g=r())}if(t)for(i=(n=v(h)).next();!i.done;i=n.next())for(i=(r=i.value).g,a=(r=v(r.i)).next();!a.done;a=r.next())(a=a.value).g=i,i+=a.endTime-a.startTime;if(e=e.H,t&&1/0!=e)for(i=(t=v(h)).next();!i.done;i=t.next())i.value.oe(e);return h}function cO(e,t){if(!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n){n=v(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(a)e=e.replace(i,a);else throw new ej(2,4,4039,r)}}return e}function cU(e,t){if(e==e5){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":null:"image/jpeg"}function cB(e){return e==e5?"text/vtt":cz[e].mp4}function cF(e,t){return t=n9([t],e.g.retryParameters),e.i.modifyManifestRequest(t,{format:"h"}),cK(e,t,0)}function cV(e){return e.fa!=cY}function cH(e,t){e.fa=t,e.j&&e.j.zc(!cV(e)),cV(e)||e.m.stop()}function cK(e,t,n){if(!e.G)throw new ej(2,7,7001);return t=e.i.networkingEngine.request(n,t),n5(e.G,t),t.promise}W("shaka.net.DataUriPlugin",cp),cp.parse=cg,n8("data",cg),(b=cv.prototype).configure=function(e){this.g=e},b.start=function(e,t){var n,i=this;return F(function(r){var a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,T,x,S,E,A,k,I,R,N,L,_,j,O,U,B,V,H,K;
1return 1==r.g?(i.i=t,i.l=t.isLowLatencyMode(),C(r,cF(i,e),2)):3!=r.g?(i.M=(n=r.h).uri,C(r,(a=i,o=n.data,s=e,F(function(e){switch(e.g){case 1:l=ce((u=cc(a.W,o,a.M)).g,"EXT-X-DEFINE");for(var t,n,i,r,q=v(l),G=q.next();!G.done;G=q.next()){var X=G.value;G=l6(X,"NAME"),X=l6(X,"VALUE"),G&&X&&(a.o.has(G)||a.o.set(G,X))}if(c=[],d=[],h=[],1==u.type)return I=a.g.hls.mediaPlaylistFullMimeType,u.segments.length&&((N=cq[R=new eU(u.segments[0].i).ra.split(".").pop()])?I=N:"ts"!==R&&"mp4"!==R&&(cG[R]?(N=cG[R],L=a.g.hls.defaultAudioCodec,I=N+'; codecs="'+L+'"'):cX[R]&&(N=cX[R],_=a.g.hls.defaultVideoCodec,I=N+'; codecs="'+_+'"'))),O=(j=I.split(";")[0]).split("/")[0],U=tV(I),B=new Map,C(e,cM(a,u,s,s,U,O,"",!0,"Media Playlist",null,B,null,!1,!1,j),5);for(f=ce(u.g,"EXT-X-MEDIA"),p=ce(u.g,"EXT-X-STREAM-INF"),g=ce(u.g,"EXT-X-IMAGE-STREAM-INF"),m=ce(u.g,"EXT-X-SESSION-KEY"),G=(q=v(p)).next();!G.done;G=q.next()){var z=G.value;X=l6(z,"AUDIO"),G=l6(z,"VIDEO");var W=l6(z,"SUBTITLES");if(z=cx(a,z),W){var Y=e3(e5,z);a.s.set(W,Y),es(z,Y)}X&&((W=e3("audio",z))||(W=a.g.hls.defaultAudioCodec),a.s.set(X,W)),G&&((X=e3("video",z))||(X=a.g.hls.defaultVideoCodec),a.s.set(G,X))}for(b=(y=v(ce(u.g,"EXT-X-SESSION-DATA"))).next();!b.done;b=y.next())T=l6(w=b.value,"DATA-ID"),x=l6(w,"URI"),S=l6(w,"LANGUAGE"),E=l6(w,"VALUE"),A=(new Map).set("id",T),x&&A.set("uri",cr(a.M,x)),S&&A.set("language",S),E&&A.set("value",E),k=new nQ("sessiondata",A),a.i&&a.i.onEvent(k);for(function(e,t){t=v(t=t.filter(function(e){var t=l6(e,"URI")||"";return"SUBTITLES"!=l6(e,"TYPE")&&""!=t}));for(var n=t.next();!n.done;n=t.next())cE(e,n.value)}(a,f),G=(q=v(q=ct(f,"CLOSED-CAPTIONS"))).next();!G.done;G=q.next())W=l6(X=G.value,"LANGUAGE"),G=cS(X),W||(W=l6(X,"NAME"))&&(G=W),W=l8(X,"GROUP-ID"),X=l8(X,"INSTREAM-ID").replace("SERVICE","svc"),a.L.get(W)||a.L.set(W,new Map),a.L.get(W).set(X,G);return c=function(e,t,n){var i=[],r=new Set;if(0<n.length){n=v(n);for(var a=n.next();!a.done;a=n.next()){var o=l8(a=a.value,"METHOD");if("NONE"!=o&&"AES-128"!=o&&(a=(o=cW[o=l6(a,"KEYFORMAT")||"identity"])?o(a,""):null)){if(a.keyIds){o=v(a.keyIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}i.push(a)}}}return(t=t.map(function(t){var n,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w=l6(t,"FRAME-RATE"),T=Number(l6(t,"AVERAGE-BANDWIDTH"))||Number(l8(t,"BANDWIDTH")),x=l6(t,"RESOLUTION"),S=(x=v(x?x.split("x"):[null,null])).next().value,E=x.next().value,A=l6(t,"VIDEO-RANGE");x=(o=cx(n=e,a=t),s=l6(a,"AUDIO"),u=l6(a,"VIDEO"),l=(l=s||u)&&n.u.has(l)?n.u.get(l):[],s={audio:s?l:[],video:u?l:[]},u=!1,c=l8(a,"URI"),d=s.audio.find(function(e){return e&&e.Bc==c}),h=e3("video",o),(f=e3("audio",o))&&!h?(l="audio",u=0<s.audio.length):!l.length&&f&&h?(l="video",o=[[h,f].join()]):s.audio.length&&d?(l="audio",u=!0):l=s.video.length&&!s.audio.length?"audio":"video",u||(s[(p=n,g=a,m=o,y=l,b=cO(l8(g,"URI"),p.o),n=p.h.has(b)||(g=l6(g,"CLOSED-CAPTIONS"),g="video"==y&&g&&"NONE"!=g?p.L.get(g):null,y=cA(p,b,m=e4(y,m),y,"und",!1,null,null,g,null,!1,!1),p.h.has(b))?p.h.get(b):(p.h.set(b,y),y)).stream.type]=[n]),t=s).audio,t=t.video;for(var k=v(t),I=k.next();!I.done;I=k.next())(I=I.value.stream)&&(I.width=Number(S)||void 0,I.height=Number(E)||void 0,I.frameRate=Number(w)||void 0,I.hdr=A||void 0);for(w=e.g.disableAudio,(!x.length||w)&&(x=[null]),w=e.g.disableVideo,(!t.length||w)&&(t=[null]),w=[],S=(x=v(x)).next();!S.done;S=x.next())for(S=S.value,A=(E=v(t)).next();!A.done;A=E.next()){var C=A.value;(A=S?S.stream:null)&&(A.drmInfos=i,A.keyIds=r),(k=C?C.stream:null)&&(k.drmInfos=i,k.keyIds=r),I=S?S.stream.drmInfos:null;var M=C?C.stream.drmInfos:null;C=(C?C.Bc:"")+" - "+(S?S.Bc:""),A&&k&&I.length&&M.length&&!(0<i7(I,M).length)||e.ka.has(C)||(A={id:e.Fa++,language:A?A.language:"und",primary:!!A&&A.primary||!!k&&k.primary,audio:A,video:k,bandwidth:T,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.push(A),e.ka.add(C))}return w}).reduce(eQ,[])).filter(function(e){return null!=e})}(a,p,m),d=function(e,t){var n=ct(t,"SUBTITLES");t=n.map(function(t){if(e.g.disableText)return null;try{return cE(e,t).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}),n=v(n);for(var i=n.next();!i.done;i=n.next()){var r=l8(i.value,"GROUP-ID");if((i=e.s.get(r))&&(r=e.u.get(r))){r=v(r);for(var a=r.next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=cU(e5,i)||cB(e5)}}return t.filter(function(e){return e})}(a,f),C(e,(t=a,n=g,F(function(e){return 1==e.g?(i=n.map(function(e){var n,i;return F(function(r){if(1==r.g){var a,o,s,u,l,c,d,h,f,p,g;return t.g.disableThumbnails?r.return(null):(D(r,2),C(r,(a=t,o=e,F(function(e){return 1==e.g?(s=cO(l8(o,"URI"),a.o),u=l6(o,"CODECS","jpeg")||"",a.h.has(s))?e.return(a.h.get(s)):(l=cS(o),c=l6(o,"NAME"),d=l6(o,"CHARACTERISTICS"),h=cA(a,s,u,"image",l,!1,c,null,null,d,!1,
1!1),a.h.has(s)?e.return(a.h.get(s)):(f=l6(o,"RESOLUTION"))?C(e,h.stream.createSegmentIndex(),3):e.B(2)):(2!=e.g&&(p=h.stream.segmentIndex.get(0).tilesLayout)&&(h.stream.width=Number(f.split("x")[0])*Number(p.split("x")[0]),h.stream.height=Number(f.split("x")[1])*Number(p.split("x")[1])),(g=l6(o,"BANDWIDTH"))&&(h.stream.bandwidth=Number(g)),a.h.set(s,h),e.return(h))})),4))}if(2!=r.g)return n=r.h,r.return(n.stream);if(i=P(r),t.g.hls.ignoreImageStreamFailures)return r.return(null);throw i})}),C(e,Promise.all(i),2)):(r=e.h,e.return(r.filter(function(e){return e})))})),4);case 4:h=e.h,e.B(3);break;case 5:V=e.h,a.h.set(s,V),c.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==O?V.stream:null,video:"video"==O?V.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new ej(2,7,7001);a.j=new aQ(null,0),a.j.zc(!0),1==u.type&&(cV(a)&&(cL(a,u),H=a.O,a.m.N(H)),K=Array.from(a.h.values()),cC(a,K),cw(a)),a.D={presentationTimeline:a.j,variants:c,textStreams:d,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0},a.i.makeTextStreamsForClosedCaptions(a.D),M(e)}})),3)):r.return(i.D)})},b.stop=function(){this.m&&(this.m.stop(),this.m=null);var e=[];return this.G&&(e.push(this.G.destroy()),this.G=null),this.g=this.i=null,this.ka.clear(),this.D=null,this.h.clear(),this.u.clear(),this.s.clear(),this.o.clear(),Promise.all(e)},b.update=function(){var e,t,n,i,r,a,o,s=this;return F(function(u){if(1==u.g){if(!cV(s))return u.return();for(e=[],i=(n=v(t=Array.from(s.h.values()).filter(function(e){return e.stream.segmentIndex}))).next();!i.done;i=n.next())r=i.value,e.push(function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f;return F(function(p){var g;if(1==p.g)return n=new eU(t.Kc),e.l&&t.Nc&&eV(n,new e$("_HLS_skip=YES")),C(p,cF(e,n.toString()),2);if(i=p.h,!t.stream.segmentIndex)return p.return();if(1!=(r=cc(e.W,i.data,i.uri)).type)throw new ej(2,4,4017);a=cT(e,ce(r.g,"EXT-X-DEFINE")),o=t.stream,s=cy(e,t),l=(u=cR(r,o.mimeType)).keyIds,c=u.drmInfos,g=o.keyIds,g.size===l.size&&[].concat(y(g)).every(function(e){return l.has(e)})||(o.keyIds=l,o.drmInfos=c,e.i.newDrmInfo(o)),d=cj(e,r,o.type,s,a),o.segmentIndex.Ib(d,e.j.Oa()),d.length&&(h=ci(r.g,"EXT-X-MEDIA-SEQUENCE"),f=s.get(h),o.segmentIndex.eb(f)),t.kb=d[0].startTime,t.Qa=d[d.length-1].endTime,cn(r.g,"EXT-X-ENDLIST")&&(t.nc=!0),M(p)})}(s,r));return C(u,Promise.all(e),2)}cI(s,t.map(function(e){return e.stream})),a=t.some(function(e){return 0==e.nc}),t.length&&!a&&(cH(s,cQ.gf),o=t.map(function(e){return e.Qa}),s.j.Aa(Math.min.apply(Math,y(o))),s.i.updateDuration()),a&&cw(s),M(u)})},b.onExpirationUpdated=function(){},W("shaka.hls.HlsParser",cv);var cq={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},cG={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"},cX={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"},cz={audio:cG,video:cX,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",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"}},cW={"com.apple.streamingkeydelivery":function(t,n){if("video/mp2t"==n)throw new ej(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new ej(2,4,4041);return e2("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=l8(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=e2("com.widevine.alpha",[{initDataType:"cenc",initData:t=eP((t=cm(t=l8(e,"URI"))).data)}]),(e=l6(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=l8(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?e2("com.microsoft.playready",[{initDataType:"cenc",initData:e=iC(e=eP((e=cm(e=l8(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]):null},identity:function(e){return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(e=l8
1(e,"METHOD"))?e2("org.w3.clearkey",null):null}},cY="VOD",c$="EVENT",cJ="LIVE",cQ={gf:cY};function cZ(e,t,n,i,r,a){if(200<=n&&299>=n&&202!=n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=ty(t)}catch(e){}throw new ej(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function c0(){}function c1(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,T,x,S,E=new c8;id(t.headers).forEach(function(e,t){E.append(t,e)});var A=new c5,k={ye:!1,cf:!1};if(e=new nX((a=e,o=n,s={body:t.body||void 0,headers:E,method:t.method,signal:A.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u=k,l=i,c=r,d=t.streamDataCallback,e=F(function(e){switch(e.g){case 1:return h=c3,f=c6,v=m=0,y=Date.now(),D(e,2),C(e,h(a,s),4);case 4:if(c(c2((p=e.h).headers)),"HEAD"==s.method){e.B(5);break}return b=p.clone().body.getReader(),T=(w=p.headers.get("Content-Length"))?parseInt(w,10):0,new f({start:function(e){!function t(){var n,i;return F(function(r){switch(r.g){case 1:return D(r,2),C(r,b.read(),4);case 4:n=r.h,N(r,3);break;case 2:return P(r),r.return();case 3:if(n.done||(m+=n.value.byteLength,!d)){r.B(5);break}return C(r,d(n.value),5);case 5:(100<(i=Date.now())-y||n.done)&&(l(i-y,m-v,T-m),v=m,y=i),n.done?e.close():(e.enqueue(n.value),t()),M(r)}})}()}}),C(e,p.arrayBuffer(),6);case 6:g=e.h;case 5:N(e,3);break;case 2:if(x=P(e),u.ye)throw new ej(1,1,7001,a,o);if(u.cf)throw new ej(1,1,1003,a,o);throw new ej(1,1,1002,a,x,o);case 3:return S=c2(p.headers),e.return(cZ(S,g,p.status,a,p.url,o))}})),function(){return k.ye=!0,A.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var I=new tt(function(){k.cf=!0,A.abort()});I.N(t/1e3),e.finally(function(){I.stop()})}return e}function c2(e){var t={};return e.forEach(function(e,n){t[n.trim()]=e}),t}function c4(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&!!new Response("").body&&!(!e.fetch||!e.AbortController)}td("Tizen 3")||td("Tizen 2")||ts()||(rh.m3u8=function(){return new cv},rd["application/x-mpegurl"]=function(){return new cv},rd["application/vnd.apple.mpegurl"]=function(){return new cv}),W("shaka.net.HttpFetchPlugin",c0),c0.isSupported=c4,c0.parse=c1;var c3=e.fetch,c5=e.AbortController,c6=e.ReadableStream,c8=e.Headers;function c9(){}function c7(e,t,n,i,r){var a=new dt,o=Date.now(),s=0;return new nX(new Promise(function(u,l){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){l(new ej(1,1,7001,e,n))};var c=!1;for(var d in a.onreadystatechange=function(){2!=a.readyState||c||(r(de(a)),c=!0)},a.onload=function(){var t=de(a),i=a.response;try{var r=cZ(t,i,a.status,e,a.responseURL,n);u(r)}catch(e){l(e)}},a.onerror=function(t){l(new ej(1,1,1002,e,t,n))},a.ontimeout=function(){l(new ej(1,1,1003,e,n))},a.onprogress=function(e){var t=Date.now();(100<t-o||e.lengthComputable&&e.loaded==e.total)&&(i(t-o,e.loaded-s,e.total-e.loaded),s=e.loaded,o=t)},t.headers)a.setRequestHeader(d.toLowerCase(),t.headers[d]);a.send(t.body)}),function(){return a.abort(),Promise.resolve()})}function de(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={},t=v(t);for(var n=t.next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}c4()&&(n8("http",c1,2,!0),n8("https",c1,2,!0),n8("blob",c1,2,!0)),W("shaka.net.HttpXHRPlugin",c9),c9.parse=c7;var dt=e.XMLHttpRequest;function dn(e,t,n,i){this.g=e,this.i=t,this.groupId=n,this.h=i}function di(e){return e.ya().map(function(e){return"{"+encodeURI(e)+"}"}).join("")+":"+e.Ba+":"+e.ma}function dr(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function da(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function ds(e){var t=this;this.o=e,this.j=new Map,this.i=new ia(function(){return du(t).catch(function(){})}),this.h=[],this.m=function(){},this.l=function(){},this.g=new dr}function du(e){var t=e.h.map(function(e){return e()});return e.h=[],Promise.all(t)}function dl(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new e9,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function dc(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return F(function(i){if(1==i.g)return null==r.result?(n(),i.return()):C(i,t((e=r.result).key,e.value,e),2);e.continue(),M(i)})}})}function dd(e){this.h=e,this.g=[]}function dh(e,t){return df(e,t,"readwrite")}function df(e,t,n){var i=new dl(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){es(e.g,i)},function(){es(e.g,i)}),i}function dp(e,t,n){this.h=new dd(e),this.i=t,this.g=n}function dg(e){return Promise.reject(new ej(2,9,9011,"Cannot add new value to "+e))}function dm(e,t,n,i){t=(e=dh(e.h,t)).store();var r={};n=v(n);for(var a=n.next();!a.done;r={Fc:r.Fc}
1,a=n.next())r.Fc=a.value,t.delete(r.Fc).onsuccess=function(e){return function(){return i(e.Fc)}}(r);return e.promise()}function dv(e,t,n){var i,r,a,o,s,u,l;return F(function(c){if(1==c.g){for(r=(i=df(e.h,t,"readonly")).store(),a={},o=[],s={},l=(u=v(n)).next();!l.done;s={Wb:s.Wb,Ub:s.Ub},l=u.next())s.Ub=l.value,s.Wb=r.get(s.Ub),s.Wb.onsuccess=function(e){return function(){void 0==e.Wb.result&&o.push(e.Ub),a[e.Ub]=e.Wb.result}}(s);return C(c,i.promise(),2)}if(o.length)throw new ej(2,9,9012,"Could not find values for "+o);return c.return(n.map(function(e){return a[e]}))})}function dy(e){this.g=new dd(e)}function db(){this.g=new Map}function dw(e){var t=null;if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{za:n,la:i},la:e})})}),t)return t;throw new ej(2,9,9013,"Could not find a cell that supports add-operations")}function dT(e,t,n){if(!(e=e.g.get(t)))throw new ej(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new ej(2,9,9013,"Could not find cell with name "+n);return t}function dx(e,t){dS.set(e,t)}n8("http",c7,1,!0),n8("https",c7,1,!0),n8("blob",c7,1,!0),dr.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},ds.prototype.destroy=function(){return this.i.destroy()},dl.prototype.abort=function(){var e=this;return F(function(t){if(1==t.g){try{e.i.abort()}catch(e){}return D(t,2),C(t,e.g,4)}if(2!=t.g)return N(t,0);P(t),M(t)})},dl.prototype.store=function(){return this.h},dl.prototype.promise=function(){return this.g},dd.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(b=dp.prototype).destroy=function(){return this.h.destroy()},b.hasFixedKeySpace=function(){return!0},b.addSegments=function(){return dg(this.i)},b.removeSegments=function(e,t){return dm(this,this.i,e,t)},b.getSegments=function(e){var t,n=this;return F(function(i){return 1==i.g?C(i,dv(n,n.i,e),2):(t=i.h,i.return(t.map(function(e){return n.ze(e)})))})},b.addManifests=function(){return dg(this.g)},b.updateManifest=function(){return Promise.reject(new ej(2,9,9016,"Cannot modify values in "+this.g))},b.updateManifestExpiration=function(e,t){var n=dh(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,i.put(n,e))},n.promise()},b.removeManifests=function(e,t){return dm(this,this.g,e,t)},b.getManifests=function(e){var t,n=this;return F(function(i){return 1==i.g?C(i,dv(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map(function(e){return n.cc(e)}))))})},b.getAllManifests=function(){var e,t,n=this;return F(function(i){return 1==i.g?(e=df(n.h,n.g,"readonly"),t=new Map,C(i,dc(e,function(e,i){var r;return F(function(a){if(1==a.g)return C(a,n.cc(i),2);r=a.h,t.set(e,r),M(a)})}),2)):3!=i.g?C(i,e.promise(),3):i.return(t)})},b.ze=function(e){return e},b.cc=function(e){return Promise.resolve(e)},b.add=function(e,t){var n,i,r,a,o,s,u,l=this;return F(function(c){if(1==c.g){for(i=(n=dh(l.h,e)).store(),r=[],a={},s=(o=v(t)).next();!s.done;a={Gc:a.Gc},s=o.next())u=s.value,a.Gc=i.add(u),a.Gc.onsuccess=function(e){return function(){r.push(e.Gc.result)}}(a);return C(c,n.promise(),2)}return c.return(r)})},dy.prototype.destroy=function(){return this.g.destroy()},dy.prototype.getAll=function(){var e,t,n=this;return F(function(i){return 1==i.g?(e=df(n.g,"session-ids","readonly"),t=[],C(i,dc(e,function(e,n){t.push(n)}),2)):3!=i.g?C(i,e.promise(),3):i.return(t)})},dy.prototype.add=function(e){var t=dh(this.g,"session-ids"),n=t.store();e=v(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},dy.prototype.remove=function(e){var t,n=this;return F(function(i){return 1==i.g?C(i,dc(t=dh(n.g,"session-ids"),function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2):C(i,t.promise(),0)})},db.prototype.destroy=function(){for(var e=[],t=v(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},db.prototype.init=function(){var e=this;dS.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=v(this.g.values()),i=n.next();!i.done;
1i=n.next())t.push(i.value.init());return Promise.all(t)},W("shaka.offline.StorageMuxer",db),db.unregister=function(e){dS.delete(e)},db.register=dx,db.prototype.destroy=db.prototype.destroy;var dS=new Map;function dE(){dp.apply(this,arguments)}function dA(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new ej(2,9,9004,"Could not parse uri "+e)}function dk(){dp.apply(this,arguments)}function dI(){dp.apply(this,arguments)}function dC(){this.m=this.j=this.i=this.h=this.g=this.l=null}function dM(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j="offline:"+e+"/"+t+"/"+n+"/"+i}function dD(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var i=e[3];return i&&null!=t?new dM(t,n,i,Number(e[4])):null}function dR(e,t){this.h=e,this.g=t}function dN(e,t){var n=new aQ(null,0);n.Aa(t.duration);var i=t.streams.filter(function(e){return"audio"==e.type}),r=t.streams.filter(function(e){return"video"==e.type});i=function(e,t,n,i){for(var r=new Set,a=v(t),o=a.next();!o.done;o=a.next()){var s=v(o.value.variantIds);for(o=s.next();!o.done;o=s.next())r.add(o.value)}for(o=(a=v(n)).next();!o.done;o=a.next())for(o=(s=v(o.value.variantIds)).next();!o.done;o=s.next())r.add(o.value);for(a=new Map,o=(r=v(r)).next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(r=(t=v(t)).next();!r.done;r=t.next())for(o=dP(e,r=r.value,i),r=(s=v(r.variantIds)).next();!r.done;r=s.next())(r=a.get(r.value)).language=o.language,r.primary=r.primary||o.primary,r.audio=o;for(t=(n=v(n)).next();!t.done;t=n.next())for(t=dP(e,r=t.value,i),r=(o=v(r.variantIds)).next();!r.done;r=o.next())(r=a.get(r.value)).primary=r.primary||t.primary,r.video=t;return a}(e,i,r,n),r=t.streams.filter(function(e){return e.type==e5}).map(function(t){return dP(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return dP(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=v(i.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1}}function dP(e,t,n){var i=t.segments.map(function(t){var n,i,r,a,o,s;return n=e,i=t,r=new dM("segment",n.h,n.g,i.dataKey),new af(i.startTime,i.endTime,function(){return[r.toString()]},0,null,null!=i.initSegmentKey?(a=n,o=i.initSegmentKey,s=new dM("segment",a.h,a.g,o),new ah(function(){return[s.toString()]},0,null)):null,i.timestampOffset,i.appendWindowStart,i.appendWindowEnd,[],i.tilesLayout||"")});return n.Jb(i),{id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ou(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,external:t.external}}function dL(){this.g=null}function d_(){}function dj(e){var t,n,i,r=dD(e);return r&&"manifest"==r.g?nY(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):r&&"segment"==r.g?(t=r.key(),n=r,i=new db,nY(void 0).Z(function(){return i.init()}).Z(function(){return dT(i,n.za(),n.la())}).Z(function(e){return e.getSegments([n.key()])}).Z(function(e){return{uri:n,data:e[0].data,headers:{}}}).finally(function(){return i.destroy()})):nz(new ej(2,1,9004,e))}function dO(e,t,n){var i,r,a,o;return F(function(s){switch(s.g){case 1:i=[];for(var u,l,c,d,h,f=[],p=v(n),g=p.next();!g.done;g=p.next()){g=g.value;for(var m=!1,y=v(f),b=y.next();!b.done;b=y.next())if(function(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&eu(e.audioCapabilities,t.audioCapabilities,n)&&eu(e.videoCapabilities,t.videoCapabilities,n)}((b=b.value).info,g)){b.sessionIds.push(g.sessionId),m=!0;break}m||f.push({info:g,sessionIds:[g.sessionId]})}a=(r=v(f)).next();case 2:if(a.done){s.B(4);break}return C(s,(u=e,l=t,c=a.value,F(function(e){switch(e.g){case 1:var t,n,i,r,a,o,s;return d=new iY({lb:l,onError:function(){},ed:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(e,2),d.configure(u),C(e,(t=d,n=c.info.keySystem,i=c.info.licenseUri,r=c.info.serverCertificate,a=c.info.audioCapabilities,o=c.info.videoCapabilities,s=new Map,(a={audioCapabilities:a,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:n}).drmInfos=[{keySystem:n,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioR
1obustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],s.set(n,a),i3(t,s,[])),4);case 4:N(e,3);break;case 2:return P(e),C(e,d.destroy(),5);case 5:case 9:return e.return([]);case 3:return D(e,6),C(e,iZ(d),8);case 8:N(e,7);break;case 6:return P(e),C(e,d.destroy(),9);case 7:return h=[],C(e,Promise.all(c.sessionIds.map(function(e){return F(function(t){if(1==t.g){var n,i,r,a;return D(t,2),C(t,(n=d,F(function(t){return 1==t.g?C(t,i5(n,e),2):3!=t.g?(i=t.h)?(r=[],(a=n.i.get(i))&&(a.Ja=new e9,r.push(a.Ja)),r.push(i.remove()),C(t,Promise.all(r),3)):t.return():void(n.i.delete(i),M(t))})),4)}if(2!=t.g)return h.push(e),N(t,0);P(t),M(t)})})),10);case 10:return C(e,d.destroy(),11);case 11:return e.return(h)}})),5);case 5:o=s.h,i=i.concat(o),a=r.next(),s.B(2);break;case 4:return s.return(i)}})}function dU(e,t){var n=dN(new dR(e.za(),e.la()),t),i=t.appMetadata||{};return n=dB(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function dB(e){var t=[],n=e.variants.filter(function(e){return nh(e)});n=v(n);for(var i=n.next();!i.done;i=n.next())t.push(na(i.value));for(n=(e=v(e.textStreams)).next();!n.done;n=e.next())t.push(no(n.value));return t}function dF(){this.g={}}function dV(e,t){return null==(e=e.g[t])&&(e=0),e}function dH(e){var t=this;if(e&&e.constructor!=sp)throw new ej(2,9,9008);this.g=this.h=null,e?(this.h=e.h,this.g=e.kc()):(this.h=so(),this.g=new n6),this.i=[],this.j=[];var n=!e;this.l=new ia(function(){var e,i,r,a,o;return F(function(s){switch(s.g){case 1:return C(s,Promise.all(t.j.map(function(e){return du(e)})),2);case 2:for(e=function(){},i=[],a=(r=v(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return C(s,Promise.all(i),3);case 3:if(!n){s.B(4);break}return C(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,M(s)}})})}function dK(){if(tn())e:{for(var e=v(dS.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function dq(e){var t,n,i;return F(function(r){switch(r.g){case 1:return C(r,(t=new db).init(),2);case 2:return C(r,dw(t),3);case 3:return i=new dM("manifest",(n=r.h).path.za,n.path.la,e),C(r,t.destroy(),4);case 4:return C(r,(new dH).remove(i.toString()),0)}})}function dG(e,t,n,i,r,a){var o,s,u,l,c,d,h,f,p,g;return F(function(m){switch(m.g){case 1:for(o=!1,D(m,2),s=!0,l=(u=v(n.streams)).next();!l.done;l=u.next())for(d=(c=v(l.value.segments)).next();!d.done;d=c.next())null!=(f=(h=d.value).pendingSegmentRefId?i[h.pendingSegmentRefId]:null)&&(h.dataKey=f,h.pendingSegmentRefId=void 0),null!=(f=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=f,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),C(m,e.updateManifest(t,n),4);case 4:o=!0,a(),N(m,0);break;case 2:return p=P(m),C(m,dq(t),5);case 5:if(o){m.B(6);break}return g=Object.values(i),C(m,e.removeSegments(g,function(){}),6);case 6:throw p}})}function dX(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function dz(e){return e.variants.some(function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some(function(e){return e.initData&&e.initData.length})})}function dW(e,t){for(var n=[],i=v(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:tU(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:tU(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function dY(e){if(e.l.g)throw new ej(2,9,7001)}function d$(){if(!dK())throw new ej(2,9,9e3)}function dJ(e,t){return F(function(n){return 1==n.g?(e.i.push(t),R(n),C(n,t,4)):2!=n.g?n.return(n.h):(L(n),es(e.i,t),_(n,0))})}function dQ(e){for(var t=new Set,n=v(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(i=(n=v(e.imageStreams)).next();!i.done;i=n.next())t.add(i.value);
1for(n=(e=v(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}E(dE,dp),dE.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return F(function(o){return i=(n=dh(a.h,a.g)).store(),r=new e9,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new ej(2,9,9012,"Could not find values for "+e))},C(o,Promise.all([n.promise(),r]),0)})},dE.prototype.cc=function(e){var t,n,i,r,a;return F(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n)i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime,r=function(e,t){!function(e){var t=e.streams.filter(function(e){return"audio"==e.contentType});if(e=e.streams.filter(function(e){return"video"==e.contentType}),!t.every(function(e){return e.variantIds})||!e.every(function(e){return e.variantIds})){for(var n=v(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=v(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){var r=n++,a=v(e);for(i=a.next();!i.done;i=a.next())i.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=(a=v(t)).next();!i.done;i=a.next())i.value.variantIds.push(r);if(e.length&&t.length)for(i=(t=v(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=v(e)).next();!a.done;a=r.next()){a=a.value;var o=n++;i.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=v(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(n){return function(e,t,n){var i=e.initSegmentUri?dA(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(e){var n=dA(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r,tilesLayout:""}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}}(n,e.startTime,t)})}(e.periods[n],i),t.push(r);return C(o,lI(t),2)}return a=o.h,o.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:a,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})},dE.prototype.ze=function(e){return{data:e.data}},E(dk,dp),dk.prototype.cc=function(e){var t,n,i,r,a;return F(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n){i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime;for(var s=e.periods[n],u=[],l=v(s.streams),c=l.next();!c.done;c=l.next())0!=(c=c.value).variantIds.length&&u.push(function(e,t,n){return{id:e.id,originalId:e.originalId,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:""}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}}(c,s.startTime,s.startTime+i));r=u,t.push(r)}return C(o,lI(t),2)}return a=o.h,o.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:a,sequenceMode:!1})})},E(dI,dp),(b=dI.prototype).hasFixedKeySpace=function(){return!1},b.addSegments=function(e){return this.add(this.i,e)},b.addManifests=function(e){return this.add(this.g,e)},b.updateManifest=function(e,t){var n,i;return n=this,(i=(n=dh(n.h,n.g)).store()).get(e).onsuccess=function(){i.put(t,e)},n.promise()},b.cc=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(b=dC.prototype).init=function(){var t=this,n=new e9,i=!1,r=new tt(function(){i=!0,n.reject(new ej(2,9,9017))});r.N(5);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){if(!i){var e=a.result;t.l=e;var o=e.objectStoreNames;
1t.g=o=o.contains("manifest")&&o.contains("segment")?new dE(e,"segment","manifest"):null,t.h=o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new dk(e,"segment-v2","manifest-v2"):null,t.i=o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new dk(e,"segment-v3","manifest-v3"):null,t.j=o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new dI(e,"segment-v5","manifest-v5"):null,t.m=e=e.objectStoreNames.contains("session-ids")?new dy(e):null,r.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=v(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){i||(n.reject(new ej(2,9,9001,a.error)),r.stop(),e.preventDefault())},n},b.destroy=function(){var e=this;return F(function(t){switch(t.g){case 1:if(!e.g){t.B(2);break}return C(t,e.g.destroy(),2);case 2:if(!e.h){t.B(4);break}return C(t,e.h.destroy(),4);case 4:if(!e.i){t.B(6);break}return C(t,e.i.destroy(),6);case 6:if(!e.j){t.B(8);break}return C(t,e.j.destroy(),8);case 8:if(!e.m){t.B(10);break}return C(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),M(t)}})},b.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},b.getEmeSessionCell=function(){return this.m}
1,b.erase=function(){var t=this;return F(function(n){switch(n.g){case 1:if(!t.g){n.B(2);break}return C(n,t.g.destroy(),2);case 2:if(!t.h){n.B(4);break}return C(n,t.h.destroy(),4);case 4:if(!t.i){n.B(6);break}return C(n,t.i.destroy(),6);case 6:if(!t.j){n.B(8);break}return C(n,t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),C(n,(i=new e9,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new ej(2,9,9001,r.error)),e.preventDefault()},i),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,C(n,t.init(),0)}})},dx("idb",function(){return td("CrKey")||ta()||!e.indexedDB?null:new dC}),dM.prototype.za=function(){return this.i},dM.prototype.la=function(){return this.h},dM.prototype.key=function(){return this.l},dM.prototype.toString=function(){return this.j},(b=dL.prototype).configure=function(){},b.start=function(e,t){var n,i,r,a,o,s=this;return F(function(u){switch(u.g){case 1:if(s.g=n=dD(e),null==n||"manifest"!=n.g)throw new ej(2,1,9004,e);return i=new db,R(u),C(u,i.init(),4);case 4:return C(u,dT(i,n.za(),n.la()),5);case 5:return r=u.h,C(u,r.getManifests([n.key()]),6);case 6:return a=u.h[0],o=dN(new dR(n.za(),n.la()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return L(u),C(u,i.destroy(),7);case 7:_(u,0)}})},b.stop=function(){return Promise.resolve()},b.update=function(){},b.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return F(function(l){switch(l.g){case 1:return n=u.g,i=new db,D(l,2,3),C(l,i.init(),5);case 5:return C(l,dT(i,n.za(),n.la()),6);case 6:return r=l.h,C(l,r.getManifests([n.key()]),7);case 7:if(o=(a=l.h[0]).sessionIds.includes(e),s=void 0==a.expiration||a.expiration>t,!o||!s){l.B(3);break}return C(l,r.updateManifestExpiration(n.key(),t),3);case 3:return L(l),C(l,i.destroy(),10);case 10:_(l,0);break;case 2:P(l),l.B(3)}})},rd["application/x-offline-manifest"]=function(){return new dL},W("shaka.offline.OfflineScheme",d_),d_.plugin=dj,n8("offline",dj),(b=dH.prototype).destroy=function(){return this.l.destroy()},b.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=st(e,t)),ss(this.h,e)},b.getConfiguration=function(){var e=so();return ss(e,this.h,so()),e},b.kc=function(){return this.g},b.store=function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,T,x,S,E,A,k=this,I=this.getConfiguration(),R=new ds(this.g);return this.j.push(R),(t=new nX((i=this,r=e,a=t||{},o=function(){var t;return F(function(i){return 1==i.g?C(i,ru(e,k.g,I.manifest.retryParameters,n||null),2):(t=i.h,i.return(t()))})},s=I,u=R,t=F(function(e){var t,n,S,E,A,k,I,R,j,O,U,B,V,H,K,q,G,X,z,W,Y,$,J,Q,Z,ee,et,en,ei,er,ea,eo,eu,el,ec,ed,eh,ef,ep,eg,em,ev,ey,eb,ew,eT,ex,eS,eE,eA,ek,eI,eC,eM,eD,eR,eN,eL;switch(e.g){case 1:return d$(),c=l=null,d=new db,p=f=h=null,D(e,2,3),C(e,o(),5);case 5:return l=e.h,C(e,(t=i,n=r,S=l,E=s,F(function(e){if(1==e.g)return A=null,k={networkingEngine:t.g,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){A=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},S.configure(E.manifest),dY(t),C(e,S.start(n,k),2);
1if(3!=e.g)return I=e.h,dY(t),C(e,Promise.all(ic(dQ(I),function(e){return e.createSegmentIndex()})),3);if(dY(t),A)throw A;return e.return(I)})),6);case 6:if(g=e.h,dY(i),!(!g.presentationTimeline.T()&&!g.presentationTimeline.jb()))throw new ej(2,9,9005,r);return C(e,(R=i,j=g,O=function(e){p=p||e},U=s,F(function(e){switch(e.g){case 1:var t,n,i;return(B=new iY({lb:R.g,onError:O,ed:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(U.drm),C(e,(t=B,n=j.variants,i=U.offline.usePersistentLicense,t.fa=!0,t.A=[],t.M=i,iJ(t,n)),2);case 2:return C(e,iZ(B),3);case 3:return C(e,i0(B),4);case 4:return e.return(B)}})),7);case 7:if(c=e.h,dY(i),p)throw p;return C(e,(V=g,H=s,F(function(e){switch(e.g){case 1:var t;return K={width:1/0,height:1/0},t=H.restrictions,V.variants=V.variants.filter(function(e){return t8(e,t,K)}),C(e,t7(V,H.offline.usePersistentLicense),2);case 2:for(q=[],G=H.preferredAudioChannelCount,X=H.preferredDecodingAttributes,t5(V,H.preferredVideoCodecs,H.preferredAudioCodecs,G,X),W=(z=v(V.variants)).next();!W.done;W=z.next())Y=W.value,q.push(na(Y));for(J=($=v(V.textStreams)).next();!J.done;J=$.next())Q=J.value,q.push(no(Q));for(ee=(Z=v(V.imageStreams)).next();!ee.done;ee=Z.next())et=ee.value,q.push(ns(et));return C(e,H.offline.trackSelectionCallback(q),3);case 3:for(en=e.h,ei=V.presentationTimeline.getDuration(),er=0,eo=(ea=v(en)).next();!eo.done;eo=ea.next())eu=eo.value.bandwidth*ei/8,er+=eu;return D(e,4),C(e,H.offline.downloadSizeCallback(er),6);case 6:if(!e.h)throw new ej(2,9,9014);N(e,5);break;case 4:if((el=P(e))instanceof ej)throw el;throw new ej(2,9,9015);case 5:for(ec=new Set,ed=new Set,eh=new Set,eo=(ef=v(en)).next();!eo.done;eo=ef.next())"variant"==(ep=eo.value).type&&ec.add(ep.id),"text"==ep.type&&ed.add(ep.id),"image"==ep.type&&eh.add(ep.id);V.variants=V.variants.filter(function(e){return ec.has(e.id)}),V.textStreams=V.textStreams.filter(function(e){return ed.has(e.id)}),V.imageStreams=V.imageStreams.filter(function(e){return eh.has(e.id)}),function(e){e.variants.map(function(e){return e.video});var t=new Set(e.variants.map(function(e){return e.audio}));e=e.textStreams;for(var n=v(t),i=n.next();!i.done;i=n.next()){i=v(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=v(e)).next();!n.done;n=t.next())for(i=(n=v(e)).next();!i.done;i=n.next());}(V),M(e)}})),8);case 8:return C(e,d.init(),9);case 9:return dY(i),C(e,dw(d),10);case 10:return h=e.h,dY(i),y=(m=function(e,t,n,i,r,a){var o,s,u,l,c={offlineUri:null,originalManifestUri:n,duration:(o=t).presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:o=dB(o),appMetadata:i,isIncomplete:!1},d=r.offline.progressCallback;s=a,s.m=function(e,t){c.size=t,d(c,e)},s.l=function(t,n){h&&r.offline.usePersistentLicense&&f==n&&i1(e,"cenc",t)};var h=dX(t)&&!dz(t),f=null;h&&(f=dZ.get(e.g.keySystem));for(var p=new dF,g=v(t.textStreams),m=g.next();!m.done;m=g.next())p.g[m.value.id]=52;for(m=(g=v(t.imageStreams)).next();!m.done;m=g.next())u=p,l=m.value,u.g[l.id]=l.bandwidth||2048;
1for(g=(m=v(t.variants)).next();!g.done;g=m.next())!function(e,t){var n=t.audio,i=t.video;if(n&&!i&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&i&&(e.g[i.id]=i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),e.g[n.id]=r,e.g[i.id]=a}}(p,g.value);return a=(p=function(e,t,n,i){var r=new Map,a=dQ(n),o=new Map;a=v(a);for(var s=a.next();!s.done;s=a.next()){var u=function(e,t,n,i,r,a){var o={id:i.id,originalId:i.originalId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,kind:i.kind,language:i.language,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,external:i.external},s=r.offline.numberOfParallelDownloads,u=0;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var i=e.segmentIndex.get(t);i;)n(i),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.Oa(),function(n){var r=di(n),l=void 0;if(!a.has(r)){var c=n.endTime-n.startTime;c=dV(t,i.id)*c,c=da(e.g,c),a.set(r,new dn(n,c,u,!1))}n.h&&(l=di(n.h),a.has(l)||(c=.5*dV(t,i.id),c=da(e.g,c),a.set(l,new dn(n.h,c,u,!0)))),o.segments.push({pendingInitSegmentRefId:l,initSegmentKey:l?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:r,dataKey:0}),u=(u+1)%s}),o}(e,t,n,s=s.value,i,r);o.set(s.id,u)}for(t=(e=v(n.variants)).next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),pe:Array.from(r.values())}}(a,p,t,r)).streams,p=p.pe,m=e.g,g=r.offline.usePersistentLicense,m&&g&&(m.initData=[]),{cg:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.jc(),streams:a,sessionIds:g?i4(e):[],drmInfo:m,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode},pe:p}}(c,g,r,a,s,u)).cg,b=m.pe,C(e,h.la.addManifests([y]),11);case 11:if(w=e.h,dY(i),f=w[0],dY(i),p)throw p;return C(e,(eg=i,em=b,ev=f,ey=y,eb=u,ew=s,eT=h.la,ex=g,eS=c,F(function(e){switch(e.g){case 1:if(eE={},eA=0,ek=function(e,t){var n,i,r,a,o,s,u;return F(function(l){if(1==l.g){var c;for(n={},r=(i=v(e)).next();!r.done;n={cb:n.cb},r=i.next())n.cb=r.value,c=n.cb,a=oS(c.g.ya(),c.g.Ba,c.g.ma,ew.streaming.retryParameters),o=n.cb.i,s=n.cb.h,u=function(e){return function(t){var n;return F(function(i){if(1==i.g)return C(i,eT.addSegments([{data:t}]),2);n=i.h,dY(eg),eE[di(e.cb.g)]=n[0],eA+=t.byteLength,M(i)})}}(n),function(e,t,n,i,r,a){io(e.i);var o=(e.j.get(t)||Promise.resolve()).then(function(){var t,o,s,u,l,c;return F(function(d){if(1==d.g)return C(d,function(e,t){var n,i,r,a;return F(function(o){return 1==o.g?(n=it,i=e.o.request(n,t),r=function(){return i.abort()},e.h.push(r),C(o,i.promise,2)):(a=o.h,es(e.h,r),o.return(a.data))})}(e,n),2);if(t=d.h,e.i.g)throw new ej(2,9,7001);if(r)for(s in(o=new iI(eP(t))).data)u=Number(s),l=o.data[u],c=o.g[u],e.l(l,c);e.g.close(i,t.byteLength);var h=e.g;return e.m(0==h.i?0:h.j/h.i,e.g.h),d.return(a(t))})});e.j.set(t,o)}(eb,n.cb.groupId,a,o,s,u);return C(l,F(function(e){return 1==e.g?C(e,Promise.all(eb.j.values()),2):e.return(eb.g.h)}),2)}return t?(dY(eg),function(e,t,n,i){if(t.expiration=n.jc(),n=i4(n),t.sessionIds=i.offline.usePersistentLicense?n:[],dX(e)&&i.offline.usePersistentLicense&&!n.length)throw new ej(2,9,9007)}(ex,ey,eS,ew),C(l,eT.updateManifest(ev,ey),0)):l.B(0)})},eI=!1,D(e,2),!dX(ex)||!eI||dz(ex)){e.B(4);break}return C(e,ek(em.filter(function(e){return e.h}),!0),5);case 5:return dY(eg),em=em.filter(function(e){return!e.h}),eC=eE,eM=eA,eE={},eA=0,C(e,dG(eT,ev,ey,eC,eM,function(){return dY(eg)}),6);case 6:dY(eg);case 4:if(eI){e.B(7);break}return C(e,ek(em,!1),8);case 8:return dY(eg),eD=eE,eR=eA,eE={},eA=0,C(e,dG(eT,ev,ey,eD,eR,function(){return dY(eg)}),9);case 9:dY(eg);case 7:N(e,0);break;case 2:return eN=P(e),eL=Object.values(eE),C(e,eT.removeSegments(eL,function(){}),10);case 10:throw eN}})),12);case 12:return dY(i),T=new dM("manifest",h.path.za,h.path.la,f),e.return(dU(T,y));case 3:return L(e),C(e,d.destroy(),13);case 13:if(!l){e.B(14);break}return C(e,l.stop(),14);case 14:if(!c){e.B(16);break}return C(e,c.destroy(),16);case 16:_(e,0);break;case 2:if(x=P(e),null==f){e.B(18);break}return C(e,dq(f),18);case 18:throw p||x}})),function(){return du(R)})).finally(function(){es(k.j,R)}),S=this,A=(E=t).promise,S.i.push(A),E.finally(function(){es(S.i,A)})},b.remove=function(e){var t,n,i,r,a,o,s;return dJ(this,(t=this,n=e,F(function(e){switch(e.g){case 1:if(d$(),null==(i=dD(n))||"manifest"!=i.g)throw new ej(2,9,9004,n);return r=i,a=new db,R(e),C(e,a.init(),4);case 4:return C(e,dT(a,r.za(),r.la()),5);
1case 5:return o=e.h,C(e,o.getManifests([r.key()]),6);case 6:var u,l,c;return s=e.h[0],C(e,Promise.all([(u=t,l=s,c=a,F(function(e){var t,n,i,r,a,o,s;return C(e,(t=u.g,n=u.h.drm,i=c,r=l,F(function(e){return 1==e.g?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new ej(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(i),C(e,dO(n,t,o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:dW(r,!1),videoCapabilities:dW(r,!0)}})),2)):e.return():3!=e.g?(s=e.h,C(e,a.remove(s),3)):C(e,a.add(o.filter(function(e){return!s.includes(e.sessionId)})),0)})),0)})),function(e,t,n){function i(){}var r=function(e){var t=new Set;e=v(e.streams);for(var n=e.next();!n.done;n=e.next()){n=v(n.value.segments);for(var i=n.next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}(n);return dU(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(o,r,s)]),2);case 2:return L(e),C(e,a.destroy(),8);case 8:_(e,0)}})))},b.rg=function(){var e,t,n,i,r,a,o,s,u,l,c;return dJ(this,(e=this,F(function(d){switch(d.g){case 1:return d$(),t=e.g,n=e.h.drm,i=new db,r=!1,R(d),C(d,i.init(),4);case 4:var h;a=[],h=i,h.g.forEach(function(e){(function(e){a.push(e)})(e.getEmeSessionCell())}),s=(o=v(a)).next();case 5:if(s.done){d.B(2);break}return C(d,(u=s.value).getAll(),8);case 8:return l=d.h,C(d,dO(n,t,l),9);case 9:return c=d.h,C(d,u.remove(c),10);case 10:c.length!=l.length&&(r=!0),s=o.next(),d.B(5);break;case 2:return L(d),C(d,i.destroy(),11);case 11:_(d,3);break;case 3:return d.return(!r)}})))},b.list=function(){var e,t,n;return dJ(this,F(function(i){switch(i.g){case 1:return d$(),e=[],t=new db,R(i),C(i,t.init(),4);case 4:var r,a;return n=Promise.resolve(),r=t,a=function(t,i){n=n.then(function(){return F(function(n){if(1==n.g)return C(n,i.getAllManifests(),2);n.h.forEach(function(n,i){n=dU(new dM("manifest",t.za,t.la,i),n),e.push(n)}),M(n)})})}
1,r.g.forEach(function(e,t){e.getCells().forEach(function(e,n){a({za:t,la:n},e)})}),C(i,n,2);case 2:return L(i),C(i,t.destroy(),6);case 6:_(i,3);break;case 3:return i.return(e)}}))},W("shaka.offline.Storage",dH),dH.deleteAll=function(){var e;return F(function(t){var n,i,r;return 1==t.g?(e=new db,R(t),C(t,(n=e,F(function(e){return 1==e.g?((r=0<(i=Array.from(n.g.values())).length)||dS.forEach(function(e){(e=e())&&i.push(e)}),C(e,Promise.all(i.map(function(e){return e.erase()})),2)):r?e.B(0):C(e,Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.g?(L(t),C(t,e.destroy(),5)):_(t,0)})},dH.prototype.list=dH.prototype.list,dH.prototype.removeEmeSessions=dH.prototype.rg,dH.prototype.remove=dH.prototype.remove,dH.prototype.store=dH.prototype.store,dH.prototype.getNetworkingEngine=dH.prototype.kc,dH.prototype.getConfiguration=dH.prototype.getConfiguration,dH.prototype.configure=dH.prototype.configure,dH.prototype.destroy=dH.prototype.destroy,dH.support=dK;var dZ=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");function d0(){}function d1(e,t){for(e={priority:t||0,nf:e},t=0;t<d2.length;t++)if(d2[t].priority<e.priority)return void d2.splice(t,0,e);d2.push(e)}ur.offline=dK,W("shaka.polyfill",d0),d0.register=d1,d0.installAll=function(){for(var e=v(d2),t=e.next();!t.done;t=e.next()){t=t.value;try{t.nf()}catch(e){ee("Error installing polyfill!",e)}}};var d2=[];function d4(){this.g=new d5}function d3(){e.AbortController||(e.AbortController=d4,e.AbortSignal=d5)}function d5(){n1.call(this),this.h=!1,this.g=void 0,this.onabort=null}function d6(){}function d8(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=v(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())!function(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||void 0==e?this.removeAttribute(t):this.setAttribute(t,e)}})}(t.value)}function d9(){}function d7(){pi()}function he(){}function ht(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",hn),document.addEventListener("webkitfullscreenerror",hn),document.addEventListener("mozfullscreenchange",hn),document.addEventListener("mozfullscreenerror",hn),document.addEventListener("MSFullscreenChange",hn),document.addEventListener("MSFullscreenError",hn)}}function hn(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function hi(){}function hr(){var e=!0;(tu()||td("PlayStation 5")||tl()||td("Web0S")||to()||td("CrKey")||td("PC=EOS")||td("Hisense")||td("VIDAA"))&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ha)}function ha(t){var n,i,r,a,o,s,u,l,c,d,h,f;return F(function(p){switch(p.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},!t)return p.return(n);if(i=t.video,r=t.audio,"media-source"==t.type){if(!tn())return p.return(n);if(i){if(td("CrKey"))if(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var g=i.contentType;i.width&&i.height&&(g+="; width="+i.width+"; height="+i.height),i.framerate&&(g+="; framerate="+i.framerate),"pq"===i.transferFunction&&(g+="; eotf=smpte2084"),a=cast.__platform__.canDisplayType(g)}else a=er(i.contentType);else to()?(o=i.contentType,i.width&&i.height&&(o+="; width="+i.width,o+="; height="+i.height),i.framerate&&(o+="; framerate="+i.framerate),i.bitrate&&(o+="; bitrate="+i.bitrate),a=er(o)):a=er(i.contentType);if(!a)return p.return(n)}if(r&&!er(r.contentType))return p.return(n)}else if("file"!=t.type)return p.return(n);else if(i&&!ti(i.contentType)||r&&!ti(r.contentType))return p.return(n);if(!t.keySystemConfiguration)return n.supported=!0,p.return(Promise.resolve(n));return s=t.keySystemConfiguration,u=[],l=[],s.audio&&(c={robustness:s.audio.robustness||"",contentType:t.audio.contentType},u.push(c)),s.video&&(d={robustness:s.video.robustness||"",contentType:t.video.contentType},l.push(d)),h={initDataTypes:[s.initDataType],distinctiveIdentifier:s.distinctiveIdentifier,persistentState:s.persistentState,sessionTypes:s.sessionTypes},u.length&&(h.audioCapabilities=u),l.length&&(h.videoCapabilities=l),D(p,3),C(p,navigator.requestMediaKeySystemAccess(s.keySystem,[h]),5);case 5:f=p.h,N(p,4);break;case 3:P(p);case 4:f&&(n.supported=!0,n.keySystemAccess=f);case 2:return p.return(n)}})}d4.prototype.abort=function(e){var t=this.g;t.h||(t.h=!0,t.g=e,void 0===t.g&&(t.g=new DOMException("signal is aborted without reason","AbortError")),e=new nQ("abort"),t.onabort&&t.onabort(e),t.dispatchEvent(e))},p.Object.defineProperties(d4.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),d0.AbortController=d4,d4.install=d3,E(d5,n1),p.Object.defineProperties(d5.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),d1(d3),d0.Aria=d6,d6.install=d8,d1(d8),d0.EncryptionScheme=d9,d9.install=d7,d1(d7,-2),d0.Fullscreen=he,he.install=ht,d1(ht),d0.MediaCapabilities=hi,hi.install=hr;function ho(){}function hs(){var t,n,i,r,a,o=tc();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(t=MediaSource.isTypeSupp
1orted,MediaSource.isTypeSupported=function(e){var n=e.split(/ *; */);return n.shift(),n.some(function(e){return e.startsWith("codecs=")})?cast.__platform__.canDisplayType(e):t(e)}):o?12>=o?(hu(),n=SourceBuffer.prototype.remove,SourceBuffer.prototype.remove=function(e,t){return n.call(this,e,t-.001)}):15>=o&&hu():tr()?(i=MediaSource.isTypeSupported,MediaSource.isTypeSupported=function(e){return"mp2t"!=e.split(";")[0].split("/")[1]&&i(e)}):(td("Tizen 2")||td("Tizen 3")||td("Tizen 4"))&&(r=MediaSource.isTypeSupported,MediaSource.isTypeSupported=function(e){return"opus"!=tH(e)[0]&&r(e)})),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(a=MediaSource.isTypeSupported,td("Web0S")||(MediaSource.isTypeSupported=function(e){var t=e.split(/ *; */),n=t.findIndex(function(e){return e.startsWith("codecs=")});if(0>n)return a(e);var i=t[n].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),r=i.findIndex(function(e){return e.startsWith("vp09")});return 0<=r&&(i[r]="vp9",t[n]='codecs="'+i.join(",")+'"',e=t.join("; ")),a(e)}))}function hu(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,V.apply(0,arguments));return t.abort=function(){},t}}function hl(){}function hc(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):void 0!=e.orientation&&function(){function t(){switch(e.orientation){case -90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new hd;screen.orientation=n,t(),e.addEventListener("orientationchange",function(){t();var e=new nQ("change");n.dispatchEvent(e)})}())}function hd(){n1.call(this),this.type="",this.angle=0}function hh(){}function hf(e,t){try{var n=new hm(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function hp(e){var t=this.mediaKeys;return t&&t!=e&&hy(t,null),delete this.mediaKeys,(this.mediaKeys=e)?hy(e,this):Promise.resolve()}function hg(e){if(eL(e=eP(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=tb(e=tv(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=eN(e),this.dispatchEvent(t)}function hm(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=v(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var a=v(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(o=(n=v(n.videoCapabilities)).next();!o.done;o=n.next())(a=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function hv(e){this.h=new WebKitMediaKeys(e),this.g=new is}function hy(e,t){if(e.g.ob(),!t)return Promise.resolve();e.g.C(t,"webkitneedkey",hg);try{return a3(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function hb(e){n1.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new is,this.sessionId="",this.expiration=NaN,this.closed=new e9,this.keyStatuses=new hT}function hw(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new nQ("keystatuseschange"),e.dispatchEvent(t)}function hT(){this.size=0,this.g=void 0}function hx(){}function hS(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=hE,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=hA,e.MediaKeys=hk,e.MediaKeySystemAccess=hI,e.shakaMediaKeysPolyfill=!0)}function hE(){return Promise.reject(Error("The key system specified is not supported."))}function hA(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function hk(){throw TypeError("Illegal constructor.")}function hI(){throw this.keySystem="",TypeError("Illegal constructor.")}function hC(){}function hM(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
1(HTMLMediaElement.prototype.webkitGenerateKeyRequest)hV="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=hR,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=hN,e.MediaKeys=hL,e.MediaKeySystemAccess=hP,e.shakaMediaKeysPolyfill=!0}}function hD(e){var t=hV;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function hR(e,t){try{var n=new hP(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function hN(e){var t=this.mediaKeys;return t&&t!=e&&h_(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&h_(e,this),Promise.resolve()}function hP(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=v(t);for(var a=t.next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=v(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=v(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i){this.h=o;return}}throw n="Unsupported keySystem",("org.w3.clearkey"==e||"com.widevine.alpha"==e)&&(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function hL(e){this.l=e,this.h=null,this.g=new is,this.i=[],this.j=new Map}function h_(e,t){e.h=t,e.g.ob();var n=hV;t&&(e.g.C(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=eN(t.initData),e.h.dispatchEvent(n)}),e.g.C(t,n+"keymessage",function(t){var n=hj(e,t.sessionId);n&&(t=new nQ("message",t=(new Map).set("messageType",void 0==n.keyStatuses.Fb()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}),e.g.C(t,n+"keyadded",function(t){(t=hj(e,t.sessionId))&&(hB(t,"usable"),t.g&&t.g.resolve(),t.g=null)}),e.g.C(t,n+"keyerror",function(t){var n=hj(e,t.sessionId);n&&n.handleError(t)}))}function hj(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function hO(e,t,n){n1.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new e9,this.keyStatuses=new hF}function hU(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var i=eP(tb("LOAD_SESSION|"+n));else{var r=tb("PERSISTENT|");i=tC(r,t)}else i=eP(t)}catch(e){return Promise.reject(e)}e.h=new e9;var a=hD("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new tt(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).N(.01)}return e.h}function hB(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new nQ("keystatuseschange"),e.dispatchEvent(t)}function hF(){this.size=0,this.g=void 0}hi.originalMcap=null,d1(hr,-1),d0.MediaSource=ho,ho.install=hs,d1(hs),d0.Orientation=hl,hl.install=hc,E(hd,n1),hd.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},hd.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},d1(hc),d0.PatchedMediaKeysApple=hh,hh.uninstall=function(){a&&(a=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",o),HTMLMediaElement.prototype.setMediaKeys=s,e.MediaKeys=u,e.MediaKeySystemAccess=l,navigator.requestMediaKeySystemAccess=c,o=c=s=l=u=null,e.shakaMediaKeysPolyfill=!1)},hh.install=function(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&((void 0===t?0:t)&&(a=!0,o=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),s=HTMLMediaElement.prototype.setMediaKeys,u=e.MediaKeys,l=e.MediaKeySystemAccess,c=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=hp,e.MediaKeys=hv,e.MediaKeySystemAccess=hm,navigator.requestMediaKeySystemAccess=hf,e.shakaMediaKeysPolyfill=!0)},hm.prototype.createMediaKeys=function(){return Promise.resolve(new hv(this.keySystem))},hm.prototype.getConfiguration=function(){return this.g},hv.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new hb(this.h,e)},hv.prototype.setServerCertificate=function(){return Promise.resolve(!1)},E(hb,n1),(b=hb.prototype).generateRequest=function(e,t){var n=this;this.h=new e9;try{var i=this.l.createSession("video/mp4",eP(t));this.i=i,this.sessionId=i.sessionId||"",this.j.C(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=(new Map).set("messageType",void 0==n.keyStatuses.Fb()?"license-request":"license-renewal").set("message",eN(e.message)),e=new nQ("message",e),n.dispatchEvent(e)}),this.j.C(i,"webkitkeyadded",function(){n.g&&(hw(n,"usable"),n.g.resolve(),n.g=null)}),this.j.C(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
1if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:hw(n,"output-not-allowed");break;default:hw(n,"internal-error")}}),hw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},b.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},b.update=function(e){this.g=new e9;try{this.i.update(eP(e))}catch(e){this.g.reject(e)}return this.g},b.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(e){this.closed.reject(e)}return this.closed},b.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(b=hT.prototype).Fb=function(){return this.g},b.forEach=function(e){this.g&&e(this.g,ro.value())},b.get=function(e){if(this.has(e))return this.g},b.has=function(e){var t=ro.value();return!!(this.g&&eD(e,t))},b.entries=function(){},b.keys=function(){},b.values=function(){},d0.PatchedMediaKeysNop=hx,hx.install=hS,hk.prototype.createSession=function(){},hk.prototype.setServerCertificate=function(){},hI.prototype.getConfiguration=function(){},hI.prototype.createMediaKeys=function(){},d1(hS,-10),d0.PatchedMediaKeysWebkit=hC,hC.install=hM,hP.prototype.createMediaKeys=function(){return Promise.resolve(new hL(this.g))},hP.prototype.getConfiguration=function(){return this.h},hL.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new hO(t,this.l,e),this.i.push(e),e},hL.prototype.setServerCertificate=function(){return Promise.resolve(!1)},E(hO,n1),(b=hO.prototype).handleError=function(e){var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?hB(this,"output-restricted"):1==t?hB(this,"expired"):hB(this,"internal-error"))},b.generateRequest=function(e,t){return hU(this,t,null)},b.load=function(e){return"persistent-license"==this.l?hU(this,null,e):Promise.reject(Error("Not a persistent session."))},b.update=function(e){var t=new e9;return!function e(t,n,i){if(t.g)t.g.then(function(){return e(t,n,i)}).catch(function(){return e(t,n,i)});else{if(t.g=n,"webkit-org.w3.clearkey"==t.i){var r=tm(i),a=JSON.parse(r);"oct"!=a.keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),r=tA(a.keys[0].k),a=tA(a.keys[0].kid)}else r=eP(i),a=null;var o=hD("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},b.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=hD("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},b.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(b=hF.prototype).Fb=function(){return this.g},b.forEach=function(e){this.g&&e(this.g,ro.value())},b.get=function(e){if(this.has(e))return this.g},b.has=function(e){var t=ro.value();return!!(this.g&&eD(e,t))},b.entries=function(){},b.keys=function(){},b.values=function(){};var hV="";function hH(){}function hK(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=hG,Object.defineProperty(t,"disablePictureInPicture",{get:hz,set:hW,enumerable:!0,configurable:!0}),document.exitPictureInPicture=hX,document.addEventListener("webkitpresentationmodechanged",hq,!0))}}function hq(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function hG(){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 hX(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function hz(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function hW(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function hY(){}function h$(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=hJ))}function hJ(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function hQ(){}function hZ(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=h0)}function h0(){return new Promise(function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(t,n){e({usage:t,quota:n})},t)})}function h1(){}function h2(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:h4})}function h4(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function h3(){}function h5(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function h6(){}function h8(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||ts())&&(t.getVideoPlaybackQuality=h9)}}function h9(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function h7(){}function fe(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=ft;else if(6==n)t=fn;else{try{var i=!!ft(1,2,"")}catch(e){i=!1}i&&(t=ft)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function ft(t,n,i){return new e.TextTrackCue(t,n,i)}function fn(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function fi(){}d1(hM),d0.PiPWebkit=hH,hH.install=hK,d1(hK),d0.RandomUUID=hY,hY.install=h$,d1(h$),d0.StorageEstimate=hQ,hQ.install=hZ,d1(hZ),d0.Symbol=h1,h1.install=h2,d1(h2),d0.VideoPlayPromise=h3,h3.install=h5,d1(h5),d0.VideoPlaybackQuality=h6,h6.install=h8,d1(h8),d0.VTTCue=h7,h7.install=fe,d1(fe),fi.prototype.parseInit=function(){},fi.prototype.setSequenceMode=function(){},fi.prototype.parseMedia=function(e,t){var n=null,i=[];e=v(e=tm(e).split(/\r?\n/));for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=fr.exec(r))){var a=fa.exec(r[1]);r=new ec(a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),t.segmentEnd?t.segmentEnd:a+2,r[2]),n&&(n.endTime=a,i.push(n)),n=r}return n&&i.push(n),i},W("shaka.text.LrcTextParser",fi),fi.prototype.parseMedia=fi.prototype.parseMedia,fi.prototype.setSequenceMode=fi.prototype.setSequenceMode,fi.prototype.parseInit=fi.prototype.parseInit;var fr=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,fa=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function fo(){}
1function fs(e,t){t=v(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&es(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&es(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&es(e.textDecoration,"overline")}}function fu(e,t,n,i,r){return r=void 0===r||r,(e=fc(e,n,i))?e:r?fl(t,n,i):null}function fl(e,t,n){return e?iL(e,fD,n)||fd(e,t,n):null}function fc(e,t,n){return iL(e,fD,n)||fd(e,t,n)}function fd(e,t,n){e=fh(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=iP(e[r],"urn:ebu:tt:style",n);a||(a=iL(e[r],fD,n)),a||(a=fc(e[r],t,n)),a&&(i=a)}return i}function fh(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=r?iP(o,r,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e){for(r=(t=v(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=v(n)).next();!o.done;o=e.next())if(i+(o=o.value).getAttribute("xml:id")==r){a.push(o);break}}return a}function ff(e,t){var n=fp(e.getAttribute("begin"),t),i=fp(e.getAttribute("end"),t);return e=fp(e.getAttribute("dur"),t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function fp(e,t){var n=null;if(fT.test(e)){n=Number((e=fT.exec(e))[1]);var i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);a+=(Number(e[5])||0)/t.h,r+=a/t.frameRate,n=r+60*i+3600*n}else if(fx.test(e))n=fg(fx,e);else if(fS.test(e))n=fg(fS,e);else if(fE.test(e))n=Number((e=fE.exec(e))[1])/t.frameRate;else if(fA.test(e))n=Number((e=fA.exec(e))[1])/t.g;else if(fk.test(e))n=fg(fk,e);else if(e)throw new ej(2,2,2001,"Could not parse cue time range in TTML");return n}function fg(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function fm(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}tz["application/x-subtitle-lrc"]=function(){return new fi},fo.prototype.parseInit=function(){},fo.prototype.setSequenceMode=function(){},fo.prototype.parseMedia=function(e,t){var n=tm(e);if(e=[],""==n)return e;var i=iX(n,"tt");if(!i)throw new ej(2,2,2005,"Failed to parse TTML.");if(!(n=i.getElementsByTagName("body")[0]))return[];var r=iL(i,fM,"frameRate"),a=iL(i,fM,"subFrameRate"),o=iL(i,fM,"frameRateMultiplier"),s=iL(i,fM,"tickRate"),u=iL(i,fM,"cellResolution"),l=i.getAttribute("xml:space")||"default",c=iL(i,fD,"extent");if("default"!=l&&"preserve"!=l)throw new ej(2,2,2005,"Invalid xml:space value: "+l);l="default"==l,r=new fm(r,a,o,s),u=u&&(u=/^(\d+) (\d+)$/.exec(u))?{columns:parseInt(u[1],10),rows:parseInt(u[2],10)}:null,a=(a=i.getElementsByTagName("metadata")[0])?Array.from(a.childNodes).filter(function(e){return e instanceof Element}):[],o=Array.from(i.getElementsByTagName("style")),i=Array.from(i.getElementsByTagName("region")),s=[];for(var d=v(i),h=d.next();!h.done;h=d.next()){var f=h.value;h=new ek;var p=f.getAttribute("xml:id");if(p){h.id=p;var g,m,y=null;c&&(y=fv.exec(c)||fw.exec(c)),p=y?Number(y[1]):null,y=y?Number(y[2]):null,(g=fl(f,o,"extent"))&&null!=(g=(m=fv.exec(g))||fw.exec(g))&&(h.width=Number(g[1]),h.height=Number(g[2]),m||(null!=p&&(h.width=100*h.width/p),null!=y&&(h.height=100*h.height/y)),h.widthUnits=m||null!=p?eI:0,h.heightUnits=m||null!=y?eI:0),(f=fl(f,o,"origin"))&&null!=(g=(m=fv.exec(f))||fw.exec(f))&&(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2]),m||(null!=y&&(h.viewportAnchorY=100*h.viewportAnchorY/y),null!=p&&(h.viewportAnchorX=100*h.viewportAnchorX/p)),h.viewportAnchorUnits=m||null!=p?eI:0)}else h=null;h&&s.push(h)}if(iR(n,"p").length)throw new ej(2,2,2001,"<p> can only be inside <div> in TTML");for(d=(c=v(iR(n,"div"))).next();!d.done;d=c.next())if(iR(d.value,"span").length)throw new ej(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,u,l,c,d){var h,f,p,g,m=t.parentNode;if(t.nodeType==Node.COMMENT_NODE)return null;if(t.nodeType==Node.TEXT_NODE){if(!d)return null;var y=document.createElement("span");y.textContent=t.textContent}else y=t;for(var b=null,w=v(fR),T=w.next();!T.done&&!(b=fh(y,"backgroundImage",r,"#",T.value)[0]);T=w.next());if(("p"==t.nodeName||b)&&(d=!0),t=d,w="default"==(y.getAttribute("xml:space")||(u?"default":"preserve")),T=Array.from(y.childNodes).every(function(e){return e.no
1deType==Node.TEXT_NODE}),u=[],!T)for(var x=v(y.childNodes),S=x.next();!S.done;S=x.next())(S=e(S.value,n,i,r,a,o,s,w,l,y,d))&&u.push(S);r=null!=c,x=/\S/.test(y.textContent);var E=y.hasAttribute("begin")||y.hasAttribute("end")||y.hasAttribute("dur");if(!(E||x||"br"==y.tagName||0!=u.length||r&&!w))return null;for(x=(S=ff(y,i)).start,S=S.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;){x=(h=m,f=i,p=x,g=S,h=ff(h,f),null==p?p=h.start:null!=h.start&&(p+=h.start),null==g?g=h.end:null!=h.start&&(g+=h.start),S={start:p,end:g}).start,S=S.end,m=m.parentNode}if(null==x&&(x=0),x+=n.periodStart,S=null==S?1/0:S+n.periodStart,x=Math.max(x,n.segmentStart),S=Math.min(S,n.segmentEnd),!E&&0<u.length)for(x=1/0,S=0,i=(n=v(u)).next();!i.done;i=n.next())x=Math.min(x,(i=i.value).startTime),S=Math.max(S,i.endTime);if("br"==y.tagName)return(a=new ec(x,S,"")).lineBreak=!0,a;if(n="",T&&(n=y.textContent,w&&(n=(n=n.trim()).replace(/\s+/g," "))),(n=new ec(x,S,n)).nestedCues=u,d||(n.isContainer=!0),l&&(n.cellResolution=l),l=fh(y,"region",o,"")[0],y.hasAttribute("region")&&l&&l.getAttribute("xml:id")){var A=l.getAttribute("xml:id");n.region=s.filter(function(e){return e.id==A})[0]}return s=l,c&&r&&!y.getAttribute("region")&&!y.getAttribute("style")&&(s=fh(c,"region",o,"")[0]),function(e,t,n,i,r,a,o){if("rtl"==fu(t,n,r,"direction",a=a||o)&&(e.direction="rtl"),"tb"==(o=fu(t,n,r,"writingMode",a))||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=em),(o=fu(t,n,r,"textAlign",!0))?(e.positionAlign=fC[o],e.lineAlign=fI[o],e.textAlign=ef[o.toUpperCase()]):e.textAlign=eh,(o=fu(t,n,r,"displayAlign",!0))&&(e.displayAlign=eg[o.toUpperCase()]),(o=fu(t,n,r,"color",a))&&(e.color=o),(o=fu(t,n,r,"backgroundColor",a))&&(e.backgroundColor=o),(o=fu(t,n,r,"border",a))&&(e.border=o),o=fu(t,n,r,"fontFamily",a))switch(o){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=o}if((o=fu(t,n,r,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),e.wrapLine=!(o=fu(t,n,r,"wrapOption",a))||"noWrap"!=o,(o=fu(t,n,r,"lineHeight",a))&&o.match(fb)&&(e.lineHeight=o),(o=fu(t,n,r,"fontSize",a))&&(o.match(fb)||o.match(fy))&&(e.fontSize=o),(o=fu(t,n,r,"fontStyle",a))&&(e.fontStyle=eA[o.toUpperCase()]),i){o=i.getAttribute("imageType")||i.getAttribute("imagetype");var s=i.getAttribute("encoding");i=i.textContent.trim(),"PNG"==o&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)}(i=fu(t,n,r,"textOutline",a))&&((i=i.split(" "))[0].match(fb)?e.textStrokeColor=e.color:(e.textStrokeColor=i[0],i.shift()),i[0]&&i[0].match(fb)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=fu(t,n,r,"letterSpacing",a))&&i.match(fb)&&(e.letterSpacing=i),(i=fu(t,n,r,"linePadding",a))&&i.match(fb)&&(e.linePadding=i),(a=fu(t,n,r,"opacity",a))&&(e.opacity=parseFloat(a)),(n=fl(n,r,"textDecoration"))&&fs(e,n),(t=fc(t,r,"textDecoration"))&&fs(e,t)}(n,y,s,b,a,t,0==u.length),n}(n,t,r,a,o,i,s,l,u,null,!1))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},W("shaka.text.TtmlTextParser",fo),fo.prototype.parseMedia=fo.prototype.parseMedia,fo.prototype.setSequenceMode=fo.prototype.setSequenceMode,fo.prototype.parseInit=fo.prototype.parseInit;var fv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,fy=/^(\d{1,2}(?:\.\d+)?|100)%$/,fb=/^(\d+px|\d+em|\d*\.?\d+c)$/,fw=/^(\d+)px (\d+)px$/,fT=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,fx=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,fS=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,fE=/^(\d*(?:\.\d*)?)f$/,fA=/^(\d*(?:\.\d*)?)t$/,fk=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),fI={left:eb,center:"center",right:"end",start:eb,end:"end"},fC={left:"line-left",center:"center",right:"line-right"},fM=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],fR=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function fN(){this.g=new fo}function fP(){this.g=!1}function fL(e){for(var t=v(Object.entries(eT)),n=t.next();!n.done;n=t.next()){var i=v(n.value);n=i.next().value,i=i.next().value;var r=new ec(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=v(Object.entries(ex))).next();!n.done;n=t.next())n=(i=v(n.value)).next().value,i=i.next().value,(r=new ec(0,0,"")).backgroundColor=i,e.set("."+n,r)}function f_(e,t,n){0===n.size&&fL(n);e:{var i=e;e=[];for(var r=-1,a="",o=0;o<i.length;o++)if("/"===i[o]&&0<o&&"<"===i[o-1]){var s=i.indexOf(">",o);if(s<=o){e=i;break e}if((s=i.substring(o+1,s))&&"c"===s){var u=e.pop();u?u===s?(a+="/"+s+">",o+=s.length+1):u.startsWith("c.")?(o+=s.length+1,a+="/"+u+">"):a+=i[o]:a+=i[o]}else a+=i[o]}else"<"===i[o]?"c"!=i[r=o+1]&&(r=-1):">"===i[o]&&0<r&&(e.push(i.substr(r,o-r)),r=-1),a+=i[o];e=a}for(r=0,i=[],a=-1;r<e.length;r++)"<"===e[r]?a=r+1:">"===e[r]&&0<a&&((a=e.substr(a,r-a)).match(fF)&&i.push(a),a=-1);for(r=(i=v(i)).next();!r.done;r=i.next())r=r.value,e=e.replace("<"+r+">",'<div time="'+r+'">')+"</div>";e:{for(s=0,r=e,a=[],o=-1,i="",e=!1;s<r.length;s++)if("/"===r[s]){if(-1===(u=r.indexOf(">",s))){e=r;break e}if((u=r.substring(s+1,u))&&"v"==u){e=!0;var l=null;if(a.length&&(l=a[a.length-1]),l){if(l===u)i+="/"+u+">";else{if(!l.startsWith("v")){i+=r[s];continue}i+="/"+l+">"}s+=u.length+1}else i+=r[s]}else i+=r[s]}else"<"===r[s]?"v"!=r[o=s+1]&&(o=-1):">"===r[s]&&0<o&&(a.push(r.substr(o,s-o)),o=-1),i+=r[s];for(a=(r=v(a)).next();!a.done;a=r.next())o=(a=a.value).replace(" ",".voice-"),i=(i=i.replace("<"+a+">","<"+o+">")).replace("</"+a+">","</"+o+">"),e||(i+="</"+o+">");e=i}if(r=iX("<span>"+e+"</span>","span")){if(i=[],1==(r=r.childNodes).length&&((a=r[0]).nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE)){t.payload=fB(e);return}for(r=(e=v(r)).next();!r.done;r=e.next())!function e(t,n,i,r){var a=n.clone();
1if(t.nodeType===Node.ELEMENT_NODE&&t.nodeName)for(var o=v(t.nodeName.split(/(?=[ .])+/g)),s=o.next();!s.done;s=o.next()){var u=s=s.value;if(u.startsWith(".voice-")){var l=u.split("-").pop();u='v[voice="'+l+'"]',r.has(u)||(u="v[voice="+l+"]")}switch(r.has(u)&&(u=r.get(u))&&(a.backgroundColor=fj(u.backgroundColor,a.backgroundColor),a.color=fj(u.color,a.color),a.fontFamily=fj(u.fontFamily,a.fontFamily),a.fontSize=fj(u.fontSize,a.fontSize),a.fontWeight=u.fontWeight,a.fontStyle=u.fontStyle,a.opacity=u.opacity,a.textShadow=u.textShadow,a.wrapLine=u.wrapLine),s){case"br":(s=n.clone()).lineBreak=!0,i.push(s);break;case"b":a.fontWeight=700;break;case"i":a.fontStyle="italic";break;case"u":a.textDecoration.push("underline");break;case"div":(s=t.getAttribute("time"))&&(s=fU(new ca(s)))&&(a.startTime=s)}}if(ij(t))for(o=!0,t=(r=v(t.textContent.split("\n"))).next();!t.done;t=r.next())t=t.value,o||((o=n.clone()).lineBreak=!0,i.push(o)),0<t.length&&((o=a.clone()).payload=fB(t),i.push(o)),o=!1;else for(t=(n=v(t.childNodes)).next();!t.done;t=n.next())e(t.value,a,i,r)}(r.value,t,i,n);t.nestedCues=i}else t.payload=fB(e)}function fj(e,t){return e&&0<e.length?e:t}function fO(e,t,n){var i,r,a;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?"middle"==(t=i[1])?e.textAlign=eh:e.textAlign=ef[t.toUpperCase()]:(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(e.positionAlign="line-left"==(t=i[2])||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(i=/^regi
1on:(.*)$/.exec(t))?(r=n,a=i[1],(t=(r=r.filter(function(e){return e.id==a})).length?r[0]:null)&&(e.region=t)):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=ew[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=ey,e.line=Number(n[1]),n[2]&&(e.lineAlign=ew[n[2].toUpperCase()]))}function fU(e){if(null==(e=cs(e,fF)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function fB(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\xa0","‎":"â","‏":"â"},n=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return t[e]||"'"}):e||""}tz["application/ttml+xml"]=function(){return new fo},fN.prototype.parseInit=function(e){var t=!1;if((new iv).box("moov",iy).box("trak",iy).box("mdia",iy).box("minf",iy).box("stbl",iy).P("stsd",ib).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new ej(2,2,2007)},fN.prototype.setSequenceMode=function(){},fN.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new iv).box("mdat",iT(function(e){i=!0,r=r.concat(n.g.parseMedia(e,t))})).parse(e,!1),!i)throw new ej(2,2,2007);return r},W("shaka.text.Mp4TtmlParser",fN),fN.prototype.parseMedia=fN.prototype.parseMedia,fN.prototype.setSequenceMode=fN.prototype.setSequenceMode,fN.prototype.parseInit=fN.prototype.parseInit,tz['application/mp4; codecs="stpp"']=function(){return new fN},tz['application/mp4; codecs="stpp.ttml"']=function(){return new fN},tz['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new fN},tz['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new fN},fP.prototype.parseInit=function(){},fP.prototype.setSequenceMode=function(e){this.g=e},fP.prototype.parseMedia=function(e,t){var n=(e=(e=tm(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new ej(2,2,2e3);if(e=t.vttOffset,n[0].includes("X-TIMESTAMP-MAP")&&this.g){var i=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=n[0].match(/MPEGTS:(\d+)/m);if(i&&r){if(null==(e=fU(new ca(i[1]))))throw new ej(2,2,2e3);for(r=Number(r[1]),i=t.segmentStart-t.periodStart;95443.7176888889<=i;)i-=95443.7176888889,r+=0x200000000;e=t.periodStart+r/9e4-e}}for(t=[],i=(r=v(n[0].split("\n"))).next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new ca(i);var a=new ek;cu(i),co(i);for(var o=cu(i);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),co(i),o=cu(i)}t.push(a)}for(fL(r=new Map),i=[],a=(n=v(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(u=1,s=[],o=-1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=v(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=r.get(o))||(l=new ec(0,0,""));for(var c=!1,d=0;d<u.length;d++){var h=/^\s*([^:]+):\s*(.*)/.exec(u[d]);if(h){var f=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=f;break;case"color":c=!0,l.color=f;break;case"font-family":c=!0,l.fontFamily=f;break;case"font-size":c=!0,l.fontSize=f;break;case"font-weight":(700<=parseInt(f,10)||"bold"==f)&&(c=!0,l.fontWeight=700);break;case"font-style":switch(f){case"normal":c=!0,l.fontStyle=eE;break;case"italic":c=!0,l.fontStyle="italic";break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(f);break;case"text-shadow":c=!0,l.textShadow=f;break;case"white-space":c=!0,l.wrapLine="noWrap"!=f}}}c&&r.set(o,l)}}if(c=e,1==a.length&&!a[0]||/^NOTE($|[ \t])/.test(a[0])||"STYLE"==a[0]||"REGION"==a[0])a=null;else{if(s=null,a[0].includes("--\x3e")||(s=a[0],a.splice(0,1)),u=fU(o=new ca(a[0])),d=cs(o,/[ \t]+--\x3e[ \t]+/g),l=fU(o),null==u||null==d||null==l)throw new ej(2,2,2001,"Could not parse cue time range in WebVTT");for(u+=c,l+=c,c=a.slice(1).join("\n").trim(),r.has("global")?((a=r.get("global").clone()).startTime=u,a.endTime=l,a.payload=""):a=new ec(u,l,""),f_(c,a,r),co(o),u=cu(o);u;)fO(a,u,t),co(o),u=cu(o);null!=s&&(a.id=s)}a&&i.push(a)}return i},W("shaka.text.VttTextParser",fP),fP.prototype.parseMedia=fP.prototype.parseMedia,fP.prototype.setSequenceMode=fP.prototype.setSequenceMode,fP.prototype.parseInit=fP.prototype.parseInit;var fF=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function fV(){this.g=null}function fH(){}function fK(e){if(null==(e=cs(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function fq(){this.g=new fP}function fG(e){var t="WEBVTT\n\n";if(""==e)return t;e=v((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"));for(var n=e.next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n")+"\n\n";return t}function fX(){}function fz(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function fW(e){return 3600*((e=fQ.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}tz["text/vtt"]=function(){return new fP},tz['text/vtt; codecs="vtt"']=function(){return new fP},tz['text/vtt; codecs="wvtt"']=function(){return new fP},fV.prototype.parseInit=function(e){var t=this,n=!1;if((new iv).box("moov",iy).box("trak",iy).box("mdia",iy).P("mdhd",function(e){t.g=(e=ar(e.reader,e.version)).timescale}).box("minf",iy).box("stbl",iy).P("stsd",ib).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new ej(2,2,2008)},fV.prototype.setSequenceMode=function(){},fV.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new ej(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if((new iv).box("moof",iy).box("traf",iy).P("tfdt",function(e){o=!0,i=ai(e.reader,e.version).we}).P("tfhd",function(e){l=an(e.reader,e.flags).Ce}).P("trun",function(e){s=!0,r=aa(e.reader,e.version,e.flags).Re}).box("mdat",iT(function(e){u=!0,n=e}
1)).parse(e,!1),!u&&!o&&!s)throw new ej(2,2,2008);e=i;for(var c=new ip(n,0),d=v(r),h=d.next();!h.done;h=d.next()){var f=(h=h.value).ge||l,p=h.gd?i+h.gd:e;e=p+(f||0);var g=0;do{var m=c.K();g+=m;var y=c.K(),b=null;"vttc"==iS(y)?8<m&&(b=c.Za(m-8)):c.skip(m-8),f&&b&&(m=function(e,t,n){var i,r,a;return(new iv).box("payl",iT(function(e){i=tm(e)})).box("iden",iT(function(e){r=tm(e)})).box("sttg",iT(function(e){a=tm(e)})).parse(e),i?function(e,t,n,i,r){if(f_(e,i=new ec(i,r,""),new Map),t&&(i.id=t),n)for(t=cu(e=new ca(n));t;)fO(i,t,[]),co(e),t=cu(e);return i}(i,r,a,t,n):null}(b,t.periodStart+p/this.g,t.periodStart+e/this.g),a.push(m))}while(h.sampleSize&&g<h.sampleSize)}return a.filter(e0)},W("shaka.text.Mp4VttParser",fV),fV.prototype.parseMedia=fV.prototype.parseMedia,fV.prototype.setSequenceMode=fV.prototype.setSequenceMode,fV.prototype.parseInit=fV.prototype.parseInit,tz['application/mp4; codecs="wvtt"']=function(){return new fV},fH.prototype.parseInit=function(){},fH.prototype.setSequenceMode=function(){},fH.prototype.parseMedia=function(e){var t=tm(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=v(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){var i=new ca((n=n.value.split("\n"))[0]),r=fK(i),a=cs(i,/,/g);if(i=fK(i),null==r||null==a||null==i)throw new ej(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new ec(r,i,n.slice(1).join("\n").trim()))}return e},W("shaka.text.SbvTextParser",fH),fH.prototype.parseMedia=fH.prototype.parseMedia,fH.prototype.setSequenceMode=fH.prototype.setSequenceMode,fH.prototype.parseInit=fH.prototype.parseInit,tz["text/x-subviewer"]=function(){return new fH},fq.prototype.parseInit=function(){},fq.prototype.setSequenceMode=function(){},fq.prototype.parseMedia=function(e,t){return e=eP(tb(e=fG(e=tm(e)))),this.g.parseMedia(e,t)},W("shaka.text.SrtTextParser",fq),fq.srt2webvtt=fG,fq.prototype.parseMedia=fq.prototype.parseMedia,fq.prototype.setSequenceMode=fq.prototype.setSequenceMode,fq.prototype.parseInit=fq.prototype.parseInit,tz["text/srt"]=function(){return new fq},fX.prototype.parseInit=function(){},fX.prototype.setSequenceMode=function(){},fX.prototype.parseMedia=function(e){var t="",n="";e=v(e=tm(e).split(/\r?\n\s*\r?\n/));for(var i=e.next();!i.done;i=e.next()){var r=fY.exec(i.value);r&&(i=r[1],r=r[2],"V4 Styles"==i||"V4+ Styles"==i?t=r:"Events"==i&&(n=r))}e=[],i=null,t=v(t.split(/\r?\n/));for(var a=t.next();!a.done;a=t.next())if(r=a.value,!/^\s*;/.test(r)&&(a=f$.exec(r))){if(r=a[1].trim(),a=a[2].trim(),"Format"==r)i=a.split(fJ);else if("Style"==r){r=a.split(fJ),a={};for(var o=0;o<i.length&&o<r.length;o++)a[i[o]]=r[o];e.push(a)}}for(i=[],t=null,r={},a=(n=v(n.split(/\r?\n/))).next();!a.done;r={yd:r.yd},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=f$.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(fJ);else if("Dialogue"==a){o=o.split(fJ),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new ec(s=fW(a.Start),fW(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),r.yd=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.yd}}(r)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=fz(n))&&(e.color=n),(n=t.BackColour)&&(n=fz(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=ep,e.textAlign="start";break;case 2:e.displayAlign=ep,e.textAlign=eh;break;case 3:e.displayAlign=ep,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=eh;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=eh;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,a),i.push(o)}}return i},W("shaka.text.SsaTextParser",fX),fX.prototype.parseMedia=fX.prototype.parseMedia,fX.prototype.setSequenceMode=fX.prototype.setSequenceMode,fX.prototype.parseInit=fX.prototype.parseInit;var fY=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,f$=/^\s*([^:]+):\s*(.*)/,fJ=/\s*,\s*/,fQ=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function fZ(){}function f0(){d?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(d=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=f1):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function f1(e,t){var n,i=this;
1return F(function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),C(r,d.call(i,e,t),2)):pt(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=d,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=f2,r.return(f2.call(i,e,t)))})}function f2(e,t){var n,i,r,a,o,s,u,l,c,h,f=this;return F(function(p){if(1==p.g){for(console.assert(f==navigator,'bad "this" for requestMediaKeySystemAccess'),n=pe(e),i=[],a=(r=v(t)).next();!a.done;a=r.next())s=f4((o=a.value).videoCapabilities,n),u=f4(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((l=Object.assign({},o)).videoCapabilities=s,l.audioCapabilities=u,i.push(l));if(!i.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return C(p,d.call(f,e,i),2)}return h=p.h,p.return(new f7(h,n))})}function f4(e,t){return e?e.filter(function(e){return!e.encryptionScheme||e.encryptionScheme==t}):e}function f3(){}function f5(){h?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(h=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=f6):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function f6(e){var t,n,i,r=this;return F(function(a){switch(a.g){case 1:return console.assert(r==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(a,h.call(r,e),2);case 2:if(t=a.h,!e.keySystemConfiguration)return a.return(t);if((n=t.keySystemAccess)&&pt(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=h,a.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=f8,n){a.B(3);break}return i=t,C(a,f9(e),4);case 4:return i.keySystemAccess=a.h,a.return(t);case 3:return a.return(f8.call(r,e))}})}function f8(e){var t,n,i,r,a,o,s,u,l=this;return F(function(c){switch(c.g){case 1:return console.assert(l==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(i=(n=e.keySystemConfiguration).keySystem,r=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=pe(i),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},r&&r!=t||a&&a!=t)?c.return(o):C(c,h.call(l,e),2);case 2:if((s=c.h).keySystemAccess){s.keySystemAccess=new f7(s.keySystemAccess,t),c.B(3);break}if(!e.keySystemConfiguration){c.B(3);break}return u=s,C(c,f9(e),5);case 5:u.keySystemAccess=c.h;case 3:return c.return(s)}})}function f9(e){var t,n;return F(function(i){if(1==i.g){var r=e.keySystemConfiguration,a=[],o=[];return r.audio&&a.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType}),r.video&&o.push({robustness:r.video.robustness||"",contentType:e.video.contentType}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},a.length&&(r.audioCapabilities=a),o.length&&(r.videoCapabilities=o),t=r,C(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}function f7(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function pe(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function pt(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function pn(){}function pi(){f0(),f5()}tz["text/x-ssa"]=function(){return new fX},W("EmeEncryptionSchemePolyfill",fZ),fZ.install=f0,W("McEncryptionSchemePolyfill",f3),f3.install=f5,f7.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=v(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=v(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},f7.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},W("EncryptionSchemePolyfills",pn),pn.install=pi,void 0!==n&&n.exports&&(n.exports=pn)}).call(i,e,e,void 0),i.shaka)t[r]=i.shaka[r]}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.