1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6e3],{54007:(e,t,n)=>{!function(){var e="undefined"!=typeof window?window:n.g,i={};for(var r in(function(e,t,n){function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var r,a,o,s,u,l,c,d,h,p="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},f=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var i=0;i<n.length;++i){var r=n[i];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function g(e,t){if(t)e:{var n=f;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&p(n,e,{configurable:!0,writable:!0,value:t})}}function m(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function v(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];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 y(e){if(!(e instanceof Array)){e=v(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}g("Symbol",function(e){function t(e,t){this.g=e,p(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}}),g("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=f[t[n]];"function"==typeof r&&"function"!=typeof r.prototype[e]&&p(r.prototype,e,{configurable:!0,writable:!0,value:function(){return m(i(this))}})}return e});var b,w,T="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)w=Object.setPrototypeOf;else{e:{var x={};try{x.__proto__={a:!0},r=x.a;break e}catch(e){}r=!1}w=r?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var S=w;function A(e,t){if(e.prototype=T(t.prototype),e.prototype.constructor=e,S)S(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.pk=t.prototype}function E(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function k(e){if(e.o)throw TypeError("Generator is already running");e.o=!0}function I(e,t){e.i={vg:t,Ig:!0},e.g=e.m||e.j}function M(e,t,n){return e.g=n,{value:t}}function C(e){e.g=0}function D(e,t,n){e.m=t,void 0!=n&&(e.j=n)}function R(e,t){e.m=0,e.j=t||0}function P(e,t,n){e.g=t,e.m=n||0}function L(e,t){return e.m=t||0,t=e.i.vg,e.i=null,t}function N(e){e.A=[e.i],e.m=0,e.j=0}function j(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.Ig?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 U(e){this.g=new E,this.h=e}function O(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var a=r.value}catch(t){return e.g.l=null,I(e.g,t),_(e)}
1return e.g.l=null,i.call(e.g,a),_(e)}function _(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,I(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Ig)throw t.vg;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function B(e){this.next=function(t){return k(e.g),e.g.l?t=O(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=_(e)),t},this.throw=function(t){return k(e.g),e.g.l?t=O(e,e.g.l.throw,t,e.g.s):(I(e.g,t),t=_(e)),t},this.return=function(t){var n;return k(e.g),(n=e.g.l)?O(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),_(e))},this[Symbol.iterator]=function(){return this}}function F(e){var t=new B(new U(e));function n(e){return t.next(e)}function i(e){return t.throw(e)}return new Promise(function(e,r){!function t(a){a.done?e(a.value):Promise.resolve(a.value).then(n,i).then(t,r)}(t.next())})}function V(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function H(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function G(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}function K(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var a=e[r];if(t.call(n,a,r,e))return{Gg:r,v:a}}return{Gg:-1,v:void 0}}function q(e,t,n){if(null==e)throw TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}E.prototype.s=function(e){this.h=e},E.prototype.return=function(e){this.i={return:e},this.g=this.j},E.prototype.u=function(e){this.g=e},g("Promise",function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i(function(){t.l()})}this.g.push(e)};var r=f.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=f.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var e=f.CustomEvent,t=f.Event,n=f.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=f.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)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.H=function(e){var t=this.j();e.Gd(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.Gd(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Gd=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.o=!0},t.resolve=i,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=v(e),a=r.next();!a.done;a=r.next())i(a.value).Gd(t,n)})},t.all=function(e){var n=v(e),r=n.next();return r.done?i([]):new t(function(e,t){var a=[],o=0;do a.push(void 0),o++,i(r.value).Gd(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),g("WeakMap",function(e){function t(e){if(this.g=(s+=Math.random()+1).toString(),e){e=v(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){H(e,o)||p(e,o,{value:new n})}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([[t,2],[n,3]]);if(2!=i.get(t)||3!=i.get(n))return!1;return i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n)}catch(e){return!1}}())return e;var o="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var s=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!H(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.g]=t,this},t.prototype.get=function(e){return i(e)&&H(e,o)?e[o][this.g]:void 0},t.prototype.has=function(e){return i(e)&&H(e,o)&&H(e[o],this.g)},t.prototype.delete=function(e){return!!(i(e)&&H(e,o)&&H(e[o],this.g))&&delete e[o][this.g]},t}),g("Map",function(e){function t(){var e={};return e.Pb=e.next=e.head=e}function n(e,t){var n=e[1];return m(function(){if(n){for(;n.head!=e[1];)n=n.Pb;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&&H(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=v(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(v([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||"s"!=r.value[1])return!1;return!(r=i.next()).done&&4==r.value[0].x&&"t"==r.value[1]&&!!i.next().done}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this[0][n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this[1],Pb:this[1].Pb,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].Pb.next=n.entry,this[1].Pb=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.Pb.next=e.entry.next,e.entry.next.Pb=e.entry.Pb,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this[0]={},this[1]=this[1].Pb=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}),g("Set",function(e){function t(e){if(this.g=new Map,e){e=v(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return!function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(v([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||r.value[1]!=t)return!1;return!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done}catch(e){return!1}}()?(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach(function(i){return e.call(t,i,i,n)})},t):e}),g("Array.prototype.keys",function(e){return e||function(){return G(this,function(e){return e})}}),g("Array.prototype.findIndex",function(e){return e||function(e,t){return K(this,e,t).Gg}}),g("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}}),g("Array.prototype.values",function(e){return e||function(){return G(this,function(e,t){return t})}}),g("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),g("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for(0>(t=t||0)&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}}),g("String.prototype.includes",function(e){return e||function(e,t){return -1!==q(this,e,"includes").indexOf(e,t||0)}}),g("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}}),g("WeakSet",function(e){function t(e){if(this.g=new WeakMap,e){e=v(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}),g("Array.prototype.find",function(e){return e||function(e,t){return K(this,e,t).v}}),g("String.prototype.startsWith",function(e){return e||function(e,t){var n=q(this,e,"startsWith"),i=n.length,r=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<r&&t<i;)if(n[t++]!=e[a++])return!1;return a>=r}}),g("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)H(e,t)&&n.push([t,e[t]]);return n}});var X="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)H(i,r)&&(e[r]=i[r])}return e};g("Object.assign",function(e){return e||X}),g("Promise.prototype.finally",function(e){return e||function(e){return this.then(function(t){return Promise.resolve(e()).then(function(){return t})},function(t){return Promise.resolve(e()).then(function(){throw t})})}}),g("Array.prototype.entries",function(e){return e||function(){return G(this,function(e,t){return[e,t]})}}),g("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),g("String.prototype.repeat",function(e){return e||function(e){var t=q(this,null,"repeat");if(0>e||0x4fffffff<e)throw RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),g("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&1/0!==e&&-1/0!==e}}),g("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)H(e,t)&&n.push(e[t]);return n}}),g("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),g("Number.MAX_SAFE_INTEGER",function(){return 0x1fffffffffffff}),g("String.prototype.endsWith",function(e){return e||function(e,t){var n=q(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}}),g("Math.trunc",function(e){return e||function(e){if(isNaN(e=Number(e))||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}});var W=this||self;function z(e,t){e=e.split(".");var n,i=W;for((e[0]in i)||void 0===i.execScript||i.execScript("var "+e[0]);e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function Y(){}function J(){}function $(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function Q(e){return e.h/(1-Math.pow(e.g,e.i))}function Z(){this.h=new $(2),this.j=new $(5),this.g=0,this.i=128e3,this.l=16e3}function ee(){}function et(){}function en(){}function ei(e){var t=V.apply(1,arguments);ea.has(e)||(ea.add(e),en.apply(ee,y(t)))}function er(){}$.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)},Z.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)},Z.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)}},Z.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(Q(this.h),Q(this.j))};var ea=new Set;function eo(){this.g={}}function es(){this.g=new eo}function eu(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=el;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}el=t}return t||!1}(e)?t.capture||!1:t}(e,i),this.target.addEventListener(t,n,this.g)}e.console&&(en=function(){return console.warn.apply(console,y(V.apply(0,arguments)))},et=function(){console.error.apply(console,y(V.apply(0,arguments)))}),(b=eo.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},b.get=function(e){return(e=this.g[e])?e.slice():null},b.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter(function(e){return e!=t}),0==this.g[e].length&&delete this.g[e])},b.forEach=function(e){for(var t in this.g)e(t,this.g[t])},b.size=function(){return Object.keys(this.g).length},b.keys=function(){return Object.keys(this.g)},(b=es.prototype).release=function(){this.Va(),this.g=null},b.D=function(e,t,n,i){this.g&&(e=new eu(e,t,n,i),this.g.push(t,e))},b.va=function(e,t,n,i){var r=this;this.D(e,t,function i(a){r.cb(e,t,i),n(a)},i)},b.cb=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=v(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.cb(),this.g.remove(t,r))}},b.Va=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,y(t.g[e]));for(n=(t=v(n)).next();!n.done;n=t.next())n.value.cb();this.g.g={}}},z("shaka.util.EventManager",es),es.prototype.removeAll=es.prototype.Va,es.prototype.unlisten=es.prototype.cb,es.prototype.listenOnce=es.prototype.va,es.prototype.listen=es.prototype.D,es.prototype.release=es.prototype.release,eu.prototype.cb=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var el=void 0;function ec(t){if(eh.has(t))return eh.get(t);
1if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported(t);return eh.set(t,n),n}return!!e.MediaSource&&(n=MediaSource.isTypeSupported(t),eh.set(t,n),n)}function ed(){return!!e.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var eh=new Map;function ep(e,t){this.g=e,this.h=t}function ef(e,t){var n=new ep(5,0),i=ev,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function eg(e,t,n,i){en([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function em(e,t,n,i){et([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}ep.prototype.toString=function(){return"v"+this.g+"."+this.h};var ev=null;function ey(){}function eb(){}function ew(){}function eT(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(ex(e)==ex(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=eA(e);t=eA(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function ex(e){return e instanceof ArrayBuffer?e:e.buffer}function eS(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function eA(e,t,n){return eI(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function eE(e,t,n){return eI(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function ek(e,t,n){return eI(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function eI(e,t,n,i){var r=ex(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 eC(e){this.l=new eb,(e=eD[e.toLowerCase()])&&(this.l=e()),this.h=new ey,(e=eR)&&(this.h=e())}ey.prototype.extract=function(){},ey.prototype.decode=function(){return[]},ey.prototype.clear=function(){},ey.prototype.getStreams=function(){return[]},eb.prototype.init=function(){},eb.prototype.parse=function(){return[]},z("shaka.util.BufferUtils",ew),ew.toDataView=ek,ew.toUint16=eE,ew.toUint8=eA,ew.toArrayBuffer=eS,ew.equal=eT,eM.prototype.init=function(){},eM.prototype.i=function(){},eM.prototype.g=function(){},eM.prototype.j=function(){},z("shaka.media.IClosedCaptionParser",eM),eC.prototype.init=function(e,t){(void 0===t?0:t)||this.g(),this.l.init(e)},eC.prototype.i=function(e){e=v(e=this.l.parse(e));for(var t=e.next();!t.done;t=e.next()){var n=eA((t=t.value).packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},eC.prototype.g=function(){this.h.clear()},eC.prototype.j=function(){return this.h.getStreams()},z("shaka.media.ClosedCaptionParser",eC),eC.findDecoder=function(){return eR},eC.unregisterDecoder=function(){eR=null},eC.registerDecoder=function(e){eR=e},eC.findParser=function(e){return eD[e]},eC.unregisterParser=function(e){delete eD[e]},eC.registerParser=function(e,t){eD[e]=t};var eD={},eR=null;function eP(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=eL,this.scroll=eN}z("shaka.text.CueRegion",eP);var eL=1;eP.units={PX:0,PERCENTAGE:1,LINES:2};var eN="";function ej(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function eU(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function eO(e,t,n){if(n||(n=ej),e.length!=t.length)return!1;t=t.slice(),e=v(e);for(var i=e.next(),r={};!i.done;r={Jg:void 0},i=e.next()){if(r.Jg=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.Jg,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function e_(e,t,n){if(n||(n=ej),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 eB(e,t,n){var i=V.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,eF)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}eP.scrollMode={NONE:eN,UP:"up"},eB.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},z("shaka.util.Error",eB);var eF=!0;function eV(e){this.h=e,this.g=void 0}function eH(e,t){return!e.length||!t.length||e===t||0<eG(e,t).length}function eG(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=v(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=v((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(y(i.keyIds),y(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,audioR
1obustness:i.audioRobustness||a.audioRobustness,serverCertificate:i.serverCertificate||a.serverCertificate,serverCertificateUri:i.serverCertificateUri||a.serverCertificateUri,initData:r,keyIds:o});break}}return n}function eK(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}eB.Severity={RECOVERABLE:1,CRITICAL:2},eB.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},eB.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,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,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OP
1ERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007},eV.prototype.value=function(){return void 0==this.g&&(this.g=this.h()),this.g};var eq=new eV(function(){return eS(new Uint8Array([0]))}),eX=new Map;function eW(e){this.h=e,this.g=null}function ez(e){this.h=e,this.g=null}function eY(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.isTypeSupported}function eJ(e){return""!=tr().canPlayType(e)}function e$(){return!!navigator.userAgent.match(/Edge?\//)}function eQ(){return ti("Xbox One")}function eZ(){return ti("Tizen")}function e0(){return ti("Tizen 3")}function e1(){return ti("Web0S")}function e2(){return ti("CrKey")}function e3(){if(!ti("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function e4(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!eZ()&&!ti("PC=EOS")&&!ti("PC=APL")&&!ti("VirginMedia")&&!e9()&&!e6()&&!ti("AFT")&&!ti("WPE")&&!ti("DT_STB_BCM")&&!ti("Sky_STB")}function e5(){return ti("PlayStation 5")}function e6(){return ti("PlayStation 4")}function e8(){return ti("Hisense")||ti("VIDAA")}function e9(){return ti("SOPOpenBrowser")}function e7(){if(!e4())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function te(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}function tt(){return ti("Android")}function tn(){return!!(eZ()||e1()||eQ()||e6()||e5()||ti("AFT")||ti("PC=EOS")||ti("PC=APL")||ti("VirginMedia")||e9()||ti("WPE")||e2()||e8()||ti("DT_STB_BCM"))}function ti(e){return(navigator.userAgent||"").includes(e)}function tr(){return tu||(ts||(ts=new ez(function(){tu=null})),(tu=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(tu=document.createElement("video")),ts.Z(1)),tu}function ta(t){return t?t===e.shakaMediaKeysPolyfill:!!e.shakaMediaKeysPolyfill}function to(){var t,n,i,r,a,o,s,u,l,c,d,h,p;return F(function(f){switch(f.g){case 1:if(t={width:1/0,height:1/0},e2()){if(c=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t.width=1280,t.height=720,D(f,15),!(d=c)){f.u(17);break}return M(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(eZ()){t.width=1920,t.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(n=webapis.systeminfo.getMaxVideoResolution(),t.width=n.width,t.height=n.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){en("Tizen: Error detecting screen size, default screen size 1920x1080.")}f.u(3);break}if(eQ()){t.width=1920,t.height=1080;try{i=void 0,r=new(i="undefined"!=typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows).Media.Protection.ProtectionCapabilities,a=i.Media.Protection.ProtectionCapabilityResult,o=null;do o=r.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(o===a.maybe);o===a.probably&&(t.width=3840,t.height=2160)}catch(e){en("Xbox: Error detecting screen size, default screen size 1920x1080.")}f.u(3);break}if(e1()){try{s=JSON.parse(e.PalmSystem.deviceInfo),t.width=Math.max(1920,s.screenWidth),t.height=Math.max(1080,s.screenHeight)}catch(e){en("WebOS: Error detecting screen size, default screen size 1920x1080."),t.width=1920,t.height=1080}f.u(3);break}if(e8()){e.Hisense_Get4KSupportState&&e.Hisense_Get4KSupportState()?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),f.u(3);break}if(!e6()&&!e5()){f.u(3);break}return u=!1,D(f,9),M(f,e.msdk.device.getDisplayInfo(),11);case 11:case 14:u="4K"===f.h.resolution,P(f,10);break;case 9:return L(f),D(f,12),M(f,e.msdk.device.getDisplayInfoImmediate(),14);case 12:l=L(f),en("PlayStation: Failed to get the display info:",l);case 10:u?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),f.u(3);break;case 18:d=f.h;case 17:if(d){t.width=3840,t.height=2160,f.u(19);break}if(!(h=c)){f.u(20);break}return M(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:h=f.h;case 20:h&&(t.width=1920,t.height=1080);case 19:P(f,3);break;case 15:p=L(f),et("Failed to check canDisplayType:",p);case 3:return f.return(t)}})}eW.prototype.Z=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},eW.prototype.stop=function(){this.g&&(this.g(),this.g=null)},ez.prototype.hc=function(){return this.stop(),this.h(),this},ez.prototype.Z=function(e){var t=this;return this.stop(),this.g=new eW(function(){t.h()}).Z(e),this},ez.prototype.Ra=function(e){var t=this;return this.stop(),this.g=new eW(function(){t.g.Z(e),t.h()}).Z(e),this},ez.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},z("shaka.util.Timer",ez),ez.prototype.stop=ez.prototype.stop,ez.prototype.tickEvery=ez.prototype.Ra,ez.prototype.tickAfter=ez.prototype.Z,ez.prototype.tickNow=ez.prototype.hc;var ts=null,tu=null;function tl(){}function tc(t){if(!t)return"";
1if(239==(t=eA(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!e6())return(t=(new TextDecoder).decode(t)).includes("�")&&et('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 td(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new eB(2,2,2004);var i=new Uint16Array(n=Math.floor(e.byteLength/2));e=ek(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return tg(i)}function th(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=eA(e);if(239==n[0]&&187==n[1]&&191==n[2])return tc(n);if(254==n[0]&&255==n[1])return td(n.subarray(2),!1);if(255==n[0]&&254==n[1])return td(n.subarray(2),!0);if(0==n[0]&&0==n[2])return td(e,!1);if(0==n[1]&&0==n[3])return td(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return tc(e);throw new eB(2,2,2003)}function tp(t){if(e.TextEncoder&&!e6()){var n=new TextEncoder;return eS(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 eS(n)}function tf(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 tg(e){return tv.value()(e)}function tm(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||""}z("shaka.util.StringUtils",tl),tl.resetFromCharCode=function(){tv.g=void 0},tl.toUTF16=tf,tl.toUTF8=tp,tl.fromBytesAutoDetect=th,tl.fromUTF16=td,tl.fromUTF8=tc;var tv=new eV(function(){for(var e={fc:65536};0<e.fc;e={fc:e.fc},e.fc/=2)if(function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}(e.fc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.fc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.fc));return n}}(e);return null});function ty(e){this.h=e||"",this.g=0}function tb(e){tw(e,/[ \t]+/gm)}function tw(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 tT(e){return e.g==e.h.length?null:(e=tw(e,/[^ \t\n]*/gm))?e[0]:null}function tx(e){if(null==(e=tw(e,tA)))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 tS(e){return e?tx(new ty(e)):null}var tA=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function tE(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||n.buffer instanceof ArrayBuffer)return n;if(t.has(n))return null;var i=n.constructor==Array;if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function tk(e){var t,n={};for(t in e)n[t]=e[t];return n}function tI(e,t){var n=void 0!==n&&n;return tM(e=th(e),t,n)}function tM(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 l=a.indexOf(".");0<l&&(u=o.indexOf(a.substring(0,l)))}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:{l=o,i++;var c=n(),d={};for(u=[];62!==e.charCodeAt(i)&&e[i];){var h=e.charCodeAt(i);if(64<h&&91>h||96<h&&123>h){h=n();for(var p=e.charCodeAt(i);p&&39!==p&&34!==p&&!(64<p&&91>p||96<p&&123>p)&&62!==p;)i++,p=e.charCodeAt(i);var f=i+1;if(i=e.indexOf(e[i],f),f=e.slice(f,i),39===p||34===p){if(-1===i){if(l={tagName:c,attributes:d,children:u,parent:null},t)for(c=0;c<u.length;c++)"string"!=typeof u[c]&&(u[c].parent=l);u=l;break e}}else f=null,i--;if(h.startsWith("xmlns:")){p=f;var g=h.split(":")[1];t2.set(p,g),t3.set(g,p)}"tt"===c&&"xml:space"===h&&"preserve"===f&&(l=!0),d[h]=f}i++}for(47!==e.charCodeAt(i-1)?(i++,u=r(c,l)):i++,l={tagName:c,attributes:d,children:u,parent:null},c=u.length,d=0;d<c;d++)"string"!=typeof(h=u[d])?t&&(h.parent=l):d==c-1&&"\n"==h&&u.pop();u=l}if(s.push(u),"string"==typeof u)break;"?"===u.tagName[0]&&u.children&&(s.push.apply(s,y(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 tC(e){return t2.has(e)?t2.get(e):""}function tD(e){return"string"==typeof e}function tR(e){var t=[];if(!e.children)return[];e=v(e.children);for(var n=e.next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function tP(e,t){var n=[];if(!e.children)return[];e=v(e.children);for(var i=e.next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function tL(e){return"string"==typeof e?tm(e):""===(e=e.children.reduce(function(e,t){return"string"==typeof t?e+t:e},""))?null:tm(e)}function tN(e){return Array.from(e.children).every(function(e){return"string"==typeof e})?((e=tL(e))&&(e=e.trim()),e):null}function tj(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children){e=v(e.children);for(var i=e.next();!i.done;i=e.next())tj(i.value,t,n)}return n}function tU(e,t){return 1!=(e=tP(e,t)).length?null:e[0]}function tO(e,t,n){return 1!=(e=tF(e,t,n)).length?null:e[0]}function t_(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 tB(e,t,n){return t=tC(t),e.attributes[t+":"+n]||null}function tF(e,t,n){t=tC(t);var i=[];if(e.children){e=v(e.children);for(var r=e.next();!r.done;r=e.next())(r=r.value)&&r.tagName===t+":"+n&&i.push(r)}return i}function tV(e,t,n){t=v(t);for(var i=t.next();!i.done;i=t.next())if(i=tB(e,i.value,n))return i;return null}function tH(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 tG(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(e))&&isFinite(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null))?e:null}function tK(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 tq(e){return 0==(e=Number(e))%1?e:null}function tX(e){return 0==(e=Number(e))%1&&0<e?e:null}function tW(e){return 0==(e=Number(e))%1&&0<=e?e:null}function tz(e){return isNaN(e=Number(e))?null:e}function tY(e){return!!e&&"true"===e.toLowerCase()}function tJ(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function t$(e){var t=[];e=v(e=tm(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,Vb:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].Vb=n.slice(1))}return t}function tQ(e,t){var n=t$(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=tZ(e,"t",i.t)),null!==i.n&&(n=tZ(e,"n",i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.Vb)&&e[n]?t0(e[n],r,i,tN(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(y(t.children))))}}function tZ(e,t,n){var i=0;e=v(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function t0(e,t,n,i){"remove"===t?delete e.attributes[n]:("add"===t||"replace"===t)&&(e.attributes[n]=i)}function t1(e){if(!e)return null;var t={tagName:e.tagName,attributes:tk(e.attributes),children:[],parent:null};e=v(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=t1(n)).parent=t),t.children.push(n);return t}
1var t2=new Map,t3=new Map;function t4(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new eP,this.position=null,this.positionAlign=ne,this.size=0,this.textAlign=nt,this.direction=na,this.writingMode=no,this.lineInterpretation=ns,this.line=null,this.lineHeight="",this.lineAlign=nu,this.displayAlign=ni,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=nh,this.fontStyle=nf,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={lc:32,rows:15}}function t5(e,t){return(e=new t4(e,t,"")).lineBreak=!0,e}function t6(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n){if("nestedCues"==n){if(!e_(e.nestedCues,t.nestedCues,t6))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!e_(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function t8(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&t9(t);var i,r,a,o,s=n;n=[];for(var u=-1,l=0;l<s.length;l++)"<"===s[l]?u=l+1:">"===s[l]&&0<u&&((u=s.substr(u,l-u)).match(ny)&&n.push(u),u=-1);for(l=(n=v(n)).next();!l.done;l=n.next())l=l.value,s=s.replace("<"+l+">",'<div time="'+l+'">')+"</div>";e:{l=s,u=[];var c=-1;n="",s=!1;for(var d=0;d<l.length;d++)if("/"===l[d]){var h=l.indexOf(">",d);if(-1===h){n=l;break e}if((h=l.substring(d+1,h))&&"v"==h){s=!0;var p=null;if(u.length&&(p=u[u.length-1]),p){if(p===h)n+="/"+h+">";else{if(!p.startsWith("v")){n+=l[d];continue}n+="/"+p+">"}d+=h.length+1}else n+=l[d]}else n+=l[d]}else"<"===l[d]?"v"!=l[c=d+1]&&(c=-1):">"===l[d]&&0<c&&(u.push(l.substr(c,d-c)),c=-1),n+=l[d];for(u=(l=v(u)).next();!u.done;u=l.next())c=(u=u.value).replace(" ",".voice-"),n=(n=n.replace("<"+u+">","<"+c+">")).replace("</"+u+">","</"+c+">"),s||(n+="</"+c+">")}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 f=tM("<span>"+n+"</span>","span")}catch(e){}if(f)if(1!=(f=f.children).length||f[0].tagName)for(n=(f=v(f)).next();!n.done;n=f.next())!function e(t,n,i){var r=n.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new eP,r.position=null,r.size=0,r.textAlign=nt,t.tagName)for(var a=v(t.tagName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();s='v[voice="'+u+'"]',i.has(s)||(s="v[voice="+u+"]")}switch(i.has(s)&&(u=r,s=i.get(s))&&(u.backgroundColor=t7(s.backgroundColor,u.backgroundColor),u.color=t7(s.color,u.color),u.fontFamily=t7(s.fontFamily,u.fontFamily),u.fontSize=t7(s.fontSize,u.fontSize),u.textShadow=t7(s.textShadow,u.textShadow),u.fontWeight=s.fontWeight,u.fontStyle=s.fontStyle,u.opacity=s.opacity,u.rubyTag=s.rubyTag,u.textCombineUpright=s.textCombineUpright,u.wrapLine=s.wrapLine),o){case"br":r=t5(r.startTime,r.endTime),n.nestedCues.push(r);return;case"b":r.fontWeight=np;break;case"i":r.fontStyle=ng;break;case"u":r.textDecoration.push(nv);break;case"font":(o=t.attributes.color)&&(r.color=o);break;case"div":if(!(o=t.attributes.time))break;(o=tS(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(a=t.children,tD(t)||1==a.length&&tD(a[0]))for(i=tL(t).split("\n"),t=!0,a=(i=v(i)).next();!a.done;a=i.next())a=a.value,t||(t=t5(r.startTime,r.endTime),n.nestedCues.push(t)),0<a.length&&((t=r.clone()).payload=tm(a),n.nestedCues.push(t)),t=!1;else for(n.nestedCues.push(r),t=(n=v(a)).next();!t.done;t=n.next())e(t.value,r,i)}(n.value,e,t);else e.payload=tm(n);else e.payload=tm(n)}else e.payload=tm(n)}function t9(e){for(var t=v(Object.entries(nc)),n=t.next();!n.done;n=t.next()){var i=v(n.value);n=i.next().value,i=i.next().value;var r=new t4(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=v(Object.entries(nd))).next();!n.done;n=t.next())n=(i=v(n.value)).next().value,i=i.next().value,(r=new t4(0,0,"")).backgroundColor=i,e.set("."+n,r)}function t7(e,t){return e&&0<e.length?e:t}t4.prototype.clone=function(){var e,t=new t4(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},z("shaka.text.Cue",t4),t4.parseCuePayload=t8,t4.equal=t6,t4.prototype.clone=t4.prototype.clone;var ne="auto";t4.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ne};var nt="center",nn={LEFT:"left",RIGHT:"right",CENTER:nt,START:"start",END:"end"};t4.textAlign=nn;var ni="after",nr={BEFORE:"before",CENTER:"center",AFTER:ni};t4.displayAlign=nr;var na="ltr";t4.direction={HORIZONTAL_LEFT_TO_RIGHT:na,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var no="horizontal-tb";t4.writingMode={HORIZONTAL_TOP_TO_BOTTOM:no,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ns=0;t4.lineInterpretation={LINE_NUMBER:0,PERCENTAGE:1};var nu="start",nl={CENTER:"center",START:nu,END:"end"};t4.lineAlign=nl;var nc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};t4.defaultTextColor=nc;var nd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};
1t4.defaultTextBackgroundColor=nd;var nh=400,np=700;t4.fontWeight={NORMAL:400,BOLD:700};var nf="normal",ng="italic",nm={NORMAL:nf,ITALIC:ng,OBLIQUE:"oblique"};t4.fontStyle=nm;var nv="underline";t4.textDecoration={UNDERLINE:nv,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var ny=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function nb(){}function nw(e,t,n){nx[e.toLowerCase().split(";")[0]+"-"+n]={priority:n,he:t}}function nT(e,t){for(var n=e.toLowerCase().split(";")[0],i=v([nk,nE,nA,nS]),r=i.next();!r.done;r=i.next())if(r=nx[n+"-"+r.value]){var a=r.he(),o=a.isSupported(e,t);if(a.destroy(),o)return r.he}return null}nb.prototype.destroy=function(){},z("shaka.transmuxer.TransmuxerEngine",nb),nb.findTransmuxer=nT,nb.unregisterTransmuxer=function(e,t){delete nx[e.toLowerCase().split(";")[0]+"-"+t]},nb.registerTransmuxer=nw,nb.prototype.destroy=nb.prototype.destroy;var nx={},nS=1,nA=2,nE=3,nk=4;nb.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4};var nI=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function nM(e){var t;e instanceof nM?(nC(this,e.Db),this.Ac=e.Ac,nD(this,e.Fb),nR(this,e.Sc),this.Ua=e.Ua,nP(this,e.g.clone()),this.mc=e.mc):e&&(t=String(e).match(nI))?(nC(this,t[1]||"",!0),this.Ac=nL(t[2]||""),nD(this,t[3]||"",!0),nR(this,t[4]),this.Ua=nL(t[5]||"",!0),nP(this,t[6]||"",!0),this.mc=nL(t[7]||"")):this.g=new nV(null)}function nC(e,t,n){e.Db=n?nL(t,!0):t,e.Db&&(e.Db=e.Db.replace(/:$/,""))}function nD(e,t,n){e.Fb=n?nL(t,!0):t}function nR(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.Sc=t}else e.Sc=null}function nP(e,t,n){t instanceof nV?e.g=t:(n||(t=nN(t,nB)),e.g=new nV(t))}function nL(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function nN(e,t,n){return null!=e?(e=encodeURI(e).replace(t,nj),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function nj(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(b=nM.prototype).Db="",b.Ac="",b.Fb="",b.Sc=null,b.Ua="",b.mc="",b.toString=function(){var e=[],t=this.Db;if(t&&e.push(nN(t,nU,!0),":"),t=this.Fb){e.push("//");var n=this.Ac;n&&e.push(nN(n,nU,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Sc)&&e.push(":",String(t))}return(t=this.Ua)&&(this.Fb&&"/"!=t.charAt(0)&&e.push("/"),e.push(nN(t,"/"==t.charAt(0)?n_:nO,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.mc)&&e.push("#",nN(t,nF)),e.join("")},b.resolve=function(e){var t=this.clone();"data"===t.Db&&(t=new nM);var n=!!e.Db;n?nC(t,e.Db):n=!!e.Ac,n?t.Ac=e.Ac:n=!!e.Fb,n?nD(t,e.Fb):n=null!=e.Sc;var i=e.Ua;if(n)nR(t,e.Sc);else if(n=!!e.Ua){if("/"!=i.charAt(0))if(this.Fb&&!this.Ua)i="/"+i;else{var r=t.Ua.lastIndexOf("/");-1!=r&&(i=t.Ua.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.Ua=i:n=""!==e.g.toString(),n?nP(t,e.g.clone()):n=!!e.mc,n&&(t.mc=e.mc),t},b.clone=function(){return new nM(this)};var nU=/[#\/\?@]/g,nO=/[#\?:]/g,n_=/[#\?]/g,nB=/[#\?@]/g,nF=/#/g;function nV(e){this.g=e||null}function nH(e){if(!e.Pa&&(e.Pa={},e.bd=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 nG(){}function nK(e){return btoa(e=tg(eA(e)))}function nq(e,t){return t=void 0==t||t,e=nK(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function nX(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 nW(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 nz(e){var t=eA(e);e="",t=v(t);for(var n=t.next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function nY(){for(var e=V.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];r instanceof Uint8Array?t.set(r,n):t.set(eA(r),n),n+=r.byteLength}return t}function nJ(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new nM(e[0]);return t=new nM(t[0]),t=i.resolve(t),n&&nP(t,n),[t.toString()]}t=t.map(function(e){return new nM(e)}),i=[],e=v(e);for(var r=e.next();!r.done;r=e.next()){r=new nM(r.value);for(var a=v(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&nP(o,n),i.push(o.toString())}return i}function n$(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioR
1obustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function nQ(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach(function(e,t){var n=t;22!=n.length&&(n=nq(nW(t),!1));var o=e;22!=o.length&&(o=nq(nW(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:eA(tp(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 nZ(e,t){if(1==t.length)return t[0];if(null!=(e=n0(e,t)))return e;throw new eB(2,4,4025,t)}function n0(e,t){for(var n=v(n5[e]),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=v(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==n2?"":null}function n1(e,t){var n=[];e=v(n5[e]);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=v(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}(b=nV.prototype).Pa=null,b.bd=null,b.add=function(e,t){nH(this),this.g=null;var n=this.Pa.hasOwnProperty(e)?this.Pa[e]:null;return n||(this.Pa[e]=n=[]),n.push(t),this.bd++,this},b.set=function(e,t){return nH(this),this.g=null,this.Pa.hasOwnProperty(e)?this.Pa[e]=[t]:this.add(e,t),this},b.get=function(e){return nH(this),this.Pa[e]||[]},b.toString=function(){if(this.g)return this.g;if(!this.Pa)return"";var e,t=[];for(e in this.Pa)for(var n=encodeURIComponent(e),i=this.Pa[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.g=t.join("&")},b.clone=function(){var e=new nV;if(e.g=this.g,this.Pa){var t,n={};for(t in this.Pa)n[t]=this.Pa[t].concat();e.Pa=n,e.bd=this.bd}return e},z("shaka.util.Uint8ArrayUtils",nG),nG.concat=nY,nG.toHex=nz,nG.fromHex=nW,nG.fromBase64=nX,nG.toBase64=nq,nG.toStandardBase64=nK;var n2="text",n3={la:"video",Y:"audio",wa:n2,Ie:"image",kj:"application"},n4=1/15,n5={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function n6(){}function n8(e,t){var n=e;return t&&!il.includes(e)&&(n+='; codecs="'+t+'"'),n}function n9(e,t){return t&&(e+='; codecs="'+t+'"'),e}
1function n7(e,t,n){var i=n8(e,t);return nT(t=n9(e,t))?(e=nT(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function ie(e){return e.split(";")[0].split("/")[1]}function it(e){var t=is(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:return"ac-3";case"mp4a"===e&&"a6"===t:return"ec-3";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";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"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 ii(e){var t=[];e=v(e.split(","));for(var n=e.next();!n.done;n=e.next())t.push((n=is(n.value))[0]);return t.sort().join(",")}function ir(e){return e.split(";")[0]}function ia(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function io(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function is(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}z("shaka.util.MimeUtils",n6),n6.getFullTypeWithAllCodecs=n9,n6.getFullType=n8;var iu=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),il=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ic(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 id(e){return!!ip[e]||("application/cea-608"==e||"application/cea-708"==e)&&!!eR}function ih(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=v(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(e){return e.endTime<=n}))&&e.j.append(r)}ic.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},ic.prototype.remove=function(e,t){var n=this;return F(function(i){if(1==i.g)return M(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)),C(i)})},z("shaka.text.TextEngine",ic),ic.prototype.destroy=ic.prototype.destroy,ic.findParser=function(e){return ip[e]},ic.unregisterParser=function(e){delete ip[e]},ic.registerParser=function(e,t){ip[e]=t};var ip={};function ig(e,t){return e.concat(t)}function im(){}function iv(e){return null!=e}function iy(){}function ib(e,t){return e=ix(e),t=ix(t),e.split("-")[0]==t.split("-")[0]}function iw(e,t){return e=ix(e),t=ix(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function iT(e,t){return e=ix(e),t=ix(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function ix(e){var t=(e=v(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=v(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=iI.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function iS(e,t){return e=ix(e),(t=ix(t))==e?4:iw(t,e)?3:iT(t,e)?2:+!!iw(e,t)}function iA(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),iI.get(e)||e}function iE(e){return e.language?ix(e.language):e.audio&&e.audio.language?ix(e.audio.language):e.video&&e.video.language?ix(e.video.language):"und"}function ik(e,t){e=ix(e);var n=new Set;t=v(t);for(var i=t.next();!i.done;i=t.next())n.add(ix(i.value));for(i=(t=v(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=v(n)).next();!i.done;i=t.next())if(iw(i=i.value,e))return i;for(i=(t=v(n)).next();!i.done;i=t.next())if(iT(i=i.value,e))return i;for(t=(n=v(n)).next();!t.done;t=n.next())if(iw(e,t=t.value))return t;return null}z("shaka.util.LanguageUtils",iy),iy.findClosestLocale=ik,iy.getL
1ocaleForVariant=iE,iy.getLocaleForText=function(e){return ix(e.language||"und")},iy.getBase=iA,iy.relatedness=iS,iy.areSiblings=function(e,t){var n=iA(e),i=iA(t);return e!=n&&t!=i&&n==i},iy.normalize=ix,iy.isSiblingOf=iT,iy.isParentOf=iw,iy.areLanguageCompatible=ib,iy.areLocaleCompatible=function(e,t){return(e=ix(e))==(t=ix(t))};var iI=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function iM(){}function iC(e,t,n,i,r){if(r.length){var a=e.textStreams;r=v(r);for(var o=r.next(),s={};!o.done;s={ag:void 0},o=r.next())if(s.ag=o.value,(o=a.filter(function(e){return function(t){return!!(t.codecs.startsWith(e.ag)||t.mimeType.startsWith(e.ag))}}(s))).length){a=o;break}e.textStreams=a}if(a=e.variants,(t.length||n.length)&&(a=function(e,t,n){t=v(t);for(var i=t.next(),r={};!i.done;r={rh:void 0},i=t.next())if(r.rh=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.rh)}}(r))).length){e=i;break}for(t=(n=v(n)).next(),i={};!t.done;i={kg:void 0},t=n.next())if(i.kg=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.kg)}}(i))).length){e=t;break}return e}(a,t,n)),i.length){for(t=new eo,a=(n=v(a)).next();!a.done;a=n.next())a=a.value,t.push(String(a.video.width||0),a);var u=[];t.forEach(function(e,t){e=0;var n=[];t=v(t);for(var r=t.next(),a={};!r.done;a={Be:void 0},r=t.next())a.Be=r.value,(r=i.filter(function(e){return function(t){return e.Be.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.Be]):r==e&&n.push(a.Be);u.push.apply(u,y(n))}),a=u}for(n=new Set,t=new Set,r=(a=v(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 l=[];for(n=new Map,r=(a=v(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 c=s[s.length-1],d=it(c.codecs),h=it(r.codecs);d!=h||r.bandwidth&&c.bandwidth&&!(r.bandwidth>
1c.bandwidth)||(s.push(r),l.push(r.id))}else s.push(r),l.push(r.id);n.set(o,s)}var p={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,av01:.75,"dovi-av1":.7,vvc:.65};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=it(e.codecs),i=it(t.codecs);if(n!=i)return(p[n]||1)-(p[i]||1)}return e.width-t.width}return e.bandwidth-t.bandwidth}),t=ed();var f=[];for(n=new Map,r=(a=v(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(c=s[s.length-1],!t&&(d=it(c.codecs))!==(h=it(r.codecs)))continue;r.width>c.width||r.height>c.height?(s.push(r),f.push(r.id)):r.width==c.width&&r.height==c.height&&((d=it(c.codecs))!=(h=it(r.codecs))||r.bandwidth&&c.bandwidth&&!(r.bandwidth>c.bandwidth)||(s.push(r),f.push(r.id)))}else s.push(r),f.push(r.id);n.set(o,s)}e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,(!t||!!l.includes(t.id))&&(!e||!!f.includes(e.id))})}function iD(e,t,n){var i,r,a,o,s,u,l,c,d,h=e.video;if(h&&h.width&&h.height){var p,f,g,m,y,b,w,T,x,S=h.width,A=h.height;if(A>S&&(S=(A=v([A,S])).next().value,A=A.next().value),p=S,f=t.minWidth,g=Math.min(t.maxWidth,n.width),!(p>=f)||!(p<=g)||(m=A,y=t.minHeight,b=Math.min(t.maxHeight,n.height),!(m>=y)||!(m<=b))||(w=h.width*h.height,T=t.minPixels,x=t.maxPixels,!(w>=T)||!(w<=x)))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,u=t.maxChannelsCount,o>=s&&o<=u))&&(l=e.bandwidth,c=t.minBandwidth,d=t.maxBandwidth,l>=c&&l<=d)}function iR(e,t,n,i){var r,a;return F(function(o){if(1==o.g)return eQ()&&function(e){var t={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1",dvc1:"vvc1",dvi1:"vvi1"},n=new Set;e=v(e);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(e=(n=v(n)).next();!e.done;e=n.next()){e=e.value,i=v(Object.keys(t));for(var r=i.next();!r.done;r=i.next())if(r=r.value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,t[r]);break}}}(t.variants),M(o,iL(t.variants,n,!1,i),2);r=null,e&&(a=e.g)&&(r=a.keySystem),t.variants=t.variants.filter(function(e){var t=function(e,t){var n=eQ(),i=ti("Firefox")&&tt(),r=e.video,a=r&&r.width||0,o=r&&r.height||0;if(n&&r&&(1920<a||1080<o)&&(r.codecs.includes("avc1.")||r.codecs.includes("avc3.")))return!1;if(r){if(n=iU(r.codecs),r.codecs.includes(",")){if(n=iU(n=nZ("video",a=r.codecs.split(","))),a=ij(a=nZ("audio",a),r.mimeType),!ec(o=n7(r.mimeType,a,"audio")))return!1;n=[n,a].join()}if(!ec(a=n7(r.mimeType,n,"video")))return!1;r.codecs=n}if(r=e.audio,i&&r&&r.encrypted&&r.codecs.toLowerCase().includes("opus"))return!1;if(r){if(i=ij(r.codecs,r.mimeType),!ec(n=n7(r.mimeType,i,"audio")))return!1;r.codecs=i}return e.decodingInfos.some(function(e){return!!e.supported&&(!t||!(e=e.keySystemAccess)||e.keySystem==t)})}(e,r);if(!t){var n=[];e.audio&&n.push(iY(e.audio)),e.video&&n.push(iY(e.video))}return t}),C(o)})}function iP(e,t){var n,i,r,a,o,s,u;return F(function(l){if(1==l.g){for(n=function(e,t){if(e){var n=tk(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=v(t)).next(),s={};!o.done;s={cache:void 0,Fd:void 0},o=a.next())u=o.value,s.Fd=function e(t){var n=[];for(i in t)n.push(i);n.sort();var i=[];n=v(n);for(var r=n.next();!r.done;r=n.next()){var a=r.value;r=JSON.stringify(a),a=(a=t[a])instanceof Object?e(a):JSON.stringify(a),i.push(r+":"+a)}return"{"+i.join(",")+"}"}(u),s.cache=iJ,s.cache[s.Fd]?i=n(i,s.cache[s.Fd]):r.push((function(e){var t=[""];e.video&&(t=ia(e.video.contentType).split(","));var n=[""];e.audio&&(n=ia(e.audio.contentType).split(","));var i=[];t=v(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var a=v(n),o=a.next(),s={};!o.done;s={Dc:void 0},o=a.next())o=o.value,s.Dc=tE(e),e.video&&(s.Dc.video.contentType=n8(ir(s.Dc.video.contentType),r)),e.audio&&(s.Dc.audio.contentType=n8(ir(s.Dc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){navigator.mediaCapabilities.decodingInfo(e.Dc).then(function(e){t(e)}).catch(n)}}(s)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})})(u).then(function(e){return function(t){var r=null;t=v(t||[]);for(var a=t.next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache[e.Fd]=r,i=n(i,r))}}(s)));return M(l,Promise.all(r),2)}i&&e.decodingInfos.push(i),C(l)})}function iL(e,t,n,i){var r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w;return F(function(T){switch(T.g){case 1:if(e.some(function(e){return e.decodingInfos.length}))return T.return();a=(r=v(i)).next(),o={};case 2:if(a.done){T.u(4);break}o.Tg=a.value,s=!1,l=(u=v(e)).next();case 5:var x;if(l.done){T.u(7);break}h=(d=v(iN(c=l.value,t,n).filter((x=o,function(e){return((e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)===x.Tg})))).next();case 8:if(h.done){T.u(10);break}return p=h.value,M(T,iP(c,p),9);case 9:h=d.next(),T.u(8);break;case 10:c.decodingInfos.length&&(s=!0),l=u.next(),T.u(5);break;case 7:if(s)return T.return();o={Tg:void 0},a=r.next(),T.u(2);break;case 4:g=(f=v(e)).next();case 12:if(g.done){T.u(0);break}b=(y=v(iN(m=g.value,t,n).filter(function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}))).next();case 15:if(b.done){g=f.next(),T.u(12);break}return w=b.value,M(T,iP(m,w),16);case 16:b=y.next(),T.u(15)}})}function iN(e,t,n){var i=e.audio,r=e.video,a=[],o=[];if(r)for(var s=v(r.fullMimeTypes),u=s.next();!u.done;u=s.next()){var l=ia(u=u.value);if(l.includes(",")&&!i){var c=l.split(","),d=ir(u);l=nZ("video",c),c=ij(c=nZ("audio",c),d),d=n7(d,c,"audio"),o.push({contentType:d,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=iU(l),u={contentType:n7(ir(u),l,"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":u.transferFunction="srgb";break;case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}r.colorGamut&&(u.colorGamut=r.colorGamut),a.push(u)}if(i)for(u=(s=v(i.fullMimeTypes)).next();!u.done;u=s.next())u=ir(l=u.value),l=ij(ia(l),u),u=n7(u,l,"audio"),o.push({contentType:u,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),u=(a=v(a)).next();!u.done;u=a.next())for(u=u.value,d=(l=v(o)).next();!d.done;d=l.next())d=d.value,c={type:n?"file":"media-source"},u&&(c.video=u),d&&(c.audio=d),s.push(c);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];for(e=[],n=new Map,a=(o=v(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"],u=(a=v(n.keys())).next();!u.done;u=a.next()){for(u=u.value,l=[],c=(d=v(s)).next();!c.done;c=d.next()){c=Object.assign({},c.value);var h=n.get(u),p={keySystem:u,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t};h=v(h);for(var f=h.next();!f.done;f=h.next()){if((f=f.value).initData&&f.initData.length){for(var g=new Set,m=v(f.initData),y=m.next();!y.done;y=m.next())g.add(y.value.initDataType);p.initDataType=f.initData[0].initDataType}f.distinctiveIdentifierRequired&&(p.distinctiveIdentifier="required"),f.persistentStateRequired&&(p.persistentState="required"),f.sessionType&&(p.sessionTypes=[f.sessionType]),i&&(p.audio?(f.encryptionScheme&&(p.audio.encryptionScheme=p.audio.encryptionScheme||f.encryptionScheme),p.audio.robustness=p.audio.robustness||f.audioRobustness):(p.audio={robustness:f.audioRobustness},f.encryptionScheme&&(p.audio.encryptionScheme=f.encryptionScheme)),""==p.audio.robustness&&delete p.audio.robustness),r&&(p.video?(f.encryptionScheme&&(p.video.encryptionScheme=p.video.encryptionScheme||f.encryptionScheme),p.video.robustness=p.video.robustness||f.videoRobustness):(p.video={robustness:f.videoRobustness},f.encryptionScheme&&(p.video.encryptionScheme=f.encryptionScheme)),""==p.video.robustness&&delete p.video.robustness)}c.keySystemConfiguration=p,l.push(c)}
1e.push(l)}return e}function ij(e,t){return"flac"==e.toLowerCase()?e7()?"fLaC":"flac":"opus"===e.toLowerCase()?e7()&&"mp4"==ie(t)?"Opus":"opus":e}function iU(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 iO(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=v(t.roles),h=d.next();!h.done;h=d.next())c.add(h.value);if(n)for(h=(d=v(n.roles)).next();!h.done;h=d.next())c.add(h.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(c),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,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)),t&&(e.audioId=t.
1id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage),e}function i_(e){return{id:e.id,active:!1,type:n2,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 iB(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=oK(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 iF(e){return e.__shaka_id||(e.__shaka_id=i$++),e.__shaka_id}function iV(e){var t=iG(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}function iH(e){var t=iG(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 iG(e){var t=e.language;return{id:iF(e),active:!1,type:"",bandwidth:0,language:ix(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 iK(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function iq(e){return e.filter(function(e){return iK(e)})}function iX(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=ik(ix(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return ix(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=iW(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(ig,[])).length?iW(r,e[0]):r}function iW(e,t){return e.filter(function(e){return e.roles.includes(t)})}function iz(e,t){t.length&&(t=t.filter(function(t){return it(e.codecs)==it(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 iY(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"}
1z("shaka.util.StreamUtils",iM),iM.meetsRestrictions=iD;var iJ={},i$=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 i0(){var e=this;this.A=null,this.j=!1,this.i=new Z,this.F=new es,navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(e.j&&e.g.useNetworkInformation){e.i=new Z,e.g&&e.i.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.A(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.s=[],this.B=1,this.G=!1,this.h=this.o=this.g=this.l=null,this.C=new ez(function(){if(e.j&&e.g.restrictToElementSize){var t=e.chooseVariant();t&&e.A(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.m=null}function i1(e){if(!e.G){var t=e.i;if(!(t.g>=t.i))return;e.G=!0,e.l-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.l<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.A(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function i2(e,t,n,i,r){if(e.m){var a=e.m.Cg();a&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a}))}return t&&(n=n.filter(function(e){return iD(e,t,{width:r,height:i})})),n.sort(function(e,t){return e.bandwidth-t.bandwidth})}(b=i0.prototype).stop=function(){this.A=null,this.j=!1,this.s=[],this.B=1,this.o=this.l=null,this.h&&(this.h.disconnect(),this.h=null),this.C.stop(),this.m=null},b.release=function(){this.F.release(),this.C=null},b.init=function(e){this.A=e},b.chooseVariant=function(){var t=1/0,n=1/0;if(this.g.restrictToScreenSize){var i=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio;t=e.screen.height*i,n=e.screen.width*i}this.h&&this.g.restrictToElementSize&&(i=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio,t=Math.min(t,this.o.clientHeight*i),n=Math.min(n,this.o.clientWidth*i)),(i=this.s.filter(function(e){return e&&!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})).length||(i=this.s);var r=i;if(i.length!=this.s.length&&(r=this.s.filter(function(e){return e&&(!!e.audio&&!!e.audio.fastSwitching||!!e.video&&!!e.video.fastSwitching)})),i=i2(this,this.g.restrictions,r,1/0,1/0),1/0!=t||1/0!=n){i=v(i=function(e){var t=[];e=v(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})}(i));for(var a=i.next();!a.done;a=i.next())if((a=a.value).height>=t&&a.width>=n){t=a.height,n=a.width;break}i=i2(this,this.g.restrictions,r,t,n)}for(t=this.getBandwidthEstimate(),r.length&&!i.length&&(i=[(i=i2(this,null,r,1/0,1/0))[0]]),n=i[0]||null,r=0;r<i.length;r++){a=i[r];for(var o=isNaN(this.B)?1:Math.abs(this.B),s=o*a.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},l=r+1;l<i.length;l++)if(a.bandwidth!=i[l].bandwidth){u=i[l];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,t>=s&&t<=o&&(n.bandwidth!=a.bandwidth||n.bandwidth==a.bandwidth&&n.video&&a.video&&(n.video.width<a.video.width||n.video.height<a.video.height))&&(n=a)}return this.l=Date.now(),n},b.enable=function(){this.j=!0},b.disable=function(){this.j=!1},b.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.i.sample(e,t),n&&null!=this.l&&this.j&&i1(this))},b.trySuggestStreams=function(){null!=this.l&&this.j&&i1(this)},b.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.i.getBandwidthEstimate(e),this.m?this.m.getBandwidthEstimate(e):e)},b.setVariants=function(e){this.s=e},b.playbackRateChanged=function(e){this.B=e},b.setMediaElement=function(t){var n=this;this.o=t,this.h&&(this.h.disconnect(),this.h=null),this.o&&"ResizeObserver"in e&&(this.h=new ResizeObserver(function(){n.C.Z(i3)}),this.h.observe(this.o))},b.setCmsdManager=function(e){this.m=e},b.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},z("shaka.abr.SimpleAbrManager",i0),i0.prototype.configure=i0.prototype.configure,i0.prototype.setCmsdManager=i0.prototype.setCmsdManager,i0.prototype.setMediaElement=i0.prototype.setMediaElement,i0.prototype.playbackRateChanged=i0.prototype.playbackRateChanged,i0.prototype.setVariants=i0.prototype.setVariants,i0.prototype.getBandwidthEstimate=i0.prototype.getBandwidthEstimate,i0.prototype.trySuggestStreams=i0.prototype.trySuggestStreams,i0.prototype.segmentDownloaded=i0.prototype.segmentDownloaded,i0.prototype.disable=i0.prototype.disable,i0.prototype.enable=i0.prototype.enable,i0.prototype.chooseVariant=i0.prototype.chooseVariant,i0.prototype.init=i0.prototype.init,i0.prototype.release=i0.prototype.release,i0.prototype.stop=i0.prototype.stop;var i3=1;function i4(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=v(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function i5(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(e){return ii(e)}),t=t.codecs.split(",").map(function(e){return ii(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 i6(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=v(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function i8(e,t){this.g=new i9(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,e.video&&e.video.hdr?e.video.hdr:"",!!e.audio&&!!e.audio.spatialAudio&&e.audio.spatialAudio,e.video&&e.video.videoLayout?e.video.videoLayout:"","","",t,e.audio&&e.audio.codecs?e.audio.codecs:"")}function i9(e,t,n,i,r,a,o,s,u,l){this.s=e,this.A=t,this.i=n,this.j=i,this.B=r,this.m=a,this.h=o,this.l=s,this.o=u,this.g=l}function i7(){this.g=rn,this.i=(new Map).set(rn,2).set(rt,1),this.h=0}function re(e,t,n){e.i.set(rn,n).set(rt,t)}z("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),z("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),i4.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&&!i5(n,r))&&i6(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||i5(i,n))&&i6(i.roles,n.roles))),!n&&(this.g.add(e),!0)},i4.prototype.values=function(){return this.g.values()},i8.prototype.create=function(e){return this.g.create(e)},i9.prototype.create=function(t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T=[];n=t,T=(r=ik(i=ix(i=this.s),n.map(function(e){return iE(e)})))?n.filter(function(e){return r==iE(e)}):[];var x=t.filter(function(e){return e.primary});return(a=T=T.length?T:x.length?x:t,o=this.A,t=a.filter(function(e){return!!e.audio&&(o?e.audio.roles.includes(o):0==e.audio.roles.length)})).length&&(T=t),this.m&&(s=T,u=this.m,t=s.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==u})).length&&(T=t),this.j&&(l=T,"AUTO"==(c=this.j)&&(c=e.matchMedia("(color-gamut: p3)").matches?l.some(function(e){return!!e.video&&!!e.video.hdr&&"HLG"==e.video.hdr})?"HLG":"PQ":"SDR"),t=l.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==c})).length&&(T=t),this.i&&(d=T,h=this.i,t=d.filter(function(e){return!e.audio||!e.audio.channelsCount||e.audio.channelsCount==h})).length&&(T=t),this.h&&(p=T,f=this.h,t=p.filter(function(e){return!!e.audio&&!!e.audio.label&&e.audio.label.toLowerCase()==f.toLowerCase()})).length&&(T=t),this.l&&(g=T,m=this.l,t=g.filter(function(e){return!!e.video&&!!e.video.label&&e.video.label.toLowerCase()==m.toLowerCase()})).length&&(T=t),(v=T,y=this.B,t=v.filter(function(e){return!e.audio||e.audio.spatialAudio==y})).length&&(T=t),this.g&&(b=T,w=this.g,t=b.filter(function(e){return!e.audio||e.audio.codecs==w})).length&&(T=t),new i4(T[0],T,!("smooth"==this.o&&ed()))};var rt=0,rn=1;function ri(e,t){var n=ra();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 rr(e){var t,n;return F(function(i){if(1==i.g){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new eB(2,7,1010);return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),M(i,new Promise(function(e){new ez(e).Z(n/1e3)}),2))}e.h*=e.m,C(i)})}function ra(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function ro(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function rs(e,t){this.promise=e,this.i=t,this.g=null}function ru(e){return new rs(Promise.reject(e),function(){return Promise.resolve()})}function rl(){var e=Promise.reject(new eB(2,7,7001));return e.catch(function(){}),new rs(e,function(){return Promise.resolve()})}function rc(e){return new rs(Promise.resolve(e),function(){return Promise.resolve()})}function rd(e){return new rs(e,function(){return e.catch(function(){})})}function rh(e){return new rs(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function rp(t,n){if(n)if(n instanceof Map)for(var i=v(n.keys()),r=i.next();!r.done;r=i.next())Object.defineProperty(this,r=r.value,{value:n.get(r),writable:!0,enumerable:!0});else for(i in n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function rf(e){var t,n=new rp(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}ro.prototype.resolve=function(){},ro.prototype.reject=function(){},rs.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},rs.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},rs.prototype.Ca=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 ro,o=new eB(2,7,7001);return this.promise.then(n(!0),n(!1)),new rs(a,function(){return i()})},f.Object.defineProperties(rs.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),z("shaka.util.AbortableOperation",rs),rs.prototype.chain=rs.prototype.Ca,rs.prototype.finally=rs.prototype.finally,rs.all=rh,rs.prototype.abort=rs.prototype.abort,rs.notAbortable=rd,rs.completed=rc,rs.aborted=rl,rs.failed=ru,rp.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},rp.prototype.stopImmediatePropagation=function(){this.g=!0},rp.prototype.stopPropagation=function(){},z("shaka.util.FakeEvent",rp);var rg={mj:"abrstatuschanged",nj:"adaptation",oj:"audiotrackchanged",pj:"buffering",qj:"complete",rj:"downloadfailed",
1sj:"downloadheadersreceived",tj:"drmsessionupdate",vj:"emsg",Pj:"prft",Error:"error",wj:"expirationupdated",xj:"firstquartile",yj:"gapjumped",Bj:"keystatuschanged",Fj:"loaded",Gj:"loading",Ij:"manifestparsed",Jj:"manifestupdated",Kj:"mediaqualitychanged",Lj:"mediasourcerecovered",Metadata:"metadata",Mj:"midpoint",Nj:"nospatialvideoinfo",Oj:"onstatechange",Qj:"ratechange",Sj:"segmentappended",Tj:"sessiondata",Uj:"spatialvideoinfo",Vj:"stalldetected",Wj:"started",Xj:"statechanged",Yj:"streaming",Zj:"textchanged",$j:"texttrackvisibility",ak:"thirdquartile",bk:"timelineregionadded",ck:"timelineregionenter",dk:"timelineregionexit",ek:"trackschanged",gk:"unloading",ik:"variantchanged"};function rm(){this.qa=new eo,this.te=this}function rv(){this.g=[]}function ry(e,t){e.g.push(t.finally(function(){eU(e.g,t)}))}function rb(e,t,n,i,r,a){rm.call(this),this.i=!1,this.o=new rv,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.B=n||null,this.C=i||null,this.G=r||null,this.F=a||null,this.s=this.A=!1,this.m=16e3}function rw(e,t,n,i){n=n||rI;var r=rM[e];(!r||n>=r.priority)&&(rM[e]={priority:n,he:t,Hi:void 0!==i&&i})}function rT(e,t){for(var n=v(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=v(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function rx(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 rA(){this.g=0}function rE(e,t,n){rs.call(this,e,t),this.h=n}rm.prototype.addEventListener=function(e,t){this.qa&&this.qa.push(e,t)},rm.prototype.removeEventListener=function(e,t){this.qa&&this.qa.remove(e,t)},rm.prototype.dispatchEvent=function(e){if(!this.qa)return!0;var t=this.qa.get(e.type)||[],n=this.qa.get("All");for(n&&(t=t.concat(n)),n=(t=v(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.te,e.currentTarget=this.te;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},rm.prototype.release=function(){this.qa=null},rv.prototype.destroy=function(){for(var e=[],t=v(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)},A(rb,rm),(b=rb.prototype).Uf=function(e){this.A=e},b.Vf=function(e){this.s=e},b.Ki=function(e){this.g.add(e)},b.fj=function(e){this.g.delete(e)},b.og=function(){this.g.clear()},b.Li=function(e){this.h.add(e)},b.gj=function(e){this.h.delete(e)},b.pg=function(){this.h.clear()},b.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),rm.prototype.release.call(this),this.o.destroy()},b.request=function(e,t,n){var i=this,r=new rA;if(this.i){var a=Promise.reject(new eB(2,7,7001));return a.catch(function(){}),new rE(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?tE(t.retryParameters):ra(),t.uris=tE(t.uris);var o=(a=function(e,t,n,i){function r(e){a=a.Ca(function(){return n.body&&(n.body=eS(n.body)),e(t,n,i)})}var a=rc(void 0);e.C&&r(e.C),e=v(e.g);for(var o=e.next();!o.done;o=e.next())r(o.value);return a.Ca(void 0,function(e){if(e instanceof eB&&7001==e.code)throw e;throw new eB(2,1,1006,e)})}(this,e,t,n)).Ca(function(){return function e(t,n,i,r,a,o,s,u){t.A&&(i.uris[o]=i.uris[o].replace("https://","http://")),t.s&&(i.uris[o]=i.uris[o].replace("http://","https://")),0<o&&t.G&&t.G(n,r,i.uris[o],i.uris[o-1]);var l=new nM(i.uris[o]),c=l.Db,d=!1;c||(nC(l,c=(c=location.protocol).slice(0,-1)),i.uris[o]=l.toString());var h=(c=rM[c=c.toLowerCase()])?c.he:null;if(!h)return ru(new eB(2,1,1e3,l));var p,f=c.Hi,g=null,m=null,v=!1,y=!1;return rd(rr(a)).Ca(function(){if(t.i)return rl();p=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.Z(l/1e3),t.l&&n==rk&&(i.packetNumber=++e,t.l(a,o,rS(r),i),d=!0,u.g=s)},function(e){y=!0,i.timeToFirstByte=Date.now()-i.requestStartTime,t.j&&t.j(e,i,n)},{minBytesForProgressEvents:t.m});if(!f)return a;var s=i.retryParameters.connectionTimeout;s&&(g=new ez(function(){v=!0,a.abort()})).Z(s/1e3);var l=i.retryParameters.stallTimeout;return l&&(m=new ez(function(){v=!0,a.abort()})),a}).Ca(function(e){g&&g.stop(),m&&m.stop(),void 0==e.timeMs&&(e.timeMs=Date.now()-p);var r={response:e,mi:d};return!y&&t.j&&t.j(e.headers,i,n),r},function(l){if(g&&g.stop(),m&&m.stop(),t.B){var c=null,d=0;l instanceof eB&&(c=l,1001==l.code&&(d=l.data[1])),t.B(i,c,d,v)}if(t.i)return rl();if(v&&(l=new eB(1,1,1003,i.uris[o],n)),l instanceof eB){if(7001==l.code)throw l;if(1010==l.code)throw s;if(1==l.severity)return c=new rp("retry",c=(new Map).set("error",l)),t.dispatchEvent(c),o=(o+1)%i.uris.length,e(t,n,i,r,a,o,l,u)}throw l})}(i,e,t,n,new ri(t.retryParameters,!1),0,null,r)}),s=o.Ca(function(t){var r=i,a=e,o=t,s=n,u=rc(void 0);r=v(r.h);for(var l=r.next(),c={};!l.done;c={Yg:void 0},l=r.next())c.Yg=l.value,u=u.Ca(function(e){return function(){var t=o.response;return t.data&&(t.data=eS(t.data)),(0,e.Yg)(a,t,s)}}(c));return u.Ca(function(){return o},function(e){var t=2;if(e instanceof eB){if(7001==e.code)throw e;t=e.severity}throw new eB(t,1,1007,e)})}),u=Date.now(),l=0;a.promise.then(function(){l=Date.now()-u},function(){});var c=0;o.promise.then(function(){c=Date.now()},function(){});var d=s.Ca(function(r){var a=Date.now()-c,o=r.response;return o.timeMs+=l,o.timeMs+=a,r.mi||!i.l||o.fromCache||"HEAD"==t.method||e!=rk||i.l(o.timeMs,o.data.byteLength,rS(n)),i.F&&i.F(e,o,n),o},function(e){throw e&&(e.severity=2),e});return a=new rE(d.promise,function(){return d.abort()},r),ry(this.o,a),a},z("shaka.net.NetworkingEngine",rb),rb.prototype.request=rb.prototype.request,rb.prototype.destroy=rb.prototype.destroy,rb.makeRequest=rx,rb.defaultRetryParameters=function(){return ra()},rb.prototype.clearAllResponseFilters=rb.prototype.pg,rb.prototype.unregisterResponseFilter=rb.prototype.gj,rb.prototype.registerResponseFilter=rb.prototype.Li,rb.prototype.clearAllRequestFilters=rb.prototype.og,rb.prototype.unregisterRequestFilter=rb.prototype.fj,rb.prototype.registerRequestFilter=rb.prototype.Ki,rb.unregisterScheme=function(e){delete rM[e]},rb.registerScheme=rw,rb.prototype.setForceHTTPS=rb.prototype.Vf,rb.prototype.setForceHTTP=rb.prototype.Uf,rb.NumBytesRemainingClass=rA,A(rE,rs),rb.PendingRequest=rE;var rk=1;rb.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},rb.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 rI=3;rb.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var rM={};function rC(e){this.g=!1,this.h=new ro,this.i=e}function rD(e,t){if(e.g){if(t instanceof eB&&7003==t.code)throw t;throw new eB(2,7,7003,t)}}function rR(e,t){var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function rP(e){for(var t=new Map,n=v(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function rL(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function rN(e,t){this.h=ek(e),this.i=t==rU,this.g=0}function rj(){return new eB(2,3,3e3)}rC.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))},(b=rN.prototype).sa=function(){return this.g<this.h.byteLength},b.ya=function(){return this.g},b.getLength=function(){return this.h.byteLength},b.T=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw rj()}},b.ma=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw rj()}},b.P=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw rj()}},b.Vg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw rj()}},b.Tc=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 rj()}if(2097151<t)throw new eB(2,3,3001);return this.g+=8,0x100000000*t+e},b.vb=function(e){if(this.g+e>this.h.byteLength)throw rj();var t=eA(this.h,this.g,e);return this.g+=e,t},b.skip=function(e){if(this.g+e>this.h.byteLength)throw rj();this.g+=e},b.Si=function(e){if(this.g<e)throw rj();this.g-=e},b.seek=function(e){if(0>e||e>this.h.byteLength)throw rj();this.g=e},b.wc=function(){for(var e=this.g;this.sa()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=eA(this.h,e,this.g-e),this.g+=1,tc(e)},z("shaka.util.DataViewReader",rN),rN.prototype.readTerminatedString=rN.prototype.wc,rN.prototype.seek=rN.prototype.seek,rN.prototype.rewind=rN.prototype.Si,rN.prototype.skip=rN.prototype.skip,rN.prototype.readBytes=rN.prototype.vb,rN.prototype.readUint64=rN.prototype.Tc,rN.prototype.readInt32=rN.prototype.Vg,rN.prototype.readUint32=rN.prototype.P,rN.prototype.readUint16=rN.prototype.ma,rN.prototype.readUint8=rN.prototype.T,rN.prototype.getLength=rN.prototype.getLength,rN.prototype.getPosition=rN.prototype.ya,rN.prototype.hasMoreData=rN.prototype.sa;var rU=1;function rO(){this.i=[],this.h=[],this.g=!1}function r_(e){for(var t=rq(e);e.reader.sa()&&!e.parser.g;)e.parser.Qc(e.start+t,e.reader,e.partialOkay)}function rB(e){for(var t=rq(e),n=e.reader.P(),i=0;i<n&&(e.parser.Qc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function rF(e){var t=rq(e);for(e.reader.skip(78);e.reader.sa()&&!e.parser.g;)e.parser.Qc(e.start+t,e.reader,e.partialOkay)}function rV(e){var t=rq(e);e.reader.skip(8);var n=e.reader.ma();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.sa()&&!e.parser.g;)e.parser.Qc(e.start+t,e.reader,e.partialOkay)}function rH(e){return function(t){e(t.reader.vb(t.reader.getLength()-t.reader.ya()))}}function rG(e){var t=0;e=v(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function rK(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function rq(e){return 8+8*!!e.has64BitSize+4*(null!=e.flags)}rN.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(b=rO.prototype).box=function(e,t){return e=rG(e),this.i[e]=rX,this.h[e]=t,this},b.R=function(e,t){return e=rG(e),this.i[e]=rW,this.h[e]=t,this},b.stop=function(){this.g=!0},b.parse=function(e,t,n){for(e=new rN(e,0),this.g=!1;e.sa()&&!this.g;)this.Qc(0,e,t,n)},b.Qc=function(e,t,n,i){var r=t.ya();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.P(),o=t.P(),s=rK(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.ya()+8>t.getLength()){this.g=!0;return}a=t.Tc(),u=!0}var l=this.h[o];if(l){var c=null,d=null;if(this.i[o]==rW){if(i&&t.ya()+4>t.getLength()){this.g=!0;return}c=(d=t.P())>>>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 rN(t=0<(i=o-t.ya())?t.vb(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u})}else t.skip(Math.min(r+a-t.ya(),t.getLength()-t.ya()))}},z("shaka.util.Mp4Parser",rO),rO.headerSize=rq,rO.typeToString=rK,rO.allData=rH,rO.audioSampleEntry=rV,rO.visualSampleEntry=rF,rO.sampleDescription=rB,rO.children=r_,rO.prototype.parseNext=rO.prototype.Qc,rO.prototype.parse=rO.prototype.parse,rO.prototype.stop=rO.prototype.stop,rO.prototype.fullBox=rO.prototype.R,rO.prototype.box=rO.prototype.box;var rX=0,rW=1;function rz(e){var t=this;this.g=[],this.h=[],this.data=[],(new rO).box("moov",r_).box("moof",r_).R("pssh",function(e){if(!(1<e.version)){var n=eA(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(nz(e.reader.vb(16))),0<e.version){n=e.reader.P();for(var i=0;i<n;i++){var r=nz(e.reader.vb(16));t.h.push(r)}}}}).parse(e)}function rY(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=ek(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,0x70737368),u+=4,1>i?s.setUint32(u,0):s.setUint32(u,0x1000000),u+=4,o.set(t,u),u+=t.length,0<i)for(s.setUint32(u,n.size),u+=4,n=(t=v(n)).next();!n.done;n=t.next())n=nW(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function rJ(e){var t=this;this.C=e,this.l=this.A=null,this.fa=this.aa=!1,this.H=0,this.g=null,this.o=new es,this.i=new Map,this.B=new Map,this.m=new ro,this.h=null,this.s=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.V=new Map,this.da=new Map,this.K=new ez(function(){var e,n,i;
1return n=(e=t).V,void((i=e.da).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 eB(2,6,6014)),e.C.ee(rL(i)))}),this.M=!1,this.L=[],this.S=!1,this.I=new ez(function(){var e;(e=t).i.forEach(function(t,n){var i=t.Ef,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Ef=r)})}),this.m.catch(function(){}),this.j=new rC(function(){var e;return e=t,F(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.K.stop(),e.K=null,M(t,r7(e),2);case 2:if(!e.l){t.u(3);break}return D(t,4),M(t,e.l.setMediaKeys(null),6);case 6:P(t,5);break;case 4:L(t);case 5:e.l=null;case 3:e.g=null,e.A=null,e.B=new Map,e.h=null,e.s=function(){},e.C=null,e.$=!1,e.G=null,C(t)}})}),this.$=!1,this.F=this.G=null,this.O=function(){return!1}}function r$(e,t,n){e.B=new Map,n=v(n);for(var i=n.next();!i.done;i=n.next())e.B.set(i.value,{initData:null,initDataType:null});for(i=(n=v(e.h.persistentSessionsMetadata)).next();!i.done;i=n.next())i=i.value,e.B.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.M=0<e.B.size,rQ(e,t)}function rQ(t,n){var i,r,a,o,s,u,l,c,d,h,p,f,g,m;return F(function(y){if(1==y.g){var b;if(i=0==(b=rP((b=t).h.clearKeys)).size?null:nQ(b))for(a=(r=v(n)).next();!a.done;a=r.next())(o=a.value).video&&(o.video.drmInfos=[i]),o.audio&&(o.audio.drmInfos=[i]);for((s=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}))||function(e,t){var n=[];for(t.forEach(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),t=(e=v(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,rP(t.h.servers)),u=new Set,c=(l=v(n)).next();!c.done;c=l.next())for(h=(d=v(ae(c.value))).next();!h.done;h=d.next())p=h.value,u.add(p);for(g=(f=v(u)).next();!g.done;g=f.next())!function(t,n,i,r){var a=t.keySystem;a&&("org.w3.clearkey"!=a||!t.licenseServerUri)&&(n.size&&(t.licenseServerUri=n=n.get(a)||""),t.keyIds||(t.keyIds=new Set),(i=i.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.videoRobustness||(t.videoRobustness=i.videoRobustness),t.audioRobustness||(t.audioRobustness=i.audioRobustness),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),r[a]&&(t.keySystem=r[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(g.value,rP(t.h.servers),rP(t.h.advanced||{}),t.h.keySystemsMapping);return M(y,iL(n,t.M,t.$,t.h.preferredKeySystems),2)}return(rD(t.j),s||Object.keys(t.h.servers).length)?(m=r3(t,void 0,n),y.return(s?m:m.catch(function(){}))):(t.aa=!0,y.return(Promise.resolve()))})}function rZ(e){var t;return F(function(n){switch(n.g){case 1:if(e.l.mediaKeys)return n.return();if(!e.G){n.u(2);break}return M(n,e.G,3);case 3:return rD(e.j),n.return();case 2:return D(n,4),e.G=e.l.setMediaKeys(e.A),M(n,e.G,6);case 6:P(n,5);break;case 4:t=L(n),e.s(new eB(2,6,6003,t.message));case 5:rD(e.j),C(n)}})}function r0(e){var t,n,i;return F(function(r){if(1==r.g)return e.B.size?(e.B.forEach(function(t,n){r6(e,n,t)}),M(r,e.m,3)):r.u(2);if(2!=r.g){if(0<(e.g&&e.g.keyIds||new Set([])).size&&function(e){for(var t=v(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.V.get(n.value))return!1;return!0}(e))return r.return(e.m);e.m=new ro,e.m.catch(function(){})}for(n=(t=v((e.g?e.g.initData:[])||[])).next();!n.done;n=t.next())r1(e,(i=n.value).initDataType,i.initData);return at(e)&&e.m.resolve(),r.return(e.m)})}function r1(e,t,n){if(n.length){if(e.h.ignoreDuplicateInitData){var i=e.i.values();i=v(i);for(var r=i.next();!r.done;r=i.next())if(eT(n,r.value.initData))return;var a=!1;if(e.B.forEach(function(e){!a&&eT(n,e.initData)&&(a=!0)}),a)return}0<e.i.size&&at(e)&&(e.m.resolve(),e.m=new ro,e.m.catch(function(){})),function(e,t,n,i){try{var r=e.A.createSession(i)}catch(t){e.s(new eB(2,6,6005,t.message));return}e.o.D(r,"message",function(t){e.l&&e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.S?e.L.push(t):r8(e,t)}),e.o.D(r,"keystatuseschange",function(t){return r9(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Ef:1/0,nb:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(n){t=n,n instanceof eB||(t=new eB(2,6,6016,n)),e.s(t);return}e.h.logLicenseExchange&&nq(n),r.generateRequest(t,n).catch(function(t){if(!e.j.g){e.i.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;0>i&&(i+=0x100000000),i="0x"+i.toString(16)}e.s(new eB(2,6,6006,t.message,t,i))}})}(e,t,n,e.g.sessionType)}}function r2(e){return Array.from(e=rR(e=e.i.keys(),function(e){return e.sessionId}))}function r3(e,t,n){var i,r,a,o,s,u;return F(function(l){switch(l.g){case 1:var c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I;if(i=new Map,n.length){r=function(e,t,n){for(var i=v(t),r=i.next();!r.done;r=i.next()){r=v(ae(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 eB(2,6,6e3);for(r=(e=v(e.h.preferredKeySystems)).next(),i={};!r.done;i={Ug:void 0},r=e.next())for(i.Ug=r.value,a=(r=v(t)).next();!a.done;a=r.next())if(a=a.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.Ug}}(i)))return a.keySystemAccess;for(i=(e=v([!0,!1])).next();!i.done;i=e.next())for(i=i.value,a=(r=v(t)).next();!a.done;a=r.next()){a=v(a.value.decodingInfos);for(var o=a.next();!o.done;o=a.next())if((o=o.value).supported&&o.keySystemAccess){var s=n.get(o.keySystemAccess.keySystem);s=v(s);for(var u=s.next();!u.done;u=s.next())if(!!u.value.licenseServerUri==i)return o.keySystemAccess}}return null}(e,n,i),l.u(2);break}return M(l,(c=e,d=t,F(function(e){switch(e.g){case 1:if(1==d.size&&d.has(""))throw new eB(2,6,6e3);
1for(f=(p=v(d.values())).next();!f.done;f=p.next())0==(g=f.value).audioCapabilities.length&&delete g.audioCapabilities,0==g.videoCapabilities.length&&delete g.videoCapabilities;y=(m=v(c.h.preferredKeySystems)).next();case 2:if(y.done){e.u(4);break}if(b=y.value,!d.has(b)){e.u(3);break}return w=d.get(b),D(e,6),M(e,navigator.requestMediaKeySystemAccess(b,[w]),8);case 8:return h=e.h,e.return(h);case 6:L(e);case 7:rD(c.j);case 3:y=m.next(),e.u(2);break;case 4:x=(T=v([!0,!1])).next();case 9:if(x.done){e.u(11);break}S=x.value,E=(A=v(d.keys())).next();case 12:if(E.done){x=T.next(),e.u(9);break}if(k=E.value,(I=d.get(k)).drmInfos.some(function(e){return!!e.licenseServerUri})!=S){e.u(13);break}return D(e,15),M(e,navigator.requestMediaKeySystemAccess(k,[I]),17);case 17:return h=e.h,e.return(h);case 15:L(e);case 16:rD(c.j);case 13:E=A.next(),e.u(12);break;case 11:return e.return(h)}})),3);case 3:r=l.h;case 2:if(!(a=r))throw new eB(2,6,6001);if(rD(e.j),D(l,4),a.getConfiguration(),n.length){var C,R,N=a.keySystem,j=i.get(a.keySystem),U=[],O=[],_=[],B=[],V=[],H=new Set,G=new Set;an(j,U,O,B,_,V,H,G);var K=e.M?"persistent-license":"temporary";for(N={keySystem:N,encryptionScheme:U[0],licenseServerUri:O[0],distinctiveIdentifierRequired:j[0].distinctiveIdentifierRequired,persistentStateRequired:j[0].persistentStateRequired,sessionType:j[0].sessionType||K,audioRobustness:j[0].audioRobustness||"",videoRobustness:j[0].videoRobustness||"",serverCertificate:B[0],serverCertificateUri:_[0],initData:V,keyIds:H},0<G.size&&(N.keySystemUris=G),G=(j=v(j)).next();!G.done;G=j.next())(G=G.value).distinctiveIdentifierRequired&&(N.distinctiveIdentifierRequired=G.distinctiveIdentifierRequired),G.persistentStateRequired&&(N.persistentStateRequired=G.persistentStateRequired);j=N}else j=a.keySystem,G=t.get(a.keySystem),N=[],U=[],O=[],_=[],B=[],V=new Set,an(G.drmInfos,N,U,_,O,B,V),j={keySystem:j,encryptionScheme:N[0],licenseServerUri:U[0],distinctiveIdentifierRequired:"required"==G.distinctiveIdentifier,persistentStateRequired:"required"==G.persistentState,sessionType:G.sessionTypes[0]||"temporary",audioRobustness:(G.audioCapabilities?G.audioCapabilities[0].robustness:"")||"",videoRobustness:(G.videoCapabilities?G.videoCapabilities[0].robustness:"")||"",serverCertificate:_[0],serverCertificateUri:O[0],initData:B,keyIds:V};if(e.g=j,!e.g.licenseServerUri)throw new eB(2,6,6012,e.g.keySystem);return M(l,a.createMediaKeys(),6);case 6:if(o=l.h,rD(e.j),e.A=o,!(""!=e.h.minHdcpVersion&&"getStatusForPolicy"in e.A)){l.u(7);break}return D(l,8),M(l,e.A.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),10);case 10:if("usable"!=l.h)throw new eB(2,6,6018);rD(e.j),P(l,7,4);break;case 8:if((s=L(l,4))instanceof eB)throw s;throw new eB(2,6,6019,s.message);case 7:return e.aa=!0,M(l,F(function(t){switch(t.g){case 1:if(!e.A||!e.g)return t.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){t.u(2);break}return C=rx([e.g.serverCertificateUri],e.h.retryParameters),D(t,3),M(t,e.C.Ob.request(5,C,{isPreload:e.O()}).promise,5);case 5:R=t.h,e.g.serverCertificate=eA(R.data),P(t,4);break;case 3:throw new eB(2,6,6017,L(t));case 4:if(e.j.g)return t.return();case 2:if(!e.g.serverCertificate||!e.g.serverCertificate.length)return t.return();return D(t,6),M(t,e.A.setServerCertificate(e.g.serverCertificate),8);case 8:P(t,0);break;case 6:throw new eB(2,6,6004,L(t).message)}}),11);case 11:rD(e.j),P(l,0);break;case 4:if(u=L(l),rD(e.j,u),e.g=null,u instanceof eB)throw u;throw new eB(2,6,6002,u.message)}})}function r4(e){at(e)&&e.m.resolve()}function r5(e,t){new ez(function(){t.loaded=!0,r4(e)}).Z(ar)}function r6(e,t,n){var i,r,a,o,s,u,l;return F(function(c){switch(c.g){case 1:try{i=e.A.createSession("persistent-license")}catch(t){return r=new eB(2,6,6005,t.message),e.s(r),c.return(Promise.reject(r))}return e.o.D(i,"message",function(t){e.l&&e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.S?e.L.push(t):r8(e,t)}),e.o.D(i,"keystatuseschange",function(t){return r9(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Ef:1/0,nb:null,type:"persistent-license"},e.i.set(i,a),D(c,2),M(c,i.load(t),4);case 4:return o=c.h,rD(e.j),o||(e.i.delete(i),s=e.h.persistentSessionOnlinePlayback?1:2,e.s(new eB(s,6,6013)),a.loaded=!0),r5(e,a),r4(e),c.return(i);case 2:u=L(c),rD(e.j,u),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.s(new eB(l,6,6005,u.message)),a.loaded=!0,r4(e);case 3:return c.return(Promise.resolve())}})}function r8(e,t){var n,i,r,a,o,s,u,l,c,d,h,p;F(function(f){switch(f.g){case 1:if(n=t.target,e.h.logLicenseExchange&&nq(t.message),i=e.i.get(n),r=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=rx([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType),a&&a.headers)for(s in a.headers)o.headers[s]=a.headers[s];if(eK(e.g.keySystem)){var g=td(o.body,!0,!0);if(g.includes("PlayReadyKeyMessage")){var m=tj(g=tM(g,"PlayReadyKeyMessage"),"HttpHeader");m=v(m);for(var y=m.next();!y.done;y=m.next()){var b=y.value;y=tj(b,"name")[0],b=tj(b,"value")[0],o.headers[tL(y)]=tL(b)}o.body=nX(tL(g=tj(g,"Challenge")[0]))}else o.headers["Content-Type"]="text/xml; charset=utf-8"}return u=Date.now(),D(f,2),M(f,e.C.Ob.request(2,o,{isPreload:e.O()}).promise,4);case 4:l=f.h,P(f,3);break;case 2:if(c=L(f),e.j.g)return f.return();return d=new eB(2,6,6007,c),1==e.i.size?(e.s(d),i&&i.nb&&i.nb.reject(d)):(i&&i.nb&&i.nb.reject(d),e.i.delete(n),at(e)&&(e.m.resolve(),e.K.Z(.1))),f.return();case 3:if(e.j.g)return f.return();return e.H+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&nq(l.data),D(f,5),M(f,n.update(l.data),7);case 7:P(f,6);break;case 5:return h=new eB(2,6,6008,L(f).message),e.s(h),i&&i.nb&&i.nb.reject(h),f.return();case 6:if(e.j.g)return f.return();p=new rp("drmsessionupdate"),e.C.onEvent(p),i&&(i.nb&&i.nb.resolve(),r5(e,i)),C(f)}})}function r9(e,t){t=t.target;var n=e.i.get(t),i=!1;
1t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(eK(e.g.keySystem)&&16==r.byteLength&&(e$()||e6())){var o=(a=ek(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=nz(r).slice(0,32),e.V.set(r,t)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.nb&&(e.i.delete(t),t.close().catch(function(){})),at(e)&&(e.m.resolve(),e.K.Z(aa))}function r7(e){var t;return F(function(n){return t=Array.from(e.i.entries()),e.i.clear(),M(n,Promise.all(t.map(function(t){var n=(t=v(t)).next().value,i=t.next().value;return F(function(t){if(1==t.g){var r;return D(t,2),e.fa||e.B.has(n.sessionId)||"persistent-license"!==i.type||e.h.persistentSessionOnlinePlayback?M(t,F(function(e){return 1==e.g?(r=new Promise(function(e,t){new ez(t).Z(ai)}),D(e,2),M(e,Promise.race([Promise.all([n.close(),n.closed]),r]),4)):2!=e.g?P(e,0):void(L(e),C(e))}),5):M(t,n.remove(),5)}if(2!=t.g)return P(t,0);L(t),C(t)})})),0)})}function ae(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function at(e){var t=e=e.i.values();t=v(t);for(var n=t.next();!n.done;n=t.next())if(!n.value.loaded)return!1;return!0}function an(t,n,i,r,a,o,s,u){var l=[];t=v(t);for(var c=t.next(),d={};!c.done;d={ta:void 0},c=t.next()){if(d.ta=c.value,n.includes(d.ta.encryptionScheme)||n.push(d.ta.encryptionScheme),"org.w3.clearkey"==d.ta.keySystem&&d.ta.licenseServerUri.startsWith("data:application/json;base64,")?l.includes(d.ta.licenseServerUri)||l.push(d.ta.licenseServerUri):i.includes(d.ta.licenseServerUri)||i.push(d.ta.licenseServerUri),a.includes(d.ta.serverCertificateUri)||a.push(d.ta.serverCertificateUri),d.ta.serverCertificate&&(r.some(function(e){return function(t){return eT(t,e.ta.serverCertificate)}}(d))||r.push(d.ta.serverCertificate)),d.ta.initData){c=v(d.ta.initData);for(var h=c.next(),p={};!h.done;p={rf:void 0},h=c.next())p.rf=h.value,o.some(function(e){return function(t){var n=e.rf;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&eT(t.initData,n.initData)}}(p))||o.push(p.rf)}if(d.ta.keyIds)for(h=(c=v(d.ta.keyIds)).next();!h.done;h=c.next())s.add(h.value);if(d.ta.keySystemUris&&u)for(c=(d=v(d.ta.keySystemUris)).next();!c.done;c=d.next())u.add(c.value)}if(1==l.length)i.push(l[0]);else if(0<l.length){for(n=[],r=(l=v(l)).next();!r.done;r=l.next())r=JSON.parse(r=e.atob(r.value.split("data:application/json;base64,").pop())),n.push.apply(n,y(r.keys));l=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(l))}}(b=rJ.prototype).destroy=function(){return this.j.destroy()},b.configure=function(e,t){this.h=e,t&&(this.O=t),this.I&&this.I.Ra(this.h.updateExpirationTime)},b.Ub=function(e){var t=this;return F(function(n){if(1==n.g)return t.A?(t.l=e,t.o.va(t.l,"play",function(){for(var e=v(t.L),n=e.next();!n.done;n=e.next())r8(t,n.value);t.S=!0,t.L=[]}),t.l.remote?(t.o.D(t.l.remote,"connect",function(){return r7(t)}),t.o.D(t.l.remote,"connecting",function(){return r7(t)}),t.o.D(t.l.remote,"disconnect",function(){return r7(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.l&&t.o.D(t.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return r7(t)}),t.F=t.g&&t.g.initData.find(function(e){return 0<e.initData.length})||null,t.F||"com.apple.fps"!==t.g.keySystem||t.B.size?M(n,rZ(t),2):n.u(2)):(t.o.va(e,"encrypted",function(){t.s(new eB(2,6,6010))}),n.return());r0(t).catch(function(){}),t.F||t.B.size||t.h.parseInbandPsshEnabled||t.o.D(t.l,"encrypted",function(e){return F(function(n){if(1==n.g)return M(n,rZ(t),2);r1(t,e.initDataType,eA(e.initData)),C(n)})}),C(n)})},b.kf=function(){var e=this,t=this.i.keys();return Array.from(t=rR(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}))},b.ed=function(){var e=1/0,t=this.i.keys();t=v(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},b.Nd=function(){return rL(this.da)};var ai=1,ar=5,aa=.5;function ao(e,t,n){this.h=e,this.i=t,this.g=n}function as(e,t){return F(function(n){if(1==n.g){var i,r;return M(n,(i=e.g,r=void 0===(r=e.h.drm.preferredKeySystems)?[]:r,F(function(e){var n,a,o,s,u,l,c,d,h;return 1==e.g?M(e,iR(i,t,0<t.offlineSessionIds.length,r),2):((n=t).textStreams=n.textStreams.filter(function(e){return id(e=n8(e.mimeType,e.codecs))}),M(e,(a=t,F(function(e){switch(e.g){case 1:o=[],u=(s=v(a.imageStreams)).next();case 2:var t;if(u.done){e.u(4);break}if("application/mp4"==(c=(l=u.value).mimeType)&&"mjpg"==l.codecs&&(c="image/jpg"),iQ.has(c)){e.u(5);break}if(!(d=iZ.get(c))){iQ.set(c,!1),e.u(5);break}return M(e,(t=d,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:h=e.h,iQ.set(c,h);case 5:iQ.get(c)&&o.push(l),u=s.next(),e.u(2);break;case 4:a.imageStreams=o,C(e)}})),0))})),2)}if(e.h.streaming.dontChooseCodecs||iC(t,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes,e.h.preferredTextFormats),!t.variants.some(iK))throw new eB(2,4,4032);return n.return(al(e,t))})}function au(e,t){var n=e.h.restrictions;e=e.i;var i=!1;t=v(t.variants);for(var r=t.next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=iD(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function al(e,t){var n=au(e,t);if(t){var i=e.g?e.g.g:null;if(i&&e.g.A)for(var r=v(t.variants),a=r.next();!a.done;
1a=r.next())a=a.value,ac(e,i.keySystem,a.video),ac(e,i.keySystem,a.audio);ad(e,t)}return n}function ac(e,t,n){if(n){n=v(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){i=v(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,r1(e.g,r.initDataType,r.initData)}}}function ad(e,t){var n=Object.keys(e=e.g?e.g.Nd():{});n=n.length&&"00"==n[0];var i=!1,r=!1,a=new Set,o=new Set;t=v(t.variants);for(var s=t.next();!s.done;s=t.next()){s=s.value;var u=[];s.audio&&u.push(s.audio),s.video&&u.push(s.video),u=v(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).keyIds.size){l=v(l.keyIds);for(var c=l.next();!c.done;c=l.next()){c=c.value;var d=e[n?"00":c];d?ah.includes(d)&&o.add(d):a.add(c)}}s.allowedByApplication?s.allowedByKeySystem&&(i=!0):r=!0}if(!i)throw new eB(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var ah=["output-restricted","internal-error"];function ap(){}function af(e,t){if(t){var n=ag[t.toLowerCase()];if(n)return n}throw new eB(2,4,4e3,e,t)}z("shaka.media.ManifestParser",ap),ap.unregisterParserByMime=function(e){delete ag[e]},ap.registerParserByMime=function(e,t){ag[e]=t},ap.registerParserByExtension=function(){ef("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ap.AccessibilityPurpose={hk:"visually impaired",zj:"hard of hearing"};var ag={};function am(e,t,n){0!=(t=(e=ek(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,0|n)):e.setUint32(0,n))}var av=new eV(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function ay(e,t,n,i,r,a,o){this.N=e,this.Ka=t,this.ua=n,this.Oc=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}function ab(e,t){return e===t||(e&&t?e.$b()==t.$b()&&e.Yb()==t.Yb()&&e_(e.N().sort(),t.N().sort())&&eT(e.pc(),t.pc()):e==t)}function aw(e,t,n,i,r,a,o,s,u,l,c,d,h,p,f,g){for(l=void 0===l?[]:l,p=void 0===p?aT:p,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Ka=i,this.ua=r,this.ba=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l,this.tilesLayout=void 0===c?"":c,this.A=void 0===d?null:d,this.h=void 0===h?null:h,this.status=p,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=void 0===f?null:f,this.thumbnailSprite=null,this.i=-1,this.s=void 0!==g&&g,this.F=this.o=!1,t=(e=v(this.g)).next();!t.done;t=e.next())t.value.Ng();this.s&&this.g.length&&this.g[this.g.length-1].Mg(),this.B=this.bandwidth=this.mimeType=this.codecs=null}ay.prototype.$b=function(){return this.Ka},ay.prototype.Yb=function(){return this.ua},ay.prototype.pc=function(){return this.g},z("shaka.media.InitSegmentReference",ay),ay.prototype.getEndByte=ay.prototype.Yb,ay.prototype.getStartByte=ay.prototype.$b,(b=aw.prototype).N=function(){return this.C()},b.getStartTime=function(){return this.startTime},b.Ph=function(){return this.endTime},b.$b=function(){return this.Ka},b.Yb=function(){return this.ua},b.hi=function(){return this.tilesLayout},b.gi=function(){return this.A},b.ac=function(){return this.status},b.Ai=function(){this.status=ax},b.Bf=function(){this.preload=!0},b.isPreload=function(){return this.preload},b.Nc=function(){this.l=!1},b.si=function(){return this.l},b.Ng=function(){this.o=!0},b.ui=function(){return this.o},b.Mg=function(){this.F=!0},b.ti=function(){return this.F},b.Lg=function(){this.m=!0},b.ni=function(){return this.m},b.qe=function(e){this.thumbnailSprite=e},b.fi=function(){return this.thumbnailSprite},b.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=v(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},b.Zf=function(e){null==this.h?et("Sync attempted without sync time!"):.001<=Math.abs(e=this.h-e-this.startTime)&&this.offset(e)},b.cj=function(e){this.B=e},b.pc=function(){return this.B},z("shaka.media.SegmentReference",aw),aw.prototype.getSegmentData=aw.prototype.pc,aw.prototype.setSegmentData=aw.prototype.cj,aw.prototype.syncAgainst=aw.prototype.Zf,aw.prototype.offset=aw.prototype.offset,aw.prototype.getThumbnailSprite=aw.prototype.fi,aw.prototype.setThumbnailSprite=aw.prototype.qe,aw.prototype.hasByterangeOptimization=aw.prototype.ni,aw.prototype.markAsByterangeOptimization=aw.prototype.Lg,aw.prototype.isLastParti
1al=aw.prototype.ti,aw.prototype.markAsLastPartial=aw.prototype.Mg,aw.prototype.isPartial=aw.prototype.ui,aw.prototype.markAsPartial=aw.prototype.Ng,aw.prototype.isIndependent=aw.prototype.si,aw.prototype.markAsNonIndependent=aw.prototype.Nc,aw.prototype.isPreload=aw.prototype.isPreload,aw.prototype.markAsPreload=aw.prototype.Bf,aw.prototype.markAsUnavailable=aw.prototype.Ai,aw.prototype.getStatus=aw.prototype.ac,aw.prototype.getTileDuration=aw.prototype.gi,aw.prototype.getTilesLayout=aw.prototype.hi,aw.prototype.getEndByte=aw.prototype.Yb,aw.prototype.getStartByte=aw.prototype.$b,aw.prototype.getEndTime=aw.prototype.Ph,aw.prototype.getStartTime=aw.prototype.getStartTime,aw.prototype.getUris=aw.prototype.N;var aT=0,ax=1;function aS(e){return 1==e.length&&1e-4>e.end(0)-e.start(0)}function aA(e){return!e||aS(e)?null:e.length?e.end(e.length-1):null}function aE(e,t){return!(!e||!e.length||aS(e)||t>e.end(e.length-1))&&t>=e.start(0)}function ak(e,t){if(!e||!e.length||aS(e))return 0;var n=0;e=v(aI(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 aI(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 aM(){}function aC(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function aD(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function aR(){}function aP(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 aL(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 aN(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 aj(e){for(var t=0,n=[];aP(e,t);){var i=aN(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=aN(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=tc(eA(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=tc(eA(e.data,3+n,a));return o="--\x3e"===i?tc(eA(e.data,4+n+a)):eS(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=tc(eA(e.data,1,i)),e=tc(eA(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=tc(eA(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=eS(e.data.subarray(n.length+1)),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(t.data=e=tc(e.data.subarray(1)).replace(/\0*$/,""),t):"W"===e.type[0]?(t.data=e=tc(e.data).replace(/\0*$/,""),t):e.data?(t.data=eS(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}aL(e,t)&&(t+=10)}return n}function aU(e,t){for(var n=t=void 0===t?0:t,i=0;aP(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=aN(e,t+6),aL(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}function aO(e,t){var n=null,i=null,r=null,a=e.P();return 1&t&&(r=e.Tc()),2&t&&e.skip(4),8&t&&(n=e.P()),16&t&&(i=e.P()),{trackId:a,cd:n,Kd:i,jk:r}}function a_(e,t){return 1==t?{baseMediaDecodeTime:0x100000000*(t=e.P())+(e=e.P())}:{baseMediaDecodeTime:e.P()}}function aB(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.P(),e.skip(4),{timescale:t,language:String.fromCharCode(((e=e.ma())>>10)+96)+String.fromCharCode(((960&e)>>5)+96)+String.fromCharCode((31&e)+96)}}function aF(e,t,n){var i=e.P(),r=[],a=null;1&n&&(a=e.P()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={Pf:null,sampleSize:null,me:null};256&n&&(s.Pf=e.P()),512&n&&(s.sampleSize=e.P()),1024&n&&e.skip(4),2048&n&&(s.me=0==t?e.P():e.Vg()),r.push(s)}return{nk:i,Zg:r,Ih:a}}function aV(e){e.skip(6),e.skip(2),e.skip(8);var t=e.ma();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.ma()+e.ma()/65536}}function aH(e){return{codec:rK(e=e.P())}}function aG(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function aK(e){return(10>e?"0":"")+e}
1function aq(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=eA(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function aX(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 rN(n,0).P(),e.g=8*i,e.i-=i)}function aW(e,t){if(e.g<=t){var n=Math.floor((t-=e.g)/8);t-=8*n,e.g-=n,aX(e)}e.h<<=t,e.g-=t}function az(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&&aX(e),0<(n=t-n)?i<<n|az(e,n):i}function aY(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 aX(e),t+aY(e)}function aJ(e){aW(e,1+aY(e))}function a$(e){var t=aY(e);return az(e,t+1)-1}function aQ(e){return 1&(e=a$(e))?1+e>>>1:-1*(e>>>1)}function aZ(e){return 1===az(e,1)}function a0(e){return az(e,8)}function a1(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=aQ(e))+256)%256),n=0===i?n:i}function a2(){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 a3(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=a5(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=a5(i,e.o)),e.o=n.dts}return(e=t[8]+9,t.byteLength<=e)?null:(n.data=t.subarray(e),n)}function a4(e){var t=e.sc();return 1<t.length&&(e=t[0].pts,!isNaN((t=t[1].pts)-e))?String(1/(t-e)*9e4):null}function a5(e,t){var n=1;for(e>t&&(n=-1);0x100000000<Math.abs(t-e);)e+=0x200000000*n;return e}function a6(e){return!(0>a8(e))}function a8(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}aw.Status={lj:0,fk:1,Hj:2},z("shaka.util.Dom",aM),aM.removeAllChildren=aD,z("shaka.util.Id3Utils",aR),aR.getID3Data=aU,aR.getID3Frames=aj,z("shaka.util.ExpGolomb",aq),(b=a2.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},b.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,a8(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,Sd:-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=tg(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,Fh: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.Sd&&(o.Sd=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.Sd&&(this.C=a.Sd),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},b.Gi=function(e){return ef("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Hf(e)},b.Hf=function(e,t,n){var i=e.pts?e.pts/9e4:null,r=(e=e.data).byteLength,a=1;"hvc"==this.m&&(a=2);for(var o,s=n||0,u=[],l=-1,c=0,d=0;d<r;++d){var h=e[d];if(h){if(2<=s&&1==h){if(t&&!u.length&&-1==l&&(h=d-(3<s?3:s),n&&0!=h&&(h=e.subarray(0,h),t.data=nY(t.data,h),t.fullData=nY(t.fullData,h))),0<=l?(s=d-((3<s?3:s)+1),u.push({data:e.subarray(l+a,s+1),fullData:e.subarray(l,s+1),type:c,time:i})):t&&!u.length&&0<(l=d-s)&&(l=e.subarray(0,l),t.data=nY(t.data,l),t.fullData=nY(t.fullData,l)),d>=r-a)return u;l=++d,c="hvc"==this.m?e[d]>>1&63:31&e[d]}s=0}else s++;d>=r-1&&0<=l&&0<=s&&(o={data:e.subarray(l+a,r),fullData:e.subarray(l,r),type:c,time:i})}return o&&u.push(o),!u.length&&t&&(t.data=nY(t.data,e),t.fullData=nY(t.fullData,e)),u},b.getMetadata=function(){for(var e=[],t=v(this.l),n=t.next();!n.done;n=t.next())(n=a3(this,n=nY.apply(nG,y(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:aj(n.data),dts:n.dts,pts:n.pts});return e},b.Xb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=v(this.i),n=t.next();!n.done;n=t.next()){var i=nY.apply(nG,y(n.value)),r=a3(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=nY(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},b.sc=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=!1,n=v(this.j),i=n.next();!i.done;i=n.next()){var r=nY.apply(nG,y(i.value)),a=a3(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=nY(i.data,r),this.g.push(i))}if(e){for(n=[],r=(i=v(this.g)).next();!r.done;r=i.next())if((r=r.value).nalus=this.Hf(r,o,void 0),r.nalus.length){n.push(r);var o=r.nalus[r.nalus.length-1]}this.g=n}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)},b.getStartTime=function(e){if("audio"==e){e=null;var t=this.Xb();return t.length&&(e=Math.min((e=t[0]).dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.sc(!1)).length&&(e=Math.min((e=t[0]).dts,e.pts)/9e4),e):null},b.dd=function(){return{audio:this.A,video:this.m}},b.Qd=function(){for(var e=[],t=v(this.sc()),n=t.next();!n.done;n=t.next())e.push.apply(e,y(n.value.nalus));return e},b.ki=function(){ef("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.pf();return{height:e.height,width:e.width}},b.pf=function(){return"hvc"==this.m?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Qd();if(!n.length||!(n=n.find(function(e){return 33==e.type})))return t;var i=new aq(n.fullData,!0);a0(i),a0(i),az(i,4);var r=az(i,3);
1aZ(i);var a=az(i,2),o=az(i,1),s=az(i,5),u=az(i,32);n=a0(i);for(var l=a0(i),c=a0(i),d=a0(i),h=a0(i),p=a0(i),f=a0(i),g=[],m=[],v=0;v<r;v++)g.push(aZ(i)),m.push(aZ(i));if(0<r)for(v=r;8>v;v++)az(i,2);for(v=0;v<r;v++)g[v]&&az(i,88),m[v]&&a0(i);a$(i),3==(r=a$(i))&&az(i,1),g=a$(i),m=a$(i);var y=v=0,b=0,w=0;return aZ(i)&&(v+=a$(i),y+=a$(i),b+=a$(i),w+=a$(i)),t.width=String(g-(v+y)*(1===r||2===r?2:1)),t.height=String(m-(b+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=a4(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Qd();if(!n.length||!(n=n.find(function(e){return 7==e.type})))return t;var i=a0(n=new aq(n.data)),r=a0(n),a=a0(n);if(aJ(n),a9.includes(i)){var o=a$(n);if(3===o&&aW(n,1),aJ(n),aJ(n),aW(n,1),aZ(n)){o=3!==o?8:12;for(var s=0;s<o;s++)aZ(n)&&(6>s?a1(n,16):a1(n,64))}}if(aJ(n),0===(o=a$(n)))a$(n);else if(1===o)for(aW(n,1),aJ(n),aJ(n),o=a$(n),s=0;s<o;s++)aJ(n);aJ(n),aW(n,1),o=a$(n),s=a$(n);var u=az(n,1);0===u&&aW(n,1),aW(n,1);var l=0,c=0,d=0,h=0;return aZ(n)&&(l=a$(n),c=a$(n),d=a$(n),h=a$(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=a4(e),t}(this)},z("shaka.util.TsParser",a2),a2.syncOffset=a8,a2.probe=a6,a2.prototype.getVideoInfo=a2.prototype.pf,a2.prototype.getVideoResolution=a2.prototype.ki,a2.prototype.getVideoNalus=a2.prototype.Qd,a2.prototype.getCodecs=a2.prototype.dd,a2.prototype.getStartTime=a2.prototype.getStartTime,a2.prototype.getVideoData=a2.prototype.sc,a2.prototype.getAudioData=a2.prototype.Xb,a2.prototype.getMetadata=a2.prototype.getMetadata,a2.prototype.parseNalus=a2.prototype.Hf,a2.prototype.parseAvcNalus=a2.prototype.Gi,a2.prototype.parse=a2.prototype.parse,a2.prototype.clearData=a2.prototype.clearData,a2.Timescale=9e4;var a9=[100,110,122,244,44,83,86,118,128,138,139,134];function a7(e,t,n){this.g=null,this.o=-1,this.l=e,this.i=t,this.m=n,this.j=!1;e:{if("undefined"==typeof libDPIModule&&en("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!=typeof LcevcDil)this.h=LcevcDil,this.j=!0,ef("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{en("Could not find LCEVC Library on this page"),e=!1;break e}void 0===this.h.SupportObject?(en("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||en(this.h.SupportObject.SupportError),e=void 0!==this.h&&"undefined"!=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 oe(e){e.g&&e.i.classList.add("shaka-hidden")}function ot(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 on(e,t,n,i){var r=this;this.g=e,this.F=n,this.A=null,this.fa=t,this.h={},this.G={},this.Ha={},this.i=null,this.xa=!1,this.da=i||null,this.l={},this.s=new es,this.j={},this.H=null,this.O=new ro,this.Aa="",this.Na=!1,this.ra=!0,this.$=!1,this.B=this.I=null,this.m=oi(this,this.O),this.S=!1,this.K=new rC(function(){var e,t,n,i,a,o,s,u;return e=r,F(function(r){if(1==r.g){for(n in t=[],e.l)for(a=(i=e.l[n])[0],e.l[n]=i.slice(0,1),a&&t.push(a.p.catch(im)),s=(o=v(i.slice(1))).next();!s.done;s=o.next())s.value.p.reject(new eB(2,7,7003,void 0));
1for(u in e.i&&t.push(e.i.destroy()),e.j)t.push(e.j[u].destroy());return M(r,Promise.all(t),2)}e.s&&(e.s.release(),e.s=null),e.g&&e.B&&e.g.removeChild(e.B),e.g&&e.I&&(e.g.removeChild(e.I),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.I=null,e.B=null,e.A=null,e.m=null,e.i=null,e.fa=null,e.h={},e.j={},e.H=null,e.l={},e.da=null,e.V={},e.F=null,C(r)})}),this.C=!1,this.aa="UNKNOWN",this.Ga=this.La=!1,this.Ba=new ro,this.o=!1,this.qa=null,this.V={},this.ka=this.L=this.na=this.M=null,this.ja=new ro,this.g.remote&&(this.$="disconnected"!=this.g.remote.state,this.s.D(this.g.remote,"connect",function(){r.$="disconnected"!=r.g.remote.state}),this.s.D(this.g.remote,"connecting",function(){r.$="disconnected"!=r.g.remote.state}),this.s.D(this.g.remote,"disconnect",function(){r.$="disconnected"!=r.g.remote.state}))}function oi(t,n){if(t.ra=!0,e.ManagedMediaSource){t.B||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.s.D(i,"startstreaming",function(){t.ra=!0}),t.s.D(i,"endstreaming",function(){t.ra=!1})}else i=new MediaSource;return t.s.va(i,"sourceopen",function(){URL.revokeObjectURL(t.Aa),n.resolve()}),t.s.va(t.g,"playing",function(){t.Na=!0}),t.Aa=oT(i),t.g.removeAttribute("src"),t.I&&t.g.removeChild(t.I),t.B&&t.g.removeChild(t.B),t.I=aC(t.Aa),t.g.appendChild(t.I),t.B&&t.g.appendChild(t.B),t.g.load(),i}function or(e,t,n,i){var r,a,o,s,u,l,c,d,h,p,f,g;return F(function(m){switch(m.g){case 1:var y,b,w,T,x,S,A,E,k,I;return r=n3,a=Y,o=J,M(m,F(function(e){if(1==e.g)return n.createSegmentIndex?M(e,n.createSegmentIndex(),2):e.u(2);if(!n.segmentIndex)return e.return(!1);if(0==n.segmentIndex.getNumReferences())return e.return(!0);for(y=n3,b=new Set,T=(w=v(n.segmentIndex)).next();!T.done;T=w.next())if(E=(S=(x=T.value).mimeType||n.mimeType||"")+":"+(A=x.codecs||n.c
1odecs||""),!b.has(E)){if(b.add(E),t==y.wa){if(!id(n8(S,A)))return e.return(!1)}else if(t==y.la?A=iU(A):t==y.Y&&(A=ij(A,S)),k=function(e,t,n){var i=[t];return iu.forEach(function(t,r){var a=e[r];"codecs"==r?il.includes(e.mimeType)||i.push('codecs="'+n+'"'):a&&i.push(t+'="'+a+'"')}),"PQ"==e.hdr&&i.push('eotf="smpte2084"'),i.join(";")}(n,S,A),I=n9(S,A),!ec(k)&&!nT(I))return e.return(!1)}return e.return(!0)}),2);case 2:if(o.call(a,m.h,"Type negotiation should happen before MediaSourceEngine.init!"),s=n8(n.mimeType,i),t==r.wa){oa(e,s,e.C,n.external),m.u(0);break}if(u=e.A.forceTransmux,(!ec(s)||!e.C&&il.includes(s))&&(u=!0),l=n9(n.mimeType,i),!u){m.u(4);break}if(c=n0(r.Y,(i||"").split(",")),d=n0(r.la,(i||"").split(",")),!c||!d){m.u(5);break}return e.o=!0,M(m,or(e,r.Y,n,c),6);case 6:return M(m,or(e,r.la,n,d),7);case 7:return m.return();case 5:(h=nT(l))&&(p=h(),e.j[t]=p,s=p.convertCodecs(t,l));case 4:f=s+e.A.addExtraFeaturesToSourceBuffer(s),rD(e.K);try{g=e.m.addSourceBuffer(f)}catch(t){throw new eB(2,3,3015,t,"The mediaSource_ status was "+e.m.readyState+" expected 'open'",null)}e.C&&(g.mode=ox),e.s.D(g,"error",function(){var n=e.l[t][0];n.p.reject(new eB(2,3,3014,e.g.error?e.g.error.code:0,n.uri))}),e.s.D(g,"updateend",function(){return og(e,t)}),e.h[t]=g,e.G[t]=s,e.Ha[t]=!!n.drmInfos.length,C(m)}})}function oa(e,t,n,i){e.i||(e.i=new ic(e.fa),e.i&&(e.i.A=e.A.modifyCueCallback));var r=e.i;i=i||e.xa,e=e.aa,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=(0,ip[t])(),r.i.setSequenceMode?r.i.setSequenceMode(n):ef("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):ef("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function oo(e){return!e.S&&(!e.m||"ended"==e.m.readyState)}function os(e,t){return Object.keys(e.h).length?t==n2?e.i.g:!(e=ol(e,t))||aS(e)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null:null}function ou(e,t){return Object.keys(e.h).length?t==n2?e.i.h:aA(ol(e,t)):null}function ol(e,t){if(e.S||e.$)return null;try{return e.h[t].buffered}catch(e){return null}}function oc(e,t,n,i,r,a,o,s,u,l){var c,d,h,p,f,g,m,y,b,w,T,x,S;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,l=void 0!==l&&l,F(function(A){var E,k,I,D,R,P,L,N,j,U,O,_,B,V,H,G,K,q,X;switch(A.g){case 1:if(t!=(c=n3).wa){A.u(2);break}if(!("HLS"==e.aa&&0<=i.i)){A.u(3);break}return M(A,e.Ba,4);case 4:d=A.h,e.i.s=d;case 3:return M(A,(E=e.i,k=n,I=i?i.startTime:null,D=i?i.endTime:null,R=i?i.N()[0]:null,F(function(e){if(1==e.g)return M(e,Promise.resolve(),2);if(!E.i||!E.j)return e.return();if(null==I||null==D)return E.i.parseInit(eA(k)),e.return();for(P=E.B?I:E.s,L={periodStart:E.s,segmentStart:I,segmentEnd:D,vttOffset:P},U=(j=v(N=E.i.parseMedia(eA(k),L,R,[]))).next();!U.done;U=j.next())O=U.value,E.A(O,R||null,L);_=N.filter(function(e){return e.startTime>=E.l&&e.startTime<E.m}),E.j.append(_),null==E.g&&(E.g=Math.max(I,E.l)),E.h=Math.min(D,E.m),C(e)})),5);case 5:case 8:return A.return();case 2:if(l||!e.o){A.u(6);break}return M(A,oc(e,c.Y,n,i,r,a,o,s,u,!0),7);case 7:return M(A,oc(e,c.la,n,i,r,a,o,s,u,!0),8);case 6:if(!e.h[t])return A.return();if(h=e.h[t].timestampOffset,p=e.G[t],e.j[t]&&(p=e.j[t].getOriginalMimeType()),i&&(g=(f=function(e,t,n,i,r,a){var o=null,s=[],u=eA(n);if(il.includes(a))(t=aj(u)).length&&i&&((n=t.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&n.data&&(o=Math.round(n.data)/1e3),e.F.onMetadata([{cueTime:i.startTime,data:u,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.ba&&i.ba.timescale){var l=i.ba.timescale;if(!isNaN(l)){var c=0,d=!1;u=new rO,(null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes)&&u.R("emsg",function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.wc(),o=t.reader.wc(),s=t.reader.P(),u=t.reader.P(),l=t.reader.P(),c=t.reader.P(),d=i.startTime+u/s;else s=t.reader.P(),u=(d=t.reader.Tc()/s+i.timestampOffset)-i.startTime,l=t.reader.P(),c=t.reader.P(),a=t.reader.wc(),o=t.reader.wc();t=t.reader.vb(t.reader.getLength()-t.reader.ya()),(n&&n.includes(a)||e.A.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.F.Fi():(n=d+l/s,(s=new rp("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.F.onEvent(s),!s.defaultPrevented&&("https://aomedia.org/emsg/ID3"==a||"https://developer.apple.com/streaming/emsg-id3"==a)&&(a=aj(t)).length&&e.F.onMetadata([{cueTime:d,data:t,frames:a,dts:d,pts:d}],0,n)))}),u.R("prft",function(t){var n=t.reader,i=t.version;n.P(),t=1e3*(t=n.P())+n.P()/0x100000000*1e3,n=0===i?n.P():0x100000000*(i=n.P())+(n=n.P()),t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+t).getTime(),n=new rp("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/l*1e3)})),e.F.onEvent(n)}).box("moof",r_).box("traf",r_).R("tfdt",function(e){c=a_(e.reader,e.version).baseMediaDecodeTime/l,d=!0,e.parser.stop()}).parse(n,!0),d&&0==i.timestampOffset&&(o=c)}}else a.includes("/mp4")||a.includes("/webm")||!a6(u)||(e.V[t]?e.V[t].clearData():e.V[t]=new a2,null!=(u=(s=e.V[t].parse(u)).getStartTime(t))&&(o=u),s=s.getMetadata());return{timestamp:o,metadata:s}}(e,t,n,i,r,p)).timestamp,m=f.metadata,null!=g&&(null==e.M&&t==c.la&&(e.M=g,e.na=i.startTime,null!=e.L&&(y=0,e.na==e.ka&&(y=e.M-e.L),e.ja.resolve(y))),null==e.L&&t==c.Y&&(e.L=g,e.ka=i.startTime,null!=e.M&&(b=0,e.na==e.ka&&(b=e.M-e.L),e.ja.resolve(b))),w=i.startTime-g,(.001<=Math.abs(h-w)||o||s)&&(!u||0<w||!h)&&(h=w,e.Ga&&(om(e,t,function(){return op(e,t)},null),om(e,t,function(){return of(e,t,h)},null))),t!=c.la&&c.la in e.h||e.Ba.resolve(h)),m.length)&&e.F.onMetadata(m,h,i?i.endTime:null),a&&t==c.la&&(e.i||oa(e,"application/cea-608",e.C,!1),e.H||(e.H=new eC(p.split(";",1)[0])),i?(T=e.H.i(n)).length&&function(e,t,n,i,r){var a=n+" "+i,o=new Map;t=v(t);for(var s=t.next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),function e(t,n,i){n.startTime+=i,n.endTime+=i,n=v(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,u,r),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.C&&e.j.append([u]))}for(a=(r=v(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=v(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.o.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}(e.i,T,i.startTime,i.endTime,h):e.H.init(n,s)),!e.j[t]){A.u(9);break}return M(A,e.j[t].transmux(n,r,i,e.m.duration,t),10);case 10:n=A.h;case 9:if(B=e,V=n,H=i?i.startTime:null,G=t,K=i?i.N()[0]:null,q=null==H,X=B.Ha[G],H=B.F.Uh(),(q=B.A.insertFakeEncryptionInInit&&q&&X)&&(H=eK(H),q=eZ()||eQ()||e9()||e$()&&te()&&H),q&&"mp4"==ie(B.G[G])&&(V=function(e,t){function n(){o=!0}function i(e){s.push(e),r_(e)}var r,a=e=eA(e),o=!1,s=[],u=[];
1if((new rO).box("moov",i).box("trak",i).box("mdia",i).box("minf",i).box("stbl",i).R("stsd",function(e){r=e,s.push(e),rB(e)}).R("encv",n).R("enca",n).R("dvav",function(e){u.push({box:e,Ta:0x656e6376})}).R("dva1",function(e){u.push({box:e,Ta:0x656e6376})}).R("dvh1",function(e){u.push({box:e,Ta:0x656e6376})}).R("dvhe",function(e){u.push({box:e,Ta:0x656e6376})}).R("dvc1",function(e){u.push({box:e,Ta:0x656e6376})}).R("dvi1",function(e){u.push({box:e,Ta:0x656e6376})}).R("hev1",function(e){u.push({box:e,Ta:0x656e6376})}).R("hvc1",function(e){u.push({box:e,Ta:0x656e6376})}).R("avc1",function(e){u.push({box:e,Ta:0x656e6376})}).R("avc3",function(e){u.push({box:e,Ta:0x656e6376})}).R("ac-3",function(e){u.push({box:e,Ta:0x656e6361})}).R("ec-3",function(e){u.push({box:e,Ta:0x656e6361})}).R("ac-4",function(e){u.push({box:e,Ta:0x656e6361})}).R("mp4a",function(e){u.push({box:e,Ta:0x656e6361})}).parse(e),o)return e;if(0==u.length||!r)throw nz(e),new eB(2,3,3019,t);u.reverse(),t=v(u);for(var l=t.next();!l.done;l=t.next())l=l.value,a=function(e,t,n,i,r){var a=av.value(),o=e.subarray(n.start,n.start+n.size),s=ek(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=ek(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),am(u,0,u.byteLength),r=new
1Uint8Array(e.byteLength+u.byteLength),n=eQ()||e$()?n.start:n.start+n.size,a=e.subarray(n),r.set(e.subarray(0,n)),r.set(u,n),r.set(a,n+u.byteLength),i=(e=v(i)).next();!i.done;i=e.next())am(r,(i=i.value).start,i.size+u.byteLength);return u=ek(r,t.start),t=rq(t),e=u.getUint32(t),u.setUint32(t,e+1),r}(a,r,l.box,s,l.Ta);return e$()&&te()&&!eQ()?((t=new Uint8Array(e.byteLength+a.byteLength)).set(a),t.set(e,a.byteLength),t):a}(V,K)),n=V,!i||!e.C||t==c.wa||!o&&!s){A.u(11);break}if(x=i.startTime,"HLS"!=e.aa||e.o||t!=c.Y||!e.h[c.la]){A.u(13);break}return M(A,e.ja,14);case 14:.1<Math.abs(S=A.h)&&(x-=S);case 13:om(e,t,function(){return op(e,t)},null),om(e,t,function(){return of(e,t,x)},null);case 11:return M(A,om(e,t,function(){var i=n;if("video"==t&&e.da){var r=e.da;r.g&&r.g.appendBuffer(i,"video",r.o,-h)}e.h[t].appendBuffer(i)},i?i.N()[0]:null),15);case 15:C(A)}})}function od(e,t){var n;return F(function(i){return 1==i.g?t==(n=n3).wa?e.i?M(i,e.i.remove(0,1/0),0):i.return():M(i,om(e,t,function(){return oh(e,t,0,e.m.duration)},null),4):e.o?M(i,om(e,n.Y,function(){return oh(e,n.Y,0,e.m.duration)},null),0):i.u(0)})}function oh(e,t,n,i){i<=n?og(e,t):e.h[t].remove(n,i)}function op(e,t){var n=e.h[t].appendWindowStart,i=e.h[t].appendWindowEnd;e.h[t].abort(),e.h[t].appendWindowStart=n,e.h[t].appendWindowEnd=i,og(e,t)}function of(e,t,n){0>n&&(n+=.001),e.h[t].timestampOffset=n,og(e,t)}function og(e,t){if(!e.S){var n=e.l[t][0];n&&(n.p.resolve(),oy(e,t))}}function om(e,t,n,i){return rD(e.K),n={start:n,p:new ro,uri:i},e.l[t].push(n),1==e.l[t].length&&ob(e,t),n.p}function ov(e,t){var n,i,r,a,o;return F(function(s){switch(s.g){case 1:for(r in rD(e.K),n=[],i={},e.h)(i={ready:void 0}).ready=new ro,a={start:function(e){return function(){return e.ready.resolve()}}(i),p:i.ready,uri:null},e.l[r].push(a),n.push(i.ready),1==e.l[r].length&&a.start();return D(s,2),M(s,Promise.all(n),4);case 4:P(s,3);break;case 2:throw L(s);case 3:return D(s,5,6),M(s,t(),6);case 6:for(o in N(s),e.h)oy(e,o);j(s,0);break;case 5:throw new eB(2,3,3015,L(s),e.g.error||"No error in the media element",null)}})}function oy(e,t){e.l[t].shift(),ob(e,t)}function ob(e,t){var n=e.l[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new eB(2,3,3017,t)):n.p.reject(new eB(2,3,3015,i,e.g.error||"No error in the media element",n.uri)),oy(e,t)}}function ow(e,t){return ov(e,function(){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I;return F(function(C){switch(C.g){case 1:for(s in n=n3,e.S=!0,e.o=!1,i=e.g.currentTime,r=e.g.autoplay,a=e.g.paused,e.Na&&(e.g.autoplay=!1),R(C,2),e.s.Va(),o=[],e.j)o.push(e.j[s].destroy());for(u in e.l)for(c=(l=e.l[u])[0],e.l[u]=l.slice(0,1),c&&o.push(c.p.catch(im)),h=(d=v(l.slice(1))).next();!h.done;h=d.next())h.value.p.reject(new eB(2,7,7003,void 0));for(p in e.h){f=e.h[p];try{e.m.removeSourceBuffer(f)}catch(e){}}return M(C,Promise.all(o),4);case 4:return e.j={},g=e.m.duration,e.O=new ro,e.m=oi(e,e.O),M(C,e.O,5);case 5:!isNaN(g)&&g?e.m.duration=g:!isNaN(e.qa)&&e.qa&&(e.m.duration=e.qa),m=new ro,y=e.m.sourceBuffers,b=t.size,w=0,T=function(){++w===b&&(m.resolve(),e.s.cb(y,"addsourcebuffer",T))},e.s.D(y,"addsourcebuffer",T),S=(x=v(t.keys())).next();case 6:if(S.done)return(I=t.get(n.Y))&&I.isAudioMuxedInVideo&&(e.o=!0),e.g.currentTime=i,M(C,m,2);return A=S.value,E=e.h[A]?{timestampOffset:e.h[A].timestampOffset,appendWindowStart:e.h[A].appendWindowStart,appendWindowEnd:e.h[A].appendWindowEnd}:null,k=t.get(A),M(C,or(e,A,k,k.codecs),9);case 9:e.o?(e.l[n.Y]=[],e.l[n.la]=[]):e.l[A]=[],E&&e.h[A]&&(e.h[A].timestampOffset=E.timestampOffset,e.h[A].appendWindowEnd=E.appendWindowEnd,e.h[A].appendWindowStart=E.appendWindowStart),S=x.next(),C.u(6);break;case 2:N(C),e.S=!1,rD(e.K),e.s.va(e.g,"canplaythrough",function(){e.K.g||(e.g.autoplay=r,a||e.g.play())}),j(C,0)}})})}a7.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},z("shaka.lcevc.Dec",a7),a7.prototype.release=a7.prototype.release,(b=on.prototype).destroy=function(){return this.K.destroy()},b.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,u,l,c=this;return F(function(d){switch(d.g){case 1:return r=n3,M(d,c.O,2);case 2:c.C=t,c.aa=n,c.La=i,c.Ga=!c.C&&"HLS"==c.aa&&!c.La,c.V={},c.M=null,c.na=null,c.L=null,c.ka=null,c.ja=new ro,o=(a=v(e.keys())).next();case 3:if(o.done){d.u(5);break}return s=o.value,u=e.get(s),M(d,or(c,s,u,u.codecs),6);case 6:c.o?(c.l[r.Y]=[],c.l[r.la]=[]):c.l[s]=[],o=a.next(),d.u(3);break;case 5:(l=e.get(r.Y))&&l.isAudioMuxedInVideo&&(c.o=!0),C(d)}})},b.configure=function(e){this.A=e,this.i&&(this.i.A=e.modifyCueCallback)},b.zb=function(){var e={total:this.S?[]:aI(this.g.buffered),audio:aI(ol(this,"audio")),video:aI(ol(this,"video")),text:[]};if(this.i){var t=this.i.g,n=this.i.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},b.remove=function(e,t,n){var i,r=this;return F(function(a){return 1==a.g?e==(i=n3).wa?M(a,r.i.remove(t,n),0):M(a,om(r,e,function(){return oh(r,e,t,n)},null),4):r.o?M(a,om(r,i.Y,function(){return oh(r,i.Y,t,n)},null),0):a.u(0)})},b.flush=function(e){var t,n=this;return F(function(i){return 1==i.g?e==(t=n3).wa?i.return():M(i,om(n,e,function(){n.g.currentTime-=.001,og(n,e)},null),2):n.o?M(i,om(n,t.Y,function(){var e=t.Y;n.g.currentTime-=.001,og(n,e)},null),0):i.u(0)})},b.endOfStream=function(e){var t=this;return F(function(n){return M(n,ov(t,function(){oo(t)||"closed"===t.m.readyState||(e?t.m.endOfStream(e):t.m.endOfStream())}),0)})},b.bb=function(e){var t=this;return F(function(n){return M(n,ov(t,function(){if(e<t.m.duration)for(var n in t.h){var i={start:function(){},p:new ro,uri:null};t.l[n].unshift(i)}t.m.duration=e,t.qa=e}),0)})},b.getDuration=function(){return this.m.duration};var oT=e.URL.createObjectURL,ox="sequence";function oS(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 oA(e,t,n){this.j=n,this.l=e,this.s=ok(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.A=t,this.i=function(){}}function oE(e){this.g=e}function ok(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=v(aI(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 oI(e,t,n,i,r){var a=this;this.A=r,this.g=e,this.B=t,this.m=n,this.l=new es,this.j=!1,this.F=e.readyState,this.C=this.i=0,this.h=i,this.s=!1,this.l.D(e,"waiting",function(){return oM(a)}),this.o=new ez(function(){oM(a)}).Ra(this.m.gapJumpTimerTime)}function oM(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.j)return}else e.j=!1;if(!e.g.paused||e.g.currentTime==e.i&&(e.g.autoplay||e.g.currentTime!=e.i)){if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(r=!e.h)){var t,n,i,r=e.h,a=r.l,o=ok(a),s=a.g.currentTime,u=Date.now()/1e3;
1(r.g!=s||r.s!=o)&&(r.m=u,r.g=s,r.s=o,r.h=!1),(o=(s=u-r.m)>=r.A&&o&&!r.h)&&(r.i(r.g,s),r.h=!0,r.g=a.g.currentTime,r.o++,r.j(new rp("stalldetected"))),r=!o}r&&(r=e.g.currentTime,t=a=e.g.buffered,n=r,i=e.m.gapDetectionThreshold,null!=(o=!t||!t.length||aS(t)?null:0<=(t=aI(t).findIndex(function(e,t,r){return e.start>n&&(0==t||r[t-1].end-n<=i)}))?t:null)&&(0!=o||e.s))&&(s=a.start(o),(navigator.userAgent.match(/Edge\//)||eQ()||eZ())&&(s=Math.ceil(100*(s+e.m.gapPadding))/100),s>=e.B.Bb()||.001>s-r||(0!=o&&a.end(o-1),e.g.currentTime=s,r==e.i&&(e.i=s),e.C++,e.A(new rp("gapjumped"))))}}}function oC(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=oD.value().get(t),n.va(e,t,i))}(b=oS.prototype).getDuration=function(){return this.l},b.Wh=function(){return this.h},b.gh=function(e){this.i=e},b.bb=function(e){this.l=e},b.ai=function(){return this.i},b.eh=function(e){this.A=e},b.zc=function(e){e&&!this.B&&(this.I=!0),this.B=e},b.pe=function(e){this.o=e},b.Pd=function(){return this.o},b.Tf=function(e){this.C=e},b.Oh=function(){return this.C},b.Rg=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.ce(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)}}},b.td=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=v(e);for(var r=e.next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.ce(t),this.g=Math.max(this.g,n),null!=this.i&&this.F&&!this.s&&(this.i=i-this.g-this.h)}},b.Qg=function(e,t){this.ce(e),1/0==t||this.U()||(this.g=Math.max(this.g,t))},b.Xh=function(){return this.g},b.Yd=function(){this.s=!0},b.vi=function(){return this.s},b.fh=function(e){this.m=e},b.Th=function(){return this.m},b.ce=function(e){null==this.j?this.j=e:this.I||(this.j=Math.min(this.j,e))},b.Cf=function(e){this.h=Math.max(this.h,e)},b.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},b.U=function(){return 1/0==this.l&&!this.B},b.uc=function(){return 1/0!=this.l&&!this.B},b.qb=function(){return Math.max(this.H,this.Zb()-this.o)},b.jh=function(e){this.H=e},b.Zb=function(){return this.U()||this.uc()?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},b.gd=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.Bb()))},b.Kb=function(){return this.gd(0)},b.Bb=function(){return Math.max(0,this.Zb()-(this.U()||this.uc()?this.C:0))},b.qh=function(){return null!=this.i&&(null==this.g||!this.F)},b.dh=function(e){this.G=e},b.Mh=function(){return this.G},z("shaka.media.PresentationTimeline",oS),oS.prototype.getAvailabilityTimeOffset=oS.prototype.Mh,oS.prototype.setAvailabilityTimeOffset=oS.prototype.dh,oS.prototype.usingPresentationStartTime=oS.prototype.qh,oS.prototype.getSeekRangeEnd=oS.prototype.Bb,oS.prototype.getSeekRangeStart=oS.prototype.Kb,oS.prototype.getSafeSeekRangeStart=oS.prototype.gd,oS.prototype.getSegmentAvailabilityEnd=oS.prototype.Zb,oS.prototype.setUserSeekStart=oS.prototype.jh,oS.prototype.getSegmentAvailabilityStart=oS.prototype.qb,oS.prototype.isInProgress=oS.prototype.uc,oS.prototype.isLive=oS.prototype.U,oS.prototype.offset=oS.prototype.offset,oS.prototype.notifyMaxSegmentDuration=oS.prototype.Cf,oS.prototype.notifyMinSegmentStartTime=oS.prototype.ce,oS.prototype.getInitialProgramDateTime=oS.prototype.Th,oS.prototype.setInitialProgramDateTime=oS.prototype.fh,oS.prototype.isStartTimeLocked=oS.prototype.vi,oS.prototype.lockStartTime=oS.prototype.Yd,oS.prototype.getMaxSegmentEndTime=oS.prototype.Xh,oS.prototype.notifyPeriodDuration=oS.prototype.Qg,oS.prototype.notifySegments=oS.prototype.td,oS.prototype.notifyTimeRange=oS.prototype.Rg,oS.prototype.getDelay=oS.prototype.Oh,oS.prototype.setDelay=oS.prototype.Tf,oS.prototype.getSegmentAvailabilityDuration=oS.prototype.Pd,oS.prototype.setSegmentAvailabilityDuration=oS.prototype.pe,oS.prototype.setStatic=oS.prototype.zc,oS.prototype.setClockOffset=oS.prototype.eh,oS.prototype.getPresentationStartTime=oS.prototype.ai,oS.prototype.setDuration=oS.prototype.bb,oS.prototype.setPresentationStartTime=oS.prototype.gh,oS.prototype.getMaxSegmentDuration=oS.prototype.Wh,oS.prototype.getDuration=oS.prototype.getDuration,oA.prototype.release=function(){this.j=this.l=null,this.i=function(){}},oI.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.o&&(this.o.stop(),this.o=null),this.h&&(this.h.release(),this.h=null),this.g=this.B=this.A=null},oI.prototype.Ff=function(){this.s=!0,oM(this)};var oD=new eV(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function oR(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 es,this.i=new oU(e),oC(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){oN(r,r.j())})}function oP(e){return e.o?e.g.currentTime:e.j()}function oL(e,t){0<e.g.readyState?oO(e.i,t):oC(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){oN(e,e.j())})}function oN(e,t){.001>Math.abs(e.g.currentTime-t)?oj(e):(e.h.va(e.g,"seeking",function(){oj(e)}),oO(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function oj(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(e.g.currentTime)}function oU(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new ez(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 oO(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Ra(.1)}function o_(e){this.h=e,this.j=!1,this.g=null,this.i=new es}function oB(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.B=t.minBufferTime||0,this.l=n,this.A=r,this.s=null,this.o=function(e,t,n){if(!t.stallEnabled)return null;var i=t.stallSkip;return(t=new oA(new oE(e),t.stallThreshold,n)).i=function(){i?e.currentTime+=i:(e.pause(),e.play())},t}(e,n,a),this.j=new oI(e,t.presentationTimeline,n,this.o,a),this.h=new oR(e,function(){e:{var e=o.j;e.j=!0,e.s=!1;var t=oP(o.h);if(.001<Math.abs((e=oV(o,t))-t)){if(t=!1,!e2()||e2()&&tt())t=!0;else{var n=Date.now()/1e3,i=e2()&&ti("Fuchsia")?3:1;(!o.s||o.s<n-i)&&(o.s=n,t=!0)}if(t){oL(o.h,e),e=void 0;break e}}o.A(),e=void 0}return e},function(e){var t=o.j;t.g.seeking&&!t.j&&(t.j=!0,t.i=e)},function(){var e=i;return null==e?e=1/0>o.g.getDuration()?o.g.Kb():o.g.Bb():0>e&&(e=o.g.Bb()+e),oF(o,oH(o,e))}),this.m=new ez(function(){if(0!=o.i.readyState&&!o.i.paused){var e=oP(o.h),t=o.g.Kb(),n=o.g.Bb();3>n-t&&(t=n-3),e<t&&(e=oV(o,e),o.i.currentTime=e)}})}function oF(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function oV(e,t){var n=Math.max(e.B,e.l.rebufferingGoal),i=e.l.safeSeekOffset,r=e.g.Kb(),a=e.g.Bb(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.gd(n),u=e.g.gd(i);return n=e.g.gd(n+i),t>=o?oF(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?aE(e.i.buffered,u)?u:n:t>=s||aE(e.i.buffered,t)?t:n}function oH(e,t){var n=e.g.Kb();return t<n?n:t>(e=e.g.Bb())?e:t}function oG(e){this.g=e,this.m=null,this.i=0,this.o=!1}function oK(e){return e.g[0]||null}function oq(e,t,n){return new oG([e=new aw(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function oX(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function oW(){oG.call(this,[]),this.h=[]}function oz(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Od(),this.h=new ez(function(){t.g.Og(.25*t.i)})}function oY(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.Od()!=t&&e.g.Wf(t);return}catch(e){}e.h.Ra(.25),0!=e.g.Od()&&e.g.Wf(0)}function oJ(e){var t=this;this.h=e,this.g=new Set,this.i=new ez(function(){o$(t,!1)}).Ra(.25)}function o$(e,t){for(var n=v(e.g),i=n.next();!i.done;i=n.next())i.value.j(e.h.currentTime,t)}function oQ(){this.g=null,this.h=[]}function oZ(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=v(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function o0(){this.i=this.h=null,this.g=[]}function o1(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.
1id,type:"text",fromAdaptation:n,bandwidth:null}))}function o2(){this.kc=this.Kg=this.s=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.S=this.V=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new oQ,this.h=new o0}function o3(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 o4(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Jb(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.ua&&(i=!1),2==n.ac()&&(i=!1),n.pc()&&(i=!1),i&&n.ba&&t.push(o5(e,n.ba)),i&&!e.h.has(n)&&(i=new st(e.l),t.push(sn(i,n,e.i)),e.h.set(n,i))}return o9(e),Promise.all(t)}function o5(e,t){if(!e.i.segmentIndex||t.pc()||Array.from(e.j.keys()).some(function(e){return ab(e,t)}))return Promise.resolve();var n=new st(e.l),i=sn(n,t,e.i);return e.j.set(t,n),i}function o6(e,t){t=v(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&se(e,n)}function o8(e){o6(e,e.h),o6(e,e.j),e.g=null}function o9(e){for(var t=Array.from(e.h.keys()),n=v(e.j.keys()),i=n.next(),r={};!i.done;r={tf:void 0},i=n.next())r.tf=i.value,t.some(function(e){return function(t){return ab(t.ba,e.tf)}}(r))||se(e,r.tf)}function o7(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&se(e,i)}o9(e)}function se(e,t){var n=e.h;t instanceof ay&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function st(e){this.g=e,this.vd=this.Yf=null}function sn(e,t,n){var i=new Uint8Array(0);return e.vd=e.g(t,n,function(t){return F(function(n){if(1==n.g)return i=0<i.byteLength?nY(i,t):t,e.Yf?M(n,e.Yf(i),3):n.u(0);i=new Uint8Array(0),C(n)})}),e.vd.promise.catch(function(e){return e instanceof eB&&7001==e.code?Promise.resolve():Promise.reject(e)})}function si(e){rm.call(this);var t=this;this.g=new Set,this.i=e,this.h=new ez(function(){for(var e=t.i(),n=v(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime<e.start&&(t.g.delete(i),i=new rp("regionremove",new Map([["region",i]])),t.dispatchEvent(i))}).Ra(2)}function sr(e){rm.call(this),this.g=new Map,this.h=e}function sa(e,t,n){return!!(e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n)}function so(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 ss(e){var t=ir(e);return{type:t.split("/")[0],mimeType:t,codecs:e=ia(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Bd:null,colorGamut:null,frameRate:null}}function su(e){var t=new Set,n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){var r=ii(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=n1("audio",n),i=n1("video",n),e=n1(n2,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?ec('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 sl(t,n,i){var r,a,o,s,u;return F(function(l){if(1==l.g)return(r=n).cryptoKey?l.u(2):M(l,r.fetchKey(),3);if(!(a=r.iv))for(a=eA(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 sc(e,t,n,i,r){return e=rx(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function sd(e,t){var n=this;this.g=t,this.l=e,this.h=null,this.G=new Map,this.B=1,this.s=this.j=null,this.I=0,this.i=new Map,this.F=!1,this.K=null,this.A=!1,this.m=new rC(function(){var e,t,i,r,a,o,s;return e=n,F(function(n){if(1==n.g){for(t=[],r=(i=v(e.i.values())
1).next();!r.done;r=i.next())sI(a=r.value),t.push(sM(a)),a.W&&(o8(a.W),a.W=null);for(s=(o=v(e.o.values())).next();!s.done;s=o.next())o8(s.value);return M(n,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.l=null,e.h=null,C(n)})}),this.L=Date.now()/1e3,this.o=new Map,this.H={projection:null,hfov:null},this.O=0,this.M=1/0,this.C=null}function sh(e,t){for(var n=0>e.g.ib(),i=v(e.i.values()),r=i.next();!r.done;r=i.next())(r=r.value).ha&&r.ha.Xc(n),r.W&&r.W.Xc(n);for(r=(i=v(e.o.values())).next();!r.done;r=i.next())r.value.Xc(n);(n=e.i.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.dc&&(sg(e,t,!1,0,!1),n.dc=i):(t=n.dc)&&(n.dc=null,sg(e,t,!0,0,!1)))}function sp(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.j=t,e.F&&(t.video&&sg(e,t.video,n,i,r,a),t.audio&&sg(e,t.audio,n,i,r,a))}function sf(e,t){F(function(n){if(1==n.g)return e.C=null,e.s=t,e.F?t.segmentIndex?n.u(2):M(n,t.createSegmentIndex(),2):n.return();sg(e,t,!0,0,!1),C(n)})}function sg(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y=e.i.get(t.type);y||t.type!=n2?y&&(y.dc&&(t.trickModeVideo?(y.dc=t,t=t.trickModeVideo):y.dc=null),y.stream!=t||r)&&(e.o.has(t)?y.W=e.o.get(t):y.W&&(c=y.W,(d=t)&&d!==c.i&&(o8(c),c.i=d)),t.type==n2&&(r=n8(t.mimeType,t.codecs),oa(e.g.ca,r,e.l.sequenceMode,t.external)),!e.o.has(y.stream)&&y.stream.closeSegmentIndex&&(y.Ea?(r="("+y.type+":"+y.stream.id+")",e.G.has(r)||e.G.set(r,y.stream.closeSegmentIndex)):y.stream.closeSegmentIndex()),r=y.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,y.stream=t,y.ha=null,y.jg=!!a,r?sD(e,!0,!1):(n?y.$c?y.De=!0:y.Ea?(y.jc=!0,y.Jd=i,y.De=!0):(sI(y),sE(e,y,!0,i).catch(function(t){e.g&&e.g.onError(t)})):y.Ea||y.eb||sk(e,y,0),(o=e,s=y,F(function(e){if(1==e.g)return s.mb?(u=s.stream,l=s.mb,u.segmentIndex?e.u(2):M(e,u.createSegmentIndex(),2)):e.return();if(s.mb!=l||s.stream!=u)return e.return();var t=o.g.fd(),n=ou(o.g.ca,s.type),i=s.stream.segmentIndex.find(s.Sa?s.Sa.endTime:t),r=null==i?null:s.stream.segmentIndex.get(i);i=r&&r.ua?r.ua-r.Ka:null,r&&!i&&(i=(r.endTime-r.getStartTime())*(s.stream.bandwidth||0)/8),i?((r=r.ba)&&(i+=(r.ua?r.ua-r.Ka:null)||0),t=8*i/(r=o.g.getBandwidthEstimate())<(n||0)-t-Math.max(o.l.minBufferTime||0,o.h.rebufferingGoal)||s.mb.h.g>i):t=!1,t&&s.mb.abort(),C(e)})).catch(function(t){e.g&&e.g.onError(t)}))):(h=t,F(function(t){switch(t.g){case 1:return p=n3,e.I++,f=e.I,D(t,2),M(t,od(e.g.ca,p.wa),4);case 4:P(t,3);break;case 2:g=L(t),e.g&&e.g.onError(g);case 3:m=n8(h.mimeType,h.codecs),oa(e.g.ca,m,e.l.sequenceMode,h.external),(e.g.ca.fa.isTextVisible()||e.h.alwaysStreamText)&&e.I==f&&(v=sv(e,h),e.i.set(p.wa,v),sk(e,v,0)),C(t)}}))}function sm(e,t){t.$c||t.jc||(t.Ea?(t.jc=!0,t.Jd=0):null==os(e.g.ca,t.type)?null==t.eb&&sk(e,t,0):(sI(t),sE(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}function sv(e,t){return{stream:t,type:t.type,ha:null,W:sy(e,t),Sa:null,Mc:null,Xd:null,Wd:null,Vd:null,dc:null,endOfStream:!1,Ea:!1,eb:null,jc:!1,Jd:0,De:!1,$c:!1,Vc:!0,Lf:!1,jd:!1,mb:null}}function sy(e,t){if("video"===t.type&&e.h.disableVideoPrefetch||"audio"===t.type&&e.h.disableAudioPrefetch||t.type===n2&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===n2&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.W)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new o3(e.h.segmentPrefetchLimit,t,function(t,n,i){return sA(t,n,i||null,e.h.retryParameters,e.g.Ob)},0>e.g.ib()):null}function sb(e,t,n,i,r,a,o,s){var u,l,c,d;return F(function(h){if(1==h.g){var p,f,g,m,v,y;return u=n3,l=new Map,e.j.audio&&l.set(u.Y,e.j.audio),e.j.video&&l.set(u.la,e.j.video),D(h,2),t.Wd=i,t.Vd=r,o&&(t.yf=o),s&&(t.zf=s),t.Xd=n,c=e.l.sequenceMode||"HLS"==e.l.type,M(h,(p=e.g.ca,f=t.type,g=a.mimeType||t.stream.mimeType,m=a.codecs||t.stream.codecs,F(function(e){if(1==e.g){var t,a,o,s,u,d,h,b,w,T,x,S,A,E,k,I,C,D,R,P,L;if(f==(v=n3).wa){return c||(p.i.s=n),t=p.i,t.l=i,t.m=r,e.return()}return y=[],M(e,(a=p,o=f,s=g,u=m,d=l,F(function(e){if(1==e.g){if(o==(h=n3).wa)return e.return(!1);if(b=it(ia(a.G[o])),w=ir(a.G[o]),x=!1,S=n8(s,u),A=a.A.forceTransmux,(!ec(S)||!a.C&&il.includes(S))&&(A=!0),A&&(k=nT(E=n9(s,u)))&&(T=k(),I=n0(h.Y,(u||"").split(",")),C=n0(h.la,(u||"").split(",")),I&&C?(x=!0,D=C,o==h.Y&&(D=I),S=T.convertCodecs(o,n9(s,D))):S=T.convertCodecs(o,E)),R=it(ia(S)),P=ir(S),b===R&&w===P)return a.j[o]&&!T?(a.j[o].destroy(),delete a.j[o]):!a.j[o]&&T?a.j[o]=T:T&&(a.j[o]&&a.j[o].transmux!=T.transmux?(a.j[o].destroy(),delete a.j[o],a.j[o]=T):T.destroy()),e.return(!1);if(L=!0,(a.o||x&&T&&!a.j[o])&&(L=!1),L&&"smooth"===a.A.codecSwitchingStrategy&&ed()){var t,n;return M(e,(t=S,n=T,om(a,o,function(){o!==n2&&(ed()&&(a.j[o]&&(a.j[o].destroy(),delete a.j[o]),n&&(a.j[o]=n),a.h[o].changeType(t+a.A.addExtraFeaturesToSourceBuffer(t)),a.G[o]=t),og(a,o))},null)),3)}return T&&T.destroy(),M(e,ow(a,d),3)}return e.return(!0)})),2)}return e.h||(y.push(om(p,f,function(){return op(p,f)},null)),p.o&&y.push(om(p,v.Y,function(){return op(p,v.Y)},null))),c||(y.push(om(p,f,function(){return of(p,f,n)},null)),p.o&&y.push(om(p,v.Y,function(){return of(p,v.Y,n)},null))),y.push(om(p,f,function(){p.h[f].appendWindowStart=0,p.h[f].appendWindowEnd=r,p.h[f].appendWindowStart=i,og(p,f)},null)),p.o&&y.push(om(p,v.Y,function(){var e=v.Y;p.h[e].appendWindowStart=0,p.h[e].appendWindowEnd=r,p.h[e].appendWindowStart=i,og(p,e)},null)),M(e,Promise.all(y),0)})),4)}if(2!=h.g)return P(h,0);throw d=L(h),t.Wd=null,t.Vd=null,t.yf=null,t.zf=null,t.Xd=null,d})}function sw(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,F(function(f){switch(f.g){case 1:return u=i.closedCaptions&&0<i.closedCaptions.size,e.h.shouldFixTimestampOffset&&(c="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,d=null,r.ba&&(d=r.ba.timescale),(h=c&&d&&"video"===i.t
1ype&&"DASH"==e.l.type)&&(l=new rO),h&&l.box("moof",r_).box("traf",r_).R("tfdt",function(n){var i,a,o,s;return F(function(u){return(i=a_(n.reader,n.version).baseMediaDecodeTime)?(a=-i/d,(Number(t.Xd)||0)<a)?(o=t.Wd,s=t.Vd,M(u,sb(e,t,a,o,s,r),0)):u.u(0):u.return()})}),h&&l.parse(a,!1,o)),M(f,sT(e,t,n),2);case 2:return rD(e.m),p=t.Vc,t.Vc=!1,M(f,e.g.mg(t.type,a),3);case 3:return M(f,oc(e.g.ca,t.type,a,r,i,u,p,s,o),4);case 4:rD(e.m),C(f)}})}function sT(e,t,n){var i,r,a,o;return F(function(s){return 1==s.g?((i=t.stream.segmentIndex)instanceof oW&&i.Ia(e.l.presentationTimeline.Kb()),r=Math.max(e.h.bufferBehind*e.B,e.l.presentationTimeline.h),null==(a=os(e.g.ca,t.type)))?(e.C==t&&(e.C=null),s.return()):(o=n-a-r)<=e.h.evictionGoal?s.return():M(s,e.g.ca.remove(t.type,a,a+o),2):4!=s.g?(rD(e.m),e.C?M(s,sT(e,e.C,n),4):s.u(0)):void(rD(e.m),C(s))})}function sx(e){return e&&e.type==n2&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function sS(e,t,n,i){var r,a,o,s,u;return F(function(l){switch(l.g){case 1:if(r=n.pc())return l.return(r);if(a=null,t.W){var c=t.W,d=c.h;n instanceof ay&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.Yf=i),a=c.vd):a=null}return a||(a=sA(n,t.stream,i||null,e.h.retryParameters,e.g.Ob)),o=0,t.ha&&(o=t.ha.h),t.mb=a,M(l,a.promise,2);case 2:if(s=l.h,t.mb=null,u=s.data,!n.aesKey){l.u(3);break}return M(l,sl(u,n.aesKey,o),4);case 4:u=l.h;case 3:return l.return(u)}})}function sA(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof aw?e:void 0;return(e=sc(e.N(),e.Ka,e.ua,i,n)).contentType=t.type,r.request(rk,e,{type:+!!o,stream:t,segment:o,isPreload:a})}function sE(e,t,n,i){var r,a;return F(function(o){return 1==o.g?(t.jc=!1,t.De=!1,t.Jd=0,t.$c=!0,t.Sa=null,t.ha=null,t.W&&!e.o.has(t.stream)&&o8(t.W),i?(r=e.g.fd(),a=e.g.ca.getDuration(),M(o,e.g.ca.remove(t.type,r+i,a),3)):M(o,od(e.g.ca,t.type),4)):3!=o.g?(rD(e.m),n?M(o,e.g.ca.flush(t.type),3):o.u(3)):void(rD(e.m),t.$c=!1,t.endOfStream=!1,t.Ea||t.eb||sk(e,t,0),C(o))})}function sk(t,n,i){var r=n.type;(r!=n2||t.i.has(r))&&(n.eb=new eW(function(){var i;return F(function(r){if(1==r.g){var a,o,s,u,l,c;return D(r,2),M(r,F(function(i){switch(i.g){case 1:if(rD(t.m),n.Ea||null==n.eb||n.$c)return i.return();if(n.eb=null,!n.jc){i.u(2);break}return M(i,sE(t,n,n.De,n.Jd),3);case 3:case 8:return i.return();case 2:for(var r=v(t.G.entries()),d=r.next();!d.done;d=r.next()){var h=v(d.value);d=h.next().value,h=h.next().value,d.includes(n.type)&&(h(),t.G.delete(d))}if(n.stream.segmentIndex){i.u(4);break}return a=n.stream,D(i,5),M(i,n.stream.createSegmentIndex(),7);case 7:P(i,6);break;case 5:return o=L(i),M(i,sC(t,n,o),8);case 6:if(a!=n.stream)return a.closeSegmentIndex&&a.closeSegmentIndex(),n.Ea||n.eb||sk(t,n,0),i.return();case 4:D(i,9),null!=(s=function(t,n){if(sx(n))return x=t.g.ca,S=n.stream.originalId||"",A=ou(x,"video")||0,ih(x.i,S,A),null;if(n.type==n2&&(E=t.g.ca).i&&ih(E.i,"",0),n.stream.isAudioMuxedInVideo)return null;if(!((k=t.g.ca).ra&&!k.$)&&n.type!=n2)return t.h.updateIntervalSeconds/2;var i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,R,N=t.g.fd();if("audio"===n.type)for(var j=v(t.o.keys()),U=j.next();!U.done;U=j.next())(U=t.o.get(U.value)).Ia(N,!0),o4(U,N);j=n.Sa?n.Sa.endTime:N;var O=(I=t.g.ca,R=n.type,R==n2?null==(I=I.i).h||I.h<N?0:I.h-Math.max(N,I.g):ak(I=ol(I,R),N)),_=Math.max(1,Math.max(t.l.minBufferTime||0,t.h.rebufferingGoal,t.h.bufferingGoal)*t.B),B=t.l.presentationTimeline.getDuration()-j;if(U=ou(t.g.ca,n.type),1e-6>B&&U)return n.endOfStream=!0,"video"==n.type&&(t=t.i.get(n2))&&sx(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,O>=_)return t.h.updateIntervalSeconds/2;if(_=!n.ha,!(U=function(e,t,n,i){if(t.ha)return t.ha.current();if(t.Sa||i)return n=t.Sa?t.Sa.endTime:i,e=0>e.g.ib(),t.stream.segmentIndex&&(t.ha=t.stream.segmentIndex.Jb(n,!1,e)),t.ha&&t.ha.next().value;var r=Math.max(n-(i=e.l.sequenceMode?0:e.h.inaccurateManifestTolerance),0);e=0>e.g.ib();var a=null;return i&&(t.stream.segmentIndex&&(t.ha=t.stream.segmentIndex.Jb(r,!1,e)),a=t.ha&&t.ha.next().value),a||(t.stream.segmentIndex&&(t.ha=t.stream.segmentIndex.Jb(n,!1,e)),a=t.ha&&t.ha.next().value),a}(t,n,N,U)))return t.h.updateIntervalSeconds;O=!1,_&&n.jg&&(O=!0,n.jg=!1),_=1/0,B=v(B=Array.from(t.i.values())
1);for(var V=B.next();!V.done;V=B.next())sx(V=V.value)||V.ha&&!V.ha.current()||(_=Math.min(_,V.Sa?V.Sa.endTime:N));return j>=_+t.l.presentationTimeline.h?t.h.updateIntervalSeconds:(n.W&&n.ha&&!t.o.has(n.stream)&&(n.W.Ia(U.startTime),o4(n.W,U.startTime)),(i=t,r=n,a=N,o=U,s=O,F(function(t){var n,v,x,S,A,E,k,I,R,N,j,U,O,_,B,V,H,G,K,q,X,W,z,Y,J;switch(t.g){case 1:if(u=n3,l=r.stream,c=r.ha,r.Ea=!0,D(t,2),2==o.ac())throw new eB(1,1,1011);return M(t,(n=i,v=r,x=o,S=s,F(function(e){switch(e.g){case 1:if(A=n3,E=null==v.Sa,k=[],I=Math.max(0,Math.max(x.appendWindowStart,n.O)-.1),R=Math.min(x.appendWindowEnd,n.M)+.01,j=ii(N=x.codecs||v.stream.codecs),U=ir(x.mimeType||v.stream.mimeType),(O=x.timestampOffset)==v.Xd&&I==v.Wd&&R==v.Vd&&j==v.yf&&U==v.zf){e.u(2);break}if(!(v.yf&&v.zf&&function(e,t,n,i){if(t==n2)var r=!1;else{r=it(ia(e.G[t]));var a=ir(e.G[t]),o=n8(n,i),s=e.A.forceTransmux;(!ec(o)||!e.C&&il.includes(o))&&(s=!0),n=n9(n,i),s&&(s=nT(n))&&(o=(s=s()).convertCodecs(t,n),s.destroy()),t=it(ia(o)),o=ir(o),r=r!==t||a!==o}return!!r&&("smooth"!==e.A.codecSwitchingStrategy||!ed()||e.o)}(n.g.ca,v.type,U,N))||(_=null,v.type===A.la?_=n.i.get(A.Y):v.type===A.Y&&(_=n.i.get(A.la)),!_)){e.u(3);break}return M(e,sM(_).catch(function(){}),5);case 5:_.Mc=null,sm(n,_);case 3:return M(e,sb(n,v,O,I,R,x,j,U),2);case 2:var t,i,r,a;return ab(x.ba,v.Mc)||(v.Mc=x.ba,x.l&&x.ba&&(B=sS(n,v,x.ba),V=function(){var e,t,i,r,a,o;return F(function(s){switch(s.g){case 1:return D(s,2),M(s,B,4);case 4:return e=s.h,rD(n.m),t=null,i=new Map,r={projection:null,hfov:null},(new rO).box("moov",r_).box("trak",r_).box("mdia",r_).R("mdhd",function(e){t=aB(e.reader,e.version).timescale}).box("hdlr",function(e){switch((e=e.reader).skip(8),e.wc()){case"soun":i.set(A.Y,t);break;case"vide":i.set(A.la,t)}t=null}).box("minf",r_).box("stbl",r_).R("stsd",rB).box("encv",rF).box("avc1",rF).box("avc3",rF).box("hev1",rF).box("hvc1",rF).box("dvav",rF).box("dva1",rF).box("dvh1",rF).box("dvhe",rF).box("dvc1",rF).box("dvi1",rF).box("vexu",r_).box("proj",r_).R("prji",function(e){r.projection=e.reader.wc()}).box("hfov",function(e){r.hfov=e.reader.P()/1e3}).parse(e),function(e,t){if(e.H.projection!=t.projection||e.H.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new rp("spatialvideoinfo",n)}else n=new rp("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.H=t}}(n,r),i.has(v.type)?x.ba.timescale=i.get(v.type):null!=t&&(x.ba.timescale=t),a=v.stream.closedCaptions&&0<v.stream.closedCaptions.size,M(s,n.g.mg(v.type,e),5);case 5:return M(s,oc(n.g.ca,v.type,e,null,v.stream,a,v.Vc,S),6);case 6:P(s,0);break;case 2:throw o=L(s),v.Mc=null,o}})},H=x.startTime,E&&null!=(G=ou(n.g.ca,v.type))&&(H=G),n.g.Ei(H,x.ba),k.push(V()))),K=v.Sa?v.Sa.i:null,x.i!=K&&k.push((t=n.g.ca,i=v.type,r=x.startTime,F(function(e){return 1==e.g?i==(a=n3).wa?e.return():(i==a.la&&(t.Ba=new ro),t.C)?(om(t,i,function(){return op(t,i)},null),t.o&&om(t,a.Y,function(){return op(t,a.Y)},null),M(e,om(t,i,function(){return of(t,i,r)},null),2)):e.return():t.o?M(e,om(t,a.Y,function(){return of(t,a.Y,r)},null),0):e.u(0)}))),M(e,Promise.all(k),0)}})),4);case 4:if(rD(i.m),i.A)return t.return();if(d="video/mp4"==l.mimeType||"audio/mp4"==l.mimeType,h=e.ReadableStream,i.h.lowLatencyMode&&i.l.isLowLatency&&h&&d&&("HLS"!=i.l.type||o.m))return f=new Uint8Array(0),m=g=!1,b=function(e){var t,n,u;return F(function(c){switch(c.g){case 1:var d,h,p;if(g||(m=!0,rD(i.m),i.A))return c.return();if(D(c,2),d=f,h=e,(p=new Uint8Array(d.length+h.length)).set(d),p.set(h,d.length),f=p,t=!1,n=0,(new rO).box("mdat",function(e){n=e.size+e.start,t=!0}).parse(f,!1,!0),!t){c.u(4);break}return u=f.subarray(0,n),f=f.subarray(n),M(c,sw(i,r,a,l,o,u,!0,s),5);case 5:r.W&&r.ha&&o4(r.W,o.startTime,!0);case 4:P(c,0);break;case 2:y=L(c),C(c)}})},M(t,sS(i,r,o,b),9);return M(t,sS(i,r,o),7);case 7:if(p=t.h,rD(i.m),i.A)return t.return();return rD(i.m),r.jc?(r.Ea=!1,sk(i,r,0),t.return()):M(t,sw(i,r,a,l,o,p,!1,s),6);case 9:if(w=t.h,y)throw y;if(m){t.u(10);break}return g=!0,rD(i.m),i.A?t.return():r.jc?(r.Ea=!1,sk(i,r,0),t.return()):M(t,sw(i,r,a,l,o,w,!1,s),10);case 10:r.W&&r.ha&&o4(r.W,o.startTime,!0);case 6:if(rD(i.m),i.A)return t.return();r.Sa=o,c.next(),r.Ea=!1,r.Lf=!1,JSON.stringify(i.g.ca.zb()[r.type]),r.jc||i.g.Ff(o,r.stream),sk(i,r,0),P(t,0);break;case 2:if(T=L(t),rD(i.m,T),i.A)return t.return();if(r.Ea=!1,7001==T.code)r.Ea=!1,sI(r),sk(i,r,0),t.u(0);else if(r.type==u.wa&&i.h.ignoreTextStreamFailures)i.i.delete(u.wa),t.u(0);else{if(3017==T.code){return M(t,(q=i,X=r,W=T,F(function(e){if(1==e.g){if(Array.from(q.i.values()).some(function(e){return e!=X&&e.Lf}))return e.u(2);if(z=0===q.h.maxDisabledTime&&1011==W.code?1:q.h.maxDisabledTime,q.g.disableStream(X.stream,z))return e.return();if(20<(Y=Math.round(100*q.B)))q.B-=.2;else{if(!(4<Y))return X.jd=!0,q.A=!0,q.g.onError(W),e.return();q.B-=.04}return X.Lf=!0,J=q.g.fd(),M(e,sT(q,X,J),2)}sk(q,X,4),C(e)})),0)}return r.jd=!0,1==T.category&&r.W&&se(r.W,o),T.severity=2,M(t,sC(i,r,T),0)}}})).catch(function(){}),null)}(t,n))&&(sk(t,n,s),n.jd=!1),P(i,10);break;case 9:return u=L(i),M(i,sC(t,n,u),11);case 11:return i.return();case 10:if(l=Array.from(t.i.values()),!t.F||!l.every(function(e){return e.endOfStream})){i.u(0);break}return M(i,t.g.ca.endOfStream(),13);case 13:rD(t.m),0!=(c=t.g.ca.getDuration())&&c<t.l.presentationTimeline.getDuration()&&t.l.presentationTimeline.bb(c),C(i)}}),4)}if(2!=r.g)return P(r,0);i=L(r),t.g&&t.g.onError(i),C(r)})}).Z(i))}function sI(e){null!=e.eb&&(e.eb.stop(),e.eb=null)}function sM(e){return F(function(t){return e.mb?M(t,e.mb.abort(),0):t.u(0)})}function sC(e,t,n){var i;return F(function(r){if(1==r.g)return M(r,rr(e.K),2);
1if(rD(e.m),1===n.category&&1003!=n.code){if(t.dc)return sh(e,!1),r.return();i=0===e.h.maxDisabledTime&&1011==n.code?1:e.h.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.h.failureCallback(n),C(r)})}function sD(e,t,n){var i,r,a,o,s,u;return t=void 0!==t&&t,n=void 0===n||n,F(function(l){if(1==l.g){if(i=Date.now()/1e3,r=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||i-e.L<r)return l.return(!1);e.L=i}return a=n3,(o=e.i.get(a.Y))&&(o.Mc=null,n&&sm(e,o),sM(o).catch(function(){}),o.ha&&o.ha.Nf()),(s=e.i.get(a.la))&&(s.Mc=null,n&&sm(e,s),sM(s).catch(function(){}),s.ha&&s.ha.Nf()),u=new Map,e.j.audio&&u.set(a.Y,e.j.audio),e.j.video&&u.set(a.la,e.j.video),M(l,ow(e.g.ca,u),2)}return!s||s.Ea||s.eb||sk(e,s,0),!o||o.Ea||o.eb||sk(e,o,0),l.return(!0)})}function sR(){}function sP(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]=tE(d):s?e[a]=t[a]:d.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=tE(d)),c=sP(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?(et("Invalid config, wrong type for "+c),l=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&en("Unexpected number of arguments for "+c),e[a]=t[a]):(et("Invalid config, unrecognized key "+c),l=!1)}return l}function sL(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}oR.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},oU.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(b=o_.prototype).ready=function(){var e=this;oC(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.va(e.h,"seeking",function(){e.j=!0}),e.h.currentTime=n):e.j=!0}})},b.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},b.Je=function(e){this.g=this.j?this.g:e},b.Cd=function(){return(this.j?this.h.currentTime:this.g)||0},b.ig=function(){return 0},b.hg=function(){return 0},b.Pg=function(){},(b=oB.prototype).ready=function(){this.m.Ra(.25)},b.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.A=function(){}},b.Je=function(e){oL(this.h,e)},b.Cd=function(){var e=oP(this.h);return 0<this.i.readyState&&!this.i.paused?oH(this,e):e},b.ig=function(){return this.o?this.o.o:0},b.hg=function(){return this.j.C},b.Pg=function(){this.j.Ff()},(b=oG.prototype).getNumReferences=function(){return this.g.length},b.getNumEvicted=function(){return this.i},b.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},b.Bi=function(){this.o=!0},b.yb=function(e){for(var t=v(this.g),n=t.next();!n.done;n=t.next())e(n.value)},b.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},b.get=function(e){return 0==this.g.length||0>(e-=this.i)||e>=this.g.length?null:this.g[e]},b.offset=function(e){if(!this.o)for(var t=v(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},b.$d=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,y(e))}},b.rd=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.$d(e),this.Ia(t)},b.Ia=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}},b.Ic=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 aw((e=this.g[this.g.length-1]).startTime,t,e.C,e.Ka,e.ua,e.ba,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.A,e.h,e.status,e.aesKey)).mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},b.ue=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new ez(function(){var e=t();e?n.g.push.apply(n.g,y(e)):(n.m.stop(),n.m=null)}),this.m.Ra(e))},oG.prototype[Symbol.iterator]=function(){return this.Jb(0)},oG.prototype.Jb=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 et("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new oX(this,i,a,n)},z("shaka.media.SegmentIndex",oG),oG.forSingleSegment=oq,oG.prototype.getIteratorForTime=oG.prototype.Jb,oG.prototype.updateEvery=oG.prototype.ue,oG.prototype.fit=oG.prototype.Ic,oG.prototype.evict=oG.prototype.Ia,oG.prototype.mergeAndEvict=oG.prototype.rd,oG.prototype.offset=oG.prototype.offset,oG.prototype.get=oG.prototype.get,oG.prototype.find=oG.prototype.find,oG.prototype.markImmutable=oG.prototype.Bi,oG.prototype.release=oG.prototype.release,oG.prototype.getNumEvicted=oG.prototype.getNumEvicted,oG.prototype.getNumReferences=oG.prototype.getNumReferences,(b=oX.prototype).Xc=function(e){this.reverse=e},b.Hh=function(){return this.h},b.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.s&&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},b.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.s&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},b.Nf=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]},z("shaka.media.SegmentIterator",oX),oX.prototype.resetToLastIndependent=oX.prototype.Nf,oX.prototype.next=oX.prototype.next,oX.prototype.current=oX.prototype.current,oX.prototype.currentPosition=oX.prototype.Hh,oX.prototype.setReverse=oX.prototype.Xc,A(oW,oG),(b=oW.prototype).clone=function(){var e=new oW;
1return e.h=this.h.slice(),e.i=this.i,e},b.release=function(){for(var e=v(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},b.yb=function(e){for(var t=v(this.h),n=t.next();!n.done;n=t.next())n.value.yb(e)},b.find=function(e){for(var t=this.i,n=v(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},b.get=function(e){for(var t=this.i,n=v(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},b.offset=function(){},b.$d=function(){},b.Ia=function(e){for(var t=v(this.h),n=t.next();!n.done;n=t.next())n.value.Ia(e);for(;1<this.h.length&&0==this.h[0].getNumReferences();)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},b.rd=function(){},b.Ic=function(){},b.ue=function(){},z("shaka.media.MetaSegmentIndex",oW),oW.prototype.updateEvery=oW.prototype.ue,oW.prototype.fit=oW.prototype.Ic,oW.prototype.mergeAndEvict=oW.prototype.rd,oW.prototype.evict=oW.prototype.Ia,oW.prototype.merge=oW.prototype.$d,oW.prototype.offset=oW.prototype.offset,oW.prototype.get=oW.prototype.get,oW.prototype.find=oW.prototype.find,oW.prototype.forEachTopLevelReference=oW.prototype.yb,oW.prototype.release=oW.prototype.release,oz.prototype.release=function(){this.set(this.oc()),this.h&&(this.h.stop(),this.h=null),this.g=null},oz.prototype.set=function(e){this.i=e,oY(this)},oz.prototype.oc=function(){return this.g.oc()},oJ.prototype.release=function(){this.i.stop();for(var e=v(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},o3.prototype.Ia=function(e,t){t=void 0!==t&&t;for(var n=v(this.h.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&se(this,i);t&&o9(this)},o3.prototype.Xc=function(e){this.o=e,this.g&&this.g.Xc(e)},st.prototype.abort=function(){this.vd&&this.vd.abort()},A(si,rm),si.prototype.release=function(){this.g.clear(),this.h.stop(),rm.prototype.release.call(this)},A(sr,rm),sr.prototype.release=function(){this.g.clear(),rm.prototype.release.call(this)},sr.prototype.j=function(e){for(var t=v(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).Te;e:{for(var r=n.xd,a=r.length-1;0<=a;a--){var o=r[a];if(o.position<=e){r=o.Oc;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&&!e_(i.roles,r.roles),(o||s||i)&&sa(this,e,r.contentType)&&(n.Te=r,i=new rp("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&sa(this,e,r.contentType)&&(n.Te=r,JSON.stringify(r),n=new rp("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},(b=sd.prototype).destroy=function(){return this.m.destroy()},b.configure=function(e){if(this.h=e,this.K=new ri({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.i.get("audio");t&&t.W&&(o8(t.W),t.W=null),t=v(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,o8(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(n2))&&t.W&&(o8(t.W),t.W=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.W&&(o8(t.W),t.W=null),n=(t=v(this.i.keys())).next();!n.done;n=t.next())(n=this.i.get(n.value)).W?(o7(n.W,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(o8(n.W),n.W=null)):0<e.segmentPrefetchLimit&&(n.W=sy(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,i=v(e.l.variants),r=i.next(),a={};!r.done;a={pb:void 0},r=i.next())if(a.pb=r.value,a.pb.audio)if(e.o.has(a.pb.audio)){if(o7(r=e.o.get(a.pb.audio),t),!(0<t&&n.some(function(e){return function(t){return ib(e.pb.audio.language,t)}}(a)))){var o=e.i.get(a.pb.audio.type);r!==(o&&o.W)&&o8(r),e.o.delete(a.pb.audio)}}else!(0>=t)&&n.some(function(e){return function(t){return ib(e.pb.audio.language,t)}}(a))&&(r=sy(e,a.pb.audio))&&(a.pb.audio.segmentIndex||a.pb.audio.createSegmentIndex(),e.o.set(a.pb.audio,r))}(this)},b.start=function(e){var t=this;return F(function(n){if(1==n.g){var i,r,a,o,s,u,l,c,d,h,p;return M(n,(i=t,r=e||new Map,F(function(e){if(1==e.g){if(a=n3,!i.j)throw new eB(2,5,5006);return o=new Map,s=new Set,i.j.audio&&(o.set(a.Y,i.j.audio),s.add(i.j.audio)),i.j.video&&(o.set(a.la,i.j.video),s.add(i.j.video)),i.s&&(o.set(a.wa,i.s),s.add(i.s)),M(e,i.g.ca.init(o,i.l.sequenceMode,i.l.type,i.l.ignoreManifestTimestampsInSegmentsMode),2)}for(rD(i.m),i.updateDuration(),l=(u=v(o.keys())).next();!l.done;l=u.next())c=l.value,d=o.get(c),i.i.has(c)||(h=sv(i,d),r.has(d.id)&&(function(e,t){e.l=t,e=v(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 sA(e,t,n||null,i.h.retryParameters,i.g.Ob)}),h.W=p),i.i.set(c,h),sk(i,h,0));C(e)})),2)}rD(t.m),t.F=!0,C(n)})},b.Vc=function(){if(this.g)for(var e=this.g.fd(),t=v(this.i.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.i.get(i);var r=this.g.ca;if(!(r=i==n2?null!=(r=r.i).g&&null!=r.h&&e>=r.g&&e<r.h:aE(r=ol(r,i),e))){if(n.W&&(n.W.g=null),"audio"===n.type){r=v(this.o.values());for(var a=r.next();!a.done;a=r.next())a.value.g=null}n.ha=null,(null!=ou(this.g.ca,i)||n.Ea)&&sm(this,n),n.mb&&(n.mb.abort(),n.mb=null),i===n2&&(i=this.g.ca).H&&i.H.g(),n.Vc=!0}}},b.updateDuration=function(){var e=this.l.presentationTimeline.getDuration();1/0>e?this.g.ca.bb(e):this.g.ca.bb(this.h.infiniteLiveStreamDuration?1/0:0x100000000)};function sN(e,t){function n(e){return Array.isArray(e)&&0===e.length}function i(e){return e&&"object"==typeof e&&!Array.isArray(e)}return!function e(t){for(var r=v(Object.keys(t)),a=r.next();!a.done;a=r.next())i(t[a=a.value])&&0===Object.keys(t[a]).length||n(t[a])||"function"==typeof t[a]?delete t[a]:i(t[a])&&
1(e(t[a]),0===Object.keys(t[a]).length&&delete t[a])}(e=function e(t,r){return Object.keys(t).reduce(function(a,o){var s=t[o];return r.hasOwnProperty(o)?i(s)&&i(r[o])?(0<Object.keys(s=e(s,r[o])).length||!i(s))&&(a[o]=s):n(s)&&n(r[o])||Number.isNaN(s)&&Number.isNaN(r[o])||s!==r[o]&&(a[o]=s):a[o]=s,a},{})}(e,t)),e}function sj(){}function sU(e){return new nM(e=th(e)).Fb}function sO(e,t,n){function i(e){ek(a).setUint32(o,e.byteLength,!0),o+=4,a.set(eA(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new eB(2,6,6015);var r="string"==typeof t?tf(t,!0):t,a=new Uint8Array(12+(e=tf(e=th(e),!0)).byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function s_(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=th(e).split("skd://").pop(),sO(e,n,t))}function sB(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")}function sF(){}function sV(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:ra(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(e,t,n){return ta()&&"skd"==t&&(t=n.serverCertificate,n=sU(e),e=sO(e,n,t)),e},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:eQ(),minHdcpVersion:"",ignoreDuplicateInitData:!ti("Tizen 2")};(eQ()||e6())&&n.preferredKeySystems.push("com.microsoft.playready");var i="reload",r=!1;!ed()||eZ()||e6()||e5()||e1()&&79===e3()||!(!e2()||e2()&&tt()||e2()&&ti("Fuchsia"))||te()&&e$()||(i="smooth",r=!0),r={retryParameters:ra(),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"},manifestPreprocessor:sG,manifestPreprocessorTXml:sK,sequenceMode:!1,multiTypeVariantsAllowed:r,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:!(e0()||ti("Tizen 2")||e1()&&38===e3()||e6()),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,updatePeriod:-1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:sG,manifestPreprocessorTXml:sK,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var a={retryParameters:ra(),failureCallback:function(e){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,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,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:e6()||e5(),dontChooseCodecs:!1,shouldFixTimestampOffset:e1()||eZ()};
1(e1()||eZ()||e2()||e8())&&(a.stallSkip=0),eZ()&&(a.gapPadding=2);var o={trackSelectionCallback:function(e){return F(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return F(function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?M(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*!!e4(),preferNetworkInformationBandwidth:!1},i={codecSwitchingStrategy:i,addExtraFeaturesToSourceBuffer:function(e){return""},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(e,t){},dispatchAllEmsgBoxes:!1};var s=!1,u=!1,l=!0;tn()&&(u=s=!0,l=!1);var c={drm:n,manifest:r,streaming:a,mediaSource:i,offline:o,abrFactory:function(){return new i0},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:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:s,skipPlayDetection:u,supportsMultipleMediaElements:l,disableHLSInterstitial:!1,disableDASHInterstitial:!1},ignoreHardwareResolution:!1};return o.trackSelectionCallback=function(t){return F(function(n){return n.return(function(t,n,i){var r=i;"AUTO"==r&&(r=e.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var a=t.filter(function(e){return"variant"==e.type&&(!e.hdr||e.hdr==r)});i=[];var o=ik(n,a.map(function(e){return e.language}));o&&(i=a.filter(function(e){return ix(e.language)==o})),0==i.length&&(i=a.filter(function(e){return e.primary})),0==i.length&&(a.map(function(e){return e.language}),i=a);var s=i.filter(function(e){return e.height&&480>=e.height});for(s.length&&(s.sort(function(e,t){return t.height-e.height}),i=s.filter(function(e){return e.height==s[0].height})),n=[],i.length&&(a=Math.floor(i.length/2),i.sort(function(e,t){return e.bandwidth-t.bandwidth}),n.push(i[a])),i=(t=v(t)).next();!i.done;i=t.next())(i=i.value).type!=n2&&"image"!=i.type||n.push(i);return n}(t,c.preferredAudioLanguage,c.preferredVideoHdrLevel))})},c}function sH(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 sP(e,t,n||sV(),i,"")}function sG(e){var t;return t=[e],t&&e}function sK(e){var t;return t=[e],t&&e}function sq(e,t,n,i){rm.call(this),this.M=e,this.V=t,this.Ba=i.networkingEngine,this.B=n,this.o=null,this.xa=0,this.La=i.Ec,this.F=i.yi,this.Na=i.zi,this.g=i.config,this.j=this.G=this.h=null,this.ja=!1,this.H=i.Ji,this.na=!1,this.l=null,this.da=!1,this.i=this.C=null,this.aa=!1,this.L=new Map,this.ra=!1,this.Aa=i.Ii,this.$=new o2,this.fa=new ro,this.m=new ro,this.O=null,this.s=!1,this.Ha=i.Bh,this.ka=null,this.Ga=i.Ah,this.S=!1,this.K=[],this.I=[],this.A=!0}function sX(e,t,n){(e=t?e.I:e.K)?e.push(n):n()}function sW(e,t){if(e.O=t,e.S=!0,e.K){t=v(e.K);for(var n=t.next();!n.done;n=t.next())(n=n.value)()}e.K=null}function sz(e){if(e.s)throw new eB(2,7,7003)}function sY(e,t){e.dispatchEvent(new rp("onstatechange",(new Map).set("state",t)))}function sJ(e,t,n){var i,r,a,o;return F(function(s){return 1==s.g?(i=new o3(e.g.streaming.segmentPrefetchLimit||2,t,function(t,n,i){return sA(t,n,i||null,e.g.streaming.retryParameters,e.Ba,e.A)},!1),e.L.set(t.id,i),M(s,t.createSegmentIndex(),2)):(r=e.B||0,(o=(a=t.segmentIndex.Jb(r))?a.current():null)||(o=oK(t.segmentIndex)),o?n?o.ba?M(s,o5(i,o.ba),0):s.u(0):M(s,o4(i,o.startTime),0):s.u(0))})}function s$(e,t){rm.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Cc:null,Bc:s0,tc:function(e,t){return sQ(n,"enter",e,t)}},{Cc:sZ,Bc:s0,tc:function(e,t){return sQ(n,"enter",e,t)}},{Cc:s1,Bc:s0,tc:function(e,t){return sQ(n,"enter",e,t)}},{Cc:s0,Bc:sZ,tc:function(e,t){return sQ(n,"exit",e,t)}},{Cc:s0,Bc:s1,tc:function(e,t){return sQ(n,"exit",e,t)}},{Cc:sZ,Bc:s1,tc:function(e,t){return sQ(n,"skip",e,t)}},{Cc:s1,Bc:sZ,tc:function(e,t){return sQ(n,"skip",e,t)}}],this.h=new es,this.h.D(this.i,"regionremove",function(e){n.g.delete(e.region)})}function sQ(e,t,n,i){t=new rp(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}z("shaka.util.ConfigUtils",sR),sR.getDifferenceFromConfigObjects=sN,sR.convertToConfigObject=sL,sR.mergeConfigObjects=sP,z("shaka.util.FairPlayUtils",sj),sj.commonFairPlayResponse=function(e,t){if(2===e){try{var n=tc(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=eS(nX(n)))}},sj.expressplayFairPlayRequest=function(e,t){sB(e,t)},sj.conaxFairPlayRequest=function(e,t){sB(e,t)},sj.ezdrmFairPlayRequest=function(e,t){sB(e,t)},sj.verimatrixFairPlayRequest=function(e,t){2===e&&(e=nq(e=eA(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=tp("spc="+e))},sj.expressplayInitDataTransform=function(e,t,n){return s_(e,t,n)},sj.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=th(t).split("skd://").pop().split("?").shift();var r=new ArrayBuffer(2*(i=e.atob(i)).length);r=eE(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return sO(t,r,n)},sj.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=th(e).split(";").pop(),sO(e,n,t))},sj.verimatrixInitDataTransform=function(e,t,n){return s_(e,t,n)},sj.initDataTransform=sO,sj.defaultGetContentId=sU,sj.isFairPlaySupported=function(){var e;return F(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(t,2),M(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(L(t),t.return(!1))})},z("shaka.util.PlayerConfiguration",sF),sF.mergeConfigObjects=sH,sF.createDefault=sV,A(sq,rm),(b=sq.prototype).getStartTime=function(){return this.B},b.Kc=function(){return this.M},b.lf=function(){return this.h},b.getStats=function(){return this.$},b.start=function(){var e,t=this;F(function(n){var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v;switch(n.g){case 1:return M(n,Promise.resolve(),2);case 2:return D(n,3),M(n,(i=t,F(function(e){switch(e.g){case 1:if(sY(i,"manifest-parser"),i.j||(i.G=af(i.M,i.V),i.j=i.G(),i.j.configure(i.g.manifest,function(){return i.A})),r=Date.now()/1e3,sY(i,"manifest"),i.h){e.u(2);break}return M(e,i.j.start(i.M,i.Na),3);case 3:i.h=e.h;case 2:return i.fa.resolve(),a=new rp("manifestparsed",void 0),M(e,Promise.resolve(),4);case 4:if(i.dispatchEvent(a),0==i.h.variants.length)throw new eB(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))})(i.h),o=Date.now()/1e3-r,i.$.H=o,C(e)}})),5);case 5:return sz(t),M(n,(s=t,F(function(e){switch(e.g){case 1:if(sY(s,"drm-engine"),s.xa=Date.now()/1e3,s.l=s.La(),s.F.g=s.l,s.l.configure(s.g.drm,function(){return s.A}),!au(s.F,s.h)){e.u(2);break}
1return u=new rp("trackschanged",void 0),M(e,Promise.resolve(),3);case 3:sz(s),s.dispatchEvent(u);case 2:return l=iq(s.h.variants),M(e,r$(s.l,l,s.h.offlineSessionIds),4);case 4:return sz(s),M(e,as(s.F,s.h),5);case 5:if(!e.h){e.u(0);break}return c=new rp("trackschanged",void 0),M(e,Promise.resolve(),7);case 7:s.dispatchEvent(c),C(e)}})),6);case 6:return sz(t),M(n,(d=t,F(function(e){return(d.o||(d.o=new i9(d.g.preferredAudioLanguage,d.g.preferredVariantRole,d.g.preferredAudioChannelCount,d.g.preferredVideoHdrLevel,d.g.preferSpatialAudio,d.g.preferredVideoLayout,d.g.preferredAudioLabel,d.g.preferredVideoLabel,d.g.mediaSource.codecSwitchingStrategy,"")),d.Ga&&(h=d.g.abrFactory,d.C=h,d.i=h(),d.i.configure(d.g.abr)),d.Ha&&(p=d.h.presentationTimeline.U(),f=iq(d.h.variants),g=d.o.create(f),d.i.configure(d.g.abr),d.i.setVariants(Array.from(g.values())),m=d.i.chooseVariant()))?(v=[],d.ka=m,m.video&&v.push(sJ(d,m.video,p)),m.audio&&v.push(sJ(d,m.audio,p)),M(e,Promise.all(v),0)):e.u(0)})),7);case 7:sz(t),t.m.resolve(),P(n,0);break;case 3:(e=L(n))instanceof eB&&(7001==e.code||7003==e.code)||t.m.reject(e),C(n)}})},b.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):rm.prototype.dispatchEvent.call(this,e)},b.onError=function(e){2===e.severity&&(this.m.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new rp("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},b.configure=function(e,t){e=sL(e,t),sH(this.g,e)},b.getConfiguration=function(){return tE(this.g)},b.jj=function(){return this.m},b.destroy=function(){var e,t,n=this;return F(function(i){switch(i.g){case 1:if(n.s=!0,!n.j||n.ja){i.u(2);break}return M(i,n.j.stop(),2);case 2:if(!n.i||n.aa){i.u(4);break}return M(i,n.i.stop(),4);case 4:if(n.H&&!n.na&&n.H.release(),!n.l||n.da){i.u(6);break}return M(i,n.l.destroy(),6);case 6:if(0<n.L.size&&!n.ra)for(t=(e=v(n.L.values())).next();!t.done;t=e.next())o8(t.value);C(i)}})},z("shaka.media.PreloadManager",sq),sq.prototype.destroy=sq.prototype.destroy,sq.prototype.waitForFinish=sq.prototype.jj,A(s$,rm),s$.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,rm.prototype.release.call(this)},s$.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=v(this.i.g),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?sZ:e>i.endTime?s1:s0;this.g.set(i,a);for(var o=v(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Cc==r&&s.Bc==a&&s.tc(i,t)}}};var sZ=1,s0=2,s1=3;function s2(e,t,n){var i,r,a,o;return F(function(s){switch(s.g){case 1:var u=new nM(e).Ua.split("/").pop().split(".");if(i=s3[1==u.length?"":u.pop().toLowerCase()])return s.return(i);return r=0,a=rx([e],n),D(s,2),a.method="HEAD",M(s,t.request(r,a).promise,4);case 4:i=s.h.headers["content-type"],P(s,3);break;case 2:if(!(o=L(s))||1002!=o.code&&1001!=o.code){s.u(3);break}return a.method="GET",M(s,t.request(r,a).promise,6);case 6:i=s.h.headers["content-type"];case 3:return s.return(i?i.toLowerCase().split(";").shift():"")}})}var s3={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function s4(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 s5(e,t){var n=[];e=v(s6(e));for(var i=e.next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,y(s5(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>=np,a=t.fontStyle==ng,o=t.textDecoration.includes(nv);return r&&i.push(["b"]),a&&i.push(["i"]),o&&i.push(["u"]),""==(a=t.color)&&n&&(a=n.
1color),r="",(a=s4(a))&&(r+="."+a),""==(a=t.backgroundColor)&&n&&(a=n.backgroundColor),(n=s4(a))&&(r+=".bg_"+n),r&&i.push(["c",r]),i.reduceRight(function(e,t){var n=v(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 s6(e){var t=[];e=v(e);for(var n=e.next(),i={};!n.done;i={Qe:void 0},n=e.next())i.Qe=n.value,t.some(function(e){return function(t){return t6(e.Qe,t)}}(i))||t.push(i.Qe);return t}function s8(e){if(1/0===e.endTime||e.endTime<e.startTime)return null;var t=new t4(e.startTime,e.endTime,e.text);return t.line="number"==typeof e.line?e.line:null,e.lineAlign&&(t.lineAlign=e.lineAlign),t.lineInterpretation=e.snapToLines?ns:1,t.position="number"==typeof e.position?e.position:null,e.positionAlign&&(t.positionAlign=e.positionAlign),t.size=e.size,t.textAlign=e.align,"lr"===e.vertical?t.writingMode="vertical-lr":"rl"===e.vertical&&(t.writingMode="vertical-rl"),e.region&&(t.region.id=e.region.id,t.region.height=e.region.lines,t.region.heightUnits=2,t.region.regionAnchorX=e.region.regionAnchorX,t.region.regionAnchorY=e.region.regionAnchorY,t.region.scroll=e.region.scroll,t.region.viewportAnchorX=e.region.viewportAnchorX,t.region.viewportAnchorY=e.region.viewportAnchorY,t.region.viewportAnchorUnits=eL,t.region.width=e.region.width,t.region.widthUnits=eL),t8(t),t}function s9(e,t){this.g=null;for(var n=v(Array.from(e.textTracks)),i=n.next();!i.done;i=n.next())"metadata"!==(i=i.value).kind&&"chapters"!==i.kind&&(i.mode="disabled",i.label==t&&(this.g=i));this.g||(this.g=e.addTextTrack("subtitles",t)),this.g.mode="hidden"}function s7(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=v(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function ue(){}function ut(t,n,i){var r=this;document.fullscreenEnabled||en("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.m=!1,this.h=[],this.A=t,this.s=n,this.l=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.s.appendChild(this.g),i&&i.captionsUpdatePeriod||ef("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config."),this.C=new ez(function(){r.A.paused||un(r)}).Ra(i&&i.captionsUpdatePeriod?i.captionsUpdatePeriod:.25),this.i=new Map,this.j=new es,this.j.D(document,"fullscreenchange",function(){un(r,!0)}),this.j.D(this.A,"seeking",function(){un(r,!0)}),this.j.D(this.A,"resize",function(){var e=r.A,t=e.videoWidth;e=e.videoHeight,t&&e?r.l=t/e:r.l=null}),this.o=null,"ResizeObserver"in e&&(this.o=new ResizeObserver(function(){un(r,!0)}),this.o.observe(this.g)),this.B=new Map}function un(e,t){if(e.g){var n=e.A.currentTime;if(!e.m||(void 0===t?0:t)){t=v(e.B.values());for(var i=t.next();!i.done;i=t.next())aD(i.value);aD(e.g),e.i.clear(),e.B.clear()}e.m&&function e(t,n,i,r,a){var o=!1,s=[],u=[];n=v(n);for(var l=n.next();!l.done;l=n.next()){l=l.value,a.push(l);var c=t.i.get(l),d=l.startTime<=r&&l.endTime>r,h=c?c.th:null;c&&(s.push(c.Se),c.yc&&s.push(c.yc),d||(o=!0,t.i.delete(l),c=null)),d&&(u.push(l),c?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,h)||(o=!0):(function(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),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=ui(n.linePadding,n,e.s),u.paddingRight=ui(n.linePadding,n,e.s),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.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=ui(n.fontSize,n,e.s),null!=(i=n.line)&&((l=n.lineInterpretation)==ns&&(l=1,c=16,e.l&&1>e.l&&(c=32),i=0>i?100+i/c*100:i/c*100),1==l&&(u.position="absolute",n.writingMode==no?(u.width="100%",n.lineAlign==nu?u.top=i+"%":"end"==n.lineAlign&&(u.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(u.height="100%",
1n.lineAlign==nu?u.left=i+"%":"end"==n.lineAlign&&(u.right=100-i+"%")):(u.height="100%",n.lineAlign==nu?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!==ne?s:"left"===a||"start"===a&&o===na||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===na?"line-right":"center")?(u.cssFloat="left",null!==n.position&&(u.position="absolute",n.writingMode==no?(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==no?(u.right=100-n.position+"%",u.width="auto"):u.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(u.position="absolute",n.writingMode==no?(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==no?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.l===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==eL?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==eL?"%":"px"),e.B.has(n))n=e.B.get(n);else{r=document.createElement("span");var u=o.heightUnits==eL?"%":"px",l=o.widthUnits==eL?"%":"px",c=o.viewportAnchorUnits==eL?"%":"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.l===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.B.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.i.set(t,{Se:a,th:r,yc:n})}(t,l,a),h=(c=t.i.get(l)).th,o=!0)),0<l.nestedCues.length&&h&&e(t,l.nestedCues,h,r,a),a.pop()}if(o){for(a=(r=v(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(u.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),r=(u=v(u)).next();!r.done;r=u.next())(r=t.i.get(r.value)).yc?(r.yc.contains(i)&&r.yc.removeChild(i),i.appendChild(r.yc),r.yc.appendChild(r.Se)):i.appendChild(r.Se)}}(e,e.h,e.g,n,[])}}function ui(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 ur(e,t){this.h=e,this.g=t,this.i=void 0,this.l=!1,this.o=!0,this.j=this.m=!1}function ua(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:1,sf:t.i,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function uo(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,ua(e)),n.pr=e.h.ib();var r,a,o,s=n.ot===uc||n.ot===ud;if(e.m&&s&&(n.bs=!0,n.su=!0,e.m=!1),null==n.su&&(n.su=e.o),r=e,a=n,e=(o=r.g.includeKeys).length?Object.keys(a).reduce(function(e,t){return o.includes(t)&&(e[t]=a[t]),e},{}):a,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,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};t=v(t);for(var o=t.next();!o.done;o=t.next())r[null!=a[o=o.value]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=uu(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(e)).length&&Object.assign(t.headers,i);else{var u=uu(e);u&&(t.uris=t.uris.map(function(e){return ul(e,u)}))}}}function us(e,t){if(!(t=e.h.zb()[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 uu(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}var i=[],r={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},a=Object.keys(e||{}).sort();a=v(a);for(var o=a.next();!o.done;o=a.next()){var s,u=e[o=o.value];if(!Number.isNaN(s=u)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==u)&&("pr"!=o||1!==u)){var l=r[o];l&&(u=l(u));var c=void 0;c="string"==(l=typeof u)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(u):"boolean"===l?o:"symbol"===l?o+"="+u.description:o+"="+u,i.push(c)}}return i.join(",")}function ul(e,t){return!t||e.includes("offline:")?e:((e=new nM(e)).g.set("CMCD",t),e.toString())}(b=s9.prototype).configure=function(){},b.remove=function(e,t){return!!this.g&&(s7(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},b.append=function(e){var t=s5(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=v(t);for(var i=t.next(),r={};!i.done;r={Lc:void 0},i=t.next())r.Lc=i.value,!e.some(function(e){return function(t){return t.startTime==e.Lc.startTime&&t.endTime==e.Lc.endTime&&t.text==e.Lc.payload}}(r))&&r.Lc.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.Lc))&&n.push(i);for(t=(e=v(e=n.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)}))).next();!t.done;t=e.next())this.g.addCue(t.value)},b.destroy=function(){return this.g&&(s7(this.g,function(){return!0}),this.g.mode="disabled"),this.g=null,Promise.resolve()},b.isTextVisible=function(){return"showing"==this.g.mode},b.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},b.setTextLanguage=function(){},z("shaka.text.SimpleTextDisplayer",s9),s9.prototype.setTextLanguage=s9.prototype.setTextLanguage,s9.prototype.setTextVisibility=s9.prototype.setTextVisibility,s9.prototype.isTextVisible=s9.prototype.isTextVisible,s9.prototype.destroy=s9.prototype.destroy,s9.prototype.append=s9.prototype.append,s9.prototype.remove=s9.prototype.remove,s9.prototype.configure=s9.prototype.configure,(b=ue.prototype).configure=function(){},b.remove=function(){},b.append=function(){},b.destroy=function(){},b.isTextVisible=function(){return!1},b.setTextVisibility=function(){},b.setTextLanguage=function(){},z("shaka.text.StubTextDisplayer",ue),ue.prototype.setTextLanguage=ue.prototype.setTextLanguage,ue.prototype.setTextVisibility=ue.prototype.setTextVisibility,ue.prototype.isTextVisible=ue.prototype.isTextVisible,ue.prototype.destroy=ue.prototype.destroy,ue.prototype.append=ue.prototype.append,ue.prototype.remove=ue.prototype.remove,ue.prototype.configure=ue.prototype.configure,(b=ut.prototype).configure=function(e){this.C&&this.C.Ra(e.captionsUpdatePeriod)},b.append=function(e){var t=[].concat(y(this.h));e=v(s6(e));for(var n=e.next(),i={};!n.done;i={Re:void 0},n=e.next())i.Re=n.value,t.some(function(e){return function(t){return t6(t,e.Re)}}(i))||this.h.push(i.Re);un(this)},b.destroy=function(){return this.g&&(this.s.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.C&&this.C.stop(),this.i.clear(),this.j&&(this.j.release(),this.j=null),this.o&&(this.o.disconnect(),this.o=null)),Promise.resolve()},b.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}),un(this,n>this.h.length),!0},b.isTextVisible=function(){return this.m},b.setTextVisibility=function(e){this.m=e,un(this,!0)},b.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},z("shaka.text.UITextDisplayer",ut),ut.prototype.setTextLanguage=ut.prototype.setTextLanguage,ut.prototype.setTextVisibility=ut.prototype.setTextVisibility,ut.prototype.isTextVisible=ut.prototype.isTextVisible,ut.prototype.remove=ut.prototype.remove,ut.prototype.destroy=ut.prototype.destroy,ut.prototype.append=ut.prototype.append,ut.prototype.configure=ut.prototype.configure,z("shaka.text.WebVttGenerator",function(){}),ur.prototype.configure=function(e){this.g=e};var uc="v",ud="av";function uh(e){this.h=e,this.g=null}
1function up(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}z("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",Dj:"ld",HLS:"h",Ej:"lh",Rj:"s",OTHER:"o"}),(b=uh.prototype).configure=function(e){this.h=e},b.Cg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(ug)?1e3*this.g.get(ug):null},b.Ag=function(){return this.h.enabled&&this.g&&this.g.has(uf)?1e3*this.g.get(uf):null},b.bi=function(){return this.h.enabled&&this.g&&this.g.has(um)?this.g.get(um):null},b.ci=function(){return this.h.enabled&&this.g&&this.g.has(uv)?this.g.get(uv):null},b.getBandwidthEstimate=function(e){var t=this.Ag();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e},z("shaka.util.CmsdManager",uh),uh.prototype.getBandwidthEstimate=uh.prototype.getBandwidthEstimate,uh.prototype.getRoundTripTime=uh.prototype.ci,uh.prototype.getResponseDelay=uh.prototype.bi,uh.prototype.getEstimatedThroughput=uh.prototype.Ag,uh.prototype.getMaxBitrate=uh.prototype.Cg;var uf="etp",ug="mb",um="rd",uv="rtt";function uy(){this.g=null,this.h=[]}function ub(e,t){return F(function(n){if(1==n.g)return e.g?M(n,new Promise(function(t){return e.h.push(t)}),2):n.u(2);e.g=t,C(n)})}function uw(t,n,i){n=void 0===n?null:n,rm.call(this);var r,a=this;this.m=lo,this.h=null,this.ie=n,this.na=!1,this.Ae=new es,this.od=new es,this.l=new es,this.Ha=new es,this.Gb=new es,this.F=this.I=this.C=this.G=null,this.Ee=0,this.aa=new uy,this.ka=this.La=this.$=this.i=this.Na=this.H=this.j=this.bc=this.L=this.gg=this.fa=this.O=this.md=this.M=this.je=this.K=this.Ib=null,this.Aa=!1,this.xa=this.o=null,this.fg=1e9,this.ud=[],this.V=NaN,this.g=uq(this),this.S=null,this.Fe=-1,this.Ga=null,this.ja={width:1/0,height:1/0},this.ge=new ao(this.g,this.ja,null),this.re=[],this.A=null,this.Ba=new i9(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,""),this.Hb=this.g.preferredTextLanguage,this.sd=this.g.preferredTextRole,this.qd=this.g.preferForcedSubs,this.pd=[],i&&i(this),this.O=(r=this,new ur({getBandwidthEstimate:function(){return r.o?r.o.getBandwidthEstimate():NaN},zb:function(){return r.zb()},getCurrentTime:function(){return r.h?r.h.currentTime:0},ib:function(){return r.ib()},Ab:function(){return r.Ab()},rc:function(){return r.rc()},U:function(){return r.U()}},r.g.cmcd)),this.fa=new uh(this.g.cmsd),this.G=uL(this),this.G.Uf(this.g.streaming.forceHTTP),this.G.Vf(this.g.streaming.forceHTTPS),this.G.m=this.g.streaming.minBytesForProgressEvents,this.Lb=this.da=this.s=null,this.He=!1,this.Ge=new ez(function(){return F(function(e){return 1==e.g?a.da?M(e,a.Ub(a.Lb,!0),3):e.u(0):4!=e.g?M(e,a.load(a.da),4):void(a.He?a.Lb.pause():a.Lb.play(),a.da=null,a.He=!1,C(e))})}),lc&&(this.s=lc(),this.s.configure(this.g.ads),this.Gb.D(this.s,"ad-content-pause-requested",function(e){var t;return F(function(n){if(1==n.g)return(a.Ge.stop(),a.da)?n.u(0):(a.Lb=a.h,a.He=a.h.ended,t=e.saveLivePosition||!1,M(n,a.tg(!0,t),3));a.da=n.h,C(n)})}),this.Gb.D(this.s,"ad-content-resume-requested",function(e){if(e=e.offset||0,a.da){var t=a.da;t.B&&e&&(t.B+=e)}a.Ge.Z(.1)}),this.Gb.D(this.s,"ad-content-attach-requested",function(){return F(function(e){return a.h||!a.Lb?e.u(0):M(e,a.Ub(a.Lb,!0),0)})})),this.Ae.D(e,"online",function(){u6(a),a.Of()}),this.le=new ez(function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=v(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.le.stop(),t&&u$(a,!1,void 0,!1,!1)}),this.ra=null,t&&(ef("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ub(t,!0)),this.B=null}function uT(e){null!=e.L&&(oe(e.L),e.L.release(),e.L=null)}function ux(e,t){return new rp(e,t)}function uS(e,t){e.dispatchEvent(ux("onstatechange",(new Map).set("state",t)))}function uA(e,t){var n;return F(function(i){return 1==i.g?(n=++e.Ee,M(i,ub(e.aa,t),2)):n!=e.Ee?(e.aa.release(),i.return(!0)):i.return(!1)})}function uE(e,t){var n,i;return t=void 0!==t&&t,F(function(r){if(1==r.g)return(n=null,e.i&&e.H&&e.Na&&e.$)?(i=e.h.currentTime,e.U()&&!t&&(i=null),M(r,uI(e,e.$,i,e.La,!0,!1,
1!1),3)):r.u(2);if(2!=r.g){n=r.h,e.re.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var a=n,o=e.H,s=e.Na;a.h=e.i,a.j=o,a.G=s,a=n,o=e.xa,a.i=e.o,a.C=o,n.o=e.Ba,n.start(),e.i=null,e.H=null,e.Na=null,e.o=null,e.xa=null}return r.return(n)})}function uk(e,t,n,i,r){var a,o,s;return r=void 0!==r&&r,F(function(u){return 1==u.g?i?u.u(2):M(u,uM(e,t),3):(2!=u.g&&(i=u.h),function(e,t){if(!eY())return!0;if(t){if(""==(e.h||tr()).canPlayType(t))return!1;if(!(eY()&&t in ag))return!0;if(io(t))return e4()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls}return!1}(e,i))?u.return(null):(a=!1,o=!0,r&&(e.o&&e.xa==e.g.abrFactory&&(o=!1),e.h&&"AUDIO"===e.h.nodeName&&(a=!0)),s=uI(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.re.push(t),t}),u.return(s))})}function uI(e,t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,y,b,w;return r=void 0===r||r,a=void 0!==a&&a,o=void 0===o||o,F(function(T){return 1==T.g?(s=null,u=tE(e.g),a&&(u.manifest.disableVideo=!0),l=function(){return s.S&&s.s?null:s},c=function(){return l()?l().getConfiguration():e.g},d=function(t,n){l()?s.configure(t,n):e.configure(t,n)},1/0!=e.ja.width||1/0!=e.ja.height||e.g.ignoreHardwareResolution?T.u(2):M(T,to(),3)):(2!=T.g&&(h=T.h,e.ja.width=h.width,e.ja.height=h.height),p=new ao(u,e.ja,null),f={networkingEngine:e.G,filter:function(e){var t;return F(function(n){return 1==n.g?M(n,as(p,e),2):4!=n.g?n.h?(t=ux("trackschanged"),M(n,Promise.resolve(),4)):n.u(0):void(s.dispatchEvent(t),C(n))})},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=v(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);
1for(r=(i=v(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=v(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new oW,l=r.closedCaptions.get(o);s={id:e.fg++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:n2,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([n8(s,"")]),isAudioMuxedInVideo:!1},t.textStreams.push(s),n.add(o)}}}(e,t)},onTimelineRegionAdded:function(e){var t=s.H;e:{for(var n=v(t.g),i=n.next();!i.done;i=n.next())if((i=i.value).schemeIdUri==e.schemeIdUri&&i.id==e.id&&i.startTime==e.startTime&&i.endTime==e.endTime){n=i;break e}n=null}null==n&&(t.g.add(e),e=new rp("regionadd",new Map([["region",e]])),t.dispatchEvent(e))},onEvent:function(e){return s.dispatchEvent(e)},onError:function(e){return s.onError(e)},isLowLatencyMode:function(){return c().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return c().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){d("streaming.lowLatencyMode",!0)},updateDuration:function(){e.j&&s.S&&e.j.updateDuration()},newDrmInfo:function(e){var t=s.l,n=t?t.g:null;n&&t.A&&ac(p,n.keySystem,e)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.U());s.dispatchEvent(ux("manifestupdated",t)),sX(s,!1,function(){e.s&&e.s.onManifestUpdated(e.U())})},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.s)&&e.s.onHLSInterstitialMetadata(e,e.h,t),t=(r=v(r)).next();for(var o={};!t.done;o={Jf:void 0},t=r.next())o.Jf=t.value,"ID"!=o.Jf.name&&sX(s,!1,function(t){return function(){uP(e,n,i,a,t.Jf)}}(o))},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)}},(g=new si(function(){return e.Rb()})).addEventListener("regionadd",function(t){var n=t.region;u9(e,"timelineregionadded",n,s),sX(s,!1,function(){e.s&&(e.s.onDashTimedMetadata(n),e.s.onDASHInterstitialMetadata(e,e.h,n))})}),m=null,u.streaming.observeQualityChanges&&((m=new sr(function(){return e.zb()})).addEventListener("qualitychange",function(t){u7(e,t.quality,t.position)}),m.addEventListener("audiotrackchange",function(t){u7(e,t.quality,t.position,!0)})),y=!0,b={Ob:e.G,onError:function(e){return s.onError(e)},ee:function(t){sX(s,!0,function(){e:{var n=t,i=ux("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=v(e.i.variants);for(var o=r.next();!o.done;o=r.next()){o=o.value;var s=[];o.audio&&s.push(o.audio),o.video&&s.push(o.video),s=v(s);for(var u=s.next();!u.done;u=s.next()){var l=u.value;if(u=o.allowedByKeySystem,l.keyIds.size){o.allowedByKeySystem=!0,l=v(l.keyIds);for(var c=l.next();!c.done;c=l.next())c=c.value,((c=n[i?"00":c])||e.C.F)&&(o.allowedByKeySystem=o.allowedByKeySystem&&!!c&&!ah.includes(c))}
1u!=o.allowedByKeySystem&&(a=!0)}}}if(a&&(u0(e),!uJ(e)))break e;(n=e.j.j)&&!n.allowedByKeySystem&&u$(e)}})},onExpirationUpdated:function(e,t){var n=ux("expirationupdated");s.dispatchEvent(n),(n=s.j)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){s.dispatchEvent(t),"drmsessionupdate"==t.type&&y&&(y=!1,t=Date.now()/1e3-s.xa,(e.A||s.getStats()).j=t,e.L&&oe(e.L))}},w=uL(e,l),rT(e.G,w),s=new sq(t,i,n,{config:u,zi:f,Ji:g,Ii:m,Ec:function(){return e.Ec(b)},yi:p,networkingEngine:w,Bh:r,Ah:o}),T.return(s))})}function uM(e,t){var n,i;return F(function(r){return 1==r.g?(n=e.g.manifest.retryParameters,M(r,s2(t,e.G,n),2)):("application/x-mpegurl"==(i=r.h)&&e4()&&(i="application/vnd.apple.mpegurl"),r.return(i))})}function uC(e){var t=e.g.textDisplayFactory;t!==e.Ce&&(e.B=t(),e.B.configure?e.B.configure(e.g.textDisplayer):ef("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Ce=t,e.B.setTextVisibility(e.na))}function uD(e){var t,n;return F(function(i){if(1==i.g){var r,a;return uS(e,"media-source"),e.h.removeAttribute("src"),aD(e.h),uC(e),(r=e.h,a=e.B,t=new on(r,a,{Uh:function(){return e.keySystem()},onMetadata:function(t,n,i){t=v(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=v(r.frames),u=s.next();!u.done;u=s.next())uP(e,a,o,"org.id3",u.value);e.s&&e.s.onHlsTimedMetadata(r,a)}},onEvent:function(t){return e.dispatchEvent(t)},Fi:function(){e.H&&e.H.update&&e.H.update()}},e.L)).configure(e.g.mediaSource),n=e.g.manifest.segmentRelativeVttTiming,t.xa=n,M(i,t.O,2)}e.I=t,C(i)})}function uR(e,t,n){function i(){return uW(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),t=ux("ratechange"),e.dispatchEvent(t))}),t.remote&&(e.l.D(t.remote,"connect",function(){return u0(e)}),e.l.D(t.remote,"connecting",function(){return u0(e)}),e.l.D(t.remote,"disconnect",function(){return F(function(n){if(1==n.g)return e.j&&"disconnected"==t.remote.state?M(n,sD(e.j),2):n.u(2);u0(e),C(n)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return u0(e)}),e.l.D(t.audioTracks,"removetrack",function(){return u0(e)}),e.l.D(t.audioTracks,"change",function(){return u0(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=v(i.activeCues),t=e.next();!t.done;t=e.next())uP(n,(t=t.value).startTime,t.endTime,t.type,t.value),n.s&&n.s.onCueMetadataChange(t.value);if(i.cues){e=[],t=v(i.cues);for(var r=t.next(),a={};!r.done;a={Wb:void 0},r=t.next())a.Wb=r.value,"com.apple.quicktime.HLS"==a.Wb.type&&null!=a.Wb.startTime&&((r=e.find(function(e){return function(t){return t.startTime==e.Wb.startTime&&t.endTime==e.Wb.endTime}}(a)))||(r={startTime:a.Wb.startTime,endTime:a.Wb.endTime,values:[]},e.push(r)),r.values.push(a.Wb.value));for(t=(e=v(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.s&&(t.values.push({key:"CUE",description:"",data:0!=t.startTime||n.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),n.s.onHLSInterstitialMetadata(n,n.h,t))}});var r=new ez(function(){var e=Array.from(n.h.textTracks).filter(function(e){return"metadata"==e.kind});e=v(e);for(var t=e.next();!t.done;t=e.next())t.value.mode="hidden"}).hc().Z(.5);n.pd.push(function(){r.stop()})}break;case"chapters":var a=e,o=t;if(o&&"chapters"==o.kind){o.mode="hidden";var s=new ez(function(){o.mode="hidden"}).hc().Z(.5);a.pd.push(function(){s.stop()})}break;default:u0(e)}}),e.l.D(t.textTracks,"removetrack",function(){return u0(e)}),e.l.D(t.textTracks,"change",function(){return u0(e)})),"none"!=t.preload&&e.l.va(t,"loadedmetadata",function(){e.A.C=Date.now()/1e3-n})}function uP(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(ux("metadata",t))}function uL(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?sX(t(),!0,e):e()}return t||(t=function(){return null}),new rb(function(n,i,r,a){var o=t()?t().i:e.o;o&&o.segmentDownloaded(n,i,r,a)},function(t,r,a){n(ux("downloadheadersreceived",r=(new Map).set("headers",t).set("request",r).set("requestType",a))),i(function(){if(e.fa){var n=e.fa;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],up(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],up(l[1]))}var c=s}catch(e){c=null}c&&(n.g=c)}}}})},function(e,t,i,r){n(ux("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.O,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)uo(i,n);else switch(t){case 0:try{if(i.g.enabled){if(a.type){e:{switch(a.type){case 4:var o=i.j?"ld":"d";break e;case 3:case 2:o=i.j?"lh":"h";break e;case 5:o="s";break e}o=void 0}i.i=o}uo(i,n,{ot:"m",su:!i.l})}}catch(e){ei("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case rk:try{if(i.g.enabled){var s=a.segment;o=0,s&&(o=s.endTime-s.startTime);var u={d:1e3*o,st:i.h.U()?"l":"v"};u.ot=function(e){if(0===e.type)return"i";if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?ud:uc;if("audio"==t)return"a";if("text"==t)return"application/mp4"===e.mimeType?"tt":"c"}}(a);var l=u.ot===uc||"a"===u.ot||u.ot===ud||"tt"===u.ot,c=a.stream;if(c){var d=i.h.ib();if(l&&(u.bl=function(e,t){if(!(t=e.h.zb()[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,c.type),"tt"!==u.ot)){var h=us(i,c.type);u.dl=d?h/Math.abs(d):h}if(c.bandwidth&&(u.br=c.bandwidth/1e3),c.segmentIndex&&s){var p=c.segmentIndex.Jb(s.endTime,!0,0>d);if(p){var f=p.next().value;if(f&&f!=s){if(!e_(s.N(),f.N())){var g=f.N()[0],m=n.uris[0],y=new URL(g),b=new URL(m);if(y.origin!==b.origin)var w=g;else{for(var T=y.pathname.split("/").slice(1),x=b.pathname.split("/").slice(1,-1);T[0]===x[0];)T.shift(),x.shift();for(;x.length;)x.shift(),T.unshift("..");w=T.join("/")}u.nor=w}if((f.Ka||f.ua)&&(s.Ka!=f.Ka||s.ua!=f.ua)){var S=f.Ka+"-";f.ua&&(S+=f.ua),u.nrr=S}}}var A=i.h.ib()||1,E=us(i,c.type)||500,k=c.bandwidth,I=k?k*(s.endTime-s.startTime)/1e3/(E/A/1e3)*i.g.rtpSafetyFactor:NaN;isNaN(I)||(u.rtp=I)}}l&&"tt"!==u.ot&&(u.tb=function(e,t){var n=e.h.rc();if(!n.length)return NaN;e=n[0],n=v(n);for(var i=n.next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case uc:return e.videoBandwidth||NaN;case"a":return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,u.ot)/1e3),uo(i,n,u)}}catch(e){ei("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:uo(i,n,{ot:"k"});break;case 4:uo(i,n,{ot:"o"})}})},function(n,i,r,a){(n=t()?t().j: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.Kg=i))}})}function uN(e,t,n){e.M=new i7,e.M.g=rt,re(e.M,n,Math.min(.5,n/2)),uX(e),e.je=new ez(function(){uj(e)}).Ra(.25),e.l.D(t,"waiting",function(){return uj(e)}),e.l.D(t,"stalled",function(){return uj(e)}),e.l.D(t,"canplaythrough",function(){return uj(e)}),e.l.D(t,"progress",function(){return uj(e)})}function uj(e){switch(e.m){case lu:if(e.h.ended)var t=!0;else{var n=aA(e.h.buffered);t=null!=n&&n>=e.h.duration-1}break;case ls:e:if(e.h.ended||oo(e.I))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.Zb();var i=aA(e.h.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=ak(e.h.buffered,e.h.currentTime);var r=t,a=(n=e.M).i.get(n.g);t=n.g,i=r||i>=a?rn:rt,n.g=i,(t=t!=i)&&i===rn&&(n.h=Date.now()),t&&uX(e)}function uU(e){if(e.ge=new ao(e.g,e.ja,e.C),e.H){var t=tE(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!=la&&al(e.ge,e.i)&&u0(e)}catch(t){u8(e,t)}e.o&&uJ(e),(t=e.j.j)&&(!t.allowedByApplication||!t.allowedByKeySystem)&&u$(e)}if(e.G&&(e.G.Uf(e.g.streaming.forceHTTP),e.G.Vf(e.g.streaming.forceHTTPS),e.G.m=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.xa=e.g.manifest.segmentRelativeVttTiming),e.B)if(t=e.g.textDisplayFactory,e.Ce!=t){var n=e.B;if(e.B=t(),e.B.configure?e.B.configure(e.g.textDisplayer):ef("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.B.setTextLanguage||ef("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.B.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var i=e.B;n.fa=i,n.i&&(n.i.j=i)}e.Ce=t,e.j&&(n=(t=e.j).i.get(n2))&&sg(t,n.stream,!0,0,!0)}else e.B.configure&&e.B.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),u4(e)),e.M&&(t=e.g.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),re(e.M,t,Math.min(.5,t/2))),e.i&<(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.s&&e.s.configure(e.g.ads),e.O&&e.O.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}function uO(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{lc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function u_(e,t){e.l.D(t,"cuechange",function(){e.B.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n=Array.from(t.activeCues||[]).map(s8).filter(iv);e.B.append(n)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}function uB(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function uF(e){return Array.from(e.h.textTracks).filter(function(e){return"chapters"==e.kind})}function uV(e,t){var n;return F(function(i){switch(i.g){case 1:return D(i,2),M(i,s2(t,e.G,e.g.streaming.retryParameters),4);case 4:n=i.h,P(i,3);break;case 2:L(i);case 3:if(n)return i.return(n);throw new eB(1,2,2011,t)}})}function uH(e,t,n,i,r,a,o){var s;return F(function(u){if(1==u.g)return"text/vtt"!=r||o.length?M(u,uG(e,t,e.G,e.g.streaming.retryParameters),3):u.u(2);2!=u.g&&(t=oT(new Blob([uK(e,u.h,r,o)],{type:"text/vtt"})),r="text/vtt"),s=document.createElement("track");var l=e.O,c=t;try{if(l.g.enabled){var d=ua(l);d.ot="c",d.su=!0;var h=uu(d),p=ul(c,h)}else p=c}catch(e){ei("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),p=c}return s.src=p,s.label=a,s.kind=i,s.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(s),u.return(s)})}function uG(e,t,n,i){var r,a,o;return F(function(s){if(1==s.g){r=rk,(a=rx([t],i)).method="GET";var u=e.O;try{u.g.enabled&&uo(u,a,{ot:"c",su:!0})}catch(e){ei("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return M(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)})}function uK(e,t,n,i){var r=ip[n];if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=eA(t),function(e,t){function n(e){for(var n=e,i=v(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(i=Math.floor(n/60%60))?"0":"")+i+":"+(10>(r=Math.floor(n%60))?"0":"")+r+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var i=s5(e);e="WEBVTT\n\n",i=v(i);for(var r=i.next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --\x3e "+n(r.endTime)+function(e){var t=[];
1switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case nt: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 eB(2,2,2014,n)}function uq(e){var t=sV();return t.streaming.failureCallback=function(t){if(e.U()){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.Of(n))}},t.textDisplayFactory=function(){if(!e.ie||e7()&&!document.fullscreenEnabled)return HTMLMediaElement.prototype.addTextTrack?new s9(e.h,"Shaka Player TextTrack"):new ue;var t=e.getConfiguration();return new ut(e.h,e.ie,t.textDisplayer)},t}function uX(e){var t=e.uf();if(e.A&&e.M&&e.F){var n=e.K;if(n.j=t,oY(n),e.O&&(n=e.O,t||n.l||(n.l=!0),n.l&&t&&(n.m=!0),n.o=t),uW(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Fe<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.S&&(e.S=Math.min(e.S+ ++e.Fe*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent(ux("buffering",t))}function uW(e){if(e.A&&e.M){var t=e.A.g,n="playing";e.M.g==rt?n="buffering":e.h.ended?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(ux("statechanged",n)))}}function uz(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.yg();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.zd(i,!1):1==r&&t!==e.K.oc()&&e.Yc()}if(n&&Number.isFinite((n=e.Rb()).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.S||"number"!=typeof o||(e.S=o);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Ga&&null!==e.S&&"number"==typeof o&&e.Fe<d&&Date.now()-e.Ga>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.S=Math.max(e.S-(o-a)/2,a+i),e.Ga=Date.now()),r&&null!==e.S&&(s=e.S+i,u=e.S-i),o=n.end-e.h.currentTime,i=0,e.m==lu&&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.M.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&a<=r?t!=c&&e.zd(c,!1):s&&l&&o-i>s?(t!=l&&e.zd(l,!1),e.Ga=null):u&&c&&o-i<u?(t!=c&&e.zd(c,!1),e.Ga=null):t!==e.K.oc()&&(e.Yc(),e.Ga=Date.now())}}function uY(e){if(e.h){var t,n=!1,i=e.h.currentTime/e.h.duration;isNaN(i)||(i=Math.round(100*i),isNaN(e.V)?(e.V=i,n=!0):(i=Math.max(e.V,i),e.V!=i&&(e.V=i,n=!0))),n&&(0==e.V?t=ux("started"):25==e.V?t=ux("firstquartile"):50==e.V?t=ux("midpoint"):75==e.V?t=ux("thirdquartile"):100==e.V&&(t=ux("complete")),t&&e.dispatchEvent(t))}}function uJ(e){try{ad(e.ge,e.i)}catch(t){return u8(e,t),!1}var t=iq(e.i.variants);
1return t=e.Ba.create(t),e.o.setVariants(Array.from(t.values())),!0}function u$(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=uJ(e)?e.o.chooseVariant():null)&&uQ(e,a,r,t,n,i)}function uQ(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.j.j;if(t==o)i&&sp(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})),sp(e.j,t,i,r,a,n),i=null,o&&(i=iO(o)),(t=iO(t)).active=!0,n?(n=(new Map).set("oldTrack",i).set("newTrack",t),e.L&&ot(e.L,t,e.mf()),ln(e,n=ux("adaptation",n))):u1(e,i,t)}}function uZ(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),u1(e,n=iH(n),t=iH(t)))}function u0(e){ln(e,ux("trackschanged"))}function u1(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.L&&ot(e.L,n,e.mf()),ln(e,n=ux("variantchanged",t))}function u2(e){ln(e,ux("textchanged"))}function u3(e){ln(e,ux("texttrackvisibility"))}function u4(e){e.g.abr.enabled||u6(e);var t=(new Map).set("newStatus",e.g.abr.enabled);ln(e,ux("abrstatuschanged",t))}function u5(e){var t=e.qc().find(function(e){return e.active});t&&e.B&&e.B.setTextLanguage&&e.B.setTextLanguage(t.language)}function u6(e,t){if(t=void 0===t||t,e.m==ls){e.le.stop();for(var n=v(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&uJ(e)}}function u8(e,t){var n,i,r,a;return F(function(o){switch(o.g){case 1:if(e.m==la)return o.return();if(1===t.severity&&e.A.K++,n=!0,!(e.Aa&&e.i&&e.j)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3018!=t.code){o.u(2);break}return D(o,3),M(o,sD(e.j),5);case 5:n=!(i=o.h),i&&(r=ux("mediasourcerecovered"),e.dispatchEvent(r)),P(o,2);break;case 3:L(o),n=!0;case 2:if(!n)return o.return();2===t.severity&&u6(e,!1),a=ux("error",(new Map).set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),C(o)}})}function u9(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(ux(t,e))}function u7(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(ux(i?"audiotrackchanged":"mediaqualitychanged",t))}function le(e,t){if(t=void 0===t||t,!e.h.error)return t?new eB(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 eB(2,3,3016,n,t,e.h.error.message)):null}function lt(e,t,n){0<t&&(e.U()||e.jh(t)),n<(t=e.getDuration())&&(e.U()||e.bb(n))}function ln(e,t){F(function(n){if(1==n.g)return M(n,Promise.resolve(),2);e.m!=la&&e.dispatchEvent(t),C(n)})}function li(e){var t=new Set;e=v(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(ix(n.language)):t.add("und");return t}function lr(e){var t=new Map,n=new Map;e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",a=[];i.language&&(r=ix(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set),a=v(a);for(var o=a.next();!o.done;o=a.next())o=o.value,t.get(r).add(o),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(o,i.label))}var s=[];return t.forEach(function(e,t){e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=null;n.has(t)&&n.get(t).has(i)&&(r=n.get(t).get(i)),s.push({language:t,role:i,label:r})}}),s}uy.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},A(uw,rm),(b=uw.prototype).destroy=function(){var e,t=this;return F(function(n){switch(n.g){case 1:if(t.m==la)return n.return();return uT(t),e=t.detach(),t.m=la,M(n,e,2);case 2:return M(n,t.Ue(),3);case 3:if(t.Ae&&(t.Ae.release(),t.Ae=null),t.od&&(t.od.release(),t.od=null),t.l&&(t.l.release(),t.l=null),t.Ha&&(t.Ha.release(),t.Ha=null),t.Gb&&(t.Gb.release(),t.Gb=null),t.xa=null,t.g=null,t.A=null,t.ie=null,t.O=null,t.fa=null,!t.G){n.u(4);break}return M(n,t.G.destroy(),5);case 5:t.G=null;case 4:t.o&&(t.o.release(),t.o=null),rm.prototype.release.call(t),C(n)}})},b.Ub=function(e,t){t=void 0===t||t;var n,i,r,a=this;return F(function(o){switch(o.g){case 1:if(a.m==la)throw new eB(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.u(2);break}return M(o,a.detach(),2);case 2:return M(o,uA(a,"attach"),4);case 4:if(o.h)return o.return();if(D(o,5,6),n||(uS(a,"attach"),i=function(){var e=le(a,!1);e&&u8(a,e)}
1,a.od.D(e,"error",i),a.h=e),!t||!eY()||a.I){o.u(6);break}return M(o,uD(a),6);case 6:N(o),a.aa.release(),j(o,0);break;case 5:return r=L(o),M(o,a.detach(),10);case 10:throw r}})},b.Ch=function(e){this.gg=e},b.detach=function(e){e=void 0!==e&&e;var t=this;return F(function(n){if(1==n.g){if(t.m==la)throw new eB(2,7,7e3);return M(n,t.ic(!1,e),2)}if(3!=n.g)return M(n,uA(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.od.Va(),t.h=null),uS(t,"detach"),t.s&&!e&&t.s.release()}finally{t.aa.release()}C(n)})},b.ic=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,i,r,a,o,s,u,l,c,d,h=this;return F(function(p){switch(p.g){case 1:return h.m!=la&&(h.m=lo),M(p,uA(h,"unload"),2);case 2:if(p.h)return p.return();return R(p,3),h.Aa=!1,uS(h,"unload"),e&&!eY()&&(e=!1),uT(h),n=h.pd.map(function(e){return e()}),h.pd=[],M(p,Promise.all(n),5);case 5:if(h.dispatchEvent(ux("unloading")),h.md&&(h.md.release(),h.md=null),h.h&&(h.l.Va(),h.Ha.Va()),h.le.stop(),h.Ib&&(h.Ib.release(),h.Ib=null),h.je&&(h.je.stop(),h.je=null),!h.H){p.u(6);break}return M(p,h.H.stop(),7);case 7:h.H=null,h.Na=null;case 6:if(!h.o){p.u(8);break}return M(p,h.o.stop(),8);case 8:if(!h.j){p.u(10);break}return M(p,h.j.destroy(),11);case 11:h.j=null;case 10:if(h.K&&(h.K.release(),h.K=null),h.F&&(h.F.release(),h.F=null),!ta("webkit")||!h.C){p.u(12);break}return M(p,h.C.destroy(),13);case 13:h.C=null;case 12:if(!h.I){p.u(14);break}return M(p,h.I.destroy(),15);case 15:h.I=null;case 14:var f;if(h.s&&!t&&h.s.onAssetUnload(),h.da&&!t&&(h.da.destroy(),h.da=null),t||h.Ge.stop(),h.O&&((f=h.O).l=!1,f.o=!0,f.m=!1,f.j=!1),h.fa&&(h.fa.g=null),!h.B){p.u(16);break}return M(p,h.B.destroy(),17);case 17:h.B=null;case 16:if(h.h&&(aD(h.h),h.h.src&&(h.h.removeAttribute("src"),h.h.load())),!h.C){p.u(18);break}return M(p,h.C.destroy(),19);case 19:h.C=null;case 18:if(h.ra&&h.$!=h.ra.Kc()&&(h.ra.s||h.ra.destroy(),h.ra=null),h.$=null,h.La=null,h.M=null,h.i){for(r=(i=v(h.i.variants)).next();!r.done;r=i.next())for(s=(o=v([(a=r.value).audio,a.video])).next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=(l=v(h.i.textStreams)).next();!c.done;c=l.next())(d=c.value).segmentIndex&&d.segmentIndex.release()}h.g.streaming.clearDecodingCache&&(iJ={},eX.clear()),h.i=null,h.A=new o2,h.Ce=null,h.Ga=null,h.S=null,h.Fe=-1,h.ud=[],h.V=NaN,uX(h);case 3:N(p),h.aa.release(),j(p,4);break;case 4:if(e&&eY()&&!h.I&&h.h)return M(p,uD(h),0);p.u(0)}})},b.ij=function(e){this.ka=e},b.load=function(e,t,n){t=void 0===t?null:t;var i,r,a,o,s,u,l,c,d,h,p,f,g,m=this;return F(function(y){switch(y.g){case 1:if(m.m==la)throw new eB(2,7,7e3);return i=null,r="",r=e instanceof sq?(i=e).Kc()||"":e||"",M(y,ub(m.aa,"load"),2);case 2:if(m.aa.release(),!m.h)throw new eB(2,7,7002);if(!m.$){y.u(3);break}return m.$=r,M(y,m.ic(!1),3);case 3:if(a=++m.Ee,o=function(){return F(function(e){if(1==e.g)return m.Ee==a?e.u(0):i?M(e,i.destroy(),3):e.u(3);throw new eB(2,7,7e3)})},s=function(e,t){return F(function(n){switch(n.g){case 1:return R(n,2),M(n,ub(m.aa,t),4);case 4:return M(n,o(),5);case 5:return M(n,e(),6);case 6:return M(n,o(),7);case 7:i&&m.g&&(i.g=m.g);case 2:N(n),m.aa.release(),j(n,0)}})},D(y,5,6),null==t&&i&&(t=i.getStartTime()),m.ka=t,m.Aa=!1,m.dispatchEvent(ux("loading")),i){n=i.V,y.u(8);break}if(n){y.u(8);break}return M(y,s(function(){return F(function(e){if(1==e.g)return M(e,uM(m,r),2);n=e.h,C(e)})},"guessMimeType_"),8);case 8:if(u=!!i,i){sW(i,m),m.A=i.getStats(),y.u(11);break}return M(y,uk(m,r,t,n,!0),12);case 12:(i=y.h)?(i.A=!1,sW(i,m),m.A=i.getStats(),i.start(),i.m.catch(function(){})):m.A=new o2;case 11:return l=!i,c=Date.now()/1e3,m.A=i?i.getStats():new o2,m.$=r,m.La=n||null,l?M(y,s(function(){return F(function(e){var t,i,r,a,o,s,u;return M(e,(t=m,i=n,F(function(e){return 1==e.g?(r=n3,a=Date.now()/1e3,o=!0,t.C=t.Ec({Ob:t.G,onError:function(e){u8(t,e)},ee:function(){},onExpirationUpdated:function(){var e=ux("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:i?ir(i):"",codecs:i?ia(i):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.la,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(n8(u.mimeType,u.codecs)),i.startsWith("audio/")?(u.type=r.Y,s.audio=u):s.video=u,t.C.$=!0,M(e,r$(t.C,[s],[]),2)):M(e,t.C.Ub(t.h),0)})),0)})},"initializeSrcEqualsDrmInner_"),21):M(y,s(function(){return F(function(e){if(1==e.g)return M(e,Promise.race([i.fa,i.m]),2);m.Na=i.G;var t=i;t.ja=!0,m.H=t.j,m.i=i.lf(),C(e)})},"waitForFinish"),15);case 15:if(m.I){y.u(16);break}return M(y,s(function(){return F(function(e){return M(e,uD(m),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return M(y,s(function(){return F(function(e){return M(e,i.m,0)})},"waitForFinish"),18);case 18:return m.g=i.getConfiguration(),m.ge=i.F,m.H&&m.H.setMediaElement&&m.h&&m.H.setMediaElement(m.h),(b=i).na=!0,m.md=b.H,m.bc=i.Aa,(d=i.o)&&(m.Ba=d),u&&m.h&&"AUDIO"===m.h.nodeName&&(function(e){for(var t=v(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})}(m),m.configure("manifest.disableVideo",!0)),(w=i).da=!0,m.C=w.l,M(y,s(function(){return F(function(e){return M(e,m.C.Ub(m.h),0)})},"drmEngine_.attach"),19);case 19:return(h=i.C)&&(!m.xa||m.xa!=h)&&((T=i).aa=!0,m.o=T.i,m.xa=i.C,"function"!=typeof m.o.setMediaElement&&(ef("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),m.o.setMediaElement=function(){}),"function"!=typeof m.o.setCmsdManager&&(ef("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),m.o.setCmsdManager=function(){}),"function"!=typeof m.o.trySuggestStreams&&(ef("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),m.o.trySuggestStreams=function(){})),(x=i).ra=!0,p=x.L,f=i.ka,M(y,s(function(){return F(function(e){var t,n,i,r,a,o,s,u,l,d,h,g,y,b,w,T,x,S,A,E,k,I,D,R;return M(e,(t=m,n=c,i=f,r=p,F(function(e){var c,p,f,m,P,L,N,j,U,O,_,B,V;switch(e.g){case 1:uS(t,"load"),a=t.h,t.K=new oz({Od:function(){return a.playbackRate},oc:function(){return a.defaultPlaybackRate},Wf:function(e){a.playbackRate=e},Og:function(e){a.currentTime+=e}}
1),uR(t,a,n),(c=t.g).lcevc.enabled?(uT(t),null==t.L&&(t.L=new a7(t.h,t.gg,c.lcevc),t.I&&(t.I.da=t.L))):uT(t),t.Hb=t.g.preferredTextLanguage,t.sd=t.g.preferredTextRole,t.qd=t.g.preferForcedSubs,lt(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.o.init(function(e,n,i){t.i&&t.j&&e!=t.j.j&&uQ(t,e,!0,void 0!==n&&n,void 0===i?0:i)}),t.o.setMediaElement(a),t.o.setCmsdManager(t.fa),t.j=new sd((L=t).i,{fd:function(){return L.F?L.F.Cd():0},getBandwidthEstimate:function(){return L.o.getBandwidthEstimate()},ib:function(){return L.ib()},ca:L.I,Ob:L.G,onError:function(e){return u8(L,e)},onEvent:function(e){return L.dispatchEvent(e)},Ff:function(e,t){var n=e.startTime;e=e.endTime;var i=t.type;if(t=t.codecs.includes(","),i!=n2){if(L.F){L.F.Pg();var r=os(L.I,i);!L.U()&&L.h.paused&&null!=r&&0<r&&L.F.Cd()<r&&L.F.Je(r)}uj(L)}n=(new Map).set("start",n).set("end",e).set("contentType",i).set("isMuxed",t),L.dispatchEvent(ux("segmentappended",n))},Ei:function(e,t){var n,i,r,a,o,s;(t=t.Oc)&&L.bc&&(n=L.bc,i=t,r=n,a=i.contentType,(o=r.g.get(a))||(o={xd:[],Te:null,contentType:a},r.g.set(a,o)),function(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.xd;t.xd=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.xd=[]}(n,s=o),n={Oc:i,position:e},0<=(i=(s=s.xd).findIndex(function(t){return t.position>=e}))?s.splice(i,+(s[i].position==e),n):s.push(n))},mg:function(e,t){var n=L.C;if(n.h.parseInbandPsshEnabled&&!n.F&&["audio","video"].includes(e)){e=new rz(eA(t)),t=0;for(var i=v(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=v(e.data)).next();!r.done;r=e.next())r=r.value,t.set(r,i),i+=r.length;r1(n,"cenc",t),n=n.m}}else n=Promise.resolve();return n},disableStream:function(e,t){return L.disableStream(e,t)}}),t.j.configure(t.g.streaming),t.m=ls,t.dispatchEvent(ux("streaming")),o=i;case 2:for((u=t.j.j)||o||(o=uJ(t)?t.o.chooseVariant():null),l=[],h=(d=v([(s=u||o).video,s.audio])).next();!h.done;h=d.next())(g=h.value)&&!g.segmentIndex&&l.push(g.createSegmentIndex());if(!(0<l.length)){e.u(4);break}return M(e,Promise.all(l),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&&en("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.O&&((p=t.O).j=t.i.isLowLatency&&t.g.streaming.lowLatencyMode,p.j?"d"==p.i?p.i="ld":"h"==p.i&&(p.i="lh"):"ld"==p.i?p.i="d":"lh"==p.i&&(p.i="h")),lt(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),f=t.j,m=t.g.playRangeStart,P=t.g.playRangeEnd,f.l.presentationTimeline.U()||(f.O=m,f.M=P),y=function(e){var n,i,r,o,s;n=t,i=e,t.F=new oB(n.h,n.i,n.g.streaming,i,function(){n.Ib&&o$(n.Ib,!0),n.j&&n.j.Vc(),n.M&&uj(n)},function(e){return n.dispatchEvent(e)}),r=t,o=e,(o=new s$(r.md,r.U()||0<o)).addEventListener("enter",function(e){u9(r,"timelineregionenter",e.region)}),o.addEventListener("exit",function(e){u9(r,"timelineregionexit",e.region)}),o.addEventListener("skip",function(e){var t=e.region;e.seeking||(u9(r,"timelineregionenter",t),u9(r,"timelineregionexit",t))}),(s=new oJ(r.h)).g.add(o),r.bc&&s.g.add(r.bc),t.Ib=s,uN(t,a,Math.max(t.i.minBufferTime,t.g.streaming.rebufferingGoal))},t.g.streaming.startAtSegmentBoundary||(null==(b=t.ka)&&t.i.startTime&&(b=t.i.startTime),y(b)),u){e.u(7);break}if(!t.g.streaming.startAtSegmentBoundary){e.u(8);break}return w=t.i.presentationTimeline,T=t.ka||t.h.currentTime,null==t.ka&&t.i.startTime&&(T=t.i.startTime),x=w.Kb(),S=w.Bb(),T<x?T=x:T>S&&(T=S),M(e,(N=o,j=T,F(function(e){return 1==e.g?(U=N.audio,O=N.video,_=function(e,t){var n,i,r;return F(function(a){return 1==a.g?e?M(a,e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Jb(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},M(e,_(U,j),2)):3!=e.g?(B=e.h,M(e,_(O,j),3)):null!=(V=e.h)&&null!=B?e.return(Math.max(V,B)):null!=V?e.return(V):null!=B?e.return(B):e.return(j)})),9);case 9:A=e.h,y(A);case 8:uQ(t,o,!0,!1,0);case 7:return t.F.ready(),t.qc().find(function(e){return e.active})||((E=iX(t.i.textStreams,t.Hb,t.sd,t.qd)[0]||null)&&o1(t.A.h,E,!0),o&&(E?(function(e,t,n){if(0==e.g.autoShowText)return!1;if(1==e.g.autoShowText)return!0;var i=ix(e.g.preferredTextLanguage);return(n=ix(n.language),2==e.g.autoShowText)?ib(n,i):3==e.g.autoShowText?!!t&&(e=ix(t.language),ib(n,i)&&!ib(e,n)):(en("Invalid autoShowText setting!"),!1)}(t,o.audio,E)&&(t.na=!0),t.na&&t.B.setTextVisibility(!0),u3(t)):t.na=!1),E&&(t.g.streaming.alwaysStreamText||t.wf())&&(sf(t.j,E),u5(t))),M(e,t.j.start(r),10);case 10:t.g.abr.enabled&&(t.o.enable(),u4(t)),u0(t),uJ(t),t.i.variants.some(function(e){return e.primary}),((k=t.U())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.i.serviceDescription||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(I=function(){return uz(t)},t.l.D(a,"timeupdate",I)),k||(D=function(){return uY(t)}
1,t.l.D(a,"timeupdate",D),uY(t),t.i.nextUrl&&(0<t.g.streaming.preloadNextUrlWindow&&(R=function(){var e;return F(function(n){if(1==n.g)return isNaN(e=t.h.duration-t.h.currentTime)||!(e<=t.g.streaming.preloadNextUrlWindow)?n.u(0):(t.l.cb(a,"timeupdate",R),M(n,t.preload(t.i.nextUrl),4));t.ra=n.h,C(n)})},t.l.D(a,"timeupdate",R)),t.l.D(a,"ended",function(){t.load(t.ra||t.i.nextUrl)}))),t.s&&t.s.onManifestUpdated(k),t.Aa=!0,C(e)}})),0)})},"loadInner_"),20);case 20:var b,w,T,x,S,A,E,k=i;if(k.I)for(var I=v(k.I),P=I.next();!P.done;P=I.next())(P=P.value)();k.I=null,m.La&&e7()&&io(m.La)&&(S=m.I,A=m.$,E=m.La,S.g&&S.m instanceof ManagedMediaSource&&(S.B&&S.g.removeChild(S.B),S.B=aC(A,E),S.g.appendChild(S.B),S.g.disableRemotePlayback=!1)),y.u(14);break;case 21:return M(y,s(function(){return F(function(e){var t,i,r,a,o,s,u,l,d,h,p,f,g,y,b;return M(e,(t=m,i=c,r=n,F(function(e){switch(e.g){case 1:if(uS(t,"src-equals"),a=t.h,t.F=new o_(a),o=!1,t.pd.push(function(){o=!0}),null!=t.ka&&t.F.Je(t.ka),t.K=new oz({Od:function(){return a.playbackRate},oc:function(){return a.defaultPlaybackRate},Wf:function(e){a.playbackRate=e},Og:function(e){a.currentTime+=e}}),s=t.g.streaming.rebufferingGoal,uN(t,a,s),a.textTracks&&(uC(t),u=function(){var e=uB(t).find(function(e){return"disabled"!==e.mode});e&&(e.mode="showing")},l=function(){var e=uB(t).find(function(e){return"disabled"!==e.mode});e&&(e.mode="hidden")},t.l.D(a,"enterpictureinpicture",function(){return u()}),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()}),(d=a).webkitSupportsFullscreen&&t.l.D(d,"webkitpresentationmodechanged",function(){"inline"!=d.webkitPresentationMode?u():l()})),uR(t,a,i),!(h=function(e,t,n){try{if(!e.g.enabled)return t;var i=ua(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="a";break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=ud;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r="m";break e}r=void 0}i.ot=r,i.su=!0;var a=uu(i);return ul(t,a)}catch(e){return ei("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(t.O,t.$,r)).includes("#t=")&&(0<t.g.playRangeStart||isFinite(t.g.playRangeEnd))&&(h+="#t=",0<t.g.playRangeStart&&(h+=t.g.playRangeStart),isFinite(t.g.playRangeEnd)&&(h+=","+t.g.playRangeEnd)),!t.I){e.u(2);break}return M(e,t.I.destroy(),3);case 3:t.I=null;case 2:return aD(a),a.src=h,(eZ()||e1())&&a.load(),"none"!=a.preload&&!a.autoplay&&io(r)&&e7()&&a.load(),t.m=lu,t.dispatchEvent(ux("streaming")),p=new ro,oC(a,HTMLMediaElement.HAVE_METADATA,t.l,function(){t.F.ready(),p.resolve()}),oC(a,HTMLMediaElement.HAVE_CURRENT_DATA,t.l,function(){var e,n,i,r,s;return F(function(u){var l,c,d,h;if(1==u.g){return""!=(c=(l=t).g.preferredAudioLanguage)&&l.$g(c,l.g.preferredVariantRole),(e=uB(t)).find(function(e){return"disabled"!=e.mode})?(0<e.length&&(t.na=!0,t.B.setTextVisibility(!0)),u.u(2)):M(u,new Promise(function(e){t.l.va(a.textTracks,"change",e),new ez(e).Z(1)}),2)}if(o)return u.return();for(n=!1,r=(i=v(e)).next();!r.done;r=i.next())"disabled"!==(s=r.value).mode&&(n?(s.mode="disabled",en("Found more than one enabled text track, disabling it",s)):(u_(t,s),n=!0));""!=(h=(d=t).g.preferredTextLanguage)&&d.Qf(h,d.g.preferredTextRole,d.g.preferForcedSubs),C(u)})}),a.error?p.reject(le(t)):"none"==a.preload&&(en('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.va(a,"error",function(){p.reject(le(t))}
1),M(e,Promise.race([p,new Promise(function(e,n){new ez(n).Z(t.g.streaming.loadTimeout)})]),4);case 4:((f=t.U())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(g=function(){return uz(t)},t.l.D(a,"timeupdate",g)),f||(y=function(){return uY(t)},t.l.D(a,"timeupdate",y),uY(t)),t.s&&(t.s.onManifestUpdated(f),f&&(b=t.Rb().end,t.l.D(a,"progress",function(){var e=t.Rb().end;b!=e&&(t.s.onManifestUpdated(t.U()),b=e)}))),t.Aa=!0,C(e)}})),0)})},"srcEqualsInner_"),14);case 14:m.dispatchEvent(ux("loaded"));case 6:if(N(y),!i){y.u(23);break}return M(y,i.destroy(),23);case 23:m.ra=null,j(y,0);break;case 5:if(!(g=L(y))||7e3==g.code){y.u(25);break}return M(y,m.ic(!1),25);case 25:throw g}})},b.ej=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,i=this;return F(function(r){return 1==r.g?M(r,uE(i),2):3!=r.g?(n=r.h,M(r,i.ic(e,t),3)):r.return(n)})},b.tg=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n,i=this;return F(function(r){return 1==r.g?M(r,uE(i,t),2):3!=r.g?(n=r.h,M(r,i.detach(e),3)):r.return(n)})},b.preload=function(e,t,n){t=void 0===t?null:t;var i,r=this;return F(function(a){return 1==a.g?M(a,uk(r,e,t,n),2):((i=a.h)?i.start():u8(r,new eB(2,7,7005)),a.return(i))})},b.Ue=function(){var e,t,n,i,r=this;return F(function(a){for(e=[],n=(t=v(r.re)).next();!n.done;n=t.next())(i=n.value).s||e.push(i.destroy());return r.re=[],M(a,Promise.all(e),0)})},b.Ni=function(){for(var e=this.aa;e.g;)e.release()},b.Ec=function(e){return new rJ(e)},b.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=sL(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(ef("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(ef("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(ef("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&e4(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&"boolean"==typeof e.streaming.liveSync){ef("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(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&&(ef("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&&(ef("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&&(ef("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&&(ef("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&&(ef("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&&(ef("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&&(ef("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.
1streaming&&(ef("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){ef("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}return e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(ef("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&&(ef("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(ef("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&&(ef("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&e.streaming.lowLatencyMode&&(void 0==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),void 0==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01),void 0==e.streaming.segmentPrefetchLimit&&(e.streaming.segmentPrefetchLimit=2),void 0==e.streaming.updateIntervalSeconds&&(e.streaming.updateIntervalSeconds=.1),void 0==e.streaming.maxDisabledTime&&(e.streaming.maxDisabledTime=1),void 0==e.streaming.retryParameters&&(e.streaming.retryParameters={}),void 0==e.streaming.retryParameters.baseDelay&&(e.streaming.retryParameters.baseDelay=100),void 0==e.manifest&&(e.manifest={}),void 0==e.manifest.dash&&(e.manifest.dash={}),void 0==e.manifest.dash.autoCorrectDrift&&(e.manifest.dash.autoCorrectDrift=!1),void 0==e.manifest.retryParameters&&(e.manifest.retryParameters={}),void 0==e.manifest.retryParameters.baseDelay&&(e.manifest.retryParameters.baseDelay=100),void 0==e.drm&&(e.drm={}),void 0==e.drm.retryParameters&&(e.drm.retryParameters={}),void 0==e.drm.retryParameters.baseDelay&&(e.drm.retryParameters.baseDelay=100)),n=sH(this.g,e,uq(this)),uU(this),n},b.getConfiguration=function(){var e=uq(this);return sH(e,this.g,uq(this)),e},b.Dg=function(){return sH(uq(this),this.g,uq(this)),sN(this.g,uq(this))},b.yg=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.Rb().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},b.Ri=function(){for(var e in this.g)delete this.g[e];sH(this.g,uq(this),uq(this)),uU(this)},b.Bg=function(){return this.m},b.mf=function(){return this.i?this.i.type:null},b.Yh=function(){return this.h},b.Ab=function(){return this.G},b.Kc=function(){return this.$},b.xg=function(){return this.s?this.s:null},b.U=function(){return this.i&&!this.Ja()?this.i.presentationTimeline.U():!!this.h&&!!this.h.src&&1/0==this.h.duration},b.uc=function(){return!!this.i&&this.i.presentationTimeline.uc()},b.oi=function(){if(this.i&&!this.Ja()){var e=this.i.variants;return!!e.length&&!e[0].video}return!!this.h&&!!this.h.src&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},b.Rb=function(){if(this.i&&!this.Ja()){if(!this.Aa&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Kb(),end:e.Bb()}}return this.h&&this.h.src&&(e=this.h.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},b.li=function(){this.U()&&(this.h.currentTime=this.Rb().end)},b.pi=function(){return this.Aa},b.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},b.drmInfo=function(){return this.C?this.C.g:null},b.ed=function(){return this.C?this.C.ed():1/0},b.kf=function(){return this.C?this.C.kf():[]},b.Nd=function(){return this.C?this.C.Nd():{}},b.uf=function(){return!!this.M&&this.M.g==rt},b.ib=function(){return this.h?this.K?this.K.i:1:0},b.zd=function(e,t){var n=this;t=void 0===t||t,0==e?en("A trick play rate of 0 is unsupported!"):(this.Ha.Va(),this.h.paused&&this.h.play(),this.K.set(e),this.m==ls&&
1(this.o.playbackRateChanged(e),sh(this.j,t&&1<Math.abs(e))),this.U()&&this.Ha.D(this.h,"timeupdate",function(){var t=n.h.currentTime,i=n.Rb(),r=n.g.streaming.safeSeekOffset;0<e?Math.floor(t)>=Math.floor(i.end)&&n.Yc():Math.floor(t)<=Math.floor(i.start+r)&&n.Yc()}))},b.Yc=function(){var e=this.K.oc();this.m==lu&&this.K.set(e),this.m==ls&&(this.K.set(e),this.o.playbackRateChanged(e),sh(this.j,!1)),this.Ha.Va()},b.rc=function(){if(this.i&&!this.Ja()){for(var e=this.j?this.j.j:null,t=[],n=0,i=v(this.i.variants),r=i.next();!r.done;r=i.next())if(iK(r=r.value)){var a=iO(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 iH(e)}):[]},b.qc=function(){if(this.i&&!this.Ja()){for(var e=this.j?this.j.s:null,t=[],n=v(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=i_(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?uB(this).map(function(e){return iV(e)}):[]},b.Sh=function(){var e=this.ud;return this.i&&(e=this.i.imageStreams),e.map(function(e){return iB(e)})},b.Jh=function(e){var t,n,i,r,a=this;return F(function(o){return 1==o.g?a.m!=ls&&a.m!=lu?o.return(null):(t=a.ud,a.i&&(t=a.i.imageStreams),(n=t.find(function(t){return t.id==e}))?n.segmentIndex?o.u(2):M(o,n.createSegmentIndex(),2):o.return(null)):4!=o.g?(i=[],n.segmentIndex.yb(function(t){var r=uO(t.tilesLayout||n.tilesLayout);if(r){r=r.rows*r.lc;for(var o=t.j-t.startTime,s=0;s<r;s++)i.push(a.Fg(e,t.startTime+o*s/r))}}),M(o,Promise.all(i),4)):(r=o.h,o.return(r.filter(function(e){return e})))})},b.Fg=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w=this;return F(function(T){return 1==T.g?w.m!=ls&&w.m!=lu?T.return(null):(n=w.ud,w.i&&(n=w.i.imageStreams),(i=n.find(function(t){return t.id==e}))?i.segmentIndex?T.u(2):M(T,i.createSegmentIndex(),2):T.return(null)):null!=(r=i.segmentIndex.find(t))&&(o=uO((a=i.segmentIndex.get(r)).tilesLayout||i.tilesLayout))?(s=i.width||0,u=i.height||0,l=s/o.lc,c=u/o.rows,d=o.lc*o.rows,h=a.j-a.startTime,p=a.A||h/d,f=a.startTime,m=g=0,1<d&&(v=Math.floor((t-a.startTime)/p),f=a.startTime+v*p,g=v%o.lc*l,m=Math.floor(v/o.lc)*c),y=!1,(b=a.thumbnailSprite)&&(y=!0,c=b.height,g=b.positionX,m=b.positionY,l=b.width),T.return({segment:a,imageHeight:u,imageWidth:s,height:c,positionX:g,positionY:m,startTime:f,duration:p,uris:a.N(),width:l,sprite:y})):T.return(null)})},b.ah=function(e){var t;if((!this.i||!this.F||((t=this.i.textStreams.find(function(t){return t.id==e.id}))&&t!=this.j.s&&(o1(this.A.h,t,!1),sf(this.j,t),u2(this),u5(this),this.Hb=t.language),this.Ja()))&&this.h&&this.h.textTracks){var n=uB(this),i=n.find(function(e){return"disabled"!==e.mode});(n=n.find(function(t){return iF(t)===e.id}
1))&&(i!==n&&(i&&(i.mode="disabled",this.l.cb(i,"cuechange"),this.B.remove(0,1/0)),n&&u_(this,n)),u2(this),u5(this))}},b.Rf=function(e,t,n){var i=this;if(t=void 0!==t&&t,n=void 0===n?0:n,(!this.i||!this.F||(function(){var r=i.i.variants.find(function(t){return t.id==e.id});if(r&&iK(r)){var a=i.j.j;i.g.abr.enabled&&(a.video!=r.video||a.audio&&r.audio&&a.audio.language==r.audio.language&&a.audio.channelsCount==r.audio.channelsCount)&&en("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack()."),i.Ja()?uQ(i,r,!1,!1,0):uQ(i,r,!1,t||!1,n||0),i.Ba=new i8(r,i.g.mediaSource.codecSwitchingStrategy),uJ(i)}}(),this.Ja()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks);r=v(r);for(var a=r.next();!a.done;a=r.next())if(iF(a=a.value)==e.id){uZ(i,a);break}}},b.Lh=function(){return lr(this.rc())},b.ei=function(){return lr(this.qc())},b.Kh=function(){return Array.from(li(this.rc()))},b.di=function(){return Array.from(li(this.qc()))},b.$g=function(e,t,n,i,r){var a=this;if(n=void 0===n?0:n,i=void 0===i?0:i,r=void 0===r?"":r,(!this.i||!this.F||(function(){function o(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}a.Ba=new i9(e,t||"",n||0,"",!1,"","","",a.g.mediaSource.codecSwitchingStrategy,r||"");var s=a.j.j,u=a.Ba.create(a.i.variants),l=null;u=v(u.values());for(var c=u.next();!c.done;c=u.next())iK(c=c.value)&&(!l||o(l,s)>o(c,s))&&(l=c);l!=s&&(l?(s=iO(l),a.Rf(s,!0,i||0)):u$(a))}(),this.Ja()))&&a.h&&a.h.audioTracks){var o=iX(a.rc(),e,t||"",!1)[0];o&&a.Rf(o)}},b.Qf=function(e,t,n){var i,r;n=void 0!==n&&n,(!this.i||!this.F||(this.Hb=e,this.sd=t||"",this.qd=n||!1,(i=iX(this.i.textStreams,this.Hb,this.sd,this.qd)[0]||null)&&i!=this.j.s&&(o1(this.A.h,i,!1),this.g.streaming.alwaysStreamText||this.wf())&&(sf(this.j,i),u2(this),u5(this)),this.Ja()))&&(r=iX(this.qc(),e,t||"",n||!1)[0])&&this.ah(r)},b.Xi=function(e,t,n){var i=this;if(t=void 0===t||t,n=void 0===n?0:n,(!this.i||!this.F||(function(){for(var r=null,a=v(i.i.variants),o=a.next();!o.done;o=a.next())if((o=o.value).audio.label==e){r=o;break}null!=r&&(i.Ba=new i9(r.language,"",0,"",!1,"",e,"",i.g.mediaSource.codecSwitchingStrategy,""),u$(i,t,n))}(),this.Ja()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks),a=null;r=v(r);for(var o=r.next();!o.done;o=r.next())(o=o.value).label==e&&(a=o);a&&uZ(i,a)}},b.wf=function(){var e=this.na;return this.B?this.B.isTextVisible():e},b.zg=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?uF(this).map(function(e){return iV(e)}):[]},b.Nh=function(e){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var t=ix(e),n=uF(this).filter(function(e){return ix(e.language)==t});if(!n||!n.length)return[];e=[];var i=new Set;n=v(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&r.cues){r=v(r.cues);for(var a=r.next();!a.done;a=r.next()){var o=a.value;(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime},i.has(a)||(e.push(o),i.add(a))}}return e},b.hh=function(e){var t,n;e=!!e,this.na!=e&&(this.na=e,this.m==ls?(this.B.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.s||0<(e=iX(this.i.textStreams,this.Hb,this.sd,this.qd)).length&&(sf(this.j,e[0]),u2(this),u5(this)):((n=(t=this.j).i.get(n2))&&(sI(n),sM(n).catch(function(){}),t.C=t.i.get(n2),t.i.delete(n2)),t.s=null))):this.h&&this.h.src&&this.h.textTracks&&this.B.setTextVisibility(e),u3(this))},b.$h=function(){if(this.F)var e=this.F.Cd();else{if(null==this.ka)return new Date;e=this.ka}if(this.i&&!this.Ja()){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},b.Eg=function(){if(this.i&&!this.Ja()){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},b.Pd=function(){return this.U()&&this.i?this.i.presentationTimeline.Pd():null},b.zb=function(){if(this.m==ls)return this.I.zb();var e={total:[],audio:[],video:[],text:[]};return this.m==lu&&(e.total=aI(this.h.buffered)),e},b.getStats=function(){if(this.m!=ls&&this.m!=lu)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:[]};uW(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.U()){var n=this.A;
1t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.F&&(this.A.S=this.F.hg(),this.A.V=this.F.ig()),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==ls){if(n=this.j.j,t=this.j.s,n){var r=(i=this.K?this.K.i: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.U()&&(n=this.Eg().valueOf()+1e3*e.currentTime,this.A.B=(Date.now()-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==lu&&((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.V,u=a.S,l=a.s,c=a.i,d=a.C,h=a.H,p=a.j,f=oZ(a.g,"playing"),g=oZ(a.g,"paused"),m=oZ(a.g,"buffering"),y=a.o,b=a.B,w=a.I,T=a.Kg,x=a.kc,S=a.K,A=a.G,E=a.F,k=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=v(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(a.g),I=[];a=v(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:u,estimatedBandwidth:l,completionPercent:c,loadLatency:d,manifestTimeSeconds:h,drmTimeSeconds:p,playTime:f,pauseTime:g,bufferingTime:m,licenseTime:y,liveLatency:b,maxSegmentDuration:w,manifestSizeBytes:T,bytesDownloaded:x,nonFatalErrorCount:S,manifestPeriodCount:A,manifestGapCount:E,stateHistory:k,switchHistory:I}},b.xh=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,p=this;return F(function(f){switch(f.g){case 1:if(p.m!=ls&&p.m!=lu)throw new eB(1,7,7004);if("subtitles"!=n&&"captions"!=n&&en("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){f.u(2);break}return M(f,uV(p,e),3);case 3:i=f.h;case 2:if(s=[],p.s&&(s=p.s.getCuePoints()),p.m!=lu){f.u(4);break}return o&&(n="forced"),M(f,uH(p,e,t,n,i,a||"",s),5);case 5:if(u=ix(t),l=p.qc().find(function(e){return ix(e.language)==u&&e.label==(a||"")&&e.kind==n}))return u0(p),f.return(l);throw new eB(1,2,2012);case 4:if(c=n3,d=p.h.duration,p.i&&(d=p.i.presentationTimeline.getDuration()),1/0==d)throw new eB(1,4,4033);if(!s.length){f.u(6);break}return M(f,uG(p,e,p.G,p.g.streaming.retryParameters),7);case 7:e=oT(new Blob([uK(p,f.h,i,s)],{type:"text/vtt"})),i="text/vtt";case 6:if(h={id:p.fg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:oq(0,d,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:c.wa,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([n8(i||"",r||"")]),isAudioMuxedInVideo:!1},!id(n8(h.mimeType,h.codecs)))throw new eB(2,2,2014,i);return p.i.textStreams.push(h),u0(p),f.return(i_(h))}})},b.yh=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w=this;return F(function(T){switch(T.g){case 1:if(w.m!=ls&&w.m!=lu)throw new eB(1,7,7004);if(t){T.u(2);break}return M(T,uV(w,e),3);case 3:t=T.h;case 2:if("text/vtt"!=t)throw new eB(1,2,2017,e);if(n=n3,i=w.h.duration,w.i&&(i=w.i.presentationTimeline.getDuration()),1/0==i)throw new eB(1,4,4045);return M(T,uG(w,e,w.G,w.g.streaming.retryParameters),4);case 4:if(r=T.h,!(a=ip[t]))throw new eB(2,2,2014,t);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:i,vttOffset:0},u=eA(r),l=o.parseMedia(u,s,e,[]),c=[],h=(d=v(l)).next(),p={};!h.done;p={ze:void 0,Fc:void 0},h=d.next())p.Fc=h.value,p.ze=null,f=function(t){return function(){return null==t.ze&&(t.ze=nJ([e],[t.Fc.payload])),t.ze||[]}}(p),g=new aw(p.Fc.startTime,p.Fc.endTime,f,0,null,null,0,0,1/0),p.Fc.payload.includes("#xywh")&&4===(m=p.Fc.payload.split("#xywh=")[1].split(",")).length&&g.qe({height:parseInt(m[3],10),positionX:parseInt(m[0],10),positionY:parseInt(m[1],10),width:parseInt(m[2],10)}),c.push(g);
1if(y=t,!c.length){T.u(5);break}return M(T,s2(c[0].N()[0],w.G,w.g.manifest.retryParameters),6);case 6:y=T.h;case 5:return b={id:w.fg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new oG(c),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Ie,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([n8(y||"","")]),isAudioMuxedInVideo:!1},w.m==lu?w.ud.push(b):w.i.imageStreams.push(b),u0(w),T.return(iB(b))}})},b.wh=function(e,t,n){var i,r,a,o=this;return F(function(s){switch(s.g){case 1:if(o.m!=ls&&o.m!=lu)throw new eB(1,7,7004);if(n){s.u(2);break}return M(s,uV(o,e),3);case 3:n=s.h;case 2:return i=[],o.s&&(i=o.s.getCuePoints()),M(s,uH(o,e,t,"chapters",n,"",i),4);case 4:if(r=s.h,!(a=o.zg().find(function(e){return e.language==t}))){s.u(5);break}return M(s,new Promise(function(e,t){o.l.va(r,"load",e),o.l.va(r,"error",function(){t(new eB(1,2,2015))})}),6);case 6:return u0(o),s.return(a);case 5:throw new eB(1,2,2012)}})},b.bj=function(e,t){this.ja.width=e,this.ja.height=t},b.Of=function(e){if(this.m==ls){var t=this.j;if(e=void 0===e?.1:e,t.m.g)t=!1;else if(t.A)t=!1;else{for(var n=v(t.i.values()),i=n.next();!i.done;i=n.next())!(i=i.value).jd||i.Ea||i.eb||(i.jd=!1,sk(t,i,e));t=!0}}else t=!1;return t},b.lf=function(){return en("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},b.Vh=function(){return this.Na},b.Qh=function(){var e={video:null,audio:null,text:null};if(this.m!=ls)return e;var t=this.j.j,n=this.h.currentTime;t=v([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==n2&&(e.text=r)}return e},b.kh=function(e){this.ie=e},b.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===la||!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=v(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))}return(!!n||!i)&&(this.le.Ra(1),u$(this,!1,t=this.zb().video.reduce(function(e,t){return e+t.end-t.start},0),!0,!1),!0)}return!1},b.addFont=function(t,n){var i,r,a,o;return F(function(s){if(1==s.g)return"fonts"in document&&"FontFace"in e?M(s,document.fonts.ready,3):s.u(0);if(!("entries"in document.fonts))return s.return();for(r=(i=v(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();!r.done;r=i.next())if((a=r.value).family==t&&"swap"==a.display)return s.return();o=new FontFace(t,"url("+n+")",{display:"swap"}),document.fonts.add(o),C(s)})},b.Ja=function(){return!!this.h&&!!this.h.remote&&"disconnected"!=this.h.remote.state},z("shaka.Player",uw),uw.prototype.isRemotePlayback=uw.prototype.Ja,uw.prototype.addFont=uw.prototype.addFont,uw.prototype.setVideoContainer=uw.prototype.kh,uw.prototype.getFetchedPlaybackInfo=uw.prototype.Qh,uw.prototype.getManifestParserFactory=uw.prototype.Vh,uw.prototype.getManifest=uw.prototype.lf,uw.prototype.retryStreaming=uw.prototype.Of,uw.prototype.setMaxHardwareResolution=uw.prototype.bj,uw.prototype.addChaptersTrack=uw.prototype.wh,uw.prototype.addThumbnailsTrack=uw.prototype.yh,uw.prototype.addTextTrackAsync=uw.prototype.xh,uw.prototype.getStats=uw.prototype.getStats,uw.prototype.getBufferedInfo=uw.prototype.zb,uw.prototype.getSegmentAvailabilityDuration=uw.prototype.Pd,uw.prototype.getPresentationStartTimeAsDate=uw.prototype.Eg,uw.prototype.getPlayheadTimeAsDate=uw.prototype.$h,uw.prototype.setTextTrackVisibility=uw.prototype.hh,uw.prototype.getChapters=uw.prototype.Nh,uw.prototype.getChaptersTracks=uw.prototype.zg,uw.prototype.isTextTrackVisible=uw.prototype.wf,uw.prototype.selectVariantsByLabel=uw.prototype.Xi,uw.prototype.selectTextLanguage=uw.prototype.Qf,uw.prototype.selectAudioLanguage=uw.prototype.$g,uw.prototype.getTextLanguages=uw.prototype.di,uw.prototype.getAudioLanguages=uw.prototype.Kh,uw.prototype.getTextLanguagesAndRoles=uw.prototype.ei,uw.prototype.getAudioLanguagesAndRoles=uw.prototype.Lh,uw.prototype.selectVariantTrack=u
1w.prototype.Rf,uw.prototype.selectTextTrack=uw.prototype.ah,uw.prototype.getThumbnails=uw.prototype.Fg,uw.prototype.getAllThumbnails=uw.prototype.Jh,uw.prototype.getImageTracks=uw.prototype.Sh,uw.prototype.getTextTracks=uw.prototype.qc,uw.prototype.getVariantTracks=uw.prototype.rc,uw.prototype.cancelTrickPlay=uw.prototype.Yc,uw.prototype.trickPlay=uw.prototype.zd,uw.prototype.getPlaybackRate=uw.prototype.ib,uw.prototype.isBuffering=uw.prototype.uf,uw.prototype.getKeyStatuses=uw.prototype.Nd,uw.prototype.getActiveSessionsMetadata=uw.prototype.kf,uw.prototype.getExpiration=uw.prototype.ed,uw.prototype.drmInfo=uw.prototype.drmInfo,uw.prototype.keySystem=uw.prototype.keySystem,uw.prototype.isFullyLoaded=uw.prototype.pi,uw.prototype.goToLive=uw.prototype.li,uw.prototype.seekRange=uw.prototype.Rb,uw.prototype.isAudioOnly=uw.prototype.oi,uw.prototype.isInProgress=uw.prototype.uc,uw.prototype.isLive=uw.prototype.U,uw.prototype.getAdManager=uw.prototype.xg,uw.prototype.getAssetUri=uw.prototype.Kc,uw.prototype.getNetworkingEngine=uw.prototype.Ab,uw.prototype.getMediaElement=uw.prototype.Yh,uw.prototype.getManifestType=uw.prototype.mf,uw.prototype.getLoadMode=uw.prototype.Bg,uw.prototype.resetConfiguration=uw.prototype.Ri,uw.prototype.getBufferFullness=uw.prototype.yg,uw.prototype.getNonDefaultConfiguration=uw.prototype.Dg,uw.prototype.getConfiguration=uw.prototype.getConfiguration,uw.prototype.configure=uw.prototype.configure,uw.prototype.releaseAllMutexes=uw.prototype.Ni,uw.prototype.destroyAllPreloads=uw.prototype.Ue,uw.prototype.preload=uw.prototype.preload,uw.prototype.detachAndSavePreload=uw.prototype.tg,uw.prototype.unloadAndSavePreload=uw.prototype.ej,uw.prototype.load=uw.prototype.load,uw.prototype.updateStartTime=uw.prototype.ij,uw.prototype.unload=uw.prototype.ic,uw.prototype.detach=uw.prototype.detach,uw.prototype.attachCanvas=uw.prototype.Ch,uw.prototype.attach=uw.prototype.Ub,uw.probeSupport=function(e){var t,n,i,r,a,o,s;return e=void 0===e||e,F(function(u){switch(u.g){case 1:var l,c,d,h,p,f,g,m,b,w,T,x,S,A,E,k,I,R,N,j,U,O,_,B,V,H,G;if(t={},!e){u.u(2);break}return M(u,F(function(e){if(1==e.g){for(l="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" "),d={"com.widevine.alpha":c=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":c,"com.microsoft.playready.recommendation":["150","2000","3000"]},f={videoCapabilities:h=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:p=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},g=[null,"cenc","cbcs","cbcs-1-9"],m=new Map,b=function(e,t){var n,i,r,a,o,s,u,l;return F(function(c){switch(c.g){case 1:return D(c,2),M(c,t.createMediaKeys(),4);case 4:P(c,3);break;case 2:return L(c),c.return();case 3:i=!!(n=t.getConfiguration().sessionTypes)&&n.includes("persistent-license"),e0()&&(i=!1),r=t.getConfiguration().videoCapabilities,a=t.getConfiguration().audioCapabilities,o={persistentState:i,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},m.has(e)&&m.get(e)?o=m.get(e):m.set(e,o),(s=r[0].encryptionScheme)&&!o.encryptionSchemes.includes(s)&&o.encryptionSchemes.push(s),(u=r[0].robustness)&&!o.videoRobustnessLevels.includes(u)&&o.videoRobustnessLevels.push(u),(l=a[0].robustness)&&!o.audioRobustnessLevels.includes(l)&&o.audioRobustnessLevels.push(l),C(c)}})},w=function(e,t,n,i){var r,a,o,s,u,l,c,d,h,p;return F(function(g){switch(g.g){case 1:for(D(g,2),o=(a=v((r=tE(f)).videoCapabilities)).next();!o.done;o=a.next())(s=o.value).encryptionScheme=t,s.robustness=n;for(l=(u=v(r.audioCapabilities)).next();!l.done;l=u.next())(c=l.value).encryptionScheme=t,c.robustness=i;return(d=tE(r)).persistentState="required",d.sessionTypes=["persistent-license"],h=[d,r],M(g,navigator.requestMediaKeySystemAccess(e,h),4);case 4:return p=g.h,M(g,b(e,p),5);case 5:P(g,0);break;case 2:L(g),C(g)}})},T=function(e,t,n,i){var r,a;return F(function(o){switch(o.g){case 1:return D(o,2),r={type:"media-source",video:{contentType:h[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:p[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:e,video:{encryptionScheme:t,robustness:n},audio:{encryptionScheme:t,robustness:i}}},M(o,navigator.mediaCapabilities.decodingInfo(r),4);case 4:return a=o.h.keySystemAccess,M(o,b(e,a),5);case 5:P(o,0);break;case 2:L(o),C(o)}})},S=(x=v(l)).next();!S.done;S=x.next())A=S.value,m.set(A,null);for(E=[],I=(k=v(g)).next();!I.done;I=k.next())for(R=I.value,j=(N=v(l)).next();!j.done;j=N.next())"org.w3.clearkey"===(U=j.value)&&e7()||(E.push(w(U,R,"","")),E.push(T(U,R,"","")));for(_=(O=v(l)).next();!_.done;_=O.next())for(H=(V=v(d[B=_.value]||[])).next();!H.done;H=V.next())G=H.value,E.push(w(B,null,G,"")),E.push(w(B,null,"",G)),E.push(T(B,null,G,"")),E.push(T(B,null,"",G));return M(e,Promise.all(E),2)}return e.return(rL(m))}),3);case 3:t=u.h;case 2:var K={};if(eY())for(var q in ag)K[q]=!0;
1q=v(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var X=q.next();!X.done;X=q.next())K[X=X.value]=eY()?!!ag[X]:eJ(X);for(n=K,q='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(y(il)),K={},X=(q=v(q)).next();!X.done;X=q.next()){K[X=X.value]=!!id(X)||(eY()?ec(X)||!!nT(X):eJ(X));var W=X.split(";")[0];K[W]=K[W]||K[X]}return i=K,M(u,to(),4);case 4:for(s in r=u.h,a={manifest:n,media:i,drm:t,hardwareResolution:r},o=ll)a[s]=o[s]();return u.return(a)}})},uw.isBrowserSupported=function(){if(e.Promise||en("A Promise implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||ti("Trident/"))return!1;var t=e7();return(!t||!(9>t))&&!!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)&&(!!eY()||eJ("application/x-mpegurl"))},uw.setAdManagerFactory=function(e){lc=e},uw.registerSupportPlugin=function(e,t){ll[e]=t},uw.prototype.destroy=uw.prototype.destroy;var la=0,lo=1,ls=2,lu=3;uw.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3},uw.version="v4.12.2";ev=new function(e){this.g=e,this.i=eg,this.h=em}(new ep(Number("4"),Number("12")));var ll={},lc=null;function ld(){this.g=[],this.i=this.l=this.j=this.h=0}function lh(e,t,n){var i=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new es,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function lp(){}function lf(e,t){var n=[],i=0;null!=t&&(i=t),e=v(tP(e,"Ad"));for(var r=e.next();!r.done;r=e.next())if((r=tU(r.value,"InLine"))&&(r=tU(r,"Creatives"))){r=v(tP(r,"Creative"));for(var a=r.next();!a.done;a=r.next()){var o=tU(a.value,"Linear");if(o&&(a=null,o.attributes.skipoffset&&isNaN(a=tS(o.attributes.skipoffset))&&(a=null),o=tU(o,"MediaFiles"))){var s=tP(o,"MediaFile");for(o=s,(s=s.filter(function(e){return"streaming"==e.attributes.delivery})).length&&(o=s),s=(o=v(o=o.sort(function(e,t){return(parseInt(t.attributes.height,10)||0)-(parseInt(e.attributes.height,10)||0)}
1))).next();!s.done;s=o.next())if(s=tL(s.value)){n.push({id:null,startTime:i,endTime:null,uri:s,isSkippable:null!=a,skipOffset:a,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==t,post:1/0==t,timelineRange:!1});break}}}}return n}function lg(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 es,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.12.2"),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 rp("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 rp("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[],r=v(r);for(var a=r.next();!a.done;a=r.next())n.push({start:a.value,end:null});t.l(new rp("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 rp(t,e))}o.h.D(o.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){lm(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){ly(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.STARTED,function(e){ly(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){lb(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){lb(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,lv(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.D(t.i,"loadeddata",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,lv(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in e?(t.A=new ResizeObserver(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,lv(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),t.A.observe(t.i)):t.h.D(document,"fullscreenchange",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,lv(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),t.F||t.o.skipPlayDetection?t.g.start():t.h.va(t.i,"play",function(){t.F=!0,t.g.start()})}catch(e){lb(t,null)}}(o,t)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){lm(o,e)}),this.h.D(this.i,"ended",function(){o.m.contentComplete()}),this.h.va(this.i,"play",function(){o.F=!0})}function lm(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.l(new rp("ad-error",t)),lb(e,null),e.l(new rp("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function lv(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function ly(e,t){var n=t.getAd();n?(e.j=new lh(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new rp("ad-content-pause-requested")),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new rp("ad-started",t)),e.j.isLinear()&&(e.s.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):en("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function lb(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new rp("ad-content-resume-requested")),e.l(new rp("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 lw(e,t,n,i,r,a,o,s){this.g=e,this.h=(this.i=t)?n||0:n,this.j=i,this.o=r,this.s=a,this.l=o,this.m=s}function lT(e,t,n,i){function r(){if(!a.H&&a.j&&!a.A.Ja()){a.j=a.g.currentTime,a.C&&!a.C.pre&&!a.C.post&&a.j<a.C.startTime&&(a.C=null);var e=lA(a,!1,0,a.C);e&&lE(a,e,1,1,Date.now())}}var a=this;if(this.L=null,this.G=e,this.A=t,this.g=n,this.F=null,this.o=!0,this.l=this.g,this.i=i,this.I=new Set,this.B=new Set,this.s=new Map,this.h=new uw,lI(this),this.M=new es,this.m=new es,this.H=!1,this.C=this.j=null,this.M.D(this.g,"timeupdate",function(){if(!(a.H||a.j||a.A.Ja())){a.j=a.g.currentTime;var e=lA(a,!0,0,a.C);e&&lE(a,e,1,1,Date.now())}}),this.K=new ez(r),"requestVideoFrameCallback"in this.g&&!tn()){var o=this.g,s=function(){r(),o.requestVideoFrameCallback(s)};o.requestVideoFrameCallback(s)}else this.K.Ra(.025);this.O=new ez(function(){var e,t,n,i,r,o,s,u,l,c,d;return F(function(h){switch(h.g){case 1:if(!a.B.size||null==a.j){h.u(0);break}if((e=a.A.Bg())==la||e==lo)return h.return();t=!1,n=Array.from(a.B),i=a.A.Rb(),o=(r=v(n)).next();case 3:if(o.done){h.u(5);break}if((s=o.value)==a.C){h.u(4);break}if(u=s.endTime||s.startTime,!(1<=i.start-u)){0<(l=s.startTime-a.j)&&10>=l&&(a.s.has(s)||a.s.set(s,a.h.preload(s.uri))),h.u(4);break}if(!a.s.has(s)){h.u(7);break}return M(h,a.s.get(s),8);case 8:(c=h.h)&&c.destroy(),a.s.delete(s);
1case 7:d=JSON.stringify(s),a.I.has(d)&&a.I.delete(d),a.B.delete(s),t=!0;case 4:o=r.next(),h.u(3);break;case 5:t&&lk(a),C(h)}})}).Ra(1)}function lx(e){if(e.G&&e.L&&!e.H){var t=e.L.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.o==t&&(e.o=!t,e.o?(e.l=e.g,e.F&&(e.F.parentElement&&e.G.removeChild(e.F),e.F=null)):(e.F||((t=document.createElement(e.g.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.backgroundColor="rgb(0, 0, 0)",t.setAttribute("playsinline",""),e.F=t),e.l=e.F))}}function lS(e,t){var n=!1;t=v(t);for(var i=t.next();!i.done;i=t.next()){var r=(i=i.value).id||JSON.stringify(i);if(!e.I.has(r)){if(n=!0,e.I.add(r),e.B.add(i),r=!1,i.pre&&null==e.j)r=!0;else if(0!=i.startTime||i.canJump){if(null!=e.j){var a=i.startTime-e.j;0<a&&10>=a&&(r=!0)}}else r=!0;r&&(e.s.has(i)||e.s.set(i,e.h.preload(i.uri)))}}n&&lk(e)}function lA(e,t,n,i){var r=0,a=null;if(e.B.size&&null!=e.j){var o=e.g.ended,s=Array.from(e.B).sort(function(e,t){return t.startTime-e.startTime});s=v(s);for(var u=s.next();!u.done;u=s.next()){u=u.value;var l=!1;if(t)l=u.pre;else if(o)l=u.post;else if(!u.pre&&!u.post){var c=e.j-Math.round(1e3*u.startTime)/1e3;0<c&&(1>=c||!u.canJump)&&(l=!i||!!i.pre||!!i.post||!(i.startTime>=u.startTime))}if(l){if(r==n){a=u;break}r++}}}return a}function lE(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,x;a=void 0===a?0:a,F(function(S){switch(S.g){case 1:if(lx(e),e.C=t,o=Date.now(),!e.l.parentElement&&e.G&&e.G.appendChild(e.l),1==i&&1==n&&(n=Array.from(e.B).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||t.pre)&&(a++,e.B.delete(t),lk(e)),e.H=!0,!e.o||1!=i){S.u(2);break}return e.i(new rp("ad-content-pause-requested",(new Map).set("saveLivePosition",!0))),s=new ro,u=function(t){return F(function(n){if(1==n.g)return"detach"!=t.state?n.u(0):tn()?M(n,new Promise(function(e){return new ez(e).Z(.1)}),3):n.u(3);s.resolve(),e.m.cb(e.A,"onstatechange",u),C(n)})},e.m.D(e.A,"onstatechange",u),M(S,s,2);case 2:return e.o||(e.g.pause(),null!=t.resumeOffset&&0!=t.resumeOffset&&(e.g.currentTime+=t.resumeOffset)),l=!1,c=null,d=function(){if(!e.o&&null==t.resumeOffset)if(t.timelineRange&&t.endTime&&1/0!=t.endTime)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var n=Date.now();e.g.currentTime+=(n-r)/1e3,r=n}},h=function(){var o,s;return F(function(u){if(1==u.g)return d(),c&&c.stop(),(o=lA(e,t.pre,i-a))?(e.i(new rp("ad-stopped")),e.m.Va(),lE(e,o,n,++i,r,a),u.u(0)):e.o?M(u,e.h.detach(),4):M(u,e.h.ic(),4);e.o&&(null==(s=t.resumeOffset)&&(s=t.timelineRange&&t.endTime&&1/0!=t.endTime?t.endTime-(e.j||0):(Date.now()-r)/1e3),e.i(new rp("ad-content-resume-requested",(new Map).set("offset",s)))),e.i(new rp("ad-stopped")),e.m.Va(),e.H=!1,e.o?lk(e):(d(),e.g.ended||e.g.play()),lx(e),C(u)})},p=function(t){return F(function(n){return l?n.return():(l=!0,e.i(new rp("ad-error",(new Map).set("originalEvent",t))),M(n,h(),0))})},f=function(){return F(function(t){if(1==t.g)return l?t.return():(l=!0,M(t,h(),2));e.i(new rp("ad-complete")),C(t)})},g=function(){return F(function(t){return l?t.return():(l=!0,e.i(new rp("ad-skipped")),M(t,h(),0))})},m=new lw(e.l,t.isSkippable,t.skipOffset,t.skipFor,g,n,i,!e.o),e.o||(m.setMuted(e.g.muted),m.setVolume(e.g.volume)),e.i(new rp("ad-started",(new Map).set("ad",m))),(v=m.canSkipNow())&&e.i(new rp("ad-skip-state-changed")),y=new Set,e.m.va(e.h,"error",p),e.m.D(e.l,"timeupdate",function(){var t=e.l.duration;if(t){var n=m.canSkipNow();v!=n&&0<m.getRemainingTime()&&0<m.getDuration()&&e.i(new rp("ad-skip-state-changed")),v=n,25<=(t=100*e.l.currentTime/t)&&!y.has("firstquartile")?(d(),e.i(new rp("ad-first-quartile")),y.add("firstquartile")):50<=t&&!y.has("midpoint")?(d(),e.i(new rp("ad-midpoint")),y.add("midpoint")):75<=t&&!y.has("thirdquartile")&&(d(),e.i(new rp("ad-third-quartile")),y.add("thirdquartile"))}}),e.m.va(e.h,"complete",f),e.m.D(e.l,"play",function(){e.i(new rp("ad-resumed"))}),e.m.D(e.l,"pause",function(){var t=e.h.getConfiguration();e.l.currentTime>=t.playRangeEnd?f():e.i(new rp("ad-paused"))}),e.m.D(e.l,"volumechange",function(){e.l.muted?e.i(new rp("ad-muted")):e.i(new rp("ad-volume-changed"))}),D(S,4),lI(e),t.startTime&&t.endTime&&1/0!=t.endTime&&t.startTime!=t.endTime&&0<(b=t.endTime-t.startTime)&&e.h.configure("playRangeEnd",b),t.playoutLimit&&(c=new ez(function(){m.skip()}).Z(t.playoutLimit),e.h.configure("playRangeEnd",t.playoutLimit)),M(S,e.h.Ub(e.l),6);case 6:return e.s.has(t)?M(S,e.s.get(t),10):M(S,e.h.load(t.uri),8);case 10:return w=S.h,e.s.delete(t),w?M(S,e.h.load(w),8):M(S,e.h.load(t.uri),8);case 8:t.playoutLimit&&(c&&c.stop(),c=new ez(function(){m.skip()}).Z(t.playoutLimit)),T=(Date.now()-o)/1e3,e.i(new rp("ads-loaded",(new Map).set("loadTime",T))),e.o&&e.g.play(),P(S,0);break;case 4:x=L(S),p(x),C(S)}})}function lk(e){for(var t=[],n=v(e.B),i=n.next(),r={};!i.done;r={Tb:void 0},i=n.next())i=i.value,r.Tb={start:i.startTime,end:null},i.pre?(r.Tb.start=0,r.Tb.end=null):i.post?(r.Tb.start=-1,r.Tb.end=null):i.timelineRange&&(r.Tb.end=i.endTime),t.find(function(e){return function(t){return e.Tb.start==t.start&&e.Tb.end==t.end}}(r))||t.push(r.Tb);e.i(new rp("ad-cue-points-changed",(new Map).set("cuepoints",t)))}function lI(e){e.h.configure(e.A.Dg()),e.h.configure("ads.disableHLSInterstitial",!0),e.h.configure("ads.disableDASHInterstitial",!0);var t=e.h.Ab();t.og(),t.pg(),rT(e.A.Ab(),t)}function lM(e,t,n){var i,r;return F(function(a){return 1==a.g?(i=rx([t],ra()),M(a,e.A.Ab().request(7,i,n).promise,2)):(r=a.h,a.return(r.data))})}function lC(e,t,n,i,r){this.h=e,this.j=tS(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}function lD(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.S=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 es}function lR(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function lP(e){var t=e.h.currentTime;
1if(0!=t&&null==e.A){for(var n,i,r=v(e.j),a=r.next();!a.done;a=r.next()){a=a.value;for(var o=v(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 lL(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"),lU(e,"firstQuartile")):t>=r&&!e.s.includes("midpoint")?(e.s.push("midpoint"),lU(e,"midpoint")):t>=a&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),lU(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&lU(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&lN(e)}if(!e.g||!e.g.isLinear()){e:for(r=(i=v(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}lN(e),e.L=r,e.g=new lC(o,a+1,r.ads.length,!0,e.h),e.C=o,0===a&&lU(e,"breakStart"),lj(e);break}}if(!e.g){for(r=(i=v(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 u=e.F.get(lR(o.nonLinearAdList[0]));if(s<=t&&u&&u.length){lN(e),s=e,u=v(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).data.source.length){var c=document.createElement("img");c.src=l.data.source[0].url,c.style.top=(l.placeholder.top||0)+"%",c.style.height=100-(l.placeholder.top||0)+"%",c.style.left=(l.placeholder.left||0)+"%",c.style.maxWidth=100-(l.placeholder.left||0)+"%",c.style.objectFit="contain",c.style.position="absolute",s.B.appendChild(c)}e.L=r,e.g=new lC(o,a+1,r.ads.length,!1,e.h),e.C=o,0===a&&lU(e,"breakStart"),lj(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function lN(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)?lU(e,"skip"):lU(e,"complete"),t=v(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.cb(n.target,n.type,n.listener);e.m=[],e.s=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&lU(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function lj(e){var t=!1;e.h.paused?t=!0:(lU(e,"impression"),lU(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&lU(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||lU(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(lU(e,"impression"),lU(e,"start"),t=!1):lU(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){lU(e,"pause")}});for(var n=v(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function lU(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=v(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=rx([r],ra())).method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new rp("ad-impression"));break;case"start":e.i(new rp("ad-started",(new Map).set("ad",e.g)));break;case"mute":e.i(new rp("ad-muted"));break;case"unmute":e.i(new rp("ad-volume-changed"));break;case"resume":e.i(new rp("ad-resumed"));break;case"pause":e.i(new rp("ad-paused"));break;case"firstQuartile":e.i(new rp("ad-first-quartile"));break;case"midpoint":e.i(new rp("ad-midpoint"));break;case"thirdQuartile":e.i(new rp("ad-third-quartile"));break;case"complete":e.i(new rp("ad-complete")),e.i(new rp("ad-stopped"));break;case"skip":e.i(new rp("ad-skipped")),e.i(new rp("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 rp("ad-skip-state-changed"))}}function lO(e,t){this.g=e,this.i=null,this.h=t}function l_(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 es,(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 rp("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 rp("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 lO(e=e.getAd(),r.l),r.A&&(r.m.i=r.A),r.i(new rp("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 rp("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new rp("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new rp("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new rp("ad-complete")),r.i(new rp("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 rp("ad-skipped")),r.i(new rp("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=v(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.C=e,r.i(new rp("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function lB(){rm.call(this),this.g=this.i=this.j=this.h=null,this.m=new ld,this.o=navigator.language,this.l=null}function lF(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 lV(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof rp){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=v(Object.getOwnPropertyNames(t))).next();!e.done;e=n.next())i.add(e.value);for(n={},e=(i=v(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=v(aI(t))).next();!n.done;n=t.next())e=(n=n.value).end,i.start.push(n.start),i.end.push(e);t=i}else t=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}})}function lH(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n,i=NaN;else if("-Infinity"==t)i=-1/0;else if("Infinity"==t)i=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__){i={length:(n=t).length,start:function(e){return n.start[e]},end:function(e){return n.end[e]}}}else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)i=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(i in t=Error((e=t.contents).message),e)t[i]=e[i];i=t}else i=t;return i})}(b=lh.prototype).needsSkipUI=function(){return!1},b.isClientRendering=function(){return!0},b.isUsingAnotherMediaElement=function(){return!0},b.getDuration=function(){return this.g.getDuration()},b.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},b.getRemainingTime=function(){return this.h.getRemainingTime()},b.isPaused=function(){return this.i},b.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},b.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},b.canSkipNow=function(){return this.h.getAdSkippableState()},b.skip=function(){return this.h.skip()},b.pause=function(){return this.h.pause()},b.play=function(){return this.h.resume()},b.getVolume=function(){return this.h.getVolume()},b.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},b.isMuted=function(){return 0==this.h.getVolume()},b.isLinear=function(){return this.g.isLinear()},b.resize=function(e,t){var n=!1,i=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},b.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},b.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},b.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},b.getTitle=function(){return this.g.getTitle()},b.getDescription=function(){return this.g.getDescription()},b.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},b.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},b.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},b.getAdId=function(){return this.g.getAdId()},b.getCreativeAdId=function(){return this.g.getCreativeAdId()},b.getAdvertiserName=function(){return this.g.getAdvertiserName()},b.getMediaUrl=function(){return this.g.getMediaUrl()},b.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},b.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},b.release=function(){this.h=this.g=null},z("shaka.ads.ClientSideAd",lh),lh.prototype.release=lh.prototype.release,lh.prototype.getPodIndex=lh.prototype.getPodIndex,lh.prototype.getTimeOffset=lh.prototype.getTimeOffset,lh.prototype.getMediaUrl=lh.prototype.getMediaUrl,lh.prototype.getAdvertiserName=lh.prototype.getAdvertiserName,lh.prototype.getCreativeAdId=lh.prototype.getCreativeAdId,lh.prototype.getAdId=lh.prototype.getAdId,lh.prototype.getVastMediaWidth=lh.prototype.getVastMediaWidth,lh.prototype.getVastMediaHeight=lh.prototype.getVastMediaHeight,lh.prototype.getVastMediaBitrate=lh.prototype.getVastMediaBitrate,lh.prototype.getDescription=lh.prototype.getDescription,lh.prototype.getTitle=lh.prototype.getTitle,lh.prototype.getPositionInSequence=lh.prototype.getPositionInSequence,lh.prototype.getSequenceLength=lh.prototype.getSequenceLength,lh.prototype.setMuted=lh.prototype.setMuted,lh.prototype.resize=lh.prototype.resize,lh.prototype.isLinear=lh.prototype.isLinear,lh.prototype.isMuted=lh.prototype.isMuted,lh.prototype.setVolume=lh.prototype.setVolume,lh.prototype.getVolume=lh.prototype.getVolume,lh.prototype.play=lh.prototype.play,lh.prototype.pause=lh.prototype.pause,lh.prototype.skip=lh.prototype.skip,lh.prototype.canSkipNow=lh.prototype.canSkipNow,lh.prototype.getTimeUntilSkippable=lh.prototype.getTimeUntilSkippable,lh.prototype.isSkippable=lh.prototype.isSkippable,lh.prototype.isPaused=lh.prototype.isPaused,lh.prototype.getRemainingTime=lh.prototype.getRemainingTime,lh.prototype.getMinSuggestedDuration=lh.prototype.getMinSuggestedDuration,lh.prototype.getDuration=lh.prototype.getDuration,lh.prototype.isUsingAnotherMediaElement=lh.prototype.isUsingAnotherMediaElement,lh.prototype.isClientRendering=lh.prototype.isClientRendering,lh.prototype.needsSkipUI=lh.prototype.needsSkipUI,z("shaka.ads.Utils",lp),lp.ADS_LOADED="ads-loaded",lp.AD_STARTED="ad-started",lp.AD_FIRST_QUARTILE="ad-first-quartile",lp.AD_MIDPOINT="ad-midpoint",lp.AD_THIRD_QUARTILE="ad-third-quartile",lp.AD_COMPLETE="ad-complete",lp.AD_STOPPED="ad-stopped",lp.AD_SKIPPED="ad-skipped",lp.AD_VOLUME_CHANGED="ad-volume-changed",lp.AD_MUTED="ad-muted",lp.AD_PAUSED="ad-paused",lp.AD_RESUMED="ad-resumed",lp.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",lp.CUEPOINTS_CHANGED="ad-cue-points-changed",lp.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",lp.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",lp.AD_CLICKED="ad-clicked",lp.AD_PROGRESS="ad-progress",lp.AD_BUFFERING="ad-buffering",lp.AD_IMPRESSION="ad-impression",lp.AD_DURATION_CHANGED="ad-duration-changed",lp.AD_CLOSED="ad-closed",lp.AD_LOADED="ad-loaded",lp.ALL_ADS_COMPLETED="all-ads-completed",lp.AD_LINEAR_CHANGED="ad-linear-changed",lp.AD_METADATA="ad-metadata",lp.AD_RECOVERABLE_ERROR="ad-recoverable-error",lp.AD_ERROR="ad-error",lp.AD_BREAK_READY="ad-break-ready",lp.AD_INTERACTION="ad-interaction",lp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",lp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",lp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",lg.prototype.configure=function(e){this.o=e},lg.prototype.stop=function(){this.g&&this.g.stop(),this.s&&aD(this.s)},lg.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()},(b=lw.prototype).needsSkipUI=function(){return!0},b.isClientRendering=function(){return!0},b.isUsingAnotherMediaElement=function(){return this.m},b.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},b.getMinSuggestedDuration=function(){return this.getDuration()},b.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},b.isPaused=function(){return this.g.paused},b.isSkippable=function(){return this.i&&null!=this.j?this.getDuration()-this.getRemainingTime()<this.h+this.j:this.i},b.getTimeUntilSkippable=function(){return this.isSkippable()?Math.max(this.getRemainingTime()+this.h-this.getDuration(),0):Math.max(this.getRemainingTime(),0)},b.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},b.skip=function(){this.o()},b.pause=function(){return this.g.pause()},b.play=function(){return this.g.play()},b.getVolume=function(){return this.g.volume},b.setVolume=function(e){this.g.volume=e},b.isMuted=function(){return this.g.muted},b.isLinear=function(){return!0},b.resize=function(){},b.setMuted=function(e){this.g.muted=e},b.getSequenceLength=function(){return this.s},b.getPositionInSequence=function(){return this.l},b.getTitle=function(){return""},b.getDescription=function(){return""},b.getVastMediaBitrate=function(){return 0},b.getVastMediaHeight=function(){return 0},b.getVastMediaWidth=function(){return 0},b.getAdId=function(){return""},b.getCreativeAdId=function(){return""},b.getAdvertiserName=function(){return""},b.getMediaUrl=function(){return null},b.getTimeOffset=function(){return 0},b.getPodIndex=function(){return 0},b.release=function(){this.g=null},z("shaka.ads.InterstitialAd",lw),lw.prototype.release=lw.prototype.release,lw.prototype.getPodIndex=lw.prototype.getPodIndex,lw.prototype.getTimeOffset=lw.prototype.getTimeOffset,lw.prototype.getMediaUrl=lw.prototype.getMediaUrl,lw.prototype.getAdvertiserName=lw.prototype.getAdvertiserName,lw.prototype.getCreativeAdId=lw.prototype.getCreativeAdId,lw.prototype.getAdId=lw.prototype.getAdId,lw.prototype.getVastMediaWidth=lw.prototype.getVastMediaWidth,lw.prototype.getVastMediaHeight=lw.prototype.getVastMediaHeight,lw.prototype.getVastMediaBitrate=lw.prototype.getVastMediaBitrate,lw.prototype.getDescription=lw.prototype.getDescription,lw.prototype.getTitle=lw.prototype.getTitle,lw.prototype.getPositionInSequence=lw.prototype.getPositionInSequence,lw.prototype.getSequenceLength=lw.prototype.getSequenceLength,lw.prototype.setMuted=lw.prototype.setMuted,lw.prototype.resize=lw.prototype.resize,lw.prototype.isLinear=lw.prototype.isLinear,lw.prototype.isMuted=lw.prototype.isMuted,lw.prototype.setVolume=lw.prototype.setVolume,lw.prototype.getVolume=lw.prototype.getVolume,lw.prototype.play=lw.prototype.play,lw.prototype.pause=lw.prototype.pause,lw.prototype.skip=lw.prototype.skip,lw.prototype.canSkipNow=lw.prototype.canSkipNow,lw.prototype.getTimeUntilSkippable=lw.prototype.getTimeUntilSkippable,lw.prototype.isSkippable=lw.prototype.isSkippable,lw.prototype.isPaused=lw.prototype.isPaused,lw.prototype.getRemainingTime=lw.prototype.getRemainingTime,lw.prototype.getMinSuggestedDuration=lw.prototype.getMinSuggestedDuration,lw.prototype.getDuration=lw.prototype.getDuration,lw.prototype.isUsingAnotherMediaElement=lw.prototype.isUsingAnotherMediaElement,lw.prototype.isClientRendering=lw.prototype.isClientRendering,lw.prototype.needsSkipUI=lw.prototype.needsSkipUI,lT.prototype.configure=function(e){this.L=e,lx(this)},lT.prototype.stop=function(){this.m&&this.m.Va(),this.I.clear(),this.B.clear(),this.h.Ue(),this.s.clear(),this.h.detach(),this.H=!1,this.C=this.j=null},lT.prototype.release=function(){this.stop(),this.M&&this.M.release(),this.m&&this.m.release(),this.G&&aD(this.G),this.K&&(this.K.stop(),this.K=null),this.O&&(this.O.stop(),this.O=null),this.h.destroy()},lT.prototype.addAdUrlInterstitial=function(e){var t,n,i,r,a,o,s,u=this;return F(function(l){switch(l.g){case 1:return M(l,lM(u,e,t={type:12}),2);case 2:if(!(n=tI(l.h,"VAST,vmap:VMAP")))throw new eB(2,10,10007);if(i=[],"VAST"==n.tagName){i=lf(n,u.j),l.u(3);break}if("vmap:VMAP"!=n.tagName){l.u(3);break}for(var c=[],d=v(tP(n,"vmap:AdBreak")),h=d.next();!h.done;h=d.next()){var p=h.value,f=p.attributes.timeOffset;f&&(h=null,h="start"==f?0:"end"==f?1/0:tS(f),(p=tU(p,"vmap:AdSource"))&&(p=tU(p,"vmap:AdTagURI"))&&(p=tL(p))&&c.push({time:h,uri:p}))}a=(r=v(c)).next();case 5:if(a.done){l.u(3);break}return M(l,lM(u,(o=a.value).uri,t),8);case 8:if(!(s=tI(l.h,"VAST")))throw new eB(2,10,10007);i.push.apply(i,y(lf(s,o.time))),a=r.next(),l.u(5);break;case 3:lS(u,i),C(l)}})},(b=lC.prototype).needsSkipUI=function(){return!0},b.isClientRendering=function(){return!1},b.isUsingAnotherMediaElement=function(){return!1},b.getDuration=function(){return this.h.durationInSeconds},b.getMinSuggestedDuration=function(){return this.getDuration()},b.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},b.isPaused=function(){return this.g.paused},b.isSkippable=function(){return"number"==typeof this.j},b.getTimeUntilSkippable=function(){return"number"!=typeof this.j?this.getRemainingTime():Math.max(this.getRemainingTime()+this.j-this.getDuration(),0)},b.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},b.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},b.pause=function(){return this.g.pause()},b.play=function(){return this.g.play()},b.getVolume=function(){return this.g.volume},b.setVolume=function(e){this.g.volume=e},b.isMuted=function(){return this.g.muted},b.isLinear=function(){return this.o},b.resize=function(){},b.setMuted=function(e){this.g.muted=e},b.getSequenceLength=function(){return this.l?this.l:1},b.getPositionInSequence=function(){return this.i?this.i:1},b.getTitle=function(){return this.h.adTitle},b.getDescription=function(){return""},b.getVastMediaBitrate=function(){return 0},b.getVastMediaHeight=function(){return 0},b.getVastMediaWidth=function(){return 0},b.getAdId=function(){return this.h.adId},b.getCreativeAdId=function(){return this.h.creativeId},b.getAdvertiserName=function(){return""},b.getMediaUrl=function(){return null},b.getTimeOffset=function(){return 0},b.getPodIndex=function(){return 0},b.release=function(){this.l=this.i=this.g=this.h=null},z("shaka.ads.MediaTailorAd",lC),lC.prototype.release=lC.prototype.release,lC.prototype.getPodIndex=lC.prototype.getPodIndex,lC.prototype.getTimeOffset=lC.prototype.getTimeOffset,lC.prototype.getMediaUrl=lC.prototype.getMediaUrl,lC.prototype.getAdvertiserName=lC.prototype.getAdvertiserName,lC.prototype.getCreativeAdId=lC.prototype.getCreativeAdId,lC.prototype.getAdId=lC.prototype.getAdId,lC.prototype.getVastMediaWidth=lC.prototype.getVastMediaWidth,lC.prototype.getVastMediaHeight=lC.prototype.getVastMediaHeight,lC.prototype.getVastMediaBitrate=lC.prototype.getVastMediaBitrate,lC.prototype.getDescription=lC.prototype.getDescription,lC.prototype.getTitle=lC.prototype.getTitle,lC.prototype.getPositionInSequence=lC.prototype.getPositionInSequence,lC.prototype.getSequenceLength=lC.prototype.getSequenceLength,lC.prototype.setMuted=lC.prototype.setMuted,lC.prototype.resize=lC.prototype.resize,lC.prototype.isLinear=lC.prototype.isLinear,lC.prototype.isMuted=lC.prototype.isMuted,l
1C.prototype.setVolume=lC.prototype.setVolume,lC.prototype.getVolume=lC.prototype.getVolume,lC.prototype.play=lC.prototype.play,lC.prototype.pause=lC.prototype.pause,lC.prototype.skip=lC.prototype.skip,lC.prototype.canSkipNow=lC.prototype.canSkipNow,lC.prototype.getTimeUntilSkippable=lC.prototype.getTimeUntilSkippable,lC.prototype.isSkippable=lC.prototype.isSkippable,lC.prototype.isPaused=lC.prototype.isPaused,lC.prototype.getRemainingTime=lC.prototype.getRemainingTime,lC.prototype.getMinSuggestedDuration=lC.prototype.getMinSuggestedDuration,lC.prototype.getDuration=lC.prototype.getDuration,lC.prototype.isUsingAnotherMediaElement=lC.prototype.isUsingAnotherMediaElement,lC.prototype.isClientRendering=lC.prototype.isClientRendering,lC.prototype.needsSkipUI=lC.prototype.needsSkipUI,lD.prototype.stop=function(){for(var e=v(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.cb(t.target,t.type,t.listener);lN(this),this.m=[],this.s=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},lD.prototype.release=function(){this.stop(),this.o&&this.o.release()},lD.prototype.onManifestUpdated=function(e){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g;this.I=e,""!=this.G&&(t=this,n=this.G,i=this.O,F(function(e){if(1==e.g)return r={type:8},a=rx([n],ra()),o=t.K.request(7,a,r),D(e,2),M(e,o.promise,4);if(2!=e.g){var m;if(s=e.h,u=[],0<(l=JSON.parse(tc(s.data))).avails.length){if(JSON.stringify(t.j)!=JSON.stringify(l.avails)){for(t.j=l.avails,d=(c=v(t.j)).next();!d.done;d=c.next())for(p=(h=v(d.value.nonLinearAdsList)).next();!p.done;p=h.next())for(g=(f=v(p.value.nonLinearAdList)).next();!g.done;g=f.next())!function(e,t){var n,i,r,a,o;F(function(s){return 1==s.g?t.staticResource?(n=lR(t),e.F.get(n))?s.return():(i={type:9},r=rx([t.staticResource],ra()),a=e.K.request(7,r,i),D(s,2),e.F.set(n,[]),M(s,a.promise,4)):s.return():2!=s.g?(o=JSON.parse(tc(s.h.data)).apps,e.F.set(n,o),P(s,0)):void(L(s),e.F.delete(n),C(s))})}(t,g.value);u=t.getCuePoints(),t.i(new rp("ad-cue-points-changed",(new Map).set("cuepoints",u)))}}else t.j.length&&t.i(new rp("ad-cue-points-changed",(new Map).set("cuepoints",u))),lN(t),t.j=[];return i&&(t.I||0<u.length)&&(lL(m=t),m.I||(lP(m),m.o.D(m.h,"seeked",function(){lP(m)}),m.o.D(m.h,"ended",function(){lN(m)})),m.o.D(m.h,"timeupdate",function(){lL(m)})),P(e,0)}L(e),C(e)}),this.O=!1)},lD.prototype.getCuePoints=function(){for(var e=[],t=v(this.j),n=t.next();!n.done;n=t.next()){n=v(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},(b=lO.prototype).needsSkipUI=function(){return!0},b.isClientRendering=function(){return!1},b.isUsingAnotherMediaElement=function(){return!1},b.getDuration=function(){return this.i?this.i.duration:-1},b.getMinSuggestedDuration=function(){return this.getDuration()},b.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},b.isPaused=function(){return this.h.paused},b.isSkippable=function(){return this.g.isSkippable()},b.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},b.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},b.skip=function(){this.h.currentTime+=this.getRemainingTime()},b.pause=function(){return this.h.pause()},b.play=function(){return this.h.play()},b.getVolume=function(){return this.h.volume},b.setVolume=function(e){this.h.volume=e},b.isMuted=function(){return this.h.muted},b.isLinear=function(){return!0},b.resize=function(){},b.setMuted=function(e){this.h.muted=e},b.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},b.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},b.getTitle=function(){return this.g.getTitle()},b.getDescription=function(){return this.g.getDescription()},b.getVastMediaBitrate=function(){return 0},b.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},b.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},b.getAdId=function(){return this.g.getAdId()},b.getCreativeAdId=function(){return this.g.getCreativeAdId()},b.getAdvertiserName=function(){return this.g.getAdvertiserName()},b.getMediaUrl=function(){return null},b.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},b.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},b.release=function(){this.h=this.i=this.g=null},z("shaka.ads.ServerSideAd",lO),lO.prototype.release=lO.prototype.release,lO.prototype.getPodIndex=lO.prototype.getPodIndex,lO.prototype.getTimeOffset=lO.prototype.getTimeOffset,lO.prototype.getMediaUrl=lO.prototype.getMediaUrl,lO.prototype.getAdvertiserName=lO.prototype.getAdvertiserName,lO.prototype.getCreativeAdId=lO.prototype.getCreativeAdId,lO.prototype.getAdId=lO.prototype.getAdId,lO.prototype.getVastMediaWidth=lO.prototype.getVastMediaWidth,lO.prototype.getVastMediaHeight=lO.prototype.getVastMediaHeight,lO.prototype.getVastMediaBitrate=lO.prototype.getVastMediaBitrate,lO.prototype.getDescription=lO.prototype.getDescription,lO.prototype.getTitle=lO.prototype.getTitle,lO.prototype.getPositionInSequence=lO.prototype.getPositionInSequence,lO.prototype.getSequenceLength=lO.prototype.getSequenceLength,lO.prototype.setMuted=lO.prototype.setMuted,lO.prototype.resize=lO.prototype.resize,lO.prototype.isLinear=lO.prototype.isLinear,lO.prototype.isMuted=lO.prototype.isMuted,lO.prototype.setVolume=lO.prototype.setVolume,lO.prototype.getVolume=lO.prototype.getVolume,lO.prototype.play=lO.prototype.play,lO.prototype.pause=lO.prototype.pause,lO.prototype.skip=lO.prototype.skip,lO.prototype.canSkipNow=lO.prototype.canSkipNow,lO.prototype.getTimeUntilSkippable=lO.prototype.getTimeUntilSkippable,lO.prototype.isSkippable=lO.prototype.isSkippable,lO.prototype.isPaused=lO.prototype.isPaused,lO.prototype.getRemainingTime=lO.prototype.getRemainingTime,lO.prototype.getMinSuggestedDuration=lO.prototype.getMinSuggestedDuration,lO.prototype.getDuration=lO.prototype.getDuration,lO.prototype.isUsingAnotherMediaElement=lO.prototype.isUsingAnotherMediaElement,lO.prototype.isClientRendering=lO.prototype.isClientRendering,lO.prototype.needsSkipUI=lO.prototype.needsSkipUI,(b=l_.prototype).configure=function(){},b.stop=function(){this.B="",this.o=null,this.C=[]},b.release=function(){this.stop(),this.h&&this.h.release()},b.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},b.getCuePoints=function(){return this.C},A(lB,rm),(b=lB.prototype).setLocale=function(e){this.o=e},b.configure=function(e){this.l=e,this.h&&this.h.configure(this.l),this.j&&this.j.configure(this.l),this.g&&this.g.configure(this.l)},b.initInterstitial=function(e,t,n){var i=this;this.h&&this.h.release(),this.h=new lT(e,t,n,function(e){return lF(i,e)}),this.h.configure(this.l)},b.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new eB(2,10,1e4);this.j&&this.j.release(),this.j=new lg(t,n,this.o,i,function(e){return lF(r,e)}),this.j.configure(this.l)},b.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),rm.prototype.release.call(this)},b.onAssetUnload=function(){this.h&&this.h.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new rp("ad-stopped")),this.dispatchEvent(new rp("ad-content-attach-requested")),this.m=new ld},b.requestClientSideAds=function(e){if(!this.j)throw new eB(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)},b.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new eB(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},b.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new lD(e,t,n,function(e){return lF(i,e)})},b.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new eB(1,10,10005);var i,r,a,o,s,u,l,c,d,h=this.i;return n=void 0===n?"":n,h.l?e=Promise.reject(new eB(1,10,10004)):(h.l=new ro,i=e,F(function(e){if(1==e.g)return r={type:7},(a=rx([i],ra())).method="POST",t&&(a.body=tp(JSON.stringify(t))),o=h.K.request(7,a,r),D(e,2),M(e,o.promise,4);if(2!=e.g){if((s=JSON.parse(tc(e.h.data))).manifestUrl&&s.trackingUrl)u=new nM(i),l=new nM(s.trackingUrl),h.G=u.resolve(l).toString(),c=Date.now()/1e3-h.S,h.i(new rp("ads-loaded",(new Map).set("loadTime",c))),d=new nM(s.manifestUrl),h.l.resolve(u.resolve(d).toString()),h.l=null;else throw Error("Insufficient data from MediaTailor.");return P(e,0)}if(L(e),!h.H.length)return h.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),h.l=null,e.return();h.l.resolve(h.H),h.l=null,C(e)}),h.H=n||"",h.S=Date.now()/1e3,e=h.l),e},b.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new eB(1,10,10005);var t=this.i;t.G=e,t.i(new rp("ads-loaded",(new Map).set("loadTime",0)))},b.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new eB(2,10,10002);this.g&&this.g.release(),this.g=new l_(t,n,this.o,function(e){return lF(i,e)}),this.g.configure(this.l)},b.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new eB(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&en('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.12.2",(n=this.g).j?e=Promise.reject(new eB(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new ro,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},b.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new eB(1,10,10003);(e.mpt||e.mpv)&&en('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v4.12.2",this.g.g.replaceAdTagParameters(e)},b.getServerSideCuePoints=function(){return ef("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},b.getCuePoints=function(){var e=[];return this.g&&(e=e.concat(this.g.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},b.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:e.g.length?e.g.reduce(function(e,t){return e+t},0)/e.g.length:0,started:e.h,playedCompletely:e.j,skipped:e.l,errors:e.i}},b.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},b.onDashTimedMetadata=function(e){this.g&&"urn:google:dai:2018"==e.schemeIdUri&&this.g.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},b.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},b.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},b.onHLSInterstitialMetadata=function(e,t,n){var i,r;this.l&&this.l.disableHLSInterstitial||(this.h||this.initInterstitial(null,e,t),this.h&&(i=this.h,F(function(e){if(1==e.g){var t,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,R,N,j,U,O,_,B,V,H,G,K,q,X,W;return lI(i),M(e,(t=i,a=n,F(function(e){switch(e.g){case 1:if(o=[],!a||(s=a.values.find(function(e){return"X-ASSET-URI"==e.key}),u=a.values.find(function(e){return"X-ASSET-LIST"==e.key}),!s&&!u))return e.return(o);if(l=null,(c=a.values.find(function(e){return"ID"==e.key}))&&(l=c.data),d=null==l?Math.floor(10*a.startTime)/10:a.startTime,(h=a.endTime)&&1/0!=a.endTime&&"number"==typeof a.endTime&&(h=null==l?Math.floor(10*a.endTime)/10:a.endTime),p=a.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")),y=f?0:null,(b=a.values.find(function(e){return"X-ENABLE-SKIP-AFTER"==e.key}))&&isNaN(y=parseFloat(b.data))&&(y=f?0:null),w=null,(T=a.values.find(function(e){return"X-ENABLE-SKIP-FOR"==e.key}))&&(w=parseFloat(T.data),isNaN(y)&&(w=null)),x=null,(S=a.values.find(function(e){return"X-RESUME-OFFSET"==e.key}))&&isNaN(x=parseFloat(S.data))&&(x=null),A=null,(E=a.values.find(function(e){return"X-PLAYOUT-LIMIT"==e.key}))&&isNaN(A=parseFloat(E.data))&&(A=null),R=I=k=!1,(N=a.values.find(function(e){return"CUE"==e.key}))&&(k=(j=N.data).includes("ONCE"),I=j.includes("PRE"),R=j.includes("POST")),U=!1,(O=a.values.find(function(e){return"X-TIMELINE-OCCUPIES"==e.key}))?U=O.data.includes("RANGE"):!S&&t.A.U()&&(U=!I&&!R),s){if(!(_=s.data))return e.return(o);o.push({id:l,startTime:d,endTime:h,uri:_,isSkippable:f,skipOffset:y,skipFor:w,canJump:g,resumeOffset:x,playoutLimit:A,once:k,pre:I,post:R,timelineRange:U}),e.u(2);break}if(!u){e.u(2);break}if(!(B=u.data))return e.return(o);return D(e,4),M(e,lM(t,B,{type:11}),6);case 6:for((H=(V=JSON.parse(tc(e.h)))["SKIP-CONTROL"])&&((G=H["ENABLE-SKIP-AFTER"])instanceof Number&&(y=parseFloat(G),isNaN(G)&&(y=f?0:null)),(K=H["X-ENABLE-SKIP-FOR"])instanceof Number&&(w=parseFloat(K),isNaN(K)&&(w=null))),X=(q=v(V.ASSETS)).next();!X.done;X=q.next())(W=X.value).URI&&o.push({id:l,startTime:d,endTime:h,uri:W.URI,isSkippable:f,skipOffset:y,skipFor:w,canJump:g,resumeOffset:x,playoutLimit:A,once:k,pre:I,post:R,timelineRange:U});P(e,2);break;case 4:L(e);case 2:return e.return(o)}})),2)}(r=e.h).length?lS(i,r):en("Unsupported HLS interstitial",n),C(e)})))},b.onDASHInterstitialMetadata=function(e,t,n){if(!(this.l&&this.l.disableDASHInterstitial||"urn:mpeg:dash:event:alternativeMPD:2022"!=n.schemeIdUri)&&(this.h||this.initInterstitial(null,e,t),this.h)){e=this.h,t=v(n.eventNode.children);for(var i=t.next();!i.done;i=t.next()){var r=i.value;if("AlternativeMPD"==r.tagName&&(i=r.attributes.uri,r=r.attributes.mode,i)){var a=i,o=r;break}}
1a?(t="replace"==o,o="insert"==o,(t||o)&&lS(e,[{id:null,startTime:n.startTime,endTime:n.endTime,uri:a,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:o?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:t&&!o}])):en("Unsupported MPD alternate",n)}},b.addCustomInterstitial=function(e){if(!this.h)throw new eB(1,10,10006);lS(this.h,[e])},b.addAdUrlInterstitial=function(e){if(!this.h)throw new eB(1,10,10006);return this.h.addAdUrlInterstitial(e)},z("shaka.ads.AdManager",lB),lB.prototype.addAdUrlInterstitial=lB.prototype.addAdUrlInterstitial,lB.prototype.addCustomInterstitial=lB.prototype.addCustomInterstitial,lB.prototype.onDASHInterstitialMetadata=lB.prototype.onDASHInterstitialMetadata,lB.prototype.onHLSInterstitialMetadata=lB.prototype.onHLSInterstitialMetadata,lB.prototype.onCueMetadataChange=lB.prototype.onCueMetadataChange,lB.prototype.onHlsTimedMetadata=lB.prototype.onHlsTimedMetadata,lB.prototype.onDashTimedMetadata=lB.prototype.onDashTimedMetadata,lB.prototype.onManifestUpdated=lB.prototype.onManifestUpdated,lB.prototype.getStats=lB.prototype.getStats,lB.prototype.getCuePoints=lB.prototype.getCuePoints,lB.prototype.getServerSideCuePoints=lB.prototype.getServerSideCuePoints,lB.prototype.replaceServerSideAdTagParameters=lB.prototype.replaceServerSideAdTagParameters,lB.prototype.requestServerSideStream=lB.prototype.requestServerSideStream,lB.prototype.initServerSide=lB.prototype.initServerSide,lB.prototype.addMediaTailorTrackingUrl=lB.prototype.addMediaTailorTrackingUrl,lB.prototype.requestMediaTailorStream=lB.prototype.requestMediaTailorStream,lB.prototype.initMediaTailor=lB.prototype.initMediaTailor,lB.prototype.updateClientSideAdsRenderingSettings=lB.prototype.updateClientSideAdsRenderingSettings,lB.prototype.requestClientSideAds=lB.prototype.requestClientSideAds,lB.prototype.onAssetUnload=lB.prototype.onAssetUnload,lB.prototype.release=lB.prototype.release,lB.prototype.initClientSide=lB.prototype.initClientSide,lB.prototype.initInterstitial=lB.prototype.initInterstitial,lB.prototype.configure=lB.prototype.configure,lB.prototype.setLocale=lB.prototype.setLocale,lB.ADS_LOADED="ads-loaded",lB.AD_STARTED="ad-started",lB.AD_FIRST_QUARTILE="ad-first-quartile",lB.AD_MIDPOINT="ad-midpoint",lB.AD_THIRD_QUARTILE="ad-third-quartile",lB.AD_COMPLETE="ad-complete",lB.AD_STOPPED="ad-stopped",lB.AD_SKIPPED="ad-skipped",lB.AD_VOLUME_CHANGED="ad-volume-changed",lB.AD_MUTED="ad-muted",lB.AD_PAUSED="ad-paused",lB.AD_RESUMED="ad-resumed",lB.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",lB.CUEPOINTS_CHANGED="ad-cue-points-changed",lB.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",lB.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",lB.AD_CLICKED="ad-clicked",lB.AD_PROGRESS="ad-progress",lB.AD_BUFFERING="ad-buffering",lB.AD_IMPRESSION="ad-impression",lB.AD_DURATION_CHANGED="ad-duration-changed",lB.AD_CLOSED="ad-closed",lB.AD_LOADED="ad-loaded",lB.ALL_ADS_COMPLETED="all-ads-completed",lB.AD_LINEAR_CHANGED="ad-linear-changed",lB.AD_METADATA="ad-metadata",lB.AD_RECOVERABLE_ERROR="ad-recoverable-error",lB.AD_ERROR="ad-error",lB.AD_BREAK_READY="ad-break-ready",lB.AD_INTERACTION="ad-interaction",lB.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",lB.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",lB.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",lc=function(){return new lB};var lG="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),lK="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),lq=["loop","playbackRate"],lX=["pause","play"],lW={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},lz={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},lY={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},lJ=[["getConfiguration","configure"]],l$=[["isTextTrackVisible","setTextTrackVisibility"]],lQ="addChapter
1sTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),lZ=["attach","attachCanvas","detach","load","unload"];function l0(e,t,n,i,r,a,o){var s=this;this.G=e,this.K=o,this.l=new ez(t),this.L=n,this.s=!1,this.A=i,this.F=r,this.M=a,this.h=this.m=!1,this.I="",this.o=null,this.B=function(){return l4(s)},this.C=function(e,t){switch((e=lH(t)).type){case"event":var n=e.targetName,i=rf(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(i=e.id,r=e.error,e=s.i[i],delete s.i[i],e)if(r){for(n in i=new eB(r.severity,r.category,r.code),r)i[n]=r[n];e.reject(i)}else e.resolve()}},this.g={video:{},player:{}},this.H=0,this.i={},this.j=null,ct.add(this)}function l1(e,t){var n=e.M();l7=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),l4(e),l6(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function l2(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 eB(2,8,n,t))}function l3(e){var t=l7;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function l4(e){var t=!!l7&&"connected"==l7.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};l5(e)}e.h=t,e.I=t?l7.receiver.friendlyName:"",e.l.hc()}function l5(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new eB(1,7,7e3))}}function l6(e,t){t=lV(t);var n=l7;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},er)}catch(i){throw t=new eB(2,8,8005,i),n=new rp("error",(new Map).set("detail",t)),e.A("player",n),e.Jc(),t}}(b=l0.prototype).destroy=function(){return ct.delete(this),l5(this),l7&&l3(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.h=this.m=!1,this.C=this.B=this.j=this.i=this.g=this.o=null,Promise.resolve()},b.jb=function(){return this.h},b.Kf=function(){return this.I},b.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.hc();var t=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=v(ct),n=t.next();!n.done;n=t.next())(n=n.value).j=new ro,n.s=!0,l1(n,e)},function(e){for(var t=v(ct),n=t.next();!n.done;n=t.next())n=n.value,l9="available"==e,n.l.hc()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),l9&&this.l.Z(l8),(t=l7)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ro,this.s=!0,l1(this,t)):l7=null}else e.__onGCastApiAvailable!==cn&&(ce=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=cn)},b.Sf=function(e){this.o=e,this.h&&l6(this,{type:"appData",appData:this.o})},b.cast=function(){var e=this;return F(function(t){if(!e.m)throw new eB(1,8,8e3);if(!l9)throw new eB(1,8,8001);if(e.h)throw new eB(1,8,8002);return e.j=new ro,chrome.cast.requestSession(function(t){return l1(e,t)},function(t){return l2(e,t)}),M(t,e.j,0)})},b.Jc=function(){if(this.h){if(l5(this),l7){l3(this);try{l7.stop(function(){},function(){})}catch(e){}l7=null}l4(this)}},b.get=function(e,t){var n=this;if("video"==e){if(lX.includes(t))return function(){return n.Xg.apply(n,[e,t].concat(y(V.apply(0,arguments))))}}else if("player"==e){if(lY[t]&&!this.get("player","isLive")())return function(){};if(lQ.includes(t))return function(){return n.Xg.apply(n,[e,t].concat(y(V.apply(0,arguments))))};if(lZ.includes(t))return function(){return n.Oi.apply(n,[e,t].concat(y(V.apply(0,arguments))))};if(lW[t]||lz[t])return function(){return n.g[e][t]}}return this.g[e][t]},b.set=function(e,t,n){this.g[e][t]=n,l6(this,{type:"set",targetName:e,property:t,value:n})},b.Xg=function(e,t){l6(this,{type:"call",targetName:e,methodName:t,args:V.apply(2,arguments)})},b.Oi=function(e,t){var n=V.apply(2,arguments),i=new ro,r=this.H.toString();this.H++,this.i[r]=i;try{l6(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var l8=.02,l9=!1,l7=null,ce=null,ct=new Set;function cn(t){if(ce?e.__onGCastApiAvailable=ce:delete e.__onGCastApiAvailable,ce=null,t)for(var n=v(ct),i=n.next();!i.done;
1i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function ci(e,t,n,i){i=void 0!==i&&i,rm.call(this);var r=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.C=n,this.B=i,this.A=new Map,this.g=new l0(n,function(){return co(r)},function(){return cs(r)},function(e,t){return cl(r,e,t)},function(){return cu(r)},function(){return ca(r)},i),function(e){e.g.init(),e.m=new es;for(var t,n,i=v(lG),r=i.next();!r.done;r=i.next())e.m.D(e.i,r.value,function(t){e.g.jb()||(t=rf(t),e.j.dispatchEvent(t))});for(var a in rg)e.m.D(e.h,rg[a],function(t){e.g.jb()||e.o.dispatchEvent(t)});for(var o in e.l={},i={},e.i)(i={nd:i.nd}).nd=o,Object.defineProperty(e.l,i.nd,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.j.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.j.removeEventListener(t,n,i)};if(e.g.jb()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.jb()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.nd)}}(i),set:function(t){return function(n){var i=t.nd;e.g.jb()?e.g.set("video",i,n):e.i[i]=n}}(i)});e.s={},cr(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.l};if("getSharedConfiguration"==i)return n.g.get("player","getConfiguration");if("getNetworkingEngine"==i)return function(){return n.h.Ab()};if("getDrmEngine"==i)return function(){return n.h.C};if("getAdManager"==i)return function(){return n.h.xg()};if("setVideoContainer"==i)return function(e){return n.h.kh(e)};if(n.g.jb()){if("getManifest"==i||"drmInfo"==i)return function(){return en(i+"() does not work while casting!"),null};if("attach"==i||"detach"==i)return function(){return en(i+"() does not work while casting!"),Promise.resolve()}}return n.g.jb()&&0==Object.keys(n.g.g.video).length&&(lW[i]||lz[i])||!n.g.jb()?n.h[i].bind(n.h):n.g.get("player",i)}})}),t=e,n=new Map,cr(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.j=new rm,e.j.te=e.l,e.o=new rm,e.o.te=e.s}(this)}function cr(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!a.has(e)}var i,r=e.h,a=new Set;for(i in r)n(i)&&(a.add(i),t(i,r[i]));for(e=Object.getPrototypeOf(r),i=Object.getPrototypeOf({});e&&e!=i;){for(var o=v(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,r[s]));e=Object.getPrototypeOf(e)}}function ca(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Kc(),startTime:null};e.i.pause();for(var n=v(lq),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),i=(n=v(lJ)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(i=(n=v(l$)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function co(e){var t=new rp("caststatuschanged");e.dispatchEvent(t)}function cs(e){var t=new rp(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function cu(e){for(var t,n=v(lJ),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 u={};for(r=(i=v(lq)).next();!r.done;r=i.next())u[r=r.value]=e.g.get("video",r);n.then(function(){if(e.i){for(var n=v(lq),i=n.next();!i.done;i=n.next())i=i.value,e.i[i]=u[i];for(i=(n=v(l$)).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.hh(s),t&&e.h.Qf(t.language,t.roles,t.forced),e.i.autoplay=o,a&&e.i.play()}},function(t){t=new rp("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)})}function cl(e,t,n){e.g.jb()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function cc(e,t,n,i){rm.call(this);var r=this;this.g=e,this.h=t,this.j=new es,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 ez(function(){cf(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return cd(e)},t.onSenderDisconnected=function(){return cd(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&cy(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),cy(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=lH(i.data);switch(r.type){case"PLAY":n.g.play(),cb(n);break;case"PAUSE":n.g.pause(),cb(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(),cb(n)):a&&"PLAYBACK_PAUSE"==a&&(n.g.pause(),cb(n));break;case"STOP":n.h.ic().then(function(){n.h&&cb(n)});break;case"GET_STATUS":cm(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||
1cb(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&&cm(n)}).catch(function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),cy(n,{requestId:Number(r.requestId),type:t},n.s)});break;default:cy(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=lH(t.data);switch(p.type){case"init":e.m=0,e.B=!1,e.A=!0,n=p.initState,i=p.appData,F(function(t){switch(t.g){case 1:for(r in n.player)a=n.player[r],e.h[r](a);return e.F(i),o=e.g.autoplay,n.manifest?(e.g.autoplay=!1,D(t,5),M(t,e.h.load(n.manifest,n.startTime),7)):M(t,Promise.resolve(),3);case 7:P(t,3);break;case 5:return s=L(t),u=new rp("error",(new Map).set("detail",s)),e.h&&e.h.dispatchEvent(u),t.return();case 3:if(!e.h)return t.return();for(l in n.video)c=n.video[l],e.g[l]=c;for(d in n.playerAfterLoad)h=n.playerAfterLoad[d],e.h[d](h);e.g.autoplay=o,n.manifest&&(e.g.play(),cb(e)),C(t)}}),cf(e);break;case"appData":e.F(p.appData);break;case"set":var f=p.targetName,g=p.property;if(p=p.value,"video"==f){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==g){t.setSystemVolumeLevel(p);break}else if("muted"==g){t.setSystemVolumeMuted(p);break}}e.H[f][g]=p;break;case"call":(f=e.H[p.targetName])[p.methodName].apply(f,p.args);break;case"asyncCall":f=p.targetName,g=p.methodName,"player"==f&&"load"==g&&(e.m=0,e.B=!1);var m=p.id,v=t.senderId;p=(t=e.H[f])[g].apply(t,p.args),"player"==f&&"load"==g&&(p=p.then(function(){e.A=!0})),p.then(function(){return cv(e,v,m,null)},function(t){return cv(e,v,m,t)})}}(e,t)},t.start(),t=v(lG);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(t){return cp(e,"video",t)});for(var i in rg)e.j.D(e.h,rg[i],function(t){return cp(e,"player",t)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,ch(e)}),e.j.D(e.g,"playing",function(){e.o=!1,ch(e)}),e.j.D(e.g,"pause",function(){ch(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,ch(e)}),e.j.D(e.g,"ended",function(){new ez(function(){e.g&&e.g.ended&&(e.o=!0,ch(e))}).Z(cT)})}(this)}function cd(e){e.m=0,e.A=!0,e.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,ch(e)}function ch(e){var t;F(function(n){return 1==n.g?M(n,Promise.resolve(),2):e.h?void(t=new rp("caststatuschanged"),e.dispatchEvent(t),cg(e)||cb(e),C(n)):n.return()})}function cp(e,t,n){e.h&&(cf(e),cy(e,{type:"event",targetName:t,event:n},e.l))}function cf(e){e.C.Z(cw);for(var t={video:{},player:{}},n=v(lK),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];if(e.h.U())for(var r in lY)0==e.m%lY[r]&&(t.player[r]=e.h[r]());for(var a in lW)0==e.m%lW[a]&&(t.player[a]=e.h[a]());for(var o in(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),cy(e,{type:"update",update:t},e.l),lz)0==e.m%lz[o]&&((t={player:{}}).player[o]=e.h[o](),cy(e,{type:"update",update:t},e.l));e.B&&(e.m+=1),cg(e)}function cg(e){return!!(e.A&&(e.g.duration||e.h.U()))&&(cm(e),e.A=!1,!0)}function cm(e,t){var n={contentId:e.h.Kc(),streamType:e.h.U()?"LIVE":"BUFFERED",contentType:""};e.h.U()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),cb(e,void 0===t?0:t,n)}function cv(e,t,n,i){e.h&&cy(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function cy(e,t,n,i){e.G&&(e=lV(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function cb(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?cx:e.h.uf()?cA:e.g.paused?cE:cS,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),cy(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}A(ci,rm),(b=ci.prototype).destroy=function(e){return e&&this.g.Jc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.l=this.i=null,rm.prototype.release.call(this),Promise.all(e)},b.ji=function(){return this.l},b.Zh=function(){return this.s},b.Dh=function(){return this.g.m&&l9},b.jb=function(){return this.g.jb()},b.Kf=function(){return this.g.Kf()},b.cast=function(){var e=this;return F(function(t){return 1==t.g?M(t,e.g.cast(),2):e.h?M(t,e.h.ic(),0):t.return()})},b.Sf=function(e){this.g.Sf(e)},b.dj=function(){var e;(e=this.g).h&&chrome.cast.requestSession(function(t){return l1(e,t)},function(t){return l2(e,t)})},b.Jc=function(){this.g.Jc()},b.Eh=function(e,t){t=void 0!==t&&t;var n=this;return F(function(i){if(1==i.g)return e==n.C&&t==n.B?i.return():(n.C=e,n.B=t,n.g.Jc(),M(i,n.g.destroy(),2));n.g=null,n.g=new l0(e,function(){return co(n)},function(){return cs(n)},function(e,t){return cl(n,e,t)},function(){return cu(n)},function(){return ca(n)},t),n.g.init(),C(i)})},z("shaka.cast.CastProxy",ci),ci.prototype.changeReceiverId=ci.prototype.Eh,ci.prototype.forceDisconnect=ci.prototype.Jc,ci.prototype.suggestDisconnect=ci.prototype.dj,ci.prototype.setAppData=ci.prototype.Sf,ci.prototype.cast=ci.prototype.cast,ci.prototype.receiverName=ci.prototype.Kf,ci.prototype.isCasting=ci.prototype.jb,ci.prototype.canCast=ci.prototype.Dh,ci.prototype.getPlayer=ci.prototype.Zh,ci.prototype.getVideo=ci.prototype.ji,ci.prototype.destroy=ci.prototype.destroy,A(cc,rm),(b=cc.prototype).isConnected=function(){return this.G},b.ri=function(){return this.o},b.$i=function(e){this.i=e},b.Gh=function(){this.i=null},b.aj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},b.Zi=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},b.Yi=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},b.destroy=function(){var e,t=this;return F(function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.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,rm.prototype.release.call(t),M(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),C(n)})},z("shaka.cast.CastReceiver",cc),cc.prototype.destroy=cc.prototype.destroy,cc.prototype.setContentArtist=cc.prototype.Yi,cc.prototype.setContentImage=cc.prototype.Zi,cc.prototype.setContentTitle=cc.prototype.aj,cc.prototype.clearContentMetadata=cc.prototype.Gh,cc.prototype.setContentMetadata=cc.prototype.$i,cc.prototype.isIdle=cc.prototype.ri,cc.prototype.isConnected=cc.prototype.isConnected;var cw=.5,cT=5,cx="IDLE",cS="PLAYING",cA="BUFFERING",cE="PAUSED";function ck(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=cI(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=cM(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=cI(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=cM(i,r),e.nestedCues.push(d)),d=cI(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function cI(e,t,n,i,r,a){return e=new t4(e,t,""),n&&e.textDecoration.push(nv),i&&(e.fontStyle=ng),e.color=r,e.backgroundColor=a,e}function cM(e,t){return(e=new t4(e,t,"")).lineBreak=!0,e}function cC(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function cD(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,cP(this)}function cR(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new t4(t,n,"");r.lineInterpretation=1;var a=cF.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=ck(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(a=cF.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function cP(e){cj(e,0,15),e.g=1}function cL(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=cU.has(n)?cU.get(n):String.fromCharCode(n);break;case 1:i=cO.get(n);break;case 2:e.i[e.g].pop(),i=c_.get(n);break;case 3:e.i[e.g].pop(),i=cB.get(n)}i&&e.i[e.g].push(new cC(i,e.m,e.j,e.o,e.l))}}function cN(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 cj(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var cU=new Map([[39,"â"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"â"]]),cO=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"]]),c_=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"]]),cB=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,"â"]]),cF=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 cV(e,t){this.h=0,this.o=new cD(e,t),this.i=new cD(e,t),this.g=this.j=new cD(e,t),this.l=0,this.m=null}
1function cH(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=cR(i,e.l,n),(n=e.i).g=0<n.h?n.h:0,cj(n,0,15),(n=e.j).g=0<n.h?n.h:0,cj(n,0,15),i.g=15),e.h=3,i.h=t,r}function cG(e){e.h=1,e.g=e.j,e.g.h=0}function cK(e){ei("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var cq="black green blue cyan red yellow magenta black".split(" "),cX="white green blue cyan red yellow magenta white_italics".split(" ");function cW(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",cz(this)}function cz(e){e.i=[];for(var t=0;16>t;t++)e.i.push(cY())}function cY(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function cJ(e,t){c$(e)&&(e.i[e.h][e.g]=new cC(t,e.C,e.A,e.s,e.B),e.g++)}function c$(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}function cQ(e,t,n){var i=new t4(e.j,t,"");i.textAlign=0===e.F?"left":1===e.F?"right":nt;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?eL: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=ck(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function cZ(){this.i=[],this.h=null,this.g=0}function c0(e){this.g=0,this.h=e}function c1(e){if(!e.sa())throw new eB(2,2,3e3);return e.h[e.g++]}function c2(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function c3(e,t){for(var n=[],i=0;8>i;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}function c4(e,t,n){var i=null;t=v(c3(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=cQ(a,n,e.i)),e.h[r]=null}return i}function c5(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function c6(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],c9[e<<2|(t=i[t])<<1|(n=i[n])]}cW.prototype.isVisible=function(){return this.l},cW.prototype.display=function(){this.l=!0},c0.prototype.sa=function(){return this.g<this.h.length},c0.prototype.ya=function(){return this.g},c0.prototype.skip=function(e){if(this.g+e>this.h.length)throw new eB(2,2,3e3);this.g+=e};var c8=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,"â"]]),c9="black blue green cyan red magenta yellow white".split(" ");function c7(){this.h=[],this.g=[],this.i=new cZ,this.l=0,this.m=new Map([["CC1",new cV(0,0)],["CC2",new cV(0,1)],["CC3",new cV(1,0)],["CC4",new cV(1,1)]]),this.s=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,de(this)}function de(e){e.o=0,e.s=0;for(var t=v(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,cP(n.i),cP(n.j),cP(n.o);e.B=!0}function dt(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function dn(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(y(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(i=0,e=n;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}function di(){this.j=new Map,this.i=this.h=0,this.g=dr}c7.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,de(this),e=v(this.j.values());for(var t=e.next();!t.done;t=e.next())c5(t.value)},c7.prototype.extract=function(e,t){if(this.B){for(var n=v(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(!(8>(e=new rN(e,0)).getLength())&&181===e.T()&&49===e.ma()&&0x47413934===e.P()&&3===e.T()&&0!=(64&(n=e.T())))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.T(),a=(4&r)>>2,o=e.T(),s=e.T();a&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,gb:o,Eb: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})))}},c7.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=v(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;if(16==(112&t.gb)){var i=t.gb>>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.gb&&255===t.Eb||!t.gb&&!t.Eb||!dt(t.gb)||!dt(t.Eb))return 45<=++e.l&&de(e),null;e.l=0,t.gb&=127,t.Eb&=127;var r=t.gb;if(1<=r&&15>=r||!t.gb&&!t.Eb)return null;if(r=null,16==(112&t.gb))e:{if(e.A.add(i),i=t.gb,e=t.Eb,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=cX[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,cN(o,n,1+o.g-o.h,o.h),cj(o,0,n-1),cj(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",cL(n.g,0,32),i=!1,"white_italics"===(t=cX[(14&e)>>
11])&&(t="white",i=!0),n.g.m=1==(1&e),n.g.j=i,n.g.l=t;else if(16==(247&i)&&32==(240&e)||23==(247&i)&&45==(255&e))t="black",0==(7&i)&&(t=cq[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))cL(n.g,1,e);else if(18==(246&i)&&32==(224&e))cL(n.g,1&i?3:2,e);else{if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.Eb){case 32:cG(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=cH(n,2,e);break;case 38:i=cH(n,3,e);break;case 39:i=cH(n,4,e);break;case 40:cL(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:cP(n.o),cK(n);break;case 43:cK(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=cR(t,n.l,e)),cj(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=cR(t,n.l,e),r=t.g-t.h+1,cN(t,r-1,r,t.h),cj(t,0,r-1),cj(t,t.g,15-t.g),n.l=e);break;case 46:cj(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=cR(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,cG(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.Eb,cL(n.g,0,t.gb),cL(n.g,0,e);return r}(this,a.value))&&i.push(a);for(a=(r=v(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 c0(t.h)),t.h=null,t.g=0));for(a=(r=v(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.sa();){var i=c1(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&c1(t).value),0!=r){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new c2(r));for(var o=e.j.get(r),s=t.ya();t.ya()-s<a;){r=o;var u=t,l=c1(u),c=l.value,d=l.pts;if(16===c){var h=c1(u);c=c<<16|h.value}if(0<=c&&31>=c){u=r;var p=c,f=d;if(u.g){var g=u.g;switch(r=null,p){case 8:!c$(g)||0>=g.g&&0>=g.h||(0>=g.g?(g.g=g.m-1,g.h--):g.g--,g.i[g.h][g.g]=null);break;case 13:if(g.isVisible()&&(r=cQ(g,f,u.i)),g.h+1>=g.o){for(f=1,u=g,p=0;16>f;f++,p++)u.i[p]=u.i[f];for(f=0;1>f;f++,p++)u.i[p]=cY()}else g.h++;g.g=0;break;case 14:g.isVisible()&&(r=cQ(g,f,u.i)),g.i[g.h]=cY(),g.g=0;break;case 12:g.isVisible()&&(r=cQ(g,f,u.i)),cz(g),(u=g).h=0,u.g=0}var m=r}else m=null}else if(128<=c&&159>=c)m=function(e,t,n,i){if(128<=n&&135>=n)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=c1(t).value,t=null,n=v(c3(e,n));for(var r=n.next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=cQ(r,i,e.i)),cz(r);return t}if(137===n)for(n=(t=v(c3(e,t=c1(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=c1(t).value,t=null,r=(n=v(c3(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=cQ(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=c1(t).value,t=null,r=(n=v(c3(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=cQ(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return c4(e,t=c1(t).value,i);if(143===n)return i=c4(e,255,i),c5(e),i;if(144===n)t.skip(1),i=c1(t).value,e.g&&(e.g.A=0<(128&i),e.g.C=0<(64&i));
1else if(145===n)i=c1(t).value,n=c1(t).value,t.skip(1),e.g&&(t=c6((48&n)>>4,(12&n)>>2,3&n),e.g.B=c6((48&i)>>4,(12&i)>>2,3&i),e.g.s=t);else if(146===n)i=c1(t).value,t=c1(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=c1(t).value,t.skip(1),e.g&&(e.g.F=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new cW(n,e.i);a.j=i,e.h[n]=a}i=c1(t).value,a=c1(t).value;var o=c1(t).value,s=c1(t).value,u=c1(t).value;t=c1(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&u)+1,e.g=e.h[n]}}}return null}(r,u,c,d);else{if(4096<=c&&4127>=c)r=u,u=255&c,8<=u&&15>=u?r.skip(1):16<=u&&23>=u?r.skip(2):24<=u&&31>=u&&r.skip(3);else if(4224<=c&&4255>=c)r=u,u=255&c,128<=u&&135>=u?r.skip(4):136<=u&&143>=u&&r.skip(5);else if(32<=c&&127>=c)u=c,r.g&&(127===u?cJ(r.g,"âª"):cJ(r.g,String.fromCharCode(u)));else if(160<=c&&255>=c)r.g&&cJ(r.g,String.fromCharCode(c));else if(4128<=c&&4223>=c){if(u=255&c,r.g)if(c8.has(u)){var y=c8.get(u);cJ(r.g,y)}else cJ(r.g,"_")}else 4256<=c&&4351>=c&&r.g&&(160!=(255&c)?cJ(r.g,"_"):cJ(r.g,"[CC]"));m=null}(r=m)&&n.push(r)}}}}catch(e){if(e instanceof eB&&3e3===e.code)ei("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(this,a.value),i.push.apply(i,y(a));return this.i.i=[],this.h=[],this.g=[],i},c7.prototype.getStreams=function(){return Array.from(this.A)},z("shaka.cea.CeaDecoder",c7),eR=function(){return new c7},di.prototype.init=function(e){function t(e){(e=e.name)in dl&&(n.g=dl[e])}var n=this,i=[],r=[];if((new rO).box("moov",r_).box("mvex",r_).R("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.P(),t=t.P(),n.h=e,n.i=t}).box("trak",r_).R("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.P();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.ma(),t.ma(),t.ma(),t.ma(),i.push(n)}).box("mdia",r_).R("mdhd",function(e){e=aB(e.reader,e.version),r.push(e.timescale)}).box("minf",r_).box("stbl",r_).R("stsd",rB).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",rF).box("sinf",r_).box("frma",function(e){(e=aH(e.reader).codec)in dl&&(n.g=dl[e])}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new eB(2,2,2010);this.g==dr&&en("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},di.prototype.parse=function(e){var t=this;if(this.g==dr)return[];var n=[],i=0,r=[];return(new rO).box("moof",function(e){i=e.start,r=[],r_(e)}).box("traf",function(e){r.push({baseMediaDecodeTime:null,cd:t.h,Kd:t.i,Sg:[],timescale:9e4}),r_(e)}).R("trun",function(e){var t=r[r.length-1];e=aF(e.reader,e.version,e.flags),t.Sg.push(e)}).R("tfhd",function(e){var n=r[r.length-1];n.cd=(e=aO(e.reader,e.flags)).cd||t.h,n.Kd=e.Kd||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))}).R("tfdt",function(e){r[r.length-1].baseMediaDecodeTime=(e=a_(e.reader,e.version)).baseMediaDecodeTime}).box("mdat",function(e){for(var a=i-e.start-8,o=e.reader.ya(),s=v(r),u=s.next();!u.done;u=s.next()){if(null===(u=u.value).baseMediaDecodeTime)throw en("Unable to find base media decode time for CEA captions!"),new eB(2,2,2010);e.reader.seek(o),function(e,t,n,i,r,a,o,s,u){var l=0,c=a,d=s.map(function(e){return e.Zg});for((d=[].concat.apply([],y(d))).length&&(c=d[0].sampleSize||a),t.skip(o+s[0].Ih);t.sa();){o=t.P();var h=t.T(),p=null;switch(p=!1,s=1,e.g){case da:p=6==(p=31&h);break;case ds:s=2,t.skip(1),p=39==(p=h>>1&63)||40==p;break;case du:s=2,t.skip(1),p=23==(p=h>>1&63)||24==p;break;default:return}if(p)for(h=0,l<d.length&&(h=d[l].me||0),h=(n+h)/i,p=(s=v(dn(t.vb(o-s)))).next();!p.done;p=s.next())u.push({packet:p.value,pts:h});else try{t.skip(o-s)}catch(e){break}0==(c-=o+4)&&(n=l<d.length?n+(d[l].Pf||r):n+r,c=++l<d.length&&d[l].sampleSize||a)}}(t,e.reader,u.baseMediaDecodeTime,u.timescale,u.cd,u.Kd,a,u.Sg,n)}}).parse(e,!1),n},z("shaka.cea.Mp4CeaParser",di);var dr=0,da=1,ds=2,du=3,dl={avc1:1,avc3:1,dvav:1,dva1:1,hev1:2,hvc1:2,dvh1:2,dvhe:2,vvc1:3,vvi1:3,dvc1:3,dvi1:3};function dc(){this.g=null}function dd(t,n,i){var r=function(e){var t=[];e=v(e);for(var n=e.next();!n.done;n=e.next())(n=function(e){var t=e.attributes.schemeIdUri,n=tB(e,"urn:mpeg:cenc:2013","default_KID"),i=tF(e,"urn:mpeg:cenc:2013","pssh").map(tN),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new eB(2,4,4009);var a=[];try{a=i.map(function(e){return{initDataType:"cenc",initData:nX(e),keyId:null}})}catch(e){throw new eB(2,4,4007)}return{node:e,Uc: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,u=new Set(r.map(function(e){return e.keyId}));u.delete(null);var l="cenc";if(1<u.size)throw new eB(2,4,4010);
1if(!n){if(1<(o=r.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.Uc})).length)throw new eB(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw en("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new eB(2,4,4042);var n=tO(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n||"urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri||!(n=tO(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"))||(t=n.attributes.IV,n=tm(n.attributes.keyUriTemplate),!t||!n))throw new eB(2,4,4051);if(16!=(t=nW(t.substr(2))).byteLength)throw new eB(2,4,4048);return{wi:n,iv:t}}(o[0])),(o=r.find(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Uc}))&&o.encryptionScheme&&(l=o.encryptionScheme),(o=r.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Uc?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.Uc})).length&&0==(t=function(e,t,n,i,r){var a=[];n=v(n);for(var o=n.next();!o.done;o=n.next()){var s,u=i[(o=o.value).Uc];if(u){if((s=tO(o.node,"urn:microsoft:playready","pro"))&&tL(s)){s=nX(s=tL(s));var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);s=[{initData:rY(s,l,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else s=null;if(l=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.Uc)if(l=o,0==r.size)l=null;else{var c=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);l=[{initData:rY(new Uint8Array([]),c,r,1),initDataType:"cenc",keyId:l.keyId}]}s=n$(u,t,o.init||e||s||l),(u=df.get(u))&&(s.licenseServerUri=u(o)),a.push(s)}}return a}(a,l,o,i,u)).length&&(t=[n$("",l,a)])}if(r.length&&!s&&(n||!o.length))for(t=[],i=(n=v(Object.values(i))).next();!i.done;i=n.next())"org.w3.clearkey"!=(i=i.value)&&t.push(n$(i,l,a));if(u=Array.from(u)[0]||null)for(n=(l=v(t)).next();!n.done;n=l.next())for(i=(n=v(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=u;return{rg:u,kk:a,drmInfos:t,Ke:s,wg:!0}}function dh(e){var t=tO(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tL(t))?t:(e=tO(e.node,"urn:microsoft:playready","pro"))&&tL(e)&&(e=(function(e){var t=0,n=ek(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=eA(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=nX(e=tL(e))).filter(function(e){return e.type===dp})[0])&&(e=tM(e=td(e.value,!0),"WRMHEADER"))?function(e){e=v(tj(e,"DATA"));for(var t=e.next();!t.done;t=e.next())if((t=t.value).children){t=v(t.children);for(var n=t.next();!n.done;n=t.next())if("LA_URL"==(n=n.value).tagName)return tL(n)}return""}(e):""}eD["video/mp4"]=function(){return new di},dc.prototype.init=function(){},dc.prototype.parse=function(e){this.g?this.g.clearData():this.g=new a2;var t=[];if(!a6(e=eA(e)))return t;var n=(e=this.g.parse(e)).dd(),i=e.Qd();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=v(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=v(dn(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},z("shaka.cea.TsCeaParser",dc),eD["video/mp2t"]=function(){return new dc};var dp=1,df=(new Map).set("com.apple.fps",function(e){if(ta())throw new eB(2,4,4054);return(e=tO(e.node,"https://dashif.org/CPS","Laurl"))&&(e=tL(e))?e:""}).set("com.widevine.alpha",function(e){var t=tO(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tL(t))?t:(e=tO(e.node,"urn:microsoft","laurl"))&&tm(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",dh).set("com.microsoft.playready.recommendation",dh).set("com.microsoft.playready.software",dh).set("com.microsoft.playready.hardware",dh).set("org.w3.clearkey",function(e){var t=tO(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tL(t))?t:(e=tO(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=tL(e))?e:""});function dg(t,n,i,r,a,o){var s={RepresentationID:n,Number:i,SubNumber:r,Bandwidth:a,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[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))&&en("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 dm(e,t){var n=dy(e,t,"timescale"),i=1;n&&(i=tX(n)||1),(n=tX((n=dy(e,t,"duration"))||""))&&(n/=i);var r=dy(e,t,"startNumber"),a=Number(dy(e,t,"presentationTimeOffset"))||0,o=tW(r||"");if((null==r||null==o)&&(o=1),r=null,t=db(e,t,"SegmentTimeline")){t=tP(t,"S"),r=i,e=e.ia.duration||1/0;for(var s=o,u=[],l=-a,c=0;c<t.length;++c){var d=t[c],h=t[c+1],p=t_(d,"t",tW),f=t_(d,"d",tW),g=t_(d,"r",tq);if(d=t_(d,"k",tq)||0,null!=p&&(p-=a),f){if(p=null!=p?p:l,0>
1(g=g||0))if(h){if(null==(h=t_(h,"t",tW))||p>=h)break;g=Math.ceil((h-p)/f)-1}else{if(1/0==e||p/r>=e)break;g=Math.ceil((e*r-p)/f)-1}for(0<u.length&&p!=l&&(u[u.length-1].end=p/r),h=0;h<=g;++h)l=p+f,u.push({start:p/r,end:l/r,eg:p,Cb:d,Wi:u.length+s}),p=l}}r=u}return{timescale:i,Qa:n,yd:o,Qb:a/i||0,dg:a,timeline:r}}function dv(e,t){return[t(e.J),t(e.ga),t(e.oa)].filter(iv)}function dy(e,t,n){t=dv(e,t),e=null,t=v(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function db(e,t,n){t=dv(e,t),e=null,t=v(t);for(var i=t.next();!i.done&&!(e=tU(i.value,n));i=t.next());return e}function dw(e){this.h=ek(e),this.g=new rN(this.h,0)}function dT(e){var t=dx(e);if(7<t.length)throw new eB(2,3,3002);var n=0;t=v(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=dx(e);e:{i=v(dS);for(var r=i.next();!r.done;r=i.next())if(eT(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.ya();else{if(8==t.length&&224&t[1])throw new eB(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.ya()+t<=e.h.byteLength?t:e.h.byteLength-e.g.ya(),i=ek(e.h,e.g.ya(),t),e.g.skip(t),new dA(n,i)}function dx(e){var t=e.g.ya(),n=e.g.T();if(0==n)throw new eB(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),eA(e.h,t,n)}dw.prototype.sa=function(){return this.g.sa()};var dS=[[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 dA(e,t){this.id=e,this.g=t}function dE(e){if(8<e.g.byteLength)throw new eB(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new eB(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function dk(e,t,n){if(!(t=db(e,t,"Initialization")))return null;var i=e.J.Oa(),r=t.attributes.sourceURL;r&&(i=nJ(i,[tm(r)],e.ob())),r=0;var a=null;return(t=t_(t,"range",tK))&&(r=t.start,a=t.end),(n=new ay(function(){return i},r,a,dR(e),null,null,n)).codecs=e.J.codecs,n.mimeType=e.J.mimeType,n}function dI(e,t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E;return F(function(k){if(1==k.g)return s=e.presentationTimeline,u=!e.xb||!e.ia.vf,l=e.ia.start,c=e.ia.duration,d=e.J.mimeType.split("/")[1],p=null,f=[(h=t)(i,r,a,!1),"webm"==d?h(n.N(),n.Ka,n.ua,!0):null],h=null,M(k,Promise.all(f),2);if(m=(g=k.h)[0],y=g[1]||null,b=null,w=l-o,T=l,x=c?l+c:1/0,"mp4"==d)var I=function(e,t,n,i,r,a,o){var s,u=(new rO).R("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.P();if(0==u)throw new eB(2,3,3005);if(0==o.version)var l=o.reader.P(),c=o.reader.P();else l=o.reader.Tc(),c=o.reader.Tc();o.reader.skip(2);var d=o.reader.ma();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.P(),p=(0x80000000&h)>>>31;h&=0x7fffffff;var f=o.reader.P();if(o.reader.skip(4),1==p)throw new eB(2,3,3006);s.push(new aw(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 eB(2,3,3004)}(m,r,i,n,w,T,x);else{I=m;var C=new dw(y);if(0x1a45dfa3!=dT(C).id)throw new eB(2,3,3008);var D=dT(C);if(0x18538067!=D.id)throw new eB(2,3,3009);C=D.g.byteOffset,D=new dw(D.g);for(var R=null;D.sa();){var P=dT(D);if(0x1549a966==P.id){R=P;break}}if(!R)throw new eB(2,3,3010);for(D=null,R=new dw(R.g),P=1e6;R.sa();){var L=dT(R);if(2807729==L.id)P=dE(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 eB(2,3,3003)}if(null==D)throw new eB(2,3,3011);if(D*=R=P/1e9,0x1c53bb6b!=(I=dT(new dw(I))).id)throw new eB(2,3,3007);I=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new dw(e.g);for(var d=null,h=null;e.sa();){var p=dT(e);if(187==p.id){var f=function(e){var t=new dw(e.g);if(179!=(e=dT(t)).id)throw new eB(2,3,3013);if(e=dE(e),183!=(t=dT(t)).id)throw new eB(2,3,3012);t=new dw(t.g);for(var n=0;t.sa();){var i=dT(t);if(241==i.id){n=dE(i);break}}return{hj:e,Mi:n}}(p);f&&(p=n*f.hj,f=t+f.Mi,null!=d&&c.push(new aw(d+o,p+o,l,h,f-1,a,o,s,u)),d=p,h=f)}}return null!=d&&c.push(new aw(d+o,i+o,l,h,null,a,o,s,u)),c}(I,C,R,D,i,n,w,T,x)}for(A=(S=v(b=I)).next();!A.done;A=S.next())(E=A.value).codecs=e.J.codecs,E.mimeType=e.J.mimeType,E.bandwidth=e.bandwidth;return s.td(b),p=new oG(b),u&&p.Ic(T,x,!0),k.return(p)})}function dM(e){return e.Wc}function dC(e){var t=db(e,dM,"RepresentationIndex");return e=tK((e=dy(e,dM,"indexRange"))||""),t&&(e=t_(t,"range",tK,e)),e}function dD(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=n2&&"mp4"!=n&&"webm"!=n)throw new eB(2,4,4006);if("webm"==n&&!t)throw new eB(2,4,4005)}function dR(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.de,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ga.label||null,roles:e.roles||null,language:e.ga.language||null}}function dP(e){return e.Sb}function dL(t,n,i,r,a,o,s,u,l){l||t.J.Td||(t.J.Td=dy(t,dN,"initialization"));var c,d,h,p,f,g,m=t.J.Td?function(e,t){var n=e.J.Td;if(n||(n=dy(e,dN,"initialization")),!n)return null;n=tm(n);var i=e.J.id,r=e.bandwidth||null,a=e.J.Oa,o=e.ob;return(t=new ay(function(){var e=dg(n,i,null,null,r,null);return nJ(a(),[e],o())},0,null,dR(e),null,null,t)).codecs=e.J.codecs,t.mimeType=e.J.mimeType,t}(t,s):null,y=(d=dm(c=t,dN),h=dy(c,dN,"media"),p=dy(c,dN,"index"),f=dy(c,dN,"k"),g=0,f&&(g=parseInt(f,10)),{Qa:d.Qa,timescale:d.timescale,yd:d.yd,Qb:d.Qb,dg:d.dg,timeline:d.timeline,cc:h&&tm(h),kd:p,mimeType:c.J.mimeType,codecs:c.J.codecs,bandwidth:c.bandwidth,Di:g}),b=y,w=+!!b.kd;if(0==(w+=+!!b.timeline+ +!!b.Qa)||(1!=w&&(b.kd&&(b.timeline=null),b.Qa=null),!b.kd&&!b.cc))throw new eB(2,4,4002);var T=tk(t);if(y.kd)return dD(t,m),{nc:function(){var e=dg(y.kd,T.J.id,null,null,T.bandwidth||null,
1null);return e=nJ(T.J.Oa(),[e]),dI(T,n,m,e,0,null,y.Qb)}};if(y.Qa)return r||"image"===t.ga.contentType||"text"===t.ga.contentType||(i=t.ia.start,r=t.oa.id,l=t.ia.duration,r=(r=null!=r&&o[r]||l)?i+r:1/0,t.presentationTimeline.Cf(y.Qa),t.presentationTimeline.Qg(i,r)),{nc:function(){return function(t,n,i,r,a,o,s,u){function l(i){var a=(i-y)*m,s=a+n.Qb,l=a+p,c=Math.min(a=l+m,d()),h=[],f=n.Di;if(f)for(var g=(c-l)/f,v={},k=0;k<f;v={mh:void 0},k++){var I=l+g*k,M=I+g;v.mh=k+1,(v=new aw(I,M,function(t){return function(){var n=s*b;return"BigInt"in e&&n>Number.MAX_SAFE_INTEGER&&(n=BigInt(s)*BigInt(b)),n=dg(w,x,i,t.mh,T,n),nJ(S(),[n],A())}}(v),0,null,r,E,p,d(),[],"",null,null,aT,o)).codecs=t.J.codecs,v.mimeType=t.J.mimeType,0==u?0<k&&v.Nc():0!=k%u&&v.Nc(),h.push(v)}return(l=new aw(l,c,function(){if(f)return[];var t=s*b;return"BigInt"in e&&t>Number.MAX_SAFE_INTEGER&&(t=BigInt(s)*BigInt(b)),t=dg(w,x,i,null,T,t),nJ(S(),[t],A())},0,null,r,E,p,d(),h,"",null,null,aT,o,0<h.length)).codecs=t.J.codecs,l.mimeType=t.J.mimeType,l.bandwidth=t.bandwidth,l.j=a,l}function c(){var e=[Math.max(h.qb(),p),Math.min(h.Zb(),d())].map(function(e){return e-p});return e=[Math.ceil(e[0]/m),Math.ceil(e[1]/m)-1],t.J.Wa&&e[1]++,e.map(function(e){return e+y})}function d(){var e=null!=f&&a[f]||g;return e?p+e:1/0}var h=t.presentationTimeline,p=t.ia.start,f=t.oa.id,g=t.ia.duration,m=n.Qa,y=n.yd,b=n.timescale,w=n.cc,T=t.bandwidth||null,x=t.J.id,S=t.J.Oa,A=t.ob,E=p-n.Qb,k=c();i=t.xb?Math.max(k[0],k[1]-i+1):k[0],s=s||k[1],k=[];for(var I=i;I<=s;++I){var M=l(I);k.push(M)}var C=new oG(k);if(k=h.Zb()<d(),I=h.U(),k||I){var D=Math.max(i,s+1);i=m,t.J.Wa&&(i=.1),C.ue(i,function(){var e=h.qb();C.Ia(e);var t=v(c());t.next(),t=t.next().value;for(var n=[];D<=t;){var i=l(D);n.push(i),D++}return e>d()&&!n.length?null:n})}return Promise.resolve(C)}(T,y,a,m,o,s,u,t.J.oe)}};var x=null;r=r=null,t.oa.id&&t.J.id&&(r=i[r=t.oa.id+","+t.J.id])&&(x=r.segmentIndex);var S=t.ia.start,A=t.ia.duration?S+t.ia.duration:1/0,E=!(t.xb&&t.ia.vf);return x?(dU(i=x,y,S,A,E,m),i.Ia(t.presentationTimeline.qb())):x=new dj(y,t.J.id,t.bandwidth,t.J.Oa,t.ob,S,A,m,E,s,t.J.oe),y.timeline&&"image"!==t.ga.contentType&&"text"!==t.ga.contentType&&t.presentationTimeline.Rg(y.timeline,S),r&&t.xb&&(r.segmentIndex=x),{nc:function(){return x instanceof dj&&0==x.getNumReferences()&&dU(x,y,S,A,E,m),Promise.resolve(x)}}}function dN(e){return e.ec}function dj(e,t,n,i,r,a,o,s,u,l,c){oG.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=l,this.G=c,u&&dO(this)}function dU(e,t,n,i,r,a){if(function(e,t){if(e.s!==t){e.s=t,e=v(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&function e(t,n){t.ba=n,t=v(t.g);for(var i=t.next();!i.done;i=t.next())e(i.value,n)}(n,t)}}(e,a),e.h){if(n=e.h.timeline,e.h.cc!==t.cc&&(e.h.cc=t.cc),n.length){var o=n[n.length-1];t=t.timeline.filter(function(e){return e.end>o.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,y(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;r&&dO(e)}function dO(e){if(!e.o){for(var t=e.h.timeline;t.length;)if(t[t.length-1].start>=e.l)t.pop();else break;e.Ia(e.j)}}function d_(e,t,n,i,r,a,o,s){return e=dg(e,t,n,a,i||null,r),nJ(o(),[e],s()).map(function(e){return e.toString()})}function dB(e){this.o=null,this.A=e,this.G=new rv,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 dF(e,t){var n,i,r,a,o;return F(function(s){var u,l,c,d;return 1==s.g?(n=rx(nJ(e.i,[function(e,t){if(!e.m.length)return t;t=new nM(t);var n=e.B||e.m[0],i=Math.round(e.A.getBandwidthEstimate()),r=t.g;return"DASH"==e.s?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.s&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),nH(r),r.bd&&nP(t,r),t.toString()}(e,t)]),e.o.retryParameters),i=e.A.networkingEngine.request(8,n),ry(e.G,i),D(s,2),M(s,i.promise,4)):2!=s.g?(1==(a=JSON.parse(tc((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 ez(function(){dF(u,d)}),(c=l.TTL)&&(u.C=c),u.g.Z(u.C),u.m=l["PATHWAY-PRIORITY"]||[],u.F=l["PATHWAY-CLONES"]||[]),P(s,0)):(o=L(s))&&7001==o.code?s.return():void(null!=e.g&&(e.g.stop(),e.g=null),e.g=new ez(function(){dF(e,t)}),e.g.Z(e.C),C(s))})}function dV(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function dH(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=v(e.m),a=r.next(),o={};!a.done;o={Rc:void 0},a=r.next())if(o.Rc=a.value,a=t.get(o.Rc))i.push({If:o.Rc,location:a});else if(a=e.F.find(function(e){return function(t){return t.Aj==e.Rc}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].uh?(nD(s=new nM(s),a["URI-REPLACEMENT"].uh),i.push({If:o.Rc,location:s.toString()})):i.push({If:o.Rc,location:s}))}for(r=Date.now(),a=(o=v(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=v(e.j.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new nM(t.location).Fb))return!1;return!0})).length&&(e.B=i[0].If),!(i=i.map(function(e){return e.location})).length&&e.h)for(o=(r=v(e.h.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.B=e.h,i.push(o));
1if(!i.length)for(r=(t=v(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:nJ(e.i,i)}function dG(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.s=this.o=!1,this.m=new Set}function dK(e,t){var n=[],i=[],r=[],a=[];e=v(e);for(var o=e.next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map(function(e){return[hr(e),e]}));var u=new Map(s.videoStreams.map(function(e){return[hi(e),e]})),l=new Map(s.textStreams.map(function(e){return[ha(e),e]}));if(s=new Map(s.imageStreams.map(function(e){return[ho(e),e]})),t){var c=d7(n2);l.set(ha(c),c),c=d7("image"),s.set(ho(c),c)}n.push(o),i.push(u),r.push(l),a.push(s)}return{lg:n,sh:i,oh:r,Hg:a}}function dq(e){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,C,D;return F(function(R){switch(R.g){case 1:if(t=n3,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.Y}).map(function(e){return[hr(e),e]}))}),i=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.la}).map(function(e){return[hi(e),e]}))}),r=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.wa}).map(function(e){return[ha(e),e]}))}),a=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Ie}).map(function(e){return[ho(e),e]}))}),s=(o=v(r)).next();!s.done;s=o.next())u=s.value,l=d9(t.wa),u.set(ha(l),l);for(d=(c=v(a)).next();!d.done;d=c.next())h=d.value,p=d9(t.Ie),h.set(ho(p),p);return M(R,dX(f=new dG,[],n,0,dJ,dQ,0),2);case 2:return g=R.h,M(R,dX(f,[],i,0,dJ,dQ,0),3);case 3:return m=R.h,M(R,dX(f,[],r,0,dJ,dQ,0),4);case 4:return y=R.h,M(R,dX(f,[],a,0,dJ,dQ,0),5);case 5:if(b=R.h,w=0,m.length&&g.length)for(A=(S=v(g)).next();!A.done;A=S.next())for(E=A.value,I=(k=v(m)).next();!I.done;I=k.next())C=I.value,D=w++,C.variantIds.push(D),E.variantIds.push(D);else for(x=(T=v(m.concat(g))).next();!x.done;x=T.next())x.value.variantIds=[w++];return R.return(m.concat(g).concat(y).concat(b))}})}function dX(e,t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,y,b,w,T;return F(function(x){switch(x.g){case 1:for(u=0,s=[];u<n.length;u++)u>=i?s.push(new Set(n[u].values())):s.push(new Set);c=(l=v(t)).next();case 2:var S,A,E,k,I,C,D;if(c.done){x.u(4);break}return M(x,(S=e,A=c.value,E=n,k=i,I=a,C=s,D=o,F(function(e){return 1==e.g?(dZ(S,E,A,0<D),A.matchedStreams?A.segmentIndex?M(e,dW(A,k+D),2):e.u(2):e.return(!1)):(dz(A,k,I,C,D),e.return(!0))})),5);case 5:if(!x.h)throw new eB(2,4,4037);c=l.next(),x.u(2);break;case 4:for(h=(d=v(s)).next();!h.done;h=d.next())for(f=(p=v(h.value)).next();!f.done;f=p.next())(g=function(e,t,n,i,r,a){if(hn(t))return null;var o=i(t);return(dZ(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return F(function(e){return o.segmentIndex?e.u(0):(o.segmentIndex=new oW,M(e,dW(o,0),0))})}),o.matchedStreams&&o.matchedStreams.length)?(dz(o,0,r,a,0),o):null}(e,f.value,n,r,a,s))&&t.push(g);for(y=(m=v(s)).next();!y.done;y=m.next())for(w=(b=v(y.value)).next(),T={};!w.done;T={Xf:void 0},w=b.next())if(T.Xf=w.value,!hn(T.Xf)&&t.some(function(t){return function(n){return d1(e,t.Xf,n)}}(T)))throw new eB(2,4,4037);return x.return(t)}})}function dW(e,t){var n,i,r,a,o,s;return F(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 M(u,Promise.all(n),2)}if(e.segmentIndex instanceof oW)for(o=t;o<i.length;o++)(s=i[o]).segmentIndex&&e.segmentIndex.h.push(s.segmentIndex);C(u)})}function dz(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==iS(e.language,o.language)&&(s=!1),s&&(i[t-r].delete(o),o.fullMimeTypes))for(s=(o=v(o.fullMimeTypes.values())).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function dY(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=v(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t}function dJ(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set,t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function d$(e,t){function n(e,t){e||(e=[]),t=v(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=v(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=eG(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new eB(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=v(t.closedCaptions)).next();!r.done;r=i.next()){var a=v(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=dY(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var t=new oW,n=v(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),d$(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),d$(e.trickModeVideo,t))}function dQ(e,t){var n=e.roles;
1n||(n=[]);for(var i=v(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=v(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,y(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=v(t.closedCaptions)).next();!n.done;n=t.next())n=(i=v(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function dZ(e,t,n,i){i=(void 0===i?0:i)?n.matchedStreams:[],t=v(t);for(var r=t.next();!r.done;r=t.next()){if(!(r=function(e,t,n){var i={audio:hr,video:hi,text:ha,image:ho}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a=({audio:function(t,n){return d1(e,t,n)},video:function(t,n){return d1(e,t,n)},text:d2,image:d3})[n.type];for(var o={audio:d4,video:d5,text:d6,image:d8}[n.type],s=v(t.values()),u=s.next();!u.done;u=s.next())a(n,u=u.value)&&n.fastSwitching==u.fastSwitching&&(!r||o(n,r,u))&&(r=u)}return e.s&&!hn(r)&&t.delete(i(r)),r}(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function d0(e,t){return e.mimeType==t.mimeType&&hs(e.codecs)===hs(t.codecs)}function d1(e,t,n){return(!!d0(t,n)||!!e.o)&&(!t.drmInfos||!!eH(t.drmInfos,n.drmInfos))}function d2(e,t){return!t.language||e.forced===t.forced&&0!=iS(e.language,t.language)&&t.kind==e.kind}function d3(){return!0}function d4(e,t,n){var i=d0(e,t),r=d0(e,n);if(i&&!r)return!1;if(!i&&r||(i=iS(e.language,t.language),(r=iS(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=he(e.channelsCount,t.channelsCount,n.channelsCount))==hu||i!=hc&&((i=he(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==hu||i!=hc&&!!e.bandwidth&&ht(e.bandwidth,t.bandwidth,n.bandwidth)==hu))}function d5(e,t,n){var i=d0(e,t),r=d0(e,n);if(i&&!r)return!1;if(!i&&r||(i=he(e.width*e.height,t.width*t.height,n.width*n.height))==hu)return!0;if(i==hc)return!1;if(e.frameRate){if((i=he(e.frameRate,t.frameRate,n.frameRate))==hu)return!0;if(i==hc)return!1}return!!e.bandwidth&&ht(e.bandwidth,t.bandwidth,n.bandwidth)==hu}function d6(e,t,n){var i=iS(e.language,t.language),r=iS(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 d8(e,t,n){return he(e.width*e.height,t.width*t.height,n.width*n.height)==hu}function d9(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 d7(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new oG([]),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 he(e,t,n){if(t==e&&e!=n)return hc;if(n==e&&e!=t)return hu;if(t>e){if(n<=e||n-e<t-e)return hu;if(n-e>t-e)return hc}else{if(n>e)return hc;if(e-n<e-t)return hu;if(e-n>e-t)return hc}return hl}function ht(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?hu:t<e?hc:hl}function hn(e){switch(e.type){case n2:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function hi(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,hs(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth])}function hr(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,hs(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary])}function ha(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function ho(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function hs(e){if(!hd.has(e)){var t=it(e);hd.set(e,t)}return hd.get(e)}A(dj,oG),(b=dj.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},b.release=function(){oG.prototype.release.call(this),this.h=null},b.Ia=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)}},b.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},b.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.Wi,a=this.h.dg+i.eg;n=this.j-this.h.Qb;var o=this.j+i.end,s=o;e===this.getNumReferences()-1&&1/0!==this.l&&(s=this.l);for(var u=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],h=(i.end-i.start)/i.Cb,p={},f=0;f<i.Cb;p={we:void 0,nh:void 0},f++){var g=i.start+h*f,m=g+h;p.nh=f+1,p.we=null,(p=new aw(this.j+g,this.j+m,function(e){return function(){return t.h?(null==e.we&&(e.we=d_(t.h.cc,t.F,r,t.B,a,e.nh,t.C,t.H)),e.we):[]}}(p),0,null,this.s,n,this.j,this.l,[],"",null,null,aT,this.A)).codecs=u,p.mimeType=l,p.bandwidth=c,0==this.G?0<f&&p.Nc():0!=f%this.G&&p.Nc(),d.push(p)}(n=new aw(this.j+i.start,s,function(){return 0<i.Cb||!t.h?[]:d_(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,aT,this.A,0<i.Cb)).codecs=u,n.mimeType=l,n.j=o,n.bandwidth=c,this.g[e]=n}return n},b.yb=function(e){dO(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},dB.prototype.configure=function(e){this.o=e},dB.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()},dB.prototype.setManifestType=function(e){this.s=e},dB.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(b=dG.prototype).release=function(){for(var e=v(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()},b.ii=function(){return this.l},b.nf=function(){return this.j.slice()},b.Rh=function(){return this.i},b.sg=function(e,t){if(e){if("audio"==e.type)for(var n=v(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=v(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==n2)for(i=(n=v(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=v(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)}},b.Oe=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,D,R,P,L,N,j=this;return F(function(U){if(1==U.g){if(i=n3,!t&&1==e.length)return a=(r=dK(e,!1)).lg,o=r.sh,s=r.oh,u=r.Hg,j.h=Array.from(a[0].values()),j.g=Array.from(o[0].values()),j.j=Array.from(s[0].values()),j.i=Array.from(u[0].values()),U.u(2);for(d=0,l=n?j.m.size:0,c=-1;d<e.length;d++)h=e[d],j.m.has(h.id)||(j.m.add(h.id),-1==c&&(c=d));return -1==c?U.return():(f=(p=dK(e,!0)).lg,g=p.sh,m=p.oh,y=p.Hg,M(U,Promise.all([dX(j,j.h,f,c,dY,d$,l),dX(j,j.g,g,c,dY,d$,l),dX(j,j.j,m,c,dY,d$,l),dX(j,j.i,y,c,dY,d$,l)]),2))}if(b=0,w=[],j.g.length&&j.h.length)for(k=(E=v(j.h)).next();!k.done;k=E.next())for(I=k.value,R=(D=v(j.g)).next();!R.done;R=D.next())P=R.value,L=eG(I.drmInfos,P.drmInfos),I.drmInfos.length&&P.drmInfos.length&&!L.length||(N=b++,w.push({id:N,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I,video:P,bandwidth:(I.bandwidth||0)+(P.bandwidth||0),drmInfos:L,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(x=(T=v(j.g.length?j.g:j.h)).next();!x.done;x=T.next())S=x.value,A=b++,w.push({id:A,language:S.language,disabledUntilTime:0,primary:S.primary,audio:S.t
1ype==i.Y?S:null,video:S.type==i.la?S:null,bandwidth:S.bandwidth||0,drmInfos:S.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});j.l=w,C(U)})},b.bh=function(e){this.o=e},b.ih=function(e){this.s=e},z("shaka.util.PeriodCombiner",dG),dG.prototype.setUseStreamOnce=dG.prototype.ih,dG.prototype.setAllowMultiTypeVariants=dG.prototype.bh,dG.prototype.combinePeriods=dG.prototype.Oe,dG.prototype.deleteStream=dG.prototype.sg,dG.prototype.getImageStreams=dG.prototype.Rh,dG.prototype.getTextStreams=dG.prototype.nf,dG.prototype.getVariants=dG.prototype.ii;var hu=1,hl=0,hc=-1,hd=new Map;function hh(e,t){try{var n=th(e),i=t,r=new DOMParser,a=hp.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 hp=new eV(function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}});function hf(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.qa=1,this.F=[],this.l={be:"",type:"",profiles:[],Nb:null,Wa:0,Oa:null,wd:0},this.s=new Map,this.o={},this.B={},this.ka={},this.m=new dG,this.K=0,this.na=new $(5),this.L=new ez(function(){if(e.I&&!e.g.continueLoadingWhenPaused&&(e.G.cb(e.I,"timeupdate"),e.I.paused))return void e.G.va(e.I,"timeupdate",function(){return hS(e)});hS(e)}),this.S=new rv,this.O=null,this.C=[],this.da=1/0,this.H=!1,this.h=null,this.M=0,this.ja=!1,this.G=new es,this.I=null,this.V=!1,this.aa="",this.fa=function(){return!1},this.$=[]}function hg(e){var t,n,i,r,a,o,s,u,l;return F(function(c){if(1==c.g)return t=4,n="MPD",i=function(e){var t=e.l.wd;if(!e.l.be||!t||!e.F.length)return[];var n=Date.now()/1e3,i=e.F.filter(function(e){return!(e=tW(e.attributes.ttl))||t+e>n}).map(tN).filter(iv);return i.length?nJ(e.A,i):[]}(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(a=dH(e.h,"Location",!0)).length&&(r=a),o=rx(r,e.g.retryParameters),s=Date.now(),M(c,hC(e,o,0,{type:t}),2);if(3!=c.g){var d,h,p,f,g,m,b,w,T,x,S,A;return(u=c.h,e.j)?(u.uri&&u.uri!=u.originalUri&&!e.A.includes(u.uri)&&e.A.unshift(u.uri),e.aa=new nM(u.uri).g.toString(),M(c,(d=e,h=u.data,p=u.uri,f=n,F(function(e){if(1==e.g){var t,n,i,r,a,o,s,u,l,c,E,k,I,D,R,P,L,N,j,U,O,_,B,V,H;if(g=h,(m=d.g.dash.manifestPreprocessor)!=sG){if(ef("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(b=hh(g,f)))throw new eB(2,4,4001,p);m(b),g=tp(b.outerHTML)}if(!(w=tI(g,f)))throw new eB(2,4,4001,p);return((T=d.g.dash.manifestPreprocessorTXml)!=sK&&T(w),"Patch"===f)?e.return((t=d,n=w,F(function(e){if(1==e.g){if(i=n.attributes.mpdId,r=t_(n,"originalPublishTime",tH),!i||i!==t.l.be||r!==t.l.wd)throw t.F=[],new eB(1,4,4052);for(a=[],o=[],s=new Set,l=(u=v(tR(n))).next();!l.done;l=u.next())if(k=(E=t$((c=l.value).attributes.sel||""))[E.length-1],I=tN(c)||"","MPD"===k.name)if("mediaPresentationDuration"===k.Vb){var d,h,p=tG(tN(c)||"");if(null!=p){t.l.Nb=p;for(var f=v(t.s.values()),g=f.next();!g.done;g=f.next())g.value.Nb=p}}else if("type"===k.Vb){for(t.i.presentationTimeline.zc("static"==I),t.l.type=I,f=(p=v(t.s.values())).next();!f.done;f=p.next())f.value.xb="dynamic"==I;"static"==I&&(t.K=-1)}else"publishTime"===k.Vb?t.l.wd=tH(I)||0:null===k.Vb&&"add"===c.tagName&&o.push(c);else if("PatchLocation"===k.name)tQ(t.F,c);else if("Period"===k.name)"add"===c.tagName?o.push(c):"remove"===c.tagName&&k.id&&function(e,t){e.i.periodCount--;for(var n=v(e.s.keys()),i=n.next();!i.done;i=n.next())(i=i.value).startsWith(t)&&(db(e.s.get(i),dN,"SegmentTimeline").children=[],hb(e,i),e.s.delete(i));e.C=e.C.filter(function(e){return e!==t})}(t,k.id);else if("SegmentTemplate"===k.name){if((p=(f=t$(c.attributes.sel||""))[f.length-1]).Vb){f=hy(t,f),g=tN(c)||"";for(var m=v(f),b=m.next();!b.done;b=m.next())t0((b=t.s.get(b.value)).J.ec,c.tagName,p.Vb,g);p=f}else p=[];
1for(R=(D=v(p)).next();!R.done;R=D.next())P=R.value,s.add(P)}else if("SegmentTimeline"===k.name||"S"===k.name){for(g=(f=v(p=hy(t,p=t$(c.attributes.sel||"")))).next();!g.done;g=f.next())tQ(m=tP(g=db(g=t.s.get(g.value),dN,"SegmentTimeline"),"S"),c),g.children=m;for(N=(L=v(p)).next();!N.done;N=L.next())j=N.value,s.add(j)}for(O=(U=v(s)).next();!O.done;O=U.next())hb(t,O.value);for(B=(_=v(o)).next();!B.done;B=_.next()){V=B.value,a.push.apply(a,y((d=t,h=V,hw(d,{xb:"dynamic"==d.l.type,presentationTimeline:d.i.presentationTimeline,oa:null,ia:null,ga:null,J:null,bandwidth:0,qf:!1,Wa:d.l.Wa,profiles:d.l.profiles,Nb:d.l.Nb,roles:null,ob:function(){return""}},d.l.Oa,h,!0).periods)))}return a.length?(t.i.periodCount+=a.length,t.i.gapCount=t.M,M(e,hv(t,a,!0),2)):e.u(2)}"static"==t.l.type&&(H=t.l.Nb,t.i.presentationTimeline.bb(H||1/0)),C(e)}))):d.g.dash.disableXlinkProcessing?e.return(hm(d,w,p)):(x=d.g.dash.xlinkFailGracefully,S=function e(t,n,i,r,a,o){if(o=void 0===o?0:o,tB(t,"http://www.w3.org/1999/xlink","href")){var s=function(t,n,i,r,a,o){for(var s=tB(t,"http://www.w3.org/1999/xlink","href"),u=tB(t,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=v(Object.keys(t.attributes)),c=l.next();!c.done;c=l.next()){var d=(c=c.value).split(":"),h=tC("http://www.w3.org/1999/xlink");d[0]==h&&delete t.attributes[c]}if(5<=o)return ru(new eB(2,4,4028));if("onLoad"!=u)return ru(new eB(2,4,4027));var p=nJ([r],[s]);return a.request(0,rx(p,n)).Ca(function(r){if(!(r=tI(r.data,t.tagName)))return ru(new eB(2,4,4001,s));for(t.children=[];r.children.length;){var u=r.children.shift();t.children.push(u)}u=v(Object.keys(r.attributes));for(var l=u.next();!l.done;l=u.next())l=l.value,t.attributes[l]=r.attributes[l];return e(t,n,i,p[0],a,o+1)})}(t,n,i,r,a,o);return i&&(s=s.Ca(void 0,function(){return e(t,n,i,r,a,o)})),s}s=[];for(var u=v(tR(t)),l=u.next(),c={};!l.done;c={Zc:void 0},l=u.next())c.Zc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==tB(c.Zc,"http://www.w3.org/1999/xlink","href")?t.children=t.children.filter(function(e){return function(t){return t!==e.Zc}}(c)):"SegmentTimeline"!=c.Zc.tagName&&s.push(e(c.Zc,n,i,r,a,o));return rh(s).Ca(function(){return t})}(w,d.g.retryParameters,x,p,d.j.networkingEngine),ry(d.S,S),M(e,S.promise,2))}return A=e.h,e.return(hm(d,A,p))})),3)):c.return(0)}return l=(Date.now()-s)/1e3,e.na.sample(1,l),c.return(l)})}function hm(e,t,n){var i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,R,N,j,U,O,_,B,V,H,G,K,q,X,W,z,Y,J,$,Q,Z,ee,et,ei,er,ea,eo;return F(function(es){switch(es.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],a=new Map,s=(o=v(tP(t,"Location"))).next();!s.done;s=o.next())l=(u=s.value).attributes.serviceLocation,(c=tN(u))&&(d=nJ(i,[c])[0],l&&(e.h?dV(e.h,"Location",l,d):a.set(l,d)),r.push(d));if(e.h?0<(h=dH(e.h,"Location",!0)).length&&(i=e.A=h):r.length&&(i=e.A=r),e.l.be=t.attributes.id||"",e.l.wd=t_(t,"publishTime",tH)||0,e.F=tP(t,"PatchLocation"),p=Promise.resolve(),(f=tU(t,"ContentSteering"))&&e.j)for(g=f.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=g):(e.h=new dB(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=g,(m=tN(f))&&(t_(f,"queryBeforeStart",tY,!1)?p=dF(e.h,m):dF(e.h,m))),b=(y=v(a.keys())).next();!b.done;b=y.next())w=b.value,T=a.get(w),dV(e.h,"Location",w,T);if(x=tP(t,"BaseURL"),S=!1,e.h)for(E=(A=v(x)).next();!E.done;E=A.next())I=(k=E.value).attributes.serviceLocation,R=tN(k),I&&R&&(dV(e.h,"BaseURL",I,R),S=!0);if(e.$=null,S&&e.h||(N=x.map(tN),e.$=nJ(i,N)),j=function(){return e.h&&S?dH(e.h,"BaseURL"):e.$?e.$:[]},e.l.Oa=j,U=0,x&&x.length&&(U=t_(x[0],"availabilityTimeOffset",tz)||0),e.l.Wa=U,O=e.g.dash.ignoreMinBufferTime,_=0,O||(_=t_(t,"minBufferTime",tG)||0),e.K=t_(t,"minimumUpdatePeriod",tG,-1),B=t_(t,"availabilityStartTime",tH),V=t_(t,"timeShiftBufferDepth",tG),H=e.g.dash.ignoreSuggestedPresentationDelay,G=null,H||(G=t_(t,"suggestedPresentationDelay",tG)),K=e.g.dash.ignoreMaxSegmentDuration,q=null,K||(q=t_(t,"maxSegmentDuration",tG)),X=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.V=e.i.presentationTimeline.U()&&"static"==X),e.l.type=X,e.i)for(W=e.i.presentationTimeline,Y=(z=v(Object.values(e.o))).next();!Y.done;Y=z.next())(J=Y.value).segmentIndex&&J.segmentIndex.Ia(W.qb());else $=e.g.defaultPresentationDelay||1.5*_,W=new oS(B,null!=G?G:$,e.g.dash.autoCorrectDrift);return W.zc("static"==X),W.U()&&!isNaN(e.g.availabilityWindowOverride)&&(V=e.g.availabilityWindowOverride),null==V&&(V=1/0),W.pe(V),Q=t.attributes.profiles||"",e.l.profiles=Q.split(","),Z={xb:"static"!=X,presentationTimeline:W,oa:null,ia:null,ga:null,J:null,bandwidth:0,qf:!1,Wa:U,Nb:null,profiles:Q.split(","),roles:null,ob:function(){return""}},e.M=0,et=(ee=hw(e,Z,j,t,!1)).duration,ei=ee.periods,("static"!=X||e.V)&&ee.ug||W.bb(et||1/0),e.ja&&!e.H&&e.j.isAutoLowLatencyMode()&&(e.j.enableLowLatencyMode(),e.H=e.j.isLowLatencyMode()),e.H&&W.dh(e.da),W.Cf(q||1),M(es,p,2);case 2:if(e.H&&(_=0,er=null!=G?G:e.g.defaultPresentationDelay,W.Tf(er)),!e.i)return M(es,e.m.Oe(ei,Z.xb),6);return e.i.periodCount=ei.length,e.i.gapCount=e.M,M(es,hv(e,ei,!1),4);case 6:var eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey;if(e.i={presentationTimeline:W,variants:e.m.l,textStreams:e.m.nf(),imageStreams:e.m.i,offlineSessionIds:[],minBufferTime:_||0,sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:function(e){var t=tU(e,"ServiceDescription");if(!t||(e=tU(t,"Latency"),t=tU(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=tP(e,"SupplementalProperty")).length)return null;e=v(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.M,isLowLatency:e.ja,startTime:null},!W.qh()){es.u(7);break}return ea=tP(t,"UTCTiming"),M(es,(eu=e,el=j,ec=ea,F(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=v(ed)).next();case 2:if(ef.done){e.u(4);break}switch(eg=ef.value,D(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":en("NTP UTCTiming scheme is not supported");break;default:en("Unrecognized scheme in UTCTiming element",em)}e.u(9);break;case 7:return M(e,hk(eu,el,ev,"HEAD"),10);case 10:case 11:return e.return(e.h);case 8:return M(e,hk(eu,el,ev,"GET"),11);case 9:P(e,3);break;case 5:L(e);case 3:ef=ep.next(),e.u(2);break;case 4:return en("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();W.eh(eo);case 7:W.Yd();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),function(e){var t=Object.keys(e.B).filter(function(t){return!e.C.includes(t)});t=v(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=v(e.B[n]),a=r.next();!a.done;a=r.next()){a=a.value;var o=e.o[a];o.segmentIndex&&0!=o.segmentIndex.getNumReferences()?i=!1:(e.m&&e.m.sg(e.o[a],n),delete e.o[a])}i&&delete e.B[n]}}(e),C(es)}})}function hv(e,t,n){var i;return F(function(r){if(1==r.g)return M(r,e.m.Oe(t,!0,n),2);e.i.variants=e.m.l,0<(i=e.m.nf()).length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),C(r)})}function hy(e,t){var n="",i="",r=-1,a="";t=v(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=v(e.s.values())).next();!e.done;e=r.next())(e=e.value).oa.id===n&&e.ga.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(e=(i=v(e.s.values())).next();!e.done;e=i.next())(e=e.value).oa.id===n&&e.ga.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function hb(e,t){var n=e.s.get(t),i=e.o[t];i.segmentIndex&&i.segmentIndex.Ia(e.i.presentationTimeline.qb());try{var r=dL(n,function(t,n,i,r){return hI(e,t,n,i,r)},e.o,!0,e.g.dash.initialSegmentLimit,e.ka,n.J.aesKey,null,!0);i.createSegmentIndex=function(){return F(function(e){if(1==e.g)return i.segmentIndex?e.u(0):M(e,r.nc(),3);i.segmentIndex=e.h,C(e)})}}catch(e){if((t=n.J.contentType)!=n2&&"application"!=t&&"image"!=t||4002!=e.code)throw e}}function hw(t,n,i,r,a){var o=n.Nb;o||(o=t_(r,"mediaPresentationDuration",tG),t.l.Nb=o);var s=0;t.i&&t.i.presentationTimeline&&t.V&&(s=t.i.presentationTimeline.Kb());var u=[],l=s;r=tP(r,"Period");for(var c=0;c<r.length;c++){var d=r[c],h=r[c+1],p=t_(d,"start",tG,l),f=d.attributes.id,g=t_(d,"duration",tG);p=0==c&&0==p&&t.V?s:p;var m=null;if(h){var b=t_(h,"start",tG);null!=b&&(m=b-p+s)}else null!=o&&(m=o-p+s);if(b=n4,m&&g&&Math.abs(m-g)>b&&m>g&&t.M++,null==m&&(m=g),!(null!==t.O&&null!==f&&null!==p&&p<t.O)||t.C.includes(f)||c+1==r.length){if(null!==p&&(null===t.O||p>t.O)&&(t.O=p),l=function(t,n,i,r){n.oa=hE(t,r.node,null,i),n.ia=r,n.oa.Wa=n.Wa,n.oa.id||(n.oa.id="__shaka_period_"+r.start);var a=tP(r.node,"EventStream");i=n.presentationTimeline.qb(),a=v(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=t_(i,"timescale",tW)||1,u=t_(i,"presentationTimeOffset",tW)||0;i=v(tP(i,"Event"));for(var l=i.next();!l.done;l=i.next()){var c=t_(l=l.value,"presentationTime",tW)||0,d=t_(l,"duration",tW)||0;d=(c=Math.max((c-u)/s+t,t))+d/s,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<r||(l={schemeIdUri:a,value:o,startTime:c,endTime:d,id:l.attributes.id||"",eventElement:function e(t){var n="",i=t.tagName.split(":");for(var r in 0<i.length&&(n=i[0],n=t3.has(n)?t3.get(n):""),n=document.createElementNS(n,t.tagName),t.attributes)n.setAttribute(r,t.attributes[r]);for(r=(t=v(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}(l),eventNode:t1(l)},e.j.onTimelineRegionAdded(l))}}(t,r.start,r.duration,o.value,i);for(a=(i=v(i=tP(r.node,"SupplementalProperty"))).next();!a.done;a=i.next())"urn:mpeg:dash:urlparam:2014"==(a=a.value).attributes.schemeIdUri&&(a=hx(t,a))&&(n.ob=a);if(i=tP(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=nJ(n.ga.Oa(),[e],n.ob()),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.ga=hE(t,r,n.oa,null),n.ga.position=i;var u=!1,l=(i=tP(r,"Role")).map(function(e){return e.attributes.value}).filter(iv),c=void 0,d=n.ga.contentType==n2;d&&(c="subtitle"),i=v(i);for(var h=i.next();!h.done;h=i.next()){var p=(h=h.value).attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(h=h.attributes.value){case"main":u=!0;break;case"caption":case"subtitle":c=h}}var f=tP(r,"EssentialProperty");i=null;var g=!1;h=null,p=!1,f=v(f);for(var m=f.next();!m.done;m=f.next()){var b=(m=m.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==b)i=m.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==b)var w=s(parseInt(m.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==b)var T=o(parseInt(m.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=b&&("urn:mpeg:dash:ssr:2023"==b&&t.g.dash.enableFastSwitching?g=!0:"urn:dvb:dash:fontdownload:2014"==b?a(m):"urn:mpeg:dash:urlparam:2014"==b&&(h=hx(t,m))||(p=!0))}if(p)return null;var x=null;for(f=(p=v(p=tP(r,"SupplementalProperty"))).next();!f.done;f=p.next())"http://dashif.org/guidelines/last-segment-number"==(m=(f=f.value).attributes.schemeIdUri)?x=parseInt(f.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==m?w=s(parseInt(f.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==m?T=o(parseInt(f.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==m?a(f):"urn:mpeg:dash:urlparam:2014"==m&&(h=hx(t,f));h&&(n.ob=h),h=tP(r,"Accessibility");var S,A=new Map;for(p=(h=v(h)).next();!p.done;p=h.next())if(p=(f=p.value).attributes.schemeIdUri,f=f.attributes.value,"urn:scte:dash:cc:cea-608:2
1015"!=p||t.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=p||t.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=f&&(l.push(f),"captions"==f&&(c="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==f?S="visually impaired":"2"==f&&(S="hard of hearing"));else if(p=1,null!=f)for(m=(f=v(f.split(";"))).next();!m.done;m=f.next()){b=m.value;var E=m=void 0;b.includes("=")?(m="svc"+(b=b.split("="))[0],E=b[1].split(",")[0].split(":").pop()):(m="svc"+p,p++,E=b),A.set(m,ix(E))}else A.set("svc1","und");else if(p=1,null!=f)for(b=(m=v(f=f.split(";"))).next();!b.done;b=m.next()){E=b.value;var k=b=void 0;E.includes("=")?(b=(E=E.split("="))[0].startsWith("CC")?E[0]:"CC"+E[0],k=E[1]||"und"):(b="CC"+p,2==f.length?p+=2:p++,k=E),A.set(b,ix(k))}else A.set("CC1","und");var I=dd(h=tP(r,"ContentProtection"),t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI),D=ix(n.ga.language||"und"),R=n.ga.label;if(0==(r=(h=tP(r,"Representation")).map(function(i){return(i=function(t,n,i,r,a,o,s,u,l,c,d,h){n.J=hE(t,c,n.ga,null);var p,f,g=n.J.id;if(t.da=Math.min(t.da,n.J.Wa),t.ja=0<t.da,!function(e){var t=+!!e.Wc;return 0==(t+=+!!e.Sb+ +!!e.ec)?e.contentType==n2||"application"==e.contentType:(1!=t&&(e.Wc&&(e.Sb=null),e.ec=null),!0)}(n.J))return null;var m=n.ia.start;n.bandwidth=t_(c,"bandwidth",tX)||0,n.roles=u;var v=tP(c,"SupplementalProperty"),y=tP(c,"EssentialProperty"),b=null,w=y.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri});w?b=hx(t,w):(w=v.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri}))&&(b=hx(t,w)),b&&(n.ob=b),b=(w=n.J.contentType)==n2||"application"==w,w="image"==w;try{var T=void 0;if(i.Ke){var x=n.J.Oa,S=n.ob,A=nJ(x(),[i.Ke.wi],S()),E=rx(A,t.g.retryParameters);T={bitsKey:128,blockCipherMode:"CBC",iv:i.Ke.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;return F(function(a){if(1==a.g)return M(a,hC(t,E,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new eB(2,4,4049);return i={name:"AES-CBC"},r=T,M(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,T.fetchKey=void 0,C(a)})}}}if(n.J.aesKey=T,x=function(e,n,i,r){return hI(t,e,n,i,r)},n.J.Wc)var k,I,D,R,P,L,N,j,U,O=(k=n,I=x,D=T,R=Number(dy(k,dM,"presentationTimeOffset"))||0,P=dy(k,dM,"timescale"),L=1,P&&(L=tX(P)||1),N=R/L||0,j=dk(k,dM,D),function(e,t){if(dD(e,t),!dC(e))throw new eB(2,4,4002)}(k,j),U=tk(k),{nc:function(){var e=db(U,dM,"RepresentationIndex"),t=U.J.Oa();return e&&(e=tm(e.attributes.sourceURL))&&(t=nJ(t,[e],U.ob())),e=dC(U),dI(U,I,j,t,e.start,e.end,N)}});else if(n.J.Sb)O=function(e,t,n){var i=dk(e,dP,n),r=function(e){var t=function(e){return[e.J.Sb,e.ga.Sb,e.oa.Sb].filter(iv).map(function(e){return tP(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){return t.attributes.indexRange&&!e.qf&&(e.qf=!0),{Ci:tm(t.attributes.media),start:(t=t_(t,"mediaRange",tK,{start:0,end:null})).start,end:t.end}})}(e),n=(e=dm(e,dP)).yd;0==n&&(n=1);var i=0;return e.Qa?i=e.Qa*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{Qa:e.Qa,startTime:i,yd:n,Qb:e.Qb,timeline:e.timeline,Pc:t}}(e);if(!r.Qa&&!r.timeline&&1<r.Pc.length||!r.Qa&&!e.ia.duration&&!r.timeline&&1==r.Pc.length||r.timeline&&0==r.timeline.length)throw new eB(2,4,4002);var a=null,o=null;e.oa.id&&e.J.id&&(o=t[e.oa.id+","+e.J.id])&&(a=o.segmentIndex);var s=function(e,t,n,i,r,a,o,s,u,l){var c=i.Pc.length;i.timeline&&i.timeline.length!=i.Pc.length&&(c=Math.min(i.timeline.length,i.Pc.length));for(var d=e-i.Qb,h=t?e+t:1/0,p=[],f=i.startTime,g={},m=0;m<c;g={ve:void 0,ne:void 0},m++){g.ne=i.Pc[m];var v=f;f=void 0,f=null!=i.Qa?v+i.Qa:i.timeline?i.timeline[m].end:v+t,g.ve=null,(g=new aw(e+v,e+f,function(e){return function(){return null==e.ve&&(e.ve=nJ(n(),[e.ne.Ci],l())),e.ve}}(g),g.ne.start,g.ne.end,r,d,e,h,[],"",null,null,aT,a)).codecs=s,g.mimeType=o,g.bandwidth=u,p.push(g)}return p}(e.ia.start,e.ia.duration,e.J.Oa,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.ob);return t=!a,a?a.rd(s,e.presentationTimeline.qb()):a=new oG(s),e.presentationTimeline.td(s),e.xb&&e.ia.vf||a.Ic(e.ia.start,e.ia.duration?e.ia.start+e.ia.duration:1/0,t),o&&(o.segmentIndex=a),{nc:function(){return a&&0!=a.getNumReferences()||a.$d(s),Promise.resolve(a)}}}(n,t.o,T);else if(n.J.ec)O=dL(n,x,t.o,!!t.i,t.g.dash.initialSegmentLimit,t.ka,T,h,!1);else{var _=n.ia.duration||0,B=n.J.Oa,V=n.J.mimeType,H=n.J.codecs;O={nc:function(){var e=oq(m,_,B());return e.yb(function(e){e.mimeType=V,e.codecs=H}),Promise.resolve(e)}}}}catch(e){if((b||w)&&4002==e.code)return null;throw e}if(c=new Set((c=function(e,t,n,i){var r=dd(e,n,i);
1if(t.wg)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.wg=!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 eB(2,4,4008);return r.rg||t.rg}(c=tP(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,b&&(v=u.includes("forced_subtitle")||u.includes("forced-subtitle")),w&&((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;b=n.J.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(b.includes("hvc1.2.4.L153.B0")||b.includes("hev1.2.4.L153.B0"))&&(f="PQ"),y=n.J.id?n.oa.id+","+n.J.id:"",t.F.length&&g&&t.s.set(n.oa.id+","+g,function(e){function t(e){return e?((e=tk(e)).Wc=null,e.Sb=null,e.ec=t1(e.ec),e):null}return(e=tk(e)).oa=t(e.oa),e.ga=t(e.ga),e.J=t(e.J),e.ia&&(e.ia=tk(e.ia),e.ia.node=null),e}(n));var G=y&&t.o[y]?t.o[y]:{id:t.qa++,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:b,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.ga.language,label:o,type:n.ga.contentType,primary:s,trickModeVideo:null,emsgSchemeIdUris:n.J.emsgSchemeIdUris,roles:u,forced:v,channelsCount:n.J.de,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([n8(n.J.mimeType,n.J.codecs)]),isAudioMuxedInVideo:!1};return G.createSegmentIndex=function(){var e;return F(function(t){if(1==t.g)return G.segmentIndex?t.u(0):(e=G,M(t,O.nc(),3));e.segmentIndex=t.h,C(t)})},y&&n.xb&&!t.o[y]&&(n=n.oa.id||"",t.B[n]||(t.B[n]=[]),t.o[y]=G,t.B[n].push(y)),G}(t,n,I,c,D,R,u,l,A,i,S,x))&&(i.hdr=i.hdr||w,i.colorGamut=i.colorGamut||T,i.fastSwitching=g),i}).filter(function(e){return!!e})).length){if(i="image"==n.ga.contentType,t.g.dash.ignoreEmptyAdaptationSet||d||i)return null;throw new eB(2,4,4003)}if(!n.ga.contentType||"application"==n.ga.contentType)for(n.ga.contentType=hM(r[0].mimeType,r[0].codecs),p=(d=v(r)).next();!p.done;p=d.next())p.value.type=n.ga.contentType;for(d=n.ga.id||"__fake__"+t.qa++,f=(p=v(r)).next();!f.done;f=p.next()){for(f=f.value,b=(m=v(I.drmInfos)).next();!b.done;b=m.next())(b=b.value).keyIds=b.keyIds&&f.keyIds?new Set([].concat(y(b.keyIds),y(f.keyIds))):b.keyIds||f.keyIds;f.groupId=d}return h=h.map(function(e){return e.attributes.id}).filter(iv),{id:d,contentType:n.ga.contentType,language:D,lk:u,streams:r,drmInfos:I.drmInfos,cg:i,Qi:h}}(t,n,r,i)}).filter(iv),n.xb){for(r=[],o=(a=v(i)).next();!o.done;o=a.next()){o=v(o.value.Qi);for(var s=o.next();!s.done;s=o.next())r.push(s.value)}if(r.length!=new Set(r).size)throw new eB(2,4,4018)}if(r=i.filter(function(e){return!e.cg}),i=i.filter(function(e){return e.cg}),!t.g.disableIFrames)for(a=(i=v(i)).next();!a.done;a=i.next()){o=(a=a.value).cg.split(" "),s=v(r);for(var u=s.next();!u.done;u=s.next())if(u=u.value,o.includes(u.id)){u=v(u.streams);for(var l=u.next();!l.done;l=u.next())iz(l.value,a.streams)}}if(i=hT(t.g.disableAudio,r,"audio"),a=hT(t.g.disableVideo,r,"video"),o=hT(t.g.disableText,r,n2),r=hT(t.g.disableThumbnails,r,"image"),0===a.length&&0===i.length)throw new eB(2,4,4004);return{id:n.oa.id,audioStreams:i,videoStreams:a,textStreams:o,imageStreams:r}}(t,n,i,{start:p,duration:m,node:d,vf:null==m||!h}),u.push(l),n.oa.id&&m&&(t.ka[n.oa.id]=m),null==m){l=null;break}l=p+m}}if(a)for(i=(n=v(u)).next();!i.done;i=n.next())i=i.value.id,t.C.includes(i)||t.C.push(i);else t.C=u.map(function(e){return e.id});return null!=o?{periods:u,duration:o+s,ug:!1}:{periods:u,duration:l,ug:!0}}function hT(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,y(t.streams)),e},[])}function hx(e,t){if((t=tO(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&t_(t,"useMPDUrlQuery",tY,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.aa:n.split("&").map(function(t){if("$querypart$"==t)return e.aa;var n=/\$query:(.*?)\$/g.exec(t);if(n&&2==n.length){n=n[1];var i=new nV(e.aa).get(n);if(i.length)return n+"="+i[0]}return t}).join("&")}}return null}function hS(e){var t,n;return F(function(i){switch(i.g){case 1:return t=0,D(i,2),M(i,hg(e),4);case 4:t=i.h,P(i,3);break;case 2:if(n=L(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(),hA(e,t),C(i)}})}function hA(e,t){if(!(0>e.K)){var n=e.K;0<=e.g.dash.updatePeriod&&(n=e.g.dash.updatePeriod),e.L.Z(Math.max(n-t,Q(e.na)))}}function hE(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,de:null,audioSamplingRate:null,Wa:0,oe:0},i=i||n.Oa;var r,a=t.attributes.id,o=tP(t,"BaseURL"),s=!1;if(e.h)for(var u=v(o),l=u.next();!l.done;l=u.next()){var c=l.value;l=c.attributes.serviceLocation,c=tN(c),l&&c&&(dV(e.h,a,l,c),s=!0)}s&&e.h||(r=o.map(tN)),u=t.attributes.contentType||n.contentType,l=t.attributes.mimeType||n.mimeType,c=[t.attributes.codecs||n.c
1odecs];var d=tB(t,"urn:scte:dash:scte214-extensions","supplementalCodecs");d&&c.push(d),c=su(c).join(","),d=t_(t,"frameRate",tJ)||n.frameRate;var h=t.attributes.sar||n.pixelAspectRatio,p=function(e,t){t=t.slice(),e=v(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(tP(t,"InbandEventStream"),n.emsgSchemeIdUris),f=tP(t,"AudioChannelConfiguration");f=function(e){e=v(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}(f)||n.de;var g=t_(t,"audioSamplingRate",tW)||n.audioSamplingRate;u||(u=hM(l,c));var m=tU(t,"SegmentBase"),y=tU(t,"SegmentTemplate"),b=m&&t_(m,"availabilityTimeOffset",tz)||0,w=y&&t_(y,"availabilityTimeOffset",tz)||0,T=o&&o.length&&t_(o[0],"availabilityTimeOffset",tz)||0;b=n.Wa+T+b+w,w=null,(T=tU(t,"SegmentSequenceProperties"))&&(T=tU(T,"SAP"))&&(w=t_(T,"cadence",tq)),T=t.attributes.label;var x=tP(t,"Label");return x&&x.length&&tL(x=x[0])&&(T=tL(x)),{Oa:function(){return nJ(i(),o.length?e.h&&s?dH(e.h,a):r||[]:[])},Wc:m||n.Wc,Sb:tU(t,"SegmentList")||n.Sb,ec:y||n.ec,width:t_(t,"width",tW)||n.width,height:t_(t,"height",tW)||n.height,contentType:u,mimeType:l,codecs:c,frameRate:d,pixelAspectRatio:h,emsgSchemeIdUris:p,id:a,language:t.attributes.lang,de:f,audioSamplingRate:g,Wa:b,Td:null,oe:w||n.oe,label:T||null}}function hk(e,t,n,i){var r,a,o,s,u,l;return F(function(c){if(1==c.g)return r=[tm(n)],(a=rx(nJ(t(),r),e.g.retryParameters)).method=i,o=e.j.networkingEngine.request(4,a,{isPreload:e.fa()}
1),ry(e.S,o),M(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=tc(s.data);return isNaN(l=Date.parse(u))?c.return(0):c.return(l-Date.now())})}function hI(e,t,n,i,r){var a,o,s,u;return F(function(l){return 1==l.g?(a=rk,o=+!r,s=sc(t,n,i,e.g.retryParameters),M(l,hC(e,s,a,{type:o}),2)):(u=l.h,l.return(u.data))})}function hM(e,t){return id(t=n8(e,t))?n2:e.split("/")[0]}function hC(e,t,n,i){return i||(i={}),i.isPreload=e.fa(),t=e.j.networkingEngine.request(n,t,i),ry(e.S,t),t.promise}function hD(){}(b=hf.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.fa=t),n&&this.i&&this.i.presentationTimeline.U()&&this.L.hc(),this.h&&this.h.configure(this.g),this.m&&(this.m.bh(this.g.dash.multiTypeVariantsAllowed&&ed()),this.m.ih(this.g.dash.useStreamOnceInPeriodFlattening))},b.start=function(e,t){var n,i=this;return F(function(r){if(1==r.g)return i.H=t.isLowLatencyMode(),i.A=[e],i.j=t,M(r,hg(i),2);if(n=r.h,i.j&&hA(i,n),!i.j)throw new eB(2,7,7001);return r.return(i.i)})},b.stop=function(){for(var e=v(Object.values(this.o)),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={},this.B={},this.s.clear(),this.l={be:"",type:"",profiles:[],Nb:null,Wa:0,Oa:null,wd:0},this.m=null,null!=this.L&&(this.L.stop(),this.L=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.S.destroy()},b.update=function(){var e,t=this;return F(function(n){return 1==n.g?(D(n,2),M(n,hg(t),4)):2!=n.g?P(n,0):(e=L(n),t.j&&e)?void(t.j.onError(e),C(n)):n.return()})},b.onExpirationUpdated=function(){},b.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.Zb();var n=t.segmentIndex.find(e);null!=n&&(t=t.segmentIndex.get(n))&&(this.K=t.endTime-e,hA(this,0))}}},b.banLocation=function(e){this.h&&this.h.banLocation(e)},b.setMediaElement=function(e){this.I=e},z("shaka.dash.DashParser",hf),ag["application/dash+xml"]=function(){return new hf},ag["video/vnd.mpeg.dash.mpd"]=function(){return new hf},z("shaka.dependencies",hD),hD.has=function(e){return hL.has(e)},hD.add=function(e,t){if(!hP[e])throw Error(e+" is not supported");e==hR?ef("mux.js","mux.js is no longer used in Shaka Player."):hL.set(e,function(){return t})};var hR="muxjs",hP={mk:hR,ISOBoxer:"ISOBoxer"};hD.Allowed=hP;var hL=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function hN(e,t,n){this.type=e,this.X=t,this.segments=n||null}function hj(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function hU(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 hO(e,t){return(e=e.attributes.filter(function(e){return e.name==t})).length?e[0]:null}function h_(e,t,n){return(e=hO(e,t))?e.value:n||null}function hB(e,t){if(!(e=hO(e,t)))throw new eB(2,4,4023,t);return e.value}function hF(e,t,n){n=void 0===n?[]:n,this.X=t,this.g=e,this.Cb=n}function hV(e,t){this.name=e,this.value=t}function hH(e,t){return e.filter(function(e){return e.name==t})}function hG(e,t){return e.filter(function(e){return hB(e,"TYPE")==t})}function hK(e,t){e=v(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function hq(e,t,n){return n=void 0===n?0:n,(e=hK(e,t))?Number(e.value):n}function hX(e,t,n){return t?hW(e,[t],n):[]}function hW(e,t,n){if(!t.length)return[];t=nJ(e,t),e=[],t=v(t);for(var i=t.next();!i.done;
1i=t.next())e.push(hz(i.value,n));return e}function hz(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=v(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(a)e=e.replace(i,a);else throw new eB(2,4,4039,r)}}return e}function hY(){this.g=0}function hJ(e,t){var n=(t=(t=tc(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new eB(2,4,4015);t=0;for(var i=!0,r=v(n),a=r.next();!a.done;a=r.next())if(a=a.value,/^#(?!EXT)/m.test(a)||i)i=!1;else if(a=h$(e,a),--e.g,hQ.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=h$(e,o),hZ.includes(o.name)){if(1!=t)throw new eB(2,4,4017);o=n.splice(a,n.length-a),n=[],i=[],a=[],s=null,o=v(o);for(var u=o.next();!u.done;u=o.next())u=u.value,/^(#EXT)/.test(u)?(u=h$(e,u),hQ.includes(u.name)?r.push(u):"EXT-X-MAP"==u.name?s=u:"EXT-X-PART"==u.name?a.push(u):"EXT-X-PRELOAD-HINT"==u.name?"PART"==h_(u,"TYPE")?a.push(u):"MAP"==h_(u,"TYPE")&&(u.name="EXT-X-MAP",s=u):i.push(u)):/^#(?!EXT)/m.test(u)||(u=u.trim(),s&&i.push(s),n.push(new hF(u,i,a)),i=[],a=[]);return a.length&&(s&&i.push(s),n.push(new hF("",i,a))),new hN(t,r,n)}r.push(o),"EXT-X-STREAM-INF"==o.name&&(o.attributes.push(new hV("URI",s)),i=!0)}}return new hN(t,r)}function h$(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new eB(2,4,4016,t);t=n[1];var i=n[2];if(n=[],i){(a=tw(i=new ty(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var r,a,o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=tw(i,o);)n.push(new hV(a[1],a[2]||a[3])),tb(i)}return new hj(e,t,n,r)}hj.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 hQ="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(" "),hZ="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function h0(){}function h1(e){try{var t=h2(e);return rc({uri:e,originalUri:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return ru(e)}}function h2(t){var n=t.split(":");if(2>n.length||"data"!=n[0]||2>(n=n.slice(1).join(":").split(",")).length)throw new eB(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?nX(t):tp(t),contentType:i}}function h3(){var e=this;this.g=this.h=null,this.C=1,this.A=new Map,this.H=new Map,this.O=new Map,this.O.set("video",new Map),this.O.set("audio",new Map),this.O.set(n2,new Map),this.O.set("image",new Map),this.Na=new Set,this.i=new Map,this.l=null,this.M="",this.Ha=new hY,this.I=-1,this.ja=1/0,this.fa=this.Lb=this.bc=!1,this.B=new ez(function(){if(e.aa&&!e.g.continueLoadingWhenPaused&&(e.$.cb(e.aa,"timeupdate"),e.aa.paused))return void e.$.va(e.aa,"timeupdate",function(){return pE(e)});pE(e)}),this.xa=pj,this.m=null,this.La=0,this.o=1/0,this.Ga=this.Ba=this.V=0,this.da=new rv,this.F=new Map,this.G=new Map,this.ra=new Map,this.ka=new Map,this.L=new Map,this.na=new Map,this.qa=new Map,this.Ib=this.K=!1,this.Gb=new $(5),this.j=null,this.S=!0,this.Aa=new Set,this.$=new es,this.s=this.aa=null,this.Hb=function(){return!1}}function h4(e,t){return pk(e)?e.O.get(t.type):t.Zd}function h5(e,t,n){n=void 0!==n&&n;for(var i=-1==e.I,r=v(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=h4(e,a);if(o=oK(o)){s=v(s);for(var u=s.next();!u.done;u=s.next()){var l=(u=v(u.value)).next().value;if(u.next().value==o.startTime){i&&(e.I=Math.max(e.I,l)),a.Ve=l;break}}}}if(!(0>e.I))for(i=(t=v(t)).next();!i.done;i=t.next())(ps(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&0<(a=e.I-i.Ve)&&(r.g.splice(0,a),r=oK(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),h6(e,i,r))}function h6(e,t,n){t.vc+=n,t.Mb+=n,e=h4(e,t);for(var i=v(e),r=i.next();!r.done;r=i.next()){var a=v(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.N()}function h8(e){if(pk(e)){if(e.xa==pO){for(var t=1/0,n=1/0,i=v(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.Mb),n=Math.min(n,r.vc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.pe(t)}}else e.l.bb(pr(e));
1if(!e.l.s)for(n=(t=v(e.i.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=oK(n.stream.segmentIndex))&&n.h&&e.l.fh(n.h);e.l.Yd()}function h9(e,t,n){n=new nM(n).g;var i=new Map;t=v(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value,o=h_(a,"NAME"),s=h_(a,"VALUE");r=h_(a,"QUERYPARAM"),a=h_(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 h7(e){var t=new Set([n8(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.yb(function(n){n.mimeType&&t.add(n8(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function pe(e,t){var n=h_(t,"CODECS")||"";return t=h_(t,"SUPPLEMENTAL-CODECS"),e.fa=0<n.length,e.fa||e.g.hls.disableCodecGuessing||(n=[],e.g.disableVideo||n.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||n.push(e.g.hls.defaultAudioCodec),n=n.join(",")),e=n.split(/\s*,\s*/),t&&(t=t.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),e.push.apply(e,y(t))),su(e)}function pt(e,t,n,i){i=void 0===i||i;for(var r=[],a=[],o=new Map,s=v(t),u=s.next();!u.done;u=s.next()){var l=u.value;u=i?hB(l,"URI"):h_(l,"URI")||"shaka://hls-muxed",l=hB(l,"GROUP-ID"),r.push(u),a.push(l),o.set(l,u)}if(i=a.sort().join(","),u=t[0],t="","subtitles"==(s=hB(u,"TYPE").toLowerCase())&&(s=n2),s==n2)t=h_(u,"CODECS")||"";else for(l=(a=v(a)).next();!l.done;l=a.next())if(l=l.value,e.G.has(l)){t=e.G.get(l);break}if(a=r.sort().join(","),e.i.has(a))return e.i.get(a);if(l=e.C++,e.j){o=v(o);for(var c=o.next();!c.done;c=o.next()){var d=v(c.value);c=d.next().value,d=d.next().value,(c=n.get(c))&&dV(e.j,l,c,d)}}n=h_(u,"LANGUAGE"),o=h_(u,"NAME"),c="YES"==h_(u,"DEFAULT"),d="audio"==s&&(d=h_(u,"CHANNELS"))?parseInt(d.split("/")[0],10):null;var h="audio"==s&&!!(h=h_(u,"CHANNELS"))&&h.includes("/JOC"),p=h_(u,"CHARACTERISTICS"),f="YES"==h_(u,"FORCED");return u="audio"==s&&(u=h_(u,"SAMPLE-RATE"))?parseInt(u,10):null,(r=pi(e,l,r,t,s,n,c,o,d,null,p,f,u,h)).stream&&(r.stream.groupId=i),e.H.has(i)?e.H.get(i).push(r):e.H.set(i,[r]),e.i.set(a,r),r}function pn(e,t){var n="video",i=hB(t,"URI"),r=h_(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.i.has(i))return e.i.get(i);var a=h_(t,"LANGUAGE"),o=h_(t,"NAME"),s=h_(t,"CHARACTERISTICS");return n=pi(e,e.C++,[i],r,n,a,!1,o,null,null,s,!1,null,!1),r=(a=v((r=h_(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=h_(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function pi(e,t,n,i,r,a,o,s,u,l,c,d,h,p){function f(){return e.j&&1<n.length?dH(e.j,t):y.concat(hW([e.M],n,e.A))}var g=pc(e,i,r,a,o,s,u,l,c,d,h,p);n.includes("shaka://hls-muxed")&&(g.isAudioMuxedInVideo=!0,g.mimeType="video/mp2t",h7(g));var m,y=[],b={stream:g,type:r,Wg:y,N:f,vc:0,Mb:0,Zd:new Map,Id:!1,Hd:!1,hd:!1,Ve:-1,sb:-1,ub:-1,Af:!1},w=null;return g.createSegmentIndex=function(){return w||(g.isAudioMuxedInVideo?(g.segmentIndex=new oG([]),Promise.resolve()):(m=pA(e,b.N(),!0),w=new Promise(function(t){var n,w,T,x,S,A,E,k,I,R,N,j,U,O,_,B,V,H,G,K,q;t((n=m,F(function(t){switch(t.g){case 1:return w=n3,D(t,2),T=b.N(),M(t,n.promise,4);case 4:if(x=t.h,n.aborted)return t.return();if((S=x.uri)==x.originalUri||T.includes(S)||y.push(S),1!=(A=hJ(e.Ha,x.data)).type)throw new eB(2,4,4017);return E=h9(e,hH(A.X,"EXT-X-DEFINE"),S),k=!1,(!e.fa&&e.g.hls.disableCodecGuessing||e.S&&r==w.la&&!e.g.hls.disableClosedCaptionsDetection)&&0<A.segments.length&&(e.S=!1,k=!0),I=!e.fa&&e.g.hls.disableCodecGuessing,R=pk(e),M(t,pu(e,0,E,A,f,i,r,a,o,s,u,l,c,d,h,p,void 0,k,I),5);case 5:if(N=t.h,n.aborted)return t.return();if(j=N.stream,pp(e,A),pk(e)&&!R&&pg(e,A),b.vc=N.vc,b.Mb=N.Mb,b.Id=N.Id,b.Hd=N.Hd,b.hd=N.hd,b.Zd=N.Zd,b.sb=N.sb,b.ub=N.ub,b.Af=!0,g.segmentIndex=j.segmentIndex,g.encrypted=j.encrypted,g.drmInfos=j.drmInfos,g.keyIds=j.keyIds,g.mimeType=j.mimeType,g.bandwidth=g.bandwidth||j.bandwidth,g.codecs=g.codecs||j.codecs,g.closedCaptions=g.closedCaptions||j.closedCaptions,g.width=g.width||j.width,g.height=g.height||j.height,g.hdr=g.hdr||j.hdr,g.colorGamut=g.colorGamut||j.colorGamut,g.frameRate=g.frameRate||j.frameRate,"und"==g.language&&"und"!=j.language&&(g.language=j.language),g.language=g.language||j.language,g.channelsCount=g.channelsCount||j.channelsCount,g.audioSamplingRate=g.audioSamplingRate||j.audioSamplingRate,h7(g),g.drmInfos.length&&e.h.newDrmInfo(g),U=!1,(!l&&g.closedCaptions||l&&g.closedCaptions&&l.size!=g.closedCaptions.size)&&(U=!0),e.m&&U&&e.h.makeTextStreamsForClosedCaptions(e.m),r==w.la||r==w.Y)for(_=(O=v(e.i.values())
1).next();!_.done;_=O.next())(B=_.value).Af||B.type!=r||(B.stream.mimeType=j.mimeType,h7(B.stream));r==w.wa&&(V=oK(j.segmentIndex))&&V.ba&&(g.mimeType="application/mp4",h7(g)),H=so(g),g.segmentIndex.yb(function(e){e.ba&&(e.ba.Oc=H)}),function(e){if(!e.m)return!1;var t=[],n=[];e=v(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.Lb?po(e,[b]):(e.Lb=!0,G=Array.from(e.i.values()).filter(function(e){return e.stream.segmentIndex}),po(e,G),h8(e),0<(K=e.o)&&e.B.Z(K))),py(e,A.X,g.type,E,f),e.m&&(e.m.startTime=e.s),P(t,0);break;case 2:if(q=L(t),g.closeSegmentIndex(),7001===q.code)return t.return();if(!e.h.disableStream(g))throw q;C(t)}})))})))},g.closeSegmentIndex=function(){w&&!g.segmentIndex&&m.abort(),g.segmentIndex&&(g.segmentIndex.release(),g.segmentIndex=null),w=null},b}function pr(e){var t=1/0;e=v(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.Mb));return t}function pa(e,t){var n=[];t=v(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.yb(function(e){n.push(e)});e.l.td(n)}function po(e,t){if(!pk(e))for(var n=pr(e),i=v(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Ic(0,n);pa(e,t.map(function(e){return e.stream})),n=pk(e)&&!e.bc,e.g.hls.ignoreManifestProgramDateTime||n?h5(e,t,n):(function(e,t){if(1/0==e.ja){t=v(t);for(var n=t.next();!n.done;n=t.next())null!=(n=oK(n.value.stream.segmentIndex))&&null!=n.h&&(e.ja=Math.min(e.ja,n.h))}if(1/0!=(t=e.ja)){n=v(e.i.values());for(var i=n.next();!i.done;i=n.next())if(!ps(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=oK(r);if(a)if(null==a.h)et("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.N(),"Expect AV sync issues!");else for(h6(e,i,a.h-t-a.startTime),r=(i=v(r)).next();!r.done;r=i.next())r.value.Zf(t)}}}}(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&h5(e,t))}function ps(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function pu(e,t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,y,b){var w,T,x,S,A,E,k,I,C,R,N,j,U,O,_,B,V,H,G,K,q,X,W,z,Y,J;return y=void 0===y||y,b=void 0===b||b,F(function(t){var $,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,eT,ex,eS,eE,ek,eI,eM,eD,eR,eP,eL,eN,ej;switch(t.g){case 1:if(T=(w=i.segments||[]).every(function(e){return!!hK(e.X,"EXT-X-GAP")}),!w.length||T)throw new eB(2,4,4053);if(ey=e,ew=hK((eb=i).X,"EXT-X-PLAYLIST-TYPE"),eb=hK(eb.X,"EXT-X-ENDLIST"),eb=ew&&"VOD"==ew.value||eb,ew=ew&&"EVENT"==ew.value&&!eb,ew=!eb&&!ew,eb?pI(ey,pj):ew?pI(ey,pO):pI(ey,pU),pk(e)&&pf(e,i),x=pk(e)?e.O.get(o):new Map,A=(S=pb(e,i,x,n,r,o)).segments,E=S.bandwidth,N=R=C=I=k=null,!(0<A.length&&y)){t.u(2);break}return M(t,($=A,F(function(t){switch(t.g){case 1:if(Q=ss(e.g.hls.mediaPlaylistFullMimeType),!$.length)return t.return(Q);if(ee=(Z=px(e,$)).segment,et=Z.segmentIndex,ei=pR[en=new nM(ee.N()[0]).Ua.split(".").pop()])return t.return(ss(ei));if(er=rk,eo=ea=null,!(es=ee.ba)){t.u(2);break}return eu=sc(es.N(),es.$b(),es.Yb(),e.g.retryParameters),M(t,pM(e,eu,er,{type:0}).promise,3);case 3:if(ea=(el=t.h).data,!es.aesKey){t.u(4);break}return M(t,sl(ea,es.aesKey,0),5);case 5:ea=t.h;case 4:(eo=el.headers["content-type"])&&(eo=eo.split(";")[0].toLowerCase());case 2:return ec=sc(ee.N(),ee.$b(),ee.Yb(),e.g.retryParameters),M(t,pM(e,ec,er,{type:1}).promise,6);case 6:if(eh=(ed=t.h).data,!ee.aesKey){t.u(7);break}return M(t,sl(eh,ee.aesKey,et),8);case 8:eh=t.h;case 7:if((ep=ed.headers["content-type"])&&(ep=ep.split(";")[0].toLowerCase()),ef="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),eg=["audio/mp4","video/mp4","video/iso.segment"],a6(eA(eh))){var n=eh,i=eA(n),r=(i=(new a2).parse(i)).dd();i=i.pf();var a=[],o=!1,s=!1;switch(r.audio){case"aac":case"aac-loas":a.push("mp4a.40.2"),o=!0;break;case"mp3":a.push("mp4a.40.34"),o=!0;break;case"ac3":a.push("ac-3"),o=!0;break;case"ec3":a.push("ec-3"),o=!0;break;case"opus":a.push("opus"),o=!0}switch(r.video){case"avc":i.codec?a.push(i.codec):a.push("avc1.42E01E"),s=!0;break;case"hvc":i.codec?a.push(i.codec):a.push("hvc1.1.6.L93.90"),s=!0;break;case"av1":a.push("av01.0.01M.08"),s=!0}if(a.length){if(r=o&&!s,o=new Map,s){(s=new eC("video/mp2t")).i(n),n=v(s.j());for(var u=n.next();!u.done;u=n.next())u=u.value,o.set(u,u);s.g()}i={type:r?"audio":"video",mimeType:"video/mp2t",codecs:a.join(", "),language:null,height:i.height,width:i.width,channelCount:null,sampleRate:null,closedCaptions:o,Bd:null,colorGamut:null,frameRate:i.frameRate}}else i=null;if(em=i)return t.return(em)}else if((ef.includes(en)||eg.includes(ep)||eo&&eg.includes(eo))&&(ev=function(e,t){function n(e){a=e.name;var t=e.reader;t.skip(24);var n=t.ma(),i=t.ma();t.skip(50),h=String(n),d=String(i),e.reader.sa()&&r_(e)}function i(e){var t=aV(e.reader);p=t.channelCount,f=t.sampleRate,r(e.name)}
1function r(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":s.push(e+".42E01E"),l=!0;break;case"hev1":case"hvc1":s.push(e+".1.6.L93.90"),l=!0;break;case"dvh1":case"dvhe":s.push(e+".05.04"),l=!0;break;case"vp09":s.push(e+".00.10.08"),l=!0;break;case"av01":s.push(e+".0.01M.08"),l=!0;break;case"mp4a":o.push("mp4a.40.2"),u=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":o.push(e),u=!0}}var a,o=[],s=[],u=!1,l=!1,c=null,d=null,h=null,p=null,f=null,g=null,m=null;if((new rO).box("moov",r_).box("trak",r_).box("mdia",r_).R("mdhd",function(e){c=aB(e.reader,e.version).language}).box("minf",r_).box("stbl",r_).R("stsd",rB).box("mp4a",function(e){var t=aV(e.reader);p=t.channelCount,f=t.sampleRate,e.reader.sa()?r_(e):r(e.name)}).box("esds",function(e){e=e.reader;for(var t,n,i="mp4a";e.sa();){t=e.T();for(var r=e.T();128&r;)r=e.T();if(3==t)e.ma(),128&(r=e.T())&&e.ma(),64&r&&e.skip(e.T()),32&r&&e.ma();else if(4==t)n=e.T(),e.skip(12);else if(5==t)break}n&&(i+="."+aG(n),5==t&&e.sa()&&(31==(n=(248&(t=e.T()))>>3)&&e.sa()&&(n=32+((7&t)<<3)+((224&e.T())>>5)),i+="."+n)),o.push(i),u=!0}).box("ac-3",i).box("ec-3",i).box("ac-4",i).box("Opus",i).box("fLaC",i).box("avc1",n).box("avc3",n).box("hev1",n).box("hvc1",n).box("dva1",n).box("dvav",n).box("dvh1",n).box("dvhe",n).box("vp09",n).box("av01",n).box("avcC",function(e){var t=a||"";switch(a){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+aG(e.T())+aG(e.T())+aG(e.T()),s.push(e),l=!0}).box("hvcC",function(e){var t=a||"";switch(a){case"dvh1":t="hvc1";break;case"dvhe":t="hev1"}var n=e.reader;n.skip(1);var i=["","A","B","C"][(e=n.T())>>6],r=31&e,o=n.P(),u=(32&e)>>5?"H":"L";e=[n.T(),n.T(),n.T(),n.T(),n.T(),n.T()],n=n.T();for(var c=0,d=0;32>d&&(c|=1&o,31!=d);d++)c<<=1,o>>=1;for(t=t+"."+i+r+"."+aG(c,!0)+("."+u)+n,i="",r=e.length;r--;)((u=e[r])||i)&&(i="."+u.toString(16).toUpperCase()+i);t+=i,s.push(t),l=!0}).box("dvcC",function(e){var t=a||"";switch(a){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.T(),n=n.T(),s.push(t+"."+aK(e>>1&127)+"."+aK(e<<5&32|n>>3&31)),l=!0}).box("dvvC",function(e){var t=a||"";switch(a){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.T(),n=n.T(),s.push(t+"."+aK(e>>1&127)+"."+aK(e<<5&32|n>>3&31)),l=!0}).R("vpcC",function(e){var t=a||"",n=e.reader;e=n.T();var i=n.T();n=n.T()>>4&15,s.push(t+"."+aK(e)+"."+aK(i)+"."+aK(n)),l=!0}).box("av1C",function(e){var t=a||"";"dav1"===a&&(t="av01");var n=e.reader;n.skip(1),e=n.T(),n=n.T();var i=e>>>5,r=(64&n)>>6;s.push(t+"."+i+"."+aK(31&e)+(n>>>7?"H":"M")+"."+aK(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+aK(1)+"."+aK(1)+"."+aK(1)+".0"),l=!0}).box("enca",rV).box("encv",rF).box("sinf",r_).box("frma",function(e){r(e=aH(e.reader).codec)}).box("colr",function(e){s=s.map(function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.ya(),r=n.vb(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.ma(),a=n.ma();var o=n.ma(),s=n.T()>>7,u=t.split(".");10==u.length&&(u[6]=aK(r),u[7]=aK(a),u[8]=aK(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t});var t=function(e){var t=null,n=null,i=e.vb(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.ma()){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.ma(),e.ma(),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,Bd:n}}(e.reader),n=t.colorGamut;g=t.Bd,m=n}).parse(e||t,!0),!o.length&&!s.length)return null;var y=u&&!l,b=new Map;if(l){var w=new eC("video/mp4");for(e&&w.init(e),w.i(t),t=(e=v(w.j())).next();!t.done;t=e.next())t=t.value,b.set(t,t);w.g()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:su(o.concat(s)).join(", "),language:c,height:d,width:h,channelCount:p,sampleRate:f,closedCaptions:b,Bd:g,colorGamut:m,frameRate:null}}(ea,eh)))return t.return(ev);return ep?t.return(ss(ep)):eo?t.return(ss(eo)):t.return(Q)}})),3);case 3:o=(j=t.h).type,s=j.language,c=j.channelCount,f=j.sampleRate,e.g.disableText||(d=j.
1closedCaptions),I=j.height,k=j.width,C=j.Bd,R=j.colorGamut,N=j.frameRate,b&&(m=j.mimeType,a=j.codecs);case 2:if(m){t.u(4);break}return M(t,(eT=e,ex=o,eS=a,eE=A,F(function(e){switch(e.g){case 1:if(ek=rk,2==(eI=px(eT,eE).segment).status)return e.return(pT(ex));if(eD=new nM((eM=eI.N())[0]).Ua.split(".").pop(),(eR=pP[ex][eD])||(eR=pR[eD])||(eR=pw(ex,eS)))return e.return(eR);return eL=1,eN=rx(eM,eT.g.retryParameters),D(e,2),eN.method="HEAD",M(e,pM(eT,eN,ek,{type:eL}).promise,4);case 4:eP=e.h.headers["content-type"],P(e,3);break;case 2:if(!(ej=L(e))||1002!=ej.code&&1001!=ej.code){e.u(3);break}return eN.method="GET",M(e,pM(eT,eN,ek,{type:eL}).promise,6);case 6:eP=e.h.headers["content-type"];case 3:return eP?e.return(eP.toLowerCase().split(";")[0]):e.return(pT(ex))}})),5);case 5:m=t.h;case 4:return M(t,pd(e,i,m,r,n),6);case 6:if(O=(U=t.h).drmInfos,_=U.keyIds,B=U.encrypted,V=U.zh,B&&!O.length&&!V)throw new eB(2,4,4026);return(H=pc(e,a,o,s,u,l,c,d,h,p,f,g)).encrypted=B,H.drmInfos=O,H.keyIds=_,H.mimeType=m,E&&(H.bandwidth=E),h7(H),"video"==o&&(k||I||C||R)&&pS(H,k,I,N,C,null,R),pk(e)&&pf(e,i),G=A[0].startTime,K=A[A.length-1].endTime,H.segmentIndex=new oG(A),X=!!(q=hK(i.X,"EXT-X-SERVER-CONTROL"))&&null!=hO(q,"CAN-SKIP-UNTIL"),W=!!q&&null!=hO(q,"CAN-BLOCK-RELOAD"),Y=(z=pl(hq(i.X,"EXT-X-MEDIA-SEQUENCE",0),A)).sb,J=z.ub,t.return({stream:H,type:o,Wg:[],N:r,vc:G,Mb:K,Id:X,Hd:W,hd:!1,Ve:-1,sb:Y,ub:J,Zd:x,Af:!1})}})}function pl(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{sb:++e,ub: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)),{sb:e,ub:n}}function pc(e,t,n,i,r,a,o,s,u,l,c,d){var h=pw(n,t)||pT(n),p=[];if(u){u=v(u.split(","));for(var f=u.next();!f.done;f=u.next())p.push(f.value)}return u=void 0,f=null,n==n2?u=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(f="visually impaired"),p.length||"subtitle"!==u||p.push("subtitle"),h7(e={id:e.C++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:h,codecs:t,kind:n==n2?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ix(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:p,forced:l,channelsCount:o,audioSamplingRate:c,spatialAudio:d,closedCaptions:s,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:f,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}),e}function pd(e,t,n,i,r){var a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,C,D,R,P,L;return F(function(N){switch(N.g){case 1:if(a=new Map,t.segments){for(s=(o=v(t.segments)).next();!s.done;s=o.next())if(l=hH((u=s.value).X,"EXT-X-KEY"),c=null,l.length)for(c=pm(e,t,u.X,i,r),h=(d=v(l)).next();!h.done;h=d.next())p=h.value,a.set(p,c)}g=f=!1,m=[],y=new Set,w=(b=v(a)).next();case 2:if(w.done){N.u(4);break}if(x=(T=v(w.value)).next().value,S=T.next().value,A=x,E=S,"NONE"==(k=hB(A,"METHOD"))){N.u(3);break}if(f=!0,I=h_(A,"KEYFORMAT")||"identity",C=null,pC(k)){g=!0,N.u(3);break}if("identity"!=I){C=(D=pN[I])?D(A,n):null,N.u(6);break}return M(N,pD(e,A,n,i,E,r),8);case 8:C=N.h;case 6:if(C){if(C.keyIds)for(P=(R=v(C.keyIds)).next();!P.done;P=R.next())L=P.value,y.add(L);m.push(C)}case 3:w=b.next(),N.u(2);break;case 4:return N.return({drmInfos:m,keyIds:y,encrypted:f,zh:g})}})}function ph(t,n,i,r,a){if(!e.crypto||!e.crypto.subtle)throw en("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new eB(2,4,4042);var o=0,s=h_(n,"IV","");if(s){var u=nW(s.substr(2));if(16!=u.byteLength)throw new eB(2,4,4048)}else o=hq(i.X,"EXT-X-MEDIA-SEQUENCE",0);if(i=n.toString()+"-"+o,!t.ka.has(i)){var l={bitsKey:128,blockCipherMode:"CBC",iv:u,firstMediaSequenceNumber:o};switch(hB(n,"METHOD")){case"AES-256":l.bitsKey=256;break;case"AES-256-CTR":l.bitsKey=256,l.blockCipherMode="CTR"}l.fetchKey=function(){var i,o,s,u,c,d;return F(function(h){if(1==h.g)return o=(i=hX(r(),hB(n,"URI"),a)).sort().join(""),t.L.has(o)||
1(s=rx(i,t.g.retryParameters),u=pM(t,s,6).promise,t.L.set(o,u)),M(h,t.L.get(o),2);if(3!=h.g){if(!(c=h.h).data||c.data.byteLength!=l.bitsKey/8)throw new eB(2,4,4049);return d={name:"CTR"==l.blockCipherMode?"AES-CTR":"AES-CBC",length:l.bitsKey},M(h,e.crypto.subtle.importKey("raw",c.data,d,!0,["decrypt"]),3)}l.cryptoKey=h.h,l.fetchKey=void 0,C(h)})},t.ka.set(i,l)}return t.ka.get(i)}function pp(e,t){null==e.s&&(t=hK(t.X,"EXT-X-START"))&&(e.s=Number(hB(t,"TIME-OFFSET")))}function pf(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var a=hK(i[r].X,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}r--}if(!(i=hK(t.X,"EXT-X-TARGETDURATION")))throw new eB(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=hK(t.X,"EXT-X-PART-INF"))&&(e.V=Number(hB(r,"PART-TARGET"))),t=hK(t.X,"EXT-X-SERVER-CONTROL"),e.K&&e.V?(e.o=e.Ib?5*e.V<=n?Math.min(e.V,e.o):Math.min(n,e.o):Math.min(e.V,e.o),e.Ga=t?Number(hB(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),e.Ba=(n=t?hO(t,"HOLD-BACK"):null)?Number(n.value):0),e.La=Math.max(i,e.La)}function pg(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ga)n=e.Ga;else if(e.Ba)n=e.Ba;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=hK(t.segments[r].X,"EXTINF");n=a?n+Math.ceil(Number(a.value.split(",")[0])):n+e.La}}e.s&&0>e.s&&(n=Math.min(-e.s,n),e.s+=n),e.l.gh(0),e.l.Tf(n),e.l.zc(!1)}function pm(e,t,n,i,r){var a=hK(n,"EXT-X-MAP");if(!a)return null;var o=hB(a,"URI"),s=hX(i(),o,r);if(o=[s.toString(),h_(a,"BYTERANGE","")].join("-"),!e.ra.has(o)){var u,l,c,d,h,p,f=void 0,g=null;n=v(n);for(var m=n.next();!m.done;m=n.next())"EXT-X-KEY"==(m=m.value).name?pC(hB(m,"METHOD"))&&m.id<a.id&&(f=ph(e,m,t,i,r)):"EXT-X-BYTERANGE"==m.name&&m.id<a.id&&(g=m);u=s,l=a,c=g,d=f,h=0,p=null,(l=h_(l,"BYTERANGE"))||!c||(l=c.value),l&&(p=Number((h=l.split("@"))[0]),p=(h=Number(h[1]))+p-1,d&&(c=p+1-h)%16&&(p+=16-c%16)),t=new ay(function(){return u},h,p,null,null,null,d),e.ra.set(o,t)}return e.ra.get(o)}function pv(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.ua+1)+t-1),[n,i]}function py(e,t,n,i,r){if("video"==n||"audio"==n){var a=e.l.m;if(a&&!ps(e,n))for(t=(t=hH(t,"EXT-X-DATERANGE")).sort(function(e,t){return(e=hB(e,"START-DATE"))<(t=hB(t,"START-DATE"))?-1:+(e>t)}),n=0;n<t.length;n++){var o=t[n];try{var s=hB(o,"ID");if(!e.Aa.has(s)){var u=hB(o,"START-DATE"),l=tH(u);if(!isNaN(l)){var c=Math.max(0,l-a),d=null,h=h_(o,"END-DATE");if(h){var p=tH(h);if(!isNaN(p)&&(d=p-a,0>d))continue}if(null==d){var f=h_(o,"DURATION")||h_(o,"PLANNED-DURATION");if(f){var g=parseFloat(f);if(isNaN(g)||(d=c+g),0>l-a+g)continue}}var m=h_(o,"CLASS")||"com.apple.quicktime.HLS",y="YES"==h_(o,"END-ON-NEXT");if(null==d&&y){for(var b=n+1;b<t.length;b++){var w=h_(t[b],"CLASS")||"com.apple.quicktime.HLS";if(m==w){var T=hB(t[b],"START-DATE"),x=tH(T);if(!isNaN(x)&&x&&x>l){d=Math.max(0,x-a);break}}}if(null==d)continue}b=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var S=[],A=v(o.attributes),E=A.next();!E.done;E=A.next()){var k=E.value;if(!b.includes(k.name)){var I=hz(k.value,i);("X-ASSET-URI"==k.name||"X-ASSET-LIST"==k.name)&&(I=hX(r(),k.value,i)[0]),S.push({key:k.name,description:"",data:I,mimeType:null,pictureType:null})}}1<S.length&&e.h.onMetadata(m,c,d,S),e.Aa.add(s)}}}catch(e){}}}}function pb(t,n,i,r,a,o){var s=n.segments,u=void 0,l=hq(n.X,"EXT-X-DISCONTINUITY-SEQUENCE",-1),c=hq(n.X,"EXT-X-MEDIA-SEQUENCE",0),d=hK(n.X,"EXT-X-SKIP"),h=d?Number(h_(d,"SKIPPED-SEGMENTS")):0,p=c+h,f=0;pk(t)&&i.has(p)&&(f=i.get(p)),0===f&&t.xa==pO&&0<i.size&&!i.has(p)&&null!=t.l.i&&(f=t.l.qb());var g=[],m=null;d=[];for(var y=0;y<s.length;y++){var b=s[y],w=0==y?f:m.endTime;p=c+h+y,hK(b.X,"EXT-X-DISCONTINUITY")&&l++;for(var T=v(b.X),x=T.next();!x.done;x=T.next())"EXT-X-KEY"==(x=x.value).name&&(u=pC(hB(x,"METHOD"))?ph(t,x,n,a,r):void 0);i.set(p,w),T=pm(t,n,b.X,a,r),!t.K&&t.h.isAutoLowLatencyMode()&&(t.h.enableLowLatencyMode(),t.K=t.h.isLowLatencyMode()),(w=function(t,n,i,r,a,o,s,u,l){function c(e){e=new nM(e).Ua.split(".").pop();var t=pP[s][e];return t||(t=pR[e]),t}var d=r.X,h=hK(d,"EXTINF"),p=0,f=0,g=null;r.Cb.length&&(t.m.isLowLatency=!0);var m=null;if(!t.g.hls.ignoreManifestProgramDateTime){var y=hK(d,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(m=tH(y.value),t.bc=!0)}var b=aT;if(hK(d,"EXT-X-GAP")&&(t.m.gapCount++,b=2),!h){if(0==r.Cb.length)throw new eB(2,4,4024,"EXTINF");if(!t.K)return null}var w=[];y=!1;var T=null,x=!1,S=!1;if(t.K&&r.Cb.length){p=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var A=m,E={},k=0;k<r.Cb.length;E={xe:void 0,fe:void 0},k++){var I=r.Cb[k],M=0==k?i:w[w.length-1],C=0==k?a:M.endTime,D=Number(h_(I,"DURATION"))||t.V;if(D){var R=C+D,P=0,L=null;
1if("EXT-X-PRELOAD-HINT"==I.name?(P=(P=h_(I,"BYTERANGE-START"))?Number(P):0,(M=h_(I,"BYTERANGE-LENGTH"))?L=P+Number(M)-1:P&&(L=Number.MAX_SAFE_INTEGER)):(P=(L=v(pv(M,P=h_(I,"BYTERANGE")))).next().value,L=L.next().value),E.fe=h_(I,"URI"),E.fe){M=aT,"YES"==h_(I,"GAP")&&(t.m.gapCount++,M=2,x=!0),E.xe=null;var N=function(e){return function(){return null==e.xe&&(e.xe=hX(u(),e.fe,o)),e.xe}}(E);p&&0<=P&&null!=L&&(T=N,y=!0),C=new aw(C,R,N,P,L,n,0,0,1/0,[],"",null,A,M,l),"EXT-X-PRELOAD-HINT"==I.name&&(C.Bf(),S=!0),"YES"!=h_(I,"INDEPENDENT")&&0<k&&C.Nc(),(E=c(E.fe))&&(C.mimeType=E,pL.has(E)&&(C.ba=null)),w.push(C),A&&(A+=D)}}}}if(h){if(0==(h=Number(h.value.split(",")[0])))return null;p=a+h}else{if(!w.length)return null;p=w[w.length-1].endTime}y&&(x||0!=w[0].Ka?(y=!1,T=null):w=[]),(h=hK(d,"EXT-X-BYTERANGE"))?(f=(g=v(pv(i,h.value))).next().value,g=g.next().value):w.length&&(f=w[0].Ka,g=w[w.length-1].ua),i="",h=null,"image"==s&&(i="1x1",d=hK(d,"EXT-X-TILES"))&&(i=hB(d,"LAYOUT"),(d=h_(d,"DURATION"))&&(h=Number(d)));var j=null;return n=new aw(a,p,function(){return T?T():(null==j&&(j=hX(u(),r.g,o)),j||[])},f,g,n,0,0,1/0,w,i,h,m,b,l,0<w.length&&!!r.g),(a=c(r.g))&&(n.mimeType=a,pL.has(a)&&(n.ba=null)),y&&(t.Ib=!0,n.Lg(),S&&n.Bf()),n}(t,T,m,b,w,r,o,a,u))&&((m=hq(b.X,"EXT-X-BITRATE"))?d.push({bitrate:m,duration:w.endTime-w.startTime}):d.length&&(m=d.pop(),m.duration+=w.endTime-w.startTime,d.push(m)),m=w,w.i=l,ps(t,o)&&null!=t.I&&p<t.I||g.push(w))}if(n=void 0,d.length&&(n=d.reduce(function(e,t){return e+t.duration},0),n=Math.round(d.reduce(function(e,t){return e+t.bitrate*t.duration},0)/n*1e3)),d=g.some(function(e){return null!=e.h})){for(i={},r=0;r<g.length;i={Md:void 0,Ld:void 0,Ed:void 0,xc:void 0,Dd:void 0},r++)if(i.xc=g[r],null==i.xc.h)for(i.Ld=0,i.Md=r,a=function(e){return function(){var t=g[e.Md];if(t){if(null!=t.h)return t.h+e.Ld;e.Ld-=t.endTime-t.startTime,e.Md+=1}return null}}(i),i.Dd=0,i.Ed=r,s=function(e){return function(){var t=g[e.Ed];if(t){if(t!=e.xc&&(e.Dd+=t.endTime-t.startTime),null!=t.h)return t.h+e.Dd;--e.Ed}return null}}(i);null==i.xc.h;)i.xc.h=s(),null==i.xc.h&&(i.xc.h=a())}if(d)for(r=(i=v(g)).next();!r.done;r=i.next())for(r=(a=r.value).h,s=(a=v(a.g)).next();!s.done;s=a.next())(s=s.value).h=r,r+=s.endTime-s.startTime;if(i=t.ja,d&&1/0!=i&&!ps(t,o))for(o=(t=v(g)).next();!o.done;o=t.next())o.value.Zf(i);return{segments:g,bandwidth:n}}function pw(e,t){if(e==n2){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 pT(e){return e==n2?"text/vtt":pP[e].mp4}function px(e,t){e=pk(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 pS(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 pA(e,t,n){return pM(e,rx(t,e.g.retryParameters),0,{type:n?2:3})}function pE(e){var t,n,i,r,a;return F(function(o){switch(o.g){case 1:if(!e.h)return o.return();return D(o,2),t=Date.now(),M(o,e.update(),4);case 4:n=Date.now(),pk(e)&&(i=(n-t)/1e3,e.Gb.sample(1,i),r=Math.max(0,(0<e.g.hls.updatePeriod?e.g.hls.updatePeriod:e.o)-Q(e.Gb)),e.B.Z(r)),P(o,3);break;case 2:if(a=L(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.Z(.1);case 3:if(!e.h)return o.return();e.h.onManifestUpdated(),C(o)}})}function pk(e){return e.xa!=pj}function pI(e,t){e.xa=t,e.l&&e.l.zc(!pk(e)),pk(e)||e.B.stop()}function pM(e,t,n,i){if(!e.da)throw new eB(2,7,7001);return i||(i={}),i.isPreload=e.Hb(),t=e.h.networkingEngine.request(n,t,i),ry(e.da,t),t}function pC(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function pD(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m;return F(function(v){switch(v.g){case 1:if("video/mp2t"==n)throw new eB(2,4,4040);if(ta())throw new eB(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(o=hB(t,"METHOD")))return v.return(null);if((s=hX(i(),hB(t,"URI"),a))[0].startsWith("data:text/plain;base64,")){u=nz(nX(s[0].split("data:text/plain;base64,").pop())),v.u(2);break}return l=s.sort().join(""),e.na.has(l)||(c=rx(s,e.g.retryParameters),d=pM(e,c,6).promise,e.na.set(l,d)),M(v,e.na.get(l),3);case 3:u=nz(v.h.data);case 2:if(h="00000000000000000000000000000000",!r){v.u(4);break}if(e.qa.has(r)){p=e.qa.get(r),v.u(5);break}return f=sc(r.N(),r.$b(),r.Yb(),e.g.retryParameters),M(v,pM(e,f,rk,{type:0}).promise,6);case 6:var y,b;y=v.h.data,b=null,(new rO).box("moov",r_).box("trak",r_).box("mdia",r_).box("minf",r_).box("stbl",r_).R("stsd",rB).box("encv",rF).box("enca",rV).box("sinf",r_).box("schi",r_).R("tenc",function(e){(e=e.reader).T(),e.T(),e.T(),e.T(),b=nz(e.vb(16))}).parse(y,!0),p=b,e.qa.set(r,p);case 5:p&&(h=p);case 4:return(g=new Map).set(h,u),m="cenc","SAMPLE-AES"==o&&(m="cbcs"),v.return(nQ(g,m))}})}z("shaka.net.DataUriPlugin",h0),h0.parse=h1,rw("data",h1),(b=h3.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.Hb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.U()&&this.B.hc()},b.start=function(e,t){var n,i=this;return F(function(r){var a,o,s,u,l,c,d,h,p,f,g,m,b,w,T,x,S,A,E,k,I,C,R,P,N,j,U,O,_,B,V,H,G,K,q;
1return 1==r.g?(i.h=t,i.K=t.isLowLatencyMode(),M(r,pA(i,[e]).promise,2)):3!=r.g?(i.M=(n=r.h).uri,M(r,(a=i,o=n.data,s=e,F(function(e){var t,n,i,r,X,W,z,Y,J,$,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,eT,ex,eS,eA,eE,ek,eI,eM,eC,eD,eR,eP,eL,eN,ej,eO,e_,eF,eV,eG,eK,eq;switch(e.g){case 1:if(u=n3,c=hH((l=hJ(a.Ha,o)).X,"EXT-X-DEFINE"),d=[],h=[],p=[],a.l=new oS(null,0),a.l.zc(!0),f=function(){return[s]},g=null,m=new Map,1==l.type)return a.S=!1,m=h9(a,hH(l.X,"EXT-X-DEFINE"),a.M),g=u.la,I="",C=new Map,M(e,pu(a,a.C++,m,l,f,"",g,I,!0,"Media Playlist",null,C,null,!1,null,!1),7);return function(e,t){var n=new nM(e.M).g;t=v(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=h_(r,"NAME");var a=h_(r,"VALUE");r=h_(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,c),b=hH(l.X,"EXT-X-MEDIA"),w=hH(l.X,"EXT-X-STREAM-INF"),T=hH(l.X,"EXT-X-IMAGE-STREAM-INF"),x=hH(l.X,"EXT-X-I-FRAME-STREAM-INF"),S=hH(l.X,"EXT-X-SESSION-KEY"),A=hH(l.X,"EXT-X-SESSION-DATA"),E=hH(l.X,"EXT-X-CONTENT-STEERING"),function(e,t){t=v(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=h_(i,"DATA-ID");n=h_(i,"URI");var a=h_(i,"LANGUAGE");i=h_(i,"VALUE"),r=(new Map).set("id",r),n&&r.set("uri",hX([e.M],n,e.A)[0]),a&&r.set("language",a),i&&r.set("value",i),n=new rp("sessiondata",r),e.h&&e.h.onEvent(n)}}(a,A),M(e,(t=a,n=E,F(function(e){if(!t.h||!t.g)return e.return();for(X=(r=v(n)).next();!X.done;X=r.next())if(z=h_(W=X.value,"PATHWAY-ID"),Y=h_(W,"SERVER-URI"),z&&Y){t.j=new dB(t.h),t.j.configure(t.g),t.j.i=[t.M],t.j.setManifestType("HLS"),t.j.h=z,i=dF(t.j,Y);break}return M(e,i,0)})),4);case 4:return function(e,t){t=v(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=h_(i,"AUDIO");n=h_(i,"VIDEO");var a=h_(i,"SUBTITLES");if(i=pe(e,i),a){var o=n0(n2,i);e.G.set(a,o),eU(i,o)}r&&((a=n0("audio",i))||(a=e.g.hls.defaultAudioCodec),e.G.set(r,a)),n&&((r=n0("video",i))||(r=e.g.hls.defaultVideoCodec),e.G.set(n,r))}}(a,w),function(e,t){e.S=0==(t=hG(t,"CLOSED-CAPTIONS")).length,t=v(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=h_(i,"LANGUAGE");n=ix(r||"und"),r||(r=h_(i,"NAME"))&&(n=r),r=hB(i,"GROUP-ID"),i=hB(i,"INSTREAM-ID").replace("SERVICE","svc"),e.F.get(r)||e.F.set(r,new Map),e.F.get(r).set(i,n)}}(a,b),J=a,k=x.map(function(e){return"video"!==(e=pn(J,e)).stream.type?null:e.stream}).filter(function(e){return e}),M(e,($=a,Q=w,Z=S,ee=b,et=f,en=a.A,ei=k,F(function(e){switch(e.g){case 1:if(er=[],ea=new Set,!(0<Z.length)){e.u(2);break}es=(eo=v(Z)).next();case 3:if(es.done){e.u(2);break}if(el=hB(eu=es.value,"METHOD"),ec=h_(eu,"KEYFORMAT")||"identity",ed=null,"NONE"==el){e.u(4);break}if(pC(el)){ep=(eh=hX(et(),hB(eu,"URI"),en)).sort().join(""),$.L.has(ep)||(ef=rx(eh,$.g.retryParameters),eg=pM($,ef,6).promise,$.L.set(ep,eg)),e.u(4);break}if("identity"!=ec){ed=(em=pN[ec])?em(eu,""):null,e.u(6);break}return M(e,pD($,eu,"",et,null,en),9);case 9:ed=e.h;case 6:if(ed){if(ed.keyIds)for(ey=(ev=v(ed.keyIds)).next();!ey.done;ey=ev.next())eb=ey.value,ea.add(eb);er.push(ed)}case 4:es=eo.next(),e.u(3);break;case 2:for(ew={},ex=(eT=v(Q)).next();!ex.done;ex=eT.next())ew[eA=hU(eS=ex.value,!$.j)]?ew[eA].push(eS):ew[eA]=[eS];for(ek in eE=[],ew)eC=h_(eM=(eI=ew[ek])[0],"FRAME-RATE"),eD=Number(h_(eM,"AVERAGE-BANDWIDTH"))||Number(hB(eM,"BANDWIDTH")),eL=(eP=v((eR=h_(eM,"RESOLUTION"))?eR.split("x"):[null,null])).next().value,eN=eP.next().value,ej=h_(eM,"VIDEO-RANGE"),(eO=h_(eM,"REQ-VIDEO-LAYOUT"))&&eO.includes(",")&&(eO=eO.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e})[0]),eO=eO||"CH-MONO",e_=function(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,u=v(t),l=u.next();!l.done;l=u.next()){var c=l.value;l=h_(c,"AUDIO");var d=h_(c,"VIDEO"),h=l||d;h&&(a.includes(h)||a.push(h),(c=h_(c,"PATHWAY-ID"))&&r.set(h,c),l?o=!0:d&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter(function(e){var t=h_(e,"URI")||"";return"SUBTITLES"!=(e=h_(e,"TYPE"))&&(""!=t||"AUDIO"==e)});var i={};t=v(t);for(var r=t.next();!r.done;r=t.next()){var a=hU(r=r.value,!e.j);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)pt(e,i[o],n,!1)}(e,n=n.filter(function(e){return a.includes(hB(e,"GROUP-ID"))}),r),n=(r=a.sort().join(","))&&e.H.has(r)?e.H.get(r):[],o?i.audio.push.apply(i.audio,y(n)):s&&i.video.push.apply(i.video,y(n)),o=!1;var p=t.map(function(e){return hB(e,"URI")});return l=i.audio.find(function(e){return e&&e.N().find(function(e){return p.includes(e)})}),n=n0("video",s=pe(e,t[0])),(u=n0("audio",s))&&!n?(l="audio",o=0<i.audio.length):!i.audio.length&&!i.video.length&&u&&n?(l="video",s=[[n,u].join()]):i.audio.length&&l?(l="audio",o=!0):l=i.video.length&&!i.audio.length?"audio":"video",o||(e=function(e,t,n,i){for(var r=e.C++,a=[],o=v(t),s=o.next();!s.done;s=o.next()){var u=s.value;s=hB(u,"URI"),u=h_(u,"PATHWAY-ID"),e.j&&u&&dV(e.j,r,u,s),a.push(s)}if(o=a.sort().join(","),e.i.has(o))return e.i.get(o);e:{if(t=h_(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.S=!1,t=null;break e}if(t){if("NONE"!=t){t=e.F.get(t);break e}e.S=!1}else if(!t&&e.F.size)for(t=v(e.F.keys()).next();!t.done;){t=e.F.get(t.value);break e}}t=null}return i=pi(e,r,a,n=nZ(i,n),i,null,!1,null,null,t,null,!1,null,!1),e.i.set(o,i),i}(e,t,s,l),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}($,eI,ee),eE.push.apply(eE,y(function(e,t,n,i,r,a,o,s,u,l,c,d){for(var h=v(n),p=h.next();!p.done;p=h.next())pS(p.value.stream,r,a,o,s,u,null);for(r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r=[],a=(t=v(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=v(n)).next();!s.done;s=o.next()){var f=s.value;(s=a?a.stream:null)&&(s.drmInfos=l,s.keyIds=c),(u=f?f.stream:null)&&(u.drmInfos=l,u.keyIds=c,e.g.disableIFrames||iz(u,d)),u&&!s&&(u.bandwidth=i),!u&&s&&(s.bandwidth=i),h=a?a.stream.drmInfos:null,p=f?f.stream.drmInfos:null,f=(f=f?f.N().sort().join(","):"")+" - "+(a?a.N().sort().join(","):""),s&&u&&!eH(h,p)||e.Na.has(f)||(s={id:e.C++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.Na.add(f))}return r}($,e_.audio,e_.video,eD,eL,eN,eC,ej,eO,er,ea,ei)));return e.return(eE.filter(function(e){return null!=e}))}})),5);case 5:return d=e.h,h=function(e,t){var n=hG(t,"SUBTITLES");t=n.map(function(t){if(e.g.disableText)return null;try{return pt(e,[t],new Map).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}),n=v(n);for(var i=n.next();!i.done;i=n.next()){var r=hB(i.value,"GROUP-ID");if((i=e.G.get(r))&&(r=e.H.get(r))){r=v(r);for(var a=r.next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=pw(n2,i)||pT(n2),h7(a.stream)}}return t.filter(function(e){return e})}(a,b),M(e,(eF=a,eV=T,eG=x,F(function(e){return 1==e.g?(eK=eV.map(function(e){var t,n;return F(function(i){if(1==i.g){var r,a,o,s,u,l,c,d,h,p,f;return eF.g.disableThumbnails?i.return(null):(D(i,2),M(i,(r=eF,a=e,F(function(e){return 1==e.g?(o=hB(a,"URI"),s=h_(a,"CODECS","jpeg")||"",r.i.has(o))?e.return(r.i.get(o)):(u=h_(a,"LANGUAGE"),l=h_(a,"NAME"),c=h_(a,"CHARACTERISTICS"),d=pi(r,r.C++,[o],s,"image",u,!1,l,null,null,c,!1,null,!1),(h=h_(a,"RESOLUTION"))?M(e,d.stream.createSegmentIndex(),3):e.u(2)):(2!=e.g&&(p=oK(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=h_(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=L(i),eF.g.hls.ignoreImageStreamFailures)return i.return(null);throw n})}).concat(eG.map(function(e){if(eF.g.disableThumbnails)return null;try{var t=pn(eF,e);return"image"!==t.stream.type?null:t.stream}catch(e){if(eF.g.hls.ignoreImageStreamFailures)return null;throw e}})),M(e,Promise.all(eK),2)):(eq=e.h,e.return(eq.filter(function(e){return e})))})),6);case 6:p=e.h,e.u(3);break;case 7:R=e.h,a.i.set(s,R),R.stream&&(P=so(R.stream),R.stream.segmentIndex.yb(function(e){e.ba&&(e.ba.Oc=P)})),g=R.stream.type,d.push({id:0,language:ix(I||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==g?R.stream:null,video:"video"==g?R.stream:null,bandwidth:R.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new eB(2,7,7001);if(pp(a,l),1==l.type&&(pk(a)&&(pg(a,l),N=a.o,a.B.Z(N)),j=Array.from(a.i.values()),po(a,j),h8(a),py(a,l.X,g,m,f)),a.m={presentationTimeline:a.l,variants:d,textStreams:h,imageStreams:p,offlineSessionIds:[],minBufferTime:0,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.fa||!a.g.hls.disableCodecGuessing){e.u(8);break}
1for(U=[],_=(O=v(a.m.variants)).next();!_.done;_=O.next())(B=_.value).audio&&""===B.audio.codecs&&U.push(B.audio.createSegmentIndex()),B.video&&""===B.video.codecs&&U.push(B.video.createSegmentIndex());return M(e,Promise.all(U),8);case 8:if(a.h.makeTextStreamsForClosedCaptions(a.m),1==d.length){for(V=[],K=(G=v([(H=d[0]).video,H.audio])).next();!K.done;K=G.next())(q=K.value)&&!q.segmentIndex&&V.push(q.createSegmentIndex());if(0<V.length)return M(e,Promise.all(V),0)}e.u(0)}})),3)):r.return(i.m)})},b.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.da&&(e.push(this.da.destroy()),this.da=null),this.g=this.h=null,this.Na.clear(),this.m=null,this.i.clear(),this.H.clear(),this.G.clear(),this.A.clear(),this.ra.clear(),this.ka.clear(),this.L.clear(),this.na.clear(),this.qa.clear(),this.Aa.clear(),this.j&&this.j.destroy(),this.$&&(this.$.release(),this.$=null),Promise.all(e)},b.update=function(){var e,t,n,i,r,a,o,s,u,l,c,d=this;return F(function(h){if(1==h.g){if(!pk(d))return h.return();for(e=[],t=Array.from(d.i.values()),d.o=1/0,d.m.gapCount=0,r=(i=v(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,u,l,c,d,h,p,f,g,m,b,w,T,x,S,A,E,k,I,R,N,j,U,O,_;return F(function(B){var F;switch(B.g){case 1:if(t.stream.isAudioMuxedInVideo)return B.return();for(n=[],r=(i=v(t.N())).next();!r.done;r=i.next())o=(a=new nM(r.value)).g,t.Hd&&(0<=t.sb&&o.add("_HLS_msn",String(t.sb)),0<=t.ub&&o.add("_HLS_part",String(t.ub))),t.Id&&o.add("_HLS_skip","YES"),nH(o),o.bd&&nP(a,o),n.push(a.toString());return D(B,2),M(B,pA(e,n,!0).promise,4);case 4:s=B.h,P(B,3);break;case 2:throw u=L(B),e.h&&e.h.disableStream(t.stream),u;case 3:if(!t.stream.segmentIndex)return B.return();if(1!=(l=hJ(e.Ha,s.data)).type)throw new eB(2,4,4017);return(c=s.uri)==s.originalUri||t.N().includes(c)||t.Wg.push(c),d=h9(e,hH(l.X,"EXT-X-DEFINE"),c),h=t.stream,p=h4(e,t),M(B,pd(e,l,h.mimeType,t.N,d),5);case 5:for(g=(f=B.h).keyIds,m=f.drmInfos,F=h.keyIds,F.size===g.size&&[].concat(y(F)).every(function(e){return g.has(e)})||(h.keyIds=g,h.drmInfos=m,e.h.newDrmInfo(h)),w=(b=pb(e,l,p,d,t.N,t.type)).segments,(T=b.bandwidth)&&(h.bandwidth=T),x=so(h),A=(S=v(w)).next();!A.done;A=S.next())(E=A.value).ba&&(E.ba.Oc=x);h.segmentIndex.rd(w,e.l.qb()),w.length&&(k=hq(l.X,"EXT-X-MEDIA-SEQUENCE",0),R=(I=hK(l.X,"EXT-X-SKIP"))?Number(h_(I,"SKIPPED-SEGMENTS")):0,j=(N=pl(k,w)).sb,U=N.ub,t.sb=j+R,t.ub=U,O=p.get(k),h.segmentIndex.Ia(O)),(_=oK(h.segmentIndex))&&(t.vc=_.startTime,t.Mb=w[w.length-1].endTime),hK(l.X,"EXT-X-ENDLIST")&&(t.hd=!0),pf(e,l),py(e,l.X,h.type,d,t.N),C(B)}})}(d,a));return M(h,Promise.all(e),2)}for(pa(d,n.map(function(e){return e.stream})),o=n.some(function(e){return 0==e.hd}),n.length&&!o&&(pI(d,p_.vh),s=n.map(function(e){return e.Mb}),d.l.bb(Math.min.apply(Math,y(s))),d.h.updateDuration()),o&&h8(d),l=(u=v(n)).next();!l.done;l=u.next())(c=l.value).stream.isAudioMuxedInVideo||!c.stream.segmentIndex||oK(c.stream.segmentIndex)||d.h.disableStream(c.stream);C(h)})},b.onExpirationUpdated=function(){},b.onInitialVariantChosen=function(){},b.banLocation=function(e){this.j&&this.j.banLocation(e)},b.setMediaElement=function(e){this.aa=e},z("shaka.hls.HlsParser",h3);var pR={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pP={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},pL=new Set(["video/mp2t"].concat(y(il))),pN={"com.apple.streamingkeydelivery":function(e,t){if("video/mp2t"==t)throw new eB(2,4,4040);if(ta())throw new eB(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t=hB(e,"METHOD")))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),n$("com.apple.fps",n,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],hB(e,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=hB(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),n=n$("com.widevine.alpha",n,[{initDataType:"cenc",initData:t=eA((t=h2((t=hB(e,"URI")).split("?")[0])).data)}]),(e=h_(e,"KEYID"))&&(n.keyIds=new Set([e.toLowerCase().substr(2)])),n},"com.microsoft.playready":function(e){var t=hB(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),n$("com.microsoft.playready",n,[{initDataType:"cenc",initData:e=rY(e=eA((e=h2((e=hB(e,"URI")).split("?")[0])).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}])}},pj="VOD",pU="EVENT",pO="LIVE",p_={vh:pj};function pB(e){if(e=pF(e))e:{e=v(tj(e,"DATA"));for(var t=e.next();!t.done;t=e.next())if(t=tU(t.value,"LA_URL")){e=tL(t);break e}e=""}else e="";return e}function pF(e){return(e=(function(e){var t=0,n=ek(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=eA(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=nX(tL(e))).filter(function(e){return e.type===pV})[0])&&(e=tM(e=td(e.value,!0),"WRMHEADER"))?e:null}ag["application/x-mpegurl"]=function(){return new h3}
1,ag["application/vnd.apple.mpegurl"]=function(){return new h3};var pV=1,pH=(new Map).set("com.microsoft.playready",pB).set("com.microsoft.playready.recommendation",pB).set("com.microsoft.playready.software",pB).set("com.microsoft.playready.hardware",pB);function pG(e){if(!pZ){pZ=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]);ft=pQ("ftyp",t,new Uint8Array([0,0,0,1]),t,n),t=pQ("dref",fn),fi=pQ("dinf",t)}this.g=e}function pK(e){for(var t=[],n=v(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=pQ;var s=o.id+1,u=o.stream.width||0,l=o.stream.height||0;"audio"==o.type&&(l=u=0);var c=o.duration*o.timescale,d=Math.floor(c/(p0+1));switch(c=Math.floor(c%(p0+1)),s=pQ("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(y(pJ(s,4)),[0,0,0,0],y(pJ(d,4)),y(pJ(c,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(pJ(u,2)),[0,0],y(pJ(l,2)),[0,0]))),u=pQ,l=Math.floor((d=o.duration*o.timescale)/(p0+1)),d=Math.floor(d%(p0+1)),c=(c=o.stream.language).charCodeAt(0)-96<<10|c.charCodeAt(1)-96<<5|c.charCodeAt(2)-96,l=pQ("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(pJ(o.timescale,4)),y(pJ(l,4)),y(pJ(d,4)),y(pJ(c,2)),[0,0]))),d=o,c=new Uint8Array([]),d.type){case"video":c=p2;break;case"audio":c=p3}d=pQ("hdlr",c);e:{switch(o.type){case"video":o=pQ("minf",pQ("vmhd",p9),fi,pq(o));break e;case"audio":o=pQ("minf",pQ("smhd",p7),fi,pq(o));break e}o=new Uint8Array([])}i=i("trak",s,o=u("mdia",l,d,o)),a.call(r,i)}for(t=nY.apply(nG,y(t)),a=e.g[0],n=pQ,r=Math.floor((i=a.duration*a.timescale)/(p0+1)),i=Math.floor(i%(p0+1)),r=pQ("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(y(pJ(a.timescale,4)),y(pJ(r,4)),y(pJ(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=[],u=(e=v(e.g)).next();!u.done;u=e.next())s=(o=i).push,u=pQ("trex",u=new Uint8Array([0,0,0,0].concat(y(pJ(u.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),s.call(o,u);if(e=pQ("mvex",e=nY.apply(nG,y(i))),i=[],a.encrypted){for(o=(a=v(a.stream.drmInfos)).next();!o.done;o=a.next())if((o=o.value).initData)for(s=(o=v(o.initData)).next();!s.done;s=o.next())i.push(s.value.initData);a=nY.apply(nG,y(i))}else a=new Uint8Array([]);return e=n("moov",r,t,e,a),(t=new Uint8Array(ft.byteLength+e.byteLength)).set(ft),t.set(e,ft.byteLength),t}function pq(e){var t=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){t=e.stream.width||0;var n=e.stream.height||0;if(0<e.za.byteLength)var i=pQ("avcC",e.za);else{i=pQ;for(var r=7,a=[],o=[],s=0,u=0,l=0,c=0;c<e.fb.length;c++){var d=p$(e.fb[c]);switch(31&d[0]){case 7:a.push(d),r+=d.length+2;break;case 8:o.push(d),r+=d.length+2}}for(0<a.length&&(s=a[0][1],l=a[0][2],u=a[0][3]),r=new Uint8Array(r),c=0,r[c++]=1,r[c++]=s,r[c++]=l,r[c++]=u,r[c++]=255,r[c++]=224|a.length,s=0;s<a.length;s++)r[c++]=(65280&a[s].length)>>8,r[c++]=255&a[s].length,r.set(a[s],c),c+=a[s].length;for(a=0,r[c++]=o.length;a<o.length;a++)r[c++]=(65280&o[a].length)>>8,r[c++]=255&o[a].length,r.set(o[a],c),c+=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(y(pJ(t,2)),y(pJ(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=pX(e),a=new Uint8Array([]),e.encrypted&&(a=pz(e),n="encv"),t=pQ(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=pQ("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(y(pJ(n,2)),y(pJ(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=pX(e),a=new Uint8Array([]),e.encrypted&&(a=pz(e),i="encv"),t=pQ(i,n,t,o,a));break;case"audio":e.codecs.includes("mp3")?e=pQ(".mp3",pW(e)):(e.codecs.includes("ac-3")?(t=pQ("dac3",e.pa),n="ac-3"):e.codecs.includes("ec-3")?(t=pQ("dec3",e.pa),n="ec-3"):e.codecs.includes("opus")?(t=pQ("dOps",e.pa),n="Opus"):(0<e.pa.byteLength?t=pQ("esds",e.pa):(t=pQ,n=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,s=nZ("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(y(pJ(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=pz(e),n="enca"),e=pQ(n,pW(e),t,i)),t=e}return e=pQ("stsd",fe,t),pQ("stbl",e,pQ("stts",p4),pQ("stsc",p5),pQ("stsz",p8),pQ("stco",p6))}function pX(e){if(!e.Da&&!e.Fa)return new Uint8Array([]);var t=e.Fa;
1return pQ("pasp",e=new Uint8Array([].concat(y(pJ(e.Da,4)),y(pJ(t,4)))))}function pW(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(y(pJ(e.stream.audioSamplingRate||44100,2)),[0,0]))}function pz(e){for(var t=e.codecs.substring(0,e.codecs.indexOf(".")),n=0,i=0;i<t.length;i+=1)n|=t.charCodeAt(i)<<8*(t.length-i-1);t=pQ("frma",t=new Uint8Array([].concat(y(pJ(n,4))))),n=pQ("schm",n=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0])),i=pQ;var r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=v(e.stream.drmInfos);for(var a=e.next();!a.done;a=e.next())if((a=a.value)&&a.keyIds&&a.keyIds.size){a=v(a.keyIds);for(var o=a.next();!o.done;o=a.next())r=p$(o.value)}return r=pQ("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),r),pQ("sinf",t,n,i("schi",r))}function pY(e){var t=[];e=v(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=pQ,u=new Uint8Array([0,0,0,0].concat(y(pJ(n.data?n.data.wb:0,4))));u=pQ("mfhd",u);var l=n.data?n.data.ab:[],c=new Uint8Array(4+l.length);for(r=0;r<l.length;r++){var d=l[r].flags;c[r+4]=d.Ya<<4|d.$a<<2|d.Za}var h=(l=pQ("sdtp",c)).length+92;c=pQ,r=pQ("tfhd",r=new Uint8Array([0,0,0,58].concat(y(pJ(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])));var p=Math.floor((d=n.data?n.data.baseMediaDecodeTime:0)%(p0+1));d=pQ("tfdt",d=new Uint8Array([1,0,0,0].concat(y(pJ(Math.floor(d/(p0+1)),4)),y(pJ(p,4)))));var f=h,g=12+16*(p=(h=n.data?n.data.ab:[]).length),m=new Uint8Array(g);for(f+=8+g,m.set([+("video"===n.type),0,15,1].concat(y(pJ(p,4)),y(pJ(f,4))),0),f=0;f<p;f++){var b=h[f];g=pJ(b.duration,4);var w=pJ(b.size,4),T=b.flags;b=pJ(b.hb,4),m.set([].concat(y(g),y(w),[T.kb<<2|T.Ya,T.$a<<6|T.Za<<4|T.lb,61440&T.Xa,15&T.Xa],y(b)),12+16*f)}s=s("moof",u,l=c("traf",r,d,h=pQ("trun",m),l)),o.call(a,t,[s,(i=((i=n).data?i.data.ab:[]).map(function(e){return e.data}),pQ("mdat",i=nY.apply(nG,y(i))))])}return nY.apply(nG,y(t))}function pJ(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function p$(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 pQ(e){var t=V.apply(1,arguments),n=p1[e];n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],p1[e]=n);for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for((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 pZ=!1,p0=0xffffffff,p1={},p2=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]),p3=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]),p4=new Uint8Array([0,0,0,0,0,0,0,0]),p5=new Uint8Array([0,0,0,0,0,0,0,0]),p6=new Uint8Array([0,0,0,0,0,0,0,0]),p8=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),p9=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),p7=new Uint8Array([0,0,0,0,0,0,0,0]),fe=new Uint8Array([0,0,0,0,0,0,0,1]),ft=new Uint8Array([]),fn=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),fi=new Uint8Array([]);function fr(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.C=new $(5),this.o=new ez(function(){var t,n;t=e,F(function(e){switch(e.g){case 1:return D(e,2),M(e,fa(t),4);case 4:P(e,3);break;case 2:n=L(e),t.h&&(n.severity=1,t.h.onError(n));case 3:if(!t.h)return e.return();C(e)}})}),this.B=new rv,this.m=new Map,this.A=function(){return!1}}function fa(e){var t,n,i,r,a,o;return F(function(s){if(1==s.g)return t=rx(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),ry(e.B,r),M(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 u,l=a.uri,c=a.data,d=e.g.mss.manifestPreprocessor;if(d!=sG){if(ef("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(c=hh(c,"SmoothStreamingMedia")))throw new eB(2,4,4046,l);d(c),c=tp(c.outerHTML)}var h=tI(c,"SmoothStreamingMedia");if(!h)throw new eB(2,4,4046,l);if((l=e.g.mss.manifestPreprocessorTXml)!=sK&&l(h),e.i||(e.i=new oS(null,0)),l=t_(h,"IsLive",tY,!1))throw new eB(2,4,4047);e.i.zc(!l),d=t_(h,"TimeScale",tW,1e7),c=t_(h,"DVRWindowLength",tW),l&&(0===c||isNaN(c))&&(c=1/0);var p=t_(h,"CanSeek",tY,!1);for(0===c&&p&&(c=1/0),p=null,c&&0<c&&(p=c/d),l&&!isNaN(e.g.availabilityWindowOverride)&&(p=e.g.availabilityWindowOverride),null==p&&(p=1/0),e.i.pe(p),c=t_(h,"Duration",tW,1/0),l||e.i.bb(c/d),l={variants:[],textStreams:[],timescale:d,duration:c/d},p=tP(h,"Protection"),d=e.g.mss.keySystemsBySystemId,c=[],u=(p=v(p)).next();!u.done;u=p.next())c=c.concat(tP(u.value,"ProtectionHeader"));if(c.length){for(u=0,p=[];u<c.length;u++){var f=c[u],g=f.attributes.SystemID.toLowerCase(),m=d[g];if(m){var b=pF(f);if(b)e:{b=v(tj(b,"DATA"));for(var w=b.next();!w.done;
1w=b.next())if(w=tU(w.value,"KID")){b=nz(b=new Uint8Array([(b=nX(tL(w)))[3],b[2],b[1],b[0],b[5],b[4],b[7],b[6]].concat(y(b.slice(8)))));break e}b=null}else b=null;g=n$(m,"cenc",g=[{initData:rY(w=nX(tL(f)),g=nW(g.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:b}]),b&&g.keyIds.add(b),(m=pH.get(m))&&(g.licenseServerUri=m(f)),p.push(g)}}d=p}else d=[];for(u=d,p=[],d=[],c=[],f=(h=v(h=tP(h,"StreamIndex"))).next();!f.done;f=h.next()){m=tP(f=f.value,"QualityLevel"),g=l.timescale,b=l.duration,w=tP(f,"c");for(var T=[],x=0,S=0;S<w.length;++S){var A=w[S],E=w[S+1],k=t_(A,"t",tW),I=t_(A,"d",tW);if(A=t_(A,"r",tq),!I)break;if(k=null!=k?k:x,(A=A||0)&&A--,0>A)if(E){if(null==(E=t_(E,"t",tW))||k>=E)break;A=Math.ceil((E-k)/I)-1}else{if(1/0==b||k/g>=b)break;A=Math.ceil((b*g-k)/I)-1}for(E=0;E<=A;++E)x=k+I,T.push({start:k/g,end:x/g,eg:k}),k=x}for(g=T,b=(m=v(m)).next();!b.done;b=m.next())(b=function(e,t,n,i,r,a){var o=t.attributes.Type;if("audio"!==o&&"video"!==o&&"text"!==o)return en("Ignoring unrecognized type:",o),null;var s=t.attributes.Language,u=e.s++,l=t_(n,"Bitrate",tX),c=t_(n,"MaxWidth",tX),d=t_(n,"MaxHeight",tX),h=t_(n,"Channels",tX),p=t_(n,"SamplingRate",tX),f=a.duration;i.length&&(f=i[i.length-1].end-i[0].start);var g=e.i.getDuration();e.i.bb(Math.min(f,g));var m={id:u,originalId:t.attributes.Name||String(u),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:c||void 0,height:d||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:ix(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:h,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:f,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1};if((r=t.attributes.Subtype)&&((r=fs[r])&&m.roles.push(r),"main"===r&&(m.primary=!0)),(null===(r=n.attributes.FourCC)||""===r)&&(r=t.attributes.FourCC),!r){if("audio"===o)r="AAC";else if("video"===o)return en('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!fo.includes(r.toUpperCase()))return en("Codec not supported:",r),null;switch(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,m),m.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return en("Quality unsupported without CodecPrivateData",o),null;m.type="audio",m.mimeType="mss/audio/mp4",m.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 en("Quality unsupported without CodecPrivateData",o),null;m.type="video",m.mimeType="mss/video/mp4",m.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":m.type=n2,m.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(m.codecs="stpp")}return m.fullMimeTypes.add(n8(m.mimeType,m.codecs)),m.createSegmentIndex=function(){if(m.segmentIndex)return Promise.resolve();if(e.m.has(m.id))var n=e.m.get(m.id);else n=[],"video"==m.type&&(n=m.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=pK(new pG([n={id:m.id,type:m.type,codecs:m.codecs,encrypted:m.encrypted,timescale:m.mssPrivateData.timescale,duration:m.mssPrivateData.duration,fb:n,pa:new Uint8Array([]),za:new Uint8Array([]),Da:0,Fa:0,data:null,stream
1:m}])),e.m.set(m.id,n);return n=function(e,t,n,i,r){var a=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=v(r);for(var o=r.next(),s={};!o.done;s={se:void 0},o=r.next())s.se=o.value,i.push(new aw(s.se.start,s.se.end,function(t){return function(){return nJ(e.l,[a.replace("{start time}",String(t.se.eg))])}}(s),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new ay(function(){return[]},0,null,so(m),m.mssPrivateData.timescale,n),m,t,i),m.segmentIndex=new oG(n),Promise.resolve()},m.closeSegmentIndex=function(){m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null)},m}(e,f,b.value,g,u,l))&&("audio"!=b.type||e.g.disableAudio?"video"!=b.type||e.g.disableVideo?b.type!=n2||e.g.disableText||c.push(b):d.push(b):p.push(b))}for(h=[],u=(p=v(0<p.length?p:[null])).next();!u.done;u=p.next())for(u=u.value,T=(f=v(0<d.length?d:[null])).next();!T.done;T=f.next())g=(m=h).push,b=e,w=u,T=T.value,S=0,w&&w.bandwidth&&0<w.bandwidth&&(S+=w.bandwidth),T&&T.bandwidth&&0<T.bandwidth&&(S+=T.bandwidth),b={id:b.s++,language:w?w.language:"und",disabledUntilTime:0,primary:!!w&&w.primary||!!T&&T.primary,audio:w,video:T,bandwidth:S,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},g.call(m,b);l.variants=h,l.textStreams=c,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.Yd()),Promise.resolve(),o=(Date.now()-i)/1e3,e.C.sample(1,o),C(s)})}(b=fr.prototype).configure=function(e,t){this.g=e,t&&(this.A=t)},b.start=function(e,t){var n=this;return F(function(i){if(1==i.g)return n.l=[e],n.h=t,M(i,fa(n),2);if(!n.h)throw new eB(2,7,7001);return i.return(n.j)})},b.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()},b.update=function(){var e,t=this;return F(function(n){return 1==n.g?(D(n,2),M(n,fa(t),4)):2!=n.g?P(n,0):(e=L(n),t.h&&e)?void(t.h.onError(e),C(n)):n.return()})},b.onExpirationUpdated=function(){},b.onInitialVariantChosen=function(){},b.banLocation=function(){},b.setMediaElement=function(){},z("shaka.mss.MssParser",fr);var fo="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fs={CAPT:"main",SUBT:"alternate",DESC:"main"};function fu(e,t,n,i,r,a){if(200<=n&&299>=n&&202!=n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};var o=null;try{o=th(t)}catch(e){}throw new eB(401==n||403==n?2:1,1,1001,i,n,o,e,a,r||i)}function fl(){}function fc(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,x,S,A,E,k=new fm;rP(t.headers).forEach(function(e,t){k.append(t,e)});var I=new ff,R={ng:!1,ph:!1};if(e=new rs((o=e,s=n,u={body:t.body||void 0,headers:k,method:t.method,signal:I.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},l=R,c=i,d=r,h=t.streamDataCallback,p=a.minBytesForProgressEvents||0,e=F(function(e){switch(e.g){case 1:return f=fp,g=fg,b=y=0,w=Date.now(),D(e,2),M(e,f(o,u),4);case 4:if(d(fd((m=e.h).headers)),"HEAD"==u.method){e.u(5);break}return T=m.clone().body.getReader(),S=(x=m.headers.get("Content-Length"))?parseInt(x,10):0,new g({start:function(e){!function t(){var n,i,r,a;return F(function(o){switch(o.g){case 1:return D(o,2),M(o,T.read(),4);case 4:n=o.h,P(o,3);break;case 2:return L(o),o.return();case 3:if(n.done||(y+=n.value.byteLength,!h)){o.u(5);break}return M(o,h(n.value),5);case 5:i=Date.now(),r=y-b,(100<i-w&&r>=p||n.done)&&(a=n.done?0:S-y,c(i-w,r,a),b=y,w=i),n.done?e.close():(e.enqueue(n.value),t()),C(o)}})}()}}),M(e,m.arrayBuffer(),6);case 6:v=e.h;case 5:P(e,3);break;case 2:if(A=L(e),l.ng)throw new eB(1,1,7001,o,s);if(l.ph)throw new eB(1,1,1003,o,s);throw new eB(1,1,1002,o,A,s);case 3:return E=fd(m.headers),e.return(fu(E,v,m.status,o,m.url,s))}})),function(){return R.ng=!0,I.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var N=new ez(function(){R.ph=!0,I.abort()});N.Z(t/1e3),e.finally(function(){N.stop()})}return e}function fd(e){var t={};return e.forEach(function(e,n){t[n.trim()]=e}),t}function fh(){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)}ag["application/vnd.ms-sstr+xml"]=function(){return new fr},z("shaka.net.HttpFetchPlugin",fl),fl.isSupported=fh,fl.parse=fc;var fp=e.fetch,ff=e.AbortController,fg=e.ReadableStream,fm=e.Headers;function fv(){}function fy(e,t,n,i,r,a){var o=new fw,s=Date.now(),u=0;return new rs(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 eB(1,1,7001,e,
1n))};var d=!1;for(var h in o.onreadystatechange=function(){2!=o.readyState||d||(r(fb(o)),d=!0)},o.onload=function(t){var r=fb(o),a=o.response;try{i(Date.now()-s,t.loaded-u,0);var d=fu(r,a,o.status,e,o.responseURL,n);l(d)}catch(e){c(e)}},o.onerror=function(t){c(new eB(1,1,1002,e,t,n))},o.ontimeout=function(){c(new eB(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=v(t);for(var n=t.next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}fh()&&(rw("http",fc,2,!0),rw("https",fc,2,!0),rw("blob",fc,2,!0)),z("shaka.net.HttpXHRPlugin",fv),fv.parse=fy;var fw=e.XMLHttpRequest;function fT(e,t,n,i){this.g=e,this.i=t,this.groupId=n,this.h=i}function fx(e){return e.N().map(function(e){return"{"+encodeURI(e.split("#xywh=")[0])+"}"}).join("")+":"+e.Ka+":"+e.ua}function fS(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function fA(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function fE(e){var t=this;this.o=e,this.j=new Map,this.i=new rC(function(){return fk(t).catch(function(){})}),this.h=[],this.m=function(){},this.l=function(){},this.g=new fS}function fk(e){var t=e.h.map(function(e){return e()});return e.h=[],Promise.all(t)}function fI(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new ro,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 fM(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return F(function(i){if(1==i.g)return null==r.result?(n(),i.return()):M(i,t((e=r.result).key,e.value,e),2);e.continue(),C(i)})}})}function fC(e){this.h=e,this.g=[]}function fD(e,t){return fR(e,t,"readwrite")}function fR(e,t,n){var i=new fI(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){eU(e.g,i)},function(){eU(e.g,i)}),i}function fP(e,t,n){this.h=new fC(e),this.i=t,this.g=n}function fL(e){return Promise.reject(new eB(2,9,9011,"Cannot add new value to "+e))}function fN(e,t,n,i){t=(e=fD(e.h,t)).store(),n=v(n);for(var r=n.next(),a={};!r.done;a={xf:void 0},r=n.next())a.xf=r.value,t.delete(a.xf).onsuccess=function(e){return function(){return i(e.xf)}}(a);return e.promise()}function fj(e,t,n){var i,r,a,o,s,u,l;return F(function(c){if(1==c.g){for(r=(i=fR(e.h,t,"readonly")).store(),a={},o=[],u=(s=v(n)).next(),l={};!u.done;l={ke:void 0,Ud:void 0},u=s.next())l.Ud=u.value,l.ke=r.get(l.Ud),l.ke.onsuccess=function(e){return function(){void 0==e.ke.result&&o.push(e.Ud),a[e.Ud]=e.ke.result}}(l);return M(c,i.promise(),2)}if(o.length)throw new eB(2,9,9012,"Could not find values for "+o);return c.return(n.map(function(e){return a[e]}))})}function fU(e){this.g=new fC(e)}function fO(){this.g=new Map}function f_(e){var t=null;
1if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{rb:n,Ma:i},Ma:e})})}),t)return t;throw new eB(2,9,9013,"Could not find a cell that supports add-operations")}function fB(e,t,n){if(!(e=e.g.get(t)))throw new eB(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new eB(2,9,9013,"Could not find cell with name "+n);return t}function fF(e,t){fV.set(e,t)}rw("http",fy,1,!0),rw("https",fy,1,!0),rw("blob",fy,1,!0),fS.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},fE.prototype.destroy=function(){return this.i.destroy()},fI.prototype.abort=function(){var e=this;return F(function(t){if(1==t.g){try{e.i.abort()}catch(e){}return D(t,2),M(t,e.g,4)}if(2!=t.g)return P(t,0);L(t),C(t)})},fI.prototype.store=function(){return this.h},fI.prototype.promise=function(){return this.g},fC.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(b=fP.prototype).destroy=function(){return this.h.destroy()},b.hasFixedKeySpace=function(){return!0},b.addSegments=function(){return fL(this.i)},b.removeSegments=function(e,t){return fN(this,this.i,e,t)},b.getSegments=function(e){var t,n=this;return F(function(i){return 1==i.g?M(i,fj(n,n.i,e),2):(t=i.h,i.return(t.map(function(e){return n.qg(e)})))})},b.addManifests=function(){return fL(this.g)},b.updateManifest=function(){return Promise.reject(new eB(2,9,9016,"Cannot modify values in "+this.g))},b.updateManifestExpiration=function(e,t){var n=fD(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,i.put(n,e))},n.promise()},b.removeManifests=function(e,t){return fN(this,this.g,e,t)},b.getManifests=function(e){var t,n=this;return F(function(i){return 1==i.g?M(i,fj(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map(function(e){return n.ad(e)}))))})},b.getAllManifests=function(){var e,t,n=this;return F(function(i){return 1==i.g?(e=fR(n.h,n.g,"readonly"),t=new Map,M(i,fM(e,function(e,i){var r;return F(function(a){if(1==a.g)return M(a,n.ad(i),2);r=a.h,t.set(e,r),C(a)})}),2)):3!=i.g?M(i,e.promise(),3):i.return(t)})},b.qg=function(e){return e},b.ad=function(e){return Promise.resolve(e)},b.add=function(e,t){var n,i,r,a,o,s,u,l=this;return F(function(c){if(1==c.g){for(i=(n=fD(l.h,e)).store(),r=[],o=(a=v(t)).next(),s={};!o.done;s={Mf:void 0},o=a.next())u=o.value,s.Mf=i.add(u),s.Mf.onsuccess=function(e){return function(){r.push(e.Mf.result)}}(s);return M(c,n.promise(),2)}return c.return(r)})},fU.prototype.destroy=function(){return this.g.destroy()},fU.prototype.getAll=function(){var e,t,n=this;return F(function(i){return 1==i.g?(e=fR(n.g,"session-ids","readonly"),t=[],M(i,fM(e,function(e,n){t.push(n)}),2)):3!=i.g?M(i,e.promise(),3):i.return(t)})},fU.prototype.add=function(e){var t=fD(this.g,"session-ids"),n=t.store();e=v(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},fU.prototype.remove=function(e){var t,n=this;return F(function(i){return 1==i.g?M(i,fM(t=fD(n.g,"session-ids"),function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2):M(i,t.promise(),0)})},fO.prototype.destroy=function(){for(var e=[],t=v(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},fO.prototype.init=function(){var e=this;fV.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=v(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},z("shaka.offline.StorageMuxer",fO),fO.unregister=function(e){fV.delete(e)},fO.register=fF,fO.prototype.destroy=fO.prototype.destroy;var fV=new Map;function fH(){fP.apply(this,arguments)}function fG(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 eB(2,9,9004,"Could not parse uri "+e)}function fK(){fP.apply(this,arguments)}function fq(){fP.apply(this,arguments)}function fX(){this.m=this.j=this.i=this.h=this.g=this.l=null}function fW(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j="offline:"+e+"/"+t+"/"+n+"/"+i}function fz(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 fW(t,n,i,Number(e[4])):null}function fY(e,t){this.h=e,this.g=t}function fJ(e,t){var n=new oS(null,0);n.bb(t.duration);var i=t.streams.filter(function(e){return"audio"==e.type}),r=t.streams.filter(function(e){return"video"==e.type});i=function(e,t,n,i){for(var r=new Set,a=v(t),o=a.next();!o.done;o=a.next()){o=v(o.value.variantIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}for(o=(a=v(n)).next();!o.done;o=a.next())for(s=(o=v(o.value.variantIds)).next();!s.done;s=o.next())r.add(s.value);for(a=new Map,o=(r=v(r)).next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(r=(t=v(t)).next();!r.done;r=t.next())for(r=f$(e,o=r.value,i),s=(o=v(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=v(n)).next();!t.done;t=n.next())for(t=f$(e,r=t.value,i),o=(r=v(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==n2}).map(function(t){return f$(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return f$(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=v(i.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function f$(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 fW("segment",i.h,i.g,r.dataKey),(i=new aw(r.startTime,r.endTime,function(){return[o.toString()]},0,null,null!=r.initSegmentKey?(s=i,u=r.initSegmentKey,l=new fW("segment",s.h,s.g,u),new ay(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.qe(r.thumbnailSprite),i});return n.td(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new oG(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,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([n8(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1}}function fQ(){this.g=null}function fZ(){}function f0(e){var t,n,i,r=fz(e);return r&&"manifest"==r.g?rc(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):r&&"segment"==r.g?(t=r.key(),n=r,i=new fO,rc(void 0).Ca(function(){return i.init()}).Ca(function(){return fB(i,n.rb(),n.Ma())}).Ca(function(e){return e.getSegments([n.key()])}).Ca(function(e){return{uri:n,data:e[0].data,headers:{}}}).finally(function(){return i.destroy()})):ru(new eB(2,1,9004,e))}
1function f1(e,t,n){var i,r,a,o;return F(function(s){switch(s.g){case 1:i=[];for(var u,l,c,d,h,p=[],f=v(n),g=f.next();!g.done;g=f.next()){g=g.value;for(var m=!1,y=v(p),b=y.next();!b.done;b=y.next())if(function(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&eO(e.audioCapabilities,t.audioCapabilities,n)&&eO(e.videoCapabilities,t.videoCapabilities,n)}((b=b.value).info,g)){b.sessionIds.push(g.sessionId),m=!0;break}m||p.push({info:g,sessionIds:[g.sessionId]})}a=(r=v(p)).next();case 2:if(a.done){s.u(4);break}return M(s,(u=e,l=t,c=a.value,F(function(e){switch(e.g){case 1:var t,n,i,r,a,o,s;return d=new rJ({Ob:l,onError:function(){},ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(e,2),d.configure(u),M(e,(t=d,n=c.info.keySystem,i=c.info.licenseUri,r=c.info.serverCertificate,a=c.info.audioCapabilities,o=c.info.videoCapabilities,s=new Map,(a={audioCapabilities:a,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:n}).drmInfos=[{keySystem:n,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioR
1obustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],s.set(n,a),r3(t,s,[])),4);case 4:P(e,3);break;case 2:return L(e),M(e,d.destroy(),5);case 5:return e.return([]);case 3:return h=[],M(e,Promise.all(c.sessionIds.map(function(e){return F(function(t){if(1==t.g){var n,i,r,a;return D(t,2),M(t,(n=d,F(function(t){return 1==t.g?M(t,r6(n,e,{initData:null,initDataType:null}),2):3!=t.g?(i=t.h)?(r=[],(a=n.i.get(i))&&(a.nb=new ro,r.push(a.nb)),r.push(i.remove()),M(t,Promise.all(r),3)):t.return():void(n.i.delete(i),C(t))})),4)}if(2!=t.g)return h.push(e),P(t,0);L(t),C(t)})})),6);case 6:return M(e,d.destroy(),7);case 7:return e.return(h)}})),5);case 5:o=s.h,i=i.concat(o),a=r.next(),s.u(2);break;case 4:return s.return(i)}})}function f2(e,t){var n=fJ(new fY(e.rb(),e.Ma()),t),i=t.appMetadata||{};return n=f3(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 f3(e){var t=[],n=iq(e.variants);n=v(n);for(var i=n.next();!i.done;i=n.next())t.push(iO(i.value));for(n=(e=v(e.textStreams)).next();!n.done;n=e.next())t.push(i_(n.value));return t}function f4(){this.g={}}function f5(e,t){return null==(e=e.g[t])&&(e=0),e}function f6(e){var t=this;if(e&&e.constructor!=uw)throw new eB(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Ab()):(this.h=sV(),this.g=new rb),this.i=[],this.j=[];var n=!e;this.l=new rC(function(){var e,i,r,a,o;return F(function(s){switch(s.g){case 1:return M(s,Promise.all(t.j.map(function(e){return fk(e)})),2);case 2:for(e=function(){},i=[],a=(r=v(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return M(s,Promise.all(i),3);case 3:if(!n){s.u(4);break}return M(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,C(s)}})}),this.m=1e9}function f8(){if(eY())e:{for(var e=v(fV.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 f9(e){var t,n,i;return F(function(r){switch(r.g){case 1:return M(r,(t=new fO).init(),2);case 2:return M(r,f_(t),3);case 3:return i=new fW("manifest",(n=r.h).path.rb,n.path.Ma,e),M(r,t.destroy(),4);case 4:return M(r,(new f6).remove(i.toString()),0)}})}function f7(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g;return F(function(m){switch(m.g){case 1:for(o=!1,D(m,2),s=!0,l=(u=v(n.streams)).next();!l.done;l=u.next())for(d=(c=v(l.value.segments)).next();!d.done;d=c.next())null!=(p=(h=d.value).pendingSegmentRefId?i[h.pendingSegmentRefId]:null)&&(h.dataKey=p,h.pendingSegmentRefId=void 0),null!=(p=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=p,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),M(m,e.updateManifest(t,n),4);case 4:o=!0,a(),P(m,0);break;case 2:return f=L(m),M(m,f9(t),5);case 5:if(o){m.u(6);break}return g=Object.values(i),M(m,e.removeSegments(g,function(){}),6);case 6:throw f}})}function ge(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 gn(e,t,n,i){if(t.expiration=n.ed(),n=r2(n),t.sessionIds=i.offline.usePersistentLicense?n:[],ge(e)&&i.offline.usePersistentLicense&&!n.length)throw new eB(2,9,9007)}function gi(e,t){for(var n=[],i=v(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:n8(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:n8(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function gr(e,t){var n;return F(function(i){switch(i.g){case 1:return D(i,2),M(i,s2(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,P(i,3);break;case 2:L(i);case 3:if(n)return i.return(n);throw new eB(1,2,2011,t)}})}function ga(e){if(e.l.g)throw new eB(2,9,7001)}
1function go(){if(!f8())throw new eB(2,9,9e3)}function gs(e,t){return F(function(n){return 1==n.g?(e.i.push(t),R(n,2),M(n,t,4)):2!=n.g?n.return(n.h):(N(n),eU(e.i,t),j(n,0))})}function gu(e){for(var t=new Set,n=v(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=v(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=v(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}A(fH,fP),fH.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return F(function(o){return i=(n=fD(a.h,a.g)).store(),r=new ro,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new eB(2,9,9012,"Could not find values for "+e))},M(o,Promise.all([n.promise(),r]),0)})},fH.prototype.ad=function(e){var t,n,i,r,a;return F(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n)i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime,r=function(e,t){!function(e){var t=e.streams.filter(function(e){return"audio"==e.contentType});if(e=e.streams.filter(function(e){return"video"==e.contentType}),!t.every(function(e){return e.variantIds})||!e.every(function(e){return e.variantIds})){for(var n=v(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=v(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=v(e),a=r.next();!a.done;a=r.next())a.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=(r=v(t)).next();!a.done;a=r.next())a.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=v(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=v(e)).next();!a.done;a=r.next()){a=a.value;var o=n++;i.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=v(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(n){return function(e,t,n){var i=e.initSegmentUri?fG(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=fG(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 M(o,dq(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})})},fH.prototype.qg=function(e){return{data:e.data}},A(fK,fP),fK.prototype.ad=function(e){var t,n,i,r,a;return F(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n){i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime;for(var s=e.periods[n],u=[],l=v(s.streams),c=l.next();!c.done;c=l.next())0!=(c=c.value).variantIds.length&&u.push(function(e,t,n){return{id:e.id,originalId:e.originalId,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}}(c,s.startTime,s.startTime+i));r=u,t.push(r)}return M(o,dq(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})})},A(fq,fP),(b=fq.prototype).hasFixedKeySpace=function(){return!1},b.addSegments=function(e){return this.add(this.i,e)},b.addManifests=function(e){return this.add(this.g,e)},b.updateManifest=function(e,t){var n,i;return n=this,(i=(n=fD(n.h,n.g)).store()).get(e).onsuccess=function(){i.put(t,e)},n.promise()},b.ad=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(b=fX.prototype).init=function(){var t=this,n=new ro,i=!1,r=new ez(function(){i=!0,n.reject(new eB(2,9,9017))});r.Z(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 fH(e,"segment","manifest"):null,t.h=o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new fK(e,"segment-v2","manifest-v2"):null,t.i=o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new fK(e,"segment-v3","manifest-v3"):null,t.j=o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new fq(e,"segment-v5","manifest-v5"):null,t.m=e=e.objectStoreNames.contains("session-ids")?new fU(e):null,r.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=v(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){i||(n.reject(new eB(2,9,9001,a.error)),r.stop(),e.preventDefault())},n},b.destroy=function(){var e=this;return F(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return M(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return M(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return M(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return M(t,e.j.destroy(),8);case 8:if(!e.m){t.u(10);break}return M(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),C(t)}})},b.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},b.getEmeSessionCell=function(){return this.m}
1,b.erase=function(){var t=this;return F(function(n){switch(n.g){case 1:if(!t.g){n.u(2);break}return M(n,t.g.destroy(),2);case 2:if(!t.h){n.u(4);break}return M(n,t.h.destroy(),4);case 4:if(!t.i){n.u(6);break}return M(n,t.i.destroy(),6);case 6:if(!t.j){n.u(8);break}return M(n,t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),M(n,(i=new ro,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new eB(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,M(n,t.init(),0)}})},fF("idb",function(){return(!e2()||e2()&&tt())&&!eQ()&&e.indexedDB?new fX:null}),fW.prototype.rb=function(){return this.i},fW.prototype.Ma=function(){return this.h},fW.prototype.key=function(){return this.l},fW.prototype.toString=function(){return this.j},(b=fQ.prototype).configure=function(){},b.start=function(e,t){var n,i,r,a,o,s=this;return F(function(u){switch(u.g){case 1:if(s.g=n=fz(e),null==n||"manifest"!=n.g)throw new eB(2,1,9004,e);return i=new fO,R(u,2),M(u,i.init(),4);case 4:return M(u,fB(i,n.rb(),n.Ma()),5);case 5:return r=u.h,M(u,r.getManifests([n.key()]),6);case 6:return a=u.h[0],o=fJ(new fY(n.rb(),n.Ma()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return N(u),M(u,i.destroy(),7);case 7:j(u,0)}})},b.stop=function(){return Promise.resolve()},b.update=function(){},b.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return F(function(l){switch(l.g){case 1:return n=u.g,i=new fO,D(l,2,3),M(l,i.init(),5);case 5:return M(l,fB(i,n.rb(),n.Ma()),6);case 6:return r=l.h,M(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 M(l,r.updateManifestExpiration(n.key(),t),3);case 3:return N(l),M(l,i.destroy(),10);case 10:j(l,0);break;case 2:L(l),l.u(3)}})},b.onInitialVariantChosen=function(){},b.banLocation=function(){},b.setMediaElement=function(){},ag["application/x-offline-manifest"]=function(){return new fQ},z("shaka.offline.OfflineScheme",fZ),fZ.plugin=f0,rw("offline",f0),(b=f6.prototype).destroy=function(){return this.l.destroy()},b.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=sL(e,t)),sH(this.h,e)},b.getConfiguration=function(){var e=sV();return sH(e,this.h,sV()),e},b.Ab=function(){return this.g},b.store=function(e,t,n,i,r){var a,o,s,u,l,c,d,h,p,f,g,m,y,b,w,T,x,S,A,E,k,I,R,U,O,_,B,V,H,G,K,q=this,X=this.getConfiguration(),W=new fE(this.g);return this.j.push(W),(t=new rs((a=this,o=e,s=t||{},u=i||[],l=r||[],c=function(){var t;return F(function(i){return 1==i.g?n?i.u(2):M(i,s2(e,q.g,X.manifest.retryParameters),3):(2!=i.g&&(n=i.h),t=af(e,n||null),i.return(t()))})},d=X,h=W,t=F(function(e){var t,n,i,r,H,G,K,q,X,W,z,Y,J,$,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,eT,ex,eS,eE,ek,eI,eM,eC,eD,eR,eP,eL,eN,ej,eO,e_,eF,eV,eH,eG,eK,eq,eX,eW,ez,eY,eJ,e$,eQ,eZ,e0,e1,e2,e3,e4,e5,e6,e8,e9,e7,te,tt,tn,ti;switch(e.g){case 1:return go(),f=p=null,g=new fO,b=y=m=null,D(e,2,3),M(e,c(),5);case 5:return p=e.h,M(e,(t=a,n=o,i=p,r=d,F(function(e){if(1==e.g)return H=null,G={networkingEngine:t.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){H=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},i.configure(r.manifest),ga(t),M(e,i.start(n,G),2);if(3!=e.g)return K=e.h,ga(t),M(e,Promise.all(rR(gu(K),function(e){return e.createSegmentIndex()})),3);if(ga(t),H)throw H;return e.return(K)})),6);case 6:if(w=e.h,ga(a),!(!w.presentationTimeline.U()&&!w.presentationTimeline.uc()))throw new eB(2,9,9005,o);x=(T=v(u)).next();case 7:if(x.done){e.u(9);break}return M(e,(q=a,X=x.value,W=w,F(function(e){switch(e.g){case 1:return M(e,gr(q,X),2);case 2:var t,n,i,r,a,o;if("text/vtt"!=(z=e.h))throw new eB(1,2,2017,X);return M(e,(t=X,n=q.g,i=q.h.streaming.retryParameters,F(function(e){return 1==e.g?(r=rk,(a=rx([t],i)).method="GET",M(e,n.request(r,a).promise,2)):(o=e.h,e.return(o.data))})),3);case 3:if(Y=e.h,!(J=ip[z]))throw new eB(2,2,2014,z);for($=J(),Q={periodStart:0,segmentStart:0,segmentEnd:W.presentationTimeline.getDuration(),vttOffset:0},Z=eA(Y),ee=$.parseMedia(Z,Q,X,[]),et=[],ei=(en=v(ee)).next(),er={};!ei.done;er={ye:void 0,Gc:void 0},ei=en.next())er.Gc=ei.value,er.ye=null,ea=function(e){return function(){return null==e.ye&&(e.ye=nJ([X],[e.Gc.payload])),e.ye||[]}}(er),eo=new aw(er.Gc.startTime,er.Gc.endTime,ea,0,null,null,0,0,1/0),er.Gc.payload.includes("#xywh")&&4===(es=er.Gc.payload.split("#xywh=")[1].split(",")).length&&eo.qe({height:parseInt(es[3],10),positionX:parseInt(es[0],10),positionY:parseInt(es[1],10),width:parseInt(es[2],10)}),et.push(eo);if(eu=z,!et.length){e.u(4);break}return M(e,s2(et[0].N()[0],q.g,q.h.manifest.retryParameters),5);case 5:eu=e.h;case 4:return e.return({id:q.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new oG(et),mimeType:eu||"",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([n8(eu||"","")]),isAudioMuxedInVideo:!1})}})),10);case 10:S=e.h,w.imageStreams.push(S),ga(a),x=T.next(),e.u(7);break;case 9:E=(A=v(l)).next();case 11:if(E.done)return M(e,a.Ec(w,function(e){b=b||e},d),15);return k=E.value,M(e,(el=a,ec=w,ed=k.uri,eh=k.language,ep=k.kind,ef=k.mime,eg=k.codecs,F(function(e){if(1==e.g)return ef?e.u(2):M(e,gr(el,ed),3);
1if(2!=e.g&&(ef=e.h),em={id:el.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:oq(0,ec.presentationTimeline.getDuration(),[ed]),mimeType:ef||"",codecs:eg||"",kind:ep,encrypted:!1,drmInfos:[],keyIds:new Set,language:eh,originalLanguage:eh,label:null,type:n2,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([n8(ef||"",eg||"")]),isAudioMuxedInVideo:!1},!id(n8(em.mimeType,em.codecs)))throw new eB(2,2,2014,ef);return e.return(em)})),14);case 14:I=e.h,w.textStreams.push(I),ga(a),E=A.next(),e.u(11);break;case 15:if(f=e.h,ga(a),b)throw b;return M(e,(ev=w,ey=f,eb=d,F(function(e){switch(e.g){case 1:var t;return ew={width:1/0,height:1/0},t=eb.restrictions,ev.variants=ev.variants.filter(function(e){return iD(e,t,ew)}),M(e,iR(ey,ev,eb.offline.usePersistentLicense,eb.drm.preferredKeySystems),2);case 2:for(eT=[],ex=eb.preferredDecodingAttributes,eS=eb.preferredVideoCodecs,iC(ev,eS,eb.preferredAudioCodecs,ex,eb.preferredTextFormats),ek=(eE=v(ev.variants)
1).next();!ek.done;ek=eE.next())eI=ek.value,eT.push(iO(eI));for(eC=(eM=v(ev.textStreams)).next();!eC.done;eC=eM.next())eD=eC.value,eT.push(i_(eD));for(eP=(eR=v(ev.imageStreams)).next();!eP.done;eP=eR.next())eL=eP.value,eT.push(iB(eL));return M(e,eb.offline.trackSelectionCallback(eT),3);case 3:for(eN=e.h,ej=ev.presentationTimeline.getDuration(),eO=0,eF=(e_=v(eN)).next();!eF.done;eF=e_.next())eV=eF.value.bandwidth*ej/8,eO+=eV;return D(e,4),M(e,eb.offline.downloadSizeCallback(eO),6);case 6:if(!e.h)throw new eB(2,9,9014);P(e,5);break;case 4:if((eH=L(e))instanceof eB)throw eH;throw new eB(2,9,9015);case 5:for(eG=new Set,eK=new Set,eq=new Set,eW=(eX=v(eN)).next();!eW.done;eW=eX.next())"variant"==(ez=eW.value).type&&eG.add(ez.id),"text"==ez.type&&eK.add(ez.id),"image"==ez.type&&eq.add(ez.id);ev.variants=ev.variants.filter(function(e){return eG.has(e.id)}),ev.textStreams=ev.textStreams.filter(function(e){return eK.has(e.id)}),ev.imageStreams=ev.imageStreams.filter(function(e){return eq.has(e.id)}),function(e){e.variants.map(function(e){return e.video});var t=new Set(e.variants.map(function(e){return e.audio}));e=e.textStreams;for(var n=v(t),i=n.next();!i.done;i=n.next()){i=v(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=v(e)).next();!n.done;n=t.next())for(i=(n=v(e)).next();!i.done;i=n.next());}(ev),C(e)}})),16);case 16:return M(e,g.init(),17);case 17:return ga(a),M(e,f_(g),18);case 18:return m=e.h,ga(a),U=(R=function(e,t,n,i,r,a){var o,s,u,l,c={offlineUri:null,originalManifestUri:n,duration:(o=t).presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:o=f3(o),appMetadata:i,isIncomplete:!1},d=r.offline.progressCallback;s=a,s.m=function(e,t){c.size=t,d(c,e)},s.l=function(t,n){h&&r.offline.usePersistentLicense&&p==n&&r1(e,"cenc",t)};var h=ge(t)&&!gt(t),p=null;h&&(p=gl.get(e.g.keySystem));for(var f=new f4,g=v(t.textStreams),m=g.next();!m.done;m=g.next())f.g[m.value.id]=52;for(m=(g=v(t.imageStreams)).next();!m.done;m=g.next())u=f,l=m.value,u.g[l.id]=l.bandwidth||2048;
1for(m=(g=v(t.variants)).next();!m.done;m=g.next())!function(e,t){var n=t.audio,i=t.video;if(n&&!i&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&i&&(e.g[i.id]=i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),e.g[n.id]=r,e.g[i.id]=a}}(f,m.value);return a=(f=function(e,t,n,i){var r=new Map,a=gu(n),o=new Map;a=v(a);for(var s=a.next();!s.done;s=a.next()){var u=function(e,t,n,i,r,a){var o={id:i.id,originalId:i.originalId,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,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),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.qb(),function(n){var r=fx(n),l=void 0;if(!a.has(r)){var c=n.endTime-n.startTime;c=f5(t,i.id)*c,c=fA(e.g,c),a.set(r,new fT(n,c,u,!1))}n.ba&&(l=fx(n.ba),a.has(l)||(c=.5*f5(t,i.id),c=fA(e.g,c),a.set(l,new fT(n.ba,c,u,!0)))),o.segments.push({pendingInitSegmentRefId:l,initSegmentKey:l?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:r,dataKey:0,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,u)}for(t=(e=v(n.variants)).next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),bg:Array.from(r.values())}}(a,f,t,r)).streams,f=f.bg,g=e.g,m=r.offline.usePersistentLicense,g&&m&&(g.initData=[]),{xi:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.ed(),streams:a,sessionIds:m?r2(e):[],drmInfo:g,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},bg:f}}(f,w,o,s,d,h)).xi,O=R.bg,M(e,m.Ma.addManifests([U]),19);case 19:if(_=e.h,ga(a),y=_[0],ga(a),b)throw b;return M(e,(eY=a,eJ=O,e$=y,eQ=U,eZ=h,e0=d,e1=m.Ma,e2=w,e3=f,F(function(e){switch(e.g){case 1:if(e4={},e5=0,e6=function(e,t){var n,i,r,a,o,s,u;return F(function(l){if(1==l.g){var c;for(i=(n=v(e)).next(),r={};!i.done;r={Hc:void 0},i=n.next())r.Hc=i.value,c=r.Hc,a=sc(c.g.N(),c.g.Ka,c.g.ua,e0.streaming.retryParameters),o=r.Hc.i,s=r.Hc.h,u=function(e){return function(t){var n;return F(function(i){if(1==i.g)return M(i,e1.addSegments([{data:t}]),2);n=i.h,ga(eY),e4[fx(e.Hc.g)]=n[0],e5+=t.byteLength,C(i)})}}(r),function(e,t,n,i,r,a){rD(e.i);var o=(e.j.get(t)||Promise.resolve()).then(function(){var t,o,s,u,l,c;return F(function(d){if(1==d.g)return M(d,function(e,t){var n,i,r,a;return F(function(o){return 1==o.g?(n=rk,i=e.o.request(n,t),r=function(){return i.abort()},e.h.push(r),M(o,i.promise,2)):(a=o.h,eU(e.h,r),o.return(a.data))})}(e,n),2);if(t=d.h,e.i.g)throw new eB(2,9,7001);if(r)for(s in(o=new rz(eA(t))).data)u=Number(s),l=o.data[u],c=o.g[u],e.l(l,c);e.g.close(i,t.byteLength);var h=e.g;return e.m(0==h.i?0:h.j/h.i,e.g.h),d.return(a(t))})});e.j.set(t,o)}(eZ,r.Hc.groupId,a,o,s,u);return M(l,F(function(e){return 1==e.g?M(e,Promise.all(eZ.j.values()),2):e.return(eZ.g.h)}),2)}return t?(ga(eY),gn(e2,eQ,e3,e0),M(l,e1.updateManifest(e$,eQ),0)):l.u(0)})},e8=!1,D(e,2),!ge(e2)||!e8||gt(e2)){e.u(4);break}return M(e,e6(eJ.filter(function(e){return e.h}),!0),5);case 5:return ga(eY),eJ=eJ.filter(function(e){return!e.h}),e9=e4,e7=e5,e4={},e5=0,M(e,f7(e1,e$,eQ,e9,e7,function(){return ga(eY)}),6);case 6:ga(eY);case 4:if(e8){e.u(7);break}return M(e,e6(eJ,!1),8);case 8:return ga(eY),te=e4,tt=e5,e4={},e5=0,M(e,f7(e1,e$,eQ,te,tt,function(){return ga(eY)}),9);case 9:ga(eY);case 7:P(e,0);break;
1case 2:return tn=L(e),ti=Object.values(e4),M(e,e1.removeSegments(ti,function(){}),10);case 10:throw tn}})),20);case 20:return ga(a),gn(w,U,f,d),M(e,m.Ma.updateManifest(y,U),21);case 21:return ga(a),B=new fW("manifest",m.path.rb,m.path.Ma,y),e.return(f2(B,U));case 3:return N(e),M(e,g.destroy(),22);case 22:if(!p){e.u(23);break}return M(e,p.stop(),23);case 23:if(!f){e.u(25);break}return M(e,f.destroy(),25);case 25:j(e,0);break;case 2:if(V=L(e),null==y){e.u(27);break}return M(e,f9(y),27);case 27:throw b||V}})),function(){return fk(W)})).finally(function(){eU(q.j,W)}),H=this,K=(G=t).promise,H.i.push(K),G.finally(function(){eU(H.i,K)})},b.remove=function(e){var t,n,i,r,a,o,s;return gs(this,(t=this,n=e,F(function(e){switch(e.g){case 1:if(go(),null==(i=fz(n))||"manifest"!=i.g)throw new eB(2,9,9004,n);return r=i,a=new fO,R(e,2),M(e,a.init(),4);case 4:return M(e,fB(a,r.rb(),r.Ma()),5);case 5:return o=e.h,M(e,o.getManifests([r.key()]),6);case 6:var u,l,c;return s=e.h[0],M(e,Promise.all([(u=t,l=s,c=a,F(function(e){var t,n,i,r,a,o,s;return M(e,(t=u.g,n=u.h.drm,i=c,r=l,F(function(e){return 1==e.g?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new eB(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(i),M(e,f1(n,t,o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:gi(r,!1),videoCapabilities:gi(r,!0)}})),2)):e.return():3!=e.g?(s=e.h,M(e,a.remove(s),3)):M(e,a.add(o.filter(function(e){return!s.includes(e.sessionId)})),0)})),0)})),function(e,t,n){function i(){}var r=function(e){var t=new Set;e=v(e.streams);for(var n=e.next();!n.done;n=e.next()){n=v(n.value.segments);for(var i=n.next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}(n);return f2(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(o,r,s)]),2);case 2:return N(e),M(e,a.destroy(),8);case 8:j(e,0)}})))},b.Pi=function(){var e,t,n,i,r,a,o,s,u,l,c;return gs(this,(e=this,F(function(d){switch(d.g){case 1:return go(),t=e.g,n=e.h.drm,i=new fO,r=!1,R(d,2),M(d,i.init(),4);case 4:var h;a=[],h=i,h.g.forEach(function(e){(function(e){a.push(e)})(e.getEmeSessionCell())}),s=(o=v(a)).next();case 5:if(s.done){d.u(2);break}return M(d,(u=s.value).getAll(),8);case 8:return l=d.h,M(d,f1(n,t,l),9);case 9:return c=d.h,M(d,u.remove(c),10);case 10:c.length!=l.length&&(r=!0),s=o.next(),d.u(5);break;case 2:return N(d),M(d,i.destroy(),11);case 11:j(d,3);break;case 3:return d.return(!r)}})))},b.list=function(){var e,t,n;return gs(this,F(function(i){switch(i.g){case 1:return go(),e=[],t=new fO,R(i,2),M(i,t.init(),4);case 4:var r,a;return n=Promise.resolve(),r=t,a=function(t,i){n=n.then(function(){return F(function(n){if(1==n.g)return M(n,i.getAllManifests(),2);n.h.forEach(function(n,i){n=f2(new fW("manifest",t.rb,t.Ma,i),n),e.push(n)}),C(n)})})}
1,r.g.forEach(function(e,t){e.getCells().forEach(function(e,n){a({rb:t,Ma:n},e)})}),M(i,n,2);case 2:return N(i),M(i,t.destroy(),6);case 6:j(i,3);break;case 3:return i.return(e)}}))},b.Ec=function(e,t,n){var i,r=this;return F(function(a){var o,s,u;return 1==a.g?((i=new rJ({Ob:r.g,onError:t,ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),M(a,(o=i,s=e.variants,u=n.offline.usePersistentLicense,o.fa=!0,o.B=new Map,o.M=u,rQ(o,s)),2)):3!=a.g?M(a,r0(i),3):a.return(i)})},z("shaka.offline.Storage",f6),f6.deleteAll=function(){var e;return F(function(t){var n,i,r;return 1==t.g?(e=new fO,R(t,2),M(t,(n=e,F(function(e){return 1==e.g?((r=0<(i=Array.from(n.g.values())).length)||fV.forEach(function(e){(e=e())&&i.push(e)}),M(e,Promise.all(i.map(function(e){return e.erase()})),2)):r?e.u(0):M(e,Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.g?(N(t),M(t,e.destroy(),5)):j(t,0)})},f6.prototype.list=f6.prototype.list,f6.prototype.removeEmeSessions=f6.prototype.Pi,f6.prototype.remove=f6.prototype.remove,f6.prototype.store=f6.prototype.store,f6.prototype.getNetworkingEngine=f6.prototype.Ab,f6.prototype.getConfiguration=f6.prototype.getConfiguration,f6.prototype.configure=f6.prototype.configure,f6.prototype.destroy=f6.prototype.destroy,f6.support=f8;var gl=(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");function gc(){}function gd(e,t){for(e={priority:t||0,callback:e},t=0;t<gh.length;t++)if(gh[t].priority<e.priority)return void gh.splice(t,0,e);gh.push(e)}ll.offline=f8,z("shaka.polyfill",gc),gc.register=gd,gc.installAll=function(){for(var e=v(gh),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){en("Error installing polyfill!",e)}}};var gh=[];function gp(){}function gf(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=v(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())!function(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||void 0==e?this.removeAttribute(t):this.setAttribute(t,e)}})}(t.value)}function gg(){}function gm(){e6()||ti("Sky_STB")||vK()}function gv(){}function gy(){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",gb),document.addEventListener("webkitfullscreenerror",gb),document.addEventListener("mozfullscreenchange",gb),document.addEventListener("mozfullscreenerror",gb),document.addEventListener("MSFullscreenChange",gb),document.addEventListener("MSFullscreenError",gb)}}function gb(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 gw(){}function gT(){var e=!0;!e2()||e2()&&tt()||e2()&&ti("Fuchsia")||(e=!1),(e4()||e5()||e6()||e1()||eZ()||ti("PC=EOS")||e8()||ti("WPE"))&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=gx)}function gx(t){var n,i,r,a,o;return F(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&&!eJ(i.contentType)||r&&!eJ(r.contentType))return s.return(n);s.u(2);break}if(!eY())return s.return(n);if(!i){s.u(3);break}return M(s,(u=i,F(function(t){var n,i,r,a;return 1==t.g?e2()?M(t,(n=u,F(function(t){if(1==t.g){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return t.return(ec(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,i in gS?(a=gS[i],t.u(2)):M(t,cast.__platform__.canDisplayType(i),3)}return 2!=t.g&&(a=t.h,gS[i]=a),t.return(a)})),3):eZ()?(l=u.contentType,u.width&&u.height&&(l+="; width="+u.width,l+="; height="+u.height),u.framerate&&(l+="; framerate="+u.framerate),u.bitrate&&(l+="; bitrate="+u.bitrate),t.return(ec(l))):t.u(2):2!=t.g?(c=t.h,t.return(c)):t.return(ec(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,b,w,T,x,S,A,E=r.contentType;if(e2()&&r.spatialRendering&&(E+="; spatialRendering=true"),!ec(E))return s.return(n)}case 2:if(!t.keySystemConfiguration)return n.supported=!0,s.return(n);return a=t.keySystemConfiguration,M(s,(d=i,h=r,p=a,F(function(e){switch(e.g){case 1:if(f=[],g=[],p.audio&&(m={robustness:p.audio.robustness||"",contentType:h.contentType},eZ()&&h.contentType.includes('codecs="ac-3"')&&(m.contentType='audio/mp4; codecs="ec-3"'),p.audio.encryptionScheme&&(m.encryptionScheme=p.audio.encryptionScheme),f.push(m)),p.video&&(v={robustness:p.video.robustness||"",contentType:d.contentType},p.video.encryptionScheme&&(v.encryptionScheme=p.video.encryptionScheme),g.push(v)),y={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes},f.length&&(y.audioCapabilities=f),g.length&&(y.videoCapabilities=g),b=d?d.contentType:"",w=h?h.contentType:"",T=ir(b)+";"+ii(b),x=ir(w)+";
1"+ii(w),S=p.keySystem,A=null,D(e,2),eX.has(T+"#"+x+"#"+S)){A=eX.get(T+"#"+x+"#"+S)||null,e.u(4);break}return M(e,navigator.requestMediaKeySystemAccess(p.keySystem,[y]),5);case 5:A=e.h,eX.set(T+"#"+x+"#"+S,A);case 4:P(e,3);break;case 2:L(e);case 3:return e.return(A)}})),6);case 6:(o=s.h)&&(n.supported=!0,n.keySystemAccess=o);case 5:return s.return(n)}})}gc.Aria=gp,gp.install=gf,gd(gf),gc.EncryptionScheme=gg,gg.install=gm,gd(gm,-2),gc.Fullscreen=gv,gv.install=gy,gd(gy),gc.MediaCapabilities=gw,gw.install=gT;gw.originalMcap=null;var gS={};function gA(){}function gE(){var t,n=e7();(e.MediaSource||e.ManagedMediaSource)&&(n&&e.MediaSource?10>=n?e.MediaSource=null:12>=n?(gk(),gI()):15>=n&&gk():ti("DT_STB_BCM")?(gk(),gI()):ti("Tizen 2")||e0()||ti("Tizen 4")?function(){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return"opus"!=ii(e)&&t(e)},e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"opus"!=ii(e)&&n(e)}}}():ti("WPE")&&(gk(),gI())),(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=ie(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=ie(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(t=MediaSource.isTypeSupported,e1()||(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 gk(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,V.apply(0,arguments));return t.abort=function(){},t}}function gI(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function gM(){}function gC(){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 gD;screen.orientation=n,t(),e.addEventListener("orientationchange",function(){t();var e=new rp("change");n.dispatchEvent(e)})}())}function gD(){rm.call(this),this.type="",this.angle=0}function gR(){}function gP(e,t){try{var n=new gj(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function gL(e){var t=this.mediaKeys;return t&&t!=e&&gO(t,null),delete this.mediaKeys,(this.mediaKeys=e)?gO(e,this):Promise.resolve()}function gN(e){if(ek(e=eA(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=tp(e=td(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=eS(e),this.dispatchEvent(t)}function gj(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=v(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var a=v(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(a=(n=v(n.videoCapabilities)).next();!a.done;a=n.next())(a=a.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupp
1orted(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function gU(e){this.h=new WebKitMediaKeys(e),this.g=new es}function gO(e,t){if(e.g.Va(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",gN);try{return oC(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function g_(e){rm.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new es,this.sessionId="",this.expiration=NaN,this.closed=new ro,this.keyStatuses=new gF}function gB(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new rp("keystatuseschange"),e.dispatchEvent(t)}function gF(){this.size=0,this.g=void 0}gw.memoizedCanDisplayTypeRequests_=gS,gd(gT,-1),gc.MediaSource=gA,gA.install=gE,gd(gE),gc.Orientation=gM,gM.install=gC,A(gD,rm),gD.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))},gD.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},gd(gC),gc.PatchedMediaKeysApple=gR,gR.uninstall=function(){a&&(a=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",o),HTMLMediaElement.prototype.setMediaKeys=s,e.MediaKeys=u,e.MediaKeySystemAccess=l,navigator.requestMediaKeySystemAccess=c,o=c=s=l=u=null,e.shakaMediaKeysPolyfill="")},gR.install=function(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&((void 0===t?0:t)&&(a=!0,o=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),s=HTMLMediaElement.prototype.setMediaKeys,u=e.MediaKeys,l=e.MediaKeySystemAccess,c=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gL,e.MediaKeys=gU,e.MediaKeySystemAccess=gj,navigator.requestMediaKeySystemAccess=gP,e.shakaMediaKeysPolyfill=gV)},gj.prototype.createMediaKeys=function(){return Promise.resolve(new gU(this.keySystem))},gj.prototype.getConfiguration=function(){return this.g},gU.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new g_(this.h,e)},gU.prototype.setServerCertificate=function(){return Promise.resolve(!1)},gU.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},A(g_,rm),(b=g_.prototype).generateRequest=function(e,t){var n=this;this.h=new ro;try{var i=this.l.createSession("video/mp4",eA(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",eS(e.message)),e=new rp("message",e),n.dispatchEvent(e)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(gB(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:gB(n,"output-not-allowed");break;default:gB(n,"internal-error")}}),gB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},b.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},b.update=function(e){this.g=new ro;try{this.i.update(eA(e))}catch(e){this.g.reject(e)}return this.g},b.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Va()}catch(e){this.closed.reject(e)}return this.closed},b.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(b=gF.prototype).ac=function(){return this.g},b.forEach=function(e){this.g&&e(this.g,eq.value())},b.get=function(e){if(this.has(e))return this.g},b.has=function(e){var t=eq.value();return!!(this.g&&eT(e,t))},b.entries=function(){},b.keys=function(){},b.values=function(){};var gV="apple";function gH(){}function gG(){e.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||e0()||ti("Tizen 4")||ti("Tizen 5.0")||e1()&&38===e3())&&(MediaKeys.prototype.setServerCertificate=gK)}function gK(){return Promise.resolve(!1)}function gq(){}function gX(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=gW,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gz,e.MediaKeys=gY,e.MediaKeySystemAccess=gJ,e.shakaMediaKeysPolyfill=g$)}function gW(){return Promise.reject(Error("The key system specified is not supported."))}function gz(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function gY(){throw TypeError("Illegal constructor.")}function gJ(){throw this.keySystem="",TypeError("Illegal constructor.")}gc.PatchedMediaKeysCert=gH,gH.install=gG,gd(gG),gc.PatchedMediaKeysNop=gq,gq.install=gX,gY.prototype.createSession=function(){},gY.prototype.setServerCertificate=function(){},gY.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},gJ.prototype.getConfiguration=function(){},gJ.prototype.createMediaKeys=function(){};var g$="nop";function gQ(){}function gZ(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
1(HTMLMediaElement.prototype.webkitGenerateKeyRequest)mt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=g1,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=g2,e.MediaKeys=g4,e.MediaKeySystemAccess=g3,e.shakaMediaKeysPolyfill=mn}}function g0(e){var t=mt;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function g1(e,t){try{var n=new g3(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function g2(e){var t=this.mediaKeys;return t&&t!=e&&g5(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&g5(e,this),Promise.resolve()}function g3(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=v(t);for(var a=t.next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=v(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=v(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i){this.h=o;return}}throw n="Unsupported keySystem",("org.w3.clearkey"==e||"com.widevine.alpha"==e)&&(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function g4(e){this.l=e,this.h=null,this.g=new es,this.i=[],this.j=new Map}function g5(e,t){e.h=t,e.g.Va();var n=mt;t&&(e.g.D(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=eS(t.initData),e.h.dispatchEvent(n)}),e.g.D(t,n+"keymessage",function(t){var n=g6(e,t.sessionId);n&&(t=new rp("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=g6(e,t.sessionId))&&t.ready()}),e.g.D(t,n+"keyerror",function(t){var n=g6(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?g7(n,"output-restricted"):1==i?g7(n,"expired"):g7(n,"internal-error"))}}))}function g6(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 g8(e,t,n){rm.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 ro,this.keyStatuses=new me}function g9(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=eA(tp("LOAD_SESSION|"+n));else{var r=tp("PERSISTENT|");i=nY(r,t)}else i=eA(t)}catch(e){return Promise.reject(e)}e.h=new ro;var a=g0("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new ez(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).Z(.01)}return e.h}function g7(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new rp("keystatuseschange"),e.dispatchEvent(t)}function me(){this.size=0,this.g=void 0}gd(gX,-10),gc.PatchedMediaKeysWebkit=gQ,gQ.install=gZ,g3.prototype.createMediaKeys=function(){return Promise.resolve(new g4(this.g))},g3.prototype.getConfiguration=function(){return this.h},g4.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 g8(t,this.l,e),this.i.push(e),e},g4.prototype.setServerCertificate=function(){return Promise.resolve(!1)},g4.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},A(g8,rm),(b=g8.prototype).ready=function(){g7(this,"usable"),this.g&&this.g.resolve(),this.g=null},b.generateRequest=function(e,t){return g9(this,t,null)},b.load=function(e){return"persistent-license"==this.l?g9(this,null,e):Prom
1ise.reject(Error("Not a persistent session."))},b.update=function(e){var t=new ro;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=tc(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=nX(a.keys[0].k),a=nX(a.keys[0].kid)}else r=eA(i),a=null;var o=g0("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},b.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=g0("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},b.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(b=me.prototype).ac=function(){return this.g},b.forEach=function(e){this.g&&e(this.g,eq.value())},b.get=function(e){if(this.has(e))return this.g},b.has=function(e){var t=eq.value();return!!(this.g&&eT(e,t))},b.entries=function(){},b.keys=function(){},b.values=function(){};var mt="",mn="webkit";function mi(){}function mr(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=mo,Object.defineProperty(t,"disablePictureInPicture",{get:mu,set:ml,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ms,document.addEventListener("webkitpresentationmodechanged",ma,!0))}}function ma(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 mo(){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 ms(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function mu(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function ml(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function mc(){}function md(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=mh))}function mh(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function mp(){}function mf(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:mg})}function mg(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function mm(){}function mv(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function my(){}function mb(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||e1()&&38===e3())&&(t.getVideoPlaybackQuality=mw)}}function mw(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function mT(){}function mx(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=mS;else if(6==n)t=mA;else{try{var i=!!mS(1,2,"")}catch(e){i=!1}i&&(t=mS)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function mS(t,n,i){return new e.TextTrackCue(t,n,i)}function mA(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function mE(){}gd(gZ),gc.PiPWebkit=mi,mi.install=mr,gd(mr),gc.RandomUUID=mc,mc.install=md,gd(md),gc.Symbol=mp,mp.install=mf,gd(mf),gc.VideoPlayPromise=mm,mm.install=mv,gd(mv),gc.VideoPlaybackQuality=my,my.install=mb,gd(mb),gc.VTTCue=mT,mT.install=mx,gd(mx),mE.prototype.parseInit=function(){},mE.prototype.setSequenceMode=function(){},mE.prototype.setManifestType=function(){},mE.prototype.parseMedia=function(e,t){var n=null,i=[];e=v(e=tc(e).split(/\r?\n/));for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=mk.exec(r))){var a=mI.exec(r[1]);r=new t4(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},z("shaka.text.LrcTextParser",mE),mE.prototype.parseMedia=mE.prototype.parseMedia,mE.prototype.setManifestType=mE.prototype.setManifestType,mE.prototype.setSequenceMode=mE.prototype.setSequenceMode,mE.prototype.parseInit=mE.prototype.parseInit;var mk=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,mI=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function mM(){}function mC(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 mD(e,t){t=v(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(nv)||e.textDecoration.push(nv);break;case"noUnderline":e.textDecoration.includes(nv)&&eU(e.textDecoration,nv);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&eU(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&eU(e.textDecoration,"overline")}}function mR(e,t,n,i,r){return r=void 0===r||r,(e=mL(e,n,i))?e:r?mP(t,n,i):null}
1function mP(e,t,n){return e?tV(e,mZ,n)||mN(e,t,n):null}function mL(e,t,n){return tV(e,mZ,n)||mN(e,t,n)}function mN(e,t,n){e=mj(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=tB(e[r],"urn:ebu:tt:style",n);a||(a=tV(e[r],mZ,n)),a||(a=mL(e[r],t,n)),a&&(i=a)}return i}function mj(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;!e&&!(e=r?tB(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e){for(r=(t=v(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=v(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}}return a}function mU(e,t){var n=mO(e.attributes.begin,t),i=mO(e.attributes.end,t);return e=mO(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function mO(e,t){var n=null;if(mK.test(e)){n=Number((e=mK.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(mq.test(e))n=m_(mq,e);else if(mX.test(e))n=m_(mX,e);else if(mW.test(e))n=Number((e=mW.exec(e))[1])/t.frameRate;else if(mz.test(e))n=Number((e=mz.exec(e))[1])/t.g;else if(mY.test(e))n=m_(mY,e);else if(e)throw new eB(2,2,2001,"Could not parse cue time range in TTML");return n}function m_(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 mB(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]))}ip["application/x-subtitle-lrc"]=function(){return new mE},mM.prototype.parseInit=function(){},mM.prototype.setSequenceMode=function(){},mM.prototype.setManifestType=function(){},mM.prototype.parseMedia=function(e,t,n,i){var r,a=tc(e);if(e=[],""==a)return e;var o=tM(a,"tt",!0);if(!o)throw new eB(2,2,2005,"Failed to parse TTML.");if(!(a=tj(o,"body")[0]))return[];var s=tV(o,mQ,"frameRate"),u=tV(o,mQ,"subFrameRate"),l=tV(o,mQ,"frameRateMultiplier"),c=tV(o,mQ,"tickRate"),d=tV(o,mQ,"cellResolution"),h=o.attributes["xml:space"]||"default",p=tV(o,mZ,"extent");if("default"!=h&&"preserve"!=h)throw new eB(2,2,2005,"Invalid xml:space value: "+h);h="default"==h,s=new mB(s,u,l,c),d=(r=d)&&(r=/^(\d+) (\d+)$/.exec(r))?{lc:parseInt(r[1],10),rows:parseInt(r[2],10)}:null,u=((u=tj(o,"metadata")[0])?u.children:[]).filter(function(e){return"\n"!=e}),l=tj(o,"style"),o=tj(o,"region"),c=[];for(var f=v(o),g=f.next();!g.done;g=f.next())(g=function(e,t,n){var i=new eP,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=mF.exec(n)||mG.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var a,o=mP(e,t,"extent");if(o){var s=(a=mF.exec(o))||mG.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?eL:0,i.heightUnits=a||null!=r?eL:0)}return(e=mP(e,t,"origin"))&&null!=(s=(a=mF.exec(e))||mG.exec(e))&&(i.viewportAnchorX=Number(s[1]),i.viewportAnchorY=Number(s[2]),a?o||(i.width=100-i.viewportAnchorX,i.widthUnits=eL,i.height=100-i.viewportAnchorY,i.heightUnits=eL):(null!=r&&(i.viewportAnchorY=100*i.viewportAnchorY/r),null!=n&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=a||null!=n?eL:0),i}(g.value,l,p))&&c.push(g);if(tP(a,"p").length)throw new eB(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(p=v(tP(a,"div"))).next();!f.done;f=p.next())if(tP(f.value,"span").length)throw new eB(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,u,l,c,d,h,p){var f,g,m,y,b=c;if(tD(t)){if(!d)return null;var w={tagName:"span",children:[tL(t)],attributes:{},parent:null}}else w=t;for(var T=null,x=v(m0),S=x.next();!S.done&&!(T=mj(w,"backgroundImage",r,"#",S.value)[0]);S=x.next());x=null;var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((S=tV(w,m0,"backgroundImage"))&&A.test(S)){if((x=parseInt(S.split(":").pop(),10)-1)>=p.length)return null;x=p[x]}else h&&S&&!S.startsWith("#")&&(A=new nM(h),S=new nM(S),(S=A.resolve(S).toString())&&(x=S));if(("p"==t.tagName||T||x)&&(d=!0),t=d,S="default"==(w.attributes["xml:space"]||(u?"default":"preserve")),A=w.children.every(tD),u=[],!A)for(var E=v(w.children),k=E.next();!k.done;
1k=E.next())(k=e(k.value,n,i,r,a,o,s,S,l,w,d,h,p))&&u.push(k);if(r=null!=c,h=tL(w),h=w.children.length&&h&&/\S/.test(h),!((E=w.attributes.begin||w.attributes.end||w.attributes.dur)||h||"br"==w.tagName||0!=u.length||r&&!S))return null;for(h=(p=mU(w,i)).start,p=p.end;b&&b.tagName&&"tt"!=b.tagName;){h=(f=b,g=i,m=h,y=p,f=mU(f,g),null==m?m=f.start:null!=f.start&&(m+=f.start),null==y?y=f.end:null!=f.start&&(y+=f.start),p={start:m,end:y}).start,p=p.end,b=b.parent}if(null==h&&(h=0),h+=n.periodStart,p=null==p?1/0:p+n.periodStart,h=Math.max(h,n.segmentStart),p=Math.min(p,n.segmentEnd),!E&&0<u.length)for(h=1/0,p=0,i=(n=v(u)).next();!i.done;i=n.next())h=Math.min(h,(i=i.value).startTime),p=Math.max(p,i.endTime);if("br"==w.tagName)return(a=new t4(h,p,"")).lineBreak=!0,a;if(n="",A&&(n=tm(tL(w)||""),S&&(n=n.replace(/\s+/g," "))),(n=new t4(h,p,n)).nestedCues=u,d||(n.isContainer=!0),l&&(n.cellResolution=l),l=mj(w,"region",o,"")[0],w.attributes.region&&l&&l.attributes["xml:id"]){var I=l.attributes["xml:id"];n.region=s.filter(function(e){return e.id==I})[0]}return s=l,c&&r&&!w.attributes.region&&!w.attributes.style&&(s=mj(c,"region",o,"")[0]),function(e,t,n,i,r,a,o,s){if("rtl"==mR(t,n,a,"direction",o=o||s)&&(e.direction="rtl"),"tb"==(s=mR(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=na),(s=mR(t,n,a,"textAlign",!0))?(e.positionAlign=m$[s],e.lineAlign=mJ[s],e.textAlign=nn[s.toUpperCase()]):e.textAlign=nt,(s=mR(t,n,a,"displayAlign",!0))&&(e.displayAlign=nr[s.toUpperCase()]),(s=mR(t,n,a,"color",o))&&(e.color=mC(s)),(s=mR(t,n,a,"backgroundColor",o))&&(e.backgroundColor=mC(s)),(s=mR(t,n,a,"border",o))&&(e.border=s),s=mR(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=mR(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=np),e.wrapLine=!(s=mR(t,n,a,"wrapOption",o))||"noWrap"!=s,(s=mR(t,n,a,"lineHeight",o))&&s.match(mH)&&(e.lineHeight=s),(s=mR(t,n,a,"fontSize",o))&&(s.match(mH)||s.match(mV))&&(e.fontSize=s),(s=mR(t,n,a,"fontStyle",o))&&(e.fontStyle=nm[s.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,s=i.attributes.encoding,i=tL(i).trim(),"PNG"==r&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=mR(t,n,a,"textOutline",o))&&((i=i.split(" "))[0].match(mH)?e.textStrokeColor=e.color:(e.textStrokeColor=mC(i[0]),i.shift()),i[0]&&i[0].match(mH)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=mR(t,n,a,"letterSpacing",o))&&i.match(mH)&&(e.letterSpacing=i),(i=mR(t,n,a,"linePadding",o))&&i.match(mH)&&(e.linePadding=i),(i=mR(t,n,a,"opacity",o))&&(e.opacity=parseFloat(i)),(i=mP(n,a,"textDecoration"))&&mD(e,i),(i=mL(t,a,"textDecoration"))&&mD(e,i),(i=mR(t,n,a,"textCombine",o))&&(e.textCombineUpright=i),mR(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(n,w,s,T,x,a,t,0==u.length),n}(a,t,s,u,l,o,c,h,d,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},z("shaka.text.TtmlTextParser",mM),mM.prototype.parseMedia=mM.prototype.parseMedia,mM.prototype.setManifestType=mM.prototype.setManifestType,mM.prototype.setSequenceMode=mM.prototype.setSequenceMode,mM.prototype.parseInit=mM.prototype.parseInit;var mF=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,mV=/^(\d{1,4}(?:\.\d+)?|100)%$/,mH=/^(\d+px|\d+em|\d*\.?\d+c)$/,mG=/^(\d+)px (\d+)px$/,mK=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mq=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mX=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,mW=/^(\d*(?:\.\d*)?)f$/,mz=/^(\d*(?:\.\d*)?)t$/,mY=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),mJ={left:nu,center:"center",right:"end",start:nu,end:"end"},m$={left:"line-left",center:"center",right:"line-right"},mQ=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],mZ=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],m0=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function m1(){this.g=new mM}function m2(){this.g="UNKNOWN"}function m3(e,t,n){var i,r,a;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?"middle"==(t=i[1])?e.textAlign=nt:e.textAlign=nn[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":ne)):(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=nl[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=ns,e.line=Number(n[1]),n[2]&&(e.lineAlign=nl[n[2].toUpperCase()]))}function m4(){this.g=null}function m5(){}function m6(){this.g=new m2}function m8(e){var t="WEBVTT\n\n";if(""==e)return t;e=v((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"));for(var n=e.next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n").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 m9(){}function m7(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 ve(e){return 3600*((e=vr.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}ip["application/ttml+xml"]=function(){return new mM},m1.prototype.parseInit=function(e){var t=!1;if((new rO).box("moov",r_).box("trak",r_).box("mdia",r_).box("minf",r_).box("stbl",r_).R("stsd",rB).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new eB(2,2,2007)},m1.prototype.setSequenceMode=function(){},m1.prototype.setManifestType=function(){},m1.prototype.parseMedia=function(e,t,n){var i=this,r=!1,a=[],o=[];if((new rO).box("moof",r_).box("traf",r_).R("subs",function(e){o=[];for(var t=e.reader,n=t.P(),i=0;i<n;i++){t.P();for(var r=t.ma(),a=0;a<r;a++)1==e.version?o.push(t.P()):o.push(t.ma()),t.T(),t.T(),t.P()}}).box("mdat",rH(function(e){if(r=!0,o.length){for(var s=eA(e,0,o[0]),u=[],l=o[0],c=1;c<o.length;c++){var d=eA(e,l,o[c]);d=nK(d),u.push("data:image/png;base64,"+d),l+=o[c]}a=a.concat(i.g.parseMedia(s,t,n,u))}else a=a.concat(i.g.parseMedia(e,t,n,[]))})).parse(e,!1),!r)throw new eB(2,2,2007);return a},z("shaka.text.Mp4TtmlParser",m1),m1.prototype.parseMedia=m1.prototype.parseMedia,m1.prototype.setManifestType=m1.prototype.setManifestType,m1.prototype.setSequenceMode=m1.prototype.setSequenceMode,m1.prototype.parseInit=m1.prototype.parseInit,ip['application/mp4; codecs="stpp"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new m1},ip['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new m1},ip['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new m1},m2.prototype.parseInit=function(){},m2.prototype.setSequenceMode=function(){},m2.prototype.setManifestType=function(e){this.g=e},m2.prototype.parseMedia=function(e,t){var n=(e=(e=tc(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new eB(2,2,2e3);if(e=t.vttOffset,n[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g){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=tS(e[1])))throw new eB(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}for(t=[],r=(i=v(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new ty(r);var a=new eP;tT(r),tb(r);for(var o=tT(r);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),tb(r),o=tT(r)}t.push(a)}for(t9(i=new Map),r=[],a=(n=v(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(u=1,s=[],o=-1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=v(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=i.get(o))||(l=new t4(0,0,""));for(var c=!1,d=0;d<u.length;d++){var h=/^\s*([^:]+):\s*(.*)/.exec(u[d]);if(h){var p=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=p;break;case"color":c=!0,l.color=p;break;case"font-family":c=!0,l.fontFamily=p;break;case"font-size":c=!0,l.fontSize=p;break;case"font-weight":(700<=parseInt(p,10)||"bold"==p)&&(c=!0,l.fontWeight=np);break;case"font-style":switch(p){case"normal":c=!0,l.fontStyle=nf;break;case"italic":c=!0,l.fontStyle=ng;break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(p);break;case"text-combine-upright":c=!0,l.textCombineUpright=p;break;case"text-shadow":c=!0,l.textShadow=p;break;case"white-space":c=!0,l.wrapLine="noWrap"!=p}}}c&&i.set(o,l)}}if(l=a,c=e,1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])a=null;else if(a=null,l[0].includes("--\x3e")||(a=l[0],l.splice(0,1)),o=tx(s=new ty(l[0])),d=tw(s,/[ \t]+--\x3e[ \t]+/g),u=tx(s),null==o||null==d||null==u)en("Failed to parse VTT time code. Cue skipped:",a,l),a=null;else{for(o+=c,u+=c,c=l.slice(1).join("\n").trim(),i.has("global")?((l=i.get("global").clone()).startTime=o,l.endTime=u,l.payload=c):l=new t4(o,u,c),tb(s),o=tT(s);o;)m3(l,o,t),tb(s),o=tT(s);t8(l,i),null!=a&&(l.id=a),a=l}a&&r.push(a)}return r},z("shaka.text.VttTextParser",m2),m2.prototype.parseMedia=m2.prototype.parseMedia,m2.prototype.setManifestType=m2.prototype.setManifestType,m2.prototype.setSequenceMode=m2.prototype.setSequenceMode,m2.prototype.parseInit=m2.prototype.parseInit,ip["text/vtt"]=function(){return new m2},ip['text/vtt; codecs="vtt"']=function(){return new m2},ip['text/vtt; codecs="wvtt"']=function(){return new m2},m4.prototype.parseInit=function(e){var t=this,n=!1;if((new rO).box("moov",r_).box("trak",r_).box("mdia",r_).R("mdhd",function(e){t.g=(e=aB(e.reader,e.version)).timescale}).box("minf",r_).box("stbl",r_).R("stsd",rB).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new eB(2,2,2008)},m4.prototype.setSequenceMode=function(){},m4.prototype.setManifestType=function(){},m4.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new eB(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if((new rO).box("moof",r_).box("traf",r_).R("tfdt",function(e){o=!0,i=a_(e.reader,e.version).baseMediaDecodeTime}).R("tfhd",function(e){l=aO(e.reader,e.flags).cd}).R("trun",function(e){s=!0,r=aF(e.reader,e.version,e.flags).Zg}).box("mdat",rH(function(e){u=!0,n=e}
1)).parse(e,!1),!u&&!o&&!s)throw new eB(2,2,2008);e=i;for(var c=new rN(n,0),d=v(r),h=d.next();!h.done;h=d.next()){var p=(h=h.value).Pf||l,f=h.me?i+h.me:e;e=f+(p||0);var g=0;do{var m=c.P();g+=m;var y=c.P(),b=null;"vttc"==rK(y)?8<m&&(b=c.vb(m-8)):c.skip(m-8),p&&b&&(m=function(e,t,n){var i,r,a;return(new rO).box("payl",rH(function(e){i=tc(e)})).box("iden",rH(function(e){r=tc(e)})).box("sttg",rH(function(e){a=tc(e)})).parse(e),i?function(e,t,n,i,r){if(t8(e=new t4(i,r,e)),t&&(e.id=t),n)for(n=tT(t=new ty(n));n;)m3(e,n,[]),tb(t),n=tT(t);return e}(i,r,a,t,n):null}(b,t.periodStart+f/this.g,t.periodStart+e/this.g),a.push(m))}while(h.sampleSize&&g<h.sampleSize)}return a.filter(iv)},z("shaka.text.Mp4VttParser",m4),m4.prototype.parseMedia=m4.prototype.parseMedia,m4.prototype.setManifestType=m4.prototype.setManifestType,m4.prototype.setSequenceMode=m4.prototype.setSequenceMode,m4.prototype.parseInit=m4.prototype.parseInit,ip['application/mp4; codecs="wvtt"']=function(){return new m4},m5.prototype.parseInit=function(){},m5.prototype.setSequenceMode=function(){},m5.prototype.setManifestType=function(){},m5.prototype.parseMedia=function(e){var t=tc(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=v(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){var i=new ty((n=n.value.split("\n"))[0]),r=tx(i),a=tw(i,/,/g);if(i=tx(i),null==r||null==a||null==i)throw new eB(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new t4(r,i,n.slice(1).join("\n").trim()))}return e},z("shaka.text.SbvTextParser",m5),m5.prototype.parseMedia=m5.prototype.parseMedia,m5.prototype.setManifestType=m5.prototype.setManifestType,m5.prototype.setSequenceMode=m5.prototype.setSequenceMode,m5.prototype.parseInit=m5.prototype.parseInit,ip["text/x-subviewer"]=function(){return new m5},m6.prototype.parseInit=function(){},m6.prototype.setSequenceMode=function(){},m6.prototype.setManifestType=function(){},m6.prototype.parseMedia=function(e,t,n){return e=eA(tp(e=m8(e=tc(e)))),this.g.parseMedia(e,t,n,[])},z("shaka.text.SrtTextParser",m6),m6.srt2webvtt=m8,m6.prototype.parseMedia=m6.prototype.parseMedia,m6.prototype.setManifestType=m6.prototype.setManifestType,m6.prototype.setSequenceMode=m6.prototype.setSequenceMode,m6.prototype.parseInit=m6.prototype.parseInit,ip["text/srt"]=function(){return new m6},m9.prototype.parseInit=function(){},m9.prototype.setSequenceMode=function(){},m9.prototype.setManifestType=function(){},m9.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=v(r=tc(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var a=r.value;r=a,(a=vt.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=v(t.split(/\r?\n/))).next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=vn.exec(e))){if(e=a[1].trim(),a=a[2].trim(),"Format"==e)r=a.split(vi);else if("Style"==e){e=a.split(vi),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=v(n.split(/\r?\n/))).next(),e={};!a.done;e={lh:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=vn.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(vi);else if("Dialogue"==a){o=o.split(vi),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new t4(s=ve(a.Start),ve(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.lh=a.Style,(e=i.find(function(e){return function(t){return t.Name==e.lh}}(e)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=m7(n))&&(e.color=n),(n=t.BackColour)&&(n=m7(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=np),t.Italic&&(e.fontStyle=ng),t.Underline&&e.textDecoration.push(nv),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=ni,e.textAlign="start";break;case 2:e.displayAlign=ni,e.textAlign=nt;break;case 3:e.displayAlign=ni,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=nt;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=nt;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,e),r.push(o)}}return r},z("shaka.text.SsaTextParser",m9),m9.prototype.parseMedia=m9.prototype.parseMedia,m9.prototype.setManifestType=m9.prototype.setManifestType,m9.prototype.setSequenceMode=m9.prototype.setSequenceMode,m9.prototype.parseInit=m9.prototype.parseInit;var vt=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vn=/^\s*([^:]+):\s*(.*)/,vi=/\s*,\s*/,vr=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function va(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)?{Rd:n,ea:e}:null}function vo(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 vs(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 vu(e){this.i=e,this.h=0,this.g=new Map}function vl(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]>>
13<<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,pa:e,ea:r}}function vc(e){this.i=e,this.h=0,this.g=new Map}function vd(e,t){if(t+8>e.length||2935!=(e[t]<<8|(0|e[t+1])))return null;var n=new aq(e.subarray(t+2));aW(n,2),aW(n,3);var i=az(n,11)+1<<1,r=az(n,2);if(3==r){r=[24e3,22060,16e3][r=az(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=az(n,2);var o=az(n,3),s=az(n,1);return(n=az(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,0|s|o<<1,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,pa:e,ea:i})}function vh(e){this.i=e,this.h=0,this.g=new Map}ip["text/x-ssa"]=function(){return new m9},(b=vu.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&ec(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ia(t)||"mp4a.40.2")+'"':t},b.getOriginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){for(var r=eA(e),a=aU(r),o=a.length;o<r.length&&!vs(r,o);o++);if(e=1e3*n.endTime,(a=aj(a)).length&&n&&(a=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=a.data),!(a=vo(r,o)))return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=va(r,o);if(!u)return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));var l=u.Rd+u.ea;o+l<=r.length&&s.push({data:r.subarray(o+u.Rd,o+l),size:u.ea,duration:1024,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),o+=l}return e=Math.floor(e*(r=a.sampleRate)/1e3),i=new pG([i={id:t.id,type:"audio",codecs:a.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,fb:[],pa:new Uint8Array([]),za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.h,baseMediaDecodeTime:e,ab:s},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=pK(i),this.g.set(n,t)),n=pY(i),this.h++,Promise.resolve(t=nY(t,n))},z("shaka.transmuxer.AacTransmuxer",vu),vu.prototype.transmux=vu.prototype.transmux,vu.prototype.getOriginalMimeType=vu.prototype.getOriginalMimeType,vu.prototype.convertCodecs=vu.prototype.convertCodecs,vu.prototype.isSupported=vu.prototype.isSupported,vu.prototype.destroy=vu.prototype.destroy,nw("audio/aac",function(){return new vu("audio/aac")},nS),(b=vc.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&ec(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':t},b.getOriginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){e=eA(e);for(var r=aU(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=aj(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=vl(e,a);if(!l)return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.pa,u.push({data:e.subarray(a,a+l.ea),size:l.ea,duration:1536,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),a+=l.ea}return e=Math.floor(o*r/1e3),i=new pG([i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,fb:[],pa:s,za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.h,baseMediaDecodeTime:e,ab:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=pK(i),this.g.set(n,t)),n=pY(i),this.h++,Promise.resolve(t=nY(t,n))},z("shaka.transmuxer.Ac3Transmuxer",vc),vc.prototype.transmux=vc.prototype.transmux,vc.prototype.getOriginalMimeType=vc.prototype.getOriginalMimeType,vc.prototype.convertCodecs=vc.prototype.convertCodecs,vc.prototype.isSupported=vc.prototype.isSupported,vc.prototype.destroy=vc.prototype.destroy,nw("audio/ac3",function(){return new vc("audio/ac3")},nS),(b=vh.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&ec(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},b.getOriginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){e=eA(e);for(var r=aU(e),a=r.length;a<e.length&&2935!=(e[a]<<8|(0|e[a+1]));a++);var o=1e3*n.endTime;(r=aj(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=vd(e,a);if(!l)return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.pa,u.push({data:e.subarray(a,a+l.ea),size:l.ea,duration:1536,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),a+=l.ea}return e=Math.floor(o*r/1e3),i=new pG([i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,fb:[],pa:s,za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.h,baseMediaDecodeTime:e,ab:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=pK(i),this.g.set(n,t)),n=pY(i),this.h++,Promise.resolve(t=nY(t,n))},z("shaka.transmuxer.Ec3Transmuxer",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,nw("audio/ec3",function(){return new vh("audio/ec3")},nS);var vp=[100,110,122,244,44,83,86,118,128,138,139,134];function vf(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*vv[14*(3===n?3-i:3===i?3:4)+r-1],a=vy[3*(3===n?0:2===n?1:2)+a],n=vb[n][i];var s=vw[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,ea:u,Ti:8*n*s}}return null}function vg(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function vm(e,t){if(t+1<e.length&&vg(e,t)){var n=vf(e,t),i=4;return n&&n.ea&&(i=n.ea),(t+=i)===e.length||t+1<e.length&&vg(e,t)}return!1}var vv=[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],vy=[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]],vw=[0,1,1,4];function vT(e){this.i=e,this.h=0,this.g=new Map}function vx(e){this.h=e,this.g=null}function vS(e){this.h=e,(this.g=hL.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]!==vE[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function vA(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}(b=vT.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&ec(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},b.getOriginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){for(var r,a=eA(e),o=aU(a).length;o<a.length&&!vm(a,o);o++);for(e=[];o<a.length;){var s=vf(a,o);if(!s)return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));r||(r=s),o+s.ea<=a.length&&e.push({data:a.subarray(o,o+s.ea),size:s.ea,duration:1152,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),o+=s.ea}return r?(a=9e4*r.Ti/r.sampleRate*this.h,i=new pG([i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r.sampleRate,duration:i,fb:[],pa:new Uint8Array([]),za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.h,baseMediaDecodeTime:a,ab:e},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=pK(i),this.g.set(n,t)),n=pY(i),this.h++,Promise.resolve(t=nY(t,n))):Promise.reject(new eB(2,3,3018,n?n.N()[0]:null))},z("shaka.transmuxer.Mp3Transmuxer",vT),vT.prototype.transmux=vT.prototype.transmux,vT.prototype.getOriginalMimeType=vT.prototype.getOriginalMimeType,vT.prototype.convertCodecs=vT.prototype.convertCodecs,vT.prototype.isSupported=vT.prototype.isSupported,vT.prototype.destroy=vT.prototype.destroy,nw("audio/mpeg",function(){return new vT("audio/mpeg")},nS),(b=vx.prototype).destroy=function(){},b.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=ia(e).split(","),n=n0("audio",t);return t=n0("video",t),!!n&&!t&&"mp3"==it(n)&&ec(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},b.getOriginalMimeType=function(){return this.h},b.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new a2,e=eA(e),"mp3"!=(e=this.g.parse(e)).dd().audio||"audio"!=r)return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),e=(r=v(e.Xb())).next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=vf(e,t))?(t+i.ea<=e.length&&(n=nY(n,e.subarray(t,t+i.ea))),t+=i.ea):t++;return Promise.resolve(n)},z("shaka.transmuxer.MpegTsTransmuxer",vx),vx.prototype.transmux=vx.prototype.transmux,vx.prototype.getOriginalMimeType=vx.prototype.getOriginalMimeType,vx.prototype.convertCodecs=vx.prototype.convertCodecs,vx.prototype.isSupported=vx.prototype.isSupported,vx.prototype.destroy=vx.prototype.destroy,nw("video/mp2t",function(){return new vx("video/mp2t")},nA),(b=vS.prototype).destroy=function(){},b.isSupported=function(e,t){var n=e.startsWith("mss/");return!!this.g&&!!n&&(t?ec(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ec(t)||ec(e)))},b.convertCodecs=function(e,t){return t.replace("mss/","")},b.getOriginalMimeType=function(){return this.h},b.transmux=function(e,t,n){if(!n)return Promise.resolve(eA(e));if(!t.mssPrivateData)return Promise.reject(new eB(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]=vA(f,"traf")+vA(s,"senc")+16);var m=eA(r.write());return Promise.resolve(m)}catch(e){return e instanceof eB?Promise.reject(e):Promise.reject(new eB(2,3,3022,n?n.N()[0]:null))}},z("shaka.transmuxer.MssTransmuxer",vS),vS.prototype.transmux=vS.prototype.transmux,vS.prototype.getOriginalMimeType=vS.prototype.getOriginalMimeType,vS.prototype.convertCodecs=vS.prototype.convertCodecs,vS.prototype.isSupported=vS.prototype.isSupported,vS.prototype.destroy=vS.prototype.destroy;var vE=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function vk(e){this.l=e,this.g=0,this.i=new Map,this.h=this.j=null}nw("mss/audio/mp4",function(){return new vS("mss/audio/mp4")},nS),nw("mss/video/mp4",function(){return new vS("mss/video/mp4")},nS),(b=vk.prototype).destroy=function(){this.i.clear(),this.h&&this.h.destroy()},b.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=ia(n).split(",");return n=n0("audio",i),i=n0("video",i),(!n||!!vI.includes(n=it(n)))&&(!i||!!vM.includes(n=it(i)))&&(t?ec(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ec(t)||ec(e)))},b.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=ia(t).replace("mp4a.40.34","mp3").split(",").map(function(e){return ij(e,"audio/mp4")}).map(iU).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},b.getOriginalMimeType=function(){return this.l},b.transmux=function(e,t,n,i,r){var a=eA(e);
1if("audio"==r&&!a6(a)){for(var o=aU(a),s=o.length;s<a.length;s++)if(vm(a,s))return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));for(s=o.length;s<a.length;s++)if(vs(a,s))return this.h||(this.h=new vu("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new a2;var u=this.j.parse(a),l=[],c=u.dd();try{var d=null;if("video"==r){switch(c.video){case"avc":var h=[],p=null,f=[],g=u.sc();if(!g.length)throw new eB(2,3,3023,n?n.N()[0]:null);for(var m=0;m<g.length;m++){var b=g[m],w=b.nalus;f.push.apply(f,y(w));var T=function(e){var t=!1,n=[],i=e.find(function(e){return 7==e.type}),r=!1;e=v(e);for(var a=e.next();!a.done;a=e.next()){a=a.value;var o=!1;switch(a.type){case 1:o=r=!0;var s,u=a.data;i&&4<u.length&&(a0(s=new aq(u)),a$(s),2===(u=a$(s))||4===u||7===u||9===u)&&(t=!0);break;case 5:t=o=r=!0;break;case 6:case 7:case 8:case 12:o=!0;break;case 9:r=o=!0;break;default:o=!1}r&&o&&(o=a.fullData.byteLength,(u=new Uint8Array(4))[0]=o>>24&255,u[1]=o>>16&255,u[2]=o>>8&255,u[3]=255&o,n.push(u),n.push(a.fullData))}return n.length?{data:nY.apply(nG,y(n)),ld:t}:null}(w);if(T){null==p&&(p=b.dts);var x=void 0;x=m+1<g.length?(g[m+1].dts||0)-(b.dts||0):1<g.length?(b.dts||0)-(g[m-1].dts||0):9e4*(n.endTime-n.startTime),h.push({data:T.data,size:T.data.byteLength,duration:x,hb:Math.round((b.pts||0)-(b.dts||0)),flags:{kb:0,$a:0,Za:0,Xa:0,Ya:T.ld?2:1,lb:+!T.ld}})}}var S=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 aq(t.data),i=a0(n);if(a0(n),a0(n),aJ(n),vp.includes(i)&&(3===(i=a$(n))&&aW(n,1),aJ(n),aJ(n),aW(n,1),aZ(n))){i=3!==i?8:12;for(var r=0;r<i;r++)aZ(n)&&(6>r?a1(n,16):a1(n,64))}if(aJ(n),0===(i=a$(n)))a$(n);else if(1===i)for(aW(n,1),aJ(n),aJ(n),i=a$(n),r=0;r<i;r++)aJ(n);aJ(n),aW(n,1);var a=a$(n),o=a$(n),s=az(n,1);0===s&&aW(n,1),aW(n,1);var u=0,l=0,c=0,d=0;if(aZ(n)&&(u=a$(n),l=a$(n),c=a$(n),d=a$(n)),r=i=1,aZ(n)&&aZ(n)){var h=a0(n);0<h&&16>=h?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][h-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][h-1]):255===h&&(i=az(n,16),r=az(n,16))}return n=(2-s)*(o+1)*16-2*c-2*d,a=16*(a+1)-2*u-2*l,u=[],t=t.fullData,u.push(t.byteLength>>>8&255),u.push(255&t.byteLength),u=u.concat.apply(u,y(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,y(e)),{height:n,width:a,za:e=new Uint8Array([1,u[3],u[4],u[5],255,225].concat(u,[1],t)),Da:i,Fa:r}}(f);if(!S||null==p)throw new eB(2,3,3018,n?n.N()[0]:null);t.height=S.height,t.width=S.width,d={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,fb:[],pa:new Uint8Array([]),za:S.za,Da:S.Da,Fa:S.Fa,data:{wb:this.g,baseMediaDecodeTime:p,ab:h},stream:t};break;case"hvc":var A=[],E=null,k=[],I=u.sc();if(!I.length)throw new eB(2,3,3023,n?n.N()[0]:null);for(var M=0;M<I.length;M++){var C=I[M],D=C.nalus;k.push.apply(k,y(D));for(var R=!1,P=[],L=!1,N=v(D),j=N.next();!j.done;j=N.next()){var U=j.value;switch(U.type){case 1:case 0:var O=L=!0;break;case 19:case 20:case 21:R=O=L=!0;break;case 32:case 33:case 34:case 39:case 40:O=!0;break;case 35:L=O=!0;break;default:O=!1}if(L&&O){var _=U.fullData.byteLength,B=new Uint8Array(4);B[0]=_>>24&255,B[1]=_>>16&255,B[2]=_>>8&255,B[3]=255&_,P.push(B),P.push(U.fullData)}}var F=P.length?{data:nY.apply(nG,y(P)),ld:R}:null;if(F){null==E&&null!=C.dts&&(E=C.dts);var V=void 0;V=M+1<I.length?(I[M+1].dts||0)-(C.dts||0):1<I.length?(C.dts||0)-(I[M-1].dts||0):9e4*(n.endTime-n.startTime),A.push({data:F.data,size:F.data.byteLength,duration:V,hb:Math.round((C.pts||0)-(C.dts||0)),flags:{kb:0,$a:0,Za:0,Xa:0,Ya:F.ld?2:1,lb:+!F.ld}})}}var H=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 aq(t,!0),a0(n),a0(n),az(n,4),az(n,2),az(n,6),{Df:(t=az(n,3))+1,$f:n=aZ(n)});e=function(e){a0(e=new aq(e,!0)),a0(e);var t=0,n=0,i=0,r=0;az(e,4);var a=az(e,3);aZ(e);for(var o=az(e,2),s=az(e,1),u=az(e,5),l=a0(e),c=a0(e),d=a0(e),h=a0(e),p=a0(e),f=a0(e),g=a0(e),m=a0(e),v=a0(e),y=a0(e),b=a0(e),w=[],T=[],x=0;x<a;x++)w.push(aZ(e)),T.push(aZ(e));if(0<a)for(x=a;8>x;x++)az(e,2);for(x=0;x<a;x++)w[x]&&az(e,88),T[x]&&a0(e);a$(e),3==(w=a$(e))&&az(e,1),T=a$(e),x=a$(e),aZ(e)&&(t+=a$(e),n+=a$(e),i+=a$(e),r+=a$(e));var S=a$(e),A=a$(e),E=a$(e);
1if(aZ(e))for(var k=0;k<=a;k++)a$(e),a$(e),a$(e);else a$(e),a$(e),a$(e);if(a$(e),a$(e),a$(e),a$(e),a$(e),a$(e),aZ(e)&&aZ(e))for(k=0;4>k;k++)for(var I=0;I<(3===k?2:6);I++)if(aZ(e)){var M=Math.min(64,1<<4+(k<<1));1<k&&aQ(e);for(var C=0;C<M;C++)aQ(e)}else a$(e);for(aZ(e),aZ(e),aZ(e)&&(a0(e),a$(e),a$(e),aZ(e)),k=a$(e),M=I=0;M<k;M++)if(C=!1,0!==M&&(C=aZ(e)),C){M===k&&a$(e),aZ(e),a$(e);for(var D=C=0;D<=I;D++){var R=aZ(e),P=!1;R||(P=aZ(e)),(R||P)&&C++}I=C}else{for(R=0,I=(D=a$(e))+(C=a$(e));R<D;R++)a$(e),aZ(e);for(D=0;D<C;D++)a$(e),aZ(e)}if(aZ(e))for(k=a$(e),I=0;I<k;I++){for(M=0;M<E+4;M++)az(e,1);az(e,1)}if(k=E=1,I=0,aZ(e),aZ(e),aZ(e)){if(aZ(e)&&(M=a0(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?(E=C[M-1],k=D[M-1]):255===M&&(E=az(e,16),k=az(e,16))),aZ(e)&&aZ(e),aZ(e)&&(az(e,3),aZ(e),aZ(e)&&(a0(e),a0(e),a0(e))),aZ(e)&&(a$(e),a$(e)),aZ(e),aZ(e),aZ(e),(M=aZ(e))&&(a$(e),a$(e),a$(e),a$(e)),aZ(e)&&(az(e,32),az(e,32),aZ(e)&&a$(e),aZ(e)))for(D=!1,M=aZ(e),C=aZ(e),(M||C)&&((D=aZ(e))&&(a0(e),az(e,5),aZ(e),az(e,5)),az(e,4),az(e,4),D&&az(e,4),az(e,5),az(e,5),az(e,5)),R=0;R<=a;R++){var L=!0;P=1,aZ(e)||(L=aZ(e));var N=!1;if(L?a$(e):N=aZ(e),N||(P=a$(e)+1),M){for(L=0;L<P;L++)a$(e),a$(e),D&&(a$(e),a$(e));aZ(e)}if(C){for(L=0;L<P;L++)a$(e),a$(e),D&&(a$(e),a$(e));aZ(e)}}aZ(e)&&(aZ(e),aZ(e),aZ(e),I=a$(e),a$(e),a$(e),a$(e),a$(e))}return{bf:b,hf:o,jf:s,gf:u,cf:l,df:c,ef:d,ff:h,We:p,Xe:f,Ye:g,Ze:m,$e:v,af:y,ae:I,Pe:0,Ne:w,Me:S,Le:A,width:T-(t+n)*(1===w||2===w?2:1),height:x-(i+r)*(1===w?2:1),Vi:E,Ui:k}}(h.fullData);var g=(i=p.fullData,r=new aq(i,!0),a0(r),a0(r),a$(r),a$(r),aZ(r),aZ(r),az(r,3),aZ(r),aZ(r),a$(r),a$(r),aQ(r),aZ(r),aZ(r),aZ(r)&&a$(r),aQ(r),aQ(r),aZ(r),aZ(r),aZ(r),aZ(r),i=aZ(r),r=aZ(r),a=1,r&&i?a=0:r?a=3:i&&(a=2),{Gf:a});return o=d.fullData,s=h.fullData,u=p.fullData,l={Df:f.Df,$f:f.$f,hf:e.hf,jf:e.jf,bf:e.bf,gf:e.gf,cf:e.cf,df:e.df,ef:e.ef,ff:e.ff,We:e.We,Xe:e.Xe,Ye:e.Ye,Ze:e.Ze,$e:e.$e,af:e.af,Pe:e.Pe,ae:e.ae,Ne:e.Ne,Me:e.Me,Le:e.Le,Gf:g.Gf},(c=new Uint8Array(23+(5+o.byteLength)+(5+s.byteLength)+(5+u.byteLength)))[0]=1,c[1]=(3&l.hf)<<6|!!l.jf<<5|31&l.gf,c[2]=l.cf,c[3]=l.df,c[4]=l.ef,c[5]=l.ff,c[6]=l.We,c[7]=l.Xe,c[8]=l.Ye,c[9]=l.Ze,c[10]=l.$e,c[11]=l.af,c[12]=l.bf,c[13]=240|(3840&l.ae)>>8,c[14]=255&l.ae,c[15]=252|3&l.Gf,c[16]=252|3&l.Ne,c[17]=248|7&l.Me,c[18]=248|7&l.Le,c[19]=0,c[20]=0,c[21]=(3&l.Pe)<<6|(7&l.Df)<<3|!!l.$f<<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.byteLength)>>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,Da:e.Vi,Fa:e.Ui}}(k);if(!H||null==E)throw new eB(2,3,3018,n?n.N()[0]:null);t.height=H.height,t.width=H.width,d={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,fb:[],pa:new Uint8Array([]),za:H.za,Da:H.Da,Fa:H.Fa,data:{wb:this.g,baseMediaDecodeTime:E,ab:A},stream:t}}d&&(l.push(d),d=null)}if("audio"==r){switch(c.audio){case"aac":for(var G,K=[],q=null,X=v(u.Xb()),W=X.next();!W.done;W=X.next()){var z=W.value,Y=z.data;if(Y){var J=0;if(!(G=vo(Y,J)))throw new eB(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=G.sampleRate,t.channelsCount=G.channelCount,null==q&&null!==z.pts&&(q=z.pts);J<Y.length;){var $=va(Y,J);if($){var Q=$.Rd+$.ea;J+Q<=Y.length&&K.push({data:Y.subarray(J+$.Rd,J+Q),size:$.ea,duration:1024,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),J+=Q}else J++}}}if(!G||null==q){if(!u.sc().length)throw new eB(2,3,3018,n?n.N()[0]:null);q=9e4*n.startTime;var Z=n0("audio",t.codecs.split(","));if(!Z||!t.channelsCount||!t.audioSamplingRate)throw new eB(2,3,3018,n?n.N()[0]:null);G={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:Z};var ee=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}(Z,t.channelsCount);if(!ee)throw new eB(2,3,3018,n?n.N()[0]:null);for(var et=q+9e4*(n.endTime-n.startTime),en=q;en<et;)K.push({data:ee,size:ee.byteLength,duration:1024,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),en+=1024/G.sampleRate*9e4}var ei=G.sampleRate,er=q/9e4*ei;d={id:t.id,type:"audio",codecs:G.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ei,duration:i,fb:[],pa:new Uint8Array([]),za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.g,baseMediaDecodeTime:er,ab:K},stream:t};break;case"ac3":for(var ea=[],eo=0,es=new Uint8Array([]),eu=null,el=v(u.Xb()),ec=el.next();!ec.done;ec=el.next()){var ed=ec.value,eh=ed.data;null==eu&&null!==ed.pts&&(eu=ed.pts);for(var ep=0;ep<eh.length;){var ef=vl(eh,ep);ef?(t.audioSamplingRate=ef.sampleRate,t.channelsCount=ef.channelCount,eo=ef.sampleRate,es=ef.pa,ea.push({data:eh.subarray(ep,ep+ef.ea),size:ef.ea,duration:1536,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),ep+=ef.ea):ep++}}if(0==eo||0==es.byteLength||null==eu)throw new eB(2,3,3018,n?n.N()[0]:null);var eg=eu/9e4*eo;d={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eo,duration:i,fb:[],pa:es,za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.g,baseMediaDecodeTime:eg,ab:ea},stream:t};break;case"ec3":for(var em=[],ev=0,ey=new Uint8Array([]),eb=null,ew=v(u.Xb()),eT=ew.next();!eT.done;eT=ew.next()){var ex=eT.value,eS=ex.data;null==eb&&null!==ex.pts&&(eb=ex.pts);for(var eE=0;eE<eS.length;){var ek=vd(eS,eE);ek?(t.audioSamplingRate=ek.sampleRate,t.channelsCount=ek.channelCount,ev=ek.sampleRate,ey=ek.pa,em.push({data:eS.subarray(eE,eE+ek.ea),size:ek.ea,duration:1536,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),eE+=ek.ea):eE++}}if(0==ev||0==ey.byteLength||null==eb)throw new eB(2,3,3018,n?n.N()[0]:null);var eI=eb/9e4*ev;d={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ev,duration:i,fb:[],pa:ey,za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.g,baseMediaDecodeTime:eI,ab:em},stream:t};break;case"mp3":for(var eM,eC=[],eD=null,eR=v(u.Xb()),eP=eR.next();!eP.done;eP=eR.next()){var eL=eP.value,eN=eL.data;if(eN){null==eD&&null!==eL.pts&&(eD=eL.pts);for(var ej=0;ej<eN.length;){var eU=vf(eN,ej);eU?(eM||(eM=eU),ej+eU.ea<=eN.length&&eC.push({data:eN.subarray(ej,ej+eU.ea),size:eU.ea,duration:1152,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),ej+=eU.ea):ej++}}}if(!eM||null==eD)throw new eB(2,3,3018,n?n.N()[0]:null);var eO=eM.sampleRate,e_=eD/9e4*eO;d={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eO,duration:i,fb:[],pa:new Uint8Array([]),za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.g,baseMediaDecodeTime:e_,ab:eC},stream:t};break;case"opus":var eF=[],eV=null,eH=u.F;if(!eH)throw new eB(2,3,3018,n?n.N()[0]:null);var eG=[];switch(eH.Fh){case 1:case 2:eG=[0];break;case 0:eG=[255,1,1,0,1];break;case 128:eG=[255,2,0,0,1];break;case 3:eG=[1,2,1,0,2,1];break;case 4:eG=[1,2,2,0,1,2,3];break;case 5:eG=[1,3,2,0,4,1,2,3];break;case 6:eG=[1,4,2,0,4,1,2,3,5];break;case 7:eG=[1,4,2,0,4,1,2,3,5,6];break;case 8:eG=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:eG=[1,1,2,0,1];break;case 131:eG=[1,1,3,0,1,2];break;case 132:eG=[1,1,4,0,1,2,3];break;case 133:eG=[1,1,5,0,1,2,3,4];break;case 134:eG=[1,1,6,0,1,2,3,4,5];break;case 135:eG=[1,1,7,0,1,2,3,4,5,6];break;case 136:eG=[1,1,8,0,1,2,3,4,5,6,7]}for(var eK=new Uint8Array([0,eH.channelCount,0,0,eH.sampleRate>>>24&255,eH.sampleRate>>>17&255,eH.sampleRate>>>8&255,eH.sampleRate>>>0&255,0,0].concat(y(eG))),eq=eH.sampleRate,eX=v(u.Xb()),eW=eX.next();!eW.done;eW=eX.next()){var ez=eW.value,eY=ez.data;null==eV&&null!==ez.pts&&(eV=ez.pts);for(var eJ=0;eJ<eY.length;){for(var e$=0!=(16&eY[eJ+1]),eQ=0!=(8&eY[eJ+1]),eZ=eJ+2,e0=0;255===eY[eZ];)e0+=255,eZ+=1;e0+=eY[eZ],eZ+=1,eZ+=2*!!e$,eZ+=2*!!eQ;var e1=eY.slice(eZ,eZ+e0);eF.push({data:e1,size:e1.byteLength,duration:960,hb:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,lb:0}}),eJ=eZ+e0}}if(0==eK.byteLength||null==eV)throw new eB(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=eH.sampleRate,t.channelsCount=eH.channelCount;var e2=eV/9e4*eq;d={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eq,duration:i,fb:[],pa:eK,za:new Uint8Array([]),Da:0,Fa:0,data:{wb:this.g,baseMediaDecodeTime:e2,ab:eF},stream:t}}d&&(l.push(d),d=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!l.length)return Promise.reject(new eB(2,3,3018,n?n.N()[0]:null));var e3=new pG(l),e4=t.id+"_"+n.i;if(this.i.has(e4))var e5=this.i.get(e4);else e5=pK(e3),this.i.set(e4,e5);var e6=pY(e3);return this.g++,Promise.resolve(nY(e5,e6))},z("shaka.transmuxer.TsTransmuxer",vk),vk.prototype.transmux=vk.prototype.transmux,vk.prototype.getOriginalMimeType=vk.prototype.getOriginalMimeType,vk.prototype.convertCodecs=vk.prototype.convertCodecs,vk.prototype.isSupported=vk.prototype.isSupported,vk.prototype.destroy=vk.prototype.destroy;var vI=["aac","ac-3","ec-3","mp3","opus"],vM=["avc","hevc"];function vC(){}function vD(){d||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(d=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=vR,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function vR(e,t){var n,i=this;
1return F(function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),M(r,d.call(i,e,t),2)):vV(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=d,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=vP,r.return(vP.call(i,e,t)))})}function vP(e,t){var n,i,r,a,o,s,u,l,c,h,p,f,g=this;return F(function(m){if(1==m.g){for(console.assert(g==navigator,'bad "this" for requestMediaKeySystemAccess'),n=vF(e),i=[],a=(r=v(t)).next();!a.done;a=r.next())s=vL((o=a.value).videoCapabilities,n),u=vL(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((l=Object.assign({},o)).videoCapabilities=s,l.audioCapabilities=u,i.push(l));if(!i.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return M(m,d.call(g,e,i),2)}return 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 vB(h,p,f))})}function vL(e,t){return e?e.filter(function(e){return vH(e.encryptionScheme,t)}):e}function vN(){}function vj(){h||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(h=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vU,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function vU(e){var t,n,i=this;return F(function(r){switch(r.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),M(r,h.call(i,e),2);case 2:if(t=r.h,!e.keySystemConfiguration)return r.return(t);if((n=t.keySystemAccess)&&vV(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=h,r.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vO,n){r.u(3);break}return M(r,v_(e),4);case 4:return t.keySystemAccess=r.h,r.return(t);case 3:return r.return(vO.call(i,e))}})}function vO(e){var t,n,i,r,a,o,s,u=this;return F(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=vF(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},vH(n,a)&&vH(t,a))?M(l,h.call(u,e),2):l.return(o);case 2:if((s=l.h).keySystemAccess){s.keySystemAccess=new vB(s.keySystemAccess,t,n),l.u(3);break}if(!e.keySystemConfiguration){l.u(3);break}return M(l,v_(e),5);case 5:s.keySystemAccess=l.h;case 3:return l.return(s)}})}function v_(e){var t,n;return F(function(i){if(1==i.g){var r=e.keySystemConfiguration,a=[],o=[];return r.audio&&a.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,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,M(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}function vB(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function vF(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":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function vV(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function vH(e,t){return!e||e==t||("cbcs"==e||"cbcs-1-9"==e)&&(!!vX||!!vq)}function vG(){}function vK(){vD(),vj()}nw("video/mp2t",function(){return new vk("video/mp2t")},nE),z("EmeEncryptionSchemePolyfill",vC),vC.install=vD,z("McEncryptionSchemePolyfill",vN),vN.install=vj,vB.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=v(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=v(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},vB.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},z("EncryptionSchemePolyfills",vG),vG.install=vK;var vq=navigator.userAgent.includes("CrKey"),vX=100<=parseInt(navigator.userAgent.
1split("Firefox/").pop(),10);void 0!==n&&n.exports&&(n.exports=vG)}).call(i,e,e,void 0),i.shaka)t[r]=i.shaka[r]}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.