1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{85351:(e,t,n)=>{var i="u">typeof window?window:n.g,r={};for(var a 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="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},a=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 o(e,t){if(t)e:{var n=a;e=e.split(".");for(var i=0;i<e.length-1;i++){var o=e[i];if(!(o in n))break e;n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&r(n,e,{configurable:!0,writable:!0,value:t})}}function s(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function u(e){var t="u">typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:i(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function l(e){if(!(e instanceof Array)){e=u(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}o("Symbol",function(e){function t(e,t){this.g=e,r(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)}}),o("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 o=a[t[n]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&r(o.prototype,e,{configurable:!0,writable:!0,value:function(){return s(i(this))}})}return e});var c,d,h="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)d=Object.setPrototypeOf;else{e:{var p={};try{p.__proto__={a:!0},yt=p.a;break e}catch(e){}yt=!1}d=yt?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var f=d;function g(e,t){if(e.prototype=h(t.prototype),e.prototype.constructor=e,f)f(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.Ik=t.prototype}function m(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function v(e){if(e.o)throw TypeError("Generator is already running");e.o=!0}function y(e,t){e.i={Jg:t,Tg:!0},e.g=e.m||e.j}function b(e,t,n){return e.g=n,{value:t}}function w(e){e.g=0}function x(e,t,n){e.m=t,void 0!=n&&(e.j=n)}function T(e,t){e.m=0,e.j=t||0}function S(e,t,n){e.g=t,e.m=n||0}function A(e,t){return e.m=t||0,t=e.i.Jg,e.i=null,t}function k(e){e.A=[e.i],e.m=0,e.j=0}function E(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.Tg?e.g=e.m||e.j:void 0!=n.u&&e.j<n.u?(e.g=n.u,e.i=null):e.g=e.j:e.g=t}function I(e){this.g=new m,this.h=e}function M(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,y(e.g,t),C(e)}
1return e.g.l=null,i.call(e.g,a),C(e)}function C(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,y(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Tg)throw t.Jg;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return v(e.g),e.g.l?t=M(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=C(e)),t},this.throw=function(t){return v(e.g),e.g.l?t=M(e,e.g.l.throw,t,e.g.s):(y(e.g,t),t=C(e)),t},this.return=function(t){var n,i,r;return n=e,i=t,v(n.g),(r=n.g.l)?M(n,"return"in r?r.return:function(e){return{value:e,done:!0}},i,n.g.return):(n.g.return(i),C(n))},this[Symbol.iterator]=function(){return this}}function R(e){var t=new D(new I(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 P(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(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}function j(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{Rg:r,v:a}}return{Rg:-1,v:void 0}}function U(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+""}m.prototype.s=function(e){this.h=e},m.prototype.return=function(e){this.i={return:e},this.g=this.j},m.prototype.u=function(e){this.g=e},o("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=a.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.C(e):this.m(e)}},t.prototype.C=function(e){var t=void 0;try{t=e.then}catch(e){this.l(e);return}"function"==typeof t?this.I(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.A()},t.prototype.G=function(){var e=this;r(function(){if(e.B()){var t=a.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var e=a.CustomEvent,t=a.Event,n=a.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=a.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)o.h(this.g[e]);this.g=null}};var o=new n;return t.prototype.H=function(e){var t=this.j();e.Pd(t.resolve,t.reject)},t.prototype.I=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.Pd(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Pd=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?o.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=u(e),a=r.next();!a.done;a=r.next())i(a.value).Pd(t,n)})},t.all=function(e){var n=u(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).Pd(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),o("WeakMap",function(e){function t(e){if(this.g=(l+=Math.random()+1).toString(),e){e=u(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 a(e){L(e,s)||r(e,s,{value:new n})}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&a(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 s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var l=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(a(e),!L(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&L(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&L(e,s)&&L(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&L(e,s)&&L(e[s],this.g))&&delete e[s][this.g]},t}),o("Map",function(e){function t(){var e={};return e.Tb=e.next=e.head=e}function n(e,t){var n=e[1];return s(function(){if(n){for(;n.head!=e[1];)n=n.Tb;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[0][n];if(i&&L(e[0],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,entry:r}}return{id:n,list:i,index:-1,entry:void 0}}function r(e){if(this[0]={},this[1]=t(),this.size=0,e){e=u(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(u([[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[0][n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this[1],Tb:this[1].Tb,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].Tb.next=n.entry,this[1].Tb=n.entry,this.size++),this},r.prototype.delete=function(e){return!!(e=i(this,e)).entry&&!!e.list&&(e.list.splice(e.index,1),e.list.length||delete this[0][e.id],e.entry.Tb.next=e.entry.next,e.entry.next.Tb=e.entry.Tb,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this[0]={},this[1]=this[1].Tb=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).entry},r.prototype.get=function(e){return(e=i(this,e).entry)&&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}),o("Set",function(e){function t(e){if(this.g=new Map,e){e=u(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(u([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}),o("Array.prototype.values",function(e){return e||function(){return N(this,function(e,t){return t})}}),o("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="u">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}}),o("Array.prototype.keys",function(e){return e||function(){return N(this,function(e){return e})}}),o("Array.prototype.findIndex",function(e){return e||function(e,t){return j(this,e,t).Rg}}),o("String.prototype.startsWith",function(e){return e||function(e,t){var n=U(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}}),o("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),o("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}}),o("String.prototype.includes",function(e){return e||function(e,t){return -1!==U(this,e,"includes").indexOf(e,t||0)}}),o("String.fromCodePoint",function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var i=Number(arguments[n]);if(0>i||1114111<i||i!==Math.floor(i))throw RangeError("invalid_code_point "+i);65535>=i?t+=String.fromCharCode(i):(i-=65536,t+=String.fromCharCode(i>>>10&1023|55296),t+=String.fromCharCode(1023&i|56320))}return t}}),o("WeakSet",function(e){function t(e){if(this.g=new WeakMap,e){e=u(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return!function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([t]);if(!i.has(t)||i.has(n))return!1;return i.delete(t),i.add(n),!i.has(t)&&i.has(n)}catch(e){return!1}}()?(t.prototype.add=function(e){return this.g.set(e,!0),this},t.prototype.has=function(e){return this.g.has(e)},t.prototype.delete=function(e){return this.g.delete(e)},t):e}),o("Array.prototype.find",function(e){return e||function(e,t){return j(this,e,t).v}}),o("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push([t,e[t]]);return n}});var O="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)L(i,r)&&(e[r]=i[r])}return e};o("Object.assign",function(e){return e||O}),o("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})})}}),o("Array.prototype.entries",function(e){return e||function(){return N(this,function(e,t){return[e,t]})}}),o("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),o("String.prototype.repeat",function(e){return e||function(e){var t=U(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}}),o("Number.EPSILON",function(){return 2220446049250313e-31}),o("Number.MAX_SAFE_INTEGER",function(){return 0x1fffffffffffff}),o("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&1/0!==e&&-1/0!==e}}),o("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push(e[t]);return n}}),o("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),o("String.prototype.endsWith",function(e){return e||function(e,t){var n=U(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var i=e.length;0<i&&0<t;)if(n[--t]!=e[--i])return!1;return 0>=i}}),o("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}});var _=this||self;function B(e,t){e=e.split(".");var n,i=_;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 F(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function V(e){return e.h/(1-Math.pow(e.g,e.i))}function H(){this.h=new F(2),this.j=new F(5),this.g=0,this.i=128e3,this.l=16e3}function G(){}function K(){}function q(){}function z(e){var t=P.apply(1,arguments);W.has(e)||(W.add(e),q.apply(G,l(t)))}function X(){}F.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)},H.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)},H.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)}},H.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(V(this.h),V(this.j))};var W=new Set;function Y(){this.g=new Map}function J(){this.g=new Y}function $(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=Q;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}Q=t}return t||!1}(e)?t.capture||!1:t}(e,i),this.target.addEventListener(t,n,this.g)}e.console&&((new Map).set(1,function(){return console.error.apply(console,l(P.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,l(P.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,l(P.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,l(P.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,l(P.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,l(P.apply(0,arguments)))}),q=function(){return console.warn.apply(console,l(P.apply(0,arguments)))},K=function(){console.error.apply(console,l(P.apply(0,arguments)))}),(c=Y.prototype).push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},c.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},c.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(e){return e!=t});this.g.set(e,n),n.length||this.g.delete(e)}}
1,c.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},c.size=function(){return this.g.size},c.keys=function(){return Array.from(this.g.keys())},(c=J.prototype).release=function(){this.La(),this.g=null},c.D=function(e,t,n,i){this.g&&(e=new $(e,t,n,i),this.g.push(t,e))},c.qa=function(e,t,n,i){var r=this;this.D(e,t,function i(a){r.$a(e,t,i),n(a)},i)},c.$a=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=u(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.$a(),this.g.remove(t,r))}},c.La=function(){if(this.g){for(var e=[],t=u(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,l(n.value));for(t=(e=u(e)).next();!t.done;t=e.next())t.value.$a();this.g.g.clear()}},B("shaka.util.EventManager",J),J.prototype.removeAll=J.prototype.La,J.prototype.unlisten=J.prototype.$a,J.prototype.listenOnce=J.prototype.qa,J.prototype.listen=J.prototype.D,J.prototype.release=J.prototype.release,$.prototype.$a=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Q=void 0;function Z(t){if(et.has(t))return et.get(t);var n=e.ManagedMediaSource||e.MediaSource;return!!n&&(n=n.isTypeSupported(t),et.set(t,n),n)}function ee(){var t=e.ManagedSourceBuffer||e.SourceBuffer;return!!t&&!!t.prototype&&!!t.prototype.changeType}var et=new Map;function en(e,t){this.g=e,this.h=t}function ei(e,t){var n=new en(5,0),i=eo,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function er(e,t,n,i){q([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function ea(e,t,n,i){K([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}en.prototype.toString=function(){return"v"+this.g+"."+this.h};var eo=null;function es(){}function eu(){}function el(){}function ec(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=eh(e);t=eh(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function ed(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function eh(e,t,n){return eg(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function ep(e,t,n){return eg(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function ef(e,t,n){return eg(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function eg(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,a=1;"BYTES_PER_ELEMENT"in i&&(a=i.BYTES_PER_ELEMENT);var o=((e.byteOffset||0)+e.byteLength)/a;return new i(r,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function em(){}function ev(e){this.l=new eu,(e=eb(e.toLowerCase()))&&(this.l=e()),this.h=new es,(e=ex)&&(this.h=e())}function ey(e,t){ew.set(e,t)}function eb(e){return ew.get(e)}es.prototype.extract=function(){},es.prototype.decode=function(){return[]},es.prototype.clear=function(){},es.prototype.getStreams=function(){return[]},eu.prototype.init=function(){},eu.prototype.parse=function(){return[]},B("shaka.util.BufferUtils",el),el.toDataView=ef,el.toUint16=ep,el.toUint8=eh,el.toArrayBuffer=ed,el.equal=ec,em.prototype.init=function(){},em.prototype.i=function(){},em.prototype.g=function(){},em.prototype.j=function(){},B("shaka.media.IClosedCaptionParser",em),ev.prototype.init=function(e,t){(void 0===t?0:t)||this.g(),this.l.init(e)},ev.prototype.i=function(e){e=u(e=this.l.parse(e));for(var t=e.next();!t.done;t=e.next()){var n=eh((t=t.value).packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},ev.prototype.g=function(){this.h.clear()},ev.prototype.j=function(){return this.h.getStreams()},B("shaka.media.ClosedCaptionParser",ev),ev.findDecoder=function(){return ex},ev.unregisterDecoder=function(){ex=null},ev.registerDecoder=function(e){ex=e},ev.findParser=eb,ev.unregisterParser=function(e){ew.delete(e)},ev.registerParser=ey;var ew=new Map,ex=null;function eT(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=eS,this.scroll=eA}B("shaka.text.CueRegion",eT);var eS=1;eT.units={PX:0,PERCENTAGE:1,LINES:2};var eA="";function ek(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function eE(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function eI(e,t,n){if(n||(n=ek),e.length!=t.length)return!1;t=t.slice(),e=u(e);for(var i=e.next(),r={};!i.done;r={Vg:void 0},i=e.next()){if(r.Vg=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.Vg,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function eM(e,t,n){if(n||(n=ek),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){var i=P.apply(3,arguments);
1if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,eD)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}eT.scrollMode={NONE:eA,UP:"up"},eC.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},B("shaka.util.Error",eC);var eD=!0;function eR(e){this.h=e,this.g=void 0}function eP(e,t){if(e===t||!e.length||!t.length)return!0;e=u(e);for(var n=e.next();!n.done;n=e.next()){if(ej(n=n.value))return!0;for(var i=u(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||ej(r))return!0}return!1}function eL(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=u(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=u(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=u((i.initData||[]).concat(a.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,r.set(s.keyId,s);r=Array.from(r.values()),o=i.keyIds&&a.keyIds?new Set([].concat(l(i.keyIds),l(a.keyIds))):i.keyIds||a.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||a.persistentStateRequired,videoRobustness:i.videoRobustness||a.videoRobustness,audioRobustness:i.audioRobustness||a.audioRobustness,serverCertificate:i.serverCertificate||a.serverCertificate,serverCertificateUri:i.serverCertificateUri||a.serverCertificateUri,initData:r,keyIds:o});break}else ej(i)?n.push(i):ej(a)&&n.push(a)}return n}function eN(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function ej(e){return!!(e=e.licenseServerUri)&&e.startsWith("data:application/json;base64,")}eC.Severity={RECOVERABLE:1,CRITICAL:2},eC.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},eC.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,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_APP
1LE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007},eR.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var eU=new eR(function(){return ed(new Uint8Array([0]))}),eO=new Map;function e_(e){this.h=e,this.g=null}function eB(e){this.h=e,this.g=null}function eF(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.isTypeSupported}function eV(e){return""!=e6().canPlayType(e)}function eH(){return!!navigator.userAgent.match(/Edge?\//)}function eG(){return e4("Xbox One")}function eK(){return e4("Tizen")}function eq(){return e4("Tizen 3")}function ez(){return e4("Web0S")}function eX(){return e4("CrKey")}function eW(){if(!e4("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function eY(){return e5()&&((navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("mac"))||!!/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||e5()&&1<navigator.maxTouchPoints)}function eJ(){return e4("PlayStation 5")}function e$(){return e4("PlayStation 4")}function eQ(){return e4("Hisense")||e4("VIDAA")}
1function eZ(){if(!eY()&&(!e5()||eY()))return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function e0(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}function e1(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():e4("Android")}function e2(){return navigator.userAgentData&&navigator.userAgentData.platform?"fuchsia"==navigator.userAgentData.platform.toLowerCase():e4("Fuchsia")}function e3(){return!!(eK()||ez()||eG()||e$()||eJ()||eX()||eQ()||e5()&&!eY())}function e4(e){return(navigator.userAgent||"").includes(e)}function e5(){return(navigator.vendor||"").includes("Apple")}function e6(){return te||(e7||(e7=new eB(function(){te=null})),(te=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(te=document.createElement("video")),e7.$(1)),te}function e8(){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g;return R(function(m){switch(m.g){case 1:if(t={width:1/0,height:1/0},eX()){if(h=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t.width=1280,t.height=720,x(m,14),!(p=h)){m.u(16);break}return b(m,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(eK()){n=e.devicePixelRatio,t.width=1920<e.screen.width*n?3840:1920,t.height=1080<e.screen.height*n?2160:1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(i=webapis.systeminfo.getMaxVideoResolution(),t.width=i.width,t.height=i.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(t.width=7680,t.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(t.width=3840,t.height=2160)}catch(e){q("Tizen: Error detecting screen size, default screen size 1920x1080.")}m.u(3);break}if(ez()){try{r=JSON.parse(e.PalmSystem.deviceInfo),t.width=Math.max(1920,r.screenWidth),t.height=Math.max(1080,r.screenHeight)}catch(e){q("WebOS: Error detecting screen size, default screen size 1920x1080."),t.width=1920,t.height=1080}m.u(3);break}if(eQ()){if(a=null,e.Hisense_Get4KSupportState)try{a=e.Hisense_Get4KSupportState()}catch(e){}null==a&&(a=e4("UHD")),a?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),m.u(3);break}if(!e$()&&!eJ()){o=void 0;try{o="u">typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(e){}if(o){t.width=1920,t.height=1080;try{s=new o.Media.Protection.ProtectionCapabilities,u=o.Media.Protection.ProtectionCapabilityResult,l=null;do l=s.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(l===u.maybe);l===u.probably&&(t.width=3840,t.height=2160)}catch(e){q("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else eG()&&(t.width=1920,t.height=1080,q("Xbox: Error detecting screen size, default screen size 1920x1080."));m.u(3);break}return c=!1,x(m,8),b(m,e.msdk.device.getDisplayInfo(),10);case 10:case 13:c="4K"===m.h.resolution,S(m,9);break;case 8:return A(m),x(m,11),b(m,e.msdk.device.getDisplayInfoImmediate(),13);case 11:d=A(m),q("PlayStation: Failed to get the display info:",d);case 9:c?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),m.u(3);break;case 17:p=m.h;case 16:if(p){t.width=3840,t.height=2160,m.u(18);break}if(!(f=h)){m.u(19);break}return b(m,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:f=m.h;case 19:f&&(t.width=1920,t.height=1080);case 18:S(m,3);break;case 14:g=A(m),K("Failed to check canDisplayType:",g);case 3:return m.return(t)}})}function e9(t){return void 0!==e.matchMedia&&e.matchMedia("(color-gamut: p3)").matches?t?"HLG":"PQ":"SDR"}e_.prototype.$=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},e_.prototype.stop=function(){this.g&&(this.g(),this.g=null)},eB.prototype.pb=function(){return this.stop(),this.h(),this},eB.prototype.$=function(e){var t=this;return this.stop(),this.g=new e_(function(){t.h()}).$(e),this},eB.prototype.ua=function(e){var t=this;return this.stop(),this.g=new e_(function(){t.g.$(e),t.h()}).$(e),this},eB.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},B("shaka.util.Timer",eB),eB.prototype.stop=eB.prototype.stop,eB.prototype.tickEvery=eB.prototype.ua,eB.prototype.tickAfter=eB.prototype.$,eB.prototype.tickNow=eB.prototype.pb;var e7=null,te=null;function tt(){}function tn(t){if(!t)return"";
1if(239==(t=eh(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!e$())return(t=(new TextDecoder).decode(t)).includes("�")&&K('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 ti(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new eC(2,2,2004);var i=new Uint16Array(n=Math.floor(e.byteLength/2));e=ef(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return ts(i)}function tr(e){function t(e){return n.byteLength<=e||9<=n[e]&&126>=n[e]}if(!e)return"";var n=eh(e);if(239==n[0]&&187==n[1]&&191==n[2])return tn(n);if(254==n[0]&&255==n[1])return ti(n.subarray(2),!1);if(255==n[0]&&254==n[1])return ti(n.subarray(2),!0);if(0==n[0]&&0==n[2])return ti(e,!1);if(0==n[1]&&0==n[3])return ti(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return tn(e);throw new eC(2,2,2003)}function ta(t){if(e.TextEncoder&&!e$()){var n=new TextEncoder;return ed(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 ed(n)}function to(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}function ts(e){return tl.value()(e)}function tu(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\xa0","‎":"â","‏":"â"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return"#"==e[1]?0<=(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10))&&1114111>=e?String.fromCodePoint(e):"":t[e]||"'"}):e||""}B("shaka.util.StringUtils",tt),tt.resetFromCharCode=function(){tl.g=void 0},tt.toUTF16=to,tt.toUTF8=ta,tt.fromBytesAutoDetect=tr,tt.fromUTF16=ti,tt.fromUTF8=tn;var tl=new eR(function(){for(var e={hc:65536};0<e.hc;e={hc:e.hc},e.hc/=2)if(function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}(e.hc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.hc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.hc));return n}}(e);return null});function tc(e){this.h=e||"",this.g=0}function td(e){th(e,/[ \t]+/gm)}function th(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 tp(e){return e.g==e.h.length?null:(e=th(e,/[^ \t\n]*/gm))?e[0]:null}function tf(e){if(null==(e=th(e,tm)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function tg(e){return e?tf(new tc(e)):null}var tm=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function tv(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||ArrayBuffer.isView(n))return n;if(t.has(n))return null;var i=Array.isArray(n);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 ty(e){var t,n={};for(t in e)n[t]=e[t];return n}function tb(e,t){var n=void 0!==n&&n;return tw(e=tr(e),t,n)}function tw(e,t,n){return e=function(e,t){function n(){for(var t=i;-1==="\r\n >/= ".indexOf(e[i])&&e[i];)i++;return e.slice(t,i)}var i=0;return function r(a,o){o=void 0!==o&&o;for(var s=[];e[i];)if(60==e.charCodeAt(i)){if(47===e.charCodeAt(i+1)){o=i+2,i=e.indexOf(">",i);var u=(o=e.substring(o,i)).indexOf(a);if(-1==u){var c=a.indexOf(".");0<c&&(u=o.indexOf(a.substring(0,c)))}if(-1==u)throw Error("Unexpected close tag\nLine: "+((a=e.substring(0,i).split("\n")).length-1)+"\nColumn: "+(a[a.length-1].length+1)+"\nChar: "+e[i]);i+1&&(i+=1);break}
1if(33===e.charCodeAt(i+1)){if(45==e.charCodeAt(i+2)){for(;-1!==i&&(62!==e.charCodeAt(i)||45!=e.charCodeAt(i-1)||45!=e.charCodeAt(i-2)||-1==i);)i=e.indexOf(">",i+1);-1===i&&(i=e.length)}else if(91===e.charCodeAt(i+2)&&91===e.charCodeAt(i+8)&&"cdata"===e.substr(i+3,5).toLowerCase()){-1==(u=e.indexOf("]]>",i))?(s.push(e.substr(i+9)),i=e.length):(s.push(e.substring(i+9,u)),i=u+3);continue}i++;continue}e:{c=o,i++;var d=n(),h={};for(u=[];62!==e.charCodeAt(i)&&e[i];){var p=e.charCodeAt(i);if(64<p&&91>p||96<p&&123>p){p=n();for(var f=e.charCodeAt(i);f&&39!==f&&34!==f&&!(64<f&&91>f||96<f&&123>f)&&62!==f;)i++,f=e.charCodeAt(i);var g=i+1;if(i=e.indexOf(e[i],g),g=e.slice(g,i),39===f||34===f){if(-1===i){if(c={tagName:d,attributes:h,children:u,parent:null},t)for(d=0;d<u.length;d++)"string"!=typeof u[d]&&(u[d].parent=c);u=c;break e}}else g=null,i--;if(p.startsWith("xmlns:")){f=g;var m=p.split(":")[1];tW.set(f,m),tY.set(m,f)}"tt"===d&&"xml:space"===p&&"preserve"===g&&(c=!0),h[p]=g}i++}for(47!==e.charCodeAt(i-1)?(i++,u=r(d,c)):i++,c={tagName:d,attributes:h,children:u,parent:null},d=u.length,h=0;h<d;h++)"string"!=typeof(p=u[h])?t&&(p.parent=c):h==d-1&&"\n"==p&&u.pop();u=c}if(s.push(u),"string"==typeof u)break;"?"===u.tagName[0]&&u.children&&(s.push.apply(s,l(u.children)),u.children=[])}else u=i,-2==(i=e.indexOf("<",i)-1)&&(i=e.length),u=e.slice(u,i+1),o?0<u.length&&s.push(u):s.length&&1==u.length&&"\n"==u[0]?s.push(u):0<u.trim().length&&s.push(u),i++;return s}("")}(e,void 0!==n&&n),!t&&e.length?e[0]:(e=e.find(function(e){return t.split(",").includes(e.tagName)}))?e:null}function tx(e){return tW.has(e)?tW.get(e):""}function tT(e){return"string"==typeof e}function tS(e){var t=[];if(!e.children)return[];e=u(e.children);for(var n=e.next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function tA(e,t){var n=[];if(!e.children)return[];e=u(e.children);for(var i=e.next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function tk(e){return"string"==typeof e?tu(e):""===(e=e.children.reduce(function(e,t){return"string"==typeof t?e+t:e},""))?null:tu(e)}function tE(e){return Array.from(e.children).every(function(e){return"string"==typeof e})?((e=tk(e))&&(e=e.trim()),e):null}function tI(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children){e=u(e.children);for(var i=e.next();!i.done;i=e.next())tI(i.value,t,n)}return n}function tM(e,t){return 1!=(e=tA(e,t)).length?null:e[0]}function tC(e,t,n){return 1!=(e=tP(e,t,n)).length?null:e[0]}function tD(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.attributes[t])&&(r=n(e)),null==r?i:r}function tR(e,t,n){return t=tx(t),e.attributes[t+":"+n]||null}function tP(e,t,n){var i=tx(t);if(t=[],e.children)for(n=i?i+":"+n:n,i=(e=u(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function tL(e,t,n){t=u(t);for(var i=t.next();!i.done;i=t.next())if(i=tR(e,i.value,n))return i;return null}function tN(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 tj(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)?)?$","i").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 tU(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 tO(e){return 0==(e=Number(e))%1?e:null}function t_(e){return 0==(e=Number(e))%1&&0<e?e:null}function tB(e){return 0==(e=Number(e))%1&&0<=e?e:null}function tF(e){return isNaN(e=Number(e))?null:e}function tV(e){return!!e&&"true"===e.toLowerCase()}function tH(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function tG(e){var t=[];e=u(e=tu(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/));for(var n=e.next();!n.done;n=e.next()){var i=(n=n.value).match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),a=n.match(/(@t='(\d+)')/),o=n.match(/(@n='(\d+)')/),s=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:a?Number(a[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:s?Number(s[1])-1:null,Wb:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].Wb=n.slice(1))}return t}function tK(e,t){var n=tG(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;null==(n=i.position)&&(null!==i.t&&(n=tq(e,"t",i.t)),null!==i.n&&(n=tq(e,"n",i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.Wb)&&e[n]?tz(e[n],r,i,tE(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(l(t.children))))}}function tq(e,t,n){var i=0;e=u(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function tz(e,t,n,i){"remove"===t?delete e.attributes[n]:("add"===t||"replace"===t)&&(e.attributes[n]=i)}function tX(e){if(!e)return null;var t={tagName:e.tagName,attributes:ty(e.attributes),children:[],parent:null};e=u(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=tX(n)).parent=t),t.children.push(n);return t}var tW=new Map,tY=new Map;function tJ(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new eT,this.position=null,this.positionAlign=t2,this.size=0,this.textAlign=t3,this.direction=t8,this.writingMode=t9,this.lineInterpretation=t7,this.line=null,this.lineHeight="",this.lineAlign=ne,this.displayAlign=t5,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=nr,this.fontStyle=no,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={mc:32,rows:15}}function t$(e,t){return(e=new tJ(e,t,"")).lineBreak=!0,e}function tQ(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n){if("nestedCues"==n){if(!eM(e.nestedCues,t.nestedCues,tQ))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[
1n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!eM(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function tZ(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&t0(t);var i,r,a,o,s=n;n=[];for(var l=-1,c=0;c<s.length;c++)"<"===s[c]?l=c+1:">"===s[c]&&0<l&&((l=s.substr(l,c-l)).match(nc)&&n.push(l),l=-1);for(c=(n=u(n)).next();!c.done;c=n.next())c=c.value,s=s.replace("<"+c+">",'<div time="'+c+'">')+"</div>";e:{c=s,l=[];var d=-1;n="",s=!1;for(var h=0;h<c.length;h++)if("/"===c[h]){var p=c.indexOf(">",h);if(-1===p){n=c;break e}if((p=c.substring(h+1,p))&&"v"==p){s=!0;var f=null;if(l.length&&(f=l[l.length-1]),f){if(f===p)n+="/"+p+">";else{if(!f.startsWith("v")){n+=c[h];continue}n+="/"+f+">"}h+=p.length+1}else n+=c[h]}else n+=c[h]}else"<"===c[h]?"v"!=c[d=h+1]&&(d=-1):">"===c[h]&&0<d&&(l.push(c.substr(d,h-d)),d=-1),n+=c[h];for(l=(c=u(l)).next();!l.done;l=c.next())d=(l=l.value).replace(" ",".voice-"),n=(n=n.replace("<"+l+">","<"+d+">")).replace("</"+l+">","</"+d+">"),s||(n+="</"+d+">")}i=n,r={"< ":""," >":" >"},o=RegExp((a=/(< +>|<\s|\s>)/g).source),n=i&&o.test(i)?i.replace(a,function(e){return r[e]||""}):i||"",e.payload="";try{var g=tw("<span>"+n+"</span>","span")}catch(e){}if(g)if(1!=(g=g.children).length||g[0].tagName)for(n=(g=u(g)).next();!n.done;n=g.next())!function e(t,n,i){var r=n.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new eT,r.position=null,r.size=0,r.textAlign=t3,t.tagName)for(var a=u(t.tagName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s=o=o.value;if(s.startsWith(".voice-")){var l=s.split("-").pop();s='v[voice="'+l+'"]',i.has(s)||(s="v[voice="+l+"]")}switch(i.has(s)&&(l=r,s=i.get(s))&&(l.backgroundColor=t1(s.backgroundColor,l.backgroundColor),l.color=t1(s.color,l.color),l.fontFamily=t1(s.fontFamily,l.fontFamily),l.fontSize=t1(s.fontSize,l.fontSize),l.textShadow=t1(s.textShadow,l.textShadow),l.fontWeight=s.fontWeight,l.fontStyle=s.fontStyle,l.opacity=s.opacity,l.rubyTag=s.rubyTag,l.textCombineUpright=s.textCombineUpright,l.wrapLine=s.wrapLine),o){case"br":r=t$(r.startTime,r.endTime),n.nestedCues.push(r);return;case"b":r.fontWeight=na;break;case"i":r.fontStyle=ns;break;case"u":r.textDecoration.push(nl);break;case"font":(o=t.attributes.color)&&(r.color=o);break;case"div":if(!(o=t.attributes.time))break;(o=tg(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(a=t.children,tT(t)||1==a.length&&tT(a[0]))for(i=tk(t).split("\n"),t=!0,a=(i=u(i)).next();!a.done;a=i.next())a=a.value,t||(t=t$(r.startTime,r.endTime),n.nestedCues.push(t)),0<a.length&&((t=r.clone()).payload=tu(a),n.nestedCues.push(t)),t=!1;else for(n.nestedCues.push(r),t=(n=u(a)).next();!t.done;t=n.next())e(t.value,r,i)}(n.value,e,t);else e.payload=tu(n);else e.payload=tu(n)}else e.payload=tu(n)}function t0(e){for(var t=u(Object.entries(nn)),n=t.next();!n.done;n=t.next()){var i=u(n.value);n=i.next().value,i=i.next().value;var r=new tJ(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=u(Object.entries(ni))).next();!n.done;n=t.next())n=(i=u(n.value)).next().value,i=i.next().value,(r=new tJ(0,0,"")).backgroundColor=i,e.set("."+n,r)}function t1(e,t){return e&&0<e.length?e:t}tJ.prototype.clone=function(){var e,t=new tJ(0,0,"");for(e in this)t[e]=this[e],Array.isArray(t[e])&&(t[e]=t[e].slice());return t},B("shaka.text.Cue",tJ),tJ.parseCuePayload=tZ,tJ.equal=tQ,tJ.prototype.clone=tJ.prototype.clone;var t2="auto";tJ.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:t2};var t3="center",t4={LEFT:"left",RIGHT:"right",CENTER:t3,START:"start",END:"end"};tJ.textAlign=t4;var t5="after",t6={BEFORE:"before",CENTER:"center",AFTER:t5};tJ.displayAlign=t6;var t8="ltr";tJ.direction={HORIZONTAL_LEFT_TO_RIGHT:t8,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var t9="horizontal-tb";tJ.writingMode={HORIZONTAL_TOP_TO_BOTTOM:t9,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var t7=0;tJ.lineInterpretation={LINE_NUMBER:0,PERCENTAGE:1};var ne="start",nt={CENTER:"center",START:ne,END:"end"};tJ.lineAlign=nt;var nn={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};tJ.defaultTextColor=nn;var ni={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};
1tJ.defaultTextBackgroundColor=ni;var nr=400,na=700;tJ.fontWeight={NORMAL:400,BOLD:700};var no="normal",ns="italic",nu={NORMAL:no,ITALIC:ns,OBLIQUE:"oblique"};tJ.fontStyle=nu;var nl="underline";tJ.textDecoration={UNDERLINE:nl,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var nc=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function nd(){}function nh(e,t,n){nf.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,oe:t})}function np(e,t){for(var n=e.toLowerCase().split(";")[0],i=u([ny,nv,nm,ng]),r=i.next();!r.done;r=i.next())if(r=nf.get(n+"-"+r.value)){var a=r.oe(),o=a.isSupported(e,t);if(a.destroy(),o)return r.oe}return null}nd.prototype.destroy=function(){},B("shaka.transmuxer.TransmuxerEngine",nd),nd.findTransmuxer=np,nd.unregisterTransmuxer=function(e,t){nf.delete(e.toLowerCase().split(";")[0]+"-"+t)},nd.registerTransmuxer=nh,nd.prototype.destroy=nd.prototype.destroy;var nf=new Map,ng=1,nm=2,nv=3,ny=4;nd.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4};var nb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function nw(e){var t;e instanceof nw?(nx(this,e.Hb),this.Dc=e.Dc,nT(this,e.ub),nS(this,e.Wc),this.Ya=e.Ya,nA(this,e.g.clone()),this.oc=e.oc):e&&(t=String(e).match(nb))?(nx(this,t[1]||"",!0),this.Dc=nk(t[2]||""),nT(this,t[3]||"",!0),nS(this,t[4]),this.Ya=nk(t[5]||"",!0),nA(this,t[6]||"",!0),this.oc=nk(t[7]||"")):this.g=new nL(null)}function nx(e,t,n){e.Hb=n?nk(t,!0):t,e.Hb&&(e.Hb=e.Hb.replace(/:$/,""))}function nT(e,t,n){e.ub=n?nk(t,!0):t}function nS(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.Wc=t}else e.Wc=null}function nA(e,t,n){t instanceof nL?e.g=t:(n||(t=nE(t,nR)),e.g=new nL(t))}function nk(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function nE(e,t,n){return null!=e?(e=encodeURI(e).replace(t,nI),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function nI(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(c=nw.prototype).Hb="",c.Dc="",c.ub="",c.Wc=null,c.Ya="",c.oc="",c.toString=function(){var e=[],t=this.Hb;if(t&&e.push(nE(t,nM,!0),":"),t=this.ub){e.push("//");var n=this.Dc;n&&e.push(nE(n,nM,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Wc)&&e.push(":",String(t))}return(t=this.Ya)&&(this.ub&&"/"!=t.charAt(0)&&e.push("/"),e.push(nE(t,"/"==t.charAt(0)?nD:nC,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.oc)&&e.push("#",nE(t,nP)),e.join("")},c.resolve=function(e){var t=this.clone();"data"===t.Hb&&(t=new nw);var n=!!e.Hb;n?nx(t,e.Hb):n=!!e.Dc,n?t.Dc=e.Dc:n=!!e.ub,n?nT(t,e.ub):n=null!=e.Wc;var i=e.Ya;if(n)nS(t,e.Wc);else if(n=!!e.Ya){if("/"!=i.charAt(0))if(this.ub&&!this.Ya)i="/"+i;else{var r=t.Ya.lastIndexOf("/");-1!=r&&(i=t.Ya.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.Ya=i:n=""!==e.g.toString(),n?nA(t,e.g.clone()):n=!!e.oc,n&&(t.oc=e.oc),t},c.clone=function(){return new nw(this)};var nM=/[#\/\?@]/g,nC=/[#\?:]/g,nD=/[#\?]/g,nR=/[#\?@]/g,nP=/#/g;function nL(e){this.g=e||null}function nN(e){if(!e.Qa&&(e.Qa=new Map,e.fd=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 nj(){}function nU(e){return btoa(e=ts(eh(e)))}function nO(e,t){return t=void 0==t||t,e=nU(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function n_(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 nB(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 nF(e){var t=eh(e);e="",t=u(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 nV(){for(var e=P.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&1===r.BYTES_PER_ELEMENT?t.set(r,n):t.set(eh(r),n),n+=r.byteLength}return t}
1function nH(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new nw(e[0]);return t=new nw(t[0]),t=i.resolve(t),n&&nA(t,n),[t.toString()]}t=t.map(function(e){return new nw(e)}),i=[],e=u(e);for(var r=e.next();!r.done;r=e.next()){r=new nw(r.value);for(var a=u(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&nA(o,n),i.push(o.toString())}return i}function nG(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function nK(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach(function(e,t){var n=t;22!=n.length&&(n=nO(nB(t),!1));var o=e;22!=o.length&&(o=nO(nB(e),!1)),e={kty:"oct",kid:n,k:o},i.push(e),r.push(e.kid),a.push(t)}),t=JSON.stringify({keys:i});var o=JSON.stringify({kids:r});return o=[{initData:eh(ta(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:n,licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(a)}}function nq(e,t){if(1==t.length)return t[0];if(null!=(e=nz(e,t)))return e;throw new eC(2,4,4025,t)}function nz(e,t){var n=n$.get(e);n=u(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=u(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==nW?"":null}function nX(e,t){var n=[];e=u(e=n$.get(e));for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=u(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}(c=nL.prototype).Qa=null,c.fd=null,c.add=function(e,t){nN(this),this.g=null;var n=this.Qa.has(e)?this.Qa.get(e):null;return n||this.Qa.set(e,n=[]),n.push(t),this.fd++,this},c.set=function(e,t){return nN(this),this.g=null,this.Qa.has(e)?this.Qa.set(e,[t]):this.add(e,t),this},c.get=function(e){return nN(this),this.Qa.get(e)||[]},c.toString=function(){if(this.g)return this.g;if(!this.Qa||!this.Qa.size)return"";for(var e=[],t=u(this.Qa.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.Qa.get(i);for(var r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),e.push(a)}}return this.g=e.join("&")},c.clone=function(){var e=new nL;if(e.g=this.g,this.Qa){for(var t=new Map,n=u(this.Qa),i=n.next();!i.done;i=n.next()){var r=u(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.Qa=t,e.fd=this.fd}return e},B("shaka.util.Uint8ArrayUtils",nj),nj.concat=nV,nj.toHex=nF,nj.fromHex=nB,nj.fromBase64=n_,nj.toBase64=nO,nj.toStandardBase64=nU;var nW="text",nY={na:"video",V:"audio",Aa:nW,Ue:"image",Aj:"application"},nJ=1/15,n$=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function nQ(){}function nZ(e,t){var n=e;return t&&!n7.includes(e)&&(n+='; codecs="'+t+'"'),n}function n0(e,t){return t&&(e+='; codecs="'+t+'"'),e}function n1(e,t,n){var i=nZ(e,t);return np(t=n0(e,t))?(e=np(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function n2(e){return e.split(";")[0].split("/")[1]}function n3(e){var t=n9(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===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:case"ac3"===e:case"ac-3"===e:return"ac-3";case"mp4a"===e&&"a6"===t:case"eac3"===e:case"ec-3"===e:return"ec-3";case"ac-4"===e:return"ac-4";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";
1case"vp09"===e:case"vp9"===e:return"vp9";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"vvc1"===e:case"vvi1"===e:return"vvc";case"dvh1"===e:case"dvhe"===e:return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case"dvav"===e:case"dva1"===e:return"dovi-avc";case"dav1"===e:return"dovi-av1";case"dvc1"===e:case"dvi1"===e:return"dovi-vvc"}return e}function n4(e){var t=[];e=u(e.split(","));for(var n=e.next();!n.done;n=e.next())t.push((n=n9(n.value))[0]);return t.sort().join(",")}function n5(e){return e.split(";")[0]}function n6(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function n8(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function n9(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}B("shaka.util.MimeUtils",nQ),nQ.getFullTypeWithAllCodecs=n0,nQ.getFullType=nZ,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var n7=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ie(e){this.i=null,this.j=e,this.B=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function it(e,t){io.set(e,t)}function ii(e){return io.get(e)}function ir(e){return!!io.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!ex}function ia(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=u(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)}ie.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},ie.prototype.remove=function(e,t){var n=this;return R(function(i){if(1==i.g)return b(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)),w(i)})},B("shaka.text.TextEngine",ie),ie.prototype.destroy=ie.prototype.destroy,ie.findParser=ii,ie.unregisterParser=function(e){io.delete(e)},ie.registerParser=it;var io=new Map;function is(e,t){return e.concat(t)}function iu(){}function il(e){return null!=e}function ic(e,t){return Promise.race([t,new Promise(function(t,n){new eB(n).$(e)})])}function id(){}function ih(e,t){return e=im(e),t=im(t),e.split("-")[0]==t.split("-")[0]}function ip(e,t){return e=im(e),t=im(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function ig(e,t){return e=im(e),t=im(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function im(e){var t=(e=u(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=u(t.split("-"));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=ix.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function iv(e,t){return e=im(e),(t=im(t))==e?4:ip(t,e)?3:ig(t,e)?2:+!!ip(e,t)}function iy(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),ix.get(e)||e}function ib(e){return e.language?im(e.language):e.audio&&e.audio.language?im(e.audio.language):e.video&&e.video.language?im(e.video.language):"und"}function iw(e,t){e=im(e);var n=new Set;t=u(t);for(var i=t.next();!i.done;i=t.next())n.add(im(i.value));for(i=(t=u(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=u(n)).next();!i.done;i=t.next())if(ip(i=i.value,e))return i;for(i=(t=u(n)).next();!i.done;i=t.next())if(ig(i=i.value,e))return i;for(t=(n=u(n)).next();!t.done;t=n.next())if(ip(e,t=t.value))return t;return null}B("shaka.util.LanguageUtils",id),id.findClosestLocale=iw,id.getLocaleForVariant=ib,id.getLocaleForText=function(e){return im(e.language||"und")},id.getBase=iy,id.relatedness=iv,id.areSiblings=function(e,t){var n=iy(e),i=iy(t);return e!=n&&t!=i&&n==i},id.normalize=im,id.isSiblingOf=ig,id.isParentOf=ip,id.areLanguageCompatible=ih,id.areLocaleCompatible=function(e,t){return(e=im(e))==(t=im(t))};var ix=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 iT(){}function iS(e,t,n,i,r){if(r.length){var a=e.textStreams;r=u(r);for(var o=r.next(),s={};!o.done;s={ng:void 0},o=r.next())if(s.ng=o.value,(o=a.filter(function(e){return function(t){return!!(t.codecs.startsWith(e.ng)||t.mimeType.startsWith(e.ng))}}(s))).length){a=o;break}e.textStreams=a}if(a=e.variants,(t.length||n.length)&&(a=function(e,t,n){t=u(t);for(var i=t.next(),r={};!i.done;r={Dh:void 0},i=t.next())if(r.Dh=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.Dh)}}(r))).length){e=i;break}for(t=(n=u(n)).next(),i={};!t.done;i={yg:void 0},t=n.next())if(i.yg=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.yg)}}(i))).length){e=t;break}return e}(a,t,n)),i.length){for(t=new Y,a=(n=u(a)).next();!a.done;a=n.next())a=a.value,t.push(String(a.video.width||0),a);var c=[];t.forEach(function(e,t){e=0;var n=[];t=u(t);for(var r=t.next(),a={};!r.done;a={Ke:void 0},r=t.next())a.Ke=r.value,(r=i.filter(function(e){return function(t){return e.Ke.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.Ke]):r==e&&n.push(a.Ke);c.push.apply(c,l(n))}),a=c}for(n=new Set,t=new Set,r=(a=u(a)).next();!r.done;r=a.next())(r=r.value).audio&&n.add(r.audio),r.video&&t.add(r.video);a=Array.from(n).sort(function(e,t){return e.bandwidth-t.bandwidth});var d=[];for(n=new Map,r=(a=u(a)).next();!r.done;r=a.next()){if(o=(r=r.value).language+(r.channelsCount||0)+(r.audioSamplingRate||0)+r.roles.join(",")+r.label+r.groupId+r.fastSwitching,(s=n.get(o)||[]).length){var h=s[s.length-1],p=n3(h.codecs),f=n3(r.codecs);p!=f||r.bandwidth&&h.bandwidth&&!(r.bandwidth>h.bandwidth)||(s.push(r),d.push(r.id))}else s.push(r),d.push(r.id);n.set(o,s)}var g={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};a=Array.from(t).sort(function(e,t){if(!e.bandwidth||!t.bandwidth||e.bandwidth==t.bandwidth){if(e.codecs&&t.codecs&&e.codecs!=t.codecs&&e.width==t.width){var n=n3(e.codecs),i=n3(t.codecs);if(n!=i)return(g[n]||1)-(g[i]||1)}return e.width-t.width}return e.bandwidth-t.bandwidth}),t=ee();var m=[];for(n=new Map,r=(a=u(a)).next();!r.done;r=a.next()){if(o=Math.round((r=r.value).frameRate||0)+(r.hdr||"")+r.fastSwitching,(s=n.get(o)||[]).length){if(h=s[s.length-1],!t&&(p=n3(h.codecs))!==(f=n3(r.codecs)))continue;r.width==h.width&&r.height==h.height?(p=n3(h.codecs))!=(f=n3(r.codecs))||r.bandwidth&&h.bandwidth&&!(r.bandwidth>
1h.bandwidth)||(s.push(r),m.push(r.id)):(r.width>h.width||r.height>h.height||r.bandwidth>h.bandwidth)&&(s.push(r),m.push(r.id))}else s.push(r),m.push(r.id);n.set(o,s)}e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,(!t||!!d.includes(t.id))&&(!e||!!m.includes(e.id))})}function iA(e,t,n){var i,r,a,o,s,l,c,d,h,p=e.video;if(p&&p.width&&p.height){var f,g,m,v,y,b,w,x,T,S=p.width,A=p.height;if(A>S&&(S=(A=u([A,S])).next().value,A=A.next().value),f=S,g=t.minWidth,m=Math.min(t.maxWidth,n.width),!(f>=g)||!(f<=m)||(v=A,y=t.minHeight,b=Math.min(t.maxHeight,n.height),!(v>=y)||!(v<=b))||(w=p.width*p.height,x=t.minPixels,T=t.maxPixels,!(w>=x)||!(w<=T)))return!1}return(!e||!e.video||!e.video.frameRate||(i=e.video.frameRate,r=t.minFrameRate,a=t.maxFrameRate,i>=r&&i<=a))&&(!e||!e.audio||!e.audio.channelsCount||(o=e.audio.channelsCount,s=t.minChannelsCount,l=t.maxChannelsCount,o>=s&&o<=l))&&(c=e.bandwidth,d=t.minBandwidth,h=t.maxBandwidth,c>=d&&c<=h)}function ik(e,t,n,i,r){var a,o;return R(function(s){if(1==s.g)return eG()&&function(e){var t=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=u(e);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(e=(n=u(n)).next();!e.done;e=n.next()){e=e.value,i=u(t);for(var r=i.next();!r.done;r=i.next()){var a=u(r.value);if(r=a.next().value,a=a.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,a);break}}}}(t.variants),b(s,iI(t.variants,n,!1,i),2);a=null,e&&(o=e.h)&&(a=o.keySystem),t.variants=t.variants.filter(function(e){var t=function(e,t,n){if(!e.decodingInfos.some(function(e){return!!e.supported&&(!t||!(e=e.keySystemAccess)||(n[e.keySystem]||e.keySystem)==t)}))return!1;var i=eG(),r=e4("Firefox")&&e1(),a=e.video,o=a&&a.width||0,s=a&&a.height||0;return!(i&&a&&(1920<o||1080<s)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3.")))&&(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")))}(e,a,r);if(!t){var n=[];e.audio&&n.push(iH(e.audio)),e.video&&n.push(iH(e.video))}return t}),w(s)})}function iE(e,t){var n,i,r,a,o,s,l;return R(function(c){if(1==c.g){for(n=function(e,t){if(e){var n=ty(e);return n.supported=e.supported&&t.supported,n.powerEfficient=e.powerEfficient&&t.powerEfficient,n.smooth=e.smooth&&t.smooth,t.keySystemAccess&&!n.keySystemAccess&&(n.keySystemAccess=t.keySystemAccess),n}return t},i=null,r=[],o=(a=u(t)).next(),s={};!o.done;s={cache:void 0,Od:void 0},o=a.next())l=o.value,s.Od=function e(t){if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++){var r=i.toString(),a=t[i];void 0!==a&&(a=e(a))&&n.push(r+":"+a)}t="["+n.join(",")+"]"}else if("function"==typeof t)t="";else if(t instanceof Object){for((i=Object.keys(t)).sort(),n=[],r=(i=u(i)).next();!r.done;r=i.next())r=JSON.stringify(a=r.value),void 0!==(a=t[a])&&(a=e(a))&&n.push(r+":"+a);t="{"+n.join(",")+"}"}else t=JSON.stringify(t);return t}(l),s.cache=iG,s.cache.has(s.Od)?i=n(i,s.cache.get(s.Od)):r.push((function(e){var t=[""];e.video&&(t=n6(e.video.contentType).split(","));var n=[""];e.audio&&(n=n6(e.audio.contentType).split(","));var i=[];t=u(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var a=u(n),o=a.next(),s={};!o.done;s={nc:void 0},o=a.next())o=o.value,s.nc=tv(e),e.video&&(s.nc.video.contentType=nZ(n5(s.nc.video.contentType),r)),e.audio&&(s.nc.audio.contentType=nZ(n5(s.nc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){(e1()?ic(5,navigator.mediaCapabilities.decodingInfo(e.nc)):navigator.mediaCapabilities.decodingInfo(e.nc)).then(function(e){t(e)}).catch(n)}}(s)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})})(l).then(function(e){return function(t){var r=null;t=u(t||[]);for(var a=t.next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache.set(e.Od,r),i=n(i,r))}}(s)));return b(c,Promise.all(r),2)}i&&e.decodingInfos.push(i),w(c)})}function iI(e,t,n,i){var r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x;return R(function(T){switch(T.g){case 1:if(e.some(function(e){return e.decodingInfos.length}))return T.return();a=(r=u(i)).next(),o={};case 2:if(a.done){T.u(4);break}o.fh=a.value,s=!1,c=(l=u(e)).next();case 5:var S;if(c.done){T.u(7);break}p=(h=u(iM(d=c.value,t,n).filter((S=o,function(e){return((e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)===S.fh})))).next();case 8:if(p.done){T.u(10);break}return f=p.value,b(T,iE(d,f),9);case 9:p=h.next(),T.u(8);break;case 10:d.decodingInfos.length&&(s=!0),c=l.next(),T.u(5);break;case 7:if(s)return T.return();o={fh:void 0},a=r.next(),T.u(2);break;case 4:m=(g=u(e)).next();case 12:if(m.done){T.u(0);break}w=(y=u(iM(v=m.value,t,n).filter(function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}))).next();case 15:if(w.done){m=g.next(),T.u(12);break}return x=w.value,b(T,iE(v,x),16);case 16:w=y.next(),T.u(15)}})}function iM(e,t,n){var i=e.audio,r=e.video,a=[],o=[];if(r)for(var s=u(r.fullMimeTypes),l=s.next();!l.done;l=s.next()){var c=n6(l=l.value);if(c.includes(",")&&!i){var d=c.split(","),h=n5(l);c=nq("video",d),d=iC(d=nq("audio",d),h),h=n1(h,d,"audio"),o.push({contentType:h,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(c=iD(c),l={contentType:n1(n5(l),c,"video"),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":l.transferFunction="srgb";break;case"PQ":l.transferFunction="pq";break;case"HLG":l.transferFunction="hlg"}r.colorGamut&&(l.colorGamut=r.colorGamut),a.push(l)}if(i)for(l=(s=u(i.fullMimeTypes)).next();!l.done;l=s.next())l=n5(c=l.value),c=iC(n6(c),l),l=n1(l,c,"audio"),o.push({contentType:l,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(s=[],0==a.length&&a.push(null),0==o.length&&o.push(null),l=(a=u(a)).next();!l.done;l=a.next())for(l=l.value,h=(c=u(o)).next();!h.done;h=c.next())h=h.value,d={type:n?"file":"media-source"},l&&(d.video=l),h&&(d.audio=h),s.push(d);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];for(e=[],n=new Map,a=(o=u(o)).next();!a.done;a=o.next())a=a.value,n.get(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);for(o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],l=(a=u(n.keys())).next();!l.done;l=a.next()){for(l=l.value,h=n.get(l),c=new Map,d=(h=u(h)).next();!d.done;d=h.next()){var p=(d=d.value).videoRobustness+","+d.audioRobustness;c.get(p)||c.set(p,[]),c.get(p).push(d)}
1for(h=(c=u(c.values())).next();!h.done;h=c.next()){h=h.value,d=[],p=u(s);for(var f=p.next();!f.done;f=p.next()){f=Object.assign({},f.value);for(var g={keySystem:l,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},m=u(h),v=m.next();!v.done;v=m.next()){if((v=v.value).initData&&v.initData.length){for(var y=new Set,b=u(v.initData),w=b.next();!w.done;w=b.next())y.add(w.value.initDataType);g.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(g.distinctiveIdentifier="required"),v.persistentStateRequired&&(g.persistentState="required"),v.sessionType&&(g.sessionTypes=[v.sessionType]),i&&(g.audio?(v.encryptionScheme&&(g.audio.encryptionScheme=g.audio.encryptionScheme||v.encryptionScheme),g.audio.robustness=g.audio.robustness||v.audioRobustness):(g.audio={robustness:v.audioRobustness},v.encryptionScheme&&(g.audio.encryptionScheme=v.encryptionScheme)),""==g.audio.robustness&&delete g.audio.robustness),r&&(g.video?(v.encryptionScheme&&(g.video.encryptionScheme=g.video.encryptionScheme||v.encryptionScheme),g.video.robustness=g.video.robustness||v.videoRobustness):(g.video={robustness:v.videoRobustness},v.encryptionScheme&&(g.video.encryptionScheme=v.encryptionScheme)),""==g.video.robustness&&delete g.video.robustness)}f.keySystemConfiguration=g,d.push(f)}e.push(d)}}return e}function iC(e,t){return"flac"==e.toLowerCase()?eY()?"fLaC":"flac":"opus"===e.toLowerCase()?eY()&&"mp4"==n2(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&eq()?"ec-3":e}function iD(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 iR(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 l=[];n&&l.push(n.mimeType),t&&l.push(t.mimeType),l=l[0]||null;var c=[];t&&c.push(t.kind),n&&c.push(n.kind),c=c[0]||null;var d=new Set;if(t)for(var h=u(t.roles),p=h.next();!p.done;p=h.next())d.add(p.value);if(n)for(p=(h=u(n.roles)).next();!p.done;p=h.next())d.add(p.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:l,audioMimeType:i,videoMimeType:r,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(d),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,accessibilityPurpose:null,originalLanguage: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,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,o.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=o.split(",");try{e.videoCodec=nq("video",n),e.audioCodec=nq("audio",n)}catch(e){}}
1return t&&(e.audioId=t.id,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.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage),e}function iP(e){return{id:e.id,active:!1,type:nW,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout: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,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function iL(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=sn(e.segmentIndex));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,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.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,accessibilityPurpose:null,originalLanguage:null}}function iN(e){return e.__shaka_id||(e.__shaka_id=iK++),e.__shaka_id}function ij(e){var t=iU(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 iU(e){var t=e.language;return{id:iN(e),active:!1,type:"",bandwidth:0,language:im(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!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,accessibilityPurpose:null,originalLanguage:t}}function iO(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function i_(e){return e.filter(function(e){return iO(e)})}function iB(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=iw(im(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return im(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=iF(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(is,[])).length?iF(r,e[0]):r}function iF(e,t){return e.filter(function(e){return e.roles.includes(t)})}function iV(e,t){t.length&&(t=t.filter(function(t){return n3(e.codecs)==n3(t.codecs)}).sort(function(e,t){return e.bandwidth&&t.bandwidth&&e.bandwidth!=t.bandwidth?e.bandwidth-t.bandwidth:(e.width||0)-(t.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(t){return e.width==t.width&&e.height==t.height})))&&(e.trickModeVideo=t)}function iH(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("shaka.util.StreamUtils",iT),iT.meetsRestrictions=iA;var iG=new Map,iK=0,iq=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),iz=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function iX(){var t=this;this.G=null,this.o=!1,this.m=new H,this.j=new J,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(t.o&&t.g.useNetworkInformation){t.m=new H,t.g&&t.m.configure(t.g.advanced);var e=t.chooseVariant();e&&navigator.onLine&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.s=null,this.A=new eB(function(){if(t.o&&(t.g.restrictToElementSize||t.g.restrictToScreenSize)){var e=t.chooseVariant();e&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.B=e,"documentPictureInPicture"in e&&this.j.D(e.documentPictureInPicture,"enter",function(){t.B=e.documentPictureInPicture.window,t.A&&t.A.pb(),t.j.qa(t.B,"pagehide",function(){t.B=e,t.A&&t.A.pb()})}),this.C=this.i=null}function iW(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.s-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.s<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function iY(e,t,n,i,r){if(e.C){var a=e.C.Og();a&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a}))}return t&&(n=n.filter(function(e){return iA(e,t,{width:r,height:i})})),n.sort(function(e,t){return e.bandwidth-t.bandwidth})}(c=iX.prototype).stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.s=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},c.release=function(){this.j.release(),this.A=null},c.init=function(e){this.G=e},c.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if((n=this.F.filter(function(e){return e&&!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})).length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(e){return e&&(!!e.audio&&!!e.audio.fastSwitching||!!e.video&&!!e.video.fastSwitching)})),n=iY(this,this.g.restrictions,i,1/0,1/0),1/0!=e||1/0!=t){for(r=(n=u(n=function(e){var t=[];e=u(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(e,t){return e.width-t.width})}(n))).next();!r.done;r=n.next())if((r=r.value).height>=e&&r.width>=t){e=r.height,t=r.width;break}n=iY(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=[(n=iY(this,null,i,1/0,1/0))[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var a=isNaN(this.H)?1:Math.abs(this.H),o=a*r.bandwidth/this.g.bandwidthDowngradeTarget,s={bandwidth:1/0},l=i+1;l<n.length;l++)if(r.bandwidth!=n[l].bandwidth){s=n[l];break}a=a*s.bandwidth/this.g.bandwidthUpgradeTarget,e>=o&&e<=a&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.s=Date.now(),t},c.enable=function(){this.o=!0},c.disable=function(){this.o=!1},c.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&null!=this.s&&this.o&&iW(this))},c.trySuggestStreams=function(){null!=this.s&&this.o&&iW(this)},c.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},c.setVariants=function(e){this.F=e},c.playbackRateChanged=function(e){this.H=e},c.setMediaElement=function(t){function n(){i.A.$(iJ)}var i=this;this.l=t,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in e&&(this.h=new ResizeObserver(n),this.h.observe(this.l)),this.j.D(t,"enterpictureinpicture",function(e){e.pictureInPictureWindow&&(i.i=e.pictureInPictureWindow,i.j.D(i.i,"resize",n))}),this.j.D(t,"leavepictureinpicture",function(){i.i&&i.j.$a(i.i,"resize",n),i.i=null})},c.setCmsdManager=function(e){this.C=e},c.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)},B("shaka.abr.SimpleAbrManager",iX),iX.prototype.configure=iX.prototype.configure,iX.prototype.setCmsdManager=iX.prototype.setCmsdManager,iX.prototype.setMediaElement=iX.prototype.setMediaElement,iX.prototype.playbackRateChanged=iX.prototype.playbackRateChanged,iX.prototype.setVariants=iX.prototype.setVariants,iX.prototype.getBandwidthEstimate=iX.prototype.getBandwidthEstimate,iX.prototype.trySuggestStreams=iX.prototype.trySuggestStreams,iX.prototype.segmentDownloaded=iX.prototype.segmentDownloaded,iX.prototype.disable=iX.prototype.disable,iX.prototype.enable=iX.prototype.enable,iX.prototype.chooseVariant=iX.prototype.chooseVariant,iX.prototype.init=iX.prototype.init,iX.prototype.release=iX.prototype.release,iX.prototype.stop=iX.prototype.stop;var iJ=1;function i$(e,t){var n=iZ();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 iQ(e){var t,n;return R(function(i){if(1==i.g){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new eC(2,7,1010);return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),b(i,new Promise(function(e){new eB(e).$(n/1e3)}),2))}e.h*=e.m,w(i)})}function iZ(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function i0(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function i1(e,t){this.promise=e,this.i=t,this.g=null}function i2(e){return new i1(Promise.reject(e),function(){return Promise.resolve()})}function i3(){var e=Promise.reject(new eC(2,7,7001));return e.catch(function(){}),new i1(e,function(){return Promise.resolve()})}function i4(e){return new i1(Promise.resolve(e),function(){return Promise.resolve()})}function i5(e){return new i1(e,function(){return e.catch(function(){})})}function i6(e){return new i1(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function i8(t,n){if(n)if(n instanceof Map)for(var i=u(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 i9(e){var t,n=new i8(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}B("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),i0.prototype.resolve=function(){},i0.prototype.reject=function(){},i1.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},i1.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},i1.prototype.Ea=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 i0;a.catch(function(){});var o=new eC(2,7,7001);return this.promise.then(n(!0),n(!1)),new i1(a,function(){return i()})},a.Object.defineProperties(i1.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),B("shaka.util.AbortableOperation",i1),i1.prototype.chain=i1.prototype.Ea,i1.prototype.finally=i1.prototype.finally,i1.all=i6,i1.prototype.abort=i1.prototype.abort,i1.notAbortable=i5,i1.completed=i4,i1.aborted=i3,i1.failed=i2,i8.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},i8.prototype.stopImmediatePropagation=function(){this.g=!0},i8.prototype.stopPropagation=function(){},B("shaka.util.FakeEvent",i8);var i7={Cj:"abrstatuschanged",Dj:"adaptation",Ej:"audiotrackchanged",Fj:"buffering",Gj:"complete",Hj:"downloadcompleted",Ij:"downloadfailed",Jj:"downloadheadersreceived",Kj:"drmsessionupdate",Mj:"emsg",fk:"prft",Error:"error",Nj:"expirationupdated",Oj:"firstquartile",Pj:"gapjumped",Sj:"keystatuschanged",Wj:"loaded",Xj:"loading",Zj:"manifestparsed",$j:"manifestupdated",ak:"mediaqualitychanged",bk:"mediasourcerecovered",Metadata:"metadata",ck:"midpoint",dk:"nospatialvideoinfo",ek:"onstatechange",gk:"ratechange",ik:"segmentappended",jk:"sessiondata",kk:"spatialvideoinfo",lk:"stalldetected",mk:"started",nk:"statechanged",pk:"streaming",qk:"textchanged",rk:"texttrackvisibility",sk:"thirdquartile",tk:"timelineregi
1onadded",uk:"timelineregionenter",vk:"timelineregionexit",wk:"trackschanged",yk:"unloading",Ak:"variantchanged"};function re(){this.Ca=new Y,this.Je=this}function rt(){this.g=[]}function rn(e,t){e.g.push(t.finally(function(){eE(e.g,t)}))}function ri(e,t,n,i,r,a,o){re.call(this),this.i=!1,this.s=new rt,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=i||null,this.G=r||null,this.I=a||null,this.H=o||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}function rr(e,t,n,i){i=void 0!==i&&i,n=n||rd;var r=rh.get(e);(!r||n>=r.priority)&&rh.set(e,{priority:n,oe:t,Yi:i})}function ra(e,t){for(var n=u(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=u(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function ro(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 rs(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}function ru(){this.g=0}function rl(e,t,n){i1.call(this,e,t),this.h=n}re.prototype.addEventListener=function(e,t){this.Ca&&this.Ca.push(e,t)},re.prototype.removeEventListener=function(e,t){this.Ca&&this.Ca.remove(e,t)},re.prototype.dispatchEvent=function(e){if(!this.Ca)return!0;var t=this.Ca.get(e.type)||[],n=this.Ca.get("All");for(n&&(t=t.concat(n)),n=(t=u(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Je,e.currentTarget=this.Je;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},re.prototype.release=function(){this.Ca=null},rt.prototype.destroy=function(){for(var e=[],t=u(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)},g(ri,re),(c=ri.prototype).gg=function(e){this.B=e},c.hg=function(e){this.A=e},c.aj=function(e){this.g.add(e)},c.vj=function(e){this.g.delete(e)},c.Rh=function(){this.g.clear()},c.bj=function(e){this.h.add(e)},c.wj=function(e){this.h.delete(e)},c.Sh=function(){this.h.clear()},c.Dg=function(){this.j.clear()},c.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),re.prototype.release.call(this),this.s.destroy()},c.request=function(e,t,n){var i=this,r=new ru;if(this.i){var a=Promise.reject(new eC(2,7,7001));return a.catch(function(){}),new rl(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?tv(t.retryParameters):iZ(),t.uris=tv(t.uris);var o=(a=function(e,t,n,i){function r(e){a=a.Ea(function(){return n.body&&(n.body=ed(n.body)),e(t,n,i)})}var a=i4(void 0);e.G&&r(e.G),e=u(e.g);for(var o=e.next();!o.done;o=e.next())r(o.value);return a.Ea(void 0,function(e){if(e instanceof eC&&7001==e.code)throw e;throw new eC(2,1,1006,e)})}(this,e,t,n)).Ea(function(){return function e(t,n,i,r,a,o,s,u){t.B&&(i.uris[o]=i.uris[o].replace("https://","http://")),t.A&&(i.uris[o]=i.uris[o].replace("http://","https://")),0<o&&t.I&&t.I(n,r,i.uris[o],i.uris[o-1]);var l=new nw(i.uris[o]),c=l.Hb,d=!1;c||(nx(l,c=(c=location.protocol).slice(0,-1)),i.uris[o]=l.toString()),c=c.toLowerCase();var h=(c=rh.get(c))?c.oe:null;if(!h)return i2(new eC(2,1,1e3,l));var p=c.Yi;(l=t.j.get(l.ub))&&(i.headers["common-access-token"]=l);var f,g=null,m=null,v=!1,y=!1;return i5(iQ(a)).Ea(function(){if(t.i)return i3();f=Date.now();var e=0;i.requestStartTime=Date.now();var a=h(i.uris[o],i,n,function(a,o,s){g&&g.stop(),m&&m.$(l/1e3),t.m&&n==rc&&(i.packetNumber=++e,t.m(a,o,rs(r),i),d=!0,u.g=s)},function(e){y=!0,i.timeToFirstByte=Date.now()-i.requestStartTime,t.l&&t.l(e,i,n)},{minBytesForProgressEvents:t.o});if(!p)return a;var s=i.retryParameters.connectionTimeout;s&&(g=new eB(function(){v=!0,a.abort()})).$(s/1e3);var l=i.retryParameters.stallTimeout;return l&&(m=new eB(function(){v=!0,a.abort()})),a}).Ea(function(e){g&&g.stop(),m&&m.stop(),void 0==e.timeMs&&(e.timeMs=Date.now()-f);var r=e.headers["common-access-token"];if(r){var a=new nw(e.uri);t.j.set(a.ub,r)}return r={response:e,Ei:d},!y&&t.l&&t.l(e.headers,i,n),t.C&&t.C(i,e),r},function(l){if(g&&g.stop(),m&&m.stop(),t.F){var c=null,d=0;l instanceof eC&&(c=l,1001==l.code&&(d=l.data[1])),t.F(i,c,d,v)}if(t.i)return i3();if(v&&(l=new eC(1,1,1003,i.uris[o],n)),l instanceof eC){if(7001==l.code)throw l;if(1010==l.code)throw s;if(1==l.severity){if((c=new i8("retry",c=(new Map).set("error",l))).cancelable=!0,t.dispatchEvent(c),c.defaultPrevented)throw l;return o=(o+1)%i.uris.length,e(t,n,i,r,a,o,l,u)}}throw l})}(i,e,t,n,new i$(t.retryParameters,!1),0,null,r)}),s=o.Ea(function(t){var r=i,a=e,o=t,s=n,l=i4(void 0);r=u(r.h);for(var c=r.next(),d={};!c.done;d={ih:void 0},c=r.next())d.ih=c.value,l=l.Ea(function(e){return function(){var t=o.response;return t.data&&(t.data=ed(t.data)),(0,e.ih)(a,t,s)}}(d));return l.Ea(function(){return o},function(e){var t=2;if(e instanceof eC){if(7001==e.code)throw e;t=e.severity}throw new eC(t,1,1007,e)})}),l=Date.now(),c=0;a.promise.then(function(){c=Date.now()-l},function(){});var d=0;o.promise.then(function(){d=Date.now()},function(){});var h=s.Ea(function(r){var a=Date.now()-d,o=r.response;return o.timeMs+=c,o.timeMs+=a,r.Ei||!i.m||o.fromCache||"HEAD"==t.method||e!=rc||i.m(o.timeMs,o.data.byteLength,rs(n)),i.H&&i.H(e,o,n),o},function(e){throw e&&(e.severity=2),e});return a=new rl(h.promise,function(){return h.abort()},r),rn(this.s,a),a},B("shaka.net.NetworkingEngine",ri),ri.prototype.request=ri.prototype.request,ri.prototype.destroy=ri.prototype.destroy,ri.makeRequest=ro,ri.defaultRetryParameters=function(){return iZ()},ri.prototype.clearCommonAccessTokenMap=ri.prototype.Dg,ri.prototype.clearAllResponseFilters=ri.prototype.Sh,ri.prototype.unregisterResponseFilter=ri.prototype.wj,ri.prototype.registerResponseFilter=ri.prototype.bj,ri.prototype.clearAllRequestFilters=ri.prototype.Rh,ri.prototype.unregisterRequestFilter=ri.prototype.vj,ri.prototype.registerRequestFilter=ri.prototype.aj,ri.unregisterScheme=function(e){rh.delete(e)},ri.registerScheme=rr,ri.prototype.setForceHTTPS=ri.prototype.hg,ri.prototype.setForceHTTP=ri.prototype.gg,ri.NumBytesRemainingClass=ru,g(rl,i1),ri.PendingRequest=rl;var rc=1;ri.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},ri.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var rd=3;ri.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var rh=new Map;function rp(e){this.g=!1,this.h=new i0,this.i=e}function rf(e,t){if(e.g){if(t instanceof eC&&7003==t.code)throw t;throw new eC(2,7,7003,t)}}function rg(e,t){var n=[];e=u(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function rm(e){for(var t=new Map,n=u(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function rv(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function ry(e,t){this.h=ef(e),this.i=t==rw,this.g=0}function rb(){return new eC(2,3,3e3)}rp.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()}))},(c=ry.prototype).ta=function(){return this.g<this.h.byteLength},c.xa=function(){return this.g},c.getLength=function(){return this.h.byteLength},c.U=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw rb()}},c.la=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw rb()}},c.R=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw rb()}},c.Vf=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw rb()}},c.Xc=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw rb()}if(2097151<t)throw new eC(2,3,3001);return this.g+=8,0x100000000*t+e},c.Ab=function(e){if(this.g+e>this.h.byteLength)throw rb();var t=eh(this.h,this.g,e);return this.g+=e,t},c.skip=function(e){if(this.g+e>this.h.byteLength)throw rb();this.g+=e},c.jh=function(e){if(this.g<e)throw rb();this.g-=e},c.seek=function(e){if(0>e||e>this.h.byteLength)throw rb();this.g=e},c.zc=function(){for(var e=this.g;this.ta()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=eh(this.h,e,this.g-e),this.g+=1,tn(e)},B("shaka.util.DataViewReader",ry),ry.prototype.readTerminatedString=ry.prototype.zc,ry.prototype.seek=ry.prototype.seek,ry.prototype.rewind=ry.prototype.jh,ry.prototype.skip=ry.prototype.skip,ry.prototype.readBytes=ry.prototype.Ab,ry.prototype.readUint64=ry.prototype.Xc,ry.prototype.readInt32=ry.prototype.Vf,ry.prototype.readUint32=ry.prototype.R,ry.prototype.readUint16=ry.prototype.la,ry.prototype.readUint8=ry.prototype.U,ry.prototype.getLength=ry.prototype.getLength,ry.prototype.getPosition=ry.prototype.xa,ry.prototype.hasMoreData=ry.prototype.ta;var rw=1;function rx(){this.i=new Map,this.h=new Map,this.g=!1}function rT(e){for(var t=rC(e);e.reader.ta()&&!e.parser.g;)e.parser.Uc(e.start+t,e.reader,e.partialOkay)}function rS(e){for(var t=rC(e),n=e.reader.R(),i=0;i<n&&(e.parser.Uc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function rA(e){var t=rC(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Uc(e.start+t,e.reader,e.partialOkay)}function rk(e){var t=rC(e);e.reader.skip(8);var n=e.reader.la();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Uc(e.start+t,e.reader,e.partialOkay)}function rE(e){return function(t){e(t.reader.Ab(t.reader.getLength()-t.reader.xa()))}}function rI(e){var t=0;e=u(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function rM(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function rC(e){return 8+8*!!e.has64BitSize+4*(null!=e.flags)}ry.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(c=rx.prototype).box=function(e,t){return e=rI(e),this.i.set(e,rD),this.h.set(e,t),this},c.S=function(e,t){return e=rI(e),this.i.set(e,rR),this.h.set(e,t),this},c.stop=function(){this.g=!0},c.parse=function(e,t,n){for(e=new ry(e,0),this.g=!1;e.ta()&&!this.g;)this.Uc(0,e,t,n)},c.Uc=function(e,t,n,i){var r=t.xa();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.R(),o=t.R(),s=rM(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.xa()+8>t.getLength()){this.g=!0;return}a=t.Xc(),u=!0}var l=this.h.get(o);if(l){var c=null,d=null;if(this.i.get(o)==rR){if(i&&t.xa()+4>t.getLength()){this.g=!0;return}c=(d=t.R())>>>24,d&=0xffffff}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:l({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new ry(t=0<(i=o-t.xa())?t.Ab(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u})}else t.skip(Math.min(r+a-t.xa(),t.getLength()-t.xa()))}},B("shaka.util.Mp4Parser",rx),rx.headerSize=rC,rx.typeToString=rM,rx.allData=rE,rx.audioSampleEntry=rk,rx.visualSampleEntry=rA,rx.sampleDescription=rS,rx.children=rT,rx.prototype.parseNext=rx.prototype.Uc,rx.prototype.parse=rx.prototype.parse,rx.prototype.stop=rx.prototype.stop,rx.prototype.fullBox=rx.prototype.S,rx.prototype.box=rx.prototype.box;var rD=0,rR=1;function rP(e){var t=this;this.g=[],this.h=[],this.data=[],(new rx).box("moov",rT).box("moof",rT).S("pssh",function(e){if(!(1<e.version)){var n=eh(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(nF(e.reader.Ab(16))),0<e.version){n=e.reader.R();for(var i=0;i<n;i++){var r=nF(e.reader.Ab(16));t.h.push(r)}}}}).parse(e)}function rL(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=ef(o),l=0;if(s.setUint32(l,a),l+=4,s.setUint32(l,0x70737368),l+=4,1>i?s.setUint32(l,0):s.setUint32(l,0x1000000),l+=4,o.set(t,l),l+=t.length,0<i)for(s.setUint32(l,n.size),l+=4,n=(t=u(n)).next();!n.done;n=t.next())n=nB(n.value),o.set(n,l),l+=n.length;return s.setUint32(l,r),o.set(e,l+4),o}function rN(e){var t=this;this.C=e,this.j=this.A=null,this.ja=this.ga=!1,this.H=0,this.h=null,this.o=new J,this.i=new Map,this.W=[],this.B=new Map,this.K=!1,this.m=new i0,this.g=null,this.s=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.ba=new Map,this.ia=new Map,this.L=new eB(function(){var e,n,i;
1return n=(e=t).ba,void((i=e.ia).clear(),n.forEach(function(e,t){return i.set(t,e)}),(n=Array.from(i.values())).length&&n.every(function(e){return"expired"==e})&&e.s(new eC(2,6,6014)),e.C.le(rv(i)))}),this.O=!1,this.M=[],this.aa=!1,this.I=new eB(function(){var e;(e=t).i.forEach(function(t,n){var i=t.Qf,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Qf=r)})}),this.m.catch(function(){}),this.l=new rp(function(){var e;return e=t,R(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,b(t,rW(e),2);case 2:if(!e.j){t.u(3);break}return x(t,4),b(t,e.j.setMediaKeys(null),6);case 6:S(t,5);break;case 4:A(t);case 5:e.j=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.s=function(){},e.C=null,e.da=!1,e.G=null,w(t)}})}),this.da=!1,this.F=this.G=null,this.P=function(){return!1}}function rj(e,t,n,i){i=void 0===i||i,e.B=new Map,n=u(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(r=(n=u(e.g.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.O=0<e.B.size,rU(e,t,i)}function rU(t,n,i){var r,a,o,s,l,c,d,h,p,f,g,m,v,y,w;return R(function(x){if(1==x.g){for(rQ(t.g.clearKeys,n),(r=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}))||!i||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=u(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,rm(t.g.servers)),a=new Set,s=(o=u(n)).next();!s.done;s=o.next())for(c=(l=u(rY(s.value))).next();!c.done;c=l.next())d=c.value,a.add(d);
1for(p=(h=u(a)).next();!p.done;p=h.next())!function(t,n,i,r){var a=t.keySystem;a&&("org.w3.clearkey"!=a||!t.licenseServerUri)&&(n.size&&n.get(a)&&(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.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"))}(p.value,rm(t.g.servers),rm(t.g.advanced||{}),t.g.keySystemsMapping);for(f=function(e,n){var i=[];e=u(e);for(var r=e.next();!r.done;r=e.next()){var a,o=(r=r.value)[n]||t.g.advanced&&t.g.advanced[r.keySystem]&&t.g.advanced[r.keySystem][n]||"";if((a=""==o)&&(a=!!(a=r.keySystem)&&!!a.match(/^com\.widevine\.alpha/)),a&&("audioRobustness"==n?o=[t.g.defaultAudioRobustnessForWidevine]:"videoRobustness"==n&&(o=[t.g.defaultVideoRobustnessForWidevine])),"string"==typeof o)i.push(r);else if(Array.isArray(o))for(0===o.length&&(o=[""]),a=(o=u(o)).next();!a.done;a=o.next()){var s={};i.push(Object.assign({},r,(s[n]=a.value,s)))}}return i},g=new Set,v=(m=u(n)).next();!v.done;v=m.next())(y=v.value).video&&!g.has(y.video)&&(y.video.drmInfos=f(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=f(y.video.drmInfos,"audioRobustness"),g.add(y.video)),y.audio&&!g.has(y.audio)&&(y.audio.drmInfos=f(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=f(y.audio.drmInfos,"audioRobustness"),g.add(y.audio));return g.clear(),b(x,iI(n,t.O,t.da,t.g.preferredKeySystems),2)}return(rf(t.l),r||Object.keys(t.g.servers).length)?(w=rV(t,void 0,n),x.return(r?w:w.catch(function(){}))):(t.ga=!0,x.return(Promise.resolve()))})}function rO(e){var t;return R(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.u(2);break}return b(n,e.G,3);case 3:return rf(e.l),n.return();case 2:return x(n,4),e.G=e.j.setMediaKeys(e.A),b(n,e.G,6);case 6:S(n,5);break;case 4:t=A(n),e.s(new eC(2,6,6003,t.message));case 5:rf(e.l),w(n)}})}function r_(e){var t,n,i;return R(function(r){if(1==r.g)return e.B.size?(e.B.forEach(function(t,n){rK(e,n,t)}),b(r,e.m,3)):r.u(2);if(2!=r.g){if(0<(e.h&&e.h.keyIds||new Set([])).size&&function(e){for(var t=u(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.ba.get(n.value))return!1;return!0}(e))return r.return(e.m);e.K=!1,e.m=new i0,e.m.catch(function(){})}for(n=(t=u((e.h?e.h.initData:[])||[])).next();!n.done;n=t.next())rB(e,(i=n.value).initDataType,i.initData);return rJ(e)&&e.m.resolve(),r.return(e.m)})}function rB(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var i=e.i.values();i=u(i);for(var r=i.next();!r.done;r=i.next())if(ec(n,r.value.initData))return;var a=!1;if(e.B.forEach(function(e){!a&&ec(n,e.initData)&&(a=!0)}),a)return}e.K=!0,0<e.i.size&&rJ(e)&&(e.m.resolve(),e.K=!1,e.m=new i0,e.m.catch(function(){})),function(e,t,n,i){try{var r=e.A.createSession(i)}catch(t){e.s(new eC(2,6,6005,t.message));return}e.o.D(r,"message",function(t){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.aa?e.M.push(t):rq(e,t)}),e.o.D(r,"keystatuseschange",function(t){return rz(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Qf:1/0,qb:null,type:i});try{n=e.g.initDataTransform(n,t,e.h)}catch(n){t=n,n instanceof eC||(t=new eC(2,6,6016,n)),e.s(t);return}e.g.logLicenseExchange&&nO(n),r.generateRequest(t,n).catch(function(t){if(!e.l.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.s(new eC(2,6,6006,t.message,t,i))}})}(e,t,n,e.h.sessionType)}}function rF(e){return Array.from(e=rg(e=e.i.keys(),function(e){return e.sessionId}))}function rV(e,t,n){var i,r,a,o,s,l,c;return R(function(d){switch(d.g){case 1:var h,p,f,g,m,v,y,w,T,k,E,I,M,C,D,P,L;if(i=new Map,n.length){r=function(e,t,n){for(var i=u(t),r=i.next();!r.done;r=i.next()){r=u(rY(r.value));for(var a=r.next();!a.done;a=r.next())a=a.value,n.has(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a)}if(1==n.size&&n.has(""))throw new eC(2,6,6e3);(i=e.g.preferredKeySystems).length||1==(r=rm(e.g.servers)).size&&(i=Array.from(r.keys()));var o=(r=u(i)).next();for(a={};!o.done;a={gh:void 0},o=r.next()){a.gh=o.value,o=u(t);for(var s=o.next();!s.done;s=o.next())if(s=s.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.gh}}(a)))return s.keySystemAccess}for(a=(r=u([!0,!1])).next();!a.done;a=r.next())for(a=a.value,s=(o=u(t)).next();!s.done;s=o.next()){s=u(s.value.decodingInfos);for(var l=s.next();!l.done;l=s.next())if((l=l.value).supported&&l.keySystemAccess){var c=l.keySystemAccess.keySystem;if(!i.includes(c)){var d=n.get(c);for(!d&&e.g.keySystemsMapping[c]&&(d=n.get(e.g.keySystemsMapping[c])),d=(c=u(d)).next();!d.done;d=c.next())if(!!d.value.licenseServerUri==a)return l.keySystemAccess}}}return null}(e,n,i),d.u(2);break}return b(d,(h=e,p=t,R(function(e){switch(e.g){case 1:if(1==p.size&&p.has(""))throw new eC(2,6,6e3);
1for(m=(g=u(p.values())).next();!m.done;m=g.next())0==(v=m.value).audioCapabilities.length&&delete v.audioCapabilities,0==v.videoCapabilities.length&&delete v.videoCapabilities;w=(y=u(h.g.preferredKeySystems)).next();case 2:if(w.done){e.u(4);break}if(T=w.value,!p.has(T)){e.u(3);break}return k=p.get(T),x(e,6),b(e,navigator.requestMediaKeySystemAccess(T,[k]),8);case 8:return f=e.h,e.return(f);case 6:A(e);case 7:rf(h.l);case 3:w=y.next(),e.u(2);break;case 4:I=(E=u([!0,!1])).next();case 9:if(I.done){e.u(11);break}M=I.value,D=(C=u(p.keys())).next();case 12:if(D.done){I=E.next(),e.u(9);break}if(P=D.value,(L=p.get(P)).drmInfos.some(function(e){return!!e.licenseServerUri})!=M){e.u(13);break}return x(e,15),b(e,navigator.requestMediaKeySystemAccess(P,[L]),17);case 17:return f=e.h,e.return(f);case 15:A(e);case 16:rf(h.l);case 13:D=C.next(),e.u(12);break;case 11:return e.return(f)}})),3);case 3:r=d.h;case 2:if(!(a=r)){if(!navigator.requestMediaKeySystemAccess)throw new eC(2,6,6020);throw new eC(2,6,6001)}if(rf(e.l),x(d,4),a.getConfiguration(),o=e.g.keySystemsMapping[a.keySystem]||a.keySystem,n.length){var N,j,U,O=o,_=i.get(o),B=[],F=[],V=[],H=[],G=[],K=new Set,q=new Set;r$(_,B,F,H,V,G,K,q);var z=e.O?"persistent-license":"temporary";for(O={keySystem:O,encryptionScheme:B[0],licenseServerUri:F[0],distinctiveIdentifierRequired:_[0].distinctiveIdentifierRequired,persistentStateRequired:_[0].persistentStateRequired,sessionType:_[0].sessionType||z,audioRobustness:_[0].audioRobustness||"",videoRobustness:_[0].videoRobustness||"",serverCertificate:H[0],serverCertificateUri:V[0],initData:G,keyIds:K},0<q.size&&(O.keySystemUris=q),q=(_=u(_)).next();!q.done;q=_.next())(q=q.value).distinctiveIdentifierRequired&&(O.distinctiveIdentifierRequired=q.distinctiveIdentifierRequired),q.persistentStateRequired&&(O.persistentStateRequired=q.persistentStateRequired);_=O}else _=o,q=t.get(o),O=[],B=[],F=[],V=[],H=[],G=new Set,r$(q.drmInfos,O,B,V,F,H,G),_={keySystem:_,encryptionScheme:O[0],licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==q.distinctiveIdentifier,persistentStateRequired:"required"==q.persistentState,sessionType:q.sessionTypes[0]||"temporary",audioRobustness:(q.audioCapabilities?q.audioCapabilities[0].robustness:"")||"",videoRobustness:(q.videoCapabilities?q.videoCapabilities[0].robustness:"")||"",serverCertificate:V[0],serverCertificateUri:F[0],initData:H,keyIds:G};if(e.h=_,!e.h.licenseServerUri)throw new eC(2,6,6012,e.h.keySystem);return b(d,a.createMediaKeys(),6);case 6:if(s=d.h,rf(e.l),e.A=s,!(""!=e.g.minHdcpVersion&&"getStatusForPolicy"in e.A)){d.u(7);break}return x(d,8),b(d,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if("usable"!=d.h)throw new eC(2,6,6018);rf(e.l),S(d,7,4);break;case 8:if((l=A(d,4))instanceof eC)throw l;throw new eC(2,6,6019,l.message);case 7:return e.ga=!0,b(d,(N=e,R(function(e){switch(e.g){case 1:if(!N.A||!N.h)return e.return();if(!N.h.serverCertificateUri||N.h.serverCertificate&&N.h.serverCertificate.length){e.u(2);break}return j=ro([N.h.serverCertificateUri],N.g.retryParameters),x(e,3),b(e,N.C.Sb.request(5,j,{isPreload:N.P()}).promise,5);case 5:U=e.h,N.h.serverCertificate=eh(U.data),S(e,4);break;case 3:throw new eC(2,6,6017,A(e));case 4:if(N.l.g)return e.return();case 2:if(!N.h.serverCertificate||!N.h.serverCertificate.length)return e.return();return x(e,6),b(e,N.A.setServerCertificate(N.h.serverCertificate),8);case 8:S(e,0);break;case 6:throw new eC(2,6,6004,A(e).message)}})),11);case 11:rf(e.l),S(d,0);break;case 4:if(c=A(d),rf(e.l,c),e.h=null,c instanceof eC)throw c;throw new eC(2,6,6002,c.message)}})}function rH(e){rJ(e)&&e.m.resolve()}function rG(e,t){new eB(function(){t.loaded=!0,rH(e)}).$(r0)}function rK(e,t,n){var i,r,a,o,s,u,l;return R(function(c){switch(c.g){case 1:try{i=e.A.createSession("persistent-license")}catch(t){return r=new eC(2,6,6005,t.message),e.s(r),c.return(Promise.reject(r))}return e.o.D(i,"message",function(t){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.aa?e.M.push(t):rq(e,t)}),e.o.D(i,"keystatuseschange",function(t){return rz(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Qf:1/0,qb:null,type:"persistent-license"},e.i.set(i,a),x(c,2),b(c,i.load(t),4);case 4:return o=c.h,rf(e.l),o||(e.i.delete(i),s=e.g.persistentSessionOnlinePlayback?1:2,e.s(new eC(s,6,6013)),a.loaded=!0),rG(e,a),rH(e),c.return(i);case 2:u=A(c),rf(e.l,u),e.i.delete(i),l=e.g.persistentSessionOnlinePlayback?1:2,e.s(new eC(l,6,6005,u.message)),a.loaded=!0,rH(e);case 3:return c.return(Promise.resolve())}})}function rq(e,t){var n,i,r,a,o,s,l,c,d,h,p,f,g;R(function(m){switch(m.g){case 1:if(n=t.target,e.g.logLicenseExchange&&nO(t.message),i=e.i.get(n),r=e.h.licenseServerUri,a=e.g.advanced[e.h.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=ro([r],e.g.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.h,i&&(o.initData=i.initData,o.initDataType=i.initDataType),a&&a.headers)for(s in a.headers)o.headers[s]=a.headers[s];if("org.w3.clearkey"===e.h.keySystem){var v=o,y=e.h;try{var T=tr(v.body);if(T){var k=JSON.parse(T);k.type||(k.type=y.sessionType,v.body=ta(JSON.stringify(k)))}}catch(e){}}if(eN(e.h.keySystem))if((v=ti(o.body,!0,!0)).includes("PlayReadyKeyMessage")){for(T=(y=u(y=tI(v=tw(v,"PlayReadyKeyMessage"),"HttpHeader"))).next();!T.done;T=y.next())T=tI(k=T.value,"name")[0],k=tI(k,"value")[0],o.headers[tk(T)]=tk(k);o.body=n_(tk(v=tI(v,"Challenge")[0]))}else o.headers["Content-Type"]="text/xml; charset=utf-8";return l=Date.now(),x(m,2),d=e.C.Sb.request(2,o,{isPreload:e.P()}),e.W.push(d),b(m,d.promise,4);case 4:c=m.h,eE(e.W,d),S(m,3);break;case 2:if(h=A(m),e.l.g)return m.return();return p=new eC(2,6,6007,h),1==e.i.size?(e.s(p),i&&i.qb&&i.qb.reject(p)):(i&&i.qb&&i.qb.reject(p),e.i.delete(n),rJ(e)&&(e.m.resolve(),e.L.$(.1))),m.return();case 3:if(e.l.g)return m.return();return e.H+=(Date.now()-l)/1e3,e.g.logLicenseExchange&&nO(c.data),x(m,5),b(m,n.update(c.data),7);case 7:S(m,6);break;case 5:return f=new eC(2,6,6008,A(m).message),e.s(f),i&&i.qb&&i.qb.reject(f),m.return();case 6:if(e.l.g)return m.return();g=new i8("drmsessionupdate"),e.C.onEvent(g),i&&(i.qb&&i.qb.resolve(),rG(e,i
1)),w(m)}})}function rz(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(eN(e.h.keySystem)&&16==r.byteLength&&(eH()||e$()||e4("sony.hbbtv.tv.G5"))){var o=(a=ef(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=nF(r).slice(0,32),e.ba.set(r,t)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.qb&&(e.i.delete(t),rX(t)),rJ(e)&&(e.m.resolve(),e.L.$(r1))}function rX(e){return R(function(t){return 1==t.g?(x(t,2),b(t,ic(rZ,Promise.all([e.close().catch(function(){}),e.closed])),4)):2!=t.g?S(t,0):void(A(t),w(t))})}function rW(e){var t;return R(function(n){return t=Array.from(e.i.entries()),e.i.clear(),b(n,Promise.all(t.map(function(t){var n=(t=u(t)).next().value,i=t.next().value;return R(function(t){return 1==t.g?(x(t,2),e.ja||e.B.has(n.sessionId)||"persistent-license"!==i.type||e.g.persistentSessionOnlinePlayback?b(t,rX(n),5):b(t,n.remove(),5)):2!=t.g?S(t,0):void(A(t),w(t))})})),0)})}function rY(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function rJ(e){var t,n=e=e.i.values();n=u(n);for(var i=n.next();!i.done;i=n.next()){if(!(t=i.value).loaded)return!1}return!0}function r$(t,n,i,r,a,o,s,c){var d=[];t=u(t);for(var h=t.next(),p={};!h.done;p={va:void 0},h=t.next()){if(p.va=h.value,n.includes(p.va.encryptionScheme)||n.push(p.va.encryptionScheme),"org.w3.clearkey"==p.va.keySystem&&p.va.licenseServerUri.startsWith("data:application/json;base64,")?d.includes(p.va.licenseServerUri)||d.push(p.va.licenseServerUri):i.includes(p.va.licenseServerUri)||i.push(p.va.licenseServerUri),a.includes(p.va.serverCertificateUri)||a.push(p.va.serverCertificateUri),p.va.serverCertificate&&(r.some(function(e){return function(t){return ec(t,e.va.serverCertificate)}}(p))||r.push(p.va.serverCertificate)),p.va.initData){h=u(p.va.initData);for(var f=h.next(),g={};!f.done;g={Ff:void 0},f=h.next())g.Ff=f.value,o.some(function(e){return function(t){var n=e.Ff;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&ec(t.initData,n.initData)}}(g))||o.push(g.Ff)}if(p.va.keyIds)for(f=(h=u(p.va.keyIds)).next();!f.done;f=h.next())s.add(f.value);if(p.va.keySystemUris&&c)for(h=(p=u(p.va.keySystemUris)).next();!h.done;h=p.next())c.add(h.value)}if(1==d.length)i.push(d[0]);else if(0<d.length){for(n=[],r=(d=u(d)).next();!r.done;r=d.next())r=JSON.parse(r=e.atob(r.value.split("data:application/json;base64,").pop())),n.push.apply(n,l(r.keys));d=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(d))}}function rQ(e,t){if(0!=(e=rm(e)).size){e=nK(e),t=u(t);for(var n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}(c=rN.prototype).destroy=function(){return this.l.destroy()},c.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.ua(this.g.updateExpirationTime)},c.Ib=function(e){var t,n=this;return R(function(i){if(1==i.g)return n.j===e?i.return():n.A?(n.j=e,n.o.qa(n.j,"play",function(){for(var e=u(n.M),t=e.next();!t.done;t=e.next())rq(n,t.value);n.aa=!0,n.M=[]}),n.j.remote?(n.o.D(n.j.remote,"connect",function(){return rW(n)}),n.o.D(n.j.remote,"connecting",function(){return rW(n)}),n.o.D(n.j.remote,"disconnect",function(){return rW(n)})):"webkitCurrentPlaybackTargetIsWireless"in n.j&&n.o.D(n.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rW(n)}),n.F=n.h&&n.h.initData.find(function(e){return 0<e.initData.length})||null,(t=n.h.keySystem).startsWith("com.microsoft.playready.recommendation")||"com.apple.fps"==t||!(n.F||n.B.size||n.g.parseInbandPsshEnabled)?(n.o.D(n.j,"encrypted",function(e){var t,i;return t=n,i=e,R(function(e){if(1==e.g)return b(e,rO(t),2);rB(t,i.initDataType,eh(i.initData)),w(e)})}),i.u(2)):b(i,rO(n),2)):(n.o.qa(e,"encrypted",function(){n.s(new eC(2,6,6010))}),i.return());r_(n).catch(function(){}),w(i)})},c.yf=function(){var e=this,t=this.i.keys();return Array.from(t=rg(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}))},c.kd=function(){var e=1/0,t=this.i.keys();t=u(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},c.Wd=function(){return rv(this.ia)};var rZ=1,r0=5,r1=.5;function r2(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=u(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function r3(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(e){return n4(e)}),t=t.codecs.split(",").map(function(e){return n4(e)}),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 r4(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=u(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function r5(){}function r6(){this.g=r9,this.i=(new Map).set(r9,2).set(r8,1),this.h=0}r2.prototype.add=function(e,t){var n,i=this.h;
1if(t=void 0===t||t,!(n=!!i.audio!=!!e.audio||!!i.video!=!!e.video||i.language!=e.language)&&(n=i.audio&&e.audio)){n=i.audio;var r=e.audio;n=!(!((!n.channelsCount||!r.channelsCount||2<n.channelsCount||2<r.channelsCount)&&n.channelsCount!=r.channelsCount||n.spatialAudio!==r.spatialAudio||t&&!r3(n,r))&&r4(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||r3(i,n))&&r4(i.roles,n.roles))),!n&&(this.g.add(e),!0)},r2.prototype.values=function(){return this.g.values()},B("shaka.media.AdaptationSet",r2),B("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),r5.prototype.create=function(){},r5.prototype.configure=function(){},B("shaka.media.AdaptationSetCriteria",r5);var r8=0,r9=1;function r7(e,t,n){this.g=e,this.i=t,this.h=n}function ae(e,t){return R(function(n){if(1==n.g){var i,r,a,o;return b(n,(i=e.h,r=t,a=e.g.drm.preferredKeySystems,o=e.g.drm.keySystemsMapping,a=void 0===a?[]:a,o=void 0===o?{}:o,R(function(e){var t,n,s,l,c,d,h,p,f;return 1==e.g?b(e,ik(i,r,0<r.offlineSessionIds.length,a,o),2):((t=r).textStreams=t.textStreams.filter(function(e){return ir(e=nZ(e.mimeType,e.codecs))}),b(e,(n=r,R(function(e){switch(e.g){case 1:s=[],c=(l=u(n.imageStreams)).next();case 2:var t;if(c.done){e.u(4);break}if("application/mp4"==(h=(d=c.value).mimeType)&&"mjpg"==d.codecs&&(h="image/jpg"),iq.has(h)){e.u(5);break}if(!(p=iz.get(h))){iq.set(h,!1),e.u(5);break}return b(e,(t=p,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:f=e.h,iq.set(h,f);case 5:iq.get(h)&&s.push(d),c=l.next(),e.u(2);break;case 4:n.imageStreams=s,w(e)}})),0))})),2)}if(e.g.streaming.dontChooseCodecs||iS(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(iO))throw new eC(2,4,4032);return n.return(an(e,t))})}function at(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=u(t.variants);for(var r=t.next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=iA(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function an(e,t){var n=at(e,t);if(t){var i=e.h?e.h.h:null;if(i&&e.h.A){for(var r=new Set,a=u(t.variants),o=a.next();!o.done;o=a.next())(o=o.value).audio&&r.add(o.audio),o.video&&r.add(o.video);for(a=(r=u(r)).next();!a.done;a=r.next())ai(e,i.keySystem,a.value)}ar(e,t)}return n}function ai(e,t,n){n=u(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){i=u(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,rB(e.h,r.initDataType,r.initData)}}function ar(e,t){var n=Object.keys(e=e.h?e.h.Wd():{});n=n.length&&"00"==n[0];var i=!1,r=!1,a=new Set,o=new Set,s=new Set;t=u(t.variants);for(var l=t.next();!l.done;l=t.next())(l=l.value).audio&&s.add(l.audio),l.video&&s.add(l.video),l.allowedByApplication?l.allowedByKeySystem&&(i=!0):r=!0;for(t=(s=u(s)).next();!t.done;t=s.next())if((t=t.value).keyIds.size)for(l=(t=u(t.keyIds)).next();!l.done;l=t.next()){l=l.value;var c=e[n?"00":l];c?aa.includes(c)&&o.add(c):a.add(l)}if(!i)throw new eC(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var aa=["output-restricted","internal-error"];function ao(){}function as(e,t){al.set(e,t)}function au(e,t){if(t){var n=al.get(t.toLowerCase());if(n)return n}throw new eC(2,4,4e3,e,t)}B("shaka.media.ManifestParser",ao),ao.unregisterParserByMime=function(e){al.delete(e)},ao.registerParserByMime=as,ao.registerParserByExtension=function(){ei("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ao.AccessibilityPurpose={zk:"visually impaired",Qj:"hard of hearing"};var al=new Map;function ac(e){if(!ax){ax=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]);aL=aw("ftyp",t,new Uint8Array([0,0,0,1]),t,n),t=aw("dref",aN),aj=aw("dinf",t)}this.g=e}function ad(e){for(var t=[],n=u(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=aw;var s=o.id+1,c=o.stream.width||0,d=o.stream.height||0;"audio"==o.type&&(d=c=0);var h=o.duration*o.timescale,p=Math.floor(h/(aT+1));switch(h=Math.floor(h%(aT+1)),s=aw("tkhd",s=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(l(av(s,4)),[0,0,0,0],l(av(p,4)),l(av(h,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],l(av(c,2)),[0,0],l(av(d,2)),[0,0]))),c=aw,d=Math.floor((p=o.duration*o.timescale)/(aT+1)),p=Math.floor(p%(aT+1)),h=(h=o.stream.language).charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96,d=aw("mdhd",d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(l(av(o.timescale,4)),l(av(d,4)),l(av(p,4)),l(av(h,2)),[0,0]))),p=o,h=new Uint8Array([]),p.type){case"video":h=aA;break;case"audio":h=ak}p=aw("hdlr",h);e:{switch(o.type){case"video":o=aw("minf",aw("vmhd",aD),aj,ah(o));break e;case"audio":o=aw("minf",aw("smhd",aR),aj,ah(o));break e}o=new Uint8Array([])}i=i("trak",s,o=c("mdia",d,p,o)),a.call(r,i)}for(t=nV.apply(nj,l(t)),a=e.g[0],n=aw,r=Math.floor((i=a.duration*a.timescale)/(aT+1)),i=Math.floor(i%(aT+1)),r=aw("mvhd",r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(l(av(a.timescale,4)),l(av(r,4)),l(av(i,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))),i=[],c=(e=u(e.g)).next();!c.done;c=e.next())s=(o=i).push,c=aw("trex",c=new Uint8Array([0,0,0,0].concat(l(av(c.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),s.call(o,c);if(e=aw("mvex",e=nV.apply(nj,l(i))),i=[],a.encrypted){for(o=(a=u(a.stream.drmInfos)).next();!o.done;o=a.next())if((o=o.value).initData)for(s=(o=u(o.initData)).next();!s.done;s=o.next())i.push(s.value.initData);a=nV.apply(nj,l(i))}else a=new Uint8Array([]);return e=n("moov",r,t,e,a),(t=new Uint8Array(aL.byteLength+e.byteLength)).set(aL),t.set(e,aL.byteLength),t}function ah(e){var t="aac";e.codecs.includes("mp3")?t="mp3":e.codecs.includes("ac-3")?t=eq()?"ec-3":"ac-3":e.codecs.includes("ec-3")?t="ec-3":e.codecs.includes("opus")&&(t="opus");var n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(t=e.stream.width||0,n=e.stream.height||0,0<e.za.byteLength)var i=aw("avcC",e.za);else{i=aw;for(var r=7,a=[],o=[],s=0,u=0,c=0,d=0;d<e.jb.length;d++){var h=ay(e.jb[d]);switch(31&h[0]){case 7:a.push(h),r+=h.length+2;break;case 8:o.push(h),r+=h.length+2}}
1for(0<a.length&&(s=a[0][1],c=a[0][2],u=a[0][3]),r=new Uint8Array(r),d=0,r[d++]=1,r[d++]=s,r[d++]=c,r[d++]=u,r[d++]=255,r[d++]=224|a.length,s=0;s<a.length;s++)r[d++]=(65280&a[s].length)>>8,r[d++]=255&a[s].length,r.set(a[s],d),d+=a[s].length;for(r[d++]=o.length,a=0;a<o.length;a++)r[d++]=(65280&o[a].length)>>8,r[d++]=255&o[a].length,r.set(o[a],d),d+=o[a].length;i=i("avcC",r)}t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(l(av(t,2)),l(av(n,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),n="avc1",o=ap(e),a=new Uint8Array([]),e.encrypted&&(a=ag(0,e.stream,e.codecs),n="encv"),n=aw(n,t,i,o,a)}else e.codecs.includes("hvc1")&&(n=e.stream.width||0,i=e.stream.height||0,t=new Uint8Array([]),0<e.za.byteLength&&(t=aw("hvcC",e.za)),n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(l(av(n,2)),l(av(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="hvc1",o=ap(e),a=new Uint8Array([]),e.encrypted&&(a=ag(0,e.stream,e.codecs),i="encv"),n=aw(i,n,t,o,a));break;case"audio":"mp3"==t?e=aw(".mp3",af(e)):("ac-3"==t?(t=aw("dac3",e.ra),n="ac-3"):"ec-3"==t?(t=aw("dec3",e.ra),n="ec-3"):"opus"==t?(t=aw("dOps",e.ra),n="Opus"):(0<e.ra.byteLength?t=aw("esds",e.ra):(t=aw,n=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,s=nq("audio",e.codecs.split(",")),o=(u={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12})[a],("mp4a.40.5"===s||"mp4a.40.29"===s)&&(o=u[2*a]),a=parseInt(s.split(".").pop(),10),t=t("esds",n=new Uint8Array([0,0,0,0,3,25].concat(l(av(n,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,a<<3|o>>>1,o<<7|i<<3,6,1,2])))),n="mp4a"),i=new Uint8Array([]),e.encrypted&&(i=ag(0,e.stream,e.codecs),n="enca"),e=aw(n,af(e),t,i)),n=e}return e=aw("stsd",aP,n),aw("stbl",e,aw("stts",aE),aw("stsc",aI),aw("stsz",aC),aw("stco",aM))}function ap(e){if(!e.Fa&&!e.Ha)return new Uint8Array([]);var t=e.Ha;return aw("pasp",e=new Uint8Array([].concat(l(av(e.Fa,4)),l(av(t,4)))))}function af(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(l(av(e.stream.audioSamplingRate||44100,2)),[0,0]))}function ag(e,t,n){e=aw,n=aw("frma",n=new Uint8Array([].concat(l(av(ab(n.split(".")[0]),4)))));var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=aw("schm",i=new Uint8Array([0,0,0,0].concat(l(av(ab(i),4)),[0,1,0,0]))),r=aw;var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=u(t.drmInfos);for(var o=t.next();!o.done;o=t.next())if((o=o.value)&&o.keyIds&&o.keyIds.size){o=u(o.keyIds);for(var s=o.next();!s.done;s=o.next())a=ay(s.value)}return e("sinf",n,i,r("schi",t=aw("tenc",t=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function am(e){var t=[];e=u(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i,r,a=t.push,o=a.apply,s=aw,c=new Uint8Array([0,0,0,0].concat(l(av(n.data?n.data.Bb:0,4))));c=aw("mfhd",c);var d=n.data?n.data.hb:[],h=new Uint8Array(4+d.length);for(r=0;r<d.length;r++){var p=d[r].flags;h[r+4]=p.Ua<<4|p.Wa<<2|p.Va}var f=(d=aw("sdtp",h)).length+92;h=aw,r=aw("tfhd",r=new Uint8Array([0,0,0,58].concat(l(av(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])));var g=Math.floor((p=n.data?n.data.baseMediaDecodeTime:0)%(aT+1));p=aw("tfdt",p=new Uint8Array([1,0,0,0].concat(l(av(Math.floor(p/(aT+1)),4)),l(av(g,4)))));var m=f,v=12+16*(g=(f=n.data?n.data.hb:[]).length),y=new Uint8Array(v);for(m+=8+v,y.set([+("video"===n.type),0,15,1].concat(l(av(g,4)),l(av(m,4))),0),m=0;m<g;m++){var b=f[m];v=av(b.duration,4);var w=av(b.size,4),x=b.flags;b=av(b.bb,4),y.set([].concat(l(v),l(w),[x.fb<<2|x.Ua,x.Wa<<6|x.Va<<4|x.gb,61440&x.Ta,15&x.Ta],l(b)),12+16*m)}s=s("moof",c,d=h("traf",r,p,f=aw("trun",y),d)),o.call(a,t,[s,(i=((i=n).data?i.data.hb:[]).map(function(e){return e.data}),aw("mdat",i=nV.apply(nj,l(i))))])}return nV.apply(nj,l(t))}function av(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function ay(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function ab(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function aw(e){var t=P.apply(1,arguments),n=aS.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],aS.set(e,n));for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;
1for((r=new Uint8Array(i))[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var ax=!1,aT=0xffffffff,aS=new Map,aA=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ak=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),aE=new Uint8Array([0,0,0,0,0,0,0,0]),aI=new Uint8Array([0,0,0,0,0,0,0,0]),aM=new Uint8Array([0,0,0,0,0,0,0,0]),aC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),aD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),aR=new Uint8Array([0,0,0,0,0,0,0,0]),aP=new Uint8Array([0,0,0,0,0,0,0,1]),aL=new Uint8Array([]),aN=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),aj=new Uint8Array([]);function aU(e,t,n){0!=(t=(e=ef(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,0|n)):e.setUint32(0,n))}function aO(e,t,n,i,r,a,o,s){this.N=e,this.startByte=t,this.endByte=n,this.Sc=void 0===i?null:i,this.timescale=void 0===r?null:r,this.g=void 0===a?null:a,this.aesKey=void 0===o?null:o,this.mimeType=this.codecs=null,this.encrypted=void 0!==s&&s}function a_(e,t){return e===t||(e&&t?e.$b()==t.$b()&&e.Yb()==t.Yb()&&eM(e.N().sort(),t.N().sort())&&ec(e.Fb(),t.Fb()):e==t)}function aB(e,t,n,i,r,a,o,s,l,c,d,h,p,f,g,m){for(c=void 0===c?[]:c,f=void 0===f?aF:f,this.startTime=e,this.j=this.endTime=t,this.C=n,this.startByte=i,this.endByte=r,this.ca=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=l,this.g=c,this.tilesLayout=void 0===d?"":d,this.B=void 0===h?null:h,this.h=void 0===p?null:p,this.status=f,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=void 0===g?null:g,this.thumbnailSprite=null,this.i=-1,this.A=void 0!==m&&m,this.F=this.o=!1,t=(e=u(this.g)).next();!t.done;t=e.next())t.value.Zg();this.A&&this.g.length&&this.g[this.g.length-1].Yg(),this.s=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}aO.prototype.$b=function(){return this.startByte},aO.prototype.Yb=function(){return this.endByte},aO.prototype.Hd=function(e){this.g=e},aO.prototype.Fb=function(){return this.g},B("shaka.media.InitSegmentReference",aO),aO.prototype.getEndByte=aO.prototype.Yb,aO.prototype.getStartByte=aO.prototype.$b,(c=aB.prototype).N=function(){return this.C()},c.getStartTime=function(){return this.startTime},c.ei=function(){return this.endTime},c.$b=function(){return this.startByte},c.Yb=function(){return this.endByte},c.zi=function(){return this.tilesLayout},c.yi=function(){return this.B},c.ac=function(){return this.status},c.Ri=function(){this.status=aV},c.Nf=function(){this.preload=!0},c.isPreload=function(){return this.preload},c.Rc=function(){this.l=!1},c.Ji=function(){return this.l},c.Zg=function(){this.o=!0},c.Li=function(){return this.o},c.Yg=function(){this.F=!0},c.Ki=function(){return this.F},c.Xg=function(){this.m=!0},c.Fi=function(){return this.m},c.ye=function(e){this.thumbnailSprite=e},c.wi=function(){return this.thumbnailSprite},c.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=u(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},c.lg=function(e){null==this.h?K("Sync attempted without sync time!"):.001<=Math.abs(e=this.h-e-this.startTime)&&this.offset(e)},c.Hd=function(e,t){this.s=e,this.G=void 0!==t&&t},c.Fb=function(e){var t=this.s;return(void 0===e||e)&&this.G&&(this.s=null),t},B("shaka.media.SegmentReference",aB),aB.prototype.getSegmentData=aB.prototype.Fb,aB.prototype.setSegmentData=aB.prototype.Hd,aB.prototype.syncAgainst=aB.prototype.lg,aB.prototype.offset=aB.prototype.offset,aB.prototype.getThumbnailSprite=aB.prototype.wi,aB.prototype.setThumbnailSprite=aB.prototype.ye,aB.prototype.hasByterangeOptimization=aB.prototype.Fi,aB.prototype.markAsByterangeOptimization=aB.prototype.Xg,aB.prototype.isLastPartial=aB.prototype.Ki,aB.prototype.markAsLastPartial=aB.prototype.Yg,aB.prototype.isPartial=aB.prototype.Li,aB.prototype.markAsPartial=aB.prototype.Zg,aB.prototype.isIndependent=aB.prototype.Ji,aB.prototype.markAsNonIndependent=aB.prototype.Rc,aB.prototype.isPreload=aB.prototype.isPreload,aB.prototype.markAsPreload=aB.prototype.Nf,aB.prototype.markAsUnavailable=aB.prototype.Ri,aB.prototype.getStatus=aB.prototype.ac,aB.prototype.getTileDuration=aB.prototype.yi,aB.prototype.getTilesLayout=aB.prototype.zi,aB.prototype.getEndByte=aB.prototype.Yb,aB.prototype.getStartByte=aB.prototype.$b,aB.prototype.getEndTime=aB.prototype.ei,aB.prototype.getStartTime=aB.prototype.getStartTime,aB.prototype.getUris=aB.prototype.N;var aF=0,aV=1;function aH(e){return 1==e.length&&1e-4>e.end(0)-e.start(0)}function aG(e){return!e||aH(e)?null:e.length?e.end(e.length-1):null}function aK(e,t){return!(!e||!e.length||aH(e)||t>e.end(e.length-1))&&t>=e.start(0)}function aq(e,t){if(!e||!e.length||aH(e))return 0;var n=0;e=u(az(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 az(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 aX(){}function aW(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function aY(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function aJ(){}function a$(e,t){return 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]||!1}function aQ(e,t){return 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]||!1}function aZ(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 a0(e){for(var t=0,n=[];a$(e,t);){var i=aZ(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=aZ(r,4);(a=function(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===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=tn(eh(e.data,1,n)),r=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o,s=tn(eh(e.data,3+n,a));return o="--\x3e"===i?tn(eh(e.data,4+n+a)):ed(e.data.subarray(4+n+a)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=o,t}return"TXXX"===e.type||"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=tn(eh(e.data,1,i)),e=tn(eh(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?2>e.size||-1===(n=e.data.indexOf(0))?null:(t.description=n=tn(eh(e.data,0,n)),"com.apple.streaming.transportStreamTimestamp"==n?(e=1&(n=e.data.subarray(n.length+1))[3],n=((n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7])/45,e&&(n+=47721858.84),t.data=n):t.data=e=ed(e.data.subarray(n.length+1)),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(t.data=e=tn(e.data.subarray(1)).replace(/\0*$/,""),t):"W"===e.type[0]?(t.data=e=tn(e.data).replace(/\0*$/,""),t):e.data?(t.data=ed(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}aQ(e,t)&&(t+=10)}return n}function a1(e,t){for(var n=t=void 0===t?0:t,i=0;a$(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=aZ(e,t+6),aQ(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}function a2(e,t){var n=null,i=null,r=null,a=e.R();return 1&t&&(r=e.Xc()),2&t&&e.skip(4),8&t&&(n=e.R()),16&t&&(i=e.R()),{trackId:a,gd:n,hd:i,Bk:r}}function a3(e,t){return 1==t?{baseMediaDecodeTime:0x100000000*(t=e.R())+(e=e.R())}:{baseMediaDecodeTime:e.R()}}
1function a4(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.R(),e.skip(4),{timescale:t,language:String.fromCharCode(((e=e.la())>>10)+96)+String.fromCharCode(((960&e)>>5)+96)+String.fromCharCode((31&e)+96)}}function a5(e,t,n){var i=e.R(),r=[],a=null;1&n&&(a=e.Vf()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={bg:null,sampleSize:null,ue:null};256&n&&(s.bg=e.R()),512&n&&(s.sampleSize=e.R()),1024&n&&e.skip(4),2048&n&&(s.ue=0==t?e.R():e.Vf()),r.push(s)}return{Hk:i,ag:r,Wh:a}}function a6(e){e.skip(6),e.skip(2),e.skip(8);var t=e.la();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.la()+e.la()/65536}}function a8(e){return{codec:rM(e=e.R())}}function a9(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function a7(e){return(10>e?"0":"")+e}function oe(e,t){if(this.j=e,void 0===t?0:t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=eh(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function ot(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);0!==i&&(n.set(e.j.subarray(t,t+i)),e.h=new ry(n,0).R(),e.g=8*i,e.i-=i)}function on(e,t){if(e.g<=t){var n=Math.floor((t-=e.g)/8);t-=8*n,e.g-=n,ot(e)}e.h<<=t,e.g-=t}function oi(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&ot(e),0<(n=t-n)?i<<n|oi(e,n):i}function or(e){var t;for(t=0;t<e.g;++t)if(0!=(e.h&0x80000000>>>t))return e.h<<=t,e.g-=t,t;return ot(e),t+or(e)}function oa(e){on(e,1+or(e))}function oo(e){var t=or(e);return oi(e,t+1)-1}function os(e){return 1&(e=oo(e))?1+e>>>1:-1*(e>>>1)}function ou(e){return 1===oi(e,1)}function ol(e){return oi(e,8)}function oc(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=os(e))+256)%256),n=0===i?n:i}function od(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.s=null}function oh(e,t){if(1!=(t[0]<<16|t[1]<<8|t[2]))return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var i=t[7];if(192&i){var r=0x20000000*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2;null==e.s&&(e.s=r),n.pts=of(r,e.s),e.s=n.pts,n.dts=n.pts,64&i&&(i=0x20000000*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,null==e.o&&(e.o=i),n.dts=of(i,e.o)),e.o=n.dts}return(e=t[8]+9,t.byteLength<=e)?null:(n.data=t.subarray(e),n)}function op(e){var t=e.tc();return 1<t.length&&(e=t[0].pts,!isNaN((t=t[1].pts)-e))?String(1/(t-e)*9e4):null}function of(e,t){var n=1;for(e>t&&(n=-1);0x100000000<Math.abs(t-e);)e+=0x200000000*n;return e}function og(e){return!(0>om(e))}function om(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}aB.Status={Bj:0,xk:1,Yj:2},B("shaka.util.Dom",aX),aX.removeAllChildren=aY,B("shaka.util.Id3Utils",aJ),aJ.getID3Data=a1,aJ.getID3Frames=a0,B("shaka.util.ExpGolomb",oe),(c=od.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},c.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,om(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.G=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.G:a&&(s+=e[s]+1),o={audio:-1,video:-1,ae:-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],c=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(0<c)for(var d=s+5,h=c;2<h;){var p=a[d+1]+2;switch(a[d]){case 5:var f=ts(a.subarray(d+2,d+p));-1==o.audio&&"Opus"===f?(o.audio=l,o.audioCodec="opus"):-1==o.video&&"AV01"===f&&(o.video=l,o.videoCodec="av1");break;case 106:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 122:-1==o.audio&&(o.audio=l,o.audioCodec="ec3");break;case 124:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 127:"opus"==o.audioCodec&&(f=null,128===a[d+2]&&(f=a[d+3]),null!=f&&(this.F={channelCount:0==(15&f)?2:15&f,Qh:f,sampleRate:48e3}))}d+=p,h-=p}break;case 15:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 17:-1==o.audio&&(o.audio=l,o.audioCodec="aac-loas");break;case 21:-1==o.ae&&(o.ae=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");break;case 129:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=l,o.audioCodec="ec3")}s+=c+5}-1!=(a=o).video&&(this.I=a.video,this.m=a.videoCodec),-1!=a.audio&&(this.B=a.audio,this.A=a.audioCodec),-1!=a.ae&&(this.C=a.ae),i&&!this.H&&(i=!1,r=t-188),this.H=!0;break;case this.I:s=e.subarray(s,r+188),a?this.j.push([s]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(s);break;case this.B:s=e.subarray(s,r+188),a?this.i.push([s]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(s);break;case this.C:s=e.subarray(s,r+188),a?this.l.push([s]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(s);break;default:i=!0}}return this},c.Xi=function(e){return ei("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Sf(e,{zd:null,state:null})},c.Sf=function(e,t){var n=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,r=1;"hvc"==this.m&&(r=2);var a=t.state||0,o=a,s=0,u=[],l=-1,c=0;for(-1==a&&(l=0,c="hvc"==this.m?e[0]>>1&63:31&e[0],a=0,s=1);s<i;){var d=e[s++];a?1===a?a=2*!d:d?1==d?(d=s-a-1,0<=l?u.push({data:e.subarray(l+r,d),fullData:e.subarray(l,d),type:c,time:n,state:null}):(a=u.length?u[u.length-1]:t.zd)&&(o&&s<=4-o&&a.state&&(a.data=a.data.subarray(0,a.data.byteLength-o),a.fullData=a.fullData.subarray(0,a.fullData.byteLength-o)),0<d&&(d=e.subarray(0,d),a.data=nV(a.data,d),a.fullData=nV(a.fullData,d),a.state=0)),s<i?(c="hvc"==this.m?e[s]>>1&63:31&e[s],l=s,a=0):a=-1):a=0:a=3:a=+!d}return 0<=l&&0<=a&&u.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:a}),!u.length&&t.zd&&(n=u.length?u[u.length-1]:t.zd)&&(n.data=nV(n.data,e),n.fullData=nV(n.fullData,e)),t.state=a,u},c.getMetadata=function(){for(var e=[],t=u(this.l),n=t.next();!n.done;n=t.next())(n=oh(this,n=nV.apply(nj,l(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:a0(n.data),dts:n.dts,pts:n.pts});return e},c.cb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=u(this.i),n=t.next();!n.done;n=t.next()){var i=nV.apply(nj,l(n.value)),r=oh(this,i);n=this.h.length?this.h[this.h.length-1]:null,r&&null!=r.pts&&null!=r.dts&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?(this.h.length&&r.dts<(n.dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(i=r?r.data:i)&&((n=this.h.pop()).data=nV(n.data,i),this.h.push(n))}e&&(this.h=this.h.sort(function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n}))}return this.h},c.tc=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=!1,n=u(this.j),i=n.next();!i.done;i=n.next()){var r=nV.apply(nj,l(i.value)),a=oh(this,r);i=this.g.length?this.g[this.g.length-1]:null,a&&null!=a.pts&&null!=a.dts&&(!i||i.pts!=a.pts&&i.dts!=a.dts)?(this.g.length&&a.dts<(i.dts||0)&&(t=!0),this.g.push(a)):this.g.length&&(r=a?a.data:r)&&((i=this.g.pop()).data=nV(i.data,r),this.g.push(i))}if(e){for(n={zd:null,state:null},i=[],a=(r=u(this.g)).next();!a.done;a=r.next())(a=a.value).nalus=this.Sf(a,n),a.nalus.length&&(i.push(a),n.zd=a.nalus[a.nalus.length-1]);this.g=i}t&&(this.g=this.g.sort(function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n}))}return e?this.g:(e=this.g,this.g=[],e)},c.getStartTime=function(e){if("audio"==e){e=null;var t=this.cb();return t.length&&(e=Math.min((e=t[0]).dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.tc(!1)).length&&(e=Math.min((e=t[0]).dts,e.pts)/9e4),e):null},c.jd=function(){return{audio:this.A,video:this.m}},c.$d=function(){for(var e=[],t=u(this.tc()),n=t.next();!n.done;n=t.next())e.push.apply(e,l(n.value.nalus));return e},c.Ci=function(){ei("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Df();return{height:e.height,width:e.width}},c.Df=function(){return"hvc"==this.m?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.$d();if(!n.length||!(n=n.find(function(e){return 33==e.type})))return t;var i=new oe(n.fullData,!0);ol(i),ol(i),oi(i,4);var r=oi(i,3);ou(i);var a=oi(i,2),o=oi(i,1),s=oi(i,5),u=oi(i,32);n=ol(i);for(var l=ol(i),c=ol(i),d=ol(i),h=ol(i),p=ol(i),f=ol(i),g=[],m=[],v=0;v<r;v++)g.push(ou(i)),m.push(ou(i));if(0<r)for(v=r;8>v;v++)oi(i,2);for(v=0;v<r;v++)g[v]&&oi(i,88),m[v]&&ol(i);oo(i),3==(r=oo(i))&&oi(i,1),g=oo(i),m=oo(i);var y=v=0,b=0,w=0;return ou(i)&&(v+=oo(i),y+=oo(i),b+=oo(i),w+=oo(i)),t.width=String(g-(v+y)*(1===r||2===r?2:1)),t.height=String(m-(b
1+w)*(1===r?2:1)),i=function(e){for(var t=0,n=0;32>n;n++)t|=(e>>n&1)<<31-n;return t>>>0}(u),o=1==o?"H":"L",a="hvc1."+["","A","B","C"][a]+s+"."+i.toString(16).toUpperCase()+("."+o)+f,p&&(a+="."+p.toString(16).toUpperCase()),h&&(a+="."+h.toString(16).toUpperCase()),d&&(a+="."+d.toString(16).toUpperCase()),c&&(a+="."+c.toString(16).toUpperCase()),l&&(a+="."+l.toString(16).toUpperCase()),n&&(a+="."+n.toString(16).toUpperCase()),t.codec=a,t.frameRate=op(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.$d();if(!n.length||!(n=n.find(function(e){return 7==e.type})))return t;var i=ol(n=new oe(n.data)),r=ol(n),a=ol(n);if(oa(n),ov.includes(i)){var o=oo(n);if(3===o&&on(n,1),oa(n),oa(n),on(n,1),ou(n)){o=3!==o?8:12;for(var s=0;s<o;s++)ou(n)&&(6>s?oc(n,16):oc(n,64))}}if(oa(n),0===(o=oo(n)))oo(n);else if(1===o)for(on(n,1),oa(n),oa(n),o=oo(n),s=0;s<o;s++)oa(n);oa(n),on(n,1),o=oo(n),s=oo(n);var u=oi(n,1);0===u&&on(n,1),on(n,1);var l=0,c=0,d=0,h=0;return ou(n)&&(l=oo(n),c=oo(n),d=oo(n),h=oo(n)),t.height=String((2-u)*(s+1)*16-2*d-2*h),t.width=String(16*(o+1)-2*l-2*c),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+a.toString(16).toUpperCase()).slice(-2),t.frameRate=op(e),t}(this)},B("shaka.util.TsParser",od),od.syncOffset=om,od.probe=og,od.prototype.getVideoInfo=od.prototype.Df,od.prototype.getVideoResolution=od.prototype.Ci,od.prototype.getVideoNalus=od.prototype.$d,od.prototype.getCodecs=od.prototype.jd,od.prototype.getStartTime=od.prototype.getStartTime,od.prototype.getVideoData=od.prototype.tc,od.prototype.getAudioData=od.prototype.cb,od.prototype.getMetadata=od.prototype.getMetadata,od.prototype.parseNalus=od.prototype.Sf,od.prototype.parseAvcNalus=od.prototype.Xi,od.prototype.parse=od.prototype.parse,od.prototype.clearData=od.prototype.clearData,od.Timescale=9e4;var ov=[100,110,122,244,44,83,86,118,128,138,139,134];function oy(e,t,n){this.g=null,this.o=-1,this.l=e,this.i=t,this.m=n,this.j=!1;e:{if("u"<typeof libDPIModule&&q("Could not find LCEVC Library dependencies on this page"),"u">typeof LCEVCdec)this.h=LCEVCdec;else if("u">typeof LcevcDil)this.h=LcevcDil,this.j=!0,ei("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{q("Could not find LCEVC Library on this page"),e=!1;break e}void 0===this.h.SupportObject?(q("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||q(this.h.SupportObject.SupportError),e=void 0!==this.h&&"u">typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function ob(e){e.g&&e.i.classList.add("shaka-hidden")}function ow(e,t,n){var i=0,r=-1;switch(t.mimeType){case"video/webm":i=1;break;case"video/mp4":i=2}switch(n){case"DASH":r=1;break;case"HLS":r=0}e.g&&(e.o=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(i),e.j||e.g.setStreamingFormat(r))}function ox(e,t,n,i){var r=this;this.g=e,this.L=n,this.B=null,this.ga=t,this.l=new Map,this.A=new Map,this.wa=new Map,this.h=null,this.Ca=!1,this.da=i||null,this.o=new Map,this.s=new J,this.j=new Map,this.M=null,this.I=new i0,this.Da="",this.Oa=!1,this.sa=!0,this.K=!1,this.C=this.O=null,this.i=oT(this,this.I),this.G=!1,this.H=new rp(function(){var e,t,n,i,a,o,s,l,c,d,h,p,f;return e=r,R(function(r){if(1==r.g){for(t=[],i=(n=u(e.o)).next();!i.done;i=n.next())for(o=(a=u(i.value)).next().value,l=(s=a.next().value)[0],c=o,e.o.set(c,s.slice(0,1)),l&&t.push(l.p.catch(iu)),h=(d=u(s.slice(1))).next();!h.done;h=d.next())h.value.p.reject(new eC(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),b(r,Promise.all(t),2)}for(f=(p=u(e.j.values())).next();!f.done;f=p.next())f.value.destroy();e.s&&(e.s.release(),e.s=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.O&&(e.g.removeChild(e.O),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.O=null,e.C=null,e.B=null,e.i=null,e.h=null,e.ga=null,e.l.clear(),e.wa.clear(),e.j.clear(),e.M=null,e.o.clear(),e.da=null,e.ba.clear(),e.L=null,w(r)})}),this.F=!1,this.P="UNKNOWN",this.Ia=this.Ma=!1,this.Ba=new i0,this.m=!1,this.oa=null,this.ba=new Map,this.ja=this.W=this.ma=this.aa=null,this.ia=new i0,this.g.remote&&(this.K="disconnected"!=this.g.remote.state,this.s.D(this.g.remote,"connect",function(){r.K="disconnected"!=r.g.remote.state}),this.s.D(this.g.remote,"connecting",function(){r.K="disconnected"!=r.g.remote.state}),this.s.D(this.g.remote,"disconnect",function(){r.K="disconnected"!=r.g.remote.state}))}function oT(t,n){if(t.sa=!0,e.ManagedMediaSource){t.C||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.s.D(i,"startstreaming",function(){t.sa=!0}),t.s.D(i,"endstreaming",function(){t.sa=!1})}else i=new MediaSource;return t.s.qa(i,"sourceopen",function(){URL.revokeObjectURL(t.Da),n.resolve()}),t.s.qa(t.g,"playing",function(){t.Oa=!0}),t.Da=oG(i),t.g.removeAttribute("src"),t.O&&t.g.removeChild(t.O),t.C&&t.g.removeChild(t.C),t.O=aW(t.Da),t.g.appendChild(t.O),t.C&&t.g.appendChild(t.C),t.g.load(),i}function oS(e,t,n,i){"audio"==t&&i&&(i=iC(i,n.mimeType));
1var r=nZ(n.mimeType,i);if(t==nW)oA(e,r,e.F,n.external);else{var a=e.B.forceTransmux;(!Z(r)||!e.F&&n7.includes(r))&&(a=!0);var o=n0(n.mimeType,i);if(a){if(a=nz("audio",(i||"").split(",")),i=nz("video",(i||"").split(",")),a&&i){e.m=!0,oS(e,"audio",n,a),oS(e,"video",n,i);return}(i=np(o))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,o))}o=r+e.B.addExtraFeaturesToSourceBuffer(r),rf(e.H);try{var s=e.i.addSourceBuffer(o)}catch(t){throw new eC(2,3,3015,t,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.F&&(s.mode=oK),e.s.D(s,"error",function(){var n=e.o.get(t)[0];n.p.reject(new eC(2,3,3014,e.g.error?e.g.error.code:0,n.uri))}),e.s.D(s,"updateend",function(){return oU(e,t)}),e.l.set(t,s),e.A.set(t,r),e.wa.set(t,!!n.drmInfos.length)}}function oA(e,t,n,i){e.h||(e.h=new ie(e.ga),e.h&&(e.h.A=e.B.modifyCueCallback));var r=e.h;i=i||e.Ca,e=e.P,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=io.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):ei("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):ei("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function ok(e){return!e.G&&(!e.i||"ended"==e.i.readyState)}function oE(e){return!e.G&&(!e.i||"closed"==e.i.readyState)}function oI(e,t){return e=e.l.size?t==nW?e.h.g:!(e=oC(e,t))||aH(e)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null:null}function oM(e,t){return e.l.size?t==nW?e.h.h:aG(oC(e,t)):null}function oC(e,t){if(e.G||e.K)return null;try{return e.l.get(t).buffered}catch(n){return e.l.has(t),null}}function oD(e,t,n,i,r,a,o,s,l,c){var d,h,p,f,g,m,v,y,x,T,S,A,k,E,I;return o=void 0!==o&&o,s=void 0!==s&&s,l=void 0!==l&&l,c=void 0!==c&&c,R(function(M){var C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,q,z,X,W,Y;switch(M.g){case 1:if(t!=(d=nY).Aa){M.u(2);break}if("HLS"!=e.P){M.u(3);break}return b(M,e.Ba,4);case 4:h=M.h,e.h.s=h;case 3:return b(M,(C=e.h,D=n,P=i?i.startTime:null,L=i?i.endTime:null,N=i?i.N()[0]:null,R(function(e){if(1==e.g)return b(e,Promise.resolve(),2);if(!C.i||!C.j)return e.return();if(null==P||null==L)return C.i.parseInit(eh(D)),e.return();for(j=C.B?P:C.s,U={periodStart:C.s,segmentStart:P,segmentEnd:L,vttOffset:j},B=(_=u(O=C.i.parseMedia(eh(D),U,N,[]))).next();!B.done;B=_.next())F=B.value,C.A(F,N||null,U);V=O.filter(function(e){return e.startTime>=C.l&&e.startTime<C.m}),C.j.append(V),null==C.g&&(C.g=Math.max(P,C.l)),C.h=Math.min(L,C.m),w(e)})),5);case 5:case 8:return M.return();case 2:if(c||!e.m){M.u(6);break}return b(M,oD(e,d.V,n,i,r,a,o,s,l,!0),7);case 7:return b(M,oD(e,d.na,n,i,r,a,o,s,l,!0),8);case 6:if(!e.l.has(t))return M.return();if(p=e.l.get(t).timestampOffset,f=e.A.get(t),e.j.has(t)&&(f=e.j.get(t).getOriginalMimeType()),i&&(m=(g=function(e,t,n,i,r,a){var o=null,s=[],u=eh(n);if(n7.includes(a))(t=a0(u)).length&&i&&((n=t.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&"number"==typeof n.data&&(o=Math.round(n.data)/1e3),e.L.onMetadata([{cueTime:i.startTime,data:u,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.ca&&i.ca.timescale){var l=i.ca.timescale;if(!isNaN(l)){var c=null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length||e.B.dispatchAllEmsgBoxes,d=0,h=!1;u=new rx,c&&u.S("emsg",function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.zc(),o=t.reader.zc(),s=t.reader.R(),u=t.reader.R(),l=t.reader.R(),c=t.reader.R(),d=i.startTime+u/s;else s=t.reader.R(),u=(d=t.reader.Xc()/s+i.timestampOffset)-i.startTime,l=t.reader.R(),c=t.reader.R(),a=t.reader.zc(),o=t.reader.zc();t=t.reader.Ab(t.reader.getLength()-t.reader.xa()),(n&&n.includes(a)||e.B.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.L.Wi():(n=d+l/s,(s=new i8("emsg",s=(new Map).set("detail",{startTime:d,endTime:n,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t}))).cancelable=!0,e.L.onEvent(s),!s.defaultPrevented&&("https://aomedia.org/emsg/ID3"==a||"https://developer.apple.com/streaming/emsg-id3"==a)&&(a=a0(t)).length&&e.L.onMetadata([{cueTime:d,data:t,frames:a,dts:d,pts:d}],0,n)))}),u.S("prft",function(t){var n=t.reader,i=t.version;n.R(),t=1e3*(t=n.R())+n.R()/0x100000000*1e3,n=0===i?n.R():0x100000000*(i=n.R())+(n=n.R()),t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+t).getTime(),n=new i8("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/l*1e3)})),e.L.onEvent(n)}).box("moof",rT).box("traf",rT).S("tfdt",function(e){h||(d=a3(e.reader,e.version).baseMediaDecodeTime/l,h=!0,c||e.parser.stop())}).parse(n,!0),h&&0==i.timestampOffset&&(o=d)}}else a.includes("/mp4")||a.includes("/webm")||!og(u)||(e.ba.has(t)?e.ba.get(t).clearData():e.ba.set(t,new od),null!=(u=(s=e.ba.get(t).parse(u)).getStartTime(t))&&(o=u),s=s.getMetadata());return{timestamp:o,metadata:s}}(e,t,n,i,r,f)).timestamp,v=g.metadata,null!=m&&(null==e.aa&&t==d.na&&(e.aa=m,e.ma=i.startTime,null!=e.W&&(y=0,e.ma==e.ja&&(y=e.aa-e.W),e.ia.resolve(y))),null==e.W&&t==d.V&&(e.W=m,e.ja=i.startTime,null!=e.aa&&(x=0,e.ma==e.ja&&(x=e.aa-e.W),e.ia.resolve(x))),T=m,S=n7,!e.F&&S.includes(e.A.get(t))&&(T=0),A=i.startTime-T,(.001<=Math.abs(p-A)||o||s)&&(!l||0<A||!p)&&(p=A,e.Ia&&(oO(e,t,function(){return oN(e,t)},null),oO(e,t,function(){return oj(e,t,p)},null))),t!=d.na&&e.l.has(d.na)||e.Ba.resolve(p)),v.length)&&e.L.onMetadata(v,p,i?i.endTime:null),a&&t==d.na&&(e.h||oA(e,"application/cea-608",e.F,!1),e.M||(e.M=new ev(f.
1split(";",1)[0])),i?(k=e.M.i(n)).length&&function(e,t,n,i,r){var a=n+" "+i,o=new Map;t=u(t);for(var s=t.next();!s.done;s=t.next()){var l=s.value;s=l.stream,l=l.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=u(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,l,r),l.startTime>=e.l&&l.startTime<e.m&&(o.get(s).get(a).push(l),s==e.C&&e.j.append([l]))}for(a=(r=u(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=u(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,l=o.get(a).get(s),e.o.get(a).set(s,l);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))}(e.h,k,i.startTime,i.endTime,p):e.M.init(n,s)),!e.j.has(t)){M.u(9);break}return b(M,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=M.h;case 9:if(H=e,G=r,K=n,q=i?i.startTime:null,z=t,X=i?i.N()[0]:null,q=null==q,W=H.wa.get(z),Y=H.L.ji(),(W=H.B.insertFakeEncryptionInInit&&q&&W)&&(Y=eN(Y),W=eK()||eG()||e4("SOPOpenBrowser")||eH()&&e0()&&Y),W&&"mp4"==n2(H.A.get(z))&&(K=function(e,t,n){function i(e){s=!0,e.parser.stop()}function r(e){l.push(e),rT(e)}var a,o=t=eh(t),s=!1,l=[],c=[];if((new rx).box("moov",r).box("trak",r).box("mdia",r).box("minf",r).box("stbl",r).S("stsd",function(e){a=e,l.push(e),rS(e)}).S("encv",i).S("enca",i).S("dvav",function(e){c.push({box:e,Xa:0x656e6376})}).S("dva1",function(e){c.push({box:e,Xa:0x656e6376})}).S("dvh1",function(e){c.push({box:e,Xa:0x656e6376})}).S("dvhe",function(e){c.push({box:e,Xa:0x656e6376})}).S("dvc1",function(e){c.push({box:e,Xa:0x656e6376})}).S("dvi1",function(e){c.push({box:e,Xa:0x656e6376})}).S("hev1",function(e){c.push({box:e,Xa:0x656e6376})}).S("hvc1",function(e){c.push({box:e,Xa:0x656e6376})}).S("avc1",function(e){c.push({box:e,Xa:0x656e6376})}).S("avc3",function(e){c.push({box:e,Xa:0x656e6376})}).S("ac-3",function(e){c.push({box:e,Xa:0x656e6361})}).S("ec-3",function(e){c.push({box:e,Xa:0x656e6361})}).S("ac-4",function(e){c.push({box:e,Xa:0x656e6361})}).S("mp4a",function(e){c.push({box:e,Xa:0x656e6361})}).parse(t),s)return t;if(0==c.length||!a)throw nF(t),new eC(2,3,3019,n);c.reverse(),n=u(c);for(var d=n.next();!d.done;d=n.next())d=d.value,o=function(e,t,n,i,r,a){var o=ag(new ac([]),e,i.name),s=t.subarray(i.start,i.start+i.size);for((e=new Uint8Array(i.size+o.byteLength)).set(s,0),ef(e).setUint32(4,a),e.set(o,i.size),aU(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),i=eG()||eH()?i.start:i.start+i.size,o=t.subarray(i),a.set(t.subarray(0,i)),a.set(e,i),a.set(o,i+e.byteLength),r=(t=u(r)).next();!r.done;r=t.next())aU(a,(r=r.value).start,r.size+e.byteLength);return e=ef(a,n.start),n=rC(n),t=e.getUint32(n),e.setUint32(n,t+1),a}(e,o,a,d.box,l,d.Xa);return eH()&&e0()&&!eG()?((e=new Uint8Array(t.byteLength+o.byteLength)).set(o),e.set(t,o.byteLength),e):o}(G,K,X)),q&&eq()&&"mp4"==n2(H.A.get(z))&&(K=function(e){function t(e){i.push({start:e.start,size:e.size}),rT(e)}var n=eh(e),i=[];return(new rx).box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(e){i.push({start:e.start,size:e.size});for(var t=ef(n,e.start),r=0;r<e.size;r++){var a=t.getUint32(r);0x61632d33==a?t.setUint32(r,0x65632d33):0x64616333==a&&t.setUint32(r,0x64656333)}}).parse(n),n}(K)),n=K,!i||!e.F||t==d.Aa||!o&&!s){M.u(11);break}if(E=i.startTime,"HLS"!=e.P||e.m||t!=d.V||!e.l.has(d.na)){M.u(13);break}return b(M,e.ia,14);case 14:.15<Math.abs(I=M.h)&&(E-=I);case 13:oO(e,t,function(){return oN(e,t)},null),oO(e,t,function(){return oj(e,t,E)},null);case 11:return b(M,oO(e,t,function(){var i=n;if("video"==t&&e.da){var r=e.da;r.g&&r.g.appendBuffer(i,"video",r.o,-p)}e.l.get(t).appendBuffer(i)},i?i.N()[0]:null),15);case 15:w(M)}})}function oR(e,t){var n;return R(function(i){return 1==i.g?t==(n=nY).Aa?e.h?b(i,e.h.remove(0,1/0),0):i.return():b(i,oO(e,t,function(){return oL(e,t,0,e.i.duration)},null),4):e.m?b(i,oO(e,n.V,function(){return oL(e,n.V,0,e.i.duration)},null),0):i.u(0)})}function oP(e){R(function(t){return e.H.g||e.K||e.G||ok(e)||oE(e)?t.return():b(t,o_(e,function(){ok(e)||oE(e)||e.i.clearLiveSeekableRange()}),0)})}function oL(e,t,n,i){i<=n?oU(e,t):e.l.get(t).remove(n,i)}function oN(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,oU(e,t)}function oj(e,t,n){0>n&&(n+=.001);var i=!0;"HLS"==e.P&&(i=!!(!(i=oM(e,t))||.15<Math.abs(i-n))),i&&(e.l.get(t).timestampOffset=n),oU(e,t)}function oU(e,t){if(e.G||e.H.g){var n=e.o.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.o.set(t,[]))}else(n=e.o.get(t)[0])&&(n.p.resolve(),oB(e,t))}function oO(e,t,n,i){return rf(e.H),n={start:n,p:new i0,uri:i},e.o.get(t).push(n),1==e.o.get(t).length&&oF(e,t),n.p}function o_(e,t){var n,i,r,a,o,s,l,c,d,h;return R(function(p){switch(p.g){case 1:for(rf(e.H),n=[],a=(r=u(i=Array.from(e.l.keys()))).next(),o={};!a.done;o={ready:void 0},a=r.next())s=a.value,o.ready=new i0,l={start:function(e){return function(){return e.ready.resolve()}}(o),p:o.ready,uri:null},(c=e.o.get(s)).push(l),n.push(o.ready),1==c.length&&l.start();return x(p,2),b(p,Promise.all(n),4);case 4:S(p,3);break;case 2:throw A(p);case 3:return x(p,5,6),b(p,t(),6);case 6:for(k(p),h=(d=u(i)).next();!h.done;h=d.next())oB(e,h.value);
1E(p,0);break;case 5:throw new eC(2,3,3015,A(p),e.g.error||"No error in the media element",null)}})}function oB(e,t){e.o.get(t).shift(),oF(e,t)}function oF(e,t){var n=e.o.get(t)[0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new eC(2,3,3017,t)):n.p.reject(new eC(2,3,3015,i,e.g.error||"No error in the media element",n.uri)),oB(e,t)}}function oV(e,t){return o_(e,function(){var n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,S,A,I,M;return n=e,i=t,R(function(e){if(1==e.g){if(n.G||n.K)return e.return();for(r=nY,n.G=!0,n.m=!1,a=n.g.currentTime,o=n.g.autoplay,s=n.g.paused,n.Oa&&(n.g.autoplay=!1),T(e,2),n.s.La(),c=(l=u(n.j.values())).next();!c.done;c=l.next())c.value.destroy();for(h=(d=u(n.l.values())).next();!h.done;h=d.next()){p=h.value;try{n.i.removeSourceBuffer(p)}catch(e){}}return n.j.clear(),n.l.clear(),f=n.i.duration,n.I=new i0,n.i=oT(n,n.I),b(e,n.I,4)}if(2!=e.g){for(!isNaN(f)&&f?n.i.duration=f:!isNaN(n.oa)&&n.oa&&(n.i.duration=n.oa),g=new i0,m=n.i.sourceBuffers,v=i.size,y=0,w=function(){++y===v&&(g.resolve(),n.s.$a(m,"addsourcebuffer",w))},n.s.D(m,"addsourcebuffer",w),S=(x=u(i.keys())).next();!S.done;S=x.next())A=S.value,I=i.get(A),oS(n,A,I,I.codecs);return(M=i.get(r.V))&&M.isAudioMuxedInVideo&&(n.m=!0),n.m&&!n.o.has(r.V)&&n.o.set(r.V,[]),n.g.currentTime=a,b(e,g,2)}return k(e),n.G=!1,rf(n.H),n.s.qa(n.g,"canplaythrough",function(){n.H.g||(n.g.autoplay=o,s||n.g.play())}),E(e,0)})})}function oH(e,t,n,i){var r=!1,a=nz("audio",(i||"").split(",")),o=nz("video",(i||"").split(",")),s=o;"audio"==t&&(s=a),s||(s=i),i=nZ(n,s);var u=e.B.forceTransmux;if((!Z(i)||!e.F&&n7.includes(i))&&(u=!0),u&&(n=np(e=n0(n,s)))){var l=n();a&&o&&(r=!0),i=l.convertCodecs(t,e)}return t=n3(n6(i)),{pg:l,tj:r,Ag:n5(i),codec:t,mimeType:i}}oy.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},B("shaka.lcevc.Dec",oy),oy.prototype.release=oy.prototype.release,(c=ox.prototype).destroy=function(){return this.H.destroy()},c.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var r,a,o,s,l,c,d=this;return R(function(h){if(1==h.g)return r=nY,b(h,d.I,2);if(3!=h.g)return ok(d)||oE(d)?(K("Expected MediaSource to be open during init(); reopening the media source."),d.I=new i0,d.i=oT(d,d.I),b(h,d.I,3)):h.u(3);for(d.F=t,d.P=n,d.Ma=i,d.Ia=!d.F&&"HLS"==d.P&&!d.Ma,d.ba.clear(),d.aa=null,d.ma=null,d.W=null,d.ja=null,d.ia=new i0,o=(a=u(e.keys())).next();!o.done;o=a.next())s=o.value,l=e.get(s),oS(d,s,l,l.codecs),d.m?(d.o.set(r.V,[]),d.o.set(r.na,[])):d.o.set(s,[]);(c=e.get(r.V))&&c.isAudioMuxedInVideo&&(d.m=!0),w(h)})},c.configure=function(e){this.B=e,this.h&&(this.h.A=e.modifyCueCallback)},c.Db=function(){var e={total:this.G?[]:az(this.g.buffered),audio:az(oC(this,"audio")),video:az(oC(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},c.remove=function(e,t,n){var i,r=this;return R(function(a){return 1==a.g?e==(i=nY).Aa?b(a,r.h.remove(t,n),0):n>t?b(a,oO(r,e,function(){return oL(r,e,t,n)},null),5):a.u(0):r.m?b(a,oO(r,i.V,function(){return oL(r,i.V,t,n)},null),0):a.u(0)})},c.flush=function(e){var t,n=this;return R(function(i){return 1==i.g?e==(t=nY).Aa?i.return():b(i,oO(n,e,function(){n.g.currentTime-=.001,oU(n,e)},null),2):n.m?b(i,oO(n,t.V,function(){var e=t.V;n.g.currentTime-=.001,oU(n,e)},null),0):i.u(0)})},c.endOfStream=function(e){var t=this;return R(function(n){return b(n,o_(t,function(){ok(t)||oE(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},c.Za=function(e){var t=this;return R(function(n){return b(n,o_(t,function(){if(e<t.i.duration)for(var n=u(t.l.keys()),i=n.next();!i.done;i=n.next()){i=i.value;var r={start:function(){},p:new i0,uri:null};t.o.get(i).unshift(r)}t.i.duration=e,t.oa=e}),0)})},c.getDuration=function(){return this.i.duration};var oG=e.URL.createObjectURL,oK="sequence";function oq(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=void 0===n||n,this.G=0,this.s=!1,this.m=e}function oz(e,t,n,i){var r=this;this.s=i,this.g=e,this.B=t,this.h=n,this.o=new J,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=function(e){if(!e.h.stallEnabled)return null;var t=e.h.stallSkip;return new oW(new oY(e.g),e.h.stallThreshold,function(){return R(function(n){if(1==n.g)return az(e.g.buffered).length?t?(e.g.currentTime+=t,n.u(2)):b(n,e.g.play(),3):n.return();if(2!=n.g){if(!e.g)return n.return();e.g.pause(),e.g.play()}e.G++,e.s(new i8("stalldetected")),w(n)})})}(this),this.A=!1,this.o.D(e,"waiting",function(){return oX(r)}),this.i=new eB(function(){oX(r)}).ua(this.h.gapJumpTimerTime)}function oX(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(r=!e.m)){var t,n,i,r=e.m,a=r.j,o=oJ(a),s=a.g.currentTime,u=Date.now()/1e3;
1(r.g!=s||r.m!=o)&&(r.l=u,r.g=s,r.m=o,r.h=!1),(o=(s=u-r.l)>=r.o&&o&&!r.h)&&(r.i&&r.i(r.g,s),r.h=!0,r.g=a.g.currentTime),r=!o}r&&(r=e.g.currentTime,t=a=e.g.buffered,n=r,i=e.h.gapDetectionThreshold,null==(o=!t||!t.length||aH(t)?null:0<=(t=az(t).findIndex(function(e,t,r){return e.start>n&&(0==t||r[t-1].end-n<=i)}))?t:null)||0==o&&!e.A||(s=a.start(o),(u=e.h.gapPadding)&&(s=Math.ceil(100*(s+u))/100),s>=e.B.lb()||.001>s-r||(0!=o&&a.end(o-1),e.g.currentTime=s,r==e.j&&(e.j=s),e.C++,e.s(new i8("gapjumped")))))}}}function oW(e,t,n){this.j=e,this.m=oJ(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=n}function oY(e){this.g=e}function oJ(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=u(az(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 o$(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=oQ.value().get(t),n.qa(e,t,i))}(c=oq.prototype).getDuration=function(){return this.l},c.mi=function(){return this.h},c.qh=function(e){this.i=e},c.Za=function(e){this.l=e},c.ri=function(){return this.i},c.oh=function(e){this.A=e},c.Cc=function(e){e&&!this.B&&(this.I=!0),this.B=e},c.xe=function(e){this.o=e},c.Zd=function(){return this.o},c.fg=function(e){this.C=e},c.di=function(){return this.C},c.dh=function(e,t){if(0!=e.length){var n=(Date.now()+this.A)/1e3;if(0!=(e=e.filter(function(e){return e.start+t<n})).length){var i=e[e.length-1].end+t;this.je(e[0].start+t),this.h=e.reduce(function(e,t){return Math.max(e,t.end-t.start)},this.h),this.g=Math.max(this.g,i),null!=this.i&&this.F&&!this.s&&(this.i=n-this.g-this.h)}}},c.Bd=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=u(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.h=Math.max(this.h,r.endTime-r.startTime));this.je(t),this.g=Math.max(this.g,n),null!=this.i&&this.F&&!this.s&&(this.i=i-this.g-this.h)}},c.bh=function(e,t){this.je(e),1/0==t||this.T()||(this.g=Math.max(this.g,t))},c.ni=function(){return this.g},c.ee=function(){this.s=!0},c.Mi=function(){return this.s},c.ph=function(e){this.m=e},c.ii=function(){return this.m},c.je=function(e){null==this.j?this.j=e:this.I||(this.j=Math.min(this.j,e))},c.Of=function(e){this.h=Math.max(this.h,e)},c.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},c.T=function(){return 1/0==this.l&&!this.B},c.vc=function(){return 1/0!=this.l&&!this.B},c.mb=function(){return Math.max(this.H,this.Zb()-this.o)},c.th=function(e){this.H=e},c.Zb=function(){return this.T()||this.vc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},c.md=function(e){var t=Math.max(this.j,this.H);return 1/0==this.o?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Zb()-this.o+e,this.lb()))},c.Eb=function(){return this.md(0)},c.lb=function(){return Math.max(0,this.Zb()-(this.T()||this.vc()?this.C:0))},c.Ch=function(){return null!=this.i&&(null==this.g||!this.F)},c.nh=function(e){this.G=e},c.$h=function(){return this.G},B("shaka.media.PresentationTimeline",oq),oq.prototype.getAvailabilityTimeOffset=oq.prototype.$h,oq.prototype.setAvailabilityTimeOffset=oq.prototype.nh,oq.prototype.usingPresentationStartTime=oq.prototype.Ch,oq.prototype.getSeekRangeEnd=oq.prototype.lb,oq.prototype.getSeekRangeStart=oq.prototype.Eb,oq.prototype.getSafeSeekRangeStart=oq.prototype.md,oq.prototype.getSegmentAvailabilityEnd=oq.prototype.Zb,oq.prototype.setUserSeekStart=oq.prototype.th,oq.prototype.getSegmentAvailabilityStart=oq.prototype.mb,oq.prototype.isInProgress=oq.prototype.vc,oq.prototype.isLive=oq.prototype.T,oq.prototype.offset=oq.prototype.offset,oq.prototype.notifyMaxSegmentDuration=oq.prototype.Of,oq.prototype.notifyMinSegmentStartTime=oq.prototype.je,oq.prototype.getInitialProgramDateTime=oq.prototype.ii,oq.prototype.setInitialProgramDateTime=oq.prototype.ph,oq.prototype.isStartTimeLocked=oq.prototype.Mi,oq.prototype.lockStartTime=oq.prototype.ee,oq.prototype.getMaxSegmentEndTime=oq.prototype.ni,oq.prototype.notifyPeriodDuration=oq.prototype.bh,oq.prototype.notifySegments=oq.prototype.Bd,oq.prototype.notifyTimeRange=oq.prototype.dh,oq.prototype.getDelay=oq.prototype.di,oq.prototype.setDelay=oq.prototype.fg,oq.prototype.getSegmentAvailabilityDuration=oq.prototype.Zd,oq.prototype.setSegmentAvailabilityDuration=oq.prototype.xe,oq.prototype.setStatic=oq.prototype.Cc,oq.prototype.setClockOffset=oq.prototype.oh,oq.prototype.getPresentationStartTime=oq.prototype.ri,oq.prototype.setDuration=oq.prototype.Za,oq.prototype.setPresentationStartTime=oq.prototype.qh,oq.prototype.getMaxSegmentDuration=oq.prototype.mi,oq.prototype.getDuration=oq.prototype.getDuration,oz.prototype.release=function(){this.o&&(this.o.release(),this.o=null),null!=this.i&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.s=null},oz.prototype.me=function(){this.A=!0,this.i&&this.i.ua(this.h.gapJumpTimerTime),oX(this)},oW.prototype.release=function(){this.i=this.j=null};var oQ=new eR(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function oZ(e,t,n,i){var r=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return null==r.l&&(r.l=i()),r.l},this.o=!1,this.h=new J,this.i=new o4(e),o$(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){o2(r,r.j())})}function o0(e){return e.o?e.g.currentTime:e.j()}function o1(e,t){0<e.g.readyState?o5(e.i,t):o$(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){o2(e,e.j())})}function o2(e,t){.001>Math.abs(e.g.currentTime-t)?o3(e):(e.h.qa(e.g,"seeking",function(){o3(e)}),o5(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function o3(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(e.g.currentTime)}function o4(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new eB(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}function o5(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ua(.1)}function o6(e){this.h=e,this.j=!1,this.g=null,this.i=new J}function o8(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.s=r,this.o=null,this.j=new oz(e,t.presentationTimeline,n,a),this.h=new oZ(e,function(){e:{var e=o.j;e.l=!0,e.A=!1,e.i&&e.i.ua(e.h.gapJumpTimerTime),oX(e);var t=o0(o.h);if(.001<Math.abs((e=o7(o,t))-t)){if(t=!1,!eX()||eX()&&e1())t=!0;else{var n=Date.now()/1e3,i=eX()&&e2()?3:1;(!o.o||o.o<n-i)&&(o.o=n,t=!0)}if(t){o1(o.h,e),e=void 0;break e}}o.s(),e=void 0}return e},function(e){var t=o.j;t.g.seeking&&!t.l&&(t.l=!0,t.j=e),t.i&&t.i.ua(t.h.gapJumpTimerTime),oX(t)},function(){var e=i;return null==e?e=1/0>o.g.getDuration()?o.g.Eb():o.g.lb():0>e&&(e=o.g.lb()+e),o9(o,se(o,e))}),this.m=new eB(function(){if(0!=o.i.readyState&&!o.i.paused){var e=o0(o.h),t=o.g.Eb(),n=o.g.lb();3>n-t&&(t=n-3),e<t&&(e=o7(o,e),o.i.currentTime=e)}})}function o9(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function o7(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Eb(),a=e.g.lb(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.md(n),u=e.g.md(i);return n=e.g.md(n+i),t>=o?o9(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?aK(e.i.buffered,u)?u:n:t>=s||aK(e.i.buffered,t)?t:n}function se(e,t){var n=e.g.Eb();return t<n?n:t>(e=e.g.lb())?e:t}function st(e){this.g=e,this.m=null,this.i=0,this.o=!1}function sn(e){return e.g[0]||null}function si(e,t,n){return new st([e=new aB(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function sr(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function sa(){st.call(this,[]),this.h=[]}function so(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Yd(),this.h=new eB(function(){t.g.$g(.25*t.i)})}function ss(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.Yd()!=t&&e.g.ig(t);return}catch(e){}e.h.ua(.25),0!=e.g.Yd()&&e.g.ig(0)}function su(e){var t=this;this.j=e,this.g=new J,this.h=new Set,this.i=new eB(function(){sl(t,!1)}).pb(),e.paused||this.i.ua(.25),this.g.D(e,"playing",function(){t.i.pb().ua(.25)}),this.g.D(e,"pause",function(){t.i.stop()})}function sl(e,t){var n=e.j.currentTime;e=u(e.h);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function sc(e){re.call(this),this.g=new Map,this.h=e}function sd(e,t,n){return!!(e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n)}function sh(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return"video"==e.type&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),"audio"==e.type&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function sp(e){re.call(this),this.h=new Map,this.i=e,this.g=null}function sf(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=i}function sg(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Ob(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value);){var i=!0;n.isPreload()&&null!=n.endByte&&(i=!1),2==n.ac()&&(i=!1),n.Fb(!1)&&(i=!1),i&&n.ca&&t.pu
1sh(sm(e,n.ca)),i&&!e.h.has(n)&&(i=new sT(e.l),t.push(sS(i,n,e.i)),e.h.set(n,i))}return sb(e),Promise.all(t)}function sm(e,t){if(!e.i.segmentIndex||t.Fb()||Array.from(e.j.keys()).some(function(e){return a_(e,t)}))return Promise.resolve();var n=new sT(e.l),i=sS(n,t,e.i);return e.j.set(t,n),i}function sv(e,t){t=u(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&sx(e,n)}function sy(e){sv(e,e.h),sv(e,e.j),e.g=null}function sb(e){for(var t=Array.from(e.h.keys()),n=u(e.j.keys()),i=n.next(),r={};!i.done;r={Gf:void 0},i=n.next())r.Gf=i.value,t.some(function(e){return function(t){return a_(t.ca,e.Gf)}}(r))||sx(e,r.Gf)}function sw(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&sx(e,i)}sb(e)}function sx(e,t){var n=e.h;t instanceof aO&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function sT(e){this.g=e,this.Dd=this.kg=null}function sS(e,t,n){var i=new Uint8Array(0);return e.Dd=e.g(t,n,function(t){return R(function(n){if(1==n.g)return i=0<i.byteLength?nV(i,t):t,e.kg?b(n,e.kg(i),3):n.u(0);i=new Uint8Array(0),w(n)})}),e.Dd.promise.catch(function(e){return e instanceof eC&&7001==e.code?Promise.resolve():Promise.reject(e)})}function sA(e){var t=n5(e),n=t.split("/")[0];return{type:n,mimeType:t,codecs:e=n6(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Kd:null,colorGamut:null,frameRate:null}}function sk(e){var t=new Set,n=[];e=u(e);for(var i=e.next();!i.done;i=e.next()){var r=n4(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=nX("audio",n),i=nX("video",n),e=nX(nW,n),i=function(e){if(1>=e.length)return e;var t=e.find(function(e){return e.startsWith("dvav.")||e.startsWith("dva1.")||e.startsWith("dvh1.")||e.startsWith("dvhe.")||e.startsWith("dav1.")||e.startsWith("dvc1.")||e.startsWith("dvi1.")});return t?Z('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(e){return e!=t}):e}(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function sE(t,n,i){var r,a,o,s,u;return R(function(l){if(1==l.g)return(r=n).cryptoKey?l.u(2):b(l,r.fetchKey(),3);if(!(a=r.iv))for(a=eh(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+i,s=a.byteLength-1;0<=s;s--)a[s]=255&o,o>>=8;return u="CBC"==n.blockCipherMode?{name:"AES-CBC",iv:a}:{name:"AES-CTR",counter:a,length:64},l.return(e.crypto.subtle.decrypt(u,r.cryptoKey,t))})}function sI(e,t,n,i,r){return e=ro(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function sM(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.H=new Map,this.C=1,this.s=this.l=null,this.L=0,this.h=new Map,this.G=!1,this.M=null,this.B=!1,this.m=new rp(function(){var e,t,i,r,a,o,s;return e=n,R(function(n){if(1==n.g){for(t=[],r=(i=u(e.h.values())).next();!r.done;r=i.next())sK(a=r.value),t.push(sq(a)),a.X&&(sy(a.X),a.X=null);for(s=(o=u(e.o.values())).next();!s.done;s=o.next())sy(s.value);return b(n,Promise.all(t),2)}e.h.clear(),e.o.clear(),e.g=null,e.j=null,e.i=null,e.A&&e.A.stop(),e.A=null,w(n)})}),this.I=Date.now()/1e3,this.o=new Map,this.K={projection:null,hfov:null},this.P=0,this.O=1/0,this.F=null,this.A=new eB(function(){if(n.j&&n.g)if(n.j.presentationTimeline.T()){var e,t,i,r=n.j.presentationTimeline.Eb(),a=n.j.presentationTimeline.lb();1<a-r?(e=n.g.Z,t=r,i=a,R(function(n){return e.H.g||e.K||e.G||ok(e)||oE(e)?n.return():b(n,o_(e,function(){ok(e)||oE(e)||e.i.setLiveSeekableRange(t,i)}),0)})):oP(n.g.Z)}else oP(n.g.Z),n.A&&n.A.stop()})}function sC(e,t){for(var n=0>e.g.eb(),i=u(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).ha&&r.ha.ad(n),r.X&&r.X.ad(n);for(r=(i=u(e.o.values())).next();!r.done;r=i.next())r.value.ad(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.dc&&(sP(e,t,!1,0,!1),n.dc=i):(t=n.dc)&&(n.dc=null,sP(e,t,!0,0,!1)))}function sD(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.G&&(t.video&&sP(e,t.video,n,i,r,a),t.audio&&sP(e,t.audio,n,i,r,a))}function sR(e,t){R(function(n){if(1==n.g)return e.F=null,e.s=t,e.G?t.segmentIndex?n.u(2):b(n,t.createSegmentIndex(),2):n.return();sP(e,t,!0,0,!1),w(n)})}function sP(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,T=e.h.get(t.type);T||t.type!=nW?T&&(T.dc&&(t.trickModeVideo?(T.dc=t,t=t.trickModeVideo):T.dc=null),T.stream!=t||r)&&(e.o.has(t)?T.X=e.o.get(t):T.X&&(c=T.X,(d=t)&&d!==c.i&&(sy(c),c.i=d)),t.type==nW&&(r=nZ(t.mimeType,t.codecs),oA(e.g.Z,r,e.j.sequenceMode,t.external)),!e.o.has(T.stream)&&T.stream.closeSegmentIndex&&(T.Ga?(r="("+T.type+":"+T.stream.id+")",e.H.has(r)||e.H.set(r,T.stream.closeSegmentIndex)):T.stream.closeSegmentIndex()),r=T.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,T.stream=t,T.ha=null,T.wg=!!a,r?sX(e,!0,!1):(n?T.lc?T.Me=!0:T.Ga?(T.jc=!0,T.Sd=i,T.Me=!0):(sK(T),sH(e,T,!0,i).catch(function(t){e.g&&e.g.onError(t)})):T.Ga||T.ib||sG(e,T,0),(o=e,s=T,R(function(e){if(1==e.g)return s.ob?(u=s.stream,l=s.ob,u.segmentIndex?e.u(2):b(e,u.createSegmentIndex(),2)):e.return();if(s.ob!=l||s.stream!=u)return e.return();var t=o.g.ld(),n=oM(o.g.Z,s.type),i=s.stream.segmentIndex.find(s.Ka?s.Ka.endTime:t),r=null==i?null:s.stream.segmentIndex.get(i);i=r&&r.endByte?r.endByte-r.startByte:null,r&&!i&&(i=(r.endTime-r.getStartTime())*(s.stream.bandwidth||0)/8),i?((r=r.ca)&&(i+=(r.endByte?r.endByte-r.startByte:null)||0),t=8*i/(r=o.g.getBandwidthEstimate())<(n||0)-t-o.i.rebufferingGoal||s.ob.h.g>i):t=!1,t&&s.ob.abort(),w(e)})).catch(function(t){e.g&&e.g.onError(t)}))):(h=e,p=t,R(function(e){switch(e.g){case 1:return f=nY,h.L++,g=h.L,x(e,2),b(e,oR(h.g.Z,f.Aa),4);case 4:S(e,3);break;case 2:m=A(e),h.g&&h.g.onError(m);case 3:v=nZ(p.mimeType,p.codecs),oA(h.g.Z,v,h.j.sequenceMode,p.external),(h.g.Z.ga.isTextVisible()||h.i.alwaysStreamText)&&h.L==g&&(y=sN(h,p),h.h.set(f.Aa,y),sG(h,y,0)),w(e)}}))}function sL(e,t){t.lc||t.jc||(t.Ga?(t.jc=!0,t.Sd=0):null==oI(e.g.Z,t.type)?null==t.ib&&sG(e,t,0):(sK(t),sH(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}
1function sN(e,t){return{stream:t,type:t.type,ha:null,X:sj(e,t),Ka:null,Qc:null,de:null,xc:null,wc:null,dc:null,endOfStream:!1,Ga:!1,ib:null,jc:!1,Sd:0,Me:!1,lc:!1,Zc:!0,Xf:!1,od:!1,ob:null}}function sj(e,t){if("video"===t.type&&e.i.disableVideoPrefetch||"audio"===t.type&&e.i.disableAudioPrefetch||t.type===nW&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===nW&&e.i.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.h.get(t.type);return(n=n&&n.X)&&t===n.i?n:0<e.i.segmentPrefetchLimit?new sf(e.i.segmentPrefetchLimit,t,function(t,n,i){return sV(t,n,i||null,e.i.retryParameters,e.g.Sb)},0>e.g.eb()):null}function sU(e,t,n,i,r,a,o,s){var u,l,c,d;return R(function(h){if(1==h.g){var p,f,g,m,v,y,w,T,k,E,I;return u=nY,l=new Map,e.l.audio&&l.set(u.V,e.l.audio),e.l.video&&l.set(u.na,e.l.video),x(h,2),t.xc=i,t.wc=r,o&&(t.Kf=o),s&&(t.Lf=s),t.de=n,c=e.j.sequenceMode||"HLS"==e.j.type,b(h,(p=e.g.Z,f=t.type,g=n,m=i,v=r,y=c,w=a.mimeType||t.stream.mimeType,T=a.codecs||t.stream.codecs,k=l,R(function(e){if(1==e.g){var t,n,i,r,a,o,s,u,l,c,d,h,x,S,A,M,C,D,P,L,N,j;if(f==(E=nY).Aa){return y||(p.h.s=g),t=p.h,n=m,i=v,t.l=n,t.m=i,e.return()}return I=[],b(e,(r=p,a=f,o=w,s=T,u=k,R(function(e){if(1==e.g){if(a==(l=nY).Aa)return e.return(!1);if(c=n3(n6(r.A.get(a))),d=n5(r.A.get(a)),x=(h=oH(r,a,o,s)).pg,S=h.tj,A=h.Ag,M=h.codec,C=h.mimeType,D=!0,S&&r.A.has(l.V)&&(P=oH(r,l.V,o,s),L=n3(n6(r.A.get(l.V))),N=n5(r.A.get(l.V)),D=L==P.codec&&N==P.Ag,P.pg&&P.pg.destroy()),c===M&&d===A&&D)return r.j.has(a)&&!x?(r.j.get(a).destroy(),r.j.delete(a)):!r.j.has(a)&&x?r.j.set(a,x):x&&(r.j.has(a)&&r.j.get(a).transmux!=x.transmux?(r.j.get(a).destroy(),r.j.delete(a),r.j.set(a,x)):x.destroy()),e.return(!1);if(j=!0,(r.m||S&&x&&!r.j.has(a))&&(j=!1),j&&"smooth"===r.B.codecSwitchingStrategy&&ee()){var t,n,i,p;return b(e,(t=r,n=a,i=C,p=x,oO(t,n,function(){if(n!==nW){if(t.A.get(n),ee()){t.j.has(n)&&(t.j.get(n).destroy(),t.j.delete(n)),p&&t.j.set(n,p);var e=i+t.B.addExtraFeaturesToSourceBuffer(i);t.l.get(n).changeType(e),t.A.set(n,i)}oU(t,n)}},null)),3)}return x&&x.destroy(),b(e,oV(r,u),3)}return e.return(!0)})),2)}return e.h||(I.push(oO(p,f,function(){return oN(p,f)},null)),p.m&&I.push(oO(p,E.V,function(){return oN(p,E.V)},null))),y||(I.push(oO(p,f,function(){return oj(p,f,g)},null)),p.m&&I.push(oO(p,E.V,function(){return oj(p,E.V,g)},null))),(0!=m||1/0!=v)&&(I.push(oO(p,f,function(){var e=p.l.get(f);e.appendWindowStart=0,e.appendWindowEnd=v,e.appendWindowStart=m,oU(p,f)},null)),p.m&&I.push(oO(p,E.V,function(){var e=E.V,t=p.l.get(e);t.appendWindowStart=0,t.appendWindowEnd=v,t.appendWindowStart=m,oU(p,e)},null))),I.length?b(e,Promise.all(I),0):e.u(0)})),4)}if(2!=h.g)return S(h,0);throw d=A(h),t.xc=null,t.wc=null,t.Kf=null,t.Lf=null,t.de=null,d})}function sO(e,t,n,i,r,a,o,s){var u,l,c,d,h,p;return o=void 0!==o&&o,s=void 0!==s&&s,R(function(f){switch(f.g){case 1:return u=i.closedCaptions&&0<i.closedCaptions.size,e.i.shouldFixTimestampOffset&&(c="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,d=null,r.ca&&(d=r.ca.timescale),(h=c&&d&&"video"===i.type&&"DASH"==e.j.type)&&(l=new rx),h&&l.box("moof",rT).box("traf",rT).S("tfdt",function(n){var i,a,o,s;return R(function(u){return(i=a3(n.reader,n.version).baseMediaDecodeTime)?(a=-i/d,(Number(t.de)||0)<a)?(o=t.xc,s=t.wc,b(u,sU(e,t,a,o,s,r),0)):u.u(0):u.return()})}),h&&l.parse(a,!1,o)),b(f,s_(e,t,n),2);case 2:return rf(e.m),p=t.Zc,t.Zc=!1,b(f,e.g.Bg(t.type,a),3);case 3:return b(f,oD(e.g.Z,t.type,a,r,i,u,p,s,o),4);case 4:rf(e.m),w(f)}})}function s_(e,t,n){var i,r,a,o,s,u,l,c;return R(function(d){return 1==d.g?((i=t.stream.segmentIndex)instanceof sa&&i.Ja(e.j.presentationTimeline.mb()),r=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),null==(a=oI(e.g.Z,t.type)))?(e.F==t&&(e.F=null),d.return()):(o=n-a,s=e.i.evictionGoal,u=e.j.presentationTimeline.Eb(),l=e.j.presentationTimeline.lb(),c=o-r,l-u>s&&(c=Math.max(o-r,u-s-a)),c<=s?d.return():b(d,e.g.Z.remove(t.type,a,a+c),2)):4!=d.g?(rf(e.m),e.F?b(d,s_(e,e.F,n),4):d.u(0)):void(rf(e.m),w(d))})}function sB(e){return e&&e.type==nW&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function sF(e,t,n,i){var r,a,o,s,u;return R(function(l){switch(l.g){case 1:if(r=n.Fb())return l.return(r);if(a=null,t.X){var c=t.X,d=c.h;n instanceof aO&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.kg=i),a=c.Dd):a=null}return a||(a=sV(n,t.stream,i||null,e.i.retryParameters,e.g.Sb)),o=0,t.ha&&(o=t.ha.h),t.ob=a,b(l,a.promise,2);case 2:if(s=l.h,t.ob=null,u=s.data,!n.aesKey){l.u(3);break}return b(l,sE(u,n.aesKey,o),4);case 4:u=l.h;case 3:return l.return(u)}})}function sV(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof aB?e:void 0;return(e=sI(e.N(),e.startByte,e.endByte,i,n)).contentType=t.type,r.request(rc,e,{type:+!!o,stream:t,segment:o,isPreload:a})}function sH(e,t,n,i){var r,a;return R(function(o){return 1==o.g?(t.jc=!1,t.Me=!1,t.Sd=0,t.lc=!0,t.Ka=null,t.ha=null,t.X&&!e.o.has(t.stream)&&sy(t.X),i?(r=e.g.ld(),a=e.g.Z.getDuration(),b(o,e.g.Z.remove(t.type,r+i,a),3)):b(o,oR(e.g.Z,t.type),4)):3!=o.g?(rf(e.m),n?b(o,e.g.Z.flush(t.type),3):o.u(3)):void(rf(e.m),t.lc=!1,t.endOfStream=!1,t.Ga||t.ib||sG(e,t,0),w(o))})}function sG(t,n,i){var r=n.type;(r!=nW||t.h.has(r))&&(n.ib=new e_(function(){var i;return R(function(r){if(1==r.g){var a,o,s,l,c,d,h,p;return x(r,2),b(r,(a=t,o=n,R(function(t){switch(t.g){case 1:if(rf(a.m),o.Ga||null==o.ib||o.lc)return t.return();if(o.ib=null,!o.jc){t.u(2);break}return b(t,sH(a,o,o.Me,o.Sd),3);case 3:case 8:return t.return();case 2:for(var n=a,i=o,r=u(n.H.entries()),f=r.next();!f.done;f=r.next()){var g=u(f.value);f=g.next().value,g=g.next().value,f.includes(i.type)&&(g(),n.H.delete(f))}
1if(o.stream.segmentIndex){t.u(4);break}return s=o.stream,x(t,5),b(t,o.stream.createSegmentIndex(),7);case 7:S(t,6);break;case 5:return l=A(t),b(t,sz(a,o,l),8);case 6:if(s!=o.stream)return s.closeSegmentIndex&&s.closeSegmentIndex(),o.Ga||o.ib||sG(a,o,0),t.return();case 4:x(t,9),null!=(c=function(t,n){if(sB(n))return M=t.g.Z,C=n.stream.originalId||"",D=oM(M,"video")||0,ia(M.h,C,D),null;if(n.type==nW&&(P=t.g.Z).h&&ia(P.h,"",0),n.stream.isAudioMuxedInVideo)return null;var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N,j,U,O=t.i.updateIntervalSeconds/Math.max(1,Math.abs(t.g.eb()));if(!((L=t.g.Z).sa&&!L.K&&!L.G)&&n.type!=nW)return O/2;var _=t.g.ld();if("audio"===n.type)for(var B=u(t.o.keys()),F=B.next();!F.done;F=B.next())(F=t.o.get(F.value)).Ja(_,!0),sg(F,_);B=n.Ka?n.Ka.endTime:_;var V=(N=t.g.Z,j=n.type,U=_,j==nW?null==(N=N.h).h||N.h<U?0:N.h-Math.max(U,N.g):aq(N=oC(N,j),U)),H=Math.max(1,Math.max(t.i.rebufferingGoal,t.i.bufferingGoal)*t.C),G=t.j.presentationTimeline.getDuration()-B;if(F=oM(t.g.Z,n.type),1e-6>G&&F)return n.endOfStream=!0,"video"==n.type&&(t=t.h.get(nW))&&sB(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,V>=H)return O/2;if(H=!n.ha,!(F=function(e,t,n,i){if(t.ha)return(n=t.ha.current())&&t.Ka&&.001>Math.abs(t.Ka.startTime-n.startTime)&&(n=t.ha.next().value),n;if(t.Ka||i)return n=t.Ka?t.Ka.endTime:i,e=0>e.g.eb(),t.stream.segmentIndex&&(t.ha=t.stream.segmentIndex.Ob(n,!1,e)),t.ha&&t.ha.next().value;var r=Math.max(n-(i=e.j.sequenceMode?0:e.i.inaccurateManifestTolerance),0);e=0>e.g.eb();var a=null;return i&&(t.stream.segmentIndex&&(t.ha=t.stream.segmentIndex.Ob(r,!1,e)),a=t.ha&&t.ha.next().value),a||(t.stream.segmentIndex&&(t.ha=t.stream.segmentIndex.Ob(n,!1,e)),a=t.ha&&t.ha.next().value),a}(t,n,_,F)))return O;V=!1,H&&n.wg&&(V=!0,n.wg=!1),H=1/0,G=u(G=Array.from(t.h.values()));for(var K=G.next();!K.done;K=G.next())sB(K=K.value)||K.ha&&!K.ha.current()||(H=Math.min(H,K.Ka?K.Ka.endTime:_));return B>=H+t.j.presentationTimeline.h?O:(n.X&&n.ha&&!t.o.has(n.stream)&&(n.X.Ja(F.startTime+.001),sg(n.X,F.startTime).catch(function(){})),(i=t,r=n,a=_,o=F,s=V,R(function(t){var n,u,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,q,z,X,W,Y,J,$;switch(t.g){case 1:if(l=nY,c=r.stream,d=r.ha,r.Ga=!0,x(t,2),2==o.ac())throw new eC(1,1,1011);return b(t,(n=i,u=r,M=o,C=s,R(function(e){switch(e.g){case 1:if(D=nY,P=null==u.Ka,L=[],N=Math.max(0,Math.max(M.appendWindowStart,n.P)-.1),j=Math.min(M.appendWindowEnd,n.O)+.01,O=n4(U=M.codecs||u.stream.codecs),_=n5(M.mimeType||u.stream.mimeType),(B=M.timestampOffset)==u.de&&N==u.xc&&j==u.wc&&O==u.Kf&&_==u.Lf){e.u(2);break}if(!(u.Kf&&u.Lf&&function(e,t,n,i){if(t==nW)var r=!1;else{r=n3(n6(e.A.get(t)));var a=n5(e.A.get(t)),o=nZ(n,i),s=e.B.forceTransmux;(!Z(o)||!e.F&&n7.includes(o))&&(s=!0),n=n0(n,i),s&&(s=np(n))&&(o=(s=s()).convertCodecs(t,n),s.destroy()),t=n3(n6(o)),o=n5(o),r=r!==t||a!==o}return!!r&&("smooth"!==e.B.codecSwitchingStrategy||!ee()||e.m)}(n.g.Z,u.type,_,U))||(F=null,u.type===D.na?F=n.h.get(D.V):u.type===D.V&&(F=n.h.get(D.na)),!F)){e.u(3);break}return b(e,sq(F).catch(function(){}),5);case 5:F.Qc=null,F.xc=null,F.wc=null,sL(n,F);case 3:return b(e,sU(n,u,B,N,j,M,O,_),2);case 2:var t,i,r,a,o;return a_(M.ca,u.Qc)||(u.Qc=M.ca,M.l&&M.ca&&(V=sF(n,u,M.ca),H=function(){var e,t,i,r,a,o;return R(function(s){switch(s.g){case 1:return x(s,2),b(s,V,4);case 4:return e=s.h,rf(n.m),t=null,i=new Map,r={projection:null,hfov:null},(new rx).box("moov",rT).box("trak",rT).box("mdia",rT).S("mdhd",function(e){t=a4(e.reader,e.version).timescale}).box("hdlr",function(e){switch((e=e.reader).skip(8),e.zc()){case"soun":i.set(D.V,t);break;case"vide":i.set(D.na,t)}t=null}).box("minf",rT).box("stbl",rT).S("stsd",rS).box("encv",rA).box("avc1",rA).box("avc3",rA).box("hev1",rA).box("hvc1",rA).box("dvav",rA).box("dva1",rA).box("dvh1",rA).box("dvhe",rA).box("dvc1",rA).box("dvi1",rA).box("vexu",rT).box("proj",rT).S("prji",function(e){r.projection=e.reader.zc()}).box("hfov",function(e){r.hfov=e.reader.R()/1e3}).parse(e),u.type===D.na&&function(e,t){if(e.K.projection!=t.projection||e.K.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new i8("spatialvideoinfo",n)}else n=new i8("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.K=t}}
1(n,r),i.has(u.type)?M.ca.timescale=i.get(u.type):null!=t&&(M.ca.timescale=t),a=u.stream.closedCaptions&&0<u.stream.closedCaptions.size,b(s,n.g.Bg(u.type,e),5);case 5:return b(s,oD(n.g.Z,u.type,e,null,u.stream,a,u.Zc,C),6);case 6:S(s,0);break;case 2:throw o=A(s),u.Qc=null,o}})},G=M.startTime,P&&null!=(K=oM(n.g.Z,u.type))&&(G=K),n.g.Vi(G,M.ca),L.push(H()))),q=u.Ka?u.Ka.i:-1,M.i!=q&&L.push((t=n.g.Z,i=u.type,r=M.startTime,R(function(e){return 1==e.g?i==(a=nY).Aa||(i==a.na&&(t.Ba=new i0),!t.F||(o=oM(t,i))&&.1>Math.abs(o-r))?e.return():(oO(t,i,function(){return oN(t,i)},null),t.m&&oO(t,a.V,function(){return oN(t,a.V)},null),b(e,oO(t,i,function(){return oj(t,i,r)},null),2)):t.m?b(e,oO(t,a.V,function(){return oj(t,a.V,r)},null),0):e.u(0)}))),b(e,Promise.all(L),0)}})),4);case 4:if(rf(i.m),i.B)return t.return();if(h="video/mp4"==c.mimeType||"audio/mp4"==c.mimeType,p=e.ReadableStream,i.i.lowLatencyMode&&i.j.isLowLatency&&p&&h&&("HLS"!=i.j.type||o.m))return g=new Uint8Array(0),v=m=!1,T=function(e){var t,n,u;return R(function(l){switch(l.g){case 1:var d,h,p;if(m||(v=!0,rf(i.m),i.B))return l.return();if(x(l,2),d=g,h=e,(p=new Uint8Array(d.length+h.length)).set(d),p.set(h,d.length),g=p,t=!1,n=0,(new rx).box("mdat",function(e){n=e.size+e.start,t=!0}).parse(g,!1,!0),!t){l.u(4);break}return u=g.subarray(0,n),g=g.subarray(n),b(l,sO(i,r,a,c,o,u,!0,s),5);case 5:r.X&&r.ha&&sg(r.X,o.startTime,!0);case 4:S(l,0);break;case 2:y=A(l),w(l)}})},b(t,sF(i,r,o,T),9);return b(t,sF(i,r,o),7);case 7:if(f=t.h,rf(i.m),i.B)return t.return();return rf(i.m),r.jc?(r.Ga=!1,sG(i,r,0),t.return()):b(t,sO(i,r,a,c,o,f,!1,s),6);case 9:if(k=t.h,y)throw y;if(v){t.u(10);break}return m=!0,rf(i.m),i.B?t.return():r.jc?(r.Ga=!1,sG(i,r,0),t.return()):b(t,sO(i,r,a,c,o,k,!1,s),10);case 10:r.X&&r.ha&&sg(r.X,o.startTime,!0);case 6:if(rf(i.m),i.B)return t.return();r.Ka=o,d.next(),r.Ga=!1,r.Xf=!1,JSON.stringify(i.g.Z.Db()[r.type]),r.jc||(E=null,r.type===l.na?E=i.h.get(l.V):r.type===l.V&&(E=i.h.get(l.na)),E&&E.type==l.V?i.g.me(o,r.stream,E.stream.isAudioMuxedInVideo):i.g.me(o,r.stream,r.stream.codecs.includes(","))),sG(i,r,0),S(t,0);break;case 2:if(I=A(t),rf(i.m,I),i.B)return t.return();if(r.Ga=!1,7001==I.code)r.Ga=!1,sK(r),sG(i,r,0),t.u(0);else if(r.type==l.Aa&&i.i.ignoreTextStreamFailures)i.h.delete(l.Aa),t.u(0);else{if(3017==I.code){return b(t,(z=i,X=r,W=I,R(function(e){if(1==e.g){if(Array.from(z.h.values()).some(function(e){return e!=X&&e.Xf}))return e.u(2);if(Y=0===z.i.maxDisabledTime&&1011==W.code?1:z.i.maxDisabledTime,z.g.disableStream(X.stream,Y))return e.return();if(20<(J=Math.round(100*z.C)))z.C-=.2;else{if(!(4<J))return X.od=!0,z.B=!0,z.g.onError(W),e.return();z.C-=.04}return X.Xf=!0,$=z.g.ld(),b(e,s_(z,X,$),2)}sG(z,X,4),w(e)})),0)}return r.od=!0,1==I.category&&r.X&&sx(r.X,o),I.severity=2,b(t,sz(i,r,I),0)}}})).catch(function(){}),null)}(a,o))&&(sG(a,o,c),o.od=!1),S(t,10);break;case 9:return d=A(t),b(t,sz(a,o,d),11);case 11:return t.return();case 10:if(h=Array.from(a.h.values()),!a.G||!h.every(function(e){return e.endOfStream})){t.u(0);break}return b(t,a.g.Z.endOfStream(),13);case 13:rf(a.m),0!=(p=a.g.Z.getDuration())&&p<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Za(p),w(t)}})),4)}if(2!=r.g)return S(r,0);i=A(r),t.g&&t.g.onError(i),w(r)})}).$(i))}function sK(e){null!=e.ib&&(e.ib.stop(),e.ib=null)}function sq(e){return R(function(t){return e.ob?b(t,e.ob.abort(),0):t.u(0)})}function sz(e,t,n){var i;return R(function(r){if(1==r.g)return b(r,iQ(e.M),2);if(rf(e.m),1===n.category&&1003!=n.code){if(t.dc)return sC(e,!1),r.return();i=0===e.i.maxDisabledTime&&1011==n.code?1:e.i.maxDisabledTime,n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}n.handled&&1011==n.code||e.g.onError(n),n.handled||e.i.failureCallback(n),w(r)})}function sX(e,t,n){var i,r,a,o,s,u;return t=void 0!==t&&t,n=void 0===n||n,R(function(l){if(1==l.g){if(i=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t){if(!e.i.allowMediaSourceRecoveries||i-e.I<r)return l.return(!1);e.I=i}return a=nY,(o=e.h.get(a.V))&&(o.Qc=null,o.xc=null,o.wc=null,n&&sL(e,o),sq(o).catch(function(){}
1),o.ha&&o.ha.Zf()),(s=e.h.get(a.na))&&(s.Qc=null,s.xc=null,s.wc=null,n&&sL(e,s),sq(s).catch(function(){}),s.ha&&s.ha.Zf()),u=new Map,e.l.audio&&u.set(a.V,e.l.audio),e.l.video&&u.set(a.na,e.l.video),b(l,oV(e.g.Z,u),2)}return!s||s.lc||s.Ga||s.ib||sG(e,s,0),!o||o.lc||o.Ga||o.ib||sG(e,o,0),l.return(!0)})}function sW(){}function sY(e,t,n,i,r){var a,o=r in i,s=o?n.constructor==Object&&0==Object.keys(i).length:n.constructor==Object&&0==Object.keys(n).length,u=o||s,l=!0;for(a in t){var c=r+"."+a,d=o?i[r]:n[a];u||a in n?void 0===t[a]?void 0===d||u?delete e[a]:e[a]=tv(d):s?e[a]=t[a]:d.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=tv(d)),c=sY(e[a],t[a],d,i,c),l=l&&c):typeof t[a]!=typeof d||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=d.constructor?(K("Invalid config, wrong type for "+c),l=!1):"function"==typeof n[a]&&n[a].length!=t[a].length?(q("Unexpected number of arguments for "+c),e[a]=t[a]):e[a]=Array.isArray(e[a])?t[a].slice():t[a]:(K("Invalid config, unrecognized key "+c),l=!1)}return l}function sJ(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}oZ.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},o4.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(c=o6.prototype).ready=function(){var e=this;o$(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){if(null==e.g||0==e.g&&1/0!=e.h.duration)e.j=!0;else{var t=e.h.currentTime,n=e.g;0>e.g&&(n=Math.max(0,t+e.g)),t!=n?(e.i.qa(e.h,"seeking",function(){e.j=!0}),e.h.currentTime=n):e.j=!0}})},c.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},c.Ve=function(e){this.g=this.j?this.g:e},c.Ld=function(){return(this.j?this.h.currentTime:this.g)||0},c.vg=function(){return 0},c.ug=function(){return 0},c.ah=function(){},(c=o8.prototype).ready=function(){this.m.ua(.25)},c.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.s=function(){}},c.Ve=function(e){o1(this.h,e)},c.Ld=function(){var e=o0(this.h);return 0<this.i.readyState&&!this.i.paused?se(this,e):e},c.vg=function(){return this.j.G},c.ug=function(){return this.j.C},c.ah=function(){this.j.me()},(c=st.prototype).getNumReferences=function(){return this.g.length},c.getNumEvicted=function(){return this.i},c.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},c.Si=function(){this.o=!0},c.vb=function(e){for(var t=u(this.g),n=t.next();!n.done;n=t.next())e(n.value)},c.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},c.get=function(e){return 0==this.g.length||0>(e-=this.i)||e>=this.g.length?null:this.g[e]},c.offset=function(e){if(!this.o)for(var t=u(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},c.ge=function(e){if(!this.o&&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,l(e))}},c.xd=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.ge(e),this.Ja(t)},c.Ja=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(t){return t.endTime>e}),this.i+=t-this.g.length}},c.Kc=function(e,t,n){if(n=void 0!==n&&n,!this.o){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&&((t=new aB((e=this.g[this.g.length-1]).startTime,t,e.C,e.startByte,e.endByte,e.ca,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey)).mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},c.De=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new eB(function(){var e=t();e?n.g.push.apply(n.g,l(e)):(n.m.stop(),n.m=null)}),this.m.ua(e))},st.prototype[Symbol.iterator]=function(){return this.Ob(0)},st.prototype.Ob=function(e,t,n){t=void 0!==t&&t,n=void 0!==n&&n;var i=this.find(e);if(null==i)return null;var r=this.get(i);n?i++:i--;var a=-1;if(r&&0<r.g.length)for(var o=r.g.length-1;0<=o;--o){var s=r.g[o];if(e>=s.startTime&&e<s.endTime){if(!t){for(;o&&!s.l;)o--,s=r.g[o];if(!s.l)return K("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new sr(this,i,a,n)},B("shaka.media.SegmentIndex",st),st.forSingleSegment=si,st.prototype.getIteratorForTime=st.prototype.Ob,st.prototype.updateEvery=st.prototype.De,st.prototype.fit=st.prototype.Kc,st.prototype.evict=st.prototype.Ja,st.prototype.mergeAndEvict=st.prototype.xd,st.prototype.offset=st.prototype.offset,st.prototype.get=st.prototype.get,st.prototype.find=st.prototype.find,st.prototype.markImmutable=st.prototype.Si,st.prototype.release=st.prototype.release,st.prototype.getNumEvicted=st.prototype.getNumEvicted,st.prototype.getNumReferences=st.prototype.getNumReferences,(c=sr.prototype).ad=function(e){this.reverse=e},c.Vh=function(){return this.h},c.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e}
1,c.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},c.Zf=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},B("shaka.media.SegmentIterator",sr),sr.prototype.resetToLastIndependent=sr.prototype.Zf,sr.prototype.next=sr.prototype.next,sr.prototype.current=sr.prototype.current,sr.prototype.currentPosition=sr.prototype.Vh,sr.prototype.setReverse=sr.prototype.ad,g(sa,st),(c=sa.prototype).clone=function(){var e=new sa;return e.h=this.h.slice(),e.i=this.i,e},c.release=function(){for(var e=u(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},c.vb=function(e){for(var t=u(this.h),n=t.next();!n.done;n=t.next())n.value.vb(e)},c.find=function(e){for(var t=this.i,n=u(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},c.get=function(e){for(var t=this.i,n=u(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},c.offset=function(){},c.ge=function(){},c.Ja=function(e){for(var t=u(this.h),n=t.next();!n.done;n=t.next())n.value.Ja(e);for(;1<this.h.length&&0==this.h[0].getNumReferences();)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},c.xd=function(){},c.Kc=function(){},c.De=function(){},B("shaka.media.MetaSegmentIndex",sa),sa.prototype.updateEvery=sa.prototype.De,sa.prototype.fit=sa.prototype.Kc,sa.prototype.mergeAndEvict=sa.prototype.xd,sa.prototype.evict=sa.prototype.Ja,sa.prototype.merge=sa.prototype.ge,sa.prototype.offset=sa.prototype.offset,sa.prototype.get=sa.prototype.get,sa.prototype.find=sa.prototype.find,sa.prototype.forEachTopLevelReference=sa.prototype.vb,sa.prototype.release=sa.prototype.release,so.prototype.release=function(){this.set(this.qc()),this.h&&(this.h.stop(),this.h=null),this.g=null},so.prototype.set=function(e){this.i=e,ss(this)},so.prototype.qc=function(){return this.g.qc()},su.prototype.release=function(){this.g&&(this.g.release(),this.g=null),this.i.stop();for(var e=u(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h.clear()},g(sc,re),sc.prototype.release=function(){this.g.clear(),re.prototype.release.call(this)},sc.prototype.j=function(e){for(var t=u(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).ef;e:{for(var r=n.Gd,a=r.length-1;0<=a;a--){var o=r[a];if(o.position<=e){r=o.Sc;break e}}r=null}a=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),o=r&&i&&r.label&&i.label&&i.label!==r.label;var s=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!eM(i.roles,r.roles),(o||s||i)&&sd(this,e,r.contentType)&&(n.ef=r,i=new i8("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&sd(this,e,r.contentType)&&(n.ef=r,JSON.stringify(r),n=new i8("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},g(sp,re),sp.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),re.prototype.release.call(this)},sf.prototype.Ja=function(e,t){t=void 0!==t&&t;for(var n=u(this.h.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&sx(this,i);t&&sb(this)},sf.prototype.ad=function(e){this.o=e,this.g&&this.g.ad(e)},sT.prototype.abort=function(){this.Dd&&this.Dd.abort()},(c=sM.prototype).destroy=function(){return this.m.destroy()},c.configure=function(e){if(this.i=e,this.M=new i$({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),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.X&&(sy(t.X),t.X=null),t=u(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,sy(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(nW))&&t.X&&(sy(t.X),t.X=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.X&&(sy(t.X),t.X=null),n=(t=u(this.h.keys())).next();!n.done;n=t.next())(n=this.h.get(n.value)).X?(sw(n.X,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(sy(n.X),n.X=null)):0<e.segmentPrefetchLimit&&(n.X=sj(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=u(e.j.variants),r=i.next(),a={};!r.done;a={sb:void 0},r=i.next())if(a.sb=r.value,a.sb.audio)if(e.o.has(a.sb.audio)){if(sw(r=e.o.get(a.sb.audio),t),!(0<t&&n.some(function(e){return function(t){return ih(e.sb.audio.language,t)}}(a)))){var o=e.h.get(a.sb.audio.type);r!==(o&&o.X)&&sy(r),e.o.delete(a.sb.audio)}}else!(0>=t)&&n.some(function(e){return function(t){return ih(e.sb.audio.language,t)}}(a))&&(r=sj(e,a.sb.audio))&&(a.sb.audio.segmentIndex||a.sb.audio.createSegmentIndex(),e.o.set(a.sb.audio,r))}(this)},c.start=function(e){var t=this;return R(function(n){if(1==n.g){var i,r,a,o,s,l,c,d,h,p;return b(n,(i=t,r=e||new Map,R(function(e){if(1==e.g){if(a=nY,!i.l)throw new eC(2,5,5006);return o=new Map,i.l.audio&&o.set(a.V,i.l.audio),i.l.video&&o.set(a.na,i.l.video),i.s&&o.set(a.Aa,i.s),b(e,i.g.Z.init(o,i.j.sequenceMode,i.j.type,i.j.ignoreManifestTimestampsInSegmentsMode),2)}for(rf(i.m),i.updateDuration(),l=(s=u(o.keys())).next();!l.done;l=s.next())c=l.value,d=o.get(c),i.h.has(c)||(h=sN(i,d),r.has(d.id)&&(function(e,t){e.l=t,e=u(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}(p=r.get(d.id),function(e,t,n){return sV(e,t,n||null,i.i.retryParameters,i.g.Sb)}),h.X=p),i.h.set(c,h),sG(i,h,0));w(e)})),2)}rf(t.m),t.G=!0,w(n)})},c.Zc=function(){if(this.g)for(var e=this.g.ld(),t=u(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=this.g.Z;if(!(r=i==nW?null!=(r=r.h).g&&null!=r.h&&e>=r.g&&e<r.h:aK(r=oC(r,i),e))){if(this.I=0,n.X&&(n.X.g=null),"audio"===n.type){r=u(this.o.values());for(var a=r.next();!a.done;a=r.next())a.value.g=null}n.ha=null,(null!=oM(this.g.Z,i)||n.Ga)&&sL(this,n),n.ob&&(n.ob.abort(),n.ob=null),i===nW&&(i=this.g.Z).M&&i.M.g(),n.Zc=!0}}},c.updateDuration=function(){var t=!!(t=e.ManagedMediaSource||e.MediaSource)&&!!t.prototype&&!!t.prototype.setLiveSeekableRange&&!!t.prototype.clearLiveSeekableRange,n=this.j.presentationTimeline.getDuration();1/0>n?(t&&(this.A&&this.A.stop(),oP(this.g.Z)),this.g.Z.Za(n)):t?(this.A&&this.A.ua(.5),this.g.Z.Za(1/0)):this.g.Z.Za(0x100000000)};function s$(e,t){function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}return!function e(t){for(var i=u(Object.keys(t)),r=i.next();!r.done;r=i.next())if(!(t[r=r.value]instanceof HTMLElement))if(n(t[r])&&0===Object.keys(t[r]).length)delete t[r];else{var a=t[r];Array.isArray(a)&&0===a.length||"function"==typeof t[r]?delete t[r]:n(t[r])&&(e(t[r]),0===Object.keys(t[r]).length&&delete t[r])}}(e=function e(t,i){return Object.keys(t).reduce(function(r,a){var o=t[a];return i.hasOwnProperty(a)?o instanceof HTMLElement&&i[a]instanceof HTMLElement?o.isEqualNode(i[a])||(r[a]=o):n(o)&&n(i[a])?(0<Object.keys(o=e(o,i[a])).length||!n(o))&&(r[a]=o):Array.isArray(o)&&Array.isArray(i[a])?eI(o,i[a])||(r[a]=o):Number.isNaN(o)&&Number.isNaN(i[a])||o!==i[a]&&(r[a]=o):r[a]=o,r},{})}(e,t)),e}function sQ(){this.g=null}function sZ(){}function s0(e){return new nw(e=tr(e)).ub}function s1(e,t,n){function i(e){ef(a).setUint32(o,e.byteLength,!0),o+=4,a.set(eh(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new eC(2,6,6015);
1var r="string"==typeof t?to(t,!0):t,a=new Uint8Array(12+(e=to(e=tr(e),!0)).byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function s2(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=tr(e).split("skd://").pop(),s1(e,n,t))}function s3(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")}function s4(){}function s5(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:iZ(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return"apple"===e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,i=s0(t),t=s1(t,i,n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:eG(),minHdcpVersion:"",ignoreDuplicateInitData:!e4("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(eG()||e$())&&n.preferredKeySystems.push("com.microsoft.playready"),e0()&&!eH()&&(n.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"});var i="reload",r=!1;!ee()||eK()||e$()||eJ()||ez()&&79===eW()||eX()&&!e1()&&!e2()||e0()&&eH()||(i="smooth",r=!0),r={retryParameters:iZ(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:s9,manifestPreprocessorTXml:s7,sequenceMode:!1,multiTypeVariantsAllowed:r,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0,ignoreSupplementalCodecs:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:function(){if(eq()||e4("Tizen 2")||ez()&&38===eW()||e$()||eJ())return!1;var e=eZ();return!e5()||!!eY()||null==e||!(15>e)}(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,updatePeriod:-1,allowLowLatencyByteRangeOptimization:!0,ignoreSupplementalCodecs:!1},mss:{manifestPreprocessor:s9,manifestPreprocessorTXml:s7,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var a={retryParameters:iZ(),failureCallback:function(e){},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:e$()||eJ(),dontChooseCodecs:!1,shouldFixTimestampOffset:ez()||eK()};(ez()||eK()||eX()||eQ())&&(a.stallSkip=0),(navigator.userAgent.match(/Edge\//)||eG())&&(a.gapPadding=.01),eK()&&(a.gapPadding=2);var o={trackSelectionCallback:function(e){return R(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return R(function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?b(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};t={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,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:.5*!!eY(),preferNetworkInformationBandwidth:!1},i={codecSwitchingStrategy:i,addExtraFeaturesToSourceBuffer:function(e){return""},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(e,t){},dispatchAllEmsgBoxes:!1};var s=!1,c=!1,d=!0;e3()&&(c=s=!0,d=!1);var h={drm:n,manifest:r,streaming:a,mediaSource:i,offline:o,abrFactory:function(){return new iX},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(sQ,[null].concat(l(P.apply(0,arguments)))))},abr:t,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:s,skipPlayDetection:c,supportsMultipleMediaElements:d,disableHLSInterstitial:!1,disableDASHInterstitial:!1},ignoreHardwareResolution:!1};return o.trackSelectionCallback=function(e){return R(function(t){return t.return(function(e,t,n){var i=n;"AUTO"==i&&(i=e9(n=e.some(function(e){return!!e.hdr&&"HLG"==e.hdr})));var r=e.filter(function(e){return"variant"==e.type&&(!e.hdr||e.hdr==i)});n=[];var a=iw(t,r.map(function(e){return e.language}));a&&(n=r.filter(function(e){return im(e.language)==a})),0==n.length&&(n=r.filter(function(e){return e.primary})),0==n.length&&(r.map(function(e){return e.language}),n=r);var o=n.filter(function(e){return e.height&&480>
1=e.height});for(o.length&&(o.sort(function(e,t){return t.height-e.height}),n=o.filter(function(e){return e.height==o[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(e,t){return e.bandwidth-t.bandwidth}),t.push(n[r])),n=(e=u(e)).next();!n.done;n=e.next())(n=n.value).type!=nW&&"image"!=n.type||t.push(n);return t}(e,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})},h}function s6(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function s8(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:"",headers:{}}};return sY(e,t,n||s5(),i,"")}function s9(e){var t,n;return t=[e],n=e,t&&n}function s7(e){var t,n;return t=[e],n=e,t&&n}function ue(){this.g=null,this.h=[]}function ut(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=u(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function un(){this.i=this.h=null,this.g=[]}function ui(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 ur(){this.kc=this.Wg=this.s=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.W=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new ue,this.h=new un}function ua(e,t,n,i){re.call(this),this.M=e,this.W=t,this.Ba=i.networkingEngine,this.B=n,this.o=null,this.wa=0,this.Ma=i.Hc,this.F=i.Pi,this.Oa=i.Qi,this.g=i.config,this.l=this.G=this.h=null,this.ja=!1,this.H=i.$i,this.oa=!1,this.i=null,this.ga=!1,this.j=this.C=null,this.ba=!1,this.L=new Map,this.sa=!1,this.Da=i.Zi,this.aa=new ur,this.ia=new i0,this.m=new i0,this.O=null,this.s=!1,this.da=i.Mh,this.ma=null,this.Ia=i.Lh,this.P=!1,this.K=[],this.I=[],this.A=!0}function uo(e,t,n){(e=t?e.I:e.K)?e.push(n):n()}function us(e,t){if(e.O=t,e.P=!0,e.K){t=u(e.K);for(var n=t.next();!n.done;n=t.next())(n=n.value)()}e.K=null}function uu(e){if(e.s)throw new eC(2,7,7003)}function ul(e,t){e.dispatchEvent(new i8("onstatechange",(new Map).set("state",t)))}function uc(e,t){var n,i,r,a;return R(function(o){switch(o.g){case 1:if(!e.h||e.i)return o.return();if(ul(e,"drm-engine"),e.wa=Date.now()/1e3,e.i=e.Ma(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.A}),!at(e.F,e.h)){o.u(2);break}return n=new i8("trackschanged",void 0),b(o,Promise.resolve(),3);case 3:uu(e),e.dispatchEvent(n);case 2:return i=i_(e.h.variants),r=!0,e.h&&e.h.presentationTimeline&&"HLS"!=e.h.type&&(r=e.h.presentationTimeline.T()),b(o,rj(e.i,i,e.h.offlineSessionIds,r),4);case 4:if(uu(e),!t){o.u(5);break}return b(o,e.i.Ib(t),6);case 6:uu(e);case 5:return b(o,ae(e.F,e.h),7);case 7:if(!o.h){o.u(0);break}return a=new i8("trackschanged",void 0),b(o,Promise.resolve(),9);case 9:e.dispatchEvent(a),w(o)}})}function ud(e,t,n){var i,r,a,o;return R(function(s){return 1==s.g?(i=new sf(e.g.streaming.segmentPrefetchLimit||2,t,function(t,n,i){return sV(t,n,i||null,e.g.streaming.retryParameters,e.Ba,e.A)},!1),e.L.set(t.id,i),t.segmentIndex?s.u(2):b(s,t.createSegmentIndex(),2)):(r=e.B||0,a=t.segmentIndex.Ob(r),o=null,a&&((o=a.current())||(o=a.next().value)),o||(o=sn(t.segmentIndex)),o?n?o.ca?b(s,sm(i,o.ca),0):s.u(0):b(s,sg(i,o.startTime),0):s.u(0))})}function uh(e,t){re.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Fc:null,Ec:ug,uc:function(e,t){return up(n,"enter",e,t)}},{Fc:uf,Ec:ug,uc:function(e,t){return up(n,"enter",e,t)}},{Fc:um,Ec:ug,uc:function(e,t){return up(n,"enter",e,t)}},{Fc:ug,Ec:uf,uc:function(e,t){return up(n,"exit",e,t)}},{Fc:ug,Ec:um,uc:function(e,t){return up(n,"exit",e,t)}},{Fc:uf,Ec:um,uc:function(e,t){t?up(n,"skip",e,t):(up(n,"enter",e,t),up(n,"exit",e,t))}},{Fc:um,Ec:uf,uc:function(e,t){return up(n,"skip",e,t)}}],this.h=new J,this.h.D(this.i,"regionremove",function(e){n.g.delete(e.region)})}function up(e,t,n,i){t=new i8(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}B("shaka.util.ConfigUtils",sW),sW.getDifferenceFromConfigObjects=s$,sW.convertToConfigObject=sJ,sW.mergeConfigObjects=sY,sQ.prototype.configure=function(e){this.g=e},sQ.prototype.create=function(e){if(this.g.language){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,x=(y=e,b=this.g.language,(w=iw(b=im(b),y.map(function(e){return ib(e)})))?y.filter(function(e){return w==ib(e)}):[]);x.length&&(v=x)}return v||(v=(v=e.filter(function(e){return e.primary})).length?v:e),(t=v,n=this.g.role,e=t.filter(function(e){return!!e.audio&&(n?e.audio.roles.includes(n):0==e.audio.roles.length)})).length&&(v=e),this.g.videoLayout&&(i=v,r=this.g.videoLayout,e=i.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==r})).length&&(v=e),this.g.Nc&&(a=v,"AUTO"==(o=this.g.Nc)&&(o=e9(a.some(function(e){return!!e.video&&!!e.video.hdr&&"HLG"==e.video.hdr}
1))),e=a.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==o})).length&&(v=e),this.g.channelCount&&(s=v,u=this.g.channelCount,e=s.filter(function(e){return!e.audio||!e.audio.channelsCount||!(e.audio.channelsCount>u)}).sort(function(e,t){return e.audio||t.audio?e.audio?t.audio?(t.audio.channelsCount||0)-(e.audio.channelsCount||0):1:-1:0})).length&&(v=e),this.g.Gc&&(l=v,c=this.g.Gc,e=l.filter(function(e){return!!e.audio&&!!e.audio.label&&e.audio.label.toLowerCase()==c.toLowerCase()})).length&&(v=e),this.g.bd&&(d=v,h=this.g.bd,e=d.filter(function(e){return!!e.video&&!!e.video.label&&e.video.label.toLowerCase()==h.toLowerCase()})).length&&(v=e),(p=v,f=this.g.spatialAudio,e=p.filter(function(e){return!e.audio||e.audio.spatialAudio==f})).length&&(v=e),this.g.audioCodec&&(g=v,m=this.g.audioCodec,e=g.filter(function(e){return!e.audio||e.audio.codecs==m})).length&&(v=e),new r2(v[0],v,!("smooth"==this.g.codecSwitchingStrategy&&ee()))},B("shaka.util.FairPlayUtils",sZ),sZ.commonFairPlayResponse=function(e,t){if(2===e){try{var n=tn(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=ed(n_(n)))}},sZ.expressplayFairPlayRequest=function(e,t){s3(e,t)},sZ.conaxFairPlayRequest=function(e,t){s3(e,t)},sZ.ezdrmFairPlayRequest=function(e,t){s3(e,t)},sZ.verimatrixFairPlayRequest=function(e,t){2===e&&(e=nO(e=eh(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=ta("spc="+e))},sZ.expressplayInitDataTransform=function(e,t,n){return s2(e,t,n)},sZ.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=tr(t).split("skd://").pop().split("?").shift();var r=new ArrayBuffer(2*(i=e.atob(i)).length);r=ep(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return s1(t,r,n)},sZ.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=tr(e).split(";").pop(),s1(e,n,t))},sZ.verimatrixInitDataTransform=function(e,t,n){return s2(e,t,n)},sZ.initDataTransform=s1,sZ.defaultGetContentId=s0,sZ.isFairPlaySupported=function(){var e;return R(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},x(t,2),b(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(A(t),t.return(!1))})},B("shaka.util.PlayerConfiguration",s4),s4.mergeConfigObjects=s8,s4.createDefaultForLL=s6,s4.createDefault=s5,g(ua,re),(c=ua.prototype).getStartTime=function(){return this.B},c.Mc=function(){return this.M},c.zf=function(){return this.h},c.getStats=function(){return this.aa},c.start=function(){var t,n=this;R(function(i){var r,a,o,s,l,c,d,h,p,f,g,m,v,y,T,k,E;switch(i.g){case 1:return b(i,Promise.resolve(),2);case 2:return x(i,3),b(i,(r=n,R(function(e){switch(e.g){case 1:if(ul(r,"manifest-parser"),r.l||(r.G=au(r.M,r.W),r.l=r.G(),r.l.configure(r.g.manifest,function(){return r.A})),a=Date.now()/1e3,ul(r,"manifest"),r.h){e.u(2);break}return b(e,r.l.start(r.M,r.Oa),3);case 3:if(r.h=e.h,1!=r.h.variants.length){e.u(2);break}for(o=[],c=(l=u([(s=r.h.variants[0]).video,s.audio])).next();!c.done;c=l.next())(d=c.value)&&!d.segmentIndex&&o.push(d.createSegmentIndex());if(!(0<o.length)){e.u(2);break}return b(e,Promise.all(o),2);case 2:return r.ia.resolve(),h=new i8("manifestparsed",void 0),b(e,Promise.resolve(),7);case 7:if(r.dispatchEvent(h),0==r.h.variants.length)throw new eC(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))})(r.h),p=Date.now()/1e3-a,r.aa.H=p,w(e)}})),5);case 5:if(uu(n),"webkit"===e.shakaMediaKeysPolyfill){i.u(6);break}return b(i,uc(n),7);case 7:uu(n);case 6:return b(i,(f=n,R(function(e){return(f.o||(f.o=f.g.adaptationSetCriteriaFactory(),f.o.configure({language:f.g.preferredAudioLanguage,role:f.g.preferredVariantRole,channelCount:f.g.preferredAudioChannelCount,Nc:f.g.preferredVideoHdrLevel,spatialAudio:f.g.preferSpatialAudio,videoLayout:f.g.preferredVideoLayout,Gc:f.g.preferredAudioLabel,bd:f.g.preferredVideoLabel,codecSwitchingStrategy:f.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),f.Ia&&(g=f.g.abrFactory,f.C=g,f.j=g(),f.j.configure(f.g.abr)),f.da&&(m=f.h.presentationTimeline.T(),v=i_(f.h.variants),y=f.o.create(v),f.j.configure(f.g.abr),f.j.setVariants(Array.from(y.values())
1),T=f.j.chooseVariant()))?(k=[],f.ma=T,T.video&&k.push(ud(f,T.video,m)),T.audio&&k.push(ud(f,T.audio,m)),b(e,Promise.all(k),0)):e.u(0)})),8);case 8:if(uu(n),!n.da||!n.i){i.u(9);break}return b(i,(E=n.i,R(function(e){return 1==e.g?E.K?b(e,E.m,3):e.u(0):b(e,Promise.all(E.W.map(function(e){return e.promise})),0)})),10);case 10:uu(n);case 9:n.m.resolve(),S(i,0);break;case 3:(t=A(i))instanceof eC&&(7001==t.code||7003==t.code)||n.m.reject(t),w(i)}})},c.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):re.prototype.dispatchEvent.call(this,e)},c.onError=function(e){2===e.severity&&(this.m.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new i8("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},c.configure=function(e,t){e=sJ(e,t),s8(this.g,e)},c.getConfiguration=function(){return tv(this.g)},c.zj=function(){return this.m},c.destroy=function(){var e,t,n=this;return R(function(i){switch(i.g){case 1:if(n.s=!0,!n.l||n.ja){i.u(2);break}return b(i,n.l.stop(),2);case 2:if(!n.j||n.ba){i.u(4);break}return b(i,n.j.stop(),4);case 4:if(n.H&&!n.oa&&n.H.release(),!n.i||n.ga){i.u(6);break}return b(i,n.i.destroy(),6);case 6:if(0<n.L.size&&!n.sa)for(t=(e=u(n.L.values())).next();!t.done;t=e.next())sy(t.value);w(i)}})},B("shaka.media.PreloadManager",ua),ua.prototype.destroy=ua.prototype.destroy,ua.prototype.waitForFinish=ua.prototype.zj,g(uh,re),uh.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,re.prototype.release.call(this)},uh.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=u(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?uf:e>i.endTime?um:ug;this.g.set(i,a);for(var o=u(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Fc==r&&s.Ec==a&&s.uc(i,t)}}};var uf=1,ug=2,um=3;function uv(e,t,n){var i,r,a,o,s;return R(function(u){switch(u.g){case 1:var l=new nw(e).Ya.split("/").pop().split(".");if(i=1==l.length?"":l.pop().toLowerCase(),r=uy.get(i))return u.return(r);return a=0,o=ro([e],n),x(u,2),o.method="HEAD",b(u,t.request(a,o).promise,4);case 4:r=u.h.headers["content-type"],S(u,3);break;case 2:if(!(s=A(u))||1002!=s.code&&1001!=s.code){u.u(3);break}return o.method="GET",b(u,t.request(a,o).promise,6);case 6:r=u.h.headers["content-type"];case 3:return u.return(r?r.toLowerCase().split(";").shift():"")}})}var uy=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function ub(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function uw(e,t){var n=[];e=u(ux(e));for(var i=e.next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,l(uw(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=function e(t,n){if(t.lineBreak)return"\n";if(t.nestedCues.length)return t.nestedCues.map(function(n){return e(n,t)}).join("");if(!t.payload)return t.payload;var i=[],r=t.fontWeight>=na,a=t.fontStyle==ns,o=t.textDecoration.includes(nl);return r&&i.push(["b"]),a&&i.push(["i"]),o&&i.push(["u"]),""==(a=t.color)&&n&&(a=n.
1color),r="",(a=ub(a))&&(r+="."+a),""==(a=t.backgroundColor)&&n&&(a=n.backgroundColor),(n=ub(a))&&(r+=".bg_"+n),r&&i.push(["c",r]),i.reduceRight(function(e,t){var n=u(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"},t.payload)}(i,t),n.push(r)}return n}function ux(e){var t=[];e=u(e);for(var n=e.next(),i={};!n.done;i={bf:void 0},n=e.next())i.bf=n.value,t.some(function(e){return function(t){return tQ(e.bf,t)}}(i))||t.push(i.bf);return t}function uT(e,t){for(this.h=e,this.i=t,this.g=null,t=(e=u(Array.from(this.h.textTracks))).next();!t.done;t=e.next())"metadata"!==(t=t.value).kind&&"chapters"!==t.kind&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}function uS(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function uA(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=u(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function uk(){}function uE(t,n){var i=this;this.s=!1,this.h=[],this.j=t,this.B=n,this.F=this.m=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.B.appendChild(this.g),this.o=new eB(function(){i.j.paused||uM(i)}),uI(this),this.l=new Map,this.i=new J,this.i.D(document,"fullscreenchange",function(){uM(i,!0)}),this.i.D(this.j,"seeking",function(){uM(i,!0)}),this.i.D(this.j,"ratechange",function(){uI(i)}),this.i.D(this.j,"resize",function(){var e=i.j,t=e.videoWidth;e=e.videoHeight,t&&e?i.m=t/e:i.m=null}),this.A=null,"ResizeObserver"in e&&(this.A=new ResizeObserver(function(){uM(i,!0)}),this.A.observe(this.g)),this.C=new Map}function uI(e){e.o&&(e.h.length?e.o.ua((e.F?e.F.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.o.stop())}function uM(e,t){if(e.g){var n=e.j.currentTime;if(!e.s||(void 0===t?0:t)){t=u(e.C.values());for(var i=t.next();!i.done;i=t.next())aY(i.value);aY(e.g),e.l.clear(),e.C.clear()}e.s&&function e(t,n,i,r,a){var o=!1,s=[],l=[];n=u(n);for(var c=n.next();!c.done;c=n.next()){c=c.value,a.push(c);var d=t.l.get(c),h=c.startTime<=r&&c.endTime>r,p=d?d.Fh:null;d&&(s.push(d.df),d.Bc&&s.push(d.Bc),h||(o=!0,t.l.delete(c),d=null)),h&&(l.push(c),d?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,p)||(o=!0):(function(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),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=uC(n.linePadding,n,e.B),u.paddingRight=uC(n.linePadding,n,e.B),u.textCombineUpright=n.textCombineUpright,u.textShadow=n.textShadow,n.backgroundImage)u.backgroundImage="url('"+n.backgroundImage+"')",u.backgroundRepeat="no-repeat",u.backgroundSize="contain",u.backgroundPosition="center",n.backgroundColor&&(u.backgroundColor=n.backgroundColor),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.setAttribute("translate","no"),h.textContent=d)}c&&!i[i.length-1].isContainer?u.display="inline":(u.display="flex",u.flexDirection="column",u.alignItems="center","left"==n.textAlign||"start"==n.textAlign?(u.width="100%",u.alignItems="start"):("right"==n.textAlign||"end"==n.textAlign)&&(u.width="100%",u.alignItems="end"),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=uC(n.fontSize,n,e.B),null!=(i=n.line)&&((l=n.lineInterpretation)==t7&&(l=1,c=16,e.m&&1>e.m&&(c=32),i=0>i?100+i/c*100:i/c*100),1==l&&(u.position="absolute",n.writingMode==t9?(u.width="100%",n.lineAlign==ne?u.top=i+"%":"end"==n.lineAlign&&(u.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(u.height="100%",
1n.lineAlign==ne?u.left=i+"%":"end"==n.lineAlign&&(u.right=100-i+"%")):(u.height="100%",n.lineAlign==ne?u.right=i+"%":"end"==n.lineAlign&&(u.left=100-i+"%")))),u.lineHeight=n.lineHeight,o=(a=n).direction,s=a.positionAlign,a=a.textAlign,"line-left"==(e=s!==t2?s:"left"===a||"start"===a&&o===t8||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===t8?"line-right":"center")?(u.cssFloat="left",null!==n.position&&(u.position="absolute",n.writingMode==t9?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%")):"line-right"==e?(u.cssFloat="right",null!==n.position&&(u.position="absolute",n.writingMode==t9?(u.right=100-n.position+"%",u.width="auto"):u.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(u.position="absolute",n.writingMode==t9?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%"),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==t9?u.width=n.size+"%":u.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id){var o=t.region,s=e.m===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==eS?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==eS?"%":"px"),e.C.has(n))n=e.C.get(n);else{r=document.createElement("span");var u=o.heightUnits==eS?"%":"px",l=o.widthUnits==eS?"%":"px",c=o.viewportAnchorUnits==eS?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var d=o.height,h=o.width;2===o.heightUnits&&(d=5.33*o.height,u="%"),2===o.widthUnits&&(h=o.width*s,l="%"),r.style.height=d+u,r.style.width=h+l,2===o.viewportAnchorUnits?(s=o.viewportAnchorY/75*100,u=o.viewportAnchorX/(e.m===4/3?160:210)*100,s-=o.regionAnchorY*d/100,u-=o.regionAnchorX*h/100,r.style.top=s+"%",r.style.left=u+"%"):(r.style.top=o.viewportAnchorY-o.regionAnchorY*d/100+c,r.style.left=o.viewportAnchorX-o.regionAnchorX*h/100+c),0!==o.heightUnits&&0!==o.widthUnits&&0!==o.viewportAnchorUnits&&(o=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=o+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.C.set(n,r),n=r}}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.l.set(t,{df:a,Fh:r,Bc:n})}(t,c,a),p=(d=t.l.get(c)).Fh,o=!0)),0<c.nestedCues.length&&p&&e(t,c.nestedCues,p,r,a),a.pop()}if(o){for(a=(r=u(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(l.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),r=(l=u(l)).next();!r.done;r=l.next())(r=t.l.get(r.value)).Bc?(r.Bc.contains(i)&&r.Bc.removeChild(i),i.appendChild(r.Bc),r.Bc.appendChild(r.df)):i.appendChild(r.df)}}(e,e.h,e.g,n,[])}}function uC(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 uD(e,t){this.h=e,this.g=t,this.i=void 0,this.s=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new J,this.j=null}function uR(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:t.g.version,sf:t.i,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function uP(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled)if(r=e,Object.assign(a=void 0===(a=n)?{}:a,uR(r)),a.pr=r.h.eb(),c=a.ot===u_||a.ot===uB,r.B&&c&&(a.bs=!0,a.su=!0,r.B=!1),null==a.su&&(a.su=r.F),a.v===uG&&(r.h.T()&&(a.ltc=r.h.Xd()),void 0!=(c=!r.G&&r.o&&r.m?r.o-(r.A||r.m):void 0)&&(a.msd=c,r.G=!0)),o=r,s=a,e=(l=o.g.includeKeys).length?Object.keys(s).reduce(function(e,t){return l.includes(t)&&(e[t]=s[t]),e},{}):s,i)Object.keys(i=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,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=u(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=uN(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(e)).length&&Object.assign(t.headers,i);else{var r,a,o,s,l,c,d=uN(e);d&&(t.uris=t.uris.map(function(e){return uj(e,d)}))}}function uL(e,t){if(!(t=e.h.Db()[t]).length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}
1))?1e3*(e.end-n):0}function uN(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=u(a);for(var o=a.next();!o.done;o=a.next()){var s,l=e[o=o.value];if(!Number.isNaN(s=l)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==l)&&("pr"!=o||1!==l)){var c=r[o];c&&(l=c(l));var d=void 0;d="string"==(c=typeof l)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(l):"boolean"===c?o:"symbol"===c?o+"="+l.description:o+"="+l,i.push(d)}}return i.join(",")}function uj(e,t){return!t||e.includes("offline:")?e:((e=new nw(e)).g.set("CMCD",t),e.toString())}(c=uT.prototype).configure=function(){},c.remove=function(e,t){return!!this.g&&(uA(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},c.append=function(e){if(this.g){var t=uw(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=u(t);for(var i=t.next(),r={};!i.done;r={Oc:void 0},i=t.next())r.Oc=i.value,!e.some(function(e){return function(t){return t.startTime==e.Oc.startTime&&t.endTime==e.Oc.endTime&&t.text==e.Oc.payload}}(r))&&r.Oc.payload&&(i=function(e){function t(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=n.align&&(n.align="middle"),"vertical-lr"==e.writingMode?n.vertical="lr":"vertical-rl"==e.writingMode&&(n.vertical="rl"),1==e.lineInterpretation&&(n.snapToLines=!1),null!=e.line&&(n.line=e.line),null!=e.position&&(n.position=e.position),n}(r.Oc))&&n.push(i);for(t=(e=u(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();!t.done;t=e.next())this.g.addCue(t.value)}},c.destroy=function(){return this.g&&(uA(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},c.isTextVisible=function(){return!!this.g&&"showing"==this.g.mode},c.setTextVisibility=function(e){e&&!this.g&&uS(this),this.g&&(this.g.mode=e?"showing":"hidden")},c.setTextLanguage=function(){},c.enableTextDisplayer=function(){uS(this)},B("shaka.text.SimpleTextDisplayer",uT),uT.prototype.enableTextDisplayer=uT.prototype.enableTextDisplayer,uT.prototype.setTextLanguage=uT.prototype.setTextLanguage,uT.prototype.setTextVisibility=uT.prototype.setTextVisibility,uT.prototype.isTextVisible=uT.prototype.isTextVisible,uT.prototype.destroy=uT.prototype.destroy,uT.prototype.append=uT.prototype.append,uT.prototype.remove=uT.prototype.remove,uT.prototype.configure=uT.prototype.configure,(c=uk.prototype).configure=function(){},c.remove=function(){},c.append=function(){},c.destroy=function(){},c.isTextVisible=function(){return!1},c.setTextVisibility=function(){},c.setTextLanguage=function(){},c.enableTextDisplayer=function(){},B("shaka.text.StubTextDisplayer",uk),uk.prototype.enableTextDisplayer=uk.prototype.enableTextDisplayer,uk.prototype.setTextLanguage=uk.prototype.setTextLanguage,uk.prototype.setTextVisibility=uk.prototype.setTextVisibility,uk.prototype.isTextVisible=uk.prototype.isTextVisible,uk.prototype.destroy=uk.prototype.destroy,uk.prototype.append=uk.prototype.append,uk.prototype.remove=uk.prototype.remove,uk.prototype.configure=uk.prototype.configure,(c=uE.prototype).configure=function(e){this.F=e,uI(this)},c.append=function(e){var t=[].concat(l(this.h));e=u(ux(e));for(var n=e.next(),i={};!n.done;i={cf:void 0},n=e.next())i.cf=n.value,t.some(function(e){return function(t){return tQ(t,e.cf)}}(i))||this.h.push(i.cf);this.h.length&&uI(this),uM(this)},c.destroy=function(){return this.g&&(this.B.removeChild(this.g),this.g=null,this.s=!1,this.h=[],this.o&&(this.o.stop(),this.o=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.A&&(this.A.disconnect(),this.A=null)),Promise.resolve()},c.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(n){return n.startTime<e||n.endTime>=t}),uM(this,n>this.h.length),this.h.length||uI(this),!0},c.isTextVisible=function(){return this.s},c.setTextVisibility=function(e){this.s=e,uM(this,!0)},c.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},c.enableTextDisplayer=function(){},B("shaka.text.UITextDisplayer",uE),uE.prototype.enableTextDisplayer=uE.prototype.enableTextDisplayer,uE.prototype.setTextLanguage=uE.prototype.setTextLanguage,uE.prototype.setTextVisibility=uE.prototype.setTextVisibility,uE.prototype.isTextVisible=uE.prototype.isTextVisible,uE.prototype.remove=uE.prototype.remove,uE.prototype.destroy=uE.prototype.destroy,uE.prototype.append=uE.prototype.append,uE.prototype.configure=uE.prototype.configure,B("shaka.text.WebVttGenerator",function(){}),uD.prototype.setMediaElement=function(e){var t;this.j=e,t=this,t.C.qa(t.j,"play",function(){t.m||(t.m=Date.now())}),t.C.qa(t.j,"playing",function(){t.o||(t.o=Date.now())})},uD.prototype.configure=function(e){this.g=e};var uU="m",uO="a",u_="v",uB="av",uF="i",uV="c",uH="tt",uG=2,uK="d",uq="ld",uz="h",uX="lh";function uW(e){this.h=e,this.g=null}
1function uY(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}B("shaka.util.CmcdManager.StreamingFormat",{DASH:uK,Uj:uq,HLS:uz,Vj:uX,hk:"s",OTHER:"o"}),(c=uW.prototype).configure=function(e){this.h=e},c.Og=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(u$)?1e3*this.g.get(u$):null},c.Ng=function(){return this.h.enabled&&this.g&&this.g.has(uJ)?1e3*this.g.get(uJ):null},c.si=function(){return this.h.enabled&&this.g&&this.g.has(uQ)?this.g.get(uQ):null},c.ti=function(){return this.h.enabled&&this.g&&this.g.has(uZ)?this.g.get(uZ):null},c.getBandwidthEstimate=function(e){var t=this.Ng();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e},B("shaka.util.CmsdManager",uW),uW.prototype.getBandwidthEstimate=uW.prototype.getBandwidthEstimate,uW.prototype.getRoundTripTime=uW.prototype.ti,uW.prototype.getResponseDelay=uW.prototype.si,uW.prototype.getEstimatedThroughput=uW.prototype.Ng,uW.prototype.getMaxBitrate=uW.prototype.Og;var uJ="etp",u$="mb",uQ="rd",uZ="rtt";function u0(){this.g=null,this.h=[]}function u1(e,t){return R(function(n){if(1==n.g)return e.g?b(n,new Promise(function(t){return e.h.push(t)}),2):n.u(2);e.g=t,w(n)})}function u2(t,n,i){n=void 0===n?null:n,re.call(this);var r,a=this;this.m=lq,this.h=null,this.te=n,this.ma=!1,this.Le=new J,this.ud=new J,this.l=new J,this.Ia=new J,this.Cb=new J,this.G=this.I=this.C=this.F=null,this.Oe=0,this.ba=new u0,this.ja=this.Ma=this.W=this.i=this.Oa=this.H=this.j=this.bc=this.M=this.tg=this.ga=this.L=this.sd=this.O=this.oa=this.K=this.Nb=null,this.sa=!1,this.Ba=this.o=null,this.qe=1e9,this.Ed=[],this.Cd=[],this.Qe=-1,this.g=lb(this),this.Re=s6(),this.P=null,this.Pe=-1,this.Da=null,this.ia={width:1/0,height:1/0},this.pe=new r7(this.g,this.ia,null),this.Be=[],this.A=null,this.aa=this.g.adaptationSetCriteriaFactory(),this.aa.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Nc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Gc:this.g.preferredAudioLabel,bd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Mb=this.g.preferredTextLanguage,this.yd=this.g.preferredTextRole,this.wd=this.g.preferForcedSubs,this.vd=[],i&&i(this),this.L=(r=this,new uD({getBandwidthEstimate:function(){return r.o?r.o.getBandwidthEstimate():NaN},Db:function(){return r.Db()},getCurrentTime:function(){return r.h?r.h.currentTime:0},eb:function(){return r.eb()},wb:function(){return r.wb()},sc:function(){return r.sc()},T:function(){return r.T()},Xd:function(){return r.Xd()}},r.g.cmcd)),this.ga=new uW(this.g.cmsd),this.F=lo(this),this.F.gg(this.g.streaming.forceHTTP),this.F.hg(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Pb=this.da=this.B=null,this.Te=!1,this.Se=new eB(function(){return R(function(e){return 1==e.g?a.da?b(e,a.Ib(a.Pb,!0),3):e.u(0):4!=e.g?b(e,a.load(a.da),4):void(a.Te?a.Pb.pause():a.Pb.play(),a.da=null,a.Te=!1,w(e))})}),lY&&(this.B=lY(),this.B.configure(this.g.ads),this.Cb.D(this.B,"ad-content-pause-requested",function(e){var t;return R(function(n){if(1==n.g)return(a.Se.stop(),a.da)?n.u(0):(a.Pb=a.h,a.Te=a.Pc(),t=e.saveLivePosition||!1,b(n,a.Hg(!0,t),3));a.da=n.h,w(n)})}),this.Cb.D(this.B,"ad-content-resume-requested",function(e){if(e=e.offset||0,a.da){var t=a.da;t.B&&e&&(t.B+=e)}a.Se.$(.1)}),this.Cb.D(this.B,"ad-content-attach-requested",function(){return R(function(e){return a.h||!a.Pb?e.u(0):b(e,a.Ib(a.Pb,!0),0)})})),this.Le.D(e,"online",function(){lj(a),a.$f()}),this.ze=new eB(function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=u(a.i.variants),r=i.next();!r.done;r=i.next())0<(r=r.value).disabledUntilTime&&r.disabledUntilTime<=e&&(r.disabledUntilTime=0,t=!0),0<r.disabledUntilTime&&(n=!1);n&&a.ze.stop(),t&&lE(a,!1,void 0,!1,!1)}),this.wa=null,t&&(ei("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ib(t,!0)),this.s=null}function u3(e){null!=e.M&&(ob(e.M),e.M.release(),e.M=null)}function u4(e,t){return new i8(e,t)}function u5(e,t){lW.set(e,t)}function u6(e,t){e.dispatchEvent(u4("onstatechange",(new Map).set("state",t)))}function u8(e,t){var n;return R(function(i){return 1==i.g?(n=++e.Oe,b(i,u1(e.ba,t),2)):n!=e.Oe?(e.ba.release(),i.return(!0)):i.return(!1)})}function u9(e,t){var n,i;return t=void 0!==t&&t,R(function(r){if(1==r.g)return(n=null,e.i&&e.H&&e.Oa&&e.W)?(i=e.h.currentTime,e.T()&&!t&&(i=null),b(r,le(e,e.W,i,e.Ma,!0,!1,
1!1),3)):r.u(2);if(2!=r.g){n=r.h,e.Be.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var a=n,o=e.H,s=e.Oa;a.h=e.i,a.l=o,a.G=s,a=n,o=e.Ba,a.j=e.o,a.C=o,n.o=e.aa,n.start(),e.i=null,e.H=null,e.Oa=null,e.o=null,e.Ba=null}return r.return(n)})}function u7(e,t,n,i,r){var a,o,s;return r=void 0!==r&&r,R(function(u){return 1==u.g?i?u.u(2):b(u,lt(e,t),3):(2!=u.g&&(i=u.h),function(e,t){if(!eF())return!0;if(t){if(""==(e.h||e6()).canPlayType(t))return!1;if(!eF()||!al.has(t))return!0;if(n8(t))return eY()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if("application/dash+xml"===t||"video/vnd.mpeg.dash.mpd"===t)return e.g.streaming.preferNativeDash}return!1}(e,i))?u.return(null):(a=!1,o=!0,r&&(e.o&&e.Ba==e.g.abrFactory&&(o=!1),e.h&&"AUDIO"===e.h.nodeName&&(a=!0)),s=le(e,t,n,i||null,!r,a,o),s=r?s.then(function(e){return e.A=!1,e}):s.then(function(t){return e.Be.push(t),t}),u.return(s))})}function le(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m,v,y,x;return r=void 0===r||r,a=void 0!==a&&a,o=void 0===o||o,R(function(T){return 1==T.g?(s=null,l=tv(e.g),a&&(l.manifest.disableVideo=!0),c=function(){return s.P&&s.s?null:s},d=function(){return c()?c().getConfiguration():e.g},1/0!=e.ia.width||1/0!=e.ia.height||e.g.ignoreHardwareResolution?T.u(2):b(T,e8(),3)):(2!=T.g&&(h=T.h,e.ia.width=h.width,e.ia.height=h.height),p=new r7(l,e.ia,null),f={networkingEngine:e.F,filter:function(e){var t;return R(function(n){return 1==n.g?b(n,ae(p,e),2):4!=n.g?n.h?(t=u4("trackschanged"),b(n,Promise.resolve(),4)):n.u(0):void(s.dispatchEvent(t),w(n))})},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=u(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);
1for(r=(i=u(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=u(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",l=new sa,c=r.closedCaptions.get(o);s={id:e.qe++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:l,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:c,originalLanguage:c,label:null,type:nW,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([nZ(s,"")]),isAudioMuxedInVideo:!1},t.textStreams.push(s),n.add(o)}}}(e,t)},onTimelineRegionAdded:function(e){var t,n=s.H,i=e.schemeIdUri+"_"+e.id+"_"+e.startTime.toFixed(1)+"_"+e.endTime.toFixed(1);n.h.has(i)||(n.h.set(i,e),e=new i8("regionadd",new Map([["region",e]])),n.dispatchEvent(e),(t=n).g||(t.g=new eB(function(){for(var e=t.i(),n=u(t.h),i=n.next();!i.done;i=n.next()){var r=u(i.value);i=r.next().value,(r=r.next().value).endTime<e.start&&(t.h.delete(i),i=new i8("regionremove",new Map([["region",r]])),t.dis
1patchEvent(i))}!t.h.size&&t.g&&(t.g.stop(),t.g=null)}).ua(2)))},onEvent:function(e){return s.dispatchEvent(e)},onError:function(e){return s.onError(e)},isLowLatencyMode:function(){return d().streaming.lowLatencyMode},updateDuration:function(){e.j&&s.P&&e.j.updateDuration()},newDrmInfo:function(e){var t=s.i,n=t?t.h:null;n&&t.A&&ai(p,n.keySystem,e)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.T());s.dispatchEvent(u4("manifestupdated",t)),uo(s,!1,function(){e.B&&e.B.onManifestUpdated(e.T())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(t,n,i,r){var a=t;"com.apple.hls.interstitial"==t&&(a="com.apple.quicktime.HLS",t={startTime:n,endTime:i,values:r},e.B)&&e.B.onHLSInterstitialMetadata(e,e.h,t),t=(r=u(r)).next();for(var o={};!t.done;o={Uf:void 0},t=r.next())o.Uf=t.value,"ID"!=o.Uf.name&&uo(s,!1,function(t){return function(){la(e,n,i,a,t.Uf)}}(o))},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)}},(g=new sp(function(){return e.Ra()})).addEventListener("regionadd",function(t){var n=t.region;lO(e,"timelineregionadded",n,s),uo(s,!1,function(){e.B&&(e.B.onDashTimedMetadata(n),e.B.onDASHInterstitialMetadata(e,e.h,n))})}),m=null,l.streaming.observeQualityChanges&&((m=new sc(function(){return e.Db()})).addEventListener("qualitychange",function(t){l_(e,t.quality,t.position)}),m.addEventListener("audiotrackchange",function(t){l_(e,t.quality,t.position,!0)})),v=!0,y={Sb:e.F,onError:function(e){return s.onError(e)},le:function(t){uo(s,!0,function(){if(e.C)e:{var n=t,i=u4("keystatuschanged");e.dispatchEvent(i);var r=Object.keys(n);1==r.length&&""==r[0]&&(r=["00"],n={"00":n[""]}),i=1==r.length&&"00"==r[0];var a=!1;if(r.length){r=e.keySystem();for(var o=rm(e.g.drm.clearKeys),s=u(e.i.variants),l=s.next();!l.done;l=s.next()){l=l.value;var c=[];l.audio&&c.push(l.audio),l.video&&c.push(l.video),c=u(c);for(var d=c.next();!d.done;d=c.next()){var h=d.value;if(d=l.allowedByKeySystem,h.keyIds.size)if(h.drmInfos.length&&!o.size){h=u(h.drmInfos);for(var p=h.next();!p.done;p=h.next())if((p=p.value).keyIds.size&&p.keySystem==r){l.allowedByKeySystem=!0,p=u(p.keyIds);for(var f=p.next();!f.done;f=p.next())f=f.value,((f=n[i?"00":f])||e.C.F)&&(l.allowedByKeySystem=l.allowedByKeySystem&&!!f&&!aa.includes(f))}}else for(l.allowedByKeySystem=!0,p=(h=u(h.keyIds)).next();!p.done;p=h.next())p=p.value,((p=n[i?"00":p])||e.C.F)&&(l.allowedByKeySystem=l.allowedByKeySystem&&!!p&&!aa.includes(p));
1d!=l.allowedByKeySystem&&(a=!0)}}}if(a&&(lC(e),!lk(e)))break e;(n=e.j.l)&&!n.allowedByKeySystem&&lE(e)}})},onExpirationUpdated:function(e,t){var n=u4("expirationupdated");s.dispatchEvent(n),(n=s.l)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){s.dispatchEvent(t),"drmsessionupdate"==t.type&&v&&(v=!1,t=Date.now()/1e3-s.wa,(e.A||s.getStats()).j=t,e.M&&ob(e.M))}},x=lo(e,c),ra(e.F,x),s=new ua(t,i,n,{config:l,Qi:f,$i:g,Zi:m,Hc:function(){return e.Hc(y)},Pi:p,networkingEngine:x,Mh:r,Lh:o}),T.return(s))})}function lt(e,t){var n,i;return R(function(r){return 1==r.g?(n=e.g.manifest.retryParameters,b(r,uv(t,e.F,n),2)):("application/x-mpegurl"==(i=r.h)&&eY()&&(i="application/vnd.apple.mpegurl"),r.return(i))})}function ln(e){var t=e.g.textDisplayFactory;t!==e.Ne&&(e.s=t(),e.s.configure?e.s.configure(e.g.textDisplayer):ei("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Ne=t,e.s.setTextVisibility(e.ma))}function li(e){var t,n;return R(function(i){if(1==i.g){var r,a,o,s;return u6(e,"media-source"),e.h.removeAttribute("src"),aY(e.h),ln(e),(r=e.h,a=e.s,o={ji:function(){return e.keySystem()},onMetadata:function(t,n,i){t=u(t);for(var r=t.next();!r.done;r=t.next())if((r=r.value).data&&"number"==typeof r.cueTime&&r.frames){var a=r.cueTime+n,o=i;o&&a>o&&(o=a);for(var s=u(r.frames),l=s.next();!l.done;l=s.next())la(e,a,o,"org.id3",l.value);e.B&&e.B.onHlsTimedMetadata(r,a)}},onEvent:function(t){return e.dispatchEvent(t)},Wi:function(){e.H&&e.H.update&&e.H.update()}},s=e.M,t=new ox(r,a,o,s)).configure(e.g.mediaSource),n=e.g.manifest.segmentRelativeVttTiming,t.Ca=n,b(i,t.I,2)}e.I=t,w(i)})}function lr(e,t,n){function i(){return lT(e)}e.l.D(t,"playing",i),e.l.D(t,"pause",i),e.l.D(t,"ended",i),e.l.D(t,"ratechange",function(){var t=e.h.playbackRate;0!=t&&(e.K&&(e.K.set(t),e.m==lz&&e.o.playbackRateChanged(t),lx(e,t)),t=u4("ratechange"),e.dispatchEvent(t))}),t.remote&&(e.l.D(t.remote,"connect",function(){return lC(e)}),e.l.D(t.remote,"connecting",function(){return lC(e)}),e.l.D(t.remote,"disconnect",function(){return R(function(n){if(1==n.g)return e.j&&"disconnected"==t.remote.state?b(n,sX(e.j),2):n.u(2);lC(e),w(n)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return lC(e)}),e.l.D(t.audioTracks,"removetrack",function(){return lC(e)}),e.l.D(t.audioTracks,"change",function(){return lC(e)})),t.textTracks&&(e.l.D(t.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.l.D(i,"cuechange",function(){if(i.activeCues)for(var e=u(i.activeCues),t=e.next();!t.done;t=e.next())la(n,(t=t.value).startTime,t.endTime,t.type,t.value),n.B&&n.B.onCueMetadataChange(t.value);if(i.cues){e=[],t=u(i.cues);for(var r=t.next(),a={};!r.done;a={Xb:void 0},r=t.next())a.Xb=r.value,"com.apple.quicktime.HLS"==a.Xb.type&&null!=a.Xb.startTime&&((r=e.find(function(e){return function(t){return t.startTime==e.Xb.startTime&&t.endTime==e.Xb.endTime}}(a)))||(r={startTime:a.Xb.startTime,endTime:a.Xb.endTime,values:[]},e.push(r)),r.values.push(a.Xb.value));for(t=(e=u(e)).next();!t.done;t=e.next())(t=t.value).values.some(function(e){return"X-ASSET-URI"==e.key||"X-ASSET-LIST"==e.key})&&n.B&&(t.values.push({key:"CUE",description:"",data:0!=t.startTime||n.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),n.B.onHLSInterstitialMetadata(n,n.h,t))}});var r=new eB(function(){var e=Array.from(n.h.textTracks).filter(function(e){return"metadata"==e.kind});e=u(e);for(var t=e.next();!t.done;t=e.next())t.value.mode="hidden"}).pb().$(.5);n.vd.push(function(){r.stop()})}break;case"chapters":var a=e,o=t;if(o&&"chapters"==o.kind){o.mode="hidden";var s=new eB(function(){o.mode="hidden"}).pb().$(.5);a.vd.push(function(){s.stop()})}break;default:lC(e)}}),e.l.D(t.textTracks,"removetrack",function(){return lC(e)}),e.l.D(t.textTracks,"change",function(){return lC(e)})),"none"!=t.preload&&e.l.qa(t,"loadedmetadata",function(){e.A.C=Date.now()/1e3-n})}function la(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(u4("metadata",t))}function lo(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?uo(t(),!0,e):e()}return t||(t=function(){return null}),new ri(function(n,i,r,a){var o=t()?t().j:e.o;o&&o.segmentDownloaded(n,i,r,a)},function(t,r,a){n(u4("downloadheadersreceived",r=(new Map).set("headers",t).set("request",r).set("requestType",a))),i(function(){if(e.ga){var n=e.ga;if(n.h.enabled){var i=t["cmsd-static"];if(i)try{var r=new Map,a=i.split(",");for(i=0;i<a.length;i++){var o=a[i].split("=");r.set(o[0],uY(o[1]))}}catch(e){}if(r=t["cmsd-dynamic"]){try{var s=new Map,u=r.split(";");for(r=1;r<u.length;r++){var l=u[r].split("=");s.set(l[0],uY(l[1]))}var c=s}catch(e){c=null}c&&(n.g=c)}}}})},function(e,t){n(u4("downloadcompleted",e=(new Map).set("request",e).set("response",t)))},function(e,t,i,r){n(u4("downloadfailed",e=(new Map).set("request",e).set("error",t).set("httpResponseCode",i).set("aborted",r)))},function(t,n,r){i(function(){var i=e.L,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)uP(i,n);else switch(t){case 0:try{if(i.g.enabled){if(a.type){e:{switch(a.type){case 4:var o=i.l?uq:uK;break e;case 3:case 2:o=i.l?uX:uz;break e;case 5:o="s";break e}o=void 0}i.i=o}uP(i,n,{ot:uU,su:!i.s})}}catch(e){z("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case rc:try{if(i.g.enabled){var s=n.uris[0],l=a.segment;o=0,l&&(o=l.endTime-l.startTime);var c={d:1e3*o,st:i.h.T()?"l":"v"};c.ot=function(e){if(0===e.type)return uF;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?uB:u_;if("audio"==t)return uO;if("text"==t)return"application/mp4"===e.mimeType?uH:uV}}(a);var d=c.ot===u_||c.ot===uO||c.ot===uB||c.ot===uH,h=a.stream;if(h){var p=i.h.eb();if(d&&(c.bl=function(e,t){if(!(t=e.h.Db()[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}(i,h.type),c.ot!==uH)){var f=uL(i,h.type);c.dl=p?f/Math.abs(p):f}if(h.bandwidth&&(c.br=h.bandwidth/1e3),h.segmentIndex&&l){var g=h.segmentIndex.Ob(l.endTime,!0,0>p);if(g){var m=g.next().value;if(m&&m!=l){if(s&&!eM(l.N(),m.N())){var v=m.N()[0],y=new URL(v),b=new URL(s);if(y.origin!==b.origin)var w=v;else{for(var x=y.pathname.split("/").slice(1),T=b.pathname.split("/").slice(1,-1);x[0]===T[0];)x.shift(),T.shift();for(;T.length;)T.shift(),x.unshift("..");w=x.join("/")}c.nor=w}if((m.startByte||m.endByte)&&(l.startByte!=m.startByte||l.endByte!=m.endByte)){var S=m.startByte+"-";m.endByte&&(S+=m.endByte),c.nrr=S}}}var A=i.h.eb()||1,k=uL(i,h.type)||500,E=h.bandwidth,I=E?E*(l.endTime-l.startTime)/1e3/(k/A/1e3)*i.g.rtpSafetyFactor:NaN;isNaN(I)||(c.rtp=I)}}d&&c.ot!==uH&&(c.tb=function(e,t){var n=e.h.sc();if(!n.length)return NaN;e=n[0],n=u(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 u_:return e.videoBandwidth||NaN;case uO:return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,c.ot)/1e3),uP(i,n,c)}}catch(e){z("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:uP(i,n,{ot:"k"});break;case 4:uP(i,n,{ot:"o"})}})},function(n,i,r,a){(n=t()?t().l:e.H)&&n.banLocation&&n.banLocation(a)},function(n,i){if(i.data){i=i.data.byteLength;var r=t()?t().getStats():e.A;r&&(r.kc=isNaN(r.kc)?i:r.kc+i,0===n&&(r.Wg=i))}})}function ls(e,t,n){e.O=new r6,e.O.g=r8,lu(e),lw(e),e.oa=new eB(function(){ll(e)}),e.g.streaming.rebufferingGoal&&e.oa.ua(.25),e.l.D(t,"waiting",function(){return ll(e)}),e.l.D(t,"canplaythrough",function(){return ll(e)}),e.l.D(t,"playing",function(){return ll(e)}),e.l.D(t,"seeked",function(){return ll(e)}),n&&(e.l.D(t,"stalled",function(){return ll(e)}),e.l.D(t,"progress",function(){return ll(e)}),e.l.D(t,"timeupdate",function(){return ll(e)}))}function lu(e){var t=e.g.streaming.rebufferingGoal;e.O.i.set(r9,Math.min(.5,t/2)).set(r8,t)}function ll(e){switch(e.m){case lX:if(e.Pc())var t=!0;else{var n=aG(e.h.buffered);t=null!=n&&n>=e.h.duration-1}break;case lz:e:if(e.Pc()||ok(e.I))t=!0;else{if(e.i.presentationTimeline.T()){n=e.i.presentationTimeline.Zb();var i=aG(e.h.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=aq(e.h.buffered,e.h.currentTime),n=e.O;var r=t,a=n.i.get(n.g);t=n.g,i=r||i>=a&&0<i?r9:r8,n.g=i,(t=t!=i)&&i===r9&&(n.h=Date.now()),t&&lw(e)}function lc(e){if(e.pe=new r7(e.g,e.ia,e.C),e.H){var t=tv(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=lK&&an(e.pe,e.i)&&lC(e)}catch(t){lU(e,t)}e.o&&lk(e),(t=e.j.l)&&(!t.allowedByApplication||!t.allowedByKeySystem)&&lE(e)}if(e.F&&(e.F.gg(e.g.streaming.forceHTTP),e.F.hg(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ca=e.g.manifest.segmentRelativeVttTiming),e.s)if(t=e.g.textDisplayFactory,e.Ne!=t){var n=e.s;if(e.s=t(),e.s.configure?e.s.configure(e.g.textDisplayer):ei("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.s.setTextLanguage||ei("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.s.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var i=e.s;n.ga=i,n.h&&(n.h.j=i)}e.Ne=t,e.j&&(n=(t=e.j).h.get(nW))&&sP(t,n.stream,!0,0,!0)}else e.s.configure&&e.s.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),lL(e)),e.O&&lu(e),e.oa&&(e.g.streaming.rebufferingGoal?e.oa.ua(.25):e.oa.stop()),e.i&&lF(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.B&&e.B.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.ga&&e.ga.configure(e.g.cmsd)}function ld(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{mc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function lh(e,t){var n=e.segmentIndex.find(t);if(null==n)return null;var i=ld((n=e.segmentIndex.get(n)).tilesLayout||e.tilesLayout);if(!i)return null;var r=e.width||0;e=e.height||0;var a=r/i.mc,o=e/i.rows,s=i.mc*i.rows,u=n.j-n.startTime;u=n.B||u/s;var l=n.startTime,c=0,d=0;return 1<s&&(t=Math.floor((t-n.startTime)/u),l=n.startTime+t*u,c=t%i.mc*a,d=Math.floor(t/i.mc)*o),t=!1,(i=n.thumbnailSprite)&&(t=!0,o=i.height,c=i.positionX,d=i.positionY,a=i.width),{segment:n,imageHeight:e,imageWidth:r,height:o,positionX:c,positionY:d,startTime:l,duration:u,uris:n.N(),startByte:n.$b(),endByte:n.Yb(),width:a,sprite:t}}function lp(e,t){e.l.D(t,"cuechange",function(){e.s.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=u(r);for(var a=r.next();!a.done;a=r.next()){if(1/0===(a=a.value).endTime||a.endTime<a.startTime)a=null;else{var o=new tJ(a.startTime,a.endTime,a.text);o.line="number"==typeof a.line?a.line:null,a.lineAlign&&(o.lineAlign=a.lineAlign),o.lineInterpretation=a.snapToLines?t7:1,o.position="number"==typeof a.position?a.position:null,a.positionAlign&&(o.positionAlign=a.positionAlign),o.size=a.size,o.textAlign=a.align,"lr"===a.vertical?o.writingMode="vertical-lr":"rl"===a.vertical&&(o.writingMode="vertical-rl"),a.region&&(o.region.id=a.region.id,o.region.height=a.region.lines,o.region.heightUnits=2,o.region.regionAnchorX=a.region.regionAnchorX,o.region.regionAnchorY=a.region.regionAnchorY,o.region.scroll=a.region.scroll,o.region.viewportAnchorX=a.region.viewportAnchorX,o.region.viewportAnchorY=a.region.viewportAnchorY,o.region.viewportAnchorUnits=eS,o.region.width=a.region.width,o.region.widthUnits=eS),tZ(o),a=o}a&&((o=e.g.mediaSource.modifyCueCallback)&&o(a,null,n),i.push(a))}e.s.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}function lf(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function lg(e){return Array.from(e.h.textTracks).find(function(e){return"Shaka Player TextTrack"==e.label})}function lm(e,t){var n;return R(function(i){switch(i.g){case 1:return x(i,2),b(i,uv(t,e.F,e.g.streaming.retryParameters),4);case 4:n=i.h,S(i,3);break;case 2:A(i);case 3:if(n)return i.return(n);throw new eC(1,2,2011,t)}})}function lv(e,t,n,i){var r,a,o;return R(function(s){if(1==s.g){r=rc,(a=ro([t],i)).method="GET";var u=e.L;try{u.g.enabled&&uP(u,a,{ot:uV,su:!0})}catch(e){z("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return b(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)})}function ly(e,t,n,i){var r=ii(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=eh(t),function(e,t){function n(e){for(var n=e,i=u(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=uw(e);e="WEBVTT\n\n",i=u(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 t3: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,null,[]),i);throw new eC(2,2,2014,n)}function lb(e){var t=s5();return t.streaming.failureCallback=function(t){if(e.T()){var n=null;1001==t.code||1002==t.code?(n=1,e.g.streaming.lowLatencyMode&&(n=.1)):1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.$f(n))}},t.textDisplayFactory=function(){return!e.te||eY()&&!document.fullscreenEnabled?"addTextTrack"in e.h?new uT(e.h,"Shaka Player TextTrack"):new uk:new uE(e.h,e.te)},t}function lw(e){var t=e.Hf();if(e.A&&e.O&&e.G){if(0==e.g.streaming.rebufferingGoal){var n=e.K;n.j=!1,ss(n)}else(n=e.K).j=t,ss(n);if(e.L&&(n=e.L,t||n.s||(n.s=!0),n.s&&t&&(n.B=!0),n.F=t),lT(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Pe<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Pe*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent(u4("buffering",t))}function lx(e,t){e.Ia.La(),e.Ia.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ra(),r=e.T()?e.g.streaming.safeSeekOffset:0;0<t?Math.floor(n)>=Math.floor(i.end)&&e.cd():Math.floor(n)<=Math.floor(i.start+r)&&e.cd()})}function lT(e){if(e.A&&e.O){var t=e.A.g,n="playing";e.O.g==r8?n="buffering":e.Pc()?n="ended":e.h.paused&&(n="paused");var i=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent(u4("statechanged",n)))}}function lS(e){var t=e.h.playbackRate,n=e.T();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Mg();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.Jd(i,!1):1==r&&t!==e.K.qc()&&e.cd()}if(n&&Number.isFinite((n=e.Ra()).end)&&!(e.h.currentTime<n.start||e.h.paused)){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var a=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var o=e.g.streaming.liveSync.targetLatency,s=o+i,u=Math.max(0,o-i),l=e.g.streaming.liveSync.maxPlaybackRate,c=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(o=e.i.serviceDescription.targetLatency,null!=e.i.serviceDescription.targetLatency?s=e.i.serviceDescription.targetLatency+i:null!=e.i.serviceDescription.maxLatency&&(s=e.i.serviceDescription.maxLatency),null!=e.i.serviceDescription.targetLatency?u=Math.max(0,e.i.serviceDescription.targetLatency-i):null!=e.i.serviceDescription.minLatency&&(u=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,c=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.P||"number"!=typeof o||(e.P=o);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Da&&null!==e.P&&"number"==typeof o&&e.Pe<d&&Date.now()-e.Da>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(o-a)/2,a+i),e.Da=Date.now()),r&&null!==e.P&&(s=e.P+i,u=e.P-i),o=n.end-e.h.currentTime,i=0,e.m==lX&&0<(r=e.h.buffered).length&&(i=Math.max(l,(i=r.end(r.length-1))-n.end)),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,a=Date.now()-e.O.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&a<=r?t!=c&&e.Jd(c,!1):void 0!=s&&l&&o-i>s?(t!=l&&e.Jd(l,!1),e.Da=null):void 0!=u&&c&&o-i<u?(t!=c&&e.Jd(c,!1),e.Da=null):t!==e.K.qc()&&(e.cd(),e.Da=Date.now())}}function lA(e){if(e.h){var t=function(t,n){var i=void 0===i?Number.EPSILON:i;if(t===n)i=!0;else{var r=Math.abs(t-n);i=r<=i||i!==Number.EPSILON&&Math.abs(r-i)<=Number.EPSILON}return(!!i||n>t)&&e.Qe<t&&(e.Qe=t,!0)},n=e.Ra();if(!isNaN(n=0<(n=n.end-n.start)?e.h.currentTime/n:0)){if(t(0,n*=100))var i=u4("started");else t(25,n)?i=u4("firstquartile"):t(50,n)?i=u4("midpoint"):t(75,n)?i=u4("thirdquartile"):((t(100,n)||100<n)&&(i=u4("complete")),e.g&&1/0!=e.g.playRangeEnd&&e.Pc()&&e.h.pause());i&&e.dispatchEvent(i)}}}function lk(e){try{ar(e.pe,e.i)}catch(t){return lU(e,t),!1}var t=i_(e.i.variants);
1return t=e.aa.create(t),e.o.setVariants(Array.from(t.values())),!0}function lE(e,t,n,i,r){var a;t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r,(a=lk(e)?e.o.chooseVariant():null)&&lI(e,a,r,t,n,i)}function lI(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.j.l;if(t==o)i&&sD(e.j,t,i,r,!0);else{var s=e.A.h;s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),sD(e.j,t,i,r,a,n),i=null,o&&(i=iR(o)),(t=iR(t)).active=!0,n?(n=(new Map).set("oldTrack",i).set("newTrack",t),e.M&&ow(e.M,t,e.Af()),lV(e,n=u4("adaptation",n))):lD(e,i,t)}}function lM(e,t){var n=Array.from(e.h.audioTracks).find(function(e){return e.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=ij(n),lD(e,n,t=ij(t)))}function lC(e){lV(e,u4("trackschanged"))}function lD(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.M&&ow(e.M,n,e.Af()),lV(e,n=u4("variantchanged",t))}function lR(e){lV(e,u4("textchanged"))}function lP(e){lV(e,u4("texttrackvisibility"))}function lL(e){e.g.abr.enabled||lj(e);var t=(new Map).set("newStatus",e.g.abr.enabled);lV(e,u4("abrstatuschanged",t))}function lN(e){var t=e.rc().find(function(e){return e.active});t&&e.s&&e.s.setTextLanguage&&e.s.setTextLanguage(t.language)}function lj(e,t){if(t=void 0===t||t,e.m==lz){e.ze.stop();for(var n=u(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&lk(e)}}function lU(e,t){var n,i,r,a;return R(function(o){switch(o.g){case 1:if(e.m==lK)return o.return();if(1===t.severity&&e.A.K++,n=!0,!(e.sa&&e.i&&e.j)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3018!=t.code){o.u(2);break}if(eY()&&3016==t.code)return o.return();return x(o,3),b(o,sX(e.j),5);case 5:n=!(i=o.h),i&&(r=u4("mediasourcerecovered"),e.dispatchEvent(r)),S(o,2);break;case 3:A(o),n=!0;case 2:if(!n)return o.return();2===t.severity&&lj(e,!1),a=u4("error",(new Map).set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),w(o)}})}function lO(e,t,n,i){i=void 0===i?e:i,e=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(u4(t,e))}function l_(e,t,n,i){i=void 0!==i&&i,t=(new Map).set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(u4(i?"audiotrackchanged":"mediaqualitychanged",t))}function lB(e,t){if(t=void 0===t||t,!e.h.error)return t?new eC(2,3,3016):null;var n=e.h.error.code;return t||1!=n?((t=e.h.error.msExtendedCode)&&(0>t&&(t+=0x100000000),t=t.toString(16)),new eC(2,3,3016,n,t,e.h.error.message)):null}function lF(e,t,n){0<t&&(e.T()||e.th(t)),n<(t=e.getDuration())&&(e.T()||e.Za(n))}function lV(e,t){R(function(n){if(1==n.g)return b(n,Promise.resolve(),2);e.m!=lK&&e.dispatchEvent(t),w(n)})}function lH(e){var t=new Set;e=u(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(im(n.language)):t.add("und");return t}function lG(e){var t=new Map,n=new Map;e=u(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",a=[];i.language&&(r=im(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set),a=u(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=u(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}u0.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},g(u2,re),(c=u2.prototype).destroy=function(){var e,t=this;return R(function(n){switch(n.g){case 1:if(t.m==lK)return n.return();return u3(t),e=t.detach(),t.m=lK,b(n,e,2);case 2:return b(n,t.ff(),3);case 3:if(t.Le&&(t.Le.release(),t.Le=null),t.ud&&(t.ud.release(),t.ud=null),t.l&&(t.l.release(),t.l=null),t.Ia&&(t.Ia.release(),t.Ia=null),t.Cb&&(t.Cb.release(),t.Cb=null),t.Ba=null,t.g=null,t.A=null,t.te=null,t.L=null,t.ga=null,!t.F){n.u(4);break}return b(n,t.F.destroy(),5);case 5:t.F=null;case 4:t.o&&(t.o.release(),t.o=null),re.prototype.release.call(t),w(n)}})},c.Ib=function(e,t){t=void 0===t||t;var n,i,r,a=this;return R(function(o){switch(o.g){case 1:if(a.m==lK)throw new eC(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.u(2);break}return b(o,a.detach(),2);case 2:return b(o,u8(a,"attach"),4);case 4:if(o.h)return o.return();if(x(o,5,6),n||(u6(a,"attach"),i=function(){var e=lB(a,!1);e&&lU(a,e)},a.ud.D(e,"error",i),a.h=e,a.L&&a.L.setMediaElement(e)),!t||!eF()||a.I){o.u(6);break}return b(o,li(a),6);case 6:k(o),a.ba.release(),E(o,0);break;case 5:return r=A(o),b(o,a.detach(),10);case 10:throw r}})},c.Nh=function(e){this.tg=e},c.detach=function(e){e=void 0!==e&&e;var t=this;return R(function(n){if(1==n.g){if(t.m==lK)throw new eC(2,7,7e3);return b(n,t.ic(!1,e),2)}if(3!=n.g)return b(n,u8(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.ud.La(),t.h=null),u6(t,"detach"),t.B&&!e&&t.B.release()}finally{t.ba.release()}w(n)})},c.ic=function(t,n){t=void 0===t||t,n=void 0!==n&&n;var i,r,a,o,s,l,c,d,h,p,f=this;return R(function(g){switch(g.g){case 1:return f.m!=lK&&(f.m=lq),b(g,u8(f,"unload"),2);case 2:if(g.h)return g.return();return T(g,3),f.sa=!1,u6(f,"unload"),u3(f),i=f.vd.map(function(e){return e()}),f.vd=[],b(g,Promise.all(i),5);
1case 5:if(f.dispatchEvent(u4("unloading")),f.sd&&(f.sd.release(),f.sd=null),f.h&&(f.l.La(),f.Ia.La()),f.ze.stop(),f.Nb&&(f.Nb.release(),f.Nb=null),f.oa&&(f.oa.stop(),f.oa=null),!f.H){g.u(6);break}return b(g,f.H.stop(),7);case 7:f.H=null,f.Oa=null;case 6:if(!f.o){g.u(8);break}return b(g,f.o.stop(),8);case 8:if(!f.j){g.u(10);break}return b(g,f.j.destroy(),11);case 11:f.j=null;case 10:if(f.K&&(f.K.release(),f.K=null),f.G&&(f.G.release(),f.G=null),"webkit"!==e.shakaMediaKeysPolyfill||!f.C){g.u(12);break}return b(g,f.C.destroy(),13);case 13:f.C=null;case 12:if(!f.I){g.u(14);break}return b(g,f.I.destroy(),15);case 15:f.I=null;case 14:var m;if(f.B&&!n&&f.B.onAssetUnload(),f.da&&!n&&(f.da.destroy(),f.da=null),n||f.Se.stop(),f.L&&((m=f.L).s=!1,m.F=!0,m.B=!1,m.l=!1,m.m=0,m.o=0,m.A=0,m.G=!1,m.j=null,m.C.La()),f.ga&&(f.ga.g=null),!f.s){g.u(16);break}return b(g,f.s.destroy(),17);case 17:f.s=null;case 16:if(f.h&&(aY(f.h),f.h.src&&(f.h.removeAttribute("src"),f.h.load())),!f.C){g.u(18);break}return b(g,f.C.destroy(),19);case 19:f.C=null;case 18:if(f.wa&&f.W!=f.wa.Mc()&&(f.wa.s||f.wa.destroy(),f.wa=null),f.W=null,f.Ma=null,f.O=null,f.i){for(a=(r=u(f.i.variants)).next();!a.done;a=r.next())for(l=(s=u([(o=a.value).audio,o.video])).next();!l.done;l=s.next())(c=l.value)&&c.segmentIndex&&c.segmentIndex.release();for(h=(d=u(f.i.textStreams)).next();!h.done;h=d.next())(p=h.value).segmentIndex&&p.segmentIndex.release()}f.g&&f.g.streaming.clearDecodingCache&&(iG.clear(),eO.clear()),f.i=null,f.A=new ur,f.Ne=null,f.Da=null,f.P=null,f.Pe=-1,f.Ed=[],f.Cd=[],f.Qe=-1,f.F&&f.F.Dg(),lw(f);case 3:k(g),f.ba.release(),E(g,4);break;case 4:if(t&&eF()&&!f.I&&f.h)return b(g,li(f),0);g.u(0)}})},c.yj=function(e){this.ja=e},c.load=function(t,n,i){n=void 0===n?null:n;var r,a,o,s,l,c,d,h,p,f,g,m,v,y=this;return R(function(S){switch(S.g){case 1:if(y.m==lK)throw new eC(2,7,7e3);if(r=null,a="",t instanceof ua){if(t.s)throw new eC(2,7,7006);a=(r=t).Mc()||""}else a=t||"";return b(S,u1(y.ba,"load"),2);case 2:if(y.ba.release(),!y.h)throw new eC(2,7,7002);if(!y.W){S.u(3);break}return y.W=a,b(S,y.ic(!1),3);case 3:if(o=++y.Oe,s=function(){return R(function(e){if(1==e.g)return y.Oe==o?e.u(0):r?b(e,r.destroy(),3):e.u(3);throw new eC(2,7,7e3)})},l=function(e,t){return R(function(n){switch(n.g){case 1:return T(n,2),b(n,u1(y.ba,t),4);case 4:return b(n,s(),5);case 5:return b(n,e(),6);case 6:return b(n,s(),7);case 7:r&&y.g&&(r.g=y.g);case 2:k(n),y.ba.release(),E(n,0)}})},x(S,5,6),null==n&&r&&(n=r.getStartTime()),y.ja=n,y.sa=!1,y.dispatchEvent(u4("loading")),r){i=r.W,S.u(8);break}if(i){S.u(8);break}return b(S,l(function(){return R(function(e){if(1==e.g)return b(e,lt(y,a),2);i=e.h,w(e)})},"guessMimeType_"),8);case 8:if(c=!!r,r){us(r,y),y.A=r.getStats(),S.u(11);break}return b(S,u7(y,a,n,i,!0),12);case 12:(r=S.h)?(r.A=!1,us(r,y),y.A=r.getStats(),r.start(),r.m.catch(function(){})):y.A=new ur;case 11:return d=!r,h=Date.now()/1e3,y.A=r?r.getStats():new ur,y.W=a,y.Ma=i||null,d?b(S,l(function(){return R(function(e){var t,n,r,a,o,s,u;return b(e,(t=y,n=i,R(function(e){return 1==e.g?(r=nY,a=Date.now()/1e3,o=!0,t.C=t.Hc({Sb:t.F,onError:function(e){lU(t,e)},le:function(){},onExpirationUpdated:function(){var e=u4("expirationupdated");t.dispatchEvent(e)},onEvent:function(e){t.dispatchEvent(e),"drmsessionupdate"==e.type&&o&&(o=!1,t.A.j=Date.now()/1e3-a)}}),t.C.configure(t.g.drm),s={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},(u={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n?n5(n):"",codecs:n?n6(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}).fullMimeTypes.add(nZ(u.mimeType,u.codecs)),n.startsWith("audio/")?(u.type=r.V,s.audio=u):s.video=u,t.C.da=!0,b(e,rj(t.C,[s],[]),2)):b(e,t.C.Ib(t.h),0)})),0)})},"initializeSrcEqualsDrmInner_"),23):b(S,l(function(){return R(function(e){if(1==e.g)return b(e,Promise.race([r.ia,r.m]),2);y.Oa=r.G;var t=r;t.ja=!0,y.H=t.l,y.i=r.zf(),w(e)})},"waitForFinish"),15);case 15:if(y.I){S.u(16);break}return b(S,l(function(){return R(function(e){return b(e,li(y),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return y.i&&y.i.textStreams.length&&(y.s.enableTextDisplayer?y.s.enableTextDisplayer():ei("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),b(S,l(function(){return R(function(e){return b(e,r.m,0)})},"waitForFinish"),18);case 18:if(y.g=r.getConfiguration(),y.pe=r.F,y.H&&y.H.setMediaElement&&y.h&&y.H.setMediaElement(y.h),(I=r).oa=!0,y.sd=I.H,y.bc=r.Da,(p=r.o)&&(y.aa=p),c&&y.h&&"AUDIO"===y.h.nodeName&&(function(e){for(var t=u(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(e){return e.audio})}(y),y.configure("manifest.disableVideo",!0)),r.i){S.u(19);break}return b(S,l(function(){return R(function(e){return b(e,uc(r,y.h),0)})},"drmEngine_.init"),19);
1case 19:return(M=r).ga=!0,y.C=M.i,b(S,l(function(){return R(function(e){return b(e,y.C.Ib(y.h),0)})},"drmEngine_.attach"),21);case 21:return(f=r.C)&&(!y.Ba||y.Ba!=f)&&((C=r).ba=!0,y.o=C.j,y.Ba=r.C,"function"!=typeof y.o.setMediaElement&&(ei("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),y.o.setMediaElement=function(){}),"function"!=typeof y.o.setCmsdManager&&(ei("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),y.o.setCmsdManager=function(){}),"function"!=typeof y.o.trySuggestStreams&&(ei("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),y.o.trySuggestStreams=function(){})),(D=r).sa=!0,g=D.L,m=r.ma,b(S,l(function(){return R(function(e){var t,n,i,r,a,o,s,l,c,d,p,f,v,x,T,S,A,k,E,I,M,C,D,P;return b(e,(t=y,n=h,i=m,r=g,R(function(e){var h,g,m,y,L,N,j,U,O,_,B,F,V,H;switch(e.g){case 1:u6(t,"load"),a=t.h,t.K=new so({Yd:function(){return a.playbackRate},qc:function(){return a.defaultPlaybackRate},ig:function(e){a.playbackRate=e},$g:function(e){a.currentTime+=e}}),lr(t,a,n),h=t,(g=t.g).lcevc.enabled?(u3(h),null==h.M&&(h.M=new oy(h.h,h.tg,g.lcevc),h.I&&(h.I.da=h.M))):u3(h),t.Mb=t.g.preferredTextLanguage,t.yd=t.g.preferredTextRole,t.wd=t.g.preferForcedSubs,lF(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.o.init(function(e,n,i){t.i&&t.j&&e!=t.j.l&&lI(t,e,!0,void 0!==n&&n,void 0===i?0:i)}),t.o.setMediaElement(a),t.o.setCmsdManager(t.ga),t.j=new sM((j=t).i,{ld:function(){return j.G?j.G.Ld():0},getBandwidthEstimate:function(){return j.o.getBandwidthEstimate()},eb:function(){return j.eb()},Z:j.I,Sb:j.F,onError:function(e){return lU(j,e)},onEvent:function(e){return j.dispatchEvent(e)},me:function(e,t,n){var i=e.startTime;if(e=e.endTime,(t=t.type)!=nW){if(j.G){j.G.ah();var r=oI(j.I,t);!j.T()&&j.h.paused&&!j.h.seeking&&null!=r&&0<r&&j.G.Ld()<r&&j.G.Ve(r)}ll(j)}n=(new Map).set("start",i).set("end",e).set("contentType",t).set("isMuxed",n),j.dispatchEvent(u4("segmentappended",n))},Vi:function(e,t){var n,i,r,a,o,s,u;(t=t.Sc)&&j.bc&&(n=j.bc,i=t,r=e,a=n,o=i.contentType,(s=a.g.get(o))||(s={Gd:[],ef:null,contentType:o},a.g.set(o,s)),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.Gd;t.Gd=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.Gd=[]}(n,u=s),n={Sc:i,position:r},0<=(i=(u=u.Gd).findIndex(function(e){return e.position>=r}))?u.splice(i,+(u[i].position==r),n):u.push(n))},Bg:function(e,t){var n=j.C;if(n.g.parseInbandPsshEnabled&&!n.F&&["audio","video"].includes(e)){e=new rP(eh(t)),t=0;for(var i=u(e.data),r=i.next();!r.done;r=i.next())t+=r.value.length;if(0==t)n=Promise.resolve();else{for(t=new Uint8Array(t),i=0,r=(e=u(e.data)).next();!r.done;r=e.next())r=r.value,t.set(r,i),i+=r.length;rB(n,"cenc",t),n=n.m}}else n=Promise.resolve();return n},disableStream:function(e,t){return j.disableStream(e,t)}}),t.j.configure(t.g.streaming),t.m=lz,t.dispatchEvent(u4("streaming")),o=i;case 2:for((l=t.j.l)||o||(o=lk(t)?t.o.chooseVariant():null),c=[],p=(d=u([(s=l||o).video,s.audio])).next();!p.done;p=d.next())(f=p.value)&&!f.segmentIndex&&c.push(f.createSegmentIndex());if(!(0<c.length)){e.u(4);break}return b(e,Promise.all(c),4);case 4:if(!s||0!=s.disabledUntilTime){e.u(2);break}if(t.H&&t.H.onInitialVariantChosen&&t.H.onInitialVariantChosen(s),t.i.isLowLatency&&(t.g.streaming.lowLatencyMode?t.configure(t.Re):q("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),t.L&&((m=t.L).l=t.i.isLowLatency&&t.g.streaming.lowLatencyMode,m.l?m.i==uK?m.i=uq:m.i==uz&&(m.i=uX):m.i==uq?m.i=uK:m.i==uX&&(m.i=uz),function(e,t){if(e.g&&e.g.enabled&&e.g.version==uG&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}(t.L,1e3*n)),lF(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),y=t.j,L=t.g.playRangeStart,N=t.g.playRangeEnd,y.j.presentationTimeline.T()||(y.P=L,y.O=N),v=function(e){var n,i,r,o,s;n=t,i=e,t.G=new o8(n.h,n.i,n.g.streaming,i,function(){n.Nb&&sl(n.Nb,!0),n.j&&n.j.Zc(),n.O&&ll(n)},function(e){return n.dispatchEvent(e)}),r=t,o=e,(o=new uh(r.sd,r.T()||0<o)).addEventListener("enter",function(e){lO(r,"timelineregi
1onenter",e.region)}),o.addEventListener("exit",function(e){lO(r,"timelineregionexit",e.region)}),o.addEventListener("skip",function(e){var t=e.region;e.seeking||(lO(r,"timelineregionenter",t),lO(r,"timelineregionexit",t))}),(s=new su(r.h)).h.add(o),r.bc&&s.h.add(r.bc),t.Nb=s,ls(t,a,!1)},t.g.streaming.startAtSegmentBoundary||(null==(x=t.ja)&&t.i.startTime&&(x=t.i.startTime),v(x)),l){e.u(7);break}if(!t.g.streaming.startAtSegmentBoundary){e.u(8);break}return T=t.i.presentationTimeline,S=t.ja||t.h.currentTime,null==t.ja&&t.i.startTime&&(S=t.i.startTime),A=T.Eb(),k=T.lb(),S<A?S=A:S>k&&(S=k),b(e,(U=o,O=S,R(function(e){return 1==e.g?(_=U.audio,B=U.video,F=function(e,t){var n,i,r;return R(function(a){return 1==a.g?e?e.segmentIndex?a.u(2):b(a,e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Ob(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},b(e,F(_,O),2)):3!=e.g?(V=e.h,b(e,F(B,O),3)):null!=(H=e.h)&&null!=V?e.return(Math.max(H,V)):null!=H?e.return(H):null!=V?e.return(V):e.return(O)})),9);case 9:E=e.h,v(E);case 8:lI(t,o,!0,!1,0);case 7:return t.G.ready(),t.rc().find(function(e){return e.active})||((I=iB(t.i.textStreams,t.Mb,t.yd,t.wd)[0]||null)&&ui(t.A.h,I,!0),o&&(I?(function(e,t,n){if(0==e.g.autoShowText)return!1;if(1==e.g.autoShowText)return!0;var i=im(e.g.preferredTextLanguage);return(n=im(n.language),2==e.g.autoShowText)?ih(n,i):3==e.g.autoShowText?!!t&&(e=im(t.language),ih(n,i)&&!ih(e,n)):(q("Invalid autoShowText setting!"),!1)}(t,o.audio,I)&&(t.ma=!0),t.ma&&t.s.setTextVisibility(!0)):(t.ma=!1,t.s.setTextVisibility(!1)),lP(t)),I&&(t.g.streaming.alwaysStreamText||t.If())&&(sR(t.j,I),lN(t))),b(e,t.j.start(r),10);case 10:t.g.abr.enabled&&(t.o.enable(),lL(t)),lC(t),lk(t),t.i.variants.some(function(e){return e.primary}),((M=t.T())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.i.serviceDescription||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(C=function(){return lS(t)},t.l.D(a,"timeupdate",C)),M||(D=function(){return lA(t)},t.l.D(a,"timeupdate",D),lA(t),t.i.nextUrl&&(0<t.g.streaming.preloadNextUrlWindow&&(P=function(){var e;return R(function(n){if(1==n.g)return isNaN(e=t.Ra().end-t.h.currentTime)||!(e<=t.g.streaming.preloadNextUrlWindow)?n.u(0):(t.l.$a(a,"timeupdate",P),b(n,t.preload(t.i.nextUrl),4));t.wa=n.h,w(n)})},t.l.D(a,"timeupdate",P)),t.l.D(a,"ended",function(){t.load(t.wa||t.i.nextUrl)}))),t.B&&t.B.onManifestUpdated(M),t.sa=!0,w(e)}})),0)})},"loadInner_"),22);case 22:var I,M,C,D,P,L,N,j=r;if(j.I)for(var U=u(j.I),O=U.next();!O.done;O=U.next())(O=O.value)();j.I=null,y.Ma&&eY()&&n8(y.Ma)&&(P=y.I,L=y.W,N=y.Ma,P.g&&e.ManagedMediaSource&&P.i&&(P.C&&P.g.removeChild(P.C),P.C=aW(L,N),P.g.appendChild(P.C),P.g.disableRemotePlayback=!1)),S.u(14);break;case 23:return b(S,l(function(){return R(function(e){var t,n,r,a,o,s,l,c,d,p,f,g,m,v,x;return b(e,(t=y,n=h,r=i,R(function(e){switch(e.g){case 1:if(u6(t,"src-equals"),a=t.h,t.G=new o6(a),o=!1,t.vd.push(function(){o=!0}),null!=t.ja&&t.G.Ve(t.ja),t.K=new so({Yd:function(){return a.playbackRate},qc:function(){return a.defaultPlaybackRate},ig:function(e){a.playbackRate=e},$g:function(e){a.currentTime+=e}}),ls(t,a,!0),a.textTracks&&(ln(t),s=function(){var e=lf(t).find(function(e){return"disabled"!==e.mode});e&&(e.mode="showing"),(e=lg(t))&&(e.mode="hidden")},l=function(){var e=lf(t).find(function(e){return"disabled"!==e.mode});e&&(e.mode="hidden"),e=lg(t);var n=t.s.isTextVisible();e&&n&&(e.mode="showing")},t.l.D(a,"enterpictureinpicture",function(){return s()}),t.l.D(a,"leavepictureinpicture",function(){return l()}),a.remote?(t.l.D(a.remote,"connect",function(){return l()}),t.l.D(a.remote,"connecting",function(){return l()}),t.l.D(a.remote,"disconnect",function(){return l()})):"webkitCurrentPlaybackTargetIsWireless"in a&&t.l.D(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return l()}),(c=a).webkitSupportsFullscreen&&t.l.D(c,"webkitpresentationmodechanged",function(){"inline"!=c.webkitPresentationMode?s():l()})),lr(t,a,n),!(d=function(e,t,n){try{if(!e.g.enabled)return t;var i=uR(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=uO;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=uB;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/d
1ash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=uU;break e}r=void 0}i.ot=r,i.su=!0;var a=uN(i);return uj(t,a)}catch(e){return z("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(t.L,t.W,r)).includes("#t=")&&(0<t.g.playRangeStart||isFinite(t.g.playRangeEnd))&&(d+="#t=",0<t.g.playRangeStart&&(d+=t.g.playRangeStart),isFinite(t.g.playRangeEnd)&&(d+=","+t.g.playRangeEnd)),!t.I){e.u(2);break}return b(e,t.I.destroy(),3);case 3:t.I=null;case 2:return aY(a),a.src=d,(eK()||ez())&&a.load(),"none"!=a.preload&&!a.autoplay&&n8(r)&&eY()&&a.load(),t.m=lX,t.dispatchEvent(u4("streaming")),p=new i0,o$(a,HTMLMediaElement.HAVE_METADATA,t.l,function(){t.G.ready(),p.resolve()}),f=function(){return new Promise(function(e){var n=new eB(e);t.l.D(a.textTracks,"change",function(){return n.$(.5)}),n.$(.5)})},o$(a,HTMLMediaElement.HAVE_CURRENT_DATA,t.l,function(){var e,n,i,r,a;return R(function(s){var l,c,d,h;if(1==s.g)return b(s,f(),2);if(o)return s.return();for(""!=(c=(l=t).g.preferredAudioLanguage)&&l.kh(c,l.g.preferredVariantRole),(e=lf(t)).some(function(e){return"showing"===e.mode})&&(t.ma=!0,t.s.setTextVisibility(!0)),e.length&&(t.s.enableTextDisplayer?t.s.enableTextDisplayer():ei("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),n=!1,r=(i=u(e)).next();!r.done;r=i.next())"disabled"!==(a=r.value).mode&&(n?(a.mode="disabled",q("Found more than one enabled text track, disabling it",a)):(lp(t,a),n=!0));""!=(h=(d=t).g.preferredTextLanguage)&&d.cg(h,d.g.preferredTextRole,d.g.preferForcedSubs),w(s)})}),a.error?p.reject(lB(t)):"none"==a.preload&&(q('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.'),p.resolve()),t.l.qa(a,"error",function(){p.reject(lB(t))}),b(e,ic(t.g.streaming.loadTimeout,p),4);case 4:((g=t.T())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(m=function(){return lS(t)},t.l.D(a,"timeupdate",m)),g||(v=function(){return lA(t)},t.l.D(a,"timeupdate",v),lA(t)),t.B&&(t.B.onManifestUpdated(g),g&&(x=t.Ra().end,t.l.D(a,"progress",function(){var e=t.Ra().end;x!=e&&(t.B.onManifestUpdated(t.T()),x=e)}))),t.sa=!0,w(e)}})),0)})},"srcEqualsInner_"),14);case 14:y.dispatchEvent(u4("loaded"));case 6:if(k(S),!r){S.u(25);break}return b(S,r.destroy(),25);case 25:y.wa=null,E(S,0);break;case 5:if(!(v=A(S))||7e3==v.code){S.u(27);break}return b(S,y.ic(!1),27);case 27:throw v}})},c.uj=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,i=this;return R(function(r){return 1==r.g?b(r,u9(i),2):3!=r.g?(n=r.h,b(r,i.ic(e,t),3)):r.return(n)})},c.Hg=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n,i=this;return R(function(r){return 1==r.g?b(r,u9(i,t),2):3!=r.g?(n=r.h,b(r,i.detach(e),3)):r.return(n)})},c.preload=function(e,t,n){t=void 0===t?null:t;var i,r=this;return R(function(a){return 1==a.g?b(a,u7(r,e,t,n),2):((i=a.h)?i.start():lU(r,new eC(2,7,7005)),a.return(i))})},c.ff=function(){var e,t,n,i,r=this;return R(function(a){for(e=[],n=(t=u(r.Be)).next();!n.done;n=t.next())(i=n.value).s||e.push(i.destroy());return r.Be=[],b(a,Promise.all(e),0)})},c.dj=function(){for(var e=this.ba;e.g;)e.release()},c.Hc=function(e){return new rN(e)},c.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=sJ(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(ei("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(ei("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(ei("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&eY(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&"boolean"==typeof e.streaming.liveSync){ei("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}
1if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(ei("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(ei("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(ei("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(ei("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(ei("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(ei("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(ei("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(ei("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){ei("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(ei("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(ei("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(ei("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(ei("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(ei("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.drm&&e.drm.advanced){for(var a in n=!1,e.drm.advanced){var o=e.drm.advanced[a];i=o.videoRobustness,o=o.audioRobustness,"videoRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].videoRobustness)&&(e.drm.advanced[a].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].audioRobustness)&&(e.drm.advanced[a].audioRobustness=[o],n=!0)}n&&ei("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of str
1ings, please update your usage of these properties.")}return a=s8(this.g,e,lb(this)),lc(this),a},c.Uh=function(e){this.Re=e},c.getConfiguration=function(){var e=lb(this);return s8(e,this.g,lb(this)),e},c.ci=function(){return this.Re},c.Pg=function(){return s8(lb(this),this.g,lb(this)),s$(this.g,lb(this))},c.Mg=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.h.currentTime+t,this.Ra().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},c.hj=function(){for(var e in this.g)delete this.g[e];s8(this.g,lb(this),lb(this)),lc(this)},c.ki=function(){return this.m},c.Af=function(){return this.i?this.i.type:null},c.oi=function(){return this.h},c.wb=function(){return this.F},c.Mc=function(){return this.W},c.Lg=function(){return this.B?this.B:null},c.T=function(){return this.i&&!this.ya()?this.i.presentationTimeline.T():!!(this.h&&(this.h.src||this.ya()))&&1/0==this.h.duration},c.vc=function(){return!!this.i&&this.i.presentationTimeline.vc()},c.Gi=function(){if(this.i&&!this.ya()){var e=this.i.variants;return!!e.length&&!e[0].video}return!!(this.h&&(this.h.src||this.ya()))&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},c.Ra=function(){if(this.i&&!this.ya()){if(!this.sa&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Eb(),end:e.lb()}}if(this.h&&(this.h.src||this.ya())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return{start:t,end:e=Math.min(e.end(e.length-1),n)}}return{start:0,end:0}},c.Di=function(){this.T()&&(this.h.currentTime=this.Ra().end)},c.Hi=function(){return this.sa},c.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},c.drmInfo=function(){return this.C?this.C.h:null},c.kd=function(){return this.C?this.C.kd():1/0},c.yf=function(){return this.C?this.C.yf():[]},c.Wd=function(){return this.C?this.C.Wd():{}},c.Hf=function(){return!!this.O&&this.O.g==r8},c.eb=function(){return this.h?this.K?this.K.i:1:0},c.Jd=function(e,t){t=void 0===t||t,0==e?q("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==lz&&(this.o.playbackRateChanged(e),sC(this.j,t&&1<Math.abs(e))),lx(this,e))},c.cd=function(){var e=this.K.qc();this.m==lX&&this.K.set(e),this.m==lz&&(this.K.set(e),this.o.playbackRateChanged(e),sC(this.j,!1)),this.Ia.La()},c.sc=function(){if(this.i&&!this.ya()){for(var e=this.j?this.j.l:null,t=[],n=0,i=u(this.i.variants),r=i.next();!r.done;r=i.next())if(iO(r=r.value)){var a=iR(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(e){return ij(e)}):[]},c.rc=function(){if(this.i&&!this.ya()){for(var e=this.j?this.j.s:null,t=[],n=u(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=iP(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?lf(this).map(function(e){var t=iU(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}):[]},c.hi=function(){var e=this.Ed;return this.i&&(e=this.i.imageStreams),e.map(function(e){return iL(e)})},c.Xh=function(e){var t,n,i,r=this;return R(function(a){return 1==a.g?r.m!=lz&&r.m!=lX?a.return(null):(t=r.Ed,r.i&&(t=r.i.imageStreams),(n=t.find(function(t){return t.id==e}))?n.segmentIndex?a.u(2):b(a,n.createSegmentIndex(),2):a.return(null)):(i=[],n.segmentIndex.vb(function(e){var t=ld(e.tilesLayout||n.tilesLayout);if(t){t=t.rows*t.mc;for(var r=e.j-e.startTime,a=0;a<t;a++){var o=lh(n,e.startTime+r*a/t);o&&i.push(o)}}}),n.closeSegmentIndex&&n.closeSegmentIndex(),a.return(i))})},c.xi=function(e,t){var n,i,r=this;return R(function(a){return 1==a.g?r.m!=lz&&r.m!=lX?a.return(null):(n=r.Ed,r.i&&(n=r.i.imageStreams),(i=n.find(function(t){return t.id==e}))?i.segmentIndex?a.u(2):b(a,i.createSegmentIndex(),2):a.return(null)):a.return(lh(i,t))})},c.lh=function(e){var t,n=this;if((!this.i||!this.G||((t=n.i.textStreams.find(function(t){return t.id==e.id}))&&t!=n.j.s&&(ui(n.A.h,t,!1),sR(n.j,t),lR(n),lN(n),n.Mb=t.language),this.ya()))&&n.h&&n.h.textTracks){var i=lf(n),r=i.find(function(e){return"disabled"!==e.mode});(i=i.find(function(t){return iN(t)===e.id}))&&(r!==i&&(r&&(r.mode="disabled",n.l.$a(r,"cuechange"),n.s.remove(0,1/0)),i&&lp(n,i)),lR(n),lN(n))}},c.dg=function(e,t,n){var i=this;if(t=void 0!==t&&t,n=void 0===n?0:n,(!this.i||!this.G||(function(){var r=i.i.variants.find(function(t){return t.id==e.id});if(r&&iO(r)){var a=i.j.l;i.g.abr.enabled&&(a.video!=r.video||a.audio&&r.audio&&a.audio.language==r.audio.language&&a.audio.channelsCount==r.audio.channelsCount&&a.audio.label==r.audio.label)&&q("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.ya()?lI(i,r,!1,!1,0):lI(i,r,!1,t||!1,n||0),i.aa.configure({language:r.language,role:r.audio&&r.audio.roles&&r.audio.roles[0]||"",channelCount:r.audio&&r.audio.channelsCount?r.audio.channelsCount:0,Nc:r.video&&r.video.hdr?r.video.hdr:"",spatialAudio:!!r.audio&&!!r.audio.spatialAudio&&r.audio.spatialAudio,videoLayout:r.video&&r.video.videoLayout?r.video.videoLayout:"",Gc:r.audio&&r.audio.label?r.audio.label:"",bd:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:r.audio&&r.audio.codecs?r.audio.codecs:""}),lk(i)}}(),this.ya()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks);r=u(r);for(var a=r.next();!a.done;a=r.next())if(iN(a=a.value)==e.id){lM(i,a);break}}},c.Zh=function(){return lG(this.sc())},c.vi=function(){return lG(this.rc())},c.Yh=function(){return Array.from(lH(this.sc()))},c.ui=function(){return Array.from(lH(this.rc()))},c.kh=function(e,t,n,i,r,a,o){var s=this;if(n=void 0===n?0:n,i=void 0===i?0:i,r=void 0===r?"":r,a=void 0!==a&&a,o=void 0===o?"":o,(!this.i||!this.G||(function(){function l(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}s.aa=s.g.adaptationSetCriteriaFactory(),s.aa.configure({language:e,role:t||"",channelCount:n||0,Nc:"",spatialAudio:a||!1,videoLayout:"",Gc:o||"",bd:"",codecSwitchingStrategy:s.g.mediaSource.codecSwitchingStrategy,audioCodec:r||""});var c=s.j.l,d=s.aa.create(s.i.variants),h=null;d=u(d.values());for(var p=d.next();!p.done;p=d.next())iO(p=p.value)&&(!h||l(h,c)>
1l(p,c))&&(h=p);h!=c&&(h?(c=iR(h),s.dg(c,!0,i||0)):lE(s))}(),this.ya()))&&s.h&&s.h.audioTracks){var l=iB(s.sc(),e,t||"",!1)[0];l&&s.dg(l)}},c.cg=function(e,t,n){var i,r,a=this;n=void 0!==n&&n,(!this.i||!this.G||(a.Mb=e,a.yd=t||"",a.wd=n||!1,(i=iB(a.i.textStreams,a.Mb,a.yd,a.wd)[0]||null)&&i!=a.j.s&&(ui(a.A.h,i,!1),a.g.streaming.alwaysStreamText||a.If())&&(sR(a.j,i),lR(a),lN(a)),this.ya()))&&(r=iB(a.rc(),e,t||"",n||!1)[0])&&a.lh(r)},c.mj=function(e,t,n){var i=this;if(t=void 0===t||t,n=void 0===n?0:n,(!this.i||!this.G||(function(){for(var r=null,a=u(i.i.variants),o=a.next();!o.done;o=a.next())if((o=o.value).audio.label==e){r=o;break}null!=r&&(i.aa=i.g.adaptationSetCriteriaFactory(),i.aa.configure({language:r.language,role:"",channelCount:0,Nc:"",spatialAudio:!1,videoLayout:"",bd:"",Gc:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),lE(i,t,n))}(),this.ya()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks),a=null;r=u(r);for(var o=r.next();!o.done;o=r.next())(o=o.value).label==e&&(a=o);a&&lM(i,a)}},c.If=function(){var e=this.ma;return this.s?this.s.isTextVisible():e},c.bi=function(){return this.Cd.map(function(e){return iP(e)})},c.ai=function(e){if(!this.Cd.length)return[];var t=im(e);if(!(e=this.Cd.filter(function(e){return im(e.language)==t})).length)return[];var n=[],i=new Set;e=u(e);for(var r=e.next();!r.done;r=e.next())(r=r.value).segmentIndex&&r.segmentIndex.vb(function(e){var t=e.N()[0],r=e.startTime+"-"+e.endTime+"-"+t;e={id:r,title:t,startTime:e.startTime,endTime:e.endTime},i.has(r)||(n.push(e),i.add(r))});return n},c.rh=function(e){var t,n;e=!!e,this.ma!=e&&(this.ma=e,this.m==lz?(this.s.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.s||0<(e=iB(this.i.textStreams,this.Mb,this.yd,this.wd)).length&&(sR(this.j,e[0]),lR(this),lN(this)):((n=(t=this.j).h.get(nW))&&(sK(n),sq(n).catch(function(){}),t.F=t.h.get(nW),t.h.delete(nW)),t.s=null))):this.h&&this.h.src&&this.h.textTracks&&this.s.setTextVisibility(e),lP(this))},c.pi=function(){if(this.G)var e=this.G.Ld();else{if(null==this.ja)return new Date;e=this.ja}if(this.i&&!this.ya()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?isNaN((t=this.h.getStartDate()).getTime())?null:new Date(t.getTime()+1e3*e):null},c.Qg=function(){if(this.i&&!this.ya()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?isNaN((e=this.h.getStartDate()).getTime())?null:e:null},c.Zd=function(){return this.T()&&this.i?this.i.presentationTimeline.Zd():null},c.Db=function(){if(this.m==lz)return this.I.Db();var e={total:[],audio:[],video:[],text:[]};return this.m==lX&&(e.total=az(this.h.buffered)),e},c.Xd=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Qg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},c.getStats=function(){if(this.m!=lz&&this.m!=lX)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,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};lT(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.T()){var n=this.A;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.A.P=this.G.ug(),this.A.W=this.G.vg()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.A;var i=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=i,this.A.L=Number(n.corruptedVideoFrames)}if(n=this.C&&(n=this.C).H?n.H:NaN,this.A.o=n,this.m==lz){if(n=this.j.l,t=this.j.s,n){var r=(i=this.K?this.K.i:1)
1*n.bandwidth;t&&t.bandwidth&&(r+=i*t.bandwidth),this.A.A=r}n&&n.video&&(t=this.A,i=n.video.height||NaN,t.m=n.video.width||NaN,t.l=i),this.T()&&(n=this.Xd()||0,this.A.B=n/1e3),this.i&&(this.A.G=this.i.periodCount,this.A.F=this.i.gapCount,this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.A.s=n}this.m==lX&&((n=this.A).kc=isNaN(n.kc)?NaN:n.kc+NaN,n=this.A,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var a=this.A;e=a.m,n=a.l,t=a.A,i=a.M,r=a.O;var o=a.L,s=a.W,l=a.P,c=a.s,d=a.i,h=a.C,p=a.H,f=a.j,g=ut(a.g,"playing"),m=ut(a.g,"paused"),v=ut(a.g,"buffering"),y=a.o,b=a.B,w=a.I,x=a.Wg,T=a.kc,S=a.K,A=a.G,k=a.F,E=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=u(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(a.g),I=[];a=u(a.h.g);for(var M=a.next();!M.done;M=a.next())I.push({timestamp:(M=M.value).timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:r,corruptedFrames:o,stallsDetected:s,gapsJumped:l,estimatedBandwidth:c,completionPercent:d,loadLatency:h,manifestTimeSeconds:p,drmTimeSeconds:f,playTime:g,pauseTime:m,bufferingTime:v,licenseTime:y,liveLatency:b,maxSegmentDuration:w,manifestSizeBytes:x,bytesDownloaded:T,nonFatalErrorCount:S,manifestPeriodCount:A,manifestGapCount:k,stateHistory:E,switchHistory:I}},c.Jh=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,p,f=this;return R(function(g){switch(g.g){case 1:if(f.m!=lz&&f.m!=lX)throw new eC(1,7,7004);if("subtitles"!=n&&"captions"!=n&&q("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){g.u(2);break}return b(g,lm(f,e),3);case 3:i=g.h;case 2:var m,v,y,w,x,T,S,A;if(s=[],f.B&&(s=f.B.getCuePoints()),f.m!=lX){g.u(4);break}return o&&(n="forced"),b(g,(m=f,v=e,y=t,w=n,x=i,T=a||"",S=s,R(function(e){if(1==e.g)return"text/vtt"!=x||S.length?b(e,lv(m,v,m.F,m.g.streaming.retryParameters),3):e.u(2);2!=e.g&&(v=oG(new Blob([ly(m,e.h,x,S)],{type:"text/vtt"})),x="text/vtt"),A=document.createElement("track");var t=m.L,n=v;try{if(t.g.enabled){var i=uR(t);i.ot=uV,i.su=!0;var r=uN(i),a=uj(n,r)}else a=n}catch(e){z("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),a=n}return A.src=a,A.label=T,A.kind=w,A.srclang=y,m.h.getAttribute("crossorigin")||m.h.setAttribute("crossorigin","anonymous"),m.h.appendChild(A),e.return(A)})),5);case 5:if(u=im(t),l=f.rc().find(function(e){return im(e.language)==u&&e.label==(a||"")&&e.kind==n}))return lC(f),g.return(l);throw new eC(1,2,2012);case 4:if(c=nY,h=(d=f.Ra()).end-d.start,f.i&&(h=f.i.presentationTimeline.getDuration()),1/0==h)throw new eC(1,4,4033);if(!s.length){g.u(6);break}return b(g,lv(f,e,f.F,f.g.streaming.retryParameters),7);case 7:e=oG(new Blob([ly(f,g.h,i,s)],{type:"text/vtt"})),i="text/vtt";case 6:if(p={id:f.qe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:si(0,h,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:c.Aa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nZ(i||"",r||"")]),isAudioMuxedInVideo:!1},!ir(nZ(p.mimeType,p.codecs)))throw new eC(2,2,2014,i);return f.i.textStreams.push(p),lC(f),g.return(iP(p))}})},c.Kh=function(e,t){var n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,T=this;return R(function(S){switch(S.g){case 1:if(T.m!=lz&&T.m!=lX)throw new eC(1,7,7004);if(t){S.u(2);break}return b(S,lm(T,e),3);case 3:t=S.h;case 2:if("text/vtt"!=t)throw new eC(1,2,2017,e);if(n=nY,r=(i=T.Ra()).end-i.start,T.i&&(r=T.i.presentationTimeline.getDuration()),1/0==r)throw new eC(1,4,4045);return b(S,lv(T,e,T.F,T.g.streaming.retryParameters),4);case 4:if(a=S.h,!(o=ii(t)))throw new eC(2,2,2014,t);for(s=o(),l={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},c=eh(a),d=s.parseMedia(c,l,e,[]),h=[],f=(p=u(d)).next(),g={};!f.done;g={Ie:void 0,Ic:void 0},f=p.next())g.Ic=f.value,g.Ie=null,m=function(t){return function(){return null==t.Ie&&(t.Ie=nH([e],[t.Ic.payload])),t.Ie||[]}}(g),v=new aB(g.Ic.startTime,g.Ic.endTime,m,0,null,null,0,0,1/0),g.Ic.payload.includes("#xywh")&&4===(y=g.Ic.payload.split("#xywh=")[1].split(",")).length&&v.ye({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)}),h.push(v);if(w=t,!h.length){S.u(5);break}return b(S,uv(h[0].N()[0],T.F,T.g.manifest.retryParameters),6);case 6:w=S.h;case 5:return x={id:T.qe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new st(h),mimeType:w||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Ue,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nZ(w||"","")]),isAudioMuxedInVideo:!1},T.m==lX?T.Ed.push(x):T.i.imageStreams.push(x),lC(T),S.return(iL(x))}})},c.Ih=function(e,t,n){var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w=this;return R(function(x){switch(x.g){case 1:if(w.m!=lz&&w.m!=lX)throw new eC(1,7,7004);if(n){x.u(2);break}return b(x,lm(w,e),3);case 3:n=x.h;case 2:if(i=nY,a=(r=w.Ra()).end-r.start,w.i&&(a=w.i.presentationTimeline.getDuration()),1/0==a)throw new eC(1,4,4054);return b(x,lv(w,e,w.F,w.g.streaming.retryParameters),4);case 4:if(o=x.h,!(s=ii(n)))throw new eC(2,2,2014,n);for(l=s(),c={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},d=eh(o),h=l.parseMedia(d,c,e,[]),p=[],g=(f=u(h)).next(),m={};!g.done;m={Td:void 0},g=f.next())m.Td=g.value,v=new aB(m.Td.startTime,m.Td.endTime,function(e){return function(){return[e.Td.payload]}}(m),0,null,null,0,0,1/0),p.push(v);return y={id:w.qe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new st(p),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.Aa,primary:!1,trickModeVideo:null,Ek:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nZ("text/plain","")]),isAudioMuxedInVideo:!1,Ck:null},w.Cd.push(y),lC(w),x.return(iP(y))}})},c.rj=function(e,t){this.ia.width=e,this.ia.height=t},c.$f=function(e){if(this.m==lz){var t=this.j;if(e=void 0===e?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=u(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).od||i.Ga||i.ib||(i.od=!1,sG(t,i,e));t=!0}}else t=!1;return t},c.zf=function(){return q("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},c.li=function(){return this.Oa},c.fi=function(){var e={video:null,audio:null,text:null};if(this.m!=lz)return e;var t=this.j.l,n=this.h.currentTime;t=u([t.video,t.audio,this.j.s]);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r={codecs:(r=i.segmentIndex.get(r)).codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},"video"==i.type?(r.width=i.width,r.height=i.height,e.video=r):"audio"==i.type?e.audio=r:i.type==nW&&(e.text=r)}return e},c.uh=function(e){this.te=e},c.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===lK||!navigator.onLine||0==t||!this.i)return!1;if(this.i.variants.some(function(t){var n=t[e.type];return!!n&&n.id!==e.id&&!t.disabledUntilTime&&("audio"!=e.type||e.language===n.language)})){for(var n=!1,i=!1,r=u(this.i.variants),a=r.next();!a.done;a=r.next()){var o=(a=a.value)[e.type];o&&(o.id===e.id?(a.disabledUntilTime=Date.now()/1e3+t,n=!0):o.trickModeVideo&&o.trickModeVideo.id==e.id&&(i=!0))}
1return(!!n||!i)&&(this.ze.ua(1),lE(this,!1,t=this.Db().video.reduce(function(e,t){return e+t.end-t.start},0),!0,!1),!0)}return!1},c.addFont=function(t,n){var i,r,a,o,s,l;return i=t,r=n,R(function(t){if(1==t.g)return"fonts"in document&&"FontFace"in e?b(t,document.fonts.ready,2):t.return();if(!("entries"in document.fonts))return t.return();for(o=(a=u(function(e){e=e.entries();for(var t=[],n=e.next();!1===n.done;)t.push(n.value),n=e.next();return t}(document.fonts))).next();!o.done;o=a.next())if((s=o.value).family===i&&"swap"===s.display)return t.return();l=new FontFace(i,"url("+r+")",{display:"swap"}),document.fonts.add(l),w(t)})},c.ya=function(){return!!this.h&&!!this.h.remote&&"disconnected"!=this.h.remote.state},c.Pc=function(){return!this.h||!!this.h.ended||this.sa&&!this.T()&&this.h.currentTime>=this.Ra().end},B("shaka.Player",u2),u2.prototype.isEnded=u2.prototype.Pc,u2.prototype.isRemotePlayback=u2.prototype.ya,u2.prototype.addFont=u2.prototype.addFont,u2.prototype.setVideoContainer=u2.prototype.uh,u2.prototype.getFetchedPlaybackInfo=u2.prototype.fi,u2.prototype.getManifestParserFactory=u2.prototype.li,u2.prototype.getManifest=u2.prototype.zf,u2.prototype.retryStreaming=u2.prototype.$f,u2.prototype.setMaxHardwareResolution=u2.prototype.rj,u2.prototype.addChaptersTrack=u2.prototype.Ih,u2.prototype.addThumbnailsTrack=u2.prototype.Kh,u2.prototype.addTextTrackAsync=u2.prototype.Jh,u2.prototype.getStats=u2.prototype.getStats,u2.prototype.getBufferedInfo=u2.prototype.Db,u2.prototype.getSegmentAvailabilityDuration=u2.prototype.Zd,u2.prototype.getPresentationStartTimeAsDate=u2.prototype.Qg,u2.prototype.getPlayheadTimeAsDate=u2.prototype.pi,u2.prototype.setTextTrackVisibility=u2.prototype.rh,u2.prototype.getChapters=u2.prototype.ai,u2.prototype.getChaptersTracks=u2.prototype.bi,u2.prototype.isTextTrackVisible=u2.prototype.If,u2.prototype.selectVariantsByLabel=u2.prototype.mj,u2.prototype.selectTextLanguage=u2.prototype.cg,u2.prototype.selectAudioLanguage=u2.prototype.kh,u2.prototype.getTextLanguages=u2.prototype.ui,u2.prototype.getAudioLanguages=u2.prototype.Yh,u2.prototype.getTextLanguagesAndRoles=u2.prototype.vi,u2.prototype.getAudioLanguagesAndRoles=u2.prototype.Zh,u2.prototype.selectVariantTrack=u2.prototype.dg,u2.prototype.selectTextTrack=u2.prototype.lh,u2.prototype.getThumbnails=u2.prototype.xi,u2.prototype.getAllThumbnails=u2.prototype.Xh,u2.prototype.getImageTracks=u2.prototype.hi,u2.prototype.getTextTracks=u2.prototype.rc,u2.prototype.getVariantTracks=u2.prototype.sc,u2.prototype.cancelTrickPlay=u2.prototype.cd,u2.prototype.trickPlay=u2.prototype.Jd,u2.prototype.getPlaybackRate=u2.prototype.eb,u2.prototype.isBuffering=u2.prototype.Hf,u2.prototype.getKeyStatuses=u2.prototype.Wd,u2.prototype.getActiveSessionsMetadata=u2.prototype.yf,u2.prototype.getExpiration=u2.prototype.kd,u2.prototype.drmInfo=u2.prototype.drmInfo,u2.prototype.keySystem=u2.prototype.keySystem,u2.prototype.isFullyLoaded=u2.prototype.Hi,u2.prototype.goToLive=u2.prototype.Di,u2.prototype.seekRange=u2.prototype.Ra,u2.prototype.isAudioOnly=u2.prototype.Gi,u2.prototype.isInProgress=u2.prototype.vc,u2.prototype.isLive=u2.prototype.T,u2.prototype.getAdManager=u2.prototype.Lg,u2.prototype.getAssetUri=u2.prototype.Mc,u2.prototype.getNetworkingEngine=u2.prototype.wb,u2.prototype.getMediaElement=u2.prototype.oi,u2.prototype.getManifestType=u2.prototype.Af,u2.prototype.getLoadMode=u2.prototype.ki,u2.prototype.resetConfiguration=u2.prototype.hj,u2.prototype.getBufferFullness=u2.prototype.Mg,u2.prototype.getNonDefaultConfiguration=u2.prototype.Pg,u2.prototype.getConfigurationForLowLatency=u2.prototype.ci,u2.prototype.getConfiguration=u2.prototype.getConfiguration,u2.prototype.configurationForLowLatency=u2.prototype.Uh,u2.prototype.configure=u2.prototype.configure,u2.prototype.releaseAllMutexes=u2.prototype.dj,u2.prototype.destroyAllPreloads=u2.prototype.ff,u2.prototype.preload=u2.prototype.preload,u2.prototype.detachAndSavePreload=u2.prototype.Hg,u2.prototype.unloadAndSavePreload=u2.prototype.uj,u2.prototype.load=u2.prototype.load,u2.prototype.updateStartTime=u2.prototype.yj,u2.prototype.unload=u2.prototype.ic,u2.prototype.detach=u2.prototype.detach,u2.prototype.attachCanvas=u2.prototype.Nh,u2.prototype.attach=u2.prototype.Ib,u2.probeSupport=function(t){var n,i,r,a,o;return t=void 0===t||t,R(function(s){switch(s.g){case 1:var c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,q,z,X;if(n={},!t){s.u(2);break}return b(s,R(function(t){if(1==t.g){if(c="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)){for(d={},p=(h=u(c)).next();!p.done;p=h.next())d[p.value]=null;return t.return(d)}for(f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),m={"com.widevine.alpha":g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":["150","2000","3000"]},T={videoCapabilities:v=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:y=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},k=[null,"cenc","cbcs","cbcs-1-9"],E=new Map,I=function(e,t){var n,i,r,a,o,s,l,c,d,h,p,g,m;return R(function(v){switch(v.g){case 1:return x(v,2),b(v,t.createMediaKeys(),5);case 5:n=v.h;case 4:S(v,3);break;case 2:return A(v),v.return();case 3:if(r=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),eq()&&(r=!1),a=t.getConfiguration().videoCapabilities,o=t.getConfiguration().audioCapabilities,s={persistentState:r,encryptionSchemes:[],videoRobustnessLevels:[],audioR
1obustnessLevels:[],minHdcpVersions:[]},E.has(e)&&E.get(e)?s=E.get(e):E.set(e,s),(l=a[0].encryptionScheme)&&!s.encryptionSchemes.includes(l)&&s.encryptionSchemes.push(l),(c=a[0].robustness)&&!s.videoRobustnessLevels.includes(c)&&s.videoRobustnessLevels.push(c),(d=o[0].robustness)&&!s.audioRobustnessLevels.includes(d)&&s.audioRobustnessLevels.push(d),"getStatusForPolicy"in n){for(h=[],g=(p=u(f)).next(),m={};!g.done;m={pd:void 0},g=p.next())m.pd=g.value,s.minHdcpVersions.includes(m.pd)||h.push(n.getStatusForPolicy({minHdcpVersion:m.pd}).then(function(e){return function(t){"usable"!=t||s.minHdcpVersions.includes(e.pd)||s.minHdcpVersions.push(e.pd)}}(m)));return b(v,Promise.all(h),0)}v.u(0)}})},M=function(e,t,n,i){var r,a,o,s,l,c,d,h,p,f;return R(function(g){switch(g.g){case 1:for(x(g,2),o=(a=u((r=tv(T)).videoCapabilities)).next();!o.done;o=a.next())(s=o.value).encryptionScheme=t,s.robustness=n;for(c=(l=u(r.audioCapabilities)).next();!c.done;c=l.next())(d=c.value).encryptionScheme=t,d.robustness=i;return(h=tv(r)).persistentState="required",h.sessionTypes=["persistent-license"],p=[h,r],e1()?b(g,ic(5,navigator.requestMediaKeySystemAccess(e,p)),7):b(g,navigator.requestMediaKeySystemAccess(e,p),6);case 6:f=g.h,g.u(5);break;case 7:f=g.h;case 5:return b(g,I(e,f),8);case 8:S(g,0);break;case 2:A(g),w(g)}})},C=function(e,t,n,i){var r,a;return R(function(o){switch(o.g){case 1:return x(o,2),r={type:"media-source",video:{contentType:v[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:y[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:e,video:{encryptionScheme:t,robustness:n},audio:{encryptionScheme:t,robustness:i}}},e1()?b(o,ic(5,navigator.mediaCapabilities.decodingInfo(r)),7):b(o,navigator.mediaCapabilities.decodingInfo(r),6);case 6:a=o.h,o.u(5);break;case 7:a=o.h;case 5:return b(o,I(e,a.keySystemAccess),8);case 8:S(o,0);break;case 2:A(o),w(o)}})},P=(D=u(c)).next();!P.done;P=D.next())L=P.value,E.set(L,null);for(N=function(e){return!("org.w3.clearkey"===e&&eY())},j=[],O=(U=u(k)).next();!O.done;O=U.next())for(_=O.value,F=(B=u(c)).next();!F.done;F=B.next())N(V=F.value)&&(j.push(M(V,_,"","")),j.push(C(V,_,"","")));for(G=(H=u(c)).next();!G.done;G=H.next())for(z=(q=u(m[K=G.value]||[])).next();!z.done;z=q.next())X=z.value,N(K)&&(j.push(M(K,null,X,"")),j.push(M(K,null,"",X)),j.push(C(K,null,X,"")),j.push(C(K,null,"",X)));return b(t,Promise.all(j),2)}return t.return(rv(E))}),3);case 3:n=s.h;case 2:return i=function(){var e={};if(eF())for(var t=u(al.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=t.next())e[n=n.value]=eF()?al.has(n):eV(n);return e}(),r=function(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(l(n7)),t={};e=u(e);for(var n=e.next();!n.done;n=e.next()){ir(n=n.value)?t[n]=!0:t[n]=eF()?Z(n)||!!np(n):eV(n);var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}(),b(s,e8(),4);case 4:return a=s.h,o={manifest:i,media:r,drm:n,hardwareResolution:a},lW.forEach(function(e,t){o[t]=e()}),s.return(o)}})},u2.isBrowserSupported=function(){return e.Promise||q("A Promise implementation or polyfill is required"),!(!e.Promise||!e.Uint8Array||!Array.prototype.forEach||e4("Trident/"))&&(!!eF()||eV("application/x-mpegurl"))},u2.setAdManagerFactory=function(e){lY=e},u2.registerSupportPlugin=u5,u2.prototype.destroy=u2.prototype.destroy;var lK=0,lq=1,lz=2,lX=3;u2.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3},u2.version="v4.13.25";eo=new function(e){this.g=e,this.i=er,this.h=ea}(new en(Number("4"),Number("13")));var lW=new Map,lY=null;function lJ(){this.g=[],this.i=this.l=this.j=this.h=0}function l$(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new J,this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function lQ(){}function lZ(e,t){var n=[];e=u(tA(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=tM(i.value,"InLine"))&&(i=tM(i,"Creatives"))){i=u(tA(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){var a=tM(r=r.value,"Linear");
1if(a&&function(e,t,n){var i=0;null!=t&&(i=t);var r=null;if(n.attributes.skipoffset&&isNaN(r=tg(n.attributes.skipoffset))&&(r=null),n=tM(n,"MediaFiles")){var a=tA(n,"MediaFile");for(n=a,(a=a.filter(function(e){return"streaming"==e.attributes.delivery})).length&&(n=a),a=(n=u(n=n.sort(function(e,t){return(parseInt(t.attributes.height,10)||0)-(parseInt(e.attributes.height,10)||0)}))).next();!a.done;a=n.next())if(!(a=a.value).attributes.apiFramework){var o=tE(a);if(o){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:o,mimeType:a.attributes.type||null,isSkippable:null!=r,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==t,post:1/0==t,timelineRange:!1,loop:!1,overlay:null});break}}}}(n,t,a),r=tM(r,"NonLinearAds")){r=u(r=tA(r,"NonLinear"));for(var o=r.next();!o.done;o=r.next())e:{a=n;var s=o.value,l=tM(s,"StaticResource");if(l)o=l.attributes.creativeType;else{if(!(l=tM(s,"HTMLResource")))break e;o="text/html"}if(l=tE(l)){"text/html"===o&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var c=tD(s,"width",tO)||tD(s,"expandedWidth",tO),d=tD(s,"height",tO)||tD(s,"expandedHeight",tO);if(c||d){var h=null;(s=s.attributes.minSuggestedDuration)&&(h=tg(s)),s=0,null!=t&&(s=t),a.push({id:null,groupId:null,startTime:s,endTime:null,uri:l,mimeType:o,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:h,once:!0,pre:null==t,post:1/0==t,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:c||0,y:d||0}}})}}}}}}return n}function l0(t,n,i,r,a){var o=this;this.s=t,this.i=n,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=a,this.j=null,this.h=new J,google.ima.settings.setLocale(i),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.s,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.13.25"),this.g=null,this.B=r||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){!function(t,n){if(t.l(new i8("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.G))),t.o.customPlayheadTracker){var i={currentTime:t.i.currentTime};t.g=n.getAdsManager(i,t.B),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.D(t.i,"timeupdate",function(){t.i.duration&&(i.currentTime=t.i.currentTime)}),t.h.D(t.i,"volumechange",function(){t.j&&(t.j.setVolume(t.i.volume),t.i.muted&&t.j.setMuted(!0))})}else t.g=n.getAdsManager(t.i,t.B);t.l(new i8("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[],r=u(r);for(var a=r.next();!a.done;a=r.next())n.push({start:a.value,end:null});t.l(new i8("ad-cue-points-changed",(new Map).set("cuepoints",n)))}var o=t;function s(e,t){e=(new Map).set("originalEvent",e),o.l(new i8(t,e))}o.h.D(o.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){l1(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){l2(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.STARTED,function(e){l2(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){s(e,"ad-first-quartile")}),o.h.D(o.g,google.ima.AdEvent.Type.MIDPOINT,function(e){s(e,"ad-midpoint")}),o.h.D(o.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){s(e,"ad-third-quartile")}),o.h.D(o.g,google.ima.AdEvent.Type.COMPLETE,function(e){s(e,"ad-complete")}
1),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(e){l3(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){l3(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.SKIPPED,function(e){s(e,"ad-skipped")}),o.h.D(o.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){s(e,"ad-volume-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){s(e,"ad-muted")}),o.h.D(o.g,google.ima.AdEvent.Type.PAUSED,function(e){o.j&&(o.j.i=!0,s(e,"ad-paused"))}),o.h.D(o.g,google.ima.AdEvent.Type.RESUMED,function(e){o.j&&(o.j.i=!1,s(e,"ad-resumed"))}),o.h.D(o.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(e){o.j&&s(e,"ad-skip-state-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.CLICK,function(e){s(e,"ad-clicked")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){s(e,"ad-progress")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){s(e,"ad-buffering")}),o.h.D(o.g,google.ima.AdEvent.Type.IMPRESSION,function(e){s(e,"ad-impression")}),o.h.D(o.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){s(e,"ad-duration-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){s(e,"ad-closed")}),o.h.D(o.g,google.ima.AdEvent.Type.LOADED,function(e){s(e,"ad-loaded")}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){s(e,"all-ads-completed")}),o.h.D(o.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){s(e,"ad-linear-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_METADATA,function(e){s(e,"ad-metadata")}),o.h.D(o.g,google.ima.AdEvent.Type.LOG,function(e){s(e,"ad-recoverable-error")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){s(e,"ad-break-ready")}),o.h.D(o.g,google.ima.AdEvent.Type.INTERACTION,function(e){s(e,"ad-interaction")});try{t.g.init(t.i.offsetWidth,t.i.offsetHeight),t.h.D(t.i,"loadeddata",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),"ResizeObserver"in e?(t.A=new ResizeObserver(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),t.A.observe(t.i)):t.h.D(document,"fullscreenchange",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),t.F||t.o.skipPlayDetection?t.g.start():t.h.qa(t.i,"play",function(){t.F=!0,t.g.start()})}catch(e){l3(t,null)}}(o,t)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){l1(o,e)}),this.h.D(this.i,"ended",function(){o.m.contentComplete()}),this.h.qa(this.i,"play",function(){o.F=!0})}function l1(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.l(new i8("ad-error",t)),l3(e,null),e.l(new i8("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function l2(e,t){var n=t.getAd();n?(e.j=new l$(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new i8("ad-content-pause-requested")),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new i8("ad-started",t)),e.j.isLinear()&&(e.s.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):q("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function l3(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new i8("ad-content-resume-requested")),e.l(new i8("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.s.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function l4(e,t,n,i,r,a){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=i,this.m=r,this.s=a,this.B=t.overlay}function l5(e,t,n){this.g=e,this.j=t,this.h=n,this.i=null==e.overlay}function l6(e,t,n,i){function r(){if(!a.I&&a.m&&!a.C.ya()){a.m=a.i.currentTime,a.s&&!a.s.pre&&!a.s.post&&a.m<a.s.startTime&&(a.s=null);var e=l7(a);e&&ce(a,e,1,1,Date.now())}}var a=this;if(this.O=null,this.G=e,this.C=t,this.i=n,this.H=null,this.A=!0,this.h=this.i,this.j=i,this.K=new Set,this.F=new Set,this.B=new Map,this.g=new u2,cn(this),this.L=new J,this.l=new J,this.I=!1,this.W=this.o=this.s=this.m=null,this.L.D(this.i,"timeupdate",function(){if(!(a.I||a.m||a.C.ya())){a.m=a.i.currentTime;var e=l7(a,!0);e&&ce(a,e,1,1,Date.now())}}),this.L.D(this.i,"ended",function(){r()}),this.M=new eB(r),"requestVideoFrameCallback"in this.i&&!e3()){var o=this.i,s=function(){r(),o.requestVideoFrameCallback(s)};o.requestVideoFrameCallback(s)}else this.M.ua(.025);this.P=new eB(function(){var e,t,n,i,r,o,s,l,c,d,h;return R(function(p){switch(p.g){case 1:if(!a.F.size||null==a.m){p.u(0);break}if((e=a.C.m)==lK||e==lq)return p.return();t=!1,n=Array.from(a.F),i=a.C.Ra(),o=(r=u(n)).next();case 3:if(o.done){p.u(5);break}if((s=o.value)==a.s){p.u(4);break}if(l=s.endTime||s.startTime,!(1<=i.start-l)){0<(c=s.startTime-a.m)&&10>=c&&!a.B.has(s)&&cr(s)&&a.B.set(s,a.g.preload(s.uri,null,s.mimeType||void 0)),p.u(4);break}if(!a.B.has(s)){p.u(7);break}return b(p,a.B.get(s),8);case 8:(d=p.h)&&d.destroy(),a.B.delete(s);case 7:h=JSON.stringify(s),a.K.has(h)&&a.K.delete(h),a.F.delete(s),s.overlay||(t=!0);case 4:o=r.next(),p.u(3);break;case 5:t&&ct(a),w(p)}})}).ua(1)}function l8(e){if(e.G&&e.O&&!e.I){var t=e.O.supportsMultipleMediaElements,n=e.i;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.A==t&&(e.A=!t,e.A?(e.h=e.i,e.H&&(e.H.parentElement&&e.G.removeChild(e.H),e.H=null)):(e.H||((t=document.createElement(e.i.tagName)).autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.H=t),e.h=e.H))}}function l9(e,t){var n,i,r,a,o,s,l,c;R(function(d){switch(d.g){case 1:n=!1,r=(i=u(t)).next();case 2:if(r.done){d.u(4);break}if(!(a=r.value).uri){q("Missing URL in interstitial",a),d.u(3);break}if(a.mimeType){d.u(5);break}return x(d,6),o=e.g.wb(),b(d,uv(a.uri,o,e.C.getConfiguration().streaming.retryParameters),8);case 8:a.mimeType=d.h,S(d,5);break;case 6:A(d);case 5:if(s=a.id||JSON.stringify(a),e.K.has(s)){d.u(3);break}a.loop&&!a.overlay&&q("Loop is only supported in overlay interstitials",a),a.overlay||(n=!0),e.K.add(s),e.F.add(a),l=!1,a.pre&&null==e.m?l=!0:0!=a.startTime||a.canJump?null!=e.m&&0<(c=a.startTime-e.m)&&10>=c&&(l=!0):l=!0,l&&!e.B.has(a)&&cr(a)&&e.B.set(a,e.g.preload(a.uri,null,a.mimeType||void 0));case 3:r=i.next(),d.u(2);break;case 4:n&&ct(e),w(d)}})}function l7(e,t,n){t=void 0!==t&&t,n=void 0===n?null:n;var i=0,r=null;if(e.F.size&&null!=e.m){var a=e.i.ended,o=Array.from(e.F).sort(function(e,t){return t.startTime-e.startTime}),s=o;for(s=(o=u(s=t?o.filter(function(e){return e.pre}):a?o.filter(function(e){return e.post}):o.filter(function(e){return!e.pre&&!e.post}))).next();!s.done;s=o.next()){s=s.value;var l=!1;if(t)l=s.pre;else if(a)l=s.post;else if(!s.pre&&!s.post){var c=e.m-Math.round(1e3*s.startTime)/1e3;0<c&&(1>=c||!s.canJump)&&(l=null!=n||!e.s||!!e.s.pre||!!e.s.post||!(e.s.startTime>=s.startTime))}l&&(!e.s||s.startTime>=e.s.startTime)&&(i==(n||0)?r=s:r&&!s.canJump&&.001<Math.round(1e3*s.startTime)/1e3-Math.round(1e3*r.startTime)/1e3&&(r=s,i=0),i++)}}return r}function ce(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N;a=void 0===a?0:a,e.s=t,l8(e),!e.h.parentElement&&e.G&&e.G.appendChild(e.h),1==i&&1==n&&(n=Array.from(e.F).filter(function(e){return t.pre?e.pre==t.pre:t.post?e.post==t.post:.001>Math.abs(e.startTime-t.startTime)}).length),t.once&&(a++,e.F.delete(t),t.overlay||ct(e)),t.mimeType&&(t.mimeType.startsWith("image/")||"text/html"===t.mimeType)?t.overlay?function(e,t,n,i,r){function a(){e.o&&(e.o.stop(),e.o=null),e.G.removeChild(u),e.j(new i8("ad-stopped"));var a=l7(e,t.pre,i-r);a?(e.l.La(),ce(e,a,n,++i,Date.now(),r)):e.I=!1}var o=t.overlay,s="text/html"==t.mimeType?"iframe":"img",u=document.createElement(s);u.style.objectFit="contain",u.style.position="absolute",u.style.border="none",e.j(new i8("ad-started",(new Map).set("ad",new l5(t,n,i)))),"iframe"==s?u.src=t.uri:(u.src=t.uri,u.onerror=function(t){e.j(new i8("ad-error",(new Map).set("originalEvent",t))),a()});var l=o.viewport,c=o.topLeft;o=o.size,0==l.x&&0==l.y?(u.width=t.overlay.size.x,u.height=t.overlay.size.y,u.style.bottom="10%",u.style.left="0",u.style.right="0",u.style.width="100%",t.overlay.size.y||"iframe"!=s||(u.style.height="auto")):(u.style.height=o.y/l.y*100+"%",u.style.left=c.x/l.x*100+"%",u.style.top=c.y/l.y*100+"%",u.style.width=o.x/l.x*100+"%"),e.G.appendChild(u);var d=Date.now();e.o&&e.o.stop(),e.o=new eB(function(){t.playoutLimit&&(Date.now()-d)/1e3>t.playoutLimit||t.endTime&&e.i.currentTime>t.endTime?(e.j(new i8("ad-complete")),a()):e.i.currentTime<t.startTime&&(e.j(new i8("ad-skipped")),a())}),t.playoutLimit&&!t.endTime?e.o.$(t.playoutLimit):t.endTime&&e.o.ua(.025)}(e,t,n,i,a):q("Unsupported interstitial",t):e.A&&t.overlay?q("Unsupported interstitial",t):(o=e,s=t,u=n,l=i,c=r,d=a,R(function(e){switch(e.g){case 1:if(h=Date.now(),o.I=!0,!o.A||1!=l){e.u(2);break}return o.j(new i8("ad-content-pause-requested",(new Map).set("saveLivePosition",!0))),p=new i0,f=function(e){return R(function(t){if(1==t.g)return"detach"!=e.state?t.u(0):e3()?b(t,new Promise(function(e){return new eB(e).$(.1)}),3):t.u(3);p.resolve(),o.l.$a(o.C,"onstatechange",f),w(t)})},o.l.D(o.C,"onstatechange",f),b(e,p,2);case 2:return o.A||(o.h.style.display="",s.overlay?(o.h.loop=s.loop,g=s.overlay.viewport,m=s.overlay.topLeft,v=s.overlay.size,o.h.style.height=v.y/g.y*100+"%",o.h.style.left=m.x/g.x*100+"%",o.h.style.top=m.y/g.y*100+"%",o.h.style.width=v.x/g.x*100+"%"):(o.i.pause(),null!=s.resumeOffset&&0!=s.resumeOffset&&(o.i.currentTime+=s.resumeOffset),o.h.loop=!1,o.h.style.height="100%",o.h.style.left="0",o.h.style.top="0",o.h.style.width="100%")),y=!1,T=function(){if(!o.A&&!s.overlay&&null==s.resumeOffset)if(s.timelineRange&&s.endTime&&1/0!=s.endTime)o.i.currentTime!=s.endTime&&(o.i.currentTime=s.endTime);else{var e=Date.now();o.i.currentTime+=(e-c)/1e3,c=e}},k=function(e){var t,n;return R(function(i){if(1==i.g){if(T(),t=l7(o,s.pre,l-d),e&&s.groupId)for(;t&&t.groupId==s.groupId;)l++,t=l7(o,s.pre,l-d);return(o.o&&(!s.groupId||t&&t.groupId!=s.groupId)&&(o.o.stop(),o.o=null),t&&!t.overlay)?i.u(2):(s.post&&(o.m=null,o.s=null),o.A?b(i,o.g.detach(),4):b(i,o.g.ic(),4))}2!=i.g&&(o.A&&(null==(n=s.resumeOffset)&&(n=s.timelineRange&&s.endTime&&1/0!=s.endTime?s.endTime-(o.m||0):(Date.now()-c)/1e3),o.j(new i8("ad-content-resume-requested",(new Map).set("offset",n)))),o.j(new i8("ad-stopped")),o.l.La(),o.I=!1,o.A?ct(o):(o.h.style.display="none",T(),o.i.ended||o.i.play())),l8(o),t&&(o.j(new i8("ad-stopped")),o.l.La(),ce(o,t,u,++l,c,d)),w(i)})},E=function(e){return R(function(t){return y?t.return():(y=!0,o.j(new i8("ad-error",(new Map).set("originalEvent",e))),b(t,k(!1),0))})},I=function(){return R(function(e){if(1==e.g)return y?e.return():(y=!0,b(e,k(!1),2));o.j(new i8("ad-complete")),w(e)})},o.W=function(){return R(function(e){return y?e.return():(y=!0,o.j(new i8("ad-skipped")),b(e,k(!0),0))})},M=new l4(o.h,s,o.W,u,l,!o.A),o.A||(M.setMuted(o.i.muted),M.setVolume(o.i.volume)),o.j(new i8("ad-started",(new Map).set("ad",M))),(C=M.canSkipNow())&&o.j(new i8("ad-skip-state-changed")),o.l.qa(o.g,"error",E
1),o.l.D(o.h,"timeupdate",function(){if(o.h.duration){var e=M.canSkipNow();C!=e&&0<M.getRemainingTime()&&0<M.getDuration()&&o.j(new i8("ad-skip-state-changed")),C=e}}),o.l.qa(o.g,"firstquartile",function(){T(),o.j(new i8("ad-first-quartile"))}),o.l.qa(o.g,"midpoint",function(){T(),o.j(new i8("ad-midpoint"))}),o.l.qa(o.g,"thirdquartile",function(){T(),o.j(new i8("ad-third-quartile"))}),o.l.qa(o.g,"complete",I),o.l.D(o.h,"play",function(){o.j(new i8("ad-resumed"))}),o.l.D(o.h,"pause",function(){var e=o.g.getConfiguration();o.h.currentTime>=e.playRangeEnd?I():o.j(new i8("ad-paused"))}),o.l.D(o.h,"volumechange",function(){o.h.muted?o.j(new i8("ad-muted")):o.j(new i8("ad-volume-changed"))}),x(e,4),cn(o),s.startTime&&s.endTime&&1/0!=s.endTime&&s.startTime!=s.endTime&&0<(D=s.endTime-s.startTime)&&o.g.configure("playRangeEnd",D),s.playoutLimit&&!o.o&&(o.o=new eB(function(){o.W()}).$(s.playoutLimit),o.g.configure("playRangeEnd",s.playoutLimit)),b(e,o.g.Ib(o.h),6);case 6:return o.B.has(s)?b(e,o.B.get(s),10):b(e,o.g.load(s.uri,null,s.mimeType||void 0),8);case 10:return P=e.h,o.B.delete(s),P?b(e,o.g.load(P),8):b(e,o.g.load(s.uri,null,s.mimeType||void 0),8);case 8:L=(Date.now()-h)/1e3,o.j(new i8("ads-loaded",(new Map).set("loadTime",L))),o.A&&o.i.play(),S(e,0);break;case 4:if(N=A(e),!o.I)return e.return();E(N),w(e)}}))}function ct(e){for(var t=[],n=u(e.F),i=n.next(),r={};!i.done;r={Vb:void 0},i=n.next())(i=i.value).overlay||(r.Vb={start:i.startTime,end:null},i.pre?(r.Vb.start=0,r.Vb.end=null):i.post?(r.Vb.start=-1,r.Vb.end=null):i.timelineRange&&(r.Vb.end=i.endTime),t.find(function(e){return function(t){return e.Vb.start==t.start&&e.Vb.end==t.end}}(r))||t.push(r.Vb));e.j(new i8("ad-cue-points-changed",(new Map).set("cuepoints",t)))}function cn(e){e.g.configure(e.C.Pg()),e.g.configure("ads.disableHLSInterstitial",!0),e.g.configure("ads.disableDASHInterstitial",!0),e.g.configure("playRangeEnd",1/0),ra(e.C.wb(),e.g.wb())}function ci(e,t,n){var i,r;return R(function(a){return 1==a.g?(i=ro([t],iZ()),b(a,e.C.wb().request(7,i,n).promise,2)):(r=a.h,a.return(r.data))})}function cr(e){return!(e=e.mimeType)||!e.startsWith("image/")&&"text/html"!==e}function ca(e,t,n,i,r){this.h=e,this.j=tg(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}function co(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.s=[],this.G="",this.O=!0,this.H="",this.o=new J}function cs(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function cu(e){var t=e.h.currentTime;if(0!=t&&null==e.A){for(var n,i,r=u(e.j),a=r.next();!a.done;a=r.next()){a=a.value;for(var o=u(a.ads),s=o.next();!s.done;s=o.next())if(s=s.value,i){if(s.startTimeInSeconds<t&&s.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=s,n=a;break}}else s.startTimeInSeconds<t&&(i=s,n=a)}n&&i&&!e.M.includes(i.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function cl(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.C,r=i.startTimeInSeconds+.5*i.durationInSeconds,a=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),ch(e,"firstQuartile")):t>=r&&!e.s.includes("midpoint")?(e.s.push("midpoint"),ch(e,"midpoint")):t>=a&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),ch(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&ch(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&cc(e)}if(!e.g||!e.g.isLinear()){e:for(r=(i=u(e.j)).next();!r.done&&(r=r.value,!(e.g&&e.g.isLinear()));r=i.next())for(a=0;a<r.ads.length;a++){var o=r.ads[a],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=t&&s>t){if(e.M.includes(o.adId)){if(e.h.ended)continue;e.h.currentTime=s;break e}cc(e),e.L=r,e.g=new ca(o,a+1,r.ads.length,!0,e.h),e.C=o,0===a&&ch(e,"breakStart"),cd(e);break}}if(!e.g){for(r=(i=u(e.j)).next();!r.done&&(r=r.value,!e.g);r=i.next())for(a=0;a<r.nonLinearAdsList.length;a++)if((o=r.nonLinearAdsList[a]).nonLinearAdList.length){s=r.startTimeInSeconds;var l=e.F.get(cs(o.nonLinearAdList[0]));if(s<=t&&l&&l.length){cc(e),s=e,l=u(l);for(var c=l.next();!c.done;c=l.next())if((c=c.value).data.source.length){var d=document.createElement("img");d.src=c.data.source[0].url,d.style.top=(c.placeholder.top||0)+"%",d.style.height=100-(c.placeholder.top||0)+"%",d.style.left=(c.placeholder.left||0)+"%",d.style.maxWidth=100-(c.placeholder.left||0)+"%",d.style.objectFit="contain",d.style.position="absolute",s.B.appendChild(d)}e.L=r,e.g=new ca(o,a+1,r.ads.length,!1,e.h),e.C=o,0===a&&ch(e,"breakStart"),cd(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function cc(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;(void 0===t?0:t)?ch(e,"skip"):ch(e,"complete"),t=u(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.$a(n.target,n.type,n.listener);e.m=[],e.s=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&ch(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function cd(e){var t=!1;e.h.paused?t=!0:(ch(e,"impression"),ch(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&ch(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||ch(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(ch(e,"impression"),ch(e,"start"),t=!1):ch(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){ch(e,"pause")}});for(var n=u(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function ch(e,t){var n=e.C.trackingEvents.find(function(e){return e.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(e){return e.eventType==t})),n){var i={type:10};n=u(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=ro([r],iZ())).method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new i8("ad-impression"));break;case"start":e.i(new i8("ad-started",(new Map).set("ad",e.g)));break;case"mute":e.i(new i8("ad-muted"));break;case"unmute":e.i(new i8("ad-volume-changed"));break;case"resume":e.i(new i8("ad-resumed"));break;case"pause":e.i(new i8("ad-paused"));break;case"firstQuartile":e.i(new i8("ad-first-quartile"));break;case"midpoint":e.i(new i8("ad-midpoint"));break;case"thirdQuartile":e.i(new i8("ad-third-quartile"));break;case"complete":e.i(new i8("ad-complete")),e.i(new i8("ad-stopped"));break;case"skip":e.i(new i8("ad-skipped")),e.i(new i8("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new i8("ad-skip-state-changed"))}}function cp(e,t){this.g=e,this.i=null,this.h=t}function cf(e,t,n,i){var r=this;this.s=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new J,(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 i8("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){var t,n;t=r,n=e,t.i(new i8("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.F))),n=n.getStreamData().url,t.j.resolve(n),t.j=null,t.G||t.h.D(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.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.B.length?r.j.resolve(r.B):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){r.m=new cp(e=e.getAd(),r.l),r.A&&(r.m.i=r.A),r.i(new i8("ad-started",(new Map).set("ad",r.m))),r.s.setAttribute("ad-active","true")}),this.h.D(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.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.A=e.getStreamData().adProgressData,r.m&&(r.m.i=r.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new i8("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new i8("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new i8("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new i8("ad-complete")),r.i(new i8("ad-stopped")),r.s.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new i8("ad-skipped")),r.i(new i8("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=u(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.C=e,r.i(new i8("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function cg(){re.call(this),this.h=this.i=this.j=this.g=null,this.m=new lJ,this.o=navigator.language,this.l=null}function cm(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;break;
1case"ad-complete":e.m.j++;break;case"ad-skipped":e.m.l++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}function cv(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof i8){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(e=(n=u(Object.getOwnPropertyNames(t))).next();!e.done;e=n.next())i.add(e.value);for(n={},e=(i=u(i)).next();!e.done;e=i.next())n[e=e.value]=t[e];t={__type__:"Error",contents:n}}else if(t instanceof TimeRanges){for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=u(az(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=ArrayBuffer.isView(t)&&1===t.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}})}function cy(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})}(c=l$.prototype).needsSkipUI=function(){return!1},c.isClientRendering=function(){return!0},c.hasCustomClick=function(){return!0},c.isUsingAnotherMediaElement=function(){return!0},c.getDuration=function(){return this.g.getDuration()},c.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},c.getRemainingTime=function(){return this.h.getRemainingTime()},c.isPaused=function(){return this.i},c.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},c.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},c.canSkipNow=function(){return this.h.getAdSkippableState()},c.skip=function(){return this.h.skip()},c.pause=function(){return this.h.pause()},c.play=function(){return this.h.resume()},c.getVolume=function(){return this.h.getVolume()},c.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},c.isMuted=function(){return 0==this.h.getVolume()},c.isLinear=function(){return this.g.isLinear()},c.resize=function(e,t){this.h.resize(e,t)},c.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},c.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},c.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},c.getTitle=function(){return this.g.getTitle()},c.getDescription=function(){return this.g.getDescription()},c.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},c.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},c.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},c.getAdId=function(){return this.g.getAdId()},c.getCreativeAdId=function(){return this.g.getCreativeAdId()},c.getAdvertiserName=function(){return this.g.getAdvertiserName()},c.getMediaUrl=function(){return this.g.getMediaUrl()},c.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},c.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},c.release=function(){this.h=this.g=null},B("shaka.ads.ClientSideAd",l$),l$.prototype.release=l$.prototype.release,l$.prototype.getPodIndex=l$.prototype.getPodIndex,l$.prototype.getTimeOffset=l$.prototype.getTimeOffset,l$.prototype.getMediaUrl=l$.prototype.getMediaUrl,l$.prototype.getAdvertiserName=l$.prototype.getAdvertiserName,l$.prototype.getCreativeAdId=l$.prototype.getCreativeAdId,l$.prototype.getAdId=l$.prototype.getAdId,l$.prototype.getVastMediaWidth=l$.prototype.getVastMediaWidth,l$.prototype.getVastMediaHeight=l$.prototype.getVastMediaHeight,l$.prototype.getVastMediaBitrate=l$.prototype.getVastMediaBitrate,l$.prototype.getDescription=l$.prototype.getDescription,l$.prototype.getTitle=l$.prototype.getTitle,l$.prototype.getPositionInSequence=l$.prototype.getPositionInSequence,l$.prototype.getSequenceLength=l$.prototype.getSequenceLength,l$.prototype.setMuted=l$.prototype.setMuted,l$.prototype.resize=l$.prototype.resize,l$.prototype.isLinear=l$.prototype.isLinear,l$.prototype.isMuted=l$.prototype.isMuted,l$.prototype.setVolume=l$.prototype.setVolume,l$.prototype.getVolume=l$.prototype.getVolume,l$.prototype.play=l$.prototype.play,l$.prototype.pause=l$.prototype.pause,l$.prototype.skip=l$.prototype.skip,l$.prototype.canSkipNow=l$.prototype.canSkipNow,l$.prototype.getTimeUntilSkippable=l$.prototype.getTimeUntilSkippable,l$.prototype.isSkippable=l$.prototype.isSkippable,l$.prototype.isPaused=l$.prototype.isPaused,l$.prototype.getRemainingTime=l$.prototype.getRemainingTime,l$.prototype.getMinSuggestedDuration=l$.prototype.getMinSuggestedDuration,l$.prototype.getDuration=l$.prototype.getDuration,l$.prototype.isUsingAnotherMediaElement=l$.prototype.isUsingAnotherMediaElement,l$.prototype.hasCu
1stomClick=l$.prototype.hasCustomClick,l$.prototype.isClientRendering=l$.prototype.isClientRendering,l$.prototype.needsSkipUI=l$.prototype.needsSkipUI,B("shaka.ads.Utils",lQ),lQ.ADS_LOADED="ads-loaded",lQ.AD_STARTED="ad-started",lQ.AD_FIRST_QUARTILE="ad-first-quartile",lQ.AD_MIDPOINT="ad-midpoint",lQ.AD_THIRD_QUARTILE="ad-third-quartile",lQ.AD_COMPLETE="ad-complete",lQ.AD_STOPPED="ad-stopped",lQ.AD_SKIPPED="ad-skipped",lQ.AD_VOLUME_CHANGED="ad-volume-changed",lQ.AD_MUTED="ad-muted",lQ.AD_PAUSED="ad-paused",lQ.AD_RESUMED="ad-resumed",lQ.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",lQ.CUEPOINTS_CHANGED="ad-cue-points-changed",lQ.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",lQ.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",lQ.AD_CLICKED="ad-clicked",lQ.AD_PROGRESS="ad-progress",lQ.AD_BUFFERING="ad-buffering",lQ.AD_IMPRESSION="ad-impression",lQ.AD_DURATION_CHANGED="ad-duration-changed",lQ.AD_CLOSED="ad-closed",lQ.AD_LOADED="ad-loaded",lQ.ALL_ADS_COMPLETED="all-ads-completed",lQ.AD_LINEAR_CHANGED="ad-linear-changed",lQ.AD_METADATA="ad-metadata",lQ.AD_RECOVERABLE_ERROR="ad-recoverable-error",lQ.AD_ERROR="ad-error",lQ.AD_BREAK_READY="ad-break-ready",lQ.AD_INTERACTION="ad-interaction",lQ.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",lQ.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",lQ.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",l0.prototype.configure=function(e){this.o=e},l0.prototype.stop=function(){this.g&&this.g.stop(),this.s&&aY(this.s)},l0.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()},(c=l4.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!0},c.hasCustomClick=function(){return!1},c.isUsingAnotherMediaElement=function(){return this.s},c.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},c.isPaused=function(){return this.g.paused},c.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},c.getTimeUntilSkippable=function(){return this.isSkippable()?Math.max(this.getRemainingTime()+this.j-this.getDuration(),0):Math.max(this.getRemainingTime(),0)},c.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()},c.skip=function(){this.canSkipNow()&&this.A()},c.pause=function(){return this.g.pause()},c.play=function(){return this.g.play()},c.getVolume=function(){return this.g.volume},c.setVolume=function(e){this.g.volume=e},c.isMuted=function(){return this.g.muted},c.isLinear=function(){return null==this.B},c.resize=function(){},c.setMuted=function(e){this.g.muted=e},c.getSequenceLength=function(){return this.o},c.getPositionInSequence=function(){return this.m},c.getTitle=function(){return""},c.getDescription=function(){return""},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return 0},c.getVastMediaWidth=function(){return 0},c.getAdId=function(){return this.i.id||""},c.getCreativeAdId=function(){return""},c.getAdvertiserName=function(){return""},c.getMediaUrl=function(){return this.i.uri},c.getTimeOffset=function(){return 0},c.getPodIndex=function(){return 0},c.release=function(){this.g=null},B("shaka.ads.InterstitialAd",l4),l4.prototype.release=l4.prototype.release,l4.prototype.getPodIndex=l4.prototype.getPodIndex,l4.prototype.getTimeOffset=l4.prototype.getTimeOffset,l4.prototype.getMediaUrl=l4.prototype.getMediaUrl,l4.prototype.getAdvertiserName=l4.prototype.getAdvertiserName,l4.prototype.getCreativeAdId=l4.prototype.getCreativeAdId,l4.prototype.getAdId=l4.prototype.getAdId,l4.prototype.getVastMediaWidth=l4.prototype.getVastMediaWidth,l4.prototype.getVastMediaHeight=l4.prototype.getVastMediaHeight,l4.prototype.getVastMediaBitrate=l4.prototype.getVastMediaBitrate,l4.prototype.getDescription=l4.prototype.getDescription,l4.prototype.getTitle=l4.prototype.getTitle,l4.prototype.getPositionInSequence=l4.prototype.getPositionInSequence,l4.prototype.getSequenceLength=l4.prototype.getSequenceLength,l4.prototype.setMuted=l4.prototype.setMuted,l4.prototype.resize=l4.prototype.resize,l4.prototype.isLinear=l4.prototype.isLinear,l4.prototype.isMuted=l4.prototype.isMuted,l4.prototype.setVolume=l4.prototype.setVolume,l4.prototype.getVolume=l4.prototype.getVolume,l4.prototype.play=l4.prototype.play,l4.prototype.pause=l4.prototype.pause,l4.prototype.skip=l4.prototype.skip,l4.prototype.canSkipNow=l4.prototype.canSkipNow,l4.prototype.getTimeUntilSkippable=l4.prototype.getTimeUntilSkippable,l4.prototype.isSkippable=l4.prototype.isSkippable,l4.prototype.isPaused=l4.prototype.isPaused,l4.prototype.getRemainingTime=l4.prototype.getRemainingTime,l4.prototype.getMinSuggestedDuration=l4.prototype.getMinSuggestedDuration,l4.prototype.getDuration=l4.prototype.getDuration,l4.prototype.isUsingAnotherMediaElement=l4.prototype.isUsingAnotherMediaElement,l4.prototype.hasCu
1stomClick=l4.prototype.hasCustomClick,l4.prototype.isClientRendering=l4.prototype.isClientRendering,l4.prototype.needsSkipUI=l4.prototype.needsSkipUI,(c=l5.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!0},c.hasCustomClick=function(){return!1},c.isUsingAnotherMediaElement=function(){return!1},c.getDuration=function(){return -1},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){return -1},c.isPaused=function(){return!1},c.isSkippable=function(){return!1},c.getTimeUntilSkippable=function(){return 0},c.canSkipNow=function(){return!1},c.skip=function(){},c.pause=function(){},c.play=function(){},c.getVolume=function(){return 1},c.setVolume=function(){},c.isMuted=function(){return!1},c.isLinear=function(){return this.i},c.resize=function(){},c.setMuted=function(){},c.getSequenceLength=function(){return this.j},c.getPositionInSequence=function(){return this.h},c.getTitle=function(){return""},c.getDescription=function(){return""},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return 0},c.getVastMediaWidth=function(){return 0},c.getAdId=function(){return this.g.id||""},c.getCreativeAdId=function(){return""},c.getAdvertiserName=function(){return""},c.getMediaUrl=function(){return this.g.uri},c.getTimeOffset=function(){return 0},c.getPodIndex=function(){return 0},c.release=function(){},B("shaka.ads.InterstitialStaticAd",l5),l5.prototype.release=l5.prototype.release,l5.prototype.getPodIndex=l5.prototype.getPodIndex,l5.prototype.getTimeOffset=l5.prototype.getTimeOffset,l5.prototype.getMediaUrl=l5.prototype.getMediaUrl,l5.prototype.getAdvertiserName=l5.prototype.getAdvertiserName,l5.prototype.getCreativeAdId=l5.prototype.getCreativeAdId,l5.prototype.getAdId=l5.prototype.getAdId,l5.prototype.getVastMediaWidth=l5.prototype.getVastMediaWidth,l5.prototype.getVastMediaHeight=l5.prototype.getVastMediaHeight,l5.prototype.getVastMediaBitrate=l5.prototype.getVastMediaBitrate,l5.prototype.getDescription=l5.prototype.getDescription,l5.prototype.getTitle=l5.prototype.getTitle,l5.prototype.getPositionInSequence=l5.prototype.getPositionInSequence,l5.prototype.getSequenceLength=l5.prototype.getSequenceLength,l5.prototype.setMuted=l5.prototype.setMuted,l5.prototype.resize=l5.prototype.resize,l5.prototype.isLinear=l5.prototype.isLinear,l5.prototype.isMuted=l5.prototype.isMuted,l5.prototype.setVolume=l5.prototype.setVolume,l5.prototype.getVolume=l5.prototype.getVolume,l5.prototype.play=l5.prototype.play,l5.prototype.pause=l5.prototype.pause,l5.prototype.skip=l5.prototype.skip,l5.prototype.canSkipNow=l5.prototype.canSkipNow,l5.prototype.getTimeUntilSkippable=l5.prototype.getTimeUntilSkippable,l5.prototype.isSkippable=l5.prototype.isSkippable,l5.prototype.isPaused=l5.prototype.isPaused,l5.prototype.getRemainingTime=l5.prototype.getRemainingTime,l5.prototype.getMinSuggestedDuration=l5.prototype.getMinSuggestedDuration,l5.prototype.getDuration=l5.prototype.getDuration,l5.prototype.isUsingAnotherMediaElement=l5.prototype.isUsingAnotherMediaElement,l5.prototype.hasCustomClick=l5.prototype.hasCustomClick,l5.prototype.isClientRendering=l5.prototype.isClientRendering,l5.prototype.needsSkipUI=l5.prototype.needsSkipUI,(c=l6.prototype).configure=function(e){this.O=e,l8(this)},c.stop=function(){if(this.l&&this.l.La(),this.K.clear(),this.F.clear(),this.g.ff(),this.B.size){var e=Array.from(this.B.values());e=u(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(e){e&&e.destroy()})}this.B.clear(),this.g.detach(),this.I=!1,this.s=this.m=null,this.A=!0,this.h=this.i,this.H=null,this.G&&aY(this.G),this.o&&(this.o.stop(),this.o=null)},c.release=function(){this.stop(),this.L&&this.L.release(),this.l&&this.l.release(),this.M&&(this.M.stop(),this.M=null),this.P&&(this.P.stop(),this.P=null),this.g.destroy()},c.Bf=function(){return this.g},c.addAdUrlInterstitial=function(e){var t,n,i,r,a,o,s,c=this;return R(function(d){switch(d.g){case 1:return b(d,ci(c,e,t={type:12}),2);case 2:if(!(n=tb(d.h,"VAST,vmap:VMAP")))throw new eC(2,10,10007);if(i=[],"VAST"==n.tagName){i=lZ(n,c.m),d.u(3);break}if("vmap:VMAP"!=n.tagName){d.u(3);break}for(var h=[],p=u(tA(n,"vmap:AdBreak")),f=p.next();!f.done;f=p.next()){var g=f.value,m=g.attributes.timeOffset;m&&(f=null,f="start"==m?0:"end"==m?1/0:tg(m),(g=tM(g,"vmap:AdSource"))&&(g=tM(g,"vmap:AdTagURI"))&&(g=tk(g))&&h.push({time:f,uri:g}))}a=(r=u(h)).next();case 5:if(a.done){d.u(3);break}return b(d,ci(c,(o=a.value).uri,t),8);case 8:if(!(s=tb(d.h,"VAST")))throw new eC(2,10,10007);i.push.apply(i,l(lZ(s,o.time))),a=r.next(),d.u(5);break;case 3:l9(c,i),w(d)}})},(c=ca.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!1},c.hasCustomClick=function(){return!1},c.isUsingAnotherMediaElement=function(){return!1},c.getDuration=function(){return this.h.durationInSeconds},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},c.isPaused=function(){return this.g.paused},c.isSkippable=function(){return"number"==typeof this.j},c.getTimeUntilSkippable=function(){return"number"!=typeof this.j?this.getRemainingTime():Math.max(this.getRemainingTime()+this.j-this.getDuration(),0)},c.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},c.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},c.pause=function(){return this.g.pause()},c.play=function(){return this.g.play()},c.getVolume=function(){return this.g.volume},c.setVolume=function(e){this.g.volume=e},c.isMuted=function(){return this.g.muted},c.isLinear=function(){return this.o},c.resize=function(){},c.setMuted=function(e){this.g.muted=e},c.getSequenceLength=function(){return this.l?this.l:1},c.getPositionInSequence=function(){return this.i?this.i:1},c.getTitle=function(){return this.h.adTitle},c.getDescription=function(){return""},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return 0},c.getVastMediaWidth=function(){return 0},c.getAdId=function(){return this.h.adId},c.getCreativeAdId=function(){return this.h.creativeId},c.getAdvertiserName=function(){return""},c.getMediaUrl=function(){return null},c.getTimeOffset=function(){return 0},c.getPodIndex=function(){return 0},c.release=function(){this.l=this.i=this.g=this.h=null},B("shaka.ads.MediaTailorAd",ca),ca.prototype.release=ca.prototype.release,ca.prototype.getPodIndex=ca.prototype.getPodIndex,ca.prototype.getTimeOffset=ca.prototype.getTimeOffset,ca.prototype.getMediaUrl=ca.prototype.getMediaUrl,ca.prototype.getAdvertiserName=ca.prototype.getAdvertiserName,ca.prototype.getCreativeAdId=ca.prototype.getCreativeAdId,ca.prototype.getAdId=ca.prototype.getAdId,ca.prototype.getVastMediaWidth=ca.prototype.getVastMediaWidth,ca.prototype.getVastMediaHeight=ca.prototype.getVastMediaHeight,ca.prototype.getVastMediaBitrate=ca.prototype.getVastMediaBitrate,ca.prototype.getDescription=ca.prototype.getDescription,ca.prototype.getTitle=ca.prototype.getTitle,ca.prototype.getPositionInSequence=ca.prototype.getPositionInSequence,ca.prototype.getSequenceLength=ca.prototype.getSequenceLength,
1ca.prototype.setMuted=ca.prototype.setMuted,ca.prototype.resize=ca.prototype.resize,ca.prototype.isLinear=ca.prototype.isLinear,ca.prototype.isMuted=ca.prototype.isMuted,ca.prototype.setVolume=ca.prototype.setVolume,ca.prototype.getVolume=ca.prototype.getVolume,ca.prototype.play=ca.prototype.play,ca.prototype.pause=ca.prototype.pause,ca.prototype.skip=ca.prototype.skip,ca.prototype.canSkipNow=ca.prototype.canSkipNow,ca.prototype.getTimeUntilSkippable=ca.prototype.getTimeUntilSkippable,ca.prototype.isSkippable=ca.prototype.isSkippable,ca.prototype.isPaused=ca.prototype.isPaused,ca.prototype.getRemainingTime=ca.prototype.getRemainingTime,ca.prototype.getMinSuggestedDuration=ca.prototype.getMinSuggestedDuration,ca.prototype.getDuration=ca.prototype.getDuration,ca.prototype.isUsingAnotherMediaElement=ca.prototype.isUsingAnotherMediaElement,ca.prototype.hasCustomClick=ca.prototype.hasCustomClick,ca.prototype.isClientRendering=ca.prototype.isClientRendering,ca.prototype.needsSkipUI=ca.prototype.needsSkipUI,co.prototype.stop=function(){for(var e=u(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.$a(t.target,t.type,t.listener);cc(this),this.m=[],this.s=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},co.prototype.release=function(){this.stop(),this.o&&this.o.release()},co.prototype.onManifestUpdated=function(e){var t,n,i,r,a,o,s,l,c,d,h,p,f,g,m;this.I=e,""!=this.G&&(t=this,n=this.G,i=this.O,R(function(e){if(1==e.g)return r={type:8},a=ro([n],iZ()),o=t.K.request(7,a,r),x(e,2),b(e,o.promise,4);if(2!=e.g){var v;if(s=e.h,l=[],0<(c=JSON.parse(tn(s.data))).avails.length){if(JSON.stringify(t.j)!=JSON.stringify(c.avails)){for(t.j=c.avails,h=(d=u(t.j)).next();!h.done;h=d.next())for(f=(p=u(h.value.nonLinearAdsList)).next();!f.done;f=p.next())for(m=(g=u(f.value.nonLinearAdList)).next();!m.done;m=g.next())!function(e,t){var n,i,r,a,o;R(function(s){return 1==s.g?t.staticResource?(n=cs(t),e.F.get(n))?s.return():(i={type:9},r=ro([t.staticResource],iZ()),a=e.K.request(7,r,i),x(s,2),e.F.set(n,[]),b(s,a.promise,4)):s.return():2!=s.g?(o=JSON.parse(tn(s.h.data)).apps,e.F.set(n,o),S(s,0)):void(A(s),e.F.delete(n),w(s))})}(t,m.value);l=t.getCuePoints(),t.i(new i8("ad-cue-points-changed",(new Map).set("cuepoints",l)))}}else t.j.length&&t.i(new i8("ad-cue-points-changed",(new Map).set("cuepoints",l))),cc(t),t.j=[];return i&&(t.I||0<l.length)&&(cl(v=t),v.I||(cu(v),v.o.D(v.h,"seeked",function(){cu(v)}),v.o.D(v.h,"ended",function(){cc(v)})),v.o.D(v.h,"timeupdate",function(){cl(v)})),S(e,0)}A(e),w(e)}),this.O=!1)},co.prototype.getCuePoints=function(){for(var e=[],t=u(this.j),n=t.next();!n.done;n=t.next()){n=u(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e},(c=cp.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!1},c.hasCustomClick=function(){return!0},c.isUsingAnotherMediaElement=function(){return!1},c.getDuration=function(){return this.i?this.i.duration:-1},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},c.isPaused=function(){return this.h.paused},c.isSkippable=function(){return this.g.isSkippable()},c.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},c.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},c.skip=function(){this.h.currentTime+=this.getRemainingTime()},c.pause=function(){return this.h.pause()},c.play=function(){return this.h.play()},c.getVolume=function(){return this.h.volume},c.setVolume=function(e){this.h.volume=e},c.isMuted=function(){return this.h.muted},c.isLinear=function(){return!0},c.resize=function(){},c.setMuted=function(e){this.h.muted=e},c.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},c.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},c.getTitle=function(){return this.g.getTitle()},c.getDescription=function(){return this.g.getDescription()},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},c.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},c.getAdId=function(){return this.g.getAdId()},c.getCreativeAdId=function(){return this.g.getCreativeAdId()},c.getAdvertiserName=function(){return this.g.getAdvertiserName()},c.getMediaUrl=function(){return null},c.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},c.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},c.release=function(){this.h=this.i=this.g=null},B("shaka.ads.ServerSideAd",cp),cp.prototype.release=cp.prototype.release,cp.prototype.getPodIndex=cp.prototype.getPodIndex,cp.prototype.getTimeOffset=cp.prototype.getTimeOffset,cp.prototype.getMediaUrl=cp.prototype.getMediaUrl,cp.prototype.getAdvertiserName=cp.prototype.getAdvertiserName,cp.prototype.getCreativeAdId=cp.prototype.getCreativeAdId,cp.prototype.getAdId=cp.prototype.getAdId,cp.prototype.getVastMediaWidth=cp.prototype.getVastMediaWidth,cp.prototype.getVastMediaHeight=cp.prototype.getVastMediaHeight,cp.prototype.getVastMediaBitrate=cp.prototype.getVastMediaBitrate,cp.prototype.getDescription=cp.prototype.getDescription,cp.prototype.getTitle=cp.prototype.getTitle,cp.prototype.getPositionInSequence=cp.prototype.getPositionInSequence,cp.prototype.getSequenceLength=cp.prototype.getSequenceLength,
1cp.prototype.setMuted=cp.prototype.setMuted,cp.prototype.resize=cp.prototype.resize,cp.prototype.isLinear=cp.prototype.isLinear,cp.prototype.isMuted=cp.prototype.isMuted,cp.prototype.setVolume=cp.prototype.setVolume,cp.prototype.getVolume=cp.prototype.getVolume,cp.prototype.play=cp.prototype.play,cp.prototype.pause=cp.prototype.pause,cp.prototype.skip=cp.prototype.skip,cp.prototype.canSkipNow=cp.prototype.canSkipNow,cp.prototype.getTimeUntilSkippable=cp.prototype.getTimeUntilSkippable,cp.prototype.isSkippable=cp.prototype.isSkippable,cp.prototype.isPaused=cp.prototype.isPaused,cp.prototype.getRemainingTime=cp.prototype.getRemainingTime,cp.prototype.getMinSuggestedDuration=cp.prototype.getMinSuggestedDuration,cp.prototype.getDuration=cp.prototype.getDuration,cp.prototype.isUsingAnotherMediaElement=cp.prototype.isUsingAnotherMediaElement,cp.prototype.hasCustomClick=cp.prototype.hasCustomClick,cp.prototype.isClientRendering=cp.prototype.isClientRendering,cp.prototype.needsSkipUI=cp.prototype.needsSkipUI,(c=cf.prototype).configure=function(){},c.stop=function(){this.B="",this.o=null,this.C=[]},c.release=function(){this.stop(),this.h&&this.h.release()},c.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},c.getCuePoints=function(){return this.C},g(cg,re),(c=cg.prototype).setLocale=function(e){this.o=e},c.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},c.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new l6(e,t,n,function(e){return cm(i,e)}),this.g.configure(this.l)},c.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new eC(2,10,1e4);this.j&&this.j.release(),this.j=new l0(t,n,this.o,i,function(e){return cm(r,e)}),this.j.configure(this.l)},c.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),re.prototype.release.call(this)},c.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new i8("ad-stopped")),this.dispatchEvent(new i8("ad-content-attach-requested")),this.m=new lJ},c.requestClientSideAds=function(e){if(!this.j)throw new eC(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},c.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new eC(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},c.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new co(e,t,n,function(e){return cm(i,e)})},c.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new eC(1,10,10005);var i,r,a,o,s,u,l,c,d,h,p,f=this.i;return n=void 0===n?"":n,f.l?e=Promise.reject(new eC(1,10,10004)):(f.l=new i0,i=f,r=e,a=t,R(function(e){if(1==e.g)return o={type:7},(s=ro([r],iZ())).method="POST",a&&(s.body=ta(JSON.stringify(a))),u=i.K.request(7,s,o),x(e,2),b(e,u.promise,4);if(2!=e.g){if((l=JSON.parse(tn(e.h.data))).manifestUrl&&l.trackingUrl)c=new nw(r),d=new nw(l.trackingUrl),i.G=c.resolve(d).toString(),h=Date.now()/1e3-i.P,i.i(new i8("ads-loaded",(new Map).set("loadTime",h))),p=new nw(l.manifestUrl),i.l.resolve(c.resolve(p).toString()),i.l=null;else throw Error("Insufficient data from MediaTailor.");return S(e,0)}if(A(e),!i.H.length)return i.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),i.l=null,e.return();i.l.resolve(i.H),i.l=null,w(e)}),f.H=n||"",f.P=Date.now()/1e3,e=f.l),e},c.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new eC(1,10,10005);var t=this.i;t.G=e,t.i(new i8("ads-loaded",(new Map).set("loadTime",0)))},c.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new eC(2,10,10002);this.h&&this.h.release(),this.h=new cf(t,n,this.o,function(e){return cm(i,e)}),this.h.configure(this.l)},c.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.h)throw new eC(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&q('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.13.25",(n=this.h).j?e=Promise.reject(new eC(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new i0,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},c.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new eC(1,10,10003);(e.mpt||e.mpv)&&q('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.13.25",this.h.g.replaceAdTagParameters(e)},c.getServerSideCuePoints=function(){return ei("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},c.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},c.getStats=function(){var e,t=this.m;return{loadTimes:t.g,averageLoadTime:(e=t).g.length?e.g.reduce(function(e,t){return e+t},0)/e.g.length:0,started:t.h,playedCompletely:t.j,skipped:t.l,errors:t.i}},c.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},c.onDashTimedMetadata=function(e){this.h&&"urn:google:dai:2018"==e.schemeIdUri&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},c.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},c.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},c.onHLSInterstitialMetadata=function(e,t,n){var i,r,a;this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&(i=this.g,r=n,R(function(e){if(1==e.g){var t,n,o,s,u,l,c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,z;return cn(i),b(e,(t=i,n=r,R(function(e){switch(e.g){case 1:if(o=[],!n||(s=n.values.find(function(e){return"X-ASSET-URI"==e.key}),u=n.values.find(function(e){return"X-ASSET-LIST"==e.key}),!s&&!u))return e.return(o);if(l=null,(c=n.values.find(function(e){return"ID"==e.key}))&&(l=c.data),d=null==l?Math.floor(10*n.startTime)/10:n.startTime,(h=n.endTime)&&1/0!=n.endTime&&"number"==typeof n.endTime&&(h=null==l?Math.floor(10*n.endTime)/10:n.endTime),p=n.values.find(function(e){return"X-RESTRICT"==e.key}),g=f=!0,p&&p.data&&(f=!(m=p.data).includes("SKIP"),g=!m.includes("JUMP")),v=f?0:null,(y=n.values.find(function(e){return"X-ENABLE-SKIP-AFTER"==e.key}))&&isNaN(v=parseFloat(y.data))&&(v=f?0:null),T=null,(k=n.values.find(function(e){return"X-ENABLE-SKIP-FOR"==e.key}))&&(T=parseFloat(k.data),isNaN(v)&&(T=null)),E=null,(I=n.values.find(function(e){return"X-RESUME-OFFSET"==e.key}))&&isNaN(E=parseFloat(I.data))&&(E=null),M=null,(C=n.values.find(function(e){return"X-PLAYOUT-LIMIT"==e.key}))&&isNaN(M=parseFloat(C.data))&&(M=null),L=P=D=!1,(N=n.values.find(function(e){return"CUE"==e.key}))&&(D=(j=N.data).includes("ONCE"),P=j.includes("PRE"),L=j.includes("POST")),U=!1,(O=n.values.find(function(e){return"X-TIMELINE-OCCUPIES"==e.key}))?U=O.data.includes("RANGE"):!I&&t.C.T()&&(U=!P&&!L),s){if(!(_=s.data))return e.return(o);
1o.push({id:l,groupId:null,startTime:d,endTime:h,uri:_,mimeType:null,isSkippable:f,skipOffset:v,skipFor:T,canJump:g,resumeOffset:E,playoutLimit:M,once:D,pre:P,post:L,timelineRange:U,loop:!1,overlay:null}),e.u(2);break}if(!u){e.u(2);break}if(!(B=u.data))return e.return(o);return x(e,4),b(e,ci(t,B,{type:11}),6);case 6:for((V=(F=JSON.parse(tn(e.h)))["SKIP-CONTROL"])&&("number"==typeof(H=V["ENABLE-SKIP-AFTER"])&&(v=parseFloat(H),isNaN(H)&&(v=f?0:null)),"number"==typeof(G=V["ENABLE-SKIP-FOR"])&&(T=parseFloat(G),isNaN(G)&&(T=null))),K=0;K<F.ASSETS.length;K++)(z=F.ASSETS[K]).URI&&o.push({id:l+"_shaka_asset_"+K,groupId:l,startTime:d,endTime:h,uri:z.URI,mimeType:null,isSkippable:f,skipOffset:v,skipFor:T,canJump:g,resumeOffset:E,playoutLimit:M,once:D,pre:P,post:L,timelineRange:U,loop:!1,overlay:null});S(e,2);break;case 4:A(e);case 2:return e.return(o)}})),2)}(a=e.h).length?l9(i,a):q("Unsupported HLS interstitial",r),w(e)})))},c.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==i||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==i){if(this.g||this.initInterstitial(null,e,t),this.g){for(e=this.g,i=(t=u(n.eventNode.children)).next();!i.done;i=t.next())if("AlternativeMPD"==(i=i.value).tagName&&(i=i.attributes.uri)){var r=i;break}r?(t="urn:mpeg:dash:event:alternativeMPD:replace:2025"==n.schemeIdUri,i="urn:mpeg:dash:event:alternativeMPD:insert:2025"==n.schemeIdUri,(t||i)&&l9(e,[{id:n.id,groupId:null,startTime:n.startTime,endTime:n.endTime,uri:r,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null}])):q("Unsupported MPD alternate",n)}}else"urn:mpeg:dash:event:2012"==i&&n.eventNode&&tM(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&function(e,t){var n=tM(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,a="true"==n.attributes.loop;if(i&&r){var o={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},s=tM(n,"Viewport"),u=tM(n,"TopLeft");if(n=tM(n,"Size"),s&&u&&n){if(null==(o=tD(s,"x",tO))||null==(s=tD(s,"y",tO)))return;var l=tD(u,"x",tO);if(null==l||null==(u=tD(u,"y",tO)))return;var c=tD(n,"x",tO);if(null==c||null==(n=tD(n,"y",tO)))return;o={viewport:{x:o,y:s},topLeft:{x:l,y:u},size:{x:c,y:n}}}l9(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:a,overlay:o}])}}(this.g,n))}},c.addCustomInterstitial=function(e){if(!this.g)throw new eC(1,10,10006);l9(this.g,[e])},c.addAdUrlInterstitial=function(e){if(!this.g)throw new eC(1,10,10006);return this.g.addAdUrlInterstitial(e)},c.getInterstitialPlayer=function(){if(!this.g)throw new eC(1,10,10006);return this.g.Bf()},B("shaka.ads.AdManager",cg),cg.prototype.getInterstitialPlayer=cg.prototype.getInterstitialPlayer,cg.prototype.addAdUrlInterstitial=cg.prototype.addAdUrlInterstitial,cg.prototype.addCustomInterstitial=cg.prototype.addCustomInterstitial,cg.prototype.onDASHInterstitialMetadata=cg.prototype.onDASHInterstitialMetadata,cg.prototype.onHLSInterstitialMetadata=cg.prototype.onHLSInterstitialMetadata,cg.prototype.onCueMetadataChange=cg.prototype.onCueMetadataChange,cg.prototype.onHlsTimedMetadata=cg.prototype.onHlsTimedMetadata,cg.prototype.onDashTimedMetadata=cg.prototype.onDashTimedMetadata,cg.prototype.onManifestUpdated=cg.prototype.onManifestUpdated,cg.prototype.getStats=cg.prototype.getStats,cg.prototype.getCuePoints=cg.prototype.getCuePoints,cg.prototype.getServerSideCuePoints=cg.prototype.getServerSideCuePoints,cg.prototype.replaceServerSideAdTagParameters=cg.prototype.replaceServerSideAdTagParameters,cg.prototype.requestServerSideStream=cg.prototype.requestServerSideStream,cg.prototype.initServerSide=cg.prototype.initServerSide,cg.prototype.addMediaTailorTrackingUrl=cg.prototype.addMediaTailorTrackingUrl,cg.prototype.requestMediaTailorStream=cg.prototype.requestMediaTailorStream,cg.prototype.initMediaTailor=cg.prototype.initMediaTailor,cg.prototype.updateClientSideAdsRenderingSettings=cg.prototype.updateClientSideAdsRenderingSettings,cg.prototype.requestClientSideAds=cg.prototype.requestClientSideAds,cg.prototype.onAssetUnload=cg.prototype.onAssetUnload,cg.prototype.release=cg.prototype.release,cg.prototype.initClientSide=cg.prototype.initClientSide,cg.prototype.initInterstitial=cg.prototype.initInterstitial,cg.prototype.configure=cg.prototype.configure,cg.prototype.setLocale=cg.prototype.setLocale,cg.ADS_LOADED="ads-loaded",cg.AD_STARTED="ad-started",cg.AD_FIRST_QUARTILE="ad-first-quartile",cg.AD_MIDPOINT="ad-midpoint",cg.AD_THIRD_QUARTILE="ad-third-quartile",cg.AD_COMPLETE="ad-complete",cg.AD_STOPPED="ad-stopped",cg.AD_SKIPPED="ad-skipped",cg.AD_VOLUME_CHANGED="ad-volume-changed",cg.AD_MUTED="ad-muted",cg.AD_PAUSED="ad-paused",cg.AD_RESUMED="ad-resumed",cg.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",cg.CUEPOINTS_CHANGED="ad-cue-points-changed",cg.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",cg.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",cg.AD_CLICKED="ad-clicked",cg.AD_PROGRESS="ad-progress",cg.AD_BUFFERING="ad-buffering",cg.AD_IMPRESSION="ad-impression",cg.AD_DURATION_CHANGED="ad-duration-changed",cg.AD_CLOSED="ad-closed",cg.AD_LOADED="ad-loaded",cg.ALL_ADS_COMPLETED="all-ads-completed",cg.AD_LINEAR_CHANGED="ad-linear-changed",cg.AD_METADATA="ad-metadata",cg.AD_RECOVERABLE_ERROR="ad-recoverable-error",cg.AD_ERROR="ad-error",cg.AD_BREAK_READY="ad-break-ready",cg.AD_INTERACTION="ad-interaction",cg.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",cg.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",cg.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",lY=function(){return new cg};var cb="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),cw="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),cx=["loop","playbackRate"],cT=["pause","play"],cS=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),cA=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("get
1Stats",5).set("getTextTracks",2).set("getVariantTracks",2),ck=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),cE=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],cI=[["isTextTrackVisible","setTextTrackVisibility"]],cM="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),cC=["attach","attachCanvas","detach","load","unload"];function cD(e,t,n,i,r,a,o){var s=this;this.G=e,this.K=o,this.l=new eB(t),this.L=n,this.s=!1,this.A=i,this.F=r,this.M=a,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return cN(s)},this.C=function(e,t){switch((e=cy(t)).type){case"event":var n=e.targetName,i=i9(e.event);s.A(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.s&&(s.L(),s.s=!1);break;case"asyncComplete":if(r=e.id,i=e.error,t=e.res,e=s.h.get(r),s.h.delete(r),e)if(i){for(n in r=new eC(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve(t)}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,cV.add(this)}function cR(e,t){var n=e.M();cB=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),cN(e),cU(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function cP(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new eC(2,8,n,t))}function cL(e){var t=cB;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function cN(e){var t=!!cB&&"connected"==cB.status;if(e.i&&!t){for(var n in e.F(),e.g)e.g[n]={};cj(e)}e.i=t,e.I=t?cB.receiver.friendlyName:"",e.l.pb()}function cj(e){if(e.h)for(var t=u(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new eC(1,7,7e3))}}function cU(e,t){t=cv(t);var n=cB;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},X)}catch(i){throw t=new eC(2,8,8005,i),n=new i8("error",(new Map).set("detail",t)),e.A("player",n),e.Lc(),t}}(c=cD.prototype).destroy=function(){return cV.delete(this),cj(this),cB&&cL(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},c.nb=function(){return this.i},c.Wf=function(){return this.I},c.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.pb();var t=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=u(cV),n=t.next();!n.done;n=t.next())(n=n.value).j=new i0,n.s=!0,cR(n,e)},function(e){for(var t=u(cV),n=t.next();!n.done;n=t.next())n=n.value,c_="available"==e,n.l.pb()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),c_&&this.l.$(cO),(t=cB)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new i0,this.s=!0,cR(this,t)):cB=null}else e.__onGCastApiAvailable!==cH&&(cF=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=cH)},c.eg=function(e){this.o=e,this.i&&cU(this,{type:"appData",appData:this.o})},c.cast=function(){var e=this;return R(function(t){if(!e.m)throw new eC(1,8,8e3);if(!c_)throw new eC(1,8,8001);if(e.i)throw new eC(1,8,8002);return e.j=new i0,chrome.cast.requestSession(function(t){return cR(e,t)},function(t){return cP(e,t)}),b(t,e.j,0)})},c.Lc=function(){if(this.i){if(cj(this),cB){cL(this);try{cB.stop(function(){},function(){})}catch(e){}cB=null}cN(this)}},c.get=function(e,t){var n=this;if("video"==e){if(cT.includes(t))return function(){return n.hh.apply(n,[e,t].concat(l(P.apply(0,arguments))))}}else if("player"==e){if(ck.has(t)&&!this.get("player","isLive")())return function(){};if(cM.includes(t))return function(){return n.hh.apply(n,[e,t].concat(l(P.apply(0,arguments))))};if(cC.includes(t))return function(){return n.ej.apply(n,[e,t].concat(l(P.apply(0,arguments))))};if(cS.has(t)||cA.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},c.set=function(e,t,n){this.g[e][t]=n,cU(this,{type:"set",targetName:e,property:t,value:n})},c.hh=function(e,t){cU(this,{type:"call",targetName:e,methodName:t,args:P.apply(2,arguments)})},c.ej=function(e,t){var n=P.apply(2,arguments),i=new i0,r=this.H.toString();this.H++,this.h.set(r,i);try{cU(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var cO=.02,c_=!1,cB=null,cF=null,cV=new Set;function cH(t){if(cF?e.__onGCastApiAvailable=cF:delete e.__onGCastApiAvailable,cF=null,t)for(var n=u(cV),i=n.next();!i.done;
1i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function cG(t,n,i,r){r=void 0!==r&&r,re.call(this);var a=this;this.i=t,this.h=n,this.m=this.o=this.l=this.s=this.j=null,this.C=i,this.B=r,this.A=new Map,this.g=null,e.chrome?(this.g=new cD(i,function(){return cz(a)},function(){return cX(a)},function(e,t){return cY(a,e,t)},function(){return cW(a)},function(){return cq(a)},r),function(e){e.g.init(),e.m=new J;for(var t,n,i=u(cb),r=i.next();!r.done;r=i.next())e.m.D(e.i,r.value,function(t){e.g.nb()||(t=i9(t),e.l.dispatchEvent(t))});for(var a in i7)e.m.D(e.h,i7[a],function(t){e.g.nb()||e.o.dispatchEvent(t)});for(var o in e.j={},i={},e.i)(i={td:i.td}).td=o,Object.defineProperty(e.j,i.td,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.l.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.l.removeEventListener(t,n,i)};if(e.g.nb()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.nb()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.td)}}(i),set:function(t){return function(n){var i=t.td;e.g.nb()?e.g.set("video",i,n):e.i[i]=n}}(i)});e.s={},cK(e,function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){var n=e,i=t;if(n.A.has(i)&&(i=n.A.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.j};if("getSharedConfiguration"==i)return n.g.get("player","getConfiguration");if("getNetworkingEngine"==i)return function(){return n.h.wb()};if("getDrmEngine"==i)return function(){return n.h.C};if("getAdManager"==i)return function(){return n.h.Lg()};if("setVideoContainer"==i)return function(e){return n.h.uh(e)};if(n.g.nb()){if("getManifest"==i||"drmInfo"==i)return function(){return q(i+"() does not work while casting!"),null};if("attach"==i||"detach"==i)return function(){return q(i+"() does not work while casting!"),Promise.resolve()};if("getChapters"==i)return function(){return q(i+"() does not work while casting!"),[]}}return n.g.nb()&&0==Object.keys(n.g.g.video).length&&(cS.has(i)||cA.has(i))||!n.g.nb()?n.h[i].bind(n.h):n.g.get("player",i)}})}),t=e,n=new Map,cK(t,function(e,i){n.has(i)?(i=n.get(i),e.length<i.length?t.A.set(e,i):t.A.set(i,e)):n.set(i,e)}),e.l=new re,e.l.Je=e.j,e.o=new re,e.o.Je=e.s}(this)):(this.j=this.i,this.s=this.h)}function cK(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=u(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 cq(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Mc(),startTime:null};e.i.pause();for(var n=u(cx),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=u(cE)).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=u(cI)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function cz(e){var t=new i8("caststatuschanged");e.dispatchEvent(t)}function cX(e){var t=new i8(e.j.paused?"pause":"play");e.l.dispatchEvent(t)}function cW(e){for(var t,n=u(cE),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.g.get("player",r[0])(),e.h[i](r)}var a=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),n=Promise.resolve();var o=e.i.autoplay;i=null,r||(i=e.g.get("video","currentTime")),(r=e.g.get("player","getTextTracks")())&&r.length&&(t=r.find(function(e){return e.active}));var s=e.g.get("player","isTextTrackVisible")();a&&(e.i.autoplay=!1,n=e.h.load(a,i));var l={};for(r=(i=u(cx)).next();!r.done;r=i.next())l[r=r.value]=e.g.get("video",r);n.then(function(){if(e.i){for(var n=u(cx),i=n.next();!i.done;i=n.next())i=i.value,e.i[i]=l[i];for(i=(n=u(cI)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.g.get("player",r[0])(),e.h[i](r)}e.h.rh(s),t&&e.h.cg(t.language,t.roles,t.forced),e.i.autoplay=o,a&&e.i.play()}},function(t){t=new i8("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)})}function cY(e,t,n){e.g.nb()&&("video"==t?e.l.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function cJ(e,t,n,i){re.call(this);var r=this;this.g=e,this.h=t,this.j=new J,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(e){return e},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.s=this.l=null,this.C=new eB(function(){c0(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return c$(e)},t.onSenderDisconnected=function(){return c$(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&c4(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),c4(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=cy(i.data);switch(r.type){case"PLAY":n.g.play(),c5(n);break;case"PAUSE":n.g.pause(),c5(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(),c5(n)):a&&"PLAYBACK_PAUSE"==a&&(n.g.pause(),c5(n));break;case"STOP":n.h.ic().then(function(){n.h&&c5(n)});break;case"GET_STATUS":c2(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||
1c5(n);break;case"LOAD":n.m=0,n.B=!1,n.A=!1,i=r.media,a=r.currentTime,o=n.I(i.contentId),s=r.autoplay||!0,n.F(i.customData),s&&(n.g.autoplay=!0),n.h.load(o,a).then(function(){n.h&&c2(n)}).catch(function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),c4(n,{requestId:Number(r.requestId),type:t},n.s)});break;default:c4(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,p,f=cy(t.data);switch(f.type){case"init":e.m=0,e.B=!1,e.A=!0,n=e,i=f.initState,r=f.appData,R(function(e){switch(e.g){case 1:for(a in i.player)o=i.player[a],n.h[a](o);return n.F(r),s=n.g.autoplay,i.manifest?(n.g.autoplay=!1,x(e,5),b(e,n.h.load(i.manifest,i.startTime),7)):b(e,Promise.resolve(),3);case 7:S(e,3);break;case 5:return u=A(e),l=new i8("error",(new Map).set("detail",u)),n.h&&n.h.dispatchEvent(l),e.return();case 3:if(!n.h)return e.return();for(c in i.video)d=i.video[c],n.g[c]=d;for(h in i.playerAfterLoad)p=i.playerAfterLoad[h],n.h[h](p);n.g.autoplay=s,i.manifest&&(n.g.play(),c5(n)),w(e)}}),c0(e);break;case"appData":e.F(f.appData);break;case"set":var g=f.targetName,m=f.property;if(f=f.value,"video"==g){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==m){t.setSystemVolumeLevel(f);break}else if("muted"==m){t.setSystemVolumeMuted(f);break}}e.H[g][m]=f;break;case"call":(g=e.H[f.targetName])[f.methodName].apply(g,f.args);break;case"asyncCall":g=f.targetName,m=f.methodName,"player"==g&&"load"==m&&(e.m=0,e.B=!1);var v=f.id,y=t.senderId;f=(t=e.H[g])[m].apply(t,f.args),"player"==g&&"load"==m&&(f=f.then(function(){e.A=!0})),f.then(function(t){return c3(e,y,v,null,t)},function(t){return c3(e,y,v,t,null)})}}(e,t)},t.start(),t=u(cb);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(t){return cZ(e,"video",t)});for(var i in i7)e.j.D(e.h,i7[i],function(t){return cZ(e,"player",t)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,cQ(e)}),e.j.D(e.g,"playing",function(){e.o=!1,cQ(e)}),e.j.D(e.g,"pause",function(){cQ(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,cQ(e)}),e.j.D(e.g,"ended",function(){new eB(function(){e.g&&e.g.ended&&(e.o=!0,cQ(e))}).$(c8)})}(this)}function c$(e){e.m=0,e.A=!0,e.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,cQ(e)}function cQ(e){var t;R(function(n){return 1==n.g?b(n,Promise.resolve(),2):e.h?void(t=new i8("caststatuschanged"),e.dispatchEvent(t),c1(e)||c5(e),w(n)):n.return()})}function cZ(e,t,n){e.h&&(c0(e),c4(e,{type:"event",targetName:t,event:n},e.l))}function c0(e){e.C.$(c6);for(var t={video:{},player:{}},n=u(cw),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];e.h.T()&&ck.forEach(function(n,i){0==e.m%n&&(t.player[i]=e.h[i]())}),cS.forEach(function(n,i){0==e.m%n&&(t.player[i]=e.h[i]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),c4(e,{type:"update",update:t},e.l),cA.forEach(function(t,n){0==e.m%t&&((t={player:{}}).player[n]=e.h[n](),c4(e,{type:"update",update:t},e.l))}),e.B&&(e.m+=1),c1(e)}function c1(e){return!!(e.A&&(e.g.duration||e.h.T()))&&(c2(e),e.A=!1,!0)}function c2(e,t){var n={contentId:e.h.Mc(),streamType:e.h.T()?"LIVE":"BUFFERED",contentType:""};e.h.T()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),c5(e,void 0===t?0:t,n)}function c3(e,t,n,i,r){e.h&&c4(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function c4(e,t,n,i){e.G&&(e=cv(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function c5(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?c9:e.h.Hf()?de:e.g.paused?dt:c7,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),c4(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}g(cG,re),(c=cG.prototype).destroy=function(e){return this.g&&e&&this.g.Lc(),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.j=this.i=null,re.prototype.release.call(this),Promise.all(e)},c.Bi=function(){return this.j},c.Bf=function(){return this.s},c.Oh=function(){return!!this.g&&this.g.m&&c_},c.nb=function(){return!!this.g&&this.g.nb()},c.Wf=function(){return this.g?this.g.Wf():""},c.cast=function(){var e=this;return R(function(t){return 1==t.g?e.g?b(t,e.g.cast(),2):t.return():e.h?b(t,e.h.ic(),0):t.return()})},c.eg=function(e){this.g&&this.g.eg(e)},c.sj=function(){var e;this.g&&(e=this.g).i&&chrome.cast.requestSession(function(t){return cR(e,t)},function(t){return cP(e,t)})},c.Lc=function(){this.g&&this.g.Lc()},c.Ph=function(e,t){t=void 0!==t&&t;var n=this;return R(function(i){if(1==i.g)return e==n.C&&t==n.B?i.return():(n.C=e,n.B=t,n.g)?(n.g.Lc(),b(i,n.g.destroy(),2)):i.return();n.g=null,n.g=new cD(e,function(){return cz(n)},function(){return cX(n)},function(e,t){return cY(n,e,t)},function(){return cW(n)},function(){return cq(n)},t),n.g.init(),w(i)})},B("shaka.cast.CastProxy",cG),cG.prototype.changeReceiverId=cG.prototype.Ph,cG.prototype.forceDisconnect=cG.prototype.Lc,cG.prototype.suggestDisconnect=cG.prototype.sj,cG.prototype.setAppData=cG.prototype.eg,cG.prototype.cast=cG.prototype.cast,cG.prototype.receiverName=cG.prototype.Wf,cG.prototype.isCasting=cG.prototype.nb,cG.prototype.canCast=cG.prototype.Oh,cG.prototype.getPlayer=cG.prototype.Bf,cG.prototype.getVideo=cG.prototype.Bi,cG.prototype.destroy=cG.prototype.destroy,g(cJ,re),(c=cJ.prototype).isConnected=function(){return this.G},c.Ii=function(){return this.o},c.pj=function(e){this.i=e},c.Th=function(){this.i=null},c.qj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},c.oj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},c.nj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},c.destroy=function(){var e,t=this;return R(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.C&&(t.C.stop(),t.C=null),t.g=null,t.H=null,t.F=null,t.G=!1,t.o=!0,t.l=null,t.s=null,re.prototype.release.call(t),b(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),w(n)})},B("shaka.cast.CastReceiver",cJ),cJ.prototype.destroy=cJ.prototype.destroy,cJ.prototype.setContentArtist=cJ.prototype.nj,cJ.prototype.setContentImage=cJ.prototype.oj,cJ.prototype.setContentTitle=cJ.prototype.qj,cJ.prototype.clearContentMetadata=cJ.prototype.Th,cJ.prototype.setContentMetadata=cJ.prototype.pj,cJ.prototype.isIdle=cJ.prototype.Ii,cJ.prototype.isConnected=cJ.prototype.isConnected;var c6=.5,c8=5,c9="IDLE",c7="PLAYING",de="BUFFERING",dt="PAUSED";function dn(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=di(i,r,s,u,l,c);a<=o;a++){for(var h=n[a],p=-1,f=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}for(g=h.length-1;0<=g;g--)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}if(-1===p||-1===f)h=dr(i,r),e.nestedCues.push(h);else{for(;p<=f;p++)if(g=h[p]){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=di(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=dr(i,r),e.nestedCues.push(d)),d=di(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function di(e,t,n,i,r,a){return e=new tJ(e,t,""),n&&e.textDecoration.push(nl),i&&(e.fontStyle=ns),e.color=r,e.backgroundColor=a,e}function dr(e,t){return(e=new tJ(e,t,"")).lineBreak=!0,e}function da(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function ds(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.s=this.A=null,dl(this)}function du(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new tJ(t,n,"");r.lineInterpretation=1;var a=dv.get(e.g);return a&&(r.line=a),null!=e.s&&null!=e.A&&(r.position=10+Math.min(70,10*e.s)+2.5*e.A),(t=dn(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(a=dv.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function dl(e){dh(e,0,15),e.g=1}function dc(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=dp.has(n)?dp.get(n):String.fromCharCode(n);break;case 1:i=df.get(n);break;case 2:e.i[e.g].pop(),i=dg.get(n);break;case 3:e.i[e.g].pop(),i=dm.get(n)}i&&e.i[e.g].push(new da(i,e.m,e.j,e.o,e.l))}}function dd(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 dh(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var dp=new Map([[39,"â"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"â"]]),df=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"]]),dg=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"]]),dm=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,"â"]]),dv=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function dy(e,t){this.h=0,this.o=new ds(e,t),this.i=new ds(e,t),this.g=this.j=new ds(e,t),this.l=0,this.m=null}
1function db(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=du(i,e.l,n),(n=e.i).g=0<n.h?n.h:0,dh(n,0,15),(n=e.j).g=0<n.h?n.h:0,dh(n,0,15),i.g=15),e.h=3,i.h=t,r}function dw(e){e.h=1,e.g=e.j,e.g.h=0}function dx(e){z("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var dT="black green blue cyan red yellow magenta black".split(" "),dS="white green blue cyan red yellow magenta white_italics".split(" ");function dA(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.s="black",dk(this)}function dk(e){e.i=[];for(var t=0;16>t;t++)e.i.push(dE())}function dE(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function dI(e,t){dM(e)&&(e.i[e.h][e.g]=new da(t,e.C,e.A,e.s,e.B),e.g++)}function dM(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}function dC(e,t,n){var i=new tJ(e.j,t,"");i.textAlign=0===e.F?"left":1===e.F?"right":t3;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?eS:2,e.G){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=dn(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function dD(){this.i=[],this.h=null,this.g=0}function dR(e){this.g=0,this.h=e}function dP(e){if(!e.ta())throw new eC(2,2,3e3);return e.h[e.g++]}function dL(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function dN(e,t){for(var n=[],i=0;8>i;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}function dj(e,t,n){var i=[];t=u(dN(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(a=dC(a,n,e.i))&&i.push(a),e.h[r]=null}return i}function dU(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function dO(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],dB[e<<2|t<<1|(n=i[n])]}dA.prototype.isVisible=function(){return this.l},dA.prototype.display=function(){this.l=!0},dR.prototype.ta=function(){return this.g<this.h.length},dR.prototype.xa=function(){return this.g},dR.prototype.skip=function(e){if(this.g+e>this.h.length)throw new eC(2,2,3e3);this.g+=e},dR.prototype.jh=function(e){if(0>this.g-e)throw new eC(2,2,3e3);this.g-=e};var d_=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,"â"]]),dB="black blue green cyan red magenta yellow white".split(" ");function dF(){this.h=[],this.g=[],this.i=new dD,this.l=0,this.m=new Map([["CC1",new dy(0,0)],["CC2",new dy(0,1)],["CC3",new dy(1,0)],["CC4",new dy(1,1)]]),this.s=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,dV(this)}function dV(e){e.o=0,e.s=0;for(var t=u(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,dl(n.i),dl(n.j),dl(n.o);e.B=!0}function dH(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function dG(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(l(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(e=n,i=0;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}function dK(){this.j=new Map,this.i=this.h=0,this.g=dq}dF.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,dV(this),e=u(this.j.values());for(var t=e.next();!t.done;t=e.next())dU(t.value)},dF.prototype.extract=function(e,t){if(this.B){for(var n=u(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(!(8>(e=new ry(e,0)).getLength())&&181===e.U()&&49===e.la()&&0x47413934===e.R()&&3===e.U()&&0!=(64&(n=e.U())))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.U(),a=(4&r)>>2,o=e.U(),s=e.U();a&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,kb:o,Jb:s,order:this.h.length}):(this.g.push({pts:t,type:r,value:o,order:this.g.length}),this.g.push({pts:t,type:2,value:s,order:this.g.length})))}},dF.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t,n,i=[];this.h.sort(e),this.g.sort(e);for(var r=u(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;if(16==(112&t.kb)){var i=t.kb>>3&1;0===n?e.o=i:e.s=i}if(i="CC"+((n<<1|(n?e.s:e.o))+1),n=e.m.get(i),255===t.kb&&255===t.Jb||!t.kb&&!t.Jb||!dH(t.kb)||!dH(t.Jb))return 45<=++e.l&&dV(e),null;e.l=0,t.kb&=127,t.Jb&=127;var r=t.kb;if(1<=r&&15>=r||!t.kb&&!t.Jb)return null;
1if(r=null,16==(112&t.kb))e:{if(e.A.add(i),i=t.kb,e=t.Jb,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],i="white",r=!1;var a=null,o=95<e?e-96:e-64;13>=o?i=dS[Math.floor(o/2)]:15>=o?r=!0:a=Math.floor((o-16)/2),e=1==(1&e),4!==n.h&&(o=n.g,3===n.h&&t!==o.g&&(n=1+t-o.h,dd(o,n,1+o.g-o.h,o.h),dh(o,0,n-1),dh(o,t+1,15-t)),o.g=t,o.m=e,o.j=r,o.l=i,o.s=a,o.o="black")}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",dc(n.g,0,32),i=!1,"white_italics"===(t=dS[(14&e)>>1])&&(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=dT[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))dc(n.g,1,e);else if(18==(246&i)&&32==(224&e))dc(n.g,1&i?3:2,e);else{if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.Jb){case 32:dw(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=db(n,2,e);break;case 38:i=db(n,3,e);break;case 39:i=db(n,4,e);break;case 40:dc(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:dl(n.o),dx(n);break;case 43:dx(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=du(t,n.l,e)),dh(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=du(t,n.l,e),r=t.g-t.h+1,dd(t,r-1,r,t.h),dh(t,0,r-1),dh(t,t.g,15-t.g),n.l=e);break;case 46:dh(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=du(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,dw(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&33<=e&&35>=e&&(n.g.A=e-32)}r=null}else e=t.Jb,dc(n.g,0,t.kb),dc(n.g,0,e);return r}(this,a.value))&&i.push(a);for(a=(r=u(this.g)).next();!a.done;a=r.next())t=this.i,3===(n=a.value).type?(t.g=2*(63&n.value)-1,t.h=[]):t.h&&(0<t.g&&(t.h.push(n),t.g--),0===t.g&&(t.i.push(new dR(t.h)),t.h=null,t.g=0));for(a=(r=u(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.ta();){var i=dP(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&dP(t).value),0!=r){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new dL(r));for(var o=e.j.get(r),s=t.xa();t.xa()-s<a;){r=o;var c=t,d=dP(c),h=d.value,p=d.pts;if(16===h){var f=dP(c);h=h<<16|f.value}if(0<=h&&31>=h)var g=function(e,t,n,i){if(!e.g)return[];if(24==n)return n=[n=dP(t).value,i=dP(t).value].map(function(e){return("0"+(255&e).toString(16)).slice(-2)}).join(""),dI(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!dM(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=dC(t,i,e.i)),t.h+1>=t.o?function(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=dE()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=dC(t,i,e.i)),t.i[t.h]=dE(),t.g=0;break;case 12:t.isVisible()&&(r=dC(t,i,e.i)),dk(t),t.h=0,t.g=0}return r?[r]:[]}(r,c,h,p);else if(128<=h&&159>=h)g=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=dP(t).value,t=[],n=u(dN(e,n));for(var r=n.next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var a=dC(r,i,e.i);a&&t.push(a)}dk(r)}return t}if(137===n)for(n=(t=u(dN(e,t=dP(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.display();else{if(138===n){for(n=dP(t).value,t=null,r=(n=u(dN(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=dC(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=dP(t).value,t=null,r=(n=u(dN(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=dC(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return dj(e,t=dP(t).value,i);if(143===n)return i=dj(e,255,i),dU(e),i;if(144===n)t.skip(1),i=dP(t).value,e.g&&(e.g.A=0<(128&i),e.g.C=0<(64&i));
1else if(145===n)i=dP(t).value,n=dP(t).value,t.skip(1),e.g&&(t=dO((48&n)>>4,(12&n)>>2,3&n),e.g.B=dO((48&i)>>4,(12&i)>>2,3&i),e.g.s=t);else if(146===n)i=dP(t).value,t=dP(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=dP(t).value,t.skip(1),e.g&&(e.g.F=3&i);else if(152<=n&&159>=n){n=(15&n)-8,(r=null!==e.h[n])||((a=new dA(n,e.i)).j=i,e.h[n]=a),i=dP(t).value,a=dP(t).value;var o=dP(t).value,s=dP(t).value,l=dP(t).value;t=dP(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.s="black"),(t=e.h[n]).l=0<(32&i),t.L=127&a,t.H=o,t.G=(240&s)>>4,t.K=0<(128&a),t.o=(15&s)+1,t.m=(63&l)+1,e.g=e.h[n]}}}return[]}(r,c,h,p);else{if(4096<=h&&4127>=h)r=c,c=255&h,8<=c&&15>=c?r.skip(1):16<=c&&23>=c?r.skip(2):24<=c&&31>=c&&r.skip(3);else if(4224<=h&&4255>=h)r=c,c=255&h,128<=c&&135>=c?r.skip(4):136<=c&&143>=c&&r.skip(5);else if(32<=h&&127>=h)c=h,r.g&&(127===c?dI(r.g,"âª"):dI(r.g,String.fromCharCode(c)));else if(160<=h&&255>=h)r.g&&dI(r.g,String.fromCharCode(h));else if(4128<=h&&4223>=h){if(c=255&h,r.g)if(d_.has(c)){var m=d_.get(c);dI(r.g,m)}else dI(r.g,"_")}else 4256<=h&&4351>=h&&r.g&&(160!=(255&h)?dI(r.g,"_"):dI(r.g,"[CC]"));g=[]}n.push.apply(n,l(g))}}}}catch(e){if(e instanceof eC&&3e3===e.code)z("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(this,a.value),i.push.apply(i,l(a));return this.i.i=[],this.h=[],this.g=[],i},dF.prototype.getStreams=function(){return Array.from(this.A)},B("shaka.cea.CeaDecoder",dF),ex=function(){return new dF},dK.prototype.init=function(e){function t(e){e=e.name,dY.has(e)&&(n.g=dY.get(e))}var n=this,i=[],r=[];if((new rx).box("moov",rT).box("mvex",rT).S("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.R(),t=t.R(),n.h=e,n.i=t}).box("trak",rT).S("tkhd",function(e){var t=e.reader;1==(e=e.version)?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4));var n=t.R();1==e?t.skip(8):t.skip(4),t.skip(4),t.skip(8),t.skip(2),t.skip(2),t.skip(2),t.skip(2),t.skip(36),t.la(),t.la(),t.la(),t.la(),i.push(n)}).box("mdia",rT).S("mdhd",function(e){e=a4(e.reader,e.version),r.push(e.timescale)}).box("minf",rT).box("stbl",rT).S("stsd",rS).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",rA).box("sinf",rT).box("frma",function(e){e=a8(e.reader).codec,dY.has(e)&&(n.g=dY.get(e))}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new eC(2,2,2010);this.g==dq&&q("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},dK.prototype.parse=function(e){var t=this;if(this.g==dq)return[];var n=[],i=0,r=[];return(new rx).box("moof",function(e){i=e.start,r=[],rT(e)}).box("traf",function(e){r.push({baseMediaDecodeTime:null,gd:t.h,hd:t.i,eh:[],timescale:9e4}),rT(e)}).S("trun",function(e){var t=r[r.length-1];e=a5(e.reader,e.version,e.flags),t.eh.push(e)}).S("tfhd",function(e){var n=r[r.length-1];n.gd=(e=a2(e.reader,e.flags)).gd||t.h,n.hd=e.hd||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))}).S("tfdt",function(e){var t=r[r.length-1];t.baseMediaDecodeTime=(e=a3(e.reader,e.version)).baseMediaDecodeTime}).box("mdat",function(e){for(var a=i-e.start-8,o=e.reader.xa(),s=u(r),c=s.next();!c.done;c=s.next()){if(null===(c=c.value).baseMediaDecodeTime)throw q("Unable to find base media decode time for CEA captions!"),new eC(2,2,2010);e.reader.seek(o),function(e,t,n,i,r,a,o,s,c){var d=0,h=a,p=s.map(function(e){return e.ag});for((p=[].concat.apply([],l(p))).length&&(h=p[0].sampleSize||a),t.skip(o+s[0].Wh);t.ta();){o=t.R();var f=t.U(),g=null;switch(g=!1,s=1,e.g){case dz:g=6==(g=31&f);break;case dX:s=2,t.skip(1),g=39==(g=f>>1&63)||40==g;break;case dW:s=2,t.skip(1),g=23==(g=f>>1&63)||24==g;break;default:return}if(g)for(f=0,d<p.length&&(f=p[d].ue||0),f=(n+f)/i,g=(s=u(dG(t.Ab(o-s)))).next();!g.done;g=s.next())c.push({packet:g.value,pts:f});else try{t.skip(o-s)}catch(e){break}0==(h-=o+4)&&(n=d<p.length?n+(p[d].bg||r):n+r,h=++d<p.length&&p[d].sampleSize||a)}}(t,e.reader,c.baseMediaDecodeTime,c.timescale,c.gd,c.hd,a,c.eh,n)}}).parse(e,!1),n},B("shaka.cea.Mp4CeaParser",dK);var dq=0,dz=1,dX=2,dW=3,dY=(new Map).set("avc1",dz).set("avc3",dz).set("dvav",dz).set("dva1",dz).set("hev1",dX).set("hvc1",dX).set("dvh1",dX).set("dvhe",dX).set("vvc1",dW).set("vvi1",dW).set("dvc1",dW).set("dvi1",dW);function dJ(){this.g=null}function d$(e){return(e=(function(e){var t=0,n=ef(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=eh(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=n_(tk(e))).filter(function(e){return e.type===dZ})[0])&&(e=tw(e=ti(e.value,!0),"WRMHEADER"))?e:null}function dQ(e){try{var t=d$(e);
1if(t)e:{for(var n=u(tI(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var a=u(r.children),o=a.next();!o.done;o=a.next()){var s=o.value;if("LA_URL"==s.tagName){var l=tk(s);break e}}}l=""}else l="";return l}catch(e){return""}}ey("video/mp4",function(){return new dK}),dJ.prototype.init=function(){},dJ.prototype.parse=function(e){this.g?this.g.clearData():this.g=new od;var t=[];if(!og(e=eh(e)))return t;var n=(e=this.g.parse(e)).jd(),i=e.$d();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(i=(n=u(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=u(dG(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},B("shaka.cea.TsCeaParser",dJ),ey("video/mp2t",function(){return new dJ});var dZ=1;function d0(t,n,i){var r=function(e){var t=[];e=u(e);for(var n=e.next();!n.done;n=e.next())(n=function(e){var t=e.attributes.schemeIdUri,n=tR(e,"urn:mpeg:cenc:2013","default_KID"),i=tP(e,"urn:mpeg:cenc:2013","pssh").map(tE),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new eC(2,4,4009);var a=[];try{a=i.map(function(e){return{initDataType:"cenc",initData:n_(e),keyId:null}})}catch(e){throw new eC(2,4,4007)}return{node:e,Yc:t,keyId:n,init:0<a.length?a:null,encryptionScheme:r}}(n.value))&&t.push(n);return t}(t),a=null;t=[];var o=[],s=null,l=new Set(r.map(function(e){return e.keyId}));l.delete(null);var c="cenc";if(1<l.size)throw new eC(2,4,4010);if(!n){if(1<(o=r.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.Yc})).length)throw new eC(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw q("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new eC(2,4,4042);var n=tC(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n||"urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri||!(n=tC(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"))||(t=n.attributes.IV,n=tu(n.attributes.keyUriTemplate),!t||!n))throw new eC(2,4,4051);if(16!=(t=nB(t.substr(2))).byteLength)throw new eC(2,4,4048);return{Ni:n,iv:t}}(o[0])),(o=r.find(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Yc}))&&o.encryptionScheme&&(c=o.encryptionScheme),(o=r.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Yc?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.Yc})).length&&0==(t=function(e,t,n,i,r){var a=[];n=u(n);for(var o=n.next();!o.done;o=n.next()){var s,l=i[(o=o.value).Yc];if(l){if((s=tC(o.node,"urn:microsoft:playready","pro"))&&tk(s)){s=n_(s=tk(s));var c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);s=[{initData:rL(s,c,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else s=null;if(c=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.Yc)if(c=o,0==r.size)c=null;else{var d=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);c=[{initData:rL(new Uint8Array([]),d,r,1),initDataType:"cenc",keyId:c.keyId}]}s=nG(l,t,o.init||e||s||c),(l=d2.get(l))&&(s.licenseServerUri=l(o)),a.push(s)}}return a}(a,c,o,i,l)).length&&(t=[nG("",c,a)])}if(r.length&&!s&&(n||!o.length))for(t=[],i=(n=u(Object.values(i))).next();!i.done;i=n.next())"org.w3.clearkey"!=(i=i.value)&&t.push(nG(i,c,a));if(l=Array.from(l)[0]||null)for(n=(c=u(t)).next();!n.done;n=c.next())for(i=(n=u(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=l;return{Fg:l,Dk:a,drmInfos:t,We:s,Kg:!0}}function d1(e){var t=tC(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=tk(t)))return t;if((t=tC(e.node,"urn:microsoft:playready","pro"))&&tk(t))return dQ(t);if((e=tC(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=tk(e))){t=n_(e),e=8;var n=(t=ef(t)).getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),dQ(e=tw("<pro>"+(e=nU(e=eh(t,e+4)))+"</pro>"))}return""}var d2=(new Map).set("com.apple.fps",function(t){if("apple"===e.shakaMediaKeysPolyfill)throw new eC(2,4,4054);return(t=tC(t.node,"https://dashif.org/CPS","Laurl"))&&(t=tk(t))?t:""}).set("com.widevine.alpha",function(e){var t=tC(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tk(t))?t:(e=tC(e.node,"urn:microsoft","laurl"))&&tu(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",d1).set("com.microsoft.playready.recommendation",d1).set("com.microsoft.playready.softw
1are",d1).set("com.microsoft.playready.hardware",d1).set("org.w3.clearkey",function(e){var t=tC(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tk(t))?t:(e=tC(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=tk(e))?e:""});function d3(t,n,i,r,a,o){var s=(new Map).set("RepresentationID",n).set("Number",i).set("SubNumber",r).set("Bandwidth",a).set("Time",o);return t.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(t,n,i,r){if("$$"==t)return"$";var a=s.get(n);if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&"bigint"!=typeof a&&(.2<=Math.abs(a-Math.round(a))&&q("Calculated $Time$ values must be close to integers"),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 d4(e,t){var n=d6(e,t,"timescale"),i=1;n&&(i=t_(n)||1);var r=(n=t_((n=d6(e,t,"duration"))||""))?n/i:null,a=d6(e,t,"startNumber"),o=Number(d6(e,t,"presentationTimeOffset"))||0,s=tB(a||"");if((null==a||null==s)&&(s=1),a=null,t=d8(e,t,"SegmentTimeline")){t=tA(t,"S"),a=i,e=e.ka.duration||1/0;for(var u=s,l=[],c=-o,d=0;d<t.length;++d){var h=t[d],p=t[d+1],f=tD(h,"t",tB),g=tD(h,"d",tB),m=tD(h,"r",tO);if(h=tD(h,"k",tO)||0,null!=f&&(f-=o),g){if(f=null!=f?f:c,0>(m=m||0))if(p){if(null==(p=tD(p,"t",tB))||f>=p)break;m=Math.ceil((p-f)/g)-1}else{if(1/0==e||f/a>=e)break;m=Math.ceil((e*a-f)/g)-1}for(0<l.length&&f!=c&&(l[l.length-1].end=f/a),p=0;p<=m;++p)c=f+g,l.push({start:f/a,end:c/a,sg:f,Gb:h,lj:l.length+u}),f=c}}a=l}return{timescale:i,Ce:n,Sa:r,Id:s,ec:o/i||0,rg:o,timeline:a}}function d5(e,t){return[t(e.J),t(e.ea),t(e.pa)].filter(il)}function d6(e,t,n){t=d5(e,t),e=null,t=u(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function d8(e,t,n){t=d5(e,t),e=null,t=u(t);for(var i=t.next();!i.done&&!(e=tM(i.value,n));i=t.next());return e}function d9(e,t,n,i,r,a){if(a=void 0===a?0:a,tR(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,i,r,a){for(var o=tR(e,"http://www.w3.org/1999/xlink","href"),s=tR(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=u(Object.keys(e.attributes)),c=l.next();!c.done;c=l.next()){var d=(c=c.value).split(":"),h=tx("http://www.w3.org/1999/xlink");d[0]==h&&delete e.attributes[c]}if(5<=a)return i2(new eC(2,4,4028));if("onLoad"!=s)return i2(new eC(2,4,4027));var p=nH([i],[o]);return r.request(0,ro(p,t)).Ea(function(i){if(!(i=tb(i.data,e.tagName)))return i2(new eC(2,4,4001,o));for(e.children=[];i.children.length;){var s=i.children.shift();e.children.push(s)}s=u(Object.keys(i.attributes));for(var l=s.next();!l.done;l=s.next())l=l.value,e.attributes[l]=i.attributes[l];return d9(e,t,n,p[0],r,a+1)})}(e,t,n,i,r,a);return n&&(o=o.Ea(void 0,function(){return d9(e,t,n,i,r,a)})),o}o=[];for(var s=u(tS(e)),l=s.next(),c={};!l.done;c={dd:void 0},l=s.next())c.dd=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==tR(c.dd,"http://www.w3.org/1999/xlink","href")?e.children=e.children.filter(function(e){return function(t){return t!==e.dd}}(c)):"SegmentTimeline"!=c.dd.tagName&&o.push(d9(c.dd,t,n,i,r,a));return i6(o).Ea(function(){return e})}function d7(e){this.h=ef(e),this.g=new ry(this.h,0)}function he(e){var t=ht(e);if(7<t.length)throw new eC(2,3,3002);var n=0;t=u(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=ht(e);e:{i=u(hn);for(var r=i.next();!r.done;r=i.next())if(ec(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.xa();else{if(8==t.length&&224&t[1])throw new eC(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.xa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.xa(),i=ef(e.h,e.g.xa(),t),e.g.skip(t),new hi(n,i)}function ht(e){var t=e.g.xa(),n=e.g.U();if(0==n)throw new eC(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),eh(e.h,t,n)}d7.prototype.ta=function(){return this.g.ta()};var hn=[[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 hi(e,t){this.id=e,this.g=t}function hr(e){if(8<e.g.byteLength)throw new eC(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new eC(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}
1function ha(e,t,n){if(!(t=d8(e,t,"Initialization")))return null;var i=e.J.Pa(),r=t.attributes.sourceURL;r&&(i=nH(i,[tu(r)],e.rb())),r=0;var a=null;return(t=tD(t,"range",tU))&&(r=t.start,a=t.end),(n=new aO(function(){return i},r,a,hc(e),null,null,n,e.ea.encrypted)).codecs=e.J.codecs,n.mimeType=e.J.mimeType,n}function ho(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m,v,y,w,x,T,S,A,k,E;return R(function(I){if(1==I.g)return s=e.presentationTimeline,l=!e.Lb||!e.ka.Ug,c=e.ka.start,d=e.ka.duration,h=e.J.mimeType.split("/")[1],f=null,g=[(p=t)(i,r,a,!1),"webm"==h?p(n.N(),n.startByte,n.endByte,!0):null],p=null,b(I,Promise.all(g),2);if(v=(m=I.h)[0],y=m[1]||null,w=null,x=c-o,T=c,S=d?c+d:1/0,"mp4"==h)var M=function(e,t,n,i,r,a,o){var s,u=(new rx).S("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.R();if(0==u)throw new eC(2,3,3005);if(0==o.version)var l=o.reader.R(),c=o.reader.R();else l=o.reader.Xc(),c=o.reader.Xc();o.reader.skip(2);var d=o.reader.la();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.R(),p=(0x80000000&h)>>>31;h&=0x7fffffff;var f=o.reader.R();if(o.reader.skip(4),1==p)throw new eC(2,3,3006);s.push(new aB(l/u+n,(l+f)/u+n,function(){return a},e,e+h-1,t,n,i,r)),l+=f,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)});if(e&&u.parse(e),s)return s;throw new eC(2,3,3004)}(v,r,i,n,x,T,S);else{M=v;var C=new d7(y);if(0x1a45dfa3!=he(C).id)throw new eC(2,3,3008);var D=he(C);if(0x18538067!=D.id)throw new eC(2,3,3009);C=D.g.byteOffset,D=new d7(D.g);for(var R=null;D.ta();){var P=he(D);if(0x1549a966==P.id){R=P;break}}if(!R)throw new eC(2,3,3010);for(R=new d7(R.g),P=1e6,D=null;R.ta();){var L=he(R);if(2807729==L.id)P=hr(L);else if(17545==L.id)if(4==L.g.byteLength)D=L.g.getFloat32(0);else if(8==L.g.byteLength)D=L.g.getFloat64(0);else throw new eC(2,3,3003)}if(null==D)throw new eC(2,3,3011);if(D*=R=P/1e9,0x1c53bb6b!=(M=he(new d7(M))).id)throw new eC(2,3,3007);M=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new d7(e.g);for(var d=null,h=null;e.ta();){var p=he(e);if(187==p.id){var f=function(e){var t=new d7(e.g);if(179!=(e=he(t)).id)throw new eC(2,3,3013);if(e=hr(e),183!=(t=he(t)).id)throw new eC(2,3,3012);t=new d7(t.g);for(var n=0;t.ta();){var i=he(t);if(241==i.id){n=hr(i);break}}return{xj:e,cj:n}}(p);f&&(p=n*f.xj,f=t+f.cj,null!=d&&c.push(new aB(d+o,p+o,l,h,f-1,a,o,s,u)),d=p,h=f)}}return null!=d&&c.push(new aB(d+o,i+o,l,h,null,a,o,s,u)),c}(M,C,R,D,i,n,x,T,S)}for(k=(A=u(w=M)).next();!k.done;k=A.next())(E=k.value).codecs=e.J.codecs,E.mimeType=e.J.mimeType,E.bandwidth=e.bandwidth;return s.Bd(w),f=new st(w),l&&f.Kc(T,S,!0),I.return(f)})}function hs(e){return e.$c}function hu(e){var t=d8(e,hs,"RepresentationIndex");return e=tU((e=d6(e,hs,"indexRange"))||""),t&&(e=tD(t,"range",tU,e)),e}function hl(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=nW&&"mp4"!=n&&"webm"!=n)throw new eC(2,4,4006);if("webm"==n&&!t)throw new eC(2,4,4005)}function hc(e){var t=e.J;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.ke,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ea.label||null,roles:e.roles||null,language:e.ea.language||null}}function hd(e){return e.Ub}function hh(t,n,i,r,a,o,s,l,c){c||t.J.be||(t.J.be=d6(t,hp,"initialization"));var d,h,p,f,g,m,v=t.J.be?function(e,t){var n=e.J.be;if(n||(n=d6(e,hp,"initialization")),!n)return null;n=tu(n);var i=e.J.originalId,r=e.bandwidth||null,a=e.J.Pa,o=e.rb;return(t=new aO(function(){var e=d3(n,i,null,null,r,null);return nH(a(),[e],o())},0,null,hc(e),null,null,t,e.ea.encrypted)).codecs=e.J.codecs,t.mimeType=e.J.mimeType,t}(t,s):null,y=(h=d4(d=t,hp),p=d6(d,hp,"media"),f=d6(d,hp,"index"),g=d6(d,hp,"k"),m=0,g&&(m=parseInt(g,10)),{Ce:h.Ce,Sa:h.Sa,timescale:h.timescale,Id:h.Id,ec:h.ec,rg:h.rg,timeline:h.timeline,cc:p&&tu(p),rd:f,mimeType:d.J.mimeType,codecs:d.J.codecs,bandwidth:d.bandwidth,Ui:m}),b=y,w=+!!b.rd;if(0==(w+=+!!b.timeline+ +!!b.Sa)||(1!=w&&(b.rd&&(b.timeline=null),b.Ce=null,b.Sa=null),!b.rd&&!b.cc))throw new eC(2,4,4002);var x=ty(t);if(y.rd)return hl(t,v),{pc:function(){var e=d3(y.rd,x.J.originalId,null,null,x.bandwidth||null,
1null);return e=nH(x.J.Pa(),[e]),ho(x,n,v,e,0,null,y.ec)}};if(y.Sa)return r||"image"===t.ea.contentType||"text"===t.ea.contentType||(i=t.ka.start,r=t.pa.id,c=t.ka.duration,r=(r=null!=r&&o.get(r)||c)?i+r:1/0,t.presentationTimeline.Of(y.Sa),t.presentationTimeline.bh(i,r)),{pc:function(){return function(t,n,i,r,a,o,s,l){function c(i){var a=i-y,s=a*v,u=n.Ce,c=a*u;"BigInt"in e&&c>Number.MAX_SAFE_INTEGER&&(c=BigInt(a)*BigInt(u)),s+=f,u=Math.min(a=s+v,h());var d=[],p=n.Ui;if(p)for(var g=(u-s)/p,m={},k=0;k<p;m={wh:void 0},k++){var E=s+g*k,I=E+g;m.wh=k+1,(m=new aB(E,I,function(e){return function(){var t=d3(b,x,i,e.wh,w,c);return nH(T(),[t],S())}}(m),0,null,r,A,f,h(),[],"",null,null,aF,o)).codecs=t.J.codecs,m.mimeType=t.J.mimeType,0==l?0<k&&m.Rc():0!=k%l&&m.Rc(),d.push(m)}return(s=new aB(s,u,function(){if(p)return[];var e=d3(b,x,i,null,w,c);return nH(T(),[e],S())},0,null,r,A,f,h(),d,"",null,null,aF,o,0<d.length)).codecs=t.J.codecs,s.mimeType=t.J.mimeType,s.bandwidth=t.bandwidth,s.j=a,s}function d(){var e=[Math.max(p.mb(),f),Math.min(p.Zb(),h())].map(function(e){return e-f});return e=[Math.ceil(e[0]/v),Math.ceil(e[1]/v)-1],t.J.ab&&e[1]++,e.map(function(e){return e+y})}function h(){var e=null!=g&&a.get(g)||m;return e?f+e:1/0}var p=t.presentationTimeline,f=t.ka.start,g=t.pa.id,m=t.ka.duration,v=n.Sa,y=n.Id,b=n.cc,w=t.bandwidth||null,x=t.J.id,T=t.J.Pa,S=t.rb,A=f-n.ec,k=d();i=t.Lb?Math.max(k[0],k[1]-i+1):k[0],s=s||k[1],k=[];for(var E=i;E<=s;++E){var I=c(E);k.push(I)}var M=new st(k);if(k=p.Zb()<h(),E=p.T(),k||E){var C=Math.max(i,s+1);i=v,t.J.ab&&(i=.1),M.De(i,function(){var e=p.mb();M.Ja(e);var t=u(d());t.next(),t=t.next().value;for(var n=[];C<=t;){var i=c(C);n.push(i),C++}return e>h()&&!n.length?null:n})}return Promise.resolve(M)}(x,y,a,v,o,s,l,t.J.we)}};var T=null;r=r=null,t.pa.id&&t.J.id&&(r=t.pa.id+","+t.J.id,r=i.get(r))&&(T=r.segmentIndex);var S=t.ka.start,A=t.ka.duration?S+t.ka.duration:1/0;return T?(hg(i=T,y,S,A,v),i.Ja(t.presentationTimeline.mb())):T=new hf(y,t.J.originalId,t.bandwidth,t.J.Pa,t.rb,S,A,v,s,t.J.we),y.timeline&&"image"!==t.ea.contentType&&"text"!==t.ea.contentType&&t.presentationTimeline.dh(T.h?T.h.timeline:[],S),r&&t.Lb&&(r.segmentIndex=T),{pc:function(){return T instanceof hf&&0==T.getNumReferences()&&hg(T,y,S,A,v),Promise.resolve(T)}}}function hp(e){return e.fc}function hf(e,t,n,i,r,a,o,s,u,l){st.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=i,this.H=r,this.j=a,this.l=o,this.s=s,this.A=u,this.G=l,hm(this)}function hg(e,t,n,i,r){if(function(e,t){if(e.s!==t){e.s=t,e=u(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&function e(t,n){t.ca=n,t=u(t.g);for(var i=t.next();!i.done;i=t.next())e(i.value,n)}(n,t)}}(e,r),e.h){if(n=e.h.timeline,e.h.cc!==t.cc&&(e.h.cc=t.cc),n.length){var a=n[n.length-1];t=t.timeline.filter(function(e){return e.end>a.end})}else t=t.timeline.slice();
10<t.length&&e.h.timeline.push.apply(e.h.timeline,l(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;hm(e)}function hm(e){if(e.h&&!e.o){for(var t=[],n=u(e.h.timeline),i=n.next();!i.done;i=n.next())(i=i.value).start>=e.l||0>=i.end||t.push(i);e.h.timeline=t,e.Ja(e.j)}}function hv(e,t,n,i,r,a,o,s){return e=d3(e,t,n,a,i||null,r),nH(o(),[e],s()).map(function(e){return e.toString()})}function hy(e){this.o=null,this.A=e,this.G=new rt,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.s="UNKNOWN"}function hb(e,t){var n,i,r,a,o;return R(function(s){var u,l,c,d;return 1==s.g?(n=ro(nH(e.i,[function(e,t){if(!e.m.length)return t;t=new nw(t);var n,i=e.B||e.m[0],r=Math.round(e.A.getBandwidthEstimate()),a=t.g;return"DASH"==e.s?(a.add("_DASH_pathway",i),a.add("_DASH_throughput",String(r))):"HLS"==e.s&&(a.add("_HLS_pathway",i),a.add("_HLS_throughput",String(r))),nN(n=a),n.fd&&nA(t,a),t.toString()}(e,t)]),e.o.retryParameters),i=e.A.networkingEngine.request(8,n),rn(e.G,i),x(s,2),b(s,i.promise,4)):2!=s.g?(1==(a=JSON.parse(tn((r=s.h).data))).VERSION&&(u=e,l=a,c=r.uri,null!=u.g&&(u.g.stop(),u.g=null),d=l["RELOAD-URI"]||c,u.g=new eB(function(){hb(u,d)}),(c=l.TTL)&&(u.C=c),u.g.$(u.C),u.m=l["PATHWAY-PRIORITY"]||[],u.F=l["PATHWAY-CLONES"]||[]),S(s,0)):(o=A(s))&&7001==o.code?s.return():void(null!=e.g&&(e.g.stop(),e.g=null),e.g=new eB(function(){hb(e,t)}),e.g.$(e.C),w(s))})}function hw(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function hx(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=u(e.m),a=r.next(),o={};!a.done;o={Vc:void 0},a=r.next())if(o.Vc=a.value,a=t.get(o.Vc))i.push({Tf:o.Vc,location:a});else if(a=e.F.find(function(e){return function(t){return t.Rj==e.Vc}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].Gh?(nT(s=new nw(s),a["URI-REPLACEMENT"].Gh),i.push({Tf:o.Vc,location:s.toString()})):i.push({Tf:o.Vc,location:s}))}for(r=Date.now(),a=(o=u(e.j.keys())).next();!a.done;a=o.next())a=a.value,r>(s=e.j.get(a))&&e.j.delete(a);if((i=i.filter(function(t){for(var n=u(e.j.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new nw(t.location).ub))return!1;return!0})).length&&(e.B=i[0].Tf),!(i=i.map(function(e){return e.location})).length&&e.h)for(o=(r=u(e.h.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.B=e.h,i.push(o));if(!i.length)for(r=(t=u(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:nH(e.i,i)}function hT(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.s=this.o=!1,this.m=new Set}function hS(e,t){var n=[],i=[],r=[],a=[];e=u(e);for(var o=e.next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map(function(e){return[hX(e),e]}));var l=new Map(s.videoStreams.map(function(e){return[hz(e),e]})),c=new Map(s.textStreams.map(function(e){return[hW(e),e]}));if(s=new Map(s.imageStreams.map(function(e){return[hY(e),e]})),t){var d=hH(nW);c.set(hW(d),d),d=hH("image"),s.set(hY(d),d)}n.push(o),i.push(l),r.push(c),a.push(s)}return{zg:n,Eh:i,Ah:r,Sg:a}}function hA(e){var t,n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,T,S,A,k,E,I,M,C,D;return R(function(R){switch(R.g){case 1:if(t=nY,1==e.length)return R.return(e[0]);for(n=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.V}).map(function(e){return[hX(e),e]}))}),i=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.na}).map(function(e){return[hz(e),e]}))}),r=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Aa}).map(function(e){return[hW(e),e]}))}),a=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Ue}).map(function(e){return[hY(e),e]}))}),s=(o=u(r)).next();!s.done;s=o.next())l=s.value,c=hV(t.Aa),l.set(hW(c),c);for(h=(d=u(a)).next();!h.done;h=d.next())p=h.value,f=hV(t.Ue),p.set(hY(f),f);return b(R,hk(g=new hT,[],n,0,hC,hR,0),2);case 2:return m=R.h,b(R,hk(g,[],i,0,hC,hR,0),3);case 3:return v=R.h,b(R,hk(g,[],r,0,hC,hR,0),4);case 4:return y=R.h,b(R,hk(g,[],a,0,hC,hR,0),5);case 5:if(w=R.h,x=0,v.length&&m.length)for(k=(A=u(m)).next();!k.done;k=A.next())for(E=k.value,M=(I=u(v)).next();!M.done;M=I.next())C=M.value,D=x++,C.variantIds.push(D),E.variantIds.push(D);
1else for(S=(T=u(v.concat(m))).next();!S.done;S=T.next())S.value.variantIds=[x++];return R.return(v.concat(m).concat(y).concat(w))}})}function hk(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m,v,y,w,x,T;return R(function(S){switch(S.g){case 1:for(l=0,s=[];l<n.length;l++)l>=i?s.push(new Set(n[l].values())):s.push(new Set);d=(c=u(t)).next();case 2:var A,k,E,I,M,C,D;if(d.done){S.u(4);break}return b(S,(A=e,k=d.value,E=n,I=i,M=a,C=s,D=o,R(function(e){return 1==e.g?(hP(A,E,k,0<D),k.matchedStreams?k.segmentIndex?b(e,hE(k,I+D),2):e.u(2):e.return(!1)):(hI(k,I,M,C,D),e.return(!0))})),5);case 5:if(!S.h)throw new eC(2,4,4037);d=c.next(),S.u(2);break;case 4:for(p=(h=u(s)).next();!p.done;p=h.next())for(g=(f=u(p.value)).next();!g.done;g=f.next())(m=function(e,t,n,i,r,a){if(hq(t))return null;var o=i(t);return(hP(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return R(function(e){return o.segmentIndex?e.u(0):(o.segmentIndex=new sa,b(e,hE(o,0),0))})}),o.matchedStreams&&o.matchedStreams.length)?(hI(o,0,r,a,0),o):null}(e,g.value,n,r,a,s))&&t.push(m);for(y=(v=u(s)).next();!y.done;y=v.next())for(x=(w=u(y.value)).next(),T={};!x.done;T={jg:void 0},x=w.next())if(T.jg=x.value,!hq(T.jg)&&t.some(function(t){return function(n){return hN(e,t.jg,n)}}(T)))throw new eC(2,4,4037);return S.return(t)}})}function hE(e,t){var n,i,r,a,o,s;return R(function(u){if(1==u.g){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)a=i[r],n.push(a.createSegmentIndex()),a.trickModeVideo&&!a.trickModeVideo.segmentIndex&&n.push(a.trickModeVideo.createSegmentIndex());return b(u,Promise.all(n),2)}if(e.segmentIndex instanceof sa)for(o=t;o<i.length;o++)(s=i[o]).segmentIndex&&e.segmentIndex.h.push(s.segmentIndex);w(u)})}function hI(e,t,n,i,r){var a=e.matchedStreams;for(t+=r;t<a.length;t++){var o=a[t];n(e,o);var s=!0;if("audio"==e.type&&0==iv(e.language,o.language)&&(s=!1),s&&(i[t-r].delete(o),o.fullMimeTypes))for(s=(o=u(o.fullMimeTypes.values())).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function hM(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=u(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t}function hC(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function hD(e,t){function n(e,t){e||(e=[]),t=u(t);for(var n=t.next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=u(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(null==e.originalId?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=eL(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new eC(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=u(t.closedCaptions)).next();!r.done;r=i.next()){var a=u(r.value);r=a.next().value,a=a.next().value,e.closedCaptions.set(r,a)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=hM(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var t=new sa,n=u(e.trickModeVideo.matchedStreams),i=n.next();!i.done;i=n.next())t.h.push(i.value.segmentIndex);return e.trickModeVideo.segmentIndex=t,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),hD(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),hD(e.trickModeVideo,t))}function hR(e,t){var n=e.roles;
1n||(n=[]);for(var i=u(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,i=(n=u(t.keyIds)).next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,l(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=u(t.closedCaptions)).next();!n.done;n=t.next())n=(i=u(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function hP(e,t,n,i){i=(void 0===i?0:i)?n.matchedStreams:[],t=u(t);for(var r=t.next();!r.done;r=t.next()){if(!(r=function(e,t,n){var i={audio:hX,video:hz,text:hW,image:hY}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a=({audio:function(t,n){return hN(e,t,n)},video:function(t,n){return hN(e,t,n)},text:hj,image:hU})[n.type];for(var o={audio:hO,video:h_,text:hB,image:hF}[n.type],s=u(t.values()),l=s.next();!l.done;l=s.next())a(n,l=l.value)&&n.fastSwitching==l.fastSwitching&&(!r||o(n,r,l))&&(r=l)}return e.s&&!hq(r)&&t.delete(i(r)),r}(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function hL(e,t){return e.mimeType==t.mimeType&&hJ(e.codecs)===hJ(t.codecs)}function hN(e,t,n){return(!!hL(t,n)||!!e.o)&&(!t.drmInfos||!!eP(t.drmInfos,n.drmInfos))}function hj(e,t){return!t.language||e.forced===t.forced&&0!=iv(e.language,t.language)&&t.kind==e.kind}function hU(){return!0}function hO(e,t,n){var i=hL(e,t),r=hL(e,n);if(i&&!r)return!1;if(!i&&r||(i=iv(e.language,t.language),(r=iv(e.language,n.language))>i))return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}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;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&!!n.primary||(!t.primary||!!n.primary)&&((i=hG(e.channelsCount,t.channelsCount,n.channelsCount))==h$||i!=hZ&&((i=hG(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==h$||i!=hZ&&!!e.bandwidth&&hK(e.bandwidth,t.bandwidth,n.bandwidth)==h$))}function h_(e,t,n){var i=hL(e,t),r=hL(e,n);if(i&&!r)return!1;if(!i&&r||(i=hG(e.width*e.height,t.width*t.height,n.width*n.height))==h$)return!0;if(i==hZ)return!1;if(e.frameRate){if((i=hG(e.frameRate,t.frameRate,n.frameRate))==h$)return!0;if(i==hZ)return!1}return!!e.bandwidth&&hK(e.bandwidth,t.bandwidth,n.bandwidth)==h$}function hB(e,t,n){var i=iv(e.language,t.language),r=iv(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(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}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 hF(e,t,n){return hG(e.width*e.height,t.width*t.height,n.width*n.height)==h$}function hV(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function hH(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new st([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}}function hG(e,t,n){if(t==e&&e!=n)return hZ;if(n==e&&e!=t)return h$;if(t>e){if(n<=e||n-e<t-e)return h$;if(n-e>t-e)return hZ}else{if(n>e)return hZ;if(e-n<e-t)return h$;if(e-n>e-t)return hZ}return hQ}function hK(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?h$:t<e?hZ:hQ}function hq(e){switch(e.type){case nW:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function hz(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,hJ(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,Array.from(e.keyIds)])}function hX(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,hJ(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,Array.from(e.keyIds)])}function hW(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function hY(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function hJ(e){if(!h0.has(e)){var t=n3(e);h0.set(e,t)}return h0.get(e)}g(hf,st),(c=hf.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},c.release=function(){st.prototype.release.call(this),this.h=null},c.Ja=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length;i+=1)if(n[i].end+this.j<=e)t+=1;else break;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,0===this.getNumReferences()&&this.release()
1)}},c.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],a=r.start+this.j;if(r=i<n?t[i+1].start+this.j:1/0===this.l?r.end+this.j:this.l,e>=a&&e<r)return i+this.i}return null},c.get=function(e){var t=this;if(0>(e-=this.i)||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=this.h.timeline[e],r=i.lj,a=i.sg+this.h.rg;n=this.j-this.h.ec;var o=this.j+i.end,s=o;e===this.getNumReferences()-1&&1/0!==this.l&&(s=.1<Math.abs(s-this.l)?Math.min(s,this.l):this.l);for(var u=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],h=(i.end-i.start)/i.Gb,p={},f=0;f<i.Gb;p={Fe:void 0,xh:void 0},f++){var g=i.start+h*f,m=g+h;p.xh=f+1,p.Fe=null,(p=new aB(this.j+g,this.j+m,function(e){return function(){return t.h?(null==e.Fe&&(e.Fe=hv(t.h.cc,t.F,r,t.B,a,e.xh,t.C,t.H)),e.Fe):[]}}(p),0,null,this.s,n,this.j,this.l,[],"",null,null,aF,this.A)).codecs=u,p.mimeType=l,p.bandwidth=c,0==this.G?0<f&&p.Rc():0!=f%this.G&&p.Rc(),d.push(p)}(n=new aB(this.j+i.start,s,function(){return 0<i.Gb||!t.h?[]:hv(t.h.cc,t.F,r,t.B,a,null,t.C,t.H)},0,null,this.s,n,this.j,this.l,d,"",null,null,aF,this.A,0<i.Gb)).codecs=u,n.mimeType=l,n.j=o,n.bandwidth=c,this.g[e]=n}return n},c.vb=function(e){hm(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},hy.prototype.configure=function(e){this.o=e},hy.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},hy.prototype.setManifestType=function(e){this.s=e},hy.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(c=hT.prototype).release=function(){for(var e=u(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.s=this.o=!1,this.m.clear()},c.Ai=function(){return this.l},c.Cf=function(){return this.j.slice()},c.gi=function(){return this.i},c.Gg=function(e,t){if(e){if("audio"==e.type)for(var n=u(this.h),i=n.next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});else if("video"==e.type)for(i=(n=u(this.g)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(t){return t!==e}));else if(e.type==nW)for(i=(n=u(this.j)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});else if("image"==e.type)for(i=(n=u(this.i)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}},c.$e=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,x,T,S,A,k,E,I,M,C,D,P,L,N,j,U=this;return R(function(R){if(1==R.g){if(i=nY,!t&&1==e.length)return a=(r=hS(e,!1)).zg,o=r.Eh,s=r.Ah,l=r.Sg,U.h=Array.from(a[0].values()),U.g=Array.from(o[0].values()),U.j=Array.from(s[0].values()),U.i=Array.from(l[0].values()),R.u(2);for(c=n?U.m.size:0,d=-1,h=0;h<e.length;h++)p=e[h],U.m.has(p.id)||(U.m.add(p.id),-1==d&&(d=h));return -1==d?R.return():(g=(f=hS(e,!0)).zg,m=f.Eh,v=f.Ah,y=f.Sg,b(R,Promise.all([hk(U,U.h,g,d,hM,hD,c),hk(U,U.g,m,d,hM,hD,c),hk(U,U.j,v,d,hM,hD,c),hk(U,U.i,y,d,hM,hD,c)]),2))}if(x=0,T=[],U.g.length&&U.h.length)for(M=(I=u(U.h)).next();!M.done;M=I.next())for(C=M.value,P=(D=u(U.g)).next();!P.done;P=D.next())L=P.value,N=eL(C.drmInfos,L.drmInfos),C.drmInfos.length&&L.drmInfos.length&&!N.length||(j=x++,T.push({id:j,language:C.language,disabledUntilTime:0,primary:C.primary,audio:C,video:L,bandwidth:(C.bandwidth||0)+(L.bandwidth||0),drmInfos:N,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=(S=u(U.g.length?U.g:U.h)).next();!A.done;A=S.next())k=A.value,E=x++,T.push({id:E,language:k.language,disabledUntilTime:0,primary:k.primary,audio:k.type==i.V?k:null,video:k.type==i.na?k:null,bandwidth:k.bandwidth||0,drmInfos:k.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});U.l=T,w(R)})},c.mh=function(e){this.o=e},c.sh=function(e){this.s=e},B("shaka.util.PeriodCombiner",hT),hT.prototype.setUseStreamOnce=hT.prototype.sh,hT.prototype.setAllowMultiT
1ypeVariants=hT.prototype.mh,hT.prototype.combinePeriods=hT.prototype.$e,hT.prototype.deleteStream=hT.prototype.Gg,hT.prototype.getImageStreams=hT.prototype.gi,hT.prototype.getTextStreams=hT.prototype.Cf,hT.prototype.getVariants=hT.prototype.Ai;var h$=1,hQ=0,hZ=-1,h0=new Map;function h1(e,t){try{var n=tr(e),i=t,r=new DOMParser,a=h2.value()(n);n=null;try{n=r.parseFromString(a,"text/xml")}catch(e){return null}if(!(r=n.documentElement)||r.getElementsByTagName("parsererror").length||r.tagName!=i)return null;if(!("createNodeIterator"in document))return r;for(i=document.createNodeIterator(n,NodeFilter.SHOW_ALL);n=i.nextNode();)if(n instanceof HTMLElement||n instanceof SVGElement)return null;return r}catch(e){return null}}var h2=new eR(function(){if("u">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 h3(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.oa=1,this.F=[],this.l={ie:"",type:"",profiles:[],Rb:null,ab:0,Pa:null,Fd:0},this.s=new Map,this.o=new Map,this.B=new Map,this.ja=new Map,this.m=new hT,this.I=0,this.ma=new F(5),this.K=new eB(function(){e.H&&!e.g.continueLoadingWhenPaused&&(e.G.$a(e.H,"timeupdate"),e.H.paused)?e.G.qa(e.H,"timeupdate",function(){return pn(e)}):pn(e)}),this.O=new rt,this.M=null,this.C=[],this.da=1/0,this.ia=!1,this.h=null,this.L=0,this.P=!1,this.G=new J,this.H=null,this.W=!1,this.ba="",this.ga=function(){return!1},this.aa=[]}function h4(e){var t,n,i,r,a,o,s,c,d;return R(function(h){if(1==h.g)return t=4,n="MPD",i=function(e){var t=e.l.Fd;if(!e.l.ie||!t||!e.F.length)return[];var n=Date.now()/1e3,i=e.F.filter(function(e){return!(e=tB(e.attributes.ttl))||t+e>n}).map(tE).filter(il);return i.length?nH(e.A,i):[]}(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(a=hx(e.h,"Location",!0)).length&&(r=a),o=ro(r,e.g.retryParameters),s=Date.now(),b(h,pu(e,o,0,{type:t}),2);if(3!=h.g){var p,f,g,m,v,y,x,T,S,A,k,E;return(c=h.h,e.j)?(c.uri&&c.uri!=c.originalUri&&!e.A.includes(c.uri)&&e.A.unshift(c.uri),e.ba=new nw(c.uri).g.toString(),b(h,(p=e,f=c.data,g=c.uri,m=n,R(function(e){if(1==e.g){var t,n,i,r,a,o,s,c,d,h,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H;if(v=f,(y=p.g.dash.manifestPreprocessor)!=s9){if(ei("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(x=h1(v,m)))throw new eC(2,4,4001,g);y(x),v=ta(x.outerHTML)}if(!(T=tb(v,m)))throw new eC(2,4,4001,g);return((S=p.g.dash.manifestPreprocessorTXml)!=s7&&S(T),"Patch"===m)?e.return((t=p,n=T,R(function(e){if(1==e.g){if(i=n.attributes.mpdId,r=tD(n,"originalPublishTime",tN),!i||i!==t.l.ie||r!==t.l.Fd)throw t.F=[],new eC(1,4,4052);for(a=[],o=[],s=new Set,d=(c=u(tS(n))).next();!d.done;d=c.next())if(M=(I=tG((h=d.value).attributes.sel||""))[I.length-1],C=tE(h)||"","MPD"===M.name)if("mediaPresentationDuration"===M.Wb){var p,f,g=tj(tE(h)||"");if(null!=g){t.l.Rb=g;for(var m=u(t.s.values()),v=m.next();!v.done;v=m.next())v.value.Rb=g}}else if("type"===M.Wb){for(t.i.presentationTimeline.Cc("static"==C),t.l.type=C,m=(g=u(t.s.values())).next();!m.done;m=g.next())m.value.Lb="dynamic"==C;"static"==C&&(t.I=-1)}else"publishTime"===M.Wb?t.l.Fd=tN(C)||0:null===M.Wb&&"add"===h.tagName&&o.push(h);else if("PatchLocation"===M.name)tK(t.F,h);else if("Period"===M.name)"add"===h.tagName?o.push(h):"remove"===h.tagName&&M.id&&function(e,t){e.i.periodCount--;for(var n=u(e.s.keys()),i=n.next();!i.done;i=n.next())(i=i.value).startsWith(t)&&(d8(e.s.get(i),hp,"SegmentTimeline").children=[],h9(e,i),e.s.delete(i));e.C=e.C.filter(function(e){return e!==t})}(t,M.id);else if("SegmentTemplate"===M.name){if((g=(m=tG(h.attributes.sel||""))[m.length-1]).Wb){m=h8(t,m),v=tE(h)||"";for(var y=u(m),x=y.next();!x.done;x=y.next())tz((x=t.s.get(x.value)).J.fc,h.tagName,g.Wb,v);g=m}else g=[];for(P=(D=u(g)).next();!P.done;P=D.next())L=P.value,s.add(L)}else if("SegmentTimeline"===M.name||"S"===M.name){for(v=(m=u(g=h8(t,g=tG(h.attributes.sel||"")))).next();!v.done;v=m.next())tK(y=tA(v=d8(v=t.s.get(v.value),hp,"SegmentTimeline"),"S"),h),v.children=y;for(j=(N=u(g)).next();!j.done;j=N.next())U=j.value,s.add(U)}for(_=(O=u(s)).next();!_.done;_=O.next())h9(t,_.value);for(F=(B=u(o)).next();!F.done;
1F=B.next()){V=F.value,a.push.apply(a,l((p=t,f=V,h7(p,{Lb:"dynamic"==p.l.type,presentationTimeline:p.i.presentationTimeline,pa:null,ka:null,ea:null,J:null,bandwidth:0,Ef:!1,ab:p.l.ab,profiles:p.l.profiles,Rb:p.l.Rb,roles:null,rb:function(){return""}},p.l.Pa,f,!0).periods)))}return a.length?(t.i.periodCount+=a.length,t.i.gapCount=t.L,b(e,h6(t,a,!0),2)):e.u(2)}"static"==t.l.type&&(H=t.l.Rb,t.i.presentationTimeline.Za(H||1/0)),w(e)}))):p.g.dash.disableXlinkProcessing?e.return(h5(p,T,g)):(A=p.g.dash.xlinkFailGracefully,k=d9(T,p.g.retryParameters,A,g,p.j.networkingEngine),rn(p.O,k),b(e,k.promise,2))}return E=e.h,e.return(h5(p,E,g))})),3)):h.return(0)}return d=(Date.now()-s)/1e3,e.ma.sample(1,d),h.return(d)})}function h5(e,t,n){var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,z,X,W,Y,J,$,Q,Z,ee,et,en,ei,er,ea,eo;return R(function(es){switch(es.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],a=new Map,s=(o=u(tA(t,"Location"))).next();!s.done;s=o.next())c=(l=s.value).attributes.serviceLocation,(d=tE(l))&&(h=nH(i,[d])[0],c&&(e.h?hw(e.h,"Location",c,h):a.set(c,h)),r.push(h));if(e.h?0<(p=hx(e.h,"Location",!0)).length&&(i=e.A=p):r.length&&(i=e.A=r),e.l.ie=t.attributes.id||"",e.l.Fd=tD(t,"publishTime",tN)||0,e.F=tA(t,"PatchLocation"),f=Promise.resolve(),(g=tM(t,"ContentSteering"))&&e.j)for(m=g.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=m):(e.h=new hy(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=m,(v=tE(g))&&(tD(g,"queryBeforeStart",tV,!1)?f=hb(e.h,v):hb(e.h,v))),T=(y=u(a.keys())).next();!T.done;T=y.next())k=T.value,E=a.get(k),hw(e.h,"Location",k,E);if(I=tA(t,"BaseURL"),M=!1,e.h)for(D=(C=u(I)).next();!D.done;D=C.next())L=(P=D.value).attributes.serviceLocation,N=tE(P),L&&N&&(hw(e.h,"BaseURL",L,N),M=!0);if(e.aa=null,M&&e.h||(j=I.map(tE),e.aa=nH(i,j)),U=function(){return e.h&&M?hx(e.h,"BaseURL"):e.aa?e.aa:[]},e.l.Pa=U,O=0,I&&I.length&&(O=tD(I[0],"availabilityTimeOffset",tF)||0),e.l.ab=O,e.I=tD(t,"minimumUpdatePeriod",tj,-1),_=tD(t,"availabilityStartTime",tN),B=tD(t,"timeShiftBufferDepth",tj),F=e.g.dash.ignoreSuggestedPresentationDelay,V=null,F||(V=tD(t,"suggestedPresentationDelay",tj)),H=e.g.dash.ignoreMaxSegmentDuration,G=null,H||(G=tD(t,"maxSegmentDuration",tj)),K=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.W=e.i.presentationTimeline.T()&&"static"==K),e.l.type=K,e.i)for(X=(z=e.i.presentationTimeline).mb(),Y=(W=u(e.o.values())).next();!Y.done;Y=W.next())(J=Y.value).segmentIndex&&J.segmentIndex.Ja(X);else $=e.g.dash.ignoreMinBufferTime,Q=0,$||(Q=tD(t,"minBufferTime",tj)||0),z=new oq(_,null!=V?Math.min(V,B||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*Q,B||1/0),e.g.dash.autoCorrectDrift);return z.Cc("static"==K),z.T()&&!isNaN(e.g.availabilityWindowOverride)&&(B=e.g.availabilityWindowOverride),null==B&&(B=1/0),z.xe(B),Z=t.attributes.profiles||"",e.l.profiles=Z.split(","),ee={Lb:"static"!=K,presentationTimeline:z,pa:null,ka:null,ea:null,J:null,bandwidth:0,Ef:!1,ab:O,Rb:null,profiles:Z.split(","),roles:null,rb:function(){return""}},b(es,f,2);case 2:if(e.L=0,en=(et=h7(e,ee,U,t,!1)).duration,ei=et.periods,("static"!=K||e.W)&&et.Ig||z.Za(en||1/0),e.P&&e.ia&&z.nh(e.da),z.Of(G||1),e.P&&e.ia&&(er=null!=V?V:e.g.defaultPresentationDelay,z.fg(er)),!e.i)return b(es,e.m.$e(ei,ee.Lb),6);return e.i.periodCount=ei.length,e.i.gapCount=e.L,b(es,h6(e,ei,!1),4);case 6:var eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey;if(e.i={presentationTimeline:z,variants:e.m.l,textStreams:e.m.Cf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:function(e){var t=tM(e,"ServiceDescription");if(!t||(e=tM(t,"Latency"),t=tM(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}(t),nextUrl:function(e){if(!(e=tA(e,"SupplementalProperty")).length)return null;e=u(e);for(var t=e.next();!t.done;t=e.next())if("urn:mpeg:dash:chaining:2016"==(t=t.value).attributes.schemeIdUri)return t.attributes.value;return null}(t),periodCount:ei.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!z.Ch()){es.u(7);break}return ea=tA(t,"UTCTiming"),b(es,(eu=e,el=U,ec=ea,R(function(e){switch(e.g){case 1:ed=ec.map(function(e){return{scheme:e.attributes.schemeIdUri,value:e.attributes.value}}),eh=eu.g.dash.clockSyncUri,!ed.length&&eh&&ed.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:eh}),ef=(ep=u(ed)).next();case 2:if(ef.done){e.u(4);break}switch(eg=ef.value,x(e,5),em=eg.scheme,ev=eg.value,em){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return e.u(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return e.u(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return ey=Date.parse(ev),e.return(isNaN(ey)?0:ey-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":q("NTP UTCTiming scheme is not supported");break;default:q("Unrecognized scheme in UTCTiming element",em)}e.u(9);break;case 7:return b(e,pa(eu,el,ev,"HEAD"),10);case 10:case 11:return e.return(e.h);case 8:return b(e,pa(eu,el,ev,"GET"),11);case 9:S(e,3);break;case 5:A(e);case 3:ef=ep.next(),e.u(2);break;case 4:return q("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),e.return(0)}})),8);case 8:if(eo=es.h,!e.j)return es.return();z.oh(eo);case 7:z.ee(),e.m&&!e.i.presentationTimeline.T()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),function(e){var t=Array.from(e.B.keys()).filter(function(t){return!e.C.includes(t)});t=u(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=u(e.B.get(n)),a=r.next();!a.done;a=r.next()){a=a.value;var o=e.o.get(a);o&&(o.segmentIndex&&0!=o.segmentIndex.getNumReferences()?i=!1:(e.m&&e.m.Gg(o,n),e.o.delete(a)))}i&&e.B.delete(n)}}(e),w(es)}})}function h6(e,t,n){var i;return R(function(r){if(1==r.g)return b(r,e.m.$e(t,!0,n),2);e.i.variants=e.m.l,0<(i=e.m.Cf()).length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),w(r)})}function h8(e,t){var n="",i="",r=-1,a="";t=u(t);for(var o=t.next();!o.done;o=t.next())"Period"===(o=o.value).name?n=o.id:"AdaptationSet"===o.name?(i=o.id,null!==o.position&&(r=o.position)):"Representation"===o.name&&(a=o.id);if(t=[],a)t.push(n+","+a);
1else if(i)for(e=(r=u(e.s.values())).next();!e.done;e=r.next())(e=e.value).pa.id===n&&e.ea.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(e=(i=u(e.s.values())).next();!e.done;e=i.next())(e=e.value).pa.id===n&&e.ea.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function h9(e,t){var n=e.s.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Ja(e.i.presentationTimeline.mb());try{var r=hh(n,function(t,n,i,r){return po(e,t,n,i,r)},e.o,!0,e.g.dash.initialSegmentLimit,e.ja,n.J.aesKey,null,!0);i.createSegmentIndex=function(){return R(function(e){if(1==e.g)return i.segmentIndex?e.u(0):b(e,r.pc(),3);i.segmentIndex=e.h,w(e)})}}catch(e){if((t=n.J.contentType)!=nW&&"application"!=t&&"image"!=t||4002!=e.code)throw e}}function h7(t,n,i,r,a){var o=n.Rb;o||(o=tD(r,"mediaPresentationDuration",tj),t.l.Rb=o);var s=0;t.i&&t.i.presentationTimeline&&t.W&&(s=t.i.presentationTimeline.Eb());var c=[],d=s;r=tA(r,"Period");for(var h=0;h<r.length;h++){var p=r[h],f=r[h+1],g=tD(p,"start",tj,d),m=p.attributes.id,v=tD(p,"duration",tj);g=0==h&&0==g&&t.W?s:g;var y=null;if(f){var x=tD(f,"start",tj);null!=x&&(y=x-g+s)}else null!=o&&(y=o-g+s);if(x=nJ,y&&v&&Math.abs(y-v)>x&&y>v&&t.L++,null==y&&(y=v),!(null!==t.M&&null!==m&&null!==g&&g<t.M)||t.C.includes(m)||h+1==r.length){if(null!==g&&(null===t.M||g>t.M)&&(t.M=g),d=function(t,n,i,r){n.pa=pr(t,r.node,null,i),n.ka=r,n.pa.ab=n.ab,n.pa.id||(n.pa.id="__shaka_period_"+r.start);var a=tA(r.node,"EventStream");i=n.presentationTimeline.mb(),a=u(a);for(var o=a.next();!o.done;o=a.next())!function(e,t,n,i,r){var a=i.attributes.schemeIdUri||"",o=i.attributes.value||"",s=tD(i,"timescale",tB)||1,l=tD(i,"presentationTimeOffset",tB)||0;i=u(tA(i,"Event"));for(var c=i.next();!c.done;c=i.next()){var d=tD(c=c.value,"presentationTime",tB)||0,h=tD(c,"duration",tB)||0;h=(d=Math.max((d-l)/s+t,t))+h/s,null!=n&&(d=Math.min(d,t+n),h=Math.min(h,t+n)),h<r||(c={schemeIdUri:a,value:o,startTime:d,endTime:h,id:c.attributes.id||"",eventElement:function e(t){var n="",i=t.tagName.split(":");for(var r in 0<i.length&&(n=i[0],n=tY.has(n)?tY.get(n):""),n=document.createElementNS(n,t.tagName),t.attributes)n.setAttribute(r,t.attributes[r]);for(r=(t=u(t.children)).next();!r.done;r=t.next())r=r.value,i=void 0,i="string"==typeof r?new Text(r):e(r),n.appendChild(i);return n}(c),eventNode:tX(c)},e.j.onTimelineRegionAdded(c))}}(t,r.start,r.duration,o.value,i);for(a=(i=u(i=tA(r.node,"SupplementalProperty"))).next();!a.done;a=i.next())"urn:mpeg:dash:urlparam:2014"==(a=a.value).attributes.schemeIdUri&&(a=pt(t,a))&&(n.rb=a);if(i=tA(r.node,"AdaptationSet").map(function(i,r){return function(t,n,i,r){function a(e){var i=e.attributes["dvb:fontFamily"];e=e.attributes["dvb:url"],i&&e&&(e=nH(n.ea.Pa(),[e],n.rb()),t.j.addFont(i,e[0]))}function o(e){switch(e){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.ea=pr(t,r,n.pa,null),n.ea.position=i;var c=!1,d=(i=tA(r,"Role")).map(function(e){return e.attributes.value}).filter(il),h=void 0,p=n.ea.contentType==nW;p&&(h="subtitle"),i=u(i);for(var f=i.next();!f.done;f=i.next()){var g=(f=f.value).attributes.schemeIdUri;if(null==g||"urn:mpeg:dash:role:2011"==g)switch(f=f.attributes.value){case"main":c=!0;break;case"caption":case"subtitle":h=f}}var m=tA(r,"EssentialProperty");i=null;var v=!1;f=null,g=!1,m=u(m);for(var y=m.next();!y.done;y=m.next()){var x=(y=y.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==x)i=y.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==x)var T=s(parseInt(y.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==x)var S=o(parseInt(y.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=x&&("urn:mpeg:dash:ssr:2023"==x&&t.g.dash.enableFastSwitching?v=!0:"urn:dvb:dash:fontdownload:2014"==x?a(y):"urn:mpeg:dash:urlparam:2014"==x&&(f=pt(t,y))||(g=!0))}if(g)return null;var A=null;for(m=(g=u(g=tA(r,"SupplementalProperty"))).next();!m.done;m=g.next())"http://dashif.org/guidelines/last-segment-number"==(y=(m=m.value).attributes.schemeIdUri)?A=parseInt(m.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==y?T=s(p
1arseInt(m.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==y?S=o(parseInt(m.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==y?a(m):"urn:mpeg:dash:urlparam:2014"==y&&(f=pt(t,m));f&&(n.rb=f),f=tA(r,"Accessibility");var k,E=new Map;for(g=(f=u(f)).next();!g.done;g=f.next())if(g=(m=g.value).attributes.schemeIdUri,m=m.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=g||t.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=g||t.g.disableText)"urn:mpeg:dash:role:2011"==g?null!=m&&(d.push(m),"captions"==m&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==g&&("1"==m?k="visually impaired":"2"==m&&(k="hard of hearing"));else if(g=1,null!=m)for(y=(m=u(m.split(";"))).next();!y.done;y=m.next()){x=y.value;var I=y=void 0;x.includes("=")?(y="svc"+(x=x.split("="))[0],I=x[1].split(",")[0].split(":").pop()):(y="svc"+g,g++,I=x),E.set(y,im(I))}else E.set("svc1","und");else if(g=1,null!=m)for(x=(y=u(m=m.split(";"))).next();!x.done;x=y.next()){I=x.value;var M=x=void 0;I.includes("=")?(x=(I=I.split("="))[0].startsWith("CC")?I[0]:"CC"+I[0],M=I[1]||"und"):(x="CC"+g,2==m.length?g+=2:g++,M=I),E.set(x,im(M))}else E.set("CC1","und");var C=d0(f=tA(r,"ContentProtection"),t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI);n.ea.encrypted=0<C.drmInfos.length;var D=im(n.ea.language||"und"),P=n.ea.label;if(r=tA(r,"Representation"),!t.g.dash.ignoreSupplementalCodecs){for(f=[],m=(g=u(r)).next();!m.done;m=g.next())(m=tR(y=m.value,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&((y=tv(y)).attributes.codecs=m.split(" ").join(","),y.attributes.id&&(y.attributes.supplementalId=y.attributes.id+"_supplementalCodecs"),f.push(y));r.push.apply(r,l(f))}if(0==(f=r.map(function(i){return(i=function(t,n,i,r,a,o,s,u,l,c,d,h){n.J=pr(t,c,n.ea,null);var p,f,g=n.J.id;if(t.da=Math.min(t.da,n.J.ab),t.P=0<t.da,!function(e){var t=+!!e.$c;return 0==(t+=+!!e.Ub+ +!!e.fc)?e.contentType==nW||"application"==e.contentType:(1!=t&&(e.$c&&(e.Ub=null),e.fc=null),!0)}(n.J))return null;var m=n.ka.start;n.bandwidth=tD(c,"bandwidth",t_)||0,n.roles=u;var v=tA(c,"SupplementalProperty"),y=tA(c,"EssentialProperty"),x=null,T=y.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri});T?x=pt(t,T):(T=v.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri}))&&(x=pt(t,T)),x&&(n.rb=x),x=(T=n.J.contentType)==nW||"application"==T,T="image"==T;try{var S=void 0;if(i.We){var A=n.J.Pa,k=n.rb,E=nH(A(),[i.We.Ni],k()),I=ro(E,t.g.retryParameters);S={bitsKey:128,blockCipherMode:"CBC",iv:i.We.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;return R(function(a){if(1==a.g)return b(a,pu(t,I,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new eC(2,4,4049);return i={name:"AES-CBC"},r=S,b(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,S.fetchKey=void 0,w(a)})}}}if(n.J.aesKey=S,A=function(e,n,i,r){return po(t,e,n,i,r)},n.J.$c)var M,C,D,P,L,N,j,U,O,_=(M=n,C=A,D=S,P=Number(d6(M,hs,"presentationTimeOffset"))||0,L=d6(M,hs,"timescale"),N=1,L&&(N=t_(L)||1),j=P/N||0,U=ha(M,hs,D),function(e,t){if(hl(e,t),!hu(e))throw new eC(2,4,4002)}(M,U),O=ty(M),{pc:function(){var e=d8(O,hs,"RepresentationIndex"),t=O.J.Pa();return e&&(e=tu(e.attributes.sourceURL))&&(t=nH(t,[e],O.rb())),e=hu(O),ho(O,C,U,t,e.start,e.end,j)}});else if(n.J.Ub)_=function(e,t,n){var i=ha(e,hd,n),r=function(e){var t=function(e){return[e.J.Ub,e.ea.Ub,e.pa.Ub].filter(il).map(function(e){return tA(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){t.attributes.indexRange&&!e.Ef&&(e.Ef=!0);var n=tu(t.attributes.media);return{Ti:n,start:(t=tD(t,"mediaRange",tU,{start:0,end:null})).start,end:t.end}})}(e),n=(e=d4(e,hd)).Id;0==n&&(n=1);var i=0;return e.Sa?i=e.Sa*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{Sa:e.Sa,startTime:i,Id:n,ec:e.ec,timeline:e.timeline,Tc:t}}(e);if(!r.Sa&&!r.timeline&&1<r.Tc.length||!r.Sa&&!e.ka.duration&&!r.timeline&&1==r.Tc.length||r.timeline&&0==r.timeline.length)throw new eC(2,4,4002);var a=null,o=null;e.pa.id&&e.J.id&&(o=t.get(e.pa.id+","+e.J.id))&&(a=o.segmentIndex);var s=function(e,t,n,i,r,a,o,s,u,l){var c=i.Tc.length;i.timeline&&i.timeline.length!=i.Tc.length&&(c=Math.min(i.timeline.length,i.Tc.length));for(var d=e-i.ec,h=t?e+t:1/0,p=[],f=i.startTime,g={},m=0;m<c;g={Ee:void 0,ve:void 0},m++){g.ve=i.Tc[m];var v=f;f=void 0,f=null!=i.Sa?v+i.Sa:i.timeline?i.timeline[m].end:v+t,g.Ee=null,(g=new aB(e+v,e+f,function(e){return function(){return null==e.Ee&&(e.Ee=nH(n(),[e.ve.Ti],l())),e.Ee}}(g),g.ve.start,g.ve.end,r,d,e,h,[],"",null,null,aF,a)).codecs=s,g.mimeType=o,g.bandwidth=u,p.push(g)}return p}(e.ka.start,e.ka.duration,e.J.Pa,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.rb);return t=!a,a?a.xd(s,e.presentationTimeline.mb()):a=new st(s),e.presentationTimeline.Bd(s),e.Lb&&e.ka.Ug||a.Kc(e.ka.start,e.ka.duration?e.ka.start+e.ka.duration:1/0,t),o&&(o.segmentIndex=a),{pc:function(){return a&&0!=a.getNumReferences()||a.ge(s),Promise.resolve(a)}}}(n,t.o,S);else if(n.J.fc)_=hh(n,A,t.o,!!t.i,t.g.dash.initialSegmentLimit,t.ja,S,h,!1);else{var B=n.ka.duration||0,F=n.J.Pa,V=n.J.mimeType,H=n.J.codecs;_={pc:function(){var e=si(m,B,F());return e.vb(function(e){e.mimeType=V,e.codecs=H}),Promise.resolve(e)}}}}catch(e){if((x||T)&&4002==e.code)return null;throw e}if(c=new Set((c=function(e,t,n,i){var r=d0(e,n,i);
1if(t.Kg)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.Kg=!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 eC(2,4,4008);return r.Fg||t.Fg}(c=tA(c,"ContentProtection"),i,t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI))?[c]:[]),h=!1,v.some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.attributes.schemeIdUri&&"JOC"==e.attributes.value})&&(h=!0),v=!1,x&&(v=u.includes("forced_subtitle")||u.includes("forced-subtitle")),T&&((y=y.find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.attributes.schemeIdUri)}))&&(p=y.attributes.value),!p))return null;x=n.J.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(x.includes("hvc1.2.4.L153.B0")||x.includes("hev1.2.4.L153.B0"))&&(f="PQ"),y=n.J.id?n.pa.id+","+n.J.id:"",t.F.length&&g&&t.s.set(n.pa.id+","+g,function(e){function t(e){return e?((e=ty(e)).$c=null,e.Ub=null,e.fc=tX(e.fc),e):null}return(e=ty(e)).pa=t(e.pa),e.ea=t(e.ea),e.J=t(e.J),e.ka&&(e.ka=ty(e.ka),e.ka.node=null),e}(n));var G=y&&t.o.has(y)?t.o.get(y):{id:t.oa++,originalId:n.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:n.J.mimeType,codecs:x,frameRate:n.J.frameRate,pixelAspectRatio:n.J.pixelAspectRatio,bandwidth:n.bandwidth,width:n.J.width,height:n.J.height,kind:r,encrypted:0<i.drmInfos.length,drmInfos:i.drmInfos,keyIds:c,language:a,originalLanguage:n.ea.language,label:o,type:n.ea.contentType,primary:s,trickModeVideo:null,emsgSchemeIdUris:n.J.emsgSchemeIdUris,roles:u,forced:v,channelsCount:n.J.ke,audioSamplingRate:n.J.audioSamplingRate,spatialAudio:h,closedCaptions:l,hdr:f,colorGamut:void 0,videoLayout:void 0,tilesLayout:p,accessibilityPurpose:d,external:!1,fastSwitching:!1,fullMimeTypes:new Set([nZ(n.J.mimeType,n.J.codecs)]),isAudioMuxedInVideo:!1};return G.createSegmentIndex=function(){var e;return R(function(t){if(1==t.g)return G.segmentIndex?t.u(0):(e=G,b(t,_.pc(),3));e.segmentIndex=t.h,w(t)})},y&&n.Lb&&!t.o.has(y)&&(n=n.pa.id||"",t.B.has(n)||t.B.set(n,[]),t.o.set(y,G),t.B.get(n).push(y)),G}(t,n,C,h,D,P,c,d,E,i,k,A))&&(i.hdr=i.hdr||T,i.colorGamut=i.colorGamut||S,i.fastSwitching=v),i}).filter(function(e){return!!e})).length){if(i="image"==n.ea.contentType,t.g.dash.ignoreEmptyAdaptationSet||p||i)return null;throw new eC(2,4,4003)}if(!n.ea.contentType||"application"==n.ea.contentType)for(n.ea.contentType=ps(f[0].mimeType,f[0].codecs),g=(p=u(f)).next();!g.done;g=p.next())g.value.type=n.ea.contentType;for(p=n.ea.id||"__fake__"+t.oa++,m=(g=u(f)).next();!m.done;m=g.next()){for(m=m.value,x=(y=u(C.drmInfos)).next();!x.done;x=y.next())(x=x.value).keyIds=x.keyIds&&m.keyIds?new Set([].concat(l(x.keyIds),l(m.keyIds))):x.keyIds||m.keyIds;m.groupId=p}return r=r.map(function(e){return e.attributes.supplementalId||e.attributes.id}).filter(il),{id:p,contentType:n.ea.contentType,language:D,Fk:c,streams:f,drmInfos:C.drmInfos,qg:i,gj:r}}(t,n,r,i)}).filter(il),n.Lb){for(r=[],o=(a=u(i)).next();!o.done;o=a.next()){o=u(o.value.gj);for(var s=o.next();!s.done;s=o.next())r.push(s.value)}if(r.length!=new Set(r).size)throw new eC(2,4,4018)}if(r=i.filter(function(e){return!e.qg}),i=i.filter(function(e){return e.qg}),!t.g.disableIFrames)for(a=(i=u(i)).next();!a.done;a=i.next()){o=(a=a.value).qg.split(" "),s=u(r);for(var c=s.next();!c.done;c=s.next())if(c=c.value,o.includes(c.id)){c=u(c.streams);for(var d=c.next();!d.done;d=c.next())iV(d.value,a.streams)}}if(i=pe(t.g.disableAudio,r,"audio"),a=pe(t.g.disableVideo,r,"video"),o=pe(t.g.disableText,r,nW),r=pe(t.g.disableThumbnails,r,"image"),0===a.length&&0===i.length)throw new eC(2,4,4004);return{id:n.pa.id,audioStreams:i,videoStreams:a,textStreams:o,imageStreams:r}}(t,n,i,{start:g,duration:y,node:p,Ug:null==y||!f}),c.push(d),n.pa.id&&y&&t.ja.set(n.pa.id,y),null==y){d=null;break}d=g+y}}if(a)for(i=(n=u(c)).next();!i.done;i=n.next())i=i.value.id,t.C.includes(i)||t.C.push(i);else t.C=c.map(function(e){return e.id});return null!=o?{periods:c,duration:o+s,Ig:!1}:{periods:c,duration:d,Ig:!0}}function pe(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,l(t.streams)),e},[])}function pt(e,t){if((t=tC(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&tD(t,"useMPDUrlQuery",tV,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.ba:n.split("&").map(function(t){if("$querypart$"==t)return e.ba;var n=/\$query:(.*?)\$/g.exec(t);if(n&&2==n.length){n=n[1];var i=new nL(e.ba).get(n);if(i.length)return n+"="+i[0]}return t}).join("&")}}return null}function pn(e){var t,n;return R(function(i){switch(i.g){case 1:return t=0,x(i,2),b(i,h4(e),4);case 4:t=i.h,S(i,3);break;case 2:if(n=A(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),pi(e,t),w(i)}})}function pi(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.dash.updatePeriod&&(n=e.g.dash.updatePeriod),e.K.$(Math.max(n-t,V(e.ma)))}}function pr(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ke:null,audioSamplingRate:null,ab:0,we:0,encrypted:!1},i=i||n.Pa;var r,a=t.attributes.id,o=t.attributes.supplementalId,s=tA(t,"BaseURL"),l=!1;if(e.h)for(var c=u(s),d=c.next();!d.done;d=c.next()){var h=d.value;d=h.attributes.serviceLocation,h=tE(h),d&&h&&(hw(e.h,a,d,h),l=!0)}l&&e.h||(r=s.map(tE)),c=t.attributes.contentType||n.contentType,d=t.attributes.mimeType||n.mimeType,h=sk([t.attributes.codecs||n.c
1odecs]).join(",");var p=tD(t,"frameRate",tH)||n.frameRate,f=t.attributes.sar||n.pixelAspectRatio,g=function(e,t){t=t.slice(),e=u(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(tA(t,"InbandEventStream"),n.emsgSchemeIdUris),m=tA(t,"AudioChannelConfiguration");m=function(e){e=u(e);for(var t=e.next();!t.done;t=e.next()){var n=(t=t.value).attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(t,10)))continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],!(t=parseInt(t,16)))continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),!(t=parseInt(t,16)))continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}(m)||n.ke;var v=tD(t,"audioSamplingRate",tB)||n.audioSamplingRate;c||(c=ps(d,h));var y=tM(t,"SegmentBase"),b=tM(t,"SegmentTemplate"),w=y&&tD(y,"availabilityTimeOffset",tF)||0,x=b&&tD(b,"availabilityTimeOffset",tF)||0,T=s&&s.length&&tD(s[0],"availabilityTimeOffset",tF)||0;w=n.ab+T+w+x,x=null,(T=tM(t,"SegmentSequenceProperties"))&&(T=tM(T,"SAP"))&&(x=tD(T,"cadence",tO)),T=t.attributes.label;var S=tA(t,"Label");return S&&S.length&&tk(S=S[0])&&(T=tk(S)),{Pa:function(){return nH(i(),s.length?e.h&&l?hx(e.h,a):r||[]:[])},$c:y||n.$c,Ub:tM(t,"SegmentList")||n.Ub,fc:b||n.fc,width:tD(t,"width",tB)||n.width,height:tD(t,"height",tB)||n.height,contentType:c,mimeType:d,codecs:h,frameRate:p,pixelAspectRatio:f,emsgSchemeIdUris:g,id:o||a,originalId:a,language:t.attributes.lang,ke:m,audioSamplingRate:v,ab:w,be:null,we:x||n.we,label:T||null,encrypted:!1}}function pa(e,t,n,i){var r,a,o,s,u,l;return R(function(c){if(1==c.g)return r=[tu(n)],(a=ro(nH(t(),r),e.g.retryParameters)).method=i,o=e.j.networkingEngine.request(4,a,{isPreload:e.ga()}),rn(e.O,o),b(c,o.promise,2);if(s=c.h,"HEAD"==i){if(!s.headers||!s.headers.date)return c.return(0);u=s.headers.date}else u=tn(s.data);return isNaN(l=Date.parse(u))?c.return(0):c.return(l-Date.now())})}function po(e,t,n,i,r){var a,o,s,u;return R(function(l){return 1==l.g?(a=rc,o=+!r,s=sI(t,n,i,e.g.retryParameters),b(l,pu(e,s,a,{type:o}),2)):(u=l.h,l.return(u.data))})}function ps(e,t){return ir(t=nZ(e,t))?nW:e.split("/")[0]}function pu(e,t,n,i){return i||(i={}),i.isPreload=e.ga(),t=e.j.networkingEngine.request(n,t,i),rn(e.O,t),t.promise}function pl(){}(c=h3.prototype).configure=function(e,t){var n=this.j&&e.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=e.dash.updatePeriod;this.g=e,t&&(this.ga=t),n&&this.i&&this.i.presentationTimeline.T()&&this.K.pb(),this.h&&this.h.configure(this.g),this.m&&(this.m.mh(this.g.dash.multiTypeVariantsAllowed&&ee()),this.m.sh(this.g.dash.useStreamOnceInPeriodFlattening))},c.start=function(e,t){var n,i=this;return R(function(r){if(1==r.g)return i.ia=t.isLowLatencyMode(),i.A=[e],i.j=t,b(r,h4(i),2);if(n=r.h,i.j&&pi(i,n),!i.j)throw new eC(2,7,7001);return r.return(i.i)})},c.stop=function(){for(var e=u(this.o.values()),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o.clear(),this.B.clear(),this.s.clear(),this.l={ie:"",type:"",profiles:[],Rb:null,ab:0,Pa:null,Fd:0},this.m=null,null!=this.K&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},c.update=function(){var e,t=this;return R(function(n){return 1==n.g?(x(n,2),b(n,h4(t),4)):2!=n.g?S(n,0):(e=A(n),t.j&&e)?void(t.j.onError(e),w(n)):n.return()})},c.onExpirationUpdated=function(){},c.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.T()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.Zb();var n=t.segmentIndex.find(e);
1null!=n&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,pi(this,0))}}},c.banLocation=function(e){this.h&&this.h.banLocation(e)},c.setMediaElement=function(e){this.H=e},B("shaka.dash.DashParser",h3),as("application/dash+xml",function(){return new h3}),as("video/vnd.mpeg.dash.mpd",function(){return new h3}),B("shaka.dependencies",pl),pl.has=function(e){return ph.has(e)},pl.add=function(e,t){if(!pd[e])throw Error(e+" is not supported");e==pc?ei("mux.js","mux.js is no longer used in Shaka Player."):ph.set(e,function(){return t})};var pc="muxjs",pd={Gk:pc,ISOBoxer:"ISOBoxer"};pl.Allowed=pd;var ph=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function pp(e,t,n){this.type=e,this.Y=t,this.segments=n||null}function pf(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function pg(e,t){return t?e.toString():(t=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function pm(e,t){return(e=e.attributes.filter(function(e){return e.name==t})).length?e[0]:null}function pv(e,t,n){return(e=pm(e,t))?e.value:n||null}function py(e,t){if(!(e=pm(e,t)))throw new eC(2,4,4023,t);return e.value}function pb(e,t,n){n=void 0===n?[]:n,this.Y=t,this.g=e,this.Gb=n}function pw(e,t){this.name=e,this.value=t}function px(e,t){return e.filter(function(e){return e.name==t})}function pT(e,t){return e.filter(function(e){return py(e,"TYPE")==t})}function pS(e,t){e=u(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function pA(e,t,n){return n=void 0===n?0:n,(e=pS(e,t))?Number(e.value):n}function pk(e,t,n){return t?pE(e,[t],n):[]}function pE(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(e){return pI(e,n)})),nH(e,i)}function pI(e,t){if(!t||!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n){n=u(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 eC(2,4,4039,r)}}return e}function pM(){this.g=0}function pC(e,t){var n=(t=(t=tn(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new eC(2,4,4015);t=0;for(var i=!0,r=u(n),a=r.next();!a.done;a=r.next())if(a=a.value,/^#(?!EXT)/m.test(a)||i)i=!1;else if(a=pD(e,a),--e.g,pR.includes(a.name)){t=1;break}else"EXT-X-STREAM-INF"==a.name&&(i=!0);for(a=0,r=[],i=!0;a<n.length;a++){var o=n[a],s=n[a+1];if(/^#(?!EXT)/m.test(o)||i)i=!1;else{if(o=pD(e,o),pP.includes(o.name)){if(1!=t)throw new eC(2,4,4017);o=n.splice(a,n.length-a),n=[],i=[],a=[],s=null,o=u(o);for(var l=o.next();!l.done;l=o.next())l=l.value,/^(#EXT)/.test(l)?(l=pD(e,l),pR.includes(l.name)?r.push(l):"EXT-X-MAP"==l.name?s=l:"EXT-X-PART"==l.name?a.push(l):"EXT-X-PRELOAD-HINT"==l.name?"PART"==pv(l,"TYPE")?a.push(l):"MAP"==pv(l,"TYPE")&&(l.name="EXT-X-MAP",s=l):i.push(l)):/^#(?!EXT)/m.test(l)||(l=l.trim(),s&&i.push(s),n.push(new pb(l,i,a)),i=[],a=[]);return a.length&&(s&&i.push(s),n.push(new pb("",i,a))),new pp(t,r,n)}r.push(o),"EXT-X-STREAM-INF"==o.name&&(o.attributes.push(new pw("URI",s)),i=!0)}}return new pp(t,r)}function pD(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new eC(2,4,4016,t);t=n[1];var i=n[2];if(n=[],i){(a=th(i=new tc(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var r,a,o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=th(i,o);)n.push(new pw(a[1],a[2]||a[3])),td(i)}return new pf(e,t,n,r)}pf.prototype.toString=function(e){var t="#"+this.name,n=this.attributes?this.attributes.filter(function(t){return!e||!e.has(t.name)}).map(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t};var pR="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),pP="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function pL(){}function pN(e,t){try{var n=pj(e);return i4({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(e){return i2(e)}}function pj(t){var n=t.split(":");if(2>n.length||"data"!=n[0]||2>(n=n.slice(1).join(":").split(",")).length)throw new eC(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?n_(t):ta(t),contentType:i}}function pU(){var e=this;this.g=this.h=null,this.F=1,this.A=new Map,this.I=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(nW,new Map),this.M.set("image",new Map),this.Cb=ne
1w Set,this.i=new Map,this.l=null,this.C="",this.Ia=new pM,this.K=-1,this.ga=1/0,this.da=this.bc=this.Oa=!1,this.B=new eB(function(){e.aa&&!e.g.continueLoadingWhenPaused&&(e.W.$a(e.aa,"timeupdate"),e.aa.paused)?e.W.qa(e.aa,"timeupdate",function(){return fa(e)}):fa(e)}),this.Ca=fb,this.m=null,this.Ma=0,this.o=1/0,this.Da=this.wa=this.P=0,this.ba=new rt,this.G=new Map,this.H=new Map,this.sa=new Map,this.ja=new Map,this.L=new Map,this.ma=new Map,this.oa=new Map,this.Pb=this.ia=!1,this.Mb=new F(5),this.j=null,this.O=!0,this.Ba=new Set,this.W=new J,this.s=this.aa=null,this.Nb=function(){return!1}}function pO(e,t){return fo(e)?e.M.get(t.type):t.fe}function p_(e,t,n){n=void 0!==n&&n;for(var i=-1==e.K,r=u(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=pO(e,a);if(o=sn(o)){s=u(s);for(var l=s.next();!l.done;l=s.next()){var c=(l=u(l.value)).next().value;if(l.next().value==o.startTime){i&&(e.K=Math.max(e.K,c)),a.gf=c;break}}}}if(!(0>e.K))for(i=(t=u(t)).next();!i.done;i=t.next())(p$(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&0<(a=e.K-i.gf)&&(r.g.splice(0,a),r=sn(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),pB(e,i,r))}function pB(e,t,n){if(!(.001>Math.abs(n))){t.yc+=n,t.Qb+=n,e=pO(e,t);for(var i=u(e),r=i.next();!r.done;r=i.next()){var a=u(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.N()}}function pF(e,t,n){var i,r,a,o,s;return R(function(u){switch(u.g){case 1:if(!t)return u.return({mimeType:null,data:null});return i=rc,r=sI(t.N(),t.$b(),t.Yb(),e.g.retryParameters),b(u,fu(e,r,i,{type:+(t instanceof aB)}).promise,2);case 2:if(o=(a=u.h).data,!t.aesKey){u.u(3);break}return b(u,sE(o,t.aesKey,n),4);case 4:o=u.h;case 3:return t instanceof aB?t.Hd(o,!0):t.Hd(o),(s=a.headers["content-type"])&&(s=s.split(";")[0].toLowerCase()),u.return({mimeType:s,data:o})}})}function pV(e){if(fo(e)){if(e.Ca==fx){for(var t=1/0,n=1/0,i=u(e.i.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.Qb),n=Math.min(n,r.yc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.xe(t)}}else e.l.Za(pW(e));if(!e.l.s)for(n=(t=u(e.i.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=sn(n.stream.segmentIndex))&&n.h&&e.l.ph(n.h);e.l.ee()}function pH(e,t,n){n=new nw(n).g;var i=new Map;t=u(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value,o=pv(a,"NAME"),s=pv(a,"VALUE");r=pv(a,"QUERYPARAM"),a=pv(a,"IMPORT"),o&&s&&(i.has(o)||i.set(o,s)),r&&(o=n.get(r)[0])&&!i.has(o)&&i.set(r,o),a&&(r=e.A.get(a))&&i.set(a,r)}return i}function pG(e){var t=new Set([nZ(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.vb(function(n){n.mimeType&&t.add(nZ(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function pK(e,t){return e.da=0<(t=pv(t,"CODECS")||"").length,e.da||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),sk(t.split(/\s*,\s*/))}function pq(e,t,n,i){i=void 0===i||i;for(var r,a=[],o=[],s=new Map,l=u(t),c=l.next();!c.done;c=l.next()){var d=c.value;c=i?py(d,"URI"):pv(d,"URI")||"shaka://hls-muxed",d=py(d,"GROUP-ID"),a.push(c),o.push(d),s.set(d,c)}if(i=o.sort().join(","),c=t[0],t="","subtitles"==(l=py(c,"TYPE").toLowerCase())&&(l=nW),l==nW)t=pv(c,"CODECS")||"";else for(d=(o=u(o)).next();!d.done;d=o.next())if(d=d.value,e.H.has(d)){t=e.H.get(d);break}if(o=a.sort().join(","),e.i.has(o))return e.i.get(o);if(d=e.F++,e.j){s=u(s);for(var h=s.next();!h.done;h=s.next()){var p=u(h.value);h=p.next().value,p=p.next().value,(h=n.get(h))&&hw(e.j,d,h,p)}}n=pv(c,"LANGUAGE"),s=pv(c,"NAME"),h="YES"==pv(c,"DEFAULT"),p="audio"==l&&(p=pv(c,"CHANNELS"))?parseInt(p.split("/")[0],10):null,r="audio"==l&&!!(r=pv(c,"CHANNELS"))&&2==(r=r.split("/")).length&&("JOC"===r[1]||r[1].includes("ATMOS"));var f=pv(c,"CHARACTERISTICS"),g="YES"==pv(c,"FORCED");return c="audio"==l&&(c=pv(c,"SAMPLE-RATE"))?parseInt(c,10):null,(a=pX(e,d,a,t,l,n,h,s,p,null,f,g,c,r)).stream&&(a.stream.groupId=i),e.I.has(i)?e.I.get(i).push(a):e.I.set(i,[a]),e.i.set(o,a),a}function pz(e,t){var n="video",i=py(t,"URI"),r=pv(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.i.has(i))return e.i.get(i);var a=pv(t,"LANGUAGE"),o=pv(t,"NAME"),s=pv(t,"CHARACTERISTICS");
1return n=pX(e,e.F++,[i],r,n,a,!1,o,null,null,s,!1,null,!1),r=(a=u((r=pv(t,"RESOLUTION"))?r.split("x"):[null,null])).next().value,a=a.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(a)||void 0,(t=pv(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function pX(e,t,n,i,r,a,o,s,l,c,d,h,p,f){function g(){return e.j&&1<n.length?hx(e.j,t):y.re.concat(pE([e.C],n,e.A))}var m=p0(e,i,r,a,o,s,l,c,d,h,p,f);n.includes("shaka://hls-muxed")&&(m.isAudioMuxedInVideo=!0,m.mimeType="video/mp2t",pG(m));var v,y={stream:m,type:r,re:[],yc:0,Qb:0,fe:new Map,Rd:!1,Qd:!1,nd:!1,gf:-1,yb:-1,zb:-1,Mf:!1,N:g},T=null;return m.createSegmentIndex=function(){return T||(m.isAudioMuxedInVideo?(m.segmentIndex=new st([]),Promise.resolve()):(v=fr(e,y.N(),!0),T=new Promise(function(t){var n,T,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G;t((n=v,R(function(t){switch(t.g){case 1:return T=nY,x(t,2),b(t,n.promise,4);case 4:if(k=t.h,n.aborted)return t.return();if((E=k.uri)!=k.originalUri&&(y.N().includes(E)||y.re.push(E)),1!=(I=pC(e.Ia,k.data)).type)throw new eC(2,4,4017);return M=pH(e,px(I.Y,"EXT-X-DEFINE"),E),C=!1,(!e.da&&e.g.hls.disableCodecGuessing||e.O&&r==T.na&&!e.g.hls.disableClosedCaptionsDetection)&&0<I.segments.length&&(e.O=!1,C=!0),D=!e.da&&e.g.hls.disableCodecGuessing,P=fo(e),b(t,pQ(e,0,M,I,g,i,r,a,o,s,l,c,d,h,p,f,void 0,C,D),5);case 5:if(L=t.h,n.aborted)return t.return();if(N=L.stream,p3(e,I),fo(e)&&!P&&p5(e,I),y.yc=L.yc,y.Qb=L.Qb,y.Rd=L.Rd,y.Qd=L.Qd,y.nd=L.nd,y.fe=L.fe,y.yb=L.yb,y.zb=L.zb,y.Mf=!0,m.segmentIndex=N.segmentIndex,m.encrypted=N.encrypted,m.drmInfos=N.drmInfos,m.keyIds=N.keyIds,m.mimeType=N.mimeType,m.bandwidth=m.bandwidth||N.bandwidth,m.codecs=m.codecs||N.codecs,m.closedCaptions=m.closedCaptions||N.closedCaptions,m.width=m.width||N.width,m.height=m.height||N.height,m.hdr=m.hdr||N.hdr,m.colorGamut=m.colorGamut||N.colorGamut,m.frameRate=m.frameRate||N.frameRate,"und"==m.language&&"und"!=N.language&&(m.language=N.language),m.language=m.language||N.language,m.channelsCount=m.channelsCount||N.channelsCount,m.audioSamplingRate=m.audioSamplingRate||N.audioSamplingRate,pG(m),m.drmInfos.length&&e.h.newDrmInfo(m),j=!1,(!c&&m.closedCaptions||c&&m.closedCaptions&&c.size!=m.closedCaptions.size)&&(j=!0),e.m&&j&&e.h.makeTextStreamsForClosedCaptions(e.m),r==T.na||r==T.V)for(O=(U=u(e.i.values())).next();!O.done;O=U.next())(_=O.value).Mf||_.type!=r||(_.stream.mimeType=N.mimeType,pG(_.stream));r==T.Aa&&(B=sn(N.segmentIndex))&&B.ca&&(m.mimeType="application/mp4",pG(m)),F=sh(m),m.segmentIndex.vb(function(e){e.ca&&(e.ca.Sc=F)}),function(e){if(!e.m)return!1;var t=[],n=[];e=u(e.m.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.bc?pJ(e,[y]):(e.bc=!0,V=Array.from(e.i.values()).filter(function(e){return e.stream.segmentIndex}),pJ(e,V),pV(e),0<(H=e.o)&&e.B.$(H))),p9(e,I.Y,m.type,M,g),e.m&&(e.m.startTime=e.s),S(t,0);break;case 2:if(G=A(t),m.closeSegmentIndex(),7001===G.code)return t.return();if(!e.h.disableStream(m))throw G;w(t)}})))})))},m.closeSegmentIndex=function(){T&&!m.segmentIndex&&v.abort(),m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null),T=null},y}function pW(e){var t=1/0;e=u(e.i.values());for(var n=e.next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Qb));return t}function pY(e,t){var n=[];t=u(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.vb(function(e){n.push(e)});e.l.Bd(n)}function pJ(e,t){if(!fo(e))for(var n=pW(e),i=u(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Kc(0,n);pY(e,t.map(function(e){return e.stream})),n=(i=Array.from(e.i.values()).filter(function(e){return e.stream.segmentIndex})).some(function(e){return"audio"==e.stream.type}),r=i.some(function(e){return"video"==e.stream.type}),i=fo(e)&&!e.Oa,n=!fo(e)&&e.Oa&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?p_(e,t,i):(function(e,t){if(1/0==e.ga){t=u(t);for(var n=t.next();!n.done;n=t.next())null!=(n=sn(n.value.stream.segmentIndex))&&null!=n.h&&(e.ga=Math.min(e.ga,n.h))}if(1/0!=(t=e.ga)){n=u(e.i.values());for(var i=n.next();!i.done;i=n.next())if(!p$(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=sn(r);if(a)if(null==a.h)K("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.N(),"Expect AV sync issues!");else for(pB(e,i,a.h-t-a.startTime),r=(i=u(r)).next();!r.done;r=i.next())r.value.lg(t)}}}}(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&p_(e,t))}function p$(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function pQ(e,t,n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w){var T,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,q,z,X,W,Y,J;return y=void 0===y||y,w=void 0===w||w,R(function(t){var $,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,ep,ef,eg,em,ey,eb,ew,ex,eT,eS,eA,ek,eE,eI,eM,eD,eR,eP;switch(t.g){case 1:if(k=(T=i.segments||[]).every(function(e){return!!pS(e.Y,"EXT-X-GAP")}),!T.length||k)throw new eC(2,4,4053);if(eg=e,ey=pS((em=i).Y,"EXT-X-PLAYLIST-TYPE"),em=pS(em.Y,"EXT-X-ENDLIST"),em=ey&&"VOD"==ey.value||em,ey=ey&&"EVENT"==ey.value&&!em,ey=!em&&!ey,em?fs(eg,fb):ey?fs(eg,fx):fs(eg,fw),fo(e)&&p4(e,i),E=fo(e)?e.M.get(o):new Map,M=(I=p7(e,i,E,n,r,o)).segments,C=I.bandwidth,j=N=L=P=D=null,!(0<M.length&&y)){t.u(2);break}return b(t,($=e,Q=M,R(function(e){if(1==e.g)return(Z=sA($.g.hls.mediaPlaylistFullMimeType),Q.length)?(et=(ee=fn($,Q)).segment,en=ee.segmentIndex,ei=new nw(et.N()[0]).Ya.split(".").pop(),(er=fd.get(ei))?e.return(sA(er)):b(e,Promise.all([pF($,et.ca,0),pF($,et,en)]),2)):e.return(Z);if(eo=(ea=e.h)[1].mimeType,es=ea[0].data,eu=ea[1].data,el="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),ec=["audio/mp4","video/mp4","video/iso.segment"],!(ed=et.ca||ec.includes(eo))&&og(eh(eu))){var t=eu,n=$.g.disableAudio,i=$.g.disableVideo,r=$.g.disableText,a=eh(t),o=(new od).parse(a),s=o.jd();a=o.Df();var l=[],c=!1,d=!1;if(!n)switch(s.audio){case"aac":case"aac-loas":o.cb().length&&(l.push("mp4a.40.2"),c=!0);break;case"mp3":o.cb().length&&(l.push("mp4a.40.34"),c=!0);break;case"ac3":o.cb().length&&(l.push("ac-3"),c=!0);break;case"ec3":o.cb().length&&(l.push("ec-3"),c=!0);break;case"opus":o.cb().length&&(l.push("opus"),c=!0)}if(!i)switch(s.video){case"avc":a.codec?l.push(a.codec):l.push("avc1.42E01E"),d=!0;break;case"hvc":a.codec?l.push(a.codec):l.push("hvc1.1.6.L93.90"),d=!0;break;
1case"av1":l.push("av01.0.01M.08"),d=!0}if(l.length){if(n=c&&!d,i=new Map,d&&!r){for((r=new ev("video/mp2t")).i(t),d=(t=u(r.j())).next();!d.done;d=t.next())d=d.value,i.set(d,d);r.g()}a={type:n?"audio":"video",mimeType:"video/mp2t",codecs:l.join(", "),language:null,height:a.height,width:a.width,channelCount:null,sampleRate:null,closedCaptions:i,Kd:null,colorGamut:null,frameRate:a.frameRate}}else a=null;if(ep=a)return e.return(ep)}else if((ed||el.includes(ei))&&(ef=function(e,t,n){function i(e){o=e.name;var t=e.reader;t.skip(24);var n=t.la(),i=t.la();t.skip(50),f=String(n),p=String(i),e.reader.ta()&&rT(e)}function r(e){var t=a6(e.reader);g=t.channelCount,m=t.sampleRate,a(e.name)}function a(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":l.push(e+".42E01E"),d=!0;break;case"hev1":case"hvc1":l.push(e+".1.6.L93.90"),d=!0;break;case"dvh1":case"dvhe":l.push(e+".05.04"),d=!0;break;case"vp09":l.push(e+".00.10.08"),d=!0;break;case"av01":l.push(e+".0.01M.08"),d=!0;break;case"mp4a":s.push("mp4a.40.2"),c=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(e),c=!0}}var o,s=[],l=[],c=!1,d=!1,h=null,p=null,f=null,g=null,m=null,v=null,y=null;if((new rx).box("moov",rT).box("trak",rT).box("mdia",rT).S("mdhd",function(e){h=a4(e.reader,e.version).language}).box("minf",rT).box("stbl",rT).S("stsd",rS).box("mp4a",function(e){var t=a6(e.reader);
1g=t.channelCount,m=t.sampleRate,e.reader.ta()?rT(e):a(e.name)}).box("esds",function(e){e=e.reader;for(var t,n,i="mp4a";e.ta();){t=e.U();for(var r=e.U();128&r;)r=e.U();if(3==t)e.la(),128&(r=e.U())&&e.la(),64&r&&e.skip(e.U()),32&r&&e.la();else if(4==t)n=e.U(),e.skip(12);else if(5==t)break}n&&(i+="."+a9(n),5==t&&e.ta()&&(31==(n=(248&(t=e.U()))>>3)&&e.ta()&&(n=32+((7&t)<<3)+((224&e.U())>>5)),i+="."+n)),s.push(i),c=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(e){var t=o||"";switch(o){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+a9(e.U())+a9(e.U())+a9(e.U()),l.push(e),d=!0}).box("hvcC",function(e){var t=o||"";switch(o){case"dvh1":t="hvc1";break;case"dvhe":t="hev1"}var n=e.reader;n.skip(1);var i=["","A","B","C"][(e=n.U())>>6],r=31&e,a=n.R(),s=(32&e)>>5?"H":"L";e=[n.U(),n.U(),n.U(),n.U(),n.U(),n.U()],n=n.U();for(var u=0,c=0;32>c&&(u|=1&a,31!=c);c++)u<<=1,a>>=1;for(t=t+"."+i+r+"."+a9(u,!0)+("."+s)+n,i="",r=e.length;r--;)((s=e[r])||i)&&(i="."+s.toString(16).toUpperCase()+i);t+=i,l.push(t),d=!0}).box("dvcC",function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.U(),n=n.U(),l.push(t+"."+a7(e>>1&127)+"."+a7(e<<5&32|n>>3&31)),d=!0}).box("dvvC",function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.U(),n=n.U(),l.push(t+"."+a7(e>>1&127)+"."+a7(e<<5&32|n>>3&31)),d=!0}).S("vpcC",function(e){var t=o||"",n=e.reader;e=n.U();var i=n.U();n=n.U()>>4&15,l.push(t+"."+a7(e)+"."+a7(i)+"."+a7(n)),d=!0}).box("av1C",function(e){var t=o||"";"dav1"===o&&(t="av01");var n=e.reader;n.skip(1),e=n.U(),n=n.U();var i=e>>>5,r=(64&n)>>6;l.push(t+"."+i+"."+a7(31&e)+(n>>>7?"H":"M")+"."+a7(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+a7(1)+"."+a7(1)+"."+a7(1)+".0"),d=!0}).box("enca",rk).box("encv",rA).box("sinf",rT).box("frma",function(e){a(e=a8(e.reader).codec)}).box("colr",function(e){l=l.map(function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.xa(),r=n.Ab(4),a=String.fromCharCode(r[0]);if(a+=String.fromCharCode(r[1]),a+=String.fromCharCode(r[2]),"nclx"===(a+=String.fromCharCode(r[3]))){r=n.la(),a=n.la();var o=n.la(),s=n.U()>>7,u=t.split(".");10==u.length&&(u[6]=a7(r),u[7]=a7(a),u[8]=a7(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t});var t=function(e){var t=null,n=null,i=e.Ab(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),"nclx"===(r+=String.fromCharCode(i[3]))){switch(e.la()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.la(),e.la(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Kd:n}}(e.reader),n=t.colorGamut;v=t.Kd,y=n}).parse(e||t,!0),!s.length&&!l.length)return null;var b=c&&!d,w=new Map;if(d&&!n){n=new ev("video/mp4"),e&&n.init(e);try{n.i(t);for(var x=u(n.j()),T=x.next();!T.done;T=x.next()){var S=T.value;w.set(S,S)}}catch(e){}n.g()}return{type:b?"audio":"video",mimeType:b?"audio/mp4":"video/mp4",codecs:sk(s.concat(l)).join(", "),language:h,height:p,width:f,channelCount:g,sampleRate:m,closedCaptions:w,Kd:v,colorGamut:y,frameRate:null}}(es,eu,$.g.disableText)))return e.return(ef);return eo?e.return(sA(eo)):e.return(Z)})),3);case 3:o=(U=t.h).type,s=U.language,d=U.channelCount,g=U.sampleRate,e.g.disableText||(h=U.closedCaptions),P=U.height,D=U.width,L=U.Kd,N=U.colorGamut,j=U.frameRate,w&&(v=U.mimeType,a=U.codecs);case 2:if(v){t.u(4);break}return b(t,(eb=e,ew=o,ex=a,eT=M,R(function(e){switch(e.g){case 1:if(eS=rc,2==(eA=fn(eb,eT).segment).status)return e.return(ft(ew));if(eE=new nw((ek=eA.N())[0]).Ya.split(".").pop(),(eI=fm.get(ew).get(eE))||(eI=fd.get(eE))||(eI=fe(ew,ex)))return e.return(eI);return eD=1,eR=ro(ek,eb.g.retryParameters),x(e,2),eR.method="HEAD",b(e,fu(eb,eR,eS,{type:eD}).promise,4);case 4:eM=e.h.headers["content-type"],S(e,3);break;case 2:if(!(eP=A(e))||1002!=eP.code&&1001!=eP.code){e.u(3);break}return eR.method="GET",b(e,fu(eb,eR,eS,{type:eD}).promise,6);case 6:eM=e.h.headers["content-type"];case 3:return eM?e.return(eM.toLowerCase().split(";
1")[0]):e.return(ft(ew))}})),5);case 5:v=t.h,o!=nW||a||"application/mp4"!=v||!M[0]||M[0].ca||(v="text/vtt");case 4:return b(t,p1(e,i,v,r,n),6);case 6:if(_=(O=t.h).drmInfos,B=O.keyIds,F=O.encrypted,V=O.xg,F&&!_.length&&!V)throw new eC(2,4,4026);return(H=p0(e,a,o,s,l,c,d,h,p,f,g,m)).encrypted=F&&!V,H.drmInfos=_,H.keyIds=B,H.mimeType=v,C&&(H.bandwidth=C),pG(H),"video"==o&&(D||P||L||N)&&fi(H,D,P,j,L,null,N),fo(e)&&p4(e,i),G=M[0].startTime,K=M[M.length-1].endTime,H.segmentIndex=new st(M),z=!!(q=pS(i.Y,"EXT-X-SERVER-CONTROL"))&&null!=pm(q,"CAN-SKIP-UNTIL"),X=!!q&&null!=pm(q,"CAN-BLOCK-RELOAD"),Y=(W=pZ(pA(i.Y,"EXT-X-MEDIA-SEQUENCE",0),M)).yb,J=W.zb,t.return({stream:H,type:o,re:[],N:r,yc:G,Qb:K,Rd:z,Qd:X,nd:!1,gf:-1,yb:Y,zb:J,fe:E,Mf:!1})}})}function pZ(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{yb:++e,zb:n};var i=(t=t[t.length-1]).g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0)):(e++,t.m&&(n=0)),{yb:e,zb:n}}function p0(e,t,n,i,r,a,o,s,l,c,d,h){var p=fe(n,t)||ft(n),f=[];if(l){l=u(l.split(","));for(var g=l.next();!g.done;g=l.next())f.push(g.value)}return l=void 0,g=null,n==nW?l=f.includes("public.accessibility.transcribes-spoken-dialog")&&f.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":f.includes("public.accessibility.describes-video")&&(g="visually impaired"),f.length||"subtitle"!==l||f.push("subtitle"),pG(e={id:e.F++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:t,kind:n==nW?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:im(i||"und"),originalLanguage: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:f,forced:c,channelsCount:o,audioSamplingRate:d,spatialAudio:h,closedCaptions:s,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:g,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}),e}function p1(e,t,n,i,r){var a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,T,S,A,k,E,I,M,C,D,P,L,N;return R(function(R){switch(R.g){case 1:if(a=new Map,t.segments){for(s=(o=u(t.segments)).next();!s.done;s=o.next())if(c=px((l=s.value).Y,"EXT-X-KEY"),d=null,c.length)for(d=p6(e,t,l.Y,i,r),p=(h=u(c)).next();!p.done;p=h.next())f=p.value,a.set(f,d)}m=g=!1,v=[],y=new Set,x=(w=u(a)).next();case 2:if(x.done){R.u(4);break}if(S=(T=u(x.value)).next().value,A=T.next().value,k=S,E=A,"NONE"==(I=py(k,"METHOD"))){R.u(3);break}if(g=!0,M=pv(k,"KEYFORMAT")||"identity",C=null,fl(I)){m=!0,R.u(3);break}if("identity"!=M){C=(D=fy.get(M))?D(k,n):null,R.u(6);break}return b(R,fc(e,k,n,i,E,r),8);case 8:C=R.h;case 6:if(C){if(C.keyIds)for(L=(P=u(C.keyIds)).next();!L.done;L=P.next())N=L.value,y.add(N);v.push(C)}case 3:x=w.next(),R.u(2);break;case 4:return R.return({drmInfos:v,keyIds:y,encrypted:g,xg:m})}})}function p2(t,n,i,r,a){if(!e.crypto||!e.crypto.subtle)throw q("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new eC(2,4,4042);var o=0,s=pv(n,"IV","");if(s){var u=nB(s.substr(2));if(16!=u.byteLength)throw new eC(2,4,4048)}else o=pA(i.Y,"EXT-X-MEDIA-SEQUENCE",0);var l=pk(r(),py(n,"URI"),a),c=l.sort().join("");if(i=n.toString()+"-"+o+"-"+c,!t.ja.has(i)){var d={bitsKey:128,blockCipherMode:"CBC",iv:u,firstMediaSequenceNumber:o};switch(py(n,"METHOD")){case"AES-256":d.bitsKey=256;break;case"AES-256-CTR":d.bitsKey=256,d.blockCipherMode="CTR"}d.fetchKey=function(){var n,i,r,a;return R(function(o){if(1==o.g)return t.L.has(c)||(n=ro(l,t.g.retryParameters),i=fu(t,n,6).promise,t.L.set(c,i)),b(o,t.L.get(c),2);if(3!=o.g){if(!(r=o.h).data||r.data.byteLength!=d.bitsKey/8)throw new eC(2,4,4049);return a={name:"CTR"==d.blockCipherMode?"AES-CTR":"AES-CBC",length:d.bitsKey},b(o,e.crypto.subtle.importKey("raw",r.data,a,!0,["decrypt"]),3)}d.cryptoKey=o.h,d.fetchKey=void 0,w(o)})},t.ja.set(i,d)}return t.ja.get(i)}function p3(e,t){null==e.s&&(t=pS(t.Y,"EXT-X-START"))&&(e.s=Number(py(t,"TIME-OFFSET")))}function p4(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var a=pS(i[r].Y,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}r--}if(!(i=pS(t.Y,"EXT-X-TARGETDURATION")))throw new eC(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=pS(t.Y,"EXT-X-PART-INF"))&&(e.P=Number(py(r,"PART-TARGET"))),t=pS(t.Y,"EXT-X-SERVER-CONTROL"),e.ia&&e.P?(e.o=e.Pb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Da=t?Number(py(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),e.wa=(n=t?pm(t,"HOLD-BACK"):null)?Number(n.value):0),e.Ma=Math.max(i,e.Ma)}function p5(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Da)n=e.Da;else if(e.wa)n=e.wa;else{var i=t.segments.length,r=e.g.hls.liveSegmentsDelay;for(r>i-2&&(r=Math.max(1,i-2)),r=i-r;r<i;r++){var a=pS(t.segments[r].Y,"EXTINF");n=a?n+Math.ceil(Number(a.value.split(",")[0])):n+e.Ma}}e.s&&0>e.s&&(n=Math.min(-e.s,n),e.s+=n),e.l.qh(0),e.l.fg(n),e.l.Cc(!1)}function p6(e,t,n,i,r){var a=pS(n,"EXT-X-MAP");if(!a)return null;var o=py(a,"URI"),s=pk(i(),o,r);if(o=[s.toString(),pv(a,"BYTERANGE","")].join("-"),!e.sa.has(o)){var l,c,d,h,p,f,g,m=void 0,v=null,y=!1;n=u(n);for(var b=n.next();!b.done;b=n.next())"EXT-X-KEY"==(b=b.value).name?fl(y=py(b,"METHOD"))&&b.id<a.id?(y=!1,m=p2(e,b,t,i,r)):y="NONE"!=y:"EXT-X-BYTERANGE"==b.name&&b.id<a.id&&(v=b);l=s,c=a,d=v,h=m,p=y,f=0,g=null,(c=pv(c,"BYTERANGE"))||!d||(c=d.value),
1c&&(g=Number((f=c.split("@"))[0]),g=(f=Number(f[1]))+g-1,h&&(d=g+1-f)%16&&(g+=16-d%16)),t=new aO(function(){return l},f,g,null,null,null,h,p),e.sa.set(o,t)}return e.sa.get(o)}function p8(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.endByte+1)+t-1),[n,i]}function p9(e,t,n,i,r){if("video"==n||"audio"==n){var a=e.l.m;if(a&&!p$(e,n))for(t=(t=px(t,"EXT-X-DATERANGE")).filter(function(e){return null!=pm(e,"START-DATE")}).sort(function(e,t){return(e=py(e,"START-DATE"))<(t=py(t,"START-DATE"))?-1:+(e>t)}),n=0;n<t.length;n++){var o=t[n];try{var s=py(o,"ID");if(!e.Ba.has(s)){var l=py(o,"START-DATE"),c=tN(l);if(!isNaN(c)){var d=Math.max(0,c-a),h=null,p=pv(o,"END-DATE");if(p){var f=tN(p);if(!isNaN(f)&&(h=f-a,0>h))continue}if(null==h){var g=pv(o,"DURATION")||pv(o,"PLANNED-DURATION");if(g){var m=parseFloat(g);if(isNaN(m)||(h=d+m),0>c-a+m)continue}}var v=pv(o,"CLASS")||"com.apple.quicktime.HLS",y="YES"==pv(o,"END-ON-NEXT");if(null==h&&y){for(var b=n+1;b<t.length;b++){var w=pv(t[b],"CLASS")||"com.apple.quicktime.HLS";if(v==w){var x=py(t[b],"START-DATE"),T=tN(x);if(!isNaN(T)&&T&&T>c){h=Math.max(0,T-a);break}}}if(null==h)continue}b=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var S=[],A=u(o.attributes),k=A.next();!k.done;k=A.next()){var E=k.value;if(!b.includes(E.name)){var I=pI(E.value,i);("X-ASSET-URI"==E.name||"X-ASSET-LIST"==E.name)&&(I=pk(r(),E.value,i)[0]),S.push({key:E.name,description:"",data:I,mimeType:null,pictureType:null})}}1<S.length&&e.h.onMetadata(v,d,h,S),e.Ba.add(s)}}}catch(e){}}}}function p7(t,n,i,r,a,o){var s=n.segments,l=void 0,c=pA(n.Y,"EXT-X-DISCONTINUITY-SEQUENCE",-1),d=pA(n.Y,"EXT-X-MEDIA-SEQUENCE",0),h=pS(n.Y,"EXT-X-SKIP"),p=h?Number(pv(h,"SKIPPED-SEGMENTS")):0,f=d+p,g=0;fo(t)&&i.has(f)&&(g=i.get(f)),0===g&&t.Ca==fx&&0<i.size&&!i.has(f)&&null!=t.l.i&&(g=t.l.mb());var m=[],v=null;h=[];for(var y=0;y<s.length;y++){var b=s[y],w=0==y?g:v.endTime;f=d+p+y,pS(b.Y,"EXT-X-DISCONTINUITY")&&c++;for(var x=u(b.Y),T=x.next();!T.done;T=x.next())"EXT-X-KEY"==(T=T.value).name&&(l=fl(py(T,"METHOD"))?p2(t,T,n,a,r):void 0);i.set(f,w),x=p6(t,n,b.Y,a,r),(w=function(t,n,i,r,a,o,s,l,c){function d(e){e=new nw(e).Ya.split(".").pop();var t=fm.get(s).get(e);return t||(t=fd.get(e)),t}var h=r.Y,p=pS(h,"EXTINF"),f=0,g=0,m=null;r.Gb.length&&(t.m.isLowLatency=!0);var v=null;if(!t.g.hls.ignoreManifestProgramDateTime){var y=pS(h,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=tN(y.value),t.Oa=!0)}var b=aF;if(pS(h,"EXT-X-GAP")&&(t.m.gapCount++,b=2),!p){if(0==r.Gb.length)throw new eC(2,4,4024,"EXTINF");if(!t.ia)return null}var w=[];y=!1;var x=null,T=!1,S=!1;if(t.ia&&r.Gb.length){f=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var A=v,k={},E=0;E<r.Gb.length;k={Ge:void 0,ne:void 0},E++){var I=r.Gb[E],M=0==E?i:w[w.length-1],C=0==E?a:M.endTime,D=Number(pv(I,"DURATION"))||t.P;if(D){var R=C+D,P=0,L=null;if("EXT-X-PRELOAD-HINT"==I.name?(P=(P=pv(I,"BYTERANGE-START"))?Number(P):0,(M=pv(I,"BYTERANGE-LENGTH"))?L=P+Number(M)-1:P&&(L=Number.MAX_SAFE_INTEGER)):(P=(L=u(p8(M,P=pv(I,"BYTERANGE")))).next().value,L=L.next().value),k.ne=pv(I,"URI"),k.ne){M=aF,"YES"==pv(I,"GAP")&&(t.m.gapCount++,M=2,T=!0),k.Ge=null;var N=function(e){return function(){return null==e.Ge&&(e.Ge=pk(l(),e.ne,o)),e.Ge}}(k);f&&0<=P&&null!=L&&(x=N,y=!0),C=new aB(C,R,N,P,L,n,0,0,1/0,[],"",null,A,M,c),"EXT-X-PRELOAD-HINT"==I.name&&(C.Nf(),S=!0),"YES"!=pv(I,"INDEPENDENT")&&0<E&&C.Rc(),(k=d(k.ne))&&(C.mimeType=k,fv.has(k)&&(C.ca=null)),w.push(C),A&&(A+=D)}}}}if(p){if(0==(p=Number(p.value.split(",")[0])))return null;f=a+p}else{if(!w.length)return null;f=w[w.length-1].endTime}y&&(T||0!=w[0].startByte?(y=!1,x=null):w=[]),(p=pS(h,"EXT-X-BYTERANGE"))?(g=(m=u(p8(i,p.value))).next().value,m=m.next().value):w.length&&(g=w[0].startByte,m=w[w.length-1].endByte),i="",p=null,"image"==s&&(i="1x1",h=pS(h,"EXT-X-TILES"))&&(i=py(h,"LAYOUT"),(h=pv(h,"DURATION"))&&(p=Number(h)));var j=null;return n=new aB(a,f,function(){return x?x():(null==j&&(j=pk(l(),r.g,o)),j||[])},g,m,n,0,0,1/0,w,i,p,v,b,c,0<w.length&&!!r.g),(a=d(r.g))&&(n.mimeType=a,fv.has(a)&&(n.ca=null)),y&&(t.Pb=!0,n.Xg(),S&&n.Nf()),n}(t,x,v,b,w,r,o,a,l))&&((v=pA(b.Y,"EXT-X-BITRATE"))?h.push({bitrate:v,duration:w.endTime-w.startTime}):h.length&&(v=h.pop(),v.duration+=w.endTime-w.startTime,h.push(v)),v=w,w.i=c,p$(t,o)&&null!=t.K&&f<t.K||m.push(w))}if(n=void 0,h.length&&(n=h.reduce(function(e,t){return e+t.duration},0),n=Math.round(h.reduce(function(e,t){return e+t.bitrate*t.duration},0)/n*1e3)),h=m.some(function(e){return null!=e.h})){for(i={},r=0;r<m.length;i={Vd:void 0,Ud:void 0,Nd:void 0,Ac:void 0,Md:void 0},r++)if(i.Ac=m[r],null==i.Ac.h)for(i.Ud=0,i.Vd=r,a=function(e){return function(){var t=m[e.Vd];if(t){if(null!=t.h)return t.h+e.Ud;e.Ud-=t.endTime-t.startTime,e.Vd+=1}return null}}(i),i.Md=0,i.Nd=r,s=function(e){return function(){var t=m[e.Nd];
1if(t){if(t!=e.Ac&&(e.Md+=t.endTime-t.startTime),null!=t.h)return t.h+e.Md;--e.Nd}return null}}(i);null==i.Ac.h;)i.Ac.h=s(),null==i.Ac.h&&(i.Ac.h=a())}if(h)for(r=(i=u(m)).next();!r.done;r=i.next())for(r=(a=r.value).h,s=(a=u(a.g)).next();!s.done;s=a.next())(s=s.value).h=r,r+=s.endTime-s.startTime;if(i=t.ga,h&&1/0!=i&&!p$(t,o))for(o=(t=u(m)).next();!o.done;o=t.next())o.value.lg(i);return{segments:m,bandwidth:n}}function fe(e,t){if(e==nW){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":"mjpg"==t?"application/mp4":null:"image/jpeg"}function ft(e){return e==nW?"text/vtt":fm.get(e).get("mp4")}function fn(e,t){e=fo(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];2==n.ac()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function fi(e,t,n,i,r,a,o){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=a||void 0,e.colorGamut=o||void 0)}function fr(e,t,n){return fu(e,ro(t,e.g.retryParameters),0,{type:n?2:3})}function fa(e){var t,n,i,r,a;return R(function(o){switch(o.g){case 1:if(!e.h)return o.return();return x(o,2),t=Date.now(),b(o,e.update(),4);case 4:n=Date.now(),fo(e)&&(i=(n-t)/1e3,e.Mb.sample(1,i),r=Math.max(0,(0<e.g.hls.updatePeriod?e.g.hls.updatePeriod:e.o)-V(e.Mb)),e.B.$(r)),S(o,3);break;case 2:if(a=A(o),!e.h)return o.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(a),o.return();a.severity=1,e.h.onError(a),e.B.$(.1);case 3:if(!e.h)return o.return();e.h.onManifestUpdated(),w(o)}})}function fo(e){return e.Ca!=fb}function fs(e,t){e.Ca=t,e.l&&e.l.Cc(!fo(e)),fo(e)||e.B.stop()}function fu(e,t,n,i){if(!e.ba)throw new eC(2,7,7001);return i||(i={}),i.isPreload=e.Nb(),t=e.h.networkingEngine.request(n,t,i),rn(e.ba,t),t}function fl(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function fc(t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,v,y;return R(function(w){switch(w.g){case 1:if("video/mp2t"==i)throw new eC(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eC(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s=py(n,"METHOD")))return w.return(null);if((u=pk(r(),py(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=nF(n_(u[0].split("data:text/plain;base64,").pop())),w.u(2);break}return c=u.sort().join(""),t.ma.has(c)||(d=ro(u,t.g.retryParameters),h=fu(t,d,6).promise,t.ma.set(c,h)),b(w,t.ma.get(c),3);case 3:l=nF(w.h.data);case 2:if(p="00000000000000000000000000000000",!a){w.u(4);break}if(t.oa.has(a)){f=t.oa.get(a),w.u(5);break}return g=sI(a.N(),a.$b(),a.Yb(),t.g.retryParameters),b(w,fu(t,g,rc,{type:0}).promise,6);case 6:var x,T;m=w.h,a.Hd(m.data),x=m.data,T=null,(new rx).box("moov",rT).box("trak",rT).box("mdia",rT).box("minf",rT).box("stbl",rT).S("stsd",rS).box("encv",rA).box("enca",rk).box("sinf",rT).box("schi",rT).S("tenc",function(e){(e=e.reader).U(),e.U(),e.U(),e.U(),T=nF(e.Ab(16))}).parse(x,!0),f=T,t.oa.set(a,f);case 5:f&&(p=f);case 4:return(v=new Map).set(p,l),y="cenc","SAMPLE-AES"==s&&(y="cbcs"),w.return(nK(v,y))}})}B("shaka.net.DataUriPlugin",pL),pL.parse=pN,rr("data",pN),(c=pU.prototype).configure=function(e,t){var n=this.h&&e.hls.updatePeriod!=this.g.hls.updatePeriod&&0<=e.hls.updatePeriod;this.g=e,t&&(this.Nb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.T()&&this.B.pb()},c.start=function(e,t){var n,i=this;return R(function(r){var a,o,s,c,d,h,p,f,g,m,v,y,T,S,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,q,z,X,W,Y,J,$,Q,Z,ee,et;return 1==r.g?(i.h=t,i.ia=t.isLowLatencyMode(),b(r,fr(i,[e]).promise,2)):3!=r.g?(i.C=(n=r.h).uri,b(r,(a=i,o=n.data,R(function(e){var t,n,i,r,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,ex,eT,eS,eA,ek,eI,eM,eD,eR,eL,eN,ej,eU,eO,e_,eB,eF,eV,eH,eG,eK,eq,ez,eX,eW,eY,eJ,e$,eQ,eZ,e0,e1,e2;switch(e.g){case 1:if(s=nY,d=px((c=pC(a.Ia,o)).Y,"EXT-X-DEFINE"),h=[],p=[],f=[],a.l=new oq(null,0),a.l.Cc(!0),g=function(){return[a.C]},m=null,v=new Map,1==c.type)return a.O=!1,v=pH(a,px(c.Y,"EXT-X-DEFINE"),a.C),m=s.na,q="",z=new Map,b(e,pQ(a,a.F++,v,c,g,"",m,q,!0,"Media Playlist",null,z,null,!1,null,!1),7);return function(e,t){var n=new nw(e.C).g;t=u(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=pv(r,"NAME");var a=pv(r,"VALUE");r=pv(r,"QUERYPARAM"),i&&a&&(e.A.has(i)||e.A.set(i,a)),r&&(i=n.get(r)[0])&&!e.A.has(i)&&e.A.set(r,i)}}(a,d),y=px(c.Y,"EXT-X-MEDIA"),T=px(c.Y,"EXT-X-STREAM-INF"),S=px(c.Y,"EXT-X-IMAGE-STREAM-INF"),k=px(c.Y,"EXT-X-I-FRAME-STREAM-INF"),E=px(c.Y,"EXT-X-SESSION-KEY"),I=px(c.Y,"EXT-X-SESSION-DATA"),M=px(c.Y,"EXT-X-CONTENT-STEERING"),function(e,t){t=u(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=pv(i,"DATA-ID");n=pv(i,"URI");var a=pv(i,"LANGUAGE");i=pv(i,"VALUE"),r=(new Map).set("id",r),n&&r.set("uri",pk([e.C],n,e.A)[0]),a&&r.set("language",a),i&&r.set("value",i),n=new i8("sessiondata",r),e.h&&e.h.onEvent(n)}}(a,I),b(e,(t=a,n=M,R(function(e){if(!t.h||!t.g)return e.return();for(en=(r=u(n)).next();!en.done;en=r.next())if(er=pv(ei=en.value,"PATHWAY-ID"),ea=pv(ei,"SERVER-URI"),er&&ea){t.j=new hy(t.h),t.j.configure(t.g),t.j.i=[t.C],t.j.setManifestType("HLS"),t.j.h=er,i=hb(t.j,ea);break}return b(e,i,0)})),4);case 4:if(!a.g.hls.ignoreSupplementalCodecs){for(C=[],P=(D=u(T)).next(),L={};!P.done;L={yh:void 0},P=D.next())(j=pv(N=P.value,"SUPPLEMENTAL-CODECS"))&&(L.yh=j.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),U=N.attributes.map(function(e){return function(t){var n=t.name,i=t.value;return"CODECS"==n&&(i=e.yh.join(","),1<(t=t.value.split(",")).length&&(t=nz("audio",t))&&(i+=","+t)),new pw(n,i)}}(L)),C.push(new pf(N.id,N.name,U,null)));for(T.push.apply(T,l(C)),O=[],B=(_=u(k)).next(),F={};
1!B.done;F={zh:void 0},B=_.next())(H=pv(V=B.value,"SUPPLEMENTAL-CODECS"))&&(F.zh=H.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),G=V.attributes.map(function(e){return function(t){var n=t.name;return t=t.value,"CODECS"==n&&(t=e.zh.join(",")),new pw(n,t)}}(F)),O.push(new pf(V.id,V.name,G,null)));k.push.apply(k,l(O))}return function(e,t){t=u(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=pv(i,"AUDIO");n=pv(i,"VIDEO");var a=pv(i,"SUBTITLES");if(i=pK(e,i),a){var o=nz(nW,i);e.H.set(a,o),eE(i,o)}r&&((a=nz("audio",i))||(a=e.g.hls.defaultAudioCodec),e.H.set(r,a)),n&&((r=nz("video",i))||(r=e.g.hls.defaultVideoCodec),e.H.set(n,r))}}(a,T),function(e,t){e.O=0==(t=pT(t,"CLOSED-CAPTIONS")).length,t=u(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=pv(i,"LANGUAGE");n=im(r||"und"),r||(r=pv(i,"NAME"))&&(n=r),r=py(i,"GROUP-ID"),i=py(i,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(r)||e.G.set(r,new Map),e.G.get(r).set(i,n)}}(a,y),eo=a,K=(es=k).map(function(e){return"video"!==(e=pz(eo,e)).stream.type?null:e.stream}).filter(function(e){return e}),b(e,(eu=a,el=T,ec=E,ed=y,eh=g,ep=a.A,ef=K,R(function(e){switch(e.g){case 1:if(eg=[],em=new Set,!(0<ec.length)){e.u(2);break}ey=(ev=u(ec)).next();case 3:if(ey.done){e.u(2);break}if(ew=py(eb=ey.value,"METHOD"),ex=pv(eb,"KEYFORMAT")||"identity",eT=null,"NONE"==ew){e.u(4);break}if(fl(ew)){eA=(eS=pk(eh(),py(eb,"URI"),ep)).sort().join(""),eu.L.has(eA)||(ek=ro(eS,eu.g.retryParameters),eI=fu(eu,ek,6).promise,eu.L.set(eA,eI)),e.u(4);break}if("identity"!=ex){eT=(eM=fy.get(ex))?eM(eb,""):null,e.u(6);break}return b(e,fc(eu,eb,"",eh,null,ep),9);case 9:eT=e.h;case 6:if(eT){if(eT.keyIds)for(eR=(eD=u(eT.keyIds)).next();!eR.done;eR=eD.next())eL=eR.value,em.add(eL);eg.push(eT)}case 4:ey=ev.next(),e.u(3);break;case 2:for(eN={},eU=(ej=u(el)).next();!eU.done;eU=ej.next())eN[e_=pg(eO=eU.value,!eu.j)]?eN[e_].push(eO):eN[e_]=[eO];for(eF in eB=[],eN)eG=pv(eH=(eV=eN[eF])[0],"FRAME-RATE"),eK=Number(pv(eH,"AVERAGE-BANDWIDTH"))||Number(py(eH,"BANDWIDTH")),eX=(ez=u((eq=pv(eH,"RESOLUTION"))?eq.
1split("x"):[null,null])).next().value,eW=ez.next().value,eY=pv(eH,"VIDEO-RANGE"),(eJ=pv(eH,"REQ-VIDEO-LAYOUT"))&&eJ.includes(",")&&(eJ=eJ.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e})[0]),eJ=eJ||"CH-MONO",e$=function(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,c=u(t),d=c.next();!d.done;d=c.next()){var h=d.value;d=pv(h,"AUDIO");var p=pv(h,"VIDEO"),f=d||p;f&&(a.includes(f)||a.push(f),(h=pv(h,"PATHWAY-ID"))&&r.set(f,h),d?o=!0:p&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter(function(e){var t=pv(e,"URI")||"";return"SUBTITLES"!=(e=pv(e,"TYPE"))&&(""!=t||"AUDIO"==e)});var i={};t=u(t);for(var r=t.next();!r.done;r=t.next()){var a=pg(r=r.value,!e.j);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)pq(e,i[o],n,!1)}(e,n=n.filter(function(e){return a.includes(py(e,"GROUP-ID"))}),r),n=(r=a.sort().join(","))&&e.I.has(r)?e.I.get(r):[],o?i.audio.push.apply(i.audio,l(n)):s&&i.video.push.apply(i.video,l(n)),o=!1;var g=t.map(function(e){return py(e,"URI")});return d=i.audio.find(function(e){return e&&e.N().find(function(e){return g.includes(e)})}),n=nz("video",s=pK(e,t[0])),(c=nz("audio",s))&&!n?(d="audio",o=0<i.audio.length):!i.audio.length&&!i.video.length&&c&&n?(d="video",s=[[n,c].join()]):i.audio.length&&d?(d="audio",o=!0):d=i.video.length&&!i.audio.length?"audio":"video",o||(e=function(e,t,n,i){for(var r=e.F++,a=[],o=u(t),s=o.next();!s.done;s=o.next()){var l=s.value;s=py(l,"URI"),l=pv(l,"PATHWAY-ID"),e.j&&l&&hw(e.j,r,l,s),a.push(s)}if(o=a.sort().join(",")+n.sort().join(","),e.i.has(o))return e.i.get(o);s=a.join(",");e:{if(t=pv(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if("NONE"!=t){t=e.G.get(t);break e}e.O=!1}else if(!t&&e.G.size)for(t=u(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return i=pX(e,r,a,n=nq(i,n),i,null,!1,s,null,t,null,!1,null,!1),e.i.set(o,i),i}(e,t,s,d),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}(eu,eV,ed),eB.push.apply(eB,l(function(e,t,n,i,r,a,o,s,l,c,d,h){for(var p=u(n),f=p.next();!f.done;f=p.next())fi(f.value.stream,r,a,o,s,l,null);for(r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r=[],a=(t=u(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=u(n)).next();!s.done;s=o.next()){var g=s.value;(s=a?a.stream:null)&&(s.drmInfos=c,s.keyIds=d),(l=g?g.stream:null)&&(l.drmInfos=c,l.keyIds=d,e.g.disableIFrames||iV(l,h)),l&&!s&&(l.bandwidth=i),!l&&s&&(s.bandwidth=i),p=a?a.stream.drmInfos:null,f=g?g.stream.drmInfos:null,g=g?g.N().sort().join(","):"";var m=a?a.N().sort().join(","):"",v=[];s&&s.codecs&&v.push(s.codecs),l&&l.codecs&&v.push(l.codecs),g=[g,m,v.sort()].join("-"),s&&l&&!eP(p,f)||e.Cb.has(g)||(s={id:e.F++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!l&&l.primary,audio:s,video:l,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.Cb.add(g))}return r}(eu,e$.audio,e$.video,eK,eX,eW,eG,eY,eJ,eg,em,ef)));return e.return(eB.filter(function(e){return null!=e}))}})),5);case 5:return h=e.h,p=function(e,t){var n=pT(t,"SUBTITLES");t=n.map(function(t){if(e.g.disableText)return null;try{return pq(e,[t],new Map).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}),n=u(n);for(var i=n.next();!i.done;i=n.next()){var r=py(i.value,"GROUP-ID");if((i=e.H.get(r))&&(r=e.I.get(r))){r=u(r);for(var a=r.next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=fe(nW,i)||ft(nW),pG(a.stream)}}return t.filter(function(e){return e})}(a,y),b(e,(eQ=a,eZ=S,e0=k,R(function(e){return 1==e.g?(e1=eZ.map(function(e){var t,n;return R(function(i){if(1==i.g){var r,a,o,s,u,l,c,d,h,p,f;return eQ.g.disableThumbnails?i.return(null):(x(i,2),b(i,(r=eQ,a=e,R(function(e){return 1==e.g?(o=py(a,"URI"),s=pv(a,"CODECS","jpeg")||"",r.i.has(o))?e.return(r.i.get(o)):(u=pv(a,"LANGUAGE"),l=pv(a,"NAME"),c=pv(a,"CHARACTERISTICS"),d=pX(r,r.F++,[o],s,"image",u,!1,l,null,null,c,!1,null,!1),(h=pv(a,"RESOLUTION"))?b(e,d.stream.createSegmentIndex(),3):e.u(2)):(2!=e.g&&(p=sn(d.stream.segmentIndex).tilesLayout)&&(d.stream.width=Number(h.split("x")[0])*Number(p.split("x")[0]),d.stream.height=Number(h.split("x")[1])*Number(p.split("x")[1])),(f=pv(a,"BANDWIDTH"))&&(d.stream.bandwidth=Number(f)),r.i.set(o,d),e.return(d))})),4))}if(2!=i.g)return t=i.h,i.return(t.stream);if(n=A(i),eQ.g.hls.ignoreImageStreamFailures)return i.return(null);throw n})}).concat(e0.map(function(e){if(eQ.g.disableThumbnails)return null;try{var t=pz(eQ,e);return"image"!==t.stream.type?null:t.stream}catch(e){if(eQ.g.hls.ignoreImageStreamFailures)return null;throw e}})),b(e,Promise.all(e1),2)):(e2=e.h,e.return(e2.filter(function(e){return e})))})),6);case 6:f=e.h,e.u(3);break;case 7:X=e.h,a.i.set(a.C,X),X.stream&&(W=sh(X.stream),X.stream.segmentIndex.vb(function(e){e.ca&&(e.ca.Sc=W)})),m=X.stream.type,Y=!0,a.g.disableAudio&&"audio"==X.type?Y=!1:a.g.disableVideo&&"video"==X.type&&!X.stream.codecs.includes(",")&&(Y=!1),Y&&h.push({id:0,language:im(q||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==X.type?X.stream:null,video:"video"==X.type?X.stream:null,bandwidth:X.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new eC(2,7,7001);if(p3(a,c),1==c.type&&(fo(a)&&(p5(a,c),J=a.o,a.B.$(J)),$=Array.from(a.i.values()),pJ(a,$),pV(a),p9(a,c.Y,m,v,g)),a.m={presentationTimeline:a.l,variants:h,textStreams:p,imageStreams:f,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s},a.da||!a.g.hls.disableCodecGuessing){e.u(8);break}
1for(Q=[],ee=(Z=u(a.m.variants)).next();!ee.done;ee=Z.next())(et=ee.value).audio&&""===et.audio.codecs&&Q.push(et.audio.createSegmentIndex()),et.video&&""===et.video.codecs&&Q.push(et.video.createSegmentIndex());return b(e,Promise.all(Q),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),w(e)}})),3)):r.return(i.m)})},c.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.ba&&(e.push(this.ba.destroy()),this.ba=null),this.g=this.h=null,this.Cb.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.A.clear(),this.sa.clear(),this.ja.clear(),this.L.clear(),this.ma.clear(),this.oa.clear(),this.Ba.clear(),this.j&&this.j.destroy(),this.W&&(this.W.release(),this.W=null),Promise.all(e)},c.update=function(){var e,t,n,i,r,a,o,s,c,d,h,p=this;return R(function(f){if(1==f.g){if(!fo(p))return f.return();for(e=[],t=Array.from(p.i.values()),p.o=1/0,p.m.gapCount=0,r=(i=u(n=t.filter(function(e){return e.stream.segmentIndex}))).next();!r.done;r=i.next())a=r.value,e.push(function(e,t){var n,i,r,a,o,s,c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N,j,U,O,_,B,F,V;return R(function(R){var H,G,K;switch(R.g){case 1:if(t.stream.isAudioMuxedInVideo)return R.return();for(n=[],r=(i=u(t.N())).next();!r.done;r=i.next())o=(a=new nw(r.value)).g,t.Qd&&(0<=t.yb&&o.add("_HLS_msn",String(t.yb)),0<=t.zb&&o.add("_HLS_part",String(t.zb))),t.Rd&&o.add("_HLS_skip","YES"),nN(H=o),H.fd&&nA(a,nk(o.toString())),n.push(a.toString());return x(R,2),b(R,fr(e,n,!0).promise,4);case 4:s=R.h,S(R,3);break;case 2:throw c=A(R),e.h&&e.h.disableStream(t.stream),c;case 3:if(!t.stream.segmentIndex)return R.return();if(1!=(d=pC(e.Ia,s.data)).type)throw new eC(2,4,4017);
1return(h=s.uri)==s.originalUri||t.N().includes(h)||t.re.push(h),p=pH(e,px(d.Y,"EXT-X-DEFINE"),h),f=t.stream,g=pO(e,t),b(R,p1(e,d,f.mimeType,t.N,p),5);case 5:for(v=(m=R.h).keyIds,y=m.drmInfos,T=m.encrypted,k=m.xg,f.encrypted||!T||k||(f.encrypted=!0),G=f.keyIds,K=v,G.size===K.size&&[].concat(l(G)).every(function(e){return K.has(e)})||(f.keyIds=v,f.drmInfos=y,e.h.newDrmInfo(f)),I=(E=p7(e,d,g,p,t.N,t.type)).segments,(M=E.bandwidth)&&(f.bandwidth=M),C=sh(f),P=(D=u(I)).next();!P.done;P=D.next())(L=P.value).ca&&(L.ca.Sc=C);f.segmentIndex.xd(I,e.l.mb()),I.length&&(N=pA(d.Y,"EXT-X-MEDIA-SEQUENCE",0),U=(j=pS(d.Y,"EXT-X-SKIP"))?Number(pv(j,"SKIPPED-SEGMENTS")):0,_=(O=pZ(N,I)).yb,B=O.zb,t.yb=_+U,t.zb=B,F=g.get(N),f.segmentIndex.Ja(F)),(V=sn(f.segmentIndex))&&(t.yc=V.startTime,t.Qb=I[I.length-1].endTime),pS(d.Y,"EXT-X-ENDLIST")&&(t.nd=!0),p4(e,d),p9(e,d.Y,f.type,p,t.N),w(R)}})}(p,a));return b(f,Promise.all(e),2)}for(pY(p,n.map(function(e){return e.stream})),o=n.some(function(e){return 0==e.nd}),n.length&&!o&&(fs(p,fT.Hh),s=n.map(function(e){return e.Qb}),p.l.Za(Math.min.apply(Math,l(s))),p.h.updateDuration()),o&&pV(p),d=(c=u(n)).next();!d.done;d=c.next())(h=d.value).stream.isAudioMuxedInVideo||!h.stream.segmentIndex||sn(h.stream.segmentIndex)||p.h.disableStream(h.stream);w(f)})},c.onExpirationUpdated=function(){},c.onInitialVariantChosen=function(){},c.banLocation=function(e){this.j&&this.j.banLocation(e)},c.setMediaElement=function(e){this.aa=e},B("shaka.hls.HlsParser",pU);var fd=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),fh=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),fp=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),ff=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),fg=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),fm=(new Map).set("audio",fh).set("video",fp).set("text",ff).set("image",fg),fv=new Set(["video/mp2t"].concat(l(n7))),fy=(new Map).set("com.apple.streamingkeydelivery",function(t,n){if("video/mp2t"==n)throw new eC(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eC(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n=py(t,"METHOD")))return null;var i="cenc";return"SAMPLE-AES"==n&&(i="cbcs"),nG("com.apple.fps",i,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],py(t,"URI"))}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(e){var t=py(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),n=nG("com.widevine.alpha",n,[{initDataType:"cenc",initData:t=eh((t=pj((t=py(e,"URI")).split("?")[0])).data)}]),(e=pv(e,"KEYID"))&&(n.keyIds=new Set([e.toLowerCase().substr(2)])),n}).set("com.microsoft.playready",function(e){var t=py(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),e=eh((e=pj((e=py(e,"URI")).split("?")[0])).data),n=nG("com.microsoft.playready",n,[{initDataType:"cenc",initData:t=rL(e,t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]),(e=tw(["<PLAYREADY>",nO(e),"</PLAYREADY>"].join("\n")))&&(n.licenseServerUri=dQ(e)),n}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(e){var t=py(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),n=nG("com.huawei.wiseplay",n,[{initDataType:"cenc",initData:t=eh((t=pj((t=py(e,"URI")).split("?")[0])).data)}]),(e=pv(e,"KEYID"))&&(n.keyIds=new Set([e.toLowerCase().substr(2)])),n}),fb="VOD",fw="EVENT",fx="LIVE",fT={Hh:fb};function fS(e){return dQ(e)}as("application/x-mpegurl",function(){return new pU}),as("application/vnd.apple.mpegurl",function(){return new pU});var fA=(new Map).set("com.microsoft.playready",fS).set("com.microsoft.playready.recommendation",fS).set("com.microsoft.playready.softw
1are",fS).set("com.microsoft.playready.hardware",fS);function fk(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.C=new F(5),this.o=new eB(function(){var t,n;t=e,R(function(e){switch(e.g){case 1:return x(e,2),b(e,fE(t),4);case 4:S(e,3);break;case 2:n=A(e),t.h&&(n.severity=1,t.h.onError(n));case 3:if(!t.h)return e.return();w(e)}})}),this.B=new rt,this.m=new Map,this.A=function(){return!1}}function fE(e){var t,n,i,r,a,o;return R(function(s){if(1==s.g)return t=ro(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),rn(e.B,r),b(s,r.promise,2);if(a=s.h,!e.h)return s.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var c=a.uri,d=a.data,h=e.g.mss.manifestPreprocessor;if(h!=s9){if(ei("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(d=h1(d,"SmoothStreamingMedia")))throw new eC(2,4,4046,c);h(d),d=ta(d.outerHTML)}var p=tb(d,"SmoothStreamingMedia");if(!p)throw new eC(2,4,4046,c);if((c=e.g.mss.manifestPreprocessorTXml)!=s7&&c(p),e.i||(e.i=new oq(null,0)),c=tD(p,"IsLive",tV,!1))throw new eC(2,4,4047);e.i.Cc(!c),h=tD(p,"TimeScale",tB,1e7),d=tD(p,"DVRWindowLength",tB),c&&(0===d||isNaN(d))&&(d=1/0);var f=tD(p,"CanSeek",tV,!1);for(0===d&&f&&(d=1/0),f=null,d&&0<d&&(f=d/h),c&&!isNaN(e.g.availabilityWindowOverride)&&(f=e.g.availabilityWindowOverride),null==f&&(f=1/0),e.i.xe(f),d=tD(p,"Duration",tB,1/0),c||e.i.Za(d/h),c={variants:[],textStreams:[],timescale:h,duration:d/h},f=tA(p,"Protection"),h=e.g.mss.keySystemsBySystemId,d=[],g=(f=u(f)).next();!g.done;g=f.next())d=d.concat(tA(g.value,"ProtectionHeader"));if(d.length){for(g=0,f=[];g<d.length;g++){var g,m,v=d[g],y=v.attributes.SystemID.toLowerCase(),x=h[y];if(x){e:{if(m=d$(v)){m=u(tI(m,"DATA"));for(var T=m.next();!T.done;T=m.next())if(T=tM(T.value,"KID")){m=nF(m=new Uint8Array([(m=n_(tk(T)))[3],m[2],m[1],m[0],m[5],m[4],m[7],m[6]].concat(l(m.slice(8)))));break e}}m=null}T=n_(tk(v)),y=nG(x,"cenc",y=[{initData:rL(T,y=nB(y.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:m}]),m&&y.keyIds.add(m),(x=fA.get(x))&&(y.licenseServerUri=x(v)),f.push(y)}}h=f}else h=[];for(g=h,f=[],h=[],d=[],v=(p=u(p=tA(p,"StreamIndex"))).next();!v.done;v=p.next()){x=tA(v=v.value,"QualityLevel"),y=c.timescale,m=c.duration,T=tA(v,"c");for(var S=[],A=0,k=0;k<T.length;++k){var E=T[k],I=T[k+1],M=tD(E,"t",tB),C=tD(E,"d",tB);if(E=tD(E,"r",tO),!C)break;if(M=null!=M?M:A,(E=E||0)&&E--,0>E)if(I){if(null==(I=tD(I,"t",tB))||M>=I)break;E=Math.ceil((I-M)/C)-1}else{if(1/0==m||M/y>=m)break;E=Math.ceil((m*y-M)/C)-1}for(I=0;I<=E;++I)A=M+C,S.push({start:M/y,end:A/y,sg:M}),M=A}for(y=S,m=(x=u(x)).next();!m.done;m=x.next())(m=function(e,t,n,i,r,a){var o=t.attributes.Type;if("audio"!==o&&"video"!==o&&"text"!==o)return q("Ignoring unrecognized type:",o),null;var s=t.attributes.Language,l=e.s++,c=tD(n,"Bitrate",t_),d=tD(n,"MaxWidth",t_),h=tD(n,"MaxHeight",t_),p=tD(n,"Channels",t_),f=tD(n,"SamplingRate",t_),g=a.duration;i.length&&(g=i[i.length-1].end-i[0].start);var m=e.i.getDuration();e.i.Za(Math.min(g,m));var v={id:l,originalId:t.attributes.Name||String(l),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:c||0,width:d||void 0,height:h||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:im(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:f,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:g,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1};if((r=t.attributes.Subtype)&&((r=fM.get(r))&&v.roles.push(r),"main"===r&&(v.primary=!0)),(null===(r=n.attributes.FourCC)||""===r)&&(r=t.attributes.FourCC),!r){if("audio"===o)r="AAC";else if("video"===o)return q('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!fI.includes(r.toUpperCase()))return q("Codec not supported:",r),null;
1switch(n=function(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=i.channelsCount||2;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return(i=r[e=i.audioSamplingRate||44100],"AACH"===n)?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,(t=new Uint16Array(2))[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):((n=new Uint8Array(2))[0]=16|i>>1,n[1]=i<<7|t<<3,(t=new Uint16Array(1))[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,r,v),v.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return q("Quality unsupported without CodecPrivateData",o),null;v.type="audio",v.mimeType="mss/audio/mp4",v.codecs=function(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(r,n);break;case"video":if(!n)return q("Quality unsupported without CodecPrivateData",o),null;v.type="video",v.mimeType="mss/video/mp4",v.codecs=function(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":v.type=nW,v.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(v.codecs="stpp")}return v.fullMimeTypes.add(nZ(v.mimeType,v.codecs)),v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(e.m.has(v.id))var n=e.m.get(v.id);else n=[],"video"==v.type&&(n=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=ad(new ac([n={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,jb:n,ra:new Uint8Array([]),za:new Uint8Array([]),Fa:0,Ha:0,data:null,stream:v}])),e.m.set(v.id,n);return n=function(e,t,n,i,r){var a=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=u(r);for(var o=r.next(),s={};!o.done;s={Ae:void 0},o=r.next())s.Ae=o.value,i.push(new aB(s.Ae.start,s.Ae.end,function(t){return function(){return nH(e.l,[a.replace("{start time}",String(t.Ae.sg))])}}(s),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new aO(function(){return[]},0,null,sh(v),v.mssPrivateData.timescale,n,null,v.encrypted),v,t,i),v.segmentIndex=new st(n),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}(e,v,m.value,y,g,c))&&("audio"!=m.type||e.g.disableAudio?"video"!=m.type||e.g.disableVideo?m.type!=nW||e.g.disableText||d.push(m):h.push(m):f.push(m))}for(p=[],g=(f=u(0<f.length?f:[null])).next();!g.done;g=f.next())for(g=g.value,S=(v=u(0<h.length?h:[null])).next();!S.done;S=v.next())y=(x=p).push,m=e,T=g,S=S.value,k=0,T&&T.bandwidth&&0<T.bandwidth&&(k+=T.bandwidth),S&&S.bandwidth&&0<S.bandwidth&&(k+=S.bandwidth),m={id:m.s++,language:T?T.language:"und",disabledUntilTime:0,primary:!!T&&T.primary||!!S&&S.primary,audio:T,video:S,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(x,m);c.variants=p,c.textStreams=d,e.j?(e.j.variants=c.variants,e.j.textStreams=c.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:c.variants,textStreams:c.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.ee()),Promise.resolve(),o=(Date.now()-i)/1e3,e.C.sample(1,o),w(s)})}(c=fk.prototype).configure=function(e,t){this.g=e,t&&(this.A=t)},c.start=function(e,t){var n=this;return R(function(i){if(1==i.g)return n.l=[e],n.h=t,b(i,fE(n),2);if(!n.h)throw new eC(2,7,7001);return i.return(n.j)})},c.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},c.update=function(){var e,t=this;return R(function(n){return 1==n.g?(x(n,2),b(n,fE(t),4)):2!=n.g?S(n,0):(e=A(n),t.h&&e)?void(t.h.onError(e),w(n)):n.return()})},c.onExpirationUpdated=function(){},c.onInitialVariantChosen=function(){},c.banLocation=function(){},c.setMediaElement=function(){},B("shaka.mss.MssParser",fk);var fI="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fM=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");function fC(e,t,n,i,r,a,o){if(200<=n&&299>=n&&202!=n||304==n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:a};a=null;try{a=tr(t)}catch(e){}throw new eC(401==n||403==n?2:1,1,1001,i,n,a,e,o,r||i)}function fD(){}function fR(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,T,k,E,I,M,C,D,P,L,N=new fU;
1rm(t.headers).forEach(function(e,t){N.append(t,e)});var j=new fN,U={Cg:!1,Bh:!1};if(e=new i1((o=e,s=t,u=n,l={body:t.body||void 0,headers:N,method:t.method,signal:j.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},c=U,d=i,h=r,p=t.streamDataCallback,f=a.minBytesForProgressEvents||0,e=R(function(e){switch(e.g){case 1:return g=fL,m=fj,y=new ArrayBuffer(0),k=T=0,E={},I=Date.now(),x(e,2),b(e,g(o,l),4);case 4:var t,n;if(h((t=(v=e.h).headers,n={},t.forEach(function(e,t){n[t.trim()]=e}),E=n)),"HEAD"==l.method){e.u(5);break}if(C=(M=v.headers.get("Content-Length"))?parseInt(M,10):0,!v.body)return b(e,v.arrayBuffer(),9);return D=v.clone().body.getReader(),new m({start:function(e){!function t(){var n,i,r,a;return R(function(o){switch(o.g){case 1:return x(o,2),b(o,D.read(),4);case 4:n=o.h,S(o,3);break;case 2:return A(o),o.return();case 3:if(n.done||(T+=n.value.byteLength,!p)){o.u(5);break}return b(o,p(n.value),5);case 5:i=Date.now(),r=T-k,(100<i-I&&r>=f||n.done)&&(a=n.done?0:C-T,d(i-I,r,a),k=T,I=i),n.done?e.close():(e.enqueue(n.value),t()),w(o)}})}()}}),b(e,v.arrayBuffer(),8);case 8:y=e.h,e.u(5);break;case 9:y=e.h,d(Date.now()-I,y.byteLength,0);case 5:s.headers.Range&&2==(P=s.headers.Range.replace("bytes=","").split("-").filter(function(e){return e}).map(function(e){return parseInt(e,10)})).length&&y.byteLength!=P[1]-P[0]+1&&q("Payload length does not match range requested bytes",s,v),S(e,3);break;case 2:if(L=A(e),c.Cg)throw new eC(1,1,7001,o,u);if(c.Bh)throw new eC(1,1,1003,o,u);throw new eC(1,1,1002,o,L,u);case 3:return e.return(fC(E,y,v.status,o,v.url,s,u))}})),function(){return U.Cg=!0,j.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var O=new eB(function(){U.Bh=!0,j.abort()});O.$(t/1e3),e.finally(function(){O.stop()})}return e}function fP(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&!!new Response("").body&&!(!e.fetch||"polyfill"in e.fetch||!e.AbortController)}as("application/vnd.ms-sstr+xml",function(){return new fk}),B("shaka.net.HttpFetchPlugin",fD),fD.isSupported=fP,fD.parse=fR;var fL=e.fetch,fN=e.AbortController,fj=e.ReadableStream,fU=e.Headers;function fO(){}function f_(e,t,n,i,r,a){var o=new fF,s=Date.now(),u=0;return new i1(new Promise(function(l,c){o.open(t.method,e,!0),o.responseType="arraybuffer",o.timeout=t.retryParameters.timeout,o.withCredentials=t.allowCrossSiteCredentials,o.onabort=function(){c(new eC(1,1,7001,e,n))};var d=!1;for(var h in o.onreadystatechange=function(){2!=o.readyState||d||(r(fB(o)),d=!0)},o.onload=function(r){var a=fB(o),d=o.response;try{i(Date.now()-s,r.loaded-u,0);var h=fC(a,d,o.status,e,o.responseURL,t,n);l(h)}catch(e){c(e)}},o.onerror=function(t){c(new eC(1,1,1002,e,t,n))},o.ontimeout=function(){c(new eC(1,1,1003,e,n))},o.onprogress=function(e){var t=Date.now(),n=a.minBytesForProgressEvents||0,r=e.loaded-u;(100<t-s&&r>=n||e.lengthComputable&&e.loaded==e.total)&&(i(t-s,r,4==o.readyState?0:e.total-e.loaded),u=e.loaded,s=t)},t.headers)o.setRequestHeader(h.toLowerCase(),t.headers[h]);o.send(t.body)}),function(){return o.abort(),Promise.resolve()})}function fB(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={},t=u(t);for(var n=t.next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}fP()&&(rr("http",fR,2,!0),rr("https",fR,2,!0),rr("blob",fR,2,!0)),B("shaka.net.HttpXHRPlugin",fO),fO.parse=f_;var fF=e.XMLHttpRequest;function fV(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function fH(e){var t=e.Fb(!1);return t?nO(t):e.N().map(function(e){return"{"+encodeURI(e.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function fG(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function fK(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}function fq(e){return 0==e.i?0:e.j/e.i}function fz(e){var t=this;this.s=e,this.i=new Map,this.h=new rp(function(){return fX(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new fG,this.l=!1}function fX(e){e.l=!0;var t=e.j.map(function(e){return e()});return e.j=[],Promise.all(t)}function fW(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new i0,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 fY(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return R(function(i){if(1==i.g)return null==r.result?(n(),i.return()):b(i,t((e=r.result).key,e.value,e),2);e.continue(),w(i)})}})}function fJ(e){this.h=e,this.g=[]}function f$(e,t){return fQ(e,t,"readwrite")}function fQ(e,t,n){var i=new fW(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){eE(e.g,i)},function(){eE(e.g,i)}),i}function fZ(e,t,n){this.h=new fJ(e),this.i=t,this.g=n}function f0(e){return Promise.reject(new eC(2,9,9011,"Cannot add new value to "+e))}function f1(e,t,n,i){t=(e=f$(e.h,t)).store(),n=u(n);for(var r=n.next(),a={};!r.done;a={Jf:void 0},r=n.next())a.Jf=r.value,t.delete(a.Jf).onsuccess=function(e){return function(){return i(e.Jf)}}(a);return e.promise()}function f2(e,t,n){var i,r,a,o,s,l,c;return R(function(d){if(1==d.g){for(r=(i=fQ(e.h,t,"readonly")).store(),a={},o=[],l=(s=u(n)).next(),c={};!l.done;c={se:void 0,ce:void 0},l=s.next())c.ce=l.value,c.se=r.get(c.ce),c.se.onsuccess=function(e){return function(){void 0==e.se.result&&o.push(e.ce),a[e.ce]=e.se.result}}(c);return b(d,i.promise(),2)}if(o.length)throw new eC(2,9,9012,"Could not find values for "+o);return d.return(n.map(function(e){return a[e]}))})}function f3(e){this.g=new fJ(e)}function f4(){this.g=new Map}function f5(e){var t=null;
1if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{xb:n,Na:i},Na:e})})}),t)return t;throw new eC(2,9,9013,"Could not find a cell that supports add-operations")}function f6(e,t,n){if(!(e=e.g.get(t)))throw new eC(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new eC(2,9,9013,"Could not find cell with name "+n);return t}function f8(e,t){f9.set(e,t)}rr("http",f_,1,!0),rr("https",f_,1,!0),rr("blob",f_,1,!0),fG.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}},fz.prototype.destroy=function(){return this.h.destroy()},fW.prototype.abort=function(){var e=this;return R(function(t){if(1==t.g){try{e.i.abort()}catch(e){}return x(t,2),b(t,e.g,4)}if(2!=t.g)return S(t,0);A(t),w(t)})},fW.prototype.store=function(){return this.h},fW.prototype.promise=function(){return this.g},fJ.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(c=fZ.prototype).destroy=function(){return this.h.destroy()},c.hasFixedKeySpace=function(){return!0},c.addSegments=function(){return f0(this.i)},c.removeSegments=function(e,t){return f1(this,this.i,e,t)},c.getSegments=function(e){var t,n=this;return R(function(i){return 1==i.g?b(i,f2(n,n.i,e),2):(t=i.h,i.return(t.map(function(e){return n.Eg(e)})))})},c.addManifests=function(){return f0(this.g)},c.updateManifest=function(){return Promise.reject(new eC(2,9,9016,"Cannot modify values in "+this.g))},c.updateManifestExpiration=function(e,t){var n=f$(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()},c.removeManifests=function(e,t){return f1(this,this.g,e,t)},c.getManifests=function(e){var t,n=this;return R(function(i){return 1==i.g?b(i,f2(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map(function(e){return n.ed(e)}))))})},c.getAllManifests=function(){var e,t,n=this;return R(function(i){return 1==i.g?(e=fQ(n.h,n.g,"readonly"),t=new Map,b(i,fY(e,function(e,i){var r;return R(function(a){if(1==a.g)return b(a,n.ed(i),2);r=a.h,t.set(e,r),w(a)})}),2)):3!=i.g?b(i,e.promise(),3):i.return(t)})},c.Eg=function(e){return e},c.ed=function(e){return Promise.resolve(e)},c.add=function(e,t){var n,i,r,a,o,s,l,c=this;return R(function(d){if(1==d.g){for(i=(n=f$(c.h,e)).store(),r=[],o=(a=u(t)).next(),s={};!o.done;s={Yf:void 0},o=a.next())l=o.value,s.Yf=i.add(l),s.Yf.onsuccess=function(e){return function(){r.push(e.Yf.result)}}(s);return b(d,n.promise(),2)}return d.return(r)})},f3.prototype.destroy=function(){return this.g.destroy()},f3.prototype.getAll=function(){var e,t,n=this;return R(function(i){return 1==i.g?(e=fQ(n.g,"session-ids","readonly"),t=[],b(i,fY(e,function(e,n){t.push(n)}),2)):3!=i.g?b(i,e.promise(),3):i.return(t)})},f3.prototype.add=function(e){var t=f$(this.g,"session-ids"),n=t.store();e=u(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},f3.prototype.remove=function(e){var t,n=this;return R(function(i){return 1==i.g?b(i,fY(t=f$(n.g,"session-ids"),function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2):b(i,t.promise(),0)})},f4.prototype.destroy=function(){for(var e=[],t=u(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},f4.prototype.init=function(){var e=this;f9.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=u(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},B("shaka.offline.StorageMuxer",f4),f4.unregister=function(e){f9.delete(e)},f4.register=f8,f4.prototype.destroy=f4.prototype.destroy;var f9=new Map;function f7(){fZ.apply(this,arguments)}function ge(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 eC(2,9,9004,"Could not parse uri "+e)}function gt(){fZ.apply(this,arguments)}function gn(){fZ.apply(this,arguments)}function gi(){this.m=this.j=this.i=this.h=this.g=this.l=null}function gr(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function ga(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 gr(t,n,i,Number(e[4])):null}function go(e,t){this.h=e,this.g=t}function gs(e,t){var n=new oq(null,0);n.Za(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=u(t),o=a.next();!o.done;o=a.next()){o=u(o.value.variantIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}for(o=(a=u(n)).next();!o.done;o=a.next())for(s=(o=u(o.value.variantIds)).next();!s.done;s=o.next())r.add(s.value);for(a=new Map,o=(r=u(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=u(t)).next();!r.done;r=t.next())for(r=gu(e,o=r.value,i),s=(o=u(o.variantIds)).next();!s.done;s=o.next())(s=a.get(s.value)).language=r.language,s.primary=s.primary||r.primary,s.audio=r;for(t=(n=u(n)).next();!t.done;t=n.next())for(t=gu(e,r=t.value,i),o=(r=u(r.variantIds)).next();!o.done;o=r.next())(o=a.get(o.value)).primary=o.primary||t.primary,o.video=t;return a}(e,i,r,n),r=t.streams.filter(function(e){return e.type==nW}).map(function(t){return gu(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return gu(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=u(i.values()),l=s.next();!l.done;l=s.next())(l=l.value).audio&&l.audio.encrypted&&(l.audio.drmInfos=o),l.video&&l.video.encrypted&&(l.video.drmInfos=o);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function gu(e,t,n){var i=t.segments.map(function(n){var i,r,a,o,s,u,l;return i=e,r=n,a=t,o=new gr("segment",i.h,i.g,r.dataKey),(i=new aB(r.startTime,r.endTime,function(){return[o.toString()]},0,null,null!=r.initSegmentKey?(s=i,u=r.initSegmentKey,l=new gr("segment",s.h,s.g,u),new aO(function(){return[l.toString()]},0,null)):null,r.timestampOffset,r.appendWindowStart,r.appendWindowEnd,[],r.tilesLayout||"")).mimeType=r.mimeType||a.mimeType||"",i.codecs=r.codecs||a.codecs||"",r.thumbnailSprite&&i.ye(r.thumbnailSprite),i});return n.Bd(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new st(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,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,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,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([nZ(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1}}function gl(){this.g=null}function gc(){}function gd(e,t){var n,i,r,a,o=ga(e);return e=o&&"manifest"==o.g?i4(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t}):o&&"segment"==o.g?(n=o.key(),i=o,r=t,a=new f4,i4(void 0).Ea(function(){return a.init()}).Ea(function(){return f6(a,i.xb(),i.Na())}).Ea(function(e){return e.getSegments([i.key()])}).Ea(function(e){return{uri:i,data:e[0].data,headers:{},originalRequest:r}}).finally(function(){return a.destroy()})):i2(new eC(2,1,9004,e))}function gh(e,t,n){var i,r,a,o;return R(function(s){switch(s.g){case 1:i=[];for(var l,c,d,h,p,f=[],g=u(n),m=g.next();!m.done;m=g.next()){m=m.value;for(var v=!1,y=u(f),T=y.next();!T.done;T=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&&eI(e.audioCapabilities,t.audioCapabilities,n)&&eI(e.videoCapabilities,t.videoCapabilities,n)}
1((T=T.value).info,m)){T.sessionIds.push(m.sessionId),v=!0;break}v||f.push({info:m,sessionIds:[m.sessionId]})}a=(r=u(f)).next();case 2:if(a.done){s.u(4);break}return b(s,(l=e,c=t,d=a.value,R(function(e){switch(e.g){case 1:var t,n,i,r,a,o,s;return h=new rN({Sb:c,onError:function(){},le:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),x(e,2),h.configure(l),b(e,(t=h,n=d.info.keySystem,i=d.info.licenseUri,r=d.info.serverCertificate,a=d.info.audioCapabilities,o=d.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,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],s.set(n,a),rV(t,s,[])),4);case 4:S(e,3);break;case 2:return A(e),b(e,h.destroy(),5);case 5:return e.return([]);case 3:return p=[],b(e,Promise.all(d.sessionIds.map(function(e){return R(function(t){if(1==t.g){var n,i,r,a,o;return x(t,2),b(t,(n=h,i=e,R(function(e){return 1==e.g?b(e,rK(n,i,{initData:null,initDataType:null}),2):3!=e.g?(r=e.h)?(a=[],(o=n.i.get(r))&&(o.qb=new i0,a.push(o.qb)),a.push(r.remove()),b(e,Promise.all(a),3)):e.return():void(n.i.delete(r),w(e))})),4)}if(2!=t.g)return p.push(e),S(t,0);A(t),w(t)})})),6);case 6:return b(e,h.destroy(),7);case 7:return e.return(p)}})),5);case 5:o=s.h,i=i.concat(o),a=r.next(),s.u(2);break;case 4:return s.return(i)}})}function gp(e,t){var n=gs(new go(e.xb(),e.Na()),t),i=t.appMetadata||{};return n=gf(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 gf(e){var t=[],n=i_(e.variants);n=u(n);for(var i=n.next();!i.done;i=n.next())t.push(iR(i.value));for(n=(e=u(e.textStreams)).next();!n.done;n=e.next())t.push(iP(n.value));return t}function gg(){this.g=new Map}function gm(e,t){return null==(e=e.g.get(t))&&(e=0),e}function gv(e){var t=this;if(e&&e.constructor!=u2)throw new eC(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.wb()):(this.h=s5(),this.g=new ri),this.i=[],this.l=[];var n=!e;this.j=new rp(function(){var e,i,r,a,o;return R(function(s){switch(s.g){case 1:return b(s,Promise.all(t.l.map(function(e){return fX(e)})),2);case 2:for(e=function(){},i=[],a=(r=u(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return b(s,Promise.all(i),3);case 3:if(!n){s.u(4);break}return b(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,w(s)}})}),this.m=1e9}function gy(){if(eF())e:{for(var e=u(f9.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 gb(e){var t,n,i;return R(function(r){switch(r.g){case 1:return b(r,(t=new f4).init(),2);case 2:return b(r,f5(t),3);case 3:return i=new gr("manifest",(n=r.h).path.xb,n.path.Na,e),b(r,t.destroy(),4);case 4:return b(r,(new gv).remove(i.toString()),0)}})}function gw(e,t,n,i,r,a){var o,s,l,c,d,h,p,f,g,m;return R(function(v){switch(v.g){case 1:for(o=!1,x(v,2),s=!0,c=(l=u(n.streams)).next();!c.done;c=l.next())for(h=(d=u(c.value.segments)).next();!h.done;h=d.next())null!=(f=(p=h.value).pendingSegmentRefId?i[p.pendingSegmentRefId]:null)&&(p.dataKey=f,p.pendingSegmentRefId=void 0),null!=(f=p.pendingInitSegmentRefId?i[p.pendingInitSegmentRefId]:null)&&(p.initSegmentKey=f,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(s=!1),p.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),b(v,e.updateManifest(t,n),4);case 4:o=!0,a(),S(v,0);break;case 2:return g=A(v),b(v,gb(t),5);case 5:if(o){v.u(6);break}return m=Object.values(i),b(v,e.removeSegments(m,function(){}),6);case 6:throw g}})}function gx(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function gT(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 gS(e,t,n,i){if(t.expiration=n.kd(),n=rF(n),t.sessionIds=i?n:[],gx(e)&&i&&!n.length)throw new eC(2,9,9007)}function gA(e,t){for(var n=[],i=u(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:nZ(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:nZ(r.mimeType,r.codecs),robustness:e.drmInfo.audioR
1obustness});return n}function gk(e,t){var n;return R(function(i){switch(i.g){case 1:return x(i,2),b(i,uv(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,S(i,3);break;case 2:A(i);case 3:if(n)return i.return(n);throw new eC(1,2,2011,t)}})}function gE(e){if(e.j.g)throw new eC(2,9,7001)}function gI(){if(!gy())throw new eC(2,9,9e3)}function gM(e,t){return R(function(n){return 1==n.g?(e.i.push(t),T(n,2),b(n,t,4)):2!=n.g?n.return(n.h):(k(n),eE(e.i,t),E(n,0))})}function gC(e){for(var t=new Set,n=u(e.variants),i=n.next();!i.done;i=n.next())(i=i.value).audio&&t.add(i.audio),i.video&&t.add(i.video);for(i=(n=u(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=u(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}g(f7,fZ),f7.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return R(function(o){return i=(n=f$(a.h,a.g)).store(),r=new i0,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new eC(2,9,9012,"Could not find values for "+e))},b(o,Promise.all([n.promise(),r]),0)})},f7.prototype.ed=function(e){var t,n,i,r,a;return R(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=u(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=u(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=u(e),a=r.next();!a.done;a=r.next())a.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=(r=u(t)).next();!a.done;a=r.next())a.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=u(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=u(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=u(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?ge(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,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=ge(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}(n,e.startTime,t)})}(e.periods[n],i),t.push(r);return b(o,hA(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})})},f7.prototype.Eg=function(e){return{data:e.data}},g(gt,fZ),gt.prototype.ed=function(e){var t,n,i,r,a;return R(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],l=[],c=u(s.streams),d=c.next();!d.done;d=c.next())0!=(d=d.value).variantIds.length&&l.push(function(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,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:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}(d,s.startTime,s.startTime+i));r=l,t.push(r)}return b(o,hA(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})})},g(gn,fZ),(c=gn.prototype).hasFixedKeySpace=function(){return!1},c.addSegments=function(e){return this.add(this.i,e)},c.addManifests=function(e){return this.add(this.g,e)},c.updateManifest=function(e,t){var n,i,r,a;return n=this,i=e,r=t,(a=(n=f$(n.h,n.g)).store()).get(i).onsuccess=function(){a.put(r,i)},n.promise()},c.ed=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(c=gi.prototype).init=function(){var t=this,n=new i0,i=!1,r=new eB(function(){i=!0,n.reject(new eC(2,9,9017))});r.$(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 f7(e,"segment","manifest"):null,t.h=o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new gt(e,"segment-v2","manifest-v2"):null,t.i=o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new gt(e,"segment-v3","manifest-v3"):null,t.j=o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new gn(e,"segment-v5","manifest-v5"):null,t.m=e=e.objectStoreNames.contains("session-ids")?new f3(e):null,r.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=u(["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 eC(2,9,9001,a.error)),r.stop(),e.preventDefault())},n},c.destroy=function(){var e=this;return R(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return b(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return b(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return b(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return b(t,e.j.destroy(),8);case 8:if(!e.m){t.u(10);break}
1return b(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),w(t)}})},c.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},c.getEmeSessionCell=function(){return this.m},c.erase=function(){var t=this;return R(function(n){switch(n.g){case 1:if(!t.g){n.u(2);break}return b(n,t.g.destroy(),2);case 2:if(!t.h){n.u(4);break}return b(n,t.h.destroy(),4);case 4:if(!t.i){n.u(6);break}return b(n,t.i.destroy(),6);case 6:if(!t.j){n.u(8);break}return b(n,t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),b(n,(i=new i0,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new eC(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,b(n,t.init(),0)}})},f8("idb",function(){return(!eX()||eX()&&e1())&&!eG()&&e.indexedDB?new gi:null}),gr.prototype.xb=function(){return this.i},gr.prototype.Na=function(){return this.h},gr.prototype.key=function(){return this.l},gr.prototype.toString=function(){return this.j},(c=gl.prototype).configure=function(){},c.start=function(e,t){var n,i,r,a,o,s=this;return R(function(u){switch(u.g){case 1:if(s.g=n=ga(e),null==n||"manifest"!=n.g)throw new eC(2,1,9004,e);return i=new f4,T(u,2),b(u,i.init(),4);case 4:return b(u,f6(i,n.xb(),n.Na()),5);case 5:return r=u.h,b(u,r.getManifests([n.key()]),6);case 6:return a=u.h[0],o=gs(new go(n.xb(),n.Na()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return k(u),b(u,i.destroy(),7);case 7:E(u,0)}})},c.stop=function(){return Promise.resolve()},c.update=function(){},c.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return R(function(l){switch(l.g){case 1:return n=u.g,i=new f4,x(l,2,3),b(l,i.init(),5);case 5:return b(l,f6(i,n.xb(),n.Na()),6);case 6:return r=l.h,b(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.u(3);break}return b(l,r.updateManifestExpiration(n.key(),t),3);case 3:return k(l),b(l,i.destroy(),10);case 10:E(l,0);break;case 2:A(l),l.u(3)}})},c.onInitialVariantChosen=function(){},c.banLocation=function(){},c.setMediaElement=function(){},as("application/x-offline-manifest",function(){return new gl}),B("shaka.offline.OfflineScheme",gc),gc.plugin=gd,rr("offline",gd),(c=gv.prototype).destroy=function(){return this.j.destroy()},c.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=sJ(e,t)),s8(this.h,e)},c.getConfiguration=function(){var e=s5();return s8(e,this.h,s5()),e},c.wb=function(){return this.g},c.store=function(e,t,n,i,r){var a,o,s,l,c,d,h,p,f,g,m,v,y,T,I,M,C,D,P,L,N,j,U,O,_,B,F,V,H,G,K,q,z,X=this,W=this.getConfiguration(),Y=new fz(this.g);return this.l.push(Y),(t=new i1((a=this,o=e,s=t||{},l=i||[],c=r||[],d=function(){var t;return R(function(i){return 1==i.g?n?i.u(2):b(i,uv(e,X.g,W.manifest.retryParameters),3):(2!=i.g&&(n=i.h),t=au(e,n||null),i.return(t()))})},h=W,p=Y,t=R(function(e){var t,n,i,r,K,q,z,X,W,Y,J,$,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,ep,ef,eg,em,ev,ey,eb,ew,ex,eT,eS,eA,ek,eI,eM,eD,eR,eP,eL,eN,ej,eU,eO,e_,eB,eF,eV,eH,eG,eK,eq,ez,eX,eW,eY,eJ,e$,eQ,eZ,e0,e1,e2,e3,e4,e5,e6,e8,e9,e7,te,tt,tn,ti,tr,ta,to,ts,tu,tl;switch(e.g){case 1:return gI(),g=f=null,m=new f4,T=y=v=null,x(e,2,3),b(e,d(),5);case 5:return f=e.h,b(e,(t=a,n=o,i=f,r=h,R(function(e){if(1==e.g)return K=null,q={networkingEngine:t.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){K=e},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},i.configure(r.manifest),gE(t),b(e,i.start(n,q),2);if(3!=e.g)return z=e.h,gE(t),b(e,Promise.all(rg(gC(z),function(e){return e.createSegmentIndex()})),3);if(gE(t),K)throw K;return e.return(z)})),6);case 6:if(I=e.h,gE(a),!(!I.presentationTimeline.T()&&!I.presentationTimeline.vc()))throw new eC(2,9,9005,o);C=(M=u(l)).next();case 7:if(C.done){e.u(9);break}
1return b(e,(X=a,W=C.value,Y=I,R(function(e){switch(e.g){case 1:return b(e,gk(X,W),2);case 2:var t,n,i,r,a,o;if("text/vtt"!=(J=e.h))throw new eC(1,2,2017,W);return b(e,(t=W,n=X.g,i=X.h.streaming.retryParameters,R(function(e){return 1==e.g?(r=rc,(a=ro([t],i)).method="GET",b(e,n.request(r,a).promise,2)):(o=e.h,e.return(o.data))})),3);case 3:if($=e.h,!(Q=ii(J)))throw new eC(2,2,2014,J);for(Z=Q(),ee={periodStart:0,segmentStart:0,segmentEnd:Y.presentationTimeline.getDuration(),vttOffset:0},et=eh($),en=Z.parseMedia(et,ee,W,[]),ei=[],ea=(er=u(en)).next(),eo={};!ea.done;eo={He:void 0,Jc:void 0},ea=er.next())eo.Jc=ea.value,eo.He=null,es=function(e){return function(){return null==e.He&&(e.He=nH([W],[e.Jc.payload])),e.He||[]}}(eo),eu=new aB(eo.Jc.startTime,eo.Jc.endTime,es,0,null,null,0,0,1/0),eo.Jc.payload.includes("#xywh")&&4===(el=eo.Jc.payload.split("#xywh=")[1].split(",")).length&&eu.ye({height:parseInt(el[3],10),positionX:parseInt(el[0],10),positionY:parseInt(el[1],10),width:parseInt(el[2],10)}),ei.push(eu);if(ec=J,!ei.length){e.u(4);break}return b(e,uv(ei[0].N()[0],X.g,X.h.manifest.retryParameters),5);case 5:ec=e.h;case 4:return e.return({id:X.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new st(ei),mimeType:ec||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nZ(ec||"","")]),isAudioMuxedInVideo:!1})}})),10);case 10:D=e.h,I.imageStreams.push(D),gE(a),C=M.next(),e.u(7);break;case 9:L=(P=u(c)).next();case 11:if(L.done)return rQ(h.drm.clearKeys,I.variants),U=I.variants.some(function(e){if(e.audio){for(var t=u(e.audio.drmInfos),n=t.next();!n.done;n=t.next())if(n.value.licenseServerUri.startsWith("data:"))return!0}if(e.video){for(t=(e=u(e.video.drmInfos)).next();!t.done;t=e.next())if(t.value.licenseServerUri.startsWith("data:"))return!0}return!1}),O=h.offline.usePersistentLicense,U&&(O=!1),b(e,a.Hc(I,function(e){T=T||e},h,O),15);return N=L.value,b(e,(ed=a,ep=I,ef=N.uri,eg=N.language,em=N.kind,ev=N.mime,ey=N.codecs,R(function(e){if(1==e.g)return ev?e.u(2):b(e,gk(ed,ef),3);if(2!=e.g&&(ev=e.h),eb={id:ed.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:si(0,ep.presentationTimeline.getDuration(),[ef]),mimeType:ev||"",codecs:ey||"",kind:em,encrypted:!1,drmInfos:[],keyIds:new Set,language:eg,originalLanguage:eg,label:null,type:nW,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nZ(ev||"",ey||"")]),isAudioMuxedInVideo:!1},!ir(nZ(eb.mimeType,eb.codecs)))throw new eC(2,2,2014,ev);return e.return(eb)})),14);case 14:j=e.h,I.textStreams.push(j),gE(a),L=P.next(),e.u(11);break;case 15:if(g=e.h,gE(a),T)throw T;return b(e,(ew=I,ex=g,eT=h,eS=O,R(function(e){switch(e.g){case 1:var t,n,i;return eA={width:1/0,height:1/0},t=ew,n=eT.restrictions,i=eA,t.variants=t.variants.filter(function(e){return iA(e,n,i)}),b(e,ik(ex,ew,eS,eT.drm.preferredKeySystems,eT.drm.keySystemsMapping),2);case 2:for(ek=[],eI=eT.preferredDecodingAttributes,eM=eT.preferredVideoCodecs,eD=eT.preferredAudioCodecs,iS(ew,eM,eD,eI,eT.preferredTextFormats),eP=(eR=u(ew.variants)).next();!eP.done;eP=eR.next())eL=eP.value,ek.push(iR(eL));for(ej=(eN=u(ew.textStreams)).next();!ej.done;ej=eN.next())eU=ej.value,ek.push(iP(eU));for(e_=(eO=u(ew.imageStreams)).next();!e_.done;e_=eO.next())eB=e_.value,ek.push(iL(eB));return b(e,eT.offline.trackSelectionCallback(ek),3);case 3:for(eF=e.h,eV=ew.presentationTimeline.getDuration(),eH=0,eK=(eG=u(eF)).next();!eK.done;eK=eG.next())eq=eK.value.bandwidth*eV/8,eH+=eq;return x(e,4),b(e,eT.offline.downloadSizeCallback(eH),6);case 6:if(!e.h)throw new eC(2,9,9014);S(e,5);break;case 4:if((ez=A(e))instanceof eC)throw ez;throw new eC(2,9,9015);case 5:for(eX=new Set,eW=new Set,eY=new Set,e$=(eJ=u(eF)).next();!e$.done;e$=eJ.next())"variant"==(eQ=e$.value).type&&eX.add(eQ.id),"text"==eQ.type&&eW.add(eQ.id),"image"==eQ.type&&eY.add(eQ.id);ew.variants=ew.variants.filter(function(e){return eX.has(e.id)}),ew.textStreams=ew.textStreams.filter(function(e){return eW.has(e.id)}),ew.imageStreams=ew.imageStreams.filter(function(e){return eY.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=u(t),i=n.next();!i.done;i=n.next()){i=u(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=u(e)).next();!n.done;n=t.next())for(i=(n=u(e)).next();!i.done;i=n.next());}(ew),w(e)}})),16);case 16:return b(e,m.init(),17);case 17:return gE(a),b(e,f5(m),18);case 18:return v=e.h,gE(a),B=(_=function(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m=(s=n,l=t,c=i,{offlineUri:null,originalManifestUri:s,duration:l.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:l=gf(l),appMetadata:c,isIncomplete:!1}),v=r.offline.progressCallback;d=a,h=function(e,t){m.size=t,v(m,e)},p=function(t,n){y&&o&&b==n&&rB(e,"cenc",t)},d.o=h,d.m=p;var y=gx(t)&&!gT(t),b=null;y&&(b=gD.get(e.h.keySystem));for(var w=new gg,x=u(t.textStreams),T=x.next();!T.done;T=x.next())w.g.set(T.value.id,52);for(T=(x=u(t.imageStreams)).next();!T.done;T=x.next())f=w,g=T.value,f.g.set(g.id,g.bandwidth||2048);
1for(T=(x=u(t.variants)).next();!T.done;T=x.next())!function(e,t){var n=t.audio,i=t.video;if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(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.set(n.id,r),e.g.set(i.id,a)}}(w,T.value);return r=(a=function(e,t,n,i){var r=new Map,a=gC(n),o=new Map;a=u(a);for(var s=a.next();!s.done;s=a.next()){var l=function(e,t,n,i,r,a){var o={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,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,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},s=r.offline.numberOfParallelDownloads,u=0===s?i.id:0;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.mb(),function(n,r){var l=fH(n),c=void 0;if(!a.has(l)){var d=n.endTime-n.startTime;d=gm(t,i.id)*d,d=fK(e.g,d),a.set(l,new fV(n,d,u,!1,r))}n.ca&&(c=fH(n.ca),a.has(c)||(d=.5*gm(t,i.id),d=fK(e.g,d),a.set(c,new fV(n.ca,d,u,!0,r)))),o.segments.push({pendingInitSegmentRefId:c,initSegmentKey:c?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:l,dataKey:0,mimeType:n.mimeType,codecs:n.codecs,thumbnailSprite:n.thumbnailSprite}),0!==s&&(u=(u+1)%s)}),o}(e,t,n,s=s.value,i,r);o.set(s.id,l)}for(t=(e=u(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()),og:Array.from(r.values())}}(a,w,t,r)).streams,a=a.og,(w=e.h)&&o&&(w.initData=[]),{Oi:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.kd(),streams:r,sessionIds:o?rF(e):[],drmInfo:w,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},og:a}}(g,I,o,s,h,p,O)).Oi,F=_.og,b(e,v.Na.addManifests([B]),19);case 19:if(V=e.h,gE(a),y=V[0],gE(a),T)throw T;return b(e,(eZ=a,e0=F,e1=y,e2=B,e3=p,e4=h,e5=v.Na,e6=I,e8=g,e9=O,R(function(e){switch(e.g){case 1:if(e7={},te=0,tt=function(){if(eZ.j.g||e3.l)throw new eC(2,9,7001)},tn=function(e,t){var n,i,r,a,o,s,l,c;return R(function(d){if(1==d.g){var h,p,f;for(i=(n=u(e)).next(),r={};!i.done;r={Kb:void 0},i=n.next())r.Kb=i.value,tt(),h=r.Kb,p=e4,a=sI(h.g.N(),h.g.startByte,h.g.endByte,p.streaming.retryParameters),o=r.Kb.i,s=r.Kb.h,l=function(e){return function(t){var n,i,r,a;return R(function(o){switch(o.g){case 1:if(i=(n=e.Kb.g).Fb(!1),!n.aesKey||i){o.u(2);break}return b(o,sE(t,n.aesKey,e.Kb.j),3);case 3:t=o.h;case 2:return r=fH(n),b(o,e5.addSegments([{data:t}]),4);case 4:a=o.h,tt(),e7[r]=a[0],te+=t.byteLength,w(o)}})}}(r),(c=r.Kb.g.Fb(!1))?function(e,t,n,i,r,a){rf(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new eC(2,9,7001);if(r){var t=eh(n);for(var o in(t=new rP(t)).data){var s=Number(o);e.m(t.data[s],t.g[s])}}return e.g.close(i,n.byteLength),e.o(fq(e.g),e.g.g),a(n)});e.i.set(t,o)}(e3,r.Kb.groupId,c,o,s,l):function(e,t,n,i,r,a){rf(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){var t,o,s,u,l,c;return R(function(d){if(1==d.g)return b(d,function(e,t){var n,i,r,a;return R(function(o){return 1==o.g?(n=rc,i=e.s.request(n,t),r=function(){return i.abort()},e.j.push(r),b(o,i.promise,2)):(a=o.h,eE(e.j,r),o.return(a.data))})}(e,n),2);if(t=d.h,e.h.g)throw new eC(2,9,7001);if(r)for(s in(o=new rP(eh(t))).data)u=Number(s),l=o.data[u],c=o.g[u],e.m(l,c);return e.g.close(i,t.byteLength),e.o(fq(e.g),e.g.g),d.return(a(t))})});e.i.set(t,o)}(e3,r.Kb.groupId,a,o,s,l);return b(d,(f=e3,R(function(e){return 1==e.g?b(e,Promise.all(f.i.values()),2):e.return(f.g.g)})),2)}return(tt(),!t||e3.l)?d.u(0):(gS(e6,e2,e8,e9),b(d,e5.updateManifest(e1,e2),0))})},ti=!1,x(e,2),!gx(e6)||!ti||gT(e6)){e.u(4);break}return b(e,tn(e0.filter(function(e){return e.h}),!0),5);case 5:return tt(),e0=e0.filter(function(e){return!e.h}),tr=e7,ta=te,e7={},te=0,b(e,gw(e5,e1,e2,tr,ta,function(){return gE(eZ)}),6);case 6:tt();case 4:if(ti){e.u(7);break}return b(e,tn(e0,!1),8);case 8:return tt(),to=e7,ts=te,e7={},te=0,b(e,gw(e5,e1,e2,to,ts,function(){return tt()}),9);case 9:tt();case 7:S(e,0);break;case 2:return tu=A(e),tl=Object.values(e7),b(e,e5.removeSegments(tl,function(){}),10);case 10:throw tu}})),20);case 20:return gE(a),gS(I,B,g,O),b(e,v.Na.updateManifest(y,B),21);case 21:return gE(a),H=new gr("manifest",v.path.xb,v.path.Na,y),e.return(gp(H,B));case 3:return k(e),b(e,m.destroy(),22);case 22:if(!f){e.u(23);break}return b(e,f.stop(),23);case 23:if(!g){e.u(25);break}return b(e,g.destroy(),25);case 25:E(e,0);break;case 2:if(G=A(e),null==y){e.u(27);break}return b(e,gb(y),27);case 27:throw T||G}})),function(){return fX(Y)})).finally(function(){eE(X.l,Y)}),K=this,z=(q=t).promise,K.i.push(z),q.finally(function(){eE(K.i,z)})},c.remove=function(e){var t,n,i,r,a,o,s;return gM(this,(t=this,n=e,R(function(e){switch(e.g){case 1:if(gI(),null==(i=ga(n))||"manifest"!=i.g)throw new eC(2,9,9004,n);return r=i,a=new f4,T(e,2),b(e,a.init(),4);case 4:return b(e,f6(a,r.xb(),r.Na()),5);
1case 5:return o=e.h,b(e,o.getManifests([r.key()]),6);case 6:var l,c,d;return s=e.h[0],b(e,Promise.all([(l=t,c=s,d=a,R(function(e){var t,n,i,r,a,o,s;return b(e,(t=l.g,n=l.h.drm,i=d,r=c,R(function(e){return 1==e.g?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new eC(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(i),b(e,gh(n,t,o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:gA(r,!1),videoCapabilities:gA(r,!0)}})),2)):e.return():3!=e.g?(s=e.h,b(e,a.remove(s),3)):b(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=u(e.streams);for(var n=e.next();!n.done;n=e.next()){n=u(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 gp(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(o,r,s)]),2);case 2:return k(e),b(e,a.destroy(),8);case 8:E(e,0)}})))},c.fj=function(){var e,t,n,i,r,a,o,s,l,c,d;return gM(this,(e=this,R(function(h){switch(h.g){case 1:return gI(),t=e.g,n=e.h.drm,i=new f4,r=!1,T(h,2),b(h,i.init(),4);case 4:var p,f;a=[],p=i,f=function(e){return a.push(e)},p.g.forEach(function(e){f(e.getEmeSessionCell())}),s=(o=u(a)).next();case 5:if(s.done){h.u(2);break}return b(h,(l=s.value).getAll(),8);case 8:return c=h.h,b(h,gh(n,t,c),9);case 9:return d=h.h,b(h,l.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),h.u(5);break;case 2:return k(h),b(h,i.destroy(),11);case 11:E(h,3);break;case 3:return h.return(!r)}})))},c.list=function(){var e,t,n;return gM(this,R(function(i){switch(i.g){case 1:return gI(),e=[],t=new f4,T(i,2),b(i,t.init(),4);case 4:var r,a;return n=Promise.resolve(),r=t,a=function(t,i){n=n.then(function(){return R(function(n){if(1==n.g)return b(n,i.getAllManifests(),2);n.h.forEach(function(n,i){n=gp(new gr("manifest",t.xb,t.Na,i),n),e.push(n)}),w(n)})})}
1,r.g.forEach(function(e,t){e.getCells().forEach(function(e,n){a({xb:t,Na:n},e)})}),b(i,n,2);case 2:return k(i),b(i,t.destroy(),6);case 6:E(i,3);break;case 3:return i.return(e)}}))},c.Hc=function(e,t,n,i){var r,a=this;return R(function(o){var s,u,l;return 1==o.g?((r=new rN({Sb:a.g,onError:t,le:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),b(o,(s=r,u=e.variants,l=i,s.ja=!0,s.B=new Map,s.O=l,rU(s,u,!1)),2)):3!=o.g?b(o,r_(r),3):o.return(r)})},B("shaka.offline.Storage",gv),gv.deleteAll=function(){var e;return R(function(t){var n,i,r;return 1==t.g?(e=new f4,T(t,2),b(t,(n=e,R(function(e){return 1==e.g?((r=0<(i=Array.from(n.g.values())).length)||f9.forEach(function(e){(e=e())&&i.push(e)}),b(e,Promise.all(i.map(function(e){return e.erase()})),2)):r?e.u(0):b(e,Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.g?(k(t),b(t,e.destroy(),5)):E(t,0)})},gv.prototype.list=gv.prototype.list,gv.prototype.removeEmeSessions=gv.prototype.fj,gv.prototype.remove=gv.prototype.remove,gv.prototype.store=gv.prototype.store,gv.prototype.getNetworkingEngine=gv.prototype.wb,gv.prototype.getConfiguration=gv.prototype.getConfiguration,gv.prototype.configure=gv.prototype.configure,gv.prototype.destroy=gv.prototype.destroy,gv.support=gy;var gD=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");function gR(){}function gP(e,t){for(e={priority:t||0,callback:e},t=0;t<gL.length;t++)if(gL[t].priority<e.priority)return void gL.splice(t,0,e);gL.push(e)}u5("offline",gy),B("shaka.polyfill",gR),gR.register=gP,gR.installAll=function(){for(var e=u(gL),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){q("Error installing polyfill!",e)}}};var gL=[];function gN(){}function gj(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=u(["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 gU(){}function gO(){e$()||e4("Sky_STB")||ye()}function g_(){}function gB(){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",gF),document.addEventListener("webkitfullscreenerror",gF),document.addEventListener("mozfullscreenchange",gF),document.addEventListener("mozfullscreenerror",gF),document.addEventListener("MSFullscreenChange",gF),document.addEventListener("MSFullscreenError",gF)}}function gF(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 gV(){}function gH(){var e=!0;(eX()&&!e1()&&!e2()||eY()||eJ()||e$()||ez()||eK()||eQ()||e5()&&!eY())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),gV.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=gG)}function gG(t){var n,i,r,a,o;return R(function(s){switch(s.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},i=t.video,r=t.audio,"media-source"!=t.type){if("file"!=t.type||i&&!eV(i.contentType)||r&&!eV(r.contentType))return s.return(n);s.u(2);break}if(!eF())return s.return(n);if(!i){s.u(3);break}return b(s,(u=i,R(function(t){var n,i,r,a,o;return 1==t.g?eX()?b(t,(n=u,R(function(t){if(1==t.g){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return t.return(Z(n.contentType));switch(i=n.contentType,n.width&&n.height&&1280<n.width&&720<n.height&&(i+="; width="+n.width+"; height="+n.height),n.framerate&&(24>(r=Math.round(n.framerate))||30<r)&&(i+="; framerate="+n.framerate),n.transferFunction||""){case"":case"srgb":break;case"pq":i+="; eotf=smpte2084";break;case"hlg":i+="; eotf=arib-std-b67";break;default:return t.return(!1)}return a=!1,(o=gK).has(i)?(a=o.get(i),t.u(2)):b(t,cast.__platform__.canDisplayType(i),3)}return 2!=t.g&&(a=t.h,o.set(i,a)),t.return(a)})),3):t.u(2):2!=t.g?(l=t.h,t.return(l)):t.return(Z(u.contentType))})),4);case 4:if(!s.h)return s.return(n);case 3:if(r){var u,l,c,d,h,p,f,g,m,v,y,w,T,k,E,I,M=r.contentType;if(eX()&&r.spatialRendering&&(M+="; spatialRendering=true"),!Z(M))return s.return(n)}case 2:if(!t.keySystemConfiguration)return n.supported=!0,s.return(n);return a=t.keySystemConfiguration,b(s,(c=i,d=r,h=a,R(function(e){switch(e.g){case 1:if(p=[],f=[],h.audio&&(g={robustness:h.audio.robustness||"",contentType:d.contentType},eK()&&d.contentType.includes('codecs="ac-3"')&&(g.contentType='audio/mp4; codecs="ec-3"'),h.audio.encryptionScheme&&(g.encryptionScheme=h.audio.encryptionScheme),p.push(g)),h.video&&(m={robustness:h.video.robustness||"",contentType:c.contentType},h.video.encryptionScheme&&(m.encryptionScheme=h.video.encryptionScheme),f.push(m)),v={initDataTypes:[h.initDataType],distinctiveIdentifier:h.distinctiveIdentifier,persistentState:h.persistentState,sessionTypes:h.sessionTypes},p.length&&(v.audioCapabilities=p),f.length&&(v.videoCapabilities=f),y=c?c.contentType:"",w=d?d.contentType:"",T=n5(y)+";"+n4(y),k=n5(w)+";"+n4(w),E=h.keySystem,I=null,x(e,2),eO.has(T+"#"+k+"#"+E)){I=eO.get(T+"#"+k+"#"+E)||null,e.u(4);break}return b(e,navigator.requestMediaKeySystemAccess(h.keySystem,[v]),5);case 5:I=e.h,eO.set(T+"#"+k+"#"+E,I);case 4:S(e,3);break;case 2:A(e);case 3:return e.return(I)}})),6);case 6:(o=s.h)&&(n.supported=!0,n.keySystemAccess=o);case 5:return s.return(n)}})}gR.Aria=gN,gN.install=gj,gP(gj),gR.EncryptionScheme=gU,gU.install=gO,gP(gO,-2),gR.Fullscreen=g_,g_.install=gB,gP(gB),gR.MediaCapabilities=gV,gV.install=gH,gV.originalMcap=null;var gK=new Map;function gq(){}function gz(){var t,n=eZ();(e.MediaSource||e.ManagedMediaSource)&&(n&&e.MediaSource?12>=n?(gX(),gW()):15>=n&&gX():e4("DT_STB_BCM")?(gX(),gW()):(e4("Tizen 2")||eq()||e4("Tizen 4"))&&function(){var t=MediaSource.isTypeSupp
1orted.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return"opus"!=n4(e)&&t(e)},e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"opus"!=n4(e)&&n(e)}}}()),(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=n2(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=n2(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(t=MediaSource.isTypeSupported,ez()||(MediaSource.isTypeSupported=function(e){var n=e.split(/ *; */),i=n.findIndex(function(e){return e.startsWith("codecs=")});if(0>i)return t(e);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex(function(e){return e.startsWith("vp09")});return 0<=a&&(r[a]="vp9",n[i]='codecs="'+r.join(",")+'"',e=n.join("; ")),t(e)}))}function gX(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,P.apply(0,arguments));return t.abort=function(){},t}}function gW(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function gY(){}function gJ(){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 g$;screen.orientation=n,t(),e.addEventListener("orientationchange",function(){t();var e=new i8("change");n.dispatchEvent(e)})}())}function g$(){re.call(this),this.type="",this.angle=0}function gQ(){}function gZ(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&e.shakaMediaKeysPolyfill!=g7&&((void 0===t?0:t)&&(yn=!0,yi=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),yr=HTMLMediaElement.prototype.setMediaKeys,ya=e.MediaKeys,yo=e.MediaKeySystemAccess,ys=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=g1,e.MediaKeys=g4,e.MediaKeySystemAccess=g3,navigator.requestMediaKeySystemAccess=g0,e.shakaMediaKeysPolyfill=g7,iG.clear(),eO.clear())}function g0(e,t){try{var n=new g3(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function g1(e){var t=this.mediaKeys;return t&&t!=e&&g5(t,null),delete this.mediaKeys,(this.mediaKeys=e)?g5(e,this):Promise.resolve()}function g2(e){if(ef(e=eh(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=ta(e=ti(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=ed(e),this.dispatchEvent(t)}function g3(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=u(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=u(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(a=(n=u(n.videoCapabilities)).next();!a.done;a=n.next())(a=a.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));
1i||(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 g4(e){this.h=new WebKitMediaKeys(e),this.g=new J}function g5(e,t){if(e.g.La(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",g2);try{return o$(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function g6(e){re.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new J,this.sessionId="",this.expiration=NaN,this.closed=new i0,this.keyStatuses=new g9}function g8(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new i8("keystatuseschange"),e.dispatchEvent(t)}function g9(){this.size=0,this.g=void 0}gP(gH,-1),gR.MediaSource=gq,gq.install=gz,gP(gz),gR.Orientation=gY,gY.install=gJ,g(g$,re),g$.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))},g$.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},gP(gJ),gR.PatchedMediaKeysApple=gQ,gQ.uninstall=function(){e.shakaMediaKeysPolyfill==g7&&yn&&(yn=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",yi),HTMLMediaElement.prototype.setMediaKeys=yr,e.MediaKeys=ya,e.MediaKeySystemAccess=yo,navigator.requestMediaKeySystemAccess=ys,yi=ys=yr=yo=ya=null,e.shakaMediaKeysPolyfill="",iG.clear(),eO.clear())},gQ.install=gZ,g3.prototype.createMediaKeys=function(){return Promise.resolve(new g4(this.keySystem))},g3.prototype.getConfiguration=function(){return this.g},g4.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new g6(this.h,e)},g4.prototype.setServerCertificate=function(){return Promise.resolve(!1)},g4.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},g(g6,re),(c=g6.prototype).generateRequest=function(e,t){var n=this;this.h=new i0;try{var i=this.l.createSession("video/mp4",eh(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=(new Map).set("messageType",void 0==n.keyStatuses.ac()?"license-request":"license-renewal").set("message",ed(e.message)),e=new i8("message",e),n.dispatchEvent(e)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(g8(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");if(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:g8(n,"output-not-allowed");break;default:g8(n,"internal-error")}}),g8(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},c.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},c.update=function(e){this.g=new i0;try{this.i.update(eh(e))}catch(e){this.g.reject(e)}return this.g},c.close=function(){try{this.i.close(),this.closed.resolve(),this.j.La()}catch(e){this.closed.reject(e)}return this.closed},c.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(c=g9.prototype).ac=function(){return this.g},c.forEach=function(e){this.g&&e(this.g,eU.value())},c.get=function(e){if(this.has(e))return this.g},c.has=function(e){var t=eU.value();return!!(this.g&&ec(e,t))},c.entries=function(){},c.keys=function(){},c.values=function(){};var g7="apple";function me(){}function mt(){e.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||eq()||e4("Tizen 4")||e4("Tizen 5.0")||ez()&&38===eW())&&(MediaKeys.prototype.setServerCertificate=mn)}function mn(){return Promise.resolve(!1)}function mi(){}function mr(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
1(HTMLMediaElement.prototype.webkitGenerateKeyRequest)mm="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=mo,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ms,e.MediaKeys=ml,e.MediaKeySystemAccess=mu,e.shakaMediaKeysPolyfill=mv}}function ma(e){var t=mm;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function mo(e,t){try{var n=new mu(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function ms(e){var t=this.mediaKeys;return t&&t!=e&&mc(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&mc(e,this),Promise.resolve()}function mu(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=u(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 l=u(a.audioCapabilities),c=l.next();!c.done;c=l.next())(c=c.value).contentType&&(s=!0,r.canPlayType(c.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(c),i=!0));if(a.videoCapabilities)for(c=(l=u(a.videoCapabilities)).next();!c.done;c=l.next())(c=c.value).contentType&&(s=!0,r.canPlayType(c.contentType,this.g)&&(o.videoCapabilities.push(c),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 ml(e){this.l=e,this.h=null,this.g=new J,this.i=[],this.j=new Map}function mc(e,t){e.h=t,e.g.La();var n=mm;t&&(e.g.D(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=ed(t.initData),e.h.dispatchEvent(n)}),e.g.D(t,n+"keymessage",function(t){var n=md(e,t.sessionId);n&&(t=new i8("message",t=(new Map).set("messageType",void 0==n.keyStatuses.ac()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}),e.g.D(t,n+"keyadded",function(t){(t=md(e,t.sessionId))&&t.ready()}),e.g.D(t,n+"keyerror",function(t){var n=md(e,t.sessionId);if(n){var i=Error("EME v0.1b key error"),r=t.errorCode;r.systemCode=t.systemCode,i.errorCode=r,!t.sessionId&&n.h?(45==t.systemCode&&(i.message="Unsupported session type."),n.h.reject(i),n.h=null):t.sessionId&&n.g?(n.g.reject(i),n.g=null):(i=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?mf(n,"output-restricted"):1==i?mf(n,"expired"):mf(n,"internal-error"))}}))}function md(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 mh(e,t,n){re.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 i0,this.keyStatuses=new mg}function mp(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=eh(ta("LOAD_SESSION|"+n));else{var r=ta("PERSISTENT|");i=nV(r,t)}else i=eh(t)}catch(e){return Promise.reject(e)}e.h=new i0;var a=ma("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new eB(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).$(.01)}return e.h}function mf(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new i8("keystatuseschange"),e.dispatchEvent(t)}function mg(){this.size=0,this.g=void 0}gP(function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||gZ())}),gR.PatchedMediaKeysCert=me,me.install=mt,gP(mt),gR.PatchedMediaKeysWebkit=mi,mi.install=mr,mu.prototype.createMediaKeys=function(){return Promise.resolve(new ml(this.g))},mu.prototype.getConfiguration=function(){return this.h},ml.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 mh(t,this.l,e),this.i.push(e),e},ml.prototype.setServerCertificate=function(){return Promise.resolve(!1)},ml.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},g(mh,re),(c=mh.prototype).ready=function(){mf(this,"usable"),this.g&&this.g.resolve(),this.g=null},c.generateRequest=function(e,t){return mp(this,t,null)},c.load=function(e){return"persistent-license"==this.l?mp(this,null,e):Prom
1ise.reject(Error("Not a persistent session."))},c.update=function(e){var t=new i0;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=tn(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=n_(a.keys[0].k),a=n_(a.keys[0].kid)}else r=eh(i),a=null;var o=ma("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},c.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=ma("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},c.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(c=mg.prototype).ac=function(){return this.g},c.forEach=function(e){this.g&&e(this.g,eU.value())},c.get=function(e){if(this.has(e))return this.g},c.has=function(e){var t=eU.value();return!!(this.g&&ec(e,t))},c.entries=function(){},c.keys=function(){},c.values=function(){};var mm="",mv="webkit";function my(){}function mb(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=mx,Object.defineProperty(t,"disablePictureInPicture",{get:mS,set:mA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=mT,document.addEventListener("webkitpresentationmodechanged",mw,!0))}}function mw(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 mx(){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 mT(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function mS(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function mA(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function mk(){}function mE(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=mI))}function mI(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function mM(){}function mC(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:mD})}function mD(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function mR(){}function mP(){for(var e=u([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next())(t=t.value).prototype.indexOf||(t.prototype.indexOf=mL),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=mN),t.prototype.includes||(t.prototype.includes=mj)}function mL(e,t){return Array.prototype.indexOf.call(this,e,t)}function mN(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function mj(e,t){return -1!==this.indexOf(e,t)}function mU(){}function mO(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function m_(){}function mB(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||ez()&&38===eW())&&(t.getVideoPlaybackQuality=mF)}}function mF(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function mV(){}function mH(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=mG;else if(6==n)t=mK;else{try{var i=!!mG(1,2,"")}catch(e){i=!1}i&&(t=mG)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function mG(t,n,i){return new e.TextTrackCue(t,n,i)}
1function mK(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function mq(){}gP(mr),gR.PiPWebkit=my,my.install=mb,gP(mb),gR.RandomUUID=mk,mk.install=mE,gP(mE),gR.Symbol=mM,mM.install=mC,gP(mC),gR.TypedArray=mR,mR.install=mP,gP(mP),gR.VideoPlayPromise=mU,mU.install=mO,gP(mO),gR.VideoPlaybackQuality=m_,m_.install=mB,gP(mB),gR.VTTCue=mV,mV.install=mH,gP(mH),mq.prototype.parseInit=function(){},mq.prototype.setSequenceMode=function(){},mq.prototype.setManifestType=function(){},mq.prototype.parseMedia=function(e,t){var n=null,i=[];e=u(e=tn(e).split(/\r?\n/));for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=mz.exec(r))){var a=mX.exec(r[1]);r=new tJ(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},B("shaka.text.LrcTextParser",mq),mq.prototype.parseMedia=mq.prototype.parseMedia,mq.prototype.setManifestType=mq.prototype.setManifestType,mq.prototype.setSequenceMode=mq.prototype.setSequenceMode,mq.prototype.parseInit=mq.prototype.parseInit;var mz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,mX=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function mW(){}function mY(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&4==(t=t[1].split(",")).length?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function mJ(e,t){t=u(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(nl)||e.textDecoration.push(nl);break;case"noUnderline":e.textDecoration.includes(nl)&&eE(e.textDecoration,nl);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&eE(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&eE(e.textDecoration,"overline")}}function m$(e,t,n,i,r){return r=void 0===r||r,(e=mZ(e,n,i))?e:r?mQ(t,n,i):null}function mQ(e,t,n){if(!e)return null;var i=tL(e,vl,n);return i||m0(e,t,n)}function mZ(e,t,n){var i=tL(e,vl,n);return i||m0(e,t,n)}function m0(e,t,n){e=m1(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=tR(e[r],"urn:ebu:tt:style",n);a||(a=tL(e[r],vl,n)),a||(a=mZ(e[r],t,n)),a&&(i=a)}return i}function m1(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;!e&&!(e=r?tR(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e){for(r=(t=u(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=u(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}}return a}function m2(e,t){var n=m3(e.attributes.begin,t),i=m3(e.attributes.end,t);return e=m3(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function m3(e,t){var n=null;if(ve.test(e)){n=Number((e=ve.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(vt.test(e))n=m4(vt,e);else if(vn.test(e))n=m4(vn,e);else if(vi.test(e))n=Number((e=vi.exec(e))[1])/t.frameRate;else if(vr.test(e))n=Number((e=vr.exec(e))[1])/t.g;else if(va.test(e))n=m4(va,e);else if(e)throw new eC(2,2,2001,"Could not parse cue time range in TTML");return n}function m4(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 m5(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]))}it("application/x-subtitle-lrc",function(){return new mq}),mW.prototype.parseInit=function(){},mW.prototype.setSequenceMode=function(){},mW.prototype.setManifestType=function(){},mW.prototype.parseMedia=function(e,t,n,i){var r,a=tn(e);if(e=[],""==a)return e;var o=tw(a,"tt",!0);if(!o)throw new eC(2,2,2005,"Failed to parse TTML.");if(!(a=tI(o,"body")[0]))return[];var s=tL(o,vu,"frameRate"),l=tL(o,vu,"subFrameRate"),c=tL(o,vu,"frameRateMultiplier"),d=tL(o,vu,"tickRate"),h=tL(o,vu,"cellResolution"),p=o.attributes["xml:space"]||"default",f=tL(o,vl,"extent");
1if("default"!=p&&"preserve"!=p)throw new eC(2,2,2005,"Invalid xml:space value: "+p);p="default"==p,s=new m5(s,l,c,d),h=(r=h)&&(r=/^(\d+) (\d+)$/.exec(r))?{mc:parseInt(r[1],10),rows:parseInt(r[2],10)}:null,l=((l=tI(o,"metadata")[0])?l.children:[]).filter(function(e){return"\n"!=e}),c=tI(o,"style"),o=tI(o,"region"),d=[];for(var g=u(o),m=g.next();!m.done;m=g.next())(m=function(e,t,n){var i=new eT,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=m6.exec(n)||m7.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var a,o=mQ(e,t,"extent");if(o){var s=(a=m6.exec(o))||m7.exec(o);null!=s&&(i.width=Number(s[1]),i.height=Number(s[2]),a||(null!=n&&(i.width=100*i.width/n),null!=r&&(i.height=100*i.height/r)),i.widthUnits=a||null!=n?eS:0,i.heightUnits=a||null!=r?eS:0)}return(e=mQ(e,t,"origin"))&&null!=(s=(a=m6.exec(e))||m7.exec(e))&&(i.viewportAnchorX=Number(s[1]),i.viewportAnchorY=Number(s[2]),a?o||(i.width=100-i.viewportAnchorX,i.widthUnits=eS,i.height=100-i.viewportAnchorY,i.heightUnits=eS):(null!=r&&(i.viewportAnchorY=100*i.viewportAnchorY/r),null!=n&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=a||null!=n?eS:0),i}(m.value,c,f))&&d.push(m);if(tA(a,"p").length)throw new eC(2,2,2001,"<p> can only be inside <div> in TTML");for(g=(f=u(tA(a,"div"))).next();!g.done;g=f.next())if(tA(g.value,"span").length)throw new eC(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,l,c,d,h,p,f){var g,m,v,y,b=d;if(tT(t)){if(!h)return null;var w={tagName:"span",children:[tk(t)],attributes:{},parent:null}}else w=t;for(var x=null,T=u(vc),S=T.next();!S.done&&!(x=m1(w,"backgroundImage",r,"#",S.value)[0]);S=T.next());T=null;var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((S=tL(w,vc,"backgroundImage"))&&A.test(S)){if((T=parseInt(S.split(":").pop(),10)-1)>=f.length)return null;T=f[T]}else p&&S&&!S.startsWith("#")&&(A=new nw(p),S=new nw(S),(S=A.resolve(S).toString())&&(T=S));if(("p"==t.tagName||x||T)&&(h=!0),t=h,S="default"==(w.attributes["xml:space"]||(l?"default":"preserve")),A=w.children.every(tT),l=[],!A)for(var k=u(w.children),E=k.next();!E.done;E=k.next())(E=e(E.value,n,i,r,a,o,s,S,c,w,h,p,f))&&l.push(E);if(r=null!=d,p=tk(w),p=w.children.length&&p&&/\S/.test(p),!((k=w.attributes.begin||w.attributes.end||w.attributes.dur)||p||"br"==w.tagName||0!=l.length||r&&!S))return null;for(p=(f=m2(w,i)).start,f=f.end;b&&b.tagName&&"tt"!=b.tagName;){p=(g=b,m=i,v=p,y=f,g=m2(g,m),null==v?v=g.start:null!=g.start&&(v+=g.start),null==y?y=g.end:null!=g.start&&(y+=g.start),f={start:v,end:y}).start,f=f.end,b=b.parent}if(null==p&&(p=0),p+=n.periodStart,f=null==f?1/0:f+n.periodStart,p=Math.max(p,n.segmentStart),f=Math.min(f,n.segmentEnd),!k&&0<l.length)for(p=1/0,f=0,i=(n=u(l)).next();!i.done;i=n.next())p=Math.min(p,(i=i.value).startTime),f=Math.max(f,i.endTime);if("br"==w.tagName)return(a=new tJ(p,f,"")).lineBreak=!0,a;if(n="",A&&(n=tu(tk(w)||""),S&&(n=n.replace(/\s+/g," "))),(n=new tJ(p,f,n)).nestedCues=l,h||(n.isContainer=!0),c&&(n.cellResolution=c),c=m1(w,"region",o,"")[0],w.attributes.region&&c&&c.attributes["xml:id"]){var I=c.attributes["xml:id"];n.region=s.filter(function(e){return e.id==I})[0]}return s=c,d&&r&&!w.attributes.region&&!w.attributes.style&&(s=m1(d,"region",o,"")[0]),function(e,t,n,i,r,a,o,s){if("rtl"==m$(t,n,a,"direction",o=o||s)&&(e.direction="rtl"),"tb"==(s=m$(t,n,a,"writingMode",o))||"tblr"==s?e.writingMode="vertical-lr":"tbrl"==s?e.writingMode="vertical-rl":"rltb"==s||"rl"==s?e.direction="rtl":s&&(e.direction=t8),(s=m$(t,n,a,"textAlign",!0))?(e.positionAlign=vs.get(s),e.lineAlign=vo.get(s),e.textAlign=t4[s.toUpperCase()]):e.textAlign=t3,(s=m$(t,n,a,"displayAlign",!0))&&(e.displayAlign=t6[s.toUpperCase()]),(s=m$(t,n,a,"color",o))&&(e.color=mY(s)),(s=m$(t,n,a,"backgroundColor",o))&&(e.backgroundColor=mY(s)),(s=m$(t,n,a,"border",o))&&(e.border=s),s=m$(t,n,a,"fontFamily",o))switch(s){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=s.split(",").filter(function(e){return"default"!=e}).join(",")}switch((s=m$(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=na),e.wrapLine=!(s=m$(t,n,a,"wrapOption",o))||"noWrap"!=s,(s=m$(t,n,a,"lineHeight",o))&&s.match(m9)&&(e.lineHeight=s),(s=m$(t,n,a,"fontSize",o))&&(s.match(m9)||s.match(m8))&&(e.fontSize=s),(s=m$(t,n,a,"fontStyle",o))&&(e.fontStyle=nu[s.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,s=i.attributes.encoding,i=t
1k(i).trim(),"PNG"==r&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=m$(t,n,a,"textOutline",o))&&((i=i.split(" "))[0].match(m9)?e.textStrokeColor=e.color:(e.textStrokeColor=mY(i[0]),i.shift()),i[0]&&i[0].match(m9)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=m$(t,n,a,"letterSpacing",o))&&i.match(m9)&&(e.letterSpacing=i),(i=m$(t,n,a,"linePadding",o))&&i.match(m9)&&(e.linePadding=i),(i=m$(t,n,a,"opacity",o))&&(e.opacity=parseFloat(i)),(i=mQ(n,a,"textDecoration"))&&mJ(e,i),(i=mZ(t,a,"textDecoration"))&&mJ(e,i),(i=m$(t,n,a,"textCombine",o))&&(e.textCombineUpright=i),m$(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(n,w,s,x,T,a,t,0==l.length),n}(a,t,s,l,c,o,d,p,h,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},B("shaka.text.TtmlTextParser",mW),mW.prototype.parseMedia=mW.prototype.parseMedia,mW.prototype.setManifestType=mW.prototype.setManifestType,mW.prototype.setSequenceMode=mW.prototype.setSequenceMode,mW.prototype.parseInit=mW.prototype.parseInit;var m6=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,m8=/^(\d{1,4}(?:\.\d+)?|100)%$/,m9=/^(\d+px|\d+em|\d*\.?\d+c)$/,m7=/^(\d+)px (\d+)px$/,ve=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,vt=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,vn=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,vi=/^(\d*(?:\.\d*)?)f$/,vr=/^(\d*(?:\.\d*)?)t$/,va=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),vo=(new Map).set("left",ne).set("center","center").set("right","end").set("start",ne).set("end","end"),vs=(new Map).set("left","line-left").set("center","center").set("right","line-right"),vu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],vl=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],vc=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function vd(){this.g=new mW}function vh(){this.g="UNKNOWN"}function vp(e,t,n){var i,r,a;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?"middle"==(t=i[1])?e.textAlign=t3:e.textAlign=t4[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|auto))?$/.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"==t||"middle"==t?"center":t2)):(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=nt[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=t7,e.line=Number(n[1]),n[2]&&(e.lineAlign=nt[n[2].toUpperCase()]))}function vf(){this.g=null}function vg(){}function vm(){this.g=new vh}function vv(e){var t="WEBVTT\n\n";if(""==e)return t;e=u((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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return t}function vy(){}function vb(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 vw(e){return 3600*((e=vA.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}it("application/ttml+xml",function(){return new mW}),vd.prototype.parseInit=function(e){var t=!1;if((new rx).box("moov",rT).box("trak",rT).box("mdia",rT).box("minf",rT).box("stbl",rT).S("stsd",rS).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new eC(2,2,2007)},vd.prototype.setSequenceMode=function(){},vd.prototype.setManifestType=function(){},vd.prototype.parseMedia=function(e,t,n){var i=[],r=null,a=[],o=new Map,s=[];if((new rx).box("moof",rT).box("traf",rT).S("tfhd",function(e){r=a2(e.reader,e.flags).hd}).S("trun",function(e){e=u((e=a5(e.reader,e.version,e.flags)).ag);for(var t=e.next();!t.done;t=e.next())s.push(t.value.sampleSize||r||0)}).S("subs",function(e){for(var t=e.reader,n=t.R(),i=-1,r=0;r<n;r++){var a=t.R();i+=a,a=t.la();for(var s=[],u=0;u<a;u++)1==e.version?s.push(t.R()):s.push(t.la()),t.U(),t.U(),t.R();o.set(i,s)}}).box("mdat",rE(function(e){a.push(e)})).parse(e,!1),0==a.length)throw new eC(2,2,2007);for(var c=nV.apply(nj,l(a)),d=0,h=0;h<s.length;h++){var p=eh(c,d,s[h]);d+=s[h];var f=o.get(h);if(f&&f.length){p=eh(p,0,f[0]);for(var g=[],m=f[0],v=1;v<f.length;v++){var y=eh(e,m,f[v]);y=nU(y),g.push("data:image/png;base64,"+y),m+=f[v]}i=i.concat(this.g.parseMedia(p,t,n,g))}else i=i.concat(this.g.parseMedia(p,t,n,[]))}return i},B("shaka.text.Mp4TtmlParser",vd),vd.prototype.parseMedia=vd.prototype.parseMedia,vd.prototype.setManifestType=vd.prototype.setManifestType,vd.prototype.setSequenceMode=vd.prototype.setSequenceMode,vd.prototype.parseInit=vd.prototype.parseInit,it('application/mp4; codecs="stpp"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.im1i"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.im1t"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.im2i"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.im2t"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.etd1"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new vd}),it('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new vd}),it('application/mp4; codecs="stpp.TTML.im1t"',function(){return new vd}),vh.prototype.parseInit=function(){},vh.prototype.setSequenceMode=function(){},vh.prototype.setManifestType=function(e){this.g=e},vh.prototype.parseMedia=function(e,t){var n=(e=(e=tn(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new eC(2,2,2e3);if(e=t.vttOffset,"HLS"==this.g)if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i||null==(e=tg(e[1])))throw new eC(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=0x200000000;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],r=(i=u(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new tc(r);var a=new eT;tp(r),td(r);for(var o=tp(r);o;){var s=a,l=o;(o=/^id=(.*)$/.exec(l))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(l))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(l))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(l)&&(s.scroll="up"),td(r),o=tp(r)}t.push(a)}for(t0(i=new Map),r=[],a=(n=u(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(l=1,s=[],o=-1;l<a.length;l++)a[l].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[l]),a[l].includes("}")&&(o=-1));for(o=(s=u(s)).next();!o.done;o=s.next()){var c=o.value;o="global",(l=c[0].match(/\((.*)\)/))&&(o=l.pop()),l=c.slice(1,-1),c[0].includes("}")&&(c=/\{(.*?)\}/.exec(c[0]))&&(l=c[1].split(";")),(c=i.get(o))||(c=new tJ(0,0,""));for(var d=!1,h=0;h<l.length;h++){var p=/^\s*([^:]+):\s*(.*)/.exec(l[h]);if(p){var f=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":case"background":d=!0,c.backgroundColor=f;break;case"color":d=!0,c.color=f;break;case"font-family":d=!0,c.fontFamily=f;break;case"font-size":d=!0,c.fontSize=f;break;case"font-weight":(700<=parseInt(f,10)||"bold"==f)&&(d=!0,c.fontWeight=na);break;case"font-style":switch(f){case"normal":d=!0,c.fontStyle=no;break;case"italic":d=!0,c.fontStyle=ns;break;case"oblique":d=!0,c.fontStyle="oblique"}break;case"opacity":d=!0,c.opacity=parseFloat(f);break;case"text-combine-upright":d=!0,c.textCombineUpright=f;break;case"text-shadow":d=!0,c.textShadow=f;break;case"white-space":d=!0,c.wrapLine="noWrap"!=f}}}d&&i.set(o,c)}}if(c=a,d=e,1==c.length&&!c[0]||/^NOTE($|[ \t])/.test(c[0])||"STYLE"==c[0]||"REGION"==c[0])a=null;else if(a=null,c[0].includes("--\x3e")||(a=c[0],c.splice(0,1)),o=tf(s=new tc(c[0])),h=th(s,/[ \t]+--\x3e[ \t]+/g),l=tf(s),null==o||null==h||null==l)q("Failed to parse VTT time code. Cue skipped:",a,c),a=null;else{for(o+=d,l+=d,d=c.slice(1).join("\n").trim(),i.has("global")?((c=i.get("global").clone()).startTime=o,c.endTime=l,c.payload=d):c=new tJ(o,l,d),td(s),o=tp(s);o;)vp(c,o,t),td(s),o=tp(s);tZ(c,i),null!=a&&(c.id=a),a=c}a&&r.push(a)}return r},B("shaka.text.VttTextParser",vh),vh.prototype.parseMedia=vh.prototype.parseMedia,vh.prototype.setManifestType=vh.prototype.setManifestType,vh.prototype.setSequenceMode=vh.prototype.setSequenceMode,vh.prototype.parseInit=vh.prototype.parseInit,it("text/vtt",function(){return new vh}),it('text/vtt; codecs="vtt"',function(){return new vh}),it('text/vtt; codecs="wvtt"',function(){return new vh}),vf.prototype.parseInit=function(e){var t=this,n=!1;if((new rx).box("moov",rT).box("trak",rT).box("mdia",rT).S("mdhd",function(e){t.g=(e=a4(e.reader,e.version)).timescale}).box("minf",rT).box("stbl",rT).S("stsd",rS).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new eC(2,2,2008)},vf.prototype.setSequenceMode=function(){},vf.prototype.setManifestType=function(){},vf.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new eC(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,l=!1,c=null;if((new rx).box("moof",rT).box("traf",rT).S("tfdt",function(e){o=!0,i=a3(e.reader,e.version).baseMediaDecodeTime}).S("tfhd",function(e){c=a2(e.reader,e.flags).gd}
1).S("trun",function(e){s=!0,r=a5(e.reader,e.version,e.flags).ag}).box("mdat",rE(function(e){l=!0,n=e})).parse(e,!1),!l&&!o&&!s)throw new eC(2,2,2008);e=i;for(var d=new ry(n,0),h=u(r),p=h.next();!p.done;p=h.next()){var f=(p=p.value).bg||c,g=p.ue?i+p.ue:e;e=g+(f||0);var m=0;do{var v=d.R();m+=v;var y=d.R(),b=null;"vttc"==rM(y)?8<v&&(b=d.Ab(v-8)):d.skip(v-8),f&&b&&(v=function(e,t,n){var i,r,a;return(new rx).box("payl",rE(function(e){i=tn(e)})).box("iden",rE(function(e){r=tn(e)})).box("sttg",rE(function(e){a=tn(e)})).parse(e),i?function(e,t,n,i,r){if(tZ(e=new tJ(i,r,e)),t&&(e.id=t),n)for(n=tp(t=new tc(n));n;)vp(e,n,[]),td(t),n=tp(t);return e}(i,r,a,t,n):null}(b,t.periodStart+g/this.g,t.periodStart+e/this.g),a.push(v))}while(p.sampleSize&&m<p.sampleSize)}return a.filter(il)},B("shaka.text.Mp4VttParser",vf),vf.prototype.parseMedia=vf.prototype.parseMedia,vf.prototype.setManifestType=vf.prototype.setManifestType,vf.prototype.setSequenceMode=vf.prototype.setSequenceMode,vf.prototype.parseInit=vf.prototype.parseInit,it('application/mp4; codecs="wvtt"',function(){return new vf}),vg.prototype.parseInit=function(){},vg.prototype.setSequenceMode=function(){},vg.prototype.setManifestType=function(){},vg.prototype.parseMedia=function(e){var t=tn(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=u(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){var i=new tc((n=n.value.split("\n"))[0]),r=tf(i),a=th(i,/,/g);if(i=tf(i),null==r||null==a||null==i)throw new eC(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new tJ(r,i,n.slice(1).join("\n").trim()))}return e},B("shaka.text.SbvTextParser",vg),vg.prototype.parseMedia=vg.prototype.parseMedia,vg.prototype.setManifestType=vg.prototype.setManifestType,vg.prototype.setSequenceMode=vg.prototype.setSequenceMode,vg.prototype.parseInit=vg.prototype.parseInit,it("text/x-subviewer",function(){return new vg}),vm.prototype.parseInit=function(){},vm.prototype.setSequenceMode=function(){},vm.prototype.setManifestType=function(){},vm.prototype.parseMedia=function(e,t,n){return e=eh(ta(e=vv(e=tn(e)))),this.g.parseMedia(e,t,n,[])},B("shaka.text.SrtTextParser",vm),vm.srt2webvtt=vv,vm.prototype.parseMedia=vm.prototype.parseMedia,vm.prototype.setManifestType=vm.prototype.setManifestType,vm.prototype.setSequenceMode=vm.prototype.setSequenceMode,vm.prototype.parseInit=vm.prototype.parseInit,it("text/srt",function(){return new vm}),vy.prototype.parseInit=function(){},vy.prototype.setSequenceMode=function(){},vy.prototype.setManifestType=function(){},vy.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=u(r=tn(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var a=r.value;r=a,(a=vx.exec(a))&&(i=a[1],r=a[2]),"V4 Styles"==i||"V4+ Styles"==i?(t=r,t=n?t+"\n"+r:r):"Events"==i&&(n=n?n+"\n"+r:r)}for(i=[],r=null,e=(t=u(t.split(/\r?\n/))).next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=vT.exec(e))){if(e=a[1].trim(),a=a[2].trim(),"Format"==e)r=a.split(vS);else if("Style"==e){e=a.split(vS),a={};for(var o=0;o<r.length&&o<e.length;o++)a[r[o]]=e[o];i.push(a)}}for(r=[],t=null,a=(n=u(n.split(/\r?\n/))).next(),e={};!a.done;e={vh:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=vT.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(vS);else if("Dialogue"==a){o=o.split(vS),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new tJ(s=vw(a.Start),vw(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.vh=a.Style,(e=i.find(function(e){return function(t){return t.Name==e.vh}}(e)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=vb(n))&&(e.color=n),(n=t.BackColour)&&(n=vb(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=na),t.Italic&&(e.fontStyle=ns),t.Underline&&e.textDecoration.push(nl),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=t5,e.textAlign="start";break;case 2:e.displayAlign=t5,e.textAlign=t3;break;case 3:e.displayAlign=t5,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=t3;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=t3;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,e),r.push(o)}}return r},B("shaka.text.SsaTextParser",vy),vy.prototype.parseMedia=vy.prototype.parseMedia,vy.prototype.setManifestType=vy.prototype.setManifestType,vy.prototype.setSequenceMode=vy.prototype.setSequenceMode,vy.prototype.parseInit=v
1y.prototype.parseInit;var vx=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vT=/^\s*([^:]+):\s*(.*)/,vS=/\s*,\s*/,vA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function vk(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&0<(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)?{qd:n,fa:e}:null}function vE(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(i>n.length-1)return null;var r=((192&e[t+2])>>>6)+1,a=(1&e[t+2])<<2;return{sampleRate:n[i],channelCount:a|=(192&e[t+3])>>>6,codec:"mp4a.40."+r}}function vI(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(i<=n)&&((t+=i)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}function vM(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function vC(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(3<=n)return null;var i=63&e[t+4],r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|s>>2,(3&s)<<6|a<<3|o<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,ra:e,fa:r}}function vD(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function vR(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]))return null;var n=new oe(e.subarray(t+2));on(n,2),on(n,3);var i=oi(n,11)+1<<1,r=oi(n,2);if(3==r){r=[24e3,22060,16e3][r=oi(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=oi(n,2);var o=oi(n,3),s=oi(n,1);return(n=oi(n,5),t+i>e.byteLength)?null:(e=new Uint8Array([(8160&(e=Math.floor(i*r/(16*[1,2,3,6][a]))))>>5,(31&e)<<3,r<<6|n<<1,s|o<<1,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,ra:e,fa:i})}function vP(e){this.j=e,this.h=0,this.g=new Map,this.i=null}it("text/x-ssa",function(){return new vy}),(c=vM.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(n6(t)||"mp4a.40.2")+'"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){for(var r=eh(e),a=a1(r),o=a.length;o<r.length&&!vI(r,o);o++);if(e=1e3*n.endTime,(a=a0(a)).length&&n&&(a=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=a.data),!(a=vE(r,o)))return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=vk(r,o);if(!u)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));var l=u.qd+u.fa;o+l<=r.length&&s.push({data:r.subarray(o+u.qd,o+l),size:u.fa,duration:1024,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),o+=l}return e=Math.floor(e*(r=a.sampleRate)/1e3),i=new ac([i={id:t.id,type:"audio",codecs:a.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,jb:[],ra:new Uint8Array([]),za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.h,baseMediaDecodeTime:e,hb:s},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ad(i),this.g.set(n,t)),n=this.i!==t,i=am(i),this.i=t,this.h++,n?Promise.resolve(t=nV(t,i)):Promise.resolve(i)},B("shaka.transmuxer.AacTransmuxer",vM),vM.prototype.transmux=vM.prototype.transmux,vM.prototype.getOriginalMimeType=vM.prototype.getOriginalMimeType,vM.prototype.convertCodecs=vM.prototype.convertCodecs,vM.prototype.isSupported=vM.prototype.isSupported,vM.prototype.destroy=vM.prototype.destroy,nh("audio/aac",function(){return new vM("audio/aac")},ng),(c=vD.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?eq()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){e=eh(e);for(var r=a1(e),a=r.length;a<e.length&&!function(e,t){if(11===e[t]&&119===e[t+1]){var n,i,r=0,a=5;for(t+=5;0<a;){i=e[t];var o=Math.min(a,8),s=8-o;n=(i&(n=0xff000000>>>24+s<<s))>>s,r=r?r<<o|n:n,t+=1,a-=o}if(16>r)return!0}return!1}(e,a);a++);var o=1e3*n.endTime;(r=a0(r)).length&&n&&(r=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=vC(e,a);if(!l)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.ra,u.push({data:e.subarray(a,a+l.fa),size:l.fa,duration:1536,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),a+=l.fa}return e=Math.floor(o*r/1e3),i=new ac([i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,jb:[],ra:s,za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.h,baseMediaDecodeTime:e,hb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ad(i),this.g.set(n,t)),n=this.i!==t,i=am(i),this.i=t,this.h++,n?Promise.resolve(t=nV(t,i)):Promise.resolve(i)},B("shaka.transmuxer.Ac3Transmuxer",vD),vD.prototype.transmux=vD.prototype.transmux,vD.prototype.getOriginalMimeType=vD.prototype.getOriginalMimeType,vD.prototype.convertCodecs=vD.prototype.convertCodecs,vD.prototype.isSupported=vD.prototype.isSupported,vD.prototype.destroy=vD.prototype.destroy,nh("audio/ac3",function(){return new vD("audio/ac3")},ng),(c=vP.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){e=eh(e);for(var r=a1(e),a=r.length;a<e.length&&2935!=(e[a]<<8|e[a+1]);a++);var o=1e3*n.endTime;(r=a0(r)).length&&n&&(r=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=vR(e,a);if(!l)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.ra,u.push({data:e.subarray(a,a+l.fa),size:l.fa,duration:1536,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),a+=l.fa}return e=Math.floor(o*r/1e3),i=new ac([i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,jb:[],ra:s,za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.h,baseMediaDecodeTime:e,hb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ad(i),this.g.set(n,t)),n=this.i!==t,i=am(i),this.i=t,this.h++,n?Promise.resolve(t=nV(t,i)):Promise.resolve(i)},B("shaka.transmuxer.Ec3Transmuxer",vP),vP.prototype.transmux=vP.prototype.transmux,vP.prototype.getOriginalMimeType=vP.prototype.getOriginalMimeType,vP.prototype.convertCodecs=vP.prototype.convertCodecs,vP.prototype.isSupported=vP.prototype.isSupported,vP.prototype.destroy=vP.prototype.destroy,nh("audio/ec3",function(){return new vP("audio/ec3")},ng);var vL=[100,110,122,244,44,83,86,118,128,138,139,134];function vN(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==r&&15!==r&&3!==a){var o=e[t+3]>>6;r=1e3*vO[14*(3===n?3-i:3===i?3:4)+r-1],a=v_[3*(3===n?0:2===n?1:2)+a],n=vB[n][i];var s=vF[i],u=Math.floor(n*r/a+(e[t+2]>>1&1))*s,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&87>=l&&2===i&&224e3<=r&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,fa:u,ij:8*n*s}}return null}function vj(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function vU(e,t){if(t+1<e.length&&vj(e,t)){var n=vN(e,t),i=4;return n&&n.fa&&(i=n.fa),(t+=i)===e.length||t+1<e.length&&vj(e,t)}return!1}var vO=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],v_=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],vB=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],vF=[0,1,1,4];function vV(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function vH(e){this.h=e,this.g=null}function vG(e){this.h=e,(this.g=ph.get("ISOBoxer")())&&function(e){function t(){this._procFullBox(),1&this.flags&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var e=!0,n=0;16>n;n++)this.usertype[n]!==vq[n]&&(e=!1);
1e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function vK(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}(c=vV.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){for(var r,a=eh(e),o=a1(a).length;o<a.length&&!vU(a,o);o++);for(e=[];o<a.length;){var s=vN(a,o);if(!s)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));r||(r=s),o+s.fa<=a.length&&e.push({data:a.subarray(o,o+s.fa),size:s.fa,duration:1152,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),o+=s.fa}return r?(a=9e4*r.ij/r.sampleRate*this.h,i=new ac([i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r.sampleRate,duration:i,jb:[],ra:new Uint8Array([]),za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.h,baseMediaDecodeTime:a,hb:e},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ad(i),this.g.set(n,t)),n=this.i!==t,i=am(i),this.i=t,this.h++,n?Promise.resolve(t=nV(t,i)):Promise.resolve(i)):Promise.reject(new eC(2,3,3018,n?n.N()[0]:null))},B("shaka.transmuxer.Mp3Transmuxer",vV),vV.prototype.transmux=vV.prototype.transmux,vV.prototype.getOriginalMimeType=vV.prototype.getOriginalMimeType,vV.prototype.convertCodecs=vV.prototype.convertCodecs,vV.prototype.isSupported=vV.prototype.isSupported,vV.prototype.destroy=vV.prototype.destroy,nh("audio/mpeg",function(){return new vV("audio/mpeg")},ng),(c=vH.prototype).destroy=function(){},c.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=n6(e).split(","),n=nz("audio",t);return t=nz("video",t),!!n&&!t&&"mp3"==n3(n)&&Z(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},c.getOriginalMimeType=function(){return this.h},c.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new od,e=eh(e),"mp3"!=(e=this.g.parse(e)).jd().audio||"audio"!=r)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),e=(r=u(e.cb())).next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=vN(e,t))?(t+i.fa<=e.length&&(n=nV(n,e.subarray(t,t+i.fa))),t+=i.fa):t++;return Promise.resolve(n)},B("shaka.transmuxer.MpegTsTransmuxer",vH),vH.prototype.transmux=vH.prototype.transmux,vH.prototype.getOriginalMimeType=vH.prototype.getOriginalMimeType,vH.prototype.convertCodecs=vH.prototype.convertCodecs,vH.prototype.isSupported=vH.prototype.isSupported,vH.prototype.destroy=vH.prototype.destroy,nh("video/mp2t",function(){return new vH("video/mp2t")},nm),(c=vG.prototype).destroy=function(){},c.isSupported=function(e,t){var n=e.startsWith("mss/");return!!this.g&&!!n&&(t?Z(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Z(t)||Z(e)))},c.convertCodecs=function(e,t){return t.replace("mss/","")},c.getOriginalMimeType=function(){return this.h},c.transmux=function(e,t,n){if(!n)return Promise.resolve(eh(e));if(!t.mssPrivateData)return Promise.reject(new eC(2,3,3020,n?n.N()[0]:null));try{var i,r=this.g.parseBuffer(e),a=r.fetch("tfhd");a.track_ID=t.id+1;var o=r.fetch("tfdt"),s=r.fetch("traf");null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var u=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var c=r.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=r.fetch("sepiff");if(null!==d){d.type="senc",d.usertype=void 0;var h=r.fetch("saio");if(null===h){(h=this.g.createFullBox("saio",s)).version=0,h.flags=0,h.entry_count=1,h.offset=[0];var p=this.g.createFullBox("saiz",s);if(p.version=0,p.flags=0,p.sample_count=d.sample_count,p.default_sample_info_size=0,p.sample_info_size=[],2&d.flags)for(i=0;i<d.sample_count;i+=1)p.sample_info_size[i]=10+6*d.entry[i].NumberOfEntries;else p.default_sample_info_size=8}}a.flags&=0xfffffe,a.flags|=131072,u.flags|=1;var f=r.fetch("moof");u.data_offset=f.getLength()+8;var g=r.fetch("saio");null!==g&&(g.offset[0]=vK(f,"traf")+vK(s,"senc")+16);var m=eh(r.write());return Promise.resolve(m)}catch(e){return e instanceof eC?Promise.reject(e):Promise.reject(new eC(2,3,3022,n?n.N()[0]:null))}},B("shaka.transmuxer.MssTransmuxer",vG),vG.prototype.transmux=vG.prototype.transmux,vG.prototype.getOriginalMimeType=vG.prototype.getOriginalMimeType,vG.prototype.convertCodecs=vG.prototype.convertCodecs,vG.prototype.isSupported=vG.prototype.isSupported,vG.prototype.destroy=vG.prototype.destroy;var vq=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function vz(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}nh("mss/audio/mp4",function(){return new vG("mss/audio/mp4")},ng),nh("mss/video/mp4",function(){return new vG("mss/video/mp4")},ng),(c=vz.prototype).destroy=function(){this.i.clear(),this.h&&this.h.destroy()},c.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=n6(n).split(",");return n=nz("audio",i),i=nz("video",i),(!n||!!vX.includes(n=n3(n)))&&(!i||!!vW.includes(n=n3(i)))&&(t?Z(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Z(t)||Z(e)))},c.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=n6(t).replace("mp4a.40.34","mp3").split(",").map(function(e){return iC(e,"audio/mp4")}).map(iD).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},c.getOriginalMimeType=function(){return this.m},c.transmux=function(e,t,n,i,r){var a=eh(e);if("audio"==r&&!og(a)){for(var o=a1(a),s=o.length;s<a.length;s++)if(vU(a,s))return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));for(s=o.length;s<a.length;s++)if(vI(a,s))return this.h||(this.h=new vM("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new od;var c=this.j.parse(a),d=[],h=c.jd();try{var p=null;if("video"==r){switch(h.video){case"avc":var f=[],g=null,m=c.tc(),v=function(e){function t(e){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:e.pts,dts:e.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var e=[],t=u(r.nalus),n=t.next();!n.done;n=t.next()){var a=(n=n.value).fullData.byteLength,o=new Uint8Array(4);o[0]=a>>24&255,o[1]=a>>16&255,o[2]=a>>8&255,o[3]=255&a,e.push(o),e.push(n.fullData)}r.data=nV.apply(nj,l(e)),i.push(r)}}for(var i=[],r=null,a=!1,o=0;o<e.length;o++){var s=e[o],c=s.nalus,d=!1;r&&c.length&&!a&&(n(),t(s)),c=u(s.nalus);for(var h=c.next();!h.done;h=c.next()){h=h.value;var p=!1;switch(h.type){case 1:var f,g=!1;p=!0;var m=h.data;d&&4<m.length&&(ol(f=new oe(m)),oo(f),2===(m=oo(f))||4===m||7===m||9===m)&&(g=!0),g&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=g;break;case 5:p=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=!0;break;case 6:case 8:case 12:p=!0;break;case 7:d=p=!0;break;case 9:a=p=!0,r&&r.frame&&(n(),r=null),r||t(s);break;default:p=!1}r&&p&&r.nalus.push(h)}}return n(),i}(m);if(!v.length)throw new eC(2,3,3023,n?n.N()[0]:null);for(var y=0;y<v.length;y++){var b=v[y];null==g&&(g=b.dts);var w=void 0;w=y+1<v.length?(v[y+1].dts||0)-(b.dts||0):1<v.length?(b.dts||0)-(v[y-1].dts||0):9e4*(n.endTime-n.startTime),f.push({data:b.data,size:b.data.byteLength,duration:w,bb:Math.round((b.pts||0)-(b.dts||0)),flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:b.isKeyframe?2:1,gb:+!b.isKeyframe}})}for(var x=[],T=u(m),S=T.next();!S.done;S=T.next())x.push.apply(x,l(S.value.nalus));var A=function(e){if(!e.length)return null;var t=e.find(function(e){return 7==e.type});if(e=e.find(function(e){return 8==e.type}),!t||!e)return null;var n=new oe(t.data),i=ol(n);if(ol(n),ol(n),oa(n),vL.includes(i)&&(3===(i=oo(n))&&on(n,1),oa(n),oa(n),on(n,1),ou(n))){i=3!==i?8:12;for(var r=0;r<i;r++)ou(n)&&(6>r?oc(n,16):oc(n,64))}if(oa(n),0===(i=oo(n)))oo(n);else if(1===i)for(on(n,1),oa(n),oa(n),i=oo(n),r=0;r<i;r++)oa(n);oa(n),on(n,1);var a=oo(n),o=oo(n),s=oi(n,1);0===s&&on(n,1),on(n,1);var u=0,c=0,d=0,h=0;if(ou(n)&&(u=oo(n),c=oo(n),d=oo(n),h=oo(n)),r=i=1,ou(n)&&ou(n)){var p=ol(n);0<p&&16>=p?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][p-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][p-1]):255===p&&(i=oi(n,16),r=oi(n,16))}return n=(2-s)*(o+1)*16-2*d-2*h,a=16*(a+1)-2*u-2*c,u=[],t=t.fullData,u.push(t.byteLength>>>8&255),u.push(255&t.byteLength),u=u.concat.apply(u,l(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,l(e)),{height:n,width:a,za:e=new
1Uint8Array([1,u[3],u[4],u[5],255,225].concat(u,[1],t)),Fa:i,Ha:r}}(x);if(!A||null==g)throw new eC(2,3,3018,n?n.N()[0]:null);t.height=A.height,t.width=A.width,p={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,jb:[],ra:new Uint8Array([]),za:A.za,Fa:A.Fa,Ha:A.Ha,data:{Bb:this.g,baseMediaDecodeTime:g,hb:f},stream:t};break;case"hvc":var k=[],E=null,I=[],M=c.tc();if(!M.length)throw new eC(2,3,3023,n?n.N()[0]:null);for(var C=0;C<M.length;C++){var D=M[C],R=D.nalus;I.push.apply(I,l(R));for(var P=!1,L=[],N=!1,j=u(R),U=j.next();!U.done;U=j.next()){var O=U.value;switch(O.type){case 1:case 0:var _=N=!0;break;case 19:case 20:case 21:P=_=N=!0;break;case 32:case 33:case 34:case 39:case 40:_=!0;break;case 35:N=_=!0;break;default:_=!1}if(N&&_){var B=O.fullData.byteLength,F=new Uint8Array(4);F[0]=B>>24&255,F[1]=B>>16&255,F[2]=B>>8&255,F[3]=255&B,L.push(F),L.push(O.fullData)}}var V=L.length?{data:nV.apply(nj,l(L)),isKeyframe:P}:null;if(V){null==E&&null!=D.dts&&(E=D.dts);var H=void 0;H=C+1<M.length?(M[C+1].dts||0)-(D.dts||0):1<M.length?(D.dts||0)-(M[C-1].dts||0):9e4*(n.endTime-n.startTime),k.push({data:V.data,size:V.data.byteLength,duration:H,bb:Math.round((D.pts||0)-(D.dts||0)),flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:V.isKeyframe?2:1,gb:+!V.isKeyframe}})}}var G=function(e){if(!e.length)return null;var t,n,i,r,a,o,s,u,l,c,d=e.find(function(e){return 32==e.type}),h=e.find(function(e){return 33==e.type}),p=e.find(function(e){return 34==e.type});if(!d||!h||!p)return null;var f=(t=d.fullData,n=new oe(t,!0),ol(n),ol(n),oi(n,4),oi(n,2),oi(n,6),{Pf:(t=oi(n,3))+1,mg:n=ou(n)});e=function(e){ol(e=new oe(e,!0)),ol(e);var t=0,n=0,i=0,r=0;oi(e,4);var a=oi(e,3);ou(e);for(var o=oi(e,2),s=oi(e,1),u=oi(e,5),l=ol(e),c=ol(e),d=ol(e),h=ol(e),p=ol(e),f=ol(e),g=ol(e),m=ol(e),v=ol(e),y=ol(e),b=ol(e),w=[],x=[],T=0;T<a;T++)w.push(ou(e)),x.push(ou(e));if(0<a)for(T=a;8>T;T++)oi(e,2);for(T=0;T<a;T++)w[T]&&oi(e,88),x[T]&&ol(e);oo(e),3==(w=oo(e))&&oi(e,1),x=oo(e),T=oo(e),ou(e)&&(t+=oo(e),n+=oo(e),i+=oo(e),r+=oo(e));var S=oo(e),A=oo(e),k=oo(e);if(ou(e))for(var E=0;E<=a;E++)oo(e),oo(e),oo(e);else oo(e),oo(e),oo(e);if(oo(e),oo(e),oo(e),oo(e),oo(e),oo(e),ou(e)&&ou(e))for(E=0;4>E;E++)for(var I=0;I<(3===E?2:6);I++)if(ou(e)){var M=Math.min(64,1<<4+(E<<1));1<E&&os(e);for(var C=0;C<M;C++)os(e)}else oo(e);for(ou(e),ou(e),ou(e)&&(ol(e),oo(e),oo(e),ou(e)),E=oo(e),M=I=0;M<E;M++)if(C=!1,0!==M&&(C=ou(e)),C){M===E&&oo(e),ou(e),oo(e);for(var D=C=0;D<=I;D++){var R=ou(e),P=!1;R||(P=ou(e)),(R||P)&&C++}I=C}else{for(I=(D=oo(e))+(C=oo(e)),R=0;R<D;R++)oo(e),ou(e);for(D=0;D<C;D++)oo(e),ou(e)}if(ou(e))for(E=oo(e),I=0;I<E;I++){for(M=0;M<k+4;M++)oi(e,1);oi(e,1)}if(E=k=1,I=0,ou(e),ou(e),ou(e)){if(ou(e)&&(M=ol(e),C=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],D=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(k=C[M-1],E=D[M-1]):255===M&&(k=oi(e,16),E=oi(e,16))),ou(e)&&ou(e),ou(e)&&(oi(e,3),ou(e),ou(e)&&(ol(e),ol(e),ol(e))),ou(e)&&(oo(e),oo(e)),ou(e),ou(e),ou(e),(M=ou(e))&&(oo(e),oo(e),oo(e),oo(e)),ou(e)&&(oi(e,32),oi(e,32),ou(e)&&oo(e),ou(e)))for(D=!1,M=ou(e),C=ou(e),(M||C)&&((D=ou(e))&&(ol(e),oi(e,5),ou(e),oi(e,5)),oi(e,4),oi(e,4),D&&oi(e,4),oi(e,5),oi(e,5),oi(e,5)),R=0;R<=a;R++){var L=!0;P=1,ou(e)||(L=ou(e));var N=!1;if(L?oo(e):N=ou(e),N||(P=oo(e)+1),M){for(L=0;L<P;L++)oo(e),oo(e),D&&(oo(e),oo(e));ou(e)}if(C){for(L=0;L<P;L++)oo(e),oo(e),D&&(oo(e),oo(e));ou(e)}}ou(e)&&(ou(e),ou(e),ou(e),I=oo(e),oo(e),oo(e),oo(e),oo(e))}return{pf:b,wf:o,xf:s,vf:u,qf:l,rf:c,tf:d,uf:h,hf:p,jf:f,kf:g,lf:m,mf:v,nf:y,he:I,af:0,Ze:w,Ye:S,Xe:A,width:x-(t+n)*(1===w||2===w?2:1),height:T-(i+r)*(1===w?2:1),kj:k,jj:E}}(h.fullData);var g=(i=p.fullData,r=new oe(i,!0),ol(r),ol(r),oo(r),oo(r),ou(r),ou(r),oi(r,3),ou(r),ou(r),oo(r),oo(r),os(r),ou(r),ou(r),ou(r)&&oo(r),os(r),os(r),ou(r),ou(r),ou(r),ou(r),i=ou(r),r=ou(r),a=1,r&&i?a=0:r?a=3:i&&(a=2),{Rf:a});return o=d.fullData,s=h.fullData,u=p.fullData,l={Pf:f.Pf,mg:f.mg,wf:e.wf,xf:e.xf,pf:e.pf,vf:e.vf,qf:e.qf,rf:e.rf,tf:e.tf,uf:e.uf,hf:e.hf,jf:e.jf,kf:e.kf,lf:e.lf,mf:e.mf,nf:e.nf,af:e.af,he:e.he,Ze:e.Ze,Ye:e.Ye,Xe:e.Xe,Rf:g.Rf},(c=new Uint8Array(23+(5+o.byteLength)+(5+s.byteLength)+(5+u.byteLength)))[0]=1,c[1]=(3&l.wf)<<6|!!l.xf<<5|31&l.vf,c[2]=l.qf,c[3]=l.rf,c[4]=l.tf,c[5]=l.uf,c[6]=l.hf,c[7]=l.jf,c[8]=l.kf,c[9]=l.lf,c[10]=l.mf,c[11]=l.nf,c[12]=l.pf,c[13]=240|(3840&l.he)>>8,c[14]=255&l.he,c[15]=252|3&l.Rf,c[16]=252|3&l.Ze,c[17]=248|7&l.Ye,c[18]=248|7&l.Xe,c[19]=0,c[20]=0,c[21]=(3&l.af)<<6|(7&l.Pf)<<3|!!l.mg<<2|3,c[22]=3,c[23]=160,c[24]=0,c[25]=1,c[26]=(65280&o.byteLength)>>8,c[27]=255&o.byteLength,c.set(o,28),c[23+(5+o.byteLength)]=161,c[o.byteLength+29]=0,c[o.byteLength+30]=1,c[o.byteLength+31]=(65280&s.b
1yteLength)>>8,c[o.byteLength+32]=255&s.byteLength,c.set(s,o.byteLength+33),c[23+(o.byteLength+10+s.byteLength)]=162,c[o.byteLength+10+s.byteLength+24]=0,c[o.byteLength+10+s.byteLength+25]=1,c[o.byteLength+10+s.byteLength+26]=(65280&u.byteLength)>>8,c[o.byteLength+10+s.byteLength+27]=255&u.byteLength,c.set(u,o.byteLength+10+s.byteLength+28),d=c,{height:e.height,width:e.width,za:d,Fa:e.kj,Ha:e.jj}}(I);if(!G||null==E)throw new eC(2,3,3018,n?n.N()[0]:null);t.height=G.height,t.width=G.width,p={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,jb:[],ra:new Uint8Array([]),za:G.za,Fa:G.Fa,Ha:G.Ha,data:{Bb:this.g,baseMediaDecodeTime:E,hb:k},stream:t}}p&&(d.push(p),p=null)}if("audio"==r){switch(h.audio){case"aac":for(var K,q=[],z=null,X=null,W=null,Y=u(c.cb()),J=Y.next();!J.done;J=Y.next()){var $=J.value,Q=$.data;if(Q){var Z=0;if(-1==X&&W)Q=nV(W,$.data),X=null;else if(null!=X&&W){Z=Math.max(0,X);var ee=nV(W,Q.subarray(0,Z));q.push({data:ee,size:ee.byteLength,duration:1024,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),X=W=null}if(!(K=vE(Q,Z)))throw new eC(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=K.sampleRate,t.channelsCount=K.channelCount,null==z&&null!==$.pts&&(z=$.pts);Z<Q.length;){var et=vk(Q,Z);if(!et){W=Q.subarray(Z,Q.length),X=-1;break}var en=et.qd+et.fa;X=Math.max(0,Z+en-Q.length),0!=X?W=Q.subarray(Z+et.qd,Z+en):Z+en<=Q.length&&q.push({data:Q.subarray(Z+et.qd,Z+en),size:et.fa,duration:1024,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),Z+=en}}}if(!K||null==z){if(!c.tc().length)throw new eC(2,3,3018,n?n.N()[0]:null);z=9e4*n.startTime;var ei=nz("audio",t.codecs.split(","));if(!ei||!t.channelsCount||!t.audioSamplingRate)throw new eC(2,3,3018,n?n.N()[0]:null);K={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:ei};var er=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}(ei,t.channelsCount);if(!er)throw new eC(2,3,3018,n?n.N()[0]:null);for(var ea=z+9e4*(n.endTime-n.startTime),eo=z;eo<ea;)q.push({data:er,size:er.byteLength,duration:1024,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),eo+=1024/K.sampleRate*9e4}var es=K.sampleRate,eu=z/9e4*es;p={id:t.id,type:"audio",codecs:K.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:es,duration:i,jb:[],ra:new Uint8Array([]),za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.g,baseMediaDecodeTime:eu,hb:q},stream:t};break;case"ac3":for(var el=[],ec=0,ed=new Uint8Array([]),ep=null,ef=u(c.cb()),eg=ef.next();!eg.done;eg=ef.next()){var em=eg.value,ev=em.data;null==ep&&null!==em.pts&&(ep=em.pts);for(var ey=0;ey<ev.length;){var eb=vC(ev,ey);eb?(t.audioSamplingRate=eb.sampleRate,t.channelsCount=eb.channelCount,ec=eb.sampleRate,ed=eb.ra,el.push({data:ev.subarray(ey,ey+eb.fa),size:eb.fa,duration:1536,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),ey+=eb.fa):ey++}}if(0==ec||0==ed.byteLength||null==ep)throw new eC(2,3,3018,n?n.N()[0]:null);var ew=ep/9e4*ec;p={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ec,duration:i,jb:[],ra:ed,za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.g,baseMediaDecodeTime:ew,hb:el},stream:t};break;case"ec3":for(var ex=[],eT=0,eS=new Uint8Array([]),eA=null,ek=u(c.cb()),eE=ek.next();!eE.done;eE=ek.next()){var eI=eE.value,eM=eI.data;null==eA&&null!==eI.pts&&(eA=eI.pts);for(var eD=0;eD<eM.length;){var eR=vR(eM,eD);eR?(t.audioSamplingRate=eR.sampleRate,t.channelsCount=eR.channelCount,eT=eR.sampleRate,eS=eR.ra,ex.push({data:eM.subarray(eD,eD+eR.fa),size:eR.fa,duration:1536,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),eD+=eR.fa):eD++}}if(0==eT||0==eS.byteLength||null==eA)throw new eC(2,3,3018,n?n.N()[0]:null);var eP=eA/9e4*eT;p={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eT,duration:i,jb:[],ra:eS,za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.g,baseMediaDecodeTime:eP,hb:ex},stream:t};break;case"mp3":for(var eL,eN=[],ej=null,eU=u(c.cb()),eO=eU.next();!eO.done;eO=eU.next()){var e_=eO.value,eB=e_.data;if(eB){null==ej&&null!==e_.pts&&(ej=e_.pts);for(var eF=0;eF<eB.length;){var eV=vN(eB,eF);
1eV?(eL||(eL=eV),eF+eV.fa<=eB.length&&eN.push({data:eB.subarray(eF,eF+eV.fa),size:eV.fa,duration:1152,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),eF+=eV.fa):eF++}}}if(!eL||null==ej)throw new eC(2,3,3018,n?n.N()[0]:null);var eH=eL.sampleRate,eG=ej/9e4*eH;p={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eH,duration:i,jb:[],ra:new Uint8Array([]),za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.g,baseMediaDecodeTime:eG,hb:eN},stream:t};break;case"opus":var eK=[],eq=null,ez=c.F;if(!ez)throw new eC(2,3,3018,n?n.N()[0]:null);var eX=[];switch(ez.Qh){case 1:case 2:eX=[0];break;case 0:eX=[255,1,1,0,1];break;case 128:eX=[255,2,0,0,1];break;case 3:eX=[1,2,1,0,2,1];break;case 4:eX=[1,2,2,0,1,2,3];break;case 5:eX=[1,3,2,0,4,1,2,3];break;case 6:eX=[1,4,2,0,4,1,2,3,5];break;case 7:eX=[1,4,2,0,4,1,2,3,5,6];break;case 8:eX=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:eX=[1,1,2,0,1];break;case 131:eX=[1,1,3,0,1,2];break;case 132:eX=[1,1,4,0,1,2,3];break;case 133:eX=[1,1,5,0,1,2,3,4];break;case 134:eX=[1,1,6,0,1,2,3,4,5];break;case 135:eX=[1,1,7,0,1,2,3,4,5,6];break;case 136:eX=[1,1,8,0,1,2,3,4,5,6,7]}for(var eW=new Uint8Array([0,ez.channelCount,0,0,ez.sampleRate>>>24&255,ez.sampleRate>>>17&255,ez.sampleRate>>>8&255,ez.sampleRate>>>0&255,0,0].concat(l(eX))),eY=ez.sampleRate,eJ=u(c.cb()),e$=eJ.next();!e$.done;e$=eJ.next()){var eQ=e$.value,eZ=eQ.data;null==eq&&null!==eQ.pts&&(eq=eQ.pts);for(var e0=0;e0<eZ.length;){for(var e1=0!=(16&eZ[e0+1]),e2=0!=(8&eZ[e0+1]),e3=e0+2,e4=0;255===eZ[e3];)e4+=255,e3+=1;e4+=eZ[e3],e3+=1,e3+=2*!!e1,e3+=2*!!e2;var e5=eZ.slice(e3,e3+e4);eK.push({data:e5,size:e5.byteLength,duration:960,bb:0,flags:{fb:0,Wa:0,Va:0,Ta:0,Ua:2,gb:0}}),e0=e3+e4}}if(0==eW.byteLength||null==eq)throw new eC(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=ez.sampleRate,t.channelsCount=ez.channelCount;var e6=eq/9e4*eY;p={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eY,duration:i,jb:[],ra:eW,za:new Uint8Array([]),Fa:0,Ha:0,data:{Bb:this.g,baseMediaDecodeTime:e6,hb:eK},stream:t}}p&&(d.push(p),p=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!d.length)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));var e8=new ac(d),e9=t.id+"_"+n.i;if(this.i.has(e9))var e7=this.i.get(e9);else e7=ad(e8),this.i.set(e9,e7);var te=this.l!==e7,tt=am(e8);return(this.l=e7,this.g++,te)?Promise.resolve(nV(e7,tt)):Promise.resolve(tt)},B("shaka.transmuxer.TsTransmuxer",vz),vz.prototype.transmux=vz.prototype.transmux,vz.prototype.getOriginalMimeType=vz.prototype.getOriginalMimeType,vz.prototype.convertCodecs=vz.prototype.convertCodecs,vz.prototype.isSupported=vz.prototype.isSupported,vz.prototype.destroy=vz.prototype.destroy;var vX=["aac","ac-3","ec-3","mp3","opus"],vW=["avc","hevc"];function vY(){}function vJ(){yu||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(yu=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=v$,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function v$(e,t){var n,i=this;return R(function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),b(r,yu.call(i,e,t),2)):v8(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yu,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=vQ,r.return(vQ.call(i,e,t)))})}function vQ(e,t){var n,i,r,a,o,s,l,c,d,h,p,f,g=this;return R(function(m){if(1==m.g){for(console.assert(g==navigator,'bad "this" for requestMediaKeySystemAccess'),n=v6(e),i=[],a=(r=u(t)).next();!a.done;a=r.next())s=vZ((o=a.value).videoCapabilities,n),l=vZ(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!l.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=l,i.push(c));if(!i.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return b(m,yu.call(g,e,i),2)}
1return h=m.h,f=p=null,i[0]&&(i[0].videoCapabilities&&(p=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(f=i[0].audioCapabilities[0].encryptionScheme)),m.return(new v5(h,p,f))})}function vZ(e,t){return e?e.filter(function(e){return v9(e.encryptionScheme,t)}):e}function v0(){}function v1(){yl||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(yl=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=v2,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function v2(e){var t,n,i=this;return R(function(r){switch(r.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),b(r,yl.call(i,e),2);case 2:if(!(t=r.h).supported||!e.keySystemConfiguration)return r.return(t);if((n=t.keySystemAccess)&&v8(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=yl,r.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=v3,n){r.u(3);break}return b(r,v4(e),4);case 4:return t.keySystemAccess=r.h,r.return(t);case 3:return r.return(v3.call(i,e))}})}function v3(e){var t,n,i,r,a,o,s,u=this;return R(function(l){switch(l.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),n=t=null,!e.keySystemConfiguration||(r=(i=e.keySystemConfiguration).keySystem,
1n=i.audio&&i.audio.encryptionScheme,t=i.video&&i.video.encryptionScheme,a=v6(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},v9(n,a)&&v9(t,a))?b(l,yl.call(u,e),2):l.return(o);case 2:if((s=l.h).keySystemAccess){s.keySystemAccess=new v5(s.keySystemAccess,t,n),l.u(3);break}if(!e.keySystemConfiguration){l.u(3);break}return b(l,v4(e),5);case 5:s.keySystemAccess=l.h;case 3:return l.return(s)}})}function v4(e){var t,n;return R(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,encryptionScheme:r.audio.encryptionScheme}),r.video&&o.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),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,b(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}function v5(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function v6(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":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function v8(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function v9(e,t){return!e||e==t||("cbcs"==e||"cbcs-1-9"==e)&&(!!yh||!!yg||!!yd)}function v7(){}function ye(){vJ(),v1()}nh("video/mp2t",function(){return new vz("video/mp2t")},nv),B("EmeEncryptionSchemePolyfill",vY),vY.install=vJ,B("McEncryptionSchemePolyfill",v0),v0.install=v1,v5.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=u(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=u(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},v5.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},B("EncryptionSchemePolyfills",v7),v7.install=ye;var yt,yn,yi,yr,ya,yo,ys,yu,yl,yc,yd=navigator.userAgent.includes("CrKey"),yh=100<=parseInt(navigator.userAgent.
1split("Firefox/").pop(),10),yp=navigator.userAgent||"";if(yp.includes("Web0S")){var yf=yp.match(/Chrome\/(\d+)/);yc=!!yf&&79<=parseInt(yf[1],10)}else yc=!1;var yg=yc;void 0!==n&&n.exports&&(n.exports=v7)}).call(r,i,i,void 0),r.shaka)t[a]=r.shaka[a]}}]);
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.